@azure/communication-react 1.17.0-alpha-202406020014 → 1.17.0-alpha-202406050014
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +7 -8
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BQpOd_cF.js → ChatMessageComponentAsRichTextEditBox-CueWJlOs.js} +12 -12
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CueWJlOs.js.map +1 -0
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CBQNEhRD.js → RichTextSendBoxWrapper-DORQ6cdT.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CBQNEhRD.js.map → RichTextSendBoxWrapper-DORQ6cdT.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-xYWFdTrM.js → index-B4rHuheV.js} +240 -216
- package/dist/dist-cjs/communication-react/index-B4rHuheV.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/common.d.ts +1 -1
- package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +4 -4
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +6 -6
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +4 -2
- package/dist/dist-esm/communication-react/src/index.js +1 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +30 -13
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +4 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +9 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +7 -7
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +12 -12
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +14 -14
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +5 -5
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +9 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +10 -10
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.js +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js +4 -4
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +6 -7
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +32 -32
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +6 -6
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.js +22 -22
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.js +5 -3
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -2
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +7 -7
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +10 -9
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -4
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/common.js +2 -2
- package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +8 -6
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +0 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +30 -26
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +7 -7
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +11 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/package.json +2 -2
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-BQpOd_cF.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-xYWFdTrM.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"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AY,EAAE,gBAAgB,EAC9B,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;wBACb,IAAI,CAAC,iBAAiB,EAAE,CAAC;4BACvB,kBAAkB,EAAE,CAAC;wBACvB,CAAC;wBACD,CAAC,CAAC,eAAe,EAAE,CAAC;oBACtB,CAAC,EACD,EAAE,EAAE,iBAAiB,EACrB,SAAS,EAAE,qBAAqB,EAChC,SAAS,EAAE,aAAa,CAAC,mBAAmB,EAC5C,cAAc,EAAE,aAAa,CAAC,mBAAmB,EACjD,YAAY,EAAE,gCAAgC,GAC9C,CACgB;YAElB,oDAAoD;YACpD,yBAAyB,EAAE,CAEvB,CACF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useState, useMemo, useCallback } from 'react';\nimport { IStyle, ITextField, mergeStyles, concatStyleSets, Icon, Stack } from '@fluentui/react';\nimport { sendButtonStyle, sendIconStyle, sendBoxWrapperStyles, borderAndBoxShadowStyle } from './styles/SendBox.styles';\nimport { BaseCustomStyles } from '../types';\nimport { useTheme } from '../theming';\nimport { useLocale } from '../localization';\nimport { useIdentifiers } from '../identifiers';\nimport { InputBoxComponent } from './InputBoxComponent';\nimport { InputBoxButton } from './InputBoxButton';\n/* @conditional-compile-remove(attachment-upload) */\nimport { SendBoxErrors } from './SendBoxErrors';\n/* @conditional-compile-remove(attachment-upload) */\nimport { _AttachmentUploadCards } from './Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMetadataInProgress, MessageOptions } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(attachment-upload) */\nimport { attachmentUploadCardsStyles } from './styles/SendBox.styles';\n/* @conditional-compile-remove(attachment-upload) */\nimport { SendBoxErrorBarError } from './SendBoxErrorBar';\n/* @conditional-compile-remove(attachment-upload) */\nimport { isAttachmentUploadCompleted, hasIncompleteAttachmentUploads } from './utils/SendBoxUtils';\nimport {\n MAXIMUM_LENGTH_OF_MESSAGE,\n isMessageTooLong,\n sanitizeText,\n isSendBoxButtonAriaDisabled\n} from './utils/SendBoxUtils';\n/* @conditional-compile-remove(mention) */\nimport { MentionLookupOptions } from './MentionPopover';\n/* @conditional-compile-remove(attachment-upload) */\nimport { FluentV9ThemeProvider } from '../theming/FluentV9ThemeProvider';\n\n/**\n * Fluent styles for {@link Sendbox}.\n *\n * @public\n */\nexport interface SendBoxStylesProps extends BaseCustomStyles {\n /** Styles for the text field. */\n textField?: IStyle;\n /** styles for the text field container */\n textFieldContainer?: IStyle;\n /** Styles for the container of the send message icon. */\n sendMessageIconContainer?: IStyle;\n /** Styles for the send message icon; These styles will be ignored when a custom send message icon is provided. */\n sendMessageIcon?: IStyle;\n /** Styles for the system message; These styles will be ignored when a custom system message component is provided. */\n systemMessage?: IStyle;\n}\n\n/**\n * Strings of {@link SendBox} that can be overridden.\n *\n * @public\n */\nexport interface SendBoxStrings {\n /**\n * Placeholder text in SendBox when there is no user input\n */\n placeholderText: string;\n /**\n * The warning message when send box text length is more than max limit\n */\n textTooLong: string;\n /**\n * Aria label for send message button\n */\n sendButtonAriaLabel: string;\n /* @conditional-compile-remove(attachment-upload) */\n /**\n * Error message indicating that all attachment uploads are not complete.\n */\n attachmentUploadsPendingError: string;\n /* @conditional-compile-remove(attachment-upload) */\n /**\n * Aria label to notify user when focus is on cancel attachment upload button.\n */\n removeAttachment: string;\n /* @conditional-compile-remove(attachment-upload) */\n /**\n * Aria label to notify user attachment uploading starts.\n */\n uploading: string;\n /* @conditional-compile-remove(attachment-upload) */\n /**\n * Aria label to notify user attachment is uploaded.\n */\n uploadCompleted: string;\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n /**\n * Aria label to notify user more attachment action menu.\n */\n attachmentMoreMenu: string;\n}\n\n/**\n * Props for {@link SendBox}.\n *\n * @public\n */\nexport interface SendBoxProps {\n /**\n * Optional boolean to disable text box\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Optional text for system message below text box\n */\n systemMessage?: string;\n /**\n * Optional override behavior on send button click\n */\n onSendMessage?: (\n content: string,\n /* @conditional-compile-remove(attachment-upload) */\n options?: MessageOptions\n ) => Promise<void>;\n /* @conditional-compile-remove(mention) */\n /**\n * Optional props needed to lookup suggestions in the mention scenario.\n * @beta\n */\n mentionLookupOptions?: MentionLookupOptions;\n\n /**\n * Optional callback called when user is typing\n */\n onTyping?: () => Promise<void>;\n /**\n * Optional callback to render system message below the SendBox.\n * @defaultValue MessageBar\n */\n onRenderSystemMessage?: (systemMessage: string | undefined) => React.ReactElement;\n /**\n * Optional boolean to support new line in SendBox.\n * @defaultValue false\n */\n supportNewline?: boolean;\n /**\n * Optional callback to render send button icon to the right of the SendBox.\n * @defaultValue SendBoxSendHovered icon when mouse over icon and SendBoxSend icon otherwise\n */\n onRenderIcon?: (isHover: boolean) => JSX.Element;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <SendBox styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: SendBoxStylesProps;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<SendBoxStrings>;\n /**\n * enumerable to determine if the input box has focus on render or not.\n * When undefined nothing has focus on render\n */\n autoFocus?: 'sendBoxTextField';\n /* @conditional-compile-remove(attachment-upload) */\n /**\n * Optional callback to render uploaded attachments in the SendBox. The sendBox will expand\n * vertically to accommodate the uploaded attachments. Attachment uploads will\n * be rendered below the text area in sendBox.\n * @beta\n */\n onRenderAttachmentUploads?: () => JSX.Element;\n /* @conditional-compile-remove(attachment-upload) */\n /**\n * Optional array of type {@link AttachmentMetadataInProgress}\n * to render attachments being uploaded in the SendBox.\n * @beta\n */\n attachments?: AttachmentMetadataInProgress[];\n /* @conditional-compile-remove(attachment-upload) */\n /**\n * Optional callback to remove the attachment upload before sending by clicking on\n * cancel icon.\n * @beta\n */\n onCancelAttachmentUpload?: (attachmentId: string) => void;\n}\n\n/**\n * Component for typing and sending messages.\n *\n * Supports sending typing notification when user starts entering text.\n * Supports an optional message below the text input field.\n *\n * @public\n */\nexport const SendBox = (props: SendBoxProps): JSX.Element => {\n const {\n disabled,\n systemMessage,\n supportNewline,\n onSendMessage,\n onTyping,\n onRenderIcon,\n onRenderSystemMessage,\n styles,\n autoFocus,\n /* @conditional-compile-remove(mention) */\n mentionLookupOptions,\n /* @conditional-compile-remove(attachment-upload) */\n attachments\n } = props;\n const theme = useTheme();\n const localeStrings = useLocale().strings.sendBox;\n const strings = { ...localeStrings, ...props.strings };\n const ids = useIdentifiers();\n\n const [textValue, setTextValue] = useState('');\n const [textValueOverflow, setTextValueOverflow] = useState(false);\n\n const sendTextFieldRef = React.useRef<ITextField>(null);\n\n /* @conditional-compile-remove(attachment-upload) */\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n undefined\n );\n\n const sendMessageOnClick = (): void => {\n // don't send a message when disabled\n if (disabled || textValueOverflow) {\n return;\n }\n\n // Don't send message until all attachments have been uploaded successfully\n /* @conditional-compile-remove(attachment-upload) */\n setAttachmentUploadsPendingError(undefined);\n\n /* @conditional-compile-remove(attachment-upload) */\n if (hasIncompleteAttachmentUploads(attachments)) {\n setAttachmentUploadsPendingError({ message: strings.attachmentUploadsPendingError, timestamp: Date.now() });\n return;\n }\n\n const message = textValue;\n // we don't want to send empty messages including spaces, newlines, tabs\n // Message can be empty if there is a valid attachment upload\n if (\n sanitizeText(message).length > 0 ||\n /* @conditional-compile-remove(attachment-upload) */ isAttachmentUploadCompleted(attachments)\n ) {\n onSendMessage &&\n onSendMessage(\n message,\n /* @conditional-compile-remove(attachment-upload) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */\n {\n /* @conditional-compile-remove(attachment-upload) */\n attachments: toAttachmentMetadata(attachments),\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n type: 'text'\n }\n );\n setTextValue('');\n sendTextFieldRef.current?.focus();\n }\n };\n\n /* @conditional-compile-remove(attachment-upload) */\n const toAttachmentMetadata = useCallback((attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined) => {\n return attachmentsWithProgress\n ?.filter((attachment) => {\n return !('error' in attachment) && !attachment.error?.message;\n })\n .map((attachment) => {\n return {\n id: attachment.id,\n name: attachment.name,\n url: attachment.url ?? ''\n };\n });\n }, []);\n\n const setText = (newValue?: string | undefined): void => {\n if (newValue === undefined) {\n return;\n }\n\n setTextValueOverflow(isMessageTooLong(newValue.length));\n setTextValue(newValue);\n };\n\n const textTooLongMessage = textValueOverflow ? strings.textTooLong : undefined;\n const errorMessage = systemMessage ?? textTooLongMessage;\n\n const mergedSendButtonStyle = useMemo(\n () => mergeStyles(sendButtonStyle, styles?.sendMessageIconContainer),\n [styles?.sendMessageIconContainer]\n );\n\n const mergedStyles = useMemo(() => concatStyleSets(styles), [styles]);\n\n const mergedSendIconStyle = useMemo(\n () =>\n sendIconStyle({\n theme,\n hasText: sanitizeText(textValue).length > 0,\n /* @conditional-compile-remove(attachment-upload) */ hasAttachment: isAttachmentUploadCompleted(attachments),\n hasErrorMessage: !!errorMessage,\n customSendIconStyle: styles?.sendMessageIcon,\n disabled: !!disabled\n }),\n [\n theme,\n textValue,\n /* @conditional-compile-remove(attachment-upload) */ attachments,\n errorMessage,\n styles?.sendMessageIcon,\n disabled\n ]\n );\n\n const isSendBoxButtonAriaDisabledValue = useMemo(() => {\n return isSendBoxButtonAriaDisabled({\n hasContent: sanitizeText(textValue).length > 0,\n /* @conditional-compile-remove(attachment-upload) */ hasCompletedAttachmentUploads:\n isAttachmentUploadCompleted(attachments),\n hasError: !!errorMessage,\n disabled: !!disabled\n });\n }, [\n /* @conditional-compile-remove(attachment-upload) */\n attachments,\n disabled,\n errorMessage,\n textValue\n ]);\n\n const onRenderSendIcon = useCallback(\n (isHover: boolean) =>\n onRenderIcon ? (\n onRenderIcon(isHover)\n ) : (\n <Icon iconName={isHover && textValue ? 'SendBoxSendHovered' : 'SendBoxSend'} className={mergedSendIconStyle} />\n ),\n [mergedSendIconStyle, onRenderIcon, textValue]\n );\n\n // Ensure that errors are cleared when there are no attachments in sendBox\n /* @conditional-compile-remove(attachment-upload) */\n React.useEffect(() => {\n if (!attachments?.filter((upload) => !upload.error).length) {\n setAttachmentUploadsPendingError(undefined);\n }\n }, [attachments]);\n\n /* @conditional-compile-remove(attachment-upload) */\n const sendBoxErrorsProps = useMemo(() => {\n return {\n attachmentUploadsPendingError: attachmentUploadsPendingError,\n attachmentProgressError: attachments?.filter((attachmentUpload) => attachmentUpload.error).pop()?.error\n };\n }, [attachments, attachmentUploadsPendingError]);\n\n /* @conditional-compile-remove(attachment-upload) */\n const onRenderAttachmentUploads = useCallback(() => {\n if (!attachments?.filter((upload) => !upload.error).length) {\n return null;\n }\n return props.onRenderAttachmentUploads ? (\n props.onRenderAttachmentUploads()\n ) : (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n attachments={attachments}\n onCancelAttachmentUpload={props.onCancelAttachmentUpload}\n strings={{\n removeAttachment: props.strings?.removeAttachment ?? localeStrings.removeAttachment,\n uploading: props.strings?.uploading ?? localeStrings.uploading,\n uploadCompleted: props.strings?.uploadCompleted ?? localeStrings.uploadCompleted,\n attachmentMoreMenu: props.strings?.attachmentMoreMenu ?? localeStrings.attachmentMoreMenu\n }}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [\n attachments,\n props,\n theme,\n localeStrings.removeAttachment,\n localeStrings.uploading,\n localeStrings.uploadCompleted,\n localeStrings.attachmentMoreMenu\n ]);\n\n return (\n <Stack\n className={mergeStyles(\n sendBoxWrapperStyles,\n { overflow: 'visible' } // This is needed for the mention popup to be visible\n )}\n >\n {\n /* @conditional-compile-remove(attachment-upload) */\n <SendBoxErrors\n attachmentProgressError={\n sendBoxErrorsProps.attachmentProgressError\n ? {\n message: sendBoxErrorsProps.attachmentProgressError.message,\n timestamp: Date.now()\n }\n : undefined\n }\n attachmentUploadsPendingError={sendBoxErrorsProps.attachmentUploadsPendingError}\n />\n }\n <Stack\n className={borderAndBoxShadowStyle({\n theme,\n hasErrorMessage: !!errorMessage,\n disabled: !!disabled\n })}\n >\n <InputBoxComponent\n autoFocus={autoFocus}\n data-ui-id={ids.sendboxTextField}\n disabled={disabled}\n errorMessage={onRenderSystemMessage ? onRenderSystemMessage(errorMessage) : errorMessage}\n textFieldRef={sendTextFieldRef}\n id=\"sendbox\"\n placeholderText={strings.placeholderText}\n textValue={textValue}\n onChange={(_, newValue) => setText(newValue)}\n onKeyDown={(ev) => {\n const keyWasSendingMessage = ev.key === 'Enter' && (ev.shiftKey === false || !supportNewline);\n if (!keyWasSendingMessage) {\n onTyping?.();\n }\n }}\n onEnterKeyDown={() => {\n sendMessageOnClick();\n }}\n styles={mergedStyles}\n supportNewline={supportNewline}\n maxLength={MAXIMUM_LENGTH_OF_MESSAGE}\n /* @conditional-compile-remove(mention) */\n mentionLookupOptions={mentionLookupOptions}\n >\n <InputBoxButton\n onRenderIcon={onRenderSendIcon}\n onClick={(e) => {\n if (!textValueOverflow) {\n sendMessageOnClick();\n }\n e.stopPropagation();\n }}\n id={'sendIconWrapper'}\n className={mergedSendButtonStyle}\n ariaLabel={localeStrings.sendButtonAriaLabel}\n tooltipContent={localeStrings.sendButtonAriaLabel}\n ariaDisabled={isSendBoxButtonAriaDisabledValue}\n />\n </InputBoxComponent>\n {\n /* @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentUploads()\n }\n </Stack>\n </Stack>\n );\n};\n"]}
|
1
|
+
{"version":3,"file":"SendBox.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/SendBox.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAsB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAA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B,EAC5C,cAAc,EAAE,aAAa,CAAC,mBAAmB,EACjD,YAAY,EAAE,gCAAgC,GAC9C,CACgB;YAElB,mDAAmD;YACnD,yBAAyB,EAAE,CAEvB,CACF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useState, useMemo, useCallback } from 'react';\nimport { IStyle, ITextField, mergeStyles, concatStyleSets, Icon, Stack } from '@fluentui/react';\nimport { sendButtonStyle, sendIconStyle, sendBoxWrapperStyles, borderAndBoxShadowStyle } from './styles/SendBox.styles';\nimport { BaseCustomStyles } from '../types';\nimport { useTheme } from '../theming';\nimport { useLocale } from '../localization';\nimport { useIdentifiers } from '../identifiers';\nimport { InputBoxComponent } from './InputBoxComponent';\nimport { InputBoxButton } from './InputBoxButton';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { SendBoxErrors } from './SendBoxErrors';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { _AttachmentUploadCards } from './Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadataInProgress, MessageOptions } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { attachmentUploadCardsStyles } from './styles/SendBox.styles';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { SendBoxErrorBarError } from './SendBoxErrorBar';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { isAttachmentUploadCompleted, hasIncompleteAttachmentUploads } from './utils/SendBoxUtils';\nimport {\n MAXIMUM_LENGTH_OF_MESSAGE,\n isMessageTooLong,\n sanitizeText,\n isSendBoxButtonAriaDisabled\n} from './utils/SendBoxUtils';\n/* @conditional-compile-remove(mention) */\nimport { MentionLookupOptions } from './MentionPopover';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { FluentV9ThemeProvider } from '../theming/FluentV9ThemeProvider';\n\n/**\n * Fluent styles for {@link Sendbox}.\n *\n * @public\n */\nexport interface SendBoxStylesProps extends BaseCustomStyles {\n /** Styles for the text field. */\n textField?: IStyle;\n /** styles for the text field container */\n textFieldContainer?: IStyle;\n /** Styles for the container of the send message icon. */\n sendMessageIconContainer?: IStyle;\n /** Styles for the send message icon; These styles will be ignored when a custom send message icon is provided. */\n sendMessageIcon?: IStyle;\n /** Styles for the system message; These styles will be ignored when a custom system message component is provided. */\n systemMessage?: IStyle;\n}\n\n/**\n * Strings of {@link SendBox} that can be overridden.\n *\n * @public\n */\nexport interface SendBoxStrings {\n /**\n * Placeholder text in SendBox when there is no user input\n */\n placeholderText: string;\n /**\n * The warning message when send box text length is more than max limit\n */\n textTooLong: string;\n /**\n * Aria label for send message button\n */\n sendButtonAriaLabel: string;\n /* @conditional-compile-remove(file-sharing-acs) */\n /**\n * Error message indicating that all attachment uploads are not complete.\n */\n attachmentUploadsPendingError: string;\n /* @conditional-compile-remove(file-sharing-acs) */\n /**\n * Aria label to notify user when focus is on cancel attachment upload button.\n */\n removeAttachment: string;\n /* @conditional-compile-remove(file-sharing-acs) */\n /**\n * Aria label to notify user attachment uploading starts.\n */\n uploading: string;\n /* @conditional-compile-remove(file-sharing-acs) */\n /**\n * Aria label to notify user attachment is uploaded.\n */\n uploadCompleted: string;\n /* @conditional-compile-remove(file-sharing-acs) */\n /**\n * Aria label to notify user more attachment action menu.\n */\n attachmentMoreMenu: string;\n}\n\n/**\n * Props for {@link SendBox}.\n *\n * @public\n */\nexport interface SendBoxProps {\n /**\n * Optional boolean to disable text box\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Optional text for system message below text box\n */\n systemMessage?: string;\n /**\n * Optional override behavior on send button click\n */\n onSendMessage?: (\n content: string,\n /* @conditional-compile-remove(file-sharing-acs) */\n options?: MessageOptions\n ) => Promise<void>;\n /* @conditional-compile-remove(mention) */\n /**\n * Optional props needed to lookup suggestions in the mention scenario.\n * @beta\n */\n mentionLookupOptions?: MentionLookupOptions;\n\n /**\n * Optional callback called when user is typing\n */\n onTyping?: () => Promise<void>;\n /**\n * Optional callback to render system message below the SendBox.\n * @defaultValue MessageBar\n */\n onRenderSystemMessage?: (systemMessage: string | undefined) => React.ReactElement;\n /**\n * Optional boolean to support new line in SendBox.\n * @defaultValue false\n */\n supportNewline?: boolean;\n /**\n * Optional callback to render send button icon to the right of the SendBox.\n * @defaultValue SendBoxSendHovered icon when mouse over icon and SendBoxSend icon otherwise\n */\n onRenderIcon?: (isHover: boolean) => JSX.Element;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <SendBox styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: SendBoxStylesProps;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<SendBoxStrings>;\n /**\n * enumerable to determine if the input box has focus on render or not.\n * When undefined nothing has focus on render\n */\n autoFocus?: 'sendBoxTextField';\n /* @conditional-compile-remove(file-sharing-acs) */\n /**\n * Optional callback to render uploaded attachments in the SendBox. The sendBox will expand\n * vertically to accommodate the uploaded attachments. Attachment uploads will\n * be rendered below the text area in sendBox.\n * @beta\n */\n onRenderAttachmentUploads?: () => JSX.Element;\n /* @conditional-compile-remove(file-sharing-acs) */\n /**\n * Optional array of type {@link AttachmentMetadataInProgress}\n * to render attachments being uploaded in the SendBox.\n * @beta\n */\n attachments?: AttachmentMetadataInProgress[];\n /* @conditional-compile-remove(file-sharing-acs) */\n /**\n * Optional callback to remove the attachment upload before sending by clicking on\n * cancel icon.\n * @beta\n */\n onCancelAttachmentUpload?: (attachmentId: string) => void;\n}\n\n/**\n * Component for typing and sending messages.\n *\n * Supports sending typing notification when user starts entering text.\n * Supports an optional message below the text input field.\n *\n * @public\n */\nexport const SendBox = (props: SendBoxProps): JSX.Element => {\n const {\n disabled,\n systemMessage,\n supportNewline,\n onSendMessage,\n onTyping,\n onRenderIcon,\n onRenderSystemMessage,\n styles,\n autoFocus,\n /* @conditional-compile-remove(mention) */\n mentionLookupOptions,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachments\n } = props;\n const theme = useTheme();\n const localeStrings = useLocale().strings.sendBox;\n const strings = { ...localeStrings, ...props.strings };\n const ids = useIdentifiers();\n\n const [textValue, setTextValue] = useState('');\n const [textValueOverflow, setTextValueOverflow] = useState(false);\n\n const sendTextFieldRef = React.useRef<ITextField>(null);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n undefined\n );\n\n const sendMessageOnClick = (): void => {\n // don't send a message when disabled\n if (disabled || textValueOverflow) {\n return;\n }\n\n // Don't send message until all attachments have been uploaded successfully\n /* @conditional-compile-remove(file-sharing-acs) */\n setAttachmentUploadsPendingError(undefined);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n if (hasIncompleteAttachmentUploads(attachments)) {\n setAttachmentUploadsPendingError({ message: strings.attachmentUploadsPendingError, timestamp: Date.now() });\n return;\n }\n\n const message = textValue;\n // we don't want to send empty messages including spaces, newlines, tabs\n // Message can be empty if there is a valid attachment upload\n if (\n sanitizeText(message).length > 0 ||\n /* @conditional-compile-remove(file-sharing-acs) */ isAttachmentUploadCompleted(attachments)\n ) {\n onSendMessage &&\n onSendMessage(\n message,\n /* @conditional-compile-remove(file-sharing-acs) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */\n {\n /* @conditional-compile-remove(file-sharing-acs) */\n attachments: toAttachmentMetadata(attachments),\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n type: 'text'\n }\n );\n setTextValue('');\n sendTextFieldRef.current?.focus();\n }\n };\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const toAttachmentMetadata = useCallback((attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined) => {\n return attachmentsWithProgress\n ?.filter((attachment) => {\n return !('error' in attachment) && !attachment.error?.message;\n })\n .map((attachment) => {\n return {\n id: attachment.id,\n name: attachment.name,\n url: attachment.url ?? ''\n };\n });\n }, []);\n\n const setText = (newValue?: string | undefined): void => {\n if (newValue === undefined) {\n return;\n }\n\n setTextValueOverflow(isMessageTooLong(newValue.length));\n setTextValue(newValue);\n };\n\n const textTooLongMessage = textValueOverflow ? strings.textTooLong : undefined;\n const errorMessage = systemMessage ?? textTooLongMessage;\n\n const mergedSendButtonStyle = useMemo(\n () => mergeStyles(sendButtonStyle, styles?.sendMessageIconContainer),\n [styles?.sendMessageIconContainer]\n );\n\n const mergedStyles = useMemo(() => concatStyleSets(styles), [styles]);\n\n const mergedSendIconStyle = useMemo(\n () =>\n sendIconStyle({\n theme,\n hasText: sanitizeText(textValue).length > 0,\n /* @conditional-compile-remove(file-sharing-acs) */ hasAttachment: isAttachmentUploadCompleted(attachments),\n hasErrorMessage: !!errorMessage,\n customSendIconStyle: styles?.sendMessageIcon,\n disabled: !!disabled\n }),\n [\n theme,\n textValue,\n /* @conditional-compile-remove(file-sharing-acs) */ attachments,\n errorMessage,\n styles?.sendMessageIcon,\n disabled\n ]\n );\n\n const isSendBoxButtonAriaDisabledValue = useMemo(() => {\n return isSendBoxButtonAriaDisabled({\n hasContent: sanitizeText(textValue).length > 0,\n /* @conditional-compile-remove(file-sharing-acs) */ hasCompletedAttachmentUploads:\n isAttachmentUploadCompleted(attachments),\n hasError: !!errorMessage,\n disabled: !!disabled\n });\n }, [\n /* @conditional-compile-remove(file-sharing-acs) */\n attachments,\n disabled,\n errorMessage,\n textValue\n ]);\n\n const onRenderSendIcon = useCallback(\n (isHover: boolean) =>\n onRenderIcon ? (\n onRenderIcon(isHover)\n ) : (\n <Icon iconName={isHover && textValue ? 'SendBoxSendHovered' : 'SendBoxSend'} className={mergedSendIconStyle} />\n ),\n [mergedSendIconStyle, onRenderIcon, textValue]\n );\n\n // Ensure that errors are cleared when there are no attachments in sendBox\n /* @conditional-compile-remove(file-sharing-acs) */\n React.useEffect(() => {\n if (!attachments?.filter((upload) => !upload.error).length) {\n setAttachmentUploadsPendingError(undefined);\n }\n }, [attachments]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const sendBoxErrorsProps = useMemo(() => {\n return {\n attachmentUploadsPendingError: attachmentUploadsPendingError,\n attachmentProgressError: attachments?.filter((attachmentUpload) => attachmentUpload.error).pop()?.error\n };\n }, [attachments, attachmentUploadsPendingError]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onRenderAttachmentUploads = useCallback(() => {\n if (!attachments?.filter((upload) => !upload.error).length) {\n return null;\n }\n return props.onRenderAttachmentUploads ? (\n props.onRenderAttachmentUploads()\n ) : (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n attachments={attachments}\n onCancelAttachmentUpload={props.onCancelAttachmentUpload}\n strings={{\n removeAttachment: props.strings?.removeAttachment ?? localeStrings.removeAttachment,\n uploading: props.strings?.uploading ?? localeStrings.uploading,\n uploadCompleted: props.strings?.uploadCompleted ?? localeStrings.uploadCompleted,\n attachmentMoreMenu: props.strings?.attachmentMoreMenu ?? localeStrings.attachmentMoreMenu\n }}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [\n attachments,\n props,\n theme,\n localeStrings.removeAttachment,\n localeStrings.uploading,\n localeStrings.uploadCompleted,\n localeStrings.attachmentMoreMenu\n ]);\n\n return (\n <Stack\n className={mergeStyles(\n sendBoxWrapperStyles,\n { overflow: 'visible' } // This is needed for the mention popup to be visible\n )}\n >\n {\n /* @conditional-compile-remove(file-sharing-acs) */\n <SendBoxErrors\n attachmentProgressError={\n sendBoxErrorsProps.attachmentProgressError\n ? {\n message: sendBoxErrorsProps.attachmentProgressError.message,\n timestamp: Date.now()\n }\n : undefined\n }\n attachmentUploadsPendingError={sendBoxErrorsProps.attachmentUploadsPendingError}\n />\n }\n <Stack\n className={borderAndBoxShadowStyle({\n theme,\n hasErrorMessage: !!errorMessage,\n disabled: !!disabled\n })}\n >\n <InputBoxComponent\n autoFocus={autoFocus}\n data-ui-id={ids.sendboxTextField}\n disabled={disabled}\n errorMessage={onRenderSystemMessage ? onRenderSystemMessage(errorMessage) : errorMessage}\n textFieldRef={sendTextFieldRef}\n id=\"sendbox\"\n placeholderText={strings.placeholderText}\n textValue={textValue}\n onChange={(_, newValue) => setText(newValue)}\n onKeyDown={(ev) => {\n const keyWasSendingMessage = ev.key === 'Enter' && (ev.shiftKey === false || !supportNewline);\n if (!keyWasSendingMessage) {\n onTyping?.();\n }\n }}\n onEnterKeyDown={() => {\n sendMessageOnClick();\n }}\n styles={mergedStyles}\n supportNewline={supportNewline}\n maxLength={MAXIMUM_LENGTH_OF_MESSAGE}\n /* @conditional-compile-remove(mention) */\n mentionLookupOptions={mentionLookupOptions}\n >\n <InputBoxButton\n onRenderIcon={onRenderSendIcon}\n onClick={(e) => {\n if (!textValueOverflow) {\n sendMessageOnClick();\n }\n e.stopPropagation();\n }}\n id={'sendIconWrapper'}\n className={mergedSendButtonStyle}\n ariaLabel={localeStrings.sendButtonAriaLabel}\n tooltipContent={localeStrings.sendButtonAriaLabel}\n ariaDisabled={isSendBoxButtonAriaDisabledValue}\n />\n </InputBoxComponent>\n {\n /* @conditional-compile-remove(file-sharing-acs) */\n onRenderAttachmentUploads()\n }\n </Stack>\n </Stack>\n );\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,0CAA0C;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,mDAAmD;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,qH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AAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAS5F,cAAc,kBAAkB,CAAC;AAEjC,cAAc,WAAW,CAAC;AAE1B,cAAc,uBAAuB,CAAC;AAEtC,cAAc,yBAAyB,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,gDAAgD;AAChD,cAAc,mBAAmB,CAAC;AAClC,gDAAgD;AAChD,cAAc,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { TypingIndicator } from './TypingIndicator';\nexport type { TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps } from './TypingIndicator';\n\nexport { ErrorBar } from './ErrorBar';\nexport type { ActiveErrorMessage, ErrorBarProps, ErrorBarStrings, ErrorType } from './ErrorBar';\n\nexport { GridLayout } from './GridLayout';\nexport type { GridLayoutProps, GridLayoutStyles } from './GridLayout';\n\nexport { SendBox } from './SendBox';\n/* @conditional-compile-remove(mention) */\nexport { _MentionPopover } from './MentionPopover';\n\nexport { ImageOverlay } from './ImageOverlay';\nexport type { ImageOverlayStrings } from './ImageOverlay';\nexport type { SendBoxProps, SendBoxStrings, SendBoxStylesProps } from './SendBox';\n\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from './RichTextEditor/RichTextSendBox';\n// TODO: This component is exported only for testing purposes. Remove this when this component is added to composites\n/* @conditional-compile-remove(rich-text-editor) */\nexport { ChatMessageComponentAsRichTextEditBox } from './ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox';\n// TODO: This component is exported only for testing purposes. Remove this when this component is added to composites\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { ChatMessageComponentAsRichTextEditBoxProps } from './ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from './RichTextEditor/RichTextSendBox';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n _MentionPopoverProps,\n MentionLookupOptions,\n MentionDisplayOptions,\n MentionOptions,\n Mention,\n MentionPopoverStrings\n} from './MentionPopover';\n\nexport type { ImageOverlayProps } from './ImageOverlay';\n\nexport type { InlineImageOptions, InlineImage } from './ChatMessage/ChatMessageContent';\n\nexport { MessageStatusIndicator } from './MessageStatusIndicator';\nexport type { MessageStatusIndicatorProps, MessageStatusIndicatorStrings } from './MessageStatusIndicator';\n\nexport { MessageThread } from './MessageThread';\nexport type {\n MessageProps,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n JumpToNewMessageButtonProps,\n MessageRenderer,\n UpdateMessageCallback,\n CancelEditCallback\n} from './MessageThread';\n\nexport { StreamMedia } from './StreamMedia';\nexport type { StreamMediaProps } from './StreamMedia';\nexport type { LoadingState } from './StreamMedia';\n\nexport { ParticipantItem } from './ParticipantItem';\nexport type { ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\n\nexport { ParticipantList } from './ParticipantList';\nexport type {\n ParticipantListItemStyles,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback\n} from './ParticipantList';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from './ParticipantList';\n\nexport { Announcer } from './Announcer';\nexport type { AnnouncerProps } from './Announcer';\n\nexport { VideoGallery } from './VideoGallery';\nexport type {\n VideoGalleryProps,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoGalleryLayout,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from './VideoGallery';\nexport type { OverflowGalleryPosition } from './VideoGallery';\nexport type { LocalVideoTileSize } from './VideoGallery';\nexport type { HorizontalGalleryStyles } from './HorizontalGallery';\n\nexport { LocalVideoCameraCycleButton } from './LocalVideoCameraButton';\nexport type { LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\n\nexport { CameraButton } from './CameraButton';\nexport type {\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles\n} from './CameraButton';\n\nexport { ControlBar } from './ControlBar';\nexport type { ControlBarProps, ControlBarLayout } from './ControlBar';\n\nexport { ControlBarButton } from './ControlBarButton';\nexport type { ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles } from './ControlBarButton';\n\nexport { EndCallButton } from './EndCallButton';\nexport type { EndCallButtonProps, EndCallButtonStrings } from './EndCallButton';\n\nexport { MicrophoneButton } from './MicrophoneButton';\nexport type {\n MicrophoneButtonStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings\n} from './MicrophoneButton';\n\nexport { DevicesButton, generateDefaultDeviceMenuProps as _generateDefaultDeviceMenuProps } from './DevicesButton';\nexport type {\n OptionsDevice,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n DevicesButtonContextualMenuStyles,\n DeviceMenuProps as _DeviceMenuProps,\n DeviceMenuStrings as _DeviceMenuStrings,\n DeviceMenuStyles as _DeviceMenuStyles\n} from './DevicesButton';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport type { SitePermissionsStrings, SitePermissionsStyles } from './DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDenied } from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedProps\n} from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDeniedIOS } from './DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedIOSProps\n} from './DevicePermissions/BrowserPermissionDeniedIOS';\n\nexport { ParticipantsButton } from './ParticipantsButton';\nexport type {\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles\n} from './ParticipantsButton';\n\nexport { ScreenShareButton } from './ScreenShareButton';\nexport type { ScreenShareButtonProps, ScreenShareButtonStrings } from './ScreenShareButton';\n\nexport { RaiseHandButton } from './RaiseHandButton';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings } from './RaiseHandButton';\nexport { ReactionButton } from './ReactionButton';\nexport type { ReactionButtonProps, ReactionButtonStrings } from './ReactionButton';\nexport { VideoTile } from './VideoTile';\nexport type { VideoTileProps, VideoTileStylesProps, VideoTileStrings } from './VideoTile';\n\nexport { _PictureInPictureInPicture } from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureProps,\n _PictureInPictureInPictureStrings\n} from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureTileProps,\n _TileOrientation\n} from './PictureInPictureInPicture/PictureInPictureInPictureTile';\n\nexport * from './Drawer';\n/* @conditional-compile-remove(attachment-upload) */\nexport type { SendBoxErrorBarError } from './SendBoxErrorBar';\nexport * from './Attachment/AttachmentCard';\nexport * from './Attachment/AttachmentCardGroup';\nexport * from './ModalClone/ModalClone';\nexport * from './Attachment/AttachmentDownloadCards';\nexport type { _AttachmentUploadCardsStrings } from './Attachment/AttachmentUploadCards';\n\nexport type {\n AttachmentOptions,\n AttachmentUploadOptions,\n AttachmentActionHandler,\n AttachmentSelectionHandler,\n AttachmentMetadataWrapper,\n AttachmentRemovalHandler,\n AttachmentUploadTask\n} from '../types/Attachment';\n\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../types/Attachment';\n\nexport { _useContainerHeight, _useContainerWidth } from './utils/responsive';\n\nexport { _ComplianceBanner } from './ComplianceBanner';\nexport type { _ComplianceBannerProps, _ComplianceBannerStrings } from './ComplianceBanner';\nexport { Dialpad } from './Dialpad/Dialpad';\nexport type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from './Dialpad/Dialpad';\nexport type { DialpadMode, LongPressTrigger } from './Dialpad/Dialpad';\n\nexport { _StarSurvey } from './Survey/StarSurvey/StarSurvey';\n\nexport type { _StarSurveyProps, _StarSurveyStrings } from './Survey/StarSurvey/StarSurvey';\n\nexport * from './Survey/SurveyTypes';\n\nexport { _TagsSurvey } from './Survey/TagsSurvey/TagsSurvey';\n\nexport type { _TagsSurveyProps, _TagsSurveyStrings, _IssueCategory, _SurveyTag } from './Survey/TagsSurvey/TagsSurvey';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from './HoldButton';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from './HoldButton';\n\nexport { _LocalVideoTile } from './LocalVideoTile';\nexport { _RemoteVideoTile } from './RemoteVideoTile';\nexport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nexport type { _HighContrastAwareIconProps } from './HighContrastAwareIcon';\n\nexport { UnsupportedBrowser } from './UnsupportedBrowser';\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from './UnsupportedBrowser';\nexport { UnsupportedBrowserVersion } from './UnsupportedBrowserVersion';\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from './UnsupportedBrowserVersion';\nexport { UnsupportedOperatingSystem } from './UnsupportedOperatingSystem';\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from './UnsupportedOperatingSystem';\n\nexport { _TroubleshootingGuideErrorBar } from './TroubleshootingGuideErrorBar';\nexport type {\n _TroubleshootingGuideErrorBarStrings,\n _TroubleshootingGuideErrorBarProps\n} from './TroubleshootingGuideErrorBar';\n\nexport { _DevicePermissionDropdown } from './DevicePermissions/DevicePermissionDropdown';\nexport type {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdownProps,\n _PermissionConstraints\n} from './DevicePermissions/DevicePermissionDropdown';\n\nexport { _VideoEffectsItem } from './VideoEffects/VideoEffectsItem';\nexport type { _VideoEffectsItemProps, _VideoEffectsItemStyles } from './VideoEffects/VideoEffectsItem';\nexport {\n _VideoEffectsItemNoBackground,\n _VideoEffectsItemBlur,\n _VideoEffectsItemAddImage\n} from './VideoEffects/PresetVideoEffectsItems';\n\nexport { _VideoBackgroundEffectsPicker } from './VideoEffects/VideoBackgroundEffectsPicker';\nexport type {\n _VideoBackgroundEffectsPickerProps,\n _VideoBackgroundEffectChoiceOption,\n _VideoBackgroundEffectsPickerStyles\n} from './VideoEffects/VideoBackgroundEffectsPicker';\n\nexport type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from './VerticalGallery';\n\nexport * from './CaptionsBanner';\n\nexport * from './Caption';\n\nexport * from './StartCaptionsButton';\n\nexport * from './CaptionsSettingsModal';\n\nexport { _ErrorBoundary } from './ErrorBoundary';\n/* @conditional-compile-remove(notifications) */\nexport * from './NotificationBar';\n/* @conditional-compile-remove(notifications) */\nexport * from './Notifications';\n"]}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,E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MAAM,gCAAgC,CAAC;AAM/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAOzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAS5F,cAAc,kBAAkB,CAAC;AAEjC,cAAc,WAAW,CAAC;AAE1B,cAAc,uBAAuB,CAAC;AAEtC,cAAc,yBAAyB,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,gDAAgD;AAChD,cAAc,mBAAmB,CAAC;AAClC,gDAAgD;AAChD,cAAc,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { TypingIndicator } from './TypingIndicator';\nexport type { TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps } from './TypingIndicator';\n\nexport { ErrorBar } from './ErrorBar';\nexport type { ActiveErrorMessage, ErrorBarProps, ErrorBarStrings, ErrorType } from './ErrorBar';\n\nexport { GridLayout } from './GridLayout';\nexport type { GridLayoutProps, GridLayoutStyles } from './GridLayout';\n\nexport { SendBox } from './SendBox';\n/* @conditional-compile-remove(mention) */\nexport { _MentionPopover } from './MentionPopover';\n\nexport { ImageOverlay } from './ImageOverlay';\nexport type { ImageOverlayStrings } from './ImageOverlay';\nexport type { SendBoxProps, SendBoxStrings, SendBoxStylesProps } from './SendBox';\n\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from './RichTextEditor/RichTextSendBox';\n// TODO: This component is exported only for testing purposes. Remove this when this component is added to composites\n/* @conditional-compile-remove(rich-text-editor) */\nexport { ChatMessageComponentAsRichTextEditBox } from './ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox';\n// TODO: This component is exported only for testing purposes. Remove this when this component is added to composites\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { ChatMessageComponentAsRichTextEditBoxProps } from './ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from './RichTextEditor/RichTextSendBox';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n _MentionPopoverProps,\n MentionLookupOptions,\n MentionDisplayOptions,\n MentionOptions,\n Mention,\n MentionPopoverStrings\n} from './MentionPopover';\n\nexport type { ImageOverlayProps } from './ImageOverlay';\n\nexport type { InlineImageOptions, InlineImage } from './ChatMessage/ChatMessageContent';\n\nexport { MessageStatusIndicator } from './MessageStatusIndicator';\nexport type { MessageStatusIndicatorProps, MessageStatusIndicatorStrings } from './MessageStatusIndicator';\n\nexport { MessageThread } from './MessageThread';\nexport type {\n MessageProps,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n JumpToNewMessageButtonProps,\n MessageRenderer,\n UpdateMessageCallback,\n CancelEditCallback\n} from './MessageThread';\n\nexport { StreamMedia } from './StreamMedia';\nexport type { StreamMediaProps } from './StreamMedia';\nexport type { LoadingState } from './StreamMedia';\n\nexport { ParticipantItem } from './ParticipantItem';\nexport type { ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\n\nexport { ParticipantList } from './ParticipantList';\nexport type {\n ParticipantListItemStyles,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback\n} from './ParticipantList';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from './ParticipantList';\n\nexport { Announcer } from './Announcer';\nexport type { AnnouncerProps } from './Announcer';\n\nexport { VideoGallery } from './VideoGallery';\nexport type {\n VideoGalleryProps,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoGalleryLayout,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from './VideoGallery';\nexport type { OverflowGalleryPosition } from './VideoGallery';\nexport type { LocalVideoTileSize } from './VideoGallery';\nexport type { HorizontalGalleryStyles } from './HorizontalGallery';\n\nexport { LocalVideoCameraCycleButton } from './LocalVideoCameraButton';\nexport type { LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\n\nexport { CameraButton } from './CameraButton';\nexport type {\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles\n} from './CameraButton';\n\nexport { ControlBar } from './ControlBar';\nexport type { ControlBarProps, ControlBarLayout } from './ControlBar';\n\nexport { ControlBarButton } from './ControlBarButton';\nexport type { ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles } from './ControlBarButton';\n\nexport { EndCallButton } from './EndCallButton';\nexport type { EndCallButtonProps, EndCallButtonStrings } from './EndCallButton';\n\nexport { MicrophoneButton } from './MicrophoneButton';\nexport type {\n MicrophoneButtonStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings\n} from './MicrophoneButton';\n\nexport { DevicesButton, generateDefaultDeviceMenuProps as _generateDefaultDeviceMenuProps } from './DevicesButton';\nexport type {\n OptionsDevice,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n DevicesButtonContextualMenuStyles,\n DeviceMenuProps as _DeviceMenuProps,\n DeviceMenuStrings as _DeviceMenuStrings,\n DeviceMenuStyles as _DeviceMenuStyles\n} from './DevicesButton';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport type { SitePermissionsStrings, SitePermissionsStyles } from './DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDenied } from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedProps\n} from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDeniedIOS } from './DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedIOSProps\n} from './DevicePermissions/BrowserPermissionDeniedIOS';\n\nexport { ParticipantsButton } from './ParticipantsButton';\nexport type {\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles\n} from './ParticipantsButton';\n\nexport { ScreenShareButton } from './ScreenShareButton';\nexport type { ScreenShareButtonProps, ScreenShareButtonStrings } from './ScreenShareButton';\n\nexport { RaiseHandButton } from './RaiseHandButton';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings } from './RaiseHandButton';\nexport { ReactionButton } from './ReactionButton';\nexport type { ReactionButtonProps, ReactionButtonStrings } from './ReactionButton';\nexport { VideoTile } from './VideoTile';\nexport type { VideoTileProps, VideoTileStylesProps, VideoTileStrings } from './VideoTile';\n\nexport { _PictureInPictureInPicture } from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureProps,\n _PictureInPictureInPictureStrings\n} from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureTileProps,\n _TileOrientation\n} from './PictureInPictureInPicture/PictureInPictureInPictureTile';\n\nexport * from './Drawer';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { SendBoxErrorBarError } from './SendBoxErrorBar';\nexport * from './Attachment/AttachmentCard';\nexport * from './Attachment/AttachmentCardGroup';\nexport * from './ModalClone/ModalClone';\nexport * from './Attachment/AttachmentDownloadCards';\nexport type { _AttachmentUploadCardsStrings } from './Attachment/AttachmentUploadCards';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type {\n AttachmentOptions,\n AttachmentUploadOptions,\n AttachmentActionHandler,\n AttachmentSelectionHandler,\n AttachmentMetadataWrapper,\n AttachmentRemovalHandler,\n AttachmentUploadTask\n} from '../types/Attachment';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../types/Attachment';\n\nexport { _useContainerHeight, _useContainerWidth } from './utils/responsive';\n\nexport { _ComplianceBanner } from './ComplianceBanner';\nexport type { _ComplianceBannerProps, _ComplianceBannerStrings } from './ComplianceBanner';\nexport { Dialpad } from './Dialpad/Dialpad';\nexport type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from './Dialpad/Dialpad';\nexport type { DialpadMode, LongPressTrigger } from './Dialpad/Dialpad';\n\nexport { _StarSurvey } from './Survey/StarSurvey/StarSurvey';\n\nexport type { _StarSurveyProps, _StarSurveyStrings } from './Survey/StarSurvey/StarSurvey';\n\nexport * from './Survey/SurveyTypes';\n\nexport { _TagsSurvey } from './Survey/TagsSurvey/TagsSurvey';\n\nexport type { _TagsSurveyProps, _TagsSurveyStrings, _IssueCategory, _SurveyTag } from './Survey/TagsSurvey/TagsSurvey';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from './HoldButton';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from './HoldButton';\n\nexport { _LocalVideoTile } from './LocalVideoTile';\nexport { _RemoteVideoTile } from './RemoteVideoTile';\nexport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nexport type { _HighContrastAwareIconProps } from './HighContrastAwareIcon';\n\nexport { UnsupportedBrowser } from './UnsupportedBrowser';\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from './UnsupportedBrowser';\nexport { UnsupportedBrowserVersion } from './UnsupportedBrowserVersion';\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from './UnsupportedBrowserVersion';\nexport { UnsupportedOperatingSystem } from './UnsupportedOperatingSystem';\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from './UnsupportedOperatingSystem';\n\nexport { _TroubleshootingGuideErrorBar } from './TroubleshootingGuideErrorBar';\nexport type {\n _TroubleshootingGuideErrorBarStrings,\n _TroubleshootingGuideErrorBarProps\n} from './TroubleshootingGuideErrorBar';\n\nexport { _DevicePermissionDropdown } from './DevicePermissions/DevicePermissionDropdown';\nexport type {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdownProps,\n _PermissionConstraints\n} from './DevicePermissions/DevicePermissionDropdown';\n\nexport { _VideoEffectsItem } from './VideoEffects/VideoEffectsItem';\nexport type { _VideoEffectsItemProps, _VideoEffectsItemStyles } from './VideoEffects/VideoEffectsItem';\nexport {\n _VideoEffectsItemNoBackground,\n _VideoEffectsItemBlur,\n _VideoEffectsItemAddImage\n} from './VideoEffects/PresetVideoEffectsItems';\n\nexport { _VideoBackgroundEffectsPicker } from './VideoEffects/VideoBackgroundEffectsPicker';\nexport type {\n _VideoBackgroundEffectsPickerProps,\n _VideoBackgroundEffectChoiceOption,\n _VideoBackgroundEffectsPickerStyles\n} from './VideoEffects/VideoBackgroundEffectsPicker';\n\nexport type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from './VerticalGallery';\n\nexport * from './CaptionsBanner';\n\nexport * from './Caption';\n\nexport * from './StartCaptionsButton';\n\nexport * from './CaptionsSettingsModal';\n\nexport { _ErrorBoundary } from './ErrorBoundary';\n/* @conditional-compile-remove(notifications) */\nexport * from './NotificationBar';\n/* @conditional-compile-remove(notifications) */\nexport * from './Notifications';\n"]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
|
-
import { makeStyles
|
3
|
+
import { makeStyles } from '@fluentui/react-components';
|
4
4
|
import { _ATTACHMENT_CARD_MARGIN_IN_PX, _ATTACHMENT_CARD_WIDTH_IN_REM } from './AttachmentCard.styles';
|
5
5
|
import { _pxToRem } from "../../../../acs-ui-common/src";
|
6
6
|
import { mergeStyles } from '@fluentui/react';
|
@@ -12,7 +12,7 @@ export const useAttachmentCardGroupStyles = makeStyles({
|
|
12
12
|
marginTop: '0.25rem'
|
13
13
|
},
|
14
14
|
singleAttachment: {
|
15
|
-
|
15
|
+
width: `${_ATTACHMENT_CARD_WIDTH_IN_REM}rem`
|
16
16
|
},
|
17
17
|
multipleAttachments: {
|
18
18
|
width: '100%'
|
@@ -22,7 +22,9 @@ export const useAttachmentCardGroupStyles = makeStyles({
|
|
22
22
|
* @private
|
23
23
|
*/
|
24
24
|
export const attachmentCardBaseStyles = mergeStyles({
|
25
|
-
'& > *':
|
25
|
+
'& > *': {
|
26
|
+
margin: `${_pxToRem(_ATTACHMENT_CARD_MARGIN_IN_PX)}`
|
27
|
+
},
|
26
28
|
/**
|
27
29
|
* margin for children is overriden by parent stack, so adding left margin for each child
|
28
30
|
*/
|
package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AttachmentCardGroup.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/AttachmentCardGroup.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,
|
1
|
+
{"version":3,"file":"AttachmentCardGroup.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/AttachmentCardGroup.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,6BAA6B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACvG,OAAO,EAAE,QAAQ,EAAE,sCAAgC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,UAAU,CAAC;IACrD,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;KACrB;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,GAAG,6BAA6B,KAAK;KAC7C;IACD,mBAAmB,EAAE;QACnB,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,WAAW,CAAC;IAClD,OAAO,EAAE;QACP,MAAM,EAAE,GAAG,QAAQ,CAAC,6BAA6B,CAAC,EAAE;KACrD;IACD;;OAEG;IACH,yBAAyB,EAAE;QACzB,UAAU,EAAE,GAAG,QAAQ,CAAC,6BAA6B,CAAC,EAAE;KACzD;CACF,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,WAAW,CAAC;IAClD,OAAO,EAAE,MAAM;IACf,mBAAmB,EAAE,2BAA2B,6BAA6B,YAAY;CAC1F,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,WAAW,CAAC;IAClD,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,MAAM;CACjB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { makeStyles } from '@fluentui/react-components';\nimport { _ATTACHMENT_CARD_MARGIN_IN_PX, _ATTACHMENT_CARD_WIDTH_IN_REM } from './AttachmentCard.styles';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { mergeStyles } from '@fluentui/react';\n\n/**\n * @private\n */\nexport const useAttachmentCardGroupStyles = makeStyles({\n root: {\n marginTop: '0.25rem'\n },\n singleAttachment: {\n width: `${_ATTACHMENT_CARD_WIDTH_IN_REM}rem`\n },\n multipleAttachments: {\n width: '100%'\n }\n});\n\n/**\n * @private\n */\nexport const attachmentCardBaseStyles = mergeStyles({\n '& > *': {\n margin: `${_pxToRem(_ATTACHMENT_CARD_MARGIN_IN_PX)}`\n },\n /**\n * margin for children is overriden by parent stack, so adding left margin for each child\n */\n '& > *:not(:first-child)': {\n marginLeft: `${_pxToRem(_ATTACHMENT_CARD_MARGIN_IN_PX)}`\n }\n});\n\n/**\n * @private\n */\nexport const attachmentCardGirdLayout = mergeStyles({\n display: 'grid',\n gridTemplateColumns: `repeat(auto-fit, minmax(${_ATTACHMENT_CARD_WIDTH_IN_REM}rem, 1fr))`\n});\n\n/**\n * @private\n */\nexport const attachmentCardFlexLayout = mergeStyles({\n display: 'flex',\n flexWrap: 'wrap'\n});\n"]}
|
@@ -33,8 +33,8 @@ export const sendButtonStyle = mergeStyles({
|
|
33
33
|
*/
|
34
34
|
export const sendIconStyle = (props) => {
|
35
35
|
const { theme, hasText, disabled = false,
|
36
|
-
/* @conditional-compile-remove(
|
37
|
-
const hasNoContent = !hasText && /* @conditional-compile-remove(
|
36
|
+
/* @conditional-compile-remove(file-sharing-acs) */ hasAttachment, hasErrorMessage, customSendIconStyle, defaultTextColor = theme.palette.neutralTertiary } = props;
|
37
|
+
const hasNoContent = !hasText && /* @conditional-compile-remove(file-sharing-acs) */ !hasAttachment;
|
38
38
|
return mergeStyles(editorTextBoxButtonStyle, {
|
39
39
|
color: disabled || hasErrorMessage || hasNoContent ? defaultTextColor : theme.palette.themePrimary
|
40
40
|
}, customSendIconStyle);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SendBox.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/SendBox.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,WAAW,EAAS,MAAM,iBAAiB,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,aAAa,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IACtF,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,QAAQ;IAClB;;OAEG;IACH,oBAAoB,EAAE;QACpB,SAAS,EAAE,SAAS;KACrB;CACF,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;IACzC,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;CACjB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAQ7B,EAAU,EAAE;IACX,MAAM,EACJ,KAAK,EACL,OAAO,EACP,QAAQ,GAAG,KAAK;IAChB,
|
1
|
+
{"version":3,"file":"SendBox.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/SendBox.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,WAAW,EAAS,MAAM,iBAAiB,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,aAAa,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IACtF,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,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Corporation.\n// Licensed under the MIT License.\n\nimport { IStyle, mergeStyles, Theme } from '@fluentui/react';\n\n/**\n * @private\n */\nexport const suppressIconStyle = {\n iconContainer: { minHeight: '0', minWidth: '0', height: '0', width: '0', margin: '0' },\n icon: { display: 'none' }\n};\n\n/**\n * @private\n */\nexport const sendBoxWrapperStyles = mergeStyles({\n margin: '0.25rem',\n overflow: 'hidden',\n /**\n * margin-top set for all the child components of sendbox except first\n */\n ':not(:first-child)': {\n marginTop: '0.25rem'\n }\n});\n\n/**\n * @private\n */\nexport const sendButtonStyle = mergeStyles({\n height: '2.25rem',\n width: '2.25rem'\n});\n\n/**\n * @private\n */\nexport const sendIconStyle = (props: {\n theme: Theme;\n hasText: boolean;\n /* @conditional-compile-remove(file-sharing-acs) */ hasAttachment: boolean;\n disabled?: boolean;\n hasErrorMessage: boolean;\n customSendIconStyle?: IStyle;\n defaultTextColor?: string;\n}): string => {\n const {\n theme,\n hasText,\n disabled = false,\n /* @conditional-compile-remove(file-sharing-acs) */ hasAttachment,\n hasErrorMessage,\n customSendIconStyle,\n defaultTextColor = theme.palette.neutralTertiary\n } = props;\n const hasNoContent = !hasText && /* @conditional-compile-remove(file-sharing-acs) */ !hasAttachment;\n return mergeStyles(\n editorTextBoxButtonStyle,\n {\n color: disabled || hasErrorMessage || hasNoContent ? defaultTextColor : theme.palette.themePrimary\n },\n customSendIconStyle\n );\n};\n\n/**\n * @private\n */\nexport const editorTextBoxButtonStyle: IStyle = {\n width: '1.25rem',\n height: '1.25rem',\n margin: 'auto'\n};\n\n/**\n * @private\n */\nexport const attachmentUploadCardsStyles = mergeStyles({\n margin: '0 0.25rem 0.25rem 0.25rem',\n overflow: 'auto'\n});\n\n/**\n * @private\n */\nexport const attachmentCardBoxStyle = mergeStyles({\n width: '100%',\n padding: '0.50rem'\n});\n\n/**\n * @private\n */\nexport const defaultSendBoxInactiveBorderThicknessREM = 0.0625;\n/**\n * @private\n */\nexport const defaultSendBoxActiveBorderThicknessREM = 0.125;\n\n/**\n * @private\n */\nexport const borderAndBoxShadowStyle = (props: {\n theme: Theme;\n hasErrorMessage: boolean;\n disabled: boolean;\n}): string => {\n return mergeStyles(borderEditBoxStyle({ ...props, defaultBorderColor: props.theme.palette.neutralSecondary }));\n};\n\n/**\n * @private\n */\nexport const borderEditBoxStyle = (props: {\n theme: Theme;\n defaultBorderColor?: string;\n hasErrorMessage: boolean;\n disabled: boolean;\n}): IStyle => {\n const { theme, hasErrorMessage, disabled, defaultBorderColor } = props;\n const borderColor = hasErrorMessage ? theme.semanticColors.errorText : defaultBorderColor;\n const borderColorActive = hasErrorMessage ? theme.semanticColors.errorText : theme.palette.themePrimary;\n\n const borderThickness = disabled ? 0 : defaultSendBoxInactiveBorderThicknessREM;\n const borderActiveThickness = disabled ? 0 : defaultSendBoxActiveBorderThicknessREM;\n\n return {\n borderRadius: theme.effects.roundedCorner4,\n border: `${borderThickness}rem solid ${borderColor}`,\n\n // The border thickness of the sendbox wrapper changes on hover, to prevent the border thickness change causing the\n // input box to shift we apply a margin to compensate. This margin is then removed on hover when the border is thicker.\n margin: `${defaultSendBoxActiveBorderThicknessREM - borderThickness}rem`,\n\n ':hover, :active, :focus, :focus-within': {\n border: `${borderActiveThickness}rem solid ${borderColorActive}`,\n margin: `${defaultSendBoxActiveBorderThicknessREM - borderActiveThickness}rem`\n }\n };\n};\n"]}
|
package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js
CHANGED
@@ -16,9 +16,9 @@ export const onRenderSubmitIcon = (className) => {
|
|
16
16
|
return React.createElement(Icon, { iconName: 'EditBoxSubmit', className: className });
|
17
17
|
};
|
18
18
|
function isMessageEmpty(messageText,
|
19
|
-
/* @conditional-compile-remove(
|
19
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
20
20
|
attachmentMetadata) {
|
21
|
-
/* @conditional-compile-remove(
|
21
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
22
22
|
return messageText.trim().length === 0 && (attachmentMetadata === null || attachmentMetadata === void 0 ? void 0 : attachmentMetadata.length) === 0;
|
23
23
|
return messageText.trim().length === 0;
|
24
24
|
}
|
@@ -26,14 +26,14 @@ attachmentMetadata) {
|
|
26
26
|
* @private
|
27
27
|
*/
|
28
28
|
export function getMessageState(messageText,
|
29
|
-
/* @conditional-compile-remove(
|
30
|
-
return isMessageEmpty(messageText, /* @conditional-compile-remove(
|
29
|
+
/* @conditional-compile-remove(file-sharing-acs) */ attachments) {
|
30
|
+
return isMessageEmpty(messageText, /* @conditional-compile-remove(file-sharing-acs) */ attachments)
|
31
31
|
? 'too short'
|
32
32
|
: isMessageTooLong(messageText.length)
|
33
33
|
? 'too long'
|
34
34
|
: 'OK';
|
35
35
|
}
|
36
|
-
/* @conditional-compile-remove(
|
36
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
37
37
|
/**
|
38
38
|
* @private
|
39
39
|
* @TODO: Remove when file-sharing feature becomes stable.
|
@@ -41,7 +41,7 @@ export function getMessageState(messageText,
|
|
41
41
|
export function getMessageWithAttachmentMetadata(message) {
|
42
42
|
return message.attachments;
|
43
43
|
}
|
44
|
-
/* @conditional-compile-remove(
|
44
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
45
45
|
/**
|
46
46
|
* @internal
|
47
47
|
*/
|
@@ -53,7 +53,7 @@ export const attachmentMetadataReducer = (state, action) => {
|
|
53
53
|
return state;
|
54
54
|
}
|
55
55
|
};
|
56
|
-
/* @conditional-compile-remove(
|
56
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
57
57
|
/**
|
58
58
|
* @internal
|
59
59
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatMessageComponentAsEditBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAe,EAAE;IACnE,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AACnE,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAe,EAAE;IACnE,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AACnE,CAAC,CAAC;AAIF,SAAS,cAAc,CACrB,WAAmB;AACnB,
|
1
|
+
{"version":3,"file":"ChatMessageComponentAsEditBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAe,EAAE;IACnE,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AACnE,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAe,EAAE;IACnE,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AACnE,CAAC,CAAC;AAIF,SAAS,cAAc,CACrB,WAAmB;AACnB,mDAAmD;AACnD,kBAAyC;IAEzC,mDAAmD;IACnD,OAAO,WAAW,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\nimport React from 'react';\nimport { Icon } from '@fluentui/react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { isMessageTooLong } from './SendBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { ChatMessage } from '../../types';\n\n/**\n * @private\n */\nexport const onRenderCancelIcon = (className: string): JSX.Element => {\n return <Icon iconName={'EditBoxCancel'} className={className} />;\n};\n\n/**\n * @private\n */\nexport const onRenderSubmitIcon = (className: string): JSX.Element => {\n return <Icon iconName={'EditBoxSubmit'} className={className} />;\n};\n\ntype MessageState = 'OK' | 'too short' | 'too long';\n\nfunction isMessageEmpty(\n messageText: string,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata?: AttachmentMetadata[]\n): boolean {\n /* @conditional-compile-remove(file-sharing-acs) */\n return messageText.trim().length === 0 && attachmentMetadata?.length === 0;\n return messageText.trim().length === 0;\n}\n\n/**\n * @private\n */\nexport function getMessageState(\n messageText: string,\n /* @conditional-compile-remove(file-sharing-acs) */ attachments: AttachmentMetadata[]\n): MessageState {\n return isMessageEmpty(messageText, /* @conditional-compile-remove(file-sharing-acs) */ attachments)\n ? 'too short'\n : isMessageTooLong(messageText.length)\n ? 'too long'\n : 'OK';\n}\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n * @TODO: Remove when file-sharing feature becomes stable.\n */\nexport function getMessageWithAttachmentMetadata(message: ChatMessage): AttachmentMetadata[] | undefined {\n return message.attachments;\n}\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\ninterface Action {\n type: string;\n}\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * Currently `Actions` only have one action which is to remove.\n * But in the future, we may have more actions like `add`, `update`, etc.\n * And this action would be a uinon of all those actions.\n * i.e. `type Actions = RemoveAction | AddAction | UpdateAction;`\n * @private\n */\ntype Actions = RemoveAction;\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\ninterface RemoveAction extends Action {\n type: 'remove';\n id: string;\n}\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @internal\n */\nexport const attachmentMetadataReducer = (state: AttachmentMetadata[], action: Actions): AttachmentMetadata[] => {\n switch (action.type) {\n case 'remove':\n return state.filter((v) => v.id !== action.id);\n default:\n return state;\n }\n};\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @internal\n */\nexport const doesMessageContainMultipleAttachments = (message: ChatMessage): boolean => {\n const length = message.attachments?.length ?? 0;\n return length > 1;\n};\n"]}
|
@@ -21,12 +21,12 @@ export const getFluentUIAttachedValue = (messageAttachedStatus) => {
|
|
21
21
|
export function getMessageBubbleContent(message, strings, userId, inlineImageOptions,
|
22
22
|
/* @conditional-compile-remove(mention) */
|
23
23
|
mentionDisplayOptions,
|
24
|
-
/* @conditional-compile-remove(
|
24
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
25
25
|
/**
|
26
26
|
* Optional callback to render message attachments in the message component.
|
27
27
|
*/
|
28
28
|
onRenderAttachmentDownloads,
|
29
|
-
/* @conditional-compile-remove(
|
29
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
30
30
|
/**
|
31
31
|
* Optional callback to define custom actions for attachments.
|
32
32
|
*/
|
@@ -40,27 +40,28 @@ actionsForAttachment) {
|
|
40
40
|
React.createElement(ChatMessageContent, { message: message, strings: strings,
|
41
41
|
/* @conditional-compile-remove(mention) */
|
42
42
|
mentionDisplayOptions: mentionDisplayOptions, inlineImageOptions: inlineImageOptions }),
|
43
|
-
/* @conditional-compile-remove(
|
43
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */ onRenderAttachmentDownloads
|
44
44
|
? onRenderAttachmentDownloads(message)
|
45
45
|
: defaultOnRenderAttachmentDownloads(message, strings,
|
46
|
-
/* @conditional-compile-remove(
|
46
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
47
47
|
actionsForAttachment)));
|
48
48
|
}
|
49
49
|
/**
|
50
50
|
* Default component for rendering attachment downloads.
|
51
51
|
*/
|
52
|
-
/* @conditional-compile-remove(
|
52
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
53
53
|
const defaultOnRenderAttachmentDownloads = (message, strings, actionsForAttachment) => {
|
54
54
|
var _a;
|
55
55
|
const attachments = 'attachments' in message ? message.attachments : undefined;
|
56
|
-
/* @conditional-compile-remove(
|
56
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
57
57
|
return ((_a = attachments === null || attachments === void 0 ? void 0 : attachments.length) !== null && _a !== void 0 ? _a : 0) > 0 ? (React.createElement(_AttachmentDownloadCards, { message: message,
|
58
|
-
/* @conditional-compile-remove(
|
58
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
59
59
|
attachments: attachments,
|
60
|
-
/* @conditional-compile-remove(
|
60
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
61
61
|
actionsForAttachment: actionsForAttachment,
|
62
|
-
/* @conditional-compile-remove(
|
62
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
63
63
|
strings: {
|
64
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
64
65
|
downloadAttachment: strings.downloadAttachment,
|
65
66
|
openAttachment: strings.openAttachment,
|
66
67
|
attachmentCardGroupMessage: strings.attachmentCardGroupMessage
|
package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatMessageComponentUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/ChatMessageComponentUtils.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAGvE,uDAAuD;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAK1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAKjF,OAAO,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAErF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAGlF;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,qBAA6C,EACJ,EAAE;IAC3C,OAAO,qBAAqB,KAAK,KAAK,IAAI,qBAAqB,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC/F,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAA6F,EAC7F,OAA6B,EAC7B,MAAc,EACd,kBAAkD;AAClD,0CAA0C;AAC1C,qBAA6C;AAC7C,
|
1
|
+
{"version":3,"file":"ChatMessageComponentUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/ChatMessageComponentUtils.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAGvE,uDAAuD;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAK1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAKjF,OAAO,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAErF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAGlF;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,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,EACZ,SAAiB,EACQ,EAAE;IAC3B,MAAM,QAAQ,GAAG,UAAU,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE,IAAI,OAAO,CAAC,WAAW,KAAK,MAAM,IAAI,QAAQ,EAAE,CAAC;QAC/C,OAAO,6BAAK,SAAS,EAAE,yBAAyB,CAAC,KAAK,CAAC,IAAG,SAAS,CAAO,CAAC;IAC7E,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { ChatMessage, MessageAttachedStatus } from '../../types/ChatMessage';\nimport { ChatMessageContent } from '../ChatMessage/ChatMessageContent';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { BlockedMessage } from '../../types/ChatMessage';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { BlockedMessageContent } from '../ChatMessage/ChatMessageContent';\nimport { InlineImageOptions } from '../ChatMessage/ChatMessageContent';\nimport { MessageThreadStrings } from '../MessageThread';\n/* @conditional-compile-remove(mention) */\nimport { MentionDisplayOptions } from '../MentionPopover';\nimport { _AttachmentDownloadCards } from '../Attachment/AttachmentDownloadCards';\n/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMenuAction } from '../../types/Attachment';\n/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { formatTimeForChatMessage, formatTimestampForChatMessage } from './Datetime';\nimport { ComponentLocale } from '../../localization/LocalizationProvider';\nimport { chatMessageEditedTagStyle } from '../styles/ChatMessageComponent.styles';\nimport { Theme } from '@fluentui/react';\n\n/** @private\n * Return the string value for the FluentUI message attached prop based on the message's attached status.\n * @param attached - The message's attached status.\n */\nexport const getFluentUIAttachedValue = (\n messageAttachedStatus?: MessageAttachedStatus\n): 'bottom' | 'top' | 'center' | undefined => {\n return messageAttachedStatus === 'top' || messageAttachedStatus === false ? 'top' : 'center';\n};\n\n/**\n * @private\n * Get the message bubble content for the message.\n */\nexport function getMessageBubbleContent(\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n strings: MessageThreadStrings,\n userId: string,\n inlineImageOptions: InlineImageOptions | undefined,\n /* @conditional-compile-remove(mention) */\n mentionDisplayOptions?: MentionDisplayOptions,\n /* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\n /**\n * Optional callback to render message attachments in the message component.\n */\n onRenderAttachmentDownloads?: (message: ChatMessage) => JSX.Element,\n /* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\n /**\n * Optional callback to define custom actions for attachments.\n */\n actionsForAttachment?: (attachment: AttachmentMetadata, message?: ChatMessage) => AttachmentMenuAction[]\n): JSX.Element {\n /* @conditional-compile-remove(data-loss-prevention) */\n if (message.messageType === 'blocked') {\n return (\n <div tabIndex={0}>\n <BlockedMessageContent message={message} strings={strings} />\n </div>\n );\n }\n return (\n <div className=\"ui-chat__message__content\">\n <ChatMessageContent\n message={message}\n strings={strings}\n /* @conditional-compile-remove(mention) */\n mentionDisplayOptions={mentionDisplayOptions}\n inlineImageOptions={inlineImageOptions}\n />\n {\n /* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */ onRenderAttachmentDownloads\n ? onRenderAttachmentDownloads(message)\n : defaultOnRenderAttachmentDownloads(\n message,\n strings,\n /* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\n actionsForAttachment\n )\n }\n </div>\n );\n}\n\n/**\n * Default component for rendering attachment downloads.\n */\n/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\nconst defaultOnRenderAttachmentDownloads = (\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n strings: MessageThreadStrings,\n actionsForAttachment?: (attachment: AttachmentMetadata, message?: ChatMessage) => AttachmentMenuAction[]\n): JSX.Element | undefined => {\n const attachments = 'attachments' in message ? message.attachments : undefined;\n /* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\n return (attachments?.length ?? 0) > 0 ? (\n <_AttachmentDownloadCards\n message={message as ChatMessage}\n /* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\n attachments={attachments}\n /* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\n actionsForAttachment={actionsForAttachment}\n /* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\n strings={{\n /* @conditional-compile-remove(file-sharing-acs) */\n downloadAttachment: strings.downloadAttachment,\n openAttachment: strings.openAttachment,\n attachmentCardGroupMessage: strings.attachmentCardGroupMessage\n }}\n />\n ) : (\n <></>\n );\n return undefined;\n};\n\n/** @private */\nexport const generateDefaultTimestamp = (\n createdOn: Date,\n showDate: boolean | undefined,\n strings: MessageThreadStrings\n): string => {\n const formattedTimestamp = showDate\n ? formatTimestampForChatMessage(createdOn, new Date(), strings)\n : formatTimeForChatMessage(createdOn);\n\n return formattedTimestamp;\n};\n\n// onDisplayDateTimeString from props overwrite onDisplayDateTimeString from locale\n/** @private */\nexport const generateCustomizedTimestamp = (\n createdOn: Date,\n locale: ComponentLocale,\n onDisplayDateTimeString?: (messageDate: Date) => string\n): string => {\n /* @conditional-compile-remove(date-time-customization) */\n return onDisplayDateTimeString\n ? onDisplayDateTimeString(createdOn)\n : locale.onDisplayDateTimeString\n ? locale.onDisplayDateTimeString(createdOn)\n : '';\n\n return '';\n};\n\n/**\n * @private\n * Get the edited tag for the message if it is edited.\n */\nexport const getMessageEditedDetails = (\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n theme: Theme,\n editedTag: string\n): JSX.Element | undefined => {\n const editedOn = 'editedOn' in message ? message.editedOn : undefined;\n if (message.messageType === 'chat' && editedOn) {\n return <div className={chatMessageEditedTagStyle(theme)}>{editedTag}</div>;\n }\n return undefined;\n};\n"]}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
*/
|
6
6
|
export const MAXIMUM_LENGTH_OF_MESSAGE = 8000;
|
7
7
|
const EMPTY_MESSAGE_REGEX = /^\s*$/;
|
8
|
-
/* @conditional-compile-remove(
|
8
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9
9
|
/**
|
10
10
|
* @private
|
11
11
|
*/
|
@@ -15,7 +15,7 @@ export const hasIncompleteAttachmentUploads = (attachmentsWithProgress) => {
|
|
15
15
|
.filter((attachmentUpload) => !attachmentUpload.error)
|
16
16
|
.every((attachmentUpload) => attachmentUpload.progress === 1 && attachmentUpload.progress !== undefined));
|
17
17
|
};
|
18
|
-
/* @conditional-compile-remove(
|
18
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
19
19
|
/**
|
20
20
|
* @private
|
21
21
|
*/
|
@@ -49,11 +49,11 @@ export const sanitizeText = (message) => {
|
|
49
49
|
* @returns A boolean value indicating whether the send box should be disabled for ARIA accessibility.
|
50
50
|
*/
|
51
51
|
export const isSendBoxButtonAriaDisabled = ({ hasContent,
|
52
|
-
/* @conditional-compile-remove(
|
52
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
53
53
|
hasCompletedAttachmentUploads, hasError, disabled }) => {
|
54
54
|
return (
|
55
55
|
// no content
|
56
|
-
!(hasContent || /* @conditional-compile-remove(
|
56
|
+
!(hasContent || /* @conditional-compile-remove(file-sharing-acs) */ hasCompletedAttachmentUploads) ||
|
57
57
|
//error message exists
|
58
58
|
hasError ||
|
59
59
|
disabled);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SendBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/SendBoxUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAEpC,
|
1
|
+
{"version":3,"file":"SendBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/SendBoxUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAEpC,mDAAmD;AACnD;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,uBAAmE,EAC1D,EAAE;IACX,OAAO,CAAC,CAAC,CACP,CAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,MAAM;QAC/B,CAAC,uBAAuB;aACrB,MAAM,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC;aACrD,KAAK,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,KAAK,CAAC,IAAI,gBAAgB,CAAC,QAAQ,KAAK,SAAS,CAAC,CAC3G,CAAC;AACJ,CAAC,CAAC;AAEF,mDAAmD;AACnD;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,uBAAmE,EAC1D,EAAE;IACX,OAAO,CAAC,CAAC,CAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA,CAAC;AAC5E,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,WAAmB,EAAW,EAAE;IAC/D,OAAO,WAAW,GAAG,yBAAyB,CAAC;AACjD,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAe,EAAU,EAAE;IACtD,IAAI,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,OAAO,EAAE,CAAC;IACZ,CAAC;SAAM,CAAC;QACN,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,UAAU;AACV,mDAAmD;AACnD,6BAA6B,EAC7B,QAAQ,EACR,QAAQ,EAOT,EAAW,EAAE;IACZ,OAAO;IACL,aAAa;IACb,CAAC,CAAC,UAAU,IAAI,mDAAmD,CAAC,6BAA6B,CAAC;QAClG,sBAAsB;QACtB,QAAQ;QACR,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport const MAXIMUM_LENGTH_OF_MESSAGE = 8000;\nconst EMPTY_MESSAGE_REGEX = /^\\s*$/;\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\nexport const hasIncompleteAttachmentUploads = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): boolean => {\n return !!(\n attachmentsWithProgress?.length &&\n !attachmentsWithProgress\n .filter((attachmentUpload) => !attachmentUpload.error)\n .every((attachmentUpload) => attachmentUpload.progress === 1 && attachmentUpload.progress !== undefined)\n );\n};\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\nexport const isAttachmentUploadCompleted = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): boolean => {\n return !!attachmentsWithProgress?.find((attachment) => !attachment.error);\n};\n\n/**\n * @private\n */\nexport const isMessageTooLong = (valueLength: number): boolean => {\n return valueLength > MAXIMUM_LENGTH_OF_MESSAGE;\n};\n\n/**\n * @private\n */\nexport const sanitizeText = (message: string): string => {\n if (EMPTY_MESSAGE_REGEX.test(message)) {\n return '';\n } else {\n return message;\n }\n};\n\n/**\n * Determines whether the send box should be disabled for ARIA accessibility.\n *\n * @param hasContent - Indicates whether the send box has content.\n * @param hasCompletedAttachmentUploads - Indicates whether attachment uploads have completed.\n * @param hasError - Indicates whether there is an error.\n * @param disabled - Indicates whether the send box is disabled.\n * @returns A boolean value indicating whether the send box should be disabled for ARIA accessibility.\n */\nexport const isSendBoxButtonAriaDisabled = ({\n hasContent,\n /* @conditional-compile-remove(file-sharing-acs) */\n hasCompletedAttachmentUploads,\n hasError,\n disabled\n}: {\n hasContent: boolean;\n /* @conditional-compile-remove(file-sharing-acs) */\n hasCompletedAttachmentUploads: boolean;\n hasError: boolean;\n disabled: boolean;\n}): boolean => {\n return (\n // no content\n !(hasContent || /* @conditional-compile-remove(file-sharing-acs) */ hasCompletedAttachmentUploads) ||\n //error message exists\n hasError ||\n disabled\n );\n};\n"]}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
|
-
/* @conditional-compile-remove(
|
3
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
4
4
|
import { useLocale } from '../../localization';
|
5
5
|
/**
|
6
6
|
* Conditionally modify locale strings passed to the attachment card
|
7
7
|
* @returns attachment card strings
|
8
8
|
*/
|
9
9
|
export const useLocaleAttachmentCardStringsTrampoline = () => {
|
10
|
-
/* @conditional-compile-remove(
|
10
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11
11
|
return useLocale().strings.sendBox;
|
12
12
|
return {
|
13
13
|
removeAttachment: '',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/common.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/common.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,mDAAmD;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C;;;GAGG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,GAAkC,EAAE;IAC1F,mDAAmD;IACnD,OAAO,SAAS,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;IACnC,OAAO;QACL,gBAAgB,EAAE,EAAE;QACpB,eAAe,EAAE,EAAE;QACnB,SAAS,EAAE,EAAE;QACb,kBAAkB,EAAE,EAAE;KACvB,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,gBAAmC,EAAW,EAAE;IAC/F,OAAO,CAAC,CAAC,gBAAgB,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAClH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _AttachmentUploadCardsStrings } from '../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useLocale } from '../../localization';\nimport { ParticipantState } from '../../types';\n\n/**\n * Conditionally modify locale strings passed to the attachment card\n * @returns attachment card strings\n */\nexport const useLocaleAttachmentCardStringsTrampoline = (): _AttachmentUploadCardsStrings => {\n /* @conditional-compile-remove(file-sharing-acs) */\n return useLocale().strings.sendBox;\n return {\n removeAttachment: '',\n uploadCompleted: '',\n uploading: '',\n attachmentMoreMenu: ''\n };\n};\n\n/**\n * Identify if a participant state if part of the Calling states or Hold states.\n */\nexport const _isParticipantStateCallingOrHold = (participantState?: ParticipantState): boolean => {\n return !!participantState && ['Idle', 'Connecting', 'EarlyMedia', 'Ringing', 'Hold'].includes(participantState);\n};\n"]}
|