@azure/communication-react 1.20.0-beta.1 → 1.20.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/README.md +2 -2
- package/dist/communication-react.d.ts +245 -1703
- package/dist/dist-cjs/communication-react/index.js +36159 -165
- 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/acs-ui-javascript-loaders/src/callCompositeLoader.d.ts +16 -7
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js +10 -10
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js.map +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.d.ts +17 -7
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js +12 -10
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js.map +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.d.ts +13 -7
- package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js +10 -9
- package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js.map +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.d.ts +16 -7
- package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js +10 -9
- package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +3 -12
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -12
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.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/getRemoteParticipantsExcludingConsumers.js +2 -1
- package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +12 -2
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +26 -6
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.d.ts +6 -0
- 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.d.ts +2 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +2 -19
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -2
- package/dist/dist-esm/calling-component-bindings/src/index.js +1 -2
- package/dist/dist-esm/calling-component-bindings/src/index.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/callUtils.d.ts +1 -2
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +3 -3
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.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 +32 -107
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.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/CaptionsSubscriber.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/DeviceManagerDeclarative.js +58 -52
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.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 +5 -3
- 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 +1 -27
- package/dist/dist-esm/communication-react/src/index.js +0 -6
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.js +3 -2
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.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 -2
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.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 +7 -34
- 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/Dialpad/Dialpad.js +6 -4
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/GridLayout.js +3 -0
- package/dist/dist-esm/react-components/src/components/GridLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.js +4 -5
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.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/LocalVideoCameraButton.js +3 -0
- package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +4 -4
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.js +2 -1
- package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.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 +6 -16
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +24 -0
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +25 -0
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js +2 -1
- package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Notification.js +3 -1
- package/dist/dist-esm/react-components/src/components/Notification.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/ParticipantItem.js +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.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.js +31 -41
- 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 +7 -3
- 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/VerticalGallery.js +2 -1
- package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +3 -3
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +6 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js +5 -4
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +23 -17
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +3 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js +3 -0
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +0 -20
- package/dist/dist-esm/react-components/src/components/index.js +0 -7
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/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/ReactionButton.styles.d.ts +13 -6
- package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js +49 -19
- package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.d.ts +0 -6
- package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.js +6 -35
- package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.js +5 -2
- package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +2 -1
- 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/responsive.js +6 -0
- package/dist/dist-esm/react-components/src/components/utils/responsive.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/gallery/dominantSpeaker.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 +0 -1
- 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/cy-GB/strings.json +1 -1
- package/dist/dist-esm/react-components/src/theming/generateTheme.js +10 -2
- package/dist/dist-esm/react-components/src/theming/generateTheme.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -30
- package/dist/dist-esm/react-components/src/theming/icons.js +0 -91
- 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 +13 -23
- 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 +4 -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 +17 -47
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +68 -137
- 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 +26 -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/CallingSoundSubscriber.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js +6 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/OnFetchProfileCallback.js +9 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/OnFetchProfileCallback.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.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 +21 -24
- 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/CallControls.d.ts +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +50 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +41 -25
- 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/MediaGallery.js +12 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +1 -1
- 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 +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js +1 -1
- 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.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js +1 -1
- 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/SidePane/usePeoplePane.js +7 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +5 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +7 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.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 +7 -23
- 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/components/buttons/Microphone.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +6 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +5 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.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 +9 -5
- 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 +16 -53
- 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/DtmfDialpadPage.js +7 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +5 -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 +21 -25
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +16 -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/selectors/dominantRemoteParticipantSelector.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.js +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +10 -11
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +2 -14
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +12 -68
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -65
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -24
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -8
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +5 -22
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +14 -139
- 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 +11 -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 +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +13 -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 +11 -11
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +2 -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 +49 -234
- 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/hooks/useSelector.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +11 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +1 -0
- 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 +12 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +9 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +28 -15
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js +4 -1
- package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/MeetingPhoneInfoPaneContent.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/MeetingPhoneInfoPaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +5 -6
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.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/PeoplePaneContent.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +4 -7
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.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/VideoEffectsPane.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +3 -4
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.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 +6 -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/resolveDeepNoiseSuppressionDependency.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependency.js +24 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependency.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependencyLazy.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependencyLazy.js +24 -0
- package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependencyLazy.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.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/fi-FI/strings.json +2 -1
- 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 +1 -0
- 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/package.json +8 -9
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CK3wKmiQ.js +0 -202
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CK3wKmiQ.js.map +0 -1
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-Duh89Mej.js +0 -50
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-Duh89Mej.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-XC7Z08jO.js +0 -42425
- package/dist/dist-cjs/communication-react/index-XC7Z08jO.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 -16
- 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 -314
- 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 -78
- 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 -211
- 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 -816
- 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 -174
- 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 -116
- 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/CallWithChatComposite/adapter/parseTeamsUrl.d.ts +0 -8
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js +0 -25
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.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 -253
- 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
@@ -1,39 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import React from 'react';
|
4
|
-
import { Stack, Text, Link, Icon, useTheme, PrimaryButton, mergeStyleSets } from '@fluentui/react';
|
5
|
-
import { _formatString } from "../../../../acs-ui-common/src";
|
6
|
-
import { iconBannerContainerStyles, iconContainerStyles, iconPrimaryStyles, linkTextStyles, primaryButtonStyles, primaryTextStyles, secondaryTextStyles, sparkleIconBackdropStyles, textContainerStyles } from '../styles/SitePermissions.styles';
|
7
|
-
import { isValidString } from '../utils';
|
8
|
-
/**
|
9
|
-
* spacing for the icons in the banner.
|
10
|
-
*/
|
11
|
-
const tokens = {
|
12
|
-
childrenGap: '2rem'
|
13
|
-
};
|
14
|
-
/** @private */
|
15
|
-
export const SitePermissionsContainer = (props) => {
|
16
|
-
var _a, _b;
|
17
|
-
const { appName, onTroubleshootingClick, onPrimaryButtonClick, strings } = props;
|
18
|
-
const theme = useTheme();
|
19
|
-
return React.createElement(Stack, { style: {
|
20
|
-
padding: '2rem',
|
21
|
-
maxWidth: '25.375rem',
|
22
|
-
alignSelf: 'center'
|
23
|
-
}, "aria-label": strings === null || strings === void 0 ? void 0 : strings.ariaLabel },
|
24
|
-
React.createElement(Stack, { styles: iconBannerContainerStyles, horizontal: true, horizontalAlign: 'center', verticalFill: true, tokens: tokens },
|
25
|
-
props.cameraIconName && React.createElement(Stack, null,
|
26
|
-
React.createElement(Icon, { styles: iconPrimaryStyles, iconName: props.cameraIconName })),
|
27
|
-
props.connectorIconName && React.createElement(Stack, { styles: iconContainerStyles, horizontal: true },
|
28
|
-
React.createElement(Icon, { styles: sparkleIconBackdropStyles(theme), iconName: props.connectorIconName })),
|
29
|
-
props.microphoneIconName && React.createElement(Stack, null,
|
30
|
-
React.createElement(Icon, { styles: iconPrimaryStyles, iconName: props.microphoneIconName }))),
|
31
|
-
React.createElement(Stack, { styles: textContainerStyles },
|
32
|
-
strings && isValidString(strings === null || strings === void 0 ? void 0 : strings.primaryText) && React.createElement(Text, { styles: primaryTextStyles }, appName ? _formatString(strings.primaryText, {
|
33
|
-
appName: appName
|
34
|
-
}) : strings.primaryText),
|
35
|
-
strings && isValidString(strings === null || strings === void 0 ? void 0 : strings.secondaryText) && React.createElement(Text, { styles: secondaryTextStyles }, strings === null || strings === void 0 ? void 0 : strings.secondaryText),
|
36
|
-
onPrimaryButtonClick && isValidString(strings === null || strings === void 0 ? void 0 : strings.primaryButtonText) && React.createElement(PrimaryButton, { styles: mergeStyleSets(primaryButtonStyles, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.primaryButton), text: strings === null || strings === void 0 ? void 0 : strings.primaryButtonText, onClick: onPrimaryButtonClick }),
|
37
|
-
onTroubleshootingClick && isValidString(strings === null || strings === void 0 ? void 0 : strings.linkText) && React.createElement(Link, { styles: mergeStyleSets(linkTextStyles, (_b = props.styles) === null || _b === void 0 ? void 0 : _b.troubleshootingLink), onClick: onTroubleshootingClick }, strings === null || strings === void 0 ? void 0 : strings.linkText)));
|
38
|
-
};
|
39
|
-
//# sourceMappingURL=SitePermissionsScaffolding.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"SitePermissionsScaffolding.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAA8B,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC/H,OAAO,EAAE,aAAa,EAAY,sCAAgC;AAClE,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,mBAAmB,E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Aa,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,CAAC,IAAI,oBAAC,IAAI,IAAC,MAAM,EAAE,iBAAiB,IAC7E,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE;gBAChD,OAAO,EAAE,OAAO;aACjB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CACf;YACR,OAAO,IAAI,aAAa,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC,IAAI,oBAAC,IAAI,IAAC,MAAM,EAAE,mBAAmB,IAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAQ;YAEtH,oBAAoB,IAAI,aAAa,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,CAAC,IAAI,oBAAC,aAAa,IAAC,MAAM,EAAE,cAAc,CAAC,mBAAmB,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,aAAa,CAAC,EAAE,IAAI,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,EAAE,OAAO,EAAE,oBAAoB,GAAI;YACjO,sBAAsB,IAAI,aAAa,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,IAAI,oBAAC,IAAI,IAAC,MAAM,EAAE,cAAc,CAAC,cAAc,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,mBAAmB,CAAC,EAAE,OAAO,EAAE,sBAAsB,IAC1K,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CACb,CACH,CACF,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { Stack, Text, Link, Icon, useTheme, PrimaryButton, ILinkStyles, IButtonStyles, mergeStyleSets } from '@fluentui/react';\nimport { _formatString, _pxToRem } from '@internal/acs-ui-common';\nimport { iconBannerContainerStyles, iconContainerStyles, iconPrimaryStyles, linkTextStyles, primaryButtonStyles, primaryTextStyles, secondaryTextStyles, sparkleIconBackdropStyles, textContainerStyles } from '../styles/SitePermissions.styles';\nimport { isValidString } from '../utils';\nimport { BaseCustomStyles } from '../../types';\n\n/**\n * @private\n * Props for SitePermissions component.\n */\nexport interface SitePermissionsContainerProps {\n /**\n * Name of application calling experience is in.\n */\n appName?: string;\n /**\n * Name of icon to be used for the camera icon.\n * If this is not provided the icon will not be shown.\n */\n cameraIconName?: string;\n /**\n * Name of icon to be used for the sparkle icon.\n * If this is not provided the icon will not be shown.\n */\n connectorIconName?: string;\n /**\n * Name of icon to be used for the mic icon.\n * If this is not provided the icon will not be shown.\n */\n microphoneIconName?: string;\n /**\n * Action to be taken by the more help link. Possible to send to external page or show other modal.\n * If this is not provided the button will not be shown.\n */\n onTroubleshootingClick?: () => void;\n /**\n * Action that is taken when the user clicks an optional primary button.\n * If this is not provided the button will not be shown.\n */\n onPrimaryButtonClick?: () => void;\n /**\n * Localization strings for SitePermissions component.\n */\n strings?: SitePermissionsStrings;\n /**\n * Styles for SitePermissions component.\n */\n styles?: SitePermissionsStyles;\n}\n\n/**\n * @beta\n * Strings for SitePermissions component\n */\nexport type SitePermissionsStrings = {\n /**\n * Main text string.\n */\n primaryText?: string;\n /**\n * Subtext string.\n */\n secondaryText?: string;\n /**\n * More help link string.\n */\n linkText?: string;\n /**\n * Primary button text string.\n */\n primaryButtonText?: string;\n /**\n * Aria label describing the content of the container\n */\n ariaLabel?: string;\n};\n\n/**\n * Fluent styles for {@link SitePermissionsContainer}.\n *\n * @beta\n */\nexport interface SitePermissionsStyles extends BaseCustomStyles {\n /** Styles for the primary button. */\n primaryButton?: IButtonStyles;\n /** Styles for the help troubleshooting link text. */\n troubleshootingLink?: ILinkStyles;\n}\n\n/**\n * spacing for the icons in the banner.\n */\nconst tokens = {\n childrenGap: '2rem'\n};\n\n/** @private */\nexport const SitePermissionsContainer = (props: SitePermissionsContainerProps): JSX.Element => {\n const {\n appName,\n onTroubleshootingClick,\n onPrimaryButtonClick,\n strings\n } = props;\n const theme = useTheme();\n return <Stack style={{\n padding: '2rem',\n maxWidth: '25.375rem',\n alignSelf: 'center'\n }} aria-label={strings?.ariaLabel}>\n <Stack styles={iconBannerContainerStyles} horizontal horizontalAlign={'center'} verticalFill tokens={tokens}>\n {props.cameraIconName && <Stack>\n <Icon styles={iconPrimaryStyles} iconName={props.cameraIconName}></Icon>\n </Stack>}\n {props.connectorIconName && <Stack styles={iconContainerStyles} horizontal>\n <Icon styles={sparkleIconBackdropStyles(theme)} iconName={props.connectorIconName}></Icon>\n </Stack>}\n {props.microphoneIconName && <Stack>\n <Icon styles={iconPrimaryStyles} iconName={props.microphoneIconName}></Icon>\n </Stack>}\n </Stack>\n <Stack styles={textContainerStyles}>\n {strings && isValidString(strings?.primaryText) && <Text styles={primaryTextStyles}>\n {appName ? _formatString(strings.primaryText, {\n appName: appName\n }) : strings.primaryText}\n </Text>}\n {strings && isValidString(strings?.secondaryText) && <Text styles={secondaryTextStyles}>{strings?.secondaryText}</Text>}\n\n {onPrimaryButtonClick && isValidString(strings?.primaryButtonText) && <PrimaryButton styles={mergeStyleSets(primaryButtonStyles, props.styles?.primaryButton)} text={strings?.primaryButtonText} onClick={onPrimaryButtonClick} />}\n {onTroubleshootingClick && isValidString(strings?.linkText) && <Link styles={mergeStyleSets(linkTextStyles, props.styles?.troubleshootingLink)} onClick={onTroubleshootingClick}>\n {strings?.linkText}\n </Link>}\n </Stack>\n </Stack>;\n};"]}
|
@@ -1,121 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
/**
|
3
|
-
* Props for {@link _MentionPopover}.
|
4
|
-
*
|
5
|
-
* @internal
|
6
|
-
*/
|
7
|
-
export interface _MentionPopoverProps {
|
8
|
-
/**
|
9
|
-
* Array of mention suggestions used to populate the suggestion list
|
10
|
-
*/
|
11
|
-
suggestions: Mention[];
|
12
|
-
/**
|
13
|
-
* Index of the currently focused suggestion, if any
|
14
|
-
*/
|
15
|
-
activeSuggestionIndex?: number;
|
16
|
-
/**
|
17
|
-
* Optional string used as mention popover's title.
|
18
|
-
* @defaultValue `Suggestions`
|
19
|
-
*/
|
20
|
-
title?: string;
|
21
|
-
/**
|
22
|
-
* Element to anchor the popover to.
|
23
|
-
*/
|
24
|
-
target: React.RefObject<Element>;
|
25
|
-
/**
|
26
|
-
* When rendering the popover, where to position it relative to the target.
|
27
|
-
*/
|
28
|
-
targetPositionOffset?: {
|
29
|
-
top: number;
|
30
|
-
left: number;
|
31
|
-
};
|
32
|
-
/**
|
33
|
-
* Where to display the suggestions relative to the target.
|
34
|
-
* @defaultValue `above`
|
35
|
-
*/
|
36
|
-
location?: 'above' | 'below';
|
37
|
-
/**
|
38
|
-
* Callback called when a mention suggestion is selected.
|
39
|
-
*/
|
40
|
-
onSuggestionSelected: (suggestion: Mention) => void;
|
41
|
-
/**
|
42
|
-
* Callback to invoke when the popover is dismissed
|
43
|
-
*/
|
44
|
-
onDismiss?: () => void;
|
45
|
-
/**
|
46
|
-
* Optional callback to render an item of the mention suggestions list.
|
47
|
-
*/
|
48
|
-
onRenderSuggestionItem?: (suggestion: Mention, onSuggestionSelected: (suggestion: Mention) => void, isActive: boolean) => JSX.Element;
|
49
|
-
}
|
50
|
-
/**
|
51
|
-
* Options to lookup suggestions in the mention scenario.
|
52
|
-
*
|
53
|
-
* @beta
|
54
|
-
*/
|
55
|
-
export interface MentionLookupOptions {
|
56
|
-
/**
|
57
|
-
* Optional string to set trigger keyword for mention a specific participant.
|
58
|
-
*
|
59
|
-
* @defaultValue `@`
|
60
|
-
*/
|
61
|
-
trigger?: string;
|
62
|
-
/**
|
63
|
-
* Optional callback to fetch a list of mention suggestions base on the query.
|
64
|
-
*/
|
65
|
-
onQueryUpdated: (query: string) => Promise<Mention[]>;
|
66
|
-
/**
|
67
|
-
* Optional callback to render an item of the mention suggestions list.
|
68
|
-
*/
|
69
|
-
onRenderSuggestionItem?: (suggestion: Mention, onSuggestionSelected: (suggestion: Mention) => void, isActive: boolean) => JSX.Element;
|
70
|
-
}
|
71
|
-
/**
|
72
|
-
* Options to display suggestions in the mention scenario.
|
73
|
-
*
|
74
|
-
* @beta
|
75
|
-
*/
|
76
|
-
export interface MentionDisplayOptions {
|
77
|
-
/**
|
78
|
-
* Optional callback for customizing the mention renderer in a message thread.
|
79
|
-
*/
|
80
|
-
onRenderMention?: (mention: Mention, defaultOnRender: (mention: Mention) => JSX.Element) => JSX.Element;
|
81
|
-
}
|
82
|
-
/**
|
83
|
-
* Options to lookup suggestions and display mentions in the mention scenario.
|
84
|
-
*
|
85
|
-
* @beta
|
86
|
-
*/
|
87
|
-
export type MentionOptions = {
|
88
|
-
lookupOptions?: MentionLookupOptions;
|
89
|
-
displayOptions?: MentionDisplayOptions;
|
90
|
-
};
|
91
|
-
/**
|
92
|
-
* Mention's state, as reflected in the UI.
|
93
|
-
*
|
94
|
-
* @beta
|
95
|
-
*/
|
96
|
-
export interface Mention {
|
97
|
-
/** ID of a mention */
|
98
|
-
id: string;
|
99
|
-
/** Display text of a mention */
|
100
|
-
displayText: string;
|
101
|
-
/** Optional React element to render an item icon of a mention suggestion */
|
102
|
-
icon?: JSX.Element;
|
103
|
-
}
|
104
|
-
/**
|
105
|
-
* Strings of {@link _MentionPopover} that can be overridden.
|
106
|
-
*
|
107
|
-
* @beta
|
108
|
-
*/
|
109
|
-
export interface MentionPopoverStrings {
|
110
|
-
/**
|
111
|
-
* Header text for MentionPopover
|
112
|
-
*/
|
113
|
-
mentionPopoverHeader: string;
|
114
|
-
}
|
115
|
-
/**
|
116
|
-
* Component to render a pop-up of mention suggestions.
|
117
|
-
*
|
118
|
-
* @internal
|
119
|
-
*/
|
120
|
-
export declare const _MentionPopover: (props: _MentionPopoverProps) => JSX.Element;
|
121
|
-
//# sourceMappingURL=MentionPopover.d.ts.map
|
@@ -1,119 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import React, { useEffect, useRef, useState, useCallback } from 'react';
|
4
|
-
import { Persona, PersonaSize, Stack, mergeStyles, useTheme } from '@fluentui/react';
|
5
|
-
import { mergeClasses } from '@fluentui/react-components';
|
6
|
-
import { mentionPopoverContainerStyle, headerStyleThemed, suggestionItemStackStyle, suggestionItemWrapperStyle, useSuggestionListStyle } from './styles/MentionPopover.style';
|
7
|
-
import { useIdentifiers } from '../identifiers';
|
8
|
-
import { useLocale } from '../localization';
|
9
|
-
import { useDefaultStackStyles } from './styles/Stack.style';
|
10
|
-
/**
|
11
|
-
* Component to render a pop-up of mention suggestions.
|
12
|
-
*
|
13
|
-
* @internal
|
14
|
-
*/
|
15
|
-
export const _MentionPopover = (props) => {
|
16
|
-
const { suggestions, activeSuggestionIndex, title, target, targetPositionOffset, onRenderSuggestionItem, onSuggestionSelected, onDismiss, location } = props;
|
17
|
-
const theme = useTheme();
|
18
|
-
const ids = useIdentifiers();
|
19
|
-
const localeStrings = useLocale().strings;
|
20
|
-
const popoverRef = useRef();
|
21
|
-
const suggestionsListRef = useRef(null);
|
22
|
-
const [position, setPosition] = useState();
|
23
|
-
const [hoveredSuggestion, setHoveredSuggestion] = useState(undefined);
|
24
|
-
const suggestionListStyle = useSuggestionListStyle();
|
25
|
-
const defaultStackStyles = useDefaultStackStyles();
|
26
|
-
const dismissPopoverWhenClickingOutside = useCallback((e) => {
|
27
|
-
const target = e.target;
|
28
|
-
if (popoverRef.current && !popoverRef.current.contains(target)) {
|
29
|
-
onDismiss && onDismiss();
|
30
|
-
}
|
31
|
-
}, [onDismiss]);
|
32
|
-
useEffect(() => {
|
33
|
-
if (suggestionsListRef.current && activeSuggestionIndex !== undefined && activeSuggestionIndex >= 0) {
|
34
|
-
const selectedItem = suggestionsListRef.current.children[activeSuggestionIndex];
|
35
|
-
if (selectedItem) {
|
36
|
-
selectedItem.scrollIntoView({
|
37
|
-
behavior: 'smooth',
|
38
|
-
block: 'nearest'
|
39
|
-
});
|
40
|
-
}
|
41
|
-
}
|
42
|
-
}, [activeSuggestionIndex]);
|
43
|
-
useEffect(() => {
|
44
|
-
window && window.addEventListener('click', dismissPopoverWhenClickingOutside);
|
45
|
-
return () => {
|
46
|
-
window && window.removeEventListener('click', dismissPopoverWhenClickingOutside);
|
47
|
-
};
|
48
|
-
}, [dismissPopoverWhenClickingOutside]);
|
49
|
-
// Determine popover position
|
50
|
-
useEffect(() => {
|
51
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
52
|
-
const rect = (_a = target === null || target === void 0 ? void 0 : target.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
53
|
-
const maxWidth = 200;
|
54
|
-
const finalPosition = {
|
55
|
-
maxWidth
|
56
|
-
};
|
57
|
-
// Figure out whether it will fit horizontally
|
58
|
-
const leftOffset = (_b = targetPositionOffset === null || targetPositionOffset === void 0 ? void 0 : targetPositionOffset.left) !== null && _b !== void 0 ? _b : 0;
|
59
|
-
if (leftOffset + maxWidth > ((_c = rect === null || rect === void 0 ? void 0 : rect.width) !== null && _c !== void 0 ? _c : 0)) {
|
60
|
-
finalPosition.right = ((_d = rect === null || rect === void 0 ? void 0 : rect.width) !== null && _d !== void 0 ? _d : 0) - leftOffset;
|
61
|
-
}
|
62
|
-
else {
|
63
|
-
finalPosition.left = leftOffset;
|
64
|
-
}
|
65
|
-
// Offset between cursor and mention popover
|
66
|
-
const verticalOffset = 4;
|
67
|
-
if (location === 'below') {
|
68
|
-
finalPosition.top = ((_e = rect === null || rect === void 0 ? void 0 : rect.height) !== null && _e !== void 0 ? _e : 0) + ((_f = targetPositionOffset === null || targetPositionOffset === void 0 ? void 0 : targetPositionOffset.top) !== null && _f !== void 0 ? _f : 0) + verticalOffset;
|
69
|
-
}
|
70
|
-
else {
|
71
|
-
// (location === 'above')
|
72
|
-
finalPosition.bottom = ((_g = rect === null || rect === void 0 ? void 0 : rect.height) !== null && _g !== void 0 ? _g : 0) - ((_h = targetPositionOffset === null || targetPositionOffset === void 0 ? void 0 : targetPositionOffset.top) !== null && _h !== void 0 ? _h : 0) + verticalOffset;
|
73
|
-
}
|
74
|
-
setPosition(finalPosition);
|
75
|
-
}, [location, target, targetPositionOffset]);
|
76
|
-
const handleOnKeyDown = useCallback((e) => {
|
77
|
-
switch (e.key) {
|
78
|
-
case 'Escape':
|
79
|
-
onDismiss && onDismiss();
|
80
|
-
break;
|
81
|
-
default:
|
82
|
-
break;
|
83
|
-
}
|
84
|
-
}, [onDismiss]);
|
85
|
-
const personaRenderer = useCallback((displayName) => {
|
86
|
-
const avatarOptions = {
|
87
|
-
text: displayName.trim(),
|
88
|
-
size: PersonaSize.size24,
|
89
|
-
initialsColor: theme.palette.neutralLight,
|
90
|
-
initialsTextColor: theme.palette.neutralSecondary,
|
91
|
-
showOverflowTooltip: false,
|
92
|
-
showUnknownPersonaCoin: false
|
93
|
-
};
|
94
|
-
return React.createElement(Persona, Object.assign({}, avatarOptions));
|
95
|
-
}, [theme]);
|
96
|
-
const defaultOnRenderSuggestionItem = useCallback((suggestion, onSuggestionSelected, active) => {
|
97
|
-
return React.createElement("div", { "data-is-focusable": true, "data-ui-id": ids.mentionSuggestionItem, key: suggestion.id, onClick: () => onSuggestionSelected(suggestion), onMouseEnter: () => setHoveredSuggestion(suggestion), onMouseLeave: () => setHoveredSuggestion(undefined), onKeyDown: e => {
|
98
|
-
handleOnKeyDown(e);
|
99
|
-
}, className: suggestionItemWrapperStyle(theme) },
|
100
|
-
React.createElement(Stack, { horizontal: true, className: suggestionItemStackStyle(theme, (hoveredSuggestion === null || hoveredSuggestion === void 0 ? void 0 : hoveredSuggestion.id) === suggestion.id, active) }, personaRenderer(suggestion.displayText)));
|
101
|
-
}, [handleOnKeyDown, theme, ids, hoveredSuggestion, personaRenderer]);
|
102
|
-
const getHeaderTitle = useCallback(() => {
|
103
|
-
if (title) {
|
104
|
-
return title;
|
105
|
-
}
|
106
|
-
return localeStrings.mentionPopover.mentionPopoverHeader;
|
107
|
-
return '';
|
108
|
-
}, [localeStrings, title]);
|
109
|
-
return React.createElement("div", { ref: popoverRef }, position && React.createElement(Stack, { "data-testid": 'mention-suggestion-list-container', className: mergeStyles({
|
110
|
-
maxHeight: 212,
|
111
|
-
maxWidth: position.maxWidth
|
112
|
-
}, mentionPopoverContainerStyle(theme), Object.assign(Object.assign({}, position), { position: 'absolute' })) },
|
113
|
-
React.createElement(Stack.Item, { styles: headerStyleThemed(theme), "aria-label": title }, getHeaderTitle()),
|
114
|
-
React.createElement("div", { className: mergeClasses(defaultStackStyles.root, suggestionListStyle.root), "data-ui-id": ids.mentionSuggestionList, ref: suggestionsListRef }, suggestions.map((suggestion, index) => {
|
115
|
-
const active = index === activeSuggestionIndex;
|
116
|
-
return onRenderSuggestionItem ? onRenderSuggestionItem(suggestion, onSuggestionSelected, active) : defaultOnRenderSuggestionItem(suggestion, onSuggestionSelected, active);
|
117
|
-
}))));
|
118
|
-
};
|
119
|
-
//# sourceMappingURL=MentionPopover.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MentionPopover.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/MentionPopover.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC9K,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EA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AI,oBAAC,KAAK,mBAAc,mCAAmC,EAAE,SAAS,EAAE,WAAW,CAAC;YAC7F,SAAS,EAAE,GAAG;YACd,QAAQ,EAAE,QAAQ,CAAC,QAAQ;SAC5B,EAAE,4BAA4B,CAAC,KAAK,CAAC,kCACjC,QAAQ,KACX,QAAQ,EAAE,UAAU,IACpB;QACI,oBAAC,KAAK,CAAC,IAAI,IAAC,MAAM,EAAE,iBAAiB,CAAC,KAAK,CAAC,gBAAc,KAAK,IAC5D,cAAc,EAAE,CACN;QAEb,6BAAK,SAAS,EAAE,YAAY,CAAC,kBAAkB,CAAC,IAAI,EAAE,mBAAmB,CAAC,IAAI,CAAC,gBAAc,GAAG,CAAC,qBAAqB,EAAE,GAAG,EAAE,kBAAkB,IAC5I,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE;YACzC,MAAM,MAAM,GAAG,KAAK,KAAK,qBAAqB,CAAC;YAC/C,OAAO,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC,UAAU,EAAE,oBAAoB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,UAAU,EAAE,oBAAoB,EAAE,MAAM,CAAC,CAAC;QAC7K,CAAC,CAAC,CACM,CACA,CACN,CAAC;AACX,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef, useState, useCallback } from 'react';\nimport { Persona, PersonaSize, Stack, mergeStyles, useTheme } from '@fluentui/react';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { mentionPopoverContainerStyle, headerStyleThemed, suggestionItemStackStyle, suggestionItemWrapperStyle, useSuggestionListStyle } from './styles/MentionPopover.style';\nimport { useIdentifiers } from '../identifiers';\nimport { useLocale } from '../localization';\nimport { useDefaultStackStyles } from './styles/Stack.style';\n\n/**\n * Props for {@link _MentionPopover}.\n *\n * @internal\n */\nexport interface _MentionPopoverProps {\n /**\n * Array of mention suggestions used to populate the suggestion list\n */\n suggestions: Mention[];\n /**\n * Index of the currently focused suggestion, if any\n */\n activeSuggestionIndex?: number;\n /**\n * Optional string used as mention popover's title.\n * @defaultValue `Suggestions`\n */\n title?: string;\n /**\n * Element to anchor the popover to.\n */\n target: React.RefObject<Element>;\n /**\n * When rendering the popover, where to position it relative to the target.\n */\n targetPositionOffset?: {\n top: number;\n left: number;\n };\n /**\n * Where to display the suggestions relative to the target.\n * @defaultValue `above`\n */\n location?: 'above' | 'below';\n /**\n * Callback called when a mention suggestion is selected.\n */\n onSuggestionSelected: (suggestion: Mention) => void;\n /**\n * Callback to invoke when the popover is dismissed\n */\n onDismiss?: () => void;\n /**\n * Optional callback to render an item of the mention suggestions list.\n */\n onRenderSuggestionItem?: (suggestion: Mention, onSuggestionSelected: (suggestion: Mention) => void, isActive: boolean) => JSX.Element;\n}\n\n/**\n * Options to lookup suggestions in the mention scenario.\n *\n * @beta\n */\nexport interface MentionLookupOptions {\n /**\n * Optional string to set trigger keyword for mention a specific participant.\n *\n * @defaultValue `@`\n */\n trigger?: string;\n /**\n * Optional callback to fetch a list of mention suggestions base on the query.\n */\n onQueryUpdated: (query: string) => Promise<Mention[]>;\n /**\n * Optional callback to render an item of the mention suggestions list.\n */\n onRenderSuggestionItem?: (suggestion: Mention, onSuggestionSelected: (suggestion: Mention) => void, isActive: boolean) => JSX.Element;\n}\n\n/**\n * Options to display suggestions in the mention scenario.\n *\n * @beta\n */\nexport interface MentionDisplayOptions {\n /**\n * Optional callback for customizing the mention renderer in a message thread.\n */\n onRenderMention?: (mention: Mention, defaultOnRender: (mention: Mention) => JSX.Element) => JSX.Element;\n}\n\n/**\n * Options to lookup suggestions and display mentions in the mention scenario.\n *\n * @beta\n */\nexport type MentionOptions = {\n lookupOptions?: MentionLookupOptions;\n displayOptions?: MentionDisplayOptions;\n};\n\n/**\n * Mention's state, as reflected in the UI.\n *\n * @beta\n */\nexport interface Mention {\n /** ID of a mention */\n id: string;\n /** Display text of a mention */\n displayText: string;\n /** Optional React element to render an item icon of a mention suggestion */\n icon?: JSX.Element;\n}\n\n/**\n * Strings of {@link _MentionPopover} that can be overridden.\n *\n * @beta\n */\nexport interface MentionPopoverStrings {\n /**\n * Header text for MentionPopover\n */\n mentionPopoverHeader: string;\n}\n\n/**\n * Component to render a pop-up of mention suggestions.\n *\n * @internal\n */\nexport const _MentionPopover = (props: _MentionPopoverProps): JSX.Element => {\n interface Position {\n left?: number;\n right?: number;\n top?: number;\n bottom?: number;\n maxWidth?: number;\n }\n const {\n suggestions,\n activeSuggestionIndex,\n title,\n target,\n targetPositionOffset,\n onRenderSuggestionItem,\n onSuggestionSelected,\n onDismiss,\n location\n } = props;\n const theme = useTheme();\n const ids = useIdentifiers();\n const localeStrings = useLocale().strings;\n const popoverRef = useRef() as React.MutableRefObject<HTMLDivElement>;\n const suggestionsListRef = useRef<HTMLDivElement>(null);\n const [position, setPosition] = useState<Position | undefined>();\n const [hoveredSuggestion, setHoveredSuggestion] = useState<Mention | undefined>(undefined);\n const suggestionListStyle = useSuggestionListStyle();\n const defaultStackStyles = useDefaultStackStyles();\n const dismissPopoverWhenClickingOutside = useCallback((e: MouseEvent) => {\n const target = e.target as HTMLElement;\n if (popoverRef.current && !popoverRef.current.contains(target)) {\n onDismiss && onDismiss();\n }\n }, [onDismiss]);\n useEffect(() => {\n if (suggestionsListRef.current && activeSuggestionIndex !== undefined && activeSuggestionIndex >= 0) {\n const selectedItem = suggestionsListRef.current.children[activeSuggestionIndex];\n if (selectedItem) {\n selectedItem.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest'\n });\n }\n }\n }, [activeSuggestionIndex]);\n useEffect(() => {\n window && window.addEventListener('click', dismissPopoverWhenClickingOutside);\n return () => {\n window && window.removeEventListener('click', dismissPopoverWhenClickingOutside);\n };\n }, [dismissPopoverWhenClickingOutside]);\n\n // Determine popover position\n useEffect(() => {\n const rect = target?.current?.getBoundingClientRect();\n const maxWidth = 200;\n const finalPosition: Position = {\n maxWidth\n };\n\n // Figure out whether it will fit horizontally\n const leftOffset = targetPositionOffset?.left ?? 0;\n if (leftOffset + maxWidth > (rect?.width ?? 0)) {\n finalPosition.right = (rect?.width ?? 0) - leftOffset;\n } else {\n finalPosition.left = leftOffset;\n }\n // Offset between cursor and mention popover\n const verticalOffset = 4;\n if (location === 'below') {\n finalPosition.top = (rect?.height ?? 0) + (targetPositionOffset?.top ?? 0) + verticalOffset;\n } else {\n // (location === 'above')\n finalPosition.bottom = (rect?.height ?? 0) - (targetPositionOffset?.top ?? 0) + verticalOffset;\n }\n setPosition(finalPosition);\n }, [location, target, targetPositionOffset]);\n const handleOnKeyDown = useCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n switch (e.key) {\n case 'Escape':\n onDismiss && onDismiss();\n break;\n default:\n break;\n }\n }, [onDismiss]);\n const personaRenderer = useCallback((displayName: string): JSX.Element => {\n const avatarOptions = {\n text: displayName.trim(),\n size: PersonaSize.size24,\n initialsColor: theme.palette.neutralLight,\n initialsTextColor: theme.palette.neutralSecondary,\n showOverflowTooltip: false,\n showUnknownPersonaCoin: false\n };\n return <Persona {...avatarOptions} />;\n }, [theme]);\n const defaultOnRenderSuggestionItem = useCallback((suggestion: Mention, onSuggestionSelected: (suggestion: Mention) => void, active: boolean): JSX.Element => {\n return <div data-is-focusable={true} data-ui-id={ids.mentionSuggestionItem} key={suggestion.id} onClick={() => onSuggestionSelected(suggestion)} onMouseEnter={() => setHoveredSuggestion(suggestion)} onMouseLeave={() => setHoveredSuggestion(undefined)} onKeyDown={e => {\n handleOnKeyDown(e);\n }} className={suggestionItemWrapperStyle(theme)}>\n <Stack horizontal className={suggestionItemStackStyle(theme, hoveredSuggestion?.id === suggestion.id, active)}>\n {personaRenderer(suggestion.displayText)}\n </Stack>\n </div>;\n }, [handleOnKeyDown, theme, ids, hoveredSuggestion, personaRenderer]);\n const getHeaderTitle = useCallback((): string => {\n if (title) {\n return title;\n }\n return localeStrings.mentionPopover.mentionPopoverHeader;\n return '';\n }, [localeStrings, title]);\n return <div ref={popoverRef}>\n {position && <Stack data-testid={'mention-suggestion-list-container'} className={mergeStyles({\n maxHeight: 212,\n maxWidth: position.maxWidth\n }, mentionPopoverContainerStyle(theme), {\n ...position,\n position: 'absolute'\n })}>\n <Stack.Item styles={headerStyleThemed(theme)} aria-label={title}>\n {getHeaderTitle()}\n </Stack.Item>\n {/* FluentUI v9 approach is used here instead of Stack because Stack doesn't have ref prop */}\n <div className={mergeClasses(defaultStackStyles.root, suggestionListStyle.root)} data-ui-id={ids.mentionSuggestionList} ref={suggestionsListRef}>\n {suggestions.map((suggestion, index) => {\n const active = index === activeSuggestionIndex;\n return onRenderSuggestionItem ? onRenderSuggestionItem(suggestion, onSuggestionSelected, active) : defaultOnRenderSuggestionItem(suggestion, onSuggestionSelected, active);\n })}\n </div>\n </Stack>}\n </div>;\n};"]}
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
import { ContextMenuPluginBase } from 'roosterjs-content-model-plugins';
|
2
|
-
import type { IContextualMenuItem } from '@fluentui/react/';
|
3
|
-
/**
|
4
|
-
* Represents a plugin that adds a context menu to the rich text editor.
|
5
|
-
*/
|
6
|
-
export declare class ContextMenuPlugin extends ContextMenuPluginBase<IContextualMenuItem> {
|
7
|
-
constructor(onRender: (container: HTMLElement, items: IContextualMenuItem[], onDismiss: () => void) => void, onDismiss: () => void);
|
8
|
-
}
|
9
|
-
//# sourceMappingURL=ContextMenuPlugin.d.ts.map
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import { ContextMenuPluginBase } from 'roosterjs-content-model-plugins';
|
4
|
-
/**
|
5
|
-
* Represents a plugin that adds a context menu to the rich text editor.
|
6
|
-
*/
|
7
|
-
export class ContextMenuPlugin extends ContextMenuPluginBase {
|
8
|
-
constructor(onRender, onDismiss) {
|
9
|
-
super({
|
10
|
-
/**
|
11
|
-
* Renders the context menu in the specified container with the provided items.
|
12
|
-
* @param container - The container element where the context menu should be rendered.
|
13
|
-
* @param items - The items to be displayed in the context menu.
|
14
|
-
* @param onDismiss - Callback function to be called when the context menu is dismissed. It will call `dismiss` method.
|
15
|
-
*/
|
16
|
-
render: (container, items, onDismissCallback) => {
|
17
|
-
const filteredItems = items.filter((item) => item !== null);
|
18
|
-
onRender(container, filteredItems, onDismissCallback);
|
19
|
-
},
|
20
|
-
/**
|
21
|
-
* Dismisses the context menu.
|
22
|
-
*/
|
23
|
-
dismiss: () => {
|
24
|
-
onDismiss();
|
25
|
-
}
|
26
|
-
});
|
27
|
-
}
|
28
|
-
}
|
29
|
-
//# sourceMappingURL=ContextMenuPlugin.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ContextMenuPlugin.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAGxE;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,qBAA0C;IAC/E,YAAY,QAA+F,EAAE,SAAqB;QAChI,KAAK,CAAC;YACJ;;;;;eAKG;YACH,MAAM,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE;gBAC9C,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAA+B,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;gBACzF,QAAQ,CAAC,SAAS,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;YACxD,CAAC;YACD;;eAEG;YACH,OAAO,EAAE,GAAG,EAAE;gBACZ,SAAS,EAAE,CAAC;YACd,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ContextMenuPluginBase } from 'roosterjs-content-model-plugins';\nimport type { IContextualMenuItem } from '@fluentui/react/';\n\n/**\n * Represents a plugin that adds a context menu to the rich text editor.\n */\nexport class ContextMenuPlugin extends ContextMenuPluginBase<IContextualMenuItem> {\n constructor(onRender: (container: HTMLElement, items: IContextualMenuItem[], onDismiss: () => void) => void, onDismiss: () => void) {\n super({\n /**\n * Renders the context menu in the specified container with the provided items.\n * @param container - The container element where the context menu should be rendered.\n * @param items - The items to be displayed in the context menu.\n * @param onDismiss - Callback function to be called when the context menu is dismissed. It will call `dismiss` method.\n */\n render: (container, items, onDismissCallback) => {\n const filteredItems = items.filter((item): item is IContextualMenuItem => item !== null);\n onRender(container, filteredItems, onDismissCallback);\n },\n /**\n * Dismisses the context menu.\n */\n dismiss: () => {\n onDismiss();\n }\n });\n }\n}"]}
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
import type { PluginEvent, EditorPlugin, IEditor } from 'roosterjs-content-model-types';
|
2
|
-
/**
|
3
|
-
* CopyPastePlugin is a plugin for handling copy and paste events in the editor.
|
4
|
-
*/
|
5
|
-
export default class CopyPastePlugin implements EditorPlugin {
|
6
|
-
private editor;
|
7
|
-
onPaste?: (event: {
|
8
|
-
content: DocumentFragment;
|
9
|
-
}) => void;
|
10
|
-
onInsertInlineImage?: (imageAttributes: Record<string, string>) => void;
|
11
|
-
private imageBase64DataMap;
|
12
|
-
getName(): string;
|
13
|
-
initialize(editor: IEditor): void;
|
14
|
-
dispose(): void;
|
15
|
-
private handleInlineImage;
|
16
|
-
onPluginEvent(event: PluginEvent): void;
|
17
|
-
}
|
18
|
-
/**
|
19
|
-
* @internal
|
20
|
-
* Exported only for unit testing
|
21
|
-
*/
|
22
|
-
export declare const handleBeforePasteEvent: (event: PluginEvent, onPaste?: (event: {
|
23
|
-
content: DocumentFragment;
|
24
|
-
}) => void) => void;
|
25
|
-
/**
|
26
|
-
* Update the scroll position of the editor after pasting content to ensure the content is visible.
|
27
|
-
* @param event - The plugin event.
|
28
|
-
*/
|
29
|
-
export declare const scrollToBottomAfterContentPaste: (event: PluginEvent) => void;
|
30
|
-
//# sourceMappingURL=CopyPastePlugin.d.ts.map
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js
DELETED
@@ -1,98 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import { scrollToBottomRichTextEditor } from '../../utils/RichTextEditorUtils';
|
11
|
-
import { ContentChangedEventSource, PluginEventType } from '../../utils/RichTextEditorUtils';
|
12
|
-
import { getInlineImageAttributes } from '../../utils/RichTextEditorUtils';
|
13
|
-
import { _base64ToBlob, removeImageTags, _IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY } from "../../../../../acs-ui-common/src";
|
14
|
-
import { v1 as generateGUID } from 'uuid';
|
15
|
-
/**
|
16
|
-
* CopyPastePlugin is a plugin for handling copy and paste events in the editor.
|
17
|
-
*/
|
18
|
-
export default class CopyPastePlugin {
|
19
|
-
constructor() {
|
20
|
-
this.editor = null;
|
21
|
-
this.imageBase64DataMap = {};
|
22
|
-
this.handleInlineImage = (event) => {
|
23
|
-
if (event.eventType === PluginEventType.BeforePaste && event.pasteType === 'normal' && this.onInsertInlineImage) {
|
24
|
-
event.fragment.querySelectorAll('img').forEach(image => {
|
25
|
-
// Assign a unique id to the image element so Contosos can identify the image element.
|
26
|
-
// We also use it internally such as in getRemovedInlineImages to compare images in the content with previous images
|
27
|
-
image.id = generateGUID();
|
28
|
-
const clipboardImage = event.clipboardData.image;
|
29
|
-
const fileName = (clipboardImage === null || clipboardImage === void 0 ? void 0 : clipboardImage.name) || (clipboardImage === null || clipboardImage === void 0 ? void 0 : clipboardImage.type.replace('/', '.')) || image.getAttribute(_IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY) || '';
|
30
|
-
// If the image src is an external url, call the onInsertInlineImage callback with the url.
|
31
|
-
let imageUrl = image.src;
|
32
|
-
if (image.src.startsWith('data:image/')) {
|
33
|
-
this.imageBase64DataMap[image.id] = image.src;
|
34
|
-
const blobImage = _base64ToBlob(image.src);
|
35
|
-
imageUrl = URL.createObjectURL(blobImage);
|
36
|
-
}
|
37
|
-
image.src = imageUrl;
|
38
|
-
image.alt = image.alt || 'image';
|
39
|
-
image.dataset.imageFileName = fileName;
|
40
|
-
const imageAttributes = getInlineImageAttributes(image);
|
41
|
-
this.onInsertInlineImage && this.onInsertInlineImage(imageAttributes);
|
42
|
-
});
|
43
|
-
}
|
44
|
-
};
|
45
|
-
}
|
46
|
-
getName() {
|
47
|
-
return 'CopyPastePlugin';
|
48
|
-
}
|
49
|
-
initialize(editor) {
|
50
|
-
this.editor = editor;
|
51
|
-
}
|
52
|
-
dispose() { }
|
53
|
-
onPluginEvent(event) {
|
54
|
-
if (event.eventType === PluginEventType.BeforeCutCopy) {
|
55
|
-
event.clonedRoot.querySelectorAll('img').forEach((image) => __awaiter(this, void 0, void 0, function* () {
|
56
|
-
if (image.src.startsWith('blob:')) {
|
57
|
-
const base64Data = this.imageBase64DataMap[image.id];
|
58
|
-
image.src = base64Data || image.src;
|
59
|
-
}
|
60
|
-
}));
|
61
|
-
} // If onInsertInlineImage is not provided, we should remove the image tags before calling the onPaste callback
|
62
|
-
if (event.eventType === PluginEventType.BeforePaste && event.pasteType === 'normal' && !this.onInsertInlineImage) {
|
63
|
-
removeImageTags({
|
64
|
-
content: event.fragment
|
65
|
-
});
|
66
|
-
}
|
67
|
-
handleBeforePasteEvent(event, this.onPaste); // We should handle the onInsertInlineImage after the onPaste callback in case Contosos want to modify the image tags, especially the src attribute.
|
68
|
-
if (this.onInsertInlineImage) {
|
69
|
-
this.handleInlineImage(event);
|
70
|
-
}
|
71
|
-
if (this.editor !== null && !this.editor.isDisposed()) {
|
72
|
-
// scroll the editor to the correct position after pasting content
|
73
|
-
scrollToBottomAfterContentPaste(event);
|
74
|
-
}
|
75
|
-
}
|
76
|
-
}
|
77
|
-
/**
|
78
|
-
* @internal
|
79
|
-
* Exported only for unit testing
|
80
|
-
*/
|
81
|
-
export const handleBeforePasteEvent = (event, onPaste) => {
|
82
|
-
if (event.eventType === PluginEventType.BeforePaste && event.pasteType === 'normal') {
|
83
|
-
onPaste === null || onPaste === void 0 ? void 0 : onPaste({
|
84
|
-
content: event.fragment
|
85
|
-
});
|
86
|
-
return;
|
87
|
-
}
|
88
|
-
};
|
89
|
-
/**
|
90
|
-
* Update the scroll position of the editor after pasting content to ensure the content is visible.
|
91
|
-
* @param event - The plugin event.
|
92
|
-
*/
|
93
|
-
export const scrollToBottomAfterContentPaste = (event) => {
|
94
|
-
if (event.eventType === PluginEventType.ContentChanged && event.source === ContentChangedEventSource.Paste) {
|
95
|
-
scrollToBottomRichTextEditor();
|
96
|
-
}
|
97
|
-
};
|
98
|
-
//# sourceMappingURL=CopyPastePlugin.js.map
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CopyPastePlugin.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.tsx"],"names":[],"mapp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Event, EditorPlugin, IEditor } from 'roosterjs-content-model-types';\nimport { scrollToBottomRichTextEditor } from '../../utils/RichTextEditorUtils';\nimport { ContentChangedEventSource, PluginEventType } from '../../utils/RichTextEditorUtils';\nimport { getInlineImageAttributes } from '../../utils/RichTextEditorUtils';\nimport { _base64ToBlob, removeImageTags, _IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY } from '@internal/acs-ui-common';\nimport { v1 as generateGUID } from 'uuid';\n\n/**\n * CopyPastePlugin is a plugin for handling copy and paste events in the editor.\n */\nexport default class CopyPastePlugin implements EditorPlugin {\n private editor: IEditor | null = null;\n // don't set value in constructor to be able to update it without plugin recreation\n onPaste?: (event: {\n content: DocumentFragment;\n }) => void;\n onInsertInlineImage?: (imageAttributes: Record<string, string>) => void;\n private imageBase64DataMap: Record<string, string> = {};\n getName(): string {\n return 'CopyPastePlugin';\n }\n initialize(editor: IEditor): void {\n this.editor = editor;\n }\n dispose(): void {}\n private handleInlineImage = (event: PluginEvent): void => {\n if (event.eventType === PluginEventType.BeforePaste && event.pasteType === 'normal' && this.onInsertInlineImage) {\n event.fragment.querySelectorAll('img').forEach(image => {\n // Assign a unique id to the image element so Contosos can identify the image element.\n // We also use it internally such as in getRemovedInlineImages to compare images in the content with previous images\n image.id = generateGUID();\n const clipboardImage = event.clipboardData.image;\n const fileName = clipboardImage?.name || clipboardImage?.type.replace('/', '.') || image.getAttribute(_IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY) || '';\n // If the image src is an external url, call the onInsertInlineImage callback with the url.\n let imageUrl = image.src;\n if (image.src.startsWith('data:image/')) {\n this.imageBase64DataMap[image.id] = image.src;\n const blobImage = _base64ToBlob(image.src);\n imageUrl = URL.createObjectURL(blobImage);\n }\n image.src = imageUrl;\n image.alt = image.alt || 'image';\n image.dataset.imageFileName = fileName;\n const imageAttributes = getInlineImageAttributes(image);\n this.onInsertInlineImage && this.onInsertInlineImage(imageAttributes);\n });\n }\n };\n onPluginEvent(event: PluginEvent): void {\n if (event.eventType === PluginEventType.BeforeCutCopy) {\n event.clonedRoot.querySelectorAll('img').forEach(async image => {\n if (image.src.startsWith('blob:')) {\n const base64Data = this.imageBase64DataMap[image.id];\n image.src = base64Data || image.src;\n }\n });\n } // If onInsertInlineImage is not provided, we should remove the image tags before calling the onPaste callback\n if (event.eventType === PluginEventType.BeforePaste && event.pasteType === 'normal' && !this.onInsertInlineImage) {\n removeImageTags({\n content: event.fragment\n });\n }\n handleBeforePasteEvent(event, this.onPaste); // We should handle the onInsertInlineImage after the onPaste callback in case Contosos want to modify the image tags, especially the src attribute.\n if (this.onInsertInlineImage) {\n this.handleInlineImage(event);\n }\n if (this.editor !== null && !this.editor.isDisposed()) {\n // scroll the editor to the correct position after pasting content\n scrollToBottomAfterContentPaste(event);\n }\n }\n}\n\n/**\n * @internal\n * Exported only for unit testing\n */\nexport const handleBeforePasteEvent = (event: PluginEvent, onPaste?: (event: {\n content: DocumentFragment;\n}) => void): void => {\n if (event.eventType === PluginEventType.BeforePaste && event.pasteType === 'normal') {\n onPaste?.({\n content: event.fragment\n });\n return;\n }\n};\n\n/**\n * Update the scroll position of the editor after pasting content to ensure the content is visible.\n * @param event - The plugin event.\n */\nexport const scrollToBottomAfterContentPaste = (event: PluginEvent): void => {\n if (event.eventType === PluginEventType.ContentChanged && event.source === ContentChangedEventSource.Paste) {\n scrollToBottomRichTextEditor();\n }\n};"]}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import type { PluginEvent, EditorPlugin } from 'roosterjs-content-model-types';
|
2
|
-
/**
|
3
|
-
* KeyboardInputPlugin is a plugin for handling keyboard events in the editor.
|
4
|
-
*/
|
5
|
-
export declare class KeyboardInputPlugin implements EditorPlugin {
|
6
|
-
onKeyDown?: ((event: KeyboardEvent) => void) | null;
|
7
|
-
getName(): string;
|
8
|
-
initialize(): void;
|
9
|
-
dispose(): void;
|
10
|
-
onPluginEvent(event: PluginEvent): void;
|
11
|
-
}
|
12
|
-
//# sourceMappingURL=KeyboardInputPlugin.d.ts.map
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import { PluginEventType } from '../../utils/RichTextEditorUtils';
|
4
|
-
/**
|
5
|
-
* KeyboardInputPlugin is a plugin for handling keyboard events in the editor.
|
6
|
-
*/
|
7
|
-
export class KeyboardInputPlugin {
|
8
|
-
constructor() {
|
9
|
-
// don't set callback in constructor to be able to update callback without plugin recreation
|
10
|
-
this.onKeyDown = null;
|
11
|
-
}
|
12
|
-
getName() {
|
13
|
-
return 'KeyboardInputPlugin';
|
14
|
-
}
|
15
|
-
initialize() { }
|
16
|
-
dispose() { }
|
17
|
-
onPluginEvent(event) {
|
18
|
-
if (this.onKeyDown && event.eventType === PluginEventType.KeyDown && event.rawEvent instanceof KeyboardEvent) {
|
19
|
-
this.onKeyDown(event.rawEvent);
|
20
|
-
}
|
21
|
-
}
|
22
|
-
}
|
23
|
-
//# sourceMappingURL=KeyboardInputPlugin.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"KeyboardInputPlugin.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAAhC;QACE,4FAA4F;QAC5F,cAAS,GAA6C,IAAI,CAAC;IAW7D,CAAC;IAVC,OAAO;QACL,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACD,UAAU,KAAU,CAAC;IACrB,OAAO,KAAU,CAAC;IAClB,aAAa,CAAC,KAAkB;QAC9B,IAAI,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,KAAK,eAAe,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ,YAAY,aAAa,EAAE,CAAC;YAC7G,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { PluginEvent, EditorPlugin } from 'roosterjs-content-model-types';\nimport { PluginEventType } from '../../utils/RichTextEditorUtils';\n\n/**\n * KeyboardInputPlugin is a plugin for handling keyboard events in the editor.\n */\nexport class KeyboardInputPlugin implements EditorPlugin {\n // don't set callback in constructor to be able to update callback without plugin recreation\n onKeyDown?: ((event: KeyboardEvent) => void) | null = null;\n getName(): string {\n return 'KeyboardInputPlugin';\n }\n initialize(): void {}\n dispose(): void {}\n onPluginEvent(event: PluginEvent): void {\n if (this.onKeyDown && event.eventType === PluginEventType.KeyDown && event.rawEvent instanceof KeyboardEvent) {\n this.onKeyDown(event.rawEvent);\n }\n }\n}"]}
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
import { WatermarkPlugin } from 'roosterjs-content-model-plugins';
|
2
|
-
import type { IEditor } from 'roosterjs-content-model-types';
|
3
|
-
/**
|
4
|
-
* PlaceholderPlugin is a plugin for displaying placeholder and handle localization for it in the editor.
|
5
|
-
*/
|
6
|
-
export declare class PlaceholderPlugin extends WatermarkPlugin {
|
7
|
-
private isPlaceholderShown;
|
8
|
-
private editorValue;
|
9
|
-
updatePlaceholder(placeholder: string): void;
|
10
|
-
initialize(editor: IEditor): void;
|
11
|
-
dispose(): void;
|
12
|
-
protected show(editor: IEditor): void;
|
13
|
-
protected hide(editor: IEditor): void;
|
14
|
-
}
|
15
|
-
//# sourceMappingURL=PlaceholderPlugin.d.ts.map
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import { WatermarkPlugin } from 'roosterjs-content-model-plugins';
|
4
|
-
/**
|
5
|
-
* PlaceholderPlugin is a plugin for displaying placeholder and handle localization for it in the editor.
|
6
|
-
*/
|
7
|
-
export class PlaceholderPlugin extends WatermarkPlugin {
|
8
|
-
constructor() {
|
9
|
-
super(...arguments);
|
10
|
-
this.isPlaceholderShown = false;
|
11
|
-
this.editorValue = null;
|
12
|
-
}
|
13
|
-
updatePlaceholder(placeholder) {
|
14
|
-
this.watermark = placeholder;
|
15
|
-
// hide and show the placeholder to show the latest one
|
16
|
-
// this needs to be done only if the placeholder is currently shown
|
17
|
-
if (this.editorValue && this.isPlaceholderShown) {
|
18
|
-
this.hide(this.editorValue);
|
19
|
-
this.show(this.editorValue);
|
20
|
-
}
|
21
|
-
}
|
22
|
-
initialize(editor) {
|
23
|
-
this.editorValue = editor;
|
24
|
-
super.initialize(editor);
|
25
|
-
// Hide/show the placeholder as workaround for the placeholder not hiding in some cases
|
26
|
-
this.hide(this.editorValue);
|
27
|
-
this.show(this.editorValue);
|
28
|
-
}
|
29
|
-
dispose() {
|
30
|
-
this.editorValue = null;
|
31
|
-
super.dispose();
|
32
|
-
}
|
33
|
-
show(editor) {
|
34
|
-
super.show(editor);
|
35
|
-
this.isPlaceholderShown = true;
|
36
|
-
}
|
37
|
-
hide(editor) {
|
38
|
-
super.hide(editor);
|
39
|
-
this.isPlaceholderShown = false;
|
40
|
-
}
|
41
|
-
}
|
42
|
-
//# sourceMappingURL=PlaceholderPlugin.js.map
|