@azure/communication-react 1.7.0-alpha-202307140015 → 1.7.0-alpha-202307180021

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 (57) hide show
  1. package/dist/communication-react.d.ts +51 -20
  2. package/dist/dist-cjs/communication-react/index.js +130 -66
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +26 -11
  7. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  8. package/dist/dist-esm/communication-react/src/index.d.ts +1 -1
  9. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  10. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +6 -1
  11. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +2 -2
  12. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +8 -2
  14. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  15. package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +33 -5
  16. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +18 -5
  17. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/MessageThread.js +1 -3
  19. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  20. package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +2 -1
  21. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +5 -1
  22. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
  23. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  24. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +8 -4
  25. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  26. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +1 -0
  27. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +1 -1
  28. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.d.ts +3 -0
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +3 -0
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.d.ts +2 -0
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.js +3 -1
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.js.map +1 -1
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.d.ts +3 -0
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.d.ts +5 -1
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js +14 -4
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js.map +1 -1
  38. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +8 -3
  39. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  40. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButtonWithUnreadMessagesBadge.d.ts +3 -4
  41. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButtonWithUnreadMessagesBadge.js +4 -26
  42. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButtonWithUnreadMessagesBadge.js.map +1 -1
  43. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/useUnreadMessagesTracker.d.ts +7 -0
  44. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/useUnreadMessagesTracker.js +32 -0
  45. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/useUnreadMessagesTracker.js.map +1 -0
  46. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +1 -1
  47. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  48. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +2 -3
  49. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
  50. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +1 -0
  51. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +1 -1
  52. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  53. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js +2 -2
  54. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
  55. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +13 -3
  56. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  57. package/package.json +8 -8
@@ -428,6 +428,36 @@ export declare interface BaseCustomStyles {
428
428
  root?: IStyle;
429
429
  }
430
430
 
431
+ /**
432
+ * Base interface that all Meta Data should extend.
433
+ * Typically used for ACS to ACS file transfers.
434
+ * @beta
435
+ */
436
+ export declare interface BaseFileMetadata {
437
+ /**
438
+ * File name to be displayed.
439
+ */
440
+ name: string;
441
+ /**
442
+ * Extension is used for rendering the file icon.
443
+ * An unknown extension will be rendered as a generic icon.
444
+ * Example: `jpeg`
445
+ */
446
+ extension: string;
447
+ /**
448
+ * Download URL for the file.
449
+ */
450
+ url: string;
451
+ /**
452
+ * Unique ID of the file.
453
+ */
454
+ id: string;
455
+ /**
456
+ * Attachment Type
457
+ */
458
+ attachmentType: FileMetadataAttachmentType;
459
+ }
460
+
431
461
  /**
432
462
  * Content blocked message type.
433
463
  *
@@ -6097,30 +6127,22 @@ export declare type FileDownloadHandler = (userId: string, fileMetadata: FileMet
6097
6127
  * Meta Data containing information about the uploaded file.
6098
6128
  * @beta
6099
6129
  */
6100
- export declare interface FileMetadata {
6101
- attachmentType: FileMetadataAttachmentType;
6102
- id: string;
6103
- /**
6104
- * File name to be displayed.
6105
- */
6106
- name: string;
6107
- /**
6108
- * Extension is used for rendering the file icon.
6109
- * An unknown extension will be rendered as a generic icon.
6110
- * Example: `jpeg`
6111
- */
6112
- extension: string;
6113
- /**
6114
- * Download URL for the file.
6115
- */
6116
- url: string;
6117
- previewUrl?: string;
6118
- }
6130
+ export declare type FileMetadata = FileSharingMetadata | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ ImageFileMetadata;
6119
6131
 
6120
6132
  /**
6121
6133
  * @beta
6122
6134
  */
6123
- export declare type FileMetadataAttachmentType = 'fileSharing' | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ 'teamsInlineImage' | 'unknown';
6135
+ export declare type FileMetadataAttachmentType = 'fileSharing' | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ 'inlineImage' | 'unknown';
6136
+
6137
+ /**
6138
+ * Meta Data containing basic information about the uploaded file.
6139
+ * Typically used for ACS to ACS file transfers.
6140
+ * @beta
6141
+ */
6142
+ export declare interface FileSharingMetadata extends BaseFileMetadata {
6143
+ attachmentType: 'fileSharing';
6144
+ payload?: Record<string, string>;
6145
+ }
6124
6146
 
