@azure/communication-react 1.5.1-alpha-202304050012 → 1.5.1-alpha-202304060012
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 +12 -2
- package/dist/dist-cjs/communication-react/index.js +35 -13
- 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-stateful-client/src/CallClientState.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +13 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +28 -7
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js.map +1 -1
- package/package.json +10 -10
@@ -1801,7 +1801,7 @@ export declare type CallErrors = {
|
|
1801
1801
|
*
|
1802
1802
|
* @public
|
1803
1803
|
*/
|
1804
|
-
export declare type CallErrorTarget = 'Call.addParticipant' |
|
1804
|
+
export declare type CallErrorTarget = 'Call.addParticipant' | 'Call.dispose' | 'Call.feature' | 'Call.hangUp' | 'Call.hold' | 'Call.mute' | /* @conditional-compile-remove(calling-beta-sdk) */ 'Call.muteIncomingAudio' | 'Call.off' | 'Call.on' | 'Call.removeParticipant' | 'Call.resume' | 'Call.sendDtmf' | /* @conditional-compile-remove(calling-beta-sdk) */ 'Call.startAudio' | 'Call.startScreenSharing' | 'Call.startVideo' | 'Call.stopScreenSharing' | /* @conditional-compile-remove(calling-beta-sdk) */ 'Call.stopAudio' | 'Call.stopVideo' | 'Call.unmute' | /* @conditional-compile-remove(calling-beta-sdk) */ 'Call.unmuteIncomingAudio' | 'CallAgent.dispose' | 'CallAgent.feature' | 'CallAgent.join' | 'CallAgent.off' | 'CallAgent.on' | 'CallAgent.startCall' | 'CallClient.createCallAgent' | 'CallClient.createTeamsCallAgent' | 'CallClient.feature' | 'CallClient.getDeviceManager' | /* @conditional-compile-remove(calling-beta-sdk) */ 'CallClient.getEnvironmentInfo' | 'DeviceManager.askDevicePermission' | 'DeviceManager.getCameras' | 'DeviceManager.getMicrophones' | 'DeviceManager.getSpeakers' | 'DeviceManager.off' | 'DeviceManager.on' | 'DeviceManager.selectMicrophone' | 'DeviceManager.selectSpeaker' | 'IncomingCall.accept' | 'IncomingCall.reject' | /* @conditional-compile-remove(calling-beta-sdk) */ /* @conditional-compile-remove(teams-identity-support) */ 'TeamsCall.addParticipant' | /* @conditional-compile-remove(video-background-effects) */ 'VideoEffectsFeature.startEffects' | /* @conditional-compile-remove(calling-beta-sdk) */ 'CallAgent.handlePushNotification';
|
1805
1805
|
|
1806
1806
|
/**
|
1807
1807
|
* Callback for {@link CallAdapterSubscribers} 'callIdChanged' event.
|
@@ -3001,6 +3001,14 @@ export declare type CameraSitePermissionsStrings = SitePermissionsStrings;
|
|
3001
3001
|
*/
|
3002
3002
|
export declare type ChatAdapter = ChatAdapterThreadManagement & AdapterState<ChatAdapterState> & Disposable & ChatAdapterSubscribers & FileUploadAdapter;
|
3003
3003
|
|
3004
|
+
/**
|
3005
|
+
* Configuration options to include when creating AzureCommunicationChatAdapter.
|
3006
|
+
* @beta
|
3007
|
+
*/
|
3008
|
+
export declare type ChatAdapterOptions = {
|
3009
|
+
credential?: CommunicationTokenCredential;
|
3010
|
+
};
|
3011
|
+
|
3004
3012
|
/**
|
3005
3013
|
* {@link ChatAdapter} state.
|
3006
3014
|
*
|
@@ -4311,7 +4319,9 @@ export declare const createAzureCommunicationChatAdapter: ({ endpoint: endpointU
|
|
4311
4319
|
*
|
4312
4320
|
* @public
|
4313
4321
|
*/
|
4314
|
-
export declare
|
4322
|
+
export declare function createAzureCommunicationChatAdapterFromClient(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient, options?: {
|
4323
|
+
credential?: CommunicationTokenCredential;
|
4324
|
+
}): Promise<ChatAdapter>;
|
4315
4325
|
|
4316
4326
|
/**
|
4317
4327
|
* Create the default implementation of {@link CallingHandlers} for teams call.
|
@@ -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-202304060012';
|
166
166
|
|
167
167
|
// Copyright (c) Microsoft Corporation.
|
168
168
|
/**
|
@@ -16867,14 +16867,27 @@ class ChatContext {
|
|
16867
16867
|
* @private
|
16868
16868
|
*/
|
16869
16869
|
class AzureCommunicationChatAdapter {
|
16870
|
-
constructor(chatClient, chatThreadClient
|
16870
|
+
constructor(chatClient, chatThreadClient,
|
16871
|
+
/* @conditional-compile-remove(teams-inline-images) */ options) {
|
16871
16872
|
this.emitter = new EventEmitter__default['default']();
|
16872
16873
|
this.bindAllPublicMethods();
|
16873
16874
|
this.chatClient = chatClient;
|
16874
16875
|
this.chatThreadClient = chatThreadClient;
|
16875
16876
|
this.context = new ChatContext(chatClient.getState(), chatThreadClient.threadId);
|
16876
|
-
/* @conditional-compile-remove(
|
16877
|
-
|
16877
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
16878
|
+
const credential = options === null || options === void 0 ? void 0 : options.credential;
|
16879
|
+
/* @conditional-compile-remove(file-sharing) */ /* @conditional-compile-remove(teams-inline-images) */
|
16880
|
+
let getAuthToken = undefined;
|
16881
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
16882
|
+
if (credential) {
|
16883
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
16884
|
+
getAuthToken = () => __awaiter$f(this, void 0, void 0, function* () {
|
16885
|
+
const accessToken = yield credential.getToken();
|
16886
|
+
return accessToken.token;
|
16887
|
+
});
|
16888
|
+
}
|
16889
|
+
/* @conditional-compile-remove(file-sharing) */ /* @conditional-compile-remove(teams-inline-images) */
|
16890
|
+
this.fileUploadAdapter = new AzureCommunicationFileUploadAdapter(this.context, getAuthToken);
|
16878
16891
|
const onStateChange = (clientState) => {
|
16879
16892
|
// unsubscribe when the instance gets disposed
|
16880
16893
|
if (!this) {
|
@@ -17166,7 +17179,10 @@ const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, di
|
|
17166
17179
|
});
|
17167
17180
|
const chatThreadClient = yield chatClient.getChatThreadClient(threadId);
|
17168
17181
|
yield chatClient.startRealtimeNotifications();
|
17169
|
-
|
17182
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
17183
|
+
const options = { credential: credential };
|
17184
|
+
const adapter = yield createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
|
17185
|
+
/* @conditional-compile-remove(teams-inline-images) */ options);
|
17170
17186
|
return adapter;
|
17171
17187
|
});
|
17172
17188
|
/**
|
@@ -17273,9 +17289,14 @@ beforeDispose) => {
|
|
17273
17289
|
*
|
17274
17290
|
* @public
|
17275
17291
|
*/
|
17276
|
-
|
17277
|
-
|
17278
|
-
|
17292
|
+
function createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
|
17293
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
17294
|
+
options) {
|
17295
|
+
return __awaiter$f(this, void 0, void 0, function* () {
|
17296
|
+
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient,
|
17297
|
+
/* @conditional-compile-remove(teams-inline-images) */ options);
|
17298
|
+
});
|
17299
|
+
}
|
17279
17300
|
const isChatError = (e) => {
|
17280
17301
|
return e['target'] !== undefined && e['innerError'] !== undefined;
|
17281
17302
|
};
|
@@ -18574,7 +18595,7 @@ const icon$1 = () => React__default['default'].createElement(reactIcons.MoreHori
|
|
18574
18595
|
* @private
|
18575
18596
|
*/
|
18576
18597
|
const MoreButton = (props) => {
|
18577
|
-
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { labelKey: 'optionsButtonLabelKey', showLabel: props.showLabel, onRenderOnIcon: icon$1, onRenderOffIcon: icon$1, onClick: props.onClick, "data-ui-id": 'call-
|
18598
|
+
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { labelKey: 'optionsButtonLabelKey', showLabel: props.showLabel, onRenderOnIcon: icon$1, onRenderOffIcon: icon$1, onClick: props.onClick, "data-ui-id": 'common-call-composite-more-button' })));
|
18578
18599
|
};
|
18579
18600
|
|
18580
18601
|
// Copyright (c) Microsoft Corporation.
|
@@ -19202,7 +19223,7 @@ const DesktopMoreButton = (props) => {
|
|
19202
19223
|
styles: buttonFlyoutIncreasedSizeStyles
|
19203
19224
|
} }, element));
|
19204
19225
|
});
|
19205
|
-
return (React__default['default'].createElement(MoreButton, Object.assign({}, props, { "data-ui-id": "call-
|
19226
|
+
return (React__default['default'].createElement(MoreButton, Object.assign({}, props, { "data-ui-id": "common-call-composite-more-button",
|
19206
19227
|
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
19207
19228
|
strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems } })));
|
19208
19229
|
};
|
@@ -19368,7 +19389,7 @@ const CommonCallControlBar = (props) => {
|
|
19368
19389
|
: CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
19369
19390
|
return (React__default['default'].createElement(CustomButton, { key: `primary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
|
19370
19391
|
}),
|
19371
|
-
props.mobileView && (React__default['default'].createElement(MoreButton, { "data-ui-id": "call-
|
19392
|
+
props.mobileView && (React__default['default'].createElement(MoreButton, { "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage })),
|
19372
19393
|
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.moreButton) &&
|
19373
19394
|
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.holdButton) &&
|
19374
19395
|
!props.mobileView && (React__default['default'].createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles, onClickShowDialpad: props.onClickShowDialpad,
|
@@ -19383,7 +19404,7 @@ const CommonCallControlBar = (props) => {
|
|
19383
19404
|
_c.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
19384
19405
|
return (React__default['default'].createElement(CustomButton, { key: `secondary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
|
19385
19406
|
}),
|
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-
|
19407
|
+
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": "common-call-composite-people-button", disabled: props.disableButtonsForLobbyPage || isDisabled$2(options.peopleButton), strings: peopleButtonStrings, styles: commonButtonStyles })),
|
19387
19408
|
isEnabled$1(options === null || options === void 0 ? void 0 : options.chatButton) && chatButton)))))));
|
19388
19409
|
};
|
19389
19410
|
const desktopButtonContainerStyle = {
|
@@ -20536,6 +20557,7 @@ const MoreDrawer = (props) => {
|
|
20536
20557
|
if (drawerSelectionOptions !== false && isEnabled(drawerSelectionOptions === null || drawerSelectionOptions === void 0 ? void 0 : drawerSelectionOptions.peopleButton)) {
|
20537
20558
|
drawerMenuItems.push({
|
20538
20559
|
itemKey: 'people',
|
20560
|
+
id: 'call-composite-drawer-people-button',
|
20539
20561
|
text: props.strings.peopleButtonLabel,
|
20540
20562
|
iconProps: { iconName: 'MoreDrawerPeople' },
|
20541
20563
|
onItemClick: props.onPeopleButtonClicked,
|
@@ -20822,7 +20844,7 @@ const CallArrangement = (props) => {
|
|
20822
20844
|
/* @conditional-compile-remove(one-to-n-calling) */
|
20823
20845
|
peopleButtonChecked: activePane === 'people',
|
20824
20846
|
/* @conditional-compile-remove(one-to-n-calling) */
|
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,
|
20847
|
+
onPeopleButtonClicked: togglePeoplePane }))) : (React__default['default'].createElement(CommonCallControlBar, Object.assign({}, props.callControlProps, { callControls: props.callControlProps.options, callAdapter: adapter, mobileView: props.mobileView, disableButtonsForLobbyPage: isInLobby, peopleButtonChecked: activePane === 'people', onPeopleButtonClicked: togglePeoplePane, onMoreButtonClicked: onMoreButtonClicked,
|
20826
20848
|
/* @conditional-compile-remove(video-background-effects) */
|
20827
20849
|
onShowVideoEffectsPicker: setShowVideoEffectsPane }))))),
|
20828
20850
|
((_d = props.callControlProps) === null || _d === void 0 ? void 0 : _d.options) !== false && showDrawer && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStylesValue },
|