@azure/communication-react 1.18.0-alpha-202406150014 → 1.18.0-alpha-202406191739
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 +54 -28
 - package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-XMNUmuTx.js → ChatMessageComponentAsRichTextEditBox-HBSSHZ2s.js} +2 -2
 - package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-XMNUmuTx.js.map → ChatMessageComponentAsRichTextEditBox-HBSSHZ2s.js.map} +1 -1
 - package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BLmR8ku0.js → RichTextSendBoxWrapper-DDN8Weyb.js} +2 -2
 - package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BLmR8ku0.js.map → RichTextSendBoxWrapper-DDN8Weyb.js.map} +1 -1
 - package/dist/dist-cjs/communication-react/{index-CzkriUUT.js → index-CAm6Qb1t.js} +638 -197
 - package/dist/dist-cjs/communication-react/index-CAm6Qb1t.js.map +1 -0
 - package/dist/dist-cjs/communication-react/index.js +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/calling-component-bindings/src/errorNotificationsSelector.d.ts +22 -0
 - package/dist/dist-esm/calling-component-bindings/src/errorNotificationsSelector.js +146 -0
 - package/dist/dist-esm/calling-component-bindings/src/errorNotificationsSelector.js.map +1 -0
 - package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -0
 - package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +7 -1
 - package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
 - package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -0
 - package/dist/dist-esm/calling-component-bindings/src/index.js +2 -0
 - package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
 - package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -1
 - package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.js +5 -4
 - package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCardGroup.d.ts +1 -0
 - package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCardGroup.js +3 -3
 - package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCardGroup.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +1 -10
 - package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/Attachment/AttachmentUploadCards.d.ts +4 -0
 - package/dist/dist-esm/react-components/src/components/Attachment/AttachmentUploadCards.js +18 -21
 - package/dist/dist-esm/react-components/src/components/Attachment/AttachmentUploadCards.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/Notifications.d.ts +23 -28
 - package/dist/dist-esm/react-components/src/components/Notifications.js +17 -7
 - package/dist/dist-esm/react-components/src/components/Notifications.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -2
 - package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +2 -2
 - package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +1 -1
 - package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +16 -29
 - package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +10 -4
 - package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/SendBox.js +9 -3
 - package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js +1 -1
 - package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +1 -1
 - package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.d.ts +1 -0
 - package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +3 -3
 - package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +2 -0
 - package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
 - package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.js +10 -0
 - package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +4 -0
 - package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.js +8 -0
 - package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +1 -1
 - package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +24 -13
 - package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +4 -0
 - package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +9 -0
 - package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
 - package/dist/dist-esm/react-components/src/components/utils.d.ts +32 -1
 - package/dist/dist-esm/react-components/src/components/utils.js +84 -0
 - package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
 - package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +170 -3
 - package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +168 -1
 - package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +170 -3
 - package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +168 -1
 - package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +2 -23
 - package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +170 -3
 - package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +168 -1
 - package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +170 -3
 - package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +168 -1
 - package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +170 -3
 - package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +168 -1
 - package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +168 -1
 - package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +168 -1
 - package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +168 -1
 - package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +168 -1
 - package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +170 -3
 - package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +168 -1
 - package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +170 -3
 - package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +170 -3
 - package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +170 -3
 - package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +170 -3
 - package/dist/dist-esm/react-components/src/theming/FluentV9ThemeProvider.d.ts +1 -0
 - package/dist/dist-esm/react-components/src/theming/FluentV9ThemeProvider.js +4 -4
 - package/dist/dist-esm/react-components/src/theming/FluentV9ThemeProvider.js.map +1 -1
 - package/dist/dist-esm/react-components/src/theming/themes.js +13 -12
 - package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
 - package/dist/dist-esm/react-components/src/theming/v9ThemeShim.js +1 -1
 - package/dist/dist-esm/react-components/src/theming/v9ThemeShim.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +24 -5
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +20 -0
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +1 -0
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +8 -0
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +4 -0
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +4 -2
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +33 -5
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.d.ts +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +68 -4
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.d.ts +3 -2
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +4 -0
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +3 -2
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +5 -3
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +4 -2
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +4 -2
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +4 -2
 - package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -0
 - package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +6 -0
 - 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 +4 -0
 - 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/CallWithChatBackedCallAdapter.d.ts +1 -0
 - package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +6 -0
 - package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +26 -6
 - package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +5 -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/common/Drawer/MoreDrawer.d.ts +1 -0
 - package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +3 -2
 - package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +40 -2
 - package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +6 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +7 -1
 - package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +7 -1
 - package/dist/tsdoc-metadata.json +1 -1
 - package/package.json +10 -10
 - package/dist/dist-cjs/communication-react/index-CzkriUUT.js.map +0 -1
 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"RichTextSendBox.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/RichTextEditor/RichTextSendBox.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MA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AO,2BAA2B,CAAC,WAAW,CAAC,IAAI,8BAA8B,CAAC,WAAW,CAAC,CAAC;IACjG,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,OAAO,CACL,oBAAC,KAAK;QACJ,oBAAC,qBAAqB,oBAAK,kBAAkB,EAAI;QACjD,oBAAC,yBAAyB,IACxB,eAAe,EAAE,OAAO,CAAC,eAAe,EACxC,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,UAAU,EACpB,cAAc,EAAE,kBAAkB,EAClC,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,UAAU,EAC5B,wBAAwB,EAAE,0BAA0B;YACpD,mDAAmD;YACnD,yBAAyB,EAAE,yBAAyB;YACpD,mDAAmD;YACnD,cAAc,EAAE,oBAAoB;YACpC,gEAAgE;YAChE,OAAO,EAAE,OAAO,GAChB,CACI,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { RichTextInputBoxComponent } from './RichTextInputBoxComponent';\nimport { Icon, Stack } from '@fluentui/react';\nimport { useLocale } from '../../localization';\nimport { SendBoxStrings } from '../SendBox';\nimport { sendIconStyle } from '../styles/SendBox.styles';\nimport { InputBoxButton } from '../InputBoxButton';\nimport { RichTextSendBoxErrors, RichTextSendBoxErrorsProps } from './RichTextSendBoxErrors';\nimport { isMessageTooLong, isSendBoxButtonAriaDisabled, sanitizeText } from '../utils/SendBoxUtils';\nimport { RichTextEditorComponentRef } from './RichTextEditor';\nimport { useTheme } from '../../theming';\nimport { richTextActionButtonsStyle, sendBoxRichTextEditorStyle } from '../styles/RichTextEditor.styles';\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 { isAttachmentUploadCompleted, hasIncompleteAttachmentUploads } from '../utils/SendBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { SendBoxErrorBarError } from '../SendBoxErrorBar';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { attachmentUploadCardsStyles } from '../styles/SendBox.styles';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { FluentV9ThemeProvider } from '../../theming/FluentV9ThemeProvider';\n\n/**\n * Strings of {@link RichTextSendBox} that can be overridden.\n *\n * @beta\n */\nexport interface RichTextSendBoxStrings extends RichTextStrings, SendBoxStrings {}\n\n/**\n * Strings of RichText that can be overridden.\n *\n * @beta\n */\nexport interface RichTextStrings {\n  /**\n   * Tooltip text for the bold button.\n   */\n  richTextBoldTooltip: string;\n  /**\n   * Tooltip text for the italic button.\n   */\n  richTextItalicTooltip: string;\n  /**\n   * Tooltip text for the underline button.\n   */\n  richTextUnderlineTooltip: string;\n  /**\n   * Tooltip text for the bullet list button.\n   */\n  richTextBulletListTooltip: string;\n  /**\n   * Tooltip text for the number list button.\n   */\n  richTextNumberListTooltip: string;\n  /**\n   * Tooltip text for the increase indent button.\n   */\n  richTextIncreaseIndentTooltip: string;\n  /**\n   * Tooltip text for the decrease indent button.\n   */\n  richTextDecreaseIndentTooltip: string;\n  /**\n   * Tooltip text insert table button.\n   */\n  richTextInsertTableTooltip: string;\n  /**\n   * Tooltip text for the rich text format button button.\n   */\n  richTextFormatButtonTooltip: string;\n  /**\n   * Text for the insert menu item.\n   */\n  richTextInsertRowOrColumnMenu: string;\n  /**\n   * Title for the insert table menu.\n   */\n  richTextInsertTableMenuTitle: string;\n  /**\n   * Text for the insert menu item to insert row above the current selection.\n   */\n  richTextInsertRowAboveMenu: string;\n  /**\n   * Text for the insert menu item to insert row below the current selection.\n   */\n  richTextInsertRowBelowMenu: string;\n  /**\n   * Text for the insert menu item to insert column to the left from the current selection.\n   */\n  richTextInsertColumnLeftMenu: string;\n  /**\n   * Text for the insert menu item to insert column to the right from the current selection.\n   */\n  richTextInsertColumnRightMenu: string;\n  /**\n   * Text for the delete row or column menu.\n   */\n  richTextDeleteRowOrColumnMenu: string;\n  /**\n   * Text for the delete column menu.\n   */\n  richTextDeleteColumnMenu: string;\n  /**\n   * Text for the delete row menu.\n   */\n  richTextDeleteRowMenu: string;\n  /**\n   * Text for the delete table menu.\n   */\n  richTextDeleteTableMenu: string;\n  /**\n   * Text for the rich text toolbar more button.\n   */\n  richTextToolbarMoreButtonAriaLabel: string;\n}\n\n/**\n * Props for {@link RichTextSendBox}.\n *\n * @beta\n */\nexport interface RichTextSendBoxProps {\n  /**\n   * Optional boolean to disable text box\n   * @defaultValue false\n   */\n  disabled?: boolean;\n  /* @conditional-compile-remove(rich-text-editor-image-upload) */\n  /**\n   * Optional callback to handle paste event.\n   */\n  onPaste?: (event: { content: DocumentFragment }) => void;\n  /**\n   * Optional strings to override in component\n   */\n  strings?: Partial<RichTextSendBoxStrings>;\n  /**\n   * Optional text for system message above the text box\n   */\n  systemMessage?: string;\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  /**\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 remove the attachment upload before sending by clicking on\n   * cancel icon.\n   * @beta\n   */\n  onCancelAttachmentUpload?: (attachmentId: string) => void;\n  /**\n   * Callback function used when the send button is clicked.\n   */\n  onSendMessage: (\n    content: string,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    options?: MessageOptions\n  ) => Promise<void>;\n  /**\n   * Optional callback called when user is typing\n   */\n  onTyping?: () => Promise<void>;\n}\n\n/**\n * A component to render SendBox with Rich Text Editor support.\n *\n * @beta\n */\nexport const RichTextSendBox = (props: RichTextSendBoxProps): JSX.Element => {\n  const {\n    disabled = false,\n    systemMessage,\n    autoFocus,\n    onSendMessage,\n    onTyping,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachments,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    onCancelAttachmentUpload,\n    /* @conditional-compile-remove(rich-text-editor-image-upload) */\n    onPaste\n  } = props;\n\n  const theme = useTheme();\n  const locale = useLocale();\n\n  const localeStrings = useMemo(() => {\n    /* @conditional-compile-remove(rich-text-editor) */\n    return locale.strings.richTextSendBox;\n    return locale.strings.sendBox;\n  }, [/* @conditional-compile-remove(rich-text-editor) */ locale.strings.richTextSendBox, locale.strings.sendBox]);\n\n  const strings = useMemo(() => {\n    return { ...localeStrings, ...props.strings };\n  }, [localeStrings, props.strings]);\n\n  const [contentValue, setContentValue] = useState('');\n  const [contentValueOverflow, setContentValueOverflow] = useState(false);\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n    undefined\n  );\n  const editorComponentRef = useRef<RichTextEditorComponentRef>(null);\n\n  const contentTooLongMessage = useMemo(\n    () => (contentValueOverflow ? strings.textTooLong : undefined),\n    [contentValueOverflow, strings.textTooLong]\n  );\n\n  const setContent = useCallback((newValue?: string): void => {\n    if (newValue === undefined) {\n      return;\n    }\n\n    setContentValueOverflow(isMessageTooLong(newValue.length));\n    setContentValue(newValue);\n  }, []);\n\n  const hasContent = useMemo(() => {\n    // get plain text content from the editor to check if the message is empty\n    // as the content may contain tags even when the content is empty\n    const plainTextContent = editorComponentRef.current?.getPlainContent();\n    return sanitizeText(contentValue ?? '').length > 0 && sanitizeText(plainTextContent ?? '').length > 0;\n  }, [contentValue]);\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 sendMessageOnClick = useCallback((): void => {\n    if (disabled || contentValueOverflow) {\n      return;\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 = contentValue;\n\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 (hasContent || /* @conditional-compile-remove(file-sharing-acs) */ isAttachmentUploadCompleted(attachments)) {\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: 'html'\n        }\n      );\n      setContentValue('');\n      editorComponentRef.current?.setEmptyContent();\n      editorComponentRef.current?.focus();\n    }\n  }, [\n    disabled,\n    contentValueOverflow,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachments,\n    contentValue,\n    hasContent,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    strings.attachmentUploadsPendingError,\n    onSendMessage,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    toAttachmentMetadata\n  ]);\n\n  const hasErrorMessage = useMemo(() => {\n    return (\n      !!systemMessage ||\n      !!contentTooLongMessage ||\n      /* @conditional-compile-remove(file-sharing-acs) */\n      !!attachmentUploadsPendingError ||\n      /* @conditional-compile-remove(file-sharing-acs) */\n      !!attachments?.filter((attachmentUpload) => attachmentUpload.error).pop()?.error\n    );\n  }, [\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachments,\n    contentTooLongMessage,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachmentUploadsPendingError,\n    systemMessage\n  ]);\n\n  const onRenderSendIcon = useCallback(\n    (isHover: boolean) => {\n      return (\n        <Icon\n          iconName={isHover && hasContent ? 'SendBoxSendHovered' : 'SendBoxSend'}\n          className={sendIconStyle({\n            theme,\n            hasText: hasContent,\n            /* @conditional-compile-remove(file-sharing-acs) */\n            hasAttachment: false,\n            hasErrorMessage: hasErrorMessage,\n            defaultTextColor: theme.palette.neutralSecondary,\n            disabled: disabled\n          })}\n        />\n      );\n    },\n    [disabled, hasContent, hasErrorMessage, theme]\n  );\n\n  const sendBoxErrorsProps: RichTextSendBoxErrorsProps = useMemo(() => {\n    /* @conditional-compile-remove(file-sharing-acs) */\n    const uploadErrorMessage = attachments?.filter((attachmentUpload) => attachmentUpload.error).pop()?.error?.message;\n    return {\n      /* @conditional-compile-remove(file-sharing-acs) */\n      attachmentUploadsPendingError: attachmentUploadsPendingError,\n      /* @conditional-compile-remove(file-sharing-acs) */\n      attachmentProgressError: uploadErrorMessage\n        ? {\n            message: uploadErrorMessage,\n            timestamp: Date.now()\n          }\n        : undefined,\n      systemMessage: systemMessage,\n      textTooLongMessage: contentTooLongMessage\n    };\n  }, [\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachments,\n    contentTooLongMessage,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachmentUploadsPendingError,\n    systemMessage\n  ]);\n\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const onRenderAttachmentUploads = useCallback(() => {\n    return (\n      <Stack className={attachmentUploadCardsStyles}>\n        <FluentV9ThemeProvider v8Theme={theme}>\n          <_AttachmentUploadCards\n            attachments={attachments}\n            onCancelAttachmentUpload={onCancelAttachmentUpload}\n            strings={{\n              removeAttachment: strings.removeAttachment,\n              uploading: strings.uploading,\n              uploadCompleted: strings.uploadCompleted,\n              attachmentMoreMenu: strings.attachmentMoreMenu\n            }}\n          />\n        </FluentV9ThemeProvider>\n      </Stack>\n    );\n  }, [\n    attachments,\n    onCancelAttachmentUpload,\n    strings.removeAttachment,\n    strings.uploadCompleted,\n    strings.uploading,\n    strings.attachmentMoreMenu,\n    theme\n  ]);\n\n  const isSendBoxButtonAriaDisabledValue = useMemo(() => {\n    return isSendBoxButtonAriaDisabled({\n      hasContent,\n      /* @conditional-compile-remove(file-sharing-acs) */ hasCompletedAttachmentUploads:\n        isAttachmentUploadCompleted(attachments),\n      hasError: hasErrorMessage,\n      disabled\n    });\n  }, [/* @conditional-compile-remove(file-sharing-acs) */ attachments, disabled, hasContent, hasErrorMessage]);\n\n  const sendButton = useMemo(() => {\n    return (\n      <InputBoxButton\n        onRenderIcon={onRenderSendIcon}\n        onClick={(e) => {\n          sendMessageOnClick();\n          e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.\n        }}\n        className={richTextActionButtonsStyle}\n        ariaLabel={localeStrings.sendButtonAriaLabel}\n        tooltipContent={localeStrings.sendButtonAriaLabel}\n        ariaDisabled={isSendBoxButtonAriaDisabledValue}\n      />\n    );\n  }, [isSendBoxButtonAriaDisabledValue, localeStrings.sendButtonAriaLabel, onRenderSendIcon, sendMessageOnClick]);\n\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const hasAttachmentUploads = useMemo(() => {\n    return isAttachmentUploadCompleted(attachments) || hasIncompleteAttachmentUploads(attachments);\n  }, [attachments]);\n\n  return (\n    <Stack>\n      <RichTextSendBoxErrors {...sendBoxErrorsProps} />\n      <RichTextInputBoxComponent\n        placeholderText={strings.placeholderText}\n        autoFocus={autoFocus}\n        onChange={setContent}\n        onEnterKeyDown={sendMessageOnClick}\n        onTyping={onTyping}\n        editorComponentRef={editorComponentRef}\n        strings={strings}\n        disabled={disabled}\n        actionComponents={sendButton}\n        richTextEditorStyleProps={sendBoxRichTextEditorStyle}\n        /* @conditional-compile-remove(file-sharing-acs) */\n        onRenderAttachmentUploads={onRenderAttachmentUploads}\n        /* @conditional-compile-remove(file-sharing-acs) */\n        hasAttachments={hasAttachmentUploads}\n        /* @conditional-compile-remove(rich-text-editor-image-upload) */\n        onPaste={onPaste}\n      />\n    </Stack>\n  );\n};\n"]}
         
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"RichTextSendBox.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/RichTextEditor/RichTextSendBox.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,mDAAmD;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAA8B,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEpG,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACzG,mDAAmD;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAG7E,mDAAmD;AACnD,OAAO,EAAE,2BAA2B,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAGpG,mDAAmD;AAC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,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,UAAU,EAC5B,wBAAwB,EAAE,0BAA0B;YACpD,mDAAmD;YACnD,yBAAyB,EAAE,yBAAyB;YACpD,mDAAmD;YACnD,cAAc,EAAE,oBAAoB;YACpC,gEAAgE;YAChE,OAAO,EAAE,OAAO,GAChB,CACI,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { RichTextInputBoxComponent } from './RichTextInputBoxComponent';\nimport { Icon, Stack } from '@fluentui/react';\nimport { useLocale } from '../../localization';\nimport { SendBoxStrings } from '../SendBox';\nimport { sendIconStyle } from '../styles/SendBox.styles';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useV9CustomStyles } from '../styles/SendBox.styles';\nimport { InputBoxButton } from '../InputBoxButton';\nimport { RichTextSendBoxErrors, RichTextSendBoxErrorsProps } from './RichTextSendBoxErrors';\nimport { isMessageTooLong, isSendBoxButtonAriaDisabled, sanitizeText } from '../utils/SendBoxUtils';\nimport { RichTextEditorComponentRef } from './RichTextEditor';\nimport { useTheme } from '../../theming';\nimport { richTextActionButtonsStyle, sendBoxRichTextEditorStyle } from '../styles/RichTextEditor.styles';\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 { isAttachmentUploadCompleted, hasIncompleteAttachmentUploads } from '../utils/SendBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { SendBoxErrorBarError } from '../SendBoxErrorBar';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { attachmentUploadCardsStyles } from '../styles/SendBox.styles';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { FluentV9ThemeProvider } from '../../theming/FluentV9ThemeProvider';\n\n/**\n * Strings of {@link RichTextSendBox} that can be overridden.\n *\n * @beta\n */\nexport interface RichTextSendBoxStrings extends RichTextStrings, SendBoxStrings {}\n\n/**\n * Strings of RichText that can be overridden.\n *\n * @beta\n */\nexport interface RichTextStrings {\n  /**\n   * Tooltip text for the bold button.\n   */\n  richTextBoldTooltip: string;\n  /**\n   * Tooltip text for the italic button.\n   */\n  richTextItalicTooltip: string;\n  /**\n   * Tooltip text for the underline button.\n   */\n  richTextUnderlineTooltip: string;\n  /**\n   * Tooltip text for the bullet list button.\n   */\n  richTextBulletListTooltip: string;\n  /**\n   * Tooltip text for the number list button.\n   */\n  richTextNumberListTooltip: string;\n  /**\n   * Tooltip text for the increase indent button.\n   */\n  richTextIncreaseIndentTooltip: string;\n  /**\n   * Tooltip text for the decrease indent button.\n   */\n  richTextDecreaseIndentTooltip: string;\n  /**\n   * Tooltip text insert table button.\n   */\n  richTextInsertTableTooltip: string;\n  /**\n   * Tooltip text for the rich text format button button.\n   */\n  richTextFormatButtonTooltip: string;\n  /**\n   * Text for the insert menu item.\n   */\n  richTextInsertRowOrColumnMenu: string;\n  /**\n   * Title for the insert table menu.\n   */\n  richTextInsertTableMenuTitle: string;\n  /**\n   * Text for the insert menu item to insert row above the current selection.\n   */\n  richTextInsertRowAboveMenu: string;\n  /**\n   * Text for the insert menu item to insert row below the current selection.\n   */\n  richTextInsertRowBelowMenu: string;\n  /**\n   * Text for the insert menu item to insert column to the left from the current selection.\n   */\n  richTextInsertColumnLeftMenu: string;\n  /**\n   * Text for the insert menu item to insert column to the right from the current selection.\n   */\n  richTextInsertColumnRightMenu: string;\n  /**\n   * Text for the delete row or column menu.\n   */\n  richTextDeleteRowOrColumnMenu: string;\n  /**\n   * Text for the delete column menu.\n   */\n  richTextDeleteColumnMenu: string;\n  /**\n   * Text for the delete row menu.\n   */\n  richTextDeleteRowMenu: string;\n  /**\n   * Text for the delete table menu.\n   */\n  richTextDeleteTableMenu: string;\n  /**\n   * Text for the rich text toolbar more button.\n   */\n  richTextToolbarMoreButtonAriaLabel: string;\n}\n\n/**\n * Props for {@link RichTextSendBox}.\n *\n * @beta\n */\nexport interface RichTextSendBoxProps {\n  /**\n   * Optional boolean to disable text box\n   * @defaultValue false\n   */\n  disabled?: boolean;\n  /* @conditional-compile-remove(rich-text-editor-image-upload) */\n  /**\n   * Optional callback to handle paste event.\n   */\n  onPaste?: (event: { content: DocumentFragment }) => void;\n  /**\n   * Optional strings to override in component\n   */\n  strings?: Partial<RichTextSendBoxStrings>;\n  /**\n   * Optional text for system message above the text box\n   */\n  systemMessage?: string;\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  /**\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 remove the attachment upload before sending by clicking on\n   * cancel icon.\n   * @beta\n   */\n  onCancelAttachmentUpload?: (attachmentId: string) => void;\n  /**\n   * Callback function used when the send button is clicked.\n   */\n  onSendMessage: (\n    content: string,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    options?: MessageOptions\n  ) => Promise<void>;\n  /**\n   * Optional callback called when user is typing\n   */\n  onTyping?: () => Promise<void>;\n}\n\n/**\n * A component to render SendBox with Rich Text Editor support.\n *\n * @beta\n */\nexport const RichTextSendBox = (props: RichTextSendBoxProps): JSX.Element => {\n  const {\n    disabled = false,\n    systemMessage,\n    autoFocus,\n    onSendMessage,\n    onTyping,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachments,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    onCancelAttachmentUpload,\n    /* @conditional-compile-remove(rich-text-editor-image-upload) */\n    onPaste\n  } = props;\n\n  const theme = useTheme();\n  const locale = useLocale();\n\n  const localeStrings = useMemo(() => {\n    /* @conditional-compile-remove(rich-text-editor) */\n    return locale.strings.richTextSendBox;\n    return locale.strings.sendBox;\n  }, [/* @conditional-compile-remove(rich-text-editor) */ locale.strings.richTextSendBox, locale.strings.sendBox]);\n\n  const strings = useMemo(() => {\n    return { ...localeStrings, ...props.strings };\n  }, [localeStrings, props.strings]);\n\n  const [contentValue, setContentValue] = useState('');\n  const [contentValueOverflow, setContentValueOverflow] = useState(false);\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n    undefined\n  );\n  const editorComponentRef = useRef<RichTextEditorComponentRef>(null);\n\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const customV9Styles = useV9CustomStyles();\n\n  const contentTooLongMessage = useMemo(\n    () => (contentValueOverflow ? strings.textTooLong : undefined),\n    [contentValueOverflow, strings.textTooLong]\n  );\n\n  const setContent = useCallback((newValue?: string): void => {\n    if (newValue === undefined) {\n      return;\n    }\n\n    setContentValueOverflow(isMessageTooLong(newValue.length));\n    setContentValue(newValue);\n  }, []);\n\n  const hasContent = useMemo(() => {\n    // get plain text content from the editor to check if the message is empty\n    // as the content may contain tags even when the content is empty\n    const plainTextContent = editorComponentRef.current?.getPlainContent();\n    return sanitizeText(contentValue ?? '').length > 0 && sanitizeText(plainTextContent ?? '').length > 0;\n  }, [contentValue]);\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 sendMessageOnClick = useCallback((): void => {\n    if (disabled || contentValueOverflow) {\n      return;\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 = contentValue;\n\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 (hasContent || /* @conditional-compile-remove(file-sharing-acs) */ isAttachmentUploadCompleted(attachments)) {\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: 'html'\n        }\n      );\n      setContentValue('');\n      editorComponentRef.current?.setEmptyContent();\n      editorComponentRef.current?.focus();\n    }\n  }, [\n    disabled,\n    contentValueOverflow,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachments,\n    contentValue,\n    hasContent,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    strings.attachmentUploadsPendingError,\n    onSendMessage,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    toAttachmentMetadata\n  ]);\n\n  const hasErrorMessage = useMemo(() => {\n    return (\n      !!systemMessage ||\n      !!contentTooLongMessage ||\n      /* @conditional-compile-remove(file-sharing-acs) */\n      !!attachmentUploadsPendingError ||\n      /* @conditional-compile-remove(file-sharing-acs) */\n      !!attachments?.filter((attachmentUpload) => attachmentUpload.error).pop()?.error\n    );\n  }, [\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachments,\n    contentTooLongMessage,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachmentUploadsPendingError,\n    systemMessage\n  ]);\n\n  const onRenderSendIcon = useCallback(\n    (isHover: boolean) => {\n      return (\n        <Icon\n          iconName={isHover && hasContent ? 'SendBoxSendHovered' : 'SendBoxSend'}\n          className={sendIconStyle({\n            theme,\n            hasText: hasContent,\n            /* @conditional-compile-remove(file-sharing-acs) */\n            hasAttachment: false,\n            hasErrorMessage: hasErrorMessage,\n            defaultTextColor: theme.palette.neutralSecondary,\n            disabled: disabled\n          })}\n        />\n      );\n    },\n    [disabled, hasContent, hasErrorMessage, theme]\n  );\n\n  const sendBoxErrorsProps: RichTextSendBoxErrorsProps = useMemo(() => {\n    /* @conditional-compile-remove(file-sharing-acs) */\n    const uploadErrorMessage = attachments?.filter((attachmentUpload) => attachmentUpload.error).pop()?.error?.message;\n    return {\n      /* @conditional-compile-remove(file-sharing-acs) */\n      attachmentUploadsPendingError: attachmentUploadsPendingError,\n      /* @conditional-compile-remove(file-sharing-acs) */\n      attachmentProgressError: uploadErrorMessage\n        ? {\n            message: uploadErrorMessage,\n            timestamp: Date.now()\n          }\n        : undefined,\n      systemMessage: systemMessage,\n      textTooLongMessage: contentTooLongMessage\n    };\n  }, [\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachments,\n    contentTooLongMessage,\n    /* @conditional-compile-remove(file-sharing-acs) */\n    attachmentUploadsPendingError,\n    systemMessage\n  ]);\n\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const onRenderAttachmentUploads = useCallback(() => {\n    return (\n      <Stack className={attachmentUploadCardsStyles}>\n        <FluentV9ThemeProvider v8Theme={theme} className={customV9Styles.clearBackground}>\n          <_AttachmentUploadCards\n            attachments={attachments}\n            onCancelAttachmentUpload={onCancelAttachmentUpload}\n            strings={{\n              removeAttachment: strings.removeAttachment,\n              uploading: strings.uploading,\n              uploadCompleted: strings.uploadCompleted,\n              attachmentMoreMenu: strings.attachmentMoreMenu\n            }}\n            disabled={disabled}\n          />\n        </FluentV9ThemeProvider>\n      </Stack>\n    );\n  }, [\n    theme,\n    customV9Styles.clearBackground,\n    attachments,\n    onCancelAttachmentUpload,\n    strings.removeAttachment,\n    strings.uploading,\n    strings.uploadCompleted,\n    strings.attachmentMoreMenu,\n    disabled\n  ]);\n\n  const isSendBoxButtonAriaDisabledValue = useMemo(() => {\n    return isSendBoxButtonAriaDisabled({\n      hasContent,\n      /* @conditional-compile-remove(file-sharing-acs) */ hasCompletedAttachmentUploads:\n        isAttachmentUploadCompleted(attachments),\n      hasError: hasErrorMessage,\n      disabled\n    });\n  }, [/* @conditional-compile-remove(file-sharing-acs) */ attachments, disabled, hasContent, hasErrorMessage]);\n\n  const sendButton = useMemo(() => {\n    return (\n      <InputBoxButton\n        onRenderIcon={onRenderSendIcon}\n        onClick={(e) => {\n          sendMessageOnClick();\n          e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.\n        }}\n        className={richTextActionButtonsStyle}\n        ariaLabel={localeStrings.sendButtonAriaLabel}\n        tooltipContent={localeStrings.sendButtonAriaLabel}\n        ariaDisabled={isSendBoxButtonAriaDisabledValue}\n      />\n    );\n  }, [isSendBoxButtonAriaDisabledValue, localeStrings.sendButtonAriaLabel, onRenderSendIcon, sendMessageOnClick]);\n\n  /* @conditional-compile-remove(file-sharing-acs) */\n  const hasAttachmentUploads = useMemo(() => {\n    return isAttachmentUploadCompleted(attachments) || hasIncompleteAttachmentUploads(attachments);\n  }, [attachments]);\n\n  return (\n    <Stack>\n      <RichTextSendBoxErrors {...sendBoxErrorsProps} />\n      <RichTextInputBoxComponent\n        placeholderText={strings.placeholderText}\n        autoFocus={autoFocus}\n        onChange={setContent}\n        onEnterKeyDown={sendMessageOnClick}\n        onTyping={onTyping}\n        editorComponentRef={editorComponentRef}\n        strings={strings}\n        disabled={disabled}\n        actionComponents={sendButton}\n        richTextEditorStyleProps={sendBoxRichTextEditorStyle}\n        /* @conditional-compile-remove(file-sharing-acs) */\n        onRenderAttachmentUploads={onRenderAttachmentUploads}\n        /* @conditional-compile-remove(file-sharing-acs) */\n        hasAttachments={hasAttachmentUploads}\n        /* @conditional-compile-remove(rich-text-editor-image-upload) */\n        onPaste={onPaste}\n      />\n    </Stack>\n  );\n};\n"]}
         
     | 
