@azure/communication-react 1.18.0-alpha-202407050014 → 1.18.0-alpha-202407090014
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 +131 -28
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DeZQ3bKG.js → ChatMessageComponentAsRichTextEditBox-RrIa2t97.js} +62 -17
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-RrIa2t97.js.map +1 -0
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-D63MoVhd.js → RichTextSendBoxWrapper-Bz_1ebsD.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-D63MoVhd.js.map → RichTextSendBoxWrapper-Bz_1ebsD.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-xFes8-H4.js → index-DGXoGo4W.js} +1041 -579
- package/dist/dist-cjs/communication-react/index-DGXoGo4W.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/common.d.ts +13 -0
- package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +6 -0
- package/dist/dist-esm/acs-ui-common/src/dataConversion.js +17 -0
- package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +1 -0
- package/dist/dist-esm/acs-ui-common/src/index.d.ts +2 -0
- package/dist/dist-esm/acs-ui-common/src/index.js +2 -0
- package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +3 -0
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +57 -4
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +34 -8
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js +3 -0
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +1 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +7 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +62 -15
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +1 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageStatusIndicatorInternal.js +1 -1
- package/dist/dist-esm/react-components/src/components/MessageStatusIndicatorInternal.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +18 -0
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +58 -26
- package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +6 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +27 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +27 -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 +2 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +24 -12
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +6 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +13 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +57 -27
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js +4 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +18 -0
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +6 -3
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +20 -0
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +81 -0
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils.js +16 -1
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +42 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -0
- package/dist/dist-esm/react-components/src/theming/icons.js +4 -0
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/Attachment.d.ts +4 -0
- package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +65 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +8 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +6 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +5 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackErrors.d.ts +6 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackErrors.js +22 -20
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackErrors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +47 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +104 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +22 -0
- 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 +13 -0
- 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/CallWithChatBackedChatAdapter.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +16 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +47 -18
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +20 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/image-upload/useImageUpload.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/image-upload/useImageUpload.js +129 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/image-upload/useImageUpload.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +4 -3
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -0
- package/package.json +2 -2
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-DeZQ3bKG.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-xFes8-H4.js.map +0 -1
@@ -175,7 +175,7 @@ function getDefaultExportFromCjs (x) {
|
|
175
175
|
// Copyright (c) Microsoft Corporation.
|
176
176
|
// Licensed under the MIT License.
|
177
177
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
178
|
-
var telemetryVersion = '1.18.0-alpha-
|
178
|
+
var telemetryVersion = '1.18.0-alpha-202407090014';
|
179
179
|
|
180
180
|
|
181
181
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -343,6 +343,23 @@ function _getKeys(obj) {
|
|
343
343
|
return Object.keys(obj);
|
344
344
|
}
|
345
345
|
|
346
|
+
// Copyright (c) Microsoft Corporation.
|
347
|
+
// Licensed under the MIT License.
|
348
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
349
|
+
/**
|
350
|
+
* Convert a base64 string to a Blob.
|
351
|
+
* @internal
|
352
|
+
*/
|
353
|
+
const _base64ToBlob = (dataURI) => {
|
354
|
+
const byteString = atob(dataURI.split(',')[1]);
|
355
|
+
const arrayBuffer = new ArrayBuffer(byteString.length);
|
356
|
+
const uint8Array = new Uint8Array(arrayBuffer);
|
357
|
+
for (let i = 0; i < byteString.length; i++) {
|
358
|
+
uint8Array[i] = byteString.charCodeAt(i);
|
359
|
+
}
|
360
|
+
return new Blob([arrayBuffer]);
|
361
|
+
};
|
362
|
+
|
346
363
|
// Copyright (c) Microsoft Corporation.
|
347
364
|
// Licensed under the MIT License.
|
348
365
|
/**
|
@@ -512,7 +529,7 @@ const getSupportedSpokenLanguages = (state, props) => {
|
|
512
529
|
|
513
530
|
// Copyright (c) Microsoft Corporation.
|
514
531
|
// Licensed under the MIT License.
|
515
|
-
var __awaiter$
|
532
|
+
var __awaiter$T = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
516
533
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
517
534
|
return new (P || (P = Promise))(function (resolve, reject) {
|
518
535
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -551,7 +568,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
551
568
|
*
|
552
569
|
* @private
|
553
570
|
*/
|
554
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
571
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$T(void 0, void 0, void 0, function* () {
|
555
572
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
556
573
|
for (const view of unparentedViews) {
|
557
574
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -728,7 +745,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
728
745
|
|
729
746
|
// Copyright (c) Microsoft Corporation.
|
730
747
|
// Licensed under the MIT License.
|
731
|
-
var __awaiter$
|
748
|
+
var __awaiter$S = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
732
749
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
733
750
|
return new (P || (P = Promise))(function (resolve, reject) {
|
734
751
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -749,7 +766,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
749
766
|
* @private
|
750
767
|
*/
|
751
768
|
const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager, call, options) => {
|
752
|
-
const onStartLocalVideo = () => __awaiter$
|
769
|
+
const onStartLocalVideo = () => __awaiter$S(void 0, void 0, void 0, function* () {
|
753
770
|
// Before the call object creates a stream, dispose of any local preview streams.
|
754
771
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
755
772
|
// of disposing and creating a new stream?
|
@@ -769,7 +786,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
769
786
|
yield call.startVideo(stream);
|
770
787
|
}
|
771
788
|
});
|
772
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
789
|
+
const onStopLocalVideo = (stream) => __awaiter$S(void 0, void 0, void 0, function* () {
|
773
790
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
774
791
|
if (!callId) {
|
775
792
|
return;
|
@@ -778,7 +795,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
778
795
|
yield call.stopVideo(stream);
|
779
796
|
}
|
780
797
|
});
|
781
|
-
const onToggleCamera = (options) => __awaiter$
|
798
|
+
const onToggleCamera = (options) => __awaiter$S(void 0, void 0, void 0, function* () {
|
782
799
|
const previewOn = _isPreviewOn(callClient.getState().deviceManager);
|
783
800
|
// the disposal of the unparented views is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
|
784
801
|
// The root cause of the issue is caused by never transitioning the unparented view to the
|
@@ -835,19 +852,19 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
835
852
|
}
|
836
853
|
}
|
837
854
|
});
|
838
|
-
const onSelectMicrophone = (device) => __awaiter$
|
855
|
+
const onSelectMicrophone = (device) => __awaiter$S(void 0, void 0, void 0, function* () {
|
839
856
|
if (!deviceManager) {
|
840
857
|
return;
|
841
858
|
}
|
842
859
|
return deviceManager.selectMicrophone(device);
|
843
860
|
});
|
844
|
-
const onSelectSpeaker = (device) => __awaiter$
|
861
|
+
const onSelectSpeaker = (device) => __awaiter$S(void 0, void 0, void 0, function* () {
|
845
862
|
if (!deviceManager) {
|
846
863
|
return;
|
847
864
|
}
|
848
865
|
return deviceManager.selectSpeaker(device);
|
849
866
|
});
|
850
|
-
const onSelectCamera = (device, options) => __awaiter$
|
867
|
+
const onSelectCamera = (device, options) => __awaiter$S(void 0, void 0, void 0, function* () {
|
851
868
|
if (!deviceManager) {
|
852
869
|
return;
|
853
870
|
}
|
@@ -877,9 +894,9 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
877
894
|
}, options);
|
878
895
|
}
|
879
896
|
});
|
880
|
-
const onRaiseHand = () => __awaiter$
|
881
|
-
const onLowerHand = () => __awaiter$
|
882
|
-
const onToggleRaiseHand = () => __awaiter$
|
897
|
+
const onRaiseHand = () => __awaiter$S(void 0, void 0, void 0, function* () { var _a; return yield ((_a = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand)) === null || _a === void 0 ? void 0 : _a.raiseHand()); });
|
898
|
+
const onLowerHand = () => __awaiter$S(void 0, void 0, void 0, function* () { var _b; return yield ((_b = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand)) === null || _b === void 0 ? void 0 : _b.lowerHand()); });
|
899
|
+
const onToggleRaiseHand = () => __awaiter$S(void 0, void 0, void 0, function* () {
|
883
900
|
const raiseHandFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand);
|
884
901
|
const localUserId = callClient.getState().userId;
|
885
902
|
const isLocalRaisedHand = raiseHandFeature === null || raiseHandFeature === void 0 ? void 0 : raiseHandFeature.getRaisedHands().find((publishedState) => toFlatCommunicationIdentifier(publishedState.identifier) === toFlatCommunicationIdentifier(localUserId));
|
@@ -890,7 +907,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
890
907
|
yield (raiseHandFeature === null || raiseHandFeature === void 0 ? void 0 : raiseHandFeature.raiseHand());
|
891
908
|
}
|
892
909
|
});
|
893
|
-
const onReactionClick = (reaction) => __awaiter$
|
910
|
+
const onReactionClick = (reaction) => __awaiter$S(void 0, void 0, void 0, function* () {
|
894
911
|
var _c;
|
895
912
|
if (reaction === 'like' ||
|
896
913
|
reaction === 'applause' ||
|
@@ -904,19 +921,19 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
904
921
|
}
|
905
922
|
return;
|
906
923
|
});
|
907
|
-
const onToggleMicrophone = () => __awaiter$
|
924
|
+
const onToggleMicrophone = () => __awaiter$S(void 0, void 0, void 0, function* () {
|
908
925
|
if (!call || !(_isInCall(call.state) || _isInLobbyOrConnecting(call.state))) {
|
909
926
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
910
927
|
}
|
911
928
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
912
929
|
});
|
913
|
-
const onStartScreenShare = () => __awaiter$
|
914
|
-
const onStopScreenShare = () => __awaiter$
|
915
|
-
const onToggleScreenShare = () => __awaiter$
|
916
|
-
const onHangUp = (forEveryone) => __awaiter$
|
930
|
+
const onStartScreenShare = () => __awaiter$S(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
931
|
+
const onStopScreenShare = () => __awaiter$S(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
932
|
+
const onToggleScreenShare = () => __awaiter$S(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
933
|
+
const onHangUp = (forEveryone) => __awaiter$S(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
|
917
934
|
/* @conditional-compile-remove(PSTN-calls) */
|
918
|
-
const onToggleHold = () => __awaiter$
|
919
|
-
const onCreateLocalStreamView = (...args_1) => __awaiter$
|
935
|
+
const onToggleHold = () => __awaiter$S(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.state) === 'LocalHold' ? yield (call === null || call === void 0 ? void 0 : call.resume()) : yield (call === null || call === void 0 ? void 0 : call.hold()); });
|
936
|
+
const onCreateLocalStreamView = (...args_1) => __awaiter$S(void 0, [...args_1], void 0, function* (options = { scalingMode: 'Crop', isMirrored: true }) {
|
920
937
|
var _d;
|
921
938
|
if (!call || call.localVideoStreams.length === 0) {
|
922
939
|
return;
|
@@ -932,7 +949,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
932
949
|
const { view } = (_d = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _d !== void 0 ? _d : {};
|
933
950
|
return view ? { view } : undefined;
|
934
951
|
});
|
935
|
-
const onCreateRemoteStreamView = (userId_1, ...args_2) => __awaiter$
|
952
|
+
const onCreateRemoteStreamView = (userId_1, ...args_2) => __awaiter$S(void 0, [userId_1, ...args_2], void 0, function* (userId, options = { scalingMode: 'Crop' }) {
|
936
953
|
if (!call) {
|
937
954
|
return;
|
938
955
|
}
|
@@ -969,7 +986,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
969
986
|
}
|
970
987
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
971
988
|
});
|
972
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
989
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$S(void 0, void 0, void 0, function* () {
|
973
990
|
if (!call) {
|
974
991
|
return;
|
975
992
|
}
|
@@ -990,7 +1007,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
990
1007
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
991
1008
|
}
|
992
1009
|
});
|
993
|
-
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$
|
1010
|
+
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$S(void 0, void 0, void 0, function* () {
|
994
1011
|
if (!call) {
|
995
1012
|
return;
|
996
1013
|
}
|
@@ -1007,7 +1024,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1007
1024
|
callClient.disposeView(call.id, participant.identifier, remoteVideoStream);
|
1008
1025
|
}
|
1009
1026
|
});
|
1010
|
-
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$
|
1027
|
+
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1011
1028
|
if (!call) {
|
1012
1029
|
return;
|
1013
1030
|
}
|
@@ -1024,7 +1041,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1024
1041
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
1025
1042
|
}
|
1026
1043
|
});
|
1027
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
1044
|
+
const onDisposeLocalStreamView = () => __awaiter$S(void 0, void 0, void 0, function* () {
|
1028
1045
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
1029
1046
|
const callState = call && callClient.getState().calls[call.id];
|
1030
1047
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -1036,17 +1053,17 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1036
1053
|
// TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.
|
1037
1054
|
yield disposeAllLocalPreviewViews(callClient);
|
1038
1055
|
});
|
1039
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
1056
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$S(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
1040
1057
|
const notImplemented = () => {
|
1041
1058
|
throw new Error('Not implemented, cannot call a method from an abstract object');
|
1042
1059
|
};
|
1043
1060
|
/* @conditional-compile-remove(call-readiness) */
|
1044
|
-
const askDevicePermission = (constrain) => __awaiter$
|
1061
|
+
const askDevicePermission = (constrain) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1045
1062
|
if (deviceManager) {
|
1046
1063
|
yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.askDevicePermission(constrain));
|
1047
1064
|
}
|
1048
1065
|
});
|
1049
|
-
const onRemoveVideoBackgroundEffects = () => __awaiter$
|
1066
|
+
const onRemoveVideoBackgroundEffects = () => __awaiter$S(void 0, void 0, void 0, function* () {
|
1050
1067
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
1051
1068
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
1052
1069
|
if (stream) {
|
@@ -1058,7 +1075,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1058
1075
|
}
|
1059
1076
|
}
|
1060
1077
|
});
|
1061
|
-
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$
|
1078
|
+
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1062
1079
|
var _e;
|
1063
1080
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
1064
1081
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
@@ -1071,7 +1088,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1071
1088
|
return createEffect && stream.feature(communicationCalling.Features.VideoEffects).startEffects(createEffect(backgroundBlurConfig));
|
1072
1089
|
}
|
1073
1090
|
});
|
1074
|
-
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$
|
1091
|
+
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1075
1092
|
var _f;
|
1076
1093
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
1077
1094
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
@@ -1084,38 +1101,38 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1084
1101
|
return (createEffect && stream.feature(communicationCalling.Features.VideoEffects).startEffects(createEffect(backgroundReplacementConfig)));
|
1085
1102
|
}
|
1086
1103
|
});
|
1087
|
-
const onStartCaptions = (options) => __awaiter$
|
1104
|
+
const onStartCaptions = (options) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1088
1105
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1089
1106
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.startCaptions(options));
|
1090
1107
|
});
|
1091
|
-
const onStopCaptions = () => __awaiter$
|
1108
|
+
const onStopCaptions = () => __awaiter$S(void 0, void 0, void 0, function* () {
|
1092
1109
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1093
1110
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.stopCaptions());
|
1094
1111
|
});
|
1095
|
-
const onSetSpokenLanguage = (language) => __awaiter$
|
1112
|
+
const onSetSpokenLanguage = (language) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1096
1113
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1097
1114
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.setSpokenLanguage(language));
|
1098
1115
|
});
|
1099
|
-
const onSetCaptionLanguage = (language) => __awaiter$
|
1116
|
+
const onSetCaptionLanguage = (language) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1100
1117
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1101
1118
|
yield captionsFeature.setCaptionLanguage(language);
|
1102
1119
|
});
|
1103
|
-
const onSubmitSurvey = (survey) => __awaiter$
|
1104
|
-
const onStartSpotlight = (userIds) => __awaiter$
|
1120
|
+
const onSubmitSurvey = (survey) => __awaiter$S(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.CallSurvey).submitSurvey(survey)); });
|
1121
|
+
const onStartSpotlight = (userIds) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1105
1122
|
const participants = userIds === null || userIds === void 0 ? void 0 : userIds.map((userId) => _toCommunicationIdentifier(userId));
|
1106
1123
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Spotlight).startSpotlight(participants));
|
1107
1124
|
});
|
1108
|
-
const onStopSpotlight = (userIds) => __awaiter$
|
1125
|
+
const onStopSpotlight = (userIds) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1109
1126
|
const participants = userIds === null || userIds === void 0 ? void 0 : userIds.map((userId) => _toCommunicationIdentifier(userId));
|
1110
1127
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Spotlight).stopSpotlight(participants));
|
1111
1128
|
});
|
1112
|
-
const onStopAllSpotlight = () => __awaiter$
|
1129
|
+
const onStopAllSpotlight = () => __awaiter$S(void 0, void 0, void 0, function* () {
|
1113
1130
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Spotlight).stopAllSpotlight());
|
1114
1131
|
});
|
1115
1132
|
/* @conditional-compile-remove(soft-mute) */
|
1116
|
-
const onMuteParticipant = (userId) => __awaiter$
|
1133
|
+
const onMuteParticipant = (userId) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1117
1134
|
if (call === null || call === void 0 ? void 0 : call.remoteParticipants) {
|
1118
|
-
call === null || call === void 0 ? void 0 : call.remoteParticipants.forEach((participant) => __awaiter$
|
1135
|
+
call === null || call === void 0 ? void 0 : call.remoteParticipants.forEach((participant) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1119
1136
|
// Using toFlatCommunicationIdentifier to convert the CommunicationIdentifier to string
|
1120
1137
|
// as _toCommunicationIdentifier(userId) comparison to participant.identifier did not work for this case
|
1121
1138
|
if (toFlatCommunicationIdentifier(participant.identifier) === userId) {
|
@@ -1125,27 +1142,27 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1125
1142
|
}
|
1126
1143
|
});
|
1127
1144
|
/* @conditional-compile-remove(soft-mute) */
|
1128
|
-
const onMuteAllRemoteParticipants = () => __awaiter$
|
1145
|
+
const onMuteAllRemoteParticipants = () => __awaiter$S(void 0, void 0, void 0, function* () {
|
1129
1146
|
call === null || call === void 0 ? void 0 : call.muteAllRemoteParticipants();
|
1130
1147
|
});
|
1131
1148
|
const canStartSpotlight = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Capabilities).capabilities.spotlightParticipant.isPresent;
|
1132
1149
|
const canRemoveSpotlight = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Capabilities).capabilities.removeParticipantsSpotlight.isPresent;
|
1133
1150
|
const onStartLocalSpotlight = canStartSpotlight
|
1134
|
-
? () => __awaiter$
|
1151
|
+
? () => __awaiter$S(void 0, void 0, void 0, function* () {
|
1135
1152
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Spotlight).startSpotlight());
|
1136
1153
|
})
|
1137
1154
|
: undefined;
|
1138
|
-
const onStopLocalSpotlight = () => __awaiter$
|
1155
|
+
const onStopLocalSpotlight = () => __awaiter$S(void 0, void 0, void 0, function* () {
|
1139
1156
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Spotlight).stopSpotlight());
|
1140
1157
|
});
|
1141
1158
|
const onStartRemoteSpotlight = canStartSpotlight
|
1142
|
-
? (userIds) => __awaiter$
|
1159
|
+
? (userIds) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1143
1160
|
const participants = userIds === null || userIds === void 0 ? void 0 : userIds.map((userId) => _toCommunicationIdentifier(userId));
|
1144
1161
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Spotlight).startSpotlight(participants));
|
1145
1162
|
})
|
1146
1163
|
: undefined;
|
1147
1164
|
const onStopRemoteSpotlight = canRemoveSpotlight
|
1148
|
-
? (userIds) => __awaiter$
|
1165
|
+
? (userIds) => __awaiter$S(void 0, void 0, void 0, function* () {
|
1149
1166
|
const participants = userIds === null || userIds === void 0 ? void 0 : userIds.map((userId) => _toCommunicationIdentifier(userId));
|
1150
1167
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Spotlight).stopSpotlight(participants));
|
1151
1168
|
})
|
@@ -1204,7 +1221,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1204
1221
|
|
1205
1222
|
// Copyright (c) Microsoft Corporation.
|
1206
1223
|
// Licensed under the MIT License.
|
1207
|
-
var __awaiter$
|
1224
|
+
var __awaiter$R = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1208
1225
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1209
1226
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1210
1227
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1230,7 +1247,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
|
|
1230
1247
|
return callAgent === null || callAgent === void 0 ? void 0 : callAgent.startCall(participants, options);
|
1231
1248
|
},
|
1232
1249
|
/* @conditional-compile-remove(PSTN-calls) */
|
1233
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1250
|
+
onAddParticipant: (userId, options) => __awaiter$R(void 0, void 0, void 0, function* () {
|
1234
1251
|
const participant = _toCommunicationIdentifier(userId);
|
1235
1252
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
1236
1253
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
|
@@ -1238,7 +1255,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
|
|
1238
1255
|
else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
|
1239
1256
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1240
1257
|
}
|
1241
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1258
|
+
}), onRemoveParticipant: (userId) => __awaiter$R(void 0, void 0, void 0, function* () {
|
1242
1259
|
const participant = _toCommunicationIdentifier(userId);
|
1243
1260
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
1244
1261
|
}) });
|
@@ -1246,7 +1263,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
|
|
1246
1263
|
|
1247
1264
|
// Copyright (c) Microsoft Corporation.
|
1248
1265
|
// Licensed under the MIT License.
|
1249
|
-
var __awaiter$
|
1266
|
+
var __awaiter$Q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1250
1267
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1251
1268
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1252
1269
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1277,7 +1294,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
|
|
1277
1294
|
return undefined;
|
1278
1295
|
},
|
1279
1296
|
/* @conditional-compile-remove(PSTN-calls) */
|
1280
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1297
|
+
onAddParticipant: (userId, options) => __awaiter$Q(void 0, void 0, void 0, function* () {
|
1281
1298
|
const participant = _toCommunicationIdentifier(userId);
|
1282
1299
|
/* @conditional-compile-remove(teams-identity-support) */
|
1283
1300
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
@@ -1293,7 +1310,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
|
|
1293
1310
|
}
|
1294
1311
|
/* @conditional-compile-remove(teams-identity-support) */
|
1295
1312
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1296
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1313
|
+
}), onRemoveParticipant: (userId) => __awaiter$Q(void 0, void 0, void 0, function* () {
|
1297
1314
|
const participant = _toCommunicationIdentifier(userId);
|
1298
1315
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
1299
1316
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
@@ -1526,7 +1543,7 @@ const getCaptionsSpeakerIdentifier = (captions) => {
|
|
1526
1543
|
|
1527
1544
|
// Copyright (c) Microsoft Corporation.
|
1528
1545
|
// Licensed under the MIT License.
|
1529
|
-
var __awaiter$
|
1546
|
+
var __awaiter$P = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1530
1547
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1531
1548
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1532
1549
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1603,7 +1620,7 @@ class ProxyDeviceManager {
|
|
1603
1620
|
console.info('Could not Unsubscribe to Permissions API Camera changed events, API is not supported by browser', e);
|
1604
1621
|
}
|
1605
1622
|
};
|
1606
|
-
this.permissionsApiStateChangeHandler = () => __awaiter$
|
1623
|
+
this.permissionsApiStateChangeHandler = () => __awaiter$P(this, void 0, void 0, function* () {
|
1607
1624
|
yield this.updateDevicePermissionState();
|
1608
1625
|
});
|
1609
1626
|
/**
|
@@ -1614,13 +1631,13 @@ class ProxyDeviceManager {
|
|
1614
1631
|
this.selectCamera = (videoDeviceInfo) => {
|
1615
1632
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
1616
1633
|
};
|
1617
|
-
this.videoDevicesUpdated = () => __awaiter$
|
1634
|
+
this.videoDevicesUpdated = () => __awaiter$P(this, void 0, void 0, function* () {
|
1618
1635
|
// Device Manager always has a camera with '' name if there are no real camera devices available.
|
1619
1636
|
// We don't want to show that in the UI.
|
1620
1637
|
const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
|
1621
1638
|
this._context.setDeviceManagerCameras(dedupeById(realCameras));
|
1622
1639
|
});
|
1623
|
-
this.audioDevicesUpdated = () => __awaiter$
|
1640
|
+
this.audioDevicesUpdated = () => __awaiter$P(this, void 0, void 0, function* () {
|
1624
1641
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
1625
1642
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
1626
1643
|
});
|
@@ -1630,7 +1647,7 @@ class ProxyDeviceManager {
|
|
1630
1647
|
this.selectedSpeakerChanged = () => {
|
1631
1648
|
this._context.setDeviceManagerSelectedSpeaker(this._deviceManager.selectedSpeaker);
|
1632
1649
|
};
|
1633
|
-
this.updateDevicePermissionState = (sdkDeviceAccessState) => __awaiter$
|
1650
|
+
this.updateDevicePermissionState = (sdkDeviceAccessState) => __awaiter$P(this, void 0, void 0, function* () {
|
1634
1651
|
let hasCameraPermission = !!(sdkDeviceAccessState === null || sdkDeviceAccessState === void 0 ? void 0 : sdkDeviceAccessState.video);
|
1635
1652
|
let hasMicPermission = !!(sdkDeviceAccessState === null || sdkDeviceAccessState === void 0 ? void 0 : sdkDeviceAccessState.audio);
|
1636
1653
|
// Supplement the SDK values with values from the Permissions API to get a better understanding of the device
|
@@ -1706,7 +1723,7 @@ class ProxyDeviceManager {
|
|
1706
1723
|
}
|
1707
1724
|
case 'askDevicePermission': {
|
1708
1725
|
return this._context.withAsyncErrorTeedToState((...args) => {
|
1709
|
-
return target.askDevicePermission(...args).then((deviceAccess) => __awaiter$
|
1726
|
+
return target.askDevicePermission(...args).then((deviceAccess) => __awaiter$P(this, void 0, void 0, function* () {
|
1710
1727
|
yield this.updateDevicePermissionState(deviceAccess);
|
1711
1728
|
return deviceAccess;
|
1712
1729
|
}));
|
@@ -2083,7 +2100,7 @@ class CallIdHistory {
|
|
2083
2100
|
|
2084
2101
|
// Copyright (c) Microsoft Corporation.
|
2085
2102
|
// Licensed under the MIT License.
|
2086
|
-
var __awaiter$
|
2103
|
+
var __awaiter$O = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2087
2104
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
2088
2105
|
return new (P || (P = Promise))(function (resolve, reject) {
|
2089
2106
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3011,7 +3028,7 @@ let CallContext$2 = class CallContext {
|
|
3011
3028
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
3012
3029
|
*/
|
3013
3030
|
withAsyncErrorTeedToState(action, target) {
|
3014
|
-
return (...args) => __awaiter$
|
3031
|
+
return (...args) => __awaiter$O(this, void 0, void 0, function* () {
|
3015
3032
|
try {
|
3016
3033
|
return yield action(...args);
|
3017
3034
|
}
|
@@ -3536,7 +3553,7 @@ function _logStreamEvent(eventName, streamLogInfo, error) {
|
|
3536
3553
|
|
3537
3554
|
// Copyright (c) Microsoft Corporation.
|
3538
3555
|
// Licensed under the MIT License.
|
3539
|
-
var __awaiter$
|
3556
|
+
var __awaiter$N = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3540
3557
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3541
3558
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3542
3559
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3546,7 +3563,7 @@ var __awaiter$M = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
3546
3563
|
});
|
3547
3564
|
};
|
3548
3565
|
function createViewVideo(context, internalContext, callId, stream, participantId, options) {
|
3549
|
-
return __awaiter$
|
3566
|
+
return __awaiter$N(this, void 0, void 0, function* () {
|
3550
3567
|
// we can only have 3 types of createView
|
3551
3568
|
let streamEventType;
|
3552
3569
|
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
@@ -3675,7 +3692,7 @@ function createViewVideo(context, internalContext, callId, stream, participantId
|
|
3675
3692
|
});
|
3676
3693
|
}
|
3677
3694
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
3678
|
-
return __awaiter$
|
3695
|
+
return __awaiter$N(this, void 0, void 0, function* () {
|
3679
3696
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
3680
3697
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
3681
3698
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -3844,7 +3861,7 @@ function createView(context, internalContext, callId, participantId, stream, opt
|
|
3844
3861
|
// Render LocalVideoStream that is not part of a Call
|
3845
3862
|
// Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).
|
3846
3863
|
// We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
|
3847
|
-
return context.withAsyncErrorTeedToState(() => __awaiter$
|
3864
|
+
return context.withAsyncErrorTeedToState(() => __awaiter$N(this, void 0, void 0, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
|
3848
3865
|
}
|
3849
3866
|
else {
|
3850
3867
|
_logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
|
@@ -4030,7 +4047,7 @@ class RecordingSubscriber {
|
|
4030
4047
|
|
4031
4048
|
// Copyright (c) Microsoft Corporation.
|
4032
4049
|
// Licensed under the MIT License.
|
4033
|
-
var __awaiter$
|
4050
|
+
var __awaiter$M = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4034
4051
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4035
4052
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4036
4053
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4054,7 +4071,7 @@ class PPTLiveSubscriber {
|
|
4054
4071
|
this._context.setCallPPTLiveActive(this._callIdRef.callId, this._pptLive.isActive);
|
4055
4072
|
this.checkAndUpdatePPTLiveParticipant();
|
4056
4073
|
};
|
4057
|
-
this.checkAndUpdatePPTLiveParticipant = () => __awaiter$
|
4074
|
+
this.checkAndUpdatePPTLiveParticipant = () => __awaiter$M(this, void 0, void 0, function* () {
|
4058
4075
|
if (this._pptLive.isActive) {
|
4059
4076
|
// TODO: need to refactor if Web Calling SDK has this logic ready
|
4060
4077
|
if (this._call.isScreenSharingOn) {
|
@@ -4567,7 +4584,7 @@ class CallSubscriber {
|
|
4567
4584
|
|
4568
4585
|
// Copyright (c) Microsoft Corporation.
|
4569
4586
|
// Licensed under the MIT License.
|
4570
|
-
var __awaiter$
|
4587
|
+
var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4571
4588
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4572
4589
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4573
4590
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4587,14 +4604,14 @@ class ProxyIncomingCall {
|
|
4587
4604
|
switch (prop) {
|
4588
4605
|
case 'accept': {
|
4589
4606
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4590
|
-
return __awaiter$
|
4607
|
+
return __awaiter$L(this, void 0, void 0, function* () {
|
4591
4608
|
return yield target.accept(...args);
|
4592
4609
|
});
|
4593
4610
|
}, 'IncomingCall.accept');
|
4594
4611
|
}
|
4595
4612
|
case 'reject': {
|
4596
4613
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4597
|
-
return __awaiter$
|
4614
|
+
return __awaiter$L(this, void 0, void 0, function* () {
|
4598
4615
|
return yield target.reject(...args);
|
4599
4616
|
});
|
4600
4617
|
}, 'IncomingCall.reject');
|
@@ -4835,7 +4852,7 @@ const clearCallRelatedState = (context, internalContext) => {
|
|
4835
4852
|
|
4836
4853
|
// Copyright (c) Microsoft Corporation.
|
4837
4854
|
// Licensed under the MIT License.
|
4838
|
-
var __awaiter$
|
4855
|
+
var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4839
4856
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4840
4857
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4841
4858
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4861,56 +4878,56 @@ class ProxyCallCommon {
|
|
4861
4878
|
switch (prop) {
|
4862
4879
|
case 'mute': {
|
4863
4880
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4864
|
-
return __awaiter$
|
4881
|
+
return __awaiter$K(this, void 0, void 0, function* () {
|
4865
4882
|
return yield target.mute(...args);
|
4866
4883
|
});
|
4867
4884
|
}, 'Call.mute');
|
4868
4885
|
}
|
4869
4886
|
case 'unmute': {
|
4870
4887
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4871
|
-
return __awaiter$
|
4888
|
+
return __awaiter$K(this, void 0, void 0, function* () {
|
4872
4889
|
return yield target.unmute(...args);
|
4873
4890
|
});
|
4874
4891
|
}, 'Call.unmute');
|
4875
4892
|
}
|
4876
4893
|
case 'startVideo': {
|
4877
4894
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4878
|
-
return __awaiter$
|
4895
|
+
return __awaiter$K(this, void 0, void 0, function* () {
|
4879
4896
|
return yield target.startVideo(...args);
|
4880
4897
|
});
|
4881
4898
|
}, 'Call.startVideo');
|
4882
4899
|
}
|
4883
4900
|
case 'stopVideo': {
|
4884
4901
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4885
|
-
return __awaiter$
|
4902
|
+
return __awaiter$K(this, void 0, void 0, function* () {
|
4886
4903
|
return yield target.stopVideo(...args);
|
4887
4904
|
});
|
4888
4905
|
}, 'Call.stopVideo');
|
4889
4906
|
}
|
4890
4907
|
case 'startScreenSharing': {
|
4891
4908
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4892
|
-
return __awaiter$
|
4909
|
+
return __awaiter$K(this, void 0, void 0, function* () {
|
4893
4910
|
return yield target.startScreenSharing(...args);
|
4894
4911
|
});
|
4895
4912
|
}, 'Call.startScreenSharing');
|
4896
4913
|
}
|
4897
4914
|
case 'stopScreenSharing': {
|
4898
4915
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4899
|
-
return __awaiter$
|
4916
|
+
return __awaiter$K(this, void 0, void 0, function* () {
|
4900
4917
|
return yield target.stopScreenSharing(...args);
|
4901
4918
|
});
|
4902
4919
|
}, 'Call.stopScreenSharing');
|
4903
4920
|
}
|
4904
4921
|
case 'hold': {
|
4905
4922
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4906
|
-
return __awaiter$
|
4923
|
+
return __awaiter$K(this, void 0, void 0, function* () {
|
4907
4924
|
return yield target.hold(...args);
|
4908
4925
|
});
|
4909
4926
|
}, 'Call.hold');
|
4910
4927
|
}
|
4911
4928
|
case 'resume': {
|
4912
4929
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4913
|
-
return __awaiter$
|
4930
|
+
return __awaiter$K(this, void 0, void 0, function* () {
|
4914
4931
|
return yield target.resume(...args);
|
4915
4932
|
});
|
4916
4933
|
}, 'Call.resume');
|
@@ -4978,7 +4995,7 @@ class ProxyTeamsCaptions {
|
|
4978
4995
|
get(target, prop) {
|
4979
4996
|
switch (prop) {
|
4980
4997
|
case 'startCaptions':
|
4981
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4998
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$K(this, void 0, void 0, function* () {
|
4982
4999
|
var _a, _b;
|
4983
5000
|
this._context.setStartCaptionsInProgress(this._call.id, true);
|
4984
5001
|
try {
|
@@ -4992,7 +5009,7 @@ class ProxyTeamsCaptions {
|
|
4992
5009
|
}
|
4993
5010
|
}), 'Call.feature');
|
4994
5011
|
case 'stopCaptions':
|
4995
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
5012
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$K(this, void 0, void 0, function* () {
|
4996
5013
|
const ret = yield target.stopCaptions(...args);
|
4997
5014
|
this._context.setIsCaptionActive(this._call.id, false);
|
4998
5015
|
this._context.setStartCaptionsInProgress(this._call.id, false);
|
@@ -5000,13 +5017,13 @@ class ProxyTeamsCaptions {
|
|
5000
5017
|
return ret;
|
5001
5018
|
}), 'Call.feature');
|
5002
5019
|
case 'setSpokenLanguage':
|
5003
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
5020
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$K(this, void 0, void 0, function* () {
|
5004
5021
|
const ret = yield target.setSpokenLanguage(...args);
|
5005
5022
|
this._context.setSelectedSpokenLanguage(this._call.id, args[0]);
|
5006
5023
|
return ret;
|
5007
5024
|
}), 'Call.feature');
|
5008
5025
|
case 'setCaptionLanguage':
|
5009
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
5026
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$K(this, void 0, void 0, function* () {
|
5010
5027
|
const ret = yield target.setCaptionLanguage(...args);
|
5011
5028
|
this._context.setSelectedCaptionLanguage(this._call.id, args[0]);
|
5012
5029
|
return ret;
|
@@ -5028,7 +5045,7 @@ class ProxyCaptions {
|
|
5028
5045
|
get(target, prop) {
|
5029
5046
|
switch (prop) {
|
5030
5047
|
case 'startCaptions':
|
5031
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
5048
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$K(this, void 0, void 0, function* () {
|
5032
5049
|
var _a, _b;
|
5033
5050
|
this._context.setStartCaptionsInProgress(this._call.id, true);
|
5034
5051
|
try {
|
@@ -5042,7 +5059,7 @@ class ProxyCaptions {
|
|
5042
5059
|
}
|
5043
5060
|
}), 'Call.feature');
|
5044
5061
|
case 'stopCaptions':
|
5045
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
5062
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$K(this, void 0, void 0, function* () {
|
5046
5063
|
const ret = yield target.stopCaptions(...args);
|
5047
5064
|
this._context.setIsCaptionActive(this._call.id, false);
|
5048
5065
|
this._context.setStartCaptionsInProgress(this._call.id, false);
|
@@ -5050,7 +5067,7 @@ class ProxyCaptions {
|
|
5050
5067
|
return ret;
|
5051
5068
|
}), 'Call.feature');
|
5052
5069
|
case 'setSpokenLanguage':
|
5053
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
5070
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$K(this, void 0, void 0, function* () {
|
5054
5071
|
const ret = yield target.setSpokenLanguage(...args);
|
5055
5072
|
this._context.setSelectedSpokenLanguage(this._call.id, args[0]);
|
5056
5073
|
return ret;
|
@@ -5070,12 +5087,12 @@ class ProxySpotlightCallFeature {
|
|
5070
5087
|
get(target, prop) {
|
5071
5088
|
switch (prop) {
|
5072
5089
|
case 'startSpotlight':
|
5073
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
5090
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$K(this, void 0, void 0, function* () {
|
5074
5091
|
const ret = yield target.startSpotlight(...args);
|
5075
5092
|
return ret;
|
5076
5093
|
}), 'Call.feature');
|
5077
5094
|
case 'stopSpotlight':
|
5078
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
5095
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$K(this, void 0, void 0, function* () {
|
5079
5096
|
const ret = yield target.stopSpotlight(...args);
|
5080
5097
|
return ret;
|
5081
5098
|
}), 'Call.feature');
|
@@ -5117,7 +5134,7 @@ class ProxyTransferCallFeature {
|
|
5117
5134
|
|
5118
5135
|
// Copyright (c) Microsoft Corporation.
|
5119
5136
|
// Licensed under the MIT License.
|
5120
|
-
var __awaiter$
|
5137
|
+
var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
5121
5138
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
5122
5139
|
return new (P || (P = Promise))(function (resolve, reject) {
|
5123
5140
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -5131,7 +5148,7 @@ class ProxyCall extends ProxyCallCommon {
|
|
5131
5148
|
switch (prop) {
|
5132
5149
|
case 'addParticipant': {
|
5133
5150
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
5134
|
-
return __awaiter$
|
5151
|
+
return __awaiter$J(this, void 0, void 0, function* () {
|
5135
5152
|
return yield target.addParticipant(...args);
|
5136
5153
|
});
|
5137
5154
|
}, 'Call.addParticipant');
|
@@ -5366,7 +5383,7 @@ class InternalCallContext {
|
|
5366
5383
|
|
5367
5384
|
// Copyright (c) Microsoft Corporation.
|
5368
5385
|
// Licensed under the MIT License.
|
5369
|
-
var __awaiter$
|
5386
|
+
var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
5370
5387
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
5371
5388
|
return new (P || (P = Promise))(function (resolve, reject) {
|
5372
5389
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -5382,7 +5399,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
5382
5399
|
/* @conditional-compile-remove(PSTN-calls) */
|
5383
5400
|
case 'addParticipant': {
|
5384
5401
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
5385
|
-
return __awaiter$
|
5402
|
+
return __awaiter$I(this, void 0, void 0, function* () {
|
5386
5403
|
return yield target.addParticipant(...args);
|
5387
5404
|
});
|
5388
5405
|
}, 'TeamsCall.addParticipant');
|
@@ -5501,7 +5518,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
|
|
5501
5518
|
|
5502
5519
|
// Copyright (c) Microsoft Corporation.
|
5503
5520
|
// Licensed under the MIT License.
|
5504
|
-
var __awaiter$
|
5521
|
+
var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
5505
5522
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
5506
5523
|
return new (P || (P = Promise))(function (resolve, reject) {
|
5507
5524
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -5523,7 +5540,7 @@ class ProxyVideoStreamRendererView {
|
|
5523
5540
|
get(target, prop) {
|
5524
5541
|
switch (prop) {
|
5525
5542
|
case 'updateScalingMode': {
|
5526
|
-
return (...args) => __awaiter$
|
5543
|
+
return (...args) => __awaiter$H(this, void 0, void 0, function* () {
|
5527
5544
|
yield target.updateScalingMode(...args);
|
5528
5545
|
this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
|
5529
5546
|
});
|
@@ -5544,7 +5561,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
|
|
5544
5561
|
|
5545
5562
|
// Copyright (c) Microsoft Corporation.
|
5546
5563
|
// Licensed under the MIT License.
|
5547
|
-
var __awaiter$
|
5564
|
+
var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
5548
5565
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
5549
5566
|
return new (P || (P = Promise))(function (resolve, reject) {
|
5550
5567
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -5566,7 +5583,7 @@ class ProxyCallClient {
|
|
5566
5583
|
get(target, prop) {
|
5567
5584
|
switch (prop) {
|
5568
5585
|
case 'createCallAgent': {
|
5569
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
5586
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$G(this, void 0, void 0, function* () {
|
5570
5587
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
5571
5588
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
5572
5589
|
// callAgent if the createCallAgent succeeds.
|
@@ -5579,7 +5596,7 @@ class ProxyCallClient {
|
|
5579
5596
|
}), 'CallClient.createCallAgent');
|
5580
5597
|
}
|
5581
5598
|
case 'createTeamsCallAgent': {
|
5582
|
-
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
5599
|
+
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$G(this, void 0, void 0, function* () {
|
5583
5600
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
5584
5601
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
5585
5602
|
// callAgent if the createCallAgent succeeds.
|
@@ -5592,7 +5609,7 @@ class ProxyCallClient {
|
|
5592
5609
|
}), 'CallClient.createTeamsCallAgent');
|
5593
5610
|
}
|
5594
5611
|
case 'getDeviceManager': {
|
5595
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
5612
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$G(this, void 0, void 0, function* () {
|
5596
5613
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
5597
5614
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
5598
5615
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -5621,7 +5638,7 @@ class ProxyCallClient {
|
|
5621
5638
|
/**
|
5622
5639
|
* add to this object if we want to proxy anything else off the DebugInfo feature object.
|
5623
5640
|
*/
|
5624
|
-
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$
|
5641
|
+
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$G(this, void 0, void 0, function* () {
|
5625
5642
|
const environmentInfo = yield feature.getEnvironmentInfo();
|
5626
5643
|
this._context.setEnvironmentInfo(environmentInfo);
|
5627
5644
|
return environmentInfo;
|
@@ -5682,7 +5699,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
|
|
5682
5699
|
});
|
5683
5700
|
Object.defineProperty(callClient, 'createView', {
|
5684
5701
|
configurable: false,
|
5685
|
-
value: (callId, participantId, stream, options) => __awaiter$
|
5702
|
+
value: (callId, participantId, stream, options) => __awaiter$G(void 0, void 0, void 0, function* () {
|
5686
5703
|
const participantIdKind = participantId ? communicationCommon.getIdentifierKind(participantId) : undefined;
|
5687
5704
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
5688
5705
|
// We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.
|
@@ -5915,7 +5932,7 @@ const typingIndicatorStringStyle = react.mergeStyles({
|
|
5915
5932
|
wordBreak: 'break-word'
|
5916
5933
|
});
|
5917
5934
|
|
5918
|
-
var participantItem$k={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed participant",participantStateRinging:"Calling...",participantStateHold:"On hold",attendeeRole:"Attendee"};var ParticipantList$l={overflowParticipantCount:"+{overflowCount} more"};var typingIndicator$k={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$k={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",attachmentUploadsPendingError:"Uploading... Please wait.",removeAttachment:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed",attachmentMoreMenu:"More Options"};var richTextSendBox$k={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",attachmentUploadsPendingError:"Uploading... Please wait.",removeAttachment:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed",richTextBoldTooltip:"Bold",richTextItalicTooltip:"Italic",richTextUnderlineTooltip:"Underline",richTextBulletListTooltip:"Bulleted list",richTextNumberListTooltip:"Numbered list",richTextIncreaseIndentTooltip:"Increase indent",richTextDecreaseIndentTooltip:"Decrease indent",richTextInsertTableTooltip:"Insert table",richTextFormatButtonTooltip:"Format",richTextInsertRowOrColumnMenu:"Insert",richTextInsertTableMenuTitle:"Insert {column} x {row} table",richTextInsertRowAboveMenu:"Insert above",richTextInsertRowBelowMenu:"Insert below",richTextInsertColumnLeftMenu:"Insert left",richTextInsertColumnRightMenu:"Insert right",richTextDeleteRowOrColumnMenu:"Delete",richTextDeleteColumnMenu:"Delete column",richTextDeleteRowMenu:"Delete row",richTextDeleteTableMenu:"Delete table",richTextToolbarMoreButtonAriaLabel:"More options",attachmentMoreMenu:"More Options"};var mentionPopover$k={mentionPopoverHeader:"Suggestions"};var imageOverlay$k={downloadButtonLabel:"Download",dismissButtonAriaLabel:"Close"};var messageStatusIndicator$k={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$k={label:"Leave",tooltipContent:"Leave call",leaveOption:"Leave",endCallOption:"End call for everyone"};var cameraButton$k={onLabel:"Camera",offLabel:"Camera",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off",onSplitButtonPrimaryActionCamera:"Turn off camera",offSplitButtonPrimaryActionCamera:"Turn on camera",cameraPrimaryActionSplitButtonTitle:"Use camera",videoEffectsMenuItemTitle:"Effects"};var microphoneButton$k={onLabel:"Mic",offLabel:"Mic",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off",offSplitButtonMicrophonePrimaryAction:"Unmute microphone",onSplitButtonMicrophonePrimaryAction:"Mute microphone",microphonePrimaryActionSplitButtonTitle:"Use microphone"};var devicesButton$k={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose audio device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker"};var participantsButton$k={label:"People",tooltipContent:"Show participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link",copyInviteLinkActionedAriaLabel:"Invite link copied"};var screenShareButton$k={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var raiseHandButton$k={offLabel:"Raise",onLabel:"Lower",tooltipDisabledContent:"Raise Hand action is disabled",tooltipOnContent:"Lower Hand",tooltipOffContent:"Raise Hand"};var reactionButton$k={label:"React",ariaLabel:"React Button, Send a reaction",tooltipDisabledContent:"Reaction action is disabled",tooltipContent:"Send a reaction",likeReactionTooltipContent:"Like",heartReactionTooltipContent:"Love",laughReactionTooltipContent:"Laugh",applauseReactionTooltipContent:"Applause",surprisedReactionTooltipContent:"Surprised"};var messageThread$k={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",messageContentAriaText:"{status} {author} said {message}",messageContentMineAriaText:"{status} You said {message}",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Done",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options",downloadAttachment:"Download file",openAttachment:"Open file",blockedWarningText:"This message was deleted due to organizational policy.",blockedWarningLinkText:"Details",attachmentCardGroupMessage:"The message has {attachmentCount} attachment",messageDeletedAnnouncementAriaLabel:"The message is deleted",richTextBoldTooltip:"Bold",richTextItalicTooltip:"Italic",richTextUnderlineTooltip:"Underline",richTextBulletListTooltip:"Bulleted list",richTextNumberListTooltip:"Numbered list",richTextIncreaseIndentTooltip:"Increase indent",richTextDecreaseIndentTooltip:"Decrease indent",richTextInsertTableTooltip:"Insert table",richTextFormatButtonTooltip:"Format",richTextInsertRowOrColumnMenu:"Insert",richTextInsertTableMenuTitle:"Insert {column} x {row} table",richTextInsertRowAboveMenu:"Insert above",richTextInsertRowBelowMenu:"Insert below",richTextInsertColumnLeftMenu:"Insert left",richTextInsertColumnRightMenu:"Insert right",richTextDeleteRowOrColumnMenu:"Delete",richTextDeleteColumnMenu:"Delete column",richTextDeleteRowMenu:"Delete row",richTextDeleteTableMenu:"Delete table",richTextToolbarMoreButtonAriaLabel:"More options"};var errorBar$k={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"There was an issue starting screen share.",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneAccessDeniedSafari:"Unable to access microphone. Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",callMicrophoneMutedBySystem:"You are muted by your system.",callMicrophoneUnmutedBySystem:"Your microphone recovered and you were unmuted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAccessDeniedSafari:"Unable to access camera. Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callVideoStoppedBySystem:"Your video has been stopped by your system.",callVideoRecoveredBySystem:"Your video has resumed.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link.",cameraFrozenForRemoteParticipants:"Users in the call are having issues seeing your video. Please check your devices and network.",unableToStartVideoEffect:"Unable to apply video effect.",startSpotlightWhileMaxParticipantsAreSpotlighted:"Cannot start spotlight on participant(s) because the maximum number of participants are already spotlighted.",mutedByRemoteParticipant:"You were muted by another participant."};var notificationStack={callingNetworkFailure:{title:"Troubling connecting call",message:"You seem to be offline. Please check your network connection and try again.",closeButtonAriaLabel:"Close"},startVideoGeneric:{title:"Failed to start video.",closeButtonAriaLabel:"Close"},stopVideoGeneric:{title:"Failed to stop video.",closeButtonAriaLabel:"Close"},muteGeneric:{title:"Failed to mute microphone.",closeButtonAriaLabel:"Close"},unmuteGeneric:{title:"Failed to unmute microphone.",closeButtonAriaLabel:"Close"},speakingWhileMuted:{title:"You're muted.",closeButtonAriaLabel:"Close"},startScreenShareGeneric:{title:"There was an issue starting screen share.",closeButtonAriaLabel:"Close"},stopScreenShareGeneric:{title:"Failed to stop screen sharing.",closeButtonAriaLabel:"Close"},callNetworkQualityLow:{title:"Network quality is low.",closeButtonAriaLabel:"Close"},callNoSpeakerFound:{title:"No speakers or headphones found",message:"Connect an audio device to hear the call.",closeButtonAriaLabel:"Close"},callNoMicrophoneFound:{title:"No microphones found",message:"Connect an audio input device.",closeButtonAriaLabel:"Close"},callMicrophoneAccessDenied:{title:"Unable to access microphone",message:"Click the lock in the address bar to grant permission to this webpage.",closeButtonAriaLabel:"Close"},callMicrophoneAccessDeniedSafari:{title:"Unable to access microphone",message:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",closeButtonAriaLabel:"Close"},callMicrophoneMutedBySystem:{title:"You are muted by your system.",closeButtonAriaLabel:"Close"},callMicrophoneUnmutedBySystem:{title:"Your microphone recovered and you were unmuted by your system.",closeButtonAriaLabel:"Close"},callMacOsMicrophoneAccessDenied:{title:"Unable to access microphone",message:"Grant microphone permission in your macOS privacy settings.",closeButtonAriaLabel:"Close"},callLocalVideoFreeze:{title:"Network bandwidth is poor",message:"Your video may appear paused for others on the call.",closeButtonAriaLabel:"Close"},callCameraAccessDenied:{title:"Unable to access camera",message:"Click the lock in the address bar to grant permission to this webpage.",closeButtonAriaLabel:"Close"},callCameraAccessDeniedSafari:{title:"Unable to access camera",message:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",closeButtonAriaLabel:"Close"},callCameraAlreadyInUse:{title:"Unable to access camera",message:"It may already be in use by another application.",closeButtonAriaLabel:"Close"},callVideoStoppedBySystem:{title:"Your video has been stopped by your system.",closeButtonAriaLabel:"Close"},callVideoRecoveredBySystem:{title:"Your video has resumed.",closeButtonAriaLabel:"Close"},callMacOsCameraAccessDenied:{title:"MacOS is blocking access to your camera",message:"Update your privacy settings to allow this browser to access your camera.",closeButtonAriaLabel:"Close"},callMacOsScreenShareAccessDenied:{title:"MacOS is blocking screen sharing",message:"Update your privacy settings to allow this browser to record your screen.",closeButtonAriaLabel:"Close"},failedToJoinCallGeneric:{title:"Failed to join call.",closeButtonAriaLabel:"Close"},failedToJoinCallInvalidMeetingLink:{title:"Unable to join Meeting. Invalid Link.",closeButtonAriaLabel:"Close"},cameraFrozenForRemoteParticipants:{title:"Users in the call are having issues seeing your video",message:"Please check your devices and network.",closeButtonAriaLabel:"Close"},unableToStartVideoEffect:{title:"Unable to apply video effect.",closeButtonAriaLabel:"Close"},startSpotlightWhileMaxParticipantsAreSpotlighted:{title:"Cannot start spotlight on participant(s)",message:"The maximum number of participants are already spotlighted.",closeButtonAriaLabel:"Close"},mutedByRemoteParticipant:{title:"You were muted by another participant.",closeButtonAriaLabel:"Close"}};var videoGallery$k={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoMovementAriaLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed participant",fitRemoteParticipantToFrame:"Fit to frame",fillRemoteParticipantFrame:"Fill frame",pinParticipantForMe:"Pin for me",pinParticipantForMeLimitReached:"Pin (limit reached)",unpinParticipantForMe:"Unpin",pinParticipantMenuItemAriaLabel:"Pin {participantName}",unpinParticipantMenuItemAriaLabel:"Unpin {participantName}",pinnedParticipantAnnouncementAriaLabel:"Pinned {participantName}",unpinnedParticipantAnnouncementAriaLabel:"Unpinned {participantName}",startSpotlightVideoTileMenuLabel:"Spotlight for everyone",addSpotlightVideoTileMenuLabel:"Add spotlight",spotlightLimitReachedMenuTitle:"Spotlight limit reached",stopSpotlightVideoTileMenuLabel:"Stop spotlighting",stopSpotlightOnSelfVideoTileMenuLabel:"Exit spotlight",attendeeRole:"Attendee",muteParticipantMenuItemLabel:"Mute"};var dialpad$k={placeholderText:"Enter phone number",deleteButtonAriaLabel:"Delete"};var holdButton$k={onLabel:"Resume",offLabel:"Hold",tooltipOnContent:"Resume call",tooltipOffContent:"Hold call"};var videoTile$k={participantStateRinging:"Calling...",participantStateHold:"On hold",moreOptionsButtonAriaLabel:"More Options"};var CameraAndMicrophoneSitePermissionsRequest$k={primaryText:"Allow {appName} to use your camera and microphone",secondaryText:"This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera and microphone",ariaLabel:"Allow camera and microphone access"};var CameraSitePermissionsRequest$k={primaryText:"Allow {appName} to use your camera",secondaryText:"This is so participants can see you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera",ariaLabel:"Allow camera access"};var MicrophoneSitePermissionsRequest$k={primaryText:"Allow {appName} to use your microphone",secondaryText:"This is so participants can hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without microphone",ariaLabel:"Allow microphone access"};var CameraAndMicrophoneSitePermissionsCheck$k={primaryText:"Checking for camera and microphone access",secondaryText:"Allow access if prompted. This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera and microphone",ariaLabel:"Checking for camera and microphone access. Allow access if prompted."};var CameraSitePermissionsCheck$k={primaryText:"Checking for camera access",secondaryText:"Allow access if prompted. This is so participants can see you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera",ariaLabel:"Checking for camera access. Allow access if prompted."};var MicrophoneSitePermissionsCheck$k={primaryText:"Checking for microphone access",secondaryText:"Allow access if prompted. This is so participants can hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without microphone",ariaLabel:"Checking for microphone access. Allow access if prompted."};var CameraAndMicrophoneSitePermissionsDenied$k={primaryText:"Unable to access camera and microphone",secondaryText:"Click the lock icon in the address bar to grant microphone permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without camera and microphone",linkText:"Need help? Get troubleshooting help"};var CameraAndMicrophoneSitePermissionsDeniedSafari$k={primaryText:"Unable to access camera and microphone",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without camera and microphone",linkText:"Need help? Get troubleshooting help"};var CameraSitePermissionsDenied$k={primaryText:"Unable to access camera",secondaryText:"Click the lock icon in the address bar to grant camera permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without camera",linkText:"Need help? Get troubleshooting help"};var MicrophoneSitePermissionsDenied$k={primaryText:"Unable to access microphone",secondaryText:"Click the lock icon in the address bar to grant microphone permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without microphone",linkText:"Need help? Get troubleshooting help"};var CameraSitePermissionsDeniedSafari$k={primaryText:"Unable to access camera",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without camera",linkText:"Need help? Get troubleshooting help"};var MicrophoneSitePermissionsDeniedSafari$k={primaryText:"Unable to access microphone",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without microphone",linkText:"Need help? Get troubleshooting help"};var UnsupportedBrowser$l={primaryText:"Browser not supported",secondaryText:"Please join this call using a compatible browser.",moreHelpLinkText:"See compatibility requirements"};var UnsupportedBrowserVersion$l={primaryText:"Browser update needed",secondaryText:"To ensure the best call possible, please update your browser and then try joining the call again.",moreHelpLinkText:"See compatibility requirements",continueAnywayButtonText:"Start call without updating"};var UnsupportedOperatingSystem$l={primaryText:"Operating system not supported",secondaryText:"Please join this call using a device with a compatible operating system.",moreHelpLinkText:"See compatibility requirements"};var BrowserPermissionDenied$k={primaryText:"Can't use your camera or microphone",secondaryText:"Your browser might not have access to your camera or microphone. To fix this, open System Preferences.",primaryButtonText:"Try again",linkText:"Need help? Get troubleshooting help"};var BrowserPermissionDeniedIOS$k={primaryText:"Allow microphone access to continue",secondaryText:"So other participants can hear you.",primaryButtonText:"Try again",imageAltText:"Microphone and camera device permission location for iOS",linkText:"Need help? Get troubleshooting help",step1Text:"Go to the Settings app",step2Text:"Scroll down to settings for this browser",step3Text:"Turn on Microphone (Camera optional)",step4Text:"Try joining the call again",step1DigitText:"1",step2DigitText:"2",step3DigitText:"3",step4DigitText:"4"};var verticalGallery$k={leftNavButtonAriaLabel:"previous page",rightNavButtonAriaLabel:"next page"};var MeetingConferencePhoneInfo$k={meetingConferencePhoneInfoModalTitle:"Join call from your phone",meetingConferencePhoneInfoModalDialIn:"Dial number",meetingConferencePhoneInfoModalMeetingId:"Enter meeting ID",meetingConferencePhoneInfoModalWait:"Wait to be admitted by organizer",meetingConferencePhoneInfoModalNoPhoneAvailable:"No phone available",meetingConferencePhoneInfoModalTollGeoData:"{country}, {city}",meetingConferencePhoneInfoModalTollFree:"(Toll-free)",meetingConferencePhoneInfoModalToll:"(Toll)"};var en_US$1 = {participantItem:participantItem$k,ParticipantList:ParticipantList$l,typingIndicator:typingIndicator$k,sendBox:sendBox$k,richTextSendBox:richTextSendBox$k,mentionPopover:mentionPopover$k,imageOverlay:imageOverlay$k,messageStatusIndicator:messageStatusIndicator$k,endCallButton:endCallButton$k,cameraButton:cameraButton$k,microphoneButton:microphoneButton$k,devicesButton:devicesButton$k,participantsButton:participantsButton$k,screenShareButton:screenShareButton$k,raiseHandButton:raiseHandButton$k,reactionButton:reactionButton$k,messageThread:messageThread$k,errorBar:errorBar$k,notificationStack:notificationStack,videoGallery:videoGallery$k,dialpad:dialpad$k,holdButton:holdButton$k,videoTile:videoTile$k,CameraAndMicrophoneSitePermissionsRequest:CameraAndMicrophoneSitePermissionsRequest$k,CameraSitePermissionsRequest:CameraSitePermissionsRequest$k,MicrophoneSitePermissionsRequest:MicrophoneSitePermissionsRequest$k,CameraAndMicrophoneSitePermissionsCheck:CameraAndMicrophoneSitePermissionsCheck$k,CameraSitePermissionsCheck:CameraSitePermissionsCheck$k,MicrophoneSitePermissionsCheck:MicrophoneSitePermissionsCheck$k,CameraAndMicrophoneSitePermissionsDenied:CameraAndMicrophoneSitePermissionsDenied$k,CameraAndMicrophoneSitePermissionsDeniedSafari:CameraAndMicrophoneSitePermissionsDeniedSafari$k,CameraSitePermissionsDenied:CameraSitePermissionsDenied$k,MicrophoneSitePermissionsDenied:MicrophoneSitePermissionsDenied$k,CameraSitePermissionsDeniedSafari:CameraSitePermissionsDeniedSafari$k,MicrophoneSitePermissionsDeniedSafari:MicrophoneSitePermissionsDeniedSafari$k,UnsupportedBrowser:UnsupportedBrowser$l,UnsupportedBrowserVersion:UnsupportedBrowserVersion$l,UnsupportedOperatingSystem:UnsupportedOperatingSystem$l,BrowserPermissionDenied:BrowserPermissionDenied$k,BrowserPermissionDeniedIOS:BrowserPermissionDeniedIOS$k,verticalGallery:verticalGallery$k,MeetingConferencePhoneInfo:MeetingConferencePhoneInfo$k};
|
5935
|
+
var participantItem$k={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed participant",participantStateRinging:"Calling...",participantStateHold:"On hold",attendeeRole:"Attendee"};var ParticipantList$l={overflowParticipantCount:"+{overflowCount} more"};var typingIndicator$k={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$k={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",attachmentUploadsPendingError:"Uploading... Please wait.",removeAttachment:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed",attachmentMoreMenu:"More Options"};var richTextSendBox$k={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",attachmentUploadsPendingError:"Uploading... Please wait.",removeAttachment:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed",richTextBoldTooltip:"Bold",richTextItalicTooltip:"Italic",richTextUnderlineTooltip:"Underline",richTextBulletListTooltip:"Bulleted list",richTextNumberListTooltip:"Numbered list",richTextIncreaseIndentTooltip:"Increase indent",richTextDecreaseIndentTooltip:"Decrease indent",richTextInsertTableTooltip:"Insert table",richTextFormatButtonTooltip:"Format",richTextInsertRowOrColumnMenu:"Insert",richTextInsertTableMenuTitle:"Insert {column} x {row} table",richTextInsertRowAboveMenu:"Insert above",richTextInsertRowBelowMenu:"Insert below",richTextInsertColumnLeftMenu:"Insert left",richTextInsertColumnRightMenu:"Insert right",richTextDeleteRowOrColumnMenu:"Delete",richTextDeleteColumnMenu:"Delete column",richTextDeleteRowMenu:"Delete row",richTextDeleteTableMenu:"Delete table",richTextToolbarMoreButtonAriaLabel:"More options",attachmentMoreMenu:"More Options"};var mentionPopover$k={mentionPopoverHeader:"Suggestions"};var imageOverlay$k={downloadButtonLabel:"Download",dismissButtonAriaLabel:"Close"};var messageStatusIndicator$k={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$k={label:"Leave",tooltipContent:"Leave call",leaveOption:"Leave",endCallOption:"End call for everyone"};var cameraButton$k={onLabel:"Camera",offLabel:"Camera",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off",onSplitButtonPrimaryActionCamera:"Turn off camera",offSplitButtonPrimaryActionCamera:"Turn on camera",cameraPrimaryActionSplitButtonTitle:"Use camera",videoEffectsMenuItemTitle:"Effects"};var microphoneButton$k={onLabel:"Mic",offLabel:"Mic",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off",offSplitButtonMicrophonePrimaryAction:"Unmute microphone",onSplitButtonMicrophonePrimaryAction:"Mute microphone",microphonePrimaryActionSplitButtonTitle:"Use microphone"};var devicesButton$k={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose audio device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker"};var participantsButton$k={label:"People",tooltipContent:"Show participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link",copyInviteLinkActionedAriaLabel:"Invite link copied"};var screenShareButton$k={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var raiseHandButton$k={offLabel:"Raise",onLabel:"Lower",tooltipDisabledContent:"Raise Hand action is disabled",tooltipOnContent:"Lower Hand",tooltipOffContent:"Raise Hand"};var reactionButton$k={label:"React",ariaLabel:"React Button, Send a reaction",tooltipDisabledContent:"Reaction action is disabled",tooltipContent:"Send a reaction",likeReactionTooltipContent:"Like",heartReactionTooltipContent:"Love",laughReactionTooltipContent:"Laugh",applauseReactionTooltipContent:"Applause",surprisedReactionTooltipContent:"Surprised"};var messageThread$k={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",messageContentAriaText:"{status} {author} said {message}",messageContentMineAriaText:"{status} You said {message}",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Done",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options",downloadAttachment:"Download file",openAttachment:"Open file",blockedWarningText:"This message was deleted due to organizational policy.",blockedWarningLinkText:"Details",attachmentCardGroupMessage:"The message has {attachmentCount} attachment",messageDeletedAnnouncementAriaLabel:"The message is deleted",richTextBoldTooltip:"Bold",richTextItalicTooltip:"Italic",richTextUnderlineTooltip:"Underline",richTextBulletListTooltip:"Bulleted list",richTextNumberListTooltip:"Numbered list",richTextIncreaseIndentTooltip:"Increase indent",richTextDecreaseIndentTooltip:"Decrease indent",richTextInsertTableTooltip:"Insert table",richTextFormatButtonTooltip:"Format",richTextInsertRowOrColumnMenu:"Insert",richTextInsertTableMenuTitle:"Insert {column} x {row} table",richTextInsertRowAboveMenu:"Insert above",richTextInsertRowBelowMenu:"Insert below",richTextInsertColumnLeftMenu:"Insert left",richTextInsertColumnRightMenu:"Insert right",richTextDeleteRowOrColumnMenu:"Delete",richTextDeleteColumnMenu:"Delete column",richTextDeleteRowMenu:"Delete row",richTextDeleteTableMenu:"Delete table",richTextToolbarMoreButtonAriaLabel:"More options",attachmentUploadsPendingError:"Uploading... Please wait."};var errorBar$k={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"There was an issue starting screen share.",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneAccessDeniedSafari:"Unable to access microphone. Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",callMicrophoneMutedBySystem:"You are muted by your system.",callMicrophoneUnmutedBySystem:"Your microphone recovered and you were unmuted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAccessDeniedSafari:"Unable to access camera. Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callVideoStoppedBySystem:"Your video has been stopped by your system.",callVideoRecoveredBySystem:"Your video has resumed.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link.",cameraFrozenForRemoteParticipants:"Users in the call are having issues seeing your video. Please check your devices and network.",unableToStartVideoEffect:"Unable to apply video effect.",startSpotlightWhileMaxParticipantsAreSpotlighted:"Cannot start spotlight on participant(s) because the maximum number of participants are already spotlighted.",mutedByRemoteParticipant:"You were muted by another participant."};var notificationStack={callingNetworkFailure:{title:"Troubling connecting call",message:"You seem to be offline. Please check your network connection and try again.",closeButtonAriaLabel:"Close"},startVideoGeneric:{title:"Failed to start video.",closeButtonAriaLabel:"Close"},stopVideoGeneric:{title:"Failed to stop video.",closeButtonAriaLabel:"Close"},muteGeneric:{title:"Failed to mute microphone.",closeButtonAriaLabel:"Close"},unmuteGeneric:{title:"Failed to unmute microphone.",closeButtonAriaLabel:"Close"},speakingWhileMuted:{title:"You're muted.",closeButtonAriaLabel:"Close"},startScreenShareGeneric:{title:"There was an issue starting screen share.",closeButtonAriaLabel:"Close"},stopScreenShareGeneric:{title:"Failed to stop screen sharing.",closeButtonAriaLabel:"Close"},callNetworkQualityLow:{title:"Network quality is low.",closeButtonAriaLabel:"Close"},callNoSpeakerFound:{title:"No speakers or headphones found",message:"Connect an audio device to hear the call.",closeButtonAriaLabel:"Close"},callNoMicrophoneFound:{title:"No microphones found",message:"Connect an audio input device.",closeButtonAriaLabel:"Close"},callMicrophoneAccessDenied:{title:"Unable to access microphone",message:"Click the lock in the address bar to grant permission to this webpage.",closeButtonAriaLabel:"Close"},callMicrophoneAccessDeniedSafari:{title:"Unable to access microphone",message:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",closeButtonAriaLabel:"Close"},callMicrophoneMutedBySystem:{title:"You are muted by your system.",closeButtonAriaLabel:"Close"},callMicrophoneUnmutedBySystem:{title:"Your microphone recovered and you were unmuted by your system.",closeButtonAriaLabel:"Close"},callMacOsMicrophoneAccessDenied:{title:"Unable to access microphone",message:"Grant microphone permission in your macOS privacy settings.",closeButtonAriaLabel:"Close"},callLocalVideoFreeze:{title:"Network bandwidth is poor",message:"Your video may appear paused for others on the call.",closeButtonAriaLabel:"Close"},callCameraAccessDenied:{title:"Unable to access camera",message:"Click the lock in the address bar to grant permission to this webpage.",closeButtonAriaLabel:"Close"},callCameraAccessDeniedSafari:{title:"Unable to access camera",message:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",closeButtonAriaLabel:"Close"},callCameraAlreadyInUse:{title:"Unable to access camera",message:"It may already be in use by another application.",closeButtonAriaLabel:"Close"},callVideoStoppedBySystem:{title:"Your video has been stopped by your system.",closeButtonAriaLabel:"Close"},callVideoRecoveredBySystem:{title:"Your video has resumed.",closeButtonAriaLabel:"Close"},callMacOsCameraAccessDenied:{title:"MacOS is blocking access to your camera",message:"Update your privacy settings to allow this browser to access your camera.",closeButtonAriaLabel:"Close"},callMacOsScreenShareAccessDenied:{title:"MacOS is blocking screen sharing",message:"Update your privacy settings to allow this browser to record your screen.",closeButtonAriaLabel:"Close"},failedToJoinCallGeneric:{title:"Failed to join call.",closeButtonAriaLabel:"Close"},failedToJoinCallInvalidMeetingLink:{title:"Unable to join Meeting. Invalid Link.",closeButtonAriaLabel:"Close"},cameraFrozenForRemoteParticipants:{title:"Users in the call are having issues seeing your video",message:"Please check your devices and network.",closeButtonAriaLabel:"Close"},unableToStartVideoEffect:{title:"Unable to apply video effect.",closeButtonAriaLabel:"Close"},startSpotlightWhileMaxParticipantsAreSpotlighted:{title:"Cannot start spotlight on participant(s)",message:"The maximum number of participants are already spotlighted.",closeButtonAriaLabel:"Close"},mutedByRemoteParticipant:{title:"You were muted by another participant.",closeButtonAriaLabel:"Close"},recordingStarted:{title:"Recording has started.",message:"By joining, you are giving consent for this meeting to be transcribed.",closeButtonAriaLabel:"Close"},transcriptionStarted:{title:"Transcription has started.",message:"By joining, you are giving consent for this meeting to be transcribed.",closeButtonAriaLabel:"Close"},recordingStopped:{title:"Recording is being saved.",message:"Recording has stopped.",closeButtonAriaLabel:"Close"},transcriptionStopped:{title:"Transcription is being saved.",message:"Transcription has stopped.",closeButtonAriaLabel:"Close"},recordingAndTranscriptionStarted:{title:"Recording and transcription have started.",message:"By joining, you are giving consent for this meeting to be transcribed.",closeButtonAriaLabel:"Close"},recordingAndTranscriptionStopped:{title:"Recording and transcription are being saved.",message:"Recording and transcription have stopped.",closeButtonAriaLabel:"Close"},recordingStoppedStillTranscribing:{title:"Recording has stopped.",message:"You are now only transcribing this meeting.",closeButtonAriaLabel:"Close"},transcriptionStoppedStillRecording:{title:"Transcription has stopped.",message:"You are now only recording this meeting.",closeButtonAriaLabel:"Close"}};var videoGallery$k={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoMovementAriaLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed participant",fitRemoteParticipantToFrame:"Fit to frame",fillRemoteParticipantFrame:"Fill frame",pinParticipantForMe:"Pin for me",pinParticipantForMeLimitReached:"Pin (limit reached)",unpinParticipantForMe:"Unpin",pinParticipantMenuItemAriaLabel:"Pin {participantName}",unpinParticipantMenuItemAriaLabel:"Unpin {participantName}",pinnedParticipantAnnouncementAriaLabel:"Pinned {participantName}",unpinnedParticipantAnnouncementAriaLabel:"Unpinned {participantName}",startSpotlightVideoTileMenuLabel:"Spotlight for everyone",addSpotlightVideoTileMenuLabel:"Add spotlight",spotlightLimitReachedMenuTitle:"Spotlight limit reached",stopSpotlightVideoTileMenuLabel:"Stop spotlighting",stopSpotlightOnSelfVideoTileMenuLabel:"Exit spotlight",attendeeRole:"Attendee",muteParticipantMenuItemLabel:"Mute"};var dialpad$k={placeholderText:"Enter phone number",deleteButtonAriaLabel:"Delete"};var holdButton$k={onLabel:"Resume",offLabel:"Hold",tooltipOnContent:"Resume call",tooltipOffContent:"Hold call"};var videoTile$k={participantStateRinging:"Calling...",participantStateHold:"On hold",moreOptionsButtonAriaLabel:"More Options"};var CameraAndMicrophoneSitePermissionsRequest$k={primaryText:"Allow {appName} to use your camera and microphone",secondaryText:"This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera and microphone",ariaLabel:"Allow camera and microphone access"};var CameraSitePermissionsRequest$k={primaryText:"Allow {appName} to use your camera",secondaryText:"This is so participants can see you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera",ariaLabel:"Allow camera access"};var MicrophoneSitePermissionsRequest$k={primaryText:"Allow {appName} to use your microphone",secondaryText:"This is so participants can hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without microphone",ariaLabel:"Allow microphone access"};var CameraAndMicrophoneSitePermissionsCheck$k={primaryText:"Checking for camera and microphone access",secondaryText:"Allow access if prompted. This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera and microphone",ariaLabel:"Checking for camera and microphone access. Allow access if prompted."};var CameraSitePermissionsCheck$k={primaryText:"Checking for camera access",secondaryText:"Allow access if prompted. This is so participants can see you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera",ariaLabel:"Checking for camera access. Allow access if prompted."};var MicrophoneSitePermissionsCheck$k={primaryText:"Checking for microphone access",secondaryText:"Allow access if prompted. This is so participants can hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without microphone",ariaLabel:"Checking for microphone access. Allow access if prompted."};var CameraAndMicrophoneSitePermissionsDenied$k={primaryText:"Unable to access camera and microphone",secondaryText:"Click the lock icon in the address bar to grant microphone permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without camera and microphone",linkText:"Need help? Get troubleshooting help"};var CameraAndMicrophoneSitePermissionsDeniedSafari$k={primaryText:"Unable to access camera and microphone",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without camera and microphone",linkText:"Need help? Get troubleshooting help"};var CameraSitePermissionsDenied$k={primaryText:"Unable to access camera",secondaryText:"Click the lock icon in the address bar to grant camera permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without camera",linkText:"Need help? Get troubleshooting help"};var MicrophoneSitePermissionsDenied$k={primaryText:"Unable to access microphone",secondaryText:"Click the lock icon in the address bar to grant microphone permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without microphone",linkText:"Need help? Get troubleshooting help"};var CameraSitePermissionsDeniedSafari$k={primaryText:"Unable to access camera",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without camera",linkText:"Need help? Get troubleshooting help"};var MicrophoneSitePermissionsDeniedSafari$k={primaryText:"Unable to access microphone",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without microphone",linkText:"Need help? Get troubleshooting help"};var UnsupportedBrowser$l={primaryText:"Browser not supported",secondaryText:"Please join this call using a compatible browser.",moreHelpLinkText:"See compatibility requirements"};var UnsupportedBrowserVersion$l={primaryText:"Browser update needed",secondaryText:"To ensure the best call possible, please update your browser and then try joining the call again.",moreHelpLinkText:"See compatibility requirements",continueAnywayButtonText:"Start call without updating"};var UnsupportedOperatingSystem$l={primaryText:"Operating system not supported",secondaryText:"Please join this call using a device with a compatible operating system.",moreHelpLinkText:"See compatibility requirements"};var BrowserPermissionDenied$k={primaryText:"Can't use your camera or microphone",secondaryText:"Your browser might not have access to your camera or microphone. To fix this, open System Preferences.",primaryButtonText:"Try again",linkText:"Need help? Get troubleshooting help"};var BrowserPermissionDeniedIOS$k={primaryText:"Allow microphone access to continue",secondaryText:"So other participants can hear you.",primaryButtonText:"Try again",imageAltText:"Microphone and camera device permission location for iOS",linkText:"Need help? Get troubleshooting help",step1Text:"Go to the Settings app",step2Text:"Scroll down to settings for this browser",step3Text:"Turn on Microphone (Camera optional)",step4Text:"Try joining the call again",step1DigitText:"1",step2DigitText:"2",step3DigitText:"3",step4DigitText:"4"};var verticalGallery$k={leftNavButtonAriaLabel:"previous page",rightNavButtonAriaLabel:"next page"};var MeetingConferencePhoneInfo$k={meetingConferencePhoneInfoModalTitle:"Join call from your phone",meetingConferencePhoneInfoModalDialIn:"Dial number",meetingConferencePhoneInfoModalMeetingId:"Enter meeting ID",meetingConferencePhoneInfoModalWait:"Wait to be admitted by organizer",meetingConferencePhoneInfoModalNoPhoneAvailable:"No phone available",meetingConferencePhoneInfoModalTollGeoData:"{country}, {city}",meetingConferencePhoneInfoModalTollFree:"(Toll-free)",meetingConferencePhoneInfoModalToll:"(Toll)"};var en_US$1 = {participantItem:participantItem$k,ParticipantList:ParticipantList$l,typingIndicator:typingIndicator$k,sendBox:sendBox$k,richTextSendBox:richTextSendBox$k,mentionPopover:mentionPopover$k,imageOverlay:imageOverlay$k,messageStatusIndicator:messageStatusIndicator$k,endCallButton:endCallButton$k,cameraButton:cameraButton$k,microphoneButton:microphoneButton$k,devicesButton:devicesButton$k,participantsButton:participantsButton$k,screenShareButton:screenShareButton$k,raiseHandButton:raiseHandButton$k,reactionButton:reactionButton$k,messageThread:messageThread$k,errorBar:errorBar$k,notificationStack:notificationStack,videoGallery:videoGallery$k,dialpad:dialpad$k,holdButton:holdButton$k,videoTile:videoTile$k,CameraAndMicrophoneSitePermissionsRequest:CameraAndMicrophoneSitePermissionsRequest$k,CameraSitePermissionsRequest:CameraSitePermissionsRequest$k,MicrophoneSitePermissionsRequest:MicrophoneSitePermissionsRequest$k,CameraAndMicrophoneSitePermissionsCheck:CameraAndMicrophoneSitePermissionsCheck$k,CameraSitePermissionsCheck:CameraSitePermissionsCheck$k,MicrophoneSitePermissionsCheck:MicrophoneSitePermissionsCheck$k,CameraAndMicrophoneSitePermissionsDenied:CameraAndMicrophoneSitePermissionsDenied$k,CameraAndMicrophoneSitePermissionsDeniedSafari:CameraAndMicrophoneSitePermissionsDeniedSafari$k,CameraSitePermissionsDenied:CameraSitePermissionsDenied$k,MicrophoneSitePermissionsDenied:MicrophoneSitePermissionsDenied$k,CameraSitePermissionsDeniedSafari:CameraSitePermissionsDeniedSafari$k,MicrophoneSitePermissionsDeniedSafari:MicrophoneSitePermissionsDeniedSafari$k,UnsupportedBrowser:UnsupportedBrowser$l,UnsupportedBrowserVersion:UnsupportedBrowserVersion$l,UnsupportedOperatingSystem:UnsupportedOperatingSystem$l,BrowserPermissionDenied:BrowserPermissionDenied$k,BrowserPermissionDeniedIOS:BrowserPermissionDeniedIOS$k,verticalGallery:verticalGallery$k,MeetingConferencePhoneInfo:MeetingConferencePhoneInfo$k};
|
5919
5936
|
|
5920
5937
|
// Copyright (c) Microsoft Corporation.
|
5921
5938
|
// Licensed under the MIT License.
|
@@ -6430,8 +6447,23 @@ const customNotificationIconName = {
|
|
6430
6447
|
callMacOsCameraAccessDenied: 'ErrorBarCallMacOsCameraAccessDenied',
|
6431
6448
|
/* @conditional-compile-remove(soft-mute) */
|
6432
6449
|
mutedByRemoteParticipant: 'ErrorBarMutedByRemoteParticipant',
|
6450
|
+
speakingWhileMuted: 'ErrorBarCallMicrophoneMutedBySystem',
|
6451
|
+
/* @conditional-compile-remove(notifications) */
|
6452
|
+
recordingStarted: 'NotificationBarRecording',
|
6453
|
+
/* @conditional-compile-remove(notifications) */
|
6454
|
+
transcriptionStarted: 'NotificationBarRecording',
|
6455
|
+
/* @conditional-compile-remove(notifications) */
|
6456
|
+
recordingStopped: 'NotificationBarRecording',
|
6457
|
+
/* @conditional-compile-remove(notifications) */
|
6458
|
+
transcriptionStopped: 'NotificationBarRecording',
|
6433
6459
|
/* @conditional-compile-remove(notifications) */
|
6434
|
-
|
6460
|
+
recordingAndTranscriptionStarted: 'NotificationBarRecording',
|
6461
|
+
/* @conditional-compile-remove(notifications) */
|
6462
|
+
recordingAndTranscriptionStopped: 'NotificationBarRecording',
|
6463
|
+
/* @conditional-compile-remove(notifications) */
|
6464
|
+
recordingStoppedStillTranscribing: 'NotificationBarRecording',
|
6465
|
+
/* @conditional-compile-remove(notifications) */
|
6466
|
+
transcriptionStoppedStillRecording: 'NotificationBarRecording'
|
6435
6467
|
};
|
6436
6468
|
/**
|
6437
6469
|
* @private
|
@@ -7132,6 +7164,8 @@ const DEFAULT_COMPONENT_ICONS = {
|
|
7132
7164
|
ErrorBarCallVideoStoppedBySystem: React.createElement(reactIcons.VideoProhibited16Filled, null),
|
7133
7165
|
/* @conditional-compile-remove(soft-mute) */
|
7134
7166
|
ErrorBarMutedByRemoteParticipant: React.createElement(reactIcons.MicOff16Regular, null),
|
7167
|
+
/* @conditional-compile-remove(notifications) */
|
7168
|
+
NotificationBarRecording: React.createElement(reactIcons.Record16Regular, null),
|
7135
7169
|
HorizontalGalleryLeftButton: React.createElement(GalleryLeftButton, null),
|
7136
7170
|
HorizontalGalleryRightButton: React.createElement(GalleryRightButton, null),
|
7137
7171
|
MessageDelivered: React.createElement(reactIcons.CheckmarkCircle16Regular, null),
|
@@ -8363,7 +8397,7 @@ const _MentionPopover = (props) => {
|
|
8363
8397
|
|
8364
8398
|
// Copyright (c) Microsoft Corporation.
|
8365
8399
|
// Licensed under the MIT License.
|
8366
|
-
var __awaiter$
|
8400
|
+
var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8367
8401
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
8368
8402
|
return new (P || (P = Promise))(function (resolve, reject) {
|
8369
8403
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -8549,7 +8583,7 @@ const TextFieldWithMention = (props) => {
|
|
8549
8583
|
onSuggestionSelected,
|
8550
8584
|
updateMentionSuggestions
|
8551
8585
|
]);
|
8552
|
-
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$
|
8586
|
+
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$F(void 0, void 0, void 0, function* () {
|
8553
8587
|
var _a;
|
8554
8588
|
let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== void 0 ? _a : [];
|
8555
8589
|
suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');
|
@@ -8726,7 +8760,7 @@ const TextFieldWithMention = (props) => {
|
|
8726
8760
|
});
|
8727
8761
|
}
|
8728
8762
|
}, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
|
8729
|
-
const handleOnChange = React.useCallback((_b) => __awaiter$
|
8763
|
+
const handleOnChange = React.useCallback((_b) => __awaiter$F(void 0, [_b], void 0, function* ({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) {
|
8730
8764
|
var _c;
|
8731
8765
|
debouncedQueryUpdate.cancel();
|
8732
8766
|
if (event.currentTarget === null) {
|
@@ -9235,7 +9269,7 @@ const ATTACHMENT_CARD_MIN_PROGRESS = 0.05;
|
|
9235
9269
|
|
9236
9270
|
// Copyright (c) Microsoft Corporation.
|
9237
9271
|
// Licensed under the MIT License.
|
9238
|
-
var __awaiter$
|
9272
|
+
var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9239
9273
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9240
9274
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9241
9275
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9317,7 +9351,7 @@ const MappedMenuItems = (menuActions, attachment, handleOnClickError) => {
|
|
9317
9351
|
React.createElement(reactComponents.MenuTrigger, null,
|
9318
9352
|
React.createElement(reactComponents.ToolbarButton, { "aria-label": localeStrings.attachmentMoreMenu, role: "button", icon: React.createElement(react.Icon, { iconName: "AttachmentMoreMenu" }) }))),
|
9319
9353
|
React.createElement(reactComponents.MenuPopover, null,
|
9320
|
-
React.createElement(reactComponents.MenuList, null, menuActions.map((menuItem, index) => (React.createElement(reactComponents.MenuItem, { "aria-label": menuItem.name, key: index, icon: menuItem.icon, onClick: () => __awaiter$
|
9354
|
+
React.createElement(reactComponents.MenuList, null, menuActions.map((menuItem, index) => (React.createElement(reactComponents.MenuItem, { "aria-label": menuItem.name, key: index, icon: menuItem.icon, onClick: () => __awaiter$E(void 0, void 0, void 0, function* () {
|
9321
9355
|
try {
|
9322
9356
|
yield menuItem.onClick(attachment);
|
9323
9357
|
}
|
@@ -9474,6 +9508,27 @@ const hasIncompleteAttachmentUploads = (attachmentsWithProgress) => {
|
|
9474
9508
|
const isAttachmentUploadCompleted = (attachmentsWithProgress) => {
|
9475
9509
|
return !!(attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.find((attachment) => !attachment.error));
|
9476
9510
|
};
|
9511
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
9512
|
+
/**
|
9513
|
+
* @internal
|
9514
|
+
*/
|
9515
|
+
// Before sending the image, we need to add the image id we get back after uploading the images to the message content.
|
9516
|
+
const addUploadedImagesToMessage = (message, uploadInlineImages) => {
|
9517
|
+
if (message === '') {
|
9518
|
+
return message;
|
9519
|
+
}
|
9520
|
+
const document = new DOMParser().parseFromString(message !== null && message !== void 0 ? message : '', 'text/html');
|
9521
|
+
document.querySelectorAll('img').forEach((img) => {
|
9522
|
+
var _a;
|
9523
|
+
if (!img.id) {
|
9524
|
+
const uploadInlineImage = uploadInlineImages.find((imageUpload) => !imageUpload.error && (imageUpload.url === img.src || imageUpload.id === img.id));
|
9525
|
+
img.id = (_a = uploadInlineImage === null || uploadInlineImage === void 0 ? void 0 : uploadInlineImage.id) !== null && _a !== void 0 ? _a : '';
|
9526
|
+
img.src = '';
|
9527
|
+
}
|
9528
|
+
});
|
9529
|
+
const newMessage = document.body.innerHTML;
|
9530
|
+
return newMessage;
|
9531
|
+
};
|
9477
9532
|
/**
|
9478
9533
|
* @private
|
9479
9534
|
*/
|
@@ -9510,6 +9565,66 @@ hasCompletedAttachmentUploads, hasError, disabled }) => {
|
|
9510
9565
|
hasError ||
|
9511
9566
|
disabled);
|
9512
9567
|
};
|
9568
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
9569
|
+
/**
|
9570
|
+
* @internal
|
9571
|
+
*/
|
9572
|
+
const cancelInlineImageUpload = (imageSrcArray, imageUploadsInProgress, onCancelInlineImageUpload) => {
|
9573
|
+
if (imageSrcArray && imageUploadsInProgress && (imageUploadsInProgress === null || imageUploadsInProgress === void 0 ? void 0 : imageUploadsInProgress.length) > 0) {
|
9574
|
+
imageUploadsInProgress === null || imageUploadsInProgress === void 0 ? void 0 : imageUploadsInProgress.map((uploadImage) => {
|
9575
|
+
if (uploadImage.url && imageSrcArray && !(imageSrcArray === null || imageSrcArray === void 0 ? void 0 : imageSrcArray.includes(uploadImage.url))) {
|
9576
|
+
onCancelInlineImageUpload === null || onCancelInlineImageUpload === void 0 ? void 0 : onCancelInlineImageUpload(uploadImage.id);
|
9577
|
+
}
|
9578
|
+
});
|
9579
|
+
}
|
9580
|
+
};
|
9581
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9582
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
9583
|
+
/**
|
9584
|
+
* @internal
|
9585
|
+
*/
|
9586
|
+
const toAttachmentMetadata = (attachmentsWithProgress,
|
9587
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */ attachmentType) => {
|
9588
|
+
return attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.filter((attachment) => {
|
9589
|
+
var _a;
|
9590
|
+
return !('error' in attachment) && !((_a = attachment.error) === null || _a === void 0 ? void 0 : _a.message);
|
9591
|
+
}).map((attachment) => {
|
9592
|
+
let url = attachment.url || '';
|
9593
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
9594
|
+
if (attachmentType === 'image') {
|
9595
|
+
url = '';
|
9596
|
+
}
|
9597
|
+
return {
|
9598
|
+
id: attachment.id,
|
9599
|
+
name: attachment.name,
|
9600
|
+
url,
|
9601
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
9602
|
+
attachmentType: attachmentType
|
9603
|
+
};
|
9604
|
+
});
|
9605
|
+
};
|
9606
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9607
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
9608
|
+
/**
|
9609
|
+
* @internal
|
9610
|
+
*/
|
9611
|
+
const insertAttachmentsAndImages = (content, attachments, imageUploadsInProgress) => {
|
9612
|
+
if (!attachments && !imageUploadsInProgress) {
|
9613
|
+
return { content, attachmentArray: undefined };
|
9614
|
+
}
|
9615
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9616
|
+
let attachmentArray = toAttachmentMetadata(attachments);
|
9617
|
+
let newContent = content;
|
9618
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
9619
|
+
if (imageUploadsInProgress) {
|
9620
|
+
newContent = addUploadedImagesToMessage(content, imageUploadsInProgress);
|
9621
|
+
const imageArray = toAttachmentMetadata(imageUploadsInProgress, 'image');
|
9622
|
+
if (imageArray) {
|
9623
|
+
attachmentArray = attachmentArray ? attachmentArray === null || attachmentArray === void 0 ? void 0 : attachmentArray.concat(imageArray) : imageArray;
|
9624
|
+
}
|
9625
|
+
}
|
9626
|
+
return { content: newContent, attachmentArray };
|
9627
|
+
};
|
9513
9628
|
|
9514
9629
|
// Copyright (c) Microsoft Corporation.
|
9515
9630
|
// Licensed under the MIT License.
|
@@ -10335,6 +10450,9 @@ const richTextEditorWrapperStyle = (theme, addTopOffset) => {
|
|
10335
10450
|
verticalAlign: 'top'
|
10336
10451
|
}
|
10337
10452
|
}
|
10453
|
+
},
|
10454
|
+
'& img': {
|
10455
|
+
width: '119px'
|
10338
10456
|
}
|
10339
10457
|
});
|
10340
10458
|
};
|
@@ -10533,7 +10651,7 @@ const insertTableMenuCellButtonStyles = (theme) => {
|
|
10533
10651
|
return {
|
10534
10652
|
width: '24px',
|
10535
10653
|
height: '24px',
|
10536
|
-
border: `solid
|
10654
|
+
border: `solid 1px ${theme.palette.neutralSecondaryAlt}`,
|
10537
10655
|
cursor: 'pointer',
|
10538
10656
|
background: 'transparent'
|
10539
10657
|
};
|
@@ -10544,7 +10662,7 @@ const insertTableMenuCellButtonStyles = (theme) => {
|
|
10544
10662
|
const insertTableMenuCellButtonSelectedStyles = (theme) => {
|
10545
10663
|
return {
|
10546
10664
|
background: theme.palette.themePrimary,
|
10547
|
-
border: `solid
|
10665
|
+
border: `solid 1px ${theme.palette.themeLighterAlt}`
|
10548
10666
|
};
|
10549
10667
|
};
|
10550
10668
|
/**
|
@@ -10562,7 +10680,7 @@ const insertTableMenuFocusZone = (theme) => {
|
|
10562
10680
|
return react.mergeStyles({
|
10563
10681
|
display: 'inline-grid',
|
10564
10682
|
gridTemplateColumns: 'auto auto auto auto auto',
|
10565
|
-
border: `solid
|
10683
|
+
border: `solid 1px ${theme.palette.neutralSecondaryAlt}`
|
10566
10684
|
});
|
10567
10685
|
};
|
10568
10686
|
/**
|
@@ -10670,6 +10788,8 @@ class CopyPastePlugin {
|
|
10670
10788
|
dispose() { }
|
10671
10789
|
onPluginEvent(event) {
|
10672
10790
|
handleBeforePasteEvent(event, /* @conditional-compile-remove(rich-text-editor-image-upload) */ this.onPaste);
|
10791
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
10792
|
+
handleInlineImage(event, this.onUploadInlineImage);
|
10673
10793
|
if (this.editor !== null && !this.editor.isDisposed()) {
|
10674
10794
|
// scroll the editor to the correct position after pasting content
|
10675
10795
|
scrollToBottomAfterContentPaste(event);
|
@@ -10685,6 +10805,29 @@ const handleBeforePasteEvent = (event,
|
|
10685
10805
|
return;
|
10686
10806
|
}
|
10687
10807
|
};
|
10808
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
10809
|
+
/**
|
10810
|
+
* @internal
|
10811
|
+
* Exported only for unit testing
|
10812
|
+
*/
|
10813
|
+
const handleInlineImage = (event, onUploadInlineImage) => {
|
10814
|
+
if (event.eventType === PluginEventType.BeforePaste && event.pasteType === 'normal' && onUploadInlineImage) {
|
10815
|
+
event.fragment.querySelectorAll('img').forEach((image) => {
|
10816
|
+
const clipboardImage = event.clipboardData.image;
|
10817
|
+
const fileName = (clipboardImage === null || clipboardImage === void 0 ? void 0 : clipboardImage.name) || (clipboardImage === null || clipboardImage === void 0 ? void 0 : clipboardImage.type.replace('/', '.')) || 'image.png';
|
10818
|
+
// If the image src is an external url, call the onUploadInlineImage callback with the url.
|
10819
|
+
let imageUrl = image.src;
|
10820
|
+
if (image.src.startsWith('data:image/')) {
|
10821
|
+
const blobImage = _base64ToBlob(image.src);
|
10822
|
+
imageUrl = URL.createObjectURL(blobImage);
|
10823
|
+
}
|
10824
|
+
onUploadInlineImage(imageUrl, fileName);
|
10825
|
+
image.src = imageUrl;
|
10826
|
+
image.alt = image.alt || 'image';
|
10827
|
+
image.style.width = '119px'; // TODO: find a way to get the original width and height of the image
|
10828
|
+
});
|
10829
|
+
}
|
10830
|
+
};
|
10688
10831
|
/**
|
10689
10832
|
* Update the scroll position of the editor after pasting content to ensure the content is visible.
|
10690
10833
|
* @param event - The plugin event.
|
@@ -10759,6 +10902,11 @@ var UpdateEvent;
|
|
10759
10902
|
UpdateEvent["UserInput"] = "UserInput";
|
10760
10903
|
UpdateEvent["Blur"] = "Blur";
|
10761
10904
|
})(UpdateEvent || (UpdateEvent = {}));
|
10905
|
+
var Keys;
|
10906
|
+
(function (Keys) {
|
10907
|
+
Keys[Keys["BACKSPACE"] = 8] = "BACKSPACE";
|
10908
|
+
Keys[Keys["DELETE"] = 46] = "DELETE";
|
10909
|
+
})(Keys || (Keys = {}));
|
10762
10910
|
/**
|
10763
10911
|
* A plugin to handle content update
|
10764
10912
|
*/
|
@@ -10796,9 +10944,11 @@ class UpdateContentPlugin {
|
|
10796
10944
|
}
|
10797
10945
|
}
|
10798
10946
|
onPluginEvent(event) {
|
10947
|
+
var _a;
|
10799
10948
|
if (this.onUpdate === null) {
|
10800
10949
|
return;
|
10801
10950
|
}
|
10951
|
+
let imageSrcArray;
|
10802
10952
|
switch (event.eventType) {
|
10803
10953
|
case PluginEventType.EditorReady:
|
10804
10954
|
this.onUpdate(UpdateEvent.Init);
|
@@ -10807,7 +10957,26 @@ class UpdateContentPlugin {
|
|
10807
10957
|
this.onUpdate(UpdateEvent.Dispose);
|
10808
10958
|
break;
|
10809
10959
|
case PluginEventType.ContentChanged:
|
10810
|
-
|
10960
|
+
if (event.source.toLowerCase() === 'cut' ||
|
10961
|
+
(event.source.toLowerCase() === 'keyboard' && (event.data === Keys.BACKSPACE || event.data === Keys.DELETE))) {
|
10962
|
+
(_a = event.contentModel) === null || _a === void 0 ? void 0 : _a.blocks.map((block) => {
|
10963
|
+
if (block.blockType === 'Paragraph') {
|
10964
|
+
const segments = block.segments;
|
10965
|
+
segments.map((segment) => {
|
10966
|
+
if (segment.segmentType === 'Image') {
|
10967
|
+
if (!imageSrcArray) {
|
10968
|
+
imageSrcArray = [];
|
10969
|
+
}
|
10970
|
+
imageSrcArray === null || imageSrcArray === void 0 ? void 0 : imageSrcArray.push(segment.src);
|
10971
|
+
}
|
10972
|
+
});
|
10973
|
+
}
|
10974
|
+
});
|
10975
|
+
}
|
10976
|
+
else {
|
10977
|
+
imageSrcArray = undefined;
|
10978
|
+
}
|
10979
|
+
this.onUpdate(UpdateEvent.ContentChanged, imageSrcArray);
|
10811
10980
|
break;
|
10812
10981
|
case PluginEventType.Input:
|
10813
10982
|
this.onUpdate(UpdateEvent.UserInput);
|
@@ -11443,7 +11612,9 @@ class PlaceholderPlugin extends roosterjsContentModelPlugins.WatermarkPlugin {
|
|
11443
11612
|
const RichTextEditor = React.forwardRef((props, ref) => {
|
11444
11613
|
const { initialContent, onChange, placeholderText, strings, showRichTextEditorFormatting, autoFocus, onKeyDown, onContentModelUpdate, contentModel,
|
11445
11614
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
11446
|
-
onPaste
|
11615
|
+
onPaste,
|
11616
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
11617
|
+
onUploadInlineImage } = props;
|
11447
11618
|
const editor = React.useRef(null);
|
11448
11619
|
const editorDiv = React.useRef(null);
|
11449
11620
|
const theme = useTheme();
|
@@ -11457,15 +11628,18 @@ const RichTextEditor = React.forwardRef((props, ref) => {
|
|
11457
11628
|
},
|
11458
11629
|
setEmptyContent() {
|
11459
11630
|
if (editor.current) {
|
11460
|
-
editor.current.formatContentModel;
|
11461
11631
|
// remove all content from the editor and update the model
|
11462
11632
|
// ContentChanged event will be sent by RoosterJS automatically
|
11463
11633
|
editor.current.formatContentModel((model) => {
|
11464
|
-
|
11634
|
+
// Create a new empty paragraph with selection marker
|
11635
|
+
// this is needed for correct processing of images after the content is deleted
|
11636
|
+
const block = roosterjsContentModelDom.createParagraph(true);
|
11637
|
+
setSelectionAfterLastSegment(model, block);
|
11638
|
+
model.blocks = [block];
|
11465
11639
|
return true;
|
11466
11640
|
});
|
11467
11641
|
//reset content model
|
11468
|
-
onContentModelUpdate && onContentModelUpdate(
|
11642
|
+
onContentModelUpdate && onContentModelUpdate(editor.current.getContentModelCopy('disconnected'));
|
11469
11643
|
}
|
11470
11644
|
},
|
11471
11645
|
getPlainContent() {
|
@@ -11508,9 +11682,12 @@ const RichTextEditor = React.forwardRef((props, ref) => {
|
|
11508
11682
|
const updatePlugin = React.useMemo(() => {
|
11509
11683
|
return new UpdateContentPlugin();
|
11510
11684
|
}, []);
|
11685
|
+
const copyPastePlugin = React.useMemo(() => {
|
11686
|
+
return new CopyPastePlugin();
|
11687
|
+
}, []);
|
11511
11688
|
React.useEffect(() => {
|
11512
11689
|
// don't set callback in plugin constructor to update callback without plugin recreation
|
11513
|
-
updatePlugin.onUpdate = (event) => {
|
11690
|
+
updatePlugin.onUpdate = (event, imageSrcArray) => {
|
11514
11691
|
if (editor.current === null) {
|
11515
11692
|
return;
|
11516
11693
|
}
|
@@ -11518,10 +11695,14 @@ const RichTextEditor = React.forwardRef((props, ref) => {
|
|
11518
11695
|
onContentModelUpdate && onContentModelUpdate(editor.current.getContentModelCopy('disconnected'));
|
11519
11696
|
}
|
11520
11697
|
else {
|
11521
|
-
onChange && onChange(roosterjsContentModelCore.exportContent(editor.current));
|
11698
|
+
onChange && onChange(roosterjsContentModelCore.exportContent(editor.current), imageSrcArray);
|
11522
11699
|
}
|
11523
11700
|
};
|
11524
11701
|
}, [onChange, onContentModelUpdate, updatePlugin]);
|
11702
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
11703
|
+
React.useEffect(() => {
|
11704
|
+
copyPastePlugin.onUploadInlineImage = onUploadInlineImage;
|
11705
|
+
}, [copyPastePlugin, onUploadInlineImage]);
|
11525
11706
|
const keyboardInputPlugin = React.useMemo(() => {
|
11526
11707
|
return new KeyboardInputPlugin();
|
11527
11708
|
}, []);
|
@@ -11545,9 +11726,6 @@ const RichTextEditor = React.forwardRef((props, ref) => {
|
|
11545
11726
|
const onContextMenuDismiss = React.useCallback(() => {
|
11546
11727
|
setContextMenuProps(null);
|
11547
11728
|
}, []);
|
11548
|
-
const copyPastePlugin = React.useMemo(() => {
|
11549
|
-
return new CopyPastePlugin();
|
11550
|
-
}, []);
|
11551
11729
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
11552
11730
|
React.useEffect(() => {
|
11553
11731
|
copyPastePlugin.onPaste = onPaste;
|
@@ -11645,13 +11823,16 @@ const createEditorInitialModel = (initialContent, contentModel) => {
|
|
11645
11823
|
lastBlock = roosterjsContentModelDom.createParagraph(true);
|
11646
11824
|
initialModel.blocks.push(lastBlock);
|
11647
11825
|
}
|
11648
|
-
|
11649
|
-
lastBlock.segments.push(marker);
|
11650
|
-
roosterjsContentModelDom.setSelection(initialModel, marker);
|
11826
|
+
setSelectionAfterLastSegment(initialModel, lastBlock);
|
11651
11827
|
}
|
11652
11828
|
return initialModel;
|
11653
11829
|
}
|
11654
11830
|
};
|
11831
|
+
const setSelectionAfterLastSegment = (model, block) => {
|
11832
|
+
const marker = roosterjsContentModelDom.createSelectionMarker();
|
11833
|
+
block.segments.push(marker);
|
11834
|
+
roosterjsContentModelDom.setSelection(model, marker);
|
11835
|
+
};
|
11655
11836
|
|
11656
11837
|
// Copyright (c) Microsoft Corporation.
|
11657
11838
|
// Licensed under the MIT License.
|
@@ -11695,7 +11876,9 @@ const RichTextInputBoxComponent = (props) => {
|
|
11695
11876
|
/* @conditional-compile-remove(file-sharing-acs) */
|
11696
11877
|
onRenderAttachmentUploads,
|
11697
11878
|
/* @conditional-compile-remove(file-sharing-acs) */
|
11698
|
-
hasAttachments, richTextEditorStyleProps, isHorizontalLayoutDisabled = false, autoFocus, onTyping
|
11879
|
+
hasAttachments, richTextEditorStyleProps, isHorizontalLayoutDisabled = false, autoFocus, onTyping,
|
11880
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
11881
|
+
onUploadInlineImage } = props;
|
11699
11882
|
const theme = useTheme();
|
11700
11883
|
// undefined is used to indicate that the rich text editor toolbar state wasn't changed yet
|
11701
11884
|
const [showRichTextEditorFormatting, setShowRichTextEditorFormatting] = React.useState(undefined);
|
@@ -11768,7 +11951,9 @@ const RichTextInputBoxComponent = (props) => {
|
|
11768
11951
|
React.createElement(react.Stack.Item, { className: inputBoxRichTextStackItemStyle },
|
11769
11952
|
React.createElement(RichTextEditor, { contentModel: contentModel, initialContent: initialContent, placeholderText: placeholderText, onChange: onChange, onKeyDown: onKeyDown, ref: editorComponentRef, strings: strings, showRichTextEditorFormatting: showRichTextEditorFormatting === true, styles: richTextEditorStyle, autoFocus: autoFocus, onContentModelUpdate: onContentModelUpdate,
|
11770
11953
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
11771
|
-
onPaste: props.onPaste
|
11954
|
+
onPaste: props.onPaste,
|
11955
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
11956
|
+
onUploadInlineImage: onUploadInlineImage })), /* @conditional-compile-remove(file-sharing-acs) */
|
11772
11957
|
onRenderAttachmentUploads && onRenderAttachmentUploads()),
|
11773
11958
|
actionButtons)));
|
11774
11959
|
};
|
@@ -11853,7 +12038,13 @@ const RichTextSendBox = (props) => {
|
|
11853
12038
|
/* @conditional-compile-remove(file-sharing-acs) */
|
11854
12039
|
onCancelAttachmentUpload,
|
11855
12040
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
11856
|
-
onPaste
|
12041
|
+
onPaste,
|
12042
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12043
|
+
onUploadInlineImage,
|
12044
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12045
|
+
imageUploadsInProgress,
|
12046
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12047
|
+
onCancelInlineImageUpload } = props;
|
11857
12048
|
const theme = useTheme();
|
11858
12049
|
const locale = useLocale$1();
|
11859
12050
|
const localeStrings = React.useMemo(() => {
|
@@ -11878,6 +12069,22 @@ const RichTextSendBox = (props) => {
|
|
11878
12069
|
setContentValueOverflow(isMessageTooLong(newValue.length));
|
11879
12070
|
setContentValue(newValue);
|
11880
12071
|
}, []);
|
12072
|
+
const onChangeHandler = React.useCallback((newValue,
|
12073
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */ imageSrcArray) => {
|
12074
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12075
|
+
if (imageSrcArray && imageUploadsInProgress && (imageUploadsInProgress === null || imageUploadsInProgress === void 0 ? void 0 : imageUploadsInProgress.length) > 0) {
|
12076
|
+
imageUploadsInProgress === null || imageUploadsInProgress === void 0 ? void 0 : imageUploadsInProgress.map((uploadImage) => {
|
12077
|
+
if (uploadImage.url && imageSrcArray && !(imageSrcArray === null || imageSrcArray === void 0 ? void 0 : imageSrcArray.includes(uploadImage.url))) {
|
12078
|
+
onCancelInlineImageUpload === null || onCancelInlineImageUpload === void 0 ? void 0 : onCancelInlineImageUpload(uploadImage.id);
|
12079
|
+
}
|
12080
|
+
});
|
12081
|
+
}
|
12082
|
+
setContent(newValue);
|
12083
|
+
}, [
|
12084
|
+
setContent,
|
12085
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */ onCancelInlineImageUpload,
|
12086
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */ imageUploadsInProgress
|
12087
|
+
]);
|
11881
12088
|
const hasContent = React.useMemo(() => {
|
11882
12089
|
var _a;
|
11883
12090
|
// get plain text content from the editor to check if the message is empty
|
@@ -11885,20 +12092,6 @@ const RichTextSendBox = (props) => {
|
|
11885
12092
|
const plainTextContent = (_a = editorComponentRef.current) === null || _a === void 0 ? void 0 : _a.getPlainContent();
|
11886
12093
|
return sanitizeText(contentValue !== null && contentValue !== void 0 ? contentValue : '').length > 0 && sanitizeText(plainTextContent !== null && plainTextContent !== void 0 ? plainTextContent : '').length > 0;
|
11887
12094
|
}, [contentValue]);
|
11888
|
-
/* @conditional-compile-remove(file-sharing-acs) */
|
11889
|
-
const toAttachmentMetadata = React.useCallback((attachmentsWithProgress) => {
|
11890
|
-
return attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.filter((attachment) => {
|
11891
|
-
var _a;
|
11892
|
-
return !('error' in attachment) && !((_a = attachment.error) === null || _a === void 0 ? void 0 : _a.message);
|
11893
|
-
}).map((attachment) => {
|
11894
|
-
var _a;
|
11895
|
-
return {
|
11896
|
-
id: attachment.id,
|
11897
|
-
name: attachment.name,
|
11898
|
-
url: (_a = attachment.url) !== null && _a !== void 0 ? _a : ''
|
11899
|
-
};
|
11900
|
-
});
|
11901
|
-
}, []);
|
11902
12095
|
const sendMessageOnClick = React.useCallback(() => {
|
11903
12096
|
var _a, _b;
|
11904
12097
|
if (disabled || contentValueOverflow) {
|
@@ -11908,19 +12101,32 @@ const RichTextSendBox = (props) => {
|
|
11908
12101
|
/* @conditional-compile-remove(file-sharing-acs) */
|
11909
12102
|
setAttachmentUploadsPendingError(undefined);
|
11910
12103
|
/* @conditional-compile-remove(file-sharing-acs) */
|
11911
|
-
|
12104
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12105
|
+
if (
|
12106
|
+
/* @conditional-compile-remove(file-sharing-acs) */ hasIncompleteAttachmentUploads(attachments) ||
|
12107
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */ hasIncompleteAttachmentUploads(imageUploadsInProgress)) {
|
11912
12108
|
setAttachmentUploadsPendingError({ message: strings.attachmentUploadsPendingError, timestamp: Date.now() });
|
11913
12109
|
return;
|
11914
12110
|
}
|
11915
|
-
|
12111
|
+
let message = contentValue;
|
11916
12112
|
// we don't want to send empty messages including spaces, newlines, tabs
|
11917
12113
|
// Message can be empty if there is a valid attachment upload
|
11918
|
-
if (hasContent ||
|
12114
|
+
if (hasContent ||
|
12115
|
+
/* @conditional-compile-remove(file-sharing-acs) */ isAttachmentUploadCompleted(attachments) ||
|
12116
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */ isAttachmentUploadCompleted(imageUploadsInProgress)) {
|
12117
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
12118
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12119
|
+
const { content, attachmentArray } = insertAttachmentsAndImages(contentValue,
|
12120
|
+
/* @conditional-compile-remove(file-sharing-acs) */ attachments,
|
12121
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */ imageUploadsInProgress);
|
12122
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12123
|
+
message = content;
|
11919
12124
|
onSendMessage(message,
|
11920
12125
|
/* @conditional-compile-remove(file-sharing-acs) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */
|
11921
12126
|
{
|
11922
12127
|
/* @conditional-compile-remove(file-sharing-acs) */
|
11923
|
-
|
12128
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12129
|
+
attachments: attachmentArray,
|
11924
12130
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
11925
12131
|
type: 'html'
|
11926
12132
|
});
|
@@ -11933,29 +12139,34 @@ const RichTextSendBox = (props) => {
|
|
11933
12139
|
contentValueOverflow,
|
11934
12140
|
/* @conditional-compile-remove(file-sharing-acs) */
|
11935
12141
|
attachments,
|
12142
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12143
|
+
imageUploadsInProgress,
|
11936
12144
|
contentValue,
|
11937
12145
|
hasContent,
|
11938
12146
|
/* @conditional-compile-remove(file-sharing-acs) */
|
12147
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
11939
12148
|
strings.attachmentUploadsPendingError,
|
11940
|
-
onSendMessage
|
11941
|
-
/* @conditional-compile-remove(file-sharing-acs) */
|
11942
|
-
toAttachmentMetadata
|
12149
|
+
onSendMessage
|
11943
12150
|
]);
|
11944
12151
|
const hasErrorMessage = React.useMemo(() => {
|
11945
|
-
var _a;
|
12152
|
+
var _a, _b;
|
11946
12153
|
return (!!systemMessage ||
|
11947
12154
|
!!contentTooLongMessage ||
|
11948
12155
|
/* @conditional-compile-remove(file-sharing-acs) */
|
11949
12156
|
!!attachmentUploadsPendingError ||
|
11950
12157
|
/* @conditional-compile-remove(file-sharing-acs) */
|
11951
|
-
!!((_a = attachments === null || attachments === void 0 ? void 0 : attachments.filter((attachmentUpload) => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error)
|
12158
|
+
!!((_a = attachments === null || attachments === void 0 ? void 0 : attachments.filter((attachmentUpload) => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error) ||
|
12159
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12160
|
+
!!((_b = imageUploadsInProgress === null || imageUploadsInProgress === void 0 ? void 0 : imageUploadsInProgress.filter((image) => image.error).pop()) === null || _b === void 0 ? void 0 : _b.error));
|
11952
12161
|
}, [
|
11953
12162
|
/* @conditional-compile-remove(file-sharing-acs) */
|
11954
12163
|
attachments,
|
11955
12164
|
contentTooLongMessage,
|
11956
12165
|
/* @conditional-compile-remove(file-sharing-acs) */
|
11957
12166
|
attachmentUploadsPendingError,
|
11958
|
-
systemMessage
|
12167
|
+
systemMessage,
|
12168
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12169
|
+
imageUploadsInProgress
|
11959
12170
|
]);
|
11960
12171
|
const onRenderSendIcon = React.useCallback((isHover) => {
|
11961
12172
|
return (React.createElement(react.Icon, { iconName: isHover && hasContent ? 'SendBoxSendHovered' : 'SendBoxSend', className: sendIconStyle({
|
@@ -12034,13 +12245,15 @@ const RichTextSendBox = (props) => {
|
|
12034
12245
|
}, [attachments]);
|
12035
12246
|
return (React.createElement(react.Stack, null,
|
12036
12247
|
React.createElement(RichTextSendBoxErrors, Object.assign({}, sendBoxErrorsProps)),
|
12037
|
-
React.createElement(RichTextInputBoxComponent, { placeholderText: strings.placeholderText, autoFocus: autoFocus, onChange:
|
12248
|
+
React.createElement(RichTextInputBoxComponent, { placeholderText: strings.placeholderText, autoFocus: autoFocus, onChange: onChangeHandler, onEnterKeyDown: sendMessageOnClick, onTyping: onTyping, editorComponentRef: editorComponentRef, strings: strings, disabled: disabled, actionComponents: sendButton, richTextEditorStyleProps: sendBoxRichTextEditorStyle,
|
12038
12249
|
/* @conditional-compile-remove(file-sharing-acs) */
|
12039
12250
|
onRenderAttachmentUploads: onRenderAttachmentUploads,
|
12040
12251
|
/* @conditional-compile-remove(file-sharing-acs) */
|
12041
12252
|
hasAttachments: hasAttachmentUploads,
|
12042
12253
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12043
|
-
onPaste: onPaste
|
12254
|
+
onPaste: onPaste,
|
12255
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
12256
|
+
onUploadInlineImage: onUploadInlineImage })));
|
12044
12257
|
};
|
12045
12258
|
|
12046
12259
|
// Copyright (c) Microsoft Corporation.
|
@@ -12114,6 +12327,26 @@ const MessageStatusIndicatorIconStyle = react.mergeStyles({
|
|
12114
12327
|
height: `${MESSAGE_STATUS_INDICATOR_SIZE_REM}rem`
|
12115
12328
|
});
|
12116
12329
|
|
12330
|
+
// Copyright (c) Microsoft Corporation.
|
12331
|
+
// Licensed under the MIT License.
|
12332
|
+
/**
|
12333
|
+
* @private
|
12334
|
+
*/
|
12335
|
+
const scrollbarStyles = {
|
12336
|
+
'::-webkit-scrollbar, *::-webkit-scrollbar': {
|
12337
|
+
width: '0.3rem',
|
12338
|
+
height: '0.3rem'
|
12339
|
+
},
|
12340
|
+
'::-webkit-scrollbar-thumb, *::-webkit-scrollbar-thumb': {
|
12341
|
+
borderRadius: '10px',
|
12342
|
+
background: 'rgba(150, 150, 150)'
|
12343
|
+
}
|
12344
|
+
};
|
12345
|
+
/**
|
12346
|
+
* @private
|
12347
|
+
*/
|
12348
|
+
const ERROR_IMAGE_SVG_PATH = 'M2.85 2.15a.5.5 0 1 0-.7.7l1.4 1.41A2.99 2.99 0 0 0 3 6v8a3 3 0 0 0 3 3h8c.65 0 1.25-.2 1.74-.55l1.4 1.4a.5.5 0 0 0 .71-.7l-15-15Zm6.56 7.97a1.5 1.5 0 0 0-.46.31l-4.67 4.59A2 2 0 0 1 4 14V6a2 2 0 0 1 .28-1.02l5.13 5.14ZM6 16a2 2 0 0 1-1.01-.27l4.66-4.58c.2-.2.5-.2.7 0l4.66 4.58A2 2 0 0 1 14 16H6ZM16 6v7.88l.9.9A3 3 0 0 0 17 14V6a3 3 0 0 0-3-3H6a3 3 0 0 0-.78.1l.9.9H14a2 2 0 0 1 2 2Zm-2 1.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0Zm-1 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z';
|
12349
|
+
|
12117
12350
|
// Copyright (c) Microsoft Corporation.
|
12118
12351
|
// Licensed under the MIT License.
|
12119
12352
|
// Minimum chat bubble width. This matches the minimum chat bubble width from FluentUI
|
@@ -12307,6 +12540,23 @@ const useChatMessageStyles = reactComponents.makeStyles({
|
|
12307
12540
|
top: '0',
|
12308
12541
|
left: '0',
|
12309
12542
|
display: 'block'
|
12543
|
+
},
|
12544
|
+
'& .broken-image-wrapper': {
|
12545
|
+
width: '12rem',
|
12546
|
+
height: '12rem',
|
12547
|
+
marginTop: '0.75rem',
|
12548
|
+
display: 'flex',
|
12549
|
+
justifyContent: 'center',
|
12550
|
+
alignItems: 'center',
|
12551
|
+
outline: `1px solid ${reactComponents.tokens.colorNeutralForegroundDisabled}`,
|
12552
|
+
backgroundColor: reactComponents.tokens.colorNeutralBackground2
|
12553
|
+
},
|
12554
|
+
'& .broken-image-wrapper:after': {
|
12555
|
+
content: `''`,
|
12556
|
+
maskImage: `url("data:image/svg+xml,%3Csvg width='3rem' height='3rem' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='currentColor'%3E%3Cpath d='${ERROR_IMAGE_SVG_PATH}' fill='currentColor' /%3E%3C/svg%3E");`,
|
12557
|
+
width: '3rem',
|
12558
|
+
height: '3rem',
|
12559
|
+
backgroundColor: `${reactComponents.tokens.colorNeutralForeground2}`
|
12310
12560
|
}
|
12311
12561
|
},
|
12312
12562
|
bodyWithoutAvatar: {
|
@@ -12698,7 +12948,7 @@ const MessageStatusIndicatorInternal = (props) => {
|
|
12698
12948
|
switch (status) {
|
12699
12949
|
case 'failed':
|
12700
12950
|
return (React.createElement(react.TooltipHost, { content: strings.failedToSendTooltipText, "data-ui-id": "chat-composite-message-tooltip", calloutProps: Object.assign({}, calloutProps), styles: hostStyles$1 },
|
12701
|
-
React.createElement(MemoMessageStatusIcon, { shouldAnnounce: shouldAnnounce, iconName: "MessageFailed", iconClassName: react.mergeStyles(MessageStatusIndicatorErrorIconStyle, { color: theme.palette.redDark }, styles === null || styles === void 0 ? void 0 : styles.root), ariaLabel: strings.failedToSendAriaLabel })));
|
12951
|
+
React.createElement(MemoMessageStatusIcon, { shouldAnnounce: shouldAnnounce, iconName: "MessageFailed", iconClassName: react.mergeStyles(MessageStatusIndicatorErrorIconStyle, { color: isDarkThemed(theme) ? theme.semanticColors.errorText : theme.palette.redDark }, styles === null || styles === void 0 ? void 0 : styles.root), ariaLabel: strings.failedToSendAriaLabel })));
|
12702
12952
|
case 'sending':
|
12703
12953
|
return (React.createElement(react.TooltipHost, { content: strings.sendingTooltipText, "data-ui-id": "chat-composite-message-tooltip", calloutProps: Object.assign({}, calloutProps), styles: hostStyles$1 },
|
12704
12954
|
React.createElement(MemoMessageStatusIcon, { shouldAnnounce: shouldAnnounce, iconName: "MessageSending", iconClassName: react.mergeStyles(MessageStatusIndicatorIconStyle, { color: theme.palette.themePrimary }, styles === null || styles === void 0 ? void 0 : styles.root), ariaLabel: strings.sendingAriaLabel })));
|
@@ -13986,7 +14236,7 @@ class _ErrorBoundary extends React.Component {
|
|
13986
14236
|
// Copyright (c) Microsoft Corporation.
|
13987
14237
|
// Licensed under the MIT License.
|
13988
14238
|
/* @conditional-compile-remove(rich-text-editor) */
|
13989
|
-
const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-
|
14239
|
+
const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-RrIa2t97.js'); }));
|
13990
14240
|
/**
|
13991
14241
|
* @private
|
13992
14242
|
* Use this function to load RoosterJS dependencies early in the lifecycle.
|
@@ -13994,7 +14244,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
|
|
13994
14244
|
*
|
13995
14245
|
* @conditional-compile-remove(rich-text-editor)
|
13996
14246
|
*/
|
13997
|
-
const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-
|
14247
|
+
const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-RrIa2t97.js'); });
|
13998
14248
|
/**
|
13999
14249
|
* @private
|
14000
14250
|
*/
|
@@ -14010,14 +14260,20 @@ const ChatMessageComponentAsEditBoxPicker = (props) => {
|
|
14010
14260
|
React.createElement(React.Suspense, { fallback: simpleEditBox },
|
14011
14261
|
React.createElement(ChatMessageComponentAsRichTextEditBox, Object.assign({}, props, {
|
14012
14262
|
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
14013
|
-
onPaste: richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.onPaste
|
14263
|
+
onPaste: richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.onPaste,
|
14264
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
14265
|
+
onUploadInlineImage: richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.onUploadInlineImage,
|
14266
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
14267
|
+
imageUploadsInProgress: richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.imageUploadsInProgress,
|
14268
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
14269
|
+
onCancelInlineImageUpload: richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.onCancelInlineImageUpload })))));
|
14014
14270
|
}
|
14015
14271
|
return simpleEditBox;
|
14016
14272
|
};
|
14017
14273
|
|
14018
14274
|
// Copyright (c) Microsoft Corporation.
|
14019
14275
|
// Licensed under the MIT License.
|
14020
|
-
var __awaiter$
|
14276
|
+
var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14021
14277
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14022
14278
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14023
14279
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14062,7 +14318,7 @@ const ChatMyMessageComponent = (props) => {
|
|
14062
14318
|
function (text,
|
14063
14319
|
/* @conditional-compile-remove(file-sharing-acs) */
|
14064
14320
|
attachments) {
|
14065
|
-
return __awaiter$
|
14321
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
14066
14322
|
/* @conditional-compile-remove(file-sharing-acs) */
|
14067
14323
|
if (`attachments` in message && attachments) {
|
14068
14324
|
message.attachments = attachments;
|
@@ -14071,9 +14327,7 @@ const ChatMyMessageComponent = (props) => {
|
|
14071
14327
|
message.messageId &&
|
14072
14328
|
(yield props.onUpdateMessage(message.messageId, text,
|
14073
14329
|
/* @conditional-compile-remove(file-sharing-acs) */
|
14074
|
-
{
|
14075
|
-
attachments: attachments
|
14076
|
-
}));
|
14330
|
+
{ attachments: attachments }));
|
14077
14331
|
setIsEditing(false);
|
14078
14332
|
});
|
14079
14333
|
}, [message, props]);
|
@@ -14470,7 +14724,7 @@ const fluentChatComponent = (props) => {
|
|
14470
14724
|
|
14471
14725
|
// Copyright (c) Microsoft Corporation.
|
14472
14726
|
// Licensed under the MIT License.
|
14473
|
-
var __awaiter$
|
14727
|
+
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14474
14728
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14475
14729
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14476
14730
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14666,7 +14920,7 @@ const MessageThreadWrapper = (props) => {
|
|
14666
14920
|
loadChatMessageComponentAsRichTextEditBox();
|
14667
14921
|
}
|
14668
14922
|
}, [richTextEditorOptions]);
|
14669
|
-
const onDeleteMessageCallback = React.useCallback((messageId) => __awaiter$
|
14923
|
+
const onDeleteMessageCallback = React.useCallback((messageId) => __awaiter$C(void 0, void 0, void 0, function* () {
|
14670
14924
|
if (!onDeleteMessage) {
|
14671
14925
|
return;
|
14672
14926
|
}
|
@@ -14747,7 +15001,7 @@ const MessageThreadWrapper = (props) => {
|
|
14747
15001
|
*/
|
14748
15002
|
const clientHeight = (_a = chatThreadRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
14749
15003
|
// we try to only send those message status if user is scrolled to the bottom.
|
14750
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
15004
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$C(void 0, void 0, void 0, function* () {
|
14751
15005
|
if (!isAtBottomOfScrollRef.current ||
|
14752
15006
|
!document.hasFocus() ||
|
14753
15007
|
!messagesRef.current ||
|
@@ -14798,7 +15052,7 @@ const MessageThreadWrapper = (props) => {
|
|
14798
15052
|
setIsAtBottomOfScrollRef(atBottom);
|
14799
15053
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
14800
15054
|
// Infinite scrolling + threadInitialize function
|
14801
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
15055
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$C(void 0, void 0, void 0, function* () {
|
14802
15056
|
if (!isLoadingChatMessagesRef.current) {
|
14803
15057
|
if (onLoadPreviousChatMessages) {
|
14804
15058
|
isLoadingChatMessagesRef.current = true;
|
@@ -17828,7 +18082,7 @@ const localVideoTileContainerStyles = {
|
|
17828
18082
|
|
17829
18083
|
// Copyright (c) Microsoft Corporation.
|
17830
18084
|
// Licensed under the MIT License.
|
17831
|
-
var __awaiter$
|
18085
|
+
var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17832
18086
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17833
18087
|
return new (P || (P = Promise))(function (resolve, reject) {
|
17834
18088
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -17845,7 +18099,7 @@ const LocalVideoCameraCycleButton = (props) => {
|
|
17845
18099
|
const { cameras, selectedCamera, onSelectCamera, label, ariaDescription, size } = props;
|
17846
18100
|
const theme = react.useTheme();
|
17847
18101
|
const [waitForCamera, setWaitForCamera] = React.useState(false);
|
17848
|
-
const onChangeCameraClick = React.useCallback((device) => __awaiter$
|
18102
|
+
const onChangeCameraClick = React.useCallback((device) => __awaiter$B(void 0, void 0, void 0, function* () {
|
17849
18103
|
// Throttle changing camera to prevent too many callbacks
|
17850
18104
|
if (onSelectCamera) {
|
17851
18105
|
setWaitForCamera(true);
|
@@ -20618,7 +20872,7 @@ const DevicesButton = (props) => {
|
|
20618
20872
|
|
20619
20873
|
// Copyright (c) Microsoft Corporation.
|
20620
20874
|
// Licensed under the MIT License.
|
20621
|
-
var __awaiter$
|
20875
|
+
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20622
20876
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20623
20877
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20624
20878
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20656,7 +20910,7 @@ const CameraButton = (props) => {
|
|
20656
20910
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
20657
20911
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
20658
20912
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
20659
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
20913
|
+
const onToggleClick = React.useCallback(() => __awaiter$A(void 0, void 0, void 0, function* () {
|
20660
20914
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
20661
20915
|
if (onToggleCamera) {
|
20662
20916
|
setWaitForCamera(true);
|
@@ -20670,7 +20924,7 @@ const CameraButton = (props) => {
|
|
20670
20924
|
}
|
20671
20925
|
}
|
20672
20926
|
}), [cameraOn, localVideoViewOptions, onToggleCamera, toggleAnnouncerString]);
|
20673
|
-
const onChangeCameraClick = React.useCallback((device) => __awaiter$
|
20927
|
+
const onChangeCameraClick = React.useCallback((device) => __awaiter$A(void 0, void 0, void 0, function* () {
|
20674
20928
|
// Throttle changing camera to prevent too many callbacks
|
20675
20929
|
if (onSelectCamera) {
|
20676
20930
|
setWaitForCamera(true);
|
@@ -20891,7 +21145,7 @@ const menupButtonPadding = {
|
|
20891
21145
|
|
20892
21146
|
// Copyright (c) Microsoft Corporation.
|
20893
21147
|
// Licensed under the MIT License.
|
20894
|
-
var __awaiter$
|
21148
|
+
var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20895
21149
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20896
21150
|
return new (P || (P = Promise))(function (resolve, reject) {
|
20897
21151
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -20932,7 +21186,7 @@ const MicrophoneButton = (props) => {
|
|
20932
21186
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
20933
21187
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
20934
21188
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
20935
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
21189
|
+
const onToggleClick = React.useCallback(() => __awaiter$z(void 0, void 0, void 0, function* () {
|
20936
21190
|
if (onToggleMicrophone) {
|
20937
21191
|
try {
|
20938
21192
|
yield onToggleMicrophone();
|
@@ -21563,247 +21817,6 @@ const secondaryTileFloatingStyles = {
|
|
21563
21817
|
right: '0.125rem'
|
21564
21818
|
};
|
21565
21819
|
|
21566
|
-
// Copyright (c) Microsoft Corporation.
|
21567
|
-
// Licensed under the MIT License.
|
21568
|
-
/**
|
21569
|
-
* Return different conditions based on the current and previous state of recording and transcribing
|
21570
|
-
*
|
21571
|
-
* @param callRecordState - The current call record state: on, off, stopped
|
21572
|
-
* @param callTranscribeState - The current call transcribe state: on, off, stopped
|
21573
|
-
*
|
21574
|
-
* @remarks - The stopped state means: previously on but currently off
|
21575
|
-
*
|
21576
|
-
* @private
|
21577
|
-
*/
|
21578
|
-
const computeVariant = (callRecordState, callTranscribeState) => {
|
21579
|
-
if (callRecordState === 'on' && callTranscribeState === 'on') {
|
21580
|
-
return 'RECORDING_AND_TRANSCRIPTION_STARTED';
|
21581
|
-
}
|
21582
|
-
else if (callRecordState === 'on' && callTranscribeState === 'off') {
|
21583
|
-
return 'RECORDING_STARTED';
|
21584
|
-
}
|
21585
|
-
else if (callRecordState === 'off' && callTranscribeState === 'on') {
|
21586
|
-
return 'TRANSCRIPTION_STARTED';
|
21587
|
-
}
|
21588
|
-
else if (callRecordState === 'on' && callTranscribeState === 'stopped') {
|
21589
|
-
return 'TRANSCRIPTION_STOPPED_STILL_RECORDING';
|
21590
|
-
}
|
21591
|
-
else if (callRecordState === 'stopped' && callTranscribeState === 'on') {
|
21592
|
-
return 'RECORDING_STOPPED_STILL_TRANSCRIBING';
|
21593
|
-
}
|
21594
|
-
else if (callRecordState === 'off' && callTranscribeState === 'stopped') {
|
21595
|
-
return 'TRANSCRIPTION_STOPPED';
|
21596
|
-
}
|
21597
|
-
else if (callRecordState === 'stopped' && callTranscribeState === 'off') {
|
21598
|
-
return 'RECORDING_STOPPED';
|
21599
|
-
}
|
21600
|
-
else if (callRecordState === 'stopped' && callTranscribeState === 'stopped') {
|
21601
|
-
return 'RECORDING_AND_TRANSCRIPTION_STOPPED';
|
21602
|
-
}
|
21603
|
-
else {
|
21604
|
-
return 'NO_STATE';
|
21605
|
-
}
|
21606
|
-
};
|
21607
|
-
|
21608
|
-
// Copyright (c) Microsoft Corporation.
|
21609
|
-
// Licensed under the MIT License.
|
21610
|
-
/** @private */
|
21611
|
-
function BannerMessage(props) {
|
21612
|
-
const { variant, strings } = props;
|
21613
|
-
switch (variant) {
|
21614
|
-
case 'TRANSCRIPTION_STOPPED_STILL_RECORDING':
|
21615
|
-
return (React.createElement(React.Fragment, null,
|
21616
|
-
React.createElement("b", null, strings.complianceBannerTranscriptionStopped),
|
21617
|
-
` ${strings.complianceBannerNowOnlyRecording}`,
|
21618
|
-
React.createElement(PrivacyPolicy, { linkText: strings.privacyPolicy })));
|
21619
|
-
case 'RECORDING_STOPPED_STILL_TRANSCRIBING':
|
21620
|
-
return (React.createElement(React.Fragment, null,
|
21621
|
-
React.createElement("b", null, strings.complianceBannerRecordingStopped),
|
21622
|
-
` ${strings.complianceBannerNowOnlyTranscription}`,
|
21623
|
-
React.createElement(PrivacyPolicy, { linkText: strings.privacyPolicy })));
|
21624
|
-
case 'RECORDING_AND_TRANSCRIPTION_STOPPED':
|
21625
|
-
return (React.createElement(React.Fragment, null,
|
21626
|
-
React.createElement("b", null, strings.complianceBannerRecordingAndTranscriptionSaved),
|
21627
|
-
` ${strings.complianceBannerRecordingAndTranscriptionStopped}`,
|
21628
|
-
React.createElement(LearnMore, { linkText: strings.learnMore })));
|
21629
|
-
case 'RECORDING_AND_TRANSCRIPTION_STARTED':
|
21630
|
-
return (React.createElement(React.Fragment, null,
|
21631
|
-
React.createElement("b", null, strings.complianceBannerRecordingAndTranscriptionStarted),
|
21632
|
-
` ${strings.complianceBannerTranscriptionConsent}`,
|
21633
|
-
React.createElement(PrivacyPolicy, { linkText: strings.privacyPolicy })));
|
21634
|
-
case 'TRANSCRIPTION_STARTED':
|
21635
|
-
return (React.createElement(React.Fragment, null,
|
21636
|
-
React.createElement("b", null, strings.complianceBannerTranscriptionStarted),
|
21637
|
-
` ${strings.complianceBannerTranscriptionConsent}`,
|
21638
|
-
React.createElement(PrivacyPolicy, { linkText: strings.privacyPolicy })));
|
21639
|
-
case 'RECORDING_STOPPED':
|
21640
|
-
return (React.createElement(React.Fragment, null,
|
21641
|
-
React.createElement("b", null, strings.complianceBannerRecordingSaving),
|
21642
|
-
` ${strings.complianceBannerRecordingStopped}`,
|
21643
|
-
React.createElement(LearnMore, { linkText: strings.learnMore })));
|
21644
|
-
case 'RECORDING_STARTED':
|
21645
|
-
return (React.createElement(React.Fragment, null,
|
21646
|
-
React.createElement("b", null, strings.complianceBannerRecordingStarted),
|
21647
|
-
` ${strings.complianceBannerTranscriptionConsent}`,
|
21648
|
-
React.createElement(PrivacyPolicy, { linkText: strings.privacyPolicy })));
|
21649
|
-
case 'TRANSCRIPTION_STOPPED':
|
21650
|
-
return (React.createElement(React.Fragment, null,
|
21651
|
-
React.createElement("b", null, strings.complianceBannerTranscriptionSaving),
|
21652
|
-
` ${strings.complianceBannerTranscriptionStopped}`,
|
21653
|
-
React.createElement(LearnMore, { linkText: strings.learnMore })));
|
21654
|
-
}
|
21655
|
-
return React.createElement(React.Fragment, null);
|
21656
|
-
}
|
21657
|
-
function PrivacyPolicy(props) {
|
21658
|
-
return (React.createElement(react.Link, { href: "https://privacy.microsoft.com/privacystatement#mainnoticetoendusersmodule", target: "_blank", underline: true }, props.linkText));
|
21659
|
-
}
|
21660
|
-
function LearnMore(props) {
|
21661
|
-
return (React.createElement(react.Link, { href: "https://support.microsoft.com/office/record-a-meeting-in-teams-34dfbe7f-b07d-4a27-b4c6-de62f1348c24", target: "_blank", underline: true }, props.linkText));
|
21662
|
-
}
|
21663
|
-
|
21664
|
-
// Copyright (c) Microsoft Corporation.
|
21665
|
-
// Licensed under the MIT License.
|
21666
|
-
const BANNER_OVERWRITE_DELAY_MS = 3000;
|
21667
|
-
/**
|
21668
|
-
* Shows a {@link BannerMessage} in a {@link MessageBar} tracking `variant` internally.
|
21669
|
-
*
|
21670
|
-
* This component delays and combines frequent updates to `variant` such that:
|
21671
|
-
* - Updates that happen within {@link BANNER_OVERWRITE_DELAY_MS} are delayed.
|
21672
|
-
* - Once {@link BANNER_OVERWRITE_DELAY_MS} has passed since the last update, the _latest_ pending update is shown.
|
21673
|
-
*
|
21674
|
-
* This ensures that there is enough time for the user to see a banner message before it is overwritten.
|
21675
|
-
* In case of multiple delayed messages, the user always sees the final message as it reflects the final state
|
21676
|
-
* of recording and transcription.
|
21677
|
-
*
|
21678
|
-
* @private
|
21679
|
-
*/
|
21680
|
-
function DelayedUpdateBanner(props) {
|
21681
|
-
const { variant, lastUpdated: variantLastUpdated } = props.variant;
|
21682
|
-
// Tracks the variant that is currently visible in the UI.
|
21683
|
-
const [visible, setVisible] = React.useState({
|
21684
|
-
variant,
|
21685
|
-
lastUpdated: Date.now()
|
21686
|
-
});
|
21687
|
-
const pendingUpdateHandle = React.useRef(null);
|
21688
|
-
if (variant !== visible.variant && variantLastUpdated > visible.lastUpdated) {
|
21689
|
-
// Always clear pending updates.
|
21690
|
-
// We'll either update now, or schedule an update for later.
|
21691
|
-
if (pendingUpdateHandle.current) {
|
21692
|
-
clearTimeout(pendingUpdateHandle.current);
|
21693
|
-
}
|
21694
|
-
const now = Date.now();
|
21695
|
-
const timeToNextUpdate = BANNER_OVERWRITE_DELAY_MS - (now - visible.lastUpdated);
|
21696
|
-
if (variant === 'NO_STATE' || timeToNextUpdate <= 0) {
|
21697
|
-
setVisible({
|
21698
|
-
variant,
|
21699
|
-
lastUpdated: now
|
21700
|
-
});
|
21701
|
-
}
|
21702
|
-
else {
|
21703
|
-
pendingUpdateHandle.current = setTimeout(() => {
|
21704
|
-
// Set the actual update time, not the computed time when the update should happen.
|
21705
|
-
// The actual update might be later than we planned.
|
21706
|
-
setVisible({
|
21707
|
-
variant,
|
21708
|
-
lastUpdated: Date.now()
|
21709
|
-
});
|
21710
|
-
}, timeToNextUpdate);
|
21711
|
-
}
|
21712
|
-
}
|
21713
|
-
if (visible.variant === 'NO_STATE') {
|
21714
|
-
return React.createElement(React.Fragment, null);
|
21715
|
-
}
|
21716
|
-
return (React.createElement(react.MessageBar, { messageBarType: react.MessageBarType.warning, onDismiss: () => {
|
21717
|
-
// when closing the banner, change variant to nostate and change stopped state to off state.
|
21718
|
-
// Reason: on banner close, going back to the default state.
|
21719
|
-
setVisible({
|
21720
|
-
variant: 'NO_STATE',
|
21721
|
-
lastUpdated: Date.now()
|
21722
|
-
});
|
21723
|
-
props.onDismiss();
|
21724
|
-
}, dismissButtonAriaLabel: props.strings.close },
|
21725
|
-
React.createElement(BannerMessage, { variant: visible.variant, strings: props.strings })));
|
21726
|
-
}
|
21727
|
-
|
21728
|
-
// Copyright (c) Microsoft Corporation.
|
21729
|
-
// Licensed under the MIT License.
|
21730
|
-
/**
|
21731
|
-
* A component that displays banners to notify the user when call recording and
|
21732
|
-
* transcription is enabled or disabled in a call.
|
21733
|
-
*
|
21734
|
-
* This component implements a state machine that tracks the changes to call
|
21735
|
-
* recording and transcription state and shows the corresponding message.
|
21736
|
-
*
|
21737
|
-
* @internal
|
21738
|
-
*/
|
21739
|
-
const _ComplianceBanner = (props) => {
|
21740
|
-
const cachedProps = React.useRef({
|
21741
|
-
latestBooleanState: {
|
21742
|
-
callTranscribeState: false,
|
21743
|
-
callRecordState: false
|
21744
|
-
},
|
21745
|
-
latestStringState: {
|
21746
|
-
callTranscribeState: 'off',
|
21747
|
-
callRecordState: 'off'
|
21748
|
-
},
|
21749
|
-
lastUpdated: Date.now()
|
21750
|
-
});
|
21751
|
-
// Only update cached props and variant if there is _some_ change in the latest props.
|
21752
|
-
// This ensures that state machine is only updated if there is an actual change in the props.
|
21753
|
-
const shouldUpdateCached = props.callRecordState !== cachedProps.current.latestBooleanState.callRecordState ||
|
21754
|
-
props.callTranscribeState !== cachedProps.current.latestBooleanState.callTranscribeState;
|
21755
|
-
// The following three operations must be performed in this exact order:
|
21756
|
-
// [1]: Update cached state to transition the state machine.
|
21757
|
-
if (shouldUpdateCached) {
|
21758
|
-
cachedProps.current = {
|
21759
|
-
latestBooleanState: props,
|
21760
|
-
latestStringState: {
|
21761
|
-
callRecordState: determineStates(cachedProps.current.latestStringState.callRecordState, props.callRecordState),
|
21762
|
-
callTranscribeState: determineStates(cachedProps.current.latestStringState.callTranscribeState, props.callTranscribeState)
|
21763
|
-
},
|
21764
|
-
lastUpdated: Date.now()
|
21765
|
-
};
|
21766
|
-
}
|
21767
|
-
// [2]: Compute the variant, using the transitioned state machine.
|
21768
|
-
const variant = computeVariant(cachedProps.current.latestStringState.callRecordState, cachedProps.current.latestStringState.callTranscribeState);
|
21769
|
-
// [3]: Transition the state machine again to deal with some end-states.
|
21770
|
-
if (shouldUpdateCached &&
|
21771
|
-
cachedProps.current.latestStringState.callRecordState === 'stopped' &&
|
21772
|
-
cachedProps.current.latestStringState.callTranscribeState === 'stopped') {
|
21773
|
-
// When both states are stopped, after displaying message "RECORDING_AND_TRANSCRIPTION_STOPPED", change both states to off (going back to the default state).
|
21774
|
-
cachedProps.current.latestStringState.callRecordState = 'off';
|
21775
|
-
cachedProps.current.latestStringState.callTranscribeState = 'off';
|
21776
|
-
}
|
21777
|
-
return (React.createElement(DelayedUpdateBanner, { variant: {
|
21778
|
-
variant,
|
21779
|
-
lastUpdated: cachedProps.current.lastUpdated
|
21780
|
-
}, strings: props.strings, onDismiss: () => {
|
21781
|
-
if (cachedProps.current.latestStringState.callRecordState === 'stopped') {
|
21782
|
-
cachedProps.current.latestStringState.callRecordState = 'off';
|
21783
|
-
}
|
21784
|
-
if (cachedProps.current.latestStringState.callTranscribeState === 'stopped') {
|
21785
|
-
cachedProps.current.latestStringState.callTranscribeState = 'off';
|
21786
|
-
}
|
21787
|
-
} }));
|
21788
|
-
};
|
21789
|
-
function determineStates(previous, current) {
|
21790
|
-
// if current state is on, then return on
|
21791
|
-
if (current) {
|
21792
|
-
return 'on';
|
21793
|
-
}
|
21794
|
-
// if current state is off
|
21795
|
-
else {
|
21796
|
-
// if previous state is on and current state is off, return stopped (on -> off)
|
21797
|
-
if (previous === 'on') {
|
21798
|
-
return 'stopped';
|
21799
|
-
}
|
21800
|
-
// otherwise remain previous state unchanged
|
21801
|
-
else {
|
21802
|
-
return previous;
|
21803
|
-
}
|
21804
|
-
}
|
21805
|
-
}
|
21806
|
-
|
21807
21820
|
// Copyright (c) Microsoft Corporation.
|
21808
21821
|
// Licensed under the MIT License.
|
21809
21822
|
/**
|
@@ -22035,7 +22048,7 @@ const dtmfFrequencies = {
|
|
22035
22048
|
|
22036
22049
|
// Copyright (c) Microsoft Corporation.
|
22037
22050
|
// Licensed under the MIT License.
|
22038
|
-
var __awaiter$
|
22051
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
22039
22052
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
22040
22053
|
return new (P || (P = Promise))(function (resolve, reject) {
|
22041
22054
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -22079,10 +22092,10 @@ const DialpadButton = (props) => {
|
|
22079
22092
|
const [buttonPressed, setButtonPressed] = React.useState(false);
|
22080
22093
|
const dtmfToneSound = React.useRef(new Tone(dtmfToneAudioContext, dtmfFrequencies[digit].f1, dtmfFrequencies[digit].f2));
|
22081
22094
|
const useLongPressProps = React.useMemo(() => ({
|
22082
|
-
onClick: () => __awaiter$
|
22095
|
+
onClick: () => __awaiter$y(void 0, void 0, void 0, function* () {
|
22083
22096
|
onClick(digit, index);
|
22084
22097
|
}),
|
22085
|
-
onLongPress: () => __awaiter$
|
22098
|
+
onLongPress: () => __awaiter$y(void 0, void 0, void 0, function* () {
|
22086
22099
|
onLongPress(digit, index);
|
22087
22100
|
}),
|
22088
22101
|
touchEventsOnly: longPressTrigger === 'touch'
|
@@ -22923,22 +22936,6 @@ const _VideoBackgroundEffectsPicker = (props) => {
|
|
22923
22936
|
})));
|
22924
22937
|
};
|
22925
22938
|
|
22926
|
-
// Copyright (c) Microsoft Corporation.
|
22927
|
-
// Licensed under the MIT License.
|
22928
|
-
/**
|
22929
|
-
* @private
|
22930
|
-
*/
|
22931
|
-
const scrollbarStyles = {
|
22932
|
-
'::-webkit-scrollbar, *::-webkit-scrollbar': {
|
22933
|
-
width: '0.3rem',
|
22934
|
-
height: '0.3rem'
|
22935
|
-
},
|
22936
|
-
'::-webkit-scrollbar-thumb, *::-webkit-scrollbar-thumb': {
|
22937
|
-
borderRadius: '10px',
|
22938
|
-
background: 'rgba(150, 150, 150)'
|
22939
|
-
}
|
22940
|
-
};
|
22941
|
-
|
22942
22939
|
// Copyright (c) Microsoft Corporation.
|
22943
22940
|
// Licensed under the MIT License.
|
22944
22941
|
/**
|
@@ -23233,7 +23230,7 @@ const _spokenLanguageToCaptionLanguage = {
|
|
23233
23230
|
|
23234
23231
|
// Copyright (c) Microsoft Corporation.
|
23235
23232
|
// Licensed under the MIT License.
|
23236
|
-
var __awaiter$
|
23233
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
23237
23234
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
23238
23235
|
return new (P || (P = Promise))(function (resolve, reject) {
|
23239
23236
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -23272,7 +23269,7 @@ const _CaptionsSettingsModal = (props) => {
|
|
23272
23269
|
onDismissCaptionsSettings();
|
23273
23270
|
}
|
23274
23271
|
}, [onDismissCaptionsSettings]);
|
23275
|
-
const onConfirm = React.useCallback(() => __awaiter$
|
23272
|
+
const onConfirm = React.useCallback(() => __awaiter$x(void 0, void 0, void 0, function* () {
|
23276
23273
|
const spokenLanguageCode = selectedSpokenLanguage.key;
|
23277
23274
|
const captionLanguageCode = selectedCaptionLanguage.key;
|
23278
23275
|
if (isCaptionsFeatureActive) {
|
@@ -24682,7 +24679,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
24682
24679
|
|
24683
24680
|
// Copyright (c) Microsoft Corporation.
|
24684
24681
|
// Licensed under the MIT License.
|
24685
|
-
var __awaiter$
|
24682
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
24686
24683
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
24687
24684
|
return new (P || (P = Promise))(function (resolve, reject) {
|
24688
24685
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -24708,19 +24705,39 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
|
|
24708
24705
|
// due to a bug in babel, we can't use arrow function here
|
24709
24706
|
// affecting conditional-compile-remove(attachment-upload)
|
24710
24707
|
onSendMessage: function (content, options) {
|
24711
|
-
return __awaiter$
|
24708
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
24709
|
+
var _a, _b;
|
24712
24710
|
const sendMessageRequest = {
|
24713
24711
|
content,
|
24714
24712
|
senderDisplayName: chatClient.getState().displayName
|
24715
24713
|
};
|
24716
24714
|
/* @conditional-compile-remove(file-sharing-acs) */
|
24715
|
+
const fileAttachments = (_a = options === null || options === void 0 ? void 0 : options.attachments) === null || _a === void 0 ? void 0 : _a.filter((attachment) => {
|
24716
|
+
const file = attachment;
|
24717
|
+
return file.attachmentType === undefined;
|
24718
|
+
});
|
24719
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
24720
|
+
let imageAttachments;
|
24721
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
24722
|
+
(_b = options === null || options === void 0 ? void 0 : options.attachments) === null || _b === void 0 ? void 0 : _b.map((attachment) => {
|
24723
|
+
const image = attachment;
|
24724
|
+
if (image.attachmentType === 'image') {
|
24725
|
+
imageAttachments === undefined ? (imageAttachments = [image]) : imageAttachments.push(image);
|
24726
|
+
}
|
24727
|
+
});
|
24717
24728
|
if (options &&
|
24718
24729
|
'attachments' in options &&
|
24719
24730
|
options.attachments &&
|
24720
|
-
|
24721
|
-
|
24731
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
24732
|
+
((fileAttachments && fileAttachments.length > 0) ||
|
24733
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
24734
|
+
(imageAttachments && imageAttachments.length > 0))) {
|
24722
24735
|
const chatSDKOptions = {
|
24723
|
-
metadata: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.metadata), {
|
24736
|
+
metadata: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.metadata), {
|
24737
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
24738
|
+
fileSharingMetadata: JSON.stringify(fileAttachments) }),
|
24739
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
24740
|
+
attachments: imageAttachments,
|
24724
24741
|
type: options.type
|
24725
24742
|
};
|
24726
24743
|
yield chatThreadClient.sendMessage(sendMessageRequest, chatSDKOptions);
|
@@ -24729,37 +24746,70 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
|
|
24729
24746
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
24730
24747
|
});
|
24731
24748
|
},
|
24749
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
24750
|
+
onUploadImage: function (image, imageFilename) {
|
24751
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
24752
|
+
const imageResult = yield chatThreadClient.uploadImage(image, imageFilename);
|
24753
|
+
return imageResult;
|
24754
|
+
});
|
24755
|
+
},
|
24756
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
24757
|
+
onDeleteImage: function (imageId) {
|
24758
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
24759
|
+
yield chatThreadClient.deleteImage(imageId);
|
24760
|
+
return;
|
24761
|
+
});
|
24762
|
+
},
|
24732
24763
|
// due to a bug in babel, we can't use arrow function here
|
24733
24764
|
// affecting conditional-compile-remove(attachment-upload)
|
24734
24765
|
onUpdateMessage: function (messageId, content,
|
24735
24766
|
/* @conditional-compile-remove(file-sharing-acs) */
|
24736
24767
|
options) {
|
24737
|
-
return __awaiter$
|
24768
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
24769
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
24770
|
+
let imageAttachments;
|
24771
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
24772
|
+
// get image attachments from content, including the ones before the editing and newly added ones during editing.
|
24773
|
+
const document = new DOMParser().parseFromString(content !== null && content !== void 0 ? content : '', 'text/html');
|
24774
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
24775
|
+
document.querySelectorAll('img').forEach((img) => {
|
24776
|
+
if (imageAttachments === undefined) {
|
24777
|
+
imageAttachments = [];
|
24778
|
+
}
|
24779
|
+
imageAttachments.push({
|
24780
|
+
id: img.id,
|
24781
|
+
attachmentType: 'image'
|
24782
|
+
});
|
24783
|
+
});
|
24784
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
24785
|
+
content = document.body.innerHTML;
|
24738
24786
|
const updateMessageOptions = {
|
24739
24787
|
content,
|
24740
24788
|
/* @conditional-compile-remove(file-sharing-acs) */
|
24741
|
-
metadata: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.metadata), { fileSharingMetadata: JSON.stringify(options === null || options === void 0 ? void 0 : options.attachments) })
|
24789
|
+
metadata: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.metadata), { fileSharingMetadata: JSON.stringify(options === null || options === void 0 ? void 0 : options.attachments) }),
|
24790
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
24791
|
+
attachments: imageAttachments
|
24742
24792
|
};
|
24743
24793
|
yield chatThreadClient.updateMessage(messageId, updateMessageOptions);
|
24744
24794
|
});
|
24745
24795
|
},
|
24746
|
-
onDeleteMessage: (messageId) => __awaiter$
|
24796
|
+
onDeleteMessage: (messageId) => __awaiter$w(void 0, void 0, void 0, function* () {
|
24747
24797
|
yield chatThreadClient.deleteMessage(messageId);
|
24748
24798
|
}),
|
24749
24799
|
// This handler is designed for chatThread to consume
|
24750
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
24800
|
+
onMessageSeen: (chatMessageId) => __awaiter$w(void 0, void 0, void 0, function* () {
|
24751
24801
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
24752
24802
|
}),
|
24753
|
-
onTyping: () => __awaiter$
|
24803
|
+
onTyping: () => __awaiter$w(void 0, void 0, void 0, function* () {
|
24754
24804
|
yield chatThreadClient.sendTypingNotification();
|
24755
24805
|
}),
|
24756
|
-
onRemoveParticipant: (userId) => __awaiter$
|
24806
|
+
onRemoveParticipant: (userId) => __awaiter$w(void 0, void 0, void 0, function* () {
|
24757
24807
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
24758
24808
|
}),
|
24759
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
24809
|
+
updateThreadTopicName: (topicName) => __awaiter$w(void 0, void 0, void 0, function* () {
|
24760
24810
|
yield chatThreadClient.updateTopic(topicName);
|
24761
24811
|
}),
|
24762
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
24812
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$w(void 0, void 0, void 0, function* () {
|
24763
24813
|
var _a, _b, _c;
|
24764
24814
|
if (messageIterator === undefined) {
|
24765
24815
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -25180,11 +25230,20 @@ const processChatMessageContent = (message) => {
|
|
25180
25230
|
if (content) {
|
25181
25231
|
const document = new DOMParser().parseFromString(content !== null && content !== void 0 ? content : '', 'text/html');
|
25182
25232
|
document.querySelectorAll('img').forEach((img) => {
|
25183
|
-
var _a, _b;
|
25233
|
+
var _a, _b, _c;
|
25184
25234
|
const attachmentPreviewUrl = (_a = attachments.find((attachment) => attachment.id === img.id)) === null || _a === void 0 ? void 0 : _a.previewUrl;
|
25185
25235
|
if (attachmentPreviewUrl) {
|
25186
25236
|
const resourceCache = (_b = message.resourceCache) === null || _b === void 0 ? void 0 : _b[attachmentPreviewUrl];
|
25187
|
-
|
25237
|
+
const src = getResourceSourceUrl(resourceCache);
|
25238
|
+
// if in error state
|
25239
|
+
if (src === undefined) {
|
25240
|
+
const brokenImageView = getBrokenImageViewNode(img);
|
25241
|
+
(_c = img.parentElement) === null || _c === void 0 ? void 0 : _c.replaceChild(brokenImageView, img);
|
25242
|
+
}
|
25243
|
+
else {
|
25244
|
+
// else in loading or success state
|
25245
|
+
img.setAttribute('src', src);
|
25246
|
+
}
|
25188
25247
|
}
|
25189
25248
|
});
|
25190
25249
|
content = document.body.innerHTML;
|
@@ -25210,22 +25269,28 @@ const generateImageAttachmentImgHtml = (message, attachment) => {
|
|
25210
25269
|
const contentType = extractAttachmentContentTypeFromName(attachment.name);
|
25211
25270
|
const resourceCache = (_a = message.resourceCache) === null || _a === void 0 ? void 0 : _a[attachment.previewUrl];
|
25212
25271
|
const src = getResourceSourceUrl(resourceCache);
|
25272
|
+
// if in error state
|
25273
|
+
if (src === undefined) {
|
25274
|
+
return `\r\n<p>${getBrokenImageViewNode()}</p>`;
|
25275
|
+
}
|
25276
|
+
// else in loading or success state
|
25213
25277
|
return `\r\n<p><img alt="image" src="${src}" itemscope="${contentType}" id="${attachment.id}"></p>`;
|
25214
25278
|
}
|
25215
25279
|
return '';
|
25216
25280
|
};
|
25217
25281
|
const getResourceSourceUrl = (result) => {
|
25218
|
-
let src = '';
|
25219
25282
|
if (result) {
|
25220
|
-
if (result.error
|
25221
|
-
//
|
25222
|
-
|
25283
|
+
if (!result.error && result.sourceUrl) {
|
25284
|
+
// return sourceUrl for success state
|
25285
|
+
return result.sourceUrl;
|
25223
25286
|
}
|
25224
25287
|
else {
|
25225
|
-
|
25288
|
+
// return undefined for error state
|
25289
|
+
return undefined;
|
25226
25290
|
}
|
25227
25291
|
}
|
25228
|
-
return
|
25292
|
+
// return empty string for loading state
|
25293
|
+
return '';
|
25229
25294
|
};
|
25230
25295
|
const extractAttachmentContentTypeFromName = (name) => {
|
25231
25296
|
if (name === undefined) {
|
@@ -25359,6 +25424,17 @@ const sanitizedMessageContentType = (type) => {
|
|
25359
25424
|
? lowerCaseType
|
25360
25425
|
: 'unknown';
|
25361
25426
|
};
|
25427
|
+
const getBrokenImageViewNode = (img) => {
|
25428
|
+
var _a;
|
25429
|
+
const wrapper = document.createElement('div');
|
25430
|
+
Array.from((_a = img === null || img === void 0 ? void 0 : img.attributes) !== null && _a !== void 0 ? _a : []).forEach((attr) => {
|
25431
|
+
var _a;
|
25432
|
+
wrapper.setAttribute(attr.nodeName, (_a = attr.nodeValue) !== null && _a !== void 0 ? _a : '');
|
25433
|
+
});
|
25434
|
+
wrapper.setAttribute('class', 'broken-image-wrapper');
|
25435
|
+
wrapper.setAttribute('data-ui-id', 'broken-image-icon');
|
25436
|
+
return wrapper;
|
25437
|
+
};
|
25362
25438
|
const isMessageValidToRender = (message) => {
|
25363
25439
|
var _a, _b, _c, _d, _e;
|
25364
25440
|
if (message.deletedOn) {
|
@@ -25669,7 +25745,7 @@ const Constants = {
|
|
25669
25745
|
*/
|
25670
25746
|
const chatStatefulLogger = logger.createClientLogger('communication-react:chat-stateful');
|
25671
25747
|
|
25672
|
-
var __awaiter$
|
25748
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
25673
25749
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
25674
25750
|
return new (P || (P = Promise))(function (resolve, reject) {
|
25675
25751
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -25711,7 +25787,7 @@ class ResourceDownloadQueue {
|
|
25711
25787
|
this._messagesNeedingResourceRetrieval.push(copy);
|
25712
25788
|
}
|
25713
25789
|
startQueue(threadId, operation, options) {
|
25714
|
-
return __awaiter$
|
25790
|
+
return __awaiter$v(this, void 0, void 0, function* () {
|
25715
25791
|
if (this.isActive) {
|
25716
25792
|
return;
|
25717
25793
|
}
|
@@ -25747,7 +25823,7 @@ class ResourceDownloadQueue {
|
|
25747
25823
|
}
|
25748
25824
|
}
|
25749
25825
|
downloadSingleUrl(message, resourceUrl, operation) {
|
25750
|
-
return __awaiter$
|
25826
|
+
return __awaiter$v(this, void 0, void 0, function* () {
|
25751
25827
|
const response = { sourceUrl: '' };
|
25752
25828
|
try {
|
25753
25829
|
const abortController = new AbortController();
|
@@ -25763,7 +25839,7 @@ class ResourceDownloadQueue {
|
|
25763
25839
|
});
|
25764
25840
|
}
|
25765
25841
|
downloadAllPreviewUrls(message, operation) {
|
25766
|
-
return __awaiter$
|
25842
|
+
return __awaiter$v(this, void 0, void 0, function* () {
|
25767
25843
|
var _a;
|
25768
25844
|
const attachments = (_a = message.content) === null || _a === void 0 ? void 0 : _a.attachments;
|
25769
25845
|
if (message.type === 'html' && attachments) {
|
@@ -25790,7 +25866,7 @@ class ResourceDownloadQueue {
|
|
25790
25866
|
});
|
25791
25867
|
}
|
25792
25868
|
downloadResource(operation, url, abortController) {
|
25793
|
-
return __awaiter$
|
25869
|
+
return __awaiter$v(this, void 0, void 0, function* () {
|
25794
25870
|
this._requestsToCancel[url] = { src: url, abortController };
|
25795
25871
|
const blobUrl = yield operation(url, { credential: this._credential, endpoint: this._endpoint }, { abortController });
|
25796
25872
|
delete this._requestsToCancel[url];
|
@@ -25801,9 +25877,9 @@ class ResourceDownloadQueue {
|
|
25801
25877
|
/**
|
25802
25878
|
* @private
|
25803
25879
|
*/
|
25804
|
-
const fetchImageSource = (src, authentication, options) => __awaiter$
|
25880
|
+
const fetchImageSource = (src, authentication, options) => __awaiter$v(void 0, void 0, void 0, function* () {
|
25805
25881
|
function fetchWithAuthentication(url, token, options) {
|
25806
|
-
return __awaiter$
|
25882
|
+
return __awaiter$v(this, void 0, void 0, function* () {
|
25807
25883
|
const headers = new Headers();
|
25808
25884
|
headers.append('Authorization', `Bearer ${token}`);
|
25809
25885
|
return yield fetchWithTimeout(url, {
|
@@ -25814,7 +25890,7 @@ const fetchImageSource = (src, authentication, options) => __awaiter$u(void 0, v
|
|
25814
25890
|
});
|
25815
25891
|
}
|
25816
25892
|
function fetchWithTimeout(resource, options) {
|
25817
|
-
return __awaiter$
|
25893
|
+
return __awaiter$v(this, void 0, void 0, function* () {
|
25818
25894
|
// default timeout is 30 seconds
|
25819
25895
|
const { timeout = 30000, abortController } = options;
|
25820
25896
|
const id = setTimeout(() => {
|
@@ -25832,13 +25908,16 @@ const fetchImageSource = (src, authentication, options) => __awaiter$u(void 0, v
|
|
25832
25908
|
token = (yield authentication.credential.getToken()).token;
|
25833
25909
|
}
|
25834
25910
|
const response = yield fetchWithAuthentication(src, token, options);
|
25911
|
+
if (response.status >= 400) {
|
25912
|
+
throw new Error(`Failed to fetch image source. Status code: ${response.status}`);
|
25913
|
+
}
|
25835
25914
|
const blob = yield response.blob();
|
25836
25915
|
return URL.createObjectURL(blob);
|
25837
25916
|
});
|
25838
25917
|
|
25839
25918
|
// Copyright (c) Microsoft Corporation.
|
25840
25919
|
// Licensed under the MIT License.
|
25841
|
-
var __awaiter$
|
25920
|
+
var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
25842
25921
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
25843
25922
|
return new (P || (P = Promise))(function (resolve, reject) {
|
25844
25923
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -25914,7 +25993,7 @@ let ChatContext$1 = class ChatContext {
|
|
25914
25993
|
// Any item in queue should be removed.
|
25915
25994
|
}
|
25916
25995
|
downloadResourceToCache(threadId, messageId, resourceUrl) {
|
25917
|
-
return __awaiter$
|
25996
|
+
return __awaiter$u(this, void 0, void 0, function* () {
|
25918
25997
|
var _a;
|
25919
25998
|
let message = (_a = this.getState().threads[threadId]) === null || _a === void 0 ? void 0 : _a.chatMessages[messageId];
|
25920
25999
|
if (message && this._fullsizeImageQueue) {
|
@@ -26193,7 +26272,7 @@ let ChatContext$1 = class ChatContext {
|
|
26193
26272
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
26194
26273
|
*/
|
26195
26274
|
withAsyncErrorTeedToState(f, target) {
|
26196
|
-
return (...args) => __awaiter$
|
26275
|
+
return (...args) => __awaiter$u(this, void 0, void 0, function* () {
|
26197
26276
|
try {
|
26198
26277
|
return yield f(...args);
|
26199
26278
|
}
|
@@ -26300,7 +26379,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
26300
26379
|
|
26301
26380
|
// Copyright (c) Microsoft Corporation.
|
26302
26381
|
// Licensed under the MIT License.
|
26303
|
-
var __awaiter$
|
26382
|
+
var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26304
26383
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26305
26384
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26306
26385
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26390,7 +26469,7 @@ class EventSubscriber {
|
|
26390
26469
|
};
|
26391
26470
|
// This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
|
26392
26471
|
// Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
|
26393
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
26472
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$t(this, void 0, void 0, function* () {
|
26394
26473
|
var _a, e_1, _b, _c;
|
26395
26474
|
try {
|
26396
26475
|
for (var _d = true, _e = __asyncValues$1(this.chatClient
|
@@ -26484,7 +26563,7 @@ class EventSubscriber {
|
|
26484
26563
|
|
26485
26564
|
// Copyright (c) Microsoft Corporation.
|
26486
26565
|
// Licensed under the MIT License.
|
26487
|
-
var __awaiter$
|
26566
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26488
26567
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26489
26568
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26490
26569
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26506,7 +26585,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
26506
26585
|
const threadsIterator = iteratorCreator(...args);
|
26507
26586
|
return {
|
26508
26587
|
next() {
|
26509
|
-
return __awaiter$
|
26588
|
+
return __awaiter$s(this, void 0, void 0, function* () {
|
26510
26589
|
const result = yield threadsIterator.next();
|
26511
26590
|
if (!result.done && result.value) {
|
26512
26591
|
decorateFn(result.value, context);
|
@@ -26521,7 +26600,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
26521
26600
|
const pages = threadsIterator.byPage(settings);
|
26522
26601
|
return {
|
26523
26602
|
next() {
|
26524
|
-
return __awaiter$
|
26603
|
+
return __awaiter$s(this, void 0, void 0, function* () {
|
26525
26604
|
const result = yield pages.next();
|
26526
26605
|
const page = result.value;
|
26527
26606
|
if (!result.done && result.value) {
|
@@ -26608,7 +26687,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
26608
26687
|
|
26609
26688
|
// Copyright (c) Microsoft Corporation.
|
26610
26689
|
// Licensed under the MIT License.
|
26611
|
-
var __awaiter$
|
26690
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26612
26691
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26613
26692
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26614
26693
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26627,14 +26706,14 @@ class ProxyChatThreadClient {
|
|
26627
26706
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
26628
26707
|
}
|
26629
26708
|
case 'getMessage': {
|
26630
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
26709
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$r(this, void 0, void 0, function* () {
|
26631
26710
|
const message = yield chatThreadClient.getMessage(...args);
|
26632
26711
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
26633
26712
|
return message;
|
26634
26713
|
}), 'ChatThreadClient.getMessage');
|
26635
26714
|
}
|
26636
26715
|
case 'sendMessage': {
|
26637
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
26716
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$r(this, void 0, void 0, function* () {
|
26638
26717
|
var _a;
|
26639
26718
|
// Retry logic?
|
26640
26719
|
const [request, options] = args;
|
@@ -26675,7 +26754,7 @@ class ProxyChatThreadClient {
|
|
26675
26754
|
}), 'ChatThreadClient.sendMessage');
|
26676
26755
|
}
|
26677
26756
|
case 'addParticipants': {
|
26678
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
26757
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$r(this, void 0, void 0, function* () {
|
26679
26758
|
const result = yield chatThreadClient.addParticipants(...args);
|
26680
26759
|
const [addRequest] = args;
|
26681
26760
|
const participantsToAdd = addRequest.participants;
|
@@ -26684,7 +26763,7 @@ class ProxyChatThreadClient {
|
|
26684
26763
|
}), 'ChatThreadClient.addParticipants');
|
26685
26764
|
}
|
26686
26765
|
case 'deleteMessage': {
|
26687
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
26766
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$r(this, void 0, void 0, function* () {
|
26688
26767
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
26689
26768
|
const [messageId] = args;
|
26690
26769
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
@@ -26702,12 +26781,12 @@ class ProxyChatThreadClient {
|
|
26702
26781
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
26703
26782
|
}
|
26704
26783
|
case 'sendTypingNotification': {
|
26705
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
26784
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$r(this, void 0, void 0, function* () {
|
26706
26785
|
return yield chatThreadClient.sendTypingNotification(...args);
|
26707
26786
|
}), 'ChatThreadClient.sendTypingNotification');
|
26708
26787
|
}
|
26709
26788
|
case 'removeParticipant': {
|
26710
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
26789
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$r(this, void 0, void 0, function* () {
|
26711
26790
|
const result = yield chatThreadClient.removeParticipant(...args);
|
26712
26791
|
const [removeIdentifier] = args;
|
26713
26792
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
@@ -26715,7 +26794,7 @@ class ProxyChatThreadClient {
|
|
26715
26794
|
}), 'ChatThreadClient.removeParticipant');
|
26716
26795
|
}
|
26717
26796
|
case 'updateMessage': {
|
26718
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
26797
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$r(this, void 0, void 0, function* () {
|
26719
26798
|
const result = yield chatThreadClient.updateMessage(...args);
|
26720
26799
|
const [messageId, updateOption] = args;
|
26721
26800
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
@@ -26723,7 +26802,7 @@ class ProxyChatThreadClient {
|
|
26723
26802
|
}), 'ChatThreadClient.updateMessage');
|
26724
26803
|
}
|
26725
26804
|
case 'updateTopic': {
|
26726
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
26805
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$r(this, void 0, void 0, function* () {
|
26727
26806
|
const result = yield chatThreadClient.updateTopic(...args);
|
26728
26807
|
const [topic] = args;
|
26729
26808
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
@@ -26731,7 +26810,7 @@ class ProxyChatThreadClient {
|
|
26731
26810
|
}), 'ChatThreadClient.updateTopic');
|
26732
26811
|
}
|
26733
26812
|
case 'getProperties': {
|
26734
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
26813
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$r(this, void 0, void 0, function* () {
|
26735
26814
|
const result = yield chatThreadClient.getProperties(...args);
|
26736
26815
|
this._context.updateThread(chatThreadClient.threadId, result);
|
26737
26816
|
return result;
|
@@ -26769,7 +26848,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
26769
26848
|
|
26770
26849
|
// Copyright (c) Microsoft Corporation.
|
26771
26850
|
// Licensed under the MIT License.
|
26772
|
-
var __awaiter$
|
26851
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26773
26852
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26774
26853
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26775
26854
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -26788,7 +26867,7 @@ const proxyChatClient = {
|
|
26788
26867
|
switch (prop) {
|
26789
26868
|
case 'createChatThread': {
|
26790
26869
|
return context.withAsyncErrorTeedToState(function (...args) {
|
26791
|
-
return __awaiter$
|
26870
|
+
return __awaiter$q(this, void 0, void 0, function* () {
|
26792
26871
|
const result = yield chatClient.createChatThread(...args);
|
26793
26872
|
const thread = result.chatThread;
|
26794
26873
|
if (thread) {
|
@@ -26801,7 +26880,7 @@ const proxyChatClient = {
|
|
26801
26880
|
}
|
26802
26881
|
case 'deleteChatThread': {
|
26803
26882
|
return context.withAsyncErrorTeedToState(function (...args) {
|
26804
|
-
return __awaiter$
|
26883
|
+
return __awaiter$q(this, void 0, void 0, function* () {
|
26805
26884
|
const result = yield chatClient.deleteChatThread(...args);
|
26806
26885
|
context.deleteThread(args[0]);
|
26807
26886
|
return result;
|
@@ -26821,7 +26900,7 @@ const proxyChatClient = {
|
|
26821
26900
|
}
|
26822
26901
|
case 'startRealtimeNotifications': {
|
26823
26902
|
return context.withAsyncErrorTeedToState(function (...args) {
|
26824
|
-
return __awaiter$
|
26903
|
+
return __awaiter$q(this, void 0, void 0, function* () {
|
26825
26904
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
26826
26905
|
if (!receiver.eventSubscriber) {
|
26827
26906
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
@@ -26832,7 +26911,7 @@ const proxyChatClient = {
|
|
26832
26911
|
}
|
26833
26912
|
case 'stopRealtimeNotifications': {
|
26834
26913
|
return context.withAsyncErrorTeedToState(function (...args) {
|
26835
|
-
return __awaiter$
|
26914
|
+
return __awaiter$q(this, void 0, void 0, function* () {
|
26836
26915
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
26837
26916
|
if (receiver.eventSubscriber) {
|
26838
26917
|
receiver.eventSubscriber.unsubscribe();
|
@@ -26935,7 +27014,7 @@ const CHAT_CONTAINER_MIN_WIDTH_REM = 17.5;
|
|
26935
27014
|
|
26936
27015
|
// Copyright (c) Microsoft Corporation.
|
26937
27016
|
// Licensed under the MIT License.
|
26938
|
-
var __awaiter$
|
27017
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26939
27018
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
26940
27019
|
return new (P || (P = Promise))(function (resolve, reject) {
|
26941
27020
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -27031,6 +27110,10 @@ class AzureCommunicationChatAdapter {
|
|
27031
27110
|
this.dispose = this.dispose.bind(this);
|
27032
27111
|
this.fetchInitialData = this.fetchInitialData.bind(this);
|
27033
27112
|
this.sendMessage = this.sendMessage.bind(this);
|
27113
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
27114
|
+
this.uploadImage = this.uploadImage.bind(this);
|
27115
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
27116
|
+
this.deleteImage = this.deleteImage.bind(this);
|
27034
27117
|
this.sendReadReceipt = this.sendReadReceipt.bind(this);
|
27035
27118
|
this.sendTypingIndicator = this.sendTypingIndicator.bind(this);
|
27036
27119
|
this.updateMessage = this.updateMessage.bind(this);
|
@@ -27048,9 +27131,9 @@ class AzureCommunicationChatAdapter {
|
|
27048
27131
|
this.chatClient.dispose();
|
27049
27132
|
}
|
27050
27133
|
fetchInitialData() {
|
27051
|
-
return __awaiter$
|
27134
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27052
27135
|
// If get properties fails we dont want to try to get the participants after.
|
27053
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27136
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$p(this, void 0, void 0, function* () {
|
27054
27137
|
var _a, e_1, _b, _c;
|
27055
27138
|
yield this.chatThreadClient.getProperties();
|
27056
27139
|
try {
|
@@ -27086,50 +27169,66 @@ class AzureCommunicationChatAdapter {
|
|
27086
27169
|
this.context.offStateChange(handler);
|
27087
27170
|
}
|
27088
27171
|
sendMessage(content, options) {
|
27089
|
-
return __awaiter$
|
27090
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27172
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27173
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$p(this, void 0, void 0, function* () {
|
27091
27174
|
return yield this.handlers.onSendMessage(content, options);
|
27092
27175
|
}));
|
27093
27176
|
});
|
27094
27177
|
}
|
27178
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
27179
|
+
uploadImage(image, imageFilename) {
|
27180
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27181
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$p(this, void 0, void 0, function* () {
|
27182
|
+
return yield this.handlers.onUploadImage(image, imageFilename);
|
27183
|
+
}));
|
27184
|
+
});
|
27185
|
+
}
|
27186
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
27187
|
+
deleteImage(imageId) {
|
27188
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27189
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$p(this, void 0, void 0, function* () {
|
27190
|
+
return yield this.handlers.onDeleteImage(imageId);
|
27191
|
+
}));
|
27192
|
+
});
|
27193
|
+
}
|
27095
27194
|
sendReadReceipt(chatMessageId) {
|
27096
|
-
return __awaiter$
|
27097
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27195
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27196
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$p(this, void 0, void 0, function* () {
|
27098
27197
|
yield this.handlers.onMessageSeen(chatMessageId);
|
27099
27198
|
}));
|
27100
27199
|
});
|
27101
27200
|
}
|
27102
27201
|
sendTypingIndicator() {
|
27103
|
-
return __awaiter$
|
27104
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27202
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27203
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$p(this, void 0, void 0, function* () {
|
27105
27204
|
yield this.handlers.onTyping();
|
27106
27205
|
}));
|
27107
27206
|
});
|
27108
27207
|
}
|
27109
27208
|
removeParticipant(userId) {
|
27110
|
-
return __awaiter$
|
27111
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27209
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27210
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$p(this, void 0, void 0, function* () {
|
27112
27211
|
yield this.handlers.onRemoveParticipant(userId);
|
27113
27212
|
}));
|
27114
27213
|
});
|
27115
27214
|
}
|
27116
27215
|
setTopic(topicName) {
|
27117
|
-
return __awaiter$
|
27118
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27216
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27217
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$p(this, void 0, void 0, function* () {
|
27119
27218
|
yield this.handlers.updateThreadTopicName(topicName);
|
27120
27219
|
}));
|
27121
27220
|
});
|
27122
27221
|
}
|
27123
27222
|
loadPreviousChatMessages(messagesToLoad) {
|
27124
|
-
return __awaiter$
|
27125
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27223
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27224
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$p(this, void 0, void 0, function* () {
|
27126
27225
|
return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
|
27127
27226
|
}));
|
27128
27227
|
});
|
27129
27228
|
}
|
27130
27229
|
updateMessage(messageId, content, options) {
|
27131
|
-
return __awaiter$
|
27132
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27230
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27231
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$p(this, void 0, void 0, function* () {
|
27133
27232
|
var _a;
|
27134
27233
|
/* @conditional-compile-remove(file-sharing-acs) */
|
27135
27234
|
const messageOptions = {};
|
@@ -27160,14 +27259,14 @@ class AzureCommunicationChatAdapter {
|
|
27160
27259
|
});
|
27161
27260
|
}
|
27162
27261
|
deleteMessage(messageId) {
|
27163
|
-
return __awaiter$
|
27164
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
27262
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27263
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$p(this, void 0, void 0, function* () {
|
27165
27264
|
return yield this.handlers.onDeleteMessage(messageId);
|
27166
27265
|
}));
|
27167
27266
|
});
|
27168
27267
|
}
|
27169
27268
|
downloadResourceToCache(resourceDetails) {
|
27170
|
-
return __awaiter$
|
27269
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27171
27270
|
this.chatClient.downloadResourceToCache(resourceDetails.threadId, resourceDetails.messageId, resourceDetails.resourceUrl);
|
27172
27271
|
});
|
27173
27272
|
}
|
@@ -27246,7 +27345,7 @@ class AzureCommunicationChatAdapter {
|
|
27246
27345
|
this.emitter.off(event, listener);
|
27247
27346
|
}
|
27248
27347
|
asyncTeeErrorToEventEmitter(f) {
|
27249
|
-
return __awaiter$
|
27348
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27250
27349
|
try {
|
27251
27350
|
return yield f();
|
27252
27351
|
}
|
@@ -27296,7 +27395,7 @@ const convertEventType = (type) => {
|
|
27296
27395
|
*
|
27297
27396
|
* @public
|
27298
27397
|
*/
|
27299
|
-
const createAzureCommunicationChatAdapter = (_a) => __awaiter$
|
27398
|
+
const createAzureCommunicationChatAdapter = (_a) => __awaiter$p(void 0, [_a], void 0, function* ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) {
|
27300
27399
|
return _createAzureCommunicationChatAdapterInner(endpointUrl, userId, displayName, credential, threadId);
|
27301
27400
|
});
|
27302
27401
|
/**
|
@@ -27304,7 +27403,7 @@ const createAzureCommunicationChatAdapter = (_a) => __awaiter$o(void 0, [_a], vo
|
|
27304
27403
|
*
|
27305
27404
|
* @internal
|
27306
27405
|
*/
|
27307
|
-
const _createAzureCommunicationChatAdapterInner = (endpoint_1, userId_1, displayName_1, credential_1, threadId_1, ...args_1) => __awaiter$
|
27406
|
+
const _createAzureCommunicationChatAdapterInner = (endpoint_1, userId_1, displayName_1, credential_1, threadId_1, ...args_1) => __awaiter$p(void 0, [endpoint_1, userId_1, displayName_1, credential_1, threadId_1, ...args_1], void 0, function* (endpoint, userId, displayName, credential, threadId, telemetryImplementationHint = 'Chat') {
|
27308
27407
|
if (!_isValidIdentifier(userId)) {
|
27309
27408
|
throw new Error('Provided userId is invalid. Please provide valid identifier object.');
|
27310
27409
|
}
|
@@ -27324,7 +27423,7 @@ const _createAzureCommunicationChatAdapterInner = (endpoint_1, userId_1, display
|
|
27324
27423
|
* ThreadId is a promise to allow for lazy initialization of the adapter.
|
27325
27424
|
* @internal
|
27326
27425
|
*/
|
27327
|
-
const _createLazyAzureCommunicationChatAdapterInner = (endpoint_2, userId_2, displayName_2, credential_2, threadId_2, ...args_2) => __awaiter$
|
27426
|
+
const _createLazyAzureCommunicationChatAdapterInner = (endpoint_2, userId_2, displayName_2, credential_2, threadId_2, ...args_2) => __awaiter$p(void 0, [endpoint_2, userId_2, displayName_2, credential_2, threadId_2, ...args_2], void 0, function* (endpoint, userId, displayName, credential, threadId, telemetryImplementationHint = 'Chat') {
|
27328
27427
|
if (!_isValidIdentifier(userId)) {
|
27329
27428
|
throw new Error('Provided userId is invalid. Please provide valid identifier object.');
|
27330
27429
|
}
|
@@ -27334,7 +27433,7 @@ const _createLazyAzureCommunicationChatAdapterInner = (endpoint_2, userId_2, dis
|
|
27334
27433
|
endpoint,
|
27335
27434
|
credential
|
27336
27435
|
}, undefined, telemetryImplementationHint);
|
27337
|
-
return threadId.then((threadId) => __awaiter$
|
27436
|
+
return threadId.then((threadId) => __awaiter$p(void 0, void 0, void 0, function* () {
|
27338
27437
|
if (UNSUPPORTED_CHAT_THREAD_TYPE.some((t) => threadId.includes(t))) {
|
27339
27438
|
console.error(`Invalid Chat ThreadId: ${threadId}. Please note with Teams Channel Meetings, only Calling is supported and Chat is not currently supported. Read more: ${TEAMS_LIMITATION_LEARN_MORE}.`);
|
27340
27439
|
}
|
@@ -27395,7 +27494,7 @@ beforeDispose) => {
|
|
27395
27494
|
if (!credential || !displayName || !endpoint || !threadId || !userId) {
|
27396
27495
|
return;
|
27397
27496
|
}
|
27398
|
-
(() => __awaiter$
|
27497
|
+
(() => __awaiter$p(void 0, void 0, void 0, function* () {
|
27399
27498
|
if (adapterRef.current) {
|
27400
27499
|
// Dispose the old adapter when a new one is created.
|
27401
27500
|
//
|
@@ -27427,7 +27526,7 @@ beforeDispose) => {
|
|
27427
27526
|
// Dispose any existing adapter when the component unmounts.
|
27428
27527
|
React.useEffect(() => {
|
27429
27528
|
return () => {
|
27430
|
-
(() => __awaiter$
|
27529
|
+
(() => __awaiter$p(void 0, void 0, void 0, function* () {
|
27431
27530
|
if (adapterRef.current) {
|
27432
27531
|
if (beforeDisposeRef.current) {
|
27433
27532
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -27449,7 +27548,7 @@ beforeDispose) => {
|
|
27449
27548
|
* @public
|
27450
27549
|
*/
|
27451
27550
|
function createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient) {
|
27452
|
-
return __awaiter$
|
27551
|
+
return __awaiter$p(this, void 0, void 0, function* () {
|
27453
27552
|
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);
|
27454
27553
|
});
|
27455
27554
|
}
|
@@ -27830,7 +27929,7 @@ const sendboxContainerStyles = {
|
|
27830
27929
|
|
27831
27930
|
// Copyright (c) Microsoft Corporation.
|
27832
27931
|
// Licensed under the MIT License.
|
27833
|
-
var __awaiter$
|
27932
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
27834
27933
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
27835
27934
|
return new (P || (P = Promise))(function (resolve, reject) {
|
27836
27935
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -27851,7 +27950,7 @@ const AvatarPersona = (props) => {
|
|
27851
27950
|
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
|
27852
27951
|
const [data, setData] = React.useState();
|
27853
27952
|
React.useEffect(() => {
|
27854
|
-
(() => __awaiter$
|
27953
|
+
(() => __awaiter$o(void 0, void 0, void 0, function* () {
|
27855
27954
|
if (dataProvider && userId) {
|
27856
27955
|
const newData = yield dataProvider(userId);
|
27857
27956
|
if (avatarDeepDifferenceCheck(data, newData)) {
|
@@ -28120,6 +28219,10 @@ const createCompositeHandlers$1 = memoizeOne((adapter) => ({
|
|
28120
28219
|
}
|
28121
28220
|
return adapter.sendMessage(content, options);
|
28122
28221
|
},
|
28222
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28223
|
+
onUploadImage: adapter.uploadImage,
|
28224
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28225
|
+
onDeleteImage: adapter.deleteImage,
|
28123
28226
|
onLoadPreviousChatMessages: adapter.loadPreviousChatMessages,
|
28124
28227
|
onMessageSeen: adapter.sendReadReceipt,
|
28125
28228
|
onTyping: adapter.sendTypingIndicator,
|
@@ -28399,7 +28502,7 @@ const AttachmentDownloadErrorBar = (props) => {
|
|
28399
28502
|
/**
|
28400
28503
|
* Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
|
28401
28504
|
*/
|
28402
|
-
const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-
|
28505
|
+
const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-Bz_1ebsD.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
|
28403
28506
|
/**
|
28404
28507
|
* @private
|
28405
28508
|
* Use this function to load RoosterJS dependencies early in the lifecycle.
|
@@ -28407,14 +28510,15 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function
|
|
28407
28510
|
*
|
28408
28511
|
/* @conditional-compile-remove(rich-text-editor-composite-support)
|
28409
28512
|
*/
|
28410
|
-
const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-
|
28513
|
+
const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-Bz_1ebsD.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
|
28411
28514
|
/**
|
28412
28515
|
* @private
|
28413
28516
|
*/
|
28414
28517
|
const SendBoxPicker = (props) => {
|
28415
|
-
const {
|
28416
28518
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
28417
|
-
richTextEditorOptions } = props;
|
28519
|
+
const { richTextEditorOptions } = props;
|
28520
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28521
|
+
const { onPaste, onUploadInlineImage, imageUploadsInProgress, onCancelInlineImageUpload } = richTextEditorOptions || {};
|
28418
28522
|
const sendBoxProps = usePropsFor$2(SendBox);
|
28419
28523
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
28420
28524
|
const isRichTextEditorEnabled = React.useMemo(() => {
|
@@ -28425,11 +28529,132 @@ const SendBoxPicker = (props) => {
|
|
28425
28529
|
if (isRichTextEditorEnabled) {
|
28426
28530
|
return (React.createElement(_ErrorBoundary, { fallback: sendBox },
|
28427
28531
|
React.createElement(React.Suspense, { fallback: sendBox },
|
28428
|
-
React.createElement(RichTextSendBoxWrapper, Object.assign({}, props)))));
|
28532
|
+
React.createElement(RichTextSendBoxWrapper, Object.assign({}, props, { onPaste: onPaste, onUploadInlineImage: onUploadInlineImage, imageUploadsInProgress: imageUploadsInProgress, onCancelInlineImageUpload: onCancelInlineImageUpload })))));
|
28429
28533
|
}
|
28430
28534
|
return sendBox;
|
28431
28535
|
};
|
28432
28536
|
|
28537
|
+
// Copyright (c) Microsoft Corporation.
|
28538
|
+
// Licensed under the MIT License.
|
28539
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
28540
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
28541
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
28542
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
28543
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
28544
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
28545
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
28546
|
+
});
|
28547
|
+
};
|
28548
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28549
|
+
const fetchBlobData = (resource, options) => __awaiter$n(void 0, void 0, void 0, function* () {
|
28550
|
+
// default timeout is 30 seconds
|
28551
|
+
const { timeout = 30000, abortController } = options;
|
28552
|
+
const id = setTimeout(() => {
|
28553
|
+
abortController.abort();
|
28554
|
+
}, timeout);
|
28555
|
+
const response = yield fetch(resource, Object.assign(Object.assign({}, options), { signal: abortController.signal }));
|
28556
|
+
clearTimeout(id);
|
28557
|
+
return response;
|
28558
|
+
});
|
28559
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28560
|
+
const getInlineImageData = (image) => __awaiter$n(void 0, void 0, void 0, function* () {
|
28561
|
+
const blobImage = undefined;
|
28562
|
+
if (image.startsWith('blob') || image.startsWith('http')) {
|
28563
|
+
const res = yield fetchBlobData(image, { abortController: new AbortController() });
|
28564
|
+
const blobImage = yield res.blob();
|
28565
|
+
return blobImage;
|
28566
|
+
}
|
28567
|
+
return blobImage;
|
28568
|
+
});
|
28569
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28570
|
+
/**
|
28571
|
+
* @private
|
28572
|
+
*/
|
28573
|
+
const useImageUpload = () => {
|
28574
|
+
const MAX_INLINE_IMAGE_UPLOAD_SIZE_MB = 20;
|
28575
|
+
const adapter = useAdapter$1();
|
28576
|
+
const [inlineImageUploads, handleInlineImageUploadAction] = React.useReducer(AttachmentUploadReducer, []);
|
28577
|
+
const inlineImageUploadHandler = React.useCallback((uploadTasks) => __awaiter$n(void 0, void 0, void 0, function* () {
|
28578
|
+
var _a, _b, _c, _d, _e;
|
28579
|
+
for (const task of uploadTasks) {
|
28580
|
+
const uploadTask = task;
|
28581
|
+
const image = uploadTask.image;
|
28582
|
+
if (!image) {
|
28583
|
+
uploadTask.notifyUploadFailed(`Image data for "${(_a = task.metadata) === null || _a === void 0 ? void 0 : _a.name}" is not provided.`);
|
28584
|
+
continue;
|
28585
|
+
}
|
28586
|
+
if (image && image.size > MAX_INLINE_IMAGE_UPLOAD_SIZE_MB * 1024 * 1024) {
|
28587
|
+
uploadTask.notifyUploadFailed(`"${(_b = task.metadata) === null || _b === void 0 ? void 0 : _b.name}" is too big. Select a file under ${MAX_INLINE_IMAGE_UPLOAD_SIZE_MB}MB.`);
|
28588
|
+
continue;
|
28589
|
+
}
|
28590
|
+
const SUPPORTED_FILES = ['jpg', 'jpeg', 'png', 'gif', 'heic', 'webp'];
|
28591
|
+
const imageExtension = (_d = (_c = task.metadata) === null || _c === void 0 ? void 0 : _c.name.split('.').pop()) !== null && _d !== void 0 ? _d : '';
|
28592
|
+
if (!SUPPORTED_FILES.includes(imageExtension)) {
|
28593
|
+
uploadTask.notifyUploadFailed(`Uploading ".${imageExtension}" image is not allowed.`);
|
28594
|
+
continue;
|
28595
|
+
}
|
28596
|
+
try {
|
28597
|
+
const response = yield adapter.uploadImage(image, (_e = task.metadata) === null || _e === void 0 ? void 0 : _e.name);
|
28598
|
+
uploadTask.notifyUploadCompleted(response.id, task.metadata.url || '');
|
28599
|
+
}
|
28600
|
+
catch (error) {
|
28601
|
+
console.error(error);
|
28602
|
+
uploadTask.notifyUploadFailed('Unable to upload inline image. Please try again later.');
|
28603
|
+
}
|
28604
|
+
}
|
28605
|
+
}), [adapter]);
|
28606
|
+
const onUploadInlineImage = React.useCallback((image, fileName) => __awaiter$n(void 0, void 0, void 0, function* () {
|
28607
|
+
if (!image) {
|
28608
|
+
return;
|
28609
|
+
}
|
28610
|
+
const imageData = yield getInlineImageData(image);
|
28611
|
+
if (!imageData) {
|
28612
|
+
return;
|
28613
|
+
}
|
28614
|
+
const taskId = nanoid.nanoid();
|
28615
|
+
const uploadTask = {
|
28616
|
+
image: imageData,
|
28617
|
+
taskId,
|
28618
|
+
metadata: {
|
28619
|
+
id: taskId,
|
28620
|
+
name: fileName,
|
28621
|
+
url: image,
|
28622
|
+
progress: 0
|
28623
|
+
},
|
28624
|
+
notifyUploadProgressChanged: (value) => {
|
28625
|
+
handleInlineImageUploadAction({ type: AttachmentUploadActionType.Progress, taskId, progress: value });
|
28626
|
+
},
|
28627
|
+
notifyUploadCompleted: (id, url) => {
|
28628
|
+
handleInlineImageUploadAction({ type: AttachmentUploadActionType.Completed, taskId, id, url });
|
28629
|
+
},
|
28630
|
+
notifyUploadFailed: (message) => {
|
28631
|
+
handleInlineImageUploadAction({ type: AttachmentUploadActionType.Failed, taskId, message });
|
28632
|
+
// remove the failed upload task when error banner is auto dismissed after 10 seconds
|
28633
|
+
// so the banner won't be shown again on UI re-rendering.
|
28634
|
+
setTimeout(() => {
|
28635
|
+
handleInlineImageUploadAction({ type: AttachmentUploadActionType.Remove, id: taskId });
|
28636
|
+
}, 10 * 1000);
|
28637
|
+
}
|
28638
|
+
};
|
28639
|
+
const newUploads = [uploadTask];
|
28640
|
+
handleInlineImageUploadAction({ type: AttachmentUploadActionType.Set, newUploads });
|
28641
|
+
inlineImageUploadHandler(newUploads);
|
28642
|
+
}), [inlineImageUploadHandler]);
|
28643
|
+
const onCancelInlineImageUploadHandler = React.useCallback((imageId) => {
|
28644
|
+
const imageUpload = inlineImageUploads.find((upload) => upload.metadata.id === imageId);
|
28645
|
+
const uploadId = imageUpload === null || imageUpload === void 0 ? void 0 : imageUpload.metadata.id;
|
28646
|
+
if (!uploadId) {
|
28647
|
+
return;
|
28648
|
+
}
|
28649
|
+
handleInlineImageUploadAction({ type: AttachmentUploadActionType.Remove, id: uploadId });
|
28650
|
+
// TODO: remove local blob
|
28651
|
+
if ((imageUpload === null || imageUpload === void 0 ? void 0 : imageUpload.metadata.progress) === 1) {
|
28652
|
+
adapter.deleteImage(imageId);
|
28653
|
+
}
|
28654
|
+
}, [adapter, inlineImageUploads]);
|
28655
|
+
return [inlineImageUploads, handleInlineImageUploadAction, onUploadInlineImage, onCancelInlineImageUploadHandler];
|
28656
|
+
};
|
28657
|
+
|
28433
28658
|
// Copyright (c) Microsoft Corporation.
|
28434
28659
|
// Licensed under the MIT License.
|
28435
28660
|
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
@@ -28458,6 +28683,8 @@ const ChatScreen = (props) => {
|
|
28458
28683
|
const [uploads, handleUploadAction] = React.useReducer(AttachmentUploadReducer, []);
|
28459
28684
|
const adapter = useAdapter$1();
|
28460
28685
|
const theme = useTheme();
|
28686
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28687
|
+
const [inlineImageUploads, handleInlineImageUploadAction, onUploadInlineImage, onCancelInlineImageUploadHandler] = useImageUpload();
|
28461
28688
|
React.useEffect(() => {
|
28462
28689
|
// Initial data should be always fetched by the composite(or external caller) instead of the adapter
|
28463
28690
|
const fetchData = () => __awaiter$m(void 0, void 0, void 0, function* () {
|
@@ -28691,6 +28918,10 @@ const ChatScreen = (props) => {
|
|
28691
28918
|
const attachments = React.useMemo(() => {
|
28692
28919
|
return uploads === null || uploads === void 0 ? void 0 : uploads.map((v) => v.metadata);
|
28693
28920
|
}, [uploads]);
|
28921
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28922
|
+
const imageUploadsInProgress = React.useMemo(() => {
|
28923
|
+
return inlineImageUploads === null || inlineImageUploads === void 0 ? void 0 : inlineImageUploads.map((v) => v.metadata);
|
28924
|
+
}, [inlineImageUploads]);
|
28694
28925
|
const onSendMessageHandler = React.useCallback(function (content,
|
28695
28926
|
/* @conditional-compile-remove(file-sharing-acs) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */ options) {
|
28696
28927
|
return __awaiter$m(this, void 0, void 0, function* () {
|
@@ -28699,6 +28930,8 @@ const ChatScreen = (props) => {
|
|
28699
28930
|
const attachments = (_a = options === null || options === void 0 ? void 0 : options.attachments) !== null && _a !== void 0 ? _a : [];
|
28700
28931
|
/* @conditional-compile-remove(file-sharing-acs) */
|
28701
28932
|
handleUploadAction({ type: AttachmentUploadActionType.Clear });
|
28933
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28934
|
+
handleInlineImageUploadAction({ type: AttachmentUploadActionType.Clear });
|
28702
28935
|
/* @conditional-compile-remove(file-sharing-acs) */
|
28703
28936
|
yield adapter.sendMessage(content, {
|
28704
28937
|
attachments: attachments,
|
@@ -28708,34 +28941,44 @@ const ChatScreen = (props) => {
|
|
28708
28941
|
/* @conditional-compile-remove(file-sharing-acs) */
|
28709
28942
|
return;
|
28710
28943
|
});
|
28711
|
-
}, [adapter]);
|
28944
|
+
}, [adapter, /* @conditional-compile-remove(rich-text-editor-image-upload) */ handleInlineImageUploadAction]);
|
28945
|
+
const onUpdateMessageHandler = React.useCallback((messageId, content) => __awaiter$m(void 0, void 0, void 0, function* () {
|
28946
|
+
yield messageThreadProps.onUpdateMessage(messageId, content);
|
28947
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28948
|
+
handleInlineImageUploadAction({ type: AttachmentUploadActionType.Clear });
|
28949
|
+
}), [/* @conditional-compile-remove(rich-text-editor-image-upload) */ handleInlineImageUploadAction, messageThreadProps]);
|
28950
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28951
|
+
const onCancelEditMessageHandler = React.useCallback(() => {
|
28952
|
+
handleInlineImageUploadAction({ type: AttachmentUploadActionType.Clear });
|
28953
|
+
}, [handleInlineImageUploadAction]);
|
28712
28954
|
/* @conditional-compile-remove(file-sharing-acs) */
|
28713
28955
|
const onCancelUploadHandler = React.useCallback((id) => {
|
28714
28956
|
var _a, _b;
|
28715
28957
|
handleUploadAction({ type: AttachmentUploadActionType.Remove, id });
|
28716
28958
|
(_b = (_a = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _a === void 0 ? void 0 : _a.handleAttachmentRemoval) === null || _b === void 0 ? void 0 : _b.call(_a, id);
|
28717
28959
|
}, [attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions]);
|
28718
|
-
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28719
|
-
const removeImageTags = React.useCallback((event) => {
|
28720
|
-
event.content.querySelectorAll('img').forEach((image) => {
|
28721
|
-
// If the image is the only child of its parent, remove all the parents of this img element.
|
28722
|
-
let parentNode = image.parentElement;
|
28723
|
-
let currentNode = image;
|
28724
|
-
while ((parentNode === null || parentNode === void 0 ? void 0 : parentNode.childNodes.length) === 1) {
|
28725
|
-
currentNode = parentNode;
|
28726
|
-
parentNode = parentNode.parentElement;
|
28727
|
-
}
|
28728
|
-
currentNode === null || currentNode === void 0 ? void 0 : currentNode.remove();
|
28729
|
-
});
|
28730
|
-
}, []);
|
28731
28960
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
28732
28961
|
const richTextEditorOptions = React.useMemo(() => {
|
28733
28962
|
return (options === null || options === void 0 ? void 0 : options.richTextEditor)
|
28734
28963
|
? {
|
28735
|
-
/* @conditional-compile-remove(rich-text-editor-image-upload) */ onPaste:
|
28964
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */ onPaste: undefined,
|
28965
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28966
|
+
onUploadInlineImage: onUploadInlineImage,
|
28967
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28968
|
+
imageUploadsInProgress: imageUploadsInProgress,
|
28969
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28970
|
+
onCancelInlineImageUpload: onCancelInlineImageUploadHandler
|
28736
28971
|
}
|
28737
28972
|
: undefined;
|
28738
|
-
}, [
|
28973
|
+
}, [
|
28974
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28975
|
+
imageUploadsInProgress,
|
28976
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28977
|
+
onCancelInlineImageUploadHandler,
|
28978
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28979
|
+
onUploadInlineImage,
|
28980
|
+
options === null || options === void 0 ? void 0 : options.richTextEditor
|
28981
|
+
]);
|
28739
28982
|
return (React.createElement(react.Stack, { className: chatContainer, grow: true },
|
28740
28983
|
(options === null || options === void 0 ? void 0 : options.topic) !== false && React.createElement(ChatHeader, Object.assign({}, headerProps)),
|
28741
28984
|
React.createElement(react.Stack, { className: chatArea, tokens: participantListContainerPadding, horizontal: true, grow: true },
|
@@ -28745,7 +28988,9 @@ const ChatScreen = (props) => {
|
|
28745
28988
|
React.createElement(AttachmentDownloadErrorBar, { onDismissDownloadErrorMessage: React.useCallback(() => {
|
28746
28989
|
setDownloadErrorMessage('');
|
28747
28990
|
}, []), attachmentDownloadErrorMessage: downloadErrorMessage || '' }),
|
28748
|
-
React.createElement(MessageThread, Object.assign({}, messageThreadProps, {
|
28991
|
+
React.createElement(MessageThread, Object.assign({}, messageThreadProps, { onUpdateMessage: onUpdateMessageHandler,
|
28992
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
28993
|
+
onCancelEditMessage: onCancelEditMessageHandler, onRenderAvatar: onRenderAvatarCallback, onRenderMessage: onRenderMessage,
|
28749
28994
|
/* @conditional-compile-remove(file-sharing-acs) */
|
28750
28995
|
onRenderAttachmentDownloads: onRenderAttachmentDownloads, inlineImageOptions: inlineImageOptions, numberOfChatMessagesToReload: defaultNumberOfChatMessagesToReload, styles: messageThreadStyles,
|
28751
28996
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
@@ -28767,7 +29012,13 @@ const ChatScreen = (props) => {
|
|
28767
29012
|
onCancelAttachmentUpload: onCancelUploadHandler,
|
28768
29013
|
// we need to overwrite onSendMessage for SendBox because we need to clear attachment state
|
28769
29014
|
// when submit button is clicked
|
28770
|
-
onSendMessage: onSendMessageHandler
|
29015
|
+
onSendMessage: onSendMessageHandler,
|
29016
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
29017
|
+
onUploadInlineImage: onUploadInlineImage,
|
29018
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
29019
|
+
imageUploadsInProgress: imageUploadsInProgress,
|
29020
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
29021
|
+
onCancelInlineImageUpload: onCancelInlineImageUploadHandler })),
|
28771
29022
|
formFactor !== 'mobile' && (
|
28772
29023
|
/* @conditional-compile-remove(file-sharing-acs) */
|
28773
29024
|
React.createElement(AttachmentButton, null))))),
|
@@ -28918,44 +29169,46 @@ const adaptCompositeState = (compositeState) => {
|
|
28918
29169
|
// Copyright (c) Microsoft Corporation.
|
28919
29170
|
// Licensed under the MIT License.
|
28920
29171
|
/**
|
28921
|
-
* Take the set of active
|
29172
|
+
* Take the set of active notifications, and filter to only those that are newer than previously dismissed notifications or have never been dismissed.
|
28922
29173
|
*
|
28923
29174
|
* @private
|
28924
29175
|
*/
|
28925
|
-
const
|
28926
|
-
const
|
28927
|
-
const
|
28928
|
-
return (!
|
29176
|
+
const filterLatestNotifications = (activeNotifications, trackedNotifications) => {
|
29177
|
+
const filteredNotifications = activeNotifications.filter((activeNotification) => {
|
29178
|
+
const trackedNotification = trackedNotifications[activeNotification.type];
|
29179
|
+
return (!trackedNotification ||
|
29180
|
+
!trackedNotification.lastDismissedAt ||
|
29181
|
+
trackedNotification.lastDismissedAt < trackedNotification.mostRecentlyActive);
|
28929
29182
|
});
|
28930
|
-
return
|
29183
|
+
return filteredNotifications;
|
28931
29184
|
};
|
28932
29185
|
/**
|
28933
|
-
* Maintain a record of the most recently active
|
29186
|
+
* Maintain a record of the most recently active notification for each notification type.
|
28934
29187
|
*
|
28935
29188
|
* @private
|
28936
29189
|
*/
|
28937
|
-
const
|
29190
|
+
const updateTrackedNotificationsWithActiveNotifications = (existingTrackedNotifications, activeNotifications) => {
|
28938
29191
|
var _a, _b;
|
28939
|
-
const
|
28940
|
-
// Only care about active
|
28941
|
-
for (const
|
28942
|
-
const
|
28943
|
-
|
28944
|
-
mostRecentlyActive: (_b = (_a =
|
28945
|
-
lastDismissedAt:
|
29192
|
+
const trackedNotifications = {};
|
29193
|
+
// Only care about active notifications. If notifications are no longer active we do not track that they have been previously dismissed.
|
29194
|
+
for (const activeNotification of activeNotifications) {
|
29195
|
+
const existingTrackedNotification = existingTrackedNotifications[activeNotification.type];
|
29196
|
+
trackedNotifications[activeNotification.type] = {
|
29197
|
+
mostRecentlyActive: (_b = (_a = activeNotification.timestamp) !== null && _a !== void 0 ? _a : existingTrackedNotification === null || existingTrackedNotification === void 0 ? void 0 : existingTrackedNotification.mostRecentlyActive) !== null && _b !== void 0 ? _b : new Date(Date.now()),
|
29198
|
+
lastDismissedAt: existingTrackedNotification === null || existingTrackedNotification === void 0 ? void 0 : existingTrackedNotification.lastDismissedAt
|
28946
29199
|
};
|
28947
29200
|
}
|
28948
|
-
return
|
29201
|
+
return trackedNotifications;
|
28949
29202
|
};
|
28950
29203
|
/**
|
28951
|
-
* Create a record for when the
|
29204
|
+
* Create a record for when the notification was most recently dismissed for tracking dismissed notifications.
|
28952
29205
|
*
|
28953
29206
|
* @private
|
28954
29207
|
*/
|
28955
|
-
const
|
29208
|
+
const trackNotificationAsDismissed = (notificationType, trackedNotifications) => {
|
28956
29209
|
const now = new Date(Date.now());
|
28957
|
-
const
|
28958
|
-
return Object.assign(Object.assign({},
|
29210
|
+
const existingNotification = trackedNotifications[notificationType];
|
29211
|
+
return Object.assign(Object.assign({}, trackedNotifications), { [notificationType]: Object.assign(Object.assign({}, (existingNotification || {})), { lastDismissedAt: now }) });
|
28959
29212
|
};
|
28960
29213
|
|
28961
29214
|
// Copyright (c) Microsoft Corporation.
|
@@ -29451,6 +29704,110 @@ const getSelectedCameraFromAdapterState = (state) => state.devices.selectedCamer
|
|
29451
29704
|
const getLocatorOrTargetCallees = (locatorOrTargetCallees) => {
|
29452
29705
|
return !!Array.isArray(locatorOrTargetCallees);
|
29453
29706
|
};
|
29707
|
+
/* @conditional-compile-remove(notifications) */
|
29708
|
+
/**
|
29709
|
+
* Return different conditions based on the current and previous state of recording and transcribing
|
29710
|
+
*
|
29711
|
+
* @param callRecordState - The current call record state: on, off, stopped
|
29712
|
+
* @param callTranscribeState - The current call transcribe state: on, off, stopped
|
29713
|
+
*
|
29714
|
+
* @remarks - The stopped state means: previously on but currently off
|
29715
|
+
*
|
29716
|
+
* @private
|
29717
|
+
*/
|
29718
|
+
const computeVariant = (callRecordState, callTranscribeState) => {
|
29719
|
+
if (callRecordState === 'on' && callTranscribeState === 'on') {
|
29720
|
+
return 'recordingAndTranscriptionStarted';
|
29721
|
+
}
|
29722
|
+
else if (callRecordState === 'on' && callTranscribeState === 'off') {
|
29723
|
+
return 'recordingStarted';
|
29724
|
+
}
|
29725
|
+
else if (callRecordState === 'off' && callTranscribeState === 'on') {
|
29726
|
+
return 'transcriptionStarted';
|
29727
|
+
}
|
29728
|
+
else if (callRecordState === 'on' && callTranscribeState === 'stopped') {
|
29729
|
+
return 'transcriptionStoppedStillRecording';
|
29730
|
+
}
|
29731
|
+
else if (callRecordState === 'stopped' && callTranscribeState === 'on') {
|
29732
|
+
return 'recordingStoppedStillTranscribing';
|
29733
|
+
}
|
29734
|
+
else if (callRecordState === 'off' && callTranscribeState === 'stopped') {
|
29735
|
+
return 'transcriptionStopped';
|
29736
|
+
}
|
29737
|
+
else if (callRecordState === 'stopped' && callTranscribeState === 'off') {
|
29738
|
+
return 'recordingStopped';
|
29739
|
+
}
|
29740
|
+
else if (callRecordState === 'stopped' && callTranscribeState === 'stopped') {
|
29741
|
+
return 'recordingAndTranscriptionStopped';
|
29742
|
+
}
|
29743
|
+
else {
|
29744
|
+
return 'noState';
|
29745
|
+
}
|
29746
|
+
};
|
29747
|
+
/* @conditional-compile-remove(notifications) */
|
29748
|
+
/**
|
29749
|
+
* @private
|
29750
|
+
*/
|
29751
|
+
function determineStates(previous, current) {
|
29752
|
+
// if current state is on, then return on
|
29753
|
+
if (current) {
|
29754
|
+
return 'on';
|
29755
|
+
}
|
29756
|
+
// if current state is off
|
29757
|
+
else {
|
29758
|
+
// if previous state is on and current state is off, return stopped (on -> off)
|
29759
|
+
if (previous === 'on') {
|
29760
|
+
return 'stopped';
|
29761
|
+
}
|
29762
|
+
// otherwise remain previous state unchanged
|
29763
|
+
else {
|
29764
|
+
return previous;
|
29765
|
+
}
|
29766
|
+
}
|
29767
|
+
}
|
29768
|
+
/* @conditional-compile-remove(notifications) */
|
29769
|
+
/**
|
29770
|
+
* Compute compliance notification based on latest compliance state and cached props.
|
29771
|
+
* @private
|
29772
|
+
*/
|
29773
|
+
function computeComplianceNotification(complianceProps, cachedProps) {
|
29774
|
+
// Only update cached props and variant if there is _some_ change in the latest props.
|
29775
|
+
// This ensures that state machine is only updated if there is an actual change in the props.
|
29776
|
+
const shouldUpdateCached = complianceProps.callRecordState !== cachedProps.current.latestBooleanState.callRecordState ||
|
29777
|
+
complianceProps.callTranscribeState !== cachedProps.current.latestBooleanState.callTranscribeState;
|
29778
|
+
// The following three operations must be performed in this exact order:
|
29779
|
+
// [1]: Update cached state to transition the state machine.
|
29780
|
+
if (shouldUpdateCached) {
|
29781
|
+
cachedProps.current = {
|
29782
|
+
latestBooleanState: complianceProps,
|
29783
|
+
latestStringState: {
|
29784
|
+
callRecordState: determineStates(cachedProps.current.latestStringState.callRecordState, complianceProps.callRecordState),
|
29785
|
+
callTranscribeState: determineStates(cachedProps.current.latestStringState.callTranscribeState, complianceProps.callTranscribeState)
|
29786
|
+
},
|
29787
|
+
lastUpdated: Date.now()
|
29788
|
+
};
|
29789
|
+
}
|
29790
|
+
// [2]: Compute the variant, using the transitioned state machine.
|
29791
|
+
const variant = computeVariant(cachedProps.current.latestStringState.callRecordState, cachedProps.current.latestStringState.callTranscribeState);
|
29792
|
+
// [3]: Transition the state machine again to deal with some end-states.
|
29793
|
+
if (!shouldUpdateCached &&
|
29794
|
+
cachedProps.current.latestStringState.callRecordState === 'stopped' &&
|
29795
|
+
cachedProps.current.latestStringState.callTranscribeState === 'stopped') {
|
29796
|
+
// When both states are stopped, after displaying message "RECORDING_AND_TRANSCRIPTION_STOPPED", change both states to off (going back to the default state).
|
29797
|
+
cachedProps.current.latestStringState.callRecordState = 'off';
|
29798
|
+
cachedProps.current.latestStringState.callTranscribeState = 'off';
|
29799
|
+
}
|
29800
|
+
// If the variant is not 'noState', then show the notification.
|
29801
|
+
if (variant !== 'noState') {
|
29802
|
+
return {
|
29803
|
+
type: variant,
|
29804
|
+
timestamp: new Date(Date.now())
|
29805
|
+
};
|
29806
|
+
}
|
29807
|
+
else {
|
29808
|
+
return undefined;
|
29809
|
+
}
|
29810
|
+
}
|
29454
29811
|
|
29455
29812
|
// Copyright (c) Microsoft Corporation.
|
29456
29813
|
// Licensed under the MIT License.
|
@@ -34597,6 +34954,10 @@ const CallArrangement = (props) => {
|
|
34597
34954
|
/* @conditional-compile-remove(notifications) */
|
34598
34955
|
return React.createElement(React.Fragment, null);
|
34599
34956
|
};
|
34957
|
+
const complianceBannerTrampoline = () => {
|
34958
|
+
/* @conditional-compile-remove(notifications) */
|
34959
|
+
return React.createElement(React.Fragment, null);
|
34960
|
+
};
|
34600
34961
|
return (React.createElement("div", { ref: containerRef, className: react.mergeStyles(containerDivStyles), id: props.id },
|
34601
34962
|
React.createElement(react.Stack, { verticalFill: true, horizontalAlign: "stretch", className: containerClassName, "data-ui-id": props.dataUiId },
|
34602
34963
|
React.createElement(react.Stack, { reversed: true, horizontal: verticalControlBar, grow: true, styles: callArrangementContainerStyles(verticalControlBar) },
|
@@ -34627,11 +34988,10 @@ const CallArrangement = (props) => {
|
|
34627
34988
|
React.createElement(react.Stack.Item, { styles: callGalleryStyles, grow: true },
|
34628
34989
|
React.createElement(react.Stack, { verticalFill: true, styles: mediaGalleryContainerStyles$1 },
|
34629
34990
|
React.createElement(react.Stack.Item, { styles: notificationsContainerStyles },
|
34630
|
-
|
34631
|
-
React.createElement(_ComplianceBanner, Object.assign({}, props.complianceBannerProps))),
|
34991
|
+
complianceBannerTrampoline(),
|
34632
34992
|
errorNotificationTrampoline(),
|
34633
34993
|
/* @conditional-compile-remove(notifications) */ props.latestNotifications && (React.createElement(react.Stack, { styles: notificationStackStyles, horizontalAlign: "center", verticalAlign: "center" },
|
34634
|
-
React.createElement(NotificationStack, { activeNotifications: props.latestNotifications }))),
|
34994
|
+
React.createElement(NotificationStack, { activeNotifications: props.latestNotifications, onDismissNotification: props.onDismissNotification }))),
|
34635
34995
|
props.capabilitiesChangedNotificationBarProps &&
|
34636
34996
|
props.capabilitiesChangedNotificationBarProps.capabilitiesChangedNotifications.length > 0 && (React.createElement(react.Stack, { styles: bannerNotificationStyles },
|
34637
34997
|
React.createElement(CapabilitiesChangedNotificationBar, Object.assign({}, props.capabilitiesChangedNotificationBarProps, { capabilitiesChangedNotifications: filteredCapabilitesChangedNotifications !== null && filteredCapabilitesChangedNotifications !== void 0 ? filteredCapabilitesChangedNotifications : [] })))),
|
@@ -35147,7 +35507,9 @@ const CallPage = (props) => {
|
|
35147
35507
|
var _a, _b;
|
35148
35508
|
const { callInvitationURL, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, mobileView, galleryLayout = 'floatingLocalVideo', onUserSetGalleryLayoutChange, userSetOverflowGalleryPosition = 'Responsive', onSetUserSetOverflowGalleryPosition, onCloseChatPane, pinnedParticipants, setPinnedParticipants, compositeAudioContext, disableAutoShowDtmfDialer = false,
|
35149
35509
|
/* @conditional-compile-remove(notifications) */
|
35150
|
-
latestNotifications
|
35510
|
+
latestNotifications,
|
35511
|
+
/* @conditional-compile-remove(notifications) */
|
35512
|
+
onDismissNotification } = props;
|
35151
35513
|
// To use useProps to get these states, we need to create another file wrapping Call,
|
35152
35514
|
// It seems unnecessary in this case, so we get the updated states using this approach.
|
35153
35515
|
const { callStatus } = useSelector$1(callStatusSelector);
|
@@ -35187,7 +35549,9 @@ const CallPage = (props) => {
|
|
35187
35549
|
}, onFetchAvatarPersonaData: onFetchAvatarPersonaData, mobileView: mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (onRenderGalleryContentTrampoline()) : (React.createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps, {
|
35188
35550
|
/* /* @conditional-compile-remove(teams-meeting-conference) */ isMobile: mobileView })))) : (React.createElement(React.Fragment, null)), updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onCloseChatPane: onCloseChatPane, dataUiId: 'call-page', latestErrors: props.latestErrors,
|
35189
35551
|
/* @conditional-compile-remove(notifications) */
|
35190
|
-
latestNotifications: latestNotifications, onDismissError: props.onDismissError,
|
35552
|
+
latestNotifications: latestNotifications, onDismissError: props.onDismissError,
|
35553
|
+
/* @conditional-compile-remove(notifications) */
|
35554
|
+
onDismissNotification: onDismissNotification, onUserSetOverflowGalleryPositionChange: onSetUserSetOverflowGalleryPosition, onUserSetGalleryLayoutChange: onUserSetGalleryLayoutChange, userSetGalleryLayout: galleryLayout, capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent, setIsPromptOpen: setIsPromptOpen, setPromptProps: setPromptProps, hideSpotlightButtons: (_b = options === null || options === void 0 ? void 0 : options.spotlight) === null || _b === void 0 ? void 0 : _b.hideSpotlightButtons, pinnedParticipants: pinnedParticipants, setPinnedParticipants: setPinnedParticipants }),
|
35191
35555
|
React.createElement(Prompt, Object.assign({ isOpen: isPromptOpen, onDismiss: () => setIsPromptOpen(false) }, promptProps))));
|
35192
35556
|
};
|
35193
35557
|
/**
|
@@ -36600,7 +36964,9 @@ const LobbyPage = (props) => {
|
|
36600
36964
|
increaseFlyoutItemSize: props.mobileView
|
36601
36965
|
}, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => (React.createElement(LobbyTile, Object.assign({}, lobbyProps, { showLocalVideoCameraCycleButton: props.mobileView, overlayProps: overlayProps(strings, inLobby, Object.values(participants)) }))), dataUiId: 'lobby-page', updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, onDismissError: props.onDismissError,
|
36602
36966
|
/* @conditional-compile-remove(notifications) */
|
36603
|
-
latestNotifications: props.latestNotifications
|
36967
|
+
latestNotifications: props.latestNotifications,
|
36968
|
+
/* @conditional-compile-remove(notifications) */
|
36969
|
+
onDismissNotification: props.onDismissNotification }));
|
36604
36970
|
};
|
36605
36971
|
const overlayProps = (strings, inLobby, remoteParticipants) => {
|
36606
36972
|
/**
|
@@ -36750,7 +37116,11 @@ const TransferPage = (props) => {
|
|
36750
37116
|
increaseFlyoutItemSize: props.mobileView
|
36751
37117
|
}, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => (React.createElement(TransferTile, { userId: transferTileParticipant ? toFlatCommunicationIdentifier(transferTileParticipant === null || transferTileParticipant === void 0 ? void 0 : transferTileParticipant.identifier) : undefined, displayName: transferParticipantDisplayName, initialsName: transferParticipantDisplayName, statusText: pageSubject === 'transferTarget'
|
36752
37118
|
? strings.transferPageTransferTargetText
|
36753
|
-
: strings.transferPageTransferorText, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData })), dataUiId: 'transfer-page', updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, onDismissError: props.onDismissError
|
37119
|
+
: strings.transferPageTransferorText, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData })), dataUiId: 'transfer-page', updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, onDismissError: props.onDismissError,
|
37120
|
+
/* @conditional-compile-remove(notifications) */
|
37121
|
+
onDismissNotification: props.onDismissNotification,
|
37122
|
+
/* @conditional-compile-remove(notifications) */
|
37123
|
+
latestNotifications: props.latestNotifications })));
|
36754
37124
|
};
|
36755
37125
|
const TransferTile = (props) => {
|
36756
37126
|
const { displayName, initialsName, userId, onFetchAvatarPersonaData, statusText } = props;
|
@@ -36975,7 +37345,9 @@ const HoldPage = (props) => {
|
|
36975
37345
|
increaseFlyoutItemSize: props.mobileView
|
36976
37346
|
}, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => React.createElement(HoldPane, null), dataUiId: 'hold-page', updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors,
|
36977
37347
|
/* @conditional-compile-remove(notifications) */
|
36978
|
-
latestNotifications: props.latestNotifications, onDismissError: props.onDismissError
|
37348
|
+
latestNotifications: props.latestNotifications, onDismissError: props.onDismissError,
|
37349
|
+
/* @conditional-compile-remove(notifications) */
|
37350
|
+
onDismissNotification: props.onDismissNotification }));
|
36979
37351
|
};
|
36980
37352
|
|
36981
37353
|
// Copyright (c) Microsoft Corporation.
|
@@ -37471,23 +37843,63 @@ const MainScreen = (props) => {
|
|
37471
37843
|
/* @conditional-compile-remove(notifications) */
|
37472
37844
|
const activeInCallErrors = usePropsFor$1(NotificationStack).activeErrorMessages;
|
37473
37845
|
/* @conditional-compile-remove(notifications) */
|
37474
|
-
const
|
37846
|
+
const activeNotificationsFromSelector = usePropsFor$1(NotificationStack).activeNotifications;
|
37847
|
+
/* @conditional-compile-remove(notifications) */
|
37848
|
+
const complianceProps = useSelector$1(complianceBannerSelector);
|
37849
|
+
/* @conditional-compile-remove(notifications) */
|
37850
|
+
const cachedProps = React.useRef({
|
37851
|
+
latestBooleanState: {
|
37852
|
+
callTranscribeState: false,
|
37853
|
+
callRecordState: false
|
37854
|
+
},
|
37855
|
+
latestStringState: {
|
37856
|
+
callTranscribeState: 'off',
|
37857
|
+
callRecordState: 'off'
|
37858
|
+
},
|
37859
|
+
lastUpdated: Date.now()
|
37860
|
+
});
|
37861
|
+
/* @conditional-compile-remove(notifications) */
|
37862
|
+
const complianceNotification = React.useMemo(() => {
|
37863
|
+
return computeComplianceNotification(complianceProps, cachedProps);
|
37864
|
+
}, [complianceProps, cachedProps]);
|
37475
37865
|
const [trackedErrors, setTrackedErrors] = React.useState({});
|
37476
37866
|
/* @conditional-compile-remove(notifications) */
|
37477
37867
|
const [trackedInCallErrors, setTrackedInCallErrors] = React.useState({});
|
37868
|
+
/* @conditional-compile-remove(notifications) */
|
37869
|
+
const [trackedNotifications, setTrackedNotifications] = React.useState({});
|
37870
|
+
/* @conditional-compile-remove(notifications) */
|
37871
|
+
const [activeNotifications, setActiveNotifications] = React.useState(activeNotificationsFromSelector);
|
37872
|
+
/* @conditional-compile-remove(notifications) */
|
37478
37873
|
React.useEffect(() => {
|
37479
|
-
|
37874
|
+
if (complianceNotification) {
|
37875
|
+
setActiveNotifications([...activeNotificationsFromSelector, complianceNotification]);
|
37876
|
+
}
|
37877
|
+
}, [complianceNotification, activeNotificationsFromSelector]);
|
37878
|
+
React.useEffect(() => {
|
37879
|
+
setTrackedErrors((prev) => updateTrackedNotificationsWithActiveNotifications(prev, activeErrors));
|
37480
37880
|
/* @conditional-compile-remove(notifications) */
|
37481
|
-
setTrackedInCallErrors((prev) =>
|
37482
|
-
|
37881
|
+
setTrackedInCallErrors((prev) => updateTrackedNotificationsWithActiveNotifications(prev, activeInCallErrors));
|
37882
|
+
/* @conditional-compile-remove(notifications) */
|
37883
|
+
setTrackedNotifications((prev) => updateTrackedNotificationsWithActiveNotifications(prev, activeNotifications));
|
37884
|
+
}, [
|
37885
|
+
activeErrors,
|
37886
|
+
/* @conditional-compile-remove(notifications) */ activeInCallErrors,
|
37887
|
+
/* @conditional-compile-remove(notifications) */ activeNotifications
|
37888
|
+
]);
|
37483
37889
|
const onDismissError = React.useCallback((error) => {
|
37484
|
-
setTrackedErrors((prev) =>
|
37890
|
+
setTrackedErrors((prev) => trackNotificationAsDismissed(error.type, prev));
|
37485
37891
|
/* @conditional-compile-remove(notifications) */
|
37486
|
-
setTrackedInCallErrors((prev) =>
|
37892
|
+
setTrackedInCallErrors((prev) => trackNotificationAsDismissed(error.type, prev));
|
37893
|
+
}, []);
|
37894
|
+
/* @conditional-compile-remove(notifications) */
|
37895
|
+
const onDismissNotification = React.useCallback((notification) => {
|
37896
|
+
setTrackedNotifications((prev) => trackNotificationAsDismissed(notification.type, prev));
|
37487
37897
|
}, []);
|
37488
|
-
const latestErrors = React.useMemo(() =>
|
37898
|
+
const latestErrors = React.useMemo(() => filterLatestNotifications(activeErrors, trackedErrors), [activeErrors, trackedErrors]);
|
37899
|
+
/* @conditional-compile-remove(notifications) */
|
37900
|
+
const latestInCallErrors = React.useMemo(() => filterLatestNotifications(activeInCallErrors, trackedInCallErrors), [activeInCallErrors, trackedInCallErrors]);
|
37489
37901
|
/* @conditional-compile-remove(notifications) */
|
37490
|
-
const
|
37902
|
+
const latestNotifications = React.useMemo(() => filterLatestNotifications(activeNotifications, trackedNotifications), [activeNotifications, trackedNotifications]);
|
37491
37903
|
const callees = useSelector$1(getTargetCallees);
|
37492
37904
|
const locale = useLocale();
|
37493
37905
|
const palette = useTheme().palette;
|
@@ -37552,23 +37964,31 @@ const MainScreen = (props) => {
|
|
37552
37964
|
case 'lobby':
|
37553
37965
|
pageElement = (React.createElement(LobbyPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: getLatestErrorsTrampoline(),
|
37554
37966
|
/* @conditional-compile-remove(notifications) */
|
37555
|
-
latestNotifications:
|
37967
|
+
latestNotifications: latestNotifications, onDismissError: onDismissError,
|
37968
|
+
/* @conditional-compile-remove(notifications) */
|
37969
|
+
onDismissNotification: onDismissNotification, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps }));
|
37556
37970
|
break;
|
37557
37971
|
case 'transferring':
|
37558
37972
|
pageElement = (React.createElement(TransferPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onFetchAvatarPersonaData: onFetchAvatarPersonaData, latestErrors: getLatestErrorsTrampoline(),
|
37559
37973
|
/* @conditional-compile-remove(notifications) */
|
37560
|
-
latestNotifications:
|
37974
|
+
latestNotifications: latestNotifications, onDismissError: onDismissError,
|
37975
|
+
/* @conditional-compile-remove(notifications) */
|
37976
|
+
onDismissNotification: onDismissNotification, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps }));
|
37561
37977
|
break;
|
37562
37978
|
case 'call':
|
37563
37979
|
pageElement = (React.createElement(CallPage, { callInvitationURL: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onCloseChatPane: props.onCloseChatPane, latestErrors: getLatestErrorsTrampoline(),
|
37564
37980
|
/* @conditional-compile-remove(notifications) */
|
37565
|
-
latestNotifications:
|
37981
|
+
latestNotifications: latestNotifications, onDismissError: onDismissError,
|
37982
|
+
/* @conditional-compile-remove(notifications) */
|
37983
|
+
onDismissNotification: onDismissNotification, galleryLayout: userSetGalleryLayout, onUserSetGalleryLayoutChange: setUserSetGalleryLayout, onSetUserSetOverflowGalleryPosition: setUserSetOverflowGalleryPosition, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps, pinnedParticipants: pinnedParticipants, setPinnedParticipants: setPinnedParticipants, compositeAudioContext: compositeAudioContext, disableAutoShowDtmfDialer: (_q = props.options) === null || _q === void 0 ? void 0 : _q.disableAutoShowDtmfDialer }));
|
37566
37984
|
break;
|
37567
37985
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
37568
37986
|
case 'hold':
|
37569
37987
|
pageElement = (React.createElement(React.Fragment, null, React.createElement(HoldPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: getLatestErrorsTrampoline(),
|
37570
37988
|
/* @conditional-compile-remove(notifications) */
|
37571
|
-
latestNotifications:
|
37989
|
+
latestNotifications: latestNotifications, onDismissError: onDismissError,
|
37990
|
+
/* @conditional-compile-remove(notifications) */
|
37991
|
+
onDismissNotification: onDismissNotification, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps })));
|
37572
37992
|
break;
|
37573
37993
|
}
|
37574
37994
|
useEndedCallConsoleErrors(endedCall);
|
@@ -39573,7 +39993,23 @@ class CallWithChatBackedChatAdapter {
|
|
39573
39993
|
yield this.callWithChatAdapter.sendMessage(content, /* @conditional-compile-remove(file-sharing-acs) */ options);
|
39574
39994
|
});
|
39575
39995
|
};
|
39996
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
39997
|
+
this.uploadImageHandler = function (image, fileName) {
|
39998
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
39999
|
+
return yield this.callWithChatAdapter.uploadImage(image, fileName);
|
40000
|
+
});
|
40001
|
+
};
|
40002
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
40003
|
+
this.deleteImageHandler = function (imageId) {
|
40004
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
40005
|
+
return yield this.callWithChatAdapter.deleteImage(imageId);
|
40006
|
+
});
|
40007
|
+
};
|
39576
40008
|
this.sendMessage = this.sendMessageHandler.bind(this);
|
40009
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
40010
|
+
this.uploadImage = this.uploadImageHandler.bind(this);
|
40011
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
40012
|
+
this.deleteImage = this.deleteImageHandler.bind(this);
|
39577
40013
|
this.sendReadReceipt = (chatMessageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendReadReceipt(chatMessageId); });
|
39578
40014
|
this.sendTypingIndicator = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendTypingIndicator(); });
|
39579
40015
|
this.removeParticipant = (userId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
|
@@ -40210,6 +40646,10 @@ class AzureCommunicationCallWithChatAdapter {
|
|
40210
40646
|
this.disposeScreenShareStreamView.bind(this);
|
40211
40647
|
this.fetchInitialData.bind(this);
|
40212
40648
|
this.sendMessage.bind(this);
|
40649
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
40650
|
+
this.uploadImage.bind(this);
|
40651
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
40652
|
+
this.deleteImage.bind(this);
|
40213
40653
|
this.sendReadReceipt.bind(this);
|
40214
40654
|
this.sendTypingIndicator.bind(this);
|
40215
40655
|
this.loadPreviousChatMessages.bind(this);
|
@@ -40443,6 +40883,24 @@ class AzureCommunicationCallWithChatAdapter {
|
|
40443
40883
|
});
|
40444
40884
|
});
|
40445
40885
|
}
|
40886
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
40887
|
+
/** Upload a chat image. */
|
40888
|
+
uploadImage(image, imageFileName) {
|
40889
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
40890
|
+
return yield this.executeWithResolvedChatAdapter((adapter) => {
|
40891
|
+
return adapter.uploadImage(image, imageFileName);
|
40892
|
+
});
|
40893
|
+
});
|
40894
|
+
}
|
40895
|
+
/* @conditional-compile-remove(rich-text-editor-image-upload) */
|
40896
|
+
/** Delete a chat image. */
|
40897
|
+
deleteImage(imageId) {
|
40898
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
40899
|
+
return yield this.executeWithResolvedChatAdapter((adapter) => {
|
40900
|
+
return adapter.deleteImage(imageId);
|
40901
|
+
});
|
40902
|
+
});
|
40903
|
+
}
|
40446
40904
|
/** Send a chat read receipt. */
|
40447
40905
|
sendReadReceipt(chatMessageId) {
|
40448
40906
|
return __awaiter$2(this, void 0, void 0, function* () {
|
@@ -41607,6 +42065,7 @@ exports._IdentifierProvider = _IdentifierProvider;
|
|
41607
42065
|
exports._formatString = _formatString;
|
41608
42066
|
exports.attachmentMetadataReducer = attachmentMetadataReducer;
|
41609
42067
|
exports.attachmentUploadCardsStyles = attachmentUploadCardsStyles;
|
42068
|
+
exports.cancelInlineImageUpload = cancelInlineImageUpload;
|
41610
42069
|
exports.createAzureCommunicationCallAdapter = createAzureCommunicationCallAdapter;
|
41611
42070
|
exports.createAzureCommunicationCallAdapterFromClient = createAzureCommunicationCallAdapterFromClient;
|
41612
42071
|
exports.createAzureCommunicationCallWithChatAdapter = createAzureCommunicationCallWithChatAdapter;
|
@@ -41630,7 +42089,10 @@ exports.getMessageState = getMessageState;
|
|
41630
42089
|
exports.getMessageWithAttachmentMetadata = getMessageWithAttachmentMetadata;
|
41631
42090
|
exports.getSelector = getSelector$1;
|
41632
42091
|
exports.getSelector$1 = getSelector;
|
42092
|
+
exports.hasIncompleteAttachmentUploads = hasIncompleteAttachmentUploads;
|
41633
42093
|
exports.imageOverlayTheme = imageOverlayTheme;
|
42094
|
+
exports.insertAttachmentsAndImages = insertAttachmentsAndImages;
|
42095
|
+
exports.isAttachmentUploadCompleted = isAttachmentUploadCompleted;
|
41634
42096
|
exports.lightTheme = lightTheme;
|
41635
42097
|
exports.onRenderCancelIcon = onRenderCancelIcon;
|
41636
42098
|
exports.onRenderSubmitIcon = onRenderSubmitIcon;
|
@@ -41658,4 +42120,4 @@ exports.useTeamsCall = useTeamsCall;
|
|
41658
42120
|
exports.useTeamsCallAdapter = useTeamsCallAdapter;
|
41659
42121
|
exports.useTeamsCallAgent = useTeamsCallAgent;
|
41660
42122
|
exports.useTheme = useTheme;
|
41661
|
-
//# sourceMappingURL=index-
|
42123
|
+
//# sourceMappingURL=index-DGXoGo4W.js.map
|