@dialpad/dialtone 9.124.0 → 9.126.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 (389) hide show
  1. package/README.md +9 -2
  2. package/dist/css/dialtone-default-theme.css +4 -0
  3. package/dist/css/dialtone-default-theme.min.css +1 -1
  4. package/dist/css/dialtone.css +4 -0
  5. package/dist/css/dialtone.min.css +1 -1
  6. package/dist/tokens/doc.json +12021 -12021
  7. package/dist/vue2/common/mixins/index.cjs +1 -1
  8. package/dist/vue2/common/mixins/index.js +10 -10
  9. package/dist/vue2/common/mixins/localization.cjs +2 -0
  10. package/dist/vue2/common/mixins/localization.cjs.map +1 -0
  11. package/dist/vue2/common/mixins/localization.js +10 -0
  12. package/dist/vue2/common/mixins/localization.js.map +1 -0
  13. package/dist/vue2/common/utils/index.cjs +1 -1
  14. package/dist/vue2/common/utils/index.cjs.map +1 -1
  15. package/dist/vue2/common/utils/index.js +43 -39
  16. package/dist/vue2/common/utils/index.js.map +1 -1
  17. package/dist/vue2/component-documentation.json +1 -1
  18. package/dist/vue2/dialtone-vue.cjs +1 -1
  19. package/dist/vue2/dialtone-vue.js +361 -358
  20. package/dist/vue2/dialtone-vue.js.map +1 -1
  21. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  22. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  23. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js +61 -86
  24. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  25. package/dist/vue2/lib/banner/banner.cjs +2 -2
  26. package/dist/vue2/lib/banner/banner.cjs.map +1 -1
  27. package/dist/vue2/lib/banner/banner.js +25 -33
  28. package/dist/vue2/lib/banner/banner.js.map +1 -1
  29. package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  30. package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
  31. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js +14 -12
  32. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  33. package/dist/vue2/lib/button/button.cjs +1 -1
  34. package/dist/vue2/lib/button/button.cjs.map +1 -1
  35. package/dist/vue2/lib/button/button.js +9 -7
  36. package/dist/vue2/lib/button/button.js.map +1 -1
  37. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  38. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  39. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +19 -25
  40. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  41. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  42. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  43. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +18 -21
  44. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  45. package/dist/vue2/lib/chip/chip.cjs +1 -1
  46. package/dist/vue2/lib/chip/chip.cjs.map +1 -1
  47. package/dist/vue2/lib/chip/chip.js +24 -29
  48. package/dist/vue2/lib/chip/chip.js.map +1 -1
  49. package/dist/vue2/lib/combobox/combobox-constants.cjs +1 -1
  50. package/dist/vue2/lib/combobox/combobox-constants.cjs.map +1 -1
  51. package/dist/vue2/lib/combobox/combobox-constants.js +2 -2
  52. package/dist/vue2/lib/combobox/combobox-constants.js.map +1 -1
  53. package/dist/vue2/lib/combobox/combobox-empty-list.cjs.map +1 -1
  54. package/dist/vue2/lib/combobox/combobox-empty-list.js.map +1 -1
  55. package/dist/vue2/lib/combobox/combobox-loading-list.cjs.map +1 -1
  56. package/dist/vue2/lib/combobox/combobox-loading-list.js.map +1 -1
  57. package/dist/vue2/lib/combobox/combobox.cjs +2 -2
  58. package/dist/vue2/lib/combobox/combobox.cjs.map +1 -1
  59. package/dist/vue2/lib/combobox/combobox.js +12 -12
  60. package/dist/vue2/lib/combobox/combobox.js.map +1 -1
  61. package/dist/vue2/lib/combobox/index.cjs +1 -1
  62. package/dist/vue2/lib/combobox/index.js +3 -3
  63. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  64. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  65. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js +16 -18
  66. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  67. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  68. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  69. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js +22 -24
  70. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  71. package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  72. package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
  73. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js +40 -36
  74. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  75. package/dist/vue2/lib/contact-row/contact-row.cjs +1 -1
  76. package/dist/vue2/lib/contact-row/contact-row.cjs.map +1 -1
  77. package/dist/vue2/lib/contact-row/contact-row.js +11 -25
  78. package/dist/vue2/lib/contact-row/contact-row.js.map +1 -1
  79. package/dist/vue2/lib/datepicker/datepicker-constants.cjs +1 -1
  80. package/dist/vue2/lib/datepicker/datepicker-constants.cjs.map +1 -1
  81. package/dist/vue2/lib/datepicker/datepicker-constants.js +2 -3
  82. package/dist/vue2/lib/datepicker/datepicker-constants.js.map +1 -1
  83. package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
  84. package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
  85. package/dist/vue2/lib/datepicker/datepicker.js +143 -229
  86. package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
  87. package/dist/vue2/lib/datepicker/utils.cjs +1 -1
  88. package/dist/vue2/lib/datepicker/utils.cjs.map +1 -1
  89. package/dist/vue2/lib/datepicker/utils.js +12 -11
  90. package/dist/vue2/lib/datepicker/utils.js.map +1 -1
  91. package/dist/vue2/lib/description-list/description-list.cjs +1 -1
  92. package/dist/vue2/lib/description-list/description-list.cjs.map +1 -1
  93. package/dist/vue2/lib/description-list/description-list.js +8 -8
  94. package/dist/vue2/lib/description-list/description-list.js.map +1 -1
  95. package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
  96. package/dist/vue2/lib/dropdown/dropdown.cjs.map +1 -1
  97. package/dist/vue2/lib/dropdown/dropdown.js +48 -50
  98. package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
  99. package/dist/vue2/lib/editor/editor.cjs +1 -1
  100. package/dist/vue2/lib/editor/editor.cjs.map +1 -1
  101. package/dist/vue2/lib/editor/editor.js +78 -87
  102. package/dist/vue2/lib/editor/editor.js.map +1 -1
  103. package/dist/vue2/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
  104. package/dist/vue2/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
  105. package/dist/vue2/lib/emoji-picker/emoji-picker-constants.js +6 -19
  106. package/dist/vue2/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
  107. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs +1 -1
  108. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  109. package/dist/vue2/lib/emoji-picker/emoji-picker.js +106 -145
  110. package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
  111. package/dist/vue2/lib/emoji-picker/index.cjs +1 -1
  112. package/dist/vue2/lib/emoji-picker/index.js +6 -7
  113. package/dist/vue2/lib/emoji-row/emoji-row-constants.cjs +1 -1
  114. package/dist/vue2/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
  115. package/dist/vue2/lib/emoji-row/emoji-row-constants.js +5 -7
  116. package/dist/vue2/lib/emoji-row/emoji-row-constants.js.map +1 -1
  117. package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
  118. package/dist/vue2/lib/emoji-row/emoji-row.cjs.map +1 -1
  119. package/dist/vue2/lib/emoji-row/emoji-row.js +31 -22
  120. package/dist/vue2/lib/emoji-row/emoji-row.js.map +1 -1
  121. package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  122. package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
  123. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js +20 -22
  124. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  125. package/dist/vue2/lib/general-row/general-row.cjs +1 -1
  126. package/dist/vue2/lib/general-row/general-row.cjs.map +1 -1
  127. package/dist/vue2/lib/general-row/general-row.js +63 -52
  128. package/dist/vue2/lib/general-row/general-row.js.map +1 -1
  129. package/dist/vue2/lib/group-row/group-row.cjs +1 -1
  130. package/dist/vue2/lib/group-row/group-row.cjs.map +1 -1
  131. package/dist/vue2/lib/group-row/group-row.js +43 -32
  132. package/dist/vue2/lib/group-row/group-row.js.map +1 -1
  133. package/dist/vue2/lib/icon/icon-constants.cjs.map +1 -1
  134. package/dist/vue2/lib/icon/icon-constants.js.map +1 -1
  135. package/dist/vue2/lib/icon/icon.cjs +1 -1
  136. package/dist/vue2/lib/icon/icon.cjs.map +1 -1
  137. package/dist/vue2/lib/icon/icon.js +12 -8
  138. package/dist/vue2/lib/icon/icon.js.map +1 -1
  139. package/dist/vue2/lib/image-viewer/image-viewer.cjs +1 -1
  140. package/dist/vue2/lib/image-viewer/image-viewer.cjs.map +1 -1
  141. package/dist/vue2/lib/image-viewer/image-viewer.js +30 -31
  142. package/dist/vue2/lib/image-viewer/image-viewer.js.map +1 -1
  143. package/dist/vue2/lib/ivr-node/ivr-node-constants.cjs +1 -1
  144. package/dist/vue2/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
  145. package/dist/vue2/lib/ivr-node/ivr-node-constants.js +24 -24
  146. package/dist/vue2/lib/ivr-node/ivr-node-constants.js.map +1 -1
  147. package/dist/vue2/lib/ivr-node/ivr-node.cjs +1 -1
  148. package/dist/vue2/lib/ivr-node/ivr-node.cjs.map +1 -1
  149. package/dist/vue2/lib/ivr-node/ivr-node.js +38 -36
  150. package/dist/vue2/lib/ivr-node/ivr-node.js.map +1 -1
  151. package/dist/vue2/lib/list-item/list-item.cjs +1 -1
  152. package/dist/vue2/lib/list-item/list-item.cjs.map +1 -1
  153. package/dist/vue2/lib/list-item/list-item.js +21 -11
  154. package/dist/vue2/lib/list-item/list-item.js.map +1 -1
  155. package/dist/vue2/lib/loader/index.cjs +2 -0
  156. package/dist/vue2/lib/loader/index.cjs.map +1 -0
  157. package/dist/vue2/lib/loader/index.js +5 -0
  158. package/dist/vue2/lib/loader/index.js.map +1 -0
  159. package/dist/vue2/lib/loader/loader.cjs +2 -0
  160. package/dist/vue2/lib/loader/loader.cjs.map +1 -0
  161. package/dist/vue2/lib/loader/loader.js +48 -0
  162. package/dist/vue2/lib/loader/loader.js.map +1 -0
  163. package/dist/vue2/lib/message-input/message-input-link.cjs +1 -1
  164. package/dist/vue2/lib/message-input/message-input-link.cjs.map +1 -1
  165. package/dist/vue2/lib/message-input/message-input-link.js +48 -23
  166. package/dist/vue2/lib/message-input/message-input-link.js.map +1 -1
  167. package/dist/vue2/lib/message-input/message-input-topbar.cjs +1 -1
  168. package/dist/vue2/lib/message-input/message-input-topbar.cjs.map +1 -1
  169. package/dist/vue2/lib/message-input/message-input-topbar.js +50 -22
  170. package/dist/vue2/lib/message-input/message-input-topbar.js.map +1 -1
  171. package/dist/vue2/lib/message-input/message-input.cjs +1 -1
  172. package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
  173. package/dist/vue2/lib/message-input/message-input.js +112 -143
  174. package/dist/vue2/lib/message-input/message-input.js.map +1 -1
  175. package/dist/vue2/lib/modal/modal.cjs +1 -2
  176. package/dist/vue2/lib/modal/modal.cjs.map +1 -1
  177. package/dist/vue2/lib/modal/modal.js +25 -42
  178. package/dist/vue2/lib/modal/modal.js.map +1 -1
  179. package/dist/vue2/lib/notice/notice-action.cjs +1 -1
  180. package/dist/vue2/lib/notice/notice-action.cjs.map +1 -1
  181. package/dist/vue2/lib/notice/notice-action.js +19 -26
  182. package/dist/vue2/lib/notice/notice-action.js.map +1 -1
  183. package/dist/vue2/lib/notice/notice.cjs +1 -1
  184. package/dist/vue2/lib/notice/notice.cjs.map +1 -1
  185. package/dist/vue2/lib/notice/notice.js +18 -27
  186. package/dist/vue2/lib/notice/notice.js.map +1 -1
  187. package/dist/vue2/lib/pagination/pagination.cjs +1 -1
  188. package/dist/vue2/lib/pagination/pagination.cjs.map +1 -1
  189. package/dist/vue2/lib/pagination/pagination.js +49 -58
  190. package/dist/vue2/lib/pagination/pagination.js.map +1 -1
  191. package/dist/vue2/lib/popover/popover-header-footer.cjs +1 -1
  192. package/dist/vue2/lib/popover/popover-header-footer.cjs.map +1 -1
  193. package/dist/vue2/lib/popover/popover-header-footer.js +24 -26
  194. package/dist/vue2/lib/popover/popover-header-footer.js.map +1 -1
  195. package/dist/vue2/lib/popover/popover.cjs +1 -1
  196. package/dist/vue2/lib/popover/popover.cjs.map +1 -1
  197. package/dist/vue2/lib/popover/popover.js +26 -35
  198. package/dist/vue2/lib/popover/popover.js.map +1 -1
  199. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +9 -5
  200. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  201. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +543 -475
  202. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  203. package/dist/vue2/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
  204. package/dist/vue2/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  205. package/dist/vue2/lib/time-pill/time-pill.cjs.map +1 -1
  206. package/dist/vue2/lib/time-pill/time-pill.js.map +1 -1
  207. package/dist/vue2/lib/toast/toast.cjs +1 -1
  208. package/dist/vue2/lib/toast/toast.cjs.map +1 -1
  209. package/dist/vue2/lib/toast/toast.js +64 -97
  210. package/dist/vue2/lib/toast/toast.js.map +1 -1
  211. package/dist/vue2/lib/unread-pill/unread-pill.cjs +1 -1
  212. package/dist/vue2/lib/unread-pill/unread-pill.cjs.map +1 -1
  213. package/dist/vue2/lib/unread-pill/unread-pill.js +27 -18
  214. package/dist/vue2/lib/unread-pill/unread-pill.js.map +1 -1
  215. package/dist/vue2/localization/en-US.cjs +185 -0
  216. package/dist/vue2/localization/en-US.cjs.map +1 -0
  217. package/dist/vue2/localization/en-US.js +188 -0
  218. package/dist/vue2/localization/en-US.js.map +1 -0
  219. package/dist/vue2/localization/es-LA.cjs +169 -0
  220. package/dist/vue2/localization/es-LA.cjs.map +1 -0
  221. package/dist/vue2/localization/es-LA.js +172 -0
  222. package/dist/vue2/localization/es-LA.js.map +1 -0
  223. package/dist/vue2/localization/index.cjs +1322 -0
  224. package/dist/vue2/localization/index.cjs.map +1 -0
  225. package/dist/vue2/localization/index.js +1385 -0
  226. package/dist/vue2/localization/index.js.map +1 -0
  227. package/dist/vue2/node_modules/@tiptap/vue-2.cjs.map +1 -1
  228. package/dist/vue2/node_modules/@tiptap/vue-2.js.map +1 -1
  229. package/dist/vue2/shared/sr_only_close_button.cjs +1 -1
  230. package/dist/vue2/shared/sr_only_close_button.cjs.map +1 -1
  231. package/dist/vue2/shared/sr_only_close_button.js +19 -22
  232. package/dist/vue2/shared/sr_only_close_button.js.map +1 -1
  233. package/dist/vue2/types/common/mixins/index.d.ts +1 -1
  234. package/dist/vue2/types/common/mixins/localization.d.ts +8 -0
  235. package/dist/vue2/types/common/mixins/localization.d.ts.map +1 -0
  236. package/dist/vue2/types/common/sr_only_close_button.vue.d.ts +7 -13
  237. package/dist/vue2/types/common/sr_only_close_button.vue.d.ts.map +1 -1
  238. package/dist/vue2/types/common/utils/index.d.ts +1 -0
  239. package/dist/vue2/types/common/utils/index.d.ts.map +1 -1
  240. package/dist/vue2/types/components/banner/banner.vue.d.ts +0 -33
  241. package/dist/vue2/types/components/banner/banner.vue.d.ts.map +1 -1
  242. package/dist/vue2/types/components/breadcrumbs/breadcrumbs.vue.d.ts +5 -1
  243. package/dist/vue2/types/components/button/button.vue.d.ts +6 -2
  244. package/dist/vue2/types/components/chip/chip.vue.d.ts +8 -18
  245. package/dist/vue2/types/components/combobox/combobox_constants.d.ts +2 -2
  246. package/dist/vue2/types/components/combobox/index.d.ts +1 -1
  247. package/dist/vue2/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
  248. package/dist/vue2/types/components/datepicker/datepicker_constants.d.ts +0 -1
  249. package/dist/vue2/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
  250. package/dist/vue2/types/components/datepicker/modules/calendar.vue.d.ts +5 -17
  251. package/dist/vue2/types/components/datepicker/modules/month-year-picker.vue.d.ts +8 -48
  252. package/dist/vue2/types/components/datepicker/utils.d.ts +1 -0
  253. package/dist/vue2/types/components/datepicker/utils.d.ts.map +1 -1
  254. package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts +0 -24
  255. package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  256. package/dist/vue2/types/components/emoji_picker/emoji_picker.vue.d.ts +5 -1
  257. package/dist/vue2/types/components/emoji_picker/emoji_picker_constants.d.ts +0 -13
  258. package/dist/vue2/types/components/icon/icon.vue.d.ts +1 -0
  259. package/dist/vue2/types/components/icon/icon_constants.d.ts.map +1 -1
  260. package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts +5 -8
  261. package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  262. package/dist/vue2/types/components/list_item/list_item.vue.d.ts +9 -0
  263. package/dist/vue2/types/components/list_item/list_item.vue.d.ts.map +1 -1
  264. package/dist/vue2/types/components/loader/index.d.ts +2 -0
  265. package/dist/vue2/types/components/loader/index.d.ts.map +1 -0
  266. package/dist/vue2/types/components/loader/loader.vue.d.ts +32 -0
  267. package/dist/vue2/types/components/loader/loader.vue.d.ts.map +1 -0
  268. package/dist/vue2/types/components/modal/modal.vue.d.ts +3 -33
  269. package/dist/vue2/types/components/notice/notice.vue.d.ts +1 -34
  270. package/dist/vue2/types/components/notice/notice.vue.d.ts.map +1 -1
  271. package/dist/vue2/types/components/notice/notice_action.vue.d.ts +3 -31
  272. package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
  273. package/dist/vue2/types/components/pagination/pagination.vue.d.ts +9 -26
  274. package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
  275. package/dist/vue2/types/components/popover/popover.vue.d.ts +0 -33
  276. package/dist/vue2/types/components/popover/popover.vue.d.ts.map +1 -1
  277. package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts +8 -11
  278. package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
  279. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +25 -2
  280. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  281. package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +1 -43
  282. package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  283. package/dist/vue2/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -34
  284. package/dist/vue2/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
  285. package/dist/vue2/types/components/toast/toast.vue.d.ts +3 -111
  286. package/dist/vue2/types/components/toast/toast.vue.d.ts.map +1 -1
  287. package/dist/vue2/types/index.d.ts +2 -0
  288. package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +7 -13
  289. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +7 -12
  290. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +8 -10
  291. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  292. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node_constants.d.ts +7 -7
  293. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
  294. package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -25
  295. package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
  296. package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -25
  297. package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  298. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +5 -41
  299. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  300. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +8 -26
  301. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +2 -2
  302. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +20 -61
  303. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  304. package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +6 -1
  305. package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row_constants.d.ts.map +1 -1
  306. package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +10 -13
  307. package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  308. package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +8 -2
  309. package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
  310. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +15 -90
  311. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  312. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +14 -2
  313. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +14 -1
  314. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
  315. package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +10 -11
  316. package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  317. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -18
  318. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  319. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +21 -37
  320. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  321. package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts +9 -18
  322. package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
  323. package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +7 -1
  324. package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  325. package/dist/vue3/component-documentation.json +1 -1
  326. package/dist/vue3/dialtone-vue.cjs +1 -1
  327. package/dist/vue3/dialtone-vue.js +208 -206
  328. package/dist/vue3/dialtone-vue.js.map +1 -1
  329. package/dist/vue3/lib/list-item/list-item.cjs +1 -1
  330. package/dist/vue3/lib/list-item/list-item.cjs.map +1 -1
  331. package/dist/vue3/lib/list-item/list-item.js +35 -30
  332. package/dist/vue3/lib/list-item/list-item.js.map +1 -1
  333. package/dist/vue3/lib/loader/index.cjs +2 -0
  334. package/dist/vue3/lib/loader/index.cjs.map +1 -0
  335. package/dist/vue3/lib/loader/index.js +5 -0
  336. package/dist/vue3/lib/loader/index.js.map +1 -0
  337. package/dist/vue3/lib/loader/loader.cjs +2 -0
  338. package/dist/vue3/lib/loader/loader.cjs.map +1 -0
  339. package/dist/vue3/lib/loader/loader.js +48 -0
  340. package/dist/vue3/lib/loader/loader.js.map +1 -0
  341. package/dist/vue3/lib/message-input/message-input.cjs +1 -1
  342. package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
  343. package/dist/vue3/lib/message-input/message-input.js +2 -1
  344. package/dist/vue3/lib/message-input/message-input.js.map +1 -1
  345. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +8 -4
  346. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  347. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +301 -235
  348. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  349. package/dist/vue3/types/components/list_item/list_item.vue.d.ts +10 -2
  350. package/dist/vue3/types/components/loader/index.d.ts +2 -0
  351. package/dist/vue3/types/components/loader/index.d.ts.map +1 -0
  352. package/dist/vue3/types/components/loader/loader.vue.d.ts +26 -0
  353. package/dist/vue3/types/components/loader/loader.vue.d.ts.map +1 -0
  354. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +19 -0
  355. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  356. package/dist/vue3/types/components/toggle/toggle.vue.d.ts +1 -1
  357. package/dist/vue3/types/index.d.ts +1 -0
  358. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  359. package/package.json +4 -3
  360. package/dist/vue2/common/mixins/sr-only-close-button.cjs +0 -3
  361. package/dist/vue2/common/mixins/sr-only-close-button.cjs.map +0 -1
  362. package/dist/vue2/common/mixins/sr-only-close-button.js +0 -44
  363. package/dist/vue2/common/mixins/sr-only-close-button.js.map +0 -1
  364. package/dist/vue2/lib/contact-row/contact-row-constants.cjs +0 -2
  365. package/dist/vue2/lib/contact-row/contact-row-constants.cjs.map +0 -1
  366. package/dist/vue2/lib/contact-row/contact-row-constants.js +0 -5
  367. package/dist/vue2/lib/contact-row/contact-row-constants.js.map +0 -1
  368. package/dist/vue2/lib/emoji/emoji-constants.cjs +0 -2
  369. package/dist/vue2/lib/emoji/emoji-constants.cjs.map +0 -1
  370. package/dist/vue2/lib/emoji/emoji-constants.js +0 -5
  371. package/dist/vue2/lib/emoji/emoji-constants.js.map +0 -1
  372. package/dist/vue2/lib/group-row/group-row-constants.cjs +0 -2
  373. package/dist/vue2/lib/group-row/group-row-constants.cjs.map +0 -1
  374. package/dist/vue2/lib/group-row/group-row-constants.js +0 -8
  375. package/dist/vue2/lib/group-row/group-row-constants.js.map +0 -1
  376. package/dist/vue2/lib/time-pill/time-pill-constants.cjs +0 -2
  377. package/dist/vue2/lib/time-pill/time-pill-constants.cjs.map +0 -1
  378. package/dist/vue2/lib/time-pill/time-pill-constants.js +0 -8
  379. package/dist/vue2/lib/time-pill/time-pill-constants.js.map +0 -1
  380. package/dist/vue2/types/common/mixins/sr_only_close_button.d.ts +0 -30
  381. package/dist/vue2/types/common/mixins/sr_only_close_button.d.ts.map +0 -1
  382. package/dist/vue2/types/components/emoji/emoji_constants.d.ts +0 -3
  383. package/dist/vue2/types/components/emoji/emoji_constants.d.ts.map +0 -1
  384. package/dist/vue2/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts +0 -6
  385. package/dist/vue2/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts.map +0 -1
  386. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row_constants.d.ts +0 -3
  387. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row_constants.d.ts.map +0 -1
  388. package/dist/vue2/types/recipes/leftbar/group_row/group_row_constants.d.ts +0 -6
  389. package/dist/vue2/types/recipes/leftbar/group_row/group_row_constants.d.ts.map +0 -1
