@azure/communication-react 1.12.1-alpha-202401270011 → 1.12.1-alpha-202401280013

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.
Files changed (33) hide show
  1. package/dist/communication-react.d.ts +9 -2
  2. package/dist/dist-cjs/communication-react/index.js +74 -188
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/communication-react/src/index.d.ts +1 -1
  7. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +8 -2
  9. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +12 -5
  10. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/index.d.ts +1 -1
  12. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +4 -1
  14. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
  15. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +3 -34
  16. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  17. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +0 -35
  18. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  19. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +10 -4
  20. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
  21. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +4 -0
  22. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +4 -0
  23. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  24. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
  25. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +1 -1
  26. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
  27. package/package.json +1 -1
  28. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +0 -17
  29. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +0 -42
  30. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +0 -1
  31. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.d.ts +0 -11
  32. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +0 -40
  33. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +0 -1
@@ -6560,9 +6560,10 @@ export declare interface DialpadProps {
6560
6560
  */
6561
6561
  showDeleteButton?: boolean;
6562
6562
  /**
6563
- * flag to determine if dialpad is in mobile view, default false
6563
+ * Determines what kind of device that the user is on and should respect that based on interaction
6564
+ * interfaces available to the user
6564
6565
  */
6565
- isMobile?: boolean;
6566
+ longPressTrigger?: LongPressTrigger;
6566
6567
  /**
6567
6568
  * Styles for customizing the dialpad component
6568
6569
  */
@@ -7679,6 +7680,12 @@ export declare interface LocalVideoTileOptions {
7679
7680
  */
7680
7681
  export declare type LocalVideoTileSize = '9:16' | '16:9' | 'hidden' | 'followDeviceOrientation';
7681
7682
 
7683
+ /**
7684
+ * Modes of how the longpress handlers can be tiggered.
7685
+ * @beta
7686
+ */
7687
+ export declare type LongPressTrigger = 'mouseAndTouch' | 'touch';
7688
+
7682
7689
  /**
7683
7690
  * Payload for {@link DiagnosticChangedEventListner} where there is a change in a media diagnostic.
7684
7691
  *
@@ -173,7 +173,7 @@ function getDefaultExportFromCjs (x) {
173
173
  // Copyright (c) Microsoft Corporation.
174
174
  // Licensed under the MIT License.
175
175
  // GENERATED FILE. DO NOT EDIT MANUALLY.
176
- var telemetryVersion = '1.12.1-alpha-202401270011';
176
+ var telemetryVersion = '1.12.1-alpha-202401280013';
177
177
 
178
178
 
179
179
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -13169,8 +13169,11 @@ function useLongPress(props) {
13169
13169
  startPressTimer();
13170
13170
  }, [startPressTimer]);
13171
13171
  const handleOnTouchEnd = React.useCallback(() => {
13172
+ if (!isLongPress && onClick) {
13173
+ onClick();
13174
+ }
13172
13175
  timerRef.current && clearTimeout(timerRef.current);
13173
- }, []);
13176
+ }, [onClick, isLongPress]);
13174
13177
  const handleOnTouchMove = React.useCallback(() => {
13175
13178
  timerRef.current && clearTimeout(timerRef.current);
13176
13179
  }, []);
@@ -18379,7 +18382,7 @@ const DtmfTones = [
18379
18382
  const DialpadButton = (props) => {
18380
18383
  var _a, _b, _c, _d;
18381
18384
  const theme = react.useTheme();
18382
- const { digit, index, onClick, onLongPress, isMobile = false, dtmfToneAudioContext, disableDtmfPlayback } = props;
18385
+ const { digit, index, onClick, onLongPress, longPressTrigger, dtmfToneAudioContext, disableDtmfPlayback } = props;
18383
18386
  const [buttonPressed, setButtonPressed] = React.useState(false);
18384
18387
  const dtmfToneSound = React.useRef(new Tone(dtmfToneAudioContext, dtmfFrequencies[digit].f1, dtmfFrequencies[digit].f2));
18385
18388
  const useLongPressProps = React.useMemo(() => ({
@@ -18389,8 +18392,8 @@ const DialpadButton = (props) => {
18389
18392
  onLongPress: () => __awaiter$u(void 0, void 0, void 0, function* () {
18390
18393
  onLongPress(digit, index);
18391
18394
  }),
18392
- touchEventsOnly: isMobile
18393
- }), [digit, index, isMobile, onClick, onLongPress]);
18395
+ touchEventsOnly: longPressTrigger === 'touch'
18396
+ }), [digit, index, longPressTrigger, onClick, onLongPress]);
18394
18397
  const longPressHandlers = useLongPress(useLongPressProps);
18395
18398
  return (React.createElement(react.DefaultButton, Object.assign({ "data-test-id": `dialpad-button-${props.index}`, styles: react.concatStyleSets(buttonStyles$1(), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.button) }, longPressHandlers, { onKeyDown: (e) => {
18396
18399
  if ((e.key === 'Enter' || e.key === ' ') && !buttonPressed) {
@@ -18401,6 +18404,13 @@ const DialpadButton = (props) => {
18401
18404
  setButtonPressed(true);
18402
18405
  return;
18403
18406
  }
18407
+ if (e.key === 'Tab' ||
18408
+ e.key === 'ArrowLeft' ||
18409
+ e.key === 'ArrowRight' ||
18410
+ e.key === 'ArrowUp' ||
18411
+ e.key === 'ArrowDown') {
18412
+ dtmfToneSound.current.stop();
18413
+ }
18404
18414
  longPressHandlers.onKeyDown();
18405
18415
  }, onKeyUp: (e) => {
18406
18416
  if ((e.key === 'Enter' || e.key === ' ') && buttonPressed) {
@@ -18435,7 +18445,7 @@ const DialpadButton = (props) => {
18435
18445
  const DialpadContainer = (props) => {
18436
18446
  var _a, _b;
18437
18447
  const theme = react.useTheme();
18438
- const { onSendDtmfTone, onClickDialpadButton, textFieldValue, onChange, showDeleteButton = true, isMobile = false, disableDtmfPlayback, dialpadMode = 'dialer' } = props;
18448
+ const { onSendDtmfTone, onClickDialpadButton, textFieldValue, onChange, showDeleteButton = true, longPressTrigger = 'mouseAndTouch', disableDtmfPlayback, dialpadMode = 'dialer' } = props;
18439
18449
  const dtmfToneAudioContext = React.useRef(new AudioContext());
18440
18450
  const [plainTextValue, setPlainTextValue] = React.useState(textFieldValue !== null && textFieldValue !== void 0 ? textFieldValue : '');
18441
18451
  const plainTextValuePreviousRenderValue = React.useRef(plainTextValue);
@@ -18511,7 +18521,7 @@ const DialpadContainer = (props) => {
18511
18521
  then use this index to locate the corresponding dtmf tones
18512
18522
  DtmfTones[index]
18513
18523
  */
18514
- index: columnIndex + rowIndex * rows.length, digit: button.digit, letter: button.letter, styles: props.styles, onClick: onClickDialpad, onLongPress: onLongPressDialpad, isMobile: isMobile, dtmfToneAudioContext: dtmfToneAudioContext.current, disableDtmfPlayback: disableDtmfPlayback })))));
18524
+ index: columnIndex + rowIndex * rows.length, digit: button.digit, letter: button.letter, styles: props.styles, onClick: onClickDialpad, onLongPress: onLongPressDialpad, longPressTrigger: longPressTrigger, dtmfToneAudioContext: dtmfToneAudioContext.current, disableDtmfPlayback: disableDtmfPlayback })))));
18515
18525
  }))));
