![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /opt/mattermost/client/ |
Upload File : |
{"version":3,"file":"4377.469067183c098bc3d0d4.js","mappings":"+SA4BA,SAASA,EAAQC,GAWC,IAXA,KACdC,EAAI,KACJC,EAAI,SACJC,EAAQ,MACRC,EAAK,UACLC,EAAS,cACTC,EAAa,MACbC,EAAK,UACLC,EAAS,SACTC,EAAQ,OACRC,GACYV,EACZ,MAAM,cAACW,IAAiBC,EAAAA,EAAAA,YAEjBC,EAASC,IAAcC,EAAAA,EAAAA,WAAS,IAEvCC,EAAAA,EAAAA,YAAU,KACFT,GACAO,GAAW,EACf,GACD,CAACP,IAEJ,MAAMU,EAAW,GAAHC,OAAMjB,EAAI,KAAAiB,OAAIhB,EAAO,GAAHgB,OAAMhB,EAAI,KAAM,IAC1CiB,EAAU,GAAHD,OAAMD,GAAQC,OAAGL,EAAU,GAAKV,GACvCiB,EAAiBd,GAAiBa,EAAQE,OAASf,EACnDgB,EAAWC,QAAQhB,GA0BnBiB,EACFC,IAAAA,cAAA,QACIjB,UAAU,kBACV,cAAY,iBAEXG,EAAc,CAACe,GAAI,sBAAuBC,eAAgB,UAC1DP,GAAiBQ,EAAAA,EAAAA,IAAgBT,EAASb,GAAiBa,GAIpE,OACIM,IAAAA,cAAA,OAAKjB,UAAWqB,IAAW,iBAAkBrB,IACzCiB,IAAAA,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BsE,EAAclC,EAAWgC,EAE/B,OAAO7B,GAAQ,GAAKA,GAAQ0B,EAAAA,IAAqBK,CAAW,EAGnDC,EAA+B1Q,GAAsBA,IAAS2Q,EAAAA,GAAYC,M,gFCfhF,SAASrH,EAAiCsH,GAC7C,OAAO9I,MAAO1F,EAAUyO,KACpB,MAAM9O,EAAQ8O,IACRC,GAAgB9D,EAAAA,EAAAA,IAAiBjL,GACjCgP,EAA6B,CAC/BC,QAASF,EACTG,SAAU7J,EAAAA,GAAYC,QACtB9V,KAAM6V,EAAAA,GAAYE,mCAClBxV,MAAOof,KAAKC,UAAUP,IAG1B,aADMxO,GAASgP,EAAAA,EAAAA,IAAgBN,EAAe,CAACC,KACxC,CAACrI,MAAM,EAAK,CAE3B,C,kHCZA,MAAM2I,GAA2BC,EAAAA,EAAAA,IAAe,2BAA4B,CACxEtE,EAAAA,GACAuE,EAAAA,KACD,CACCC,EACAC,IAEO,IAAPjhB,OAAWghB,EAAM,KAAAhhB,OAAIihB,KASlB,SAASpE,EACZqE,EACAngB,EACAogB,GAEA,MAAMvP,GAAWiE,EAAAA,EAAAA,eACXuL,GAAgBpe,EAAAA,EAAAA,aAAY6d,GAC5BQ,EAAcF,GAAUC,EACxBE,EAAY,GAAHthB,OAAMe,GAAIf,OAAGqhB,GAK5B,MAAO,EAHOre,EAAAA,EAAAA,cAAYue,EAAAA,EAAAA,IAAkBD,EAAWJ,GAAeM,EAAAA,eACrDne,EAAAA,EAAAA,cAAaoe,GAAa7P,GAAS8P,EAAAA,EAAAA,IAAcJ,EAAWG,KAAY,CAACH,IAM9F,C","sources":["webpack://mattermost-webapp/./src/components/widgets/inputs/url_input/url_input.tsx","webpack://mattermost-webapp/./src/components/channel_name_form_field/channel_name_form_field.tsx","webpack://mattermost-webapp/./src/components/widgets/modals/components/checkbox_with_select_item.tsx","webpack://mattermost-webapp/./src/components/widgets/modals/components/modal_header.tsx","webpack://mattermost-webapp/./src/components/widgets/modals/components/radio_setting_item.tsx","webpack://mattermost-webapp/./src/components/channel_notifications_modal/reset_to_default_button/index.tsx","webpack://mattermost-webapp/./src/components/channel_notifications_modal/utils.tsx","webpack://mattermost-webapp/./src/components/channel_notifications_modal/channel_notifications_modal.tsx","webpack://mattermost-webapp/./src/components/channel_notifications_modal/index.ts","webpack://mattermost-webapp/./src/components/widgets/icons/check_circle_icon.tsx","webpack://mattermost-webapp/./src/components/widgets/icons/globe_circle_solid_icon.tsx","webpack://mattermost-webapp/./src/components/widgets/icons/lock_circle_solid_icon.tsx","webpack://mattermost-webapp/./src/components/widgets/icons/upgrade_badge_icon.tsx","webpack://mattermost-webapp/./src/components/widgets/public-private-selector/public-private-selector.tsx","webpack://mattermost-webapp/./src/components/new_channel_modal/new_channel_modal.tsx","webpack://mattermost-webapp/./src/components/resizable_sidebar/resizable_divider.tsx","webpack://mattermost-webapp/./src/components/resizable_sidebar/utils.ts","webpack://mattermost-webapp/./src/packages/mattermost-redux/src/actions/boards.ts","webpack://mattermost-webapp/./src/stores/hooks.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport classNames from 'classnames';\nimport React, {useEffect, useState} from 'react';\nimport {useIntl} from 'react-intl';\n\nimport WithTooltip from 'components/with_tooltip';\n\nimport {getShortenedURL} from 'utils/url';\n\nimport Input from '../input/input';\n\nimport './url_input.scss';\n\ntype URLInputProps = {\n base: string;\n path?: string;\n pathInfo: string;\n limit?: number;\n maxLength?: number;\n shortenLength?: number;\n error?: string;\n className?: string;\n onChange?: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;\n onBlur?: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;\n};\n\nfunction UrlInput({\n base,\n path,\n pathInfo,\n limit,\n maxLength,\n shortenLength,\n error,\n className,\n onChange,\n onBlur,\n}: URLInputProps) {\n const {formatMessage} = useIntl();\n\n const [editing, setEditing] = useState(false);\n\n useEffect(() => {\n if (error) {\n setEditing(true);\n }\n }, [error]);\n\n const fullPath = `${base}/${path ? `${path}/` : ''}`;\n const fullURL = `${fullPath}${editing ? '' : pathInfo}`;\n const isShortenedURL = shortenLength && fullURL.length > shortenLength;\n const hasError = Boolean(error);\n\n const handleOnInputChange = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n event.preventDefault();\n\n if (onChange) {\n onChange(event);\n }\n };\n\n const handleOnInputBlur = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n event.preventDefault();\n\n setEditing(hasError);\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n const handleOnButtonClick = () => {\n if (!hasError) {\n setEditing(!editing);\n }\n };\n\n const urlInputLabel = (\n <span\n className='url-input-label'\n data-testid='urlInputLabel'\n >\n {formatMessage({id: 'url_input.label.url', defaultMessage: 'URL: '})}\n {isShortenedURL ? getShortenedURL(fullURL, shortenLength) : fullURL}\n </span>\n );\n\n return (\n <div className={classNames('url-input-main', className)}>\n <div className='url-input-container'>\n {isShortenedURL ? (\n <WithTooltip\n title={fullURL}\n >\n {urlInputLabel}\n </WithTooltip>\n\n ) : (\n urlInputLabel\n )}\n {(editing || hasError) && (\n <Input\n data-testid='channelURLInput'\n name='url-input'\n type='text'\n containerClassName='url-input-editable-container'\n wrapperClassName='url-input-editable-wrapper'\n inputClassName='url-input-editable-path'\n autoFocus={true}\n autoComplete='off'\n value={pathInfo}\n limit={limit}\n maxLength={maxLength}\n hasError={hasError}\n onChange={handleOnInputChange}\n onBlur={handleOnInputBlur}\n />\n )}\n <button\n className={classNames('url-input-button', {disabled: hasError})}\n disabled={hasError}\n onClick={handleOnButtonClick}\n >\n <span className='url-input-button-label'>\n {editing ? formatMessage({id: 'url_input.buttonLabel.done', defaultMessage: 'Done'}) : formatMessage({id: 'url_input.buttonLabel.edit', defaultMessage: 'Edit'})}\n </span>\n </button>\n </div>\n {error && (\n <div className='url-input-error'>\n <i className='icon icon-alert-outline'/>\n <span>{error}</span>\n </div>\n )}\n </div>\n );\n}\n\nexport default UrlInput;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React, {useCallback, useEffect, useRef, useState} from 'react';\nimport type {IntlShape} from 'react-intl';\nimport {useIntl} from 'react-intl';\nimport {useSelector} from 'react-redux';\n\nimport type {Team} from '@mattermost/types/teams';\n\nimport {getCurrentTeam} from 'mattermost-redux/selectors/entities/teams';\n\nimport type {CustomMessageInputType} from 'components/widgets/inputs/input/input';\nimport Input from 'components/widgets/inputs/input/input';\nimport URLInput from 'components/widgets/inputs/url_input/url_input';\n\nimport Constants from 'utils/constants';\nimport {cleanUpUrlable, getSiteURL, validateChannelUrl} from 'utils/url';\nimport {generateSlug} from 'utils/utils';\n\nexport type Props = {\n value: string;\n name: string;\n placeholder: string;\n onDisplayNameChange: (name: string) => void;\n onURLChange: (url: string) => void;\n autoFocus?: boolean;\n onErrorStateChange?: (isError: boolean) => void;\n team?: Team;\n urlError?: string;\n}\n\nimport './channel_name_form_field.scss';\n\nfunction validateDisplayName(intl: IntlShape, displayNameParam: string) {\n const errors: string[] = [];\n\n const displayName = displayNameParam.trim();\n\n if (displayName.length < Constants.MIN_CHANNELNAME_LENGTH) {\n errors.push(intl.formatMessage({id: 'channel_modal.name.longer', defaultMessage: 'Channel names must have at least 2 characters.'}));\n }\n\n if (displayName.length > Constants.MAX_CHANNELNAME_LENGTH) {\n errors.push(intl.formatMessage({id: 'channel_modal.name.shorter', defaultMessage: 'Channel names must have maximum 64 characters.'}));\n }\n\n return errors;\n}\n\n// Component for input fields for editing channel display name\n// along with stuff to edit its URL.\nconst ChannelNameFormField = (props: Props): JSX.Element => {\n const intl = useIntl();\n const {formatMessage} = intl;\n\n const displayNameModified = useRef<boolean>(false);\n const [displayNameError, setDisplayNameError] = useState<string>('');\n const displayName = useRef<string>('');\n const urlModified = useRef<boolean>(false);\n const [url, setURL] = useState<string>('');\n const [urlError, setURLError] = useState<string>('');\n const [inputCustomMessage, setInputCustomMessage] = useState<CustomMessageInputType | null>(null);\n\n const currentTeamName = useSelector(getCurrentTeam)?.name;\n const teamName = props.team ? props.team.name : currentTeamName;\n\n const handleOnDisplayNameChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n e.preventDefault();\n const {target: {value: updatedDisplayName}} = e;\n\n const displayNameErrors = validateDisplayName(intl, updatedDisplayName);\n\n // set error if any, else clear it\n setDisplayNameError(displayNameErrors.length ? displayNameErrors[displayNameErrors.length - 1] : '');\n displayName.current = updatedDisplayName;\n props.onDisplayNameChange(updatedDisplayName);\n\n if (!urlModified.current) {\n // if URL isn't explicitly modified, it's derived from the display name\n const cleanURL = cleanUpUrlable(updatedDisplayName);\n setURL(cleanURL);\n setURLError('');\n props.onURLChange(cleanURL);\n }\n }, [props.onDisplayNameChange, props.onURLChange]);\n\n const handleOnDisplayNameBlur = useCallback(() => {\n if (displayName.current && !url) {\n const url = generateSlug();\n setURL(url);\n props.onURLChange(url);\n }\n if (!displayNameModified.current) {\n displayNameModified.current = true;\n setInputCustomMessage(null);\n }\n }, [props.onURLChange, displayName.current, url, displayNameModified]);\n\n const handleOnURLChange = useCallback((e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n e.preventDefault();\n const {target: {value: url}} = e;\n\n const cleanURL = url.toLowerCase().replace(/\\s/g, '-');\n const urlErrors = validateChannelUrl(cleanURL, intl) as string[];\n\n setURLError(urlErrors.length ? urlErrors[urlErrors.length - 1] : '');\n setURL(cleanURL);\n urlModified.current = true;\n props.onURLChange(cleanURL);\n }, [props.onURLChange]);\n\n useEffect(() => {\n if (props.onErrorStateChange) {\n props.onErrorStateChange(Boolean(displayNameError) || Boolean(urlError));\n }\n }, [displayNameError, urlError]);\n\n return (\n <>\n <Input\n type='text'\n autoComplete='off'\n autoFocus={props.autoFocus !== false}\n required={true}\n name={props.name}\n containerClassName={`${props.name}-container`}\n inputClassName={`${props.name}-input channel-name-input-field`}\n label={formatMessage({id: 'channel_modal.name.label', defaultMessage: 'Channel name'})}\n placeholder={props.placeholder}\n limit={Constants.MAX_CHANNELNAME_LENGTH}\n value={props.value}\n customMessage={inputCustomMessage}\n onChange={handleOnDisplayNameChange}\n onBlur={handleOnDisplayNameBlur}\n />\n <URLInput\n className='new-channel-modal__url'\n base={getSiteURL()}\n path={`${teamName}/channels`}\n pathInfo={url}\n limit={Constants.MAX_CHANNELNAME_LENGTH}\n shortenLength={Constants.DEFAULT_CHANNELURL_SHORTEN_LENGTH}\n error={urlError || props.urlError}\n onChange={handleOnURLChange}\n />\n </>\n );\n};\n\nexport default ChannelNameFormField;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport type {ReactNode} from 'react';\nimport React from 'react';\nimport ReactSelect from 'react-select';\nimport type {ValueType} from 'react-select';\n\nimport type {BaseSettingItemProps} from './base_setting_item';\nimport BaseSettingItem from './base_setting_item';\nimport type {FieldsetCheckbox} from './checkbox_setting_item';\nimport type {FieldsetReactSelect, Option} from './react_select_item';\n\ntype Props = BaseSettingItemProps & {\n containerClassName?: string;\n descriptionAboveContent?: boolean;\n checkboxFieldTitle: ReactNode;\n checkboxFieldData: FieldsetCheckbox;\n checkboxFieldValue: boolean;\n handleCheckboxChange: (e: boolean) => void;\n selectFieldData: FieldsetReactSelect;\n selectFieldValue?: Option;\n handleSelectChange: (selected: ValueType<Option>) => void;\n isSelectDisabled?: boolean;\n selectPlaceholder?: string;\n}\n\nexport default function CheckboxWithSelectSettingItem({\n title,\n description,\n containerClassName,\n descriptionAboveContent = false,\n checkboxFieldTitle,\n checkboxFieldData,\n checkboxFieldValue,\n handleCheckboxChange,\n selectFieldData,\n selectFieldValue,\n handleSelectChange,\n isSelectDisabled,\n selectPlaceholder,\n}: Props) {\n const content = (\n <>\n <fieldset\n key={checkboxFieldData.name}\n className='mm-modal-generic-section-item__fieldset-checkbox-ctr'\n >\n <label className='mm-modal-generic-section-item__fieldset-checkbox'>\n <input\n className='mm-modal-generic-section-item__input-checkbox'\n data-testid={checkboxFieldData.dataTestId}\n type='checkbox'\n name={checkboxFieldData.name}\n checked={checkboxFieldValue}\n onChange={(e) => handleCheckboxChange(e.target.checked)}\n />\n {checkboxFieldTitle}\n </label>\n </fieldset>\n <fieldset className='mm-modal-generic-section-item__fieldset-react-select'>\n <ReactSelect\n id={selectFieldData.id}\n inputId={selectFieldData.inputId}\n aria-labelledby={selectFieldData.ariaLabelledby}\n className='react-select singleSelect react-select-top'\n classNamePrefix='react-select'\n options={selectFieldData.options}\n clearable={selectFieldData.clearable}\n isClearable={selectFieldData.clearable}\n isDisabled={isSelectDisabled}\n isSearchable={false}\n placeholder={selectPlaceholder}\n onChange={(value) => handleSelectChange(value)}\n value={selectFieldValue}\n components={{IndicatorSeparator: NoIndicatorSeparatorComponent}}\n />\n </fieldset>\n </>\n );\n\n return (\n <BaseSettingItem\n title={title}\n content={content}\n isContentInline={true}\n description={description}\n className={containerClassName}\n descriptionAboveContent={descriptionAboveContent}\n />\n );\n}\n\nfunction NoIndicatorSeparatorComponent() {\n return null;\n}\n\nexport type SelectOption = {\n value: string;\n label: ReactNode;\n};\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React from 'react';\n\nimport './modal_header.scss';\n\ntype Props = {\n id: string;\n title: string;\n subtitle: string;\n handleClose?: (e: React.MouseEvent) => void;\n}\n\nfunction ModalHeader({id, title, subtitle, handleClose}: Props) {\n return (\n <header className='mm-modal-header'>\n <h1\n id={`mm-modal-header-${id}`}\n className='mm-modal-header__title'\n tabIndex={0}\n >\n {title}\n </h1>\n <div className='mm-modal-header__vertical-divider'/>\n <p className='mm-modal-header__subtitle'>{subtitle}</p>\n <div\n className='mm-modal-header__ctr'\n onClick={handleClose}\n >\n <button className='btn btn-icon'>\n <i className='icon icon-close'/>\n </button>\n </div>\n </header>\n );\n}\nexport default ModalHeader;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport type {ReactNode} from 'react';\nimport React from 'react';\n\nimport type {BaseSettingItemProps} from './base_setting_item';\nimport BaseSettingItem from './base_setting_item';\n\nexport type FieldsetRadio = {\n options: Array<{\n dataTestId?: string;\n title: ReactNode;\n name: string;\n key: string;\n value: string;\n }>;\n}\n\ntype Props = BaseSettingItemProps & {\n className?: string;\n inputFieldData: FieldsetRadio;\n inputFieldValue: string;\n handleChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nfunction RadioSettingItem({\n title,\n description,\n className,\n inputFieldData,\n inputFieldValue,\n handleChange,\n dataTestId,\n}: Props): JSX.Element {\n const fields = inputFieldData.options.map((option) => {\n return (\n <label\n key={option.key}\n className='mm-modal-generic-section-item__label-radio'\n >\n <input\n id={option.key}\n data-testid={option.dataTestId}\n type='radio'\n name={option.name}\n checked={option.value === inputFieldValue}\n value={option.value}\n onChange={handleChange}\n />\n {option.title}\n </label>\n );\n });\n\n const content = (\n <fieldset className='mm-modal-generic-section-item__fieldset-radio'>\n {[...fields]}\n </fieldset>\n );\n return (\n <BaseSettingItem\n dataTestId={dataTestId}\n className={className}\n content={content}\n title={title}\n description={description}\n />\n );\n}\n\nexport default RadioSettingItem;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React, {useMemo} from 'react';\nimport {FormattedMessage} from 'react-intl';\n\nimport type {ChannelMembership, ChannelNotifyProps} from '@mattermost/types/channels';\nimport type {UserNotifyProps, UserProfile} from '@mattermost/types/users';\n\nimport {DesktopSound, NotificationLevels} from 'utils/constants';\nimport {notificationSoundKeys, convertDesktopSoundNotifyPropFromUserToDesktop} from 'utils/notification_sounds';\n\nexport enum SectionName {\n Desktop = 'desktop',\n Mobile = 'mobile',\n}\n\nconst VALID_SECTION_NAMES = Object.values(SectionName);\n\nexport interface Props {\n sectionName: SectionName;\n userNotifyProps: UserProfile['notify_props'];\n\n /** The user's selected channel notify props which is not yet saved */\n userSelectedChannelNotifyProps: ChannelMembership['notify_props'];\n onClick: (channelNotifyPropsDefaultedToUserNotifyProps: ChannelMembership['notify_props'], sectionName: SectionName) => void;\n}\n\nexport default function ResetToDefaultButton(props: Props) {\n const areDesktopNotificationsSameAsDefault = useMemo(() => {\n const isNotifyMeAboutSame = props.userNotifyProps.desktop === props.userSelectedChannelNotifyProps.desktop;\n const isThreadReplyNotificationsSame = props.userNotifyProps.desktop_threads === props.userSelectedChannelNotifyProps.desktop_threads;\n const isSoundSame = convertDesktopSoundNotifyPropFromUserToDesktop(props.userNotifyProps.desktop_sound) === props.userSelectedChannelNotifyProps.desktop_sound;\n\n let isNotificationSoundSame = false;\n if (props.userNotifyProps.desktop_notification_sound) {\n isNotificationSoundSame = props.userNotifyProps.desktop_notification_sound === props.userSelectedChannelNotifyProps.desktop_notification_sound;\n } else {\n // It could happen that the notification sound is not set in the user's notify props. That case we should assume its the Bing sound.\n isNotificationSoundSame = props.userSelectedChannelNotifyProps.desktop_notification_sound === notificationSoundKeys[0] as ChannelNotifyProps['desktop_notification_sound'];\n }\n\n return isNotifyMeAboutSame && isThreadReplyNotificationsSame && isSoundSame && isNotificationSoundSame;\n }, [\n props.userNotifyProps.desktop,\n props.userSelectedChannelNotifyProps.desktop,\n props.userNotifyProps.desktop_threads,\n props.userSelectedChannelNotifyProps.desktop_threads,\n props.userNotifyProps.desktop_sound,\n props.userSelectedChannelNotifyProps.desktop_sound,\n props.userNotifyProps.desktop_notification_sound,\n props.userSelectedChannelNotifyProps.desktop_notification_sound,\n ]);\n\n const areMobileNotificationsSameAsDefault = useMemo(() => {\n const isNotifyMeAboutSame = props.userNotifyProps.push === props.userSelectedChannelNotifyProps.push;\n const isThreadReplyNotificationsSame = props.userNotifyProps.push_threads === props.userSelectedChannelNotifyProps.push_threads;\n\n return isNotifyMeAboutSame && isThreadReplyNotificationsSame;\n }, [\n props.userNotifyProps.push,\n props.userSelectedChannelNotifyProps.push,\n props.userNotifyProps.push_threads,\n props.userSelectedChannelNotifyProps.push_threads,\n ]);\n\n if (!VALID_SECTION_NAMES.includes(props.sectionName)) {\n return null;\n }\n\n if (props.sectionName === SectionName.Desktop && areDesktopNotificationsSameAsDefault) {\n return null;\n }\n\n if (props.sectionName === SectionName.Mobile && areMobileNotificationsSameAsDefault) {\n return null;\n }\n\n function handleOnClick() {\n const channelNotifyPropsDefaultedToUserNotifyProps = resetChannelsNotificationToUsersDefault(props.userNotifyProps, props.sectionName);\n props.onClick(channelNotifyPropsDefaultedToUserNotifyProps, props.sectionName);\n }\n\n return (\n <button\n className='channel-notifications-settings-modal__reset-btn'\n onClick={handleOnClick}\n data-testid={`resetToDefaultButton-${props.sectionName}`}\n >\n <i className='icon icon-refresh'/>\n <FormattedMessage\n id='channel_notifications.resetToDefault'\n defaultMessage='Reset to default'\n />\n </button>\n );\n}\n\nexport function resetChannelsNotificationToUsersDefault(userNotifyProps: UserNotifyProps, sectionName: SectionName): ChannelMembership['notify_props'] {\n if (sectionName === SectionName.Desktop) {\n return {\n desktop: userNotifyProps.desktop,\n desktop_threads: userNotifyProps?.desktop_threads ?? NotificationLevels.ALL,\n desktop_sound: userNotifyProps && userNotifyProps.desktop_sound ? convertDesktopSoundNotifyPropFromUserToDesktop(userNotifyProps.desktop_sound) : DesktopSound.ON,\n desktop_notification_sound: userNotifyProps?.desktop_notification_sound ?? notificationSoundKeys[0] as ChannelNotifyProps['desktop_notification_sound'],\n };\n }\n\n if (sectionName === SectionName.Mobile) {\n return {\n push: userNotifyProps.push,\n push_threads: userNotifyProps?.push_threads ?? NotificationLevels.ALL,\n };\n }\n\n return {};\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React from 'react';\nimport {FormattedMessage} from 'react-intl';\n\nimport type {FieldsetCheckbox} from 'components/widgets/modals/components/checkbox_setting_item';\nimport type {FieldsetRadio} from 'components/widgets/modals/components/radio_setting_item';\nimport type {FieldsetReactSelect} from 'components/widgets/modals/components/react_select_item';\n\nimport {NotificationLevels} from 'utils/constants';\nimport {optionsOfMessageNotificationSoundsSelect} from 'utils/notification_sounds';\n\nconst MuteChannelInputFieldData: FieldsetCheckbox = {\n name: 'mute channel',\n dataTestId: 'muteChannel',\n};\n\nconst DesktopReplyThreadsInputFieldData: FieldsetCheckbox = {\n name: 'desktop reply threads',\n dataTestId: 'desktopReplyThreads',\n};\n\nconst MobileReplyThreadsInputFieldData: FieldsetCheckbox = {\n name: 'mobile reply threads',\n dataTestId: 'mobileReplyThreads',\n};\n\nexport const sameMobileSettingsDesktopInputFieldData: FieldsetCheckbox = {\n name: 'same mobile settings as Desktop',\n dataTestId: 'sameMobileSettingsDesktop',\n};\n\nexport const IgnoreMentionsInputFieldData: FieldsetCheckbox = {\n name: 'ignore mentions',\n dataTestId: 'ignoreMentions',\n};\n\nexport const AutoFollowThreadsInputFieldData: FieldsetCheckbox = {\n name: 'auto follow threads',\n dataTestId: 'autoFollowThreads',\n};\n\nexport const desktopNotificationInputFieldData = (defaultOption: string): FieldsetRadio => {\n return {\n options: [\n {\n dataTestId: `desktopNotification-${NotificationLevels.ALL}`,\n title: (\n <FormattedMessage\n id='channelNotifications.desktopNotification.allMessages'\n defaultMessage='All new messages {optionalDefault}'\n values={{\n optionalDefault: defaultOption === NotificationLevels.ALL ? (\n <FormattedMessage\n id='channel_notifications.default'\n defaultMessage='(default)'\n />) : undefined,\n }}\n />\n ),\n name: `desktopNotification-${NotificationLevels.ALL}`,\n key: `desktopNotification-${NotificationLevels.ALL}`,\n value: NotificationLevels.ALL,\n },\n {\n dataTestId: `desktopNotification-${NotificationLevels.MENTION}`,\n title: (\n <FormattedMessage\n id='channelNotifications.desktopNotification.mention'\n defaultMessage='Mentions, direct messages, and keywords only {optionalDefault}'\n values={{\n optionalDefault: defaultOption === NotificationLevels.MENTION ? (\n <FormattedMessage\n id='channel_notifications.default'\n defaultMessage='(default)'\n />) : undefined,\n }}\n />\n ),\n name: `desktopNotification-${NotificationLevels.MENTION}`,\n key: `desktopNotification-${NotificationLevels.MENTION}`,\n value: NotificationLevels.MENTION,\n },\n {\n dataTestId: `desktopNotification-${NotificationLevels.NONE}`,\n title: (\n <FormattedMessage\n id='channelNotifications.desktopNotification.nothing'\n defaultMessage='Nothing {optionalDefault}'\n values={{\n optionalDefault: defaultOption === NotificationLevels.NONE ? (\n <FormattedMessage\n id='channel_notifications.default'\n defaultMessage='(default)'\n />) : undefined,\n }}\n />\n ),\n name: `desktopNotification-${NotificationLevels.NONE}`,\n key: `desktopNotification-${NotificationLevels.NONE}`,\n value: NotificationLevels.NONE,\n },\n ],\n };\n};\n\nexport const desktopNotificationSoundsCheckboxFieldData: FieldsetCheckbox = {\n name: 'desktopNotificationSoundsCheckbox',\n dataTestId: 'desktopNotificationSoundsCheckbox',\n};\n\nexport const desktopNotificationSoundsSelectFieldData: FieldsetReactSelect = {\n id: 'desktopNotificationSoundsSelect',\n inputId: 'desktopNotificationSoundsSelectInputId',\n options: optionsOfMessageNotificationSoundsSelect,\n};\n\nexport const mobileNotificationInputFieldData = (defaultOption: string): FieldsetRadio => {\n return {\n options: [\n {\n dataTestId: `MobileNotification-${NotificationLevels.ALL}`,\n title: (\n <FormattedMessage\n id='channelNotifications.mobileNotification.newMessages'\n defaultMessage='All new messages {optionalDefault}'\n values={{\n optionalDefault: defaultOption === NotificationLevels.ALL ? (\n <FormattedMessage\n id='channel_notifications.default'\n defaultMessage='(default)'\n />) : undefined,\n }}\n />\n ),\n name: `MobileNotification-${NotificationLevels.ALL}`,\n key: `MobileNotification-${NotificationLevels.ALL}`,\n value: NotificationLevels.ALL,\n },\n {\n dataTestId: `MobileNotification-${NotificationLevels.MENTION}`,\n title: (\n <FormattedMessage\n id='channelNotifications.mobileNotification.mention'\n defaultMessage='Mentions, direct messages, and keywords only {optionalDefault}'\n values={{\n optionalDefault: defaultOption === NotificationLevels.MENTION ? (\n <FormattedMessage\n id='channel_notifications.default'\n defaultMessage='(default)'\n />) : undefined,\n }}\n />\n ),\n name: `MobileNotification-${NotificationLevels.MENTION}`,\n key: `MobileNotification-${NotificationLevels.MENTION}`,\n value: NotificationLevels.MENTION,\n },\n {\n dataTestId: `MobileNotification-${NotificationLevels.NONE}`,\n title: (\n <FormattedMessage\n id='channelNotifications.mobileNotification.nothing'\n defaultMessage='Nothing {optionalDefault}'\n values={{\n optionalDefault: defaultOption === NotificationLevels.NONE ? (\n <FormattedMessage\n id='channel_notifications.default'\n defaultMessage='(default)'\n />) : undefined,\n }}\n />\n ),\n name: `MobileNotification-${NotificationLevels.NONE}`,\n key: `MobileNotification-${NotificationLevels.NONE}`,\n value: NotificationLevels.NONE,\n },\n ],\n };\n};\n\nexport default {\n desktopNotificationInputFieldData,\n desktopNotificationSoundsCheckboxFieldData,\n desktopNotificationSoundsSelectFieldData,\n IgnoreMentionsInputFieldData,\n mobileNotificationInputFieldData,\n MuteChannelInputFieldData,\n DesktopReplyThreadsInputFieldData,\n MobileReplyThreadsInputFieldData,\n AutoFollowThreadsInputFieldData,\n sameMobileSettingsDesktopInputFieldData,\n};\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React, {useCallback, useState} from 'react';\nimport {Modal} from 'react-bootstrap';\nimport {FormattedMessage, useIntl} from 'react-intl';\nimport type {ValueType} from 'react-select';\n\nimport {BellOffOutlineIcon} from '@mattermost/compass-icons/components';\nimport type {Channel, ChannelMembership, ChannelNotifyProps} from '@mattermost/types/channels';\nimport type {UserNotifyProps, UserProfile} from '@mattermost/types/users';\n\nimport AlertBanner from 'components/alert_banner';\nimport CheckboxSettingItem from 'components/widgets/modals/components/checkbox_setting_item';\nimport CheckboxWithSelectSettingItem from 'components/widgets/modals/components/checkbox_with_select_item';\nimport ModalHeader from 'components/widgets/modals/components/modal_header';\nimport ModalSection from 'components/widgets/modals/components/modal_section';\nimport RadioSettingItem from 'components/widgets/modals/components/radio_setting_item';\nimport type {Option} from 'components/widgets/modals/components/react_select_item';\n\nimport {NotificationLevels, DesktopSound, IgnoreChannelMentions} from 'utils/constants';\nimport {convertDesktopSoundNotifyPropFromUserToDesktop, DesktopNotificationSounds, getValueOfNotificationSoundsSelect, stopTryNotificationRing, tryNotificationSound} from 'utils/notification_sounds';\n\nimport ResetToDefaultButton, {SectionName} from './reset_to_default_button';\nimport utils from './utils';\n\nimport type {PropsFromRedux} from './index';\n\nimport './channel_notifications_modal.scss';\n\nexport type Props = PropsFromRedux & {\n\n /**\n * Function that is called when the modal has been hidden and should be removed\n */\n onExited: () => void;\n\n /**\n * Object with info about current channel\n */\n channel: Channel;\n\n /**\n * Object with info about current user\n */\n currentUser: UserProfile;\n};\n\nexport default function ChannelNotificationsModal(props: Props) {\n const {formatMessage} = useIntl();\n\n const [show, setShow] = useState(true);\n const [serverError, setServerError] = useState('');\n\n const [settings, setSettings] = useState(getStateFromNotifyProps(props.currentUser.notify_props, props.channelMember?.notify_props));\n\n const [desktopAndMobileSettingsDifferent, setDesktopAndMobileSettingDifferent] = useState<boolean>(areDesktopAndMobileSettingsDifferent(\n props.collapsedReplyThreads,\n getInitialValuesOfChannelNotifyProps(NotificationLevels.ALL, props?.channelMember?.notify_props?.desktop, props.currentUser.notify_props.desktop),\n getInitialValuesOfChannelNotifyProps(NotificationLevels.ALL, props?.channelMember?.notify_props?.desktop_threads, props.currentUser.notify_props.desktop_threads),\n getInitialValuesOfChannelNotifyProps(NotificationLevels.ALL, props?.channelMember?.notify_props?.push, props.currentUser.notify_props.push),\n getInitialValuesOfChannelNotifyProps(NotificationLevels.ALL, props?.channelMember?.notify_props?.push_threads, props.currentUser.notify_props.push_threads),\n ));\n\n function handleHide() {\n setShow(false);\n }\n\n const handleChange = useCallback((values: Record<string, string>) => {\n setSettings((prevSettings) => ({...prevSettings, ...values}));\n }, []);\n\n function handleUseSameMobileSettingsAsDesktopCheckboxChange(value: boolean) {\n const newValueOfSettings = {...settings};\n const newValueOfDesktopAndMobileSettingsDifferent = !value;\n\n if (newValueOfDesktopAndMobileSettingsDifferent === false) {\n newValueOfSettings.push = settings.desktop;\n newValueOfSettings.push_threads = settings.desktop_threads;\n } else {\n newValueOfSettings.push = getInitialValuesOfChannelNotifyProps(NotificationLevels.ALL, props.channelMember?.notify_props?.push, props.currentUser?.notify_props?.push);\n newValueOfSettings.push_threads = getInitialValuesOfChannelNotifyProps(NotificationLevels.ALL, props.channelMember?.notify_props?.push_threads, props.currentUser?.notify_props?.push_threads);\n }\n setSettings(newValueOfSettings);\n setDesktopAndMobileSettingDifferent(newValueOfDesktopAndMobileSettingsDifferent);\n }\n\n function handleResetToDefaultClicked(channelNotifyPropsDefaultedToUserNotifyProps: ChannelMembership['notify_props'], sectionName: SectionName) {\n if (sectionName === SectionName.Mobile) {\n const desktopAndMobileSettingsDifferent = areDesktopAndMobileSettingsDifferent(\n props.collapsedReplyThreads,\n settings.desktop,\n settings.desktop_threads,\n channelNotifyPropsDefaultedToUserNotifyProps.push,\n channelNotifyPropsDefaultedToUserNotifyProps.push_threads,\n );\n\n setDesktopAndMobileSettingDifferent(desktopAndMobileSettingsDifferent);\n }\n\n setSettings({...settings, ...channelNotifyPropsDefaultedToUserNotifyProps});\n }\n\n function handleSave() {\n const channelNotifyProps = createChannelNotifyPropsFromSelectedSettings(props.currentUser.notify_props, settings, desktopAndMobileSettingsDifferent);\n\n props.actions.updateChannelNotifyProps(props.currentUser.id, props.channel.id, channelNotifyProps).then((value) => {\n const {error} = value;\n if (error) {\n setServerError(error.message);\n } else {\n handleHide();\n }\n });\n }\n\n const muteOrIgnoreSectionContent = (\n <>\n <CheckboxSettingItem\n inputFieldTitle={\n <FormattedMessage\n id='channel_notifications.muteChannelTitle'\n defaultMessage='Mute channel'\n />\n }\n description={formatMessage({\n id: 'channel_notifications.muteChannelDesc',\n defaultMessage: 'Turns off notifications for this channel. You\\'ll still see badges if you\\'re mentioned.',\n })}\n inputFieldValue={settings.mark_unread === 'mention'}\n inputFieldData={utils.MuteChannelInputFieldData}\n handleChange={(e) => handleChange({mark_unread: e ? 'mention' : 'all'})}\n />\n <CheckboxSettingItem\n inputFieldTitle={\n <FormattedMessage\n id='channel_notifications.ignoreMentionsTitle'\n defaultMessage='Ignore mentions for @channel, @here and @all'\n />\n }\n description={formatMessage({\n id: 'channel_notifications.ignoreMentionsDesc',\n defaultMessage: 'When enabled, @channel, @here and @all will not trigger mentions or mention notifications in this channel',\n })}\n inputFieldValue={settings.ignore_channel_mentions === 'on'}\n inputFieldData={utils.IgnoreMentionsInputFieldData}\n handleChange={(e) => handleChange({ignore_channel_mentions: e ? 'on' : 'off'})}\n />\n </>\n );\n\n const handleChangeForMessageNotificationSoundSelect = (selectedOption: ValueType<Option>) => {\n stopTryNotificationRing();\n\n if (selectedOption && 'value' in selectedOption) {\n handleChange({desktop_notification_sound: ((selectedOption as Option).value)});\n tryNotificationSound(selectedOption.value);\n }\n };\n\n const desktopNotificationsSectionContent = (\n <>\n <RadioSettingItem\n title={formatMessage({\n id: 'channel_notifications.NotifyMeTitle',\n defaultMessage: 'Notify me about…',\n })}\n inputFieldValue={settings.desktop || ''}\n inputFieldData={utils.desktopNotificationInputFieldData(props.currentUser.notify_props.desktop)}\n handleChange={(e) => handleChange({desktop: e.target.value})}\n />\n {props.collapsedReplyThreads && settings.desktop === 'mention' &&\n <CheckboxSettingItem\n title={formatMessage({\n id: 'channel_notifications.ThreadsReplyTitle',\n defaultMessage: 'Thread reply notifications',\n })}\n inputFieldValue={settings.desktop_threads === 'all'}\n inputFieldData={utils.DesktopReplyThreadsInputFieldData}\n inputFieldTitle={\n <FormattedMessage\n id='channel_notifications.checkbox.threadsReplyTitle'\n defaultMessage=\"Notify me about replies to threads I\\'m following\"\n />\n }\n handleChange={(e) => handleChange({desktop_threads: e ? 'all' : 'mention'})}\n />\n }\n {settings.desktop !== 'none' && (\n <CheckboxWithSelectSettingItem\n title={formatMessage({\n id: 'channel_notifications.desktopNotifications.title',\n defaultMessage: 'Sounds',\n })}\n checkboxFieldTitle={\n <FormattedMessage\n id='channel_notifications.desktopNotifications.soundEnable'\n defaultMessage='Message notification sounds'\n />\n }\n checkboxFieldValue={settings.desktop_sound === DesktopSound.ON}\n checkboxFieldData={utils.desktopNotificationSoundsCheckboxFieldData}\n handleCheckboxChange={(isChecked) => handleChange({desktop_sound: isChecked ? DesktopSound.ON : DesktopSound.OFF})}\n selectFieldData={utils.desktopNotificationSoundsSelectFieldData}\n selectFieldValue={getValueOfNotificationSoundsSelect(settings.desktop_notification_sound)}\n isSelectDisabled={settings.desktop_sound !== 'on'}\n selectPlaceholder={formatMessage({\n id: 'channel_notifications.desktopNotifications.soundSelectPlaceholder',\n defaultMessage: 'Select a sound',\n })}\n handleSelectChange={handleChangeForMessageNotificationSoundSelect}\n />\n )}\n </>\n );\n\n const mobileNotificationsSectionContent = (\n <>\n <CheckboxSettingItem\n inputFieldTitle={\n <FormattedMessage\n id='channel_notifications.checkbox.sameMobileSettingsDesktop'\n defaultMessage='Use the same notification settings as desktop'\n />\n }\n inputFieldValue={!desktopAndMobileSettingsDifferent}\n inputFieldData={utils.sameMobileSettingsDesktopInputFieldData}\n handleChange={handleUseSameMobileSettingsAsDesktopCheckboxChange}\n />\n {desktopAndMobileSettingsDifferent && (\n <>\n <RadioSettingItem\n dataTestId='mobile-notify-me-radio-section'\n title={formatMessage({\n id: 'channel_notifications.NotifyMeTitle',\n defaultMessage: 'Notify me about…',\n })}\n inputFieldValue={settings.push || ''}\n inputFieldData={utils.mobileNotificationInputFieldData(props.currentUser.notify_props.push)}\n handleChange={(e) => handleChange({push: e.target.value})}\n />\n {props.collapsedReplyThreads && settings.push === 'mention' &&\n <CheckboxSettingItem\n dataTestId='mobile-reply-threads-checkbox-section'\n title={formatMessage({\n id: 'channel_notifications.ThreadsReplyTitle',\n defaultMessage: 'Thread reply notifications',\n })}\n inputFieldTitle={\n <FormattedMessage\n id='channel_notifications.checkbox.threadsReplyTitle'\n defaultMessage=\"Notify me about replies to threads I\\'m following\"\n />\n }\n inputFieldValue={settings.push_threads === 'all'}\n inputFieldData={utils.MobileReplyThreadsInputFieldData}\n handleChange={(e) => handleChange({push_threads: e ? 'all' : 'mention'})}\n />}\n </>\n )}\n </>\n );\n\n const autoFollowThreadsSectionContent = (\n <CheckboxSettingItem\n inputFieldTitle={\n <FormattedMessage\n id='channel_notifications.checkbox.autoFollowThreadsTitle'\n defaultMessage='Automatically follow threads in this channel'\n />\n }\n inputFieldValue={settings.channel_auto_follow_threads === 'on'}\n inputFieldData={utils.AutoFollowThreadsInputFieldData}\n handleChange={(e) => handleChange({channel_auto_follow_threads: e ? 'on' : 'off'})}\n />\n );\n\n const desktopAndMobileNotificationSectionContent = settings.mark_unread === 'all' ? (\n <>\n <div className='channel-notifications-settings-modal__divider'/>\n <ModalSection\n title={formatMessage({\n id: 'channel_notifications.desktopNotificationsTitle',\n defaultMessage: 'Desktop Notifications',\n })}\n titleSuffix={\n <ResetToDefaultButton\n sectionName={SectionName.Desktop}\n userNotifyProps={props.currentUser.notify_props}\n userSelectedChannelNotifyProps={settings}\n onClick={handleResetToDefaultClicked}\n />\n }\n description={formatMessage({\n id: 'channel_notifications.desktopNotificationsDesc',\n defaultMessage: 'Available on Chrome, Edge, Firefox, and the Mattermost Desktop App.',\n })}\n content={desktopNotificationsSectionContent}\n />\n <div className='channel-notifications-settings-modal__divider'/>\n <ModalSection\n title={formatMessage({\n id: 'channel_notifications.mobileNotificationsTitle',\n defaultMessage: 'Mobile Notifications',\n })}\n titleSuffix={\n <ResetToDefaultButton\n sectionName={SectionName.Mobile}\n userNotifyProps={props.currentUser.notify_props}\n userSelectedChannelNotifyProps={settings}\n onClick={handleResetToDefaultClicked}\n />\n }\n description={formatMessage({\n id: 'channel_notifications.mobileNotificationsDesc',\n defaultMessage: 'Notification alerts are pushed to your mobile device when there is activity in Mattermost.',\n })}\n content={mobileNotificationsSectionContent}\n />\n </>\n ) : (\n <AlertBanner\n id='channelNotificationsMutedBanner'\n mode='info'\n variant='app'\n customIcon={\n <BellOffOutlineIcon\n size={24}\n color={'currentColor'}\n />\n }\n title={\n <FormattedMessage\n id='channel_notifications.alertBanner.title'\n defaultMessage='This channel is muted'\n />\n }\n message={\n <FormattedMessage\n id='channel_notifications.alertBanner.description'\n defaultMessage='All other notification preferences for this channel are disabled'\n />\n }\n />\n );\n\n return (\n <Modal\n dialogClassName='a11y__modal channel-notifications-settings-modal'\n show={show}\n onHide={handleHide}\n onExited={props.onExited}\n role='none'\n aria-labelledby='channelNotificationModalLabel'\n style={{display: 'flex', placeItems: 'center'}}\n >\n <ModalHeader\n id={'channelNotificationModalLabel'}\n title={formatMessage({\n id: 'channel_notifications.preferences',\n defaultMessage: 'Notification Preferences',\n })}\n subtitle={props.channel.display_name}\n handleClose={handleHide}\n />\n <main className='channel-notifications-settings-modal__body'>\n <ModalSection\n title={formatMessage({\n id: 'channel_notifications.muteAndIgnore',\n defaultMessage: 'Mute or ignore',\n })}\n content={muteOrIgnoreSectionContent}\n />\n {desktopAndMobileNotificationSectionContent}\n {props.collapsedReplyThreads &&\n <>\n <div className='channel-notifications-settings-modal__divider'/>\n <ModalSection\n title={formatMessage({\n id: 'channel_notifications.autoFollowThreadsTitle',\n defaultMessage: 'Follow all threads in this channel',\n })}\n description={formatMessage({\n id: 'channel_notifications.autoFollowThreadsDesc',\n defaultMessage: 'When enabled, all new replies in this channel will be automatically followed and will appear in your Threads view.',\n })}\n content={autoFollowThreadsSectionContent}\n />\n </>\n }\n </main>\n <footer className='channel-notifications-settings-modal__footer'>\n {serverError &&\n <span className='channel-notifications-settings-modal__server-error'>\n {serverError}\n </span>\n }\n <button\n className='btn btn-tertiary btn-md'\n onClick={handleHide}\n >\n <FormattedMessage\n id='generic_btn.cancel'\n defaultMessage='Cancel'\n />\n </button>\n <button\n className='btn btn-primary btn-md'\n onClick={handleSave}\n >\n <FormattedMessage\n id='generic_btn.save'\n defaultMessage='Save'\n />\n </button>\n </footer>\n </Modal>\n );\n}\n\nfunction getStateFromNotifyProps(currentUserNotifyProps: UserNotifyProps, channelMemberNotifyProps?: ChannelMembership['notify_props']): Required<Omit<ChannelMembership['notify_props'], 'email'>> {\n return {\n mark_unread: channelMemberNotifyProps?.mark_unread ?? NotificationLevels.ALL,\n ignore_channel_mentions: getInitialValuesOfIgnoreChannelMentions(channelMemberNotifyProps?.mark_unread, channelMemberNotifyProps?.ignore_channel_mentions, currentUserNotifyProps?.channel),\n desktop: getInitialValuesOfChannelNotifyProps<ChannelMembership['notify_props']['desktop']>(NotificationLevels.ALL, channelMemberNotifyProps?.desktop, currentUserNotifyProps?.desktop),\n desktop_threads: getInitialValuesOfChannelNotifyProps<ChannelMembership['notify_props']['desktop_threads']>(NotificationLevels.ALL, channelMemberNotifyProps?.desktop_threads, currentUserNotifyProps?.desktop_threads),\n desktop_sound: getInitialValuesOfChannelNotifyProps<ChannelMembership['notify_props']['desktop_sound']>(DesktopSound.ON, channelMemberNotifyProps?.desktop_sound, convertDesktopSoundNotifyPropFromUserToDesktop(currentUserNotifyProps?.desktop_sound)),\n desktop_notification_sound: getInitialValuesOfChannelNotifyProps<ChannelMembership['notify_props']['desktop_notification_sound']>(DesktopNotificationSounds.BING, channelMemberNotifyProps?.desktop_notification_sound, currentUserNotifyProps?.desktop_notification_sound),\n push: getInitialValuesOfChannelNotifyProps<ChannelMembership['notify_props']['push']>(NotificationLevels.ALL, channelMemberNotifyProps?.push, currentUserNotifyProps?.push),\n push_threads: getInitialValuesOfChannelNotifyProps<ChannelMembership['notify_props']['push_threads']>(NotificationLevels.ALL, channelMemberNotifyProps?.push_threads, currentUserNotifyProps?.push_threads),\n channel_auto_follow_threads: channelMemberNotifyProps?.channel_auto_follow_threads ?? 'off',\n };\n}\n\nexport function getInitialValuesOfChannelNotifyProps<KeyInNotifyProps>(defaultValue: NonNullable<KeyInNotifyProps>, channelMemberNotifyProp: KeyInNotifyProps | undefined = undefined, userNotifyProp: KeyInNotifyProps | undefined = undefined) {\n let value = defaultValue;\n\n // Check if channel_member's notify_prop is defined for the selected notify_prop\n if (channelMemberNotifyProp) {\n // If channel_member's notify_prop is default and user's notify_prop is defined, we should use user's notify_prop\n if (channelMemberNotifyProp === NotificationLevels.DEFAULT && userNotifyProp) {\n value = userNotifyProp;\n } else {\n // Otherwise, we should use channel_member's notify_prop as is\n value = channelMemberNotifyProp;\n }\n } else if (userNotifyProp) {\n // If channel_member's notify_prop is not defined and user's notify_prop is defined, we should use user's notify_prop as is\n value = userNotifyProp;\n }\n\n return value;\n}\n\nexport function getInitialValuesOfIgnoreChannelMentions(\n markUnread: ChannelMembership['notify_props']['mark_unread'],\n ignoreChannelMentions: ChannelMembership['notify_props']['ignore_channel_mentions'],\n userNotifyPropForChannel: UserNotifyProps['channel'],\n): NonNullable<ChannelMembership['notify_props']['ignore_channel_mentions']> {\n let ignoreChannelMentionsDefault: ChannelNotifyProps['ignore_channel_mentions'] = IgnoreChannelMentions.OFF;\n if (markUnread === NotificationLevels.MENTION || (userNotifyPropForChannel && userNotifyPropForChannel === 'false')) {\n ignoreChannelMentionsDefault = IgnoreChannelMentions.ON;\n }\n\n if (ignoreChannelMentions) {\n if (ignoreChannelMentions === IgnoreChannelMentions.DEFAULT) {\n return ignoreChannelMentionsDefault;\n }\n return ignoreChannelMentions;\n }\n\n return ignoreChannelMentionsDefault;\n}\n\nexport function createChannelNotifyPropsFromSelectedSettings(\n userNotifyProps: UserNotifyProps,\n savedChannelNotifyProps: ChannelMembership['notify_props'],\n desktopAndMobileSettingsDifferent: boolean,\n) {\n const channelNotifyProps: ChannelMembership['notify_props'] = {\n mark_unread: savedChannelNotifyProps.mark_unread,\n ignore_channel_mentions: savedChannelNotifyProps.ignore_channel_mentions,\n channel_auto_follow_threads: savedChannelNotifyProps.channel_auto_follow_threads,\n };\n\n if (savedChannelNotifyProps.desktop === userNotifyProps.desktop) {\n channelNotifyProps.desktop = NotificationLevels.DEFAULT;\n } else {\n channelNotifyProps.desktop = savedChannelNotifyProps.desktop;\n }\n\n // Check if USER's desktop_thread setting are defined\n if (userNotifyProps?.desktop_threads?.length) {\n // If USER's desktop_thread setting is same as CHANNEL's new desktop_threads setting, we should set it to default\n if (userNotifyProps.desktop_threads === savedChannelNotifyProps.desktop_threads) {\n channelNotifyProps.desktop_threads = NotificationLevels.DEFAULT;\n } else {\n // Otherwise, we should use the CHANNEL's new desktop_threads setting as is\n channelNotifyProps.desktop_threads = savedChannelNotifyProps.desktop_threads;\n }\n } else if (savedChannelNotifyProps.desktop_threads === NotificationLevels.MENTION || savedChannelNotifyProps.desktop_threads === NotificationLevels.DEFAULT) {\n // If USER's desktop_thread setting is not defined and CHANNEL's new desktop_threads setting is MENTION or DEFAULT, then save it as default\n channelNotifyProps.desktop_threads = NotificationLevels.DEFAULT;\n } else {\n // Otherwise, we should use the CHANNEL's new desktop_threads setting as is\n channelNotifyProps.desktop_threads = savedChannelNotifyProps.desktop_threads;\n }\n\n if (convertDesktopSoundNotifyPropFromUserToDesktop(userNotifyProps?.desktop_sound) === savedChannelNotifyProps.desktop_sound) {\n channelNotifyProps.desktop_sound = DesktopSound.DEFAULT;\n } else {\n channelNotifyProps.desktop_sound = savedChannelNotifyProps.desktop_sound;\n }\n\n // Check if USER's desktop_notification_sound setting is defined\n if (userNotifyProps?.desktop_notification_sound?.length) {\n // If USER's desktop_notification_sound setting is same as CHANNEL's new desktop_notification_sound setting, we should set it to default\n if (userNotifyProps.desktop_notification_sound === savedChannelNotifyProps.desktop_notification_sound) {\n channelNotifyProps.desktop_notification_sound = DesktopNotificationSounds.DEFAULT;\n } else {\n // Otherwise, we should use the CHANNEL's new desktop_notification_sound setting as is\n channelNotifyProps.desktop_notification_sound = savedChannelNotifyProps.desktop_notification_sound;\n }\n } else if (savedChannelNotifyProps.desktop_notification_sound === DesktopNotificationSounds.BING || savedChannelNotifyProps.desktop_notification_sound === DesktopNotificationSounds.DEFAULT) {\n // If USER's desktop_notification_sound setting is not defined and CHANNEL's new desktop_notification_sound setting is either BING or DEFAULT, then save it as default\n channelNotifyProps.desktop_notification_sound = DesktopNotificationSounds.DEFAULT;\n } else {\n // Otherwise, we should use the CHANNEL's new desktop_notification_sound setting as is\n channelNotifyProps.desktop_notification_sound = savedChannelNotifyProps.desktop_notification_sound;\n }\n\n if (savedChannelNotifyProps.push === userNotifyProps.push) {\n channelNotifyProps.push = NotificationLevels.DEFAULT;\n } else {\n channelNotifyProps.push = savedChannelNotifyProps.push;\n }\n\n // Check if USER's push_threads setting are defined\n if (userNotifyProps?.push_threads?.length) {\n // If USER's push_threads setting is same as CHANNEL's new push_threads setting, we should set it to default\n if (userNotifyProps.push_threads === savedChannelNotifyProps.push_threads) {\n channelNotifyProps.push_threads = NotificationLevels.DEFAULT;\n } else {\n // Otherwise, we should use the CHANNEL's new push_threads setting as is\n channelNotifyProps.push_threads = savedChannelNotifyProps.push_threads;\n }\n } else if (savedChannelNotifyProps.push_threads === NotificationLevels.MENTION || savedChannelNotifyProps.push_threads === NotificationLevels.DEFAULT) {\n // If USER's push_threads setting is not defined and CHANNEL's new push_threads setting is MENTION or DEFAULT, then save it as default\n channelNotifyProps.push_threads = NotificationLevels.DEFAULT;\n } else {\n // Otherwise, we should use the CHANNEL's new push_threads setting as is\n channelNotifyProps.push_threads = savedChannelNotifyProps.push_threads;\n }\n\n // If desktop and mobile settings are checked to be same, then same settings should be applied to push and push_threads\n // as that of desktop and desktop_threads\n if (desktopAndMobileSettingsDifferent === false) {\n // If desktop is set to default, it means it is synced to the user's notification settings.\n // Since we checked the box to use the same settings for mobile, we need to set channel's mobile to match channel's desktop.\n // Setting mobile to default would sync it to the user's notification settings, which we want to avoid.\n if (channelNotifyProps.desktop === NotificationLevels.DEFAULT) {\n channelNotifyProps.push = userNotifyProps.desktop;\n } else {\n // Otherwise, we should use the CHANNEL's desktop setting as is to match mobile settings\n channelNotifyProps.push = channelNotifyProps.desktop;\n }\n\n if (channelNotifyProps.desktop_threads === NotificationLevels.DEFAULT) {\n channelNotifyProps.push_threads = userNotifyProps.desktop_threads;\n } else {\n channelNotifyProps.push_threads = channelNotifyProps.desktop_threads;\n }\n }\n\n return channelNotifyProps;\n}\n\n/**\n * Check's if channel's notification settings for desktop and mobile are different\n */\nexport function areDesktopAndMobileSettingsDifferent(\n isCollapsedThreadsEnabled: boolean,\n desktop: UserNotifyProps['desktop'],\n desktopThreads: UserNotifyProps['desktop_threads'],\n push?: UserNotifyProps['push'],\n pushThreads?: UserNotifyProps['push_threads'],\n): boolean {\n if (push === NotificationLevels.DEFAULT || push === desktop) {\n return isCollapsedThreadsEnabled && desktopThreads !== pushThreads;\n }\n\n return true;\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {connect} from 'react-redux';\nimport type {ConnectedProps} from 'react-redux';\nimport {bindActionCreators} from 'redux';\nimport type {Dispatch} from 'redux';\n\nimport {updateChannelNotifyProps} from 'mattermost-redux/actions/channels';\nimport {getMyCurrentChannelMembership} from 'mattermost-redux/selectors/entities/channels';\nimport {getConfig} from 'mattermost-redux/selectors/entities/general';\nimport {\n isCollapsedThreadsEnabled,\n} from 'mattermost-redux/selectors/entities/preferences';\n\nimport type {GlobalState} from 'types/store/index';\n\nimport ChannelNotificationsModal from './channel_notifications_modal';\n\nconst mapStateToProps = (state: GlobalState) => ({\n collapsedReplyThreads: isCollapsedThreadsEnabled(state),\n channelMember: getMyCurrentChannelMembership(state),\n sendPushNotifications: getConfig(state).SendPushNotifications === 'true',\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n actions: bindActionCreators({\n updateChannelNotifyProps,\n }, dispatch),\n});\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport type PropsFromRedux = ConnectedProps<typeof connector>\n\nexport default connector(ChannelNotificationsModal);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React from 'react';\nimport {useIntl} from 'react-intl';\n\nexport default function CheckCircleIcon(props: React.HTMLAttributes<HTMLSpanElement>) {\n const {formatMessage} = useIntl();\n\n return (\n <span {...props}>\n <svg\n width='22'\n height='22'\n viewBox='0 0 22 22'\n xmlns='http://www.w3.org/2000/svg'\n aria-label={formatMessage({id: 'generic_icons.check.circle', defaultMessage: 'Check Circle Icon'})}\n >\n <path\n d='M11 0.992024C9.192 0.992024 7.512 1.44802 5.96 2.36002C4.44 3.24002 3.24 4.44002 2.36 5.96002C1.448 7.51202 0.992 9.19202 0.992 11C0.992 12.808 1.448 14.488 2.36 16.04C3.24 17.56 4.44 18.76 5.96 19.64C7.512 20.552 9.192 21.008 11 21.008C12.808 21.008 14.488 20.552 16.04 19.64C17.56 18.76 18.76 17.56 19.64 16.04C20.552 14.488 21.008 12.808 21.008 11C21.008 9.19202 20.552 7.51202 19.64 5.96002C18.76 4.44002 17.56 3.24002 16.04 2.36002C14.488 1.44802 12.808 0.992024 11 0.992024ZM9.248 15.68L7.832 14.288L5 11.456L6.416 10.04L9.248 12.872L15.608 6.48802L17.024 7.90402L9.248 15.68Z'\n />\n </svg>\n </span>\n );\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React from 'react';\nimport {useIntl} from 'react-intl';\n\nexport default function GlobeCircleSolidIcon(props: React.HTMLAttributes<HTMLSpanElement>) {\n const {formatMessage} = useIntl();\n\n return (\n <span {...props}>\n <svg\n width='40'\n height='40'\n viewBox='0 0 40 40'\n xmlns='http://www.w3.org/2000/svg'\n aria-label={formatMessage({id: 'generic_icons.globe.circleSolid', defaultMessage: 'Globe Circle Solid Icon'})}\n >\n <rect\n width='40'\n height='40'\n rx='20'\n fillOpacity='0.08'\n />\n <path\n d='M20 8.31042C17.8304 8.31042 15.8144 8.85762 13.952 9.95202C12.1472 11.0272 10.7072 12.4672 9.632 14.272C8.5376 16.1344 7.9904 18.1504 7.9904 20.32C7.9904 22.4896 8.5376 24.5056 9.632 26.368C10.7072 28.1728 12.1472 29.6128 13.952 30.688C15.8144 31.7824 17.8304 32.3296 20 32.3296C22.1696 32.3296 24.1856 31.7824 26.048 30.688C27.8528 29.6128 29.2928 28.1728 30.368 26.368C31.4624 24.5056 32.0096 22.4896 32.0096 20.32C32.0096 18.1504 31.4624 16.1344 30.368 14.272C29.2928 12.4672 27.8528 11.0272 26.048 9.95202C24.1856 8.85762 22.1696 8.31042 20 8.31042ZM29.5904 20.9248C29.3792 21.2128 28.8896 21.5296 28.1216 21.8752C27.1616 22.2976 26.0576 22.6144 24.8096 22.8256V18.7648C26.5184 18.4576 27.8336 18.0928 28.7552 17.6704C28.7936 17.632 28.8704 17.5936 28.9856 17.5552C29.12 17.5168 29.2064 17.4784 29.2448 17.44C29.4752 18.2656 29.5904 19.2256 29.5904 20.32V20.9248ZM18.2144 25.5904C18.4064 25.5904 18.6944 25.6096 19.0784 25.648C19.4816 25.6864 19.7888 25.7056 20 25.7056C20.8064 25.7056 21.4112 25.6672 21.8144 25.5904C21.5264 26.7424 21.2096 27.7024 20.864 28.4704C20.5568 29.1616 20.2688 29.6032 20 29.7952C19.712 29.584 19.4144 29.1424 19.1072 28.4704C18.7232 27.664 18.4256 26.704 18.2144 25.5904ZM20 23.3152C18.9632 23.3152 18.2048 23.2768 17.7248 23.2C17.7248 22.9312 17.7056 22.5088 17.6672 21.9328C17.6288 21.2416 17.6096 20.704 17.6096 20.32V18.9952C18.1664 19.072 18.9632 19.1104 20 19.1104C21.0368 19.1104 21.8336 19.072 22.3904 18.9952V20.32C22.3904 20.704 22.3712 21.2416 22.3328 21.9328C22.2944 22.5088 22.2752 22.9312 22.2752 23.2C21.7952 23.2768 21.0368 23.3152 20 23.3152ZM22.16 16.6048C21.68 16.6816 20.96 16.72 20 16.72C19.04 16.72 18.32 16.6816 17.84 16.6048C18.0704 15.0688 18.416 13.7248 18.8768 12.5728C19.2608 11.6128 19.6352 10.9984 20 10.7296C20.3648 10.9984 20.7392 11.6128 21.1232 12.5728C21.584 13.7248 21.9296 15.0688 22.16 16.6048ZM28.1504 15.28C27.536 15.5296 27.0272 15.7216 26.624 15.856C25.9328 16.0864 25.2416 16.2496 24.5504 16.3456C24.4352 15.424 24.2624 14.5216 24.032 13.6384C23.8016 12.7552 23.5424 11.9776 23.2544 11.3056C25.3472 12.0544 26.9792 13.3792 28.1504 15.28ZM11.8496 15.28C12.464 14.3392 13.184 13.5424 14.0096 12.8896C14.8736 12.1792 15.8336 11.6512 16.8896 11.3056C16.2752 12.6496 15.7952 14.3296 15.4496 16.3456C13.9712 16.0192 12.7712 15.664 11.8496 15.28ZM10.8704 17.44C10.928 17.4784 11.0144 17.5264 11.1296 17.584L11.36 17.6704C12.3968 18.1312 13.7216 18.496 15.3344 18.7648C15.2768 18.976 15.2384 19.216 15.2192 19.4848C15.2 19.6576 15.1904 19.936 15.1904 20.32C15.1904 21.4336 15.2384 22.2688 15.3344 22.8256C14.0864 22.6144 12.9824 22.2976 12.0224 21.8752C11.2352 21.5296 10.736 21.2128 10.5248 20.9248V20.32C10.4672 19.84 10.4672 19.3408 10.5248 18.8224C10.5824 18.304 10.6976 17.8432 10.8704 17.44ZM11.2448 24.1504C12.7424 24.7456 14.2208 25.1488 15.68 25.36C15.872 26.6464 16.2752 27.9616 16.8896 29.3056C15.6224 28.8832 14.4992 28.2208 13.52 27.3184C12.5408 26.416 11.7824 25.36 11.2448 24.1504ZM28.7552 24.1504C28.2176 25.36 27.4592 26.416 26.48 27.3184C25.5008 28.2208 24.3776 28.8832 23.1104 29.3056C23.7248 27.9616 24.128 26.6464 24.32 25.36C26.2208 25.0912 27.6992 24.688 28.7552 24.1504Z'\n />\n </svg>\n </span>\n );\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React from 'react';\nimport {useIntl} from 'react-intl';\n\nexport default function LockCircleSolidIcon(props: React.HTMLAttributes<HTMLSpanElement>) {\n const {formatMessage} = useIntl();\n\n return (\n <span {...props}>\n <svg\n width='40'\n height='40'\n viewBox='0 0 40 40'\n xmlns='http://www.w3.org/2000/svg'\n aria-label={formatMessage({id: 'generic_icons.lock.circleSolid', defaultMessage: 'Lock Circle Solid Icon'})}\n >\n <rect\n width='40'\n height='40'\n rx='20'\n fillOpacity='0.08'\n />\n <path\n d='M27.2 29.9104V19.1104H12.8V29.9104H27.2ZM27.2 16.72C27.872 16.72 28.4384 16.9504 28.8992 17.4112C29.36 17.872 29.5904 18.4384 29.5904 19.1104V29.9104C29.5904 30.5824 29.3504 31.1488 28.8704 31.6096C28.4096 32.0896 27.8528 32.3296 27.2 32.3296H12.8C12.1472 32.3296 11.5808 32.0896 11.1008 31.6096C10.64 31.1488 10.4096 30.5824 10.4096 29.9104V19.1104C10.4096 18.4384 10.64 17.872 11.1008 17.4112C11.5808 16.9504 12.1472 16.72 12.8 16.72H14.0096V14.3296C14.0096 13.216 14.2688 12.208 14.7872 11.3056C15.3248 10.384 16.0448 9.65442 16.9472 9.11682C17.8688 8.57922 18.8864 8.31042 20 8.31042C21.1136 8.31042 22.1216 8.57922 23.024 9.11682C23.9456 9.65442 24.6656 10.384 25.184 11.3056C25.7216 12.208 25.9904 13.216 25.9904 14.3296V16.72H27.2ZM20 10.7296C19.328 10.7296 18.7136 10.8928 18.1568 11.2192C17.6192 11.5264 17.1872 11.9584 16.8608 12.5152C16.5536 13.0528 16.4 13.6576 16.4 14.3296V16.72H23.6V14.3296C23.6 13.6576 23.4368 13.0528 23.1104 12.5152C22.8032 11.9584 22.3712 11.5264 21.8144 11.2192C21.2768 10.8928 20.672 10.7296 20 10.7296Z'\n />\n </svg>\n\n </span>\n );\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React from 'react';\nimport {useIntl} from 'react-intl';\n\ntype Props = React.HTMLAttributes<HTMLSpanElement>;\n\nexport default function UpgradeBadgeIcon(props: Props): JSX.Element {\n const {formatMessage} = useIntl();\n\n return (\n <span {...props}>\n <svg\n xmlns='http://www.w3.org/2000/svg'\n version='1.1'\n width='100%'\n height='100%'\n viewBox='2 2 20 20'\n role='img'\n aria-label={formatMessage({id: 'generic_icons.upgradeBadge', defaultMessage: 'Upgrade badge'})}\n >\n <circle\n cx='12'\n cy='12'\n r='10'\n fillOpacity='0.08'\n />\n <path\n d='M12,2c5.523,0,10,4.477,10,10s-4.477,10-10,10S2,17.523,2,12S6.477,2,12,2z M14.994,9.033\n c0.218,0.217,0.327,0.47,0.327,0.76s-0.109,0.543-0.327,0.76c-0.218,0.217-0.472,0.326-0.762,0.326s-0.545-0.109-0.762-0.326\n c-0.218-0.217-0.327-0.47-0.327-0.76s0.109-0.543,0.327-0.76c0.218-0.217,0.472-0.326,0.762-0.326S14.776,8.816,14.994,9.033z\n M16.555,7.477C15.902,6.826,15.115,6.5,14.195,6.5c-0.871,0-1.634,0.326-2.287,0.977c-0.508,0.507-0.823,1.11-0.944,1.809\n c-0.097,0.675,0.012,1.315,0.327,1.918L6.5,15.98l1.525,1.52l1.561-1.556l1.561,1.556l1.525-1.52l-1.561-1.556l1.706-1.701\n c0.605,0.314,1.246,0.422,1.924,0.326c0.702-0.121,1.307-0.434,1.815-0.941c0.653-0.651,0.968-1.423,0.944-2.316\n C17.523,8.9,17.208,8.128,16.555,7.477z'\n />\n </svg>\n </span>\n );\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport classNames from 'classnames';\nimport React, {useCallback} from 'react';\nimport {useIntl} from 'react-intl';\n\nimport type {ChannelType} from '@mattermost/types/channels';\n\nimport CheckCircleIcon from 'components/widgets/icons/check_circle_icon';\nimport GlobeCircleSolidIcon from 'components/widgets/icons/globe_circle_solid_icon';\nimport LockCircleSolidIcon from 'components/widgets/icons/lock_circle_solid_icon';\nimport UpgradeBadge from 'components/widgets/icons/upgrade_badge_icon';\nimport WithTooltip from 'components/with_tooltip';\n\nimport {Constants} from 'utils/constants';\n\nimport './public-private-selector.scss';\n\ntype BigButtonSelectorProps = {\n id: ChannelType;\n title: string | React.ReactNode;\n description: string | React.ReactNode;\n iconSVG: (props: React.HTMLAttributes<HTMLSpanElement>) => JSX.Element;\n titleClassName?: string;\n descriptionClassName?: string;\n iconClassName?: string;\n tooltip?: string;\n selected?: boolean;\n disabled?: boolean;\n locked?: boolean;\n onClick: (id: ChannelType) => void;\n};\n\nconst BigButtonSelector = ({\n id,\n title,\n description,\n iconSVG: IconSVG,\n titleClassName,\n descriptionClassName,\n iconClassName,\n tooltip,\n selected,\n disabled,\n locked,\n onClick,\n}: BigButtonSelectorProps) => {\n const handleOnClick = useCallback(\n (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n e.preventDefault();\n onClick(id);\n },\n [id, onClick],\n );\n\n const button = (\n <button\n id={`public-private-selector-button-${id}`}\n className={classNames('public-private-selector-button', {selected, disabled, locked})}\n onClick={handleOnClick}\n >\n <IconSVG className={classNames('public-private-selector-button-icon', iconClassName)}/>\n <div className='public-private-selector-button-text'>\n <div className={classNames('public-private-selector-button-title', titleClassName)}>\n {title}\n {locked && <UpgradeBadge className='public-private-selector-button-icon-upgrade'/>}\n </div>\n <div className={classNames('public-private-selector-button-description', descriptionClassName)}>\n {description}\n </div>\n </div>\n {selected && <CheckCircleIcon className='public-private-selector-button-icon-check'/>}\n </button>\n );\n\n if (!tooltip) {\n return button;\n }\n\n return (\n <WithTooltip\n title={tooltip}\n >\n {button}\n </WithTooltip>\n );\n};\n\ntype ButtonSelectorProps = {\n title?: string | React.ReactNode;\n description?: string | React.ReactNode;\n titleClassName?: string;\n descriptionClassName?: string;\n iconClassName?: string;\n tooltip?: string;\n selected?: boolean;\n disabled?: boolean;\n locked?: boolean;\n};\n\ntype PublicPrivateSelectorProps = {\n selected: ChannelType;\n className?: string;\n publicButtonProps?: ButtonSelectorProps;\n privateButtonProps?: ButtonSelectorProps;\n onChange: (selected: ChannelType) => void;\n};\n\nconst PublicPrivateSelector = ({\n selected,\n className,\n publicButtonProps: {\n title: titlePublic,\n description: descriptionPublic,\n titleClassName: titleClassNamePublic,\n descriptionClassName: descriptionClassNamePublic,\n iconClassName: iconClassNamePublic,\n tooltip: tooltipPublic,\n disabled: disabledPublic,\n locked: lockedPublic,\n } = {} as ButtonSelectorProps,\n privateButtonProps: {\n title: titlePrivate,\n description: descriptionPrivate,\n titleClassName: titleClassNamePrivate,\n descriptionClassName: descriptionClassNamePrivate,\n iconClassName: iconClassNamePrivate,\n tooltip: tooltipPrivate,\n disabled: disabledPrivate,\n locked: lockedPrivate,\n } = {} as ButtonSelectorProps,\n onChange,\n}: PublicPrivateSelectorProps) => {\n const {formatMessage} = useIntl();\n\n const canSelectPublic = !disabledPublic && !lockedPublic;\n const canSelectPrivate = !disabledPrivate && !lockedPrivate;\n\n const handleOnClick = useCallback(\n (selection: ChannelType) => {\n if (\n selection === selected ||\n (selection === Constants.OPEN_CHANNEL && !canSelectPublic) ||\n (selection === Constants.PRIVATE_CHANNEL && !canSelectPrivate)\n ) {\n return;\n }\n\n onChange(selection);\n },\n [selected, canSelectPublic, canSelectPrivate, onChange],\n );\n\n return (\n <div className={classNames('public-private-selector', className)}>\n <BigButtonSelector\n id={Constants.OPEN_CHANNEL as ChannelType}\n title={titlePublic || formatMessage({id: 'public_private_selector.public.title', defaultMessage: 'Public'})}\n description={descriptionPublic || formatMessage({id: 'public_private_selector.public.description', defaultMessage: 'Anyone'})}\n iconSVG={GlobeCircleSolidIcon}\n titleClassName={titleClassNamePublic}\n descriptionClassName={descriptionClassNamePublic}\n iconClassName={iconClassNamePublic}\n tooltip={tooltipPublic}\n selected={selected === Constants.OPEN_CHANNEL}\n disabled={disabledPublic}\n locked={lockedPublic}\n onClick={handleOnClick}\n />\n <BigButtonSelector\n id={Constants.PRIVATE_CHANNEL as ChannelType}\n title={titlePrivate || formatMessage({id: 'public_private_selector.private.title', defaultMessage: 'Private'})}\n description={descriptionPrivate || formatMessage({id: 'public_private_selector.private.description', defaultMessage: 'Only invited members'})}\n iconSVG={LockCircleSolidIcon}\n titleClassName={titleClassNamePrivate}\n descriptionClassName={descriptionClassNamePrivate}\n iconClassName={iconClassNamePrivate}\n tooltip={tooltipPrivate}\n selected={selected === Constants.PRIVATE_CHANNEL}\n disabled={disabledPrivate}\n locked={lockedPrivate}\n onClick={handleOnClick}\n />\n </div>\n );\n};\n\nexport default PublicPrivateSelector;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport classNames from 'classnames';\nimport React, {useCallback, useState} from 'react';\nimport {FormattedMessage, useIntl} from 'react-intl';\nimport {useDispatch, useSelector} from 'react-redux';\n\nimport {GenericModal} from '@mattermost/components';\nimport type {Board} from '@mattermost/types/boards';\nimport type {ChannelType, Channel} from '@mattermost/types/channels';\nimport type {ServerError} from '@mattermost/types/errors';\n\nimport {setNewChannelWithBoardPreference} from 'mattermost-redux/actions/boards';\nimport {createChannel} from 'mattermost-redux/actions/channels';\nimport Permissions from 'mattermost-redux/constants/permissions';\nimport Preferences from 'mattermost-redux/constants/preferences';\nimport {get as getPreference} from 'mattermost-redux/selectors/entities/preferences';\nimport {haveICurrentChannelPermission} from 'mattermost-redux/selectors/entities/roles';\nimport {getCurrentTeam} from 'mattermost-redux/selectors/entities/teams';\n\nimport {switchToChannel} from 'actions/views/channel';\nimport {closeModal} from 'actions/views/modals';\n\nimport ChannelNameFormField from 'components/channel_name_form_field/channel_name_form_field';\nimport PublicPrivateSelector from 'components/widgets/public-private-selector/public-private-selector';\nimport WithTooltip from 'components/with_tooltip';\n\nimport Pluggable from 'plugins/pluggable';\nimport Constants, {ModalIdentifiers} from 'utils/constants';\n\nimport type {GlobalState} from 'types/store';\n\nimport './new_channel_modal.scss';\n\nexport function getChannelTypeFromPermissions(canCreatePublicChannel: boolean, canCreatePrivateChannel: boolean) {\n let channelType = Constants.OPEN_CHANNEL;\n\n if (!canCreatePublicChannel && channelType === Constants.OPEN_CHANNEL) {\n channelType = Constants.PRIVATE_CHANNEL as ChannelType;\n }\n\n if (!canCreatePrivateChannel && channelType === Constants.PRIVATE_CHANNEL) {\n channelType = Constants.OPEN_CHANNEL as ChannelType;\n }\n\n return channelType as ChannelType;\n}\n\nconst enum ServerErrorId {\n CHANNEL_URL_SIZE = 'model.channel.is_valid.1_or_more.app_error',\n CHANNEL_UPDATE_EXISTS = 'store.sql_channel.update.exists.app_error',\n CHANNEL_CREATE_EXISTS = 'store.sql_channel.save_channel.exists.app_error',\n CHANNEL_PURPOSE_SIZE = 'model.channel.is_valid.purpose.app_error',\n}\n\nconst NewChannelModal = () => {\n const intl = useIntl();\n const {formatMessage} = intl;\n\n const currentTeamId = useSelector(getCurrentTeam)?.id;\n\n const canCreatePublicChannel = useSelector((state: GlobalState) => (currentTeamId ? haveICurrentChannelPermission(state, Permissions.CREATE_PUBLIC_CHANNEL) : false));\n const canCreatePrivateChannel = useSelector((state: GlobalState) => (currentTeamId ? haveICurrentChannelPermission(state, Permissions.CREATE_PRIVATE_CHANNEL) : false));\n const dispatch = useDispatch();\n\n const [type, setType] = useState(getChannelTypeFromPermissions(canCreatePublicChannel, canCreatePrivateChannel));\n const [displayName, setDisplayName] = useState('');\n const [url, setURL] = useState('');\n const [purpose, setPurpose] = useState('');\n const [urlError, setURLError] = useState('');\n const [purposeError, setPurposeError] = useState('');\n const [serverError, setServerError] = useState('');\n const [channelInputError, setChannelInputError] = useState(false);\n\n // create a board along with the channel\n const pluginsComponentsList = useSelector((state: GlobalState) => state.plugins.components);\n const createBoardFromChannelPlugin = pluginsComponentsList?.CreateBoardFromTemplate;\n const newChannelWithBoardPulsatingDotState = useSelector((state: GlobalState) => getPreference(state, Preferences.APP_BAR, Preferences.NEW_CHANNEL_WITH_BOARD_TOUR_SHOWED, ''));\n\n const [canCreateFromPluggable, setCanCreateFromPluggable] = useState(true);\n const [actionFromPluggable, setActionFromPluggable] = useState<((currentTeamId: string, channelId: string) => Promise<Board>) | undefined>(undefined);\n\n const handleURLChange = useCallback((newURL: string) => {\n setURL(newURL);\n setURLError('');\n }, []);\n\n const handleOnModalConfirm = async () => {\n if (!canCreate || !currentTeamId) {\n return;\n }\n\n const channel: Channel = {\n team_id: currentTeamId,\n name: url,\n display_name: displayName,\n purpose,\n header: '',\n type,\n create_at: 0,\n creator_id: '',\n delete_at: 0,\n group_constrained: false,\n id: '',\n last_post_at: 0,\n last_root_post_at: 0,\n scheme_id: '',\n update_at: 0,\n };\n\n try {\n const {data: newChannel, error} = await dispatch(createChannel(channel, ''));\n if (error) {\n onCreateChannelError(error);\n return;\n }\n\n handleOnModalCancel();\n\n // If template selected, create a new board from this template\n if (canCreateFromPluggable && createBoardFromChannelPlugin) {\n try {\n addBoardToChannel(newChannel!.id);\n } catch (e: any) {\n // eslint-disable-next-line no-console\n console.log(e.message);\n }\n }\n dispatch(switchToChannel(newChannel!));\n } catch (e) {\n onCreateChannelError({message: formatMessage({id: 'channel_modal.error.generic', defaultMessage: 'Something went wrong. Please try again.'})});\n }\n };\n\n const addBoardToChannel = async (channelId: string) => {\n if (!createBoardFromChannelPlugin || !currentTeamId) {\n return false;\n }\n if (!actionFromPluggable) {\n return false;\n }\n\n const action = actionFromPluggable as (currentTeamId: string, channelId: string) => Promise<Board>;\n if (action && canCreateFromPluggable) {\n const board = await action(channelId, currentTeamId);\n\n if (!board?.id) {\n return false;\n }\n }\n\n // show the new channel with board tour tip\n if (newChannelWithBoardPulsatingDotState === '') {\n dispatch(setNewChannelWithBoardPreference({[Preferences.NEW_CHANNEL_WITH_BOARD_TOUR_SHOWED]: false}));\n }\n return true;\n };\n\n const handleOnModalCancel = () => {\n dispatch(closeModal(ModalIdentifiers.NEW_CHANNEL_MODAL));\n };\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const onCreateChannelError = ({server_error_id, message}: ServerError) => {\n switch (server_error_id) {\n case ServerErrorId.CHANNEL_URL_SIZE:\n setURLError(\n formatMessage({\n id: 'channel_modal.handleTooShort',\n defaultMessage: 'Channel URL must be 1 or more lowercase alphanumeric characters',\n }),\n );\n break;\n\n case ServerErrorId.CHANNEL_UPDATE_EXISTS:\n case ServerErrorId.CHANNEL_CREATE_EXISTS:\n setURLError(\n formatMessage({\n id: 'channel_modal.alreadyExist',\n defaultMessage: 'A channel with that URL already exists',\n }),\n );\n break;\n\n case ServerErrorId.CHANNEL_PURPOSE_SIZE:\n setPurposeError(\n formatMessage({\n id: 'channel_modal.purposeTooLong',\n defaultMessage: 'The purpose exceeds the maximum of 250 characters',\n }),\n );\n break;\n\n default:\n setServerError(message);\n break;\n }\n };\n\n const handleOnTypeChange = useCallback((channelType: ChannelType) => {\n setType(channelType);\n setServerError('');\n }, []);\n\n const handleOnPurposeChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n e.preventDefault();\n const {target: {value: purpose}} = e;\n\n setPurpose(purpose);\n setPurposeError('');\n setServerError('');\n };\n\n const handleOnPurposeKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n // Avoid firing the handleEnterKeyPress in GenericModal from purpose textarea\n e.stopPropagation();\n };\n\n const canCreate = displayName && !urlError && type && !purposeError && !serverError && canCreateFromPluggable && !channelInputError;\n\n const newBoardInfoIcon = (\n <WithTooltip\n title={\n <>\n <div className='title'>\n <FormattedMessage\n id={'channel_modal.create_board.tooltip_title'}\n defaultMessage={'Manage your task with a board'}\n />\n </div>\n <div className='description'>\n <FormattedMessage\n id={'channel_modal.create_board.tooltip_description'}\n defaultMessage={'Use any of our templates to manage your tasks or start from scratch with your own!'}\n />\n </div>\n </>\n }\n >\n <i className='icon-information-outline'/>\n </WithTooltip>\n );\n\n return (\n <GenericModal\n id='new-channel-modal'\n className='new-channel-modal'\n modalHeaderText={formatMessage({id: 'channel_modal.modalTitle', defaultMessage: 'Create a new channel'})}\n confirmButtonText={formatMessage({id: 'channel_modal.createNew', defaultMessage: 'Create channel'})}\n cancelButtonText={formatMessage({id: 'channel_modal.cancel', defaultMessage: 'Cancel'})}\n errorText={serverError}\n isConfirmDisabled={!canCreate}\n autoCloseOnConfirmButton={false}\n compassDesign={true}\n handleConfirm={handleOnModalConfirm}\n handleEnterKeyPress={handleOnModalConfirm}\n handleCancel={handleOnModalCancel}\n onExited={handleOnModalCancel}\n >\n <div className='new-channel-modal-body'>\n <ChannelNameFormField\n value={displayName}\n name='new-channel-modal-name'\n placeholder={formatMessage({id: 'channel_modal.name.placeholder', defaultMessage: 'Enter a name for your new channel'})}\n onDisplayNameChange={setDisplayName}\n onURLChange={handleURLChange}\n onErrorStateChange={setChannelInputError}\n urlError={urlError}\n />\n <PublicPrivateSelector\n className='new-channel-modal-type-selector'\n selected={type}\n publicButtonProps={{\n title: formatMessage({id: 'channel_modal.type.public.title', defaultMessage: 'Public Channel'}),\n description: formatMessage({id: 'channel_modal.type.public.description', defaultMessage: 'Anyone can join'}),\n disabled: !canCreatePublicChannel,\n }}\n privateButtonProps={{\n title: formatMessage({id: 'channel_modal.type.private.title', defaultMessage: 'Private Channel'}),\n description: formatMessage({id: 'channel_modal.type.private.description', defaultMessage: 'Only invited members'}),\n disabled: !canCreatePrivateChannel,\n }}\n onChange={handleOnTypeChange}\n />\n <div className='new-channel-modal-purpose-container'>\n <textarea\n id='new-channel-modal-purpose'\n className={classNames('new-channel-modal-purpose-textarea', {'with-error': purposeError})}\n placeholder={formatMessage({id: 'channel_modal.purpose.placeholder', defaultMessage: 'Enter a purpose for this channel (optional)'})}\n rows={4}\n maxLength={Constants.MAX_CHANNELPURPOSE_LENGTH}\n autoComplete='off'\n value={purpose}\n onChange={handleOnPurposeChange}\n onKeyDown={handleOnPurposeKeyDown}\n />\n {purposeError ? (\n <div className='new-channel-modal-purpose-error'>\n <i className='icon icon-alert-outline'/>\n <span>{purposeError}</span>\n </div>\n ) : (\n <div className='new-channel-modal-purpose-info'>\n <span>\n {formatMessage({id: 'channel_modal.purpose.info', defaultMessage: 'This will be displayed when browsing for channels.'})}\n </span>\n </div>\n )}\n {createBoardFromChannelPlugin &&\n <Pluggable\n pluggableName='CreateBoardFromTemplate'\n setCanCreate={setCanCreateFromPluggable}\n setAction={setActionFromPluggable}\n newBoardInfoIcon={newBoardInfoIcon}\n />\n }\n </div>\n </div>\n </GenericModal>\n );\n};\n\nexport default NewChannelModal;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport classNames from 'classnames';\nimport type {MouseEventHandler, RefObject} from 'react';\nimport React, {useEffect, useRef, useState} from 'react';\nimport {useSelector} from 'react-redux';\nimport styled, {createGlobalStyle, css} from 'styled-components';\n\nimport {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';\n\nimport {getIsMobileView} from 'selectors/views/browser';\nimport {useGlobalState} from 'stores/hooks';\n\nimport type {CssVarKeyForResizable} from './constants';\nimport {ResizeDirection} from './constants';\nimport {isSizeLessThanSnapSize, isSnapableSpeed, shouldSnapWhenSizeGrown, shouldSnapWhenSizeShrunk} from './utils';\n\ntype Props = {\n id?: string;\n className?: string;\n name: string;\n disabled?: boolean;\n defaultWidth: number;\n globalCssVar: CssVarKeyForResizable;\n dir: ResizeDirection;\n containerRef: RefObject<HTMLElement>;\n onResizeStart?: (startWidth: number) => void;\n onResize?: (width: number, cssVarProperty: string, cssVarValue: string) => void;\n onResizeEnd?: (finalWidth: number, cssVarProperty: string, cssVarValue: string) => void;\n onDividerDoubleClick?: (prevWidth: number, cssVarProperty: string) => void;\n}\n\nconst Divider = styled.div<{isActive: boolean}>`\n position: absolute;\n z-index: 50;\n top: 0;\n width: 12px;\n height: 100%;\n cursor: col-resize;\n &.left {\n right: -12px;\n }\n\n &::after {\n position: absolute;\n width: 4px;\n height: 100%;\n background-color: ${({isActive}) => (isActive ? 'var(--sidebar-text-active-border)' : 'transparent')};\n content: '';\n }\n &:hover {\n &::after {\n background-color: var(--sidebar-text-active-border);\n transition: background-color 400ms step-end;\n }\n }\n &.snapped {\n &::after {\n animation: emphasis-sidebar-resize-line 800ms;\n }\n }\n`;\n\nconst ResizableDividerGlobalStyle = createGlobalStyle<{active: boolean; varName: CssVarKeyForResizable; width: number | null}>`\n ${({active}) => active && css`\n body {\n cursor: col-resize;\n user-select: none;\n }\n `}\n ${({varName, width}) => width && css`\n :root {\n --${varName}: ${width}px;\n }\n `}\n`;\n\nfunction ResizableDivider({\n id,\n name,\n className,\n disabled,\n dir,\n containerRef,\n defaultWidth,\n onResize,\n onResizeStart,\n onResizeEnd,\n onDividerDoubleClick,\n ...props\n}: Props) {\n const resizeLineRef = useRef<HTMLDivElement>(null);\n\n const startWidth = useRef(0);\n const lastWidth = useRef<number | null>(null);\n\n const previousClientX = useRef(0);\n\n const cssVarKey = `--${props.globalCssVar}`;\n\n const currentUserID = useSelector(getCurrentUserId);\n const isMobileView = useSelector(getIsMobileView);\n\n const [isActive, setIsActive] = useState(false);\n const [width, setWidth] = useGlobalState<number | null>(null, `resizable_${name}:`, currentUserID);\n\n const defaultOnResizeChange = (width: number, cssVarProp: string, cssVarValue: string) => {\n containerRef.current?.style.setProperty(cssVarProp, cssVarValue);\n lastWidth.current = width;\n };\n\n const handleOnResize = (width: number, cssVarProp: string, cssVarValue: string) => {\n if (onResize) {\n onResize(width, cssVarProp, cssVarValue);\n }\n\n defaultOnResizeChange(width, cssVarProp, cssVarValue);\n };\n\n const reset = () => {\n startWidth.current = 0;\n previousClientX.current = 0;\n lastWidth.current = null;\n };\n\n const onMouseDown: MouseEventHandler<HTMLDivElement> = (e) => {\n if (disabled || !containerRef.current) {\n return;\n }\n previousClientX.current = e.clientX;\n startWidth.current = containerRef.current.getBoundingClientRect().width;\n\n setIsActive(true);\n\n if (onResizeStart) {\n onResizeStart(startWidth.current);\n }\n\n handleOnResize(startWidth.current, cssVarKey, `${startWidth.current}px`);\n\n document.body.classList.add('layout-changing');\n };\n\n useEffect(() => {\n if (!isActive || disabled) {\n reset();\n return undefined;\n }\n const onMouseMove = (e: MouseEvent) => {\n const resizeLine = resizeLineRef.current;\n\n if (!isActive) {\n return;\n }\n\n if (!resizeLine) {\n return;\n }\n\n e.preventDefault();\n\n const previousWidth = lastWidth.current ?? 0;\n let widthDiff = 0;\n\n switch (dir) {\n case ResizeDirection.LEFT:\n widthDiff = e.clientX - previousClientX.current;\n break;\n case ResizeDirection.RIGHT:\n widthDiff = previousClientX.current - e.clientX;\n break;\n }\n\n const newWidth = previousWidth + widthDiff;\n\n if (resizeLine.classList.contains('snapped')) {\n const diff = newWidth - defaultWidth;\n\n if (isSizeLessThanSnapSize(diff)) {\n return;\n }\n\n handleOnResize(newWidth, cssVarKey, `${newWidth}px`);\n\n resizeLine.classList.remove('snapped');\n previousClientX.current = e.clientX;\n\n return;\n }\n\n previousClientX.current = e.clientX;\n\n const shouldSnap = shouldSnapWhenSizeGrown(newWidth, previousWidth, defaultWidth) || shouldSnapWhenSizeShrunk(newWidth, previousWidth, defaultWidth);\n\n if (isSnapableSpeed(newWidth - previousWidth) && shouldSnap) {\n switch (dir) {\n case ResizeDirection.LEFT:\n previousClientX.current += defaultWidth - newWidth;\n break;\n case ResizeDirection.RIGHT:\n previousClientX.current += newWidth - defaultWidth;\n break;\n }\n\n handleOnResize(defaultWidth, cssVarKey, `${defaultWidth}px`);\n\n resizeLine.classList.add('snapped');\n return;\n }\n\n handleOnResize(newWidth, cssVarKey, `${newWidth}px`);\n };\n\n const onMouseUp = () => {\n const finalWidth = containerRef.current?.getBoundingClientRect().width;\n if (isActive && finalWidth) {\n setWidth(finalWidth);\n onResizeEnd?.(finalWidth, cssVarKey, `${finalWidth}px`);\n }\n\n containerRef.current?.style.removeProperty(cssVarKey);\n document.body.classList.remove('layout-changing');\n reset();\n setIsActive(false);\n };\n\n window.addEventListener('mousemove', onMouseMove);\n window.addEventListener('mouseup', onMouseUp);\n\n return () => {\n window.removeEventListener('mousemove', onMouseMove);\n window.removeEventListener('mouseup', onMouseUp);\n };\n }, [isActive, disabled]);\n\n const onDoubleClick = () => {\n onDividerDoubleClick?.(width ?? 0, cssVarKey);\n reset();\n setWidth(null);\n };\n\n if (disabled || isMobileView) {\n return null;\n }\n\n return (\n <>\n <Divider\n id={id}\n className={classNames(className, {\n left: dir === ResizeDirection.LEFT,\n right: dir === ResizeDirection.RIGHT,\n })}\n ref={resizeLineRef}\n isActive={isActive}\n onMouseDown={onMouseDown}\n onDoubleClick={onDoubleClick}\n />\n <ResizableDividerGlobalStyle\n varName={props.globalCssVar}\n width={width}\n active={isActive}\n />\n </>\n\n );\n}\n\nexport default ResizableDivider;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {SidebarSize, SIDEBAR_SNAP_SIZE, SIDEBAR_SNAP_SPEED_LIMIT} from './constants';\n\nexport const isSizeLessThanSnapSize = (size: number) => {\n return Math.abs(size) <= SIDEBAR_SNAP_SIZE;\n};\n\nexport const isSnapableSpeed = (speed: number) => {\n return Math.abs(speed) <= SIDEBAR_SNAP_SPEED_LIMIT;\n};\n\nexport const shouldSnapWhenSizeGrown = (newWidth: number, prevWidth: number, defaultWidth: number) => {\n const diff = defaultWidth - newWidth;\n const isGrowing = newWidth > prevWidth;\n\n return diff >= 0 && diff <= SIDEBAR_SNAP_SIZE && isGrowing;\n};\n\nexport const shouldSnapWhenSizeShrunk = (newWidth: number, prevWidth: number, defaultWidth: number) => {\n const diff = newWidth - defaultWidth;\n const isShrinking = newWidth < prevWidth;\n\n return diff >= 0 && diff <= SIDEBAR_SNAP_SIZE && isShrinking;\n};\n\nexport const shouldRhsOverlapChannelView = (size: SidebarSize) => size === SidebarSize.MEDIUM;\n\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport type {PreferenceType} from '@mattermost/types/preferences';\n\nimport {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';\nimport type {ActionFuncAsync} from 'mattermost-redux/types/actions';\n\nimport {savePreferences} from './preferences';\n\nimport {Preferences} from '../constants';\n\nexport function setNewChannelWithBoardPreference(initializationState: Record<string, boolean>): ActionFuncAsync {\n return async (dispatch, getState) => {\n const state = getState();\n const currentUserId = getCurrentUserId(state);\n const preference: PreferenceType = {\n user_id: currentUserId,\n category: Preferences.APP_BAR,\n name: Preferences.NEW_CHANNEL_WITH_BOARD_TOUR_SHOWED,\n value: JSON.stringify(initializationState),\n };\n await dispatch(savePreferences(currentUserId, [preference]));\n return {data: true};\n };\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {useCallback} from 'react';\nimport {useSelector, useDispatch, shallowEqual} from 'react-redux';\n\nimport {createSelector} from 'mattermost-redux/selectors/create_selector';\nimport {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';\nimport {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';\n\nimport {setGlobalItem} from 'actions/storage';\nimport {makeGetGlobalItem} from 'selectors/storage';\n\nconst currentUserAndTeamSuffix = createSelector('currentUserAndTeamSuffix', [\n getCurrentUserId,\n getCurrentTeamId,\n], (\n userId,\n teamId,\n) => {\n return `:${userId}:${teamId}`;\n});\n\n/**\n *\n * @param initialValue\n * @param name name of stored value, prepended to suffix\n * @param suffix to provide scope; defaults to user and team\n */\nexport function useGlobalState<TVal>(\n initialValue: TVal,\n name: string,\n suffix?: string,\n): [TVal, (value: TVal) => ReturnType<typeof setGlobalItem>] {\n const dispatch = useDispatch();\n const defaultSuffix = useSelector(currentUserAndTeamSuffix);\n const suffixToUse = suffix || defaultSuffix;\n const storedKey = `${name}${suffixToUse}`;\n\n const value = useSelector(makeGetGlobalItem(storedKey, initialValue), shallowEqual);\n const setValue = useCallback((newValue) => dispatch(setGlobalItem(storedKey, newValue)), [storedKey]);\n\n return [\n value,\n setValue,\n ];\n}\n"],"names":["UrlInput","_ref","base","path","pathInfo","limit","maxLength","shortenLength","error","className","onChange","onBlur","formatMessage","useIntl","editing","setEditing","useState","useEffect","fullPath","concat","fullURL","isShortenedURL","length","hasError","Boolean","urlInputLabel","React","id","defaultMessage","getShortenedURL","classNames","WithTooltip","title","Input","name","type","containerClassName","wrapperClassName","inputClassName","autoFocus","autoComplete","value","event","preventDefault","disabled","onClick","handleOnButtonClick","propTypes","_pt","isRequired","ChannelNameFormField","props","_useSelector","intl","displayNameModified","useRef","displayNameError","setDisplayNameError","displayName","urlModified","url","setURL","urlError","setURLError","inputCustomMessage","setInputCustomMessage","currentTeamName","useSelector","getCurrentTeam","teamName","team","handleOnDisplayNameChange","useCallback","e","target","updatedDisplayName","displayNameErrors","displayNameParam","errors","trim","Constants","MIN_CHANNELNAME_LENGTH","push","MAX_CHANNELNAME_LENGTH","validateDisplayName","current","onDisplayNameChange","cleanURL","cleanUpUrlable","onURLChange","handleOnDisplayNameBlur","generateSlug","handleOnURLChange","toLowerCase","replace","urlErrors","validateChannelUrl","onErrorStateChange","required","label","placeholder","customMessage","URLInput","getSiteURL","DEFAULT_CHANNELURL_SHORTEN_LENGTH","CheckboxWithSelectSettingItem","description","descriptionAboveContent","checkboxFieldTitle","checkboxFieldData","checkboxFieldValue","handleCheckboxChange","selectFieldData","selectFieldValue","handleSelectChange","isSelectDisabled","selectPlaceholder","content","key","dataTestId","checked","ReactSelect","inputId","ariaLabelledby","classNamePrefix","options","clearable","isClearable","isDisabled","isSearchable","components","IndicatorSeparator","NoIndicatorSeparatorComponent","BaseSettingItem","isContentInline","ModalHeader","subtitle","handleClose","tabIndex","RadioSettingItem","inputFieldData","inputFieldValue","handleChange","fields","map","option","SectionName","VALID_SECTION_NAMES","Object","values","ResetToDefaultButton","areDesktopNotificationsSameAsDefault","useMemo","isNotifyMeAboutSame","userNotifyProps","desktop","userSelectedChannelNotifyProps","isThreadReplyNotificationsSame","desktop_threads","isSoundSame","convertDesktopSoundNotifyPropFromUserToDesktop","desktop_sound","isNotificationSoundSame","desktop_notification_sound","notificationSoundKeys","areMobileNotificationsSameAsDefault","push_threads","includes","sectionName","Desktop","Mobile","channelNotifyPropsDefaultedToUserNotifyProps","_userNotifyProps$desk","NotificationLevels","ALL","DesktopSound","ON","_userNotifyProps$desk2","_userNotifyProps$push","FormattedMessage","desktopNotificationInputFieldData","defaultOption","optionalDefault","undefined","MENTION","NONE","desktopNotificationSoundsCheckboxFieldData","desktopNotificationSoundsSelectFieldData","optionsOfMessageNotificationSoundsSelect","IgnoreMentionsInputFieldData","mobileNotificationInputFieldData","MuteChannelInputFieldData","DesktopReplyThreadsInputFieldData","MobileReplyThreadsInputFieldData","AutoFollowThreadsInputFieldData","sameMobileSettingsDesktopInputFieldData","ChannelNotificationsModal","_props$channelMember","_props$channelMember2","_props$channelMember3","_props$channelMember4","_props$channelMember5","_props$channelMember6","_props$channelMember7","_props$channelMember8","_props$channelMember9","show","setShow","serverError","setServerError","settings","setSettings","currentUserNotifyProps","currentUser","notify_props","mark_unread","_channelMemberNotifyP","channelMemberNotifyProps","channelMember","ignore_channel_mentions","getInitialValuesOfIgnoreChannelMentions","channel","getInitialValuesOfChannelNotifyProps","DesktopNotificationSounds","BING","channel_auto_follow_threads","_channelMemberNotifyP2","desktopAndMobileSettingsDifferent","setDesktopAndMobileSettingDifferent","areDesktopAndMobileSettingsDifferent","collapsedReplyThreads","handleHide","prevSettings","_objectSpread","handleResetToDefaultClicked","muteOrIgnoreSectionContent","CheckboxSettingItem","inputFieldTitle","utils","desktopNotificationsSectionContent","isChecked","OFF","getValueOfNotificationSoundsSelect","selectedOption","stopTryNotificationRing","tryNotificationSound","mobileNotificationsSectionContent","newValueOfSettings","newValueOfDesktopAndMobileSettingsDifferent","_props$channelMember10","_props$channelMember11","_props$currentUser","_props$currentUser$no","_props$channelMember12","_props$channelMember13","_props$currentUser2","_props$currentUser2$n","autoFollowThreadsSectionContent","desktopAndMobileNotificationSectionContent","ModalSection","titleSuffix","AlertBanner","mode","variant","customIcon","BellOffOutlineIcon","size","color","message","Modal","dialogClassName","onHide","onExited","role","style","display","placeItems","display_name","channelNotifyProps","savedChannelNotifyProps","DEFAULT","createChannelNotifyPropsFromSelectedSettings","actions","updateChannelNotifyProps","then","defaultValue","channelMemberNotifyProp","arguments","userNotifyProp","markUnread","ignoreChannelMentions","userNotifyPropForChannel","ignoreChannelMentionsDefault","IgnoreChannelMentions","isCollapsedThreadsEnabled","desktopThreads","pushThreads","connect","state","getMyCurrentChannelMembership","sendPushNotifications","getConfig","SendPushNotifications","dispatch","bindActionCreators","CheckCircleIcon","width","height","viewBox","xmlns","d","GlobeCircleSolidIcon","rx","fillOpacity","LockCircleSolidIcon","UpgradeBadgeIcon","version","cx","cy","r","BigButtonSelector","iconSVG","IconSVG","titleClassName","descriptionClassName","iconClassName","tooltip","selected","locked","handleOnClick","button","UpgradeBadge","PublicPrivateSelector","_ref2","publicButtonProps","titlePublic","descriptionPublic","titleClassNamePublic","descriptionClassNamePublic","iconClassNamePublic","tooltipPublic","disabledPublic","lockedPublic","privateButtonProps","titlePrivate","descriptionPrivate","titleClassNamePrivate","descriptionClassNamePrivate","iconClassNamePrivate","tooltipPrivate","disabledPrivate","lockedPrivate","canSelectPublic","canSelectPrivate","selection","OPEN_CHANNEL","PRIVATE_CHANNEL","getChannelTypeFromPermissions","canCreatePublicChannel","canCreatePrivateChannel","channelType","ServerErrorId","NewChannelModal","currentTeamId","haveICurrentChannelPermission","Permissions","CREATE_PUBLIC_CHANNEL","CREATE_PRIVATE_CHANNEL","useDispatch","setType","setDisplayName","purpose","setPurpose","purposeError","setPurposeError","channelInputError","setChannelInputError","pluginsComponentsList","plugins","createBoardFromChannelPlugin","CreateBoardFromTemplate","newChannelWithBoardPulsatingDotState","getPreference","Preferences","APP_BAR","NEW_CHANNEL_WITH_BOARD_TOUR_SHOWED","canCreateFromPluggable","setCanCreateFromPluggable","actionFromPluggable","setActionFromPluggable","handleURLChange","newURL","handleOnModalConfirm","async","canCreate","team_id","header","create_at","creator_id","delete_at","group_constrained","last_post_at","last_root_post_at","scheme_id","update_at","data","newChannel","createChannel","onCreateChannelError","handleOnModalCancel","addBoardToChannel","console","log","switchToChannel","action","board","channelId","setNewChannelWithBoardPreference","closeModal","ModalIdentifiers","NEW_CHANNEL_MODAL","server_error_id","CHANNEL_URL_SIZE","CHANNEL_UPDATE_EXISTS","CHANNEL_CREATE_EXISTS","CHANNEL_PURPOSE_SIZE","handleOnTypeChange","newBoardInfoIcon","GenericModal","modalHeaderText","confirmButtonText","cancelButtonText","errorText","isConfirmDisabled","autoCloseOnConfirmButton","compassDesign","handleConfirm","handleEnterKeyPress","handleCancel","rows","MAX_CHANNELPURPOSE_LENGTH","onKeyDown","stopPropagation","Pluggable","pluggableName","setCanCreate","setAction","Divider","styled","withConfig","isActive","ResizableDividerGlobalStyle","createGlobalStyle","active","css","_ref3","varName","ResizableDivider","_ref4","dir","containerRef","defaultWidth","onResize","onResizeStart","onResizeEnd","onDividerDoubleClick","_objectWithoutProperties","_excluded","resizeLineRef","startWidth","lastWidth","previousClientX","cssVarKey","globalCssVar","currentUserID","getCurrentUserId","isMobileView","getIsMobileView","setIsActive","setWidth","useGlobalState","handleOnResize","cssVarProp","cssVarValue","defaultOnResizeChange","_containerRef$current","setProperty","reset","onMouseMove","_lastWidth$current","resizeLine","previousWidth","widthDiff","ResizeDirection","LEFT","clientX","RIGHT","newWidth","classList","contains","diff","isSizeLessThanSnapSize","remove","shouldSnap","shouldSnapWhenSizeGrown","shouldSnapWhenSizeShrunk","isSnapableSpeed","add","onMouseUp","_containerRef$current2","_containerRef$current3","finalWidth","getBoundingClientRect","removeProperty","document","body","window","addEventListener","removeEventListener","left","right","ref","onMouseDown","onDoubleClick","Math","abs","SIDEBAR_SNAP_SIZE","speed","SIDEBAR_SNAP_SPEED_LIMIT","prevWidth","isGrowing","isShrinking","shouldRhsOverlapChannelView","SidebarSize","MEDIUM","initializationState","getState","currentUserId","preference","user_id","category","JSON","stringify","savePreferences","currentUserAndTeamSuffix","createSelector","getCurrentTeamId","userId","teamId","initialValue","suffix","defaultSuffix","suffixToUse","storedKey","makeGetGlobalItem","shallowEqual","newValue","setGlobalItem"],"sourceRoot":""}