6125
6147
  /**
6126
6148
  * Properties for configuring the File Sharing feature.
@@ -6501,6 +6523,15 @@ export declare interface _Identifiers {
6501
6523
  mentionSuggestionItem: string;
6502
6524
  }
6503
6525
 
6526
+ /**
6527
+ * Meta Data containing data for images.
6528
+ * @beta
6529
+ */
6530
+ export declare interface ImageFileMetadata extends BaseFileMetadata {
6531
+ attachmentType: 'inlineImage';
6532
+ previewUrl?: string;
6533
+ }
6534
+
6504
6535
  /**
6505
6536
  * @beta
6506
6537
  * This contains a readonly array that returns all the active `incomingCalls`.
@@ -178,7 +178,7 @@ const _isValidIdentifier = (identifier) => {
178
178
  // Copyright (c) Microsoft Corporation.
179
179
  // Licensed under the MIT license.
180
180
  // GENERATED FILE. DO NOT EDIT MANUALLY.
181
- var telemetryVersion = '1.7.0-alpha-202307140015';
181
+ var telemetryVersion = '1.7.0-alpha-202307180021';
182
182
 
183
183
  // Copyright (c) Microsoft Corporation.
184
184
  /**
@@ -9085,7 +9085,10 @@ const MessageContentAsRichTextHTML = (props) => {
9085
9085
  React.useEffect(() => {
9086
9086
  var _a;
9087
9087
  (_a = props.message.attachedFilesMetadata) === null || _a === void 0 ? void 0 : _a.map((fileMetadata) => {
9088
- if (props.onFetchAttachment && props.attachmentsMap && props.attachmentsMap[fileMetadata.id] === undefined) {
9088
+ if (props.onFetchAttachment &&
9089
+ props.attachmentsMap &&
9090
+ fileMetadata.attachmentType === 'inlineImage' &&
9091
+ props.attachmentsMap[fileMetadata.id] === undefined) {
9089
9092
  props.onFetchAttachment(fileMetadata);
9090
9093
  }
9091
9094
  });
@@ -9146,12 +9149,15 @@ const processInlineImage = (props) => ({
9146
9149
  // Custom <img> processing
9147
9150
  shouldProcessNode: (node) => {
9148
9151
  var _a;
9152
+ function isImageNode(file) {
9153
+ return file.attachmentType === 'inlineImage' && file.id === node.attribs.id;
9154
+ }
9149
9155
  // Process img node with id in attachments list
9150
9156
  return (node.name &&
9151
9157
  node.name === 'img' &&
9152
9158
  node.attribs &&
9153
9159
  node.attribs.id &&
9154
- ((_a = props.message.attachedFilesMetadata) === null || _a === void 0 ? void 0 : _a.find((f) => f.id === node.attribs.id)));
9160
+ ((_a = props.message.attachedFilesMetadata) === null || _a === void 0 ? void 0 : _a.find(isImageNode)));
9155
9161
  },
9156
9162
  processNode: (node, children, index) => {
9157
9163
  // logic to check id in map/list
@@ -9257,14 +9263,24 @@ const _FileDownloadCards = (props) => {
9257
9263
  var _a, _b;
9258
9264
  return (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile) !== null && _b !== void 0 ? _b : localeStrings.downloadFile;
9259
9265
  }, [(_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile, localeStrings.downloadFile]);
9266
+ const isFileSharingAttachment = React.useCallback((attachment) => {
9267
+ /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
9268
+ return attachment.attachmentType === 'fileSharing';
9269
+ }, []);
9270
+ /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
9271
+ const isShowDownloadIcon = React.useCallback((attachment) => {
9272
+ var _a;
9273
+ /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
9274
+ return attachment.attachmentType === 'fileSharing' && ((_a = attachment.payload) === null || _a === void 0 ? void 0 : _a.teamsFileAttachment) !== 'true';
9275
+ }, []);
9260
9276
  const fileCardGroupDescription = React.useMemo(() => () => {
9261
9277
  var _a, _b;
9262
9278
  const fileGroupLocaleString = (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.fileCardGroupMessage) !== null && _b !== void 0 ? _b : localeStrings.fileCardGroupMessage;
9263
9279
  /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
9264
9280
  return _formatString(fileGroupLocaleString, {
9265
- fileCount: `${fileMetadata.filter((file) => file.attachmentType === 'fileSharing').length}`
9281
+ fileCount: `${fileMetadata.filter(isFileSharingAttachment).length}`
9266
9282
  });
9267
- }, [(_b = props.strings) === null || _b === void 0 ? void 0 : _b.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata]);
9283
+ }, [(_b = props.strings) === null || _b === void 0 ? void 0 : _b.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata, isFileSharingAttachment]);
9268
9284
  const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$v(void 0, void 0, void 0, function* () {
9269
9285
  if (!props.downloadHandler) {
9270
9286
  window.open(file.url, '_blank', 'noopener,noreferrer');
@@ -9288,7 +9304,7 @@ const _FileDownloadCards = (props) => {
9288
9304
  }), [props]);
9289
9305
  if (!fileMetadata ||
9290
9306
  fileMetadata.length === 0 ||
9291
- /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ !fileMetadata.some((attachment) => attachment.attachmentType === 'fileSharing')) {
9307
+ /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ !fileMetadata.some(isFileSharingAttachment)) {
9292
9308
  return React__default['default'].createElement(React__default['default'].Fragment, null);
9293
9309
  }
9294
9310
  return (React__default['default'].createElement("div", { style: fileDownloadCardsStyle, "data-ui-id": "file-download-card-group" },
@@ -9296,9 +9312,10 @@ const _FileDownloadCards = (props) => {
9296
9312
  fileMetadata
9297
9313
  .filter((attachment) => {
9298
9314
  /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
9299
- return attachment.attachmentType === 'fileSharing';
9315
+ return isFileSharingAttachment(attachment);
9300
9316
  })
9301
- .map((file) => (React__default['default'].createElement(_FileCard, { fileName: file.name, key: file.name, fileExtension: file.extension, actionIcon: showSpinner ? (React__default['default'].createElement(react.Spinner, { size: react.SpinnerSize.medium, "aria-live": 'polite', role: 'status' })) : /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ !file.previewUrl ? (React__default['default'].createElement(react.IconButton, { className: iconButtonClassName, ariaLabel: downloadFileButtonString() },
9317
+ .map((file) => (React__default['default'].createElement(_FileCard, { fileName: file.name, key: file.name, fileExtension: file.extension, actionIcon: showSpinner ? (React__default['default'].createElement(react.Spinner, { size: react.SpinnerSize.medium, "aria-live": 'polite', role: 'status' })) : /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
9318
+ isShowDownloadIcon(file) ? (React__default['default'].createElement(react.IconButton, { className: iconButtonClassName, ariaLabel: downloadFileButtonString() },
9302
9319
  React__default['default'].createElement(DownloadIconTrampoline, null))) : undefined, actionHandler: () => fileDownloadHandler(userId, file) }))))));
9303
9320
  };
9304
9321
  /**
@@ -9879,9 +9896,7 @@ const MessageThread = (props) => {
9879
9896
  const [inlineAttachments, setInlineAttachments] = React.useState({});
9880
9897
  /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
9881
9898
  const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$t(void 0, void 0, void 0, function* () {
9882
- if (!onFetchAttachments ||
9883
- attachment.id in inlineAttachments ||
9884
- attachment.attachmentType !== 'teamsInlineImage') {
9899
+ if (!onFetchAttachments || attachment.attachmentType !== 'inlineImage' || attachment.id in inlineAttachments) {
9885
9900
  return;
9886
9901
  }
9887
9902
  setInlineAttachments((prev) => (Object.assign(Object.assign({}, prev), { [attachment.id]: '' })));
@@ -16169,7 +16184,11 @@ const captionContainerClassName = react.mergeStyles({
16169
16184
  /**
16170
16185
  * @private
16171
16186
  */
