@azure/communication-react 1.5.1-alpha-202211250013.0 → 1.5.2-alpha-202301190014.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/CHANGELOG.beta.md +47 -1
  2. package/CHANGELOG.json +1554 -0
  3. package/CHANGELOG.stable.md +88 -2
  4. package/dist/communication-react.d.ts +468 -296
  5. package/dist/dist-cjs/communication-react/index.js +2904 -1694
  6. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/identifier.js +3 -47
  8. package/dist/dist-esm/acs-ui-common/src/identifier.js.map +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -0
  12. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -0
  13. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +21 -10
  15. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  16. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  17. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -7
  18. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +13 -4
  20. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +7 -0
  22. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +9 -0
  23. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +12 -0
  25. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +31 -6
  26. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +2 -13
  28. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  29. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -1
  30. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  31. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -1
  32. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +14 -0
  33. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  34. package/dist/dist-esm/calling-stateful-client/src/Converter.js +1 -1
  35. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/Logger.d.ts +1 -0
  37. package/dist/dist-esm/calling-stateful-client/src/Logger.js +1 -0
  38. package/dist/dist-esm/calling-stateful-client/src/Logger.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -1
  40. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +11 -4
  41. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  42. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +39 -12
  43. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  44. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +2 -2
  45. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  46. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.d.ts +19 -0
  47. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.js +43 -0
  48. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.js.map +1 -0
  49. package/dist/dist-esm/communication-react/src/index.d.ts +7 -5
  50. package/dist/dist-esm/communication-react/src/index.js +5 -3
  51. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +105 -0
  53. package/dist/dist-esm/react-components/src/components/DevicePermissions/{DomainPermissions.js → SitePermissions.js} +28 -22
  54. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +1 -0
  55. package/dist/dist-esm/react-components/src/components/DevicePermissions/{DomainPermissionsScaffolding.d.ts → SitePermissionsScaffolding.d.ts} +12 -12
  56. package/dist/dist-esm/react-components/src/components/DevicePermissions/{DomainPermissionsScaffolding.js → SitePermissionsScaffolding.js} +4 -4
  57. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +1 -0
  58. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +20 -9
  59. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.d.ts +1 -0
  61. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.js +18 -2
  62. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.js.map +1 -1
  63. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.d.ts +4 -0
  64. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +1 -1
  65. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
  66. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.d.ts +4 -0
  67. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js +1 -1
  68. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js.map +1 -1
  69. package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +8 -0
  70. package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
  71. package/dist/dist-esm/react-components/src/components/MessageThread.js +6 -4
  72. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  73. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +0 -2
  74. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +10 -12
  75. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  76. package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +4 -0
  77. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +25 -4
  78. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  79. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +10 -4
  80. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +79 -7
  81. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  82. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.d.ts +6 -6
  83. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +13 -21
  84. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  85. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.d.ts +37 -0
  86. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +27 -0
  87. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -0
  88. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.d.ts +41 -0
  89. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +32 -0
  90. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -0
  91. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.d.ts +32 -0
  92. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +25 -0
  93. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -0
  94. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +16 -0
  95. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +60 -0
  96. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -0
  97. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.d.ts +12 -0
  98. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +41 -0
  99. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -0
  100. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +25 -0
  101. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +76 -0
  102. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -0
  103. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +38 -0
  104. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js +4 -0
  105. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -0
  106. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +9 -0
  107. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +18 -0
  108. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +1 -0
  109. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.d.ts +14 -0
  110. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +19 -0
  111. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +1 -0
  112. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.d.ts +6 -0
  113. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.js +9 -0
  114. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.js.map +1 -0
  115. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +62 -0
  116. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +118 -0
  117. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -0
  118. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.d.ts +14 -0
  119. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.js +28 -0
  120. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.js.map +1 -0
  121. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.d.ts +6 -0
  122. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.js +9 -0
  123. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.js.map +1 -0
  124. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.d.ts +9 -0
  125. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.js +22 -0
  126. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.js.map +1 -0
  127. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.d.ts +10 -0
  128. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js +29 -0
  129. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js.map +1 -0
  130. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.d.ts +45 -0
  131. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +57 -0
  132. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -0
  133. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.d.ts +2 -2
  134. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js +7 -2
  135. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.d.ts +23 -0
  137. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +96 -0
  138. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -0
  139. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +27 -0
  140. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +121 -0
  141. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -0
  142. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +66 -0
  143. package/dist/dist-esm/react-components/src/components/VideoGallery.js +131 -124
  144. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  145. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +12 -17
  146. package/dist/dist-esm/react-components/src/components/VideoTile.js +71 -38
  147. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  148. package/dist/dist-esm/react-components/src/components/index.d.ts +8 -3
  149. package/dist/dist-esm/react-components/src/components/index.js +3 -2
  150. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  151. package/dist/dist-esm/react-components/src/components/styles/{DomainPermissions.styles.d.ts → SitePermissions.styles.d.ts} +1 -1
  152. package/dist/dist-esm/react-components/src/components/styles/{DomainPermissions.styles.js → SitePermissions.styles.js} +1 -1
  153. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +1 -0
  154. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js +2 -1
  155. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js.map +1 -1
  156. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +26 -0
  157. package/dist/dist-esm/react-components/src/components/styles/{UnsupportedBrowser.styles.js → UnsupportedEnvironment.styles.js} +25 -10
  158. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +1 -0
  159. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.d.ts +1 -95
  160. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +3 -138
  161. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
  162. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +1 -1
  163. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +11 -26
  164. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  165. package/dist/dist-esm/react-components/src/components/utils/useLongPress.d.ts +13 -10
  166. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +66 -37
  167. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
  168. package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -6
  169. package/dist/dist-esm/react-components/src/components/utils.js +4 -16
  170. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  171. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  172. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  173. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +31 -19
  174. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  175. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +1 -1
  176. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +1 -1
  177. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +49 -14
  178. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +1 -1
  179. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +1 -1
  180. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +1 -1
  181. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +1 -1
  182. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +1 -1
  183. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +1 -1
  184. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +1 -1
  185. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +1 -1
  186. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +1 -1
  187. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +1 -1
  188. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +1 -1
  189. package/dist/dist-esm/react-components/src/theming/icons.d.ts +11 -6
  190. package/dist/dist-esm/react-components/src/theming/icons.js +30 -20
  191. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  192. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +1 -1
  193. package/dist/dist-esm/react-components/src/theming/icons.styles.js +1 -1
  194. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -1
  195. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +2 -0
  196. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  197. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +24 -11
  198. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +9 -9
  199. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  200. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +56 -0
  201. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  202. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +16 -10
  203. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +89 -40
  204. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  205. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +11 -17
  206. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  207. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +2 -2
  208. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +1 -1
  209. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  210. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +1 -0
  211. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +19 -18
  212. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  213. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +5 -4
  214. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +68 -28
  215. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -1
  216. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +16 -0
  217. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageCameraDropdown.js → ConfigurationPageCameraDropdown.js} +4 -6
  218. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -0
  219. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageErrorBar.d.ts → ConfigurationPageErrorBar.d.ts} +3 -4
  220. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageErrorBar.js → ConfigurationPageErrorBar.js} +4 -6
  221. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -0
  222. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +16 -0
  223. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageMicDropdown.js → ConfigurationPageMicDropdown.js} +4 -8
  224. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -0
  225. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js +1 -0
  226. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js.map +1 -1
  227. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  228. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +16 -14
  229. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  230. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +8 -3
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +3 -0
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +26 -4
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +11 -3
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +4 -4
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +6 -2
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +3 -3
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +46 -27
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +2 -0
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +28 -7
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +1 -1
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +7 -0
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.js +9 -1
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.js.map +1 -1
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.d.ts +4 -0
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js +10 -0
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js.map +1 -1
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +29 -0
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +119 -0
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -0
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +20 -4
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +74 -21
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  262. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +16 -7
  263. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +22 -10
  264. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  265. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +2 -0
  266. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -0
  268. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +6 -0
  269. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +4 -0
  271. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  272. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -0
  273. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +7 -1
  274. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  275. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +8 -0
  276. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  277. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +4 -0
  278. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  279. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +26 -3
  280. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  281. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.d.ts +8 -0
  282. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js +40 -0
  283. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js.map +1 -0
  284. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +1 -1
  285. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  286. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +11 -6
  287. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js +1 -0
  288. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js.map +1 -1
  289. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js +2 -1
  290. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js.map +1 -1
  291. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +15 -1
  292. package/package.json +12 -11
  293. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.d.ts +0 -101
  294. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js.map +0 -1
  295. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.js.map +0 -1
  296. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js.map +0 -1
  297. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.d.ts +0 -22
  298. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.js.map +0 -1
  299. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.d.ts +0 -17
  300. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js.map +0 -1
  301. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js.map +0 -1
  302. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.d.ts +0 -17
  303. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js.map +0 -1
