@azure/communication-react 1.20.0-alpha-202410030015 → 1.20.0-alpha-202410050015
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 +67 -1
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BfMoXn7s.js → ChatMessageComponentAsRichTextEditBox-Bc2rnHE3.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BfMoXn7s.js.map → ChatMessageComponentAsRichTextEditBox-Bc2rnHE3.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DoRv_d64.js → RichTextSendBoxWrapper-BhEvRpXU.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DoRv_d64.js.map → RichTextSendBoxWrapper-BhEvRpXU.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-BcfT9uWf.js → index-CM02z9d2.js} +585 -412
- package/dist/dist-cjs/communication-react/index-CM02z9d2.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +3 -1
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/dataConversion.js +5 -1
- package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js.map +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js.map +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js.map +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js +1 -1
- package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +3 -3
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js +2 -1
- package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +2 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +2 -2
- package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +46 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +3 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +57 -12
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +6 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +2 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +49 -43
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.d.ts +2 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.d.ts +19 -0
- package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js +32 -0
- package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js +1 -1
- package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +2 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +1 -1
- package/dist/dist-esm/communication-react/src/index.js +1 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.js +2 -1
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Notification.js +1 -1
- package/dist/dist-esm/react-components/src/components/Notification.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VerticalGallery.js +2 -1
- package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/index.js +1 -0
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/cy-GB/ComponentLocale.d.ts +8 -0
- package/dist/dist-esm/react-components/src/localization/locales/cy-GB/ComponentLocale.js +13 -0
- package/dist/dist-esm/react-components/src/localization/locales/cy-GB/ComponentLocale.js.map +1 -0
- package/dist/dist-esm/react-components/src/localization/locales/cy-GB/strings.json +670 -0
- package/dist/dist-esm/react-components/src/theming/generateTheme.js +10 -2
- package/dist/dist-esm/react-components/src/theming/generateTheme.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +13 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +4 -0
- 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 +15 -14
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +28 -21
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +11 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +7 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +7 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +5 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +7 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +6 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +5 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +3 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +15 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +7 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +20 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +19 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +33 -36
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +11 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +16 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +15 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +4 -5
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +4 -7
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +9 -4
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/index.js +1 -0
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/CompositeLocale.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/CompositeLocale.js +15 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/CompositeLocale.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/strings.json +411 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -0
- package/package.json +5 -5
- package/dist/dist-cjs/communication-react/index-BcfT9uWf.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatScreen.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/ChatComposite/ChatScreen.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAEL,QAAQ,EAGR,aAAa,EAIb,eAAe,EAEf,QAAQ,EACT,yCAAmC;AAKpC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/D,mDAAmD;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAAiD,MAAM,yBAAyB,CAAC;AACvG,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,mDAAmD;AACnD,OAAO,EAAE,6BAA6B,IAAI,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,gCAAgC,EAChC,sBAAsB,EACtB,8BAA8B,EAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,+BAA+B,EAAE,MAAM,8CAA8C,CAAC;AAC/F,kEAAkE;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,sCAAgC;AAC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uB,EAAE,uBAAuB,IAChD,CACH,CACK,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { isIOS } from '@fluentui/react';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { PersonaSize } from '@fluentui/react';\nimport {\n CommunicationParticipant,\n ErrorBar,\n MessageProps,\n MessageRenderer,\n MessageThread,\n MessageThreadStyles,\n ParticipantMenuItemsCallback,\n SendBoxStylesProps,\n TypingIndicator,\n TypingIndicatorStylesProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rich-text-editor) */\nimport { RichTextEditBoxOptions } from '@internal/react-components';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { ChatMessage } from '@internal/react-components';\nimport React, { useCallback, useEffect, useMemo } from 'react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useReducer } from 'react';\nimport { useState } from 'react';\nimport { AvatarPersona, AvatarPersonaDataCallback, AvatarPersonaProps } from '../common/AvatarPersona';\nimport { useAdapter } from './adapter/ChatAdapterProvider';\nimport { ChatCompositeOptions } from './ChatComposite';\nimport { ChatHeader, getHeaderProps } from './ChatHeader';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentUploadButtonWrapper as AttachmentUploadButton } from './file-sharing';\nimport { useAdaptedSelector } from './hooks/useAdaptedSelector';\nimport { usePropsFor } from './hooks/usePropsFor';\n\nimport {\n chatArea,\n chatContainer,\n chatWrapper,\n messageThreadChatCompositeStyles,\n sendboxContainerStyles,\n typingIndicatorContainerStyles\n} from './styles/Chat.styles';\nimport { participantListContainerPadding } from '../common/styles/ParticipantContainer.styles';\n/* @conditional-compile-remove(chat-composite-participant-pane) */\nimport { ChatScreenPeoplePane } from './ChatScreenPeoplePane';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { removeImageTags, _IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentDownloadErrorBar } from './AttachmentDownloadErrorBar';\nimport { _AttachmentDownloadCards } from '@internal/react-components';\nimport { ImageOverlay } from '@internal/react-components';\nimport { InlineImage } from '@internal/react-components';\nimport { ResourceFetchResult } from '@internal/chat-stateful-client';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentOptions } from '@internal/react-components';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { nanoid } from 'nanoid';\n/* @conditional-compile-remove(file-sharing-acs) */\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { AttachmentUploadActionType, AttachmentUpload, AttachmentUploadReducer } from './file-sharing/AttachmentUpload';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { MessageOptions } from '@internal/acs-ui-common';\nimport { SendBoxPicker } from '../common/SendBoxPicker';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { loadRichTextSendBox, RichTextSendBoxOptions } from '../common/SendBoxPicker';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport {\n cancelInlineImageUpload,\n getEditBoxMessagesInlineImages,\n getImageFileNameFromAttributes,\n getSendBoxInlineImages,\n onInsertInlineImageForEditBox,\n onInsertInlineImageForSendBox,\n updateContentStringWithUploadedInlineImages\n} from './ImageUpload/ImageUploadUtils';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport type { ChatAdapterState } from './adapter/ChatAdapter';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { isMicrosoftTeamsUserIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { SEND_BOX_UPLOADS_KEY_VALUE, _DEFAULT_INLINE_IMAGE_FILE_NAME } from '../common/constants';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { ImageUploadReducer } from './ImageUpload/ImageUploadReducer';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { useLocale } from '../localization';\n\n/**\n * @private\n */\nexport type ChatScreenProps = {\n options?: ChatCompositeOptions;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onRenderMessage?: (messageProps: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element;\n onRenderTypingIndicator?: (typingUsers: CommunicationParticipant[]) => JSX.Element;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n styles?: ChatScreenStyles;\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentOptions?: AttachmentOptions;\n formFactor?: 'desktop' | 'mobile';\n};\n\n/**\n * @private\n */\nexport type ChatScreenStyles = {\n messageThread?: MessageThreadStyles;\n sendBox?: SendBoxStylesProps;\n typingIndicator?: TypingIndicatorStylesProps;\n};\n\n/**\n * @private\n */\ninterface OverlayImageItem {\n imageSrc: string;\n title: string;\n titleIcon: JSX.Element;\n attachmentId: string;\n messageId: string;\n imageUrl: string;\n}\n\n/**\n * @private\n */\nexport const ChatScreen = (props: ChatScreenProps): JSX.Element => {\n const {\n onFetchAvatarPersonaData,\n onRenderMessage,\n onRenderTypingIndicator,\n options,\n styles,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentOptions,\n formFactor\n } = props;\n\n const defaultNumberOfChatMessagesToReload = 5;\n /* @conditional-compile-remove(file-sharing-acs) */\n const [downloadErrorMessage, setDownloadErrorMessage] = React.useState('');\n const [overlayImageItem, setOverlayImageItem] = useState<OverlayImageItem>();\n const [isImageOverlayOpen, setIsImageOverlayOpen] = useState<boolean>(false);\n /* @conditional-compile-remove(file-sharing-acs) */\n const [uploads, handleUploadAction] = useReducer(AttachmentUploadReducer, []);\n const adapter = useAdapter();\n const theme = useTheme();\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const localeStrings = useLocale().strings;\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [textOnlyChat, setTextOnlyChat] = useState(false);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [isACSChat, setIsACSChat] = useState(false);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [editBoxInlineImageUploads, handleEditBoxInlineImageUploadAction] = useReducer(ImageUploadReducer, undefined);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [sendBoxInlineImageUploads, handleSendBoxInlineImageUploadAction] = useReducer(ImageUploadReducer, undefined);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n useEffect(() => {\n const updateChatState = (newState: ChatAdapterState): void => {\n setTextOnlyChat(newState.thread.properties?.messagingPolicy?.textOnlyChat === true);\n if (newState.thread.properties?.createdBy) {\n setIsACSChat(!isMicrosoftTeamsUserIdentifier(newState.thread.properties?.createdBy));\n }\n };\n // set initial state for textOnlyChat and isACSChat\n updateChatState(adapter.getState());\n\n adapter.onStateChange(updateChatState);\n return () => {\n adapter.offStateChange(updateChatState);\n };\n }, [adapter]);\n\n useEffect(() => {\n // Initial data should be always fetched by the composite(or external caller) instead of the adapter\n const fetchData: () => Promise<void> = async () => {\n // Fetch initial data for adapter\n await adapter.fetchInitialData();\n // Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.\n await adapter.loadPreviousChatMessages(defaultNumberOfChatMessagesToReload);\n };\n fetchData();\n }, [adapter]);\n\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n useEffect(() => {\n // if rich text editor is enabled, the rich text editor component should be loaded early for good UX\n if (options?.richTextEditor) {\n // this line is needed to load the Rooster JS dependencies early in the lifecycle\n // when the rich text editor is enabled\n loadRichTextSendBox();\n }\n }, [options?.richTextEditor]);\n\n const messageThreadProps = usePropsFor(MessageThread);\n const typingIndicatorProps = usePropsFor(TypingIndicator);\n const headerProps = useAdaptedSelector(getHeaderProps);\n const errorBarProps = usePropsFor(ErrorBar);\n\n useEffect(() => {\n if (overlayImageItem === undefined) {\n return;\n }\n const message = adapter.getState().thread.chatMessages[overlayImageItem.messageId];\n if (message === undefined) {\n return;\n }\n const resourceCache = message.resourceCache;\n if (overlayImageItem.imageSrc === '' && resourceCache && resourceCache[overlayImageItem.imageUrl]) {\n const fullSizeImageSrc = getResourceSourceUrl(resourceCache[overlayImageItem.imageUrl]);\n if (fullSizeImageSrc === undefined || fullSizeImageSrc === '' || overlayImageItem.imageSrc === fullSizeImageSrc) {\n return;\n }\n setOverlayImageItem({\n ...overlayImageItem,\n imageSrc: fullSizeImageSrc\n });\n }\n // Disable eslint because we are using the overlayImageItem in this effect but don't want to have it as a dependency, as it will cause an infinite loop.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [messageThreadProps.messages]);\n\n const getResourceSourceUrl = (result: ResourceFetchResult): string => {\n let src = '';\n if (result.error || !result.sourceUrl) {\n src = 'blob://';\n } else {\n src = result.sourceUrl;\n }\n\n return src;\n };\n\n const onRenderAvatarCallback = useCallback(\n (userId?: string, defaultOptions?: AvatarPersonaProps) => {\n return (\n <AvatarPersona\n userId={userId}\n hidePersonaDetails={true}\n {...defaultOptions}\n dataProvider={onFetchAvatarPersonaData}\n />\n );\n },\n [onFetchAvatarPersonaData]\n );\n\n const messageThreadStyles = useMemo(() => {\n return Object.assign(\n {},\n messageThreadChatCompositeStyles(theme.semanticColors.bodyBackground),\n styles?.messageThread\n );\n }, [styles?.messageThread, theme.semanticColors.bodyBackground]);\n\n const typingIndicatorStyles = useMemo(() => {\n return Object.assign({}, styles?.typingIndicator);\n }, [styles?.typingIndicator]);\n\n const sendBoxStyles = useMemo(() => {\n return Object.assign({}, styles?.sendBox);\n }, [styles?.sendBox]);\n\n const userId = toFlatCommunicationIdentifier(adapter.getState().userId);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const setKeyboardFocusAfterFileSelection = useCallback(() => {\n // look up sendbox by ID for now, we will use `useRef`\n // once attachment button is moved inside of send box component\n // see ADO workitem #3764245\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n if (props.options?.richTextEditor) {\n const richTextSendBox = document?.querySelector(`[id=\"richTextSendBox\"]`) as HTMLDivElement;\n richTextSendBox?.focus();\n return;\n }\n const sendBox = document?.querySelector(`[id=\"sendbox\"]`) as HTMLTextAreaElement;\n // set send box on focus after file selection per A11y requirement\n sendBox?.focus();\n }, [\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n props.options?.richTextEditor\n ]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const attachmentUploadButtonOnChange = useCallback(\n (files: FileList | null): void => {\n setKeyboardFocusAfterFileSelection();\n\n if (!files) {\n return;\n }\n\n // Get files, change to tasks, store locally and pass back to Contoso\n const newUploads = Array.from(files).map((file): AttachmentUpload => {\n const taskId = nanoid();\n return {\n file,\n taskId,\n metadata: {\n id: taskId,\n name: file.name,\n progress: 0\n },\n notifyUploadProgressChanged: (value: number) => {\n handleUploadAction({ type: AttachmentUploadActionType.Progress, taskId, progress: value });\n },\n notifyUploadCompleted: (id: string, url: string) => {\n handleUploadAction({ type: AttachmentUploadActionType.Completed, taskId, id, url });\n },\n notifyUploadFailed: (message: string) => {\n handleUploadAction({ type: AttachmentUploadActionType.Failed, taskId, message });\n // remove the failed upload task when error banner is auto dismissed after 10 seconds\n // so the banner won't be shown again on UI re-rendering.\n setTimeout(() => {\n handleUploadAction({ type: AttachmentUploadActionType.Remove, id: taskId });\n }, 10 * 1000);\n }\n };\n });\n\n handleUploadAction({ type: AttachmentUploadActionType.Set, newUploads });\n attachmentOptions?.uploadOptions?.handleAttachmentSelection(newUploads);\n },\n [attachmentOptions?.uploadOptions, setKeyboardFocusAfterFileSelection]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onRenderAttachmentDownloads = useCallback(\n (message: ChatMessage) =>\n message?.attachments?.length ?? 0 > 0 ? (\n <_AttachmentDownloadCards\n attachments={message.attachments}\n message={message}\n actionsForAttachment={attachmentOptions?.downloadOptions?.actionsForAttachment}\n onActionHandlerFailed={(errorMessage: string) => {\n setDownloadErrorMessage(errorMessage);\n }}\n />\n ) : (\n <></>\n ),\n [attachmentOptions?.downloadOptions?.actionsForAttachment]\n );\n\n const onInlineImageClicked = useCallback(\n (attachmentId: string, messageId: string) => {\n const message = adapter.getState().thread.chatMessages[messageId];\n const inlinedImages = message.content?.attachments?.filter((attachment) => {\n return attachment.attachmentType === 'image' && attachment.id === attachmentId;\n });\n\n if (!inlinedImages || inlinedImages.length <= 0) {\n return;\n }\n\n const attachment = inlinedImages[0];\n\n const resourceCache = message.resourceCache;\n let imageSrc = '';\n\n if (attachment.url) {\n if (resourceCache && resourceCache[attachment.url]) {\n imageSrc = getResourceSourceUrl(resourceCache[attachment.url]);\n } else {\n adapter.downloadResourceToCache({\n threadId: adapter.getState().thread.threadId,\n messageId: messageId,\n resourceUrl: attachment.url\n });\n }\n }\n\n const titleIconRenderOptions = {\n text: message.senderDisplayName,\n size: PersonaSize.size32,\n showOverflowTooltip: false,\n imageAlt: message.senderDisplayName\n };\n\n const messageSenderId = message.sender !== undefined ? toFlatCommunicationIdentifier(message.sender) : userId;\n const titleIcon = onRenderAvatarCallback && onRenderAvatarCallback(messageSenderId, titleIconRenderOptions);\n const overlayImage: OverlayImageItem = {\n title: message.senderDisplayName || '',\n titleIcon: titleIcon,\n attachmentId: attachment.id,\n imageSrc: imageSrc,\n messageId: messageId,\n imageUrl: attachment.url || ''\n };\n\n setIsImageOverlayOpen(true);\n setOverlayImageItem(overlayImage);\n },\n [adapter, onRenderAvatarCallback, userId]\n );\n\n const onRenderInlineImage = useCallback(\n (inlineImage: InlineImage, defaultOnRender: (inlineImage: InlineImage) => JSX.Element): JSX.Element => {\n const message = adapter.getState().thread.chatMessages[inlineImage.messageId];\n const attachment = message?.content?.attachments?.find(\n (attachment) => attachment.id === inlineImage.imageAttributes.id\n );\n\n if (attachment === undefined) {\n return defaultOnRender(inlineImage);\n }\n\n let pointerEvents: 'none' | 'auto' = inlineImage.imageAttributes.src === '' ? 'none' : 'auto';\n const resourceCache = message.resourceCache;\n if (\n resourceCache &&\n attachment.previewUrl &&\n resourceCache[attachment.previewUrl] &&\n resourceCache[attachment.previewUrl].error\n ) {\n pointerEvents = 'none';\n }\n\n return (\n <span\n key={inlineImage.imageAttributes.id}\n onClick={() => onInlineImageClicked(inlineImage.imageAttributes.id || '', inlineImage.messageId)}\n tabIndex={0}\n role=\"button\"\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n onInlineImageClicked(inlineImage.imageAttributes.id || '', inlineImage.messageId);\n }\n }}\n style={{ cursor: 'pointer', pointerEvents }}\n >\n {defaultOnRender(inlineImage)}\n </span>\n );\n },\n [adapter, onInlineImageClicked]\n );\n\n const inlineImageOptions = useMemo(() => {\n return { onRenderInlineImage: onRenderInlineImage };\n }, [onRenderInlineImage]);\n\n const onDownloadButtonClicked = useCallback(\n (imageSrc: string): void => {\n if (imageSrc === '') {\n return;\n }\n if (isIOS()) {\n window.open(imageSrc, '_blank');\n } else {\n // Create a new anchor element\n const a = document.createElement('a');\n // Set the href and download attributes for the anchor element\n a.href = imageSrc;\n a.download = overlayImageItem?.attachmentId || '';\n a.rel = 'noopener noreferrer';\n a.target = '_blank';\n\n // Programmatically click the anchor element to trigger the download\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n }\n },\n [overlayImageItem?.attachmentId]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const attachmentButton = useMemo(() => {\n if (\n !attachmentOptions?.uploadOptions?.handleAttachmentSelection ||\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n textOnlyChat\n ) {\n return null;\n }\n return (\n <AttachmentUploadButton\n supportedMediaTypes={attachmentOptions?.uploadOptions?.supportedMediaTypes}\n disableMultipleUploads={attachmentOptions?.uploadOptions?.disableMultipleUploads}\n onChange={attachmentUploadButtonOnChange}\n />\n );\n return <></>;\n }, [\n attachmentOptions?.uploadOptions?.handleAttachmentSelection,\n attachmentOptions?.uploadOptions?.supportedMediaTypes,\n attachmentOptions?.uploadOptions?.disableMultipleUploads,\n attachmentUploadButtonOnChange,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n textOnlyChat\n ]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const attachments = useMemo(() => {\n return uploads?.map((v) => v.metadata);\n }, [uploads]);\n\n const onSendMessageHandler = useCallback(\n async function (\n content: string,\n /* @conditional-compile-remove(file-sharing-acs) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */ options?: MessageOptions\n ) {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = updateContentStringWithUploadedInlineImages(content, sendBoxInlineImageUploads);\n /* @conditional-compile-remove(file-sharing-acs) */\n const attachments = options?.attachments ?? [];\n /* @conditional-compile-remove(file-sharing-acs) */\n handleUploadAction({ type: AttachmentUploadActionType.Clear });\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n handleSendBoxInlineImageUploadAction({\n type: AttachmentUploadActionType.Clear,\n messageId: SEND_BOX_UPLOADS_KEY_VALUE\n });\n\n /* @conditional-compile-remove(file-sharing-acs) */\n await adapter.sendMessage(content, {\n attachments: attachments,\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n type: options?.type\n });\n /* @conditional-compile-remove(file-sharing-acs) */\n return;\n await adapter.sendMessage(content, {\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n type: options?.type\n });\n },\n [\n adapter,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ handleSendBoxInlineImageUploadAction,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ sendBoxInlineImageUploads\n ]\n );\n\n const onUpdateMessageHandler = useCallback(\n async function (\n messageId: string,\n content: string,\n /* @conditional-compile-remove(file-sharing-acs) */ options?: MessageOptions\n ) {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = updateContentStringWithUploadedInlineImages(content, editBoxInlineImageUploads, messageId);\n await messageThreadProps.onUpdateMessage(\n messageId,\n content,\n /* @conditional-compile-remove(file-sharing-acs) */ options\n );\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n handleEditBoxInlineImageUploadAction({ type: AttachmentUploadActionType.Clear, messageId });\n },\n [\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ handleEditBoxInlineImageUploadAction,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ editBoxInlineImageUploads,\n messageThreadProps\n ]\n );\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const onCancelEditMessageHandler = useCallback(\n (messageId: string) => {\n handleEditBoxInlineImageUploadAction({ type: AttachmentUploadActionType.Clear, messageId });\n },\n [handleEditBoxInlineImageUploadAction]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onCancelUploadHandler = useCallback(\n (id: string) => {\n handleUploadAction({ type: AttachmentUploadActionType.Remove, id });\n attachmentOptions?.uploadOptions?.handleAttachmentRemoval?.(id);\n },\n [attachmentOptions?.uploadOptions]\n );\n\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n const richTextEditorOptions = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const onPasteCallback = isACSChat || textOnlyChat ? removeImageTags : undefined;\n return options?.richTextEditor\n ? {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ onPaste: onPasteCallback\n }\n : undefined;\n }, [\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n isACSChat,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n textOnlyChat,\n options?.richTextEditor\n ]);\n\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n const richTextEditBoxOptions: RichTextEditBoxOptions | undefined = useMemo(() => {\n return options?.richTextEditor\n ? {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n ...richTextEditorOptions,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage: (imageAttributes: Record<string, string>, messageId: string) => {\n onInsertInlineImageForEditBox(\n imageAttributes,\n getImageFileNameFromAttributes(imageAttributes),\n messageId,\n adapter,\n handleEditBoxInlineImageUploadAction,\n localeStrings.chat\n );\n },\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n messagesInlineImagesWithProgress: getEditBoxMessagesInlineImages(editBoxInlineImageUploads),\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onRemoveInlineImage: (imageAttributes: Record<string, string>, messageId: string) => {\n cancelInlineImageUpload(\n imageAttributes,\n editBoxInlineImageUploads,\n messageId,\n handleEditBoxInlineImageUploadAction,\n adapter\n );\n }\n }\n : undefined;\n }, [\n options?.richTextEditor,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ richTextEditorOptions,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ editBoxInlineImageUploads,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ adapter,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ localeStrings.chat\n ]);\n\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n const richTextSendBoxOptions: RichTextSendBoxOptions | undefined = useMemo(() => {\n return options?.richTextEditor\n ? {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n ...richTextEditorOptions,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage: (imageAttributes: Record<string, string>) => {\n onInsertInlineImageForSendBox(\n imageAttributes,\n getImageFileNameFromAttributes(imageAttributes),\n adapter,\n handleSendBoxInlineImageUploadAction,\n localeStrings.chat\n );\n },\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImagesWithProgress: getSendBoxInlineImages(sendBoxInlineImageUploads),\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onRemoveInlineImage: (imageAttributes: Record<string, string>) => {\n cancelInlineImageUpload(\n imageAttributes,\n sendBoxInlineImageUploads,\n SEND_BOX_UPLOADS_KEY_VALUE,\n handleSendBoxInlineImageUploadAction,\n adapter\n );\n }\n }\n : undefined;\n }, [\n options?.richTextEditor,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ richTextEditorOptions,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ sendBoxInlineImageUploads,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ localeStrings.chat,\n adapter\n ]);\n\n return (\n <Stack className={chatContainer} grow>\n {options?.topic !== false && <ChatHeader {...headerProps} />}\n <Stack className={chatArea} tokens={participantListContainerPadding} horizontal grow>\n <Stack className={chatWrapper} grow>\n {options?.errorBar !== false && <ErrorBar {...errorBarProps} />}\n {\n /* @conditional-compile-remove(file-sharing-acs) */\n <AttachmentDownloadErrorBar\n onDismissDownloadErrorMessage={useCallback(() => {\n setDownloadErrorMessage('');\n }, [])}\n attachmentDownloadErrorMessage={downloadErrorMessage || ''}\n />\n }\n <MessageThread\n {...messageThreadProps}\n onUpdateMessage={onUpdateMessageHandler}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelEditMessage={onCancelEditMessageHandler}\n onRenderAvatar={onRenderAvatarCallback}\n onRenderMessage={onRenderMessage}\n /* @conditional-compile-remove(file-sharing-acs) */\n onRenderAttachmentDownloads={onRenderAttachmentDownloads}\n inlineImageOptions={inlineImageOptions}\n numberOfChatMessagesToReload={defaultNumberOfChatMessagesToReload}\n styles={messageThreadStyles}\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n richTextEditorOptions={richTextEditBoxOptions}\n />\n <Stack className={mergeStyles(sendboxContainerStyles)}>\n <div className={mergeStyles(typingIndicatorContainerStyles)}>\n {onRenderTypingIndicator ? (\n onRenderTypingIndicator(typingIndicatorProps.typingUsers)\n ) : (\n <TypingIndicator {...typingIndicatorProps} styles={typingIndicatorStyles} />\n )}\n </div>\n <Stack horizontal={formFactor === 'mobile'}>\n {formFactor === 'mobile' && (\n /* @conditional-compile-remove(file-sharing-acs) */\n <Stack verticalAlign=\"center\">{attachmentButton}</Stack>\n )}\n <Stack grow>\n <SendBoxPicker\n styles={sendBoxStyles}\n autoFocus={options?.autoFocus}\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n richTextEditorOptions={richTextSendBoxOptions}\n /* @conditional-compile-remove(file-sharing-acs) */\n attachments={attachments}\n /* @conditional-compile-remove(file-sharing-acs) */\n onCancelAttachmentUpload={onCancelUploadHandler}\n // we need to overwrite onSendMessage for SendBox because we need to clear attachment state\n // when submit button is clicked\n onSendMessage={onSendMessageHandler}\n />\n </Stack>\n {formFactor !== 'mobile' &&\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentButton}\n </Stack>\n </Stack>\n </Stack>\n {\n /* @conditional-compile-remove(chat-composite-participant-pane) */\n options?.participantPane === true && (\n <ChatScreenPeoplePane\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n isMobile={formFactor === 'mobile'}\n />\n )\n }\n </Stack>\n {overlayImageItem && (\n <ImageOverlay\n {...overlayImageItem}\n isOpen={isImageOverlayOpen}\n onDismiss={() => {\n setOverlayImageItem(undefined);\n setIsImageOverlayOpen(false);\n adapter.removeResourceFromCache({\n threadId: adapter.getState().thread.threadId,\n messageId: overlayImageItem.messageId,\n resourceUrl: overlayImageItem.imageUrl\n });\n }}\n onDownloadButtonClicked={onDownloadButtonClicked}\n />\n )}\n </Stack>\n );\n};\n"]}
|
1
|
+
{"version":3,"file":"ChatScreen.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/ChatComposite/ChatScreen.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAEL,QAAQ,EAGR,aAAa,EAIb,eAAe,EAEf,QAAQ,EACT,yCAAmC;AAKpC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/D,mDAAmD;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAAiD,MAAM,yBAAyB,CAAC;AACvG,OAAO,EA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C,SAAS,CAAC,CAAC;gBAC/B,qBAAqB,CAAC,KAAK,CAAC,CAAC;gBAC7B,OAAO,CAAC,uBAAuB,CAAC;oBAC9B,QAAQ;oBACR,SAAS,EAAE,gBAAgB,CAAC,SAAS;oBACrC,WAAW,EAAE,gBAAgB,CAAC,QAAQ;iBACvC,CAAC,CAAC;YACL,CAAC,EACD,uBAAuB,EAAE,uBAAuB,IAChD,CACH,CACK,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { isIOS } from '@fluentui/react';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { PersonaSize } from '@fluentui/react';\nimport {\n CommunicationParticipant,\n ErrorBar,\n MessageProps,\n MessageRenderer,\n MessageThread,\n MessageThreadStyles,\n ParticipantMenuItemsCallback,\n SendBoxStylesProps,\n TypingIndicator,\n TypingIndicatorStylesProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rich-text-editor) */\nimport { RichTextEditBoxOptions } from '@internal/react-components';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { ChatMessage } from '@internal/react-components';\nimport React, { useCallback, useEffect, useMemo } from 'react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useReducer } from 'react';\nimport { useState } from 'react';\nimport { AvatarPersona, AvatarPersonaDataCallback, AvatarPersonaProps } from '../common/AvatarPersona';\nimport { useAdapter } from './adapter/ChatAdapterProvider';\nimport { ChatCompositeOptions } from './ChatComposite';\nimport { ChatHeader, getHeaderProps } from './ChatHeader';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentUploadButtonWrapper as AttachmentUploadButton } from './file-sharing';\nimport { useAdaptedSelector } from './hooks/useAdaptedSelector';\nimport { usePropsFor } from './hooks/usePropsFor';\n\nimport {\n chatArea,\n chatContainer,\n chatWrapper,\n messageThreadChatCompositeStyles,\n sendboxContainerStyles,\n typingIndicatorContainerStyles\n} from './styles/Chat.styles';\nimport { participantListContainerPadding } from '../common/styles/ParticipantContainer.styles';\n/* @conditional-compile-remove(chat-composite-participant-pane) */\nimport { ChatScreenPeoplePane } from './ChatScreenPeoplePane';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { removeImageTags, _IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentDownloadErrorBar } from './AttachmentDownloadErrorBar';\nimport { _AttachmentDownloadCards } from '@internal/react-components';\nimport { ImageOverlay } from '@internal/react-components';\nimport { InlineImage } from '@internal/react-components';\nimport { ChatMessageWithStatus, ResourceFetchResult } from '@internal/chat-stateful-client';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentOptions } from '@internal/react-components';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { nanoid } from 'nanoid';\n/* @conditional-compile-remove(file-sharing-acs) */\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { AttachmentUploadActionType, AttachmentUpload, AttachmentUploadReducer } from './file-sharing/AttachmentUpload';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { MessageOptions } from '@internal/acs-ui-common';\nimport { SendBoxPicker } from '../common/SendBoxPicker';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { loadRichTextSendBox, RichTextSendBoxOptions } from '../common/SendBoxPicker';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport {\n cancelInlineImageUpload,\n getEditBoxMessagesInlineImages,\n getImageFileNameFromAttributes,\n getSendBoxInlineImages,\n onInsertInlineImageForEditBox,\n onInsertInlineImageForSendBox,\n updateContentStringWithUploadedInlineImages\n} from './ImageUpload/ImageUploadUtils';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { isMicrosoftTeamsUserIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { SEND_BOX_UPLOADS_KEY_VALUE, _DEFAULT_INLINE_IMAGE_FILE_NAME } from '../common/constants';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { ImageUploadReducer } from './ImageUpload/ImageUploadReducer';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { useLocale } from '../localization';\nimport { useSelector } from './hooks/useSelector';\nimport { getChatMessages, getThreadId, getUserId } from './selectors/baseSelectors';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { getCreatedBy, getTextOnlyChat } from './selectors/baseSelectors';\n\n/**\n * @private\n */\nexport type ChatScreenProps = {\n options?: ChatCompositeOptions;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onRenderMessage?: (messageProps: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element;\n onRenderTypingIndicator?: (typingUsers: CommunicationParticipant[]) => JSX.Element;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n styles?: ChatScreenStyles;\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentOptions?: AttachmentOptions;\n formFactor?: 'desktop' | 'mobile';\n};\n\n/**\n * @private\n */\nexport type ChatScreenStyles = {\n messageThread?: MessageThreadStyles;\n sendBox?: SendBoxStylesProps;\n typingIndicator?: TypingIndicatorStylesProps;\n};\n\n/**\n * @private\n */\ninterface OverlayImageItem {\n imageSrc: string;\n title: string;\n titleIcon: JSX.Element;\n attachmentId: string;\n messageId: string;\n imageUrl: string;\n}\n\n/**\n * @private\n */\nexport const ChatScreen = (props: ChatScreenProps): JSX.Element => {\n const {\n onFetchAvatarPersonaData,\n onRenderMessage,\n onRenderTypingIndicator,\n options,\n styles,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentOptions,\n formFactor\n } = props;\n\n const defaultNumberOfChatMessagesToReload = 5;\n /* @conditional-compile-remove(file-sharing-acs) */\n const [downloadErrorMessage, setDownloadErrorMessage] = React.useState('');\n const [overlayImageItem, setOverlayImageItem] = useState<OverlayImageItem>();\n const [isImageOverlayOpen, setIsImageOverlayOpen] = useState<boolean>(false);\n /* @conditional-compile-remove(file-sharing-acs) */\n const [uploads, handleUploadAction] = useReducer(AttachmentUploadReducer, []);\n const adapter = useAdapter();\n const theme = useTheme();\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const localeStrings = useLocale().strings;\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const textOnlyChat = !!useSelector(getTextOnlyChat);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const createdBy = useSelector(getCreatedBy);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const isACSChat = createdBy && !isMicrosoftTeamsUserIdentifier(createdBy);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [editBoxInlineImageUploads, handleEditBoxInlineImageUploadAction] = useReducer(ImageUploadReducer, undefined);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [sendBoxInlineImageUploads, handleSendBoxInlineImageUploadAction] = useReducer(ImageUploadReducer, undefined);\n\n useEffect(() => {\n // Initial data should be always fetched by the composite(or external caller) instead of the adapter\n const fetchData: () => Promise<void> = async () => {\n // Fetch initial data for adapter\n await adapter.fetchInitialData();\n // Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.\n await adapter.loadPreviousChatMessages(defaultNumberOfChatMessagesToReload);\n };\n fetchData();\n }, [adapter]);\n\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n useEffect(() => {\n // if rich text editor is enabled, the rich text editor component should be loaded early for good UX\n if (options?.richTextEditor) {\n // this line is needed to load the Rooster JS dependencies early in the lifecycle\n // when the rich text editor is enabled\n loadRichTextSendBox();\n }\n }, [options?.richTextEditor]);\n\n const messageThreadProps = usePropsFor(MessageThread);\n const typingIndicatorProps = usePropsFor(TypingIndicator);\n const headerProps = useAdaptedSelector(getHeaderProps);\n const errorBarProps = usePropsFor(ErrorBar);\n\n const overlayImageItemRef = React.useRef<OverlayImageItem | undefined>(overlayImageItem);\n overlayImageItemRef.current = overlayImageItem;\n const adapterChatMessages = useSelector(getChatMessages);\n useEffect(() => {\n if (overlayImageItemRef.current === undefined) {\n return;\n }\n const message: ChatMessageWithStatus | undefined = adapterChatMessages[overlayImageItemRef.current.messageId];\n if (message === undefined) {\n return;\n }\n const resourceCache = message.resourceCache;\n if (\n overlayImageItemRef.current.imageSrc === '' &&\n resourceCache &&\n resourceCache[overlayImageItemRef.current.imageUrl]\n ) {\n const fullSizeImageSrc = getResourceSourceUrl(resourceCache[overlayImageItemRef.current.imageUrl]);\n if (\n fullSizeImageSrc === undefined ||\n fullSizeImageSrc === '' ||\n overlayImageItemRef.current.imageSrc === fullSizeImageSrc\n ) {\n return;\n }\n setOverlayImageItem({\n ...overlayImageItemRef.current,\n imageSrc: fullSizeImageSrc\n });\n }\n }, [adapterChatMessages]);\n\n const getResourceSourceUrl = (result: ResourceFetchResult): string => {\n let src = '';\n if (result.error || !result.sourceUrl) {\n src = 'blob://';\n } else {\n src = result.sourceUrl;\n }\n\n return src;\n };\n\n const onRenderAvatarCallback = useCallback(\n (userId?: string, defaultOptions?: AvatarPersonaProps) => {\n return (\n <AvatarPersona\n userId={userId}\n hidePersonaDetails={true}\n {...defaultOptions}\n dataProvider={onFetchAvatarPersonaData}\n />\n );\n },\n [onFetchAvatarPersonaData]\n );\n\n const messageThreadStyles = useMemo(() => {\n return Object.assign(\n {},\n messageThreadChatCompositeStyles(theme.semanticColors.bodyBackground),\n styles?.messageThread\n );\n }, [styles?.messageThread, theme.semanticColors.bodyBackground]);\n\n const typingIndicatorStyles = useMemo(() => {\n return Object.assign({}, styles?.typingIndicator);\n }, [styles?.typingIndicator]);\n\n const sendBoxStyles = useMemo(() => {\n return Object.assign({}, styles?.sendBox);\n }, [styles?.sendBox]);\n\n const userIdObject = useSelector(getUserId);\n const userId = toFlatCommunicationIdentifier(userIdObject);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const setKeyboardFocusAfterFileSelection = useCallback(() => {\n // look up sendbox by ID for now, we will use `useRef`\n // once attachment button is moved inside of send box component\n // see ADO workitem #3764245\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n if (props.options?.richTextEditor) {\n const richTextSendBox = document?.querySelector(`[id=\"richTextSendBox\"]`) as HTMLDivElement;\n richTextSendBox?.focus();\n return;\n }\n const sendBox = document?.querySelector(`[id=\"sendbox\"]`) as HTMLTextAreaElement;\n // set send box on focus after file selection per A11y requirement\n sendBox?.focus();\n }, [\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n props.options?.richTextEditor\n ]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const attachmentUploadButtonOnChange = useCallback(\n (files: FileList | null): void => {\n setKeyboardFocusAfterFileSelection();\n\n if (!files) {\n return;\n }\n\n // Get files, change to tasks, store locally and pass back to Contoso\n const newUploads = Array.from(files).map((file): AttachmentUpload => {\n const taskId = nanoid();\n return {\n file,\n taskId,\n metadata: {\n id: taskId,\n name: file.name,\n progress: 0\n },\n notifyUploadProgressChanged: (value: number) => {\n handleUploadAction({ type: AttachmentUploadActionType.Progress, taskId, progress: value });\n },\n notifyUploadCompleted: (id: string, url: string) => {\n handleUploadAction({ type: AttachmentUploadActionType.Completed, taskId, id, url });\n },\n notifyUploadFailed: (message: string) => {\n handleUploadAction({ type: AttachmentUploadActionType.Failed, taskId, message });\n // remove the failed upload task when error banner is auto dismissed after 10 seconds\n // so the banner won't be shown again on UI re-rendering.\n setTimeout(() => {\n handleUploadAction({ type: AttachmentUploadActionType.Remove, id: taskId });\n }, 10 * 1000);\n }\n };\n });\n\n handleUploadAction({ type: AttachmentUploadActionType.Set, newUploads });\n attachmentOptions?.uploadOptions?.handleAttachmentSelection(newUploads);\n },\n [attachmentOptions?.uploadOptions, setKeyboardFocusAfterFileSelection]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onRenderAttachmentDownloads = useCallback(\n (message: ChatMessage) =>\n message?.attachments?.length ?? 0 > 0 ? (\n <_AttachmentDownloadCards\n attachments={message.attachments}\n message={message}\n actionsForAttachment={attachmentOptions?.downloadOptions?.actionsForAttachment}\n onActionHandlerFailed={(errorMessage: string) => {\n setDownloadErrorMessage(errorMessage);\n }}\n />\n ) : (\n <></>\n ),\n [attachmentOptions?.downloadOptions?.actionsForAttachment]\n );\n\n const threadId = useSelector(getThreadId);\n const onInlineImageClicked = useCallback(\n (attachmentId: string, messageId: string) => {\n const message: ChatMessageWithStatus | undefined = adapterChatMessages[messageId];\n const inlinedImages = message.content?.attachments?.filter((attachment) => {\n return attachment.attachmentType === 'image' && attachment.id === attachmentId;\n });\n\n if (!inlinedImages || inlinedImages.length <= 0) {\n return;\n }\n\n const attachment = inlinedImages[0];\n\n const resourceCache = message.resourceCache;\n let imageSrc = '';\n\n if (attachment.url) {\n if (resourceCache && resourceCache[attachment.url]) {\n imageSrc = getResourceSourceUrl(resourceCache[attachment.url]);\n } else {\n adapter.downloadResourceToCache({\n threadId,\n messageId,\n resourceUrl: attachment.url\n });\n }\n }\n\n const titleIconRenderOptions = {\n text: message.senderDisplayName,\n size: PersonaSize.size32,\n showOverflowTooltip: false,\n imageAlt: message.senderDisplayName\n };\n\n const messageSenderId = message.sender !== undefined ? toFlatCommunicationIdentifier(message.sender) : userId;\n const titleIcon = onRenderAvatarCallback && onRenderAvatarCallback(messageSenderId, titleIconRenderOptions);\n const overlayImage: OverlayImageItem = {\n title: message.senderDisplayName || '',\n titleIcon: titleIcon,\n attachmentId: attachment.id,\n imageSrc: imageSrc,\n messageId: messageId,\n imageUrl: attachment.url || ''\n };\n\n setIsImageOverlayOpen(true);\n setOverlayImageItem(overlayImage);\n },\n [adapter, adapterChatMessages, onRenderAvatarCallback, userId, threadId]\n );\n\n const onRenderInlineImage = useCallback(\n (inlineImage: InlineImage, defaultOnRender: (inlineImage: InlineImage) => JSX.Element): JSX.Element => {\n const message = adapterChatMessages[inlineImage.messageId];\n const attachment = message?.content?.attachments?.find(\n (attachment) => attachment.id === inlineImage.imageAttributes.id\n );\n\n if (attachment === undefined) {\n return defaultOnRender(inlineImage);\n }\n\n let pointerEvents: 'none' | 'auto' = inlineImage.imageAttributes.src === '' ? 'none' : 'auto';\n const resourceCache = message.resourceCache;\n if (\n resourceCache &&\n attachment.previewUrl &&\n resourceCache[attachment.previewUrl] &&\n resourceCache[attachment.previewUrl].error\n ) {\n pointerEvents = 'none';\n }\n\n return (\n <span\n key={inlineImage.imageAttributes.id}\n onClick={() => onInlineImageClicked(inlineImage.imageAttributes.id || '', inlineImage.messageId)}\n tabIndex={0}\n role=\"button\"\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n onInlineImageClicked(inlineImage.imageAttributes.id || '', inlineImage.messageId);\n }\n }}\n style={{ cursor: 'pointer', pointerEvents }}\n >\n {defaultOnRender(inlineImage)}\n </span>\n );\n },\n [adapterChatMessages, onInlineImageClicked]\n );\n\n const inlineImageOptions = useMemo(() => {\n return { onRenderInlineImage: onRenderInlineImage };\n }, [onRenderInlineImage]);\n\n const onDownloadButtonClicked = useCallback(\n (imageSrc: string): void => {\n if (imageSrc === '') {\n return;\n }\n if (isIOS()) {\n window.open(imageSrc, '_blank');\n } else {\n // Create a new anchor element\n const a = document.createElement('a');\n // Set the href and download attributes for the anchor element\n a.href = imageSrc;\n a.download = overlayImageItem?.attachmentId || '';\n a.rel = 'noopener noreferrer';\n a.target = '_blank';\n\n // Programmatically click the anchor element to trigger the download\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n }\n },\n [overlayImageItem?.attachmentId]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const attachmentButton = useMemo(() => {\n if (\n !attachmentOptions?.uploadOptions?.handleAttachmentSelection ||\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n textOnlyChat\n ) {\n return null;\n }\n return (\n <AttachmentUploadButton\n supportedMediaTypes={attachmentOptions?.uploadOptions?.supportedMediaTypes}\n disableMultipleUploads={attachmentOptions?.uploadOptions?.disableMultipleUploads}\n onChange={attachmentUploadButtonOnChange}\n />\n );\n return <></>;\n }, [\n attachmentOptions?.uploadOptions?.handleAttachmentSelection,\n attachmentOptions?.uploadOptions?.supportedMediaTypes,\n attachmentOptions?.uploadOptions?.disableMultipleUploads,\n attachmentUploadButtonOnChange,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n textOnlyChat\n ]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const attachments = useMemo(() => {\n return uploads?.map((v) => v.metadata);\n }, [uploads]);\n\n const onSendMessageHandler = useCallback(\n async function (\n content: string,\n /* @conditional-compile-remove(file-sharing-acs) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */ options?: MessageOptions\n ) {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = updateContentStringWithUploadedInlineImages(content, sendBoxInlineImageUploads);\n /* @conditional-compile-remove(file-sharing-acs) */\n const attachments = options?.attachments ?? [];\n /* @conditional-compile-remove(file-sharing-acs) */\n handleUploadAction({ type: AttachmentUploadActionType.Clear });\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n handleSendBoxInlineImageUploadAction({\n type: AttachmentUploadActionType.Clear,\n messageId: SEND_BOX_UPLOADS_KEY_VALUE\n });\n\n /* @conditional-compile-remove(file-sharing-acs) */\n await adapter.sendMessage(content, {\n attachments: attachments,\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n type: options?.type\n });\n /* @conditional-compile-remove(file-sharing-acs) */\n return;\n await adapter.sendMessage(content, {\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n type: options?.type\n });\n },\n [\n adapter,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ handleSendBoxInlineImageUploadAction,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ sendBoxInlineImageUploads\n ]\n );\n\n const onUpdateMessageHandler = useCallback(\n async function (\n messageId: string,\n content: string,\n /* @conditional-compile-remove(file-sharing-acs) */ options?: MessageOptions\n ) {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = updateContentStringWithUploadedInlineImages(content, editBoxInlineImageUploads, messageId);\n await messageThreadProps.onUpdateMessage(\n messageId,\n content,\n /* @conditional-compile-remove(file-sharing-acs) */ options\n );\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n handleEditBoxInlineImageUploadAction({ type: AttachmentUploadActionType.Clear, messageId });\n },\n [\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ handleEditBoxInlineImageUploadAction,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ editBoxInlineImageUploads,\n messageThreadProps\n ]\n );\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const onCancelEditMessageHandler = useCallback(\n (messageId: string) => {\n handleEditBoxInlineImageUploadAction({ type: AttachmentUploadActionType.Clear, messageId });\n },\n [handleEditBoxInlineImageUploadAction]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onCancelUploadHandler = useCallback(\n (id: string) => {\n handleUploadAction({ type: AttachmentUploadActionType.Remove, id });\n attachmentOptions?.uploadOptions?.handleAttachmentRemoval?.(id);\n },\n [attachmentOptions?.uploadOptions]\n );\n\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n const richTextEditorOptions = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const onPasteCallback = !!isACSChat || textOnlyChat ? removeImageTags : undefined;\n return options?.richTextEditor\n ? {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ onPaste: onPasteCallback\n }\n : undefined;\n }, [\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n isACSChat,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n textOnlyChat,\n options?.richTextEditor\n ]);\n\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n const richTextEditBoxOptions: RichTextEditBoxOptions | undefined = useMemo(() => {\n return options?.richTextEditor\n ? {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n ...richTextEditorOptions,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage: (imageAttributes: Record<string, string>, messageId: string) => {\n onInsertInlineImageForEditBox(\n imageAttributes,\n getImageFileNameFromAttributes(imageAttributes),\n messageId,\n adapter,\n handleEditBoxInlineImageUploadAction,\n localeStrings.chat\n );\n },\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n messagesInlineImagesWithProgress: getEditBoxMessagesInlineImages(editBoxInlineImageUploads),\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onRemoveInlineImage: (imageAttributes: Record<string, string>, messageId: string) => {\n cancelInlineImageUpload(\n imageAttributes,\n editBoxInlineImageUploads,\n messageId,\n handleEditBoxInlineImageUploadAction,\n adapter\n );\n }\n }\n : undefined;\n }, [\n options?.richTextEditor,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ richTextEditorOptions,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ editBoxInlineImageUploads,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ adapter,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ localeStrings.chat\n ]);\n\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n const richTextSendBoxOptions: RichTextSendBoxOptions | undefined = useMemo(() => {\n return options?.richTextEditor\n ? {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n ...richTextEditorOptions,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage: (imageAttributes: Record<string, string>) => {\n onInsertInlineImageForSendBox(\n imageAttributes,\n getImageFileNameFromAttributes(imageAttributes),\n adapter,\n handleSendBoxInlineImageUploadAction,\n localeStrings.chat\n );\n },\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImagesWithProgress: getSendBoxInlineImages(sendBoxInlineImageUploads),\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onRemoveInlineImage: (imageAttributes: Record<string, string>) => {\n cancelInlineImageUpload(\n imageAttributes,\n sendBoxInlineImageUploads,\n SEND_BOX_UPLOADS_KEY_VALUE,\n handleSendBoxInlineImageUploadAction,\n adapter\n );\n }\n }\n : undefined;\n }, [\n options?.richTextEditor,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ richTextEditorOptions,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ sendBoxInlineImageUploads,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ localeStrings.chat,\n adapter\n ]);\n\n return (\n <Stack className={chatContainer} grow>\n {options?.topic !== false && <ChatHeader {...headerProps} />}\n <Stack className={chatArea} tokens={participantListContainerPadding} horizontal grow>\n <Stack className={chatWrapper} grow>\n {options?.errorBar !== false && <ErrorBar {...errorBarProps} />}\n {\n /* @conditional-compile-remove(file-sharing-acs) */\n <AttachmentDownloadErrorBar\n onDismissDownloadErrorMessage={useCallback(() => {\n setDownloadErrorMessage('');\n }, [])}\n attachmentDownloadErrorMessage={downloadErrorMessage || ''}\n />\n }\n <MessageThread\n {...messageThreadProps}\n onUpdateMessage={onUpdateMessageHandler}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelEditMessage={onCancelEditMessageHandler}\n onRenderAvatar={onRenderAvatarCallback}\n onRenderMessage={onRenderMessage}\n /* @conditional-compile-remove(file-sharing-acs) */\n onRenderAttachmentDownloads={onRenderAttachmentDownloads}\n inlineImageOptions={inlineImageOptions}\n numberOfChatMessagesToReload={defaultNumberOfChatMessagesToReload}\n styles={messageThreadStyles}\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n richTextEditorOptions={richTextEditBoxOptions}\n />\n <Stack className={mergeStyles(sendboxContainerStyles)}>\n <div className={mergeStyles(typingIndicatorContainerStyles)}>\n {onRenderTypingIndicator ? (\n onRenderTypingIndicator(typingIndicatorProps.typingUsers)\n ) : (\n <TypingIndicator {...typingIndicatorProps} styles={typingIndicatorStyles} />\n )}\n </div>\n <Stack horizontal={formFactor === 'mobile'}>\n {formFactor === 'mobile' && (\n /* @conditional-compile-remove(file-sharing-acs) */\n <Stack verticalAlign=\"center\">{attachmentButton}</Stack>\n )}\n <Stack grow>\n <SendBoxPicker\n styles={sendBoxStyles}\n autoFocus={options?.autoFocus}\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n richTextEditorOptions={richTextSendBoxOptions}\n /* @conditional-compile-remove(file-sharing-acs) */\n attachments={attachments}\n /* @conditional-compile-remove(file-sharing-acs) */\n onCancelAttachmentUpload={onCancelUploadHandler}\n // we need to overwrite onSendMessage for SendBox because we need to clear attachment state\n // when submit button is clicked\n onSendMessage={onSendMessageHandler}\n />\n </Stack>\n {formFactor !== 'mobile' &&\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentButton}\n </Stack>\n </Stack>\n </Stack>\n {\n /* @conditional-compile-remove(chat-composite-participant-pane) */\n options?.participantPane === true && (\n <ChatScreenPeoplePane\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n isMobile={formFactor === 'mobile'}\n />\n )\n }\n </Stack>\n {overlayImageItem && (\n <ImageOverlay\n {...overlayImageItem}\n isOpen={isImageOverlayOpen}\n onDismiss={() => {\n setOverlayImageItem(undefined);\n setIsImageOverlayOpen(false);\n adapter.removeResourceFromCache({\n threadId,\n messageId: overlayImageItem.messageId,\n resourceUrl: overlayImageItem.imageUrl\n });\n }}\n onDownloadButtonClicked={onDownloadButtonClicked}\n />\n )}\n </Stack>\n );\n};\n"]}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { ChatAdapterState } from '../adapter/ChatAdapter';
|
2
|
+
/**
|
3
|
+
* @private
|
4
|
+
*/
|
5
|
+
export declare const useSelector: <SelectorT extends (state: ChatAdapterState, props: any) => any>(selector: SelectorT, selectorProps?: Parameters<SelectorT>[1]) => ReturnType<SelectorT>;
|
6
|
+
//# sourceMappingURL=useSelector.d.ts.map
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
import { useSelectorWithAdaptation } from './useAdaptedSelector';
|
4
|
+
/**
|
5
|
+
* @private
|
6
|
+
*/
|
7
|
+
export const useSelector = (selector, selectorProps) => {
|
8
|
+
// use selector with no adaptation
|
9
|
+
return useSelectorWithAdaptation(selector, (state) => state, selectorProps);
|
10
|
+
};
|
11
|
+
//# sourceMappingURL=useSelector.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useSelector.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/ChatComposite/hooks/useSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,QAAmB,EACnB,aAAwC,EACjB,EAAE;IACzB,kCAAkC;IAClC,OAAO,yBAAyB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAC9E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { ChatAdapterState } from '../adapter/ChatAdapter';\nimport { useSelectorWithAdaptation } from './useAdaptedSelector';\n\n/**\n * @private\n */\nexport const useSelector = <SelectorT extends (state: ChatAdapterState, props: any) => any>(\n selector: SelectorT,\n selectorProps?: Parameters<SelectorT>[1]\n): ReturnType<SelectorT> => {\n // use selector with no adaptation\n return useSelectorWithAdaptation(selector, (state) => state, selectorProps);\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
import { CommunicationIdentifierKind } from '@azure/communication-common';
|
2
|
+
import { ChatAdapterState } from '../adapter/ChatAdapter';
|
3
|
+
import { ChatMessageWithStatus } from "../../../../../chat-stateful-client/src";
|
4
|
+
/** @private */
|
5
|
+
export declare const getUserId: (state: ChatAdapterState) => CommunicationIdentifierKind;
|
6
|
+
/** @private */
|
7
|
+
export declare const getThreadId: (state: ChatAdapterState) => string;
|
8
|
+
/** @private */
|
9
|
+
export declare const getChatMessages: (state: ChatAdapterState) => {
|
10
|
+
[key: string]: ChatMessageWithStatus;
|
11
|
+
};
|
12
|
+
/** @private */
|
13
|
+
export declare const getTextOnlyChat: (state: ChatAdapterState) => boolean | undefined;
|
14
|
+
/** @private */
|
15
|
+
export declare const getCreatedBy: (state: ChatAdapterState) => CommunicationIdentifierKind | undefined;
|
16
|
+
//# sourceMappingURL=baseSelectors.d.ts.map
|
package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
/** @private */
|
4
|
+
export const getUserId = (state) => state.userId;
|
5
|
+
/** @private */
|
6
|
+
export const getThreadId = (state) => state.thread.threadId;
|
7
|
+
/** @private */
|
8
|
+
export const getChatMessages = (state) => state.thread.chatMessages;
|
9
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
10
|
+
/** @private */
|
11
|
+
export const getTextOnlyChat = (state) => { var _a, _b; return (_b = (_a = state.thread.properties) === null || _a === void 0 ? void 0 : _a.messagingPolicy) === null || _b === void 0 ? void 0 : _b.textOnlyChat; };
|
12
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
13
|
+
/** @private */
|
14
|
+
export const getCreatedBy = (state) => { var _a; return (_a = state.thread.properties) === null || _a === void 0 ? void 0 : _a.createdBy; };
|
15
|
+
//# sourceMappingURL=baseSelectors.js.map
|
package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"baseSelectors.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/ChatComposite/selectors/baseSelectors.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,eAAe;AACf,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAuB,EAA+B,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;AAEhG,eAAe;AACf,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAU,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;AAEtF,eAAe;AACf,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAuB,EAA4C,EAAE,CACnG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;AAE5B,gEAAgE;AAChE,eAAe;AACf,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAuB,EAAuB,EAAE,eAC9E,OAAA,MAAA,MAAA,KAAK,CAAC,MAAM,CAAC,UAAU,0CAAE,eAAe,0CAAE,YAAY,CAAA,EAAA,CAAC;AAEzD,gEAAgE;AAChE,eAAe;AACf,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAuB,EAA2C,EAAE,WAC/F,OAAA,MAAA,KAAK,CAAC,MAAM,CAAC,UAAU,0CAAE,SAAS,CAAA,EAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { ChatAdapterState } from '../adapter/ChatAdapter';\nimport { ChatMessageWithStatus } from '@internal/chat-stateful-client';\n\n/** @private */\nexport const getUserId = (state: ChatAdapterState): CommunicationIdentifierKind => state.userId;\n\n/** @private */\nexport const getThreadId = (state: ChatAdapterState): string => state.thread.threadId;\n\n/** @private */\nexport const getChatMessages = (state: ChatAdapterState): { [key: string]: ChatMessageWithStatus } =>\n state.thread.chatMessages;\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/** @private */\nexport const getTextOnlyChat = (state: ChatAdapterState): boolean | undefined =>\n state.thread.properties?.messagingPolicy?.textOnlyChat;\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/** @private */\nexport const getCreatedBy = (state: ChatAdapterState): CommunicationIdentifierKind | undefined =>\n state.thread.properties?.createdBy;\n"]}
|
@@ -9,8 +9,8 @@ import { localAndRemotePIPSelector } from '../CallComposite/selectors/localAndRe
|
|
9
9
|
import { _ModalClone } from "../../../../react-components/src";
|
10
10
|
import { _RemoteVideoTile } from "../../../../react-components/src";
|
11
11
|
import { hiddenStyle, modalStyle, PIPContainerStyle } from './styles/ModalLocalAndRemotePIP.styles';
|
12
|
-
import { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';
|
13
12
|
import { useLocale } from '../localization';
|
13
|
+
import { getRole } from '../CallComposite/selectors/baseSelectors';
|
14
14
|
/**
|
15
15
|
* Drag options for Modal in {@link ModalLocalAndRemotePIP} component
|
16
16
|
*/
|
@@ -26,10 +26,9 @@ const DRAG_OPTIONS = {
|
|
26
26
|
* @private
|
27
27
|
*/
|
28
28
|
export const ModalLocalAndRemotePIP = (props) => {
|
29
|
-
var _a
|
29
|
+
var _a;
|
30
30
|
const rootStyles = props.hidden ? hiddenStyle : PIPContainerStyle;
|
31
|
-
const
|
32
|
-
const role = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role;
|
31
|
+
const role = useSelector(getRole);
|
33
32
|
const locale = useLocale();
|
34
33
|
const pictureInPictureProps = useSelector(localAndRemotePIPSelector);
|
35
34
|
const [touchStartTouches, setTouchStartTouches] = useState(null);
|
@@ -75,7 +74,7 @@ export const ModalLocalAndRemotePIP = (props) => {
|
|
75
74
|
if (role === 'Consumer' && !remoteParticipant) {
|
76
75
|
return null;
|
77
76
|
}
|
78
|
-
const modalStylesThemed = concatStyleSets(modalStyle, (
|
77
|
+
const modalStylesThemed = concatStyleSets(modalStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.modal);
|
79
78
|
return (React.createElement(Stack, { styles: rootStyles },
|
80
79
|
React.createElement(Stack, { onTouchStart: onTouchStart, onTouchEnd: onTouchEnd },
|
81
80
|
React.createElement(_ModalClone, { isOpen: true, isModeless: true, dragOptions: DRAG_OPTIONS, styles: modalStylesThemed, layerProps: { hostId: props.modalLayerHostId }, minDragPosition: props.minDragPosition, maxDragPosition: props.maxDragPosition },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ModalLocalAndRemotePIP.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/ModalLocalAndRemotePIP.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAgB,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,EAAE,WAAW,EAAiB,yCAAmC;AACxE,OAAO,EAAE,gBAAgB,EAAE,yCAAmC;AAC9D,OAAO,EACL,WAAW,EAEX,UAAU,EACV,iBAAiB,EAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"ModalLocalAndRemotePIP.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/ModalLocalAndRemotePIP.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAgB,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAA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,CAAC;QACJ,CAAC;QACD,OAAO,CACL,oBAAC,KAAK,IAAC,QAAQ,EAAE,CAAC,gBAAc,MAAA,MAAA,KAAK,CAAC,OAAO,0CAAE,qBAAqB,mCAAI,EAAE,EAAE,SAAS,EAAE,SAAS;YAC9F,oBAAC,iBAAiB,oBACZ,qBAAqB,EACrB,wBAAwB,IAC5B,iBAAiB,EAAE,iBAAiB,IACpC,CACI,CACT,CAAC;IACJ,CAAC,EAAE;QACD,IAAI;QACJ,SAAS;QACT,qBAAqB;QACrB,KAAK;QACL,wBAAwB;QACxB,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY;QACrC,iBAAiB;KAClB,CAAC,CAAC;IAEH,IAAI,IAAI,KAAK,UAAU,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,iBAAiB,GAAG,eAAe,CAAC,UAAU,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,KAAK,CAAC,CAAC;IAE3E,OAAO,CACL,oBAAC,KAAK,IAAC,MAAM,EAAE,UAAU;QACvB,oBAAC,KAAK,IAAC,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU;YACvD,oBAAC,WAAW,IACV,MAAM,EAAE,IAAI,EACZ,UAAU,EAAE,IAAI,EAChB,WAAW,EAAE,YAAY,EACzB,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,gBAAgB,EAAE,EAC9C,eAAe,EAAE,KAAK,CAAC,eAAe,EACtC,eAAe,EAAE,KAAK,CAAC,eAAe;YAGpC,qGAAqG;YACrG,6DAA6D;YAC7D,CAAC,KAAK,CAAC,MAAM,IAAI,iBAAiB,CAExB,CACR,CACF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { concatStyleSets, ContextualMenu, IDragOptions, Stack } from '@fluentui/react';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { LocalAndRemotePIP } from '../CallComposite/components/LocalAndRemotePIP';\nimport { useHandlers } from '../CallComposite/hooks/useHandlers';\nimport { useSelector } from '../CallComposite/hooks/useSelector';\nimport { localAndRemotePIPSelector } from '../CallComposite/selectors/localAndRemotePIPSelector';\nimport { _ModalClone, _ICoordinates } from '@internal/react-components';\nimport { _RemoteVideoTile } from '@internal/react-components';\nimport {\n hiddenStyle,\n ModalLocalAndRemotePIPStyles,\n modalStyle,\n PIPContainerStyle\n} from './styles/ModalLocalAndRemotePIP.styles';\nimport { useLocale } from '../localization';\nimport { getRole } from '../CallComposite/selectors/baseSelectors';\n\n/**\n * Drag options for Modal in {@link ModalLocalAndRemotePIP} component\n */\nconst DRAG_OPTIONS: IDragOptions = {\n moveMenuItemText: 'Move',\n closeMenuItemText: 'Close',\n menu: ContextualMenu,\n keepInBounds: true\n};\n\n/**\n * @private\n */\nexport interface ModalLocalAndRemotePIPStrings {\n /**\n * Aria label for dismiss control when using keyboard\n */\n dismissModalAriaLabel?: string;\n}\n\n/**\n * A wrapping component with a draggable {@link LocalAndRemotePIP} component that is bound to a LayerHost component with id\n * specified by `modalLayerHostId` prop\n * @private\n */\nexport const ModalLocalAndRemotePIP = (props: {\n hidden: boolean;\n modalLayerHostId: string;\n styles?: ModalLocalAndRemotePIPStyles;\n minDragPosition?: _ICoordinates;\n maxDragPosition?: _ICoordinates;\n onDismissSidePane?: () => void;\n strings?: ModalLocalAndRemotePIPStrings;\n}): JSX.Element | null => {\n const rootStyles = props.hidden ? hiddenStyle : PIPContainerStyle;\n\n const role = useSelector(getRole);\n\n const locale = useLocale();\n\n const pictureInPictureProps = useSelector(localAndRemotePIPSelector);\n\n const [touchStartTouches, setTouchStartTouches] = useState<React.TouchList | null>(null);\n\n const onTouchEnd = useCallback(\n (event: React.TouchEvent) => {\n if (touchStartTouches && touchStartTouches.length === 1 && event.changedTouches.length === 1) {\n const touchStartTouch = touchStartTouches[0];\n const touchEndTouch = event.changedTouches[0];\n if (\n Math.abs(touchStartTouch.clientX - touchEndTouch.clientX) < 10 &&\n Math.abs(touchStartTouch.clientY - touchEndTouch.clientY) < 10\n ) {\n props.onDismissSidePane?.();\n }\n }\n },\n [props, touchStartTouches]\n );\n\n const onTouchStart = useCallback((event: React.TouchEvent) => {\n setTouchStartTouches(event.touches);\n }, []);\n\n const onKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n props.onDismissSidePane?.();\n }\n },\n [props]\n );\n\n const pictureInPictureHandlers = useHandlers(LocalAndRemotePIP);\n const remoteParticipant = pictureInPictureProps.remoteParticipant;\n\n const localAndRemotePIP = useMemo(() => {\n if (role === 'Consumer' && remoteParticipant?.userId) {\n return (\n <Stack tabIndex={0} aria-label={props.strings?.dismissModalAriaLabel ?? ''} onKeyDown={onKeyDown}>\n <_RemoteVideoTile\n strings={locale.component.strings.videoGallery}\n {...remoteParticipant}\n remoteParticipant={remoteParticipant}\n />\n </Stack>\n );\n }\n return (\n <Stack tabIndex={0} aria-label={props.strings?.dismissModalAriaLabel ?? ''} onKeyDown={onKeyDown}>\n <LocalAndRemotePIP\n {...pictureInPictureProps}\n {...pictureInPictureHandlers}\n remoteParticipant={remoteParticipant}\n />\n </Stack>\n );\n }, [\n role,\n onKeyDown,\n pictureInPictureProps,\n props,\n pictureInPictureHandlers,\n locale.component.strings.videoGallery,\n remoteParticipant\n ]);\n\n if (role === 'Consumer' && !remoteParticipant) {\n return null;\n }\n\n const modalStylesThemed = concatStyleSets(modalStyle, props.styles?.modal);\n\n return (\n <Stack styles={rootStyles}>\n <Stack onTouchStart={onTouchStart} onTouchEnd={onTouchEnd}>\n <_ModalClone\n isOpen={true}\n isModeless={true}\n dragOptions={DRAG_OPTIONS}\n styles={modalStylesThemed}\n layerProps={{ hostId: props.modalLayerHostId }}\n minDragPosition={props.minDragPosition}\n maxDragPosition={props.maxDragPosition}\n >\n {\n // Only render LocalAndRemotePIP when this component is NOT hidden because VideoGallery needs to have\n // possession of the dominant remote participant video stream\n !props.hidden && localAndRemotePIP\n }\n </_ModalClone>\n </Stack>\n </Stack>\n );\n};\n"]}
|
@@ -2,6 +2,7 @@
|
|
2
2
|
import { IContextualMenuProps } from '@fluentui/react';
|
3
3
|
import { ParticipantMenuItemsCallback, _DrawerMenuItemProps } from "../../../../react-components/src";
|
4
4
|
import { AvatarPersonaDataCallback } from '../common/AvatarPersona';
|
5
|
+
import { ParticipantRole } from '@azure/communication-calling';
|
5
6
|
/**
|
6
7
|
* @private
|
7
8
|
*/
|
@@ -14,5 +15,7 @@ export declare const PeoplePaneContent: (props: {
|
|
14
15
|
mobileView?: boolean;
|
15
16
|
participantListHeadingMoreButtonProps?: IContextualMenuProps;
|
16
17
|
pinnedParticipants?: string[];
|
18
|
+
role: ParticipantRole | undefined;
|
19
|
+
alternateCallerId: string | undefined;
|
17
20
|
}) => JSX.Element;
|
18
21
|
//# sourceMappingURL=PeoplePaneContent.d.ts.map
|
@@ -39,9 +39,8 @@ export const PeoplePaneContent = (props) => {
|
|
39
39
|
const addParticipantToCall = useCallback((participant, options) => __awaiter(void 0, void 0, void 0, function* () {
|
40
40
|
yield adapter.addParticipant(participant, options);
|
41
41
|
}), [adapter]);
|
42
|
-
const alternateCallerId = adapter.getState().alternateCallerId;
|
43
42
|
const participantListDefaultProps = usePropsFor(ParticipantList);
|
44
|
-
const removeButtonAllowed = canRemoveParticipants(
|
43
|
+
const removeButtonAllowed = canRemoveParticipants(props.role);
|
45
44
|
const setDrawerMenuItemsForParticipant = useMemo(() => {
|
46
45
|
return (participant) => {
|
47
46
|
if (participant) {
|
@@ -79,9 +78,9 @@ export const PeoplePaneContent = (props) => {
|
|
79
78
|
if (props.mobileView) {
|
80
79
|
return (React.createElement(Stack, { verticalFill: true, styles: peoplePaneContainerStyle, tokens: peoplePaneContainerTokens, "data-ui-id": "people-pane-content" },
|
81
80
|
React.createElement(Stack.Item, { grow: true, styles: participantListContainerStyles }, participantList),
|
82
|
-
React.createElement(AddPeopleButton, { inviteLink: inviteLink, mobileView: props.mobileView, participantList: participantList, strings: strings, onAddParticipant: addParticipantToCall, alternateCallerId: alternateCallerId })));
|
81
|
+
React.createElement(AddPeopleButton, { inviteLink: inviteLink, mobileView: props.mobileView, participantList: participantList, strings: strings, onAddParticipant: addParticipantToCall, alternateCallerId: props.alternateCallerId })));
|
83
82
|
}
|
84
|
-
return (React.createElement(AddPeopleButton, { inviteLink: inviteLink, mobileView: props.mobileView, participantList: participantList, strings: strings, onAddParticipant: addParticipantToCall, alternateCallerId: alternateCallerId }));
|
83
|
+
return (React.createElement(AddPeopleButton, { inviteLink: inviteLink, mobileView: props.mobileView, participantList: participantList, strings: strings, onAddParticipant: addParticipantToCall, alternateCallerId: props.alternateCallerId }));
|
85
84
|
};
|
86
85
|
/**
|
87
86
|
* Create default contextual menu items for particant
|
@@ -111,13 +110,11 @@ const createDefaultContextualMenuItems = (participant, strings, onRemoveParticip
|
|
111
110
|
}
|
112
111
|
return menuItems;
|
113
112
|
};
|
114
|
-
const canRemoveParticipants = (
|
115
|
-
var _a;
|
113
|
+
const canRemoveParticipants = (role) => {
|
116
114
|
// TODO: We should be using the removeParticipant capability here but there is an SDK bug for Rooms where a
|
117
115
|
// Presenter's removeParticipant capability is {isPresent: false, reason: 'CapabilityNotApplicableForTheCallType'}.
|
118
116
|
// But a Presenter in Rooms should be able to remove participants according to the following documentation
|
119
117
|
// https://learn.microsoft.com/en-us/azure/communication-services/concepts/rooms/room-concept#predefined-participant-roles-and-permissions
|
120
|
-
const role = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role;
|
121
118
|
const canRemove = role === 'Presenter' || role === 'Unknown' || role === undefined;
|
122
119
|
return canRemove;
|
123
120
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PeoplePaneContent.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/PeoplePaneContent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;A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vC,WAAuC,EACvC,OAA4D,EAC5D,mBAAuD,EACvD,sBAA+B,EACR,EAAE;IACzB,MAAM,SAAS,GAA0B,EAAE,CAAC;IAC5C,IAAI,mBAAmB,IAAI,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,MAAK,sBAAsB,EAAE,CAAC;QAC1E,SAAS,CAAC,IAAI,CAAC;YACb,GAAG,EAAE,QAAQ;YACb,IAAI,EAAE,OAAO,CAAC,eAAe;YAC7B,OAAO,EAAE,GAAG,EAAE;gBACZ,IAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,EAAE,CAAC;oBACxB,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,CAAC,CAAC;gBAC7C,CAAC;YACH,CAAC;YACD,SAAS,EAAE;gBACT,QAAQ,EAAE,8BAA8B;gBACxC,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE;aACpC;YACD,YAAY,EAAE,4CAA4C;SAC3D,CAAC,CAAC;IACL,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,OAA0B,EAAW,EAAE;;IACpE,2GAA2G;IAC3G,mHAAmH;IACnH,0GAA0G;IAC1G,0IAA0I;IAC1I,MAAM,IAAI,GAAG,MAAA,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,0CAAE,IAAI,CAAC;IAC3C,MAAM,SAAS,GAAG,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,CAAC;IACnF,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IContextualMenuItem, IContextualMenuProps, Stack } from '@fluentui/react';\nimport {\n ParticipantList,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantMenuItemsCallback,\n _DrawerMenuItemProps\n} from '@internal/react-components';\nimport React, { useCallback, useMemo } from 'react';\nimport { CallWithChatCompositeStrings } from '../CallWithChatComposite';\nimport { usePropsFor } from '../CallComposite/hooks/usePropsFor';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport { ParticipantListWithHeading } from '../common/ParticipantContainer';\nimport { peoplePaneContainerTokens } from '../common/styles/ParticipantContainer.styles';\nimport { participantListContainerStyles, peoplePaneContainerStyle } from './styles/PeoplePaneContent.styles';\nimport { convertContextualMenuItemToDrawerMenuItem } from './ConvertContextualMenuItemToDrawerMenuItem';\nimport { CommonCallAdapter } from '../CallComposite';\nimport { CallCompositeStrings } from '../CallComposite';\nimport { AddPeopleButton } from './AddPeopleButton';\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';\nimport { useLocale } from '../localization';\n\n/**\n * @private\n */\nexport const PeoplePaneContent = (props: {\n inviteLink?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n setDrawerMenuItems: (drawerMenuItems: _DrawerMenuItemProps[]) => void;\n setParticipantActioned?: (userId: string) => void;\n mobileView?: boolean;\n participantListHeadingMoreButtonProps?: IContextualMenuProps;\n pinnedParticipants?: string[];\n}): JSX.Element => {\n const {\n inviteLink,\n onFetchParticipantMenuItems,\n setDrawerMenuItems,\n setParticipantActioned,\n participantListHeadingMoreButtonProps\n } = props;\n const adapter = useAdapter();\n const localeStrings = useLocale();\n\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const getStrings = () => {\n return localeStrings.strings.call;\n\n return localeStrings.strings.callWithChat;\n };\n const strings = getStrings();\n\n const removeParticipantFromCall = useCallback(\n async (participantId: string): Promise<void> => {\n await adapter.removeParticipant(participantId);\n },\n [adapter]\n );\n\n const addParticipantToCall = useCallback(\n async (participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void> => {\n await adapter.addParticipant(participant, options);\n },\n [adapter]\n );\n\n const alternateCallerId = adapter.getState().alternateCallerId;\n\n const participantListDefaultProps = usePropsFor(ParticipantList);\n const removeButtonAllowed = canRemoveParticipants(adapter);\n const setDrawerMenuItemsForParticipant: (participant?: ParticipantListParticipant) => void = useMemo(() => {\n return (participant?: ParticipantListParticipant) => {\n if (participant) {\n setParticipantActioned?.(participant.userId);\n let contextualMenuItems: IContextualMenuItem[] = createDefaultContextualMenuItems(\n participant,\n strings,\n removeButtonAllowed && participant.isRemovable ? participantListDefaultProps.onRemoveParticipant : undefined,\n participantListDefaultProps.myUserId\n );\n if (onFetchParticipantMenuItems) {\n contextualMenuItems = onFetchParticipantMenuItems(\n participant.userId,\n participantListDefaultProps.myUserId,\n contextualMenuItems\n );\n }\n const drawerMenuItems = contextualMenuItems.map((contextualMenu: IContextualMenuItem) =>\n convertContextualMenuItemToDrawerMenuItem(contextualMenu, () => setDrawerMenuItems([]))\n );\n setDrawerMenuItems(drawerMenuItems);\n }\n };\n }, [\n strings,\n participantListDefaultProps.onRemoveParticipant,\n participantListDefaultProps.myUserId,\n removeButtonAllowed,\n onFetchParticipantMenuItems,\n setDrawerMenuItems,\n setParticipantActioned\n ]);\n\n const setDrawerMenuItemsForParticipantListHeadingMoreButton = useMemo(() => {\n const drawerMenuItems = participantListHeadingMoreButtonProps?.items.map((contextualMenu: IContextualMenuItem) =>\n convertContextualMenuItemToDrawerMenuItem(contextualMenu, () => setDrawerMenuItems([]))\n );\n return drawerMenuItems && drawerMenuItems.length > 0 ? () => setDrawerMenuItems(drawerMenuItems) : undefined;\n }, [participantListHeadingMoreButtonProps?.items, setDrawerMenuItems]);\n\n const participantListProps: ParticipantListProps = useMemo(() => {\n const onRemoveAParticipant = async (participantId: string): Promise<void> =>\n removeParticipantFromCall(participantId);\n return {\n ...participantListDefaultProps,\n // Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked\n onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,\n // We want the drawer menu items to appear when participants in ParticipantList are clicked\n onParticipantClick: props.mobileView ? setDrawerMenuItemsForParticipant : undefined\n };\n }, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant, removeParticipantFromCall]);\n\n const participantList = (\n <ParticipantListWithHeading\n isMobile={props.mobileView}\n participantListProps={participantListProps}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.mobileView ? undefined : onFetchParticipantMenuItems}\n title={strings.peoplePaneSubTitle}\n headingMoreButtonAriaLabel={localeStrings.strings.call.peoplePaneMoreButtonAriaLabel}\n onClickHeadingMoreButton={props.mobileView ? setDrawerMenuItemsForParticipantListHeadingMoreButton : undefined}\n headingMoreButtonMenuProps={props.participantListHeadingMoreButtonProps}\n pinnedParticipants={props.pinnedParticipants}\n />\n );\n\n if (props.mobileView) {\n return (\n <Stack\n verticalFill\n styles={peoplePaneContainerStyle}\n tokens={peoplePaneContainerTokens}\n data-ui-id=\"people-pane-content\"\n >\n <Stack.Item grow styles={participantListContainerStyles}>\n {participantList}\n </Stack.Item>\n\n <AddPeopleButton\n inviteLink={inviteLink}\n mobileView={props.mobileView}\n participantList={participantList}\n strings={strings}\n onAddParticipant={addParticipantToCall}\n alternateCallerId={alternateCallerId}\n />\n </Stack>\n );\n }\n\n return (\n <AddPeopleButton\n inviteLink={inviteLink}\n mobileView={props.mobileView}\n participantList={participantList}\n strings={strings}\n onAddParticipant={addParticipantToCall}\n alternateCallerId={alternateCallerId}\n />\n );\n};\n\n/**\n * Create default contextual menu items for particant\n * @param participant - participant to create contextual menu items for\n * @param strings - localized strings for menu item text\n * @param onRemoveParticipant - callback to remove participant\n * @param localParticipantUserId - Local participant user id\n * @returns - IContextualMenuItem[]\n */\nconst createDefaultContextualMenuItems = (\n participant: ParticipantListParticipant,\n strings: CallWithChatCompositeStrings | CallCompositeStrings,\n onRemoveParticipant?: (userId: string) => Promise<void>,\n localParticipantUserId?: string\n): IContextualMenuItem[] => {\n const menuItems: IContextualMenuItem[] = [];\n if (onRemoveParticipant && participant?.userId !== localParticipantUserId) {\n menuItems.push({\n key: 'remove',\n text: strings.removeMenuLabel,\n onClick: () => {\n if (participant?.userId) {\n onRemoveParticipant?.(participant?.userId);\n }\n },\n iconProps: {\n iconName: 'ContextMenuRemoveParticipant',\n styles: { root: { lineHeight: 0 } }\n },\n 'data-ui-id': 'participant-list-remove-participant-button'\n });\n }\n return menuItems;\n};\n\nconst canRemoveParticipants = (adapter: CommonCallAdapter): boolean => {\n // TODO: We should be using the removeParticipant capability here but there is an SDK bug for Rooms where a\n // Presenter's removeParticipant capability is {isPresent: false, reason: 'CapabilityNotApplicableForTheCallType'}.\n // But a Presenter in Rooms should be able to remove participants according to the following documentation\n // https://learn.microsoft.com/en-us/azure/communication-services/concepts/rooms/room-concept#predefined-participant-roles-and-permissions\n const role = adapter.getState().call?.role;\n const canRemove = role === 'Presenter' || role === 'Unknown' || role === undefined;\n return canRemove;\n};\n"]}
|
1
|
+
{"version":3,"file":"PeoplePaneContent.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/PeoplePaneContent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAA6C,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EACL,eAAe,EAKhB,yCAAmC;AACpC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7G,OAAO,EAAE,yCA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AX,WAAW,CAAE,MAAM,CAAC,CAAC;gBAC7C,CAAC;YACH,CAAC;YACD,SAAS,EAAE;gBACT,QAAQ,EAAE,8BAA8B;gBACxC,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE;aACpC;YACD,YAAY,EAAE,4CAA4C;SAC3D,CAAC,CAAC;IACL,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,IAAiC,EAAW,EAAE;IAC3E,2GAA2G;IAC3G,mHAAmH;IACnH,0GAA0G;IAC1G,0IAA0I;IAC1I,MAAM,SAAS,GAAG,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,CAAC;IACnF,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IContextualMenuItem, IContextualMenuProps, Stack } from '@fluentui/react';\nimport {\n ParticipantList,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantMenuItemsCallback,\n _DrawerMenuItemProps\n} from '@internal/react-components';\nimport React, { useCallback, useMemo } from 'react';\nimport { CallWithChatCompositeStrings } from '../CallWithChatComposite';\nimport { usePropsFor } from '../CallComposite/hooks/usePropsFor';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport { ParticipantListWithHeading } from '../common/ParticipantContainer';\nimport { peoplePaneContainerTokens } from '../common/styles/ParticipantContainer.styles';\nimport { participantListContainerStyles, peoplePaneContainerStyle } from './styles/PeoplePaneContent.styles';\nimport { convertContextualMenuItemToDrawerMenuItem } from './ConvertContextualMenuItemToDrawerMenuItem';\nimport { CallCompositeStrings } from '../CallComposite';\nimport { AddPeopleButton } from './AddPeopleButton';\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { AddPhoneNumberOptions, ParticipantRole } from '@azure/communication-calling';\nimport { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';\nimport { useLocale } from '../localization';\n\n/**\n * @private\n */\nexport const PeoplePaneContent = (props: {\n inviteLink?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n setDrawerMenuItems: (drawerMenuItems: _DrawerMenuItemProps[]) => void;\n setParticipantActioned?: (userId: string) => void;\n mobileView?: boolean;\n participantListHeadingMoreButtonProps?: IContextualMenuProps;\n pinnedParticipants?: string[];\n role: ParticipantRole | undefined;\n alternateCallerId: string | undefined;\n}): JSX.Element => {\n const {\n inviteLink,\n onFetchParticipantMenuItems,\n setDrawerMenuItems,\n setParticipantActioned,\n participantListHeadingMoreButtonProps\n } = props;\n const adapter = useAdapter();\n const localeStrings = useLocale();\n\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const getStrings = () => {\n return localeStrings.strings.call;\n\n return localeStrings.strings.callWithChat;\n };\n const strings = getStrings();\n\n const removeParticipantFromCall = useCallback(\n async (participantId: string): Promise<void> => {\n await adapter.removeParticipant(participantId);\n },\n [adapter]\n );\n\n const addParticipantToCall = useCallback(\n async (participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void> => {\n await adapter.addParticipant(participant, options);\n },\n [adapter]\n );\n\n const participantListDefaultProps = usePropsFor(ParticipantList);\n const removeButtonAllowed = canRemoveParticipants(props.role);\n const setDrawerMenuItemsForParticipant: (participant?: ParticipantListParticipant) => void = useMemo(() => {\n return (participant?: ParticipantListParticipant) => {\n if (participant) {\n setParticipantActioned?.(participant.userId);\n let contextualMenuItems: IContextualMenuItem[] = createDefaultContextualMenuItems(\n participant,\n strings,\n removeButtonAllowed && participant.isRemovable ? participantListDefaultProps.onRemoveParticipant : undefined,\n participantListDefaultProps.myUserId\n );\n if (onFetchParticipantMenuItems) {\n contextualMenuItems = onFetchParticipantMenuItems(\n participant.userId,\n participantListDefaultProps.myUserId,\n contextualMenuItems\n );\n }\n const drawerMenuItems = contextualMenuItems.map((contextualMenu: IContextualMenuItem) =>\n convertContextualMenuItemToDrawerMenuItem(contextualMenu, () => setDrawerMenuItems([]))\n );\n setDrawerMenuItems(drawerMenuItems);\n }\n };\n }, [\n strings,\n participantListDefaultProps.onRemoveParticipant,\n participantListDefaultProps.myUserId,\n removeButtonAllowed,\n onFetchParticipantMenuItems,\n setDrawerMenuItems,\n setParticipantActioned\n ]);\n\n const setDrawerMenuItemsForParticipantListHeadingMoreButton = useMemo(() => {\n const drawerMenuItems = participantListHeadingMoreButtonProps?.items.map((contextualMenu: IContextualMenuItem) =>\n convertContextualMenuItemToDrawerMenuItem(contextualMenu, () => setDrawerMenuItems([]))\n );\n return drawerMenuItems && drawerMenuItems.length > 0 ? () => setDrawerMenuItems(drawerMenuItems) : undefined;\n }, [participantListHeadingMoreButtonProps?.items, setDrawerMenuItems]);\n\n const participantListProps: ParticipantListProps = useMemo(() => {\n const onRemoveAParticipant = async (participantId: string): Promise<void> =>\n removeParticipantFromCall(participantId);\n return {\n ...participantListDefaultProps,\n // Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked\n onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,\n // We want the drawer menu items to appear when participants in ParticipantList are clicked\n onParticipantClick: props.mobileView ? setDrawerMenuItemsForParticipant : undefined\n };\n }, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant, removeParticipantFromCall]);\n\n const participantList = (\n <ParticipantListWithHeading\n isMobile={props.mobileView}\n participantListProps={participantListProps}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.mobileView ? undefined : onFetchParticipantMenuItems}\n title={strings.peoplePaneSubTitle}\n headingMoreButtonAriaLabel={localeStrings.strings.call.peoplePaneMoreButtonAriaLabel}\n onClickHeadingMoreButton={props.mobileView ? setDrawerMenuItemsForParticipantListHeadingMoreButton : undefined}\n headingMoreButtonMenuProps={props.participantListHeadingMoreButtonProps}\n pinnedParticipants={props.pinnedParticipants}\n />\n );\n\n if (props.mobileView) {\n return (\n <Stack\n verticalFill\n styles={peoplePaneContainerStyle}\n tokens={peoplePaneContainerTokens}\n data-ui-id=\"people-pane-content\"\n >\n <Stack.Item grow styles={participantListContainerStyles}>\n {participantList}\n </Stack.Item>\n\n <AddPeopleButton\n inviteLink={inviteLink}\n mobileView={props.mobileView}\n participantList={participantList}\n strings={strings}\n onAddParticipant={addParticipantToCall}\n alternateCallerId={props.alternateCallerId}\n />\n </Stack>\n );\n }\n\n return (\n <AddPeopleButton\n inviteLink={inviteLink}\n mobileView={props.mobileView}\n participantList={participantList}\n strings={strings}\n onAddParticipant={addParticipantToCall}\n alternateCallerId={props.alternateCallerId}\n />\n );\n};\n\n/**\n * Create default contextual menu items for particant\n * @param participant - participant to create contextual menu items for\n * @param strings - localized strings for menu item text\n * @param onRemoveParticipant - callback to remove participant\n * @param localParticipantUserId - Local participant user id\n * @returns - IContextualMenuItem[]\n */\nconst createDefaultContextualMenuItems = (\n participant: ParticipantListParticipant,\n strings: CallWithChatCompositeStrings | CallCompositeStrings,\n onRemoveParticipant?: (userId: string) => Promise<void>,\n localParticipantUserId?: string\n): IContextualMenuItem[] => {\n const menuItems: IContextualMenuItem[] = [];\n if (onRemoveParticipant && participant?.userId !== localParticipantUserId) {\n menuItems.push({\n key: 'remove',\n text: strings.removeMenuLabel,\n onClick: () => {\n if (participant?.userId) {\n onRemoveParticipant?.(participant?.userId);\n }\n },\n iconProps: {\n iconName: 'ContextMenuRemoveParticipant',\n styles: { root: { lineHeight: 0 } }\n },\n 'data-ui-id': 'participant-list-remove-participant-button'\n });\n }\n return menuItems;\n};\n\nconst canRemoveParticipants = (role: ParticipantRole | undefined): boolean => {\n // TODO: We should be using the removeParticipant capability here but there is an SDK bug for Rooms where a\n // Presenter's removeParticipant capability is {isPresent: false, reason: 'CapabilityNotApplicableForTheCallType'}.\n // But a Presenter in Rooms should be able to remove participants according to the following documentation\n // https://learn.microsoft.com/en-us/azure/communication-services/concepts/rooms/room-concept#predefined-participant-roles-and-permissions\n const canRemove = role === 'Presenter' || role === 'Unknown' || role === undefined;\n return canRemove;\n};\n"]}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ActiveErrorMessage } from "../../../../react-components/src";
|
3
|
+
import { VideoBackgroundImage } from '../CallComposite';
|
3
4
|
import { ActiveVideoEffect } from '../CallComposite/components/SidePane/useVideoEffectsPane';
|
4
5
|
/**
|
5
6
|
* Pane that is used to show video effects button
|
@@ -13,5 +14,6 @@ export declare const VideoEffectsPaneContent: (props: {
|
|
13
14
|
updateFocusHandle: React.RefObject<{
|
14
15
|
focus: () => void;
|
15
16
|
}>;
|
17
|
+
backgroundImages: VideoBackgroundImage[] | undefined;
|
16
18
|
}) => JSX.Element;
|
17
19
|
//# sourceMappingURL=VideoEffectsPane.d.ts.map
|
@@ -53,9 +53,8 @@ export const VideoEffectsPaneContent = (props) => {
|
|
53
53
|
}
|
54
54
|
}
|
55
55
|
];
|
56
|
-
|
57
|
-
|
58
|
-
videoEffectImages.forEach((img) => {
|
56
|
+
if (props.backgroundImages) {
|
57
|
+
props.backgroundImages.forEach((img) => {
|
59
58
|
var _a;
|
60
59
|
videoEffects.push({
|
61
60
|
itemKey: img.key,
|
@@ -69,7 +68,13 @@ export const VideoEffectsPaneContent = (props) => {
|
|
69
68
|
});
|
70
69
|
}
|
71
70
|
return videoEffects;
|
72
|
-
}, [
|
71
|
+
}, [
|
72
|
+
strings.removeBackgroundEffectButtonLabel,
|
73
|
+
strings.removeBackgroundTooltip,
|
74
|
+
strings.blurBackgroundEffectButtonLabel,
|
75
|
+
strings.blurBackgroundTooltip,
|
76
|
+
props.backgroundImages
|
77
|
+
]);
|
73
78
|
const onEffectChange = useCallback((effectKey) => __awaiter(void 0, void 0, void 0, function* () {
|
74
79
|
if (effectKey === 'blur') {
|
75
80
|
const blurEffect = {
|