@azure/communication-react 1.4.2-alpha-202211080016.0 → 1.4.2-alpha-202211100016.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/communication-react.d.ts +2 -2
- package/dist/dist-cjs/communication-react/index.js +63 -21
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetry.d.ts +10 -0
- package/dist/dist-esm/acs-ui-common/src/telemetry.js +10 -0
- package/dist/dist-esm/acs-ui-common/src/telemetry.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/Dialpad/Dialpad.js +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js +3 -3
- package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.d.ts +1 -5
- package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js +0 -11
- package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +3 -3
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +12 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +26 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js +10 -1
- package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/package.json +8 -8
@@ -4336,7 +4336,7 @@ export declare const DEFAULT_COMPONENT_ICONS: {
|
|
4336
4336
|
SendBoxSend: JSX.Element;
|
4337
4337
|
SendBoxSendHovered: JSX.Element;
|
4338
4338
|
VideoTileMicOff: JSX.Element;
|
4339
|
-
|
4339
|
+
DialpadBackspace: JSX.Element;
|
4340
4340
|
DomainPermissionsSparkle: JSX.Element;
|
4341
4341
|
DomainPermissionCamera: JSX.Element;
|
4342
4342
|
DomainPermissionMic: JSX.Element;
|
@@ -4431,7 +4431,7 @@ export declare const DEFAULT_COMPOSITE_ICONS: {
|
|
4431
4431
|
HoldCallContextualMenuItem: JSX.Element;
|
4432
4432
|
HoldCallButton: JSX.Element;
|
4433
4433
|
ResumeCall: JSX.Element;
|
4434
|
-
|
4434
|
+
DialpadBackspace: JSX.Element;
|
4435
4435
|
DomainPermissionsSparkle: JSX.Element;
|
4436
4436
|
DomainPermissionCamera: JSX.Element;
|
4437
4437
|
DomainPermissionMic: JSX.Element;
|
@@ -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.4.2-alpha-
|
205
|
+
var telemetryVersion = '1.4.2-alpha-202211100016.0';
|
206
206
|
|
207
207
|
// Copyright (c) Microsoft Corporation.
|
208
208
|
/**
|
@@ -219,6 +219,16 @@ const sanitize = (version) => {
|
|
219
219
|
};
|
220
220
|
/**
|
221
221
|
* Application ID to be included in telemetry data from the UI library.
|
222
|
+
* Template: acXYYY/<version>
|
223
|
+
* Where:
|
224
|
+
* - X describes a platform, [r: web, i: iOS, a: Android]
|
225
|
+
* - YYY describes what's running on this platform (optional, currently unused by this library):
|
226
|
+
* Y[0] is high-level artifact,
|
227
|
+
* [0: undefined, 1: AzureCommunicationLibrary, 2: ACS SampleApp]
|
228
|
+
* Y[1] is specific implementation,
|
229
|
+
* [0: undefined, 1: Call Composite, 2: Chat Composite, 3: CallWithChatComposite, 4: UI Components]
|
230
|
+
* Y[2] is reserved for implementation details,
|
231
|
+
* [0: undefined]
|
222
232
|
*
|
223
233
|
* @internal
|
224
234
|
*/
|
@@ -2137,7 +2147,7 @@ const DEFAULT_COMPONENT_ICONS = {
|
|
2137
2147
|
SendBoxSendHovered: React__default['default'].createElement(reactIcons.Send20Filled, null),
|
2138
2148
|
VideoTileMicOff: React__default['default'].createElement(reactIcons.MicOff16Filled, null),
|
2139
2149
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
2140
|
-
|
2150
|
+
DialpadBackspace: React__default['default'].createElement(reactIcons.Backspace20Regular, null),
|
2141
2151
|
/* @conditional-compile-remove(call-readiness) */
|
2142
2152
|
DomainPermissionsSparkle: React__default['default'].createElement(DomainPermissionSparkle20Filled, null),
|
2143
2153
|
/* @conditional-compile-remove(call-readiness) */
|
@@ -8337,7 +8347,7 @@ const DialpadContainer = (props) => {
|
|
8337
8347
|
setText(e.target.value);
|
8338
8348
|
}, placeholder: props.strings.placeholderText, "data-test-id": "dialpad-input", onRenderSuffix: () => {
|
8339
8349
|
var _a;
|
8340
|
-
return (React__default['default'].createElement(React__default['default'].Fragment, null, showDeleteButton && plainTextValue.length !== 0 && (React__default['default'].createElement(react.IconButton, { ariaLabel: props.strings.deleteButtonAriaLabel, onClick: deleteNumbers, styles: react.concatStyleSets(iconButtonStyles(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.deleteIcon), iconProps: { iconName: '
|
8350
|
+
return (React__default['default'].createElement(React__default['default'].Fragment, null, showDeleteButton && plainTextValue.length !== 0 && (React__default['default'].createElement(react.IconButton, { ariaLabel: props.strings.deleteButtonAriaLabel, onClick: deleteNumbers, styles: react.concatStyleSets(iconButtonStyles(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.deleteIcon), iconProps: { iconName: 'DialpadBackspace' } }))));
|
8341
8351
|
} }),
|
8342
8352
|
React__default['default'].createElement(react.FocusZone, null, dialPadButtonsDefault.map((rows, rowIndex) => {
|
8343
8353
|
return (React__default['default'].createElement(react.Stack, { horizontal: true, key: `row_${rowIndex}`, horizontalAlign: "stretch" }, rows.map((button, columnIndex) => (React__default['default'].createElement(DialpadButton, { key: `button_${columnIndex}`,
|
@@ -8500,7 +8510,6 @@ const messageBarStyle = (theme, errorType) => ({
|
|
8500
8510
|
innerText: {
|
8501
8511
|
paddingTop: errorType === react.MessageBarType.warning ? '0.15rem' : '0.1rem',
|
8502
8512
|
lineHeight: 'none',
|
8503
|
-
color: theme.palette.black,
|
8504
8513
|
alignSelf: 'center',
|
8505
8514
|
whiteSpace: 'normal'
|
8506
8515
|
},
|
@@ -8516,16 +8525,6 @@ const messageBarStyle = (theme, errorType) => ({
|
|
8516
8525
|
paddingTop: '0.8rem'
|
8517
8526
|
}
|
8518
8527
|
});
|
8519
|
-
/**
|
8520
|
-
* @private
|
8521
|
-
*/
|
8522
|
-
const linkStyle = (theme) => ({
|
8523
|
-
root: {
|
8524
|
-
span: {
|
8525
|
-
color: theme.palette.black
|
8526
|
-
}
|
8527
|
-
}
|
8528
|
-
});
|
8529
8528
|
|
8530
8529
|
// Copyright (c) Microsoft Corporation.
|
8531
8530
|
/**
|
@@ -8551,14 +8550,14 @@ const _TroubleshootingGuideErrorBar = (props) => {
|
|
8551
8550
|
const devicePermissionErrorBar = (React__default['default'].createElement("div", null,
|
8552
8551
|
strings[error.type],
|
8553
8552
|
' ',
|
8554
|
-
onPermissionsTroubleshootingClick && (React__default['default'].createElement(react.Link, {
|
8553
|
+
onPermissionsTroubleshootingClick && (React__default['default'].createElement(react.Link, { onClick: () => {
|
8555
8554
|
onPermissionsTroubleshootingClick(permissionsState);
|
8556
8555
|
}, underline: true },
|
8557
8556
|
React__default['default'].createElement("span", null, troubleshootingGuideStrings.devicePermissionLinkText)))));
|
8558
8557
|
const networkErrorBar = (React__default['default'].createElement("div", null,
|
8559
8558
|
strings[error.type],
|
8560
8559
|
' ',
|
8561
|
-
onNetworkingTroubleshootingClick && (React__default['default'].createElement(react.Link, {
|
8560
|
+
onNetworkingTroubleshootingClick && (React__default['default'].createElement(react.Link, { onClick: onNetworkingTroubleshootingClick, underline: true },
|
8562
8561
|
React__default['default'].createElement("span", null, troubleshootingGuideStrings.networkTroubleshootingLinkText)))));
|
8563
8562
|
return (React__default['default'].createElement(react.MessageBar, Object.assign({}, props, { styles: messageBarStyle(theme, messageBarType(error.type)), key: error.type, messageBarType: messageBarType(error.type), messageBarIconProps: messageBarIconProps(error.type), actions: React__default['default'].createElement(react.MessageBarButton, { text: troubleshootingGuideStrings.dismissButtonText, styles: dismissButtonStyle(theme), onClick: () => {
|
8564
8563
|
setDismissedErrors(dismissError(dismissedErrors, error));
|
@@ -13614,8 +13613,8 @@ const coffeeIconStyle = {
|
|
13614
13613
|
* @public
|
13615
13614
|
*/
|
13616
13615
|
const COMPOSITE_ONLY_ICONS = {
|
13617
|
-
ChevronLeft:
|
13618
|
-
Link:
|
13616
|
+
ChevronLeft: undefined,
|
13617
|
+
Link: undefined,
|
13619
13618
|
LobbyScreenConnectingToCall: React__default['default'].createElement(CoffeeIcon, null),
|
13620
13619
|
LobbyScreenWaitingToBeAdmitted: React__default['default'].createElement(CoffeeIcon, null),
|
13621
13620
|
LocalDeviceSettingsCamera: React__default['default'].createElement(reactIcons.Video20Filled, null),
|
@@ -14583,11 +14582,20 @@ const BaseProvider = (props) => {
|
|
14583
14582
|
if (alreadyWrapped) {
|
14584
14583
|
return React__default['default'].createElement(React__default['default'].Fragment, null, props.children);
|
14585
14584
|
}
|
14585
|
+
/**
|
14586
|
+
* Before registering fluent icons, we should check DEFAULT_COMPOSITE_ICONS and strip out the key value pairs where value is undefined
|
14587
|
+
*/
|
14588
|
+
const iconsToRegister = {};
|
14589
|
+
Object.entries(DEFAULT_COMPOSITE_ICONS).forEach(([key, value]) => {
|
14590
|
+
if (value) {
|
14591
|
+
iconsToRegister[key] = value;
|
14592
|
+
}
|
14593
|
+
});
|
14586
14594
|
/**
|
14587
14595
|
* We register the default icon mappings merged with custom icons provided through props
|
14588
14596
|
* to ensure all icons render correctly.
|
14589
14597
|
*/
|
14590
|
-
react.registerIcons({ icons: Object.assign(Object.assign({},
|
14598
|
+
react.registerIcons({ icons: Object.assign(Object.assign({}, iconsToRegister), props.icons) });
|
14591
14599
|
// we use Customizer to override default LayerHost injected to <body />
|
14592
14600
|
// which stop polluting global dom tree and increase compatibility with react-full-screen
|
14593
14601
|
const CompositeElement = (React__default['default'].createElement(FluentThemeProvider, { fluentTheme: fluentTheme, rtl: rtl },
|
@@ -15552,6 +15560,32 @@ const isDisabled$2 = (option) => {
|
|
15552
15560
|
}
|
15553
15561
|
return option.disabled;
|
15554
15562
|
};
|
15563
|
+
/* @conditional-compile-remove(call-readiness) */
|
15564
|
+
/**
|
15565
|
+
*
|
15566
|
+
* This function uses permission API to determine if device permission state is granted, prompt or denied
|
15567
|
+
* @returns whether device permission state is granted, prompt or denied
|
15568
|
+
* If permission API is not supported on this browser, do nothing and log out error
|
15569
|
+
* @private
|
15570
|
+
*/
|
15571
|
+
const getDevicePermissionState = (setVideoState, setAudioState) => {
|
15572
|
+
navigator.permissions
|
15573
|
+
.query({ name: 'camera' })
|
15574
|
+
.then((result) => {
|
15575
|
+
setVideoState(result.state);
|
15576
|
+
})
|
15577
|
+
.catch((error) => {
|
15578
|
+
console.log(error);
|
15579
|
+
});
|
15580
|
+
navigator.permissions
|
15581
|
+
.query({ name: 'microphone' })
|
15582
|
+
.then((result) => {
|
15583
|
+
setAudioState(result.state);
|
15584
|
+
})
|
15585
|
+
.catch((error) => {
|
15586
|
+
console.log(error);
|
15587
|
+
});
|
15588
|
+
};
|
15555
15589
|
|
15556
15590
|
// Copyright (c) Microsoft Corporation.
|
15557
15591
|
// Licensed under the MIT license.
|
@@ -18216,6 +18250,13 @@ const ConfigurationPage = (props) => {
|
|
18216
18250
|
const options = useAdaptedSelector(getSelector$1(DevicesButton));
|
18217
18251
|
const localDeviceSettingsHandlers = useHandlers();
|
18218
18252
|
const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector$1(devicePermissionSelector);
|
18253
|
+
/* @conditional-compile-remove(call-readiness) */
|
18254
|
+
// use permission API to get video and audio permission state
|
18255
|
+
const [videoState, setVideoState] = React.useState(undefined);
|
18256
|
+
/* @conditional-compile-remove(call-readiness) */
|
18257
|
+
const [audioState, setAudioState] = React.useState(undefined);
|
18258
|
+
/* @conditional-compile-remove(call-readiness) */
|
18259
|
+
getDevicePermissionState(setVideoState, setAudioState);
|
18219
18260
|
let errorBarProps = usePropsFor$1(ErrorBar);
|
18220
18261
|
const adapter = useAdapter();
|
18221
18262
|
const deviceState = adapter.getState().devices;
|
@@ -18252,8 +18293,9 @@ const ConfigurationPage = (props) => {
|
|
18252
18293
|
mobileWithPreview = mobileWithPreview && rolePermissions.cameraButton;
|
18253
18294
|
/* @conditional-compile-remove(call-readiness) */
|
18254
18295
|
const permissionsState = {
|
18255
|
-
|
18256
|
-
|
18296
|
+
// fall back to using cameraPermissionGranted and microphonePermissionGranted if permission API is not supported
|
18297
|
+
camera: videoState !== null && videoState !== void 0 ? videoState : (cameraPermissionGranted ? 'granted' : 'denied'),
|
18298
|
+
microphone: audioState !== null && audioState !== void 0 ? audioState : (microphonePermissionGranted ? 'granted' : 'denied')
|
18257
18299
|
};
|
18258
18300
|
/* @conditional-compile-remove(call-readiness) */
|
18259
18301
|
const networkErrors = errorBarProps.activeErrorMessages.filter((message) => message.type === 'callNetworkQualityLow');
|