@azure/communication-react 1.3.3-alpha-202210130020.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.
- package/dist/communication-react.d.ts +1 -1
- package/dist/dist-cjs/communication-react/index.js +35 -15
- 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/calling-component-bindings/src/handlers/createHandlers.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +8 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +12 -3
- 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/hooks/useHandlers.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +6 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- 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-
|
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* () {
|
@@ -15029,8 +15029,8 @@ const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
|
|
15029
15029
|
onCreateRemoteStreamView: (userId, options) => __awaiter$a(void 0, void 0, void 0, function* () {
|
15030
15030
|
return yield adapter.createStreamView(userId, options);
|
15031
15031
|
}),
|
15032
|
-
onHangUp: () => __awaiter$a(void 0, void 0, void 0, function* () {
|
15033
|
-
yield adapter.leaveCall();
|
15032
|
+
onHangUp: (forEveryone) => __awaiter$a(void 0, void 0, void 0, function* () {
|
15033
|
+
yield adapter.leaveCall(forEveryone);
|
15034
15034
|
}),
|
15035
15035
|
/* @conditional-compile-remove(PSTN-calls) */
|
15036
15036
|
onToggleHold: () => __awaiter$a(void 0, void 0, void 0, function* () {
|
@@ -15248,13 +15248,22 @@ const onFetchCustomButtonPropsTrampoline$1 = (options) => {
|
|
15248
15248
|
/** @private */
|
15249
15249
|
const Devices = (props) => {
|
15250
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
|
+
]);
|
15251
15262
|
const styles = React.useMemo(() => {
|
15252
15263
|
var _a;
|
15253
15264
|
return concatButtonBaseStyles(props.increaseFlyoutItemSize ? devicesButtonWithIncreasedTouchTargets : {}, (_a = props.styles) !== null && _a !== void 0 ? _a : {});
|
15254
15265
|
}, [props.increaseFlyoutItemSize, props.styles]);
|
15255
15266
|
/* @conditional-compile-remove(rooms) */
|
15256
|
-
const permissions = _usePermissions();
|
15257
|
-
/* @conditional-compile-remove(rooms) */
|
15258
15267
|
const locale = useLocale();
|
15259
15268
|
/* @conditional-compile-remove(rooms) */
|
15260
15269
|
const onlyManageSpeakers = !permissions.microphoneButton && !permissions.cameraButton;
|
@@ -15266,7 +15275,7 @@ const Devices = (props) => {
|
|
15266
15275
|
/* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
|
15267
15276
|
, Object.assign({
|
15268
15277
|
/* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
|
15269
|
-
persistMenu: true },
|
15278
|
+
persistMenu: true }, augmentedDeviceButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, "data-ui-id": "calling-composite-devices-button", disabled: props.disabled,
|
15270
15279
|
/* @conditional-compile-remove(rooms) */
|
15271
15280
|
strings: getLabelFromPermissions(permissions, locale),
|
15272
15281
|
/* @conditional-compile-remove(rooms) */
|
@@ -16824,14 +16833,20 @@ const CallArrangement = (props) => {
|
|
16824
16833
|
let canUnmute = true;
|
16825
16834
|
/* @conditional-compile-remove(rooms) */
|
16826
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
|
+
}
|
16827
16842
|
return (React__default['default'].createElement("div", { ref: containerRef, className: react.mergeStyles(containerDivStyles) },
|
16828
16843
|
React__default['default'].createElement(react.Stack, { verticalFill: true, horizontalAlign: "stretch", className: containerClassName, "data-ui-id": props.dataUiId },
|
16829
16844
|
React__default['default'].createElement(react.Stack, { horizontal: true, grow: true },
|
16830
16845
|
React__default['default'].createElement(react.Stack.Item, { styles: notificationsContainerStyles },
|
16831
16846
|
React__default['default'].createElement(react.Stack, { styles: bannerNotificationStyles },
|
16832
16847
|
React__default['default'].createElement(_ComplianceBanner, Object.assign({}, props.complianceBannerProps))),
|
16833
|
-
|
16834
|
-
React__default['default'].createElement(ErrorBar, Object.assign({},
|
16848
|
+
errorBarProps !== false && (React__default['default'].createElement(react.Stack, { styles: bannerNotificationStyles },
|
16849
|
+
React__default['default'].createElement(ErrorBar, Object.assign({}, errorBarProps)))),
|
16835
16850
|
canUnmute && !!props.mutedNotificationProps && React__default['default'].createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps))),
|
16836
16851
|
React__default['default'].createElement(react.Stack.Item, { grow: true, style: callCompositeContainerFlex() },
|
16837
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())))),
|
@@ -17615,13 +17630,18 @@ const ConfigurationPage = (props) => {
|
|
17615
17630
|
const options = useAdaptedSelector(getSelector$1(DevicesButton));
|
17616
17631
|
const localDeviceSettingsHandlers = useHandlers();
|
17617
17632
|
const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector$1(devicePermissionSelector);
|
17618
|
-
|
17633
|
+
let errorBarProps = usePropsFor$1(ErrorBar);
|
17619
17634
|
const adapter = useAdapter();
|
17620
17635
|
const deviceState = adapter.getState().devices;
|
17621
17636
|
let disableStartCallButton = !microphonePermissionGranted || ((_a = deviceState.microphones) === null || _a === void 0 ? void 0 : _a.length) === 0;
|
17622
17637
|
/* @conditional-compile-remove(rooms) */
|
17623
17638
|
const rolePermissions = _usePermissions();
|
17624
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) */
|
17625
17645
|
if (!rolePermissions.microphoneButton) {
|
17626
17646
|
// If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button
|
17627
17647
|
// because microphone device permission is not needed for the user's role
|
@@ -18521,9 +18541,9 @@ class AzureCommunicationCallAdapter {
|
|
18521
18541
|
}
|
18522
18542
|
});
|
18523
18543
|
}
|
18524
|
-
leaveCall() {
|
18544
|
+
leaveCall(forEveryone) {
|
18525
18545
|
return __awaiter$4(this, void 0, void 0, function* () {
|
18526
|
-
yield this.handlers.onHangUp();
|
18546
|
+
yield this.handlers.onHangUp(forEveryone);
|
18527
18547
|
this.unsubscribeCallEvents();
|
18528
18548
|
this.call = undefined;
|
18529
18549
|
this.handlers = createDefaultCallingHandlers(this.callClient, this.callAgent, this.deviceManager, undefined);
|
@@ -19436,7 +19456,7 @@ class CallWithChatBackedCallAdapter {
|
|
19436
19456
|
this.joinCall = (microphoneOn) => {
|
19437
19457
|
return this.callWithChatAdapter.joinCall(microphoneOn);
|
19438
19458
|
};
|
19439
|
-
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); });
|
19440
19460
|
this.startCall = (participants, options) => {
|
19441
19461
|
let communicationParticipants = participants;
|
19442
19462
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -20267,10 +20287,10 @@ class AzureCommunicationCallWithChatAdapter {
|
|
20267
20287
|
return this.callAdapter.joinCall(microphoneOn);
|
20268
20288
|
}
|
20269
20289
|
/** Leave current Call. */
|
20270
|
-
leaveCall() {
|
20290
|
+
leaveCall(forEveryone) {
|
20271
20291
|
return __awaiter(this, void 0, void 0, function* () {
|
20272
20292
|
// Only remove self from the GroupCall. Contoso must manage access to Chat.
|
20273
|
-
yield this.callAdapter.leaveCall();
|
20293
|
+
yield this.callAdapter.leaveCall(forEveryone);
|
20274
20294
|
});
|
20275
20295
|
}
|
20276
20296
|
/** Start a new Call. */
|