@@ -28,9 +28,8 @@ export type { MessageThreadSelector, TypingIndicatorSelector, ChatParticipantLis
28
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';
29
29
  export { HoldButton } from '../../react-components/src';
30
30
  export { Dialpad } 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';
33
- export type { VideoTileMenuItems } from '../../react-components/src';
31
+ export { CameraAndMicrophoneSitePermissions, MicrophoneSitePermissions, CameraSitePermissions } from '../../react-components/src';
32
+ export type { CameraAndMicrophoneSitePermissionsStrings, CameraAndMicrophoneSitePermissionsProps, CameraSitePermissionsStrings, CameraSitePermissionsProps, CommonSitePermissionsProps, SitePermissionsStrings, SitePermissionsStyles, MicrophoneSitePermissionsStrings, MicrophoneSitePermissionsProps } from '../../react-components/src';
34
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';
35
34
  export type { Role } from '../../react-components/src';
36
35
  export type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from '../../react-components/src';
@@ -38,6 +37,7 @@ export type { ActiveFileUpload, SendBoxErrorBarError, FileDownloadHandler, FileD
38
37
  export type { HoldButtonProps, HoldButtonStrings, VideoTileStrings } from '../../react-components/src';
39
38
  export type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';
40
39
  export type { BrowserPermissionDeniedIOSStrings, BrowserPermissionDeniedStyles, BrowserPermissionDeniedIOSProps } from '../../react-components/src';
40
+ export type { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from '../../react-components/src';
41
41
  export * from '../../react-components/src/localization/locales';
42
42
  export * from '../../react-components/src/theming';
43
43
  export * from '../../calling-stateful-client/src/index-public';
@@ -48,6 +48,8 @@ export * from '../../react-composites/src/index-public';
48
48
  export * from './mergedHooks';
49
49
  export { UnsupportedBrowser } from '../../react-components/src';
50
50
  export type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';
51
- export { _DevicePermissionDropdown } from '../../react-components/src';
52
- export type { _DevicePermissionDropdownStrings, _DevicePermissionDropdownProps, _PermissionConstraints } from '../../react-components/src';
51
+ export { UnsupportedBrowserVersion } from '../../react-components/src';
52
+ export type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';
53
+ export { UnsupportedOperatingSystem } from '../../react-components/src';
54
+ export type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';
53
55
  //# sourceMappingURL=index.d.ts.map
@@ -27,7 +27,7 @@ export { HoldButton } from '../../react-components/src';
27
27
  /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
28
28
  export { Dialpad } from '../../react-components/src';
29
29
  /* @conditional-compile-remove(call-readiness) */
30
- export { CameraAndMicrophoneDomainPermissions, MicrophoneDomainPermissions, CameraDomainPermissions } from '../../react-components/src';
30
+ export { CameraAndMicrophoneSitePermissions, MicrophoneSitePermissions, CameraSitePermissions } from '../../react-components/src';
31
31
  export * from '../../react-components/src/localization/locales';
32
32
  export * from '../../react-components/src/theming';
33
33
  export * from '../../calling-stateful-client/src/index-public';
@@ -36,6 +36,8 @@ export * from '../../react-composites/src/index-public';
36
36
  export * from './mergedHooks';
37
37
  /* @conditional-compile-remove(unsupported-browser) */
38
38
  export { UnsupportedBrowser } from '../../react-components/src';
39
- /* @conditional-compile-remove(call-readiness) */
40
- export { _DevicePermissionDropdown } from '../../react-components/src';
39
+ /* @conditional-compile-remove(unsupported-browser) */
40
+ export { UnsupportedBrowserVersion } from '../../react-components/src';
41
+ /* @conditional-compile-remove(unsupported-browser) */
42
+ export { UnsupportedOperatingSystem } from '../../react-components/src';
41
43
  //# sourceMappingURL=index.js.map
@@ -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;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;AAyIpC,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\n/* @conditional-compile-remove(pinned-participants) */\nexport type { VideoTileMenuItems } 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
+ {"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,kCAAkC,EAClC,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AAwIpC,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,sDAAsD;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,sDAAsD;AACtD,OAAO,EAAE,0BAA0B,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 CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n SitePermissionsStrings,\n SitePermissionsStyles,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\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';\n/* @conditional-compile-remove(pinned-participants) */\nexport type { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } 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(unsupported-browser) */\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\n"]}
@@ -0,0 +1,105 @@
1
+ /// <reference types="react" />
2
+ import { SitePermissionsStrings, SitePermissionsStyles } from './SitePermissionsScaffolding';
3
+ /**
4
+ * @beta
5
+ * Props for SitePermissions components.
6
+ */
7
+ export interface CommonSitePermissionsProps {
8
+ /**
9
+ * Name of application calling experience is in.
10
+ */
11
+ appName: string;
12
+ /**
13
+ * Type of the Site Permissions component.
14
+ */
15
+ type: 'request' | 'denied' | 'check';
16
+ /**
17
+ * Type of the browser used, the Site permission component will show different guidance text based on the browser type
18
+ */
19
+ browserHint?: 'safari' | 'unset';
20
+ /**
21
+ * Action to be taken by the more help link. Possible to send to external page or show other modal.
22
+ * If this is not provided the button will not be shown.
23
+ */
24
+ onTroubleshootingClick?: () => void;
25
+ /**
26
+ * Action that is taken when the user clicks the continue anyway button.
27
+ * If this is not provided the button will not be shown.
28
+ */
29
+ onContinueAnywayClick?: () => void;
30
+ /**
31
+ * Styles for SitePermissions component.
32
+ */
33
+ styles?: SitePermissionsStyles;
34
+ }
35
+ /**
36
+ * @beta
37
+ * Strings for CameraAndMicrophoneSitePermissions component.
38
+ */
39
+ export declare type CameraAndMicrophoneSitePermissionsStrings = SitePermissionsStrings;
40
+ /**
41
+ * @beta
42
+ * Props for CameraAndMicrophoneSitePermissions component.
43
+ */
44
+ export interface CameraAndMicrophoneSitePermissionsProps extends CommonSitePermissionsProps {
45
+ /** Icon name for the camera icon */
46
+ cameraIconName?: string;
47
+ /** Icon name for the microphone icon */
48
+ microphoneIconName?: string;
49
+ /** Icon name for the central icon between the camera and microphone icons */
50
+ connectorIconName?: string;
51
+ /** Strings for use with the {@link CameraAndMicrophoneSitePermissions} */
52
+ strings?: CameraAndMicrophoneSitePermissionsStrings;
53
+ }
54
+ /**
55
+ * @beta
56
+ *
57
+ * Component to allow Contoso to help their end user with their devices should their permissions be blocked
58
+ * by their browsers settings.
59
+ */
60
+ export declare const CameraAndMicrophoneSitePermissions: (props: CameraAndMicrophoneSitePermissionsProps) => JSX.Element;
61
+ /**
62
+ * @beta
63
+ * Strings for MicrophoneSitePermissions component.
64
+ */
65
+ export declare type MicrophoneSitePermissionsStrings = SitePermissionsStrings;
66
+ /**
67
+ * @beta
68
+ * Props for MicrophoneSitePermissions component.
69
+ */
70
+ export interface MicrophoneSitePermissionsProps extends CommonSitePermissionsProps {
71
+ /** Icon name for the microphone icon */
72
+ microphoneIconName?: string;
73
+ /** Strings for use with the {@link MicrophoneSitePermissions} */
74
+ strings?: MicrophoneSitePermissionsStrings;
75
+ }
76
+ /**
77
+ * Component to allow Contoso to help their end user with their devices should their permissions be blocked
78
+ * by their browsers settings.
79
+ *
80
+ * @beta
81
+ */
82
+ export declare const MicrophoneSitePermissions: (props: MicrophoneSitePermissionsProps) => JSX.Element;
83
+ /**
84
+ * @beta
85
+ * Strings for CameraSitePermissions component.
86
+ */
87
+ export declare type CameraSitePermissionsStrings = SitePermissionsStrings;
88
+ /**
89
+ * @beta
90
+ * Props for CameraSitePermissions component.
91
+ */
92
+ export interface CameraSitePermissionsProps extends CommonSitePermissionsProps {
93
+ /** Icon name for the camera icon */
94
+ cameraIconName?: string;
95
+ /** Strings for use with the {@link CameraSitePermissions} */
96
+ strings?: CameraSitePermissionsStrings;
97
+ }
98
+ /**
99
+ * Component to allow Contoso to help their end user with their devices should their permissions be blocked
100
+ * by their browsers settings.
101
+ *
102
+ * @beta
103
+ */
104
+ export declare const CameraSitePermissions: (props: CameraSitePermissionsProps) => JSX.Element;
105
+ //# sourceMappingURL=SitePermissions.d.ts.map
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  /* @conditional-compile-remove(call-readiness) */
5
5
  import { useLocale } from '../../localization';
6
6
  /* @conditional-compile-remove(call-readiness) */
7
- import { DomainPermissionsContainer } from './DomainPermissionsScaffolding';
7
+ import { SitePermissionsContainer } from './SitePermissionsScaffolding';
8
8
  /* @conditional-compile-remove(call-readiness) */
9
9
  import { useShallowMerge } from '../utils/merge';
10
10
  /**
@@ -13,24 +13,26 @@ import { useShallowMerge } from '../utils/merge';
13
13
  * Component to allow Contoso to help their end user with their devices should their permissions be blocked
14
14
  * by their browsers settings.
15
15
  */
16
- export const CameraAndMicrophoneDomainPermissions = (props) => {
16
+ export const CameraAndMicrophoneSitePermissions = (props) => {
17
17
  var _a, _b, _c;
18
18
  /* @conditional-compile-remove(call-readiness) */
19
19
  const locale = useLocale().strings;
20
20
  /* @conditional-compile-remove(call-readiness) */
21
21
  const strings = useShallowMerge(props.type === 'denied'
22
- ? locale.CameraAndMicrophoneDomainPermissionsDenied
22
+ ? props.browserHint === 'safari'
23
+ ? locale.CameraAndMicrophoneSitePermissionsDeniedSafari
24
+ : locale.CameraAndMicrophoneSitePermissionsDenied
23
25
  : props.type === 'request'
24
- ? locale.CameraAndMicrophoneDomainPermissionsRequest
25
- : locale.CameraAndMicrophoneDomainPermissionsCheck, props.strings);
26
+ ? locale.CameraAndMicrophoneSitePermissionsRequest
27
+ : locale.CameraAndMicrophoneSitePermissionsCheck, props.strings);
26
28
  /* @conditional-compile-remove(call-readiness) */
27
- const cameraIconName = ((_a = props.microphoneIconName) !== null && _a !== void 0 ? _a : props.type === 'denied') ? 'DomainPermissionCameraDenied' : 'DomainPermissionCamera';
29
+ const cameraIconName = ((_a = props.microphoneIconName) !== null && _a !== void 0 ? _a : props.type === 'denied') ? 'SitePermissionCameraDenied' : 'SitePermissionCamera';
28
30
  /* @conditional-compile-remove(call-readiness) */
29
- const microphoneIconName = ((_b = props.microphoneIconName) !== null && _b !== void 0 ? _b : props.type === 'denied') ? 'DomainPermissionMicDenied' : 'DomainPermissionMic';
31
+ const microphoneIconName = ((_b = props.microphoneIconName) !== null && _b !== void 0 ? _b : props.type === 'denied') ? 'SitePermissionMicDenied' : 'SitePermissionMic';
30
32
  /* @conditional-compile-remove(call-readiness) */
31
- const connectorIconName = (_c = props.microphoneIconName) !== null && _c !== void 0 ? _c : 'DomainPermissionsSparkle';
33
+ const connectorIconName = (_c = props.microphoneIconName) !== null && _c !== void 0 ? _c : 'SitePermissionsSparkle';
32
34
  /* @conditional-compile-remove(call-readiness) */
33
- return (React.createElement(DomainPermissionsContainer, Object.assign({}, props, { strings: strings, cameraIconName: cameraIconName, connectorIconName: connectorIconName, microphoneIconName: microphoneIconName, onPrimaryButtonClick: props.onContinueAnywayClick })));
35
+ return (React.createElement(SitePermissionsContainer, Object.assign({}, props, { strings: strings, cameraIconName: cameraIconName, connectorIconName: connectorIconName, microphoneIconName: microphoneIconName, onPrimaryButtonClick: props.onContinueAnywayClick })));
34
36
  return React.createElement(React.Fragment, null);
35
37
  };
36
38
  /**
@@ -39,20 +41,22 @@ export const CameraAndMicrophoneDomainPermissions = (props) => {
39
41
  *
40
42
  * @beta
41
43
  */
42
- export const MicrophoneDomainPermissions = (props) => {
44
+ export const MicrophoneSitePermissions = (props) => {
43
45
  var _a;
44
46
  /* @conditional-compile-remove(call-readiness) */
45
47
  const locale = useLocale().strings;
46
48
  /* @conditional-compile-remove(call-readiness) */
47
49
  const strings = useShallowMerge(props.type === 'denied'
48
- ? locale.MicrophoneDomainPermissionsDenied
50
+ ? props.browserHint === 'safari'
51
+ ? locale.MicrophoneSitePermissionsDeniedSafari
52
+ : locale.MicrophoneSitePermissionsDenied
49
53
  : props.type === 'request'
50
- ? locale.MicrophoneDomainPermissionsRequest
51
- : locale.MicrophoneDomainPermissionsCheck, props.strings);
54
+ ? locale.MicrophoneSitePermissionsRequest
55
+ : locale.MicrophoneSitePermissionsCheck, props.strings);
52
56
  /* @conditional-compile-remove(call-readiness) */
53
- const iconName = ((_a = props.microphoneIconName) !== null && _a !== void 0 ? _a : props.type === 'denied') ? 'DomainPermissionMicDenied' : 'DomainPermissionMic';
57
+ const iconName = ((_a = props.microphoneIconName) !== null && _a !== void 0 ? _a : props.type === 'denied') ? 'SitePermissionMicDenied' : 'SitePermissionMic';
54
58
  /* @conditional-compile-remove(call-readiness) */
55
- return (React.createElement(DomainPermissionsContainer, Object.assign({}, props, { strings: strings, cameraIconName: iconName, onPrimaryButtonClick: props.onContinueAnywayClick })));
59
+ return (React.createElement(SitePermissionsContainer, Object.assign({}, props, { strings: strings, cameraIconName: iconName, onPrimaryButtonClick: props.onContinueAnywayClick })));
56
60
  return React.createElement(React.Fragment, null);
57
61
  };
58
62
  /**
@@ -61,20 +65,22 @@ export const MicrophoneDomainPermissions = (props) => {
61
65
  *
62
66
  * @beta
63
67
  */
64
- export const CameraDomainPermissions = (props) => {
68
+ export const CameraSitePermissions = (props) => {
65
69
  var _a;
66
70
  /* @conditional-compile-remove(call-readiness) */
67
71
  const locale = useLocale().strings;
68
72
  /* @conditional-compile-remove(call-readiness) */
69
73
  const strings = useShallowMerge(props.type === 'denied'
70
- ? locale.CameraDomainPermissionsDenied
74
+ ? props.browserHint === 'safari'
75
+ ? locale.CameraSitePermissionsDeniedSafari
76
+ : locale.CameraSitePermissionsDenied
71
77
  : props.type === 'request'
72
- ? locale.CameraDomainPermissionsRequest
73
- : locale.CameraDomainPermissionsCheck, props.strings);
78
+ ? locale.CameraSitePermissionsRequest
79
+ : locale.CameraSitePermissionsCheck, props.strings);
74
80
  /* @conditional-compile-remove(call-readiness) */
75
- const iconName = ((_a = props.cameraIconName) !== null && _a !== void 0 ? _a : props.type === 'denied') ? 'DomainPermissionCameraDenied' : 'DomainPermissionCamera';
81
+ const iconName = ((_a = props.cameraIconName) !== null && _a !== void 0 ? _a : props.type === 'denied') ? 'SitePermissionCameraDenied' : 'SitePermissionCamera';
76
82
  /* @conditional-compile-remove(call-readiness) */
77
- return (React.createElement(DomainPermissionsContainer, Object.assign({}, props, { strings: strings, microphoneIconName: iconName, onPrimaryButtonClick: props.onContinueAnywayClick })));
83
+ return (React.createElement(SitePermissionsContainer, Object.assign({}, props, { strings: strings, microphoneIconName: iconName, onPrimaryButtonClick: props.onContinueAnywayClick })));
78
84
  return React.createElement(React.Fragment, null);
79
85
  };
80
- //# sourceMappingURL=DomainPermissions.js.map
86
+ //# sourceMappingURL=SitePermissions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SitePermissions.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/DevicePermissions/SitePermissions.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,iDAAiD;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,iDAAiD;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAwDjD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,KAA8C,EAAe,EAAE;;IAChH,iDAAiD;IACjD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC;IAEnC,iDAAiD;IACjD,MAAM,OAAO,GAAG,eAAe,CAC7B,KAAK,CAAC,IAAI,KAAK,QAAQ;QACrB,CAAC,CAAC,KAAK,CAAC,WAAW,KAAK,QAAQ;YAC9B,CAAC,CAAC,MAAM,CAAC,8CAA8C;YACvD,CAAC,CAAC,MAAM,CAAC,wCAAwC;QACnD,CAAC,CAAC,KAAK,CAAC,IAAI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,oBACnB,KAAK,IACT,OAAO,EAAE,OAAO,EAChB,kBAAkB,EAAE,QAAQ,EAC5B,oBAAoB,EAAE,KAAK,CAAC,qBAAqB,IACjD,CACH,CAAC;IACF,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 { useLocale } from '../../localization';\nimport { SitePermissionsStrings, SitePermissionsStyles } from './SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nimport { SitePermissionsContainer } from './SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nimport { useShallowMerge } from '../utils/merge';\n\n/**\n * @beta\n * Props for SitePermissions components.\n */\nexport interface CommonSitePermissionsProps {\n /**\n * Name of application calling experience is in.\n */\n appName: string;\n /**\n * Type of the Site Permissions component.\n */\n type: 'request' | 'denied' | 'check';\n /**\n * Type of the browser used, the Site permission component will show different guidance text based on the browser type\n */\n browserHint?: 'safari' | 'unset';\n /**\n * Action to be taken by the more help link. Possible to send to external page or show other modal.\n * If this is not provided the button will not be shown.\n */\n onTroubleshootingClick?: () => void;\n /**\n * Action that is taken when the user clicks the continue anyway button.\n * If this is not provided the button will not be shown.\n */\n onContinueAnywayClick?: () => void;\n /**\n * Styles for SitePermissions component.\n */\n styles?: SitePermissionsStyles;\n}\n\n/**\n * @beta\n * Strings for CameraAndMicrophoneSitePermissions component.\n */\nexport type CameraAndMicrophoneSitePermissionsStrings = SitePermissionsStrings;\n\n/**\n * @beta\n * Props for CameraAndMicrophoneSitePermissions component.\n */\nexport interface CameraAndMicrophoneSitePermissionsProps extends CommonSitePermissionsProps {\n /** Icon name for the camera icon */\n cameraIconName?: string;\n /** Icon name for the microphone icon */\n microphoneIconName?: string;\n /** Icon name for the central icon between the camera and microphone icons */\n connectorIconName?: string;\n /** Strings for use with the {@link CameraAndMicrophoneSitePermissions} */\n strings?: CameraAndMicrophoneSitePermissionsStrings;\n}\n\n/**\n * @beta\n *\n * Component to allow Contoso to help their end user with their devices should their permissions be blocked\n * by their browsers settings.\n */\nexport const CameraAndMicrophoneSitePermissions = (props: CameraAndMicrophoneSitePermissionsProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const locale = useLocale().strings;\n\n /* @conditional-compile-remove(call-readiness) */\n const strings = useShallowMerge(\n props.type === 'denied'\n ? props.browserHint === 'safari'\n ? locale.CameraAndMicrophoneSitePermissionsDeniedSafari\n : locale.CameraAndMicrophoneSitePermissionsDenied\n : props.type === 'request'\n ? locale.CameraAndMicrophoneSitePermissionsRequest\n : locale.CameraAndMicrophoneSitePermissionsCheck,\n props.strings\n );\n\n /* @conditional-compile-remove(call-readiness) */\n const cameraIconName =\n props.microphoneIconName ?? props.type === 'denied' ? 'SitePermissionCameraDenied' : 'SitePermissionCamera';\n /* @conditional-compile-remove(call-readiness) */\n const microphoneIconName =\n props.microphoneIconName ?? props.type === 'denied' ? 'SitePermissionMicDenied' : 'SitePermissionMic';\n /* @conditional-compile-remove(call-readiness) */\n const connectorIconName = props.microphoneIconName ?? 'SitePermissionsSparkle';\n\n /* @conditional-compile-remove(call-readiness) */\n return (\n <SitePermissionsContainer\n {...props}\n strings={strings}\n cameraIconName={cameraIconName}\n connectorIconName={connectorIconName}\n microphoneIconName={microphoneIconName}\n onPrimaryButtonClick={props.onContinueAnywayClick}\n />\n );\n return <></>;\n};\n\n/**\n * @beta\n * Strings for MicrophoneSitePermissions component.\n */\nexport type MicrophoneSitePermissionsStrings = SitePermissionsStrings;\n\n/**\n * @beta\n * Props for MicrophoneSitePermissions component.\n */\nexport interface MicrophoneSitePermissionsProps extends CommonSitePermissionsProps {\n /** Icon name for the microphone icon */\n microphoneIconName?: string;\n /** Strings for use with the {@link MicrophoneSitePermissions} */\n strings?: MicrophoneSitePermissionsStrings;\n}\n\n/**\n * Component to allow Contoso to help their end user with their devices should their permissions be blocked\n * by their browsers settings.\n *\n * @beta\n */\nexport const MicrophoneSitePermissions = (props: MicrophoneSitePermissionsProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const locale = useLocale().strings;\n\n /* @conditional-compile-remove(call-readiness) */\n const strings = useShallowMerge(\n props.type === 'denied'\n ? props.browserHint === 'safari'\n ? locale.MicrophoneSitePermissionsDeniedSafari\n : locale.MicrophoneSitePermissionsDenied\n : props.type === 'request'\n ? locale.MicrophoneSitePermissionsRequest\n : locale.MicrophoneSitePermissionsCheck,\n props.strings\n );\n\n /* @conditional-compile-remove(call-readiness) */\n const iconName =\n props.microphoneIconName ?? props.type === 'denied' ? 'SitePermissionMicDenied' : 'SitePermissionMic';\n\n /* @conditional-compile-remove(call-readiness) */\n return (\n <SitePermissionsContainer\n {...props}\n strings={strings}\n cameraIconName={iconName}\n onPrimaryButtonClick={props.onContinueAnywayClick}\n />\n );\n return <></>;\n};\n\n/**\n * @beta\n * Strings for CameraSitePermissions component.\n */\nexport type CameraSitePermissionsStrings = SitePermissionsStrings;\n\n/**\n * @beta\n * Props for CameraSitePermissions component.\n */\nexport interface CameraSitePermissionsProps extends CommonSitePermissionsProps {\n /** Icon name for the camera icon */\n cameraIconName?: string;\n /** Strings for use with the {@link CameraSitePermissions} */\n strings?: CameraSitePermissionsStrings;\n}\n\n/**\n * Component to allow Contoso to help their end user with their devices should their permissions be blocked\n * by their browsers settings.\n *\n * @beta\n */\nexport const CameraSitePermissions = (props: CameraSitePermissionsProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const locale = useLocale().strings;\n\n /* @conditional-compile-remove(call-readiness) */\n const strings = useShallowMerge(\n props.type === 'denied'\n ? props.browserHint === 'safari'\n ? locale.CameraSitePermissionsDeniedSafari\n : locale.CameraSitePermissionsDenied\n : props.type === 'request'\n ? locale.CameraSitePermissionsRequest\n : locale.CameraSitePermissionsCheck,\n props.strings\n );\n\n /* @conditional-compile-remove(call-readiness) */\n const iconName =\n props.cameraIconName ?? props.type === 'denied' ? 'SitePermissionCameraDenied' : 'SitePermissionCamera';\n\n /* @conditional-compile-remove(call-readiness) */\n return (\n <SitePermissionsContainer\n {...props}\n strings={strings}\n microphoneIconName={iconName}\n onPrimaryButtonClick={props.onContinueAnywayClick}\n />\n );\n return <></>;\n};\n"]}
@@ -3,9 +3,9 @@ import { ILinkStyles, IButtonStyles } from '@fluentui/react';
3
3
  import { BaseCustomStyles } from '../../types';
4
4
  /**
5
5
  * @private
6
- * Props for DomainPermissions component.
6
+ * Props for SitePermissions component.
7
7
  */
8
- export interface DomainPermissionsContainerProps {
8
+ export interface SitePermissionsContainerProps {
9
9
  /**
10
10
  * Name of application calling experience is in.
11
11
  */
@@ -36,19 +36,19 @@ export interface DomainPermissionsContainerProps {
36
36
  */
37
37
  onPrimaryButtonClick?: () => void;
38
38
  /**
39
- * Localization strings for DomainPermissions component.
39
+ * Localization strings for SitePermissions component.
40
40
  */
41
- strings?: DomainPermissionsStrings;
41
+ strings?: SitePermissionsStrings;
42
42
  /**
43
- * Styles for DomainPermissions component.
43
+ * Styles for SitePermissions component.
44
44
  */
45
- styles?: DomainPermissionsStyles;
45
+ styles?: SitePermissionsStyles;
46
46
  }
47
47
  /**
48
48
  * @beta
49
- * Strings for DomainPermissions component
49
+ * Strings for SitePermissions component
50
50
  */
51
- export declare type DomainPermissionsStrings = {
51
+ export declare type SitePermissionsStrings = {
52
52
  /**
53
53
  * Main text string.
54
54
  */
@@ -71,16 +71,16 @@ export declare type DomainPermissionsStrings = {
71
71
  ariaLabel?: string;
72
72
  };
73
73
  /**
74
- * Fluent styles for {@link DomainPermissionsContainer}.
74
+ * Fluent styles for {@link SitePermissionsContainer}.
75
75
  *
76
76
  * @beta
77
77
  */
78
- export interface DomainPermissionsStyles extends BaseCustomStyles {
78
+ export interface SitePermissionsStyles extends BaseCustomStyles {
79
79
  /** Styles for the primary button. */
80
80
  primaryButton?: IButtonStyles;
81
81
  /** Styles for the help troubleshooting link text. */
82
82
  troubleshootingLink?: ILinkStyles;
83
83
  }
84
84
  /** @private */
85
- export declare const DomainPermissionsContainer: (props: DomainPermissionsContainerProps) => JSX.Element;
86
- //# sourceMappingURL=DomainPermissionsScaffolding.d.ts.map
85
+ export declare const SitePermissionsContainer: (props: SitePermissionsContainerProps) => JSX.Element;
86
+ //# sourceMappingURL=SitePermissionsScaffolding.d.ts.map
@@ -3,18 +3,18 @@
3
3
  import React from 'react';
4
4
  import { Stack, Text, Link, Icon, useTheme, PrimaryButton, mergeStyleSets } from '@fluentui/react';
5
5
  import { _formatString } from "../../../../acs-ui-common/src";
6
- import { iconBannerContainerStyles, iconContainerStyles, iconPrimaryStyles, linkTextStyles, primaryButtonStyles, primaryTextStyles, secondaryTextStyles, sparkleIconBackdropStyles, textContainerStyles } from '../styles/DomainPermissions.styles';
6
+ import { iconBannerContainerStyles, iconContainerStyles, iconPrimaryStyles, linkTextStyles, primaryButtonStyles, primaryTextStyles, secondaryTextStyles, sparkleIconBackdropStyles, textContainerStyles } from '../styles/SitePermissions.styles';
7
7
  import { isValidString } from '../utils';
8
8
  /**
9
9
  * spacing for the icons in the banner.
10
10
  */
11
11
  const tokens = { childrenGap: '2rem' };
12
12
  /** @private */
13
- export const DomainPermissionsContainer = (props) => {
13
+ export const SitePermissionsContainer = (props) => {
14
14
  var _a, _b;
15
15
  const { appName, onTroubleshootingClick, onPrimaryButtonClick, strings } = props;
16
16
  const theme = useTheme();
17
- return (React.createElement(Stack, { style: { padding: '2rem', maxWidth: '25.375rem' }, "aria-label": strings === null || strings === void 0 ? void 0 : strings.ariaLabel },
17
+ return (React.createElement(Stack, { style: { padding: '2rem', maxWidth: '25.375rem', alignSelf: 'center' }, "aria-label": strings === null || strings === void 0 ? void 0 : strings.ariaLabel },
18
18
  React.createElement(Stack, { styles: iconBannerContainerStyles, horizontal: true, horizontalAlign: 'center', verticalFill: true, tokens: tokens },
19
19
  props.cameraIconName && (React.createElement(Stack, null,
20
20
  React.createElement(Icon, { styles: iconPrimaryStyles, iconName: props.cameraIconName }))),
@@ -28,4 +28,4 @@ export const DomainPermissionsContainer = (props) => {
28
28
  onPrimaryButtonClick && isValidString(strings === null || strings === void 0 ? void 0 : strings.primaryButtonText) && (React.createElement(PrimaryButton, { styles: mergeStyleSets(primaryButtonStyles, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.primaryButton), text: strings === null || strings === void 0 ? void 0 : strings.primaryButtonText, onClick: onPrimaryButtonClick })),
29
29
  onTroubleshootingClick && isValidString(strings === null || strings === void 0 ? void 0 : strings.linkText) && (React.createElement(Link, { styles: mergeStyleSets(linkTextStyles, (_b = props.styles) === null || _b === void 0 ? void 0 : _b.troubleshootingLink), onClick: onTroubleshootingClick }, strings === null || strings === void 0 ? void 0 : strings.linkText)))));
30
30
  };
31
- //# sourceMappingURL=DomainPermissionsScaffolding.js.map
31
+ //# sourceMappingURL=SitePermissionsScaffolding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SitePermissionsScaffolding.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/DevicePermissions/SitePermissionsScaffolding.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,aAAa,EAGb,cAAc,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAY,sCAAgC;AAClE,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAsFzC;;GAEG;AACH,MAAM,MAAM,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;AAEvC,eAAe;AACf,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAoC,EAAe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O,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CACpF,CACR;YACA,OAAO,IAAI,aAAa,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC,IAAI,CACnD,oBAAC,IAAI,IAAC,MAAM,EAAE,mBAAmB,IAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAQ,CACnE;YAEA,oBAAoB,IAAI,aAAa,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,CAAC,IAAI,CACpE,oBAAC,aAAa,IACZ,MAAM,EAAE,cAAc,CAAC,mBAAmB,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,aAAa,CAAC,EACxE,IAAI,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,EAChC,OAAO,EAAE,oBAAoB,GAC7B,CACH;YACA,sBAAsB,IAAI,aAAa,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,IAAI,CAC7D,oBAAC,IAAI,IACH,MAAM,EAAE,cAAc,CAAC,cAAc,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,mBAAmB,CAAC,EACzE,OAAO,EAAE,sBAAsB,IAE9B,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CACb,CACR,CACK,CACF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\nimport {\n Stack,\n Text,\n Link,\n Icon,\n useTheme,\n PrimaryButton,\n ILinkStyles,\n IButtonStyles,\n mergeStyleSets\n} from '@fluentui/react';\nimport { _formatString, _pxToRem } from '@internal/acs-ui-common';\nimport {\n iconBannerContainerStyles,\n iconContainerStyles,\n iconPrimaryStyles,\n linkTextStyles,\n primaryButtonStyles,\n primaryTextStyles,\n secondaryTextStyles,\n sparkleIconBackdropStyles,\n textContainerStyles\n} from '../styles/SitePermissions.styles';\nimport { isValidString } from '../utils';\nimport { BaseCustomStyles } from '../../types';\n\n/**\n * @private\n * Props for SitePermissions component.\n */\nexport interface SitePermissionsContainerProps {\n /**\n * Name of application calling experience is in.\n */\n appName?: string;\n /**\n * Name of icon to be used for the camera icon.\n * If this is not provided the icon will not be shown.\n */\n cameraIconName?: string;\n /**\n * Name of icon to be used for the sparkle icon.\n * If this is not provided the icon will not be shown.\n */\n connectorIconName?: string;\n /**\n * Name of icon to be used for the mic icon.\n * If this is not provided the icon will not be shown.\n */\n microphoneIconName?: string;\n /**\n * Action to be taken by the more help link. Possible to send to external page or show other modal.\n * If this is not provided the button will not be shown.\n */\n onTroubleshootingClick?: () => void;\n /**\n * Action that is taken when the user clicks an optional primary button.\n * If this is not provided the button will not be shown.\n */\n onPrimaryButtonClick?: () => void;\n /**\n * Localization strings for SitePermissions component.\n */\n strings?: SitePermissionsStrings;\n /**\n * Styles for SitePermissions component.\n */\n styles?: SitePermissionsStyles;\n}\n\n/**\n * @beta\n * Strings for SitePermissions component\n */\nexport type SitePermissionsStrings = {\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 * Primary button text string.\n */\n primaryButtonText?: string;\n /**\n * Aria label describing the content of the container\n */\n ariaLabel?: string;\n};\n\n/**\n * Fluent styles for {@link SitePermissionsContainer}.\n *\n * @beta\n */\nexport interface SitePermissionsStyles 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/**\n * spacing for the icons in the banner.\n */\nconst tokens = { childrenGap: '2rem' };\n\n/** @private */\nexport const SitePermissionsContainer = (props: SitePermissionsContainerProps): JSX.Element => {\n const { appName, onTroubleshootingClick, onPrimaryButtonClick, strings } = props;\n const theme = useTheme();\n\n return (\n <Stack style={{ padding: '2rem', maxWidth: '25.375rem', alignSelf: 'center' }} aria-label={strings?.ariaLabel}>\n <Stack styles={iconBannerContainerStyles} horizontal horizontalAlign={'center'} verticalFill tokens={tokens}>\n {props.cameraIconName && (\n <Stack>\n <Icon styles={iconPrimaryStyles} iconName={props.cameraIconName}></Icon>\n </Stack>\n )}\n {props.connectorIconName && (\n <Stack styles={iconContainerStyles} horizontal>\n <Icon styles={sparkleIconBackdropStyles(theme)} iconName={props.connectorIconName}></Icon>\n </Stack>\n )}\n {props.microphoneIconName && (\n <Stack>\n <Icon styles={iconPrimaryStyles} iconName={props.microphoneIconName}></Icon>\n </Stack>\n )}\n </Stack>\n <Stack styles={textContainerStyles}>\n {strings && isValidString(strings?.primaryText) && (\n <Text styles={primaryTextStyles}>\n {appName ? _formatString(strings.primaryText, { appName: appName }) : strings.primaryText}\n </Text>\n )}\n {strings && isValidString(strings?.secondaryText) && (\n <Text styles={secondaryTextStyles}>{strings?.secondaryText}</Text>\n )}\n\n {onPrimaryButtonClick && isValidString(strings?.primaryButtonText) && (\n <PrimaryButton\n styles={mergeStyleSets(primaryButtonStyles, props.styles?.primaryButton)}\n text={strings?.primaryButtonText}\n onClick={onPrimaryButtonClick}\n />\n )}\n {onTroubleshootingClick && isValidString(strings?.linkText) && (\n <Link\n styles={mergeStyleSets(linkTextStyles, props.styles?.troubleshootingLink)}\n onClick={onTroubleshootingClick}\n >\n {strings?.linkText}\n </Link>\n )}\n </Stack>\n </Stack>\n );\n};\n\"../../../../acs-ui-common/src\""]}
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  step((generator = generator.apply(thisArg, _arguments || [])).next());
10
10
  });
11
11
  };
12
- import React, { useEffect, useCallback } from 'react';
12
+ import React, { useEffect } from 'react';
13
13
  import { IconButton } from '@fluentui/react';
14
14
  import { concatStyleSets, DefaultButton, FocusZone, mergeStyles, Stack, Text, TextField, useTheme } from '@fluentui/react';
15
15
  import { useState } from 'react';
@@ -50,14 +50,17 @@ const DialpadButton = (props) => {
50
50
  var _a, _b, _c, _d;
51
51
  const theme = useTheme();
52
52
  const { digit, index, onClick, onLongPress, isMobile = false } = props;
53
- const clickFunction = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
54
- onClick(digit, index);
55
- }), [digit, index, onClick]);
56
- const longPressFunction = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
57
- onLongPress(digit, index);
58
- }), [digit, index, onLongPress]);
59
- const { handlers } = useLongPress(clickFunction, longPressFunction, isMobile);
60
- return (React.createElement(DefaultButton, Object.assign({ "data-test-id": `dialpad-button-${props.index}`, styles: concatStyleSets(buttonStyles(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.button) }, handlers),
53
+ const useLongPressProps = React.useMemo(() => ({
54
+ onClick: () => __awaiter(void 0, void 0, void 0, function* () {
55
+ onClick(digit, index);
56
+ }),
57
+ onLongPress: () => __awaiter(void 0, void 0, void 0, function* () {
58
+ onLongPress(digit, index);
59
+ }),
60
+ touchEventsOnly: isMobile
61
+ }), [digit, index, isMobile, onClick, onLongPress]);
62
+ const longPressHandlers = useLongPress(useLongPressProps);
63
+ return (React.createElement(DefaultButton, Object.assign({ "data-test-id": `dialpad-button-${props.index}`, styles: concatStyleSets(buttonStyles(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.button) }, longPressHandlers),
61
64
  React.createElement(Stack, null,
62
65
  React.createElement(Text, { className: mergeStyles(digitStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.digit) }, props.digit),
63
66
  React.createElement(Text, { className: mergeStyles(letterStyles(theme), (_c = props.styles) === null || _c === void 0 ? void 0 : _c.letter) }, (_d = props.letter) !== null && _d !== void 0 ? _d : ' '))));
@@ -113,6 +116,14 @@ const DialpadContainer = (props) => {
113
116
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
114
117
  onChange: (e) => {
115
118
  setText(e.target.value);
119
+ },
120
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
121
+ onClick: (e) => {
122
+ const input = e.target;
123
+ const end = input.value.length;
124
+ // Move focus to end of input field
125
+ input.setSelectionRange(end, end);
126
+ input.focus();
116
127
  }, placeholder: props.strings.placeholderText, "data-test-id": "dialpad-input", onRenderSuffix: () => {
117
128
  var _a;
118
129
  return (React.createElement(React.Fragment, null, showDeleteButton && plainTextValue.length !== 0 && (React.createElement(IconButton, { ariaLabel: props.strings.deleteButtonAriaLabel, onClick: deleteNumbers, styles: concatStyleSets(iconButtonStyles(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.deleteIcon), iconProps: { iconName: 'DialpadBackspace' } }))));
@@ -1 +1 @@
1
- {"version":3,"file":"Dialpad.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/Dialpad/Dialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,eAAe,EACf,aAAa,EACb,SAAS,EACT,WAAW,EACX,KAAK,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,EACT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,0CAA0C;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,YAAY,MAAM,uBAAuB,CAAC;AA+EjD,MAAM,qBAAqB,GAA6B;IACtD,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,E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AC,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,CAAC,CACjC,oBAAC,aAAa,IACZ,GAAG,EAAE,UAAU,WAAW,EAAE;gBAC5B;;;;;;;;;;;;;;;;kBAgBE;gBACF,KAAK,EAAE,WAAW,GAAG,QAAQ,GAAG,IAAI,CAAC,MAAM,EAC3C,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,cAAc,EACvB,WAAW,EAAE,kBAAkB,EAC/B,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CACI,CACT,CAAC;QACJ,CAAC,CAAC,CACQ,CACR,CACP,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAe,EAAE;IAC1D,0CAA0C,CAAC,6CAA6C;IACxF,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;IAElD,MAAM,8BAA8B,GAAG,GAAmB,EAAE;QAC1D,0CAA0C,CAAC,6CAA6C;QACxF,OAAO,aAAa,CAAC;QACrB,wFAAwF;QACxF,4DAA4D;QAC5D,OAAO,EAA+B,CAAC;IACzC,CAAC,CAAC;IACF,MAAM,OAAO,mCAAQ,8BAA8B,EAAE,GAAK,KAAK,CAAC,OAAO,CAAE,CAAC;IAC1E,OAAO,oBAAC,gBAAgB,kBAAC,OAAO,EAAE,OAAO,IAAM,KAAK,EAAI,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE;IAC9C,sFAAsF;IACtF,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useEffect, useCallback } from 'react';\nimport { IStyle, IButtonStyles, ITextFieldStyles } from '@fluentui/react';\n\nimport { IconButton } from '@fluentui/react';\nimport {\n concatStyleSets,\n DefaultButton,\n FocusZone,\n mergeStyles,\n Stack,\n Text,\n TextField,\n useTheme\n} from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useState } from 'react';\n/* @conditional-compile-remove(dialpad) */\nimport { useLocale } from '../../localization';\nimport {\n buttonStyles,\n containerStyles,\n iconButtonStyles,\n digitStyles,\n letterStyles,\n textFieldStyles\n} from '../styles/Dialpad.styles';\nimport { formatPhoneNumber } from '../utils/formatPhoneNumber';\nimport useLongPress from '../utils/useLongPress';\n\n/**\n * Strings of {@link Dialpad} that can be overridden.\n *\n * @beta\n */\nexport interface DialpadStrings {\n placeholderText: string;\n deleteButtonAriaLabel?: string;\n}\n\n/**\n * Styles for {@link Dialpad} component.\n *\n * @beta\n */\nexport interface DialpadStyles {\n root?: IStyle;\n button?: IButtonStyles;\n textField?: Partial<ITextFieldStyles>;\n digit?: IStyle;\n letter?: IStyle;\n deleteIcon?: IButtonStyles;\n}\n\n/**\n * DTMF tone for PSTN calls.\n *\n * @beta\n */\nexport type DtmfTone =\n | 'A'\n | 'B'\n | 'C'\n | 'D'\n | 'Flash'\n | 'Num0'\n | 'Num1'\n | 'Num2'\n | 'Num3'\n | 'Num4'\n | 'Num5'\n | 'Num6'\n | 'Num7'\n | 'Num8'\n | 'Num9'\n | 'Pound'\n | 'Star';\n\n/**\n * Props for {@link Dialpad} component.\n *\n * @beta\n */\nexport interface DialpadProps {\n strings?: DialpadStrings;\n /** function to send dtmf tones on button click */\n onSendDtmfTone?: (dtmfTone: DtmfTone) => Promise<void>;\n /** Callback for dialpad button behavior*/\n onClickDialpadButton?: (buttonValue: string, buttonIndex: number) => void;\n /** set dialpad textfield content */\n textFieldValue?: string;\n /** on change function for text field, provides an unformatted plain text*/\n onChange?: (input: string) => void;\n /** boolean input to determine when to show/hide delete button, default true */\n showDeleteButton?: boolean;\n /** boolean input to determine if dialpad is in mobile view, default false */\n isMobile?: boolean;\n styles?: DialpadStyles;\n}\n\ntype DialpadButtonContent = {\n /** Number displayed on each dialpad button */\n digit: string;\n /** Letters displayed on each dialpad button */\n letter?: string;\n};\n\nconst dialPadButtonsDefault: DialpadButtonContent[][] = [\n [{ digit: '1' }, { digit: '2', letter: 'ABC' }, { digit: '3', letter: 'DEF' }],\n [\n { digit: '4', letter: 'GHI' },\n { digit: '5', letter: 'JKL' },\n { digit: '6', letter: 'MNO' }\n ],\n [\n { digit: '7', letter: 'PQRS' },\n { digit: '8', letter: 'TUV' },\n { digit: '9', letter: 'WXYZ' }\n ],\n [{ digit: '*' }, { digit: '0', letter: '+' }, { digit: '#' }]\n];\n\nconst DtmfTones: DtmfTone[] = [\n 'Num1',\n 'Num2',\n 'Num3',\n 'Num4',\n 'Num5',\n 'Num6',\n 'Num7',\n 'Num8',\n 'Num9',\n 'Star',\n 'Num0',\n 'Pound'\n];\n\nconst DialpadButton = (props: {\n digit: string;\n letter?: string;\n styles?: DialpadStyles;\n index: number;\n onClick: (input: string, index: number) => void;\n onLongPress: (input: string, index: number) => void;\n isMobile?: boolean;\n}): JSX.Element => {\n const theme = useTheme();\n\n const { digit, index, onClick, onLongPress, isMobile = false } = props;\n\n const clickFunction = useCallback(async () => {\n onClick(digit, index);\n }, [digit, index, onClick]);\n\n const longPressFunction = useCallback(async () => {\n onLongPress(digit, index);\n }, [digit, index, onLongPress]);\n\n const { handlers } = useLongPress(clickFunction, longPressFunction, isMobile);\n return (\n <DefaultButton\n data-test-id={`dialpad-button-${props.index}`}\n styles={concatStyleSets(buttonStyles(theme), props.styles?.button)}\n {...handlers}\n >\n <Stack>\n <Text className={mergeStyles(digitStyles(theme), props.styles?.digit)}>{props.digit}</Text>\n\n <Text className={mergeStyles(letterStyles(theme), props.styles?.letter)}>{props.letter ?? ' '}</Text>\n </Stack>\n </DefaultButton>\n );\n};\n\nconst DialpadContainer = (props: {\n strings: DialpadStrings;\n onSendDtmfTone?: (dtmfTone: DtmfTone) => Promise<void>;\n /** Callback for dialpad button behavior */\n onClickDialpadButton?: (buttonValue: string, buttonIndex: number) => void;\n /** Pass in custom content to dialpad textfield */\n textFieldValue?: string;\n /** on change function for text field, provides an unformatted plain text */\n onChange?: (input: string) => void;\n /** boolean input to determine when to show/hide delete button, default true */\n showDeleteButton?: boolean;\n /** boolean input to determine if dialpad is in mobile view, default false */\n isMobile?: boolean;\n styles?: DialpadStyles;\n}): JSX.Element => {\n const theme = useTheme();\n\n const {\n onSendDtmfTone,\n onClickDialpadButton,\n textFieldValue,\n onChange,\n showDeleteButton = true,\n isMobile = false\n } = props;\n\n const [plainTextValue, setPlainTextValue] = useState(textFieldValue ?? '');\n\n useEffect(() => {\n if (onChange) {\n onChange(plainTextValue);\n }\n }, [plainTextValue, onChange]);\n\n useEffect(() => {\n setText(textFieldValue ?? '');\n }, [textFieldValue]);\n\n const onClickDialpad = (input: string, index: number): void => {\n setText(plainTextValue + input);\n if (onSendDtmfTone) {\n onSendDtmfTone(DtmfTones[index]);\n }\n if (onClickDialpadButton) {\n onClickDialpadButton(input, index);\n }\n };\n\n const onLongPressDialpad = (input: string, index: number): void => {\n if (input === '0' && index === 10) {\n setText(plainTextValue + '+');\n } else {\n setText(plainTextValue + input);\n }\n if (onSendDtmfTone) {\n onSendDtmfTone(DtmfTones[index]);\n }\n if (onClickDialpadButton) {\n onClickDialpadButton(input, index);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setText = (input: string): void => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n const plainInput = sanitizeInput(input);\n setPlainTextValue(plainInput);\n };\n\n const deleteNumbers = (): void => {\n const modifiedInput = plainTextValue.substring(0, plainTextValue.length - 1);\n setText(modifiedInput);\n };\n\n return (\n <div\n className={mergeStyles(containerStyles(theme), props.styles?.root)}\n data-test-id=\"dialpadContainer\"\n data-ui-id=\"dialpadContainer\"\n >\n <TextField\n styles={concatStyleSets(textFieldStyles(theme), props.styles?.textField)}\n value={textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue)}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange={(e: any) => {\n setText(e.target.value);\n }}\n placeholder={props.strings.placeholderText}\n data-test-id=\"dialpad-input\"\n onRenderSuffix={(): JSX.Element => (\n <>\n {showDeleteButton && plainTextValue.length !== 0 && (\n <IconButton\n ariaLabel={props.strings.deleteButtonAriaLabel}\n onClick={deleteNumbers}\n styles={concatStyleSets(iconButtonStyles(theme), props.styles?.deleteIcon)}\n iconProps={{ iconName: 'DialpadBackspace' }}\n />\n )}\n </>\n )}\n />\n <FocusZone>\n {dialPadButtonsDefault.map((rows, rowIndex) => {\n return (\n <Stack horizontal key={`row_${rowIndex}`} horizontalAlign=\"stretch\">\n {rows.map((button, columnIndex) => (\n <DialpadButton\n key={`button_${columnIndex}`}\n /* row index = 0\n columnIndex: (0,1,2) => (0,1,2)\n row index = 1\n columnIndex: (0,1,2)=> (3,4,5)\n row index = 2\n columnIndex: (0,1,2)=> (6,7,8)\n row index = 3\n columnIndex: (0,1,2)=> (9,10,11)\n columnIndex + rowIndex*rows.length calculates the corresponding index for each button\n dialpad index:\n 0 1 2\n 3 4 5\n 6 7 8\n 9 10 11\n then use this index to locate the corresponding dtmf tones\n DtmfTones[index]\n */\n index={columnIndex + rowIndex * rows.length}\n digit={button.digit}\n letter={button.letter}\n styles={props.styles}\n onClick={onClickDialpad}\n onLongPress={onLongPressDialpad}\n isMobile={isMobile}\n />\n ))}\n </Stack>\n );\n })}\n </FocusZone>\n </div>\n );\n};\n\n/**\n * A component to allow users to enter phone number through clicking on dialpad/using keyboard\n * It will return empty component for stable builds\n *\n * @beta\n */\nexport const Dialpad = (props: DialpadProps): JSX.Element => {\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n const localeStrings = useLocale().strings.dialpad;\n\n const dialpadLocaleStringsTrampoline = (): DialpadStrings => {\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n return localeStrings;\n // Even though the component strings type doesn't have `DialpadStrings` in stable build,\n // the string values exist. So unsafe cast for stable build.\n return '' as unknown as DialpadStrings;\n };\n const strings = { ...dialpadLocaleStringsTrampoline(), ...props.strings };\n return <DialpadContainer strings={strings} {...props} />;\n};\n\nconst sanitizeInput = (input: string): string => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n return input.replace(/[^\\d*#+]/g, '');\n};\n\"../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"Dialpad.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/Dialpad/Dialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,eAAe,EACf,aAAa,EACb,SAAS,EACT,WAAW,EACX,KAAK,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,EACT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,0CAA0C;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,YAAY,MAAM,uBAAuB,CAAC;AA+EjD,MAAM,qBAAqB,GAA6B;IACtD,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAC9E;QACE,EAAE,KAAK,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M,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE;IAC9C,sFAAsF;IACtF,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useEffect } from 'react';\nimport { IStyle, IButtonStyles, ITextFieldStyles } from '@fluentui/react';\n\nimport { IconButton } from '@fluentui/react';\nimport {\n concatStyleSets,\n DefaultButton,\n FocusZone,\n mergeStyles,\n Stack,\n Text,\n TextField,\n useTheme\n} from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useState } from 'react';\n/* @conditional-compile-remove(dialpad) */\nimport { useLocale } from '../../localization';\nimport {\n buttonStyles,\n containerStyles,\n iconButtonStyles,\n digitStyles,\n letterStyles,\n textFieldStyles\n} from '../styles/Dialpad.styles';\nimport { formatPhoneNumber } from '../utils/formatPhoneNumber';\nimport useLongPress from '../utils/useLongPress';\n\n/**\n * Strings of {@link Dialpad} that can be overridden.\n *\n * @beta\n */\nexport interface DialpadStrings {\n placeholderText: string;\n deleteButtonAriaLabel?: string;\n}\n\n/**\n * Styles for {@link Dialpad} component.\n *\n * @beta\n */\nexport interface DialpadStyles {\n root?: IStyle;\n button?: IButtonStyles;\n textField?: Partial<ITextFieldStyles>;\n digit?: IStyle;\n letter?: IStyle;\n deleteIcon?: IButtonStyles;\n}\n\n/**\n * DTMF tone for PSTN calls.\n *\n * @beta\n */\nexport type DtmfTone =\n | 'A'\n | 'B'\n | 'C'\n | 'D'\n | 'Flash'\n | 'Num0'\n | 'Num1'\n | 'Num2'\n | 'Num3'\n | 'Num4'\n | 'Num5'\n | 'Num6'\n | 'Num7'\n | 'Num8'\n | 'Num9'\n | 'Pound'\n | 'Star';\n\n/**\n * Props for {@link Dialpad} component.\n *\n * @beta\n */\nexport interface DialpadProps {\n strings?: DialpadStrings;\n /** function to send dtmf tones on button click */\n onSendDtmfTone?: (dtmfTone: DtmfTone) => Promise<void>;\n /** Callback for dialpad button behavior*/\n onClickDialpadButton?: (buttonValue: string, buttonIndex: number) => void;\n /** set dialpad textfield content */\n textFieldValue?: string;\n /** on change function for text field, provides an unformatted plain text*/\n onChange?: (input: string) => void;\n /** boolean input to determine when to show/hide delete button, default true */\n showDeleteButton?: boolean;\n /** boolean input to determine if dialpad is in mobile view, default false */\n isMobile?: boolean;\n styles?: DialpadStyles;\n}\n\ntype DialpadButtonContent = {\n /** Number displayed on each dialpad button */\n digit: string;\n /** Letters displayed on each dialpad button */\n letter?: string;\n};\n\nconst dialPadButtonsDefault: DialpadButtonContent[][] = [\n [{ digit: '1' }, { digit: '2', letter: 'ABC' }, { digit: '3', letter: 'DEF' }],\n [\n { digit: '4', letter: 'GHI' },\n { digit: '5', letter: 'JKL' },\n { digit: '6', letter: 'MNO' }\n ],\n [\n { digit: '7', letter: 'PQRS' },\n { digit: '8', letter: 'TUV' },\n { digit: '9', letter: 'WXYZ' }\n ],\n [{ digit: '*' }, { digit: '0', letter: '+' }, { digit: '#' }]\n];\n\nconst DtmfTones: DtmfTone[] = [\n 'Num1',\n 'Num2',\n 'Num3',\n 'Num4',\n 'Num5',\n 'Num6',\n 'Num7',\n 'Num8',\n 'Num9',\n 'Star',\n 'Num0',\n 'Pound'\n];\n\nconst DialpadButton = (props: {\n digit: string;\n letter?: string;\n styles?: DialpadStyles;\n index: number;\n onClick: (input: string, index: number) => void;\n onLongPress: (input: string, index: number) => void;\n isMobile?: boolean;\n}): JSX.Element => {\n const theme = useTheme();\n\n const { digit, index, onClick, onLongPress, isMobile = false } = props;\n\n const useLongPressProps = React.useMemo(\n () => ({\n onClick: async () => {\n onClick(digit, index);\n },\n onLongPress: async () => {\n onLongPress(digit, index);\n },\n touchEventsOnly: isMobile\n }),\n [digit, index, isMobile, onClick, onLongPress]\n );\n\n const longPressHandlers = useLongPress(useLongPressProps);\n\n return (\n <DefaultButton\n data-test-id={`dialpad-button-${props.index}`}\n styles={concatStyleSets(buttonStyles(theme), props.styles?.button)}\n {...longPressHandlers}\n >\n <Stack>\n <Text className={mergeStyles(digitStyles(theme), props.styles?.digit)}>{props.digit}</Text>\n\n <Text className={mergeStyles(letterStyles(theme), props.styles?.letter)}>{props.letter ?? ' '}</Text>\n </Stack>\n </DefaultButton>\n );\n};\n\nconst DialpadContainer = (props: {\n strings: DialpadStrings;\n onSendDtmfTone?: (dtmfTone: DtmfTone) => Promise<void>;\n /** Callback for dialpad button behavior */\n onClickDialpadButton?: (buttonValue: string, buttonIndex: number) => void;\n /** Pass in custom content to dialpad textfield */\n textFieldValue?: string;\n /** on change function for text field, provides an unformatted plain text */\n onChange?: (input: string) => void;\n /** boolean input to determine when to show/hide delete button, default true */\n showDeleteButton?: boolean;\n /** boolean input to determine if dialpad is in mobile view, default false */\n isMobile?: boolean;\n styles?: DialpadStyles;\n}): JSX.Element => {\n const theme = useTheme();\n\n const {\n onSendDtmfTone,\n onClickDialpadButton,\n textFieldValue,\n onChange,\n showDeleteButton = true,\n isMobile = false\n } = props;\n\n const [plainTextValue, setPlainTextValue] = useState(textFieldValue ?? '');\n\n useEffect(() => {\n if (onChange) {\n onChange(plainTextValue);\n }\n }, [plainTextValue, onChange]);\n\n useEffect(() => {\n setText(textFieldValue ?? '');\n }, [textFieldValue]);\n\n const onClickDialpad = (input: string, index: number): void => {\n setText(plainTextValue + input);\n if (onSendDtmfTone) {\n onSendDtmfTone(DtmfTones[index]);\n }\n if (onClickDialpadButton) {\n onClickDialpadButton(input, index);\n }\n };\n\n const onLongPressDialpad = (input: string, index: number): void => {\n if (input === '0' && index === 10) {\n setText(plainTextValue + '+');\n } else {\n setText(plainTextValue + input);\n }\n if (onSendDtmfTone) {\n onSendDtmfTone(DtmfTones[index]);\n }\n if (onClickDialpadButton) {\n onClickDialpadButton(input, index);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setText = (input: string): void => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n const plainInput = sanitizeInput(input);\n setPlainTextValue(plainInput);\n };\n\n const deleteNumbers = (): void => {\n const modifiedInput = plainTextValue.substring(0, plainTextValue.length - 1);\n setText(modifiedInput);\n };\n\n return (\n <div\n className={mergeStyles(containerStyles(theme), props.styles?.root)}\n data-test-id=\"dialpadContainer\"\n data-ui-id=\"dialpadContainer\"\n >\n <TextField\n styles={concatStyleSets(textFieldStyles(theme), props.styles?.textField)}\n value={textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue)}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange={(e: any) => {\n setText(e.target.value);\n }}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClick={(e: any) => {\n const input = e.target;\n const end = input.value.length;\n\n // Move focus to end of input field\n input.setSelectionRange(end, end);\n input.focus();\n }}\n placeholder={props.strings.placeholderText}\n data-test-id=\"dialpad-input\"\n onRenderSuffix={(): JSX.Element => (\n <>\n {showDeleteButton && plainTextValue.length !== 0 && (\n <IconButton\n ariaLabel={props.strings.deleteButtonAriaLabel}\n onClick={deleteNumbers}\n styles={concatStyleSets(iconButtonStyles(theme), props.styles?.deleteIcon)}\n iconProps={{ iconName: 'DialpadBackspace' }}\n />\n )}\n </>\n )}\n />\n <FocusZone>\n {dialPadButtonsDefault.map((rows, rowIndex) => {\n return (\n <Stack horizontal key={`row_${rowIndex}`} horizontalAlign=\"stretch\">\n {rows.map((button, columnIndex) => (\n <DialpadButton\n key={`button_${columnIndex}`}\n /* row index = 0\n columnIndex: (0,1,2) => (0,1,2)\n row index = 1\n columnIndex: (0,1,2)=> (3,4,5)\n row index = 2\n columnIndex: (0,1,2)=> (6,7,8)\n row index = 3\n columnIndex: (0,1,2)=> (9,10,11)\n columnIndex + rowIndex*rows.length calculates the corresponding index for each button\n dialpad index:\n 0 1 2\n 3 4 5\n 6 7 8\n 9 10 11\n then use this index to locate the corresponding dtmf tones\n DtmfTones[index]\n */\n index={columnIndex + rowIndex * rows.length}\n digit={button.digit}\n letter={button.letter}\n styles={props.styles}\n onClick={onClickDialpad}\n onLongPress={onLongPressDialpad}\n isMobile={isMobile}\n />\n ))}\n </Stack>\n );\n })}\n </FocusZone>\n </div>\n );\n};\n\n/**\n * A component to allow users to enter phone number through clicking on dialpad/using keyboard\n * It will return empty component for stable builds\n *\n * @beta\n */\nexport const Dialpad = (props: DialpadProps): JSX.Element => {\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n const localeStrings = useLocale().strings.dialpad;\n\n const dialpadLocaleStringsTrampoline = (): DialpadStrings => {\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n return localeStrings;\n // Even though the component strings type doesn't have `DialpadStrings` in stable build,\n // the string values exist. So unsafe cast for stable build.\n return '' as unknown as DialpadStrings;\n };\n const strings = { ...dialpadLocaleStringsTrampoline(), ...props.strings };\n return <DialpadContainer strings={strings} {...props} />;\n};\n\nconst sanitizeInput = (input: string): string => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n return input.replace(/[^\\d*#+]/g, '');\n};\n\"../../../../acs-ui-common/src\""]}
@@ -7,6 +7,7 @@ import { BaseCustomStyles } from '../../types';
7
7
  */
8
8
  export declare const DrawerContentContainer: (props: {
9
9
  children: React.ReactNode;
10
+ heading?: string;
10
11
  styles?: BaseCustomStyles;
11
12
  }) => JSX.Element;
12
13
  //# sourceMappingURL=DrawerContentContainer.d.ts.map