18516
18526
  };
18517
18527
  /**
@@ -25906,6 +25916,10 @@ const getLatestCapabilitiesChangedInfo = (state) => {
25906
25916
  * @private
25907
25917
  */
25908
25918
  const getTargetCallees = (state) => state.targetCallees;
25919
+ /**
25920
+ * @private
25921
+ */
25922
+ const getStartTime = (state) => { var _a; return (_a = state.call) === null || _a === void 0 ? void 0 : _a.startTime; };
25909
25923
 
25910
25924
  // Copyright (c) Microsoft Corporation.
25911
25925
  // Licensed under the MIT License.
@@ -26018,122 +26032,6 @@ const People = (props) => {
26018
26032
  return (React.createElement(ControlBarButton, Object.assign({}, props, { "data-ui-id": "call-composite-participants-button", strings: strings, labelKey: 'peopleButtonLabelKey', onRenderOnIcon: onRenderOnIcon !== null && onRenderOnIcon !== void 0 ? onRenderOnIcon : icon$2, onRenderOffIcon: onRenderOffIcon !== null && onRenderOffIcon !== void 0 ? onRenderOffIcon : icon$2, onClick: onClick, styles: styles })));
26019
26033
  };
26020
26034
 
26021
- // Copyright (c) Microsoft Corporation.
26022
- // Licensed under the MIT License.
26023
- /**
26024
- * @private
26025
- */
26026
- const themeddialpadModalStyle$1 = (theme) => ({
26027
- main: {
26028
- borderRadius: theme.effects.roundedCorner6,
26029
- padding: '1rem'
26030
- }
26031
- });
26032
- /**
26033
- * @private
26034
- */
26035
- const themedDialpadStyle$1 = (isMobile, theme) => ({
26036
- root: {
26037
- padding: 0,
26038
- marginLeft: 0,
26039
- marginRight: 0,
26040
- maxWidth: '100%'
26041
- },
26042
- textField: {
26043
- root: {
26044
- borderBottom: `1px solid ${theme.palette.neutralTertiaryAlt}`
26045
- },
26046
- field: {
26047
- backgroundColor: theme.palette.white,
26048
- fontSize: theme.fonts.large.fontSize,
26049
- padding: '0 0.5rem ',
26050
- textAlign: 'center',
26051
- ':active': {
26052
- padding: '0 0.5rem'
26053
- }
26054
- }
26055
- },
26056
- digit: {
26057
- color: theme.palette.themeDarkAlt
26058
- }
26059
- });
26060
-
26061
- // Copyright (c) Microsoft Corporation.
26062
- // Licensed under the MIT License.
26063
- const DEFAULT_Z_INDEX = 1;
26064
- const mainScreenContainerStyle = {
26065
- height: '100%',
26066
- width: '100%'
26067
- };
26068
- /**
26069
- * @private
26070
- */
26071
- const mainScreenContainerStyleDesktop = react.mergeStyles(Object.assign(Object.assign({}, mainScreenContainerStyle), { minWidth: '30rem', minHeight: '22rem' // max height of min-height of composite pages (Configuration page)
26072
- }));
26073
- /**
26074
- * @private
26075
- */
26076
- const mainScreenContainerStyleMobile = react.mergeStyles(Object.assign(Object.assign({}, mainScreenContainerStyle), { minWidth: '17.5rem', minHeight: '13rem' // max height of min-height of composite pages (Configuration page & Call page)
26077
- }));
26078
- /**
26079
- * @private
26080
- * Drawer styles to be used to house the _DrawerComponent on top of other content on the screen.
26081
- * @param zIndex: this defaults to DEFAULT_Z_INDEX if unset
26082
- */
26083
- const drawerContainerStyles = (zIndex = DEFAULT_Z_INDEX) => ({
26084
- root: {
26085
- position: 'absolute',
26086
- top: 0,
26087
- left: 0,
26088
- width: '100%',
26089
- height: '100%',
26090
- // Any zIndex > 0 will work because this is the only absolutely
26091
- // positioned element in the container.
26092
- zIndex: zIndex
26093
- }
26094
- });
26095
- /**
26096
- * @private
26097
- * Page container style for leaving page
26098
- */
26099
- const leavingPageStyle = (palette) => ({
26100
- background: palette.neutralLighterAlt
26101
- });
26102
-
26103
- // Copyright (c) Microsoft Corporation.
26104
- // Licensed under the MIT License.
26105
- /** @private */
26106
- const SendDtmfDialpad = (props) => {
26107
- const dialpadProps = usePropsFor$1(Dialpad);
26108
- const { strings, isMobile, showDialpad, onDismissDialpad } = props;
26109
- const theme = react.useTheme();
26110
- const onDismissTriggered = () => {
26111
- onDismissDialpad();
26112
- };
26113
- const [textFieldValue, setTextFieldValue] = React.useState();
26114
- const onChange = (input) => {
26115
- if (input.length > 25) {
26116
- setTextFieldValue(input.slice(1));
26117
- }
26118
- else {
26119
- setTextFieldValue(input);
26120
- }
26121
- };
26122
- const dialpadModalStyle = React.useMemo(() => themeddialpadModalStyle$1(theme), [theme]);
26123
- const dialpadStyle = React.useMemo(() => themedDialpadStyle$1(isMobile, theme), [theme, isMobile]);
26124
- if (isMobile) {
26125
- return (React.createElement(react.Stack, null, showDialpad && (React.createElement(react.Stack, { styles: drawerContainerStyles() },
26126
- React.createElement(_DrawerSurface, { disableMaxHeight: true, onLightDismiss: onDismissTriggered },
26127
- React.createElement(react.Stack, { style: { padding: '1rem' } },
26128
- React.createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false, textFieldValue: textFieldValue, onChange: onChange, strings: strings, isMobile: isMobile }))))))));
26129
- }
26130
- return (React.createElement(React.Fragment, null, React.createElement(react.Modal, { titleAriaId: strings.dialpadModalAriaLabel, isOpen: showDialpad, onDismiss: onDismissTriggered, isBlocking: true, styles: dialpadModalStyle },
26131
- React.createElement(react.Stack, { horizontal: true, horizontalAlign: "end", verticalAlign: "center" },
26132
- React.createElement(react.IconButton, { iconProps: { iconName: 'Cancel' }, ariaLabel: strings.dialpadCloseModalButtonAriaLabel, onClick: onDismissTriggered, style: { color: theme.palette.black } })),
26133
- React.createElement(react.Stack, { style: { overflow: 'hidden' } },
26134
- React.createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { textFieldValue: textFieldValue, onChange: onChange, showDeleteButton: false, strings: strings, isMobile: isMobile }))))));
26135
- };
26136
-
26137
26035
  // Copyright (c) Microsoft Corporation.
