@azure/communication-react 1.14.0-alpha-202402290012 → 1.14.0-alpha-202403010014
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 +1 -1
- package/dist/dist-cjs/communication-react/index.js +109 -43
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/common.d.ts +5 -0
- package/dist/dist-esm/acs-ui-common/src/common.js +7 -0
- package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/index.d.ts +1 -1
- package/dist/dist-esm/acs-ui-common/src/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/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.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +4 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +1 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ImageOverlay.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js +4 -4
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils.d.ts +0 -6
- package/dist/dist-esm/react-components/src/components/utils.js +0 -8
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/utils.js +2 -2
- package/dist/dist-esm/react-components/src/localization/locales/utils.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/adapter/AzureCommunicationCallAdapter.js +3 -7
- 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/CallingSoundSubscriber.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +15 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackCapabilityChangedNotifications.js +9 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackCapabilityChangedNotifications.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +8 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +6 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +10 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +5 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.d.ts +21 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.js +43 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +4 -3
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.d.ts +21 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/{CaptionSettingsDrawer.js → SpokenLanguageSettingsDrawer.js} +4 -3
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Survey.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Survey.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/styles/Survey.styles.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/styles/Survey.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/utils.js +5 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionSettingsDrawer.d.ts +0 -21
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionSettingsDrawer.js.map +0 -1
@@ -173,7 +173,7 @@ function getDefaultExportFromCjs (x) {
|
|
173
173
|
// Copyright (c) Microsoft Corporation.
|
174
174
|
// Licensed under the MIT License.
|
175
175
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
176
|
-
var telemetryVersion = '1.14.0-alpha-
|
176
|
+
var telemetryVersion = '1.14.0-alpha-202403010014';
|
177
177
|
|
178
178
|
|
179
179
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -333,6 +333,13 @@ const _convertPxToRem = (px) => {
|
|
333
333
|
const _preventDismissOnEvent = (ev) => {
|
334
334
|
return ev.type === 'resize' || ev.type === 'scroll';
|
335
335
|
};
|
336
|
+
/**
|
337
|
+
* @internal
|
338
|
+
* Helper function to get the keys of an object
|
339
|
+
*/
|
340
|
+
function _getKeys(obj) {
|
341
|
+
return Object.keys(obj);
|
342
|
+
}
|
336
343
|
|
337
344
|
// Copyright (c) Microsoft Corporation.
|
338
345
|
// Licensed under the MIT License.
|
@@ -5912,14 +5919,6 @@ e.nativeEvent.isComposing ||
|
|
5912
5919
|
* @private
|
5913
5920
|
*/
|
5914
5921
|
const nullToUndefined = (value) => (value === null ? undefined : value);
|
5915
|
-
/**
|
5916
|
-
* Helper function to get the keys of an object
|
5917
|
-
*
|
5918
|
-
* @private
|
5919
|
-
*/
|
5920
|
-
function getKeys(obj) {
|
5921
|
-
return Object.keys(obj);
|
5922
|
-
}
|
5923
5922
|
|
5924
5923
|
// Copyright (c) Microsoft Corporation.
|
5925
5924
|
// Licensed under the MIT License.
|
@@ -11228,7 +11227,7 @@ const DownloadIconTrampoline = () => {
|
|
11228
11227
|
return React.createElement(react.Icon, { "data-ui-id": "file-download-card-download-icon", iconName: "DownloadFile", style: actionIconStyle });
|
11229
11228
|
};
|
11230
11229
|
const useLocaleStringsTrampoline = () => {
|
11231
|
-
/* @conditional-compile-remove(file-sharing)
|
11230
|
+
/* @conditional-compile-remove(file-sharing) */
|
11232
11231
|
return useLocale$1().strings.messageThread;
|
11233
11232
|
};
|
11234
11233
|
|
@@ -11301,18 +11300,18 @@ const MessageBubble = (props) => {
|
|
11301
11300
|
const defaultOnRenderFileDownloads = React.useCallback(() => {
|
11302
11301
|
/* @conditional-compile-remove(file-sharing) */
|
11303
11302
|
return (React.createElement(_FileDownloadCards, { userId: userId,
|
11304
|
-
/* @conditional-compile-remove(file-sharing)
|
11303
|
+
/* @conditional-compile-remove(file-sharing) */
|
11305
11304
|
fileMetadata: message.files || [],
|
11306
11305
|
/* @conditional-compile-remove(file-sharing) */
|
11307
11306
|
downloadHandler: fileDownloadHandler,
|
11308
|
-
/* @conditional-compile-remove(file-sharing)
|
11307
|
+
/* @conditional-compile-remove(file-sharing) */
|
11309
11308
|
strings: { downloadFile: strings.downloadFile, fileCardGroupMessage: strings.fileCardGroupMessage } }));
|
11310
11309
|
}, [
|
11311
11310
|
userId,
|
11312
11311
|
message,
|
11313
|
-
/* @conditional-compile-remove(file-sharing)
|
11312
|
+
/* @conditional-compile-remove(file-sharing) */
|
11314
11313
|
strings,
|
11315
|
-
/* @conditional-compile-remove(file-sharing)
|
11314
|
+
/* @conditional-compile-remove(file-sharing) */
|
11316
11315
|
fileDownloadHandler
|
11317
11316
|
]);
|
11318
11317
|
const editedOn = 'editedOn' in message ? message.editedOn : undefined;
|
@@ -19306,8 +19305,8 @@ const _TagsSurvey = (props) => {
|
|
19306
19305
|
videoRating: [],
|
19307
19306
|
screenshareRating: []
|
19308
19307
|
};
|
19309
|
-
|
19310
|
-
|
19308
|
+
_getKeys(callIssuesToTag).forEach((issueCategory) => {
|
19309
|
+
_getKeys(callIssuesToTag[issueCategory]).map((issue) => {
|
19311
19310
|
const issueCapitalized = ((issue === null || issue === void 0 ? void 0 : issue.charAt(0).toUpperCase()) + (issue === null || issue === void 0 ? void 0 : issue.slice(1)));
|
19312
19311
|
const issueMessages = callIssuesToTag[issueCategory];
|
19313
19312
|
if (tags[issueCategory]) {
|
@@ -19399,7 +19398,7 @@ const _TagsSurvey = (props) => {
|
|
19399
19398
|
return (React.createElement(React.Fragment, null,
|
19400
19399
|
React.createElement(react.Stack, { verticalAlign: "center" },
|
19401
19400
|
React.createElement(react.Text, { className: questionTextStyle$1(theme) }, strings === null || strings === void 0 ? void 0 : strings.tagsSurveyQuestion)),
|
19402
|
-
React.createElement(react.Pivot, null,
|
19401
|
+
React.createElement(react.Pivot, null, _getKeys(tags).map((key, i) => {
|
19403
19402
|
return (React.createElement(react.PivotItem, { key: `key-${i}`, headerText: categoryHeadings[key], headerButtonProps: {
|
19404
19403
|
'data-order': i,
|
19405
19404
|
'data-title': key
|
@@ -20277,7 +20276,7 @@ const _CaptionsSettingsModal = (props) => {
|
|
20277
20276
|
*/
|
20278
20277
|
const createComponentStrings = (localizedStrings) => {
|
20279
20278
|
const strings = Object.assign({}, en_US$1);
|
20280
|
-
|
20279
|
+
_getKeys(localizedStrings).forEach((key) => {
|
20281
20280
|
// mark the value as unknown because the type changes based on the key.
|
20282
20281
|
// this is unsafe at runtime as we could assign the wrong type based on the key here.
|
20283
20282
|
// but typescript isn't smart enough to know that the key used across each access will result in the same type
|
@@ -24857,7 +24856,9 @@ const createCompositeHandlers$1 = memoizeOne((adapter) => ({
|
|
24857
24856
|
onTyping: adapter.sendTypingIndicator,
|
24858
24857
|
onRemoveParticipant: adapter.removeParticipant,
|
24859
24858
|
updateThreadTopicName: adapter.setTopic,
|
24860
|
-
onUpdateMessage: (messageId, content,
|
24859
|
+
onUpdateMessage: (messageId, content,
|
24860
|
+
/* @conditional-compile-remove(file-sharing) */
|
24861
|
+
options) => {
|
24861
24862
|
const metadata = options === null || options === void 0 ? void 0 : options.metadata;
|
24862
24863
|
/* @conditional-compile-remove(file-sharing) */
|
24863
24864
|
const updatedOptions = (options === null || options === void 0 ? void 0 : options.attachmentMetadata) ? Object.assign({}, options.attachmentMetadata) : {};
|
@@ -25341,11 +25342,16 @@ const ChatScreen = (props) => {
|
|
25341
25342
|
*/
|
25342
25343
|
const ChatComposite = (props) => {
|
25343
25344
|
const { adapter, options, onFetchAvatarPersonaData, onRenderTypingIndicator, onRenderMessage, onFetchParticipantMenuItems } = props;
|
25345
|
+
/* @conditional-compile-remove(file-sharing) */
|
25344
25346
|
const formFactor = props['formFactor'] || 'desktop';
|
25345
25347
|
return (React.createElement("div", { className: chatScreenContainerStyle },
|
25346
25348
|
React.createElement(BaseProvider, Object.assign({}, props),
|
25347
25349
|
React.createElement(ChatAdapterProvider, { adapter: adapter },
|
25348
|
-
React.createElement(ChatScreen
|
25350
|
+
React.createElement(ChatScreen
|
25351
|
+
/* @conditional-compile-remove(file-sharing) */
|
25352
|
+
, {
|
25353
|
+
/* @conditional-compile-remove(file-sharing) */
|
25354
|
+
formFactor: formFactor, options: options, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onRenderTypingIndicator: onRenderTypingIndicator, onRenderMessage: onRenderMessage, onFetchParticipantMenuItems: onFetchParticipantMenuItems,
|
25349
25355
|
/* @conditional-compile-remove(file-sharing) */
|
25350
25356
|
fileSharing: options === null || options === void 0 ? void 0 : options.fileSharing })))));
|
25351
25357
|
};
|
@@ -25820,13 +25826,21 @@ const disableCallControls = (callControlOptions, disabledControls) => {
|
|
25820
25826
|
let newOptions = (_a = (callControlOptions instanceof Object ? Object.assign({}, callControlOptions) : callControlOptions)) !== null && _a !== void 0 ? _a : {};
|
25821
25827
|
if (newOptions === true || newOptions === undefined) {
|
25822
25828
|
newOptions = disabledControls.reduce((acc, key) => {
|
25829
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
25830
|
+
// @ts-expect-error TODO: fix noImplicitAny error here
|
25831
|
+
// Not solveable at this time due to typescript limitations. The typing is too complex for typescript to
|
25832
|
+
// understand. Will need to revisit when either typescript or the calling component bindings are updated.
|
25823
25833
|
acc[key] = { disabled: true };
|
25824
25834
|
return acc;
|
25825
25835
|
}, {});
|
25826
25836
|
}
|
25827
25837
|
else {
|
25828
25838
|
disabledControls.forEach((key) => {
|
25839
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
25840
|
+
// @ts-expect-error refer to above comment
|
25829
25841
|
if (newOptions[key] !== false) {
|
25842
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
25843
|
+
// @ts-expect-error refer to above comment
|
25830
25844
|
newOptions[key] = { disabled: true };
|
25831
25845
|
}
|
25832
25846
|
});
|
@@ -26012,14 +26026,25 @@ const createCompositeHandlers = memoizeOne((adapter) => {
|
|
26012
26026
|
}),
|
26013
26027
|
/* @conditional-compile-remove(PSTN-calls) */
|
26014
26028
|
onAddParticipant: (participant, options) => __awaiter$j(void 0, void 0, void 0, function* () {
|
26015
|
-
|
26029
|
+
if ('communicationUserId' in participant) {
|
26030
|
+
return yield adapter.addParticipant(participant);
|
26031
|
+
}
|
26032
|
+
else if ('phoneNumber' in participant) {
|
26033
|
+
return yield adapter.addParticipant(participant, options);
|
26034
|
+
}
|
26016
26035
|
}),
|
26017
26036
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(dtmf-dialer) */
|
26018
26037
|
onSendDtmfTone: (dtmfTone) => __awaiter$j(void 0, void 0, void 0, function* () {
|
26019
26038
|
yield adapter.sendDtmfTone(dtmfTone);
|
26020
26039
|
}),
|
26021
26040
|
onRemoveParticipant: (userId) => __awaiter$j(void 0, void 0, void 0, function* () {
|
26022
|
-
|
26041
|
+
if (typeof userId === 'string') {
|
26042
|
+
yield adapter.removeParticipant(userId);
|
26043
|
+
}
|
26044
|
+
else {
|
26045
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
26046
|
+
yield adapter.removeParticipant(_toCommunicationIdentifier(userId));
|
26047
|
+
}
|
26023
26048
|
}),
|
26024
26049
|
/* @conditional-compile-remove(raise-hand) */
|
26025
26050
|
onRaiseHand: () => __awaiter$j(void 0, void 0, void 0, function* () {
|
@@ -26930,7 +26955,11 @@ const generateCustomControlBarButtons = (placement, customButtons) => customButt
|
|
26930
26955
|
.filter((buttonProps) => buttonProps.placement === placement)
|
26931
26956
|
.map((buttonProps, i) => (internalProps) => {
|
26932
26957
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
26933
|
-
|
26958
|
+
// onRenderButton is a custom prop that can be passed to override the default rendering of the button
|
26959
|
+
// This is useful for custom buttons that need to render more than just an icon and label and is used
|
26960
|
+
// for CallWithChat button notification badge. However, onRenderButton is not a public prop and is
|
26961
|
+
// not documented in the API. This is a temporary solution and will need to be revisited.
|
26962
|
+
if ('onRenderButton' in buttonProps) {
|
26934
26963
|
return buttonProps['onRenderButton'](internalProps);
|
26935
26964
|
}
|
26936
26965
|
return (React.createElement(ControlBarButton, { ariaDescription: (_b = (_a = buttonProps.strings) === null || _a === void 0 ? void 0 : _a.ariaDescription) !== null && _b !== void 0 ? _b : internalProps.ariaDescription, ariaLabel: (_f = (_d = (_c = buttonProps.strings) === null || _c === void 0 ? void 0 : _c.ariaLabel) !== null && _d !== void 0 ? _d : (_e = buttonProps.strings) === null || _e === void 0 ? void 0 : _e.tooltipContent) !== null && _f !== void 0 ? _f : internalProps.ariaLabel, disabled: (_g = buttonProps.disabled) !== null && _g !== void 0 ? _g : internalProps.disabled, id: (_h = buttonProps.id) !== null && _h !== void 0 ? _h : internalProps.id, key: `${buttonProps.placement}_${i}`, onClick: (_j = buttonProps.onItemClick) !== null && _j !== void 0 ? _j : internalProps.onClick, onRenderIcon: () => {
|
@@ -28264,7 +28293,7 @@ const captionSettingsDrawerStyles = (theme) => ({
|
|
28264
28293
|
// Copyright (c) Microsoft Corporation.
|
28265
28294
|
// Licensed under the MIT License.
|
28266
28295
|
/** @private */
|
28267
|
-
const
|
28296
|
+
const CaptionLanguageSettingsDrawer = (props) => {
|
28268
28297
|
var _a;
|
28269
28298
|
/* @conditional-compile-remove(close-captions) */
|
28270
28299
|
const theme = useTheme();
|
@@ -28275,7 +28304,7 @@ const CaptionSettingsDrawer = (props) => {
|
|
28275
28304
|
/* @conditional-compile-remove(close-captions) */
|
28276
28305
|
const drawerItems = React.useMemo(() => {
|
28277
28306
|
var _a;
|
28278
|
-
return
|
28307
|
+
return _getKeys((_a = props.supportedLanguageStrings) !== null && _a !== void 0 ? _a : []).map((languageCode) => ({
|
28279
28308
|
itemKey: languageCode,
|
28280
28309
|
text: props.supportedLanguageStrings ? props.supportedLanguageStrings[languageCode] : languageCode,
|
28281
28310
|
onItemClick: () => onDrawerItemClick(languageCode),
|
@@ -28319,6 +28348,38 @@ const themedToggleButtonStyle = (theme, checked) => {
|
|
28319
28348
|
};
|
28320
28349
|
};
|
28321
28350
|
|
28351
|
+
// Copyright (c) Microsoft Corporation.
|
28352
|
+
// Licensed under the MIT License.
|
28353
|
+
/** @private */
|
28354
|
+
const SpokenLanguageSettingsDrawer = (props) => {
|
28355
|
+
var _a;
|
28356
|
+
/* @conditional-compile-remove(close-captions) */
|
28357
|
+
const theme = useTheme();
|
28358
|
+
/* @conditional-compile-remove(close-captions) */
|
28359
|
+
const onDrawerItemClick = React.useCallback((languageCode) => {
|
28360
|
+
props.selectLanguage(languageCode);
|
28361
|
+
}, [props]);
|
28362
|
+
/* @conditional-compile-remove(close-captions) */
|
28363
|
+
const drawerItems = React.useMemo(() => {
|
28364
|
+
var _a;
|
28365
|
+
return _getKeys((_a = props.supportedLanguageStrings) !== null && _a !== void 0 ? _a : []).map((languageCode) => ({
|
28366
|
+
itemKey: languageCode,
|
28367
|
+
text: props.supportedLanguageStrings ? props.supportedLanguageStrings[languageCode] : languageCode,
|
28368
|
+
onItemClick: () => onDrawerItemClick(languageCode),
|
28369
|
+
secondaryIconProps: props.currentLanguage === languageCode ? { iconName: 'Accept' } : undefined
|
28370
|
+
}));
|
28371
|
+
}, [props.currentLanguage, props.supportedLanguageStrings, onDrawerItemClick]);
|
28372
|
+
const sortedDrawerItems = React.useMemo(() => {
|
28373
|
+
const copy = [...drawerItems];
|
28374
|
+
return copy.sort((a, b) => (a.text && b.text && a.text > b.text ? 1 : -1));
|
28375
|
+
}, [drawerItems]);
|
28376
|
+
/* @conditional-compile-remove(close-captions) */
|
28377
|
+
return (React.createElement(_DrawerMenu, { heading: (_a = props.strings) === null || _a === void 0 ? void 0 : _a.menuTitle, items: sortedDrawerItems !== null && sortedDrawerItems !== void 0 ? sortedDrawerItems : [], onLightDismiss: () => {
|
28378
|
+
props.setCurrentLanguage(props.currentLanguage);
|
28379
|
+
props.onLightDismiss();
|
28380
|
+
}, styles: captionSettingsDrawerStyles(theme) }));
|
28381
|
+
};
|
28382
|
+
|
28322
28383
|
// Copyright (c) Microsoft Corporation.
|
28323
28384
|
// Licensed under the MIT License.
|
28324
28385
|
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
@@ -28669,8 +28730,8 @@ const MoreDrawer = (props) => {
|
|
28669
28730
|
});
|
28670
28731
|
/* @conditional-compile-remove(close-captions) */
|
28671
28732
|
return (React.createElement(React.Fragment, null,
|
28672
|
-
isSpokenLanguageDrawerOpen && props.isCaptionsSupported && (React.createElement(
|
28673
|
-
isCaptionLanguageDrawerOpen && props.isCaptionsSupported && (React.createElement(
|
28733
|
+
isSpokenLanguageDrawerOpen && props.isCaptionsSupported && (React.createElement(SpokenLanguageSettingsDrawer, { onLightDismiss: props.onLightDismiss, selectLanguage: setCurrentSpokenLanguage, setCurrentLanguage: captionSettingsHandlers.onSetSpokenLanguage, currentLanguage: currentSpokenLanguage, strings: { menuTitle: props.strings.spokenLanguageMenuTitle }, supportedLanguageStrings: supportedSpokenLanguageStrings })),
|
28734
|
+
isCaptionLanguageDrawerOpen && props.isCaptionsSupported && (React.createElement(CaptionLanguageSettingsDrawer, { onLightDismiss: props.onLightDismiss, selectLanguage: setCurrentCaptionLanguage, setCurrentLanguage: captionSettingsHandlers.onSetCaptionLanguage, currentLanguage: currentCaptionLanguage, strings: { menuTitle: props.strings.captionLanguageMenuTitle }, supportedLanguageStrings: supportedCaptionLanguageStrings })),
|
28674
28735
|
!isSpokenLanguageDrawerOpen && !isCaptionLanguageDrawerOpen && (React.createElement(_DrawerMenu, { items: drawerMenuItems, onLightDismiss: props.onLightDismiss }))));
|
28675
28736
|
};
|
28676
28737
|
const isDeviceSelected = (speaker, selectedSpeaker) => !!selectedSpeaker && speaker.id === selectedSpeaker.id;
|
@@ -31066,7 +31127,7 @@ const DtmfDialpadPageContent = (props) => {
|
|
31066
31127
|
return (React.createElement(react.Stack, { style: { height: '100%', width: '100%', background: theme.palette.white } },
|
31067
31128
|
React.createElement(react.Stack, { verticalAlign: 'center', style: { margin: 'auto' } },
|
31068
31129
|
React.createElement(DtmfDialerContentTimer, null),
|
31069
|
-
React.createElement(react.Text, { style: { margin: 'auto' } }, calleeName !== 'Unnamed participant' ? calleeName : ''),
|
31130
|
+
React.createElement(react.Text, { style: { margin: 'auto' } }, calleeName && calleeName !== 'Unnamed participant' ? calleeName === null || calleeName === void 0 ? void 0 : calleeName.toString() : ''),
|
31070
31131
|
React.createElement(Dialpad, { onSendDtmfTone: (tone) => __awaiter$c(void 0, void 0, void 0, function* () {
|
31071
31132
|
/* @conditional-compile-remove(dtmf-dialer) */
|
31072
31133
|
yield adapter.sendDtmfTone(tone);
|
@@ -33173,15 +33234,21 @@ const trackCapabilityChangedNotificationAsDismissed = (capabilityName, trackedNo
|
|
33173
33234
|
};
|
33174
33235
|
/* @conditional-compile-remove(capabilities) */
|
33175
33236
|
const updateLatestCapabilityChangedNotificationMap = (capabilitiesChangedInfoAndRole, activeNotifications) => {
|
33237
|
+
var _a, _b;
|
33176
33238
|
if (!capabilitiesChangedInfoAndRole.capabilitiesChangeInfo) {
|
33177
33239
|
return activeNotifications;
|
33178
33240
|
}
|
33179
|
-
for (const [
|
33241
|
+
for (const [capabilityKey, newCapabilityValue] of Object.entries(capabilitiesChangedInfoAndRole.capabilitiesChangeInfo.newValue)) {
|
33242
|
+
// Cast is safe because we are iterating over the enum keys on the object.entries where
|
33243
|
+
// newCapabilityValue typing is correctly returned. Object.entries limitations
|
33244
|
+
// always returns string for the key
|
33245
|
+
const capabilityName = capabilityKey;
|
33180
33246
|
// If the active notification for a capability has the same `isPresent` value and the same reason as the new
|
33181
33247
|
// capability value from the SDK then we will not create a new notification to avoid redundancy
|
33182
33248
|
if (activeNotifications[capabilityName] &&
|
33183
|
-
newCapabilityValue.isPresent === activeNotifications[capabilityName].isPresent &&
|
33184
|
-
capabilitiesChangedInfoAndRole.capabilitiesChangeInfo.reason ===
|
33249
|
+
newCapabilityValue.isPresent === ((_a = activeNotifications[capabilityName]) === null || _a === void 0 ? void 0 : _a.isPresent) &&
|
33250
|
+
capabilitiesChangedInfoAndRole.capabilitiesChangeInfo.reason ===
|
33251
|
+
((_b = activeNotifications[capabilityName]) === null || _b === void 0 ? void 0 : _b.changedReason)) {
|
33185
33252
|
continue;
|
33186
33253
|
}
|
33187
33254
|
const newCapabilityChangeNotification = {
|
@@ -33385,7 +33452,7 @@ const Survey = (props) => {
|
|
33385
33452
|
return (React.createElement(React.Fragment, null,
|
33386
33453
|
showDefaultAfterSubmitScreen && React.createElement(ThankYouForFeedbackPage, { iconName: iconName }),
|
33387
33454
|
showDefaultAfterDismissedScreen && (React.createElement(NoticePage, { iconName: iconName, title: title, moreDetails: moreDetails, dataUiId: 'left-call-page', disableStartCallButton: disableStartCallButton })),
|
33388
|
-
!showDefaultAfterSubmitScreen && !showDefaultAfterDismissedScreen && (React.createElement(react.Stack, { verticalAlign: "center", className: surveyContainerStyle(isMobile) },
|
33455
|
+
!showDefaultAfterSubmitScreen && !showDefaultAfterDismissedScreen && (React.createElement(react.Stack, { verticalAlign: "center", className: surveyContainerStyle(!!isMobile) },
|
33389
33456
|
React.createElement(react.Text, { className: questionTextStyle(theme) }, strings.surveyTitle),
|
33390
33457
|
React.createElement(SurveyContent, { setShowSubmitFeedbackButton: (showButton) => {
|
33391
33458
|
setShowSubmitFeedbackButton(showButton);
|
@@ -33902,9 +33969,9 @@ class CallingSoundSubscriber {
|
|
33902
33969
|
this.onCallStateChanged();
|
33903
33970
|
}
|
33904
33971
|
unsubscribeAll() {
|
33905
|
-
var _a;
|
33906
|
-
this.call.off('stateChanged', this.onCallStateChanged);
|
33907
|
-
if ((
|
33972
|
+
var _a, _b;
|
33973
|
+
(_a = this.call) === null || _a === void 0 ? void 0 : _a.off('stateChanged', this.onCallStateChanged);
|
33974
|
+
if ((_b = this.soundsLoaded) === null || _b === void 0 ? void 0 : _b.callRingingSound) {
|
33908
33975
|
this.soundsLoaded.callRingingSound.pause();
|
33909
33976
|
}
|
33910
33977
|
}
|
@@ -34643,15 +34710,11 @@ class AzureCommunicationCallAdapter {
|
|
34643
34710
|
: {};
|
34644
34711
|
const combinedCallOptions = Object.assign(Object.assign({}, startCallVideoOptions), options);
|
34645
34712
|
const idsToAdd = participants.map((participant) => {
|
34646
|
-
|
34647
|
-
if (
|
34648
|
-
backendId = _toCommunicationIdentifier(participant);
|
34649
|
-
}
|
34650
|
-
if (backendId.phoneNumber) {
|
34713
|
+
const backendId = _toCommunicationIdentifier(participant);
|
34714
|
+
if ('phoneNumber' in backendId) {
|
34651
34715
|
if ((options === null || options === void 0 ? void 0 : options.alternateCallerId) === undefined) {
|
34652
34716
|
throw new Error('Unable to start call, PSTN user present with no alternateCallerId.');
|
34653
34717
|
}
|
34654
|
-
return backendId;
|
34655
34718
|
}
|
34656
34719
|
return backendId;
|
34657
34720
|
});
|
@@ -35314,7 +35377,7 @@ const createTeamsCallAdapterFromClient = (callClient, callAgent, locator, option
|
|
35314
35377
|
return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager, options);
|
35315
35378
|
});
|
35316
35379
|
const isCallError = (e) => {
|
35317
|
-
return
|
35380
|
+
return 'target' in e && 'innerError' in e;
|
35318
35381
|
};
|
35319
35382
|
|
35320
35383
|
// Copyright (c) Microsoft Corporation.
|
@@ -37035,7 +37098,10 @@ var call$j={cameraLabel:"Camera",noCamerasLabel:"No cameras found",cameraPermiss
|
|
37035
37098
|
*/
|
37036
37099
|
const createCompositeStrings = (localizedStrings) => {
|
37037
37100
|
const strings = Object.assign({}, en_US);
|
37038
|
-
|
37101
|
+
_getKeys(localizedStrings).forEach((key) => {
|
37102
|
+
// mark the value as unknown because the type changes based on the key.
|
37103
|
+
// this is unsafe at runtime as we could assign the wrong type based on the key here.
|
37104
|
+
// but typescript isn't smart enough to know that the key used across each access will result in the same type
|
37039
37105
|
strings[key] = Object.assign(Object.assign({}, strings[key]), localizedStrings[key]);
|
37040
37106
|
});
|
37041
37107
|
return strings;
|