@azure/communication-react 1.10.1-alpha-202311210013 → 1.10.1-alpha-202311230013

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 (17) hide show
  1. package/dist/communication-react.d.ts +64 -54
  2. package/dist/dist-cjs/communication-react/index.js +63 -26
  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/react-components/src/components/VideoEffects/VideoEffectsItem.styles.js +24 -9
  7. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.js.map +1 -1
  8. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +32 -27
  9. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +5 -5
  10. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  11. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +1 -0
  12. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +30 -9
  13. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  14. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +32 -27
  15. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +3 -2
  16. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  17. package/package.json +1 -1
@@ -1546,38 +1546,43 @@ export declare type CallCompositeOptions = {
1546
1546
  layout?: VideoGalleryLayout;
1547
1547
  };
1548
1548
  /**
1549
- * Logo displayed on the configuration page.
1549
+ * Options for setting additional customizations related to personalized branding.
1550
1550
  */
1551
- logo?: {
1551
+ branding?: {
1552
1552
  /**
1553
- * URL for the logo image.
1554
- *
1555
- * @remarks
1556
- * Recommended size is 80x80 pixels.
1553
+ * Logo displayed on the configuration page.
1557
1554
  */
1558
- url: string;
1555
+ logo?: {
1556
+ /**
1557
+ * URL for the logo image.
1558
+ *
1559
+ * @remarks
1560
+ * Recommended size is 80x80 pixels.
1561
+ */
1562
+ url: string;
1563
+ /**
1564
+ * Alt text for the logo image.
1565
+ */
1566
+ alt?: string;
1567
+ /**
1568
+ * The logo can be displayed as a circle or a square.
1569
+ *
1570
+ * @defaultValue 'circle'
1571
+ */
1572
+ shape?: 'circle' | 'square';
1573
+ };
1559
1574
  /**
1560
- * Alt text for the logo image.
1575
+ * Background image displayed on the configuration page.
1561
1576
  */
1562
- alt?: string;
1563
- /**
1564
- * The logo can be displayed as a circle or a square.
1565
- *
1566
- * @defaultValue 'circle'
1567
- */
1568
- shape?: 'circle' | 'square';
1569
- };
1570
- /**
1571
- * Background image displayed on the configuration page.
1572
- */
1573
- backgroundImage?: {
1574
- /**
1575
- * URL for the background image.
1576
- *
1577
- * @remarks
1578
- * Background image should be larger than 576x567 pixels and smaller than 2048x2048 pixels pixels.
1579
- */
1580
- url: string;
1577
+ backgroundImage?: {
1578
+ /**
1579
+ * URL for the background image.
1580
+ *
1581
+ * @remarks
1582
+ * Background image should be larger than 576x567 pixels and smaller than 2048x2048 pixels pixels.
1583
+ */
1584
+ url: string;
1585
+ };
1581
1586
  };
1582
1587
  };
1583
1588
 
@@ -3238,38 +3243,43 @@ export declare type CallWithChatCompositeOptions = {
3238
3243
  layout?: VideoGalleryLayout;
3239
3244
  };
3240
3245
  /**
3241
- * Logo displayed on the configuration page.
3246
+ * Options for setting additional customizations related to personalized branding.
3242
3247
  */
