![]() 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":"7003.683926ac3591bd47b01b.js","mappings":"mTAEO,SAASA,EAAqBC,GACnC,OAAO,EAAAC,EAAA,IAAqB,WAAYD,EAC1C,EACqB,EAAAE,EAAA,GAAuB,WAAY,CAAC,OAAQ,QAAS,c,0BCE3D,SAASC,EAAkBC,GACxC,QAAeC,IAAXD,EACF,MAAO,CAAC,EAEV,MAAME,EAAS,CAAC,EAIhB,OAHAC,OAAOC,KAAKJ,GAAQK,QAAOC,KAAUA,EAAKC,MAAM,aAAuC,mBAAjBP,EAAOM,MAAuBE,SAAQF,IAC1GJ,EAAOI,GAAQN,EAAOM,EAAK,IAEtBJ,CACT,CCdA,MAAMO,EAAY,CAAC,cAAe,oBAAqB,cAaxC,SAASC,EAAaC,GACnC,IAAIC,EACJ,MAAM,YACFC,EAAW,kBACXC,EAAiB,WACjBC,GACEJ,EACJK,GAAO,OAA8BL,EAAYF,GAC7CQ,ECnBO,SAA+BC,EAAgBH,GAC5D,MAA8B,mBAAnBG,EACFA,EAAeH,GAEjBG,CACT,CDckCC,CAAsBL,EAAmBC,IAEvEK,MAAOC,EAAW,YAClBC,GETW,SAAwBX,GACrC,MAAM,aACJY,EAAY,gBACZC,EAAe,kBACfV,EAAiB,uBACjBW,EAAsB,UACtBC,GACE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O8D,QACjCzM,SACAwC,OACH,CAET,GAEA,CAA4CqI,G,yJCbtC6B,EAAgD,CAACC,EAAAA,SAAU,KAAM,KAAM,KAAM,KAAM,KAAM,MAyB/F,EAvBenmB,IAM4B,IAN3B,MACZ2lB,EAAQ,EAAC,QACTF,EAAO,SACP/C,EAAQ,MACR0D,GAEkCpmB,EAD/BqmB,E,qWAAKte,CAAA/H,EAAAlE,GAER,MAAMwqB,EAAIJ,EAASP,GACnB,OACIrlB,IAAAA,cAAA,SAAA9E,OAAA+qB,OAAA,GACQF,EAAK,CACTtpB,UAAW0D,IAAW,SAAU4lB,EAAMtpB,aAEtCuD,IAAAA,cAAA,OAAKvD,UAAU,QACXuD,IAAAA,cAACgmB,EAAC,KAAEb,GACH/C,EAAWpiB,IAAAA,cAAA,SAAIoiB,GAAgB,MAEpCpiB,IAAAA,cAAA,OAAKvD,UAAU,WACdqpB,EACI,C,qFClCV,SAASlD,IACZ,OAAO,IAAIsD,iBAAgBC,EAAAA,EAAAA,eAAcC,OAC7C,C","sources":["webpack://mattermost-webapp/../node_modules/@mui/base/Badge/badgeClasses.js","webpack://mattermost-webapp/../node_modules/@mui/base/utils/omitEventHandlers.js","webpack://mattermost-webapp/../node_modules/@mui/base/utils/useSlotProps.js","webpack://mattermost-webapp/../node_modules/@mui/base/utils/resolveComponentProps.js","webpack://mattermost-webapp/../node_modules/@mui/base/utils/mergeSlotProps.js","webpack://mattermost-webapp/../node_modules/@mui/base/utils/extractEventHandlers.js","webpack://mattermost-webapp/../node_modules/@mui/base/utils/appendOwnerState.js","webpack://mattermost-webapp/../node_modules/@mui/base/utils/isHostComponent.js","webpack://mattermost-webapp/../node_modules/@mui/base/utils/ClassNameConfigurator.js","webpack://mattermost-webapp/../node_modules/@mui/base/Badge/Badge.js","webpack://mattermost-webapp/../node_modules/@mui/base/useBadge/useBadge.js","webpack://mattermost-webapp/../node_modules/@mui/utils/esm/usePreviousProps/usePreviousProps.js","webpack://mattermost-webapp/./src/components/drafts/draft_actions/action.tsx","webpack://mattermost-webapp/./src/components/drafts/draft_actions/schedule_post_actions/delete_scheduled_post_modal.tsx","webpack://mattermost-webapp/./src/components/drafts/draft_actions/send_draft_modal.tsx","webpack://mattermost-webapp/./src/components/drafts/draft_actions/schedule_post_actions/scheduled_post_actions.tsx","webpack://mattermost-webapp/./src/components/drafts/placeholder_scheduled_post_title/placeholder_scheduled_posts_title.tsx","webpack://mattermost-webapp/./src/components/edit_scheduled_post/edit_post_footer.tsx","webpack://mattermost-webapp/./src/components/edit_scheduled_post/edit_post.tsx","webpack://mattermost-webapp/./src/components/edit_scheduled_post/index.ts","webpack://mattermost-webapp/./src/components/drafts/draft_actions/delete_draft_modal.tsx","webpack://mattermost-webapp/./src/components/drafts/draft_actions/draft_actions.tsx","webpack://mattermost-webapp/./src/components/drafts/draft_actions/index.ts","webpack://mattermost-webapp/./src/components/drafts/draft_title/draft_title.tsx","webpack://mattermost-webapp/./src/components/drafts/draft_title/index.ts","webpack://mattermost-webapp/./src/components/drafts/panel/panel.tsx","webpack://mattermost-webapp/./src/components/drafts/panel/panel_body.tsx","webpack://mattermost-webapp/./src/components/drafts/utils.ts","webpack://mattermost-webapp/./src/components/drafts/draft_row.tsx","webpack://mattermost-webapp/./src/components/common/hooks/use_scroll_on_render.ts","webpack://mattermost-webapp/./src/components/drafts/drafts_illustration.tsx","webpack://mattermost-webapp/./src/components/drafts/draft_list/draft_list.tsx","webpack://mattermost-webapp/./src/components/drafts/scheduled_post_list/empty_scheduled_post_list_illustration.tsx","webpack://mattermost-webapp/./src/components/drafts/scheduled_post_list/scheduled_post_list.tsx","webpack://mattermost-webapp/./src/components/tabs/tab/index.tsx","webpack://mattermost-webapp/./src/components/tabs/tabs/index.tsx","webpack://mattermost-webapp/./src/components/drafts/drafts.tsx","webpack://mattermost-webapp/./src/components/drafts/index.ts","webpack://mattermost-webapp/./src/components/widgets/header/header.tsx","webpack://mattermost-webapp/./src/utils/http_utils.ts"],"sourcesContent":["import generateUtilityClasses from '../generateUtilityClasses';\nimport generateUtilityClass from '../generateUtilityClass';\nexport function getBadgeUtilityClass(slot) {\n return generateUtilityClass('MuiBadge', slot);\n}\nconst badgeClasses = generateUtilityClasses('MuiBadge', ['root', 'badge', 'invisible']);\nexport default badgeClasses;","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nexport default function omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"elementType\", \"externalSlotProps\", \"ownerState\"];\nimport { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport appendOwnerState from './appendOwnerState';\nimport mergeSlotProps from './mergeSlotProps';\nimport resolveComponentProps from './resolveComponentProps';\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nexport default function useSlotProps(parameters) {\n var _parameters$additiona;\n const {\n elementType,\n externalSlotProps,\n ownerState\n } = parameters,\n rest = _objectWithoutPropertiesLoose(parameters, _excluded);\n const resolvedComponentsProps = resolveComponentProps(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = mergeSlotProps(_extends({}, rest, {\n externalSlotProps: resolvedComponentsProps\n }));\n const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref);\n const props = appendOwnerState(elementType, _extends({}, mergedProps, {\n ref\n }), ownerState);\n return props;\n}","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nexport default function resolveComponentProps(componentProps, ownerState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState);\n }\n return componentProps;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport clsx from 'clsx';\nimport extractEventHandlers from './extractEventHandlers';\nimport omitEventHandlers from './omitEventHandlers';\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nexport default function mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className, className, additionalProps == null ? void 0 : additionalProps.className);\n const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps));\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nexport default function extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport isHostComponent from './isHostComponent';\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nexport default function appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return _extends({}, otherProps, {\n ownerState: _extends({}, otherProps.ownerState, ownerState)\n });\n}","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nexport default function isHostComponent(element) {\n return typeof element === 'string';\n}","import * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst defaultContextValue = {\n disableDefaultClasses: false\n};\nconst ClassNameConfiguratorContext = /*#__PURE__*/React.createContext(defaultContextValue);\n/**\n * @ignore - internal hook.\n *\n * Wraps the `generateUtilityClass` function and controls how the classes are generated.\n * Currently it only affects whether the classes are applied or not.\n *\n * @returns Function to be called with the `generateUtilityClass` function specific to a component to generate the classes.\n */\nexport function useClassNamesOverride(generateUtilityClass) {\n const {\n disableDefaultClasses\n } = React.useContext(ClassNameConfiguratorContext);\n return slot => {\n if (disableDefaultClasses) {\n return '';\n }\n return generateUtilityClass(slot);\n };\n}\n\n/**\n * Allows to configure the components within to not apply any built-in classes.\n */\nexport default function ClassNameConfigurator(props) {\n const {\n disableDefaultClasses,\n children\n } = props;\n const contextValue = React.useMemo(() => ({\n disableDefaultClasses: disableDefaultClasses != null ? disableDefaultClasses : false\n }), [disableDefaultClasses]);\n return /*#__PURE__*/_jsx(ClassNameConfiguratorContext.Provider, {\n value: contextValue,\n children: children\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"badgeContent\", \"component\", \"children\", \"invisible\", \"max\", \"slotProps\", \"slots\", \"showZero\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '../composeClasses';\nimport useBadge from '../useBadge';\nimport { getBadgeUtilityClass } from './badgeClasses';\nimport { useSlotProps } from '../utils';\nimport { useClassNamesOverride } from '../utils/ClassNameConfigurator';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n invisible\n } = ownerState;\n const slots = {\n root: ['root'],\n badge: ['badge', invisible && 'invisible']\n };\n return composeClasses(slots, useClassNamesOverride(getBadgeUtilityClass));\n};\n/**\n *\n * Demos:\n *\n * - [Badge](https://mui.com/base/react-badge/)\n *\n * API:\n *\n * - [Badge API](https://mui.com/base/react-badge/components-api/#badge)\n */\nconst Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {\n const {\n component,\n children,\n max: maxProp = 99,\n slotProps = {},\n slots = {},\n showZero = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n badgeContent,\n max,\n displayValue,\n invisible\n } = useBadge(_extends({}, props, {\n max: maxProp\n }));\n const ownerState = _extends({}, props, {\n badgeContent,\n invisible,\n max,\n showZero\n });\n const classes = useUtilityClasses(ownerState);\n const Root = component || slots.root || 'span';\n const rootProps = useSlotProps({\n elementType: Root,\n externalSlotProps: slotProps.root,\n externalForwardedProps: other,\n additionalProps: {\n ref\n },\n ownerState,\n className: classes.root\n });\n const BadgeComponent = slots.badge || 'span';\n const badgeProps = useSlotProps({\n elementType: BadgeComponent,\n externalSlotProps: slotProps.badge,\n ownerState,\n className: classes.badge\n });\n return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {\n children: [children, /*#__PURE__*/_jsx(BadgeComponent, _extends({}, badgeProps, {\n children: displayValue\n }))]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Badge.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The content rendered within the badge.\n */\n badgeContent: PropTypes.node,\n /**\n * The badge will be added relative to this node.\n */\n children: PropTypes.node,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the badge is invisible.\n * @default false\n */\n invisible: PropTypes.bool,\n /**\n * Max count to show.\n * @default 99\n */\n max: PropTypes.number,\n /**\n * Controls whether the badge is hidden when `badgeContent` is zero.\n * @default false\n */\n showZero: PropTypes.bool,\n /**\n * The props used for each slot inside the Badge.\n * @default {}\n */\n slotProps: PropTypes.shape({\n badge: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Badge.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n badge: PropTypes.elementType,\n root: PropTypes.elementType\n })\n} : void 0;\nexport default Badge;","import { usePreviousProps } from '@mui/utils';\n/**\n *\n * Demos:\n *\n * - [Badge](https://mui.com/base/react-badge/#hook)\n *\n * API:\n *\n * - [useBadge API](https://mui.com/base/react-badge/hooks-api/#use-badge)\n */\nexport default function useBadge(parameters) {\n const {\n badgeContent: badgeContentProp,\n invisible: invisibleProp = false,\n max: maxProp = 99,\n showZero = false\n } = parameters;\n const prevProps = usePreviousProps({\n badgeContent: badgeContentProp,\n max: maxProp\n });\n let invisible = invisibleProp;\n if (invisibleProp === false && badgeContentProp === 0 && !showZero) {\n invisible = true;\n }\n const {\n badgeContent,\n max = maxProp\n } = invisible ? prevProps : parameters;\n const displayValue = badgeContent && Number(badgeContent) > max ? `${max}+` : badgeContent;\n return {\n badgeContent,\n invisible,\n max,\n displayValue\n };\n}","'use client';\n\nimport * as React from 'react';\nconst usePreviousProps = value => {\n const ref = React.useRef({});\n React.useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n};\nexport default usePreviousProps;","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport classNames from 'classnames';\nimport React from 'react';\n\nimport WithTooltip from 'components/with_tooltip';\n\nimport './action.scss';\n\ntype Props = {\n icon: string;\n id: string;\n name: string;\n onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;\n tooltipText: React.ReactElement | string;\n};\n\nfunction Action({\n name,\n icon,\n onClick,\n id,\n tooltipText,\n}: Props) {\n return (\n <div className='DraftAction'>\n <WithTooltip\n title={tooltipText}\n >\n <button\n className={classNames(\n 'DraftAction__button',\n {'DraftAction__button--delete': name === 'delete'},\n )}\n id={`draft_${icon}_${id}`}\n onClick={onClick}\n >\n <i\n className={classNames(\n 'icon',\n icon,\n )}\n />\n </button>\n </WithTooltip>\n </div>\n );\n}\n\nexport default Action;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport noop from 'lodash/noop';\nimport React, {useCallback, useState} from 'react';\nimport {FormattedMessage, useIntl} from 'react-intl';\n\nimport {GenericModal} from '@mattermost/components';\n\ntype Props = {\n channelDisplayName?: string;\n onConfirm: () => Promise<{error?: string}>;\n onExited: () => void;\n}\n\nexport default function DeleteScheduledPostModal({\n channelDisplayName,\n onExited,\n onConfirm,\n}: Props) {\n const {formatMessage} = useIntl();\n const [errorMessage, setErrorMessage] = useState<string>();\n\n const title = formatMessage({\n id: 'scheduled_post.delete_modal.title',\n defaultMessage: 'Delete scheduled post',\n });\n\n const confirmButtonText = formatMessage({\n id: 'drafts.confirm.delete.button',\n defaultMessage: 'Yes, delete',\n });\n\n const handleOnConfirm = useCallback(async () => {\n const response = await onConfirm();\n if (response.error) {\n setErrorMessage(response.error);\n } else {\n onExited();\n }\n }, [onConfirm, onExited]);\n\n return (\n <GenericModal\n className='delete_scheduled_post_modal'\n confirmButtonText={confirmButtonText}\n handleCancel={noop}\n handleConfirm={handleOnConfirm}\n modalHeaderText={title}\n onExited={onExited}\n compassDesign={true}\n isDeleteModal={true}\n autoFocusConfirmButton={true}\n autoCloseOnConfirmButton={false}\n errorText={errorMessage}\n >\n {\n channelDisplayName &&\n <FormattedMessage\n id={'scheduled_post.delete_modal.body'}\n defaultMessage={'Are you sure you want to delete this scheduled post to <strong>{displayName}</strong>?'}\n values={{\n strong: (chunk: string) => <strong>{chunk}</strong>,\n displayName: channelDisplayName,\n }}\n />\n }\n\n {\n !channelDisplayName &&\n <FormattedMessage\n id={'scheduled_post.delete_modal.body_no_channel'}\n defaultMessage={'Are you sure you want to delete this scheduled post?'}\n />\n }\n </GenericModal>\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 {FormattedMessage, useIntl} from 'react-intl';\n\nimport {GenericModal} from '@mattermost/components';\n\ntype Props = {\n displayName: string;\n onConfirm: () => void;\n onExited: () => void;\n}\n\nfunction SendDraftModal({\n displayName,\n onConfirm,\n onExited,\n}: Props) {\n const {formatMessage} = useIntl();\n\n const title = formatMessage({\n id: 'drafts.confirm.send.title',\n defaultMessage: 'Send message now',\n });\n\n const confirmButtonText = formatMessage({\n id: 'drafts.confirm.send.button',\n defaultMessage: 'Yes, send now',\n });\n\n const message = (\n <FormattedMessage\n id={'drafts.confirm.send.text'}\n defaultMessage={'Are you sure you want to send this message to <strong>{displayName}</strong>?'}\n values={{\n strong: (chunk: string) => <strong>{chunk}</strong>,\n displayName,\n }}\n />\n );\n\n return (\n <GenericModal\n confirmButtonText={confirmButtonText}\n handleCancel={() => {}}\n handleConfirm={onConfirm}\n modalHeaderText={title}\n onExited={onExited}\n compassDesign={true}\n >\n {message}\n </GenericModal>\n );\n}\n\nexport default SendDraftModal;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport moment from 'moment';\nimport React, {memo, useCallback, useEffect} from 'react';\nimport {FormattedMessage} from 'react-intl';\nimport {useDispatch, useSelector} from 'react-redux';\n\nimport type {Channel} from '@mattermost/types/channels';\nimport type {ScheduledPost} from '@mattermost/types/schedule_post';\n\nimport {fetchMissingChannels} from 'mattermost-redux/actions/channels';\nimport {isDeactivatedDirectChannel} from 'mattermost-redux/selectors/entities/channels';\nimport {getMyChannelMemberships} from 'mattermost-redux/selectors/entities/common';\nimport {getCurrentTimezone} from 'mattermost-redux/selectors/entities/timezone';\nimport {isCurrentUserSystemAdmin} from 'mattermost-redux/selectors/entities/users';\n\nimport {openModal} from 'actions/views/modals';\n\nimport ScheduledPostCustomTimeModal\n from 'components/advanced_text_editor/send_button/scheduled_post_custom_time_modal/scheduled_post_custom_time_modal';\nimport Action from 'components/drafts/draft_actions/action';\nimport DeleteScheduledPostModal\n from 'components/drafts/draft_actions/schedule_post_actions/delete_scheduled_post_modal';\nimport SendDraftModal from 'components/drafts/draft_actions/send_draft_modal';\n\nimport Constants, {ModalIdentifiers} from 'utils/constants';\n\nimport './style.scss';\nimport type {GlobalState} from 'types/store';\n\nconst deleteTooltipText = (\n <FormattedMessage\n id='scheduled_post.action.delete'\n defaultMessage='Delete scheduled post'\n />\n);\n\nconst editTooltipText = (\n <FormattedMessage\n id='scheduled_post.action.edit'\n defaultMessage='Edit scheduled post'\n />\n);\n\nconst rescheduleTooltipText = (\n <FormattedMessage\n id='scheduled_post.action.reschedule'\n defaultMessage='Reschedule post'\n />\n);\n\nconst sendNowTooltipText = (\n <FormattedMessage\n id='scheduled_post.action.send_now'\n defaultMessage='Send now'\n />\n);\n\nconst copyTextTooltipText = (\n <FormattedMessage\n id='scheduled_post.action.copy_text'\n defaultMessage='Copy text'\n />\n);\n\ntype Props = {\n scheduledPost: ScheduledPost;\n channel?: Channel;\n onReschedule: (timestamp: number) => Promise<{error?: string}>;\n onDelete: (scheduledPostId: string) => Promise<{error?: string}>;\n onSend: (scheduledPostId: string) => void;\n onEdit: () => void;\n onCopyText: () => void;\n}\n\nfunction ScheduledPostActions({scheduledPost, channel, onReschedule, onDelete, onSend, onEdit, onCopyText}: Props) {\n const dispatch = useDispatch();\n const userTimezone = useSelector(getCurrentTimezone);\n const myChannelsMemberships = useSelector((state: GlobalState) => getMyChannelMemberships(state));\n const isAdmin = useSelector((state: GlobalState) => isCurrentUserSystemAdmin(state));\n\n useEffect(() => {\n // this ensures the DM is loaded in redux store and is available\n // later when we check if the DM is with a deactivated user.\n if (channel?.type === Constants.DM_CHANNEL) {\n // fetchMissingChannels uses DataLoader which de-duplicates all requested data,\n // so even if we have multiple scheduled posts in a DM,\n // the data loader ensured we fetch that DM only once.\n dispatch(fetchMissingChannels([channel.id]));\n }\n }, [channel, dispatch]);\n\n const handleReschedulePost = useCallback(() => {\n const initialTime = moment.tz(scheduledPost.scheduled_at, userTimezone);\n\n dispatch(openModal({\n modalId: ModalIdentifiers.SCHEDULED_POST_CUSTOM_TIME_MODAL,\n dialogType: ScheduledPostCustomTimeModal,\n dialogProps: {\n channelId: scheduledPost.channel_id,\n onConfirm: onReschedule,\n initialTime,\n },\n }));\n }, [dispatch, onReschedule, scheduledPost.channel_id, scheduledPost.scheduled_at, userTimezone]);\n\n const handleDelete = useCallback(() => {\n dispatch(openModal({\n modalId: ModalIdentifiers.DELETE_DRAFT,\n dialogType: DeleteScheduledPostModal,\n dialogProps: {\n channelDisplayName: channel?.display_name,\n onConfirm: () => onDelete(scheduledPost.id),\n },\n }));\n }, [channel, dispatch, onDelete, scheduledPost.id]);\n\n const handleSend = useCallback(() => {\n if (!channel) {\n return;\n }\n\n dispatch(openModal({\n modalId: ModalIdentifiers.SEND_DRAFT,\n dialogType: SendDraftModal,\n dialogProps: {\n displayName: channel.display_name,\n onConfirm: () => onSend(scheduledPost.id),\n },\n }));\n }, [channel, dispatch, onSend, scheduledPost.id]);\n\n const userChannelMember = Boolean(channel && myChannelsMemberships[channel.id]);\n const isChannelArchived = Boolean(channel?.delete_at);\n\n const showEditOption = !scheduledPost.error_code && userChannelMember && !isChannelArchived;\n const isDeactivatedDM = useSelector((state: GlobalState) => isDeactivatedDirectChannel(state, scheduledPost.channel_id));\n const showSendNowOption = (!scheduledPost.error_code || scheduledPost.error_code === 'unknown' || scheduledPost.error_code === 'unable_to_send') && channel && !isChannelArchived && !isDeactivatedDM && userChannelMember;\n const showRescheduleOption = (!scheduledPost.error_code || scheduledPost.error_code === 'unknown' || scheduledPost.error_code === 'unable_to_send') && userChannelMember && !isChannelArchived;\n\n return (\n <div className='ScheduledPostActions'>\n <Action\n icon='icon-trash-can-outline'\n id='delete'\n name='delete'\n tooltipText={deleteTooltipText}\n onClick={handleDelete}\n />\n\n {\n (isAdmin || showEditOption) &&\n <Action\n icon='icon-pencil-outline'\n id='edit'\n name='edit'\n tooltipText={editTooltipText}\n onClick={onEdit}\n\n />\n }\n\n <Action\n icon='icon-content-copy'\n id='copy_text'\n name='copy_text'\n tooltipText={copyTextTooltipText}\n onClick={onCopyText}\n />\n\n {\n (isAdmin || showRescheduleOption) &&\n <Action\n icon='icon-clock-send-outline'\n id='reschedule'\n name='reschedule'\n tooltipText={rescheduleTooltipText}\n onClick={handleReschedulePost}\n />\n }\n\n {\n (isAdmin || showSendNowOption) &&\n <Action\n icon='icon-send-outline'\n id='sendNow'\n name='sendNow'\n tooltipText={sendNowTooltipText}\n onClick={handleSend}\n />\n }\n </div>\n );\n}\n\nexport default memo(ScheduledPostActions);\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 WithTooltip from 'components/with_tooltip';\n\ntype Props = {\n type: 'channel' | 'thread';\n}\n\nexport default function PlaceholderScheduledPostsTitle({type}: Props) {\n let title;\n\n const icon = (\n <i\n className='icon icon-pencil-outline'\n />\n );\n\n const tooltipText = (\n <FormattedMessage\n id='scheduled_posts.row_title_thread.placeholder_tooltip'\n defaultMessage={'The channel either doesn’t exist or you do not have access to it.'}\n />\n );\n\n if (type === 'thread') {\n title = (\n <FormattedMessage\n id='scheduled_posts.row_title_thread.placeholder'\n defaultMessage={'Thread to: {icon} No Destination'}\n values={{\n icon,\n }}\n />\n );\n } else {\n title = (\n <FormattedMessage\n id='scheduled_posts.row_title_channel.placeholder'\n defaultMessage={'In: {icon} No Destination'}\n values={{\n icon,\n }}\n />\n );\n }\n\n return (\n <WithTooltip\n title={tooltipText}\n >\n <div>\n {title}\n </div>\n </WithTooltip>\n );\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React, {memo} from 'react';\nimport {FormattedMessage} from 'react-intl';\nimport {useSelector} from 'react-redux';\n\nimport {Preferences} from 'mattermost-redux/constants';\nimport {getBool} from 'mattermost-redux/selectors/entities/preferences';\n\nimport {isMac} from 'utils/user_agent';\n\nimport type {GlobalState} from 'types/store';\n\ntype Props = {\n onSave: () => void;\n onCancel: () => void;\n}\n\nconst EditPostFooter = ({onSave, onCancel}: Props) => {\n const ctrlSend = useSelector((state: GlobalState) => getBool(state, Preferences.CATEGORY_ADVANCED_SETTINGS, 'send_on_ctrl_enter'));\n const ctrlSendKey = isMac() ? '⌘+' : 'CTRL+';\n\n return (\n <div className='post-body__footer'>\n <button\n onClick={onSave}\n className='save'\n >\n <FormattedMessage\n id='edit_post.action_buttons.save'\n defaultMessage='Save'\n />\n </button>\n <button\n onClick={onCancel}\n className='cancel'\n >\n <FormattedMessage\n id='edit_post.action_buttons.cancel'\n defaultMessage='Cancel'\n />\n </button>\n <FormattedMessage\n id='edit_post.helper_text'\n defaultMessage='<strong>{key}ENTER</strong> to Save, <strong>ESC</strong> to Cancel'\n values={{\n key: ctrlSend ? ctrlSendKey : '',\n strong: (x: string) => <strong>{x}</strong>,\n }}\n />\n </div>\n );\n};\n\nexport default memo(EditPostFooter);\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, useEffect, useRef, useState} from 'react';\nimport {useIntl} from 'react-intl';\nimport {useDispatch, useSelector} from 'react-redux';\n\nimport {EmoticonPlusOutlineIcon, InformationOutlineIcon} from '@mattermost/compass-icons/components';\nimport type {Emoji} from '@mattermost/types/emojis';\nimport type {Post} from '@mattermost/types/posts';\nimport type {ScheduledPost} from '@mattermost/types/schedule_post';\nimport {scheduledPostToPost} from '@mattermost/types/schedule_post';\n\nimport {getChannel} from 'mattermost-redux/selectors/entities/channels';\nimport type {ActionResult} from 'mattermost-redux/types/actions';\nimport {getEmojiName} from 'mattermost-redux/utils/emoji_utils';\n\nimport {openModal} from 'actions/views/modals';\nimport {getConnectionId} from 'selectors/general';\n\nimport DeletePostModal from 'components/delete_post_modal';\nimport DeleteScheduledPostModal\n from 'components/drafts/draft_actions/schedule_post_actions/delete_scheduled_post_modal';\nimport EmojiPickerOverlay from 'components/emoji_picker/emoji_picker_overlay';\nimport Textbox from 'components/textbox';\nimport type {TextboxClass, TextboxElement} from 'components/textbox';\n\nimport {AppEvents, Constants, ModalIdentifiers, StoragePrefixes} from 'utils/constants';\nimport * as Keyboard from 'utils/keyboard';\nimport type {ApplyMarkdownOptions} from 'utils/markdown/apply_markdown';\nimport {applyMarkdown} from 'utils/markdown/apply_markdown';\nimport {\n formatGithubCodePaste,\n formatMarkdownMessage,\n getHtmlTable,\n hasHtmlLink,\n isGitHubCodeBlock,\n} from 'utils/paste';\nimport {postMessageOnKeyPress, splitMessageBasedOnCaretPosition} from 'utils/post_utils';\nimport {allAtMentions} from 'utils/text_formatting';\nimport * as Utils from 'utils/utils';\n\nimport type {GlobalState} from 'types/store';\nimport type {PostDraft} from 'types/store/draft';\n\nimport EditPostFooter from './edit_post_footer';\n\nimport './style.scss';\n\nexport type Actions = {\n addMessageIntoHistory: (message: string) => void;\n editPost: (input: Partial<Post>) => Promise<Post>;\n setDraft: (name: string, value: PostDraft | null) => void;\n unsetEditingPost: () => void;\n scrollPostListToBottom: () => void;\n runMessageWillBeUpdatedHooks: (newPost: Partial<Post>, oldPost: Post) => Promise<ActionResult>;\n updateScheduledPost: (scheduledPost: ScheduledPost, connectionId: string) => Promise<ActionResult>;\n}\n\nexport type Props = {\n canEditPost?: boolean;\n canDeletePost?: boolean;\n readOnlyChannel?: boolean;\n teamId: string;\n channelId: string;\n codeBlockOnCtrlEnter: boolean;\n ctrlSend: boolean;\n draft: PostDraft;\n config: {\n EnableEmojiPicker?: string;\n EnableGifPicker?: string;\n };\n maxPostSize: number;\n useChannelMentions: boolean;\n editingPost: {\n post: Post | null;\n postId?: string;\n refocusId?: string;\n title?: string;\n isRHS?: boolean;\n };\n isRHSOpened: boolean;\n isEditHistoryShowing: boolean;\n actions: Actions;\n scheduledPost?: ScheduledPost;\n afterSave?: () => void;\n onCancel?: () => void;\n onDeleteScheduledPost?: () => Promise<{error?: string}>;\n};\n\nexport type State = {\n editText: string;\n selectionRange: {start: number; end: number};\n postError: React.ReactNode;\n errorClass: string | null;\n showEmojiPicker: boolean;\n renderScrollbar: boolean;\n scrollbarWidth: number;\n prevShowState: boolean;\n};\n\nconst {KeyCodes} = Constants;\n\nconst TOP_OFFSET = 0;\nconst RIGHT_OFFSET = 10;\n\nconst EditPost = ({editingPost, actions, canEditPost, config, channelId, draft, scheduledPost, afterSave, onCancel, onDeleteScheduledPost, ...rest}: Props): JSX.Element | null => {\n const connectionId = useSelector(getConnectionId);\n const channel = useSelector((state: GlobalState) => getChannel(state, channelId));\n\n const dispatch = useDispatch();\n\n const [editText, setEditText] = useState<string>(\n draft.message || editingPost?.post?.message_source || editingPost?.post?.message || scheduledPost?.message || '',\n );\n const [selectionRange, setSelectionRange] = useState<State['selectionRange']>({start: editText.length, end: editText.length});\n const caretPosition = useRef<number>(editText.length);\n const [postError, setPostError] = useState<React.ReactNode | null>(null);\n const [errorClass, setErrorClass] = useState<string>('');\n const [showEmojiPicker, setShowEmojiPicker] = useState<boolean>(false);\n const [renderScrollbar, setRenderScrollbar] = useState<boolean>(false);\n const [showMentionHelper, setShowMentionHelper] = useState<boolean>(false);\n\n const textboxRef = useRef<TextboxClass>(null);\n const emojiButtonRef = useRef<HTMLButtonElement>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n // using a ref here makes sure that the unmounting callback (saveDraft) is fired with the correct value.\n // If we would just use the editText value from the state it would be a stale since it is encapsuled in the\n // function closure on initial render\n const draftRef = useRef<PostDraft>(draft);\n const saveDraftFrame = useRef<number|null>();\n\n const id = scheduledPost ? scheduledPost.id : editingPost.postId;\n const draftStorageId = `${StoragePrefixes.EDIT_DRAFT}${id}`;\n\n const {formatMessage} = useIntl();\n\n const saveDraft = useCallback(() => {\n // to be run on unmount and only when there is an active saveDraftFrame timer\n if (saveDraftFrame.current && editingPost.postId) {\n actions.setDraft(draftStorageId, draftRef.current);\n clearTimeout(saveDraftFrame.current);\n saveDraftFrame.current = null;\n }\n }, [actions, draftStorageId, editingPost.postId]);\n\n useEffect(() => saveDraft, [saveDraft]);\n\n useEffect(() => {\n if (saveDraftFrame.current) {\n clearTimeout(saveDraftFrame.current);\n }\n\n saveDraftFrame.current = window.setTimeout(() => {\n actions.setDraft(draftStorageId, draftRef.current);\n }, Constants.SAVE_DRAFT_TIMEOUT);\n\n if (!scheduledPost) {\n const isMentions = allAtMentions(editText).length > 0;\n setShowMentionHelper(isMentions);\n }\n }, [actions, draftStorageId, editText, scheduledPost]);\n\n useEffect(() => {\n const focusTextBox = () => textboxRef?.current?.focus();\n\n document.addEventListener(AppEvents.FOCUS_EDIT_TEXTBOX, focusTextBox);\n return () => document.removeEventListener(AppEvents.FOCUS_EDIT_TEXTBOX, focusTextBox);\n }, []);\n\n useEffect(() => {\n if (selectionRange.start === selectionRange.end) {\n Utils.setCaretPosition(textboxRef.current?.getInputBox(), selectionRange.start);\n } else {\n Utils.setSelectionRange(textboxRef.current?.getInputBox(), selectionRange.start, selectionRange.end);\n }\n }, [selectionRange]);\n\n // just a helper so it's not always needed to update with setting both properties to the same value\n const setSelectionRangeByCaretPosition = (position: number) => setSelectionRange({start: position, end: position});\n\n const handleBlur = (e: React.FocusEvent<TextboxElement, Element>) => {\n const target = e.target as HTMLTextAreaElement;\n caretPosition.current = target.selectionEnd;\n };\n\n const handlePaste = useCallback((e: ClipboardEvent) => {\n const {clipboardData, target} = e;\n if (\n !clipboardData ||\n !clipboardData.items ||\n !canEditPost ||\n (target as HTMLTextAreaElement).id !== 'edit_textbox'\n ) {\n return;\n }\n\n const hasLinks = hasHtmlLink(clipboardData);\n const table = getHtmlTable(clipboardData);\n if (!table && !hasLinks) {\n return;\n }\n\n e.preventDefault();\n\n let message = editText;\n let newCaretPosition = selectionRange.start;\n\n if (table && isGitHubCodeBlock(table.className)) {\n const {formattedMessage, formattedCodeBlock} = formatGithubCodePaste({selectionStart: (target as any).selectionStart, selectionEnd: (target as any).selectionEnd, message, clipboardData});\n message = formattedMessage;\n newCaretPosition = selectionRange.start + formattedCodeBlock.length;\n } else {\n message = formatMarkdownMessage(clipboardData, editText.trim(), newCaretPosition).formattedMessage;\n newCaretPosition = message.length - (editText.length - newCaretPosition);\n }\n\n setEditText(message);\n setSelectionRangeByCaretPosition(newCaretPosition);\n }, [canEditPost, selectionRange, editText]);\n\n const isSaveDisabled = () => {\n const {post} = editingPost;\n const hasAttachments = post && post.file_ids && post.file_ids.length > 0;\n\n if (hasAttachments) {\n return !canEditPost;\n }\n\n if (editText.trim() !== '') {\n return !canEditPost;\n }\n\n return !rest.canDeletePost;\n };\n\n const applyHotkeyMarkdown = (params: ApplyMarkdownOptions) => {\n if (params.selectionStart === null || params.selectionEnd === null) {\n return;\n }\n\n const res = applyMarkdown(params);\n\n setEditText(res.message);\n setSelectionRange({start: res.selectionStart, end: res.selectionEnd});\n };\n\n const handleRefocusAndExit = (refocusId: string|null) => {\n if (refocusId) {\n const element = document.getElementById(refocusId);\n element?.focus();\n }\n\n actions.unsetEditingPost();\n };\n\n const handleAutomatedRefocusAndExit = () => {\n draftRef.current = {\n ...draftRef.current,\n message: '',\n };\n handleRefocusAndExit(editingPost.refocusId || null);\n };\n\n const handleEdit = async () => {\n if (scheduledPost) {\n await handleEditScheduledPost();\n return;\n }\n\n if (!editingPost.post || isSaveDisabled()) {\n return;\n }\n\n let updatedPost = {\n message: editText,\n id: editingPost.postId,\n channel_id: editingPost.post.channel_id,\n };\n\n const hookResult = await actions.runMessageWillBeUpdatedHooks(updatedPost, editingPost.post);\n if (hookResult.error && hookResult.error.message) {\n setPostError(<>{hookResult.error.message}</>);\n return;\n }\n\n updatedPost = hookResult.data;\n\n if (postError) {\n setErrorClass('animation--highlight');\n setTimeout(() => setErrorClass(''), Constants.ANIMATION_TIMEOUT);\n return;\n }\n\n if (updatedPost.message === (editingPost.post?.message_source || editingPost.post?.message)) {\n handleAutomatedRefocusAndExit();\n return;\n }\n\n const hasAttachment = Boolean(\n editingPost.post?.file_ids && editingPost.post?.file_ids.length > 0,\n );\n if (updatedPost.message.trim().length === 0 && !hasAttachment) {\n handleRefocusAndExit(null);\n\n const deletePostModalData = {\n modalId: ModalIdentifiers.DELETE_POST,\n dialogType: DeletePostModal,\n dialogProps: {\n post: editingPost.post,\n isRHS: editingPost.isRHS,\n },\n };\n\n dispatch(openModal(deletePostModalData));\n return;\n }\n\n await actions.editPost(updatedPost as Post);\n\n handleAutomatedRefocusAndExit();\n afterSave?.();\n };\n\n const handleCancel = useCallback(() => {\n onCancel?.();\n handleAutomatedRefocusAndExit();\n }, [onCancel, handleAutomatedRefocusAndExit]);\n\n const handleEditScheduledPost = useCallback(async () => {\n if (!scheduledPost || isSaveDisabled() || !channel || !onDeleteScheduledPost) {\n return;\n }\n\n const post = scheduledPostToPost(scheduledPost);\n\n let updatedPost = {\n message: editText,\n id: scheduledPost.id,\n channel_id: scheduledPost?.channel_id,\n };\n\n const hookResult = await actions.runMessageWillBeUpdatedHooks(updatedPost, post);\n if (hookResult.error && hookResult.error.message) {\n setPostError(<>{hookResult.error.message}</>);\n return;\n }\n\n updatedPost = hookResult.data;\n\n if (postError) {\n setErrorClass('animation--highlight');\n setTimeout(() => setErrorClass(''), Constants.ANIMATION_TIMEOUT);\n return;\n }\n\n if (updatedPost.message === post.message) {\n handleAutomatedRefocusAndExit();\n return;\n }\n\n const hasAttachment = Boolean(\n scheduledPost.file_ids && scheduledPost.file_ids.length > 0,\n );\n if (updatedPost.message.trim().length === 0 && !hasAttachment) {\n handleRefocusAndExit(null);\n\n const deleteScheduledPostModalData = {\n modalId: ModalIdentifiers.DELETE_DRAFT,\n dialogType: DeleteScheduledPostModal,\n dialogProps: {\n channelDisplayName: channel.display_name,\n onConfirm: onDeleteScheduledPost,\n },\n };\n\n dispatch(openModal(deleteScheduledPostModalData));\n return;\n }\n\n const updatedScheduledPost = {\n ...scheduledPost,\n message: updatedPost.message,\n };\n\n const response = await actions.updateScheduledPost(updatedScheduledPost, connectionId);\n if (response.error) {\n setPostError(response.error.message);\n } else {\n handleAutomatedRefocusAndExit();\n afterSave?.();\n }\n }, [\n actions,\n connectionId,\n editText,\n handleAutomatedRefocusAndExit,\n handleRefocusAndExit,\n isSaveDisabled,\n postError,\n scheduledPost,\n afterSave,\n channel,\n onDeleteScheduledPost,\n ]);\n\n const handleEditKeyPress = (e: React.KeyboardEvent) => {\n const {ctrlSend, codeBlockOnCtrlEnter} = rest;\n const inputBox = textboxRef.current?.getInputBox();\n\n const {allowSending, ignoreKeyPress} = postMessageOnKeyPress(\n e,\n editText,\n ctrlSend,\n codeBlockOnCtrlEnter,\n Date.now(),\n 0,\n inputBox.selectionStart,\n );\n\n if (ignoreKeyPress) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n if (allowSending && textboxRef.current) {\n e.preventDefault();\n textboxRef.current.blur();\n handleEdit();\n }\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<TextboxElement>) => {\n const {ctrlSend, codeBlockOnCtrlEnter} = rest;\n\n const ctrlOrMetaKeyPressed = e.ctrlKey || e.metaKey;\n const ctrlKeyCombo = Keyboard.cmdOrCtrlPressed(e) && !e.altKey && !e.shiftKey;\n const ctrlAltCombo = Keyboard.cmdOrCtrlPressed(e, true) && e.altKey;\n const ctrlEnterKeyCombo =\n (ctrlSend || codeBlockOnCtrlEnter) &&\n Keyboard.isKeyPressed(e, KeyCodes.ENTER) &&\n ctrlOrMetaKeyPressed;\n const markdownLinkKey = Keyboard.isKeyPressed(e, KeyCodes.K);\n const ctrlShiftCombo = Keyboard.cmdOrCtrlPressed(e, true) && e.shiftKey;\n const lastMessageReactionKeyCombo = ctrlShiftCombo && Keyboard.isKeyPressed(e, KeyCodes.BACK_SLASH);\n\n // listen for line break key combo and insert new line character\n if (Utils.isUnhandledLineBreakKeyCombo(e)) {\n e.stopPropagation(); // perhaps this should happen in all of these cases? or perhaps Modal should not be listening?\n setEditText(Utils.insertLineBreakFromKeyEvent(e.nativeEvent));\n } else if (ctrlEnterKeyCombo) {\n handleEdit();\n } else if (Keyboard.isKeyPressed(e, KeyCodes.ESCAPE) && !showEmojiPicker) {\n onCancel?.();\n handleAutomatedRefocusAndExit();\n } else if (ctrlAltCombo && markdownLinkKey) {\n applyHotkeyMarkdown({\n markdownMode: 'link',\n selectionStart: e.currentTarget.selectionStart,\n selectionEnd: e.currentTarget.selectionEnd,\n message: e.currentTarget.value,\n });\n } else if (ctrlKeyCombo && Keyboard.isKeyPressed(e, KeyCodes.B)) {\n applyHotkeyMarkdown({\n markdownMode: 'bold',\n selectionStart: e.currentTarget.selectionStart,\n selectionEnd: e.currentTarget.selectionEnd,\n message: e.currentTarget.value,\n });\n } else if (ctrlKeyCombo && Keyboard.isKeyPressed(e, KeyCodes.I)) {\n applyHotkeyMarkdown({\n markdownMode: 'italic',\n selectionStart: e.currentTarget.selectionStart,\n selectionEnd: e.currentTarget.selectionEnd,\n message: e.currentTarget.value,\n });\n } else if (lastMessageReactionKeyCombo) {\n // Stop document from handling the hotkey and opening the reaction\n e.stopPropagation();\n e.preventDefault();\n }\n };\n\n const handleChange = (e: React.ChangeEvent<TextboxElement>) => {\n const message = e.target.value;\n\n draftRef.current = {\n ...draftRef.current,\n message,\n };\n\n setEditText(message);\n };\n\n const handleHeightChange = (height: number, maxHeight: number) => setRenderScrollbar(height > maxHeight);\n\n const handlePostError = (_postError: React.ReactNode) => {\n if (_postError !== postError) {\n setPostError(_postError);\n }\n };\n\n const hideEmojiPicker = () => {\n setShowEmojiPicker(false);\n textboxRef.current?.focus();\n };\n\n const handleEmojiClick = (emoji?: Emoji) => {\n if (!emoji) {\n return;\n }\n\n const emojiAlias = getEmojiName(emoji);\n if (!emojiAlias) {\n //Oops.. There went something wrong\n return;\n }\n\n let newMessage = `:${emojiAlias}: `;\n let newCaretPosition = newMessage.length;\n\n if (editText.length > 0) {\n const {firstPiece, lastPiece} = splitMessageBasedOnCaretPosition(\n caretPosition.current,\n editText,\n );\n\n // check whether the first piece of the message is empty when cursor\n // is placed at beginning of message and avoid adding an empty string at the beginning of the message\n newMessage = firstPiece === '' ? `:${emojiAlias}: ${lastPiece}` : `${firstPiece} :${emojiAlias}: ${lastPiece}`;\n newCaretPosition = firstPiece === '' ? `:${emojiAlias}: `.length : `${firstPiece} :${emojiAlias}: `.length;\n }\n\n draftRef.current = {\n ...draftRef.current,\n message: newMessage,\n };\n\n setEditText(newMessage);\n setSelectionRangeByCaretPosition(newCaretPosition);\n setShowEmojiPicker(false);\n textboxRef.current?.focus();\n };\n\n const handleGifClick = (gif: string) => {\n let newMessage = gif;\n\n if (editText.length > 0) {\n newMessage = (/\\s+$/).test(editText) ? `${editText}${gif}` : `${editText} ${gif}`;\n }\n\n draftRef.current = {\n ...draftRef.current,\n message: newMessage,\n };\n\n setEditText(newMessage);\n setShowEmojiPicker(false);\n textboxRef.current?.focus();\n };\n\n const toggleEmojiPicker = (e?: React.MouseEvent<HTMLButtonElement, MouseEvent>): void => {\n e?.stopPropagation();\n setShowEmojiPicker(!showEmojiPicker);\n if (showEmojiPicker) {\n textboxRef.current?.focus();\n }\n };\n\n const getEmojiTargetRef = useCallback(() => emojiButtonRef.current, [emojiButtonRef]);\n\n let emojiPicker = null;\n\n if (config.EnableEmojiPicker === 'true') {\n emojiPicker = (\n <>\n <EmojiPickerOverlay\n show={showEmojiPicker}\n target={getEmojiTargetRef}\n onHide={hideEmojiPicker}\n onEmojiClick={handleEmojiClick}\n onGifClick={handleGifClick}\n enableGifPicker={config.EnableGifPicker === 'true'}\n topOffset={TOP_OFFSET}\n rightOffset={RIGHT_OFFSET}\n />\n <button\n aria-label={formatMessage({id: 'emoji_picker.emojiPicker.button.ariaLabel', defaultMessage: 'select an emoji'})}\n id='editPostEmoji'\n ref={emojiButtonRef}\n className='style--none post-action'\n onClick={toggleEmojiPicker}\n >\n <EmoticonPlusOutlineIcon\n size={18}\n color='currentColor'\n />\n </button>\n </>\n );\n }\n\n let rootId = '';\n if (editingPost.post) {\n rootId = editingPost.post.root_id || editingPost.post.id;\n }\n\n return (\n <div\n className={classNames('post--editing__wrapper', {\n scroll: renderScrollbar,\n })}\n ref={wrapperRef}\n >\n <Textbox\n tabIndex={0}\n rootId={rootId}\n onChange={handleChange}\n onKeyPress={handleEditKeyPress}\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n onHeightChange={handleHeightChange}\n handlePostError={handlePostError}\n onPaste={handlePaste}\n value={editText}\n channelId={channelId}\n emojiEnabled={config.EnableEmojiPicker === 'true'}\n createMessage={formatMessage({id: 'edit_post.editPost', defaultMessage: 'Edit the post...'})}\n supportsCommands={false}\n suggestionListPosition='bottom'\n id='edit_textbox'\n ref={textboxRef}\n characterLimit={rest.maxPostSize}\n useChannelMentions={rest.useChannelMentions}\n />\n <div className='post-body__actions'>\n {emojiPicker}\n </div>\n { showMentionHelper ? (\n <div className='post-body__info'>\n <span className='post-body__info__icon'>\n <InformationOutlineIcon\n size={14}\n color='currentColor'\n />\n </span>\n <span>{\n formatMessage({\n id: 'edit_post.no_notification_trigger_on_mention',\n defaultMessage: \"Editing this message with an '@mention' will not notify the recipient.\",\n })\n }</span>\n </div>) : null\n }\n <EditPostFooter\n onSave={handleEdit}\n onCancel={handleCancel}\n />\n {postError && (\n <div className={classNames('edit-post-footer', {'has-error': postError})}>\n <label className={classNames('post-error', errorClass)}>{postError}</label>\n </div>\n )}\n </div>\n );\n};\n\nexport default EditPost;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {connect} from 'react-redux';\nimport {bindActionCreators} from 'redux';\nimport type {Dispatch} from 'redux';\n\nimport type {ScheduledPost} from '@mattermost/types/schedule_post';\n\nimport {addMessageIntoHistory} from 'mattermost-redux/actions/posts';\nimport {updateScheduledPost} from 'mattermost-redux/actions/scheduled_posts';\nimport {Preferences, Permissions} from 'mattermost-redux/constants';\nimport {getChannel} from 'mattermost-redux/selectors/entities/channels';\nimport {getConfig} from 'mattermost-redux/selectors/entities/general';\nimport {getBool} from 'mattermost-redux/selectors/entities/preferences';\nimport {haveIChannelPermission} from 'mattermost-redux/selectors/entities/roles';\nimport {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';\nimport {getCurrentUserId, isCurrentUserSystemAdmin} from 'mattermost-redux/selectors/entities/users';\n\nimport {runMessageWillBeUpdatedHooks} from 'actions/hooks';\nimport {unsetEditingPost} from 'actions/post_actions';\nimport {setGlobalItem} from 'actions/storage';\nimport {scrollPostListToBottom} from 'actions/views/channel';\nimport {editPost} from 'actions/views/posts';\nimport {getEditingPostDetailsAndPost} from 'selectors/posts';\nimport {getIsRhsOpen, getPostDraft, getRhsState} from 'selectors/rhs';\n\nimport Constants, {RHSStates, StoragePrefixes} from 'utils/constants';\n\nimport type {GlobalState} from 'types/store';\n\nimport EditPost from './edit_post';\n\ntype Props = {\n scheduledPost?: ScheduledPost;\n}\n\nfunction mapStateToProps(state: GlobalState, props: Props) {\n const config = getConfig(state);\n const currentUserId = getCurrentUserId(state);\n\n let editingPost;\n let channelId: string;\n let draft;\n let isAuthor;\n\n if (props.scheduledPost) {\n editingPost = {post: null};\n channelId = props.scheduledPost.channel_id;\n draft = getPostDraft(state, StoragePrefixes.EDIT_DRAFT, props.scheduledPost.id);\n isAuthor = true;\n } else {\n editingPost = getEditingPostDetailsAndPost(state);\n channelId = editingPost.post.channel_id;\n draft = getPostDraft(state, StoragePrefixes.EDIT_DRAFT, editingPost.postId);\n isAuthor = editingPost?.post?.user_id === currentUserId;\n }\n\n const teamId = getCurrentTeamId(state);\n const deletePermission = isAuthor ? Permissions.DELETE_POST : Permissions.DELETE_OTHERS_POSTS;\n const editPermission = isAuthor ? Permissions.EDIT_POST : Permissions.EDIT_OTHERS_POSTS;\n\n const channel = getChannel(state, channelId);\n const useChannelMentions = haveIChannelPermission(state, teamId, channelId, Permissions.USE_CHANNEL_MENTIONS);\n\n const canEdit = haveIChannelPermission(state, teamId, channelId, editPermission);\n\n return {\n canEditPost: canEdit,\n canDeletePost: haveIChannelPermission(state, teamId, channelId, deletePermission),\n codeBlockOnCtrlEnter: getBool(state, Preferences.CATEGORY_ADVANCED_SETTINGS, 'code_block_ctrl_enter', true),\n ctrlSend: getBool(state, Preferences.CATEGORY_ADVANCED_SETTINGS, 'send_on_ctrl_enter'),\n draft,\n config,\n editingPost,\n teamId,\n channelId,\n maxPostSize: parseInt(config.MaxPostSize || '0', 10) || Constants.DEFAULT_CHARACTER_LIMIT,\n readOnlyChannel: !isCurrentUserSystemAdmin(state) && channel?.name === Constants.DEFAULT_CHANNEL,\n useChannelMentions,\n isRHSOpened: getIsRhsOpen(state),\n isEditHistoryShowing: getRhsState(state) === RHSStates.EDIT_HISTORY,\n scheduledPost: props.scheduledPost,\n };\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return {\n actions: bindActionCreators({\n scrollPostListToBottom,\n addMessageIntoHistory,\n editPost,\n setDraft: setGlobalItem,\n unsetEditingPost,\n runMessageWillBeUpdatedHooks,\n updateScheduledPost,\n }, dispatch),\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(EditPost);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport noop from 'lodash/noop';\nimport React from 'react';\nimport {FormattedMessage, useIntl} from 'react-intl';\n\nimport {GenericModal} from '@mattermost/components';\n\ntype Props = {\n displayName: string;\n onConfirm: () => void;\n onExited: () => void;\n}\n\nfunction DeleteDraftModal({\n displayName,\n onExited,\n onConfirm,\n}: Props) {\n const {formatMessage} = useIntl();\n\n const title = formatMessage({\n id: 'drafts.confirm.delete.title',\n defaultMessage: 'Delete draft',\n });\n\n const confirmButtonText = formatMessage({\n id: 'drafts.confirm.delete.button',\n defaultMessage: 'Yes, delete',\n });\n\n const message = (\n <FormattedMessage\n id={'drafts.confirm.delete.text'}\n defaultMessage={'Are you sure you want to delete this draft to <strong>{displayName}</strong>?'}\n values={{\n strong: (chunk: string) => <strong>{chunk}</strong>,\n displayName,\n }}\n />\n );\n\n return (\n <GenericModal\n confirmButtonText={confirmButtonText}\n handleCancel={noop}\n handleConfirm={onConfirm}\n modalHeaderText={title}\n onExited={onExited}\n compassDesign={true}\n isDeleteModal={true}\n autoFocusConfirmButton={true}\n >\n {message}\n </GenericModal>\n );\n}\n\nexport default DeleteDraftModal;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React, {memo, useCallback} from 'react';\nimport {FormattedMessage} from 'react-intl';\nimport {useDispatch} from 'react-redux';\n\nimport {openModal} from 'actions/views/modals';\n\nimport ScheduledPostCustomTimeModal\n from 'components/advanced_text_editor/send_button/scheduled_post_custom_time_modal/scheduled_post_custom_time_modal';\n\nimport {ModalIdentifiers} from 'utils/constants';\n\nimport Action from './action';\nimport DeleteDraftModal from './delete_draft_modal';\nimport SendDraftModal from './send_draft_modal';\n\nconst scheduledDraft = (\n <FormattedMessage\n id='drafts.actions.scheduled'\n defaultMessage='Schedule draft'\n />\n);\n\ntype Props = {\n displayName: string;\n onDelete: () => void;\n onEdit: () => void;\n onSend: () => void;\n canEdit: boolean;\n canSend: boolean;\n onSchedule: (timestamp: number) => Promise<{error?: string}>;\n channelId: string;\n}\n\nfunction DraftActions({\n displayName,\n onDelete,\n onEdit,\n onSend,\n canEdit,\n canSend,\n onSchedule,\n channelId,\n}: Props) {\n const dispatch = useDispatch();\n\n const handleDelete = useCallback(() => {\n dispatch(openModal({\n modalId: ModalIdentifiers.DELETE_DRAFT,\n dialogType: DeleteDraftModal,\n dialogProps: {\n displayName,\n onConfirm: onDelete,\n },\n }));\n }, [dispatch, displayName, onDelete]);\n\n const handleSend = useCallback(() => {\n dispatch(openModal({\n modalId: ModalIdentifiers.SEND_DRAFT,\n dialogType: SendDraftModal,\n dialogProps: {\n displayName,\n onConfirm: onSend,\n },\n }));\n }, [dispatch, displayName, onSend]);\n\n const handleScheduleDraft = useCallback(() => {\n dispatch(openModal({\n modalId: ModalIdentifiers.SCHEDULED_POST_CUSTOM_TIME_MODAL,\n dialogType: ScheduledPostCustomTimeModal,\n dialogProps: {\n channelId,\n onConfirm: onSchedule,\n },\n }));\n }, [channelId, dispatch, onSchedule]);\n\n return (\n <>\n <Action\n icon='icon-trash-can-outline'\n id='delete'\n name='delete'\n tooltipText={(\n <FormattedMessage\n id='drafts.actions.delete'\n defaultMessage='Delete draft'\n />\n )}\n onClick={handleDelete}\n />\n {canEdit && (\n <Action\n icon='icon-pencil-outline'\n id='edit'\n name='edit'\n tooltipText={(\n <FormattedMessage\n id='drafts.actions.edit'\n defaultMessage='Edit draft'\n />\n )}\n onClick={onEdit}\n />\n )}\n\n {\n canSend &&\n <Action\n icon='icon-clock-send-outline'\n id='reschedule'\n name='reschedule'\n tooltipText={scheduledDraft}\n onClick={handleScheduleDraft}\n />\n }\n\n {canSend && (\n <Action\n icon='icon-send-outline'\n id='send'\n name='send'\n tooltipText={(\n <FormattedMessage\n id='drafts.actions.send'\n defaultMessage='Send draft'\n />\n )}\n onClick={handleSend}\n />\n )}\n </>\n );\n}\n\nexport default memo(DraftActions);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {connect} from 'react-redux';\n\nimport type {Channel} from '@mattermost/types/channels';\n\nimport {getTeammateNameDisplaySetting} from 'mattermost-redux/selectors/entities/preferences';\nimport {getUser} from 'mattermost-redux/selectors/entities/users';\nimport {getUserIdFromChannelName} from 'mattermost-redux/utils/channel_utils';\nimport {displayUsername} from 'mattermost-redux/utils/user_utils';\n\nimport {Constants} from 'utils/constants';\n\nimport type {GlobalState} from 'types/store';\n\nimport DraftActions from './draft_actions';\n\ntype OwnProps = {\n channelDisplayName: Channel['display_name'];\n channelType: Channel['type'];\n channelName: Channel['name'];\n userId: string;\n}\n\nfunction mapStateToProps(state: GlobalState, ownProps: OwnProps) {\n const {channelDisplayName, userId, channelName, channelType} = ownProps;\n\n let displayName = channelDisplayName;\n let teammateId;\n let teammate;\n\n if (channelType === Constants.DM_CHANNEL) {\n teammateId = getUserIdFromChannelName(userId, channelName);\n teammate = getUser(state, teammateId);\n displayName = displayUsername(teammate, getTeammateNameDisplaySetting(state));\n }\n\n return {\n displayName,\n };\n}\n\nexport default connect(mapStateToProps)(DraftActions);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React, {memo, useEffect} from 'react';\nimport {FormattedMessage} from 'react-intl';\nimport {useDispatch} from 'react-redux';\n\nimport type {Channel} from '@mattermost/types/channels';\nimport type {UserProfile} from '@mattermost/types/users';\n\nimport {batchGetProfilesInChannel, getMissingProfilesByIds} from 'mattermost-redux/actions/users';\n\nimport Avatar from 'components/widgets/users/avatar';\n\nimport {Constants} from 'utils/constants';\nimport {imageURLForUser} from 'utils/utils';\n\nimport './draft_title.scss';\n\ntype Props = {\n channel: Channel;\n membersCount?: number;\n selfDraft: boolean;\n teammate?: UserProfile;\n teammateId?: string;\n type: 'channel' | 'thread';\n}\n\nfunction DraftTitle({\n channel,\n membersCount,\n selfDraft,\n teammate,\n teammateId,\n type,\n}: Props) {\n const dispatch = useDispatch();\n\n useEffect(() => {\n if (!teammate?.id && teammateId) {\n dispatch(getMissingProfilesByIds([teammateId]));\n }\n }, [teammate?.id, teammateId]);\n\n useEffect(() => {\n // if you have a scheduled post in a GM and you closed that GM,\n // we don't fetch that GM's members by default. This causes the number of GM members\n // in scheduled posts row header to show up as '0'. To fix this,\n // we check if the channel is a GM and member count is 0 (could will at least be 1 as the current user\n // is always a member) and if so, fetch the GM members.\n // The action uses a data loader so it is safe to call do this for multiple\n // scheduled posts for the same GM without causing any duplicate API calls.\n if (channel.type === Constants.GM_CHANNEL && !membersCount) {\n dispatch(batchGetProfilesInChannel(channel.id));\n }\n }, [channel.id, channel.type, dispatch, membersCount]);\n\n let you = null;\n let title = null;\n\n if (selfDraft) {\n you = (\n <>\n \n <FormattedMessage\n id='drafts.draft_title.you'\n defaultMessage={'(you)'}\n />\n </>\n );\n }\n\n let icon = <i className='icon icon-globe'/>;\n\n if (channel.type === Constants.PRIVATE_CHANNEL) {\n icon = <i className='icon icon-lock-outline'/>;\n }\n\n if (channel.type === Constants.DM_CHANNEL && teammate) {\n icon = (\n <Avatar\n size='xs'\n username={teammate.username}\n url={imageURLForUser(teammate.id, teammate.last_picture_update)}\n className='DraftTitle__avatar'\n />\n );\n }\n\n if (channel.type === Constants.GM_CHANNEL) {\n icon = (\n <div className='DraftTitle__group-icon'>\n {membersCount}\n </div>\n );\n }\n\n if (type === 'thread') {\n if (\n channel.type !== Constants.GM_CHANNEL &&\n channel.type !== Constants.DM_CHANNEL\n ) {\n title = (\n <FormattedMessage\n id='drafts.draft_title.channel_thread'\n defaultMessage={'Thread in: {icon} <span>{channelName}</span>'}\n values={{\n icon,\n channelName: channel.display_name,\n span: (chunks: React.ReactNode) => (<span>{chunks}</span>),\n }}\n />\n );\n } else {\n title = (\n <FormattedMessage\n id='drafts.draft_title.direct_thread'\n defaultMessage={'Thread to: {icon} <span>{channelName}</span>'}\n values={{\n icon,\n channelName: channel.display_name,\n span: (chunks: React.ReactNode) => (<span>{chunks}</span>),\n }}\n />\n );\n }\n } else if (\n channel.type !== Constants.GM_CHANNEL &&\n channel.type !== Constants.DM_CHANNEL\n ) {\n title = (\n <FormattedMessage\n id='drafts.draft_title.channel'\n defaultMessage={'In: {icon} <span>{channelName}</span>'}\n values={{\n icon,\n channelName: channel.display_name,\n span: (chunks: React.ReactNode) => (<span>{chunks}</span>),\n }}\n />\n );\n } else {\n title = (\n <FormattedMessage\n id='drafts.draft_title.direct_channel'\n defaultMessage={'To: {icon} <span>{channelName}</span>'}\n values={{\n icon,\n channelName: channel.display_name,\n span: (chunks: React.ReactNode) => (<span>{chunks}</span>),\n }}\n />\n );\n }\n\n return (\n <>\n {title}\n {you}\n </>\n );\n}\n\nexport default memo(DraftTitle);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {connect} from 'react-redux';\n\nimport type {Channel} from '@mattermost/types/channels';\n\nimport {makeGetGmChannelMemberCount} from 'mattermost-redux/selectors/entities/channels';\nimport {getUser} from 'mattermost-redux/selectors/entities/users';\nimport {getUserIdFromChannelName} from 'mattermost-redux/utils/channel_utils';\n\nimport {Constants} from 'utils/constants';\n\nimport type {GlobalState} from 'types/store';\n\nimport DraftTitle from './draft_title';\n\ntype OwnProps = {\n channel: Channel;\n userId: string;\n};\n\nfunction makeMapStateToProps() {\n const getMemberCount = makeGetGmChannelMemberCount();\n return (state: GlobalState, ownProps: OwnProps) => {\n const {channel, userId} = ownProps;\n\n let teammateId;\n let teammate;\n let membersCount;\n\n if (channel.type === Constants.GM_CHANNEL) {\n membersCount = getMemberCount(state, channel);\n }\n\n if (channel.type === Constants.DM_CHANNEL) {\n teammateId = getUserIdFromChannelName(userId, channel.name);\n teammate = getUser(state, teammateId);\n }\n\n return {\n channel,\n membersCount,\n selfDraft: teammateId === userId,\n teammate,\n teammateId,\n };\n };\n}\n\nexport default connect(makeMapStateToProps)(DraftTitle);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport classNames from 'classnames';\nimport React, {memo, useState} from 'react';\n\nimport {makeIsEligibleForClick} from 'utils/utils';\n\nimport './panel.scss';\n\ntype Props = {\n children: ({hover}: {hover: boolean}) => React.ReactNode;\n onClick: () => void;\n hasError: boolean;\n innerRef?: React.Ref<HTMLElement>;\n isHighlighted?: boolean;\n};\n\nconst isEligibleForClick = makeIsEligibleForClick('.hljs, code');\n\nfunction Panel({\n children,\n onClick,\n hasError,\n innerRef,\n isHighlighted,\n}: Props) {\n const [hover, setHover] = useState(false);\n\n const handleMouseOver = () => {\n setHover(true);\n };\n\n const handleMouseLeave = () => {\n setHover(false);\n };\n\n const handleOnClick = (e: React.MouseEvent<HTMLElement>) => {\n if (isEligibleForClick(e)) {\n onClick();\n }\n };\n\n return (\n <article\n className={classNames(\n 'Panel',\n {\n draftError: hasError,\n highlighted: isHighlighted,\n },\n )}\n onMouseOver={handleMouseOver}\n onClick={handleOnClick}\n onMouseLeave={handleMouseLeave}\n role='button'\n ref={innerRef}\n >\n {children({hover})}\n </article>\n );\n}\n\nexport default memo(Panel);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React, {useCallback} from 'react';\nimport {useSelector} from 'react-redux';\n\nimport type {PostPriorityMetadata} from '@mattermost/types/posts';\nimport type {UserProfile, UserStatus} from '@mattermost/types/users';\n\nimport {getCurrentRelativeTeamUrl} from 'mattermost-redux/selectors/entities/teams';\n\nimport PriorityLabels from 'components/advanced_text_editor/priority_labels';\nimport FilePreview from 'components/file_preview';\nimport Markdown from 'components/markdown';\nimport ShowMore from 'components/post_view/show_more';\nimport ProfilePicture from 'components/profile_picture';\n\nimport {imageURLForUser, handleFormattedTextClick} from 'utils/utils';\n\nimport type {PostDraft} from 'types/store/draft';\n\nimport './panel_body.scss';\n\ntype Props = {\n channelId?: string;\n displayName: string;\n fileInfos: PostDraft['fileInfos'];\n message: string;\n priority?: PostPriorityMetadata;\n status: UserStatus['status'];\n uploadsInProgress: PostDraft['uploadsInProgress'];\n userId: UserProfile['id'];\n username: UserProfile['username'];\n}\n\nconst OPTIONS = {\n disableGroupHighlight: true,\n mentionHighlight: false,\n};\n\nfunction PanelBody({\n channelId,\n displayName,\n fileInfos,\n message,\n priority,\n status,\n uploadsInProgress,\n userId,\n username,\n}: Props) {\n const currentRelativeTeamUrl = useSelector(getCurrentRelativeTeamUrl);\n\n const handleClick = useCallback((e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n handleFormattedTextClick(e, currentRelativeTeamUrl);\n }, [currentRelativeTeamUrl]);\n\n return (\n <div className='DraftPanelBody post'>\n <div className='DraftPanelBody__left post__img'>\n <ProfilePicture\n status={status}\n channelId={channelId}\n username={username}\n userId={userId}\n size={'md'}\n src={imageURLForUser(userId)}\n />\n </div>\n <div className='DraftPanelBody__post_body'>\n <ShowMore\n text={message}\n >\n <div\n onClick={handleClick}\n className='post__content'\n >\n <div className='DraftPanelBody__right'>\n <div className='post__header'>\n <strong>{displayName}</strong>\n {priority && (\n <PriorityLabels\n canRemove={false}\n hasError={false}\n persistentNotifications={priority.persistent_notifications}\n priority={priority.priority}\n requestedAck={priority.requested_ack}\n />\n )}\n </div>\n <div className='post__body'>\n <Markdown\n options={OPTIONS}\n message={message}\n />\n </div>\n </div>\n </div>\n </ShowMore>\n {(fileInfos.length > 0 || uploadsInProgress?.length > 0) && (\n <FilePreview\n fileInfos={fileInfos}\n uploadsInProgress={uploadsInProgress}\n />\n )}\n </div>\n </div>\n );\n}\n\nexport default PanelBody;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport type {IntlShape} from 'react-intl';\nimport {defineMessages} from 'react-intl';\n\nimport type {ScheduledPostErrorCode} from '@mattermost/types/schedule_post';\n\nconst errorCodeToErrorMessage = defineMessages<ScheduledPostErrorCode>({\n unknown: {\n id: 'scheduled_post.error_code.unknown_error',\n defaultMessage: 'Unknown Error',\n },\n channel_archived: {\n id: 'scheduled_post.error_code.channel_archived',\n defaultMessage: 'Channel Archived',\n },\n channel_not_found: {\n id: 'scheduled_post.error_code.channel_removed',\n defaultMessage: 'Channel Removed',\n },\n user_missing: {\n id: 'scheduled_post.error_code.user_missing',\n defaultMessage: 'User Deleted',\n },\n user_deleted: {\n id: 'scheduled_post.error_code.user_deleted',\n defaultMessage: 'User Deleted',\n },\n no_channel_permission: {\n id: 'scheduled_post.error_code.no_channel_permission',\n defaultMessage: 'Missing Permission',\n },\n no_channel_member: {\n id: 'scheduled_post.error_code.no_channel_member',\n defaultMessage: 'Not In Channel',\n },\n thread_deleted: {\n id: 'scheduled_post.error_code.thread_deleted',\n defaultMessage: 'Thread Deleted',\n },\n unable_to_send: {\n id: 'scheduled_post.error_code.unable_to_send',\n defaultMessage: 'Unable to Send',\n },\n invalid_post: {\n id: 'scheduled_post.error_code.invalid_post',\n defaultMessage: 'Invalid Post',\n },\n});\n\nexport function getErrorStringFromCode(intl: IntlShape, errorCode: ScheduledPostErrorCode = 'unknown') {\n const textDefinition = errorCodeToErrorMessage[errorCode] ?? errorCodeToErrorMessage.unknown;\n return intl.formatMessage(textDefinition).toUpperCase();\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport noop from 'lodash/noop';\nimport React, {memo, useCallback, useMemo, useEffect, useState, useRef} from 'react';\nimport {useIntl} from 'react-intl';\nimport {useDispatch, useSelector} from 'react-redux';\nimport {useHistory} from 'react-router-dom';\n\nimport type {ServerError} from '@mattermost/types/errors';\nimport type {FileInfo} from '@mattermost/types/files';\nimport type {ScheduledPost} from '@mattermost/types/schedule_post';\nimport type {UserProfile, UserStatus} from '@mattermost/types/users';\n\nimport {getPost as getPostAction} from 'mattermost-redux/actions/posts';\nimport {deleteScheduledPost, updateScheduledPost} from 'mattermost-redux/actions/scheduled_posts';\nimport {Permissions} from 'mattermost-redux/constants';\nimport {isDeactivatedDirectChannel, makeGetChannel} from 'mattermost-redux/selectors/entities/channels';\nimport {getConfig} from 'mattermost-redux/selectors/entities/general';\nimport {getPost} from 'mattermost-redux/selectors/entities/posts';\nimport {haveIChannelPermission} from 'mattermost-redux/selectors/entities/roles';\nimport {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';\nimport {makeGetThreadOrSynthetic} from 'mattermost-redux/selectors/entities/threads';\n\nimport type {SubmitPostReturnType} from 'actions/views/create_comment';\nimport {removeDraft} from 'actions/views/drafts';\nimport {selectPostById} from 'actions/views/rhs';\nimport {getConnectionId} from 'selectors/general';\nimport {getChannelURL} from 'selectors/urls';\n\nimport usePriority from 'components/advanced_text_editor/use_priority';\nimport useSubmit from 'components/advanced_text_editor/use_submit';\nimport {useScrollOnRender} from 'components/common/hooks/use_scroll_on_render';\nimport ScheduledPostActions from 'components/drafts/draft_actions/schedule_post_actions/scheduled_post_actions';\nimport PlaceholderScheduledPostsTitle\n from 'components/drafts/placeholder_scheduled_post_title/placeholder_scheduled_posts_title';\nimport EditScheduledPost from 'components/edit_scheduled_post';\n\nimport Constants, {StoragePrefixes} from 'utils/constants';\nimport {copyToClipboard} from 'utils/utils';\n\nimport type {GlobalState} from 'types/store';\nimport type {PostDraft} from 'types/store/draft';\nimport {scheduledPostToPostDraft} from 'types/store/draft';\n\nimport DraftActions from './draft_actions';\nimport DraftTitle from './draft_title';\nimport Panel from './panel/panel';\nimport PanelBody from './panel/panel_body';\nimport Header from './panel/panel_header';\nimport {getErrorStringFromCode} from './utils';\n\nimport './draft_row.scss';\n\ntype Props = {\n user: UserProfile;\n status: UserStatus['status'];\n displayName: string;\n item: PostDraft | ScheduledPost;\n isRemote?: boolean;\n scrollIntoView?: boolean;\n}\n\nconst mockLastBlurAt = {current: 0};\n\nfunction DraftRow({\n item,\n user,\n status,\n displayName,\n isRemote,\n scrollIntoView,\n}: Props) {\n const [isEditing, setIsEditing] = useState(false);\n\n const isScheduledPost = 'scheduled_at' in item;\n const intl = useIntl();\n\n const rootId = ('rootId' in item) ? item.rootId : item.root_id;\n const channelId = ('channelId' in item) ? item.channelId : item.channel_id;\n\n const [serverError, setServerError] = useState<(ServerError & { submittedMessage?: string }) | null>(null);\n\n const history = useHistory();\n const dispatch = useDispatch();\n\n const getChannelSelector = useMemo(() => makeGetChannel(), []);\n const channel = useSelector((state: GlobalState) => getChannelSelector(state, channelId));\n\n const getThreadOrSynthetic = useMemo(() => makeGetThreadOrSynthetic(), []);\n\n const rootPostDeleted = useSelector((state: GlobalState) => {\n if (!rootId) {\n return false;\n }\n const rootPost = getPost(state, rootId);\n return !rootPost || rootPost.delete_at > 0 || rootPost.state === 'DELETED';\n });\n\n const tooLong = useSelector((state: GlobalState) => {\n const maxPostSize = parseInt(getConfig(state).MaxPostSize || '', 10) || Constants.DEFAULT_CHARACTER_LIMIT;\n return item.message.length > maxPostSize;\n });\n\n const readOnly = !useSelector((state: GlobalState) => {\n return channel ? haveIChannelPermission(state, channel.team_id, channel.id, Permissions.CREATE_POST) : false;\n });\n\n const connectionId = useSelector(getConnectionId);\n\n const isChannelArchived = Boolean(channel?.delete_at);\n const isDeactivatedDM = useSelector((state: GlobalState) => isDeactivatedDirectChannel(state, channelId));\n\n let postError = '';\n\n if (isScheduledPost) {\n // This is applicable only for scheduled post.\n if (item.error_code) {\n postError = getErrorStringFromCode(intl, item.error_code);\n } else if (isChannelArchived || isDeactivatedDM) {\n postError = getErrorStringFromCode(intl, 'channel_archived');\n }\n } else if (rootPostDeleted) {\n postError = intl.formatMessage({id: 'drafts.error.post_not_found', defaultMessage: 'Thread not found'});\n } else if (tooLong) {\n postError = intl.formatMessage({id: 'drafts.error.too_long', defaultMessage: 'Message too long'});\n } else if (readOnly) {\n postError = intl.formatMessage({id: 'drafts.error.read_only', defaultMessage: 'Channel is read only'});\n }\n\n const canSend = !postError;\n const canEdit = !(rootPostDeleted || readOnly);\n\n const channelUrl = useSelector((state: GlobalState) => {\n if (!channel) {\n return '';\n }\n const teamId = getCurrentTeamId(state);\n return getChannelURL(state, channel, teamId);\n });\n\n const goToMessage = useCallback(async () => {\n if (isEditing) {\n return;\n }\n\n if (rootId) {\n if (rootPostDeleted) {\n return;\n }\n await dispatch(selectPostById(rootId));\n return;\n }\n history.push(channelUrl);\n }, [channelUrl, dispatch, history, rootId, rootPostDeleted, isEditing]);\n\n const isBeingScheduled = useRef(false);\n const isScheduledPostBeingSent = useRef(false);\n\n const thread = useSelector((state: GlobalState) => {\n if (!rootId) {\n return undefined;\n }\n const post = getPost(state, rootId);\n if (!post) {\n return undefined;\n }\n\n return getThreadOrSynthetic(state, post);\n });\n\n const handleOnDelete = useCallback(() => {\n let key = `${StoragePrefixes.DRAFT}${channelId}`;\n if (rootId) {\n key = `${StoragePrefixes.COMMENT_DRAFT}${rootId}`;\n }\n dispatch(removeDraft(key, channelId, rootId));\n }, [dispatch, channelId, rootId]);\n\n const afterSubmit = useCallback((response: SubmitPostReturnType) => {\n // if draft was being scheduled, delete the draft after it's been scheduled\n if (isBeingScheduled.current && response.created && !response.error) {\n handleOnDelete();\n isBeingScheduled.current = false;\n }\n\n // if scheduled posts was being sent, delete the scheduled post after it's been sent\n if (isScheduledPostBeingSent.current && response.created && !response.error) {\n const scheduledPost = item as ScheduledPost;\n dispatch(deleteScheduledPost(scheduledPost.user_id, scheduledPost.id, connectionId));\n isScheduledPostBeingSent.current = false;\n }\n }, [connectionId, dispatch, handleOnDelete, item]);\n\n // TODO LOL verify the types and handled it better\n const {onSubmitCheck: prioritySubmitCheck} = usePriority(item as any, noop, noop, false);\n const [handleOnSend] = useSubmit(\n item as any,\n postError,\n channelId,\n rootId,\n serverError,\n mockLastBlurAt,\n noop,\n setServerError,\n noop,\n noop,\n prioritySubmitCheck,\n goToMessage,\n afterSubmit,\n true,\n );\n\n const onScheduleDraft = useCallback(async (scheduledAt: number): Promise<{error?: string}> => {\n isBeingScheduled.current = true;\n await handleOnSend(item as PostDraft, {scheduled_at: scheduledAt});\n return Promise.resolve({});\n }, [item, handleOnSend]);\n\n const draftActions = useMemo(() => {\n if (!channel) {\n return null;\n }\n return (\n <DraftActions\n channelDisplayName={channel.display_name}\n channelName={channel.name}\n channelType={channel.type}\n channelId={channel.id}\n userId={user.id}\n onDelete={handleOnDelete}\n onEdit={goToMessage}\n onSend={handleOnSend}\n canEdit={canEdit}\n canSend={canSend}\n onSchedule={onScheduleDraft}\n />\n );\n }, [\n canEdit,\n canSend,\n channel,\n goToMessage,\n handleOnDelete,\n handleOnSend,\n user.id,\n onScheduleDraft,\n ]);\n\n const handleCancelEdit = useCallback(() => {\n setIsEditing(false);\n }, []);\n\n const handleSchedulePostOnReschedule = useCallback(async (updatedScheduledAtTime: number) => {\n handleCancelEdit();\n\n const updatedScheduledPost: ScheduledPost = {\n ...(item as ScheduledPost),\n scheduled_at: updatedScheduledAtTime,\n };\n\n const result = await dispatch(updateScheduledPost(updatedScheduledPost, connectionId));\n return {\n error: result.error?.message,\n };\n }, [connectionId, dispatch, item, handleCancelEdit]);\n\n const handleSchedulePostOnDelete = useCallback(async () => {\n handleCancelEdit();\n\n const scheduledPost = item as ScheduledPost;\n const result = await dispatch(deleteScheduledPost(scheduledPost.user_id, scheduledPost.id, connectionId));\n return {\n error: result.error?.message,\n };\n }, [item, dispatch, connectionId, handleCancelEdit]);\n\n const handleSchedulePostEdit = useCallback(() => {\n setIsEditing((isEditing) => !isEditing);\n }, []);\n\n const handleCopyText = useCallback(() => {\n copyToClipboard(item.message);\n }, [item]);\n\n const handleScheduledPostOnSend = useCallback(() => {\n handleCancelEdit();\n\n isScheduledPostBeingSent.current = true;\n const postDraft = scheduledPostToPostDraft(item as ScheduledPost);\n handleOnSend(postDraft, undefined, {keepDraft: true, ignorePostError: true});\n return Promise.resolve({});\n }, [handleOnSend, item, handleCancelEdit]);\n\n const scheduledPostActions = useMemo(() => {\n return (\n <ScheduledPostActions\n scheduledPost={item as ScheduledPost}\n channel={channel}\n onReschedule={handleSchedulePostOnReschedule}\n onDelete={handleSchedulePostOnDelete}\n onSend={handleScheduledPostOnSend}\n onEdit={handleSchedulePostEdit}\n onCopyText={handleCopyText}\n />\n );\n }, [\n channel,\n handleSchedulePostOnDelete,\n handleSchedulePostOnReschedule,\n handleScheduledPostOnSend,\n handleSchedulePostEdit,\n handleCopyText,\n item,\n ]);\n\n useEffect(() => {\n if (rootId && !thread?.id) {\n dispatch(getPostAction(rootId));\n }\n }, [thread?.id, rootId]);\n\n const alertRef = useScrollOnRender();\n\n if (!channel && !isScheduledPost) {\n return null;\n }\n\n let timestamp: number;\n let fileInfos: FileInfo[];\n let uploadsInProgress: string[];\n let actions: React.ReactNode;\n\n if (isScheduledPost) {\n timestamp = item.scheduled_at;\n fileInfos = item.metadata?.files || [];\n uploadsInProgress = [];\n actions = scheduledPostActions;\n } else {\n timestamp = item.updateAt;\n fileInfos = item.fileInfos;\n uploadsInProgress = item.uploadsInProgress;\n actions = draftActions;\n }\n\n let title: React.ReactNode;\n if (channel) {\n title = (\n <DraftTitle\n type={(rootId ? 'thread' : 'channel')}\n channel={channel}\n userId={user.id}\n />\n );\n } else {\n title = (\n <PlaceholderScheduledPostsTitle\n type={(rootId ? 'thread' : 'channel')}\n />\n );\n }\n\n return (\n <Panel\n onClick={goToMessage}\n hasError={Boolean(postError)}\n innerRef={scrollIntoView ? alertRef : undefined}\n isHighlighted={scrollIntoView}\n >\n {({hover}) => (\n <>\n <Header\n kind={isScheduledPost ? 'scheduledPost' : 'draft'}\n hover={hover}\n actions={actions}\n title={title}\n timestamp={timestamp}\n remote={isRemote || false}\n error={postError || serverError?.message}\n />\n {isEditing && (\n <EditScheduledPost\n scheduledPost={item as ScheduledPost}\n onCancel={handleCancelEdit}\n afterSave={handleCancelEdit}\n onDeleteScheduledPost={handleSchedulePostOnDelete}\n />\n )}\n {!isEditing && (\n <PanelBody\n channelId={channel?.id}\n displayName={displayName}\n fileInfos={fileInfos}\n message={item.message}\n status={status}\n priority={rootId ? undefined : item.metadata?.priority}\n uploadsInProgress={uploadsInProgress}\n userId={user.id}\n username={user.username}\n />\n )}\n </>\n )}\n </Panel>\n );\n}\n\nexport default memo(DraftRow);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React from 'react';\n\n// useScrollOnRender hook is used to scroll to the element when it is rendered\n// Attach the returned ref to the element you want to scroll to.\nexport function useScrollOnRender() {\n const ref = React.useRef<HTMLElement>(null);\n\n React.useEffect(() => {\n if (ref.current) {\n ref.current.scrollIntoView({behavior: 'smooth'});\n }\n }, []);\n\n return ref;\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React from 'react';\n\nexport default (\n <svg\n width='142'\n height='80'\n viewBox='0 0 142 80'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <g clipPath='url(#clip0_4212_90546)'>\n <rect\n x='15.0059'\n y='15'\n width='112'\n height='44'\n rx='3'\n fill='var(--button-bg)'\n fillOpacity='0.12'\n />\n <path\n d='M28.0059 34L28.0059 52L39.0059 52'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.8'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M28.0059 31L28.0059 26'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.8'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M28.0059 23L28.0059 21'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.8'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n <path\n d='M54.6108 67.5638L41.0059 81V12C41.0059 10.8954 41.9013 10 43.0059 10H109.006C110.11 10 111.006 10.8954 111.006 12V64.9868C111.006 66.0914 110.11 66.9868 109.006 66.9868H56.0162C55.4901 66.9868 54.9851 67.1941 54.6108 67.5638Z'\n fill='#28427B'\n />\n <path\n d='M49.6108 62.5638L36.0059 76V7C36.0059 5.89543 36.9013 5 38.0059 5H104.006C105.11 5 106.006 5.89543 106.006 7V59.9868C106.006 61.0914 105.11 61.9868 104.006 61.9868H51.0162C50.4901 61.9868 49.9851 62.1941 49.6108 62.5638Z'\n fill='var(--center-channel-bg)'\n />\n <path\n d='M49.2595 62.2081L36.5059 74.8035V7C36.5059 6.17157 37.1774 5.5 38.0059 5.5H104.006C104.834 5.5 105.506 6.17157 105.506 7V59.9868C105.506 60.8153 104.834 61.4868 104.006 61.4868H51.0162C50.3585 61.4868 49.7274 61.746 49.2595 62.2081Z'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.8'\n />\n <circle\n cx='54.0059'\n cy='24'\n r='9'\n fill='var(--center-channel-color)'\n fillOpacity='0.32'\n />\n <path\n d='M69.0059 20H85.0059'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.48'\n strokeLinecap='round'\n />\n <path\n d='M46.0059 44H96.0059'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.48'\n strokeLinecap='round'\n />\n <path\n d='M46.0059 51H68.0059'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.48'\n strokeLinecap='round'\n />\n <path\n d='M69.0059 26H94.0059'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.48'\n strokeLinecap='round'\n />\n <path\n d='M46.0059 38H63.0059'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.48'\n strokeLinecap='round'\n />\n <path\n d='M67.0059 38H85.0059'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.48'\n strokeLinecap='round'\n />\n <rect\n x='115.199'\n y='45.0278'\n width='12.4524'\n height='6.22619'\n transform='rotate(-135 115.199 45.0278)'\n fill='var(--center-channel-bg)'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.8'\n />\n <path\n d='M117.952 42.2764L109.147 33.4712L113.787 28.8319C114.568 28.0508 115.834 28.0508 116.615 28.8319L122.592 34.8086C123.373 35.5897 123.373 36.856 122.592 37.637L117.952 42.2764Z'\n fill='var(--center-channel-color)'\n fillOpacity='0.32'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.8'\n />\n <path\n d='M89.3356 70.8933L80.5305 62.0882L106.946 35.6727L115.751 44.4778L89.3356 70.8933Z'\n fill='var(--center-channel-bg)'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.8'\n strokeLinejoin='round'\n />\n <path\n d='M73.1016 78.8725L80.5309 62.0876L89.3361 70.8928L73.1016 78.8725Z'\n fill='var(--center-channel-bg)'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.8'\n strokeLinejoin='round'\n />\n <path\n d='M78.3289 76.3964L75.4492 77.9756C74.5896 78.447 73.6355 77.5284 74.0739 76.6516L75.5773 73.6448L78.3289 76.3964Z'\n fill='var(--center-channel-color)'\n fillOpacity='0.8'\n />\n <line\n x1='82.8065'\n y1='64.4976'\n x2='109.377'\n y2='37.9268'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.32'\n />\n <line\n x1='86.6825'\n y1='68.3725'\n x2='113.253'\n y2='41.8017'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.32'\n />\n </g>\n <defs>\n <clipPath id='clip0_4212_90546'>\n <rect\n width='142'\n height='80'\n fill='var(--center-channel-bg)'\n transform='translate(0.00585938)'\n />\n </clipPath>\n </defs>\n </svg>\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 from 'react';\nimport {useIntl} from 'react-intl';\n\nimport type {UserProfile, UserStatus} from '@mattermost/types/users';\n\nimport type {Draft} from 'selectors/drafts';\n\nimport DraftRow from 'components/drafts/draft_row';\nimport DraftsIllustration from 'components/drafts/drafts_illustration';\nimport NoResultsIndicator from 'components/no_results_indicator';\n\ntype Props = {\n drafts: Draft[];\n user: UserProfile;\n displayName: string;\n draftRemotes: Record<string, boolean>;\n status: UserStatus['status'];\n className?: string;\n}\n\nexport default function DraftList({drafts, user, displayName, draftRemotes, status, className}: Props) {\n const {formatMessage} = useIntl();\n\n return (\n <div className={classNames('DraftList Drafts__main', className)}>\n {drafts.map((d) => (\n <DraftRow\n key={d.key}\n displayName={displayName}\n item={d.value}\n isRemote={draftRemotes?.[d.key]}\n user={user}\n status={status}\n />\n ))}\n {drafts.length === 0 && (\n <NoResultsIndicator\n expanded={true}\n iconGraphic={DraftsIllustration}\n title={formatMessage({\n id: 'drafts.empty.title',\n defaultMessage: 'No drafts at the moment',\n })}\n subtitle={formatMessage({\n id: 'drafts.empty.subtitle',\n defaultMessage: 'Any messages you’ve started will show here.',\n })}\n />\n )}\n </div>\n );\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React from 'react';\n\nexport default (\n <svg\n width='142'\n height='87'\n viewBox='0 0 142 87'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <g clipPath='url(#clip0_4212_90995)'>\n <rect\n x='15'\n y='15'\n width='112'\n height='44'\n rx='3'\n fill='var(--button-bg)'\n fillOpacity='0.12'\n />\n <path\n d='M29.5 75L29.5 47L40 47'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.32'\n strokeLinecap='round'\n />\n <path\n d='M45 43H29.5V9.5L22.5 2.5'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.32'\n strokeLinecap='round'\n />\n <circle\n cx='2.5'\n cy='2.5'\n r='2.5'\n transform='matrix(1 0 0 -1 20 5)'\n fill='var(--center-channel-color)'\n fillOpacity='0.48'\n />\n <circle\n cx='2.5'\n cy='2.5'\n r='2.5'\n transform='matrix(1 0 0 -1 27 78)'\n fill='var(--center-channel-color)'\n fillOpacity='0.48'\n />\n <path\n d='M127 22.5L117 22.5L117 49'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.32'\n strokeLinecap='round'\n />\n <circle\n cx='128.5'\n cy='22.5'\n r='2.5'\n fill='var(--center-channel-color)'\n fillOpacity='0.48'\n />\n <path\n d='M54.605 67.5638L41 81V12C41 10.8954 41.8954 10 43 10H109C110.105 10 111 10.8954 111 12V64.9868C111 66.0914 110.105 66.9868 109 66.9868H56.0103C55.4842 66.9868 54.9793 67.1941 54.605 67.5638Z'\n fill='#28427B'\n />\n <path\n d='M49.605 62.5638L36 76V7C36 5.89543 36.8954 5 38 5H104C105.105 5 106 5.89543 106 7V59.9868C106 61.0914 105.105 61.9868 104 61.9868H51.0103C50.4842 61.9868 49.9793 62.1941 49.605 62.5638Z'\n fill='var(--center-channel-bg)'\n />\n <path\n d='M49.2536 62.2081L36.5 74.8035V7C36.5 6.17157 37.1716 5.5 38 5.5H104C104.828 5.5 105.5 6.17157 105.5 7V59.9868C105.5 60.8153 104.828 61.4868 104 61.4868H51.0103C50.3527 61.4868 49.7215 61.746 49.2536 62.2081Z'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.8'\n />\n <circle\n cx='54'\n cy='24'\n r='9'\n fill='var(--center-channel-color)'\n fillOpacity='0.32'\n />\n <path\n d='M69 20H85'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.48'\n strokeLinecap='round'\n />\n <path\n d='M46 44H96'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.48'\n strokeLinecap='round'\n />\n <path\n d='M46 51H68'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.48'\n strokeLinecap='round'\n />\n <path\n d='M69 26H94'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.48'\n strokeLinecap='round'\n />\n <path\n d='M46 38H63'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.48'\n strokeLinecap='round'\n />\n <path\n d='M67 38H85'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.48'\n strokeLinecap='round'\n />\n <path\n opacity='0.32'\n d='M114.218 87.29C106.772 87.1409 100.598 84.5917 95.6936 79.6423C90.7897 74.6929 88.2252 68.5281 88 61.1479C88.2213 53.7639 90.7859 47.5971 95.6936 42.6477C100.601 37.6983 106.776 35.1491 114.218 35C121.591 35.1529 127.73 37.7021 132.633 42.6477C137.537 47.5933 140.102 53.76 140.327 61.1479C140.098 68.5319 137.534 74.6967 132.633 79.6423C127.733 84.5879 121.595 87.1371 114.218 87.29Z'\n fill='var(--center-channel-color)'\n fillOpacity='0.32'\n />\n <path\n d='M111.218 82.7899C103.897 82.6411 97.8524 80.1385 93.0488 75.2904C88.243 70.4399 85.7248 64.403 85.5002 57.1477C85.7211 49.8888 88.2392 43.8501 93.0487 38.9998C97.8561 34.1515 103.901 31.6489 111.218 31.5001C118.465 31.6526 124.474 34.1544 129.278 38.9998C134.084 43.8462 136.602 49.8848 136.827 57.1477C136.598 64.407 134.08 70.4439 129.278 75.2904C124.478 80.1356 118.469 82.6374 111.218 82.7899Z'\n fill='var(--center-channel-bg)'\n stroke='var(--center-channel-color)'\n />\n <path\n d='M111.042 77C105.35 76.886 100.63 74.9359 96.8812 71.1498C93.1325 67.3636 91.1721 62.6478 91 57.0022C91.1692 51.3537 93.1296 46.6364 96.8812 42.8502C100.633 39.0641 105.353 37.114 111.042 37C116.678 37.1169 121.37 39.067 125.119 42.8502C128.867 46.6334 130.828 51.3508 131 57.0022C130.825 62.6507 128.865 67.3666 125.119 71.1498C121.373 74.933 116.681 76.8831 111.042 77Z'\n fill='var(--center-channel-bg)'\n />\n <path\n d='M111.041 76.4999C105.475 76.3862 100.885 74.4827 97.2365 70.798C93.5858 67.1108 91.6718 62.5228 91.5002 57.0021C91.6689 51.4785 93.583 46.8892 97.2364 43.2022C100.888 39.5172 105.478 37.6138 111.041 37.5001C116.552 37.6167 121.114 39.5192 124.764 43.2022C128.414 46.8862 130.328 51.4754 130.5 57.0021C130.325 62.5259 128.411 67.1139 124.763 70.798C121.117 74.4807 116.555 76.3833 111.041 76.4999Z'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.32'\n />\n <path\n d='M111 35.5V57L120.5 66.5'\n stroke='var(--center-channel-color)'\n strokeOpacity='0.8'\n strokeLinejoin='round'\n />\n <circle\n cx='111'\n cy='57'\n r='2'\n fill='var(--center-channel-color)'\n fillOpacity='0.8'\n />\n </g>\n <defs>\n <clipPath id='clip0_4212_90995'>\n <rect\n width='142'\n height='87'\n fill='white'\n />\n </clipPath>\n </defs>\n </svg>\n);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React, {useEffect, useRef} from 'react';\nimport {FormattedMessage, useIntl} from 'react-intl';\nimport {useDispatch, useSelector} from 'react-redux';\n\nimport type {ScheduledPost} from '@mattermost/types/schedule_post';\nimport type {UserProfile, UserStatus} from '@mattermost/types/users';\n\nimport {fetchMissingChannels} from 'mattermost-redux/actions/channels';\nimport {hasScheduledPostError} from 'mattermost-redux/selectors/entities/scheduled_posts';\nimport {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';\n\nimport AlertBanner from 'components/alert_banner';\nimport NoScheduledPostsIllustration from 'components/drafts/scheduled_post_list/empty_scheduled_post_list_illustration';\nimport NoResultsIndicator from 'components/no_results_indicator';\n\nimport {useQuery} from 'utils/http_utils';\n\nimport type {GlobalState} from 'types/store';\n\nimport DraftRow from '../draft_row';\n\nimport './style.scss';\n\ntype Props = {\n scheduledPosts: ScheduledPost[];\n user: UserProfile;\n displayName: string;\n status: UserStatus['status'];\n}\n\nexport default function ScheduledPostList({\n scheduledPosts,\n user,\n displayName,\n status,\n}: Props) {\n const {formatMessage} = useIntl();\n\n const currentTeamId = useSelector(getCurrentTeamId);\n const scheduledPostsHasError = useSelector((state: GlobalState) => hasScheduledPostError(state, currentTeamId));\n\n const query = useQuery();\n const targetId = query.get('target_id');\n const targetScheduledPostId = useRef<string>();\n\n const dispatch = useDispatch();\n useEffect(() => {\n dispatch(fetchMissingChannels(scheduledPosts.map((post) => post.channel_id)));\n }, [scheduledPosts]);\n\n return (\n <div className='ScheduledPostList'>\n {\n scheduledPostsHasError &&\n <AlertBanner\n mode='danger'\n className='scheduledPostListErrorIndicator'\n message={\n <FormattedMessage\n id='scheduled_post.panel.error_indicator.message'\n defaultMessage='One of your scheduled drafts cannot be sent.'\n />\n }\n />\n }\n\n {\n scheduledPosts.map((scheduledPost) => {\n // find the first scheduled posst with the target and no error\n const isInTargetChannelOrThread = scheduledPost.channel_id === targetId || scheduledPost.root_id === targetId;\n const hasError = Boolean(scheduledPost.error_code);\n const scrollIntoView = !targetScheduledPostId.current && (isInTargetChannelOrThread && !hasError);\n if (scrollIntoView) {\n // if found, save the scheduled post's ID\n targetScheduledPostId.current = scheduledPost.id;\n }\n\n return (\n <DraftRow\n key={scheduledPost.id}\n item={scheduledPost}\n displayName={displayName}\n status={status}\n user={user}\n scrollIntoView={targetScheduledPostId.current === scheduledPost.id} // scroll into view if this is the target scheduled post\n />\n );\n })\n }\n\n {\n scheduledPosts.length === 0 && (\n <NoResultsIndicator\n expanded={true}\n iconGraphic={NoScheduledPostsIllustration}\n title={formatMessage({\n id: 'Schedule_post.empty_state.title',\n defaultMessage: 'No scheduled drafts at the moment',\n })}\n subtitle={formatMessage({\n id: 'Schedule_post.empty_state.subtitle',\n defaultMessage: 'Schedule drafts to send messages at a later time. Any scheduled drafts will show up here and can be modified after being scheduled.',\n })}\n />\n )\n }\n </div>\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 {Tab as ReactBootstrapTab} from 'react-bootstrap';\n\ntype Props = {\n children?: React.ReactNode;\n eventKey?: any;\n title?: React.ReactNode | undefined;\n unmountOnExit?: boolean | undefined;\n tabClassName?: string | undefined;\n tabIndex?: number;\n}\n\nexport default function Tab({children, title, unmountOnExit, tabClassName, eventKey, tabIndex = -1}: Props) {\n return (\n <ReactBootstrapTab\n eventKey={eventKey}\n title={title}\n unmountOnExit={unmountOnExit}\n tabClassName={tabClassName}\n tabIndex={tabIndex}\n >\n {children}\n </ReactBootstrapTab>\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 from 'react';\nimport {Tabs as ReactBootstrapTabs} from 'react-bootstrap';\nimport type {SelectCallback} from 'react-bootstrap';\n\nimport './style.scss';\n\ntype Props = {\n children?: React.ReactNode;\n id?: string;\n activeKey?: any;\n mountOnEnter?: boolean;\n unmountOnExit?: boolean;\n onSelect?: SelectCallback;\n className?: string;\n}\n\nexport default function Tabs({\n children,\n id,\n activeKey,\n unmountOnExit,\n onSelect,\n className,\n mountOnEnter,\n}: Props) {\n return (\n <ReactBootstrapTabs\n id={id}\n activeKey={activeKey}\n unmountOnExit={unmountOnExit}\n onSelect={onSelect}\n className={classNames('tabs', className)}\n mountOnEnter={mountOnEnter}\n autoFocus={true}\n >\n {children}\n </ReactBootstrapTabs>\n );\n}\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {Badge} from '@mui/base';\nimport React, {memo, useCallback, useEffect, useMemo} from 'react';\nimport {FormattedMessage} from 'react-intl';\nimport {useDispatch, useSelector} from 'react-redux';\nimport {type match, useHistory, useRouteMatch} from 'react-router-dom';\n\nimport type {ScheduledPost} from '@mattermost/types/schedule_post';\nimport type {UserProfile, UserStatus} from '@mattermost/types/users';\n\nimport {\n isScheduledPostsEnabled,\n makeGetScheduledPostsByTeam,\n} from 'mattermost-redux/selectors/entities/scheduled_posts';\nimport {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';\n\nimport {selectLhsItem} from 'actions/views/lhs';\nimport {suppressRHS, unsuppressRHS} from 'actions/views/rhs';\nimport type {Draft} from 'selectors/drafts';\n\nimport DraftList from 'components/drafts/draft_list/draft_list';\nimport ScheduledPostList from 'components/drafts/scheduled_post_list/scheduled_post_list';\nimport Tab from 'components/tabs/tab';\nimport Tabs from 'components/tabs/tabs';\nimport Header from 'components/widgets/header';\n\nimport {SCHEDULED_POST_URL_SUFFIX} from 'utils/constants';\n\nimport type {GlobalState} from 'types/store';\nimport {LhsItemType, LhsPage} from 'types/store/lhs';\n\nimport './drafts.scss';\n\nconst EMPTY_LIST: ScheduledPost[] = [];\n\ntype Props = {\n drafts: Draft[];\n user: UserProfile;\n displayName: string;\n status: UserStatus['status'];\n draftRemotes: Record<string, boolean>;\n}\n\nfunction Drafts({\n displayName,\n drafts,\n draftRemotes,\n status,\n user,\n}: Props) {\n const dispatch = useDispatch();\n\n const history = useHistory();\n const match: match<{team: string}> = useRouteMatch();\n const isDraftsTab = useRouteMatch('/:team/drafts');\n\n const isScheduledPostsTab = useRouteMatch('/:team/' + SCHEDULED_POST_URL_SUFFIX);\n\n const currentTeamId = useSelector(getCurrentTeamId);\n const getScheduledPostsByTeam = useMemo(() => makeGetScheduledPostsByTeam(), []);\n const scheduledPosts = useSelector((state: GlobalState) => getScheduledPostsByTeam(state, currentTeamId, true));\n const isScheduledPostEnabled = useSelector(isScheduledPostsEnabled);\n\n useEffect(() => {\n dispatch(selectLhsItem(LhsItemType.Page, LhsPage.Drafts));\n dispatch(suppressRHS);\n\n return () => {\n dispatch(unsuppressRHS);\n };\n }, [dispatch]);\n\n const handleSwitchTabs = useCallback((key) => {\n if (key === 0 && isScheduledPostsTab) {\n history.push(`/${match.params.team}/drafts`);\n } else if (key === 1 && isDraftsTab) {\n history.push(`/${match.params.team}/scheduled_posts`);\n }\n }, [history, isDraftsTab, isScheduledPostsTab, match]);\n\n const scheduledPostsTabHeading = useMemo(() => {\n return (\n <div className='drafts_tab_title'>\n <FormattedMessage\n id='schedule_post.tab.heading'\n defaultMessage='Scheduled'\n />\n\n {\n scheduledPosts?.length > 0 &&\n <Badge\n className='badge'\n badgeContent={scheduledPosts.length}\n />\n }\n </div>\n );\n }, [scheduledPosts?.length]);\n\n const draftTabHeading = useMemo(() => {\n return (\n <div className='drafts_tab_title'>\n <FormattedMessage\n id='drafts.heading'\n defaultMessage='Drafts'\n />\n\n {\n drafts.length > 0 &&\n <Badge\n className='badge'\n badgeContent={drafts.length}\n />\n }\n </div>\n );\n }, [drafts?.length]);\n\n const heading = useMemo(() => {\n return (\n <FormattedMessage\n id='drafts.heading'\n defaultMessage='Drafts'\n />\n );\n }, []);\n\n const subtitle = useMemo(() => {\n return (\n <FormattedMessage\n id={'drafts.subtitle'}\n defaultMessage={'Any messages you\\'ve started will show here'}\n />\n );\n }, []);\n\n const activeTab = isDraftsTab ? 0 : 1;\n\n return (\n <div\n id='app-content'\n className='Drafts app__content'\n >\n <Header\n level={2}\n className='Drafts__header'\n heading={heading}\n subtitle={subtitle}\n />\n\n {\n isScheduledPostEnabled &&\n <Tabs\n id='draft_tabs'\n activeKey={activeTab}\n mountOnEnter={true}\n unmountOnExit={false}\n onSelect={handleSwitchTabs}\n >\n <Tab\n eventKey={0}\n title={draftTabHeading}\n unmountOnExit={false}\n tabClassName='drafts_tab'\n tabIndex={0}\n >\n <DraftList\n drafts={drafts}\n user={user}\n displayName={displayName}\n draftRemotes={draftRemotes}\n status={status}\n />\n </Tab>\n\n <Tab\n eventKey={1}\n title={scheduledPostsTabHeading}\n unmountOnExit={false}\n tabClassName='drafts_tab'\n >\n <ScheduledPostList\n scheduledPosts={scheduledPosts || EMPTY_LIST}\n user={user}\n displayName={displayName}\n status={status}\n />\n </Tab>\n </Tabs>\n }\n\n {\n !isScheduledPostEnabled &&\n <DraftList\n drafts={drafts}\n user={user}\n displayName={displayName}\n draftRemotes={draftRemotes}\n status={status}\n />\n }\n </div>\n );\n}\n\nexport default memo(Drafts);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {connect} from 'react-redux';\n\nimport {getTeammateNameDisplaySetting} from 'mattermost-redux/selectors/entities/preferences';\nimport {getCurrentUser, getStatusForUserId} from 'mattermost-redux/selectors/entities/users';\nimport {displayUsername} from 'mattermost-redux/utils/user_utils';\n\nimport {makeGetDrafts} from 'selectors/drafts';\n\nimport type {GlobalState} from 'types/store';\n\nimport Drafts from './drafts';\n\nfunction makeMapStateToProps() {\n const getDrafts = makeGetDrafts();\n return (state: GlobalState) => {\n const user = getCurrentUser(state);\n const status = getStatusForUserId(state, user.id);\n\n return {\n displayName: displayUsername(user, getTeammateNameDisplaySetting(state)),\n drafts: getDrafts(state),\n draftRemotes: state.views.drafts.remotes,\n status,\n user,\n };\n };\n}\n\nexport default connect(makeMapStateToProps)(Drafts);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport classNames from 'classnames';\nimport React, {Fragment} from 'react';\nimport type {ReactNode, HTMLAttributes} from 'react';\n\nimport './header.scss';\n\ntype Props = {\n heading: ReactNode;\n level?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n subtitle?: ReactNode;\n right?: ReactNode;\n};\n\ntype HeadingTag = keyof Pick<JSX.IntrinsicElements, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;\n\nconst Headings: Array<typeof Fragment | HeadingTag> = [Fragment, 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\n\nconst Header = ({\n level = 0,\n heading,\n subtitle,\n right,\n ...attrs\n}: Props & HTMLAttributes<HTMLElement>) => {\n const H = Headings[level];\n return (\n <header\n {...attrs}\n className={classNames('Header', attrs.className)}\n >\n <div className='left'>\n <H>{heading}</H>\n {subtitle ? <p>{subtitle}</p> : null}\n </div>\n <div className='spacer'/>\n {right}\n </header>\n );\n};\n\nexport default Header;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {useLocation} from 'react-router-dom';\n\nexport function useQuery() {\n return new URLSearchParams(useLocation().search);\n}\n"],"names":["getBadgeUtilityClass","slot","generateUtilityClass","generateUtilityClasses","omitEventHandlers","object","undefined","result","Object","keys","filter","prop","match","forEach","_excluded","useSlotProps","parameters","_parameters$additiona","elementType","externalSlotProps","ownerState","rest","resolvedComponentsProps","componentProps","resolveComponentProps","props","mergedProps","internalRef","getSlotProps","additionalProps","externalForwardedProps","className","joinedClasses","mergedStyle","style","length","eventHandlers","excludeKeys","includes","extractEventHandlers","componentsPropsWithoutEventHandlers","otherPropsWithoutEventHandlers","internalSlotProps","ref","mergeSlotProps","useForkRef","otherProps","appendOwnerState","defaultContextValue","disableDefaultClasses","ClassNameConfiguratorContext","component","children","max","maxProp","slotProps","slots","showZero","other","badgeContent","displayValue","invisible","badgeContentProp","invisibleProp","prevProps","value","current","Number","useBadge","classes","root","badge","composeClasses","useClassNamesOverride","useUtilityClasses","Root","rootProps","BadgeComponent","badgeProps","Action","_ref","name","icon","onClick","id","tooltipText","React","WithTooltip","title","classNames","concat","propTypes","_pt","isRequired","DeleteScheduledPostModal","channelDisplayName","onExited","onConfirm","formatMessage","useIntl","errorMessage","setErrorMessage","useState","defaultMessage","confirmButtonText","handleOnConfirm","useCallback","async","response","error","GenericModal","handleCancel","noop","handleConfirm","modalHeaderText","compassDesign","isDeleteModal","autoFocusConfirmButton","autoCloseOnConfirmButton","errorText","FormattedMessage","values","strong","chunk","displayName","SendDraftModal","message","deleteTooltipText","editTooltipText","rescheduleTooltipText","sendNowTooltipText","copyTextTooltipText","ScheduledPostActions","scheduledPost","channel","onReschedule","onDelete","onSend","onEdit","onCopyText","dispatch","useDispatch","userTimezone","useSelector","getCurrentTimezone","myChannelsMemberships","state","getMyChannelMemberships","isAdmin","isCurrentUserSystemAdmin","useEffect","type","Constants","DM_CHANNEL","fetchMissingChannels","handleReschedulePost","initialTime","moment","scheduled_at","openModal","modalId","ModalIdentifiers","SCHEDULED_POST_CUSTOM_TIME_MODAL","dialogType","ScheduledPostCustomTimeModal","dialogProps","channelId","channel_id","handleDelete","DELETE_DRAFT","display_name","handleSend","SEND_DRAFT","userChannelMember","Boolean","isChannelArchived","delete_at","showEditOption","error_code","isDeactivatedDM","isDeactivatedDirectChannel","showSendNowOption","showRescheduleOption","memo","PlaceholderScheduledPostsTitle","EditPostFooter","onSave","onCancel","ctrlSend","getBool","Preferences","CATEGORY_ADVANCED_SETTINGS","ctrlSendKey","isMac","key","x","KeyCodes","EditPost","_editingPost$post","_editingPost$post2","editingPost","actions","canEditPost","config","draft","afterSave","onDeleteScheduledPost","_objectWithoutProperties","connectionId","getConnectionId","getChannel","editText","setEditText","post","message_source","selectionRange","setSelectionRange","start","end","caretPosition","useRef","postError","setPostError","errorClass","setErrorClass","showEmojiPicker","setShowEmojiPicker","renderScrollbar","setRenderScrollbar","showMentionHelper","setShowMentionHelper","textboxRef","emojiButtonRef","wrapperRef","draftRef","saveDraftFrame","postId","draftStorageId","StoragePrefixes","EDIT_DRAFT","saveDraft","setDraft","clearTimeout","window","setTimeout","SAVE_DRAFT_TIMEOUT","isMentions","allAtMentions","focusTextBox","_textboxRef$current","focus","document","addEventListener","AppEvents","FOCUS_EDIT_TEXTBOX","removeEventListener","_textboxRef$current2","_textboxRef$current3","Utils","getInputBox","setSelectionRangeByCaretPosition","position","handlePaste","e","clipboardData","target","items","hasLinks","hasHtmlLink","table","getHtmlTable","preventDefault","newCaretPosition","isGitHubCodeBlock","formattedMessage","formattedCodeBlock","formatGithubCodePaste","selectionStart","selectionEnd","formatMarkdownMessage","trim","isSaveDisabled","file_ids","canDeletePost","applyHotkeyMarkdown","params","res","applyMarkdown","handleRefocusAndExit","refocusId","element","getElementById","unsetEditingPost","handleAutomatedRefocusAndExit","_objectSpread","handleEdit","_editingPost$post3","_editingPost$post4","_editingPost$post5","_editingPost$post6","handleEditScheduledPost","updatedPost","hookResult","runMessageWillBeUpdatedHooks","data","ANIMATION_TIMEOUT","hasAttachment","editPost","deletePostModalData","DELETE_POST","DeletePostModal","isRHS","scheduledPostToPost","deleteScheduledPostModalData","updatedScheduledPost","updateScheduledPost","getEmojiTargetRef","emojiPicker","EnableEmojiPicker","EmojiPickerOverlay","show","onHide","hideEmojiPicker","_textboxRef$current5","onEmojiClick","emoji","_textboxRef$current6","emojiAlias","getEmojiName","newMessage","firstPiece","lastPiece","splitMessageBasedOnCaretPosition","onGifClick","gif","_textboxRef$current7","test","enableGifPicker","EnableGifPicker","topOffset","rightOffset","_textboxRef$current8","stopPropagation","EmoticonPlusOutlineIcon","size","color","rootId","root_id","scroll","Textbox","tabIndex","onChange","onKeyPress","_textboxRef$current4","codeBlockOnCtrlEnter","inputBox","allowSending","ignoreKeyPress","postMessageOnKeyPress","Date","now","blur","onKeyDown","ctrlOrMetaKeyPressed","ctrlKey","metaKey","ctrlKeyCombo","Keyboard","altKey","shiftKey","ctrlAltCombo","ctrlEnterKeyCombo","ENTER","markdownLinkKey","K","lastMessageReactionKeyCombo","BACK_SLASH","nativeEvent","ESCAPE","markdownMode","currentTarget","B","I","onBlur","onHeightChange","handleHeightChange","height","maxHeight","handlePostError","_postError","onPaste","emojiEnabled","createMessage","supportsCommands","suggestionListPosition","characterLimit","maxPostSize","useChannelMentions","InformationOutlineIcon","readOnlyChannel","teamId","isRHSOpened","isEditHistoryShowing","addMessageIntoHistory","scrollPostListToBottom","connect","getConfig","currentUserId","getCurrentUserId","isAuthor","_editingPost","getPostDraft","getEditingPostDetailsAndPost","user_id","getCurrentTeamId","deletePermission","Permissions","DELETE_OTHERS_POSTS","editPermission","EDIT_POST","EDIT_OTHERS_POSTS","haveIChannelPermission","USE_CHANNEL_MENTIONS","parseInt","MaxPostSize","DEFAULT_CHARACTER_LIMIT","DEFAULT_CHANNEL","getIsRhsOpen","getRhsState","RHSStates","EDIT_HISTORY","bindActionCreators","setGlobalItem","DeleteDraftModal","scheduledDraft","DraftActions","canEdit","canSend","onSchedule","handleScheduleDraft","ownProps","userId","channelName","channelType","teammateId","teammate","getUserIdFromChannelName","getUser","displayUsername","getTeammateNameDisplaySetting","DraftTitle","membersCount","selfDraft","getMissingProfilesByIds","GM_CHANNEL","batchGetProfilesInChannel","you","PRIVATE_CHANNEL","Avatar","username","url","imageURLForUser","last_picture_update","span","chunks","getMemberCount","makeGetGmChannelMemberCount","isEligibleForClick","makeIsEligibleForClick","Panel","hasError","innerRef","isHighlighted","hover","setHover","draftError","highlighted","onMouseOver","handleMouseOver","onMouseLeave","handleMouseLeave","role","OPTIONS","disableGroupHighlight","mentionHighlight","PanelBody","fileInfos","priority","status","uploadsInProgress","currentRelativeTeamUrl","getCurrentRelativeTeamUrl","handleClick","handleFormattedTextClick","ProfilePicture","src","ShowMore","text","PriorityLabels","canRemove","persistentNotifications","persistent_notifications","requestedAck","requested_ack","Markdown","options","FilePreview","errorCodeToErrorMessage","defineMessages","unknown","channel_archived","channel_not_found","user_missing","user_deleted","no_channel_permission","no_channel_member","thread_deleted","unable_to_send","invalid_post","getErrorStringFromCode","intl","_errorCodeToErrorMess","textDefinition","arguments","toUpperCase","mockLastBlurAt","DraftRow","item","user","isRemote","scrollIntoView","isEditing","setIsEditing","isScheduledPost","serverError","setServerError","history","useHistory","getChannelSelector","useMemo","makeGetChannel","getThreadOrSynthetic","makeGetThreadOrSynthetic","rootPostDeleted","rootPost","getPost","tooLong","readOnly","team_id","CREATE_POST","channelUrl","getChannelURL","goToMessage","selectPostById","push","isBeingScheduled","isScheduledPostBeingSent","thread","handleOnDelete","DRAFT","COMMENT_DRAFT","removeDraft","afterSubmit","created","deleteScheduledPost","onSubmitCheck","prioritySubmitCheck","usePriority","handleOnSend","useSubmit","onScheduleDraft","scheduledAt","Promise","resolve","draftActions","handleCancelEdit","handleSchedulePostOnReschedule","_result$error","updatedScheduledAtTime","handleSchedulePostOnDelete","_result$error2","handleSchedulePostEdit","handleCopyText","copyToClipboard","handleScheduledPostOnSend","postDraft","scheduledPostToPostDraft","keepDraft","ignorePostError","scheduledPostActions","getPostAction","alertRef","behavior","useScrollOnRender","timestamp","_item$metadata","metadata","files","updateAt","_ref2","_item$metadata2","Header","kind","remote","EditScheduledPost","width","viewBox","fill","xmlns","clipPath","y","rx","fillOpacity","d","stroke","strokeOpacity","strokeLinecap","strokeLinejoin","cx","cy","r","transform","x1","y1","x2","y2","DraftList","drafts","draftRemotes","map","NoResultsIndicator","expanded","iconGraphic","DraftsIllustration","subtitle","opacity","ScheduledPostList","scheduledPosts","currentTeamId","scheduledPostsHasError","hasScheduledPostError","targetId","useQuery","get","targetScheduledPostId","AlertBanner","mode","isInTargetChannelOrThread","NoScheduledPostsIllustration","Tab","unmountOnExit","tabClassName","eventKey","ReactBootstrapTab","Tabs","activeKey","onSelect","mountOnEnter","ReactBootstrapTabs","autoFocus","EMPTY_LIST","Drafts","useRouteMatch","isDraftsTab","isScheduledPostsTab","SCHEDULED_POST_URL_SUFFIX","getScheduledPostsByTeam","makeGetScheduledPostsByTeam","isScheduledPostEnabled","isScheduledPostsEnabled","selectLhsItem","LhsItemType","Page","LhsPage","suppressRHS","unsuppressRHS","handleSwitchTabs","team","scheduledPostsTabHeading","Badge","draftTabHeading","heading","activeTab","level","getDrafts","makeGetDrafts","getCurrentUser","getStatusForUserId","views","remotes","Headings","Fragment","right","attrs","H","assign","URLSearchParams","useLocation","search"],"sourceRoot":""}