@azure/communication-react 1.9.0 → 1.10.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/dist/communication-react.d.ts +2403 -189
  2. package/dist/dist-cjs/communication-react/index.js +14191 -7849
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +2 -1
  7. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -0
  8. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +12 -0
  10. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +13 -1
  11. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +4 -0
  13. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +13 -3
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +18 -2
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +10 -0
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +15 -1
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +45 -0
  22. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +91 -0
  23. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -0
  24. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +4 -1
  25. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +19 -0
  26. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +6 -0
  28. package/dist/dist-esm/calling-component-bindings/src/index.js +8 -0
  29. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +1 -0
  31. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +16 -3
  32. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  33. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +4 -3
  34. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
  35. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +14 -2
  36. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +20 -1
  37. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
  38. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +7 -0
  39. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +12 -0
  40. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  41. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +4 -0
  42. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +11 -0
  43. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  44. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +2 -1
  45. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +8 -1
  46. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  47. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +8 -2
  48. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  49. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +6 -5
  50. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -1
  51. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +15 -1
  52. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
  53. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +2 -1
  54. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +5 -0
  55. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  56. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +60 -3
  57. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +8 -1
  59. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +62 -1
  60. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  61. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +41 -0
  62. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  63. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
  64. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +8 -0
  65. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  66. package/dist/dist-esm/calling-stateful-client/src/Converter.js +12 -0
  67. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  68. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.d.ts +1 -0
  69. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js +8 -0
  70. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js.map +1 -1
  71. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.d.ts +1 -0
  72. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js +8 -0
  73. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js.map +1 -1
  74. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +25 -1
  75. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +33 -2
  76. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  77. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +19 -0
  78. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +91 -0
  79. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +1 -0
  80. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +23 -0
  81. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +49 -0
  82. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -0
  83. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +2 -2
  84. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +8 -0
  85. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  86. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +3 -0
  87. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  88. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +4 -1
  89. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  90. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +119 -6
  91. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  92. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  93. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  94. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -1
  95. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  96. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +3 -1
  97. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  98. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +4 -1
  99. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
  100. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +1 -0
  101. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  102. package/dist/dist-esm/communication-react/src/index.d.ts +27 -0
  103. package/dist/dist-esm/communication-react/src/index.js +16 -0
  104. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  105. package/dist/dist-esm/react-components/src/components/Caption.js +1 -0
  106. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +22 -1
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +9 -2
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +2 -0
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +25 -16
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +22 -1
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +49 -15
  115. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  116. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +15 -0
  117. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +92 -2
  118. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +10 -0
  120. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +15 -0
  121. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +1 -0
  122. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +69 -0
  123. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +43 -0
  124. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +1 -0
  125. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +75 -0
  126. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +75 -0
  127. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +1 -0
  128. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +105 -0
  129. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +68 -0
  130. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +1 -0
  131. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +86 -0
  132. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +39 -0
  133. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +1 -0
  134. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +6 -0
  135. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +2 -2
  137. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
  138. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.d.ts +4 -0
  139. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +20 -19
  140. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
  141. package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +29 -1
  142. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +24 -2
  143. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  144. package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +49 -0
  145. package/dist/dist-esm/react-components/src/components/HoldButton.js +25 -0
  146. package/dist/dist-esm/react-components/src/components/HoldButton.js.map +1 -0
  147. package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +71 -0
  148. package/dist/dist-esm/react-components/src/components/ImageGallery.js +56 -0
  149. package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +1 -0
  150. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +3 -5
  151. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +22 -5
  152. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +1 -1
  154. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +121 -0
  155. package/dist/dist-esm/react-components/src/components/MentionPopover.js +117 -0
  156. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +1 -0
  157. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +51 -2
  158. package/dist/dist-esm/react-components/src/components/MessageThread.js +57 -8
  159. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  160. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +13 -0
  161. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +3 -0
  162. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  163. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +15 -0
  164. package/dist/dist-esm/react-components/src/components/ParticipantList.js +22 -4
  165. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  166. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -1
  167. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +3 -1
  168. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  169. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +41 -0
  170. package/dist/dist-esm/react-components/src/components/SendBox.js +32 -4
  171. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  172. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +41 -0
  173. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +573 -0
  174. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +1 -0
  175. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +152 -0
  176. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +816 -0
  177. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +1 -0
  178. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +2 -0
  179. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  180. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +2 -0
  181. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  182. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +24 -0
  183. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  184. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +2 -0
  185. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  186. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +7 -3
  187. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
  188. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +4 -0
  189. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +25 -15
  190. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
  191. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.d.ts +2 -2
  192. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.js +6 -4
  193. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.js.map +1 -1
  194. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +5 -0
  195. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +8 -3
  196. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  197. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.d.ts +1 -1
  198. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.d.ts +1 -1
  199. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.d.ts +5 -0
  200. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js +8 -3
  201. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js.map +1 -1
  202. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +15 -3
  203. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  204. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +13 -0
  205. package/dist/dist-esm/react-components/src/components/VideoGallery.js +15 -5
  206. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  207. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +7 -0
  208. package/dist/dist-esm/react-components/src/components/VideoTile.js +7 -1
  209. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  210. package/dist/dist-esm/react-components/src/components/index.d.ts +19 -0
  211. package/dist/dist-esm/react-components/src/components/index.js +12 -0
  212. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  213. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +58 -0
  214. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +144 -0
  215. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +1 -0
  216. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.d.ts +12 -0
  217. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +25 -2
  218. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
  219. package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js +2 -2
  220. package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js.map +1 -1
  221. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +68 -0
  222. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +205 -0
  223. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +1 -0
  224. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.d.ts +0 -4
  225. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js +0 -9
  226. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js.map +1 -1
  227. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +26 -0
  228. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +68 -0
  229. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +1 -0
  230. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +1 -1
  231. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +38 -0
  232. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +92 -0
  233. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +1 -0
  234. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +26 -0
  235. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +67 -0
  236. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +1 -0
  237. package/dist/dist-esm/react-components/src/components/utils/common.js +4 -0
  238. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  239. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +2 -1
  240. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  241. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +7 -0
  242. package/dist/dist-esm/react-components/src/components/utils/merge.js +16 -0
  243. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +1 -0
  244. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +4 -0
  245. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +5 -1
  246. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  247. package/dist/dist-esm/react-components/src/index.d.ts +1 -0
  248. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  249. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +63 -0
  250. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  251. package/dist/dist-esm/react-components/src/theming/icons.d.ts +87 -72
  252. package/dist/dist-esm/react-components/src/theming/icons.js +108 -0
  253. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  254. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +6 -0
  255. package/dist/dist-esm/react-components/src/theming/icons.styles.js +25 -0
  256. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -0
  257. package/dist/dist-esm/react-components/src/theming/themes.d.ts +21 -2
  258. package/dist/dist-esm/react-components/src/theming/themes.js +16 -0
  259. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  260. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +27 -1
  261. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  262. package/dist/dist-esm/react-components/src/types/OnRender.d.ts +8 -0
  263. package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
  264. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +6 -0
  265. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js +2 -0
  266. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +78 -0
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +87 -7
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +144 -0
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +75 -5
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +317 -50
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +130 -1
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +2 -1
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +7 -1
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +6 -0
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +2 -0
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  284. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +2 -0
  285. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +67 -10
  286. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  287. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +1 -0
  288. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +121 -12
  289. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  290. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +48 -0
  291. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +218 -0
  292. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -0
  293. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +2 -0
  294. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +27 -0
  295. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  296. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +20 -2
  297. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  298. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +2 -0
  299. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +27 -0
  300. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +12 -0
  302. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +93 -0
  303. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +1 -0
  304. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +1 -0
  305. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +33 -6
  306. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  307. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +0 -9
  308. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +21 -37
  309. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  310. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +0 -4
  311. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
  312. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +4 -2
  313. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  314. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +36 -2
  315. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  316. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +4 -2
  317. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  318. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +8 -0
  319. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +26 -0
  320. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +1 -0
  321. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +8 -1
  322. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  323. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +6 -2
  324. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  325. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +23 -6
  326. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  327. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +6 -0
  328. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +2 -0
  329. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  330. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +1 -2
  331. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +6 -3
  332. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  333. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +7 -0
  334. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +97 -6
  335. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  336. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +24 -0
  337. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +28 -0
  338. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -0
  339. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  340. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  341. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.d.ts +11 -0
  342. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +113 -0
  343. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -0
  344. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +15 -0
  345. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +54 -0
  346. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +1 -0
  347. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.d.ts +5 -0
  348. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.d.ts +5 -0
  349. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +9 -0
  350. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +10 -0
  351. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  352. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/callStatusSelector.d.ts +5 -0
  353. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/capabilitiesChangedInfoAndRoleSelector.d.ts +5 -0
  354. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/complianceBannerSelector.d.ts +5 -0
  355. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/deviceCountSelector.d.ts +5 -0
  356. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.d.ts +5 -0
  357. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.d.ts +5 -0
  358. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +4 -0
  359. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
  360. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.d.ts +5 -0
  361. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +5 -0
  362. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.d.ts +5 -0
  363. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.d.ts +5 -0
  364. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +10 -0
  365. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.d.ts +5 -0
  366. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.d.ts +5 -0
  367. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +32 -0
  368. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +81 -0
  369. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +1 -0
  370. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.d.ts +37 -0
  371. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js +73 -0
  372. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js.map +1 -0
  373. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +1 -80
  374. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
  375. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +15 -3
  376. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +88 -1
  377. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  378. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +68 -1
  379. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +35 -5
  380. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  381. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +32 -0
  382. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  383. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +30 -5
  384. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +111 -4
  385. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  386. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +64 -0
  387. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  388. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +10 -2
  389. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +40 -0
  390. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  391. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +13 -0
  392. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +37 -1
  393. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  394. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -0
  395. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
  396. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +24 -0
  397. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +11 -1
  398. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  399. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +20 -0
  400. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +4 -0
  401. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  402. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +133 -5
  403. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  404. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +18 -0
  405. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +18 -0
  406. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +1 -0
  407. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.d.ts +15 -0
  408. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js +23 -0
  409. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js.map +1 -0
  410. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +4 -0
  411. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  412. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +28 -2
  413. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +126 -4
  414. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  415. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +28 -0
  416. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +159 -1
  417. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
  418. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +17 -2
  419. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  420. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +2 -0
  421. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
  422. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js +8 -1
  423. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js.map +1 -1
  424. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +6 -0
  425. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +11 -0
  426. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +1 -0
  427. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +4 -0
  428. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  429. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +12 -0
  430. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +15 -0
  431. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -0
  432. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +34 -0
  433. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js +14 -0
  434. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js.map +1 -0
  435. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +5 -1
  436. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +11 -0
  437. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  438. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +22 -0
  439. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +107 -0
  440. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -0
  441. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +17 -0
  442. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +32 -0
  443. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +1 -0
  444. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +5 -0
  445. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +3 -2
  446. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
  447. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +22 -0
  448. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +74 -0
  449. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -0
  450. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +15 -0
  451. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +61 -0
  452. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +1 -0
  453. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +2 -0
  454. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +8 -2
  455. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
  456. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +2 -0
  457. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +14 -6
  458. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  459. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +84 -23
  460. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +13 -5
  461. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
  462. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +2 -0
  463. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +70 -1
  464. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  465. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +65 -3
  466. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  467. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +1 -0
  468. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  469. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +20 -3
  470. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  471. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.d.ts +1 -2
  472. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +3 -1
  473. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  474. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +21 -2
  475. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  476. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +17 -0
  477. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +50 -0
  478. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -0
  479. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.d.ts +11 -0
  480. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +40 -0
  481. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +1 -0
  482. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +103 -73
  483. package/dist/dist-esm/react-composites/src/composites/common/icons.js +18 -2
  484. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  485. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +21 -83
  486. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  487. package/dist/dist-esm/react-composites/src/composites/index.d.ts +1 -0
  488. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  489. package/dist/tsdoc-metadata.json +1 -1
  490. package/package.json +6 -74
  491. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -13
  492. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +0 -32
  493. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +0 -1
