@azure/communication-react 1.5.1-alpha-202305160013 → 1.5.1-alpha-202305170014
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/dist-cjs/communication-react/index.js +30 -6
- 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/react-composites/src/composites/CallComposite/components/CallArrangement.js +12 -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 +12 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/package.json +8 -8
@@ -164,7 +164,7 @@ const _toCommunicationIdentifier = (id) => {
|
|
164
164
|
// Copyright (c) Microsoft Corporation.
|
165
165
|
// Licensed under the MIT license.
|
166
166
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
167
|
-
var telemetryVersion = '1.5.1-alpha-
|
167
|
+
var telemetryVersion = '1.5.1-alpha-202305170014';
|
168
168
|
|
169
169
|
// Copyright (c) Microsoft Corporation.
|
170
170
|
/**
|
@@ -19071,6 +19071,10 @@ class AzureCommunicationChatAdapter {
|
|
19071
19071
|
});
|
19072
19072
|
}
|
19073
19073
|
messageReceivedListener(event) {
|
19074
|
+
const isCurrentChatAdapterThread = event.threadId === this.chatThreadClient.threadId;
|
19075
|
+
if (!isCurrentChatAdapterThread) {
|
19076
|
+
return;
|
19077
|
+
}
|
19074
19078
|
const message = convertEventToChatMessage(event);
|
19075
19079
|
this.emitter.emit('messageReceived', { message });
|
19076
19080
|
const currentUserId = toFlatCommunicationIdentifier(this.chatClient.getState().userId);
|
@@ -21587,7 +21591,9 @@ const CommonCallControlBar = (props) => {
|
|
21587
21591
|
!props.mobileView && sideButtonsPresent && (React__default['default'].createElement(react.Stack.Item, null,
|
21588
21592
|
React__default['default'].createElement("div", { ref: sidepaneControlsRef },
|
21589
21593
|
React__default['default'].createElement(react.Stack, { horizontal: true, className: !props.mobileView ? react.mergeStyles(desktopButtonContainerStyle) : undefined },
|
21590
|
-
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 ||
|
21594
|
+
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 ||
|
21595
|
+
props.disableButtonsForHoldScreen ||
|
21596
|
+
isDisabled$2(options.peopleButton), strings: peopleButtonStrings, styles: commonButtonStyles })), (_b = customButtons['secondary']) === null || _b === void 0 ? void 0 :
|
21591
21597
|
_b.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
21592
21598
|
return (React__default['default'].createElement(CustomButton, { key: `secondary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
|
21593
21599
|
}))))))));
|
@@ -22028,7 +22034,7 @@ const MoreDrawer = (props) => {
|
|
22028
22034
|
text: props.strings.peopleButtonLabel,
|
22029
22035
|
iconProps: { iconName: 'MoreDrawerPeople' },
|
22030
22036
|
onItemClick: props.onPeopleButtonClicked,
|
22031
|
-
disabled: isDisabled$2(drawerSelectionOptions.peopleButton)
|
22037
|
+
disabled: isDisabled$2(drawerSelectionOptions.peopleButton) || props.disableButtonsForHoldScreen
|
22032
22038
|
});
|
22033
22039
|
}
|
22034
22040
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
@@ -23327,14 +23333,22 @@ const CallArrangement = (props) => {
|
|
23327
23333
|
const containerWidth = _useContainerWidth(containerRef);
|
23328
23334
|
const containerHeight = _useContainerHeight(containerRef);
|
23329
23335
|
const isInLobby = _isInLobbyOrConnecting(useSelector$1(callStatusSelector).callStatus);
|
23336
|
+
const { updateSidePaneRenderer } = props;
|
23330
23337
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
23331
23338
|
const isInLocalHold = useSelector$1(getPage) === 'hold';
|
23339
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
23340
|
+
React.useEffect(() => {
|
23341
|
+
if (isInLocalHold) {
|
23342
|
+
// close side pane on local hold
|
23343
|
+
updateSidePaneRenderer(undefined);
|
23344
|
+
}
|
23345
|
+
}, [updateSidePaneRenderer, isInLocalHold]);
|
23332
23346
|
const adapter = useAdapter();
|
23333
23347
|
const [drawerMenuItems, setDrawerMenuItems] = React.useState([]);
|
23334
23348
|
const peoplePaneProps = React.useMemo(() => {
|
23335
23349
|
var _a;
|
23336
23350
|
return ({
|
23337
|
-
updateSidePaneRenderer
|
23351
|
+
updateSidePaneRenderer,
|
23338
23352
|
setDrawerMenuItems,
|
23339
23353
|
inviteLink: props.callControlProps.callInvitationURL,
|
23340
23354
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
@@ -23343,7 +23357,7 @@ const CallArrangement = (props) => {
|
|
23343
23357
|
mobileView: props.mobileView
|
23344
23358
|
});
|
23345
23359
|
}, [
|
23346
|
-
|
23360
|
+
updateSidePaneRenderer,
|
23347
23361
|
props.callControlProps.callInvitationURL,
|
23348
23362
|
(_a = props.callControlProps) === null || _a === void 0 ? void 0 : _a.onFetchParticipantMenuItems,
|
23349
23363
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
@@ -27082,6 +27096,12 @@ const CallWithChatScreen = (props) => {
|
|
27082
27096
|
clearInterval(chatFocusTimeout);
|
27083
27097
|
}, 300);
|
27084
27098
|
}, [compositeParentDivId]);
|
27099
|
+
const isOnHold = isOnHoldTrampoline(currentPage);
|
27100
|
+
React.useEffect(() => {
|
27101
|
+
if (isOnHold) {
|
27102
|
+
closeChat();
|
27103
|
+
}
|
27104
|
+
}, [closeChat, isOnHold]);
|
27085
27105
|
const hasJoinedCall = !!(currentPage && hasJoinedCallFn(currentPage, currentCallState !== null && currentCallState !== void 0 ? currentCallState : 'None'));
|
27086
27106
|
const toggleChat = React.useCallback(() => {
|
27087
27107
|
isChatOpen || !hasJoinedCall ? closeChat() : openChat();
|
@@ -27095,7 +27115,7 @@ const CallWithChatScreen = (props) => {
|
|
27095
27115
|
const theme = useTheme();
|
27096
27116
|
const commonButtonStyles = React.useMemo(() => (!mobileView ? getDesktopCommonButtonStyles(theme) : undefined), [mobileView, theme]);
|
27097
27117
|
const showChatButton = checkShowChatButton(props.callControls);
|
27098
|
-
const chatButtonDisabled = showChatButton && (checkChatButtonIsDisabled(props.callControls) || !hasJoinedCall);
|
27118
|
+
const chatButtonDisabled = showChatButton && (checkChatButtonIsDisabled(props.callControls) || !hasJoinedCall || isOnHold);
|
27099
27119
|
const chatTabHeaderProps = React.useMemo(() => mobileView && showChatButton
|
27100
27120
|
? {
|
27101
27121
|
onClick: toggleChat,
|
@@ -27223,6 +27243,10 @@ const checkShowChatButton = (callControls) => {
|
|
27223
27243
|
const checkChatButtonIsDisabled = (callControls) => {
|
27224
27244
|
return typeof callControls === 'object' && isDisabled$2(callControls === null || callControls === void 0 ? void 0 : callControls.chatButton);
|
27225
27245
|
};
|
27246
|
+
const isOnHoldTrampoline = (page) => {
|
27247
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
27248
|
+
return page === 'hold';
|
27249
|
+
};
|
27226
27250
|
|
27227
27251
|
// Copyright (c) Microsoft Corporation.
|
27228
27252
|
// Licensed under the MIT license.
|