@azure/communication-react 1.3.3-alpha-202208160041.0 → 1.3.3-alpha-202208170014.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 +4 -0
- package/dist/dist-cjs/communication-react/index.js +59 -2
- 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/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +49 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js +21 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +1 -1
- package/package.json +8 -8
@@ -2281,6 +2281,10 @@ export declare interface CallWithChatControlOptions {
|
|
2281
2281
|
* Show or hide the more button in the call-with-chat control bar.
|
2282
2282
|
*/
|
2283
2283
|
moreButton?: boolean;
|
2284
|
+
/**
|
2285
|
+
* Show or hide the hold button in the bottom sheet drawer
|
2286
|
+
*/
|
2287
|
+
holdButton?: boolean;
|
2284
2288
|
}
|
2285
2289
|
|
2286
2290
|
/**
|
@@ -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-202208170014.0';
|
196
196
|
|
197
197
|
// Copyright (c) Microsoft Corporation.
|
198
198
|
/**
|
@@ -18316,6 +18316,42 @@ const onFetchCustomButtonPropsTrampoline = (options) => {
|
|
18316
18316
|
return response;
|
18317
18317
|
};
|
18318
18318
|
|
18319
|
+
// Copyright (c) Microsoft Corporation.
|
18320
|
+
/**
|
18321
|
+
*
|
18322
|
+
* @private
|
18323
|
+
*/
|
18324
|
+
const DesktopMoreButton = (props) => {
|
18325
|
+
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
18326
|
+
const localeStrings = useLocale();
|
18327
|
+
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
18328
|
+
const holdButtonProps = usePropsFor$1(HoldButton);
|
18329
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
18330
|
+
const moreButtonStrings = React.useMemo(() => ({
|
18331
|
+
label: localeStrings.strings.call.moreButtonCallingLabel,
|
18332
|
+
tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip
|
18333
|
+
}), [localeStrings]);
|
18334
|
+
const moreButtonContextualMenuItems = () => {
|
18335
|
+
const items = [];
|
18336
|
+
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
18337
|
+
items.push({
|
18338
|
+
key: 'holdButtonKey',
|
18339
|
+
text: localeStrings.component.strings.holdButton.tooltipOffContent,
|
18340
|
+
onClick: () => {
|
18341
|
+
holdButtonProps.onToggleHold();
|
18342
|
+
},
|
18343
|
+
iconProps: { iconName: 'HoldCall', styles: { root: { lineHeight: 0 } } },
|
18344
|
+
itemProps: {
|
18345
|
+
styles: buttonFlyoutIncreasedSizeStyles
|
18346
|
+
}
|
18347
|
+
});
|
18348
|
+
return items;
|
18349
|
+
};
|
18350
|
+
return (React__default['default'].createElement(MoreButton, Object.assign({}, props, { "data-ui-id": "call-with-chat-composite-more-button",
|
18351
|
+
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
18352
|
+
strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems() } })));
|
18353
|
+
};
|
18354
|
+
|
18319
18355
|
// Copyright (c) Microsoft Corporation.
|
18320
18356
|
const inferCallWithChatControlOptions$1 = (mobileView, callWithChatControls) => {
|
18321
18357
|
if (callWithChatControls === false) {
|
@@ -18405,6 +18441,9 @@ const CallWithChatControlBar = (props) => {
|
|
18405
18441
|
return (React__default['default'].createElement(element.type, Object.assign({}, element.props, { key: element.props.strings.label, styles: commonButtonStyles, displayType: options.displayType, showLabel: options.displayType !== 'compact' })));
|
18406
18442
|
}),
|
18407
18443
|
props.mobileView && (React__default['default'].createElement(MoreButton, { "data-ui-id": "call-with-chat-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage })),
|
18444
|
+
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.moreButton) &&
|
18445
|
+
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.holdButton) &&
|
18446
|
+
!props.mobileView && (React__default['default'].createElement(DesktopMoreButton, { disabled: props.disableButtonsForLobbyPage, styles: commonButtonStyles })),
|
18408
18447
|
React__default['default'].createElement(EndCall, { displayType: "compact", styles: endCallButtonStyles })))))),
|
18409
18448
|
!props.mobileView && (React__default['default'].createElement(react.Stack, { horizontal: true, className: !props.mobileView ? react.mergeStyles(desktopButtonContainerStyle) : undefined },
|
18410
18449
|
/* @conditional-compile-remove(control-bar-button-injection) */
|
@@ -18738,6 +18777,10 @@ const MoreDrawer = (props) => {
|
|
18738
18777
|
var _a, _b, _c, _d, _e;
|
18739
18778
|
const drawerMenuItems = [];
|
18740
18779
|
const { speakers, onSelectSpeaker, onLightDismiss } = props;
|
18780
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
18781
|
+
const localeStrings = useLocale();
|
18782
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
18783
|
+
const holdButtonProps = usePropsFor$1(HoldButton);
|
18741
18784
|
const onSpeakerItemClick = React.useCallback((_ev, itemKey) => {
|
18742
18785
|
const selected = speakers === null || speakers === void 0 ? void 0 : speakers.find((speaker) => speaker.id === itemKey);
|
18743
18786
|
if (selected) {
|
@@ -18808,6 +18851,17 @@ const MoreDrawer = (props) => {
|
|
18808
18851
|
onItemClick: props.onPeopleButtonClicked
|
18809
18852
|
});
|
18810
18853
|
}
|
18854
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
18855
|
+
if (drawerSelectionOptions !== false && isEnabled(drawerSelectionOptions === null || drawerSelectionOptions === void 0 ? void 0 : drawerSelectionOptions.peopleButton)) {
|
18856
|
+
drawerMenuItems.push({
|
18857
|
+
itemKey: 'holdButtonKey',
|
18858
|
+
text: localeStrings.component.strings.holdButton.tooltipOffContent,
|
18859
|
+
onItemClick: () => {
|
18860
|
+
holdButtonProps.onToggleHold();
|
18861
|
+
},
|
18862
|
+
iconProps: { iconName: 'HoldCall', styles: { root: { lineHeight: 0 } } }
|
18863
|
+
});
|
18864
|
+
}
|
18811
18865
|
/* @conditional-compile-remove(control-bar-button-injection) */
|
18812
18866
|
const customDrawerButtons = React.useMemo(() => generateCustomCallWithChatDrawerButtons(onFetchCustomButtonPropsTrampoline(drawerSelectionOptions !== false ? drawerSelectionOptions : undefined), drawerSelectionOptions !== false ? drawerSelectionOptions === null || drawerSelectionOptions === void 0 ? void 0 : drawerSelectionOptions.displayType : undefined), [drawerSelectionOptions]);
|
18813
18867
|
/* @conditional-compile-remove(control-bar-button-injection) */
|
@@ -19053,7 +19107,10 @@ const CallWithChatComposite = (props) => {
|
|
19053
19107
|
/* @conditional-compile-remove(file-sharing) */
|
19054
19108
|
fileSharing: options === null || options === void 0 ? void 0 : options.fileSharing }))));
|
19055
19109
|
};
|
19056
|
-
const hasJoinedCallFn = (page, callStatus) =>
|
19110
|
+
const hasJoinedCallFn = (page, callStatus) => {
|
19111
|
+
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */
|
19112
|
+
return (page === 'call' && callStatus === 'Connected') || (page === 'hold' && callStatus === 'LocalHold');
|
19113
|
+
};
|
19057
19114
|
const showShowChatTabHeaderButton = (callControls) => {
|
19058
19115
|
if (callControls === undefined || callControls === true) {
|
19059
19116
|
return true;
|