@azure/communication-react 1.3.3-alpha-202210290014.0 → 1.4.1-beta.1

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 (236) hide show
  1. package/{CHANGELOG.md → CHANGELOG.beta.md} +52 -211
  2. package/CHANGELOG.json +2307 -0
  3. package/CHANGELOG.stable.md +287 -0
  4. package/dist/communication-react.d.ts +307 -91
  5. package/dist/dist-cjs/communication-react/index.js +11193 -10508
  6. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetry.d.ts +10 -0
  8. package/dist/dist-esm/acs-ui-common/src/telemetry.js +10 -0
  9. package/dist/dist-esm/acs-ui-common/src/telemetry.js.map +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  11. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -0
  13. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +5 -0
  14. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +51 -0
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +270 -0
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -0
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.d.ts +20 -0
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +36 -0
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -0
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.d.ts +6 -51
  22. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +22 -299
  23. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +43 -0
  25. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +81 -0
  26. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -0
  27. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.d.ts +1 -1
  28. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.js +17 -5
  29. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.js.map +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +2 -2
  31. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  32. package/dist/dist-esm/calling-component-bindings/src/hooks/useSelector.js +3 -3
  33. package/dist/dist-esm/calling-component-bindings/src/hooks/useSelector.js.map +1 -1
  34. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +4 -0
  35. package/dist/dist-esm/calling-component-bindings/src/index.js +4 -0
  36. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  37. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +10 -3
  38. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  39. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +12 -2
  40. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js +25 -1
  41. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
  42. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +16 -2
  43. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +27 -1
  44. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
  45. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +11 -0
  46. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +15 -1
  47. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  48. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +7 -1
  49. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +11 -0
  50. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  51. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +26 -0
  52. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js +4 -0
  53. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -0
  54. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +9 -6
  55. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js +37 -182
  56. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
  57. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +53 -0
  58. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +204 -0
  59. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -0
  60. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +5 -1
  61. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  62. package/dist/dist-esm/calling-stateful-client/src/CallDeclarative.js +4 -65
  63. package/dist/dist-esm/calling-stateful-client/src/CallDeclarative.js.map +1 -1
  64. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.d.ts +13 -0
  65. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +88 -0
  66. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -0
  67. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -2
  68. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  69. package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +4 -3
  70. package/dist/dist-esm/calling-stateful-client/src/Converter.js +4 -0
  71. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  72. package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.d.ts +2 -1
  73. package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.js.map +1 -1
  74. package/dist/dist-esm/calling-stateful-client/src/IncomingCallSubscriber.d.ts +3 -2
  75. package/dist/dist-esm/calling-stateful-client/src/IncomingCallSubscriber.js.map +1 -1
  76. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +16 -0
  77. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  78. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +19 -0
  79. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +89 -0
  80. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +1 -0
  81. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +23 -0
  82. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +48 -0
  83. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -0
  84. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +19 -0
  85. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +35 -0
  86. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -0
  87. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +8 -0
  88. package/dist/dist-esm/calling-stateful-client/src/index-public.js +4 -0
  89. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -0
  90. package/dist/dist-esm/calling-stateful-client/src/index.d.ts +3 -7
  91. package/dist/dist-esm/calling-stateful-client/src/index.js +2 -1
  92. package/dist/dist-esm/calling-stateful-client/src/index.js.map +1 -1
  93. package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js +5 -0
  94. package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js.map +1 -1
  95. package/dist/dist-esm/communication-react/src/index.d.ts +6 -4
  96. package/dist/dist-esm/communication-react/src/index.js +4 -2
  97. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  98. package/dist/dist-esm/react-components/src/components/{BrowserPermissionDenied.d.ts → DevicePermissions/BrowserPermissionDenied.d.ts} +4 -4
  99. package/dist/dist-esm/react-components/src/components/{BrowserPermissionDenied.js → DevicePermissions/BrowserPermissionDenied.js} +8 -6
  100. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +1 -0
  101. package/dist/dist-esm/react-components/src/components/{BrowserPermissionDeniedIOS.d.ts → DevicePermissions/BrowserPermissionDeniedIOS.d.ts} +1 -1
  102. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +58 -0
  103. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +1 -0
  104. package/dist/dist-esm/react-components/src/components/{DevicePermissionDropdown.d.ts → DevicePermissions/DevicePermissionDropdown.d.ts} +4 -0
  105. package/dist/dist-esm/react-components/src/components/{DevicePermissionDropdown.js → DevicePermissions/DevicePermissionDropdown.js} +3 -2
  106. package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.js.map +1 -0
  107. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.d.ts +101 -0
  108. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js +80 -0
  109. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js.map +1 -0
  110. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.d.ts +86 -0
  111. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.js +31 -0
  112. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.js.map +1 -0
  113. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +1 -1
  114. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  115. package/dist/dist-esm/react-components/src/components/MessageThread.js +7 -11
  116. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  117. package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js +3 -3
  118. package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +4 -0
  120. package/dist/dist-esm/react-components/src/components/VideoTile.js +9 -2
  121. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  122. package/dist/dist-esm/react-components/src/components/index.d.ts +9 -8
  123. package/dist/dist-esm/react-components/src/components/index.js +4 -4
  124. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  125. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +0 -2
  126. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -1
  127. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.d.ts +4 -0
  128. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js +10 -1
  129. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js.map +1 -1
  130. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +1 -1
  131. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.d.ts +1 -5
  133. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js +0 -11
  134. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js.map +1 -1
  135. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +4 -0
  136. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +6 -0
  137. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  138. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +7 -0
  139. package/dist/dist-esm/react-components/src/components/utils/merge.js +16 -0
  140. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +1 -0
  141. package/dist/dist-esm/react-components/src/components/utils.d.ts +4 -0
  142. package/dist/dist-esm/react-components/src/components/utils.js +6 -0
  143. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  144. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +21 -5
  145. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  146. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +56 -2
  147. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +2 -1
  148. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -1
  149. package/dist/dist-esm/react-components/src/theming/icons.d.ts +4 -1
  150. package/dist/dist-esm/react-components/src/theming/icons.js +30 -18
  151. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  152. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +6 -0
  153. package/dist/dist-esm/react-components/src/theming/icons.styles.js +25 -0
  154. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -0
  155. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +3 -0
  156. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  157. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -5
  158. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +23 -17
  159. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  160. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  161. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +25 -3
  162. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +24 -11
  163. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  164. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +7 -0
  165. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  166. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +1 -0
  167. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  168. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +14 -12
  169. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  170. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +4 -4
  171. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  172. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js +2 -2
  173. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +1 -1
  174. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.d.ts +2 -0
  175. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js +4 -2
  176. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js.map +1 -1
  177. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.d.ts +1 -0
  178. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js +4 -2
  179. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js.map +1 -1
  180. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.d.ts +2 -0
  181. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js +6 -4
  182. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js.map +1 -1
  183. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +2 -0
  184. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +11 -3
  185. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  186. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +1 -0
  187. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +76 -5
  188. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  189. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +5 -0
  190. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +5 -0
  191. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  192. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.d.ts +6 -2
  193. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +9 -4
  194. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.map +1 -1
  195. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +8 -0
  196. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +26 -0
  197. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  198. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +4 -3
  199. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  200. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +3 -3
  201. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +1 -1
  202. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -1
  203. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  204. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +0 -2
  205. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +0 -13
  206. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  207. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +3 -1
  208. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  209. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -1
  210. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  211. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +1 -1
  212. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
  213. package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js +10 -1
  214. package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js.map +1 -1
  215. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +2 -2
  216. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
  217. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -1
  218. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  219. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  220. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +2 -2
  221. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -1
  222. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +1 -1
  223. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
  224. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +1 -1
  225. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
  226. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +4 -1
  227. package/dist/dist-esm/react-composites/src/composites/common/icons.js +2 -2
  228. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  229. package/package.json +12 -12
  230. package/dist/dist-esm/react-components/src/components/BrowserPermissionDenied.js.map +0 -1
  231. package/dist/dist-esm/react-components/src/components/BrowserPermissionDeniedIOS.js +0 -57
  232. package/dist/dist-esm/react-components/src/components/BrowserPermissionDeniedIOS.js.map +0 -1
  233. package/dist/dist-esm/react-components/src/components/DevicePermissionDropdown.js.map +0 -1
  234. package/dist/dist-esm/react-components/src/components/DomainPermissions.d.ts +0 -53
  235. package/dist/dist-esm/react-components/src/components/DomainPermissions.js +0 -43
  236. package/dist/dist-esm/react-components/src/components/DomainPermissions.js.map +0 -1