16172
- const captionsBannerClassName = react.mergeStyles(Object.assign({ height: _pxToRem(100), overflowY: 'auto', overflowX: 'hidden' }, scrollbarStyles));
16187
+ const captionsBannerClassName = (formFactor) => {
16188
+ return {
16189
+ root: Object.assign({ overflowX: 'hidden', height: formFactor === 'compact' ? '4.5rem' : '6.25rem', overflowY: 'auto' }, scrollbarStyles)
16190
+ };
16191
+ };
16173
16192
  /**
16174
16193
  * @private
16175
16194
  */
@@ -16224,7 +16243,7 @@ const _Caption = (props) => {
16224
16243
  * A component for displaying a CaptionsBanner with user icon, displayName and captions text.
16225
16244
  */
16226
16245
  const _CaptionsBanner = (props) => {
16227
- const { captions, isCaptionsOn, startCaptionsInProgress, onRenderAvatar, strings } = props;
16246
+ const { captions, isCaptionsOn, startCaptionsInProgress, onRenderAvatar, strings, formFactor = 'default' } = props;
16228
16247
  const captionsScrollDivRef = React.useRef(null);
16229
16248
  const [isAtBottomOfScroll, setIsAtBottomOfScroll] = React.useState(true);
16230
16249
  const scrollToBottom = () => {
@@ -16255,7 +16274,7 @@ const _CaptionsBanner = (props) => {
16255
16274
  }, [captions, isAtBottomOfScroll]);
16256
16275
  return (React__default['default'].createElement(React__default['default'].Fragment, null, startCaptionsInProgress && (React__default['default'].createElement(react.FocusZone, { as: "ul", className: captionsContainerClassName },
16257
16276
  isCaptionsOn && (React__default['default'].createElement(c, { innerRef: captionsScrollDivRef },
16258
- React__default['default'].createElement(react.Stack, { verticalAlign: "start", className: captionsBannerClassName }, captions.map((caption) => {
16277
+ React__default['default'].createElement(react.Stack, { verticalAlign: "start", styles: captionsBannerClassName(formFactor) }, captions.map((caption) => {
16259
16278
  return (React__default['default'].createElement("div", { key: caption.id, className: captionContainerClassName, "data-is-focusable": true },
16260
16279
  React__default['default'].createElement(_Caption, Object.assign({}, caption, { onRenderAvatar: onRenderAvatar }))));
16261
16280
  })))),
@@ -17409,22 +17428,37 @@ const extractAttachedFilesMetadata = (metadata) => {
17409
17428
  };
17410
17429
  /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
17411
17430
  const extractTeamsAttachmentsMetadata = (attachments) => {
17412
- return attachments.map((attachment) => {
17413
- var _a, _b;
17414
- return ({
17415
- attachmentType: mapAttachmentType(attachment.attachmentType),
17416
- id: attachment.id,
17417
- name: (_a = attachment.name) !== null && _a !== void 0 ? _a : '',
17418
- extension: (_b = attachment.contentType) !== null && _b !== void 0 ? _b : '',
17419
- url: extractAttachmentUrl(attachment),
17420
- previewUrl: attachment.previewUrl
17421
- });
17431
+ const fileMetadata = [];
17432
+ attachments.forEach((attachment) => {
17433
+ var _a, _b, _c, _d;
17434
+ const attachmentType = mapAttachmentType(attachment.attachmentType);
17435
+ if (attachmentType === 'inlineImage') {
17436
+ fileMetadata.push({
17437
+ attachmentType: attachmentType,
17438
+ id: attachment.id,
17439
+ name: (_a = attachment.name) !== null && _a !== void 0 ? _a : '',
17440
+ extension: (_b = attachment.contentType) !== null && _b !== void 0 ? _b : '',
17441
+ url: extractAttachmentUrl(attachment),
17442
+ previewUrl: attachment.previewUrl
17443
+ });
17444
+ }
17445
+ else if (attachmentType === 'fileSharing') {
17446
+ fileMetadata.push({
17447
+ attachmentType: attachmentType,
17448
+ id: attachment.id,
17449
+ name: (_c = attachment.name) !== null && _c !== void 0 ? _c : '',
17450
+ extension: (_d = attachment.contentType) !== null && _d !== void 0 ? _d : '',
17451
+ url: extractAttachmentUrl(attachment),
17452
+ payload: { teamsFileAttachment: 'true' }
17453
+ });
17454
+ }
17422
17455
  });
17456
+ return fileMetadata;
17423
17457
  };
17424
17458
  /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
17425
17459
  const mapAttachmentType = (attachmentType) => {
17426
17460
  if (attachmentType === 'teamsImage' || attachmentType === 'teamsInlineImage') {
17427
- return 'teamsInlineImage';
17461
+ return 'inlineImage';
17428
17462
  }
17429
17463
  else if (attachmentType === 'file') {
17430
17464
  return 'fileSharing';
@@ -20662,7 +20696,7 @@ const ChatScreen = (props) => {
20662
20696
  } })), [fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.downloadHandler]);
20663
20697
  /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
20664
20698
  const onRenderInlineAttachment = React.useCallback((attachment) => __awaiter$g(void 0, void 0, void 0, function* () {
20665
- if (attachment.previewUrl) {
20699
+ if (attachment.attachmentType === 'inlineImage' && attachment.previewUrl) {
20666
20700
  const blob = yield adapter.downloadAttachments({ attachmentUrls: [attachment.previewUrl] });
20667
20701
  return blob;
20668
20702
  }
@@ -21606,11 +21640,10 @@ const CaptionsBanner = (props) => {
21606
21640
  };
21607
21641
  return (React__default['default'].createElement(React__default['default'].Fragment, null,
21608
21642
  /* @conditional-compile-remove(close-captions) */ isCaptionsSettingsOpen && (React__default['default'].createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: isCaptionsSettingsOpen, onDismissCaptionsSettings: onDismissCaptionsSettings })),
21609
- /* @conditional-compile-remove(close-captions) */
21610
- React__default['default'].createElement("div", { className: containerClassName },
21643
+ /* @conditional-compile-remove(close-captions) */ React__default['default'].createElement("div", { className: containerClassName },
21611
21644
  React__default['default'].createElement(react.Stack, { horizontalAlign: "center" },
21612
21645
  React__default['default'].createElement(react.Stack.Item, { style: { width: props.isMobile ? mobileViewBannerWidth : desktopViewBannerWidth } },
21613
- React__default['default'].createElement(_CaptionsBanner, Object.assign({}, captionsBannerProps, handlers, { strings: captionsBannerStrings })))),
21646
+ React__default['default'].createElement(_CaptionsBanner, Object.assign({}, captionsBannerProps, handlers, { formFactor: props.isMobile ? 'compact' : 'default', strings: captionsBannerStrings })))),
21614
21647
  !props.isMobile && captionsBannerProps.isCaptionsOn && (React__default['default'].createElement("div", { className: floatingChildClassName },
21615
21648
  React__default['default'].createElement(CaptionsBannerMoreButton, { onCaptionsSettingsClick: onClickCaptionsSettings }))))));
21616
21649
  };
@@ -22113,12 +22146,14 @@ const bannerNotificationStyles = {
22113
22146
  /**
22114
22147
  * @private
22115
22148
  */
22116
- const callArrangementContainerStyles = {
22117
- root: {
22118
- width: '100%',
22119
- height: '100%',
22120
- flexDirection: 'column-reverse' // to allow first initial keyboard focus on ControlBar
22121
- }
22149
+ const callArrangementContainerStyles = (verticalControlBar) => {
22150
+ return {
22151
+ root: {
22152
+ width: '100%',
22153
+ height: '100%',
22154
+ flexDirection: verticalControlBar ? 'unset' : 'column-reverse' // to allow first initial keyboard focus on ControlBar
22155
+ }
22156
+ };
22122
22157
  };
22123
22158
 
22124
22159
  // Copyright (c) Microsoft Corporation.
@@ -22232,7 +22267,7 @@ const CallControls = (props) => {
22232
22267
  /* @conditional-compile-remove(PSTN-calls) */
22233
22268
  React__default['default'].createElement(SendDtmfDialpad, { isMobile: !!props.isMobile, strings: dialpadStrings, showDialpad: showDialpad, onDismissDialpad: onDismissDialpad }),
22234
22269
  React__default['default'].createElement(react.Stack.Item, null,
22235
- React__default['default'].createElement(ControlBar, { layout: "horizontal", styles: controlBarStyles(theme.semanticColors.bodyBackground) },
22270
+ React__default['default'].createElement(ControlBar, { layout: props.displayVertical ? 'vertical' : 'horizontal', styles: controlBarStyles(theme.semanticColors.bodyBackground) },
22236
22271
  microphoneButtonIsEnabled && (React__default['default'].createElement(Microphone, { displayType: options === null || options === void 0 ? void 0 : options.displayType, disabled: isDisabled$2(options === null || options === void 0 ? void 0 : options.microphoneButton) })),
22237
22272
  cameraButtonIsEnabled && (React__default['default'].createElement(Camera, { displayType: options === null || options === void 0 ? void 0 : options.displayType, disabled: isDisabled$2(options === null || options === void 0 ? void 0 : options.cameraButton) })),
22238
22273
  screenShareButtonIsEnabled && (React__default['default'].createElement(ScreenShare, { option: options === null || options === void 0 ? void 0 : options.screenShareButton, displayType: options === null || options === void 0 ? void 0 : options.displayType, disabled: isDisabled$2(options === null || options === void 0 ? void 0 : options.screenShareButton) })),
@@ -22693,7 +22728,7 @@ const CommonCallControlBar = (props) => {
22693
22728
  React__default['default'].createElement(HiddenFocusStartPoint, null),
22694
22729
  React__default['default'].createElement(react.Stack.Item, null,
22695
22730
  React__default['default'].createElement("div", { ref: controlBarContainerRef },
22696
- React__default['default'].createElement(ControlBar, { layout: "horizontal", styles: centerContainerStyles },
22731
+ React__default['default'].createElement(ControlBar, { layout: props.displayVertical ? 'vertical' : 'horizontal', styles: centerContainerStyles },
22697
22732
  microphoneButtonIsEnabled && (React__default['default'].createElement(Microphone, { displayType: options.displayType, styles: commonButtonStyles, splitButtonsForDeviceSelection: !props.mobileView,
22698
22733
  /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
22699
22734
  disabled: props.disableButtonsForHoldScreen || isDisabled$2(options.microphoneButton) })),
@@ -23351,8 +23386,8 @@ const PeopleAndChatHeader = (props) => {
23351
23386
  }, [theme, haveMultipleTabs]);
23352
23387
  return (React__default['default'].createElement(react.Stack, { horizontal: true, grow: true, styles: mobilePaneControlBarStyle },
23353
23388
  React__default['default'].createElement(react.DefaultButton, { ariaLabel: strings.returnToCallButtonAriaLabel, ariaDescription: strings.returnToCallButtonAriaDescription, onClick: onClose, styles: mobilePaneBackButtonStyles, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }), autoFocus: true }),
23354
- React__default['default'].createElement(react.Stack.Item, { grow: true }, onChatButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: onChatButtonClicked, styles: mobilePaneButtonStylesThemed, checked: activeTab === 'chat', role: 'tab', disabled: props.disableChatButton }, strings.chatButtonLabel))),
23355
- React__default['default'].createElement(react.Stack.Item, { grow: true }, onPeopleButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: onPeopleButtonClicked, styles: mobilePaneButtonStylesThemed, checked: activeTab === 'people', role: 'tab', disabled: props.disablePeopleButton }, strings.peopleButtonLabel))),
23389
+ React__default['default'].createElement(react.Stack.Item, { grow: true }, onChatButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: onChatButtonClicked, styles: mobilePaneButtonStylesThemed, checked: activeTab === 'chat', "aria-selected": activeTab === 'chat', role: 'tab', disabled: props.disableChatButton }, strings.chatButtonLabel))),
23390
+ React__default['default'].createElement(react.Stack.Item, { grow: true }, onPeopleButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: onPeopleButtonClicked, styles: mobilePaneButtonStylesThemed, checked: activeTab === 'people', "aria-selected": activeTab === 'people', role: 'tab', disabled: props.disablePeopleButton }, strings.peopleButtonLabel))),
23356
23391
  React__default['default'].createElement(react.DefaultButton, { styles: mobilePaneHiddenIconStyles, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }) })));
23357
23392
  };
23358
23393
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -23973,7 +24008,9 @@ const localVideoSelector = reselect__namespace.createSelector([callStatusSelecto
23973
24008
  return {
23974
24009
  isAvailable: !!localVideoStream,
23975
24010
  isMirrored: (_a = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _a === void 0 ? void 0 : _a.isMirrored,
23976
- renderElement: (_b = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _b === void 0 ? void 0 : _b.target
24011
+ renderElement: (_b = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _b === void 0 ? void 0 : _b.target,
24012
+ /* @conditional-compile-remove(video-background-effects) */
24013
+ activeVideoEffects: localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.videoEffects
23977
24014
  };
23978
24015
  });
23979
24016
 
@@ -23992,6 +24029,7 @@ var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments,
23992
24029
  */
23993
24030
  /** @beta */
23994
24031
  const VideoEffectsPaneContent = (props) => {
24032
+ var _a;
23995
24033
  const { onDismissError, activeVideoEffectError,
23996
24034
  /* @conditional-compile-remove(video-background-effects) */
23997
24035
  activeVideoEffectChange } = props;
@@ -24002,6 +24040,8 @@ const VideoEffectsPaneContent = (props) => {
24002
24040
  /* @conditional-compile-remove(video-background-effects) */
24003
24041
  const strings = locale.strings.call;
24004
24042
  /* @conditional-compile-remove(video-background-effects) */
24043
+ const activeVideoEffects = (_a = useSelector$1(localVideoSelector).activeVideoEffects) === null || _a === void 0 ? void 0 : _a.activeEffects;
24044
+ /* @conditional-compile-remove(video-background-effects) */
24005
24045
  const selectableVideoEffects = React.useMemo(() => {
24006
24046
  const videoEffects = [
24007
24047
  {
@@ -24048,19 +24088,19 @@ const VideoEffectsPaneContent = (props) => {
24048
24088
  const blurEffect = {
24049
24089
  effectName: effectKey
24050
24090
  };
24051
- adapter.updateSelectedVideoBackgroundEffect(blurEffect);
24052
24091
  activeVideoEffectChange({
24053
24092
  type: 'blur',
24054
24093
  timestamp: new Date(Date.now())
24055
24094
  });
24056
24095
  yield adapter.startVideoBackgroundEffect(blurEffect);
24096
+ adapter.updateSelectedVideoBackgroundEffect(blurEffect);
24057
24097
  }
24058
24098
  else if (effectKey === 'none') {
24059
24099
  const noneEffect = {
24060
24100
  effectName: effectKey
24061
24101
  };
24062
- adapter.updateSelectedVideoBackgroundEffect(noneEffect);
24063
24102
  yield adapter.stopVideoBackgroundEffects();
24103
+ adapter.updateSelectedVideoBackgroundEffect(noneEffect);
24064
24104
  }
24065
24105
  else {
24066
24106
  const backgroundImg = selectableVideoEffects.find((effect) => {
@@ -24072,15 +24112,22 @@ const VideoEffectsPaneContent = (props) => {
24072
24112
  key: effectKey,
24073
24113
  backgroundImageUrl: backgroundImg.backgroundProps.url
24074
24114
  };
24075
- adapter.updateSelectedVideoBackgroundEffect(replaceEffect);
24076
24115
  activeVideoEffectChange({
24077
24116
  type: 'replacement',
24078
24117
  timestamp: new Date(Date.now())
24079
24118
  });
24080
24119
  yield adapter.startVideoBackgroundEffect(replaceEffect);
24120
+ adapter.updateSelectedVideoBackgroundEffect(replaceEffect);
24081
24121
  }
24082
24122
  }
24083
24123
  }), [adapter, activeVideoEffectChange, selectableVideoEffects]);
24124
+ /* @conditional-compile-remove(video-background-effects) */
24125
+ if (activeVideoEffectError && activeVideoEffects && activeVideoEffects.length === 0) {
24126
+ const noneEffect = {
24127
+ effectName: 'none'
24128
+ };
24129
+ adapter.updateSelectedVideoBackgroundEffect(noneEffect);
24130
+ }
24084
24131
  return VideoEffectsPaneTrampoline(onDismissError, activeVideoEffectError,
24085
24132
  /* @conditional-compile-remove(video-background-effects) */
24086
24133
  selectableVideoEffects,
@@ -24569,14 +24616,18 @@ const CallArrangement = (props) => {
24569
24616
  const hasJoinedCall = useSelector$1(getCallStatus) === 'Connected';
24570
24617
  const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId);
24571
24618
  const pipStyles = React.useMemo(() => getPipStyles(theme), [theme]);
24619
+ const verticalControlBar = props.mobileView && containerWidth && containerHeight && containerWidth / containerHeight > 1 ? true : false;
24572
24620
  return (React__default['default'].createElement("div", { ref: containerRef, className: react.mergeStyles(containerDivStyles), id: props.id },
24573
24621
  React__default['default'].createElement(react.Stack, { verticalFill: true, horizontalAlign: "stretch", className: containerClassName, "data-ui-id": props.dataUiId },
24574
- React__default['default'].createElement(react.Stack, { grow: true, styles: callArrangementContainerStyles },
24575
- ((_b = props.callControlProps) === null || _b === void 0 ? void 0 : _b.options) !== false && !isMobileWithActivePane && (React__default['default'].createElement(react.Stack.Item, { className: react.mergeStyles({ zIndex: CONTROL_BAR_Z_INDEX }) }, isLegacyCallControlEnabled((_c = props.callControlProps) === null || _c === void 0 ? void 0 : _c.options) ? (React__default['default'].createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView,
24622
+ React__default['default'].createElement(react.Stack, { reversed: true, horizontal: verticalControlBar, grow: true, styles: callArrangementContainerStyles(verticalControlBar) },
24623
+ ((_b = props.callControlProps) === null || _b === void 0 ? void 0 : _b.options) !== false && !isMobileWithActivePane && (React__default['default'].createElement(react.Stack, { verticalAlign: 'center', className: react.mergeStyles({
24624
+ zIndex: CONTROL_BAR_Z_INDEX,
24625
+ padding: verticalControlBar ? '0.25rem' : 'unset'
24626
+ }) }, isLegacyCallControlEnabled((_c = props.callControlProps) === null || _c === void 0 ? void 0 : _c.options) ? (React__default['default'].createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView,
24576
24627
  /* @conditional-compile-remove(one-to-n-calling) */
24577
24628
  peopleButtonChecked: isPeoplePaneOpen,
24578
24629
  /* @conditional-compile-remove(one-to-n-calling) */
24579
- onPeopleButtonClicked: togglePeoplePane }))) : (React__default['default'].createElement(CommonCallControlBar, Object.assign({}, props.callControlProps, { callControls: props.callControlProps.options, callAdapter: adapter, mobileView: props.mobileView, disableButtonsForLobbyPage: isInLobby,
24630
+ onPeopleButtonClicked: togglePeoplePane, displayVertical: verticalControlBar }))) : (React__default['default'].createElement(CommonCallControlBar, Object.assign({}, props.callControlProps, { callControls: props.callControlProps.options, callAdapter: adapter, mobileView: props.mobileView, disableButtonsForLobbyPage: isInLobby,
24580
24631
  /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
24581
24632
  disableButtonsForHoldScreen: isInLocalHold, peopleButtonChecked: isPeoplePaneOpen, onPeopleButtonClicked: togglePeoplePane, onMoreButtonClicked: onMoreButtonClicked,
24582
24633
  /* @conditional-compile-remove(close-captions) */
@@ -24584,7 +24635,7 @@ const CallArrangement = (props) => {
24584
24635
  /* @conditional-compile-remove(video-background-effects) */
24585
24636
  onShowVideoEffectsPicker: openVideoEffectsPane,
24586
24637
  /* @conditional-compile-remove(PSTN-calls) */
24587
- onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined }))))),
24638
+ onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined, displayVertical: verticalControlBar }))))),
24588
24639
  ((_d = props.callControlProps) === null || _d === void 0 ? void 0 : _d.options) !== false && showDrawer && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStylesValue },
24589
24640
  React__default['default'].createElement(PreparedMoreDrawer, { callControls: props.callControlProps.options, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
24590
24641
  /* @conditional-compile-remove(PSTN-calls) */
@@ -28597,11 +28648,6 @@ const notificationTextStyles = react.memoizeFunction((theme) => ({
28597
28648
  }));
28598
28649
 
28599
28650
  // Copyright (c) Microsoft Corporation.
28600
- /**
28601
- * Helper function to determine if the message in the event is a valid one from a user.
28602
- * Display name is used since system messages will not have one.
28603
- */
28604
- const validNewChatMessage = (message) => !!message.senderDisplayName && (message.type === 'text' || message.type === 'html');
28605
28651
  const filledIcon = React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: 'ControlBarChatButtonActive' });
28606
28652
  const regularIcon = React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: 'ControlBarChatButtonInactive' });
28607
28653
  /**
@@ -28609,8 +28655,7 @@ const regularIcon = React__default['default'].createElement(CallWithChatComposit
28609
28655
  */
28610
28656
  const ChatButtonWithUnreadMessagesBadge = (props) => {
28611
28657
  var _a, _b, _c, _d;
28612
- const { chatAdapter, isChatPaneVisible, newMessageLabel } = props;
28613
- const [unreadChatMessagesCount, setUnreadChatMessagesCount] = React.useState(0);
28658
+ const { newMessageLabel, unreadChatMessagesCount, hideUnreadChatMessagesBadge } = props;
28614
28659
  const baseIcon = props.showLabel ? regularIcon : filledIcon;
28615
28660
  const callWithChatStrings = useCallWithChatCompositeStrings();
28616
28661
  const numberOfMsgToolTip = ((_a = props.strings) === null || _a === void 0 ? void 0 : _a.tooltipOffContent) && unreadChatMessagesCount > 0
@@ -28629,9 +28674,25 @@ const ChatButtonWithUnreadMessagesBadge = (props) => {
28629
28674
  const onRenderOnIcon = React.useCallback(() => baseIcon, [baseIcon]);
28630
28675
  const notificationOnIcon = React.useCallback(() => {
28631
28676
  return (React__default['default'].createElement(react.Stack, { styles: chatNotificationContainerStyles },
28632
- unreadChatMessagesCount > 0 && (React__default['default'].createElement(NotificationIcon, { chatMessagesCount: unreadChatMessagesCount, label: newMessageLabel })),
28677
+ unreadChatMessagesCount > 0 && !hideUnreadChatMessagesBadge && (React__default['default'].createElement(NotificationIcon, { chatMessagesCount: unreadChatMessagesCount, label: newMessageLabel })),
28633
28678
  baseIcon));
28634
- }, [unreadChatMessagesCount, newMessageLabel, baseIcon]);
28679
+ }, [unreadChatMessagesCount, newMessageLabel, baseIcon, hideUnreadChatMessagesBadge]);
28680
+ return (React__default['default'].createElement(ChatButton, Object.assign({}, props, { "data-ui-id": "call-with-chat-composite-chat-button", onRenderOffIcon: notificationOnIcon, onRenderOnIcon: onRenderOnIcon, strings: chatStrings })));
28681
+ };
28682
+ const chatNotificationContainerStyles = {
28683
+ root: {
28684
+ display: 'inline',
28685
+ position: 'relative'
28686
+ }
28687
+ };
28688
+
28689
+ // Copyright (c) Microsoft Corporation.
28690
+ /**
28691
+ * Used by the CallWithChatComposite to track unread messages for showing as a badge on the Chat Button.
28692
+ * @private
28693
+ */
28694
+ const useUnreadMessagesTracker = (chatAdapter, isChatPaneVisible) => {
28695
+ const [unreadChatMessagesCount, setUnreadChatMessagesCount] = React.useState(0);
28635
28696
  React.useEffect(() => {
28636
28697
  if (isChatPaneVisible) {
28637
28698
  setUnreadChatMessagesCount(0);
@@ -28647,14 +28708,13 @@ const ChatButtonWithUnreadMessagesBadge = (props) => {
28647
28708
  chatAdapter.off('messageReceived', incrementUnreadChatMessagesCount);
28648
28709
  };
28649
28710
  }, [chatAdapter, setUnreadChatMessagesCount, isChatPaneVisible, unreadChatMessagesCount]);
28650
- return (React__default['default'].createElement(ChatButton, Object.assign({}, props, { "data-ui-id": "call-with-chat-composite-chat-button", onRenderOffIcon: notificationOnIcon, onRenderOnIcon: onRenderOnIcon, strings: chatStrings })));
28651
- };
28652
- const chatNotificationContainerStyles = {
28653
- root: {
28654
- display: 'inline',
28655
- position: 'relative'
28656
- }
28711
+ return unreadChatMessagesCount;
28657
28712
  };
28713
+ /**
28714
+ * Helper function to determine if the message in the event is a valid one from a user.
28715
+ * Display name is used since system messages will not have one.
28716
+ */
28717
+ const validNewChatMessage = (message) => !!message.senderDisplayName && (message.type === 'text' || message.type === 'html');
28658
28718
 
28659
28719
  // Copyright (c) Microsoft Corporation.
28660
28720
  const CallWithChatScreen = (props) => {
@@ -28732,18 +28792,22 @@ const CallWithChatScreen = (props) => {
28732
28792
  disabled: chatButtonDisabled
28733
28793
  }
28734
28794
  : undefined, [chatButtonDisabled, mobileView, toggleChat, showChatButton]);
28795
+ const unreadChatMessagesCount = useUnreadMessagesTracker(chatProps.adapter, isChatOpen);
28735
28796
  const customChatButton = React.useCallback((args) => ({
28736
28797
  placement: mobileView ? 'primary' : 'secondary',
28737
- onRenderButton: () => (React__default['default'].createElement(ChatButtonWithUnreadMessagesBadge, { chatAdapter: chatProps.adapter, isChatPaneVisible: isChatOpen, checked: isChatOpen, showLabel: args.displayType !== 'compact', onClick: toggleChat, disabled: chatButtonDisabled, strings: chatButtonStrings, styles: commonButtonStyles, newMessageLabel: callWithChatStrings.chatButtonNewMessageNotificationLabel }))
28798
+ onRenderButton: () => (React__default['default'].createElement(ChatButtonWithUnreadMessagesBadge, { checked: isChatOpen, showLabel: args.displayType !== 'compact', onClick: toggleChat, disabled: chatButtonDisabled, strings: chatButtonStrings, styles: commonButtonStyles, newMessageLabel: callWithChatStrings.chatButtonNewMessageNotificationLabel, unreadChatMessagesCount: unreadChatMessagesCount,
28799
+ // As chat is disabled when on hold, we don't want to show the unread badge when on hold
28800
+ hideUnreadChatMessagesBadge: isOnHold }))
28738
28801
  }), [
28739
28802
  callWithChatStrings.chatButtonNewMessageNotificationLabel,
28740
28803
  chatButtonStrings,
28741
- chatProps.adapter,
28742
28804
  commonButtonStyles,
28743
28805
  isChatOpen,
28744
28806
  chatButtonDisabled,
28745
28807
  mobileView,
28746
- toggleChat
28808
+ toggleChat,
28809
+ unreadChatMessagesCount,
28810
+ isOnHold
28747
28811
  ]);
28748
28812
  const callControlOptionsFromProps = React.useMemo(() => (Object.assign({}, (typeof props.callControls === 'object' ? props.callControls : {}))), [props.callControls]);
28749
28813
  const injectedCustomButtonsFromProps = React.useMemo(() => {