26138
26036
  // Licensed under the MIT License.
26139
26037
  /** @private */
@@ -26396,12 +26294,6 @@ const CallControls = (props) => {
26396
26294
  label: localeStrings.strings.call.moreButtonCallingLabel,
26397
26295
  tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip
26398
26296
  }), [localeStrings]);
26399
- /* @conditional-compile-remove(PSTN-calls) */
26400
- const dialpadStrings = React.useMemo(() => ({
26401
- dialpadModalAriaLabel: localeStrings.strings.call.dialpadModalAriaLabel,
26402
- dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel,
26403
- placeholderText: localeStrings.strings.call.dtmfDialpadPlaceholderText
26404
- }), [localeStrings]);
26405
26297
  /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
26406
26298
  const holdButtonProps = usePropsFor$1(HoldButton);
26407
26299
  /* @conditional-compile-remove(raise-hand) */
@@ -26410,8 +26302,6 @@ const CallControls = (props) => {
26410
26302
  const capabilitiesSelector = useSelector$1(capabilitySelector);
26411
26303
  /* @conditional-compile-remove(reaction) */
26412
26304
  const isReactionAllowed = !(capabilitiesSelector === null || capabilitiesSelector === void 0 ? void 0 : capabilitiesSelector.capabilities) || capabilitiesSelector.capabilities.useReactions.isPresent;
26413
- /* @conditional-compile-remove(PSTN-calls) */
26414
- const alternateCallerId = useAdapter().getState().alternateCallerId;
26415
26305
  const devicesButtonProps = usePropsFor$1(DevicesButton);
26416
26306
  let numberOfButtons = 0;
26417
26307
  const screenShareButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.screenShareButton);
