@azure/communication-react 1.22.0-beta.1 → 1.22.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 (577) hide show
  1. package/dist/communication-react.d.ts +348 -1690
  2. package/dist/dist-cjs/communication-react/index.js +36397 -172
  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/calling-component-bindings/src/baseSelectors.d.ts +5 -13
  15. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -11
  16. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +18 -18
  18. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +6 -6
  19. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -11
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -6
  22. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  23. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -5
  24. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  25. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +1 -19
  26. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +3 -2
  28. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +8 -1
  29. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -3
  31. package/dist/dist-esm/calling-component-bindings/src/index.js +1 -1
  32. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  33. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +5 -34
  34. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  35. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  36. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
  37. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  38. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
  39. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +2 -2
  40. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  41. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
  42. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  43. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -79
  44. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  45. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +0 -15
  46. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +2 -95
  47. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -5
  49. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +4 -27
  50. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  51. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -3
  52. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  53. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
  54. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
  55. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  56. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
  57. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -3
  59. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  60. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
  61. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -35
  62. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  63. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  64. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -3
  65. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  66. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +3 -26
  67. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  68. package/dist/dist-esm/chat-component-bindings/src/utils/compareMessages.js +0 -6
  69. package/dist/dist-esm/chat-component-bindings/src/utils/compareMessages.js.map +1 -1
  70. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  71. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  72. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -15
  73. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  74. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -2
  75. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  76. package/dist/dist-esm/chat-stateful-client/src/index.d.ts +0 -1
  77. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  78. package/dist/dist-esm/communication-react/src/index.d.ts +8 -29
  79. package/dist/dist-esm/communication-react/src/index.js +3 -6
  80. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  81. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +0 -2
  82. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +0 -1
  83. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  84. package/dist/dist-esm/react-components/src/components/Caption.d.ts +2 -2
  85. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +42 -11
  87. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +6 -3
  88. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  89. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +86 -17
  90. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js +17 -6
  91. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js.map +1 -1
  92. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -13
  93. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +3 -9
  94. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  95. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -11
  96. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +2 -32
  97. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  98. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -8
  99. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +5 -9
  100. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  101. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +1 -2
  102. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +4 -4
  103. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  104. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +1 -4
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +6 -31
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +1 -15
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -9
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -23
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +6 -17
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -8
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +6 -10
  115. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  116. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +5 -5
  117. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  118. package/dist/dist-esm/react-components/src/components/ControlBarButton.js +1 -1
  119. package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
  120. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +1 -1
  121. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
  122. package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -2
  123. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  124. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  125. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
  126. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  127. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
  128. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -13
  129. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  130. package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +0 -20
  131. package/dist/dist-esm/react-components/src/components/NotificationStack.js +0 -5
  132. package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
  133. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
  134. package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -12
  135. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +4 -0
  137. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +1 -1
  138. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  139. package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
  140. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  141. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
  142. package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
  143. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  144. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +10 -10
  145. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js +6 -3
  146. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js.map +1 -1
  147. package/dist/dist-esm/react-components/src/components/SystemMessage.js +17 -6
  148. package/dist/dist-esm/react-components/src/components/SystemMessage.js.map +1 -1
  149. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -1
  150. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  151. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -1
  152. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -19
  154. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  155. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -1
  156. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  157. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -20
  158. package/dist/dist-esm/react-components/src/components/index.js +0 -7
  159. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  160. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  161. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  162. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +4 -4
  163. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
  164. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js +4 -2
  165. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js.map +1 -1
  166. package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +0 -13
  167. package/dist/dist-esm/react-components/src/components/styles/Common.style.js +0 -13
  168. package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -1
  169. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
  170. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -8
  171. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  172. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -37
  173. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
  174. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  175. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
  176. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
  177. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  178. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -38
  179. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -131
  180. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  181. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
  182. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  183. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  184. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  185. package/dist/dist-esm/react-components/src/components/utils.d.ts +2 -2
  186. package/dist/dist-esm/react-components/src/components/utils.js +6 -9
  187. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  188. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  189. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
  190. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  191. package/dist/dist-esm/react-components/src/index.d.ts +1 -2
  192. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  193. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +16 -55
  194. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  195. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +128 -2
  196. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +128 -2
  197. package/dist/dist-esm/react-components/src/localization/locales/cy-GB/strings.json +128 -2
  198. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +128 -2
  199. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +128 -2
  200. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +128 -2
  201. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +128 -2
  202. package/dist/dist-esm/react-components/src/localization/locales/es-MX/strings.json +128 -2
  203. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +128 -2
  204. package/dist/dist-esm/react-components/src/localization/locales/fr-CA/strings.json +128 -2
  205. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +128 -2
  206. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +128 -2
  207. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +128 -2
  208. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +128 -2
  209. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +128 -2
  210. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +128 -2
  211. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +128 -2
  212. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +128 -2
  213. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +128 -2
  214. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +128 -2
  215. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +128 -2
  216. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +128 -2
  217. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +128 -2
  218. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +128 -2
  219. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -30
  220. package/dist/dist-esm/react-components/src/theming/icons.js +5 -96
  221. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  222. package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
  223. package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
  224. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  225. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
  226. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  227. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.d.ts +4 -4
  228. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js.map +1 -1
  229. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  230. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +8 -73
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +8 -21
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -34
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -47
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +7 -105
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -24
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -2
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +2 -0
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +5 -11
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +3 -5
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +0 -1
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js +1 -19
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +1 -2
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  263. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -3
  264. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  265. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -3
  266. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +2 -2
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +7 -5
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +5 -40
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -18
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -16
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +2 -1
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +29 -10
  284. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
  285. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +1 -12
  286. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -59
  287. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  288. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -65
  289. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -24
  290. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  291. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -8
  292. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  293. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -22
  294. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -136
  295. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  296. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -28
  297. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  298. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +0 -2
  299. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -9
  300. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
  302. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
  303. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  304. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -11
  305. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +1 -2
  306. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  307. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +0 -5
  308. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +0 -13
  309. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  310. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -27
  311. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
  312. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  313. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
  314. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -189
  315. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  316. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
  317. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  318. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
  319. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -36
  320. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  321. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
  322. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  323. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
  324. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  325. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
  326. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  327. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -4
  328. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -4
  329. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  330. package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js +1 -13
  331. package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js.map +1 -1
  332. package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.d.ts +1 -1
  333. package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js +8 -3
  334. package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js.map +1 -1
  335. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsBanner.d.ts → CallingCaptionsBanner.d.ts} +2 -2
  336. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsBanner.js → CallingCaptionsBanner.js} +8 -11
  337. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -0
  338. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsSettingsModal.d.ts → CallingCaptionsSettingsModal.d.ts} +2 -2
  339. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsSettingsModal.js → CallingCaptionsSettingsModal.js} +6 -9
  340. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsSettingsModal.js.map +1 -0
  341. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js +7 -10
  342. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -1
  343. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +5 -17
  344. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  345. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +5 -9
  346. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  347. package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.js.map +1 -1
  348. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +5 -0
  349. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +12 -14
  350. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  351. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +2 -0
  352. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  353. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.js.map +1 -1
  354. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -2
  355. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  356. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
  357. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
  358. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  359. package/dist/dist-esm/react-composites/src/composites/common/StarSurvey.js.map +1 -1
  360. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js.map +1 -1
  361. package/dist/dist-esm/react-composites/src/composites/common/adapters.d.ts +0 -23
  362. package/dist/dist-esm/react-composites/src/composites/common/adapters.js.map +1 -1
  363. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
  364. package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
  365. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  366. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -32
  367. package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -2
  368. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  369. package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +0 -4
  370. package/dist/dist-esm/react-composites/src/composites/common/utils.js +0 -22
  371. package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
  372. package/dist/dist-esm/react-composites/src/composites/index.d.ts +0 -1
  373. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  374. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +25 -1
  375. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +25 -1
  376. package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/strings.json +25 -1
  377. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +25 -1
  378. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +25 -1
  379. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +25 -1
  380. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +25 -1
  381. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-MX/strings.json +25 -1
  382. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +25 -1
  383. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-CA/strings.json +25 -1
  384. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +25 -1
  385. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +25 -1
  386. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +25 -1
  387. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +25 -1
  388. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +25 -1
  389. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +25 -1
  390. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +25 -1
  391. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +25 -1
  392. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +25 -1
  393. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +25 -1
  394. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +25 -1
  395. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +25 -1
  396. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +25 -1
  397. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +25 -1
  398. package/package.json +5 -5
  399. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CwxvsFHy.js +0 -206
  400. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CwxvsFHy.js.map +0 -1
  401. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DMdQIGV5.js +0 -50
  402. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DMdQIGV5.js.map +0 -1
  403. package/dist/dist-cjs/communication-react/index-D7R-o8dv.js +0 -43117
  404. package/dist/dist-cjs/communication-react/index-D7R-o8dv.js.map +0 -1
  405. package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
  406. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -20
  407. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
  408. package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
  409. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
  410. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
  411. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.d.ts +0 -20
  412. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +0 -118
  413. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +0 -1
  414. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
  415. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
  416. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
  417. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +0 -6
  418. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +0 -20
  419. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +0 -1
  420. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  421. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  422. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  423. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -24
  424. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -196
  425. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
  426. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  427. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -36
  428. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  429. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  430. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -67
  431. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  432. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  433. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -51
  434. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  435. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  436. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -40
  437. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  438. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  439. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -119
  440. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  441. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
  442. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
  443. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
  444. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
  445. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
  446. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
  447. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -12
  448. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -23
  449. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
  450. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
  451. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
  452. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
  453. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
  454. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
  455. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
  456. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
  457. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
  458. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
  459. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
  460. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
  461. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
  462. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -29
  463. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -87
  464. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
  465. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -58
  466. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -332
  467. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
  468. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
  469. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -75
  470. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
  471. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -215
  472. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -168
  473. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
  474. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
  475. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
  476. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
  477. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
  478. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -221
  479. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
  480. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
  481. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
  482. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
  483. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
  484. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
  485. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
  486. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
  487. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
  488. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
  489. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
  490. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
  491. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
  492. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  493. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  494. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  495. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  496. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  497. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  498. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  499. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -819
  500. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  501. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  502. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  503. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  504. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  505. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  506. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  507. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
  508. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -320
  509. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
  510. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
  511. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
  512. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
  513. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  514. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
  515. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  516. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  517. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  518. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  519. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  520. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -69
  521. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  522. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -72
  523. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -177
  524. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
  525. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
  526. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -119
  527. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
  528. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  529. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  530. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  531. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  532. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  533. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  534. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.d.ts +0 -47
  535. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.js +0 -48
  536. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.js.map +0 -1
  537. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.d.ts +0 -11
  538. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js +0 -36
  539. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js.map +0 -1
  540. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -49
  541. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -203
  542. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  543. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.d.ts +0 -7
  544. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.js +0 -14
  545. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.js.map +0 -1
  546. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  547. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -41
  548. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  549. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
  550. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
  551. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
  552. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  553. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  554. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  555. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
  556. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
  557. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
  558. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
  559. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -265
  560. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
  561. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
  562. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
  563. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
  564. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
  565. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
  566. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
  567. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
  568. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
  569. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
  570. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +0 -1
  571. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js.map +0 -1
  572. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.d.ts +0 -12
  573. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.js +0 -52
  574. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.js.map +0 -1
  575. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
  576. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
  577. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
