@azure/communication-react 1.5.1-alpha-202304010014 → 1.5.1-alpha-202304040013
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 +8 -0
- package/dist/dist-cjs/communication-react/index.js +252 -176
- 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/communication-react/src/index.d.ts +1 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.js +28 -25
- package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Caption.d.ts +21 -0
- package/dist/dist-esm/react-components/src/components/Caption.js +32 -0
- package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +31 -29
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +7 -0
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +5 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/index.js +1 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +21 -0
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +41 -0
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -0
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +14 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +100 -41
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/package.json +8 -8
- package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.d.ts +0 -13
- package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js +0 -35
- package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js.map +0 -1
@@ -5417,6 +5417,8 @@ export declare type FileDownloadHandler = (userId: string, fileMetadata: FileMet
|
|
5417
5417
|
* @beta
|
5418
5418
|
*/
|
5419
5419
|
export declare interface FileMetadata {
|
5420
|
+
attachmentType: FileMetadataAttachmentType;
|
5421
|
+
id: string;
|
5420
5422
|
/**
|
5421
5423
|
* File name to be displayed.
|
5422
5424
|
*/
|
@@ -5431,8 +5433,14 @@ export declare interface FileMetadata {
|
|
5431
5433
|
* Download URL for the file.
|
5432
5434
|
*/
|
5433
5435
|
url: string;
|
5436
|
+
previewUrl?: string;
|
5434
5437
|
}
|
5435
5438
|
|
5439
|
+
/**
|
5440
|
+
* @beta
|
5441
|
+
*/
|
5442
|
+
export declare type FileMetadataAttachmentType = 'fileSharing' | /* @conditional-compile-remove(teams-inline-images) */ 'teamsInlineImage' | 'unknown';
|
5443
|
+
|
5436
5444
|
/**
|
5437
5445
|
* Properties for configuring the File Sharing feature.
|
5438
5446
|
* @beta
|
@@ -162,7 +162,7 @@ const _toCommunicationIdentifier = (id) => {
|
|
162
162
|
// Copyright (c) Microsoft Corporation.
|
163
163
|
// Licensed under the MIT license.
|
164
164
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
165
|
-
var telemetryVersion = '1.5.1-alpha-
|
165
|
+
var telemetryVersion = '1.5.1-alpha-202304040013';
|
166
166
|
|
167
167
|
// Copyright (c) Microsoft Corporation.
|
168
168
|
/**
|
@@ -6935,7 +6935,11 @@ const _FileDownloadCards = (props) => {
|
|
6935
6935
|
}
|
6936
6936
|
}
|
6937
6937
|
}), [props]);
|
6938
|
-
if
|
6938
|
+
// Its safe to assume that if the first item in the fileMetadata is not a fileSharing type we don't want to display the FileDownloadCard.
|
6939
|
+
// Since you can't have both fileSharing and teamsInlineImage in the same message.
|
6940
|
+
if (!fileMetadata ||
|
6941
|
+
fileMetadata.length === 0 ||
|
6942
|
+
/* @conditional-compile-remove(teams-inline-images) */ fileMetadata[0].attachmentType !== 'fileSharing') {
|
6939
6943
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
6940
6944
|
}
|
6941
6945
|
return (React__default['default'].createElement("div", { style: fileDownloadCardsStyle, "data-ui-id": "file-download-card-group" },
|
@@ -11886,37 +11890,40 @@ const CameraButton = (props) => {
|
|
11886
11890
|
}
|
11887
11891
|
}
|
11888
11892
|
}), [cameraOn, localVideoViewOptions, onToggleCamera, toggleAnnouncerString]);
|
11893
|
+
const splitButtonMenuItems = [
|
11894
|
+
{
|
11895
|
+
key: 'cameraPrimaryAction',
|
11896
|
+
text: props.checked ? strings.onSplitButtonPrimaryActionCamera : strings.offSplitButtonPrimaryActionCamera,
|
11897
|
+
onClick: () => {
|
11898
|
+
onToggleClick();
|
11899
|
+
},
|
11900
|
+
iconProps: {
|
11901
|
+
iconName: props.checked ? 'SplitButtonPrimaryActionCameraOn' : 'SplitButtonPrimaryActionCameraOff',
|
11902
|
+
styles: { root: { lineHeight: 0 } }
|
11903
|
+
}
|
11904
|
+
}
|
11905
|
+
];
|
11906
|
+
/* @conditional-compile-remove(video-background-effects) */
|
11907
|
+
if (props.onShowVideoEffectsPicker) {
|
11908
|
+
splitButtonMenuItems.push({
|
11909
|
+
key: 'effects',
|
11910
|
+
text: 'Effects',
|
11911
|
+
title: 'Video Effects',
|
11912
|
+
iconProps: { iconName: 'OptionsVideoBackgroundEffect', styles: { root: { lineHeight: 0 } } },
|
11913
|
+
onClick: () => {
|
11914
|
+
if (props.onShowVideoEffectsPicker) {
|
11915
|
+
props.onShowVideoEffectsPicker(true);
|
11916
|
+
}
|
11917
|
+
}
|
11918
|
+
});
|
11919
|
+
}
|
11889
11920
|
const splitButtonPrimaryAction = {
|
11890
11921
|
key: 'primaryAction',
|
11891
11922
|
title: 'toggle camera',
|
11892
11923
|
itemType: react.ContextualMenuItemType.Section,
|
11893
11924
|
sectionProps: {
|
11894
11925
|
topDivider: true,
|
11895
|
-
items:
|
11896
|
-
{
|
11897
|
-
key: 'cameraPrimaryAction',
|
11898
|
-
text: props.checked ? strings.onSplitButtonPrimaryActionCamera : strings.offSplitButtonPrimaryActionCamera,
|
11899
|
-
onClick: () => {
|
11900
|
-
onToggleClick();
|
11901
|
-
},
|
11902
|
-
iconProps: {
|
11903
|
-
iconName: props.checked ? 'SplitButtonPrimaryActionCameraOn' : 'SplitButtonPrimaryActionCameraOff',
|
11904
|
-
styles: { root: { lineHeight: 0 } }
|
11905
|
-
}
|
11906
|
-
},
|
11907
|
-
/* @conditional-compile-remove(video-background-effects) */
|
11908
|
-
{
|
11909
|
-
key: 'effects',
|
11910
|
-
text: 'Effects',
|
11911
|
-
title: 'Video Effects',
|
11912
|
-
iconProps: { iconName: 'OptionsVideoBackgroundEffect', styles: { root: { lineHeight: 0 } } },
|
11913
|
-
onClick: () => {
|
11914
|
-
if (props.onShowVideoEffectsPicker) {
|
11915
|
-
props.onShowVideoEffectsPicker(true);
|
11916
|
-
}
|
11917
|
-
}
|
11918
|
-
}
|
11919
|
-
]
|
11926
|
+
items: splitButtonMenuItems
|
11920
11927
|
}
|
11921
11928
|
};
|
11922
11929
|
return (React__default['default'].createElement(React__default['default'].Fragment, null,
|
@@ -13516,23 +13523,15 @@ const _VideoBackgroundEffectsPicker = (props) => {
|
|
13516
13523
|
* @private
|
13517
13524
|
*/
|
13518
13525
|
react.mergeStyles({
|
13519
|
-
|
13520
|
-
overflowX: 'hidden',
|
13521
|
-
width: '100%',
|
13522
|
-
height: _pxToRem(60),
|
13523
|
-
display: 'grid',
|
13524
|
-
gridTemplateColumns: 'auto 1fr',
|
13525
|
-
alignItems: 'stretch',
|
13526
|
-
columnGap: _pxToRem(16),
|
13527
|
-
padding: _pxToRem(8)
|
13526
|
+
marginRight: _pxToRem(8)
|
13528
13527
|
});
|
13529
13528
|
/**
|
13530
13529
|
* @private
|
13531
13530
|
*/
|
13532
13531
|
react.mergeStyles({
|
13533
|
-
fontWeight:
|
13532
|
+
fontWeight: 400,
|
13534
13533
|
fontSize: _pxToRem(12),
|
13535
|
-
lineHeight: _pxToRem(
|
13534
|
+
lineHeight: _pxToRem(16)
|
13536
13535
|
});
|
13537
13536
|
/**
|
13538
13537
|
* @private
|
@@ -13540,7 +13539,21 @@ react.mergeStyles({
|
|
13540
13539
|
react.mergeStyles({
|
13541
13540
|
fontWeight: 400,
|
13542
13541
|
fontSize: _pxToRem(16),
|
13543
|
-
lineHeight: _pxToRem(
|
13542
|
+
lineHeight: _pxToRem(22)
|
13543
|
+
});
|
13544
|
+
/**
|
13545
|
+
* @private
|
13546
|
+
*/
|
13547
|
+
react.mergeStyles({
|
13548
|
+
marginTop: _pxToRem(6),
|
13549
|
+
marginBottom: _pxToRem(6)
|
13550
|
+
});
|
13551
|
+
/**
|
13552
|
+
* @private
|
13553
|
+
*/
|
13554
|
+
react.mergeStyles({
|
13555
|
+
height: _pxToRem(100),
|
13556
|
+
overflow: 'scroll'
|
13544
13557
|
});
|
13545
13558
|
|
13546
13559
|
// Copyright (c) Microsoft Corporation.
|
@@ -19253,8 +19266,42 @@ const inferCommonCallControlOptions = (mobileView, commonCallControlOptions) =>
|
|
19253
19266
|
const CommonCallControlBar = (props) => {
|
19254
19267
|
var _a, _b, _c;
|
19255
19268
|
const theme = react.useTheme();
|
19269
|
+
const controlBarContainerRef = React.useRef(null);
|
19270
|
+
const sidepaneControlsRef = React.useRef(null);
|
19271
|
+
const controlBarSizeRef = React.useRef(null);
|
19272
|
+
const [controlBarButtonsWidth, setControlBarButtonsWidth] = React.useState(0);
|
19273
|
+
const [panelsButtonsWidth, setPanelsButtonsWidth] = React.useState(0);
|
19274
|
+
const [controlBarContainerWidth, setControlBarContainerWidth] = React.useState(0);
|
19275
|
+
const [totalButtonsWidth, setTotalButtonsWidth] = React.useState(0);
|
19276
|
+
const [isOutOfSpace, setIsOutOfSpace] = React.useState(false);
|
19256
19277
|
const callWithChatStrings = useCallWithChatCompositeStrings();
|
19257
19278
|
const options = inferCommonCallControlOptions(props.mobileView, props.callControls);
|
19279
|
+
const handleResize = React.useCallback(() => {
|
19280
|
+
setControlBarButtonsWidth(controlBarContainerRef.current ? controlBarContainerRef.current.offsetWidth : 0);
|
19281
|
+
setPanelsButtonsWidth(sidepaneControlsRef.current ? sidepaneControlsRef.current.offsetWidth : 0);
|
19282
|
+
setControlBarContainerWidth(controlBarSizeRef.current ? controlBarSizeRef.current.offsetWidth : 0);
|
19283
|
+
}, []);
|
19284
|
+
// on load set inital width
|
19285
|
+
React.useEffect(() => {
|
19286
|
+
setControlBarButtonsWidth(controlBarContainerRef.current ? controlBarContainerRef.current.offsetWidth : 0);
|
19287
|
+
setPanelsButtonsWidth(sidepaneControlsRef.current ? sidepaneControlsRef.current.offsetWidth : 0);
|
19288
|
+
setControlBarContainerWidth(controlBarSizeRef.current ? controlBarSizeRef.current.offsetWidth : 0);
|
19289
|
+
}, []);
|
19290
|
+
// get the current width of control bar buttons and panel control buttons when browser size change
|
19291
|
+
React.useEffect(() => {
|
19292
|
+
window.addEventListener('resize', handleResize);
|
19293
|
+
return () => window.removeEventListener('resize', handleResize);
|
19294
|
+
}, [handleResize]);
|
19295
|
+
/* when size change, reset total buttons width and compare with the control bar container width
|
19296
|
+
if the total width of those buttons exceed container width, do not center the control bar buttons based on parent container width
|
19297
|
+
Instead let them take up the remaining white space on the left */
|
19298
|
+
React.useEffect(() => {
|
19299
|
+
// white space on the left when control bar buttons are centered based on container width + control bar buttons width + panel control buttons width
|
19300
|
+
setTotalButtonsWidth((controlBarContainerWidth - controlBarButtonsWidth) / 2 + controlBarButtonsWidth + panelsButtonsWidth);
|
19301
|
+
}, [controlBarButtonsWidth, panelsButtonsWidth, controlBarContainerWidth]);
|
19302
|
+
React.useEffect(() => {
|
19303
|
+
setIsOutOfSpace(totalButtonsWidth > controlBarContainerWidth);
|
19304
|
+
}, [totalButtonsWidth, controlBarContainerWidth]);
|
19258
19305
|
const chatButtonStrings = React.useMemo(() => ({
|
19259
19306
|
label: callWithChatStrings.chatButtonLabel,
|
19260
19307
|
tooltipOffContent: callWithChatStrings.chatButtonTooltipOpen,
|
@@ -19281,6 +19328,11 @@ const CommonCallControlBar = (props) => {
|
|
19281
19328
|
const screenShareButtonStyles = React.useMemo(() => (!props.mobileView ? getDesktopScreenShareButtonStyles(theme) : undefined), [props.mobileView, theme]);
|
19282
19329
|
const commonButtonStyles = React.useMemo(() => (!props.mobileView ? getDesktopCommonButtonStyles(theme) : undefined), [props.mobileView, theme]);
|
19283
19330
|
const endCallButtonStyles = React.useMemo(() => (!props.mobileView ? getDesktopEndCallButtonStyles(theme) : undefined), [props.mobileView, theme]);
|
19331
|
+
const controlBarWrapperDesktopStyles = React.useMemo(
|
19332
|
+
// only center control bar buttons based on parent container if there are enough space on the screen and not mobile
|
19333
|
+
() => (!props.mobileView && !isOutOfSpace ? (props.rtl ? wrapperDesktopRtlStyles : wrapperDesktopStyles) : {}), [props.mobileView, props.rtl, isOutOfSpace]);
|
19334
|
+
// only center control bar buttons based on parent container if there are enough space on the screen and not mobile
|
19335
|
+
const controlBarDesktopContainerStyles = React.useMemo(() => (!props.mobileView && !isOutOfSpace ? { position: 'relative' } : {}), [props.mobileView, isOutOfSpace]);
|
19284
19336
|
/* @conditional-compile-remove(control-bar-button-injection) */
|
19285
19337
|
const customButtons = React.useMemo(() => generateCustomCallControlBarButton(onFetchCustomButtonPropsTrampoline(options !== false ? options : undefined), options !== false ? options === null || options === void 0 ? void 0 : options.displayType : undefined), [options]);
|
19286
19338
|
// when options is false then we want to hide the whole control bar.
|
@@ -19288,47 +19340,51 @@ const CommonCallControlBar = (props) => {
|
|
19288
19340
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
19289
19341
|
}
|
19290
19342
|
const chatButton = props.chatAdapter ? (React__default['default'].createElement(ChatButtonWithUnreadMessagesBadge, { chatAdapter: props.chatAdapter, checked: props.chatButtonChecked, showLabel: options.displayType !== 'compact', isChatPaneVisible: (_a = props.chatButtonChecked) !== null && _a !== void 0 ? _a : false, onClick: props.onChatButtonClicked, disabled: props.disableButtonsForLobbyPage || isDisabled$2(options.chatButton), strings: chatButtonStrings, styles: commonButtonStyles, newMessageLabel: callWithChatStrings.chatButtonNewMessageNotificationLabel })) : (React__default['default'].createElement(React__default['default'].Fragment, null));
|
19291
|
-
return (React__default['default'].createElement(
|
19292
|
-
React__default['default'].createElement(react.Stack
|
19293
|
-
React__default['default'].createElement(
|
19294
|
-
React__default['default'].createElement(
|
19295
|
-
React__default['default'].createElement(
|
19296
|
-
|
19297
|
-
React__default['default'].createElement(
|
19298
|
-
|
19299
|
-
|
19300
|
-
|
19301
|
-
|
19302
|
-
|
19303
|
-
|
19304
|
-
|
19305
|
-
|
19306
|
-
|
19307
|
-
|
19308
|
-
|
19309
|
-
|
19310
|
-
|
19311
|
-
|
19312
|
-
_b.slice(0, props.mobileView
|
19313
|
-
? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS
|
19314
|
-
: CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
19315
|
-
return (React__default['default'].createElement(CustomButton, { key: `primary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
|
19316
|
-
}),
|
19317
|
-
props.mobileView && (React__default['default'].createElement(MoreButton, { "data-ui-id": "call-with-chat-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage })),
|
19318
|
-
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.moreButton) &&
|
19319
|
-
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.holdButton) &&
|
19320
|
-
!props.mobileView && (React__default['default'].createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles, onClickShowDialpad: props.onClickShowDialpad,
|
19343
|
+
return (React__default['default'].createElement("div", { ref: controlBarSizeRef },
|
19344
|
+
React__default['default'].createElement(react.Stack, { horizontal: true, reversed: !props.mobileView && !isOutOfSpace, horizontalAlign: "space-between", className: react.mergeStyles(callControlsContainerStyles, controlBarContainerStyles$1, controlBarDesktopContainerStyles) },
|
19345
|
+
React__default['default'].createElement(react.Stack.Item, { grow: true, className: react.mergeStyles(controlBarWrapperDesktopStyles) },
|
19346
|
+
React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
19347
|
+
React__default['default'].createElement(react.Stack, { horizontalAlign: "center" },
|
19348
|
+
React__default['default'].createElement(HiddenFocusStartPoint, null),
|
19349
|
+
React__default['default'].createElement(react.Stack.Item, null,
|
19350
|
+
React__default['default'].createElement("div", { ref: controlBarContainerRef },
|
19351
|
+
React__default['default'].createElement(ControlBar, { layout: "horizontal", styles: centerContainerStyles },
|
19352
|
+
isEnabled$1(options.microphoneButton) && (React__default['default'].createElement(Microphone, { displayType: options.displayType, styles: commonButtonStyles, splitButtonsForDeviceSelection: !props.mobileView,
|
19353
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
19354
|
+
disabled: props.disableButtonsForHoldScreen || isDisabled$2(options.microphoneButton) })),
|
19355
|
+
isEnabled$1(options.cameraButton) && (React__default['default'].createElement(Camera, { displayType: options.displayType, styles: commonButtonStyles, splitButtonsForDeviceSelection: !props.mobileView,
|
19356
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
19357
|
+
disabled: props.disableButtonsForHoldScreen || isDisabled$2(options.cameraButton),
|
19358
|
+
/* @conditional-compile-remove(video-background-effects) */
|
19359
|
+
onShowVideoEffectsPicker: props.onShowVideoEffectsPicker })),
|
19360
|
+
props.mobileView && isEnabled$1(options === null || options === void 0 ? void 0 : options.chatButton) && chatButton,
|
19361
|
+
isEnabled$1(options.screenShareButton) && (React__default['default'].createElement(ScreenShare, { option: options.screenShareButton, displayType: options.displayType, styles: screenShareButtonStyles,
|
19362
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
19363
|
+
disabled: props.disableButtonsForHoldScreen || isDisabled$2(options.screenShareButton) })),
|
19321
19364
|
/* @conditional-compile-remove(control-bar-button-injection) */
|
19322
|
-
|
19323
|
-
|
19324
|
-
|
19325
|
-
|
19326
|
-
|
19327
|
-
|
19328
|
-
|
19329
|
-
|
19330
|
-
|
19331
|
-
|
19365
|
+
(_b = customButtons['primary']) === null || _b === void 0 ? void 0 :
|
19366
|
+
_b.slice(0, props.mobileView
|
19367
|
+
? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS
|
19368
|
+
: CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
19369
|
+
return (React__default['default'].createElement(CustomButton, { key: `primary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
|
19370
|
+
}),
|
19371
|
+
props.mobileView && (React__default['default'].createElement(MoreButton, { "data-ui-id": "call-with-chat-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage })),
|
19372
|
+
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.moreButton) &&
|
19373
|
+
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.holdButton) &&
|
19374
|
+
!props.mobileView && (React__default['default'].createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles, onClickShowDialpad: props.onClickShowDialpad,
|
19375
|
+
/* @conditional-compile-remove(control-bar-button-injection) */
|
19376
|
+
callControls: props.callControls })),
|
19377
|
+
React__default['default'].createElement(EndCall, { displayType: "compact", styles: endCallButtonStyles }))))))),
|
19378
|
+
!props.mobileView && (React__default['default'].createElement(react.Stack.Item, null,
|
19379
|
+
React__default['default'].createElement("div", { ref: sidepaneControlsRef },
|
19380
|
+
React__default['default'].createElement(react.Stack, { horizontal: true, className: !props.mobileView ? react.mergeStyles(desktopButtonContainerStyle) : undefined },
|
19381
|
+
/* @conditional-compile-remove(control-bar-button-injection) */
|
19382
|
+
(_c = customButtons['secondary']) === null || _c === void 0 ? void 0 :
|
19383
|
+
_c.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
19384
|
+
return (React__default['default'].createElement(CustomButton, { key: `secondary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
|
19385
|
+
}),
|
19386
|
+
isEnabled$1(options === null || options === void 0 ? void 0 : options.peopleButton) && (React__default['default'].createElement(PeopleButton, { checked: props.peopleButtonChecked, ariaLabel: peopleButtonStrings === null || peopleButtonStrings === void 0 ? void 0 : peopleButtonStrings.label, showLabel: options.displayType !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "call-with-chat-composite-people-button", disabled: props.disableButtonsForLobbyPage || isDisabled$2(options.peopleButton), strings: peopleButtonStrings, styles: commonButtonStyles })),
|
19387
|
+
isEnabled$1(options === null || options === void 0 ? void 0 : options.chatButton) && chatButton)))))));
|
19332
19388
|
};
|
19333
19389
|
const desktopButtonContainerStyle = {
|
19334
19390
|
padding: '0.75rem',
|
@@ -19337,6 +19393,16 @@ const desktopButtonContainerStyle = {
|
|
19337
19393
|
const desktopControlBarStyles = {
|
19338
19394
|
root: desktopButtonContainerStyle
|
19339
19395
|
};
|
19396
|
+
const wrapperDesktopStyles = {
|
19397
|
+
position: 'absolute',
|
19398
|
+
left: '50%',
|
19399
|
+
transform: 'translate(-50%, 0)'
|
19400
|
+
};
|
19401
|
+
const wrapperDesktopRtlStyles = {
|
19402
|
+
position: 'absolute',
|
19403
|
+
right: '50%',
|
19404
|
+
transform: 'translate(-50%, 0)'
|
19405
|
+
};
|
19340
19406
|
const getDesktopCommonButtonStyles = (theme) => ({
|
19341
19407
|
root: {
|
19342
19408
|
border: `solid 1px ${theme.palette.neutralQuaternaryAlt}`,
|
@@ -20548,6 +20614,98 @@ const PreparedMoreDrawer = (props) => {
|
|
20548
20614
|
return React__default['default'].createElement(MoreDrawer, Object.assign({}, props, deviceProps, callHandlers, { strings: moreDrawerStrings }));
|
20549
20615
|
};
|
20550
20616
|
|
20617
|
+
var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
20618
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
20619
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
20620
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
20621
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
20622
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
20623
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
20624
|
+
});
|
20625
|
+
};
|
20626
|
+
/**
|
20627
|
+
* Pane that is used to show video effects button
|
20628
|
+
* @private
|
20629
|
+
*/
|
20630
|
+
/** @beta */
|
20631
|
+
const VideoEffectsPane = (props) => {
|
20632
|
+
const { showVideoEffectsOptions, setshowVideoEffectsOptions } = props;
|
20633
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20634
|
+
const locale = useLocale();
|
20635
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20636
|
+
const strings = locale.strings.call;
|
20637
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20638
|
+
const selectableVideoEffects = React.useMemo(() => {
|
20639
|
+
const videoEffects = [
|
20640
|
+
{
|
20641
|
+
key: 'none',
|
20642
|
+
iconProps: {
|
20643
|
+
iconName: 'RemoveVideoBackgroundEffect'
|
20644
|
+
},
|
20645
|
+
title: strings.removeBackgroundEffectButtonLabel,
|
20646
|
+
tooltipProps: {
|
20647
|
+
content: strings.removeBackgroundTooltip
|
20648
|
+
}
|
20649
|
+
},
|
20650
|
+
{
|
20651
|
+
key: 'blur',
|
20652
|
+
iconProps: {
|
20653
|
+
iconName: 'BlurVideoBackground'
|
20654
|
+
},
|
20655
|
+
title: strings.blurBackgroundEffectButtonLabel,
|
20656
|
+
tooltipProps: {
|
20657
|
+
content: strings.blurBackgroundTooltip
|
20658
|
+
}
|
20659
|
+
}
|
20660
|
+
];
|
20661
|
+
const videoEffectImages = props.adapter.getState().videoBackgroundImages;
|
20662
|
+
if (videoEffectImages) {
|
20663
|
+
videoEffectImages.forEach((img) => {
|
20664
|
+
var _a;
|
20665
|
+
videoEffects.push({
|
20666
|
+
key: img.key,
|
20667
|
+
backgroundProps: {
|
20668
|
+
url: img.url
|
20669
|
+
},
|
20670
|
+
tooltipProps: {
|
20671
|
+
content: (_a = img.tooltipText) !== null && _a !== void 0 ? _a : ''
|
20672
|
+
}
|
20673
|
+
});
|
20674
|
+
});
|
20675
|
+
}
|
20676
|
+
return videoEffects;
|
20677
|
+
}, [strings, props.adapter]);
|
20678
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20679
|
+
const onEffectChange = React.useCallback((effectKey) => __awaiter$9(void 0, void 0, void 0, function* () {
|
20680
|
+
console.log(props.adapter.getState());
|
20681
|
+
if (effectKey === 'blur') {
|
20682
|
+
props.adapter.blurVideoBackground();
|
20683
|
+
}
|
20684
|
+
else if (effectKey === 'none') {
|
20685
|
+
props.adapter.stopVideoBackgroundEffect();
|
20686
|
+
}
|
20687
|
+
else {
|
20688
|
+
const backgroundImg = selectableVideoEffects.find((effect) => {
|
20689
|
+
return effect.key === effectKey;
|
20690
|
+
});
|
20691
|
+
if (backgroundImg && backgroundImg.backgroundProps) {
|
20692
|
+
props.adapter.replaceVideoBackground({ backgroundImageUrl: backgroundImg.backgroundProps.url });
|
20693
|
+
}
|
20694
|
+
}
|
20695
|
+
}), [props.adapter, selectableVideoEffects]);
|
20696
|
+
return VideoEffectsPaneTrampoline(showVideoEffectsOptions, setshowVideoEffectsOptions,
|
20697
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20698
|
+
selectableVideoEffects,
|
20699
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20700
|
+
onEffectChange);
|
20701
|
+
};
|
20702
|
+
const VideoEffectsPaneTrampoline = (showVideoEffectsOptions, setshowVideoEffectsOptions, selectableVideoEffects, onEffectChange) => {
|
20703
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20704
|
+
const locale = useLocale();
|
20705
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20706
|
+
return (React__default['default'].createElement(react.Panel, { headerText: locale.strings.call.effects, isOpen: showVideoEffectsOptions, onDismiss: () => setshowVideoEffectsOptions(false), hasCloseButton: true, closeButtonAriaLabel: "Close", isLightDismiss: true }, selectableVideoEffects && (React__default['default'].createElement(_VideoBackgroundEffectsPicker, { options: selectableVideoEffects, onChange: onEffectChange }))));
|
20707
|
+
};
|
20708
|
+
|
20551
20709
|
// Copyright (c) Microsoft Corporation.
|
20552
20710
|
/**
|
20553
20711
|
* @private
|
@@ -20588,6 +20746,12 @@ const CallArrangement = (props) => {
|
|
20588
20746
|
dialpadCloseModalButtonAriaLabel: callWithChatStrings.dialpadCloseModalButtonAriaLabel,
|
20589
20747
|
placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText
|
20590
20748
|
}), [callWithChatStrings]);
|
20749
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20750
|
+
const [showVideoEffectsPane, setVideoEffectsPane] = React.useState(false);
|
20751
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20752
|
+
const setShowVideoEffectsPane = React.useCallback((showVideoEffectsOptions) => {
|
20753
|
+
setVideoEffectsPane(showVideoEffectsOptions);
|
20754
|
+
}, [setVideoEffectsPane]);
|
20591
20755
|
const [showDrawer, setShowDrawer] = React.useState(false);
|
20592
20756
|
const onMoreButtonClicked = React.useCallback(() => {
|
20593
20757
|
closePane();
|
@@ -20658,7 +20822,9 @@ const CallArrangement = (props) => {
|
|
20658
20822
|
/* @conditional-compile-remove(one-to-n-calling) */
|
20659
20823
|
peopleButtonChecked: activePane === 'people',
|
20660
20824
|
/* @conditional-compile-remove(one-to-n-calling) */
|
20661
|
-
onPeopleButtonClicked: togglePeoplePane }))) : (React__default['default'].createElement(CommonCallControlBar, Object.assign({}, props.callControlProps, { callAdapter: adapter, mobileView: props.mobileView, disableButtonsForLobbyPage: isInLobby, peopleButtonChecked: activePane === 'people', onPeopleButtonClicked: togglePeoplePane, onMoreButtonClicked: onMoreButtonClicked
|
20825
|
+
onPeopleButtonClicked: togglePeoplePane }))) : (React__default['default'].createElement(CommonCallControlBar, Object.assign({}, props.callControlProps, { callAdapter: adapter, mobileView: props.mobileView, disableButtonsForLobbyPage: isInLobby, peopleButtonChecked: activePane === 'people', onPeopleButtonClicked: togglePeoplePane, onMoreButtonClicked: onMoreButtonClicked,
|
20826
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20827
|
+
onShowVideoEffectsPicker: setShowVideoEffectsPane }))))),
|
20662
20828
|
((_d = props.callControlProps) === null || _d === void 0 ? void 0 : _d.options) !== false && showDrawer && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStylesValue },
|
20663
20829
|
React__default['default'].createElement(PreparedMoreDrawer, { callControls: props.callControlProps.options, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
|
20664
20830
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -20680,7 +20846,9 @@ const CallArrangement = (props) => {
|
|
20680
20846
|
canUnmute && !!props.mutedNotificationProps && (React__default['default'].createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps)))),
|
20681
20847
|
props.onRenderGalleryContent && props.onRenderGalleryContent()))),
|
20682
20848
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
20683
|
-
callPaneContent())
|
20849
|
+
callPaneContent()),
|
20850
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20851
|
+
React__default['default'].createElement(VideoEffectsPane, { showVideoEffectsOptions: showVideoEffectsPane, setshowVideoEffectsOptions: setShowVideoEffectsPane, adapter: adapter })))));
|
20684
20852
|
};
|
20685
20853
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
20686
20854
|
const showShowPeopleTabHeaderButton$1 = (callControls) => {
|
@@ -21590,7 +21758,7 @@ const localPreviewTileStyle = {
|
|
21590
21758
|
|
21591
21759
|
// Copyright (c) Microsoft Corporation.
|
21592
21760
|
// Licensed under the MIT license.
|
21593
|
-
var __awaiter$
|
21761
|
+
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21594
21762
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21595
21763
|
return new (P || (P = Promise))(function (resolve, reject) {
|
21596
21764
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -21610,7 +21778,7 @@ const LocalPreview = (props) => {
|
|
21610
21778
|
const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
|
21611
21779
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
21612
21780
|
const adapter = useAdapter();
|
21613
|
-
const onToggleMic = React.useCallback(() => __awaiter$
|
21781
|
+
const onToggleMic = React.useCallback(() => __awaiter$8(void 0, void 0, void 0, function* () {
|
21614
21782
|
isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
|
21615
21783
|
}), [adapter, isLocalMicrophoneEnabled]);
|
21616
21784
|
const hasNoDevices = devicesButtonProps.cameras.length === 0 &&
|
@@ -21863,98 +22031,6 @@ const CallReadinessModalFallBack = (props) => {
|
|
21863
22031
|
}
|
21864
22032
|
};
|
21865
22033
|
|
21866
|
-
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21867
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21868
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
21869
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
21870
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
21871
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
21872
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
21873
|
-
});
|
21874
|
-
};
|
21875
|
-
/**
|
21876
|
-
* Pane that is used to show video effects button
|
21877
|
-
* @private
|
21878
|
-
*/
|
21879
|
-
/** @beta */
|
21880
|
-
const VideoEffectsPane = (props) => {
|
21881
|
-
const { showVideoEffectsOptions, setshowVideoEffectsOptions } = props;
|
21882
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21883
|
-
const locale = useLocale();
|
21884
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21885
|
-
const strings = locale.strings.call;
|
21886
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21887
|
-
const selectableVideoEffects = React.useMemo(() => {
|
21888
|
-
const videoEffects = [
|
21889
|
-
{
|
21890
|
-
key: 'none',
|
21891
|
-
iconProps: {
|
21892
|
-
iconName: 'RemoveVideoBackgroundEffect'
|
21893
|
-
},
|
21894
|
-
title: strings.removeBackgroundEffectButtonLabel,
|
21895
|
-
tooltipProps: {
|
21896
|
-
content: strings.removeBackgroundTooltip
|
21897
|
-
}
|
21898
|
-
},
|
21899
|
-
{
|
21900
|
-
key: 'blur',
|
21901
|
-
iconProps: {
|
21902
|
-
iconName: 'BlurVideoBackground'
|
21903
|
-
},
|
21904
|
-
title: strings.blurBackgroundEffectButtonLabel,
|
21905
|
-
tooltipProps: {
|
21906
|
-
content: strings.blurBackgroundTooltip
|
21907
|
-
}
|
21908
|
-
}
|
21909
|
-
];
|
21910
|
-
const videoEffectImages = props.adapter.getState().videoBackgroundImages;
|
21911
|
-
if (videoEffectImages) {
|
21912
|
-
videoEffectImages.forEach((img) => {
|
21913
|
-
var _a;
|
21914
|
-
videoEffects.push({
|
21915
|
-
key: img.key,
|
21916
|
-
backgroundProps: {
|
21917
|
-
url: img.url
|
21918
|
-
},
|
21919
|
-
tooltipProps: {
|
21920
|
-
content: (_a = img.tooltipText) !== null && _a !== void 0 ? _a : ''
|
21921
|
-
}
|
21922
|
-
});
|
21923
|
-
});
|
21924
|
-
}
|
21925
|
-
return videoEffects;
|
21926
|
-
}, [strings, props.adapter]);
|
21927
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21928
|
-
const onEffectChange = React.useCallback((effectKey) => __awaiter$8(void 0, void 0, void 0, function* () {
|
21929
|
-
console.log(props.adapter.getState());
|
21930
|
-
if (effectKey === 'blur') {
|
21931
|
-
props.adapter.blurVideoBackground();
|
21932
|
-
}
|
21933
|
-
else if (effectKey === 'none') {
|
21934
|
-
props.adapter.stopVideoBackgroundEffect();
|
21935
|
-
}
|
21936
|
-
else {
|
21937
|
-
const backgroundImg = selectableVideoEffects.find((effect) => {
|
21938
|
-
return effect.key === effectKey;
|
21939
|
-
});
|
21940
|
-
if (backgroundImg && backgroundImg.backgroundProps) {
|
21941
|
-
props.adapter.replaceVideoBackground({ backgroundImageUrl: backgroundImg.backgroundProps.url });
|
21942
|
-
}
|
21943
|
-
}
|
21944
|
-
}), [props.adapter, selectableVideoEffects]);
|
21945
|
-
return VideoEffectsPaneTrampoline(showVideoEffectsOptions, setshowVideoEffectsOptions,
|
21946
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21947
|
-
selectableVideoEffects,
|
21948
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21949
|
-
onEffectChange);
|
21950
|
-
};
|
21951
|
-
const VideoEffectsPaneTrampoline = (showVideoEffectsOptions, setshowVideoEffectsOptions, selectableVideoEffects, onEffectChange) => {
|
21952
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21953
|
-
const locale = useLocale();
|
21954
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21955
|
-
return (React__default['default'].createElement(react.Panel, { headerText: locale.strings.call.effects, isOpen: showVideoEffectsOptions, onDismiss: () => setshowVideoEffectsOptions(false), hasCloseButton: true, closeButtonAriaLabel: "Close", isLightDismiss: true }, selectableVideoEffects && (React__default['default'].createElement(_VideoBackgroundEffectsPicker, { options: selectableVideoEffects, onChange: onEffectChange }))));
|
21956
|
-
};
|
21957
|
-
|
21958
22034
|
// Copyright (c) Microsoft Corporation.
|
21959
22035
|
/**
|
21960
22036
|
* @private
|
@@ -24273,7 +24349,7 @@ const CallWithChatScreen = (props) => {
|
|
24273
24349
|
/* @conditional-compile-remove(PSTN-calls) */
|
24274
24350
|
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
|
24275
24351
|
/* @conditional-compile-remove(video-background-effects) */
|
24276
|
-
onShowVideoEffectsPicker: setShowVideoEffectsPane })))),
|
24352
|
+
onShowVideoEffectsPicker: setShowVideoEffectsPane, rtl: props.rtl })))),
|
24277
24353
|
showControlBar && showDrawer && (React__default['default'].createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
|
24278
24354
|
React__default['default'].createElement(CallAdapterProvider, { adapter: callAdapter },
|
24279
24355
|
React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles() },
|