@azure/communication-react 1.17.0-beta.1 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (563) hide show
  1. package/dist/communication-react.d.ts +68 -1751
  2. package/dist/dist-cjs/communication-react/index.js +33299 -159
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/common.d.ts +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  8. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +1 -5
  9. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -11
  10. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +0 -12
  12. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -13
  13. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +0 -4
  15. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +0 -8
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -16
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -15
  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 +5 -5
  22. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +15 -32
  23. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -3
  25. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -17
  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 +0 -2
  28. package/dist/dist-esm/calling-component-bindings/src/index.js +0 -2
  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 +0 -1
  31. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +2 -8
  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 +1 -1
  34. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js +1 -1
  35. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
  36. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +1 -1
  37. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +1 -1
  38. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
  39. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +0 -7
  40. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +0 -12
  41. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  42. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +0 -3
  43. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  44. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +0 -3
  45. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  46. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +1 -15
  47. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -5
  49. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  50. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -58
  51. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  52. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -12
  53. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +1 -69
  54. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  55. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +9 -65
  56. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  57. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -3
  58. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +4 -29
  59. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  60. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.d.ts +0 -17
  61. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js +3 -61
  62. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -1
  63. package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +0 -5
  64. package/dist/dist-esm/calling-stateful-client/src/Converter.js +1 -16
  65. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  66. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
  67. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +0 -11
  68. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  69. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +0 -23
  70. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +2 -20
  71. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  72. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +1 -2
  73. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +1 -1
  74. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
  75. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  76. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -3
  77. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  78. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -3
  79. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +3 -13
  80. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  81. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  82. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -5
  83. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  84. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +6 -32
  85. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  86. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  87. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  88. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -1
  89. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  90. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +1 -4
  91. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
  92. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +0 -1
  93. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  94. package/dist/dist-esm/communication-react/src/index.d.ts +2 -26
  95. package/dist/dist-esm/communication-react/src/index.js +0 -14
  96. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  97. package/dist/dist-esm/react-components/src/components/Announcer.js +1 -1
  98. package/dist/dist-esm/react-components/src/components/Announcer.js.map +1 -1
  99. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +1 -3
  100. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +22 -13
  101. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  102. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js +10 -1
  103. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js.map +1 -1
  104. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -6
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +2 -10
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -11
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +13 -40
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -8
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +8 -20
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +1 -2
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +28 -30
  115. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  116. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +1 -4
  117. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +6 -40
  118. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +2 -15
  120. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -22
  121. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
  122. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +3 -20
  123. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +5 -20
  124. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  125. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -8
  126. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +10 -22
  127. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  128. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +14 -31
  129. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  130. package/dist/dist-esm/react-components/src/components/ControlBarButton.js +1 -1
  131. package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +1 -0
  133. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  134. package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -4
  135. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  137. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -18
  138. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  139. package/dist/dist-esm/react-components/src/components/MessageStatusIcon.js +1 -3
  140. package/dist/dist-esm/react-components/src/components/MessageStatusIcon.js.map +1 -1
  141. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -44
  142. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -30
  143. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  144. package/dist/dist-esm/react-components/src/components/NotificationBar.d.ts +65 -0
  145. package/dist/dist-esm/react-components/src/components/NotificationBar.js +40 -0
  146. package/dist/dist-esm/react-components/src/components/NotificationBar.js.map +1 -0
  147. package/dist/dist-esm/react-components/src/components/Notifications.d.ts +215 -0
  148. package/dist/dist-esm/react-components/src/components/Notifications.js +46 -0
  149. package/dist/dist-esm/react-components/src/components/Notifications.js.map +1 -0
  150. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +0 -13
  151. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +4 -7
  152. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
  154. package/dist/dist-esm/react-components/src/components/ParticipantList.js +12 -21
  155. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  156. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -0
  157. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -3
  158. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  159. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
  160. package/dist/dist-esm/react-components/src/components/SendBox.js +8 -90
  161. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  162. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -2
  163. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  164. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -2
  165. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  166. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -24
  167. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  168. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -2
  169. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  170. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +5 -7
  171. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +1 -1
  172. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
  173. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +5 -3
  174. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +4 -10
  175. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
  176. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +3 -15
  177. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  178. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +2 -0
  179. package/dist/dist-esm/react-components/src/components/VideoGallery.js +4 -5
  180. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  181. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +4 -7
  182. package/dist/dist-esm/react-components/src/components/VideoTile.js +4 -8
  183. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  184. package/dist/dist-esm/react-components/src/components/index.d.ts +1 -21
  185. package/dist/dist-esm/react-components/src/components/index.js +0 -18
  186. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  187. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  188. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  189. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.js +5 -3
  190. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.js.map +1 -1
  191. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +4 -4
  192. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +21 -9
  193. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  194. package/dist/dist-esm/react-components/src/components/styles/NotificationBar.styles.d.ts +22 -0
  195. package/dist/dist-esm/react-components/src/components/styles/NotificationBar.styles.js +56 -0
  196. package/dist/dist-esm/react-components/src/components/styles/NotificationBar.styles.js.map +1 -0
  197. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +0 -1
  198. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -3
  199. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
  200. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -37
  201. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -34
  202. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  203. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +3 -5
  204. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +10 -21
  205. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  206. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -11
  207. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +2 -18
  208. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  209. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -4
  210. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  211. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  212. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  213. package/dist/dist-esm/react-components/src/components/utils.d.ts +13 -0
  214. package/dist/dist-esm/react-components/src/components/utils.js +31 -0
  215. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  216. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  217. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -5
  218. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  219. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  220. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  221. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -57
  222. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  223. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/ComponentLocale.js.map +1 -1
  224. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/ComponentLocale.js.map +1 -1
  225. package/dist/dist-esm/react-components/src/localization/locales/de-DE/ComponentLocale.js.map +1 -1
  226. package/dist/dist-esm/react-components/src/localization/locales/en-GB/ComponentLocale.js.map +1 -1
  227. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +157 -1
  228. package/dist/dist-esm/react-components/src/localization/locales/es-ES/ComponentLocale.js.map +1 -1
  229. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/ComponentLocale.js.map +1 -1
  230. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/ComponentLocale.js.map +1 -1
  231. package/dist/dist-esm/react-components/src/localization/locales/he-IL/ComponentLocale.js.map +1 -1
  232. package/dist/dist-esm/react-components/src/localization/locales/it-IT/ComponentLocale.js.map +1 -1
  233. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/ComponentLocale.js.map +1 -1
  234. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/ComponentLocale.js.map +1 -1
  235. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/ComponentLocale.js.map +1 -1
  236. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/ComponentLocale.js.map +1 -1
  237. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/ComponentLocale.js.map +1 -1
  238. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/ComponentLocale.js.map +1 -1
  239. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/ComponentLocale.js.map +1 -1
  240. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/ComponentLocale.js.map +1 -1
  241. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/ComponentLocale.js.map +1 -1
  242. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/ComponentLocale.js.map +1 -1
  243. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/ComponentLocale.js.map +1 -1
  244. package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -28
  245. package/dist/dist-esm/react-components/src/theming/icons.js +7 -141
  246. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  247. package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
  248. package/dist/dist-esm/react-components/src/theming/themes.js +0 -10
  249. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  250. package/dist/dist-esm/react-components/src/theming/v9ThemeShim.js +1 -1
  251. package/dist/dist-esm/react-components/src/theming/v9ThemeShim.js.map +1 -1
  252. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -9
  253. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  254. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -21
  255. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  256. package/dist/dist-esm/react-components/src/types/OnRender.d.ts +1 -9
  257. package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
  258. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +0 -6
  259. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js +0 -2
  260. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -72
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +13 -32
  263. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  264. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -108
  265. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  266. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +11 -47
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +14 -142
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +6 -56
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -1
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +10 -28
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +0 -1
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -38
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -27
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -20
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  284. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  285. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -27
  286. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  287. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js +1 -1
  288. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js.map +1 -1
  289. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  290. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +5 -19
  291. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  292. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +4 -1
  293. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
  294. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +7 -4
  295. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
  296. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +2 -6
  297. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  298. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.d.ts +1 -1
  299. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +7 -31
  300. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.d.ts +1 -1
  302. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.js.map +1 -1
  303. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +0 -2
  304. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  305. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  306. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +7 -80
  307. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  308. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/SurveyPage.js +0 -8
  309. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/SurveyPage.js.map +1 -1
  310. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ThankYouForFeedbackPage.d.ts +1 -1
  311. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ThankYouForFeedbackPage.js +1 -8
  312. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ThankYouForFeedbackPage.js.map +1 -1
  313. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -8
  314. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -11
  315. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  316. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
  317. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js +0 -4
  318. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js.map +1 -1
  319. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +2 -14
  320. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +16 -95
  321. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  322. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +1 -61
  323. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +4 -31
  324. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  325. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -32
  326. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  327. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +5 -15
  328. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +5 -50
  329. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  330. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -38
  331. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  332. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -9
  333. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -33
  334. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  335. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -5
  336. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -2
  337. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  338. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -13
  339. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +0 -4
  340. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  341. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -20
  342. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -6
  343. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  344. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
  345. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +7 -130
  346. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  347. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -4
  348. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  349. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -3
  350. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -27
  351. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  352. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -3
  353. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  354. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
  355. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  356. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
  357. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  358. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -5
  359. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +0 -15
  360. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  361. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +0 -5
  362. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +2 -3
  363. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
  364. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +0 -1
  365. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +7 -12
  366. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  367. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +0 -26
  368. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  369. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +1 -25
  370. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  371. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +0 -1
  372. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  373. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -3
  374. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  375. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +8 -15
  376. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  377. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +1 -4
  378. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  379. package/dist/dist-esm/react-composites/src/composites/common/StarSurvey.js +0 -7
  380. package/dist/dist-esm/react-composites/src/composites/common/StarSurvey.js.map +1 -1
  381. package/dist/dist-esm/react-composites/src/composites/common/Survey.js +0 -19
  382. package/dist/dist-esm/react-composites/src/composites/common/Survey.js.map +1 -1
  383. package/dist/dist-esm/react-composites/src/composites/common/SurveyContent.js +0 -9
  384. package/dist/dist-esm/react-composites/src/composites/common/SurveyContent.js.map +1 -1
  385. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js +0 -6
  386. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js.map +1 -1
  387. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +4 -1
  388. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +3 -3
  389. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  390. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +2 -39
  391. package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -12
  392. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  393. package/dist/dist-esm/react-composites/src/composites/common/styles/Survey.styles.js +0 -4
  394. package/dist/dist-esm/react-composites/src/composites/common/styles/Survey.styles.js.map +1 -1
  395. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +4 -20
  396. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  397. package/package.json +8 -8
  398. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-BShb4Fem.js +0 -136
  399. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-BShb4Fem.js.map +0 -1
  400. package/dist/dist-cjs/communication-react/index-9S-U1inF.js +0 -39673
  401. package/dist/dist-cjs/communication-react/index-9S-U1inF.js.map +0 -1
  402. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
  403. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -36
  404. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
  405. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  406. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  407. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  408. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -17
  409. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -125
  410. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
  411. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  412. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -43
  413. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  414. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  415. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -75
  416. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  417. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  418. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -68
  419. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  420. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  421. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -39
  422. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  423. package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +0 -49
  424. package/dist/dist-esm/react-components/src/components/HoldButton.js +0 -25
  425. package/dist/dist-esm/react-components/src/components/HoldButton.js.map +0 -1
  426. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  427. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -123
  428. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  429. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
  430. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
  431. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
  432. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -23
  433. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -73
  434. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
  435. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -12
  436. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -23
  437. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
  438. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
  439. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -39
  440. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
  441. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
  442. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
  443. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
  444. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
  445. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -46
  446. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
  447. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -29
  448. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -73
  449. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
  450. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -54
  451. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -204
  452. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
  453. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -33
  454. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -82
  455. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
  456. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -149
  457. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -182
  458. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
  459. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
  460. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -73
  461. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
  462. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
  463. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -191
  464. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
  465. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
  466. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
  467. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
  468. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
  469. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -61
  470. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
  471. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
  472. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
  473. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
  474. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -34
  475. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -42
  476. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
  477. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  478. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  479. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  480. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  481. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  482. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  483. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  484. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -816
  485. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  486. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  487. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  488. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  489. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  490. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  491. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  492. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
  493. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -311
  494. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
  495. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
  496. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
  497. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
  498. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  499. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -92
  500. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  501. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  502. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  503. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  504. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  505. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -67
  506. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  507. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -37
  508. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -60
  509. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
  510. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
  511. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -116
  512. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
  513. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  514. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  515. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  516. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  517. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  518. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  519. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -48
  520. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -218
  521. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  522. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +0 -12
  523. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +0 -93
  524. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +0 -1
  525. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +0 -8
  526. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +0 -26
  527. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +0 -1
  528. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +0 -24
  529. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +0 -28
  530. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +0 -1
  531. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  532. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -54
  533. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  534. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +0 -32
  535. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +0 -81
  536. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +0 -1
  537. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
  538. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
  539. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
  540. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  541. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  542. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  543. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
  544. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -38
  545. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
  546. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
  547. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -69
  548. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
  549. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
  550. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
  551. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
  552. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +0 -25
  553. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +0 -113
  554. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +0 -1
  555. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +0 -17
  556. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +0 -32
  557. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +0 -1
  558. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +0 -22
  559. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +0 -74
  560. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +0 -1
  561. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +0 -15
  562. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +0 -61
  563. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +0 -1