@@ -26476,21 +26366,6 @@ const CallControls = (props) => {
26476
26366
  ['data-ui-id']: 'hold-button'
26477
26367
  });
26478
26368
  }
26479
- /* @conditional-compile-remove(PSTN-calls) */
26480
- // dtmf tone sending only works for 1:1 PSTN call
26481
- if (alternateCallerId) {
26482
- items.push({
26483
- key: 'showDialpadKey',
26484
- text: localeStrings.strings.call.openDtmfDialpadLabel,
26485
- onClick: () => {
26486
- setShowDialpad(true);
26487
- },
26488
- iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },
26489
- itemProps: {
26490
- styles: buttonFlyoutIncreasedSizeStyles
26491
- }
26492
- });
26493
- }
26494
26369
  return items;
26495
26370
  };
26496
26371
  const customDrawerButtons = React.useMemo(() => generateCustomCallDesktopOverflowButtons(onFetchCustomButtonPropsTrampoline(typeof options === 'object' ? options : undefined), typeof options === 'object' ? options.displayType : undefined), [options]);
@@ -26587,20 +26462,12 @@ const CallControls = (props) => {
26587
26462
  } }, element));
26588
26463
  });
26589
26464
  }
26590
- /* @conditional-compile-remove(PSTN-calls) */
26591
- const [showDialpad, setShowDialpad] = React.useState(false);
26592
26465
  const theme = react.useTheme();