3243
- logo?: {
3248
+ branding?: {
3244
3249
  /**
3245
- * URL for the logo image.
3246
- *
3247
- * @remarks
3248
- * Recommended size is 80x80 pixels.
3250
+ * Logo displayed on the configuration page.
3249
3251
  */
3250
- url: string;
3251
- /**
3252
- * Alt text for the logo image.
3253
- */
3254
- alt?: string;
3255
- /**
3256
- * The logo can be displayed as a circle or a square.
3257
- *
3258
- * @defaultValue 'circle'
3259
- */
3260
- shape?: 'circle' | 'square';
3261
- };
3262
- /**
3263
- * Background image displayed on the configuration page.
3264
- */
3265
- backgroundImage?: {
3252
+ logo?: {
3253
+ /**
3254
+ * URL for the logo image.
3255
+ *
3256
+ * @remarks
3257
+ * Recommended size is 80x80 pixels.
3258
+ */
3259
+ url: string;
3260
+ /**
3261
+ * Alt text for the logo image.
3262
+ */
3263
+ alt?: string;
3264
+ /**
3265
+ * The logo can be displayed as a circle or a square.
3266
+ *
3267
+ * @defaultValue 'circle'
3268
+ */
3269
+ shape?: 'circle' | 'square';
3270
+ };
3266
3271
  /**
3267
- * URL for the background image.
3268
- *
3269
- * @remarks
3270
- * Background image should be larger than 576x567 pixels and smaller than 2048x2048 pixels pixels.
3272
+ * Background image displayed on the configuration page.
3271
3273
  */
3272
- url: string;
3274
+ backgroundImage?: {
3275
+ /**
3276
+ * URL for the background image.
3277
+ *
3278
+ * @remarks
3279
+ * Background image should be larger than 576x567 pixels and smaller than 2048x2048 pixels pixels.
3280
+ */
3281
+ url: string;
3282
+ };
3273
3283
  };
3274
3284
  };
3275
3285
 
@@ -177,7 +177,7 @@ const _isValidIdentifier = (identifier) => {
177
177
  // Copyright (c) Microsoft Corporation.
178
178
  // Licensed under the MIT License.
179
179
  // GENERATED FILE. DO NOT EDIT MANUALLY.
180
- var telemetryVersion = '1.10.1-alpha-202311210013';
180
+ var telemetryVersion = '1.10.1-alpha-202311230013';
181
181
 
182
182
  // Copyright (c) Microsoft Corporation.
183
183
  /**
@@ -17686,6 +17686,8 @@ const _DevicePermissionDropdown = (props) => {
17686
17686
  // Licensed under the MIT License.
17687
17687
  const VideoEffectsItemContainerHeight = '3.375rem';
17688
17688
  const VideoEffectsItemContainerWidth = '4.83rem';
17689
+ const VideoEffectsItemContainerBorderHeight = '3.373rem';
17690
+ const VideoEffectsItemContainerBorderWidth = '4.85rem';
17689
17691
  const VideoEffectsItemContainerBorderSize = '2px';
17690
17692
  /** @private */
17691
17693
  const hiddenVideoEffectsItemContainerStyles = {
@@ -17721,21 +17723,34 @@ const videoEffectsItemContainerStyles = (args) => {
17721
17723
  ':after': {
17722
17724
  content: '""',
17723
17725
  boxSizing: 'border-box',
17724
- height: '100%',
17725
- width: '100%',
17726
- borderRadius: '0.25rem'
17726
+ height: VideoEffectsItemContainerBorderHeight,
17727
+ width: VideoEffectsItemContainerBorderWidth,
17728
+ borderRadius: '0.25rem',
17729
+ transform: 'translate(-1rem, -3.3rem)',
17730
+ display: 'flex'
17727
17731
  },
17728
17732
  ':hover': {
17729
17733
  ':after': {
17730
17734
  border: args.disabled && !args.isSelected
17731
17735
  ? `${borderDefaultThickness} solid ${args.theme.palette.neutralQuaternaryAlt}`
17732
- : `${borderActiveThickness} solid ${args.theme.palette.themePrimary}`
17736
+ : `${borderActiveThickness} solid ${args.theme.palette.themePrimary}`,
17737
+ transform: 'translate(-1rem, -3.3rem)'
17738
+ }
17739
+ },
17740
+ ':focus': {
17741
+ ':after': {
17742
+ outline: 'none',
17743
+ transform: 'translate(-0.1rem, -0.2rem)',
17744
+ ':hover': {
17745
+ transform: 'translate(-0.1rem, -0.2rem)'
17746
+ }
17747
+ }
17748
+ },
17749
+ ':active': {
17750
+ ':after': {
17751
+ outline: 'none',
17752
+ transform: 'translate(-1rem, -3.3rem)'
17733
17753
  }
17734
- }
17735
- },
17736
- rootFocused: {
17737
- ':after': {
17738
- outline: `2px solid ${args.theme.palette.neutralQuaternaryAlt}`
17739
17754
  }
17740
17755
  }
17741
17756
  };
@@ -29757,7 +29772,7 @@ const isShowing = (overrideSidePane) => {
29757
29772
  return !!(overrideSidePane === null || overrideSidePane === void 0 ? void 0 : overrideSidePane.isActive);
29758
29773
  };
29759
29774
  const MainScreen = (props) => {
29760
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
29775
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
29761
29776
  const adapter = useAdapter();
29762
29777
  const { camerasCount, microphonesCount } = useSelector$1(deviceCountSelector);
29763
29778
  const hasCameras = camerasCount > 0;
@@ -29840,9 +29855,9 @@ const MainScreen = (props) => {
29840
29855
  /* @conditional-compile-remove(capabilities) */
29841
29856
  capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps,
29842
29857
  /* @conditional-compile-remove(custom-branding) */
29843
- logo: (_g = props.options) === null || _g === void 0 ? void 0 : _g.logo,
29858
+ logo: (_h = (_g = props.options) === null || _g === void 0 ? void 0 : _g.branding) === null || _h === void 0 ? void 0 : _h.logo,
29844
29859
  /* @conditional-compile-remove(custom-branding) */
29845
- backgroundImage: (_h = props.options) === null || _h === void 0 ? void 0 : _h.backgroundImage }));
29860
+ backgroundImage: (_k = (_j = props.options) === null || _j === void 0 ? void 0 : _j.branding) === null || _k === void 0 ? void 0 : _k.backgroundImage }));
29846
29861
  break;