@@ -1,16 +1,16 @@
1
- import { NodeViewWrapper as _, nodeViewProps as y, VueRenderer as w, VueNodeViewRenderer as b, EditorContent as P, BubbleMenu as H, Editor as F } from "../../node_modules/@tiptap/vue-2.js";
2
- import { Node as q, mergeAttributes as m, InputRule as K, nodePasteRule as T, getMarksBetween as U, combineTransactionSteps as N, getChangedRanges as V, findChildrenInRange as z, Mark as W, nodeInputRule as X, Extension as J } from "@tiptap/core";
1
+ import { NodeViewWrapper as _, nodeViewProps as y, VueRenderer as w, VueNodeViewRenderer as v, EditorContent as H, BubbleMenu as j, Editor as F } from "../../node_modules/@tiptap/vue-2.js";
2
+ import { Node as N, mergeAttributes as m, InputRule as q, nodePasteRule as E, getMarksBetween as U, combineTransactionSteps as K, getChangedRanges as W, findChildrenInRange as V, Mark as z, nodeInputRule as X, Extension as J } from "@tiptap/core";
3
3
  import Y from "@tiptap/extension-blockquote";
4
4
  import G from "@tiptap/extension-code-block";
5
5
  import Q from "@tiptap/extension-code";
6
6
  import Z from "@tiptap/extension-document";
7
- import j from "@tiptap/extension-paragraph";
7
+ import O from "@tiptap/extension-paragraph";
8
8
  import ee from "@tiptap/extension-placeholder";
