@azure/communication-react 1.3.2-alpha-202207090012.0 → 1.3.2-alpha-202207140015.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.
@@ -6066,6 +6066,7 @@ export declare interface ScreenShareButtonProps extends ControlBarButtonProps {
6066
6066
  */
6067
6067
  export declare type ScreenShareButtonSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {
6068
6068
  checked?: boolean;
6069
+ disabled?: boolean;
6069
6070
  };
6070
6071
 
6071
6072
  /**
@@ -191,7 +191,7 @@ const fromFlatCommunicationIdentifier = (id) => {
191
191
  // Copyright (c) Microsoft Corporation.
192
192
  // Licensed under the MIT license.
193
193
  // GENERATED FILE. DO NOT EDIT MANUALLY.
194
- var telemetryVersion = '1.3.2-alpha-202207090012.0';
194
+ var telemetryVersion = '1.3.2-alpha-202207140015.0';
195
195
 
196
196
  // Copyright (c) Microsoft Corporation.
197
197
  /**
@@ -473,9 +473,12 @@ const cameraButtonSelector = reselect__namespace.createSelector([getLocalVideoSt
473
473
  *
474
474
  * @public
475
475
  */
476
- const screenShareButtonSelector = reselect__namespace.createSelector([getIsScreenSharingOn], (isScreenSharingOn) => {
476
+ const screenShareButtonSelector = reselect__namespace.createSelector([getIsScreenSharingOn, /* @conditional-compile-remove(PSTN-calls) */ getCallState], (isScreenSharingOn, /* @conditional-compile-remove(PSTN-calls) */ callState) => {
477
+ var _a;
477
478
  return {
478
- checked: isScreenSharingOn
479
+ checked: isScreenSharingOn,
480
+ /* @conditional-compile-remove(PSTN-calls) */
481
+ disabled: callState === 'InLobby' ? true : (_a = callState === 'Connecting') !== null && _a !== void 0 ? _a : false
479
482
  };
480
483
  });
481
484
  /**
@@ -14499,7 +14502,11 @@ const isDisabled$1 = (option) => {
14499
14502
  const ScreenShare = (props) => {
14500
14503
  const screenShareButtonProps = usePropsFor$1(ScreenShareButton);
14501
14504
  const styles = React.useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
14502
- return (React__default['default'].createElement(ScreenShareButton, Object.assign({ "data-ui-id": "call-composite-screenshare-button" }, screenShareButtonProps, { showLabel: props.displayType !== 'compact', disabled: isDisabled(props.option), styles: styles })));
14505
+ const screenShareButtonDisabled = () => {
14506
+ /* @conditional-compile-remove(PSTN-calls) */
14507
+ return (screenShareButtonProps === null || screenShareButtonProps === void 0 ? void 0 : screenShareButtonProps.disabled) ? screenShareButtonProps.disabled : isDisabled(props.option);
14508
+ };
14509
+ return (React__default['default'].createElement(ScreenShareButton, Object.assign({ "data-ui-id": "call-composite-screenshare-button" }, screenShareButtonProps, { showLabel: props.displayType !== 'compact', disabled: screenShareButtonDisabled(), styles: styles })));
14503
14510
  };
14504
14511
  const isDisabled = (option) => {
14505
14512
  if (option === undefined || option === true || option === false) {
@@ -15392,11 +15399,14 @@ const startCallButtonStyleMobile = react.mergeStyles({
15392
15399
  * @private
15393
15400
  */
15394
15401
  const ConfigurationPage = (props) => {
15402
+ var _a;
15395
15403
  const { startCallHandler, mobileView } = props;
15396
15404
  const options = useAdaptedSelector(getSelector$1(DevicesButton));
15397
15405
  const localDeviceSettingsHandlers = useHandlers();
15398
15406
  const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector$1(devicePermissionSelector);
15399
15407
  const errorBarProps = usePropsFor$1(ErrorBar);
15408
+ const adapter = useAdapter();
15409
+ const deviceState = adapter.getState().devices;
15400
15410
  const locale = useLocale();
15401
15411
  const title = (React__default['default'].createElement(react.Stack.Item, { className: mobileView ? titleContainerStyleMobile : titleContainerStyleDesktop }, locale.strings.call.configurationPageTitle));
15402
15412
  const callDescription = locale.strings.call.configurationPageCallDetails && (React__default['default'].createElement(react.Stack.Item, { className: mobileView ? callDetailsStyleMobile : callDetailsStyleDesktop }, locale.strings.call.configurationPageCallDetails));
@@ -15415,7 +15425,7 @@ const ConfigurationPage = (props) => {
15415
15425
  callDescription),
15416
15426
  React__default['default'].createElement(LocalDeviceSettings, Object.assign({}, options, localDeviceSettingsHandlers, { cameraPermissionGranted: cameraPermissionGranted, microphonePermissionGranted: microphonePermissionGranted })))),
15417
15427
  React__default['default'].createElement(react.Stack, { styles: mobileView ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop },
15418
- React__default['default'].createElement(StartCallButton, { className: mobileView ? startCallButtonStyleMobile : undefined, onClick: startCallHandler, disabled: !microphonePermissionGranted }))))));
15428
+ React__default['default'].createElement(StartCallButton, { className: mobileView ? startCallButtonStyleMobile : undefined, onClick: startCallHandler, disabled: !microphonePermissionGranted || ((_a = deviceState.microphones) === null || _a === void 0 ? void 0 : _a.length) === 0 }))))));
15419
15429
  };
15420
15430
 
15421
15431
  // Copyright (c) Microsoft Corporation.