@azure/communication-react 1.3.3-alpha-202210080019.0 → 1.3.3-alpha-202210140021.0

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 (32) hide show
  1. package/dist/communication-react.d.ts +1 -1
  2. package/dist/dist-cjs/communication-react/index.js +46 -19
  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/calling-component-bindings/src/handlers/createHandlers.d.ts +1 -1
  7. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -1
  8. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  9. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +3 -2
  10. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  11. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +1 -1
  12. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +2 -2
  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/CallComposite/components/CallArrangement.js +8 -2
  15. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  16. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +12 -3
  17. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  18. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +2 -2
  19. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  20. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +6 -1
  21. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  22. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +4 -3
  23. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  24. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -1
  25. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -2
  26. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  27. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -1
  28. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +1 -1
  29. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +5 -0
  31. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +1 -1
  32. package/package.json +8 -8
@@ -1667,7 +1667,7 @@ export declare type CallingHandlers = {
1667
1667
  onStartScreenShare: () => Promise<void>;
1668
1668
  onStopScreenShare: () => Promise<void>;
1669
1669
  onToggleScreenShare: () => Promise<void>;
1670
- onHangUp: () => Promise<void>;
1670
+ onHangUp: (forEveryone?: boolean) => Promise<void>;
1671
1671
  onToggleHold: () => Promise<void>;
1672
1672
  onAddParticipant(participant: CommunicationUserIdentifier): Promise<void>;
1673
1673
  onAddParticipant(participant: PhoneNumberIdentifier, options: AddPhoneNumberOptions): Promise<void>;
@@ -202,7 +202,7 @@ const _toCommunicationIdentifier = (id) => {
202
202
  // Copyright (c) Microsoft Corporation.
203
203
  // Licensed under the MIT license.
204
204
  // GENERATED FILE. DO NOT EDIT MANUALLY.
205
- var telemetryVersion = '1.3.3-alpha-202210080019.0';
205
+ var telemetryVersion = '1.3.3-alpha-202210140021.0';
206
206
 
207
207
  // Copyright (c) Microsoft Corporation.
208
208
  /**
@@ -676,7 +676,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
676
676
  const onStartScreenShare = () => __awaiter$v(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
677
677
  const onStopScreenShare = () => __awaiter$v(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
678
678
  const onToggleScreenShare = () => __awaiter$v(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
679
- const onHangUp = () => __awaiter$v(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp()); });
679
+ const onHangUp = (forEveryone) => __awaiter$v(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
680
680
  /* @conditional-compile-remove(PSTN-calls) */
681
681
  const onToggleHold = () => __awaiter$v(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.state) === 'LocalHold' ? yield (call === null || call === void 0 ? void 0 : call.resume()) : yield (call === null || call === void 0 ? void 0 : call.hold()); });
