@azure/communication-react 1.5.1-alpha-202304020014 → 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 +112 -98
- 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/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/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/package.json +8 -8
@@ -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" },
|
@@ -20610,6 +20614,98 @@ const PreparedMoreDrawer = (props) => {
|
|
20610
20614
|
return React__default['default'].createElement(MoreDrawer, Object.assign({}, props, deviceProps, callHandlers, { strings: moreDrawerStrings }));
|
20611
20615
|
};
|
20612
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
|
+
|
20613
20709
|
// Copyright (c) Microsoft Corporation.
|
20614
20710
|
/**
|
20615
20711
|
* @private
|
@@ -20650,6 +20746,12 @@ const CallArrangement = (props) => {
|
|
20650
20746
|
dialpadCloseModalButtonAriaLabel: callWithChatStrings.dialpadCloseModalButtonAriaLabel,
|
20651
20747
|
placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText
|
20652
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]);
|
20653
20755
|
const [showDrawer, setShowDrawer] = React.useState(false);
|
20654
20756
|
const onMoreButtonClicked = React.useCallback(() => {
|
20655
20757
|
closePane();
|
@@ -20720,7 +20822,9 @@ const CallArrangement = (props) => {
|
|
20720
20822
|
/* @conditional-compile-remove(one-to-n-calling) */
|
20721
20823
|
peopleButtonChecked: activePane === 'people',
|
20722
20824
|
/* @conditional-compile-remove(one-to-n-calling) */
|
20723
|
-
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 }))))),
|
20724
20828
|
((_d = props.callControlProps) === null || _d === void 0 ? void 0 : _d.options) !== false && showDrawer && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStylesValue },
|
20725
20829
|
React__default['default'].createElement(PreparedMoreDrawer, { callControls: props.callControlProps.options, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
|
20726
20830
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -20742,7 +20846,9 @@ const CallArrangement = (props) => {
|
|
20742
20846
|
canUnmute && !!props.mutedNotificationProps && (React__default['default'].createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps)))),
|
20743
20847
|
props.onRenderGalleryContent && props.onRenderGalleryContent()))),
|
20744
20848
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
20745
|
-
callPaneContent())
|
20849
|
+
callPaneContent()),
|
20850
|
+
/* @conditional-compile-remove(video-background-effects) */
|
20851
|
+
React__default['default'].createElement(VideoEffectsPane, { showVideoEffectsOptions: showVideoEffectsPane, setshowVideoEffectsOptions: setShowVideoEffectsPane, adapter: adapter })))));
|
20746
20852
|
};
|
20747
20853
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
20748
20854
|
const showShowPeopleTabHeaderButton$1 = (callControls) => {
|
@@ -21652,7 +21758,7 @@ const localPreviewTileStyle = {
|
|
21652
21758
|
|
21653
21759
|
// Copyright (c) Microsoft Corporation.
|
21654
21760
|
// Licensed under the MIT license.
|
21655
|
-
var __awaiter$
|
21761
|
+
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21656
21762
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21657
21763
|
return new (P || (P = Promise))(function (resolve, reject) {
|
21658
21764
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -21672,7 +21778,7 @@ const LocalPreview = (props) => {
|
|
21672
21778
|
const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
|
21673
21779
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
21674
21780
|
const adapter = useAdapter();
|
21675
|
-
const onToggleMic = React.useCallback(() => __awaiter$
|
21781
|
+
const onToggleMic = React.useCallback(() => __awaiter$8(void 0, void 0, void 0, function* () {
|
21676
21782
|
isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
|
21677
21783
|
}), [adapter, isLocalMicrophoneEnabled]);
|
21678
21784
|
const hasNoDevices = devicesButtonProps.cameras.length === 0 &&
|
@@ -21925,98 +22031,6 @@ const CallReadinessModalFallBack = (props) => {
|
|
21925
22031
|
}
|
21926
22032
|
};
|
21927
22033
|
|
21928
|
-
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
21929
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
21930
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
21931
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
21932
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
21933
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
21934
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
21935
|
-
});
|
21936
|
-
};
|
21937
|
-
/**
|
21938
|
-
* Pane that is used to show video effects button
|
21939
|
-
* @private
|
21940
|
-
*/
|
21941
|
-
/** @beta */
|
21942
|
-
const VideoEffectsPane = (props) => {
|
21943
|
-
const { showVideoEffectsOptions, setshowVideoEffectsOptions } = props;
|
21944
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21945
|
-
const locale = useLocale();
|
21946
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21947
|
-
const strings = locale.strings.call;
|
21948
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21949
|
-
const selectableVideoEffects = React.useMemo(() => {
|
21950
|
-
const videoEffects = [
|
21951
|
-
{
|
21952
|
-
key: 'none',
|
21953
|
-
iconProps: {
|
21954
|
-
iconName: 'RemoveVideoBackgroundEffect'
|
21955
|
-
},
|
21956
|
-
title: strings.removeBackgroundEffectButtonLabel,
|
21957
|
-
tooltipProps: {
|
21958
|
-
content: strings.removeBackgroundTooltip
|
21959
|
-
}
|
21960
|
-
},
|
21961
|
-
{
|
21962
|
-
key: 'blur',
|
21963
|
-
iconProps: {
|
21964
|
-
iconName: 'BlurVideoBackground'
|
21965
|
-
},
|
21966
|
-
title: strings.blurBackgroundEffectButtonLabel,
|
21967
|
-
tooltipProps: {
|
21968
|
-
content: strings.blurBackgroundTooltip
|
21969
|
-
}
|
21970
|
-
}
|
21971
|
-
];
|
21972
|
-
const videoEffectImages = props.adapter.getState().videoBackgroundImages;
|
21973
|
-
if (videoEffectImages) {
|
21974
|
-
videoEffectImages.forEach((img) => {
|
21975
|
-
var _a;
|
21976
|
-
videoEffects.push({
|
21977
|
-
key: img.key,
|
21978
|
-
backgroundProps: {
|
21979
|
-
url: img.url
|
21980
|
-
},
|
21981
|
-
tooltipProps: {
|
21982
|
-
content: (_a = img.tooltipText) !== null && _a !== void 0 ? _a : ''
|
21983
|
-
}
|
21984
|
-
});
|
21985
|
-
});
|
21986
|
-
}
|
21987
|
-
return videoEffects;
|
21988
|
-
}, [strings, props.adapter]);
|
21989
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21990
|
-
const onEffectChange = React.useCallback((effectKey) => __awaiter$8(void 0, void 0, void 0, function* () {
|
21991
|
-
console.log(props.adapter.getState());
|
21992
|
-
if (effectKey === 'blur') {
|
21993
|
-
props.adapter.blurVideoBackground();
|
21994
|
-
}
|
21995
|
-
else if (effectKey === 'none') {
|
21996
|
-
props.adapter.stopVideoBackgroundEffect();
|
21997
|
-
}
|
21998
|
-
else {
|
21999
|
-
const backgroundImg = selectableVideoEffects.find((effect) => {
|
22000
|
-
return effect.key === effectKey;
|
22001
|
-
});
|
22002
|
-
if (backgroundImg && backgroundImg.backgroundProps) {
|
22003
|
-
props.adapter.replaceVideoBackground({ backgroundImageUrl: backgroundImg.backgroundProps.url });
|
22004
|
-
}
|
22005
|
-
}
|
22006
|
-
}), [props.adapter, selectableVideoEffects]);
|
22007
|
-
return VideoEffectsPaneTrampoline(showVideoEffectsOptions, setshowVideoEffectsOptions,
|
22008
|
-
/* @conditional-compile-remove(video-background-effects) */
|
22009
|
-
selectableVideoEffects,
|
22010
|
-
/* @conditional-compile-remove(video-background-effects) */
|
22011
|
-
onEffectChange);
|
22012
|
-
};
|
22013
|
-
const VideoEffectsPaneTrampoline = (showVideoEffectsOptions, setshowVideoEffectsOptions, selectableVideoEffects, onEffectChange) => {
|
22014
|
-
/* @conditional-compile-remove(video-background-effects) */
|
22015
|
-
const locale = useLocale();
|
22016
|
-
/* @conditional-compile-remove(video-background-effects) */
|
22017
|
-
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 }))));
|
22018
|
-
};
|
22019
|
-
|
22020
22034
|
// Copyright (c) Microsoft Corporation.
|
22021
22035
|
/**
|
22022
22036
|
* @private
|