@@ -0,0 +1,35 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ /**
4
+ * @internal
5
+ */
6
+ export const _isACSCall = (call) => {
7
+ /* @conditional-compile-remove(teams-identity-support) */
8
+ return call.kind === 'Call';
9
+ return true;
10
+ };
11
+ /**
12
+ * @internal
13
+ */
14
+ export const _isACSCallAgent = (callAgent) => {
15
+ /* @conditional-compile-remove(teams-identity-support) */
16
+ return callAgent.kind === 'CallAgent';
17
+ return true;
18
+ };
19
+ /**
20
+ * @internal
21
+ */
22
+ export const _isTeamsCall = (call) => {
23
+ /* @conditional-compile-remove(teams-identity-support) */
24
+ return call.kind === 'TeamsCall';
25
+ return false;
26
+ };
27
+ /**
28
+ * @internal
29
+ */
30
+ export const _isTeamsCallAgent = (callAgent) => {
31
+ /* @conditional-compile-remove(teams-identity-support) */
32
+ return callAgent.kind === 'TeamsCallAgent';
33
+ return false;
34
+ };
35
+ //# sourceMappingURL=TypeGuards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypeGuards.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TypeGuards.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAgB,EAAgB,EAAE;IAC3D,yDAAyD;IACzD,OAAO,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC;IAC5B,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAA0B,EAA0B,EAAE;IACpF,yDAAyD;IACzD,OAAO,SAAS,CAAC,IAAI,KAAK,WAAW,CAAC;IACtC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAgB,EAAqB,EAAE;IAClE,yDAAyD;IACzD,OAAO,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC;IACjC,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAA0B,EAA+B,EAAE;IAC3F,yDAAyD;IACzD,OAAO,SAAS,CAAC,IAAI,KAAK,gBAAgB,CAAC;IAC3C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Call, CallAgent } from '@azure/communication-calling';\nimport { CallAgentCommon, CallCommon, TeamsCall, TeamsCallAgent } from './BetaToStableTypes';\n\n/**\n * @internal\n */\nexport const _isACSCall = (call: CallCommon): call is Call => {\n /* @conditional-compile-remove(teams-identity-support) */\n return call.kind === 'Call';\n return true;\n};\n\n/**\n * @internal\n */\nexport const _isACSCallAgent = (callAgent: CallAgentCommon): callAgent is CallAgent => {\n /* @conditional-compile-remove(teams-identity-support) */\n return callAgent.kind === 'CallAgent';\n return true;\n};\n\n/**\n * @internal\n */\nexport const _isTeamsCall = (call: CallCommon): call is TeamsCall => {\n /* @conditional-compile-remove(teams-identity-support) */\n return call.kind === 'TeamsCall';\n return false;\n};\n\n/**\n * @internal\n */\nexport const _isTeamsCallAgent = (callAgent: CallAgentCommon): callAgent is TeamsCallAgent => {\n /* @conditional-compile-remove(teams-identity-support) */\n return callAgent.kind === 'TeamsCallAgent';\n return false;\n};\n"]}
@@ -0,0 +1,8 @@
1
+ export { createStatefulCallClient } from './StatefulCallClient';
2
+ export type { StatefulCallClient, StatefulCallClientArgs, StatefulCallClientOptions } from './StatefulCallClient';
3
+ export type { StatefulDeviceManager } from './DeviceManagerDeclarative';
4
+ export type { CallAgentState, CallClientState, CallError, CallErrors, CallErrorTarget, CallState, DeviceManagerState, DiagnosticsCallFeatureState, IncomingCallState, LocalVideoStreamState, MediaDiagnosticsState, NetworkDiagnosticsState, RecordingCallFeatureState as RecordingCallFeature, RemoteParticipantState, RemoteVideoStreamState, TranscriptionCallFeatureState as TranscriptionCallFeature, VideoStreamRendererViewState } from './CallClientState';
5
+ export type { CreateViewResult } from './StreamUtils';
6
+ export type { DeclarativeCallAgent, IncomingCallManagement } from './CallAgentDeclarative';
7
+ export type { DeclarativeIncomingCall } from './IncomingCallDeclarative';
8
+ //# sourceMappingURL=index-public.d.ts.map
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ export { createStatefulCallClient } from './StatefulCallClient';
4
+ //# sourceMappingURL=index-public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-public.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index-public.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { createStatefulCallClient } from './StatefulCallClient';\nexport type { StatefulCallClient, StatefulCallClientArgs, StatefulCallClientOptions } from './StatefulCallClient';\nexport type { StatefulDeviceManager } from './DeviceManagerDeclarative';\nexport type {\n CallAgentState,\n CallClientState,\n CallError,\n CallErrors,\n CallErrorTarget,\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n IncomingCallState,\n LocalVideoStreamState,\n MediaDiagnosticsState,\n NetworkDiagnosticsState,\n RecordingCallFeatureState as RecordingCallFeature,\n RemoteParticipantState,\n RemoteVideoStreamState,\n TranscriptionCallFeatureState as TranscriptionCallFeature,\n VideoStreamRendererViewState\n} from './CallClientState';\nexport type { CreateViewResult } from './StreamUtils';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent, IncomingCallManagement } from './CallAgentDeclarative';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeIncomingCall } from './IncomingCallDeclarative';\n"]}
@@ -1,8 +1,4 @@
1
- export { createStatefulCallClient } from './StatefulCallClient';
2
- export type { StatefulCallClient, StatefulCallClientArgs, StatefulCallClientOptions } from './StatefulCallClient';
3
- export type { StatefulDeviceManager } from './DeviceManagerDeclarative';
4
- export type { CallAgentState, CallClientState, CallError, CallErrors, CallErrorTarget, CallState, DeviceManagerState, DiagnosticsCallFeatureState, IncomingCallState, LocalVideoStreamState, MediaDiagnosticsState, NetworkDiagnosticsState, RecordingCallFeatureState as RecordingCallFeature, RemoteParticipantState, RemoteVideoStreamState, TranscriptionCallFeatureState as TranscriptionCallFeature, VideoStreamRendererViewState } from './CallClientState';
5
- export type { CreateViewResult } from './StreamUtils';
6
- export type { DeclarativeCallAgent } from './CallAgentDeclarative';
7
- export type { DeclarativeIncomingCall } from './IncomingCallDeclarative';
1
+ export * from './index-public';
2
+ export { _isACSCall, _isACSCallAgent, _isTeamsCall, _isTeamsCallAgent } from './TypeGuards';
3
+ export type { CallAgentCommon, CallCommon, TeamsCall, TeamsCallAgent, IncomingCallCommon } from './BetaToStableTypes';
8
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
- export { createStatefulCallClient } from './StatefulCallClient';
3
+ export * from './index-public';
4
+ export { _isACSCall, _isACSCallAgent, _isTeamsCall, _isTeamsCallAgent } from './TypeGuards';
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { createStatefulCallClient } from './StatefulCallClient';\nexport type { StatefulCallClient, StatefulCallClientArgs, StatefulCallClientOptions } from './StatefulCallClient';\nexport type { StatefulDeviceManager } from './DeviceManagerDeclarative';\nexport type {\n CallAgentState,\n CallClientState,\n CallError,\n CallErrors,\n CallErrorTarget,\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n IncomingCallState,\n LocalVideoStreamState,\n MediaDiagnosticsState,\n NetworkDiagnosticsState,\n RecordingCallFeatureState as RecordingCallFeature,\n RemoteParticipantState,\n RemoteVideoStreamState,\n TranscriptionCallFeatureState as TranscriptionCallFeature,\n VideoStreamRendererViewState\n} from './CallClientState';\nexport type { CreateViewResult } from './StreamUtils';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent } from './CallAgentDeclarative';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeIncomingCall } from './IncomingCallDeclarative';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport * from './index-public';\n\nexport { _isACSCall, _isACSCallAgent, _isTeamsCall, _isTeamsCallAgent } from './TypeGuards';\n\nexport type { CallAgentCommon, CallCommon, TeamsCall, TeamsCallAgent, IncomingCallCommon } from './BetaToStableTypes';\n"]}
@@ -98,6 +98,11 @@ class ProxyChatThreadClient {
98
98
  case 'listReadReceipts': {
99
99
  return createDecoratedListReadReceipts(chatThreadClient, this._context);
100
100
  }
101
+ case 'sendTypingNotification': {
102
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter(this, void 0, void 0, function* () {
103
+ return yield chatThreadClient.sendTypingNotification(...args);
104
+ }), 'ChatThreadClient.sendTypingNotification');
105
+ }
101
106
  case 'removeParticipant': {
102
107
  return this._context.withAsyncErrorTeedToState((...args) => __awaiter(this, void 0, void 0, function* () {
103
108
  const result = yield chatThreadClient.removeParticipant(...args);
@@ -1 +1 @@
1
- {"version":3,"file":"StatefulChatThreadClient.js","sourceRoot":"","sources":["../../../../../chat-stateful-client/src/StatefulChatThreadClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,qBAAqB;IAGzB,YAAY,OAAoB;QAC9B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAEM,GAAG,CAAmC,gBAAkC,EAAE,IAAO;QACtF,QAAQ,IAAI,EAAE;YACZ,KAAK,cAAc,CAAC,CAAC;gBACnB,OAAO,2BAA2B,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC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Y,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;oBAC9D,OAAO,MAAM,CAAC;gBAChB,CAAC,CAAA,EACD,gCAAgC,CACjC,CAAC;aACH;YACD;gBACE,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;SAC9C;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,gBAAkC,EAClC,OAAoB,EACF,EAAE;IACpB,OAAO,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1D,OAAO,IAAI,KAAK,CAAC,gBAAgB,EAAE,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAqB,CAAC;AAC7F,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ChatThreadClient, SendChatMessageResult } from '@azure/communication-chat';\nimport { getIdentifierKind } from '@azure/communication-common';\nimport { ChatMessageWithStatus } from './types/ChatMessageWithStatus';\nimport { ChatContext } from './ChatContext';\nimport { nanoid } from 'nanoid';\nimport { createDecoratedListMessages } from './iterators/createDecoratedListMessages';\nimport { createDecoratedListReadReceipts } from './iterators/createDecoratedListReadReceipts';\nimport { createDecoratedListParticipants } from './iterators/createDecoratedListParticipants';\nimport { convertChatMessage } from './convertChatMessage';\n\nclass ProxyChatThreadClient implements ProxyHandler<ChatThreadClient> {\n private _context: ChatContext;\n\n constructor(context: ChatContext) {\n this._context = context;\n }\n\n public get<P extends keyof ChatThreadClient>(chatThreadClient: ChatThreadClient, prop: P): any {\n switch (prop) {\n case 'listMessages': {\n return createDecoratedListMessages(chatThreadClient, this._context);\n }\n case 'getMessage': {\n return this._context.withAsyncErrorTeedToState(async (...args: Parameters<ChatThreadClient['getMessage']>) => {\n const message = await chatThreadClient.getMessage(...args);\n this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));\n return message;\n }, 'ChatThreadClient.getMessage');\n }\n case 'sendMessage': {\n return this._context.withAsyncErrorTeedToState(async (...args: Parameters<ChatThreadClient['sendMessage']>) => {\n // Retry logic?\n const [request, options] = args;\n const { content } = request;\n const clientMessageId = nanoid(); // Generate a local short uuid for message\n const newMessage: ChatMessageWithStatus = {\n content: { message: content },\n clientMessageId,\n id: '',\n type: 'text',\n sequenceId: '',\n version: '',\n createdOn: new Date(),\n status: 'sending',\n senderDisplayName: this._context.getState().displayName,\n sender: this._context.getState().userId,\n metadata: options?.metadata\n };\n this._context.setChatMessage(chatThreadClient.threadId, newMessage);\n\n let result: SendChatMessageResult | undefined = undefined;\n try {\n result = await chatThreadClient.sendMessage(...args);\n } catch (e) {\n this._context.setChatMessage(chatThreadClient.threadId, { ...newMessage, status: 'failed' });\n throw e;\n }\n\n if (result?.id) {\n this._context.batch(() => {\n if (!result) {\n return;\n }\n this._context.setChatMessage(chatThreadClient.threadId, {\n ...newMessage,\n clientMessageId: undefined,\n status: 'delivered',\n id: result.id\n });\n this._context.deleteLocalMessage(chatThreadClient.threadId, clientMessageId);\n });\n }\n return result;\n }, 'ChatThreadClient.sendMessage');\n }\n case 'addParticipants': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['addParticipants']>) => {\n const result = await chatThreadClient.addParticipants(...args);\n const [addRequest] = args;\n const participantsToAdd = addRequest.participants;\n this._context.setParticipants(chatThreadClient.threadId, participantsToAdd);\n return result;\n },\n 'ChatThreadClient.addParticipants'\n );\n }\n case 'deleteMessage': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['deleteMessage']>) => {\n // DeleteMessage is able to either delete local one(for failed message) or synced message\n const [messageId] = args;\n if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {\n return {};\n }\n const result = await chatThreadClient.deleteMessage(...args);\n this._context.deleteMessage(chatThreadClient.threadId, messageId);\n return result;\n },\n 'ChatThreadClient.deleteMessage'\n );\n }\n case 'listParticipants': {\n return createDecoratedListParticipants(chatThreadClient, this._context);\n }\n case 'listReadReceipts': {\n return createDecoratedListReadReceipts(chatThreadClient, this._context);\n }\n case 'removeParticipant': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['removeParticipant']>) => {\n const result = await chatThreadClient.removeParticipant(...args);\n const [removeIdentifier] = args;\n this._context.deleteParticipant(chatThreadClient.threadId, getIdentifierKind(removeIdentifier));\n return result;\n },\n 'ChatThreadClient.removeParticipant'\n );\n }\n case 'updateMessage': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['updateMessage']>) => {\n const result = await chatThreadClient.updateMessage(...args);\n const [messageId, updateOption] = args;\n\n this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption?.content);\n return result;\n },\n 'ChatThreadClient.updateMessage'\n );\n }\n case 'updateTopic': {\n return this._context.withAsyncErrorTeedToState(async (...args: Parameters<ChatThreadClient['updateTopic']>) => {\n const result = await chatThreadClient.updateTopic(...args);\n const [topic] = args;\n this._context.updateThreadTopic(chatThreadClient.threadId, topic);\n return result;\n }, 'ChatThreadClient.updateTopic');\n }\n case 'getProperties': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['getProperties']>) => {\n const result = await chatThreadClient.getProperties(...args);\n this._context.updateThread(chatThreadClient.threadId, result);\n return result;\n },\n 'ChatThreadClient.getProperties'\n );\n }\n default:\n return Reflect.get(chatThreadClient, prop);\n }\n }\n}\n\n/**\n * @private\n */\nexport const chatThreadClientDeclaratify = (\n chatThreadClient: ChatThreadClient,\n context: ChatContext\n): ChatThreadClient => {\n context.createThreadIfNotExist(chatThreadClient.threadId);\n return new Proxy(chatThreadClient, new ProxyChatThreadClient(context)) as ChatThreadClient;\n};\n"]}
1
+ {"version":3,"file":"StatefulChatThreadClient.js","sourceRoot":"","sources":["../../../../../chat-stateful-client/src/StatefulChatThreadClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;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,gBAAgB,EAAE,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAqB,CAAC;AAC7F,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ChatThreadClient, SendChatMessageResult } from '@azure/communication-chat';\nimport { getIdentifierKind } from '@azure/communication-common';\nimport { ChatMessageWithStatus } from './types/ChatMessageWithStatus';\nimport { ChatContext } from './ChatContext';\nimport { nanoid } from 'nanoid';\nimport { createDecoratedListMessages } from './iterators/createDecoratedListMessages';\nimport { createDecoratedListReadReceipts } from './iterators/createDecoratedListReadReceipts';\nimport { createDecoratedListParticipants } from './iterators/createDecoratedListParticipants';\nimport { convertChatMessage } from './convertChatMessage';\n\nclass ProxyChatThreadClient implements ProxyHandler<ChatThreadClient> {\n private _context: ChatContext;\n\n constructor(context: ChatContext) {\n this._context = context;\n }\n\n public get<P extends keyof ChatThreadClient>(chatThreadClient: ChatThreadClient, prop: P): any {\n switch (prop) {\n case 'listMessages': {\n return createDecoratedListMessages(chatThreadClient, this._context);\n }\n case 'getMessage': {\n return this._context.withAsyncErrorTeedToState(async (...args: Parameters<ChatThreadClient['getMessage']>) => {\n const message = await chatThreadClient.getMessage(...args);\n this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));\n return message;\n }, 'ChatThreadClient.getMessage');\n }\n case 'sendMessage': {\n return this._context.withAsyncErrorTeedToState(async (...args: Parameters<ChatThreadClient['sendMessage']>) => {\n // Retry logic?\n const [request, options] = args;\n const { content } = request;\n const clientMessageId = nanoid(); // Generate a local short uuid for message\n const newMessage: ChatMessageWithStatus = {\n content: { message: content },\n clientMessageId,\n id: '',\n type: 'text',\n sequenceId: '',\n version: '',\n createdOn: new Date(),\n status: 'sending',\n senderDisplayName: this._context.getState().displayName,\n sender: this._context.getState().userId,\n metadata: options?.metadata\n };\n this._context.setChatMessage(chatThreadClient.threadId, newMessage);\n\n let result: SendChatMessageResult | undefined = undefined;\n try {\n result = await chatThreadClient.sendMessage(...args);\n } catch (e) {\n this._context.setChatMessage(chatThreadClient.threadId, { ...newMessage, status: 'failed' });\n throw e;\n }\n\n if (result?.id) {\n this._context.batch(() => {\n if (!result) {\n return;\n }\n this._context.setChatMessage(chatThreadClient.threadId, {\n ...newMessage,\n clientMessageId: undefined,\n status: 'delivered',\n id: result.id\n });\n this._context.deleteLocalMessage(chatThreadClient.threadId, clientMessageId);\n });\n }\n return result;\n }, 'ChatThreadClient.sendMessage');\n }\n case 'addParticipants': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['addParticipants']>) => {\n const result = await chatThreadClient.addParticipants(...args);\n const [addRequest] = args;\n const participantsToAdd = addRequest.participants;\n this._context.setParticipants(chatThreadClient.threadId, participantsToAdd);\n return result;\n },\n 'ChatThreadClient.addParticipants'\n );\n }\n case 'deleteMessage': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['deleteMessage']>) => {\n // DeleteMessage is able to either delete local one(for failed message) or synced message\n const [messageId] = args;\n if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {\n return {};\n }\n const result = await chatThreadClient.deleteMessage(...args);\n this._context.deleteMessage(chatThreadClient.threadId, messageId);\n return result;\n },\n 'ChatThreadClient.deleteMessage'\n );\n }\n case 'listParticipants': {\n return createDecoratedListParticipants(chatThreadClient, this._context);\n }\n case 'listReadReceipts': {\n return createDecoratedListReadReceipts(chatThreadClient, this._context);\n }\n case 'sendTypingNotification': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['sendTypingNotification']>) => {\n return await chatThreadClient.sendTypingNotification(...args);\n },\n 'ChatThreadClient.sendTypingNotification'\n );\n }\n case 'removeParticipant': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['removeParticipant']>) => {\n const result = await chatThreadClient.removeParticipant(...args);\n const [removeIdentifier] = args;\n this._context.deleteParticipant(chatThreadClient.threadId, getIdentifierKind(removeIdentifier));\n return result;\n },\n 'ChatThreadClient.removeParticipant'\n );\n }\n case 'updateMessage': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['updateMessage']>) => {\n const result = await chatThreadClient.updateMessage(...args);\n const [messageId, updateOption] = args;\n\n this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption?.content);\n return result;\n },\n 'ChatThreadClient.updateMessage'\n );\n }\n case 'updateTopic': {\n return this._context.withAsyncErrorTeedToState(async (...args: Parameters<ChatThreadClient['updateTopic']>) => {\n const result = await chatThreadClient.updateTopic(...args);\n const [topic] = args;\n this._context.updateThreadTopic(chatThreadClient.threadId, topic);\n return result;\n }, 'ChatThreadClient.updateTopic');\n }\n case 'getProperties': {\n return this._context.withAsyncErrorTeedToState(\n async (...args: Parameters<ChatThreadClient['getProperties']>) => {\n const result = await chatThreadClient.getProperties(...args);\n this._context.updateThread(chatThreadClient.threadId, result);\n return result;\n },\n 'ChatThreadClient.getProperties'\n );\n }\n default:\n return Reflect.get(chatThreadClient, prop);\n }\n }\n}\n\n/**\n * @private\n */\nexport const chatThreadClientDeclaratify = (\n chatThreadClient: ChatThreadClient,\n context: ChatContext\n): ChatThreadClient => {\n context.createThreadIfNotExist(chatThreadClient.threadId);\n return new Proxy(chatThreadClient, new ProxyChatThreadClient(context)) as ChatThreadClient;\n};\n"]}
@@ -16,9 +16,11 @@
16
16
  */
17
17
  export { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';
18
18
  export type { AreEqual, CommonProperties, MessageStatus, Common, AreTypeEqual, AreParamEqual } from '../../acs-ui-common/src';
19
- export type { CallClientProviderProps, CallAgentProviderProps, CallProviderProps, GetCallingSelector, CallingHandlers, CallingBaseSelectorProps } from '../../calling-component-bindings/src';
19
+ export type { CallClientProviderProps, CallAgentProviderProps, CallProviderProps, GetCallingSelector, CallingHandlers, CallingBaseSelectorProps, CommonCallingHandlers } from '../../calling-component-bindings/src';
20
20
  export type { ChatClientProviderProps, ChatThreadClientProviderProps, GetChatSelector, ChatHandlers, ChatBaseSelectorProps } from '../../chat-component-bindings/src';
21
21
  export { CallClientProvider, CallAgentProvider, CallProvider, useCallClient, useCallAgent, useCall, useDeviceManager, getCallingSelector, createDefaultCallingHandlers } from '../../calling-component-bindings/src';
22
+ export { useTeamsCallAgent, useTeamsCall, createDefaultTeamsCallingHandlers } from '../../calling-component-bindings/src';
23
+ export type { TeamsCallingHandlers } from '../../calling-component-bindings/src';
22
24
  export type { ScreenShareButtonSelector, CameraButtonSelector, VideoGallerySelector, DevicesButtonSelector, EmptySelector, ErrorBarSelector as CallErrorBarSelector, ParticipantListSelector, MicrophoneButtonSelector, ParticipantsButtonSelector } from '../../calling-component-bindings/src';
23
25
  export type { HoldButtonSelector } from '../../calling-component-bindings/src';
24
26
  export { ChatClientProvider, ChatThreadClientProvider, useChatClient, useChatThreadClient, getChatSelector, createDefaultChatHandlers } from '../../chat-component-bindings/src';
@@ -26,18 +28,18 @@ export type { MessageThreadSelector, TypingIndicatorSelector, ChatParticipantLis
26
28
  export { _IdentifierProvider, CameraButton, ControlBar, ControlBarButton, DevicesButton, EndCallButton, ErrorBar, GridLayout, LocalizationProvider, MessageStatusIndicator, MessageThread, MicrophoneButton, ParticipantItem, ParticipantList, ParticipantsButton, ScreenShareButton, SendBox, StreamMedia, TypingIndicator, VideoGallery, VideoTile } from '../../react-components/src';
27
29
  export { HoldButton } from '../../react-components/src';
28
30
  export { Dialpad } from '../../react-components/src';
29
- export { DomainPermissions } from '../../react-components/src';
31
+ export { CameraAndMicrophoneDomainPermissions, MicrophoneDomainPermissions, CameraDomainPermissions } from '../../react-components/src';
32
+ export type { CameraAndMicrophoneDomainPermissionsStrings, CameraAndMicrophoneDomainPermissionsProps, CameraDomainPermissionsStrings, CameraDomainPermissionsProps, CommonDomainPermissionsProps, DomainPermissionsStrings, DomainPermissionsStyles, MicrophoneDomainPermissionsStrings, MicrophoneDomainPermissionsProps } from '../../react-components/src';
30
33
  export type { _IdentifierProviderProps, _Identifiers, ActiveErrorMessage, BaseCustomStyles, CallParticipantListParticipant, CameraButtonContextualMenuStyles, CameraButtonProps, CameraButtonStrings, CameraButtonStyles, ChatMessage, CommunicationParticipant, ComponentLocale, ComponentStrings, ContentSystemMessage, ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles, ControlBarLayout, ControlBarProps, CreateVideoStreamViewResult, CustomAvatarOptions, CustomMessage, DevicesButtonContextualMenuStyles, DevicesButtonProps, DevicesButtonStrings, DevicesButtonStyles, EndCallButtonProps, EndCallButtonStrings, ErrorBarProps, ErrorBarStrings, ErrorType, GridLayoutProps, GridLayoutStyles, HorizontalGalleryStyles, JumpToNewMessageButtonProps, LocalizationProviderProps, LocalVideoCameraCycleButtonProps, LoadingState, Message, MessageAttachedStatus, MessageCommon, MessageContentType, MessageProps, MessageRenderer, MessageStatusIndicatorProps, MessageStatusIndicatorStrings, MessageThreadProps, MessageThreadStrings, MessageThreadStyles, MicrophoneButtonContextualMenuStyles, MicrophoneButtonProps, MicrophoneButtonStrings, MicrophoneButtonStyles, OnRenderAvatarCallback, OptionsDevice, ParticipantAddedSystemMessage, ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles, ParticipantListItemStyles, ParticipantListParticipant, ParticipantListProps, ParticipantListStyles, ParticipantMenuItemsCallback, ParticipantRemovedSystemMessage, ParticipantState, ParticipantsButtonContextualMenuStyles, ParticipantsButtonProps, ParticipantsButtonStrings, ParticipantsButtonStyles, ReadReceiptsBySenderId, ScreenShareButtonProps, ScreenShareButtonStrings, SendBoxProps, SendBoxStrings, SendBoxStylesProps, StreamMediaProps, SystemMessage, SystemMessageCommon, TopicUpdatedSystemMessage, TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps, UpdateMessageCallback, VideoGalleryLayout, VideoGalleryLocalParticipant, VideoGalleryParticipant, VideoGalleryProps, VideoGalleryRemoteParticipant, VideoGalleryStream, VideoGalleryStrings, VideoGalleryStyles, VideoStreamOptions, VideoTileProps, VideoTileStylesProps, ViewScalingMode } from '../../react-components/src';
31
34
  export type { Role } from '../../react-components/src';
32
35
  export type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from '../../react-components/src';
33
36
  export type { ActiveFileUpload, SendBoxErrorBarError, FileDownloadHandler, FileDownloadError, FileMetadata } from '../../react-components/src';
34
37
  export type { HoldButtonProps, HoldButtonStrings, VideoTileStrings } from '../../react-components/src';
35
- export type { DomainPermissionsStrings, DomainPermissionsProps } from '../../react-components/src';
36
38
  export type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';
37
39
  export type { BrowserPermissionDeniedIOSStrings, BrowserPermissionDeniedStyles, BrowserPermissionDeniedIOSProps } from '../../react-components/src';
38
40
  export * from '../../react-components/src/localization/locales';
39
41
  export * from '../../react-components/src/theming';
40
- export * from '../../calling-stateful-client/src';
42
+ export * from '../../calling-stateful-client/src/index-public';
41
43
  export type { DeclarativeCallAgent } from '../../calling-stateful-client/src';
42
44
  export { createStatefulChatClient } from '../../chat-stateful-client/src';
43
45
  export type { StatefulChatClient, StatefulChatClientArgs, StatefulChatClientOptions, ChatMessageWithStatus, ChatClientState, ChatError, ChatErrors, ChatThreadClientState, ChatThreadProperties, ChatErrorTarget } from '../../chat-stateful-client/src';
@@ -18,6 +18,8 @@
18
18
  */
19
19
  export { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';
20
20
  export { CallClientProvider, CallAgentProvider, CallProvider, useCallClient, useCallAgent, useCall, useDeviceManager, getCallingSelector, createDefaultCallingHandlers } from '../../calling-component-bindings/src';
21
+ /* @conditional-compile-remove(teams-identity-support) */
22
+ export { useTeamsCallAgent, useTeamsCall, createDefaultTeamsCallingHandlers } from '../../calling-component-bindings/src';
21
23
  export { ChatClientProvider, ChatThreadClientProvider, useChatClient, useChatThreadClient, getChatSelector, createDefaultChatHandlers } from '../../chat-component-bindings/src';
22
24
  export { _IdentifierProvider, CameraButton, ControlBar, ControlBarButton, DevicesButton, EndCallButton, ErrorBar, GridLayout, LocalizationProvider, MessageStatusIndicator, MessageThread, MicrophoneButton, ParticipantItem, ParticipantList, ParticipantsButton, ScreenShareButton, SendBox, StreamMedia, TypingIndicator, VideoGallery, VideoTile } from '../../react-components/src';
23
25
  /* @conditional-compile-remove(PSTN-calls) */
@@ -25,10 +27,10 @@ export { HoldButton } from '../../react-components/src';
25
27
  /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
26
28
  export { Dialpad } from '../../react-components/src';
27
29
  /* @conditional-compile-remove(call-readiness) */
28
- export { DomainPermissions } from '../../react-components/src';
30
+ export { CameraAndMicrophoneDomainPermissions, MicrophoneDomainPermissions, CameraDomainPermissions } from '../../react-components/src';
29
31
  export * from '../../react-components/src/localization/locales';
30
32
  export * from '../../react-components/src/theming';
31
- export * from '../../calling-stateful-client/src';
33
+ export * from '../../calling-stateful-client/src/index-public';
32
34
  export { createStatefulChatClient } from '../../chat-stateful-client/src';
33
35
  export * from '../../react-composites/src/index-public';
34
36
  export * from './mergedHooks';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AA2BzG,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,sCAAsC,CAAC;AAgB9C,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,yBAAyB,EAC1B,MAAM,mCAAmC,CAAC;AAU3C,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,WAAW,EACX,eAAe,EACf,YAAY,EACZ,SAAS,EACV,MAAM,4BAA4B,CAAC;AACpC,6CAA6C;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,0CAA0C,CAAC,6CAA6C;AACxF,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,iDAAiD;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AA4H/D,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAGlD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAa1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC;AAE9B,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,iDAAiD;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type {\n AreEqual,\n CommonProperties,\n MessageStatus,\n Common,\n AreTypeEqual,\n AreParamEqual\n} from '../../acs-ui-common/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type {\n CallClientProviderProps,\n CallAgentProviderProps,\n CallProviderProps,\n GetCallingSelector,\n CallingHandlers,\n CallingBaseSelectorProps\n} from '../../calling-component-bindings/src';\nexport type {\n ChatClientProviderProps,\n ChatThreadClientProviderProps,\n GetChatSelector,\n ChatHandlers,\n ChatBaseSelectorProps\n} from '../../chat-component-bindings/src';\n\nexport {\n CallClientProvider,\n CallAgentProvider,\n CallProvider,\n useCallClient,\n useCallAgent,\n useCall,\n useDeviceManager,\n getCallingSelector,\n createDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type {\n ScreenShareButtonSelector,\n CameraButtonSelector,\n VideoGallerySelector,\n DevicesButtonSelector,\n EmptySelector,\n ErrorBarSelector as CallErrorBarSelector,\n ParticipantListSelector,\n MicrophoneButtonSelector,\n ParticipantsButtonSelector\n} from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport {\n ChatClientProvider,\n ChatThreadClientProvider,\n useChatClient,\n useChatThreadClient,\n getChatSelector,\n createDefaultChatHandlers\n} from '../../chat-component-bindings/src';\n\nexport type {\n MessageThreadSelector,\n TypingIndicatorSelector,\n ChatParticipantListSelector,\n SendBoxSelector,\n ErrorBarSelector as ChatErrorBarSelector\n} from '../../chat-component-bindings/src';\n\nexport {\n _IdentifierProvider,\n CameraButton,\n ControlBar,\n ControlBarButton,\n DevicesButton,\n EndCallButton,\n ErrorBar,\n GridLayout,\n LocalizationProvider,\n MessageStatusIndicator,\n MessageThread,\n MicrophoneButton,\n ParticipantItem,\n ParticipantList,\n ParticipantsButton,\n ScreenShareButton,\n SendBox,\n StreamMedia,\n TypingIndicator,\n VideoGallery,\n VideoTile\n} from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from '../../react-components/src';\n\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nexport { Dialpad } from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport { DomainPermissions } from '../../react-components/src';\n\nexport type {\n _IdentifierProviderProps,\n _Identifiers,\n ActiveErrorMessage,\n BaseCustomStyles,\n CallParticipantListParticipant,\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles,\n ChatMessage,\n CommunicationParticipant,\n ComponentLocale,\n ComponentStrings,\n ContentSystemMessage,\n ControlBarButtonProps,\n ControlBarButtonStrings,\n ControlBarButtonStyles,\n ControlBarLayout,\n ControlBarProps,\n CreateVideoStreamViewResult,\n CustomAvatarOptions,\n CustomMessage,\n DevicesButtonContextualMenuStyles,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n EndCallButtonProps,\n EndCallButtonStrings,\n ErrorBarProps,\n ErrorBarStrings,\n ErrorType,\n GridLayoutProps,\n GridLayoutStyles,\n HorizontalGalleryStyles,\n JumpToNewMessageButtonProps,\n LocalizationProviderProps,\n LocalVideoCameraCycleButtonProps,\n LoadingState,\n Message,\n MessageAttachedStatus,\n MessageCommon,\n MessageContentType,\n MessageProps,\n MessageRenderer,\n MessageStatusIndicatorProps,\n MessageStatusIndicatorStrings,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings,\n MicrophoneButtonStyles,\n OnRenderAvatarCallback,\n OptionsDevice,\n ParticipantAddedSystemMessage,\n ParticipantItemProps,\n ParticipantItemStrings,\n ParticipantItemStyles,\n ParticipantListItemStyles,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback,\n ParticipantRemovedSystemMessage,\n ParticipantState,\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles,\n ReadReceiptsBySenderId,\n ScreenShareButtonProps,\n ScreenShareButtonStrings,\n SendBoxProps,\n SendBoxStrings,\n SendBoxStylesProps,\n StreamMediaProps,\n SystemMessage,\n SystemMessageCommon,\n TopicUpdatedSystemMessage,\n TypingIndicatorProps,\n TypingIndicatorStrings,\n TypingIndicatorStylesProps,\n UpdateMessageCallback,\n VideoGalleryLayout,\n VideoGalleryLocalParticipant,\n VideoGalleryParticipant,\n VideoGalleryProps,\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoStreamOptions,\n VideoTileProps,\n VideoTileStylesProps,\n ViewScalingMode\n} from '../../react-components/src';\n/* @conditional-compile-remove(rooms) */\nexport type { Role } from '../../react-components/src';\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nexport type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing) */\nexport type {\n ActiveFileUpload,\n SendBoxErrorBarError,\n FileDownloadHandler,\n FileDownloadError,\n FileMetadata\n} from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings, VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { DomainPermissionsStrings, DomainPermissionsProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedIOSProps\n} from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type {\n StatefulChatClient,\n StatefulChatClientArgs,\n StatefulChatClientOptions,\n ChatMessageWithStatus,\n ChatClientState,\n ChatError,\n ChatErrors,\n ChatThreadClientState,\n ChatThreadProperties,\n ChatErrorTarget\n} from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport { _DevicePermissionDropdown } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdownProps,\n _PermissionConstraints\n} from '../../react-components/src';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AA4BzG,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,sCAAsC,CAAC;AAE9C,yDAAyD;AACzD,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,iCAAiC,EAClC,MAAM,sCAAsC,CAAC;AAmB9C,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,yBAAyB,EAC1B,MAAM,mCAAmC,CAAC;AAU3C,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,WAAW,EACX,eAAe,EACf,YAAY,EACZ,SAAS,EACV,MAAM,4BAA4B,CAAC;AACpC,6CAA6C;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,0CAA0C,CAAC,6CAA6C;AACxF,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,iDAAiD;AACjD,OAAO,EACL,oCAAoC,EACpC,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAsIpC,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAG/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAa1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC;AAE9B,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,iDAAiD;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type {\n AreEqual,\n CommonProperties,\n MessageStatus,\n Common,\n AreTypeEqual,\n AreParamEqual\n} from '../../acs-ui-common/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type {\n CallClientProviderProps,\n CallAgentProviderProps,\n CallProviderProps,\n GetCallingSelector,\n CallingHandlers,\n CallingBaseSelectorProps,\n CommonCallingHandlers\n} from '../../calling-component-bindings/src';\nexport type {\n ChatClientProviderProps,\n ChatThreadClientProviderProps,\n GetChatSelector,\n ChatHandlers,\n ChatBaseSelectorProps\n} from '../../chat-component-bindings/src';\n\nexport {\n CallClientProvider,\n CallAgentProvider,\n CallProvider,\n useCallClient,\n useCallAgent,\n useCall,\n useDeviceManager,\n getCallingSelector,\n createDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\n\nexport type {\n ScreenShareButtonSelector,\n CameraButtonSelector,\n VideoGallerySelector,\n DevicesButtonSelector,\n EmptySelector,\n ErrorBarSelector as CallErrorBarSelector,\n ParticipantListSelector,\n MicrophoneButtonSelector,\n ParticipantsButtonSelector\n} from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport {\n ChatClientProvider,\n ChatThreadClientProvider,\n useChatClient,\n useChatThreadClient,\n getChatSelector,\n createDefaultChatHandlers\n} from '../../chat-component-bindings/src';\n\nexport type {\n MessageThreadSelector,\n TypingIndicatorSelector,\n ChatParticipantListSelector,\n SendBoxSelector,\n ErrorBarSelector as ChatErrorBarSelector\n} from '../../chat-component-bindings/src';\n\nexport {\n _IdentifierProvider,\n CameraButton,\n ControlBar,\n ControlBarButton,\n DevicesButton,\n EndCallButton,\n ErrorBar,\n GridLayout,\n LocalizationProvider,\n MessageStatusIndicator,\n MessageThread,\n MicrophoneButton,\n ParticipantItem,\n ParticipantList,\n ParticipantsButton,\n ScreenShareButton,\n SendBox,\n StreamMedia,\n TypingIndicator,\n VideoGallery,\n VideoTile\n} from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from '../../react-components/src';\n\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nexport { Dialpad } from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneDomainPermissions,\n MicrophoneDomainPermissions,\n CameraDomainPermissions\n} from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneDomainPermissionsStrings,\n CameraAndMicrophoneDomainPermissionsProps,\n CameraDomainPermissionsStrings,\n CameraDomainPermissionsProps,\n CommonDomainPermissionsProps,\n DomainPermissionsStrings,\n DomainPermissionsStyles,\n MicrophoneDomainPermissionsStrings,\n MicrophoneDomainPermissionsProps\n} from '../../react-components/src';\n\nexport type {\n _IdentifierProviderProps,\n _Identifiers,\n ActiveErrorMessage,\n BaseCustomStyles,\n CallParticipantListParticipant,\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles,\n ChatMessage,\n CommunicationParticipant,\n ComponentLocale,\n ComponentStrings,\n ContentSystemMessage,\n ControlBarButtonProps,\n ControlBarButtonStrings,\n ControlBarButtonStyles,\n ControlBarLayout,\n ControlBarProps,\n CreateVideoStreamViewResult,\n CustomAvatarOptions,\n CustomMessage,\n DevicesButtonContextualMenuStyles,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n EndCallButtonProps,\n EndCallButtonStrings,\n ErrorBarProps,\n ErrorBarStrings,\n ErrorType,\n GridLayoutProps,\n GridLayoutStyles,\n HorizontalGalleryStyles,\n JumpToNewMessageButtonProps,\n LocalizationProviderProps,\n LocalVideoCameraCycleButtonProps,\n LoadingState,\n Message,\n MessageAttachedStatus,\n MessageCommon,\n MessageContentType,\n MessageProps,\n MessageRenderer,\n MessageStatusIndicatorProps,\n MessageStatusIndicatorStrings,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings,\n MicrophoneButtonStyles,\n OnRenderAvatarCallback,\n OptionsDevice,\n ParticipantAddedSystemMessage,\n ParticipantItemProps,\n ParticipantItemStrings,\n ParticipantItemStyles,\n ParticipantListItemStyles,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback,\n ParticipantRemovedSystemMessage,\n ParticipantState,\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles,\n ReadReceiptsBySenderId,\n ScreenShareButtonProps,\n ScreenShareButtonStrings,\n SendBoxProps,\n SendBoxStrings,\n SendBoxStylesProps,\n StreamMediaProps,\n SystemMessage,\n SystemMessageCommon,\n TopicUpdatedSystemMessage,\n TypingIndicatorProps,\n TypingIndicatorStrings,\n TypingIndicatorStylesProps,\n UpdateMessageCallback,\n VideoGalleryLayout,\n VideoGalleryLocalParticipant,\n VideoGalleryParticipant,\n VideoGalleryProps,\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoStreamOptions,\n VideoTileProps,\n VideoTileStylesProps,\n ViewScalingMode\n} from '../../react-components/src';\n/* @conditional-compile-remove(rooms) */\nexport type { Role } from '../../react-components/src';\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nexport type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing) */\nexport type {\n ActiveFileUpload,\n SendBoxErrorBarError,\n FileDownloadHandler,\n FileDownloadError,\n FileMetadata\n} from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings, VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedIOSProps\n} from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type {\n StatefulChatClient,\n StatefulChatClientArgs,\n StatefulChatClientOptions,\n ChatMessageWithStatus,\n ChatClientState,\n ChatError,\n ChatErrors,\n ChatThreadClientState,\n ChatThreadProperties,\n ChatErrorTarget\n} from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport { _DevicePermissionDropdown } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdownProps,\n _PermissionConstraints\n} from '../../react-components/src';\n"]}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { IButtonStyles, ILinkStyles } from '@fluentui/react';
3
- import { BaseCustomStyles } from '../types';
3
+ import { BaseCustomStyles } from '../../types';
4
4
  /**
5
5
  * @beta
6
6
  * Props for BrowserPermissionDenied component.
@@ -9,15 +9,15 @@ export interface BrowserPermissionDeniedProps {
9
9
  /**
10
10
  * Action to be taken by the more help link. Possible to send to external page or show other modal.
11
11
  */
12
- onTroubleshootingClick: () => void;
12
+ onTroubleshootingClick?: () => void;
13
13
  /**
14
14
  * Action to be taken by the try again primary button.
15
15
  */
16
- onTryAgainClick: () => void;
16
+ onTryAgainClick?: () => void;
17
17
  /**
18
18
  * Localization strings for BrowserPermissionDenied component.
19
19
  */
20
- strings: BrowserPermissionDeniedStrings;
20
+ strings?: BrowserPermissionDeniedStrings;
21
21
  /**
22
22
  * Allows users to pass in an object contains custom CSS styles.
23
23
  * @Example
@@ -4,9 +4,11 @@ import React from 'react';
4
4
  /* @conditional-compile-remove(call-readiness) */
5
5
  import { Stack, Text, Link, Icon, PrimaryButton, mergeStyleSets } from '@fluentui/react';
6
6
  /* @conditional-compile-remove(call-readiness) */
7
- import { useLocale } from '../localization';
7
+ import { useLocale } from '../../localization';
8
8
  /* @conditional-compile-remove(call-readiness) */
9
- import { iconContainerStyles, iconPrimaryStyles, linkTextStyles, primaryButtonStyles, primaryTextStyles, secondaryTextStyles, textContainerStyles } from './styles/BrowserPermissionDenied.styles';
9
+ import { iconContainerStyles, iconPrimaryStyles, linkTextStyles, primaryButtonStyles, primaryTextStyles, secondaryTextStyles, textContainerStyles } from './../styles/BrowserPermissionDenied.styles';
10
+ /* @conditional-compile-remove(call-readiness) */
11
+ import { isValidString } from '../utils';
10
12
  /* @conditional-compile-remove(call-readiness) */
11
13
  const BrowserPermissionDeniedContainer = (props) => {
12
14
  const { onTroubleshootingClick, onTryAgainClick, strings, styles } = props;
@@ -15,10 +17,10 @@ const BrowserPermissionDeniedContainer = (props) => {
15
17
  React.createElement(Stack, { styles: iconContainerStyles, horizontalAlign: 'center' },
16
18
  React.createElement(Icon, { styles: iconPrimaryStyles, iconName: 'BrowserPermissionDeniedError' }))),
17
19
  React.createElement(Stack, { styles: textContainerStyles },
18
- React.createElement(Text, { styles: primaryTextStyles }, strings.primaryText),
19
- React.createElement(Text, { styles: secondaryTextStyles }, strings.secondaryText),
20
- React.createElement(PrimaryButton, { styles: mergeStyleSets(primaryButtonStyles, styles === null || styles === void 0 ? void 0 : styles.primaryButton), text: strings.primaryButtonText, onClick: onTryAgainClick }),
21
- React.createElement(Link, { styles: mergeStyleSets(linkTextStyles, styles === null || styles === void 0 ? void 0 : styles.troubleshootingLink), onClick: onTroubleshootingClick }, strings.linkText))));
20
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.primaryText) && React.createElement(Text, { styles: primaryTextStyles }, strings === null || strings === void 0 ? void 0 : strings.primaryText),
21
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.secondaryText) && React.createElement(Text, { styles: secondaryTextStyles }, strings === null || strings === void 0 ? void 0 : strings.secondaryText),
22
+ onTryAgainClick && isValidString(strings === null || strings === void 0 ? void 0 : strings.primaryButtonText) && (React.createElement(PrimaryButton, { styles: mergeStyleSets(primaryButtonStyles, styles === null || styles === void 0 ? void 0 : styles.primaryButton), text: strings === null || strings === void 0 ? void 0 : strings.primaryButtonText, onClick: onTryAgainClick })),
23
+ onTroubleshootingClick && isValidString(strings === null || strings === void 0 ? void 0 : strings.linkText) && (React.createElement(Link, { styles: mergeStyleSets(linkTextStyles, styles === null || styles === void 0 ? void 0 : styles.troubleshootingLink), onClick: onTroubleshootingClick }, strings === null || strings === void 0 ? void 0 : strings.linkText)))));
22
24
  };
