@azure/communication-react 1.18.0-alpha-202407200014 → 1.18.0-alpha-202407262302
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 +33 -94
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-D4ctXnw1.js → ChatMessageComponentAsRichTextEditBox-CmXCpkwp.js} +9 -58
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CmXCpkwp.js.map +1 -0
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-F6eqVXer.js → RichTextSendBoxWrapper-DI4k0qyf.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-F6eqVXer.js.map → RichTextSendBoxWrapper-DI4k0qyf.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-BJO_NOTU.js → index-BSczaURy.js} +479 -831
- package/dist/dist-cjs/communication-react/index-BSczaURy.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +3 -3
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +2 -2
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +3 -3
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +7 -15
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +1 -3
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +2 -2
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.d.ts +8 -2
- package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +2 -14
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +1 -9
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +0 -16
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +3 -5
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.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.map +1 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.js +8 -14
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +2 -8
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +4 -6
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +12 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +8 -60
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +6 -8
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +4 -18
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +3 -27
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.d.ts +8 -8
- package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.js +4 -4
- package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +15 -9
- package/dist/dist-esm/react-components/src/components/MessageThread.js +1 -10
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +22 -28
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -49
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +18 -37
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +2 -20
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -2
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.js +17 -15
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js +1 -2
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +2 -5
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +3 -3
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +5 -1
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +21 -0
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +3 -15
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +14 -67
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +64 -102
- package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +62 -100
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +62 -100
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +62 -100
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +3 -9
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +62 -100
- package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +62 -100
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +65 -103
- package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +62 -100
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +62 -100
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +64 -102
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +69 -107
- package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +62 -100
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +68 -106
- package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +67 -105
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +65 -103
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +63 -101
- package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +62 -100
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +63 -101
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +64 -102
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +63 -101
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useMeetingPhoneInfo.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useMeetingPhoneInfo.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +1 -1
- 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 +31 -66
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +1 -33
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +6 -198
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/useImageUpload.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/useImageUpload.js +115 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/useImageUpload.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +7 -7
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +10 -10
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/MeetingPhoneInfoPaneContent.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/common/MeetingPhoneInfoPaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +5 -2
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -4
- package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +2 -6
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +1 -5
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +5 -10
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +1 -6
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +1 -6
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +1 -6
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +1 -6
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +5 -10
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +5 -10
- package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +5 -10
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +5 -10
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +1 -6
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +5 -10
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +1 -6
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +1 -6
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +1 -6
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +5 -10
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +1 -6
- package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +5 -10
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +1 -6
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +5 -10
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +5 -10
- package/package.json +14 -14
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-D4ctXnw1.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-BJO_NOTU.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsIncomingCallDeclarative.d.ts +0 -17
- package/dist/dist-esm/calling-stateful-client/src/TeamsIncomingCallDeclarative.js +0 -49
- package/dist/dist-esm/calling-stateful-client/src/TeamsIncomingCallDeclarative.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -48
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Converter.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/Converter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAiBlC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAWxE,yDAAyD,CAAC,6CAA6C;AACvG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,6CAA6C,CAAC,qDAAqD;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAUxD;;GAEG;AACH,MAAM,UAAU,6CAA6C,CAC3D,MAA2B;IAE3B,MAAM,0BAA0B,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEzE,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,IAAI,EAAE,SAAS;QAEf,YAAY,EAAE,kDAAkD,CAAC,0BAA0B,CAAC,aAAa,CAAC;KAC3G,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,+CAA+C,CAC7D,MAA4B;IAE5B,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,EA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AAM,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAC3C,QAAQ,CAAC,WAAW,GAAG,MAAA,MAAA,WAAW,CAAC,mBAAmB,0CAAE,WAAW,mCAAI,EAAE,CAAC;QAC1E,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC;QAE3B,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n RemoteParticipant as SdkRemoteParticipant,\n RemoteVideoStream as SdkRemoteVideoStream,\n LocalVideoStream as SdkLocalVideoStream,\n VideoStreamRendererView\n} from '@azure/communication-calling';\nimport { TeamsCaptionsInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(acs-close-captions) */\nimport { CaptionsInfo as AcsCaptionsInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { CallKind } from '@azure/communication-calling';\n/* @conditional-compile-remove(meeting-id) */\nimport { TeamsCallInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(calling-beta-sdk) */\nimport { CallInfo } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallState,\n RemoteParticipantState as DeclarativeRemoteParticipant,\n RemoteVideoStreamState as DeclarativeRemoteVideoStream,\n LocalVideoStreamState as DeclarativeLocalVideoStream,\n IncomingCallState as DeclarativeIncomingCall,\n VideoStreamRendererViewState as DeclarativeVideoStreamRendererView\n} from './CallClientState';\nimport { CaptionsInfo } from './CallClientState';\n\n/* @conditional-compile-remove(teams-identity-support) */ /* @conditional-compile-remove(meeting-id) */\nimport { _isACSCall } from './TypeGuards';\n/* @conditional-compile-remove(meeting-id) */ /* @conditional-compile-remove(acs-close-captions) */\nimport { _isTeamsCall } from './TypeGuards';\nimport { CallCommon, IncomingCallCommon } from './BetaToStableTypes';\n\nimport { Features } from '@azure/communication-calling';\n\nimport { VideoEffectName } from '@azure/communication-calling';\n\nimport { LocalVideoStreamVideoEffectsState } from './CallClientState';\nimport { RaisedHand } from '@azure/communication-calling';\nimport { RaisedHandState } from './CallClientState';\nimport { TeamsMeetingAudioConferencingDetails } from '@azure/communication-calling';\nimport { ConferencePhoneInfo } from './CallClientState';\n\n/**\n * @private\n */\nexport function convertSdkLocalStreamToDeclarativeLocalStream(\n stream: SdkLocalVideoStream\n): DeclarativeLocalVideoStream {\n const localVideoStreamEffectsAPI = stream.feature(Features.VideoEffects);\n\n return {\n source: stream.source,\n mediaStreamType: stream.mediaStreamType,\n view: undefined,\n\n videoEffects: convertFromSDKToDeclarativeVideoStreamVideoEffects(localVideoStreamEffectsAPI.activeEffects)\n };\n}\n\n/**\n * @private\n */\nexport function convertSdkRemoteStreamToDeclarativeRemoteStream(\n stream: SdkRemoteVideoStream\n): DeclarativeRemoteVideoStream {\n return {\n id: stream.id,\n mediaStreamType: stream.mediaStreamType,\n isAvailable: stream.isAvailable,\n /* @conditional-compile-remove(video-stream-is-receiving-flag) */\n isReceiving: stream.isReceiving,\n view: undefined,\n streamSize: stream.size\n };\n}\n\n/**\n * @private\n */\nexport function convertSdkParticipantToDeclarativeParticipant(\n participant: SdkRemoteParticipant\n): DeclarativeRemoteParticipant {\n const declarativeVideoStreams: { [key: number]: DeclarativeRemoteVideoStream } = {};\n for (const videoStream of participant.videoStreams) {\n declarativeVideoStreams[videoStream.id] = convertSdkRemoteStreamToDeclarativeRemoteStream(videoStream);\n }\n return {\n identifier: participant.identifier,\n displayName: participant.displayName,\n state: participant.state,\n callEndReason: participant.callEndReason,\n videoStreams: declarativeVideoStreams,\n isMuted: participant.isMuted,\n isSpeaking: participant.isSpeaking,\n raisedHand: undefined,\n /* @conditional-compile-remove(hide-attendee-name) */\n role: participant.role,\n spotlight: undefined\n };\n}\n\n/**\n * @private\n *\n * Note at the time of writing only one LocalVideoStream is supported by the SDK.\n */\nexport function convertSdkCallToDeclarativeCall(call: CallCommon): CallState {\n const declarativeRemoteParticipants: { [key: string]: DeclarativeRemoteParticipant } = {};\n call.remoteParticipants.forEach((participant: SdkRemoteParticipant) => {\n declarativeRemoteParticipants[toFlatCommunicationIdentifier(participant.identifier)] =\n convertSdkParticipantToDeclarativeParticipant(participant);\n });\n /* @conditional-compile-remove(hide-attendee-name) */\n let hideAttendeeNames = false;\n /* @conditional-compile-remove(hide-attendee-name) */\n if (\n call.feature(Features.Capabilities).capabilities &&\n call.feature(Features.Capabilities).capabilities.viewAttendeeNames\n ) {\n const viewAttendeeNames = call.feature(Features.Capabilities).capabilities.viewAttendeeNames;\n if (!viewAttendeeNames.isPresent && viewAttendeeNames.reason === 'MeetingRestricted') {\n hideAttendeeNames = true;\n }\n }\n\n let callInfo: TeamsCallInfo | undefined | /* @conditional-compile-remove(calling-beta-sdk) */ CallInfo;\n if ('info' in call) {\n callInfo = call.info as TeamsCallInfo | undefined | /* @conditional-compile-remove(calling-beta-sdk) */ CallInfo;\n }\n\n return {\n id: call.id,\n /* @conditional-compile-remove(teams-identity-support) */\n kind: _isACSCall(call) ? ('Call' as CallKind) : ('TeamsCall' as CallKind),\n callerInfo: call.callerInfo,\n state: call.state,\n callEndReason: call.callEndReason,\n diagnostics: {\n network: {\n latest: {}\n },\n media: {\n latest: {}\n }\n },\n direction: call.direction,\n isMuted: call.isMuted,\n isScreenSharingOn: call.isScreenSharingOn,\n localVideoStreams: call.localVideoStreams.map(convertSdkLocalStreamToDeclarativeLocalStream),\n remoteParticipants: declarativeRemoteParticipants,\n remoteParticipantsEnded: {},\n recording: { isRecordingActive: false },\n /* @conditional-compile-remove(local-recording-notification) */\n localRecording: { isLocalRecordingActive: false },\n pptLive: { isActive: false },\n raiseHand: { raisedHands: [] },\n localParticipantReaction: undefined,\n transcription: { isTranscriptionActive: false },\n screenShareRemoteParticipant: undefined,\n startTime: new Date(),\n endTime: undefined,\n role: call.role,\n captionsFeature: {\n captions: [],\n supportedSpokenLanguages: [],\n supportedCaptionLanguages: [],\n currentCaptionLanguage: '',\n currentSpokenLanguage: '',\n isCaptionsFeatureActive: false,\n startCaptionsInProgress: false,\n /* @conditional-compile-remove(acs-close-captions) */\n captionsKind: _isTeamsCall(call) ? 'TeamsCaptions' : 'Captions'\n },\n transfer: {\n acceptedTransfers: {}\n },\n optimalVideoCount: {\n maxRemoteVideoStreams: call.feature(Features.OptimalVideoCount).optimalVideoCount\n },\n /* @conditional-compile-remove(hide-attendee-name) */\n hideAttendeeNames,\n /* @conditional-compile-remove(meeting-id) */\n info: callInfo,\n /* @conditional-compile-remove(teams-meeting-conference) */\n meetingConference: { conferencePhones: [] }\n };\n}\n\n/**\n * @private\n */\nexport function convertSdkIncomingCallToDeclarativeIncomingCall(call: IncomingCallCommon): DeclarativeIncomingCall {\n return {\n id: call.id,\n callerInfo: call.callerInfo,\n startTime: new Date(),\n endTime: undefined\n };\n}\n\n/**\n * @private\n */\nexport function convertFromSDKToDeclarativeVideoStreamRendererView(\n view: VideoStreamRendererView\n): DeclarativeVideoStreamRendererView {\n return {\n scalingMode: view.scalingMode,\n isMirrored: view.isMirrored,\n target: view.target\n };\n}\n\n/**\n * @private\n */\nexport function convertFromTeamsSDKToCaptionInfoState(caption: TeamsCaptionsInfo): CaptionsInfo {\n return {\n ...caption\n };\n}\n\n/* @conditional-compile-remove(acs-close-captions) */\n/**\n * @private\n */\nexport function convertFromSDKToCaptionInfoState(caption: AcsCaptionsInfo): CaptionsInfo {\n return {\n captionText: caption.spokenText,\n ...caption\n };\n}\n\n/** @private */\nexport function convertFromSDKToDeclarativeVideoStreamVideoEffects(\n videoEffects: VideoEffectName[]\n): LocalVideoStreamVideoEffectsState {\n return {\n activeEffects: videoEffects\n };\n}\n\n/**\n * @private\n */\nexport function convertFromSDKToRaisedHandState(raisedHand: RaisedHand): RaisedHandState {\n return {\n raisedHandOrderPosition: raisedHand.order\n };\n}\n\n/** @private */\nexport function convertConferencePhoneInfo(\n meetingConferencePhoneInfo?: TeamsMeetingAudioConferencingDetails\n): ConferencePhoneInfo[] {\n if (!meetingConferencePhoneInfo) {\n return [];\n }\n\n return meetingConferencePhoneInfo.phoneNumbers.flatMap((phoneNumber) => {\n const common = {\n conferenceId: meetingConferencePhoneInfo.phoneConferenceId,\n country: phoneNumber.countryName,\n city: phoneNumber.cityName,\n phoneNumber: '',\n isTollFree: false\n };\n const toll = Object.assign({}, common);\n toll.phoneNumber = phoneNumber.tollPhoneNumber?.phoneNumber ?? '';\n toll.isTollFree = false;\n\n const tollFree = Object.assign({}, common);\n tollFree.phoneNumber = phoneNumber.tollFreePhoneNumber?.phoneNumber ?? '';\n tollFree.isTollFree = true;\n\n return [toll, tollFree].filter((phoneInfo) => phoneInfo.phoneNumber);\n });\n}\n"]}
|
1
|
+
{"version":3,"file":"Converter.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/Converter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAiBlC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAWxE,yDAAyD,CAAC,6CAA6C;AACvG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,6CAA6C,CAAC,qDAAqD;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAUxD;;GAEG;AACH,MAAM,UAAU,6CAA6C,CAC3D,MAA2B;IAE3B,MAAM,0BAA0B,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEzE,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,IAAI,EAAE,SAAS;QAEf,YAAY,EAAE,kDAAkD,CAAC,0BAA0B,CAAC,aAAa,CAAC;KAC3G,CAAC;AACJ,CAAC;AAED;;GAEG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I,CAAC,UAAU,GAAG,KAAK,CAAC;QAExB,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAC3C,QAAQ,CAAC,WAAW,GAAG,MAAA,MAAA,WAAW,CAAC,mBAAmB,0CAAE,WAAW,mCAAI,EAAE,CAAC;QAC1E,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC;QAE3B,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n RemoteParticipant as SdkRemoteParticipant,\n RemoteVideoStream as SdkRemoteVideoStream,\n LocalVideoStream as SdkLocalVideoStream,\n VideoStreamRendererView\n} from '@azure/communication-calling';\nimport { TeamsCaptionsInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(acs-close-captions) */\nimport { CaptionsInfo as AcsCaptionsInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { CallKind } from '@azure/communication-calling';\n/* @conditional-compile-remove(meeting-id) */\nimport { TeamsCallInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(calling-beta-sdk) */\nimport { CallInfo } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallState,\n RemoteParticipantState as DeclarativeRemoteParticipant,\n RemoteVideoStreamState as DeclarativeRemoteVideoStream,\n LocalVideoStreamState as DeclarativeLocalVideoStream,\n IncomingCallState as DeclarativeIncomingCall,\n VideoStreamRendererViewState as DeclarativeVideoStreamRendererView\n} from './CallClientState';\nimport { CaptionsInfo } from './CallClientState';\n\n/* @conditional-compile-remove(teams-identity-support) */ /* @conditional-compile-remove(meeting-id) */\nimport { _isACSCall } from './TypeGuards';\n/* @conditional-compile-remove(meeting-id) */ /* @conditional-compile-remove(acs-close-captions) */\nimport { _isTeamsCall } from './TypeGuards';\nimport { CallCommon, IncomingCallCommon } from './BetaToStableTypes';\n\nimport { Features } from '@azure/communication-calling';\n\nimport { VideoEffectName } from '@azure/communication-calling';\n\nimport { LocalVideoStreamVideoEffectsState } from './CallClientState';\nimport { RaisedHand } from '@azure/communication-calling';\nimport { RaisedHandState } from './CallClientState';\nimport { TeamsMeetingAudioConferencingDetails } from '@azure/communication-calling';\nimport { ConferencePhoneInfo } from './CallClientState';\n\n/**\n * @private\n */\nexport function convertSdkLocalStreamToDeclarativeLocalStream(\n stream: SdkLocalVideoStream\n): DeclarativeLocalVideoStream {\n const localVideoStreamEffectsAPI = stream.feature(Features.VideoEffects);\n\n return {\n source: stream.source,\n mediaStreamType: stream.mediaStreamType,\n view: undefined,\n\n videoEffects: convertFromSDKToDeclarativeVideoStreamVideoEffects(localVideoStreamEffectsAPI.activeEffects)\n };\n}\n\n/**\n * @private\n */\nexport function convertSdkRemoteStreamToDeclarativeRemoteStream(\n stream: SdkRemoteVideoStream\n): DeclarativeRemoteVideoStream {\n return {\n id: stream.id,\n mediaStreamType: stream.mediaStreamType,\n isAvailable: stream.isAvailable,\n /* @conditional-compile-remove(video-stream-is-receiving-flag) */\n isReceiving: stream.isReceiving,\n view: undefined,\n streamSize: stream.size\n };\n}\n\n/**\n * @private\n */\nexport function convertSdkParticipantToDeclarativeParticipant(\n participant: SdkRemoteParticipant\n): DeclarativeRemoteParticipant {\n const declarativeVideoStreams: { [key: number]: DeclarativeRemoteVideoStream } = {};\n for (const videoStream of participant.videoStreams) {\n declarativeVideoStreams[videoStream.id] = convertSdkRemoteStreamToDeclarativeRemoteStream(videoStream);\n }\n return {\n identifier: participant.identifier,\n displayName: participant.displayName,\n state: participant.state,\n callEndReason: participant.callEndReason,\n videoStreams: declarativeVideoStreams,\n isMuted: participant.isMuted,\n isSpeaking: participant.isSpeaking,\n raisedHand: undefined,\n /* @conditional-compile-remove(hide-attendee-name) */\n role: participant.role,\n spotlight: undefined\n };\n}\n\n/**\n * @private\n *\n * Note at the time of writing only one LocalVideoStream is supported by the SDK.\n */\nexport function convertSdkCallToDeclarativeCall(call: CallCommon): CallState {\n const declarativeRemoteParticipants: { [key: string]: DeclarativeRemoteParticipant } = {};\n call.remoteParticipants.forEach((participant: SdkRemoteParticipant) => {\n declarativeRemoteParticipants[toFlatCommunicationIdentifier(participant.identifier)] =\n convertSdkParticipantToDeclarativeParticipant(participant);\n });\n /* @conditional-compile-remove(hide-attendee-name) */\n let hideAttendeeNames = false;\n /* @conditional-compile-remove(hide-attendee-name) */\n if (\n call.feature(Features.Capabilities).capabilities &&\n call.feature(Features.Capabilities).capabilities.viewAttendeeNames\n ) {\n const viewAttendeeNames = call.feature(Features.Capabilities).capabilities.viewAttendeeNames;\n if (!viewAttendeeNames.isPresent && viewAttendeeNames.reason === 'MeetingRestricted') {\n hideAttendeeNames = true;\n }\n }\n\n let callInfo: TeamsCallInfo | undefined | /* @conditional-compile-remove(calling-beta-sdk) */ CallInfo;\n if ('info' in call) {\n callInfo = call.info as TeamsCallInfo | undefined | /* @conditional-compile-remove(calling-beta-sdk) */ CallInfo;\n }\n\n return {\n id: call.id,\n /* @conditional-compile-remove(teams-identity-support) */\n kind: _isACSCall(call) ? ('Call' as CallKind) : ('TeamsCall' as CallKind),\n callerInfo: call.callerInfo,\n state: call.state,\n callEndReason: call.callEndReason,\n diagnostics: {\n network: {\n latest: {}\n },\n media: {\n latest: {}\n }\n },\n direction: call.direction,\n isMuted: call.isMuted,\n isScreenSharingOn: call.isScreenSharingOn,\n localVideoStreams: call.localVideoStreams.map(convertSdkLocalStreamToDeclarativeLocalStream),\n remoteParticipants: declarativeRemoteParticipants,\n remoteParticipantsEnded: {},\n recording: { isRecordingActive: false },\n /* @conditional-compile-remove(local-recording-notification) */\n localRecording: { isLocalRecordingActive: false },\n pptLive: { isActive: false },\n raiseHand: { raisedHands: [] },\n localParticipantReaction: undefined,\n transcription: { isTranscriptionActive: false },\n screenShareRemoteParticipant: undefined,\n startTime: new Date(),\n endTime: undefined,\n role: call.role,\n captionsFeature: {\n captions: [],\n supportedSpokenLanguages: [],\n supportedCaptionLanguages: [],\n currentCaptionLanguage: '',\n currentSpokenLanguage: '',\n isCaptionsFeatureActive: false,\n startCaptionsInProgress: false,\n /* @conditional-compile-remove(acs-close-captions) */\n captionsKind: _isTeamsCall(call) ? 'TeamsCaptions' : 'Captions'\n },\n transfer: {\n acceptedTransfers: {}\n },\n optimalVideoCount: {\n maxRemoteVideoStreams: call.feature(Features.OptimalVideoCount).optimalVideoCount\n },\n /* @conditional-compile-remove(hide-attendee-name) */\n hideAttendeeNames,\n /* @conditional-compile-remove(meeting-id) */\n info: callInfo,\n /* @conditional-compile-remove(teams-meeting-conference) */\n teamsMeetingConference: []\n };\n}\n\n/**\n * @private\n */\nexport function convertSdkIncomingCallToDeclarativeIncomingCall(call: IncomingCallCommon): DeclarativeIncomingCall {\n return {\n id: call.id,\n callerInfo: call.callerInfo,\n startTime: new Date(),\n endTime: undefined\n };\n}\n\n/**\n * @private\n */\nexport function convertFromSDKToDeclarativeVideoStreamRendererView(\n view: VideoStreamRendererView\n): DeclarativeVideoStreamRendererView {\n return {\n scalingMode: view.scalingMode,\n isMirrored: view.isMirrored,\n target: view.target\n };\n}\n\n/**\n * @private\n */\nexport function convertFromTeamsSDKToCaptionInfoState(caption: TeamsCaptionsInfo): CaptionsInfo {\n return {\n ...caption\n };\n}\n\n/* @conditional-compile-remove(acs-close-captions) */\n/**\n * @private\n */\nexport function convertFromSDKToCaptionInfoState(caption: AcsCaptionsInfo): CaptionsInfo {\n return {\n captionText: caption.spokenText,\n ...caption\n };\n}\n\n/** @private */\nexport function convertFromSDKToDeclarativeVideoStreamVideoEffects(\n videoEffects: VideoEffectName[]\n): LocalVideoStreamVideoEffectsState {\n return {\n activeEffects: videoEffects\n };\n}\n\n/**\n * @private\n */\nexport function convertFromSDKToRaisedHandState(raisedHand: RaisedHand): RaisedHandState {\n return {\n raisedHandOrderPosition: raisedHand.order\n };\n}\n\n/** @private */\nexport function convertConferencePhoneInfo(\n meetingConferencePhoneInfo?: TeamsMeetingAudioConferencingDetails\n): ConferencePhoneInfo[] {\n if (!meetingConferencePhoneInfo) {\n return [];\n }\n\n return meetingConferencePhoneInfo.phoneNumbers.flatMap((phoneNumber) => {\n const common = {\n conferenceId: meetingConferencePhoneInfo.phoneConferenceId,\n country: phoneNumber.countryName,\n city: phoneNumber.cityName,\n phoneNumber: '',\n isTollFree: false\n };\n const toll = Object.assign({}, common);\n toll.phoneNumber = phoneNumber.tollPhoneNumber?.phoneNumber ?? '';\n toll.isTollFree = false;\n\n const tollFree = Object.assign({}, common);\n tollFree.phoneNumber = phoneNumber.tollFreePhoneNumber?.phoneNumber ?? '';\n tollFree.isTollFree = true;\n\n return [toll, tollFree].filter((phoneInfo) => phoneInfo.phoneNumber);\n });\n}\n"]}
|
@@ -1,9 +1,15 @@
|
|
1
1
|
import { IncomingCall } from '@azure/communication-calling';
|
2
|
+
import { IncomingCallCommon } from './BetaToStableTypes';
|
2
3
|
import { CallContext } from './CallContext';
|
4
|
+
/**
|
5
|
+
* @beta
|
6
|
+
* Proxies the {@link @azure/communication-calling#IncomingCall} interface.
|
7
|
+
*/
|
8
|
+
export type DeclarativeIncomingCall = IncomingCall;
|
3
9
|
/**
|
4
10
|
* @private
|
5
11
|
*/
|
6
|
-
export declare class ProxyIncomingCall implements ProxyHandler<
|
12
|
+
export declare class ProxyIncomingCall implements ProxyHandler<DeclarativeIncomingCall> {
|
7
13
|
private _context;
|
8
14
|
constructor(context: CallContext);
|
9
15
|
get<P extends keyof IncomingCall>(target: IncomingCall, prop: P): any;
|
@@ -13,5 +19,5 @@ export declare class ProxyIncomingCall implements ProxyHandler<IncomingCall> {
|
|
13
19
|
* @param incomingCall - IncomingCall from SDK
|
14
20
|
* @returns proxied IncomingCall
|
15
21
|
*/
|
16
|
-
export declare const incomingCallDeclaratify: (incomingCall:
|
22
|
+
export declare const incomingCallDeclaratify: (incomingCall: IncomingCallCommon, context: CallContext) => DeclarativeIncomingCall;
|
17
23
|
//# sourceMappingURL=IncomingCallDeclarative.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IncomingCallDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/IncomingCallDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;
|
1
|
+
{"version":3,"file":"IncomingCallDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/IncomingCallDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAYlC;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAG5B,YAAY,OAAoB;QAC9B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAEM,GAAG,CAA+B,MAAoB,EAAE,IAAO;QACpE,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACd,OAAO,IAAI,CAAC,QAAQ,CAAC,yBAAyB,CAAC,UAAgB,GAAG,IAAwC;;wBACxG,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;oBACtC,CAAC;iBAAA,EAAE,qBAAqB,CAAC,CAAC;YAC5B,CAAC;YACD,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACd,OAAO,IAAI,CAAC,QAAQ,CAAC,yBAAyB,CAAC,UAAgB,GAAG,IAAwC;;wBACxG,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;oBACtC,CAAC;iBAAA,EAAE,qBAAqB,CAAC,CAAC;YAC5B,CAAC;YACD;gBACE,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,YAAgC,EAChC,OAAoB,EACK,EAAE;IAC3B,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACzD,OAAO,IAAI,KAAK,CAAC,YAAY,EAAE,iBAAiB,CAA4B,CAAC;AAC/E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IncomingCall } from '@azure/communication-calling';\nimport { IncomingCallCommon } from './BetaToStableTypes';\nimport { CallContext } from './CallContext';\n\n/**\n * @beta\n * Proxies the {@link @azure/communication-calling#IncomingCall} interface.\n */\nexport type DeclarativeIncomingCall = IncomingCall;\n\n/**\n * @private\n */\nexport class ProxyIncomingCall implements ProxyHandler<DeclarativeIncomingCall> {\n private _context: CallContext;\n\n constructor(context: CallContext) {\n this._context = context;\n }\n\n public get<P extends keyof IncomingCall>(target: IncomingCall, prop: P): any {\n switch (prop) {\n case 'accept': {\n return this._context.withAsyncErrorTeedToState(async function (...args: Parameters<IncomingCall['accept']>) {\n return await target.accept(...args);\n }, 'IncomingCall.accept');\n }\n case 'reject': {\n return this._context.withAsyncErrorTeedToState(async function (...args: Parameters<IncomingCall['reject']>) {\n return await target.reject(...args);\n }, 'IncomingCall.reject');\n }\n default:\n return Reflect.get(target, prop);\n }\n }\n}\n\n/**\n * Creates a declarative Incoming Call by proxying IncomingCall using ProxyIncomingCall.\n * @param incomingCall - IncomingCall from SDK\n * @returns proxied IncomingCall\n */\nexport const incomingCallDeclaratify = (\n incomingCall: IncomingCallCommon,\n context: CallContext\n): DeclarativeIncomingCall => {\n const proxyIncomingCall = new ProxyIncomingCall(context);\n return new Proxy(incomingCall, proxyIncomingCall) as DeclarativeIncomingCall;\n};\n"]}
|
@@ -1,24 +1,12 @@
|
|
1
1
|
import { TeamsCallAgent } from '@azure/communication-calling';
|
2
|
-
import {
|
2
|
+
import { IncomingCallManagement } from './CallAgentDeclarative';
|
3
3
|
import { CallContext } from './CallContext';
|
4
4
|
import { InternalCallContext } from './InternalCallContext';
|
5
|
-
/**
|
6
|
-
* @beta
|
7
|
-
* Proxies the {@link @azure/communication-calling#TeamsIncomingCall} interface.
|
8
|
-
*/
|
9
|
-
export type TeamsIncomingCallManagement = {
|
10
|
-
/**
|
11
|
-
* @beta
|
12
|
-
* @Remark This attribute doesn't exist on the {@link @azure/communication-calling#TeamsCallAgent} interface.
|
13
|
-
* @returns readonly array of {@link DeclarativeTeamsIncomingCall}
|
14
|
-
*/
|
15
|
-
incomingCalls: ReadonlyArray<TeamsIncomingCall>;
|
16
|
-
};
|
17
5
|
/**
|
18
6
|
* @public
|
19
7
|
* `DeclarativeTeamsCallAgent` extends and proxies the {@link @azure/communication-calling#TeamsCallAgent}
|
20
8
|
*/
|
21
|
-
export type DeclarativeTeamsCallAgent = TeamsCallAgent &
|
9
|
+
export type DeclarativeTeamsCallAgent = TeamsCallAgent & IncomingCallManagement;
|
22
10
|
/**
|
23
11
|
* Creates a declarative CallAgent by proxying TeamsCallAgent with ProxyTeamsCallAgent which will track state updates by updating
|
24
12
|
* the given context.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TeamsCallAgentDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TeamsCallAgentDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,qBAAqB,EAAyB,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAElH,yDAAyD;AACzD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE/D,yDAAyD;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;
|
1
|
+
{"version":3,"file":"TeamsCallAgentDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TeamsCallAgentDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,qBAAqB,EAAyB,oBAAo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,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,SAAyB,EACzB,OAAoB,EACpB,eAAoC,EACT,EAAE;IAC7B,qBAAqB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAChD,OAAO,IAAI,KAAK,CACd,SAAS,EACT,IAAI,mBAAmB,CAAC,SAAS,EAAE,OAAO,EAAE,eAAe,CAAC,CAChC,CAAC;AACjC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TeamsCallAgent } from '@azure/communication-calling';\nimport { CallCommon, CallAgentCommon } from './BetaToStableTypes';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { IncomingCallManagement } from './CallAgentDeclarative';\nimport { clearCallRelatedState, DeclarativeCallCommon, ProxyCallAgentCommon } from './CallAgentDeclarativeCommon';\nimport { CallContext } from './CallContext';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { _isTeamsCall, _isTeamsCallAgent } from './TypeGuards';\nimport { InternalCallContext } from './InternalCallContext';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { teamsCallDeclaratify } from './TeamsCallDeclarative';\n\n/**\n * @public\n * `DeclarativeTeamsCallAgent` extends and proxies the {@link @azure/communication-calling#TeamsCallAgent}\n */\nexport type DeclarativeTeamsCallAgent = TeamsCallAgent &\n /* @conditional-compile-remove(one-to-n-calling) */ IncomingCallManagement;\n\n/**\n * ProxyTeamsCallAgent proxies TeamsCallAgent and saves any returned state in the given context. It will subscribe to all state\n * updates in the TeamsCallAgent and in the contained TeamsCalls and RemoteParticipants. When dispose is called it will\n * unsubscribe from all state updates.\n */\nclass ProxyTeamsCallAgent extends ProxyCallAgentCommon implements ProxyHandler<DeclarativeTeamsCallAgent> {\n /* @conditional-compile-remove(teams-identity-support) */\n private _callAgent: TeamsCallAgent;\n\n constructor(callAgent: TeamsCallAgent, context: CallContext, internalContext: InternalCallContext) {\n super(context, internalContext);\n /* @conditional-compile-remove(teams-identity-support) */\n this._callAgent = callAgent;\n this.subscribe();\n }\n\n private subscribe = (): void => {\n /* @conditional-compile-remove(teams-identity-support) */\n this._callAgent.on('callsUpdated', this.callsUpdated);\n /* @conditional-compile-remove(teams-identity-support) */\n this._callAgent.on('incomingCall', this.incomingCall);\n\n /* @conditional-compile-remove(teams-identity-support) */\n // There could be scenario that when ProxyTeamsCallAgent is created that the given CallAgent already has TeamsCalls. In this\n // case we need to make sure to subscribe to those already existing Calls.\n for (const call of this._callAgent.calls) {\n this.addCall(call);\n }\n };\n\n protected unsubscribe = (): void => {\n /* @conditional-compile-remove(teams-identity-support) */\n this._callAgent.off('callsUpdated', this.callsUpdated);\n /* @conditional-compile-remove(teams-identity-support) */\n this._callAgent.off('incomingCall', this.incomingCall);\n\n this.unregisterSubscriber();\n };\n\n protected callDeclaratify(call: CallCommon, context: CallContext): DeclarativeCallCommon {\n /* @conditional-compile-remove(teams-identity-support) */\n if (_isTeamsCall(call)) {\n return teamsCallDeclaratify(call, context);\n }\n throw new Error('Not reachable code, DeclarativeTeamsCallAgent.callDeclaratify must be called with an TeamsCall.');\n }\n\n protected startCall(agent: TeamsCallAgent, args: Parameters<TeamsCallAgent['startCall']>): CallCommon {\n /* @conditional-compile-remove(teams-identity-support) */\n if (_isTeamsCallAgent(agent)) {\n return agent.startCall(...args);\n }\n throw new Error('Not reachable code, DeclarativeTeamsCallAgent.startCall must be called with an TeamsCallAgent.');\n }\n\n protected joinCall(agent: CallAgentCommon, args: Parameters<TeamsCallAgent['join']>): CallCommon {\n /* @conditional-compile-remove(teams-identity-support) */\n if (_isTeamsCallAgent(agent)) {\n return agent.join(...args);\n }\n throw new Error('Not reachable code, DeclarativeTeamsCallAgent.joinCall must be called with an TeamsCallAgent.');\n }\n\n protected agentSubscribe(agent: CallAgentCommon, args: Parameters<TeamsCallAgent['on']>): void {\n /* @conditional-compile-remove(teams-identity-support) */\n if (_isTeamsCallAgent(agent)) {\n agent.on(...args);\n return;\n }\n throw new Error(\n 'Not reachable code, DeclarativeTeamsCallAgent.agentSubscribe must be called with an TeamsCallAgent.'\n );\n }\n\n protected agentUnsubscribe(agent: CallAgentCommon, args: Parameters<TeamsCallAgent['off']>): void {\n /* @conditional-compile-remove(teams-identity-support) */\n if (_isTeamsCallAgent(agent)) {\n agent.off(...args);\n return;\n }\n throw new Error(\n 'Not reachable code, DeclarativeTeamsCallAgent.agentUnsubscribe must be called with an TeamsCallAgent.'\n );\n }\n\n public get<P extends keyof CallAgentCommon>(target: TeamsCallAgent, prop: P): any {\n /* @conditional-compile-remove(teams-identity-support) */\n return super.getCommon(target, prop);\n }\n}\n\n/**\n * Creates a declarative CallAgent by proxying TeamsCallAgent with ProxyTeamsCallAgent which will track state updates by updating\n * the given context.\n *\n * @param callAgent - TeamsCallAgent from SDK\n * @param context - CallContext from StatefulCallClient\n * @param internalContext- InternalCallContext from StatefulCallClient\n */\nexport const teamsCallAgentDeclaratify = (\n callAgent: TeamsCallAgent,\n context: CallContext,\n internalContext: InternalCallContext\n): DeclarativeTeamsCallAgent => {\n clearCallRelatedState(context, internalContext);\n return new Proxy(\n callAgent,\n new ProxyTeamsCallAgent(callAgent, context, internalContext)\n ) as DeclarativeTeamsCallAgent;\n};\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Call, CallAgent, TeamsCallAgent } from '@azure/communication-calling';
|
2
|
-
import { CallAgentCommon, CallCommon
|
2
|
+
import { CallAgentCommon, CallCommon } from './BetaToStableTypes';
|
3
3
|
/**
|
4
4
|
* @internal
|
5
5
|
*/
|
@@ -16,12 +16,4 @@ export declare const _isTeamsCall: (call: CallCommon) => call is import("@azure/
|
|
16
16
|
* @internal
|
17
17
|
*/
|
18
18
|
export declare const _isTeamsCallAgent: (callAgent: CallAgentCommon) => callAgent is TeamsCallAgent;
|
19
|
-
/**
|
20
|
-
* @internal
|
21
|
-
*/
|
22
|
-
export declare const _isTeamsIncomingCall: (call: IncomingCallCommon) => boolean;
|
23
|
-
/**
|
24
|
-
* @internal
|
25
|
-
*/
|
26
|
-
export declare const _isACSIncomingCall: (call: IncomingCallCommon) => boolean;
|
27
19
|
//# sourceMappingURL=TypeGuards.d.ts.map
|
@@ -32,20 +32,4 @@ export const _isTeamsCallAgent = (callAgent) => {
|
|
32
32
|
return callAgent.kind === 'TeamsCallAgent';
|
33
33
|
return false;
|
34
34
|
};
|
35
|
-
/**
|
36
|
-
* @internal
|
37
|
-
*/
|
38
|
-
export const _isTeamsIncomingCall = (call) => {
|
39
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
40
|
-
return call.kind === 'TeamsIncomingCall';
|
41
|
-
return false;
|
42
|
-
};
|
43
|
-
/**
|
44
|
-
* @internal
|
45
|
-
*/
|
46
|
-
export const _isACSIncomingCall = (call) => {
|
47
|
-
/* @conditional-compile-remove(one-to-n-calling) */
|
48
|
-
return call.kind === 'IncomingCall';
|
49
|
-
return false;
|
50
|
-
};
|
51
35
|
//# sourceMappingURL=TypeGuards.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TypeGuards.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TypeGuards.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAgB,EAAgB,EAAE;IAC3D,yDAAyD;IACzD,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC;IAC1C,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAA0B,EAA0B,EAAE;IACpF,yDAAyD;IACzD,OAAO,CAAC,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,KAAK,WAAW,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAgB,EAAqB,EAAE;IAClE,yDAAyD;IACzD,OAAO,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC;IACjC,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAA0B,EAA+B,EAAE;IAC3F,yDAAyD;IACzD,OAAO,SAAS,CAAC,IAAI,KAAK,gBAAgB,CAAC;IAC3C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC
|
1
|
+
{"version":3,"file":"TypeGuards.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TypeGuards.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAgB,EAAgB,EAAE;IAC3D,yDAAyD;IACzD,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC;IAC1C,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAA0B,EAA0B,EAAE;IACpF,yDAAyD;IACzD,OAAO,CAAC,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,KAAK,WAAW,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAgB,EAAqB,EAAE;IAClE,yDAAyD;IACzD,OAAO,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC;IACjC,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAA0B,EAA+B,EAAE;IAC3F,yDAAyD;IACzD,OAAO,SAAS,CAAC,IAAI,KAAK,gBAAgB,CAAC;IAC3C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Call, CallAgent, TeamsCallAgent } from '@azure/communication-calling';\nimport { CallAgentCommon, CallCommon, TeamsCall } from './BetaToStableTypes';\n\n/**\n * @internal\n */\nexport const _isACSCall = (call: CallCommon): call is Call => {\n /* @conditional-compile-remove(teams-identity-support) */\n return !call.kind || call.kind === 'Call';\n return true;\n};\n\n/**\n * @internal\n */\nexport const _isACSCallAgent = (callAgent: CallAgentCommon): callAgent is CallAgent => {\n /* @conditional-compile-remove(teams-identity-support) */\n return !callAgent.kind || callAgent.kind === 'CallAgent';\n return true;\n};\n\n/**\n * @internal\n */\nexport const _isTeamsCall = (call: CallCommon): call is TeamsCall => {\n /* @conditional-compile-remove(teams-identity-support) */\n return call.kind === 'TeamsCall';\n return false;\n};\n\n/**\n * @internal\n */\nexport const _isTeamsCallAgent = (callAgent: CallAgentCommon): callAgent is TeamsCallAgent => {\n /* @conditional-compile-remove(teams-identity-support) */\n return callAgent.kind === 'TeamsCallAgent';\n return false;\n};\n"]}
|
@@ -6,8 +6,8 @@ export type { CreateViewResult } from './StreamUtils';
|
|
6
6
|
export type { RaiseHandCallFeatureState as RaiseHandCallFeature } from './CallClientState';
|
7
7
|
export type { RaisedHandState } from './CallClientState';
|
8
8
|
export type { DeclarativeCallAgent, IncomingCallManagement } from './CallAgentDeclarative';
|
9
|
+
export type { DeclarativeIncomingCall } from './IncomingCallDeclarative';
|
9
10
|
export type { DeclarativeTeamsCallAgent } from './TeamsCallAgentDeclarative';
|
10
|
-
export type { TeamsIncomingCallManagement } from './TeamsCallAgentDeclarative';
|
11
11
|
export type { LocalVideoStreamVideoEffectsState } from './CallClientState';
|
12
12
|
export type { CapabilitiesFeatureState } from './CallClientState';
|
13
13
|
export type { CaptionsCallFeatureState, CaptionsInfo } from './CallClientState';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-public.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index-public.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { createStatefulCallClient } from './StatefulCallClient';\nexport type { StatefulCallClient, StatefulCallClientArgs, StatefulCallClientOptions } from './StatefulCallClient';\nexport type { StatefulDeviceManager } from './DeviceManagerDeclarative';\nexport type {\n CallAgentState,\n CallClientState,\n CallError,\n CallErrors,\n CallErrorTarget,\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n IncomingCallState,\n LocalVideoStreamState,\n MediaDiagnosticsState,\n NetworkDiagnosticsState,\n RecordingCallFeatureState as RecordingCallFeature,\n RemoteParticipantState,\n RemoteVideoStreamState,\n TranscriptionCallFeatureState as TranscriptionCallFeature,\n VideoStreamRendererViewState\n} from './CallClientState';\nexport type { CreateViewResult } from './StreamUtils';\nexport type { RaiseHandCallFeatureState as RaiseHandCallFeature } from './CallClientState';\nexport type { RaisedHandState } from './CallClientState';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent, IncomingCallManagement } from './CallAgentDeclarative';\n/* @conditional-compile-remove(
|
1
|
+
{"version":3,"file":"index-public.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index-public.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { createStatefulCallClient } from './StatefulCallClient';\nexport type { StatefulCallClient, StatefulCallClientArgs, StatefulCallClientOptions } from './StatefulCallClient';\nexport type { StatefulDeviceManager } from './DeviceManagerDeclarative';\nexport type {\n CallAgentState,\n CallClientState,\n CallError,\n CallErrors,\n CallErrorTarget,\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n IncomingCallState,\n LocalVideoStreamState,\n MediaDiagnosticsState,\n NetworkDiagnosticsState,\n RecordingCallFeatureState as RecordingCallFeature,\n RemoteParticipantState,\n RemoteVideoStreamState,\n TranscriptionCallFeatureState as TranscriptionCallFeature,\n VideoStreamRendererViewState\n} from './CallClientState';\nexport type { CreateViewResult } from './StreamUtils';\nexport type { RaiseHandCallFeatureState as RaiseHandCallFeature } from './CallClientState';\nexport type { RaisedHandState } from './CallClientState';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent, IncomingCallManagement } from './CallAgentDeclarative';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeIncomingCall } from './IncomingCallDeclarative';\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { DeclarativeTeamsCallAgent } from './TeamsCallAgentDeclarative';\n\nexport type { LocalVideoStreamVideoEffectsState } from './CallClientState';\n\nexport type { CapabilitiesFeatureState } from './CallClientState';\nexport type { CaptionsCallFeatureState, CaptionsInfo } from './CallClientState';\nexport type { AcceptedTransfer, TransferFeatureState as TransferFeature } from './CallClientState';\nexport type { OptimalVideoCountFeatureState } from './CallClientState';\nexport type { PPTLiveCallFeatureState } from './CallClientState';\nexport type { ReactionState } from './CallClientState';\nexport type { SpotlightCallFeatureState, SpotlightState } from './CallClientState';\n/* @conditional-compile-remove(local-recording-notification) */\nexport type { LocalRecordingCallFeatureState } from './CallClientState';\n/* @conditional-compile-remove(teams-meeting-conference) */\nexport type { ConferencePhoneInfo } from './CallClientState';\n"]}
|
@@ -95,12 +95,10 @@ export type ChatThreadProperties = {
|
|
95
95
|
*
|
96
96
|
* @beta
|
97
97
|
*/
|
98
|
-
export
|
99
|
-
/**
|
100
|
-
* Boolean to track whether or not messages are restricted to only text.
|
101
|
-
* */
|
98
|
+
export type MessagingPolicy = {
|
99
|
+
/** Boolean to track whether or not messages are restricted to only text. */
|
102
100
|
textOnlyChat?: boolean;
|
103
|
-
}
|
101
|
+
};
|
104
102
|
/**
|
105
103
|
* Errors teed from API calls to the Chat SDK.
|
106
104
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatClientState.js","sourceRoot":"","sources":["../../../../../chat-stateful-client/src/ChatClientState.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
1
|
+
{"version":3,"file":"ChatClientState.js","sourceRoot":"","sources":["../../../../../chat-stateful-client/src/ChatClientState.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAoHlC;;;;GAIG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;IAclC,YAAY,MAAuB,EAAE,UAAiB,EAAE,SAAgB;QACtE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,8EAA8E;QAC9E,IAAI,CAAC,SAAS,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IAC9D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ChatMessageReadReceipt, ChatParticipant } from '@azure/communication-chat';\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { ChatMessageWithStatus } from './types/ChatMessageWithStatus';\nimport { TypingIndicatorReceivedEvent } from '@azure/communication-chat';\n\n/**\n * Centralized state for {@link @azure/communication-chat#ChatClient}.\n *\n * @public\n */\nexport type ChatClientState = {\n /**\n * Identifier of the current user.\n */\n userId: CommunicationIdentifierKind;\n /**\n * DisplayName of the current user.\n * The same value as what others see in {@link @azure/communication-chat#ChatParticipant.displayName}\n */\n displayName: string;\n /**\n * Chat threads joined by the current user.\n * Object with {@link ChatThreadClientState} fields, keyed by {@link ChatThreadClientState.threadId}.\n */\n threads: { [key: string]: ChatThreadClientState };\n /**\n * Stores the latest error for each API method.\n *\n * See documentation of {@link ChatErrors} for details.\n */\n latestErrors: ChatErrors;\n};\n\n/**\n * Centralized state for {@link @azure/communication-chat#ChatThreadClient}.\n *\n * @public\n */\nexport type ChatThreadClientState = {\n /**\n * Messages in this thread.\n * Object with {@link ChatMessageWithStatus} entries\n * Local messages are keyed by keyed by {@link ChatMessageWithStatus.clientMessageId}.\n * Remote messages are keyed by {@link @azure/communication-chat#ChatMessage.id}.\n */\n chatMessages: { [key: string]: ChatMessageWithStatus };\n /**\n * Participants of this chat thread.\n *\n * Object with {@link @azure/communication-chat#ChatParticipant} fields,\n * keyed by {@link @azure/communication-chat#ChatParticipant.id}.\n */\n participants: { [key: string]: ChatParticipant };\n /**\n * Id of this chat thread. Returned from {@link @azure/communication-chat#ChatThreadClient.threadId}\n */\n threadId: string;\n /**\n * An object containing properties of this chat thread.\n */\n properties?: ChatThreadProperties;\n /**\n * An array of ReadReceipts of this chat thread. Returned from {@link @azure/communication-chat#ChatThreadClient.listReadReceipts}\n */\n readReceipts: ChatMessageReadReceipt[];\n /**\n * An array of typingIndicators of this chat thread. Captured from event listener of {@link @azure/communication-chat#ChatClient}\n * Stateful client only stores recent 8000ms real-time typing indicators data.\n */\n typingIndicators: TypingIndicatorReceivedEvent[];\n /**\n * Latest timestamp when other users read messages sent by current user.\n */\n latestReadTime: Date;\n};\n\n/**\n * Properties of a chat thread.\n *\n * We define a minimal one that helps us hide the different types used by underlying API.\n *\n * @public\n */\nexport type ChatThreadProperties = {\n topic?: string;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n createdBy?: CommunicationIdentifierKind;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n messagingPolicy?: MessagingPolicy;\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n *\n * Messaging policy of a chat thread.\n *\n * @beta\n */\nexport type MessagingPolicy = {\n /** Boolean to track whether or not messages are restricted to only text. */\n textOnlyChat?: boolean;\n};\n\n/**\n * Errors teed from API calls to the Chat SDK.\n *\n * Each property in the object stores the latest error for a particular SDK API method.\n *\n * @public\n */\nexport type ChatErrors = {\n [target in ChatErrorTarget]: ChatError;\n};\n\n/**\n * Error thrown from failed {@link StatefulChatClient} methods.\n *\n * @public\n */\nexport class ChatError extends Error {\n /**\n * The API method target that failed.\n */\n public target: ChatErrorTarget;\n /**\n * Error thrown by the failed SDK method.\n */\n public innerError: Error;\n /**\n * Timestamp added to the error by the stateful layer.\n */\n public timestamp: Date;\n\n constructor(target: ChatErrorTarget, innerError: Error, timestamp?: Date) {\n super();\n this.target = target;\n this.innerError = innerError;\n // Testing note: It is easier to mock Date::now() than the Date() constructor.\n this.timestamp = timestamp ?? new Date(Date.now());\n this.name = 'ChatError';\n this.message = `${this.target}: ${this.innerError.message}`;\n }\n}\n\n/**\n * String literal type for all permissible keys in {@link ChatErrors}.\n *\n * @public\n */\nexport type ChatErrorTarget =\n | 'ChatClient.createChatThread'\n | 'ChatClient.deleteChatThread'\n | 'ChatClient.getChatThreadClient'\n | 'ChatClient.listChatThreads'\n | 'ChatClient.off'\n | 'ChatClient.on'\n | 'ChatClient.startRealtimeNotifications'\n | 'ChatClient.stopRealtimeNotifications'\n | 'ChatThreadClient.addParticipants'\n | 'ChatThreadClient.deleteMessage'\n | 'ChatThreadClient.getMessage'\n | 'ChatThreadClient.getProperties'\n | 'ChatThreadClient.listMessages'\n | 'ChatThreadClient.listParticipants'\n | 'ChatThreadClient.listReadReceipts'\n | 'ChatThreadClient.removeParticipant'\n | 'ChatThreadClient.sendMessage'\n | 'ChatThreadClient.sendReadReceipt'\n | 'ChatThreadClient.sendTypingNotification'\n | 'ChatThreadClient.updateMessage'\n | /* @conditional-compile-remove(chat-beta-sdk) */ 'ChatThreadClient.updateProperties'\n | 'ChatThreadClient.updateTopic'\n | /* @conditional-compile-remove(chat-beta-sdk) */ 'ChatThreadClient.uploadImage'\n | /* @conditional-compile-remove(chat-beta-sdk) */ 'ChatThreadClient.deleteImage';\n"]}
|
@@ -63,7 +63,7 @@ export type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../reac
|
|
63
63
|
export { defaultAttachmentMenuAction } from '../../react-components/src';
|
64
64
|
export type { ChatAttachmentType } from '../../react-components/src';
|
65
65
|
export type { InlineImageOptions, InlineImage } from '../../react-components/src';
|
66
|
-
export type { RichTextEditorOptions
|
66
|
+
export type { RichTextEditorOptions } from '../../react-components/src';
|
67
67
|
export type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';
|
68
68
|
export type { VideoTileStrings } from '../../react-components/src';
|
69
69
|
export type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAUzG,uDAAuD;AACvD,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAgCnG,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,sCAAsC,CAAC;AAE9C,yDAAyD;AACzD,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,iCAAiC,EAClC,MAAM,sCAAsC,CAAC;AAwB9C,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,yBAAyB,EAC1B,MAAM,mCAAmC,CAAC;AAU3C,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,QAA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kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,sDAAsD;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,sDAAsD;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAgBxE,gDAAgD;AAChD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type {\n AreEqual,\n CommonProperties,\n MessageStatus,\n Common,\n AreTypeEqual,\n AreParamEqual\n} from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(composite-js-helpers) */\nexport { loadOutboundCallComposite, loadCallComposite } from '../../acs-ui-javascript-loaders/src';\n/* @conditional-compile-remove(composite-js-helpers) */\nexport type { OutboundCallCompositeLoaderProps, CallCompositeLoaderProps } from '../../acs-ui-javascript-loaders/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type {\n CallClientProviderProps,\n CallAgentProviderProps,\n CallProviderProps,\n GetCallingSelector,\n CallingHandlers,\n CallingBaseSelectorProps,\n CommonCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type { VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';\n\nexport type { CaptionsOptions } from '../../calling-component-bindings/src';\n\nexport type {\n ChatClientProviderProps,\n ChatThreadClientProviderProps,\n GetChatSelector,\n ChatHandlers,\n ChatBaseSelectorProps\n} from '../../chat-component-bindings/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { MessageOptions, ChatMessageType } from '../../acs-ui-common/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { UploadChatImageResult } from '../../acs-ui-common/src';\n\nexport {\n CallClientProvider,\n CallAgentProvider,\n CallProvider,\n useCallClient,\n useCallAgent,\n useCall,\n useDeviceManager,\n getCallingSelector,\n createDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\n\nexport type {\n ScreenShareButtonSelector,\n CameraButtonSelector,\n VideoGallerySelector,\n DevicesButtonSelector,\n EmptySelector,\n ErrorBarSelector as CallErrorBarSelector,\n ParticipantListSelector,\n MicrophoneButtonSelector,\n ParticipantsButtonSelector,\n CreateDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(notifications) */\nexport type { NotificationStackSelector } from '../../calling-component-bindings/src';\n\nexport {\n ChatClientProvider,\n ChatThreadClientProvider,\n useChatClient,\n useChatThreadClient,\n getChatSelector,\n createDefaultChatHandlers\n} from '../../chat-component-bindings/src';\n\nexport type {\n MessageThreadSelector,\n TypingIndicatorSelector,\n ChatParticipantListSelector,\n SendBoxSelector,\n ErrorBarSelector as ChatErrorBarSelector\n} from '../../chat-component-bindings/src';\n\nexport {\n _IdentifierProvider,\n CameraButton,\n ControlBar,\n ControlBarButton,\n DevicesButton,\n EndCallButton,\n ErrorBar,\n GridLayout,\n LocalizationProvider,\n MessageStatusIndicator,\n MessageThread,\n MicrophoneButton,\n ParticipantItem,\n ParticipantList,\n ParticipantsButton,\n ScreenShareButton,\n SendBox,\n StreamMedia,\n TypingIndicator,\n VideoGallery,\n VideoTile,\n COMPONENT_LOCALE_EN_GB,\n COMPONENT_LOCALE_AR_SA,\n COMPONENT_LOCALE_CS_CZ,\n COMPONENT_LOCALE_DE_DE,\n COMPONENT_LOCALE_ES_ES,\n COMPONENT_LOCALE_FI_FI,\n COMPONENT_LOCALE_FR_FR,\n COMPONENT_LOCALE_HE_IL,\n COMPONENT_LOCALE_IT_IT,\n COMPONENT_LOCALE_JA_JP,\n COMPONENT_LOCALE_KO_KR,\n COMPONENT_LOCALE_NB_NO,\n COMPONENT_LOCALE_NL_NL,\n COMPONENT_LOCALE_PL_PL,\n COMPONENT_LOCALE_PT_BR,\n COMPONENT_LOCALE_RU_RU,\n COMPONENT_LOCALE_SV_SE,\n COMPONENT_LOCALE_TR_TR,\n COMPONENT_LOCALE_ZH_CN,\n COMPONENT_LOCALE_ZH_TW\n} from '../../react-components/src';\nexport { ImageOverlay } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from '../../react-components/src';\n\nexport { RaiseHandButton } from '../../react-components/src';\n\nexport { Dialpad } from '../../react-components/src';\n\n/* @conditional-compile-remove(one-to-n-calling) */\nexport { IncomingCallNotification } from '../../react-components/src';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type {\n IncomingCallNotificationProps,\n IncomingCallNotificationStrings,\n IncomingCallNotificationStyles\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n SitePermissionsStrings,\n SitePermissionsStyles,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from '../../react-components/src';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n MentionOptions,\n MentionDisplayOptions,\n MentionLookupOptions,\n Mention,\n MentionPopoverStrings\n} from '../../react-components/src';\n\nexport type {\n _IdentifierProviderProps,\n _Identifiers,\n ActiveErrorMessage,\n BaseCustomStyles,\n CallParticipantListParticipant,\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles,\n ChatMessage,\n CommunicationParticipant,\n ComponentLocale,\n ComponentSlotStyle,\n ComponentStrings,\n ContentSystemMessage,\n ControlBarButtonProps,\n ControlBarButtonStrings,\n ControlBarButtonStyles,\n ControlBarLayout,\n ControlBarProps,\n CreateVideoStreamViewResult,\n CustomAvatarOptions,\n CustomMessage,\n DevicesButtonContextualMenuStyles,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n EndCallButtonProps,\n EndCallButtonStrings,\n ErrorBarProps,\n ErrorBarStrings,\n ErrorType,\n GridLayoutProps,\n GridLayoutStyles,\n HorizontalGalleryStyles,\n JumpToNewMessageButtonProps,\n LocalizationProviderProps,\n LocalVideoCameraCycleButtonProps,\n LoadingState,\n Message,\n MessageAttachedStatus,\n MessageCommon,\n MessageContentType,\n MessageProps,\n MessageRenderer,\n MessageStatusIndicatorProps,\n MessageStatusIndicatorStrings,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings,\n MicrophoneButtonStyles,\n OnRenderAvatarCallback,\n OptionsDevice,\n ParticipantAddedSystemMessage,\n ParticipantItemProps,\n ParticipantItemStrings,\n ParticipantItemStyles,\n ParticipantListItemStyles,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback,\n ParticipantRemovedSystemMessage,\n ParticipantState,\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles,\n ReadReceiptsBySenderId,\n ScreenShareButtonProps,\n ScreenShareButtonStrings,\n SendBoxProps,\n SendBoxStrings,\n SendBoxStylesProps,\n StreamMediaProps,\n SystemMessage,\n SystemMessageCommon,\n TopicUpdatedSystemMessage,\n TypingIndicatorProps,\n TypingIndicatorStrings,\n TypingIndicatorStylesProps,\n UpdateMessageCallback,\n CancelEditCallback,\n VideoGalleryLayout,\n VideoGalleryLocalParticipant,\n VideoGalleryParticipant,\n VideoGalleryProps,\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoStreamOptions,\n VideoTileProps,\n VideoTileStylesProps,\n ViewScalingMode,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from '../../react-components/src';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\nexport type {\n ReactionButtonStrings,\n Reaction,\n ReactionButtonProps,\n ReactionResources,\n ReactionSprite\n} from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from '../../react-components/src';\nexport type { Spotlight } from '../../react-components/src';\nexport type { ImageOverlayProps, ImageOverlayStrings } from '../../react-components/src';\n/* @conditional-compile-remove(data-loss-prevention) */\nexport type { BlockedMessage } from '../../react-components/src';\nexport type {\n DialpadMode,\n DialpadProps,\n DialpadStrings,\n DialpadStyles,\n DtmfTone,\n LongPressTrigger\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { SendBoxErrorBarError } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentActionHandler } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type {\n AttachmentSelectionHandler,\n AttachmentRemovalHandler,\n AttachmentUploadOptions,\n AttachmentUploadTask\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadata } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadataInProgress, AttachmentProgressError } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport { defaultAttachmentMenuAction } from '../../react-components/src';\nexport type { ChatAttachmentType } from '../../react-components/src';\nexport type { InlineImageOptions, InlineImage } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextEditorOptions, RichTextEditBoxOptions, RichTextSendBoxOptions } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';\nexport type { VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedIOSProps\n} from '../../react-components/src';\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type {\n StatefulChatClient,\n StatefulChatClientArgs,\n StatefulChatClientOptions,\n ChatMessageWithStatus,\n ChatClientState,\n ChatError,\n ChatErrors,\n ChatThreadClientState,\n ChatThreadProperties,\n ChatErrorTarget\n} from '../../chat-stateful-client/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { MessagingPolicy } from '../../chat-stateful-client/src';\n\nexport type { ResourceFetchResult } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\nexport type {\n VerticalGalleryStyles,\n VerticalGalleryStrings,\n VerticalGalleryControlBarStyles\n} from '../../react-components/src';\n\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';\n\nexport type { SurveyIssues } from '../../react-components/src';\n\nexport type { SurveyIssuesHeadingStrings } from '../../react-components/src';\n\nexport type { CallSurveyImprovementSuggestions } from '../../react-components/src';\n/* @conditional-compile-remove(notifications) */\nexport { NotificationStack, Notification } from '../../react-components/src';\n/* @conditional-compile-remove(notifications) */\nexport type {\n NotificationStackProps,\n NotificationProps,\n NotificationStrings,\n NotificationStackStrings,\n NotificationType,\n ActiveNotification\n} from '../../react-components/src';\n/* @conditional-compile-remove(teams-meeting-conference) */\nexport type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';\n"]}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAUzG,uDAAuD;AACvD,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAgCnG,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,sCAAsC,CAAC;AAE9C,yDAAyD;AACzD,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,iCAAiC,EAClC,MAAM,sCAAsC,CAAC;AAwB9C,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,yBAAyB,EAC1B,MAAM,mCAAmC,CAAC;AAU3C,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,WAAW,EACX,eAAe,EACf,YAAY,EACZ,SAAS,EACT,sBA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AAgD;AAChD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type {\n AreEqual,\n CommonProperties,\n MessageStatus,\n Common,\n AreTypeEqual,\n AreParamEqual\n} from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(composite-js-helpers) */\nexport { loadOutboundCallComposite, loadCallComposite } from '../../acs-ui-javascript-loaders/src';\n/* @conditional-compile-remove(composite-js-helpers) */\nexport type { OutboundCallCompositeLoaderProps, CallCompositeLoaderProps } from '../../acs-ui-javascript-loaders/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type {\n CallClientProviderProps,\n CallAgentProviderProps,\n CallProviderProps,\n GetCallingSelector,\n CallingHandlers,\n CallingBaseSelectorProps,\n CommonCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type { VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';\n\nexport type { CaptionsOptions } from '../../calling-component-bindings/src';\n\nexport type {\n ChatClientProviderProps,\n ChatThreadClientProviderProps,\n GetChatSelector,\n ChatHandlers,\n ChatBaseSelectorProps\n} from '../../chat-component-bindings/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { MessageOptions, ChatMessageType } from '../../acs-ui-common/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { UploadChatImageResult } from '../../acs-ui-common/src';\n\nexport {\n CallClientProvider,\n CallAgentProvider,\n CallProvider,\n useCallClient,\n useCallAgent,\n useCall,\n useDeviceManager,\n getCallingSelector,\n createDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\n\nexport type {\n ScreenShareButtonSelector,\n CameraButtonSelector,\n VideoGallerySelector,\n DevicesButtonSelector,\n EmptySelector,\n ErrorBarSelector as CallErrorBarSelector,\n ParticipantListSelector,\n MicrophoneButtonSelector,\n ParticipantsButtonSelector,\n CreateDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(notifications) */\nexport type { NotificationStackSelector } from '../../calling-component-bindings/src';\n\nexport {\n ChatClientProvider,\n ChatThreadClientProvider,\n useChatClient,\n useChatThreadClient,\n getChatSelector,\n createDefaultChatHandlers\n} from '../../chat-component-bindings/src';\n\nexport type {\n MessageThreadSelector,\n TypingIndicatorSelector,\n ChatParticipantListSelector,\n SendBoxSelector,\n ErrorBarSelector as ChatErrorBarSelector\n} from '../../chat-component-bindings/src';\n\nexport {\n _IdentifierProvider,\n CameraButton,\n ControlBar,\n ControlBarButton,\n DevicesButton,\n EndCallButton,\n ErrorBar,\n GridLayout,\n LocalizationProvider,\n MessageStatusIndicator,\n MessageThread,\n MicrophoneButton,\n ParticipantItem,\n ParticipantList,\n ParticipantsButton,\n ScreenShareButton,\n SendBox,\n StreamMedia,\n TypingIndicator,\n VideoGallery,\n VideoTile,\n COMPONENT_LOCALE_EN_GB,\n COMPONENT_LOCALE_AR_SA,\n COMPONENT_LOCALE_CS_CZ,\n COMPONENT_LOCALE_DE_DE,\n COMPONENT_LOCALE_ES_ES,\n COMPONENT_LOCALE_FI_FI,\n COMPONENT_LOCALE_FR_FR,\n COMPONENT_LOCALE_HE_IL,\n COMPONENT_LOCALE_IT_IT,\n COMPONENT_LOCALE_JA_JP,\n COMPONENT_LOCALE_KO_KR,\n COMPONENT_LOCALE_NB_NO,\n COMPONENT_LOCALE_NL_NL,\n COMPONENT_LOCALE_PL_PL,\n COMPONENT_LOCALE_PT_BR,\n COMPONENT_LOCALE_RU_RU,\n COMPONENT_LOCALE_SV_SE,\n COMPONENT_LOCALE_TR_TR,\n COMPONENT_LOCALE_ZH_CN,\n COMPONENT_LOCALE_ZH_TW\n} from '../../react-components/src';\nexport { ImageOverlay } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from '../../react-components/src';\n\nexport { RaiseHandButton } from '../../react-components/src';\n\nexport { Dialpad } from '../../react-components/src';\n\n/* @conditional-compile-remove(one-to-n-calling) */\nexport { IncomingCallNotification } from '../../react-components/src';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type {\n IncomingCallNotificationProps,\n IncomingCallNotificationStrings,\n IncomingCallNotificationStyles\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n SitePermissionsStrings,\n SitePermissionsStyles,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from '../../react-components/src';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n MentionOptions,\n MentionDisplayOptions,\n MentionLookupOptions,\n Mention,\n MentionPopoverStrings\n} from '../../react-components/src';\n\nexport type {\n _IdentifierProviderProps,\n _Identifiers,\n ActiveErrorMessage,\n BaseCustomStyles,\n CallParticipantListParticipant,\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles,\n ChatMessage,\n CommunicationParticipant,\n ComponentLocale,\n ComponentSlotStyle,\n ComponentStrings,\n ContentSystemMessage,\n ControlBarButtonProps,\n ControlBarButtonStrings,\n ControlBarButtonStyles,\n ControlBarLayout,\n ControlBarProps,\n CreateVideoStreamViewResult,\n CustomAvatarOptions,\n CustomMessage,\n DevicesButtonContextualMenuStyles,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n EndCallButtonProps,\n EndCallButtonStrings,\n ErrorBarProps,\n ErrorBarStrings,\n ErrorType,\n GridLayoutProps,\n GridLayoutStyles,\n HorizontalGalleryStyles,\n JumpToNewMessageButtonProps,\n LocalizationProviderProps,\n LocalVideoCameraCycleButtonProps,\n LoadingState,\n Message,\n MessageAttachedStatus,\n MessageCommon,\n MessageContentType,\n MessageProps,\n MessageRenderer,\n MessageStatusIndicatorProps,\n MessageStatusIndicatorStrings,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings,\n MicrophoneButtonStyles,\n OnRenderAvatarCallback,\n OptionsDevice,\n ParticipantAddedSystemMessage,\n ParticipantItemProps,\n ParticipantItemStrings,\n ParticipantItemStyles,\n ParticipantListItemStyles,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback,\n ParticipantRemovedSystemMessage,\n ParticipantState,\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles,\n ReadReceiptsBySenderId,\n ScreenShareButtonProps,\n ScreenShareButtonStrings,\n SendBoxProps,\n SendBoxStrings,\n SendBoxStylesProps,\n StreamMediaProps,\n SystemMessage,\n SystemMessageCommon,\n TopicUpdatedSystemMessage,\n TypingIndicatorProps,\n TypingIndicatorStrings,\n TypingIndicatorStylesProps,\n UpdateMessageCallback,\n CancelEditCallback,\n VideoGalleryLayout,\n VideoGalleryLocalParticipant,\n VideoGalleryParticipant,\n VideoGalleryProps,\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoStreamOptions,\n VideoTileProps,\n VideoTileStylesProps,\n ViewScalingMode,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from '../../react-components/src';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\nexport type {\n ReactionButtonStrings,\n Reaction,\n ReactionButtonProps,\n ReactionResources,\n ReactionSprite\n} from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from '../../react-components/src';\nexport type { Spotlight } from '../../react-components/src';\nexport type { ImageOverlayProps, ImageOverlayStrings } from '../../react-components/src';\n/* @conditional-compile-remove(data-loss-prevention) */\nexport type { BlockedMessage } from '../../react-components/src';\nexport type {\n DialpadMode,\n DialpadProps,\n DialpadStrings,\n DialpadStyles,\n DtmfTone,\n LongPressTrigger\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { SendBoxErrorBarError } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentActionHandler } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type {\n AttachmentSelectionHandler,\n AttachmentRemovalHandler,\n AttachmentUploadOptions,\n AttachmentUploadTask\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadata } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadataInProgress, AttachmentProgressError } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport { defaultAttachmentMenuAction } from '../../react-components/src';\nexport type { ChatAttachmentType } from '../../react-components/src';\nexport type { InlineImageOptions, InlineImage } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextEditorOptions } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';\nexport type { VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedIOSProps\n} from '../../react-components/src';\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type {\n StatefulChatClient,\n StatefulChatClientArgs,\n StatefulChatClientOptions,\n ChatMessageWithStatus,\n ChatClientState,\n ChatError,\n ChatErrors,\n ChatThreadClientState,\n ChatThreadProperties,\n ChatErrorTarget\n} from '../../chat-stateful-client/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { MessagingPolicy } from '../../chat-stateful-client/src';\n\nexport type { ResourceFetchResult } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\nexport type {\n VerticalGalleryStyles,\n VerticalGalleryStrings,\n VerticalGalleryControlBarStyles\n} from '../../react-components/src';\n\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';\n\nexport type { SurveyIssues } from '../../react-components/src';\n\nexport type { SurveyIssuesHeadingStrings } from '../../react-components/src';\n\nexport type { CallSurveyImprovementSuggestions } from '../../react-components/src';\n/* @conditional-compile-remove(notifications) */\nexport { NotificationStack, Notification } from '../../react-components/src';\n/* @conditional-compile-remove(notifications) */\nexport type {\n NotificationStackProps,\n NotificationProps,\n NotificationStrings,\n NotificationStackStrings,\n NotificationType,\n ActiveNotification\n} from '../../react-components/src';\n/* @conditional-compile-remove(teams-meeting-conference) */\nexport type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';\n"]}
|
@@ -16,7 +16,7 @@ import React from 'react';
|
|
16
16
|
import { Announcer } from '../Announcer';
|
17
17
|
import { useEffect, useState, useMemo } from 'react';
|
18
18
|
import { useLocaleAttachmentCardStringsTrampoline } from '../utils/common';
|
19
|
-
import { useAttachmentCardStyles,
|
19
|
+
import { useAttachmentCardStyles, attachmentNameContainerClassName, ATTACHMENT_CARD_MIN_PROGRESS } from '../styles/AttachmentCard.styles';
|
20
20
|
/**
|
21
21
|
* @internal
|
22
22
|
* A component for displaying an attachment card with attachment icon and progress bar.
|
@@ -56,24 +56,18 @@ export const _AttachmentCard = (props) => {
|
|
56
56
|
return (React.createElement("div", { "data-is-focusable": true },
|
57
57
|
React.createElement(Announcer, { announcementString: announcerString, ariaLive: 'polite' }),
|
58
58
|
React.createElement(Card, { className: mergeClasses(attachmentCardStyles.root, selfResizing ? attachmentCardStyles.dynamicWidth : attachmentCardStyles.staticWidth), size: "small", role: "listitem", appearance: "filled-alternative", "aria-label": attachment.name, "data-testid": 'attachment-card' },
|
59
|
-
React.createElement(CardHeader, { className: attachmentCardStyles.content, image: {
|
60
|
-
|
61
|
-
children: (React.createElement(Icon, { "data-ui-id": 'attachmenttype-icon', iconName: getFileTypeIconProps({
|
59
|
+
React.createElement(CardHeader, { className: attachmentCardStyles.content, image: React.createElement("div", { className: attachmentCardStyles.fileIcon },
|
60
|
+
React.createElement(Icon, { "data-ui-id": 'attachmenttype-icon', iconName: getFileTypeIconProps({
|
62
61
|
extension: extension,
|
63
62
|
size: 24,
|
64
63
|
imageFileType: 'svg'
|
65
|
-
}).iconName }))
|
66
|
-
|
67
|
-
id: 'attachment-' + attachment.id,
|
68
|
-
children: (React.createElement(TooltipHost, { content: attachment.name, calloutProps: {
|
64
|
+
}).iconName })), header: React.createElement("div", { className: attachmentNameContainerClassName, id: 'attachment-' + attachment.id },
|
65
|
+
React.createElement(TooltipHost, { content: attachment.name, calloutProps: {
|
69
66
|
gapSpace: 0,
|
70
67
|
target: '#attachment-' + attachment.id
|
71
|
-
}
|
72
|
-
React.createElement(
|
73
|
-
|
74
|
-
className: attachmentCardStyles.actions,
|
75
|
-
children: MappedMenuItems(menuActions, Object.assign(Object.assign({}, attachment), { url: (_e = attachment.url) !== null && _e !== void 0 ? _e : '' }), onActionHandlerFailed)
|
76
|
-
} })),
|
68
|
+
} },
|
69
|
+
React.createElement("div", { className: attachmentCardStyles.fileNameLabel },
|
70
|
+
React.createElement(Text, { className: attachmentCardStyles.title, "aria-label": attachment.name }, attachment.name)))), action: React.createElement("div", { className: attachmentCardStyles.focusState }, MappedMenuItems(menuActions, Object.assign(Object.assign({}, attachment), { url: (_e = attachment.url) !== null && _e !== void 0 ? _e : '' }), onActionHandlerFailed)) })),
|
77
71
|
isUploadInProgress ? (React.createElement(CardFooter, null,
|
78
72
|
React.createElement(ProgressBar, { thickness: "medium", value: Math.max(progress !== null && progress !== void 0 ? progress : 0, ATTACHMENT_CARD_MIN_PROGRESS), shape: "rounded" }))) : (React.createElement(React.Fragment, null, " "))));
|
79
73
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AttachmentCard.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/Attachment/AttachmentCard.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EACL,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,aAAa,EACb,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,UAAU,EACV,WAAW,EACX,YAAY,EACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAA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AC,OAAO,CAAC,UAAU,CAAC,CAAC;wBACrC,CAAC;wBAAC,OAAO,CAAC,EAAE,CAAC;4BACX,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAI,CAAW,CAAC,OAAO,CAAC,CAAC;wBAC7C,CAAC;oBACH,CAAC,CAAA,IAEA,QAAQ,CAAC,IAAI,CACL,CACZ,CAAC,CACO,CACC,CACT,CACC,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Icon, TooltipHost } from '@fluentui/react';\nimport {\n Card,\n CardHeader,\n Text,\n Menu,\n MenuTrigger,\n ToolbarButton,\n MenuPopover,\n MenuItem,\n MenuList,\n Toolbar,\n CardFooter,\n ProgressBar,\n mergeClasses\n} from '@fluentui/react-components';\nimport { getFileTypeIconProps } from '@fluentui/react-file-type-icons';\nimport React from 'react';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { Announcer } from '../Announcer';\nimport { useEffect, useState, useMemo } from 'react';\nimport { _AttachmentUploadCardsStrings } from './AttachmentUploadCards';\nimport { useLocaleAttachmentCardStringsTrampoline } from '../utils/common';\nimport { AttachmentMenuAction } from '../../types/Attachment';\nimport { AttachmentMetadata, AttachmentMetadataInProgress } from '@internal/acs-ui-common';\nimport {\n useAttachmentCardStyles,\n ATTACHMENT_CARD_MIN_PROGRESS,\n titleTooltipContainerStyle\n} from '../styles/AttachmentCard.styles';\n\n/**\n * @internal\n * AttachmentCard Component Props.\n */\nexport interface _AttachmentCardProps {\n /**\n * Attachment details including name, extension, url, etc.\n */\n attachment: AttachmentMetadata | AttachmentMetadataInProgress;\n /**\n * An array of menu actions to be displayed in the attachment card.\n */\n menuActions: AttachmentMenuAction[];\n /**\n * Optional aria label strings for attachment upload cards\n */\n strings?: _AttachmentUploadCardsStrings;\n /**\n * Optional callback that runs if menu bar action onclick throws.\n */\n onActionHandlerFailed?: (errMsg: string) => void;\n /**\n * Optional flag to enable self resizing of the attachment card.\n */\n selfResizing?: boolean;\n}\n\n/**\n * @internal\n * A component for displaying an attachment card with attachment icon and progress bar.\n *\n * `_AttachmentCard` internally uses the `Card` component from `@fluentui/react-components`. You can checkout the details about these components [here](https://react.fluentui.dev/?path=/docs/components-card).\n */\nexport const _AttachmentCard = (props: _AttachmentCardProps): JSX.Element => {\n const { attachment, menuActions, onActionHandlerFailed, selfResizing } = props;\n const attachmentCardStyles = useAttachmentCardStyles();\n\n const progress = useMemo(() => {\n return 'progress' in attachment ? attachment.progress : undefined;\n }, [attachment]);\n\n const isUploadInProgress = useMemo(() => {\n return progress !== undefined && progress >= 0 && progress < 1;\n }, [progress]);\n\n const [announcerString, setAnnouncerString] = useState<string | undefined>(undefined);\n const localeStrings = useLocaleAttachmentCardStringsTrampoline();\n const uploadStartedString = props.strings?.uploading ?? localeStrings.uploading;\n const uploadCompletedString = props.strings?.uploadCompleted ?? localeStrings.uploadCompleted;\n\n useEffect(() => {\n if (isUploadInProgress) {\n setAnnouncerString(`${uploadStartedString} ${attachment.name}`);\n } else if (progress === 1) {\n setAnnouncerString(`${attachment.name} ${uploadCompletedString}`);\n } else {\n setAnnouncerString(undefined);\n }\n }, [progress, isUploadInProgress, attachment.name, uploadStartedString, uploadCompletedString]);\n\n const extension = useMemo((): string => {\n const re = /(?:\\.([^.]+))?$/;\n const match = re.exec(attachment.name);\n return match && match[1] ? match[1] : '';\n }, [attachment]);\n return (\n <div data-is-focusable={true}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n <Card\n className={mergeClasses(\n attachmentCardStyles.root,\n selfResizing ? attachmentCardStyles.dynamicWidth : attachmentCardStyles.staticWidth\n )}\n size=\"small\"\n role=\"listitem\"\n appearance=\"filled-alternative\"\n aria-label={attachment.name}\n data-testid={'attachment-card'}\n >\n <CardHeader\n className={attachmentCardStyles.content}\n image={{\n className: attachmentCardStyles.fileIcon,\n children: (\n <Icon\n data-ui-id={'attachmenttype-icon'}\n iconName={\n getFileTypeIconProps({\n extension: extension,\n size: 24,\n imageFileType: 'svg'\n }).iconName\n }\n />\n )\n }}\n header={{\n id: 'attachment-' + attachment.id,\n children: (\n <TooltipHost\n content={attachment.name}\n calloutProps={{\n gapSpace: 0,\n target: '#attachment-' + attachment.id\n }}\n hostClassName={titleTooltipContainerStyle}\n >\n <Text className={attachmentCardStyles.title} aria-label={attachment.name}>\n {attachment.name}\n </Text>\n </TooltipHost>\n )\n }}\n action={{\n className: attachmentCardStyles.actions,\n children: MappedMenuItems(\n menuActions,\n {\n ...attachment,\n url: attachment.url ?? ''\n },\n onActionHandlerFailed\n )\n }}\n />\n </Card>\n {isUploadInProgress ? (\n <CardFooter>\n <ProgressBar\n thickness=\"medium\"\n value={Math.max(progress ?? 0, ATTACHMENT_CARD_MIN_PROGRESS)}\n shape=\"rounded\"\n />\n </CardFooter>\n ) : (\n <> </>\n )}\n </div>\n );\n};\n\nconst MappedMenuItems = (\n menuActions: AttachmentMenuAction[],\n attachment: AttachmentMetadata,\n handleOnClickError?: (errMsg: string) => void\n): JSX.Element => {\n const localeStrings = useLocaleAttachmentCardStringsTrampoline();\n\n if (menuActions.length === 0) {\n return <></>;\n }\n return menuActions.length === 1 ? (\n <TooltipHost content={menuActions[0].name}>\n <ToolbarButton\n aria-label={menuActions[0].name}\n role=\"button\"\n icon={menuActions[0].icon}\n onClick={() => {\n try {\n menuActions[0].onClick(attachment);\n } catch (e) {\n handleOnClickError?.((e as Error).message);\n }\n }}\n />\n </TooltipHost>\n ) : (\n <Toolbar>\n <Menu>\n <TooltipHost content={localeStrings.attachmentMoreMenu}>\n <MenuTrigger>\n <ToolbarButton\n aria-label={localeStrings.attachmentMoreMenu}\n role=\"button\"\n icon={<Icon iconName=\"AttachmentMoreMenu\" />}\n />\n </MenuTrigger>\n </TooltipHost>\n <MenuPopover>\n <MenuList>\n {menuActions.map((menuItem, index) => (\n <MenuItem\n aria-label={menuItem.name}\n key={index}\n icon={menuItem.icon}\n onClick={async () => {\n try {\n await menuItem.onClick(attachment);\n } catch (e) {\n handleOnClickError?.((e as Error).message);\n }\n }}\n >\n {menuItem.name}\n </MenuItem>\n ))}\n </MenuList>\n </MenuPopover>\n </Menu>\n </Toolbar>\n );\n};\n"]}
|
1
|
+
{"version":3,"file":"AttachmentCard.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/Attachment/AttachmentCard.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EACL,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,aAAa,EACb,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,UAAU,EACV,WAAW,EACX,YAAY,EACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,wCAAwC,EAAE,MAAM,iBAAiB,CAAC;AAG3E,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EAChC,4BAA4B,EAC7B,MAAM,iCAAiC,CAAC;AA6BzC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAe,EAAE;;IAC1E,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,qBAAqB,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAC/E,MAAM,oBAAoB,GAAG,uBAAuB,EAAE,CAAC;IAEvD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE;QAC5B,OAAO,UAAU,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS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AC;gBAC7C,CAAC;YACH,CAAC,GACD,CACU,CACf,CAAC,CAAC,CAAC,CACF,oBAAC,OAAO;QACN,oBAAC,IAAI;YACH,oBAAC,WAAW,IAAC,OAAO,EAAE,aAAa,CAAC,kBAAkB;gBACpD,oBAAC,WAAW;oBACV,oBAAC,aAAa,kBACA,aAAa,CAAC,kBAAkB,EAC5C,IAAI,EAAC,QAAQ,EACb,IAAI,EAAE,oBAAC,IAAI,IAAC,QAAQ,EAAC,oBAAoB,GAAG,GAC5C,CACU,CACF;YACd,oBAAC,WAAW;gBACV,oBAAC,QAAQ,QACN,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,CACpC,oBAAC,QAAQ,kBACK,QAAQ,CAAC,IAAI,EACzB,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,OAAO,EAAE,GAAS,EAAE;wBAClB,IAAI,CAAC;4BACH,MAAM,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;wBACrC,CAAC;wBAAC,OAAO,CAAC,EAAE,CAAC;4BACX,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAI,CAAW,CAAC,OAAO,CAAC,CAAC;wBAC7C,CAAC;oBACH,CAAC,CAAA,IAEA,QAAQ,CAAC,IAAI,CACL,CACZ,CAAC,CACO,CACC,CACT,CACC,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Icon, TooltipHost } from '@fluentui/react';\nimport {\n Card,\n CardHeader,\n Text,\n Menu,\n MenuTrigger,\n ToolbarButton,\n MenuPopover,\n MenuItem,\n MenuList,\n Toolbar,\n CardFooter,\n ProgressBar,\n mergeClasses\n} from '@fluentui/react-components';\nimport { getFileTypeIconProps } from '@fluentui/react-file-type-icons';\nimport React from 'react';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { Announcer } from '../Announcer';\nimport { useEffect, useState, useMemo } from 'react';\nimport { _AttachmentUploadCardsStrings } from './AttachmentUploadCards';\nimport { useLocaleAttachmentCardStringsTrampoline } from '../utils/common';\nimport { AttachmentMenuAction } from '../../types/Attachment';\nimport { AttachmentMetadata, AttachmentMetadataInProgress } from '@internal/acs-ui-common';\nimport {\n useAttachmentCardStyles,\n attachmentNameContainerClassName,\n ATTACHMENT_CARD_MIN_PROGRESS\n} from '../styles/AttachmentCard.styles';\n\n/**\n * @internal\n * AttachmentCard Component Props.\n */\nexport interface _AttachmentCardProps {\n /**\n * Attachment details including name, extension, url, etc.\n */\n attachment: AttachmentMetadata | AttachmentMetadataInProgress;\n /**\n * An array of menu actions to be displayed in the attachment card.\n */\n menuActions: AttachmentMenuAction[];\n /**\n * Optional aria label strings for attachment upload cards\n */\n strings?: _AttachmentUploadCardsStrings;\n /**\n * Optional callback that runs if menu bar action onclick throws.\n */\n onActionHandlerFailed?: (errMsg: string) => void;\n /**\n * Optional flag to enable self resizing of the attachment card.\n */\n selfResizing?: boolean;\n}\n\n/**\n * @internal\n * A component for displaying an attachment card with attachment icon and progress bar.\n *\n * `_AttachmentCard` internally uses the `Card` component from `@fluentui/react-components`. You can checkout the details about these components [here](https://react.fluentui.dev/?path=/docs/components-card).\n */\nexport const _AttachmentCard = (props: _AttachmentCardProps): JSX.Element => {\n const { attachment, menuActions, onActionHandlerFailed, selfResizing } = props;\n const attachmentCardStyles = useAttachmentCardStyles();\n\n const progress = useMemo(() => {\n return 'progress' in attachment ? attachment.progress : undefined;\n }, [attachment]);\n\n const isUploadInProgress = useMemo(() => {\n return progress !== undefined && progress >= 0 && progress < 1;\n }, [progress]);\n\n const [announcerString, setAnnouncerString] = useState<string | undefined>(undefined);\n const localeStrings = useLocaleAttachmentCardStringsTrampoline();\n const uploadStartedString = props.strings?.uploading ?? localeStrings.uploading;\n const uploadCompletedString = props.strings?.uploadCompleted ?? localeStrings.uploadCompleted;\n\n useEffect(() => {\n if (isUploadInProgress) {\n setAnnouncerString(`${uploadStartedString} ${attachment.name}`);\n } else if (progress === 1) {\n setAnnouncerString(`${attachment.name} ${uploadCompletedString}`);\n } else {\n setAnnouncerString(undefined);\n }\n }, [progress, isUploadInProgress, attachment.name, uploadStartedString, uploadCompletedString]);\n\n const extension = useMemo((): string => {\n const re = /(?:\\.([^.]+))?$/;\n const match = re.exec(attachment.name);\n return match && match[1] ? match[1] : '';\n }, [attachment]);\n return (\n <div data-is-focusable={true}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n <Card\n className={mergeClasses(\n attachmentCardStyles.root,\n selfResizing ? attachmentCardStyles.dynamicWidth : attachmentCardStyles.staticWidth\n )}\n size=\"small\"\n role=\"listitem\"\n appearance=\"filled-alternative\"\n aria-label={attachment.name}\n data-testid={'attachment-card'}\n >\n <CardHeader\n className={attachmentCardStyles.content}\n image={\n <div className={attachmentCardStyles.fileIcon}>\n <Icon\n data-ui-id={'attachmenttype-icon'}\n iconName={\n getFileTypeIconProps({\n extension: extension,\n size: 24,\n imageFileType: 'svg'\n }).iconName\n }\n />\n </div>\n }\n header={\n <div className={attachmentNameContainerClassName} id={'attachment-' + attachment.id}>\n <TooltipHost\n content={attachment.name}\n calloutProps={{\n gapSpace: 0,\n target: '#attachment-' + attachment.id\n }}\n >\n <div className={attachmentCardStyles.fileNameLabel}>\n <Text className={attachmentCardStyles.title} aria-label={attachment.name}>\n {attachment.name}\n </Text>\n </div>\n </TooltipHost>\n </div>\n }\n action={\n <div className={attachmentCardStyles.focusState}>\n {MappedMenuItems(\n menuActions,\n {\n ...attachment,\n url: attachment.url ?? ''\n },\n onActionHandlerFailed\n )}\n </div>\n }\n />\n </Card>\n {isUploadInProgress ? (\n <CardFooter>\n <ProgressBar\n thickness=\"medium\"\n value={Math.max(progress ?? 0, ATTACHMENT_CARD_MIN_PROGRESS)}\n shape=\"rounded\"\n />\n </CardFooter>\n ) : (\n <> </>\n )}\n </div>\n );\n};\n\nconst MappedMenuItems = (\n menuActions: AttachmentMenuAction[],\n attachment: AttachmentMetadata,\n handleOnClickError?: (errMsg: string) => void\n): JSX.Element => {\n const localeStrings = useLocaleAttachmentCardStringsTrampoline();\n\n if (menuActions.length === 0) {\n return <></>;\n }\n return menuActions.length === 1 ? (\n <TooltipHost content={menuActions[0].name}>\n <ToolbarButton\n aria-label={menuActions[0].name}\n role=\"button\"\n icon={menuActions[0].icon}\n onClick={() => {\n try {\n menuActions[0].onClick(attachment);\n } catch (e) {\n handleOnClickError?.((e as Error).message);\n }\n }}\n />\n </TooltipHost>\n ) : (\n <Toolbar>\n <Menu>\n <TooltipHost content={localeStrings.attachmentMoreMenu}>\n <MenuTrigger>\n <ToolbarButton\n aria-label={localeStrings.attachmentMoreMenu}\n role=\"button\"\n icon={<Icon iconName=\"AttachmentMoreMenu\" />}\n />\n </MenuTrigger>\n </TooltipHost>\n <MenuPopover>\n <MenuList>\n {menuActions.map((menuItem, index) => (\n <MenuItem\n aria-label={menuItem.name}\n key={index}\n icon={menuItem.icon}\n onClick={async () => {\n try {\n await menuItem.onClick(attachment);\n } catch (e) {\n handleOnClickError?.((e as Error).message);\n }\n }}\n >\n {menuItem.name}\n </MenuItem>\n ))}\n </MenuList>\n </MenuPopover>\n </Menu>\n </Toolbar>\n );\n};\n"]}
|
package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { MessageStatus } from "../../../../acs-ui-common/src";
|
3
3
|
import { MessageProps, MessageRenderer, MessageThreadStyles, _ChatMessageProps } from '../MessageThread';
|
4
|
+
import { RichTextEditorOptions } from '../MessageThread';
|
4
5
|
import { ChatMessage, OnRenderAvatarCallback } from '../../types';
|
5
6
|
import { BlockedMessage } from '../../types';
|
6
7
|
import { AttachmentMenuAction } from '../../types/Attachment';
|
7
8
|
import { AttachmentMetadata } from "../../../../acs-ui-common/src";
|
8
|
-
import { AttachmentMetadataInProgress } from "../../../../acs-ui-common/src";
|
9
9
|
import { MentionOptions } from '../MentionPopover';
|
10
10
|
import { MessageStatusIndicatorProps } from '../MessageStatusIndicator';
|
11
11
|
import { InlineImageOptions } from './ChatMessageContent';
|
@@ -40,13 +40,7 @@ export type ChatMessageComponentWrapperProps = _ChatMessageProps & {
|
|
40
40
|
* Optional callback to define custom actions for attachments.
|
41
41
|
*/
|
42
42
|
actionsForAttachment?: (attachment: AttachmentMetadata, message?: ChatMessage) => AttachmentMenuAction[];
|
43
|
-
|
44
|
-
onPaste?: (event: {
|
45
|
-
content: DocumentFragment;
|
46
|
-
}) => void;
|
47
|
-
onCancelInlineImageUpload?: (imageId: string, messageId: string) => void;
|
48
|
-
onUploadInlineImage?: (imageUrl: string, imageFileName: string, messageId: string) => void;
|
49
|
-
imageUploadsInProgress?: AttachmentMetadataInProgress[];
|
43
|
+
richTextEditorOptions?: RichTextEditorOptions;
|
50
44
|
};
|
51
45
|
/**
|
52
46
|
* The wrapper component to display different types of chat message.
|