@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
package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.js
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
import React from 'react';
|
4
|
+
/* @conditional-compile-remove(close-captions) */
|
5
|
+
import { useMemo, useCallback } from 'react';
|
6
|
+
/* @conditional-compile-remove(close-captions) */
|
7
|
+
import { useTheme } from "../../../../../react-components/src";
|
8
|
+
/* @conditional-compile-remove(close-captions) */
|
9
|
+
import { _DrawerMenu as DrawerMenu } from "../../../../../react-components/src";
|
10
|
+
/* @conditional-compile-remove(close-captions) */
|
11
|
+
import { captionSettingsDrawerStyles } from './captionSettingsDrawer.styles';
|
12
|
+
import { _getKeys } from "../../../../../acs-ui-common/src";
|
13
|
+
/** @private */
|
14
|
+
export const CaptionLanguageSettingsDrawer = (props) => {
|
15
|
+
var _a;
|
16
|
+
/* @conditional-compile-remove(close-captions) */
|
17
|
+
const theme = useTheme();
|
18
|
+
/* @conditional-compile-remove(close-captions) */
|
19
|
+
const onDrawerItemClick = useCallback((languageCode) => {
|
20
|
+
props.selectLanguage(languageCode);
|
21
|
+
}, [props]);
|
22
|
+
/* @conditional-compile-remove(close-captions) */
|
23
|
+
const drawerItems = useMemo(() => {
|
24
|
+
var _a;
|
25
|
+
return _getKeys((_a = props.supportedLanguageStrings) !== null && _a !== void 0 ? _a : []).map((languageCode) => ({
|
26
|
+
itemKey: languageCode,
|
27
|
+
text: props.supportedLanguageStrings ? props.supportedLanguageStrings[languageCode] : languageCode,
|
28
|
+
onItemClick: () => onDrawerItemClick(languageCode),
|
29
|
+
secondaryIconProps: props.currentLanguage === languageCode ? { iconName: 'Accept' } : undefined
|
30
|
+
}));
|
31
|
+
}, [props.currentLanguage, props.supportedLanguageStrings, onDrawerItemClick]);
|
32
|
+
const sortedDrawerItems = useMemo(() => {
|
33
|
+
const copy = [...drawerItems];
|
34
|
+
return copy.sort((a, b) => (a.text && b.text && a.text > b.text ? 1 : -1));
|
35
|
+
}, [drawerItems]);
|
36
|
+
/* @conditional-compile-remove(close-captions) */
|
37
|
+
return (React.createElement(DrawerMenu, { heading: (_a = props.strings) === null || _a === void 0 ? void 0 : _a.menuTitle, items: sortedDrawerItems !== null && sortedDrawerItems !== void 0 ? sortedDrawerItems : [], onLightDismiss: () => {
|
38
|
+
props.setCurrentLanguage(props.currentLanguage);
|
39
|
+
props.onLightDismiss();
|
40
|
+
}, styles: captionSettingsDrawerStyles(theme) }));
|
41
|
+
return React.createElement(React.Fragment, null);
|
42
|
+
};
|
43
|
+
//# sourceMappingURL=CaptionLanguageSettingsDrawer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CaptionLanguageSettingsDrawer.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC7C,iDAAiD;AACjD,OAAO,EAAkD,QAAQ,EAAE,4CAAmC;AACtG,iDAAiD;AACjD,OAAO,EACL,WAAW,IAAI,UAAU,EAG1B,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAYnD,eAAe;AACf,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,KAS7C,EAAe,EAAE;;IAChB,iDAAiD;IACjD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,iDAAiD;IAC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O,CACL,oBAAC,UAAU,IACT,OAAO,EAAE,MAAA,KAAK,CAAC,OAAO,0CAAE,SAAS,EACjC,KAAK,EAAE,iBAAiB,aAAjB,iBAAiB,cAAjB,iBAAiB,GAAI,EAAE,EAC9B,cAAc,EAAE,GAAG,EAAE;YACnB,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAChD,KAAK,CAAC,cAAc,EAAE,CAAC;QACzB,CAAC,EACD,MAAM,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAC1C,CACH,CAAC;IACF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(close-captions) */\nimport { useMemo, useCallback } from 'react';\n/* @conditional-compile-remove(close-captions) */\nimport { _CaptionsSettingsModal, CaptionLanguageStrings, useTheme } from '@internal/react-components';\n/* @conditional-compile-remove(close-captions) */\nimport {\n _DrawerMenu as DrawerMenu,\n _DrawerMenuItemProps as DrawerMenuItemProps,\n _DrawerMenuStyles\n} from '@internal/react-components';\n/* @conditional-compile-remove(close-captions) */\nimport { captionSettingsDrawerStyles } from './captionSettingsDrawer.styles';\nimport { _getKeys } from '@internal/acs-ui-common';\n\n/** @private */\nexport interface CaptionSettingsDrawerStrings {\n /**\n * Label for spoken language/caption language drawerMenuItem\n *\n * @remarks Only displayed when in Teams call, disabled until captions is on\n */\n menuTitle: string;\n}\n\n/** @private */\nexport const CaptionLanguageSettingsDrawer = (props: {\n /* @conditional-compile-remove(close-captions) */ selectLanguage: (language: keyof CaptionLanguageStrings) => void;\n /* @conditional-compile-remove(close-captions) */ setCurrentLanguage: (\n language: keyof CaptionLanguageStrings\n ) => void;\n /* @conditional-compile-remove(close-captions) */ currentLanguage: keyof CaptionLanguageStrings;\n /* @conditional-compile-remove(close-captions) */ onLightDismiss: () => void;\n /* @conditional-compile-remove(close-captions) */ strings?: CaptionSettingsDrawerStrings;\n /* @conditional-compile-remove(close-captions) */ supportedLanguageStrings?: CaptionLanguageStrings;\n}): JSX.Element => {\n /* @conditional-compile-remove(close-captions) */\n const theme = useTheme();\n\n /* @conditional-compile-remove(close-captions) */\n const onDrawerItemClick = useCallback(\n (languageCode: keyof CaptionLanguageStrings) => {\n props.selectLanguage(languageCode);\n },\n [props]\n );\n\n /* @conditional-compile-remove(close-captions) */\n const drawerItems: DrawerMenuItemProps[] = useMemo(() => {\n return _getKeys(props.supportedLanguageStrings ?? []).map((languageCode) => ({\n itemKey: languageCode,\n text: props.supportedLanguageStrings ? props.supportedLanguageStrings[languageCode] : languageCode,\n onItemClick: () => onDrawerItemClick(languageCode),\n secondaryIconProps: props.currentLanguage === languageCode ? { iconName: 'Accept' } : undefined\n }));\n }, [props.currentLanguage, props.supportedLanguageStrings, onDrawerItemClick]);\n\n const sortedDrawerItems: DrawerMenuItemProps[] = useMemo(() => {\n const copy = [...drawerItems];\n return copy.sort((a, b) => (a.text && b.text && a.text > b.text ? 1 : -1));\n }, [drawerItems]);\n\n /* @conditional-compile-remove(close-captions) */\n return (\n <DrawerMenu\n heading={props.strings?.menuTitle}\n items={sortedDrawerItems ?? []}\n onLightDismiss={() => {\n props.setCurrentLanguage(props.currentLanguage);\n props.onLightDismiss();\n }}\n styles={captionSettingsDrawerStyles(theme)}\n />\n );\n return <></>;\n};\n"]}
|
@@ -37,7 +37,7 @@ import { _captionSettingsSelector } from "../../../../../calling-component-bindi
|
|
37
37
|
/* @conditional-compile-remove(close-captions) */
|
38
38
|
import { useHandlers } from '../../CallComposite/hooks/useHandlers';
|
39
39
|
/* @conditional-compile-remove(close-captions) */
|
40
|
-
import {
|
40
|
+
import { CaptionLanguageSettingsDrawer } from './CaptionLanguageSettingsDrawer';
|
41
41
|
/* @conditional-compile-remove(close-captions) */
|
42
42
|
import { themedToggleButtonStyle } from './MoreDrawer.styles';
|
43
43
|
/* @conditional-compile-remove(close-captions) */
|
@@ -50,6 +50,7 @@ import { useSelector } from '../../CallComposite/hooks/useSelector';
|
|
50
50
|
import { getTargetCallees } from '../../CallComposite/selectors/baseSelectors';
|
51
51
|
/* @conditional-compile-remove(dtmf-dialer) */
|
52
52
|
import { showDtmfDialer } from '../../CallComposite/utils/MediaGalleryUtils';
|
53
|
+
import { SpokenLanguageSettingsDrawer } from './SpokenLanguageSettingsDrawer';
|
53
54
|
const inferCallWithChatControlOptions = (callWithChatControls) => {
|
54
55
|
if (callWithChatControls === false) {
|
55
56
|
return false;
|
@@ -389,8 +390,8 @@ export const MoreDrawer = (props) => {
|
|
389
390
|
});
|
390
391
|
/* @conditional-compile-remove(close-captions) */
|
391
392
|
return (React.createElement(React.Fragment, null,
|
392
|
-
isSpokenLanguageDrawerOpen && props.isCaptionsSupported && (React.createElement(
|
393
|
-
isCaptionLanguageDrawerOpen && props.isCaptionsSupported && (React.createElement(
|
393
|
+
isSpokenLanguageDrawerOpen && props.isCaptionsSupported && (React.createElement(SpokenLanguageSettingsDrawer, { onLightDismiss: props.onLightDismiss, selectLanguage: setCurrentSpokenLanguage, setCurrentLanguage: captionSettingsHandlers.onSetSpokenLanguage, currentLanguage: currentSpokenLanguage, strings: { menuTitle: props.strings.spokenLanguageMenuTitle }, supportedLanguageStrings: supportedSpokenLanguageStrings })),
|
394
|
+
isCaptionLanguageDrawerOpen && props.isCaptionsSupported && (React.createElement(CaptionLanguageSettingsDrawer, { onLightDismiss: props.onLightDismiss, selectLanguage: setCurrentCaptionLanguage, setCurrentLanguage: captionSettingsHandlers.onSetCaptionLanguage, currentLanguage: currentCaptionLanguage, strings: { menuTitle: props.strings.captionLanguageMenuTitle }, supportedLanguageStrings: supportedCaptionLanguageStrings })),
|
394
395
|
!isSpokenLanguageDrawerOpen && !isCaptionLanguageDrawerOpen && (React.createElement(DrawerMenu, { items: drawerMenuItems, onLightDismiss: props.onLightDismiss }))));
|
395
396
|
return React.createElement(DrawerMenu, { items: drawerMenuItems, onLightDismiss: props.onLightDismiss });
|
396
397
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MoreDrawer.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/Drawer/MoreDrawer.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,iDAAiD;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,+DAA+D;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAEL,WAAW,IAAI,UAAU,EAG1B,4CAAmC;AAGpC,iDAAiD;AACjD,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,4CAAmC;AAE1F,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,UAAU,EAAE,4CAAmC;AACxD,6CAA6C;AAC7C,OAAO,EAAE,eAAe,EAAwB,4CAAmC;AAEnF,+DAA+D;AAC/D,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,kCAAkC,EACnC,MAAM,4BAA4B,CAAC;AACpC,6CAA6C,CAAC,mDAAmD,CAAC,6CAA6C;AAC/I,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,6CAA6C,CAAC,mDAAmD,CAAC,iDAAiD,CAAC,6CAA6C;AACjM,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,iDAAiD;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG1D,iDAAiD;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,iDAAiD;AACjD,OAAO,EAAE,wBAAwB,EAAgC,sDAA6C;AAC9G,iDAAiD;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,C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IACH,iDAAiD;IACjD,OAAO,CACL;QACG,0BAA0B,IAAI,KAAK,CAAC,mBAAmB,IAAI,CAC1D,oBAAC,qBAAqB,IACpB,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,cAAc,EAAE,wBAAwB,EACxC,kBAAkB,EAAE,uBAAuB,CAAC,mBAAmB,EAC/D,eAAe,EAAE,qBAAqB,EACtC,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,uBAAuB,EAAE,EAC7D,wBAAwB,EAAE,8BAA8B,GACxD,CACH;QACA,2BAA2B,IAAI,KAAK,CAAC,mBAAmB,IAAI,CAC3D,oBAAC,qBAAqB,IACpB,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,cAAc,EAAE,yBAAyB,EACzC,kBAAkB,EAAE,uBAAuB,CAAC,oBAAoB,EAChE,eAAe,EAAE,sBAAsB,EACvC,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,wBAAwB,EAAE,EAC9D,wBAAwB,EAAE,+BAA+B,GACzD,CACH;QACA,CAAC,0BAA0B,IAAI,CAAC,2BAA2B,IAAI,CAC9D,oBAAC,UAAU,IAAC,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc,GAAI,CAC7E,CACA,CACJ,CAAC;IAEF,OAAO,oBAAC,UAAU,IAAC,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc,GAAI,CAAC;AACtF,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,OAAsB,EAAE,eAA+B,EAAW,EAAE,CAC5F,CAAC,CAAC,eAAe,IAAI,OAAO,CAAC,EAAE,KAAK,eAAe,CAAC,EAAE,CAAC;AAEzD,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback } from 'react';\n/* @conditional-compile-remove(close-captions) */\nimport { useState } from 'react';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { useMemo } from 'react';\nimport {\n OptionsDevice,\n _DrawerMenu as DrawerMenu,\n _DrawerMenuItemProps as DrawerMenuItemProps,\n _DrawerMenuStyles\n} from '@internal/react-components';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { VideoGalleryLayout } from '@internal/react-components';\n/* @conditional-compile-remove(close-captions) */\nimport { _StartCaptionsButton, _CaptionsSettingsModal } from '@internal/react-components';\n\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHandButton, RaiseHandButtonProps } from '@internal/react-components';\nimport { AudioDeviceInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport {\n CUSTOM_BUTTON_OPTIONS,\n generateCustomCallDrawerButtons,\n onFetchCustomButtonPropsTrampoline\n} from '../ControlBar/CustomButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(raise-hand) */\nimport { usePropsFor } from '../../CallComposite/hooks/usePropsFor';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { useLocale } from '../../localization';\nimport { isDisabled } from '../../CallComposite/utils';\nimport { CommonCallControlOptions } from '../types/CommonCallControlOptions';\n/* @conditional-compile-remove(close-captions) */\nimport { Stack, Toggle, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(close-captions) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(close-captions) */\nimport { useAdaptedSelector } from '../../CallComposite/hooks/useAdaptedSelector';\n/* @conditional-compile-remove(close-captions) */\nimport { _captionSettingsSelector, _startCaptionsButtonSelector } from '@internal/calling-component-bindings';\n/* @conditional-compile-remove(close-captions) */\nimport { useHandlers } from '../../CallComposite/hooks/useHandlers';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionSettingsDrawer } from './CaptionSettingsDrawer';\n/* @conditional-compile-remove(close-captions) */\nimport { themedToggleButtonStyle } from './MoreDrawer.styles';\n/* @conditional-compile-remove(close-captions) */\nimport { _spokenLanguageToCaptionLanguage } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { useAdapter } from '../../CallComposite/adapter/CallAdapterProvider';\n/* @conditional-compile-remove(dtmf-dialer) */\nimport { useSelector } from '../../CallComposite/hooks/useSelector';\n/* @conditional-compile-remove(dtmf-dialer) */\nimport { getTargetCallees } from '../../CallComposite/selectors/baseSelectors';\n/* @conditional-compile-remove(dtmf-dialer) */\nimport { showDtmfDialer } from '../../CallComposite/utils/MediaGalleryUtils';\n\n/** @private */\nexport interface MoreDrawerStrings {\n /**\n * Label for people drawerMenuItem.\n */\n peopleButtonLabel: string;\n /**\n * Label for audio device drawerMenuItem.\n *\n * @remarks This replaces the microphoneMenuTitle speakers can not be enumerated\n *\n */\n audioDeviceMenuTitle?: string;\n /**\n * Label for microphone drawerMenuItem.\n *\n * @remarks Only displayed when speakers can be enumerated otherwise audioDeviceMenuTitle is used\n *\n */\n microphoneMenuTitle: string;\n /**\n * Label for speaker drawerMenuItem.\n *\n * @remarks Only displayed when speakers can be enumerated\n *\n */\n speakerMenuTitle: string;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Label for captions drawerMenuItem\n *\n * @remarks Only displayed when in Teams call\n */\n captionsMenuTitle: string;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Label for spokenLanguage drawerMenuItem\n *\n * @remarks Only displayed when in Teams call, disabled until captions is on\n */\n spokenLanguageMenuTitle: string;\n\n /* @conditional-compile-remove(close-captions) */\n /**\n * Label for captionLanguage drawerMenuItem\n *\n * @remarks Only displayed when in Teams call, disabled until captions is on\n */\n captionLanguageMenuTitle: string;\n\n /* @conditional-compile-remove(gallery-layouts) */\n /**\n * Label for gallery options drawerMenuItem\n */\n galleryOptionsMenuTitle: string;\n}\n\n/** @private */\nexport interface MoreDrawerDevicesMenuProps {\n /**\n * Available microphones for selection\n */\n microphones?: OptionsDevice[];\n /**\n * Available speakers for selection\n */\n speakers?: OptionsDevice[];\n /**\n * Microphone that is shown as currently selected\n */\n selectedMicrophone?: OptionsDevice;\n /**\n * Speaker that is shown as currently selected\n */\n selectedSpeaker?: OptionsDevice;\n /**\n * Speaker when a speaker is selected\n */\n onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;\n /**\n * Callback when a microphone is selected\n */\n onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout?: VideoGalleryLayout;\n /* @conditional-compile-remove(gallery-layouts) */\n /**\n * Callback for when the gallery layout is changed\n */\n onUserSetGalleryLayout?: (layout: VideoGalleryLayout) => void;\n /* @conditional-compile-remove(dtmf-dialer) */\n /**\n * Callback to hide and show the dialpad in the more drawer\n */\n onSetDialpadPage?: () => void;\n /* @conditional-compile-remove(dtmf-dialer) */\n /**\n * Whether the dialpad is present in the call\n */\n dtmfDialerPresent?: boolean;\n}\n\n/** @private */\nexport interface MoreDrawerProps extends MoreDrawerDevicesMenuProps {\n onLightDismiss: () => void;\n onPeopleButtonClicked: () => void;\n callControls?: boolean | CommonCallControlOptions;\n onClickShowDialpad?: () => void;\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported?: boolean;\n strings: MoreDrawerStrings;\n disableButtonsForHoldScreen?: boolean;\n}\n\nconst inferCallWithChatControlOptions = (\n callWithChatControls?: boolean | CommonCallControlOptions\n): CommonCallControlOptions | false => {\n if (callWithChatControls === false) {\n return false;\n }\n const options = callWithChatControls === true || callWithChatControls === undefined ? {} : callWithChatControls;\n return options;\n};\n\n/** @private */\nexport const MoreDrawer = (props: MoreDrawerProps): JSX.Element => {\n /* @conditional-compile-remove(close-captions) */\n const theme = useTheme();\n /* @conditional-compile-remove(rooms) */\n const callAdapter = useAdapter();\n const drawerMenuItems: DrawerMenuItemProps[] = [];\n\n const { speakers, onSelectSpeaker, onLightDismiss } = props;\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n const localeStrings = useLocale();\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const holdButtonProps = usePropsFor(HoldButton);\n\n /* @conditional-compile-remove(dtmf-dialer) */\n const callees = useSelector(getTargetCallees);\n /* @conditional-compile-remove(dtmf-dialer) */\n const allowDtmfDialer = showDtmfDialer(callees);\n /* @conditional-compile-remove(dtmf-dialer) */\n const [dtmfDialerChecked, setDtmfDialerChecked] = useState<boolean>(props.dtmfDialerPresent ?? false);\n\n /* @conditional-compile-remove(raise-hand) */\n const raiseHandButtonProps = usePropsFor(RaiseHandButton) as RaiseHandButtonProps;\n\n const onSpeakerItemClick = useCallback(\n (_ev, itemKey) => {\n const selected = speakers?.find((speaker) => speaker.id === itemKey);\n if (selected) {\n // This is unsafe - we're only passing in part of the argument to the handler.\n // But this is a known issue in our state.\n onSelectSpeaker(selected as AudioDeviceInfo);\n }\n onLightDismiss();\n },\n [speakers, onSelectSpeaker, onLightDismiss]\n );\n\n const drawerSelectionOptions = inferCallWithChatControlOptions(props.callControls);\n\n if (props.speakers && props.speakers.length > 0) {\n drawerMenuItems.push({\n itemKey: 'speakers',\n disabled: props.disableButtonsForHoldScreen,\n text: props.strings.speakerMenuTitle,\n iconProps: { iconName: 'MoreDrawerSpeakers' },\n subMenuProps: props.speakers.map((speaker) => ({\n itemKey: speaker.id,\n iconProps: {\n iconName: isDeviceSelected(speaker, props.selectedSpeaker)\n ? 'MoreDrawerSelectedSpeaker'\n : 'MoreDrawerSpeakers'\n },\n text: speaker.name,\n onItemClick: onSpeakerItemClick,\n secondaryIconProps: isDeviceSelected(speaker, props.selectedSpeaker) ? { iconName: 'Accept' } : undefined\n })),\n secondaryText: props.selectedSpeaker?.name\n });\n }\n\n const { microphones, onSelectMicrophone } = props;\n const onMicrophoneItemClick = useCallback(\n (_ev, itemKey) => {\n const selected = microphones?.find((mic) => mic.id === itemKey);\n if (selected) {\n // This is unsafe - we're only passing in part of the argument to the handler.\n // But this is a known issue in our state.\n onSelectMicrophone(selected as AudioDeviceInfo);\n }\n onLightDismiss();\n },\n [microphones, onSelectMicrophone, onLightDismiss]\n );\n\n if (props.microphones && props.microphones.length > 0) {\n // Set props as Microphone if speakers can be enumerated else set as Audio Device\n const speakersAvailable = props.speakers && props.speakers.length > 0;\n const itemKey = speakersAvailable ? 'microphones' : 'audioDevices';\n const text = speakersAvailable ? props.strings.microphoneMenuTitle : props.strings.audioDeviceMenuTitle;\n const iconName = speakersAvailable ? 'MoreDrawerMicrophones' : 'MoreDrawerSpeakers';\n const selectedIconName = speakersAvailable ? 'MoreDrawerSelectedMicrophone' : 'MoreDrawerSelectedSpeaker';\n\n drawerMenuItems.push({\n itemKey: itemKey,\n disabled: props.disableButtonsForHoldScreen,\n text: text,\n iconProps: { iconName: iconName },\n subMenuProps: props.microphones.map((mic) => ({\n itemKey: mic.id,\n iconProps: {\n iconName: isDeviceSelected(mic, props.selectedMicrophone) ? selectedIconName : iconName\n },\n text: mic.name,\n onItemClick: onMicrophoneItemClick,\n secondaryIconProps: isDeviceSelected(mic, props.selectedMicrophone) ? { iconName: 'Accept' } : undefined,\n disabled: drawerSelectionOptions !== false ? isDisabled(drawerSelectionOptions.microphoneButton) : undefined\n })),\n secondaryText: props.selectedMicrophone?.name\n });\n }\n\n /* @conditional-compile-remove(dtmf-dialer) */\n const dtmfDialerScreenOption = {\n itemKey: 'dtmfDialerScreenKey',\n text: !dtmfDialerChecked\n ? localeStrings.strings.call.dtmfDialerMoreButtonLabelOn\n : localeStrings.strings.call.dtmfDialerMoreButtonLabelOff,\n onItemClick: () => {\n if (props.onSetDialpadPage) {\n props.onSetDialpadPage();\n }\n setDtmfDialerChecked(!dtmfDialerChecked);\n onLightDismiss();\n },\n iconProps: {\n iconName: 'DtmfDialpadButton',\n styles: { root: { lineHeight: 0 } }\n }\n };\n /* @conditional-compile-remove(dtmf-dialer) */\n /**\n * Only render the dtmf dialer if the dialpad for PSTN calls is not present\n */\n if (props.onSetDialpadPage && allowDtmfDialer) {\n drawerMenuItems.push(dtmfDialerScreenOption);\n }\n /* @conditional-compile-remove(gallery-layouts) */\n const galleryLayoutOptions = {\n itemKey: 'galleryPositionKey',\n iconProps: {\n iconName: 'GalleryOptions',\n styles: { root: { lineHeight: 0 } }\n },\n disabled: props.disableButtonsForHoldScreen,\n text: localeStrings.strings.call.moreButtonGalleryControlLabel,\n subMenuProps: [\n {\n itemKey: 'dynamicSelectionKey',\n text: localeStrings.strings.call.moreButtonGalleryFloatingLocalLayoutLabel,\n onItemClick: () => {\n props.onUserSetGalleryLayout && props.onUserSetGalleryLayout('floatingLocalVideo');\n onLightDismiss();\n },\n iconProps: {\n iconName: 'FloatingLocalVideoGalleryLayout',\n styles: { root: { lineHeight: 0 } }\n },\n secondaryIconProps: props.userSetGalleryLayout === 'floatingLocalVideo' ? { iconName: 'Accept' } : undefined\n },\n {\n itemKey: 'focusedContentSelectionKey',\n text: localeStrings.strings.call.moreButtonGalleryFocusedContentLayoutLabel,\n onItemClick: () => {\n props.onUserSetGalleryLayout && props.onUserSetGalleryLayout('focusedContent');\n onLightDismiss();\n },\n iconProps: {\n iconName: 'FocusedContentGalleryLayout',\n styles: { root: { lineHeight: 0 } }\n },\n secondaryIconProps: props.userSetGalleryLayout === 'focusedContent' ? { iconName: 'Accept' } : undefined\n }\n ]\n };\n\n /* @conditional-compile-remove(gallery-layout-composite) */\n const galleryOption = {\n itemKey: 'defaultSelectionKey',\n text: localeStrings.strings.call.moreButtonGalleryDefaultLayoutLabel,\n onItemClick: () => {\n props.onUserSetGalleryLayout && props.onUserSetGalleryLayout('default');\n onLightDismiss();\n },\n iconProps: {\n iconName: 'DefaultGalleryLayout',\n styles: { root: { lineHeight: 0 } }\n },\n secondaryIconProps: props.userSetGalleryLayout === 'default' ? { iconName: 'Accept' } : undefined\n };\n\n /* @conditional-compile-remove(gallery-layout-composite) */\n galleryLayoutOptions.subMenuProps?.push(galleryOption);\n\n /* @conditional-compile-remove(gallery-layouts) */\n drawerMenuItems.push(galleryLayoutOptions);\n\n if (drawerSelectionOptions !== false && isEnabled(drawerSelectionOptions?.peopleButton)) {\n drawerMenuItems.push({\n itemKey: 'people',\n id: 'call-composite-drawer-people-button',\n text: props.strings.peopleButtonLabel,\n iconProps: { iconName: 'MoreDrawerPeople' },\n onItemClick: props.onPeopleButtonClicked,\n disabled: isDisabled(drawerSelectionOptions.peopleButton) || props.disableButtonsForHoldScreen\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n if (drawerSelectionOptions !== false && isEnabled(drawerSelectionOptions?.holdButton)) {\n drawerMenuItems.push({\n itemKey: 'holdButtonKey',\n disabled: props.disableButtonsForHoldScreen || isDisabled(drawerSelectionOptions.holdButton),\n text: localeStrings.component.strings.holdButton.tooltipOffContent,\n onItemClick: () => {\n holdButtonProps.onToggleHold();\n onLightDismiss();\n },\n iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } }\n });\n }\n\n /*@conditional-compile-remove(rooms) */\n const role = callAdapter.getState().call?.role;\n /*@conditional-compile-remove(rooms) */\n const hideRaiseHandButtonInRoomsCall =\n callAdapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);\n\n /* @conditional-compile-remove(raise-hand) */\n if (\n drawerSelectionOptions !== false &&\n isEnabled(drawerSelectionOptions?.raiseHandButton) &&\n /*@conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall\n ) {\n const raiseHandIcon = raiseHandButtonProps.checked ? 'LowerHandContextualMenuItem' : 'RaiseHandContextualMenuItem';\n drawerMenuItems.push({\n itemKey: 'raiseHandButtonKey',\n disabled: props.disableButtonsForHoldScreen || isDisabled(drawerSelectionOptions.raiseHandButton),\n text: raiseHandButtonProps.checked\n ? localeStrings.component.strings.raiseHandButton.onLabel\n : localeStrings.component.strings.raiseHandButton.offLabel,\n onItemClick: () => {\n if (raiseHandButtonProps.onToggleRaiseHand) {\n raiseHandButtonProps.onToggleRaiseHand();\n }\n onLightDismiss();\n },\n iconProps: {\n iconName: raiseHandIcon,\n styles: { root: { lineHeight: 0 } }\n }\n });\n }\n\n /* @conditional-compile-remove(close-captions) */\n //Captions drawer menu\n const supportedSpokenLanguageStrings = useLocale().strings.call.spokenLanguageStrings;\n\n /* @conditional-compile-remove(close-captions) */\n //Captions drawer menu\n const supportedCaptionLanguageStrings = useLocale().strings.call.captionLanguageStrings;\n /* @conditional-compile-remove(close-captions) */\n const captionSettingsProp = useAdaptedSelector(_captionSettingsSelector);\n /* @conditional-compile-remove(close-captions) */\n const startCaptionsButtonHandlers = useHandlers(_StartCaptionsButton);\n /* @conditional-compile-remove(close-captions) */\n const captionSettingsHandlers = useHandlers(_CaptionsSettingsModal);\n\n /* @conditional-compile-remove(close-captions) */\n const [isSpokenLanguageDrawerOpen, setIsSpokenLanguageDrawerOpen] = useState<boolean>(false);\n\n /* @conditional-compile-remove(close-captions) */\n const [isCaptionLanguageDrawerOpen, setIsCaptionLanguageDrawerOpen] = useState<boolean>(false);\n\n /* @conditional-compile-remove(close-captions) */\n const [currentSpokenLanguage, setCurrentSpokenLanguage] = useState<string>(\n captionSettingsProp.currentSpokenLanguage ?? 'en-us'\n );\n\n /* @conditional-compile-remove(close-captions) */\n const [currentCaptionLanguage, setCurrentCaptionLanguage] = useState<string>(\n captionSettingsProp.currentCaptionLanguage ?? _spokenLanguageToCaptionLanguage[currentSpokenLanguage]\n );\n\n /* @conditional-compile-remove(close-captions) */\n const onToggleChange = useCallback(async () => {\n if (!captionSettingsProp.isCaptionsFeatureActive) {\n await startCaptionsButtonHandlers.onStartCaptions({\n spokenLanguage: currentSpokenLanguage\n });\n } else {\n startCaptionsButtonHandlers.onStopCaptions();\n }\n }, [captionSettingsProp.isCaptionsFeatureActive, startCaptionsButtonHandlers, currentSpokenLanguage]);\n\n /* @conditional-compile-remove(close-captions) */\n if (props.isCaptionsSupported) {\n const captionsDrawerItems: DrawerMenuItemProps[] = [];\n\n const spokenLanguageString = supportedSpokenLanguageStrings\n ? supportedSpokenLanguageStrings[currentSpokenLanguage]\n : currentSpokenLanguage;\n const captionLanguageString = supportedCaptionLanguageStrings\n ? supportedCaptionLanguageStrings[currentCaptionLanguage]\n : currentCaptionLanguage;\n\n drawerMenuItems.push({\n itemKey: 'captions',\n id: 'common-call-composite-captions-button',\n disabled: props.disableButtonsForHoldScreen,\n text: props.strings.captionsMenuTitle,\n iconProps: { iconName: 'CaptionsIcon' },\n subMenuProps: captionsDrawerItems\n });\n\n captionsDrawerItems.push({\n itemKey: 'ToggleCaptionsKey',\n text: captionSettingsProp.isCaptionsFeatureActive\n ? localeStrings.strings.call.startCaptionsButtonTooltipOnContent\n : localeStrings.strings.call.startCaptionsButtonTooltipOffContent,\n iconProps: {\n iconName: captionSettingsProp.isCaptionsFeatureActive ? 'CaptionsOffIcon' : 'CaptionsIcon',\n styles: { root: { lineHeight: 0 } }\n },\n onItemClick: onToggleChange,\n disabled: props.disableButtonsForHoldScreen,\n secondaryComponent: (\n <Stack verticalFill verticalAlign=\"center\">\n <Toggle\n id=\"common-call-composite-captions-toggle-button\"\n checked={captionSettingsProp.isCaptionsFeatureActive}\n styles={themedToggleButtonStyle(theme, captionSettingsProp.isCaptionsFeatureActive)}\n onChange={onToggleChange}\n />\n </Stack>\n )\n });\n\n captionsDrawerItems.push({\n itemKey: 'ChangeSpokenLanguage',\n text: props.strings.spokenLanguageMenuTitle,\n id: 'common-call-composite-captions-spoken-settings-button',\n secondaryText: spokenLanguageString,\n iconProps: {\n iconName: 'ChangeSpokenLanguageIcon',\n styles: { root: { lineHeight: 0 } }\n },\n disabled: props.disableButtonsForHoldScreen || !captionSettingsProp.isCaptionsFeatureActive,\n onItemClick: () => {\n setIsSpokenLanguageDrawerOpen(true);\n },\n secondaryIconProps: {\n iconName: 'ChevronRight',\n styles: { root: { lineHeight: 0 } }\n }\n });\n\n captionsDrawerItems.push({\n itemKey: 'ChangeCaptionLanguage',\n text: props.strings.captionLanguageMenuTitle,\n id: 'common-call-composite-captions-subtitle-settings-button',\n secondaryText: captionLanguageString,\n iconProps: {\n iconName: 'ChangeCaptionLanguageIcon',\n styles: { root: { lineHeight: 0 } }\n },\n disabled: props.disableButtonsForHoldScreen || !captionSettingsProp.isCaptionsFeatureActive,\n onItemClick: () => {\n setIsCaptionLanguageDrawerOpen(true);\n },\n secondaryIconProps: {\n iconName: 'ChevronRight',\n styles: { root: { lineHeight: 0 } }\n }\n });\n }\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n const customDrawerButtons = useMemo(\n () =>\n generateCustomCallDrawerButtons(\n onFetchCustomButtonPropsTrampoline(drawerSelectionOptions !== false ? drawerSelectionOptions : undefined),\n drawerSelectionOptions !== false ? drawerSelectionOptions?.displayType : undefined\n ),\n [drawerSelectionOptions]\n );\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n customDrawerButtons['primary'].slice(CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS).forEach((element) => {\n drawerMenuItems.push(element);\n });\n /* @conditional-compile-remove(control-bar-button-injection) */\n customDrawerButtons['secondary'].forEach((element) => {\n drawerMenuItems.push(element);\n });\n /* @conditional-compile-remove(control-bar-button-injection) */\n customDrawerButtons['overflow'].forEach((element) => {\n drawerMenuItems.push(element);\n });\n /* @conditional-compile-remove(close-captions) */\n return (\n <>\n {isSpokenLanguageDrawerOpen && props.isCaptionsSupported && (\n <CaptionSettingsDrawer\n onLightDismiss={props.onLightDismiss}\n selectLanguage={setCurrentSpokenLanguage}\n setCurrentLanguage={captionSettingsHandlers.onSetSpokenLanguage}\n currentLanguage={currentSpokenLanguage}\n strings={{ menuTitle: props.strings.spokenLanguageMenuTitle }}\n supportedLanguageStrings={supportedSpokenLanguageStrings}\n />\n )}\n {isCaptionLanguageDrawerOpen && props.isCaptionsSupported && (\n <CaptionSettingsDrawer\n onLightDismiss={props.onLightDismiss}\n selectLanguage={setCurrentCaptionLanguage}\n setCurrentLanguage={captionSettingsHandlers.onSetCaptionLanguage}\n currentLanguage={currentCaptionLanguage}\n strings={{ menuTitle: props.strings.captionLanguageMenuTitle }}\n supportedLanguageStrings={supportedCaptionLanguageStrings}\n />\n )}\n {!isSpokenLanguageDrawerOpen && !isCaptionLanguageDrawerOpen && (\n <DrawerMenu items={drawerMenuItems} onLightDismiss={props.onLightDismiss} />\n )}\n </>\n );\n\n return <DrawerMenu items={drawerMenuItems} onLightDismiss={props.onLightDismiss} />;\n};\n\nconst isDeviceSelected = (speaker: OptionsDevice, selectedSpeaker?: OptionsDevice): boolean =>\n !!selectedSpeaker && speaker.id === selectedSpeaker.id;\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n"]}
|
1
|
+
{"version":3,"file":"MoreDrawer.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/Drawer/MoreDrawer.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,iDAAiD;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,+DAA+D;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAEL,WAAW,IAAI,UAAU,EAK1B,4CAAmC;AAGpC,iDAAiD;AACjD,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,4CAAmC;AAE1F,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,UAAU,EAAE,4CAAmC;AACxD,6CAA6C;AAC7C,OAAO,EAAE,eAAe,EAAwB,4CAAm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AE,sBAAsB,EACvC,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,wBAAwB,EAAE,EAC9D,wBAAwB,EAAE,+BAA+B,GACzD,CACH;QACA,CAAC,0BAA0B,IAAI,CAAC,2BAA2B,IAAI,CAC9D,oBAAC,UAAU,IAAC,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc,GAAI,CAC7E,CACA,CACJ,CAAC;IAEF,OAAO,oBAAC,UAAU,IAAC,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc,GAAI,CAAC;AACtF,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,OAAsB,EAAE,eAA+B,EAAW,EAAE,CAC5F,CAAC,CAAC,eAAe,IAAI,OAAO,CAAC,EAAE,KAAK,eAAe,CAAC,EAAE,CAAC;AAEzD,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback } from 'react';\n/* @conditional-compile-remove(close-captions) */\nimport { useState } from 'react';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { useMemo } from 'react';\nimport {\n OptionsDevice,\n _DrawerMenu as DrawerMenu,\n _DrawerMenuItemProps as DrawerMenuItemProps,\n _DrawerMenuStyles,\n SpokenLanguageStrings,\n CaptionLanguageStrings\n} from '@internal/react-components';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { VideoGalleryLayout } from '@internal/react-components';\n/* @conditional-compile-remove(close-captions) */\nimport { _StartCaptionsButton, _CaptionsSettingsModal } from '@internal/react-components';\n\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHandButton, RaiseHandButtonProps } from '@internal/react-components';\nimport { AudioDeviceInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport {\n CUSTOM_BUTTON_OPTIONS,\n generateCustomCallDrawerButtons,\n onFetchCustomButtonPropsTrampoline\n} from '../ControlBar/CustomButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(raise-hand) */\nimport { usePropsFor } from '../../CallComposite/hooks/usePropsFor';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { useLocale } from '../../localization';\nimport { isDisabled } from '../../CallComposite/utils';\nimport { CommonCallControlOptions } from '../types/CommonCallControlOptions';\n/* @conditional-compile-remove(close-captions) */\nimport { Stack, Toggle, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(close-captions) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(close-captions) */\nimport { useAdaptedSelector } from '../../CallComposite/hooks/useAdaptedSelector';\n/* @conditional-compile-remove(close-captions) */\nimport { _captionSettingsSelector, _startCaptionsButtonSelector } from '@internal/calling-component-bindings';\n/* @conditional-compile-remove(close-captions) */\nimport { useHandlers } from '../../CallComposite/hooks/useHandlers';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionLanguageSettingsDrawer } from './CaptionLanguageSettingsDrawer';\n/* @conditional-compile-remove(close-captions) */\nimport { themedToggleButtonStyle } from './MoreDrawer.styles';\n/* @conditional-compile-remove(close-captions) */\nimport { _spokenLanguageToCaptionLanguage } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { useAdapter } from '../../CallComposite/adapter/CallAdapterProvider';\n/* @conditional-compile-remove(dtmf-dialer) */\nimport { useSelector } from '../../CallComposite/hooks/useSelector';\n/* @conditional-compile-remove(dtmf-dialer) */\nimport { getTargetCallees } from '../../CallComposite/selectors/baseSelectors';\n/* @conditional-compile-remove(dtmf-dialer) */\nimport { showDtmfDialer } from '../../CallComposite/utils/MediaGalleryUtils';\nimport { SpokenLanguageSettingsDrawer } from './SpokenLanguageSettingsDrawer';\n\n/** @private */\nexport interface MoreDrawerStrings {\n /**\n * Label for people drawerMenuItem.\n */\n peopleButtonLabel: string;\n /**\n * Label for audio device drawerMenuItem.\n *\n * @remarks This replaces the microphoneMenuTitle speakers can not be enumerated\n *\n */\n audioDeviceMenuTitle?: string;\n /**\n * Label for microphone drawerMenuItem.\n *\n * @remarks Only displayed when speakers can be enumerated otherwise audioDeviceMenuTitle is used\n *\n */\n microphoneMenuTitle: string;\n /**\n * Label for speaker drawerMenuItem.\n *\n * @remarks Only displayed when speakers can be enumerated\n *\n */\n speakerMenuTitle: string;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Label for captions drawerMenuItem\n *\n * @remarks Only displayed when in Teams call\n */\n captionsMenuTitle: string;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Label for spokenLanguage drawerMenuItem\n *\n * @remarks Only displayed when in Teams call, disabled until captions is on\n */\n spokenLanguageMenuTitle: string;\n\n /* @conditional-compile-remove(close-captions) */\n /**\n * Label for captionLanguage drawerMenuItem\n *\n * @remarks Only displayed when in Teams call, disabled until captions is on\n */\n captionLanguageMenuTitle: string;\n\n /* @conditional-compile-remove(gallery-layouts) */\n /**\n * Label for gallery options drawerMenuItem\n */\n galleryOptionsMenuTitle: string;\n}\n\n/** @private */\nexport interface MoreDrawerDevicesMenuProps {\n /**\n * Available microphones for selection\n */\n microphones?: OptionsDevice[];\n /**\n * Available speakers for selection\n */\n speakers?: OptionsDevice[];\n /**\n * Microphone that is shown as currently selected\n */\n selectedMicrophone?: OptionsDevice;\n /**\n * Speaker that is shown as currently selected\n */\n selectedSpeaker?: OptionsDevice;\n /**\n * Speaker when a speaker is selected\n */\n onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;\n /**\n * Callback when a microphone is selected\n */\n onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout?: VideoGalleryLayout;\n /* @conditional-compile-remove(gallery-layouts) */\n /**\n * Callback for when the gallery layout is changed\n */\n onUserSetGalleryLayout?: (layout: VideoGalleryLayout) => void;\n /* @conditional-compile-remove(dtmf-dialer) */\n /**\n * Callback to hide and show the dialpad in the more drawer\n */\n onSetDialpadPage?: () => void;\n /* @conditional-compile-remove(dtmf-dialer) */\n /**\n * Whether the dialpad is present in the call\n */\n dtmfDialerPresent?: boolean;\n}\n\n/** @private */\nexport interface MoreDrawerProps extends MoreDrawerDevicesMenuProps {\n onLightDismiss: () => void;\n onPeopleButtonClicked: () => void;\n callControls?: boolean | CommonCallControlOptions;\n onClickShowDialpad?: () => void;\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported?: boolean;\n strings: MoreDrawerStrings;\n disableButtonsForHoldScreen?: boolean;\n}\n\nconst inferCallWithChatControlOptions = (\n callWithChatControls?: boolean | CommonCallControlOptions\n): CommonCallControlOptions | false => {\n if (callWithChatControls === false) {\n return false;\n }\n const options = callWithChatControls === true || callWithChatControls === undefined ? {} : callWithChatControls;\n return options;\n};\n\n/** @private */\nexport const MoreDrawer = (props: MoreDrawerProps): JSX.Element => {\n /* @conditional-compile-remove(close-captions) */\n const theme = useTheme();\n /* @conditional-compile-remove(rooms) */\n const callAdapter = useAdapter();\n const drawerMenuItems: DrawerMenuItemProps[] = [];\n\n const { speakers, onSelectSpeaker, onLightDismiss } = props;\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n const localeStrings = useLocale();\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const holdButtonProps = usePropsFor(HoldButton);\n\n /* @conditional-compile-remove(dtmf-dialer) */\n const callees = useSelector(getTargetCallees);\n /* @conditional-compile-remove(dtmf-dialer) */\n const allowDtmfDialer = showDtmfDialer(callees);\n /* @conditional-compile-remove(dtmf-dialer) */\n const [dtmfDialerChecked, setDtmfDialerChecked] = useState<boolean>(props.dtmfDialerPresent ?? false);\n\n /* @conditional-compile-remove(raise-hand) */\n const raiseHandButtonProps = usePropsFor(RaiseHandButton) as RaiseHandButtonProps;\n\n const onSpeakerItemClick = useCallback(\n (\n _ev: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement> | undefined,\n itemKey: string | undefined\n ) => {\n const selected = speakers?.find((speaker) => speaker.id === itemKey);\n if (selected) {\n // This is unsafe - we're only passing in part of the argument to the handler.\n // But this is a known issue in our state.\n onSelectSpeaker(selected as AudioDeviceInfo);\n }\n onLightDismiss();\n },\n [speakers, onSelectSpeaker, onLightDismiss]\n );\n\n const drawerSelectionOptions = inferCallWithChatControlOptions(props.callControls);\n\n if (props.speakers && props.speakers.length > 0) {\n drawerMenuItems.push({\n itemKey: 'speakers',\n disabled: props.disableButtonsForHoldScreen,\n text: props.strings.speakerMenuTitle,\n iconProps: { iconName: 'MoreDrawerSpeakers' },\n subMenuProps: props.speakers.map((speaker) => ({\n itemKey: speaker.id,\n iconProps: {\n iconName: isDeviceSelected(speaker, props.selectedSpeaker)\n ? 'MoreDrawerSelectedSpeaker'\n : 'MoreDrawerSpeakers'\n },\n text: speaker.name,\n onItemClick: onSpeakerItemClick,\n secondaryIconProps: isDeviceSelected(speaker, props.selectedSpeaker) ? { iconName: 'Accept' } : undefined\n })),\n secondaryText: props.selectedSpeaker?.name\n });\n }\n\n const { microphones, onSelectMicrophone } = props;\n const onMicrophoneItemClick = useCallback(\n (\n _ev: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement> | undefined,\n itemKey: string | undefined\n ) => {\n const selected = microphones?.find((mic) => mic.id === itemKey);\n if (selected) {\n // This is unsafe - we're only passing in part of the argument to the handler.\n // But this is a known issue in our state.\n onSelectMicrophone(selected as AudioDeviceInfo);\n }\n onLightDismiss();\n },\n [microphones, onSelectMicrophone, onLightDismiss]\n );\n\n if (props.microphones && props.microphones.length > 0) {\n // Set props as Microphone if speakers can be enumerated else set as Audio Device\n const speakersAvailable = props.speakers && props.speakers.length > 0;\n const itemKey = speakersAvailable ? 'microphones' : 'audioDevices';\n const text = speakersAvailable ? props.strings.microphoneMenuTitle : props.strings.audioDeviceMenuTitle;\n const iconName = speakersAvailable ? 'MoreDrawerMicrophones' : 'MoreDrawerSpeakers';\n const selectedIconName = speakersAvailable ? 'MoreDrawerSelectedMicrophone' : 'MoreDrawerSelectedSpeaker';\n\n drawerMenuItems.push({\n itemKey: itemKey,\n disabled: props.disableButtonsForHoldScreen,\n text: text,\n iconProps: { iconName: iconName },\n subMenuProps: props.microphones.map((mic) => ({\n itemKey: mic.id,\n iconProps: {\n iconName: isDeviceSelected(mic, props.selectedMicrophone) ? selectedIconName : iconName\n },\n text: mic.name,\n onItemClick: onMicrophoneItemClick,\n secondaryIconProps: isDeviceSelected(mic, props.selectedMicrophone) ? { iconName: 'Accept' } : undefined,\n disabled: drawerSelectionOptions !== false ? isDisabled(drawerSelectionOptions.microphoneButton) : undefined\n })),\n secondaryText: props.selectedMicrophone?.name\n });\n }\n\n /* @conditional-compile-remove(dtmf-dialer) */\n const dtmfDialerScreenOption = {\n itemKey: 'dtmfDialerScreenKey',\n text: !dtmfDialerChecked\n ? localeStrings.strings.call.dtmfDialerMoreButtonLabelOn\n : localeStrings.strings.call.dtmfDialerMoreButtonLabelOff,\n onItemClick: () => {\n if (props.onSetDialpadPage) {\n props.onSetDialpadPage();\n }\n setDtmfDialerChecked(!dtmfDialerChecked);\n onLightDismiss();\n },\n iconProps: {\n iconName: 'DtmfDialpadButton',\n styles: { root: { lineHeight: 0 } }\n }\n };\n /* @conditional-compile-remove(dtmf-dialer) */\n /**\n * Only render the dtmf dialer if the dialpad for PSTN calls is not present\n */\n if (props.onSetDialpadPage && allowDtmfDialer) {\n drawerMenuItems.push(dtmfDialerScreenOption);\n }\n /* @conditional-compile-remove(gallery-layouts) */\n const galleryLayoutOptions = {\n itemKey: 'galleryPositionKey',\n iconProps: {\n iconName: 'GalleryOptions',\n styles: { root: { lineHeight: 0 } }\n },\n disabled: props.disableButtonsForHoldScreen,\n text: localeStrings.strings.call.moreButtonGalleryControlLabel,\n subMenuProps: [\n {\n itemKey: 'dynamicSelectionKey',\n text: localeStrings.strings.call.moreButtonGalleryFloatingLocalLayoutLabel,\n onItemClick: () => {\n props.onUserSetGalleryLayout && props.onUserSetGalleryLayout('floatingLocalVideo');\n onLightDismiss();\n },\n iconProps: {\n iconName: 'FloatingLocalVideoGalleryLayout',\n styles: { root: { lineHeight: 0 } }\n },\n secondaryIconProps: props.userSetGalleryLayout === 'floatingLocalVideo' ? { iconName: 'Accept' } : undefined\n },\n {\n itemKey: 'focusedContentSelectionKey',\n text: localeStrings.strings.call.moreButtonGalleryFocusedContentLayoutLabel,\n onItemClick: () => {\n props.onUserSetGalleryLayout && props.onUserSetGalleryLayout('focusedContent');\n onLightDismiss();\n },\n iconProps: {\n iconName: 'FocusedContentGalleryLayout',\n styles: { root: { lineHeight: 0 } }\n },\n secondaryIconProps: props.userSetGalleryLayout === 'focusedContent' ? { iconName: 'Accept' } : undefined\n }\n ]\n };\n\n /* @conditional-compile-remove(gallery-layout-composite) */\n const galleryOption = {\n itemKey: 'defaultSelectionKey',\n text: localeStrings.strings.call.moreButtonGalleryDefaultLayoutLabel,\n onItemClick: () => {\n props.onUserSetGalleryLayout && props.onUserSetGalleryLayout('default');\n onLightDismiss();\n },\n iconProps: {\n iconName: 'DefaultGalleryLayout',\n styles: { root: { lineHeight: 0 } }\n },\n secondaryIconProps: props.userSetGalleryLayout === 'default' ? { iconName: 'Accept' } : undefined\n };\n\n /* @conditional-compile-remove(gallery-layout-composite) */\n galleryLayoutOptions.subMenuProps?.push(galleryOption);\n\n /* @conditional-compile-remove(gallery-layouts) */\n drawerMenuItems.push(galleryLayoutOptions);\n\n if (drawerSelectionOptions !== false && isEnabled(drawerSelectionOptions?.peopleButton)) {\n drawerMenuItems.push({\n itemKey: 'people',\n id: 'call-composite-drawer-people-button',\n text: props.strings.peopleButtonLabel,\n iconProps: { iconName: 'MoreDrawerPeople' },\n onItemClick: props.onPeopleButtonClicked,\n disabled: isDisabled(drawerSelectionOptions.peopleButton) || props.disableButtonsForHoldScreen\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n if (drawerSelectionOptions !== false && isEnabled(drawerSelectionOptions?.holdButton)) {\n drawerMenuItems.push({\n itemKey: 'holdButtonKey',\n disabled: props.disableButtonsForHoldScreen || isDisabled(drawerSelectionOptions.holdButton),\n text: localeStrings.component.strings.holdButton.tooltipOffContent,\n onItemClick: () => {\n holdButtonProps.onToggleHold();\n onLightDismiss();\n },\n iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } }\n });\n }\n\n /*@conditional-compile-remove(rooms) */\n const role = callAdapter.getState().call?.role;\n /*@conditional-compile-remove(rooms) */\n const hideRaiseHandButtonInRoomsCall =\n callAdapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);\n\n /* @conditional-compile-remove(raise-hand) */\n if (\n drawerSelectionOptions !== false &&\n isEnabled(drawerSelectionOptions?.raiseHandButton) &&\n /*@conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall\n ) {\n const raiseHandIcon = raiseHandButtonProps.checked ? 'LowerHandContextualMenuItem' : 'RaiseHandContextualMenuItem';\n drawerMenuItems.push({\n itemKey: 'raiseHandButtonKey',\n disabled: props.disableButtonsForHoldScreen || isDisabled(drawerSelectionOptions.raiseHandButton),\n text: raiseHandButtonProps.checked\n ? localeStrings.component.strings.raiseHandButton.onLabel\n : localeStrings.component.strings.raiseHandButton.offLabel,\n onItemClick: () => {\n if (raiseHandButtonProps.onToggleRaiseHand) {\n raiseHandButtonProps.onToggleRaiseHand();\n }\n onLightDismiss();\n },\n iconProps: {\n iconName: raiseHandIcon,\n styles: { root: { lineHeight: 0 } }\n }\n });\n }\n\n /* @conditional-compile-remove(close-captions) */\n //Captions drawer menu\n const supportedSpokenLanguageStrings = useLocale().strings.call.spokenLanguageStrings;\n\n /* @conditional-compile-remove(close-captions) */\n //Captions drawer menu\n const supportedCaptionLanguageStrings = useLocale().strings.call.captionLanguageStrings;\n /* @conditional-compile-remove(close-captions) */\n const captionSettingsProp = useAdaptedSelector(_captionSettingsSelector);\n /* @conditional-compile-remove(close-captions) */\n const startCaptionsButtonHandlers = useHandlers(_StartCaptionsButton);\n /* @conditional-compile-remove(close-captions) */\n const captionSettingsHandlers = useHandlers(_CaptionsSettingsModal);\n\n /* @conditional-compile-remove(close-captions) */\n const [isSpokenLanguageDrawerOpen, setIsSpokenLanguageDrawerOpen] = useState<boolean>(false);\n\n /* @conditional-compile-remove(close-captions) */\n const [isCaptionLanguageDrawerOpen, setIsCaptionLanguageDrawerOpen] = useState<boolean>(false);\n\n /* @conditional-compile-remove(close-captions) */\n const [currentSpokenLanguage, setCurrentSpokenLanguage] = useState<keyof SpokenLanguageStrings>(\n captionSettingsProp.currentSpokenLanguage ?? 'en-us'\n );\n\n /* @conditional-compile-remove(close-captions) */\n const [currentCaptionLanguage, setCurrentCaptionLanguage] = useState<keyof CaptionLanguageStrings>(\n captionSettingsProp.currentCaptionLanguage ?? _spokenLanguageToCaptionLanguage[currentSpokenLanguage]\n );\n\n /* @conditional-compile-remove(close-captions) */\n const onToggleChange = useCallback(async () => {\n if (!captionSettingsProp.isCaptionsFeatureActive) {\n await startCaptionsButtonHandlers.onStartCaptions({\n spokenLanguage: currentSpokenLanguage\n });\n } else {\n startCaptionsButtonHandlers.onStopCaptions();\n }\n }, [captionSettingsProp.isCaptionsFeatureActive, startCaptionsButtonHandlers, currentSpokenLanguage]);\n\n /* @conditional-compile-remove(close-captions) */\n if (props.isCaptionsSupported) {\n const captionsDrawerItems: DrawerMenuItemProps[] = [];\n\n const spokenLanguageString = supportedSpokenLanguageStrings\n ? supportedSpokenLanguageStrings[currentSpokenLanguage]\n : currentSpokenLanguage;\n const captionLanguageString = supportedCaptionLanguageStrings\n ? supportedCaptionLanguageStrings[currentCaptionLanguage]\n : currentCaptionLanguage;\n\n drawerMenuItems.push({\n itemKey: 'captions',\n id: 'common-call-composite-captions-button',\n disabled: props.disableButtonsForHoldScreen,\n text: props.strings.captionsMenuTitle,\n iconProps: { iconName: 'CaptionsIcon' },\n subMenuProps: captionsDrawerItems\n });\n\n captionsDrawerItems.push({\n itemKey: 'ToggleCaptionsKey',\n text: captionSettingsProp.isCaptionsFeatureActive\n ? localeStrings.strings.call.startCaptionsButtonTooltipOnContent\n : localeStrings.strings.call.startCaptionsButtonTooltipOffContent,\n iconProps: {\n iconName: captionSettingsProp.isCaptionsFeatureActive ? 'CaptionsOffIcon' : 'CaptionsIcon',\n styles: { root: { lineHeight: 0 } }\n },\n onItemClick: onToggleChange,\n disabled: props.disableButtonsForHoldScreen,\n secondaryComponent: (\n <Stack verticalFill verticalAlign=\"center\">\n <Toggle\n id=\"common-call-composite-captions-toggle-button\"\n checked={captionSettingsProp.isCaptionsFeatureActive}\n styles={themedToggleButtonStyle(theme, captionSettingsProp.isCaptionsFeatureActive)}\n onChange={onToggleChange}\n />\n </Stack>\n )\n });\n\n captionsDrawerItems.push({\n itemKey: 'ChangeSpokenLanguage',\n text: props.strings.spokenLanguageMenuTitle,\n id: 'common-call-composite-captions-spoken-settings-button',\n secondaryText: spokenLanguageString,\n iconProps: {\n iconName: 'ChangeSpokenLanguageIcon',\n styles: { root: { lineHeight: 0 } }\n },\n disabled: props.disableButtonsForHoldScreen || !captionSettingsProp.isCaptionsFeatureActive,\n onItemClick: () => {\n setIsSpokenLanguageDrawerOpen(true);\n },\n secondaryIconProps: {\n iconName: 'ChevronRight',\n styles: { root: { lineHeight: 0 } }\n }\n });\n\n captionsDrawerItems.push({\n itemKey: 'ChangeCaptionLanguage',\n text: props.strings.captionLanguageMenuTitle,\n id: 'common-call-composite-captions-subtitle-settings-button',\n secondaryText: captionLanguageString,\n iconProps: {\n iconName: 'ChangeCaptionLanguageIcon',\n styles: { root: { lineHeight: 0 } }\n },\n disabled: props.disableButtonsForHoldScreen || !captionSettingsProp.isCaptionsFeatureActive,\n onItemClick: () => {\n setIsCaptionLanguageDrawerOpen(true);\n },\n secondaryIconProps: {\n iconName: 'ChevronRight',\n styles: { root: { lineHeight: 0 } }\n }\n });\n }\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n const customDrawerButtons = useMemo(\n () =>\n generateCustomCallDrawerButtons(\n onFetchCustomButtonPropsTrampoline(drawerSelectionOptions !== false ? drawerSelectionOptions : undefined),\n drawerSelectionOptions !== false ? drawerSelectionOptions?.displayType : undefined\n ),\n [drawerSelectionOptions]\n );\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n customDrawerButtons['primary'].slice(CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS).forEach((element) => {\n drawerMenuItems.push(element);\n });\n /* @conditional-compile-remove(control-bar-button-injection) */\n customDrawerButtons['secondary'].forEach((element) => {\n drawerMenuItems.push(element);\n });\n /* @conditional-compile-remove(control-bar-button-injection) */\n customDrawerButtons['overflow'].forEach((element) => {\n drawerMenuItems.push(element);\n });\n /* @conditional-compile-remove(close-captions) */\n return (\n <>\n {isSpokenLanguageDrawerOpen && props.isCaptionsSupported && (\n <SpokenLanguageSettingsDrawer\n onLightDismiss={props.onLightDismiss}\n selectLanguage={setCurrentSpokenLanguage}\n setCurrentLanguage={captionSettingsHandlers.onSetSpokenLanguage}\n currentLanguage={currentSpokenLanguage}\n strings={{ menuTitle: props.strings.spokenLanguageMenuTitle }}\n supportedLanguageStrings={supportedSpokenLanguageStrings}\n />\n )}\n {isCaptionLanguageDrawerOpen && props.isCaptionsSupported && (\n <CaptionLanguageSettingsDrawer\n onLightDismiss={props.onLightDismiss}\n selectLanguage={setCurrentCaptionLanguage}\n setCurrentLanguage={captionSettingsHandlers.onSetCaptionLanguage}\n currentLanguage={currentCaptionLanguage}\n strings={{ menuTitle: props.strings.captionLanguageMenuTitle }}\n supportedLanguageStrings={supportedCaptionLanguageStrings}\n />\n )}\n {!isSpokenLanguageDrawerOpen && !isCaptionLanguageDrawerOpen && (\n <DrawerMenu items={drawerMenuItems} onLightDismiss={props.onLightDismiss} />\n )}\n </>\n );\n\n return <DrawerMenu items={drawerMenuItems} onLightDismiss={props.onLightDismiss} />;\n};\n\nconst isDeviceSelected = (speaker: OptionsDevice, selectedSpeaker?: OptionsDevice): boolean =>\n !!selectedSpeaker && speaker.id === selectedSpeaker.id;\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n"]}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { SpokenLanguageStrings } from "../../../../../react-components/src";
|
3
|
+
/** @private */
|
4
|
+
export interface CaptionSettingsDrawerStrings {
|
5
|
+
/**
|
6
|
+
* Label for spoken language/caption language drawerMenuItem
|
7
|
+
*
|
8
|
+
* @remarks Only displayed when in Teams call, disabled until captions is on
|
9
|
+
*/
|
10
|
+
menuTitle: string;
|
11
|
+
}
|
12
|
+
/** @private */
|
13
|
+
export declare const SpokenLanguageSettingsDrawer: (props: {
|
14
|
+
selectLanguage: (language: keyof SpokenLanguageStrings) => void;
|
15
|
+
setCurrentLanguage: (language: keyof SpokenLanguageStrings) => void;
|
16
|
+
currentLanguage: keyof SpokenLanguageStrings;
|
17
|
+
onLightDismiss: () => void;
|
18
|
+
strings?: CaptionSettingsDrawerStrings | undefined;
|
19
|
+
supportedLanguageStrings?: SpokenLanguageStrings | undefined;
|
20
|
+
}) => JSX.Element;
|
21
|
+
//# sourceMappingURL=SpokenLanguageSettingsDrawer.d.ts.map
|
@@ -9,8 +9,9 @@ import { useTheme } from "../../../../../react-components/src";
|
|
9
9
|
import { _DrawerMenu as DrawerMenu } from "../../../../../react-components/src";
|
10
10
|
/* @conditional-compile-remove(close-captions) */
|
11
11
|
import { captionSettingsDrawerStyles } from './captionSettingsDrawer.styles';
|
12
|
+
import { _getKeys } from "../../../../../acs-ui-common/src";
|
12
13
|
/** @private */
|
13
|
-
export const
|
14
|
+
export const SpokenLanguageSettingsDrawer = (props) => {
|
14
15
|
var _a;
|
15
16
|
/* @conditional-compile-remove(close-captions) */
|
16
17
|
const theme = useTheme();
|
@@ -21,7 +22,7 @@ export const CaptionSettingsDrawer = (props) => {
|
|
21
22
|
/* @conditional-compile-remove(close-captions) */
|
22
23
|
const drawerItems = useMemo(() => {
|
23
24
|
var _a;
|
24
|
-
return
|
25
|
+
return _getKeys((_a = props.supportedLanguageStrings) !== null && _a !== void 0 ? _a : []).map((languageCode) => ({
|
25
26
|
itemKey: languageCode,
|
26
27
|
text: props.supportedLanguageStrings ? props.supportedLanguageStrings[languageCode] : languageCode,
|
27
28
|
onItemClick: () => onDrawerItemClick(languageCode),
|
@@ -39,4 +40,4 @@ export const CaptionSettingsDrawer = (props) => {
|
|
39
40
|
}, styles: captionSettingsDrawerStyles(theme) }));
|
40
41
|
return React.createElement(React.Fragment, null);
|
41
42
|
};
|
42
|
-
//# sourceMappingURL=
|
43
|
+
//# sourceMappingURL=SpokenLanguageSettingsDrawer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SpokenLanguageSettingsDrawer.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC7C,iDAAiD;AACjD,OAAO,EAAiD,QAAQ,EAAE,4CAAmC;AACrG,iDAAiD;AACjD,OAAO,EACL,WAAW,IAAI,UAAU,EAG1B,4CAAmC;AACpC,iDAAiD;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAYnD,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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7E,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,iDAAiD;IACjD,OAAO,CACL,oBAAC,UAAU,IACT,OAAO,EAAE,MAAA,KAAK,CAAC,OAAO,0CAAE,SAAS,EACjC,KAAK,EAAE,iBAAiB,aAAjB,iBAAiB,cAAjB,iBAAiB,GAAI,EAAE,EAC9B,cAAc,EAAE,GAAG,EAAE;YACnB,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAChD,KAAK,CAAC,cAAc,EAAE,CAAC;QACzB,CAAC,EACD,MAAM,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAC1C,CACH,CAAC;IACF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(close-captions) */\nimport { useMemo, useCallback } from 'react';\n/* @conditional-compile-remove(close-captions) */\nimport { _CaptionsSettingsModal, SpokenLanguageStrings, useTheme } from '@internal/react-components';\n/* @conditional-compile-remove(close-captions) */\nimport {\n _DrawerMenu as DrawerMenu,\n _DrawerMenuItemProps as DrawerMenuItemProps,\n _DrawerMenuStyles\n} from '@internal/react-components';\n/* @conditional-compile-remove(close-captions) */\nimport { captionSettingsDrawerStyles } from './captionSettingsDrawer.styles';\nimport { _getKeys } from '@internal/acs-ui-common';\n\n/** @private */\nexport interface CaptionSettingsDrawerStrings {\n /**\n * Label for spoken language/caption language drawerMenuItem\n *\n * @remarks Only displayed when in Teams call, disabled until captions is on\n */\n menuTitle: string;\n}\n\n/** @private */\nexport const SpokenLanguageSettingsDrawer = (props: {\n /* @conditional-compile-remove(close-captions) */ selectLanguage: (language: keyof SpokenLanguageStrings) => void;\n /* @conditional-compile-remove(close-captions) */ setCurrentLanguage: (language: keyof SpokenLanguageStrings) => void;\n /* @conditional-compile-remove(close-captions) */ currentLanguage: keyof SpokenLanguageStrings;\n /* @conditional-compile-remove(close-captions) */ onLightDismiss: () => void;\n /* @conditional-compile-remove(close-captions) */ strings?: CaptionSettingsDrawerStrings;\n /* @conditional-compile-remove(close-captions) */ supportedLanguageStrings?: SpokenLanguageStrings;\n}): JSX.Element => {\n /* @conditional-compile-remove(close-captions) */\n const theme = useTheme();\n\n /* @conditional-compile-remove(close-captions) */\n const onDrawerItemClick = useCallback(\n (languageCode: keyof SpokenLanguageStrings) => {\n props.selectLanguage(languageCode);\n },\n [props]\n );\n\n /* @conditional-compile-remove(close-captions) */\n const drawerItems: DrawerMenuItemProps[] = useMemo(() => {\n return _getKeys(props.supportedLanguageStrings ?? []).map((languageCode) => ({\n itemKey: languageCode,\n text: props.supportedLanguageStrings ? props.supportedLanguageStrings[languageCode] : languageCode,\n onItemClick: () => onDrawerItemClick(languageCode),\n secondaryIconProps: props.currentLanguage === languageCode ? { iconName: 'Accept' } : undefined\n }));\n }, [props.currentLanguage, props.supportedLanguageStrings, onDrawerItemClick]);\n\n const sortedDrawerItems: DrawerMenuItemProps[] = useMemo(() => {\n const copy = [...drawerItems];\n return copy.sort((a, b) => (a.text && b.text && a.text > b.text ? 1 : -1));\n }, [drawerItems]);\n\n /* @conditional-compile-remove(close-captions) */\n return (\n <DrawerMenu\n heading={props.strings?.menuTitle}\n items={sortedDrawerItems ?? []}\n onLightDismiss={() => {\n props.setCurrentLanguage(props.currentLanguage);\n props.onLightDismiss();\n }}\n styles={captionSettingsDrawerStyles(theme)}\n />\n );\n return <></>;\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ModalLocalAndRemotePIP.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/ModalLocalAndRemotePIP.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAgB,KAAK,EAAE,MAAM,iBAAiB,CA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QAAQ,CAAyB,IAAI,CAAC,CAAC;IAEzF,MAAM,UAAU,GAAG,WAAW,CAC5B,CAAC,
|
1
|
+
{"version":3,"file":"ModalLocalAndRemotePIP.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/ModalLocalAndRemotePIP.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAgB,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,EAAE,WAAW,EAAiB,yCAAmC;AACxE,wCAAwC;AACxC,OAAO,EAAE,gBAAgB,EAAE,yCAAmC;AAC9D,OAAO,EACL,WAAW,EAEX,UAAU,EACV,iBAAiB,EAClB,MAAM,wCAAwC,CAAC;AAChD,wCAAwC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;GAEG;AACH,MAAM,YAAY,GAAiB;IACjC,gBAAgB,EAAE,MAAM;IACxB,iBAAiB,EAAE,OAAO;IAC1B,IAAI,EAAE,cAAc;IACpB,YAAY,EAAE,IAAI;CACnB,CAAC;AAYF;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAQtC,EAAsB,EAAE;;IACvB,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAElE,wCAAwC;IACx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AiB,GAAG,eAAe,CAAC,UAAU,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,KAAK,CAAC,CAAC;IAE3E,OAAO,CACL,oBAAC,KAAK,IAAC,MAAM,EAAE,UAAU;QACvB,oBAAC,KAAK,IAAC,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU;YACvD,oBAAC,WAAW,IACV,MAAM,EAAE,IAAI,EACZ,UAAU,EAAE,IAAI,EAChB,WAAW,EAAE,YAAY,EACzB,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,gBAAgB,EAAE,EAC9C,eAAe,EAAE,KAAK,CAAC,eAAe,EACtC,eAAe,EAAE,KAAK,CAAC,eAAe;YAGpC,qGAAqG;YACrG,6DAA6D;YAC7D,CAAC,KAAK,CAAC,MAAM,IAAI,iBAAiB,CAExB,CACR,CACF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { concatStyleSets, ContextualMenu, IDragOptions, Stack } from '@fluentui/react';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { LocalAndRemotePIP } from '../CallComposite/components/LocalAndRemotePIP';\nimport { useHandlers } from '../CallComposite/hooks/useHandlers';\nimport { useSelector } from '../CallComposite/hooks/useSelector';\nimport { localAndRemotePIPSelector } from '../CallComposite/selectors/localAndRemotePIPSelector';\nimport { _ModalClone, _ICoordinates } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _RemoteVideoTile } from '@internal/react-components';\nimport {\n hiddenStyle,\n ModalLocalAndRemotePIPStyles,\n modalStyle,\n PIPContainerStyle\n} from './styles/ModalLocalAndRemotePIP.styles';\n/* @conditional-compile-remove(rooms) */\nimport { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';\nimport { useLocale } from '../localization';\n\n/**\n * Drag options for Modal in {@link ModalLocalAndRemotePIP} component\n */\nconst DRAG_OPTIONS: IDragOptions = {\n moveMenuItemText: 'Move',\n closeMenuItemText: 'Close',\n menu: ContextualMenu,\n keepInBounds: true\n};\n\n/**\n * @private\n */\nexport interface ModalLocalAndRemotePIPStrings {\n /**\n * Aria label for dismiss control when using keyboard\n */\n dismissModalAriaLabel?: string;\n}\n\n/**\n * A wrapping component with a draggable {@link LocalAndRemotePIP} component that is bound to a LayerHost component with id\n * specified by `modalLayerHostId` prop\n * @private\n */\nexport const ModalLocalAndRemotePIP = (props: {\n hidden: boolean;\n modalLayerHostId: string;\n styles?: ModalLocalAndRemotePIPStyles;\n minDragPosition?: _ICoordinates;\n maxDragPosition?: _ICoordinates;\n onDismissSidePane?: () => void;\n strings?: ModalLocalAndRemotePIPStrings;\n}): JSX.Element | null => {\n const rootStyles = props.hidden ? hiddenStyle : PIPContainerStyle;\n\n /* @conditional-compile-remove(rooms) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(rooms) */\n const role = adapter.getState().call?.role;\n\n const locale = useLocale();\n\n const pictureInPictureProps = useSelector(localAndRemotePIPSelector);\n\n const [touchStartTouches, setTouchStartTouches] = useState<React.TouchList | null>(null);\n\n const onTouchEnd = useCallback(\n (event: React.TouchEvent) => {\n if (touchStartTouches && touchStartTouches.length === 1 && event.changedTouches.length === 1) {\n const touchStartTouch = touchStartTouches[0];\n const touchEndTouch = event.changedTouches[0];\n if (\n Math.abs(touchStartTouch.clientX - touchEndTouch.clientX) < 10 &&\n Math.abs(touchStartTouch.clientY - touchEndTouch.clientY) < 10\n ) {\n props.onDismissSidePane?.();\n }\n }\n },\n [props, touchStartTouches]\n );\n\n const onTouchStart = useCallback((event: React.TouchEvent) => {\n setTouchStartTouches(event.touches);\n }, []);\n\n const onKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n props.onDismissSidePane?.();\n }\n },\n [props]\n );\n\n const pictureInPictureHandlers = useHandlers(LocalAndRemotePIP);\n const localAndRemotePIP = useMemo(() => {\n /* @conditional-compile-remove(rooms) */\n if (role === 'Consumer' && pictureInPictureProps.dominantRemoteParticipant?.userId) {\n return (\n <Stack tabIndex={0} aria-label={props.strings?.dismissModalAriaLabel ?? ''} onKeyDown={onKeyDown}>\n <_RemoteVideoTile\n strings={locale.component.strings.videoGallery}\n {...pictureInPictureProps.dominantRemoteParticipant}\n remoteParticipant={pictureInPictureProps.dominantRemoteParticipant}\n />\n </Stack>\n );\n }\n return (\n <Stack tabIndex={0} aria-label={props.strings?.dismissModalAriaLabel ?? ''} onKeyDown={onKeyDown}>\n <LocalAndRemotePIP {...pictureInPictureProps} {...pictureInPictureHandlers} />\n </Stack>\n );\n }, [\n /* @conditional-compile-remove(rooms) */ role,\n onKeyDown,\n pictureInPictureProps,\n props,\n pictureInPictureHandlers,\n locale.component.strings.videoGallery\n ]);\n\n /* @conditional-compile-remove(rooms) */\n if (role === 'Consumer' && !pictureInPictureProps.dominantRemoteParticipant) {\n return null;\n }\n\n const modalStylesThemed = concatStyleSets(modalStyle, props.styles?.modal);\n\n return (\n <Stack styles={rootStyles}>\n <Stack onTouchStart={onTouchStart} onTouchEnd={onTouchEnd}>\n <_ModalClone\n isOpen={true}\n isModeless={true}\n dragOptions={DRAG_OPTIONS}\n styles={modalStylesThemed}\n layerProps={{ hostId: props.modalLayerHostId }}\n minDragPosition={props.minDragPosition}\n maxDragPosition={props.maxDragPosition}\n >\n {\n // Only render LocalAndRemotePIP when this component is NOT hidden because VideoGallery needs to have\n // possession of the dominant remote participant video stream\n !props.hidden && localAndRemotePIP\n }\n </_ModalClone>\n </Stack>\n </Stack>\n );\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MoreButton.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/MoreButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAyB,yCAAmC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,IAAI,GAAG,GAAgB,EAAE,CAAC,oBAAC,sBAAsB,IAAC,GAAG,EAAE,eAAe,EAAE,WAAW,EAAC,cAAc,GAAG,CAAC;AAE5G;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAA4B,EAAe,EAAE;IACtE,OAAO,CACL,oBAAC,gBAAgB,oBACX,KAAK,IACT,QAAQ,EAAE,uBAAuB,EACjC,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,cAAc,EAAE,IAAI,EACpB,eAAe,EAAE,IAAI,EACrB,OAAO,EAAE,KAAK,CAAC,OAAO,gBACV,KAAK,CAAC,
|
1
|
+
{"version":3,"file":"MoreButton.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/MoreButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAyB,yCAAmC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,IAAI,GAAG,GAAgB,EAAE,CAAC,oBAAC,sBAAsB,IAAC,GAAG,EAAE,eAAe,EAAE,WAAW,EAAC,cAAc,GAAG,CAAC;AAE5G;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAA4B,EAAe,EAAE;IACtE,OAAO,CACL,oBAAC,gBAAgB,oBACX,KAAK,IACT,QAAQ,EAAE,uBAAuB,EACjC,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,cAAc,EAAE,IAAI,EACpB,eAAe,EAAE,IAAI,EACrB,OAAO,EAAE,KAAK,CAAC,OAAO,gBACV,KAAK,CAAC,YAA2C,CAAC,IAC9D,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { ControlBarButton, ControlBarButtonProps } from '@internal/react-components';\nimport { MoreHorizontal20Filled } from '@fluentui/react-icons';\n\nconst icon = (): JSX.Element => <MoreHorizontal20Filled key={'chatOnIconKey'} primaryFill=\"currentColor\" />;\n\n/**\n * @private\n */\nexport const MoreButton = (props: ControlBarButtonProps): JSX.Element => {\n return (\n <ControlBarButton\n {...props}\n labelKey={'optionsButtonLabelKey'}\n showLabel={props.showLabel}\n onRenderOnIcon={icon}\n onRenderOffIcon={icon}\n onClick={props.onClick}\n data-ui-id={props['data-ui-id' as keyof ControlBarButtonProps]}\n />\n );\n};\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { ParticipantMenuItemsCallback } from "../../../../react-components/src";
|
2
|
+
import { ParticipantMenuItemsCallback, _DrawerMenuItemProps } from "../../../../react-components/src";
|
3
3
|
import { AvatarPersonaDataCallback } from '../common/AvatarPersona';
|
4
4
|
/**
|
5
5
|
* @private
|
@@ -8,7 +8,7 @@ export declare const PeoplePaneContent: (props: {
|
|
8
8
|
inviteLink?: string | undefined;
|
9
9
|
onFetchAvatarPersonaData?: AvatarPersonaDataCallback | undefined;
|
10
10
|
onFetchParticipantMenuItems?: ParticipantMenuItemsCallback | undefined;
|
11
|
-
setDrawerMenuItems: (
|
11
|
+
setDrawerMenuItems: (drawerMenuItems: _DrawerMenuItemProps[]) => void;
|
12
12
|
mobileView?: boolean | undefined;
|
13
13
|
}) => JSX.Element;
|
14
14
|
//# sourceMappingURL=PeoplePaneContent.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PeoplePaneContent.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/PeoplePaneContent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAuB,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EACL,eAAe,EAKhB,yCAAmC;AACpC,OAAO,KAAK,EAAE,EAAE,WAAW,EA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IAAI,IAAI,KAAK,SAAS,CAAC;IACnF,wCAAwC;IACxC,OAAO,SAAS,CAAC;IACjB,yBAAyB;IACzB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IContextualMenuItem, Stack } from '@fluentui/react';\nimport {\n ParticipantList,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantMenuItemsCallback,\n _DrawerMenuItemProps\n} from '@internal/react-components';\nimport React, { useCallback, useMemo } from 'react';\nimport { CallWithChatCompositeStrings } from '../CallWithChatComposite';\nimport { usePropsFor } from '../CallComposite/hooks/usePropsFor';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport { ParticipantListWithHeading } from '../common/ParticipantContainer';\nimport { peoplePaneContainerTokens } from '../common/styles/ParticipantContainer.styles';\nimport { participantListContainerStyles, peoplePaneContainerStyle } from './styles/PeoplePaneContent.styles';\nimport { convertContextualMenuItemToDrawerMenuItem } from './ConvertContextualMenuItemToDrawerMenuItem';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallCompositeStrings } from '../CallComposite';\nimport { CommonCallAdapter } from '../CallComposite';\nimport { AddPeopleButton } from './AddPeopleButton';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';\nimport { useLocale } from '../localization';\n\n/**\n * @private\n */\nexport const PeoplePaneContent = (props: {\n inviteLink?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n setDrawerMenuItems: (_DrawerMenuItemProps) => void;\n mobileView?: boolean;\n}): JSX.Element => {\n const { inviteLink, onFetchParticipantMenuItems, setDrawerMenuItems } = props;\n const adapter = useAdapter();\n const localeStrings = useLocale();\n\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const getStrings = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return localeStrings.strings.call;\n\n return localeStrings.strings.callWithChat;\n };\n const strings = getStrings();\n\n const removeParticipantFromCall = useCallback(\n async (participantId: string): Promise<void> => {\n await adapter.removeParticipant(participantId);\n },\n [adapter]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const addParticipantToCall = useCallback(\n async (participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void> => {\n await adapter.addParticipant(participant, options);\n },\n [adapter]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = adapter.getState().alternateCallerId;\n\n const participantListDefaultProps = usePropsFor(ParticipantList);\n const removeButtonAllowed = hasRemoveParticipantsPermissionTrampoline(adapter);\n const setDrawerMenuItemsForParticipant: (participant?: ParticipantListParticipant) => void = useMemo(() => {\n return (participant?: ParticipantListParticipant) => {\n if (participant) {\n let contextualMenuItems: IContextualMenuItem[] = createDefaultContextualMenuItems(\n participant,\n strings,\n removeButtonAllowed && participant.isRemovable ? participantListDefaultProps.onRemoveParticipant : undefined,\n participantListDefaultProps.myUserId\n );\n if (onFetchParticipantMenuItems) {\n contextualMenuItems = onFetchParticipantMenuItems(\n participant.userId,\n participantListDefaultProps.myUserId,\n contextualMenuItems\n );\n }\n const drawerMenuItems = contextualMenuItems.map((contextualMenu: IContextualMenuItem) =>\n convertContextualMenuItemToDrawerMenuItem(contextualMenu, () => setDrawerMenuItems([]))\n );\n setDrawerMenuItems(drawerMenuItems);\n }\n };\n }, [\n strings,\n participantListDefaultProps.onRemoveParticipant,\n participantListDefaultProps.myUserId,\n removeButtonAllowed,\n onFetchParticipantMenuItems,\n setDrawerMenuItems\n ]);\n\n const participantListProps: ParticipantListProps = useMemo(() => {\n const onRemoveAParticipant = async (participantId: string): Promise<void> =>\n removeParticipantFromCall(participantId);\n return {\n ...participantListDefaultProps,\n // Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked\n onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,\n // We want the drawer menu items to appear when participants in ParticipantList are clicked\n onParticipantClick: props.mobileView ? setDrawerMenuItemsForParticipant : undefined\n };\n }, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant, removeParticipantFromCall]);\n\n const participantList = (\n <ParticipantListWithHeading\n isMobile={props.mobileView}\n participantListProps={participantListProps}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.mobileView ? undefined : onFetchParticipantMenuItems}\n title={strings.peoplePaneSubTitle}\n />\n );\n\n if (props.mobileView) {\n return (\n <Stack\n verticalFill\n styles={peoplePaneContainerStyle}\n tokens={peoplePaneContainerTokens}\n data-ui-id=\"people-pane-content\"\n >\n <Stack.Item grow styles={participantListContainerStyles}>\n {participantList}\n </Stack.Item>\n\n <AddPeopleButton\n inviteLink={inviteLink}\n mobileView={props.mobileView}\n participantList={participantList}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant={addParticipantToCall}\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId={alternateCallerId}\n />\n </Stack>\n );\n }\n\n return (\n <AddPeopleButton\n inviteLink={inviteLink}\n mobileView={props.mobileView}\n participantList={participantList}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant={addParticipantToCall}\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId={alternateCallerId}\n />\n );\n};\n\n/**\n * Create default contextual menu items for particant\n * @param participant - participant to create contextual menu items for\n * @param strings - localized strings for menu item text\n * @param onRemoveParticipant - callback to remove participant\n * @param localParticipantUserId - Local participant user id\n * @returns - IContextualMenuItem[]\n */\nconst createDefaultContextualMenuItems = (\n participant: ParticipantListParticipant,\n strings:\n | CallWithChatCompositeStrings\n | /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */ CallCompositeStrings,\n onRemoveParticipant?: (userId: string) => Promise<void>,\n localParticipantUserId?: string\n): IContextualMenuItem[] => {\n const menuItems: IContextualMenuItem[] = [];\n if (onRemoveParticipant && participant?.userId !== localParticipantUserId) {\n menuItems.push({\n key: 'remove',\n text: strings.removeMenuLabel,\n onClick: () => {\n if (participant?.userId) {\n onRemoveParticipant?.(participant?.userId);\n }\n },\n iconProps: {\n iconName: 'UserRemove'\n },\n 'data-ui-id': 'participant-list-remove-participant-button'\n });\n }\n return menuItems;\n};\n\n/**\n * @private\n */\nconst hasRemoveParticipantsPermissionTrampoline = (adapter: CommonCallAdapter): boolean => {\n /* @conditional-compile-remove(rooms) */\n const role = adapter.getState().call?.role;\n /* @conditional-compile-remove(rooms) */\n const canRemove = role === 'Presenter' || role === 'Unknown' || role === undefined;\n /* @conditional-compile-remove(rooms) */\n return canRemove;\n // Return true if stable.\n return true;\n};\n"]}
|
1
|
+
{"version":3,"file":"PeoplePaneContent.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/PeoplePaneContent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAuB,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EACL,eAAe,EAKhB,yCAAmC;AACpC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7G,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC;AAIxG,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKpD,OAAO,EAA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M,SAAS,GAA0B,EAAE,CAAC;IAC5C,IAAI,mBAAmB,IAAI,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,MAAK,sBAAsB,EAAE,CAAC;QAC1E,SAAS,CAAC,IAAI,CAAC;YACb,GAAG,EAAE,QAAQ;YACb,IAAI,EAAE,OAAO,CAAC,eAAe;YAC7B,OAAO,EAAE,GAAG,EAAE;gBACZ,IAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,EAAE,CAAC;oBACxB,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,CAAC,CAAC;gBAC7C,CAAC;YACH,CAAC;YACD,SAAS,EAAE;gBACT,QAAQ,EAAE,YAAY;aACvB;YACD,YAAY,EAAE,4CAA4C;SAC3D,CAAC,CAAC;IACL,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,yCAAyC,GAAG,CAAC,OAA0B,EAAW,EAAE;;IACxF,wCAAwC;IACxC,MAAM,IAAI,GAAG,MAAA,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,0CAAE,IAAI,CAAC;IAC3C,wCAAwC;IACxC,MAAM,SAAS,GAAG,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,CAAC;IACnF,wCAAwC;IACxC,OAAO,SAAS,CAAC;IACjB,yBAAyB;IACzB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IContextualMenuItem, Stack } from '@fluentui/react';\nimport {\n ParticipantList,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantMenuItemsCallback,\n _DrawerMenuItemProps\n} from '@internal/react-components';\nimport React, { useCallback, useMemo } from 'react';\nimport { CallWithChatCompositeStrings } from '../CallWithChatComposite';\nimport { usePropsFor } from '../CallComposite/hooks/usePropsFor';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport { ParticipantListWithHeading } from '../common/ParticipantContainer';\nimport { peoplePaneContainerTokens } from '../common/styles/ParticipantContainer.styles';\nimport { participantListContainerStyles, peoplePaneContainerStyle } from './styles/PeoplePaneContent.styles';\nimport { convertContextualMenuItemToDrawerMenuItem } from './ConvertContextualMenuItemToDrawerMenuItem';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallCompositeStrings } from '../CallComposite';\nimport { CommonCallAdapter } from '../CallComposite';\nimport { AddPeopleButton } from './AddPeopleButton';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { useAdapter } from '../CallComposite/adapter/CallAdapterProvider';\nimport { useLocale } from '../localization';\n\n/**\n * @private\n */\nexport const PeoplePaneContent = (props: {\n inviteLink?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n setDrawerMenuItems: (drawerMenuItems: _DrawerMenuItemProps[]) => void;\n mobileView?: boolean;\n}): JSX.Element => {\n const { inviteLink, onFetchParticipantMenuItems, setDrawerMenuItems } = props;\n const adapter = useAdapter();\n const localeStrings = useLocale();\n\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const getStrings = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return localeStrings.strings.call;\n\n return localeStrings.strings.callWithChat;\n };\n const strings = getStrings();\n\n const removeParticipantFromCall = useCallback(\n async (participantId: string): Promise<void> => {\n await adapter.removeParticipant(participantId);\n },\n [adapter]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const addParticipantToCall = useCallback(\n async (participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void> => {\n await adapter.addParticipant(participant, options);\n },\n [adapter]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = adapter.getState().alternateCallerId;\n\n const participantListDefaultProps = usePropsFor(ParticipantList);\n const removeButtonAllowed = hasRemoveParticipantsPermissionTrampoline(adapter);\n const setDrawerMenuItemsForParticipant: (participant?: ParticipantListParticipant) => void = useMemo(() => {\n return (participant?: ParticipantListParticipant) => {\n if (participant) {\n let contextualMenuItems: IContextualMenuItem[] = createDefaultContextualMenuItems(\n participant,\n strings,\n removeButtonAllowed && participant.isRemovable ? participantListDefaultProps.onRemoveParticipant : undefined,\n participantListDefaultProps.myUserId\n );\n if (onFetchParticipantMenuItems) {\n contextualMenuItems = onFetchParticipantMenuItems(\n participant.userId,\n participantListDefaultProps.myUserId,\n contextualMenuItems\n );\n }\n const drawerMenuItems = contextualMenuItems.map((contextualMenu: IContextualMenuItem) =>\n convertContextualMenuItemToDrawerMenuItem(contextualMenu, () => setDrawerMenuItems([]))\n );\n setDrawerMenuItems(drawerMenuItems);\n }\n };\n }, [\n strings,\n participantListDefaultProps.onRemoveParticipant,\n participantListDefaultProps.myUserId,\n removeButtonAllowed,\n onFetchParticipantMenuItems,\n setDrawerMenuItems\n ]);\n\n const participantListProps: ParticipantListProps = useMemo(() => {\n const onRemoveAParticipant = async (participantId: string): Promise<void> =>\n removeParticipantFromCall(participantId);\n return {\n ...participantListDefaultProps,\n // Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked\n onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,\n // We want the drawer menu items to appear when participants in ParticipantList are clicked\n onParticipantClick: props.mobileView ? setDrawerMenuItemsForParticipant : undefined\n };\n }, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant, removeParticipantFromCall]);\n\n const participantList = (\n <ParticipantListWithHeading\n isMobile={props.mobileView}\n participantListProps={participantListProps}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.mobileView ? undefined : onFetchParticipantMenuItems}\n title={strings.peoplePaneSubTitle}\n />\n );\n\n if (props.mobileView) {\n return (\n <Stack\n verticalFill\n styles={peoplePaneContainerStyle}\n tokens={peoplePaneContainerTokens}\n data-ui-id=\"people-pane-content\"\n >\n <Stack.Item grow styles={participantListContainerStyles}>\n {participantList}\n </Stack.Item>\n\n <AddPeopleButton\n inviteLink={inviteLink}\n mobileView={props.mobileView}\n participantList={participantList}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant={addParticipantToCall}\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId={alternateCallerId}\n />\n </Stack>\n );\n }\n\n return (\n <AddPeopleButton\n inviteLink={inviteLink}\n mobileView={props.mobileView}\n participantList={participantList}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant={addParticipantToCall}\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId={alternateCallerId}\n />\n );\n};\n\n/**\n * Create default contextual menu items for particant\n * @param participant - participant to create contextual menu items for\n * @param strings - localized strings for menu item text\n * @param onRemoveParticipant - callback to remove participant\n * @param localParticipantUserId - Local participant user id\n * @returns - IContextualMenuItem[]\n */\nconst createDefaultContextualMenuItems = (\n participant: ParticipantListParticipant,\n strings:\n | CallWithChatCompositeStrings\n | /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */ CallCompositeStrings,\n onRemoveParticipant?: (userId: string) => Promise<void>,\n localParticipantUserId?: string\n): IContextualMenuItem[] => {\n const menuItems: IContextualMenuItem[] = [];\n if (onRemoveParticipant && participant?.userId !== localParticipantUserId) {\n menuItems.push({\n key: 'remove',\n text: strings.removeMenuLabel,\n onClick: () => {\n if (participant?.userId) {\n onRemoveParticipant?.(participant?.userId);\n }\n },\n iconProps: {\n iconName: 'UserRemove'\n },\n 'data-ui-id': 'participant-list-remove-participant-button'\n });\n }\n return menuItems;\n};\n\n/**\n * @private\n */\nconst hasRemoveParticipantsPermissionTrampoline = (adapter: CommonCallAdapter): boolean => {\n /* @conditional-compile-remove(rooms) */\n const role = adapter.getState().call?.role;\n /* @conditional-compile-remove(rooms) */\n const canRemove = role === 'Presenter' || role === 'Unknown' || role === undefined;\n /* @conditional-compile-remove(rooms) */\n return canRemove;\n // Return true if stable.\n return true;\n};\n"]}
|
@@ -50,7 +50,7 @@ export const Survey = (props) => {
|
|
50
50
|
return (React.createElement(React.Fragment, null,
|
51
51
|
showDefaultAfterSubmitScreen && React.createElement(ThankYouForFeedbackPage, { iconName: iconName }),
|
52
52
|
showDefaultAfterDismissedScreen && (React.createElement(NoticePage, { iconName: iconName, title: title, moreDetails: moreDetails, dataUiId: 'left-call-page', disableStartCallButton: disableStartCallButton })),
|
53
|
-
!showDefaultAfterSubmitScreen && !showDefaultAfterDismissedScreen && (React.createElement(Stack, { verticalAlign: "center", className: surveyContainerStyle(isMobile) },
|
53
|
+
!showDefaultAfterSubmitScreen && !showDefaultAfterDismissedScreen && (React.createElement(Stack, { verticalAlign: "center", className: surveyContainerStyle(!!isMobile) },
|
54
54
|
React.createElement(Text, { className: questionTextStyle(theme) }, strings.surveyTitle),
|
55
55
|
React.createElement(SurveyContent, { setShowSubmitFeedbackButton: (showButton) => {
|
56
56
|
setShowSubmitFeedbackButton(showButton);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Survey.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/Survey.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,qDAAqD;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,qDAAqD;AACrD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACt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ent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useState } from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { Text, PrimaryButton, Stack, useTheme, DefaultButton } from '@fluentui/react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { SurveyContent } from './SurveyContent';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurveyImprovementSuggestions } from '@internal/react-components';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallCompositeIcons } from './icons';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { NoticePage } from '../CallComposite/pages/NoticePage';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { ThankYouForFeedbackPage } from '../CallComposite/pages/ThankYouForFeedbackPage';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { questionTextStyle, surveyContainerStyle } from './styles/Survey.styles';\n\n/** @private */\nexport const Survey = (props: {\n /* @conditional-compile-remove(end-of-call-survey) */\n iconName?: keyof CallCompositeIcons;\n /* @conditional-compile-remove(end-of-call-survey) */\n title: string;\n /* @conditional-compile-remove(end-of-call-survey) */\n moreDetails?: string;\n /* @conditional-compile-remove(end-of-call-survey) */\n disableStartCallButton?: boolean;\n /* @conditional-compile-remove(end-of-call-survey) */\n isMobile?: boolean;\n /* @conditional-compile-remove(end-of-call-survey) */\n onSubmitSurvey?: (survey: CallSurvey) => Promise<CallSurveyResponse | undefined>;\n /* @conditional-compile-remove(end-of-call-survey) */\n /**\n * Optional callback to redirect users to custom screens when survey is done, note that default end call screen will be shown if this callback is not provided\n * This callback can be used to redirect users to different screens depending on survey state, whether it is submitted, skipped or has a problem when submitting the survey\n */\n onSurveyClosed?: (surveyState: 'sent' | 'skipped' | 'error', surveyError?: string) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n onSurveySubmittedCustom?: (\n callId: string,\n surveyId: string,\n /**\n * This is the survey results containing star survey data and API tag survey data.\n * This part of the result will always be sent to the calling sdk\n * This callback provides user with the ability to gain access to survey data\n */\n submittedSurvey: CallSurvey,\n /**\n * This is the survey results containing free form text\n * This part of the result will not be handled by composites\n * User will need to collect and handle this information 100% on their own\n * Free form text survey is not going to show in the UI if onSurveySubmitted is not populated\n */\n improvementSuggestions: CallSurveyImprovementSuggestions\n ) => Promise<void>;\n}): JSX.Element => {\n /* @conditional-compile-remove(end-of-call-survey) */\n const {\n onSubmitSurvey,\n onSurveySubmittedCustom,\n onSurveyClosed,\n iconName,\n title,\n moreDetails,\n disableStartCallButton,\n isMobile\n } = props;\n /* @conditional-compile-remove(end-of-call-survey) */\n const strings = useLocale().strings.call;\n /* @conditional-compile-remove(end-of-call-survey) */\n const [ratings, setRatings] = useState(0);\n /* @conditional-compile-remove(end-of-call-survey) */\n const [issuesSelected, setIssuesSelected] = useState<CallSurvey | undefined>();\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showSubmitFeedbackButton, setShowSubmitFeedbackButton] = useState(false);\n /* @conditional-compile-remove(end-of-call-survey) */\n const [improvementSuggestions, setImprovementSuggestions] = useState<CallSurveyImprovementSuggestions>({});\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showDefaultAfterSubmitScreen, setShowDefaultAfterSubmitScreen] = useState<boolean>(false);\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showDefaultAfterDismissedScreen, setShowDefaultAfterDismissedScreen] = useState<boolean>(false);\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const [submitButtonDisabled, setSubmitButtonDisabled] = useState<boolean>(false);\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const theme = useTheme();\n\n /* @conditional-compile-remove(end-of-call-survey) */\n return (\n <>\n {showDefaultAfterSubmitScreen && <ThankYouForFeedbackPage iconName={iconName} />}\n {showDefaultAfterDismissedScreen && (\n <NoticePage\n iconName={iconName}\n title={title}\n moreDetails={moreDetails}\n dataUiId={'left-call-page'}\n disableStartCallButton={disableStartCallButton}\n />\n )}\n {!showDefaultAfterSubmitScreen && !showDefaultAfterDismissedScreen && (\n <Stack verticalAlign=\"center\" className={surveyContainerStyle(isMobile)}>\n <Text className={questionTextStyle(theme)}>{strings.surveyTitle}</Text>\n <SurveyContent\n setShowSubmitFeedbackButton={(showButton: boolean) => {\n setShowSubmitFeedbackButton(showButton);\n }}\n setRatings={(rating: number) => {\n setRatings(rating);\n }}\n setIssuesSelected={(issuesSelected: CallSurvey) => {\n setIssuesSelected(issuesSelected);\n }}\n setImprovementSuggestions={\n onSurveySubmittedCustom\n ? (improvementSuggestions: CallSurveyImprovementSuggestions) => {\n setImprovementSuggestions(improvementSuggestions);\n }\n : undefined\n }\n />\n <Stack horizontal horizontalAlign=\"end\">\n <DefaultButton\n style={{ marginTop: '1rem', marginRight: '0.5rem' }}\n onClick={() => {\n if (onSurveyClosed) {\n onSurveyClosed('skipped');\n } else {\n setShowDefaultAfterDismissedScreen(true);\n }\n }}\n >\n {strings.surveySkipButtonLabel}\n </DefaultButton>\n\n {showSubmitFeedbackButton && (\n <PrimaryButton\n disabled={submitButtonDisabled}\n style={{ marginTop: '1rem', marginLeft: '0.5rem' }}\n onClick={async () => {\n const surveyResults: CallSurvey = { overallRating: { score: ratings } };\n if (issuesSelected?.overallRating) {\n surveyResults.overallRating = { score: ratings, issues: issuesSelected.overallRating.issues };\n }\n if (issuesSelected?.audioRating) {\n surveyResults.audioRating = { score: ratings, issues: issuesSelected.audioRating.issues };\n }\n if (issuesSelected?.screenshareRating) {\n surveyResults.screenshareRating = {\n score: ratings,\n issues: issuesSelected.screenshareRating.issues\n };\n }\n if (issuesSelected?.videoRating) {\n surveyResults.videoRating = { score: ratings, issues: issuesSelected.videoRating.issues };\n }\n if (onSubmitSurvey) {\n // disable submit button while waiting for the survey to submit\n setSubmitButtonDisabled(true);\n // submitting survey results to calling\n onSubmitSurvey(surveyResults)\n .then((res) => {\n // if contoso provided callback to handle their own survey data, send over the submitted survey results\n if (onSurveySubmittedCustom) {\n onSurveySubmittedCustom(\n res?.callId ?? '',\n res?.id ?? '',\n surveyResults,\n improvementSuggestions\n ).then(() => setSubmitButtonDisabled(false));\n } else {\n // if callback is not provided, enable the submit button after survey is submitted\n setSubmitButtonDisabled(false);\n }\n\n // redirect to new screen\n if (onSurveyClosed) {\n // redirect to new screen according to contoso's callback set up\n onSurveyClosed('sent');\n } else {\n // if call back not provided, redirect to default screen\n setShowDefaultAfterSubmitScreen(true);\n }\n })\n .catch((e) => {\n // if there is an error submitting the survey, log the error in the console\n console.log('error when submitting survey: ' + e);\n // if contoso provided redirect callback, pass contoso the error so they can redirect to a corresponding error screen\n if (onSurveyClosed) {\n onSurveyClosed('error', e);\n }\n });\n }\n }}\n >\n {strings.surveyConfirmButtonLabel}\n </PrimaryButton>\n )}\n </Stack>\n </Stack>\n )}\n </>\n );\n return <></>;\n};\n"]}
|
1
|
+
{"version":3,"file":"Survey.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/Survey.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,qDAAqD;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,qDAAqD;AACrD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACtF,qDAAqD;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOhD,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC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,CAAC,CAAC;4BAC9B,uCAAuC;4BACvC,cAAc,CAAC,aAAa,CAAC;iCAC1B,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;;gCACZ,uGAAuG;gCACvG,IAAI,uBAAuB,EAAE,CAAC;oCAC5B,uBAAuB,CACrB,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,mCAAI,EAAE,EACjB,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,EAAE,mCAAI,EAAE,EACb,aAAa,EACb,sBAAsB,CACvB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,CAAC;gCAC/C,CAAC;qCAAM,CAAC;oCACN,kFAAkF;oCAClF,uBAAuB,CAAC,KAAK,CAAC,CAAC;gCACjC,CAAC;gCAED,yBAAyB;gCACzB,IAAI,cAAc,EAAE,CAAC;oCACnB,gEAAgE;oCAChE,cAAc,CAAC,MAAM,CAAC,CAAC;gCACzB,CAAC;qCAAM,CAAC;oCACN,wDAAwD;oCACxD,+BAA+B,CAAC,IAAI,CAAC,CAAC;gCACxC,CAAC;4BACH,CAAC,CAAC;iCACD,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;gCACX,2EAA2E;gCAC3E,OAAO,CAAC,GAAG,CAAC,gCAAgC,GAAG,CAAC,CAAC,CAAC;gCAClD,qHAAqH;gCACrH,IAAI,cAAc,EAAE,CAAC;oCACnB,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;gCAC7B,CAAC;4BACH,CAAC,CAAC,CAAC;wBACP,CAAC;oBACH,CAAC,CAAA,IAEA,OAAO,CAAC,wBAAwB,CACnB,CACjB,CACK,CACF,CACT,CACA,CACJ,CAAC;IACF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useState } from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { Text, PrimaryButton, Stack, useTheme, DefaultButton } from '@fluentui/react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { SurveyContent } from './SurveyContent';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurveyImprovementSuggestions } from '@internal/react-components';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallCompositeIcons } from './icons';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { NoticePage } from '../CallComposite/pages/NoticePage';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { ThankYouForFeedbackPage } from '../CallComposite/pages/ThankYouForFeedbackPage';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { questionTextStyle, surveyContainerStyle } from './styles/Survey.styles';\n\n/** @private */\nexport const Survey = (props: {\n /* @conditional-compile-remove(end-of-call-survey) */\n iconName?: keyof CallCompositeIcons;\n /* @conditional-compile-remove(end-of-call-survey) */\n title: string;\n /* @conditional-compile-remove(end-of-call-survey) */\n moreDetails?: string;\n /* @conditional-compile-remove(end-of-call-survey) */\n disableStartCallButton?: boolean;\n /* @conditional-compile-remove(end-of-call-survey) */\n isMobile?: boolean;\n /* @conditional-compile-remove(end-of-call-survey) */\n onSubmitSurvey?: (survey: CallSurvey) => Promise<CallSurveyResponse | undefined>;\n /* @conditional-compile-remove(end-of-call-survey) */\n /**\n * Optional callback to redirect users to custom screens when survey is done, note that default end call screen will be shown if this callback is not provided\n * This callback can be used to redirect users to different screens depending on survey state, whether it is submitted, skipped or has a problem when submitting the survey\n */\n onSurveyClosed?: (surveyState: 'sent' | 'skipped' | 'error', surveyError?: string) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n onSurveySubmittedCustom?: (\n callId: string,\n surveyId: string,\n /**\n * This is the survey results containing star survey data and API tag survey data.\n * This part of the result will always be sent to the calling sdk\n * This callback provides user with the ability to gain access to survey data\n */\n submittedSurvey: CallSurvey,\n /**\n * This is the survey results containing free form text\n * This part of the result will not be handled by composites\n * User will need to collect and handle this information 100% on their own\n * Free form text survey is not going to show in the UI if onSurveySubmitted is not populated\n */\n improvementSuggestions: CallSurveyImprovementSuggestions\n ) => Promise<void>;\n}): JSX.Element => {\n /* @conditional-compile-remove(end-of-call-survey) */\n const {\n onSubmitSurvey,\n onSurveySubmittedCustom,\n onSurveyClosed,\n iconName,\n title,\n moreDetails,\n disableStartCallButton,\n isMobile\n } = props;\n /* @conditional-compile-remove(end-of-call-survey) */\n const strings = useLocale().strings.call;\n /* @conditional-compile-remove(end-of-call-survey) */\n const [ratings, setRatings] = useState(0);\n /* @conditional-compile-remove(end-of-call-survey) */\n const [issuesSelected, setIssuesSelected] = useState<CallSurvey | undefined>();\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showSubmitFeedbackButton, setShowSubmitFeedbackButton] = useState(false);\n /* @conditional-compile-remove(end-of-call-survey) */\n const [improvementSuggestions, setImprovementSuggestions] = useState<CallSurveyImprovementSuggestions>({});\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showDefaultAfterSubmitScreen, setShowDefaultAfterSubmitScreen] = useState<boolean>(false);\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showDefaultAfterDismissedScreen, setShowDefaultAfterDismissedScreen] = useState<boolean>(false);\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const [submitButtonDisabled, setSubmitButtonDisabled] = useState<boolean>(false);\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const theme = useTheme();\n\n /* @conditional-compile-remove(end-of-call-survey) */\n return (\n <>\n {showDefaultAfterSubmitScreen && <ThankYouForFeedbackPage iconName={iconName} />}\n {showDefaultAfterDismissedScreen && (\n <NoticePage\n iconName={iconName}\n title={title}\n moreDetails={moreDetails}\n dataUiId={'left-call-page'}\n disableStartCallButton={disableStartCallButton}\n />\n )}\n {!showDefaultAfterSubmitScreen && !showDefaultAfterDismissedScreen && (\n <Stack verticalAlign=\"center\" className={surveyContainerStyle(!!isMobile)}>\n <Text className={questionTextStyle(theme)}>{strings.surveyTitle}</Text>\n <SurveyContent\n setShowSubmitFeedbackButton={(showButton: boolean) => {\n setShowSubmitFeedbackButton(showButton);\n }}\n setRatings={(rating: number) => {\n setRatings(rating);\n }}\n setIssuesSelected={(issuesSelected: CallSurvey) => {\n setIssuesSelected(issuesSelected);\n }}\n setImprovementSuggestions={\n onSurveySubmittedCustom\n ? (improvementSuggestions: CallSurveyImprovementSuggestions) => {\n setImprovementSuggestions(improvementSuggestions);\n }\n : undefined\n }\n />\n <Stack horizontal horizontalAlign=\"end\">\n <DefaultButton\n style={{ marginTop: '1rem', marginRight: '0.5rem' }}\n onClick={() => {\n if (onSurveyClosed) {\n onSurveyClosed('skipped');\n } else {\n setShowDefaultAfterDismissedScreen(true);\n }\n }}\n >\n {strings.surveySkipButtonLabel}\n </DefaultButton>\n\n {showSubmitFeedbackButton && (\n <PrimaryButton\n disabled={submitButtonDisabled}\n style={{ marginTop: '1rem', marginLeft: '0.5rem' }}\n onClick={async () => {\n const surveyResults: CallSurvey = { overallRating: { score: ratings } };\n if (issuesSelected?.overallRating) {\n surveyResults.overallRating = { score: ratings, issues: issuesSelected.overallRating.issues };\n }\n if (issuesSelected?.audioRating) {\n surveyResults.audioRating = { score: ratings, issues: issuesSelected.audioRating.issues };\n }\n if (issuesSelected?.screenshareRating) {\n surveyResults.screenshareRating = {\n score: ratings,\n issues: issuesSelected.screenshareRating.issues\n };\n }\n if (issuesSelected?.videoRating) {\n surveyResults.videoRating = { score: ratings, issues: issuesSelected.videoRating.issues };\n }\n if (onSubmitSurvey) {\n // disable submit button while waiting for the survey to submit\n setSubmitButtonDisabled(true);\n // submitting survey results to calling\n onSubmitSurvey(surveyResults)\n .then((res) => {\n // if contoso provided callback to handle their own survey data, send over the submitted survey results\n if (onSurveySubmittedCustom) {\n onSurveySubmittedCustom(\n res?.callId ?? '',\n res?.id ?? '',\n surveyResults,\n improvementSuggestions\n ).then(() => setSubmitButtonDisabled(false));\n } else {\n // if callback is not provided, enable the submit button after survey is submitted\n setSubmitButtonDisabled(false);\n }\n\n // redirect to new screen\n if (onSurveyClosed) {\n // redirect to new screen according to contoso's callback set up\n onSurveyClosed('sent');\n } else {\n // if call back not provided, redirect to default screen\n setShowDefaultAfterSubmitScreen(true);\n }\n })\n .catch((e) => {\n // if there is an error submitting the survey, log the error in the console\n console.log('error when submitting survey: ' + e);\n // if contoso provided redirect callback, pass contoso the error so they can redirect to a corresponding error screen\n if (onSurveyClosed) {\n onSurveyClosed('error', e);\n }\n });\n }\n }}\n >\n {strings.surveyConfirmButtonLabel}\n </PrimaryButton>\n )}\n </Stack>\n </Stack>\n )}\n </>\n );\n return <></>;\n};\n"]}
|
@@ -6,5 +6,5 @@ export declare const questionTextStyle: (theme: Theme) => string;
|
|
6
6
|
/**
|
7
7
|
* @private
|
8
8
|
*/
|
9
|
-
export declare const surveyContainerStyle: (isMobile:
|
9
|
+
export declare const surveyContainerStyle: (isMobile: boolean) => string;
|
10
10
|
//# sourceMappingURL=Survey.styles.d.ts.map
|