@azure/communication-react 1.27.0-beta.1 → 1.27.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 (437) hide show
  1. package/dist/communication-react.d.ts +142 -1385
  2. package/dist/dist-cjs/communication-react/index.js +40061 -174
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/common.d.ts +0 -13
  5. package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/constants.d.ts +0 -5
  7. package/dist/dist-esm/acs-ui-common/src/constants.js +0 -5
  8. package/dist/dist-esm/acs-ui-common/src/constants.js.map +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/index.d.ts +0 -4
  10. package/dist/dist-esm/acs-ui-common/src/index.js +0 -3
  11. package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
  12. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  13. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  14. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.d.ts +27 -3
  15. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js +9 -2
  16. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js.map +1 -1
  17. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.d.ts +31 -3
  18. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js +9 -2
  19. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js.map +1 -1
  20. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.d.ts +22 -3
  21. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js +8 -2
  22. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js.map +1 -1
  23. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.d.ts +29 -3
  24. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js +9 -2
  25. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js.map +1 -1
  26. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +6 -0
  27. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +7 -2
  28. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  29. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +13 -16
  30. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
  31. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +0 -2
  32. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -6
  33. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  34. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +1 -19
  35. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  36. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -0
  37. package/dist/dist-esm/calling-component-bindings/src/index.js +1 -0
  38. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  39. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  40. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
  41. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  42. package/dist/dist-esm/calling-component-bindings/src/remoteParticipantsSelector.d.ts +15 -0
  43. package/dist/dist-esm/calling-component-bindings/src/remoteParticipantsSelector.js +13 -0
  44. package/dist/dist-esm/calling-component-bindings/src/remoteParticipantsSelector.js.map +1 -0
  45. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +9 -0
  46. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +16 -0
  47. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
  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 -42
  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 +0 -6
  53. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +0 -35
  54. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  55. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -4
  56. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +4 -24
  57. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -3
  59. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  60. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js +2 -0
  61. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js.map +1 -1
  62. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
  63. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
  64. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  65. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
  66. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  67. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -1
  68. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  69. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
  70. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -35
  71. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  72. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  73. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -4
  74. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  75. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +2 -25
  76. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  77. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  78. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  79. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -15
  80. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  81. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -2
  82. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  83. package/dist/dist-esm/chat-stateful-client/src/index.d.ts +0 -1
  84. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  85. package/dist/dist-esm/communication-react/src/index.d.ts +0 -21
  86. package/dist/dist-esm/communication-react/src/index.js +0 -3
  87. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  88. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +0 -2
  89. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +0 -1
  90. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  91. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +4 -7
  92. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  93. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -13
  94. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +3 -9
  95. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  96. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -11
  97. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +2 -32
  98. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  99. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -8
  100. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +5 -9
  101. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  102. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +1 -2
  103. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +4 -4
  104. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +1 -4
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +6 -31
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +1 -15
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -9
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -23
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +6 -17
  113. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -8
  115. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +6 -10
  116. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  117. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +5 -5
  118. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -2
  120. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  121. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  122. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
  123. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  124. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
  125. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -13
  126. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  127. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
  128. package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -12
  129. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  130. package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.js.map +1 -1
  131. package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js.map +1 -1
  133. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
  134. package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
  135. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +1 -1
  137. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js +10 -4
  138. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js.map +1 -1
  139. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -21
  140. package/dist/dist-esm/react-components/src/components/index.js +0 -8
  141. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  142. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  143. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  144. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
  145. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js +1 -1
  146. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js.map +1 -1
  147. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
  148. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -8
  149. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  150. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.js +2 -0
  151. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.js.map +1 -1
  152. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +3 -37
  153. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
  154. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  155. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
  156. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
  157. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  158. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -38
  159. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -131
  160. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  161. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
  162. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  163. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  164. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  165. package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js.map +1 -1
  166. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  167. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
  168. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  169. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  170. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  171. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -45
  172. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  173. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -24
  174. package/dist/dist-esm/react-components/src/theming/icons.js +0 -67
  175. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  176. package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
  177. package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
  178. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  179. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
  180. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  181. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  182. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  183. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -59
  184. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +10 -15
  185. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  186. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  187. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -37
  188. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +1 -11
  189. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  190. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +4 -4
  191. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  192. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js +1 -2
  193. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js.map +1 -1
  194. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -2
  195. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  196. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  197. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
  198. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  199. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
  200. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  201. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  202. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
  203. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  204. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  205. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +3 -5
  206. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  207. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -3
  208. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  209. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +0 -3
  210. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  211. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -2
  212. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  213. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  214. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +5 -40
  215. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  216. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
  217. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  218. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  219. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  220. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
  221. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  222. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  223. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +3 -1
  224. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
  225. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js +11 -1
  226. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js.map +1 -1
  227. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +0 -8
  228. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -49
  229. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  230. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -52
  231. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +4 -10
  232. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  233. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -10
  234. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -20
  235. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +6 -20
  237. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  238. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
  239. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
  240. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -27
  242. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
  243. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  244. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
  245. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -189
  246. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
  248. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  249. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
  250. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -36
  251. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  252. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
  253. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  254. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
  255. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  256. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
  257. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  258. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -4
  259. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -4
  260. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  261. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +1 -1
  262. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  263. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +1 -1
  264. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  265. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -2
  266. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
  268. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
  269. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
  271. package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
  272. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  273. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -26
  274. package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -2
  275. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  276. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +5 -0
  277. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  278. package/package.json +14 -14
  279. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CuMDt6F1.js +0 -205
  280. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CuMDt6F1.js.map +0 -1
  281. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-FltfC9HN.js +0 -49
  282. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-FltfC9HN.js.map +0 -1
  283. package/dist/dist-cjs/communication-react/index-baiJAAbD.js +0 -45914
  284. package/dist/dist-cjs/communication-react/index-baiJAAbD.js.map +0 -1
  285. package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
  286. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -20
  287. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
  288. package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
  289. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
  290. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
  291. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
  292. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
  293. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
  294. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +0 -6
  295. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +0 -20
  296. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +0 -1
  297. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  298. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  299. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  300. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -24
  301. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -196
  302. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
  303. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  304. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -36
  305. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  306. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  307. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -67
  308. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  309. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  310. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -51
  311. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  312. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  313. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -40
  314. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  315. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  316. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -119
  317. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  318. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
  319. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
  320. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
  321. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
  322. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
  323. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
  324. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -19
  325. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -43
  326. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
  327. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
  328. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
  329. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
  330. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
  331. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
  332. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
  333. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
  334. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
  335. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
  336. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
  337. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
  338. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
  339. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -30
  340. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -99
  341. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
  342. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -59
  343. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -334
  344. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
  345. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
  346. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -78
  347. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
  348. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -215
  349. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -177
  350. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
  351. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
  352. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
  353. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
  354. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.d.ts +0 -9
  355. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.js +0 -16
  356. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.js.map +0 -1
  357. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
  358. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -229
  359. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
  360. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
  361. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
  362. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
  363. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
  364. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
  365. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
  366. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
  367. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
  368. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
  369. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
  370. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
  371. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
  372. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  373. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  374. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  375. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  376. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  377. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  378. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  379. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -819
  380. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  381. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  382. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  383. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  384. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  385. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  386. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  387. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
  388. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -324
  389. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
  390. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
  391. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
  392. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
  393. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  394. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
  395. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  396. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  397. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  398. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  399. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -73
  400. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -178
  401. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
  402. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
  403. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -119
  404. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
  405. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  406. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  407. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  408. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  409. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  410. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  411. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -46
  412. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -200
  413. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  414. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
  415. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
  416. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
  417. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  418. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  419. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  420. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
  421. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
  422. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
  423. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
  424. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -265
  425. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
  426. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
  427. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
  428. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
  429. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
  430. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
  431. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
  432. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
  433. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
  434. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
  435. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
  436. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
  437. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextSendBox.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/RichTextSendBox.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAA8B,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,YAAY,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AACnI,OAAO,EAAE,qBAAqB,EAAE,qCAAqC,EAAE,MAAM,uBAAuB,CAAC;AAErG,OAAO,EAAE,QAAQ,EAAE,MAAM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AA8D;AAC7D,eAAuB,CAAC,yBAAyB,CAAC,GAAG,IAAI,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { RichTextInputBoxComponent } from './RichTextInputBoxComponent';\nimport { Icon, Stack } from '@fluentui/react';\nimport { useLocale } from '../../localization';\nimport { SendBoxStrings } from '../SendBox';\nimport { sendIconStyle } from '../styles/SendBox.styles';\nimport { useV9CustomStyles } from '../styles/SendBox.styles';\nimport { InputBoxButton } from '../InputBoxButton';\nimport { RichTextSendBoxErrors, RichTextSendBoxErrorsProps } from './RichTextSendBoxErrors';\nimport { isMessageTooLong, isSendBoxButtonDisabled, sanitizeText, modifyInlineImagesInContentString } from '../utils/SendBoxUtils';\nimport { hasInlineImageContent, getContentWithUpdatedInlineImagesInfo } from '../utils/SendBoxUtils';\nimport { RichTextEditorComponentRef } from './RichTextEditor';\nimport { useTheme } from '../../theming';\nimport { richTextActionButtonsStyle, sendBoxRichTextEditorStyle } from '../styles/RichTextEditor.styles';\nimport { _AttachmentUploadCards } from '../Attachment/AttachmentUploadCards';\nimport { AttachmentMetadataInProgress, MessageOptions } from '@internal/acs-ui-common';\nimport { isAttachmentUploadCompleted, hasIncompleteAttachmentUploads, toAttachmentMetadata } from '../utils/SendBoxUtils';\nimport { SendBoxErrorBarError } from '../SendBoxErrorBar';\nimport { SendBoxErrorBarType } from '../SendBoxErrorBar';\nimport { attachmentUploadCardsStyles } from '../styles/SendBox.styles';\nimport { FluentV9ThemeProvider } from '../../theming/FluentV9ThemeProvider';\nimport { richTextSendBoxIdentifier } from './RichTextSendBoxUtils';\n\n/**\n * Strings of {@link RichTextSendBox} that can be overridden.\n *\n * @beta\n */\nexport interface RichTextSendBoxStrings extends RichTextStrings, SendBoxStrings {}\n/**\n * Options for the rich text editor configuration.\n *\n * @beta\n */\nexport interface RichTextEditorOptions {\n /**\n * Optional callback to handle paste event.\n */\n onPaste?: (event: {\n content: DocumentFragment;\n }) => void;\n}\n\n/**\n * Strings of RichText that can be overridden.\n *\n * @beta\n */\nexport interface RichTextStrings {\n /**\n * Tooltip text for the bold button.\n */\n richTextBoldTooltip: string;\n /**\n * Tooltip text for the italic button.\n */\n richTextItalicTooltip: string;\n /**\n * Tooltip text for the underline button.\n */\n richTextUnderlineTooltip: string;\n /**\n * Tooltip text for the bullet list button.\n */\n richTextBulletListTooltip: string;\n /**\n * Tooltip text for the number list button.\n */\n richTextNumberListTooltip: string;\n /**\n * Tooltip text for the increase indent button.\n */\n richTextIncreaseIndentTooltip: string;\n /**\n * Tooltip text for the decrease indent button.\n */\n richTextDecreaseIndentTooltip: string;\n /**\n * Tooltip text insert table button.\n */\n richTextInsertTableTooltip: string;\n /**\n * Tooltip text for the rich text format button button.\n */\n richTextFormatButtonTooltip: string;\n /**\n * Text for the insert menu item.\n */\n richTextInsertRowOrColumnMenu: string;\n /**\n * Title for the insert table menu.\n */\n richTextInsertTableMenuTitle: string;\n /**\n * Text for the insert menu item to insert row above the current selection.\n */\n richTextInsertRowAboveMenu: string;\n /**\n * Text for the insert menu item to insert row below the current selection.\n */\n richTextInsertRowBelowMenu: string;\n /**\n * Text for the insert menu item to insert column to the left from the current selection.\n */\n richTextInsertColumnLeftMenu: string;\n /**\n * Text for the insert menu item to insert column to the right from the current selection.\n */\n richTextInsertColumnRightMenu: string;\n /**\n * Text for the delete row or column menu.\n */\n richTextDeleteRowOrColumnMenu: string;\n /**\n * Text for the delete column menu.\n */\n richTextDeleteColumnMenu: string;\n /**\n * Text for the delete row menu.\n */\n richTextDeleteRowMenu: string;\n /**\n * Text for the delete table menu.\n */\n richTextDeleteTableMenu: string;\n /**\n * Text for the rich text toolbar.\n */\n richTextToolbarAriaLabel: string;\n /**\n * Text for the rich text toolbar more button.\n */\n richTextToolbarMoreButtonAriaLabel: string;\n /**\n * Text for announcement when a new bulleted list item is added.\n */\n richTextNewBulletedListItemAnnouncement: string;\n /**\n * Text for announcement when a new numbered list item is added.\n */\n richTextNewNumberedListItemAnnouncement: string;\n /**\n * Text for announcement when the bulleted list style is applied.\n */\n richTextBulletedListAppliedAnnouncement: string;\n /**\n * Text for announcement when the numbered list style is applied.\n */\n richTextNumberedListAppliedAnnouncement: string;\n /**\n * Error message indicating image upload is not complete.\n */\n imageUploadsPendingError: string;\n}\n\n/**\n * Props for {@link RichTextSendBox}.\n *\n * @beta\n */\nexport interface RichTextSendBoxProps {\n /**\n * Optional boolean to disable text box\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Optional callback to handle paste event.\n */\n onPaste?: (event: {\n content: DocumentFragment;\n }) => void;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<RichTextSendBoxStrings>;\n /**\n * Optional text for system message above the text box\n */\n systemMessage?: string;\n /**\n * Optional array of type {@link AttachmentMetadataInProgress}\n * to render attachments being uploaded in the SendBox.\n * @beta\n */\n attachments?: AttachmentMetadataInProgress[];\n /**\n * enumerable to determine if the input box has focus on render or not.\n * When undefined nothing has focus on render\n */\n autoFocus?: 'sendBoxTextField';\n /**\n * Optional callback to remove the attachment upload before sending by clicking on\n * cancel icon.\n */\n onCancelAttachmentUpload?: (attachmentId: string) => void;\n /**\n * Optional callback invoked after inline image is removed from the UI.\n * @param imageAttributes - attributes of the image such as id, src, style, etc.\n * It also contains the image file name which can be accessed through imageAttributes['data-image-file-name'].\n * Note that if the src attribute is a local blob url, it has been revoked at this point.\n */\n onRemoveInlineImage?: (imageAttributes: Record<string, string>) => void;\n /**\n * Callback function used when the send button is clicked.\n */\n onSendMessage: (content: string, options?: MessageOptions) => Promise<void>;\n /**\n * Optional callback called when user is typing\n */\n onTyping?: () => Promise<void>;\n /**\n * Optional callback to handle an inline image that's inserted in the rich text editor.\n * When not provided, pasting images into rich text editor will be disabled.\n * @param imageAttributes - attributes of the image such as id, src, style, etc.\n * It also contains the image file name which can be accessed through imageAttributes['data-image-file-name']\n */\n onInsertInlineImage?: (imageAttributes: Record<string, string>) => void;\n /**\n * Optional Array of type {@link AttachmentMetadataInProgress}\n * to render the errorBar for inline images inserted in the RichTextSendBox when:\n * - there is an error provided in the inlineImagesWithProgress\n * - progress is less than 1 when the send button is clicked\n * - content html string is longer than the max allowed length.\n * (Note that the id and the url prop of the inlineImagesWithProgress will be used as the id and src attribute of the content html\n * when calculating the content length, only for the purpose of displaying the content length overflow error.)\n */\n inlineImagesWithProgress?: AttachmentMetadataInProgress[];\n}\n\n/**\n * A component to render SendBox with Rich Text Editor support.\n *\n * @beta\n */\nexport const RichTextSendBox = (props: RichTextSendBoxProps): JSX.Element => {\n const {\n disabled = false,\n systemMessage,\n autoFocus,\n onSendMessage,\n onTyping,\n attachments,\n onCancelAttachmentUpload,\n onPaste,\n onInsertInlineImage,\n inlineImagesWithProgress,\n onRemoveInlineImage\n } = props;\n const theme = useTheme();\n const locale = useLocale();\n const localeStrings = useMemo(() => {\n return locale.strings.richTextSendBox;\n return locale.strings.sendBox;\n }, [locale.strings.richTextSendBox, locale.strings.sendBox]);\n const strings = useMemo(() => {\n return {\n ...localeStrings,\n ...props.strings\n };\n }, [localeStrings, props.strings]);\n const [contentValue, setContentValue] = useState('');\n const [contentValueOverflow, setContentValueOverflow] = useState(false);\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(undefined);\n const editorComponentRef = useRef<RichTextEditorComponentRef>(null);\n const customV9Styles = useV9CustomStyles();\n const contentTooLongMessage = useMemo(() => contentValueOverflow ? strings.textTooLong : undefined, [contentValueOverflow, strings.textTooLong]);\n const setContent = useCallback((newValue?: string): void => {\n if (newValue === undefined) {\n return;\n }\n setContentValueOverflow(isMessageTooLong(newValue.length));\n setContentValue(newValue);\n }, []);\n const onChangeHandler = useCallback((newValue?: string, removedInlineImages?: Record<string, string>[]) => {\n removedInlineImages?.forEach((removedInlineImage: Record<string, string>) => onRemoveInlineImage && onRemoveInlineImage(removedInlineImage));\n setContent(newValue);\n }, [setContent, onRemoveInlineImage]);\n const hasContent = useMemo(() => {\n // get plain text content from the editor to check if the message is empty\n // as the content may contain tags even when the content is empty\n const plainTextContent = editorComponentRef.current?.getPlainContent();\n const hasPlainText = sanitizeText(contentValue ?? '').length > 0 && sanitizeText(plainTextContent ?? '').length > 0;\n const hasInlineImages = hasInlineImageContent(contentValue);\n return hasPlainText || hasInlineImages;\n }, [contentValue]);\n const sendMessageOnClick = useCallback((): void => {\n if (inlineImagesWithProgress && inlineImagesWithProgress.length > 0) {\n const contentWithUpdatedInlineImagesInfo = getContentWithUpdatedInlineImagesInfo(contentValue, inlineImagesWithProgress);\n const messageTooLong = isMessageTooLong(contentWithUpdatedInlineImagesInfo.length);\n // Set contentValueOverflow state to display the error bar\n setContentValueOverflow(messageTooLong);\n // The change from the setContentValueOverflow in the previous line will not kick in yet.\n // We need to relay on the local value of messageTooLong to return early if the message is too long.\n if (messageTooLong) {\n return;\n }\n }\n if (disabled || contentValueOverflow) {\n return;\n }\n // Don't send message until all attachments have been uploaded successfully\n setAttachmentUploadsPendingError(undefined);\n const hasIncompleteImageUploads = hasIncompleteAttachmentUploads(inlineImagesWithProgress);\n if (hasIncompleteAttachmentUploads(attachments) || hasIncompleteImageUploads) {\n let errorMessage = strings.attachmentUploadsPendingError;\n if (hasIncompleteImageUploads) {\n errorMessage = strings.imageUploadsPendingError || '';\n }\n setAttachmentUploadsPendingError({\n message: errorMessage,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.info\n });\n return;\n }\n\n // we don't want to send empty messages including spaces, newlines, tabs\n // Message can be empty if there is a valid attachment upload\n if (hasContent || isAttachmentUploadCompleted(attachments)) {\n const sendMessage = (content: string): void => {\n onSendMessage(content, {\n attachments: toAttachmentMetadata(attachments),\n type: 'html'\n });\n setContentValue('');\n editorComponentRef.current?.setEmptyContent();\n editorComponentRef.current?.focus();\n };\n modifyInlineImagesInContentString(contentValue, [], (content: string) => {\n sendMessage(content);\n });\n }\n }, [disabled, contentValueOverflow, attachments, inlineImagesWithProgress, contentValue, hasContent, strings.attachmentUploadsPendingError, strings.imageUploadsPendingError, onSendMessage]);\n\n // ignore attachments error (errored attachment will not be added, shouldn't disable SendButton)\n const hasBlockingErrorMessages = useMemo(() => {\n return !!systemMessage || !!contentTooLongMessage || !!attachmentUploadsPendingError || !!inlineImagesWithProgress?.filter(image => image.error).pop()?.error;\n }, [contentTooLongMessage, attachmentUploadsPendingError, systemMessage, inlineImagesWithProgress]);\n const isSendBoxButtonDisabledValue = useMemo(() => {\n return isSendBoxButtonDisabled({\n hasContent,\n hasCompletedAttachmentUploads: isAttachmentUploadCompleted(attachments),\n hasError: hasBlockingErrorMessages,\n disabled\n });\n }, [attachments, disabled, hasContent, hasBlockingErrorMessages]);\n const onRenderSendIcon = useCallback((isHover: boolean) => {\n return <Icon iconName={isHover && hasContent ? 'SendBoxSendHovered' : 'SendBoxSend'} className={sendIconStyle({\n theme,\n isSendBoxButtonDisabled: isSendBoxButtonDisabledValue,\n defaultTextColor: theme.palette.neutralSecondary\n })} />;\n }, [theme, isSendBoxButtonDisabledValue, hasContent]);\n const sendBoxErrorsProps: RichTextSendBoxErrorsProps = useMemo(() => {\n const uploadErrorMessage = attachments?.filter(attachmentUpload => attachmentUpload.error).pop()?.error?.message;\n const imageUploadErrorMessage = inlineImagesWithProgress?.filter(image => image.error).pop()?.error?.message;\n const errorMessage = uploadErrorMessage || imageUploadErrorMessage;\n let errorBarType = SendBoxErrorBarType.error;\n if (uploadErrorMessage) {\n errorBarType = SendBoxErrorBarType.warning;\n }\n return {\n attachmentUploadsPendingError: attachmentUploadsPendingError,\n attachmentProgressError: errorMessage ? {\n message: errorMessage,\n timestamp: Date.now(),\n errorBarType: errorBarType\n } : undefined,\n systemMessage: systemMessage,\n textTooLongMessage: contentTooLongMessage\n };\n }, [attachments, contentTooLongMessage, attachmentUploadsPendingError, inlineImagesWithProgress, systemMessage]);\n const onRenderAttachmentUploads = useCallback(() => {\n return <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme} className={customV9Styles.clearBackground}>\n <_AttachmentUploadCards attachments={attachments} onCancelAttachmentUpload={onCancelAttachmentUpload} strings={{\n removeAttachment: strings.removeAttachment,\n uploading: strings.uploading,\n uploadCompleted: strings.uploadCompleted,\n attachmentMoreMenu: strings.attachmentMoreMenu\n }} disabled={disabled} />\n </FluentV9ThemeProvider>\n </Stack>;\n }, [theme, customV9Styles.clearBackground, attachments, onCancelAttachmentUpload, strings.removeAttachment, strings.uploading, strings.uploadCompleted, strings.attachmentMoreMenu, disabled]);\n const sendButton = useMemo(() => {\n return <InputBoxButton onRenderIcon={onRenderSendIcon} onClick={e => {\n sendMessageOnClick();\n e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.\n }} className={richTextActionButtonsStyle} ariaLabel={localeStrings.sendButtonAriaLabel} tooltipContent={localeStrings.sendButtonAriaLabel} disabled={isSendBoxButtonDisabledValue} />;\n }, [isSendBoxButtonDisabledValue, localeStrings.sendButtonAriaLabel, onRenderSendIcon, sendMessageOnClick]);\n const hasAttachmentUploads = useMemo(() => {\n return isAttachmentUploadCompleted(attachments) || hasIncompleteAttachmentUploads(attachments);\n }, [attachments]);\n return <Stack>\n <RichTextSendBoxErrors {...sendBoxErrorsProps} />\n <RichTextInputBoxComponent placeholderText={strings.placeholderText} autoFocus={autoFocus} onChange={onChangeHandler} onEnterKeyDown={sendMessageOnClick} onTyping={onTyping} editorComponentRef={editorComponentRef} strings={strings} disabled={disabled} actionComponents={sendButton} richTextEditorStyleProps={sendBoxRichTextEditorStyle} onRenderAttachmentUploads={onRenderAttachmentUploads} hasAttachments={hasAttachmentUploads} onPaste={onPaste} onInsertInlineImage={onInsertInlineImage} />\n </Stack>;\n}; // Add component type check to assist in identification for usePropsFor\n// to avoid issue where production build does not have the component name\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(RichTextSendBox as any)[richTextSendBoxIdentifier] = true;"]}
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import { SendBoxErrorBarError } from '../SendBoxErrorBar';
3
- /**
4
- * @private
5
- */
6
- export interface RichTextSendBoxErrorsProps {
7
- attachmentUploadsPendingError?: SendBoxErrorBarError;
8
- attachmentProgressError?: SendBoxErrorBarError;
9
- systemMessage?: string;
10
- textTooLongMessage?: string;
11
- }
12
- /**
13
- * @private
14
- */
15
- export declare const RichTextSendBoxErrors: (props: RichTextSendBoxErrorsProps) => JSX.Element;
16
- //# sourceMappingURL=RichTextSendBoxErrors.d.ts.map
@@ -1,75 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
4
- import { SendBoxErrorBar } from '../SendBoxErrorBar';
5
- /**
6
- * @private
7
- */
8
- export const RichTextSendBoxErrors = (props) => {
9
- const { attachmentProgressError, attachmentUploadsPendingError, systemMessage, textTooLongMessage } = props;
10
- const [sendBoxError, setSendBoxError] = useState(undefined);
11
- useEffect(() => {
12
- if (systemMessage && !isMessageEmpty(systemMessage)) {
13
- setSendBoxError({
14
- message: systemMessage,
15
- timestamp: Date.now()
16
- });
17
- }
18
- }, [systemMessage]);
19
- useEffect(() => {
20
- if (textTooLongMessage && !isMessageEmpty(textTooLongMessage)) {
21
- setSendBoxError({
22
- message: textTooLongMessage,
23
- timestamp: Date.now()
24
- });
25
- }
26
- }, [textTooLongMessage]);
27
- useEffect(() => {
28
- if ((textTooLongMessage === undefined || isMessageEmpty(textTooLongMessage)) && (systemMessage === undefined || isMessageEmpty(systemMessage))) {
29
- setSendBoxError(undefined);
30
- }
31
- }, [systemMessage, textTooLongMessage]);
32
- useEffect(() => {
33
- setSendBoxError(prev => {
34
- const errors = [];
35
- if (prev) {
36
- errors.push(prev);
37
- }
38
- if (attachmentUploadsPendingError) {
39
- errors.push(attachmentUploadsPendingError);
40
- }
41
- if (attachmentProgressError) {
42
- errors.push(attachmentProgressError);
43
- }
44
- if (errors.length === 0) {
45
- return undefined;
46
- }
47
- // sort to get the latest error
48
- const sortedErrors = errors.sort((a, b) => b.timestamp - a.timestamp);
49
- return sortedErrors[0];
50
- });
51
- }, [attachmentProgressError, attachmentUploadsPendingError]);
52
- const onDismiss = useCallback(() => {
53
- if (systemMessage && !isMessageEmpty(systemMessage)) {
54
- setSendBoxError({
55
- message: systemMessage,
56
- timestamp: Date.now()
57
- });
58
- return;
59
- }
60
- setSendBoxError(undefined);
61
- }, [systemMessage]);
62
- const dismissAfterMs = useMemo(() => {
63
- const delayInMs = 10 * 1000;
64
- // don't dismiss the system message
65
- if (systemMessage) {
66
- return (sendBoxError === null || sendBoxError === void 0 ? void 0 : sendBoxError.message) !== systemMessage ? delayInMs : undefined;
67
- }
68
- return delayInMs;
69
- }, [sendBoxError === null || sendBoxError === void 0 ? void 0 : sendBoxError.message, systemMessage]);
70
- return React.createElement(SendBoxErrorBar, { error: sendBoxError, dismissAfterMs: dismissAfterMs, onDismiss: onDismiss });
71
- };
72
- const isMessageEmpty = (message) => {
73
- return message.trim().length === 0;
74
- };
75
- //# sourceMappingURL=RichTextSendBoxErrors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextSendBoxErrors.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,eAAe,EAAwB,MAAM,oBAAoB,CAAC;AAY3E;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAiC,EAAe,EAAE;IACtF,MAAM,EACJ,uBAAuB,EACvB,6BAA6B,EAC7B,aAAa,EACb,kBAAkB,EACnB,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAmC,SAAS,CAAC,CAAC;IAC9F,SAAS,CAAC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EAAW,EAAE;IAClD,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { SendBoxErrorBar, SendBoxErrorBarError } from '../SendBoxErrorBar';\n\n/**\n * @private\n */\nexport interface RichTextSendBoxErrorsProps {\n attachmentUploadsPendingError?: SendBoxErrorBarError;\n attachmentProgressError?: SendBoxErrorBarError;\n systemMessage?: string;\n textTooLongMessage?: string;\n}\n\n/**\n * @private\n */\nexport const RichTextSendBoxErrors = (props: RichTextSendBoxErrorsProps): JSX.Element => {\n const {\n attachmentProgressError,\n attachmentUploadsPendingError,\n systemMessage,\n textTooLongMessage\n } = props;\n const [sendBoxError, setSendBoxError] = useState<SendBoxErrorBarError | undefined>(undefined);\n useEffect(() => {\n if (systemMessage && !isMessageEmpty(systemMessage)) {\n setSendBoxError({\n message: systemMessage,\n timestamp: Date.now()\n });\n }\n }, [systemMessage]);\n useEffect(() => {\n if (textTooLongMessage && !isMessageEmpty(textTooLongMessage)) {\n setSendBoxError({\n message: textTooLongMessage,\n timestamp: Date.now()\n });\n }\n }, [textTooLongMessage]);\n useEffect(() => {\n if ((textTooLongMessage === undefined || isMessageEmpty(textTooLongMessage)) && (systemMessage === undefined || isMessageEmpty(systemMessage))) {\n setSendBoxError(undefined);\n }\n }, [systemMessage, textTooLongMessage]);\n useEffect(() => {\n setSendBoxError(prev => {\n const errors: SendBoxErrorBarError[] = [];\n if (prev) {\n errors.push(prev);\n }\n if (attachmentUploadsPendingError) {\n errors.push(attachmentUploadsPendingError);\n }\n if (attachmentProgressError) {\n errors.push(attachmentProgressError);\n }\n if (errors.length === 0) {\n return undefined;\n }\n // sort to get the latest error\n const sortedErrors = errors.sort((a, b) => b.timestamp - a.timestamp);\n return sortedErrors[0];\n });\n }, [attachmentProgressError, attachmentUploadsPendingError]);\n const onDismiss = useCallback(() => {\n if (systemMessage && !isMessageEmpty(systemMessage)) {\n setSendBoxError({\n message: systemMessage,\n timestamp: Date.now()\n });\n return;\n }\n setSendBoxError(undefined);\n }, [systemMessage]);\n const dismissAfterMs = useMemo(() => {\n const delayInMs = 10 * 1000;\n // don't dismiss the system message\n if (systemMessage) {\n return sendBoxError?.message !== systemMessage ? delayInMs : undefined;\n }\n return delayInMs;\n }, [sendBoxError?.message, systemMessage]);\n return <SendBoxErrorBar error={sendBoxError} dismissAfterMs={dismissAfterMs} onDismiss={onDismiss} />;\n};\nconst isMessageEmpty = (message: string): boolean => {\n return message.trim().length === 0;\n};"]}
@@ -1,9 +0,0 @@
1
- /**
2
- * @private
3
- */
4
- export declare const richTextSendBoxIdentifier: unique symbol;
5
- /**
6
- * @internal
7
- */
8
- export declare const _isRichTextSendBox: (component: any) => boolean;
9
- //# sourceMappingURL=RichTextSendBoxUtils.d.ts.map
@@ -1,16 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- // Add component type check to assist in identification for usePropsFor
4
- // to avoid issue where production build does not have the component name
5
- /**
6
- * @private
7
- */
8
- export const richTextSendBoxIdentifier = Symbol('richTextSendBoxIdentifier');
9
- /**
10
- * @internal
11
- */
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
- export const _isRichTextSendBox = (component) => {
14
- return (component === null || component === void 0 ? void 0 : component[richTextSendBoxIdentifier]) === true;
15
- };
16
- //# sourceMappingURL=RichTextSendBoxUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextSendBoxUtils.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,uEAAuE;AACvE,yEAAyE;AACzE;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAC7E;;GAEG;AACH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAc,EAAW,EAAE;IAC5D,OAAO,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAG,yBAAyB,CAAC,MAAK,IAAI,CAAC;AACzD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// Add component type check to assist in identification for usePropsFor\n// to avoid issue where production build does not have the component name\n/**\n * @private\n */\nexport const richTextSendBoxIdentifier = Symbol('richTextSendBoxIdentifier');\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const _isRichTextSendBox = (component: any): boolean => {\n return component?.[richTextSendBoxIdentifier] === true;\n};"]}
@@ -1,19 +0,0 @@
1
- /// <reference types="react" />
2
- import { RichTextToolbarPlugin } from '../Plugins/RichTextToolbarPlugin';
3
- import { RichTextStrings } from '../RichTextSendBox';
4
- /**
5
- * Props for {@link RichTextToolbar}.
6
- *
7
- * @private
8
- */
9
- export interface RichTextToolbarProps {
10
- plugin: RichTextToolbarPlugin;
11
- strings: Partial<RichTextStrings>;
12
- }
13
- /**
14
- * A component to display rich text toolbar.
15
- *
16
- * @beta
17
- */
18
- export declare const RichTextToolbar: (props: RichTextToolbarProps) => JSX.Element;
19
- //# sourceMappingURL=RichTextToolbar.d.ts.map
@@ -1,229 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React, { useCallback, useEffect, useMemo, useRef } from 'react';
4
- import { CommandBar, ContextualMenuItemType, Icon } from '@fluentui/react';
5
- import { toolbarButtonStyle, ribbonDividerStyle, ribbonOverflowButtonStyle, richTextToolbarStyle } from '../../styles/RichTextEditor.styles';
6
- import { useTheme } from '../../../theming';
7
- import { toggleBold, toggleItalic, toggleUnderline, toggleBullet, toggleNumbering, setIndentation, insertTable } from 'roosterjs-content-model-api';
8
- import { richTextInsertTableCommandBarItem } from './Table/RichTextInsertTableCommandBarItem';
9
- const MaxRowsNumber = 5;
10
- const MaxColumnsNumber = 5;
11
- /**
12
- * A component to display rich text toolbar.
13
- *
14
- * @beta
15
- */
16
- export const RichTextToolbar = (props) => {
17
- const { plugin, strings } = props;
18
- const theme = useTheme();
19
- // need to re-render the buttons when format state changes
20
- const [formatState, setFormatState] = React.useState(undefined);
21
- const commandBarRef = useRef(null);
22
- useEffect(() => {
23
- // update the format state on editor events
24
- plugin.onFormatChanged = setFormatState;
25
- // plugin editor ready event may happen before onFormatChanged is set
26
- // call update format function to ensure the format state is set
27
- plugin.updateFormat();
28
- }, [plugin]);
29
- const boldButton = useMemo(() => {
30
- return getCommandBarItem({
31
- dataTestId: 'rich-text-toolbar-bold-button',
32
- key: 'RichTextToolbarBoldButton',
33
- icon: 'RichTextBoldButtonIcon',
34
- onClick: () => {
35
- plugin.onToolbarButtonClick(editor => {
36
- toggleBold(editor);
37
- });
38
- },
39
- text: strings.richTextBoldTooltip,
40
- checked: formatState !== undefined && formatState.isBold === true,
41
- theme: theme
42
- });
43
- }, [formatState, plugin, strings.richTextBoldTooltip, theme]);
44
- const italicButton = useMemo(() => {
45
- return getCommandBarItem({
46
- dataTestId: 'rich-text-toolbar-italic-button',
47
- key: 'RichTextToolbarItalicButton',
48
- icon: 'RichTextItalicButtonIcon',
49
- onClick: () => {
50
- plugin.onToolbarButtonClick(editor => {
51
- toggleItalic(editor);
52
- });
53
- },
54
- text: strings.richTextItalicTooltip,
55
- checked: formatState !== undefined && (formatState === null || formatState === void 0 ? void 0 : formatState.isItalic) === true,
56
- theme: theme
57
- });
58
- }, [formatState, plugin, strings.richTextItalicTooltip, theme]);
59
- const underlineButton = useMemo(() => {
60
- return getCommandBarItem({
61
- dataTestId: 'rich-text-toolbar-underline-button',
62
- key: 'RichTextToolbarUnderlineButton',
63
- icon: 'RichTextUnderlineButtonIcon',
64
- onClick: () => {
65
- plugin.onToolbarButtonClick(editor => {
66
- toggleUnderline(editor);
67
- });
68
- },
69
- text: strings.richTextUnderlineTooltip,
70
- checked: formatState !== undefined && (formatState === null || formatState === void 0 ? void 0 : formatState.isUnderline) === true,
71
- theme: theme
72
- });
73
- }, [formatState, plugin, strings.richTextUnderlineTooltip, theme]);
74
- const bulletListButton = useMemo(() => {
75
- return getCommandBarItem({
76
- dataTestId: 'rich-text-toolbar-bullet-list-button',
77
- key: 'RichTextToolbarBulletListButton',
78
- icon: 'RichTextBulletListButtonIcon',
79
- onClick: () => {
80
- plugin.onToolbarButtonClick(editor => {
81
- // check the format state to see if the bulleted list is already applied
82
- const isBullet = formatState === null || formatState === void 0 ? void 0 : formatState.isBullet;
83
- toggleBullet(editor);
84
- // the bulleted list was added
85
- if (!isBullet) {
86
- setTimeout(() => {
87
- // a small delay and polite aria live are needed for MacOS VoiceOver to announce the change
88
- editor.announce({
89
- ariaLiveMode: 'polite',
90
- text: strings.richTextBulletedListAppliedAnnouncement
91
- });
92
- }, 50);
93
- }
94
- });
95
- },
96
- text: strings.richTextBulletListTooltip,
97
- checked: formatState !== undefined && (formatState === null || formatState === void 0 ? void 0 : formatState.isBullet) === true,
98
- theme: theme
99
- });
100
- }, [formatState, plugin, strings.richTextBulletListTooltip, strings.richTextBulletedListAppliedAnnouncement, theme]);
101
- const numberListButton = useMemo(() => {
102
- return getCommandBarItem({
103
- dataTestId: 'rich-text-toolbar-number-list-button',
104
- key: 'RichTextToolbarNumberListButton',
105
- icon: 'RichTextNumberListButtonIcon',
106
- onClick: () => {
107
- plugin.onToolbarButtonClick(editor => {
108
- // check the format state to see if the numbered list is already applied
109
- const isNumbering = formatState === null || formatState === void 0 ? void 0 : formatState.isNumbering;
110
- toggleNumbering(editor);
111
- // the numbered list was added
112
- if (!isNumbering) {
113
- // a small delay and polite aria live are needed for MacOS VoiceOver to announce the change
114
- setTimeout(() => {
115
- editor.announce({
116
- ariaLiveMode: 'polite',
117
- text: strings.richTextNumberedListAppliedAnnouncement
118
- });
119
- }, 50);
120
- }
121
- });
122
- },
123
- text: strings.richTextNumberListTooltip,
124
- checked: formatState !== undefined && (formatState === null || formatState === void 0 ? void 0 : formatState.isNumbering) === true,
125
- theme: theme
126
- });
127
- }, [formatState, plugin, strings.richTextNumberListTooltip, strings.richTextNumberedListAppliedAnnouncement, theme]);
128
- const indentDecreaseButton = useMemo(() => {
129
- return getCommandBarItem({
130
- dataTestId: 'rich-text-toolbar-indent-decrease-button',
131
- key: 'RichTextToolbarIndentDecreaseButton',
132
- icon: 'RichTextIndentDecreaseButtonIcon',
133
- onClick: () => {
134
- plugin.onToolbarButtonClick(editor => {
135
- setIndentation(editor, 'outdent');
136
- });
137
- },
138
- text: strings.richTextDecreaseIndentTooltip,
139
- canCheck: false,
140
- theme: theme
141
- });
142
- }, [plugin, strings.richTextDecreaseIndentTooltip, theme]);
143
- const indentIncreaseButton = useMemo(() => {
144
- return getCommandBarItem({
145
- dataTestId: 'rich-text-toolbar-indent-increase-button',
146
- key: 'RichTextToolbarIndentIncreaseButton',
147
- icon: 'RichTextIndentIncreaseButtonIcon',
148
- onClick: () => {
149
- plugin.onToolbarButtonClick(editor => {
150
- setIndentation(editor, 'indent');
151
- });
152
- },
153
- text: strings.richTextIncreaseIndentTooltip,
154
- canCheck: false,
155
- theme: theme
156
- });
157
- }, [plugin, strings.richTextIncreaseIndentTooltip, theme]);
158
- const divider = useCallback((key) => {
159
- return dividerCommandBarItem(theme, key);
160
- }, [theme]);
161
- const tableButton = useMemo(() => {
162
- return richTextInsertTableCommandBarItem(theme, MaxRowsNumber, MaxColumnsNumber, strings, (column, row) => {
163
- plugin.onToolbarButtonClick(editor => {
164
- //add format
165
- insertTable(editor, column, row);
166
- // when subMenuProps is used and the menu is dismissed, focus is set to the command bar item that opened the menu
167
- // set focus to editor on next re-render
168
- setTimeout(() => {
169
- editor.focus();
170
- });
171
- });
172
- });
173
- }, [plugin, strings, theme]);
174
- const buttons = useMemo(() => {
175
- return [boldButton, italicButton, underlineButton, divider('RichTextRibbonTextFormatDivider'), bulletListButton, numberListButton, indentDecreaseButton, indentIncreaseButton, divider('RichTextRibbonTableDivider'), tableButton];
176
- }, [boldButton, italicButton, underlineButton, divider, bulletListButton, numberListButton, indentDecreaseButton, indentIncreaseButton, tableButton]);
177
- const overflowButtonProps = useMemo(() => {
178
- return {
179
- ariaLabel: strings.richTextToolbarMoreButtonAriaLabel,
180
- styles: toolbarButtonStyle(theme),
181
- menuProps: {
182
- items: [],
183
- // CommandBar will determine items rendered in overflow
184
- isBeakVisible: false,
185
- styles: ribbonOverflowButtonStyle(theme)
186
- }
187
- };
188
- }, [strings.richTextToolbarMoreButtonAriaLabel, theme]);
189
- useEffect(() => {
190
- // delay focus to ensure the command bar is rendered
191
- setTimeout(() => {
192
- var _a;
193
- (_a = commandBarRef.current) === null || _a === void 0 ? void 0 : _a.focus();
194
- }, 25);
195
- }, []);
196
- return React.createElement(CommandBar, { items: buttons, "data-testid": 'rich-text-editor-toolbar', styles: richTextToolbarStyle, overflowButtonProps: overflowButtonProps, componentRef: commandBarRef, "aria-label": strings.richTextToolbarAriaLabel });
197
- };
198
- const getCommandBarItem = ({ key, icon, onClick, text, canCheck = true, checked = false, disabled = false, theme, dataTestId }) => {
199
- return {
200
- role: canCheck ? 'menuitemcheckbox' : 'menuitem',
201
- 'aria-checked': canCheck ? checked : undefined,
202
- // `menuitem` role doesn't support `aria-checked`
203
- 'data-testid': dataTestId,
204
- key: key,
205
- iconProps: {
206
- iconName: icon
207
- },
208
- onClick: onClick,
209
- text: text,
210
- ariaLabel: text,
211
- iconOnly: true,
212
- canCheck: canCheck,
213
- buttonStyles: Object.assign({}, toolbarButtonStyle(theme)),
214
- checked: checked,
215
- disabled: disabled
216
- };
217
- };
218
- const dividerCommandBarItem = (theme, key) => {
219
- return {
220
- key: key,
221
- disabled: true,
222
- // show the item correctly for the overflow menu
223
- itemType: ContextualMenuItemType.Divider,
224
- // this is still needed to remove checkmark icon space even though it is a divider
225
- canCheck: false,
226
- onRender: () => React.createElement(Icon, { iconName: "RichTextDividerIcon", className: ribbonDividerStyle(theme) })
227
- };
228
- };
229
- //# sourceMappingURL=RichTextToolbar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextToolbar.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE3E,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC7I,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAEpJ,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AAC9F,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAc3B;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAe,EAAE;IAC1E,MAAM,EACJ,MAAM,EACN,OAAO,EACR,GAAG,KAAK,CAAC;IACV,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,0DAA0D;IAC1D,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAsC,SAAS,CAAC,CAAC;IACrG,MAAM,aAAa,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAChD,SAAS,CAAC,GAAG,EAAE;QACb,2CAA2C;QAC3C,MAAM,CAAC,eAAe,GAAG,cAAc,CAAC;QACxC,q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AACJ,CAAC,CAAC;AACF,MAAM,qBAAqB,GAAG,CAAC,KAAY,EAAE,GAAW,EAAwB,EAAE;IAChF,OAAO;QACL,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,IAAI;QACd,gDAAgD;QAChD,QAAQ,EAAE,sBAAsB,CAAC,OAAO;QACxC,kFAAkF;QAClF,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,GAAG,EAAE,CAAC,oBAAC,IAAI,IAAC,QAAQ,EAAC,qBAAqB,EAAC,SAAS,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAI;KAC9F,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { RichTextToolbarPlugin } from '../Plugins/RichTextToolbarPlugin';\nimport { CommandBar, ContextualMenuItemType, Icon } from '@fluentui/react';\nimport type { ICommandBarItemProps, ICommandBar, Theme } from '@fluentui/react';\nimport { toolbarButtonStyle, ribbonDividerStyle, ribbonOverflowButtonStyle, richTextToolbarStyle } from '../../styles/RichTextEditor.styles';\nimport { useTheme } from '../../../theming';\nimport { ContentModelFormatState } from 'roosterjs-content-model-types';\nimport { toggleBold, toggleItalic, toggleUnderline, toggleBullet, toggleNumbering, setIndentation, insertTable } from 'roosterjs-content-model-api';\nimport { RichTextStrings } from '../RichTextSendBox';\nimport { richTextInsertTableCommandBarItem } from './Table/RichTextInsertTableCommandBarItem';\nconst MaxRowsNumber = 5;\nconst MaxColumnsNumber = 5;\n\n/**\n * Props for {@link RichTextToolbar}.\n *\n * @private\n */\nexport interface RichTextToolbarProps {\n // The rich text toolbar plugin used for connect editor and the ribbon.\n plugin: RichTextToolbarPlugin;\n // Strings for localization.\n strings: Partial<RichTextStrings>;\n}\n\n/**\n * A component to display rich text toolbar.\n *\n * @beta\n */\nexport const RichTextToolbar = (props: RichTextToolbarProps): JSX.Element => {\n const {\n plugin,\n strings\n } = props;\n const theme = useTheme();\n // need to re-render the buttons when format state changes\n const [formatState, setFormatState] = React.useState<ContentModelFormatState | undefined>(undefined);\n const commandBarRef = useRef<ICommandBar>(null);\n useEffect(() => {\n // update the format state on editor events\n plugin.onFormatChanged = setFormatState;\n // plugin editor ready event may happen before onFormatChanged is set\n // call update format function to ensure the format state is set\n plugin.updateFormat();\n }, [plugin]);\n const boldButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-bold-button',\n key: 'RichTextToolbarBoldButton',\n icon: 'RichTextBoldButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n toggleBold(editor);\n });\n },\n text: strings.richTextBoldTooltip,\n checked: formatState !== undefined && formatState.isBold === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextBoldTooltip, theme]);\n const italicButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-italic-button',\n key: 'RichTextToolbarItalicButton',\n icon: 'RichTextItalicButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n toggleItalic(editor);\n });\n },\n text: strings.richTextItalicTooltip,\n checked: formatState !== undefined && formatState?.isItalic === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextItalicTooltip, theme]);\n const underlineButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-underline-button',\n key: 'RichTextToolbarUnderlineButton',\n icon: 'RichTextUnderlineButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n toggleUnderline(editor);\n });\n },\n text: strings.richTextUnderlineTooltip,\n checked: formatState !== undefined && formatState?.isUnderline === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextUnderlineTooltip, theme]);\n const bulletListButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-bullet-list-button',\n key: 'RichTextToolbarBulletListButton',\n icon: 'RichTextBulletListButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n // check the format state to see if the bulleted list is already applied\n const isBullet = formatState?.isBullet;\n toggleBullet(editor);\n // the bulleted list was added\n if (!isBullet) {\n setTimeout(() => {\n // a small delay and polite aria live are needed for MacOS VoiceOver to announce the change\n editor.announce({\n ariaLiveMode: 'polite',\n text: strings.richTextBulletedListAppliedAnnouncement\n });\n }, 50);\n }\n });\n },\n text: strings.richTextBulletListTooltip,\n checked: formatState !== undefined && formatState?.isBullet === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextBulletListTooltip, strings.richTextBulletedListAppliedAnnouncement, theme]);\n const numberListButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-number-list-button',\n key: 'RichTextToolbarNumberListButton',\n icon: 'RichTextNumberListButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n // check the format state to see if the numbered list is already applied\n const isNumbering = formatState?.isNumbering;\n toggleNumbering(editor);\n // the numbered list was added\n if (!isNumbering) {\n // a small delay and polite aria live are needed for MacOS VoiceOver to announce the change\n setTimeout(() => {\n editor.announce({\n ariaLiveMode: 'polite',\n text: strings.richTextNumberedListAppliedAnnouncement\n });\n }, 50);\n }\n });\n },\n text: strings.richTextNumberListTooltip,\n checked: formatState !== undefined && formatState?.isNumbering === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextNumberListTooltip, strings.richTextNumberedListAppliedAnnouncement, theme]);\n const indentDecreaseButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-indent-decrease-button',\n key: 'RichTextToolbarIndentDecreaseButton',\n icon: 'RichTextIndentDecreaseButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n setIndentation(editor, 'outdent');\n });\n },\n text: strings.richTextDecreaseIndentTooltip,\n canCheck: false,\n theme: theme\n });\n }, [plugin, strings.richTextDecreaseIndentTooltip, theme]);\n const indentIncreaseButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-indent-increase-button',\n key: 'RichTextToolbarIndentIncreaseButton',\n icon: 'RichTextIndentIncreaseButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n setIndentation(editor, 'indent');\n });\n },\n text: strings.richTextIncreaseIndentTooltip,\n canCheck: false,\n theme: theme\n });\n }, [plugin, strings.richTextIncreaseIndentTooltip, theme]);\n const divider = useCallback((key: string) => {\n return dividerCommandBarItem(theme, key);\n }, [theme]);\n const tableButton: ICommandBarItemProps = useMemo(() => {\n return richTextInsertTableCommandBarItem(theme, MaxRowsNumber, MaxColumnsNumber, strings, (column: number, row: number) => {\n plugin.onToolbarButtonClick(editor => {\n //add format\n insertTable(editor, column, row);\n // when subMenuProps is used and the menu is dismissed, focus is set to the command bar item that opened the menu\n // set focus to editor on next re-render\n setTimeout(() => {\n editor.focus();\n });\n });\n });\n }, [plugin, strings, theme]);\n const buttons: ICommandBarItemProps[] = useMemo(() => {\n return [boldButton, italicButton, underlineButton, divider('RichTextRibbonTextFormatDivider'), bulletListButton, numberListButton, indentDecreaseButton, indentIncreaseButton, divider('RichTextRibbonTableDivider'), tableButton];\n }, [boldButton, italicButton, underlineButton, divider, bulletListButton, numberListButton, indentDecreaseButton, indentIncreaseButton, tableButton]);\n const overflowButtonProps = useMemo(() => {\n return {\n ariaLabel: strings.richTextToolbarMoreButtonAriaLabel,\n styles: toolbarButtonStyle(theme),\n menuProps: {\n items: [],\n // CommandBar will determine items rendered in overflow\n isBeakVisible: false,\n styles: ribbonOverflowButtonStyle(theme)\n }\n };\n }, [strings.richTextToolbarMoreButtonAriaLabel, theme]);\n useEffect(() => {\n // delay focus to ensure the command bar is rendered\n setTimeout(() => {\n commandBarRef.current?.focus();\n }, 25);\n }, []);\n return <CommandBar items={buttons} data-testid={'rich-text-editor-toolbar'} styles={richTextToolbarStyle} overflowButtonProps={overflowButtonProps} componentRef={commandBarRef} aria-label={strings.richTextToolbarAriaLabel} />;\n};\nconst getCommandBarItem = ({\n key,\n icon,\n onClick,\n text,\n canCheck = true,\n checked = false,\n disabled = false,\n theme,\n dataTestId\n}: {\n key: string;\n icon: string;\n onClick: () => void;\n text?: string;\n canCheck?: boolean;\n checked?: boolean;\n disabled?: boolean;\n theme: Theme;\n dataTestId: string;\n}): ICommandBarItemProps => {\n return {\n role: canCheck ? 'menuitemcheckbox' : 'menuitem',\n 'aria-checked': canCheck ? checked : undefined,\n // `menuitem` role doesn't support `aria-checked`\n 'data-testid': dataTestId,\n key: key,\n iconProps: {\n iconName: icon\n },\n onClick: onClick,\n text: text,\n ariaLabel: text,\n iconOnly: true,\n canCheck: canCheck,\n buttonStyles: {\n ...toolbarButtonStyle(theme)\n },\n checked: checked,\n disabled: disabled\n };\n};\nconst dividerCommandBarItem = (theme: Theme, key: string): ICommandBarItemProps => {\n return {\n key: key,\n disabled: true,\n // show the item correctly for the overflow menu\n itemType: ContextualMenuItemType.Divider,\n // this is still needed to remove checkmark icon space even though it is a divider\n canCheck: false,\n onRender: () => <Icon iconName=\"RichTextDividerIcon\" className={ribbonDividerStyle(theme)} />\n };\n};"]}
@@ -1,7 +0,0 @@
1
- import type { ICommandBarItemProps, Theme } from '@fluentui/react';
2
- import { RichTextStrings } from '../../RichTextSendBox';
3
- /**
4
- * "Insert table" command bar item for the rich text toolbar
5
- */
6
- export declare const richTextInsertTableCommandBarItem: (theme: Theme, maxRowsNumber: number, maxColumnsNumber: number, strings: Partial<RichTextStrings>, onClick: (column: number, row: number) => void) => ICommandBarItemProps;
7
- //# sourceMappingURL=RichTextInsertTableCommandBarItem.d.ts.map
@@ -1,51 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React from 'react';
4
- import { FocusZoneDirection } from '@fluentui/react';
5
- import { insertTableMenuTablePane, toolbarTableButtonStyle } from '../../../styles/RichTextEditor.styles';
6
- import { RichTextInsertTablePane } from './RichTextInsertTablePane';
7
- import { parseKey } from '../../../utils/RichTextTableUtils';
8
- import { RichTextToolbarTableIcon } from './RichTextToolbarTableIcon';
9
- /**
10
- * "Insert table" command bar item for the rich text toolbar
11
- */
12
- export const richTextInsertTableCommandBarItem = (theme, maxRowsNumber, maxColumnsNumber, strings, onClick) => {
13
- return {
14
- 'data-testid': 'rich-text-toolbar-insert-table-button',
15
- key: 'RichTextToolbarInsertTableButton',
16
- text: strings.richTextInsertTableTooltip,
17
- ariaLabel: strings.richTextInsertTableTooltip,
18
- // hide the chevron icon
19
- menuIconProps: {
20
- hidden: true
21
- },
22
- onRenderIcon: () => {
23
- return React.createElement(RichTextToolbarTableIcon, null);
24
- },
25
- buttonStyles: toolbarTableButtonStyle(theme),
26
- canCheck: false,
27
- iconOnly: true,
28
- subMenuProps: {
29
- calloutProps: {
30
- isBeakVisible: false
31
- },
32
- shouldFocusOnMount: true,
33
- className: insertTableMenuTablePane,
34
- focusZoneProps: {
35
- direction: FocusZoneDirection.bidirectional
36
- },
37
- items: [{
38
- key: 'RichTextToolbarInsertTableMenu',
39
- text: strings.richTextInsertTableMenuTitle,
40
- canCheck: false,
41
- onRender: (item) => {
42
- return React.createElement(RichTextInsertTablePane, { item: item, onClick: key => {
43
- const { row, column } = parseKey(key);
44
- onClick(column, row);
45
- }, maxColumnsNumber: maxColumnsNumber, maxRowsNumber: maxRowsNumber });
46
- }
47
- }]
48
- }
49
- };
50
- };
51
- //# sourceMappingURL=RichTextInsertTableCommandBarItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextInsertTableCommandBarItem.js","sourceRoot":"","sources":["../../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EA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E,GAAG,CAAC,CAAC;4BACvB,CAAC,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,GAAI,CAAC;oBAC1E,CAAC;iBACF,CAAC;SACH;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { FocusZoneDirection } from '@fluentui/react';\nimport type { ICommandBarItemProps, IContextualMenuItem, Theme } from '@fluentui/react';\nimport { insertTableMenuTablePane, toolbarTableButtonStyle } from '../../../styles/RichTextEditor.styles';\nimport { RichTextInsertTablePane } from './RichTextInsertTablePane';\nimport { parseKey } from '../../../utils/RichTextTableUtils';\nimport { RichTextStrings } from '../../RichTextSendBox';\nimport { RichTextToolbarTableIcon } from './RichTextToolbarTableIcon';\n\n/**\n * \"Insert table\" command bar item for the rich text toolbar\n */\nexport const richTextInsertTableCommandBarItem = (theme: Theme, maxRowsNumber: number, maxColumnsNumber: number, strings: Partial<RichTextStrings>, onClick: (column: number, row: number) => void): ICommandBarItemProps => {\n return {\n 'data-testid': 'rich-text-toolbar-insert-table-button',\n key: 'RichTextToolbarInsertTableButton',\n text: strings.richTextInsertTableTooltip,\n ariaLabel: strings.richTextInsertTableTooltip,\n // hide the chevron icon\n menuIconProps: {\n hidden: true\n },\n onRenderIcon: () => {\n return <RichTextToolbarTableIcon />;\n },\n buttonStyles: toolbarTableButtonStyle(theme),\n canCheck: false,\n iconOnly: true,\n subMenuProps: {\n calloutProps: {\n isBeakVisible: false\n },\n shouldFocusOnMount: true,\n className: insertTableMenuTablePane,\n focusZoneProps: {\n direction: FocusZoneDirection.bidirectional\n },\n items: [{\n key: 'RichTextToolbarInsertTableMenu',\n text: strings.richTextInsertTableMenuTitle,\n canCheck: false,\n onRender: (item: IContextualMenuItem) => {\n return <RichTextInsertTablePane item={item} onClick={key => {\n const {\n row,\n column\n } = parseKey(key);\n onClick(column, row);\n }} maxColumnsNumber={maxColumnsNumber} maxRowsNumber={maxRowsNumber} />;\n }\n }]\n }\n };\n};"]}
@@ -1,15 +0,0 @@
1
- /// <reference types="react" />
2
- import type { IContextualMenuItem } from '@fluentui/react';
3
- interface RichTextInsertTablePaneProps {
4
- item: IContextualMenuItem;
5
- onClick: (key: string) => void;
6
- maxRowsNumber: number;
7
- maxColumnsNumber: number;
8
- }
9
- /**
10
- * @private
11
- * Component for the insert table pane
12
- */
13
- export declare const RichTextInsertTablePane: (props: RichTextInsertTablePaneProps) => JSX.Element;
14
- export {};
15
- //# sourceMappingURL=RichTextInsertTablePane.d.ts.map