@azure/communication-react 1.16.0-beta.1 → 1.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +170 -1980
- package/dist/dist-cjs/communication-react/index.js +32462 -160
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +1 -5
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +3 -11
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +0 -12
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -13
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +0 -4
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -10
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -14
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +0 -10
- package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -15
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -3
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -17
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +0 -5
- package/dist/dist-esm/calling-component-bindings/src/index.js +0 -6
- package/dist/dist-esm/calling-component-bindings/src/index.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 +12 -11
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +3 -4
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +2 -14
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +1 -20
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +0 -7
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +0 -12
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +2 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +5 -4
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +6 -6
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +5 -6
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +1 -15
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +1 -2
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -5
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +10 -61
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -12
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +18 -69
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +0 -46
- 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 -3
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +4 -29
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js +4 -0
- package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.d.ts +0 -17
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js +3 -61
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +0 -5
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +21 -21
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +0 -11
- package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +1 -25
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +2 -33
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +2 -2
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +0 -8
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.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 +1 -5
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +4 -13
- 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 -5
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +1 -84
- 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 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +1 -4
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +0 -1
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +0 -26
- package/dist/dist-esm/communication-react/src/index.js +0 -16
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/AttachmentDownloadCards.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/AttachmentDownloadCards.js +0 -9
- package/dist/dist-esm/react-components/src/components/AttachmentDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -12
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +2 -10
- 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 -16
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +30 -63
- 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 -17
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +4 -10
- 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 -26
- 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 -6
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +5 -27
- 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 +2 -18
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -22
- 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 +1 -27
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +3 -11
- 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 -17
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +5 -11
- 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 -32
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.js +6 -2
- package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ImageOverlay.js +1 -5
- package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/InputBoxButton.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/InputBoxButton.js +9 -8
- package/dist/dist-esm/react-components/src/components/InputBoxButton.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 -18
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +2 -46
- package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -30
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +2 -13
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +0 -3
- 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 +15 -21
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +27 -6
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.d.ts +0 -46
- package/dist/dist-esm/react-components/src/components/SendBox.js +18 -72
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -2
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -2
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -24
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -2
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js +2 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +3 -15
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +1 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/VideoTile.js +1 -7
- 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 -19
- package/dist/dist-esm/react-components/src/components/index.js +0 -15
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -3
- package/dist/dist-esm/react-components/src/components/styles/SendBox.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 -8
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -13
- 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 +3 -11
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -36
- 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 +14 -9
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +16 -14
- 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 -4
- 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/identifiers/IdentifierProvider.d.ts +0 -4
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -5
- 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 -60
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -29
- package/dist/dist-esm/react-components/src/theming/icons.js +1 -137
- 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 -10
- package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -27
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/OnRender.d.ts +0 -8
- package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +0 -6
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js +0 -2
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +7 -72
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +7 -30
- 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 -104
- 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 +7 -71
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +20 -214
- 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 +6 -91
- 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/createHandlers.d.ts +1 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +1 -7
- 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 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +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 +16 -25
- 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 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -38
- 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/CapabilitiesChangedNotificationBar.d.ts +13 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.js +9 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.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 -27
- 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 -20
- 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 -27
- 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 +5 -19
- 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/SidePane/usePeoplePane.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +3 -3
- 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/hooks/useAdaptedSelector.js +2 -6
- 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 +7 -30
- 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 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +1 -0
- 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 +7 -80
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -11
- 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.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.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 +7 -90
- 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 +1 -61
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +7 -27
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/useUnreadMessagesTracker.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/useUnreadMessagesTracker.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/useUnreadMessagesTracker.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +10 -30
- 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 +52 -38
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +179 -174
- 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 +12 -57
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -9
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -32
- 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 +0 -9
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -38
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +2 -22
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +4 -9
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -20
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -6
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +6 -42
- 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 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.d.ts +0 -29
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.js +1 -187
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +1 -15
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -92
- 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 -18
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +1 -8
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +1 -7
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -3
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -5
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +23 -20
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +0 -5
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +2 -3
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CalloutWithIcon.d.ts +10 -0
- package/dist/dist-esm/react-composites/src/composites/common/CalloutWithIcon.js +39 -0
- package/dist/dist-esm/react-composites/src/composites/common/CalloutWithIcon.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +10 -13
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +0 -26
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +1 -25
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -3
- 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 +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +5 -16
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -40
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -12
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +4 -20
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +8 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +4 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +4 -0
- package/package.json +3 -3
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-N5ydNkHZ.js +0 -115
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-N5ydNkHZ.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-BaI-AJud.js +0 -38969
- package/dist/dist-cjs/communication-react/index-BaI-AJud.js.map +0 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +0 -45
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +0 -91
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.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 -36
- package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +0 -19
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +0 -91
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +0 -23
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -49
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.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 -19
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -100
- 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 -43
- 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 -75
- 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 -68
- 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/ErrorBoundary.d.ts +0 -20
- package/dist/dist-esm/react-components/src/components/ErrorBoundary.js +0 -33
- package/dist/dist-esm/react-components/src/components/ErrorBoundary.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +0 -49
- package/dist/dist-esm/react-components/src/components/HoldButton.js +0 -25
- package/dist/dist-esm/react-components/src/components/HoldButton.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 -123
- package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.js +0 -75
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js +0 -55
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTablePane.d.ts +0 -16
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTablePane.js +0 -59
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTablePane.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.d.ts +0 -8
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.js +0 -73
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.d.ts +0 -9
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.js +0 -56
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -23
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -78
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -57
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -133
- 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 -34
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -64
- 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 -138
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -186
- 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 -73
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -34
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -42
- 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 -311
- 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 -92
- 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 -67
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorStringsUtils.d.ts +0 -15
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorStringsUtils.js +0 -39
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorStringsUtils.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -22
- package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -29
- 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/CallReadinessModal.d.ts +0 -48
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -218
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +0 -12
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +0 -93
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +0 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +0 -26
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +0 -24
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +0 -28
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.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 -54
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +0 -32
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +0 -81
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.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/hooks/useSelector.d.ts +0 -6
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +0 -11
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/attachmentUploadsSelector.d.ts +0 -29
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/attachmentUploadsSelector.js +0 -14
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/attachmentUploadsSelector.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -12
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -15
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +0 -22
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +0 -107
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +0 -17
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +0 -32
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +0 -22
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +0 -74
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +0 -15
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +0 -61
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +0 -1
@@ -1,133 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
4
|
-
import { ContentEdit, Watermark } from 'roosterjs-editor-plugins';
|
5
|
-
import { Editor } from 'roosterjs-editor-core';
|
6
|
-
import { CompatibleContentPosition, CompatibleGetContentMode, CompatiblePositionType } from 'roosterjs-editor-types-compatible';
|
7
|
-
import { Rooster, createUpdateContentPlugin, UpdateMode, createRibbonPlugin, Ribbon, createContextMenuPlugin } from 'roosterjs-react';
|
8
|
-
import { ribbonButtonStyle, ribbonOverflowButtonStyle, ribbonStyle, richTextEditorWrapperStyle, richTextEditorStyle } from '../styles/RichTextEditor.styles';
|
9
|
-
import { useTheme } from '../../theming';
|
10
|
-
import { ribbonButtons } from './Buttons/RichTextRibbonButtons';
|
11
|
-
import { isDarkThemed } from '../../theming/themeUtils';
|
12
|
-
import { ribbonButtonsStrings } from '../utils/RichTextEditorStringsUtils';
|
13
|
-
import { createTableEditMenuProvider } from './Buttons/Table/RichTextTableContextMenu';
|
14
|
-
import CopyPastePlugin from './Plugins/CopyPastePlugin';
|
15
|
-
/**
|
16
|
-
* A component to wrap RoosterJS Rich Text Editor.
|
17
|
-
*
|
18
|
-
* @beta
|
19
|
-
*/
|
20
|
-
export const RichTextEditor = React.forwardRef((props, ref) => {
|
21
|
-
const { initialContent, onChange, placeholderText, strings, showRichTextEditorFormatting, content, autoFocus } = props;
|
22
|
-
const editor = useRef(null);
|
23
|
-
const contentValue = useRef(content);
|
24
|
-
const theme = useTheme();
|
25
|
-
useImperativeHandle(ref, () => {
|
26
|
-
return {
|
27
|
-
focus() {
|
28
|
-
if (editor.current) {
|
29
|
-
editor.current.focus();
|
30
|
-
}
|
31
|
-
},
|
32
|
-
setEmptyContent() {
|
33
|
-
if (editor.current) {
|
34
|
-
editor.current.setContent('');
|
35
|
-
}
|
36
|
-
},
|
37
|
-
getPlainContent() {
|
38
|
-
var _a;
|
39
|
-
return (_a = editor === null || editor === void 0 ? void 0 : editor.current) === null || _a === void 0 ? void 0 : _a.getContent(CompatibleGetContentMode.PlainTextFast);
|
40
|
-
}
|
41
|
-
};
|
42
|
-
}, []);
|
43
|
-
const ribbonPlugin = React.useMemo(() => {
|
44
|
-
return createRibbonPlugin();
|
45
|
-
}, []);
|
46
|
-
const editorCreator = useCallback((div, options) => {
|
47
|
-
const editorValue = new Editor(div, options);
|
48
|
-
// this is to fix issue when editor is created or re-rendered and has existing text
|
49
|
-
// Content model package has a correct behavior and this fix can be deleted
|
50
|
-
if (contentValue.current !== undefined && contentValue.current.length > 0) {
|
51
|
-
// in case if initialContent is not empty, RoosterJS doesn't set caret position to the end.
|
52
|
-
focusAndUpdateContent(editorValue, contentValue.current);
|
53
|
-
}
|
54
|
-
else if (initialContent !== undefined && initialContent.length > 0) {
|
55
|
-
// changing layout in rich text send box cause the editor to be recreated
|
56
|
-
// to keep the content, we need to set messageContent to the current content
|
57
|
-
focusAndUpdateContent(editorValue, initialContent);
|
58
|
-
}
|
59
|
-
editor.current = editorValue;
|
60
|
-
return editorValue;
|
61
|
-
},
|
62
|
-
// trigger force editor reset when strings are changed to update context menu strings
|
63
|
-
// see RosterJS documentation for 'editorCreator' for more details
|
64
|
-
// the editorCreator callback shouldn't be updated when the initialContent is changed
|
65
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
66
|
-
[strings]);
|
67
|
-
const placeholderPlugin = React.useMemo(() => {
|
68
|
-
return new Watermark('');
|
69
|
-
}, []);
|
70
|
-
useEffect(() => {
|
71
|
-
if (placeholderText !== undefined) {
|
72
|
-
placeholderPlugin.updateWatermark(placeholderText);
|
73
|
-
}
|
74
|
-
}, [placeholderPlugin, placeholderText]);
|
75
|
-
const plugins = useMemo(() => {
|
76
|
-
// contextPlugin and tableEditMenuProvider allow to show insert/delete menu for the table
|
77
|
-
const contextPlugin = createContextMenuPlugin();
|
78
|
-
const tableEditMenuProvider = createTableEditMenuProvider(strings);
|
79
|
-
const contentEdit = new ContentEdit();
|
80
|
-
const updateContentPlugin = createUpdateContentPlugin(UpdateMode.OnContentChangedEvent | UpdateMode.OnUserInput, (content) => {
|
81
|
-
onChange && onChange(content);
|
82
|
-
});
|
83
|
-
const copyPastePlugin = new CopyPastePlugin();
|
84
|
-
return [contentEdit, placeholderPlugin, updateContentPlugin, ribbonPlugin, contextPlugin, tableEditMenuProvider, copyPastePlugin];
|
85
|
-
}, [onChange, placeholderPlugin, ribbonPlugin, strings]);
|
86
|
-
const ribbon = useMemo(() => {
|
87
|
-
const buttons = ribbonButtons(theme);
|
88
|
-
return React.createElement(Ribbon, { styles: ribbonStyle, buttons: buttons, plugin: ribbonPlugin, overflowButtonProps: {
|
89
|
-
styles: ribbonButtonStyle(theme),
|
90
|
-
menuProps: {
|
91
|
-
items: [],
|
92
|
-
// CommandBar will determine items rendered in overflow
|
93
|
-
isBeakVisible: false,
|
94
|
-
styles: ribbonOverflowButtonStyle(theme)
|
95
|
-
}
|
96
|
-
}, strings: ribbonButtonsStrings(strings), "data-testid": 'rich-text-editor-ribbon' });
|
97
|
-
}, [strings, ribbonPlugin, theme]);
|
98
|
-
const defaultFormat = useMemo(() => {
|
99
|
-
// without setting any styles, text input is not handled properly for tables (when insert or paste one in the editor)
|
100
|
-
// because of https://github.com/microsoft/roosterjs/blob/14dbb947e3ae94580109cbd05e48ceb05327c4dc/packages/roosterjs-editor-core/lib/corePlugins/TypeInContainerPlugin.ts#L75
|
101
|
-
// this issue is fixed for content model package
|
102
|
-
return {
|
103
|
-
backgroundColor: 'transparent'
|
104
|
-
};
|
105
|
-
}, []);
|
106
|
-
return React.createElement("div", { "data-testid": 'rich-text-editor-wrapper' },
|
107
|
-
showRichTextEditorFormatting && ribbon,
|
108
|
-
React.createElement("div", { className: richTextEditorWrapperStyle(theme, !showRichTextEditorFormatting) },
|
109
|
-
React.createElement(Rooster, { defaultFormat: defaultFormat, inDarkMode: isDarkThemed(theme), plugins: plugins, className: richTextEditorStyle(props.styles), editorCreator: editorCreator,
|
110
|
-
// TODO: confirm the color during inline images implementation
|
111
|
-
imageSelectionBorderColor: 'blue',
|
112
|
-
// doNotAdjustEditorColor is used to fix the default background color for Rooster component
|
113
|
-
doNotAdjustEditorColor: true, "data-testid": 'rooster-rich-text-editor',
|
114
|
-
// if we don't use 'allowKeyboardEventPropagation' only the enter key is caught
|
115
|
-
onKeyDown: props.onKeyDown, focusOnInit: autoFocus === 'sendBoxTextField' })));
|
116
|
-
});
|
117
|
-
const focusAndUpdateContent = (editor, content) => {
|
118
|
-
// setting focus before setting content, works for Chrome and Edge but not Safari
|
119
|
-
editor.setContent(content);
|
120
|
-
// this is a recommended way (by RoosterJS team) to set focus at the end of the text
|
121
|
-
// RoosterJS v9 has this issue fixed and this code can be removed
|
122
|
-
// CompatibleContentPosition.DomEnd shouldn't be used here as it set focus after the editor div
|
123
|
-
editor.insertContent('<span id="focus-position-span"></span>', {
|
124
|
-
position: CompatibleContentPosition.End
|
125
|
-
});
|
126
|
-
const elements = editor.queryElements('#focus-position-span');
|
127
|
-
if (elements.length > 0) {
|
128
|
-
const placeholder = editor.queryElements('#focus-position-span')[0];
|
129
|
-
editor.select(placeholder, CompatiblePositionType.Before);
|
130
|
-
placeholder.remove();
|
131
|
-
}
|
132
|
-
};
|
133
|
-
//# sourceMappingURL=RichTextEditor.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"RichTextEditor.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChI,OAAO,EAAE,OAAO,EAAE,yBAAyB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AACtI,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,WAAW,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC7J,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,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CAAC,KAAK,EAAE,CAAC,4BAA4B,CAAC;YAC9E,oBAAC,OAAO,IAAC,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,aAAa;gBACtK,8DAA8D;gBAC9D,yBAAyB,EAAE,MAAM;gBACjC,2FAA2F;gBAC3F,sBAAsB,EAAE,IAAI,iBAAe,0BAA0B;gBACrE,+EAA+E;gBAC/E,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,KAAK,kBAAkB,GAAI,CACvE,CACF,CAAC;AACX,CAAC,CAAC,CAAC;AACH,MAAM,qBAAqB,GAAG,CAAC,MAAc,EAAE,OAAe,EAAQ,EAAE;IACtE,iFAAiF;IACjF,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC3B,oFAAoF;IACpF,iEAAiE;IACjE,+FAA+F;IAC/F,MAAM,CAAC,aAAa,CAAC,wCAAwC,EAAE;QAC7D,QAAQ,EAAE,yBAAyB,CAAC,GAAG;KACxC,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAC9D,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC;QACpE,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;QAC1D,WAAW,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';\nimport { ContentEdit, Watermark } from 'roosterjs-editor-plugins';\nimport { Editor } from 'roosterjs-editor-core';\nimport type { DefaultFormat, EditorOptions, IEditor } from 'roosterjs-editor-types-compatible';\nimport { CompatibleContentPosition, CompatibleGetContentMode, CompatiblePositionType } from 'roosterjs-editor-types-compatible';\nimport { Rooster, createUpdateContentPlugin, UpdateMode, createRibbonPlugin, Ribbon, createContextMenuPlugin } from 'roosterjs-react';\nimport { ribbonButtonStyle, ribbonOverflowButtonStyle, ribbonStyle, richTextEditorWrapperStyle, richTextEditorStyle } from '../styles/RichTextEditor.styles';\nimport { useTheme } from '../../theming';\nimport { ribbonButtons } from './Buttons/RichTextRibbonButtons';\nimport { RichTextSendBoxStrings } from './RichTextSendBox';\nimport { isDarkThemed } from '../../theming/themeUtils';\nimport { ribbonButtonsStrings } from '../utils/RichTextEditorStringsUtils';\nimport { createTableEditMenuProvider } from './Buttons/Table/RichTextTableContextMenu';\nimport CopyPastePlugin from './Plugins/CopyPastePlugin';\n\n/**\n * Props for {@link RichTextEditor}.\n *\n * @private\n */\nexport interface RichTextEditorStyleProps {\n minHeight: string;\n maxHeight: string;\n}\n\n/**\n * Props for {@link RichTextEditor}.\n *\n * @private\n */\nexport interface RichTextEditorProps {\n // the initial content of editor that is set when editor is created (e.g. when editing a message)\n initialContent?: string;\n // the current content of the editor\n content?: string;\n onChange: (newValue?: string) => void;\n onKeyDown?: (ev: React.KeyboardEvent<HTMLElement>) => void;\n placeholderText?: string;\n strings: Partial<RichTextSendBoxStrings>;\n showRichTextEditorFormatting: boolean;\n styles: RichTextEditorStyleProps;\n autoFocus?: 'sendBoxTextField';\n}\n\n/**\n * Props for {@link RichTextEditor}.\n *\n * @beta\n */\n/**\n * Represents a reference to the RichTextEditor component.\n */\nexport interface RichTextEditorComponentRef {\n /**\n * Sets focus on the RichTextEditor component.\n */\n focus: () => void;\n\n /**\n * Sets the content of the RichTextEditor component to an empty string.\n */\n setEmptyContent: () => void;\n\n /**\n * Retrieves the plain text content of the RichTextEditor component.\n * @returns The plain text content of the RichTextEditor component, or undefined if the editor isn't available.\n */\n getPlainContent: () => string | undefined;\n}\n\n/**\n * A component to wrap RoosterJS Rich Text Editor.\n *\n * @beta\n */\nexport const RichTextEditor = React.forwardRef<RichTextEditorComponentRef, RichTextEditorProps>((props, ref) => {\n const {\n initialContent,\n onChange,\n placeholderText,\n strings,\n showRichTextEditorFormatting,\n content,\n autoFocus\n } = props;\n const editor = useRef<IEditor | null>(null);\n const contentValue = useRef<string | undefined>(content);\n const theme = useTheme();\n useImperativeHandle(ref, () => {\n return {\n focus() {\n if (editor.current) {\n editor.current.focus();\n }\n },\n setEmptyContent() {\n if (editor.current) {\n editor.current.setContent('');\n }\n },\n getPlainContent() {\n return editor?.current?.getContent(CompatibleGetContentMode.PlainTextFast);\n }\n };\n }, []);\n const ribbonPlugin = React.useMemo(() => {\n return createRibbonPlugin();\n }, []);\n const editorCreator = useCallback((div: HTMLDivElement, options: EditorOptions) => {\n const editorValue = new Editor(div, options);\n // this is to fix issue when editor is created or re-rendered and has existing text\n // Content model package has a correct behavior and this fix can be deleted\n if (contentValue.current !== undefined && contentValue.current.length > 0) {\n // in case if initialContent is not empty, RoosterJS doesn't set caret position to the end.\n focusAndUpdateContent(editorValue, contentValue.current);\n } else if (initialContent !== undefined && initialContent.length > 0) {\n // changing layout in rich text send box cause the editor to be recreated\n // to keep the content, we need to set messageContent to the current content\n focusAndUpdateContent(editorValue, initialContent);\n }\n editor.current = editorValue;\n return editorValue;\n },\n // trigger force editor reset when strings are changed to update context menu strings\n // see RosterJS documentation for 'editorCreator' for more details\n // the editorCreator callback shouldn't be updated when the initialContent is changed\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [strings]);\n const placeholderPlugin = React.useMemo(() => {\n return new Watermark('');\n }, []);\n useEffect(() => {\n if (placeholderText !== undefined) {\n placeholderPlugin.updateWatermark(placeholderText);\n }\n }, [placeholderPlugin, placeholderText]);\n const plugins = useMemo(() => {\n // contextPlugin and tableEditMenuProvider allow to show insert/delete menu for the table\n const contextPlugin = createContextMenuPlugin();\n const tableEditMenuProvider = createTableEditMenuProvider(strings);\n const contentEdit = new ContentEdit();\n const updateContentPlugin = createUpdateContentPlugin(UpdateMode.OnContentChangedEvent | UpdateMode.OnUserInput, (content: string) => {\n onChange && onChange(content);\n });\n const copyPastePlugin = new CopyPastePlugin();\n return [contentEdit, placeholderPlugin, updateContentPlugin, ribbonPlugin, contextPlugin, tableEditMenuProvider, copyPastePlugin];\n }, [onChange, placeholderPlugin, ribbonPlugin, strings]);\n const ribbon = useMemo(() => {\n const buttons = ribbonButtons(theme);\n return <Ribbon styles={ribbonStyle} buttons={buttons} plugin={ribbonPlugin} overflowButtonProps={{\n styles: ribbonButtonStyle(theme),\n menuProps: {\n items: [],\n // CommandBar will determine items rendered in overflow\n isBeakVisible: false,\n styles: ribbonOverflowButtonStyle(theme)\n }\n }} strings={ribbonButtonsStrings(strings)} data-testid={'rich-text-editor-ribbon'} />;\n }, [strings, ribbonPlugin, theme]);\n const defaultFormat: DefaultFormat = useMemo(() => {\n // without setting any styles, text input is not handled properly for tables (when insert or paste one in the editor)\n // because of https://github.com/microsoft/roosterjs/blob/14dbb947e3ae94580109cbd05e48ceb05327c4dc/packages/roosterjs-editor-core/lib/corePlugins/TypeInContainerPlugin.ts#L75\n // this issue is fixed for content model package\n return {\n backgroundColor: 'transparent'\n };\n }, []);\n return <div data-testid={'rich-text-editor-wrapper'}>\n {showRichTextEditorFormatting && ribbon}\n <div className={richTextEditorWrapperStyle(theme, !showRichTextEditorFormatting)}>\n <Rooster defaultFormat={defaultFormat} inDarkMode={isDarkThemed(theme)} plugins={plugins} className={richTextEditorStyle(props.styles)} editorCreator={editorCreator}\n // TODO: confirm the color during inline images implementation\n imageSelectionBorderColor={'blue'}\n // doNotAdjustEditorColor is used to fix the default background color for Rooster component\n doNotAdjustEditorColor={true} data-testid={'rooster-rich-text-editor'}\n // if we don't use 'allowKeyboardEventPropagation' only the enter key is caught\n onKeyDown={props.onKeyDown} focusOnInit={autoFocus === 'sendBoxTextField'} />\n </div>\n </div>;\n});\nconst focusAndUpdateContent = (editor: Editor, content: string): void => {\n // setting focus before setting content, works for Chrome and Edge but not Safari\n editor.setContent(content);\n // this is a recommended way (by RoosterJS team) to set focus at the end of the text\n // RoosterJS v9 has this issue fixed and this code can be removed\n // CompatibleContentPosition.DomEnd shouldn't be used here as it set focus after the editor div\n editor.insertContent('<span id=\"focus-position-span\"></span>', {\n position: CompatibleContentPosition.End\n });\n const elements = editor.queryElements('#focus-position-span');\n if (elements.length > 0) {\n const placeholder = editor.queryElements('#focus-position-span')[0];\n editor.select(placeholder, CompatiblePositionType.Before);\n placeholder.remove();\n }\n};"]}
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
import React, { ReactNode } from 'react';
|
2
|
-
import { BaseCustomStyles } from '../../types';
|
3
|
-
import { RichTextEditorComponentRef, RichTextEditorStyleProps } from './RichTextEditor';
|
4
|
-
import { RichTextSendBoxStrings } from './RichTextSendBox';
|
5
|
-
/**
|
6
|
-
* @private
|
7
|
-
*/
|
8
|
-
export interface RichTextInputBoxComponentStylesProps extends BaseCustomStyles {
|
9
|
-
}
|
10
|
-
/**
|
11
|
-
* @private
|
12
|
-
*/
|
13
|
-
export interface RichTextInputBoxComponentProps {
|
14
|
-
placeholderText?: string;
|
15
|
-
initialContent?: string;
|
16
|
-
content?: string;
|
17
|
-
onChange: (newValue?: string) => void;
|
18
|
-
onEnterKeyDown?: () => void;
|
19
|
-
editorComponentRef: React.RefObject<RichTextEditorComponentRef>;
|
20
|
-
strings: Partial<RichTextSendBoxStrings>;
|
21
|
-
disabled: boolean;
|
22
|
-
actionComponents: ReactNode;
|
23
|
-
onRenderAttachmentUploads?: () => JSX.Element;
|
24
|
-
hasAttachments?: boolean;
|
25
|
-
richTextEditorStyleProps: (isExpanded: boolean) => RichTextEditorStyleProps;
|
26
|
-
isHorizontalLayoutDisabled?: boolean;
|
27
|
-
autoFocus?: 'sendBoxTextField';
|
28
|
-
onTyping?: () => Promise<void>;
|
29
|
-
}
|
30
|
-
/**
|
31
|
-
* @private
|
32
|
-
*/
|
33
|
-
export declare const RichTextInputBoxComponent: (props: RichTextInputBoxComponentProps) => JSX.Element;
|
34
|
-
//# sourceMappingURL=RichTextInputBoxComponent.d.ts.map
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import React, { useCallback, useMemo, useState } from 'react';
|
4
|
-
import { RichTextEditor } from './RichTextEditor';
|
5
|
-
import { useTheme } from '../../theming';
|
6
|
-
import { Icon, Stack } from '@fluentui/react';
|
7
|
-
import { InputBoxButton } from '../InputBoxButton';
|
8
|
-
import { isEnterKeyEventFromCompositionSession } from '../utils';
|
9
|
-
import { richTextActionButtonsDividerStyle, richTextActionButtonsStackStyle, richTextActionButtonsStyle, richTextFormatButtonIconStyle } from '../styles/RichTextEditor.styles';
|
10
|
-
import { inputBoxContentStackStyle, inputBoxRichTextStackItemStyle, inputBoxRichTextStackStyle, richTextBorderBoxStyle } from '../styles/RichTextInputBoxComponent.styles';
|
11
|
-
/**
|
12
|
-
* @private
|
13
|
-
*/
|
14
|
-
export const RichTextInputBoxComponent = (props) => {
|
15
|
-
const { placeholderText, initialContent, onChange, onEnterKeyDown, editorComponentRef, disabled, strings, actionComponents,
|
16
|
-
/* @conditional-compile-remove(attachment-upload) */
|
17
|
-
onRenderAttachmentUploads,
|
18
|
-
/* @conditional-compile-remove(attachment-upload) */
|
19
|
-
hasAttachments, richTextEditorStyleProps, isHorizontalLayoutDisabled = false, content, autoFocus, onTyping } = props;
|
20
|
-
const theme = useTheme();
|
21
|
-
const [showRichTextEditorFormatting, setShowRichTextEditorFormatting] = useState(false);
|
22
|
-
const onRenderRichTextEditorIcon = useCallback((isHover) => React.createElement(Icon, { iconName: isHover || showRichTextEditorFormatting ? 'RichTextEditorButtonIconFilled' : 'RichTextEditorButtonIcon', className: richTextFormatButtonIconStyle(theme, !disabled && (isHover || showRichTextEditorFormatting)) }), [disabled, showRichTextEditorFormatting, theme]);
|
23
|
-
const actionButtons = useMemo(() => {
|
24
|
-
return React.createElement(Stack.Item, { align: "end", className: richTextActionButtonsStackStyle },
|
25
|
-
React.createElement(Stack, { horizontal: true },
|
26
|
-
React.createElement(InputBoxButton, { onRenderIcon: onRenderRichTextEditorIcon, onClick: e => {
|
27
|
-
var _a;
|
28
|
-
setShowRichTextEditorFormatting(!showRichTextEditorFormatting);
|
29
|
-
(_a = editorComponentRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
30
|
-
e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.
|
31
|
-
}, ariaLabel: strings.richTextFormatButtonTooltip, tooltipContent: strings.richTextFormatButtonTooltip, className: richTextActionButtonsStyle, "data-testId": 'rich-text-input-box-format-button' }),
|
32
|
-
React.createElement(Icon, { iconName: "RichTextDividerIcon", className: richTextActionButtonsDividerStyle(theme) }),
|
33
|
-
actionComponents));
|
34
|
-
}, [actionComponents, editorComponentRef, onRenderRichTextEditorIcon, showRichTextEditorFormatting, strings.richTextFormatButtonTooltip, theme]);
|
35
|
-
const richTextEditorStyle = useMemo(() => {
|
36
|
-
return richTextEditorStyleProps(showRichTextEditorFormatting);
|
37
|
-
}, [richTextEditorStyleProps, showRichTextEditorFormatting]);
|
38
|
-
const onKeyDown = useCallback((ev) => {
|
39
|
-
if (isEnterKeyEventFromCompositionSession(ev)) {
|
40
|
-
return;
|
41
|
-
}
|
42
|
-
if (ev.key === 'Enter' && ev.shiftKey === false && !showRichTextEditorFormatting) {
|
43
|
-
ev.preventDefault();
|
44
|
-
onEnterKeyDown && onEnterKeyDown();
|
45
|
-
}
|
46
|
-
else {
|
47
|
-
onTyping === null || onTyping === void 0 ? void 0 : onTyping();
|
48
|
-
}
|
49
|
-
}, [onEnterKeyDown, showRichTextEditorFormatting, onTyping]);
|
50
|
-
const useHorizontalLayout = useMemo(() => {
|
51
|
-
return !isHorizontalLayoutDisabled && !showRichTextEditorFormatting && /* @conditional-compile-remove(attachment-upload) */ !hasAttachments;
|
52
|
-
}, [isHorizontalLayoutDisabled, showRichTextEditorFormatting, /* @conditional-compile-remove(attachment-upload) */ hasAttachments]);
|
53
|
-
return React.createElement("div", { className: richTextBorderBoxStyle({
|
54
|
-
theme: theme,
|
55
|
-
disabled: !!disabled
|
56
|
-
}) },
|
57
|
-
React.createElement(Stack, { grow: true, horizontal: useHorizontalLayout, horizontalAlign: useHorizontalLayout ? 'end' : 'space-between', className: inputBoxContentStackStyle, wrap: useHorizontalLayout },
|
58
|
-
React.createElement(Stack, { grow: true, className: inputBoxRichTextStackStyle },
|
59
|
-
React.createElement(Stack.Item, { className: inputBoxRichTextStackItemStyle },
|
60
|
-
React.createElement(RichTextEditor, { content: content, initialContent: initialContent, placeholderText: placeholderText, onChange: onChange, onKeyDown: onKeyDown, ref: editorComponentRef, strings: strings, showRichTextEditorFormatting: showRichTextEditorFormatting, styles: richTextEditorStyle, autoFocus: autoFocus })), /* @conditional-compile-remove(attachment-upload) */
|
61
|
-
onRenderAttachmentUploads && onRenderAttachmentUploads()),
|
62
|
-
actionButtons));
|
63
|
-
};
|
64
|
-
//# sourceMappingURL=RichTextInputBoxComponent.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"RichTextInputBoxComponent.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAa,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAwD,MAAM,kBAAkB,CAAC;AAExG,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;A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ft Corporation.\n// Licensed under the MIT License.\n\nimport React, { ReactNode, useCallback, useMemo, useState } from 'react';\nimport { BaseCustomStyles } from '../../types';\nimport { RichTextEditor, RichTextEditorComponentRef, RichTextEditorStyleProps } from './RichTextEditor';\nimport { RichTextSendBoxStrings } from './RichTextSendBox';\nimport { useTheme } from '../../theming';\nimport { Icon, Stack } from '@fluentui/react';\nimport { InputBoxButton } from '../InputBoxButton';\nimport { isEnterKeyEventFromCompositionSession } from '../utils';\nimport { richTextActionButtonsDividerStyle, richTextActionButtonsStackStyle, richTextActionButtonsStyle, richTextFormatButtonIconStyle } from '../styles/RichTextEditor.styles';\nimport { inputBoxContentStackStyle, inputBoxRichTextStackItemStyle, inputBoxRichTextStackStyle, richTextBorderBoxStyle } from '../styles/RichTextInputBoxComponent.styles';\n\n/**\n * @private\n */\nexport interface RichTextInputBoxComponentStylesProps extends BaseCustomStyles {}\n\n/**\n * @private\n */\nexport interface RichTextInputBoxComponentProps {\n placeholderText?: string;\n // the initial content of editor that is set when editor is created (e.g. when editing a message)\n initialContent?: string;\n // the current content of the editor\n content?: string;\n onChange: (newValue?: string) => void;\n onEnterKeyDown?: () => void;\n editorComponentRef: React.RefObject<RichTextEditorComponentRef>;\n strings: Partial<RichTextSendBoxStrings>;\n disabled: boolean;\n actionComponents: ReactNode;\n /* @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentUploads?: () => JSX.Element;\n /* @conditional-compile-remove(attachment-upload) */\n hasAttachments?: boolean;\n // props for min and max height for the rich text editor\n // otherwise the editor will grow to fit the content\n richTextEditorStyleProps: (isExpanded: boolean) => RichTextEditorStyleProps;\n isHorizontalLayoutDisabled?: boolean;\n autoFocus?: 'sendBoxTextField';\n onTyping?: () => Promise<void>;\n}\n\n/**\n * @private\n */\nexport const RichTextInputBoxComponent = (props: RichTextInputBoxComponentProps): JSX.Element => {\n const {\n placeholderText,\n initialContent,\n onChange,\n onEnterKeyDown,\n editorComponentRef,\n disabled,\n strings,\n actionComponents,\n /* @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentUploads,\n /* @conditional-compile-remove(attachment-upload) */\n hasAttachments,\n richTextEditorStyleProps,\n isHorizontalLayoutDisabled = false,\n content,\n autoFocus,\n onTyping\n } = props;\n const theme = useTheme();\n const [showRichTextEditorFormatting, setShowRichTextEditorFormatting] = useState(false);\n const onRenderRichTextEditorIcon = useCallback((isHover: boolean) => <Icon iconName={isHover || showRichTextEditorFormatting ? 'RichTextEditorButtonIconFilled' : 'RichTextEditorButtonIcon'} className={richTextFormatButtonIconStyle(theme, !disabled && (isHover || showRichTextEditorFormatting))} />, [disabled, showRichTextEditorFormatting, theme]);\n const actionButtons = useMemo(() => {\n return <Stack.Item align=\"end\" className={richTextActionButtonsStackStyle}>\n <Stack horizontal>\n <InputBoxButton onRenderIcon={onRenderRichTextEditorIcon} onClick={e => {\n setShowRichTextEditorFormatting(!showRichTextEditorFormatting);\n editorComponentRef.current?.focus();\n e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.\n }} ariaLabel={strings.richTextFormatButtonTooltip} tooltipContent={strings.richTextFormatButtonTooltip} className={richTextActionButtonsStyle} data-testId={'rich-text-input-box-format-button'} />\n <Icon iconName=\"RichTextDividerIcon\" className={richTextActionButtonsDividerStyle(theme)} />\n {actionComponents}\n </Stack>\n </Stack.Item>;\n }, [actionComponents, editorComponentRef, onRenderRichTextEditorIcon, showRichTextEditorFormatting, strings.richTextFormatButtonTooltip, theme]);\n const richTextEditorStyle = useMemo(() => {\n return richTextEditorStyleProps(showRichTextEditorFormatting);\n }, [richTextEditorStyleProps, showRichTextEditorFormatting]);\n const onKeyDown = useCallback((ev: React.KeyboardEvent<HTMLElement>) => {\n if (isEnterKeyEventFromCompositionSession(ev)) {\n return;\n }\n if (ev.key === 'Enter' && ev.shiftKey === false && !showRichTextEditorFormatting) {\n ev.preventDefault();\n onEnterKeyDown && onEnterKeyDown();\n } else {\n onTyping?.();\n }\n }, [onEnterKeyDown, showRichTextEditorFormatting, onTyping]);\n const useHorizontalLayout = useMemo(() => {\n return !isHorizontalLayoutDisabled && !showRichTextEditorFormatting && /* @conditional-compile-remove(attachment-upload) */!hasAttachments;\n }, [isHorizontalLayoutDisabled, showRichTextEditorFormatting, /* @conditional-compile-remove(attachment-upload) */hasAttachments]);\n return <div className={richTextBorderBoxStyle({\n theme: theme,\n disabled: !!disabled\n })}>\n {/* This layout is used for the compact view when formatting options are not shown */}\n <Stack grow horizontal={useHorizontalLayout} horizontalAlign={useHorizontalLayout ? 'end' : 'space-between'} className={inputBoxContentStackStyle} wrap={useHorizontalLayout}>\n {/* Fixes the issue when flex box can grow to be bigger than parent */}\n <Stack grow className={inputBoxRichTextStackStyle}>\n <Stack.Item className={inputBoxRichTextStackItemStyle}>\n <RichTextEditor content={content} initialContent={initialContent} placeholderText={placeholderText} onChange={onChange} onKeyDown={onKeyDown} ref={editorComponentRef} strings={strings} showRichTextEditorFormatting={showRichTextEditorFormatting} styles={richTextEditorStyle} autoFocus={autoFocus} />\n </Stack.Item>\n {/* @conditional-compile-remove(attachment-upload) */onRenderAttachmentUploads && onRenderAttachmentUploads()}\n </Stack>\n {actionButtons}\n </Stack>\n </div>;\n};"]}
|
@@ -1,138 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { SendBoxStrings } from '../SendBox';
|
3
|
-
import { AttachmentMetadataWithProgress } from '../../types/Attachment';
|
4
|
-
/**
|
5
|
-
* Strings of {@link RichTextSendBox} that can be overridden.
|
6
|
-
*
|
7
|
-
* @beta
|
8
|
-
*/
|
9
|
-
export interface RichTextSendBoxStrings extends SendBoxStrings {
|
10
|
-
/**
|
11
|
-
* Tooltip text for the bold button.
|
12
|
-
*/
|
13
|
-
boldTooltip: string;
|
14
|
-
/**
|
15
|
-
* Tooltip text for the italic button.
|
16
|
-
*/
|
17
|
-
italicTooltip: string;
|
18
|
-
/**
|
19
|
-
* Tooltip text for the underline button.
|
20
|
-
*/
|
21
|
-
underlineTooltip: string;
|
22
|
-
/**
|
23
|
-
* Tooltip text for the bullet list button.
|
24
|
-
*/
|
25
|
-
bulletListTooltip: string;
|
26
|
-
/**
|
27
|
-
* Tooltip text for the number list button.
|
28
|
-
*/
|
29
|
-
numberListTooltip: string;
|
30
|
-
/**
|
31
|
-
* Tooltip text for the increase indent button.
|
32
|
-
*/
|
33
|
-
increaseIndentTooltip: string;
|
34
|
-
/**
|
35
|
-
* Tooltip text for the decrease indent button.
|
36
|
-
*/
|
37
|
-
decreaseIndentTooltip: string;
|
38
|
-
/**
|
39
|
-
* Tooltip text insert table button.
|
40
|
-
*/
|
41
|
-
insertTableTooltip: string;
|
42
|
-
/**
|
43
|
-
* Tooltip text for the rich text format button button.
|
44
|
-
*/
|
45
|
-
richTextFormatButtonTooltip: string;
|
46
|
-
/**
|
47
|
-
* Text for the insert menu item.
|
48
|
-
*/
|
49
|
-
insertRowOrColumnMenu: string;
|
50
|
-
/**
|
51
|
-
* Title for the insert table menu.
|
52
|
-
*/
|
53
|
-
insertTableMenuTitle: string;
|
54
|
-
/**
|
55
|
-
* Text for the insert menu item to insert row above the current selection.
|
56
|
-
*/
|
57
|
-
insertRowAboveMenu: string;
|
58
|
-
/**
|
59
|
-
* Text for the insert menu item to insert row below the current selection.
|
60
|
-
*/
|
61
|
-
insertRowBelowMenu: string;
|
62
|
-
/**
|
63
|
-
* Text for the insert menu item to insert column to the left from the current selection.
|
64
|
-
*/
|
65
|
-
insertColumnLeftMenu: string;
|
66
|
-
/**
|
67
|
-
* Text for the insert menu item to insert column to the right from the current selection.
|
68
|
-
*/
|
69
|
-
insertColumnRightMenu: string;
|
70
|
-
/**
|
71
|
-
* Text for the delete row or column menu.
|
72
|
-
*/
|
73
|
-
deleteRowOrColumnMenu: string;
|
74
|
-
/**
|
75
|
-
* Text for the delete column menu.
|
76
|
-
*/
|
77
|
-
deleteColumnMenu: string;
|
78
|
-
/**
|
79
|
-
* Text for the delete row menu.
|
80
|
-
*/
|
81
|
-
deleteRowMenu: string;
|
82
|
-
/**
|
83
|
-
* Text for the delete table menu.
|
84
|
-
*/
|
85
|
-
deleteTableMenu: string;
|
86
|
-
}
|
87
|
-
/**
|
88
|
-
* Props for {@link RichTextSendBox}.
|
89
|
-
*
|
90
|
-
* @beta
|
91
|
-
*/
|
92
|
-
export interface RichTextSendBoxProps {
|
93
|
-
/**
|
94
|
-
* Optional boolean to disable text box
|
95
|
-
* @defaultValue false
|
96
|
-
*/
|
97
|
-
disabled?: boolean;
|
98
|
-
/**
|
99
|
-
* Optional strings to override in component
|
100
|
-
*/
|
101
|
-
strings?: Partial<RichTextSendBoxStrings>;
|
102
|
-
/**
|
103
|
-
* Optional text for system message above the text box
|
104
|
-
*/
|
105
|
-
systemMessage?: string;
|
106
|
-
/**
|
107
|
-
* Optional array of type {@link AttachmentMetadataWithProgress}
|
108
|
-
* to render attachments being uploaded in the SendBox.
|
109
|
-
* @beta
|
110
|
-
*/
|
111
|
-
attachmentsWithProgress?: AttachmentMetadataWithProgress[];
|
112
|
-
/**
|
113
|
-
* enumerable to determine if the input box has focus on render or not.
|
114
|
-
* When undefined nothing has focus on render
|
115
|
-
*/
|
116
|
-
autoFocus?: 'sendBoxTextField';
|
117
|
-
/**
|
118
|
-
* Optional callback to remove the attachment upload before sending by clicking on
|
119
|
-
* cancel icon.
|
120
|
-
* @beta
|
121
|
-
*/
|
122
|
-
onCancelAttachmentUpload?: (attachmentId: string) => void;
|
123
|
-
/**
|
124
|
-
* Callback function used when the send button is clicked.
|
125
|
-
*/
|
126
|
-
onSendMessage: (content: string) => Promise<void>;
|
127
|
-
/**
|
128
|
-
* Optional callback called when user is typing
|
129
|
-
*/
|
130
|
-
onTyping?: () => Promise<void>;
|
131
|
-
}
|
132
|
-
/**
|
133
|
-
* A component to render SendBox with Rich Text Editor support.
|
134
|
-
*
|
135
|
-
* @beta
|
136
|
-
*/
|
137
|
-
export declare const RichTextSendBox: (props: RichTextSendBoxProps) => JSX.Element;
|
138
|
-
//# sourceMappingURL=RichTextSendBox.d.ts.map
|
@@ -1,186 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
4
|
-
import { RichTextInputBoxComponent } from './RichTextInputBoxComponent';
|
5
|
-
import { Icon, Stack } from '@fluentui/react';
|
6
|
-
import { useLocale } from '../../localization';
|
7
|
-
import { sendIconStyle } from '../styles/SendBox.styles';
|
8
|
-
import { InputBoxButton } from '../InputBoxButton';
|
9
|
-
import { RichTextSendBoxErrors } from './RichTextSendBoxErrors';
|
10
|
-
import { isMessageTooLong, sanitizeText } from '../utils/SendBoxUtils';
|
11
|
-
import { useTheme } from '../../theming';
|
12
|
-
import { richTextActionButtonsStyle, sendBoxRichTextEditorStyle } from '../styles/RichTextEditor.styles';
|
13
|
-
/* @conditional-compile-remove(attachment-upload) */
|
14
|
-
import { _AttachmentUploadCards } from '../AttachmentUploadCards';
|
15
|
-
/* @conditional-compile-remove(attachment-upload) */
|
16
|
-
import { hasCompletedAttachmentUploads, hasIncompleteAttachmentUploads } from '../utils/SendBoxUtils';
|
17
|
-
/* @conditional-compile-remove(attachment-upload) */
|
18
|
-
import { attachmentUploadCardsStyles } from '../styles/SendBox.styles';
|
19
|
-
/* @conditional-compile-remove(attachment-upload) */
|
20
|
-
import { FluentV9ThemeProvider } from '../../theming/FluentV9ThemeProvider';
|
21
|
-
/**
|
22
|
-
* A component to render SendBox with Rich Text Editor support.
|
23
|
-
*
|
24
|
-
* @beta
|
25
|
-
*/
|
26
|
-
export const RichTextSendBox = (props) => {
|
27
|
-
const { disabled = false, systemMessage, autoFocus, onSendMessage, onTyping,
|
28
|
-
/* @conditional-compile-remove(attachment-upload) */
|
29
|
-
attachmentsWithProgress,
|
30
|
-
/* @conditional-compile-remove(attachment-upload) */
|
31
|
-
onCancelAttachmentUpload } = props;
|
32
|
-
const theme = useTheme();
|
33
|
-
const locale = useLocale();
|
34
|
-
const localeStrings = useMemo(() => {
|
35
|
-
/* @conditional-compile-remove(rich-text-editor) */
|
36
|
-
return locale.strings.richTextSendBox;
|
37
|
-
return locale.strings.sendBox;
|
38
|
-
}, [/* @conditional-compile-remove(rich-text-editor) */ locale.strings.richTextSendBox, locale.strings.sendBox]);
|
39
|
-
const strings = useMemo(() => {
|
40
|
-
return Object.assign(Object.assign({}, localeStrings), props.strings);
|
41
|
-
}, [localeStrings, props.strings]);
|
42
|
-
const [contentValue, setContentValue] = useState('');
|
43
|
-
const [contentValueOverflow, setContentValueOverflow] = useState(false);
|
44
|
-
/* @conditional-compile-remove(attachment-upload) */
|
45
|
-
const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState(undefined);
|
46
|
-
const editorComponentRef = useRef(null);
|
47
|
-
const contentTooLongMessage = useMemo(() => contentValueOverflow ? strings.textTooLong : undefined, [contentValueOverflow, strings.textTooLong]);
|
48
|
-
const setContent = useCallback((newValue) => {
|
49
|
-
if (newValue === undefined) {
|
50
|
-
return;
|
51
|
-
}
|
52
|
-
setContentValueOverflow(isMessageTooLong(newValue.length));
|
53
|
-
setContentValue(newValue);
|
54
|
-
}, []);
|
55
|
-
const sendMessageOnClick = useCallback(() => {
|
56
|
-
var _a, _b, _c;
|
57
|
-
if (disabled || contentValueOverflow) {
|
58
|
-
return;
|
59
|
-
}
|
60
|
-
// Don't send message until all attachments have been uploaded successfully
|
61
|
-
/* @conditional-compile-remove(attachment-upload) */
|
62
|
-
setAttachmentUploadsPendingError(undefined);
|
63
|
-
/* @conditional-compile-remove(attachment-upload) */
|
64
|
-
if (hasIncompleteAttachmentUploads(attachmentsWithProgress)) {
|
65
|
-
setAttachmentUploadsPendingError({
|
66
|
-
message: strings.attachmentUploadsPendingError,
|
67
|
-
timestamp: Date.now()
|
68
|
-
});
|
69
|
-
return;
|
70
|
-
}
|
71
|
-
const message = contentValue;
|
72
|
-
// get plain text content from the editor to check if the message is empty
|
73
|
-
// as the content may contain tags even when the content is empty
|
74
|
-
const plainTextContent = (_a = editorComponentRef.current) === null || _a === void 0 ? void 0 : _a.getPlainContent();
|
75
|
-
const hasContent = !isContentEmpty({
|
76
|
-
plainTextContent,
|
77
|
-
content: message,
|
78
|
-
placeholder: strings.placeholderText
|
79
|
-
});
|
80
|
-
// we don't want to send empty messages including spaces, newlines, tabs
|
81
|
-
// Message can be empty if there is a valid attachment upload
|
82
|
-
if (hasContent || /* @conditional-compile-remove(attachment-upload) */ hasCompletedAttachmentUploads(attachmentsWithProgress)) {
|
83
|
-
onSendMessage(message);
|
84
|
-
setContentValue('');
|
85
|
-
(_b = editorComponentRef.current) === null || _b === void 0 ? void 0 : _b.setEmptyContent();
|
86
|
-
}
|
87
|
-
(_c = editorComponentRef.current) === null || _c === void 0 ? void 0 : _c.focus();
|
88
|
-
}, [contentValue, contentValueOverflow, disabled, onSendMessage, strings.placeholderText, /* @conditional-compile-remove(attachment-upload) */ attachmentsWithProgress, /* @conditional-compile-remove(attachment-upload) */ strings.attachmentUploadsPendingError]);
|
89
|
-
const hasErrorMessage = useMemo(() => {
|
90
|
-
var _a;
|
91
|
-
return !!systemMessage || !!contentTooLongMessage || /* @conditional-compile-remove(attachment-upload) */
|
92
|
-
!!attachmentUploadsPendingError || /* @conditional-compile-remove(attachment-upload) */
|
93
|
-
!!((_a = attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.filter(attachmentUpload => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error);
|
94
|
-
}, [
|
95
|
-
attachmentsWithProgress, contentTooLongMessage, /* @conditional-compile-remove(attachment-upload) */
|
96
|
-
attachmentUploadsPendingError, systemMessage
|
97
|
-
]);
|
98
|
-
const onRenderSendIcon = useCallback((isHover) => {
|
99
|
-
var _a;
|
100
|
-
// get plain text content from the editor to check if the message is empty
|
101
|
-
// as the content may contain tags even when the content is empty
|
102
|
-
const plainTextContent = (_a = editorComponentRef.current) === null || _a === void 0 ? void 0 : _a.getPlainContent();
|
103
|
-
const hasContent = !isContentEmpty({
|
104
|
-
plainTextContent: plainTextContent,
|
105
|
-
content: contentValue,
|
106
|
-
placeholder: strings.placeholderText
|
107
|
-
});
|
108
|
-
return React.createElement(Icon, { iconName: isHover && hasContent ? 'SendBoxSendHovered' : 'SendBoxSend', className: sendIconStyle({
|
109
|
-
theme,
|
110
|
-
hasText: hasContent,
|
111
|
-
/* @conditional-compile-remove(attachment-upload) */
|
112
|
-
hasAttachment: false,
|
113
|
-
hasErrorMessage: hasErrorMessage,
|
114
|
-
defaultTextColor: theme.palette.neutralSecondary,
|
115
|
-
disabled: disabled
|
116
|
-
}) });
|
117
|
-
}, [contentValue, disabled, hasErrorMessage, strings.placeholderText, theme]);
|
118
|
-
const sendBoxErrorsProps = useMemo(() => {
|
119
|
-
var _a, _b;
|
120
|
-
/* @conditional-compile-remove(attachment-upload) */
|
121
|
-
const uploadErrorMessage = (_b = (_a = attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.filter(attachmentUpload => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message;
|
122
|
-
return {
|
123
|
-
/* @conditional-compile-remove(attachment-upload) */
|
124
|
-
attachmentUploadsPendingError: attachmentUploadsPendingError,
|
125
|
-
/* @conditional-compile-remove(attachment-upload) */
|
126
|
-
attachmentProgressError: uploadErrorMessage ? {
|
127
|
-
message: uploadErrorMessage,
|
128
|
-
timestamp: Date.now()
|
129
|
-
} : undefined,
|
130
|
-
systemMessage: systemMessage,
|
131
|
-
textTooLongMessage: contentTooLongMessage
|
132
|
-
};
|
133
|
-
}, [
|
134
|
-
attachmentsWithProgress, contentTooLongMessage, /* @conditional-compile-remove(attachment-upload) */
|
135
|
-
attachmentUploadsPendingError, systemMessage
|
136
|
-
]);
|
137
|
-
/* @conditional-compile-remove(attachment-upload) */
|
138
|
-
const onRenderAttachmentUploads = useCallback(() => {
|
139
|
-
return React.createElement(Stack, { className: attachmentUploadCardsStyles },
|
140
|
-
React.createElement(FluentV9ThemeProvider, { v8Theme: theme },
|
141
|
-
React.createElement(_AttachmentUploadCards, { attachmentsWithProgress: attachmentsWithProgress, onCancelAttachmentUpload: onCancelAttachmentUpload, strings: {
|
142
|
-
removeAttachment: strings.removeAttachment,
|
143
|
-
uploading: strings.uploading,
|
144
|
-
uploadCompleted: strings.uploadCompleted,
|
145
|
-
attachmentMoreMenu: strings.attachmentMoreMenu
|
146
|
-
} })));
|
147
|
-
}, [attachmentsWithProgress, onCancelAttachmentUpload, strings.removeAttachment, strings.uploadCompleted, strings.uploading, strings.attachmentMoreMenu, theme]);
|
148
|
-
const sendButton = useMemo(() => {
|
149
|
-
return React.createElement(InputBoxButton, { onRenderIcon: onRenderSendIcon, onClick: e => {
|
150
|
-
sendMessageOnClick();
|
151
|
-
e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.
|
152
|
-
}, className: richTextActionButtonsStyle, ariaLabel: localeStrings.sendButtonAriaLabel, tooltipContent: localeStrings.sendButtonAriaLabel });
|
153
|
-
}, [localeStrings.sendButtonAriaLabel, onRenderSendIcon, sendMessageOnClick]);
|
154
|
-
/* @conditional-compile-remove(attachment-upload) */
|
155
|
-
const hasAttachmentUploads = useMemo(() => {
|
156
|
-
return hasCompletedAttachmentUploads(attachmentsWithProgress) || hasIncompleteAttachmentUploads(attachmentsWithProgress);
|
157
|
-
}, [attachmentsWithProgress]);
|
158
|
-
return React.createElement(Stack, null,
|
159
|
-
React.createElement(RichTextSendBoxErrors, Object.assign({}, sendBoxErrorsProps)),
|
160
|
-
React.createElement(RichTextInputBoxComponent
|
161
|
-
// in case when format bar is shown, the editor is re-rendered that causes the content to be lost
|
162
|
-
// setting the content will ensure that the latest content is used when editor is re-rendered
|
163
|
-
, {
|
164
|
-
// in case when format bar is shown, the editor is re-rendered that causes the content to be lost
|
165
|
-
// setting the content will ensure that the latest content is used when editor is re-rendered
|
166
|
-
content: contentValue, placeholderText: strings.placeholderText, autoFocus: autoFocus, onChange: setContent, onEnterKeyDown: sendMessageOnClick, onTyping: onTyping, editorComponentRef: editorComponentRef, strings: strings, disabled: disabled, actionComponents: sendButton, richTextEditorStyleProps: sendBoxRichTextEditorStyle,
|
167
|
-
/* @conditional-compile-remove(attachment-upload) */ onRenderAttachmentUploads: onRenderAttachmentUploads,
|
168
|
-
/* @conditional-compile-remove(attachment-upload) */ hasAttachments: hasAttachmentUploads }));
|
169
|
-
};
|
170
|
-
/**
|
171
|
-
* Checks if the content of the rich text editor is empty.
|
172
|
-
*
|
173
|
-
* @param {Object} params - The parameters for the function.
|
174
|
-
* @param {string | undefined} params.plainTextContent - The plain text content of the editor.
|
175
|
-
* @param {string} params.content - The HTML content of the editor.
|
176
|
-
* @param {string} params.placeholder - The placeholder text of the editor.
|
177
|
-
* @returns {boolean} - True if the content is empty, false otherwise.
|
178
|
-
*/
|
179
|
-
const isContentEmpty = ({ plainTextContent, content, placeholder }) => {
|
180
|
-
// RoosterJS returns placeholder text as plain text when the editor is empty and in this case,
|
181
|
-
// plainTextContent contains only placeholder text but content doesn't include the placeholder text
|
182
|
-
// this needs to be reviewed after migration to the content model packages.
|
183
|
-
const plainTextContainsPlaceholderOnly = plainTextContent === placeholder && !content.includes(placeholder);
|
184
|
-
return plainTextContainsPlaceholderOnly || sanitizeText(plainTextContent !== null && plainTextContent !== void 0 ? plainTextContent : '').length === 0;
|
185
|
-
};
|
186
|
-
//# sourceMappingURL=RichTextSendBox.js.map
|