@azure/communication-react 1.3.3-alpha-202208200013.0 → 1.3.3-alpha-202208250017.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 +11 -3
- package/dist/dist-cjs/communication-react/index.js +93 -29
- 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-component-bindings/src/utils/callUtils.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.js +13 -6
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +22 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +16 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +10 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +17 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +16 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.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/CallingDialpad.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +1 -1
- package/package.json +8 -8
@@ -361,6 +361,16 @@ export declare interface BaseCustomStyles {
|
|
361
361
|
export declare interface CallAdapter extends AdapterState<CallAdapterState>, Disposable, CallAdapterCallManagement, CallAdapterDeviceManagement, CallAdapterSubscribers {
|
362
362
|
}
|
363
363
|
|
364
|
+
/**
|
365
|
+
* Payload for {@link CallEndedListener} containing details on the ended call.
|
366
|
+
*
|
367
|
+
* @public
|
368
|
+
*/
|
369
|
+
export declare type CallAdapterCallEndedEvent = {
|
370
|
+
callId?: string;
|
371
|
+
callEndReason?: CallEndReason;
|
372
|
+
};
|
373
|
+
|
364
374
|
/**
|
365
375
|
* Functionality for managing the current call.
|
366
376
|
*
|
@@ -1333,9 +1343,7 @@ export declare type CallControlOptions = {
|
|
1333
1343
|
*
|
1334
1344
|
* @public
|
1335
1345
|
*/
|
1336
|
-
export declare type CallEndedListener = (event:
|
1337
|
-
callId: string;
|
1338
|
-
}) => void;
|
1346
|
+
export declare type CallEndedListener = (event: CallAdapterCallEndedEvent) => void;
|
1339
1347
|
|
1340
1348
|
/**
|
1341
1349
|
* Error thrown from failed stateful API methods.
|
@@ -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-202208250017.0';
|
196
196
|
|
197
197
|
// Copyright (c) Microsoft Corporation.
|
198
198
|
/**
|
@@ -405,7 +405,7 @@ var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
405
405
|
*
|
406
406
|
* @internal
|
407
407
|
*/
|
408
|
-
const _isInCall = (callStatus) => !!callStatus && !['None', 'Disconnected', 'Connecting', '
|
408
|
+
const _isInCall = (callStatus) => !!callStatus && !['None', 'Disconnected', 'Connecting', 'Ringing', 'EarlyMedia'].includes(callStatus);
|
409
409
|
/**
|
410
410
|
* Check if the call state represents being in the lobby or waiting to be admitted.
|
411
411
|
*
|
@@ -4589,14 +4589,14 @@ const getParticipantsForDefaultRender = (participants, excludeMe, myUserId) => {
|
|
4589
4589
|
* @public
|
4590
4590
|
*/
|
4591
4591
|
const ParticipantList = (props) => {
|
4592
|
-
var _a, _b;
|
4592
|
+
var _a, _b, _c, _d;
|
4593
4593
|
const { excludeMe = false, myUserId, participants, onRemoveParticipant, onRenderAvatar, onRenderParticipant, onFetchParticipantMenuItems, showParticipantOverflowTooltip } = props;
|
4594
4594
|
const ids = useIdentifiers();
|
4595
4595
|
const strings = useLocale$1().strings.participantItem;
|
4596
4596
|
const displayedParticipants = React.useMemo(() => {
|
4597
4597
|
return onRenderParticipant ? participants : getParticipantsForDefaultRender(participants, excludeMe, myUserId);
|
4598
4598
|
}, [participants, excludeMe, myUserId, onRenderParticipant]);
|
4599
|
-
const createParticipantMenuItems = (participant) => {
|
4599
|
+
const createParticipantMenuItems = React.useCallback((participant) => {
|
4600
4600
|
var _a, _b;
|
4601
4601
|
let menuItems = [];
|
4602
4602
|
let disabled = !participant.isRemovable;
|
@@ -4620,9 +4620,16 @@ const ParticipantList = (props) => {
|
|
4620
4620
|
menuItems = onFetchParticipantMenuItems(participant.userId, myUserId, menuItems);
|
4621
4621
|
}
|
4622
4622
|
return menuItems;
|
4623
|
-
}
|
4624
|
-
|
4625
|
-
|
4623
|
+
}, [
|
4624
|
+
ids.participantListRemoveParticipantButton,
|
4625
|
+
myUserId,
|
4626
|
+
onFetchParticipantMenuItems,
|
4627
|
+
onRemoveParticipant,
|
4628
|
+
(_b = (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles) === null || _b === void 0 ? void 0 : _b.participantSubMenuItemsStyles,
|
4629
|
+
strings.removeButtonLabel
|
4630
|
+
]);
|
4631
|
+
const participantItemStyles = React.useMemo(() => { var _a; return react.merge(participantListItemStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles); }, [(_c = props.styles) === null || _c === void 0 ? void 0 : _c.participantItemStyles]);
|
4632
|
+
return (React__default['default'].createElement(react.Stack, { "data-ui-id": ids.participantList, className: react.mergeStyles(participantListStyle$1, (_d = props.styles) === null || _d === void 0 ? void 0 : _d.root) }, displayedParticipants.map((participant) => onRenderParticipant
|
4626
4633
|
? onRenderParticipant(participant)
|
4627
4634
|
: onRenderParticipantDefault(participant, strings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip))));
|
4628
4635
|
};
|
@@ -7432,7 +7439,7 @@ const _DrawerMenu = (props) => {
|
|
7432
7439
|
}
|
7433
7440
|
}), [firstItemStyle, borderRadius]);
|
7434
7441
|
return (React__default['default'].createElement(_DrawerSurface, { styles: (_b = props.styles) === null || _b === void 0 ? void 0 : _b.drawerSurfaceStyles, onLightDismiss: props.onLightDismiss },
|
7435
|
-
React__default['default'].createElement(react.Stack, { styles: props.styles, role: "menu" }, menuItemsToRender === null || menuItemsToRender === void 0 ? void 0 :
|
7442
|
+
React__default['default'].createElement(react.Stack, { styles: props.styles, role: "menu", "data-ui-id": "drawer-menu" }, menuItemsToRender === null || menuItemsToRender === void 0 ? void 0 :
|
7436
7443
|
menuItemsToRender.slice(0, 1).map((item) => (React__default['default'].createElement(DrawerMenuItem, Object.assign({}, item, { key: '0', styles: modifiedFirstItemStyle, onItemClick: (ev, itemKey) => {
|
7437
7444
|
onItemClick(item, ev, itemKey);
|
7438
7445
|
} })))), menuItemsToRender === null || menuItemsToRender === void 0 ? void 0 :
|
@@ -14347,6 +14354,19 @@ const adaptCompositeState = (compositeState) => {
|
|
14347
14354
|
compositeState.latestErrors, compositeState.displayName);
|
14348
14355
|
};
|
14349
14356
|
|
14357
|
+
// Copyright (c) Microsoft Corporation.
|
14358
|
+
// Licensed under the MIT license.
|
14359
|
+
/**
|
14360
|
+
* Subset of CallCompositePages that represent an end call state.
|
14361
|
+
* @private
|
14362
|
+
*/
|
14363
|
+
const END_CALL_PAGES = [
|
14364
|
+
'accessDeniedTeamsMeeting',
|
14365
|
+
'joinCallFailedDueToNoNetwork',
|
14366
|
+
'leftCall',
|
14367
|
+
'removedFromCall'
|
14368
|
+
];
|
14369
|
+
|
14350
14370
|
// Copyright (c) Microsoft Corporation.
|
14351
14371
|
const ACCESS_DENIED_TEAMS_MEETING_SUB_CODE = 5854;
|
14352
14372
|
const REMOVED_FROM_CALL_SUB_CODES = [5000, 5300];
|
@@ -14428,14 +14448,15 @@ const getCallCompositePage = (call, previousCall) => {
|
|
14428
14448
|
// `_isInLobbyOrConnecting` needs to be checked first because `_isInCall` also returns true when call is in lobby.
|
14429
14449
|
if (_isInLobbyOrConnecting(call === null || call === void 0 ? void 0 : call.state)) {
|
14430
14450
|
return 'lobby';
|
14431
|
-
|
14432
|
-
else if (_isInCall(call === null || call === void 0 ? void 0 : call.state)) {
|
14433
|
-
return 'call';
|
14451
|
+
// `LocalHold` needs to be checked before `isInCall` since it is also a state that's considered in call.
|
14434
14452
|
}
|
14435
14453
|
else if ((call === null || call === void 0 ? void 0 : call.state) === 'LocalHold') {
|
14436
14454
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14437
14455
|
return 'hold';
|
14438
14456
|
}
|
14457
|
+
else if (_isInCall(call === null || call === void 0 ? void 0 : call.state)) {
|
14458
|
+
return 'call';
|
14459
|
+
}
|
14439
14460
|
else {
|
14440
14461
|
// When the call object has been constructed after clicking , but before 'connecting' has been
|
14441
14462
|
// set on the call object, we continue to show the configuration screen.
|
@@ -14462,6 +14483,17 @@ const getCallCompositePage = (call, previousCall) => {
|
|
14462
14483
|
// No call state - show starting page (configuration)
|
14463
14484
|
return 'configuration';
|
14464
14485
|
};
|
14486
|
+
/** @private */
|
14487
|
+
const IsCallEndedPage = (
|
14488
|
+
/**
|
14489
|
+
* Explicitly listing the pages of this function intentionally.
|
14490
|
+
* This protects against adding a new composite page that should be marked as an callEndedPage.
|
14491
|
+
* EndCallPages are used to trigger onCallEnded events so this could easily be missed.
|
14492
|
+
* When you add a new composite page this will throw a compiler error. If this new page is an
|
14493
|
+
* EndCallPage ensure you update the END_CALL_PAGES. Afterwards update the `page` parameter
|
14494
|
+
* type below to allow your new page, i.e. add `| <your new page>
|
14495
|
+
*/
|
14496
|
+
page) => END_CALL_PAGES.includes(page);
|
14465
14497
|
/**
|
14466
14498
|
* Creates a new call control options object and sets the correct values for disabling
|
14467
14499
|
* the buttons provided in the `disabledControls` array.
|
@@ -14944,9 +14976,11 @@ const themedDialpadStyle$1 = (isMobile, theme) => ({
|
|
14944
14976
|
field: {
|
14945
14977
|
backgroundColor: theme.palette.white,
|
14946
14978
|
fontSize: theme.fonts.large.fontSize,
|
14947
|
-
padding: '
|
14979
|
+
padding: '0 0.5rem ',
|
14948
14980
|
textAlign: 'center',
|
14949
|
-
|
14981
|
+
':active': {
|
14982
|
+
padding: '0 0.5rem'
|
14983
|
+
}
|
14950
14984
|
}
|
14951
14985
|
},
|
14952
14986
|
primaryContent: {
|
@@ -15016,7 +15050,7 @@ const SendDtmfDialpad = (props) => {
|
|
15016
15050
|
return (React__default['default'].createElement(React__default['default'].Fragment, null, React__default['default'].createElement(react.Modal, { titleAriaId: strings.dialpadModalAriaLabel, isOpen: showDialpad, onDismiss: onDismissTriggered, isBlocking: true, styles: dialpadModalStyle },
|
15017
15051
|
React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "end", verticalAlign: "center" },
|
15018
15052
|
React__default['default'].createElement(react.IconButton, { iconProps: { iconName: 'Cancel' }, ariaLabel: strings.dialpadCloseModalButtonAriaLabel, onClick: onDismissTriggered, style: { color: theme.palette.black } })),
|
15019
|
-
React__default['default'].createElement(react.Stack,
|
15053
|
+
React__default['default'].createElement(react.Stack, { style: { overflow: 'hidden' } },
|
15020
15054
|
React__default['default'].createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false, strings: strings }))))));
|
15021
15055
|
};
|
15022
15056
|
|
@@ -15616,9 +15650,11 @@ const themedDialpadStyle = (isMobile, theme) => ({
|
|
15616
15650
|
field: {
|
15617
15651
|
backgroundColor: theme.palette.white,
|
15618
15652
|
fontSize: theme.fonts.large.fontSize,
|
15619
|
-
padding: '
|
15653
|
+
padding: '0 0.5rem',
|
15620
15654
|
textAlign: isMobile ? 'center' : 'left',
|
15621
|
-
|
15655
|
+
':active': {
|
15656
|
+
padding: '0 0.5rem'
|
15657
|
+
}
|
15622
15658
|
}
|
15623
15659
|
},
|
15624
15660
|
primaryContent: {
|
@@ -15680,7 +15716,7 @@ const CallingDialpad = (props) => {
|
|
15680
15716
|
React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "space-between", verticalAlign: "center" },
|
15681
15717
|
React__default['default'].createElement(react.Text, null, strings.dialpadModalTitle),
|
15682
15718
|
React__default['default'].createElement(react.IconButton, { iconProps: { iconName: 'Cancel' }, ariaLabel: strings.dialpadCloseModalButtonAriaLabel, onClick: onDismissTriggered, style: { color: theme.palette.black } })),
|
15683
|
-
React__default['default'].createElement(react.Stack,
|
15719
|
+
React__default['default'].createElement(react.Stack, { style: { overflow: 'hidden' } }, dialpadComponent()))));
|
15684
15720
|
};
|
15685
15721
|
function DialpadStartCallIconTrampoline() {
|
15686
15722
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -15854,7 +15890,7 @@ const PeoplePaneContent = (props) => {
|
|
15854
15890
|
// We want the drawer menu items to appear when participants in ParticipantList are clicked
|
15855
15891
|
onParticipantClick: props.mobileView ? setDrawerMenuItemsForParticipant : undefined });
|
15856
15892
|
}, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant, onRemoveParticipant]);
|
15857
|
-
const participantList = (React__default['default'].createElement(ParticipantListWithHeading, { isMobile: props.mobileView, participantListProps: participantListProps, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, title: props.strings.peoplePaneSubTitle }));
|
15893
|
+
const participantList = (React__default['default'].createElement(ParticipantListWithHeading, { isMobile: props.mobileView, participantListProps: participantListProps, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.mobileView ? undefined : props.onFetchParticipantMenuItems, title: props.strings.peoplePaneSubTitle }));
|
15858
15894
|
if (props.mobileView) {
|
15859
15895
|
return (React__default['default'].createElement(react.Stack, { verticalFill: true, styles: peoplePaneContainerStyle, tokens: peoplePaneContainerTokens },
|
15860
15896
|
React__default['default'].createElement(react.Stack.Item, { grow: true, styles: participantListContainerStyles }, participantList),
|
@@ -16141,7 +16177,7 @@ const textStyle = (theme) => {
|
|
16141
16177
|
* @private
|
16142
16178
|
*/
|
16143
16179
|
const CallArrangement = (props) => {
|
16144
|
-
var _a;
|
16180
|
+
var _a, _b;
|
16145
16181
|
const containerClassName = React.useMemo(() => {
|
16146
16182
|
return props.mobileView ? containerStyleMobile : containerStyleDesktop;
|
16147
16183
|
}, [props.mobileView]);
|
@@ -16188,13 +16224,25 @@ const CallArrangement = (props) => {
|
|
16188
16224
|
return callCompositeContainerCSS;
|
16189
16225
|
};
|
16190
16226
|
/* @conditional-compile-remove(one-to-n-calling) */
|
16191
|
-
const callPaneContent = () => {
|
16227
|
+
const callPaneContent = React.useCallback(() => {
|
16192
16228
|
var _a;
|
16193
|
-
if (adapter && _isInCall(callStatus)) {
|
16229
|
+
if (adapter && _isInCall(callStatus) && activePane === 'people') {
|
16194
16230
|
return (React__default['default'].createElement(CallPane, { callAdapter: adapter, onClose: closePane, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, onFetchParticipantMenuItems: (_a = props.callControlProps) === null || _a === void 0 ? void 0 : _a.onFetchParticipantMenuItems, onPeopleButtonClicked: showShowPeopleTabHeaderButton$1(props.callControlProps.options) ? selectPeople : undefined, modalLayerHostId: props.modalLayerHostId, activePane: activePane, mobileView: props.mobileView, inviteLink: props.callControlProps.callInvitationURL }));
|
16195
16231
|
}
|
16196
16232
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
16197
|
-
}
|
16233
|
+
}, [
|
16234
|
+
activePane,
|
16235
|
+
adapter,
|
16236
|
+
callStatus,
|
16237
|
+
closePane,
|
16238
|
+
props.callControlProps.callInvitationURL,
|
16239
|
+
(_a = props.callControlProps) === null || _a === void 0 ? void 0 : _a.onFetchParticipantMenuItems,
|
16240
|
+
props.callControlProps.options,
|
16241
|
+
props.mobileView,
|
16242
|
+
props.modalLayerHostId,
|
16243
|
+
props.onFetchAvatarPersonaData,
|
16244
|
+
selectPeople
|
16245
|
+
]);
|
16198
16246
|
return (React__default['default'].createElement("div", { ref: containerRef, className: react.mergeStyles(containerDivStyles) },
|
16199
16247
|
React__default['default'].createElement(react.Stack, { verticalFill: true, horizontalAlign: "stretch", className: containerClassName, "data-ui-id": props.dataUiId },
|
16200
16248
|
React__default['default'].createElement(react.Stack, { horizontal: true, grow: true },
|
@@ -16207,7 +16255,7 @@ const CallArrangement = (props) => {
|
|
16207
16255
|
React__default['default'].createElement(react.Stack.Item, { grow: true, style: callCompositeContainerFlex() },
|
16208
16256
|
React__default['default'].createElement(react.Stack.Item, { styles: callGalleryStyles, grow: true }, props.onRenderGalleryContent && (React__default['default'].createElement(react.Stack, { verticalFill: true, styles: mediaGalleryContainerStyles }, props.onRenderGalleryContent())))),
|
16209
16257
|
callPaneContent()),
|
16210
|
-
((
|
16258
|
+
((_b = props.callControlProps) === null || _b === void 0 ? void 0 : _b.options) !== false &&
|
16211
16259
|
/* @conditional-compile-remove(one-to-n-calling) */ !isMobileWithActivePane && (React__default['default'].createElement(react.Stack.Item, { className: callControlsContainerStyles },
|
16212
16260
|
React__default['default'].createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView,
|
16213
16261
|
/* @conditional-compile-remove(one-to-n-calling) */
|
@@ -17481,11 +17529,29 @@ class CallContext {
|
|
17481
17529
|
setCurrentCallId(callId) {
|
17482
17530
|
this.callId = callId;
|
17483
17531
|
}
|
17532
|
+
onCallEnded(handler) {
|
17533
|
+
this.emitter.on('callEnded', handler);
|
17534
|
+
}
|
17535
|
+
offCallEnded(handler) {
|
17536
|
+
this.emitter.off('callEnded', handler);
|
17537
|
+
}
|
17484
17538
|
updateClientState(clientState) {
|
17485
|
-
var _a;
|
17539
|
+
var _a, _b, _c;
|
17486
17540
|
const call = this.callId ? clientState.calls[this.callId] : undefined;
|
17487
17541
|
const latestEndedCall = findLatestEndedCall(clientState.callsEnded);
|
17488
|
-
|
17542
|
+
// As the state is transitioning to a new state, trigger appropriate callback events.
|
17543
|
+
const oldPage = this.state.page;
|
17544
|
+
const newPage = getCallCompositePage(call, latestEndedCall);
|
17545
|
+
if (!IsCallEndedPage(oldPage) && IsCallEndedPage(newPage)) {
|
17546
|
+
this.emitter.emit('callEnded', {
|
17547
|
+
callId: this.callId,
|
17548
|
+
callEndedCode: (_a = latestEndedCall === null || latestEndedCall === void 0 ? void 0 : latestEndedCall.callEndReason) === null || _a === void 0 ? void 0 : _a.code,
|
17549
|
+
callEndedSubCode: (_b = latestEndedCall === null || latestEndedCall === void 0 ? void 0 : latestEndedCall.callEndReason) === null || _b === void 0 ? void 0 : _b.subCode
|
17550
|
+
});
|
17551
|
+
}
|
17552
|
+
if (this.state.page) {
|
17553
|
+
this.setState(Object.assign(Object.assign({}, this.state), { userId: clientState.userId, displayName: (_c = clientState.callAgent) === null || _c === void 0 ? void 0 : _c.displayName, call, page: newPage, endedCall: latestEndedCall, devices: clientState.deviceManager, latestErrors: clientState.latestErrors }));
|
17554
|
+
}
|
17489
17555
|
}
|
17490
17556
|
}
|
17491
17557
|
const findLatestEndedCall = (calls) => {
|
@@ -17523,6 +17589,7 @@ class AzureCommunicationCallAdapter {
|
|
17523
17589
|
this.deviceManager = deviceManager;
|
17524
17590
|
const isTeamsMeeting = 'meetingLink' in this.locator;
|
17525
17591
|
this.context = new CallContext(callClient.getState(), isTeamsMeeting);
|
17592
|
+
this.context.onCallEnded((endCallData) => this.emitter.emit('callEnded', endCallData));
|
17526
17593
|
const onStateChange = (clientState) => {
|
17527
17594
|
var _a;
|
17528
17595
|
// unsubscribe when the instance gets disposed
|
@@ -17695,9 +17762,7 @@ class AzureCommunicationCallAdapter {
|
|
17695
17762
|
});
|
17696
17763
|
}
|
17697
17764
|
leaveCall() {
|
17698
|
-
var _a;
|
17699
17765
|
return __awaiter$4(this, void 0, void 0, function* () {
|
17700
|
-
const callId = (_a = this.call) === null || _a === void 0 ? void 0 : _a.id;
|
17701
17766
|
yield this.handlers.onHangUp();
|
17702
17767
|
this.unsubscribeCallEvents();
|
17703
17768
|
this.call = undefined;
|
@@ -17707,7 +17772,6 @@ class AzureCommunicationCallAdapter {
|
|
17707
17772
|
this.context.updateClientState(this.callClient.getState());
|
17708
17773
|
this.stopCamera();
|
17709
17774
|
this.mute();
|
17710
|
-
this.emitter.emit('callEnded', { callId });
|
17711
17775
|
});
|
17712
17776
|
}
|
17713
17777
|
setCamera(device, options) {
|
@@ -19122,7 +19186,7 @@ const CallWithChatScreen = (props) => {
|
|
19122
19186
|
// Perf: Instead of removing the video gallery from DOM, we hide it to prevent re-renders.
|
19123
19187
|
style: callCompositeContainerCSS },
|
19124
19188
|
React__default['default'].createElement(CallComposite, Object.assign({}, props, { formFactor: formFactor, options: { callControls: false }, adapter: callAdapter, fluentTheme: fluentTheme }))),
|
19125
|
-
chatProps.adapter && callAdapter && hasJoinedCall && (React__default['default'].createElement(CallWithChatPane, { chatCompositeProps: chatProps, inviteLink: props.joinInvitationURL, onClose: closePane, chatAdapter: chatProps.adapter, callAdapter: callAdapter, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, onChatButtonClicked: showShowChatTabHeaderButton(props.callControls) ? selectChat : undefined, onPeopleButtonClicked: showShowPeopleTabHeaderButton(props.callControls) ? selectPeople : undefined, modalLayerHostId: modalLayerHostId, mobileView: mobileView, activePane: activePane,
|
19189
|
+
chatProps.adapter && callAdapter && hasJoinedCall && (React__default['default'].createElement(CallWithChatPane, { chatCompositeProps: chatProps, inviteLink: props.joinInvitationURL, onClose: closePane, chatAdapter: chatProps.adapter, callAdapter: callAdapter, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, onChatButtonClicked: showShowChatTabHeaderButton(props.callControls) ? selectChat : undefined, onPeopleButtonClicked: showShowPeopleTabHeaderButton(props.callControls) ? selectPeople : undefined, modalLayerHostId: modalLayerHostId, mobileView: mobileView, activePane: activePane,
|
19126
19190
|
/* @conditional-compile-remove(file-sharing) */
|
19127
19191
|
fileSharing: props.fileSharing, rtl: props.rtl }))),
|
19128
19192
|
showControlBar && !isMobileWithActivePane && (React__default['default'].createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
|