9
9
  import te from "@tiptap/extension-hard-break";
10
10
  import ne from "@tiptap/extension-bold";
11
11
  import re from "@tiptap/extension-bullet-list";
12
- import ie from "@tiptap/extension-italic";
13
- import se from "@tiptap/extension-link";
12
+ import se from "@tiptap/extension-italic";
13
+ import ie from "@tiptap/extension-link";
14
14
  import oe from "@tiptap/extension-list-item";
15
15
  import ae from "@tiptap/extension-ordered-list";
16
16
  import le from "@tiptap/extension-strike";
@@ -23,44 +23,45 @@ import fe from "@tiptap/extension-color";
23
23
  import pe from "@tiptap/extension-font-family";
24
24
  import { PluginKey as f, Plugin as ge } from "@tiptap/pm/state";
25
25
  import _e from "@tiptap/suggestion";
26
- import { emojiPattern as M } from "regex-combined-emojis";
26
+ import { emojiPattern as B } from "regex-combined-emojis";
27
27
  import { n as c } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
28
- import O from "../emoji/emoji.js";
29
- import { stringToUnicode as ye, codeToEmojiData as E, emojiRegex as we, emojiShortCodeRegex as be } from "../../common/emoji/index.js";
30
- import { emojisIndexed as ve } from "@dialpad/dialtone-emojis";
31
- import xe from "../list-item/list-item.js";
32
- import v from "../stack/stack.js";
33
- import x from "tippy.js";
34
- import { linkRegex as Ce, getPhoneNumberRegex as ke, warnIfUnmounted as Se } from "../../common/utils/index.js";
35
- import Te from "@tiptap/extension-image";
36
- import $ from "@tiptap/extension-mention";
37
- import D from "../link/link.js";
38
- import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as Re, RICH_TEXT_EDITOR_OUTPUT_FORMATS as Ee, RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as L } from "./rich-text-editor-constants.js";
39
- import $e from "../avatar/avatar.js";
40
- import Le from "@dialpad/dialtone-icons/vue2/hash";
28
+ import P from "../emoji/emoji.js";
29
+ import { stringToUnicode as ye, codeToEmojiData as R, emojiRegex as we, emojiShortCodeRegex as ve } from "../../common/emoji/index.js";
30
+ import { emojisIndexed as xe } from "@dialpad/dialtone-emojis";
31
+ import be from "../list-item/list-item.js";
32
+ import x from "../stack/stack.js";
33
+ import b from "tippy.js";
34
+ import { linkRegex as ke, getPhoneNumberRegex as Te, warnIfUnmounted as Ce } from "../../common/utils/index.js";
35
+ import Ee from "@tiptap/extension-image";
36
+ import S from "@tiptap/extension-mention";
37
+ import M from "../link/link.js";
38
+ import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as Le, RICH_TEXT_EDITOR_OUTPUT_FORMATS as Re, RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as $ } from "./rich-text-editor-constants.js";
39
+ import Se from "../avatar/avatar.js";
40
+ import $e from "@dialpad/dialtone-icons/vue2/hash";
41
41
  import Ie from "@dialpad/dialtone-icons/vue2/lock";
42
42
  import Ae from "deep-equal";
