@azure/communication-react 1.4.2-alpha-202211220015.0 → 1.4.2-alpha-202211240014.0

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 (74) hide show
  1. package/dist/communication-react.d.ts +188 -27
  2. package/dist/dist-cjs/communication-react/index.js +251 -89
  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/calling-component-bindings/src/index.d.ts +1 -0
  7. package/dist/dist-esm/calling-component-bindings/src/index.js +2 -0
  8. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +7 -0
  10. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +12 -0
  11. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  12. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +5 -0
  13. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  14. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -0
  15. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +7 -0
  16. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  17. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +19 -0
  18. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +10 -0
  20. package/dist/dist-esm/react-components/src/components/ErrorBar.js +5 -2
  21. package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
  22. package/dist/dist-esm/react-components/src/components/MessageThread.js +7 -11
  23. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  24. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.js +1 -2
  25. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -1
  27. package/dist/dist-esm/react-components/src/components/utils.js +5 -1
  28. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +2 -2
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +5 -6
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +45 -12
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +141 -46
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +135 -27
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapterProvider.d.ts +3 -3
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapterProvider.js.map +1 -1
  39. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/DiagnosticsForwarder.d.ts +2 -2
  40. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/DiagnosticsForwarder.js.map +1 -1
  41. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +15 -0
  42. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +23 -0
  43. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -0
  44. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +4 -1
  45. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +2 -0
  46. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  47. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.d.ts +2 -2
  48. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +1 -1
  49. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.d.ts +2 -2
  50. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  51. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +8 -1
  52. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +3 -1
  53. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  54. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +3 -1
  55. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  56. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +3 -1
  57. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  58. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +3 -1
  59. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  60. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +8 -1
  61. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +1 -1
  62. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +5 -0
  63. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +5 -0
  64. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  65. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +8 -1
  66. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +8 -4
  67. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  68. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -1
  69. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +10 -5
  70. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  71. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +3 -0
  72. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +3 -1
  73. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  74. package/package.json +8 -8
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var communicationCommon = require('@azure/communication-common');
6
6
  var reselect = require('reselect');
7
- var memoizeOne = require('memoize-one');
8
7
  var communicationCalling = require('@azure/communication-calling');
8
+ var memoizeOne = require('memoize-one');
9
9
  var logger = require('@azure/logger');
10
10
  var EventEmitter = require('events');
11
11
  var produce = require('immer');
@@ -202,7 +202,7 @@ const _toCommunicationIdentifier = (id) => {
202
202
  // Copyright (c) Microsoft Corporation.
203
203
  // Licensed under the MIT license.
204
204
  // GENERATED FILE. DO NOT EDIT MANUALLY.
205
- var telemetryVersion = '1.4.2-alpha-202211220015.0';
205
+ var telemetryVersion = '1.4.2-alpha-202211240014.0';
206
206
 
207
207
  // Copyright (c) Microsoft Corporation.
208
208
  /**
@@ -1239,6 +1239,7 @@ class CallContext$2 {
1239
1239
  },
1240
1240
  callAgent: undefined,
1241
1241
  userId: userId,
1242
+ /* @conditional-compile-remove(unsupported-browser) */ environmentInfo: undefined,
1242
1243
  /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId: alternateCallerId,
1243
1244
  latestErrors: {}
1244
1245
  };
@@ -1348,6 +1349,12 @@ class CallContext$2 {
1348
1349
  }
1349
1350
  });
1350
1351
  }
1352
+ /* @conditional-compile-remove(unsupported-browser) */
1353
+ setEnvironmentInfo(envInfo) {
1354
+ this.modifyState((draft) => {
1355
+ draft.environmentInfo = envInfo;
1356
+ });
1357
+ }
1351
1358
  setCallIsScreenSharingOn(callId, isScreenSharingOn) {
1352
1359
  this.modifyState((draft) => {
1353
1360
  const call = draft.calls[this._callIdHistory.latestCallId(callId)];
@@ -3625,6 +3632,23 @@ class ProxyCallClient {
3625
3632
  return this._deviceManager;
3626
3633
  }), 'CallClient.getDeviceManager');
3627
3634
  }
3635
+ case 'feature': {
3636
+ /* @conditional-compile-remove(unsupported-browser) */
3637
+ return this._context.withErrorTeedToState((...args) => {
3638
+ if (args[0] === communicationCalling.Features.DebugInfo) {
3639
+ const feature = target.feature(communicationCalling.Features.DebugInfo);
3640
+ /**
3641
+ * add to this object if we want to proxy anything else off the DebugInfo feature object.
3642
+ */
3643
+ return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$p(this, void 0, void 0, function* () {
3644
+ const environmentInfo = yield feature.getEnvironmentInfo();
3645
+ this._context.setEnvironmentInfo(environmentInfo);
3646
+ return environmentInfo;
3647
+ }) });
3648
+ }
3649
+ return Reflect.get(target, prop);
3650
+ }, 'CallClient.feature');
3651
+ }
3628
3652
  default:
3629
3653
  return Reflect.get(target, prop);
3630
3654
  }
@@ -4309,12 +4333,16 @@ const dropDismissalsForInactiveErrors = (activeErrorMessages, dismissedErrors) =
4309
4333
  * @param dismissedErrors
4310
4334
  * @returns ActiveErrorMessage[]
4311
4335
  */