@@ -0,0 +1,75 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import React from 'react';
4
+ /* @conditional-compile-remove(call-readiness) */
5
+ import { useMemo } from 'react';
6
+ /* @conditional-compile-remove(call-readiness) */
7
+ import { Stack, Text, Link, PrimaryButton, mergeStyleSets, useTheme, Image, ImageFit } from '@fluentui/react';
8
+ /* @conditional-compile-remove(call-readiness) */
9
+ import { useLocale } from '../../localization';
10
+ /* @conditional-compile-remove(call-readiness) */
11
+ import { browserPermissionContainerStyles, iOSImageContainer, iOSStepsCircleStyles, iOSStepsContainerStyles, iOSStepsDigitTextStyles, iOSStepsTextStyles, linkTextStyles, primaryButtonStyles, primaryTextStyles, secondaryTextStyles, textContainerStyles } from './../styles/BrowserPermissionDenied.styles';
12
+ /* @conditional-compile-remove(call-readiness) */
13
+ import { isValidString } from '../utils';
14
+ /* @conditional-compile-remove(call-readiness) */
15
+ const BrowserPermissionDeniedIOSContainer = (props) => {
16
+ const { imageSource, onTroubleshootingClick, onTryAgainClick, strings, styles } = props;
17
+ const theme = useTheme();
18
+ const stepsCircleStyle = useMemo(() => {
19
+ return mergeStyleSets(iOSStepsCircleStyles, {
20
+ root: {
21
+ background: theme.palette.neutralLighter
22
+ }
23
+ });
24
+ }, [theme]);
25
+ return React.createElement(Stack, { styles: browserPermissionContainerStyles },
26
+ imageSource && React.createElement(Stack, { styles: mergeStyleSets(iOSImageContainer, {
27
+ root: {
28
+ background: theme.palette.neutralLighter
29
+ }
30
+ }) }, isValidString(strings === null || strings === void 0 ? void 0 : strings.imageAltText) && React.createElement(Image, { src: imageSource !== null && imageSource !== void 0 ? imageSource : '', alt: strings === null || strings === void 0 ? void 0 : strings.imageAltText, imageFit: ImageFit.centerContain, style: {
31
+ padding: '1.5rem'
32
+ } })),
33
+ React.createElement(Stack, { style: {
34
+ padding: '1rem',
35
+ paddingBottom: '1.25rem'
36
+ } },
37
+ React.createElement(Stack, { styles: textContainerStyles },
38
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.primaryText) && React.createElement(Text, { styles: primaryTextStyles }, strings === null || strings === void 0 ? void 0 : strings.primaryText),
39
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.secondaryText) && React.createElement(Text, { styles: secondaryTextStyles }, strings === null || strings === void 0 ? void 0 : strings.secondaryText),
40
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.step1Text) && React.createElement(Stack, { styles: iOSStepsContainerStyles },
41
+ React.createElement(Stack, { horizontalAlign: 'center', styles: stepsCircleStyle },
42
+ React.createElement(Text, { styles: iOSStepsDigitTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step1DigitText)),
43
+ React.createElement(Text, { styles: iOSStepsTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step1Text)),
44
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.step2Text) && React.createElement(Stack, { styles: iOSStepsContainerStyles },
45
+ React.createElement(Stack, { horizontalAlign: 'center', styles: stepsCircleStyle },
46
+ React.createElement(Text, { styles: iOSStepsDigitTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step2DigitText)),
47
+ React.createElement(Text, { styles: iOSStepsTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step2Text)),
48
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.step3Text) && React.createElement(Stack, { styles: iOSStepsContainerStyles },
49
+ React.createElement(Stack, { horizontalAlign: 'center', styles: stepsCircleStyle },
50
+ React.createElement(Text, { styles: iOSStepsDigitTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step3DigitText)),
51
+ React.createElement(Text, { styles: iOSStepsTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step3Text)),
52
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.step4Text) && React.createElement(Stack, { styles: mergeStyleSets(iOSStepsContainerStyles, {
53
+ root: {
54
+ paddingBottom: '1.5rem'
55
+ }
56
+ }) },
57
+ React.createElement(Stack, { horizontalAlign: 'center', styles: stepsCircleStyle },
58
+ React.createElement(Text, { styles: iOSStepsDigitTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step4DigitText)),
59
+ React.createElement(Text, { styles: iOSStepsTextStyles }, strings === null || strings === void 0 ? void 0 : strings.step4Text)),
60
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.primaryButtonText) && React.createElement(PrimaryButton, { styles: mergeStyleSets(primaryButtonStyles, styles === null || styles === void 0 ? void 0 : styles.primaryButton), text: strings === null || strings === void 0 ? void 0 : strings.primaryButtonText, onClick: onTryAgainClick }),
61
+ isValidString(strings === null || strings === void 0 ? void 0 : strings.linkText) && React.createElement(Link, { styles: mergeStyleSets(linkTextStyles, styles === null || styles === void 0 ? void 0 : styles.troubleshootingLink), onClick: onTroubleshootingClick }, strings === null || strings === void 0 ? void 0 : strings.linkText))));
62
+ };
63
+ /**
64
+ * @beta
65
+ *
66
+ * Component to allow Contoso to help their end user with their devices should their browser experience device permission issues.
67
+ */
68
+ export const BrowserPermissionDeniedIOS = (props) => {
69
+ /* @conditional-compile-remove(call-readiness) */
70
+ const locale = useLocale().strings.BrowserPermissionDeniedIOS;
71
+ /* @conditional-compile-remove(call-readiness) */
72
+ return React.createElement(BrowserPermissionDeniedIOSContainer, Object.assign({}, props, { strings: props.strings ? props.strings : locale }));
73
+ return React.createElement(React.Fragment, null);
74
+ };
75
+ //# sourceMappingURL=BrowserPermissionDeniedIOS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrowserPermissionDeniedIOS.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,iDAAiD;AACjD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9G,iDAAiD;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,iDAAiD;AACjD,OAAO,EAAE,gCAAgC,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAE/S,iDAAiD;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAsEzC,iDAAiD;AACjD,MAAM,mCAAmC,GAAG,CAAC,KAAsC,EAAe,EAAE;IAClG,MAAM,EACJ,WAAW,EACX,sBAAsB,EACtB,eAAe,EACf,OAAO,EACP,MAAM,EACP,GAAG,KAAK,CAAC;IACV,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,EAAE;QACpC,OAAO,cAAc,CAAC,oBAAoB,EAAE;YAC1C,IAAI,EAAE;gBACJ,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;aACzC;SACF,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;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\n\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useMemo } from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { Stack, Text, Link, PrimaryButton, mergeStyleSets, useTheme, Image, ImageFit } from '@fluentui/react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(call-readiness) */\nimport { _formatString, _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(call-readiness) */\nimport { browserPermissionContainerStyles, iOSImageContainer, iOSStepsCircleStyles, iOSStepsContainerStyles, iOSStepsDigitTextStyles, iOSStepsTextStyles, linkTextStyles, primaryButtonStyles, primaryTextStyles, secondaryTextStyles, textContainerStyles } from './../styles/BrowserPermissionDenied.styles';\nimport { BrowserPermissionDeniedProps, BrowserPermissionDeniedStrings } from './BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nimport { isValidString } from '../utils';\n\n/**\n * @beta\n * Props for BrowserPermissionDeniedIOS component.\n */\nexport interface BrowserPermissionDeniedIOSProps extends BrowserPermissionDeniedProps {\n /**\n * Localization strings for BrowserPermissionDeniedIOS component.\n */\n strings?: BrowserPermissionDeniedIOSStrings;\n /**\n * Link to image source.\n *\n * Image is inserted into the top of the component.\n */\n imageSource?: string;\n}\n\n/**\n * @beta\n * Strings for BrowserPermissionDeniedIOS component\n */\nexport interface BrowserPermissionDeniedIOSStrings extends BrowserPermissionDeniedStrings {\n /**\n * Image alt text\n */\n imageAltText: string;\n /**\n * Main text string.\n */\n primaryText: string;\n /**\n * Subtext string.\n */\n secondaryText: string;\n /**\n * Step 1 string\n */\n step1Text: string;\n /**\n * Step 1 digit string\n */\n step1DigitText: string;\n /**\n * Step 2 string\n */\n step2Text: string;\n /**\n * Step 2 digit string\n */\n step2DigitText: string;\n /**\n * Step 3 string\n */\n step3Text: string;\n /**\n * Step 3 digit string\n */\n step3DigitText: string;\n /**\n * Step 4 string\n */\n step4Text: string;\n /**\n * Step 4 digit string\n */\n step4DigitText: string;\n}\n\n/* @conditional-compile-remove(call-readiness) */\nconst BrowserPermissionDeniedIOSContainer = (props: BrowserPermissionDeniedIOSProps): JSX.Element => {\n const {\n imageSource,\n onTroubleshootingClick,\n onTryAgainClick,\n strings,\n styles\n } = props;\n const theme = useTheme();\n const stepsCircleStyle = useMemo(() => {\n return mergeStyleSets(iOSStepsCircleStyles, {\n root: {\n background: theme.palette.neutralLighter\n }\n });\n }, [theme]);\n return <Stack styles={browserPermissionContainerStyles}>\n {imageSource && <Stack styles={mergeStyleSets(iOSImageContainer, {\n root: {\n background: theme.palette.neutralLighter\n }\n })}>\n {isValidString(strings?.imageAltText) && <Image src={imageSource ?? ''} alt={strings?.imageAltText} imageFit={ImageFit.centerContain} style={{\n padding: '1.5rem'\n }} />}\n </Stack>}\n <Stack style={{\n padding: '1rem',\n paddingBottom: '1.25rem'\n }}>\n <Stack styles={textContainerStyles}>\n {isValidString(strings?.primaryText) && <Text styles={primaryTextStyles}>{strings?.primaryText}</Text>}\n {isValidString(strings?.secondaryText) && <Text styles={secondaryTextStyles}>{strings?.secondaryText}</Text>}\n {isValidString(strings?.step1Text) && <Stack styles={iOSStepsContainerStyles}>\n <Stack horizontalAlign={'center'} styles={stepsCircleStyle}>\n <Text styles={iOSStepsDigitTextStyles}>{strings?.step1DigitText}</Text>\n </Stack>\n <Text styles={iOSStepsTextStyles}>{strings?.step1Text}</Text>\n </Stack>}\n {isValidString(strings?.step2Text) && <Stack styles={iOSStepsContainerStyles}>\n <Stack horizontalAlign={'center'} styles={stepsCircleStyle}>\n <Text styles={iOSStepsDigitTextStyles}>{strings?.step2DigitText}</Text>\n </Stack>\n <Text styles={iOSStepsTextStyles}>{strings?.step2Text}</Text>\n </Stack>}\n {isValidString(strings?.step3Text) && <Stack styles={iOSStepsContainerStyles}>\n <Stack horizontalAlign={'center'} styles={stepsCircleStyle}>\n <Text styles={iOSStepsDigitTextStyles}>{strings?.step3DigitText}</Text>\n </Stack>\n <Text styles={iOSStepsTextStyles}>{strings?.step3Text}</Text>\n </Stack>}\n {isValidString(strings?.step4Text) && <Stack styles={mergeStyleSets(iOSStepsContainerStyles, {\n root: {\n paddingBottom: '1.5rem'\n }\n })}>\n <Stack horizontalAlign={'center'} styles={stepsCircleStyle}>\n <Text styles={iOSStepsDigitTextStyles}>{strings?.step4DigitText}</Text>\n </Stack>\n <Text styles={iOSStepsTextStyles}>{strings?.step4Text}</Text>\n </Stack>}\n {isValidString(strings?.primaryButtonText) && <PrimaryButton styles={mergeStyleSets(primaryButtonStyles, styles?.primaryButton)} text={strings?.primaryButtonText} onClick={onTryAgainClick} />}\n {isValidString(strings?.linkText) && <Link styles={mergeStyleSets(linkTextStyles, styles?.troubleshootingLink)} onClick={onTroubleshootingClick}>\n {strings?.linkText}\n </Link>}\n </Stack>\n </Stack>\n </Stack>;\n};\n\n/**\n * @beta\n *\n * Component to allow Contoso to help their end user with their devices should their browser experience device permission issues.\n */\nexport const BrowserPermissionDeniedIOS = (props: BrowserPermissionDeniedIOSProps): JSX.Element => {\n /* @conditional-compile-remove(call-readiness) */\n const locale = useLocale().strings.BrowserPermissionDeniedIOS;\n /* @conditional-compile-remove(call-readiness) */\n return <BrowserPermissionDeniedIOSContainer {...props} strings={props.strings ? props.strings : locale} />;\n return <></>;\n};\"../../../../acs-ui-common/src\""]}
@@ -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
+ * Kind of the Site Permissions component.
14
+ */
15
+ kind: '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
@@ -0,0 +1,68 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import React from 'react';
4
+ /* @conditional-compile-remove(call-readiness) */
5
+ import { useLocale } from '../../localization';
6
+ /* @conditional-compile-remove(call-readiness) */
7
+ import { SitePermissionsContainer } from './SitePermissionsScaffolding';
8
+ /* @conditional-compile-remove(call-readiness) */
9
+ import { useShallowMerge } from '../utils/merge';
10
+ /**
11
+ * @beta
12
+ *
13
+ * Component to allow Contoso to help their end user with their devices should their permissions be blocked
14
+ * by their browsers settings.
15
+ */
16
+ export const CameraAndMicrophoneSitePermissions = (props) => {
17
+ var _a, _b, _c;
18
+ /* @conditional-compile-remove(call-readiness) */
19
+ const locale = useLocale().strings;
20
+ /* @conditional-compile-remove(call-readiness) */
21
+ const strings = useShallowMerge(props.kind === 'denied' ? props.browserHint === 'safari' ? locale.CameraAndMicrophoneSitePermissionsDeniedSafari : locale.CameraAndMicrophoneSitePermissionsDenied : props.kind === 'request' ? locale.CameraAndMicrophoneSitePermissionsRequest : locale.CameraAndMicrophoneSitePermissionsCheck, props.strings);
22
+ /* @conditional-compile-remove(call-readiness) */
23
+ const cameraIconName = ((_a = props.microphoneIconName) !== null && _a !== void 0 ? _a : props.kind === 'denied') ? 'SitePermissionCameraDenied' : 'SitePermissionCamera';
24
+ /* @conditional-compile-remove(call-readiness) */
25
+ const microphoneIconName = ((_b = props.microphoneIconName) !== null && _b !== void 0 ? _b : props.kind === 'denied') ? 'SitePermissionMicDenied' : 'SitePermissionMic';
26
+ /* @conditional-compile-remove(call-readiness) */
27
+ const connectorIconName = (_c = props.microphoneIconName) !== null && _c !== void 0 ? _c : 'SitePermissionsSparkle';
28
+ /* @conditional-compile-remove(call-readiness) */
29
+ return React.createElement(SitePermissionsContainer, Object.assign({}, props, { strings: strings, cameraIconName: cameraIconName, connectorIconName: connectorIconName, microphoneIconName: microphoneIconName, onPrimaryButtonClick: props.onContinueAnywayClick }));
30
+ return React.createElement(React.Fragment, null);
31
+ };
32
+ /**
33
+ * Component to allow Contoso to help their end user with their devices should their permissions be blocked
34
+ * by their browsers settings.
35
+ *
36
+ * @beta
37
+ */
38
+ export const MicrophoneSitePermissions = (props) => {
39
+ var _a;
40
+ /* @conditional-compile-remove(call-readiness) */
41
+ const locale = useLocale().strings;
42
+ /* @conditional-compile-remove(call-readiness) */
43
+ const strings = useShallowMerge(props.kind === 'denied' ? props.browserHint === 'safari' ? locale.MicrophoneSitePermissionsDeniedSafari : locale.MicrophoneSitePermissionsDenied : props.kind === 'request' ? locale.MicrophoneSitePermissionsRequest : locale.MicrophoneSitePermissionsCheck, props.strings);
44
+ /* @conditional-compile-remove(call-readiness) */
45
+ const iconName = ((_a = props.microphoneIconName) !== null && _a !== void 0 ? _a : props.kind === 'denied') ? 'SitePermissionMicDenied' : 'SitePermissionMic';
46
+ /* @conditional-compile-remove(call-readiness) */
47
+ return React.createElement(SitePermissionsContainer, Object.assign({}, props, { strings: strings, cameraIconName: iconName, onPrimaryButtonClick: props.onContinueAnywayClick }));
48
+ return React.createElement(React.Fragment, null);
49
+ };
50
+ /**
51
+ * Component to allow Contoso to help their end user with their devices should their permissions be blocked
52
+ * by their browsers settings.
53
+ *
54
+ * @beta
55
+ */
56
+ export const CameraSitePermissions = (props) => {
57
+ var _a;
58
+ /* @conditional-compile-remove(call-readiness) */
59
+ const locale = useLocale().strings;
60
+ /* @conditional-compile-remove(call-readiness) */
61
+ const strings = useShallowMerge(props.kind === 'denied' ? props.browserHint === 'safari' ? locale.CameraSitePermissionsDeniedSafari : locale.CameraSitePermissionsDenied : props.kind === 'request' ? locale.CameraSitePermissionsRequest : locale.CameraSitePermissionsCheck, props.strings);
62
+ /* @conditional-compile-remove(call-readiness) */
63
+ const iconName = ((_a = props.cameraIconName) !== null && _a !== void 0 ? _a : props.kind === 'denied') ? 'SitePermissionCameraDenied' : 'SitePermissionCamera';
64
+ /* @conditional-compile-remove(call-readiness) */
65
+ return React.createElement(SitePermissionsContainer, Object.assign({}, props, { strings: strings, microphoneIconName: iconName, onPrimaryButtonClick: props.onContinueAnywayClick }));
66
+ return React.createElement(React.Fragment, null);
67
+ };
68
+ //# sourceMappingURL=SitePermissions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SitePermissions.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/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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AAG,CAAA,MAAA,KAAK,CAAC,cAAc,mCAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,sBAAsB,CAAC;IAEzH,iDAAiD;IACjD,OAAO,oBAAC,wBAAwB,oBAAK,KAAK,IAAE,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,KAAK,CAAC,qBAAqB,IAAI,CAAC;IAClJ,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 * Kind of the Site Permissions component.\n */\n kind: '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(props.kind === 'denied' ? props.browserHint === 'safari' ? locale.CameraAndMicrophoneSitePermissionsDeniedSafari : locale.CameraAndMicrophoneSitePermissionsDenied : props.kind === 'request' ? locale.CameraAndMicrophoneSitePermissionsRequest : locale.CameraAndMicrophoneSitePermissionsCheck, props.strings);\n\n /* @conditional-compile-remove(call-readiness) */\n const cameraIconName = props.microphoneIconName ?? props.kind === 'denied' ? 'SitePermissionCameraDenied' : 'SitePermissionCamera';\n /* @conditional-compile-remove(call-readiness) */\n const microphoneIconName = props.microphoneIconName ?? props.kind === 'denied' ? 'SitePermissionMicDenied' : 'SitePermissionMic';\n /* @conditional-compile-remove(call-readiness) */\n const connectorIconName = props.microphoneIconName ?? 'SitePermissionsSparkle';\n\n /* @conditional-compile-remove(call-readiness) */\n return <SitePermissionsContainer {...props} strings={strings} cameraIconName={cameraIconName} connectorIconName={connectorIconName} microphoneIconName={microphoneIconName} onPrimaryButtonClick={props.onContinueAnywayClick} />;\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(props.kind === 'denied' ? props.browserHint === 'safari' ? locale.MicrophoneSitePermissionsDeniedSafari : locale.MicrophoneSitePermissionsDenied : props.kind === 'request' ? locale.MicrophoneSitePermissionsRequest : locale.MicrophoneSitePermissionsCheck, props.strings);\n\n /* @conditional-compile-remove(call-readiness) */\n const iconName = props.microphoneIconName ?? props.kind === 'denied' ? 'SitePermissionMicDenied' : 'SitePermissionMic';\n\n /* @conditional-compile-remove(call-readiness) */\n return <SitePermissionsContainer {...props} strings={strings} cameraIconName={iconName} onPrimaryButtonClick={props.onContinueAnywayClick} />;\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(props.kind === 'denied' ? props.browserHint === 'safari' ? locale.CameraSitePermissionsDeniedSafari : locale.CameraSitePermissionsDenied : props.kind === 'request' ? locale.CameraSitePermissionsRequest : locale.CameraSitePermissionsCheck, props.strings);\n\n /* @conditional-compile-remove(call-readiness) */\n const iconName = props.cameraIconName ?? props.kind === 'denied' ? 'SitePermissionCameraDenied' : 'SitePermissionCamera';\n\n /* @conditional-compile-remove(call-readiness) */\n return <SitePermissionsContainer {...props} strings={strings} microphoneIconName={iconName} onPrimaryButtonClick={props.onContinueAnywayClick} />;\n return <></>;\n};"]}
@@ -0,0 +1,86 @@
1
+ /// <reference types="react" />
2
+ import { ILinkStyles, IButtonStyles } from '@fluentui/react';
3
+ import { BaseCustomStyles } from '../../types';
4
+ /**
5
+ * @private
6
+ * Props for SitePermissions component.
7
+ */
8
+ export interface SitePermissionsContainerProps {
9
+ /**
10
+ * Name of application calling experience is in.
11
+ */
12
+ appName?: string;
13
+ /**
14
+ * Name of icon to be used for the camera icon.
15
+ * If this is not provided the icon will not be shown.
16
+ */
17
+ cameraIconName?: string;
18
+ /**
19
+ * Name of icon to be used for the sparkle icon.
20
+ * If this is not provided the icon will not be shown.
21
+ */
22
+ connectorIconName?: string;
23
+ /**
24
+ * Name of icon to be used for the mic icon.
25
+ * If this is not provided the icon will not be shown.
26
+ */
27
+ microphoneIconName?: string;
28
+ /**
29
+ * Action to be taken by the more help link. Possible to send to external page or show other modal.
30
+ * If this is not provided the button will not be shown.
31
+ */
32
+ onTroubleshootingClick?: () => void;
33
+ /**
34
+ * Action that is taken when the user clicks an optional primary button.
35
+ * If this is not provided the button will not be shown.
36
+ */
37
+ onPrimaryButtonClick?: () => void;
38
+ /**
39
+ * Localization strings for SitePermissions component.
40
+ */
41
+ strings?: SitePermissionsStrings;
42
+ /**
43
+ * Styles for SitePermissions component.
44
+ */
45
+ styles?: SitePermissionsStyles;
46
+ }
47
+ /**
48
+ * @beta
49
+ * Strings for SitePermissions component
50
+ */
51
+ export declare type SitePermissionsStrings = {
52
+ /**
53
+ * Main text string.
54
+ */
55
+ primaryText?: string;
56
+ /**
57
+ * Subtext string.
58
+ */
59
+ secondaryText?: string;
60
+ /**
61
+ * More help link string.
62
+ */
63
+ linkText?: string;
64
+ /**
65
+ * Primary button text string.
66
+ */
67
+ primaryButtonText?: string;
68
+ /**
69
+ * Aria label describing the content of the container
70
+ */
71
+ ariaLabel?: string;
72
+ };
73
+ /**
74
+ * Fluent styles for {@link SitePermissionsContainer}.
75
+ *
76
+ * @beta
77
+ */
78
+ export interface SitePermissionsStyles extends BaseCustomStyles {
79
+ /** Styles for the primary button. */
80
+ primaryButton?: IButtonStyles;
81
+ /** Styles for the help troubleshooting link text. */
82
+ troubleshootingLink?: ILinkStyles;
83
+ }
84
+ /** @private */
85
+ export declare const SitePermissionsContainer: (props: SitePermissionsContainerProps) => JSX.Element;
86
+ //# sourceMappingURL=SitePermissionsScaffolding.d.ts.map
@@ -0,0 +1,39 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import React from 'react';
4
+ import { Stack, Text, Link, Icon, useTheme, PrimaryButton, mergeStyleSets } from '@fluentui/react';
5
+ import { _formatString } from "../../../../acs-ui-common/src";
6
+ import { iconBannerContainerStyles, iconContainerStyles, iconPrimaryStyles, linkTextStyles, primaryButtonStyles, primaryTextStyles, secondaryTextStyles, sparkleIconBackdropStyles, textContainerStyles } from '../styles/SitePermissions.styles';
7
+ import { isValidString } from '../utils';
8
+ /**
9
+ * spacing for the icons in the banner.
10
+ */
11
+ const tokens = {
12
+ childrenGap: '2rem'
13
+ };
14
+ /** @private */
15
+ export const SitePermissionsContainer = (props) => {
16
+ var _a, _b;
17
+ const { appName, onTroubleshootingClick, onPrimaryButtonClick, strings } = props;
18
+ const theme = useTheme();
19
+ return React.createElement(Stack, { style: {
20
+ padding: '2rem',
21
+ maxWidth: '25.375rem',
22
+ alignSelf: 'center'
23
+ }, "aria-label": strings === null || strings === void 0 ? void 0 : strings.ariaLabel },
24
+ React.createElement(Stack, { styles: iconBannerContainerStyles, horizontal: true, horizontalAlign: 'center', verticalFill: true, tokens: tokens },
25
+ props.cameraIconName && React.createElement(Stack, null,
26
+ React.createElement(Icon, { styles: iconPrimaryStyles, iconName: props.cameraIconName })),
27
+ props.connectorIconName && React.createElement(Stack, { styles: iconContainerStyles, horizontal: true },
28
+ React.createElement(Icon, { styles: sparkleIconBackdropStyles(theme), iconName: props.connectorIconName })),
29
+ props.microphoneIconName && React.createElement(Stack, null,
30
+ React.createElement(Icon, { styles: iconPrimaryStyles, iconName: props.microphoneIconName }))),
31
+ React.createElement(Stack, { styles: textContainerStyles },
32
+ strings && isValidString(strings === null || strings === void 0 ? void 0 : strings.primaryText) && React.createElement(Text, { styles: primaryTextStyles }, appName ? _formatString(strings.primaryText, {
33
+ appName: appName
34
+ }) : strings.primaryText),
35
+ strings && isValidString(strings === null || strings === void 0 ? void 0 : strings.secondaryText) && React.createElement(Text, { styles: secondaryTextStyles }, strings === null || strings === void 0 ? void 0 : strings.secondaryText),
36
+ 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 }),
37
+ 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)));
38
+ };
39
+ //# sourceMappingURL=SitePermissionsScaffolding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SitePermissionsScaffolding.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa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right (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { Stack, Text, Link, Icon, useTheme, PrimaryButton, ILinkStyles, IButtonStyles, mergeStyleSets } from '@fluentui/react';\nimport { _formatString, _pxToRem } from '@internal/acs-ui-common';\nimport { iconBannerContainerStyles, iconContainerStyles, iconPrimaryStyles, linkTextStyles, primaryButtonStyles, primaryTextStyles, secondaryTextStyles, sparkleIconBackdropStyles, textContainerStyles } 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 = {\n childrenGap: '2rem'\n};\n\n/** @private */\nexport const SitePermissionsContainer = (props: SitePermissionsContainerProps): JSX.Element => {\n const {\n appName,\n onTroubleshootingClick,\n onPrimaryButtonClick,\n strings\n } = props;\n const theme = useTheme();\n return <Stack style={{\n padding: '2rem',\n maxWidth: '25.375rem',\n alignSelf: 'center'\n }} aria-label={strings?.ariaLabel}>\n <Stack styles={iconBannerContainerStyles} horizontal horizontalAlign={'center'} verticalFill tokens={tokens}>\n {props.cameraIconName && <Stack>\n <Icon styles={iconPrimaryStyles} iconName={props.cameraIconName}></Icon>\n </Stack>}\n {props.connectorIconName && <Stack styles={iconContainerStyles} horizontal>\n <Icon styles={sparkleIconBackdropStyles(theme)} iconName={props.connectorIconName}></Icon>\n </Stack>}\n {props.microphoneIconName && <Stack>\n <Icon styles={iconPrimaryStyles} iconName={props.microphoneIconName}></Icon>\n </Stack>}\n </Stack>\n <Stack styles={textContainerStyles}>\n {strings && isValidString(strings?.primaryText) && <Text styles={primaryTextStyles}>\n {appName ? _formatString(strings.primaryText, {\n appName: appName\n }) : strings.primaryText}\n </Text>}\n {strings && isValidString(strings?.secondaryText) && <Text styles={secondaryTextStyles}>{strings?.secondaryText}</Text>}\n\n {onPrimaryButtonClick && isValidString(strings?.primaryButtonText) && <PrimaryButton styles={mergeStyleSets(primaryButtonStyles, props.styles?.primaryButton)} text={strings?.primaryButtonText} onClick={onPrimaryButtonClick} />}\n {onTroubleshootingClick && isValidString(strings?.linkText) && <Link styles={mergeStyleSets(linkTextStyles, props.styles?.troubleshootingLink)} onClick={onTroubleshootingClick}>\n {strings?.linkText}\n </Link>}\n </Stack>\n </Stack>;\n};\"../../../../acs-ui-common/src\""]}
@@ -13,6 +13,8 @@ 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';
16
+ /* @conditional-compile-remove(dialpad) */
17
+ import { useLocale } from '../../localization';
16
18
  import { buttonStyles, containerStyles, iconButtonStyles, digitStyles, letterStyles, textFieldStyles } from '../styles/Dialpad.styles';