23
25
  /**
24
26
  * @beta
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrowserPermissionDenied.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/DevicePermissions/BrowserPermissionDenied.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,iDAAiD;AACjD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACzF,iDAAiD;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,iDAAiD;AACjD,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,4CAA4C,CAAC;AAEpD,iDAAiD;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAgEzC,iDAAiD;AACjD,MAAM,gCAAgC,GAAG,CAAC,KAAmC,EAAe,EAAE;IAC5F,MAAM,EAAE,sBAAsB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC3E,OAAO,CACL,oBAAC,KAAK,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE;QAC5E,oBAAC,KAAK,IAAC,UAAU,QAAC,KAAK,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,eAAe,EAAE,eAAe;YACpF,oBAAC,KAAK,IAAC,MAAM,EAAE,mBAAmB,EAAE,eAAe,EAAE,QAAQ;gBAC3D,oBAAC,IAAI,IAAC,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,8BAA8B,GAAS,CAC5E,CACF;QACR,oBAAC,KAAK,IAAC,MAAM,EAAE,mBAAmB;YAC/B,aAAa,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,CAAC,IAAI,o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O,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\nimport { IButtonStyles, ILinkStyles } from '@fluentui/react';\n/* @conditional-compile-remove(call-readiness) */\nimport { Stack, Text, Link, Icon, PrimaryButton, mergeStyleSets } from '@fluentui/react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(call-readiness) */\nimport { _formatString, _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n iconContainerStyles,\n iconPrimaryStyles,\n linkTextStyles,\n primaryButtonStyles,\n primaryTextStyles,\n secondaryTextStyles,\n textContainerStyles\n} from './../styles/BrowserPermissionDenied.styles';\nimport { BaseCustomStyles } from '../../types';\n/* @conditional-compile-remove(call-readiness) */\nimport { isValidString } from '../utils';\n\n/**\n * @beta\n * Props for BrowserPermissionDenied component.\n */\nexport interface BrowserPermissionDeniedProps {\n /**\n * Action to be taken by the more help link. Possible to send to external page or show other modal.\n */\n onTroubleshootingClick?: () => void;\n /**\n * Action to be taken by the try again primary button.\n */\n onTryAgainClick?: () => void;\n /**\n * Localization strings for BrowserPermissionDenied component.\n */\n strings?: BrowserPermissionDeniedStrings;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <BrowserPermissionDenied styles={{ primaryButton: { root: {backgroundColor: 'blue' }}}} />\n * ```\n */\n styles?: BrowserPermissionDeniedStyles;\n}\n\n/**\n * @beta\n * Strings for BrowserPermissionDenied component\n */\nexport interface BrowserPermissionDeniedStrings {\n /**\n * Main button text string.\n */\n primaryButtonText: string;\n /**\n * Main text string.\n */\n primaryText: string;\n /**\n * Subtext string.\n */\n secondaryText: string;\n /**\n * More help link string.\n */\n linkText: string;\n}\n\n/**\n * Fluent styles for {@link BrowserPermissionDenied}.\n *\n * @beta\n */\nexport interface BrowserPermissionDeniedStyles extends BaseCustomStyles {\n /** Styles for the primary button. */\n primaryButton?: IButtonStyles;\n /** Styles for the help troubleshooting link text. */\n troubleshootingLink?: ILinkStyles;\n}\n\n/* @conditional-compile-remove(call-readiness) */\nconst BrowserPermissionDeniedContainer = (props: BrowserPermissionDeniedProps): JSX.Element => {\n const { onTroubleshootingClick, onTryAgainClick, strings, styles } = props;\n return (\n <Stack style={{ padding: '2rem', paddingTop: '2.5rem', maxWidth: '25.375rem' }}>\n <Stack horizontal style={{ paddingBottom: '1.5rem' }} horizontalAlign={'space-between'}>\n <Stack styles={iconContainerStyles} horizontalAlign={'center'}>\n <Icon styles={iconPrimaryStyles} iconName={'BrowserPermissionDeniedError'}></Icon>\n </Stack>\n </Stack>\n <Stack styles={textContainerStyles}>\n {isValidString(strings?.primaryText) && <Text styles={primaryTextStyles}>{strings?.primaryText}</Text>}\n {isValidString(strings?.secondaryText) && <Text styles={secondaryTextStyles}>{strings?.secondaryText}</Text>}\n\n {onTryAgainClick && isValidString(strings?.primaryButtonText) && (\n <PrimaryButton\n styles={mergeStyleSets(primaryButtonStyles, styles?.primaryButton)}\n text={strings?.primaryButtonText}\n onClick={onTryAgainClick}\n />\n )}\n\n {onTroubleshootingClick && isValidString(strings?.linkText) && (\n <Link styles={mergeStyleSets(linkTextStyles, styles?.troubleshootingLink)} onClick={onTroubleshootingClick}>\n {strings?.linkText}\n </Link>\n )}\n </Stack>\n </Stack>\n );\n};\n\n/**\n * @beta\n *\n * Component to allow Contoso to help their end user with their devices should their browser experience device permission issues.\n */\nexport const BrowserPermissionDenied = (props: BrowserPermissionDeniedProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const locale = useLocale().strings.BrowserPermissionDenied;\n /* @conditional-compile-remove(call-readiness) */\n return <BrowserPermissionDeniedContainer {...props} strings={props.strings ? props.strings : locale} />;\n return <></>;\n};\n\"../../../../acs-ui-common/src\""]}
@@ -8,7 +8,7 @@ export interface BrowserPermissionDeniedIOSProps extends BrowserPermissionDenied
8
8
  /**
9
9
  * Localization strings for BrowserPermissionDeniedIOS component.
10
10
  */