29847
29862
  case 'accessDeniedTeamsMeeting':
29848
29863
  pageElement = (React__default["default"].createElement(NoticePage, { iconName: "NoticePageAccessDeniedTeamsMeeting", title: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle, moreDetails: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails, dataUiId: 'access-denied-teams-meeting-page' }));
@@ -29854,7 +29869,7 @@ const MainScreen = (props) => {
29854
29869
  pageElement = (React__default["default"].createElement(NoticePage, { iconName: "NoticePageJoinCallFailedDueToNoNetwork", title: locale.strings.call.failedToJoinCallDueToNoNetworkTitle, moreDetails: locale.strings.call.failedToJoinCallDueToNoNetworkMoreDetails, dataUiId: 'join-call-failed-due-to-no-network-page' }));
29855
29870
  break;
29856
29871
  case 'leaving':
29857
- pageElement = (React__default["default"].createElement(NoticePage, { title: (_j = locale.strings.call.leavingCallTitle) !== null && _j !== void 0 ? _j : 'Leaving...', dataUiId: 'leaving-page', pageStyle: leavePageStyle, disableStartCallButton: true }));
29872
+ pageElement = (React__default["default"].createElement(NoticePage, { title: (_l = locale.strings.call.leavingCallTitle) !== null && _l !== void 0 ? _l : 'Leaving...', dataUiId: 'leaving-page', pageStyle: leavePageStyle, disableStartCallButton: true }));
29858
29873
  break;
29859
29874
  case 'leftCall': {
29860
29875
  const { title, moreDetails, disableStartCallButton, iconName } = getEndedCallPageProps(locale, endedCall);
@@ -29897,7 +29912,7 @@ const MainScreen = (props) => {
29897
29912
  case 'unsupportedEnvironment':
29898
29913
  pageElement = (React__default["default"].createElement(React__default["default"].Fragment, null,
29899
29914
  /* @conditional-compile-remove(unsupported-browser) */
29900
- React__default["default"].createElement(UnsupportedBrowserPage, { onTroubleshootingClick: (_k = props.options) === null || _k === void 0 ? void 0 : _k.onEnvironmentInfoTroubleshootingClick, environmentInfo: adapter.getState().environmentInfo })));
29915
+ React__default["default"].createElement(UnsupportedBrowserPage, { onTroubleshootingClick: (_m = props.options) === null || _m === void 0 ? void 0 : _m.onEnvironmentInfoTroubleshootingClick, environmentInfo: adapter.getState().environmentInfo })));
29901
29916
  break;
29902
29917
  }