| 
         @@ -3,6 +3,8 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            import React, { useState, useMemo, useCallback } from 'react';
         
     | 
| 
       4 
4 
     | 
    
         
             
            import { mergeStyles, concatStyleSets, Icon, Stack } from '@fluentui/react';
         
     | 
| 
       5 
5 
     | 
    
         
             
            import { sendButtonStyle, sendIconStyle, sendBoxWrapperStyles, borderAndBoxShadowStyle } from './styles/SendBox.styles';
         
     | 
| 
      
 6 
     | 
    
         
            +
            /* @conditional-compile-remove(file-sharing-acs) */
         
     | 
| 
      
 7 
     | 
    
         
            +
            import { useV9CustomStyles } from './styles/SendBox.styles';
         
     | 
| 
       6 
8 
     | 
    
         
             
            import { useTheme } from '../theming';
         
     | 
| 
       7 
9 
     | 
    
         
             
            import { useLocale } from '../localization';
         
     | 
| 
       8 
10 
     | 
    
         
             
            import { useIdentifiers } from '../identifiers';
         
     | 
| 
         @@ -41,6 +43,8 @@ export const SendBox = (props) => { 
     | 
|
| 
       41 
43 
     | 
    
         
             
                const [textValueOverflow, setTextValueOverflow] = useState(false);
         
     | 
| 
       42 
44 
     | 
    
         
             
                const sendTextFieldRef = React.useRef(null);
         
     | 
| 
       43 
45 
     | 
    
         
             
                /* @conditional-compile-remove(file-sharing-acs) */
         
     | 
| 
      
 46 
     | 
    
         
            +
                const customV9Styles = useV9CustomStyles();
         
     | 
| 
      
 47 
     | 
    
         
            +
                /* @conditional-compile-remove(file-sharing-acs) */
         
     | 
| 
       44 
48 
     | 
    
         
             
                const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState(undefined);
         
     | 
| 
       45 
49 
     | 
    
         
             
                const sendMessageOnClick = () => {
         
     | 
| 
       46 
50 
     | 
    
         
             
                    var _a;
         
     | 
| 
         @@ -151,21 +155,23 @@ export const SendBox = (props) => { 
     | 
|
| 
       151 
155 
     | 
    
         
             
                        return null;
         
     | 
| 
       152 
156 
     | 
    
         
             
                    }
         
     | 
| 
       153 
157 
     | 
    
         
             
                    return props.onRenderAttachmentUploads ? (props.onRenderAttachmentUploads()) : (React.createElement(Stack, { className: attachmentUploadCardsStyles },
         
     | 
| 
       154 
     | 
    
         
            -
                        React.createElement(FluentV9ThemeProvider, { v8Theme: theme },
         
     | 
| 
      
 158 
     | 
    
         
            +
                        React.createElement(FluentV9ThemeProvider, { v8Theme: theme, className: customV9Styles.clearBackground },
         
     | 
| 
       155 
159 
     | 
    
         
             
                            React.createElement(_AttachmentUploadCards, { attachments: attachments, onCancelAttachmentUpload: props.onCancelAttachmentUpload, strings: {
         
     | 
| 
       156 
160 
     | 
    
         
             
                                    removeAttachment: (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.removeAttachment) !== null && _b !== void 0 ? _b : localeStrings.removeAttachment,
         
     | 
| 
       157 
161 
     | 
    
         
             
                                    uploading: (_d = (_c = props.strings) === null || _c === void 0 ? void 0 : _c.uploading) !== null && _d !== void 0 ? _d : localeStrings.uploading,
         
     | 
| 
       158 
162 
     | 
    
         
             
                                    uploadCompleted: (_f = (_e = props.strings) === null || _e === void 0 ? void 0 : _e.uploadCompleted) !== null && _f !== void 0 ? _f : localeStrings.uploadCompleted,
         
     | 
| 
       159 
163 
     | 
    
         
             
                                    attachmentMoreMenu: (_h = (_g = props.strings) === null || _g === void 0 ? void 0 : _g.attachmentMoreMenu) !== null && _h !== void 0 ? _h : localeStrings.attachmentMoreMenu
         
     | 
| 
       160 
     | 
    
         
            -
                                } }))));
         
     | 
| 
      
 164 
     | 
    
         
            +
                                }, disabled: disabled }))));
         
     | 
