@azure/communication-react 1.24.0-beta.1 → 1.24.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 (583) hide show
  1. package/dist/communication-react.d.ts +66 -2240
  2. package/dist/dist-cjs/communication-react/index.js +38012 -178
  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 +0 -14
  15. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -18
  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 +0 -8
  18. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +2 -64
  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 +0 -28
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +1 -65
  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 -30
  26. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +6 -14
  28. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  29. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  30. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
  31. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  32. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.d.ts +0 -5
  33. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +3 -8
  34. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  35. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +43 -32
  36. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +1 -1
  37. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
  38. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +6 -160
  40. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  41. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +6 -26
  42. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +23 -251
  43. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  44. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -6
  45. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +6 -31
  46. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  47. package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js +4 -4
  48. package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js.map +1 -1
  49. package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +0 -12
  50. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -32
  51. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  52. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +0 -9
  53. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +1 -45
  54. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
  55. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
  56. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
  57. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -3
  59. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +0 -7
  60. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  61. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +0 -8
  62. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  63. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
  64. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  65. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -3
  66. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  67. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
  68. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -35
  69. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  70. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  71. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -3
  72. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  73. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +2 -25
  74. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  75. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  76. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  77. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -15
  78. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  79. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -2
  80. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  81. package/dist/dist-esm/chat-stateful-client/src/index.d.ts +0 -1
  82. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  83. package/dist/dist-esm/communication-react/src/index.d.ts +0 -35
  84. package/dist/dist-esm/communication-react/src/index.js +0 -9
  85. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +0 -2
  87. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +0 -1
  88. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  89. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +0 -101
  90. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +6 -83
  91. package/dist/dist-esm/react-components/src/components/CaptionsBanner.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/ImageOverlay.js +0 -2
  119. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  120. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  121. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
  122. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  123. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.d.ts +0 -2
  124. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js +1 -5
  125. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js.map +1 -1
  126. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
  127. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -13
  128. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  129. package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +5 -3
  130. package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
  131. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +7 -4
  132. package/dist/dist-esm/react-components/src/components/ParticipantItem.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/RaiseHandButton.js +2 -2
  137. package/dist/dist-esm/react-components/src/components/RaiseHandButton.js.map +1 -1
  138. package/dist/dist-esm/react-components/src/components/ReactionButton.js +2 -2
  139. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  140. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
  141. package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
  142. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  143. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -1
  144. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  145. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -1
  146. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  147. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -19
  148. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  149. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -1
  150. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  151. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +0 -5
  152. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +1 -34
  154. package/dist/dist-esm/react-components/src/components/VideoGallery.js +2 -13
  155. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  156. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -24
  157. package/dist/dist-esm/react-components/src/components/index.js +0 -11
  158. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  159. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  160. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  161. package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +0 -21
  162. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +0 -53
  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/MessageThread.styles.d.ts +3 -3
  165. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -8
  166. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  167. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -37
  168. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
  169. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  170. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
  171. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
  172. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  173. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -38
  174. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -131
  175. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  176. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
  177. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  178. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  179. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  180. package/dist/dist-esm/react-components/src/components/utils.js +2 -3
  181. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  182. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  183. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
  184. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  185. package/dist/dist-esm/react-components/src/index.d.ts +0 -2
  186. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  187. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -63
  188. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  189. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +5 -0
  190. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +5 -0
  191. package/dist/dist-esm/react-components/src/localization/locales/cy-GB/strings.json +5 -0
  192. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +5 -0
  193. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +5 -0
  194. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +5 -0
  195. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +5 -0
  196. package/dist/dist-esm/react-components/src/localization/locales/es-MX/strings.json +5 -0
  197. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +5 -0
  198. package/dist/dist-esm/react-components/src/localization/locales/fr-CA/strings.json +5 -0
  199. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +5 -0
  200. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +5 -0
  201. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +5 -0
  202. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +5 -0
  203. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +5 -0
  204. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +5 -0
  205. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +5 -0
  206. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +5 -0
  207. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +5 -0
  208. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +5 -0
  209. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +5 -0
  210. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +5 -0
  211. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +5 -0
  212. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +5 -0
  213. package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js +0 -1
  214. package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js.map +1 -1
  215. package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -29
  216. package/dist/dist-esm/react-components/src/theming/icons.js +2 -91
  217. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  218. package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
  219. package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
  220. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  221. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
  222. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  223. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  224. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  225. package/dist/dist-esm/react-components/src/types/index.d.ts +0 -1
  226. package/dist/dist-esm/react-components/src/types/index.js +0 -1
  227. package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
  228. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -72
  229. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +11 -21
  230. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -64
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -48
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +29 -89
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -72
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -3
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js +6 -2
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js.map +1 -1
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +3 -7
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +3 -5
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +9 -0
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +1 -19
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +0 -4
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +26 -2
  263. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  264. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  265. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +24 -46
  266. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -24
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -24
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +3 -3
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.map +1 -1
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +2 -2
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +12 -11
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +1 -12
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +4 -60
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  284. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -65
  285. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +7 -13
  286. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  287. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -20
  288. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +23 -62
  289. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  290. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -73
  291. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  292. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +0 -7
  293. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -12
  294. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  295. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
  296. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
  297. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  298. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -8
  299. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  300. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -27
  301. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
  302. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  303. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
  304. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -189
  305. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  306. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
  307. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  308. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
  309. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -36
  310. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  311. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
  312. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  313. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
  314. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  315. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
  316. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  317. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -4
  318. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -4
  319. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  320. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.d.ts +0 -1
  321. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js +3 -13
  322. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -1
  323. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +0 -2
  324. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +6 -13
  325. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  326. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +0 -3
  327. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +2 -85
  328. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  329. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js +0 -1
  330. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js.map +1 -1
  331. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +0 -3
  332. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +9 -70
  333. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  334. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +0 -3
  335. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  336. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -2
  337. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  338. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +1 -0
  339. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  340. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
  341. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
  342. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  343. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
  344. package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
  345. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  346. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +2 -33
  347. package/dist/dist-esm/react-composites/src/composites/common/icons.js +1 -5
  348. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  349. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +1 -1
  350. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +1 -1
  351. package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/strings.json +1 -1
  352. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +1 -1
  353. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +1 -1
  354. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -1
  355. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +1 -1
  356. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-MX/strings.json +1 -1
  357. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +1 -1
  358. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-CA/strings.json +1 -1
  359. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +1 -1
  360. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +1 -1
  361. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +1 -1
  362. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +1 -1
  363. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +1 -1
  364. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +1 -1
  365. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +1 -1
  366. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +1 -1
  367. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +1 -1
  368. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +1 -1
  369. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +1 -1
  370. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +1 -1
  371. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +1 -1
  372. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +1 -1
  373. package/package.json +3 -3
  374. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-ClQ2m7aI.js +0 -206
  375. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-ClQ2m7aI.js.map +0 -1
  376. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-Bhftq9li.js +0 -50
  377. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-Bhftq9li.js.map +0 -1
  378. package/dist/dist-cjs/communication-react/index-CcIzeubJ.js +0 -45677
  379. package/dist/dist-cjs/communication-react/index-CcIzeubJ.js.map +0 -1
  380. package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
  381. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -20
  382. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
  383. package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
  384. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
  385. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
  386. package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.d.ts +0 -14
  387. package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.js +0 -204
  388. package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.js.map +0 -1
  389. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
  390. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
  391. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
  392. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.d.ts +0 -16
  393. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js +0 -22
  394. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js.map +0 -1
  395. package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.d.ts +0 -24
  396. package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js +0 -60
  397. package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js.map +0 -1
  398. package/dist/dist-esm/calling-stateful-client/src/TogetherModeVideoStreamSubscriber.d.ts +0 -18
  399. package/dist/dist-esm/calling-stateful-client/src/TogetherModeVideoStreamSubscriber.js +0 -31
  400. package/dist/dist-esm/calling-stateful-client/src/TogetherModeVideoStreamSubscriber.js.map +0 -1
  401. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +0 -6
  402. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +0 -20
  403. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +0 -1
  404. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  405. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  406. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  407. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -24
  408. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -196
  409. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
  410. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  411. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -36
  412. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  413. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  414. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -67
  415. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  416. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  417. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -51
  418. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  419. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  420. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -40
  421. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  422. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  423. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -119
  424. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  425. package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.d.ts +0 -28
  426. package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.js +0 -26
  427. package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.js.map +0 -1
  428. package/dist/dist-esm/react-components/src/components/RealTimeText.d.ts +0 -58
  429. package/dist/dist-esm/react-components/src/components/RealTimeText.js +0 -38
  430. package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +0 -1
  431. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.d.ts +0 -42
  432. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js +0 -53
  433. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js.map +0 -1
  434. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
  435. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
  436. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
  437. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
  438. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
  439. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
  440. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -19
  441. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -43
  442. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
  443. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
  444. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
  445. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
  446. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
  447. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
  448. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
  449. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
  450. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
  451. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
  452. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
  453. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
  454. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
  455. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -30
  456. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -99
  457. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
  458. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -59
  459. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -336
  460. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
  461. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
  462. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -78
  463. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
  464. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -215
  465. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -173
  466. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
  467. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
  468. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
  469. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
  470. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
  471. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -221
  472. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
  473. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
  474. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
  475. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
  476. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
  477. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
  478. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
  479. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
  480. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
  481. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
  482. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
  483. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
  484. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
  485. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  486. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  487. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  488. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.d.ts +0 -48
  489. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js +0 -25
  490. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +0 -1
  491. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  492. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  493. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  494. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  495. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -819
  496. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  497. package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.d.ts +0 -15
  498. package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js +0 -91
  499. package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js.map +0 -1
  500. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.d.ts +0 -10
  501. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js +0 -14
  502. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js.map +0 -1
  503. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.d.ts +0 -23
  504. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js +0 -47
  505. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js.map +0 -1
  506. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  507. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  508. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  509. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  510. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  511. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  512. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.d.ts +0 -10
  513. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.js +0 -23
  514. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.js.map +0 -1
  515. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
  516. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -320
  517. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
  518. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
  519. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
  520. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
  521. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  522. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
  523. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  524. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  525. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  526. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  527. package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.d.ts +0 -98
  528. package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js +0 -181
  529. package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js.map +0 -1
  530. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  531. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -69
  532. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  533. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -73
  534. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -178
  535. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
  536. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
  537. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -119
  538. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
  539. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  540. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  541. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  542. package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.d.ts +0 -8
  543. package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js +0 -17
  544. package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js.map +0 -1
  545. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  546. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  547. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  548. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.d.ts +0 -38
  549. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js +0 -2
  550. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js.map +0 -1
  551. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -49
  552. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -203
  553. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  554. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  555. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -41
  556. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  557. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
  558. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
  559. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
  560. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  561. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  562. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  563. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
  564. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
  565. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
  566. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
  567. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -265
  568. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
  569. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
  570. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
  571. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
  572. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
  573. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
  574. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
  575. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
  576. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
  577. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
  578. package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.d.ts +0 -12
  579. package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.js +0 -19
  580. package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.js.map +0 -1
  581. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
  582. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
  583. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