11
- strings: BrowserPermissionDeniedIOSStrings;
11
+ strings?: BrowserPermissionDeniedIOSStrings;
12
12
  /**
13
13
  * Link to image source.
14
14
  *
@@ -0,0 +1,58 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import React from 'react';
4
+ /* @conditional-compile-remove(call-readiness) */
5
+ import { useMemo } from 'react';
6
+ /* @conditional-compile-remove(call-readiness) */
7
+ import { Stack, Text, Link, PrimaryButton, mergeStyleSets, useTheme, Image, ImageFit } from '@fluentui/react';
8
+ /* @conditional-compile-remove(call-readiness) */
9
+ import { useLocale } from '../../localization';
10
+ /* @conditional-compile-remove(call-readiness) */
11
+ import { browserPermissionContainerStyles, iOSImageContainer, iOSStepsCircleStyles, iOSStepsContainerStyles, iOSStepsDigitTextStyles, iOSStepsTextStyles, linkTextStyles, primaryButtonStyles, primaryTextStyles, secondaryTextStyles, textContainerStyles } from './../styles/BrowserPermissionDenied.styles';
12
+ /* @conditional-compile-remove(call-readiness) */
13
+ import { isValidString } from '../utils';
14
+ /* @conditional-compile-remove(call-readiness) */
15
+ const BrowserPermissionDeniedIOSContainer = (props) => {
16
+ const { imageSource, onTroubleshootingClick, onTryAgainClick, strings, styles } = props;
17
+ const theme = useTheme();
18
+ const stepsCircleStyle = useMemo(() => {
19
+ return mergeStyleSets(iOSStepsCircleStyles, { root: { background: theme.palette.neutralLighter } });
20
+ }, [theme]);
21
+ return (React.createElement(Stack, { styles: browserPermissionContainerStyles },
22
+ imageSource && (React.createElement(Stack, { styles: mergeStyleSets(iOSImageContainer, { root: { background: theme.palette.neutralLighter } }) }, isValidString(strings === null || strings === void 0 ? void 0 : strings.imageAltText) && (React.createElement(Image, { src: imageSource !== null && imageSource !== void 0 ? imageSource : '', alt: strings === null || strings === void 0 ? void 0 : strings.imageAltText, imageFit: ImageFit.centerContain, style: { padding: '1.5rem' } })))),
23
+ React.createElement(Stack, { style: { padding: '1rem', paddingBottom: '1.25rem' } },
24
+ React.createElement(Stack, { styles: textContainerStyles },
25
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.primaryText) && React.createElement(Text, { styles: primaryTextStyles }, strings === null || strings === void 0 ? void 0 : strings.primaryText),
26
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.secondaryText) && React.createElement(Text, { styles: secondaryTextStyles }, strings === null || strings === void 0 ? void 0 : strings.secondaryText),
27
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.step1Text) && (React.createElement(Stack, { styles: iOSStepsContainerStyles },
28
+ React.createElement(Stack, { horizontalAlign: 'center', styles: stepsCircleStyle },
29
+ React.createElement(Text, { styles: iOSStepsDigitTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step1DigitText)),
30
+ React.createElement(Text, { styles: iOSStepsTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step1Text))),
31
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.step2Text) && (React.createElement(Stack, { styles: iOSStepsContainerStyles },
32
+ React.createElement(Stack, { horizontalAlign: 'center', styles: stepsCircleStyle },
33
+ React.createElement(Text, { styles: iOSStepsDigitTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step2DigitText)),
34
+ React.createElement(Text, { styles: iOSStepsTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step2Text))),
35
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.step3Text) && (React.createElement(Stack, { styles: iOSStepsContainerStyles },
36
+ React.createElement(Stack, { horizontalAlign: 'center', styles: stepsCircleStyle },
37
+ React.createElement(Text, { styles: iOSStepsDigitTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step3DigitText)),
38
+ React.createElement(Text, { styles: iOSStepsTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step3Text))),
39
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.step4Text) && (React.createElement(Stack, { styles: mergeStyleSets(iOSStepsContainerStyles, { root: { paddingBottom: '1.5rem' } }) },
40
+ React.createElement(Stack, { horizontalAlign: 'center', styles: stepsCircleStyle },
41
+ React.createElement(Text, { styles: iOSStepsDigitTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step4DigitText)),
42
+ React.createElement(Text, { styles: iOSStepsTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step4Text))),
43
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.primaryButtonText) && (React.createElement(PrimaryButton, { styles: mergeStyleSets(primaryButtonStyles, styles === null || styles === void 0 ? void 0 : styles.primaryButton), text: strings === null || strings === void 0 ? void 0 : strings.primaryButtonText, onClick: onTryAgainClick })),
44
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.linkText) && (React.createElement(Link, { styles: mergeStyleSets(linkTextStyles, styles === null || styles === void 0 ? void 0 : styles.troubleshootingLink), onClick: onTroubleshootingClick }, strings === null || strings === void 0 ? void 0 : strings.linkText))))));
45
+ };
46
+ /**
47
+ * @beta
48
+ *
49
+ * Component to allow Contoso to help their end user with their devices should their browser experience device permission issues.
50
+ */
51
+ export const BrowserPermissionDeniedIOS = (props) => {
52
+ /* @conditional-compile-remove(call-readiness) */
53
+ const locale = useLocale().strings.BrowserPermissionDeniedIOS;
54
+ /* @conditional-compile-remove(call-readiness) */
55
+ return React.createElement(BrowserPermissionDeniedIOSContainer, Object.assign({}, props, { strings: props.strings ? props.strings : locale }));
56
+ return React.createElement(React.Fragment, null);
57
+ };
58
+ //# sourceMappingURL=BrowserPermissionDeniedIOS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrowserPermissionDeniedIOS.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,iDAAiD;AACjD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,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CAC5C,oBAAC,aAAa,IACZ,MAAM,EAAE,cAAc,CAAC,mBAAmB,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,CAAC,EAClE,IAAI,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,EAChC,OAAO,EAAE,eAAe,GACxB,CACH;gBACA,aAAa,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,IAAI,CACnC,oBAAC,IAAI,IAAC,MAAM,EAAE,cAAc,CAAC,cAAc,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,mBAAmB,CAAC,EAAE,OAAO,EAAE,sBAAsB,IACvG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CACb,CACR,CACK,CACF,CACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAsC,EAAe,EAAE;IAChG,iDAAiD;IACjD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,0BAA0B,CAAC;IAC9D,iDAAiD;IACjD,OAAO,oBAAC,mCAAmC,oBAAK,KAAK,IAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC;IAC3G,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useMemo } from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { Stack, Text, Link, PrimaryButton, mergeStyleSets, useTheme, Image, ImageFit } from '@fluentui/react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(call-readiness) */\nimport { _formatString, _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n browserPermissionContainerStyles,\n iOSImageContainer,\n iOSStepsCircleStyles,\n iOSStepsContainerStyles,\n iOSStepsDigitTextStyles,\n iOSStepsTextStyles,\n linkTextStyles,\n primaryButtonStyles,\n primaryTextStyles,\n secondaryTextStyles,\n textContainerStyles\n} from './../styles/BrowserPermissionDenied.styles';\nimport { BrowserPermissionDeniedProps, BrowserPermissionDeniedStrings } from './BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nimport { isValidString } from '../utils';\n\n/**\n * @beta\n * Props for BrowserPermissionDeniedIOS component.\n */\nexport interface BrowserPermissionDeniedIOSProps extends BrowserPermissionDeniedProps {\n /**\n * Localization strings for BrowserPermissionDeniedIOS component.\n */\n strings?: BrowserPermissionDeniedIOSStrings;\n /**\n * Link to image source.\n *\n * Image is inserted into the top of the component.\n */\n imageSource?: string;\n}\n\n/**\n * @beta\n * Strings for BrowserPermissionDeniedIOS component\n */\nexport interface BrowserPermissionDeniedIOSStrings extends BrowserPermissionDeniedStrings {\n /**\n * Image alt text\n */\n imageAltText: string;\n /**\n * Main text string.\n */\n primaryText: string;\n /**\n * Subtext string.\n */\n secondaryText: string;\n /**\n * Step 1 string\n */\n step1Text: string;\n /**\n * Step 1 digit string\n */\n step1DigitText: string;\n /**\n * Step 2 string\n */\n step2Text: string;\n /**\n * Step 2 digit string\n */\n step2DigitText: string;\n /**\n * Step 3 string\n */\n step3Text: string;\n /**\n * Step 3 digit string\n */\n step3DigitText: string;\n /**\n * Step 4 string\n */\n step4Text: string;\n /**\n * Step 4 digit string\n */\n step4DigitText: string;\n}\n\n/* @conditional-compile-remove(call-readiness) */\nconst BrowserPermissionDeniedIOSContainer = (props: BrowserPermissionDeniedIOSProps): JSX.Element => {\n const { imageSource, onTroubleshootingClick, onTryAgainClick, strings, styles } = props;\n const theme = useTheme();\n\n const stepsCircleStyle = useMemo(() => {\n return mergeStyleSets(iOSStepsCircleStyles, { root: { background: theme.palette.neutralLighter } });\n }, [theme]);\n\n return (\n <Stack styles={browserPermissionContainerStyles}>\n {imageSource && (\n <Stack styles={mergeStyleSets(iOSImageContainer, { root: { background: theme.palette.neutralLighter } })}>\n {isValidString(strings?.imageAltText) && (\n <Image\n src={imageSource ?? ''}\n alt={strings?.imageAltText}\n imageFit={ImageFit.centerContain}\n style={{ padding: '1.5rem' }}\n />\n )}\n </Stack>\n )}\n <Stack style={{ padding: '1rem', paddingBottom: '1.25rem' }}>\n <Stack styles={textContainerStyles}>\n {isValidString(strings?.primaryText) && <Text styles={primaryTextStyles}>{strings?.primaryText}</Text>}\n {isValidString(strings?.secondaryText) && <Text styles={secondaryTextStyles}>{strings?.secondaryText}</Text>}\n {isValidString(strings?.step1Text) && (\n <Stack styles={iOSStepsContainerStyles}>\n <Stack horizontalAlign={'center'} styles={stepsCircleStyle}>\n <Text styles={iOSStepsDigitTextStyles}>{strings?.step1DigitText}</Text>\n </Stack>\n <Text styles={iOSStepsTextStyles}>{strings?.step1Text}</Text>\n </Stack>\n )}\n {isValidString(strings?.step2Text) && (\n <Stack styles={iOSStepsContainerStyles}>\n <Stack horizontalAlign={'center'} styles={stepsCircleStyle}>\n <Text styles={iOSStepsDigitTextStyles}>{strings?.step2DigitText}</Text>\n </Stack>\n <Text styles={iOSStepsTextStyles}>{strings?.step2Text}</Text>\n </Stack>\n )}\n {isValidString(strings?.step3Text) && (\n <Stack styles={iOSStepsContainerStyles}>\n <Stack horizontalAlign={'center'} styles={stepsCircleStyle}>\n <Text styles={iOSStepsDigitTextStyles}>{strings?.step3DigitText}</Text>\n </Stack>\n <Text styles={iOSStepsTextStyles}>{strings?.step3Text}</Text>\n </Stack>\n )}\n {isValidString(strings?.step4Text) && (\n <Stack styles={mergeStyleSets(iOSStepsContainerStyles, { root: { paddingBottom: '1.5rem' } })}>\n <Stack horizontalAlign={'center'} styles={stepsCircleStyle}>\n <Text styles={iOSStepsDigitTextStyles}>{strings?.step4DigitText}</Text>\n </Stack>\n <Text styles={iOSStepsTextStyles}>{strings?.step4Text}</Text>\n </Stack>\n )}\n {isValidString(strings?.primaryButtonText) && (\n <PrimaryButton\n styles={mergeStyleSets(primaryButtonStyles, styles?.primaryButton)}\n text={strings?.primaryButtonText}\n onClick={onTryAgainClick}\n />\n )}\n {isValidString(strings?.linkText) && (\n <Link styles={mergeStyleSets(linkTextStyles, styles?.troubleshootingLink)} onClick={onTroubleshootingClick}>\n {strings?.linkText}\n </Link>\n )}\n </Stack>\n </Stack>\n </Stack>\n );\n};\n\n/**\n * @beta\n *\n * Component to allow Contoso to help their end user with their devices should their browser experience device permission issues.\n */\nexport const BrowserPermissionDeniedIOS = (props: BrowserPermissionDeniedIOSProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const locale = useLocale().strings.BrowserPermissionDeniedIOS;\n /* @conditional-compile-remove(call-readiness) */\n return <BrowserPermissionDeniedIOSContainer {...props} strings={props.strings ? props.strings : locale} />;\n return <></>;\n};\n\"../../../../acs-ui-common/src\""]}
@@ -40,6 +40,10 @@ export interface _DevicePermissionDropdownProps {
40
40
  * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }
41
41
  */
42
42
  askDevicePermission?(constrain: _PermissionConstraints): Promise<void>;
43
+ /**
44
+ * Optional callback when component is clicked
45
+ */
46
+ onClick?: () => void;
43
47
  /**
44
48
  * Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }
45
49
  */
@@ -8,7 +8,7 @@ import React from 'react';
8
8
  * @internal
9
9
  */
10
10
  export const _DevicePermissionDropdown = (props) => {
11
- const { icon, askDevicePermission, constrain, strings, options, styles } = props;
11
+ const { icon, askDevicePermission, onClick, constrain, strings, options, styles } = props;
12
12
  const onRenderPlaceholder = () => {
13
13
  return (React.createElement(Stack, { horizontal: true, verticalAlign: "center" },
14
14
  icon,
@@ -17,10 +17,11 @@ export const _DevicePermissionDropdown = (props) => {
17
17
  const onRenderCaretDown = () => {
18
18
  return React.createElement(Text, null, strings === null || strings === void 0 ? void 0 : strings.actionButtonContent);
19
19
  };
20
- return (React.createElement(Dropdown, { placeholder: strings === null || strings === void 0 ? void 0 : strings.placeHolderText, label: strings === null || strings === void 0 ? void 0 : strings.label, onRenderPlaceholder: onRenderPlaceholder, onRenderCaretDown: onRenderCaretDown, onClick: () => {
20
+ return (React.createElement(Dropdown, { "data-ui-id": 'permission-dropdown', placeholder: strings === null || strings === void 0 ? void 0 : strings.placeHolderText, label: strings === null || strings === void 0 ? void 0 : strings.label, onRenderPlaceholder: onRenderPlaceholder, onRenderCaretDown: onRenderCaretDown, onClick: () => {
21
21
  if (askDevicePermission) {
22
22
  askDevicePermission(constrain !== null && constrain !== void 0 ? constrain : { video: true, audio: true });
23
23
  }
24
+ onClick === null || onClick === void 0 ? void 0 : onClick();
24
25
  }, options: options !== null && options !== void 0 ? options : [], styles: styles }));
25
26
  };
26
27
  //# sourceMappingURL=DevicePermissionDropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevicePermissionDropdown.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/DevicePermissions/DevicePermissionDropdown.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,QAAQ,EAAoC,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC1F,OAAO,KAAK,MAAM,OAAO,CAAC;AA8D1B;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAqC,EAAe,EAAE;IAC9F,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAE1F,MAAM,mBAAmB,GAAG,GAAgB,EAAE;QAC5C,OAAO,CACL,oBAAC,KAAK,IAAC,UAAU,QAAC,aAAa,EAAC,QAAQ;YACrC,IAAI;YACL,oBAAC,IAAI,QAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,CAAQ,CACjC,CACT,CAAC;IACJ,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,GAAgB,EAAE;QAC1C,OAAO,oBAAC,IAAI,QAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,mBAAmB,CAAQ,CAAC;IACrD,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,QAAQ,kBACK,qBAAqB,EACjC,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,EACrC,KAAK,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,EACrB,mBAAmB,EAAE,mBAAmB,EACxC,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,mBAAmB,EAAE;gBACvB,mBAAmB,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;aAChE;YACD,OAAO,aAAP,OAAO,uBAAP,OAAO,EAAI,CAAC;QACd,CAAC,EACD,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACtB,MAAM,EAAE,MAAM,GACd,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Dropdown, IDropdownOption, IDropdownStyles, Stack, Text } from '@fluentui/react';\nimport React from 'react';\n\n/**\n * Strings of {@link DevicePermissionDropdown} that can be overridden.\n *\n * @internal\n */\nexport interface _DevicePermissionDropdownStrings {\n /**\n * dropdown label\n */\n\n label?: string;\n /**\n * dropdown placeholder\n */\n placeHolderText: string;\n /** string for action button */\n actionButtonContent?: string;\n}\n\n/**\n * Props for {@link _DevicePermissionDropdown}.\n *\n * @internal\n */\nexport interface _DevicePermissionDropdownProps {\n /**\n * icon shown in dropdown placeholder\n */\n icon?: JSX.Element;\n /**\n * Dropdown content\n */\n options?: IDropdownOption[];\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n */\n askDevicePermission?(constrain: _PermissionConstraints): Promise<void>;\n /**\n * Optional callback when component is clicked\n */\n onClick?: () => void;\n /**\n * Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n */\n constrain?: _PermissionConstraints;\n /**\n * Strings for devicepermissiondropdown\n */\n strings?: _DevicePermissionDropdownStrings;\n /**\n * Styles for devicepermissiondropdown\n */\n styles?: Partial<IDropdownStyles>;\n}\n\n/**\n * A dropdown to trigger device permission prompt\n *\n * @internal\n */\nexport const _DevicePermissionDropdown = (props: _DevicePermissionDropdownProps): JSX.Element => {\n const { icon, askDevicePermission, onClick, constrain, strings, options, styles } = props;\n\n const onRenderPlaceholder = (): JSX.Element => {\n return (\n <Stack horizontal verticalAlign=\"center\">\n {icon}\n <Text>{strings?.placeHolderText}</Text>\n </Stack>\n );\n };\n\n const onRenderCaretDown = (): JSX.Element => {\n return <Text>{strings?.actionButtonContent}</Text>;\n };\n\n return (\n <Dropdown\n data-ui-id={'permission-dropdown'}\n placeholder={strings?.placeHolderText}\n label={strings?.label}\n onRenderPlaceholder={onRenderPlaceholder}\n onRenderCaretDown={onRenderCaretDown}\n onClick={() => {\n if (askDevicePermission) {\n askDevicePermission(constrain ?? { video: true, audio: true });\n }\n onClick?.();\n }}\n options={options ?? []}\n styles={styles}\n />\n );\n};\n\n/**\n * Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @internal\n */\nexport type _PermissionConstraints = {\n audio: boolean;\n video: boolean;\n};\n"]}