| 
       161 
165 
     | 
    
         
             
                }, [
         
     | 
| 
       162 
166 
     | 
    
         
             
                    attachments,
         
     | 
| 
       163 
167 
     | 
    
         
             
                    props,
         
     | 
| 
       164 
168 
     | 
    
         
             
                    theme,
         
     | 
| 
      
 169 
     | 
    
         
            +
                    customV9Styles.clearBackground,
         
     | 
| 
       165 
170 
     | 
    
         
             
                    localeStrings.removeAttachment,
         
     | 
| 
       166 
171 
     | 
    
         
             
                    localeStrings.uploading,
         
     | 
| 
       167 
172 
     | 
    
         
             
                    localeStrings.uploadCompleted,
         
     | 
| 
       168 
     | 
    
         
            -
                    localeStrings.attachmentMoreMenu
         
     | 
| 
      
 173 
     | 
    
         
            +
                    localeStrings.attachmentMoreMenu,
         
     | 
| 
      
 174 
     | 
    
         
            +
                    disabled
         
     | 
| 
       169 
175 
     | 
    
         
             
                ]);
         
     | 
| 
       170 
176 
     | 
    
         
             
                return (React.createElement(Stack, { className: mergeStyles(sendBoxWrapperStyles, { overflow: 'visible' } // This is needed for the mention popup to be visible
         
     | 
| 
       171 
177 
     | 
    
         
             
                    ) },
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       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,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAExH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,mDAAmD;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,mDAAmD;AACnD,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AC,QAAQ,CAAC,EAC5C,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE;oBAChB,MAAM,oBAAoB,GAAG,EAAE,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,EAAE,CAAC,QAAQ,KAAK,KAAK,IAAI,CAAC,cAAc,CAAC,CAAC;oBAC9F,IAAI,CAAC,oBAAoB,EAAE,CAAC;wBAC1B,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,EAAI,CAAC;oBACf,CAAC;gBACH,CAAC,EACD,cAAc,EAAE,GAAG,EAAE;oBACnB,kBAAkB,EAAE,CAAC;gBACvB,CAAC,EACD,MAAM,EAAE,YAAY,EACpB,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,yBAAyB;gBACpC,0CAA0C;gBAC1C,oBAAoB,EAAE,oBAAoB;gBAE1C,oBAAC,cAAc,IACb,YAAY,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,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 
     | 
    
         
            +
            {"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,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACxH,mDAAmD;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE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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,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';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useV9CustomStyles } 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 customV9Styles = useV9CustomStyles();\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} className={customV9Styles.clearBackground}>\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            disabled={disabled}\n          />\n        </FluentV9ThemeProvider>\n      </Stack>\n    );\n  }, [\n    attachments,\n    props,\n    theme,\n    customV9Styles.clearBackground,\n    localeStrings.removeAttachment,\n    localeStrings.uploading,\n    localeStrings.uploadCompleted,\n    localeStrings.attachmentMoreMenu,\n    disabled\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"]}
         
     | 
| 
         @@ -24,7 +24,7 @@ export const _TroubleshootingGuideErrorBar = (props) => { 
     | 
|
| 
       24 
24 
     | 
    
         
             
                // Without this behaviour, this `useEffect` block would cause a render loop.
         
     | 
| 
       25 
25 
     | 
    
         
             
                useEffect(() => setDismissedErrors(dropDismissalsForInactiveErrors(props.activeErrorMessages, dismissedErrors)), [props.activeErrorMessages, dismissedErrors]);
         
     | 
| 
       26 
26 
     | 
    
         
             
                const toShow = errorsToShow(props.activeErrorMessages, dismissedErrors);
         
     | 
| 
       27 
     | 
    
         
            -
                return (React.createElement(Stack, { "data-ui-id": " 
     | 
| 
      
 27 
     | 
    
         
            +
                return (React.createElement(Stack, { "data-ui-id": "notifications-stack" }, toShow.map((error) => {
         
     | 
| 
       28 
28 
     | 
    
         
             
                    const devicePermissionErrorBar = (React.createElement("div", null,
         
     | 
| 
       29 
29 
     | 
    
         
             
                        strings[error.type],
         
     | 
| 
       30 
30 
     | 
    
         
             
                        ' ',
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"TroubleshootingGuideErrorBar.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/TroubleshootingGuideErrorBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AACnG,OAAO,EAEL,YAAY,EACZ,+BAA+B,EAC/B,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACf,MAAM,SAAS,CAAC;AA+DjB;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,KAAyC,EAAe,EAAE;;IACtG,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,oBAAoB;IACpB,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;IACnD,MAAM,OAAO,GAAG,MAAA,KAAK,CAAC,OAAO,mCAAI,aAAa,CAAC;IAE/C,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAmB,EAAE,CAAC,CAAC;IAE7E,MAAM,EACJ,iCAAiC,EACjC,gCAAgC,EAChC,gBAAgB,GAAG;QACjB,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,QAAQ;KACrB,EACD,2BAA2B,EAC5B,GAAG,KAAK,CAAC;IAEV,mGAAmG;IACnG,4EAA4E;IAC5E,SAAS,CACP,GAAG,EAAE,CAAC,kBAAkB,CAAC,+BAA+B,CAAC,KAAK,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC,EACrG,CAAC,KAAK,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAC7C,CAAC;IAEF,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;IAExE,OAAO,CACL,oBAAC,KAAK,kBAAY, 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"TroubleshootingGuideErrorBar.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/TroubleshootingGuideErrorBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,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EF,MAAM,YAAY,GAAG,CACnB,SAAiB,EACjB,wBAAqC,EACrC,eAA4B,EACf,EAAE;IACf,IAAI,SAAS,KAAK,uBAAuB,EAAE,CAAC;QAC1C,OAAO,eAAe,CAAC;IACzB,CAAC;SAAM,CAAC;QACN,OAAO,wBAAwB,CAAC;IAClC,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useState } from 'react';\nimport { Link, MessageBar, MessageBarButton, Stack, useTheme } from '@fluentui/react';\nimport { useLocale } from '../localization';\nimport { ErrorBarProps } from './ErrorBar';\nimport { dismissButtonStyle, messageBarStyle } from './styles/TroubleshootingGuideErrorBar.styles';\nimport {\n  DismissedError,\n  dismissError,\n  dropDismissalsForInactiveErrors,\n  errorsToShow,\n  messageBarIconProps,\n  messageBarType\n} from './utils';\n\n/**\n * Strings for {@link _TroubleshootingGuideErrorBar}.\n *\n * @internal\n */\nexport interface _TroubleshootingGuideErrorBarStrings {\n  devicePermissionLinkText?: string;\n  networkTroubleshootingLinkText?: string;\n  dismissButtonText?: string;\n}\n\n/**\n * Props for {@link _TroubleshootingGuideErrorBar}.\n *\n * @internal\n */\nexport interface _TroubleshootingGuideErrorBarProps extends ErrorBarProps {\n  /**\n   * permissions state for camera/microphone\n   */\n  permissionsState?: {\n    camera: PermissionState;\n    microphone: PermissionState;\n  };\n  /**\n   * Callback you may provide to supply users with further steps to troubleshoot why they have been\n   * unable to grant your site the required permissions for the call.\n   *\n   * @example\n   * ```ts\n   * onPermissionsTroubleshootingClick: () =>\n   *  window.open('https://contoso.com/permissions-troubleshooting', '_blank');\n   * ```\n   *\n   * @remarks\n   * if this is not supplied, the composite will not show a 'further troubleshooting' link.\n   */\n  onPermissionsTroubleshootingClick?: (permissionsState: {\n    camera: PermissionState;\n    microphone: PermissionState;\n  }) => void;\n  /**\n   * Optional callback to supply users with further troubleshooting steps for network issues\n   * experienced when connecting to a call.\n   *\n   * @example\n   * ```ts\n   * onNetworkingTroubleshootingClick?: () =>\n   *  window.open('https://contoso.com/network-troubleshooting', '_blank');\n   * ```\n   *\n   * @remarks\n   * if this is not supplied, the composite will not show a 'network troubleshooting' link.\n   */\n  onNetworkingTroubleshootingClick?: () => void;\n  /**\n   * strings related to trouble shooting guidance link and dismiss button\n   */\n  troubleshootingGuideStrings: _TroubleshootingGuideErrorBarStrings;\n}\n\n/**\n * @internal\n * A component to show device Permission/network connection related errors, contains link that leads to further trouble shooting guide\n */\nexport const _TroubleshootingGuideErrorBar = (props: _TroubleshootingGuideErrorBarProps): JSX.Element => {\n  const theme = useTheme();\n  // error bar strings\n  const localeStrings = useLocale().strings.errorBar;\n  const strings = props.strings ?? localeStrings;\n\n  const [dismissedErrors, setDismissedErrors] = useState<DismissedError[]>([]);\n\n  const {\n    onPermissionsTroubleshootingClick,\n    onNetworkingTroubleshootingClick,\n    permissionsState = {\n      camera: 'denied',\n      microphone: 'denied'\n    },\n    troubleshootingGuideStrings\n  } = props;\n\n  // dropDismissalsForInactiveErrors only returns a new object if `dismissedErrors` actually changes.\n  // Without this behaviour, this `useEffect` block would cause a render loop.\n  useEffect(\n    () => setDismissedErrors(dropDismissalsForInactiveErrors(props.activeErrorMessages, dismissedErrors)),\n    [props.activeErrorMessages, dismissedErrors]\n  );\n\n  const toShow = errorsToShow(props.activeErrorMessages, dismissedErrors);\n\n  return (\n    <Stack data-ui-id=\"notifications-stack\">\n      {toShow.map((error) => {\n        const devicePermissionErrorBar = (\n          <div>\n            {strings[error.type]}{' '}\n            {onPermissionsTroubleshootingClick && (\n              <Link\n                onClick={() => {\n                  onPermissionsTroubleshootingClick(permissionsState);\n                }}\n                underline\n              >\n                <span>{troubleshootingGuideStrings.devicePermissionLinkText}</span>\n              </Link>\n            )}\n          </div>\n        );\n\n        const networkErrorBar = (\n          <div>\n            {strings[error.type]}{' '}\n            {onNetworkingTroubleshootingClick && (\n              <Link onClick={onNetworkingTroubleshootingClick} underline>\n                <span>{troubleshootingGuideStrings.networkTroubleshootingLinkText}</span>\n              </Link>\n            )}\n          </div>\n        );\n\n        return (\n          <MessageBar\n            {...props}\n            styles={messageBarStyle(theme, messageBarType(error.type))}\n            key={error.type}\n            messageBarType={messageBarType(error.type)}\n            messageBarIconProps={messageBarIconProps(error.type)}\n            actions={\n              <MessageBarButton\n                text={troubleshootingGuideStrings.dismissButtonText}\n                styles={dismissButtonStyle(theme)}\n                onClick={() => {\n                  setDismissedErrors(dismissError(dismissedErrors, error));\n                }}\n                ariaLabel={strings.dismissButtonAriaLabel}\n              />\n            }\n            isMultiline={false}\n          >\n            {showErrorBar(error.type, devicePermissionErrorBar, networkErrorBar)}\n          </MessageBar>\n        );\n      })}\n    </Stack>\n  );\n};\n\nconst showErrorBar = (\n  errorType: string,\n  devicePermissionErrorBar: JSX.Element,\n  networkErrorBar: JSX.Element\n): JSX.Element => {\n  if (errorType === 'callNetworkQualityLow') {\n    return networkErrorBar;\n  } else {\n    return devicePermissionErrorBar;\n  }\n};\n"]}
         
     | 
    
        package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js
    CHANGED
    
    | 
         @@ -42,7 +42,7 @@ export const _VideoBackgroundEffectsPicker = (props) => { 
     | 
|
| 
       42 
42 
     | 
    
         
             
                    React.createElement(Label, { className: mergeStyles((_c = props.styles) === null || _c === void 0 ? void 0 : _c.label) }, props.label),
         
     | 
| 
       43 
43 
     | 
    
         
             
                    optionsByRow.map((options, rowIndex) => {
         
     | 
| 
       44 
44 
     | 
    
         
             
                        var _a;
         
     | 
| 
       45 
     | 
    
         
            -
                        return (React.createElement(Stack, { className: mergeStyles((_a = props.styles) === null || _a === void 0 ? void 0 : _a.rowRoot), wrap: props.itemsPerRow === 'wrap', horizontal: true, key: rowIndex, tokens: { childrenGap: '0.5rem' }, "data-ui-id": "video-effects-picker-row" },
         
     | 
| 
      
 45 
     | 
    
         
            +
                        return (React.createElement(Stack, { className: mergeStyles((_a = props.styles) === null || _a === void 0 ? void 0 : _a.rowRoot), wrap: props.itemsPerRow === 'wrap', horizontal: true, key: rowIndex, tokens: { childrenGap: '0.5rem' }, "data-ui-id": "video-effects-picker-row", horizontalAlign: "center" },
         
     | 
| 
       46 
46 
     | 
    
         
             
                            options.map((option, i) => {
         
     | 
| 
       47 
47 
     | 
    
         
             
                                if (i === 0 && rowIndex === 0) {
         
     | 
| 
       48 
48 
     | 
    
         
             
                                    return (React.createElement(_VideoEffectsItem, Object.assign({}, option, { itemKey: option.itemKey, key: option.itemKey, componentRef: props.componentRef })));
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"VideoBackgroundEffectsPicker.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAA0B,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAkFlF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,KAAyC,EAAe,EAAE;;IACtG,MAAM,CAAC,oCAAoC,EAAE,uCAAuC,CAAC,GAAG,KAAK,CAAC,QAAQ,CAEpG,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAElC,+EAA+E;IAC/E,WAAW,CAAC;QACV,IAAI,EAAE,8BAA8B;QACpC,KAAK;QACL,eAAe,EAAE;YACf,YAAY,EAAE,UAAU;YACxB,SAAS,EAAE,mBAAmB;YAC9B,gBAAgB,EAAE,0BAA0B;SAC7C;K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,CAAC,MAAA,KAAK,CAAC,MAAM,0CAAE,OAAO,CAAC,EAC7C,IAAI,EAAE,KAAK,CAAC,WAAW,KAAK,MAAM,EAClC,UAAU,QACV,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,gBACtB,0BAA0B; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"VideoBackgroundEffectsPicker.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAA0B,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAkFlF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,KAAyC,EAAe,EAAE;;IACtG,MAAM,CAAC,oCAAoC,EAAE,uCAAuC,CAAC,GAAG,KAAK,CAAC,QAAQ,CAEpG,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAElC,+EAA+E;IAC/E,WAAW,CAAC;QACV,IAAI,EAAE,8BAA8B;QACpC,KAAK;QACL,eAAe,EAAE;YACf,YAAY,EAAE,UAAU;YACxB,SAAS,EAAE,mBAAmB;YAC9B,gBAAgB,EAAE,0BAA0B;SAC7C;KACF,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,MAAA,KAAK,CAAC,iBAAiB,mCAAI,oCAAoC,CAAC;IACvF,MAAM,iBAAiB,GAAG,CAAC,iBAAyB,EAAQ,EAAE;;QAC5D,uCAAuC,CAAC,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EAAE,QAAQ,EAAE,gBACtB,0BAA0B,EACrC,eAAe,EAAC,QAAQ;gBAEvB,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACzB,IAAI,CAAC,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;wBAC9B,OAAO,CACL,oBAAC,iBAAiB,oBACZ,MAAM,IACV,OAAO,EAAE,MAAM,CAAC,OAAO,EACvB,GAAG,EAAE,MAAM,CAAC,OAAO,EACnB,YAAY,EAAE,KAAK,CAAC,YAAY,IAChC,CACH,CAAC;oBACJ,CAAC;oBACD,OAAO,oBAAC,iBAAiB,oBAAK,MAAM,IAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,OAAO,IAAI,CAAC;gBACzF,CAAC,CAAC;gBACD,SAAS,GAAG,CAAC;oBACZ,QAAQ,KAAK,YAAY,CAAC,MAAM,GAAG,CAAC;oBACpC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAClD,oBAAC,KAAK,IACJ,GAAG,EAAE,KAAK,EACV,MAAM,EAAE,qCAAqC,gBAClC,2BAA2B,GACtC,CACH,CAAC,CACE,CACT,CAAA;SAAA,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IStyle, Label, mergeStyles, Stack } from '@fluentui/react';\nimport { useWarnings } from '@fluentui/react-hooks';\nimport React from 'react';\nimport { chunk } from '../utils';\nimport { _VideoEffectsItem, _VideoEffectsItemProps } from './VideoEffectsItem';\nimport { hiddenVideoEffectsItemContainerStyles } from './VideoEffectsItem.styles';\n\n/**\n * Props for {@link _VideoBackgroundEffectsPicker}\n * @internal\n */\nexport interface _VideoBackgroundEffectsPickerProps {\n  /**\n   * The options to display in the picker.\n   */\n  options: _VideoBackgroundEffectChoiceOption[];\n\n  /**\n   * The key of the current selected Video Background Effect.\n   * If you provide this, you must maintain selection state by observing onChange events and passing a new value in when changed.\n   */\n  selectedEffectKey?: string;\n\n  /**\n   * Callback to invoke when a Video Background Effect is selected.\n   * @param effectKey - The key of the Video Background Effect that was selected.\n   */\n  onChange?: (effectKey: string) => void;\n\n  /**\n   * The key of the Video Background Effect that is initially selected.\n   * Only provide this if the picker is an uncontrolled component;\n   * otherwise, use the `selectedEffectKey` property.\n   */\n  defaultSelectedEffectKey?: string;\n\n  /**\n   * The label to display for the picker.\n   */\n  label?: string;\n\n  /**\n   * The number of items to display per row.\n   * @default 3\n   */\n  itemsPerRow?: 'wrap' | number;\n\n  /**\n   * Styles for the picker.\n   */\n  styles?: _VideoBackgroundEffectsPickerStyles;\n\n  /**\n   * Imperative handle for calling focus()\n   */\n  componentRef?: React.RefObject<{\n    focus: () => void;\n  }>;\n}\n\n/**\n * Option for the {@link _VideoBackgroundEffectsPicker}.\n * @internal\n */\nexport type _VideoBackgroundEffectChoiceOption = _VideoEffectsItemProps;\n\n/**\n * Styles for the {@link _VideoBackgroundEffectsPicker}.\n * @internal\n */\nexport interface _VideoBackgroundEffectsPickerStyles {\n  /**\n   * Styles for the root element.\n   */\n  root?: IStyle;\n\n  /**\n   * Styles for the label.\n   */\n  label?: IStyle;\n\n  /**\n   * Styles for the root of each row element.\n   */\n  rowRoot?: IStyle;\n}\n\n/**\n * Picker for choosing a Video Background Effect.\n *\n * @remarks\n * This functions similar to a radio group of buttons, where the user can select one of the options.\n *\n * @internal\n */\nexport const _VideoBackgroundEffectsPicker = (props: _VideoBackgroundEffectsPickerProps): JSX.Element => {\n  const [componentControlledSelectedEffectKey, setComponentControlledSelectedEffectKey] = React.useState<\n    string | undefined\n  >(props.defaultSelectedEffectKey);\n\n  // Warn the developer if they use the component in an incorrect controlled way.\n  useWarnings({\n    name: 'VideoBackgroundEffectsPicker',\n    props,\n    controlledUsage: {\n      onChangeProp: 'onChange',\n      valueProp: 'selectedEffectKey',\n      defaultValueProp: 'defaultSelectedEffectKey'\n    }\n  });\n\n  const selectedEffect = props.selectedEffectKey ?? componentControlledSelectedEffectKey;\n  const setSelectedEffect = (selectedEffectKey: string): void => {\n    setComponentControlledSelectedEffectKey(selectedEffectKey);\n    props.onChange?.(selectedEffectKey);\n  };\n\n  const convertedOptions: _VideoEffectsItemProps[] = props.options.map((option) => ({\n    isSelected: option.itemKey === selectedEffect,\n    onSelect: () => setSelectedEffect(option.itemKey),\n    ...option\n  }));\n\n  const itemsPerRow = props.itemsPerRow ?? 3;\n  const optionsByRow = itemsPerRow === 'wrap' ? [convertedOptions] : chunk(convertedOptions, itemsPerRow);\n\n  // If the final row is not full, fill it with hidden items to ensure layout.\n  const fillCount = itemsPerRow === 'wrap' ? 0 : itemsPerRow - optionsByRow[optionsByRow.length - 1].length;\n\n  return (\n    <Stack tokens={{ childrenGap: '0.5rem' }}>\n      <Label className={mergeStyles(props.styles?.label)}>{props.label}</Label>\n      {optionsByRow.map((options, rowIndex) => (\n        <Stack\n          className={mergeStyles(props.styles?.rowRoot)}\n          wrap={props.itemsPerRow === 'wrap'}\n          horizontal\n          key={rowIndex}\n          tokens={{ childrenGap: '0.5rem' }}\n          data-ui-id=\"video-effects-picker-row\"\n          horizontalAlign=\"center\"\n        >\n          {options.map((option, i) => {\n            if (i === 0 && rowIndex === 0) {\n              return (\n                <_VideoEffectsItem\n                  {...option}\n                  itemKey={option.itemKey}\n                  key={option.itemKey}\n                  componentRef={props.componentRef}\n                />\n              );\n            }\n            return <_VideoEffectsItem {...option} itemKey={option.itemKey} key={option.itemKey} />;\n          })}\n          {fillCount > 0 &&\n            rowIndex === optionsByRow.length - 1 &&\n            Array.from({ length: fillCount }).map((_, index) => (\n              <Stack\n                key={index}\n                styles={hiddenVideoEffectsItemContainerStyles}\n                data-ui-id=\"video-effects-hidden-item\"\n              />\n            ))}\n        </Stack>\n      ))}\n    </Stack>\n  );\n};\n"]}
         
     | 
| 
         @@ -20,6 +20,7 @@ export declare const useVideoTileContextualMenuProps: (props: { 
     | 
|
| 
       20 
20 
     | 
    
         
             
                    stopSpotlightVideoTileMenuLabel?: string;
         
     | 
| 
       21 
21 
     | 
    
         
             
                    stopSpotlightOnSelfVideoTileMenuLabel?: string;
         
     | 
| 
       22 
22 
     | 
    
         
             
                    spotlightLimitReachedMenuTitle?: string;
         
     | 
| 
      
 23 
     | 
    
         
            +
                    muteParticipantMenuItemLabel?: string;
         
     | 
| 
       23 
24 
     | 
    
         
             
                };
         
     | 
| 
       24 
25 
     | 
    
         
             
                view?: {
         
     | 
| 
       25 
26 
     | 
    
         
             
                    updateScalingMode: (scalingMode: ViewScalingMode) => Promise<void>;
         
     | 
| 
         @@ -103,17 +103,17 @@ export const useVideoTileContextualMenuProps = (props) => { 
     | 
|
| 
       103 
103 
     | 
    
         
             
                        }
         
     | 
| 
       104 
104 
     | 
    
         
             
                    }
         
     | 
| 
       105 
105 
     | 
    
         
             
                    /* @conditional-compile-remove(soft-mute) */
         
     | 
| 
       106 
     | 
    
         
            -
                    if (onMuteParticipant) {
         
     | 
| 
      
 106 
     | 
    
         
            +
                    if (onMuteParticipant && (strings === null || strings === void 0 ? void 0 : strings.muteParticipantMenuItemLabel)) {
         
     | 
| 
       107 
107 
     | 
    
         
             
                        items.push({
         
     | 
| 
       108 
108 
     | 
    
         
             
                            key: 'mute',
         
     | 
| 
       109 
     | 
    
         
            -
                            text:  
     | 
| 
      
 109 
     | 
    
         
            +
                            text: strings === null || strings === void 0 ? void 0 : strings.muteParticipantMenuItemLabel,
         
     | 
| 
       110 
110 
     | 
    
         
             
                            iconProps: {
         
     | 
| 
       111 
111 
     | 
    
         
             
                                iconName: 'ContextualMenuMicMutedIcon',
         
     | 
| 
       112 
112 
     | 
    
         
             
                                styles: { root: { lineHeight: 0 } }
         
     | 
| 
       113 
113 
     | 
    
         
             
                            },
         
     | 
| 
       114 
114 
     | 
    
         
             
                            onClick: () => onMuteParticipant(participant.userId),
         
     | 
| 
       115 
115 
     | 
    
         
             
                            'data-ui-id': 'video-tile-mute-participant',
         
     | 
| 
       116 
     | 
    
         
            -
                            ariaLabel:  
     | 
| 
      
 116 
     | 
    
         
            +
                            ariaLabel: strings === null || strings === void 0 ? void 0 : strings.muteParticipantMenuItemLabel,
         
     | 
| 
       117 
117 
     | 
    
         
             
                            disabled: participant.isMuted
         
     | 
| 
       118 
118 
     | 
    
         
             
                        });
         
     | 
| 
       119 
119 
     | 
    
         
             
                    }
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"useVideoTileContextualMenuProps.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,aAAa,EAAE,sCAAgC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,sBAAsB,IAAI,qBAAqB,EAAE,sCAAgC;AAE1F;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,KAiC/C,EAAoC,EAAE;;IACrC,MAAM,EACJ,WAAW,EACX,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,6BAA6B,GAAG,EAAE,EAClC,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,0BAA0B,EAC1B,QAAQ;IACR,4CAA4C,CAAC,iBAAiB,EAC/D,GAAG,KAAK,CAAC;IACV,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE;;QAC/B,OAAO,MAAA,KAAK,CAAC,WAAW,CAAC,WAAW,0CAAE,WAAW,CAAC;IACpD,CAAC,EAAE,CAAC,MAAA,KAAK,CAAC,WAAW,CAAC,WAAW,0CAAE,WAAW,CAAC,CAAC,C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IT License.\n\nimport { IContextualMenuItem, IContextualMenuProps } from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useMemo } from 'react';\nimport { VideoGalleryParticipant, ViewScalingMode } from '../../types';\nimport { _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport const useVideoTileContextualMenuProps = (props: {\n  participant: VideoGalleryParticipant;\n  strings?: {\n    fitRemoteParticipantToFrame?: string;\n    fillRemoteParticipantFrame?: string;\n    pinParticipantForMe?: string;\n    pinParticipantForMeLimitReached?: string;\n    unpinParticipantForMe?: string;\n    pinParticipantMenuItemAriaLabel?: string;\n    unpinParticipantMenuItemAriaLabel?: string;\n    pinnedParticipantAnnouncementAriaLabel?: string;\n    unpinnedParticipantAnnouncementAriaLabel?: string;\n    startSpotlightVideoTileMenuLabel?: string;\n    addSpotlightVideoTileMenuLabel?: string;\n    stopSpotlightVideoTileMenuLabel?: string;\n    stopSpotlightOnSelfVideoTileMenuLabel?: string;\n    spotlightLimitReachedMenuTitle?: string;\n  };\n  view?: { updateScalingMode: (scalingMode: ViewScalingMode) => Promise<void> };\n  isPinned?: boolean;\n  onPinParticipant?: (userId: string) => void;\n  onUnpinParticipant?: (userId: string) => void;\n  onUpdateScalingMode?: (userId: string, scalingMode: ViewScalingMode) => void;\n  disablePinMenuItem?: boolean;\n  toggleAnnouncerString?: (announcerString: string) => void;\n  isSpotlighted?: boolean;\n  spotlightedParticipantUserIds?: string[];\n  onStartSpotlight?: (userIds: string[]) => void;\n  onStopSpotlight?: (userIds: string[]) => void;\n  maxParticipantsToSpotlight?: number;\n  myUserId?: string;\n  /* @conditional-compile-remove(soft-mute) */\n  onMuteParticipant?: (userId: string) => void;\n}): IContextualMenuProps | undefined => {\n  const {\n    participant,\n    view,\n    strings,\n    isPinned,\n    onPinParticipant,\n    onUnpinParticipant,\n    onUpdateScalingMode,\n    disablePinMenuItem,\n    toggleAnnouncerString,\n    spotlightedParticipantUserIds = [],\n    isSpotlighted,\n    onStartSpotlight,\n    onStopSpotlight,\n    maxParticipantsToSpotlight,\n    myUserId,\n    /* @conditional-compile-remove(soft-mute) */ onMuteParticipant\n  } = props;\n  const scalingMode = useMemo(() => {\n    return props.participant.videoStream?.scalingMode;\n  }, [props.participant.videoStream?.scalingMode]);\n\n  const contextualMenuProps: IContextualMenuProps | undefined = useMemo(() => {\n    const items: IContextualMenuItem[] = [];\n\n    if (isPinned !== undefined) {\n      if (isPinned && onUnpinParticipant && strings?.unpinParticipantForMe) {\n        let unpinActionString: string | undefined = undefined;\n        if (toggleAnnouncerString && strings.unpinParticipantMenuItemAriaLabel && participant.displayName) {\n          unpinActionString = _formatString(strings?.unpinParticipantMenuItemAriaLabel, {\n            participantName: participant.displayName\n          });\n        }\n        items.push({\n          key: 'unpin',\n          text: strings.unpinParticipantForMe,\n          iconProps: {\n            iconName: 'UnpinParticipant',\n            styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n          },\n          onClick: () => {\n            onUnpinParticipant(participant.userId);\n            unpinActionString && toggleAnnouncerString?.(unpinActionString);\n          },\n          'data-ui-id': 'video-tile-unpin-participant-button',\n          ariaLabel: unpinActionString\n        });\n      }\n      if (!isPinned && onPinParticipant && strings?.pinParticipantForMe) {\n        let pinActionString: string | undefined = undefined;\n        if (toggleAnnouncerString && strings.pinnedParticipantAnnouncementAriaLabel && participant.displayName) {\n          pinActionString = _formatString(strings?.pinnedParticipantAnnouncementAriaLabel, {\n            participantName: participant.displayName\n          });\n        }\n        items.push({\n          key: 'pin',\n          text: disablePinMenuItem ? strings.pinParticipantForMeLimitReached : strings.pinParticipantForMe,\n          iconProps: {\n            iconName: 'PinParticipant',\n            styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n          },\n          onClick: () => {\n            onPinParticipant(participant.userId);\n            pinActionString && toggleAnnouncerString?.(pinActionString);\n          },\n          'data-ui-id': 'video-tile-pin-participant-button',\n          disabled: disablePinMenuItem || isSpotlighted,\n          ariaLabel: pinActionString\n        });\n      }\n    }\n\n    if (isSpotlighted) {\n      const stopSpotlightMenuLabel =\n        myUserId === participant.userId\n          ? strings?.stopSpotlightOnSelfVideoTileMenuLabel\n          : strings?.stopSpotlightVideoTileMenuLabel;\n      if (onStopSpotlight && participant.userId && strings?.stopSpotlightVideoTileMenuLabel) {\n        items.push({\n          key: 'stopSpotlight',\n          text: stopSpotlightMenuLabel,\n          iconProps: {\n            iconName: 'StopSpotlightContextualMenuItem',\n            styles: { root: { lineHeight: 0 } }\n          },\n          onClick: () => onStopSpotlight([participant.userId]),\n          ariaLabel: strings.stopSpotlightVideoTileMenuLabel\n        });\n      }\n    } else {\n      const startSpotlightMenuLabel =\n        spotlightedParticipantUserIds && spotlightedParticipantUserIds.length > 0\n          ? strings?.addSpotlightVideoTileMenuLabel\n          : strings?.startSpotlightVideoTileMenuLabel;\n      const maxSpotlightedParticipantsReached = maxParticipantsToSpotlight\n        ? spotlightedParticipantUserIds.length >= maxParticipantsToSpotlight\n        : false;\n      if (onStartSpotlight && participant.userId && startSpotlightMenuLabel) {\n        items.push({\n          key: 'startSpotlight',\n          text: startSpotlightMenuLabel,\n          iconProps: {\n            iconName: 'StartSpotlightContextualMenuItem',\n            styles: { root: { lineHeight: 0 } }\n          },\n          onClick: () => onStartSpotlight([participant.userId]),\n          ariaLabel: startSpotlightMenuLabel,\n          disabled: maxSpotlightedParticipantsReached,\n          title: maxSpotlightedParticipantsReached ? strings?.spotlightLimitReachedMenuTitle : undefined\n        });\n      }\n    }\n    /* @conditional-compile-remove(soft-mute) */\n    if (onMuteParticipant) {\n      items.push({\n        key: 'mute',\n        text: 'Mute',\n        iconProps: {\n          iconName: 'ContextualMenuMicMutedIcon',\n          styles: { root: { lineHeight: 0 } }\n        },\n        onClick: () => onMuteParticipant(participant.userId),\n        'data-ui-id': 'video-tile-mute-participant',\n        ariaLabel: 'Mute',\n        disabled: participant.isMuted\n      });\n    }\n    if (scalingMode) {\n      if (scalingMode === 'Crop' && strings?.fitRemoteParticipantToFrame) {\n        items.push({\n          key: 'fitRemoteParticipantToFrame',\n          text: strings.fitRemoteParticipantToFrame,\n          iconProps: {\n            iconName: 'VideoTileScaleFit',\n            styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n          },\n          onClick: () => {\n            onUpdateScalingMode?.(participant.userId, 'Fit');\n            view?.updateScalingMode('Fit');\n          },\n          'data-ui-id': 'video-tile-fit-to-frame',\n          ariaLabel: strings.fitRemoteParticipantToFrame\n        });\n      } else if (scalingMode === 'Fit' && strings?.fillRemoteParticipantFrame) {\n        items.push({\n          key: 'fillRemoteParticipantFrame',\n          text: strings.fillRemoteParticipantFrame,\n          iconProps: {\n            iconName: 'VideoTileScaleFill',\n            styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n          },\n          onClick: () => {\n            onUpdateScalingMode?.(participant.userId, 'Crop');\n            view?.updateScalingMode('Crop');\n          },\n          'data-ui-id': 'video-tile-fill-frame',\n          ariaLabel: strings.fillRemoteParticipantFrame\n        });\n      }\n    }\n    if (items.length === 0) {\n      return undefined;\n    }\n\n    return { items, styles: {}, calloutProps: { preventDismissOnEvent } };\n  }, [\n    scalingMode,\n    strings,\n    view,\n    isPinned,\n    onPinParticipant,\n    onUnpinParticipant,\n    onUpdateScalingMode,\n    participant.userId,\n    participant.displayName,\n    disablePinMenuItem,\n    toggleAnnouncerString,\n    spotlightedParticipantUserIds,\n    isSpotlighted,\n    onStartSpotlight,\n    onStopSpotlight,\n    maxParticipantsToSpotlight,\n    myUserId,\n    /* @conditional-compile-remove(soft-mute) */ onMuteParticipant,\n    /* @conditional-compile-remove(soft-mute) */ participant.isMuted\n  ]);\n\n  return contextualMenuProps;\n};\n"]}
         
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"useVideoTileContextualMenuProps.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAA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wBAClD,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;oBAClC,CAAC;oBACD,YAAY,EAAE,uBAAuB;oBACrC,SAAS,EAAE,OAAO,CAAC,0BAA0B;iBAC9C,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,qBAAqB,EAAE,EAAE,CAAC;IACxE,CAAC,EAAE;QACD,WAAW;QACX,OAAO;QACP,IAAI;QACJ,QAAQ;QACR,gBAAgB;QAChB,kBAAkB;QAClB,mBAAmB;QACnB,WAAW,CAAC,MAAM;QAClB,WAAW,CAAC,WAAW;QACvB,kBAAkB;QAClB,qBAAqB;QACrB,6BAA6B;QAC7B,aAAa;QACb,gBAAgB;QAChB,eAAe;QACf,0BAA0B;QAC1B,QAAQ;QACR,4CAA4C,CAAC,iBAAiB;QAC9D,4CAA4C,CAAC,WAAW,CAAC,OAAO;KACjE,CAAC,CAAC;IAEH,OAAO,mBAAmB,CAAC;AAC7B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IContextualMenuItem, IContextualMenuProps } from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useMemo } from 'react';\nimport { VideoGalleryParticipant, ViewScalingMode } from '../../types';\nimport { _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport const useVideoTileContextualMenuProps = (props: {\n  participant: VideoGalleryParticipant;\n  strings?: {\n    fitRemoteParticipantToFrame?: string;\n    fillRemoteParticipantFrame?: string;\n    pinParticipantForMe?: string;\n    pinParticipantForMeLimitReached?: string;\n    unpinParticipantForMe?: string;\n    pinParticipantMenuItemAriaLabel?: string;\n    unpinParticipantMenuItemAriaLabel?: string;\n    pinnedParticipantAnnouncementAriaLabel?: string;\n    unpinnedParticipantAnnouncementAriaLabel?: string;\n    startSpotlightVideoTileMenuLabel?: string;\n    addSpotlightVideoTileMenuLabel?: string;\n    stopSpotlightVideoTileMenuLabel?: string;\n    stopSpotlightOnSelfVideoTileMenuLabel?: string;\n    spotlightLimitReachedMenuTitle?: string;\n    /* @conditional-compile-remove(soft-mute) */\n    muteParticipantMenuItemLabel?: string;\n  };\n  view?: { updateScalingMode: (scalingMode: ViewScalingMode) => Promise<void> };\n  isPinned?: boolean;\n  onPinParticipant?: (userId: string) => void;\n  onUnpinParticipant?: (userId: string) => void;\n  onUpdateScalingMode?: (userId: string, scalingMode: ViewScalingMode) => void;\n  disablePinMenuItem?: boolean;\n  toggleAnnouncerString?: (announcerString: string) => void;\n  isSpotlighted?: boolean;\n  spotlightedParticipantUserIds?: string[];\n  onStartSpotlight?: (userIds: string[]) => void;\n  onStopSpotlight?: (userIds: string[]) => void;\n  maxParticipantsToSpotlight?: number;\n  myUserId?: string;\n  /* @conditional-compile-remove(soft-mute) */\n  onMuteParticipant?: (userId: string) => void;\n}): IContextualMenuProps | undefined => {\n  const {\n    participant,\n    view,\n    strings,\n    isPinned,\n    onPinParticipant,\n    onUnpinParticipant,\n    onUpdateScalingMode,\n    disablePinMenuItem,\n    toggleAnnouncerString,\n    spotlightedParticipantUserIds = [],\n    isSpotlighted,\n    onStartSpotlight,\n    onStopSpotlight,\n    maxParticipantsToSpotlight,\n    myUserId,\n    /* @conditional-compile-remove(soft-mute) */ onMuteParticipant\n  } = props;\n  const scalingMode = useMemo(() => {\n    return props.participant.videoStream?.scalingMode;\n  }, [props.participant.videoStream?.scalingMode]);\n\n  const contextualMenuProps: IContextualMenuProps | undefined = useMemo(() => {\n    const items: IContextualMenuItem[] = [];\n\n    if (isPinned !== undefined) {\n      if (isPinned && onUnpinParticipant && strings?.unpinParticipantForMe) {\n        let unpinActionString: string | undefined = undefined;\n        if (toggleAnnouncerString && strings.unpinParticipantMenuItemAriaLabel && participant.displayName) {\n          unpinActionString = _formatString(strings?.unpinParticipantMenuItemAriaLabel, {\n            participantName: participant.displayName\n          });\n        }\n        items.push({\n          key: 'unpin',\n          text: strings.unpinParticipantForMe,\n          iconProps: {\n            iconName: 'UnpinParticipant',\n            styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n          },\n          onClick: () => {\n            onUnpinParticipant(participant.userId);\n            unpinActionString && toggleAnnouncerString?.(unpinActionString);\n          },\n          'data-ui-id': 'video-tile-unpin-participant-button',\n          ariaLabel: unpinActionString\n        });\n      }\n      if (!isPinned && onPinParticipant && strings?.pinParticipantForMe) {\n        let pinActionString: string | undefined = undefined;\n        if (toggleAnnouncerString && strings.pinnedParticipantAnnouncementAriaLabel && participant.displayName) {\n          pinActionString = _formatString(strings?.pinnedParticipantAnnouncementAriaLabel, {\n            participantName: participant.displayName\n          });\n        }\n        items.push({\n          key: 'pin',\n          text: disablePinMenuItem ? strings.pinParticipantForMeLimitReached : strings.pinParticipantForMe,\n          iconProps: {\n            iconName: 'PinParticipant',\n            styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n          },\n          onClick: () => {\n            onPinParticipant(participant.userId);\n            pinActionString && toggleAnnouncerString?.(pinActionString);\n          },\n          'data-ui-id': 'video-tile-pin-participant-button',\n          disabled: disablePinMenuItem || isSpotlighted,\n          ariaLabel: pinActionString\n        });\n      }\n    }\n\n    if (isSpotlighted) {\n      const stopSpotlightMenuLabel =\n        myUserId === participant.userId\n          ? strings?.stopSpotlightOnSelfVideoTileMenuLabel\n          : strings?.stopSpotlightVideoTileMenuLabel;\n      if (onStopSpotlight && participant.userId && strings?.stopSpotlightVideoTileMenuLabel) {\n        items.push({\n          key: 'stopSpotlight',\n          text: stopSpotlightMenuLabel,\n          iconProps: {\n            iconName: 'StopSpotlightContextualMenuItem',\n            styles: { root: { lineHeight: 0 } }\n          },\n          onClick: () => onStopSpotlight([participant.userId]),\n          ariaLabel: strings.stopSpotlightVideoTileMenuLabel\n        });\n      }\n    } else {\n      const startSpotlightMenuLabel =\n        spotlightedParticipantUserIds && spotlightedParticipantUserIds.length > 0\n          ? strings?.addSpotlightVideoTileMenuLabel\n          : strings?.startSpotlightVideoTileMenuLabel;\n      const maxSpotlightedParticipantsReached = maxParticipantsToSpotlight\n        ? spotlightedParticipantUserIds.length >= maxParticipantsToSpotlight\n        : false;\n      if (onStartSpotlight && participant.userId && startSpotlightMenuLabel) {\n        items.push({\n          key: 'startSpotlight',\n          text: startSpotlightMenuLabel,\n          iconProps: {\n            iconName: 'StartSpotlightContextualMenuItem',\n            styles: { root: { lineHeight: 0 } }\n          },\n          onClick: () => onStartSpotlight([participant.userId]),\n          ariaLabel: startSpotlightMenuLabel,\n          disabled: maxSpotlightedParticipantsReached,\n          title: maxSpotlightedParticipantsReached ? strings?.spotlightLimitReachedMenuTitle : undefined\n        });\n      }\n    }\n    /* @conditional-compile-remove(soft-mute) */\n    if (onMuteParticipant && strings?.muteParticipantMenuItemLabel) {\n      items.push({\n        key: 'mute',\n        text: strings?.muteParticipantMenuItemLabel,\n        iconProps: {\n          iconName: 'ContextualMenuMicMutedIcon',\n          styles: { root: { lineHeight: 0 } }\n        },\n        onClick: () => onMuteParticipant(participant.userId),\n        'data-ui-id': 'video-tile-mute-participant',\n        ariaLabel: strings?.muteParticipantMenuItemLabel,\n        disabled: participant.isMuted\n      });\n    }\n    if (scalingMode) {\n      if (scalingMode === 'Crop' && strings?.fitRemoteParticipantToFrame) {\n        items.push({\n          key: 'fitRemoteParticipantToFrame',\n          text: strings.fitRemoteParticipantToFrame,\n          iconProps: {\n            iconName: 'VideoTileScaleFit',\n            styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n          },\n          onClick: () => {\n            onUpdateScalingMode?.(participant.userId, 'Fit');\n            view?.updateScalingMode('Fit');\n          },\n          'data-ui-id': 'video-tile-fit-to-frame',\n          ariaLabel: strings.fitRemoteParticipantToFrame\n        });\n      } else if (scalingMode === 'Fit' && strings?.fillRemoteParticipantFrame) {\n        items.push({\n          key: 'fillRemoteParticipantFrame',\n          text: strings.fillRemoteParticipantFrame,\n          iconProps: {\n            iconName: 'VideoTileScaleFill',\n            styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n          },\n          onClick: () => {\n            onUpdateScalingMode?.(participant.userId, 'Crop');\n            view?.updateScalingMode('Crop');\n          },\n          'data-ui-id': 'video-tile-fill-frame',\n          ariaLabel: strings.fillRemoteParticipantFrame\n        });\n      }\n    }\n    if (items.length === 0) {\n      return undefined;\n    }\n\n    return { items, styles: {}, calloutProps: { preventDismissOnEvent } };\n  }, [\n    scalingMode,\n    strings,\n    view,\n    isPinned,\n    onPinParticipant,\n    onUnpinParticipant,\n    onUpdateScalingMode,\n    participant.userId,\n    participant.displayName,\n    disablePinMenuItem,\n    toggleAnnouncerString,\n    spotlightedParticipantUserIds,\n    isSpotlighted,\n    onStartSpotlight,\n    onStopSpotlight,\n    maxParticipantsToSpotlight,\n    myUserId,\n    /* @conditional-compile-remove(soft-mute) */ onMuteParticipant,\n    /* @conditional-compile-remove(soft-mute) */ participant.isMuted\n  ]);\n\n  return contextualMenuProps;\n};\n"]}
         
     | 
| 
         @@ -89,6 +89,8 @@ export interface VideoGalleryStrings { 
     | 
|
| 
       89 
89 
     | 
    
         
             
                stopSpotlightOnSelfVideoTileMenuLabel: string;
         
     | 
| 
       90 
90 
     | 
    
         
             
                /** String for the attendee role */
         
     | 
| 
       91 
91 
     | 
    
         
             
                attendeeRole: string;
         
     | 
| 
      
 92 
     | 
    
         
            +
                /** Menu text shown in Video Tile contextual menu to mute a remote participant */
         
     | 
| 
      
 93 
     | 
    
         
            +
                muteParticipantMenuItemLabel: string;
         
     | 
| 
       92 
94 
     | 
    
         
             
            }
         
     | 
| 
       93 
95 
     | 
    
         
             
            /**
         
     | 
| 
       94 
96 
     | 
    
         
             
             * @public
         
     |