17
19
  import { formatPhoneNumber } from '../utils/formatPhoneNumber';
18
20
  import useLongPress from '../utils/useLongPress';
@@ -163,7 +165,11 @@ const DialpadContainer = (props) => {
163
165
  * @beta
164
166
  */
165
167
  export const Dialpad = (props) => {
168
+ /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
169
+ const localeStrings = useLocale().strings.dialpad;
166
170
  const dialpadLocaleStringsTrampoline = () => {
171
+ /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
172
+ return localeStrings;
167
173
  // Even though the component strings type doesn't have `DialpadStrings` in stable build,
168
174
  // the string values exist. So unsafe cast for stable build.
169
175
  return '';
@@ -1 +1 @@
1
- {"version":3,"file":"Dialpad.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/Dialpad/Dialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3H,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACvI,OAAO,EAAE,iBAAiB,EA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3D,CAAC,CAAC;AACF,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 } from 'react';\nimport { IStyle, IButtonStyles, ITextFieldStyles } from '@fluentui/react';\nimport { IconButton } from '@fluentui/react';\nimport { concatStyleSets, DefaultButton, FocusZone, mergeStyles, Stack, Text, TextField, useTheme } from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useState } from 'react';\nimport { buttonStyles, containerStyles, iconButtonStyles, digitStyles, letterStyles, textFieldStyles } 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 = 'A' | 'B' | 'C' | 'D' | 'Flash' | 'Num0' | 'Num1' | 'Num2' | 'Num3' | 'Num4' | 'Num5' | 'Num6' | 'Num7' | 'Num8' | 'Num9' | 'Pound' | '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}\ntype DialpadButtonContent = {\n /** Number displayed on each dialpad button */\n digit: string;\n /** Letters displayed on each dialpad button */\n letter?: string;\n};\nconst dialPadButtonsDefault: DialpadButtonContent[][] = [[{\n digit: '1'\n}, {\n digit: '2',\n letter: 'ABC'\n}, {\n digit: '3',\n letter: 'DEF'\n}], [{\n digit: '4',\n letter: 'GHI'\n}, {\n digit: '5',\n letter: 'JKL'\n}, {\n digit: '6',\n letter: 'MNO'\n}], [{\n digit: '7',\n letter: 'PQRS'\n}, {\n digit: '8',\n letter: 'TUV'\n}, {\n digit: '9',\n letter: 'WXYZ'\n}], [{\n digit: '*'\n}, {\n digit: '0',\n letter: '+'\n}, {\n digit: '#'\n}]];\nconst DtmfTones: DtmfTone[] = ['Num1', 'Num2', 'Num3', 'Num4', 'Num5', 'Num6', 'Num7', 'Num8', 'Num9', 'Star', 'Num0', 'Pound'];\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 const {\n digit,\n index,\n onClick,\n onLongPress,\n isMobile = false\n } = props;\n const useLongPressProps = React.useMemo(() => ({\n onClick: async () => {\n onClick(digit, index);\n },\n onLongPress: async () => {\n onLongPress(digit, index);\n },\n touchEventsOnly: isMobile\n }), [digit, index, isMobile, onClick, onLongPress]);\n const longPressHandlers = useLongPress(useLongPressProps);\n return <DefaultButton data-test-id={`dialpad-button-${props.index}`} styles={concatStyleSets(buttonStyles(theme), props.styles?.button)} {...longPressHandlers}>\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};\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 const {\n onSendDtmfTone,\n onClickDialpadButton,\n textFieldValue,\n onChange,\n showDeleteButton = true,\n isMobile = false\n } = props;\n const [plainTextValue, setPlainTextValue] = useState(textFieldValue ?? '');\n useEffect(() => {\n if (onChange) {\n onChange(plainTextValue);\n }\n }, [plainTextValue, onChange]);\n useEffect(() => {\n setText(textFieldValue ?? '');\n }, [textFieldValue]);\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 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 const deleteNumbers = (): void => {\n const modifiedInput = plainTextValue.substring(0, plainTextValue.length - 1);\n setText(modifiedInput);\n };\n return <div className={mergeStyles(containerStyles(theme), props.styles?.root)} data-test-id=\"dialpadContainer\" data-ui-id=\"dialpadContainer\">\n <TextField styles={concatStyleSets(textFieldStyles(theme), props.styles?.textField)} 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 }} placeholder={props.strings.placeholderText} data-test-id=\"dialpad-input\" onRenderSuffix={(): JSX.Element => <>\n {showDeleteButton && plainTextValue.length !== 0 && <IconButton ariaLabel={props.strings.deleteButtonAriaLabel} onClick={deleteNumbers} styles={concatStyleSets(iconButtonStyles(theme), props.styles?.deleteIcon)} iconProps={{\n iconName: 'DialpadBackspace'\n }} />}\n </>} />\n <FocusZone>\n {dialPadButtonsDefault.map((rows, rowIndex) => {\n return <Stack horizontal key={`row_${rowIndex}`} horizontalAlign=\"stretch\">\n {rows.map((button, columnIndex) => <DialpadButton 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 */ index={columnIndex + rowIndex * rows.length} digit={button.digit} letter={button.letter} styles={props.styles} onClick={onClickDialpad} onLongPress={onLongPressDialpad} isMobile={isMobile} />)}\n </Stack>;\n })}\n </FocusZone>\n </div>;\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 const dialpadLocaleStringsTrampoline = (): DialpadStrings => {\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 = {\n ...dialpadLocaleStringsTrampoline(),\n ...props.strings\n };\n return <DialpadContainer strings={strings} {...props} />;\n};\nconst sanitizeInput = (input: string): string => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n return input.replace(/[^\\d*#+]/g, '');\n};\"../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"Dialpad.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/Dialpad/Dialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3H,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,0CAA0C;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACvI,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,YAAY,MAAM,uBAAuB,CAAC;AA4DjD,MAAM,qBAAqB,GAA6B,CAAC,CAAC;YACxD,KAAK,EAAE,GAAG;SACX,EAAE;YACD,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,KAAK;SACd,EAAE;YACD,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,KAAK;SACd,CAAC,EAAE,CAA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AAW,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';\nimport { IconButton } from '@fluentui/react';\nimport { concatStyleSets, DefaultButton, FocusZone, mergeStyles, Stack, Text, TextField, useTheme } from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useState } from 'react';\n/* @conditional-compile-remove(dialpad) */\nimport { useLocale } from '../../localization';\nimport { buttonStyles, containerStyles, iconButtonStyles, digitStyles, letterStyles, textFieldStyles } 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 = 'A' | 'B' | 'C' | 'D' | 'Flash' | 'Num0' | 'Num1' | 'Num2' | 'Num3' | 'Num4' | 'Num5' | 'Num6' | 'Num7' | 'Num8' | 'Num9' | 'Pound' | '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}\ntype DialpadButtonContent = {\n /** Number displayed on each dialpad button */\n digit: string;\n /** Letters displayed on each dialpad button */\n letter?: string;\n};\nconst dialPadButtonsDefault: DialpadButtonContent[][] = [[{\n digit: '1'\n}, {\n digit: '2',\n letter: 'ABC'\n}, {\n digit: '3',\n letter: 'DEF'\n}], [{\n digit: '4',\n letter: 'GHI'\n}, {\n digit: '5',\n letter: 'JKL'\n}, {\n digit: '6',\n letter: 'MNO'\n}], [{\n digit: '7',\n letter: 'PQRS'\n}, {\n digit: '8',\n letter: 'TUV'\n}, {\n digit: '9',\n letter: 'WXYZ'\n}], [{\n digit: '*'\n}, {\n digit: '0',\n letter: '+'\n}, {\n digit: '#'\n}]];\nconst DtmfTones: DtmfTone[] = ['Num1', 'Num2', 'Num3', 'Num4', 'Num5', 'Num6', 'Num7', 'Num8', 'Num9', 'Star', 'Num0', 'Pound'];\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 const {\n digit,\n index,\n onClick,\n onLongPress,\n isMobile = false\n } = props;\n const useLongPressProps = React.useMemo(() => ({\n onClick: async () => {\n onClick(digit, index);\n },\n onLongPress: async () => {\n onLongPress(digit, index);\n },\n touchEventsOnly: isMobile\n }), [digit, index, isMobile, onClick, onLongPress]);\n const longPressHandlers = useLongPress(useLongPressProps);\n return <DefaultButton data-test-id={`dialpad-button-${props.index}`} styles={concatStyleSets(buttonStyles(theme), props.styles?.button)} {...longPressHandlers}>\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};\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 const {\n onSendDtmfTone,\n onClickDialpadButton,\n textFieldValue,\n onChange,\n showDeleteButton = true,\n isMobile = false\n } = props;\n const [plainTextValue, setPlainTextValue] = useState(textFieldValue ?? '');\n useEffect(() => {\n if (onChange) {\n onChange(plainTextValue);\n }\n }, [plainTextValue, onChange]);\n useEffect(() => {\n setText(textFieldValue ?? '');\n }, [textFieldValue]);\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 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 const deleteNumbers = (): void => {\n const modifiedInput = plainTextValue.substring(0, plainTextValue.length - 1);\n setText(modifiedInput);\n };\n return <div className={mergeStyles(containerStyles(theme), props.styles?.root)} data-test-id=\"dialpadContainer\" data-ui-id=\"dialpadContainer\">\n <TextField styles={concatStyleSets(textFieldStyles(theme), props.styles?.textField)} 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 }} placeholder={props.strings.placeholderText} data-test-id=\"dialpad-input\" onRenderSuffix={(): JSX.Element => <>\n {showDeleteButton && plainTextValue.length !== 0 && <IconButton ariaLabel={props.strings.deleteButtonAriaLabel} onClick={deleteNumbers} styles={concatStyleSets(iconButtonStyles(theme), props.styles?.deleteIcon)} iconProps={{\n iconName: 'DialpadBackspace'\n }} />}\n </>} />\n <FocusZone>\n {dialPadButtonsDefault.map((rows, rowIndex) => {\n return <Stack horizontal key={`row_${rowIndex}`} horizontalAlign=\"stretch\">\n {rows.map((button, columnIndex) => <DialpadButton 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 */ index={columnIndex + rowIndex * rows.length} digit={button.digit} letter={button.letter} styles={props.styles} onClick={onClickDialpad} onLongPress={onLongPressDialpad} isMobile={isMobile} />)}\n </Stack>;\n })}\n </FocusZone>\n </div>;\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 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 = {\n ...dialpadLocaleStringsTrampoline(),\n ...props.strings\n };\n return <DialpadContainer strings={strings} {...props} />;\n};\nconst sanitizeInput = (input: string): string => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n return input.replace(/[^\\d*#+]/g, '');\n};\"../../../../acs-ui-common/src\""]}
@@ -45,10 +45,10 @@ export const _DrawerMenu = (props) => {
45
45
  }), [firstItemStyle, borderRadius]);