4312
- const errorsToShow = (activeErrorMessages, dismissedErrors) => {
4336
+ const errorsToShow = (activeErrorMessages, dismissedErrors, mountTimestamp) => {
4313
4337
  const dismissed = new Map();
4314
4338
  for (const error of dismissedErrors) {
4315
4339
  dismissed.set(error.type, error);
4316
4340
  }
4317
4341
  return activeErrorMessages.filter((error) => {
4342
+ if (mountTimestamp && error.timestamp && mountTimestamp > error.timestamp) {
4343
+ // Error has a timestamp and it is older than when the component was mounted.
4344
+ return false;
4345
+ }
4318
4346
  const dismissal = dismissed.get(error.type);
4319
4347
  if (!dismissal) {
4320
4348
  // This error was never dismissed.
@@ -4423,11 +4451,14 @@ const ErrorBar = (props) => {
4423
4451
  var _a;
4424
4452
  const localeStrings = useLocale$1().strings.errorBar;
4425
4453
  const strings = (_a = props.strings) !== null && _a !== void 0 ? _a : localeStrings;
4454
+ // Timestamp for when this comopnent is first mounted.
4455
+ // Never updated through the lifecycle of this component.
4456
+ const mountTimestamp = React.useRef(new Date(Date.now()));
4426
4457
  const [dismissedErrors, setDismissedErrors] = React.useState([]);
4427
4458
  // dropDismissalsForInactiveErrors only returns a new object if `dismissedErrors` actually changes.
4428
4459
  // Without this behaviour, this `useEffect` block would cause a render loop.
4429
4460
  React.useEffect(() => setDismissedErrors(dropDismissalsForInactiveErrors(props.activeErrorMessages, dismissedErrors)), [props.activeErrorMessages, dismissedErrors]);
4430
- const toShow = errorsToShow(props.activeErrorMessages, dismissedErrors);
4461
+ const toShow = errorsToShow(props.activeErrorMessages, dismissedErrors, props.ignorePremountErrors ? mountTimestamp.current : undefined);
4431
4462
  return (React__default['default'].createElement(react.Stack, { "data-ui-id": "error-bar-stack" }, toShow.map((error) => (React__default['default'].createElement(react.MessageBar, Object.assign({}, props, { styles: {
4432
4463
  innerText: {
4433
4464
  paddingTop: messageBarType(error.type) === 5 ? '0.15rem' : '0.1rem',
@@ -7057,11 +7088,13 @@ const MessageThread = (props) => {
7057
7088
  }, [scrollToBottom, sendMessageStatusIfAtBottom]);
7058
7089
  // Infinite scrolling + threadInitialize function
7059
7090
  const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$m(void 0, void 0, void 0, function* () {
7060
- if (chatScrollDivRef.current && !isLoadingChatMessagesRef.current) {
7091
+ if (!isLoadingChatMessagesRef.current) {
7061
7092
  if (onLoadPreviousChatMessages) {
7062
7093
  isLoadingChatMessagesRef.current = true;
7063
7094
  // Fetch message until scrollTop reach the threshold for fetching new message
7064
- while (!isAllChatMessagesLoadedRef.current && chatScrollDivRef.current.scrollTop <= 500) {
7095
+ while (!isAllChatMessagesLoadedRef.current &&
7096
+ chatScrollDivRef.current &&
7097
+ chatScrollDivRef.current.scrollTop <= 500) {
7065
7098
  isAllChatMessagesLoadedRef.current = yield onLoadPreviousChatMessages(numberOfChatMessagesToReload);
7066
7099
  yield delay(200);
7067
7100
  }
@@ -7069,12 +7102,6 @@ const MessageThread = (props) => {
7069
7102
  }
7070
7103
  }
7071
7104
  }), [numberOfChatMessagesToReload, onLoadPreviousChatMessages]);
7072
- const handleInfiniteScroll = React.useCallback(() => {
7073
- if (!chatScrollDivRef.current) {
7074
- return;
7075
- }
7076
- fetchNewMessageWhenAtTop();
7077
- }, [fetchNewMessageWhenAtTop]);
7078
7105
  // The below 2 of useEffects are design for fixing infinite scrolling problem
7079
7106
  // Scrolling element will behave differently when scrollTop = 0(it sticks at the top)
7080
7107
  // we need to get previousTop before it prepend contents
@@ -7112,12 +7139,12 @@ const MessageThread = (props) => {
7112
7139
  React.useEffect(() => {
7113
7140
  const chatScrollDiv = chatScrollDivRef.current;
7114
7141
  chatScrollDiv === null || chatScrollDiv === void 0 ? void 0 : chatScrollDiv.addEventListener('scroll', handleScrollToTheBottom);
7115
- chatScrollDiv === null || chatScrollDiv === void 0 ? void 0 : chatScrollDiv.addEventListener('scroll', handleInfiniteScroll);
7142
+ chatScrollDiv === null || chatScrollDiv === void 0 ? void 0 : chatScrollDiv.addEventListener('scroll', fetchNewMessageWhenAtTop);
7116
7143
  return () => {
7117
7144
  chatScrollDiv === null || chatScrollDiv === void 0 ? void 0 : chatScrollDiv.removeEventListener('scroll', handleScrollToTheBottom);
7118
- chatScrollDiv === null || chatScrollDiv === void 0 ? void 0 : chatScrollDiv.removeEventListener('scroll', handleInfiniteScroll);
7145
+ chatScrollDiv === null || chatScrollDiv === void 0 ? void 0 : chatScrollDiv.removeEventListener('scroll', fetchNewMessageWhenAtTop);
7119
7146
  };
7120
- }, [handleInfiniteScroll, handleScrollToTheBottom]);
7147
+ }, [fetchNewMessageWhenAtTop, handleScrollToTheBottom]);
7121
7148
  /**
7122
7149
  * ClientHeight controls the number of messages to render. However ClientHeight will not be initialized after the
7123
7150
  * first render (not sure but I guess Fluent is updating it in hook which is after render maybe?) so we need to
@@ -10667,10 +10694,10 @@ const DrawerContentContainer = (props) => {
10667
10694
  const theme = react.useTheme();
10668
10695
  const backgroundColor = theme.palette.white;
10669
10696
  const borderRadius = theme.effects.roundedCorner4;
10670
- const rootStyles = react.mergeStyles(containerStyles$3(backgroundColor, borderRadius), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root);
10697
+ const rootStyles = react.mergeStyles(containerStyles$4(backgroundColor, borderRadius), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root);
10671
10698
  return React__default['default'].createElement(react.Stack, { className: rootStyles }, props.children);
10672
10699
  };
10673
- const containerStyles$3 = (backgroundColor, borderRadius) => (Object.assign({ background: backgroundColor, borderTopRightRadius: borderRadius, borderTopLeftRadius: borderRadius }, react.AnimationStyles.slideUpIn10));
10700
+ const containerStyles$4 = (backgroundColor, borderRadius) => (Object.assign({ background: backgroundColor, borderTopRightRadius: borderRadius, borderTopLeftRadius: borderRadius }, react.AnimationStyles.slideUpIn10));
10674
10701
 
10675
10702
  // Copyright (c) Microsoft Corporation.
10676
10703
  /**
@@ -11004,7 +11031,7 @@ function determineStates(previous, current) {
11004
11031
  /**
11005
11032
  * @private
11006
11033
  */
11007
- const containerStyles$2 = (theme) => {
11034
+ const containerStyles$3 = (theme) => {
11008
11035
  return {
11009
11036
  maxWidth: '16rem',
11010
11037
  textAlign: 'center',
@@ -11298,7 +11325,7 @@ const DialpadContainer = (props) => {
11298
11325
  const modifiedInput = plainTextValue.substring(0, plainTextValue.length - 1);
11299
11326
  setText(modifiedInput);
11300
11327
  };
11301
- return (React__default['default'].createElement("div", { className: react.mergeStyles(containerStyles$2(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root), "data-test-id": "dialpadContainer", "data-ui-id": "dialpadContainer" },
11328
+ return (React__default['default'].createElement("div", { className: react.mergeStyles(containerStyles$3(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root), "data-test-id": "dialpadContainer", "data-ui-id": "dialpadContainer" },
11302
11329
  React__default['default'].createElement(react.TextField, { styles: react.concatStyleSets(textFieldStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.textField), value: textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue),
11303
11330
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11304
11331
  onChange: (e) => {
@@ -11407,10 +11434,9 @@ const linkTextStyles = {
11407
11434
  /**
11408
11435
  * @internal
11409
11436
  */
11410
- const containerStyles$1 = {
11437
+ const containerStyles$2 = {
11411
11438
  root: {
11412
- padding: '2rem',
11413
- maxWidth: '25.374rem'
11439
+ padding: '2rem'
11414
11440
  }
11415
11441
  };
11416
11442
  /**
@@ -11426,7 +11452,7 @@ const iconStyles$1 = {
11426
11452
  /* @conditional-compile-remove(unsupported-browser) */
11427
11453
  const UnsupportedBrowserContainer = (props) => {
11428
11454
  const { onTroubleshootingClick, strings } = props;
11429
- return (React__default['default'].createElement(react.Stack, { styles: containerStyles$1 },
11455
+ return (React__default['default'].createElement(react.Stack, { styles: containerStyles$2 },
11430
11456
  React__default['default'].createElement(react.Icon, { styles: iconStyles$1, iconName: "UnsupportedBrowserWarning", "data-ui-id": "unsupportedBrowserIcon" }),
11431
11457
  React__default['default'].createElement(react.Text, { styles: mainTextStyles }, strings.primaryText),
11432
11458
  React__default['default'].createElement(react.Text, { styles: secondaryTextStyles }, strings.secondaryText),
@@ -15701,11 +15727,15 @@ const getCallEndReason = (call) => {
15701
15727
  *
15702
15728
  * @private
15703
15729
  */
15704
- const getCallCompositePage = (call, previousCall) => {
15705
- // Must check for ongoing call *before* looking at any previous calls.
15706
- // If the composite completes one call and joins another, the previous calls
15707
- // will be populated, but not relevant for determining the page.
15730
+ const getCallCompositePage = (call, previousCall, environmentInfo, features) => {
15731
+ /* @conditional-compile-remove(unsupported-browser) */
15732
+ if ((features === null || features === void 0 ? void 0 : features.unsupportedEnvironment) && (environmentInfo === null || environmentInfo === void 0 ? void 0 : environmentInfo.isSupportedBrowser) === false) {
15733
+ return 'unsupportedEnvironment';
15734
+ }
15708
15735
  if (call) {
15736
+ // Must check for ongoing call *before* looking at any previous calls.
15737
+ // If the composite completes one call and joins another, the previous calls
15738
+ // will be populated, but not relevant for determining the page.
15709
15739
  // `_isInLobbyOrConnecting` needs to be checked first because `_isInCall` also returns true when call is in lobby.
15710
15740
  if (_isInLobbyOrConnecting(call === null || call === void 0 ? void 0 : call.state)) {
15711
15741
  return 'lobby';
@@ -17760,7 +17790,7 @@ const OVERLAY_CONTENT_ZINDEX = OVERLAY_BACKGROUND_ZINDEX + 1;
17760
17790
  /**
17761
17791
  * @private
17762
17792
  */
17763
- const containerStyles = {
17793
+ const containerStyles$1 = {
17764
17794
  root: {
17765
17795
  height: '100%',
17766
17796
  width: '100%',
@@ -17816,7 +17846,7 @@ const ExpandedLocalVideoTile = (props) => {
17816
17846
  props.onCreateLocalStreamView(localVideoViewOptions$1).catch((err) => console.log('Can not render video', err));
17817
17847
  }
17818
17848
  }, [isVideoReady, videoStream, props, renderElement]);
17819
- return (React__default['default'].createElement(react.Stack, { horizontalAlign: "center", verticalAlign: "center", styles: containerStyles, grow: true },
17849
+ return (React__default['default'].createElement(react.Stack, { horizontalAlign: "center", verticalAlign: "center", styles: containerStyles$1, grow: true },
17820
17850
  React__default['default'].createElement(VideoTile, { styles: videoTileStyles, renderElement: renderElement ? React__default['default'].createElement(StreamMedia, { videoStreamElement: renderElement }) : undefined, onRenderPlaceholder: onRenderEmptyPlaceholder }, props.overlayContent && (React__default['default'].createElement(React__default['default'].Fragment, null,
17821
17851
  React__default['default'].createElement(react.Stack, { className: react.mergeStyles(overlayBackgroundStyles(palette, isVideoReady)) }),
17822
17852
  React__default['default'].createElement(react.Stack, { horizontalAlign: "center", verticalAlign: "center", className: react.mergeStyles(overlayContentStyles) }, props.overlayContent))))));
@@ -17949,7 +17979,9 @@ const CallPage = (props) => {
17949
17979
  const strings = useLocale().strings.call;
17950
17980
  // Reduce the controls shown when mobile view is enabled.
17951
17981
  const callControlOptions = mobileView ? reduceCallControlsForMobile(options === null || options === void 0 ? void 0 : options.callControls) : options === null || options === void 0 ? void 0 : options.callControls;
17952
- return (React__default['default'].createElement(CallArrangement, { complianceBannerProps: Object.assign(Object.assign({}, complianceBannerProps), { strings }), errorBarProps: (options === null || options === void 0 ? void 0 : options.errorBar) !== false && Object.assign({}, errorBarProps), mutedNotificationProps: mutedNotificationProps, callControlProps: {
17982
+ return (React__default['default'].createElement(CallArrangement, { complianceBannerProps: Object.assign(Object.assign({}, complianceBannerProps), { strings }),
17983
+ // Ignore errors from before current call. This avoids old errors from showing up when a user re-joins a call.
17984
+ errorBarProps: (options === null || options === void 0 ? void 0 : options.errorBar) !== false && Object.assign(Object.assign({}, errorBarProps), { ignorePremountErrors: true }), mutedNotificationProps: mutedNotificationProps, callControlProps: {
17953
17985
  callInvitationURL: callInvitationURL,
17954
17986
  onFetchParticipantMenuItems: onFetchParticipantMenuItems,
17955
17987
  options: callControlOptions,
@@ -18887,7 +18919,9 @@ const LobbyPage = (props) => {
18887
18919
  ? reduceCallControlsForMobile((_b = props.options) === null || _b === void 0 ? void 0 : _b.callControls)
18888
18920
  : (_c = props.options) === null || _c === void 0 ? void 0 : _c.callControls;
18889
18921
  callControlOptions = disableCallControls(callControlOptions, ['screenShareButton', 'participantsButton']);
18890
- return (React__default['default'].createElement(CallArrangement, { complianceBannerProps: { strings }, errorBarProps: ((_d = props.options) === null || _d === void 0 ? void 0 : _d.errorBar) !== false && Object.assign({}, errorBarProps), callControlProps: {
18922
+ return (React__default['default'].createElement(CallArrangement, { complianceBannerProps: { strings },
18923
+ // Ignore errors from before current call. This avoids old errors from showing up when a user re-joins a call.
18924
+ errorBarProps: ((_d = props.options) === null || _d === void 0 ? void 0 : _d.errorBar) !== false && Object.assign(Object.assign({}, errorBarProps), { ignorePremountErrors: true }), callControlProps: {
18891
18925
  options: callControlOptions,
18892
18926
  increaseFlyoutItemSize: props.mobileView
18893
18927
  }, mobileView: props.mobileView,
@@ -19120,7 +19154,9 @@ const HoldPage = (props) => {
19120
19154
  /* @conditional-compile-remove(one-to-n-calling) */
19121
19155
  'holdButton'
19122
19156
  ]);
19123
- return (React__default['default'].createElement(CallArrangement, { complianceBannerProps: { strings }, errorBarProps: ((_c = props.options) === null || _c === void 0 ? void 0 : _c.errorBar) !== false && Object.assign({}, errorBarProps), callControlProps: {
19157
+ return (React__default['default'].createElement(CallArrangement, { complianceBannerProps: { strings },
19158
+ // Ignore errors from before current call. This avoids old errors from showing up when a user re-joins a call.
19159
+ errorBarProps: ((_c = props.options) === null || _c === void 0 ? void 0 : _c.errorBar) !== false && Object.assign(Object.assign({}, errorBarProps), { ignorePremountErrors: true }), callControlProps: {
19124
19160
  options: callControlOptions,
19125
19161
  increaseFlyoutItemSize: props.mobileView
19126
19162
  }, mobileView: props.mobileView,
@@ -19141,9 +19177,16 @@ const UnsupportedBrowserPage = (props) => {
19141
19177
  /* @conditional-compile-remove(unsupported-browser) */
19142
19178
  const unsupportedBrowserStrings = locale.component.strings.UnsupportedBrowser;
19143
19179
  /* @conditional-compile-remove(unsupported-browser) */
19144
- return (React__default['default'].createElement(react.Stack, { styles: { root: { margin: 'auto', paddingTop: '3rem' } } },
19180
+ return (React__default['default'].createElement(react.Stack, { styles: containerStyles },
19145
19181
  React__default['default'].createElement(UnsupportedBrowser, { onTroubleshootingClick: onTroubleshootingClick, strings: unsupportedBrowserStrings })));
19146
19182
  };
19183
+ /* @conditional-compile-remove(unsupported-browser) */
19184
+ const containerStyles = {
19185
+ root: {
19186
+ margin: 'auto',
19187
+ paddingTop: '3rem'
19188
+ }
19189
+ };
19147
19190
 
19148
19191
  // Copyright (c) Microsoft Corporation.
19149
19192
  // Licensed under the MIT license.
@@ -19215,10 +19258,14 @@ const MainScreen = (props) => {
19215
19258
  pageElement = (React__default['default'].createElement(React__default['default'].Fragment, null,
19216
19259
  /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ React__default['default'].createElement(HoldPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options })));
19217
19260
  break;
19218
- case unsupportedEnvironmentPageTrampoline():
19261
+ }
19262
+ /* @conditional-compile-remove(unsupported-browser) */
19263
+ switch (page) {
19264
+ case 'unsupportedEnvironment':
19219
19265
  pageElement = (React__default['default'].createElement(React__default['default'].Fragment, null,
19220
19266
  /* @conditional-compile-remove(unsupported-browser) */
19221
19267
  React__default['default'].createElement(UnsupportedBrowserPage, { onTroubleshootingClick: (_e = props.options) === null || _e === void 0 ? void 0 : _e.onEnvironmentInfoTroubleshootingClick })));
19268
+ break;
19222
19269
  }
19223
19270
  if (!pageElement) {
19224
19271
  throw new Error('Invalid call composite page');
@@ -19285,10 +19332,6 @@ const holdPageTrampoline = () => {
19285
19332
  /* @conditional-compile-remove(PSTN-calls) */
19286
19333
  return 'hold';
19287
19334
  };
19288
- const unsupportedEnvironmentPageTrampoline = () => {
19289
- /* @conditional-compile-remove(unsupported-browser) */
19290
- return 'unsupportedEnvironment';
19291
- };
19292
19335
  const getQueryOptions = (options) => {
19293
19336
  /* @conditional-compile-remove(rooms) */
19294
19337
  if (options.role === 'Consumer') {
@@ -19372,6 +19415,24 @@ class DiagnosticsForwarder {
19372
19415
  }
19373
19416
  }
19374
19417
 
19418
+ // Copyright (c) Microsoft Corporation.
19419
+ /**
19420
+ * @private
19421
+ *
19422
+ * This is used to create correct handler for generic agent type
19423
+ */
19424
+ const createHandlers = (callClient, callAgent, deviceManager, call) => {
19425
+ // Call can be either undefined or ACS Call
19426
+ if (_isACSCallAgent(callAgent) && (!call || (call && _isACSCall(call)))) {
19427
+ return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call);
19428
+ }
19429
+ /* @conditional-compile-remove(teams-identity-support) */
19430
+ if (_isTeamsCallAgent(callAgent) && (!call || (call && _isTeamsCall(call)))) {
19431
+ return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call);
19432
+ }
19433
+ throw new Error('Unhandled agent type');
19434
+ };
19435
+
19375
19436
  // Copyright (c) Microsoft Corporation.
19376
19437
  // Licensed under the MIT license.
19377
19438
  var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -19398,6 +19459,8 @@ class CallContext {
19398
19459
  latestErrors: clientState.latestErrors,
19399
19460
  isTeamsCall,
19400
19461
  /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId: clientState.alternateCallerId,
19462
+ /* @conditional-compile-remove(unsupported-browser) */ environmentInfo: clientState.environmentInfo,
19463
+ /* @conditional-compile-remove(unsupported-browser) */ features: options === null || options === void 0 ? void 0 : options.features,
19401
19464
  /* @conditional-compile-remove(rooms) */ roleHint: options === null || options === void 0 ? void 0 : options.roleHint
19402
19465
  };
19403
19466
  this.emitter.setMaxListeners((_b = options === null || options === void 0 ? void 0 : options.maxListeners) !== null && _b !== void 0 ? _b : 50);
@@ -19434,7 +19497,11 @@ class CallContext {
19434
19497
  const latestEndedCall = findLatestEndedCall(clientState.callsEnded);
19435
19498
  // As the state is transitioning to a new state, trigger appropriate callback events.
19436
19499
  const oldPage = this.state.page;
19437
- const newPage = getCallCompositePage(call, latestEndedCall);
19500
+ /* @conditional-compile-remove(unsupported-browser) */
19501
+ const environmentInfo = this.state.environmentInfo;
19502
+ const newPage = getCallCompositePage(call, latestEndedCall,
19503
+ /* @conditional-compile-remove(unsupported-browser) */ environmentInfo,
19504
+ /* @conditional-compile-remove(unsupported-browser) */ this.state.features);
19438
19505
  if (!IsCallEndedPage(oldPage) && IsCallEndedPage(newPage)) {
19439
19506
  this.emitter.emit('callEnded', { callId: this.callId });
19440
19507
  // Reset the callId to undefined as the call has ended.
@@ -19465,8 +19532,7 @@ const findLatestEndedCall = (calls) => {
19465
19532
  * @private
19466
19533
  */
19467
19534
  class AzureCommunicationCallAdapter {
19468
- constructor(callClient, locator, callAgent, deviceManager,
19469
- /* @conditional-compile-remove(rooms) */ options) {
19535
+ constructor(callClient, locator, callAgent, deviceManager, options) {
19470
19536
  this.participantSubscribers = new Map();
19471
19537
  this.emitter = new EventEmitter.EventEmitter();
19472
19538
  this.isMyMutedChanged = () => {
@@ -19476,14 +19542,14 @@ class AzureCommunicationCallAdapter {
19476
19542
  isMuted: (_a = this.call) === null || _a === void 0 ? void 0 : _a.isMuted
19477
19543
  });
19478
19544
  };
19545
+ console.log(options);
19479
19546
  this.bindPublicMethods();
19480
19547
  this.callClient = callClient;
19481
19548
  this.callAgent = callAgent;
19482
19549
  this.locator = locator;
19483
19550
  this.deviceManager = deviceManager;
19484
19551
  const isTeamsMeeting = 'meetingLink' in this.locator;
19485
- this.context = new CallContext(callClient.getState(), isTeamsMeeting,
19486
- /* @conditional-compile-remove(rooms) */ options);
19552
+ this.context = new CallContext(callClient.getState(), isTeamsMeeting, options);
19487
19553
  this.context.onCallEnded((endCallData) => this.emitter.emit('callEnded', endCallData));
19488
19554
  const onStateChange = (clientState) => {
19489
19555
  var _a;
@@ -19502,7 +19568,7 @@ class AzureCommunicationCallAdapter {
19502
19568
  }
19503
19569
  this.context.updateClientState(clientState);
19504
19570
  };
19505
- this.handlers = createDefaultCallingHandlers(callClient, callAgent, deviceManager, undefined);
19571
+ this.handlers = createHandlers(callClient, callAgent, deviceManager, undefined);
19506
19572
  this.onClientStateChange = onStateChange;
19507
19573
  this.subscribeDeviceManagerEvents();
19508
19574
  this.callClient.onStateChange(onStateChange);
@@ -19620,6 +19686,16 @@ class AzureCommunicationCallAdapter {
19620
19686
  const isTeamsMeeting = 'meetingLink' in this.locator;
19621
19687
  /* @conditional-compile-remove(rooms) */
19622
19688
  const isRoomsCall = 'roomId' in this.locator;
19689
+ /* @conditional-compile-remove(teams-identity-support) */
19690
+ if (_isTeamsCallAgent(this.callAgent)) {
19691
+ if (!isTeamsMeeting) {
19692
+ throw new Error('Locator not supported by TeamsCallAgent');
19693
+ }
19694
+ return this.callAgent.join(this.locator, {
19695
+ audioOptions,
19696
+ videoOptions
19697
+ });
19698
+ }
19623
19699
  if (isTeamsMeeting) {
19624
19700
  return this.callAgent.join(this.locator, {
19625
19701
  audioOptions,
@@ -19662,7 +19738,7 @@ class AzureCommunicationCallAdapter {
19662
19738
  return __awaiter$4(this, void 0, void 0, function* () {
19663
19739
  yield this.handlers.onHangUp(forEveryone);
19664
19740
  this.unsubscribeCallEvents();
19665
- this.handlers = createDefaultCallingHandlers(this.callClient, this.callAgent, this.deviceManager, undefined);
19741
+ this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, undefined);
19666
19742
  // We set the adapter.call object to undefined immediately when a call is ended.
19667
19743
  // We do not set the context.callId to undefined because it is a part of the immutable data flow loop.
19668
19744
  this.call = undefined;
@@ -19776,14 +19852,14 @@ class AzureCommunicationCallAdapter {
19776
19852
  throw new Error('Unable to start call.');
19777
19853
  }
19778
19854
  this.processNewCall(call);
19779
- return this.call;
19855
+ return call;
19780
19856
  }
19781
19857
  processNewCall(call) {
19782
19858
  this.call = call;
19783
19859
  this.context.setCurrentCallId(call.id);
19784
19860
  // Resync state after callId is set
19785
19861
  this.context.updateClientState(this.callClient.getState());
19786
- this.handlers = createDefaultCallingHandlers(this.callClient, this.callAgent, this.deviceManager, this.call);
19862
+ this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, this.call);
19787
19863
  this.subscribeCallEvents();
19788
19864
  }
19789
19865
  removeParticipant(userId) {
@@ -19944,40 +20020,26 @@ const createAzureCommunicationCallAdapter = ({ userId, displayName, credential,
19944
20020
  /* @conditional-compile-remove(rooms) */ options);
19945
20021
  return adapter;
19946
20022
  });
20023
+ /* @conditional-compile-remove(teams-identity-support) */
19947
20024
  /**
19948
- * A custom React hook to simplify the creation of {@link CallAdapter}.
19949
- *
19950
- * Similar to {@link createAzureCommunicationCallAdapter}, but takes care of asynchronous
19951
- * creation of the adapter internally.
19952
- *
19953
- * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments
19954
- * as they are created. The adapter is only created when all arguments are defined.
19955
- *
19956
- * Note that you must memoize the arguments to avoid recreating adapter on each render.
19957
- * See storybook for typical usage examples.
19958
- *
19959
- * @public
19960
- */
19961
- const useAzureCommunicationCallAdapter = (
19962
- /**
19963
- * Arguments to be passed to {@link createAzureCommunicationCallAdapter}.
19964
- *
19965
- * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments
19966
- * as they are created. The adapter is only created when all arguments are defined.
19967
- */
19968
- args,
19969
- /**
19970
- * Optional callback to modify the adapter once it is created.
19971
- *
19972
- * If set, must return the modified adapter.
20025
+ * @beta
19973
20026
  */
19974
- afterCreate,
20027
+ const createAzureCommunicationTeamsCallAdapter = ({ userId, credential, locator,
20028
+ /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId }) => __awaiter$4(void 0, void 0, void 0, function* () {
20029
+ const callClient = createStatefulCallClient({
20030
+ userId,
20031
+ /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId
20032
+ });
20033
+ const callAgent = yield callClient.createTeamsCallAgent(credential, {
20034
+ undefined
20035
+ });
20036
+ const adapter = createAzureCommunicationTeamsCallAdapterFromClient(callClient, callAgent, locator);
20037
+ return adapter;
20038
+ });
19975
20039
  /**
19976
- * Optional callback called before the adapter is disposed.
19977
- *
19978
- * This is useful for clean up tasks, e.g., leaving any ongoing calls.
20040
+ * @private
19979
20041
  */
19980
- beforeDispose) => {
20042
+ const useAzureCommunicationCallAdapterGeneric = (args, createAzureCommunicationCallAdapter, afterCreate, beforeDispose) => {
19981
20043
  const { credential, displayName, locator, userId,
19982
20044
  /*@conditional-compile-remove(PSTN-calls) */ alternateCallerId,
19983
20045
  /*@conditional-compile-remove(rooms) */ options } = args;
@@ -20031,11 +20093,12 @@ beforeDispose) => {
20031
20093
  afterCreateRef,
20032
20094
  /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
20033
20095
  beforeDisposeRef,
20096
+ createAzureCommunicationCallAdapter,
20034
20097
  credential,
20035
20098
  displayName,
20036
20099
  locator,
20037
- userId,
20038
- /* @conditional-compile-remove(PSTN-calls) */ options
20100
+ /* @conditional-compile-remove(rooms) */ options,
20101
+ userId
20039
20102
  ]);
20040
20103
  // Dispose any existing adapter when the component unmounts.
20041
20104
  React.useEffect(() => {
@@ -20053,6 +20116,79 @@ beforeDispose) => {
20053
20116
  }, []);
20054
20117
  return adapter;
20055
20118
  };
20119
+ /**
20120
+ * A custom React hook to simplify the creation of {@link CallAdapter}.
20121
+ *
20122
+ * Similar to {@link createAzureCommunicationCallAdapter}, but takes care of asynchronous
20123
+ * creation of the adapter internally.
20124
+ *
20125
+ * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments
20126
+ * as they are created. The adapter is only created when all arguments are defined.
20127
+ *
20128
+ * Note that you must memoize the arguments to avoid recreating adapter on each render.
20129
+ * See storybook for typical usage examples.
20130
+ *
20131
+ * @public
20132
+ */
20133
+ const useAzureCommunicationCallAdapter = (
20134
+ /**
20135
+ * Arguments to be passed to {@link createAzureCommunicationCallAdapter}.
20136
+ *
20137
+ * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments
20138
+ * as they are created. The adapter is only created when all arguments are defined.
20139
+ */
20140
+ args,
20141
+ /**
20142
+ * Optional callback to modify the adapter once it is created.
20143
+ *
20144
+ * If set, must return the modified adapter.
20145
+ */
20146
+ afterCreate,
20147
+ /**
20148
+ * Optional callback called before the adapter is disposed.
20149
+ *
20150
+ * This is useful for clean up tasks, e.g., leaving any ongoing calls.
20151
+ */
20152
+ beforeDispose) => {
20153
+ return useAzureCommunicationCallAdapterGeneric(args, createAzureCommunicationCallAdapter, afterCreate, beforeDispose);
20154
+ };
20155
+ /* @conditional-compile-remove(teams-identity-support) */
20156
+ /**
20157
+ * A custom React hook to simplify the creation of {@link TeamsCallAdapter}.
20158
+ *
20159
+ * Similar to {@link createTeamsAzureCommunicationCallAdapter}, but takes care of asynchronous
20160
+ * creation of the adapter internally.
20161
+ *
20162
+ * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments
20163
+ * as they are created. The adapter is only created when all arguments are defined.
20164
+ *
20165
+ * Note that you must memoize the arguments to avoid recreating adapter on each render.
20166
+ * See storybook for typical usage examples.
20167
+ *
20168
+ * @beta
20169
+ */
20170
+ const useAzureCommunicationTeamsCallAdapter = (
20171
+ /**
20172
+ * Arguments to be passed to {@link createAzureCommunicationCallAdapter}.
20173
+ *
20174
+ * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments
20175
+ * as they are created. The adapter is only created when all arguments are defined.
20176
+ */
20177
+ args,
20178
+ /**
20179
+ * Optional callback to modify the adapter once it is created.
20180
+ *
20181
+ * If set, must return the modified adapter.
20182
+ */
20183
+ afterCreate,
20184
+ /**
20185
+ * Optional callback called before the adapter is disposed.
20186
+ *
20187
+ * This is useful for clean up tasks, e.g., leaving any ongoing calls.
20188
+ */
20189
+ beforeDispose) => {
20190
+ return useAzureCommunicationCallAdapterGeneric(args, createAzureCommunicationTeamsCallAdapter, afterCreate, beforeDispose);
20191
+ };
20056
20192
  /**
20057
20193
  * Create a {@link CallAdapter} using the provided {@link StatefulCallClient}.
20058
20194
  *
@@ -20061,11 +20197,27 @@ beforeDispose) => {
20061
20197
  *
20062
20198
  * @public
20063
20199
  */
20064
- const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator,
20065
- /* @conditional-compile-remove(rooms) */ options) => __awaiter$4(void 0, void 0, void 0, function* () {
20200
+ const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter$4(void 0, void 0, void 0, function* () {
20066
20201
  const deviceManager = (yield callClient.getDeviceManager());
20067
- /* @conditional-compile-remove(rooms) */
20068
- return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager, options);
20202
+ /* @conditional-compile-remove(unsupported-browser) */
20203
+ yield callClient.feature(communicationCalling.Features.DebugInfo).getEnvironmentInfo();
20204
+ return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager,
20205
+ /* @conditional-compile-remove(rooms) */ options);
20206
+ });
20207
+ /* @conditional-compile-remove(teams-identity-support) */
20208
+ /**
20209
+ * Create a {@link TeamsCallAdapter} using the provided {@link StatefulCallClient}.
20210
+ *
20211
+ * Useful if you want to keep a reference to {@link StatefulCallClient}.
20212
+ * Consider using {@link createAzureCommunicationCallAdapter} for a simpler API.
20213
+ *
20214
+ * @beta
20215
+ */
20216
+ const createAzureCommunicationTeamsCallAdapterFromClient = (callClient, callAgent, locator) => __awaiter$4(void 0, void 0, void 0, function* () {
20217
+ const deviceManager = (yield callClient.getDeviceManager());
20218
+ /* @conditional-compile-remove(unsupported-browser) */
20219
+ yield callClient.feature(communicationCalling.Features.DebugInfo).getEnvironmentInfo();
20220
+ return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager);
20069
20221
  });
20070
20222
  const isCallError = (e) => {
20071
20223
  return e['target'] !== undefined && e['innerError'] !== undefined;
@@ -21259,7 +21411,9 @@ function callWithChatAdapterStateFromBackingStates(callAdapter, chatAdapter) {
21259
21411
  /* @conditional-compile-remove(file-sharing) */
21260
21412
  fileUploads: chatAdapterState.fileUploads,
21261
21413
  /* @conditional-compile-remove(PSTN-calls) */
21262
- alternateCallerId: callAdapterState.alternateCallerId
21414
+ alternateCallerId: callAdapterState.alternateCallerId,
21415
+ /* @conditional-compile-remove(unsupported-browser) */
21416
+ environmentInfo: callAdapterState.environmentInfo
21263
21417
  };
21264
21418
  }
21265
21419
  /**
@@ -21779,14 +21933,16 @@ class AzureCommunicationCallWithChatAdapter {
21779
21933
  * @public
21780
21934
  */
21781
21935
  const createAzureCommunicationCallWithChatAdapter = ({ userId, displayName, credential, endpoint, locator,
21782
- /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId }) => __awaiter(void 0, void 0, void 0, function* () {
21936
+ /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
21937
+ /* @conditional-compile-remove(unsupported-browser) */ callAdapterOptions }) => __awaiter(void 0, void 0, void 0, function* () {
21783
21938
  const callAdapterLocator = isTeamsMeetingLinkLocator(locator) ? locator : locator.callLocator;
21784
21939
  const createCallAdapterPromise = createAzureCommunicationCallAdapter({
21785
21940
  userId,
21786
21941
  displayName,
21787
21942
  credential,
21788
21943
  locator: callAdapterLocator,
21789
- /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId
21944
+ /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
21945
+ /* @conditional-compile-remove(unsupported-browser) */ options: callAdapterOptions
21790
21946
  });
21791
21947
  const threadId = isTeamsMeetingLinkLocator(locator)
21792
21948
  ? getChatThreadFromTeamsLink(locator.meetingLink)
@@ -21836,7 +21992,8 @@ afterCreate,
21836
21992
  */
21837
21993
  beforeDispose) => {
21838
21994
  const { credential, displayName, endpoint, locator, userId,
21839
- /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId } = args;
21995
+ /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
21996
+ /* @conditional-compile-remove(unsupported-browser) */ callAdapterOptions } = args;
21840
21997
  // State update needed to rerender the parent component when a new adapter is created.
21841
21998
  const [adapter, setAdapter] = React.useState(undefined);
21842
21999
  // Ref needed for cleanup to access the old adapter created asynchronously.
@@ -21872,7 +22029,8 @@ beforeDispose) => {
21872
22029
  endpoint,
21873
22030
  locator,
21874
22031
  userId,
21875
- /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId
22032
+ /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
22033
+ /* @conditional-compile-remove(unsupported-browser) */ callAdapterOptions
21876
22034
  });
21877
22035
  if (afterCreateRef.current) {
21878
22036
  newAdapter = yield afterCreateRef.current(newAdapter);
@@ -21891,7 +22049,8 @@ beforeDispose) => {
21891
22049
  displayName,
21892
22050
  endpoint,
21893
22051
  locator,
21894
- userId
22052
+ userId,
22053
+ /* @conditional-compile-remove(unsupported-browser) */ callAdapterOptions
21895
22054
  ]);
21896
22055
  // Dispose any existing adapter when the component unmounts.
21897
22056
  React.useEffect(() => {
@@ -22071,6 +22230,8 @@ exports.createAzureCommunicationCallWithChatAdapter = createAzureCommunicationCa
22071
22230
  exports.createAzureCommunicationCallWithChatAdapterFromClients = createAzureCommunicationCallWithChatAdapterFromClients;
22072
22231
  exports.createAzureCommunicationChatAdapter = createAzureCommunicationChatAdapter;
22073
22232
  exports.createAzureCommunicationChatAdapterFromClient = createAzureCommunicationChatAdapterFromClient;
22233
+ exports.createAzureCommunicationTeamsCallAdapter = createAzureCommunicationTeamsCallAdapter;
22234
+ exports.createAzureCommunicationTeamsCallAdapterFromClient = createAzureCommunicationTeamsCallAdapterFromClient;
22074
22235
  exports.createDefaultCallingHandlers = createDefaultCallingHandlers;
22075
22236
  exports.createDefaultChatHandlers = createDefaultChatHandlers;
22076
22237
  exports.createDefaultTeamsCallingHandlers = createDefaultTeamsCallingHandlers;
@@ -22085,6 +22246,7 @@ exports.toFlatCommunicationIdentifier = toFlatCommunicationIdentifier;
22085
22246
  exports.useAzureCommunicationCallAdapter = useAzureCommunicationCallAdapter;
22086
22247
  exports.useAzureCommunicationCallWithChatAdapter = useAzureCommunicationCallWithChatAdapter;
22087
22248
  exports.useAzureCommunicationChatAdapter = useAzureCommunicationChatAdapter;
22249
+ exports.useAzureCommunicationTeamsCallAdapter = useAzureCommunicationTeamsCallAdapter;
22088
22250
  exports.useCall = useCall;
22089
22251
  exports.useCallAgent = useCallAgent;
22090
22252
  exports.useCallClient = useCallClient;