@azure/communication-react 1.18.0-alpha-202407120014 → 1.18.0-alpha-202407152209

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.
Files changed (50) hide show
  1. package/dist/communication-react.d.ts +53 -14
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DaATOUfF.js → ChatMessageComponentAsRichTextEditBox-DUMV7bmO.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DaATOUfF.js.map → ChatMessageComponentAsRichTextEditBox-DUMV7bmO.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-COKF7ZK8.js → RichTextSendBoxWrapper-BYUem3sV.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-COKF7ZK8.js.map → RichTextSendBoxWrapper-BYUem3sV.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-DQgWBNc2.js → index-BV60xvzw.js} +207 -182
  7. package/dist/dist-cjs/communication-react/index-BV60xvzw.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  13. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.d.ts +2 -2
  14. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +2 -4
  15. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  16. package/dist/dist-esm/communication-react/src/index.d.ts +1 -1
  17. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/IncomingCallNotification.d.ts +43 -5
  19. package/dist/dist-esm/react-components/src/components/IncomingCallNotification.js +9 -7
  20. package/dist/dist-esm/react-components/src/components/IncomingCallNotification.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/Notification.d.ts +3 -3
  22. package/dist/dist-esm/react-components/src/components/Notification.js +1 -1
  23. package/dist/dist-esm/react-components/src/components/Notification.js.map +1 -1
  24. package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +5 -5
  25. package/dist/dist-esm/react-components/src/components/NotificationStack.js +1 -1
  26. package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
  27. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +1 -6
  28. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -21
  29. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -1
  30. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +1 -6
  31. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +1 -1
  32. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +2 -8
  33. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
  34. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +1 -1
  35. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +29 -17
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +1 -1
  39. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  40. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +19 -28
  41. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  42. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +12 -0
  43. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +53 -0
  44. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +1 -0
  45. package/dist/dist-esm/react-composites/src/composites/ChatComposite/{image-upload → ImageUpload}/useImageUpload.js +7 -21
  46. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/useImageUpload.js.map +1 -0
  47. package/package.json +5 -4
  48. package/dist/dist-cjs/communication-react/index-DQgWBNc2.js.map +0 -1
  49. package/dist/dist-esm/react-composites/src/composites/ChatComposite/image-upload/useImageUpload.js.map +0 -1
  50. /package/dist/dist-esm/react-composites/src/composites/ChatComposite/{image-upload → ImageUpload}/useImageUpload.d.ts +0 -0
