@azure/communication-react 1.11.1-alpha-202401170012 → 1.11.1-alpha-202401180013

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.
@@ -170,7 +170,7 @@ function getDefaultExportFromCjs (x) {
170
170
  // Copyright (c) Microsoft Corporation.
171
171
  // Licensed under the MIT License.
172
172
  // GENERATED FILE. DO NOT EDIT MANUALLY.
173
- var telemetryVersion = '1.11.1-alpha-202401170012';
173
+ var telemetryVersion = '1.11.1-alpha-202401180013';
174
174
 
175
175
 
176
176
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -382,7 +382,7 @@ const isHideAttendeeNamesEnabled = (state, props) => {
382
382
  /**
383
383
  * @private
384
384
  */
385
- const getCapabilites = (state, props) => { var _a, _b; return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities; };
385
+ const getCapabilites$1 = (state, props) => { var _a, _b; return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities; };
386
386
  /**
387
387
  * @private
388
388
  */
@@ -638,7 +638,7 @@ const microphoneButtonSelector = reselect__namespace.createSelector([
638
638
  getCallExists,
639
639
  getIsMuted,
640
640
  getDeviceManager$1,
641
- /* @conditional-compile-remove(capabilities) */ getCapabilites,
641
+ /* @conditional-compile-remove(capabilities) */ getCapabilites$1,
642
642
  /* @conditional-compile-remove(capabilities) */ getRole$1
643
643
  ], (callExists, isMuted, deviceManager,
644
644
  /* @conditional-compile-remove(capabilities) */ capabilities,
@@ -664,7 +664,7 @@ const microphoneButtonSelector = reselect__namespace.createSelector([
664
664
  const cameraButtonSelector = reselect__namespace.createSelector([
665
665
  getLocalVideoStreams$1,
666
666
  getDeviceManager$1,
667
- /* @conditional-compile-remove(capabilities) */ getCapabilites,
667
+ /* @conditional-compile-remove(capabilities) */ getCapabilites$1,
668
668
  /* @conditional-compile-remove(capabilities) */ getRole$1
669
669
  ], (localVideoStreams, deviceManager,
670
670
  /* @conditional-compile-remove(capabilities) */ capabilities,
@@ -718,7 +718,7 @@ const reactionButtonSelector = reselect__namespace.createSelector([getLocalParti
718
718
  const screenShareButtonSelector = reselect__namespace.createSelector([
719
719
  getIsScreenSharingOn,
720
720
  /* @conditional-compile-remove(PSTN-calls) */ getCallState,
721
- /* @conditional-compile-remove(capabilities) */ getCapabilites,
721
+ /* @conditional-compile-remove(capabilities) */ getCapabilites$1,
722
722
  /* @conditional-compile-remove(capabilities) */ getRole$1
723
723
  ], (isScreenSharingOn,
724
724
  /* @conditional-compile-remove(PSTN-calls) */ callState,
@@ -25521,6 +25521,10 @@ const getIsScreenShareOn = (state) => { var _a, _b; return (_b = (_a = state.cal
25521
25521
  * @private
25522
25522
  */
25523
25523
  const getLocalParticipantRaisedHand = (state) => { var _a; return (_a = state.call) === null || _a === void 0 ? void 0 : _a.raiseHand.localParticipantRaisedHand; };
25524
+ /**
25525
+ * @private
25526
+ */
25527
+ const getCapabilites = (state) => { var _a, _b; return (_b = (_a = state.call) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities; };
25524
25528
  /**
25525
25529
  * @private
25526
25530
  */
@@ -26038,6 +26042,17 @@ const isDisabled = (option) => {
26038
26042
  return option.disabled;
26039
26043
  };
26040
26044
 
26045
+ // Copyright (c) Microsoft Corporation.
26046
+ // Licensed under the MIT License.
26047
+ /**
26048
+ * @private
26049
+ */
26050
+ const capabilitySelector = reselect__namespace.createSelector([getCapabilites], (capabilities) => {
26051
+ return {
26052
+ capabilities
26053
+ };
26054
+ });
26055
+
26041
26056
  // Copyright (c) Microsoft Corporation.
26042
26057
  // Licensed under the MIT License.
26043
26058
  // Enforce a background color on control bar to ensure it matches the composite background color.
@@ -26084,6 +26099,10 @@ const CallControls = (props) => {
26084
26099
  const holdButtonProps = usePropsFor$1(HoldButton);
26085
26100
  /* @conditional-compile-remove(raise-hand) */
26086
26101
  const raiseHandButtonProps = usePropsFor$1(RaiseHandButton);
26102
+ /* @conditional-compile-remove(reaction) */
26103
+ const capabilitiesSelector = useSelector$1(capabilitySelector);
26104
+ /* @conditional-compile-remove(reaction) */
26105
+ const isReactionAllowed = !(capabilitiesSelector === null || capabilitiesSelector === void 0 ? void 0 : capabilitiesSelector.capabilities) || capabilitiesSelector.capabilities.useReactions.isPresent;
26087
26106
  /* @conditional-compile-remove(PSTN-calls) */
26088
26107
  const alternateCallerId = useAdapter().getState().alternateCallerId;
26089
26108
  const devicesButtonProps = usePropsFor$1(DevicesButton);
@@ -26110,7 +26129,7 @@ const CallControls = (props) => {
26110
26129
  numberOfButtons++;
26111
26130
  }
26112
26131
  /* @conditional-compile-remove(reaction) */
26113
- const showReactionButtonInControlBar = isEnabled$2(options === null || options === void 0 ? void 0 : options.reactionButton) && !props.isMobile;
26132
+ const showReactionButtonInControlBar = isEnabled$2(options === null || options === void 0 ? void 0 : options.reactionButton) && isReactionAllowed && !props.isMobile;
26114
26133
  /* @conditional-compile-remove(reaction) */
26115
26134
  if (showReactionButtonInControlBar) {
26116
26135
  numberOfButtons++;
@@ -26799,6 +26818,10 @@ const CommonCallControlBar = (props) => {
26799
26818
  // only center control bar buttons based on parent container if there are enough space on the screen and not mobile
26800
26819
  const controlBarDesktopContainerStyles = React.useMemo(() => (!props.mobileView && !isOutOfSpace ? { position: 'relative', minHeight: '4.5rem', width: '100%' } : {}), [props.mobileView, isOutOfSpace]);
26801
26820
  const customButtons = React.useMemo(() => generateCustomCallControlBarButton(onFetchCustomButtonPropsTrampoline(options !== false ? options : undefined), options !== false ? options === null || options === void 0 ? void 0 : options.displayType : undefined), [options]);
26821
+ /* @conditional-compile-remove(reaction) */
26822
+ const capabilitiesSelector = useSelector$1(capabilitySelector);
26823
+ /* @conditional-compile-remove(reaction) */
26824
+ const isReactionAllowed = !(capabilitiesSelector === null || capabilitiesSelector === void 0 ? void 0 : capabilitiesSelector.capabilities) || capabilitiesSelector.capabilities.useReactions.isPresent;
26802
26825
  // when options is false then we want to hide the whole control bar.
26803
26826
  if (options === false) {
26804
26827
  return React.createElement(React.Fragment, null);
@@ -26836,7 +26859,7 @@ const CommonCallControlBar = (props) => {
26836
26859
  /* @conditional-compile-remove(video-background-effects) */
26837
26860
  onClickVideoEffects: props.onClickVideoEffects, componentRef: props.cameraButtonRef, disableTooltip: props.mobileView })),
26838
26861
  /* @conditional-compile-remove(reaction) */
26839
- !props.mobileView && isEnabled$1(options.reactionButton) && (React.createElement(Reaction, { displayType: options.displayType, styles: commonButtonStyles, disabled: props.disableButtonsForHoldScreen })),
26862
+ !props.mobileView && isReactionAllowed && isEnabled$1(options.reactionButton) && (React.createElement(Reaction, { displayType: options.displayType, styles: commonButtonStyles, disabled: props.disableButtonsForHoldScreen })),
26840
26863
  /* @conditional-compile-remove(raise-hand) */ !props.mobileView &&
26841
26864
  isEnabled$1(options.raiseHandButton) &&
26842
26865
  /* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall && (React.createElement(RaiseHand, { displayType: options.displayType, styles: commonButtonStyles,