@azure/communication-react 1.22.0-beta.1 → 1.22.0
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 +348 -1690
- package/dist/dist-cjs/communication-react/index.js +36397 -172
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/common.d.ts +0 -13
- package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/constants.d.ts +0 -5
- package/dist/dist-esm/acs-ui-common/src/constants.js +0 -5
- package/dist/dist-esm/acs-ui-common/src/constants.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/index.d.ts +0 -4
- package/dist/dist-esm/acs-ui-common/src/index.js +0 -3
- package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -13
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -11
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +18 -18
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +6 -6
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -11
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -6
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -5
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +1 -19
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +3 -2
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +8 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -3
- package/dist/dist-esm/calling-component-bindings/src/index.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +5 -34
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +2 -2
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -79
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +0 -15
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +2 -95
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -5
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +4 -27
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -3
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
- package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -3
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -35
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -3
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +3 -26
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/compareMessages.js +0 -6
- package/dist/dist-esm/chat-component-bindings/src/utils/compareMessages.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -15
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -2
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/index.d.ts +0 -1
- package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +8 -29
- package/dist/dist-esm/communication-react/src/index.js +3 -6
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +0 -2
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +0 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Caption.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +42 -11
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +6 -3
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +86 -17
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js +17 -6
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -13
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +3 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -11
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +2 -32
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -8
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +5 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +1 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +4 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +1 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +6 -31
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +1 -15
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -23
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +6 -17
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -8
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +6 -10
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +5 -5
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -2
- package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
- package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -13
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +0 -20
- package/dist/dist-esm/react-components/src/components/NotificationStack.js +0 -5
- package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
- package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -12
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
- package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
- package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +10 -10
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js +6 -3
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SystemMessage.js +17 -6
- package/dist/dist-esm/react-components/src/components/SystemMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -19
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +0 -20
- package/dist/dist-esm/react-components/src/components/index.js +0 -7
- package/dist/dist-esm/react-components/src/components/index.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/AttachmentCardGroup.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +4 -4
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js +4 -2
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +0 -13
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js +0 -13
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -8
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -37
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -38
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -131
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
- package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/utils.js +6 -9
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +1 -2
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +16 -55
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/cy-GB/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/es-MX/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/fr-CA/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +128 -2
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +128 -2
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -30
- package/dist/dist-esm/react-components/src/theming/icons.js +5 -96
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
- package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
- package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
- package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.d.ts +4 -4
- package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +8 -73
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +8 -21
- 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 +0 -34
- 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 +5 -47
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +7 -105
- 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 +1 -24
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +5 -11
- 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/ConfigurationPageCameraDropdown.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +3 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js +1 -19
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +1 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +7 -5
- 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/ConfigurationPage.d.ts +0 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +5 -40
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -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 +2 -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 +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -18
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -16
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +29 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +1 -12
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -59
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -65
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -24
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -8
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -22
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -136
- 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 +3 -28
- 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 +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -9
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -11
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +1 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +0 -5
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +0 -13
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -27
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -189
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -36
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js +1 -13
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js +8 -3
- package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/{CaptionsBanner.d.ts → CallingCaptionsBanner.d.ts} +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/{CaptionsBanner.js → CallingCaptionsBanner.js} +8 -11
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/{CaptionsSettingsModal.d.ts → CallingCaptionsSettingsModal.d.ts} +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/{CaptionsSettingsModal.js → CallingCaptionsSettingsModal.js} +6 -9
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsSettingsModal.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js +7 -10
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +5 -17
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +5 -9
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +12 -14
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -2
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/StarSurvey.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/adapters.d.ts +0 -23
- package/dist/dist-esm/react-composites/src/composites/common/adapters.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
- package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
- package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -32
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +0 -4
- package/dist/dist-esm/react-composites/src/composites/common/utils.js +0 -22
- package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/index.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-MX/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-CA/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +25 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +25 -1
- package/package.json +5 -5
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CwxvsFHy.js +0 -206
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CwxvsFHy.js.map +0 -1
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DMdQIGV5.js +0 -50
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DMdQIGV5.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-D7R-o8dv.js +0 -43117
- package/dist/dist-cjs/communication-react/index-D7R-o8dv.js.map +0 -1
- package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
- package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -20
- package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
- package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
- package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
- package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.d.ts +0 -20
- package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +0 -118
- package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
- package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
- package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +0 -6
- package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +0 -20
- package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -24
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -196
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -36
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -67
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -51
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -40
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
- package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -119
- package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -12
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -23
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -29
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -87
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -58
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -332
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -75
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -215
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -168
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -221
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -819
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
- package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
- package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
- package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
- package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -320
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
- package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
- package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -69
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -72
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -177
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
- package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -119
- package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
- package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
- package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
- package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
- package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.d.ts +0 -47
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.js +0 -48
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.d.ts +0 -11
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js +0 -36
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -49
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -203
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.d.ts +0 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.js +0 -14
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -41
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -265
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.d.ts +0 -12
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.js +0 -52
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../preprocess-dist/communication-react/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAUzG,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACrN,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAO1H,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,aAAa,EAAE,mBAAmB,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAEjL,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB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A4B,CAAC;AAEvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAOxE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type { AreEqual, CommonProperties, MessageStatus, Common, AreTypeEqual, AreParamEqual } from '../../acs-ui-common/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type { CallClientProviderProps, CallAgentProviderProps, CallProviderProps, GetCallingSelector, CallingHandlers, CallingBaseSelectorProps, CommonCallingHandlers } from '../../calling-component-bindings/src';\nexport type { DeepNoiseSuppressionEffectDependency, VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';\nexport type { CaptionsOptions } from '../../calling-component-bindings/src';\nexport type { ChatClientProviderProps, ChatThreadClientProviderProps, GetChatSelector, ChatHandlers, ChatBaseSelectorProps } from '../../chat-component-bindings/src';\nexport type { MessageOptions, ChatMessageType } from '../../acs-ui-common/src';\nexport type { UploadChatImageResult } from '../../acs-ui-common/src';\nexport { CallClientProvider, CallAgentProvider, CallProvider, useCallClient, useCallAgent, useCall, useDeviceManager, getCallingSelector, createDefaultCallingHandlers } from '../../calling-component-bindings/src';\nexport { useTeamsCallAgent, useTeamsCall, createDefaultTeamsCallingHandlers } from '../../calling-component-bindings/src';\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\nexport type { ScreenShareButtonSelector, CameraButtonSelector, VideoGallerySelector, DevicesButtonSelector, EmptySelector, ErrorBarSelector as CallErrorBarSelector, ParticipantListSelector, MicrophoneButtonSelector, ParticipantsButtonSelector, CreateDefaultCallingHandlers } from '../../calling-component-bindings/src';\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\nexport type { NotificationStackSelector } from '../../calling-component-bindings/src';\nexport type { IncomingCallStackSelector } from '../../calling-component-bindings/src';\nexport { ChatClientProvider, ChatThreadClientProvider, useChatClient, useChatThreadClient, getChatSelector, createDefaultChatHandlers } from '../../chat-component-bindings/src';\nexport type { MessageThreadSelector, TypingIndicatorSelector, ChatParticipantListSelector, SendBoxSelector, ErrorBarSelector as ChatErrorBarSelector } from '../../chat-component-bindings/src';\nexport { _IdentifierProvider, CameraButton, ControlBar, ControlBarButton, DevicesButton, EndCallButton, ErrorBar, GridLayout, LocalizationProvider, MessageStatusIndicator, MessageThread, MicrophoneButton, ParticipantItem, ParticipantList, ParticipantsButton, ScreenShareButton, SendBox, StreamMedia, TypingIndicator, VideoGallery, VideoTile, COMPONENT_LOCALE_EN_GB, COMPONENT_LOCALE_AR_SA, COMPONENT_LOCALE_CS_CZ, COMPONENT_LOCALE_CY_GB, COMPONENT_LOCALE_DE_DE, COMPONENT_LOCALE_ES_ES, COMPONENT_LOCALE_ES_MX, COMPONENT_LOCALE_FI_FI, COMPONENT_LOCALE_FR_FR, COMPONENT_LOCALE_FR_CA, COMPONENT_LOCALE_HE_IL, COMPONENT_LOCALE_IT_IT, COMPONENT_LOCALE_JA_JP, COMPONENT_LOCALE_KO_KR, COMPONENT_LOCALE_NB_NO, COMPONENT_LOCALE_NL_NL, COMPONENT_LOCALE_PL_PL, COMPONENT_LOCALE_PT_BR, COMPONENT_LOCALE_RU_RU, COMPONENT_LOCALE_SV_SE, COMPONENT_LOCALE_TR_TR, COMPONENT_LOCALE_ZH_CN, COMPONENT_LOCALE_ZH_TW } from '../../react-components/src';\nexport { ImageOverlay } from '../../react-components/src';\nexport { HoldButton } from '../../react-components/src';\nexport { RaiseHandButton } from '../../react-components/src';\nexport { Dialpad } from '../../react-components/src';\nexport { IncomingCallNotification, IncomingCallStack } from '../../react-components/src';\nexport type { IncomingCallNotificationProps, IncomingCallNotificationStrings, IncomingCallNotificationStyles, IncomingCallStackProps, IncomingCallStackCall } from '../../react-components/src';\nexport { CameraAndMicrophoneSitePermissions, MicrophoneSitePermissions, CameraSitePermissions } from '../../react-components/src';\nexport type { CameraAndMicrophoneSitePermissionsStrings, CameraAndMicrophoneSitePermissionsProps, CameraSitePermissionsStrings, CameraSitePermissionsProps, CommonSitePermissionsProps, SitePermissionsStrings, SitePermissionsStyles, MicrophoneSitePermissionsStrings, MicrophoneSitePermissionsProps } from '../../react-components/src';\nexport type { ParticipantListStrings } from '../../react-components/src';\nexport type { MentionOptions, MentionDisplayOptions, MentionLookupOptions, Mention, MentionPopoverStrings } from '../../react-components/src';\nexport type { _IdentifierProviderProps, _Identifiers, ActiveErrorMessage, BaseCustomStyles, CallParticipantListParticipant, CameraButtonContextualMenuStyles, CameraButtonProps, CameraButtonStrings, CameraButtonStyles, ChatMessage, CommunicationParticipant, ComponentLocale, ComponentSlotStyle, ComponentStrings, ContentSystemMessage, ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles, ControlBarLayout, ControlBarProps, CreateVideoStreamViewResult, CustomAvatarOptions, CustomMessage, DevicesButtonContextualMenuStyles, DevicesButtonProps, DevicesButtonStrings, DevicesButtonStyles, EndCallButtonProps, EndCallButtonStrings, ErrorBarProps, ErrorBarStrings, ErrorType, GridLayoutProps, GridLayoutStyles, HorizontalGalleryStyles, JumpToNewMessageButtonProps, LocalizationProviderProps, LocalVideoCameraCycleButtonProps, LoadingState, Message, MessageAttachedStatus, MessageCommon, MessageContentType, MessageProps, MessageRenderer, MessageStatusIndicatorProps, MessageStatusIndicatorStrings, MessageThreadProps, MessageThreadStrings, MessageThreadStyles, MicrophoneButtonContextualMenuStyles, MicrophoneButtonProps, MicrophoneButtonStrings, MicrophoneButtonStyles, OnRenderAvatarCallback, OptionsDevice, ParticipantAddedSystemMessage, ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles, ParticipantListItemStyles, ParticipantListParticipant, ParticipantListProps, ParticipantListStyles, ParticipantMenuItemsCallback, ParticipantRemovedSystemMessage, ParticipantState, ParticipantsButtonContextualMenuStyles, ParticipantsButtonProps, ParticipantsButtonStrings, ParticipantsButtonStyles, ReadReceiptsBySenderId, ScreenShareButtonProps, ScreenShareButtonStrings, SendBoxProps, SendBoxStrings, SendBoxStylesProps, StreamMediaProps, SystemMessage, SystemMessageCommon, TopicUpdatedSystemMessage, TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps, UpdateMessageCallback, CancelEditCallback, VideoGalleryLayout, VideoGalleryLocalParticipant, VideoGalleryParticipant, VideoGalleryProps, VideoGalleryRemoteParticipant, VideoGalleryStream, VideoGalleryStrings, VideoGalleryStyles, VideoStreamOptions, VideoTileProps, VideoTileStylesProps, ViewScalingMode, VideoTileContextualMenuProps, VideoTileDrawerMenuProps, VideoTilesOptions } from '../../react-components/src';\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\nexport type { ReactionButtonStrings, Reaction, ReactionButtonProps, ReactionResources, ReactionSprite, ReactionButtonReaction } from '../../react-components/src';\nexport { ReactionButton } from '../../react-components/src';\nexport { RichTextSendBox } from '../../react-components/src';\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from '../../react-components/src';\nexport type { Spotlight } from '../../react-components/src';\nexport type { ImageOverlayProps, ImageOverlayStrings } from '../../react-components/src';\nexport type { BlockedMessage } from '../../react-components/src';\nexport type { DialpadMode, DialpadProps, DialpadStrings, DialpadStyles, DtmfTone, LongPressTrigger } from '../../react-components/src';\nexport type { AttachmentOptions } from '../../react-components/src';\nexport type { SendBoxErrorBarError } from '../../react-components/src';\nexport type { SendBoxErrorBarType } from '../../react-components/src';\nexport type { AttachmentActionHandler } from '../../react-components/src';\nexport type { AttachmentSelectionHandler, AttachmentRemovalHandler, AttachmentUploadOptions, AttachmentUploadTask } from '../../react-components/src';\nexport type { AttachmentMetadata } from '../../acs-ui-common/src';\nexport type { AttachmentMetadataInProgress, AttachmentProgressError } from '../../acs-ui-common/src';\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../react-components/src';\nexport { defaultAttachmentMenuAction } from '../../react-components/src';\nexport type { ChatAttachmentType } from '../../react-components/src';\nexport type { InlineImageOptions, InlineImage } from '../../react-components/src';\nexport type { RichTextEditorOptions, RichTextEditBoxOptions } from '../../react-components/src';\nexport type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';\nexport type { VideoTileStrings } from '../../react-components/src';\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\nexport type { BrowserPermissionDeniedIOSStrings, BrowserPermissionDeniedStyles, BrowserPermissionDeniedIOSProps } from '../../react-components/src';\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type { StatefulChatClient, StatefulChatClientArgs, StatefulChatClientOptions, ChatMessageWithStatus, ChatClientState, ChatError, ChatErrors, ChatThreadClientState, ChatThreadProperties, ChatErrorTarget } from '../../chat-stateful-client/src';\nexport type { MessagingPolicy } from '../../chat-stateful-client/src';\nexport type { ResourceFetchResult } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\nexport { UnsupportedBrowser } from '../../react-components/src';\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\nexport type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from '../../react-components/src';\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';\nexport type { SurveyIssues } from '../../react-components/src';\nexport type { SurveyIssuesHeadingStrings } from '../../react-components/src';\nexport type { CallSurveyImprovementSuggestions } from '../../react-components/src';\nexport { NotificationStack, Notification } from '../../react-components/src';\nexport type { NotificationStackProps, NotificationProps, NotificationStrings, NotificationStackStrings, NotificationType, ActiveNotification, NotificationStyles } from '../../react-components/src';\nexport type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';"]}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../preprocess-dist/communication-react/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAOzG,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACrN,OAAO,EAAE,iBAAiB,EAAE,YAAY,E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AwB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC;AAM9B,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAI7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type { AreEqual, CommonProperties, MessageStatus, Common, AreTypeEqual, AreParamEqual } from '../../acs-ui-common/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type { CallClientProviderProps, CallAgentProviderProps, CallProviderProps, GetCallingSelector, CallingHandlers, CallingBaseSelectorProps, CommonCallingHandlers } from '../../calling-component-bindings/src';\nexport type { DeepNoiseSuppressionEffectDependency, VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';\nexport type { ChatClientProviderProps, ChatThreadClientProviderProps, GetChatSelector, ChatHandlers, ChatBaseSelectorProps } from '../../chat-component-bindings/src';\nexport { CallClientProvider, CallAgentProvider, CallProvider, useCallClient, useCallAgent, useCall, useDeviceManager, getCallingSelector, createDefaultCallingHandlers } from '../../calling-component-bindings/src';\nexport { useTeamsCallAgent, useTeamsCall, createDefaultTeamsCallingHandlers } from '../../calling-component-bindings/src';\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\nexport type { ScreenShareButtonSelector, CameraButtonSelector, VideoGallerySelector, DevicesButtonSelector, EmptySelector, ErrorBarSelector as CallErrorBarSelector, ParticipantListSelector, MicrophoneButtonSelector, ParticipantsButtonSelector, CreateDefaultCallingHandlers, CaptionSettingsSelector, CaptionsBannerSelector, StartCaptionsButtonSelector } from '../../calling-component-bindings/src';\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\nexport type { NotificationStackSelector } from '../../calling-component-bindings/src';\nexport type { IncomingCallStackSelector } from '../../calling-component-bindings/src';\nexport { ChatClientProvider, ChatThreadClientProvider, useChatClient, useChatThreadClient, getChatSelector, createDefaultChatHandlers } from '../../chat-component-bindings/src';\nexport type { MessageThreadSelector, TypingIndicatorSelector, ChatParticipantListSelector, SendBoxSelector, ErrorBarSelector as ChatErrorBarSelector } from '../../chat-component-bindings/src';\nexport { _IdentifierProvider, CameraButton, ControlBar, ControlBarButton, DevicesButton, EndCallButton, ErrorBar, GridLayout, LocalizationProvider, MessageStatusIndicator, MessageThread, MicrophoneButton, ParticipantItem, ParticipantList, ParticipantsButton, ScreenShareButton, SendBox, StreamMedia, TypingIndicator, VideoGallery, VideoTile, COMPONENT_LOCALE_EN_GB, COMPONENT_LOCALE_AR_SA, COMPONENT_LOCALE_CS_CZ, COMPONENT_LOCALE_CY_GB, COMPONENT_LOCALE_DE_DE, COMPONENT_LOCALE_ES_ES, COMPONENT_LOCALE_ES_MX, COMPONENT_LOCALE_FI_FI, COMPONENT_LOCALE_FR_FR, COMPONENT_LOCALE_FR_CA, COMPONENT_LOCALE_HE_IL, COMPONENT_LOCALE_IT_IT, COMPONENT_LOCALE_JA_JP, COMPONENT_LOCALE_KO_KR, COMPONENT_LOCALE_NB_NO, COMPONENT_LOCALE_NL_NL, COMPONENT_LOCALE_PL_PL, COMPONENT_LOCALE_PT_BR, COMPONENT_LOCALE_RU_RU, COMPONENT_LOCALE_SV_SE, COMPONENT_LOCALE_TR_TR, COMPONENT_LOCALE_ZH_CN, COMPONENT_LOCALE_ZH_TW } from '../../react-components/src';\nexport { ImageOverlay } from '../../react-components/src';\nexport { HoldButton } from '../../react-components/src';\nexport { RaiseHandButton } from '../../react-components/src';\nexport { Dialpad } from '../../react-components/src';\nexport { IncomingCallNotification, IncomingCallStack } from '../../react-components/src';\nexport type { IncomingCallNotificationProps, IncomingCallNotificationStrings, IncomingCallNotificationStyles, IncomingCallStackProps, IncomingCallStackCall } from '../../react-components/src';\nexport type { _IdentifierProviderProps, _Identifiers, ActiveErrorMessage, BaseCustomStyles, CallParticipantListParticipant, CameraButtonContextualMenuStyles, CameraButtonProps, CameraButtonStrings, CameraButtonStyles, ChatMessage, CommunicationParticipant, ComponentLocale, ComponentSlotStyle, ComponentStrings, ContentSystemMessage, ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles, ControlBarLayout, ControlBarProps, CreateVideoStreamViewResult, CustomAvatarOptions, CustomMessage, DevicesButtonContextualMenuStyles, DevicesButtonProps, DevicesButtonStrings, DevicesButtonStyles, EndCallButtonProps, EndCallButtonStrings, ErrorBarProps, ErrorBarStrings, ErrorType, GridLayoutProps, GridLayoutStyles, HorizontalGalleryStyles, JumpToNewMessageButtonProps, LocalizationProviderProps, LocalVideoCameraCycleButtonProps, LoadingState, Message, MessageAttachedStatus, MessageCommon, MessageContentType, MessageProps, MessageRenderer, MessageStatusIndicatorProps, MessageStatusIndicatorStrings, MessageThreadProps, MessageThreadStrings, MessageThreadStyles, MicrophoneButtonContextualMenuStyles, MicrophoneButtonProps, MicrophoneButtonStrings, MicrophoneButtonStyles, OnRenderAvatarCallback, OptionsDevice, ParticipantAddedSystemMessage, ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles, ParticipantListItemStyles, ParticipantListParticipant, ParticipantListProps, ParticipantListStyles, ParticipantMenuItemsCallback, ParticipantRemovedSystemMessage, ParticipantState, ParticipantsButtonContextualMenuStyles, ParticipantsButtonProps, ParticipantsButtonStrings, ParticipantsButtonStyles, ReadReceiptsBySenderId, ScreenShareButtonProps, ScreenShareButtonStrings, SendBoxProps, SendBoxStrings, SendBoxStylesProps, StreamMediaProps, SystemMessage, SystemMessageCommon, TopicUpdatedSystemMessage, TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps, UpdateMessageCallback, CancelEditCallback, VideoGalleryLayout, VideoGalleryLocalParticipant, VideoGalleryParticipant, VideoGalleryProps, VideoGalleryRemoteParticipant, VideoGalleryStream, VideoGalleryStrings, VideoGalleryStyles, VideoStreamOptions, VideoTileProps, VideoTileStylesProps, ViewScalingMode, VideoTileContextualMenuProps, VideoTileDrawerMenuProps, VideoTilesOptions } from '../../react-components/src';\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\nexport type { ReactionButtonStrings, Reaction, ReactionButtonProps, ReactionResources, ReactionSprite, ReactionButtonReaction } from '../../react-components/src';\nexport { ReactionButton } from '../../react-components/src';\nexport type { Spotlight } from '../../react-components/src';\nexport type { ImageOverlayProps, ImageOverlayStrings } from '../../react-components/src';\nexport type { DialpadMode, DialpadProps, DialpadStrings, DialpadStyles, DtmfTone, LongPressTrigger } from '../../react-components/src';\nexport type { AttachmentMetadata } from '../../acs-ui-common/src';\nexport type { ChatAttachmentType } from '../../react-components/src';\nexport type { InlineImageOptions, InlineImage } from '../../react-components/src';\nexport type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';\nexport type { VideoTileStrings } from '../../react-components/src';\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type { StatefulChatClient, StatefulChatClientArgs, StatefulChatClientOptions, ChatMessageWithStatus, ChatClientState, ChatError, ChatErrors, ChatThreadClientState, ChatThreadProperties, ChatErrorTarget } from '../../chat-stateful-client/src';\nexport type { ResourceFetchResult } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\nexport type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from '../../react-components/src';\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';\nexport type { SurveyIssues } from '../../react-components/src';\nexport type { SurveyIssuesHeadingStrings } from '../../react-components/src';\nexport type { CallSurveyImprovementSuggestions } from '../../react-components/src';\nexport { NotificationStack, Notification } from '../../react-components/src';\nexport type { NotificationStackProps, NotificationProps, NotificationStrings, NotificationStackStrings, NotificationType, ActiveNotification, NotificationStyles } from '../../react-components/src';\nexport type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';\nexport type { CaptionsSettingsModalStrings, CaptionsSettingsModalProps } from '../../react-components/src';\nexport { CaptionsSettingsModal } from '../../react-components/src';\nexport type { SupportedCaptionLanguage, SupportedSpokenLanguage, CaptionsOptions } from '../../react-components/src';\nexport type { CaptionsBannerProps, CaptionsInformation, CaptionsBannerStrings } from '../../react-components/src/components/CaptionsBanner';\nexport { CaptionsBanner } from '../../react-components/src/components/CaptionsBanner';\nexport { StartCaptionsButton } from '../../react-components/src/components/StartCaptionsButton';\nexport type { StartCaptionsButtonProps, StartCaptionsButtonStrings } from '../../react-components/src/components/StartCaptionsButton';"]}
|
package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts
CHANGED
@@ -13,8 +13,6 @@ export type ChatAttachmentType = 'unknown' | 'image' | 'file';
|
|
13
13
|
* @internal
|
14
14
|
*/
|
15
15
|
export interface _AttachmentDownloadCardsStrings {
|
16
|
-
/** Aria label to notify user when focus is on attachment download button. */
|
17
|
-
downloadAttachment: string;
|
18
16
|
/** Aria label to notify user when focus is on attachment open button. */
|
19
17
|
openAttachment: string;
|
20
18
|
attachmentCardGroupMessage: string;
|
@@ -56,7 +56,6 @@ const getDefaultMenuActions = (locale, chatMessage) => {
|
|
56
56
|
}];
|
57
57
|
}
|
58
58
|
// otherwise, use the default icon ("download")
|
59
|
-
actionName = locale.downloadAttachment;
|
60
59
|
return [Object.assign(Object.assign({}, defaultAttachmentMenuAction), { name: actionName })];
|
61
60
|
};
|
62
61
|
/**
|
package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AttachmentDownloadCards.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/Attachment/AttachmentDownloadCards.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACzF,OAAO,EAAiB,6BAA6B,EAAE,sCAAgC;AAIvF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;
|
1
|
+
{"version":3,"file":"AttachmentDownloadCards.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/Attachment/AttachmentDownloadCards.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACzF,OAAO,EAAiB,6BAA6B,EAAE,sCAAgC;AAIvF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AA6CpF;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAoC,EAAe,EAAE;IAC5F,MAAM,EACJ,WAAW,EACX,OAAO,EACR,GAAG,KAAK,CAAC;IACV,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC;IACxD,MAAM,yBAAyB,GAAG,4BAA4B,EAAE,CAAC;IACjE,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,UAA8B,EAAE,aAA8C,EAAE,OAAqB,EAAE,MAA0F,EAA0B,EAAE;QAC/P,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QACzE,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,UAAU,EAAE,OAAO,CAAC,CAAC;YAC9C,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC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GAAG,MAAM,CAAC,cAAc,CAAC;IACvC,+EAA+E;IAC/E,MAAM,WAAW,GAAG,6BAA6B,CAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,QAAQ,CAAC,CAAC;IACzE,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,CAAC;gBACN,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,oBAAC,IAAI,IAAC,QAAQ,EAAC,gBAAgB,GAAG;gBACxC,OAAO,EAAE,qBAAqB;aAC/B,CAAC,CAAC;IACL,CAAC;IACD,+CAA+C;IAC/C,OAAO,iCACF,2BAA2B,KAC9B,IAAI,EAAE,UAAU,IAChB,CAAC;AACL,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,qBAAqB,GAAG,CAAC,UAA8B,EAAiB,EAAE;IAC9E,OAAO,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE;QACjC,MAAM,CAAC,IAAI,CAAE,UAAiC,CAAC,GAAG,EAAE,QAAQ,EAAE,qBAAqB,CAAC,CAAC;QACrF,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAyB;IAC/D;;;;;;;;;;OAUG;IACH,IAAI,EAAE,UAAU;IAChB,6DAA6D;IAC7D,IAAI,EAAE,oBAAC,IAAI,IAAC,QAAQ,EAAC,oBAAoB,gBAAY,wCAAwC,GAAG;IAChG,wDAAwD;IACxD,OAAO,EAAE,qBAAqB;CAC/B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Icon } from '@fluentui/react';\nimport React, { useCallback } from 'react';\nimport { useMemo } from 'react';\nimport { useLocale } from '../../localization';\nimport { _AttachmentCard } from './AttachmentCard';\nimport { _AttachmentCardGroup, _AttachmentCardGroupLayout } from './AttachmentCardGroup';\nimport { _formatString, _isIdentityMicrosoftTeamsUser } from '@internal/acs-ui-common';\nimport { AttachmentMenuAction } from '../../types/Attachment';\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { ChatMessage } from '../../types';\nimport { mergeClasses } from '@griffel/react';\nimport { _ATTACHMENT_CARD_WIDTH_IN_REM } from '../styles/AttachmentCard.styles';\nimport { useAttachmentCardGroupStyles } from '../styles/AttachmentCardGroup.styles';\n\n/**\n * Represents the type of attachment\n * @public\n */\nexport type ChatAttachmentType = 'unknown' | 'image' | 'file';\n\n/**\n * Strings of _AttachmentDownloadCards that can be overridden.\n *\n * @internal\n */\nexport interface _AttachmentDownloadCardsStrings {\n /** Aria label to notify user when focus is on attachment open button. */\n openAttachment: string;\n attachmentCardGroupMessage: string;\n}\n\n/**\n * @internal\n */\nexport interface _AttachmentDownloadCardsProps {\n /**\n * A chat message metadata that includes attachment metadata\n */\n attachments?: AttachmentMetadata[];\n /**\n * A chat message metadata that includes attachment metadata\n */\n message?: ChatMessage;\n /**\n * Optional callback to handle attachment download\n */\n actionsForAttachment?: (attachment: AttachmentMetadata, message?: ChatMessage) => AttachmentMenuAction[];\n /**\n * Optional callback that runs if downloadHandler returns an error.\n */\n onActionHandlerFailed?: (errMsg: string) => void;\n /**\n * Optional aria label strings for attachment download cards\n */\n strings?: _AttachmentDownloadCardsStrings;\n}\n\n/**\n * @internal\n */\nexport const _AttachmentDownloadCards = (props: _AttachmentDownloadCardsProps): JSX.Element => {\n const {\n attachments,\n message\n } = props;\n const localeStrings = useLocale().strings.messageThread;\n const attachmentCardGroupStyles = useAttachmentCardGroupStyles();\n const getMenuActions = useCallback((attachment: AttachmentMetadata, localeStrings: _AttachmentDownloadCardsStrings, message?: ChatMessage, action?: (attachment: AttachmentMetadata, message?: ChatMessage) => AttachmentMenuAction[]): AttachmentMenuAction[] => {\n const defaultMenuActions = getDefaultMenuActions(localeStrings, message);\n try {\n const actions = action?.(attachment, message);\n if (actions && actions.length > 0) {\n return actions;\n } else {\n return defaultMenuActions;\n }\n } catch (error) {\n return defaultMenuActions;\n }\n }, []);\n const hasMultipleAttachments = useMemo(() => {\n return (props.attachments?.length ?? 0) > 1;\n }, [props.attachments]);\n if (!attachments || attachments.length === 0 || !attachments) {\n return <></>;\n }\n return <div className={mergeClasses(attachmentCardGroupStyles.root, hasMultipleAttachments ? attachmentCardGroupStyles.multipleAttachments : attachmentCardGroupStyles.singleAttachment)} data-ui-id=\"attachment-download-card-group\">\n <_AttachmentCardGroup attachmentGroupLayout={_AttachmentCardGroupLayout.Grid}>\n {attachments && attachments.map(attachment => <_AttachmentCard attachment={attachment} key={attachment.id} menuActions={getMenuActions(attachment, localeStrings, message, props.actionsForAttachment)} onActionHandlerFailed={props.onActionHandlerFailed} selfResizing={hasMultipleAttachments} />)}\n </_AttachmentCardGroup>\n </div>;\n};\n\n/**\n * @private\n */\nconst getDefaultMenuActions = (locale: _AttachmentDownloadCardsStrings, chatMessage?: ChatMessage): AttachmentMenuAction[] => {\n let actionName = locale.openAttachment;\n // if message is sent by a Teams user, we need to use a different icon (\"open\")\n const isTeamsUser = _isIdentityMicrosoftTeamsUser(chatMessage?.senderId);\n if (isTeamsUser) {\n return [{\n name: actionName,\n icon: <Icon iconName=\"OpenAttachment\" />,\n onClick: defaultOnClickHandler\n }];\n }\n // otherwise, use the default icon (\"download\")\n return [{\n ...defaultAttachmentMenuAction,\n name: actionName\n }];\n};\n\n/**\n *\n * The default action handler for downloading attachments. This handler will open the attachment's URL in a new tab.\n */\nconst defaultOnClickHandler = (attachment: AttachmentMetadata): Promise<void> => {\n return new Promise<void>(resolve => {\n window.open((attachment as AttachmentMetadata).url, '_blank', 'noopener,noreferrer');\n resolve();\n });\n};\n\n/**\n * @beta\n *\n * The default menu action for downloading attachments. This action will open the attachment's URL in a new tab.\n */\nexport const defaultAttachmentMenuAction: AttachmentMenuAction = {\n /**\n *\n * name is used for aria-label only when there's one button. For multiple buttons, it's used as a label.\n * by default it's an unlocalized string when this is used as a imported constant,\n * but you can overwrite it with your own localized string.\n *\n * i.e. defaultAttachmentMenuAction.name = localize('Download');\n *\n * when no action is provided, the UI library will overwrite this name\n * with a localized string this string when it's used in the UI.\n */\n name: 'Download',\n // this is the icon shown on the right of the attachment card\n icon: <Icon iconName=\"DownloadAttachment\" data-ui-id=\"attachment-download-card-download-icon\" />,\n // this is the action that runs when the icon is clicked\n onClick: defaultOnClickHandler\n};"]}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { OnRenderAvatarCallback } from '../types';
|
3
|
-
import {
|
3
|
+
import { CaptionsInformation } from './CaptionsBanner';
|
4
4
|
/**
|
5
5
|
* @internal
|
6
6
|
* Props for a single line of caption.
|
7
7
|
*/
|
8
|
-
export interface _CaptionProps extends
|
8
|
+
export interface _CaptionProps extends CaptionsInformation {
|
9
9
|
/**
|
10
10
|
* Optional callback to override render of the avatar.
|
11
11
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Caption.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/Caption.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAY,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAgBlK;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAe,EAAE;IAC5D,MAAM,EACJ,WAAW,EACX,MAAM,EACN,WAAW,EACX,cAAc,EACf,GAAG,KAAK,CAAC;IACV,MAAM,cAAc,GAAa;QAC/B,kBAAkB,EAAE,IAAI;QACxB,IAAI,EAAE,WAAW,CAAC,MAAM;QACxB,IAAI,EAAE,WAAW;QACjB,mBAAmB,EAAE,KAAK;QAC1B,uBAAuB,EAAE,IAAI;QAC7B,iBAAiB,EAAE,OAAO;QAC1B,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,MAAM,EAAE,SAAS;aAClB;SACF;KACF,CAAC;IACF,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,oBAAC,OAAO,oBAAK,cAAc,EAAI,CAAC;IACjH,OAAO,oBAAC,KAAK,IAAC,UAAU,QAAC,aAAa,EAAC,OAAO,EAAC,eAAe,EAAC,OAAO;QAClE,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,aAAa,IAAG,QAAQ,CAAc;QAE7D,oBAAC,KAAK,IAAC,aAAa,EAAC,OAAO,EAAC,SAAS,EAAE,iCAAiC;YACvE,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,6BAA6B;gBAClD,oBAAC,IAAI,IAAC,SAAS,EAAE,oBAAoB,IAAG,WAAW,CAAQ,CAChD;YACb,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,EAAC,MAAM,IAChD,WAAW,CACD,CACP,CACF,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IPersona, Persona, Stack, PersonaSize, Text } from '@fluentui/react';\nimport React from 'react';\nimport { OnRenderAvatarCallback } from '../types';\nimport { captionClassName, captionsContentContainerClassName, displayNameClassName, displayNameContainerClassName, iconClassName } from './styles/Captions.style';\nimport {
|
1
|
+
{"version":3,"file":"Caption.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/Caption.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAY,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO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n// Licensed under the MIT License.\n\nimport { IPersona, Persona, Stack, PersonaSize, Text } from '@fluentui/react';\nimport React from 'react';\nimport { OnRenderAvatarCallback } from '../types';\nimport { captionClassName, captionsContentContainerClassName, displayNameClassName, displayNameContainerClassName, iconClassName } from './styles/Captions.style';\nimport { CaptionsInformation } from './CaptionsBanner';\n\n/**\n * @internal\n * Props for a single line of caption.\n */\nexport interface _CaptionProps extends CaptionsInformation {\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n}\n\n/**\n * @internal\n * A component for displaying a single line of caption\n */\nexport const _Caption = (props: _CaptionProps): JSX.Element => {\n const {\n displayName,\n userId,\n captionText,\n onRenderAvatar\n } = props;\n const personaOptions: IPersona = {\n hidePersonaDetails: true,\n size: PersonaSize.size32,\n text: displayName,\n showOverflowTooltip: false,\n imageShouldStartVisible: true,\n initialsTextColor: 'white',\n styles: {\n root: {\n margin: '0.25rem'\n }\n }\n };\n const userIcon = onRenderAvatar ? onRenderAvatar(userId ?? '', personaOptions) : <Persona {...personaOptions} />;\n return <Stack horizontal verticalAlign=\"start\" horizontalAlign=\"start\">\n <Stack.Item className={iconClassName}>{userIcon}</Stack.Item>\n\n <Stack verticalAlign=\"start\" className={captionsContentContainerClassName}>\n <Stack.Item className={displayNameContainerClassName}>\n <Text className={displayNameClassName}>{displayName}</Text>\n </Stack.Item>\n <Stack.Item className={captionClassName} dir=\"auto\">\n {captionText}\n </Stack.Item>\n </Stack>\n </Stack>;\n};"]}
|
@@ -1,29 +1,54 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { OnRenderAvatarCallback } from '../types';
|
3
3
|
/**
|
4
|
-
* @
|
4
|
+
* @public
|
5
5
|
* information required for each line of caption
|
6
6
|
*/
|
7
|
-
export type
|
7
|
+
export type CaptionsInformation = {
|
8
|
+
/**
|
9
|
+
* unique id for each caption
|
10
|
+
*/
|
8
11
|
id: string;
|
12
|
+
/**
|
13
|
+
* speaker's display name
|
14
|
+
*/
|
9
15
|
displayName: string;
|
16
|
+
/**
|
17
|
+
* content of the caption
|
18
|
+
*/
|
10
19
|
captionText: string;
|
20
|
+
/**
|
21
|
+
* id of the speaker
|
22
|
+
*/
|
11
23
|
userId?: string;
|
12
24
|
};
|
13
25
|
/**
|
14
|
-
* @
|
26
|
+
* @public
|
15
27
|
* strings for captions banner
|
16
28
|
*/
|
17
|
-
export interface
|
29
|
+
export interface CaptionsBannerStrings {
|
30
|
+
/**
|
31
|
+
* Spinner text for captions banner
|
32
|
+
*/
|
18
33
|
captionsBannerSpinnerText?: string;
|
19
34
|
}
|
20
35
|
/**
|
21
|
-
* @
|
22
|
-
*
|
36
|
+
* @public
|
37
|
+
* CaptionsBanner Component Props.
|
23
38
|
*/
|
24
|
-
export interface
|
25
|
-
|
39
|
+
export interface CaptionsBannerProps {
|
40
|
+
/**
|
41
|
+
* Array of captions to be displayed
|
42
|
+
*/
|
43
|
+
captions: CaptionsInformation[];
|
44
|
+
/**
|
45
|
+
* Flag to indicate if captions are on
|
46
|
+
*/
|
26
47
|
isCaptionsOn?: boolean;
|
48
|
+
/**
|
49
|
+
* Flag to indicate if captions are being started
|
50
|
+
* This is used to show spinner while captions are being started
|
51
|
+
*/
|
27
52
|
startCaptionsInProgress?: boolean;
|
28
53
|
/**
|
29
54
|
* Optional callback to override render of the avatar.
|
@@ -31,19 +56,25 @@ export interface _CaptionsBannerProps {
|
|
31
56
|
* @param userId - user Id
|
32
57
|
*/
|
33
58
|
onRenderAvatar?: OnRenderAvatarCallback;
|
34
|
-
|
59
|
+
/**
|
60
|
+
* Optional strings for the component
|
61
|
+
*/
|
62
|
+
strings?: CaptionsBannerStrings;
|
35
63
|
/**
|
36
64
|
* Optional form factor for the component.
|
37
65
|
* @defaultValue 'default'
|
38
66
|
*/
|
39
67
|
formFactor?: 'default' | 'compact';
|
68
|
+
/**
|
69
|
+
* Optional options for the component.
|
70
|
+
*/
|
40
71
|
captionsOptions?: {
|
41
72
|
height: 'full' | 'default';
|
42
73
|
};
|
43
74
|
}
|
44
75
|
/**
|
45
|
-
* @
|
76
|
+
* @public
|
46
77
|
* A component for displaying a CaptionsBanner with user icon, displayName and captions text.
|
47
78
|
*/
|
48
|
-
export declare const
|
79
|
+
export declare const CaptionsBanner: (props: CaptionsBannerProps) => JSX.Element;
|
49
80
|
//# sourceMappingURL=CaptionsBanner.d.ts.map
|
@@ -4,13 +4,16 @@ import { Stack, FocusZone, Spinner, useTheme } from '@fluentui/react';
|
|
4
4
|
import React, { useEffect, useRef, useState, useCallback } from 'react';
|
5
5
|
import { _Caption } from './Caption';
|
6
6
|
import { captionContainerClassName, captionsBannerClassName, captionsBannerFullHeightClassName, captionsContainerClassName, loadingBannerFullHeightStyles, loadingBannerStyles } from './styles/Captions.style';
|
7
|
+
import { useLocale } from '../localization';
|
7
8
|
const SCROLL_OFFSET_ALLOWANCE = 20;
|
8
9
|
/**
|
9
|
-
* @
|
10
|
+
* @public
|
10
11
|
* A component for displaying a CaptionsBanner with user icon, displayName and captions text.
|
11
12
|
*/
|
12
|
-
export const
|
13
|
-
const { captions, isCaptionsOn, startCaptionsInProgress, onRenderAvatar,
|
13
|
+
export const CaptionsBanner = (props) => {
|
14
|
+
const { captions, isCaptionsOn, startCaptionsInProgress, onRenderAvatar, formFactor = 'default', captionsOptions } = props;
|
15
|
+
const localeStrings = useLocale().strings.captionsBanner;
|
16
|
+
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
14
17
|
const captionsScrollDivRef = useRef(null);
|
15
18
|
const [isAtBottomOfScroll, setIsAtBottomOfScroll] = useState(true);
|
16
19
|
const theme = useTheme();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CaptionsBanner.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/CaptionsBanner.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,iCAAiC,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;
|
1
|
+
{"version":3,"file":"CaptionsBanner.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/CaptionsBanner.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,iCAAiC,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEhN,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AA4E5C,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAe,EAAE;IACxE,MAAM,EACJ,QAAQ,EACR,YAAY,EACZ,uBAAuB,EACvB,cAAc,EACd,UAAU,GAAG,SAAS,EACtB,eAAe,EAChB,GAAG,KAAK,CAAC;IACV,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC;IACzD,MAAM,OAAO,mCACR,aAAa,GACb,KAAK,CAAC,OAAO,CACjB,CAAC;IACF,MAAM,o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,CAAC;QACnB,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC,CAAC;IACnC,OAAO,0CACF,uBAAuB,IAAI,oBAAC,SAAS,IAAC,SAAS,EAAE,0BAA0B,gBAAa,iBAAiB;QACrG,YAAY,IAAI,4BAAI,GAAG,EAAE,oBAAoB,EAAE,SAAS,EAAE,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,MAAK,MAAM,CAAC,CAAC,CAAC,iCAAiC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,UAAU,CAAC,gBAAa,uBAAuB,IAC7M,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YAC5B,OAAO,4BAAI,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,yBAAyB,uBAAqB,IAAI;gBAC/E,oBAAC,QAAQ,oBAAK,OAAO,IAAE,cAAc,EAAE,cAAc,IAAI,CACtD,CAAC;QAChB,CAAC,CAAC,CACO;QACN,CAAC,YAAY,IAAI,oBAAC,KAAK,IAAC,aAAa,EAAC,QAAQ,EAAC,MAAM,EAAE,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,MAAK,MAAM,CAAC,CAAC,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,UAAU,CAAC,uBAAqB,IAAI;YACxL,oBAAC,OAAO,IAAC,KAAK,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,yBAAyB,EAAE,QAAQ,EAAC,WAAW,EAAC,aAAa,EAAC,OAAO,GAAG,CAC3F,CACA,CACb,CAAC;AACR,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { Stack, FocusZone, Spinner, useTheme } from '@fluentui/react';\nimport React, { useEffect, useRef, useState, useCallback } from 'react';\nimport { _Caption } from './Caption';\nimport { captionContainerClassName, captionsBannerClassName, captionsBannerFullHeightClassName, captionsContainerClassName, loadingBannerFullHeightStyles, loadingBannerStyles } from './styles/Captions.style';\nimport { OnRenderAvatarCallback } from '../types';\nimport { useLocale } from '../localization';\n\n/**\n * @public\n * information required for each line of caption\n */\nexport type CaptionsInformation = {\n /**\n * unique id for each caption\n */\n id: string;\n /**\n * speaker's display name\n */\n displayName: string;\n /**\n * content of the caption\n */\n captionText: string;\n /**\n * id of the speaker\n */\n userId?: string;\n};\n\n/**\n * @public\n * strings for captions banner\n */\nexport interface CaptionsBannerStrings {\n /**\n * Spinner text for captions banner\n */\n captionsBannerSpinnerText?: string;\n}\n\n/**\n * @public\n * CaptionsBanner Component Props.\n */\nexport interface CaptionsBannerProps {\n /**\n * Array of captions to be displayed\n */\n captions: CaptionsInformation[];\n /**\n * Flag to indicate if captions are on\n */\n isCaptionsOn?: boolean;\n /**\n * Flag to indicate if captions are being started\n * This is used to show spinner while captions are being started\n */\n startCaptionsInProgress?: boolean;\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n /**\n * Optional strings for the component\n */\n strings?: CaptionsBannerStrings;\n /**\n * Optional form factor for the component.\n * @defaultValue 'default'\n */\n formFactor?: 'default' | 'compact';\n /**\n * Optional options for the component.\n */\n captionsOptions?: {\n height: 'full' | 'default';\n };\n}\nconst SCROLL_OFFSET_ALLOWANCE = 20;\n\n/**\n * @public\n * A component for displaying a CaptionsBanner with user icon, displayName and captions text.\n */\nexport const CaptionsBanner = (props: CaptionsBannerProps): JSX.Element => {\n const {\n captions,\n isCaptionsOn,\n startCaptionsInProgress,\n onRenderAvatar,\n formFactor = 'default',\n captionsOptions\n } = props;\n const localeStrings = useLocale().strings.captionsBanner;\n const strings = {\n ...localeStrings,\n ...props.strings\n };\n const captionsScrollDivRef = useRef<HTMLUListElement>(null);\n const [isAtBottomOfScroll, setIsAtBottomOfScroll] = useState<boolean>(true);\n const theme = useTheme();\n const scrollToBottom = (): void => {\n if (captionsScrollDivRef.current) {\n captionsScrollDivRef.current.scrollTop = captionsScrollDivRef.current.scrollHeight;\n }\n };\n const handleScrollToTheBottom = useCallback((): void => {\n if (!captionsScrollDivRef.current) {\n return;\n }\n const atBottom = Math.ceil(captionsScrollDivRef.current.scrollTop) >= captionsScrollDivRef.current.scrollHeight - captionsScrollDivRef.current.clientHeight - SCROLL_OFFSET_ALLOWANCE;\n setIsAtBottomOfScroll(atBottom);\n }, []);\n useEffect(() => {\n const captionsScrollDiv = captionsScrollDivRef.current;\n captionsScrollDiv?.addEventListener('scroll', handleScrollToTheBottom);\n return () => {\n captionsScrollDiv?.removeEventListener('scroll', handleScrollToTheBottom);\n };\n }, [handleScrollToTheBottom, isCaptionsOn]);\n useEffect(() => {\n // only auto scroll to bottom is already is at bottom of scroll before new caption comes in\n if (isAtBottomOfScroll) {\n scrollToBottom();\n }\n }, [captions, isAtBottomOfScroll]);\n return <>\n {startCaptionsInProgress && <FocusZone className={captionsContainerClassName} data-ui-id=\"captions-banner\">\n {isCaptionsOn && <ul ref={captionsScrollDivRef} className={captionsOptions?.height === 'full' ? captionsBannerFullHeightClassName(theme) : captionsBannerClassName(formFactor)} data-ui-id=\"captions-banner-inner\">\n {captions.map(caption => {\n return <li key={caption.id} className={captionContainerClassName} data-is-focusable={true}>\n <_Caption {...caption} onRenderAvatar={onRenderAvatar} />\n </li>;\n })}\n </ul>}\n {!isCaptionsOn && <Stack verticalAlign=\"center\" styles={captionsOptions?.height === 'full' ? loadingBannerFullHeightStyles(theme) : loadingBannerStyles(formFactor)} data-is-focusable={true}>\n <Spinner label={strings?.captionsBannerSpinnerText} ariaLive=\"assertive\" labelPosition=\"right\" />\n </Stack>}\n </FocusZone>}\n </>;\n};"]}
|
@@ -1,44 +1,113 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
3
|
-
import { SpokenLanguageStrings, CaptionLanguageStrings,
|
2
|
+
import { CaptionsOptions } from './StartCaptionsButton';
|
3
|
+
import { SpokenLanguageStrings, CaptionLanguageStrings, SupportedSpokenLanguage, SupportedCaptionLanguage } from '../types';
|
4
4
|
/**
|
5
|
-
* @
|
5
|
+
* @public
|
6
6
|
* strings for captions setting modal
|
7
7
|
*/
|
8
|
-
export interface
|
8
|
+
export interface CaptionsSettingsModalStrings {
|
9
|
+
/**
|
10
|
+
* Title for the modal
|
11
|
+
*/
|
9
12
|
captionsSettingsModalTitle?: string;
|
13
|
+
/**
|
14
|
+
* Label for the spoken language dropdown menu
|
15
|
+
*/
|
10
16
|
captionsSettingsSpokenLanguageDropdownLabel?: string;
|
17
|
+
/**
|
18
|
+
* Label for the caption language dropdown menu
|
19
|
+
*/
|
11
20
|
captionsSettingsCaptionLanguageDropdownLabel?: string;
|
21
|
+
/**
|
22
|
+
* Disclaimer for the spoken language dropdown menu
|
23
|
+
*/
|
12
24
|
captionsSettingsSpokenLanguageDropdownInfoText?: string;
|
25
|
+
/**
|
26
|
+
* Disclaimer for the caption language dropdown menu
|
27
|
+
*/
|
13
28
|
captionsSettingsCaptionLanguageDropdownInfoText?: string;
|
29
|
+
/**
|
30
|
+
* Label for the confirm button
|
31
|
+
*/
|
14
32
|
captionsSettingsConfirmButtonLabel?: string;
|
33
|
+
/**
|
34
|
+
* Label for the cancel button
|
35
|
+
*/
|
15
36
|
captionsSettingsCancelButtonLabel?: string;
|
37
|
+
/**
|
38
|
+
* Aria label for the modal
|
39
|
+
*/
|
16
40
|
captionsSettingsModalAriaLabel?: string;
|
41
|
+
/**
|
42
|
+
* Aria label for the close modal button
|
43
|
+
*/
|
17
44
|
captionsSettingsCloseModalButtonAriaLabel?: string;
|
18
45
|
}
|
19
46
|
/**
|
20
|
-
* @
|
21
|
-
*
|
47
|
+
* @public
|
48
|
+
* CaptionsSettingsModal Component Props.
|
22
49
|
*/
|
23
|
-
export interface
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
50
|
+
export interface CaptionsSettingsModalProps {
|
51
|
+
/**
|
52
|
+
* List of supported spoken languages
|
53
|
+
*/
|
54
|
+
supportedSpokenLanguages: SupportedSpokenLanguage[];
|
55
|
+
/**
|
56
|
+
* List of supported caption languages
|
57
|
+
*/
|
58
|
+
supportedCaptionLanguages?: SupportedCaptionLanguage[];
|
59
|
+
/**
|
60
|
+
* Callback to set spoken language
|
61
|
+
*/
|
62
|
+
onSetSpokenLanguage: (language: SupportedSpokenLanguage) => Promise<void>;
|
63
|
+
/**
|
64
|
+
* Callback to set caption language
|
65
|
+
*/
|
66
|
+
onSetCaptionLanguage?: (language: SupportedCaptionLanguage) => Promise<void>;
|
67
|
+
/**
|
68
|
+
* Callback to start captions
|
69
|
+
*/
|
70
|
+
onStartCaptions: (options?: CaptionsOptions) => Promise<void>;
|
71
|
+
/**
|
72
|
+
* Current spoken language
|
73
|
+
*/
|
74
|
+
currentSpokenLanguage: SupportedSpokenLanguage;
|
75
|
+
/**
|
76
|
+
* Current caption language
|
77
|
+
*/
|
78
|
+
currentCaptionLanguage?: SupportedCaptionLanguage;
|
79
|
+
/**
|
80
|
+
* 1 to 1 mapping between language code and language string for spoken languages
|
81
|
+
*/
|
31
82
|
spokenLanguageStrings?: SpokenLanguageStrings;
|
83
|
+
/**
|
84
|
+
* 1 to 1 mapping between language code and language string for caption languages
|
85
|
+
*/
|
32
86
|
captionLanguageStrings?: CaptionLanguageStrings;
|
87
|
+
/**
|
88
|
+
* Flag to indicate if captions feature is active
|
89
|
+
*/
|
33
90
|
isCaptionsFeatureActive?: boolean;
|
34
|
-
|
91
|
+
/**
|
92
|
+
* Strings for the captions settings modal
|
93
|
+
*/
|
94
|
+
strings?: CaptionsSettingsModalStrings;
|
95
|
+
/**
|
96
|
+
* Flag to show the modal
|
97
|
+
*/
|
35
98
|
showModal?: boolean;
|
99
|
+
/**
|
100
|
+
* Callback that is triggered when the modal is dismissed
|
101
|
+
*/
|
36
102
|
onDismissCaptionsSettings?: () => void;
|
103
|
+
/**
|
104
|
+
* Flag to show the caption language dropdown
|
105
|
+
*/
|
37
106
|
changeCaptionLanguage?: boolean;
|
38
107
|
}
|
39
108
|
/**
|
40
|
-
* @
|
109
|
+
* @public
|
41
110
|
* a component for setting spoken languages
|
42
111
|
*/
|
43
|
-
export declare const
|
112
|
+
export declare const CaptionsSettingsModal: (props: CaptionsSettingsModalProps) => JSX.Element;
|
44
113
|
//# sourceMappingURL=CaptionsSettingsModal.d.ts.map
|
@@ -16,13 +16,24 @@ import { buttonsContainerClassName, buttonStyles, dropdownContainerClassName, dr
|
|
16
16
|
import { defaultSpokenLanguage } from './utils';
|
17
17
|
import { _spokenLanguageToCaptionLanguage } from '../types';
|
18
18
|
import { _preventDismissOnEvent } from "../../../acs-ui-common/src";
|
19
|
+
import { useLocale } from '../localization';
|
19
20
|
/**
|
20
|
-
* @
|
21
|
+
* @public
|
21
22
|
* a component for setting spoken languages
|
22
23
|
*/
|
23
|
-
export const
|
24
|
-
const { supportedSpokenLanguages, supportedCaptionLanguages, currentSpokenLanguage, currentCaptionLanguage, isCaptionsFeatureActive, showModal, onSetSpokenLanguage, onSetCaptionLanguage, onDismissCaptionsSettings, onStartCaptions,
|
24
|
+
export const CaptionsSettingsModal = (props) => {
|
25
|
+
const { supportedSpokenLanguages, supportedCaptionLanguages, currentSpokenLanguage, currentCaptionLanguage, isCaptionsFeatureActive, showModal, onSetSpokenLanguage, onSetCaptionLanguage, onDismissCaptionsSettings, onStartCaptions, changeCaptionLanguage = false } = props;
|
25
26
|
const theme = useTheme();
|
27
|
+
const localeStrings = useLocale().strings.captionsSettingsModal;
|
28
|
+
const localSpokenLanguageStrings = useLocale().strings.spokenLanguages;
|
29
|
+
const localCaptionLanguageStrings = useLocale().strings.captionLanguages;
|
30
|
+
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
31
|
+
const spokenLanguageStrings = useMemo(() => {
|
32
|
+
return Object.assign(Object.assign({}, localSpokenLanguageStrings), props.spokenLanguageStrings);
|
33
|
+
}, [localSpokenLanguageStrings, props.spokenLanguageStrings]);
|
34
|
+
const captionLanguageStrings = useMemo(() => {
|
35
|
+
return Object.assign(Object.assign({}, localCaptionLanguageStrings), props.captionLanguageStrings);
|
36
|
+
}, [localCaptionLanguageStrings, props.captionLanguageStrings]);
|
26
37
|
const [hasSetSpokenLanguage, setHasSetSpokenLanguage] = useState(false);
|
27
38
|
const [selectedSpokenLanguage, setSelectedSpokenLanguage] = useState({
|
28
39
|
key: currentSpokenLanguage || defaultSpokenLanguage,
|
@@ -52,7 +63,7 @@ export const _CaptionsSettingsModal = (props) => {
|
|
52
63
|
if (isCaptionsFeatureActive) {
|
53
64
|
onSetSpokenLanguage(spokenLanguageCode);
|
54
65
|
if (changeCaptionLanguage) {
|
55
|
-
onSetCaptionLanguage(captionLanguageCode);
|
66
|
+
onSetCaptionLanguage && onSetCaptionLanguage(captionLanguageCode);
|
56
67
|
}
|
57
68
|
}
|
58
69
|
else {
|
@@ -71,7 +82,7 @@ export const _CaptionsSettingsModal = (props) => {
|
|
71
82
|
});
|
72
83
|
}, [supportedSpokenLanguages, spokenLanguageStrings]);
|
73
84
|
const captionLanguageDropdownOptions = useMemo(() => {
|
74
|
-
return supportedCaptionLanguages.map(languageCode => {
|
85
|
+
return supportedCaptionLanguages === null || supportedCaptionLanguages === void 0 ? void 0 : supportedCaptionLanguages.map(languageCode => {
|
75
86
|
return {
|
76
87
|
key: languageCode,
|
77
88
|
text: captionLanguageStrings ? captionLanguageStrings[languageCode] : languageCode
|
@@ -83,7 +94,7 @@ export const _CaptionsSettingsModal = (props) => {
|
|
83
94
|
return copy.sort((a, b) => a.text > b.text ? 1 : -1);
|
84
95
|
}, [spokenLanguageDropdownOptions]);
|
85
96
|
const sortedCaptionLanguageDropdownOptions = useMemo(() => {
|
86
|
-
const copy = [...captionLanguageDropdownOptions];
|
97
|
+
const copy = [...(captionLanguageDropdownOptions !== null && captionLanguageDropdownOptions !== void 0 ? captionLanguageDropdownOptions : [])];
|
87
98
|
return copy.sort((a, b) => a.text > b.text ? 1 : -1);
|
88
99
|
}, [captionLanguageDropdownOptions]);
|
89
100
|
const onSpokenLanguageChange = (event, option) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CaptionsSettingsModal.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/CaptionsSettingsModal.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAgB,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAmB,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClJ,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,cAAc,EAAE,gCAAgC,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAE9O,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAiD,gCAAgC,EAAsH,MAAM,UAAU,CAAC;AAC/N,OAAO,EAAE,sBAAsB,EAAE,mCAAgC;AAuCjE;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAkC,EAAe,EAAE;IACxF,MAAM,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,eAAe,EACf,OAAO,EACP,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,GAAG,KAAK,EAC9B,GAAG,KAAK,CAAC;IACV,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,CAAC,oBAAoB,EAAE,uBAAuB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AC5C;YAChB,oBAAC,aAAa,IAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC;gBAC5D,kCAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iCAAiC,CAAQ,CAC3C,CACV,CACF,CACT,CAAC;AACR,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback } from 'react';\nimport { useMemo, useState, useEffect } from 'react';\nimport { IModalStyles, Modal, Stack, useTheme, Text, IconButton, Dropdown, IDropdownOption, DefaultButton, PrimaryButton } from '@fluentui/react';\nimport { buttonsContainerClassName, buttonStyles, dropdownContainerClassName, dropdownInfoTextStyle, dropdownStyles, themedCaptionsSettingsModalStyle, titleClassName, titleContainerClassName } from './styles/CaptionsSettingsModal.styles';\nimport { _captionsOptions } from './StartCaptionsButton';\nimport { defaultSpokenLanguage } from './utils';\nimport { SpokenLanguageStrings, CaptionLanguageStrings, _spokenLanguageToCaptionLanguage, _SupportedSpokenLanguage, _SupportedCaptionLanguage, SpokenLanguageDropdownOptions, CaptionLanguageDropdownOptions } from '../types';\nimport { _preventDismissOnEvent } from '@internal/acs-ui-common';\n\n/**\n * @internal\n * strings for captions setting modal\n */\nexport interface _CaptionsSettingsModalStrings {\n captionsSettingsModalTitle?: string;\n captionsSettingsSpokenLanguageDropdownLabel?: string;\n captionsSettingsCaptionLanguageDropdownLabel?: string;\n captionsSettingsSpokenLanguageDropdownInfoText?: string;\n captionsSettingsCaptionLanguageDropdownInfoText?: string;\n captionsSettingsConfirmButtonLabel?: string;\n captionsSettingsCancelButtonLabel?: string;\n captionsSettingsModalAriaLabel?: string;\n captionsSettingsCloseModalButtonAriaLabel?: string;\n}\n\n/**\n * @internal\n * _CaptionsSettingsModal Component Props.\n */\nexport interface _CaptionsSettingsModalProps {\n supportedSpokenLanguages: _SupportedSpokenLanguage[];\n supportedCaptionLanguages: _SupportedCaptionLanguage[];\n onSetSpokenLanguage: (language: _SupportedSpokenLanguage) => Promise<void>;\n onSetCaptionLanguage: (language: _SupportedCaptionLanguage) => Promise<void>;\n onStartCaptions: (options?: _captionsOptions) => Promise<void>;\n currentSpokenLanguage: _SupportedSpokenLanguage;\n currentCaptionLanguage: _SupportedCaptionLanguage;\n spokenLanguageStrings?: SpokenLanguageStrings;\n captionLanguageStrings?: CaptionLanguageStrings;\n isCaptionsFeatureActive?: boolean;\n strings?: _CaptionsSettingsModalStrings;\n showModal?: boolean;\n onDismissCaptionsSettings?: () => void;\n changeCaptionLanguage?: boolean;\n}\n\n/**\n * @internal\n * a component for setting spoken languages\n */\nexport const _CaptionsSettingsModal = (props: _CaptionsSettingsModalProps): JSX.Element => {\n const {\n supportedSpokenLanguages,\n supportedCaptionLanguages,\n currentSpokenLanguage,\n currentCaptionLanguage,\n isCaptionsFeatureActive,\n showModal,\n onSetSpokenLanguage,\n onSetCaptionLanguage,\n onDismissCaptionsSettings,\n onStartCaptions,\n strings,\n spokenLanguageStrings,\n captionLanguageStrings,\n changeCaptionLanguage = false\n } = props;\n const theme = useTheme();\n const [hasSetSpokenLanguage, setHasSetSpokenLanguage] = useState(false);\n const [selectedSpokenLanguage, setSelectedSpokenLanguage] = useState<SpokenLanguageDropdownOptions>({\n key: currentSpokenLanguage || defaultSpokenLanguage,\n text: currentSpokenLanguage || defaultSpokenLanguage\n });\n const [selectedCaptionLanguage, setSelectedCaptionLanguage] = useState<CaptionLanguageDropdownOptions>({\n key: currentCaptionLanguage || _spokenLanguageToCaptionLanguage[selectedSpokenLanguage.key],\n text: currentCaptionLanguage || _spokenLanguageToCaptionLanguage[selectedSpokenLanguage.key]\n });\n useEffect(() => {\n // set spoken language when start captions with a spoken language specified.\n // this is to fix the bug when a second user starts captions with a new spoken language, captions bot ignore that spoken language\n if (isCaptionsFeatureActive && !hasSetSpokenLanguage) {\n onSetSpokenLanguage(selectedSpokenLanguage.key);\n // we only need to call set spoken language once when first starting captions\n setHasSetSpokenLanguage(true);\n }\n }, [isCaptionsFeatureActive, onSetSpokenLanguage, selectedSpokenLanguage.key, hasSetSpokenLanguage]);\n const onDismiss = useCallback((): void => {\n if (onDismissCaptionsSettings) {\n onDismissCaptionsSettings();\n }\n }, [onDismissCaptionsSettings]);\n const onConfirm = useCallback(async (): Promise<void> => {\n const spokenLanguageCode = selectedSpokenLanguage.key;\n const captionLanguageCode = selectedCaptionLanguage.key;\n if (isCaptionsFeatureActive) {\n onSetSpokenLanguage(spokenLanguageCode);\n if (changeCaptionLanguage) {\n onSetCaptionLanguage(captionLanguageCode);\n }\n } else {\n await onStartCaptions({\n spokenLanguage: spokenLanguageCode\n });\n }\n onDismiss();\n }, [onDismiss, isCaptionsFeatureActive, onSetSpokenLanguage, onSetCaptionLanguage, onStartCaptions, selectedSpokenLanguage.key, selectedCaptionLanguage.key, changeCaptionLanguage]);\n const spokenLanguageDropdownOptions: IDropdownOption[] = useMemo(() => {\n return supportedSpokenLanguages.map(languageCode => {\n return {\n key: languageCode,\n text: spokenLanguageStrings ? spokenLanguageStrings[languageCode] : languageCode\n };\n });\n }, [supportedSpokenLanguages, spokenLanguageStrings]);\n const captionLanguageDropdownOptions: IDropdownOption[] = useMemo(() => {\n return supportedCaptionLanguages.map(languageCode => {\n return {\n key: languageCode,\n text: captionLanguageStrings ? captionLanguageStrings[languageCode] : languageCode\n };\n });\n }, [supportedCaptionLanguages, captionLanguageStrings]);\n const sortedSpokenLanguageDropdownOptions: IDropdownOption[] = useMemo(() => {\n const copy = [...spokenLanguageDropdownOptions];\n return copy.sort((a, b) => a.text > b.text ? 1 : -1);\n }, [spokenLanguageDropdownOptions]);\n const sortedCaptionLanguageDropdownOptions: IDropdownOption[] = useMemo(() => {\n const copy = [...captionLanguageDropdownOptions];\n return copy.sort((a, b) => a.text > b.text ? 1 : -1);\n }, [captionLanguageDropdownOptions]);\n const onSpokenLanguageChange = (event: React.FormEvent<HTMLDivElement>, option: SpokenLanguageDropdownOptions | undefined): void => {\n if (option) {\n setSelectedSpokenLanguage(option);\n }\n };\n const onCaptionLanguageChange = (event: React.FormEvent<HTMLDivElement>, option: CaptionLanguageDropdownOptions | undefined): void => {\n if (option) {\n setSelectedCaptionLanguage(option);\n }\n };\n const calloutProps = useMemo(() => ({\n preventDismissOnEvent: _preventDismissOnEvent\n }), []);\n const CaptionsSettingsComponent = useCallback((): JSX.Element => {\n const placeholderSpokenLanguage = currentSpokenLanguage ?? defaultSpokenLanguage;\n const placeholderCaptionLanguage = currentCaptionLanguage ?? _spokenLanguageToCaptionLanguage[placeholderSpokenLanguage];\n return <Stack>\n <Dropdown label={strings?.captionsSettingsSpokenLanguageDropdownLabel} selectedKey={selectedSpokenLanguage ? selectedSpokenLanguage.key : undefined} onChange={(ev, option) => onSpokenLanguageChange(ev, option as SpokenLanguageDropdownOptions)} calloutProps={calloutProps} placeholder={placeholderSpokenLanguage} options={sortedSpokenLanguageDropdownOptions} styles={dropdownStyles} />\n <Text className={dropdownInfoTextStyle(theme)}>{strings?.captionsSettingsSpokenLanguageDropdownInfoText}</Text>\n {changeCaptionLanguage && <>\n <Dropdown label={strings?.captionsSettingsCaptionLanguageDropdownLabel} selectedKey={selectedCaptionLanguage ? selectedCaptionLanguage.key : undefined} onChange={(ev, option) => onCaptionLanguageChange(ev, option as CaptionLanguageDropdownOptions)} calloutProps={calloutProps} placeholder={placeholderCaptionLanguage} options={sortedCaptionLanguageDropdownOptions} styles={dropdownStyles} />\n <Text className={dropdownInfoTextStyle(theme)}>\n {strings?.captionsSettingsCaptionLanguageDropdownInfoText}\n </Text>\n </>}\n </Stack>;\n }, [calloutProps, currentSpokenLanguage, currentCaptionLanguage, sortedSpokenLanguageDropdownOptions, sortedCaptionLanguageDropdownOptions, selectedCaptionLanguage, selectedSpokenLanguage, strings?.captionsSettingsSpokenLanguageDropdownInfoText, strings?.captionsSettingsCaptionLanguageDropdownLabel, strings?.captionsSettingsSpokenLanguageDropdownLabel, strings?.captionsSettingsCaptionLanguageDropdownInfoText, theme, changeCaptionLanguage]);\n const CaptionsSettingsModalStyle: Partial<IModalStyles> = useMemo(() => themedCaptionsSettingsModalStyle(theme), [theme]);\n return <>\n {<Modal titleAriaId={strings?.captionsSettingsModalAriaLabel} isOpen={showModal} onDismiss={onDismiss} isBlocking={true} styles={CaptionsSettingsModalStyle}>\n <Stack horizontal horizontalAlign=\"space-between\" verticalAlign=\"center\" className={titleContainerClassName}>\n <Text className={titleClassName}>{strings?.captionsSettingsModalTitle}</Text>\n <IconButton iconProps={{\n iconName: 'Cancel'\n }} ariaLabel={strings?.captionsSettingsCloseModalButtonAriaLabel} onClick={onDismiss} style={{\n color: theme.palette.black\n }} />\n </Stack>\n\n <Stack className={dropdownContainerClassName}>{CaptionsSettingsComponent()}</Stack>\n <Stack horizontal horizontalAlign=\"end\" className={buttonsContainerClassName}>\n <PrimaryButton styles={buttonStyles(theme)} onClick={onConfirm}>\n <span>{strings?.captionsSettingsConfirmButtonLabel}</span>\n </PrimaryButton>\n <DefaultButton onClick={onDismiss} styles={buttonStyles(theme)}>\n <span>{strings?.captionsSettingsCancelButtonLabel}</span>\n </DefaultButton>\n </Stack>\n </Modal>}\n </>;\n};"]}
|
1
|
+
{"version":3,"file":"CaptionsSettingsModal.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/CaptionsSettingsModal.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAgB,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAmB,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClJ,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,cAAc,EAAE,gCAA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M,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS;gBAC5D,kCAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,kCAAkC,CAAQ,CAC5C;YAChB,oBAAC,aAAa,IAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC;gBAC5D,kCAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iCAAiC,CAAQ,CAC3C,CACV,CACF,CACT,CAAC;AACR,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback } from 'react';\nimport { useMemo, useState, useEffect } from 'react';\nimport { IModalStyles, Modal, Stack, useTheme, Text, IconButton, Dropdown, IDropdownOption, DefaultButton, PrimaryButton } from '@fluentui/react';\nimport { buttonsContainerClassName, buttonStyles, dropdownContainerClassName, dropdownInfoTextStyle, dropdownStyles, themedCaptionsSettingsModalStyle, titleClassName, titleContainerClassName } from './styles/CaptionsSettingsModal.styles';\nimport { CaptionsOptions } from './StartCaptionsButton';\nimport { defaultSpokenLanguage } from './utils';\nimport { SpokenLanguageStrings, CaptionLanguageStrings, _spokenLanguageToCaptionLanguage, SupportedSpokenLanguage, SupportedCaptionLanguage, SpokenLanguageDropdownOptions, CaptionLanguageDropdownOptions } from '../types';\nimport { _preventDismissOnEvent } from '@internal/acs-ui-common';\nimport { useLocale } from '../localization';\n\n/**\n * @public\n * strings for captions setting modal\n */\nexport interface CaptionsSettingsModalStrings {\n /**\n * Title for the modal\n */\n captionsSettingsModalTitle?: string;\n /**\n * Label for the spoken language dropdown menu\n */\n captionsSettingsSpokenLanguageDropdownLabel?: string;\n /**\n * Label for the caption language dropdown menu\n */\n captionsSettingsCaptionLanguageDropdownLabel?: string;\n /**\n * Disclaimer for the spoken language dropdown menu\n */\n captionsSettingsSpokenLanguageDropdownInfoText?: string;\n /**\n * Disclaimer for the caption language dropdown menu\n */\n captionsSettingsCaptionLanguageDropdownInfoText?: string;\n /**\n * Label for the confirm button\n */\n captionsSettingsConfirmButtonLabel?: string;\n /**\n * Label for the cancel button\n */\n captionsSettingsCancelButtonLabel?: string;\n /**\n * Aria label for the modal\n */\n captionsSettingsModalAriaLabel?: string;\n /**\n * Aria label for the close modal button\n */\n captionsSettingsCloseModalButtonAriaLabel?: string;\n}\n\n/**\n * @public\n * CaptionsSettingsModal Component Props.\n */\nexport interface CaptionsSettingsModalProps {\n /**\n * List of supported spoken languages\n */\n supportedSpokenLanguages: SupportedSpokenLanguage[];\n /**\n * List of supported caption languages\n */\n supportedCaptionLanguages?: SupportedCaptionLanguage[];\n /**\n * Callback to set spoken language\n */\n onSetSpokenLanguage: (language: SupportedSpokenLanguage) => Promise<void>;\n /**\n * Callback to set caption language\n */\n onSetCaptionLanguage?: (language: SupportedCaptionLanguage) => Promise<void>;\n /**\n * Callback to start captions\n */\n onStartCaptions: (options?: CaptionsOptions) => Promise<void>;\n /**\n * Current spoken language\n */\n currentSpokenLanguage: SupportedSpokenLanguage;\n /**\n * Current caption language\n */\n currentCaptionLanguage?: SupportedCaptionLanguage;\n /**\n * 1 to 1 mapping between language code and language string for spoken languages\n */\n spokenLanguageStrings?: SpokenLanguageStrings;\n /**\n * 1 to 1 mapping between language code and language string for caption languages\n */\n captionLanguageStrings?: CaptionLanguageStrings;\n /**\n * Flag to indicate if captions feature is active\n */\n isCaptionsFeatureActive?: boolean;\n /**\n * Strings for the captions settings modal\n */\n strings?: CaptionsSettingsModalStrings;\n /**\n * Flag to show the modal\n */\n showModal?: boolean;\n /**\n * Callback that is triggered when the modal is dismissed\n */\n onDismissCaptionsSettings?: () => void;\n /**\n * Flag to show the caption language dropdown\n */\n changeCaptionLanguage?: boolean;\n}\n\n/**\n * @public\n * a component for setting spoken languages\n */\nexport const CaptionsSettingsModal = (props: CaptionsSettingsModalProps): JSX.Element => {\n const {\n supportedSpokenLanguages,\n supportedCaptionLanguages,\n currentSpokenLanguage,\n currentCaptionLanguage,\n isCaptionsFeatureActive,\n showModal,\n onSetSpokenLanguage,\n onSetCaptionLanguage,\n onDismissCaptionsSettings,\n onStartCaptions,\n changeCaptionLanguage = false\n } = props;\n const theme = useTheme();\n const localeStrings = useLocale().strings.captionsSettingsModal;\n const localSpokenLanguageStrings = useLocale().strings.spokenLanguages;\n const localCaptionLanguageStrings = useLocale().strings.captionLanguages;\n const strings = {\n ...localeStrings,\n ...props.strings\n };\n const spokenLanguageStrings = useMemo(() => {\n return {\n ...localSpokenLanguageStrings,\n ...props.spokenLanguageStrings\n };\n }, [localSpokenLanguageStrings, props.spokenLanguageStrings]);\n const captionLanguageStrings = useMemo(() => {\n return {\n ...localCaptionLanguageStrings,\n ...props.captionLanguageStrings\n };\n }, [localCaptionLanguageStrings, props.captionLanguageStrings]);\n const [hasSetSpokenLanguage, setHasSetSpokenLanguage] = useState(false);\n const [selectedSpokenLanguage, setSelectedSpokenLanguage] = useState<SpokenLanguageDropdownOptions>({\n key: currentSpokenLanguage || defaultSpokenLanguage,\n text: currentSpokenLanguage || defaultSpokenLanguage\n });\n const [selectedCaptionLanguage, setSelectedCaptionLanguage] = useState<CaptionLanguageDropdownOptions>({\n key: currentCaptionLanguage || _spokenLanguageToCaptionLanguage[selectedSpokenLanguage.key] as keyof CaptionLanguageStrings,\n text: currentCaptionLanguage || _spokenLanguageToCaptionLanguage[selectedSpokenLanguage.key]\n });\n useEffect(() => {\n // set spoken language when start captions with a spoken language specified.\n // this is to fix the bug when a second user starts captions with a new spoken language, captions bot ignore that spoken language\n if (isCaptionsFeatureActive && !hasSetSpokenLanguage) {\n onSetSpokenLanguage(selectedSpokenLanguage.key);\n // we only need to call set spoken language once when first starting captions\n setHasSetSpokenLanguage(true);\n }\n }, [isCaptionsFeatureActive, onSetSpokenLanguage, selectedSpokenLanguage.key, hasSetSpokenLanguage]);\n const onDismiss = useCallback((): void => {\n if (onDismissCaptionsSettings) {\n onDismissCaptionsSettings();\n }\n }, [onDismissCaptionsSettings]);\n const onConfirm = useCallback(async (): Promise<void> => {\n const spokenLanguageCode = selectedSpokenLanguage.key;\n const captionLanguageCode = selectedCaptionLanguage.key;\n if (isCaptionsFeatureActive) {\n onSetSpokenLanguage(spokenLanguageCode);\n if (changeCaptionLanguage) {\n onSetCaptionLanguage && onSetCaptionLanguage(captionLanguageCode);\n }\n } else {\n await onStartCaptions({\n spokenLanguage: spokenLanguageCode\n });\n }\n onDismiss();\n }, [onDismiss, isCaptionsFeatureActive, onSetSpokenLanguage, onSetCaptionLanguage, onStartCaptions, selectedSpokenLanguage.key, selectedCaptionLanguage.key, changeCaptionLanguage]);\n const spokenLanguageDropdownOptions: IDropdownOption[] = useMemo(() => {\n return supportedSpokenLanguages.map(languageCode => {\n return {\n key: languageCode,\n text: spokenLanguageStrings ? spokenLanguageStrings[languageCode] : languageCode\n };\n });\n }, [supportedSpokenLanguages, spokenLanguageStrings]);\n const captionLanguageDropdownOptions: IDropdownOption[] | undefined = useMemo(() => {\n return supportedCaptionLanguages?.map(languageCode => {\n return {\n key: languageCode,\n text: captionLanguageStrings ? captionLanguageStrings[languageCode] : languageCode\n };\n });\n }, [supportedCaptionLanguages, captionLanguageStrings]);\n const sortedSpokenLanguageDropdownOptions: IDropdownOption[] = useMemo(() => {\n const copy = [...spokenLanguageDropdownOptions];\n return copy.sort((a, b) => a.text > b.text ? 1 : -1);\n }, [spokenLanguageDropdownOptions]);\n const sortedCaptionLanguageDropdownOptions: IDropdownOption[] = useMemo(() => {\n const copy = [...(captionLanguageDropdownOptions ?? [])];\n return copy.sort((a, b) => a.text > b.text ? 1 : -1);\n }, [captionLanguageDropdownOptions]);\n const onSpokenLanguageChange = (event: React.FormEvent<HTMLDivElement>, option: SpokenLanguageDropdownOptions | undefined): void => {\n if (option) {\n setSelectedSpokenLanguage(option);\n }\n };\n const onCaptionLanguageChange = (event: React.FormEvent<HTMLDivElement>, option: CaptionLanguageDropdownOptions | undefined): void => {\n if (option) {\n setSelectedCaptionLanguage(option);\n }\n };\n const calloutProps = useMemo(() => ({\n preventDismissOnEvent: _preventDismissOnEvent\n }), []);\n const CaptionsSettingsComponent = useCallback((): JSX.Element => {\n const placeholderSpokenLanguage = currentSpokenLanguage ?? defaultSpokenLanguage;\n const placeholderCaptionLanguage = currentCaptionLanguage ?? _spokenLanguageToCaptionLanguage[placeholderSpokenLanguage];\n return <Stack>\n <Dropdown label={strings?.captionsSettingsSpokenLanguageDropdownLabel} selectedKey={selectedSpokenLanguage ? selectedSpokenLanguage.key : undefined} onChange={(ev, option) => onSpokenLanguageChange(ev, option as SpokenLanguageDropdownOptions)} calloutProps={calloutProps} placeholder={placeholderSpokenLanguage} options={sortedSpokenLanguageDropdownOptions} styles={dropdownStyles} />\n <Text className={dropdownInfoTextStyle(theme)}>{strings?.captionsSettingsSpokenLanguageDropdownInfoText}</Text>\n {changeCaptionLanguage && <>\n <Dropdown label={strings?.captionsSettingsCaptionLanguageDropdownLabel} selectedKey={selectedCaptionLanguage ? selectedCaptionLanguage.key : undefined} onChange={(ev, option) => onCaptionLanguageChange(ev, option as CaptionLanguageDropdownOptions)} calloutProps={calloutProps} placeholder={placeholderCaptionLanguage} options={sortedCaptionLanguageDropdownOptions} styles={dropdownStyles} />\n <Text className={dropdownInfoTextStyle(theme)}>\n {strings?.captionsSettingsCaptionLanguageDropdownInfoText}\n </Text>\n </>}\n </Stack>;\n }, [calloutProps, currentSpokenLanguage, currentCaptionLanguage, sortedSpokenLanguageDropdownOptions, sortedCaptionLanguageDropdownOptions, selectedCaptionLanguage, selectedSpokenLanguage, strings?.captionsSettingsSpokenLanguageDropdownInfoText, strings?.captionsSettingsCaptionLanguageDropdownLabel, strings?.captionsSettingsSpokenLanguageDropdownLabel, strings?.captionsSettingsCaptionLanguageDropdownInfoText, theme, changeCaptionLanguage]);\n const CaptionsSettingsModalStyle: Partial<IModalStyles> = useMemo(() => themedCaptionsSettingsModalStyle(theme), [theme]);\n return <>\n {<Modal titleAriaId={strings?.captionsSettingsModalAriaLabel} isOpen={showModal} onDismiss={onDismiss} isBlocking={true} styles={CaptionsSettingsModalStyle}>\n <Stack horizontal horizontalAlign=\"space-between\" verticalAlign=\"center\" className={titleContainerClassName}>\n <Text className={titleClassName}>{strings?.captionsSettingsModalTitle}</Text>\n <IconButton iconProps={{\n iconName: 'Cancel'\n }} ariaLabel={strings?.captionsSettingsCloseModalButtonAriaLabel} onClick={onDismiss} style={{\n color: theme.palette.black\n }} />\n </Stack>\n\n <Stack className={dropdownContainerClassName}>{CaptionsSettingsComponent()}</Stack>\n <Stack horizontal horizontalAlign=\"end\" className={buttonsContainerClassName}>\n <PrimaryButton styles={buttonStyles(theme)} onClick={onConfirm}>\n <span>{strings?.captionsSettingsConfirmButtonLabel}</span>\n </PrimaryButton>\n <DefaultButton onClick={onDismiss} styles={buttonStyles(theme)}>\n <span>{strings?.captionsSettingsCancelButtonLabel}</span>\n </DefaultButton>\n </Stack>\n </Modal>}\n </>;\n};"]}
|