@azure/communication-react 1.14.0-alpha-202403050012 → 1.14.0-alpha-202403070010
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 +119 -80
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DQB5BrFt.js +51 -0
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DQB5BrFt.js.map +1 -0
- package/dist/dist-cjs/communication-react/index-szH03w3_.js +38011 -0
- package/dist/dist-cjs/communication-react/index-szH03w3_.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +157 -37735
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +2 -1
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +5 -0
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +13 -38
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +3 -3
- package/dist/dist-esm/communication-react/src/index.js +2 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +16 -34
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.d.ts +18 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js +102 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +3 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +1 -28
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +5 -17
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/{RTE → RichTextEditor}/RichTextEditor.d.ts +14 -2
- package/dist/dist-esm/react-components/src/components/{RTE → RichTextEditor}/RichTextEditor.js +22 -21
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +28 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +50 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/{RTE/RTERibbonButtons.d.ts → RichTextEditor/RichTextRibbonButtons.d.ts} +2 -2
- package/dist/dist-esm/react-components/src/components/{RTE/RTERibbonButtons.js → RichTextEditor/RichTextRibbonButtons.js} +9 -9
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextRibbonButtons.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/{RTE/RTESendBox.d.ts → RichTextEditor/RichTextSendBox.d.ts} +5 -1
- package/dist/dist-esm/react-components/src/components/{RTE/RTESendBox.js → RichTextEditor/RichTextSendBox.js} +33 -20
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/{RTE/RTESendBoxErrors.d.ts → RichTextEditor/RichTextSendBoxErrors.d.ts} +3 -3
- package/dist/dist-esm/react-components/src/components/{RTE/RTESendBoxErrors.js → RichTextEditor/RichTextSendBoxErrors.js} +2 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/SendBox.js +2 -2
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +3 -5
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +4 -7
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/LargeGalleryLayout.js +5 -17
- package/dist/dist-esm/react-components/src/components/VideoGallery/LargeGalleryLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js +4 -7
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +1 -8
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +3 -10
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +4 -2
- package/dist/dist-esm/react-components/src/components/index.js +4 -1
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +10 -0
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.d.ts +10 -4
- package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js +17 -4
- package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +34 -2
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +72 -11
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +17 -0
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +30 -0
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +15 -0
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +22 -11
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +23 -0
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +44 -0
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +2 -2
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +2 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +10 -8
- package/dist/dist-esm/react-components/src/theming/icons.js +13 -9
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +3 -10
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +7 -12
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +2 -12
- 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/MediaGallery.js +2 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +4 -26
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +1 -5
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +14 -0
- 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 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +10 -13
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUpload.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +2 -8
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +1 -6
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +0 -2
- 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.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +20 -0
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendBox.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendBox.js +46 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendBox.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +10 -8
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -9
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/package.json +2 -2
- package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.d.ts +0 -25
- package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.js +0 -21
- package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTERibbonButtons.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTESendBox.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTESendBoxErrors.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RTE/RichTextEditor.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/ic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G;AACH,MAAM,CAAC,MAAM,uBAAuB,mCAC/B,uBAAuB,GACvB,oBAAoB,CACxB,CAAC;AA2BF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6C,EAAe,EAAE,CAAC,CAC/F,oBAAC,QAAQ,oBAAK,KAAK,EAAI,CACxB,CAAC;AAmHF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6C,EAAe,EAAE,CAAC,CAC/F,oBAAC,QAAQ,oBAAK,KAAK,EAAI,CACxB,CAAC;AAoGF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAqD,EAAe,EAAE,CAAC,CAC/G,oBAAC,QAAQ,oBAAK,KAAK,EAAI,CACxB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CallEnd20Filled,\n CallMissed20Filled,\n CameraSwitch24Regular,\n Chat20Filled,\n Chat20Regular,\n Info20Filled,\n MicOff20Filled,\n Mic20Filled,\n Mic20Regular,\n People20Regular,\n PersonDelete20Filled,\n Speaker220Filled,\n Speaker220Regular,\n Video20Filled,\n VideoOff20Filled,\n WifiWarning20Filled,\n Circle20Regular\n} from '@fluentui/react-icons';\n/* @conditional-compile-remove(spotlight) */\nimport { MoreHorizontal20Filled, VideoPersonStarOff20Filled } from '@fluentui/react-icons';\n/* @conditional-compile-remove(capabilities) */\nimport { MicProhibited20Filled, VideoProhibited20Filled } from '@fluentui/react-icons';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { Grid20Regular } from '@fluentui/react-icons';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { PersonAdd20Regular, Call20Regular } from '@fluentui/react-icons';\n/* @conditional-compile-remove(dtmf-dialer) */\nimport { Dialpad20Regular } from '@fluentui/react-icons';\nimport { DEFAULT_COMPONENT_ICONS } from '@internal/react-components';\nimport React from 'react';\n// eslint-disable-next-line no-restricted-imports\nimport { FontIcon, IIconProps, Spinner, SpinnerSize } from '@fluentui/react';\n/* @conditional-compile-remove(file-sharing) */\nimport { Attach20Regular } from '@fluentui/react-icons';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoBackgroundEffect20Regular, VideoPerson20Filled } from '@fluentui/react-icons';\n/* @conditional-compile-remove(gallery-layouts) */\nimport {\n PersonSquare20Regular,\n WindowHeaderHorizontal20Regular,\n TableSimple20Regular,\n BoardSplit20Regular,\n ContentView20Regular,\n Table20Regular\n} from '@fluentui/react-icons';\n\nconst SpinnerIcon = (): JSX.Element => <Spinner size={SpinnerSize.large} />;\n\n/**\n * The default set of icons used by the composites directly (i.e. not via the components defined in this library).\n *\n * @public\n */\nexport const COMPOSITE_ONLY_ICONS: CompositeIcons = {\n ChevronLeft: undefined,\n Link: undefined,\n LobbyScreenConnectingToCall: <SpinnerIcon />,\n LobbyScreenWaitingToBeAdmitted: <SpinnerIcon />,\n LocalDeviceSettingsCamera: <Video20Filled />,\n LocalDeviceSettingsMic: <Mic20Filled />,\n LocalDeviceSettingsSpeaker: <Speaker220Filled />,\n LocalPreviewPlaceholder: <VideoOff20Filled />,\n LocalCameraSwitch: <CameraSwitch24Regular />,\n ControlBarChatButtonActive: <Chat20Filled />,\n ControlBarChatButtonInactive: <Chat20Regular />,\n /* @conditional-compile-remove(capabilities) */\n ControlButtonCameraProhibited: <VideoProhibited20Filled />,\n /* @conditional-compile-remove(capabilities) */\n ControlButtonMicProhibited: <MicProhibited20Filled />,\n /* @conditional-compile-remove(spotlight) */\n ControlButtonExitSpotlight: <VideoPersonStarOff20Filled />,\n ControlBarPeopleButton: <People20Regular />,\n MoreDrawerMicrophones: <Mic20Regular />,\n MoreDrawerPeople: <People20Regular />,\n MoreDrawerSpeakers: <Speaker220Regular />,\n MoreDrawerSelectedMicrophone: <Mic20Filled />,\n MoreDrawerSelectedSpeaker: <Speaker220Filled />,\n Muted: <MicOff20Filled />,\n NetworkReconnectIcon: <CallMissed20Filled />,\n NoticePageAccessDeniedTeamsMeeting: <PersonDelete20Filled />,\n NoticePageJoinCallFailedDueToNoNetwork: <WifiWarning20Filled />,\n NoticePageLeftCall: <CallEnd20Filled />,\n NoticePageRemovedFromCall: <Info20Filled />,\n /* @conditional-compile-remove(rooms) */\n NoticePageNotInvitedToRoom: <Info20Filled />,\n /* @conditional-compile-remove(rooms) */\n NoticePageRoomNotFound: <Info20Filled />,\n /* @conditional-compile-remove(rooms) */\n NoticePageRoomNotValid: <Info20Filled />,\n /* @conditional-compile-remove(calling-sounds) */\n NoticePageCallRejected: <Info20Filled />,\n NoticePageCallTimeout: <Info20Filled />,\n /* @conditional-compile-remove(file-sharing) */\n SendBoxAttachFile: <Attach20Regular />,\n /* @conditional-compile-remove(PSTN-calls) */\n PeoplePaneAddPerson: <PersonAdd20Regular />,\n /* @conditional-compile-remove(PSTN-calls) */\n PeoplePaneOpenDialpad: <Dialpad20Regular />,\n /* @conditional-compile-remove(PSTN-calls) */\n DialpadStartCall: <Call20Regular />,\n /* @conditional-compile-remove(rooms) */\n NoticePageInviteToRoomRemoved: <Info20Filled />,\n /* @conditional-compile-remove(video-background-effects) */\n BlurVideoBackground: <VideoBackgroundEffect20Regular />,\n /* @conditional-compile-remove(video-background-effects) */\n RemoveVideoBackgroundEffect: <VideoPerson20Filled />,\n /* @conditional-compile-remove(gallery-layouts) */\n GalleryOptions: <Grid20Regular />,\n /* @conditional-compile-remove(gallery-layouts) */\n OverflowGalleryTop: <WindowHeaderHorizontal20Regular />,\n /* @conditional-compile-remove(gallery-layouts) */\n SpeakerGalleryLayout: <PersonSquare20Regular />,\n /* @conditional-compile-remove(gallery-layouts) */\n DefaultGalleryLayout: <TableSimple20Regular />,\n /* @conditional-compile-remove(gallery-layouts) */\n FloatingLocalVideoGalleryLayout: <BoardSplit20Regular />,\n /* @conditional-compile-remove(gallery-layouts) */\n FocusedContentGalleryLayout: <ContentView20Regular />,\n /* @conditional-compile-remove(gallery-layouts) */\n LargeGalleryLayout: <Table20Regular />,\n /* @conditional-compile-remove(control-bar-button-injection) */\n DefaultCustomButton: <Circle20Regular />,\n /* @conditional-compile-remove(dtmf-dialer) */\n DtmfDialpadButton: <Dialpad20Regular />,\n /* @conditional-compile-remove(spotlight) */\n PeoplePaneMoreButton: <MoreHorizontal20Filled />,\n /* @conditional-compile-remove(spotlight) */\n StopAllSpotlightMenuButton: <VideoPersonStarOff20Filled />\n};\n\n/**\n * The default set of icons that are available to used in the Composites.\n *\n * @public\n */\nexport const DEFAULT_COMPOSITE_ICONS = {\n ...DEFAULT_COMPONENT_ICONS,\n ...COMPOSITE_ONLY_ICONS\n};\n\n/** @private */\nexport type CompositeIconProps<Icons> = IIconProps & { iconName: keyof Icons };\n\n/**\n * Icons that can be overridden for {@link ChatComposite}.\n *\n * @public\n */\nexport type ChatCompositeIcons = {\n EditBoxCancel?: JSX.Element;\n EditBoxSubmit?: JSX.Element;\n MessageDelivered?: JSX.Element;\n MessageEdit?: JSX.Element;\n MessageFailed?: JSX.Element;\n MessageRemove?: JSX.Element;\n MessageSeen?: JSX.Element;\n MessageSending?: JSX.Element;\n ParticipantItemOptions?: JSX.Element;\n ParticipantItemOptionsHovered?: JSX.Element;\n SendBoxSend?: JSX.Element;\n SendBoxSendHovered?: JSX.Element;\n /* @conditional-compile-remove(file-sharing) */\n SendBoxAttachFile?: JSX.Element;\n};\n\n/**\n * Icon wrapper to use when including customizable icons inside the ChatComposite.\n * This wrapper ensures the icon name is being type-checked helping ensure no typos\n * and ensure that icon is customizable through the composite API.\n *\n * @private\n */\nexport const ChatCompositeIcon = (props: CompositeIconProps<ChatCompositeIcons>): JSX.Element => (\n <FontIcon {...props} />\n);\n\n/**\n * Icons that can be overridden for {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositeIcons = {\n ControlBarPeopleButton?: JSX.Element;\n ControlButtonCameraOff?: JSX.Element;\n ControlButtonCameraOn?: JSX.Element;\n ControlButtonEndCall?: JSX.Element;\n ControlButtonMicOff?: JSX.Element;\n ControlButtonMicOn?: JSX.Element;\n ControlButtonOptions?: JSX.Element;\n ControlButtonParticipants?: JSX.Element;\n ControlButtonScreenShareStart?: JSX.Element;\n ControlButtonScreenShareStop?: JSX.Element;\n /* @conditional-compile-remove(capabilities) */\n ControlButtonCameraProhibited?: JSX.Element;\n /* @conditional-compile-remove(capabilities) */\n ControlButtonMicProhibited?: JSX.Element;\n /* @conditional-compile-remove(raise-hand) */\n ControlButtonRaiseHand?: JSX.Element;\n /* @conditional-compile-remove(raise-hand) */\n ControlButtonLowerHand?: JSX.Element;\n /* @conditional-compile-remove(spotlight) */\n ControlButtonExitSpotlight?: JSX.Element;\n /* @conditional-compile-remove(raise-hand) */\n RaiseHandContextualMenuItem?: JSX.Element;\n /* @conditional-compile-remove(reaction) */\n ReactionContextualMenuItem?: JSX.Element;\n LowerHandContextualMenuItem?: JSX.Element;\n /* @conditional-compile-remove(reaction) */\n ReactionButtonIcon?: JSX.Element;\n ErrorBarCallCameraAccessDenied?: JSX.Element;\n ErrorBarCallCameraAlreadyInUse?: JSX.Element;\n ErrorBarCallLocalVideoFreeze?: JSX.Element;\n ErrorBarCallMacOsCameraAccessDenied?: JSX.Element;\n ErrorBarCallMacOsMicrophoneAccessDenied?: JSX.Element;\n ErrorBarCallMicrophoneAccessDenied?: JSX.Element;\n ErrorBarCallMicrophoneMutedBySystem?: JSX.Element;\n ErrorBarCallMicrophoneUnmutedBySystem?: JSX.Element;\n ErrorBarCallNetworkQualityLow?: JSX.Element;\n ErrorBarCallNoMicrophoneFound?: JSX.Element;\n ErrorBarCallNoSpeakerFound?: JSX.Element;\n ErrorBarClear?: JSX.Element;\n HorizontalGalleryLeftButton?: JSX.Element;\n HorizontalGalleryRightButton?: JSX.Element;\n LobbyScreenConnectingToCall?: JSX.Element;\n LobbyScreenWaitingToBeAdmitted?: JSX.Element;\n LocalDeviceSettingsCamera?: JSX.Element;\n LocalDeviceSettingsMic?: JSX.Element;\n LocalDeviceSettingsSpeaker?: JSX.Element;\n LocalPreviewPlaceholder?: JSX.Element;\n Muted?: JSX.Element;\n NetworkReconnectIcon?: JSX.Element;\n NoticePageAccessDeniedTeamsMeeting?: JSX.Element;\n NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element;\n NoticePageLeftCall?: JSX.Element;\n NoticePageRemovedFromCall?: JSX.Element;\n /* @conditional-compile-remove(calling-sounds) */\n NoticePageCallRejected?: JSX.Element;\n /* @conditional-compile-remove(rooms) */\n NoticePageNotInvitedToRoom?: JSX.Element;\n /* @conditional-compile-remove(rooms) */\n NoticePageRoomNotFound?: JSX.Element;\n /* @conditional-compile-remove(rooms) */\n NoticePageRoomNotValid?: JSX.Element;\n NoticePageCallTimeout?: JSX.Element;\n OptionsCamera?: JSX.Element;\n OptionsMic?: JSX.Element;\n OptionsSpeaker?: JSX.Element;\n ParticipantItemMicOff?: JSX.Element;\n ParticipantItemOptions?: JSX.Element;\n ParticipantItemOptionsHovered?: JSX.Element;\n ParticipantItemScreenShareStart?: JSX.Element;\n VideoTileMicOff?: JSX.Element;\n LocalCameraSwitch?: JSX.Element;\n /* @conditional-compile-remove(PSTN-calls) */\n PeoplePaneAddPerson?: JSX.Element;\n /* @conditional-compile-remove(PSTN-calls) */\n PeoplePaneOpenDialpad?: JSX.Element;\n /* @conditional-compile-remove(PSTN-calls) */\n DialpadStartCall?: JSX.Element;\n /* @conditional-compile-remove(rooms) */\n NoticePageInviteToRoomRemoved?: JSX.Element;\n /* @conditional-compile-remove(video-background-effects) */\n BlurVideoBackground?: JSX.Element;\n /* @conditional-compile-remove(video-background-effects) */\n RemoveVideoBackgroundEffect?: JSX.Element;\n /* @conditional-compile-remove(gallery-layouts) */\n GalleryOptions?: JSX.Element;\n /* @conditional-compile-remove(gallery-layouts) */\n SpeakerGalleryLayout?: JSX.Element;\n /* @conditional-compile-remove(gallery-layouts) */\n FloatingLocalVideoGalleryLayout?: JSX.Element;\n /* @conditional-compile-remove(gallery-layouts) */\n DefaultGalleryLayout?: JSX.Element;\n /* @conditional-compile-remove(gallery-layouts) */\n FocusedContentGalleryLayout?: JSX.Element;\n /* @conditional-compile-remove(gallery-layouts) */\n OverflowGalleryTop?: JSX.Element;\n /* @conditional-compile-remove(gallery-layouts) */\n LargeGalleryLayout?: JSX.Element;\n /* @conditional-compile-remove(control-bar-button-injection) */\n DefaultCustomButton?: JSX.Element;\n /* @conditional-compile-remove(dtmf-dialer) */\n DtmfDialpadButton?: JSX.Element;\n /* @conditional-compile-remove(spotlight) */\n PeoplePaneMoreButton?: JSX.Element;\n /* @conditional-compile-remove(spotlight) */\n StopAllSpotlightMenuButton?: JSX.Element;\n};\n\n/**\n * Icon wrapper to use when including customizable icons inside the CallComposite.\n * This wrapper ensures the icon name is being type-checked helping ensure no typos\n * and ensure that icon is customizable through the composite API.\n *\n * @private\n */\nexport const CallCompositeIcon = (props: CompositeIconProps<CallCompositeIcons>): JSX.Element => (\n <FontIcon {...props} />\n);\n\n/**\n * Icons that can be overridden for {@link CallWithChatComposite}.\n *\n * @public\n */\nexport type CallWithChatCompositeIcons = {\n // CallWithChat Specific Icons\n ChevronLeft?: JSX.Element;\n ControlBarChatButtonActive?: JSX.Element;\n ControlBarChatButtonInactive?: JSX.Element;\n ControlBarPeopleButton?: JSX.Element;\n Link?: JSX.Element;\n MoreDrawerMicrophones?: JSX.Element;\n MoreDrawerPeople?: JSX.Element;\n MoreDrawerSelectedMicrophone?: JSX.Element;\n MoreDrawerSelectedSpeaker?: JSX.Element;\n MoreDrawerSpeakers?: JSX.Element;\n\n // Call icons\n ControlButtonCameraOff?: JSX.Element;\n ControlButtonCameraOn?: JSX.Element;\n ControlButtonEndCall?: JSX.Element;\n ControlButtonMicOff?: JSX.Element;\n ControlButtonMicOn?: JSX.Element;\n ControlButtonOptions?: JSX.Element;\n ControlButtonScreenShareStart?: JSX.Element;\n ControlButtonScreenShareStop?: JSX.Element;\n /* @conditional-compile-remove(capabilities) */\n ControlButtonCameraProhibited?: JSX.Element;\n /* @conditional-compile-remove(capabilities) */\n ControlButtonMicProhibited?: JSX.Element;\n ErrorBarCallCameraAccessDenied?: JSX.Element;\n ErrorBarCallCameraAlreadyInUse?: JSX.Element;\n ErrorBarCallLocalVideoFreeze?: JSX.Element;\n ErrorBarCallMacOsCameraAccessDenied?: JSX.Element;\n ErrorBarCallMacOsMicrophoneAccessDenied?: JSX.Element;\n ErrorBarCallMicrophoneAccessDenied?: JSX.Element;\n ErrorBarCallMicrophoneMutedBySystem?: JSX.Element;\n ErrorBarCallMicrophoneUnmutedBySystem?: JSX.Element;\n ErrorBarCallNetworkQualityLow?: JSX.Element;\n ErrorBarCallNoMicrophoneFound?: JSX.Element;\n ErrorBarCallNoSpeakerFound?: JSX.Element;\n ErrorBarClear?: JSX.Element;\n HorizontalGalleryLeftButton?: JSX.Element;\n HorizontalGalleryRightButton?: JSX.Element;\n LobbyScreenConnectingToCall?: JSX.Element;\n LobbyScreenWaitingToBeAdmitted?: JSX.Element;\n LocalDeviceSettingsCamera?: JSX.Element;\n LocalDeviceSettingsMic?: JSX.Element;\n LocalDeviceSettingsSpeaker?: JSX.Element;\n LocalPreviewPlaceholder?: JSX.Element;\n Muted?: JSX.Element;\n NetworkReconnectIcon?: JSX.Element;\n NoticePageAccessDeniedTeamsMeeting?: JSX.Element;\n NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element;\n NoticePageLeftCall?: JSX.Element;\n NoticePageRemovedFromCall?: JSX.Element;\n OptionsCamera?: JSX.Element;\n OptionsMic?: JSX.Element;\n OptionsSpeaker?: JSX.Element;\n ParticipantItemMicOff?: JSX.Element;\n ParticipantItemScreenShareStart?: JSX.Element;\n VideoTileMicOff?: JSX.Element;\n LocalCameraSwitch?: JSX.Element;\n /* @conditional-compile-remove(PSTN-calls) */\n PeoplePaneAddPerson?: JSX.Element;\n /* @conditional-compile-remove(PSTN-calls) */\n PeoplePaneOpenDialpad?: JSX.Element;\n /* @conditional-compile-remove(PSTN-calls) */\n DialpadStartCall?: JSX.Element;\n /* @conditional-compile-remove(control-bar-button-injection) */\n DefaultCustomButton?: JSX.Element;\n /* @conditional-compile-remove(dtmf-dialer) */\n DtmfDialpadButton?: JSX.Element;\n\n // Chat icons\n EditBoxCancel?: JSX.Element;\n EditBoxSubmit?: JSX.Element;\n MessageDelivered?: JSX.Element;\n MessageEdit?: JSX.Element;\n MessageFailed?: JSX.Element;\n MessageRemove?: JSX.Element;\n MessageSeen?: JSX.Element;\n MessageSending?: JSX.Element;\n SendBoxSend?: JSX.Element;\n SendBoxSendHovered?: JSX.Element;\n SendBoxAttachFile?: JSX.Element;\n\n // Icons common to Call and Chat.\n ParticipantItemOptions?: JSX.Element;\n ParticipantItemOptionsHovered?: JSX.Element;\n\n /* @conditional-compile-remove(spotlight) */\n PeoplePaneMoreButton?: JSX.Element;\n /* @conditional-compile-remove(spotlight) */\n StopAllSpotlightMenuButton?: JSX.Element;\n};\n\n/**\n * Icon wrapper to use when including customizable icons inside the CallWithChatComposite.\n * This wrapper ensures the icon name is being type-checked helping ensure no typos\n * and ensure that icon is customizable through the composite API.\n *\n * @private\n */\nexport const CallWithChatCompositeIcon = (props: CompositeIconProps<CallWithChatCompositeIcons>): JSX.Element => (\n <FontIcon {...props} />\n);\n\n/**\n * Icons that can be overridden in one of the composites exported by this library.\n *\n * See {@link ChatCompositeIcons}, {@link CallCompositeIcons} and {@link CallWithChatCompositeIcons} for more targeted types.\n *\n * @public\n */\nexport type CompositeIcons = ChatCompositeIcons & CallCompositeIcons & CallWithChatCompositeIcons;\n"]}
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/icons.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,cAAc,EACd,WAAW,EACX,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,gBAAgB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AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAqD,EAAe,EAAE,CAAC,CAC/G,oBAAC,QAAQ,oBAAK,KAAK,EAAI,CACxB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CallEnd20Filled,\n CallMissed20Filled,\n CameraSwitch24Regular,\n Chat20Filled,\n Chat20Regular,\n Info20Filled,\n MicOff20Filled,\n Mic20Filled,\n Mic20Regular,\n People20Regular,\n PersonDelete20Filled,\n Speaker220Filled,\n Speaker220Regular,\n Video20Filled,\n VideoOff20Filled,\n WifiWarning20Filled,\n Circle20Regular\n} from '@fluentui/react-icons';\n/* @conditional-compile-remove(spotlight) */\nimport { MoreHorizontal20Filled, VideoPersonStarOff20Filled } from '@fluentui/react-icons';\n/* @conditional-compile-remove(capabilities) */\nimport { MicProhibited20Filled, VideoProhibited20Filled } from '@fluentui/react-icons';\nimport { Grid20Regular } from '@fluentui/react-icons';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { PersonAdd20Regular, Call20Regular } from '@fluentui/react-icons';\n/* @conditional-compile-remove(dtmf-dialer) */\nimport { Dialpad20Regular } from '@fluentui/react-icons';\nimport { DEFAULT_COMPONENT_ICONS } from '@internal/react-components';\nimport React from 'react';\n// eslint-disable-next-line no-restricted-imports\nimport { FontIcon, IIconProps, Spinner, SpinnerSize } from '@fluentui/react';\n/* @conditional-compile-remove(file-sharing) */\nimport { Attach20Regular } from '@fluentui/react-icons';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoBackgroundEffect20Regular, VideoPerson20Filled } from '@fluentui/react-icons';\nimport {\n PersonSquare20Regular,\n WindowHeaderHorizontal20Regular,\n TableSimple20Regular,\n BoardSplit20Regular,\n ContentView20Regular,\n Table20Regular\n} from '@fluentui/react-icons';\n\nconst SpinnerIcon = (): JSX.Element => <Spinner size={SpinnerSize.large} />;\n\n/**\n * The default set of icons used by the composites directly (i.e. not via the components defined in this library).\n *\n * @public\n */\nexport const COMPOSITE_ONLY_ICONS: CompositeIcons = {\n ChevronLeft: undefined,\n Link: undefined,\n LobbyScreenConnectingToCall: <SpinnerIcon />,\n LobbyScreenWaitingToBeAdmitted: <SpinnerIcon />,\n LocalDeviceSettingsCamera: <Video20Filled />,\n LocalDeviceSettingsMic: <Mic20Filled />,\n LocalDeviceSettingsSpeaker: <Speaker220Filled />,\n LocalPreviewPlaceholder: <VideoOff20Filled />,\n LocalCameraSwitch: <CameraSwitch24Regular />,\n ControlBarChatButtonActive: <Chat20Filled />,\n ControlBarChatButtonInactive: <Chat20Regular />,\n /* @conditional-compile-remove(capabilities) */\n ControlButtonCameraProhibited: <VideoProhibited20Filled />,\n /* @conditional-compile-remove(capabilities) */\n ControlButtonMicProhibited: <MicProhibited20Filled />,\n /* @conditional-compile-remove(spotlight) */\n ControlButtonExitSpotlight: <VideoPersonStarOff20Filled />,\n ControlBarPeopleButton: <People20Regular />,\n MoreDrawerMicrophones: <Mic20Regular />,\n MoreDrawerPeople: <People20Regular />,\n MoreDrawerSpeakers: <Speaker220Regular />,\n MoreDrawerSelectedMicrophone: <Mic20Filled />,\n MoreDrawerSelectedSpeaker: <Speaker220Filled />,\n Muted: <MicOff20Filled />,\n NetworkReconnectIcon: <CallMissed20Filled />,\n NoticePageAccessDeniedTeamsMeeting: <PersonDelete20Filled />,\n NoticePageJoinCallFailedDueToNoNetwork: <WifiWarning20Filled />,\n NoticePageLeftCall: <CallEnd20Filled />,\n NoticePageRemovedFromCall: <Info20Filled />,\n /* @conditional-compile-remove(rooms) */\n NoticePageNotInvitedToRoom: <Info20Filled />,\n /* @conditional-compile-remove(rooms) */\n NoticePageRoomNotFound: <Info20Filled />,\n /* @conditional-compile-remove(rooms) */\n NoticePageRoomNotValid: <Info20Filled />,\n /* @conditional-compile-remove(calling-sounds) */\n NoticePageCallRejected: <Info20Filled />,\n NoticePageCallTimeout: <Info20Filled />,\n /* @conditional-compile-remove(file-sharing) */\n SendBoxAttachFile: <Attach20Regular />,\n /* @conditional-compile-remove(PSTN-calls) */\n PeoplePaneAddPerson: <PersonAdd20Regular />,\n /* @conditional-compile-remove(PSTN-calls) */\n PeoplePaneOpenDialpad: <Dialpad20Regular />,\n /* @conditional-compile-remove(PSTN-calls) */\n DialpadStartCall: <Call20Regular />,\n /* @conditional-compile-remove(rooms) */\n NoticePageInviteToRoomRemoved: <Info20Filled />,\n /* @conditional-compile-remove(video-background-effects) */\n BlurVideoBackground: <VideoBackgroundEffect20Regular />,\n /* @conditional-compile-remove(video-background-effects) */\n RemoveVideoBackgroundEffect: <VideoPerson20Filled />,\n GalleryOptions: <Grid20Regular />,\n OverflowGalleryTop: <WindowHeaderHorizontal20Regular />,\n SpeakerGalleryLayout: <PersonSquare20Regular />,\n DefaultGalleryLayout: <TableSimple20Regular />,\n FloatingLocalVideoGalleryLayout: <BoardSplit20Regular />,\n FocusedContentGalleryLayout: <ContentView20Regular />,\n LargeGalleryLayout: <Table20Regular />,\n /* @conditional-compile-remove(control-bar-button-injection) */\n DefaultCustomButton: <Circle20Regular />,\n /* @conditional-compile-remove(dtmf-dialer) */\n DtmfDialpadButton: <Dialpad20Regular />,\n /* @conditional-compile-remove(spotlight) */\n PeoplePaneMoreButton: <MoreHorizontal20Filled />,\n /* @conditional-compile-remove(spotlight) */\n StopAllSpotlightMenuButton: <VideoPersonStarOff20Filled />\n};\n\n/**\n * The default set of icons that are available to used in the Composites.\n *\n * @public\n */\nexport const DEFAULT_COMPOSITE_ICONS = {\n ...DEFAULT_COMPONENT_ICONS,\n ...COMPOSITE_ONLY_ICONS\n};\n\n/** @private */\nexport type CompositeIconProps<Icons> = IIconProps & { iconName: keyof Icons };\n\n/**\n * Icons that can be overridden for {@link ChatComposite}.\n *\n * @public\n */\nexport type ChatCompositeIcons = {\n EditBoxCancel?: JSX.Element;\n EditBoxSubmit?: JSX.Element;\n MessageDelivered?: JSX.Element;\n MessageEdit?: JSX.Element;\n MessageFailed?: JSX.Element;\n MessageRemove?: JSX.Element;\n MessageSeen?: JSX.Element;\n MessageSending?: JSX.Element;\n ParticipantItemOptions?: JSX.Element;\n ParticipantItemOptionsHovered?: JSX.Element;\n SendBoxSend?: JSX.Element;\n SendBoxSendHovered?: JSX.Element;\n /* @conditional-compile-remove(file-sharing) */\n SendBoxAttachFile?: JSX.Element;\n};\n\n/**\n * Icon wrapper to use when including customizable icons inside the ChatComposite.\n * This wrapper ensures the icon name is being type-checked helping ensure no typos\n * and ensure that icon is customizable through the composite API.\n *\n * @private\n */\nexport const ChatCompositeIcon = (props: CompositeIconProps<ChatCompositeIcons>): JSX.Element => (\n <FontIcon {...props} />\n);\n\n/**\n * Icons that can be overridden for {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositeIcons = {\n ControlBarPeopleButton?: JSX.Element;\n ControlButtonCameraOff?: JSX.Element;\n ControlButtonCameraOn?: JSX.Element;\n ControlButtonEndCall?: JSX.Element;\n ControlButtonMicOff?: JSX.Element;\n ControlButtonMicOn?: JSX.Element;\n ControlButtonOptions?: JSX.Element;\n ControlButtonParticipants?: JSX.Element;\n ControlButtonScreenShareStart?: JSX.Element;\n ControlButtonScreenShareStop?: JSX.Element;\n /* @conditional-compile-remove(capabilities) */\n ControlButtonCameraProhibited?: JSX.Element;\n /* @conditional-compile-remove(capabilities) */\n ControlButtonMicProhibited?: JSX.Element;\n /* @conditional-compile-remove(raise-hand) */\n ControlButtonRaiseHand?: JSX.Element;\n /* @conditional-compile-remove(raise-hand) */\n ControlButtonLowerHand?: JSX.Element;\n /* @conditional-compile-remove(spotlight) */\n ControlButtonExitSpotlight?: JSX.Element;\n /* @conditional-compile-remove(raise-hand) */\n RaiseHandContextualMenuItem?: JSX.Element;\n /* @conditional-compile-remove(reaction) */\n ReactionContextualMenuItem?: JSX.Element;\n LowerHandContextualMenuItem?: JSX.Element;\n /* @conditional-compile-remove(reaction) */\n ReactionButtonIcon?: JSX.Element;\n ErrorBarCallCameraAccessDenied?: JSX.Element;\n ErrorBarCallCameraAlreadyInUse?: JSX.Element;\n ErrorBarCallLocalVideoFreeze?: JSX.Element;\n ErrorBarCallMacOsCameraAccessDenied?: JSX.Element;\n ErrorBarCallMacOsMicrophoneAccessDenied?: JSX.Element;\n ErrorBarCallMicrophoneAccessDenied?: JSX.Element;\n ErrorBarCallMicrophoneMutedBySystem?: JSX.Element;\n ErrorBarCallMicrophoneUnmutedBySystem?: JSX.Element;\n ErrorBarCallNetworkQualityLow?: JSX.Element;\n ErrorBarCallNoMicrophoneFound?: JSX.Element;\n ErrorBarCallNoSpeakerFound?: JSX.Element;\n ErrorBarClear?: JSX.Element;\n HorizontalGalleryLeftButton?: JSX.Element;\n HorizontalGalleryRightButton?: JSX.Element;\n LobbyScreenConnectingToCall?: JSX.Element;\n LobbyScreenWaitingToBeAdmitted?: JSX.Element;\n LocalDeviceSettingsCamera?: JSX.Element;\n LocalDeviceSettingsMic?: JSX.Element;\n LocalDeviceSettingsSpeaker?: JSX.Element;\n LocalPreviewPlaceholder?: JSX.Element;\n Muted?: JSX.Element;\n NetworkReconnectIcon?: JSX.Element;\n NoticePageAccessDeniedTeamsMeeting?: JSX.Element;\n NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element;\n NoticePageLeftCall?: JSX.Element;\n NoticePageRemovedFromCall?: JSX.Element;\n /* @conditional-compile-remove(calling-sounds) */\n NoticePageCallRejected?: JSX.Element;\n /* @conditional-compile-remove(rooms) */\n NoticePageNotInvitedToRoom?: JSX.Element;\n /* @conditional-compile-remove(rooms) */\n NoticePageRoomNotFound?: JSX.Element;\n /* @conditional-compile-remove(rooms) */\n NoticePageRoomNotValid?: JSX.Element;\n NoticePageCallTimeout?: JSX.Element;\n OptionsCamera?: JSX.Element;\n OptionsMic?: JSX.Element;\n OptionsSpeaker?: JSX.Element;\n ParticipantItemMicOff?: JSX.Element;\n ParticipantItemOptions?: JSX.Element;\n ParticipantItemOptionsHovered?: JSX.Element;\n ParticipantItemScreenShareStart?: JSX.Element;\n VideoTileMicOff?: JSX.Element;\n LocalCameraSwitch?: JSX.Element;\n /* @conditional-compile-remove(PSTN-calls) */\n PeoplePaneAddPerson?: JSX.Element;\n /* @conditional-compile-remove(PSTN-calls) */\n PeoplePaneOpenDialpad?: JSX.Element;\n /* @conditional-compile-remove(PSTN-calls) */\n DialpadStartCall?: JSX.Element;\n /* @conditional-compile-remove(rooms) */\n NoticePageInviteToRoomRemoved?: JSX.Element;\n /* @conditional-compile-remove(video-background-effects) */\n BlurVideoBackground?: JSX.Element;\n /* @conditional-compile-remove(video-background-effects) */\n RemoveVideoBackgroundEffect?: JSX.Element;\n GalleryOptions?: JSX.Element;\n SpeakerGalleryLayout?: JSX.Element;\n FloatingLocalVideoGalleryLayout?: JSX.Element;\n DefaultGalleryLayout?: JSX.Element;\n FocusedContentGalleryLayout?: JSX.Element;\n OverflowGalleryTop?: JSX.Element;\n LargeGalleryLayout?: JSX.Element;\n /* @conditional-compile-remove(control-bar-button-injection) */\n DefaultCustomButton?: JSX.Element;\n /* @conditional-compile-remove(dtmf-dialer) */\n DtmfDialpadButton?: JSX.Element;\n /* @conditional-compile-remove(spotlight) */\n PeoplePaneMoreButton?: JSX.Element;\n /* @conditional-compile-remove(spotlight) */\n StopAllSpotlightMenuButton?: JSX.Element;\n};\n\n/**\n * Icon wrapper to use when including customizable icons inside the CallComposite.\n * This wrapper ensures the icon name is being type-checked helping ensure no typos\n * and ensure that icon is customizable through the composite API.\n *\n * @private\n */\nexport const CallCompositeIcon = (props: CompositeIconProps<CallCompositeIcons>): JSX.Element => (\n <FontIcon {...props} />\n);\n\n/**\n * Icons that can be overridden for {@link CallWithChatComposite}.\n *\n * @public\n */\nexport type CallWithChatCompositeIcons = {\n // CallWithChat Specific Icons\n ChevronLeft?: JSX.Element;\n ControlBarChatButtonActive?: JSX.Element;\n ControlBarChatButtonInactive?: JSX.Element;\n ControlBarPeopleButton?: JSX.Element;\n Link?: JSX.Element;\n MoreDrawerMicrophones?: JSX.Element;\n MoreDrawerPeople?: JSX.Element;\n MoreDrawerSelectedMicrophone?: JSX.Element;\n MoreDrawerSelectedSpeaker?: JSX.Element;\n MoreDrawerSpeakers?: JSX.Element;\n\n // Call icons\n ControlButtonCameraOff?: JSX.Element;\n ControlButtonCameraOn?: JSX.Element;\n ControlButtonEndCall?: JSX.Element;\n ControlButtonMicOff?: JSX.Element;\n ControlButtonMicOn?: JSX.Element;\n ControlButtonOptions?: JSX.Element;\n ControlButtonScreenShareStart?: JSX.Element;\n ControlButtonScreenShareStop?: JSX.Element;\n /* @conditional-compile-remove(capabilities) */\n ControlButtonCameraProhibited?: JSX.Element;\n /* @conditional-compile-remove(capabilities) */\n ControlButtonMicProhibited?: JSX.Element;\n ErrorBarCallCameraAccessDenied?: JSX.Element;\n ErrorBarCallCameraAlreadyInUse?: JSX.Element;\n ErrorBarCallLocalVideoFreeze?: JSX.Element;\n ErrorBarCallMacOsCameraAccessDenied?: JSX.Element;\n ErrorBarCallMacOsMicrophoneAccessDenied?: JSX.Element;\n ErrorBarCallMicrophoneAccessDenied?: JSX.Element;\n ErrorBarCallMicrophoneMutedBySystem?: JSX.Element;\n ErrorBarCallMicrophoneUnmutedBySystem?: JSX.Element;\n ErrorBarCallNetworkQualityLow?: JSX.Element;\n ErrorBarCallNoMicrophoneFound?: JSX.Element;\n ErrorBarCallNoSpeakerFound?: JSX.Element;\n ErrorBarClear?: JSX.Element;\n HorizontalGalleryLeftButton?: JSX.Element;\n HorizontalGalleryRightButton?: JSX.Element;\n LobbyScreenConnectingToCall?: JSX.Element;\n LobbyScreenWaitingToBeAdmitted?: JSX.Element;\n LocalDeviceSettingsCamera?: JSX.Element;\n LocalDeviceSettingsMic?: JSX.Element;\n LocalDeviceSettingsSpeaker?: JSX.Element;\n LocalPreviewPlaceholder?: JSX.Element;\n Muted?: JSX.Element;\n NetworkReconnectIcon?: JSX.Element;\n NoticePageAccessDeniedTeamsMeeting?: JSX.Element;\n NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element;\n NoticePageLeftCall?: JSX.Element;\n NoticePageRemovedFromCall?: JSX.Element;\n OptionsCamera?: JSX.Element;\n OptionsMic?: JSX.Element;\n OptionsSpeaker?: JSX.Element;\n ParticipantItemMicOff?: JSX.Element;\n ParticipantItemScreenShareStart?: JSX.Element;\n VideoTileMicOff?: JSX.Element;\n LocalCameraSwitch?: JSX.Element;\n /* @conditional-compile-remove(PSTN-calls) */\n PeoplePaneAddPerson?: JSX.Element;\n /* @conditional-compile-remove(PSTN-calls) */\n PeoplePaneOpenDialpad?: JSX.Element;\n /* @conditional-compile-remove(PSTN-calls) */\n DialpadStartCall?: JSX.Element;\n /* @conditional-compile-remove(control-bar-button-injection) */\n DefaultCustomButton?: JSX.Element;\n /* @conditional-compile-remove(dtmf-dialer) */\n DtmfDialpadButton?: JSX.Element;\n\n // Chat icons\n EditBoxCancel?: JSX.Element;\n EditBoxSubmit?: JSX.Element;\n MessageDelivered?: JSX.Element;\n MessageEdit?: JSX.Element;\n MessageFailed?: JSX.Element;\n MessageRemove?: JSX.Element;\n MessageSeen?: JSX.Element;\n MessageSending?: JSX.Element;\n SendBoxSend?: JSX.Element;\n SendBoxSendHovered?: JSX.Element;\n SendBoxAttachFile?: JSX.Element;\n\n // Icons common to Call and Chat.\n ParticipantItemOptions?: JSX.Element;\n ParticipantItemOptionsHovered?: JSX.Element;\n\n /* @conditional-compile-remove(spotlight) */\n PeoplePaneMoreButton?: JSX.Element;\n /* @conditional-compile-remove(spotlight) */\n StopAllSpotlightMenuButton?: JSX.Element;\n};\n\n/**\n * Icon wrapper to use when including customizable icons inside the CallWithChatComposite.\n * This wrapper ensures the icon name is being type-checked helping ensure no typos\n * and ensure that icon is customizable through the composite API.\n *\n * @private\n */\nexport const CallWithChatCompositeIcon = (props: CompositeIconProps<CallWithChatCompositeIcons>): JSX.Element => (\n <FontIcon {...props} />\n);\n\n/**\n * Icons that can be overridden in one of the composites exported by this library.\n *\n * See {@link ChatCompositeIcons}, {@link CallCompositeIcons} and {@link CallWithChatCompositeIcons} for more targeted types.\n *\n * @public\n */\nexport type CompositeIcons = ChatCompositeIcons & CallCompositeIcons & CallWithChatCompositeIcons;\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@azure/communication-react",
|
3
|
-
"version": "1.14.0-alpha-
|
3
|
+
"version": "1.14.0-alpha-202403070010",
|
4
4
|
"sideEffects": false,
|
5
5
|
"description": "React library for building modern communication user experiences utilizing Azure Communication Services",
|
6
6
|
"keywords": [
|
@@ -56,7 +56,7 @@
|
|
56
56
|
"uuid": "^9.0.0"
|
57
57
|
},
|
58
58
|
"peerDependencies": {
|
59
|
-
"@azure/communication-calling": "1.
|
59
|
+
"@azure/communication-calling": "1.23.1-beta.2",
|
60
60
|
"@azure/communication-calling-effects": "1.0.1",
|
61
61
|
"@azure/communication-chat": "1.5.0-beta.1",
|
62
62
|
"@types/react": ">=16.8.0 <19.0.0",
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { BaseCustomStyles } from '../../types';
|
3
|
-
import { RichTextEditorComponentRef } from './RichTextEditor';
|
4
|
-
import { RichTextSendBoxStrings } from './RTESendBox';
|
5
|
-
/**
|
6
|
-
* @private
|
7
|
-
*/
|
8
|
-
export interface RTEInputBoxComponentStylesProps extends BaseCustomStyles {
|
9
|
-
}
|
10
|
-
/**
|
11
|
-
* @private
|
12
|
-
*/
|
13
|
-
export interface RTEInputBoxComponentProps {
|
14
|
-
placeholderText?: string;
|
15
|
-
initialContent?: string;
|
16
|
-
onChange: (newValue?: string) => void;
|
17
|
-
editorComponentRef: React.RefObject<RichTextEditorComponentRef>;
|
18
|
-
strings: Partial<RichTextSendBoxStrings>;
|
19
|
-
disabled: boolean;
|
20
|
-
}
|
21
|
-
/**
|
22
|
-
* @private
|
23
|
-
*/
|
24
|
-
export declare const RTEInputBoxComponent: (props: RTEInputBoxComponentProps) => JSX.Element;
|
25
|
-
//# sourceMappingURL=RTEInputBoxComponent.d.ts.map
|
@@ -1,21 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
import React from 'react';
|
4
|
-
import { RichTextEditor } from './RichTextEditor';
|
5
|
-
import { borderAndBoxShadowStyle } from '../styles/SendBox.styles';
|
6
|
-
import { useTheme } from '../../theming';
|
7
|
-
/**
|
8
|
-
* @private
|
9
|
-
*/
|
10
|
-
export const RTEInputBoxComponent = (props) => {
|
11
|
-
const { placeholderText, initialContent, onChange, editorComponentRef, disabled } = props;
|
12
|
-
const theme = useTheme();
|
13
|
-
return (React.createElement("div", { className: borderAndBoxShadowStyle({
|
14
|
-
theme: theme,
|
15
|
-
// should always be false as we don't want to show the border when there is an error
|
16
|
-
hasErrorMessage: false,
|
17
|
-
disabled: !!disabled
|
18
|
-
}) },
|
19
|
-
React.createElement(RichTextEditor, { initialContent: initialContent, placeholderText: placeholderText, onChange: onChange, ref: editorComponentRef, strings: props.strings })));
|
20
|
-
};
|
21
|
-
//# sourceMappingURL=RTEInputBoxComponent.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"RTEInputBoxComponent.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/RTE/RTEInputBoxComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAA8B,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAmBzC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;IACpF,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC1F,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,OAAO,CACL,6BACE,SAAS,EAAE,uBAAuB,CAAC;YACjC,KAAK,EAAE,KAAK;YACZ,oFAAoF;YACpF,eAAe,EAAE,KAAK;YACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ;SACrB,CAAC;QAGF,oBAAC,cAAc,IACb,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,kBAAkB,EACvB,OAAO,EAAE,KAAK,CAAC,OAAO,GACtB,CACE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { BaseCustomStyles } from '../../types';\nimport { RichTextEditor, RichTextEditorComponentRef } from './RichTextEditor';\nimport { RichTextSendBoxStrings } from './RTESendBox';\nimport { borderAndBoxShadowStyle } from '../styles/SendBox.styles';\nimport { useTheme } from '../../theming';\n\n/**\n * @private\n */\nexport interface RTEInputBoxComponentStylesProps extends BaseCustomStyles {}\n\n/**\n * @private\n */\nexport interface RTEInputBoxComponentProps {\n placeholderText?: string;\n initialContent?: string;\n onChange: (newValue?: string) => void;\n editorComponentRef: React.RefObject<RichTextEditorComponentRef>;\n strings: Partial<RichTextSendBoxStrings>;\n disabled: boolean;\n}\n\n/**\n * @private\n */\nexport const RTEInputBoxComponent = (props: RTEInputBoxComponentProps): JSX.Element => {\n const { placeholderText, initialContent, onChange, editorComponentRef, disabled } = props;\n const theme = useTheme();\n\n return (\n <div\n className={borderAndBoxShadowStyle({\n theme: theme,\n // should always be false as we don't want to show the border when there is an error\n hasErrorMessage: false,\n disabled: !!disabled\n })}\n >\n {/* File Upload */}\n <RichTextEditor\n initialContent={initialContent}\n placeholderText={placeholderText}\n onChange={onChange}\n ref={editorComponentRef}\n strings={props.strings}\n />\n </div>\n );\n};\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"RTERibbonButtons.js","sourceRoot":"","sources":["../../../../../../../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BAAmB,CAAC,KAAK,CAAC;QAC1B,gBAAgB,CAAC,KAAK,CAAC;QACvB,gBAAgB,CAAC,KAAK,CAAC;QACvB,oBAAoB,CAAC,KAAK,CAAC;QAC3B,oBAAoB,CAAC,KAAK,CAAC;KAC5B,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACjB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAwC,EAA4B,EAAE;IACzG,OAAO;QACL,cAAc,EAAE,OAAO,CAAC,WAAW;QACnC,gBAAgB,EAAE,OAAO,CAAC,aAAa;QACvC,mBAAmB,EAAE,OAAO,CAAC,gBAAgB;QAC7C,sBAAsB,EAAE,OAAO,CAAC,iBAAiB;QACjD,sBAAsB,EAAE,OAAO,CAAC,iBAAiB;QACjD,wBAAwB,EAAE,OAAO,CAAC,qBAAqB;QACvD,wBAAwB,EAAE,OAAO,CAAC,qBAAqB;KACxD,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Theme } from '@fluentui/react';\nimport { KnownRibbonButtonKey, LocalizedStrings, RibbonButton, getButtons } from 'roosterjs-react';\nimport { ribbonButtonStyle, ribbonDividerStyle } from '../styles/RichTextEditor.styles';\nimport { RichTextSendBoxStrings } from './RTESendBox';\n\nconst dividerRibbonButton = (theme: Theme): RibbonButton<string> => {\n return {\n key: 'Divider',\n iconName: 'RTEDividerIcon',\n unlocalizedText: '',\n onClick: () => {},\n isDisabled: () => true,\n commandBarProperties: {\n buttonStyles: ribbonDividerStyle(theme)\n }\n };\n};\n\nconst boldButton = (theme: Theme): RibbonButton<string> | undefined => {\n return createKnownRibbonButton(KnownRibbonButtonKey.Bold, theme, 'RTEBoldButtonIcon');\n};\n\nconst italicButton = (theme: Theme): RibbonButton<string> | undefined => {\n return createKnownRibbonButton(KnownRibbonButtonKey.Italic, theme, 'RTEItalicButtonIcon');\n};\n\nconst underlineButton = (theme: Theme): RibbonButton<string> | undefined => {\n return createKnownRibbonButton(KnownRibbonButtonKey.Underline, theme, 'RTEUnderlineButtonIcon');\n};\n\nconst bulletListButton = (theme: Theme): RibbonButton<string> | undefined => {\n return createKnownRibbonButton(KnownRibbonButtonKey.BulletedList, theme, 'RTEBulletListButtonIcon');\n};\n\nconst numberListButton = (theme: Theme): RibbonButton<string> | undefined => {\n return createKnownRibbonButton(KnownRibbonButtonKey.NumberedList, theme, 'RTEtNumberListButtonIcon');\n};\n\nconst indentIncreaseButton = (theme: Theme): RibbonButton<string> | undefined => {\n return createKnownRibbonButton(KnownRibbonButtonKey.IncreaseIndent, theme, 'RTEIndentIncreaseButtonIcon');\n};\n\nconst indentDecreaseButton = (theme: Theme): RibbonButton<string> | undefined => {\n return createKnownRibbonButton(KnownRibbonButtonKey.DecreaseIndent, theme, 'RTEIndentDecreaseButtonIcon');\n};\n\nconst createKnownRibbonButton = (\n key: KnownRibbonButtonKey,\n theme: Theme,\n icon: string\n): RibbonButton<string> | undefined => {\n const buttons = getButtons([key]);\n if (buttons.length > 0) {\n const button = buttons[0];\n // AllButtonStringKeys is a union of all the string keys of all the buttons\n const result = buttons[0] as RibbonButton<typeof button.key>;\n button.iconName = icon;\n button.commandBarProperties = {\n ...button.commandBarProperties,\n buttonStyles: {\n ...button.commandBarProperties?.buttonStyles,\n ...ribbonButtonStyle(theme)\n },\n canCheck: false\n };\n return result;\n }\n return undefined;\n};\n\n/**\n * @private\n */\nexport const ribbonButtons = (theme: Theme): RibbonButton<string>[] => {\n const buttons: RibbonButton<string>[] = [];\n [\n boldButton(theme),\n italicButton(theme),\n underlineButton(theme),\n dividerRibbonButton(theme),\n bulletListButton(theme),\n numberListButton(theme),\n indentIncreaseButton(theme),\n indentDecreaseButton(theme)\n ].forEach((item) => {\n if (item !== undefined) {\n buttons.push(item);\n }\n });\n\n return buttons;\n};\n\n/**\n * @private\n */\nexport const ribbonButtonsStrings = (strings: Partial<RichTextSendBoxStrings>): LocalizedStrings<string> => {\n return {\n buttonNameBold: strings.boldTooltip,\n buttonNameItalic: strings.italicTooltip,\n buttonNameUnderline: strings.underlineTooltip,\n buttonNameBulletedList: strings.bulletListTooltip,\n buttonNameNumberedList: strings.numberListTooltip,\n buttonNameIncreaseIndent: strings.increaseIndentTooltip,\n buttonNameDecreaseIndent: strings.decreaseIndentTooltip\n };\n};\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"RTESendBox.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/RTE/RTESendBox.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAK7E,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC9E,+CAA+C;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAqFzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAA2B,EA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C;oBACrB,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,gFAAgF;gBACvG,CAAC,EACD,SAAS,EAAE,eAAe,EAC1B,SAAS,EAAE,aAAa,CAAC,mBAAmB,EAC5C,cAAc,EAAE,aAAa,CAAC,mBAAmB,GACjD,CACS,CACP,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { RTEInputBoxComponent } from './RTEInputBoxComponent';\nimport { Icon, Stack } from '@fluentui/react';\nimport { useLocale } from '../../localization';\nimport { SendBoxStrings } from '../SendBox';\nimport { sendButtonStyle, sendIconStyle } from '../styles/SendBox.styles';\nimport { InputBoxButton } from '../InputBoxButton';\nimport { RTESendBoxErrors, RTESendBoxErrorsProps } from './RTESendBoxErrors';\n/* @conditional-compile-remove(file-sharing) */\nimport { ActiveFileUpload } from '../FileUploadCards';\n/* @conditional-compile-remove(file-sharing) */\nimport { SendBoxErrorBarError } from '../SendBoxErrorBar';\nimport { exceedsMaxAllowedLength, sanitizeText } from '../utils/SendBoxUtils';\n/* @conditional-compile-remove(file-sharing) */\nimport { hasCompletedFileUploads } from '../utils/SendBoxUtils';\nimport { RichTextEditorComponentRef } from './RichTextEditor';\nimport { useTheme } from '../../theming';\n\n/**\n * Strings of {@link RichTextSendBox} that can be overridden.\n *\n * @beta\n */\nexport interface RichTextSendBoxStrings extends SendBoxStrings {\n /**\n * Tooltip text for the bold button.\n */\n boldTooltip: string;\n /**\n * Tooltip text for the italic button.\n */\n italicTooltip: string;\n /**\n * Tooltip text for the underline button.\n */\n underlineTooltip: string;\n /**\n * Tooltip text for the bullet list button.\n */\n bulletListTooltip: string;\n /**\n * Tooltip text for the number list button.\n */\n numberListTooltip: string;\n /**\n * Tooltip text for the increase indent button.\n */\n increaseIndentTooltip: string;\n /**\n * Tooltip text for the decrease indent button.\n */\n decreaseIndentTooltip: string;\n}\n\n/**\n * Props for {@link RichTextSendBox}.\n *\n * @beta\n */\nexport interface RichTextSendBoxProps {\n /**\n * Optional boolean to disable text box\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<RichTextSendBoxStrings>;\n /**\n * Optional text for system message above the text box\n */\n systemMessage?: string;\n /* @conditional-compile-remove(file-sharing) */\n /**\n * Optional callback to render uploaded files in the SendBox. The sendBox will expand\n * vertically to accommodate the uploaded files. File uploads will\n * be rendered below the text area in sendBox.\n * @beta\n */\n onRenderFileUploads?: () => JSX.Element;\n /* @conditional-compile-remove(file-sharing) */\n /**\n * Optional array of active file uploads where each object has attributes\n * of a file upload like name, progress, errorMessage etc.\n * @beta\n */\n activeFileUploads?: ActiveFileUpload[];\n /* @conditional-compile-remove(file-sharing) */\n /**\n * Optional callback to remove the file upload before sending by clicking on\n * cancel icon.\n * @beta\n */\n onCancelFileUpload?: (fileId: string) => void;\n /**\n * Callback function used when the send button is clicked.\n */\n onSendMessage: (content: string) => Promise<void>;\n}\n\n/**\n * A component to render SendBox with Rich Text Editor support.\n *\n * @beta\n */\nexport const RichTextSendBox = (props: RichTextSendBoxProps): JSX.Element => {\n const {\n disabled = false,\n systemMessage,\n onSendMessage,\n /* @conditional-compile-remove(file-sharing) */\n activeFileUploads\n } = props;\n\n const theme = useTheme();\n const locale = useLocale();\n\n const localeStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return locale.strings.richTextSendBox;\n return locale.strings.sendBox;\n }, [/* @conditional-compile-remove(rich-text-editor) */ locale.strings.richTextSendBox, locale.strings.sendBox]);\n\n const strings = { ...localeStrings, ...props.strings };\n\n const [contentValue, setContentValue] = useState('');\n const [contentValueOverflow, setContentValueOverflow] = useState(false);\n /* @conditional-compile-remove(file-sharing) */\n const [fileUploadsPendingError, setFileUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(undefined);\n const editorComponentRef = useRef<RichTextEditorComponentRef>(null);\n\n const contentTooLongMessage = useMemo(\n () => (contentValueOverflow ? strings.textTooLong : undefined),\n [contentValueOverflow, strings.textTooLong]\n );\n\n const setContent = useCallback((newValue?: string): void => {\n if (newValue === undefined) {\n return;\n }\n\n setContentValueOverflow(exceedsMaxAllowedLength(newValue.length));\n setContentValue(newValue);\n }, []);\n\n const sendMessageOnClick = (): void => {\n if (disabled || contentValueOverflow) {\n return;\n }\n // Don't send message until all files have been uploaded successfully\n /* @conditional-compile-remove(file-sharing) */\n setFileUploadsPendingError(undefined);\n\n // if (hasIncompleteFileUploads(activeFileUploads)) {\n // setFileUploadsPendingError({ message: strings.fileUploadsPendingError, timestamp: Date.now() });\n // return;\n // }\n\n const message = contentValue;\n // we don't want to send empty messages including spaces, newlines, tabs\n // Message can be empty if there is a valid file upload\n if (\n sanitizeText(message).length > 0 ||\n /* @conditional-compile-remove(file-sharing) */ hasCompletedFileUploads(activeFileUploads)\n ) {\n onSendMessage(message);\n setContentValue('');\n }\n editorComponentRef.current?.focus();\n };\n\n const hasErrorMessage = useMemo(() => {\n return (\n !!systemMessage ||\n !!contentTooLongMessage ||\n /* @conditional-compile-remove(file-sharing) */\n !!fileUploadsPendingError ||\n /* @conditional-compile-remove(file-sharing) */\n !!activeFileUploads?.filter((fileUpload) => fileUpload.error).pop()?.error\n );\n }, [\n /* @conditional-compile-remove(file-sharing) */\n activeFileUploads,\n contentTooLongMessage,\n /* @conditional-compile-remove(file-sharing) */\n fileUploadsPendingError,\n systemMessage\n ]);\n\n const onRenderSendIcon = useCallback(\n (isHover: boolean) => (\n <Icon\n iconName={isHover && contentValue ? 'SendBoxSendHovered' : 'SendBoxSend'}\n className={sendIconStyle({\n theme,\n hasText: !!contentValue,\n /* @conditional-compile-remove(file-sharing) */\n hasFile: false,\n hasErrorMessage: hasErrorMessage\n })}\n />\n ),\n [contentValue, hasErrorMessage, theme]\n );\n\n const sendBoxErrorsProps: RTESendBoxErrorsProps = useMemo(() => {\n return {\n /* @conditional-compile-remove(file-sharing) */\n fileUploadsPendingError: fileUploadsPendingError,\n /* @conditional-compile-remove(file-sharing) */\n fileUploadError: activeFileUploads?.filter((fileUpload) => fileUpload.error).pop()?.error,\n systemMessage: systemMessage,\n textTooLongMessage: contentTooLongMessage\n };\n }, [\n /* @conditional-compile-remove(file-sharing) */\n activeFileUploads,\n contentTooLongMessage,\n /* @conditional-compile-remove(file-sharing) */\n fileUploadsPendingError,\n systemMessage\n ]);\n\n return (\n <Stack>\n <RTESendBoxErrors {...sendBoxErrorsProps} />\n <RTEInputBoxComponent\n placeholderText={strings.placeholderText}\n onChange={setContent}\n editorComponentRef={editorComponentRef}\n strings={strings}\n disabled={disabled}\n />\n <Stack.Item align=\"end\">\n <InputBoxButton\n onRenderIcon={onRenderSendIcon}\n onClick={(e) => {\n sendMessageOnClick();\n e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.\n }}\n className={sendButtonStyle}\n ariaLabel={localeStrings.sendButtonAriaLabel}\n tooltipContent={localeStrings.sendButtonAriaLabel}\n />\n </Stack.Item>\n </Stack>\n );\n};\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"RTESendBoxErrors.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/RTE/RTESendBoxErrors.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,eAAe,EAAwB,MAAM,oBAAoB,CAAC;AAc3E;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAe,EAAE;IAC5E,MAAM;IACJ,+CAA+C;IAC/C,eAAe;IACf,+CAA+C;IAC/C,uBAAuB,EACvB,aAAa,EACb,kBAAkB,EACnB,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAmC,SAAS,CAAC,CAAC;IAE9F,SAAS,CAA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I,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACxB,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,+BAA+B;YAC/B,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;YACtE,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC,EAAE;QACD,+CAA+C,CAAC,eAAe;QAC/D,+CAA+C,CAAC,uBAAuB;KACxE,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,IAAI,aAAa,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;YACpD,eAAe,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACrE,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO,CACL,oBAAC,eAAe,IACd,KAAK,EAAE,YAAY,EACnB,cAAc;QACZ,mCAAmC;QACnC,aAAa,KAAK,SAAS,IAAI,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,MAAK,aAAa,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,EAEhG,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAe,EAAW,EAAE;IAClD,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { SendBoxErrorBar, SendBoxErrorBarError } from '../SendBoxErrorBar';\n\n/**\n * @private\n */\nexport interface RTESendBoxErrorsProps {\n /* @conditional-compile-remove(file-sharing) */\n fileUploadsPendingError?: SendBoxErrorBarError;\n /* @conditional-compile-remove(file-sharing) */\n fileUploadError?: SendBoxErrorBarError;\n systemMessage?: string;\n textTooLongMessage?: string;\n}\n\n/**\n * @private\n */\nexport const RTESendBoxErrors = (props: RTESendBoxErrorsProps): JSX.Element => {\n const {\n /* @conditional-compile-remove(file-sharing) */\n fileUploadError,\n /* @conditional-compile-remove(file-sharing) */\n fileUploadsPendingError,\n systemMessage,\n textTooLongMessage\n } = props;\n const [sendBoxError, setSendBoxError] = useState<SendBoxErrorBarError | undefined>(undefined);\n\n useEffect(() => {\n if (systemMessage && !isMessageEmpty(systemMessage)) {\n setSendBoxError({ message: systemMessage, timestamp: Date.now() });\n }\n }, [systemMessage]);\n\n useEffect(() => {\n if (textTooLongMessage && !isMessageEmpty(textTooLongMessage)) {\n setSendBoxError({ message: textTooLongMessage, timestamp: Date.now() });\n }\n }, [textTooLongMessage]);\n\n useEffect(() => {\n if (\n (textTooLongMessage === undefined || isMessageEmpty(textTooLongMessage)) &&\n (systemMessage === undefined || isMessageEmpty(systemMessage))\n ) {\n setSendBoxError(undefined);\n }\n }, [systemMessage, textTooLongMessage]);\n\n useEffect(() => {\n setSendBoxError((prev) => {\n const errors: SendBoxErrorBarError[] = [];\n if (prev) {\n errors.push(prev);\n }\n /* @conditional-compile-remove(file-sharing) */\n if (fileUploadsPendingError) {\n errors.push(fileUploadsPendingError);\n }\n /* @conditional-compile-remove(file-sharing) */\n if (fileUploadError) {\n errors.push(fileUploadError);\n }\n if (errors.length === 0) {\n return undefined;\n }\n // sort to get the latest error\n const sortedErrors = errors.sort((a, b) => b.timestamp - a.timestamp);\n return sortedErrors[0];\n });\n }, [\n /* @conditional-compile-remove(file-sharing) */ fileUploadError,\n /* @conditional-compile-remove(file-sharing) */ fileUploadsPendingError\n ]);\n\n const onDismiss = useCallback(() => {\n if (systemMessage && !isMessageEmpty(systemMessage)) {\n setSendBoxError({ message: systemMessage, timestamp: Date.now() });\n }\n }, [systemMessage]);\n\n return (\n <SendBoxErrorBar\n error={sendBoxError}\n dismissAfterMs={\n // don't dismiss the system message\n systemMessage !== undefined && sendBoxError?.message !== systemMessage ? 10 * 1000 : undefined\n }\n onDismiss={onDismiss}\n />\n );\n};\n\nconst isMessageEmpty = (message: string): boolean => {\n return message.trim().length === 0;\n};\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"RichTextEditor.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/RTE/RichTextEditor.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,yBAAyB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC7G,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAuBxE;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAAkD,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC7G,MAAM,EAAE,cAAc,EAAE,QAAQ,EA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sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';\nimport { ContentEdit, Watermark } from 'roosterjs-editor-plugins';\nimport { Editor } from 'roosterjs-editor-core';\nimport type { EditorOptions, IEditor } from 'roosterjs-editor-types-compatible';\nimport { Rooster, createUpdateContentPlugin, UpdateMode, createRibbonPlugin, Ribbon } from 'roosterjs-react';\nimport {\n ribbonButtonStyle,\n ribbonOverflowButtonStyle,\n ribbonStyle,\n richTextEditorStyle\n} from '../styles/RichTextEditor.styles';\nimport { useTheme } from '../../theming';\nimport { ribbonButtons, ribbonButtonsStrings } from './RTERibbonButtons';\nimport { RichTextSendBoxStrings } from './RTESendBox';\nimport { isDarkThemed } from '../../theming/themeUtils';\nimport { setBackgroundColor, setTextColor } from 'roosterjs-editor-api';\n\n/**\n * Props for {@link RichTextEditor}.\n *\n * @beta\n */\nexport interface RichTextEditorProps {\n initialContent?: string;\n onChange: (newValue?: string) => void;\n placeholderText?: string;\n strings: Partial<RichTextSendBoxStrings>;\n}\n\n/**\n * Props for {@link RichTextEditor}.\n *\n * @beta\n */\nexport interface RichTextEditorComponentRef {\n focus: () => void;\n}\n\n/**\n * A component to wrap RoosterJS Rich Text Editor.\n *\n * @beta\n */\nexport const RichTextEditor = React.forwardRef<RichTextEditorComponentRef, RichTextEditorProps>((props, ref) => {\n const { initialContent, onChange, placeholderText, strings } = props;\n const editor = useRef<IEditor | null>(null);\n const theme = useTheme();\n useImperativeHandle(\n ref,\n () => {\n return {\n focus() {\n if (editor.current) {\n editor.current.focus();\n }\n }\n };\n },\n []\n );\n\n useEffect(() => {\n if (editor.current !== null) {\n // Adjust color prop for the div component when theme is updated\n // because doNotAdjustEditorColor is set for Rooster\n setTextColor(editor.current, theme.palette.neutralPrimary);\n }\n }, [theme]);\n\n const ribbonPlugin = React.useMemo(() => {\n return createRibbonPlugin();\n }, []);\n\n const editorCreator = useCallback((div: HTMLDivElement, options: EditorOptions) => {\n editor.current = new Editor(div, options);\n // Remove the background color of the editor\n setBackgroundColor(editor.current, 'transparent');\n return editor.current;\n }, []);\n\n const plugins = useMemo(() => {\n const contentEdit = new ContentEdit();\n const placeholderPlugin = new Watermark(placeholderText || '');\n const updateContentPlugin = createUpdateContentPlugin(\n UpdateMode.OnContentChangedEvent | UpdateMode.OnUserInput,\n (content: string) => {\n onChange && onChange(content);\n }\n );\n return [contentEdit, placeholderPlugin, updateContentPlugin, ribbonPlugin];\n }, [onChange, placeholderText, ribbonPlugin]);\n\n const ribbon = useMemo(() => {\n const buttons = ribbonButtons(theme);\n\n return (\n //TODO: Add localization for watermark plugin https://github.com/microsoft/roosterjs/issues/2430\n <Ribbon\n styles={ribbonStyle()}\n buttons={buttons}\n plugin={ribbonPlugin}\n overflowButtonProps={{\n styles: ribbonButtonStyle(theme),\n menuProps: {\n items: [], // CommandBar will determine items rendered in overflow\n isBeakVisible: false,\n styles: ribbonOverflowButtonStyle(theme)\n }\n }}\n strings={ribbonButtonsStrings(strings)}\n />\n );\n }, [strings, ribbonPlugin, theme]);\n\n return (\n <div>\n {ribbon}\n <Rooster\n initialContent={initialContent}\n inDarkMode={isDarkThemed(theme)}\n plugins={plugins}\n className={richTextEditorStyle}\n editorCreator={editorCreator}\n // TODO: confirm the color during inline images implementation\n imageSelectionBorderColor={'blue'}\n // doNotAdjustEditorColor is used to fix the default background color for Rooster component\n doNotAdjustEditorColor={true}\n />\n </div>\n );\n});\n"]}
|