@@ -1,123 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React, { useEffect, useRef, useState, useCallback } from 'react';
4
- import { Persona, PersonaSize, Stack, mergeStyles, useTheme } from '@fluentui/react';
5
- import { mergeClasses } from '@fluentui/react-components';
6
- import { mentionPopoverContainerStyle, headerStyleThemed, suggestionItemStackStyle, suggestionItemWrapperStyle, useSuggestionListStyle } from './styles/MentionPopover.style';
7
- /* @conditional-compile-remove(mention) */
8
- import { useIdentifiers } from '../identifiers';
9
- import { useLocale } from '../localization';
10
- import { useDefaultStackStyles } from './styles/Stack.style';
11
- /**
12
- * Component to render a pop-up of mention suggestions.
13
- *
14
- * @internal
15
- */
16
- export const _MentionPopover = (props) => {
17
- const { suggestions, activeSuggestionIndex, title, target, targetPositionOffset, onRenderSuggestionItem, onSuggestionSelected, onDismiss, location } = props;
18
- const theme = useTheme();
19
- /* @conditional-compile-remove(mention) */
20
- const ids = useIdentifiers();
21
- const localeStrings = useLocale().strings;
22
- const popoverRef = useRef();
23
- const suggestionsListRef = useRef(null);
24
- const [position, setPosition] = useState();
25
- const [hoveredSuggestion, setHoveredSuggestion] = useState(undefined);
26
- const suggestionListStyle = useSuggestionListStyle();
27
- const defaultStackStyles = useDefaultStackStyles();
28
- const dismissPopoverWhenClickingOutside = useCallback((e) => {
29
- const target = e.target;
30
- if (popoverRef.current && !popoverRef.current.contains(target)) {
31
- onDismiss && onDismiss();
32
- }
33
- }, [onDismiss]);
34
- useEffect(() => {
35
- if (suggestionsListRef.current && activeSuggestionIndex !== undefined && activeSuggestionIndex >= 0) {
36
- const selectedItem = suggestionsListRef.current.children[activeSuggestionIndex];
37
- if (selectedItem) {
38
- selectedItem.scrollIntoView({
39
- behavior: 'smooth',
40
- block: 'nearest'
41
- });
42
- }
43
- }
44
- }, [activeSuggestionIndex]);
45
- useEffect(() => {
46
- window && window.addEventListener('click', dismissPopoverWhenClickingOutside);
47
- return () => {
48
- window && window.removeEventListener('click', dismissPopoverWhenClickingOutside);
49
- };
50
- }, [dismissPopoverWhenClickingOutside]);
51
- // Determine popover position
52
- useEffect(() => {
53
- var _a, _b, _c, _d, _e, _f, _g, _h;
54
- const rect = (_a = target === null || target === void 0 ? void 0 : target.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
55
- const maxWidth = 200;
56
- const finalPosition = {
57
- maxWidth
58
- };
59
- // Figure out whether it will fit horizontally
60
- const leftOffset = (_b = targetPositionOffset === null || targetPositionOffset === void 0 ? void 0 : targetPositionOffset.left) !== null && _b !== void 0 ? _b : 0;
61
- if (leftOffset + maxWidth > ((_c = rect === null || rect === void 0 ? void 0 : rect.width) !== null && _c !== void 0 ? _c : 0)) {
62
- finalPosition.right = ((_d = rect === null || rect === void 0 ? void 0 : rect.width) !== null && _d !== void 0 ? _d : 0) - leftOffset;
63
- }
64
- else {
65
- finalPosition.left = leftOffset;
66
- }
67
- // Offset between cursor and mention popover
68
- const verticalOffset = 4;
69
- if (location === 'below') {
70
- finalPosition.top = ((_e = rect === null || rect === void 0 ? void 0 : rect.height) !== null && _e !== void 0 ? _e : 0) + ((_f = targetPositionOffset === null || targetPositionOffset === void 0 ? void 0 : targetPositionOffset.top) !== null && _f !== void 0 ? _f : 0) + verticalOffset;
71
- }
72
- else {
73
- // (location === 'above')
74
- finalPosition.bottom = ((_g = rect === null || rect === void 0 ? void 0 : rect.height) !== null && _g !== void 0 ? _g : 0) - ((_h = targetPositionOffset === null || targetPositionOffset === void 0 ? void 0 : targetPositionOffset.top) !== null && _h !== void 0 ? _h : 0) + verticalOffset;
75
- }
76
- setPosition(finalPosition);
77
- }, [location, target, targetPositionOffset]);
78
- const handleOnKeyDown = useCallback((e) => {
79
- switch (e.key) {
80
- case 'Escape':
81
- onDismiss && onDismiss();
82
- break;
83
- default:
84
- break;
85
- }
86
- }, [onDismiss]);
87
- const personaRenderer = useCallback((displayName) => {
88
- const avatarOptions = {
89
- text: displayName.trim(),
90
- size: PersonaSize.size24,
91
- initialsColor: theme.palette.neutralLight,
92
- initialsTextColor: theme.palette.neutralSecondary,
93
- showOverflowTooltip: false,
94
- showUnknownPersonaCoin: false
95
- };
96
- return React.createElement(Persona, Object.assign({}, avatarOptions));
97
- }, [theme]);
98
- const defaultOnRenderSuggestionItem = useCallback((suggestion, onSuggestionSelected, active) => {
99
- return React.createElement("div", { "data-is-focusable": true, "data-ui-id": ids.mentionSuggestionItem, key: suggestion.id, onClick: () => onSuggestionSelected(suggestion), onMouseEnter: () => setHoveredSuggestion(suggestion), onMouseLeave: () => setHoveredSuggestion(undefined), onKeyDown: e => {
100
- handleOnKeyDown(e);
101
- }, className: suggestionItemWrapperStyle(theme) },
102
- React.createElement(Stack, { horizontal: true, className: suggestionItemStackStyle(theme, (hoveredSuggestion === null || hoveredSuggestion === void 0 ? void 0 : hoveredSuggestion.id) === suggestion.id, active) }, personaRenderer(suggestion.displayText)));
103
- }, [handleOnKeyDown, theme, /* @conditional-compile-remove(mention) */
104
- ids, hoveredSuggestion, personaRenderer]);
105
- const getHeaderTitle = useCallback(() => {
106
- if (title) {
107
- return title;
108
- }
109
- /* @conditional-compile-remove(mention) */
110
- return localeStrings.mentionPopover.mentionPopoverHeader;
111
- return '';
112
- }, [localeStrings, title]);
113
- return React.createElement("div", { ref: popoverRef }, position && React.createElement(Stack, { "data-testid": 'mention-suggestion-list-container', className: mergeStyles({
114
- maxHeight: 212,
115
- maxWidth: position.maxWidth
116
- }, mentionPopoverContainerStyle(theme), Object.assign(Object.assign({}, position), { position: 'absolute' })) },
117
- React.createElement(Stack.Item, { styles: headerStyleThemed(theme), "aria-label": title }, getHeaderTitle()),
118
- React.createElement("div", { className: mergeClasses(defaultStackStyles.root, suggestionListStyle.root), "data-ui-id": ids.mentionSuggestionList, ref: suggestionsListRef }, suggestions.map((suggestion, index) => {
119
- const active = index === activeSuggestionIndex;
120
- return onRenderSuggestionItem ? onRenderSuggestionItem(suggestion, onSuggestionSelected, active) : defaultOnRenderSuggestionItem(suggestion, onSuggestionSelected, active);
121
- }))));
122
- };
123
- //# sourceMappingURL=MentionPopover.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MentionPopover.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/MentionPopover.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AAC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,MAAM,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,UAAU,EAAE,oBAAoB,EAAE,MAAM,CAAC,CAAC;QAC7K,CAAC,CAAC,CACM,CACA,CACN,CAAC;AACX,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef, useState, useCallback } from 'react';\nimport { Persona, PersonaSize, Stack, mergeStyles, useTheme } from '@fluentui/react';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { mentionPopoverContainerStyle, headerStyleThemed, suggestionItemStackStyle, suggestionItemWrapperStyle, useSuggestionListStyle } from './styles/MentionPopover.style';\n/* @conditional-compile-remove(mention) */\nimport { useIdentifiers } from '../identifiers';\nimport { useLocale } from '../localization';\nimport { useDefaultStackStyles } from './styles/Stack.style';\n\n/**\n * Props for {@link _MentionPopover}.\n *\n * @internal\n */\nexport interface _MentionPopoverProps {\n /**\n * Array of mention suggestions used to populate the suggestion list\n */\n suggestions: Mention[];\n /**\n * Index of the currently focused suggestion, if any\n */\n activeSuggestionIndex?: number;\n /**\n * Optional string used as mention popover's title.\n * @defaultValue `Suggestions`\n */\n title?: string;\n /**\n * Element to anchor the popover to.\n */\n target: React.RefObject<Element>;\n /**\n * When rendering the popover, where to position it relative to the target.\n */\n targetPositionOffset?: {\n top: number;\n left: number;\n };\n /**\n * Where to display the suggestions relative to the target.\n * @defaultValue `above`\n */\n location?: 'above' | 'below';\n /**\n * Callback called when a mention suggestion is selected.\n */\n onSuggestionSelected: (suggestion: Mention) => void;\n /**\n * Callback to invoke when the popover is dismissed\n */\n onDismiss?: () => void;\n /**\n * Optional callback to render an item of the mention suggestions list.\n */\n onRenderSuggestionItem?: (suggestion: Mention, onSuggestionSelected: (suggestion: Mention) => void, isActive: boolean) => JSX.Element;\n}\n\n/**\n * Options to lookup suggestions in the mention scenario.\n *\n * @beta\n */\nexport interface MentionLookupOptions {\n /**\n * Optional string to set trigger keyword for mention a specific participant.\n *\n * @defaultValue `@`\n */\n trigger?: string;\n /**\n * Optional callback to fetch a list of mention suggestions base on the query.\n */\n onQueryUpdated: (query: string) => Promise<Mention[]>;\n /**\n * Optional callback to render an item of the mention suggestions list.\n */\n onRenderSuggestionItem?: (suggestion: Mention, onSuggestionSelected: (suggestion: Mention) => void, isActive: boolean) => JSX.Element;\n}\n\n/**\n * Options to display suggestions in the mention scenario.\n *\n * @beta\n */\nexport interface MentionDisplayOptions {\n /**\n * Optional callback for customizing the mention renderer in a message thread.\n */\n onRenderMention?: (mention: Mention, defaultOnRender: (mention: Mention) => JSX.Element) => JSX.Element;\n}\n\n/**\n * Options to lookup suggestions and display mentions in the mention scenario.\n *\n * @beta\n */\nexport type MentionOptions = {\n lookupOptions?: MentionLookupOptions;\n displayOptions?: MentionDisplayOptions;\n};\n\n/**\n * Mention's state, as reflected in the UI.\n *\n * @beta\n */\nexport interface Mention {\n /** ID of a mention */\n id: string;\n /** Display text of a mention */\n displayText: string;\n /** Optional React element to render an item icon of a mention suggestion */\n icon?: JSX.Element;\n}\n\n/**\n * Strings of {@link _MentionPopover} that can be overridden.\n *\n * @beta\n */\nexport interface MentionPopoverStrings {\n /**\n * Header text for MentionPopover\n */\n mentionPopoverHeader: string;\n}\n\n/**\n * Component to render a pop-up of mention suggestions.\n *\n * @internal\n */\nexport const _MentionPopover = (props: _MentionPopoverProps): JSX.Element => {\n interface Position {\n left?: number;\n right?: number;\n top?: number;\n bottom?: number;\n maxWidth?: number;\n }\n const {\n suggestions,\n activeSuggestionIndex,\n title,\n target,\n targetPositionOffset,\n onRenderSuggestionItem,\n onSuggestionSelected,\n onDismiss,\n location\n } = props;\n const theme = useTheme();\n /* @conditional-compile-remove(mention) */\n const ids = useIdentifiers();\n const localeStrings = useLocale().strings;\n const popoverRef = (useRef() as React.MutableRefObject<HTMLDivElement>);\n const suggestionsListRef = useRef<HTMLDivElement>(null);\n const [position, setPosition] = useState<Position | undefined>();\n const [hoveredSuggestion, setHoveredSuggestion] = useState<Mention | undefined>(undefined);\n const suggestionListStyle = useSuggestionListStyle();\n const defaultStackStyles = useDefaultStackStyles();\n const dismissPopoverWhenClickingOutside = useCallback((e: MouseEvent) => {\n const target = (e.target as HTMLElement);\n if (popoverRef.current && !popoverRef.current.contains(target)) {\n onDismiss && onDismiss();\n }\n }, [onDismiss]);\n useEffect(() => {\n if (suggestionsListRef.current && activeSuggestionIndex !== undefined && activeSuggestionIndex >= 0) {\n const selectedItem = suggestionsListRef.current.children[activeSuggestionIndex];\n if (selectedItem) {\n selectedItem.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest'\n });\n }\n }\n }, [activeSuggestionIndex]);\n useEffect(() => {\n window && window.addEventListener('click', dismissPopoverWhenClickingOutside);\n return () => {\n window && window.removeEventListener('click', dismissPopoverWhenClickingOutside);\n };\n }, [dismissPopoverWhenClickingOutside]);\n\n // Determine popover position\n useEffect(() => {\n const rect = target?.current?.getBoundingClientRect();\n const maxWidth = 200;\n const finalPosition: Position = {\n maxWidth\n };\n\n // Figure out whether it will fit horizontally\n const leftOffset = targetPositionOffset?.left ?? 0;\n if (leftOffset + maxWidth > (rect?.width ?? 0)) {\n finalPosition.right = (rect?.width ?? 0) - leftOffset;\n } else {\n finalPosition.left = leftOffset;\n }\n // Offset between cursor and mention popover\n const verticalOffset = 4;\n if (location === 'below') {\n finalPosition.top = (rect?.height ?? 0) + (targetPositionOffset?.top ?? 0) + verticalOffset;\n } else {\n // (location === 'above')\n finalPosition.bottom = (rect?.height ?? 0) - (targetPositionOffset?.top ?? 0) + verticalOffset;\n }\n setPosition(finalPosition);\n }, [location, target, targetPositionOffset]);\n const handleOnKeyDown = useCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n switch (e.key) {\n case 'Escape':\n onDismiss && onDismiss();\n break;\n default:\n break;\n }\n }, [onDismiss]);\n const personaRenderer = useCallback((displayName: string): JSX.Element => {\n const avatarOptions = {\n text: displayName.trim(),\n size: PersonaSize.size24,\n initialsColor: theme.palette.neutralLight,\n initialsTextColor: theme.palette.neutralSecondary,\n showOverflowTooltip: false,\n showUnknownPersonaCoin: false\n };\n return <Persona {...avatarOptions} />;\n }, [theme]);\n const defaultOnRenderSuggestionItem = useCallback((suggestion: Mention, onSuggestionSelected: (suggestion: Mention) => void, active: boolean): JSX.Element => {\n return <div data-is-focusable={true}\n /* @conditional-compile-remove(mention) */ data-ui-id={ids.mentionSuggestionItem} key={suggestion.id} onClick={() => onSuggestionSelected(suggestion)} onMouseEnter={() => setHoveredSuggestion(suggestion)} onMouseLeave={() => setHoveredSuggestion(undefined)} onKeyDown={e => {\n handleOnKeyDown(e);\n }} className={suggestionItemWrapperStyle(theme)}>\n <Stack horizontal className={suggestionItemStackStyle(theme, hoveredSuggestion?.id === suggestion.id, active)}>\n {personaRenderer(suggestion.displayText)}\n </Stack>\n </div>;\n }, [handleOnKeyDown, theme, /* @conditional-compile-remove(mention) */\n ids, hoveredSuggestion, personaRenderer]);\n const getHeaderTitle = useCallback((): string => {\n if (title) {\n return title;\n }\n /* @conditional-compile-remove(mention) */\n return localeStrings.mentionPopover.mentionPopoverHeader;\n return '';\n }, [localeStrings, title]);\n return <div ref={popoverRef}>\n {position && <Stack data-testid={'mention-suggestion-list-container'} className={mergeStyles({\n maxHeight: 212,\n maxWidth: position.maxWidth\n }, mentionPopoverContainerStyle(theme), {\n ...position,\n position: 'absolute'\n })}>\n <Stack.Item styles={headerStyleThemed(theme)} aria-label={title}>\n {getHeaderTitle()}\n </Stack.Item>\n {/* FluentUI v9 approach is used here instead of Stack because Stack doesn't have ref prop */}\n <div className={mergeClasses(defaultStackStyles.root, suggestionListStyle.root)}\n /* @conditional-compile-remove(mention) */ data-ui-id={ids.mentionSuggestionList} ref={suggestionsListRef}>\n {suggestions.map((suggestion, index) => {\n const active = index === activeSuggestionIndex;\n return onRenderSuggestionItem ? onRenderSuggestionItem(suggestion, onSuggestionSelected, active) : defaultOnRenderSuggestionItem(suggestion, onSuggestionSelected, active);\n })}\n </div>\n </Stack>}\n </div>;\n};"]}
@@ -1,9 +0,0 @@
1
- import { ContextMenuPluginBase } from 'roosterjs-content-model-plugins';
2
- import type { IContextualMenuItem } from '@fluentui/react/';
3
- /**
4
- * Represents a plugin that adds a context menu to the rich text editor.
5
- */
6
- export declare class ContextMenuPlugin extends ContextMenuPluginBase<IContextualMenuItem> {
7
- constructor(onRender: (container: HTMLElement, items: IContextualMenuItem[], onDismiss: () => void) => void, onDismiss: () => void);
8
- }
9
- //# sourceMappingURL=ContextMenuPlugin.d.ts.map
@@ -1,29 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { ContextMenuPluginBase } from 'roosterjs-content-model-plugins';
4
- /**
5
- * Represents a plugin that adds a context menu to the rich text editor.
6
- */
7
- export class ContextMenuPlugin extends ContextMenuPluginBase {
8
- constructor(onRender, onDismiss) {
9
- super({
10
- /**
11
- * Renders the context menu in the specified container with the provided items.
12
- * @param container - The container element where the context menu should be rendered.
13
- * @param items - The items to be displayed in the context menu.
14
- * @param onDismiss - Callback function to be called when the context menu is dismissed. It will call `dismiss` method.
15
- */
16
- render: (container, items, onDismissCallback) => {
17
- const filteredItems = items.filter((item) => item !== null);
18
- onRender(container, filteredItems, onDismissCallback);
19
- },
20
- /**
21
- * Dismisses the context menu.
22
- */
23
- dismiss: () => {
24
- onDismiss();
25
- }
26
- });
27
- }
28
- }
29
- //# sourceMappingURL=ContextMenuPlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContextMenuPlugin.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAGxE;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,qBAA0C;IAC/E,YAAY,QAA+F,EAAE,SAAqB;QAChI,KAAK,CAAC;YACJ;;;;;eAKG;YACH,MAAM,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE;gBAC9C,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAA+B,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;gBACzF,QAAQ,CAAC,SAAS,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;YACxD,CAAC;YACD;;eAEG;YACH,OAAO,EAAE,GAAG,EAAE;gBACZ,SAAS,EAAE,CAAC;YACd,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ContextMenuPluginBase } from 'roosterjs-content-model-plugins';\nimport type { IContextualMenuItem } from '@fluentui/react/';\n\n/**\n * Represents a plugin that adds a context menu to the rich text editor.\n */\nexport class ContextMenuPlugin extends ContextMenuPluginBase<IContextualMenuItem> {\n constructor(onRender: (container: HTMLElement, items: IContextualMenuItem[], onDismiss: () => void) => void, onDismiss: () => void) {\n super({\n /**\n * Renders the context menu in the specified container with the provided items.\n * @param container - The container element where the context menu should be rendered.\n * @param items - The items to be displayed in the context menu.\n * @param onDismiss - Callback function to be called when the context menu is dismissed. It will call `dismiss` method.\n */\n render: (container, items, onDismissCallback) => {\n const filteredItems = items.filter((item): item is IContextualMenuItem => item !== null);\n onRender(container, filteredItems, onDismissCallback);\n },\n /**\n * Dismisses the context menu.\n */\n dismiss: () => {\n onDismiss();\n }\n });\n }\n}"]}
@@ -1,23 +0,0 @@
1
- import type { PluginEvent, EditorPlugin, IEditor } from 'roosterjs-content-model-types';
2
- /**
3
- * CopyPastePlugin is a plugin for handling copy and paste events in the editor.
4
- */
5
- export default class CopyPastePlugin implements EditorPlugin {
6
- private editor;
7
- getName(): string;
8
- initialize(editor: IEditor): void;
9
- dispose(): void;
10
- onPluginEvent(event: PluginEvent): void;
11
- }
12
- /**
13
- * @internal
14
- * Exported only for unit testing
15
- */
16
- export declare const removeImageElement: (event: PluginEvent) => void;
17
- /**
18
- * Scrolls the editor's scroll container to the bottom after content is pasted.
19
- * @param event - The plugin event.
20
- * @param editor - The editor instance.
21
- */
22
- export declare const scrollToBottomAfterContentPaste: (event: PluginEvent, editor: IEditor) => void;
23
- //# sourceMappingURL=CopyPastePlugin.d.ts.map
@@ -1,73 +0,0 @@
1
- import { ContentChangedEventSource, PluginEventType } from '../../utils/RichTextEditorUtils';
2
- /**
3
- * CopyPastePlugin is a plugin for handling copy and paste events in the editor.
4
- */
5
- export default class CopyPastePlugin {
6
- constructor() {
7
- this.editor = null;
8
- }
9
- getName() {
10
- return 'CopyPastePlugin';
11
- }
12
- initialize(editor) {
13
- this.editor = editor;
14
- }
15
- dispose() { }
16
- onPluginEvent(event) {
17
- removeImageElement(event);
18
- if (this.editor !== null && !this.editor.isDisposed()) {
19
- // scroll the editor to the correct position after pasting content
20
- scrollToBottomAfterContentPaste(event, this.editor);
21
- }
22
- }
23
- }
24
- /**
25
- * @internal
26
- * Exported only for unit testing
27
- */
28
- export const removeImageElement = (event) => {
29
- // We don't support the pasting options such as paste as image yet.
30
- if (event.eventType === PluginEventType.BeforePaste && event.pasteType === 'normal') {
31
- event.fragment.querySelectorAll('img').forEach(image => {
32
- // If the image is the only child of its parent, remove all the parents of this img element.
33
- let parentNode = image.parentElement;
34
- let currentNode = image;
35
- while ((parentNode === null || parentNode === void 0 ? void 0 : parentNode.childNodes.length) === 1) {
36
- currentNode = parentNode;
37
- parentNode = parentNode.parentElement;
38
- }
39
- currentNode === null || currentNode === void 0 ? void 0 : currentNode.remove();
40
- });
41
- }
42
- };
43
- /**
44
- * Scrolls the editor's scroll container to the bottom after content is pasted.
45
- * @param event - The plugin event.
46
- * @param editor - The editor instance.
47
- */
48
- export const scrollToBottomAfterContentPaste = (event, editor) => {
49
- if (event.eventType === PluginEventType.ContentChanged && event.source === ContentChangedEventSource.Paste) {
50
- const scrollContainer = editor.getScrollContainer();
51
- // get current selection for the editor
52
- const selection = document.getSelection();
53
- // if selection exists
54
- if (selection && selection.rangeCount > 0) {
55
- // the range for the selection
56
- const range = selection.getRangeAt(0);
57
- // the selection position relative to the viewport
58
- const cursorRect = range.getBoundingClientRect();
59
- // the scrollContainer position relative to the viewport
60
- const scrollContainerRect = scrollContainer.getBoundingClientRect();
61
- // 1. scrollContainer.scrollTop represents the number of pixels that the content of scrollContainer is scrolled upward.
62
- // 2. subtract the top position of the scrollContainer element (scrollContainerRect.top) to
63
- // translate the scroll position from being relative to the document to being relative to the viewport.
64
- // 3. add the top position of the cursor (containerRect.top) to moves the scroll position to the cursor's position.
65
- const updatedScrollTop = scrollContainer.scrollTop - scrollContainerRect.top + cursorRect.top;
66
- scrollContainer.scrollTo({
67
- top: updatedScrollTop,
68
- behavior: 'smooth'
69
- });
70
- }
71
- }
72
- };
73
- //# sourceMappingURL=CopyPastePlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CopyPastePlugin.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAE7F;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,eAAe;IAApC;QACU,WAAM,GAAmB,IAAI,CAAC;IAexC,CAAC;IAdC,OAAO;QACL,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,UAAU,CAAC,MAAe;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IACD,OAAO,KAAU,CAAC;IAClB,aAAa,CAAC,KAAkB;QAC9B,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;YACtD,kEAAkE;YAClE,+BAA+B,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC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kDAAkD;YAClD,MAAM,UAAU,GAAG,KAAK,CAAC,qBAAqB,EAAE,CAAC;YACjD,wDAAwD;YACxD,MAAM,mBAAmB,GAAG,eAAe,CAAC,qBAAqB,EAAE,CAAC;YACpE,uHAAuH;YACvH,2FAA2F;YAC3F,uGAAuG;YACvG,mHAAmH;YACnH,MAAM,gBAAgB,GAAG,eAAe,CAAC,SAAS,GAAG,mBAAmB,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC;YAC9F,eAAe,CAAC,QAAQ,CAAC;gBACvB,GAAG,EAAE,gBAAgB;gBACrB,QAAQ,EAAE,QAAQ;aACnB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { PluginEvent, EditorPlugin, IEditor } from 'roosterjs-content-model-types';\nimport { ContentChangedEventSource, PluginEventType } from '../../utils/RichTextEditorUtils';\n\n/**\n * CopyPastePlugin is a plugin for handling copy and paste events in the editor.\n */\nexport default class CopyPastePlugin implements EditorPlugin {\n private editor: IEditor | null = null;\n getName(): string {\n return 'CopyPastePlugin';\n }\n initialize(editor: IEditor): void {\n this.editor = editor;\n }\n dispose(): void {}\n onPluginEvent(event: PluginEvent): void {\n removeImageElement(event);\n if (this.editor !== null && !this.editor.isDisposed()) {\n // scroll the editor to the correct position after pasting content\n scrollToBottomAfterContentPaste(event, this.editor);\n }\n }\n}\n\n/**\n * @internal\n * Exported only for unit testing\n */\nexport const removeImageElement = (event: PluginEvent): void => {\n // We don't support the pasting options such as paste as image yet.\n if (event.eventType === PluginEventType.BeforePaste && event.pasteType === 'normal') {\n event.fragment.querySelectorAll('img').forEach(image => {\n // If the image is the only child of its parent, remove all the parents of this img element.\n let parentNode: HTMLElement | null = image.parentElement;\n let currentNode: HTMLElement = image;\n while (parentNode?.childNodes.length === 1) {\n currentNode = parentNode;\n parentNode = parentNode.parentElement;\n }\n currentNode?.remove();\n });\n }\n};\n\n/**\n * Scrolls the editor's scroll container to the bottom after content is pasted.\n * @param event - The plugin event.\n * @param editor - The editor instance.\n */\nexport const scrollToBottomAfterContentPaste = (event: PluginEvent, editor: IEditor): void => {\n if (event.eventType === PluginEventType.ContentChanged && event.source === ContentChangedEventSource.Paste) {\n const scrollContainer = editor.getScrollContainer();\n // get current selection for the editor\n const selection = document.getSelection();\n // if selection exists\n if (selection && selection.rangeCount > 0) {\n // the range for the selection\n const range = selection.getRangeAt(0);\n // the selection position relative to the viewport\n const cursorRect = range.getBoundingClientRect();\n // the scrollContainer position relative to the viewport\n const scrollContainerRect = scrollContainer.getBoundingClientRect();\n // 1. scrollContainer.scrollTop represents the number of pixels that the content of scrollContainer is scrolled upward.\n // 2. subtract the top position of the scrollContainer element (scrollContainerRect.top) to\n // translate the scroll position from being relative to the document to being relative to the viewport.\n // 3. add the top position of the cursor (containerRect.top) to moves the scroll position to the cursor's position.\n const updatedScrollTop = scrollContainer.scrollTop - scrollContainerRect.top + cursorRect.top;\n scrollContainer.scrollTo({\n top: updatedScrollTop,\n behavior: 'smooth'\n });\n }\n }\n};"]}
@@ -1,12 +0,0 @@
1
- import type { PluginEvent, EditorPlugin } from 'roosterjs-content-model-types';
2
- /**
3
- * KeyboardInputPlugin is a plugin for handling keyboard events in the editor.
4
- */
5
- export declare class KeyboardInputPlugin implements EditorPlugin {
6
- onKeyDown?: ((event: KeyboardEvent) => void) | null;
7
- getName(): string;
8
- initialize(): void;
9
- dispose(): void;
10
- onPluginEvent(event: PluginEvent): void;
11
- }
12
- //# sourceMappingURL=KeyboardInputPlugin.d.ts.map
@@ -1,23 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { PluginEventType } from '../../utils/RichTextEditorUtils';
4
- /**
5
- * KeyboardInputPlugin is a plugin for handling keyboard events in the editor.
6
- */
7
- export class KeyboardInputPlugin {
8
- constructor() {
9
- // don't set callback in constructor to be able to update callback without plugin recreation
10
- this.onKeyDown = null;
11
- }
12
- getName() {
13
- return 'KeyboardInputPlugin';
14
- }
15
- initialize() { }
16
- dispose() { }
17
- onPluginEvent(event) {
18
- if (this.onKeyDown && event.eventType === PluginEventType.KeyDown && event.rawEvent instanceof KeyboardEvent) {
19
- this.onKeyDown(event.rawEvent);
20
- }
21
- }
22
- }
23
- //# sourceMappingURL=KeyboardInputPlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"KeyboardInputPlugin.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAAhC;QACE,4FAA4F;QAC5F,cAAS,GAA6C,IAAI,CAAC;IAW7D,CAAC;IAVC,OAAO;QACL,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACD,UAAU,KAAU,CAAC;IACrB,OAAO,KAAU,CAAC;IAClB,aAAa,CAAC,KAAkB;QAC9B,IAAI,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,KAAK,eAAe,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ,YAAY,aAAa,EAAE,CAAC;YAC7G,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { PluginEvent, EditorPlugin } from 'roosterjs-content-model-types';\nimport { PluginEventType } from '../../utils/RichTextEditorUtils';\n\n/**\n * KeyboardInputPlugin is a plugin for handling keyboard events in the editor.\n */\nexport class KeyboardInputPlugin implements EditorPlugin {\n // don't set callback in constructor to be able to update callback without plugin recreation\n onKeyDown?: ((event: KeyboardEvent) => void) | null = null;\n getName(): string {\n return 'KeyboardInputPlugin';\n }\n initialize(): void {}\n dispose(): void {}\n onPluginEvent(event: PluginEvent): void {\n if (this.onKeyDown && event.eventType === PluginEventType.KeyDown && event.rawEvent instanceof KeyboardEvent) {\n this.onKeyDown(event.rawEvent);\n }\n }\n}"]}
@@ -1,15 +0,0 @@
1
- import { WatermarkPlugin } from 'roosterjs-content-model-plugins';
2
- import type { /*PluginEvent, EditorPlugin,*/ IEditor } from 'roosterjs-content-model-types';
3
- /**
4
- * PlaceholderPlugin is a plugin for displaying placeholder and handle localization for it in the editor.
5
- */
6
- export default class PlaceholderPlugin extends WatermarkPlugin {
7
- private isPlaceholderShown;
8
- private editorValue;
9
- updatePlaceholder(placeholder: string): void;
10
- initialize(editor: IEditor): void;
11
- dispose(): void;
12
- protected show(editor: IEditor): void;
13
- protected hide(editor: IEditor): void;
14
- }
15
- //# sourceMappingURL=PlaceholderPlugin.d.ts.map
@@ -1,39 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { WatermarkPlugin } from 'roosterjs-content-model-plugins';
4
- /**
5
- * PlaceholderPlugin is a plugin for displaying placeholder and handle localization for it in the editor.
6
- */
7
- export default class PlaceholderPlugin extends WatermarkPlugin {
8
- constructor() {
9
- super(...arguments);
10
- this.isPlaceholderShown = false;
11
- this.editorValue = null;
12
- }
13
- updatePlaceholder(placeholder) {
14
- this.watermark = placeholder;
15
- // hide and show the placeholder to show the latest one
16
- // this needs to be done only if the placeholder is currently shown
17
- if (this.editorValue && this.isPlaceholderShown) {
18
- this.hide(this.editorValue);
19
- this.show(this.editorValue);
20
- }
21
- }
22
- initialize(editor) {
23
- this.editorValue = editor;
24
- super.initialize(editor);
25
- }
26
- dispose() {
27
- this.editorValue = null;
28
- super.dispose();
29
- }
30
- show(editor) {
31
- super.show(editor);
32
- this.isPlaceholderShown = true;
33
- }
34
- hide(editor) {
35
- super.hide(editor);
36
- this.isPlaceholderShown = false;
37
- }
38
- }
39
- //# sourceMappingURL=PlaceholderPlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PlaceholderPlugin.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,eAAe;IAA9D;;QACU,uBAAkB,GAAY,KAAK,CAAC;QACpC,gBAAW,GAAmB,IAAI,CAAC;IA0B7C,CAAC;IAzBC,iBAAiB,CAAC,WAAmB;QACnC,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC;QAC7B,uDAAuD;QACvD,mEAAmE;QACnE,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAChD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IACD,UAAU,CAAC,MAAe;QACxB,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;QAC1B,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO;QACL,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC;IACS,IAAI,CAAC,MAAe;QAC5B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;IACjC,CAAC;IACS,IAAI,CAAC,MAAe;QAC5B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { WatermarkPlugin } from 'roosterjs-content-model-plugins';\nimport type { /*PluginEvent, EditorPlugin,*/IEditor } from 'roosterjs-content-model-types';\n\n/**\n * PlaceholderPlugin is a plugin for displaying placeholder and handle localization for it in the editor.\n */\nexport default class PlaceholderPlugin extends WatermarkPlugin {\n private isPlaceholderShown: boolean = false;\n private editorValue: IEditor | null = null;\n updatePlaceholder(placeholder: string): void {\n this.watermark = placeholder;\n // hide and show the placeholder to show the latest one\n // this needs to be done only if the placeholder is currently shown\n if (this.editorValue && this.isPlaceholderShown) {\n this.hide(this.editorValue);\n this.show(this.editorValue);\n }\n }\n initialize(editor: IEditor): void {\n this.editorValue = editor;\n super.initialize(editor);\n }\n dispose(): void {\n this.editorValue = null;\n super.dispose();\n }\n protected show(editor: IEditor): void {\n super.show(editor);\n this.isPlaceholderShown = true;\n }\n protected hide(editor: IEditor): void {\n super.hide(editor);\n this.isPlaceholderShown = false;\n }\n}"]}
@@ -1,24 +0,0 @@
1
- import type { ContentModelFormatState, EditorPlugin, IEditor, PluginEvent } from 'roosterjs-content-model-types';
2
- /**
3
- * KeyboardInputPlugin is a plugin for handling keyboard events in the editor.
4
- */
5
- export declare class RichTextToolbarPlugin implements EditorPlugin {
6
- private formatState;
7
- private editor;
8
- onFormatChanged: ((formatState: ContentModelFormatState) => void) | null;
9
- getName(): string;
10
- initialize(editor: IEditor): void;
11
- dispose(): void;
12
- onPluginEvent(event: PluginEvent): void;
13
- /**
14
- * Handles the click event of a toolbar button.
15
- * @param buttonAction - The action to be performed when the button is clicked.
16
- */
17
- onToolbarButtonClick(buttonAction: (editor: IEditor) => void): void;
18
- /**
19
- * Updates the format state of the rich text editor and triggers the `onFormatChanged` callback
20
- * if there is any difference between the new and the current format states.
21
- */
22
- private updateFormat;
23
- }
24
- //# sourceMappingURL=RichTextToolbarPlugin.d.ts.map
@@ -1,64 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { getFormatState } from 'roosterjs-content-model-api';
4
- import { getObjectKeys } from 'roosterjs-content-model-dom';
5
- import { PluginEventType } from '../../utils/RichTextEditorUtils';
6
- /**
7
- * KeyboardInputPlugin is a plugin for handling keyboard events in the editor.
8
- */
9
- export class RichTextToolbarPlugin {
10
- constructor() {
11
- this.formatState = null;
12
- this.editor = null;
13
- this.onFormatChanged = null;
14
- }
15
- getName() {
16
- return 'RichTextToolbarPlugin';
17
- }
18
- initialize(editor) {
19
- this.editor = editor;
20
- }
21
- dispose() {
22
- this.editor = null;
23
- }
24
- onPluginEvent(event) {
25
- switch (event.eventType) {
26
- // KeyDown and MouseUp are used to update the state when the editor is already shown and focused by the user
27
- case PluginEventType.EditorReady:
28
- case PluginEventType.ContentChanged:
29
- case PluginEventType.ZoomChanged:
30
- case PluginEventType.KeyDown:
31
- case PluginEventType.MouseUp:
32
- this.updateFormat();
33
- break;
34
- }
35
- }
36
- /**
37
- * Handles the click event of a toolbar button.
38
- * @param buttonAction - The action to be performed when the button is clicked.
39
- */
40
- onToolbarButtonClick(buttonAction) {
41
- if (this.editor && !this.editor.isDisposed()) {
42
- buttonAction(this.editor);
43
- this.updateFormat();
44
- }
45
- }
46
- /**
47
- * Updates the format state of the rich text editor and triggers the `onFormatChanged` callback
48
- * if there is any difference between the new and the current format states.
49
- */
50
- updateFormat() {
51
- if (this.editor && this.onFormatChanged) {
52
- const newFormatState = getFormatState(this.editor);
53
- // use keys from the format that has more keys or the new format state if there is no current format state
54
- const keys = !this.formatState || getObjectKeys(newFormatState).length > getObjectKeys(this.formatState).length ? getObjectKeys(newFormatState) : getObjectKeys(this.formatState);
55
- // check if there is any difference between the new format state and the current format state
56
- // otherwise the states will produce new objects every time even when the format state is the same
57
- if (!this.formatState || keys.some(key => { var _a; return newFormatState[key] !== ((_a = this.formatState) === null || _a === void 0 ? void 0 : _a[key]); })) {
58
- this.formatState = newFormatState;
59
- this.onFormatChanged(newFormatState);
60
- }
61
- }
62
- }
63
- }
64
- //# sourceMappingURL=RichTextToolbarPlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextToolbarPlugin.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,qBAAqB;IAAlC;QACU,gBAAW,GAAmC,IAAI,CAAC;QACnD,WAAM,GAAmB,IAAI,CAAC;QACtC,oBAAe,GAA4D,IAAI,CAAC;IAmDlF,CAAC;IAlDC,OAAO;QACL,OAAO,uBAAuB,CAAC;IACjC,CAAC;IACD,UAAU,CAAC,MAAe;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IACD,OAAO;QACL,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;IACD,aAAa,CAAC,KAAkB;QAC9B,QAAQ,KAAK,CAAC,SAAS,EAAE,CAAC;YACxB,4GAA4G;YAC5G,KAAK,eAAe,CAAC,WAAW,CAAC;YACjC,KAAK,eAAe,CAAC,cAAc,CAAC;YACpC,KAAK,eAAe,CAAC,WAAW,CAAC;YACjC,KAAK,eAAe,CAAC,OAAO,CAAC;YAC7B,KAAK,eAAe,CAAC,OAAO;gBAC1B,IAAI,CAAC,YAAY,EAAE,CAAC;gBACpB,MAAM;QACV,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,oBAAoB,CAAC,YAAuC;QAC1D,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;YAC7C,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC1B,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;IAED;;;OAGG;IACK,YAAY;QAClB,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACxC,MAAM,cAAc,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACnD,0GAA0G;YAC1G,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,IAAI,aAAa,CAAC,cAAc,CAAC,CAAC,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAClL,6FAA6F;YAC7F,kGAAkG;YAClG,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,WAAC,OAAA,cAAc,CAAC,GAAG,CAAC,MAAK,MAAA,IAAI,CAAC,WAAW,0CAAG,GAAG,CAAC,CAAA,CAAA,EAAA,CAAC,EAAE,CAAC;gBAC3F,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC;gBAClC,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;YACvC,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getFormatState } from 'roosterjs-content-model-api';\nimport { getObjectKeys } from 'roosterjs-content-model-dom';\nimport type { ContentModelFormatState, EditorPlugin, IEditor, PluginEvent } from 'roosterjs-content-model-types';\nimport { PluginEventType } from '../../utils/RichTextEditorUtils';\n\n/**\n * KeyboardInputPlugin is a plugin for handling keyboard events in the editor.\n */\nexport class RichTextToolbarPlugin implements EditorPlugin {\n private formatState: ContentModelFormatState | null = null;\n private editor: IEditor | null = null;\n onFormatChanged: ((formatState: ContentModelFormatState) => void) | null = null;\n getName(): string {\n return 'RichTextToolbarPlugin';\n }\n initialize(editor: IEditor): void {\n this.editor = editor;\n }\n dispose(): void {\n this.editor = null;\n }\n onPluginEvent(event: PluginEvent): void {\n switch (event.eventType) {\n // KeyDown and MouseUp are used to update the state when the editor is already shown and focused by the user\n case PluginEventType.EditorReady:\n case PluginEventType.ContentChanged:\n case PluginEventType.ZoomChanged:\n case PluginEventType.KeyDown:\n case PluginEventType.MouseUp:\n this.updateFormat();\n break;\n }\n }\n\n /**\n * Handles the click event of a toolbar button.\n * @param buttonAction - The action to be performed when the button is clicked.\n */\n onToolbarButtonClick(buttonAction: (editor: IEditor) => void): void {\n if (this.editor && !this.editor.isDisposed()) {\n buttonAction(this.editor);\n this.updateFormat();\n }\n }\n\n /**\n * Updates the format state of the rich text editor and triggers the `onFormatChanged` callback\n * if there is any difference between the new and the current format states.\n */\n private updateFormat(): void {\n if (this.editor && this.onFormatChanged) {\n const newFormatState = getFormatState(this.editor);\n // use keys from the format that has more keys or the new format state if there is no current format state\n const keys = !this.formatState || getObjectKeys(newFormatState).length > getObjectKeys(this.formatState).length ? getObjectKeys(newFormatState) : getObjectKeys(this.formatState);\n // check if there is any difference between the new format state and the current format state\n // otherwise the states will produce new objects every time even when the format state is the same\n if (!this.formatState || keys.some(key => newFormatState[key] !== this.formatState?.[key])) {\n this.formatState = newFormatState;\n this.onFormatChanged(newFormatState);\n }\n }\n }\n}"]}
@@ -1,20 +0,0 @@
1
- import type { ContextMenuProvider, IEditor } from 'roosterjs-content-model-types';
2
- import { RichTextStrings } from '../RichTextSendBox';
3
- import { IContextualMenuItem } from '@fluentui/react';
4
- /**
5
- * Provides a context menu for editing tables in the rich text editor.
6
- */
7
- export declare class TableEditContextMenuProvider implements ContextMenuProvider<IContextualMenuItem> {
8
- private editor;
9
- strings: Partial<RichTextStrings>;
10
- private items;
11
- updateStrings(strings: Partial<RichTextStrings>): void;
12
- getName(): string;
13
- initialize(editor: IEditor): void;
14
- /**
15
- * Dispose this plugin
16
- */
17
- dispose(): void;
18
- getContextMenuItems(node: Node): IContextualMenuItem[] | null;
19
- }
20
- //# sourceMappingURL=TableEditContextMenuProvider.d.ts.map
@@ -1,46 +0,0 @@
1
- import { getTableEditContextMenuItems } from '../../utils/RichTextTableUtils';
2
- /**
3
- * Provides a context menu for editing tables in the rich text editor.
4
- */
5
- export class TableEditContextMenuProvider {
6
- constructor() {
7
- this.editor = null;
8
- this.strings = {};
9
- this.items = null;
10
- }
11
- updateStrings(strings) {
12
- this.strings = strings;
13
- if (this.editor) {
14
- this.items = getTableEditContextMenuItems(this.editor, this.strings);
15
- }
16
- }
17
- getName() {
18
- return 'TableEditContextMenuProvider';
19
- }
20
- initialize(editor) {
21
- this.editor = editor;
22
- this.items = getTableEditContextMenuItems(editor, this.strings);
23
- }
24
- /**
25
- * Dispose this plugin
26
- */
27
- dispose() {
28
- this.editor = null;
29
- }
30
- getContextMenuItems(node) {
31
- // return this.items;
32
- if (this.editor && isTableEditable(this.editor, node)) {
33
- return this.items;
34
- }
35
- else {
36
- return null;
37
- }
38
- }
39
- }
40
- const isTableEditable = (editor, node) => {
41
- const domHelper = editor.getDOMHelper();
42
- const td = domHelper.findClosestElementAncestor(node, 'TD,TH');
43
- const table = td && domHelper.findClosestElementAncestor(td, 'table');
44
- return (table === null || table === void 0 ? void 0 : table.isContentEditable) === true;
45
- };
46
- //# sourceMappingURL=TableEditContextMenuProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableEditContextMenuProvider.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E;;GAEG;AACH,MAAM,OAAO,4BAA4B;IAAzC;QACU,WAAM,GAAmB,IAAI,CAAC;QACtC,YAAO,GAA6B,EAAE,CAAC;QAC/B,UAAK,GAAiC,IAAI,CAAC;IA6BrD,CAAC;IA5BC,aAAa,CAAC,OAAiC;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,GAAG,4BAA4B,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IACD,OAAO;QACL,OAAO,8BAA8B,CAAC;IACxC,CAAC;IACD,UAAU,CAAC,MAAe;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,4BAA4B,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;IACD,mBAAmB,CAAC,IAAU;QAC5B,qBAAqB;QACrB,IAAI,IAAI,CAAC,MAAM,IAAI,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;YACtD,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF;AACD,MAAM,eAAe,GAAG,CAAC,MAAe,EAAE,IAAU,EAAW,EAAE;IAC/D,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;IACxC,MAAM,EAAE,GAAG,SAAS,CAAC,0BAA0B,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/D,MAAM,KAAK,GAAG,EAAE,IAAI,SAAS,CAAC,0BAA0B,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,OAAO,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,iBAAiB,MAAK,IAAI,CAAC;AAC3C,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { ContextMenuProvider, IEditor } from 'roosterjs-content-model-types';\nimport { RichTextStrings } from '../RichTextSendBox';\nimport { IContextualMenuItem } from '@fluentui/react';\nimport { getTableEditContextMenuItems } from '../../utils/RichTextTableUtils';\n\n/**\n * Provides a context menu for editing tables in the rich text editor.\n */\nexport class TableEditContextMenuProvider implements ContextMenuProvider<IContextualMenuItem> {\n private editor: IEditor | null = null;\n strings: Partial<RichTextStrings> = {};\n private items: IContextualMenuItem[] | null = null;\n updateStrings(strings: Partial<RichTextStrings>): void {\n this.strings = strings;\n if (this.editor) {\n this.items = getTableEditContextMenuItems(this.editor, this.strings);\n }\n }\n getName(): string {\n return 'TableEditContextMenuProvider';\n }\n initialize(editor: IEditor): void {\n this.editor = editor;\n this.items = getTableEditContextMenuItems(editor, this.strings);\n }\n\n /**\n * Dispose this plugin\n */\n dispose(): void {\n this.editor = null;\n }\n getContextMenuItems(node: Node): IContextualMenuItem[] | null {\n // return this.items;\n if (this.editor && isTableEditable(this.editor, node)) {\n return this.items;\n } else {\n return null;\n }\n }\n}\nconst isTableEditable = (editor: IEditor, node: Node): boolean => {\n const domHelper = editor.getDOMHelper();\n const td = domHelper.findClosestElementAncestor(node, 'TD,TH');\n const table = td && domHelper.findClosestElementAncestor(td, 'table');\n return table?.isContentEditable === true;\n};"]}