26593
26466
  // when props.options is false then we want to hide the whole control bar.
26594
26467
  if (props.options === false) {
26595
26468
  return React.createElement(React.Fragment, null);
26596
26469
  }
26597
- /* @conditional-compile-remove(PSTN-calls) */
26598
- const onDismissDialpad = () => {
26599
- setShowDialpad(false);
26600
- };
26601
26470
  return (React.createElement(react.Stack, { horizontalAlign: "center", className: callControlsContainerStyles },
26602
- /* @conditional-compile-remove(PSTN-calls) */
26603
- React.createElement(SendDtmfDialpad, { isMobile: !!props.isMobile, strings: dialpadStrings, showDialpad: showDialpad, onDismissDialpad: onDismissDialpad }),
26604
26471
  React.createElement(react.Stack.Item, null,
26605
26472
  React.createElement(ControlBar, { layout: props.displayVertical ? 'vertical' : 'horizontal', styles: controlBarStyles(theme.semanticColors.bodyBackground) },
26606
26473
  microphoneButtonIsEnabled && (React.createElement(Microphone, { displayType: options === null || options === void 0 ? void 0 : options.displayType, disabled: isDisabled$4(options === null || options === void 0 ? void 0 : options.microphoneButton) })),
@@ -28058,6 +27925,48 @@ const PreparedMoreDrawer = (props) => {
28058
27925
  return React.createElement(MoreDrawer, Object.assign({}, props, deviceProps, callHandlers, { strings: moreDrawerStrings }));
28059
27926
  };
28060
27927
 
27928
+ // Copyright (c) Microsoft Corporation.
27929
+ // Licensed under the MIT License.
27930
+ const DEFAULT_Z_INDEX = 1;
27931
+ const mainScreenContainerStyle = {
27932
+ height: '100%',
27933
+ width: '100%'
27934
+ };
27935
+ /**
27936
+ * @private
27937
+ */
27938
+ const mainScreenContainerStyleDesktop = react.mergeStyles(Object.assign(Object.assign({}, mainScreenContainerStyle), { minWidth: '30rem', minHeight: '22rem' // max height of min-height of composite pages (Configuration page)
27939
+ }));
27940
+ /**
27941
+ * @private
27942
+ */
27943
+ const mainScreenContainerStyleMobile = react.mergeStyles(Object.assign(Object.assign({}, mainScreenContainerStyle), { minWidth: '17.5rem', minHeight: '13rem' // max height of min-height of composite pages (Configuration page & Call page)
27944
+ }));
27945
+ /**
27946
+ * @private
27947
+ * Drawer styles to be used to house the _DrawerComponent on top of other content on the screen.
27948
+ * @param zIndex: this defaults to DEFAULT_Z_INDEX if unset
27949
+ */
27950
+ const drawerContainerStyles = (zIndex = DEFAULT_Z_INDEX) => ({
27951
+ root: {
27952
+ position: 'absolute',
27953
+ top: 0,
27954
+ left: 0,
27955
+ width: '100%',
27956
+ height: '100%',
27957
+ // Any zIndex > 0 will work because this is the only absolutely
27958
+ // positioned element in the container.
27959
+ zIndex: zIndex
27960
+ }
27961
+ });
27962
+ /**
27963
+ * @private
27964
+ * Page container style for leaving page
27965
+ */
27966
+ const leavingPageStyle = (palette) => ({
27967
+ background: palette.neutralLighterAlt
27968
+ });
27969
+
28061
27970
  // Copyright (c) Microsoft Corporation.
28062
27971
  // Licensed under the MIT License.
28063
27972
  const SIDE_PANE_PADDING_LR_REM = 0.25;
@@ -28515,7 +28424,7 @@ const CallingDialpad = (props) => {
28515
28424
  const callButtonStyle = React.useMemo(() => themedCallButtonStyle(theme), [theme]);
28516
28425
  const dialpadComponent = () => {
28517
28426
  return (React.createElement(React.Fragment, null,
28518
- React.createElement(Dialpad, { styles: dialpadStyle, onChange: setTextFieldInput, isMobile: isMobile }),
28427
+ React.createElement(Dialpad, { styles: dialpadStyle, onChange: setTextFieldInput, longPressTrigger: isMobile ? 'touch' : 'mouseAndTouch' }),
28519
28428
  React.createElement(react.PrimaryButton, { text: strings.dialpadStartCallButtonLabel, onRenderIcon: () => DialpadStartCallIconTrampoline(), onClick: onClickCall, styles: callButtonStyle, disabled: textFieldInput === '' })));
28520
28429
  };
28521
28430
  if (isMobile) {
@@ -29486,7 +29395,7 @@ const messageBarStyles = {
29486
29395
  * @private
29487
29396
  */
29488
29397
  const CallArrangement = (props) => {
29489
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
29398
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
29490
29399
  const containerClassName = React.useMemo(() => {
29491
29400
  return props.mobileView ? containerStyleMobile : containerStyleDesktop;
29492
29401
  }, [props.mobileView]);
@@ -29562,14 +29471,6 @@ const CallArrangement = (props) => {
29562
29471
  position: 'relative'
29563
29472
  };
29564
29473
  }, [isMobileWithActivePane, props.mobileView]);
29565
- /* @conditional-compile-remove(PSTN-calls) */
29566
- const callWithChatStrings = useCallWithChatCompositeStrings();
29567
- /* @conditional-compile-remove(PSTN-calls) */
29568
- const dialpadStrings = React.useMemo(() => ({
29569
- dialpadModalAriaLabel: callWithChatStrings.dialpadModalAriaLabel,
29570
- dialpadCloseModalButtonAriaLabel: callWithChatStrings.dialpadCloseModalButtonAriaLabel,
29571
- placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText
29572
- }), [callWithChatStrings]);
29573
29474
  /* @conditional-compile-remove(video-background-effects) */
29574
29475
  const onResolveVideoEffectDependency = adapter.getState().onResolveVideoEffectDependency;
29575
29476
  /* @conditional-compile-remove(video-background-effects) */
@@ -29585,18 +29486,6 @@ const CallArrangement = (props) => {
29585
29486
  setShowDrawer(false);
29586
29487
  togglePeoplePane();
29587
29488
  }, [togglePeoplePane]);
29588
- /* @conditional-compile-remove(PSTN-calls) */
29589
- const alternateCallerId = useAdapter().getState().alternateCallerId;
29590
- /* @conditional-compile-remove(PSTN-calls) */
29591
- const [showDtmfDialpad, setShowDtmfDialpad] = React.useState(false);
29592
- /* @conditional-compile-remove(PSTN-calls) */
29593
- const onDismissDtmfDialpad = () => {
29594
- setShowDtmfDialpad(false);
29595
- };
29596
- /* @conditional-compile-remove(PSTN-calls) */
29597
- const onClickShowDialpad = () => {
29598
- setShowDtmfDialpad(true);
29599
- };
29600
29489
  const drawerContainerStylesValue = React.useMemo(() => drawerContainerStyles(DRAWER_Z_INDEX), []);
29601
29490
  /* @conditional-compile-remove(rooms) */
29602
29491
  const role = (_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.role;
@@ -29649,9 +29538,7 @@ const CallArrangement = (props) => {
29649
29538
  /* @conditional-compile-remove(close-captions) */
29650
29539
  isCaptionsOn: isCaptionsOn,
29651
29540
  /* @conditional-compile-remove(video-background-effects) */
29652
- onClickVideoEffects: onResolveVideoEffectDependency ? openVideoEffectsPane : undefined,
29653
- /* @conditional-compile-remove(PSTN-calls) */
29654
- onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined, displayVertical: verticalControlBar,
29541
+ onClickVideoEffects: onResolveVideoEffectDependency ? openVideoEffectsPane : undefined, displayVertical: verticalControlBar,
29655
29542
  /* @conditional-compile-remove(gallery-layouts) */
29656
29543
  onUserSetOverflowGalleryPositionChange: props.onUserSetOverflowGalleryPositionChange,
29657
29544
  /* @conditional-compile-remove(gallery-layouts) */
@@ -29664,8 +29551,6 @@ const CallArrangement = (props) => {
29664
29551
  dtmfDialerPresent: props.dtmfDialerPresent, peopleButtonRef: peopleButtonRef, cameraButtonRef: cameraButtonRef }))))),
29665
29552
  ((_g = props.callControlProps) === null || _g === void 0 ? void 0 : _g.options) !== false && showDrawer && (React.createElement(react.Stack, { styles: drawerContainerStylesValue },
29666
29553
  React.createElement(PreparedMoreDrawer, { callControls: props.callControlProps.options, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
29667
- /* @conditional-compile-remove(PSTN-calls) */
29668
- onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
29669
29554
  /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
29670
29555
  disableButtonsForHoldScreen: isInLocalHold,
29671
29556
  /* @conditional-compile-remove(close-captions) */
@@ -29678,9 +29563,6 @@ const CallArrangement = (props) => {
29678
29563
  onSetDialpadPage: props.onSetDialpadPage,
29679
29564
  /* @conditional-compile-remove(dtmf-dialer) */
29680
29565
  dtmfDialerPresent: props.dtmfDialerPresent }))),
29681
- /* @conditional-compile-remove(PSTN-calls) */
29682
- ((_h = props.callControlProps) === null || _h === void 0 ? void 0 : _h.options) !== false && showDtmfDialpad && (React.createElement(react.Stack, { styles: drawerContainerStylesValue },
29683
- React.createElement(SendDtmfDialpad, { isMobile: props.mobileView, strings: dialpadStrings, showDialpad: showDtmfDialpad, onDismissDialpad: onDismissDtmfDialpad }))),
29684
29566
  React.createElement(react.Stack, { horizontal: true, grow: true },
29685
29567
  React.createElement(react.Stack.Item, { style: callCompositeContainerCSS },
29686
29568
  React.createElement(react.Stack.Item, { styles: callGalleryStyles, grow: true },
@@ -29703,7 +29585,7 @@ const CallArrangement = (props) => {
29703
29585
  maxWidth: isVideoPaneOpen ? `${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem` : undefined, minWidth: isVideoPaneOpen ? `${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem` : undefined, updateSidePaneRenderer: props.updateSidePaneRenderer, onPeopleButtonClicked: props.mobileView && !shouldShowPeopleTabHeaderButton(props.callControlProps.options)
29704
29586
  ? undefined
29705
29587
  : togglePeoplePane, disablePeopleButton: typeof props.callControlProps.options !== 'boolean' &&
29706
- isDisabled$4((_j = props.callControlProps.options) === null || _j === void 0 ? void 0 : _j.participantsButton), onChatButtonClicked: (_k = props.mobileChatTabHeader) === null || _k === void 0 ? void 0 : _k.onClick, disableChatButton: (_l = props.mobileChatTabHeader) === null || _l === void 0 ? void 0 : _l.disabled }),
29588
+ isDisabled$4((_h = props.callControlProps.options) === null || _h === void 0 ? void 0 : _h.participantsButton), onChatButtonClicked: (_j = props.mobileChatTabHeader) === null || _j === void 0 ? void 0 : _j.onClick, disableChatButton: (_k = props.mobileChatTabHeader) === null || _k === void 0 ? void 0 : _k.disabled }),
29707
29589
  props.mobileView && (React.createElement(ModalLocalAndRemotePIP, { modalLayerHostId: props.modalLayerHostId, hidden: !isSidePaneOpen, styles: pipStyles, strings: modalStrings, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition, onDismissSidePane: () => {
29708
29590
  closePeoplePane();
29709
29591
  if (props.onCloseChatPane) {
@@ -30119,15 +30001,19 @@ const DtmfDialpadPageContent = (props) => {
30119
30001
  React.createElement(Dialpad, { onSendDtmfTone: (tone) => __awaiter$b(void 0, void 0, void 0, function* () {
30120
30002
  /* @conditional-compile-remove(dtmf-dialer) */
30121
30003
  yield adapter.sendDtmfTone(tone);
30122
- }), dialpadMode: 'dtmf' }))));
30004
+ }), longPressTrigger: props.mobileView ? 'touch' : 'mouseAndTouch', dialpadMode: 'dtmf' }))));
30123
30005
  };
30124
30006
  const DtmfDialerContentTimer = () => {
30125
30007
  const [time, setTime] = React.useState(0);
30126
30008
  const elapsedTime = getReadableTime$1(time);
30127
- const startTime = React.useRef(performance.now());
30009
+ const statefulStartTime = useSelector$1(getStartTime);
30010
+ const startTime = React.useMemo(() => {
30011
+ return statefulStartTime !== null && statefulStartTime !== void 0 ? statefulStartTime : new Date(Date.now());
30012
+ }, [statefulStartTime]);
30128
30013
  React.useEffect(() => {
30129
30014
  const interval = setInterval(() => {
30130
- setTime(performance.now() - startTime.current);
30015
+ var _a;
30016
+ setTime((_a = new Date(Date.now()).getTime() - (startTime === null || startTime === void 0 ? void 0 : startTime.getTime())) !== null && _a !== void 0 ? _a : 0);
30131
30017
  }, 10);
30132
30018
  return () => {
30133
30019
  clearInterval(interval);