@@ -176,7 +176,7 @@ function getDefaultExportFromCjs (x) {
176
176
  // Copyright (c) Microsoft Corporation.
177
177
  // Licensed under the MIT License.
178
178
  // GENERATED FILE. DO NOT EDIT MANUALLY.
179
- var telemetryVersion = '1.18.0-alpha-202407120014';
179
+ var telemetryVersion = '1.18.0-alpha-202407152209';
180
180
 
181
181
 
182
182
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -416,7 +416,7 @@ const Constants = {
416
416
  */
417
417
  const chatStatefulLogger = logger.createClientLogger('communication-react:chat-stateful');
418
418
 
419
- var __awaiter$V = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
419
+ var __awaiter$W = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
420
420
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
421
421
  return new (P || (P = Promise))(function (resolve, reject) {
422
422
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -458,7 +458,7 @@ class ResourceDownloadQueue {
458
458
  this._messagesNeedingResourceRetrieval.push(copy);
459
459
  }
460
460
  startQueue(threadId, operation, options) {
461
- return __awaiter$V(this, void 0, void 0, function* () {
461
+ return __awaiter$W(this, void 0, void 0, function* () {
462
462
  if (this.isActive) {
463
463
  return;
464
464
  }
@@ -494,7 +494,7 @@ class ResourceDownloadQueue {
494
494
  }
495
495
  }
496
496
  downloadSingleUrl(message, resourceUrl, operation) {
497
- return __awaiter$V(this, void 0, void 0, function* () {
497
+ return __awaiter$W(this, void 0, void 0, function* () {
498
498
  const response = { sourceUrl: '' };
499
499
  try {
500
500
  const abortController = new AbortController();
@@ -510,7 +510,7 @@ class ResourceDownloadQueue {
510
510
  });
511
511
  }
512
512
  downloadAllPreviewUrls(message, operation) {
513
- return __awaiter$V(this, void 0, void 0, function* () {
513
+ return __awaiter$W(this, void 0, void 0, function* () {
514
514
  var _a;
515
515
  const attachments = (_a = message.content) === null || _a === void 0 ? void 0 : _a.attachments;
516
516
  if (message.type === 'html' && attachments) {
@@ -537,7 +537,7 @@ class ResourceDownloadQueue {
537
537
  });
538
538
  }
539
539
  downloadResource(operation, url, abortController) {
540
- return __awaiter$V(this, void 0, void 0, function* () {
540
+ return __awaiter$W(this, void 0, void 0, function* () {
541
541
  this._requestsToCancel[url] = { src: url, abortController };
542
542
  const blobUrl = yield operation(url, { credential: this._credential, endpoint: this._endpoint }, { abortController });
543
543
  delete this._requestsToCancel[url];
@@ -548,9 +548,9 @@ class ResourceDownloadQueue {
548
548
  /**
549
549
  * @private
550
550
  */
551
- const fetchImageSource = (src, authentication, options) => __awaiter$V(void 0, void 0, void 0, function* () {
551
+ const fetchImageSource = (src, authentication, options) => __awaiter$W(void 0, void 0, void 0, function* () {
552
552
  function fetchWithAuthentication(url, token, options) {
553
- return __awaiter$V(this, void 0, void 0, function* () {
553
+ return __awaiter$W(this, void 0, void 0, function* () {
554
554
  const headers = new Headers();
555
555
  headers.append('Authorization', `Bearer ${token}`);
556
556
  return yield fetchWithTimeout(url, {
@@ -561,7 +561,7 @@ const fetchImageSource = (src, authentication, options) => __awaiter$V(void 0, v
561
561
  });
562
562
  }
563
563
  function fetchWithTimeout(resource, options) {
564
- return __awaiter$V(this, void 0, void 0, function* () {
564
+ return __awaiter$W(this, void 0, void 0, function* () {
565
565
  // default timeout is 30 seconds
566
566
  const { timeout = 30000, abortController } = options;
567
567
  const id = setTimeout(() => {
@@ -588,7 +588,7 @@ const fetchImageSource = (src, authentication, options) => __awaiter$V(void 0, v
588
588
 
589
589
  // Copyright (c) Microsoft Corporation.
590
590
  // Licensed under the MIT License.
591
- var __awaiter$U = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
591
+ var __awaiter$V = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
592
592
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
593
593
  return new (P || (P = Promise))(function (resolve, reject) {
594
594
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -664,7 +664,7 @@ let ChatContext$1 = class ChatContext {
664
664
  // Any item in queue should be removed.
665
665
  }
666
666
  downloadResourceToCache(threadId, messageId, resourceUrl) {
667
- return __awaiter$U(this, void 0, void 0, function* () {
667
+ return __awaiter$V(this, void 0, void 0, function* () {
668
668
  var _a;
669
669
  let message = (_a = this.getState().threads[threadId]) === null || _a === void 0 ? void 0 : _a.chatMessages[messageId];
670
670
  if (message && this._fullsizeImageQueue) {
@@ -943,7 +943,7 @@ let ChatContext$1 = class ChatContext {
943
943
  * @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
944
944
  */
945
945
  withAsyncErrorTeedToState(f, target) {
946
- return (...args) => __awaiter$U(this, void 0, void 0, function* () {
946
+ return (...args) => __awaiter$V(this, void 0, void 0, function* () {
947
947
  try {
948
948
  return yield f(...args);
949
949
  }
@@ -1050,7 +1050,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
1050
1050
 
1051
1051
  // Copyright (c) Microsoft Corporation.
1052
1052
  // Licensed under the MIT License.
1053
- var __awaiter$T = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1053
+ var __awaiter$U = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1054
1054
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1055
1055
  return new (P || (P = Promise))(function (resolve, reject) {
1056
1056
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -1140,7 +1140,7 @@ class EventSubscriber {
1140
1140
  };
1141
1141
  // This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
1142
1142
  // Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
1143
- this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$T(this, void 0, void 0, function* () {
1143
+ this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$U(this, void 0, void 0, function* () {
1144
1144
  var _a, e_1, _b, _c;
1145
1145
  try {
1146
1146
  for (var _d = true, _e = __asyncValues$1(this.chatClient
@@ -1234,7 +1234,7 @@ class EventSubscriber {
1234
1234
 
1235
1235
  // Copyright (c) Microsoft Corporation.
1236
1236
  // Licensed under the MIT License.
1237
- var __awaiter$S = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1237
+ var __awaiter$T = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1238
1238
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1239
1239
  return new (P || (P = Promise))(function (resolve, reject) {
1240
1240
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -1256,7 +1256,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
1256
1256
  const threadsIterator = iteratorCreator(...args);
1257
1257
  return {
1258
1258
  next() {
1259
- return __awaiter$S(this, void 0, void 0, function* () {
1259
+ return __awaiter$T(this, void 0, void 0, function* () {
1260
1260
  const result = yield threadsIterator.next();
1261
1261
  if (!result.done && result.value) {
1262
1262
  decorateFn(result.value, context);
@@ -1271,7 +1271,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
1271
1271
  const pages = threadsIterator.byPage(settings);
1272
1272
  return {
1273
1273
  next() {
1274
- return __awaiter$S(this, void 0, void 0, function* () {
1274
+ return __awaiter$T(this, void 0, void 0, function* () {
1275
1275
  const result = yield pages.next();
1276
1276
  const page = result.value;
1277
1277
  if (!result.done && result.value) {
@@ -1358,7 +1358,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
1358
1358
 
1359
1359
  // Copyright (c) Microsoft Corporation.
1360
1360
  // Licensed under the MIT License.
1361
- var __awaiter$R = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1361
+ var __awaiter$S = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1362
1362
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1363
1363
  return new (P || (P = Promise))(function (resolve, reject) {
1364
1364
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -1377,14 +1377,14 @@ class ProxyChatThreadClient {
1377
1377
  return createDecoratedListMessages(chatThreadClient, this._context);
1378
1378
  }
1379
1379
  case 'getMessage': {
1380
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$R(this, void 0, void 0, function* () {
1380
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$S(this, void 0, void 0, function* () {
1381
1381
  const message = yield chatThreadClient.getMessage(...args);
1382
1382
  this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
1383
1383
  return message;
1384
1384
  }), 'ChatThreadClient.getMessage');
1385
1385
  }
1386
1386
  case 'sendMessage': {
1387
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$R(this, void 0, void 0, function* () {
1387
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$S(this, void 0, void 0, function* () {
1388
1388
  var _a;
1389
1389
  // Retry logic?
1390
1390
  const [request, options] = args;
@@ -1425,7 +1425,7 @@ class ProxyChatThreadClient {
1425
1425
  }), 'ChatThreadClient.sendMessage');
1426
1426
  }
1427
1427
  case 'addParticipants': {
1428
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$R(this, void 0, void 0, function* () {
1428
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$S(this, void 0, void 0, function* () {
1429
1429
  const result = yield chatThreadClient.addParticipants(...args);
1430
1430
  const [addRequest] = args;
1431
1431
  const participantsToAdd = addRequest.participants;
@@ -1434,7 +1434,7 @@ class ProxyChatThreadClient {
1434
1434
  }), 'ChatThreadClient.addParticipants');
1435
1435
  }
1436
1436
  case 'deleteMessage': {
1437
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$R(this, void 0, void 0, function* () {
1437
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$S(this, void 0, void 0, function* () {
1438
1438
  // DeleteMessage is able to either delete local one(for failed message) or synced message
1439
1439
  const [messageId] = args;
1440
1440
  if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
@@ -1452,12 +1452,12 @@ class ProxyChatThreadClient {
1452
1452
  return createDecoratedListReadReceipts(chatThreadClient, this._context);
1453
1453
  }
1454
1454
  case 'sendTypingNotification': {
1455
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$R(this, void 0, void 0, function* () {
1455
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$S(this, void 0, void 0, function* () {
1456
1456
  return yield chatThreadClient.sendTypingNotification(...args);
1457
1457
  }), 'ChatThreadClient.sendTypingNotification');
1458
1458
  }
1459
1459
  case 'removeParticipant': {
1460
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$R(this, void 0, void 0, function* () {
1460
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$S(this, void 0, void 0, function* () {
1461
1461
  const result = yield chatThreadClient.removeParticipant(...args);
1462
1462
  const [removeIdentifier] = args;
1463
1463
  this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
@@ -1465,7 +1465,7 @@ class ProxyChatThreadClient {
1465
1465
  }), 'ChatThreadClient.removeParticipant');
1466
1466
  }
1467
1467
  case 'updateMessage': {
1468
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$R(this, void 0, void 0, function* () {
1468
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$S(this, void 0, void 0, function* () {
1469
1469
  const result = yield chatThreadClient.updateMessage(...args);
1470
1470
  const [messageId, updateOption] = args;
1471
1471
  this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
@@ -1473,7 +1473,7 @@ class ProxyChatThreadClient {
1473
1473
  }), 'ChatThreadClient.updateMessage');
1474
1474
  }
1475
1475
  case 'updateTopic': {
1476
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$R(this, void 0, void 0, function* () {
1476
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$S(this, void 0, void 0, function* () {
1477
1477
  const result = yield chatThreadClient.updateTopic(...args);
1478
1478
  const [topic] = args;
1479
1479
  this._context.updateThreadTopic(chatThreadClient.threadId, topic);
@@ -1481,7 +1481,7 @@ class ProxyChatThreadClient {
1481
1481
  }), 'ChatThreadClient.updateTopic');
1482
1482
  }
1483
1483
  case 'getProperties': {
1484
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$R(this, void 0, void 0, function* () {
1484
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$S(this, void 0, void 0, function* () {
1485
1485
  const result = yield chatThreadClient.getProperties(...args);
1486
1486
  this._context.updateThread(chatThreadClient.threadId, result);
1487
1487
  return result;
@@ -1519,7 +1519,7 @@ const createDecoratedListThreads = (chatClient, context) => {
1519
1519
 
1520
1520
  // Copyright (c) Microsoft Corporation.
1521
1521
  // Licensed under the MIT License.
1522
- var __awaiter$Q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1522
+ var __awaiter$R = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1523
1523
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1524
1524
  return new (P || (P = Promise))(function (resolve, reject) {
1525
1525
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -1538,7 +1538,7 @@ const proxyChatClient = {
1538
1538
  switch (prop) {
1539
1539
  case 'createChatThread': {
1540
1540
  return context.withAsyncErrorTeedToState(function (...args) {
1541
- return __awaiter$Q(this, void 0, void 0, function* () {
1541
+ return __awaiter$R(this, void 0, void 0, function* () {
1542
1542
  const result = yield chatClient.createChatThread(...args);
1543
1543
  const thread = result.chatThread;
1544
1544
  if (thread) {
@@ -1551,7 +1551,7 @@ const proxyChatClient = {
1551
1551
  }
1552
1552
  case 'deleteChatThread': {
1553
1553
  return context.withAsyncErrorTeedToState(function (...args) {
1554
- return __awaiter$Q(this, void 0, void 0, function* () {
1554
+ return __awaiter$R(this, void 0, void 0, function* () {
1555
1555
  const result = yield chatClient.deleteChatThread(...args);
1556
1556
  context.deleteThread(args[0]);
1557
1557
  return result;
@@ -1571,7 +1571,7 @@ const proxyChatClient = {
1571
1571
  }
1572
1572
  case 'startRealtimeNotifications': {
1573
1573
  return context.withAsyncErrorTeedToState(function (...args) {
1574
- return __awaiter$Q(this, void 0, void 0, function* () {
1574
+ return __awaiter$R(this, void 0, void 0, function* () {
1575
1575
  const ret = yield chatClient.startRealtimeNotifications(...args);
1576
1576
  if (!receiver.eventSubscriber) {
1577
1577
  receiver.eventSubscriber = new EventSubscriber(chatClient, context);
@@ -1582,7 +1582,7 @@ const proxyChatClient = {
1582
1582
  }
1583
1583
  case 'stopRealtimeNotifications': {
1584
1584
  return context.withAsyncErrorTeedToState(function (...args) {
1585
- return __awaiter$Q(this, void 0, void 0, function* () {
1585
+ return __awaiter$R(this, void 0, void 0, function* () {
1586
1586
  const ret = yield chatClient.stopRealtimeNotifications(...args);
1587
1587
  if (receiver.eventSubscriber) {
1588
1588
  receiver.eventSubscriber.unsubscribe();
@@ -1691,7 +1691,7 @@ const getImageAttachmentsFromHTMLContent = (content) => {
1691
1691
 
1692
1692
  // Copyright (c) Microsoft Corporation.
1693
1693
  // Licensed under the MIT License.
1694
- var __awaiter$P = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1694
+ var __awaiter$Q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
1695
1695
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1696
1696
  return new (P || (P = Promise))(function (resolve, reject) {
1697
1697
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -1717,7 +1717,7 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
1717
1717
  // due to a bug in babel, we can't use arrow function here
1718
1718
  // affecting conditional-compile-remove(attachment-upload)
1719
1719
  onSendMessage: function (content, options) {
1720
- return __awaiter$P(this, void 0, void 0, function* () {
1720
+ return __awaiter$Q(this, void 0, void 0, function* () {
1721
1721
  const sendMessageRequest = {
1722
1722
  content,
1723
1723
  senderDisplayName: chatClient.getState().displayName
@@ -1753,14 +1753,14 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
1753
1753
  },
1754
1754
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
1755
1755
  onUploadImage: function (image, imageFilename) {
1756
- return __awaiter$P(this, void 0, void 0, function* () {
1756
+ return __awaiter$Q(this, void 0, void 0, function* () {
1757
1757
  const imageResult = yield chatThreadClient.uploadImage(image, imageFilename);
1758
1758
  return imageResult;
1759
1759
  });
1760
1760
  },
1761
1761
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
1762
1762
  onDeleteImage: function (imageId) {
1763
- return __awaiter$P(this, void 0, void 0, function* () {
1763
+ return __awaiter$Q(this, void 0, void 0, function* () {
1764
1764
  yield chatThreadClient.deleteImage(imageId);
1765
1765
  return;
1766
1766
  });
@@ -1770,7 +1770,7 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
1770
1770
  onUpdateMessage: function (messageId, content,
1771
1771
  /* @conditional-compile-remove(file-sharing-acs) */
1772
1772
  options) {
1773
- return __awaiter$P(this, void 0, void 0, function* () {
1773
+ return __awaiter$Q(this, void 0, void 0, function* () {
1774
1774
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
1775
1775
  const imageAttachments = getImageAttachmentsFromHTMLContent(content);
1776
1776
  const updateMessageOptions = {
@@ -1783,23 +1783,23 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
1783
1783
  yield chatThreadClient.updateMessage(messageId, updateMessageOptions);
1784
1784
  });
1785
1785
  },
1786
- onDeleteMessage: (messageId) => __awaiter$P(void 0, void 0, void 0, function* () {
1786
+ onDeleteMessage: (messageId) => __awaiter$Q(void 0, void 0, void 0, function* () {
1787
1787
  yield chatThreadClient.deleteMessage(messageId);
1788
1788
  }),
1789
1789
  // This handler is designed for chatThread to consume
1790
- onMessageSeen: (chatMessageId) => __awaiter$P(void 0, void 0, void 0, function* () {
1790
+ onMessageSeen: (chatMessageId) => __awaiter$Q(void 0, void 0, void 0, function* () {
1791
1791
  yield chatThreadClient.sendReadReceipt({ chatMessageId });
1792
1792
  }),
1793
- onTyping: () => __awaiter$P(void 0, void 0, void 0, function* () {
1793
+ onTyping: () => __awaiter$Q(void 0, void 0, void 0, function* () {
1794
1794
  yield chatThreadClient.sendTypingNotification();
1795
1795
  }),
1796
- onRemoveParticipant: (userId) => __awaiter$P(void 0, void 0, void 0, function* () {
1796
+ onRemoveParticipant: (userId) => __awaiter$Q(void 0, void 0, void 0, function* () {
1797
1797
  yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
1798
1798
  }),
1799
- updateThreadTopicName: (topicName) => __awaiter$P(void 0, void 0, void 0, function* () {
1799
+ updateThreadTopicName: (topicName) => __awaiter$Q(void 0, void 0, void 0, function* () {
1800
1800
  yield chatThreadClient.updateTopic(topicName);
1801
1801
  }),
1802
- onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$P(void 0, void 0, void 0, function* () {
1802
+ onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$Q(void 0, void 0, void 0, function* () {
1803
1803
  var _a, _b, _c;
1804
1804
  if (messageIterator === undefined) {
1805
1805
  // Lazy definition so that errors in the method call are reported correctly.
@@ -4407,7 +4407,7 @@ const _MentionPopover = (props) => {
4407
4407
 
4408
4408
  // Copyright (c) Microsoft Corporation.
4409
4409
  // Licensed under the MIT License.
4410
- var __awaiter$O = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
4410
+ var __awaiter$P = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
4411
4411
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4412
4412
  return new (P || (P = Promise))(function (resolve, reject) {
4413
4413
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -4593,7 +4593,7 @@ const TextFieldWithMention = (props) => {
4593
4593
  onSuggestionSelected,
4594
4594
  updateMentionSuggestions
4595
4595
  ]);
4596
- const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$O(void 0, void 0, void 0, function* () {
4596
+ const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$P(void 0, void 0, void 0, function* () {
4597
4597
  var _a;
4598
4598
  let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== void 0 ? _a : [];
4599
4599
  suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');
@@ -4770,7 +4770,7 @@ const TextFieldWithMention = (props) => {
4770
4770
  });
4771
4771
  }
4772
4772
  }, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
4773
- const handleOnChange = React.useCallback((_b) => __awaiter$O(void 0, [_b], void 0, function* ({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) {
4773
+ const handleOnChange = React.useCallback((_b) => __awaiter$P(void 0, [_b], void 0, function* ({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) {
4774
4774
  var _c;
4775
4775
  debouncedQueryUpdate.cancel();
4776
4776
  if (event.currentTarget === null) {
@@ -5279,7 +5279,7 @@ const ATTACHMENT_CARD_MIN_PROGRESS = 0.05;
5279
5279
 
5280
5280
  // Copyright (c) Microsoft Corporation.
5281
5281
  // Licensed under the MIT License.
5282
- var __awaiter$N = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
5282
+ var __awaiter$O = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
5283
5283
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5284
5284
  return new (P || (P = Promise))(function (resolve, reject) {
5285
5285
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -5361,7 +5361,7 @@ const MappedMenuItems = (menuActions, attachment, handleOnClickError) => {
5361
5361
  React.createElement(reactComponents.MenuTrigger, null,
5362
5362
  React.createElement(reactComponents.ToolbarButton, { "aria-label": localeStrings.attachmentMoreMenu, role: "button", icon: React.createElement(react.Icon, { iconName: "AttachmentMoreMenu" }) }))),
5363
5363
  React.createElement(reactComponents.MenuPopover, null,
5364
- React.createElement(reactComponents.MenuList, null, menuActions.map((menuItem, index) => (React.createElement(reactComponents.MenuItem, { "aria-label": menuItem.name, key: index, icon: menuItem.icon, onClick: () => __awaiter$N(void 0, void 0, void 0, function* () {
5364
+ React.createElement(reactComponents.MenuList, null, menuActions.map((menuItem, index) => (React.createElement(reactComponents.MenuItem, { "aria-label": menuItem.name, key: index, icon: menuItem.icon, onClick: () => __awaiter$O(void 0, void 0, void 0, function* () {
5365
5365
  try {
5366
5366
  yield menuItem.onClick(attachment);
5367
5367
  }
@@ -5582,7 +5582,7 @@ hasCompletedAttachmentUploads, hasError, disabled }) => {
5582
5582
  const cancelInlineImageUpload = (imageSrcArray, imageUploadsInProgress, onCancelInlineImageUpload) => {
5583
5583
  if (imageSrcArray && imageUploadsInProgress && (imageUploadsInProgress === null || imageUploadsInProgress === void 0 ? void 0 : imageUploadsInProgress.length) > 0) {
5584
5584
  imageUploadsInProgress === null || imageUploadsInProgress === void 0 ? void 0 : imageUploadsInProgress.map((uploadImage) => {
5585
- if (uploadImage.url && imageSrcArray && !(imageSrcArray === null || imageSrcArray === void 0 ? void 0 : imageSrcArray.includes(uploadImage.url))) {
5585
+ if (uploadImage.url && !(imageSrcArray === null || imageSrcArray === void 0 ? void 0 : imageSrcArray.includes(uploadImage.url))) {
5586
5586
  onCancelInlineImageUpload === null || onCancelInlineImageUpload === void 0 ? void 0 : onCancelInlineImageUpload(uploadImage.id);
5587
5587
  }
5588
5588
  });
@@ -6940,23 +6940,18 @@ class UpdateContentPlugin {
6940
6940
  case PluginEventType.ContentChanged:
6941
6941
  if (event.source.toLowerCase() === 'cut' ||
6942
6942
  (event.source.toLowerCase() === 'keyboard' && (event.data === Keys.BACKSPACE || event.data === Keys.DELETE))) {
6943
+ imageSrcArray = [];
6943
6944
  (_a = event.contentModel) === null || _a === void 0 ? void 0 : _a.blocks.map((block) => {
6944
6945
  if (block.blockType === 'Paragraph') {
6945
6946
  const segments = block.segments;
6946
6947
  segments.map((segment) => {
6947
6948
  if (segment.segmentType === 'Image') {
6948
- if (!imageSrcArray) {
6949
- imageSrcArray = [];
6950
- }
6951
6949
  imageSrcArray === null || imageSrcArray === void 0 ? void 0 : imageSrcArray.push(segment.src);
6952
6950
  }
6953
6951
  });
6954
6952
  }
6955
6953
  });
6956
6954
  }
6957
- else {
6958
- imageSrcArray = undefined;
6959
- }
6960
6955
  this.onUpdate(UpdateEvent.ContentChanged, imageSrcArray);
6961
6956
  break;
6962
6957
  case PluginEventType.Input:
@@ -8055,13 +8050,7 @@ const RichTextSendBox = (props) => {
8055
8050
  const onChangeHandler = React.useCallback((newValue,
8056
8051
  /* @conditional-compile-remove(rich-text-editor-image-upload) */ imageSrcArray) => {
8057
8052
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
8058
- if (imageSrcArray && imageUploadsInProgress && (imageUploadsInProgress === null || imageUploadsInProgress === void 0 ? void 0 : imageUploadsInProgress.length) > 0) {
8059
- imageUploadsInProgress === null || imageUploadsInProgress === void 0 ? void 0 : imageUploadsInProgress.map((uploadImage) => {
8060
- if (uploadImage.url && imageSrcArray && !(imageSrcArray === null || imageSrcArray === void 0 ? void 0 : imageSrcArray.includes(uploadImage.url))) {
8061
- onCancelInlineImageUpload === null || onCancelInlineImageUpload === void 0 ? void 0 : onCancelInlineImageUpload(uploadImage.id);
8062
- }
8063
- });
8064
- }
8053
+ cancelInlineImageUpload(imageSrcArray, imageUploadsInProgress, onCancelInlineImageUpload);
8065
8054
  setContent(newValue);
8066
8055
  }, [
8067
8056
  setContent,
@@ -10223,7 +10212,7 @@ class _ErrorBoundary extends React.Component {
10223
10212
  // Copyright (c) Microsoft Corporation.
10224
10213
  // Licensed under the MIT License.
10225
10214
  /* @conditional-compile-remove(rich-text-editor) */
10226
- const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DaATOUfF.js'); }));
10215
+ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DUMV7bmO.js'); }));
10227
10216
  /**
10228
10217
  * @private
10229
10218
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -10231,7 +10220,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
10231
10220
  *
10232
10221
  * @conditional-compile-remove(rich-text-editor)
10233
10222
  */
10234
- const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DaATOUfF.js'); });
10223
+ const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DUMV7bmO.js'); });
10235
10224
  /**
10236
10225
  * @private
10237
10226
  */
@@ -10260,7 +10249,7 @@ const ChatMessageComponentAsEditBoxPicker = (props) => {
10260
10249
 
10261
10250
  // Copyright (c) Microsoft Corporation.
10262
10251
  // Licensed under the MIT License.
10263
- var __awaiter$M = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10252
+ var __awaiter$N = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10264
10253
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10265
10254
  return new (P || (P = Promise))(function (resolve, reject) {
10266
10255
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -10312,7 +10301,7 @@ const ChatMyMessageComponent = (props) => {
10312
10301
  function (text,
10313
10302
  /* @conditional-compile-remove(file-sharing-acs) */
10314
10303
  attachments) {
10315
- return __awaiter$M(this, void 0, void 0, function* () {
10304
+ return __awaiter$N(this, void 0, void 0, function* () {
10316
10305
  /* @conditional-compile-remove(file-sharing-acs) */
10317
10306
  if (`attachments` in message && attachments) {
10318
10307
  message.attachments = attachments;
@@ -10718,7 +10707,7 @@ const fluentChatComponent = (props) => {
10718
10707
 
10719
10708
  // Copyright (c) Microsoft Corporation.
10720
10709
  // Licensed under the MIT License.
10721
- var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10710
+ var __awaiter$M = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10722
10711
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10723
10712
  return new (P || (P = Promise))(function (resolve, reject) {
10724
10713
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -10914,7 +10903,7 @@ const MessageThreadWrapper = (props) => {
10914
10903
  loadChatMessageComponentAsRichTextEditBox();
10915
10904
  }
10916
10905
  }, [richTextEditorOptions]);
10917
- const onDeleteMessageCallback = React.useCallback((messageId) => __awaiter$L(void 0, void 0, void 0, function* () {
10906
+ const onDeleteMessageCallback = React.useCallback((messageId) => __awaiter$M(void 0, void 0, void 0, function* () {
10918
10907
  if (!onDeleteMessage) {
10919
10908
  return;
10920
10909
  }
@@ -10995,7 +10984,7 @@ const MessageThreadWrapper = (props) => {
10995
10984
  */
10996
10985
  const clientHeight = (_a = chatThreadRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight;
10997
10986
  // we try to only send those message status if user is scrolled to the bottom.
10998
- const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$L(void 0, void 0, void 0, function* () {
10987
+ const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$M(void 0, void 0, void 0, function* () {
10999
10988
  if (!isAtBottomOfScrollRef.current ||
11000
10989
  !document.hasFocus() ||
11001
10990
  !messagesRef.current ||
@@ -11046,7 +11035,7 @@ const MessageThreadWrapper = (props) => {
11046
11035
  setIsAtBottomOfScrollRef(atBottom);
11047
11036
  }, [scrollToBottom, sendMessageStatusIfAtBottom]);
11048
11037
  // Infinite scrolling + threadInitialize function
11049
- const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$L(void 0, void 0, void 0, function* () {
11038
+ const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$M(void 0, void 0, void 0, function* () {
11050
11039
  if (!isLoadingChatMessagesRef.current) {
11051
11040
  if (onLoadPreviousChatMessages) {
11052
11041
  isLoadingChatMessagesRef.current = true;
@@ -14076,7 +14065,7 @@ const localVideoTileContainerStyles = {
14076
14065
 
14077
14066
  // Copyright (c) Microsoft Corporation.
14078
14067
  // Licensed under the MIT License.
14079
- var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
14068
+ var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
14080
14069
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14081
14070
  return new (P || (P = Promise))(function (resolve, reject) {
14082
14071
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -14093,7 +14082,7 @@ const LocalVideoCameraCycleButton = (props) => {
14093
14082
  const { cameras, selectedCamera, onSelectCamera, label, ariaDescription, size } = props;
14094
14083
  const theme = react.useTheme();
14095
14084
  const [waitForCamera, setWaitForCamera] = React.useState(false);
14096
- const onChangeCameraClick = React.useCallback((device) => __awaiter$K(void 0, void 0, void 0, function* () {
14085
+ const onChangeCameraClick = React.useCallback((device) => __awaiter$L(void 0, void 0, void 0, function* () {
14097
14086
  // Throttle changing camera to prevent too many callbacks
14098
14087
  if (onSelectCamera) {
14099
14088
  setWaitForCamera(true);
@@ -16866,7 +16855,7 @@ const DevicesButton = (props) => {
16866
16855
 
16867
16856
  // Copyright (c) Microsoft Corporation.
16868
16857
  // Licensed under the MIT License.
16869
- var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16858
+ var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16870
16859
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16871
16860
  return new (P || (P = Promise))(function (resolve, reject) {
16872
16861
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -16904,7 +16893,7 @@ const CameraButton = (props) => {
16904
16893
  const toggleAnnouncerString = React.useCallback((isCameraOn) => {
16905
16894
  setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
16906
16895
  }, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
16907
- const onToggleClick = React.useCallback(() => __awaiter$J(void 0, void 0, void 0, function* () {
16896
+ const onToggleClick = React.useCallback(() => __awaiter$K(void 0, void 0, void 0, function* () {
16908
16897
  // Throttle click on camera, need to await onToggleCamera then allow another click
16909
16898
  if (onToggleCamera) {
16910
16899
  setWaitForCamera(true);
@@ -16918,7 +16907,7 @@ const CameraButton = (props) => {
16918
16907
  }
16919
16908
  }
16920
16909
  }), [cameraOn, localVideoViewOptions, onToggleCamera, toggleAnnouncerString]);
16921
- const onChangeCameraClick = React.useCallback((device) => __awaiter$J(void 0, void 0, void 0, function* () {
16910
+ const onChangeCameraClick = React.useCallback((device) => __awaiter$K(void 0, void 0, void 0, function* () {
16922
16911
  // Throttle changing camera to prevent too many callbacks
16923
16912
  if (onSelectCamera) {
16924
16913
  setWaitForCamera(true);
@@ -17139,7 +17128,7 @@ const menupButtonPadding = {
17139
17128
 
17140
17129
  // Copyright (c) Microsoft Corporation.
17141
17130
  // Licensed under the MIT License.
17142
- var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
17131
+ var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
17143
17132
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17144
17133
  return new (P || (P = Promise))(function (resolve, reject) {
17145
17134
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -17180,7 +17169,7 @@ const MicrophoneButton = (props) => {
17180
17169
  const toggleAnnouncerString = React.useCallback((isMicOn) => {
17181
17170
  setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
17182
17171
  }, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
17183
- const onToggleClick = React.useCallback(() => __awaiter$I(void 0, void 0, void 0, function* () {
17172
+ const onToggleClick = React.useCallback(() => __awaiter$J(void 0, void 0, void 0, function* () {
17184
17173
  if (onToggleMicrophone) {
17185
17174
  try {
17186
17175
  yield onToggleMicrophone();
@@ -18042,7 +18031,7 @@ const dtmfFrequencies = {
18042
18031
 
18043
18032
  // Copyright (c) Microsoft Corporation.
18044
18033
  // Licensed under the MIT License.
18045
- var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
18034
+ var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
18046
18035
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18047
18036
  return new (P || (P = Promise))(function (resolve, reject) {
18048
18037
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -18086,10 +18075,10 @@ const DialpadButton = (props) => {
18086
18075
  const [buttonPressed, setButtonPressed] = React.useState(false);
18087
18076
  const dtmfToneSound = React.useRef(new Tone(dtmfToneAudioContext, dtmfFrequencies[digit].f1, dtmfFrequencies[digit].f2));
18088
18077
  const useLongPressProps = React.useMemo(() => ({
18089
- onClick: () => __awaiter$H(void 0, void 0, void 0, function* () {
18078
+ onClick: () => __awaiter$I(void 0, void 0, void 0, function* () {
18090
18079
  onClick(digit, index);
18091
18080
  }),
18092
- onLongPress: () => __awaiter$H(void 0, void 0, void 0, function* () {
18081
+ onLongPress: () => __awaiter$I(void 0, void 0, void 0, function* () {
18093
18082
  onLongPress(digit, index);
18094
18083
  }),
18095
18084
  touchEventsOnly: longPressTrigger === 'touch'
@@ -19224,7 +19213,7 @@ const _spokenLanguageToCaptionLanguage = {
19224
19213
 
19225
19214
  // Copyright (c) Microsoft Corporation.
19226
19215
  // Licensed under the MIT License.
19227
- var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
19216
+ var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
19228
19217
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19229
19218
  return new (P || (P = Promise))(function (resolve, reject) {
19230
19219
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -19263,7 +19252,7 @@ const _CaptionsSettingsModal = (props) => {
19263
19252
  onDismissCaptionsSettings();
19264
19253
  }
19265
19254
  }, [onDismissCaptionsSettings]);
19266
- const onConfirm = React.useCallback(() => __awaiter$G(void 0, void 0, void 0, function* () {
19255
+ const onConfirm = React.useCallback(() => __awaiter$H(void 0, void 0, void 0, function* () {
19267
19256
  const spokenLanguageCode = selectedSpokenLanguage.key;
19268
19257
  const captionLanguageCode = selectedCaptionLanguage.key;
19269
19258
  if (isCaptionsFeatureActive) {
@@ -19624,7 +19613,7 @@ const notificationIconClassName = react.mergeStyles({
19624
19613
  /**
19625
19614
  * A component to show notification messages on the UI.
19626
19615
  *
19627
- * @beta
19616
+ * @public
19628
19617
  */
19629
19618
  const Notification = (props) => {
19630
19619
  var _a, _b;
@@ -19668,7 +19657,7 @@ const Notification = (props) => {
19668
19657
  * If the notification recurs, it is shown in the UI.
19669
19658
  *
19670
19659
  *
19671
- * @beta
19660
+ * @public
19672
19661
  */
19673
19662
  const NotificationStack = (props) => {
19674
19663
  var _a, _b;
@@ -19715,13 +19704,13 @@ const NotificationStack = (props) => {
19715
19704
  * @beta
19716
19705
  */
19717
19706
  const IncomingCallNotification = (props) => {
19718
- const { callerName, alertText, avatar, onAcceptWithAudio, onAcceptWithVideo, onReject } = props;
19707
+ const { callerName, alertText, avatarImage, onAcceptWithAudio, onAcceptWithVideo, onReject, personaSize, styles } = props;
19719
19708
  const theme = react.useTheme();
19720
19709
  /* @conditional-compile-remove(one-to-n-calling) */
19721
19710
  const localeStrings = useLocale$1().strings.IncomingCallNotification;
19722
- return (React.createElement(react.Stack, { horizontal: true, verticalAlign: "center", styles: incomingCallToastStyle(theme) },
19723
- React.createElement(react.Stack, { horizontalAlign: "start", styles: incomingCallToastAvatarContainerStyle },
19724
- React.createElement(react.Persona, { imageUrl: avatar, text: callerName, size: react.PersonaSize.size40, hidePersonaDetails: true, "aria-label": callerName })),
19711
+ return (React.createElement(react.Stack, { horizontal: true, tokens: { childrenGap: '0.5rem' }, verticalAlign: "center", styles: (styles === null || styles === void 0 ? void 0 : styles.root) ? styles.root : incomingCallToastStyle(theme) },
19712
+ React.createElement(react.Stack, { horizontalAlign: "start", styles: (styles === null || styles === void 0 ? void 0 : styles.avatarContainer) ? styles.avatarContainer : incomingCallToastAvatarContainerStyle },
19713
+ React.createElement(react.Persona, { imageUrl: avatarImage, text: callerName, size: react.PersonaSize.size40, coinSize: personaSize, hidePersonaDetails: true, "aria-label": callerName })),
19725
19714
  React.createElement(react.Stack, { grow: 1, horizontalAlign: "center", style: { alignItems: 'flex-start', fontFamily: 'Segoe UI' } },
19726
19715
  React.createElement(react.Stack, { style: { fontSize: '0.875rem' } },
19727
19716
  React.createElement(react.Text, null, callerName !== null && callerName !== void 0 ? callerName :
@@ -19730,13 +19719,13 @@ const IncomingCallNotification = (props) => {
19730
19719
  React.createElement(react.Text, null, alertText !== null && alertText !== void 0 ? alertText :
19731
19720
  /* @conditional-compile-remove(one-to-n-calling) */ localeStrings.incomingCallNotificationPlaceholderAlert))),
19732
19721
  React.createElement(react.Stack, { horizontal: true, tokens: { childrenGap: 10 } },
19733
- React.createElement(react.IconButton, { styles: incomingCallRejectButtonStyle(theme), onClick: () => onReject(), iconProps: { iconName: 'IncomingCallNotificationRejectIcon' },
19722
+ React.createElement(react.IconButton, { styles: (styles === null || styles === void 0 ? void 0 : styles.rejectButton) ? styles.rejectButton : incomingCallRejectButtonStyle(theme), onClick: () => onReject(), iconProps: { iconName: 'IncomingCallNotificationRejectIcon' },
19734
19723
  /* @conditional-compile-remove(one-to-n-calling) */
19735
19724
  ariaLabel: localeStrings.incomingCallNoticicationRejectAriaLabel }),
19736
- React.createElement(react.IconButton, { styles: incomingCallAcceptButtonStyle(theme), onClick: () => onAcceptWithVideo(), iconProps: { iconName: 'IncomingCallNotificationAcceptWithVideoIcon' },
19725
+ React.createElement(react.IconButton, { styles: (styles === null || styles === void 0 ? void 0 : styles.acceptButton) ? styles.acceptButton : incomingCallAcceptButtonStyle(theme), onClick: () => onAcceptWithVideo(), iconProps: { iconName: 'IncomingCallNotificationAcceptWithVideoIcon' },
19737
19726
  /* @conditional-compile-remove(one-to-n-calling) */
19738
19727
  ariaLabel: localeStrings.incomingCallNoticicationAcceptWithVideoAriaLabel }),
19739
- React.createElement(react.IconButton, { styles: incomingCallAcceptButtonStyle(theme), onClick: () => onAcceptWithAudio(), iconProps: { iconName: 'IncomingCallNotificationAcceptIcon' },
19728
+ React.createElement(react.IconButton, { styles: (styles === null || styles === void 0 ? void 0 : styles.acceptButton) ? styles.acceptButton : incomingCallAcceptButtonStyle(theme), onClick: () => onAcceptWithAudio(), iconProps: { iconName: 'IncomingCallNotificationAcceptIcon' },
19740
19729
  /* @conditional-compile-remove(one-to-n-calling) */
19741
19730
  ariaLabel: localeStrings.incomingCallNoticicationAcceptWithAudioAriaLabel }))));
19742
19731
  };
@@ -19744,6 +19733,8 @@ const incomingCallToastStyle = (theme) => {
19744
19733
  return {
19745
19734
  root: {
19746
19735
  minWidth: '20rem',
19736
+ maxWidth: '40rem',
19737
+ background: theme.palette.white,
19747
19738
  opacity: 0.95,
19748
19739
  borderRadius: '0.5rem',
19749
19740
  boxShadow: theme.effects.elevation8,
@@ -20870,7 +20861,7 @@ const CHAT_CONTAINER_MIN_WIDTH_REM = 17.5;
20870
20861
 
20871
20862
  // Copyright (c) Microsoft Corporation.
20872
20863
  // Licensed under the MIT License.
20873
- var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
20864
+ var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
20874
20865
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
20875
20866
  return new (P || (P = Promise))(function (resolve, reject) {
20876
20867
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -20987,9 +20978,9 @@ class AzureCommunicationChatAdapter {
20987
20978
  this.chatClient.dispose();
20988
20979
  }
20989
20980
  fetchInitialData() {
20990
- return __awaiter$F(this, void 0, void 0, function* () {
20981
+ return __awaiter$G(this, void 0, void 0, function* () {
20991
20982
  // If get properties fails we dont want to try to get the participants after.
20992
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$F(this, void 0, void 0, function* () {
20983
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$G(this, void 0, void 0, function* () {
20993
20984
  var _a, e_1, _b, _c;
20994
20985
  yield this.chatThreadClient.getProperties();
20995
20986
  try {
@@ -21025,66 +21016,66 @@ class AzureCommunicationChatAdapter {
21025
21016
  this.context.offStateChange(handler);
21026
21017
  }
21027
21018
  sendMessage(content, options) {
21028
- return __awaiter$F(this, void 0, void 0, function* () {
21029
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$F(this, void 0, void 0, function* () {
21019
+ return __awaiter$G(this, void 0, void 0, function* () {
21020
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$G(this, void 0, void 0, function* () {
21030
21021
  return yield this.handlers.onSendMessage(content, options);
21031
21022
  }));
21032
21023
  });
21033
21024
  }
21034
21025
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
21035
21026
  uploadImage(image, imageFilename) {
21036
- return __awaiter$F(this, void 0, void 0, function* () {
21037
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$F(this, void 0, void 0, function* () {
21027
+ return __awaiter$G(this, void 0, void 0, function* () {
21028
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$G(this, void 0, void 0, function* () {
21038
21029
  return yield this.handlers.onUploadImage(image, imageFilename);
21039
21030
  }));
21040
21031
  });
21041
21032
  }
21042
21033
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
21043
21034
  deleteImage(imageId) {
21044
- return __awaiter$F(this, void 0, void 0, function* () {
21045
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$F(this, void 0, void 0, function* () {
21035
+ return __awaiter$G(this, void 0, void 0, function* () {
21036
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$G(this, void 0, void 0, function* () {
21046
21037
  return yield this.handlers.onDeleteImage(imageId);
21047
21038
  }));
21048
21039
  });
21049
21040
  }
21050
21041
  sendReadReceipt(chatMessageId) {
21051
- return __awaiter$F(this, void 0, void 0, function* () {
21052
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$F(this, void 0, void 0, function* () {
21042
+ return __awaiter$G(this, void 0, void 0, function* () {
21043
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$G(this, void 0, void 0, function* () {
21053
21044
  yield this.handlers.onMessageSeen(chatMessageId);
21054
21045
  }));
21055
21046
  });
21056
21047
  }
21057
21048
  sendTypingIndicator() {
21058
- return __awaiter$F(this, void 0, void 0, function* () {
21059
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$F(this, void 0, void 0, function* () {
21049
+ return __awaiter$G(this, void 0, void 0, function* () {
21050
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$G(this, void 0, void 0, function* () {
21060
21051
  yield this.handlers.onTyping();
21061
21052
  }));
21062
21053
  });
21063
21054
  }
21064
21055
  removeParticipant(userId) {
21065
- return __awaiter$F(this, void 0, void 0, function* () {
21066
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$F(this, void 0, void 0, function* () {
21056
+ return __awaiter$G(this, void 0, void 0, function* () {
21057
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$G(this, void 0, void 0, function* () {
21067
21058
  yield this.handlers.onRemoveParticipant(userId);
21068
21059
  }));
21069
21060
  });
21070
21061
  }
21071
21062
  setTopic(topicName) {
21072
- return __awaiter$F(this, void 0, void 0, function* () {
21073
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$F(this, void 0, void 0, function* () {
21063
+ return __awaiter$G(this, void 0, void 0, function* () {
21064
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$G(this, void 0, void 0, function* () {
21074
21065
  yield this.handlers.updateThreadTopicName(topicName);
21075
21066
  }));
21076
21067
  });
21077
21068
  }
21078
21069
  loadPreviousChatMessages(messagesToLoad) {
21079
- return __awaiter$F(this, void 0, void 0, function* () {
21080
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$F(this, void 0, void 0, function* () {
21070
+ return __awaiter$G(this, void 0, void 0, function* () {
21071
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$G(this, void 0, void 0, function* () {
21081
21072
  return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
21082
21073
  }));
21083
21074
  });
21084
21075
  }
21085
21076
  updateMessage(messageId, content, options) {
21086
- return __awaiter$F(this, void 0, void 0, function* () {
21087
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$F(this, void 0, void 0, function* () {
21077
+ return __awaiter$G(this, void 0, void 0, function* () {
21078
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$G(this, void 0, void 0, function* () {
21088
21079
  var _a;
21089
21080
  /* @conditional-compile-remove(file-sharing-acs) */
21090
21081
  const messageOptions = {};
@@ -21115,14 +21106,14 @@ class AzureCommunicationChatAdapter {
21115
21106
  });
21116
21107
  }
21117
21108
  deleteMessage(messageId) {
21118
- return __awaiter$F(this, void 0, void 0, function* () {
21119
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$F(this, void 0, void 0, function* () {
21109
+ return __awaiter$G(this, void 0, void 0, function* () {
21110
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$G(this, void 0, void 0, function* () {
21120
21111
  return yield this.handlers.onDeleteMessage(messageId);
21121
21112
  }));
21122
21113
  });
21123
21114
  }
21124
21115
  downloadResourceToCache(resourceDetails) {
21125
- return __awaiter$F(this, void 0, void 0, function* () {
21116
+ return __awaiter$G(this, void 0, void 0, function* () {
21126
21117
  this.chatClient.downloadResourceToCache(resourceDetails.threadId, resourceDetails.messageId, resourceDetails.resourceUrl);
21127
21118
  });
21128
21119
  }
@@ -21201,7 +21192,7 @@ class AzureCommunicationChatAdapter {
21201
21192
  this.emitter.off(event, listener);
21202
21193
  }
21203
21194
  asyncTeeErrorToEventEmitter(f) {
21204
- return __awaiter$F(this, void 0, void 0, function* () {
21195
+ return __awaiter$G(this, void 0, void 0, function* () {
21205
21196
  try {
21206
21197
  return yield f();
21207
21198
  }
@@ -21251,7 +21242,7 @@ const convertEventType = (type) => {
21251
21242
  *
21252
21243
  * @public
21253
21244
  */
21254
- const createAzureCommunicationChatAdapter = (_a) => __awaiter$F(void 0, [_a], void 0, function* ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) {
21245
+ const createAzureCommunicationChatAdapter = (_a) => __awaiter$G(void 0, [_a], void 0, function* ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) {
21255
21246
  return _createAzureCommunicationChatAdapterInner(endpointUrl, userId, displayName, credential, threadId);
21256
21247
  });
21257
21248
  /**
@@ -21259,7 +21250,7 @@ const createAzureCommunicationChatAdapter = (_a) => __awaiter$F(void 0, [_a], vo
21259
21250
  *
21260
21251
  * @internal
21261
21252
  */
21262
- const _createAzureCommunicationChatAdapterInner = (endpoint_1, userId_1, displayName_1, credential_1, threadId_1, ...args_1) => __awaiter$F(void 0, [endpoint_1, userId_1, displayName_1, credential_1, threadId_1, ...args_1], void 0, function* (endpoint, userId, displayName, credential, threadId, telemetryImplementationHint = 'Chat') {
21253
+ const _createAzureCommunicationChatAdapterInner = (endpoint_1, userId_1, displayName_1, credential_1, threadId_1, ...args_1) => __awaiter$G(void 0, [endpoint_1, userId_1, displayName_1, credential_1, threadId_1, ...args_1], void 0, function* (endpoint, userId, displayName, credential, threadId, telemetryImplementationHint = 'Chat') {
21263
21254
  if (!_isValidIdentifier(userId)) {
21264
21255
  throw new Error('Provided userId is invalid. Please provide valid identifier object.');
21265
21256
  }
@@ -21279,7 +21270,7 @@ const _createAzureCommunicationChatAdapterInner = (endpoint_1, userId_1, display
21279
21270
  * ThreadId is a promise to allow for lazy initialization of the adapter.
21280
21271
  * @internal
21281
21272
  */
21282
- const _createLazyAzureCommunicationChatAdapterInner = (endpoint_2, userId_2, displayName_2, credential_2, threadId_2, ...args_2) => __awaiter$F(void 0, [endpoint_2, userId_2, displayName_2, credential_2, threadId_2, ...args_2], void 0, function* (endpoint, userId, displayName, credential, threadId, telemetryImplementationHint = 'Chat') {
21273
+ const _createLazyAzureCommunicationChatAdapterInner = (endpoint_2, userId_2, displayName_2, credential_2, threadId_2, ...args_2) => __awaiter$G(void 0, [endpoint_2, userId_2, displayName_2, credential_2, threadId_2, ...args_2], void 0, function* (endpoint, userId, displayName, credential, threadId, telemetryImplementationHint = 'Chat') {
21283
21274
  if (!_isValidIdentifier(userId)) {
21284
21275
  throw new Error('Provided userId is invalid. Please provide valid identifier object.');
21285
21276
  }
@@ -21289,7 +21280,7 @@ const _createLazyAzureCommunicationChatAdapterInner = (endpoint_2, userId_2, dis
21289
21280
  endpoint,
21290
21281
  credential
21291
21282
  }, undefined, telemetryImplementationHint);
21292
- return threadId.then((threadId) => __awaiter$F(void 0, void 0, void 0, function* () {
21283
+ return threadId.then((threadId) => __awaiter$G(void 0, void 0, void 0, function* () {
21293
21284
  if (UNSUPPORTED_CHAT_THREAD_TYPE.some((t) => threadId.includes(t))) {
21294
21285
  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}.`);
21295
21286
  }
@@ -21350,7 +21341,7 @@ beforeDispose) => {
21350
21341
  if (!credential || !displayName || !endpoint || !threadId || !userId) {
21351
21342
  return;
21352
21343
  }
21353
- (() => __awaiter$F(void 0, void 0, void 0, function* () {
21344
+ (() => __awaiter$G(void 0, void 0, void 0, function* () {
21354
21345
  if (adapterRef.current) {
21355
21346
  // Dispose the old adapter when a new one is created.
21356
21347
  //
@@ -21382,7 +21373,7 @@ beforeDispose) => {
21382
21373
  // Dispose any existing adapter when the component unmounts.
21383
21374
  React.useEffect(() => {
21384
21375
  return () => {
21385
- (() => __awaiter$F(void 0, void 0, void 0, function* () {
21376
+ (() => __awaiter$G(void 0, void 0, void 0, function* () {
21386
21377
  if (adapterRef.current) {
21387
21378
  if (beforeDisposeRef.current) {
21388
21379
  yield beforeDisposeRef.current(adapterRef.current);
@@ -21404,7 +21395,7 @@ beforeDispose) => {
21404
21395
  * @public
21405
21396
  */
21406
21397
  function createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient) {
21407
- return __awaiter$F(this, void 0, void 0, function* () {
21398
+ return __awaiter$G(this, void 0, void 0, function* () {
21408
21399
  return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);
21409
21400
  });
21410
21401
  }
@@ -21785,7 +21776,7 @@ const sendboxContainerStyles = {
21785
21776
 
21786
21777
  // Copyright (c) Microsoft Corporation.
21787
21778
  // Licensed under the MIT License.
21788
- var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
21779
+ var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
21789
21780
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
21790
21781
  return new (P || (P = Promise))(function (resolve, reject) {
21791
21782
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -21806,7 +21797,7 @@ const AvatarPersona = (props) => {
21806
21797
  const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
21807
21798
  const [data, setData] = React.useState();
21808
21799
  React.useEffect(() => {
21809
- (() => __awaiter$E(void 0, void 0, void 0, function* () {
21800
+ (() => __awaiter$F(void 0, void 0, void 0, function* () {
21810
21801
  if (dataProvider && userId) {
21811
21802
  const newData = yield dataProvider(userId);
21812
21803
  if (avatarDeepDifferenceCheck(data, newData)) {
@@ -22362,7 +22353,7 @@ const AttachmentDownloadErrorBar = (props) => {
22362
22353
  /**
22363
22354
  * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
22364
22355
  */
22365
- const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-COKF7ZK8.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
22356
+ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-BYUem3sV.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
22366
22357
  /**
22367
22358
  * @private
22368
22359
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -22370,7 +22361,7 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function
22370
22361
  *
22371
22362
  /* @conditional-compile-remove(rich-text-editor-composite-support)
22372
22363
  */
22373
- const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-COKF7ZK8.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
22364
+ const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-BYUem3sV.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
22374
22365
  /**
22375
22366
  * @private
22376
22367
  */
@@ -22396,7 +22387,7 @@ const SendBoxPicker = (props) => {
22396
22387
 
22397
22388
  // Copyright (c) Microsoft Corporation.
22398
22389
  // Licensed under the MIT License.
22399
- var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
22390
+ var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
22400
22391
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22401
22392
  return new (P || (P = Promise))(function (resolve, reject) {
22402
22393
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -22406,7 +22397,7 @@ var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments,
22406
22397
  });
22407
22398
  };
22408
22399
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22409
- const fetchBlobData = (resource, options) => __awaiter$D(void 0, void 0, void 0, function* () {
22400
+ const fetchBlobData = (resource, options) => __awaiter$E(void 0, void 0, void 0, function* () {
22410
22401
  // default timeout is 30 seconds
22411
22402
  const { timeout = 30000, abortController } = options;
22412
22403
  const id = setTimeout(() => {
@@ -22417,7 +22408,10 @@ const fetchBlobData = (resource, options) => __awaiter$D(void 0, void 0, void 0,
22417
22408
  return response;
22418
22409
  });
22419
22410
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22420
- const getInlineImageData = (image) => __awaiter$D(void 0, void 0, void 0, function* () {
22411
+ /**
22412
+ * @private
22413
+ */
22414
+ const getInlineImageData = (image) => __awaiter$E(void 0, void 0, void 0, function* () {
22421
22415
  const blobImage = undefined;
22422
22416
  if (image.startsWith('blob') || image.startsWith('http')) {
22423
22417
  const res = yield fetchBlobData(image, { abortController: new AbortController() });
@@ -22427,6 +22421,35 @@ const getInlineImageData = (image) => __awaiter$D(void 0, void 0, void 0, functi
22427
22421
  return blobImage;
22428
22422
  });
22429
22423
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22424
+ /**
22425
+ * @internal
22426
+ * Exported only for unit testing
22427
+ */
22428
+ const removeImageTags = (event) => {
22429
+ event.content.querySelectorAll('img').forEach((image) => {
22430
+ // If the image is the only child of its parent, remove all the parents of this img element.
22431
+ let parentNode = image.parentElement;
22432
+ let currentNode = image;
22433
+ while ((parentNode === null || parentNode === void 0 ? void 0 : parentNode.childNodes.length) === 1) {
22434
+ currentNode = parentNode;
22435
+ parentNode = parentNode.parentElement;
22436
+ }
22437
+ currentNode === null || currentNode === void 0 ? void 0 : currentNode.remove();
22438
+ });
22439
+ };
22440
+
22441
+ // Copyright (c) Microsoft Corporation.
22442
+ // Licensed under the MIT License.
22443
+ var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
22444
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22445
+ return new (P || (P = Promise))(function (resolve, reject) {
22446
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
22447
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22448
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22449
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22450
+ });
22451
+ };
22452
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
22430
22453
  /**
22431
22454
  * @private
22432
22455
  */
@@ -22509,7 +22532,12 @@ const useImageUpload = () => {
22509
22532
  handleInlineImageUploadAction({ type: AttachmentUploadActionType.Remove, id: uploadId });
22510
22533
  // TODO: remove local blob
22511
22534
  if ((imageUpload === null || imageUpload === void 0 ? void 0 : imageUpload.metadata.progress) === 1) {
22512
- adapter.deleteImage(imageId);
22535
+ try {
22536
+ adapter.deleteImage(imageId);
22537
+ }
22538
+ catch (error) {
22539
+ console.error(error);
22540
+ }
22513
22541
  }
22514
22542
  }, [adapter, inlineImageUploads]);
22515
22543
  return [inlineImageUploads, handleInlineImageUploadAction, onUploadInlineImage, onCancelInlineImageUploadHandler];
@@ -22548,11 +22576,17 @@ const ChatScreen = (props) => {
22548
22576
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22549
22577
  const [textOnlyChat, setTextOnlyChat] = React.useState(false);
22550
22578
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22579
+ const [isACSChat, setIsACSChat] = React.useState(false);
22580
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
22551
22581
  React.useEffect(() => {
22552
22582
  const updateChatState = (newState) => {
22553
- var _a, _b;
22583
+ var _a, _b, _c, _d;
22554
22584
  setTextOnlyChat(((_b = (_a = newState.thread.properties) === null || _a === void 0 ? void 0 : _a.messagingPolicy) === null || _b === void 0 ? void 0 : _b.textOnlyChat) === true);
22585
+ if ((_c = newState.thread.properties) === null || _c === void 0 ? void 0 : _c.createdBy) {
22586
+ setIsACSChat(!communicationCommon.isMicrosoftTeamsUserIdentifier((_d = newState.thread.properties) === null || _d === void 0 ? void 0 : _d.createdBy));
22587
+ }
22555
22588
  };
22589
+ // set initial state for textOnlyChat and isACSChat
22556
22590
  updateChatState(adapter.getState());
22557
22591
  adapter.onStateChange(updateChatState);
22558
22592
  return () => {
@@ -22837,11 +22871,10 @@ const ChatScreen = (props) => {
22837
22871
  }, [attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions]);
22838
22872
  /* @conditional-compile-remove(rich-text-editor-composite-support) */
22839
22873
  const richTextEditorOptions = React.useMemo(() => {
22874
+ const onPasteCallback = isACSChat || textOnlyChat ? removeImageTags : undefined;
22840
22875
  return (options === null || options === void 0 ? void 0 : options.richTextEditor)
22841
22876
  ? {
22842
- /* @conditional-compile-remove(rich-text-editor-image-upload) */ onPaste: textOnlyChat
22843
- ? removeImageTags
22844
- : undefined,
22877
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */ onPaste: onPasteCallback,
22845
22878
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22846
22879
  onUploadInlineImage: onUploadInlineImage,
22847
22880
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
@@ -22857,9 +22890,11 @@ const ChatScreen = (props) => {
22857
22890
  onCancelInlineImageUploadHandler,
22858
22891
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22859
22892
  onUploadInlineImage,
22860
- options === null || options === void 0 ? void 0 : options.richTextEditor,
22861
22893
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22862
- textOnlyChat
22894
+ isACSChat,
22895
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
22896
+ textOnlyChat,
22897
+ options === null || options === void 0 ? void 0 : options.richTextEditor
22863
22898
  ]);
22864
22899
  return (React.createElement(react.Stack, { className: chatContainer, grow: true },
22865
22900
  (options === null || options === void 0 ? void 0 : options.topic) !== false && React.createElement(ChatHeader, Object.assign({}, headerProps)),
@@ -22893,13 +22928,7 @@ const ChatScreen = (props) => {
22893
22928
  onCancelAttachmentUpload: onCancelUploadHandler,
22894
22929
  // we need to overwrite onSendMessage for SendBox because we need to clear attachment state
22895
22930
  // when submit button is clicked
22896
- onSendMessage: onSendMessageHandler,
22897
- /* @conditional-compile-remove(rich-text-editor-image-upload) */
22898
- onUploadInlineImage: onUploadInlineImage,
22899
- /* @conditional-compile-remove(rich-text-editor-image-upload) */
22900
- imageUploadsInProgress: imageUploadsInProgress,
22901
- /* @conditional-compile-remove(rich-text-editor-image-upload) */
22902
- onCancelInlineImageUpload: onCancelInlineImageUploadHandler })),
22931
+ onSendMessage: onSendMessageHandler })),
22903
22932
  formFactor !== 'mobile' &&
22904
22933
  /* @conditional-compile-remove(file-sharing-acs) */
22905
22934
  attachmentButton))),
@@ -22915,20 +22944,6 @@ const ChatScreen = (props) => {
22915
22944
  });
22916
22945
  }, onDownloadButtonClicked: onDownloadButtonClicked })))));
22917
22946
  };
22918
- // TODO-vhuseinova: delete after the function is added to utils
22919
- /* @conditional-compile-remove(rich-text-editor-image-upload) */
22920
- const removeImageTags = (event) => {
22921
- event.content.querySelectorAll('img').forEach((image) => {
22922
- // If the image is the only child of its parent, remove all the parents of this img element.
22923
- let parentNode = image.parentElement;
22924
- let currentNode = image;
22925
- while ((parentNode === null || parentNode === void 0 ? void 0 : parentNode.childNodes.length) === 1) {
22926
- currentNode = parentNode;
22927
- parentNode = parentNode.parentElement;
22928
- }
22929
- currentNode === null || currentNode === void 0 ? void 0 : currentNode.remove();
22930
- });
22931
- };
22932
22947
 
22933
22948
  // Copyright (c) Microsoft Corporation.
22934
22949
  // Licensed under the MIT License.
@@ -23937,7 +23952,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
23937
23952
  * - `ErrorType` is never repeated in the returned errors.
23938
23953
  * - Errors are returned in a fixed order by `ErrorType`.
23939
23954
  *
23940
- * @beta
23955
+ * @public
23941
23956
  */
23942
23957
  const notificationStackSelector = reselect.createSelector([
23943
23958
  getLatestErrors,
@@ -24072,12 +24087,10 @@ const notificationStackSelector = reselect.createSelector([
24072
24087
  appendActiveErrorIfDefined$1(activeErrorMessages, latestErrors, 'Call.feature', 'startSpotlightWhileMaxParticipantsAreSpotlighted');
24073
24088
  }
24074
24089
  //below is for active notifications
24075
- let activeNotifications = [];
24090
+ const activeNotifications = [];
24076
24091
  if ((_u = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.speakingWhileMicrophoneIsMuted) === null || _u === void 0 ? void 0 : _u.value) {
24077
24092
  activeNotifications.push({ type: 'speakingWhileMuted', timestamp: new Date(Date.now()), autoDismiss: true });
24078
24093
  }
24079
- // sort notifications by timestamp from earliest to latest
24080
- activeNotifications = activeNotifications.sort((a, b) => { var _a, _b; return ((_a = a.timestamp) !== null && _a !== void 0 ? _a : new Date(Date.now())).getDate() - ((_b = b.timestamp) !== null && _b !== void 0 ? _b : new Date(Date.now())).getDate(); });
24081
24094
  return { activeErrorMessages: activeErrorMessages, activeNotifications: activeNotifications };
24082
24095
  });
24083
24096
  /* @conditional-compile-remove(notifications) */
@@ -29205,7 +29218,7 @@ const findSelector = (component) => {
29205
29218
  }
29206
29219
  return undefined;
29207
29220
  };
29208
- /* @conditional-compile-remove(PSTN-calls) */
29221
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(notifications) */
29209
29222
  const findConditionalCompiledSelector = (component) => {
29210
29223
  switch (component) {
29211
29224
  /* @conditional-compile-remove(PSTN-calls) */
@@ -29928,7 +29941,7 @@ function computeComplianceNotification(complianceProps, cachedProps) {
29928
29941
  // [2]: Compute the variant, using the transitioned state machine.
29929
29942
  const variant = computeVariant(cachedProps.current.latestStringState.callRecordState, cachedProps.current.latestStringState.callTranscribeState);
29930
29943
  // [3]: Transition the state machine again to deal with some end-states.
29931
- if (!shouldUpdateCached &&
29944
+ if (shouldUpdateCached &&
29932
29945
  cachedProps.current.latestStringState.callRecordState === 'stopped' &&
29933
29946
  cachedProps.current.latestStringState.callTranscribeState === 'stopped') {
29934
29947
  // When both states are stopped, after displaying message "RECORDING_AND_TRANSCRIPTION_STOPPED", change both states to off (going back to the default state).
@@ -37991,7 +38004,7 @@ const MainScreen = (props) => {
37991
38004
  /* @conditional-compile-remove(notifications) */
37992
38005
  const activeInCallErrors = usePropsFor$1(NotificationStack).activeErrorMessages;
37993
38006
  /* @conditional-compile-remove(notifications) */
37994
- const activeNotificationsFromSelector = usePropsFor$1(NotificationStack).activeNotifications;
38007
+ const activeNotifications = usePropsFor$1(NotificationStack).activeNotifications;
37995
38008
  /* @conditional-compile-remove(notifications) */
37996
38009
  const complianceProps = useSelector$1(complianceBannerSelector);
37997
38010
  /* @conditional-compile-remove(notifications) */
@@ -38010,30 +38023,37 @@ const MainScreen = (props) => {
38010
38023
  const complianceNotification = React.useMemo(() => {
38011
38024
  return computeComplianceNotification(complianceProps, cachedProps);
38012
38025
  }, [complianceProps, cachedProps]);
38026
+ /* @conditional-compile-remove(notifications) */
38027
+ React.useEffect(() => {
38028
+ if (complianceNotification) {
38029
+ activeNotifications.forEach((notification, index) => {
38030
+ if ([
38031
+ 'recordingStarted',
38032
+ 'transcriptionStarted',
38033
+ 'recordingStopped',
38034
+ 'transcriptionStopped',
38035
+ 'recordingAndTranscriptionStarted',
38036
+ 'recordingAndTranscriptionStopped',
38037
+ 'recordingStoppedStillTranscribing',
38038
+ 'transcriptionStoppedStillRecording'
38039
+ ].includes(activeNotifications[index].type)) {
38040
+ activeNotifications.splice(index, 1);
38041
+ }
38042
+ });
38043
+ activeNotifications.push(complianceNotification);
38044
+ }
38045
+ setTrackedNotifications((prev) => updateTrackedNotificationsWithActiveNotifications(prev, activeNotifications));
38046
+ }, [complianceNotification, activeNotifications]);
38013
38047
  const [trackedErrors, setTrackedErrors] = React.useState({});
38014
38048
  /* @conditional-compile-remove(notifications) */
38015
38049
  const [trackedInCallErrors, setTrackedInCallErrors] = React.useState({});
38016
38050
  /* @conditional-compile-remove(notifications) */
38017
38051
  const [trackedNotifications, setTrackedNotifications] = React.useState({});
38018
- /* @conditional-compile-remove(notifications) */
38019
- const [activeNotifications, setActiveNotifications] = React.useState(activeNotificationsFromSelector);
38020
- /* @conditional-compile-remove(notifications) */
38021
- React.useEffect(() => {
38022
- if (complianceNotification) {
38023
- setActiveNotifications([...activeNotificationsFromSelector, complianceNotification]);
38024
- }
38025
- }, [complianceNotification, activeNotificationsFromSelector]);
38026
38052
  React.useEffect(() => {
38027
38053
  setTrackedErrors((prev) => updateTrackedNotificationsWithActiveNotifications(prev, activeErrors));
38028
38054
  /* @conditional-compile-remove(notifications) */
38029
38055
  setTrackedInCallErrors((prev) => updateTrackedNotificationsWithActiveNotifications(prev, activeInCallErrors));
38030
- /* @conditional-compile-remove(notifications) */
38031
- setTrackedNotifications((prev) => updateTrackedNotificationsWithActiveNotifications(prev, activeNotifications));
38032
- }, [
38033
- activeErrors,
38034
- /* @conditional-compile-remove(notifications) */ activeInCallErrors,
38035
- /* @conditional-compile-remove(notifications) */ activeNotifications
38036
- ]);
38056
+ }, [activeErrors, /* @conditional-compile-remove(notifications) */ activeInCallErrors]);
38037
38057
  const onDismissError = React.useCallback((error) => {
38038
38058
  setTrackedErrors((prev) => trackNotificationAsDismissed(error.type, prev));
38039
38059
  /* @conditional-compile-remove(notifications) */
@@ -38047,7 +38067,12 @@ const MainScreen = (props) => {
38047
38067
  /* @conditional-compile-remove(notifications) */
38048
38068
  const latestInCallErrors = React.useMemo(() => filterLatestNotifications(activeInCallErrors, trackedInCallErrors), [activeInCallErrors, trackedInCallErrors]);
38049
38069
  /* @conditional-compile-remove(notifications) */
38050
- const latestNotifications = React.useMemo(() => filterLatestNotifications(activeNotifications, trackedNotifications), [activeNotifications, trackedNotifications]);
38070
+ const latestNotifications = React.useMemo(() => {
38071
+ const result = filterLatestNotifications(activeNotifications, trackedNotifications);
38072
+ // sort notifications by timestamp from earliest to latest
38073
+ result.sort((a, b) => { var _a, _b; return ((_a = a.timestamp) !== null && _a !== void 0 ? _a : new Date(Date.now())).getTime() - ((_b = b.timestamp) !== null && _b !== void 0 ? _b : new Date(Date.now())).getTime(); });
38074
+ return result;
38075
+ }, [activeNotifications, trackedNotifications]);
38051
38076
  const callees = useSelector$1(getTargetCallees);
38052
38077
  const locale = useLocale();
38053
38078
  const palette = useTheme().palette;
@@ -42369,4 +42394,4 @@ exports.useTeamsCall = useTeamsCall;
42369
42394
  exports.useTeamsCallAdapter = useTeamsCallAdapter;
42370
42395
  exports.useTeamsCallAgent = useTeamsCallAgent;
42371
42396
  exports.useTheme = useTheme;
42372
- //# sourceMappingURL=index-DQgWBNc2.js.map
42397
+ //# sourceMappingURL=index-BV60xvzw.js.map