@@ -1,221 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React, { useCallback, useEffect, useMemo } from 'react';
4
- import { CommandBar, ContextualMenuItemType, Icon } from '@fluentui/react';
5
- import { toolbarButtonStyle, ribbonDividerStyle, ribbonOverflowButtonStyle, richTextToolbarStyle } from '../../styles/RichTextEditor.styles';
6
- import { useTheme } from '../../../theming';
7
- import { toggleBold, toggleItalic, toggleUnderline, toggleBullet, toggleNumbering, setIndentation, insertTable } from 'roosterjs-content-model-api';
8
- import { richTextInsertTableCommandBarItem } from './Table/RichTextInsertTableCommandBarItem';
9
- const MaxRowsNumber = 5;
10
- const MaxColumnsNumber = 5;
11
- /**
12
- * A component to display rich text toolbar.
13
- *
14
- * @beta
15
- */
16
- export const RichTextToolbar = (props) => {
17
- const { plugin, strings } = props;
18
- const theme = useTheme();
19
- // need to re-render the buttons when format state changes
20
- const [formatState, setFormatState] = React.useState(undefined);
21
- useEffect(() => {
22
- // update the format state on editor events
23
- plugin.onFormatChanged = setFormatState;
24
- // plugin editor ready event may happen before onFormatChanged is set
25
- // call update format function to ensure the format state is set
26
- plugin.updateFormat();
27
- }, [plugin]);
28
- const boldButton = useMemo(() => {
29
- return getCommandBarItem({
30
- dataTestId: 'rich-text-toolbar-bold-button',
31
- key: 'RichTextToolbarBoldButton',
32
- icon: 'RichTextBoldButtonIcon',
33
- onClick: () => {
34
- plugin.onToolbarButtonClick(editor => {
35
- toggleBold(editor);
36
- });
37
- },
38
- text: strings.richTextBoldTooltip,
39
- checked: formatState !== undefined && formatState.isBold === true,
40
- theme: theme
41
- });
42
- }, [formatState, plugin, strings.richTextBoldTooltip, theme]);
43
- const italicButton = useMemo(() => {
44
- return getCommandBarItem({
45
- dataTestId: 'rich-text-toolbar-italic-button',
46
- key: 'RichTextToolbarItalicButton',
47
- icon: 'RichTextItalicButtonIcon',
48
- onClick: () => {
49
- plugin.onToolbarButtonClick(editor => {
50
- toggleItalic(editor);
51
- });
52
- },
53
- text: strings.richTextItalicTooltip,
54
- checked: formatState !== undefined && (formatState === null || formatState === void 0 ? void 0 : formatState.isItalic) === true,
55
- theme: theme
56
- });
57
- }, [formatState, plugin, strings.richTextItalicTooltip, theme]);
58
- const underlineButton = useMemo(() => {
59
- return getCommandBarItem({
60
- dataTestId: 'rich-text-toolbar-underline-button',
61
- key: 'RichTextToolbarUnderlineButton',
62
- icon: 'RichTextUnderlineButtonIcon',
63
- onClick: () => {
64
- plugin.onToolbarButtonClick(editor => {
65
- toggleUnderline(editor);
66
- });
67
- },
68
- text: strings.richTextUnderlineTooltip,
69
- checked: formatState !== undefined && (formatState === null || formatState === void 0 ? void 0 : formatState.isUnderline) === true,
70
- theme: theme
71
- });
72
- }, [formatState, plugin, strings.richTextUnderlineTooltip, theme]);
73
- const bulletListButton = useMemo(() => {
74
- return getCommandBarItem({
75
- dataTestId: 'rich-text-toolbar-bullet-list-button',
76
- key: 'RichTextToolbarBulletListButton',
77
- icon: 'RichTextBulletListButtonIcon',
78
- onClick: () => {
79
- plugin.onToolbarButtonClick(editor => {
80
- // check the format state to see if the bulleted list is already applied
81
- const isBullet = formatState === null || formatState === void 0 ? void 0 : formatState.isBullet;
82
- toggleBullet(editor);
83
- // the bulleted list was added
84
- if (!isBullet) {
85
- setTimeout(() => {
86
- // a small delay and polite aria live are needed for MacOS VoiceOver to announce the change
87
- editor.announce({
88
- ariaLiveMode: 'polite',
89
- text: strings.richTextBulletedListAppliedAnnouncement
90
- });
91
- }, 50);
92
- }
93
- });
94
- },
95
- text: strings.richTextBulletListTooltip,
96
- checked: formatState !== undefined && (formatState === null || formatState === void 0 ? void 0 : formatState.isBullet) === true,
97
- theme: theme
98
- });
99
- }, [formatState, plugin, strings.richTextBulletListTooltip, strings.richTextBulletedListAppliedAnnouncement, theme]);
100
- const numberListButton = useMemo(() => {
101
- return getCommandBarItem({
102
- dataTestId: 'rich-text-toolbar-number-list-button',
103
- key: 'RichTextToolbarNumberListButton',
104
- icon: 'RichTextNumberListButtonIcon',
105
- onClick: () => {
106
- plugin.onToolbarButtonClick(editor => {
107
- // check the format state to see if the numbered list is already applied
108
- const isNumbering = formatState === null || formatState === void 0 ? void 0 : formatState.isNumbering;
109
- toggleNumbering(editor);
110
- // the numbered list was added
111
- if (!isNumbering) {
112
- // a small delay and polite aria live are needed for MacOS VoiceOver to announce the change
113
- setTimeout(() => {
114
- editor.announce({
115
- ariaLiveMode: 'polite',
116
- text: strings.richTextNumberedListAppliedAnnouncement
117
- });
118
- }, 50);
119
- }
120
- });
121
- },
122
- text: strings.richTextNumberListTooltip,
123
- checked: formatState !== undefined && (formatState === null || formatState === void 0 ? void 0 : formatState.isNumbering) === true,
124
- theme: theme
125
- });
126
- }, [formatState, plugin, strings.richTextNumberListTooltip, strings.richTextNumberedListAppliedAnnouncement, theme]);
127
- const indentDecreaseButton = useMemo(() => {
128
- return getCommandBarItem({
129
- dataTestId: 'rich-text-toolbar-indent-decrease-button',
130
- key: 'RichTextToolbarIndentDecreaseButton',
131
- icon: 'RichTextIndentDecreaseButtonIcon',
132
- onClick: () => {
133
- plugin.onToolbarButtonClick(editor => {
134
- setIndentation(editor, 'outdent');
135
- });
136
- },
137
- text: strings.richTextDecreaseIndentTooltip,
138
- canCheck: false,
139
- theme: theme
140
- });
141
- }, [plugin, strings.richTextDecreaseIndentTooltip, theme]);
142
- const indentIncreaseButton = useMemo(() => {
143
- return getCommandBarItem({
144
- dataTestId: 'rich-text-toolbar-indent-increase-button',
145
- key: 'RichTextToolbarIndentIncreaseButton',
146
- icon: 'RichTextIndentIncreaseButtonIcon',
147
- onClick: () => {
148
- plugin.onToolbarButtonClick(editor => {
149
- setIndentation(editor, 'indent');
150
- });
151
- },
152
- text: strings.richTextIncreaseIndentTooltip,
153
- canCheck: false,
154
- theme: theme
155
- });
156
- }, [plugin, strings.richTextIncreaseIndentTooltip, theme]);
157
- const divider = useCallback((key) => {
158
- return dividerCommandBarItem(theme, key);
159
- }, [theme]);
160
- const tableButton = useMemo(() => {
161
- return richTextInsertTableCommandBarItem(theme, MaxRowsNumber, MaxColumnsNumber, strings, (column, row) => {
162
- plugin.onToolbarButtonClick(editor => {
163
- //add format
164
- insertTable(editor, column, row);
165
- // when subMenuProps is used and the menu is dismissed, focus is set to the command bar item that opened the menu
166
- // set focus to editor on next re-render
167
- setTimeout(() => {
168
- editor.focus();
169
- });
170
- });
171
- });
172
- }, [plugin, strings, theme]);
173
- const buttons = useMemo(() => {
174
- return [boldButton, italicButton, underlineButton, divider('RichTextRibbonTextFormatDivider'), bulletListButton, numberListButton, indentDecreaseButton, indentIncreaseButton, divider('RichTextRibbonTableDivider'), tableButton];
175
- }, [boldButton, italicButton, underlineButton, divider, bulletListButton, numberListButton, indentDecreaseButton, indentIncreaseButton, tableButton]);
176
- const overflowButtonProps = useMemo(() => {
177
- return {
178
- ariaLabel: strings.richTextToolbarMoreButtonAriaLabel,
179
- styles: toolbarButtonStyle(theme),
180
- menuProps: {
181
- items: [],
182
- // CommandBar will determine items rendered in overflow
183
- isBeakVisible: false,
184
- styles: ribbonOverflowButtonStyle(theme)
185
- }
186
- };
187
- }, [strings.richTextToolbarMoreButtonAriaLabel, theme]);
188
- return React.createElement(CommandBar, { items: buttons, "data-testid": 'rich-text-editor-toolbar', styles: richTextToolbarStyle, overflowButtonProps: overflowButtonProps, "aria-label": strings.richTextToolbarAriaLabel });
189
- };
190
- const getCommandBarItem = ({ key, icon, onClick, text, canCheck = true, checked = false, disabled = false, theme, dataTestId }) => {
191
- return {
192
- role: canCheck ? 'menuitemcheckbox' : 'menuitem',
193
- 'aria-checked': canCheck ? checked : undefined,
194
- // `menuitem` role doesn't support `aria-checked`
195
- 'data-testid': dataTestId,
196
- key: key,
197
- iconProps: {
198
- iconName: icon
199
- },
200
- onClick: onClick,
201
- text: text,
202
- ariaLabel: text,
203
- iconOnly: true,
204
- canCheck: canCheck,
205
- buttonStyles: Object.assign({}, toolbarButtonStyle(theme)),
206
- checked: checked,
207
- disabled: disabled
208
- };
209
- };
210
- const dividerCommandBarItem = (theme, key) => {
211
- return {
212
- key: key,
213
- disabled: true,
214
- // show the item correctly for the overflow menu
215
- itemType: ContextualMenuItemType.Divider,
216
- // this is still needed to remove checkmark icon space even though it is a divider
217
- canCheck: false,
218
- onRender: () => React.createElement(Icon, { iconName: "RichTextDividerIcon", className: ribbonDividerStyle(theme) })
219
- };
220
- };
221
- //# sourceMappingURL=RichTextToolbar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextToolbar.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAA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GAAG,CAAC,EACzB,GAAG,EACH,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,QAAQ,GAAG,IAAI,EACf,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,UAAU,EAWX,EAAwB,EAAE;IACzB,OAAO;QACL,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,UAAU;QAChD,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;QAC9C,iDAAiD;QACjD,aAAa,EAAE,UAAU;QACzB,GAAG,EAAE,GAAG;QACR,SAAS,EAAE;YACT,QAAQ,EAAE,IAAI;SACf;QACD,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,QAAQ;QAClB,YAAY,oBACP,kBAAkB,CAAC,KAAK,CAAC,CAC7B;QACD,OAAO,EAAE,OAAO;QAChB,QAAQ,EAAE,QAAQ;KACnB,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,qBAAqB,GAAG,CAAC,KAAY,EAAE,GAAW,EAAwB,EAAE;IAChF,OAAO;QACL,GAAG,EAAE,GAAG;QACR,QAAQ,EAAE,IAAI;QACd,gDAAgD;QAChD,QAAQ,EAAE,sBAAsB,CAAC,OAAO;QACxC,kFAAkF;QAClF,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,GAAG,EAAE,CAAC,oBAAC,IAAI,IAAC,QAAQ,EAAC,qBAAqB,EAAC,SAAS,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAI;KAC9F,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { RichTextToolbarPlugin } from '../Plugins/RichTextToolbarPlugin';\nimport { CommandBar, ContextualMenuItemType, Icon } from '@fluentui/react';\nimport type { ICommandBarItemProps, Theme } from '@fluentui/react';\nimport { toolbarButtonStyle, ribbonDividerStyle, ribbonOverflowButtonStyle, richTextToolbarStyle } from '../../styles/RichTextEditor.styles';\nimport { useTheme } from '../../../theming';\nimport { ContentModelFormatState } from 'roosterjs-content-model-types';\nimport { toggleBold, toggleItalic, toggleUnderline, toggleBullet, toggleNumbering, setIndentation, insertTable } from 'roosterjs-content-model-api';\nimport { RichTextStrings } from '../RichTextSendBox';\nimport { richTextInsertTableCommandBarItem } from './Table/RichTextInsertTableCommandBarItem';\nconst MaxRowsNumber = 5;\nconst MaxColumnsNumber = 5;\n\n/**\n * Props for {@link RichTextToolbar}.\n *\n * @private\n */\nexport interface RichTextToolbarProps {\n // The rich text toolbar plugin used for connect editor and the ribbon.\n plugin: RichTextToolbarPlugin;\n // Strings for localization.\n strings: Partial<RichTextStrings>;\n}\n\n/**\n * A component to display rich text toolbar.\n *\n * @beta\n */\nexport const RichTextToolbar = (props: RichTextToolbarProps): JSX.Element => {\n const {\n plugin,\n strings\n } = props;\n const theme = useTheme();\n // need to re-render the buttons when format state changes\n const [formatState, setFormatState] = React.useState<ContentModelFormatState | undefined>(undefined);\n useEffect(() => {\n // update the format state on editor events\n plugin.onFormatChanged = setFormatState;\n // plugin editor ready event may happen before onFormatChanged is set\n // call update format function to ensure the format state is set\n plugin.updateFormat();\n }, [plugin]);\n const boldButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-bold-button',\n key: 'RichTextToolbarBoldButton',\n icon: 'RichTextBoldButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n toggleBold(editor);\n });\n },\n text: strings.richTextBoldTooltip,\n checked: formatState !== undefined && formatState.isBold === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextBoldTooltip, theme]);\n const italicButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-italic-button',\n key: 'RichTextToolbarItalicButton',\n icon: 'RichTextItalicButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n toggleItalic(editor);\n });\n },\n text: strings.richTextItalicTooltip,\n checked: formatState !== undefined && formatState?.isItalic === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextItalicTooltip, theme]);\n const underlineButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-underline-button',\n key: 'RichTextToolbarUnderlineButton',\n icon: 'RichTextUnderlineButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n toggleUnderline(editor);\n });\n },\n text: strings.richTextUnderlineTooltip,\n checked: formatState !== undefined && formatState?.isUnderline === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextUnderlineTooltip, theme]);\n const bulletListButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-bullet-list-button',\n key: 'RichTextToolbarBulletListButton',\n icon: 'RichTextBulletListButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n // check the format state to see if the bulleted list is already applied\n const isBullet = formatState?.isBullet;\n toggleBullet(editor);\n // the bulleted list was added\n if (!isBullet) {\n setTimeout(() => {\n // a small delay and polite aria live are needed for MacOS VoiceOver to announce the change\n editor.announce({\n ariaLiveMode: 'polite',\n text: strings.richTextBulletedListAppliedAnnouncement\n });\n }, 50);\n }\n });\n },\n text: strings.richTextBulletListTooltip,\n checked: formatState !== undefined && formatState?.isBullet === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextBulletListTooltip, strings.richTextBulletedListAppliedAnnouncement, theme]);\n const numberListButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-number-list-button',\n key: 'RichTextToolbarNumberListButton',\n icon: 'RichTextNumberListButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n // check the format state to see if the numbered list is already applied\n const isNumbering = formatState?.isNumbering;\n toggleNumbering(editor);\n // the numbered list was added\n if (!isNumbering) {\n // a small delay and polite aria live are needed for MacOS VoiceOver to announce the change\n setTimeout(() => {\n editor.announce({\n ariaLiveMode: 'polite',\n text: strings.richTextNumberedListAppliedAnnouncement\n });\n }, 50);\n }\n });\n },\n text: strings.richTextNumberListTooltip,\n checked: formatState !== undefined && formatState?.isNumbering === true,\n theme: theme\n });\n }, [formatState, plugin, strings.richTextNumberListTooltip, strings.richTextNumberedListAppliedAnnouncement, theme]);\n const indentDecreaseButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-indent-decrease-button',\n key: 'RichTextToolbarIndentDecreaseButton',\n icon: 'RichTextIndentDecreaseButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n setIndentation(editor, 'outdent');\n });\n },\n text: strings.richTextDecreaseIndentTooltip,\n canCheck: false,\n theme: theme\n });\n }, [plugin, strings.richTextDecreaseIndentTooltip, theme]);\n const indentIncreaseButton: ICommandBarItemProps = useMemo(() => {\n return getCommandBarItem({\n dataTestId: 'rich-text-toolbar-indent-increase-button',\n key: 'RichTextToolbarIndentIncreaseButton',\n icon: 'RichTextIndentIncreaseButtonIcon',\n onClick: () => {\n plugin.onToolbarButtonClick(editor => {\n setIndentation(editor, 'indent');\n });\n },\n text: strings.richTextIncreaseIndentTooltip,\n canCheck: false,\n theme: theme\n });\n }, [plugin, strings.richTextIncreaseIndentTooltip, theme]);\n const divider = useCallback((key: string) => {\n return dividerCommandBarItem(theme, key);\n }, [theme]);\n const tableButton: ICommandBarItemProps = useMemo(() => {\n return richTextInsertTableCommandBarItem(theme, MaxRowsNumber, MaxColumnsNumber, strings, (column: number, row: number) => {\n plugin.onToolbarButtonClick(editor => {\n //add format\n insertTable(editor, column, row);\n // when subMenuProps is used and the menu is dismissed, focus is set to the command bar item that opened the menu\n // set focus to editor on next re-render\n setTimeout(() => {\n editor.focus();\n });\n });\n });\n }, [plugin, strings, theme]);\n const buttons: ICommandBarItemProps[] = useMemo(() => {\n return [boldButton, italicButton, underlineButton, divider('RichTextRibbonTextFormatDivider'), bulletListButton, numberListButton, indentDecreaseButton, indentIncreaseButton, divider('RichTextRibbonTableDivider'), tableButton];\n }, [boldButton, italicButton, underlineButton, divider, bulletListButton, numberListButton, indentDecreaseButton, indentIncreaseButton, tableButton]);\n const overflowButtonProps = useMemo(() => {\n return {\n ariaLabel: strings.richTextToolbarMoreButtonAriaLabel,\n styles: toolbarButtonStyle(theme),\n menuProps: {\n items: [],\n // CommandBar will determine items rendered in overflow\n isBeakVisible: false,\n styles: ribbonOverflowButtonStyle(theme)\n }\n };\n }, [strings.richTextToolbarMoreButtonAriaLabel, theme]);\n return <CommandBar items={buttons} data-testid={'rich-text-editor-toolbar'} styles={richTextToolbarStyle} overflowButtonProps={overflowButtonProps} aria-label={strings.richTextToolbarAriaLabel} />;\n};\nconst getCommandBarItem = ({\n key,\n icon,\n onClick,\n text,\n canCheck = true,\n checked = false,\n disabled = false,\n theme,\n dataTestId\n}: {\n key: string;\n icon: string;\n onClick: () => void;\n text?: string;\n canCheck?: boolean;\n checked?: boolean;\n disabled?: boolean;\n theme: Theme;\n dataTestId: string;\n}): ICommandBarItemProps => {\n return {\n role: canCheck ? 'menuitemcheckbox' : 'menuitem',\n 'aria-checked': canCheck ? checked : undefined,\n // `menuitem` role doesn't support `aria-checked`\n 'data-testid': dataTestId,\n key: key,\n iconProps: {\n iconName: icon\n },\n onClick: onClick,\n text: text,\n ariaLabel: text,\n iconOnly: true,\n canCheck: canCheck,\n buttonStyles: {\n ...toolbarButtonStyle(theme)\n },\n checked: checked,\n disabled: disabled\n };\n};\nconst dividerCommandBarItem = (theme: Theme, key: string): ICommandBarItemProps => {\n return {\n key: key,\n disabled: true,\n // show the item correctly for the overflow menu\n itemType: ContextualMenuItemType.Divider,\n // this is still needed to remove checkmark icon space even though it is a divider\n canCheck: false,\n onRender: () => <Icon iconName=\"RichTextDividerIcon\" className={ribbonDividerStyle(theme)} />\n };\n};"]}
@@ -1,7 +0,0 @@
1
- import type { ICommandBarItemProps, Theme } from '@fluentui/react';
2
- import { RichTextStrings } from '../../RichTextSendBox';
3
- /**
4
- * "Insert table" command bar item for the rich text toolbar
5
- */
6
- export declare const richTextInsertTableCommandBarItem: (theme: Theme, maxRowsNumber: number, maxColumnsNumber: number, strings: Partial<RichTextStrings>, onClick: (column: number, row: number) => void) => ICommandBarItemProps;
7
- //# sourceMappingURL=RichTextInsertTableCommandBarItem.d.ts.map
@@ -1,51 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React from 'react';
4
- import { FocusZoneDirection } from '@fluentui/react';
5
- import { insertTableMenuTablePane, toolbarTableButtonStyle } from '../../../styles/RichTextEditor.styles';
6
- import { RichTextInsertTablePane } from './RichTextInsertTablePane';
7
- import { parseKey } from '../../../utils/RichTextTableUtils';
8
- import { RichTextToolbarTableIcon } from './RichTextToolbarTableIcon';
9
- /**
10
- * "Insert table" command bar item for the rich text toolbar
11
- */
12
- export const richTextInsertTableCommandBarItem = (theme, maxRowsNumber, maxColumnsNumber, strings, onClick) => {
13
- return {
14
- 'data-testid': 'rich-text-toolbar-insert-table-button',
15
- key: 'RichTextToolbarInsertTableButton',
16
- text: strings.richTextInsertTableTooltip,
17
- ariaLabel: strings.richTextInsertTableTooltip,
18
- // hide the chevron icon
19
- menuIconProps: {
20
- hidden: true
21
- },
22
- onRenderIcon: () => {
23
- return React.createElement(RichTextToolbarTableIcon, null);
24
- },
25
- buttonStyles: toolbarTableButtonStyle(theme),
26
- canCheck: false,
27
- iconOnly: true,
28
- subMenuProps: {
29
- calloutProps: {
30
- isBeakVisible: false
31
- },
32
- shouldFocusOnMount: true,
33
- className: insertTableMenuTablePane,
34
- focusZoneProps: {
35
- direction: FocusZoneDirection.bidirectional
36
- },
37
- items: [{
38
- key: 'RichTextToolbarInsertTableMenu',
39
- text: strings.richTextInsertTableMenuTitle,
40
- canCheck: false,
41
- onRender: (item) => {
42
- return React.createElement(RichTextInsertTablePane, { item: item, onClick: key => {
43
- const { row, column } = parseKey(key);
44
- onClick(column, row);
45
- }, maxColumnsNumber: maxColumnsNumber, maxRowsNumber: maxRowsNumber });
46
- }
47
- }]
48
- }
49
- };
50
- };
51
- //# sourceMappingURL=RichTextInsertTableCommandBarItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextInsertTableCommandBarItem.js","sourceRoot":"","sources":["../../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAC1G,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,KAAY,EAAE,aAAqB,EAAE,gBAAwB,EAAE,OAAiC,EAAE,OAA8C,EAAwB,EAAE;IAC1N,OAAO;QACL,aAAa,EAAE,uCAAuC;QACtD,GAAG,EAAE,kCAAkC;QACvC,IAAI,EAAE,OAAO,CAAC,0BAA0B;QACxC,SAAS,EAAE,OAAO,CAAC,0BAA0B;QAC7C,wBAAwB;QACxB,aAAa,EAAE;YACb,MAAM,EAAE,IAAI;SACb;QACD,YAAY,EAAE,GAAG,EAAE;YACjB,OAAO,oBAAC,wBAAwB,OAAG,CAAC;QACtC,CAAC;QACD,YAAY,EAAE,uBAAuB,CAAC,KAAK,CAAC;QAC5C,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE;YACZ,YAAY,EAAE;gBACZ,aAAa,EAAE,KAAK;aACrB;YACD,kBAAkB,EAAE,IAAI;YACxB,SAAS,EAAE,wBAAwB;YACnC,cAAc,EAAE;gBACd,SAAS,EAAE,kBAAkB,CAAC,aAAa;aAC5C;YACD,KAAK,EAAE,CAAC;oBACN,GAAG,EAAE,gCAAgC;oBACrC,IAAI,EAAE,OAAO,CAAC,4BAA4B;oBAC1C,QAAQ,EAAE,KAAK;oBACf,QAAQ,EAAE,CAAC,IAAyB,EAAE,EAAE;wBACtC,OAAO,oBAAC,uBAAuB,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE;gCACzD,MAAM,EACJ,GAAG,EACH,MAAM,EACP,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;gCAClB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;4BACvB,CAAC,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,GAAI,CAAC;oBAC1E,CAAC;iBACF,CAAC;SACH;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { FocusZoneDirection } from '@fluentui/react';\nimport type { ICommandBarItemProps, IContextualMenuItem, Theme } from '@fluentui/react';\nimport { insertTableMenuTablePane, toolbarTableButtonStyle } from '../../../styles/RichTextEditor.styles';\nimport { RichTextInsertTablePane } from './RichTextInsertTablePane';\nimport { parseKey } from '../../../utils/RichTextTableUtils';\nimport { RichTextStrings } from '../../RichTextSendBox';\nimport { RichTextToolbarTableIcon } from './RichTextToolbarTableIcon';\n\n/**\n * \"Insert table\" command bar item for the rich text toolbar\n */\nexport const richTextInsertTableCommandBarItem = (theme: Theme, maxRowsNumber: number, maxColumnsNumber: number, strings: Partial<RichTextStrings>, onClick: (column: number, row: number) => void): ICommandBarItemProps => {\n return {\n 'data-testid': 'rich-text-toolbar-insert-table-button',\n key: 'RichTextToolbarInsertTableButton',\n text: strings.richTextInsertTableTooltip,\n ariaLabel: strings.richTextInsertTableTooltip,\n // hide the chevron icon\n menuIconProps: {\n hidden: true\n },\n onRenderIcon: () => {\n return <RichTextToolbarTableIcon />;\n },\n buttonStyles: toolbarTableButtonStyle(theme),\n canCheck: false,\n iconOnly: true,\n subMenuProps: {\n calloutProps: {\n isBeakVisible: false\n },\n shouldFocusOnMount: true,\n className: insertTableMenuTablePane,\n focusZoneProps: {\n direction: FocusZoneDirection.bidirectional\n },\n items: [{\n key: 'RichTextToolbarInsertTableMenu',\n text: strings.richTextInsertTableMenuTitle,\n canCheck: false,\n onRender: (item: IContextualMenuItem) => {\n return <RichTextInsertTablePane item={item} onClick={key => {\n const {\n row,\n column\n } = parseKey(key);\n onClick(column, row);\n }} maxColumnsNumber={maxColumnsNumber} maxRowsNumber={maxRowsNumber} />;\n }\n }]\n }\n };\n};"]}
@@ -1,15 +0,0 @@
1
- /// <reference types="react" />
2
- import type { IContextualMenuItem } from '@fluentui/react';
3
- interface RichTextInsertTablePaneProps {
4
- item: IContextualMenuItem;
5
- onClick: (key: string) => void;
6
- maxRowsNumber: number;
7
- maxColumnsNumber: number;
8
- }
9
- /**
10
- * @private
11
- * Component for the insert table pane
12
- */
13
- export declare const RichTextInsertTablePane: (props: RichTextInsertTablePaneProps) => JSX.Element;
14
- export {};
15
- //# sourceMappingURL=RichTextInsertTablePane.d.ts.map
@@ -1,64 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React, { useMemo } from 'react';
4
- import { FocusZone, FocusZoneDirection, mergeStyles } from '@fluentui/react';
5
- import { insertTableMenuCellButtonSelectedStyles, insertTableMenuCellButtonStyles, insertTableMenuFocusZone, insertTableMenuTitleStyles } from '../../../styles/RichTextEditor.styles';
6
- import { ColumnRowReplaceString, createKey } from '../../../utils/RichTextTableUtils';
7
- import { useTheme } from '../../../../theming';
8
- // This file uses RoosterJS React package implementation with updates to UI components and styles.
9
- const RowColumnInitialValue = 0;
10
- /**
11
- * @private
12
- * Component for the insert table pane
13
- */
14
- export const RichTextInsertTablePane = (props) => {
15
- const { item, onClick, maxColumnsNumber, maxRowsNumber } = props;
16
- const [column, setColumn] = React.useState(RowColumnInitialValue);
17
- const [row, setRow] = React.useState(RowColumnInitialValue);
18
- const theme = useTheme();
19
- const updateSize = React.useCallback((target) => {
20
- if (target !== undefined && target.dataset.column !== undefined && target.dataset.row !== undefined) {
21
- const column = parseInt(target.dataset.column);
22
- const row = parseInt(target.dataset.row);
23
- if (column >= RowColumnInitialValue && column < maxColumnsNumber && row >= RowColumnInitialValue && row < maxRowsNumber) {
24
- setColumn(column);
25
- setRow(row);
26
- }
27
- }
28
- }, [maxColumnsNumber, maxRowsNumber]);
29
- const onMouseEnter = React.useCallback((e) => {
30
- updateSize(e.target);
31
- }, [updateSize]);
32
- const onTouchStart = React.useCallback((e) => {
33
- updateSize(e.target);
34
- }, [updateSize]);
35
- const onClickButton = React.useCallback(() => {
36
- onClick(createKey(formatRowColumnText(row), formatRowColumnText(column)));
37
- }, [row, column, onClick]);
38
- const items = React.useMemo(() => {
39
- var _a;
40
- const items = [];
41
- for (let i = 0; i < maxRowsNumber; i++) {
42
- for (let j = 0; j < maxColumnsNumber; j++) {
43
- const key = `cell_${i}_${j}`;
44
- const isSelected = j <= column && i <= row;
45
- items.push(React.createElement("button", { className: mergeStyles(insertTableMenuCellButtonStyles(theme), isSelected ? insertTableMenuCellButtonSelectedStyles(theme) : undefined), onClick: onClickButton, key: key, id: key, "data-column": j, "data-row": i, "data-is-focusable": true, onMouseEnter: onMouseEnter, onTouchStart: onTouchStart, "aria-label": formatText((_a = item.text) !== null && _a !== void 0 ? _a : '', formatRowColumnText(i), formatRowColumnText(j)), "data-testid": key }));
46
- }
47
- }
48
- return items;
49
- }, [maxRowsNumber, maxColumnsNumber, column, row, theme, onClickButton, onMouseEnter, onTouchStart, item.text]);
50
- const text = useMemo(() => {
51
- var _a;
52
- return formatText((_a = item.text) !== null && _a !== void 0 ? _a : '', formatRowColumnText(row), formatRowColumnText(column));
53
- }, [column, item.text, row]);
54
- return React.createElement("div", null,
55
- React.createElement("div", { className: insertTableMenuTitleStyles }, text),
56
- React.createElement(FocusZone, { defaultTabbableElement: `cell_${RowColumnInitialValue}_${RowColumnInitialValue}`, direction: FocusZoneDirection.bidirectional, onActiveElementChanged: updateSize, className: insertTableMenuFocusZone(theme) }, items));
57
- };
58
- const formatText = (text, row, column) => {
59
- return text.replace(`${ColumnRowReplaceString}`, `${column.toString()} x ${row.toString()}`);
60
- };
61
- const formatRowColumnText = (value) => {
62
- return value + 1;
63
- };
64
- //# sourceMappingURL=RichTextInsertTablePane.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextInsertTablePane.js","sourceRoot":"","sources":["../../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE7E,OAAO,EAAE,uCAAuC,EAAE,+BAA+B,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACvL,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,kGAAkG;AAClG,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAQhC;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAmC,EAAe,EAAE;IAC1F,MAAM,EACJ,IAAI,EACJ,OAAO,EACP,gBAAgB,EAChB,aAAa,EACd,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,MAAM,EAAE,SAAS,CAA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,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChH,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE;;QACxB,OAAO,UAAU,CAAC,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE,EAAE,mBAAmB,CAAC,GAAG,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5F,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;IAC7B,OAAO;QACH,6BAAK,SAAS,EAAE,0BAA0B,IAAG,IAAI,CAAO;QACxD,oBAAC,SAAS,IAAC,sBAAsB,EAAE,QAAQ,qBAAqB,IAAI,qBAAqB,EAAE,EAAE,SAAS,EAAE,kBAAkB,CAAC,aAAa,EAAE,sBAAsB,EAAE,UAAU,EAAE,SAAS,EAAE,wBAAwB,CAAC,KAAK,CAAC,IACrN,KAAK,CACI,CACR,CAAC;AACX,CAAC,CAAC;AACF,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,GAAW,EAAE,MAAc,EAAU,EAAE;IACvE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,sBAAsB,EAAE,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAC/F,CAAC,CAAC;AACF,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAU,EAAE;IACpD,OAAO,KAAK,GAAG,CAAC,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useMemo } from 'react';\nimport { FocusZone, FocusZoneDirection, mergeStyles } from '@fluentui/react';\nimport type { IContextualMenuItem } from '@fluentui/react';\nimport { insertTableMenuCellButtonSelectedStyles, insertTableMenuCellButtonStyles, insertTableMenuFocusZone, insertTableMenuTitleStyles } from '../../../styles/RichTextEditor.styles';\nimport { ColumnRowReplaceString, createKey } from '../../../utils/RichTextTableUtils';\nimport { useTheme } from '../../../../theming';\n\n// This file uses RoosterJS React package implementation with updates to UI components and styles.\nconst RowColumnInitialValue = 0;\ninterface RichTextInsertTablePaneProps {\n item: IContextualMenuItem;\n onClick: (key: string) => void;\n maxRowsNumber: number;\n maxColumnsNumber: number;\n}\n\n/**\n * @private\n * Component for the insert table pane\n */\nexport const RichTextInsertTablePane = (props: RichTextInsertTablePaneProps): JSX.Element => {\n const {\n item,\n onClick,\n maxColumnsNumber,\n maxRowsNumber\n } = props;\n const [column, setColumn] = React.useState(RowColumnInitialValue);\n const [row, setRow] = React.useState(RowColumnInitialValue);\n const theme = useTheme();\n const updateSize = React.useCallback((target?: HTMLElement) => {\n if (target !== undefined && target.dataset.column !== undefined && target.dataset.row !== undefined) {\n const column = parseInt(target.dataset.column);\n const row = parseInt(target.dataset.row);\n if (column >= RowColumnInitialValue && column < maxColumnsNumber && row >= RowColumnInitialValue && row < maxRowsNumber) {\n setColumn(column);\n setRow(row);\n }\n }\n }, [maxColumnsNumber, maxRowsNumber]);\n const onMouseEnter = React.useCallback((e: React.MouseEvent<HTMLButtonElement>) => {\n updateSize(e.target as HTMLElement);\n }, [updateSize]);\n const onTouchStart = React.useCallback((e: React.TouchEvent<HTMLButtonElement>) => {\n updateSize(e.target as HTMLElement);\n }, [updateSize]);\n const onClickButton = React.useCallback(() => {\n onClick(createKey(formatRowColumnText(row), formatRowColumnText(column)));\n }, [row, column, onClick]);\n const items = React.useMemo(() => {\n const items: JSX.Element[] = [];\n for (let i = 0; i < maxRowsNumber; i++) {\n for (let j = 0; j < maxColumnsNumber; j++) {\n const key = `cell_${i}_${j}`;\n const isSelected = j <= column && i <= row;\n items.push(<button className={mergeStyles(insertTableMenuCellButtonStyles(theme), isSelected ? insertTableMenuCellButtonSelectedStyles(theme) : undefined)} onClick={onClickButton} key={key} id={key} data-column={j} data-row={i} data-is-focusable={true} onMouseEnter={onMouseEnter} onTouchStart={onTouchStart} aria-label={formatText(item.text ?? '', formatRowColumnText(i), formatRowColumnText(j))} data-testid={key} />);\n }\n }\n return items;\n }, [maxRowsNumber, maxColumnsNumber, column, row, theme, onClickButton, onMouseEnter, onTouchStart, item.text]);\n const text = useMemo(() => {\n return formatText(item.text ?? '', formatRowColumnText(row), formatRowColumnText(column));\n }, [column, item.text, row]);\n return <div>\n <div className={insertTableMenuTitleStyles}>{text}</div>\n <FocusZone defaultTabbableElement={`cell_${RowColumnInitialValue}_${RowColumnInitialValue}`} direction={FocusZoneDirection.bidirectional} onActiveElementChanged={updateSize} className={insertTableMenuFocusZone(theme)}>\n {items}\n </FocusZone>\n </div>;\n};\nconst formatText = (text: string, row: number, column: number): string => {\n return text.replace(`${ColumnRowReplaceString}`, `${column.toString()} x ${row.toString()}`);\n};\nconst formatRowColumnText = (value: number): number => {\n return value + 1;\n};"]}
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * Renders the icon component for the insert table button in the rich text editor toolbar.
4
- */
5
- export declare const RichTextToolbarTableIcon: () => JSX.Element;
6
- //# sourceMappingURL=RichTextToolbarTableIcon.d.ts.map
@@ -1,13 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React from 'react';
4
- import { Icon, Stack } from '@fluentui/react';
5
- /**
6
- * Renders the icon component for the insert table button in the rich text editor toolbar.
7
- */
8
- export const RichTextToolbarTableIcon = () => {
9
- return React.createElement(Stack, null,
10
- React.createElement(Icon, { iconName: "RichTextInsertTableFilledIcon", className: 'ribbon-table-button-filled-icon' }),
11
- React.createElement(Icon, { iconName: "RichTextInsertTableRegularIcon", className: 'ribbon-table-button-regular-icon' }));
12
- };
13
- //# sourceMappingURL=RichTextToolbarTableIcon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextToolbarTableIcon.js","sourceRoot":"","sources":["../../../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAgB,EAAE;IACxD,OAAO,oBAAC,KAAK;QACT,oBAAC,IAAI,IAAC,QAAQ,EAAC,+BAA+B,EAAC,SAAS,EAAE,iCAAiC,GAAI;QAC/F,oBAAC,IAAI,IAAC,QAAQ,EAAC,gCAAgC,EAAC,SAAS,EAAE,kCAAkC,GAAI,CAC3F,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { Icon, Stack } from '@fluentui/react';\n\n/**\n * Renders the icon component for the insert table button in the rich text editor toolbar.\n */\nexport const RichTextToolbarTableIcon = (): JSX.Element => {\n return <Stack>\n <Icon iconName=\"RichTextInsertTableFilledIcon\" className={'ribbon-table-button-filled-icon'} />\n <Icon iconName=\"RichTextInsertTableRegularIcon\" className={'ribbon-table-button-regular-icon'} />\n </Stack>;\n};"]}
@@ -1,56 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * @beta
4
- * Error bar type for {@link SendBoxErrorBarError}
5
- */
6
- export declare enum SendBoxErrorBarType {
7
- /** Info styled MessageBar */
8
- info = 0,
9
- /** Error styled MessageBar */
10
- error = 1,
11
- /** Blocked styled MessageBar */
12
- blocked = 2,
13
- /** SevereWarning styled MessageBar */
14
- severeWarning = 3,
15
- /** Success styled MessageBar */
16
- success = 4,
17
- /** Warning styled MessageBar */
18
- warning = 5
19
- }
20
- /**
21
- * @beta
22
- * Error to be displayed to the user in an error bar above sendbox.
23
- */
24
- export interface SendBoxErrorBarError {
25
- /** Error Message to be displayed */
26
- message: string;
27
- /**
28
- * Unix Timestamp. Preferred generation using `Date.now()`
29
- */
30
- timestamp: number;
31
- /**
32
- * ErrorBar type. Defaults to `warning`.
33
- */
34
- errorBarType?: SendBoxErrorBarType;
35
- }
36
- /**
37
- * @private
38
- */
39
- export interface SendBoxErrorBarProps {
40
- /** Error to render */
41
- error?: SendBoxErrorBarError;
42
- /**
43
- * Automatically dismisses the error bar after the specified delay in ms.
44
- * Example: `10 * 1000` would be 10 seconds
45
- */
46
- dismissAfterMs?: number;
47
- /**
48
- * Callback to invoke when the error bar is dismissed
49
- */
50
- onDismiss?: () => void;
51
- }
52
- /**
53
- * @private
54
- */
55
- export declare const SendBoxErrorBar: (props: SendBoxErrorBarProps) => JSX.Element;
56
- //# sourceMappingURL=SendBoxErrorBar.d.ts.map
@@ -1,75 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { MessageBar } from '@fluentui/react';
4
- import { MessageBarType } from '@fluentui/react';
5
- import React, { useEffect } from 'react';
6
- import { useMemo } from 'react';
7
- import { useLocale } from '../localization';
8
- /**
9
- * @beta
10
- * Error bar type for {@link SendBoxErrorBarError}
11
- */
12
- export var SendBoxErrorBarType;
13
- (function (SendBoxErrorBarType) {
14
- /** Info styled MessageBar */
15
- SendBoxErrorBarType[SendBoxErrorBarType["info"] = 0] = "info";
16
- /** Error styled MessageBar */
17
- SendBoxErrorBarType[SendBoxErrorBarType["error"] = 1] = "error";
18
- /** Blocked styled MessageBar */
19
- SendBoxErrorBarType[SendBoxErrorBarType["blocked"] = 2] = "blocked";
20
- /** SevereWarning styled MessageBar */
21
- SendBoxErrorBarType[SendBoxErrorBarType["severeWarning"] = 3] = "severeWarning";
22
- /** Success styled MessageBar */
23
- SendBoxErrorBarType[SendBoxErrorBarType["success"] = 4] = "success";
24
- /** Warning styled MessageBar */
25
- SendBoxErrorBarType[SendBoxErrorBarType["warning"] = 5] = "warning";
26
- })(SendBoxErrorBarType || (SendBoxErrorBarType = {}));
27
- /**
28
- * @private
29
- */
30
- export const SendBoxErrorBar = (props) => {
31
- const { error, dismissAfterMs, onDismiss } = props;
32
- const strings = useLocale().strings.errorBar;
33
- const [errorMessage, setErrorMessage] = React.useState(error === null || error === void 0 ? void 0 : error.message);
34
- // Using `any` because `NodeJS.Timeout` here will cause `declaration error` with jest.
35
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
36
- const timeoutRef = React.useRef();
37
- React.useEffect(() => {
38
- setErrorMessage(error === null || error === void 0 ? void 0 : error.message);
39
- }, [error]);
40
- useEffect(() => {
41
- if (error && dismissAfterMs !== undefined) {
42
- timeoutRef.current = setTimeout(() => {
43
- setErrorMessage(undefined);
44
- onDismiss && onDismiss();
45
- }, dismissAfterMs);
46
- }
47
- return () => {
48
- timeoutRef.current && clearTimeout(timeoutRef.current);
49
- };
50
- }, [dismissAfterMs, onDismiss, error]);
51
- const messageBarType = useMemo(() => {
52
- switch (error === null || error === void 0 ? void 0 : error.errorBarType) {
53
- case SendBoxErrorBarType.info:
54
- return MessageBarType.info;
55
- case SendBoxErrorBarType.error:
56
- return MessageBarType.error;
57
- case SendBoxErrorBarType.blocked:
58
- return MessageBarType.blocked;
59
- case SendBoxErrorBarType.severeWarning:
60
- return MessageBarType.severeWarning;
61
- case SendBoxErrorBarType.success:
62
- return MessageBarType.success;
63
- case SendBoxErrorBarType.warning:
64
- default:
65
- return MessageBarType.warning;
66
- }
67
- }, [error]);
68
- if (errorMessage) {
69
- return React.createElement(MessageBar, { role: "alert", "aria-label": errorMessage, "data-testid": 'send-box-message-bar', messageBarType: messageBarType, isMultiline: true, key: (error === null || error === void 0 ? void 0 : error.errorBarType) || SendBoxErrorBarType.warning, onDismiss: onDismiss, dismissButtonAriaLabel: strings.dismissButtonAriaLabel }, errorMessage);
70
- }
71
- else {
72
- return React.createElement(React.Fragment, null);
73
- }
74
- };
75
- //# sourceMappingURL=SendBoxErrorBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SendBoxErrorBar.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/SendBoxErrorBar.ts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L,KAAK,uBAAL,KAAK,CAAE,YAAY,KAAI,mBAAmB,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,IAClR,YAAY,CACF,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,OAAO,yCAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { MessageBar } from '@fluentui/react';\nimport { MessageBarType } from '@fluentui/react';\nimport React, { useEffect } from 'react';\nimport { useMemo } from 'react';\nimport { useLocale } from '../localization';\n/**\n * @beta\n * Error bar type for {@link SendBoxErrorBarError}\n */\nexport enum SendBoxErrorBarType {\n /** Info styled MessageBar */\n info = 0,\n /** Error styled MessageBar */\n error = 1,\n /** Blocked styled MessageBar */\n blocked = 2,\n /** SevereWarning styled MessageBar */\n severeWarning = 3,\n /** Success styled MessageBar */\n success = 4,\n /** Warning styled MessageBar */\n warning = 5,\n}\n\n/**\n * @beta\n * Error to be displayed to the user in an error bar above sendbox.\n */\nexport interface SendBoxErrorBarError {\n /** Error Message to be displayed */\n message: string;\n /**\n * Unix Timestamp. Preferred generation using `Date.now()`\n */\n timestamp: number;\n /**\n * ErrorBar type. Defaults to `warning`.\n */\n errorBarType?: SendBoxErrorBarType;\n}\n\n/**\n * @private\n */\nexport interface SendBoxErrorBarProps {\n /** Error to render */\n error?: SendBoxErrorBarError;\n /**\n * Automatically dismisses the error bar after the specified delay in ms.\n * Example: `10 * 1000` would be 10 seconds\n */\n dismissAfterMs?: number;\n /**\n * Callback to invoke when the error bar is dismissed\n */\n onDismiss?: () => void;\n}\n\n/**\n * @private\n */\nexport const SendBoxErrorBar = (props: SendBoxErrorBarProps): JSX.Element => {\n const {\n error,\n dismissAfterMs,\n onDismiss\n } = props;\n const strings = useLocale().strings.errorBar;\n const [errorMessage, setErrorMessage] = React.useState(error?.message);\n // Using `any` because `NodeJS.Timeout` here will cause `declaration error` with jest.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const timeoutRef = React.useRef<any>();\n React.useEffect(() => {\n setErrorMessage(error?.message);\n }, [error]);\n useEffect(() => {\n if (error && dismissAfterMs !== undefined) {\n timeoutRef.current = setTimeout(() => {\n setErrorMessage(undefined);\n onDismiss && onDismiss();\n }, dismissAfterMs);\n }\n return () => {\n timeoutRef.current && clearTimeout(timeoutRef.current);\n };\n }, [dismissAfterMs, onDismiss, error]);\n const messageBarType = useMemo(() => {\n switch (error?.errorBarType) {\n case SendBoxErrorBarType.info:\n return MessageBarType.info;\n case SendBoxErrorBarType.error:\n return MessageBarType.error;\n case SendBoxErrorBarType.blocked:\n return MessageBarType.blocked;\n case SendBoxErrorBarType.severeWarning:\n return MessageBarType.severeWarning;\n case SendBoxErrorBarType.success:\n return MessageBarType.success;\n case SendBoxErrorBarType.warning:\n default:\n return MessageBarType.warning;\n }\n }, [error]);\n if (errorMessage) {\n return <MessageBar role=\"alert\" aria-label={errorMessage} data-testid={'send-box-message-bar'} messageBarType={messageBarType} isMultiline={true} key={error?.errorBarType || SendBoxErrorBarType.warning} onDismiss={onDismiss} dismissButtonAriaLabel={strings.dismissButtonAriaLabel}>\n {errorMessage}\n </MessageBar>;\n } else {\n return <></>;\n }\n};"]}
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- import { SendBoxErrorBarError } from './SendBoxErrorBar';
3
- /**
4
- * @private
5
- */
6
- export interface SendBoxErrorsProps {
7
- attachmentUploadsPendingError?: SendBoxErrorBarError;
8
- attachmentProgressError?: SendBoxErrorBarError;
9
- }
10
- /**
11
- * @private
12
- */
13
- export declare const SendBoxErrors: (props: SendBoxErrorsProps) => JSX.Element;
14
- //# sourceMappingURL=SendBoxErrors.d.ts.map