@@ -1,819 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- const MSFT_MENTION_TAG = 'msft-mention';
4
- /**
5
- * Get validated value for index between min and max values. If currentValue is not defined, -1 will be used instead.
6
- *
7
- * @private
8
- * @param props - Props for finding a valid index in range.
9
- * @returns Valid index in the range.
10
- */
11
- export const getValidatedIndexInRange = (props) => {
12
- const { min, max, currentValue } = props;
13
- let updatedValue = currentValue !== null && currentValue !== void 0 ? currentValue : -1;
14
- updatedValue = Math.max(min, updatedValue);
15
- updatedValue = Math.min(updatedValue, max);
16
- return updatedValue;
17
- };
18
- /**
19
- * Find mention tag for selection if exists.
20
- *
21
- * @private
22
- * @param tags - Existing list of tags.
23
- * @param selection - Selection index.
24
- * @returns Mention tag if exists, otherwise undefined.
25
- */
26
- export const findMentionTagForSelection = (tags, selection) => {
27
- let mentionTag = undefined;
28
- tags.every(tag => {
29
- const closingTagInfo = getTagClosingTagInfo(tag);
30
- if (tag.plainTextBeginIndex !== undefined && tag.plainTextBeginIndex > selection) {
31
- // no need to check further as the selection is before the tag
32
- return false;
33
- }
34
- else if (tag.plainTextBeginIndex !== undefined && tag.plainTextBeginIndex <= selection && selection <= closingTagInfo.plainTextEndIndex) {
35
- // no need to check if tag doesn't contain selection
36
- if (tag.subTags !== undefined && tag.subTags.length !== 0) {
37
- const selectedTag = findMentionTagForSelection(tag.subTags, selection);
38
- if (selectedTag !== undefined) {
39
- mentionTag = selectedTag;
40
- return false;
41
- }
42
- }
43
- else if (tag.tagType === MSFT_MENTION_TAG) {
44
- mentionTag = tag;
45
- return false;
46
- }
47
- }
48
- return true;
49
- });
50
- return mentionTag;
51
- };
52
- /**
53
- * Find a new the selection index.
54
- *
55
- * @private
56
- * @param props - Props for finding new selection index for mention.
57
- * @returns New selection index if it is inside of a mention tag, otherwise the current selection.
58
- */
59
- export const findNewSelectionIndexForMention = (props) => {
60
- var _a;
61
- const { tag, textValue, currentSelectionIndex, previousSelectionIndex } = props;
62
- // check if this is a mention tag and selection should be updated
63
- if (tag.tagType !== MSFT_MENTION_TAG || tag.plainTextBeginIndex === undefined || currentSelectionIndex === previousSelectionIndex || tag.plainTextEndIndex === undefined) {
64
- return currentSelectionIndex;
65
- }
66
- let spaceIndex = 0;
67
- if (currentSelectionIndex <= previousSelectionIndex) {
68
- // the cursor is moved to the left, find the last index before the cursor
69
- spaceIndex = textValue.lastIndexOf(' ', currentSelectionIndex !== null && currentSelectionIndex !== void 0 ? currentSelectionIndex : 0);
70
- if (spaceIndex === -1) {
71
- // no space before the selection, use the beginning of the tag
72
- spaceIndex = tag.plainTextBeginIndex;
73
- }
74
- }
75
- else {
76
- // the cursor is moved to the right, find the fist index after the cursor
77
- spaceIndex = textValue.indexOf(' ', currentSelectionIndex !== null && currentSelectionIndex !== void 0 ? currentSelectionIndex : 0);
78
- if (spaceIndex === -1) {
79
- // no space after the selection, use the end of the tag
80
- spaceIndex = (_a = tag.plainTextEndIndex) !== null && _a !== void 0 ? _a : tag.plainTextBeginIndex;
81
- }
82
- }
83
- spaceIndex = getValidatedIndexInRange({
84
- min: tag.plainTextBeginIndex,
85
- max: tag.plainTextEndIndex,
86
- currentValue: spaceIndex
87
- });
88
- return spaceIndex;
89
- };
90
- /**
91
- * Handle mention tag edit and by word deleting
92
- *
93
- * @private
94
- * @param props - Props for mention update HTML function.
95
- * @returns Updated texts and indexes.
96
- */
97
- const handleMentionTagUpdate = (props) => {
98
- const { htmlText, oldPlainText, change, tag, closeTagIdx, closeTagLength, plainTextEndIndex, startIndex, oldPlainTextEndIndex, mentionTagLength } = props;
99
- let processedChange = props.processedChange;
100
- let lastProcessedHTMLIndex = props.lastProcessedHTMLIndex;
101
- if (tag.tagType !== MSFT_MENTION_TAG || tag.plainTextBeginIndex === undefined) {
102
- // not a mention tag
103
- return {
104
- result: '',
105
- updatedChange: processedChange,
106
- htmlIndex: lastProcessedHTMLIndex,
107
- plainTextSelectionEndIndex: undefined
108
- };
109
- }
110
- let result = '';
111
- let plainTextSelectionEndIndex;
112
- let rangeStart;
113
- let rangeEnd;
114
- // check if space symbol is handled in case if string looks like '<1 2 3>'
115
- let isSpaceLengthHandled = false;
116
- rangeStart = oldPlainText.lastIndexOf(' ', startIndex);
117
- if (rangeStart !== -1 && rangeStart !== undefined && rangeStart > tag.plainTextBeginIndex) {
118
- isSpaceLengthHandled = true;
119
- }
120
- rangeEnd = oldPlainText.indexOf(' ', oldPlainTextEndIndex);
121
- if (rangeEnd === -1 || rangeEnd === undefined) {
122
- // check if space symbol is not found
123
- rangeEnd = plainTextEndIndex;
124
- }
125
- else if (!isSpaceLengthHandled) {
126
- // +1 to include the space symbol
127
- rangeEnd += 1;
128
- }
129
- isSpaceLengthHandled = true;
130
- if (rangeStart === -1 || rangeStart === undefined || rangeStart < tag.plainTextBeginIndex) {
131
- // rangeStart should be at least equal to tag.plainTextBeginIndex
132
- rangeStart = tag.plainTextBeginIndex;
133
- }
134
- if (rangeEnd > plainTextEndIndex) {
135
- // rangeEnd should be at most equal to plainTextEndIndex
136
- rangeEnd = plainTextEndIndex;
137
- }
138
- if (rangeStart === tag.plainTextBeginIndex && rangeEnd === plainTextEndIndex) {
139
- // the whole tag should be removed
140
- result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIndex) + processedChange;
141
- plainTextSelectionEndIndex = tag.plainTextBeginIndex + change.length;
142
- processedChange = '';
143
- lastProcessedHTMLIndex = closeTagIdx + closeTagLength;
144
- }
145
- else {
146
- // only part of the tag should be removed
147
- let startChangeDiff = 0;
148
- let endChangeDiff = 0;
149
- // need to check only rangeStart > tag.plainTextBeginIndex as when rangeStart === tag.plainTextBeginIndex startChangeDiff = 0 and mentionTagLength shouldn't be subtracted
150
- if (rangeStart > tag.plainTextBeginIndex) {
151
- startChangeDiff = rangeStart - tag.plainTextBeginIndex - mentionTagLength;
152
- }
153
- endChangeDiff = rangeEnd - tag.plainTextBeginIndex - mentionTagLength;
154
- result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIndex + tag.openTagBody.length + startChangeDiff);
155
- if (startIndex < tag.plainTextBeginIndex) {
156
- // if the change is before the tag, the selection should start from startIndex (rangeStart will be equal to tag.plainTextBeginIndex)
157
- plainTextSelectionEndIndex = startIndex + change.length;
158
- }
159
- else {
160
- // if the change is inside the tag, the selection should start with rangeStart
161
- plainTextSelectionEndIndex = rangeStart + change.length;
162
- }
163
- lastProcessedHTMLIndex = tag.openTagIndex + tag.openTagBody.length + endChangeDiff;
164
- // processed change should not be changed as it should be added after the tag
165
- }
166
- return {
167
- result,
168
- updatedChange: processedChange,
169
- htmlIndex: lastProcessedHTMLIndex,
170
- plainTextSelectionEndIndex
171
- };
172
- };
173
- /**
174
- * Get closing tag information if exists otherwise return information as for self closing tag
175
- *
176
- * @private
177
- * @param tag - Tag data.
178
- * @returns Closing tag information for the provided tag.
179
- */
180
- const getTagClosingTagInfo = (tag) => {
181
- let plainTextEndIndex = 0;
182
- let closeTagIdx = 0;
183
- let closeTagLength = 0;
184
- if (tag.plainTextEndIndex !== undefined && tag.closingTagIndex !== undefined) {
185
- // close tag exists
186
- plainTextEndIndex = tag.plainTextEndIndex;
187
- closeTagIdx = tag.closingTagIndex;
188
- // tag.tagType.length + </>
189
- closeTagLength = tag.tagType.length + 3;
190
- }
191
- else if (tag.plainTextBeginIndex !== undefined) {
192
- // no close tag
193
- plainTextEndIndex = tag.plainTextBeginIndex;
194
- closeTagIdx = tag.openTagIndex + tag.openTagBody.length;
195
- closeTagLength = 0;
196
- }
197
- return {
198
- plainTextEndIndex,
199
- closeTagIdx,
200
- closeTagLength
201
- };
202
- };
203
- /**
204
- * Go through the text and update it with the changed text
205
- *
206
- * @private
207
- * @param props - Props for update HTML function.
208
- * @returns Updated HTML and selection index if the selection index should be set.
209
- */
210
- export const updateHTML = (props) => {
211
- const { htmlText, oldPlainText, tags, startIndex, oldPlainTextEndIndex, change, mentionTrigger } = props;
212
- if (tags.length === 0 || startIndex === 0 && oldPlainTextEndIndex === oldPlainText.length - 1) {
213
- // no tags added yet or the whole text is changed
214
- const changeWithSkippedChars = escapeHTMLChars(change);
215
- const updatedHTML = escapeHTMLChars(oldPlainText.substring(0, startIndex)) + changeWithSkippedChars + escapeHTMLChars(oldPlainText.substring(oldPlainTextEndIndex));
216
- return {
217
- updatedHTML,
218
- updatedSelectionIndex: undefined
219
- };
220
- }
221
- let result = '';
222
- let lastProcessedHTMLIndex = 0;
223
- // the value can be updated with empty string when the change covers more than 1 place (tag + before or after the tag)
224
- // in this case change won't be added as part of the tag
225
- // e.g.: change is before and partially in tag => change will be added before the tag and outdated text in the tag will be removed
226
- // e.g.: change is after and partially in tag => change will be added after the tag and outdated text in the tag will be removed
227
- // e.g.: change is on the beginning of the tag => change will be added before the tag
228
- // e.g.: change is on the end of the tag => change will be added to the tag if it's not mention and after the tag if it's mention
229
- let processedChange = escapeHTMLChars(change);
230
- // end tag plain text index of the last processed tag
231
- let lastProcessedPlainTextTagEndIndex = 0;
232
- // as some tags/text can be removed fully, selection should be updated correctly
233
- let changeNewEndIndex;
234
- for (let i = 0; i < tags.length; i++) {
235
- const tag = tags[i];
236
- if ((tag === null || tag === void 0 ? void 0 : tag.plainTextBeginIndex) === undefined) {
237
- continue;
238
- }
239
- // all plain text indexes includes trigger length for the mention that shouldn't be included in
240
- // htmlText.substring because html strings don't include the trigger
241
- // mentionTagLength will be set only for mention tag, otherwise should be 0
242
- let mentionTagLength = 0;
243
- let isMentionTag = false;
244
- if (tag.tagType === MSFT_MENTION_TAG) {
245
- mentionTagLength = mentionTrigger.length;
246
- isMentionTag = true;
247
- }
248
- if (startIndex <= tag.plainTextBeginIndex) {
249
- // change start is before the open tag
250
- // Math.max(lastProcessedPlainTextTagEndIndex, startIndex) is used as startIndex may not be in [[previous tag].plainTextEndIndex - tag.plainTextBeginIndex] range
251
- const startChangeDiff = getChangeDiff(oldPlainText, Math.max(lastProcessedPlainTextTagEndIndex, startIndex), tag.plainTextBeginIndex);
252
- result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIndex - startChangeDiff) + processedChange;
253
- processedChange = '';
254
- if (oldPlainTextEndIndex <= tag.plainTextBeginIndex) {
255
- // the whole change is before tag start
256
- // mentionTag length can be ignored here as the change is before the tag
257
- const endChangeDiff = getChangeDiff(oldPlainText, oldPlainTextEndIndex, tag.plainTextBeginIndex);
258
- lastProcessedHTMLIndex = tag.openTagIndex - endChangeDiff;
259
- // the change is handled; exit
260
- break;
261
- }
262
- else {
263
- // change continues in the tag
264
- lastProcessedHTMLIndex = tag.openTagIndex;
265
- // proceed to the next check
266
- }
267
- }
268
- const closingTagInfo = getTagClosingTagInfo(tag);
269
- if (startIndex <= closingTagInfo.plainTextEndIndex) {
270
- // change started before the end tag
271
- if (startIndex <= tag.plainTextBeginIndex && oldPlainTextEndIndex === closingTagInfo.plainTextEndIndex) {
272
- // the change is a tag or starts before the tag
273
- // tag should be removed, no matter if there are sub-tags
274
- result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIndex) + processedChange;
275
- processedChange = '';
276
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength;
277
- // the change is handled; exit
278
- break;
279
- }
280
- else if (startIndex >= tag.plainTextBeginIndex && oldPlainTextEndIndex <= closingTagInfo.plainTextEndIndex) {
281
- // the change is between the tag
282
- if (isMentionTag) {
283
- if (change !== '') {
284
- // case for startIndex === tag.plainTextBeginIndex and closingTagInfo.plainTextEndIndex === startIndex
285
- // is handled in startIndex <= tag.plainTextBeginIndex condition check
286
- // the change will be added at the beginning before the mention tag
287
- if (startIndex === closingTagInfo.plainTextEndIndex) {
288
- // non empty change at the end of the mention tag to be added after the mention tag
289
- result += htmlText.substring(lastProcessedHTMLIndex, closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength) + processedChange;
290
- changeNewEndIndex = closingTagInfo.plainTextEndIndex + unEscapeHtmlCharacters(processedChange).length;
291
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength;
292
- processedChange = '';
293
- // the change is handled; exit
294
- break;
295
- }
296
- else if (startIndex > tag.plainTextBeginIndex && oldPlainTextEndIndex < closingTagInfo.plainTextEndIndex && startIndex === oldPlainTextEndIndex) {
297
- // mention tag should be deleted when user tries to edit it in the middle
298
- result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIndex) + processedChange;
299
- changeNewEndIndex = tag.plainTextBeginIndex + unEscapeHtmlCharacters(processedChange).length;
300
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength;
301
- processedChange = '';
302
- // the change is handled; exit
303
- break;
304
- }
305
- else {
306
- // the selection for more that 1 symbol when 1 of the ends is included
307
- const updateMentionTagResult = handleMentionTagUpdate({
308
- htmlText,
309
- oldPlainText,
310
- lastProcessedHTMLIndex,
311
- processedChange,
312
- change,
313
- tag,
314
- closeTagIdx: closingTagInfo.closeTagIdx,
315
- closeTagLength: closingTagInfo.closeTagLength,
316
- plainTextEndIndex: closingTagInfo.plainTextEndIndex,
317
- startIndex,
318
- oldPlainTextEndIndex,
319
- mentionTagLength
320
- });
321
- result += updateMentionTagResult.result;
322
- changeNewEndIndex = updateMentionTagResult.plainTextSelectionEndIndex;
323
- processedChange = updateMentionTagResult.updatedChange;
324
- lastProcessedHTMLIndex = updateMentionTagResult.htmlIndex;
325
- // proceed with the next calculations
326
- }
327
- }
328
- else {
329
- // When change is empty, it means that this change is a deletion
330
- const updateMentionTagResult = handleMentionTagUpdate({
331
- htmlText,
332
- oldPlainText,
333
- lastProcessedHTMLIndex,
334
- processedChange,
335
- change,
336
- tag,
337
- closeTagIdx: closingTagInfo.closeTagIdx,
338
- closeTagLength: closingTagInfo.closeTagLength,
339
- plainTextEndIndex: closingTagInfo.plainTextEndIndex,
340
- startIndex,
341
- oldPlainTextEndIndex,
342
- mentionTagLength
343
- });
344
- result += updateMentionTagResult.result;
345
- changeNewEndIndex = updateMentionTagResult.plainTextSelectionEndIndex;
346
- processedChange = updateMentionTagResult.updatedChange;
347
- lastProcessedHTMLIndex = updateMentionTagResult.htmlIndex;
348
- // the change is handled; exit
349
- break;
350
- }
351
- }
352
- else if (tag.subTags !== undefined && tag.subTags.length !== 0 && tag.content !== undefined) {
353
- // with subtags
354
- const stringBefore = htmlText.substring(lastProcessedHTMLIndex, tag.openTagIndex + tag.openTagBody.length);
355
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx;
356
- const updatedContent = updateHTML({
357
- htmlText: tag.content,
358
- oldPlainText,
359
- tags: tag.subTags,
360
- startIndex,
361
- oldPlainTextEndIndex,
362
- change: processedChange,
363
- mentionTrigger
364
- });
365
- result += stringBefore + updatedContent.updatedHTML;
366
- changeNewEndIndex = updatedContent.updatedSelectionIndex;
367
- // the change is handled; exit
368
- break;
369
- }
370
- else {
371
- // no subtags
372
- const startChangeDiff = getChangeDiff(oldPlainText, tag.plainTextBeginIndex, startIndex);
373
- result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIndex + tag.openTagBody.length + startChangeDiff) + processedChange;
374
- processedChange = '';
375
- if (oldPlainTextEndIndex < closingTagInfo.plainTextEndIndex) {
376
- const endChangeDiff = getChangeDiff(oldPlainText, tag.plainTextBeginIndex, oldPlainTextEndIndex);
377
- lastProcessedHTMLIndex = tag.openTagIndex + tag.openTagBody.length + endChangeDiff;
378
- }
379
- else if (oldPlainTextEndIndex === closingTagInfo.plainTextEndIndex) {
380
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx;
381
- }
382
- // the change is handled; exit
383
- break;
384
- }
385
- }
386
- else if (startIndex > tag.plainTextBeginIndex && oldPlainTextEndIndex > closingTagInfo.plainTextEndIndex) {
387
- // the change started in the tag but finishes somewhere further
388
- if (isMentionTag) {
389
- if (startIndex === closingTagInfo.plainTextEndIndex) {
390
- // the change should be handled out of mention tag
391
- // as startIndex === closingTagInfo.plainTextEndIndex and oldPlainTextEndIndex > closingTagInfo.plainTextEndIndex
392
- result += htmlText.substring(lastProcessedHTMLIndex, closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength);
393
- // no need to handle plainTextSelectionEndIndex as the change will be added later
394
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength;
395
- }
396
- else {
397
- // part of the mention tag was changed/deleted
398
- const updateMentionTagResult = handleMentionTagUpdate({
399
- htmlText,
400
- oldPlainText,
401
- lastProcessedHTMLIndex,
402
- processedChange: '',
403
- change,
404
- tag,
405
- closeTagIdx: closingTagInfo.closeTagIdx,
406
- closeTagLength: closingTagInfo.closeTagLength,
407
- plainTextEndIndex: closingTagInfo.plainTextEndIndex,
408
- startIndex,
409
- oldPlainTextEndIndex,
410
- mentionTagLength
411
- });
412
- result += updateMentionTagResult.result;
413
- lastProcessedHTMLIndex = updateMentionTagResult.htmlIndex;
414
- // no need to handle plainTextSelectionEndIndex as the change will be added later
415
- }
416
- }
417
- else if (tag.subTags !== undefined && tag.subTags.length !== 0 && tag.content !== undefined) {
418
- // with subtags
419
- const stringBefore = htmlText.substring(lastProcessedHTMLIndex, tag.openTagIndex + tag.openTagBody.length);
420
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx;
421
- const updatedContent = updateHTML({
422
- htmlText: tag.content,
423
- oldPlainText,
424
- tags: tag.subTags,
425
- startIndex,
426
- oldPlainTextEndIndex,
427
- change: '',
428
- // the part of the tag should be just deleted without processedChange update and change will be added after this tag
429
- mentionTrigger
430
- });
431
- result += stringBefore + updatedContent.updatedHTML;
432
- }
433
- else {
434
- // no subtags
435
- const startChangeDiff = startIndex - tag.plainTextBeginIndex - mentionTagLength;
436
- result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIndex + tag.openTagBody.length + startChangeDiff);
437
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx;
438
- }
439
- // proceed with the next calculations
440
- }
441
- else if (startIndex < tag.plainTextBeginIndex && oldPlainTextEndIndex > closingTagInfo.plainTextEndIndex) {
442
- // the change starts before the tag and finishes after it
443
- // tag should be removed, no matter if there are subtags
444
- // no need to save anything between lastProcessedHTMLIndex and closeTagIdx + closeTagLength
445
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength;
446
- // proceed with the next calculations
447
- }
448
- else if (startIndex === tag.plainTextBeginIndex && oldPlainTextEndIndex > closingTagInfo.plainTextEndIndex) {
449
- // the change starts in the tag and finishes after it
450
- // tag should be removed, no matter if there are subtags
451
- result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIndex);
452
- // processedChange shouldn't be updated as it will be added after the tag
453
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength;
454
- // proceed with the next calculations
455
- }
456
- else if (startIndex < tag.plainTextBeginIndex && oldPlainTextEndIndex < closingTagInfo.plainTextEndIndex) {
457
- // the change starts before the tag and ends in a tag
458
- if (isMentionTag) {
459
- // mention tag
460
- const updateMentionTagResult = handleMentionTagUpdate({
461
- htmlText,
462
- oldPlainText,
463
- lastProcessedHTMLIndex,
464
- processedChange: '',
465
- // the part of mention should be just deleted without processedChange update
466
- change,
467
- tag,
468
- closeTagIdx: closingTagInfo.closeTagIdx,
469
- closeTagLength: closingTagInfo.closeTagLength,
470
- plainTextEndIndex: closingTagInfo.plainTextEndIndex,
471
- startIndex,
472
- oldPlainTextEndIndex,
473
- mentionTagLength
474
- });
475
- changeNewEndIndex = updateMentionTagResult.plainTextSelectionEndIndex;
476
- result += updateMentionTagResult.result;
477
- lastProcessedHTMLIndex = updateMentionTagResult.htmlIndex;
478
- }
479
- else if (tag.subTags !== undefined && tag.subTags.length !== 0 && tag.content !== undefined) {
480
- // with subtags
481
- const stringBefore = htmlText.substring(lastProcessedHTMLIndex, tag.openTagIndex + tag.openTagBody.length);
482
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx;
483
- const updatedContent = updateHTML({
484
- htmlText: tag.content,
485
- oldPlainText,
486
- tags: tag.subTags,
487
- startIndex,
488
- oldPlainTextEndIndex,
489
- change: processedChange,
490
- // processedChange should be equal '' and the part of the tag should be deleted as the change was handled before this tag
491
- mentionTrigger
492
- });
493
- processedChange = '';
494
- result += stringBefore + updatedContent.updatedHTML;
495
- }
496
- else {
497
- // no subtags
498
- result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIndex + tag.openTagBody.length) + processedChange;
499
- processedChange = '';
500
- // oldPlainTextEndIndex already includes mentionTag length
501
- const endChangeDiff = getChangeDiff(oldPlainText, oldPlainTextEndIndex, closingTagInfo.plainTextEndIndex);
502
- // as change may be before the end of the tag, we need to add the rest of the tag
503
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx - endChangeDiff;
504
- }
505
- // the change is handled; exit
506
- break;
507
- }
508
- lastProcessedPlainTextTagEndIndex = closingTagInfo.plainTextEndIndex;
509
- }
510
- if (i === tags.length - 1 && oldPlainTextEndIndex >= closingTagInfo.plainTextEndIndex) {
511
- // the last tag should handle the end of the change if needed
512
- // oldPlainTextEndIndex already includes mentionTag length
513
- const endChangeDiff = getChangeDiff(oldPlainText, closingTagInfo.plainTextEndIndex, oldPlainTextEndIndex);
514
- if (startIndex >= closingTagInfo.plainTextEndIndex) {
515
- const startChangeDiff = getChangeDiff(oldPlainText, closingTagInfo.plainTextEndIndex, startIndex);
516
- result += htmlText.substring(lastProcessedHTMLIndex, closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength + startChangeDiff) + processedChange;
517
- }
518
- else {
519
- result += htmlText.substring(lastProcessedHTMLIndex, closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength) + processedChange;
520
- }
521
- processedChange = '';
522
- lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength + endChangeDiff;
523
- // the change is handled; exit
524
- // break is not required here as this is the last element but added for consistency
525
- break;
526
- }
527
- }
528
- if (lastProcessedHTMLIndex < htmlText.length) {
529
- // add the rest of the html string
530
- result += htmlText.substring(lastProcessedHTMLIndex);
531
- }
532
- return {
533
- updatedHTML: result,
534
- updatedSelectionIndex: changeNewEndIndex
535
- };
536
- };
537
- /**
538
- * Given the oldText and newText, find the start index, old end index and new end index for the changes
539
- *
540
- * @private
541
- * @param props - Props for finding stings diff indexes function.
542
- * @returns Indexes for change start and ends in new and old texts. The old and new end indexes are exclusive.
543
- */
544
- export const findStringsDiffIndexes = (props) => {
545
- const { oldText, newText, previousSelectionStart, previousSelectionEnd, currentSelectionStart, currentSelectionEnd } = props;
546
- const newTextLength = newText.length;
547
- const oldTextLength = oldText.length;
548
- // let changeStart = 0;
549
- let newChangeEnd = newTextLength;
550
- let oldChangeEnd = oldTextLength;
551
- const previousSelectionStartValue = previousSelectionStart > -1 ? previousSelectionStart : oldTextLength;
552
- const previousSelectionEndValue = previousSelectionEnd > -1 ? previousSelectionEnd : oldTextLength;
553
- const currentSelectionStartValue = currentSelectionStart > -1 ? currentSelectionStart : newTextLength;
554
- const currentSelectionEndValue = currentSelectionEnd > -1 ? currentSelectionEnd : newTextLength;
555
- const changeStart = Math.min(previousSelectionStartValue, previousSelectionEndValue, currentSelectionStartValue, currentSelectionEndValue, newTextLength, oldTextLength);
556
- if (oldTextLength < newTextLength) {
557
- //insert or replacement
558
- if (oldTextLength === changeStart) {
559
- // when change was at the end of string
560
- // change is found
561
- newChangeEnd = newTextLength;
562
- oldChangeEnd = oldTextLength;
563
- }
564
- else {
565
- for (let i = 0; i < newTextLength && oldTextLength - i >= changeStart; i++) {
566
- newChangeEnd = newTextLength - i - 1;
567
- oldChangeEnd = oldTextLength - i - 1;
568
- if (newText[newChangeEnd] !== oldText[oldChangeEnd]) {
569
- // change is found
570
- break;
571
- }
572
- }
573
- // make indexes exclusive
574
- newChangeEnd += 1;
575
- oldChangeEnd += 1;
576
- }
577
- }
578
- else if (oldTextLength > newTextLength) {
579
- //deletion or replacement
580
- if (newTextLength === changeStart) {
581
- // when change was at the end of string
582
- // change is found
583
- newChangeEnd = newTextLength;
584
- oldChangeEnd = oldTextLength;
585
- }
586
- else {
587
- for (let i = 0; i < oldTextLength && newTextLength - i >= changeStart; i++) {
588
- newChangeEnd = newTextLength - i - 1;
589
- oldChangeEnd = oldTextLength - i - 1;
590
- if (newText[newChangeEnd] !== oldText[oldChangeEnd]) {
591
- // change is found
592
- break;
593
- }
594
- }
595
- // make indexes exclusive
596
- newChangeEnd += 1;
597
- oldChangeEnd += 1;
598
- }
599
- }
600
- else {
601
- // replacement
602
- for (let i = 0; i < oldTextLength && oldTextLength - i >= changeStart; i++) {
603
- newChangeEnd = newTextLength - i - 1;
604
- oldChangeEnd = oldTextLength - i - 1;
605
- if (newText[newChangeEnd] !== oldText[oldChangeEnd]) {
606
- // change is found
607
- break;
608
- }
609
- }
610
- // make indexes exclusive if they aren't equal to the length of the string
611
- if (newChangeEnd !== newText.length) {
612
- newChangeEnd += 1;
613
- }
614
- if (oldChangeEnd !== oldText.length) {
615
- oldChangeEnd += 1;
616
- }
617
- }
618
- return {
619
- changeStart,
620
- oldChangeEnd,
621
- newChangeEnd
622
- };
623
- };
624
- /**
625
- * Get the html string for the mention suggestion.
626
- *
627
- * @private
628
- * @param suggestion - The mention suggestion.
629
- * @param localeStrings - The locale strings.
630
- * @returns The html string for the mention suggestion.
631
- */
632
- export const htmlStringForMentionSuggestion = (suggestion, localeStrings) => {
633
- const idHTML = ' id="' + suggestion.id + '"';
634
- const displayText = getDisplayNameForMentionSuggestion(suggestion, localeStrings);
635
- return '<' + MSFT_MENTION_TAG + idHTML + '>' + displayText + '</' + MSFT_MENTION_TAG + '>';
636
- };
637
- /**
638
- * Get display name for the mention suggestion.
639
- *
640
- * @private
641
- *
642
- * @param suggestion - The mention suggestion.
643
- * @param localeStrings - The locale strings.
644
- * @returns The display name for the mention suggestion or display name placeholder if display name is empty.
645
- */
646
- export const getDisplayNameForMentionSuggestion = (suggestion, localeStrings) => {
647
- const displayNamePlaceholder = localeStrings.participantItem.displayNamePlaceholder;
648
- return suggestion.displayText !== '' ? suggestion.displayText : displayNamePlaceholder !== null && displayNamePlaceholder !== void 0 ? displayNamePlaceholder : '';
649
- };
650
- /**
651
- * Parse the text and return the tags and the plain text in one go
652
- * @private
653
- * @param text - The text to parse for HTML tags
654
- * @param trigger The trigger to show for the mention tag in plain text
655
- *
656
- * @returns An array of tags and the plain text representation
657
- */
658
- export const textToTagParser = (text, trigger) => {
659
- var _a, _b, _c;
660
- const tags = []; // Tags passed back to the caller
661
- const tagParseStack = []; // Local stack to use while parsing
662
- let plainTextRepresentation = '';
663
- let parseIndex = 0;
664
- while (parseIndex < text.length) {
665
- const foundHtmlTag = findNextHtmlTag(text, parseIndex);
666
- if (!foundHtmlTag) {
667
- if (parseIndex !== 0) {
668
- // Add the remaining text to the plain text representation
669
- const newText = text.substring(parseIndex);
670
- plainTextRepresentation += unEscapeHtmlCharacters(newText);
671
- }
672
- else {
673
- plainTextRepresentation = unEscapeHtmlCharacters(text);
674
- }
675
- break;
676
- }
677
- if (foundHtmlTag.type === 'open' || foundHtmlTag.type === 'self-closing') {
678
- const nextTag = parseOpenTag(foundHtmlTag.content, foundHtmlTag.startIdx);
679
- // Add the plain text between the last tag and this one found
680
- plainTextRepresentation += unEscapeHtmlCharacters(text.substring(parseIndex, foundHtmlTag.startIdx));
681
- nextTag.plainTextBeginIndex = plainTextRepresentation.length;
682
- if (foundHtmlTag.type === 'open') {
683
- tagParseStack.push(nextTag);
684
- }
685
- else {
686
- nextTag.content = '';
687
- nextTag.plainTextBeginIndex = plainTextRepresentation.length;
688
- nextTag.plainTextEndIndex = plainTextRepresentation.length;
689
- addTag(nextTag, tagParseStack, tags);
690
- }
691
- }
692
- if (foundHtmlTag.type === 'close') {
693
- const currentOpenTag = tagParseStack.pop();
694
- const closeTagType = foundHtmlTag.content.substring(2, foundHtmlTag.content.length - 1).toLowerCase();
695
- if (currentOpenTag && currentOpenTag.tagType === closeTagType) {
696
- // Tag startIdx is absolute to the text. This is updated later to be relative to the parent tag
697
- currentOpenTag.content = text.substring(currentOpenTag.openTagIndex + currentOpenTag.openTagBody.length, foundHtmlTag.startIdx);
698
- // Insert the plain text pieces for the sub tags
699
- if (currentOpenTag.tagType === MSFT_MENTION_TAG) {
700
- plainTextRepresentation = plainTextRepresentation.slice(0, currentOpenTag.plainTextBeginIndex) + trigger + plainTextRepresentation.slice(currentOpenTag.plainTextBeginIndex);
701
- }
702
- const lastSubTag = (_a = currentOpenTag.subTags) === null || _a === void 0 ? void 0 : _a[currentOpenTag.subTags.length - 1];
703
- if (!currentOpenTag.subTags) {
704
- plainTextRepresentation += unEscapeHtmlCharacters(currentOpenTag.content);
705
- }
706
- else if (lastSubTag) {
707
- // Add text after the last tag
708
- const startOfRemainingText = ((_b = lastSubTag === null || lastSubTag === void 0 ? void 0 : lastSubTag.closingTagIndex) !== null && _b !== void 0 ? _b : lastSubTag.openTagIndex) + lastSubTag.tagType.length + 3;
709
- const trailingText = currentOpenTag.content.substring(startOfRemainingText);
710
- plainTextRepresentation += unEscapeHtmlCharacters(trailingText);
711
- }
712
- currentOpenTag.plainTextEndIndex = plainTextRepresentation.length;
713
- addTag(currentOpenTag, tagParseStack, tags);
714
- }
715
- else {
716
- throw new Error('Unexpected close tag found. Got "' + closeTagType + '" but expected "' + ((_c = tagParseStack[tagParseStack.length - 1]) === null || _c === void 0 ? void 0 : _c.tagType) + '"');
717
- }
718
- }
719
- // Update parsing index; move past the end of the close tag
720
- parseIndex = foundHtmlTag.startIdx + foundHtmlTag.content.length;
721
- } // While parseIndex < text.length loop
722
- return {
723
- tags,
724
- plainText: plainTextRepresentation
725
- };
726
- };
727
- const parseOpenTag = (tag, startIdx) => {
728
- var _a;
729
- let tagType = tag.substring(1, tag.length - 1);
730
- tagType = (_a = tagType.split(' ')[0]) !== null && _a !== void 0 ? _a : tagType;
731
- tagType = tagType.toLowerCase().replace('/', '');
732
- return {
733
- tagType,
734
- openTagIndex: startIdx,
735
- openTagBody: tag
736
- };
737
- };
738
- const findNextHtmlTag = (text, startIndex) => {
739
- const tagStartIndex = text.indexOf('<', startIndex);
740
- if (tagStartIndex === -1) {
741
- // No more tags
742
- return undefined;
743
- }
744
- const tagEndIndex = text.indexOf('>', tagStartIndex);
745
- if (tagEndIndex === -1) {
746
- // No close tag
747
- return undefined;
748
- }
749
- const tag = text.substring(tagStartIndex, tagEndIndex + 1);
750
- let type = 'open';
751
- if (tag[1] === '/') {
752
- type = 'close';
753
- }
754
- else if (tag[tag.length - 2] === '/') {
755
- type = 'self-closing';
756
- }
757
- return {
758
- content: tag,
759
- startIdx: tagStartIndex,
760
- type
761
- };
762
- };
763
- const addTag = (tag, parseStack, tags) => {
764
- var _a;
765
- // Add as sub-tag to the parent stack tag, if there is one
766
- const parentTag = parseStack[parseStack.length - 1];
767
- if (parentTag) {
768
- // Adjust the open tag index to be relative to the parent tag
769
- const parentContentStartIdx = parentTag.openTagIndex + parentTag.openTagBody.length;
770
- const relativeIdx = tag.openTagIndex - parentContentStartIdx;
771
- tag.openTagIndex = relativeIdx;
772
- }
773
- if (!tag.closingTagIndex) {
774
- // If the tag is self-closing, the close tag is the same as the open tag
775
- if (tag.openTagBody[tag.openTagBody.length - 2] === '/') {
776
- tag.closingTagIndex = tag.openTagIndex;
777
- }
778
- else {
779
- // Otherwise, the close tag index is the open tag index + the open tag body + the content length
780
- tag.closingTagIndex = tag.openTagIndex + tag.openTagBody.length + ((_a = tag.content) !== null && _a !== void 0 ? _a : []).length;
781
- }
782
- }
783
- // Put the tag where it belongs
784
- if (!parentTag) {
785
- tags.push(tag);
786
- }
787
- else {
788
- if (!parentTag.subTags) {
789
- parentTag.subTags = [tag];
790
- }
791
- else {
792
- parentTag.subTags.push(tag);
793
- }
794
- }
795
- };
796
- // We should revisit this in the future when we support other text such as rich text editing.
797
- const escapeHTMLChars = (text) => {
798
- const mentionRegex = new RegExp(`<${MSFT_MENTION_TAG}(.*?)>(.*?)</${MSFT_MENTION_TAG}>`, 'i');
799
- if (!text.match(mentionRegex)) {
800
- return text.replace(/&(?![A-Z]+;)/gi, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
801
- }
802
- return text;
803
- };
804
- const getChangeDiff = (plainText, startIndex, endIndex) => {
805
- return endIndex - startIndex + getLengthDiffForEscapedHtmlChars(plainText, startIndex, endIndex);
806
- };
807
- const getLengthDiffForEscapedHtmlChars = (text, startIndex, endIndex) => {
808
- var _a, _b;
809
- const subText = text.substring(startIndex, endIndex);
810
- const escapedAngleBracketCount = ((_a = subText.match(/(<)|(>)/g)) === null || _a === void 0 ? void 0 : _a.length) || 0;
811
- let escapedCharLength = escapedAngleBracketCount * ('&lt;'.length - '<'.length);
812
- const escapedAmpersandCount = ((_b = subText.match(/&/g)) === null || _b === void 0 ? void 0 : _b.length) || 0;
813
- escapedCharLength += escapedAmpersandCount * ('&amp;'.length - '&'.length);
814
- return escapedCharLength;
815
- };
816
- const unEscapeHtmlCharacters = (text) => {
817
- return text.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&');
818
- };
819
- //# sourceMappingURL=mentionTagUtils.js.map