This repository has been archived by the owner on Aug 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathLeaveChannel-9cf98d2b.js.map
1 lines (1 loc) · 17.7 KB
/
LeaveChannel-9cf98d2b.js.map
1
{"version":3,"file":"LeaveChannel-9cf98d2b.js","sources":["../src/ui/Badge/index.jsx","../src/smart-components/InviteMembers/index.jsx","../src/smart-components/ChannelList/components/utils.js","../src/smart-components/ChannelSettings/components/LeaveChannel.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\n\nimport './index.scss';\nimport Label, { LabelTypography, LabelColors } from '../Label';\nimport { LocalizationContext } from '../../lib/LocalizationContext';\n\nexport default function Badge({\n count,\n maxLevel,\n className,\n}) {\n const { stringSet } = useContext(LocalizationContext);\n const maximumNumber = parseInt('9'.repeat((maxLevel > 6) ? 6 : maxLevel), 10);\n return (\n <div\n className={[\n ...(Array.isArray(className) ? className : [className]),\n 'sendbird-badge',\n ].join(' ')}\n >\n <div className=\"sendbird-badge__text\">\n <Label\n type={LabelTypography.CAPTION_2}\n color={LabelColors.ONCONTENT_1}\n >\n {\n (count > maximumNumber)\n ? `${maximumNumber}${stringSet.BADGE__OVER}`\n : count\n }\n </Label>\n </div>\n </div>\n );\n}\n\nBadge.propTypes = {\n count: PropTypes.number.isRequired,\n maxLevel: PropTypes.number,\n className: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string),\n ]),\n};\n\nBadge.defaultProps = {\n maxLevel: 2,\n className: [],\n};\n","import React, { useState, useEffect, useContext } from 'react';\nimport PropTypes from 'prop-types';\n\nimport './index.scss';\nimport Label, { LabelTypography, LabelColors } from '../../ui/Label';\nimport Modal from '../../ui/Modal';\nimport { Type as ButtonTypes } from '../../ui/Button/type';\nimport UserListItem from '../../ui/UserListItem';\nimport { LocalizationContext } from '../../lib/LocalizationContext';\n\nconst filterUser = (idsToFilter) => (currentId) => idsToFilter.includes(currentId);\n\nconst InviteMembers = (props) => {\n const {\n userQueryCreator,\n closeModal,\n onSubmit,\n submitText,\n titleText,\n idsToFilter,\n swapParams,\n } = props;\n\n const [users, setUsers] = useState([]);\n const [selectedUsers, setSelectedUsers] = useState({});\n const { stringSet } = useContext(LocalizationContext);\n const [usersDataSource, setUsersDataSource] = useState({});\n const selectedCount = Object.keys(selectedUsers).length;\n\n useEffect(() => {\n const applicationUserListQuery = userQueryCreator();\n setUsersDataSource(applicationUserListQuery);\n applicationUserListQuery.next((res, err) => {\n // eslint-disable-next-line no-underscore-dangle\n let users_ = res;\n let error = err;\n if (swapParams) {\n users_ = err;\n error = users_;\n }\n if (error) {\n return;\n }\n setUsers(users_);\n });\n }, []);\n\n return (\n <Modal\n titleText={titleText}\n submitText={submitText}\n type={ButtonTypes.PRIMARY}\n onCancel={closeModal}\n onSubmit={() => {\n const selectedUserList = Object.keys(selectedUsers);\n if (selectedUserList.length > 0) {\n onSubmit(selectedUserList);\n closeModal();\n }\n }}\n >\n <div>\n <Label\n color={(selectedCount > 0) ? LabelColors.PRIMARY : LabelColors.ONBACKGROUND_3}\n type={LabelTypography.CAPTION_1}\n >\n {`${selectedCount} ${stringSet.MODAL__INVITE_MEMBER__SELECTEC}`}\n </Label>\n <div\n className=\"sendbird-create-channel--scroll\"\n onScroll={(e) => {\n const { hasNext } = usersDataSource;\n const fetchMore = (\n e.target.clientHeight + e.target.scrollTop === e.target.scrollHeight\n );\n\n if (hasNext && fetchMore) {\n usersDataSource.next((usersBatch, error) => {\n if (error) {\n return;\n }\n setUsers([\n ...users,\n ...usersBatch,\n ]);\n });\n }\n }}\n >\n {\n users.map((user) => (!filterUser(idsToFilter)(user.userId)) && (\n <UserListItem\n key={user.userId}\n user={user}\n checkBox\n checked={selectedUsers[user.userId]}\n onChange={\n (event) => {\n const modifiedSelectedUsers = {\n ...selectedUsers,\n [event.target.id]: event.target.checked,\n };\n if (!event.target.checked) {\n delete modifiedSelectedUsers[event.target.id];\n }\n setSelectedUsers(modifiedSelectedUsers);\n }\n }\n />\n ))\n }\n </div>\n </div>\n </Modal>\n );\n};\n\nInviteMembers.propTypes = {\n idsToFilter: PropTypes.arrayOf(PropTypes.string),\n swapParams: PropTypes.bool,\n userQueryCreator: PropTypes.func.isRequired,\n closeModal: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n submitText: PropTypes.string,\n titleText: PropTypes.string,\n};\nInviteMembers.defaultProps = {\n swapParams: false,\n submitText: 'create',\n titleText: 'Create new channel',\n idsToFilter: [],\n};\n\nexport default InviteMembers;\n","export const createDefaultUserListQuery = ({ sdk, userFilledApplicationUserListQuery = {} }) => {\n const params = sdk.createApplicationUserListQuery();\n if (userFilledApplicationUserListQuery) {\n Object.keys(userFilledApplicationUserListQuery).forEach((key) => {\n params[key] = userFilledApplicationUserListQuery[key];\n });\n }\n return params;\n};\n\nconst getApplicationAttributes = (sdk = {}) => {\n const { appInfo = {} } = sdk;\n const { applicationAttributes = [] } = appInfo;\n return applicationAttributes;\n};\n\nexport const isBroadcastChannelEnabled = (sdk = {}) => {\n const ALLOW_BROADCAST_CHANNEL = 'allow_broadcast_channel';\n const applicationAttributes = getApplicationAttributes(sdk);\n\n if (Array.isArray(applicationAttributes)) {\n return applicationAttributes.includes(ALLOW_BROADCAST_CHANNEL);\n }\n\n return false;\n};\nexport const isSuperGroupChannelEnabled = (sdk = {}) => {\n const ALLOW_SUPER_GROUP_CHANNEL = 'allow_super_group_channel';\n const applicationAttributes = getApplicationAttributes(sdk);\n\n if (Array.isArray(applicationAttributes)) {\n return applicationAttributes.includes(ALLOW_SUPER_GROUP_CHANNEL);\n }\n\n return false;\n};\n\nexport const setChannelType = (params, type) => {\n if (type === 'broadcast') {\n // eslint-disable-next-line no-param-reassign\n params.isBroadcast = true;\n }\n if (type === 'supergroup') {\n // eslint-disable-next-line no-param-reassign\n params.isSuper = true;\n }\n return params;\n};\n\nexport const createChannel = (\n sdk,\n selectedUsers,\n onBeforeCreateChannel,\n userId,\n type = 'group',\n) => new Promise((resolve, reject) => {\n // have custom params\n if (onBeforeCreateChannel) {\n const params = onBeforeCreateChannel(selectedUsers);\n setChannelType(params, type);\n sdk.GroupChannel.createChannel(params, (response, error) => {\n const swapParams = sdk.getErrorFirstCallback();\n let groupChannel = response;\n let err = error;\n if (swapParams) {\n groupChannel = error;\n err = response;\n }\n if (err) {\n reject(err);\n }\n resolve(groupChannel);\n });\n return;\n }\n\n const params = new sdk.GroupChannelParams();\n params.addUserIds(selectedUsers);\n params.isDistinct = false;\n\n if (userId) {\n params.operatorUserIds = [userId];\n }\n setChannelType(params, type);\n // do not have custom params\n sdk.GroupChannel.createChannel(\n params,\n (response, error) => {\n const swapParams = sdk.getErrorFirstCallback();\n let groupChannel = response;\n let err = error;\n if (swapParams) {\n groupChannel = error;\n err = response;\n }\n if (err) {\n reject(err);\n }\n resolve(groupChannel);\n },\n );\n});\n\nexport default createChannel;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport Modal from '../../../ui/Modal';\n\nconst LeaveChannel = (props) => {\n const {\n onCloseModal,\n onLeaveChannel,\n } = props;\n return (\n <Modal\n onCancel={onCloseModal}\n onSubmit={onLeaveChannel}\n submitText=\"Leave\"\n titleText=\"Leave this channel?\"\n />\n );\n};\n\nLeaveChannel.propTypes = {\n onCloseModal: PropTypes.func.isRequired,\n onLeaveChannel: PropTypes.func.isRequired,\n};\n\nexport default LeaveChannel;\n"],"names":["Badge","count","maxLevel","className","useContext","LocalizationContext","stringSet","maximumNumber","parseInt","repeat","React","Array","isArray","join","LabelTypography","CAPTION_2","LabelColors","ONCONTENT_1","BADGE__OVER","propTypes","PropTypes","number","isRequired","oneOfType","string","arrayOf","defaultProps","filterUser","idsToFilter","currentId","includes","InviteMembers","props","userQueryCreator","closeModal","onSubmit","submitText","titleText","swapParams","useState","users","setUsers","selectedUsers","setSelectedUsers","usersDataSource","setUsersDataSource","selectedCount","Object","keys","length","useEffect","applicationUserListQuery","next","res","err","users_","error","ButtonTypes","PRIMARY","selectedUserList","ONBACKGROUND_3","CAPTION_1","MODAL__INVITE_MEMBER__SELECTEC","e","hasNext","fetchMore","target","clientHeight","scrollTop","scrollHeight","usersBatch","map","user","userId","event","modifiedSelectedUsers","id","checked","bool","func","createDefaultUserListQuery","sdk","userFilledApplicationUserListQuery","params","createApplicationUserListQuery","forEach","key","getApplicationAttributes","appInfo","applicationAttributes","isBroadcastChannelEnabled","ALLOW_BROADCAST_CHANNEL","isSuperGroupChannelEnabled","ALLOW_SUPER_GROUP_CHANNEL","setChannelType","type","isBroadcast","isSuper","createChannel","onBeforeCreateChannel","Promise","resolve","reject","GroupChannel","response","getErrorFirstCallback","groupChannel","GroupChannelParams","addUserIds","isDistinct","operatorUserIds","LeaveChannel","onCloseModal","onLeaveChannel"],"mappings":";;;;;;;AAOe,SAASA,KAAT,OAIZ;AAAA,MAHDC,KAGC,QAHDA,KAGC;AAAA,MAFDC,QAEC,QAFDA,QAEC;AAAA,MADDC,SACC,QADDA,SACC;;AACD,oBAAsBC,UAAU,CAACC,mBAAD,CAAhC;AAAA,MAAQC,SAAR,eAAQA,SAAR;;AACA,MAAMC,aAAa,GAAGC,QAAQ,CAAC,IAAIC,MAAJ,CAAYP,QAAQ,GAAG,CAAZ,GAAiB,CAAjB,GAAqBA,QAAhC,CAAD,EAA4C,EAA5C,CAA9B;AACA,sBACEQ;AACE,IAAA,SAAS,EAAE,6BACLC,KAAK,CAACC,OAAN,CAAcT,SAAd,IAA2BA,SAA3B,GAAuC,CAACA,SAAD,CADlC,IAET,gBAFS,GAGTU,IAHS,CAGJ,GAHI;AADb,kBAMEH;AAAK,IAAA,SAAS,EAAC;AAAf,kBACEA,6BAAC,KAAD;AACE,IAAA,IAAI,EAAEI,eAAe,CAACC,SADxB;AAEE,IAAA,KAAK,EAAEC,WAAW,CAACC;AAFrB,KAKKhB,KAAK,GAAGM,aAAT,aACOA,aADP,SACuBD,SAAS,CAACY,WADjC,IAEIjB,KAPR,CADF,CANF,CADF;AAqBD;AAEDD,KAAK,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