@azure/communication-react 1.22.0-alpha-202412070017 → 1.22.0-alpha-202412120017
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 +101 -49
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CTHWXMl0.js → ChatMessageComponentAsRichTextEditBox-BBGCXfci.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CTHWXMl0.js.map → ChatMessageComponentAsRichTextEditBox-BBGCXfci.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-C0YPqtKB.js → RichTextSendBoxWrapper-CG_xsEdn.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-C0YPqtKB.js.map → RichTextSendBoxWrapper-CG_xsEdn.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-Bf1eybwR.js → index-BryVG9gm.js} +265 -84
- package/dist/dist-cjs/communication-react/index-BryVG9gm.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 +5 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +51 -11
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +25 -25
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +45 -3
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +11 -5
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +7 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +5 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +15 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js +62 -0
- package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/MediaAccessSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/MediaAccessSubscriber.js +7 -4
- package/dist/dist-esm/calling-stateful-client/src/MediaAccessSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -33
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +8 -15
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.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/NotificationStack.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +9 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +20 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +14 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +11 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +5 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +4 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +1 -0
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils.js +5 -3
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +1 -1
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +29 -1
- package/dist/dist-esm/react-components/src/types/TogetherModeTypes.d.ts +7 -31
- package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +3 -1
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +5 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js +8 -3
- package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +25 -1
- package/package.json +4 -4
- package/dist/dist-cjs/communication-react/index-Bf1eybwR.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MediaAccessSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/MediaAccessSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
1
|
+
{"version":3,"file":"MediaAccessSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/MediaAccessSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAalC,+CAA+C;AAC/C;;GAEG;AACH,MAAM,OAAO,qBAAqB;IAKhC,YAAY,SAAoB,EAAE,OAAoB,EAAE,sBAA8C;QAa9F,cAAS,GAAG,GAAS,EAAE;YAC7B,IAAI,CAAC,uBAAuB,CAAC,EAAE,CAAC,oBAAoB,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;YAC/E,IAAI,CAAC,uBAAuB,CAAC,EAAE,CAAC,2BAA2B,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;QAC/F,CAAC,CAAC;QAEK,gBAAW,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;YAChF,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,2BAA2B,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;QAChG,CAAC,CAAC;QAEM,uBAAkB,GAAG,CAAC,IAA6B,EAAQ,EAAE,CACnE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAErE,8BAAyB,GAAG,CAAC,IAAoC,EAAQ,EAAE,CACjF,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;QA1BrF,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,uBAAuB,GAAG,sBAAsB,CAAC;QAEtD,MAAM,aAAa,GAAG,IAAI,CAAC,uBAAuB,CAAC,uBAAuB,EAAE,CAAC;QAC7E,MAAM,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,CAAC,qBAAqB,EAAE,CAAC;QAEhF,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACtE,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;QAChF,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;CAiBF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(media-access) */\nimport {\n MediaAccessCallFeature,\n MediaAccessChangedEvent,\n MeetingMediaAccessChangedEvent\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(media-access) */\nimport { CallContext } from './CallContext';\n/* @conditional-compile-remove(media-access) */\nimport { CallIdRef } from './CallIdRef';\n\n/* @conditional-compile-remove(media-access) */\n/**\n * @private\n */\nexport class MediaAccessSubscriber {\n private _callIdRef: CallIdRef;\n private _context: CallContext;\n private _mediaAccessCallFeature: MediaAccessCallFeature;\n\n constructor(callIdRef: CallIdRef, context: CallContext, mediaAccessCallFeature: MediaAccessCallFeature) {\n this._callIdRef = callIdRef;\n this._context = context;\n this._mediaAccessCallFeature = mediaAccessCallFeature;\n\n const mediaAccesses = this._mediaAccessCallFeature.getAllOthersMediaAccess();\n const meetingMediaAccess = this._mediaAccessCallFeature.getMeetingMediaAccess();\n\n this._context.setMediaAccesses(this._callIdRef.callId, mediaAccesses);\n this._context.setMeetingMediaAccess(this._callIdRef.callId, meetingMediaAccess);\n this.subscribe();\n }\n\n private subscribe = (): void => {\n this._mediaAccessCallFeature.on('mediaAccessChanged', this.mediaAccessChanged);\n this._mediaAccessCallFeature.on('meetingMediaAccessChanged', this.meetingMediaAccessChanged);\n };\n\n public unsubscribe = (): void => {\n this._mediaAccessCallFeature.off('mediaAccessChanged', this.mediaAccessChanged);\n this._mediaAccessCallFeature.off('meetingMediaAccessChanged', this.meetingMediaAccessChanged);\n };\n\n private mediaAccessChanged = (data: MediaAccessChangedEvent): void =>\n this._context.setMediaAccesses(this._callIdRef.callId, data.mediaAccesses);\n\n private meetingMediaAccessChanged = (data: MeetingMediaAccessChangedEvent): void =>\n this._context.setMeetingMediaAccess(this._callIdRef.callId, data.meetingMediaAccess);\n}\n"]}
|
@@ -94,7 +94,7 @@ export interface StatefulCallClient extends CallClient {
|
|
94
94
|
* @param stream - The LocalVideoStreamState or RemoteVideoStreamState to start rendering.
|
95
95
|
* @param options - Options that are passed to the {@link @azure/communication-calling#VideoStreamRenderer}.
|
96
96
|
*/
|
97
|
-
createView(callId: string | undefined, participantId: CommunicationIdentifier | undefined, stream: LocalVideoStreamState | RemoteVideoStreamState, options?: CreateViewOptions): Promise<CreateViewResult | undefined>;
|
97
|
+
createView(callId: string | undefined, participantId: CommunicationIdentifier | undefined, stream: LocalVideoStreamState | RemoteVideoStreamState | /* @conditional-compile-remove(together-mode) */ CallFeatureStreamState, options?: CreateViewOptions): Promise<CreateViewResult | undefined>;
|
98
98
|
/**
|
99
99
|
* Stops rendering a {@link RemoteVideoStreamState} or {@link LocalVideoStreamState} and removes the
|
100
100
|
* {@link VideoStreamRendererView} from the relevant {@link RemoteVideoStreamState} in {@link CallClientState} or
|
@@ -119,38 +119,7 @@ export interface StatefulCallClient extends CallClient {
|
|
119
119
|
* be undefined if disposing LocalVideoStreamState.
|
120
120
|
* @param stream - The LocalVideoStreamState or RemoteVideoStreamState to dispose.
|
121
121
|
*/
|
122
|
-
disposeView(callId: string | undefined, participantId: CommunicationIdentifier | undefined, stream: LocalVideoStreamState | RemoteVideoStreamState): void;
|
123
|
-
/**
|
124
|
-
* Renders a {@link CallFeatureStreamState}
|
125
|
-
* {@link VideoStreamRendererViewState} under the relevant {@link CallFeatureStreamState}
|
126
|
-
* {@link @azure/communication-calling#VideoStreamRenderer.createView}.
|
127
|
-
*
|
128
|
-
* Scenario 1: Render CallFeatureStreamState
|
129
|
-
* - CallId is required and stream of type CallFeatureStreamState is required
|
130
|
-
* - Resulting {@link VideoStreamRendererViewState} is stored in the given callId and participantId in
|
131
|
-
* {@link CallClientState}
|
132
|
-
*
|
133
|
-
* @param callId - CallId for the given stream. Can be undefined if the stream is not part of any call.
|
134
|
-
* @param stream - The LocalVideoStreamState or RemoteVideoStreamState to start rendering.
|
135
|
-
* @param options - Options that are passed to the {@link @azure/communication-calling#VideoStreamRenderer}.
|
136
|
-
* @beta
|
137
|
-
*/
|
138
|
-
createView(callId: string, stream: CallFeatureStreamState, options?: CreateViewOptions): Promise<CreateViewResult | undefined>;
|
139
|
-
/**
|
140
|
-
* Stops rendering a {@link CallFeatureStreamState} and removes the
|
141
|
-
* {@link VideoStreamRendererView} from the relevant {@link CallFeatureStreamState} in {@link CallClientState} or
|
142
|
-
* {@link @azure/communication-calling#VideoStreamRenderer.dispose}.
|
143
|
-
*
|
144
|
-
* Its important to disposeView to clean up resources properly.
|
145
|
-
*
|
146
|
-
* Scenario 1: Dispose CallFeatureStreamState
|
147
|
-
* - CallId is required and stream of type CallFeatureStreamState is required
|
148
|
-
*
|
149
|
-
* @param callId - CallId for the given stream. Can be undefined if the stream is not part of any call.
|
150
|
-
* @param stream - The LocalVideoStreamState or RemoteVideoStreamState to dispose.
|
151
|
-
* @beta
|
152
|
-
*/
|
153
|
-
disposeView(callId: string, stream: CallFeatureStreamState): void;
|
122
|
+
disposeView(callId: string | undefined, participantId: CommunicationIdentifier | undefined, stream: LocalVideoStreamState | RemoteVideoStreamState | /* @conditional-compile-remove(together-mode) */ CallFeatureStreamState): void;
|
154
123
|
/**
|
155
124
|
* The CallAgent is used to handle calls.
|
156
125
|
* To create the CallAgent, pass a CommunicationTokenCredential object provided from SDK.
|
@@ -150,6 +150,10 @@ export const createStatefulCallClientWithDeps = (callClient, context, internalCo
|
|
150
150
|
Object.defineProperty(callClient, 'createView', {
|
151
151
|
configurable: false,
|
152
152
|
value: (callId, participantId, stream, options) => __awaiter(void 0, void 0, void 0, function* () {
|
153
|
+
/* @conditional-compile-remove(together-mode) */
|
154
|
+
if ('feature' in stream) {
|
155
|
+
return yield createCallFeatureView(context, internalContext, callId, stream, options);
|
156
|
+
}
|
153
157
|
const participantIdKind = participantId ? getIdentifierKind(participantId) : undefined;
|
154
158
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
155
159
|
// We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.
|
@@ -160,28 +164,17 @@ export const createStatefulCallClientWithDeps = (callClient, context, internalCo
|
|
160
164
|
return result;
|
161
165
|
})
|
162
166
|
});
|
163
|
-
/* @conditional-compile-remove(together-mode) */
|
164
|
-
Object.defineProperty(callClient, 'createCallFeatureView', {
|
165
|
-
configurable: false,
|
166
|
-
value: (callId, stream, options) => __awaiter(void 0, void 0, void 0, function* () {
|
167
|
-
const result = yield createCallFeatureView(context, internalContext, callId, stream, options);
|
168
|
-
return result;
|
169
|
-
})
|
170
|
-
});
|
171
167
|
Object.defineProperty(callClient, 'disposeView', {
|
172
168
|
configurable: false,
|
173
169
|
value: (callId, participantId, stream) => {
|
170
|
+
/* @conditional-compile-remove(together-mode) */
|
171
|
+
if ('feature' in stream) {
|
172
|
+
disposeCallFeatureView(context, internalContext, callId, stream);
|
173
|
+
}
|
174
174
|
const participantIdKind = participantId ? getIdentifierKind(participantId) : undefined;
|
175
175
|
disposeView(context, internalContext, callId, participantIdKind, stream);
|
176
176
|
}
|
177
177
|
});
|
178
|
-
/* @conditional-compile-remove(together-mode) */
|
179
|
-
Object.defineProperty(callClient, 'disposeCallFeatureView', {
|
180
|
-
configurable: false,
|
181
|
-
value: (callId, stream) => {
|
182
|
-
disposeCallFeatureView(context, internalContext, callId, stream);
|
183
|
-
}
|
184
|
-
});
|
185
178
|
const newStatefulCallClient = new Proxy(callClient, new ProxyCallClient(context, internalContext));
|
186
179
|
// Populate initial state
|
187
180
|
newStatefulCallClient.feature(Features.DebugInfo).getEnvironmentInfo();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StatefulCallClient.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/StatefulCallClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,UAAU,EAIV,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAwB,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAwD,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACtH,OAAO,EACL,6BAA6B,EAC7B,iBAAiB,EAElB,gCAAgC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAA6B,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAEnG,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,gDAAgD;AAChD,OAAO,EAAE,UAAU,IAAI,qBAAqB,EAAE,WAAW,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAwMtH;;;;GAIG;AACH,MAAM,eAAe;IAOnB,YAAY,OAAoB,EAAE,eAAoC;QACpE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC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AE,IAAI,mCAAI,EAAE,CAAC;IAC9C,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,CAAC,CAAC;IAC1D,uCACK,OAAO,KACV,WAAW,kCACN,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KACvB,IAAI,OAEN;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { deviceManagerDeclaratify } from './DeviceManagerDeclarative';\nimport {\n CallClient,\n CallClientOptions,\n CreateViewOptions,\n DeviceManager,\n Features\n} from '@azure/communication-calling';\nimport { CallClientState, LocalVideoStreamState, RemoteVideoStreamState } from './CallClientState';\n/* @conditional-compile-remove(together-mode) */\nimport { CallFeatureStreamState } from './CallClientState';\nimport { CallContext } from './CallContext';\nimport { callAgentDeclaratify, DeclarativeCallAgent } from './CallAgentDeclarative';\nimport { InternalCallContext } from './InternalCallContext';\nimport { createView, disposeView, CreateViewResult } from './StreamUtils';\nimport { CommunicationIdentifier, CommunicationUserIdentifier, getIdentifierKind } from '@azure/communication-common';\nimport {\n toFlatCommunicationIdentifier,\n _getApplicationId,\n _TelemetryImplementationHint\n} from '@internal/acs-ui-common';\nimport { callingStatefulLogger } from './Logger';\nimport { DeclarativeTeamsCallAgent, teamsCallAgentDeclaratify } from './TeamsCallAgentDeclarative';\nimport { MicrosoftTeamsUserIdentifier } from '@azure/communication-common';\nimport { videoStreamRendererViewDeclaratify } from './VideoStreamRendererViewDeclarative';\n/* @conditional-compile-remove(together-mode) */\nimport { createView as createCallFeatureView, disposeView as disposeCallFeatureView } from './CallFeatureStreamUtils';\n\n/**\n * Defines the methods that allow CallClient {@link @azure/communication-calling#CallClient} to be used statefully.\n * The interface provides access to proxied state and also allows registering a handler for state change events. For\n * state definition see {@link CallClientState}.\n *\n * State change events are driven by:\n * - Returned data from {@link @azure/communication-calling#DeviceManager} APIs.\n * - Returned data from {@link @azure/communication-calling#CallAgent} APIs.\n * - Listeners automatically attached to various azure communication-calling objects:\n * - CallAgent 'incomingCall'\n * - CallAgent 'callsUpdated'\n * - DeviceManager 'videoDevicesUpdated'\n * - DeviceManager 'audioDevicesUpdated\n * - DeviceManager 'selectedMicrophoneChanged'\n * - DeviceManager 'selectedSpeakerChanged'\n * - Call 'stateChanged'\n * - Call 'idChanged'\n * - Call 'isMutedChanged'\n * - Call 'isScreenSharingOnChanged'\n * - Call 'remoteParticipantsUpdated'\n * - Call 'localVideoStreamsUpdated'\n * - IncomingCall 'callEnded'\n * - RemoteParticipant 'stateChanged'\n * - RemoteParticipant 'isMutedChanged'\n * - RemoteParticipant 'displayNameChanged'\n * - RemoteParticipant 'isSpeakingChanged'\n * - RemoteParticipant 'videoStreamsUpdated'\n * - RemoteVideoStream 'isAvailableChanged'\n * - TranscriptionCallFeature 'isTranscriptionActiveChanged'\n * - RecordingCallFeature 'isRecordingActiveChanged'\n * - LocalRecordingCallFeature 'isLocalRecordingActiveChanged'\n * - RaiseHandCallFeature 'raisedHandEvent'\n * - RaiseHandCallFeature 'loweredHandEvent'\n * - PPTLiveCallFeature 'isAciveChanged'\n * - ReactionCallFeature 'reaction'\n *\n * @public\n */\nexport interface StatefulCallClient extends CallClient {\n /**\n * Holds all the state that we could proxy from CallClient {@link @azure/communication-calling#CallClient} as\n * CallClientState {@link CallClientState}.\n */\n getState(): CallClientState;\n /**\n * Allows a handler to be registered for 'stateChanged' events.\n *\n * @param handler - Callback to receive the state.\n */\n onStateChange(handler: (state: CallClientState) => void): void;\n /**\n * Allows unregistering for 'stateChanged' events.\n *\n * @param handler - Original callback to be unsubscribed.\n */\n offStateChange(handler: (state: CallClientState) => void): void;\n /**\n * Renders a {@link RemoteVideoStreamState} or {@link LocalVideoStreamState} and stores the resulting\n * {@link VideoStreamRendererViewState} under the relevant {@link RemoteVideoStreamState} or\n * {@link LocalVideoStreamState} or as unparented view in the state. Under the hood calls\n * {@link @azure/communication-calling#VideoStreamRenderer.createView}.\n *\n * Scenario 1: Render RemoteVideoStreamState\n * - CallId is required, participantId is required, and stream of type RemoteVideoStreamState is required\n * - Resulting {@link VideoStreamRendererViewState} is stored in the given callId and participantId in\n * {@link CallClientState}\n *\n * Scenario 2: Render LocalVideoStreamState for a call\n * - CallId is required, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n * - The {@link @azure/communication-calling#Call.localVideoStreams} must already be started using\n * {@link @azure/communication-calling#Call.startVideo}.\n * - Resulting {@link VideoStreamRendererViewState} is stored in the given callId {@link CallState.localVideoStreams}\n * in {@link CallClientState}.\n *\n * - Scenario 2: Render LocalVideoStreamState not part of a call (example rendering camera for local preview)\n * - CallId must be undefined, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n * - Resulting {@link VideoStreamRendererViewState} is stored in under the given LocalVideoStreamState in\n * {@link CallClientState.deviceManager.unparentedViews}\n *\n * @param callId - CallId for the given stream. Can be undefined if the stream is not part of any call.\n * @param participantId - {@link RemoteParticipant.identifier} associated with the given RemoteVideoStreamState. Could\n * be undefined if rendering LocalVideoStreamState.\n * @param stream - The LocalVideoStreamState or RemoteVideoStreamState to start rendering.\n * @param options - Options that are passed to the {@link @azure/communication-calling#VideoStreamRenderer}.\n */\n createView(\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState,\n options?: CreateViewOptions\n ): Promise<CreateViewResult | undefined>;\n /**\n * Stops rendering a {@link RemoteVideoStreamState} or {@link LocalVideoStreamState} and removes the\n * {@link VideoStreamRendererView} from the relevant {@link RemoteVideoStreamState} in {@link CallClientState} or\n * {@link LocalVideoStream} in {@link CallClientState} or appropriate\n * {@link CallClientState.deviceManager.unparentedViews} Under the hood calls\n * {@link @azure/communication-calling#VideoStreamRenderer.dispose}.\n *\n * Its important to disposeView to clean up resources properly.\n *\n * Scenario 1: Dispose RemoteVideoStreamState\n * - CallId is required, participantId is required, and stream of type RemoteVideoStreamState is required\n *\n * Scenario 2: Dispose LocalVideoStreamState for a call\n * - CallId is required, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n *\n * - Scenario 2: Dispose LocalVideoStreamState not part of a call\n * - CallId must be undefined, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n * - LocalVideoStreamState must be the original one passed to createView.\n *\n * @param callId - CallId for the given stream. Can be undefined if the stream is not part of any call.\n * @param participantId - {@link RemoteParticipant.identifier} associated with the given RemoteVideoStreamState. Could\n * be undefined if disposing LocalVideoStreamState.\n * @param stream - The LocalVideoStreamState or RemoteVideoStreamState to dispose.\n */\n disposeView(\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState\n ): void;\n\n /* @conditional-compile-remove(together-mode) */\n /**\n * Renders a {@link CallFeatureStreamState}\n * {@link VideoStreamRendererViewState} under the relevant {@link CallFeatureStreamState}\n * {@link @azure/communication-calling#VideoStreamRenderer.createView}.\n *\n * Scenario 1: Render CallFeatureStreamState\n * - CallId is required and stream of type CallFeatureStreamState is required\n * - Resulting {@link VideoStreamRendererViewState} is stored in the given callId and participantId in\n * {@link CallClientState}\n *\n * @param callId - CallId for the given stream. Can be undefined if the stream is not part of any call.\n * @param stream - The LocalVideoStreamState or RemoteVideoStreamState to start rendering.\n * @param options - Options that are passed to the {@link @azure/communication-calling#VideoStreamRenderer}.\n * @beta\n */\n createView(\n callId: string,\n stream: CallFeatureStreamState,\n options?: CreateViewOptions\n ): Promise<CreateViewResult | undefined>;\n\n /* @conditional-compile-remove(together-mode) */\n /**\n * Stops rendering a {@link CallFeatureStreamState} and removes the\n * {@link VideoStreamRendererView} from the relevant {@link CallFeatureStreamState} in {@link CallClientState} or\n * {@link @azure/communication-calling#VideoStreamRenderer.dispose}.\n *\n * Its important to disposeView to clean up resources properly.\n *\n * Scenario 1: Dispose CallFeatureStreamState\n * - CallId is required and stream of type CallFeatureStreamState is required\n *\n * @param callId - CallId for the given stream. Can be undefined if the stream is not part of any call.\n * @param stream - The LocalVideoStreamState or RemoteVideoStreamState to dispose.\n * @beta\n */\n disposeView(callId: string, stream: CallFeatureStreamState): void;\n /**\n * The CallAgent is used to handle calls.\n * To create the CallAgent, pass a CommunicationTokenCredential object provided from SDK.\n * - The CallClient can only have one active CallAgent instance at a time.\n * - You can create a new CallClient instance to create a new CallAgent.\n * - You can dispose of a CallClient's current active CallAgent, and call the CallClient's\n * createCallAgent() method again to create a new CallAgent.\n * @param tokenCredential - The token credential. Use AzureCommunicationTokenCredential from `@azure/communication-common` to create a credential.\n * @param options - The CallAgentOptions for additional options like display name.\n * @public\n */\n createCallAgent(...args: Parameters<CallClient['createCallAgent']>): Promise<DeclarativeCallAgent>;\n\n /**\n * The TeamsCallAgent is used to handle calls.\n * To create the TeamsCallAgent, pass a CommunicationTokenCredential object provided from SDK.\n * - The CallClient can only have one active TeamsCallAgent instance at a time.\n * - You can create a new CallClient instance to create a new TeamsCallAgent.\n * - You can dispose of a CallClient's current active TeamsCallAgent, and call the CallClient's\n * createTeamsCallAgent() method again to create a new TeamsCallAgent.\n * @param tokenCredential - The token credential. Use AzureCommunicationTokenCredential from `@azure/communication-common` to create a credential.\n * @param options - The TeamsCallAgentOptions for additional options like display name.\n * @public\n */\n createTeamsCallAgent(...args: Parameters<CallClient['createTeamsCallAgent']>): Promise<DeclarativeTeamsCallAgent>;\n}\n\n/**\n * A function to modify the state of the StatefulCallClient.\n *\n * Provided as a callback to the {@link StatefulCallClient.modifyState} method.\n *\n * The function must modify the provided state in place as much as possible.\n * Making large modifications can lead to bad performance by causing spurious rerendering of the UI.\n *\n * Consider using commonly used modifier functions exported from this package.\n */\nexport type CallStateModifier = (state: CallClientState) => void;\n\n/**\n * ProxyCallClient proxies CallClient {@link @azure/communication-calling#CallClient} and subscribes to all events that\n * affect state. ProxyCallClient keeps its own copy of the call state and when state is updated, ProxyCallClient emits\n * the event 'stateChanged'.\n */\nclass ProxyCallClient implements ProxyHandler<CallClient> {\n private _context: CallContext;\n private _internalContext: InternalCallContext;\n private _callAgent: DeclarativeCallAgent | DeclarativeTeamsCallAgent | undefined;\n private _deviceManager: DeviceManager | undefined;\n private _sdkDeviceManager: DeviceManager | undefined;\n\n constructor(context: CallContext, internalContext: InternalCallContext) {\n this._context = context;\n this._internalContext = internalContext;\n }\n\n public get<P extends keyof CallClient>(target: CallClient, prop: P): any {\n switch (prop) {\n case 'createCallAgent': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<CallClient['createCallAgent']>): Promise<DeclarativeCallAgent> => {\n // createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous\n // callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative\n // callAgent if the createCallAgent succeeds.\n const callAgent = await target.createCallAgent(...args);\n this._callAgent = callAgentDeclaratify(callAgent, this._context, this._internalContext);\n this._context.setCallAgent({\n displayName: this._callAgent.displayName\n });\n return this._callAgent;\n },\n 'CallClient.createCallAgent'\n );\n }\n case 'createTeamsCallAgent': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<CallClient['createTeamsCallAgent']>): Promise<DeclarativeTeamsCallAgent> => {\n // createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous\n // callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative\n // callAgent if the createCallAgent succeeds.\n const callAgent = await target.createTeamsCallAgent(...args);\n this._callAgent = teamsCallAgentDeclaratify(callAgent, this._context, this._internalContext);\n this._context.setCallAgent({\n displayName: undefined\n });\n return this._callAgent;\n },\n 'CallClient.createTeamsCallAgent'\n );\n }\n case 'getDeviceManager': {\n return this._context.withAsyncErrorTeedToState(async () => {\n // As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of\n // DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll\n // throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.\n const deviceManager = await target.getDeviceManager();\n if (this._sdkDeviceManager) {\n if (this._sdkDeviceManager === deviceManager) {\n return this._deviceManager;\n } else {\n throw new Error(\n 'Multiple DeviceManager not supported. This means a incompatible version of communication-calling is ' +\n 'used OR calling declarative was not properly updated to communication-calling version.'\n );\n }\n } else {\n this._sdkDeviceManager = deviceManager;\n }\n this._deviceManager = deviceManagerDeclaratify(deviceManager, this._context, this._internalContext);\n return this._deviceManager;\n }, 'CallClient.getDeviceManager');\n }\n case 'feature': {\n return this._context.withErrorTeedToState((...args: Parameters<CallClient['feature']>) => {\n if (args[0] === Features.DebugInfo) {\n const feature = target.feature(Features.DebugInfo);\n /**\n * add to this object if we want to proxy anything else off the DebugInfo feature object.\n */\n return {\n ...feature,\n getEnvironmentInfo: async () => {\n const environmentInfo = await feature.getEnvironmentInfo();\n this._context.setEnvironmentInfo(environmentInfo);\n return environmentInfo;\n }\n };\n }\n return Reflect.get(target, prop);\n }, 'CallClient.feature');\n }\n default:\n return Reflect.get(target, prop);\n }\n }\n}\n\n/**\n * Arguments to construct the StatefulCallClient.\n *\n * @public\n */\nexport type StatefulCallClientArgs = {\n /**\n * UserId from SDK. This is provided for developer convenience to easily access the userId from the\n * state. It is not used by StatefulCallClient.\n */\n userId: CommunicationUserIdentifier | MicrosoftTeamsUserIdentifier;\n};\n\n/**\n * Options to construct the StatefulCallClient with.\n *\n * @public\n */\nexport type StatefulCallClientOptions = {\n /**\n * Options to construct the {@link @axure/communication-calling#CallClient} with.\n */\n callClientOptions: CallClientOptions;\n /**\n * Sets the max listeners limit of the 'stateChange' event. Defaults to the node.js EventEmitter.defaultMaxListeners\n * if not specified.\n */\n maxStateChangeListeners?: number;\n};\n\n/**\n * Creates a StatefulCallClient {@link StatefulCallClient} by proxying CallClient\n * {@link @azure/communication-calling#CallClient} with ProxyCallClient {@link ProxyCallClient} which then allows access\n * to state in a declarative way.\n *\n * It is important to use the {@link @azure/communication-calling#DeviceManager} and\n * {@link @azure/communication-calling#CallAgent} and {@link @azure/communication-calling#Call} (and etc.) that are\n * obtained from the StatefulCallClient in order for their state changes to be proxied properly.\n *\n * @param args - {@link StatefulCallClientArgs}\n * @param options - {@link StatefulCallClientOptions}\n *\n * @public\n */\nexport const createStatefulCallClient = (\n args: StatefulCallClientArgs,\n options?: StatefulCallClientOptions\n): StatefulCallClient => {\n return _createStatefulCallClientInner(args, options);\n};\n\n/**\n * This inner function is used to allow injection of TelemetryImplementationHint without changing the public API.\n *\n * @internal\n */\nexport const _createStatefulCallClientInner = (\n args: StatefulCallClientArgs,\n options?: StatefulCallClientOptions,\n telemetryImplementationHint: _TelemetryImplementationHint = 'StatefulComponents'\n): StatefulCallClient => {\n callingStatefulLogger.info(\n `Creating calling stateful client using library version: ${_getApplicationId(telemetryImplementationHint)}`\n );\n return createStatefulCallClientWithDeps(\n new CallClient(withTelemetryTag(telemetryImplementationHint, options?.callClientOptions)),\n new CallContext(getIdentifierKind(args.userId), options?.maxStateChangeListeners),\n new InternalCallContext()\n );\n};\n\n/**\n * Package-internal version of createStatefulCallClient that allows dependency injection.\n *\n * This function should not be exported from the package.\n */\nexport const createStatefulCallClientWithDeps = (\n callClient: CallClient,\n context: CallContext,\n internalContext: InternalCallContext\n): StatefulCallClient => {\n Object.defineProperty(callClient, 'getState', {\n configurable: false,\n value: () => context.getState()\n });\n Object.defineProperty(callClient, 'onStateChange', {\n configurable: false,\n value: (handler: (state: CallClientState) => void) => context.onStateChange(handler)\n });\n Object.defineProperty(callClient, 'offStateChange', {\n configurable: false,\n value: (handler: (state: CallClientState) => void) => context.offStateChange(handler)\n });\n Object.defineProperty(callClient, 'createView', {\n configurable: false,\n value: async (\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState,\n options?: CreateViewOptions\n ): Promise<CreateViewResult | undefined> => {\n const participantIdKind = participantId ? getIdentifierKind(participantId) : undefined;\n const result = await createView(context, internalContext, callId, participantIdKind, stream, options);\n // We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.\n if ('id' in stream && callId && participantId && result) {\n const participantKey = toFlatCommunicationIdentifier(participantId);\n result.view = videoStreamRendererViewDeclaratify(result.view, context, callId, participantKey, stream.id);\n }\n return result;\n }\n });\n /* @conditional-compile-remove(together-mode) */\n Object.defineProperty(callClient, 'createCallFeatureView', {\n configurable: false,\n value: async (\n callId: string | undefined,\n stream: CallFeatureStreamState,\n options?: CreateViewOptions\n ): Promise<CreateViewResult | undefined> => {\n const result = await createCallFeatureView(context, internalContext, callId, stream, options);\n return result;\n }\n });\n Object.defineProperty(callClient, 'disposeView', {\n configurable: false,\n value: (\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState\n ): void => {\n const participantIdKind = participantId ? getIdentifierKind(participantId) : undefined;\n disposeView(context, internalContext, callId, participantIdKind, stream);\n }\n });\n /* @conditional-compile-remove(together-mode) */\n Object.defineProperty(callClient, 'disposeCallFeatureView', {\n configurable: false,\n value: (callId: string | undefined, stream: CallFeatureStreamState): void => {\n disposeCallFeatureView(context, internalContext, callId, stream);\n }\n });\n\n const newStatefulCallClient = new Proxy(\n callClient,\n new ProxyCallClient(context, internalContext)\n ) as StatefulCallClient;\n\n // Populate initial state\n newStatefulCallClient.feature(Features.DebugInfo).getEnvironmentInfo();\n\n return newStatefulCallClient;\n};\n\nconst withTelemetryTag = (\n telemetryImplementationHint: _TelemetryImplementationHint,\n options?: CallClientOptions\n): CallClientOptions => {\n const tags = options?.diagnostics?.tags ?? [];\n tags.push(_getApplicationId(telemetryImplementationHint));\n return {\n ...options,\n diagnostics: {\n ...options?.diagnostics,\n tags\n }\n };\n};\n"]}
|
1
|
+
{"version":3,"file":"StatefulCallClient.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/StatefulCallClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,UAAU,EAIV,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,O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AC,CAAC;IAEH,MAAM,qBAAqB,GAAG,IAAI,KAAK,CACrC,UAAU,EACV,IAAI,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,CACxB,CAAC;IAExB,yBAAyB;IACzB,qBAAqB,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,kBAAkB,EAAE,CAAC;IAEvE,OAAO,qBAAqB,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CACvB,2BAAyD,EACzD,OAA2B,EACR,EAAE;;IACrB,MAAM,IAAI,GAAG,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,0CAAE,IAAI,mCAAI,EAAE,CAAC;IAC9C,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,CAAC,CAAC;IAC1D,uCACK,OAAO,KACV,WAAW,kCACN,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KACvB,IAAI,OAEN;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { deviceManagerDeclaratify } from './DeviceManagerDeclarative';\nimport {\n CallClient,\n CallClientOptions,\n CreateViewOptions,\n DeviceManager,\n Features\n} from '@azure/communication-calling';\nimport { CallClientState, LocalVideoStreamState, RemoteVideoStreamState } from './CallClientState';\n/* @conditional-compile-remove(together-mode) */\nimport { CallFeatureStreamState } from './CallClientState';\nimport { CallContext } from './CallContext';\nimport { callAgentDeclaratify, DeclarativeCallAgent } from './CallAgentDeclarative';\nimport { InternalCallContext } from './InternalCallContext';\nimport { createView, disposeView, CreateViewResult } from './StreamUtils';\nimport { CommunicationIdentifier, CommunicationUserIdentifier, getIdentifierKind } from '@azure/communication-common';\nimport {\n toFlatCommunicationIdentifier,\n _getApplicationId,\n _TelemetryImplementationHint\n} from '@internal/acs-ui-common';\nimport { callingStatefulLogger } from './Logger';\nimport { DeclarativeTeamsCallAgent, teamsCallAgentDeclaratify } from './TeamsCallAgentDeclarative';\nimport { MicrosoftTeamsUserIdentifier } from '@azure/communication-common';\nimport { videoStreamRendererViewDeclaratify } from './VideoStreamRendererViewDeclarative';\n/* @conditional-compile-remove(together-mode) */\nimport { createView as createCallFeatureView, disposeView as disposeCallFeatureView } from './CallFeatureStreamUtils';\n\n/**\n * Defines the methods that allow CallClient {@link @azure/communication-calling#CallClient} to be used statefully.\n * The interface provides access to proxied state and also allows registering a handler for state change events. For\n * state definition see {@link CallClientState}.\n *\n * State change events are driven by:\n * - Returned data from {@link @azure/communication-calling#DeviceManager} APIs.\n * - Returned data from {@link @azure/communication-calling#CallAgent} APIs.\n * - Listeners automatically attached to various azure communication-calling objects:\n * - CallAgent 'incomingCall'\n * - CallAgent 'callsUpdated'\n * - DeviceManager 'videoDevicesUpdated'\n * - DeviceManager 'audioDevicesUpdated\n * - DeviceManager 'selectedMicrophoneChanged'\n * - DeviceManager 'selectedSpeakerChanged'\n * - Call 'stateChanged'\n * - Call 'idChanged'\n * - Call 'isMutedChanged'\n * - Call 'isScreenSharingOnChanged'\n * - Call 'remoteParticipantsUpdated'\n * - Call 'localVideoStreamsUpdated'\n * - IncomingCall 'callEnded'\n * - RemoteParticipant 'stateChanged'\n * - RemoteParticipant 'isMutedChanged'\n * - RemoteParticipant 'displayNameChanged'\n * - RemoteParticipant 'isSpeakingChanged'\n * - RemoteParticipant 'videoStreamsUpdated'\n * - RemoteVideoStream 'isAvailableChanged'\n * - TranscriptionCallFeature 'isTranscriptionActiveChanged'\n * - RecordingCallFeature 'isRecordingActiveChanged'\n * - LocalRecordingCallFeature 'isLocalRecordingActiveChanged'\n * - RaiseHandCallFeature 'raisedHandEvent'\n * - RaiseHandCallFeature 'loweredHandEvent'\n * - PPTLiveCallFeature 'isAciveChanged'\n * - ReactionCallFeature 'reaction'\n *\n * @public\n */\nexport interface StatefulCallClient extends CallClient {\n /**\n * Holds all the state that we could proxy from CallClient {@link @azure/communication-calling#CallClient} as\n * CallClientState {@link CallClientState}.\n */\n getState(): CallClientState;\n /**\n * Allows a handler to be registered for 'stateChanged' events.\n *\n * @param handler - Callback to receive the state.\n */\n onStateChange(handler: (state: CallClientState) => void): void;\n /**\n * Allows unregistering for 'stateChanged' events.\n *\n * @param handler - Original callback to be unsubscribed.\n */\n offStateChange(handler: (state: CallClientState) => void): void;\n /**\n * Renders a {@link RemoteVideoStreamState} or {@link LocalVideoStreamState} and stores the resulting\n * {@link VideoStreamRendererViewState} under the relevant {@link RemoteVideoStreamState} or\n * {@link LocalVideoStreamState} or as unparented view in the state. Under the hood calls\n * {@link @azure/communication-calling#VideoStreamRenderer.createView}.\n *\n * Scenario 1: Render RemoteVideoStreamState\n * - CallId is required, participantId is required, and stream of type RemoteVideoStreamState is required\n * - Resulting {@link VideoStreamRendererViewState} is stored in the given callId and participantId in\n * {@link CallClientState}\n *\n * Scenario 2: Render LocalVideoStreamState for a call\n * - CallId is required, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n * - The {@link @azure/communication-calling#Call.localVideoStreams} must already be started using\n * {@link @azure/communication-calling#Call.startVideo}.\n * - Resulting {@link VideoStreamRendererViewState} is stored in the given callId {@link CallState.localVideoStreams}\n * in {@link CallClientState}.\n *\n * - Scenario 2: Render LocalVideoStreamState not part of a call (example rendering camera for local preview)\n * - CallId must be undefined, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n * - Resulting {@link VideoStreamRendererViewState} is stored in under the given LocalVideoStreamState in\n * {@link CallClientState.deviceManager.unparentedViews}\n *\n * @param callId - CallId for the given stream. Can be undefined if the stream is not part of any call.\n * @param participantId - {@link RemoteParticipant.identifier} associated with the given RemoteVideoStreamState. Could\n * be undefined if rendering LocalVideoStreamState.\n * @param stream - The LocalVideoStreamState or RemoteVideoStreamState to start rendering.\n * @param options - Options that are passed to the {@link @azure/communication-calling#VideoStreamRenderer}.\n */\n createView(\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream:\n | LocalVideoStreamState\n | RemoteVideoStreamState\n | /* @conditional-compile-remove(together-mode) */ CallFeatureStreamState,\n options?: CreateViewOptions\n ): Promise<CreateViewResult | undefined>;\n /**\n * Stops rendering a {@link RemoteVideoStreamState} or {@link LocalVideoStreamState} and removes the\n * {@link VideoStreamRendererView} from the relevant {@link RemoteVideoStreamState} in {@link CallClientState} or\n * {@link LocalVideoStream} in {@link CallClientState} or appropriate\n * {@link CallClientState.deviceManager.unparentedViews} Under the hood calls\n * {@link @azure/communication-calling#VideoStreamRenderer.dispose}.\n *\n * Its important to disposeView to clean up resources properly.\n *\n * Scenario 1: Dispose RemoteVideoStreamState\n * - CallId is required, participantId is required, and stream of type RemoteVideoStreamState is required\n *\n * Scenario 2: Dispose LocalVideoStreamState for a call\n * - CallId is required, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n *\n * - Scenario 2: Dispose LocalVideoStreamState not part of a call\n * - CallId must be undefined, participantId must be undefined, and stream of type LocalVideoStreamState is required.\n * - LocalVideoStreamState must be the original one passed to createView.\n *\n * @param callId - CallId for the given stream. Can be undefined if the stream is not part of any call.\n * @param participantId - {@link RemoteParticipant.identifier} associated with the given RemoteVideoStreamState. Could\n * be undefined if disposing LocalVideoStreamState.\n * @param stream - The LocalVideoStreamState or RemoteVideoStreamState to dispose.\n */\n disposeView(\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream:\n | LocalVideoStreamState\n | RemoteVideoStreamState\n | /* @conditional-compile-remove(together-mode) */ CallFeatureStreamState\n ): void;\n /**\n * The CallAgent is used to handle calls.\n * To create the CallAgent, pass a CommunicationTokenCredential object provided from SDK.\n * - The CallClient can only have one active CallAgent instance at a time.\n * - You can create a new CallClient instance to create a new CallAgent.\n * - You can dispose of a CallClient's current active CallAgent, and call the CallClient's\n * createCallAgent() method again to create a new CallAgent.\n * @param tokenCredential - The token credential. Use AzureCommunicationTokenCredential from `@azure/communication-common` to create a credential.\n * @param options - The CallAgentOptions for additional options like display name.\n * @public\n */\n createCallAgent(...args: Parameters<CallClient['createCallAgent']>): Promise<DeclarativeCallAgent>;\n\n /**\n * The TeamsCallAgent is used to handle calls.\n * To create the TeamsCallAgent, pass a CommunicationTokenCredential object provided from SDK.\n * - The CallClient can only have one active TeamsCallAgent instance at a time.\n * - You can create a new CallClient instance to create a new TeamsCallAgent.\n * - You can dispose of a CallClient's current active TeamsCallAgent, and call the CallClient's\n * createTeamsCallAgent() method again to create a new TeamsCallAgent.\n * @param tokenCredential - The token credential. Use AzureCommunicationTokenCredential from `@azure/communication-common` to create a credential.\n * @param options - The TeamsCallAgentOptions for additional options like display name.\n * @public\n */\n createTeamsCallAgent(...args: Parameters<CallClient['createTeamsCallAgent']>): Promise<DeclarativeTeamsCallAgent>;\n}\n\n/**\n * A function to modify the state of the StatefulCallClient.\n *\n * Provided as a callback to the {@link StatefulCallClient.modifyState} method.\n *\n * The function must modify the provided state in place as much as possible.\n * Making large modifications can lead to bad performance by causing spurious rerendering of the UI.\n *\n * Consider using commonly used modifier functions exported from this package.\n */\nexport type CallStateModifier = (state: CallClientState) => void;\n\n/**\n * ProxyCallClient proxies CallClient {@link @azure/communication-calling#CallClient} and subscribes to all events that\n * affect state. ProxyCallClient keeps its own copy of the call state and when state is updated, ProxyCallClient emits\n * the event 'stateChanged'.\n */\nclass ProxyCallClient implements ProxyHandler<CallClient> {\n private _context: CallContext;\n private _internalContext: InternalCallContext;\n private _callAgent: DeclarativeCallAgent | DeclarativeTeamsCallAgent | undefined;\n private _deviceManager: DeviceManager | undefined;\n private _sdkDeviceManager: DeviceManager | undefined;\n\n constructor(context: CallContext, internalContext: InternalCallContext) {\n this._context = context;\n this._internalContext = internalContext;\n }\n\n public get<P extends keyof CallClient>(target: CallClient, prop: P): any {\n switch (prop) {\n case 'createCallAgent': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<CallClient['createCallAgent']>): Promise<DeclarativeCallAgent> => {\n // createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous\n // callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative\n // callAgent if the createCallAgent succeeds.\n const callAgent = await target.createCallAgent(...args);\n this._callAgent = callAgentDeclaratify(callAgent, this._context, this._internalContext);\n this._context.setCallAgent({\n displayName: this._callAgent.displayName\n });\n return this._callAgent;\n },\n 'CallClient.createCallAgent'\n );\n }\n case 'createTeamsCallAgent': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<CallClient['createTeamsCallAgent']>): Promise<DeclarativeTeamsCallAgent> => {\n // createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous\n // callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative\n // callAgent if the createCallAgent succeeds.\n const callAgent = await target.createTeamsCallAgent(...args);\n this._callAgent = teamsCallAgentDeclaratify(callAgent, this._context, this._internalContext);\n this._context.setCallAgent({\n displayName: undefined\n });\n return this._callAgent;\n },\n 'CallClient.createTeamsCallAgent'\n );\n }\n case 'getDeviceManager': {\n return this._context.withAsyncErrorTeedToState(async () => {\n // As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of\n // DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll\n // throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.\n const deviceManager = await target.getDeviceManager();\n if (this._sdkDeviceManager) {\n if (this._sdkDeviceManager === deviceManager) {\n return this._deviceManager;\n } else {\n throw new Error(\n 'Multiple DeviceManager not supported. This means a incompatible version of communication-calling is ' +\n 'used OR calling declarative was not properly updated to communication-calling version.'\n );\n }\n } else {\n this._sdkDeviceManager = deviceManager;\n }\n this._deviceManager = deviceManagerDeclaratify(deviceManager, this._context, this._internalContext);\n return this._deviceManager;\n }, 'CallClient.getDeviceManager');\n }\n case 'feature': {\n return this._context.withErrorTeedToState((...args: Parameters<CallClient['feature']>) => {\n if (args[0] === Features.DebugInfo) {\n const feature = target.feature(Features.DebugInfo);\n /**\n * add to this object if we want to proxy anything else off the DebugInfo feature object.\n */\n return {\n ...feature,\n getEnvironmentInfo: async () => {\n const environmentInfo = await feature.getEnvironmentInfo();\n this._context.setEnvironmentInfo(environmentInfo);\n return environmentInfo;\n }\n };\n }\n return Reflect.get(target, prop);\n }, 'CallClient.feature');\n }\n default:\n return Reflect.get(target, prop);\n }\n }\n}\n\n/**\n * Arguments to construct the StatefulCallClient.\n *\n * @public\n */\nexport type StatefulCallClientArgs = {\n /**\n * UserId from SDK. This is provided for developer convenience to easily access the userId from the\n * state. It is not used by StatefulCallClient.\n */\n userId: CommunicationUserIdentifier | MicrosoftTeamsUserIdentifier;\n};\n\n/**\n * Options to construct the StatefulCallClient with.\n *\n * @public\n */\nexport type StatefulCallClientOptions = {\n /**\n * Options to construct the {@link @axure/communication-calling#CallClient} with.\n */\n callClientOptions: CallClientOptions;\n /**\n * Sets the max listeners limit of the 'stateChange' event. Defaults to the node.js EventEmitter.defaultMaxListeners\n * if not specified.\n */\n maxStateChangeListeners?: number;\n};\n\n/**\n * Creates a StatefulCallClient {@link StatefulCallClient} by proxying CallClient\n * {@link @azure/communication-calling#CallClient} with ProxyCallClient {@link ProxyCallClient} which then allows access\n * to state in a declarative way.\n *\n * It is important to use the {@link @azure/communication-calling#DeviceManager} and\n * {@link @azure/communication-calling#CallAgent} and {@link @azure/communication-calling#Call} (and etc.) that are\n * obtained from the StatefulCallClient in order for their state changes to be proxied properly.\n *\n * @param args - {@link StatefulCallClientArgs}\n * @param options - {@link StatefulCallClientOptions}\n *\n * @public\n */\nexport const createStatefulCallClient = (\n args: StatefulCallClientArgs,\n options?: StatefulCallClientOptions\n): StatefulCallClient => {\n return _createStatefulCallClientInner(args, options);\n};\n\n/**\n * This inner function is used to allow injection of TelemetryImplementationHint without changing the public API.\n *\n * @internal\n */\nexport const _createStatefulCallClientInner = (\n args: StatefulCallClientArgs,\n options?: StatefulCallClientOptions,\n telemetryImplementationHint: _TelemetryImplementationHint = 'StatefulComponents'\n): StatefulCallClient => {\n callingStatefulLogger.info(\n `Creating calling stateful client using library version: ${_getApplicationId(telemetryImplementationHint)}`\n );\n return createStatefulCallClientWithDeps(\n new CallClient(withTelemetryTag(telemetryImplementationHint, options?.callClientOptions)),\n new CallContext(getIdentifierKind(args.userId), options?.maxStateChangeListeners),\n new InternalCallContext()\n );\n};\n\n/**\n * Package-internal version of createStatefulCallClient that allows dependency injection.\n *\n * This function should not be exported from the package.\n */\nexport const createStatefulCallClientWithDeps = (\n callClient: CallClient,\n context: CallContext,\n internalContext: InternalCallContext\n): StatefulCallClient => {\n Object.defineProperty(callClient, 'getState', {\n configurable: false,\n value: () => context.getState()\n });\n Object.defineProperty(callClient, 'onStateChange', {\n configurable: false,\n value: (handler: (state: CallClientState) => void) => context.onStateChange(handler)\n });\n Object.defineProperty(callClient, 'offStateChange', {\n configurable: false,\n value: (handler: (state: CallClientState) => void) => context.offStateChange(handler)\n });\n Object.defineProperty(callClient, 'createView', {\n configurable: false,\n value: async (\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream:\n | LocalVideoStreamState\n | RemoteVideoStreamState\n | /* @conditional-compile-remove(together-mode) */ CallFeatureStreamState,\n options?: CreateViewOptions\n ): Promise<CreateViewResult | undefined> => {\n /* @conditional-compile-remove(together-mode) */\n if ('feature' in stream) {\n return await createCallFeatureView(context, internalContext, callId, stream, options);\n }\n const participantIdKind = participantId ? getIdentifierKind(participantId) : undefined;\n const result = await createView(context, internalContext, callId, participantIdKind, stream, options);\n // We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.\n if ('id' in stream && callId && participantId && result) {\n const participantKey = toFlatCommunicationIdentifier(participantId);\n result.view = videoStreamRendererViewDeclaratify(result.view, context, callId, participantKey, stream.id);\n }\n return result;\n }\n });\n Object.defineProperty(callClient, 'disposeView', {\n configurable: false,\n value: (\n callId: string | undefined,\n participantId: CommunicationIdentifier | undefined,\n stream:\n | LocalVideoStreamState\n | RemoteVideoStreamState\n | /* @conditional-compile-remove(together-mode) */ CallFeatureStreamState\n ): void => {\n /* @conditional-compile-remove(together-mode) */\n if ('feature' in stream) {\n disposeCallFeatureView(context, internalContext, callId, stream);\n }\n const participantIdKind = participantId ? getIdentifierKind(participantId) : undefined;\n disposeView(context, internalContext, callId, participantIdKind, stream);\n }\n });\n\n const newStatefulCallClient = new Proxy(\n callClient,\n new ProxyCallClient(context, internalContext)\n ) as StatefulCallClient;\n\n // Populate initial state\n newStatefulCallClient.feature(Features.DebugInfo).getEnvironmentInfo();\n\n return newStatefulCallClient;\n};\n\nconst withTelemetryTag = (\n telemetryImplementationHint: _TelemetryImplementationHint,\n options?: CallClientOptions\n): CallClientOptions => {\n const tags = options?.diagnostics?.tags ?? [];\n tags.push(_getApplicationId(telemetryImplementationHint));\n return {\n ...options,\n diagnostics: {\n ...options?.diagnostics,\n tags\n }\n };\n};\n"]}
|
@@ -44,7 +44,7 @@ export type { CameraAndMicrophoneSitePermissionsStrings, CameraAndMicrophoneSite
|
|
44
44
|
export type { ParticipantListStrings } from '../../react-components/src';
|
45
45
|
export type { MentionOptions, MentionDisplayOptions, MentionLookupOptions, Mention, MentionPopoverStrings } from '../../react-components/src';
|
46
46
|
export type { _IdentifierProviderProps, _Identifiers, ActiveErrorMessage, BaseCustomStyles, CallParticipantListParticipant, CameraButtonContextualMenuStyles, CameraButtonProps, CameraButtonStrings, CameraButtonStyles, ChatMessage, CommunicationParticipant, ComponentLocale, ComponentSlotStyle, ComponentStrings, ContentSystemMessage, ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles, ControlBarLayout, ControlBarProps, CreateVideoStreamViewResult, CustomAvatarOptions, CustomMessage, DevicesButtonContextualMenuStyles, DevicesButtonProps, DevicesButtonStrings, DevicesButtonStyles, EndCallButtonProps, EndCallButtonStrings, ErrorBarProps, ErrorBarStrings, ErrorType, GridLayoutProps, GridLayoutStyles, HorizontalGalleryStyles, JumpToNewMessageButtonProps, LocalizationProviderProps, LocalVideoCameraCycleButtonProps, LoadingState, Message, MessageAttachedStatus, MessageCommon, MessageContentType, MessageProps, MessageRenderer, MessageStatusIndicatorProps, MessageStatusIndicatorStrings, MessageThreadProps, MessageThreadStrings, MessageThreadStyles, MicrophoneButtonContextualMenuStyles, MicrophoneButtonProps, MicrophoneButtonStrings, MicrophoneButtonStyles, OnRenderAvatarCallback, OptionsDevice, ParticipantAddedSystemMessage, ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles, ParticipantListItemStyles, ParticipantListParticipant, ParticipantListProps, ParticipantListStyles, ParticipantMenuItemsCallback, ParticipantRemovedSystemMessage, ParticipantState, ParticipantsButtonContextualMenuStyles, ParticipantsButtonProps, ParticipantsButtonStrings, ParticipantsButtonStyles, ReadReceiptsBySenderId, ScreenShareButtonProps, ScreenShareButtonStrings, SendBoxProps, SendBoxStrings, SendBoxStylesProps, StreamMediaProps, SystemMessage, SystemMessageCommon, TopicUpdatedSystemMessage, TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps, UpdateMessageCallback, CancelEditCallback, VideoGalleryLayout, VideoGalleryLocalParticipant, VideoGalleryParticipant, VideoGalleryProps, VideoGalleryRemoteParticipant, VideoGalleryStream, VideoGalleryStrings, VideoGalleryStyles, VideoStreamOptions, VideoTileProps, VideoTileStylesProps, ViewScalingMode, VideoTileContextualMenuProps, VideoTileDrawerMenuProps, VideoTilesOptions } from '../../react-components/src';
|
47
|
-
export type { TogetherModeStreamViewResult } from '../../react-components/src';
|
47
|
+
export type { TogetherModeStreamViewResult, VideoGalleryTogetherModeStreams, VideoGalleryTogetherModeParticipantPosition, VideoGalleryTogetherModeSeatingInfo, TogetherModeStreamOptions } from '../../react-components/src';
|
48
48
|
export type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';
|
49
49
|
export type { ReactionButtonStrings, Reaction, ReactionButtonProps, ReactionResources, ReactionSprite, ReactionButtonReaction } from '../../react-components/src';
|
50
50
|
export { ReactionButton } from '../../react-components/src';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"A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Ae,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AASzF,iDAAiD;AACjD,OAAO,EACL,kCAAkC,EAClC,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AA+IpC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,mDAAmD;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAqC7D,mDAAmD;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAiBzE,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAE/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAiB1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC;AAE9B,sDAAsD;AACtD,OAAO,EAAE,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;AAiBxE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAc7E,sCAAsC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAItD,sCAAsC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,sCAAsC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAQlF,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,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// 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 {\n DeepNoiseSuppressionEffectDependency,\n VideoBackgroundEffectsDependency,\n CallingHandlersOptions\n} 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\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\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';\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { NotificationStackSelector } from '../../calling-component-bindings/src';\nexport type { IncomingCallStackSelector } 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_CY_GB,\n COMPONENT_LOCALE_DE_DE,\n COMPONENT_LOCALE_ES_ES,\n COMPONENT_LOCALE_ES_MX,\n COMPONENT_LOCALE_FI_FI,\n COMPONENT_LOCALE_FR_FR,\n COMPONENT_LOCALE_FR_CA,\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';\nexport { HoldButton } from '../../react-components/src';\n\nexport { RaiseHandButton } from '../../react-components/src';\n\nexport { Dialpad } from '../../react-components/src';\n\nexport { IncomingCallNotification, IncomingCallStack } from '../../react-components/src';\nexport type {\n IncomingCallNotificationProps,\n IncomingCallNotificationStrings,\n IncomingCallNotificationStyles,\n IncomingCallStackProps,\n IncomingCallStackCall\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\n/* @conditional-compile-remove(together-mode) */\nexport type { TogetherModeStreamViewResult } 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 ReactionButtonReaction\n} from '../../react-components/src';\n\nexport { ReactionButton } 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(rich-text-editor-image-upload) */\nexport type { SendBoxErrorBarType } 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';\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 } from '../../react-components/src';\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';\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\nexport { NotificationStack, Notification } from '../../react-components/src';\n\nexport type {\n NotificationStackProps,\n NotificationProps,\n NotificationStrings,\n NotificationStackStrings,\n NotificationType,\n ActiveNotification,\n NotificationStyles\n} from '../../react-components/src';\nexport type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport type { RTTModalStrings, RTTModalProps } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport { RTTModal } from '../../react-components/src';\n\n/* @conditional-compile-remove(rtt) */\nexport type { RTTDisclosureBannerProps, RTTDisclosureBannerStrings } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport { RTTDisclosureBanner } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport type { RealTimeTextProps, RealTimeTextStrings } from '../../react-components/src/components/RealTimeText';\n/* @conditional-compile-remove(rtt) */\nexport { RealTimeText } from '../../react-components/src/components/RealTimeText';\n/* @conditional-compile-remove(media-access) */\nexport type { MediaAccess } from '../../react-components/src';\nexport type {\n CaptionsBannerProps,\n CaptionsInformation,\n CaptionsBannerStrings\n} from '../../react-components/src/components/CaptionsBanner';\nexport { CaptionsBanner } from '../../react-components/src/components/CaptionsBanner';\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;AA0CzG,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,iCAAiC,EAClC,MAAM,sCAAsC,CAAC;AAuB9C,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,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EAC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O,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAc7E,sCAAsC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAItD,sCAAsC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,sCAAsC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAQlF,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,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// 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 {\n DeepNoiseSuppressionEffectDependency,\n VideoBackgroundEffectsDependency,\n CallingHandlersOptions\n} 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\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\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';\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { NotificationStackSelector } from '../../calling-component-bindings/src';\nexport type { IncomingCallStackSelector } 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_CY_GB,\n COMPONENT_LOCALE_DE_DE,\n COMPONENT_LOCALE_ES_ES,\n COMPONENT_LOCALE_ES_MX,\n COMPONENT_LOCALE_FI_FI,\n COMPONENT_LOCALE_FR_FR,\n COMPONENT_LOCALE_FR_CA,\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';\nexport { HoldButton } from '../../react-components/src';\n\nexport { RaiseHandButton } from '../../react-components/src';\n\nexport { Dialpad } from '../../react-components/src';\n\nexport { IncomingCallNotification, IncomingCallStack } from '../../react-components/src';\nexport type {\n IncomingCallNotificationProps,\n IncomingCallNotificationStrings,\n IncomingCallNotificationStyles,\n IncomingCallStackProps,\n IncomingCallStackCall\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\n/* @conditional-compile-remove(together-mode) */\nexport type {\n TogetherModeStreamViewResult,\n VideoGalleryTogetherModeStreams,\n VideoGalleryTogetherModeParticipantPosition,\n VideoGalleryTogetherModeSeatingInfo,\n TogetherModeStreamOptions\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 ReactionButtonReaction\n} from '../../react-components/src';\n\nexport { ReactionButton } 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(rich-text-editor-image-upload) */\nexport type { SendBoxErrorBarType } 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';\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 } from '../../react-components/src';\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';\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\nexport { NotificationStack, Notification } from '../../react-components/src';\n\nexport type {\n NotificationStackProps,\n NotificationProps,\n NotificationStrings,\n NotificationStackStrings,\n NotificationType,\n ActiveNotification,\n NotificationStyles\n} from '../../react-components/src';\nexport type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport type { RTTModalStrings, RTTModalProps } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport { RTTModal } from '../../react-components/src';\n\n/* @conditional-compile-remove(rtt) */\nexport type { RTTDisclosureBannerProps, RTTDisclosureBannerStrings } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport { RTTDisclosureBanner } from '../../react-components/src';\n/* @conditional-compile-remove(rtt) */\nexport type { RealTimeTextProps, RealTimeTextStrings } from '../../react-components/src/components/RealTimeText';\n/* @conditional-compile-remove(rtt) */\nexport { RealTimeText } from '../../react-components/src/components/RealTimeText';\n/* @conditional-compile-remove(media-access) */\nexport type { MediaAccess } from '../../react-components/src';\nexport type {\n CaptionsBannerProps,\n CaptionsInformation,\n CaptionsBannerStrings\n} from '../../react-components/src/components/CaptionsBanner';\nexport { CaptionsBanner } from '../../react-components/src/components/CaptionsBanner';\n"]}
|
@@ -221,6 +221,10 @@ export interface NotificationStackStrings {
|
|
221
221
|
* Message shown in notification when breakout room is closing soon
|
222
222
|
*/
|
223
223
|
breakoutRoomClosingSoon?: NotificationStrings;
|
224
|
+
capabilityTurnVideoOnPresent?: NotificationStrings;
|
225
|
+
capabilityTurnVideoOnAbsent?: NotificationStrings;
|
226
|
+
capabilityUnmuteMicPresent?: NotificationStrings;
|
227
|
+
capabilityUnmuteMicAbsent?: NotificationStrings;
|
224
228
|
}
|
225
229
|
/**
|
226
230
|
* All notifications that can be shown in the {@link NotificationStack}.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NotificationStack.js","sourceRoot":"","sources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SAAS,EACrE,qBAAqB,EAAE,qBAAqB,CAAC,YAAY,CAAC,IAAI,CAAC,EAC/D,oBAAoB,EAAE,GAAG,EAAE,WAAC,OAAA,MAAA,YAAY,CAAC,oBAAoB,4DAAI,CAAA,EAAA,EACjE,sBAAsB,EAAE,GAAG,EAAE,WAAC,OAAA,MAAA,YAAY,CAAC,sBAAsB,4DAAI,CAAA,EAAA,EACrE,SAAS,EAAE,SAAS,EACpB,iBAAiB,EACf,KAAK,KAAK,sBAAsB,GAAG,CAAC,IAAI,mBAAmB,CAAC,MAAM,GAAG,sBAAsB,EAE7F,WAAW,EAAE,YAAY,CAAC,WAAW,EACrC,QAAQ,EAAE,YAAY,CAAC,QAAQ,GAC/B,CACE,CACP,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,yCAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport { Stack } from '@fluentui/react';\n\nimport { useLocale } from '../localization';\nimport {\n DismissedNotification,\n NotificationIconProps,\n dismissNotification,\n dropDismissalsForInactiveNotifications,\n notificationsToShow\n} from './utils';\nimport { Notification, NotificationStrings } from './Notification';\n\n/**\n * Props for {@link NotificationStack}.\n * @public\n */\nexport interface NotificationStackProps {\n /**\n * Strings shown on the UI on errors.\n */\n strings?: NotificationStackStrings;\n\n /**\n * Currently active notifications.\n */\n activeNotifications: ActiveNotification[];\n\n /**\n * Max notifications to show at a time.\n * @defaultValue 2\n */\n maxNotificationsToShow?: number;\n\n /**\n * Callback called when the dismiss button is triggered.\n * Use this to control notifications shown when they dismissed by the user.\n * Note this onDismiss function will affect all notifications in the same stack\n */\n onDismissNotification?: (dismissedNotification: ActiveNotification) => void;\n\n /**\n * If set, notifications with {@link ActiveNotification.timestamp} older than the time this component is mounted\n * are not shown.\n *\n * This is useful when using the {@link NotificationStack} with a stateful client that handles more than one call\n * or chat thread. Set this prop to ignore notifications from previous call or chat.\n *\n * @defaultValue false\n */\n ignorePremountNotifications?: boolean;\n}\n\n/**\n * All strings that may be shown on the UI in the {@link NotificationStack}.\n *\n * @public\n */\nexport interface NotificationStackStrings {\n /**\n * A generic message when starting video fails.\n */\n startVideoGeneric?: NotificationStrings;\n\n /**\n * A generic message when starting video fails.\n */\n stopVideoGeneric?: NotificationStrings;\n\n /**\n * A generic message when muting microphone fails.\n */\n muteGeneric?: NotificationStrings;\n\n /**\n * A generic message when unmuting microphone fails.\n */\n unmuteGeneric?: NotificationStrings;\n\n /**\n * A generic message when starting screenshare fails.\n */\n startScreenShareGeneric?: NotificationStrings;\n\n /**\n * A generic message when stopping screenshare fails.\n */\n stopScreenShareGeneric?: NotificationStrings;\n\n /**\n * Message shown when poor network quality is detected during a call.\n */\n callNetworkQualityLow?: NotificationStrings;\n /**\n * Message shown when poor network quality is detected during a teams meetings.\n * Contains actions to open phone info modal.\n */\n teamsMeetingCallNetworkQualityLow?: NotificationStrings;\n /**\n * Message shown on failure to detect audio output devices.\n */\n callNoSpeakerFound?: NotificationStrings;\n\n /**\n * Message shown on failure to detect audio input devices.\n */\n callNoMicrophoneFound?: NotificationStrings;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system.\n */\n callMicrophoneAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system, for safari browsers\n */\n callMicrophoneAccessDeniedSafari?: NotificationStrings;\n\n /**\n * Message shown when microphone is muted by the system (not by local or remote participants)\n */\n callMicrophoneMutedBySystem?: NotificationStrings;\n\n /**\n * Message shown when microphone is unmuted by the system (not by local or remote participants).\n * This typically occurs if the system recovers from an unexpected mute.\n */\n callMicrophoneUnmutedBySystem?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when microphone can be enumerated but access is\n * blocked by the system.\n */\n callMacOsMicrophoneAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when poor network causes local video stream to be frozen.\n */\n callLocalVideoFreeze?: NotificationStrings;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system.\n */\n callCameraAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system, for safari browsers\n */\n callCameraAccessDeniedSafari?: NotificationStrings;\n\n /**\n * Message shown when local video fails to start because camera is already in use by\n * another applciation.\n */\n callCameraAlreadyInUse?: NotificationStrings;\n\n /**\n * Message shown when local video is stopped by the system (not by local or remote participants)\n */\n callVideoStoppedBySystem?: NotificationStrings;\n\n /**\n * Message shown when local video was recovered by the system (not by the local participant)\n */\n callVideoRecoveredBySystem?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when system denies access to camera.\n */\n callMacOsCameraAccessDenied?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when system denies sharing local screen on a call.\n */\n callMacOsScreenShareAccessDenied?: NotificationStrings;\n\n /**\n * Dimiss Notifications button aria label read by screen reader accessibility tools\n */\n dismissButtonAriaLabel?: NotificationStrings;\n\n /**\n * An error message when joining a call fails.\n */\n failedToJoinCallGeneric?: NotificationStrings;\n\n /**\n * An error message when joining a call fails specifically due to an invalid meeting link.\n */\n failedToJoinCallInvalidMeetingLink?: NotificationStrings;\n /**\n * Error string letting you know remote participants see a frozen stream for you.\n */\n cameraFrozenForRemoteParticipants?: NotificationStrings;\n /**\n * Unable to start effect\n */\n unableToStartVideoEffect?: NotificationStrings;\n /**\n * An error message when starting spotlight while max participants are spotlighted\n */\n startSpotlightWhileMaxParticipantsAreSpotlighted?: NotificationStrings;\n /**\n * Muted by a remote participant message\n */\n mutedByRemoteParticipant?: NotificationStrings;\n /**\n * Speaking while muted message\n */\n speakingWhileMuted?: NotificationStrings;\n /**\n * Recording started message\n */\n recordingStarted?: NotificationStrings;\n /**\n * Transcription started message\n */\n transcriptionStarted?: NotificationStrings;\n /**\n * Recording stopped message\n */\n recordingStopped?: NotificationStrings;\n /**\n * Transcription stopped message\n */\n transcriptionStopped?: NotificationStrings;\n /**\n * Recording and transcription both started message\n */\n recordingAndTranscriptionStarted?: NotificationStrings;\n /**\n * Recording and transcription both stopped message\n */\n recordingAndTranscriptionStopped?: NotificationStrings;\n /**\n * Recording stopped but transcription still going on message\n */\n recordingStoppedStillTranscribing?: NotificationStrings;\n /**\n * Transcription stopped but recording still going on message\n */\n transcriptionStoppedStillRecording?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when the user will be automatically to their assigned breakout room that is opened\n */\n assignedBreakoutRoomOpened?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when the user is prompted to join their assigned breakout room that is opened\n */\n assignedBreakoutRoomOpenedPromptJoin?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when the user is assigned breakout room is changed\n */\n assignedBreakoutRoomChanged?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when breakout room is joined\n */\n breakoutRoomJoined?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when breakout room is closing soon\n */\n breakoutRoomClosingSoon?: NotificationStrings;\n}\n\n/**\n * All notifications that can be shown in the {@link NotificationStack}.\n *\n * @public\n */\nexport type NotificationType = keyof NotificationStackStrings;\n\n/**\n * Active notifications to be shown via {@link NotificationStack}.\n *\n * @public\n */\nexport interface ActiveNotification {\n /**\n * Type of error that is active.\n */\n type: NotificationType;\n /**\n * Callback called when the primary button inside notification bar is clicked.\n */\n onClickPrimaryButton?: () => void;\n\n /**\n * Callback called when the primary button inside notification bar is clicked.\n */\n onClickSecondaryButton?: () => void;\n\n /**\n * Callback called when the notification is dismissed.\n */\n onDismiss?: () => void;\n\n /**\n * If set, notification will automatically dismiss after 5 seconds\n */\n autoDismiss?: boolean;\n\n /**\n * The latest timestamp when this notification was observed.\n *\n * When available, this is used to track notifications that have already been seen and dismissed\n * by the user.\n */\n timestamp?: Date;\n\n /**\n * Aria-live property for the notification.\n * @defaultValue polite\n */\n ariaLive?: 'assertive' | 'off' | 'polite';\n}\n\n/**\n * A component to show notifications on the UI.\n * All strings that can be shown are accepted as the {@link NotificationStackProps.strings} so that they can be localized.\n * Active notifications are selected by {@link NotificationStackProps.activeNotifications}.\n *\n * This component internally tracks dismissed by the user.\n * * Notifications that have an associated timestamp: The notification is shown on the UI again if it occurs after being dismissed.\n * * Notifications that do not have a timestamp: The notification is dismissed until it disappears from the props.\n * If the notification recurs, it is shown in the UI.\n *\n *\n * @public\n */\nexport const NotificationStack = (props: NotificationStackProps): JSX.Element => {\n const localeStrings = useLocale().strings.notificationStack;\n const strings = props.strings ?? localeStrings;\n const maxNotificationsToShow = props.maxNotificationsToShow ?? 2;\n\n const trackDismissedNotificationsInternally = !props.onDismissNotification;\n\n // Timestamp for when this comopnent is first mounted.\n // Never updated through the lifecycle of this component.\n const mountTimestamp = useRef(new Date(Date.now()));\n\n const [dismissedNotifications, setDismissedNotifications] = useState<DismissedNotification[]>([]);\n\n // dropDismissalsForInactiveNotifications only returns a new object if `dismissedErrors` actually changes.\n // Without this behaviour, this `useEffect` block would cause a render loop.\n useEffect(() => {\n trackDismissedNotificationsInternally &&\n setDismissedNotifications(\n dropDismissalsForInactiveNotifications(props.activeNotifications, dismissedNotifications)\n );\n }, [props.activeNotifications, dismissedNotifications, trackDismissedNotificationsInternally]);\n\n const activeNotifications = notificationsToShow(\n props.activeNotifications,\n dismissedNotifications,\n props.ignorePremountNotifications ? mountTimestamp.current : undefined\n );\n\n return (\n <Stack\n data-ui-id=\"notifications-stack\"\n style={{\n width: 'fit-content'\n }}\n >\n {activeNotifications.map((notification, index) => {\n if (index < maxNotificationsToShow) {\n const onDismiss = (): void => {\n trackDismissedNotificationsInternally\n ? setDismissedNotifications(dismissNotification(dismissedNotifications, notification))\n : props.onDismissNotification?.(notification);\n notification.onDismiss && notification.onDismiss();\n };\n /* @conditional-compile-remove(breakout-rooms) */\n if (notification.type === 'assignedBreakoutRoomOpenedPromptJoin') {\n // If notification is of type assignedBreakoutRoomOpenedPromptJoin then set onClickSecondaryButton to\n // onDismiss if it is not defined\n notification.onClickSecondaryButton = notification.onClickSecondaryButton\n ? notification.onClickSecondaryButton\n : () => onDismiss();\n }\n return (\n <div key={index} style={{ marginBottom: `${index === maxNotificationsToShow - 1 ? 0 : '0.25rem'}` }}>\n <Notification\n notificationStrings={strings ? strings[notification.type] : undefined}\n notificationIconProps={NotificationIconProps(notification.type)}\n onClickPrimaryButton={() => notification.onClickPrimaryButton?.()}\n onClickSecondaryButton={() => notification.onClickSecondaryButton?.()}\n onDismiss={onDismiss}\n showStackedEffect={\n index === maxNotificationsToShow - 1 && activeNotifications.length > maxNotificationsToShow\n }\n autoDismiss={notification.autoDismiss}\n ariaLive={notification.ariaLive}\n />\n </div>\n );\n } else {\n return <></>;\n }\n })}\n </Stack>\n );\n};\n"]}
|
1
|
+
{"version":3,"file":"NotificationStack.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/NotificationStack.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAEL,qBAAqB,EACrB,mBAAmB,EACnB,sCAAsC,EACtC,mBAAmB,EACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAuB,MAAM,gBAAgB,CAAC;AAkUnE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;;IAC9E,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAC5D,MAAM,OAAO,GAAG,MAAA,KAAK,CAAC,OAAO,mCAAI,aAAa,CAAC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ef, useState } from 'react';\nimport { Stack } from '@fluentui/react';\n\nimport { useLocale } from '../localization';\nimport {\n DismissedNotification,\n NotificationIconProps,\n dismissNotification,\n dropDismissalsForInactiveNotifications,\n notificationsToShow\n} from './utils';\nimport { Notification, NotificationStrings } from './Notification';\n\n/**\n * Props for {@link NotificationStack}.\n * @public\n */\nexport interface NotificationStackProps {\n /**\n * Strings shown on the UI on errors.\n */\n strings?: NotificationStackStrings;\n\n /**\n * Currently active notifications.\n */\n activeNotifications: ActiveNotification[];\n\n /**\n * Max notifications to show at a time.\n * @defaultValue 2\n */\n maxNotificationsToShow?: number;\n\n /**\n * Callback called when the dismiss button is triggered.\n * Use this to control notifications shown when they dismissed by the user.\n * Note this onDismiss function will affect all notifications in the same stack\n */\n onDismissNotification?: (dismissedNotification: ActiveNotification) => void;\n\n /**\n * If set, notifications with {@link ActiveNotification.timestamp} older than the time this component is mounted\n * are not shown.\n *\n * This is useful when using the {@link NotificationStack} with a stateful client that handles more than one call\n * or chat thread. Set this prop to ignore notifications from previous call or chat.\n *\n * @defaultValue false\n */\n ignorePremountNotifications?: boolean;\n}\n\n/**\n * All strings that may be shown on the UI in the {@link NotificationStack}.\n *\n * @public\n */\nexport interface NotificationStackStrings {\n /**\n * A generic message when starting video fails.\n */\n startVideoGeneric?: NotificationStrings;\n\n /**\n * A generic message when starting video fails.\n */\n stopVideoGeneric?: NotificationStrings;\n\n /**\n * A generic message when muting microphone fails.\n */\n muteGeneric?: NotificationStrings;\n\n /**\n * A generic message when unmuting microphone fails.\n */\n unmuteGeneric?: NotificationStrings;\n\n /**\n * A generic message when starting screenshare fails.\n */\n startScreenShareGeneric?: NotificationStrings;\n\n /**\n * A generic message when stopping screenshare fails.\n */\n stopScreenShareGeneric?: NotificationStrings;\n\n /**\n * Message shown when poor network quality is detected during a call.\n */\n callNetworkQualityLow?: NotificationStrings;\n /**\n * Message shown when poor network quality is detected during a teams meetings.\n * Contains actions to open phone info modal.\n */\n teamsMeetingCallNetworkQualityLow?: NotificationStrings;\n /**\n * Message shown on failure to detect audio output devices.\n */\n callNoSpeakerFound?: NotificationStrings;\n\n /**\n * Message shown on failure to detect audio input devices.\n */\n callNoMicrophoneFound?: NotificationStrings;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system.\n */\n callMicrophoneAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system, for safari browsers\n */\n callMicrophoneAccessDeniedSafari?: NotificationStrings;\n\n /**\n * Message shown when microphone is muted by the system (not by local or remote participants)\n */\n callMicrophoneMutedBySystem?: NotificationStrings;\n\n /**\n * Message shown when microphone is unmuted by the system (not by local or remote participants).\n * This typically occurs if the system recovers from an unexpected mute.\n */\n callMicrophoneUnmutedBySystem?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when microphone can be enumerated but access is\n * blocked by the system.\n */\n callMacOsMicrophoneAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when poor network causes local video stream to be frozen.\n */\n callLocalVideoFreeze?: NotificationStrings;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system.\n */\n callCameraAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system, for safari browsers\n */\n callCameraAccessDeniedSafari?: NotificationStrings;\n\n /**\n * Message shown when local video fails to start because camera is already in use by\n * another applciation.\n */\n callCameraAlreadyInUse?: NotificationStrings;\n\n /**\n * Message shown when local video is stopped by the system (not by local or remote participants)\n */\n callVideoStoppedBySystem?: NotificationStrings;\n\n /**\n * Message shown when local video was recovered by the system (not by the local participant)\n */\n callVideoRecoveredBySystem?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when system denies access to camera.\n */\n callMacOsCameraAccessDenied?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when system denies sharing local screen on a call.\n */\n callMacOsScreenShareAccessDenied?: NotificationStrings;\n\n /**\n * Dimiss Notifications button aria label read by screen reader accessibility tools\n */\n dismissButtonAriaLabel?: NotificationStrings;\n\n /**\n * An error message when joining a call fails.\n */\n failedToJoinCallGeneric?: NotificationStrings;\n\n /**\n * An error message when joining a call fails specifically due to an invalid meeting link.\n */\n failedToJoinCallInvalidMeetingLink?: NotificationStrings;\n /**\n * Error string letting you know remote participants see a frozen stream for you.\n */\n cameraFrozenForRemoteParticipants?: NotificationStrings;\n /**\n * Unable to start effect\n */\n unableToStartVideoEffect?: NotificationStrings;\n /**\n * An error message when starting spotlight while max participants are spotlighted\n */\n startSpotlightWhileMaxParticipantsAreSpotlighted?: NotificationStrings;\n /**\n * Muted by a remote participant message\n */\n mutedByRemoteParticipant?: NotificationStrings;\n /**\n * Speaking while muted message\n */\n speakingWhileMuted?: NotificationStrings;\n /**\n * Recording started message\n */\n recordingStarted?: NotificationStrings;\n /**\n * Transcription started message\n */\n transcriptionStarted?: NotificationStrings;\n /**\n * Recording stopped message\n */\n recordingStopped?: NotificationStrings;\n /**\n * Transcription stopped message\n */\n transcriptionStopped?: NotificationStrings;\n /**\n * Recording and transcription both started message\n */\n recordingAndTranscriptionStarted?: NotificationStrings;\n /**\n * Recording and transcription both stopped message\n */\n recordingAndTranscriptionStopped?: NotificationStrings;\n /**\n * Recording stopped but transcription still going on message\n */\n recordingStoppedStillTranscribing?: NotificationStrings;\n /**\n * Transcription stopped but recording still going on message\n */\n transcriptionStoppedStillRecording?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when the user will be automatically to their assigned breakout room that is opened\n */\n assignedBreakoutRoomOpened?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when the user is prompted to join their assigned breakout room that is opened\n */\n assignedBreakoutRoomOpenedPromptJoin?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when the user is assigned breakout room is changed\n */\n assignedBreakoutRoomChanged?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when breakout room is joined\n */\n breakoutRoomJoined?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when breakout room is closing soon\n */\n breakoutRoomClosingSoon?: NotificationStrings;\n\n /* @conditional-compile-remove(media-access) */\n capabilityTurnVideoOnPresent?: NotificationStrings;\n\n /* @conditional-compile-remove(media-access) */\n capabilityTurnVideoOnAbsent?: NotificationStrings;\n\n /* @conditional-compile-remove(media-access) */\n capabilityUnmuteMicPresent?: NotificationStrings;\n\n /* @conditional-compile-remove(media-access) */\n capabilityUnmuteMicAbsent?: NotificationStrings;\n}\n\n/**\n * All notifications that can be shown in the {@link NotificationStack}.\n *\n * @public\n */\nexport type NotificationType = keyof NotificationStackStrings;\n\n/**\n * Active notifications to be shown via {@link NotificationStack}.\n *\n * @public\n */\nexport interface ActiveNotification {\n /**\n * Type of error that is active.\n */\n type: NotificationType;\n /**\n * Callback called when the primary button inside notification bar is clicked.\n */\n onClickPrimaryButton?: () => void;\n\n /**\n * Callback called when the primary button inside notification bar is clicked.\n */\n onClickSecondaryButton?: () => void;\n\n /**\n * Callback called when the notification is dismissed.\n */\n onDismiss?: () => void;\n\n /**\n * If set, notification will automatically dismiss after 5 seconds\n */\n autoDismiss?: boolean;\n\n /**\n * The latest timestamp when this notification was observed.\n *\n * When available, this is used to track notifications that have already been seen and dismissed\n * by the user.\n */\n timestamp?: Date;\n\n /**\n * Aria-live property for the notification.\n * @defaultValue polite\n */\n ariaLive?: 'assertive' | 'off' | 'polite';\n}\n\n/**\n * A component to show notifications on the UI.\n * All strings that can be shown are accepted as the {@link NotificationStackProps.strings} so that they can be localized.\n * Active notifications are selected by {@link NotificationStackProps.activeNotifications}.\n *\n * This component internally tracks dismissed by the user.\n * * Notifications that have an associated timestamp: The notification is shown on the UI again if it occurs after being dismissed.\n * * Notifications that do not have a timestamp: The notification is dismissed until it disappears from the props.\n * If the notification recurs, it is shown in the UI.\n *\n *\n * @public\n */\nexport const NotificationStack = (props: NotificationStackProps): JSX.Element => {\n const localeStrings = useLocale().strings.notificationStack;\n const strings = props.strings ?? localeStrings;\n const maxNotificationsToShow = props.maxNotificationsToShow ?? 2;\n\n const trackDismissedNotificationsInternally = !props.onDismissNotification;\n\n // Timestamp for when this comopnent is first mounted.\n // Never updated through the lifecycle of this component.\n const mountTimestamp = useRef(new Date(Date.now()));\n\n const [dismissedNotifications, setDismissedNotifications] = useState<DismissedNotification[]>([]);\n\n // dropDismissalsForInactiveNotifications only returns a new object if `dismissedErrors` actually changes.\n // Without this behaviour, this `useEffect` block would cause a render loop.\n useEffect(() => {\n trackDismissedNotificationsInternally &&\n setDismissedNotifications(\n dropDismissalsForInactiveNotifications(props.activeNotifications, dismissedNotifications)\n );\n }, [props.activeNotifications, dismissedNotifications, trackDismissedNotificationsInternally]);\n\n const activeNotifications = notificationsToShow(\n props.activeNotifications,\n dismissedNotifications,\n props.ignorePremountNotifications ? mountTimestamp.current : undefined\n );\n\n return (\n <Stack\n data-ui-id=\"notifications-stack\"\n style={{\n width: 'fit-content'\n }}\n >\n {activeNotifications.map((notification, index) => {\n if (index < maxNotificationsToShow) {\n const onDismiss = (): void => {\n trackDismissedNotificationsInternally\n ? setDismissedNotifications(dismissNotification(dismissedNotifications, notification))\n : props.onDismissNotification?.(notification);\n notification.onDismiss && notification.onDismiss();\n };\n /* @conditional-compile-remove(breakout-rooms) */\n if (notification.type === 'assignedBreakoutRoomOpenedPromptJoin') {\n // If notification is of type assignedBreakoutRoomOpenedPromptJoin then set onClickSecondaryButton to\n // onDismiss if it is not defined\n notification.onClickSecondaryButton = notification.onClickSecondaryButton\n ? notification.onClickSecondaryButton\n : () => onDismiss();\n }\n return (\n <div key={index} style={{ marginBottom: `${index === maxNotificationsToShow - 1 ? 0 : '0.25rem'}` }}>\n <Notification\n notificationStrings={strings ? strings[notification.type] : undefined}\n notificationIconProps={NotificationIconProps(notification.type)}\n onClickPrimaryButton={() => notification.onClickPrimaryButton?.()}\n onClickSecondaryButton={() => notification.onClickSecondaryButton?.()}\n onDismiss={onDismiss}\n showStackedEffect={\n index === maxNotificationsToShow - 1 && activeNotifications.length > maxNotificationsToShow\n }\n autoDismiss={notification.autoDismiss}\n ariaLive={notification.ariaLive}\n />\n </div>\n );\n } else {\n return <></>;\n }\n })}\n </Stack>\n );\n};\n"]}
|
@@ -1,11 +1,18 @@
|
|
1
|
-
import type { PluginEvent, EditorPlugin } from 'roosterjs-content-model-types';
|
1
|
+
import type { PluginEvent, EditorPlugin, IEditor } from 'roosterjs-content-model-types';
|
2
2
|
/**
|
3
3
|
* KeyboardInputPlugin is a plugin for handling keyboard events in the editor.
|
4
4
|
*/
|
5
5
|
export declare class KeyboardInputPlugin implements EditorPlugin {
|
6
|
+
private editor;
|
7
|
+
private disposer;
|
6
8
|
onKeyDown?: ((event: KeyboardEvent) => void) | null;
|
9
|
+
onCompositionUpdate?: (() => void) | null;
|
7
10
|
getName(): string;
|
8
|
-
|
11
|
+
/**
|
12
|
+
* Initialize this plugin
|
13
|
+
* @param editor The editor instance
|
14
|
+
*/
|
15
|
+
initialize(editor: IEditor): void;
|
9
16
|
dispose(): void;
|
10
17
|
onPluginEvent(event: PluginEvent): void;
|
11
18
|
}
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js
CHANGED
@@ -6,14 +6,32 @@ import { PluginEventType } from '../../utils/RichTextEditorUtils';
|
|
6
6
|
*/
|
7
7
|
export class KeyboardInputPlugin {
|
8
8
|
constructor() {
|
9
|
+
this.editor = null;
|
10
|
+
this.disposer = null;
|
9
11
|
// don't set callback in constructor to be able to update callback without plugin recreation
|
10
12
|
this.onKeyDown = null;
|
13
|
+
this.onCompositionUpdate = null;
|
11
14
|
}
|
12
15
|
getName() {
|
13
16
|
return 'KeyboardInputPlugin';
|
14
17
|
}
|
15
|
-
|
16
|
-
|
18
|
+
/**
|
19
|
+
* Initialize this plugin
|
20
|
+
* @param editor The editor instance
|
21
|
+
*/
|
22
|
+
initialize(editor) {
|
23
|
+
this.editor = editor;
|
24
|
+
this.disposer = this.editor.attachDomEvent({
|
25
|
+
compositionupdate: { beforeDispatch: this.onCompositionUpdate }
|
26
|
+
});
|
27
|
+
}
|
28
|
+
dispose() {
|
29
|
+
this.editor = null;
|
30
|
+
if (this.disposer) {
|
31
|
+
this.disposer();
|
32
|
+
this.disposer = null;
|
33
|
+
}
|
34
|
+
}
|
17
35
|
onPluginEvent(event) {
|
18
36
|
if (this.onKeyDown && event.eventType === PluginEventType.KeyDown && event.rawEvent instanceof KeyboardEvent) {
|
19
37
|
this.onKeyDown(event.rawEvent);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"KeyboardInputPlugin.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAAhC;
|
1
|
+
{"version":3,"file":"KeyboardInputPlugin.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAAhC;QACU,WAAM,GAAmB,IAAI,CAAC;QAC9B,aAAQ,GAAwB,IAAI,CAAC;QAC7C,4FAA4F;QAC5F,cAAS,GAA6C,IAAI,CAAC;QAC3D,wBAAmB,GAAyB,IAAI,CAAC;IA8BnD,CAAC;IA5BC,OAAO;QACL,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACD;;;OAGG;IACH,UAAU,CAAC,MAAe;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;YACzC,iBAAiB,EAAE,EAAE,cAAc,EAAE,IAAI,CAAC,mBAAmB,EAAE;SAChE,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAEnB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvB,CAAC;IACH,CAAC;IAED,aAAa,CAAC,KAAkB;QAC9B,IAAI,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,KAAK,eAAe,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ,YAAY,aAAa,EAAE,CAAC;YAC7G,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { PluginEvent, EditorPlugin, IEditor } from 'roosterjs-content-model-types';\nimport { PluginEventType } from '../../utils/RichTextEditorUtils';\n\n/**\n * KeyboardInputPlugin is a plugin for handling keyboard events in the editor.\n */\nexport class KeyboardInputPlugin implements EditorPlugin {\n private editor: IEditor | null = null;\n private disposer: (() => void) | null = null;\n // don't set callback in constructor to be able to update callback without plugin recreation\n onKeyDown?: ((event: KeyboardEvent) => void) | null = null;\n onCompositionUpdate?: (() => void) | null = null;\n\n getName(): string {\n return 'KeyboardInputPlugin';\n }\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n initialize(editor: IEditor): void {\n this.editor = editor;\n this.disposer = this.editor.attachDomEvent({\n compositionupdate: { beforeDispatch: this.onCompositionUpdate }\n });\n }\n\n dispose(): void {\n this.editor = null;\n\n if (this.disposer) {\n this.disposer();\n this.disposer = null;\n }\n }\n\n onPluginEvent(event: PluginEvent): void {\n if (this.onKeyDown && event.eventType === PluginEventType.KeyDown && event.rawEvent instanceof KeyboardEvent) {\n this.onKeyDown(event.rawEvent);\n }\n }\n}\n"]}
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts
CHANGED
@@ -6,10 +6,12 @@ import type { IEditor } from 'roosterjs-content-model-types';
|
|
6
6
|
export declare class PlaceholderPlugin extends WatermarkPlugin {
|
7
7
|
private isPlaceholderShown;
|
8
8
|
private editorValue;
|
9
|
+
private disposer;
|
9
10
|
updatePlaceholder(placeholder: string): void;
|
10
11
|
initialize(editor: IEditor): void;
|
11
12
|
dispose(): void;
|
12
13
|
protected show(editor: IEditor): void;
|
13
14
|
protected hide(editor: IEditor): void;
|
15
|
+
private onCompositionStart;
|
14
16
|
}
|
15
17
|
//# sourceMappingURL=PlaceholderPlugin.d.ts.map
|
package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js
CHANGED
@@ -9,6 +9,13 @@ export class PlaceholderPlugin extends WatermarkPlugin {
|
|
9
9
|
super(...arguments);
|
10
10
|
this.isPlaceholderShown = false;
|
11
11
|
this.editorValue = null;
|
12
|
+
this.disposer = null;
|
13
|
+
this.onCompositionStart = () => {
|
14
|
+
if (this.editorValue && this.isPlaceholderShown) {
|
15
|
+
// Hide the placeholder when composition starts
|
16
|
+
this.hide(this.editorValue);
|
17
|
+
}
|
18
|
+
};
|
12
19
|
}
|
13
20
|
updatePlaceholder(placeholder) {
|
14
21
|
this.watermark = placeholder;
|
@@ -25,9 +32,16 @@ export class PlaceholderPlugin extends WatermarkPlugin {
|
|
25
32
|
// Hide/show the placeholder as workaround for the placeholder not hiding in some cases
|
26
33
|
this.hide(this.editorValue);
|
27
34
|
this.show(this.editorValue);
|
35
|
+
this.disposer = this.editorValue.attachDomEvent({
|
36
|
+
compositionstart: { beforeDispatch: this.onCompositionStart }
|
37
|
+
});
|
28
38
|
}
|
29
39
|
dispose() {
|
30
40
|
this.editorValue = null;
|
41
|
+
if (this.disposer) {
|
42
|
+
this.disposer();
|
43
|
+
this.disposer = null;
|
44
|
+
}
|
31
45
|
super.dispose();
|
32
46
|
}
|
33
47
|
show(editor) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PlaceholderPlugin.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,eAAe;IAAtD;;QACU,uBAAkB,GAAY,KAAK,CAAC;QACpC,gBAAW,GAAmB,IAAI,CAAC;
|
1
|
+
{"version":3,"file":"PlaceholderPlugin.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,eAAe;IAAtD;;QACU,uBAAkB,GAAY,KAAK,CAAC;QACpC,gBAAW,GAAmB,IAAI,CAAC;QACnC,aAAQ,GAAwB,IAAI,CAAC;QA0CrC,uBAAkB,GAAG,GAAS,EAAE;YACtC,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBAChD,+CAA+C;gBAC/C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;IA9CC,iBAAiB,CAAC,WAAmB;QACnC,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC;QAC7B,uDAAuD;QACvD,mEAAmE;QACnE,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAChD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IACD,UAAU,CAAC,MAAe;QACxB,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;QAC1B,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAEzB,uFAAuF;QACvF,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAE5B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC;YAC9C,gBAAgB,EAAE,EAAE,cAAc,EAAE,IAAI,CAAC,kBAAkB,EAAE;SAC9D,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvB,CAAC;QACD,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC;IAES,IAAI,CAAC,MAAe;QAC5B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;IACjC,CAAC;IACS,IAAI,CAAC,MAAe;QAC5B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClC,CAAC;CAQF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { WatermarkPlugin } from 'roosterjs-content-model-plugins';\nimport type { IEditor } from 'roosterjs-content-model-types';\n\n/**\n * PlaceholderPlugin is a plugin for displaying placeholder and handle localization for it in the editor.\n */\nexport class PlaceholderPlugin extends WatermarkPlugin {\n private isPlaceholderShown: boolean = false;\n private editorValue: IEditor | null = null;\n private disposer: (() => void) | null = null;\n\n updatePlaceholder(placeholder: string): void {\n this.watermark = placeholder;\n // hide and show the placeholder to show the latest one\n // this needs to be done only if the placeholder is currently shown\n if (this.editorValue && this.isPlaceholderShown) {\n this.hide(this.editorValue);\n this.show(this.editorValue);\n }\n }\n initialize(editor: IEditor): void {\n this.editorValue = editor;\n super.initialize(editor);\n\n // Hide/show the placeholder as workaround for the placeholder not hiding in some cases\n this.hide(this.editorValue);\n this.show(this.editorValue);\n\n this.disposer = this.editorValue.attachDomEvent({\n compositionstart: { beforeDispatch: this.onCompositionStart }\n });\n }\n\n dispose(): void {\n this.editorValue = null;\n if (this.disposer) {\n this.disposer();\n this.disposer = null;\n }\n super.dispose();\n }\n\n protected show(editor: IEditor): void {\n super.show(editor);\n this.isPlaceholderShown = true;\n }\n protected hide(editor: IEditor): void {\n super.hide(editor);\n this.isPlaceholderShown = false;\n }\n\n private onCompositionStart = (): void => {\n if (this.editorValue && this.isPlaceholderShown) {\n // Hide the placeholder when composition starts\n this.hide(this.editorValue);\n }\n };\n}\n"]}
|