@azure/communication-react 1.3.3-alpha-202209110016.0 → 1.3.3-alpha-202209140018.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.
- package/dist/dist-cjs/communication-react/index.js +57 -39
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.js +1 -7
- package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.js +1 -11
- package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +1 -5
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.js +3 -8
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +16 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +5 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +18 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +17 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/package.json +8 -8
@@ -192,7 +192,7 @@ const fromFlatCommunicationIdentifier = (id) => {
|
|
192
192
|
// Copyright (c) Microsoft Corporation.
|
193
193
|
// Licensed under the MIT license.
|
194
194
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
195
|
-
var telemetryVersion = '1.3.3-alpha-
|
195
|
+
var telemetryVersion = '1.3.3-alpha-202209140018.0';
|
196
196
|
|
197
197
|
// Copyright (c) Microsoft Corporation.
|
198
198
|
/**
|
@@ -6736,15 +6736,7 @@ const DevicesButton = (props) => {
|
|
6736
6736
|
const { onRenderIcon } = props;
|
6737
6737
|
const localeStrings = useLocale$1().strings.devicesButton;
|
6738
6738
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
6739
|
-
|
6740
|
-
const isSelectMicAllowed = _usePermissions().microphoneButton;
|
6741
|
-
/* @conditional-compile-remove(rooms) */
|
6742
|
-
const isSelectCamAllowed = _usePermissions().cameraButton;
|
6743
|
-
const devicesButtonMenu = (_a = props.menuProps) !== null && _a !== void 0 ? _a : generateDefaultDeviceMenuProps(Object.assign(Object.assign({}, props), { styles: (_b = props.styles) === null || _b === void 0 ? void 0 : _b.menuStyles }), strings,
|
6744
|
-
/* @conditional-compile-remove(rooms) */
|
6745
|
-
isSelectCamAllowed,
|
6746
|
-
/* @conditional-compile-remove(rooms) */
|
6747
|
-
isSelectMicAllowed);
|
6739
|
+
const devicesButtonMenu = (_a = props.menuProps) !== null && _a !== void 0 ? _a : generateDefaultDeviceMenuProps(Object.assign(Object.assign({}, props), { styles: (_b = props.styles) === null || _b === void 0 ? void 0 : _b.menuStyles }), strings);
|
6748
6740
|
const onRenderOptionsIcon = () => (React__default['default'].createElement(HighContrastAwareIcon, { disabled: props.disabled, iconName: "ControlButtonOptions" }));
|
6749
6741
|
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { menuProps: devicesButtonMenu, menuIconProps: { hidden: true }, onRenderIcon: onRenderIcon !== null && onRenderIcon !== void 0 ? onRenderIcon : onRenderOptionsIcon, strings: strings, labelKey: (_c = props.labelKey) !== null && _c !== void 0 ? _c : 'devicesButtonLabel' })));
|
6750
6742
|
};
|
@@ -6778,11 +6770,7 @@ const CameraButton = (props) => {
|
|
6778
6770
|
const localeStrings = useLocale$1().strings.cameraButton;
|
6779
6771
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
6780
6772
|
const [announcerString, setAnnouncerString] = React.useState(undefined);
|
6781
|
-
|
6782
|
-
/* @conditional-compile-remove(rooms) */
|
6783
|
-
const permissions = _usePermissions();
|
6784
|
-
/* @conditional-compile-remove(rooms) */
|
6785
|
-
disabled = disabled || !permissions.cameraButton;
|
6773
|
+
const disabled = props.disabled || waitForCamera;
|
6786
6774
|
const onRenderCameraOnIcon = () => (React__default['default'].createElement(HighContrastAwareIcon, { disabled: disabled, iconName: "ControlButtonCameraOn" }));
|
6787
6775
|
const onRenderCameraOffIcon = () => (React__default['default'].createElement(HighContrastAwareIcon, { disabled: disabled, iconName: "ControlButtonCameraOff" }));
|
6788
6776
|
if (waitForCamera && strings.tooltipVideoLoadingContent) {
|
@@ -6952,11 +6940,9 @@ const MicrophoneButton = (props) => {
|
|
6952
6940
|
// no mics but there are speakers, then only the primary part of the button should be disabled to allow for
|
6953
6941
|
// speaker change.
|
6954
6942
|
const primaryDisabled = props.primaryDisabled || (isSplit && !((_b = props.microphones) === null || _b === void 0 ? void 0 : _b.length) ? true : undefined);
|
6955
|
-
|
6943
|
+
const disabled = props.disabled ||
|
6956
6944
|
(isSplit && !((_c = props.microphones) === null || _c === void 0 ? void 0 : _c.length) && !((_d = props.speakers) === null || _d === void 0 ? void 0 : _d.length)) ||
|
6957
6945
|
(!isSplit && props.microphones && ((_e = props.microphones) === null || _e === void 0 ? void 0 : _e.length) === 0);
|
6958
|
-
/* @conditional-compile-remove(rooms) */
|
6959
|
-
disabled = !_usePermissions().microphoneButton || disabled;
|
6960
6946
|
const onRenderMicOnIcon = () => {
|
6961
6947
|
return React__default['default'].createElement(HighContrastAwareIcon, { disabled: disabled, iconName: "ControlButtonMicOn" });
|
6962
6948
|
};
|
@@ -7146,12 +7132,9 @@ const ScreenShareButton = (props) => {
|
|
7146
7132
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
7147
7133
|
const theme = react.useTheme();
|
7148
7134
|
const styles = screenshareButtonStyles(theme);
|
7149
|
-
|
7150
|
-
|
7151
|
-
|
7152
|
-
const onRenderScreenShareOnIcon = () => (React__default['default'].createElement(HighContrastAwareIcon, { disabled: disabled, iconName: "ControlButtonScreenShareStop" }));
|
7153
|
-
const onRenderScreenShareOffIcon = () => (React__default['default'].createElement(HighContrastAwareIcon, { disabled: disabled, iconName: "ControlButtonScreenShareStart" }));
|
7154
|
-
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { className: react.mergeStyles(styles, props.styles), onClick: (_a = props.onToggleScreenShare) !== null && _a !== void 0 ? _a : props.onClick, onRenderOnIcon: (_b = props.onRenderOnIcon) !== null && _b !== void 0 ? _b : onRenderScreenShareOnIcon, onRenderOffIcon: (_c = props.onRenderOffIcon) !== null && _c !== void 0 ? _c : onRenderScreenShareOffIcon, strings: strings, labelKey: (_d = props.labelKey) !== null && _d !== void 0 ? _d : 'screenShareButtonLabel', disabled: disabled })));
|
7135
|
+
const onRenderScreenShareOnIcon = () => (React__default['default'].createElement(HighContrastAwareIcon, { disabled: props.disabled, iconName: "ControlButtonScreenShareStop" }));
|
7136
|
+
const onRenderScreenShareOffIcon = () => (React__default['default'].createElement(HighContrastAwareIcon, { disabled: props.disabled, iconName: "ControlButtonScreenShareStart" }));
|
7137
|
+
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { className: react.mergeStyles(styles, props.styles), onClick: (_a = props.onToggleScreenShare) !== null && _a !== void 0 ? _a : props.onClick, onRenderOnIcon: (_b = props.onRenderOnIcon) !== null && _b !== void 0 ? _b : onRenderScreenShareOnIcon, onRenderOffIcon: (_c = props.onRenderOffIcon) !== null && _c !== void 0 ? _c : onRenderScreenShareOffIcon, strings: strings, labelKey: (_d = props.labelKey) !== null && _d !== void 0 ? _d : 'screenShareButtonLabel', disabled: props.disabled })));
|
7155
7138
|
};
|
7156
7139
|
const screenshareButtonStyles = (theme) => ({
|
7157
7140
|
rootChecked: {
|
@@ -14856,11 +14839,24 @@ const Devices = (props) => {
|
|
14856
14839
|
var _a;
|
14857
14840
|
return concatButtonBaseStyles(props.increaseFlyoutItemSize ? devicesButtonWithIncreasedTouchTargets : {}, (_a = props.styles) !== null && _a !== void 0 ? _a : {});
|
14858
14841
|
}, [props.increaseFlyoutItemSize, props.styles]);
|
14842
|
+
/* @conditional-compile-remove(rooms) */
|
14843
|
+
const permissions = _usePermissions();
|
14844
|
+
/* @conditional-compile-remove(rooms) */
|
14845
|
+
const locale = useLocale();
|
14859
14846
|
return (React__default['default'].createElement(DevicesButton
|
14860
14847
|
/* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
|
14861
14848
|
, Object.assign({
|
14862
14849
|
/* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
|
14863
|
-
persistMenu: true }, devicesButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, "data-ui-id": "calling-composite-devices-button", disabled: props.disabled
|
14850
|
+
persistMenu: true }, devicesButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, "data-ui-id": "calling-composite-devices-button", disabled: props.disabled,
|
14851
|
+
/* @conditional-compile-remove(rooms) */
|
14852
|
+
strings: getLabelFromPermissions(permissions, locale) })));
|
14853
|
+
};
|
14854
|
+
/* @conditional-compile-remove(rooms) */
|
14855
|
+
const getLabelFromPermissions = (permissions, locale) => {
|
14856
|
+
if (!permissions.cameraButton && !permissions.microphoneButton) {
|
14857
|
+
return { label: locale.component.strings.microphoneButton.speakerMenuTitle };
|
14858
|
+
}
|
14859
|
+
return undefined;
|
14864
14860
|
};
|
14865
14861
|
|
14866
14862
|
// Copyright (c) Microsoft Corporation.
|
@@ -15239,14 +15235,25 @@ const CallControls = (props) => {
|
|
15239
15235
|
const onDismissDialpad = () => {
|
15240
15236
|
setShowDialpad(false);
|
15241
15237
|
};
|
15238
|
+
/* @conditional-compile-remove(rooms) */
|
15239
|
+
const rolePermissions = _usePermissions();
|
15240
|
+
let screenShareButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.screenShareButton);
|
15241
|
+
/* @conditional-compile-remove(rooms) */
|
15242
|
+
screenShareButtonIsEnabled = rolePermissions.screenShare && screenShareButtonIsEnabled;
|
15243
|
+
let microphoneButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.microphoneButton);
|
15244
|
+
/* @conditional-compile-remove(rooms) */
|
15245
|
+
microphoneButtonIsEnabled = rolePermissions.microphoneButton && microphoneButtonIsEnabled;
|
15246
|
+
let cameraButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.cameraButton);
|
15247
|
+
/* @conditional-compile-remove(rooms) */
|
15248
|
+
cameraButtonIsEnabled = rolePermissions.cameraButton && cameraButtonIsEnabled;
|
15242
15249
|
return (React__default['default'].createElement(react.Stack, { horizontalAlign: "center" },
|
15243
15250
|
/* @conditional-compile-remove(PSTN-calls) */
|
15244
15251
|
React__default['default'].createElement(SendDtmfDialpad, { isMobile: !!props.isMobile, strings: dialpadStrings, showDialpad: showDialpad, onDismissDialpad: onDismissDialpad }),
|
15245
15252
|
React__default['default'].createElement(react.Stack.Item, null,
|
15246
15253
|
React__default['default'].createElement(ControlBar, { layout: "horizontal", styles: controlBarStyles(theme.semanticColors.bodyBackground) },
|
15247
|
-
|
15248
|
-
|
15249
|
-
|
15254
|
+
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) })),
|
15255
|
+
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) })),
|
15256
|
+
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) })),
|
15250
15257
|
isEnabled$2(options === null || options === void 0 ? void 0 : options.participantsButton) &&
|
15251
15258
|
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
|
15252
15259
|
!props.isMobile && (React__default['default'].createElement(Participants, { option: options === null || options === void 0 ? void 0 : options.participantsButton, callInvitationURL: props.callInvitationURL, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, isMobile: props.isMobile, disabled: isDisabled$2(options === null || options === void 0 ? void 0 : options.participantsButton) })) && (
|
@@ -16804,9 +16811,9 @@ const LocalDeviceSettings = (props) => {
|
|
16804
16811
|
// actually granting access to query both microphone and speaker. However the browser popup asks you explicity for
|
16805
16812
|
// 'microphone'. This needs investigation on how we want to handle this and maybe needs follow up with SDK team.
|
16806
16813
|
return (React__default['default'].createElement(react.Stack, { "data-ui-id": "call-composite-device-settings", tokens: mainStackTokens },
|
16807
|
-
React__default['default'].createElement(react.Stack, null,
|
16814
|
+
isSelectCamEnabled && (React__default['default'].createElement(react.Stack, null,
|
16808
16815
|
React__default['default'].createElement(react.Label, { id: 'call-composite-local-camera-settings-label', className: react.mergeStyles(dropDownStyles(theme).label), disabled: !isSelectCamEnabled }, cameraLabel),
|
16809
|
-
React__default['default'].createElement(react.Dropdown, { "data-ui-id": "call-composite-local-camera-settings", "aria-labelledby": 'call-composite-local-camera-settings-label', placeholder: defaultPlaceHolder, options: isSelectCamEnabled ? getDropDownList(props.cameras) : [{ key: 'deniedOrUnknown', text: '' }], styles: dropDownStyles(theme),
|
16816
|
+
React__default['default'].createElement(react.Dropdown, { "data-ui-id": "call-composite-local-camera-settings", "aria-labelledby": 'call-composite-local-camera-settings-label', placeholder: defaultPlaceHolder, options: isSelectCamEnabled ? getDropDownList(props.cameras) : [{ key: 'deniedOrUnknown', text: '' }], styles: dropDownStyles(theme), errorMessage: props.cameraPermissionGranted === undefined || props.cameraPermissionGranted
|
16810
16817
|
? undefined
|
16811
16818
|
: locale.strings.call.cameraPermissionDenied, defaultSelectedKey: isSelectMicEnabled
|
16812
16819
|
? props.selectedCamera
|
@@ -16816,11 +16823,11 @@ const LocalDeviceSettings = (props) => {
|
|
16816
16823
|
: ''
|
16817
16824
|
: 'deniedOrUnknown', onChange: (event, option, index) => {
|
16818
16825
|
props.onSelectCamera(props.cameras[index !== null && index !== void 0 ? index : 0], localVideoViewOptions);
|
16819
|
-
}, onRenderTitle: (props) => onRenderTitle('Camera', props) })),
|
16826
|
+
}, onRenderTitle: (props) => onRenderTitle('Camera', props) }))),
|
16820
16827
|
React__default['default'].createElement(react.Stack, null,
|
16821
16828
|
React__default['default'].createElement(react.Label, { id: 'call-composite-local-sound-settings-label', className: react.mergeStyles(dropDownStyles(theme).label), disabled: !isSelectMicEnabled }, soundLabel),
|
16822
16829
|
React__default['default'].createElement(react.Stack, { "data-ui-id": "call-composite-sound-settings", tokens: mainStackTokens },
|
16823
|
-
React__default['default'].createElement(react.Dropdown, { "aria-labelledby": 'call-composite-local-sound-settings-label', placeholder: defaultPlaceHolder, styles: dropDownStyles(theme),
|
16830
|
+
isSelectMicEnabled && (React__default['default'].createElement(react.Dropdown, { "aria-labelledby": 'call-composite-local-sound-settings-label', placeholder: defaultPlaceHolder, styles: dropDownStyles(theme), errorMessage: props.microphonePermissionGranted === undefined || props.microphonePermissionGranted
|
16824
16831
|
? undefined
|
16825
16832
|
: locale.strings.call.microphonePermissionDenied, options: isSelectMicEnabled ? getDropDownList(props.microphones) : [{ key: 'deniedOrUnknown', text: '' }], defaultSelectedKey: isSelectMicEnabled
|
16826
16833
|
? props.selectedMicrophone
|
@@ -16828,7 +16835,7 @@ const LocalDeviceSettings = (props) => {
|
|
16828
16835
|
: defaultDeviceId(props.microphones)
|
16829
16836
|
: 'deniedOrUnknown', onChange: (event, option, index) => {
|
16830
16837
|
props.onSelectMicrophone(props.microphones[index !== null && index !== void 0 ? index : 0]);
|
16831
|
-
}, onRenderTitle: (props) => onRenderTitle('Microphone', props) }),
|
16838
|
+
}, onRenderTitle: (props) => onRenderTitle('Microphone', props) })),
|
16832
16839
|
React__default['default'].createElement(react.Dropdown, { "aria-labelledby": 'call-composite-local-sound-settings-label', placeholder: defaultPlaceHolder, styles: dropDownStyles(theme), disabled: props.speakers.length === 0, options: getDropDownList(props.speakers), defaultSelectedKey: props.selectedSpeaker ? props.selectedSpeaker.id : defaultDeviceId(props.speakers), onChange: (event, option, index) => {
|
16833
16840
|
props.onSelectSpeaker(props.speakers[index !== null && index !== void 0 ? index : 0]);
|
16834
16841
|
}, onRenderTitle: (props) => onRenderTitle('Speaker', props) })))));
|
@@ -17104,22 +17111,33 @@ const ConfigurationPage = (props) => {
|
|
17104
17111
|
const locale = useLocale();
|
17105
17112
|
const title = (React__default['default'].createElement(react.Stack.Item, { className: mobileView ? titleContainerStyleMobile : titleContainerStyleDesktop }, locale.strings.call.configurationPageTitle));
|
17106
17113
|
const callDescription = locale.strings.call.configurationPageCallDetails && (React__default['default'].createElement(react.Stack.Item, { className: mobileView ? callDetailsStyleMobile : callDetailsStyleDesktop }, locale.strings.call.configurationPageCallDetails));
|
17114
|
+
let mobileWithPreview = mobileView;
|
17115
|
+
/* @conditional-compile-remove(rooms) */
|
17116
|
+
mobileWithPreview = mobileWithPreview && rolePermissions.cameraButton;
|
17107
17117
|
return (React__default['default'].createElement(react.Stack, { className: mobileView ? configurationContainerStyleMobile : configurationContainerStyleDesktop },
|
17108
17118
|
React__default['default'].createElement(react.Stack, { styles: bannerNotificationStyles },
|
17109
17119
|
React__default['default'].createElement(ErrorBar, Object.assign({}, errorBarProps))),
|
17110
|
-
React__default['default'].createElement(react.Stack, { grow: true, horizontal: !
|
17111
|
-
|
17120
|
+
React__default['default'].createElement(react.Stack, { grow: true, horizontal: !mobileWithPreview, horizontalAlign: mobileWithPreview ? 'stretch' : 'center', verticalAlign: "center", tokens: mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop },
|
17121
|
+
mobileWithPreview && (React__default['default'].createElement(react.Stack.Item, null,
|
17112
17122
|
title,
|
17113
17123
|
callDescription)),
|
17114
|
-
|
17124
|
+
localPreviewTrampoline(mobileWithPreview,
|
17125
|
+
/* @conditional-compile-remove(rooms) */ !rolePermissions.cameraButton),
|
17115
17126
|
React__default['default'].createElement(react.Stack, { className: mobileView ? undefined : selectionContainerStyle },
|
17116
|
-
!
|
17127
|
+
!mobileWithPreview && (React__default['default'].createElement(React__default['default'].Fragment, null,
|
17117
17128
|
React__default['default'].createElement(react.Stack.Item, { styles: callDetailsContainerStylesDesktop },
|
17118
17129
|
title,
|
17119
17130
|
callDescription),
|
17120
17131
|
React__default['default'].createElement(LocalDeviceSettings, Object.assign({}, options, localDeviceSettingsHandlers, { cameraPermissionGranted: cameraPermissionGranted, microphonePermissionGranted: microphonePermissionGranted })))),
|
17121
|
-
React__default['default'].createElement(react.Stack, { styles:
|
17122
|
-
React__default['default'].createElement(StartCallButton, { className:
|
17132
|
+
React__default['default'].createElement(react.Stack, { styles: mobileWithPreview ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop },
|
17133
|
+
React__default['default'].createElement(StartCallButton, { className: mobileWithPreview ? startCallButtonStyleMobile : undefined, onClick: startCallHandler, disabled: disableStartCallButton }))))));
|
17134
|
+
};
|
17135
|
+
const localPreviewTrampoline = (mobileView, doNotShow) => {
|
17136
|
+
/* @conditional-compile-remove(rooms) */
|
17137
|
+
if (doNotShow) {
|
17138
|
+
return undefined;
|
17139
|
+
}
|
17140
|
+
return React__default['default'].createElement(LocalPreview, { mobileView: mobileView, showDevicesButton: mobileView });
|
17123
17141
|
};
|
17124
17142
|
|
17125
17143
|
// Copyright (c) Microsoft Corporation.
|