682
682
  const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$v(void 0, void 0, void 0, function* () {
@@ -5155,6 +5155,7 @@ const _RemoteVideoTile = React__default['default'].memo((props) => {
5155
5155
  ]);
5156
5156
  // Handle creating, destroying and updating the video stream as necessary
5157
5157
  useRemoteVideoStreamLifecycleMaintainer(remoteVideoStreamProps);
5158
+ const showLoadingIndicator = isAvailable && isReceiving === false && props.participantState !== 'Disconnected';
5158
5159
  const renderVideoStreamElement = React.useMemo(() => {
5159
5160
  // Checking if renderElement is well defined or not as calling SDK has a number of video streams limitation which
5160
5161
  // implies that, after their threshold, all streams have no child (blank video)
@@ -5162,8 +5163,8 @@ const _RemoteVideoTile = React__default['default'].memo((props) => {
5162
5163
  // Returning `undefined` results in the placeholder with avatar being shown
5163
5164
  return undefined;
5164
5165
  }
5165
- return (React__default['default'].createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: isReceiving === false ? 'loading' : 'none' }));
5166
- }, [renderElement, isReceiving]);
5166
+ return (React__default['default'].createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: showLoadingIndicator ? 'loading' : 'none' }));
5167
+ }, [renderElement, showLoadingIndicator]);
5167
5168
  return (React__default['default'].createElement(VideoTile, { key: userId, userId: userId, renderElement: renderVideoStreamElement, displayName: displayName, onRenderPlaceholder: onRenderAvatar, isMuted: isMuted, isSpeaking: isSpeaking, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize, showLabel: props.showLabel,
5168
5169
  /* @conditional-compile-remove(one-to-n-calling) */
5169
5170
  /* @conditional-compile-remove(PSTN-calls) */
@@ -15028,8 +15029,8 @@ const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
15028
15029
  onCreateRemoteStreamView: (userId, options) => __awaiter$a(void 0, void 0, void 0, function* () {
15029
15030
  return yield adapter.createStreamView(userId, options);
15030
15031
  }),
15031
- onHangUp: () => __awaiter$a(void 0, void 0, void 0, function* () {
15032
- yield adapter.leaveCall();
15032
+ onHangUp: (forEveryone) => __awaiter$a(void 0, void 0, void 0, function* () {
15033
+ yield adapter.leaveCall(forEveryone);
15033
15034
  }),
15034
15035
  /* @conditional-compile-remove(PSTN-calls) */
15035
15036
  onToggleHold: () => __awaiter$a(void 0, void 0, void 0, function* () {
@@ -15247,13 +15248,22 @@ const onFetchCustomButtonPropsTrampoline$1 = (options) => {
15247
15248
  /** @private */
15248
15249
  const Devices = (props) => {
15249
15250
  const devicesButtonProps = usePropsFor$1(DevicesButton);
15251
+ /* @conditional-compile-remove(rooms) */
15252
+ const permissions = _usePermissions();
15253
+ const augmentedDeviceButtonProps = React.useMemo(() => (Object.assign(Object.assign({}, devicesButtonProps), {
15254
+ /* @conditional-compile-remove(rooms) */
15255
+ microphones: !permissions.microphoneButton ? [] : devicesButtonProps.microphones,
15256
+ /* @conditional-compile-remove(rooms) */
15257
+ cameras: !permissions.cameraButton ? [] : devicesButtonProps.cameras })), [
15258
+ devicesButtonProps,
15259
+ /* @conditional-compile-remove(rooms) */
15260
+ permissions
15261
+ ]);
15250
15262
  const styles = React.useMemo(() => {
15251
15263
  var _a;
15252
15264
  return concatButtonBaseStyles(props.increaseFlyoutItemSize ? devicesButtonWithIncreasedTouchTargets : {}, (_a = props.styles) !== null && _a !== void 0 ? _a : {});
15253
15265
  }, [props.increaseFlyoutItemSize, props.styles]);
15254
15266
  /* @conditional-compile-remove(rooms) */
15255
- const permissions = _usePermissions();
15256
- /* @conditional-compile-remove(rooms) */
15257
15267
  const locale = useLocale();
15258
15268
  /* @conditional-compile-remove(rooms) */
15259
15269
  const onlyManageSpeakers = !permissions.microphoneButton && !permissions.cameraButton;
@@ -15265,7 +15275,7 @@ const Devices = (props) => {
15265
15275
  /* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
15266
15276
  , Object.assign({
15267
15277
  /* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
15268
- persistMenu: true }, devicesButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, "data-ui-id": "calling-composite-devices-button", disabled: props.disabled,
15278
+ persistMenu: true }, augmentedDeviceButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, "data-ui-id": "calling-composite-devices-button", disabled: props.disabled,
15269
15279
  /* @conditional-compile-remove(rooms) */
15270
15280
  strings: getLabelFromPermissions(permissions, locale),
15271
15281
  /* @conditional-compile-remove(rooms) */
@@ -16230,6 +16240,11 @@ const themedDialpadStyle = (isMobile, theme) => ({
16230
16240
  }
16231
16241
  }
16232
16242
  },
16243
+ deleteIcon: {
16244
+ root: {
16245
+ backgroundColor: theme.palette.white
16246
+ }
16247
+ },
16233
16248
  digit: {
16234
16249
  color: theme.palette.themeDarkAlt
16235
16250
  }
@@ -16818,14 +16833,20 @@ const CallArrangement = (props) => {
16818
16833
  let canUnmute = true;
16819
16834
  /* @conditional-compile-remove(rooms) */
16820
16835
  canUnmute = rolePermissions.microphoneButton;
16836
+ let errorBarProps = props.errorBarProps;
16837
+ /* @conditional-compile-remove(rooms) */
16838
+ // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK
16839
+ if (!rolePermissions.cameraButton && props.errorBarProps) {
16840
+ errorBarProps = Object.assign(Object.assign({}, props.errorBarProps), { activeErrorMessages: props.errorBarProps.activeErrorMessages.filter((e) => e.type !== 'callCameraAccessDenied') });
16841
+ }
16821
16842
  return (React__default['default'].createElement("div", { ref: containerRef, className: react.mergeStyles(containerDivStyles) },
16822
16843
  React__default['default'].createElement(react.Stack, { verticalFill: true, horizontalAlign: "stretch", className: containerClassName, "data-ui-id": props.dataUiId },
16823
16844
  React__default['default'].createElement(react.Stack, { horizontal: true, grow: true },
16824
16845
  React__default['default'].createElement(react.Stack.Item, { styles: notificationsContainerStyles },
16825
16846
  React__default['default'].createElement(react.Stack, { styles: bannerNotificationStyles },
16826
16847
  React__default['default'].createElement(_ComplianceBanner, Object.assign({}, props.complianceBannerProps))),
16827
- props.errorBarProps !== false && (React__default['default'].createElement(react.Stack, { styles: bannerNotificationStyles },
16828
- React__default['default'].createElement(ErrorBar, Object.assign({}, props.errorBarProps)))),
16848
+ errorBarProps !== false && (React__default['default'].createElement(react.Stack, { styles: bannerNotificationStyles },
16849
+ React__default['default'].createElement(ErrorBar, Object.assign({}, errorBarProps)))),
16829
16850
  canUnmute && !!props.mutedNotificationProps && React__default['default'].createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps))),
16830
16851
  React__default['default'].createElement(react.Stack.Item, { grow: true, style: callCompositeContainerFlex() },
16831
16852
  React__default['default'].createElement(react.Stack.Item, { styles: callGalleryStyles, grow: true }, props.onRenderGalleryContent && (React__default['default'].createElement(react.Stack, { verticalFill: true, styles: mediaGalleryContainerStyles }, props.onRenderGalleryContent())))),
@@ -17609,13 +17630,18 @@ const ConfigurationPage = (props) => {
17609
17630
  const options = useAdaptedSelector(getSelector$1(DevicesButton));
17610
17631
  const localDeviceSettingsHandlers = useHandlers();
17611
17632
  const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector$1(devicePermissionSelector);
17612
- const errorBarProps = usePropsFor$1(ErrorBar);
17633
+ let errorBarProps = usePropsFor$1(ErrorBar);
17613
17634
  const adapter = useAdapter();
17614
17635
  const deviceState = adapter.getState().devices;
17615
17636
  let disableStartCallButton = !microphonePermissionGranted || ((_a = deviceState.microphones) === null || _a === void 0 ? void 0 : _a.length) === 0;
17616
17637
  /* @conditional-compile-remove(rooms) */
17617
17638
  const rolePermissions = _usePermissions();
17618
17639
  /* @conditional-compile-remove(rooms) */
17640
+ // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK
17641
+ if (!rolePermissions.cameraButton) {
17642
+ errorBarProps = Object.assign(Object.assign({}, errorBarProps), { activeErrorMessages: errorBarProps.activeErrorMessages.filter((e) => e.type !== 'callCameraAccessDenied') });
17643
+ }
17644
+ /* @conditional-compile-remove(rooms) */
17619
17645
  if (!rolePermissions.microphoneButton) {
17620
17646
  // If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button
17621
17647
  // because microphone device permission is not needed for the user's role
@@ -18515,9 +18541,9 @@ class AzureCommunicationCallAdapter {
18515
18541
  }
18516
18542
  });
18517
18543
  }
18518
- leaveCall() {
18544
+ leaveCall(forEveryone) {
18519
18545
  return __awaiter$4(this, void 0, void 0, function* () {
18520
- yield this.handlers.onHangUp();
18546
+ yield this.handlers.onHangUp(forEveryone);
18521
18547
  this.unsubscribeCallEvents();
18522
18548
  this.call = undefined;
18523
18549
  this.handlers = createDefaultCallingHandlers(this.callClient, this.callAgent, this.deviceManager, undefined);
@@ -19430,7 +19456,7 @@ class CallWithChatBackedCallAdapter {
19430
19456
  this.joinCall = (microphoneOn) => {
19431
19457
  return this.callWithChatAdapter.joinCall(microphoneOn);
19432
19458
  };
19433
- this.leaveCall = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(); });
19459
+ this.leaveCall = (forEveryone) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(forEveryone); });
19434
19460
  this.startCall = (participants, options) => {
19435
19461
  let communicationParticipants = participants;
19436
19462
  /* @conditional-compile-remove(PSTN-calls) */
@@ -20027,8 +20053,9 @@ const CallWithChatComposite = (props) => {
20027
20053
  };
20028
20054
  const hasJoinedCallFn = (page, callStatus) => {
20029
20055
  /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */
20030
- return ((page === 'call' && (callStatus === 'Connected' || callStatus === 'RemoteHold')) ||
20031
- (page === 'hold' && callStatus === 'LocalHold'));
20056
+ return ((page === 'call' &&
20057
+ (callStatus === 'Connected' || callStatus === 'RemoteHold' || callStatus === 'Disconnecting')) ||
20058
+ (page === 'hold' && (callStatus === 'LocalHold' || callStatus === 'Disconnecting')));
20032
20059
  };
20033
20060
  const showShowChatTabHeaderButton = (callControls) => {
20034
20061
  if (callControls === undefined || callControls === true) {
@@ -20260,10 +20287,10 @@ class AzureCommunicationCallWithChatAdapter {
20260
20287
  return this.callAdapter.joinCall(microphoneOn);
20261
20288
  }
20262
20289
  /** Leave current Call. */
20263
- leaveCall() {
20290
+ leaveCall(forEveryone) {
20264
20291
  return __awaiter(this, void 0, void 0, function* () {
20265
20292
  // Only remove self from the GroupCall. Contoso must manage access to Chat.
20266
- yield this.callAdapter.leaveCall();
20293
+ yield this.callAdapter.leaveCall(forEveryone);
20267
20294
  });
20268
20295
  }
20269
20296
  /** Start a new Call. */