@azure/communication-react 1.24.0-beta.1 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +66 -2240
- package/dist/dist-cjs/communication-react/index.js +38012 -178
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/common.d.ts +0 -13
- package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/constants.d.ts +0 -5
- package/dist/dist-esm/acs-ui-common/src/constants.js +0 -5
- package/dist/dist-esm/acs-ui-common/src/constants.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/index.d.ts +0 -4
- package/dist/dist-esm/acs-ui-common/src/index.js +0 -3
- package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +0 -14
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -18
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +0 -8
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +2 -64
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +0 -28
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +1 -65
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -5
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +1 -30
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +6 -14
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.d.ts +0 -5
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +3 -8
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +43 -32
- package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +6 -160
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +6 -26
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +23 -251
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -6
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +6 -31
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js +4 -4
- package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +0 -12
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -32
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +0 -9
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +1 -45
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
- package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -3
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +0 -7
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +0 -8
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -3
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -35
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -3
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +2 -25
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -15
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -2
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/index.d.ts +0 -1
- package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +0 -35
- package/dist/dist-esm/communication-react/src/index.js +0 -9
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +0 -2
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +0 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +0 -101
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +6 -83
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -13
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +3 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -11
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +2 -32
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -8
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +5 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +1 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +4 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +1 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +6 -31
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +1 -15
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -23
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +6 -17
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -8
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +6 -10
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +5 -5
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -2
- package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.d.ts +0 -2
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js +1 -5
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
- package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -13
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +5 -3
- package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +7 -4
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
- package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -12
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RaiseHandButton.js +2 -2
- package/dist/dist-esm/react-components/src/components/RaiseHandButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ReactionButton.js +2 -2
- package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
- package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -19
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +0 -5
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +1 -34
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +2 -13
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +0 -24
- package/dist/dist-esm/react-components/src/components/index.js +0 -11
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +0 -21
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +0 -53
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -8
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -37
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -38
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -131
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
- package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils.js +2 -3
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +0 -2
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -63
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/cy-GB/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/es-MX/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/fr-CA/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +5 -0
- package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js +0 -1
- package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -29
- package/dist/dist-esm/react-components/src/theming/icons.js +2 -91
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
- package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
- package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
- package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/index.d.ts +0 -1
- package/dist/dist-esm/react-components/src/types/index.js +0 -1
- package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -72
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +11 -21
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -64
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -48
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +29 -89
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -72
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -3
- 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/BreakoutRoomsBanner.js +6 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +3 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +3 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +9 -0
- 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/useHandlers.js +1 -19
- 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.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +26 -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 +24 -46
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -24
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -24
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +12 -11
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +1 -12
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +4 -60
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -65
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +7 -13
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -20
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +23 -62
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -73
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +0 -7
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -12
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -8
- 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 -27
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -189
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -36
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js +3 -13
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +6 -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.d.ts +0 -3
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +2 -85
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +0 -3
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +9 -70
- 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 -3
- 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 -2
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
- package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
- package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +2 -33
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +1 -5
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-MX/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-CA/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +1 -1
- package/package.json +3 -3
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-ClQ2m7aI.js +0 -206
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-ClQ2m7aI.js.map +0 -1
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-Bhftq9li.js +0 -50
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-Bhftq9li.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-CcIzeubJ.js +0 -45677
- package/dist/dist-cjs/communication-react/index-CcIzeubJ.js.map +0 -1
- package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
- package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -20
- package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
- package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
- package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
- package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.d.ts +0 -14
- package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.js +0 -204
- package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
- package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
- package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.d.ts +0 -16
- package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js +0 -22
- package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.d.ts +0 -24
- package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js +0 -60
- package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/TogetherModeVideoStreamSubscriber.d.ts +0 -18
- package/dist/dist-esm/calling-stateful-client/src/TogetherModeVideoStreamSubscriber.js +0 -31
- package/dist/dist-esm/calling-stateful-client/src/TogetherModeVideoStreamSubscriber.js.map +0 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +0 -6
- package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +0 -20
- package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -24
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -196
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -36
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -67
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -51
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -40
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
- package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -119
- package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.d.ts +0 -28
- package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.js +0 -26
- package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RealTimeText.d.ts +0 -58
- package/dist/dist-esm/react-components/src/components/RealTimeText.js +0 -38
- package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RealTimeTextModal.d.ts +0 -42
- package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js +0 -53
- package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -19
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -43
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -30
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -99
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -59
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -336
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -78
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -215
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -173
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -221
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.d.ts +0 -48
- package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js +0 -25
- package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -819
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.d.ts +0 -15
- package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js +0 -91
- package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.d.ts +0 -10
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js +0 -14
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.d.ts +0 -23
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js +0 -47
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.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/RTTDisclosureBanner.styles.d.ts +0 -10
- package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.js +0 -23
- package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -320
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
- package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
- package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.d.ts +0 -98
- package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js +0 -181
- package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -69
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -73
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -178
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
- package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -119
- package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
- package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.d.ts +0 -8
- package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js +0 -17
- package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.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-components/src/types/TogetherModeTypes.d.ts +0 -38
- package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js +0 -2
- package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -49
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -203
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -41
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -265
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.d.ts +0 -12
- package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.js +0 -19
- package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js
DELETED
@@ -1,221 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import React, { useCallback, useEffect, useMemo } from 'react';
|
4
|
-
import { CommandBar, ContextualMenuItemType, Icon } from '@fluentui/react';
|
5
|
-
import { toolbarButtonStyle, ribbonDividerStyle, ribbonOverflowButtonStyle, richTextToolbarStyle } from '../../styles/RichTextEditor.styles';
|
6
|
-
import { useTheme } from '../../../theming';
|
7
|
-
import { toggleBold, toggleItalic, toggleUnderline, toggleBullet, toggleNumbering, setIndentation, insertTable } from 'roosterjs-content-model-api';
|
8
|
-
import { richTextInsertTableCommandBarItem } from './Table/RichTextInsertTableCommandBarItem';
|
9
|
-
const MaxRowsNumber = 5;
|
10
|
-
const MaxColumnsNumber = 5;
|
11
|
-
/**
|
12
|
-
* A component to display rich text toolbar.
|
13
|
-
*
|
14
|
-
* @beta
|
15
|
-
*/
|
16
|
-
export const RichTextToolbar = (props) => {
|
17
|
-
const { plugin, strings } = props;
|
18
|
-
const theme = useTheme();
|
19
|
-
// need to re-render the buttons when format state changes
|
20
|
-
const [formatState, setFormatState] = React.useState(undefined);
|
21
|
-
useEffect(() => {
|
22
|
-
// update the format state on editor events
|
23
|
-
plugin.onFormatChanged = setFormatState;
|
24
|
-
// plugin editor ready event may happen before onFormatChanged is set
|
25
|
-
// call update format function to ensure the format state is set
|
26
|
-
plugin.updateFormat();
|
27
|
-
}, [plugin]);
|
28
|
-
const boldButton = useMemo(() => {
|
29
|
-
return getCommandBarItem({
|
30
|
-
dataTestId: 'rich-text-toolbar-bold-button',
|
31
|
-
key: 'RichTextToolbarBoldButton',
|
32
|
-
icon: 'RichTextBoldButtonIcon',
|
33
|
-
onClick: () => {
|
34
|
-
plugin.onToolbarButtonClick(editor => {
|
35
|
-
toggleBold(editor);
|
36
|
-
});
|
37
|
-
},
|
38
|
-
text: strings.richTextBoldTooltip,
|
39
|
-
checked: formatState !== undefined && formatState.isBold === true,
|
40
|
-
theme: theme
|
41
|
-
});
|
42
|
-
}, [formatState, plugin, strings.richTextBoldTooltip, theme]);
|
43
|
-
const italicButton = useMemo(() => {
|
44
|
-
return getCommandBarItem({
|
45
|
-
dataTestId: 'rich-text-toolbar-italic-button',
|
46
|
-
key: 'RichTextToolbarItalicButton',
|
47
|
-
icon: 'RichTextItalicButtonIcon',
|
48
|
-
onClick: () => {
|
49
|
-
plugin.onToolbarButtonClick(editor => {
|
50
|
-
toggleItalic(editor);
|
51
|
-
});
|
52
|
-
},
|
53
|
-
text: strings.richTextItalicTooltip,
|
54
|
-
checked: formatState !== undefined && (formatState === null || formatState === void 0 ? void 0 : formatState.isItalic) === true,
|
55
|
-
theme: theme
|
56
|
-
});
|
57
|
-
}, [formatState, plugin, strings.richTextItalicTooltip, theme]);
|
58
|
-
const underlineButton = useMemo(() => {
|
59
|
-
return getCommandBarItem({
|
60
|
-
dataTestId: 'rich-text-toolbar-underline-button',
|
61
|
-
key: 'RichTextToolbarUnderlineButton',
|
62
|
-
icon: 'RichTextUnderlineButtonIcon',
|
63
|
-
onClick: () => {
|
64
|
-
plugin.onToolbarButtonClick(editor => {
|
65
|
-
toggleUnderline(editor);
|
66
|
-
});
|
67
|
-
},
|
68
|
-
text: strings.richTextUnderlineTooltip,
|
69
|
-
checked: formatState !== undefined && (formatState === null || formatState === void 0 ? void 0 : formatState.isUnderline) === true,
|
70
|
-
theme: theme
|
71
|
-
});
|
72
|
-
}, [formatState, plugin, strings.richTextUnderlineTooltip, theme]);
|
73
|
-
const bulletListButton = useMemo(() => {
|
74
|
-
return getCommandBarItem({
|
75
|
-
dataTestId: 'rich-text-toolbar-bullet-list-button',
|
76
|
-
key: 'RichTextToolbarBulletListButton',
|
77
|
-
icon: 'RichTextBulletListButtonIcon',
|
78
|
-
onClick: () => {
|
79
|
-
plugin.onToolbarButtonClick(editor => {
|
80
|
-
// check the format state to see if the bulleted list is already applied
|
81
|
-
const isBullet = formatState === null || formatState === void 0 ? void 0 : formatState.isBullet;
|
82
|
-
toggleBullet(editor);
|
83
|
-
// the bulleted list was added
|
84
|
-
if (!isBullet) {
|
85
|
-
setTimeout(() => {
|
86
|
-
// a small delay and polite aria live are needed for MacOS VoiceOver to announce the change
|
87
|
-
editor.announce({
|
88
|
-
ariaLiveMode: 'polite',
|
89
|
-
text: strings.richTextBulletedListAppliedAnnouncement
|
90
|
-
});
|
91
|
-
}, 50);
|
92
|
-
}
|
93
|
-
});
|
94
|
-
},
|
95
|
-
text: strings.richTextBulletListTooltip,
|
96
|
-
checked: formatState !== undefined && (formatState === null || formatState === void 0 ? void 0 : formatState.isBullet) === true,
|
97
|
-
theme: theme
|
98
|
-
});
|
99
|
-
}, [formatState, plugin, strings.richTextBulletListTooltip, strings.richTextBulletedListAppliedAnnouncement, theme]);
|
100
|
-
const numberListButton = useMemo(() => {
|
101
|
-
return getCommandBarItem({
|
102
|
-
dataTestId: 'rich-text-toolbar-number-list-button',
|
103
|
-
key: 'RichTextToolbarNumberListButton',
|
104
|
-
icon: 'RichTextNumberListButtonIcon',
|
105
|
-
onClick: () => {
|
106
|
-
plugin.onToolbarButtonClick(editor => {
|
107
|
-
// check the format state to see if the numbered list is already applied
|
108
|
-
const isNumbering = formatState === null || formatState === void 0 ? void 0 : formatState.isNumbering;
|
109
|
-
toggleNumbering(editor);
|
110
|
-
// the numbered list was added
|
111
|
-
if (!isNumbering) {
|
112
|
-
// a small delay and polite aria live are needed for MacOS VoiceOver to announce the change
|
113
|
-
setTimeout(() => {
|
114
|
-
editor.announce({
|
115
|
-
ariaLiveMode: 'polite',
|
116
|
-
text: strings.richTextNumberedListAppliedAnnouncement
|
117
|
-
});
|
118
|
-
}, 50);
|
119
|
-
}
|
120
|
-
});
|
121
|
-
},
|
122
|
-
text: strings.richTextNumberListTooltip,
|
123
|
-
checked: formatState !== undefined && (formatState === null || formatState === void 0 ? void 0 : formatState.isNumbering) === true,
|
124
|
-
theme: theme
|
125
|
-
});
|
126
|
-
}, [formatState, plugin, strings.richTextNumberListTooltip, strings.richTextNumberedListAppliedAnnouncement, theme]);
|
127
|
-
const indentDecreaseButton = useMemo(() => {
|
128
|
-
return getCommandBarItem({
|
129
|
-
dataTestId: 'rich-text-toolbar-indent-decrease-button',
|
130
|
-
key: 'RichTextToolbarIndentDecreaseButton',
|
131
|
-
icon: 'RichTextIndentDecreaseButtonIcon',
|
132
|
-
onClick: () => {
|
133
|
-
plugin.onToolbarButtonClick(editor => {
|
134
|
-
setIndentation(editor, 'outdent');
|
135
|
-
});
|
136
|
-
},
|
137
|
-
text: strings.richTextDecreaseIndentTooltip,
|
138
|
-
canCheck: false,
|
139
|
-
theme: theme
|
140
|
-
});
|
141
|
-
}, [plugin, strings.richTextDecreaseIndentTooltip, theme]);
|
142
|
-
const indentIncreaseButton = useMemo(() => {
|
143
|
-
return getCommandBarItem({
|
144
|
-
dataTestId: 'rich-text-toolbar-indent-increase-button',
|
145
|
-
key: 'RichTextToolbarIndentIncreaseButton',
|
146
|
-
icon: 'RichTextIndentIncreaseButtonIcon',
|
147
|
-
onClick: () => {
|
148
|
-
plugin.onToolbarButtonClick(editor => {
|
149
|
-
setIndentation(editor, 'indent');
|
150
|
-
});
|
151
|
-
},
|
152
|
-
text: strings.richTextIncreaseIndentTooltip,
|
153
|
-
canCheck: false,
|
154
|
-
theme: theme
|
155
|
-
});
|
156
|
-
}, [plugin, strings.richTextIncreaseIndentTooltip, theme]);
|
157
|
-
const divider = useCallback((key) => {
|
158
|
-
return dividerCommandBarItem(theme, key);
|
159
|
-
}, [theme]);
|
160
|
-
const tableButton = useMemo(() => {
|
161
|
-
return richTextInsertTableCommandBarItem(theme, MaxRowsNumber, MaxColumnsNumber, strings, (column, row) => {
|
162
|
-
plugin.onToolbarButtonClick(editor => {
|
163
|
-
//add format
|
164
|
-
insertTable(editor, column, row);
|
165
|
-
// when subMenuProps is used and the menu is dismissed, focus is set to the command bar item that opened the menu
|
166
|
-
// set focus to editor on next re-render
|
167
|
-
setTimeout(() => {
|
168
|
-
editor.focus();
|
169
|
-
});
|
170
|
-
});
|
171
|
-
});
|
172
|
-
}, [plugin, strings, theme]);
|
173
|
-
const buttons = useMemo(() => {
|
174
|
-
return [boldButton, italicButton, underlineButton, divider('RichTextRibbonTextFormatDivider'), bulletListButton, numberListButton, indentDecreaseButton, indentIncreaseButton, divider('RichTextRibbonTableDivider'), tableButton];
|
175
|
-
}, [boldButton, italicButton, underlineButton, divider, bulletListButton, numberListButton, indentDecreaseButton, indentIncreaseButton, tableButton]);
|
176
|
-
const overflowButtonProps = useMemo(() => {
|
177
|
-
return {
|
178
|
-
ariaLabel: strings.richTextToolbarMoreButtonAriaLabel,
|
179
|
-
styles: toolbarButtonStyle(theme),
|
180
|
-
menuProps: {
|
181
|
-
items: [],
|
182
|
-
// CommandBar will determine items rendered in overflow
|
183
|
-
isBeakVisible: false,
|
184
|
-
styles: ribbonOverflowButtonStyle(theme)
|
185
|
-
}
|
186
|
-
};
|
187
|
-
}, [strings.richTextToolbarMoreButtonAriaLabel, theme]);
|
188
|
-
return React.createElement(CommandBar, { items: buttons, "data-testid": 'rich-text-editor-toolbar', styles: richTextToolbarStyle, overflowButtonProps: overflowButtonProps, "aria-label": strings.richTextToolbarAriaLabel });
|
189
|
-
};
|
190
|
-
const getCommandBarItem = ({ key, icon, onClick, text, canCheck = true, checked = false, disabled = false, theme, dataTestId }) => {
|
191
|
-
return {
|
192
|
-
role: canCheck ? 'menuitemcheckbox' : 'menuitem',
|
193
|
-
'aria-checked': canCheck ? checked : undefined,
|
194
|
-
// `menuitem` role doesn't support `aria-checked`
|
195
|
-
'data-testid': dataTestId,
|
196
|
-
key: key,
|
197
|
-
iconProps: {
|
198
|
-
iconName: icon
|
199
|
-
},
|
200
|
-
onClick: onClick,
|
201
|
-
text: text,
|
202
|
-
ariaLabel: text,
|
203
|
-
iconOnly: true,
|
204
|
-
canCheck: canCheck,
|
205
|
-
buttonStyles: Object.assign({}, toolbarButtonStyle(theme)),
|
206
|
-
checked: checked,
|
207
|
-
disabled: disabled
|
208
|
-
};
|
209
|
-
};
|
210
|
-
const dividerCommandBarItem = (theme, key) => {
|
211
|
-
return {
|
212
|
-
key: key,
|
213
|
-
disabled: true,
|
214
|
-
// show the item correctly for the overflow menu
|
215
|
-
itemType: ContextualMenuItemType.Divider,
|
216
|
-
// this is still needed to remove checkmark icon space even though it is a divider
|
217
|
-
canCheck: false,
|
218
|
-
onRender: () => React.createElement(Icon, { iconName: "RichTextDividerIcon", className: ribbonDividerStyle(theme) })
|
219
|
-
};
|
220
|
-
};
|
221
|
-
//# sourceMappingURL=RichTextToolbar.js.map
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"RichTextToolbar.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,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I,CAAC;AACvM,CAAC,CAAC;AACF,MAAM,iBAAiB,GAAG,CAAC,EACzB,GAAG,EACH,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,QAAQ,GAAG,IAAI,EACf,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,UAAU,EAWX,EAAwB,EAAE;IACzB,OAAO;QACL,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,UAAU;QAChD,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;QAC9C,iDAAiD;QACjD,aAAa,EAAE,UAAU;QACzB,GAAG,EAAE,GAAG;QACR,SAAS,EAAE;YACT,QAAQ,EAAE,IAAI;SACf;QACD,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,QAAQ;QAClB,YAAY,oBACP,kBAAkB,CAAC,KAAK,CAAC,CAC7B;QACD,OAAO,EAAE,OAAO;QAChB,QAAQ,EAAE,QAAQ;KACnB,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,qBAAqB,GAAG,CAAC,KAAY,EAAE,GAAW,EAAwB,EAAE;IAChF,OAAO;QACL,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,IAAI;QACd,gDAAgD;QAChD,QAAQ,EAAE,sBAAsB,CAAC,OAAO;QACxC,kFAAkF;QAClF,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,GAAG,EAAE,CAAC,oBAAC,IAAI,IAAC,QAAQ,EAAC,qBAAqB,EAAC,SAAS,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAI;KAC9F,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { RichTextToolbarPlugin } from '../Plugins/RichTextToolbarPlugin';\nimport { CommandBar, ContextualMenuItemType, Icon } from '@fluentui/react';\nimport type { ICommandBarItemProps, Theme } from '@fluentui/react';\nimport { toolbarButtonStyle, ribbonDividerStyle, ribbonOverflowButtonStyle, richTextToolbarStyle } from '../../styles/RichTextEditor.styles';\nimport { useTheme } from '../../../theming';\nimport { ContentModelFormatState } from 'roosterjs-content-model-types';\nimport { toggleBold, toggleItalic, toggleUnderline, toggleBullet, toggleNumbering, setIndentation, insertTable } from 'roosterjs-content-model-api';\nimport { RichTextStrings } from '../RichTextSendBox';\nimport { richTextInsertTableCommandBarItem } from './Table/RichTextInsertTableCommandBarItem';\nconst MaxRowsNumber = 5;\nconst MaxColumnsNumber = 5;\n\n/**\n * Props for {@link RichTextToolbar}.\n *\n * @private\n */\nexport interface RichTextToolbarProps {\n // The rich text toolbar plugin used for connect editor and the ribbon.\n plugin: RichTextToolbarPlugin;\n // Strings for localization.\n strings: Partial<RichTextStrings>;\n}\n\n/**\n * A component to display rich text toolbar.\n *\n * @beta\n */\nexport const RichTextToolbar = (props: RichTextToolbarProps): JSX.Element => {\n const {\n plugin,\n strings\n } = props;\n const theme = useTheme();\n // need to re-render the buttons when format state changes\n const [formatState, setFormatState] = React.useState<ContentModelFormatState | undefined>(undefined);\n useEffect(() => {\n // update the format state on editor events\n plugin.onFormatChanged = setFormatState;\n // plugin editor ready event may happen before onFormatChanged is set\n // call update format function to ensure the format state is set\n plugin.updateFormat();\n }, [plugin]);\n const boldButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-bold-button',\n key: 'RichTextToolbarBoldButton',\n icon: 'RichTextBoldButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n toggleBold(editor);\n });\n },\n text: strings.richTextBoldTooltip,\n checked: formatState !== undefined && formatState.isBold === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextBoldTooltip, theme]);\n const italicButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-italic-button',\n key: 'RichTextToolbarItalicButton',\n icon: 'RichTextItalicButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n toggleItalic(editor);\n });\n },\n text: strings.richTextItalicTooltip,\n checked: formatState !== undefined && formatState?.isItalic === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextItalicTooltip, theme]);\n const underlineButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-underline-button',\n key: 'RichTextToolbarUnderlineButton',\n icon: 'RichTextUnderlineButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n toggleUnderline(editor);\n });\n },\n text: strings.richTextUnderlineTooltip,\n checked: formatState !== undefined && formatState?.isUnderline === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextUnderlineTooltip, theme]);\n const bulletListButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-bullet-list-button',\n key: 'RichTextToolbarBulletListButton',\n icon: 'RichTextBulletListButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n // check the format state to see if the bulleted list is already applied\n const isBullet = formatState?.isBullet;\n toggleBullet(editor);\n // the bulleted list was added\n if (!isBullet) {\n setTimeout(() => {\n // a small delay and polite aria live are needed for MacOS VoiceOver to announce the change\n editor.announce({\n ariaLiveMode: 'polite',\n text: strings.richTextBulletedListAppliedAnnouncement\n });\n }, 50);\n }\n });\n },\n text: strings.richTextBulletListTooltip,\n checked: formatState !== undefined && formatState?.isBullet === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextBulletListTooltip, strings.richTextBulletedListAppliedAnnouncement, theme]);\n const numberListButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-number-list-button',\n key: 'RichTextToolbarNumberListButton',\n icon: 'RichTextNumberListButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n // check the format state to see if the numbered list is already applied\n const isNumbering = formatState?.isNumbering;\n toggleNumbering(editor);\n // the numbered list was added\n if (!isNumbering) {\n // a small delay and polite aria live are needed for MacOS VoiceOver to announce the change\n setTimeout(() => {\n editor.announce({\n ariaLiveMode: 'polite',\n text: strings.richTextNumberedListAppliedAnnouncement\n });\n }, 50);\n }\n });\n },\n text: strings.richTextNumberListTooltip,\n checked: formatState !== undefined && formatState?.isNumbering === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextNumberListTooltip, strings.richTextNumberedListAppliedAnnouncement, theme]);\n const indentDecreaseButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-indent-decrease-button',\n key: 'RichTextToolbarIndentDecreaseButton',\n icon: 'RichTextIndentDecreaseButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n setIndentation(editor, 'outdent');\n });\n },\n text: strings.richTextDecreaseIndentTooltip,\n canCheck: false,\n theme: theme\n });\n }, [plugin, strings.richTextDecreaseIndentTooltip, theme]);\n const indentIncreaseButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-indent-increase-button',\n key: 'RichTextToolbarIndentIncreaseButton',\n icon: 'RichTextIndentIncreaseButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n setIndentation(editor, 'indent');\n });\n },\n text: strings.richTextIncreaseIndentTooltip,\n canCheck: false,\n theme: theme\n });\n }, [plugin, strings.richTextIncreaseIndentTooltip, theme]);\n const divider = useCallback((key: string) => {\n return dividerCommandBarItem(theme, key);\n }, [theme]);\n const tableButton: ICommandBarItemProps = useMemo(() => {\n return richTextInsertTableCommandBarItem(theme, MaxRowsNumber, MaxColumnsNumber, strings, (column: number, row: number) => {\n plugin.onToolbarButtonClick(editor => {\n //add format\n insertTable(editor, column, row);\n // when subMenuProps is used and the menu is dismissed, focus is set to the command bar item that opened the menu\n // set focus to editor on next re-render\n setTimeout(() => {\n editor.focus();\n });\n });\n });\n }, [plugin, strings, theme]);\n const buttons: ICommandBarItemProps[] = useMemo(() => {\n return [boldButton, italicButton, underlineButton, divider('RichTextRibbonTextFormatDivider'), bulletListButton, numberListButton, indentDecreaseButton, indentIncreaseButton, divider('RichTextRibbonTableDivider'), tableButton];\n }, [boldButton, italicButton, underlineButton, divider, bulletListButton, numberListButton, indentDecreaseButton, indentIncreaseButton, tableButton]);\n const overflowButtonProps = useMemo(() => {\n return {\n ariaLabel: strings.richTextToolbarMoreButtonAriaLabel,\n styles: toolbarButtonStyle(theme),\n menuProps: {\n items: [],\n // CommandBar will determine items rendered in overflow\n isBeakVisible: false,\n styles: ribbonOverflowButtonStyle(theme)\n }\n };\n }, [strings.richTextToolbarMoreButtonAriaLabel, theme]);\n return <CommandBar items={buttons} data-testid={'rich-text-editor-toolbar'} styles={richTextToolbarStyle} overflowButtonProps={overflowButtonProps} aria-label={strings.richTextToolbarAriaLabel} />;\n};\nconst getCommandBarItem = ({\n key,\n icon,\n onClick,\n text,\n canCheck = true,\n checked = false,\n disabled = false,\n theme,\n dataTestId\n}: {\n key: string;\n icon: string;\n onClick: () => void;\n text?: string;\n canCheck?: boolean;\n checked?: boolean;\n disabled?: boolean;\n theme: Theme;\n dataTestId: string;\n}): ICommandBarItemProps => {\n return {\n role: canCheck ? 'menuitemcheckbox' : 'menuitem',\n 'aria-checked': canCheck ? checked : undefined,\n // `menuitem` role doesn't support `aria-checked`\n 'data-testid': dataTestId,\n key: key,\n iconProps: {\n iconName: icon\n },\n onClick: onClick,\n text: text,\n ariaLabel: text,\n iconOnly: true,\n canCheck: canCheck,\n buttonStyles: {\n ...toolbarButtonStyle(theme)\n },\n checked: checked,\n disabled: disabled\n };\n};\nconst dividerCommandBarItem = (theme: Theme, key: string): ICommandBarItemProps => {\n return {\n key: key,\n disabled: true,\n // show the item correctly for the overflow menu\n itemType: ContextualMenuItemType.Divider,\n // this is still needed to remove checkmark icon space even though it is a divider\n canCheck: false,\n onRender: () => <Icon iconName=\"RichTextDividerIcon\" className={ribbonDividerStyle(theme)} />\n };\n};"]}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import type { ICommandBarItemProps, Theme } from '@fluentui/react';
|
2
|
-
import { RichTextStrings } from '../../RichTextSendBox';
|
3
|
-
/**
|
4
|
-
* "Insert table" command bar item for the rich text toolbar
|
5
|
-
*/
|
6
|
-
export declare const richTextInsertTableCommandBarItem: (theme: Theme, maxRowsNumber: number, maxColumnsNumber: number, strings: Partial<RichTextStrings>, onClick: (column: number, row: number) => void) => ICommandBarItemProps;
|
7
|
-
//# sourceMappingURL=RichTextInsertTableCommandBarItem.d.ts.map
|
@@ -1,51 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import React from 'react';
|
4
|
-
import { FocusZoneDirection } from '@fluentui/react';
|
5
|
-
import { insertTableMenuTablePane, toolbarTableButtonStyle } from '../../../styles/RichTextEditor.styles';
|
6
|
-
import { RichTextInsertTablePane } from './RichTextInsertTablePane';
|
7
|
-
import { parseKey } from '../../../utils/RichTextTableUtils';
|
8
|
-
import { RichTextToolbarTableIcon } from './RichTextToolbarTableIcon';
|
9
|
-
/**
|
10
|
-
* "Insert table" command bar item for the rich text toolbar
|
11
|
-
*/
|
12
|
-
export const richTextInsertTableCommandBarItem = (theme, maxRowsNumber, maxColumnsNumber, strings, onClick) => {
|
13
|
-
return {
|
14
|
-
'data-testid': 'rich-text-toolbar-insert-table-button',
|
15
|
-
key: 'RichTextToolbarInsertTableButton',
|
16
|
-
text: strings.richTextInsertTableTooltip,
|
17
|
-
ariaLabel: strings.richTextInsertTableTooltip,
|
18
|
-
// hide the chevron icon
|
19
|
-
menuIconProps: {
|
20
|
-
hidden: true
|
21
|
-
},
|
22
|
-
onRenderIcon: () => {
|
23
|
-
return React.createElement(RichTextToolbarTableIcon, null);
|
24
|
-
},
|
25
|
-
buttonStyles: toolbarTableButtonStyle(theme),
|
26
|
-
canCheck: false,
|
27
|
-
iconOnly: true,
|
28
|
-
subMenuProps: {
|
29
|
-
calloutProps: {
|
30
|
-
isBeakVisible: false
|
31
|
-
},
|
32
|
-
shouldFocusOnMount: true,
|
33
|
-
className: insertTableMenuTablePane,
|
34
|
-
focusZoneProps: {
|
35
|
-
direction: FocusZoneDirection.bidirectional
|
36
|
-
},
|
37
|
-
items: [{
|
38
|
-
key: 'RichTextToolbarInsertTableMenu',
|
39
|
-
text: strings.richTextInsertTableMenuTitle,
|
40
|
-
canCheck: false,
|
41
|
-
onRender: (item) => {
|
42
|
-
return React.createElement(RichTextInsertTablePane, { item: item, onClick: key => {
|
43
|
-
const { row, column } = parseKey(key);
|
44
|
-
onClick(column, row);
|
45
|
-
}, maxColumnsNumber: maxColumnsNumber, maxRowsNumber: maxRowsNumber });
|
46
|
-
}
|
47
|
-
}]
|
48
|
-
}
|
49
|
-
};
|
50
|
-
};
|
51
|
-
//# sourceMappingURL=RichTextInsertTableCommandBarItem.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"RichTextInsertTableCommandBarItem.js","sourceRoot":"","sources":["../../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAC1G,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,KAAY,EAAE,aAAqB,EAAE,gBAAwB,EAAE,OAAiC,EAAE,OAA8C,EAAwB,EAAE;IAC1N,OAAO;QACL,aAAa,EAAE,uCAAuC;QACtD,GAAG,EAAE,kCAAkC;QACvC,IAAI,EAAE,OAAO,CAAC,0BAA0B;QACxC,SAAS,EAAE,OAAO,CAAC,0BAA0B;QAC7C,wBAAwB;QACxB,aAAa,EAAE;YACb,MAAM,EAAE,IAAI;SACb;QACD,YAAY,EAAE,GAAG,EAAE;YACjB,OAAO,oBAAC,wBAAwB,OAAG,CAAC;QACtC,CAAC;QACD,YAAY,EAAE,uBAAuB,CAAC,KAAK,CAAC;QAC5C,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE;YACZ,YAAY,EAAE;gBACZ,aAAa,EAAE,KAAK;aACrB;YACD,kBAAkB,EAAE,IAAI;YACxB,SAAS,EAAE,wBAAwB;YACnC,cAAc,EAAE;gBACd,SAAS,EAAE,kBAAkB,CAAC,aAAa;aAC5C;YACD,KAAK,EAAE,CAAC;oBACN,GAAG,EAAE,gCAAgC;oBACrC,IAAI,EAAE,OAAO,CAAC,4BAA4B;oBAC1C,QAAQ,EAAE,KAAK;oBACf,QAAQ,EAAE,CAAC,IAAyB,EAAE,EAAE;wBACtC,OAAO,oBAAC,uBAAuB,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE;gCACzD,MAAM,EACJ,GAAG,EACH,MAAM,EACP,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;gCAClB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;4BACvB,CAAC,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,GAAI,CAAC;oBAC1E,CAAC;iBACF,CAAC;SACH;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { FocusZoneDirection } from '@fluentui/react';\nimport type { ICommandBarItemProps, IContextualMenuItem, Theme } from '@fluentui/react';\nimport { insertTableMenuTablePane, toolbarTableButtonStyle } from '../../../styles/RichTextEditor.styles';\nimport { RichTextInsertTablePane } from './RichTextInsertTablePane';\nimport { parseKey } from '../../../utils/RichTextTableUtils';\nimport { RichTextStrings } from '../../RichTextSendBox';\nimport { RichTextToolbarTableIcon } from './RichTextToolbarTableIcon';\n\n/**\n * \"Insert table\" command bar item for the rich text toolbar\n */\nexport const richTextInsertTableCommandBarItem = (theme: Theme, maxRowsNumber: number, maxColumnsNumber: number, strings: Partial<RichTextStrings>, onClick: (column: number, row: number) => void): ICommandBarItemProps => {\n return {\n 'data-testid': 'rich-text-toolbar-insert-table-button',\n key: 'RichTextToolbarInsertTableButton',\n text: strings.richTextInsertTableTooltip,\n ariaLabel: strings.richTextInsertTableTooltip,\n // hide the chevron icon\n menuIconProps: {\n hidden: true\n },\n onRenderIcon: () => {\n return <RichTextToolbarTableIcon />;\n },\n buttonStyles: toolbarTableButtonStyle(theme),\n canCheck: false,\n iconOnly: true,\n subMenuProps: {\n calloutProps: {\n isBeakVisible: false\n },\n shouldFocusOnMount: true,\n className: insertTableMenuTablePane,\n focusZoneProps: {\n direction: FocusZoneDirection.bidirectional\n },\n items: [{\n key: 'RichTextToolbarInsertTableMenu',\n text: strings.richTextInsertTableMenuTitle,\n canCheck: false,\n onRender: (item: IContextualMenuItem) => {\n return <RichTextInsertTablePane item={item} onClick={key => {\n const {\n row,\n column\n } = parseKey(key);\n onClick(column, row);\n }} maxColumnsNumber={maxColumnsNumber} maxRowsNumber={maxRowsNumber} />;\n }\n }]\n }\n };\n};"]}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import type { IContextualMenuItem } from '@fluentui/react';
|
3
|
-
interface RichTextInsertTablePaneProps {
|
4
|
-
item: IContextualMenuItem;
|
5
|
-
onClick: (key: string) => void;
|
6
|
-
maxRowsNumber: number;
|
7
|
-
maxColumnsNumber: number;
|
8
|
-
}
|
9
|
-
/**
|
10
|
-
* @private
|
11
|
-
* Component for the insert table pane
|
12
|
-
*/
|
13
|
-
export declare const RichTextInsertTablePane: (props: RichTextInsertTablePaneProps) => JSX.Element;
|
14
|
-
export {};
|
15
|
-
//# sourceMappingURL=RichTextInsertTablePane.d.ts.map
|
@@ -1,64 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import React, { useMemo } from 'react';
|
4
|
-
import { FocusZone, FocusZoneDirection, mergeStyles } from '@fluentui/react';
|
5
|
-
import { insertTableMenuCellButtonSelectedStyles, insertTableMenuCellButtonStyles, insertTableMenuFocusZone, insertTableMenuTitleStyles } from '../../../styles/RichTextEditor.styles';
|
6
|
-
import { ColumnRowReplaceString, createKey } from '../../../utils/RichTextTableUtils';
|
7
|
-
import { useTheme } from '../../../../theming';
|
8
|
-
// This file uses RoosterJS React package implementation with updates to UI components and styles.
|
9
|
-
const RowColumnInitialValue = 0;
|
10
|
-
/**
|
11
|
-
* @private
|
12
|
-
* Component for the insert table pane
|
13
|
-
*/
|
14
|
-
export const RichTextInsertTablePane = (props) => {
|
15
|
-
const { item, onClick, maxColumnsNumber, maxRowsNumber } = props;
|
16
|
-
const [column, setColumn] = React.useState(RowColumnInitialValue);
|
17
|
-
const [row, setRow] = React.useState(RowColumnInitialValue);
|
18
|
-
const theme = useTheme();
|
19
|
-
const updateSize = React.useCallback((target) => {
|
20
|
-
if (target !== undefined && target.dataset.column !== undefined && target.dataset.row !== undefined) {
|
21
|
-
const column = parseInt(target.dataset.column);
|
22
|
-
const row = parseInt(target.dataset.row);
|
23
|
-
if (column >= RowColumnInitialValue && column < maxColumnsNumber && row >= RowColumnInitialValue && row < maxRowsNumber) {
|
24
|
-
setColumn(column);
|
25
|
-
setRow(row);
|
26
|
-
}
|
27
|
-
}
|
28
|
-
}, [maxColumnsNumber, maxRowsNumber]);
|
29
|
-
const onMouseEnter = React.useCallback((e) => {
|
30
|
-
updateSize(e.target);
|
31
|
-
}, [updateSize]);
|
32
|
-
const onTouchStart = React.useCallback((e) => {
|
33
|
-
updateSize(e.target);
|
34
|
-
}, [updateSize]);
|
35
|
-
const onClickButton = React.useCallback(() => {
|
36
|
-
onClick(createKey(formatRowColumnText(row), formatRowColumnText(column)));
|
37
|
-
}, [row, column, onClick]);
|
38
|
-
const items = React.useMemo(() => {
|
39
|
-
var _a;
|
40
|
-
const items = [];
|
41
|
-
for (let i = 0; i < maxRowsNumber; i++) {
|
42
|
-
for (let j = 0; j < maxColumnsNumber; j++) {
|
43
|
-
const key = `cell_${i}_${j}`;
|
44
|
-
const isSelected = j <= column && i <= row;
|
45
|
-
items.push(React.createElement("button", { className: mergeStyles(insertTableMenuCellButtonStyles(theme), isSelected ? insertTableMenuCellButtonSelectedStyles(theme) : undefined), onClick: onClickButton, key: key, id: key, "data-column": j, "data-row": i, "data-is-focusable": true, onMouseEnter: onMouseEnter, onTouchStart: onTouchStart, "aria-label": formatText((_a = item.text) !== null && _a !== void 0 ? _a : '', formatRowColumnText(i), formatRowColumnText(j)), "data-testid": key }));
|
46
|
-
}
|
47
|
-
}
|
48
|
-
return items;
|
49
|
-
}, [maxRowsNumber, maxColumnsNumber, column, row, theme, onClickButton, onMouseEnter, onTouchStart, item.text]);
|
50
|
-
const text = useMemo(() => {
|
51
|
-
var _a;
|
52
|
-
return formatText((_a = item.text) !== null && _a !== void 0 ? _a : '', formatRowColumnText(row), formatRowColumnText(column));
|
53
|
-
}, [column, item.text, row]);
|
54
|
-
return React.createElement("div", null,
|
55
|
-
React.createElement("div", { className: insertTableMenuTitleStyles }, text),
|
56
|
-
React.createElement(FocusZone, { defaultTabbableElement: `cell_${RowColumnInitialValue}_${RowColumnInitialValue}`, direction: FocusZoneDirection.bidirectional, onActiveElementChanged: updateSize, className: insertTableMenuFocusZone(theme) }, items));
|
57
|
-
};
|
58
|
-
const formatText = (text, row, column) => {
|
59
|
-
return text.replace(`${ColumnRowReplaceString}`, `${column.toString()} x ${row.toString()}`);
|
60
|
-
};
|
61
|
-
const formatRowColumnText = (value) => {
|
62
|
-
return value + 1;
|
63
|
-
};
|
64
|
-
//# sourceMappingURL=RichTextInsertTablePane.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"RichTextInsertTablePane.js","sourceRoot":"","sources":["../../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE7E,OAAO,EAAE,uCAAuC,EAAE,+BAA+B,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACvL,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,kGAAkG;AAClG,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAQhC;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAmC,EAAe,EAAE;IAC1F,MAAM,EACJ,IAAI,EACJ,OAAO,EACP,gBAAgB,EAChB,aAAa,EACd,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;IAClE,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;IAC5D,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,MAAoB,EAAE,EAAE;QAC5D,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,OA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AAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;IAC7B,OAAO;QACH,6BAAK,SAAS,EAAE,0BAA0B,IAAG,IAAI,CAAO;QACxD,oBAAC,SAAS,IAAC,sBAAsB,EAAE,QAAQ,qBAAqB,IAAI,qBAAqB,EAAE,EAAE,SAAS,EAAE,kBAAkB,CAAC,aAAa,EAAE,sBAAsB,EAAE,UAAU,EAAE,SAAS,EAAE,wBAAwB,CAAC,KAAK,CAAC,IACrN,KAAK,CACI,CACR,CAAC;AACX,CAAC,CAAC;AACF,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc,EAAU,EAAE;IACvE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,sBAAsB,EAAE,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAC/F,CAAC,CAAC;AACF,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAU,EAAE;IACpD,OAAO,KAAK,GAAG,CAAC,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useMemo } from 'react';\nimport { FocusZone, FocusZoneDirection, mergeStyles } from '@fluentui/react';\nimport type { IContextualMenuItem } from '@fluentui/react';\nimport { insertTableMenuCellButtonSelectedStyles, insertTableMenuCellButtonStyles, insertTableMenuFocusZone, insertTableMenuTitleStyles } from '../../../styles/RichTextEditor.styles';\nimport { ColumnRowReplaceString, createKey } from '../../../utils/RichTextTableUtils';\nimport { useTheme } from '../../../../theming';\n\n// This file uses RoosterJS React package implementation with updates to UI components and styles.\nconst RowColumnInitialValue = 0;\ninterface RichTextInsertTablePaneProps {\n item: IContextualMenuItem;\n onClick: (key: string) => void;\n maxRowsNumber: number;\n maxColumnsNumber: number;\n}\n\n/**\n * @private\n * Component for the insert table pane\n */\nexport const RichTextInsertTablePane = (props: RichTextInsertTablePaneProps): JSX.Element => {\n const {\n item,\n onClick,\n maxColumnsNumber,\n maxRowsNumber\n } = props;\n const [column, setColumn] = React.useState(RowColumnInitialValue);\n const [row, setRow] = React.useState(RowColumnInitialValue);\n const theme = useTheme();\n const updateSize = React.useCallback((target?: HTMLElement) => {\n if (target !== undefined && target.dataset.column !== undefined && target.dataset.row !== undefined) {\n const column = parseInt(target.dataset.column);\n const row = parseInt(target.dataset.row);\n if (column >= RowColumnInitialValue && column < maxColumnsNumber && row >= RowColumnInitialValue && row < maxRowsNumber) {\n setColumn(column);\n setRow(row);\n }\n }\n }, [maxColumnsNumber, maxRowsNumber]);\n const onMouseEnter = React.useCallback((e: React.MouseEvent<HTMLButtonElement>) => {\n updateSize(e.target as HTMLElement);\n }, [updateSize]);\n const onTouchStart = React.useCallback((e: React.TouchEvent<HTMLButtonElement>) => {\n updateSize(e.target as HTMLElement);\n }, [updateSize]);\n const onClickButton = React.useCallback(() => {\n onClick(createKey(formatRowColumnText(row), formatRowColumnText(column)));\n }, [row, column, onClick]);\n const items = React.useMemo(() => {\n const items: JSX.Element[] = [];\n for (let i = 0; i < maxRowsNumber; i++) {\n for (let j = 0; j < maxColumnsNumber; j++) {\n const key = `cell_${i}_${j}`;\n const isSelected = j <= column && i <= row;\n items.push(<button className={mergeStyles(insertTableMenuCellButtonStyles(theme), isSelected ? insertTableMenuCellButtonSelectedStyles(theme) : undefined)} onClick={onClickButton} key={key} id={key} data-column={j} data-row={i} data-is-focusable={true} onMouseEnter={onMouseEnter} onTouchStart={onTouchStart} aria-label={formatText(item.text ?? '', formatRowColumnText(i), formatRowColumnText(j))} data-testid={key} />);\n }\n }\n return items;\n }, [maxRowsNumber, maxColumnsNumber, column, row, theme, onClickButton, onMouseEnter, onTouchStart, item.text]);\n const text = useMemo(() => {\n return formatText(item.text ?? '', formatRowColumnText(row), formatRowColumnText(column));\n }, [column, item.text, row]);\n return <div>\n <div className={insertTableMenuTitleStyles}>{text}</div>\n <FocusZone defaultTabbableElement={`cell_${RowColumnInitialValue}_${RowColumnInitialValue}`} direction={FocusZoneDirection.bidirectional} onActiveElementChanged={updateSize} className={insertTableMenuFocusZone(theme)}>\n {items}\n </FocusZone>\n </div>;\n};\nconst formatText = (text: string, row: number, column: number): string => {\n return text.replace(`${ColumnRowReplaceString}`, `${column.toString()} x ${row.toString()}`);\n};\nconst formatRowColumnText = (value: number): number => {\n return value + 1;\n};"]}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import React from 'react';
|
4
|
-
import { Icon, Stack } from '@fluentui/react';
|
5
|
-
/**
|
6
|
-
* Renders the icon component for the insert table button in the rich text editor toolbar.
|
7
|
-
*/
|
8
|
-
export const RichTextToolbarTableIcon = () => {
|
9
|
-
return React.createElement(Stack, null,
|
10
|
-
React.createElement(Icon, { iconName: "RichTextInsertTableFilledIcon", className: 'ribbon-table-button-filled-icon' }),
|
11
|
-
React.createElement(Icon, { iconName: "RichTextInsertTableRegularIcon", className: 'ribbon-table-button-regular-icon' }));
|
12
|
-
};
|
13
|
-
//# sourceMappingURL=RichTextToolbarTableIcon.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"RichTextToolbarTableIcon.js","sourceRoot":"","sources":["../../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAgB,EAAE;IACxD,OAAO,oBAAC,KAAK;QACT,oBAAC,IAAI,IAAC,QAAQ,EAAC,+BAA+B,EAAC,SAAS,EAAE,iCAAiC,GAAI;QAC/F,oBAAC,IAAI,IAAC,QAAQ,EAAC,gCAAgC,EAAC,SAAS,EAAE,kCAAkC,GAAI,CAC3F,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { Icon, Stack } from '@fluentui/react';\n\n/**\n * Renders the icon component for the insert table button in the rich text editor toolbar.\n */\nexport const RichTextToolbarTableIcon = (): JSX.Element => {\n return <Stack>\n <Icon iconName=\"RichTextInsertTableFilledIcon\" className={'ribbon-table-button-filled-icon'} />\n <Icon iconName=\"RichTextInsertTableRegularIcon\" className={'ribbon-table-button-regular-icon'} />\n </Stack>;\n};"]}
|
@@ -1,56 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
/**
|
3
|
-
* @beta
|
4
|
-
* Error bar type for {@link SendBoxErrorBarError}
|
5
|
-
*/
|
6
|
-
export declare enum SendBoxErrorBarType {
|
7
|
-
/** Info styled MessageBar */
|
8
|
-
info = 0,
|
9
|
-
/** Error styled MessageBar */
|
10
|
-
error = 1,
|
11
|
-
/** Blocked styled MessageBar */
|
12
|
-
blocked = 2,
|
13
|
-
/** SevereWarning styled MessageBar */
|
14
|
-
severeWarning = 3,
|
15
|
-
/** Success styled MessageBar */
|
16
|
-
success = 4,
|
17
|
-
/** Warning styled MessageBar */
|
18
|
-
warning = 5
|
19
|
-
}
|
20
|
-
/**
|
21
|
-
* @beta
|
22
|
-
* Error to be displayed to the user in an error bar above sendbox.
|
23
|
-
*/
|
24
|
-
export interface SendBoxErrorBarError {
|
25
|
-
/** Error Message to be displayed */
|
26
|
-
message: string;
|
27
|
-
/**
|
28
|
-
* Unix Timestamp. Preferred generation using `Date.now()`
|
29
|
-
*/
|
30
|
-
timestamp: number;
|
31
|
-
/**
|
32
|
-
* ErrorBar type. Defaults to `warning`.
|
33
|
-
*/
|
34
|
-
errorBarType?: SendBoxErrorBarType;
|
35
|
-
}
|
36
|
-
/**
|
37
|
-
* @private
|
38
|
-
*/
|
39
|
-
export interface SendBoxErrorBarProps {
|
40
|
-
/** Error to render */
|
41
|
-
error?: SendBoxErrorBarError;
|
42
|
-
/**
|
43
|
-
* Automatically dismisses the error bar after the specified delay in ms.
|
44
|
-
* Example: `10 * 1000` would be 10 seconds
|
45
|
-
*/
|
46
|
-
dismissAfterMs?: number;
|
47
|
-
/**
|
48
|
-
* Callback to invoke when the error bar is dismissed
|
49
|
-
*/
|
50
|
-
onDismiss?: () => void;
|
51
|
-
}
|
52
|
-
/**
|
53
|
-
* @private
|
54
|
-
*/
|
55
|
-
export declare const SendBoxErrorBar: (props: SendBoxErrorBarProps) => JSX.Element;
|
56
|
-
//# sourceMappingURL=SendBoxErrorBar.d.ts.map
|
@@ -1,75 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import { MessageBar } from '@fluentui/react';
|
4
|
-
import { MessageBarType } from '@fluentui/react';
|
5
|
-
import React, { useEffect } from 'react';
|
6
|
-
import { useMemo } from 'react';
|
7
|
-
import { useLocale } from '../localization';
|
8
|
-
/**
|
9
|
-
* @beta
|
10
|
-
* Error bar type for {@link SendBoxErrorBarError}
|
11
|
-
*/
|
12
|
-
export var SendBoxErrorBarType;
|
13
|
-
(function (SendBoxErrorBarType) {
|
14
|
-
/** Info styled MessageBar */
|
15
|
-
SendBoxErrorBarType[SendBoxErrorBarType["info"] = 0] = "info";
|
16
|
-
/** Error styled MessageBar */
|
17
|
-
SendBoxErrorBarType[SendBoxErrorBarType["error"] = 1] = "error";
|
18
|
-
/** Blocked styled MessageBar */
|
19
|
-
SendBoxErrorBarType[SendBoxErrorBarType["blocked"] = 2] = "blocked";
|
20
|
-
/** SevereWarning styled MessageBar */
|
21
|
-
SendBoxErrorBarType[SendBoxErrorBarType["severeWarning"] = 3] = "severeWarning";
|
22
|
-
/** Success styled MessageBar */
|
23
|
-
SendBoxErrorBarType[SendBoxErrorBarType["success"] = 4] = "success";
|
24
|
-
/** Warning styled MessageBar */
|
25
|
-
SendBoxErrorBarType[SendBoxErrorBarType["warning"] = 5] = "warning";
|
26
|
-
})(SendBoxErrorBarType || (SendBoxErrorBarType = {}));
|
27
|
-
/**
|
28
|
-
* @private
|
29
|
-
*/
|
30
|
-
export const SendBoxErrorBar = (props) => {
|
31
|
-
const { error, dismissAfterMs, onDismiss } = props;
|
32
|
-
const strings = useLocale().strings.errorBar;
|
33
|
-
const [errorMessage, setErrorMessage] = React.useState(error === null || error === void 0 ? void 0 : error.message);
|
34
|
-
// Using `any` because `NodeJS.Timeout` here will cause `declaration error` with jest.
|
35
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
36
|
-
const timeoutRef = React.useRef();
|
37
|
-
React.useEffect(() => {
|
38
|
-
setErrorMessage(error === null || error === void 0 ? void 0 : error.message);
|
39
|
-
}, [error]);
|
40
|
-
useEffect(() => {
|
41
|
-
if (error && dismissAfterMs !== undefined) {
|
42
|
-
timeoutRef.current = setTimeout(() => {
|
43
|
-
setErrorMessage(undefined);
|
44
|
-
onDismiss && onDismiss();
|
45
|
-
}, dismissAfterMs);
|
46
|
-
}
|
47
|
-
return () => {
|
48
|
-
timeoutRef.current && clearTimeout(timeoutRef.current);
|
49
|
-
};
|
50
|
-
}, [dismissAfterMs, onDismiss, error]);
|
51
|
-
const messageBarType = useMemo(() => {
|
52
|
-
switch (error === null || error === void 0 ? void 0 : error.errorBarType) {
|
53
|
-
case SendBoxErrorBarType.info:
|
54
|
-
return MessageBarType.info;
|
55
|
-
case SendBoxErrorBarType.error:
|
56
|
-
return MessageBarType.error;
|
57
|
-
case SendBoxErrorBarType.blocked:
|
58
|
-
return MessageBarType.blocked;
|
59
|
-
case SendBoxErrorBarType.severeWarning:
|
60
|
-
return MessageBarType.severeWarning;
|
61
|
-
case SendBoxErrorBarType.success:
|
62
|
-
return MessageBarType.success;
|
63
|
-
case SendBoxErrorBarType.warning:
|
64
|
-
default:
|
65
|
-
return MessageBarType.warning;
|
66
|
-
}
|
67
|
-
}, [error]);
|
68
|
-
if (errorMessage) {
|
69
|
-
return React.createElement(MessageBar, { role: "alert", "aria-label": errorMessage, "data-testid": 'send-box-message-bar', messageBarType: messageBarType, isMultiline: true, key: (error === null || error === void 0 ? void 0 : error.errorBarType) || SendBoxErrorBarType.warning, onDismiss: onDismiss, dismissButtonAriaLabel: strings.dismissButtonAriaLabel }, errorMessage);
|
70
|
-
}
|
71
|
-
else {
|
72
|
-
return React.createElement(React.Fragment, null);
|
73
|
-
}
|
74
|
-
};
|
75
|
-
//# sourceMappingURL=SendBoxErrorBar.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"SendBoxErrorBar.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/SendBoxErrorBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC7B,6BAA6B;IAC7B,6DAAQ,CAAA;IACR,8BAA8B;IAC9B,+DAAS,CAAA;IACT,gCAAgC;IAChC,mEAAW,CAAA;IACX,sCAAsC;IACtC,+EAAiB,CAAA;IACjB,gCAAgC;IAChC,mEAAW,CAAA;IACX,gCAAgC;IAChC,mEAAW,CAAA;AACb,CAAC,EAbW,mBAAmB,KAAnB,mBAAmB,QAa9B;AAoCD;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAe,EAAE;IAC1E,MAAM,EACJ,KAAK,EACL,cAAc,EACd,SAAS,EACV,GAAG,KAAK,CAAC;IACV,MAAM,OAAO,GAAG,SAAS,E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C,OAAO,cAAc,CAAC,aAAa,CAAC;YACtC,KAAK,mBAAmB,CAAC,OAAO;gBAC9B,OAAO,cAAc,CAAC,OAAO,CAAC;YAChC,KAAK,mBAAmB,CAAC,OAAO,CAAC;YACjC;gBACE,OAAO,cAAc,CAAC,OAAO,CAAC;QAClC,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IACZ,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,oBAAC,UAAU,IAAC,IAAI,EAAC,OAAO,gBAAa,YAAY,iBAAe,sBAAsB,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,YAAY,KAAI,mBAAmB,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,IAClR,YAAY,CACF,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,OAAO,yCAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { MessageBar } from '@fluentui/react';\nimport { MessageBarType } from '@fluentui/react';\nimport React, { useEffect } from 'react';\nimport { useMemo } from 'react';\nimport { useLocale } from '../localization';\n/**\n * @beta\n * Error bar type for {@link SendBoxErrorBarError}\n */\nexport enum SendBoxErrorBarType {\n /** Info styled MessageBar */\n info = 0,\n /** Error styled MessageBar */\n error = 1,\n /** Blocked styled MessageBar */\n blocked = 2,\n /** SevereWarning styled MessageBar */\n severeWarning = 3,\n /** Success styled MessageBar */\n success = 4,\n /** Warning styled MessageBar */\n warning = 5,\n}\n\n/**\n * @beta\n * Error to be displayed to the user in an error bar above sendbox.\n */\nexport interface SendBoxErrorBarError {\n /** Error Message to be displayed */\n message: string;\n /**\n * Unix Timestamp. Preferred generation using `Date.now()`\n */\n timestamp: number;\n /**\n * ErrorBar type. Defaults to `warning`.\n */\n errorBarType?: SendBoxErrorBarType;\n}\n\n/**\n * @private\n */\nexport interface SendBoxErrorBarProps {\n /** Error to render */\n error?: SendBoxErrorBarError;\n /**\n * Automatically dismisses the error bar after the specified delay in ms.\n * Example: `10 * 1000` would be 10 seconds\n */\n dismissAfterMs?: number;\n /**\n * Callback to invoke when the error bar is dismissed\n */\n onDismiss?: () => void;\n}\n\n/**\n * @private\n */\nexport const SendBoxErrorBar = (props: SendBoxErrorBarProps): JSX.Element => {\n const {\n error,\n dismissAfterMs,\n onDismiss\n } = props;\n const strings = useLocale().strings.errorBar;\n const [errorMessage, setErrorMessage] = React.useState(error?.message);\n // Using `any` because `NodeJS.Timeout` here will cause `declaration error` with jest.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const timeoutRef = React.useRef<any>();\n React.useEffect(() => {\n setErrorMessage(error?.message);\n }, [error]);\n useEffect(() => {\n if (error && dismissAfterMs !== undefined) {\n timeoutRef.current = setTimeout(() => {\n setErrorMessage(undefined);\n onDismiss && onDismiss();\n }, dismissAfterMs);\n }\n return () => {\n timeoutRef.current && clearTimeout(timeoutRef.current);\n };\n }, [dismissAfterMs, onDismiss, error]);\n const messageBarType = useMemo(() => {\n switch (error?.errorBarType) {\n case SendBoxErrorBarType.info:\n return MessageBarType.info;\n case SendBoxErrorBarType.error:\n return MessageBarType.error;\n case SendBoxErrorBarType.blocked:\n return MessageBarType.blocked;\n case SendBoxErrorBarType.severeWarning:\n return MessageBarType.severeWarning;\n case SendBoxErrorBarType.success:\n return MessageBarType.success;\n case SendBoxErrorBarType.warning:\n default:\n return MessageBarType.warning;\n }\n }, [error]);\n if (errorMessage) {\n return <MessageBar role=\"alert\" aria-label={errorMessage} data-testid={'send-box-message-bar'} messageBarType={messageBarType} isMultiline={true} key={error?.errorBarType || SendBoxErrorBarType.warning} onDismiss={onDismiss} dismissButtonAriaLabel={strings.dismissButtonAriaLabel}>\n {errorMessage}\n </MessageBar>;\n } else {\n return <></>;\n }\n};"]}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { SendBoxErrorBarError } from './SendBoxErrorBar';
|
3
|
-
/**
|
4
|
-
* @private
|
5
|
-
*/
|
6
|
-
export interface SendBoxErrorsProps {
|
7
|
-
attachmentUploadsPendingError?: SendBoxErrorBarError;
|
8
|
-
attachmentProgressError?: SendBoxErrorBarError;
|
9
|
-
}
|
10
|
-
/**
|
11
|
-
* @private
|
12
|
-
*/
|
13
|
-
export declare const SendBoxErrors: (props: SendBoxErrorsProps) => JSX.Element;
|
14
|
-
//# sourceMappingURL=SendBoxErrors.d.ts.map
|