@azure/communication-react 1.12.1-alpha-202401230013 → 1.12.1-alpha-202401240013
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 +29 -0
- package/dist/dist-cjs/communication-react/index.js +448 -249
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +20 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +5 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +38 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.d.ts +26 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +59 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.js +18 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/timerUtils.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/timerUtils.js +30 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/timerUtils.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +22 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +31 -4
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DtmfDialerButton.d.ts +18 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DtmfDialerButton.js +41 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DtmfDialerButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +5 -0
- package/package.json +1 -1
@@ -5,6 +5,8 @@ import { useId } from '@fluentui/react-hooks';
|
|
5
5
|
import { _isInCall } from "../../../../../calling-component-bindings/src";
|
6
6
|
import { ErrorBar } from "../../../../../react-components/src";
|
7
7
|
import React from 'react';
|
8
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
9
|
+
import { useState } from 'react';
|
8
10
|
import { useLocale } from '../../localization';
|
9
11
|
import { CallArrangement } from '../components/CallArrangement';
|
10
12
|
import { MediaGallery } from '../components/MediaGallery';
|
@@ -18,6 +20,8 @@ import { mediaGallerySelector } from '../selectors/mediaGallerySelector';
|
|
18
20
|
import { mutedNotificationSelector } from '../selectors/mutedNotificationSelector';
|
19
21
|
import { networkReconnectTileSelector } from '../selectors/networkReconnectTileSelector';
|
20
22
|
import { reduceCallControlsForMobile } from '../utils';
|
23
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
24
|
+
import { DtmfDialpadPage } from './DtmfDialpadPage';
|
21
25
|
/**
|
22
26
|
* @private
|
23
27
|
*/
|
@@ -40,18 +44,31 @@ export const CallPage = (props) => {
|
|
40
44
|
const errorBarProps = usePropsFor(ErrorBar);
|
41
45
|
const mutedNotificationProps = useSelector(mutedNotificationSelector);
|
42
46
|
const networkReconnectTileProps = useSelector(networkReconnectTileSelector);
|
47
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
48
|
+
const [dtmfDialerPresent, setDtmfDialerPresent] = useState(false);
|
43
49
|
const strings = useLocale().strings.call;
|
44
50
|
// Reduce the controls shown when mobile view is enabled.
|
45
51
|
const callControlOptions = mobileView ? reduceCallControlsForMobile(options === null || options === void 0 ? void 0 : options.callControls) : options === null || options === void 0 ? void 0 : options.callControls;
|
46
52
|
const drawerMenuHostId = useId('drawerMenuHost');
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
options:
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
53
|
+
const onRenderGalleryContentTrampoline = () => {
|
54
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
55
|
+
if (dtmfDialerPresent) {
|
56
|
+
return (React.createElement(DtmfDialpadPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, onDismissError: props.onDismissError,
|
57
|
+
/* @conditional-compile-remove(capabilities) */
|
58
|
+
capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent }));
|
59
|
+
}
|
60
|
+
else {
|
61
|
+
return (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onFetchAvatarPersonaData: onFetchAvatarPersonaData,
|
62
|
+
/* @conditional-compile-remove(pinned-participants) */
|
63
|
+
remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenuOptions, drawerMenuHostId: drawerMenuHostId,
|
64
|
+
/* @conditional-compile-remove(click-to-call) */
|
65
|
+
localVideoTileOptions: options === null || options === void 0 ? void 0 : options.localVideoTile,
|
66
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
67
|
+
userSetOverflowGalleryPosition: userSetOverflowGalleryPosition,
|
68
|
+
/* @conditional-compile-remove(gallery-layouts) */
|
69
|
+
userSetGalleryLayout: galleryLayout })));
|
70
|
+
}
|
71
|
+
return (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onFetchAvatarPersonaData: onFetchAvatarPersonaData,
|
55
72
|
/* @conditional-compile-remove(pinned-participants) */
|
56
73
|
remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenuOptions, drawerMenuHostId: drawerMenuHostId,
|
57
74
|
/* @conditional-compile-remove(click-to-call) */
|
@@ -59,7 +76,16 @@ export const CallPage = (props) => {
|
|
59
76
|
/* @conditional-compile-remove(gallery-layouts) */
|
60
77
|
userSetOverflowGalleryPosition: userSetOverflowGalleryPosition,
|
61
78
|
/* @conditional-compile-remove(gallery-layouts) */
|
62
|
-
userSetGalleryLayout: galleryLayout })))
|
79
|
+
userSetGalleryLayout: galleryLayout })));
|
80
|
+
};
|
81
|
+
return (React.createElement(CallArrangement, { id: drawerMenuHostId, complianceBannerProps: Object.assign(Object.assign({}, complianceBannerProps), { strings }), errorBarProps: (options === null || options === void 0 ? void 0 : options.errorBar) !== false && errorBarProps, mutedNotificationProps: mutedNotificationProps, callControlProps: {
|
82
|
+
callInvitationURL: callInvitationURL,
|
83
|
+
onFetchParticipantMenuItems: onFetchParticipantMenuItems,
|
84
|
+
options: callControlOptions,
|
85
|
+
increaseFlyoutItemSize: mobileView
|
86
|
+
},
|
87
|
+
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */
|
88
|
+
onFetchAvatarPersonaData: onFetchAvatarPersonaData, mobileView: mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (onRenderGalleryContentTrampoline()) : (React.createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps)))) : (React.createElement(React.Fragment, null)), updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onCloseChatPane: onCloseChatPane, dataUiId: 'call-page', latestErrors: props.latestErrors, onDismissError: props.onDismissError,
|
63
89
|
/* @conditional-compile-remove(gallery-layouts) */
|
64
90
|
onUserSetOverflowGalleryPositionChange: onSetUserSetOverflowGalleryPosition,
|
65
91
|
/* @conditional-compile-remove(gallery-layouts) */
|
@@ -67,7 +93,9 @@ export const CallPage = (props) => {
|
|
67
93
|
/* @conditional-compile-remove(gallery-layouts) */
|
68
94
|
userSetGalleryLayout: galleryLayout,
|
69
95
|
/* @conditional-compile-remove(capabilities) */
|
70
|
-
capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps
|
96
|
+
capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps,
|
97
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
98
|
+
onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent) }));
|
71
99
|
};
|
72
100
|
/**
|
73
101
|
* @private
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/CallPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,k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AO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,iBAAiB,CAAC,IAAI,CAAC;AACtG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\nimport { useId } from '@fluentui/react-hooks';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { ActiveErrorMessage, ErrorBar, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { VideoGalleryLayout } from '@internal/react-components';\nimport React from 'react';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { useLocale } from '../../localization';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { MediaGallery } from '../components/MediaGallery';\nimport { NetworkReconnectTile } from '../components/NetworkReconnectTile';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { complianceBannerSelector } from '../selectors/complianceBannerSelector';\nimport { mediaGallerySelector } from '../selectors/mediaGallerySelector';\nimport { mutedNotificationSelector } from '../selectors/mutedNotificationSelector';\nimport { networkReconnectTileSelector } from '../selectors/networkReconnectTileSelector';\nimport { reduceCallControlsForMobile } from '../utils';\nimport { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n/* @conditional-compile-remove(capabilities) */\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\n\n/**\n * @private\n */\nexport interface CallPageProps {\n mobileView: boolean;\n modalLayerHostId: string;\n callInvitationURL?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n options?: CallCompositeOptions;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n /* @conditional-compile-remove(gallery-layouts) */\n galleryLayout: VideoGalleryLayout;\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetGalleryLayoutChange?: (layout: VideoGalleryLayout) => void;\n /* @conditional-compile-remove(gallery-layouts) */\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n /* @conditional-compile-remove(gallery-layouts) */\n onSetUserSetOverflowGalleryPosition?: (position: 'Responsive' | 'horizontalTop') => void;\n onCloseChatPane?: () => void;\n}\n\n/**\n * @private\n */\nexport const CallPage = (props: CallPageProps): JSX.Element => {\n const {\n callInvitationURL,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n mobileView,\n /* @conditional-compile-remove(gallery-layouts) */\n galleryLayout = 'floatingLocalVideo',\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetGalleryLayoutChange,\n /* @conditional-compile-remove(gallery-layouts) */\n userSetOverflowGalleryPosition = 'Responsive',\n /* @conditional-compile-remove(gallery-layouts) */\n onSetUserSetOverflowGalleryPosition,\n onCloseChatPane\n } = props;\n\n // To use useProps to get these states, we need to create another file wrapping Call,\n // It seems unnecessary in this case, so we get the updated states using this approach.\n const { callStatus } = useSelector(callStatusSelector);\n const mediaGalleryProps = useSelector(mediaGallerySelector);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n const complianceBannerProps = useSelector(complianceBannerSelector);\n const errorBarProps = usePropsFor(ErrorBar);\n const mutedNotificationProps = useSelector(mutedNotificationSelector);\n const networkReconnectTileProps = useSelector(networkReconnectTileSelector);\n\n const strings = useLocale().strings.call;\n\n // Reduce the controls shown when mobile view is enabled.\n const callControlOptions = mobileView ? reduceCallControlsForMobile(options?.callControls) : options?.callControls;\n\n const drawerMenuHostId = useId('drawerMenuHost');\n\n return (\n <CallArrangement\n id={drawerMenuHostId}\n complianceBannerProps={{ ...complianceBannerProps, strings }}\n errorBarProps={options?.errorBar !== false && errorBarProps}\n mutedNotificationProps={mutedNotificationProps}\n callControlProps={{\n callInvitationURL: callInvitationURL,\n onFetchParticipantMenuItems: onFetchParticipantMenuItems,\n options: callControlOptions,\n increaseFlyoutItemSize: mobileView\n }}\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n mobileView={mobileView}\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() =>\n _isInCall(callStatus) ? (\n isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (\n <MediaGallery\n isMobile={mobileView}\n {...mediaGalleryProps}\n {...mediaGalleryHandlers}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions={options?.remoteVideoTileMenuOptions}\n drawerMenuHostId={drawerMenuHostId}\n /* @conditional-compile-remove(click-to-call) */\n localVideoTileOptions={options?.localVideoTile}\n /* @conditional-compile-remove(gallery-layouts) */\n userSetOverflowGalleryPosition={userSetOverflowGalleryPosition}\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout={galleryLayout}\n />\n ) : (\n <NetworkReconnectTile {...networkReconnectTileProps} />\n )\n ) : (\n <></>\n )\n }\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n onCloseChatPane={onCloseChatPane}\n dataUiId={'call-page'}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetOverflowGalleryPositionChange={onSetUserSetOverflowGalleryPosition}\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetGalleryLayoutChange={onUserSetGalleryLayoutChange}\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout={galleryLayout}\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n />\n );\n};\n\n/**\n * @private\n */\nexport const isNetworkHealthy = (value: DiagnosticQuality | boolean | undefined): boolean => {\n // We know that the value is actually of type DiagnosticQuality for this diagnostic.\n // We ignore any boolen values, considering the network to still be healthy.\n // Thus, only DiagnosticQuality.Poor or .Bad indicate network problems.\n return value === true || value === false || value === undefined || value === DiagnosticQuality.Good;\n};\n"]}
|
1
|
+
{"version":3,"file":"CallPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/CallPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,sDAA6C;AACjE,OAAO,EAAsB,QAAQ,EAAgC,4CAAmC;AAGxG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,8CAA8C;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,wBAAwB,E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ACF,yCAAK,CACN,EAEH,sBAAsB,EAAE,KAAK,CAAC,sBAAsB,EACpD,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAC9C,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,WAAW,EACrB,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,kDAAkD;QAClD,sCAAsC,EAAE,mCAAmC;QAC3E,kDAAkD;QAClD,4BAA4B,EAAE,4BAA4B;QAC1D,kDAAkD;QAClD,oBAAoB,EAAE,aAAa;QACnC,+CAA+C;QAC/C,uCAAuC,EAAE,KAAK,CAAC,uCAAuC;QACtF,8CAA8C;QAC9C,gBAAgB,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,CAAC,iBAAiB,CAAC,GAChE,CACH,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA8C,EAAW,EAAE;IAC1F,oFAAoF;IACpF,4EAA4E;IAC5E,uEAAuE;IACvE,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,iBAAiB,CAAC,IAAI,CAAC;AACtG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\nimport { useId } from '@fluentui/react-hooks';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { ActiveErrorMessage, ErrorBar, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { VideoGalleryLayout } from '@internal/react-components';\nimport React from 'react';\n/* @conditional-compile-remove(dtmf-dialer) */\nimport { useState } from 'react';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { useLocale } from '../../localization';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { MediaGallery } from '../components/MediaGallery';\nimport { NetworkReconnectTile } from '../components/NetworkReconnectTile';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { complianceBannerSelector } from '../selectors/complianceBannerSelector';\nimport { mediaGallerySelector } from '../selectors/mediaGallerySelector';\nimport { mutedNotificationSelector } from '../selectors/mutedNotificationSelector';\nimport { networkReconnectTileSelector } from '../selectors/networkReconnectTileSelector';\nimport { reduceCallControlsForMobile } from '../utils';\nimport { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n/* @conditional-compile-remove(capabilities) */\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\n/* @conditional-compile-remove(dtmf-dialer) */\nimport { DtmfDialpadPage } from './DtmfDialpadPage';\n\n/**\n * @private\n */\nexport interface CallPageProps {\n mobileView: boolean;\n modalLayerHostId: string;\n callInvitationURL?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n options?: CallCompositeOptions;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n /* @conditional-compile-remove(gallery-layouts) */\n galleryLayout: VideoGalleryLayout;\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetGalleryLayoutChange?: (layout: VideoGalleryLayout) => void;\n /* @conditional-compile-remove(gallery-layouts) */\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n /* @conditional-compile-remove(gallery-layouts) */\n onSetUserSetOverflowGalleryPosition?: (position: 'Responsive' | 'horizontalTop') => void;\n onCloseChatPane?: () => void;\n}\n\n/**\n * @private\n */\nexport const CallPage = (props: CallPageProps): JSX.Element => {\n const {\n callInvitationURL,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n mobileView,\n /* @conditional-compile-remove(gallery-layouts) */\n galleryLayout = 'floatingLocalVideo',\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetGalleryLayoutChange,\n /* @conditional-compile-remove(gallery-layouts) */\n userSetOverflowGalleryPosition = 'Responsive',\n /* @conditional-compile-remove(gallery-layouts) */\n onSetUserSetOverflowGalleryPosition,\n onCloseChatPane\n } = props;\n\n // To use useProps to get these states, we need to create another file wrapping Call,\n // It seems unnecessary in this case, so we get the updated states using this approach.\n const { callStatus } = useSelector(callStatusSelector);\n const mediaGalleryProps = useSelector(mediaGallerySelector);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n const complianceBannerProps = useSelector(complianceBannerSelector);\n const errorBarProps = usePropsFor(ErrorBar);\n const mutedNotificationProps = useSelector(mutedNotificationSelector);\n const networkReconnectTileProps = useSelector(networkReconnectTileSelector);\n\n /* @conditional-compile-remove(dtmf-dialer) */\n const [dtmfDialerPresent, setDtmfDialerPresent] = useState<boolean>(false);\n\n const strings = useLocale().strings.call;\n\n // Reduce the controls shown when mobile view is enabled.\n const callControlOptions = mobileView ? reduceCallControlsForMobile(options?.callControls) : options?.callControls;\n\n const drawerMenuHostId = useId('drawerMenuHost');\n\n const onRenderGalleryContentTrampoline = (): JSX.Element => {\n /* @conditional-compile-remove(dtmf-dialer) */\n if (dtmfDialerPresent) {\n return (\n <DtmfDialpadPage\n mobileView={props.mobileView}\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n />\n );\n } else {\n return (\n <MediaGallery\n isMobile={mobileView}\n {...mediaGalleryProps}\n {...mediaGalleryHandlers}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions={options?.remoteVideoTileMenuOptions}\n drawerMenuHostId={drawerMenuHostId}\n /* @conditional-compile-remove(click-to-call) */\n localVideoTileOptions={options?.localVideoTile}\n /* @conditional-compile-remove(gallery-layouts) */\n userSetOverflowGalleryPosition={userSetOverflowGalleryPosition}\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout={galleryLayout}\n />\n );\n }\n return (\n <MediaGallery\n isMobile={mobileView}\n {...mediaGalleryProps}\n {...mediaGalleryHandlers}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions={options?.remoteVideoTileMenuOptions}\n drawerMenuHostId={drawerMenuHostId}\n /* @conditional-compile-remove(click-to-call) */\n localVideoTileOptions={options?.localVideoTile}\n /* @conditional-compile-remove(gallery-layouts) */\n userSetOverflowGalleryPosition={userSetOverflowGalleryPosition}\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout={galleryLayout}\n />\n );\n };\n\n return (\n <CallArrangement\n id={drawerMenuHostId}\n complianceBannerProps={{ ...complianceBannerProps, strings }}\n errorBarProps={options?.errorBar !== false && errorBarProps}\n mutedNotificationProps={mutedNotificationProps}\n callControlProps={{\n callInvitationURL: callInvitationURL,\n onFetchParticipantMenuItems: onFetchParticipantMenuItems,\n options: callControlOptions,\n increaseFlyoutItemSize: mobileView\n }}\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n mobileView={mobileView}\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() =>\n _isInCall(callStatus) ? (\n isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (\n onRenderGalleryContentTrampoline()\n ) : (\n <NetworkReconnectTile {...networkReconnectTileProps} />\n )\n ) : (\n <></>\n )\n }\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n onCloseChatPane={onCloseChatPane}\n dataUiId={'call-page'}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetOverflowGalleryPositionChange={onSetUserSetOverflowGalleryPosition}\n /* @conditional-compile-remove(gallery-layouts) */\n onUserSetGalleryLayoutChange={onUserSetGalleryLayoutChange}\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout={galleryLayout}\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n /* @conditional-compile-remove(dtmf-dialer) */\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n />\n );\n};\n\n/**\n * @private\n */\nexport const isNetworkHealthy = (value: DiagnosticQuality | boolean | undefined): boolean => {\n // We know that the value is actually of type DiagnosticQuality for this diagnostic.\n // We ignore any boolen values, considering the network to still be healthy.\n // Thus, only DiagnosticQuality.Poor or .Bad indicate network problems.\n return value === true || value === false || value === undefined || value === DiagnosticQuality.Good;\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.d.ts
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ActiveErrorMessage } from "../../../../../react-components/src";
|
3
|
+
import { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';
|
4
|
+
import { CallCompositeOptions } from '../CallComposite';
|
5
|
+
import { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';
|
6
|
+
import { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';
|
7
|
+
/**
|
8
|
+
* @internal
|
9
|
+
*/
|
10
|
+
export interface DialpadPageProps {
|
11
|
+
mobileView: boolean;
|
12
|
+
options?: CallCompositeOptions;
|
13
|
+
modalLayerHostId: string;
|
14
|
+
updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;
|
15
|
+
mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;
|
16
|
+
latestErrors: ActiveErrorMessage[];
|
17
|
+
onDismissError: (error: ActiveErrorMessage) => void;
|
18
|
+
capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;
|
19
|
+
onSetDialpadPage: () => void;
|
20
|
+
dtmfDialerPresent: boolean;
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* @internal
|
24
|
+
*/
|
25
|
+
export declare const DtmfDialpadPage: (props: DialpadPageProps) => JSX.Element;
|
26
|
+
//# sourceMappingURL=DtmfDialpadPage.d.ts.map
|
@@ -0,0 +1,59 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
5
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
6
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
7
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
8
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
9
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
10
|
+
});
|
11
|
+
};
|
12
|
+
import { Dialpad } from "../../../../../react-components/src";
|
13
|
+
import React, { useEffect, useRef, useState } from 'react';
|
14
|
+
import { useAdapter } from '../adapter/CallAdapterProvider';
|
15
|
+
import { Stack, Text, useTheme } from '@fluentui/react';
|
16
|
+
import { getReadableTime } from '../utils/timerUtils';
|
17
|
+
import { DtmfDialpadContentTimerStyles } from '../styles/DtmfDialpadPage.styles';
|
18
|
+
const DtmfDialpadPageContent = (props) => {
|
19
|
+
var _a, _b;
|
20
|
+
const { adapter } = props;
|
21
|
+
const adapterState = adapter.getState();
|
22
|
+
const theme = useTheme();
|
23
|
+
const calleeId = (_a = adapterState.targetCallees) === null || _a === void 0 ? void 0 : _a[0];
|
24
|
+
const remoteParticipants = (_b = adapterState.call) === null || _b === void 0 ? void 0 : _b.remoteParticipants;
|
25
|
+
let calleeName;
|
26
|
+
if (remoteParticipants) {
|
27
|
+
calleeName = Object.values(remoteParticipants).find((p) => p.identifier === calleeId);
|
28
|
+
}
|
29
|
+
return (React.createElement(Stack, { style: { height: '100%', width: '100%', background: theme.palette.white } },
|
30
|
+
React.createElement(Stack, { style: { margin: 'auto' } },
|
31
|
+
React.createElement(DtmfDialerContentTimer, null),
|
32
|
+
React.createElement(Text, null, calleeName !== 'Unnamed participant' ? calleeName : ''),
|
33
|
+
React.createElement(Dialpad, { onSendDtmfTone: (tone) => __awaiter(void 0, void 0, void 0, function* () {
|
34
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
35
|
+
yield adapter.sendDtmfTone(tone);
|
36
|
+
}), enableInputEditing: false }))));
|
37
|
+
};
|
38
|
+
const DtmfDialerContentTimer = () => {
|
39
|
+
const [time, setTime] = useState(0);
|
40
|
+
const elapsedTime = getReadableTime(time);
|
41
|
+
const startTime = useRef(performance.now());
|
42
|
+
useEffect(() => {
|
43
|
+
const interval = setInterval(() => {
|
44
|
+
setTime(performance.now() - startTime.current);
|
45
|
+
}, 10);
|
46
|
+
return () => {
|
47
|
+
clearInterval(interval);
|
48
|
+
};
|
49
|
+
}, [startTime]);
|
50
|
+
return React.createElement(Text, { styles: DtmfDialpadContentTimerStyles }, elapsedTime);
|
51
|
+
};
|
52
|
+
/**
|
53
|
+
* @internal
|
54
|
+
*/
|
55
|
+
export const DtmfDialpadPage = (props) => {
|
56
|
+
const adapter = useAdapter();
|
57
|
+
return React.createElement(DtmfDialpadPageContent, { adapter: adapter, mobileView: props.mobileView });
|
58
|
+
};
|
59
|
+
//# sourceMappingURL=DtmfDialpadPage.js.map
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DtmfDialpadPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAsB,OAAO,EAAY,4CAAmC;AAKnF,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAwBjF,MAAM,sBAAsB,GAAG,CAAC,KAA8B,EAAe,EAAE;;IAC7E,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IACxC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,MAAM,QAAQ,GAAG,MAAA,YAAY,CAAC,aAAa,0CAAG,CAAC,CAAC,CAAC;IACjD,MAAM,kBAAkB,GAAG,MAAA,YAAY,CAAC,IAAI,0CAAE,kBAAkB,CAAC;IACjE,IAAI,UAAU,CAAC;IAEf,IAAI,kBAAkB,EAAE,CAAC;QACvB,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,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,IAAI,IAAC,MAAM,EAAE,6BAA6B,IAAG,WAAW,CAAQ,CAAC;AAC3E,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAuB,EAAe,EAAE;IACtE,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,OAAO,oBAAC,sBAAsB,IAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,GAAI,CAAC;AACpF,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ActiveErrorMessage, Dialpad, DtmfTone } from '@internal/react-components';\nimport { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CommonCallAdapter } from '../adapter';\nimport { Stack, Text, useTheme } from '@fluentui/react';\nimport { getReadableTime } from '../utils/timerUtils';\nimport { DtmfDialpadContentTimerStyles } from '../styles/DtmfDialpadPage.styles';\n\n/**\n * @internal\n */\nexport interface DialpadPageProps {\n mobileView: boolean;\n options?: CallCompositeOptions;\n modalLayerHostId: string;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n onSetDialpadPage: () => void;\n dtmfDialerPresent: boolean;\n}\n\ninterface DialpadPageContentProps {\n mobileView: boolean;\n adapter: CommonCallAdapter;\n}\n\nconst DtmfDialpadPageContent = (props: DialpadPageContentProps): JSX.Element => {\n const { adapter } = props;\n const adapterState = adapter.getState();\n const theme = useTheme();\n\n const calleeId = adapterState.targetCallees?.[0];\n const remoteParticipants = adapterState.call?.remoteParticipants;\n let calleeName;\n\n if (remoteParticipants) {\n calleeName = Object.values(remoteParticipants).find((p) => p.identifier === calleeId);\n }\n\n return (\n <Stack style={{ height: '100%', width: '100%', background: theme.palette.white }}>\n <Stack style={{ margin: 'auto' }}>\n <DtmfDialerContentTimer />\n <Text>{calleeName !== 'Unnamed participant' ? calleeName : ''}</Text>\n <Dialpad\n onSendDtmfTone={async (tone: DtmfTone) => {\n /* @conditional-compile-remove(dtmf-dialer) */\n await adapter.sendDtmfTone(tone);\n }}\n enableInputEditing={false}\n ></Dialpad>\n </Stack>\n </Stack>\n );\n};\n\nconst DtmfDialerContentTimer = (): JSX.Element => {\n const [time, setTime] = useState<number>(0);\n const elapsedTime = getReadableTime(time);\n const startTime = useRef(performance.now());\n\n useEffect(() => {\n const interval = setInterval(() => {\n setTime(performance.now() - startTime.current);\n }, 10);\n return () => {\n clearInterval(interval);\n };\n }, [startTime]);\n\n return <Text styles={DtmfDialpadContentTimerStyles}>{elapsedTime}</Text>;\n};\n\n/**\n * @internal\n */\nexport const DtmfDialpadPage = (props: DialpadPageProps): JSX.Element => {\n const adapter = useAdapter();\n\n return <DtmfDialpadPageContent adapter={adapter} mobileView={props.mobileView} />;\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.js
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
import { _pxToRem } from "../../../../../acs-ui-common/src";
|
4
|
+
/**
|
5
|
+
* styles for hold pane timer
|
6
|
+
*
|
7
|
+
* @private
|
8
|
+
*/
|
9
|
+
export const DtmfDialpadContentTimerStyles = {
|
10
|
+
root: {
|
11
|
+
color: 'inherit',
|
12
|
+
fontWeight: 600,
|
13
|
+
fontSize: _pxToRem(20),
|
14
|
+
lineHeight: _pxToRem(28),
|
15
|
+
margin: 'auto'
|
16
|
+
}
|
17
|
+
};
|
18
|
+
//# sourceMappingURL=DtmfDialpadPage.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DtmfDialpadPage.styles.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,QAAQ,EAAE,yCAAgC;AAEnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAgB;IACxD,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,GAAG;QACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;QACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;QACxB,MAAM,EAAE,MAAM;KACf;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ITextStyles } from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\n\n/**\n * styles for hold pane timer\n *\n * @private\n */\nexport const DtmfDialpadContentTimerStyles: ITextStyles = {\n root: {\n color: 'inherit',\n fontWeight: 600,\n fontSize: _pxToRem(20),\n lineHeight: _pxToRem(28),\n margin: 'auto'\n }\n};\n"]}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* @internal
|
3
|
+
*/
|
4
|
+
export declare const getMinutes: (time: number) => number;
|
5
|
+
/**
|
6
|
+
* @internal
|
7
|
+
*/
|
8
|
+
export declare const getSeconds: (time: number) => number;
|
9
|
+
/**
|
10
|
+
* @internal
|
11
|
+
*/
|
12
|
+
export declare const getHours: (time: number) => number;
|
13
|
+
/**
|
14
|
+
* @internal
|
15
|
+
*/
|
16
|
+
export declare const getReadableTime: (time: number) => string;
|
17
|
+
//# sourceMappingURL=timerUtils.d.ts.map
|
@@ -0,0 +1,30 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
/**
|
4
|
+
* @internal
|
5
|
+
*/
|
6
|
+
export const getMinutes = (time) => {
|
7
|
+
return Math.floor(getSeconds(time) / 60);
|
8
|
+
};
|
9
|
+
/**
|
10
|
+
* @internal
|
11
|
+
*/
|
12
|
+
export const getSeconds = (time) => {
|
13
|
+
return Math.floor(time / 1000);
|
14
|
+
};
|
15
|
+
/**
|
16
|
+
* @internal
|
17
|
+
*/
|
18
|
+
export const getHours = (time) => {
|
19
|
+
return Math.floor(getMinutes(time) / 60);
|
20
|
+
};
|
21
|
+
/**
|
22
|
+
* @internal
|
23
|
+
*/
|
24
|
+
export const getReadableTime = (time) => {
|
25
|
+
const hours = getHours(time);
|
26
|
+
const readableMinutes = ('0' + (getMinutes(time) % 60)).slice(-2);
|
27
|
+
const readableSeconds = ('0' + (getSeconds(time) % 60)).slice(-2);
|
28
|
+
return `${hours > 0 ? hours + ':' : ''}${readableMinutes}:${readableSeconds}`;
|
29
|
+
};
|
30
|
+
//# sourceMappingURL=timerUtils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"timerUtils.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/utils/timerUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAU,EAAE;IACjD,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AAC3C,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAU,EAAE;IACjD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAU,EAAE;IAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AAC3C,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAY,EAAU,EAAE;IACtD,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7B,MAAM,eAAe,GAAG,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAClE,MAAM,eAAe,GAAG,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAClE,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,eAAe,IAAI,eAAe,EAAE,CAAC;AAChF,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * @internal\n */\nexport const getMinutes = (time: number): number => {\n return Math.floor(getSeconds(time) / 60);\n};\n\n/**\n * @internal\n */\nexport const getSeconds = (time: number): number => {\n return Math.floor(time / 1000);\n};\n\n/**\n * @internal\n */\nexport const getHours = (time: number): number => {\n return Math.floor(getMinutes(time) / 60);\n};\n\n/**\n * @internal\n */\nexport const getReadableTime = (time: number): string => {\n const hours = getHours(time);\n const readableMinutes = ('0' + (getMinutes(time) % 60)).slice(-2);\n const readableSeconds = ('0' + (getSeconds(time) % 60)).slice(-2);\n return `${hours > 0 ? hours + ':' : ''}${readableMinutes}:${readableSeconds}`;\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts
CHANGED
@@ -29,6 +29,8 @@ export interface CommonCallControlBarProps {
|
|
29
29
|
peopleButtonRef?: React.RefObject<IButton>;
|
30
30
|
cameraButtonRef?: React.RefObject<IButton>;
|
31
31
|
videoBackgroundPickerRef?: React.RefObject<IButton>;
|
32
|
+
onSetDialpadPage?: () => void;
|
33
|
+
dtmfDialerPresent?: boolean;
|
32
34
|
}
|
33
35
|
/**
|
34
36
|
* @private
|
package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js
CHANGED
@@ -28,6 +28,8 @@ import { Reaction } from '../../CallComposite/components/buttons/Reaction';
|
|
28
28
|
import { useSelector } from '../../CallComposite/hooks/useSelector';
|
29
29
|
/* @conditional-compile-remove(reaction) */
|
30
30
|
import { capabilitySelector } from '../../CallComposite/selectors/capabilitySelector';
|
31
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
32
|
+
import { DtmfDialpadButton } from './DtmfDialerButton';
|
31
33
|
const inferCommonCallControlOptions = (mobileView, commonCallControlOptions) => {
|
32
34
|
if (commonCallControlOptions === false) {
|
33
35
|
return false;
|
@@ -170,6 +172,12 @@ export const CommonCallControlBar = (props) => {
|
|
170
172
|
/* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall && (React.createElement(RaiseHand, { displayType: options.displayType, styles: commonButtonStyles,
|
171
173
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
172
174
|
disabled: props.disableButtonsForHoldScreen || isDisabled(options.microphoneButton) })),
|
175
|
+
/* @conditional-compile-remove(dtmf-dialer) */ showDtmfDialerButton(options) &&
|
176
|
+
props.onSetDialpadPage !== undefined && (React.createElement(DtmfDialpadButton, { styles: commonButtonStyles, displayType: options.displayType, onClick: () => {
|
177
|
+
if (props.onSetDialpadPage !== undefined) {
|
178
|
+
props.onSetDialpadPage();
|
179
|
+
}
|
180
|
+
} })),
|
173
181
|
screenShareButtonIsEnabled && (React.createElement(ScreenShare, { option: options.screenShareButton, displayType: options.displayType, styles: screenShareButtonStyles,
|
174
182
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
175
183
|
disabled: props.disableButtonsForHoldScreen || isDisabled(options.screenShareButton) })), (_b = customButtons['primary']) === null || _b === void 0 ? void 0 :
|
@@ -193,7 +201,11 @@ export const CommonCallControlBar = (props) => {
|
|
193
201
|
/* @conditional-compile-remove(gallery-layouts) */
|
194
202
|
onUserSetGalleryLayout: props.onUserSetGalleryLayout,
|
195
203
|
/* @conditional-compile-remove(gallery-layouts) */
|
196
|
-
userSetGalleryLayout: props.userSetGalleryLayout
|
204
|
+
userSetGalleryLayout: props.userSetGalleryLayout,
|
205
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
206
|
+
dtmfDialerPresent: props.dtmfDialerPresent,
|
207
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
208
|
+
onSetDialpadPage: props.onSetDialpadPage })),
|
197
209
|
React.createElement(EndCall, { displayType: "compact", styles: endCallButtonStyles }))))))),
|
198
210
|
!props.mobileView && sideButtonsPresent && (React.createElement(Stack.Item, null,
|
199
211
|
React.createElement("div", { ref: sidepaneControlsRef },
|
@@ -314,4 +326,13 @@ const getDesktopEndCallButtonStyles = (theme) => {
|
|
314
326
|
return concatStyleSets(getDesktopCommonButtonStyles(theme), overrides);
|
315
327
|
};
|
316
328
|
const isEnabled = (option) => option !== false;
|
329
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
330
|
+
const showDtmfDialerButton = (options) => {
|
331
|
+
if (options.moreButton === false && options.dtmfDialerButton !== false) {
|
332
|
+
return true;
|
333
|
+
}
|
334
|
+
else {
|
335
|
+
return false;
|
336
|
+
}
|
337
|
+
};
|
317
338
|
//# sourceMappingURL=CommonCallControlBar.js.map
|