@azure/communication-react 1.21.0-beta.1 → 1.21.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 +77 -1694
- package/dist/dist-cjs/communication-react/index.js +36324 -167
- 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 +0 -8
- 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/errorBarSelector.js +0 -2
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +0 -2
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +1 -7
- 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 +2 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +1 -35
- 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/participantListSelectorUtils.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +3 -3
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.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/InternalCallContext.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/StatefulCallClient.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 +2 -25
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.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 +3 -29
- package/dist/dist-esm/communication-react/src/index.js +2 -7
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Announcer.js +1 -1
- package/dist/dist-esm/react-components/src/components/Announcer.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/CameraButton.js +10 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +3 -3
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.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/DevicePermissions/DevicePermissionDropdown.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.js +18 -3
- package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.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/LocalVideoTile.js +2 -2
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.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/ModalClone/ModalClone.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js +2 -2
- package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.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/ReactionButton.d.ts +6 -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/TroubleshootingGuideErrorBar.js +4 -7
- package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.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/VideoEffects/VideoBackgroundEffectsPicker.js +23 -21
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +2 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js +3 -3
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -21
- 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 +10 -2
- 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 +6 -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/ControlBar.styles.js +1 -2
- package/dist/dist-esm/react-components/src/components/styles/ControlBar.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageBarLink.styles.d.ts +11 -0
- package/dist/dist-esm/react-components/src/components/styles/MessageBarLink.styles.js +21 -0
- package/dist/dist-esm/react-components/src/components/styles/MessageBarLink.styles.js.map +1 -0
- 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/styles/VideoTile.styles.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +6 -0
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.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.js +1 -6
- 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 +2 -1
- package/dist/dist-esm/react-components/src/index.js +2 -0
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -54
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/es-MX/ComponentLocale.d.ts +8 -0
- package/dist/dist-esm/react-components/src/localization/locales/es-MX/ComponentLocale.js +13 -0
- package/dist/dist-esm/react-components/src/localization/locales/es-MX/ComponentLocale.js.map +1 -0
- package/dist/dist-esm/react-components/src/localization/locales/es-MX/strings.json +692 -0
- package/dist/dist-esm/react-components/src/localization/locales/fr-CA/ComponentLocale.d.ts +8 -0
- package/dist/dist-esm/react-components/src/localization/locales/fr-CA/ComponentLocale.js +13 -0
- package/dist/dist-esm/react-components/src/localization/locales/fr-CA/ComponentLocale.js.map +1 -0
- package/dist/dist-esm/react-components/src/localization/locales/fr-CA/strings.json +692 -0
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -30
- package/dist/dist-esm/react-components/src/theming/icons.js +0 -90
- 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/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 +0 -72
- 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.js +2 -8
- 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 +1 -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 +7 -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 +1 -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/HoldPane.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.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 +11 -10
- 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/NetworkReconnectTile.js +6 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.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 +0 -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.js +2 -2
- 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 -41
- 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/NoticePage.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.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/styles/Buttons.styles.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/Buttons.styles.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/Buttons.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/NetworkReconnectTile.styles.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/NetworkReconnectTile.styles.js +7 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/NetworkReconnectTile.styles.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/CallComposite/utils/spotlightUtils.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/spotlightUtils.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/common/AvatarPersona.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +2 -14
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.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/SidePaneHeader.js +6 -2
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.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/styles/Pane.styles.d.ts +3 -1
- package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js +9 -1
- package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.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 +2 -1
- package/dist/dist-esm/react-composites/src/composites/index.js +2 -0
- 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 +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-MX/CompositeLocale.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-MX/CompositeLocale.js +15 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-MX/CompositeLocale.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-MX/strings.json +413 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-CA/CompositeLocale.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-CA/CompositeLocale.js +15 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-CA/CompositeLocale.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-CA/strings.json +413 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +2 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +10 -9
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-Btn-7WaT.js +0 -202
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-Btn-7WaT.js.map +0 -1
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DuapxrE4.js +0 -50
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DuapxrE4.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-BqK17dpb.js +0 -42876
- package/dist/dist-cjs/communication-react/index-BqK17dpb.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 -192
- 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 -39
- 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 -196
- 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/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
@@ -201,26 +201,6 @@ export interface NotificationStackStrings {
|
|
201
201
|
* Transcription stopped but recording still going on message
|
202
202
|
*/
|
203
203
|
transcriptionStoppedStillRecording?: NotificationStrings;
|
204
|
-
/**
|
205
|
-
* Message shown in notification when the user will be automatically to their assigned breakout room that is opened
|
206
|
-
*/
|
207
|
-
assignedBreakoutRoomOpened?: NotificationStrings;
|
208
|
-
/**
|
209
|
-
* Message shown in notification when the user is prompted to join their assigned breakout room that is opened
|
210
|
-
*/
|
211
|
-
assignedBreakoutRoomOpenedPromptJoin?: NotificationStrings;
|
212
|
-
/**
|
213
|
-
* Message shown in notification when the user is assigned breakout room is changed
|
214
|
-
*/
|
215
|
-
assignedBreakoutRoomChanged?: NotificationStrings;
|
216
|
-
/**
|
217
|
-
* Message shown in notification when breakout room is joined
|
218
|
-
*/
|
219
|
-
breakoutRoomJoined?: NotificationStrings;
|
220
|
-
/**
|
221
|
-
* Message shown in notification when breakout room is closing soon
|
222
|
-
*/
|
223
|
-
breakoutRoomClosingSoon?: NotificationStrings;
|
224
204
|
}
|
225
205
|
/**
|
226
206
|
* All notifications that can be shown in the {@link NotificationStack}.
|
@@ -43,11 +43,6 @@ export const NotificationStack = (props) => {
|
|
43
43
|
trackDismissedNotificationsInternally ? setDismissedNotifications(dismissNotification(dismissedNotifications, notification)) : (_a = props.onDismissNotification) === null || _a === void 0 ? void 0 : _a.call(props, notification);
|
44
44
|
notification.onDismiss && notification.onDismiss();
|
45
45
|
};
|
46
|
-
if (notification.type === 'assignedBreakoutRoomOpenedPromptJoin') {
|
47
|
-
// If notification is of type assignedBreakoutRoomOpenedPromptJoin then set onClickSecondaryButton to
|
48
|
-
// onDismiss if it is not defined
|
49
|
-
notification.onClickSecondaryButton = notification.onClickSecondaryButton ? notification.onClickSecondaryButton : () => onDismiss();
|
50
|
-
}
|
51
46
|
return React.createElement("div", { key: index, style: {
|
52
47
|
marginBottom: `${index === maxNotificationsToShow - 1 ? 0 : '0.25rem'}`
|
53
48
|
} },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NotificationStack.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/NotificationStack.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAyB,qBAAqB,EAAE,mBAAmB,EAAE,sCAAsC,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACzJ,OAAO,EAAE,YAAY,EAAuB,MAAM,gBAAgB,CAAC;AA2SnE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;;IAC9E,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAC5D,MAAM,OAAO,GAAG,MAAA,KAAK,CAAC,OAAO,mCAAI,aAAa,CAAC;IAC/C,MAAM,sBAAsB,GAAG,MAAA,KAAK,CAAC,sBAAsB,mCAAI,CAAC,CAAC;IACjE,MAAM,qCAAqC,GAAG,CAAC,KAAK,CAAC,qBAAqB,CAAC;IAE3E,sDAAsD;IACtD,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CAAC,sBAAsB,CAAC,CAAC,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC;YACtI,CAAC;YACD,OAAO,6BAAK,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE;oBAC7B,YAAY,EAAE,GAAG,KAAK,KAAK,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE;iBACxE;gBACK,oBAAC,YAAY,IAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,qBAAqB,EAAE,qBAAqB,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,oBAAoB,EAAE,GAAG,EAAE,WAAC,OAAA,MAAA,YAAY,CAAC,oBAAoB,4DAAI,CAAA,EAAA,EAAE,sBAAsB,EAAE,GAAG,EAAE,WAAC,OAAA,MAAA,YAAY,CAAC,sBAAsB,4DAAI,CAAA,EAAA,EAAE,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAE,KAAK,KAAK,sBAAsB,GAAG,CAAC,IAAI,mBAAmB,CAAC,MAAM,GAAG,sBAAsB,EAAE,WAAW,EAAE,YAAY,CAAC,WAAW,GAAI,CAC3c,CAAC;QACb,CAAC;aAAM,CAAC;YACN,OAAO,yCAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC,CACM,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport { Stack } from '@fluentui/react';\nimport { useLocale } from '../localization';\nimport { DismissedNotification, NotificationIconProps, dismissNotification, dropDismissalsForInactiveNotifications, notificationsToShow } from './utils';\nimport { Notification, NotificationStrings } from './Notification';\n\n/**\n * Props for {@link NotificationStack}.\n * @public\n */\nexport interface NotificationStackProps {\n /**\n * Strings shown on the UI on errors.\n */\n strings?: NotificationStackStrings;\n\n /**\n * Currently active notifications.\n */\n activeNotifications: ActiveNotification[];\n\n /**\n * Max notifications to show at a time.\n * @defaultValue 2\n */\n maxNotificationsToShow?: number;\n\n /**\n * Callback called when the dismiss button is triggered.\n * Use this to control notifications shown when they dismissed by the user.\n * Note this onDismiss function will affect all notifications in the same stack\n */\n onDismissNotification?: (dismissedNotification: ActiveNotification) => void;\n\n /**\n * If set, notifications with {@link ActiveNotification.timestamp} older than the time this component is mounted\n * are not shown.\n *\n * This is useful when using the {@link NotificationStack} with a stateful client that handles more than one call\n * or chat thread. Set this prop to ignore notifications from previous call or chat.\n *\n * @defaultValue false\n */\n ignorePremountNotifications?: boolean;\n}\n\n/**\n * All strings that may be shown on the UI in the {@link NotificationStack}.\n *\n * @public\n */\nexport interface NotificationStackStrings {\n /**\n * A generic message when starting video fails.\n */\n startVideoGeneric?: NotificationStrings;\n\n /**\n * A generic message when starting video fails.\n */\n stopVideoGeneric?: NotificationStrings;\n\n /**\n * A generic message when muting microphone fails.\n */\n muteGeneric?: NotificationStrings;\n\n /**\n * A generic message when unmuting microphone fails.\n */\n unmuteGeneric?: NotificationStrings;\n\n /**\n * A generic message when starting screenshare fails.\n */\n startScreenShareGeneric?: NotificationStrings;\n\n /**\n * A generic message when stopping screenshare fails.\n */\n stopScreenShareGeneric?: NotificationStrings;\n\n /**\n * Message shown when poor network quality is detected during a call.\n */\n callNetworkQualityLow?: NotificationStrings;\n /**\n * Message shown when poor network quality is detected during a teams meetings.\n * Contains actions to open phone info modal.\n */\n teamsMeetingCallNetworkQualityLow?: NotificationStrings;\n /**\n * Message shown on failure to detect audio output devices.\n */\n callNoSpeakerFound?: NotificationStrings;\n\n /**\n * Message shown on failure to detect audio input devices.\n */\n callNoMicrophoneFound?: NotificationStrings;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system.\n */\n callMicrophoneAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system, for safari browsers\n */\n callMicrophoneAccessDeniedSafari?: NotificationStrings;\n\n /**\n * Message shown when microphone is muted by the system (not by local or remote participants)\n */\n callMicrophoneMutedBySystem?: NotificationStrings;\n\n /**\n * Message shown when microphone is unmuted by the system (not by local or remote participants).\n * This typically occurs if the system recovers from an unexpected mute.\n */\n callMicrophoneUnmutedBySystem?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when microphone can be enumerated but access is\n * blocked by the system.\n */\n callMacOsMicrophoneAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when poor network causes local video stream to be frozen.\n */\n callLocalVideoFreeze?: NotificationStrings;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system.\n */\n callCameraAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system, for safari browsers\n */\n callCameraAccessDeniedSafari?: NotificationStrings;\n\n /**\n * Message shown when local video fails to start because camera is already in use by\n * another applciation.\n */\n callCameraAlreadyInUse?: NotificationStrings;\n\n /**\n * Message shown when local video is stopped by the system (not by local or remote participants)\n */\n callVideoStoppedBySystem?: NotificationStrings;\n\n /**\n * Message shown when local video was recovered by the system (not by the local participant)\n */\n callVideoRecoveredBySystem?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when system denies access to camera.\n */\n callMacOsCameraAccessDenied?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when system denies sharing local screen on a call.\n */\n callMacOsScreenShareAccessDenied?: NotificationStrings;\n\n /**\n * Dimiss Notifications button aria label read by screen reader accessibility tools\n */\n dismissButtonAriaLabel?: NotificationStrings;\n\n /**\n * An error message when joining a call fails.\n */\n failedToJoinCallGeneric?: NotificationStrings;\n\n /**\n * An error message when joining a call fails specifically due to an invalid meeting link.\n */\n failedToJoinCallInvalidMeetingLink?: NotificationStrings;\n /**\n * Error string letting you know remote participants see a frozen stream for you.\n */\n cameraFrozenForRemoteParticipants?: NotificationStrings;\n /**\n * Unable to start effect\n */\n unableToStartVideoEffect?: NotificationStrings;\n /**\n * An error message when starting spotlight while max participants are spotlighted\n */\n startSpotlightWhileMaxParticipantsAreSpotlighted?: NotificationStrings;\n /**\n * Muted by a remote participant message\n */\n mutedByRemoteParticipant?: NotificationStrings;\n /**\n * Speaking while muted message\n */\n speakingWhileMuted?: NotificationStrings;\n /**\n * Recording started message\n */\n recordingStarted?: NotificationStrings;\n /**\n * Transcription started message\n */\n transcriptionStarted?: NotificationStrings;\n /**\n * Recording stopped message\n */\n recordingStopped?: NotificationStrings;\n /**\n * Transcription stopped message\n */\n transcriptionStopped?: NotificationStrings;\n /**\n * Recording and transcription both started message\n */\n recordingAndTranscriptionStarted?: NotificationStrings;\n /**\n * Recording and transcription both stopped message\n */\n recordingAndTranscriptionStopped?: NotificationStrings;\n /**\n * Recording stopped but transcription still going on message\n */\n recordingStoppedStillTranscribing?: NotificationStrings;\n /**\n * Transcription stopped but recording still going on message\n */\n transcriptionStoppedStillRecording?: NotificationStrings;\n /**\n * Message shown in notification when the user will be automatically to their assigned breakout room that is opened\n */\n assignedBreakoutRoomOpened?: NotificationStrings;\n /**\n * Message shown in notification when the user is prompted to join their assigned breakout room that is opened\n */\n assignedBreakoutRoomOpenedPromptJoin?: NotificationStrings;\n /**\n * Message shown in notification when the user is assigned breakout room is changed\n */\n assignedBreakoutRoomChanged?: NotificationStrings;\n /**\n * Message shown in notification when breakout room is joined\n */\n breakoutRoomJoined?: NotificationStrings;\n /**\n * Message shown in notification when breakout room is closing soon\n */\n breakoutRoomClosingSoon?: NotificationStrings;\n}\n\n/**\n * All notifications that can be shown in the {@link NotificationStack}.\n *\n * @public\n */\nexport type NotificationType = keyof NotificationStackStrings;\n\n/**\n * Active notifications to be shown via {@link NotificationStack}.\n *\n * @public\n */\nexport interface ActiveNotification {\n /**\n * Type of error that is active.\n */\n type: NotificationType;\n /**\n * Callback called when the primary button inside notification bar is clicked.\n */\n onClickPrimaryButton?: () => void;\n\n /**\n * Callback called when the primary button inside notification bar is clicked.\n */\n onClickSecondaryButton?: () => void;\n\n /**\n * Callback called when the notification is dismissed.\n */\n onDismiss?: () => void;\n\n /**\n * If set, notification will automatically dismiss after 5 seconds\n */\n autoDismiss?: boolean;\n\n /**\n * The latest timestamp when this notification was observed.\n *\n * When available, this is used to track notifications that have already been seen and dismissed\n * by the user.\n */\n timestamp?: Date;\n}\n\n/**\n * A component to show notifications on the UI.\n * All strings that can be shown are accepted as the {@link NotificationStackProps.strings} so that they can be localized.\n * Active notifications are selected by {@link NotificationStackProps.activeNotifications}.\n *\n * This component internally tracks dismissed by the user.\n * * Notifications that have an associated timestamp: The notification is shown on the UI again if it occurs after being dismissed.\n * * Notifications that do not have a timestamp: The notification is dismissed until it disappears from the props.\n * If the notification recurs, it is shown in the UI.\n *\n *\n * @public\n */\nexport const NotificationStack = (props: NotificationStackProps): JSX.Element => {\n const localeStrings = useLocale().strings.notificationStack;\n const strings = props.strings ?? localeStrings;\n const maxNotificationsToShow = props.maxNotificationsToShow ?? 2;\n const trackDismissedNotificationsInternally = !props.onDismissNotification;\n\n // Timestamp for when this comopnent is first mounted.\n // Never updated through the lifecycle of this component.\n const mountTimestamp = useRef(new Date(Date.now()));\n const [dismissedNotifications, setDismissedNotifications] = useState<DismissedNotification[]>([]);\n\n // dropDismissalsForInactiveNotifications only returns a new object if `dismissedErrors` actually changes.\n // Without this behaviour, this `useEffect` block would cause a render loop.\n useEffect(() => {\n trackDismissedNotificationsInternally && setDismissedNotifications(dropDismissalsForInactiveNotifications(props.activeNotifications, dismissedNotifications));\n }, [props.activeNotifications, dismissedNotifications, trackDismissedNotificationsInternally]);\n const activeNotifications = notificationsToShow(props.activeNotifications, dismissedNotifications, props.ignorePremountNotifications ? mountTimestamp.current : undefined);\n return <Stack data-ui-id=\"notifications-stack\" style={{\n width: 'fit-content'\n }}>\n {activeNotifications.map((notification, index) => {\n if (index < maxNotificationsToShow) {\n const onDismiss = (): void => {\n trackDismissedNotificationsInternally ? setDismissedNotifications(dismissNotification(dismissedNotifications, notification)) : props.onDismissNotification?.(notification);\n notification.onDismiss && notification.onDismiss();\n };\n if (notification.type === 'assignedBreakoutRoomOpenedPromptJoin') {\n // If notification is of type assignedBreakoutRoomOpenedPromptJoin then set onClickSecondaryButton to\n // onDismiss if it is not defined\n notification.onClickSecondaryButton = notification.onClickSecondaryButton ? notification.onClickSecondaryButton : () => onDismiss();\n }\n return <div key={index} style={{\n marginBottom: `${index === maxNotificationsToShow - 1 ? 0 : '0.25rem'}`\n }}>\n <Notification notificationStrings={strings ? strings[notification.type] : undefined} notificationIconProps={NotificationIconProps(notification.type)} onClickPrimaryButton={() => notification.onClickPrimaryButton?.()} onClickSecondaryButton={() => notification.onClickSecondaryButton?.()} onDismiss={onDismiss} showStackedEffect={index === maxNotificationsToShow - 1 && activeNotifications.length > maxNotificationsToShow} autoDismiss={notification.autoDismiss} />\n </div>;\n } else {\n return <></>;\n }\n })}\n </Stack>;\n};"]}
|
1
|
+
{"version":3,"file":"NotificationStack.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/NotificationStack.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAyB,qBAAqB,EAAE,mBAAmB,EAAE,sCAAsC,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACzJ,OAAO,EAAE,YAAY,EAAuB,MAAM,gBAAgB,CAAC;AAuRnE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;;IAC9E,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAC5D,MAAM,OAAO,GAAG,MAAA,KAAK,CAAC,OAAO,mCAAI,a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C,SAAS,EAAE,CAAC;YACrD,CAAC,CAAC;YACF,OAAO,6BAAK,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE;oBAC7B,YAAY,EAAE,GAAG,KAAK,KAAK,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE;iBACxE;gBACK,oBAAC,YAAY,IAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,qBAAqB,EAAE,qBAAqB,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,oBAAoB,EAAE,GAAG,EAAE,WAAC,OAAA,MAAA,YAAY,CAAC,oBAAoB,4DAAI,CAAA,EAAA,EAAE,sBAAsB,EAAE,GAAG,EAAE,WAAC,OAAA,MAAA,YAAY,CAAC,sBAAsB,4DAAI,CAAA,EAAA,EAAE,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAE,KAAK,KAAK,sBAAsB,GAAG,CAAC,IAAI,mBAAmB,CAAC,MAAM,GAAG,sBAAsB,EAAE,WAAW,EAAE,YAAY,CAAC,WAAW,GAAI,CAC3c,CAAC;QACb,CAAC;aAAM,CAAC;YACN,OAAO,yCAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC,CACM,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport { Stack } from '@fluentui/react';\nimport { useLocale } from '../localization';\nimport { DismissedNotification, NotificationIconProps, dismissNotification, dropDismissalsForInactiveNotifications, notificationsToShow } from './utils';\nimport { Notification, NotificationStrings } from './Notification';\n\n/**\n * Props for {@link NotificationStack}.\n * @public\n */\nexport interface NotificationStackProps {\n /**\n * Strings shown on the UI on errors.\n */\n strings?: NotificationStackStrings;\n\n /**\n * Currently active notifications.\n */\n activeNotifications: ActiveNotification[];\n\n /**\n * Max notifications to show at a time.\n * @defaultValue 2\n */\n maxNotificationsToShow?: number;\n\n /**\n * Callback called when the dismiss button is triggered.\n * Use this to control notifications shown when they dismissed by the user.\n * Note this onDismiss function will affect all notifications in the same stack\n */\n onDismissNotification?: (dismissedNotification: ActiveNotification) => void;\n\n /**\n * If set, notifications with {@link ActiveNotification.timestamp} older than the time this component is mounted\n * are not shown.\n *\n * This is useful when using the {@link NotificationStack} with a stateful client that handles more than one call\n * or chat thread. Set this prop to ignore notifications from previous call or chat.\n *\n * @defaultValue false\n */\n ignorePremountNotifications?: boolean;\n}\n\n/**\n * All strings that may be shown on the UI in the {@link NotificationStack}.\n *\n * @public\n */\nexport interface NotificationStackStrings {\n /**\n * A generic message when starting video fails.\n */\n startVideoGeneric?: NotificationStrings;\n\n /**\n * A generic message when starting video fails.\n */\n stopVideoGeneric?: NotificationStrings;\n\n /**\n * A generic message when muting microphone fails.\n */\n muteGeneric?: NotificationStrings;\n\n /**\n * A generic message when unmuting microphone fails.\n */\n unmuteGeneric?: NotificationStrings;\n\n /**\n * A generic message when starting screenshare fails.\n */\n startScreenShareGeneric?: NotificationStrings;\n\n /**\n * A generic message when stopping screenshare fails.\n */\n stopScreenShareGeneric?: NotificationStrings;\n\n /**\n * Message shown when poor network quality is detected during a call.\n */\n callNetworkQualityLow?: NotificationStrings;\n /**\n * Message shown when poor network quality is detected during a teams meetings.\n * Contains actions to open phone info modal.\n */\n teamsMeetingCallNetworkQualityLow?: NotificationStrings;\n /**\n * Message shown on failure to detect audio output devices.\n */\n callNoSpeakerFound?: NotificationStrings;\n\n /**\n * Message shown on failure to detect audio input devices.\n */\n callNoMicrophoneFound?: NotificationStrings;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system.\n */\n callMicrophoneAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system, for safari browsers\n */\n callMicrophoneAccessDeniedSafari?: NotificationStrings;\n\n /**\n * Message shown when microphone is muted by the system (not by local or remote participants)\n */\n callMicrophoneMutedBySystem?: NotificationStrings;\n\n /**\n * Message shown when microphone is unmuted by the system (not by local or remote participants).\n * This typically occurs if the system recovers from an unexpected mute.\n */\n callMicrophoneUnmutedBySystem?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when microphone can be enumerated but access is\n * blocked by the system.\n */\n callMacOsMicrophoneAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when poor network causes local video stream to be frozen.\n */\n callLocalVideoFreeze?: NotificationStrings;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system.\n */\n callCameraAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system, for safari browsers\n */\n callCameraAccessDeniedSafari?: NotificationStrings;\n\n /**\n * Message shown when local video fails to start because camera is already in use by\n * another applciation.\n */\n callCameraAlreadyInUse?: NotificationStrings;\n\n /**\n * Message shown when local video is stopped by the system (not by local or remote participants)\n */\n callVideoStoppedBySystem?: NotificationStrings;\n\n /**\n * Message shown when local video was recovered by the system (not by the local participant)\n */\n callVideoRecoveredBySystem?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when system denies access to camera.\n */\n callMacOsCameraAccessDenied?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when system denies sharing local screen on a call.\n */\n callMacOsScreenShareAccessDenied?: NotificationStrings;\n\n /**\n * Dimiss Notifications button aria label read by screen reader accessibility tools\n */\n dismissButtonAriaLabel?: NotificationStrings;\n\n /**\n * An error message when joining a call fails.\n */\n failedToJoinCallGeneric?: NotificationStrings;\n\n /**\n * An error message when joining a call fails specifically due to an invalid meeting link.\n */\n failedToJoinCallInvalidMeetingLink?: NotificationStrings;\n /**\n * Error string letting you know remote participants see a frozen stream for you.\n */\n cameraFrozenForRemoteParticipants?: NotificationStrings;\n /**\n * Unable to start effect\n */\n unableToStartVideoEffect?: NotificationStrings;\n /**\n * An error message when starting spotlight while max participants are spotlighted\n */\n startSpotlightWhileMaxParticipantsAreSpotlighted?: NotificationStrings;\n /**\n * Muted by a remote participant message\n */\n mutedByRemoteParticipant?: NotificationStrings;\n /**\n * Speaking while muted message\n */\n speakingWhileMuted?: NotificationStrings;\n /**\n * Recording started message\n */\n recordingStarted?: NotificationStrings;\n /**\n * Transcription started message\n */\n transcriptionStarted?: NotificationStrings;\n /**\n * Recording stopped message\n */\n recordingStopped?: NotificationStrings;\n /**\n * Transcription stopped message\n */\n transcriptionStopped?: NotificationStrings;\n /**\n * Recording and transcription both started message\n */\n recordingAndTranscriptionStarted?: NotificationStrings;\n /**\n * Recording and transcription both stopped message\n */\n recordingAndTranscriptionStopped?: NotificationStrings;\n /**\n * Recording stopped but transcription still going on message\n */\n recordingStoppedStillTranscribing?: NotificationStrings;\n /**\n * Transcription stopped but recording still going on message\n */\n transcriptionStoppedStillRecording?: NotificationStrings;\n}\n\n/**\n * All notifications that can be shown in the {@link NotificationStack}.\n *\n * @public\n */\nexport type NotificationType = keyof NotificationStackStrings;\n\n/**\n * Active notifications to be shown via {@link NotificationStack}.\n *\n * @public\n */\nexport interface ActiveNotification {\n /**\n * Type of error that is active.\n */\n type: NotificationType;\n /**\n * Callback called when the primary button inside notification bar is clicked.\n */\n onClickPrimaryButton?: () => void;\n\n /**\n * Callback called when the primary button inside notification bar is clicked.\n */\n onClickSecondaryButton?: () => void;\n\n /**\n * Callback called when the notification is dismissed.\n */\n onDismiss?: () => void;\n\n /**\n * If set, notification will automatically dismiss after 5 seconds\n */\n autoDismiss?: boolean;\n\n /**\n * The latest timestamp when this notification was observed.\n *\n * When available, this is used to track notifications that have already been seen and dismissed\n * by the user.\n */\n timestamp?: Date;\n}\n\n/**\n * A component to show notifications on the UI.\n * All strings that can be shown are accepted as the {@link NotificationStackProps.strings} so that they can be localized.\n * Active notifications are selected by {@link NotificationStackProps.activeNotifications}.\n *\n * This component internally tracks dismissed by the user.\n * * Notifications that have an associated timestamp: The notification is shown on the UI again if it occurs after being dismissed.\n * * Notifications that do not have a timestamp: The notification is dismissed until it disappears from the props.\n * If the notification recurs, it is shown in the UI.\n *\n *\n * @public\n */\nexport const NotificationStack = (props: NotificationStackProps): JSX.Element => {\n const localeStrings = useLocale().strings.notificationStack;\n const strings = props.strings ?? localeStrings;\n const maxNotificationsToShow = props.maxNotificationsToShow ?? 2;\n const trackDismissedNotificationsInternally = !props.onDismissNotification;\n\n // Timestamp for when this comopnent is first mounted.\n // Never updated through the lifecycle of this component.\n const mountTimestamp = useRef(new Date(Date.now()));\n const [dismissedNotifications, setDismissedNotifications] = useState<DismissedNotification[]>([]);\n\n // dropDismissalsForInactiveNotifications only returns a new object if `dismissedErrors` actually changes.\n // Without this behaviour, this `useEffect` block would cause a render loop.\n useEffect(() => {\n trackDismissedNotificationsInternally && setDismissedNotifications(dropDismissalsForInactiveNotifications(props.activeNotifications, dismissedNotifications));\n }, [props.activeNotifications, dismissedNotifications, trackDismissedNotificationsInternally]);\n const activeNotifications = notificationsToShow(props.activeNotifications, dismissedNotifications, props.ignorePremountNotifications ? mountTimestamp.current : undefined);\n return <Stack data-ui-id=\"notifications-stack\" style={{\n width: 'fit-content'\n }}>\n {activeNotifications.map((notification, index) => {\n if (index < maxNotificationsToShow) {\n const onDismiss = (): void => {\n trackDismissedNotificationsInternally ? setDismissedNotifications(dismissNotification(dismissedNotifications, notification)) : props.onDismissNotification?.(notification);\n notification.onDismiss && notification.onDismiss();\n };\n return <div key={index} style={{\n marginBottom: `${index === maxNotificationsToShow - 1 ? 0 : '0.25rem'}`\n }}>\n <Notification notificationStrings={strings ? strings[notification.type] : undefined} notificationIconProps={NotificationIconProps(notification.type)} onClickPrimaryButton={() => notification.onClickPrimaryButton?.()} onClickSecondaryButton={() => notification.onClickSecondaryButton?.()} onDismiss={onDismiss} showStackedEffect={index === maxNotificationsToShow - 1 && activeNotifications.length > maxNotificationsToShow} autoDismiss={notification.autoDismiss} />\n </div>;\n } else {\n return <></>;\n }\n })}\n </Stack>;\n};"]}
|
@@ -20,17 +20,6 @@ export interface ParticipantListStyles extends BaseCustomStyles {
|
|
20
20
|
/** Styles for the {@link ParticipantList} {@link ParticipantItem}. */
|
21
21
|
participantItemStyles?: ParticipantListItemStyles;
|
22
22
|
}
|
23
|
-
/**
|
24
|
-
* Strings for the {@link ParticipantList}.
|
25
|
-
*
|
26
|
-
* @beta
|
27
|
-
*/
|
28
|
-
export interface ParticipantListStrings {
|
29
|
-
/**
|
30
|
-
* String for rendering the count of participants not contained in the displayed participant list
|
31
|
-
*/
|
32
|
-
overflowParticipantCount?: string;
|
33
|
-
}
|
34
23
|
/**
|
35
24
|
* A callback for providing custom menu items for each participant in {@link ParticipantList}.
|
36
25
|
*
|
@@ -68,10 +57,6 @@ export type ParticipantListProps = {
|
|
68
57
|
styles?: ParticipantListStyles;
|
69
58
|
/** Optional value to determine if the tooltip should be shown for participants or not */
|
70
59
|
showParticipantOverflowTooltip?: boolean;
|
71
|
-
/** Total number of people in the call. This number can be larger than the remote participant count. */
|
72
|
-
totalParticipantCount?: number;
|
73
|
-
/** Strings for the participant list */
|
74
|
-
strings?: ParticipantListStrings;
|
75
60
|
/** Optional aria-labelledby prop that prefixes each ParticipantItem aria-label */
|
76
61
|
participantAriaLabelledBy?: string;
|
77
62
|
/** List of pinned participants */
|
@@ -103,12 +103,11 @@ const getParticipantsForDefaultRender = (participants, excludeMe, myUserId) => {
|
|
103
103
|
* @public
|
104
104
|
*/
|
105
105
|
export const ParticipantList = (props) => {
|
106
|
-
var _a, _b, _c, _d
|
107
|
-
const { excludeMe = false, myUserId, participants, onRemoveParticipant, onRenderAvatar, onRenderParticipant, onFetchParticipantMenuItems, showParticipantOverflowTooltip,
|
106
|
+
var _a, _b, _c, _d;
|
107
|
+
const { excludeMe = false, myUserId, participants, onRemoveParticipant, onRenderAvatar, onRenderParticipant, onFetchParticipantMenuItems, showParticipantOverflowTooltip, participantAriaLabelledBy, pinnedParticipants } = props;
|
108
108
|
const theme = useTheme();
|
109
109
|
const ids = useIdentifiers();
|
110
110
|
const participantItemStrings = useLocale().strings.participantItem;
|
111
|
-
const participantListStrings = useLocale().strings.ParticipantList;
|
112
111
|
const displayedParticipants = useMemo(() => {
|
113
112
|
return onRenderParticipant ? participants : getParticipantsForDefaultRender(participants, excludeMe, myUserId);
|
114
113
|
}, [participants, excludeMe, myUserId, onRenderParticipant]);
|
@@ -142,14 +141,6 @@ export const ParticipantList = (props) => {
|
|
142
141
|
return menuItems;
|
143
142
|
}, [ids.participantListRemoveParticipantButton, myUserId, onFetchParticipantMenuItems, onRemoveParticipant, (_b = (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles) === null || _b === void 0 ? void 0 : _b.participantSubMenuItemsStyles, participantItemStrings.removeButtonLabel]);
|
144
143
|
const participantItemStyles = useMemo(() => { var _a; return merge(participantListItemStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles); }, [(_c = props.styles) === null || _c === void 0 ? void 0 : _c.participantItemStyles]);
|
145
|
-
|
146
|
-
return React.createElement(Stack, { "data-ui-id": ids.participantList, className: mergeStyles(participantListStyle, (_e = props.styles) === null || _e === void 0 ? void 0 : _e.root), role: 'menu' },
|
147
|
-
displayedParticipants.map((participant) => onRenderParticipant ? onRenderParticipant(participant) : onRenderParticipantDefault(participant, participantItemStrings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy, theme, pinnedParticipants)),
|
148
|
-
overflowParticipantCountString && totalParticipantCount && totalParticipantCount > displayedParticipants.length && React.createElement(Text, { style: {
|
149
|
-
fontWeight: 400,
|
150
|
-
margin: '0.5rem'
|
151
|
-
} }, _formatString(overflowParticipantCountString, {
|
152
|
-
overflowCount: `${totalParticipantCount - displayedParticipants.length}`
|
153
|
-
})));
|
144
|
+
return React.createElement(Stack, { "data-ui-id": ids.participantList, className: mergeStyles(participantListStyle, (_d = props.styles) === null || _d === void 0 ? void 0 : _d.root), role: 'menu' }, displayedParticipants.map((participant) => onRenderParticipant ? onRenderParticipant(participant) : onRenderParticipantDefault(participant, participantItemStrings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy, theme, pinnedParticipants)));
|
154
145
|
};
|
155
146
|
//# sourceMappingURL=ParticipantList.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ParticipantList.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/ParticipantList.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAkD,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,EAAS,MAAM,iBAAiB,CAAC;AAC1I,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAiD,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,mCAAgC;AAgFxD,MAAM,0BAA0B,GAAG,CAAC,WAAuC,EAAE,OAA+B,EAAE,QAAiB,EAAE,cAAuC,EAAE,0BAA+F,EAAE,MAAkC,EAAE,kBAAuE,EAAE,8BAAwC,EAAE,yBAAkC,EAAE,KAAa,EAAE,kBAA6B,EAAsB,EAAE;IACxgB,MAAM,kBAAkB,GAAG,WAA6C,CAAC;IACzE,IAAI,QAAQ,GAAgC,SAAS,CAAC;IACtD,IAAI,kBAAkB,EAAE,CAAC;QACvB,QAAQ,GAAG,eAAe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,MAAM,EAAE;SACzE,CAAC,CACW,CACP,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Icon, IContextualMenuItem, IContextualMenuItemStyles, merge, mergeStyles, PersonaPresence, Stack, Theme } from '@fluentui/react';\nimport { Text } from '@fluentui/react';\nimport { useTheme, CallingTheme } from '../theming';\nimport { RaisedHandIcon } from './assets/RaisedHandIcon';\nimport React, { useCallback, useMemo } from 'react';\nimport { useIdentifiers } from '../identifiers';\nimport { useLocale } from '../localization';\nimport { BaseCustomStyles, CallParticipantListParticipant, OnRenderAvatarCallback, ParticipantListParticipant } from '../types';\nimport { CustomAvatarOptions } from '../types';\nimport { ParticipantItem, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\nimport { iconStyles, participantListItemStyle, participantListStyle } from './styles/ParticipantList.styles';\nimport { _formatString } from '@internal/acs-ui-common';\n\n/**\n * Styles for the {@link ParticipantList} {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantListItemStyles extends ParticipantItemStyles {\n /** Styles applied to the sub-menu of the {@link ParticipantList} {@link ParticipantItem}. */\n participantSubMenuItemsStyles?: IContextualMenuItemStyles;\n}\n\n/**\n * Styles for the {@link ParticipantList}.\n *\n * @public\n */\nexport interface ParticipantListStyles extends BaseCustomStyles {\n /** Styles for the {@link ParticipantList} {@link ParticipantItem}. */\n participantItemStyles?: ParticipantListItemStyles;\n}\n/**\n * Strings for the {@link ParticipantList}.\n *\n * @beta\n */\nexport interface ParticipantListStrings {\n /**\n * String for rendering the count of participants not contained in the displayed participant list\n */\n overflowParticipantCount?: string;\n}\n\n/**\n * A callback for providing custom menu items for each participant in {@link ParticipantList}.\n *\n * @public\n */\nexport type ParticipantMenuItemsCallback = (participantUserId: string, userId?: string, defaultMenuItems?: IContextualMenuItem[]) => IContextualMenuItem[];\n\n/**\n * Props for {@link ParticipantList}.\n *\n * @public\n */\nexport type ParticipantListProps = {\n /** Participants in user call or chat */\n participants: ParticipantListParticipant[];\n /** User ID of user */\n myUserId?: string;\n /**\n * If set to `true`, excludes the local participant from the participant list with use of `myUserId` props (required in this case).\n *\n * @defaultValue `false`\n */\n excludeMe?: boolean;\n /** Optional callback to render each participant. If no callback is provided, each participant will be rendered with `ParticipantItem` */\n onRenderParticipant?: (participant: ParticipantListParticipant) => JSX.Element | null;\n /** Optional callback to render the avatar for each participant. This property will have no effect if `onRenderParticipant` is assigned. */\n onRenderAvatar?: OnRenderAvatarCallback;\n /** Optional callback to render the context menu for each participant */\n onRemoveParticipant?: (userId: string) => void;\n /** Optional callback to render custom menu items for each participant. */\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n /** Optional callback when rendered ParticipantItem is clicked */\n onParticipantClick?: (participant?: ParticipantListParticipant) => void;\n /** Optional callback to render a context menu to mute a participant */\n onMuteParticipant?: (userId: string) => Promise<void>;\n styles?: ParticipantListStyles;\n /** Optional value to determine if the tooltip should be shown for participants or not */\n showParticipantOverflowTooltip?: boolean;\n /** Total number of people in the call. This number can be larger than the remote participant count. */\n totalParticipantCount?: number;\n /** Strings for the participant list */\n strings?: ParticipantListStrings;\n /** Optional aria-labelledby prop that prefixes each ParticipantItem aria-label */\n participantAriaLabelledBy?: string;\n /** List of pinned participants */\n pinnedParticipants?: string[];\n};\nconst onRenderParticipantDefault = (participant: ParticipantListParticipant, strings: ParticipantItemStrings, myUserId?: string, onRenderAvatar?: OnRenderAvatarCallback, createParticipantMenuItems?: (participant: ParticipantListParticipant) => IContextualMenuItem[], styles?: ParticipantListItemStyles, onParticipantClick?: (participant?: ParticipantListParticipant) => void, showParticipantOverflowTooltip?: boolean, participantAriaLabelledBy?: string, theme?: Theme, pinnedParticipants?: string[]): JSX.Element | null => {\n const callingParticipant = participant as CallParticipantListParticipant;\n let presence: PersonaPresence | undefined = undefined;\n if (callingParticipant) {\n presence = PersonaPresence.none;\n }\n const menuItems = createParticipantMenuItems && createParticipantMenuItems(participant);\n const formatDisplayName = (displayName?: string): string | undefined => {\n if (displayName && strings.attendeeRole) {\n return _formatString(displayName, {\n AttendeeRole: strings.attendeeRole\n });\n }\n return displayName;\n };\n const displayName = formatDisplayName(participant.displayName);\n const callingPalette = (theme as unknown as CallingTheme).callingPalette;\n const isPinned = pinnedParticipants && pinnedParticipants?.includes(participant.userId);\n const onRenderIcon = callingParticipant?.isScreenSharing || callingParticipant?.isMuted || callingParticipant?.raisedHand || isPinned ? () => <Stack horizontal={true} tokens={{\n childrenGap: '0.5rem'\n }}>\n {callingParticipant.raisedHand && <Stack horizontal={true} tokens={{\n childrenGap: '0.2rem'\n }} style={{\n alignItems: 'center',\n padding: '0.1rem 0.2rem',\n backgroundColor: theme?.palette.neutralLighter,\n borderRadius: '0.3rem'\n }}>\n {callingParticipant.raisedHand.raisedHandOrderPosition && <Stack.Item>\n <Text>{callingParticipant.raisedHand?.raisedHandOrderPosition}</Text>\n </Stack.Item>}\n <Stack.Item>\n <RaisedHandIcon />\n </Stack.Item>\n </Stack>}\n {callingParticipant.isScreenSharing && <Icon iconName=\"ParticipantItemScreenShareStart\" className={iconStyles} ariaLabel={strings.sharingIconLabel} />}\n {callingParticipant.isMuted && <Icon iconName=\"ParticipantItemMicOff\" className={iconStyles} ariaLabel={strings.mutedIconLabel} />}\n {callingParticipant.spotlight && <Icon iconName=\"ParticipantItemSpotlighted\" className={iconStyles} />}\n\n {isPinned && <Icon iconName=\"ParticipantItemPinned\" className={iconStyles} />}\n </Stack> : () => null;\n const onRenderAvatarWithRaiseHand = callingParticipant?.raisedHand && onRenderAvatar ? (userId?: string, options?: CustomAvatarOptions, defaultOnRender?: (props: CustomAvatarOptions) => JSX.Element) => onRenderAvatar(userId, {\n ...options,\n styles: {\n root: {\n border: callingPalette.raiseHandGold\n }\n }\n }, defaultOnRender) : onRenderAvatar;\n return <ParticipantItem styles={styles} key={participant.userId} userId={participant.userId} displayName={displayName} me={myUserId ? participant.userId === myUserId : false} menuItems={menuItems} presence={presence} onRenderIcon={onRenderIcon} onRenderAvatar={onRenderAvatarWithRaiseHand} onClick={onParticipantClick ? () => onParticipantClick?.(participant) : undefined} showParticipantOverflowTooltip={showParticipantOverflowTooltip} participantState={callingParticipant.state} ariaLabelledBy={participantAriaLabelledBy} />;\n};\n\n/**\n * Sort participants by raised hand order position\n */\nconst sortParticipants = (participants: ParticipantListParticipant[]): ParticipantListParticipant[] => {\n const isParticipantListCallParticipant = function (participant: ParticipantListParticipant): boolean {\n return 'raisedHand' in participant;\n };\n participants.sort((a, b) => {\n if (!isParticipantListCallParticipant(a) || !isParticipantListCallParticipant(b)) {\n return 0;\n }\n const callA = a as CallParticipantListParticipant;\n const callB = b as CallParticipantListParticipant;\n if (callA.raisedHand && callB.raisedHand) {\n return callA.raisedHand.raisedHandOrderPosition - callB.raisedHand.raisedHandOrderPosition;\n } else if (callA.raisedHand) {\n return -1;\n } else if (callB.raisedHand) {\n return 1;\n }\n return 0;\n });\n return participants;\n};\nconst getParticipantsForDefaultRender = (participants: ParticipantListParticipant[], excludeMe: boolean, myUserId: string | undefined): ParticipantListParticipant[] => {\n if (!excludeMe || !myUserId) {\n return [...participants];\n }\n const userIndex = participants.map(p => p.userId).indexOf(myUserId);\n if (userIndex === -1) {\n return [...participants];\n }\n const remoteParticipants = [...participants];\n remoteParticipants.splice(userIndex, 1);\n return remoteParticipants;\n};\n\n/**\n * Component to render all calling or chat participants.\n *\n * By default, each participant is rendered with {@link ParticipantItem}. See {@link ParticipantListProps.onRenderParticipant} to override.\n *\n * @public\n */\nexport const ParticipantList = (props: ParticipantListProps): JSX.Element => {\n const {\n excludeMe = false,\n myUserId,\n participants,\n onRemoveParticipant,\n onRenderAvatar,\n onRenderParticipant,\n onFetchParticipantMenuItems,\n showParticipantOverflowTooltip,\n totalParticipantCount,\n strings,\n participantAriaLabelledBy,\n pinnedParticipants\n } = props;\n const theme = useTheme();\n const ids = useIdentifiers();\n const participantItemStrings = useLocale().strings.participantItem;\n const participantListStrings = useLocale().strings.ParticipantList;\n const displayedParticipants: ParticipantListParticipant[] = useMemo(() => {\n return onRenderParticipant ? participants : getParticipantsForDefaultRender(participants, excludeMe, myUserId);\n }, [participants, excludeMe, myUserId, onRenderParticipant]);\n sortParticipants(displayedParticipants);\n const createParticipantMenuItems = useCallback((participant: ParticipantListParticipant): IContextualMenuItem[] => {\n let menuItems: IContextualMenuItem[] = [];\n const participantIsRemovable = participant.isRemovable;\n if (participant.userId !== myUserId && onRemoveParticipant && participantIsRemovable) {\n menuItems.push({\n key: 'remove',\n text: participantItemStrings.removeButtonLabel,\n onClick: () => onRemoveParticipant(participant.userId),\n itemProps: {\n styles: props.styles?.participantItemStyles?.participantSubMenuItemsStyles\n },\n iconProps: {\n iconName: 'ContextMenuRemoveParticipant',\n styles: {\n root: {\n lineHeight: 0\n }\n }\n },\n 'data-ui-id': ids.participantListRemoveParticipantButton\n });\n }\n if (onFetchParticipantMenuItems) {\n menuItems = onFetchParticipantMenuItems(participant.userId, myUserId, menuItems);\n }\n return menuItems;\n }, [ids.participantListRemoveParticipantButton, myUserId, onFetchParticipantMenuItems, onRemoveParticipant, props.styles?.participantItemStyles?.participantSubMenuItemsStyles, participantItemStrings.removeButtonLabel]);\n const participantItemStyles = useMemo(() => merge(participantListItemStyle, props.styles?.participantItemStyles), [props.styles?.participantItemStyles]);\n const overflowParticipantCountString = strings?.overflowParticipantCount ?? participantListStrings?.overflowParticipantCount;\n return <Stack data-ui-id={ids.participantList} className={mergeStyles(participantListStyle, props.styles?.root)} role={'menu'}>\n {displayedParticipants.map((participant: ParticipantListParticipant) => onRenderParticipant ? onRenderParticipant(participant) : onRenderParticipantDefault(participant, participantItemStrings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy, theme, pinnedParticipants))}\n {overflowParticipantCountString && totalParticipantCount && totalParticipantCount > displayedParticipants.length && <Text style={{\n fontWeight: 400,\n margin: '0.5rem'\n }}>\n {_formatString(overflowParticipantCountString, {\n overflowCount: `${totalParticipantCount - displayedParticipants.length}`\n })}\n </Text>}\n </Stack>;\n};"]}
|
1
|
+
{"version":3,"file":"ParticipantList.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/ParticipantList.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAkD,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,EAAS,MAAM,iBAAiB,CAAC;AAC1I,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAiD,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,mCAAgC;AAgExD,MAAM,0BAA0B,GAAG,CAAC,WAAuC,EAAE,OAA+B,EAAE,QAAiB,EAAE,cAAuC,EAAE,0BAA+F,EAAE,MAAkC,EAAE,kBAAuE,EAAE,8BAAwC,EAAE,yBAAkC,EAAE,KAAa,EAAE,kBAA6B,EAAsB,EAAE;IACxgB,MAAM,kBAAkB,GAAG,WAA6C,CAAC;IACzE,IAAI,QAAQ,GAAgC,SAAS,CAAC;IACtD,IAAI,kBAAkB,EAAE,CAAC;QACvB,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC;IAClC,CAAC;IACD,MAAM,SAAS,GAAG,0BAA0B,IAAI,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACxF,MAA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K,CAAC,wBAAwB,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,qBAAqB,CAAC,CAAA,EAAA,EAAE,CAAC,MAAA,KAAK,CAAC,MAAM,0CAAE,qBAAqB,CAAC,CAAC,CAAC;IACzJ,OAAO,oBAAC,KAAK,kBAAa,GAAG,CAAC,eAAe,EAAE,SAAS,EAAE,WAAW,CAAC,oBAAoB,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,IACxH,qBAAqB,CAAC,GAAG,CAAC,CAAC,WAAuC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,cAAc,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,KAAK,CAAC,kBAAkB,EAAE,8BAA8B,EAAE,yBAAyB,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAExX,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Icon, IContextualMenuItem, IContextualMenuItemStyles, merge, mergeStyles, PersonaPresence, Stack, Theme } from '@fluentui/react';\nimport { Text } from '@fluentui/react';\nimport { useTheme, CallingTheme } from '../theming';\nimport { RaisedHandIcon } from './assets/RaisedHandIcon';\nimport React, { useCallback, useMemo } from 'react';\nimport { useIdentifiers } from '../identifiers';\nimport { useLocale } from '../localization';\nimport { BaseCustomStyles, CallParticipantListParticipant, OnRenderAvatarCallback, ParticipantListParticipant } from '../types';\nimport { CustomAvatarOptions } from '../types';\nimport { ParticipantItem, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\nimport { iconStyles, participantListItemStyle, participantListStyle } from './styles/ParticipantList.styles';\nimport { _formatString } from '@internal/acs-ui-common';\n\n/**\n * Styles for the {@link ParticipantList} {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantListItemStyles extends ParticipantItemStyles {\n /** Styles applied to the sub-menu of the {@link ParticipantList} {@link ParticipantItem}. */\n participantSubMenuItemsStyles?: IContextualMenuItemStyles;\n}\n\n/**\n * Styles for the {@link ParticipantList}.\n *\n * @public\n */\nexport interface ParticipantListStyles extends BaseCustomStyles {\n /** Styles for the {@link ParticipantList} {@link ParticipantItem}. */\n participantItemStyles?: ParticipantListItemStyles;\n}\n/**\n * A callback for providing custom menu items for each participant in {@link ParticipantList}.\n *\n * @public\n */\nexport type ParticipantMenuItemsCallback = (participantUserId: string, userId?: string, defaultMenuItems?: IContextualMenuItem[]) => IContextualMenuItem[];\n\n/**\n * Props for {@link ParticipantList}.\n *\n * @public\n */\nexport type ParticipantListProps = {\n /** Participants in user call or chat */\n participants: ParticipantListParticipant[];\n /** User ID of user */\n myUserId?: string;\n /**\n * If set to `true`, excludes the local participant from the participant list with use of `myUserId` props (required in this case).\n *\n * @defaultValue `false`\n */\n excludeMe?: boolean;\n /** Optional callback to render each participant. If no callback is provided, each participant will be rendered with `ParticipantItem` */\n onRenderParticipant?: (participant: ParticipantListParticipant) => JSX.Element | null;\n /** Optional callback to render the avatar for each participant. This property will have no effect if `onRenderParticipant` is assigned. */\n onRenderAvatar?: OnRenderAvatarCallback;\n /** Optional callback to render the context menu for each participant */\n onRemoveParticipant?: (userId: string) => void;\n /** Optional callback to render custom menu items for each participant. */\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n /** Optional callback when rendered ParticipantItem is clicked */\n onParticipantClick?: (participant?: ParticipantListParticipant) => void;\n /** Optional callback to render a context menu to mute a participant */\n onMuteParticipant?: (userId: string) => Promise<void>;\n styles?: ParticipantListStyles;\n /** Optional value to determine if the tooltip should be shown for participants or not */\n showParticipantOverflowTooltip?: boolean;\n /** Optional aria-labelledby prop that prefixes each ParticipantItem aria-label */\n participantAriaLabelledBy?: string;\n /** List of pinned participants */\n pinnedParticipants?: string[];\n};\nconst onRenderParticipantDefault = (participant: ParticipantListParticipant, strings: ParticipantItemStrings, myUserId?: string, onRenderAvatar?: OnRenderAvatarCallback, createParticipantMenuItems?: (participant: ParticipantListParticipant) => IContextualMenuItem[], styles?: ParticipantListItemStyles, onParticipantClick?: (participant?: ParticipantListParticipant) => void, showParticipantOverflowTooltip?: boolean, participantAriaLabelledBy?: string, theme?: Theme, pinnedParticipants?: string[]): JSX.Element | null => {\n const callingParticipant = participant as CallParticipantListParticipant;\n let presence: PersonaPresence | undefined = undefined;\n if (callingParticipant) {\n presence = PersonaPresence.none;\n }\n const menuItems = createParticipantMenuItems && createParticipantMenuItems(participant);\n const formatDisplayName = (displayName?: string): string | undefined => {\n if (displayName && strings.attendeeRole) {\n return _formatString(displayName, {\n AttendeeRole: strings.attendeeRole\n });\n }\n return displayName;\n };\n const displayName = formatDisplayName(participant.displayName);\n const callingPalette = (theme as unknown as CallingTheme).callingPalette;\n const isPinned = pinnedParticipants && pinnedParticipants?.includes(participant.userId);\n const onRenderIcon = callingParticipant?.isScreenSharing || callingParticipant?.isMuted || callingParticipant?.raisedHand || isPinned ? () => <Stack horizontal={true} tokens={{\n childrenGap: '0.5rem'\n }}>\n {callingParticipant.raisedHand && <Stack horizontal={true} tokens={{\n childrenGap: '0.2rem'\n }} style={{\n alignItems: 'center',\n padding: '0.1rem 0.2rem',\n backgroundColor: theme?.palette.neutralLighter,\n borderRadius: '0.3rem'\n }}>\n {callingParticipant.raisedHand.raisedHandOrderPosition && <Stack.Item>\n <Text>{callingParticipant.raisedHand?.raisedHandOrderPosition}</Text>\n </Stack.Item>}\n <Stack.Item>\n <RaisedHandIcon />\n </Stack.Item>\n </Stack>}\n {callingParticipant.isScreenSharing && <Icon iconName=\"ParticipantItemScreenShareStart\" className={iconStyles} ariaLabel={strings.sharingIconLabel} />}\n {callingParticipant.isMuted && <Icon iconName=\"ParticipantItemMicOff\" className={iconStyles} ariaLabel={strings.mutedIconLabel} />}\n {callingParticipant.spotlight && <Icon iconName=\"ParticipantItemSpotlighted\" className={iconStyles} />}\n\n {isPinned && <Icon iconName=\"ParticipantItemPinned\" className={iconStyles} />}\n </Stack> : () => null;\n const onRenderAvatarWithRaiseHand = callingParticipant?.raisedHand && onRenderAvatar ? (userId?: string, options?: CustomAvatarOptions, defaultOnRender?: (props: CustomAvatarOptions) => JSX.Element) => onRenderAvatar(userId, {\n ...options,\n styles: {\n root: {\n border: callingPalette.raiseHandGold\n }\n }\n }, defaultOnRender) : onRenderAvatar;\n return <ParticipantItem styles={styles} key={participant.userId} userId={participant.userId} displayName={displayName} me={myUserId ? participant.userId === myUserId : false} menuItems={menuItems} presence={presence} onRenderIcon={onRenderIcon} onRenderAvatar={onRenderAvatarWithRaiseHand} onClick={onParticipantClick ? () => onParticipantClick?.(participant) : undefined} showParticipantOverflowTooltip={showParticipantOverflowTooltip} participantState={callingParticipant.state} ariaLabelledBy={participantAriaLabelledBy} />;\n};\n\n/**\n * Sort participants by raised hand order position\n */\nconst sortParticipants = (participants: ParticipantListParticipant[]): ParticipantListParticipant[] => {\n const isParticipantListCallParticipant = function (participant: ParticipantListParticipant): boolean {\n return 'raisedHand' in participant;\n };\n participants.sort((a, b) => {\n if (!isParticipantListCallParticipant(a) || !isParticipantListCallParticipant(b)) {\n return 0;\n }\n const callA = a as CallParticipantListParticipant;\n const callB = b as CallParticipantListParticipant;\n if (callA.raisedHand && callB.raisedHand) {\n return callA.raisedHand.raisedHandOrderPosition - callB.raisedHand.raisedHandOrderPosition;\n } else if (callA.raisedHand) {\n return -1;\n } else if (callB.raisedHand) {\n return 1;\n }\n return 0;\n });\n return participants;\n};\nconst getParticipantsForDefaultRender = (participants: ParticipantListParticipant[], excludeMe: boolean, myUserId: string | undefined): ParticipantListParticipant[] => {\n if (!excludeMe || !myUserId) {\n return [...participants];\n }\n const userIndex = participants.map(p => p.userId).indexOf(myUserId);\n if (userIndex === -1) {\n return [...participants];\n }\n const remoteParticipants = [...participants];\n remoteParticipants.splice(userIndex, 1);\n return remoteParticipants;\n};\n\n/**\n * Component to render all calling or chat participants.\n *\n * By default, each participant is rendered with {@link ParticipantItem}. See {@link ParticipantListProps.onRenderParticipant} to override.\n *\n * @public\n */\nexport const ParticipantList = (props: ParticipantListProps): JSX.Element => {\n const {\n excludeMe = false,\n myUserId,\n participants,\n onRemoveParticipant,\n onRenderAvatar,\n onRenderParticipant,\n onFetchParticipantMenuItems,\n showParticipantOverflowTooltip,\n participantAriaLabelledBy,\n pinnedParticipants\n } = props;\n const theme = useTheme();\n const ids = useIdentifiers();\n const participantItemStrings = useLocale().strings.participantItem;\n const displayedParticipants: ParticipantListParticipant[] = useMemo(() => {\n return onRenderParticipant ? participants : getParticipantsForDefaultRender(participants, excludeMe, myUserId);\n }, [participants, excludeMe, myUserId, onRenderParticipant]);\n sortParticipants(displayedParticipants);\n const createParticipantMenuItems = useCallback((participant: ParticipantListParticipant): IContextualMenuItem[] => {\n let menuItems: IContextualMenuItem[] = [];\n const participantIsRemovable = participant.isRemovable;\n if (participant.userId !== myUserId && onRemoveParticipant && participantIsRemovable) {\n menuItems.push({\n key: 'remove',\n text: participantItemStrings.removeButtonLabel,\n onClick: () => onRemoveParticipant(participant.userId),\n itemProps: {\n styles: props.styles?.participantItemStyles?.participantSubMenuItemsStyles\n },\n iconProps: {\n iconName: 'ContextMenuRemoveParticipant',\n styles: {\n root: {\n lineHeight: 0\n }\n }\n },\n 'data-ui-id': ids.participantListRemoveParticipantButton\n });\n }\n if (onFetchParticipantMenuItems) {\n menuItems = onFetchParticipantMenuItems(participant.userId, myUserId, menuItems);\n }\n return menuItems;\n }, [ids.participantListRemoveParticipantButton, myUserId, onFetchParticipantMenuItems, onRemoveParticipant, props.styles?.participantItemStyles?.participantSubMenuItemsStyles, participantItemStrings.removeButtonLabel]);\n const participantItemStyles = useMemo(() => merge(participantListItemStyle, props.styles?.participantItemStyles), [props.styles?.participantItemStyles]);\n return <Stack data-ui-id={ids.participantList} className={mergeStyles(participantListStyle, props.styles?.root)} role={'menu'}>\n {displayedParticipants.map((participant: ParticipantListParticipant) => onRenderParticipant ? onRenderParticipant(participant) : onRenderParticipantDefault(participant, participantItemStrings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy, theme, pinnedParticipants))}\n {}\n </Stack>;\n};"]}
|
@@ -1,6 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { ControlBarButtonProps } from './ControlBarButton';
|
3
3
|
import { ReactionResources } from '..';
|
4
|
+
/**
|
5
|
+
* Reactions types for the Reaction button
|
6
|
+
* @public
|
7
|
+
*/
|
8
|
+
export type ReactionButtonReaction = 'like' | 'heart' | 'applause' | 'laugh' | 'surprised';
|
4
9
|
/**
|
5
10
|
* Props for {@link ReactionButton}.
|
6
11
|
*
|
@@ -14,7 +19,7 @@ export interface ReactionButtonProps extends ControlBarButtonProps {
|
|
14
19
|
/**
|
15
20
|
* Click event to send reaction to meeting
|
16
21
|
*/
|
17
|
-
onReactionClick: (reaction:
|
22
|
+
onReactionClick: (reaction: ReactionButtonReaction) => Promise<void>;
|
18
23
|
/**
|
19
24
|
* Reaction resource locator and parameters
|
20
25
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ReactionButton.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/ReactionButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAkC,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC/I,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;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AAW,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,EAAE,CAAC,gCAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,CAC9X,CACA,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Callout, DefaultButton, FocusZone, IButton, ICalloutContentStyles, mergeStyles, Stack, TooltipHost, useTheme } from '@fluentui/react';\nimport React, { useRef, useState } from 'react';\nimport { ControlBarButton, ControlBarButtonProps } from './ControlBarButton';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nimport { useLocale } from '../localization';\nimport { emojiStyles, reactionButtonCalloutStyles, reactionButtonStyles, reactionItemButtonStyles, reactionToolTipHostStyle } from './styles/ReactionButton.styles';\nimport { isDarkThemed } from '../theming/themeUtils';\nimport { ReactionResources } from '..';\nimport { getEmojiFrameCount } from './VideoGallery/utils/videoGalleryLayoutUtils';\nimport { _preventDismissOnEvent } from '@internal/acs-ui-common';\n\n/**\n * Props for {@link ReactionButton}.\n *\n * @public\n */\nexport interface ReactionButtonProps extends ControlBarButtonProps {\n /**\n * Optional strings to override in component\n */\n strings?: Partial<ReactionButtonStrings>;\n /**\n * Click event to send reaction to meeting\n */\n onReactionClick: (reaction: string) => Promise<void>;\n /**\n * Reaction resource locator and parameters\n */\n reactionResources: ReactionResources;\n}\n\n/**\n * Strings of {@link ReactionButton} that can be overridden.\n *\n * @public\n */\nexport interface ReactionButtonStrings {\n /** Label of the button. */\n label: string;\n /** Aria label for reaction button accessibility announcement */\n ariaLabel: string;\n /** Tooltip content when the button is disabled. */\n tooltipDisabledContent?: string;\n /** Tooltip content when the button is enabled. */\n tooltipContent?: string;\n /** Tooltip content of like reaction button. */\n likeReactionTooltipContent?: string;\n /** Tooltip content of heart reaction button. */\n heartReactionTooltipContent?: string;\n /** Tooltip content of clap reaction button. */\n applauseReactionTooltipContent?: string;\n /** Tooltip content of laugh reaction button. */\n laughReactionTooltipContent?: string;\n /** Tooltip content of surprised reaction button. */\n surprisedReactionTooltipContent?: string;\n}\n\n/**\n * A button to send reactions.\n *\n * Can be used with {@link ControlBar}.\n *\n * @public\n */\nexport const ReactionButton = (props: ReactionButtonProps): JSX.Element => {\n const localeStrings = useLocale().strings.reactionButton;\n const strings = {\n ...localeStrings,\n ...props.strings\n };\n const theme = useTheme();\n const styles = reactionButtonStyles(theme);\n const onRenderIcon = (): JSX.Element => <_HighContrastAwareIcon disabled={props.disabled} iconName=\"ReactionButtonIcon\" />;\n const emojis = ['like', 'heart', 'applause', 'laugh', 'surprised'];\n const emojiButtonTooltip: Map<string, string | undefined> = new Map([['like', strings.likeReactionTooltipContent], ['heart', strings.heartReactionTooltipContent], ['applause', strings.applauseReactionTooltipContent], ['laugh', strings.laughReactionTooltipContent], ['surprised', strings.surprisedReactionTooltipContent]]);\n const emojiResource: Map<string, string | undefined> = new Map([['like', props.reactionResources.likeReaction?.url], ['heart', props.reactionResources.heartReaction?.url], ['applause', props.reactionResources.applauseReaction?.url], ['laugh', props.reactionResources.laughReaction?.url], ['surprised', props.reactionResources.surprisedReaction?.url]]);\n const calloutStyle: Partial<ICalloutContentStyles> = {\n root: {\n padding: 0\n },\n calloutMain: {\n padding: '0.5rem'\n }\n };\n const calloutProps = {\n styles: calloutStyle,\n backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''\n };\n const reactionButtonCalloutRef = useRef<HTMLDivElement>(null);\n const reactionButtonRef = useRef<IButton>(null);\n const [calloutIsVisible, setCalloutIsVisible] = useState(false);\n return <Stack>\n {calloutIsVisible && <Callout data-ui-id=\"reaction-sub-menu\" isBeakVisible={false} styles={reactionButtonCalloutStyles} target={reactionButtonCalloutRef.current} onDismiss={() => {\n reactionButtonRef.current?.focus();\n setCalloutIsVisible(false);\n }}>\n <FocusZone shouldFocusOnMount style={{\n height: '100%'\n }}>\n <Stack horizontal style={{\n height: 'inherit'\n }}>\n {emojis.map((emoji, index) => {\n const resourceUrl = emojiResource.get(emoji);\n const frameCount: number = props.reactionResources !== undefined ? getEmojiFrameCount(emoji, props.reactionResources) : 0;\n const classname = mergeStyles(emojiStyles(resourceUrl ? resourceUrl : '', frameCount));\n return <TooltipHost key={index} data-ui-id={index} hidden={props.disableTooltip} content={emojiButtonTooltip.get(emoji)} styles={reactionToolTipHostStyle()} calloutProps={{\n ...calloutProps\n }}>\n <DefaultButton role=\"menuitem\" key={index} onClick={() => {\n props.onReactionClick(emoji);\n reactionButtonRef.current?.focus();\n setCalloutIsVisible(false);\n }} className={classname} styles={reactionItemButtonStyles} aria-label={emojiButtonTooltip.get(emoji)}></DefaultButton>\n </TooltipHost>;\n })}\n </Stack>\n </FocusZone>\n </Callout>}\n <div ref={reactionButtonCalloutRef}>\n <ControlBarButton {...props} componentRef={reactionButtonRef} className={mergeStyles(styles, props.styles)} onClick={() => setCalloutIsVisible(!calloutIsVisible)} onRenderIcon={props.onRenderIcon ?? onRenderIcon} strings={strings} split={true} labelKey={props.labelKey ?? 'reactionButtonLabel'} onRenderMenuIcon={() => <div />} disabled={props.disabled} ariaLabel={strings.ariaLabel} />\n </div>\n </Stack>;\n};"]}
|
1
|
+
{"version":3,"file":"ReactionButton.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/ReactionButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAkC,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE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AAC,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,wBAAwB,gBAAc,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,GAAkB,CACpG,CAAC;gBACvB,CAAC,CAAC,CACQ,CACE,CACJ;QACZ,6BAAK,GAAG,EAAE,wBAAwB;YAChC,oBAAC,gBAAgB,oBAAK,KAAK,IAAE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,EAAE,CAAC,gCAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,CAC9X,CACA,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Callout, DefaultButton, FocusZone, IButton, ICalloutContentStyles, mergeStyles, Stack, TooltipHost, useTheme } from '@fluentui/react';\nimport React, { useRef, useState } from 'react';\nimport { ControlBarButton, ControlBarButtonProps } from './ControlBarButton';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nimport { useLocale } from '../localization';\nimport { emojiStyles, reactionButtonCalloutStyles, reactionButtonStyles, reactionItemButtonStyles, reactionToolTipHostStyle } from './styles/ReactionButton.styles';\nimport { isDarkThemed } from '../theming/themeUtils';\nimport { ReactionResources } from '..';\nimport { getEmojiFrameCount } from './VideoGallery/utils/videoGalleryLayoutUtils';\nimport { _preventDismissOnEvent } from '@internal/acs-ui-common';\n\n/**\n * Reactions types for the Reaction button\n * @public\n */\nexport type ReactionButtonReaction = 'like' | 'heart' | 'applause' | 'laugh' | 'surprised';\n\n/**\n * Props for {@link ReactionButton}.\n *\n * @public\n */\nexport interface ReactionButtonProps extends ControlBarButtonProps {\n /**\n * Optional strings to override in component\n */\n strings?: Partial<ReactionButtonStrings>;\n /**\n * Click event to send reaction to meeting\n */\n onReactionClick: (reaction: ReactionButtonReaction) => Promise<void>;\n /**\n * Reaction resource locator and parameters\n */\n reactionResources: ReactionResources;\n}\n\n/**\n * Strings of {@link ReactionButton} that can be overridden.\n *\n * @public\n */\nexport interface ReactionButtonStrings {\n /** Label of the button. */\n label: string;\n /** Aria label for reaction button accessibility announcement */\n ariaLabel: string;\n /** Tooltip content when the button is disabled. */\n tooltipDisabledContent?: string;\n /** Tooltip content when the button is enabled. */\n tooltipContent?: string;\n /** Tooltip content of like reaction button. */\n likeReactionTooltipContent?: string;\n /** Tooltip content of heart reaction button. */\n heartReactionTooltipContent?: string;\n /** Tooltip content of clap reaction button. */\n applauseReactionTooltipContent?: string;\n /** Tooltip content of laugh reaction button. */\n laughReactionTooltipContent?: string;\n /** Tooltip content of surprised reaction button. */\n surprisedReactionTooltipContent?: string;\n}\n\n/**\n * A button to send reactions.\n *\n * Can be used with {@link ControlBar}.\n *\n * @public\n */\nexport const ReactionButton = (props: ReactionButtonProps): JSX.Element => {\n const localeStrings = useLocale().strings.reactionButton;\n const strings = {\n ...localeStrings,\n ...props.strings\n };\n const theme = useTheme();\n const styles = reactionButtonStyles(theme);\n const onRenderIcon = (): JSX.Element => <_HighContrastAwareIcon disabled={props.disabled} iconName=\"ReactionButtonIcon\" />;\n const emojis: ReactionButtonReaction[] = ['like', 'heart', 'applause', 'laugh', 'surprised'];\n const emojiButtonTooltip: Map<string, string | undefined> = new Map([['like', strings.likeReactionTooltipContent], ['heart', strings.heartReactionTooltipContent], ['applause', strings.applauseReactionTooltipContent], ['laugh', strings.laughReactionTooltipContent], ['surprised', strings.surprisedReactionTooltipContent]]);\n const emojiResource: Map<string, string | undefined> = new Map([['like', props.reactionResources.likeReaction?.url], ['heart', props.reactionResources.heartReaction?.url], ['applause', props.reactionResources.applauseReaction?.url], ['laugh', props.reactionResources.laughReaction?.url], ['surprised', props.reactionResources.surprisedReaction?.url]]);\n const calloutStyle: Partial<ICalloutContentStyles> = {\n root: {\n padding: 0\n },\n calloutMain: {\n padding: '0.5rem'\n }\n };\n const calloutProps = {\n styles: calloutStyle,\n backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''\n };\n const reactionButtonCalloutRef = useRef<HTMLDivElement>(null);\n const reactionButtonRef = useRef<IButton>(null);\n const [calloutIsVisible, setCalloutIsVisible] = useState(false);\n return <Stack>\n {calloutIsVisible && <Callout data-ui-id=\"reaction-sub-menu\" isBeakVisible={false} styles={reactionButtonCalloutStyles} target={reactionButtonCalloutRef.current} onDismiss={() => {\n reactionButtonRef.current?.focus();\n setCalloutIsVisible(false);\n }}>\n <FocusZone shouldFocusOnMount style={{\n height: '100%'\n }}>\n <Stack horizontal style={{\n height: 'inherit'\n }}>\n {emojis.map((emoji, index) => {\n const resourceUrl = emojiResource.get(emoji);\n const frameCount: number = props.reactionResources !== undefined ? getEmojiFrameCount(emoji, props.reactionResources) : 0;\n const classname = mergeStyles(emojiStyles(resourceUrl ? resourceUrl : '', frameCount));\n return <TooltipHost key={index} data-ui-id={index} hidden={props.disableTooltip} content={emojiButtonTooltip.get(emoji)} styles={reactionToolTipHostStyle()} calloutProps={{\n ...calloutProps\n }}>\n <DefaultButton role=\"menuitem\" key={index} onClick={() => {\n props.onReactionClick(emoji);\n reactionButtonRef.current?.focus();\n setCalloutIsVisible(false);\n }} className={classname} styles={reactionItemButtonStyles} aria-label={emojiButtonTooltip.get(emoji)}></DefaultButton>\n </TooltipHost>;\n })}\n </Stack>\n </FocusZone>\n </Callout>}\n <div ref={reactionButtonCalloutRef}>\n <ControlBarButton {...props} componentRef={reactionButtonRef} className={mergeStyles(styles, props.styles)} onClick={() => setCalloutIsVisible(!calloutIsVisible)} onRenderIcon={props.onRenderIcon ?? onRenderIcon} strings={strings} split={true} labelKey={props.labelKey ?? 'reactionButtonLabel'} onRenderMenuIcon={() => <div />} disabled={props.disabled} ariaLabel={strings.ariaLabel} />\n </div>\n </Stack>;\n};"]}
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { IStyle } from '@fluentui/react';
|
3
3
|
import { BaseCustomStyles } from '../types';
|
4
|
-
import { AttachmentMetadataInProgress, MessageOptions } from "../../../acs-ui-common/src";
|
5
|
-
import { MentionLookupOptions } from './MentionPopover';
|
6
4
|
/**
|
7
5
|
* Fluent styles for {@link Sendbox}.
|
8
6
|
*
|
@@ -38,26 +36,6 @@ export interface SendBoxStrings {
|
|
38
36
|
* Aria label for send message button
|
39
37
|
*/
|
40
38
|
sendButtonAriaLabel: string;
|
41
|
-
/**
|
42
|
-
* Error message indicating that all attachment uploads are not complete.
|
43
|
-
*/
|
44
|
-
attachmentUploadsPendingError: string;
|
45
|
-
/**
|
46
|
-
* Aria label to notify user when focus is on cancel attachment upload button.
|
47
|
-
*/
|
48
|
-
removeAttachment: string;
|
49
|
-
/**
|
50
|
-
* Aria label to notify user attachment uploading starts.
|
51
|
-
*/
|
52
|
-
uploading: string;
|
53
|
-
/**
|
54
|
-
* Aria label to notify user attachment is uploaded.
|
55
|
-
*/
|
56
|
-
uploadCompleted: string;
|
57
|
-
/**
|
58
|
-
* Aria label to notify user more attachment action menu.
|
59
|
-
*/
|
60
|
-
attachmentMoreMenu: string;
|
61
39
|
}
|
62
40
|
/**
|
63
41
|
* Props for {@link SendBox}.
|
@@ -77,12 +55,7 @@ export interface SendBoxProps {
|
|
77
55
|
/**
|
78
56
|
* Optional override behavior on send button click
|
79
57
|
*/
|
80
|
-
onSendMessage?: (content: string
|
81
|
-
/**
|
82
|
-
* Optional props needed to lookup suggestions in the mention scenario.
|
83
|
-
* @beta
|
84
|
-
*/
|
85
|
-
mentionLookupOptions?: MentionLookupOptions;
|
58
|
+
onSendMessage?: (content: string) => Promise<void>;
|
86
59
|
/**
|
87
60
|
* Optional callback called when user is typing
|
88
61
|
*/
|
@@ -119,25 +92,6 @@ export interface SendBoxProps {
|
|
119
92
|
* When undefined nothing has focus on render
|
120
93
|
*/
|
121
94
|
autoFocus?: 'sendBoxTextField';
|
122
|
-
/**
|
123
|
-
* Optional callback to render uploaded attachments in the SendBox. The sendBox will expand
|
124
|
-
* vertically to accommodate the uploaded attachments. Attachment uploads will
|
125
|
-
* be rendered below the text area in sendBox.
|
126
|
-
* @beta
|
127
|
-
*/
|
128
|
-
onRenderAttachmentUploads?: () => JSX.Element;
|
129
|
-
/**
|
130
|
-
* Optional array of type {@link AttachmentMetadataInProgress}
|
131
|
-
* to render attachments being uploaded in the SendBox.
|
132
|
-
* @beta
|
133
|
-
*/
|
134
|
-
attachments?: AttachmentMetadataInProgress[];
|
135
|
-
/**
|
136
|
-
* Optional callback to remove the attachment upload before sending by clicking on
|
137
|
-
* cancel icon.
|
138
|
-
* @beta
|
139
|
-
*/
|
140
|
-
onCancelAttachmentUpload?: (attachmentId: string) => void;
|
141
95
|
}
|
142
96
|
/**
|
143
97
|
* Component for typing and sending messages.
|
@@ -3,18 +3,12 @@
|
|
3
3
|
import React, { useState, useMemo, useCallback } from 'react';
|
4
4
|
import { mergeStyles, concatStyleSets, Icon, Stack } from '@fluentui/react';
|
5
5
|
import { sendButtonStyle, sendIconStyle, sendBoxWrapperStyles, borderAndBoxShadowStyle } from './styles/SendBox.styles';
|
6
|
-
import { useV9CustomStyles } from './styles/SendBox.styles';
|
7
6
|
import { useTheme } from '../theming';
|
8
7
|
import { useLocale } from '../localization';
|
9
8
|
import { useIdentifiers } from '../identifiers';
|
10
9
|
import { InputBoxComponent } from './InputBoxComponent';
|
11
10
|
import { InputBoxButton } from './InputBoxButton';
|
12
|
-
import { SendBoxErrors } from './SendBoxErrors';
|
13
|
-
import { _AttachmentUploadCards } from './Attachment/AttachmentUploadCards';
|
14
|
-
import { attachmentUploadCardsStyles } from './styles/SendBox.styles';
|
15
|
-
import { isAttachmentUploadCompleted, hasIncompleteAttachmentUploads, toAttachmentMetadata } from './utils/SendBoxUtils';
|
16
11
|
import { MAXIMUM_LENGTH_OF_MESSAGE, isMessageTooLong, sanitizeText, isSendBoxButtonDisabled } from './utils/SendBoxUtils';
|
17
|
-
import { FluentV9ThemeProvider } from '../theming/FluentV9ThemeProvider';
|
18
12
|
/**
|
19
13
|
* Component for typing and sending messages.
|
20
14
|
*
|
@@ -24,7 +18,7 @@ import { FluentV9ThemeProvider } from '../theming/FluentV9ThemeProvider';
|
|
24
18
|
* @public
|
25
19
|
*/
|
26
20
|
export const SendBox = (props) => {
|
27
|
-
const { disabled, systemMessage, supportNewline, onSendMessage, onTyping, onRenderIcon, onRenderSystemMessage, styles, autoFocus
|
21
|
+
const { disabled, systemMessage, supportNewline, onSendMessage, onTyping, onRenderIcon, onRenderSystemMessage, styles, autoFocus } = props;
|
28
22
|
const theme = useTheme();
|
29
23
|
const localeStrings = useLocale().strings.sendBox;
|
30
24
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
@@ -32,8 +26,6 @@ export const SendBox = (props) => {
|
|
32
26
|
const [textValue, setTextValue] = useState('');
|
33
27
|
const [textValueOverflow, setTextValueOverflow] = useState(false);
|
34
28
|
const sendTextFieldRef = React.useRef(null);
|
35
|
-
const customV9Styles = useV9CustomStyles();
|
36
|
-
const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState(undefined);
|
37
29
|
const sendMessageOnClick = () => {
|
38
30
|
var _a;
|
39
31
|
// don't send a message when disabled
|
@@ -41,22 +33,11 @@ export const SendBox = (props) => {
|
|
41
33
|
return;
|
42
34
|
}
|
43
35
|
// Don't send message until all attachments have been uploaded successfully
|
44
|
-
setAttachmentUploadsPendingError(undefined);
|
45
|
-
if (hasIncompleteAttachmentUploads(attachments)) {
|
46
|
-
setAttachmentUploadsPendingError({
|
47
|
-
message: strings.attachmentUploadsPendingError,
|
48
|
-
timestamp: Date.now()
|
49
|
-
});
|
50
|
-
return;
|
51
|
-
}
|
52
36
|
const message = textValue;
|
53
37
|
// we don't want to send empty messages including spaces, newlines, tabs
|
54
38
|
// Message can be empty if there is a valid attachment upload
|
55
|
-
if (sanitizeText(message).length > 0
|
56
|
-
onSendMessage && onSendMessage(message
|
57
|
-
attachments: toAttachmentMetadata(attachments),
|
58
|
-
type: 'text'
|
59
|
-
});
|
39
|
+
if (sanitizeText(message).length > 0) {
|
40
|
+
onSendMessage && onSendMessage(message);
|
60
41
|
setTextValue('');
|
61
42
|
(_a = sendTextFieldRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
62
43
|
}
|
@@ -73,11 +54,10 @@ export const SendBox = (props) => {
|
|
73
54
|
const isSendBoxButtonDisabledValue = useMemo(() => {
|
74
55
|
return isSendBoxButtonDisabled({
|
75
56
|
hasContent: sanitizeText(textValue).length > 0,
|
76
|
-
hasCompletedAttachmentUploads: isAttachmentUploadCompleted(attachments),
|
77
57
|
hasError: !!errorMessage,
|
78
58
|
disabled: !!disabled
|
79
59
|
});
|
80
|
-
}, [
|
60
|
+
}, [disabled, errorMessage, textValue]);
|
81
61
|
const mergedSendButtonStyle = useMemo(() => mergeStyles(sendButtonStyle, styles === null || styles === void 0 ? void 0 : styles.sendMessageIconContainer), [styles === null || styles === void 0 ? void 0 : styles.sendMessageIconContainer]);
|
82
62
|
const mergedStyles = useMemo(() => concatStyleSets(styles), [styles]);
|
83
63
|
const mergedSendIconStyle = useMemo(() => sendIconStyle({
|
@@ -87,40 +67,10 @@ export const SendBox = (props) => {
|
|
87
67
|
}), [theme, isSendBoxButtonDisabledValue, styles === null || styles === void 0 ? void 0 : styles.sendMessageIcon]);
|
88
68
|
const onRenderSendIcon = useCallback((isHover) => onRenderIcon ? onRenderIcon(isHover) : React.createElement(Icon, { iconName: isHover && textValue ? 'SendBoxSendHovered' : 'SendBoxSend', className: mergedSendIconStyle }), [mergedSendIconStyle, onRenderIcon, textValue]);
|
89
69
|
// Ensure that errors are cleared when there are no attachments in sendBox
|
90
|
-
React.useEffect(() => {
|
91
|
-
if (!(attachments === null || attachments === void 0 ? void 0 : attachments.filter(upload => !upload.error).length)) {
|
92
|
-
setAttachmentUploadsPendingError(undefined);
|
93
|
-
}
|
94
|
-
}, [attachments]);
|
95
|
-
const sendBoxErrorsProps = useMemo(() => {
|
96
|
-
var _a;
|
97
|
-
return {
|
98
|
-
attachmentUploadsPendingError: attachmentUploadsPendingError,
|
99
|
-
attachmentProgressError: (_a = attachments === null || attachments === void 0 ? void 0 : attachments.filter(attachmentUpload => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error
|
100
|
-
};
|
101
|
-
}, [attachments, attachmentUploadsPendingError]);
|
102
|
-
const onRenderAttachmentUploads = useCallback(() => {
|
103
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
104
|
-
if (!(attachments === null || attachments === void 0 ? void 0 : attachments.filter(upload => !upload.error).length)) {
|
105
|
-
return null;
|
106
|
-
}
|
107
|
-
return props.onRenderAttachmentUploads ? props.onRenderAttachmentUploads() : React.createElement(Stack, { className: attachmentUploadCardsStyles },
|
108
|
-
React.createElement(FluentV9ThemeProvider, { v8Theme: theme, className: customV9Styles.clearBackground },
|
109
|
-
React.createElement(_AttachmentUploadCards, { attachments: attachments, onCancelAttachmentUpload: props.onCancelAttachmentUpload, strings: {
|
110
|
-
removeAttachment: (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.removeAttachment) !== null && _b !== void 0 ? _b : localeStrings.removeAttachment,
|
111
|
-
uploading: (_d = (_c = props.strings) === null || _c === void 0 ? void 0 : _c.uploading) !== null && _d !== void 0 ? _d : localeStrings.uploading,
|
112
|
-
uploadCompleted: (_f = (_e = props.strings) === null || _e === void 0 ? void 0 : _e.uploadCompleted) !== null && _f !== void 0 ? _f : localeStrings.uploadCompleted,
|
113
|
-
attachmentMoreMenu: (_h = (_g = props.strings) === null || _g === void 0 ? void 0 : _g.attachmentMoreMenu) !== null && _h !== void 0 ? _h : localeStrings.attachmentMoreMenu
|
114
|
-
}, disabled: disabled })));
|
115
|
-
}, [attachments, props, theme, customV9Styles.clearBackground, localeStrings.removeAttachment, localeStrings.uploading, localeStrings.uploadCompleted, localeStrings.attachmentMoreMenu, disabled]);
|
116
70
|
return React.createElement(Stack, { className: mergeStyles(sendBoxWrapperStyles, {
|
117
71
|
overflow: 'visible'
|
118
72
|
} // This is needed for the mention popup to be visible
|
119
73
|
) },
|
120
|
-
React.createElement(SendBoxErrors, { attachmentProgressError: sendBoxErrorsProps.attachmentProgressError ? {
|
121
|
-
message: sendBoxErrorsProps.attachmentProgressError.message,
|
122
|
-
timestamp: Date.now()
|
123
|
-
} : undefined, attachmentUploadsPendingError: sendBoxErrorsProps.attachmentUploadsPendingError }),
|
124
74
|
React.createElement(Stack, { className: borderAndBoxShadowStyle({
|
125
75
|
theme,
|
126
76
|
hasErrorMessage: !!errorMessage,
|
@@ -133,13 +83,12 @@ export const SendBox = (props) => {
|
|
133
83
|
}
|
134
84
|
}, onEnterKeyDown: () => {
|
135
85
|
sendMessageOnClick();
|
136
|
-
}, styles: mergedStyles, supportNewline: supportNewline, maxLength: MAXIMUM_LENGTH_OF_MESSAGE
|
86
|
+
}, styles: mergedStyles, supportNewline: supportNewline, maxLength: MAXIMUM_LENGTH_OF_MESSAGE },
|
137
87
|
React.createElement(InputBoxButton, { onRenderIcon: onRenderSendIcon, onClick: e => {
|
138
88
|
if (!textValueOverflow) {
|
139
89
|
sendMessageOnClick();
|
140
90
|
}
|
141
91
|
e.stopPropagation();
|
142
|
-
}, id: 'sendIconWrapper', className: mergedSendButtonStyle, ariaLabel: localeStrings.sendButtonAriaLabel, tooltipContent: localeStrings.sendButtonAriaLabel, disabled: isSendBoxButtonDisabledValue }))
|
143
|
-
onRenderAttachmentUploads()));
|
92
|
+
}, id: 'sendIconWrapper', className: mergedSendButtonStyle, ariaLabel: localeStrings.sendButtonAriaLabel, tooltipContent: localeStrings.sendButtonAriaLabel, disabled: isSendBoxButtonDisabledValue }))));
|
144
93
|
};
|
145
94
|
//# sourceMappingURL=SendBox.js.map
|