@azure/communication-react 1.3.3-alpha-202209080049.0 → 1.3.3-alpha-202209090017.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 +20 -1
- package/dist/dist-cjs/communication-react/index.js +37 -28
- 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/Drawer/DrawerMenuItem.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.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 +11 -9
- 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/MutedNotification.js +6 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MutedNotification.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +15 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +19 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js +15 -8
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +1 -1
- package/package.json +11 -10
@@ -1510,7 +1510,7 @@ export declare type CallParticipantListParticipant = ParticipantListParticipant
|
|
1510
1510
|
* @beta
|
1511
1511
|
*/
|
1512
1512
|
export declare type CallParticipantsLocator = {
|
1513
|
-
|
1513
|
+
participantIds: string[];
|
1514
1514
|
};
|
1515
1515
|
|
1516
1516
|
/**
|
@@ -3801,6 +3801,9 @@ export declare interface CustomCallWithChatControlButtonProps extends CustomCont
|
|
3801
3801
|
* @beta
|
3802
3802
|
*/
|
3803
3803
|
export declare interface CustomControlButtonProps {
|
3804
|
+
/**
|
3805
|
+
* Calback for when button is clicked
|
3806
|
+
*/
|
3804
3807
|
onItemClick?: () => void;
|
3805
3808
|
/**
|
3806
3809
|
* Whether the buttons is disabled
|
@@ -3820,6 +3823,22 @@ export declare interface CustomControlButtonProps {
|
|
3820
3823
|
* Optional label for the button
|
3821
3824
|
*/
|
3822
3825
|
text?: string;
|
3826
|
+
/**
|
3827
|
+
* A unique key for the button
|
3828
|
+
*/
|
3829
|
+
key?: string | number;
|
3830
|
+
/**
|
3831
|
+
* The aria label of the button for the benefit of screen readers.
|
3832
|
+
*/
|
3833
|
+
ariaLabel?: string;
|
3834
|
+
/**
|
3835
|
+
* Detailed description of the button for the benefit of screen readers.
|
3836
|
+
*/
|
3837
|
+
ariaDescription?: string;
|
3838
|
+
/**
|
3839
|
+
* A unique id set for the standard HTML id attibute
|
3840
|
+
*/
|
3841
|
+
id?: string;
|
3823
3842
|
}
|
3824
3843
|
|
3825
3844
|
/**
|
@@ -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-202209090017.0';
|
196
196
|
|
197
197
|
// Copyright (c) Microsoft Corporation.
|
198
198
|
/**
|
@@ -7257,7 +7257,7 @@ const DrawerMenuItem = (props) => {
|
|
7257
7257
|
const onClick = (ev) => props.onItemClick && props.onItemClick(ev, props.itemKey);
|
7258
7258
|
const onKeyPress = (ev) => onClick && submitWithKeyboard(ev, onClick);
|
7259
7259
|
const secondaryIcon = props.secondaryIconProps ? (React__default['default'].createElement(MenuItemIcon, Object.assign({}, props.secondaryIconProps))) : props.subMenuProps ? (React__default['default'].createElement(MenuItemIcon, { iconName: "ChevronRight" })) : undefined;
|
7260
|
-
return (React__default['default'].createElement(react.Stack, { tabIndex: 0, role: "menuitem", horizontal: true, className: react.mergeStyles(drawerMenuItemRootStyles(theme.palette.neutralLight, theme.fonts.small), props.disabled ? disabledDrawerMenuItemRootStyles(theme.palette.neutralQuaternaryAlt) : undefined, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root), onKeyPress: props.disabled ? undefined : onKeyPress, onClick: props.disabled ? undefined : onClick, tokens: menuItemChildrenGap },
|
7260
|
+
return (React__default['default'].createElement(react.Stack, { tabIndex: 0, role: "menuitem", horizontal: true, className: react.mergeStyles(drawerMenuItemRootStyles(theme.palette.neutralLight, theme.fonts.small), props.disabled ? disabledDrawerMenuItemRootStyles(theme.palette.neutralQuaternaryAlt) : undefined, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root), onKeyPress: props.disabled ? undefined : onKeyPress, onClick: props.disabled ? undefined : onClick, tokens: menuItemChildrenGap, id: props.id },
|
7261
7261
|
props.iconProps && (React__default['default'].createElement(react.Stack.Item, { role: "presentation", styles: props.disabled ? { root: { color: theme.palette.neutralTertiaryAlt } } : undefined },
|
7262
7262
|
React__default['default'].createElement(MenuItemIcon, Object.assign({}, props.iconProps)))),
|
7263
7263
|
React__default['default'].createElement(react.Stack.Item, { styles: drawerMenuItemTextStyles, grow: true },
|
@@ -14833,9 +14833,10 @@ const generateCustomControlBarButtons = (onFetchCustomButtonProps, displayType)
|
|
14833
14833
|
for (const key in response) {
|
14834
14834
|
response[key] = (React__default['default'].createElement(React__default['default'].Fragment, null, allButtonProps
|
14835
14835
|
.filter((buttonProps) => buttonProps.placement === key)
|
14836
|
-
.map((buttonProps, i) =>
|
14837
|
-
|
14838
|
-
onRenderIcon: () => { var _a; return React__default['default'].createElement(react.Icon, { iconName: (_a = buttonProps.iconName) !== null && _a !== void 0 ? _a : 'ControlButtonOptions' }); },
|
14836
|
+
.map((buttonProps, i) => {
|
14837
|
+
var _a;
|
14838
|
+
return (React__default['default'].createElement(ControlBarButton, { ariaDescription: buttonProps.ariaDescription, ariaLabel: buttonProps.ariaLabel, disabled: buttonProps.disabled, id: buttonProps.id, key: (_a = buttonProps.key) !== null && _a !== void 0 ? _a : `${buttonProps.placement}_${i}`, onClick: buttonProps.onItemClick, onRenderIcon: () => { var _a; return React__default['default'].createElement(react.Icon, { iconName: (_a = buttonProps.iconName) !== null && _a !== void 0 ? _a : 'ControlButtonOptions' }); }, showLabel: buttonProps.showLabel, strings: generateCustomControlBarButtonStrings(buttonProps.text), styles: buttonProps.styles }));
|
14839
|
+
})));
|
14839
14840
|
}
|
14840
14841
|
return response;
|
14841
14842
|
};
|
@@ -16256,10 +16257,7 @@ const CallPane = (props) => {
|
|
16256
16257
|
function MutedNotification(props) {
|
16257
16258
|
const locale = useLocale();
|
16258
16259
|
const theme = react.useTheme();
|
16259
|
-
|
16260
|
-
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
16261
|
-
}
|
16262
|
-
return (React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "center" },
|
16260
|
+
return (React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "center", className: react.mergeStyles(props.speakingWhileMuted === true ? isSpeakingAndMutedAnimationStyles : isNotSpeakingAndMutedAnimationStyles) },
|
16263
16261
|
React__default['default'].createElement(react.Stack, { horizontal: true, className: react.mergeStyles(stackStyle(theme)) },
|
16264
16262
|
React__default['default'].createElement(CallCompositeIcon, { iconName: "Muted", className: react.mergeStyles(iconStyle(theme)) }),
|
16265
16263
|
React__default['default'].createElement(react.Text, { className: react.mergeStyles(textStyle(theme)), "aria-live": 'polite' }, locale.strings.call.mutedMessage))));
|
@@ -16267,11 +16265,11 @@ function MutedNotification(props) {
|
|
16267
16265
|
const stackStyle = (theme) => {
|
16268
16266
|
return {
|
16269
16267
|
background: theme.palette.black,
|
16270
|
-
opacity: 0.8,
|
16271
16268
|
gap: `1rem`,
|
16272
16269
|
padding: `1rem`,
|
16273
16270
|
borderRadius: theme.effects.roundedCorner4,
|
16274
|
-
width: 'fit-content'
|
16271
|
+
width: 'fit-content',
|
16272
|
+
opacity: 0.8
|
16275
16273
|
};
|
16276
16274
|
};
|
16277
16275
|
const iconStyle = (theme) => {
|
@@ -16286,6 +16284,8 @@ const textStyle = (theme) => {
|
|
16286
16284
|
fontSize: `1rem`
|
16287
16285
|
};
|
16288
16286
|
};
|
16287
|
+
const isSpeakingAndMutedAnimationStyles = Object.assign({}, react.AnimationStyles.fadeIn100);
|
16288
|
+
const isNotSpeakingAndMutedAnimationStyles = Object.assign(Object.assign({}, react.AnimationStyles.fadeOut200), { display: 'none' });
|
16289
16289
|
|
16290
16290
|
// Copyright (c) Microsoft Corporation.
|
16291
16291
|
/**
|
@@ -17854,18 +17854,20 @@ class AzureCommunicationCallAdapter {
|
|
17854
17854
|
if (_isInCall((_b = (_a = this.getState().call) === null || _a === void 0 ? void 0 : _a.state) !== null && _b !== void 0 ? _b : 'None')) {
|
17855
17855
|
throw new Error('You are already in the call!');
|
17856
17856
|
}
|
17857
|
-
/* @conditional-compile-remove(teams-adhoc-call) */
|
17858
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
17859
|
-
if (isOutboundCall(this.locator)) {
|
17860
|
-
const phoneNumber = this.getState().alternateCallerId;
|
17861
|
-
return this.startCall(this.locator.participantIDs, {
|
17862
|
-
alternateCallerId: phoneNumber ? { phoneNumber: phoneNumber } : undefined
|
17863
|
-
});
|
17864
|
-
}
|
17865
17857
|
return this.teeErrorToEventEmitter(() => {
|
17866
17858
|
const audioOptions = { muted: !(microphoneOn !== null && microphoneOn !== void 0 ? microphoneOn : this.getState().isLocalPreviewMicrophoneEnabled) };
|
17867
17859
|
// TODO: find a way to expose stream to here
|
17868
17860
|
const videoOptions = { localVideoStreams: this.localStream ? [this.localStream] : undefined };
|
17861
|
+
/* @conditional-compile-remove(teams-adhoc-call) */
|
17862
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
17863
|
+
if (isOutboundCall(this.locator)) {
|
17864
|
+
const phoneNumber = this.getState().alternateCallerId;
|
17865
|
+
return this.startCall(this.locator.participantIds, {
|
17866
|
+
alternateCallerId: phoneNumber ? { phoneNumber: phoneNumber } : undefined,
|
17867
|
+
audioOptions,
|
17868
|
+
videoOptions
|
17869
|
+
});
|
17870
|
+
}
|
17869
17871
|
const call = this._joinCall(audioOptions, videoOptions);
|
17870
17872
|
this.processNewCall(call);
|
17871
17873
|
return call;
|
@@ -18313,7 +18315,7 @@ const isCallError = (e) => {
|
|
18313
18315
|
/* @conditional-compile-remove(teams-adhoc-call) */
|
18314
18316
|
/* @conditional-compile-remove(PSTN-calls) */
|
18315
18317
|
const isOutboundCall = (callLocator) => {
|
18316
|
-
return '
|
18318
|
+
return 'participantIds' in callLocator;
|
18317
18319
|
};
|
18318
18320
|
|
18319
18321
|
// Copyright (c) Microsoft Corporation.
|
@@ -18494,7 +18496,10 @@ const generateCustomCallWithChatControlBarButton = (onFetchCustomButtonProps, di
|
|
18494
18496
|
for (const key in response) {
|
18495
18497
|
response[key] = (React__default['default'].createElement(React__default['default'].Fragment, null, allButtonProps
|
18496
18498
|
.filter((buttonProps) => buttonProps.placement === key)
|
18497
|
-
.map((buttonProps, i) =>
|
18499
|
+
.map((buttonProps, i) => {
|
18500
|
+
var _a;
|
18501
|
+
return (React__default['default'].createElement(ControlBarButton, { ariaDescription: buttonProps.ariaDescription, ariaLabel: buttonProps.ariaLabel, disabled: buttonProps.disabled, id: buttonProps.id, key: (_a = buttonProps.key) !== null && _a !== void 0 ? _a : `${buttonProps.placement}_${i}`, onClick: buttonProps.onItemClick, onRenderIcon: () => { var _a; return React__default['default'].createElement(react.Icon, { iconName: (_a = buttonProps.iconName) !== null && _a !== void 0 ? _a : 'ControlButtonOptions' }); }, showLabel: buttonProps.showLabel, strings: generateCustomControlBarButtonStrings(buttonProps.text), styles: buttonProps.styles }));
|
18502
|
+
})));
|
18498
18503
|
}
|
18499
18504
|
return response;
|
18500
18505
|
};
|
@@ -18512,13 +18517,17 @@ const generateCustomCallWithChatDrawerButtons = (onFetchCustomButtonProps, displ
|
|
18512
18517
|
for (const key in response) {
|
18513
18518
|
response[key] = (React__default['default'].createElement(React__default['default'].Fragment, null, allButtonProps
|
18514
18519
|
.filter((buttonProps) => buttonProps.placement === key)
|
18515
|
-
.map((buttonProps, i) =>
|
18516
|
-
|
18517
|
-
|
18518
|
-
|
18519
|
-
|
18520
|
-
|
18521
|
-
|
18520
|
+
.map((buttonProps, i) => {
|
18521
|
+
var _a;
|
18522
|
+
return ({
|
18523
|
+
disabled: buttonProps.disabled,
|
18524
|
+
id: buttonProps.id,
|
18525
|
+
iconProps: { iconName: buttonProps.iconName },
|
18526
|
+
itemKey: (_a = buttonProps.key) !== null && _a !== void 0 ? _a : `${buttonProps.placement}_${i}`,
|
18527
|
+
onItemClick: buttonProps.onItemClick,
|
18528
|
+
text: buttonProps.text
|
18529
|
+
});
|
18530
|
+
})));
|
18522
18531
|
}
|
18523
18532
|
return response;
|
18524
18533
|
};
|