46
46
  return React.createElement(_DrawerSurface, { disableMaxHeight: props.disableMaxHeight, styles: (_b = props.styles) === null || _b === void 0 ? void 0 : _b.drawerSurfaceStyles, onLightDismiss: props.onLightDismiss, heading: props.heading },
47
47
  React.createElement(Stack, { styles: props.styles, role: "menu", "data-ui-id": "drawer-menu" }, menuItemsToRender === null || menuItemsToRender === void 0 ? void 0 :
48
- menuItemsToRender.slice(0, 1).map(item => React.createElement(DrawerMenuItem, Object.assign({}, item, { key: '0', styles: modifiedFirstItemStyle, onItemClick: (ev, itemKey) => {
48
+ menuItemsToRender.slice(0, 1).map(item => React.createElement(DrawerMenuItem, Object.assign({}, item, { key: `${item.itemKey}` + '0', shouldFocusOnMount: true, styles: modifiedFirstItemStyle, onItemClick: (ev, itemKey) => {
49
49
  onItemClick(item, ev, itemKey);
50
50
  } }))), menuItemsToRender === null || menuItemsToRender === void 0 ? void 0 :
51
- menuItemsToRender.slice(1).map((item, i) => React.createElement(DrawerMenuItem, Object.assign({}, item, { key: `${i + 1}`, onItemClick: (ev, itemKey) => {
51
+ menuItemsToRender.slice(1).map((item, i) => React.createElement(DrawerMenuItem, Object.assign({}, item, { key: `${item.itemKey}` + `${i + 1}`, onItemClick: (ev, itemKey) => {
52
52
  onItemClick(item, ev, itemKey);
53
53
  } })))));
54
54
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerMenu.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/Drawer/DrawerMenu.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAwB,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAwB,MAAM,iBAAiB,CAAC;AAsCvE;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAe,EAAE;;IAClE,gGAAgG;IAChG,iGAAiG;IACjG,+EAA+E;IAC/E,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IAErE,6CAA6C;IAC7C,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,EAAE;;QACrC,IAAI,KAAK,GAAuC,KAAK,CAAC,KAAK,CAAC;QAC5D,KAAK,MAAM,UAAU,IAAI,eAAe,EAAE;YACxC,KAAK,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,UAAU,CAAC,0CAAE,YAAY,CAAC;SACxE;QACD,OAAO,KAAK,CAAC;IACf,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC;IAEnC,oGAAoG;IACpG,kGAAkG;IAClG,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,IAA0B,EAAE,EAA6F,EAAE,OAA4B,EAAQ,EAAE;;QA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I,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;gBACjC,CAAC,IAAI,CAAC,EACH,iBAAiB,aAAjB,iBAAiB;YAAjB,iBAAiB,CAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,oBAAC,cAAc,oBAAK,IAAI,IAAE,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;oBACtH,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;gBACjC,CAAC,IAAI,CAAC,CACE,CACO,CAAC;AACtB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { merge, Stack } from '@fluentui/react';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { _DrawerSurfaceProps } from '.';\nimport { useTheme } from '../../theming/FluentThemeProvider';\nimport { BaseCustomStyles } from '../../types';\nimport { DrawerMenuItem, _DrawerMenuItemProps } from './DrawerMenuItem';\nimport { _DrawerSurface, _DrawerSurfaceStyles } from './DrawerSurface';\n\n/**\n * Styles for the {@link _DrawerMenu}.\n *\n * @internal\n */\nexport interface _DrawerMenuStyles extends BaseCustomStyles {\n /** Styles for the {@link DrawerSurface} container. */\n drawerSurfaceStyles?: _DrawerSurfaceStyles;\n}\n\n/**\n * Props for the {@link _DrawerMenu}\n *\n * @internal\n */\nexport interface _DrawerMenuProps {\n items: _DrawerMenuItemProps[];\n\n /**\n * Callback when the drawer's light-dismissal is triggered.\n */\n onLightDismiss: () => void;\n\n /**\n * String to show in heading of drawer menu\n */\n heading?: string;\n\n /**\n * By default, maxHeight value is set to 75%.\n * Set value to true for no default maxHeight to be applied on drawerSurface\n */\n disableMaxHeight?: boolean;\n styles?: _DrawerMenuStyles;\n}\n\n/**\n * Takes a set of menu items and returns a created menu inside a {@link _DrawerSurface}.\n *\n * @internal\n */\nexport const _DrawerMenu = (props: _DrawerMenuProps): JSX.Element => {\n // This component breaks from a pure component pattern in order to internally support sub menus.\n // When a sub menu item is clicked the menu items displayed is updated to be that of the submenu.\n // To track this state we store a list of the keys clicked up until this point.\n const [selectedKeyPath, setSelectedKeyPath] = useState<string[]>([]);\n\n // Get the menu items that should be rendered\n const menuItemsToRender = useMemo(() => {\n let items: _DrawerMenuItemProps[] | undefined = props.items;\n for (const subMenuKey of selectedKeyPath) {\n items = items?.find(item => item.itemKey === subMenuKey)?.subMenuProps;\n }\n return items;\n }, [props.items, selectedKeyPath]);\n\n // When an item is clicked and it contains a submenu, push the key for the submenu. This will ensure\n // a new render is triggered, menuItemsToRender will be re-calculated and the submenu will render.\n const onItemClick = useCallback((item: _DrawerMenuItemProps, ev?: React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLElement> | undefined, itemKey?: string | undefined): void => {\n if (item.subMenuProps) {\n setSelectedKeyPath([...selectedKeyPath, item.itemKey]);\n }\n item.onItemClick?.(ev, itemKey);\n }, [selectedKeyPath]);\n\n // Ensure the first item has a border radius that matches the DrawerSurface\n const borderRadius = useTheme().effects.roundedCorner4;\n const firstItemStyle = menuItemsToRender && menuItemsToRender[0]?.styles;\n const modifiedFirstItemStyle = useMemo(() => merge(firstItemStyle ?? {}, {\n root: {\n borderTopRightRadius: borderRadius,\n borderTopLeftRadius: borderRadius\n }\n }), [firstItemStyle, borderRadius]);\n return <_DrawerSurface disableMaxHeight={props.disableMaxHeight} styles={props.styles?.drawerSurfaceStyles} onLightDismiss={props.onLightDismiss} heading={props.heading}>\n <Stack styles={props.styles} role=\"menu\" data-ui-id=\"drawer-menu\">\n {menuItemsToRender?.slice(0, 1).map(item => <DrawerMenuItem {...item} key={'0'} styles={modifiedFirstItemStyle} onItemClick={(ev, itemKey) => {\n onItemClick(item, ev, itemKey);\n }} />)}\n {menuItemsToRender?.slice(1).map((item, i) => <DrawerMenuItem {...item} key={`${i + 1}`} onItemClick={(ev, itemKey) => {\n onItemClick(item, ev, itemKey);\n }} />)}\n </Stack>\n </_DrawerSurface>;\n};"]}
1
+ {"version":3,"file":"DrawerMenu.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/Drawer/DrawerMenu.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAwB,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAwB,MAAM,iBAAiB,CAAC;AAsCvE;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAe,EAAE;;IAClE,gGAAgG;IAChG,iGAAiG;IACjG,+EAA+E;IAC/E,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IAErE,6CAA6C;IAC7C,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,EAAE;;QACrC,IAAI,KAAK,GAAuC,KAAK,CAAC,KAAK,CAAC;QAC5D,KAAK,MAAM,UAAU,IAAI,eAAe,EAAE;YACxC,KAAK,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,UAAU,CAAC,0CAAE,YAAY,CAAC;SACxE;QACD,OAAO,KAAK,CAAC;IACf,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC;IAEnC,oGAAoG;IACpG,kGAAkG;IAClG,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,IAA0B,EAAE,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,EAAE,IAAI,EAAE,MAAM,EAAE,sBAAsB,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;oBAC3L,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;gBACjC,CAAC,IAAI,CAAC,EACH,iBAAiB,aAAjB,iBAAiB;YAAjB,iBAAiB,CAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,oBAAC,cAAc,oBAAK,IAAI,IAAE,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;oBAC1I,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;gBACjC,CAAC,IAAI,CAAC,CACE,CACO,CAAC;AACtB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { merge, Stack } from '@fluentui/react';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { _DrawerSurfaceProps } from '.';\nimport { useTheme } from '../../theming/FluentThemeProvider';\nimport { BaseCustomStyles } from '../../types';\nimport { DrawerMenuItem, _DrawerMenuItemProps } from './DrawerMenuItem';\nimport { _DrawerSurface, _DrawerSurfaceStyles } from './DrawerSurface';\n\n/**\n * Styles for the {@link _DrawerMenu}.\n *\n * @internal\n */\nexport interface _DrawerMenuStyles extends BaseCustomStyles {\n /** Styles for the {@link DrawerSurface} container. */\n drawerSurfaceStyles?: _DrawerSurfaceStyles;\n}\n\n/**\n * Props for the {@link _DrawerMenu}\n *\n * @internal\n */\nexport interface _DrawerMenuProps {\n items: _DrawerMenuItemProps[];\n\n /**\n * Callback when the drawer's light-dismissal is triggered.\n */\n onLightDismiss: () => void;\n\n /**\n * String to show in heading of drawer menu\n */\n heading?: string;\n\n /**\n * By default, maxHeight value is set to 75%.\n * Set value to true for no default maxHeight to be applied on drawerSurface\n */\n disableMaxHeight?: boolean;\n styles?: _DrawerMenuStyles;\n}\n\n/**\n * Takes a set of menu items and returns a created menu inside a {@link _DrawerSurface}.\n *\n * @internal\n */\nexport const _DrawerMenu = (props: _DrawerMenuProps): JSX.Element => {\n // This component breaks from a pure component pattern in order to internally support sub menus.\n // When a sub menu item is clicked the menu items displayed is updated to be that of the submenu.\n // To track this state we store a list of the keys clicked up until this point.\n const [selectedKeyPath, setSelectedKeyPath] = useState<string[]>([]);\n\n // Get the menu items that should be rendered\n const menuItemsToRender = useMemo(() => {\n let items: _DrawerMenuItemProps[] | undefined = props.items;\n for (const subMenuKey of selectedKeyPath) {\n items = items?.find(item => item.itemKey === subMenuKey)?.subMenuProps;\n }\n return items;\n }, [props.items, selectedKeyPath]);\n\n // When an item is clicked and it contains a submenu, push the key for the submenu. This will ensure\n // a new render is triggered, menuItemsToRender will be re-calculated and the submenu will render.\n const onItemClick = useCallback((item: _DrawerMenuItemProps, ev?: React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLElement> | undefined, itemKey?: string | undefined): void => {\n if (item.subMenuProps) {\n setSelectedKeyPath([...selectedKeyPath, item.itemKey]);\n }\n item.onItemClick?.(ev, itemKey);\n }, [selectedKeyPath]);\n\n // Ensure the first item has a border radius that matches the DrawerSurface\n const borderRadius = useTheme().effects.roundedCorner4;\n const firstItemStyle = menuItemsToRender && menuItemsToRender[0]?.styles;\n const modifiedFirstItemStyle = useMemo(() => merge(firstItemStyle ?? {}, {\n root: {\n borderTopRightRadius: borderRadius,\n borderTopLeftRadius: borderRadius\n }\n }), [firstItemStyle, borderRadius]);\n return <_DrawerSurface disableMaxHeight={props.disableMaxHeight} styles={props.styles?.drawerSurfaceStyles} onLightDismiss={props.onLightDismiss} heading={props.heading}>\n <Stack styles={props.styles} role=\"menu\" data-ui-id=\"drawer-menu\">\n {menuItemsToRender?.slice(0, 1).map(item => <DrawerMenuItem {...item} key={`${item.itemKey}` + '0'} shouldFocusOnMount={true} styles={modifiedFirstItemStyle} onItemClick={(ev, itemKey) => {\n onItemClick(item, ev, itemKey);\n }} />)}\n {menuItemsToRender?.slice(1).map((item, i) => <DrawerMenuItem {...item} key={`${item.itemKey}` + `${i + 1}`} onItemClick={(ev, itemKey) => {\n onItemClick(item, ev, itemKey);\n }} />)}\n </Stack>\n </_DrawerSurface>;\n};"]}
@@ -33,6 +33,10 @@ export interface _DrawerMenuItemProps {
33
33
  * A unique id set for the standard HTML id attibute
34
34
  */
35
35
  id?: string;
36
+ /**
37
+ * Property to set the focus since this is the first item in the menu
38
+ */
39
+ shouldFocusOnMount?: boolean;
36
40
  }
37
41
  /**
38
42
  * Maps the individual item in menuProps.items passed in the {@link DrawerMenu} into a UI component.