43
- import je from "../button/button.js";
44
- const Me = {
43
+ import Oe from "../button/button.js";
44
+ import Be from "../../common/mixins/localization.js";
45
+ const Pe = {
45
46
  name: "EmojiComponent",
46
47
  components: {
47
48
  NodeViewWrapper: _,
48
- DtEmoji: O
49
+ DtEmoji: P
49
50
  },
50
51
  props: y
51
52
  };
52
- var Oe = function() {
53
- var e = this, r = e._self._c;
54
- return r("node-view-wrapper", { staticClass: "d-d-inline-block d-va-bottom d-lh0" }, [r("dt-emoji", { attrs: { size: "500", code: e.node.attrs.code } })], 1);
55
- }, De = [], Be = /* @__PURE__ */ c(
53
+ var Me = function() {
54
+ var t = this, n = t._self._c;
55
+ return n("node-view-wrapper", { staticClass: "d-d-inline-block d-va-bottom d-lh0" }, [n("dt-emoji", { attrs: { size: "500", code: t.node.attrs.code } })], 1);
56
+ }, De = [], He = /* @__PURE__ */ c(
57
+ Pe,
56
58
  Me,
57
- Oe,
58
59
  De
59
60
  );
60
- const Pe = Be.exports, He = {
61
+ const je = He.exports, Fe = {
61
62
  name: "SuggestionList",
62
63
  components: {
63
- DtListItem: xe
64
+ DtListItem: be
64
65
  },
65
66
  props: {
66
67
  items: {
@@ -91,8 +92,8 @@ const Pe = Be.exports, He = {
91
92
  }
92
93
  },
93
94
  methods: {
94
- onKeyDown({ event: t }) {
95
- return t.key === "ArrowUp" ? (this.upHandler(), !0) : t.key === "ArrowDown" ? (this.downHandler(), !0) : t.key === "Enter" || t.key === "Tab" ? (this.selectHandler(), !0) : !1;
95
+ onKeyDown({ event: e }) {
96
+ return e.key === "ArrowUp" ? (this.upHandler(), !0) : e.key === "ArrowDown" ? (this.downHandler(), !0) : e.key === "Enter" || e.key === "Tab" ? (this.selectHandler(), !0) : !1;
96
97
  },
97
98
  upHandler() {
98
99
  this.selectedIndex = (this.selectedIndex + this.items.length - 1) % this.items.length, this.scrollActiveElementIntoView();
@@ -102,8 +103,8 @@ const Pe = Be.exports, He = {
102
103
  },
103
104
  async scrollActiveElementIntoView() {
104
105
  await this.$nextTick();
105
- const t = this.$refs.suggestionList.querySelector(".d-list-item--highlighted");
106
- t && t.scrollIntoView({
106
+ const e = this.$refs.suggestionList.querySelector(".d-list-item--highlighted");
107
+ e && e.scrollIntoView({
107
108
  behaviour: "smooth",
108
109
  block: "center"
109
110
  });
@@ -111,47 +112,47 @@ const Pe = Be.exports, He = {
111
112
  selectHandler() {
112
113
  this.selectItem(this.selectedIndex);
113
114
  },
114
- selectItem(t) {
115
- const e = this.items[t];
115
+ selectItem(e) {
116
+ const t = this.items[e];
116
117
  switch (this.itemType) {
117
118
  case "emoji":
118
- this.command(e);
119
+ this.command(t);
119
120
  return;
120
121
  case "mention":
121
- this.command({ name: e.name, id: e.id, avatarSrc: e.avatarSrc });
122
+ this.command({ name: t.name, id: t.id, avatarSrc: t.avatarSrc });
122
123
  break;
123
124
  case "channel":
124
- this.command({ name: e.name, id: e.id });
125
+ this.command({ name: t.name, id: t.id });
125
126
  break;
126
127
  case "slash-command":
127
- this.command({ command: e.command });
128
+ this.command({ command: t.command });
128
129
  break;
129
130
  }
130
131
  }
131
132
  }
132
133
  };
133
- var Fe = function() {
134
- var e = this, r = e._self._c;
135
- return r("div", { staticClass: "d-popover__dialog d-suggestion-list__container" }, [r("ul", { directives: [{ name: "show", rawName: "v-show", value: e.items.length, expression: "items.length" }], ref: "suggestionList", staticClass: "d-suggestion-list" }, e._l(e.items, function(n, i) {
136
- return r("dt-list-item", { key: n.id, class: [
134
+ var Ne = function() {
135
+ var t = this, n = t._self._c;
136
+ return n("div", { staticClass: "d-popover__dialog d-suggestion-list__container" }, [n("ul", { directives: [{ name: "show", rawName: "v-show", value: t.items.length, expression: "items.length" }], ref: "suggestionList", staticClass: "d-suggestion-list" }, t._l(t.items, function(r, s) {
137
+ return n("dt-list-item", { key: r.id, class: [
137
138
  "d-suggestion-list__item",
138
- { "d-list-item--highlighted": i === e.selectedIndex }
139
+ { "d-list-item--highlighted": s === t.selectedIndex }
139
140
  ], attrs: { "navigation-type": "arrow-keys" }, on: { click: function(o) {
140
- return e.selectItem(i);
141
+ return t.selectItem(s);
141
142
  }, keydown: function(o) {
142
- return o.preventDefault(), e.onKeyDown.apply(null, arguments);
143
- } } }, [r(e.itemComponent, { tag: "component", attrs: { item: n } })], 1);
143
+ return o.preventDefault(), t.onKeyDown.apply(null, arguments);
144
+ } } }, [n(t.itemComponent, { tag: "component", attrs: { item: r } })], 1);
144
145
  }), 1)]);
145
- }, qe = [], Ke = /* @__PURE__ */ c(
146
- He,
146
+ }, qe = [], Ue = /* @__PURE__ */ c(
147
147
  Fe,
148
+ Ne,
148
149
  qe
149
150
  );
150
- const C = Ke.exports, Ue = {
151
+ const k = Ue.exports, Ke = {
151
152
  name: "EmojiSuggestion",
152
153
  components: {
153
- DtEmoji: O,
154
- DtStack: v
154
+ DtEmoji: P,
155
+ DtStack: x
155
156
  },
156
157
  props: {
157
158
  item: {
@@ -160,106 +161,106 @@ const C = Ke.exports, Ue = {
160
161
  }
161
162
  }
162
163
  };
163
- var Ne = function() {
164
- var e = this, r = e._self._c;
165
- return r("dt-stack", { attrs: { direction: "row", gap: "400" } }, [r("dt-emoji", { attrs: { size: "200", code: e.item.code } }), e._v(" " + e._s(e.item.code) + " ")], 1);
164
+ var We = function() {
165
+ var t = this, n = t._self._c;
166
+ return n("dt-stack", { attrs: { direction: "row", gap: "400" } }, [n("dt-emoji", { attrs: { size: "200", code: t.item.code } }), t._v(" " + t._s(t.item.code) + " ")], 1);
166
167
  }, Ve = [], ze = /* @__PURE__ */ c(
167
- Ue,
168
- Ne,
168
+ Ke,
169
+ We,
169
170
  Ve
170
171
  );
171
- const We = ze.exports, k = {
172
+ const Xe = ze.exports, T = {
172
173
  name: "hideOnEsc",
173
174
  defaultValue: !0,
174
- fn({ hide: t }) {
175
- function e(r) {
176
- r.keyCode === 27 && t();
175
+ fn({ hide: e }) {
176
+ function t(n) {
177
+ n.keyCode === 27 && e();
177
178
  }
178
179
  return {
179
180
  onShow() {
180
- document.addEventListener("keydown", e);
181
+ document.addEventListener("keydown", t);
181
182
  },
182
183
  onHide() {
183
- document.removeEventListener("keydown", e);
184
+ document.removeEventListener("keydown", t);
184
185
  }
185
186
  };
186
187
  }
187
- }, Xe = 20, Je = {
188
- items: ({ query: t }) => {
189
- if (t.length < 2)
188
+ }, Je = 20, Ye = {
189
+ items: ({ query: e }) => {
190
+ if (e.length < 2)
190
191
  return [];
191
- const e = Object.values(ve);
192
- return t = t.toLowerCase(), e.filter(
193
- (n) => [
194
- n.name,
195
- n.shortname.replaceAll(":", ""),
196
- ...n.keywords
197
- ].some((i) => i.startsWith(t))
198
- ).splice(0, Xe).map((n) => ({ code: n.shortname }));
192
+ const t = Object.values(xe);
193
+ return e = e.toLowerCase(), t.filter(
194
+ (r) => [
195
+ r.name,
196
+ r.shortname.replaceAll(":", ""),
197
+ ...r.keywords
198
+ ].some((s) => s.startsWith(e))
199
+ ).splice(0, Je).map((r) => ({ code: r.shortname }));
199
200
  },
200
- command: ({ editor: t, range: e, props: r }) => {
201
- var o, s;
202
- const n = t.view.state.selection.$to.nodeAfter;
203
- ((o = n == null ? void 0 : n.text) == null ? void 0 : o.startsWith(" ")) && (e.to += 1), t.chain().focus().insertContentAt(e, [
201
+ command: ({ editor: e, range: t, props: n }) => {
202
+ var o, i;
203
+ const r = e.view.state.selection.$to.nodeAfter;
204
+ ((o = r == null ? void 0 : r.text) == null ? void 0 : o.startsWith(" ")) && (t.to += 1), e.chain().focus().insertContentAt(t, [
204
205
  {
205
206
  type: "emoji",
206
- attrs: r
207
+ attrs: n
207
208
  }
208
- ]).run(), (s = window.getSelection()) == null || s.collapseToEnd();
209
+ ]).run(), (i = window.getSelection()) == null || i.collapseToEnd();
209
210
  },
210
211
  render: () => {
211
- let t, e, r = !1;
212
+ let e, t, n = !1;
212
213
  return {
213
- onStart: (n) => {
214
- t = new w(C, {
214
+ onStart: (r) => {
215
+ e = new w(k, {
215
216
  parent: void 0,
216
217
  propsData: {
217
- itemComponent: We,
218
+ itemComponent: Xe,
218
219
  itemType: "emoji",
219
- ...n
220
+ ...r
220
221
  },
221
- editor: n.editor
222
- }), n.clientRect && (e = x("body", {
223
- getReferenceClientRect: n.clientRect,
222
+ editor: r.editor
223
+ }), r.clientRect && (t = b("body", {
224
+ getReferenceClientRect: r.clientRect,
224
225
  appendTo: () => document.body,
225
- content: t.element,
226
+ content: e.element,
226
227
  showOnCreate: !1,
227
228
  onShow: () => {
228
- r = !0;
229
+ n = !0;
229
230
  },
230
231
  onHidden: () => {
231
- r = !1;
232
+ n = !1;
232
233
  },
233
234
  interactive: !0,
234
235
  trigger: "manual",
235
236
  placement: "top-start",
236
237
  zIndex: 650,
237
- plugins: [k]
238
- }), n.items.length > 0 && (e == null || e[0].show()));
238
+ plugins: [T]
239
+ }), r.items.length > 0 && (t == null || t[0].show()));
239
240
  },
240
- onUpdate(n) {
241
- t == null || t.updateProps(n), n.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), e == null || e[0].setProps({
242
- getReferenceClientRect: n.clientRect
241
+ onUpdate(r) {
242
+ e == null || e.updateProps(r), r.items.length > 0 ? t == null || t[0].show() : t == null || t[0].hide(), t == null || t[0].setProps({
243
+ getReferenceClientRect: r.clientRect
243
244
  });
244
245
  },
245
- onKeyDown(n) {
246
- var i;
247
- if (r)
248
- return (i = t == null ? void 0 : t.ref) == null ? void 0 : i.onKeyDown(n);
246
+ onKeyDown(r) {
247
+ var s;
248
+ if (n)
249
+ return (s = e == null ? void 0 : e.ref) == null ? void 0 : s.onKeyDown(r);
249
250
  },
250
251
  onExit() {
251
- e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
252
+ t == null || t[0].destroy(), t = null, e == null || e.destroy(), e = null;
252
253
  }
253
254
  };
254
255
  }
255
- }, Ye = /(:\w+:)$/, Ge = new RegExp(M + "$"), Qe = (t) => {
256
- if (t && E(t[0]))
257
- return { text: t[2] || t[0] };
258
- }, Ze = (t) => [...t.matchAll(be)].filter((r) => E(r[0])).map((r) => ({
259
- index: r.index,
260
- text: r[0],
261
- match: r
262
- })), et = q.create({
256
+ }, Ge = /(:\w+:)$/, Qe = new RegExp(B + "$"), Ze = (e) => {
257
+ if (e && R(e[0]))
258
+ return { text: e[2] || e[0] };
259
+ }, et = (e) => [...e.matchAll(ve)].filter((n) => R(n[0])).map((n) => ({
260
+ index: n.index,
261
+ text: n[0],
262
+ match: n
263
+ })), tt = N.create({
263
264
  name: "emoji",
264
265
  addOptions() {
265
266
  return {
@@ -271,7 +272,7 @@ const We = ze.exports, k = {
271
272
  selectable: !1,
272
273
  atom: !0,
273
274
  addNodeView() {
274
- return b(Pe);
275
+ return v(je);
275
276
  },
276
277
  addAttributes() {
277
278
  return {
@@ -287,44 +288,44 @@ const We = ze.exports, k = {
287
288
  }
288
289
  ];
289
290
  },
290
- renderText({ node: t }) {
291
- return ye(E(t.attrs.code).unicode_output);
291
+ renderText({ node: e }) {
292
+ return ye(R(e.attrs.code).unicode_output);
292
293
  },
293
- renderHTML({ HTMLAttributes: t }) {
294
- return ["emoji-component", m(this.options.HTMLAttributes, t)];
294
+ renderHTML({ HTMLAttributes: e }) {
295
+ return ["emoji-component", m(this.options.HTMLAttributes, e)];
295
296
  },
296
297
  addInputRules() {
297
298
  return [
298
- new K({
299
- find: (t) => {
300
- const e = t.match(Ye) || t.match(Ge);
301
- if (e)
302
- return Qe(e);
299
+ new q({
300
+ find: (e) => {
301
+ const t = e.match(Ge) || e.match(Qe);
302
+ if (t)
303
+ return Ze(t);
303
304
  },
304
- handler: ({ state: t, range: e, match: r, commands: n, chain: i, can: o }) => {
305
- const { tr: s } = t, a = e.from, l = e.to;
306
- s.replaceWith(a, l, this.type.create({ code: r[0] }));
305
+ handler: ({ state: e, range: t, match: n, commands: r, chain: s, can: o }) => {
306
+ const { tr: i } = e, a = t.from, l = t.to;
307
+ i.replaceWith(a, l, this.type.create({ code: n[0] }));
307
308
  }
308
309
  })
309
310
  ];
310
311
  },
311
312
  addPasteRules() {
312
313
  return [
313
- T({
314
- find: Ze,
314
+ E({
315
+ find: et,
315
316
  type: this.type,
316
- getAttributes(t) {
317
+ getAttributes(e) {
317
318
  return {
318
- code: t[0]
319
+ code: e[0]
319
320
  };
320
321
  }
321
322
  }),
322
- T({
323
+ E({
323
324
  find: we,
324
325
  type: this.type,
325
- getAttributes(t) {
326
+ getAttributes(e) {
326
327
  return {
327
- code: t[0]
328
+ code: e[0]
328
329
  };
329
330
  }
330
331
  })
@@ -337,111 +338,111 @@ const We = ze.exports, k = {
337
338
  pluginKey: new f("emoji"),
338
339
  editor: this.editor,
339
340
  ...this.options.suggestion,
340
- ...Je
341
+ ...Ye
341
342
  })
342
343
  ];
343
344
  },
344
345
  addKeyboardShortcuts() {
345
346
  return {
346
- Backspace: () => this.editor.commands.command(({ tr: t, state: e }) => {
347
- let r = !1;
348
- const { selection: n } = e, { empty: i, anchor: o } = n;
349
- return i ? (e.doc.nodesBetween(o - 1, o, (s, a) => {
350
- if (s.type.name === this.name)
351
- return r = !0, t.insertText("", a, a + s.nodeSize), !1;
352
- }), r) : !1;
347
+ Backspace: () => this.editor.commands.command(({ tr: e, state: t }) => {
348
+ let n = !1;
349
+ const { selection: r } = t, { empty: s, anchor: o } = r;
350
+ return s ? (t.doc.nodesBetween(o - 1, o, (i, a) => {
351
+ if (i.type.name === this.name)
352
+ return n = !0, e.insertText("", a, a + i.nodeSize), !1;
353
+ }), n) : !1;
353
354
  })
354
355
  };
355
356
  }
356
357
  });
357
- function tt(t, e, r = () => !0) {
358
- const n = [];
359
- e.lastIndex = 0;
360
- let i;
361
- for (; i = e.exec(t); )
362
- r(t, i) && n.push(i);
363
- return n;
358
+ function nt(e, t, n = () => !0) {
359
+ const r = [];
360
+ t.lastIndex = 0;
361
+ let s;
362
+ for (; s = t.exec(e); )
363
+ n(e, s) && r.push(s);
364
+ return r;
364
365
  }
365
- function nt(t, e) {
366
- return !["#", "@"].includes(t.charAt(e.index)) && !["#", "@"].includes(t.charAt(e.index - 1));
366
+ function rt(e, t) {
367
+ return !["#", "@"].includes(e.charAt(t.index)) && !["#", "@"].includes(e.charAt(t.index - 1));
367
368
  }
368
- function rt(t) {
369
- const e = new RegExp(
369
+ function st(e) {
370
+ const t = new RegExp(
370
371
  "(?:" + [
371
372
  `[!?.,:;'"]`,
372
373
  "(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"
373
374
  ].join("|"),
374
375
  "g"
375
376
  );
376
- return t.replace(e, "");
377
+ return e.replace(t, "");
377
378
  }
378
- function it(t, e) {
379
- const r = t.slice(0, e + 1).search(/\S+\s*$/), n = t.slice(e).search(/\s/);
380
- if (n < 0) {
381
- const i = t.slice(r);
379
+ function it(e, t) {
380
+ const n = e.slice(0, t + 1).search(/\S+\s*$/), r = e.slice(t).search(/\s/);
381
+ if (r < 0) {
382
+ const s = e.slice(n);
382
383
  return {
383
- text: i,
384
- from: r,
385
- to: r + i.length
384
+ text: s,
385
+ from: n,
386
+ to: n + s.length
386
387
  };
387
388
  }
388
389
  return {
389
- text: t.slice(r, n + e),
390
- from: r,
391
- to: n + e
390
+ text: e.slice(n, r + t),
391
+ from: n,
392
+ to: r + t
392
393
  };
393
394
  }
394
- function R(t, e, r, n) {
395
- const i = it(t, e);
396
- if (n.lastIndex = 0, !n.test(i.text))
397
- return i;
398
- const o = r === "left" ? i.from - 1 : i.to + 1;
399
- return o <= 0 || o >= t.length || o === e ? i : R(t, o, r, n);
395
+ function L(e, t, n, r) {
396
+ const s = it(e, t);
397
+ if (r.lastIndex = 0, !r.test(s.text))
398
+ return s;
399
+ const o = n === "left" ? s.from - 1 : s.to + 1;
400
+ return o <= 0 || o >= e.length || o === t ? s : L(e, o, n, r);
400
401
  }
401
- function st(t, e, r, n) {
402
- const i = Math.max(t.from - 1, 0), o = Math.min(t.to + 1, e.content.size), s = U(i, o, e);
403
- for (const a of s)
404
- a.mark.type === n && r.removeMark(a.from, a.to, n);
402
+ function ot(e, t, n, r) {
403
+ const s = Math.max(e.from - 1, 0), o = Math.min(e.to + 1, t.content.size), i = U(s, o, t);
404
+ for (const a of i)
405
+ a.mark.type === r && n.removeMark(a.from, a.to, r);
405
406
  }
406
- const I = ke(1, 15);
407
- function A(t, e, r, n, i, o) {
408
- if (!t)
407
+ const I = Te(1, 15);
408
+ function A(e, t, n, r, s, o) {
409
+ if (!e)
409
410
  return;
410
- let s = r - e - 1;
411
- s = s < 0 ? 0 : s;
412
- const a = n - e, l = R(
413
- t,
414
- s,
411
+ let i = n - t - 1;
412
+ i = i < 0 ? 0 : i;
413
+ const a = r - t, l = L(
414
+ e,
415
+ i,
415
416
  "left",
416
417
  I
417
- ), d = R(
418
- t,
418
+ ), d = L(
419
+ e,
419
420
  a,
420
421
  "right",
421
422
  I
422
- ), u = t.slice(l.from, d.to);
423
- tt(u, Ce, nt).forEach((S) => {
424
- const h = rt(S[0]), g = e + l.from + S.index + 1, B = g + h.length;
425
- i.addMark(g, B, o.create());
423
+ ), u = e.slice(l.from, d.to);
424
+ nt(u, ke, rt).forEach((C) => {
425
+ const h = st(C[0]), g = t + l.from + C.index + 1, D = g + h.length;
426
+ s.addMark(g, D, o.create());
426
427
  });
427
428
  }
428
- function ot(t) {
429
- let e = !1;
429
+ function at(e) {
430
+ let t = !1;
430
431
  return new ge({
431
432
  key: new f("autolink"),
432
- appendTransaction: (r, n, i) => {
433
- const o = r.some((u) => u.docChanged) && !n.doc.eq(i.doc);
434
- if (e && !o)
433
+ appendTransaction: (n, r, s) => {
434
+ const o = n.some((u) => u.docChanged) && !r.doc.eq(s.doc);
435
+ if (t && !o)
435
436
  return;
436
- const { tr: s } = i, { textContent: a } = i.doc;
437
- e || A(a, 0, 0, a.length, s, t.type), e = !0;
438
- const l = N(
439
- n.doc,
440
- [...r]
437
+ const { tr: i } = s, { textContent: a } = s.doc;
438
+ t || A(a, 0, 0, a.length, i, e.type), t = !0;
439
+ const l = K(
440
+ r.doc,
441
+ [...n]
441
442
  );
442
- return V(l).forEach(({ oldRange: u, newRange: p }) => {
443
- st(p, i.doc, s, t.type), z(
444
- i.doc,
443
+ return W(l).forEach(({ oldRange: u, newRange: p }) => {
444
+ ot(p, s.doc, i, e.type), V(
445
+ s.doc,
445
446
  p,
446
447
  (h) => h.isTextblock
447
448
  ).forEach(({ node: h, pos: g }) => {
@@ -450,38 +451,38 @@ function ot(t) {
450
451
  g,
451
452
  u.from,
452
453
  p.to,
453
- s,
454
- t.type
454
+ i,
455
+ e.type
455
456
  );
456
457
  });
457
- }), s;
458
+ }), i;
458
459
  }
459
460
  });
460
461
  }
461
- const at = {
462
+ const lt = {
462
463
  class: "d-link d-c-text d-d-inline-block d-wb-break-all",
463
464
  rel: "noopener noreferrer nofollow"
464
- }, lt = W.create({
465
+ }, ct = z.create({
465
466
  name: "CustomLink",
466
- renderHTML({ HTMLAttributes: t }) {
467
+ renderHTML({ HTMLAttributes: e }) {
467
468
  return [
468
469
  "a",
469
470
  m(
470
471
  this.options.HTMLAttributes,
471
- t,
472
- at
472
+ e,
473
+ lt
473
474
  )
474
475
  ];
475
476
  },
476
- renderText({ node: t }) {
477
- return t.attrs.text;
477
+ renderText({ node: e }) {
478
+ return e.attrs.text;
478
479
  },
479
480
  addProseMirrorPlugins() {
480
481
  return [
481
- ot({ type: this.type })
482
+ at({ type: this.type })
482
483
  ];
483
484
  }
484
- }), ct = Te.extend({
485
+ }), dt = Ee.extend({
485
486
  name: "ConfigurableImage",
486
487
  addAttributes() {
487
488
  return {
@@ -505,18 +506,18 @@ const at = {
505
506
  }
506
507
  };
507
508
  }
508
- }).configure({ inline: !0, allowBase64: !0 }), dt = j.extend({
509
+ }).configure({ inline: !0, allowBase64: !0 }), ut = O.extend({
509
510
  parseHTML() {
510
511
  return [{ tag: "div" }];
511
512
  },
512
- renderHTML({ HTMLAttributes: t }) {
513
- return ["div", m(this.options.HTMLAttributes, t), 0];
513
+ renderHTML({ HTMLAttributes: e }) {
514
+ return ["div", m(this.options.HTMLAttributes, e), 0];
514
515
  }
515
- }), ut = {
516
+ }), mt = {
516
517
  name: "MentionComponent",
517
518
  components: {
518
519
  NodeViewWrapper: _,
519
- DtLink: D
520
+ DtLink: M
520
521
  },
521
522
  props: y,
522
523
  computed: {
@@ -525,17 +526,17 @@ const at = {
525
526
  }
526
527
  }
527
528
  };
528
- var mt = function() {
529
- var e = this, r = e._self._c;
530
- return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [r("dt-link", { attrs: { kind: "mention" } }, [e._v(" " + e._s(e.text) + " ")])], 1);
531
- }, ht = [], ft = /* @__PURE__ */ c(
532
- ut,
529
+ var ht = function() {
530
+ var t = this, n = t._self._c;
531
+ return n("node-view-wrapper", { staticClass: "d-d-inline-block" }, [n("dt-link", { attrs: { kind: "mention" } }, [t._v(" " + t._s(t.text) + " ")])], 1);
532
+ }, ft = [], pt = /* @__PURE__ */ c(
533
533
  mt,
534
- ht
534
+ ht,
535
+ ft
535
536
  );
536
- const pt = ft.exports, gt = $.extend({
537
+ const gt = pt.exports, _t = S.extend({
537
538
  addNodeView() {
538
- return b(pt);
539
+ return v(gt);
539
540
  },
540
541
  parseHTML() {
541
542
  return [
@@ -557,22 +558,22 @@ const pt = ft.exports, gt = $.extend({
557
558
  }
558
559
  };
559
560
  },
560
- renderText({ node: t }) {
561
- return `@${t.attrs.id}`;
561
+ renderText({ node: e }) {
562
+ return `@${e.attrs.id}`;
562
563
  },
563
- renderHTML({ HTMLAttributes: t }) {
564
- return ["mention-component", m(this.options.HTMLAttributes, t)];
564
+ renderHTML({ HTMLAttributes: e }) {
565
+ return ["mention-component", m(this.options.HTMLAttributes, e)];
565
566
  }
566
567
  }).configure({
567
568
  suggestion: {
568
569
  char: "@",
569
570
  pluginKey: new f("mentionSuggestion")
570
571
  }
571
- }), _t = {
572
+ }), yt = {
572
573
  name: "ChannelComponent",
573
574
  components: {
574
575
  NodeViewWrapper: _,
575
- DtLink: D
576
+ DtLink: M
576
577
  },
577
578
  props: y,
578
579
  computed: {
@@ -581,18 +582,18 @@ const pt = ft.exports, gt = $.extend({
581
582
  }
582
583
  }
583
584
  };
584
- var yt = function() {
585
- var e = this, r = e._self._c;
586
- return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [r("dt-link", { attrs: { kind: "mention" } }, [e._v(" " + e._s(e.text) + " ")])], 1);
587
- }, wt = [], bt = /* @__PURE__ */ c(
588
- _t,
585
+ var wt = function() {
586
+ var t = this, n = t._self._c;
587
+ return n("node-view-wrapper", { staticClass: "d-d-inline-block" }, [n("dt-link", { attrs: { kind: "mention" } }, [t._v(" " + t._s(t.text) + " ")])], 1);
588
+ }, vt = [], xt = /* @__PURE__ */ c(
589
589
  yt,
590
- wt
590
+ wt,
591
+ vt
591
592
  );
592
- const vt = bt.exports, xt = $.extend({
593
+ const bt = xt.exports, kt = S.extend({
593
594
  name: "channel",
594
595
  addNodeView() {
595
- return b(vt);
596
+ return v(bt);
596
597
  },
597
598
  parseHTML() {
598
599
  return [
@@ -614,18 +615,18 @@ const vt = bt.exports, xt = $.extend({
614
615
  }
615
616
  };
616
617
  },
617
- renderText({ node: t }) {
618
- return `#${t.attrs.id}`;
618
+ renderText({ node: e }) {
619
+ return `#${e.attrs.id}`;
619
620
  },
620
- renderHTML({ HTMLAttributes: t }) {
621
- return ["channel-component", m(this.options.HTMLAttributes, t)];
621
+ renderHTML({ HTMLAttributes: e }) {
622
+ return ["channel-component", m(this.options.HTMLAttributes, e)];
622
623
  }
623
624
  }).configure({
624
625
  suggestion: {
625
626
  char: "#",
626
627
  pluginKey: new f("channelSuggestion")
627
628
  }
628
- }), Ct = {
629
+ }), Tt = {
629
630
  name: "SlashCommandsComponent",
630
631
  components: {
631
632
  NodeViewWrapper: _
@@ -641,27 +642,27 @@ const vt = bt.exports, xt = $.extend({
641
642
  this.$parent.$emit("selected-command", this.$props.node.attrs.command);
642
643
  }
643
644
  };
644
- var kt = function() {
645
- var e = this, r = e._self._c;
646
- return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [e._v(" " + e._s(e.text) + " ")]);
647
- }, St = [], Tt = /* @__PURE__ */ c(
645
+ var Ct = function() {
646
+ var t = this, n = t._self._c;
647
+ return n("node-view-wrapper", { staticClass: "d-d-inline-block" }, [t._v(" " + t._s(t.text) + " ")]);
648
+ }, Et = [], Lt = /* @__PURE__ */ c(
649
+ Tt,
648
650
  Ct,
649
- kt,
650
- St
651
+ Et
651
652
  );
652
- const Rt = Tt.exports, Et = (t, e) => [...t.matchAll(e)].map((n) => {
653
- let i = n[2];
654
- return i.endsWith(" ") || (i += " "), {
655
- index: n.index,
656
- text: i,
657
- match: n
653
+ const Rt = Lt.exports, St = (e, t) => [...e.matchAll(t)].map((r) => {
654
+ let s = r[2];
655
+ return s.endsWith(" ") || (s += " "), {
656
+ index: r.index,
657
+ text: s,
658
+ match: r
658
659
  };
659
- }), $t = $.extend({
660
+ }), $t = S.extend({
660
661
  name: "slash-commands",
661
662
  group: "inline",
662
663
  inline: !0,
663
664
  addNodeView() {
664
- return b(Rt);
665
+ return v(Rt);
665
666
  },
666
667
  parseHTML() {
667
668
  return [
@@ -683,34 +684,34 @@ const Rt = Tt.exports, Et = (t, e) => [...t.matchAll(e)].map((n) => {
683
684
  }
684
685
  };
685
686
  },
686
- renderText({ node: t }) {
687
- return `/${t.attrs.command}`;
687
+ renderText({ node: e }) {
688
+ return `/${e.attrs.command}`;
688
689
  },
689
- renderHTML({ HTMLAttributes: t }) {
690
- return ["command-component", m(this.options.HTMLAttributes, t)];
690
+ renderHTML({ HTMLAttributes: e }) {
691
+ return ["command-component", m(this.options.HTMLAttributes, e)];
691
692
  },
692
693
  addInputRules() {
693
- var r;
694
- const t = (r = this.options.suggestion) == null ? void 0 : r.items({ query: "" }).map((n) => n.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) $`);
694
+ var n;
695
+ const e = (n = this.options.suggestion) == null ? void 0 : n.items({ query: "" }).map((r) => r.command), t = new RegExp(`^((?:\\/)(${e.join("|")})) $`);
695
696
  return [
696
697
  X({
697
- find: e,
698
+ find: t,
698
699
  type: this.type,
699
- getAttributes(n) {
700
- return { command: n[2] };
700
+ getAttributes(r) {
701
+ return { command: r[2] };
701
702
  }
702
703
  })
703
704
  ];
704
705
  },
705
706
  addPasteRules() {
706
- var r;
707
- const t = (r = this.options.suggestion) == null ? void 0 : r.items({ query: "" }).map((n) => n.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) ?$`, "g");
707
+ var n;
708
+ const e = (n = this.options.suggestion) == null ? void 0 : n.items({ query: "" }).map((r) => r.command), t = new RegExp(`^((?:\\/)(${e.join("|")})) ?$`, "g");
708
709
  return [
709
- T({
710
- find: (n) => Et(n, e),
710
+ E({
711
+ find: (r) => St(r, t),
711
712
  type: this.type,
712
- getAttributes(n) {
713
- return { command: n[0].trim() };
713
+ getAttributes(r) {
714
+ return { command: r[0].trim() };
714
715
  }
715
716
  })
716
717
  ];
@@ -720,11 +721,11 @@ const Rt = Tt.exports, Et = (t, e) => [...t.matchAll(e)].map((n) => {
720
721
  char: "/",
721
722
  pluginKey: new f("slashCommandSuggestion")
722
723
  }
723
- }), Lt = {
724
+ }), It = {
724
725
  name: "MentionSuggestion",
725
726
  components: {
726
- DtAvatar: $e,
727
- DtStack: v
727
+ DtAvatar: Se,
728
+ DtStack: x
728
729
  },
729
730
  props: {
730
731
  item: {
@@ -761,69 +762,69 @@ const Rt = Tt.exports, Et = (t, e) => [...t.matchAll(e)].map((n) => {
761
762
  }
762
763
  }
763
764
  };
764
- var It = function() {
765
- var e = this, r = e._self._c;
766
- return r("dt-stack", { staticClass: "d-mention-suggestion__container", attrs: { direction: "row", gap: "400" } }, [r("dt-avatar", { attrs: { "full-name": e.name, "image-src": e.avatarSrc, "image-alt": e.name, "show-presence": e.showDetails, presence: e.presence, size: "sm" } }), r("dt-stack", { staticClass: "d-mention-suggestion__details-container", attrs: { gap: "100" } }, [r("span", { staticClass: "d-mention-suggestion__name" }, [e._v(" " + e._s(e.name) + " ")]), e.showDetails ? r("dt-stack", { staticClass: "d-label--sm-plain", attrs: { direction: "row", gap: "300" } }, [e.presenceText ? r("span", { staticClass: "d-mention-suggestion__presence", class: [e.presenceFontColorClass] }, [e._v(" " + e._s(e.presenceText) + " ")]) : e._e(), e.status && e.presenceText ? r("div", { staticClass: "d-mention-suggestion__divider" }, [e._v(" • ")]) : e._e(), e.status ? r("div", { staticClass: "d-mention-suggestion__status" }, [e._v(" " + e._s(e.status) + " ")]) : e._e()]) : e._e()], 1)], 1);
767
- }, At = [], jt = /* @__PURE__ */ c(
768
- Lt,
765
+ var At = function() {
766
+ var t = this, n = t._self._c;
767
+ return n("dt-stack", { staticClass: "d-mention-suggestion__container", attrs: { direction: "row", gap: "400" } }, [n("dt-avatar", { attrs: { "full-name": t.name, "image-src": t.avatarSrc, "image-alt": t.name, "show-presence": t.showDetails, presence: t.presence, size: "sm" } }), n("dt-stack", { staticClass: "d-mention-suggestion__details-container", attrs: { gap: "100" } }, [n("span", { staticClass: "d-mention-suggestion__name" }, [t._v(" " + t._s(t.name) + " ")]), t.showDetails ? n("dt-stack", { staticClass: "d-label--sm-plain", attrs: { direction: "row", gap: "300" } }, [t.presenceText ? n("span", { staticClass: "d-mention-suggestion__presence", class: [t.presenceFontColorClass] }, [t._v(" " + t._s(t.presenceText) + " ")]) : t._e(), t.status && t.presenceText ? n("div", { staticClass: "d-mention-suggestion__divider" }, [t._v(" • ")]) : t._e(), t.status ? n("div", { staticClass: "d-mention-suggestion__status" }, [t._v(" " + t._s(t.status) + " ")]) : t._e()]) : t._e()], 1)], 1);
768
+ }, Ot = [], Bt = /* @__PURE__ */ c(
769
769
  It,
770
- At
770
+ At,
771
+ Ot
771
772
  );
772
- const Mt = jt.exports, Ot = {
773
+ const Pt = Bt.exports, Mt = {
773
774
  // This function comes from the user and passed to the editor directly.
774
775
  // This will also activate the mention plugin on the editor
775
776
  // items: ({ query }) => { return [] },
776
777
  allowSpaces: !0,
777
778
  render: () => {
778
- let t, e, r = !1;
779
+ let e, t, n = !1;
779
780
  return {
780
- onStart: (n) => {
781
- t = new w(C, {
781
+ onStart: (r) => {
782
+ e = new w(k, {
782
783
  parent: void 0,
783
784
  propsData: {
784
- itemComponent: Mt,
785
+ itemComponent: Pt,
785
786
  itemType: "mention",
786
- ...n
787
+ ...r
787
788
  },
788
- editor: n.editor
789
- }), n.clientRect && (e = x("body", {
790
- getReferenceClientRect: n.clientRect,
789
+ editor: r.editor
790
+ }), r.clientRect && (t = b("body", {
791
+ getReferenceClientRect: r.clientRect,
791
792
  appendTo: () => document.body,
792
- content: t.element,
793
+ content: e.element,
793
794
  showOnCreate: !1,
794
795
  onShow: () => {
795
- r = !0;
796
+ n = !0;
796
797
  },
797
798
  onHidden: () => {
798
- r = !1;
799
+ n = !1;
799
800
  },
800
801
  interactive: !0,
801
802
  trigger: "manual",
802
803
  placement: "top-start",
803
804
  zIndex: 650,
804
- plugins: [k]
805
- }), n.items.length > 0 && (e == null || e[0].show()));
805
+ plugins: [T]
806
+ }), r.items.length > 0 && (t == null || t[0].show()));
806
807
  },
807
- onUpdate(n) {
808
- t == null || t.updateProps(n), n.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), n.clientRect && (e == null || e[0].setProps({
809
- getReferenceClientRect: n.clientRect
808
+ onUpdate(r) {
809
+ e == null || e.updateProps(r), r.items.length > 0 ? t == null || t[0].show() : t == null || t[0].hide(), r.clientRect && (t == null || t[0].setProps({
810
+ getReferenceClientRect: r.clientRect
810
811
  }));
811
812
  },
812
- onKeyDown(n) {
813
- var i;
814
- if (r)
815
- return (i = t == null ? void 0 : t.ref) == null ? void 0 : i.onKeyDown(n);
813
+ onKeyDown(r) {
814
+ var s;
815
+ if (n)
816
+ return (s = e == null ? void 0 : e.ref) == null ? void 0 : s.onKeyDown(r);
816
817
  },
817
818
  onExit() {
818
- e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
819
+ t == null || t[0].destroy(), t = null, e == null || e.destroy(), e = null;
819
820
  }
820
821
  };
821
822
  }
822
823
  }, Dt = {
823
824
  name: "ChannelSuggestion",
824
825
  components: {
825
- DtStack: v,
826
- DtIconHash: Le,
826
+ DtStack: x,
827
+ DtIconHash: $e,
827
828
  DtIconLock: Ie
828
829
  },
829
830
  props: {
@@ -838,65 +839,65 @@ const Mt = jt.exports, Ot = {
838
839
  }
839
840
  }
840
841
  };
841
- var Bt = function() {
842
- var e = this, r = e._self._c;
843
- return r("dt-stack", { attrs: { direction: "row", gap: "400" } }, [e.item.locked ? r("dt-icon-lock", { attrs: { size: "300" } }) : r("dt-icon-hash", { attrs: { size: "300" } }), r("span", [e._v(e._s(e.name))])], 1);
844
- }, Pt = [], Ht = /* @__PURE__ */ c(
842
+ var Ht = function() {
843
+ var t = this, n = t._self._c;
844
+ return n("dt-stack", { attrs: { direction: "row", gap: "400" } }, [t.item.locked ? n("dt-icon-lock", { attrs: { size: "300" } }) : n("dt-icon-hash", { attrs: { size: "300" } }), n("span", [t._v(t._s(t.name))])], 1);
845
+ }, jt = [], Ft = /* @__PURE__ */ c(
845
846
  Dt,
846
- Bt,
847
- Pt
847
+ Ht,
848
+ jt
848
849
  );
849
- const Ft = Ht.exports, qt = {
850
+ const Nt = Ft.exports, qt = {
850
851
  // This function comes from the user and passed to the editor directly.
851
852
  // This will also activate the mention plugin on the editor
852
853
  // items: ({ query }) => { return [] },
853
854
  allowSpaces: !0,
854
855
  render: () => {
855
- let t, e, r = !1;
856
+ let e, t, n = !1;
856
857
  return {
857
- onStart: (n) => {
858
- t = new w(C, {
858
+ onStart: (r) => {
859
+ e = new w(k, {
859
860
  parent: void 0,
860
861
  propsData: {
861
- itemComponent: Ft,
862
+ itemComponent: Nt,
862
863
  itemType: "channel",
863
- ...n
864
+ ...r
864
865
  },
865
- editor: n.editor
866
- }), n.clientRect && (e = x("body", {
867
- getReferenceClientRect: n.clientRect,
866
+ editor: r.editor
867
+ }), r.clientRect && (t = b("body", {
868
+ getReferenceClientRect: r.clientRect,
868
869
  appendTo: () => document.body,
869
- content: t.element,
870
+ content: e.element,
870
871
  showOnCreate: !1,
871
872
  onShow: () => {
872
- r = !0;
873
+ n = !0;
873
874
  },
874
875
  onHidden: () => {
875
- r = !1;
876
+ n = !1;
876
877
  },
877
878
  interactive: !0,
878
879
  trigger: "manual",
879
880
  placement: "top-start",
880
881
  zIndex: 650,
881
- plugins: [k]
882
- }), n.items.length > 0 && (e == null || e[0].show()));
882
+ plugins: [T]
883
+ }), r.items.length > 0 && (t == null || t[0].show()));
883
884
  },
884
- onUpdate(n) {
885
- t == null || t.updateProps(n), n.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), n.clientRect && (e == null || e[0].setProps({
886
- getReferenceClientRect: n.clientRect
885
+ onUpdate(r) {
886
+ e == null || e.updateProps(r), r.items.length > 0 ? t == null || t[0].show() : t == null || t[0].hide(), r.clientRect && (t == null || t[0].setProps({
887
+ getReferenceClientRect: r.clientRect
887
888
  }));
888
889
  },
889
- onKeyDown(n) {
890
- var i;
891
- if (r)
892
- return (i = t == null ? void 0 : t.ref) == null ? void 0 : i.onKeyDown(n);
890
+ onKeyDown(r) {
891
+ var s;
892
+ if (n)
893
+ return (s = e == null ? void 0 : e.ref) == null ? void 0 : s.onKeyDown(r);
893
894
  },
894
895
  onExit() {
895
- e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
896
+ t == null || t[0].destroy(), t = null, e == null || e.destroy(), e = null;
896
897
  }
897
898
  };
898
899
  }
899
- }, Kt = {
900
+ }, Ut = {
900
901
  name: "SlashCommandSuggestion",
901
902
  props: {
902
903
  item: {
@@ -916,73 +917,74 @@ const Ft = Ht.exports, qt = {
916
917
  }
917
918
  }
918
919
  };
919
- var Ut = function() {
920
- var e = this, r = e._self._c;
921
- return r("div", [r("div", { staticClass: "d-body--md-compact" }, [r("span", [e._v("/" + e._s(e.command))]), e.parametersExample ? r("span", [e._v(" " + e._s(e.parametersExample))]) : e._e()]), r("div", { staticClass: "d-body--sm d-fc-tertiary" }, [e._v(" " + e._s(e.description) + " ")])]);
922
- }, Nt = [], Vt = /* @__PURE__ */ c(
923
- Kt,
920
+ var Kt = function() {
921
+ var t = this, n = t._self._c;
922
+ return n("div", [n("div", { staticClass: "d-body--md-compact" }, [n("span", [t._v("/" + t._s(t.command))]), t.parametersExample ? n("span", [t._v(" " + t._s(t.parametersExample))]) : t._e()]), n("div", { staticClass: "d-body--sm d-fc-tertiary" }, [t._v(" " + t._s(t.description) + " ")])]);
923
+ }, Wt = [], Vt = /* @__PURE__ */ c(
924
924
  Ut,
925
- Nt
925
+ Kt,
926
+ Wt
926
927
  );
927
- const zt = Vt.exports, Wt = {
928
+ const zt = Vt.exports, Xt = {
928
929
  // This function comes from the user and passed to the editor directly.
929
930
  // This will also activate the mention plugin on the editor
930
931
  // items: ({ query }) => { return [] },
931
932
  allowSpaces: !0,
932
933
  startOfLine: !0,
933
934
  render: () => {
934
- let t, e, r = !1;
935
+ let e, t, n = !1;
935
936
  return {
936
- onStart: (n) => {
937
- t = new w(C, {
937
+ onStart: (r) => {
938
+ e = new w(k, {
938
939
  parent: void 0,
939
940
  propsData: {
940
941
  itemComponent: zt,
941
942
  itemType: "slash-command",
942
- ...n
943
+ ...r
943
944
  },
944
- editor: n.editor
945
- }), n.clientRect && (e = x("body", {
946
- getReferenceClientRect: n.clientRect,
945
+ editor: r.editor
946
+ }), r.clientRect && (t = b("body", {
947
+ getReferenceClientRect: r.clientRect,
947
948
  appendTo: () => document.body,
948
- content: t.element,
949
+ content: e.element,
949
950
  showOnCreate: !1,
950
951
  onShow: () => {
951
- r = !0;
952
+ n = !0;
952
953
  },
953
954
  onHidden: () => {
954
- r = !1;
955
+ n = !1;
955
956
  },
956
957
  interactive: !0,
957
958
  trigger: "manual",
958
959
  placement: "top-start",
959
960
  zIndex: 650,
960
- plugins: [k]
961
- }), n.items.length > 0 && (e == null || e[0].show()));
961
+ plugins: [T]
962
+ }), r.items.length > 0 && (t == null || t[0].show()));
962
963
  },
963
- onUpdate(n) {
964
- t == null || t.updateProps(n), n.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), n.clientRect && (e == null || e[0].setProps({
965
- getReferenceClientRect: n.clientRect
964
+ onUpdate(r) {
965
+ e == null || e.updateProps(r), r.items.length > 0 ? t == null || t[0].show() : t == null || t[0].hide(), r.clientRect && (t == null || t[0].setProps({
966
+ getReferenceClientRect: r.clientRect
966
967
  }));
967
968
  },
968
- onKeyDown(n) {
969
- var i;
970
- if (r)
971
- return (i = t == null ? void 0 : t.ref) == null ? void 0 : i.onKeyDown(n);
969
+ onKeyDown(r) {
970
+ var s;
971
+ if (n)
972
+ return (s = e == null ? void 0 : e.ref) == null ? void 0 : s.onKeyDown(r);
972
973
  },
973
974
  onExit() {
974
- e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
975
+ t == null || t[0].destroy(), t = null, e == null || e.destroy(), e = null;
975
976
  }
976
977
  };
977
978
  }
978
- }, Xt = {
979
+ }, Jt = {
979
980
  name: "DtRichTextEditor",
980
981
  components: {
981
- EditorContent: P,
982
- BubbleMenu: H,
983
- DtButton: je,
984
- DtStack: v
982
+ EditorContent: H,
983
+ BubbleMenu: j,
984
+ DtButton: Oe,
985
+ DtStack: x
985
986
  },
987
+ mixins: [Be],
986
988
  props: {
987
989
  /**
988
990
  * Value of the input. The object format should match TipTap's JSON
@@ -1006,6 +1008,14 @@ const zt = Vt.exports, Wt = {
1006
1008
  type: Boolean,
1007
1009
  default: !1
1008
1010
  },
1011
+ /**
1012
+ * When this option is false the editor will only ever paste plain text, no rich text formatting will be applied,
1013
+ * and any HTML will be rendered as text.
1014
+ */
1015
+ pasteRichText: {
1016
+ type: Boolean,
1017
+ default: !0
1018
+ },
1009
1019
  /**
1010
1020
  * Whether the input allows for line breaks to be introduced in the text by pressing enter. If this is disabled,
1011
1021
  * line breaks can still be entered by pressing shift+enter.
@@ -1044,8 +1054,8 @@ const zt = Vt.exports, Wt = {
1044
1054
  autoFocus: {
1045
1055
  type: [Boolean, String, Number],
1046
1056
  default: !1,
1047
- validator(t) {
1048
- return typeof t == "string" ? Re.includes(t) : !0;
1057
+ validator(e) {
1058
+ return typeof e == "string" ? Le.includes(e) : !0;
1049
1059
  }
1050
1060
  },
1051
1061
  /**
@@ -1057,8 +1067,8 @@ const zt = Vt.exports, Wt = {
1057
1067
  outputFormat: {
1058
1068
  type: String,
1059
1069
  default: "html",
1060
- validator(t) {
1061
- return Ee.includes(t);
1070
+ validator(e) {
1071
+ return Re.includes(e);
1062
1072
  }
1063
1073
  },
1064
1074
  /**
@@ -1310,8 +1320,8 @@ const zt = Vt.exports, Wt = {
1310
1320
  editor: null,
1311
1321
  tippyOptions: {
1312
1322
  appendTo: () => {
1313
- var t;
1314
- return (t = this.$refs.editor.$el.getRootNode()) == null ? void 0 : t.querySelector("body");
1323
+ var e;
1324
+ return (e = this.$refs.editor.$el.getRootNode()) == null ? void 0 : e.querySelector("body");
1315
1325
  },
1316
1326
  placement: "top-start"
1317
1327
  }
@@ -1331,68 +1341,68 @@ const zt = Vt.exports, Wt = {
1331
1341
  },
1332
1342
  // eslint-disable-next-line complexity
1333
1343
  extensions() {
1334
- const t = [Z, de, me, te];
1335
- t.push(this.useDivTags ? dt : j), this.allowBlockquote && t.push(Y), this.allowBold && t.push(ne), this.allowBulletList && (t.push(re), t.push(oe.extend({
1336
- renderText({ node: n }) {
1337
- return n.textContent;
1344
+ const e = [Z, de, me, te];
1345
+ e.push(this.useDivTags ? ut : O), this.allowBlockquote && e.push(Y), this.allowBold && e.push(ne), this.allowBulletList && (e.push(re), e.push(oe.extend({
1346
+ renderText({ node: r }) {
1347
+ return r.textContent;
1338
1348
  }
1339
- })), t.push(ae)), this.allowItalic && t.push(ie), this.allowStrike && t.push(le), this.allowUnderline && t.push(ce), this.placeholder && t.push(
1349
+ })), e.push(ae)), this.allowItalic && e.push(se), this.allowStrike && e.push(le), this.allowUnderline && e.push(ce), this.placeholder && e.push(
1340
1350
  ee.configure({ placeholder: this.placeholder })
1341
1351
  );
1342
- const e = this, r = J.create({
1352
+ const t = this, n = J.create({
1343
1353
  addKeyboardShortcuts() {
1344
1354
  return {
1345
- "Shift-Enter": ({ editor: n }) => e.allowLineBreaks ? !1 : (n.commands.first(({ commands: i }) => [
1346
- () => i.newlineInCode(),
1347
- () => e.allowBulletList && i.splitListItem("listItem"),
1348
- () => i.createParagraphNear(),
1349
- () => i.liftEmptyBlock(),
1350
- () => i.splitBlock()
1355
+ "Shift-Enter": ({ editor: r }) => t.allowLineBreaks ? !1 : (r.commands.first(({ commands: s }) => [
1356
+ () => s.newlineInCode(),
1357
+ () => t.allowBulletList && s.splitListItem("listItem"),
1358
+ () => s.createParagraphNear(),
1359
+ () => s.liftEmptyBlock(),
1360
+ () => s.splitBlock()
1351
1361
  ]), !0),
1352
- Enter: () => e.allowLineBreaks ? !1 : (e.$emit("enter"), !0)
1362
+ Enter: () => t.allowLineBreaks ? !1 : (t.$emit("enter"), !0)
1353
1363
  };
1354
1364
  }
1355
1365
  });
1356
- if (t.push(r), this.link && t.push(se.extend({ inclusive: !1 }).configure({
1366
+ if (e.push(n), this.link && e.push(ie.extend({ inclusive: !1 }).configure({
1357
1367
  HTMLAttributes: {
1358
1368
  class: "d-link d-wb-break-all"
1359
1369
  },
1360
1370
  openOnClick: !1,
1361
1371
  autolink: !0,
1362
- protocols: L
1363
- })), this.customLink && t.push(this.getExtension(lt, this.customLink)), this.mentionSuggestion) {
1364
- const n = { ...this.mentionSuggestion, ...Ot };
1365
- t.push(gt.configure({ suggestion: n }));
1372
+ protocols: $
1373
+ })), this.customLink && e.push(this.getExtension(ct, this.customLink)), this.mentionSuggestion) {
1374
+ const r = { ...this.mentionSuggestion, ...Mt };
1375
+ e.push(_t.configure({ suggestion: r }));
1366
1376
  }
1367
1377
  if (this.channelSuggestion) {
1368
- const n = { ...this.channelSuggestion, ...qt };
1369
- t.push(xt.configure({ suggestion: n }));
1378
+ const r = { ...this.channelSuggestion, ...qt };
1379
+ e.push(kt.configure({ suggestion: r }));
1370
1380
  }
1371
1381
  if (this.slashCommandSuggestion) {
1372
- const n = { ...this.slashCommandSuggestion, ...Wt };
1373
- t.push($t.configure({ suggestion: n }));
1382
+ const r = { ...this.slashCommandSuggestion, ...Xt };
1383
+ e.push($t.configure({ suggestion: r }));
1374
1384
  }
1375
- return t.push(et), t.push(ue.configure({
1385
+ return e.push(tt), e.push(ue.configure({
1376
1386
  types: ["paragraph"]
1377
- })), this.allowCode && t.push(Q), this.allowCodeblock && t.push(G.extend({
1378
- renderText({ node: n }) {
1387
+ })), this.allowCode && e.push(Q), this.allowCodeblock && e.push(G.extend({
1388
+ renderText({ node: r }) {
1379
1389
  return `\`\`\`
1380
- ${n.textContent}
1390
+ ${r.textContent}
1381
1391
  \`\`\``;
1382
1392
  }
1383
1393
  }).configure({
1384
1394
  HTMLAttributes: {
1385
1395
  class: "d-rich-text-editor__code-block"
1386
1396
  }
1387
- })), this.allowInlineImages && t.push(ct), (this.allowFontFamily || this.allowFontColor) && (t.push(he), this.allowFontColor && t.push(fe), this.allowFontFamily && t.push(pe)), this.additionalExtensions.length && t.push(...this.additionalExtensions), t;
1397
+ })), this.allowInlineImages && e.push(dt), (this.allowFontFamily || this.allowFontColor) && (e.push(he), this.allowFontColor && e.push(fe), this.allowFontFamily && e.push(pe)), this.additionalExtensions.length && e.push(...this.additionalExtensions), e;
1388
1398
  },
1389
1399
  inputAttrs() {
1390
- const t = {
1400
+ const e = {
1391
1401
  "aria-label": this.inputAriaLabel,
1392
1402
  "aria-multiline": !0,
1393
1403
  role: "textbox"
1394
1404
  };
1395
- return this.editable || (t["aria-readonly"] = !0), t;
1405
+ return this.editable || (e["aria-readonly"] = !0), e;
1396
1406
  }
1397
1407
  },
1398
1408
  /**
@@ -1401,20 +1411,20 @@ ${n.textContent}
1401
1411
  * to be hooked up to the Editor's own API.
1402
1412
  */
1403
1413
  watch: {
1404
- editable(t) {
1405
- this.editor.setEditable(t), this.updateEditorAttributes({ "aria-readonly": !t });
1414
+ editable(e) {
1415
+ this.editor.setEditable(e), this.updateEditorAttributes({ "aria-readonly": !e });
1406
1416
  },
1407
- inputClass(t) {
1408
- this.updateEditorAttributes({ class: t });
1417
+ inputClass(e) {
1418
+ this.updateEditorAttributes({ class: e });
1409
1419
  },
1410
- inputAriaLabel(t) {
1411
- this.updateEditorAttributes({ "aria-label": t });
1420
+ inputAriaLabel(e) {
1421
+ this.updateEditorAttributes({ "aria-label": e });
1412
1422
  },
1413
1423
  extensions() {
1414
1424
  this.destroyEditor(), this.createEditor();
1415
1425
  },
1416
- value(t) {
1417
- this.processValue(t);
1426
+ value(e) {
1427
+ this.processValue(e);
1418
1428
  }
1419
1429
  },
1420
1430
  created() {
@@ -1424,7 +1434,7 @@ ${n.textContent}
1424
1434
  this.destroyEditor();
1425
1435
  },
1426
1436
  mounted() {
1427
- Se(this.$el, this.$options.name), this.processValue(this.value, !1);
1437
+ Ce(this.$el, this.$options.name), this.processValue(this.value, !1);
1428
1438
  },
1429
1439
  methods: {
1430
1440
  createEditor() {
@@ -1433,97 +1443,155 @@ ${n.textContent}
1433
1443
  content: this.value,
1434
1444
  editable: this.editable,
1435
1445
  extensions: this.extensions,
1446
+ parseOptions: {
1447
+ preserveWhitespace: "full"
1448
+ },
1436
1449
  editorProps: {
1437
1450
  attributes: {
1438
1451
  ...this.inputAttrs,
1439
1452
  class: this.inputClass
1440
1453
  },
1441
- handlePaste: (t, e) => {
1442
- if (!this.link && !this.customLink) {
1443
- const r = /^https?:\/\//;
1444
- if (!(e != null && e.clipboardData))
1445
- return !1;
1446
- const n = e.clipboardData.getData("text");
1447
- if (!r.test(n) || !e.clipboardData.getData("text/html"))
1448
- return !1;
1449
- const i = n.replace(/\n/g, "<br>").replace(/ {2}/g, "&nbsp;&nbsp;");
1450
- return this.editor.chain().focus().insertContent(i).run(), !0;
1451
- }
1452
- return !1;
1454
+ handlePaste: (e, t, n) => {
1455
+ const r = t.clipboardData || window.clipboardData, s = r.getData("text/plain"), o = r.getData("text/html");
1456
+ return this.processPasteData(e, s, o);
1453
1457
  },
1454
1458
  // Moves the <br /> tags inside the previous closing tag to avoid
1455
1459
  // Prosemirror wrapping them within another </p> tag.
1456
- transformPastedHTML(t) {
1457
- return t.replace(/(<\/\w+>)((<br \/>)+)/g, "$2$3$1");
1460
+ transformPastedHTML(e) {
1461
+ return e.replace(/(<\/\w+>)((<br \/>)+)/g, "$2$3$1");
1458
1462
  }
1459
1463
  }
1460
1464
  }), this.addEditorListeners();
1461
1465
  },
1462
- bubbleMenuShouldShow({ editor: t, view: e, state: r, oldState: n, from: i, to: o }) {
1463
- return t.isActive("link");
1466
+ bubbleMenuShouldShow({ editor: e, view: t, state: n, oldState: r, from: s, to: o }) {
1467
+ return e.isActive("link");
1464
1468
  },
1465
1469
  /**
1466
1470
  * If the selection contains a link, return the existing link text.
1467
1471
  * Otherwise, use just the selected text.
1468
1472
  * @param editor the editor instance.
1469
1473
  */
1470
- getSelectedLinkText(t) {
1474
+ getSelectedLinkText(e) {
1471
1475
  var a, l, d;
1472
- const { view: e, state: r } = t, { from: n, to: i } = e.state.selection, o = r.doc.textBetween(n, i, ""), s = this.editor.state.doc.nodeAt(n);
1473
- return s && ((d = (l = (a = s.marks) == null ? void 0 : a.at(0)) == null ? void 0 : l.type) == null ? void 0 : d.name) === "link" ? s.textContent : o;
1476
+ const { view: t, state: n } = e, { from: r, to: s } = t.state.selection, o = n.doc.textBetween(r, s, ""), i = this.editor.state.doc.nodeAt(r);
1477
+ return i && ((d = (l = (a = i.marks) == null ? void 0 : a.at(0)) == null ? void 0 : l.type) == null ? void 0 : d.name) === "link" ? i.textContent : o;
1474
1478
  },
1475
1479
  editLink() {
1476
- const t = this.getSelectedLinkText(this.editor), e = {
1480
+ const e = this.getSelectedLinkText(this.editor), t = {
1477
1481
  href: this.editor.getAttributes("link").href,
1478
- text: t
1482
+ text: e
1479
1483
  };
1480
- this.$emit("edit-link", e);
1484
+ this.$emit("edit-link", t);
1481
1485
  },
1482
1486
  removeLink() {
1483
- var t, e, r, n;
1484
- (n = (r = (e = (t = this.editor) == null ? void 0 : t.chain()) == null ? void 0 : e.focus()) == null ? void 0 : r.unsetLink()) == null || n.run();
1487
+ var e, t, n, r;
1488
+ (r = (n = (t = (e = this.editor) == null ? void 0 : e.chain()) == null ? void 0 : t.focus()) == null ? void 0 : n.unsetLink()) == null || r.run();
1485
1489
  },
1486
1490
  openLink() {
1487
- var e, r;
1488
- (r = (e = this.editor) == null ? void 0 : e.chain()) == null || r.focus();
1489
- const t = this.editor.getAttributes("link").href;
1490
- window.open(t, "_blank");
1491
+ var t, n;
1492
+ (n = (t = this.editor) == null ? void 0 : t.chain()) == null || n.focus();
1493
+ const e = this.editor.getAttributes("link").href;
1494
+ window.open(e, "_blank");
1491
1495
  },
1492
1496
  // eslint-disable-next-line complexity
1493
- setLink(t, e, r, n = L, i) {
1497
+ setLink(e, t, n, r = $, s) {
1494
1498
  var a, l, d;
1495
- if (!t) {
1499
+ if (!e) {
1496
1500
  this.removeLink();
1497
1501
  return;
1498
1502
  }
1499
- n.find((u) => u.test(t)) || (t = `${i}${t}`), this.editor.chain().focus().extendMarkRange("link").run();
1500
- const s = (d = (l = (a = this.editor) == null ? void 0 : a.view) == null ? void 0 : l.state) == null ? void 0 : d.selection;
1501
- this.editor.chain().focus().insertContent(e).setTextSelection({ from: s.from, to: s.from + e.length }).setLink({ href: t, class: r.class }).run();
1503
+ r.find((u) => u.test(e)) || (e = `${s}${e}`), this.editor.chain().focus().extendMarkRange("link").run();
1504
+ const i = (d = (l = (a = this.editor) == null ? void 0 : a.view) == null ? void 0 : l.state) == null ? void 0 : d.selection;
1505
+ this.editor.chain().focus().insertContent(t).setTextSelection({ from: i.from, to: i.from + t.length }).setLink({ href: e, class: n.class }).run();
1502
1506
  },
1503
1507
  // eslint-disable-next-line complexity
1504
- processValue(t, e = !0) {
1505
- const r = this.getOutput();
1506
- if (!(e && Ae(t, r))) {
1507
- if (typeof t == "string" && this.outputFormat === "text") {
1508
- const n = new RegExp(`(${M})`, "g");
1509
- t = t == null ? void 0 : t.replace(n, '<emoji-component code="$1"></emoji-component>');
1508
+ processValue(e, t = !0) {
1509
+ const n = this.getOutput();
1510
+ if (!(t && Ae(e, n))) {
1511
+ if (typeof e == "string" && this.outputFormat === "text") {
1512
+ const r = new RegExp(`(${B})`, "g");
1513
+ e = e == null ? void 0 : e.replace(r, '<emoji-component code="$1"></emoji-component>');
1510
1514
  }
1511
- this.editor.commands.setContent(t, !1);
1515
+ this.editor.commands.setContent(e, !1, { preserveWhitespace: "full" });
1512
1516
  }
1513
1517
  },
1514
1518
  destroyEditor() {
1515
1519
  this.editor.destroy();
1516
1520
  },
1521
+ insertPlainTextWithHardBreaks(e, t) {
1522
+ const { tr: n } = e.state, { from: r, to: s } = e.state.selection;
1523
+ n.deleteRange(r, s);
1524
+ const o = t.split(/\r?\n/);
1525
+ let i = r;
1526
+ for (let a = 0; a < o.length; a++)
1527
+ a > 0 && (n.insert(i, e.state.schema.nodes.hardBreak.create()), i++), n.insertText(o[a], i), i += o[a].length;
1528
+ e.dispatch(n);
1529
+ },
1530
+ shouldPreserveLineBreaks(e, t) {
1531
+ return this.pasteRichText ? !t && e && this.hasBlankLines(e) : !!e;
1532
+ },
1533
+ processPasteData(e, t, n) {
1534
+ if (this.shouldPreserveLineBreaks(t, n))
1535
+ return this.insertPlainTextWithHardBreaks(e, t), !0;
1536
+ if (this.shouldHandlePreformattedHTML(n)) {
1537
+ const r = this.extractPreformattedText(n);
1538
+ if (r && r.includes(`
1539
+ `))
1540
+ return this.insertPlainTextWithHardBreaks(e, r), !0;
1541
+ }
1542
+ return !1;
1543
+ },
1544
+ shouldHandlePreformattedHTML(e) {
1545
+ return this.pasteRichText && e && this.containsPreformattedContent(e);
1546
+ },
1547
+ containsPreformattedContent(e) {
1548
+ const t = document.createElement("div");
1549
+ t.innerHTML = e;
1550
+ const n = t.querySelectorAll("*");
1551
+ for (const r of n)
1552
+ if (this.hasPreWhitespace(r) && this.hasLineBreaks(r))
1553
+ return !0;
1554
+ return !1;
1555
+ },
1556
+ hasPreWhitespace(e) {
1557
+ const t = e.getAttribute("style") || "", n = e.style.whiteSpace || "", r = n === "pre" || n === "pre-wrap", s = t.includes("white-space: pre");
1558
+ return r || s;
1559
+ },
1560
+ hasLineBreaks(e) {
1561
+ return e.textContent && e.textContent.includes(`
1562
+ `);
1563
+ },
1564
+ hasBlankLines(e) {
1565
+ return e.includes(`
1566
+
1567
+ `) || /\n\s*\n/.test(e);
1568
+ },
1569
+ extractPreformattedText(e) {
1570
+ const t = document.createElement("div");
1571
+ return t.innerHTML = e, this.walkAndExtractText(t);
1572
+ },
1573
+ walkAndExtractText(e) {
1574
+ let t = "";
1575
+ if (e.nodeType === Node.TEXT_NODE)
1576
+ t += e.textContent;
1577
+ else if (e.nodeType === Node.ELEMENT_NODE)
1578
+ if (this.hasPreWhitespace(e))
1579
+ t += e.textContent;
1580
+ else
1581
+ for (const n of e.childNodes)
1582
+ t += this.walkAndExtractText(n);
1583
+ return t;
1584
+ },
1517
1585
  triggerInputChangeEvents() {
1518
- const t = this.getOutput();
1519
- this.$emit("input", t), this.$emit("update:value", t);
1520
- const e = this.editor.getJSON();
1521
- this.$emit("json-input", e);
1522
- const r = this.editor.getHTML();
1523
- this.$emit("html-input", r);
1524
- const n = this.editor.getText({ blockSeparator: `
1586
+ const e = this.getOutput();
1587
+ this.$emit("input", e), this.$emit("update:value", e);
1588
+ const t = this.editor.getJSON();
1589
+ this.$emit("json-input", t);
1590
+ const n = this.editor.getHTML();
1591
+ this.$emit("html-input", n);
1592
+ const r = this.editor.getText({ blockSeparator: `
1525
1593
  ` });
1526
- this.$emit("text-input", n);
1594
+ this.$emit("text-input", r);
1527
1595
  },
1528
1596
  /**
1529
1597
  * The Editor exposes event hooks that we have to map our emits into. See
@@ -1533,18 +1601,18 @@ ${n.textContent}
1533
1601
  this.editor.on("create", () => {
1534
1602
  this.triggerInputChangeEvents();
1535
1603
  }), this.editor.on("update", () => {
1536
- var t, e;
1537
- if (this.preventTyping && ((e = (t = this.editor.view) == null ? void 0 : t.input) == null ? void 0 : e.lastKeyCode) !== 8) {
1604
+ var e, t;
1605
+ if (this.preventTyping && ((t = (e = this.editor.view) == null ? void 0 : e.input) == null ? void 0 : t.lastKeyCode) !== 8) {
1538
1606
  this.editor.commands.setContent(this.value, !1);
1539
1607
  return;
1540
1608
  }
1541
1609
  this.triggerInputChangeEvents();
1542
- }), this.editor.on("selectionUpdate", ({ editor: t }) => {
1543
- this.$emit("selected", this.getSelectedLinkText(t));
1544
- }), this.editor.on("focus", ({ event: t }) => {
1545
- this.$emit("focus", t);
1546
- }), this.editor.on("blur", ({ event: t }) => {
1547
- this.$emit("blur", t);
1610
+ }), this.editor.on("selectionUpdate", ({ editor: e }) => {
1611
+ this.$emit("selected", this.getSelectedLinkText(e));
1612
+ }), this.editor.on("focus", ({ event: e }) => {
1613
+ this.$emit("focus", e);
1614
+ }), this.editor.on("blur", ({ event: e }) => {
1615
+ this.$emit("blur", e);
1548
1616
  });
1549
1617
  },
1550
1618
  getOutput() {
@@ -1559,17 +1627,17 @@ ${n.textContent}
1559
1627
  ` });
1560
1628
  }
1561
1629
  },
1562
- getExtension(t, e) {
1563
- var r;
1564
- return typeof e == "boolean" ? t : (r = t.configure) == null ? void 0 : r.call(t, e);
1630
+ getExtension(e, t) {
1631
+ var n;
1632
+ return typeof t == "boolean" ? e : (n = e.configure) == null ? void 0 : n.call(e, t);
1565
1633
  },
1566
- updateEditorAttributes(t) {
1634
+ updateEditorAttributes(e) {
1567
1635
  this.editor.setOptions({
1568
1636
  editorProps: {
1569
1637
  attributes: {
1570
1638
  ...this.inputAttrs,
1571
1639
  class: this.inputClass,
1572
- ...t
1640
+ ...e
1573
1641
  }
1574
1642
  }
1575
1643
  });
@@ -1579,15 +1647,15 @@ ${n.textContent}
1579
1647
  }
1580
1648
  }
1581
1649
  };
1582
- var Jt = function() {
1583
- var e = this, r = e._self._c;
1584
- return r("div", [e.editor && e.link && !e.hideLinkBubbleMenu ? r("bubble-menu", { staticStyle: { visibility: "visible" }, attrs: { editor: e.editor, "should-show": e.bubbleMenuShouldShow, "tippy-options": e.tippyOptions } }, [r("div", { staticClass: "d-popover__dialog" }, [r("dt-stack", { staticClass: "d-rich-text-editor-bubble-menu__button-stack", attrs: { direction: "row", gap: "0" } }, [r("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: e.editLink } }, [e._v(" Edit ")]), r("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: e.openLink } }, [e._v(" Open link ")]), r("dt-button", { attrs: { kind: "danger", importance: "clear" }, on: { click: e.removeLink } }, [e._v(" Remove ")])], 1)], 1)]) : e._e(), r("editor-content", e._g({ ref: "editor", staticClass: "d-rich-text-editor", attrs: { editor: e.editor, "data-qa": "dt-rich-text-editor" } }, e.editorListeners))], 1);
1585
- }, Yt = [], Gt = /* @__PURE__ */ c(
1586
- Xt,
1650
+ var Yt = function() {
1651
+ var t = this, n = t._self._c;
1652
+ return n("div", [t.editor && t.link && !t.hideLinkBubbleMenu ? n("bubble-menu", { staticStyle: { visibility: "visible" }, attrs: { editor: t.editor, "should-show": t.bubbleMenuShouldShow, "tippy-options": t.tippyOptions } }, [n("div", { staticClass: "d-popover__dialog" }, [n("dt-stack", { staticClass: "d-rich-text-editor-bubble-menu__button-stack", attrs: { direction: "row", gap: "0" } }, [n("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: t.editLink } }, [t._v(" " + t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL")) + " ")]), n("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: t.openLink } }, [t._v(" " + t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL")) + " ")]), n("dt-button", { attrs: { kind: "danger", importance: "clear" }, on: { click: t.removeLink } }, [t._v(" " + t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL")) + " ")])], 1)], 1)]) : t._e(), n("editor-content", t._g({ ref: "editor", staticClass: "d-rich-text-editor", attrs: { editor: t.editor, "data-qa": "dt-rich-text-editor" } }, t.editorListeners))], 1);
1653
+ }, Gt = [], Qt = /* @__PURE__ */ c(
1587
1654
  Jt,
1588
- Yt
1655
+ Yt,
1656
+ Gt
1589
1657
  );
1590
- const Kn = Gt.exports;
1658
+ const Kn = Qt.exports;
1591
1659
  export {
1592
1660
  Kn as default
1593
1661
  };