29903
29918
  if (!pageElement) {
@@ -30932,7 +30947,12 @@ class AzureCommunicationCallAdapter {
30932
30947
  var _a;
30933
30948
  return __awaiter$5(this, void 0, void 0, function* () {
30934
30949
  if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold') {
30935
- this.handlers.onToggleHold();
30950
+ this.handlers.onToggleHold().then(() => {
30951
+ var _a;
30952
+ if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(communicationCalling.Features.Capabilities).capabilities.turnVideoOn.isPresent) === false) {
30953
+ this.stopCamera();
30954
+ }
30955
+ });
30936
30956
  }
30937
30957
  });
30938
30958
  }
@@ -31003,7 +31023,7 @@ class AzureCommunicationCallAdapter {
31003
31023
  }
31004
31024
  }
31005
31025
  subscribeCallEvents() {
31006
- var _a, _b, _c, _d, _e, _f, _g;
31026
+ var _a, _b, _c, _d, _e, _f, _g, _h;
31007
31027
  /* @conditional-compile-remove(calling-sounds) */
31008
31028
  if (this.call) {
31009
31029
  this.callingSoundSubscriber = new CallingSoundSubscriber(this.call, this.locator, this.getState().sounds);
@@ -31014,13 +31034,15 @@ class AzureCommunicationCallAdapter {
31014
31034
  (_d = this.call) === null || _d === void 0 ? void 0 : _d.on('idChanged', this.callIdChanged.bind(this));
31015
31035
  /* @conditional-compile-remove(close-captions) */
31016
31036
  (_e = this.call) === null || _e === void 0 ? void 0 : _e.on('stateChanged', this.subscribeToCaptionEvents.bind(this));
31037
+ /* @conditional-compile-remove(rooms) */
31038
+ (_f = this.call) === null || _f === void 0 ? void 0 : _f.on('roleChanged', this.roleChanged.bind(this));
31017
31039
  /* @conditional-compile-remove(call-transfer) */
31018
- (_f = this.call) === null || _f === void 0 ? void 0 : _f.feature(communicationCalling.Features.Transfer).on('transferRequested', this.transferRequested.bind(this));
31040
+ (_g = this.call) === null || _g === void 0 ? void 0 : _g.feature(communicationCalling.Features.Transfer).on('transferRequested', this.transferRequested.bind(this));
31019
31041
  /* @conditional-compile-remove(capabilities) */
31020
- (_g = this.call) === null || _g === void 0 ? void 0 : _g.feature(communicationCalling.Features.Capabilities).on('capabilitiesChanged', this.capabilitiesChanged.bind(this));
31042
+ (_h = this.call) === null || _h === void 0 ? void 0 : _h.feature(communicationCalling.Features.Capabilities).on('capabilitiesChanged', this.capabilitiesChanged.bind(this));
31021
31043
  }
31022
31044
  unsubscribeCallEvents() {
31023
- var _a, _b, _c, _d;
31045
+ var _a, _b, _c, _d, _e;
31024
31046
  for (const subscriber of this.participantSubscribers.values()) {
31025
31047
  subscriber.unsubscribeAll();
31026
31048
  }
@@ -31029,6 +31051,8 @@ class AzureCommunicationCallAdapter {
31029
31051
  (_b = this.call) === null || _b === void 0 ? void 0 : _b.off('isMutedChanged', this.isMyMutedChanged.bind(this));
31030
31052
  (_c = this.call) === null || _c === void 0 ? void 0 : _c.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));
31031
31053
  (_d = this.call) === null || _d === void 0 ? void 0 : _d.off('idChanged', this.callIdChanged.bind(this));
31054
+ /* @conditional-compile-remove(rooms) */
31055
+ (_e = this.call) === null || _e === void 0 ? void 0 : _e.off('roleChanged', this.roleChanged.bind(this));
31032
31056
  /* @conditional-compile-remove(close-captions) */
31033
31057
  this.unsubscribeFromCaptionEvents();
31034
31058
  /* @conditional-compile-remove(calling-sounds) */
@@ -31102,18 +31126,30 @@ class AzureCommunicationCallAdapter {
31102
31126
  }
31103
31127
  /* @conditional-compile-remove(capabilities) */
31104
31128
  capabilitiesChanged(data) {
31105
- var _a, _b, _c;
31129
+ var _a, _b, _c, _d, _e;
31106
31130
  if (((_a = data.newValue.turnVideoOn) === null || _a === void 0 ? void 0 : _a.isPresent) === false) {
31107
- this.stopCamera();
31131
+ // Only stop camera when the call state is not on hold. The Calling SDK does not allow us to stop camera when
31132
+ // the call state is on hold.
31133
+ if (((_b = this.call) === null || _b === void 0 ? void 0 : _b.state) !== 'LocalHold' && ((_c = this.call) === null || _c === void 0 ? void 0 : _c.state) !== 'RemoteHold') {
31134
+ this.stopCamera();
31135
+ }
31136
+ this.disposeLocalVideoStreamView();
31108
31137
  }
31109
- if (((_b = data.newValue.unmuteMic) === null || _b === void 0 ? void 0 : _b.isPresent) === false) {
31138
+ if (((_d = data.newValue.unmuteMic) === null || _d === void 0 ? void 0 : _d.isPresent) === false) {
31110
31139
  this.mute();
31111
31140
  }
31112
- if (((_c = data.newValue.shareScreen) === null || _c === void 0 ? void 0 : _c.isPresent) === false) {
31141
+ if (((_e = data.newValue.shareScreen) === null || _e === void 0 ? void 0 : _e.isPresent) === false) {
31113
31142
  this.stopScreenShare();
31114
31143
  }
31115
31144
  this.emitter.emit('capabilitiesChanged', data);
31116
31145
  }
31146
+ /* @conditional-compile-remove(rooms) */
31147
+ roleChanged() {
31148
+ var _a, _b;
31149
+ if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.role) === 'Consumer') {
31150
+ (_b = this.call) === null || _b === void 0 ? void 0 : _b.feature(communicationCalling.Features.RaiseHand).lowerHand();
31151
+ }
31152
+ }
31117
31153
  callIdChanged() {
31118
31154
  var _a;
31119
31155
  ((_a = this.call) === null || _a === void 0 ? void 0 : _a.id) && this.emitter.emit('callIdChanged', { callId: this.call.id });
@@ -32117,6 +32153,7 @@ const CallWithChatScreen = (props) => {
32117
32153
  * @public
32118
32154
  */
32119
32155
  const CallWithChatComposite = (props) => {
32156
+ var _a, _b;
32120
32157
  const { adapter, fluentTheme, rtl, formFactor, joinInvitationURL, options } = props;
32121
32158
  return (React__default["default"].createElement(BaseProvider, { fluentTheme: fluentTheme, rtl: rtl, locale: props.locale, icons: props.icons },
32122
32159
  React__default["default"].createElement(CallWithChatScreen, Object.assign({}, props, {
@@ -32131,9 +32168,9 @@ const CallWithChatComposite = (props) => {
32131
32168
  /* @conditional-compile-remove(gallery-layouts) */
32132
32169
  galleryOptions: options === null || options === void 0 ? void 0 : options.galleryOptions,
32133
32170
  /* @conditional-compile-remove(custom-branding) */
32134
- logo: options === null || options === void 0 ? void 0 : options.logo,
32171
+ logo: (_a = options === null || options === void 0 ? void 0 : options.branding) === null || _a === void 0 ? void 0 : _a.logo,
32135
32172
  /* @conditional-compile-remove(custom-branding) */
32136
- backgroundImage: options === null || options === void 0 ? void 0 : options.backgroundImage }))));
32173
+ backgroundImage: (_b = options === null || options === void 0 ? void 0 : options.branding) === null || _b === void 0 ? void 0 : _b.backgroundImage }))));
32137
32174
  };
32138
32175
  const hasJoinedCallFn = (page, callStatus) => {
32139
32176
  /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */