@azure/communication-react 1.5.1-alpha-202305020013 → 1.5.1-alpha-202305040013

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 (126) hide show
  1. package/CHANGELOG.beta.md +9 -1
  2. package/dist/communication-react.d.ts +12 -13
  3. package/dist/dist-cjs/communication-react/index.js +1880 -1850
  4. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  7. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +1 -2
  8. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  9. package/dist/dist-esm/react-components/src/components/Caption.js +1 -2
  10. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +1 -3
  12. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +2 -2
  13. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  14. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +1 -3
  15. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +1 -1
  16. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  17. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +1 -5
  18. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +1 -3
  20. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +3 -2
  22. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/theming/icons.js +12 -5
  24. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -1
  26. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  27. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +12 -0
  28. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +33 -19
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +4 -0
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +70 -65
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -3
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +16 -3
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.d.ts +14 -0
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js +63 -0
  39. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js.map +1 -0
  40. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePaneProvider.d.ts +58 -0
  41. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePaneProvider.js +31 -0
  42. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePaneProvider.js.map +1 -0
  43. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.d.ts +17 -0
  44. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +43 -0
  45. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -0
  46. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.d.ts +9 -0
  47. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +58 -0
  48. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -0
  49. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -1
  50. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +2 -2
  51. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
  52. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +4 -0
  53. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -4
  54. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  55. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +2 -0
  56. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +29 -29
  57. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  58. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +4 -0
  59. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +1 -3
  60. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  61. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.d.ts +4 -0
  62. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +1 -3
  63. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  64. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +2 -0
  65. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +4 -0
  66. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
  67. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +9 -1
  68. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
  69. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +116 -162
  70. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  71. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{ChatButton.d.ts → ChatButton/ChatButton.d.ts} +1 -1
  72. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{ChatButton.js → ChatButton/ChatButton.js} +1 -1
  73. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButton.js.map +1 -0
  74. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{ChatButtonWithUnreadMessagesBadge.d.ts → ChatButton/ChatButtonWithUnreadMessagesBadge.d.ts} +2 -2
  75. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{ChatButtonWithUnreadMessagesBadge.js → ChatButton/ChatButtonWithUnreadMessagesBadge.js} +3 -3
  76. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButtonWithUnreadMessagesBadge.js.map +1 -0
  77. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/NotificationIcon.js.map +1 -0
  78. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -1
  79. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +6 -2
  80. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  81. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +1 -1
  82. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  83. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +1 -1
  84. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  85. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +2 -2
  86. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  87. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +1 -1
  88. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
  89. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +4 -5
  90. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +11 -24
  91. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  92. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +5 -2
  93. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
  94. package/dist/dist-esm/react-composites/src/composites/common/ConvertContextualMenuItemToDrawerMenuItem.js.map +1 -0
  95. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +0 -9
  96. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +32 -12
  97. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  98. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +4 -4
  99. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js +27 -2
  100. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
  101. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +8 -5
  102. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js +11 -2
  103. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
  104. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +1 -17
  105. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +17 -16
  106. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  107. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +8 -0
  108. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  109. package/package.json +8 -8
  110. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.d.ts +0 -24
  111. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js +0 -80
  112. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +0 -1
  113. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.d.ts +0 -16
  114. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js +0 -38
  115. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js.map +0 -1
  116. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.d.ts +0 -34
  117. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +0 -90
  118. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +0 -1
  119. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton.js.map +0 -1
  120. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButtonWithUnreadMessagesBadge.js.map +0 -1
  121. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ConvertContextualMenuItemToDrawerMenuItem.js.map +0 -1
  122. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/NotificationIcon.js.map +0 -1
  123. /package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{NotificationIcon.d.ts → ChatButton/NotificationIcon.d.ts} +0 -0
  124. /package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{NotificationIcon.js → ChatButton/NotificationIcon.js} +0 -0
  125. /package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/ConvertContextualMenuItemToDrawerMenuItem.d.ts +0 -0
  126. /package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/ConvertContextualMenuItemToDrawerMenuItem.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"LobbyPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/LobbyPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,4CAAmC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAqB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAE5E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAyB,MAAM,6BAA6B,CAAC;AAa7F;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAe,EAAE;;IAC9D,MAAM,aAAa,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,UAAU,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;IAC9C,MAAM,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C,WAAW;YACpE,WAAW,EAAE,6BAA6B,CAAC,OAAO,CAAC;SACpD,CAAC;KACH;SAAM;QACL,OAAO;YACL,KAAK,EAAE,6BAA6B,CAAC,OAAO,CAAC;SAC9C,CAAC;KACH;AACH,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,CAAC,OAA6B,EAAU,EAAE;IAC9E,6CAA6C,CAAC,mDAAmD;IACjG,OAAO,OAAO,CAAC,2BAA2B,CAAC;IAC3C,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\nimport { ErrorBar } from '@internal/react-components';\nimport { useSelector } from '../hooks/useSelector';\nimport { lobbySelector } from '../selectors/lobbySelector';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { LobbyOverlayProps, LobbyTile } from '../components/LobbyTile';\nimport { getCallStatus, getRemoteParticipants } from '../selectors/baseSelectors';\nimport { disableCallControls, reduceCallControlsForMobile } from '../utils';\nimport { CallCompositeStrings } from '../Strings';\nimport { useLocale } from '../../localization';\nimport { useLocalVideoStartTrigger } from '../components/MediaGallery';\nimport { CallCompositeIcon } from '../../common/icons';\nimport { isPhoneNumberIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';\nimport { RemoteParticipantState } from '@internal/calling-stateful-client';\n\n/**\n * @private\n */\nexport interface LobbyPageProps {\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId: string;\n options?: CallCompositeOptions;\n}\n\n/**\n * @private\n */\nexport const LobbyPage = (props: LobbyPageProps): JSX.Element => {\n const errorBarProps = usePropsFor(ErrorBar);\n const lobbyProps = useSelector(lobbySelector);\n const strings = useLocale().strings.call;\n\n const callState = useSelector(getCallStatus);\n const inLobby = callState === 'InLobby';\n\n const participants = useSelector(getRemoteParticipants) ?? {};\n\n useLocalVideoStartTrigger(lobbyProps.localParticipantVideoStream.isAvailable, inLobby);\n\n // Reduce the controls shown when mobile view is enabled.\n let callControlOptions = props.mobileView\n ? reduceCallControlsForMobile(props.options?.callControls)\n : props.options?.callControls;\n\n callControlOptions = disableCallControls(callControlOptions, ['screenShareButton', 'participantsButton']);\n\n return (\n <CallArrangement\n complianceBannerProps={{ strings }}\n // Ignore errors from before current call. This avoids old errors from showing up when a user re-joins a call.\n errorBarProps={props.options?.errorBar !== false && { ...errorBarProps, ignorePremountErrors: true }}\n callControlProps={{\n options: callControlOptions,\n increaseFlyoutItemSize: props.mobileView\n }}\n mobileView={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() => (\n <LobbyTile {...lobbyProps} overlayProps={overlayProps(strings, inLobby, Object.values(participants))} />\n )}\n dataUiId={'lobby-page'}\n />\n );\n};\n\nconst overlayProps = (\n strings: CallCompositeStrings,\n inLobby: boolean,\n remoteParticipants: RemoteParticipantState[]\n): LobbyOverlayProps => {\n /**\n * Only grab the first participant because there will only be one in this situation.\n * when starting a call with multiple people the call goes to the connected state and composite goes directly to\n * videoGallery.\n *\n * We also need to check the participant state since in a group call the remote participants array will populate just before\n * the user joins. In this situation we also check the participant states. in a groupCall the state of the participants\n * will be 'Idle'.\n */\n const outboundCallParticipant: RemoteParticipantState | undefined =\n remoteParticipants[0] &&\n ['Ringing', 'Connecting'].includes(remoteParticipants[0].state) &&\n remoteParticipants.length === 1\n ? remoteParticipants[0]\n : undefined;\n\n return inLobby\n ? overlayPropsWaitingToBeAdmitted(strings)\n : outboundCallParticipant\n ? overlayPropsOutboundCall(strings, outboundCallParticipant)\n : overlayPropsConnectingToCall(strings);\n};\n\nconst overlayPropsConnectingToCall = (strings: CallCompositeStrings): LobbyOverlayProps => ({\n title: strings.lobbyScreenConnectingToCallTitle,\n moreDetails: strings.lobbyScreenConnectingToCallMoreDetails,\n overlayIcon: <CallCompositeIcon iconName=\"LobbyScreenConnectingToCall\" />\n});\n\nconst overlayPropsWaitingToBeAdmitted = (strings: CallCompositeStrings): LobbyOverlayProps => ({\n title: strings.lobbyScreenWaitingToBeAdmittedTitle,\n moreDetails: strings.lobbyScreenWaitingToBeAdmittedMoreDetails,\n overlayIcon: <CallCompositeIcon iconName=\"LobbyScreenWaitingToBeAdmitted\" />\n});\n\nconst overlayPropsOutboundCall = (\n strings: CallCompositeStrings,\n participant: RemoteParticipantState\n): LobbyOverlayProps => {\n if (isPhoneNumberIdentifier(participant.identifier)) {\n return {\n title: (participant.identifier as PhoneNumberIdentifier).phoneNumber,\n moreDetails: outboundCallStringsTrampoline(strings)\n };\n } else {\n return {\n title: outboundCallStringsTrampoline(strings)\n };\n }\n};\n\nconst outboundCallStringsTrampoline = (strings: CallCompositeStrings): string => {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return strings.outboundCallingNoticeString;\n return '';\n};\n\"../../../../../react-components/src\"\"../../../../../calling-stateful-client/src\""]}
1
+ {"version":3,"file":"LobbyPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/LobbyPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,4CAAmC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAqB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAE5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AE,oBAAC,iBAAiB,IAAC,QAAQ,EAAC,6BAA6B,GAAG;CAC1E,CAAC,CAAC;AAEH,MAAM,+BAA+B,GAAG,CAAC,OAA6B,EAAqB,EAAE,CAAC,CAAC;IAC7F,KAAK,EAAE,OAAO,CAAC,mCAAmC;IAClD,WAAW,EAAE,OAAO,CAAC,yCAAyC;IAC9D,WAAW,EAAE,oBAAC,iBAAiB,IAAC,QAAQ,EAAC,gCAAgC,GAAG;CAC7E,CAAC,CAAC;AAEH,MAAM,wBAAwB,GAAG,CAC/B,OAA6B,EAC7B,WAAmC,EAChB,EAAE;IACrB,IAAI,uBAAuB,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE;QACnD,OAAO;YACL,KAAK,EAAG,WAAW,CAAC,UAAoC,CAAC,WAAW;YACpE,WAAW,EAAE,6BAA6B,CAAC,OAAO,CAAC;SACpD,CAAC;KACH;SAAM;QACL,OAAO;YACL,KAAK,EAAE,6BAA6B,CAAC,OAAO,CAAC;SAC9C,CAAC;KACH;AACH,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,CAAC,OAA6B,EAAU,EAAE;IAC9E,6CAA6C,CAAC,mDAAmD;IACjG,OAAO,OAAO,CAAC,2BAA2B,CAAC;IAC3C,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\nimport { ErrorBar } from '@internal/react-components';\nimport { useSelector } from '../hooks/useSelector';\nimport { lobbySelector } from '../selectors/lobbySelector';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { LobbyOverlayProps, LobbyTile } from '../components/LobbyTile';\nimport { getCallStatus, getRemoteParticipants } from '../selectors/baseSelectors';\nimport { disableCallControls, reduceCallControlsForMobile } from '../utils';\nimport { CallCompositeStrings } from '../Strings';\nimport { useLocale } from '../../localization';\nimport { useLocalVideoStartTrigger } from '../components/MediaGallery';\nimport { CallCompositeIcon } from '../../common/icons';\nimport { isPhoneNumberIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';\nimport { RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n\n/**\n * @private\n */\nexport interface LobbyPageProps {\n mobileView: boolean;\n modalLayerHostId: string;\n options?: CallCompositeOptions;\n mobileChatTabHeader: MobileChatSidePaneTabHeaderProps | undefined;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n}\n\n/**\n * @private\n */\nexport const LobbyPage = (props: LobbyPageProps): JSX.Element => {\n const errorBarProps = usePropsFor(ErrorBar);\n const lobbyProps = useSelector(lobbySelector);\n const strings = useLocale().strings.call;\n\n const callState = useSelector(getCallStatus);\n const inLobby = callState === 'InLobby';\n\n const participants = useSelector(getRemoteParticipants) ?? {};\n\n useLocalVideoStartTrigger(lobbyProps.localParticipantVideoStream.isAvailable, inLobby);\n\n // Reduce the controls shown when mobile view is enabled.\n let callControlOptions = props.mobileView\n ? reduceCallControlsForMobile(props.options?.callControls)\n : props.options?.callControls;\n\n callControlOptions = disableCallControls(callControlOptions, ['screenShareButton', 'participantsButton']);\n\n return (\n <CallArrangement\n complianceBannerProps={{ strings }}\n // Ignore errors from before current call. This avoids old errors from showing up when a user re-joins a call.\n errorBarProps={props.options?.errorBar !== false && { ...errorBarProps, ignorePremountErrors: true }}\n callControlProps={{\n options: callControlOptions,\n increaseFlyoutItemSize: props.mobileView\n }}\n mobileView={props.mobileView}\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() => (\n <LobbyTile {...lobbyProps} overlayProps={overlayProps(strings, inLobby, Object.values(participants))} />\n )}\n dataUiId={'lobby-page'}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n />\n );\n};\n\nconst overlayProps = (\n strings: CallCompositeStrings,\n inLobby: boolean,\n remoteParticipants: RemoteParticipantState[]\n): LobbyOverlayProps => {\n /**\n * Only grab the first participant because there will only be one in this situation.\n * when starting a call with multiple people the call goes to the connected state and composite goes directly to\n * videoGallery.\n *\n * We also need to check the participant state since in a group call the remote participants array will populate just before\n * the user joins. In this situation we also check the participant states. in a groupCall the state of the participants\n * will be 'Idle'.\n */\n const outboundCallParticipant: RemoteParticipantState | undefined =\n remoteParticipants[0] &&\n ['Ringing', 'Connecting'].includes(remoteParticipants[0].state) &&\n remoteParticipants.length === 1\n ? remoteParticipants[0]\n : undefined;\n\n return inLobby\n ? overlayPropsWaitingToBeAdmitted(strings)\n : outboundCallParticipant\n ? overlayPropsOutboundCall(strings, outboundCallParticipant)\n : overlayPropsConnectingToCall(strings);\n};\n\nconst overlayPropsConnectingToCall = (strings: CallCompositeStrings): LobbyOverlayProps => ({\n title: strings.lobbyScreenConnectingToCallTitle,\n moreDetails: strings.lobbyScreenConnectingToCallMoreDetails,\n overlayIcon: <CallCompositeIcon iconName=\"LobbyScreenConnectingToCall\" />\n});\n\nconst overlayPropsWaitingToBeAdmitted = (strings: CallCompositeStrings): LobbyOverlayProps => ({\n title: strings.lobbyScreenWaitingToBeAdmittedTitle,\n moreDetails: strings.lobbyScreenWaitingToBeAdmittedMoreDetails,\n overlayIcon: <CallCompositeIcon iconName=\"LobbyScreenWaitingToBeAdmitted\" />\n});\n\nconst overlayPropsOutboundCall = (\n strings: CallCompositeStrings,\n participant: RemoteParticipantState\n): LobbyOverlayProps => {\n if (isPhoneNumberIdentifier(participant.identifier)) {\n return {\n title: (participant.identifier as PhoneNumberIdentifier).phoneNumber,\n moreDetails: outboundCallStringsTrampoline(strings)\n };\n } else {\n return {\n title: outboundCallStringsTrampoline(strings)\n };\n }\n};\n\nconst outboundCallStringsTrampoline = (strings: CallCompositeStrings): string => {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return strings.outboundCallingNoticeString;\n return '';\n};\n\"../../../../../react-components/src\"\"../../../../../calling-stateful-client/src\""]}
@@ -55,4 +55,6 @@ export declare const startCallButtonStyleMobile: string;
55
55
  * @private
56
56
  */
57
57
  export declare const effectsButtonStyles: (theme: Theme) => IButtonStyles;
58
+ /** @private */
59
+ export declare const fillWidth: string;
58
60
  //# sourceMappingURL=CallConfiguration.styles.d.ts.map
@@ -117,4 +117,8 @@ export const effectsButtonStyles = (theme) => {
117
117
  }
118
118
  };
119
119
  };
120
+ /** @private */
121
+ export const fillWidth = mergeStyles({
122
+ width: '100%'
123
+ });
120
124
  //# sourceMappingURL=CallConfiguration.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CallConfiguration.styles.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAKL,WAAW,EAGZ,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAiB;IAC3D,WAAW,EAAE,MAAM;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAiB;IAC1D,WAAW,EAAE,MAAM;CACpB,CAAC;AAEF,MAAM,2BAA2B,GAAW;IAC1C,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,QAAQ;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,WAAW,iCACxD,2BAA2B,KAC9B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,OAAO,CAAC,gEAAgE;IACnF,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,WAAW,iCACvD,2BAA2B,KAC9B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,OAAO,IAClB,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW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AEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAY,EAAiB,EAAE;IACjE,OAAO;QACL,IAAI,EAAE;YACJ,UAAU,EAAE,aAAa;YACzB,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;YACzB,KAAK,EAAE,KAAK;YACZ,SAAS,EAAE,KAAK;YAChB,gBAAgB,EAAE;gBAChB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;aAC1B;SACF;QACD,WAAW,EAAE;YACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;SAC1B;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n IStackItemStyles,\n IStackStyles,\n IStackTokens,\n IStyle,\n mergeStyles,\n IButtonStyles,\n Theme\n} from '@fluentui/react';\n\n/**\n * @private\n */\nexport const configurationStackTokensDesktop: IStackTokens = {\n childrenGap: '2rem'\n};\n\n/**\n * @private\n */\nexport const configurationStackTokensMobile: IStackTokens = {\n childrenGap: '1rem'\n};\n\nconst configurationContainerStyle: IStyle = {\n height: '100%',\n width: '100%',\n padding: '0.5rem'\n};\n\n/**\n * @private\n */\nexport const configurationContainerStyleDesktop = mergeStyles({\n ...configurationContainerStyle,\n minWidth: '25rem', // sum of min-width from children + ChildrenGap * (nb of children - 1) + padding * 2 = (11 + 11) + (2 * 1) + 0.5 * 2\n minHeight: '22rem' // max height of SelectionContainer + padding * 2 = 21 + 0.5 * 2\n});\n\n/**\n * @private\n */\nexport const configurationContainerStyleMobile = mergeStyles({\n ...configurationContainerStyle,\n minWidth: '16rem', // from LocalPreview: ControlBar width + 0.5 * 2 for spacing + padding * 2 = 14 + 0.5 * 2 + 0.5 * 2\n minHeight: '13rem'\n});\n\n/**\n * @private\n */\nexport const selectionContainerStyle = mergeStyles({\n width: '50%',\n minWidth: '11rem',\n maxWidth: '18.75rem',\n padding: '0.5rem'\n});\n\n/**\n * @private\n */\nexport const titleContainerStyleDesktop = mergeStyles({\n fontSize: '1.25rem',\n lineHeight: '1.75rem',\n fontWeight: 600\n});\n\n/**\n * @private\n */\nexport const titleContainerStyleMobile = mergeStyles({\n fontSize: '1.0625rem',\n lineHeight: '1.375rem',\n fontWeight: 600,\n textAlign: 'center'\n});\n\n/**\n * @private\n */\nexport const callDetailsContainerStylesDesktop: IStackItemStyles = {\n root: {\n marginBottom: '1.563rem'\n }\n};\n\nconst callDetailsStyle: IStyle = {\n fontSize: '0.9375',\n lineHeight: '1.25rem',\n marginTop: '0.25rem'\n};\n\n/**\n * @private\n */\nexport const callDetailsStyleDesktop = mergeStyles({\n ...callDetailsStyle\n});\n\n/**\n * @private\n */\nexport const callDetailsStyleMobile = mergeStyles({\n ...callDetailsStyle,\n textAlign: 'center'\n});\n\n/**\n * @private\n */\nexport const startCallButtonContainerStyleDesktop: IStackStyles = {\n root: {\n paddingTop: '1.125rem'\n }\n};\n\n/**\n * @private\n */\nexport const startCallButtonContainerStyleMobile: IStackStyles = {\n root: {\n textAlign: 'center'\n }\n};\n\n/**\n * @private\n */\nexport const startCallButtonStyleMobile = mergeStyles({\n width: '100%',\n maxWidth: 'unset'\n});\n\n/**\n * @private\n */\nexport const effectsButtonStyles = (theme: Theme): IButtonStyles => {\n return {\n root: {\n background: 'transparent',\n border: 'none',\n color: theme.palette.blue,\n width: '40%',\n alignSelf: 'end',\n ':hover, :focus': {\n color: theme.palette.blue\n }\n },\n rootChecked: {\n color: theme.palette.blue\n }\n };\n};\n"]}
1
+ {"version":3,"file":"CallConfiguration.styles.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAKL,WAAW,EAGZ,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAiB;IAC3D,WA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AAS;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,mBAC7C,gBAAgB,EACnB,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,iCAC5C,gBAAgB,KACnB,SAAS,EAAE,QAAQ,IACnB,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAiB;IAChE,IAAI,EAAE;QACJ,UAAU,EAAE,UAAU;KACvB;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAiB;IAC/D,IAAI,EAAE;QACJ,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,WAAW,CAAC;IACpD,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,OAAO;CAClB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAY,EAAiB,EAAE;IACjE,OAAO;QACL,IAAI,EAAE;YACJ,UAAU,EAAE,aAAa;YACzB,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;YACzB,KAAK,EAAE,KAAK;YACZ,SAAS,EAAE,KAAK;YAChB,gBAAgB,EAAE;gBAChB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;aAC1B;SACF;QACD,WAAW,EAAE;YACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;SAC1B;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe;AACf,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;IACnC,KAAK,EAAE,MAAM;CACd,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n IStackItemStyles,\n IStackStyles,\n IStackTokens,\n IStyle,\n mergeStyles,\n IButtonStyles,\n Theme\n} from '@fluentui/react';\n\n/**\n * @private\n */\nexport const configurationStackTokensDesktop: IStackTokens = {\n childrenGap: '2rem'\n};\n\n/**\n * @private\n */\nexport const configurationStackTokensMobile: IStackTokens = {\n childrenGap: '1rem'\n};\n\nconst configurationContainerStyle: IStyle = {\n height: '100%',\n width: '100%',\n padding: '0.5rem'\n};\n\n/**\n * @private\n */\nexport const configurationContainerStyleDesktop = mergeStyles({\n ...configurationContainerStyle,\n minWidth: '25rem', // sum of min-width from children + ChildrenGap * (nb of children - 1) + padding * 2 = (11 + 11) + (2 * 1) + 0.5 * 2\n minHeight: '22rem' // max height of SelectionContainer + padding * 2 = 21 + 0.5 * 2\n});\n\n/**\n * @private\n */\nexport const configurationContainerStyleMobile = mergeStyles({\n ...configurationContainerStyle,\n minWidth: '16rem', // from LocalPreview: ControlBar width + 0.5 * 2 for spacing + padding * 2 = 14 + 0.5 * 2 + 0.5 * 2\n minHeight: '13rem'\n});\n\n/**\n * @private\n */\nexport const selectionContainerStyle = mergeStyles({\n width: '50%',\n minWidth: '11rem',\n maxWidth: '18.75rem',\n padding: '0.5rem'\n});\n\n/**\n * @private\n */\nexport const titleContainerStyleDesktop = mergeStyles({\n fontSize: '1.25rem',\n lineHeight: '1.75rem',\n fontWeight: 600\n});\n\n/**\n * @private\n */\nexport const titleContainerStyleMobile = mergeStyles({\n fontSize: '1.0625rem',\n lineHeight: '1.375rem',\n fontWeight: 600,\n textAlign: 'center'\n});\n\n/**\n * @private\n */\nexport const callDetailsContainerStylesDesktop: IStackItemStyles = {\n root: {\n marginBottom: '1.563rem'\n }\n};\n\nconst callDetailsStyle: IStyle = {\n fontSize: '0.9375',\n lineHeight: '1.25rem',\n marginTop: '0.25rem'\n};\n\n/**\n * @private\n */\nexport const callDetailsStyleDesktop = mergeStyles({\n ...callDetailsStyle\n});\n\n/**\n * @private\n */\nexport const callDetailsStyleMobile = mergeStyles({\n ...callDetailsStyle,\n textAlign: 'center'\n});\n\n/**\n * @private\n */\nexport const startCallButtonContainerStyleDesktop: IStackStyles = {\n root: {\n paddingTop: '1.125rem'\n }\n};\n\n/**\n * @private\n */\nexport const startCallButtonContainerStyleMobile: IStackStyles = {\n root: {\n textAlign: 'center'\n }\n};\n\n/**\n * @private\n */\nexport const startCallButtonStyleMobile = mergeStyles({\n width: '100%',\n maxWidth: 'unset'\n});\n\n/**\n * @private\n */\nexport const effectsButtonStyles = (theme: Theme): IButtonStyles => {\n return {\n root: {\n background: 'transparent',\n border: 'none',\n color: theme.palette.blue,\n width: '40%',\n alignSelf: 'end',\n ':hover, :focus': {\n color: theme.palette.blue\n }\n },\n rootChecked: {\n color: theme.palette.blue\n }\n };\n};\n\n/** @private */\nexport const fillWidth = mergeStyles({\n width: '100%'\n});\n"]}
@@ -1,6 +1,6 @@
1
1
  import { BaseCustomStyles, ControlBarButtonStyles } from "../../../../../react-components/src";
2
2
  import { CustomCallControlButtonPlacement } from '../../common/ControlBar/CustomButton';
3
- import { CallControlDisplayType, CommonCallControlOptions } from '../../common/types/CommonCallControlOptions';
3
+ import { CallControlDisplayType, CommonCallControlOptions, _CommonCallControlOptions } from '../../common/types/CommonCallControlOptions';
4
4
  /**
5
5
  * Customization options for the control bar in calling experience.
6
6
  *
@@ -16,6 +16,14 @@ export declare type CallControlOptions = CommonCallControlOptions & {
16
16
  };
17
17
  legacyControlBarExperience?: boolean;
18
18
  };
19
+ /**
20
+ * While the API for the legacyControlBarExperience is in beta. Use this type to access the internal
21
+ * API.
22
+ * @internal
23
+ */
24
+ export declare type _CallControlOptions = _CommonCallControlOptions & {
25
+ legacyControlBarExperience?: boolean;
26
+ };
19
27
  /**
20
28
  * Arguments for {@link CustomCallControlButtonCallback}.
21
29
  *
@@ -1 +1 @@
1
- {"version":3,"file":"CallControlOptions.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/types/CallControlOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { BaseCustomStyles, ControlBarButtonStyles } from '@internal/react-components';\nimport { CustomCallControlButtonPlacement } from '../../common/ControlBar/CustomButton';\nimport { CallControlDisplayType, CommonCallControlOptions } from '../../common/types/CommonCallControlOptions';\n\n/**\n * Customization options for the control bar in calling experience.\n *\n * @public\n */\nexport type CallControlOptions =\n | CommonCallControlOptions & {\n /**\n * Show, Hide or Disable participants button during a call. This is the option only work for legacyControl bar.\n * @defaultValue true\n */\n participantsButton?: boolean | { disabled: boolean };\n /* @conditional-compile-remove(new-call-control-bar) */\n legacyControlBarExperience?: boolean;\n };\n\n/**\n * Arguments for {@link CustomCallControlButtonCallback}.\n *\n * @beta\n */\nexport interface CustomCallControlButtonCallbackArgs {\n /**\n * Buttons should reduce the size to fit a smaller viewport when `displayType` is `'compact'`.\n *\n * @defaultValue `'default'`\n */\n displayType?: CallControlDisplayType;\n}\n\n/**\n * Includes the base props necessary to render a {@link ControlBarButton} or {@link DrawerMenuItem}.\n *\n * @beta\n */\nexport interface CustomControlButtonProps {\n /**\n * Calback for when button is clicked\n */\n onItemClick?: () => void;\n /**\n * Whether the buttons is disabled\n */\n disabled?: boolean;\n /**\n * Whether the label is displayed or not.\n *\n * @defaultValue `false`\n */\n showLabel?: boolean;\n /**\n * Fluent styles, common to all {@link ControlBarButton}s or {@link DrawerMenuItem}s.\n */\n styles?: ControlBarButtonStyles | BaseCustomStyles;\n /**\n * Optional label for the button\n */\n text?: string;\n /**\n * A unique key for the button\n */\n key?: string | number;\n /**\n * The aria label of the button for the benefit of screen readers.\n */\n ariaLabel?: string;\n /**\n * Detailed description of the button for the benefit of screen readers.\n */\n ariaDescription?: string;\n /**\n * A unique id set for the standard HTML id attibute\n */\n id?: string;\n}\n\n/**\n * Response from {@link CustomCallControlButtonCallback}.\n *\n * Includes the placement prop necessary to indicate where to place the\n * {@link ControlBarButton} and a {@link DrawerMenuItem}\n *\n * @beta\n */\nexport interface CustomCallControlButtonProps extends CustomControlButtonProps {\n /**\n * Where to place the custom button relative to other buttons.\n */\n placement: CustomCallControlButtonPlacement;\n /**\n * Icon to render. Icon is a non-default icon name that needs to be registered as a\n * custom icon using registerIcons through fluentui. Examples include icons from the fluentui library\n */\n iconName?: string;\n}\n\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallControlOptions.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/types/CallControlOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { BaseCustomStyles, ControlBarButtonStyles } from '@internal/react-components';\nimport { CustomCallControlButtonPlacement } from '../../common/ControlBar/CustomButton';\nimport {\n CallControlDisplayType,\n CommonCallControlOptions,\n _CommonCallControlOptions\n} from '../../common/types/CommonCallControlOptions';\n\n/**\n * Customization options for the control bar in calling experience.\n *\n * @public\n */\nexport type CallControlOptions =\n | CommonCallControlOptions & {\n /**\n * Show, Hide or Disable participants button during a call. This is the option only work for legacyControl bar.\n * @defaultValue true\n */\n participantsButton?: boolean | { disabled: boolean };\n /* @conditional-compile-remove(new-call-control-bar) */\n legacyControlBarExperience?: boolean;\n };\n\n/**\n * While the API for the legacyControlBarExperience is in beta. Use this type to access the internal\n * API.\n * @internal\n */\nexport type _CallControlOptions = _CommonCallControlOptions & {\n legacyControlBarExperience?: boolean;\n};\n\n/**\n * Arguments for {@link CustomCallControlButtonCallback}.\n *\n * @beta\n */\nexport interface CustomCallControlButtonCallbackArgs {\n /**\n * Buttons should reduce the size to fit a smaller viewport when `displayType` is `'compact'`.\n *\n * @defaultValue `'default'`\n */\n displayType?: CallControlDisplayType;\n}\n\n/**\n * Includes the base props necessary to render a {@link ControlBarButton} or {@link DrawerMenuItem}.\n *\n * @beta\n */\nexport interface CustomControlButtonProps {\n /**\n * Calback for when button is clicked\n */\n onItemClick?: () => void;\n /**\n * Whether the buttons is disabled\n */\n disabled?: boolean;\n /**\n * Whether the label is displayed or not.\n *\n * @defaultValue `false`\n */\n showLabel?: boolean;\n /**\n * Fluent styles, common to all {@link ControlBarButton}s or {@link DrawerMenuItem}s.\n */\n styles?: ControlBarButtonStyles | BaseCustomStyles;\n /**\n * Optional label for the button\n */\n text?: string;\n /**\n * A unique key for the button\n */\n key?: string | number;\n /**\n * The aria label of the button for the benefit of screen readers.\n */\n ariaLabel?: string;\n /**\n * Detailed description of the button for the benefit of screen readers.\n */\n ariaDescription?: string;\n /**\n * A unique id set for the standard HTML id attibute\n */\n id?: string;\n}\n\n/**\n * Response from {@link CustomCallControlButtonCallback}.\n *\n * Includes the placement prop necessary to indicate where to place the\n * {@link ControlBarButton} and a {@link DrawerMenuItem}\n *\n * @beta\n */\nexport interface CustomCallControlButtonProps extends CustomControlButtonProps {\n /**\n * Where to place the custom button relative to other buttons.\n */\n placement: CustomCallControlButtonPlacement;\n /**\n * Icon to render. Icon is a non-default icon name that needs to be registered as a\n * custom icon using registerIcons through fluentui. Examples include icons from the fluentui library\n */\n iconName?: string;\n}\n\"../../../../../react-components/src\""]}
@@ -1,47 +1,32 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  import React, { useCallback, useState, useMemo, useEffect, useRef } from 'react';
4
- import { LayerHost, mergeStyles, Stack } from '@fluentui/react';
5
- import { CallComposite } from '../CallComposite';
6
- import { CallAdapterProvider } from '../CallComposite/adapter/CallAdapterProvider';
7
- import { CommonCallControlBar } from '../common/ControlBar/CommonCallControlBar';
8
- import { callCompositeContainerStyles, compositeOuterContainerStyles, controlBarContainerStyles } from './styles/CallWithChatCompositeStyles';
4
+ import { mergeStyles, Stack } from '@fluentui/react';
5
+ import { callCompositeContainerStyles, compositeOuterContainerStyles } from './styles/CallWithChatCompositeStyles';
9
6
  import { CallWithChatBackedCallAdapter } from './adapter/CallWithChatBackedCallAdapter';
10
7
  import { CallWithChatBackedChatAdapter } from './adapter/CallWithChatBackedChatAdapter';
8
+ import { ChatComposite } from '../ChatComposite';
11
9
  import { BaseProvider } from '../common/BaseComposite';
12
- import { ChatAdapterProvider } from '../ChatComposite/adapter/ChatAdapterProvider';
13
- import { PreparedMoreDrawer } from '../common/Drawer/PreparedMoreDrawer';
14
- import { _useContainerHeight, _useContainerWidth } from "../../../../react-components/src";
10
+ import { useTheme } from "../../../../react-components/src";
15
11
  import { useId } from '@fluentui/react-hooks';
16
- import { CallWithChatPane } from './CallWithChatPane';
17
12
  import { containerDivStyles } from '../common/ContainerRectProps';
18
- import { modalLayerHostStyle } from '../common/styles/ModalLocalAndRemotePIP.styles';
19
- /* @conditional-compile-remove(PSTN-calls) */
20
- import { SendDtmfDialpad } from '../common/SendDtmfDialpad';
21
- /* @conditional-compile-remove(PSTN-calls) */
22
13
  import { useCallWithChatCompositeStrings } from './hooks/useCallWithChatCompositeStrings';
23
- import { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';
24
- /* @conditional-compile-remove(video-background-effects) */
25
- import { VideoEffectsPane } from '../common/VideoEffectsPane';
14
+ import { CallCompositeInner } from '../CallComposite/CallComposite';
15
+ import { ChatButtonWithUnreadMessagesBadge } from './ChatButton/ChatButtonWithUnreadMessagesBadge';
16
+ import { getDesktopCommonButtonStyles } from '../common/ControlBar/CommonCallControlBar';
17
+ import { isDisabled } from '../CallComposite/utils';
18
+ import { SidePaneHeader } from '../common/SidePaneHeader';
26
19
  const CallWithChatScreen = (props) => {
27
20
  const { callWithChatAdapter, fluentTheme, formFactor = 'desktop' } = props;
28
21
  const mobileView = formFactor === 'mobile';
29
- /* @conditional-compile-remove(video-background-effects) */
30
- const [showVideoEffectsPane, setVideoEffectsPane] = useState(false);
31
- /* @conditional-compile-remove(video-background-effects) */
32
- const setShowVideoEffectsPane = useCallback((showVideoEffectsOptions) => {
33
- setVideoEffectsPane(showVideoEffectsOptions);
34
- }, [setVideoEffectsPane]);
35
22
  if (!callWithChatAdapter) {
36
23
  throw new Error('CallWithChatAdapter is undefined');
37
24
  }
38
25
  const callAdapter = useMemo(() => new CallWithChatBackedCallAdapter(callWithChatAdapter), [callWithChatAdapter]);
39
26
  const [currentCallState, setCurrentCallState] = useState();
40
27
  const [currentPage, setCurrentPage] = useState();
41
- const [activePane, setActivePane] = useState('none');
28
+ const [isChatOpen, setIsChatOpen] = useState(false);
42
29
  const containerRef = useRef(null);
43
- const containerWidth = _useContainerWidth(containerRef);
44
- const containerHeight = _useContainerHeight(containerRef);
45
30
  useEffect(() => {
46
31
  const updateCallWithChatPage = (newState) => {
47
32
  var _a;
@@ -54,105 +39,80 @@ const CallWithChatScreen = (props) => {
54
39
  callWithChatAdapter.offStateChange(updateCallWithChatPage);
55
40
  };
56
41
  }, [callWithChatAdapter]);
57
- const closePane = useCallback(() => {
58
- setActivePane('none');
59
- }, [setActivePane]);
60
42
  const chatProps = useMemo(() => {
61
43
  return {
62
44
  adapter: new CallWithChatBackedChatAdapter(callWithChatAdapter)
63
45
  };
64
46
  }, [callWithChatAdapter]);
65
- const modalLayerHostId = useId('modalLayerhost');
66
- const isInLobbyOrConnecting = currentPage === 'lobby';
67
- /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
68
- const isInLocalHold = currentPage === 'hold';
69
- const hasJoinedCall = !!(currentPage && hasJoinedCallFn(currentPage, currentCallState !== null && currentCallState !== void 0 ? currentCallState : 'None'));
70
- const showControlBar = isInLobbyOrConnecting || hasJoinedCall;
71
- const isMobileWithActivePane = mobileView && hasJoinedCall && activePane !== 'none';
72
47
  /** Constant setting of id for the parent stack of the composite */
73
48
  const compositeParentDivId = useId('callWithChatCompositeParentDiv-internal');
74
- const toggleChat = useCallback(() => {
75
- if (activePane === 'chat' || !hasJoinedCall) {
76
- setActivePane('none');
77
- }
78
- else {
79
- setActivePane('chat');
80
- // timeout is required to give the window time to render the sendbox so we have something to send focus to.
81
- // TODO: Selecting elements in the DOM via attributes is not stable. We should expose an API from ChatComposite to be able to focus on the sendbox.
82
- const chatFocusTimeout = setInterval(() => {
83
- const callWithChatCompositeRootDiv = document.querySelector(`[id="${compositeParentDivId}"]`);
84
- const sendbox = callWithChatCompositeRootDiv === null || callWithChatCompositeRootDiv === void 0 ? void 0 : callWithChatCompositeRootDiv.querySelector(`[id="sendbox"]`);
85
- if (sendbox !== null) {
86
- sendbox.focus();
87
- clearInterval(chatFocusTimeout);
88
- }
89
- }, 3);
90
- setTimeout(() => {
91
- clearInterval(chatFocusTimeout);
92
- }, 300);
93
- }
94
- }, [activePane, setActivePane, compositeParentDivId, hasJoinedCall]);
95
- const togglePeople = useCallback(() => {
96
- if (activePane === 'people' || !hasJoinedCall) {
97
- setActivePane('none');
98
- }
99
- else {
100
- setActivePane('people');
101
- }
102
- }, [activePane, setActivePane, hasJoinedCall]);
103
- const selectChat = useCallback(() => {
104
- if (hasJoinedCall) {
105
- setActivePane('chat');
106
- }
107
- }, [setActivePane, hasJoinedCall]);
108
- const selectPeople = useCallback(() => {
109
- if (hasJoinedCall) {
110
- setActivePane('people');
111
- }
112
- }, [setActivePane, hasJoinedCall]);
113
- const [showDrawer, setShowDrawer] = useState(false);
114
- const onMoreButtonClicked = useCallback(() => {
115
- closePane();
116
- setShowDrawer(true);
117
- }, [closePane]);
118
- const closeDrawer = useCallback(() => {
119
- setShowDrawer(false);
49
+ const closeChat = useCallback(() => {
50
+ setIsChatOpen(false);
120
51
  }, []);
121
- const onMoreDrawerPeopleClicked = useCallback(() => {
122
- setShowDrawer(false);
123
- togglePeople();
124
- }, [togglePeople]);
125
- // On mobile, when there is an active call and some side pane is active,
126
- // we hide the call composite via CSS to show only the pane.
127
- // We only set `display` to `none` instead of unmounting the call composite component tree
128
- // to avoid the performance cost of rerendering video streams when we later show the composite again.
129
- const callCompositeContainerCSS = useMemo(() => {
130
- return { display: isMobileWithActivePane ? 'none' : 'flex' };
131
- }, [isMobileWithActivePane]);
132
- /* @conditional-compile-remove(PSTN-calls) */
133
- const [showDtmfDialpad, setShowDtmfDialpad] = useState(false);
134
- /* @conditional-compile-remove(PSTN-calls) */
135
- const onDismissDtmfDialpad = () => {
136
- setShowDtmfDialpad(false);
137
- };
138
- /* @conditional-compile-remove(PSTN-calls) */
139
- const onClickShowDialpad = () => {
140
- setShowDtmfDialpad(true);
141
- };
142
- /* @conditional-compile-remove(PSTN-calls) */
52
+ const openChat = useCallback(() => {
53
+ setIsChatOpen(true);
54
+ // timeout is required to give the window time to render the sendbox so we have something to send focus to.
55
+ // TODO: Selecting elements in the DOM via attributes is not stable. We should expose an API from ChatComposite to be able to focus on the sendbox.
56
+ const chatFocusTimeout = setInterval(() => {
57
+ const callWithChatCompositeRootDiv = document.querySelector(`[id="${compositeParentDivId}"]`);
58
+ const sendbox = callWithChatCompositeRootDiv === null || callWithChatCompositeRootDiv === void 0 ? void 0 : callWithChatCompositeRootDiv.querySelector(`[id="sendbox"]`);
59
+ if (sendbox !== null) {
60
+ sendbox.focus();
61
+ clearInterval(chatFocusTimeout);
62
+ }
63
+ }, 3);
64
+ setTimeout(() => {
65
+ clearInterval(chatFocusTimeout);
66
+ }, 300);
67
+ }, [compositeParentDivId]);
68
+ const hasJoinedCall = !!(currentPage && hasJoinedCallFn(currentPage, currentCallState !== null && currentCallState !== void 0 ? currentCallState : 'None'));
69
+ const toggleChat = useCallback(() => {
70
+ isChatOpen || !hasJoinedCall ? closeChat() : openChat();
71
+ }, [closeChat, hasJoinedCall, isChatOpen, openChat]);
143
72
  const callWithChatStrings = useCallWithChatCompositeStrings();
144
- /* @conditional-compile-remove(PSTN-calls) */
145
- const dialpadStrings = useMemo(() => ({
146
- dialpadModalAriaLabel: callWithChatStrings.dialpadModalAriaLabel,
147
- dialpadCloseModalButtonAriaLabel: callWithChatStrings.dialpadCloseModalButtonAriaLabel,
148
- placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText
73
+ const chatButtonStrings = useMemo(() => ({
74
+ label: callWithChatStrings.chatButtonLabel,
75
+ tooltipOffContent: callWithChatStrings.chatButtonTooltipOpen,
76
+ tooltipOnContent: callWithChatStrings.chatButtonTooltipClose
149
77
  }), [callWithChatStrings]);
150
- /* @conditional-compile-remove(PSTN-calls) */
151
- const alternateCallerId = callAdapter.getState().alternateCallerId;
152
- /* @conditional-compile-remove(close-captions) */
153
- const isTeamsCall = callAdapter.getState().isTeamsCall;
78
+ const theme = useTheme();
79
+ const commonButtonStyles = useMemo(() => (!mobileView ? getDesktopCommonButtonStyles(theme) : undefined), [mobileView, theme]);
80
+ const showChatButton = checkShowChatButton(props.callControls);
81
+ const chatButtonDisabled = showChatButton && (checkChatButtonIsDisabled(props.callControls) || !hasJoinedCall);
82
+ const chatTabHeaderProps = useMemo(() => mobileView && showChatButton
83
+ ? {
84
+ onClick: toggleChat,
85
+ disabled: chatButtonDisabled
86
+ }
87
+ : undefined, [chatButtonDisabled, mobileView, toggleChat, showChatButton]);
88
+ const customChatButton = useCallback((args) => ({
89
+ placement: mobileView ? 'primary' : 'secondary',
90
+ onRenderButton: () => (React.createElement(ChatButtonWithUnreadMessagesBadge, { chatAdapter: chatProps.adapter, isChatPaneVisible: isChatOpen, checked: isChatOpen, showLabel: args.displayType !== 'compact', onClick: toggleChat, disabled: chatButtonDisabled, strings: chatButtonStrings, styles: commonButtonStyles, newMessageLabel: callWithChatStrings.chatButtonNewMessageNotificationLabel }))
91
+ }), [
92
+ callWithChatStrings.chatButtonNewMessageNotificationLabel,
93
+ chatButtonStrings,
94
+ chatProps.adapter,
95
+ commonButtonStyles,
96
+ isChatOpen,
97
+ chatButtonDisabled,
98
+ mobileView,
99
+ toggleChat
100
+ ]);
101
+ const callControlOptionsFromProps = useMemo(() => (Object.assign({}, (typeof props.callControls === 'object' ? props.callControls : {}))), [props.callControls]);
102
+ const injectedCustomButtonsFromProps = useMemo(() => {
103
+ var _a;
104
+ /* @conditional-compile-remove(control-bar-button-injection) */
105
+ return [...((_a = callControlOptionsFromProps.onFetchCustomButtonProps) !== null && _a !== void 0 ? _a : [])];
106
+ return [];
107
+ }, [callControlOptionsFromProps]);
154
108
  const callCompositeOptions = useMemo(() => ({
155
- callControls: false,
109
+ callControls: props.callControls === false
110
+ ? false
111
+ : Object.assign(Object.assign({}, callControlOptionsFromProps), { onFetchCustomButtonProps: [
112
+ ...(showChatButton ? [customChatButton] : []),
113
+ /* @conditional-compile-remove(control-bar-button-injection) */
114
+ ...injectedCustomButtonsFromProps
115
+ ], legacyControlBarExperience: false }),
156
116
  /* @conditional-compile-remove(call-readiness) */
157
117
  deviceChecks: props.deviceChecks,
158
118
  /* @conditional-compile-remove(call-readiness) */
@@ -162,6 +122,11 @@ const CallWithChatScreen = (props) => {
162
122
  /* @conditional-compile-remove(unsupported-browser) */
163
123
  onEnvironmentInfoTroubleshootingClick: props.onEnvironmentInfoTroubleshootingClick
164
124
  }), [
125
+ props.callControls,
126
+ callControlOptionsFromProps,
127
+ showChatButton,
128
+ customChatButton,
129
+ injectedCustomButtonsFromProps,
165
130
  /* @conditional-compile-remove(call-readiness) */
166
131
  props.deviceChecks,
167
132
  /* @conditional-compile-remove(unsupported-browser) */
@@ -171,49 +136,44 @@ const CallWithChatScreen = (props) => {
171
136
  /* @conditional-compile-remove(call-readiness) */
172
137
  props.onPermissionsTroubleshootingClick
173
138
  ]);
139
+ const onRenderChatContent = useCallback(() => (React.createElement(ChatComposite, Object.assign({}, chatProps, { fluentTheme: theme, options: {
140
+ topic: false,
141
+ /* @conditional-compile-remove(chat-composite-participant-pane) */
142
+ participantPane: false,
143
+ /* @conditional-compile-remove(file-sharing) */
144
+ fileSharing: props.fileSharing
145
+ }, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData }))), [
146
+ chatProps,
147
+ /* @conditional-compile-remove(file-sharing) */ props.fileSharing,
148
+ props.onFetchAvatarPersonaData,
149
+ theme
150
+ ]);
151
+ const sidePaneHeaderRenderer = useCallback(() => {
152
+ var _a;
153
+ return (React.createElement(SidePaneHeader, { headingText: callWithChatStrings.chatPaneTitle, onClose: closeChat, dismissSidePaneButtonAriaLabel: (_a = callWithChatStrings.dismissSidePaneButtonLabel) !== null && _a !== void 0 ? _a : '', mobileView: mobileView }));
154
+ }, [callWithChatStrings.chatPaneTitle, callWithChatStrings.dismissSidePaneButtonLabel, closeChat, mobileView]);
155
+ const sidePaneContentRenderer = useMemo(() => (hasJoinedCall ? onRenderChatContent : undefined), [hasJoinedCall, onRenderChatContent]);
156
+ const sidePaneRenderer = useMemo(() => ({
157
+ contentRenderer: sidePaneContentRenderer,
158
+ headerRenderer: sidePaneHeaderRenderer,
159
+ id: 'chat'
160
+ }), [sidePaneContentRenderer, sidePaneHeaderRenderer]);
161
+ const overrideSidePaneProps = useMemo(() => ({
162
+ renderer: sidePaneRenderer,
163
+ isActive: isChatOpen,
164
+ persistRenderingWhenClosed: true
165
+ }), [isChatOpen, sidePaneRenderer]);
166
+ const onSidePaneIdChange = useCallback((sidePaneId) => {
167
+ // If the pane is switched to something other than chat, removing rendering chat.
168
+ if (sidePaneId && sidePaneId !== 'chat') {
169
+ closeChat();
170
+ }
171
+ }, [closeChat]);
174
172
  return (React.createElement("div", { ref: containerRef, className: mergeStyles(containerDivStyles) },
175
173
  React.createElement(Stack, { verticalFill: true, grow: true, styles: compositeOuterContainerStyles, id: compositeParentDivId },
176
174
  React.createElement(Stack, { horizontal: true, grow: true },
177
- React.createElement(Stack.Item, { grow: true, styles: callCompositeContainerStyles(mobileView),
178
- // Perf: Instead of removing the video gallery from DOM, we hide it to prevent re-renders.
179
- style: callCompositeContainerCSS },
180
- React.createElement(CallComposite, Object.assign({}, props, { formFactor: formFactor, options: callCompositeOptions, adapter: callAdapter, fluentTheme: fluentTheme }))),
181
- /* @conditional-compile-remove(video-background-effects) */
182
- React.createElement(CallAdapterProvider, { adapter: callAdapter },
183
- React.createElement(VideoEffectsPane, { showVideoEffectsOptions: showVideoEffectsPane, setshowVideoEffectsOptions: setShowVideoEffectsPane })),
184
- chatProps.adapter && callAdapter && hasJoinedCall && (React.createElement(CallWithChatPane, { chatCompositeProps: chatProps, inviteLink: props.joinInvitationURL, onClose: closePane, chatAdapter: chatProps.adapter, callAdapter: callAdapter, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, onChatButtonClicked: showShowChatTabHeaderButton(props.callControls) ? selectChat : undefined, onPeopleButtonClicked: showShowPeopleTabHeaderButton(props.callControls) ? selectPeople : undefined, modalLayerHostId: modalLayerHostId, mobileView: mobileView, activePane: activePane,
185
- /* @conditional-compile-remove(file-sharing) */
186
- fileSharing: props.fileSharing, rtl: props.rtl, callControls: typeof props.callControls !== 'boolean' ? props.callControls : undefined }))),
187
- showControlBar && !isMobileWithActivePane && (React.createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
188
- React.createElement(Stack.Item, { styles: controlBarContainerStyles },
189
- React.createElement(CommonCallControlBar, { callAdapter: callAdapter, chatAdapter: chatProps.adapter, chatButtonChecked: activePane === 'chat', onChatButtonClicked: toggleChat, peopleButtonChecked: activePane === 'people', onPeopleButtonClicked: togglePeople, onMoreButtonClicked: onMoreButtonClicked, mobileView: mobileView, disableButtonsForLobbyPage: isInLobbyOrConnecting,
190
- /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
191
- disableButtonsForHoldScreen: isInLocalHold, callControls: props.callControls, containerHeight: containerHeight, containerWidth: containerWidth,
192
- /* @conditional-compile-remove(PSTN-calls) */
193
- onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
194
- /* @conditional-compile-remove(close-captions) */
195
- isCaptionsSupported: isTeamsCall && hasJoinedCall,
196
- /* @conditional-compile-remove(video-background-effects) */
197
- onShowVideoEffectsPicker: setShowVideoEffectsPane, rtl: props.rtl })))),
198
- showControlBar && showDrawer && (React.createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
199
- React.createElement(CallAdapterProvider, { adapter: callAdapter },
200
- React.createElement(Stack, { styles: drawerContainerStyles() },
201
- React.createElement(PreparedMoreDrawer, { callControls: props.callControls, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
202
- /* @conditional-compile-remove(PSTN-calls) */
203
- onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
204
- /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
205
- disableButtonsForHoldScreen: isInLocalHold,
206
- /* @conditional-compile-remove(close-captions) */
207
- isCaptionsSupported: isTeamsCall && hasJoinedCall }))))),
208
- /* @conditional-compile-remove(PSTN-calls) */
209
- showControlBar && showDtmfDialpad && (React.createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
210
- React.createElement(CallAdapterProvider, { adapter: callAdapter },
211
- React.createElement(Stack, { styles: drawerContainerStyles() },
212
- React.createElement(SendDtmfDialpad, { isMobile: mobileView, strings: dialpadStrings, showDialpad: showDtmfDialpad, onDismissDialpad: onDismissDtmfDialpad }))))),
213
- // This layer host is for ModalLocalAndRemotePIP in CallWithChatPane. This LayerHost cannot be inside the CallWithChatPane
214
- // because when the CallWithChatPane is hidden, ie. style property display is 'none', it takes up no space. This causes problems when dragging
215
- // the Modal because the draggable bounds thinks it has no space and will always return to its initial position after dragging.
216
- mobileView && React.createElement(LayerHost, { id: modalLayerHostId, className: mergeStyles(modalLayerHostStyle) }))));
175
+ React.createElement(Stack.Item, { grow: true, styles: callCompositeContainerStyles(mobileView) },
176
+ React.createElement(CallCompositeInner, Object.assign({}, props, { formFactor: formFactor, options: callCompositeOptions, adapter: callAdapter, fluentTheme: fluentTheme, callInvitationUrl: props.joinInvitationURL, overrideSidePane: overrideSidePaneProps, onSidePaneIdChange: onSidePaneIdChange, mobileChatTabHeader: chatTabHeaderProps })))))));
217
177
  };
218
178
  /**
219
179
  * CallWithChatComposite brings together key components to provide a full call with chat experience out of the box.
@@ -236,7 +196,7 @@ const hasJoinedCallFn = (page, callStatus) => {
236
196
  (page === 'hold' && (callStatus === 'LocalHold' || callStatus === 'Disconnecting')));
237
197
  return page === 'call' && (callStatus === 'Connected' || callStatus === 'Disconnecting');
238
198
  };
239
- const showShowChatTabHeaderButton = (callControls) => {
199
+ const checkShowChatButton = (callControls) => {
240
200
  if (callControls === undefined || callControls === true) {
241
201
  return true;
242
202
  }
@@ -245,13 +205,7 @@ const showShowChatTabHeaderButton = (callControls) => {
245
205
  }
246
206
  return callControls.chatButton !== false;
247
207
  };
248
- const showShowPeopleTabHeaderButton = (callControls) => {
249
- if (callControls === undefined || callControls === true) {
250
- return true;
251
- }
252
- if (callControls === false) {
253
- return false;
254
- }
255
- return callControls.peopleButton !== false;
208
+ const checkChatButtonIsDisabled = (callControls) => {
209
+ return typeof callControls === 'object' && isDisabled(callControls === null || callControls === void 0 ? void 0 : callControls.chatButton);
256
210
  };
257
211
  //# sourceMappingURL=CallWithChatComposite.js.map