@dialpad/dialtone-vue 3.199.0 → 3.199.1

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 (456) hide show
  1. package/README.md +15 -14
  2. package/dist/component-documentation.json +1 -1
  3. package/dist/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  4. package/dist/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  5. package/dist/lib/attachment-carousel/attachment-carousel.js +28 -28
  6. package/dist/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  7. package/dist/lib/avatar/avatar.cjs.map +1 -1
  8. package/dist/lib/avatar/avatar.js.map +1 -1
  9. package/dist/lib/badge/badge.cjs.map +1 -1
  10. package/dist/lib/badge/badge.js.map +1 -1
  11. package/dist/lib/banner/banner.cjs.map +1 -1
  12. package/dist/lib/banner/banner.js.map +1 -1
  13. package/dist/lib/breadcrumbs/breadcrumb-item.cjs.map +1 -1
  14. package/dist/lib/breadcrumbs/breadcrumb-item.js.map +1 -1
  15. package/dist/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  16. package/dist/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
  17. package/dist/lib/breadcrumbs/breadcrumbs.js +5 -5
  18. package/dist/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  19. package/dist/lib/button/button.cjs.map +1 -1
  20. package/dist/lib/button/button.js.map +1 -1
  21. package/dist/lib/button-group/button-group.cjs.map +1 -1
  22. package/dist/lib/button-group/button-group.js.map +1 -1
  23. package/dist/lib/button-group/buttons-decorator.cjs +1 -1
  24. package/dist/lib/button-group/buttons-decorator.cjs.map +1 -1
  25. package/dist/lib/button-group/buttons-decorator.js +17 -17
  26. package/dist/lib/button-group/buttons-decorator.js.map +1 -1
  27. package/dist/lib/callbar-button/callbar-button.cjs.map +1 -1
  28. package/dist/lib/callbar-button/callbar-button.js.map +1 -1
  29. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  30. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +0 -1
  31. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  32. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  33. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.js +0 -1
  34. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  35. package/dist/lib/callbox/callbox.cjs.map +1 -1
  36. package/dist/lib/callbox/callbox.js.map +1 -1
  37. package/dist/lib/card/card.cjs.map +1 -1
  38. package/dist/lib/card/card.js.map +1 -1
  39. package/dist/lib/checkbox/checkbox.cjs.map +1 -1
  40. package/dist/lib/checkbox/checkbox.js.map +1 -1
  41. package/dist/lib/checkbox-group/checkboxes-decorator.cjs.map +1 -1
  42. package/dist/lib/checkbox-group/checkboxes-decorator.js.map +1 -1
  43. package/dist/lib/chip/chip.cjs.map +1 -1
  44. package/dist/lib/chip/chip.js.map +1 -1
  45. package/dist/lib/codeblock/codeblock.cjs +2 -2
  46. package/dist/lib/codeblock/codeblock.cjs.map +1 -1
  47. package/dist/lib/codeblock/codeblock.js +11 -11
  48. package/dist/lib/codeblock/codeblock.js.map +1 -1
  49. package/dist/lib/collapsible/collapsible-lazy-show.cjs.map +1 -1
  50. package/dist/lib/collapsible/collapsible-lazy-show.js.map +1 -1
  51. package/dist/lib/collapsible/collapsible.cjs.map +1 -1
  52. package/dist/lib/collapsible/collapsible.js.map +1 -1
  53. package/dist/lib/combobox/combobox-empty-list.cjs.map +1 -1
  54. package/dist/lib/combobox/combobox-empty-list.js.map +1 -1
  55. package/dist/lib/combobox/combobox-loading-list.cjs +1 -1
  56. package/dist/lib/combobox/combobox-loading-list.cjs.map +1 -1
  57. package/dist/lib/combobox/combobox-loading-list.js +2 -2
  58. package/dist/lib/combobox/combobox-loading-list.js.map +1 -1
  59. package/dist/lib/combobox/combobox.cjs.map +1 -1
  60. package/dist/lib/combobox/combobox.js.map +1 -1
  61. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  62. package/dist/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  63. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  64. package/dist/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  65. package/dist/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
  66. package/dist/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  67. package/dist/lib/contact-info/contact-info.cjs.map +1 -1
  68. package/dist/lib/contact-info/contact-info.js.map +1 -1
  69. package/dist/lib/contact-row/contact-row.cjs.map +1 -1
  70. package/dist/lib/contact-row/contact-row.js.map +1 -1
  71. package/dist/lib/datepicker/datepicker.cjs.map +1 -1
  72. package/dist/lib/datepicker/datepicker.js.map +1 -1
  73. package/dist/lib/description-list/description-list.cjs.map +1 -1
  74. package/dist/lib/description-list/description-list.js.map +1 -1
  75. package/dist/lib/dropdown/dropdown-list.cjs.map +1 -1
  76. package/dist/lib/dropdown/dropdown-list.js.map +1 -1
  77. package/dist/lib/dropdown/dropdown.cjs.map +1 -1
  78. package/dist/lib/dropdown/dropdown.js.map +1 -1
  79. package/dist/lib/editor/editor.cjs +1 -1
  80. package/dist/lib/editor/editor.cjs.map +1 -1
  81. package/dist/lib/editor/editor.js +14 -14
  82. package/dist/lib/editor/editor.js.map +1 -1
  83. package/dist/lib/emoji/emoji.cjs.map +1 -1
  84. package/dist/lib/emoji/emoji.js.map +1 -1
  85. package/dist/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  86. package/dist/lib/emoji-picker/emoji-picker.js.map +1 -1
  87. package/dist/lib/emoji-row/emoji-row.cjs +1 -1
  88. package/dist/lib/emoji-row/emoji-row.cjs.map +1 -1
  89. package/dist/lib/emoji-row/emoji-row.js +20 -20
  90. package/dist/lib/emoji-row/emoji-row.js.map +1 -1
  91. package/dist/lib/empty-state/empty-state.cjs.map +1 -1
  92. package/dist/lib/empty-state/empty-state.js.map +1 -1
  93. package/dist/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
  94. package/dist/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  95. package/dist/lib/feed-item-row/feed-item-row.cjs +1 -1
  96. package/dist/lib/feed-item-row/feed-item-row.cjs.map +1 -1
  97. package/dist/lib/feed-item-row/feed-item-row.js +52 -48
  98. package/dist/lib/feed-item-row/feed-item-row.js.map +1 -1
  99. package/dist/lib/general-row/general-row.cjs +1 -1
  100. package/dist/lib/general-row/general-row.cjs.map +1 -1
  101. package/dist/lib/general-row/general-row.js +43 -43
  102. package/dist/lib/general-row/general-row.js.map +1 -1
  103. package/dist/lib/general-row/leftbar-general-row-icon.cjs.map +1 -1
  104. package/dist/lib/general-row/leftbar-general-row-icon.js.map +1 -1
  105. package/dist/lib/group-row/group-row.cjs.map +1 -1
  106. package/dist/lib/group-row/group-row.js.map +1 -1
  107. package/dist/lib/grouped-chip/grouped-chip.cjs.map +1 -1
  108. package/dist/lib/grouped-chip/grouped-chip.js.map +1 -1
  109. package/dist/lib/hovercard/hovercard.cjs.map +1 -1
  110. package/dist/lib/hovercard/hovercard.js.map +1 -1
  111. package/dist/lib/icon/icon.cjs.map +1 -1
  112. package/dist/lib/icon/icon.js.map +1 -1
  113. package/dist/lib/illustration/illustration.cjs.map +1 -1
  114. package/dist/lib/illustration/illustration.js.map +1 -1
  115. package/dist/lib/image-viewer/image-viewer.cjs.map +1 -1
  116. package/dist/lib/image-viewer/image-viewer.js.map +1 -1
  117. package/dist/lib/input/input.cjs +1 -1
  118. package/dist/lib/input/input.cjs.map +1 -1
  119. package/dist/lib/input/input.js +11 -9
  120. package/dist/lib/input/input.js.map +1 -1
  121. package/dist/lib/input-group/input-group.cjs.map +1 -1
  122. package/dist/lib/input-group/input-group.js.map +1 -1
  123. package/dist/lib/item-layout/item-layout.cjs.map +1 -1
  124. package/dist/lib/item-layout/item-layout.js.map +1 -1
  125. package/dist/lib/ivr-node/ivr-node.cjs.map +1 -1
  126. package/dist/lib/ivr-node/ivr-node.js.map +1 -1
  127. package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs.map +1 -1
  128. package/dist/lib/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  129. package/dist/lib/lazy-show/lazy-show.cjs.map +1 -1
  130. package/dist/lib/lazy-show/lazy-show.js.map +1 -1
  131. package/dist/lib/link/link.cjs.map +1 -1
  132. package/dist/lib/link/link.js.map +1 -1
  133. package/dist/lib/list-item/list-item.cjs.map +1 -1
  134. package/dist/lib/list-item/list-item.js.map +1 -1
  135. package/dist/lib/list-item-group/list-item-group.cjs.map +1 -1
  136. package/dist/lib/list-item-group/list-item-group.js.map +1 -1
  137. package/dist/lib/loader/loader.cjs.map +1 -1
  138. package/dist/lib/loader/loader.js.map +1 -1
  139. package/dist/lib/message-input/last-active-nodes.cjs.map +1 -1
  140. package/dist/lib/message-input/last-active-nodes.js.map +1 -1
  141. package/dist/lib/message-input/message-input-button.cjs.map +1 -1
  142. package/dist/lib/message-input/message-input-button.js.map +1 -1
  143. package/dist/lib/message-input/message-input-link.cjs.map +1 -1
  144. package/dist/lib/message-input/message-input-link.js.map +1 -1
  145. package/dist/lib/message-input/message-input-topbar.cjs +1 -1
  146. package/dist/lib/message-input/message-input-topbar.cjs.map +1 -1
  147. package/dist/lib/message-input/message-input-topbar.js +25 -25
  148. package/dist/lib/message-input/message-input-topbar.js.map +1 -1
  149. package/dist/lib/message-input/message-input.cjs +1 -1
  150. package/dist/lib/message-input/message-input.cjs.map +1 -1
  151. package/dist/lib/message-input/message-input.js +2 -2
  152. package/dist/lib/message-input/message-input.js.map +1 -1
  153. package/dist/lib/modal/modal.cjs.map +1 -1
  154. package/dist/lib/modal/modal.js.map +1 -1
  155. package/dist/lib/motion-text/motion-text.cjs.map +1 -1
  156. package/dist/lib/motion-text/motion-text.js.map +1 -1
  157. package/dist/lib/notice/notice-action.cjs.map +1 -1
  158. package/dist/lib/notice/notice-action.js.map +1 -1
  159. package/dist/lib/notice/notice-content.cjs.map +1 -1
  160. package/dist/lib/notice/notice-content.js.map +1 -1
  161. package/dist/lib/notice/notice-icon.cjs.map +1 -1
  162. package/dist/lib/notice/notice-icon.js.map +1 -1
  163. package/dist/lib/notice/notice.cjs.map +1 -1
  164. package/dist/lib/notice/notice.js.map +1 -1
  165. package/dist/lib/pagination/pagination.cjs.map +1 -1
  166. package/dist/lib/pagination/pagination.js.map +1 -1
  167. package/dist/lib/popover/popover-header-footer.cjs.map +1 -1
  168. package/dist/lib/popover/popover-header-footer.js.map +1 -1
  169. package/dist/lib/popover/popover.cjs.map +1 -1
  170. package/dist/lib/popover/popover.js.map +1 -1
  171. package/dist/lib/presence/presence.cjs.map +1 -1
  172. package/dist/lib/presence/presence.js.map +1 -1
  173. package/dist/lib/radio/radio.cjs.map +1 -1
  174. package/dist/lib/radio/radio.js.map +1 -1
  175. package/dist/lib/radio-group/radios-decorator.cjs.map +1 -1
  176. package/dist/lib/radio-group/radios-decorator.js.map +1 -1
  177. package/dist/lib/rich-text-editor/channel-suggestion.cjs +1 -1
  178. package/dist/lib/rich-text-editor/channel-suggestion.cjs.map +1 -1
  179. package/dist/lib/rich-text-editor/channel-suggestion.js +12 -8
  180. package/dist/lib/rich-text-editor/channel-suggestion.js.map +1 -1
  181. package/dist/lib/rich-text-editor/rich-text-editor.cjs +10 -8
  182. package/dist/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  183. package/dist/lib/rich-text-editor/rich-text-editor.js +58 -55
  184. package/dist/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  185. package/dist/lib/root-layout/root-layout.cjs.map +1 -1
  186. package/dist/lib/root-layout/root-layout.js.map +1 -1
  187. package/dist/lib/scroller/scroller.cjs.map +1 -1
  188. package/dist/lib/scroller/scroller.js.map +1 -1
  189. package/dist/lib/select-menu/select-menu.cjs +1 -1
  190. package/dist/lib/select-menu/select-menu.cjs.map +1 -1
  191. package/dist/lib/select-menu/select-menu.js +8 -8
  192. package/dist/lib/select-menu/select-menu.js.map +1 -1
  193. package/dist/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
  194. package/dist/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  195. package/dist/lib/skeleton/skeleton-list-item.cjs.map +1 -1
  196. package/dist/lib/skeleton/skeleton-list-item.js.map +1 -1
  197. package/dist/lib/skeleton/skeleton-paragraph.cjs.map +1 -1
  198. package/dist/lib/skeleton/skeleton-paragraph.js.map +1 -1
  199. package/dist/lib/skeleton/skeleton-shape.cjs.map +1 -1
  200. package/dist/lib/skeleton/skeleton-shape.js.map +1 -1
  201. package/dist/lib/skeleton/skeleton-text.cjs.map +1 -1
  202. package/dist/lib/skeleton/skeleton-text.js.map +1 -1
  203. package/dist/lib/skeleton/skeleton.cjs.map +1 -1
  204. package/dist/lib/skeleton/skeleton.js.map +1 -1
  205. package/dist/lib/split-button/split-button-alpha.cjs.map +1 -1
  206. package/dist/lib/split-button/split-button-alpha.js.map +1 -1
  207. package/dist/lib/split-button/split-button-omega.cjs.map +1 -1
  208. package/dist/lib/split-button/split-button-omega.js.map +1 -1
  209. package/dist/lib/split-button/split-button.cjs +1 -1
  210. package/dist/lib/split-button/split-button.cjs.map +1 -1
  211. package/dist/lib/split-button/split-button.js +44 -21
  212. package/dist/lib/split-button/split-button.js.map +1 -1
  213. package/dist/lib/stack/stack.cjs.map +1 -1
  214. package/dist/lib/stack/stack.js.map +1 -1
  215. package/dist/lib/tab/tab-group.cjs.map +1 -1
  216. package/dist/lib/tab/tab-group.js.map +1 -1
  217. package/dist/lib/tab/tab-panel.cjs.map +1 -1
  218. package/dist/lib/tab/tab-panel.js.map +1 -1
  219. package/dist/lib/tab/tab.cjs.map +1 -1
  220. package/dist/lib/tab/tab.js.map +1 -1
  221. package/dist/lib/time-pill/time-pill.cjs.map +1 -1
  222. package/dist/lib/time-pill/time-pill.js.map +1 -1
  223. package/dist/lib/toast/toast.cjs.map +1 -1
  224. package/dist/lib/toast/toast.js.map +1 -1
  225. package/dist/lib/toggle/toggle.cjs.map +1 -1
  226. package/dist/lib/toggle/toggle.js.map +1 -1
  227. package/dist/lib/tooltip/tooltip.cjs.map +1 -1
  228. package/dist/lib/tooltip/tooltip.js.map +1 -1
  229. package/dist/lib/top-banner-info/top-banner-info.cjs.map +1 -1
  230. package/dist/lib/top-banner-info/top-banner-info.js.map +1 -1
  231. package/dist/lib/unread-pill/unread-pill.cjs.map +1 -1
  232. package/dist/lib/unread-pill/unread-pill.js.map +1 -1
  233. package/dist/lib/validation-messages/validation-messages.cjs.map +1 -1
  234. package/dist/lib/validation-messages/validation-messages.js.map +1 -1
  235. package/dist/localization/de-DE.cjs.map +1 -1
  236. package/dist/localization/de-DE.js.map +1 -1
  237. package/dist/localization/en-US.cjs.map +1 -1
  238. package/dist/localization/en-US.js.map +1 -1
  239. package/dist/localization/es-LA.cjs.map +1 -1
  240. package/dist/localization/es-LA.js.map +1 -1
  241. package/dist/localization/fr-FR.cjs.map +1 -1
  242. package/dist/localization/fr-FR.js.map +1 -1
  243. package/dist/localization/it-IT.cjs.map +1 -1
  244. package/dist/localization/it-IT.js.map +1 -1
  245. package/dist/localization/ja-JP.cjs.map +1 -1
  246. package/dist/localization/ja-JP.js.map +1 -1
  247. package/dist/localization/nl-NL.cjs.map +1 -1
  248. package/dist/localization/nl-NL.js.map +1 -1
  249. package/dist/localization/pt-BR.cjs.map +1 -1
  250. package/dist/localization/pt-BR.js.map +1 -1
  251. package/dist/localization/ru-RU.cjs.map +1 -1
  252. package/dist/localization/ru-RU.js.map +1 -1
  253. package/dist/localization/zh-CN.cjs.map +1 -1
  254. package/dist/localization/zh-CN.js.map +1 -1
  255. package/dist/node_modules/@tiptap/vue-3.cjs.map +1 -1
  256. package/dist/node_modules/@tiptap/vue-3.js.map +1 -1
  257. package/dist/shared/sr_only_close_button.cjs.map +1 -1
  258. package/dist/shared/sr_only_close_button.js.map +1 -1
  259. package/dist/types/common/sr_only_close_button.vue.d.ts +210 -2
  260. package/dist/types/common/sr_only_close_button.vue.d.ts.map +1 -1
  261. package/dist/types/components/avatar/avatar.vue.d.ts +38 -13
  262. package/dist/types/components/avatar/avatar.vue.d.ts.map +1 -1
  263. package/dist/types/components/badge/badge.vue.d.ts +4 -4
  264. package/dist/types/components/banner/banner.vue.d.ts +693 -5
  265. package/dist/types/components/banner/banner.vue.d.ts.map +1 -1
  266. package/dist/types/components/breadcrumbs/breadcrumb_item.vue.d.ts +40 -4
  267. package/dist/types/components/breadcrumbs/breadcrumb_item.vue.d.ts.map +1 -1
  268. package/dist/types/components/breadcrumbs/breadcrumbs.vue.d.ts +90 -4
  269. package/dist/types/components/button/button.vue.d.ts +6 -6
  270. package/dist/types/components/button_group/button_group.vue.d.ts +4 -4
  271. package/dist/types/components/card/card.vue.d.ts +4 -4
  272. package/dist/types/components/checkbox/checkbox.vue.d.ts +43 -2
  273. package/dist/types/components/checkbox/checkbox.vue.d.ts.map +1 -1
  274. package/dist/types/components/checkbox_group/checkbox_group.vue.d.ts +55 -14
  275. package/dist/types/components/chip/chip.vue.d.ts +213 -5
  276. package/dist/types/components/chip/chip.vue.d.ts.map +1 -1
  277. package/dist/types/components/codeblock/codeblock.vue.d.ts +3 -3
  278. package/dist/types/components/collapsible/collapsible.vue.d.ts +322 -6
  279. package/dist/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
  280. package/dist/types/components/collapsible/collapsible_lazy_show.vue.d.ts +4 -4
  281. package/dist/types/components/combobox/combobox.vue.d.ts +1273 -20
  282. package/dist/types/components/combobox/combobox.vue.d.ts.map +1 -1
  283. package/dist/types/components/combobox/combobox_empty-list.vue.d.ts +218 -4
  284. package/dist/types/components/combobox/combobox_empty-list.vue.d.ts.map +1 -1
  285. package/dist/types/components/combobox/combobox_loading-list.vue.d.ts +1017 -1
  286. package/dist/types/components/combobox/combobox_loading-list.vue.d.ts.map +1 -1
  287. package/dist/types/components/datepicker/composables/useCalendar.d.ts +1 -1
  288. package/dist/types/components/datepicker/composables/useMonthYearPicker.d.ts +2 -2
  289. package/dist/types/components/datepicker/datepicker.vue.d.ts +50 -1
  290. package/dist/types/components/datepicker/modules/calendar.vue.d.ts +1 -1
  291. package/dist/types/components/datepicker/modules/month-year-picker.vue.d.ts +1 -1
  292. package/dist/types/components/description_list/description_list.vue.d.ts +6 -6
  293. package/dist/types/components/dropdown/dropdown.vue.d.ts +910 -11
  294. package/dist/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  295. package/dist/types/components/dropdown/dropdown_separator.vue.d.ts +1 -1
  296. package/dist/types/components/emoji/emoji.vue.d.ts +807 -4
  297. package/dist/types/components/emoji_picker/composables/useKeyboardNavigation.d.ts +3 -3
  298. package/dist/types/components/emoji_picker/emoji_picker.vue.d.ts +473 -1
  299. package/dist/types/components/emoji_picker/modules/emoji_description.vue.d.ts +1 -1
  300. package/dist/types/components/emoji_picker/modules/emoji_search.vue.d.ts +379 -1
  301. package/dist/types/components/emoji_picker/modules/emoji_search.vue.d.ts.map +1 -1
  302. package/dist/types/components/emoji_picker/modules/emoji_selector.vue.d.ts +4 -1
  303. package/dist/types/components/emoji_picker/modules/emoji_selector.vue.d.ts.map +1 -1
  304. package/dist/types/components/emoji_picker/modules/emoji_skin_selector.vue.d.ts +3 -1
  305. package/dist/types/components/emoji_picker/modules/emoji_skin_selector.vue.d.ts.map +1 -1
  306. package/dist/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts +1 -1
  307. package/dist/types/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts +871 -4
  308. package/dist/types/components/empty_state/empty_state.vue.d.ts +1 -1
  309. package/dist/types/components/empty_state/empty_state.vue.d.ts.map +1 -1
  310. package/dist/types/components/hovercard/hovercard.vue.d.ts +1558 -156
  311. package/dist/types/components/hovercard/hovercard.vue.d.ts.map +1 -1
  312. package/dist/types/components/icon/icon.vue.d.ts +5 -5
  313. package/dist/types/components/illustration/illustration.vue.d.ts +1 -1
  314. package/dist/types/components/image_viewer/image_viewer.vue.d.ts +430 -5
  315. package/dist/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  316. package/dist/types/components/input/input.vue.d.ts +51 -10
  317. package/dist/types/components/input/input.vue.d.ts.map +1 -1
  318. package/dist/types/components/input_group/input_group.vue.d.ts +49 -8
  319. package/dist/types/components/input_group/input_group.vue.d.ts.map +1 -1
  320. package/dist/types/components/item_layout/item_layout.vue.d.ts +5 -5
  321. package/dist/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +489 -16
  322. package/dist/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
  323. package/dist/types/components/lazy_show/lazy_show.vue.d.ts +4 -4
  324. package/dist/types/components/link/link.vue.d.ts +4 -4
  325. package/dist/types/components/list_item/list_item.vue.d.ts +124 -5
  326. package/dist/types/components/list_item/list_item.vue.d.ts.map +1 -1
  327. package/dist/types/components/list_item_group/list_item_group.vue.d.ts +4 -4
  328. package/dist/types/components/loader/loader.vue.d.ts +35 -4
  329. package/dist/types/components/loader/loader.vue.d.ts.map +1 -1
  330. package/dist/types/components/modal/modal.vue.d.ts +466 -6
  331. package/dist/types/components/modal/modal.vue.d.ts.map +1 -1
  332. package/dist/types/components/notice/notice.vue.d.ts +693 -5
  333. package/dist/types/components/notice/notice.vue.d.ts.map +1 -1
  334. package/dist/types/components/notice/notice_action.vue.d.ts +430 -5
  335. package/dist/types/components/notice/notice_action.vue.d.ts.map +1 -1
  336. package/dist/types/components/notice/notice_content.vue.d.ts +4 -4
  337. package/dist/types/components/notice/notice_icon.vue.d.ts +185 -5
  338. package/dist/types/components/notice/notice_icon.vue.d.ts.map +1 -1
  339. package/dist/types/components/pagination/pagination.vue.d.ts +273 -5
  340. package/dist/types/components/pagination/pagination.vue.d.ts.map +1 -1
  341. package/dist/types/components/popover/popover.vue.d.ts +509 -9
  342. package/dist/types/components/popover/popover.vue.d.ts.map +1 -1
  343. package/dist/types/components/popover/popover_header_footer.vue.d.ts +213 -5
  344. package/dist/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
  345. package/dist/types/components/presence/presence.vue.d.ts +4 -4
  346. package/dist/types/components/radio/radio.vue.d.ts +46 -5
  347. package/dist/types/components/radio/radio.vue.d.ts.map +1 -1
  348. package/dist/types/components/radio_group/radio_group.vue.d.ts +55 -14
  349. package/dist/types/components/rich_text_editor/channel_suggestion.d.ts +2 -0
  350. package/dist/types/components/rich_text_editor/channel_suggestion.d.ts.map +1 -1
  351. package/dist/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +150 -3
  352. package/dist/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts.map +1 -1
  353. package/dist/types/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.d.ts +132 -3
  354. package/dist/types/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.d.ts.map +1 -1
  355. package/dist/types/components/rich_text_editor/extensions/channels/channel.d.ts.map +1 -1
  356. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +883 -3
  357. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.d.ts +938 -3
  358. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +52 -3
  359. package/dist/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +319 -3
  360. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +18 -4
  361. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.d.ts +3 -3
  362. package/dist/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts +217 -3
  363. package/dist/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts.map +1 -1
  364. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +327 -7
  365. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  366. package/dist/types/components/root_layout/root_layout.vue.d.ts +4 -4
  367. package/dist/types/components/scroller/modules/core_scroller.vue.d.ts +4 -1
  368. package/dist/types/components/scroller/modules/core_scroller.vue.d.ts.map +1 -1
  369. package/dist/types/components/scroller/modules/dynamic_scroller.vue.d.ts +503 -7
  370. package/dist/types/components/scroller/modules/scroller_item.vue.d.ts +4 -4
  371. package/dist/types/components/scroller/scroller.vue.d.ts +634 -123
  372. package/dist/types/components/scroller/scroller.vue.d.ts.map +1 -1
  373. package/dist/types/components/select_menu/select_menu.vue.d.ts +47 -6
  374. package/dist/types/components/select_menu/select_menu.vue.d.ts.map +1 -1
  375. package/dist/types/components/skeleton/skeleton-list-item.vue.d.ts +278 -4
  376. package/dist/types/components/skeleton/skeleton-paragraph.vue.d.ts +91 -5
  377. package/dist/types/components/skeleton/skeleton-shape.vue.d.ts +5 -5
  378. package/dist/types/components/skeleton/skeleton-text.vue.d.ts +4 -4
  379. package/dist/types/components/skeleton/skeleton.vue.d.ts +725 -8
  380. package/dist/types/components/split_button/split_button-alpha.vue.d.ts +184 -6
  381. package/dist/types/components/split_button/split_button-omega.vue.d.ts +213 -5
  382. package/dist/types/components/split_button/split_button-omega.vue.d.ts.map +1 -1
  383. package/dist/types/components/split_button/split_button.vue.d.ts +1804 -24
  384. package/dist/types/components/split_button/split_button.vue.d.ts.map +1 -1
  385. package/dist/types/components/stack/stack.vue.d.ts +4 -4
  386. package/dist/types/components/tab/tab.vue.d.ts +183 -5
  387. package/dist/types/components/tab/tab_group.vue.d.ts +11 -5
  388. package/dist/types/components/tab/tab_panel.vue.d.ts +5 -5
  389. package/dist/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +671 -4
  390. package/dist/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  391. package/dist/types/components/toast/layouts/toast_layout_alternate_icon.vue.d.ts +155 -5
  392. package/dist/types/components/toast/layouts/toast_layout_alternate_icon.vue.d.ts.map +1 -1
  393. package/dist/types/components/toast/layouts/toast_layout_default.vue.d.ts +693 -5
  394. package/dist/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
  395. package/dist/types/components/toast/toast.vue.d.ts +2928 -13
  396. package/dist/types/components/toast/toast.vue.d.ts.map +1 -1
  397. package/dist/types/components/toggle/toggle.vue.d.ts +5 -5
  398. package/dist/types/components/tooltip/tooltip.vue.d.ts +9 -9
  399. package/dist/types/components/validation_messages/validation_messages.vue.d.ts +4 -4
  400. package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +442 -9
  401. package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts.map +1 -1
  402. package/dist/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +1975 -6
  403. package/dist/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  404. package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1701 -6
  405. package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  406. package/dist/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +1768 -6
  407. package/dist/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  408. package/dist/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts +309 -1
  409. package/dist/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts.map +1 -1
  410. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  411. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +3634 -11
  412. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  413. package/dist/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +1014 -4
  414. package/dist/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  415. package/dist/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +749 -4
  416. package/dist/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
  417. package/dist/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +4 -4
  418. package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts +3051 -24
  419. package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  420. package/dist/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +2202 -5
  421. package/dist/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
  422. package/dist/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +556 -6
  423. package/dist/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  424. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +665 -13
  425. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  426. package/dist/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +343 -4
  427. package/dist/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
  428. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +6995 -7
  429. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  430. package/dist/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts +1026 -5
  431. package/dist/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts.map +1 -1
  432. package/dist/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +2525 -5
  433. package/dist/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
  434. package/dist/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +1383 -5
  435. package/dist/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
  436. package/dist/types/recipes/conversation_view/time_pill/time_pill.vue.d.ts +3 -3
  437. package/dist/types/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts +212 -4
  438. package/dist/types/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts.map +1 -1
  439. package/dist/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +341 -5
  440. package/dist/types/recipes/leftbar/callbox/callbox.vue.d.ts +414 -6
  441. package/dist/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  442. package/dist/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +1273 -7
  443. package/dist/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  444. package/dist/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +3400 -5
  445. package/dist/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  446. package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts +2054 -16
  447. package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  448. package/dist/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +485 -5
  449. package/dist/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts.map +1 -1
  450. package/dist/types/recipes/leftbar/group_row/group_row.vue.d.ts +2257 -7
  451. package/dist/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
  452. package/dist/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +65 -4
  453. package/dist/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  454. package/dist/types/recipes/motion/motion_text/motion_text.vue.d.ts +1 -1
  455. package/dist/types/recipes/notices/top_banner_info/top_banner_info.vue.d.ts +4 -4
  456. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"radios-decorator.cjs","sources":["../../../components/radio_group/radios_decorator.vue"],"sourcesContent":["<template>\n <div>\n <dt-radio\n v-for=\"option in options\"\n :key=\"option.value\"\n :value=\"option.value\"\n >\n <span>{{ option.label }}</span>\n </dt-radio>\n </div>\n</template>\n\n<script>\nimport { DtRadio } from '../radio';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'RadiosDecorator',\n components: { DtRadio },\n created () {\n this.options = [\n { label: 'Apple', value: 'apple' },\n { label: 'Banana', value: 'banana' },\n { label: 'Other', value: 'other' },\n ];\n },\n};\n</script>\n"],"names":["_sfc_main","DtRadio","_createElementBlock","_openBlock","_Fragment","_renderList","_ctx","option","_createBlock","_component_dt_radio","_withCtx","_createElementVNode","_toDisplayString"],"mappings":"6NAeKA,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,kBACN,WAAY,CAAA,QAAEC,EAAAA,SACd,SAAW,CACT,KAAK,QAAU,CACb,CAAE,MAAO,QAAS,MAAO,OAAM,EAC/B,CAAE,MAAO,SAAU,MAAO,UAC1B,CAAE,MAAO,QAAS,MAAO,OAAM,EAEnC,CACF,sFAzBEC,qBAQM,MAAA,KAAA,EAPJC,YAAA,EAAA,EAAAD,EAAAA,mBAMWE,EAAAA,SAAA,KARfC,EAAAA,WAGuBC,EAAA,QAAVC,kBADTC,EAAAA,YAMWC,EAAA,CAJR,IAAKF,EAAO,MACZ,MAAOA,EAAO,QALrB,QAAAG,EAAAA,QAOM,IAA+B,CAA/BC,EAAAA,mBAA+B,OAAA,KAAAC,EAAAA,gBAAtBL,EAAO,KAAK,EAAA,CAAA,IAP3B,EAAA"}
1
+ {"version":3,"file":"radios-decorator.cjs","sources":["../../../components/radio_group/radios_decorator.vue"],"sourcesContent":["<template>\n <div>\n <dt-radio\n v-for=\"option in options\"\n :key=\"option.value\"\n :value=\"option.value\"\n >\n <span>{{ option.label }}</span>\n </dt-radio>\n </div>\n</template>\n\n<script>\nimport { DtRadio } from '../radio';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'RadiosDecorator',\n components: { DtRadio },\n created () {\n this.options = [\n { label: 'Apple', value: 'apple' },\n { label: 'Banana', value: 'banana' },\n { label: 'Other', value: 'other' },\n ];\n },\n};\n</script>\n"],"names":["_sfc_main","DtRadio","_createElementBlock","_Fragment","_renderList","_ctx","option","_createBlock","_component_dt_radio","_createElementVNode","_toDisplayString"],"mappings":"6NAeKA,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,kBACN,WAAY,CAAA,QAAEC,EAAAA,SACd,SAAW,CACT,KAAK,QAAU,CACb,CAAE,MAAO,QAAS,MAAO,OAAM,EAC/B,CAAE,MAAO,SAAU,MAAO,UAC1B,CAAE,MAAO,QAAS,MAAO,OAAM,EAEnC,CACF,sFAzBEC,qBAQM,MAAA,KAAA,kBAPJA,EAAAA,mBAMWC,EAAAA,SAAA,KAAAC,EAAAA,WALQC,EAAA,QAAVC,kBADTC,EAAAA,YAMWC,EAAA,CAJR,IAAKF,EAAO,MACZ,MAAOA,EAAO,0BAEf,IAA+B,CAA/BG,EAAAA,mBAA+B,OAAA,KAAAC,EAAAA,gBAAtBJ,EAAO,KAAK,EAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"radios-decorator.js","sources":["../../../components/radio_group/radios_decorator.vue"],"sourcesContent":["<template>\n <div>\n <dt-radio\n v-for=\"option in options\"\n :key=\"option.value\"\n :value=\"option.value\"\n >\n <span>{{ option.label }}</span>\n </dt-radio>\n </div>\n</template>\n\n<script>\nimport { DtRadio } from '../radio';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'RadiosDecorator',\n components: { DtRadio },\n created () {\n this.options = [\n { label: 'Apple', value: 'apple' },\n { label: 'Banana', value: 'banana' },\n { label: 'Other', value: 'other' },\n ];\n },\n};\n</script>\n"],"names":["_sfc_main","DtRadio","_createElementBlock","_openBlock","_Fragment","_renderList","_ctx","option","_createBlock","_component_dt_radio","_withCtx","_createElementVNode","_toDisplayString"],"mappings":";;;AAeA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EACN,YAAY,EAAE,SAAAC;EACd,UAAW;AACT,SAAK,UAAU;AAAA,MACb,EAAE,OAAO,SAAS,OAAO,QAAM;AAAA,MAC/B,EAAE,OAAO,UAAU,OAAO;MAC1B,EAAE,OAAO,SAAS,OAAO,QAAM;AAAA;EAEnC;AACF;;;cAzBEC,EAQM,OAAA,MAAA;AAAA,KAPJC,EAAA,EAAA,GAAAD,EAMWE,GAAA,MARfC,EAGuBC,EAAA,SAHvB,CAGaC,YADTC,EAMWC,GAAA;AAAA,MAJR,KAAKF,EAAO;AAAA,MACZ,OAAOA,EAAO;AAAA;MALrB,SAAAG,EAOM,MAA+B;AAAA,QAA/BC,EAA+B,QAAA,MAAAC,EAAtBL,EAAO,KAAK,GAAA,CAAA;AAAA;MAP3B,GAAA;AAAA;;;;"}
1
+ {"version":3,"file":"radios-decorator.js","sources":["../../../components/radio_group/radios_decorator.vue"],"sourcesContent":["<template>\n <div>\n <dt-radio\n v-for=\"option in options\"\n :key=\"option.value\"\n :value=\"option.value\"\n >\n <span>{{ option.label }}</span>\n </dt-radio>\n </div>\n</template>\n\n<script>\nimport { DtRadio } from '../radio';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'RadiosDecorator',\n components: { DtRadio },\n created () {\n this.options = [\n { label: 'Apple', value: 'apple' },\n { label: 'Banana', value: 'banana' },\n { label: 'Other', value: 'other' },\n ];\n },\n};\n</script>\n"],"names":["_sfc_main","DtRadio","_createElementBlock","_Fragment","_renderList","_ctx","option","_createBlock","_component_dt_radio","_createElementVNode","_toDisplayString"],"mappings":";;;AAeA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EACN,YAAY,EAAE,SAAAC;EACd,UAAW;AACT,SAAK,UAAU;AAAA,MACb,EAAE,OAAO,SAAS,OAAO,QAAM;AAAA,MAC/B,EAAE,OAAO,UAAU,OAAO;MAC1B,EAAE,OAAO,SAAS,OAAO,QAAM;AAAA;EAEnC;AACF;;;cAzBEC,EAQM,OAAA,MAAA;AAAA,YAPJA,EAMWC,GAAA,MAAAC,EALQC,EAAA,SAAO,CAAjBC,YADTC,EAMWC,GAAA;AAAA,MAJR,KAAKF,EAAO;AAAA,MACZ,OAAOA,EAAO;AAAA;iBAEf,MAA+B;AAAA,QAA/BG,EAA+B,QAAA,MAAAC,EAAtBJ,EAAO,KAAK,GAAA,CAAA;AAAA;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a={items({query:e}){const t=[{id:"dialpad",name:"dialpad"},{id:"dialtone",name:"dialtone"},{id:"dialtone-vue",name:"dialtone-vue"},{id:"dialtone-internal",name:"dialtone-internal",locked:!0}];return e.length===0?t:t.filter(n=>n.name.toLowerCase().startsWith(e.toLowerCase()))}};exports.default=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a={items({query:e}){const n=[{id:"dialpad",name:"dialpad",channelKey:"ch-001"},{id:"dialtone",name:"dialtone",channelKey:"ch-002"},{id:"dialtone-vue",name:"dialtone-vue",channelKey:"ch-003"},{id:"dialtone-internal",name:"dialtone-internal",locked:!0,channelKey:"ch-004"}];return e.length===0?n:n.filter(t=>t.name.toLowerCase().startsWith(e.toLowerCase()))}};exports.default=a;
2
2
  //# sourceMappingURL=channel-suggestion.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"channel-suggestion.cjs","sources":["../../../components/rich_text_editor/channel_suggestion.js"],"sourcesContent":["\nexport default {\n items ({ query }) {\n const CHANNEL_LIST = [\n {\n id: 'dialpad',\n name: 'dialpad',\n },\n {\n id: 'dialtone',\n name: 'dialtone',\n },\n {\n id: 'dialtone-vue',\n name: 'dialtone-vue',\n },\n {\n id: 'dialtone-internal',\n name: 'dialtone-internal',\n locked: true,\n },\n ];\n\n if (query.length === 0) return CHANNEL_LIST;\n\n return CHANNEL_LIST.filter((channel) => { return channel.name.toLowerCase().startsWith(query.toLowerCase()); });\n },\n};\n"],"names":["channel_suggestion","query","CHANNEL_LIST","channel"],"mappings":"4GACA,MAAAA,EAAe,CACb,MAAO,CAAE,MAAAC,GAAS,CAChB,MAAMC,EAAe,CACnB,CACE,GAAI,UACJ,KAAM,SACd,EACM,CACE,GAAI,WACJ,KAAM,UACd,EACM,CACE,GAAI,eACJ,KAAM,cACd,EACM,CACE,GAAI,oBACJ,KAAM,oBACN,OAAQ,EAChB,CACA,EAEI,OAAID,EAAM,SAAW,EAAUC,EAExBA,EAAa,OAAQC,GAAqBA,EAAQ,KAAK,YAAW,EAAG,WAAWF,EAAM,YAAW,CAAE,CAAI,CAChH,CACF"}
1
+ {"version":3,"file":"channel-suggestion.cjs","sources":["../../../components/rich_text_editor/channel_suggestion.js"],"sourcesContent":["\nexport default {\n items ({ query }) {\n const CHANNEL_LIST = [\n {\n id: 'dialpad',\n name: 'dialpad',\n channelKey: 'ch-001',\n },\n {\n id: 'dialtone',\n name: 'dialtone',\n channelKey: 'ch-002',\n },\n {\n id: 'dialtone-vue',\n name: 'dialtone-vue',\n channelKey: 'ch-003',\n },\n {\n id: 'dialtone-internal',\n name: 'dialtone-internal',\n locked: true,\n channelKey: 'ch-004',\n },\n ];\n\n if (query.length === 0) return CHANNEL_LIST;\n\n return CHANNEL_LIST.filter((channel) => { return channel.name.toLowerCase().startsWith(query.toLowerCase()); });\n },\n};\n"],"names":["channel_suggestion","query","CHANNEL_LIST","channel"],"mappings":"4GACA,MAAAA,EAAe,CACb,MAAO,CAAE,MAAAC,GAAS,CAChB,MAAMC,EAAe,CACnB,CACE,GAAI,UACJ,KAAM,UACN,WAAY,QACpB,EACM,CACE,GAAI,WACJ,KAAM,WACN,WAAY,QACpB,EACM,CACE,GAAI,eACJ,KAAM,eACN,WAAY,QACpB,EACM,CACE,GAAI,oBACJ,KAAM,oBACN,OAAQ,GACR,WAAY,QACpB,CACA,EAEI,OAAID,EAAM,SAAW,EAAUC,EAExBA,EAAa,OAAQC,GAAqBA,EAAQ,KAAK,YAAW,EAAG,WAAWF,EAAM,YAAW,CAAE,CAAI,CAChH,CACF"}
@@ -1,28 +1,32 @@
1
- const a = {
1
+ const t = {
2
2
  items({ query: e }) {
3
- const t = [
3
+ const n = [
4
4
  {
5
5
  id: "dialpad",
6
- name: "dialpad"
6
+ name: "dialpad",
7
+ channelKey: "ch-001"
7
8
  },
8
9
  {
9
10
  id: "dialtone",
10
- name: "dialtone"
11
+ name: "dialtone",
12
+ channelKey: "ch-002"
11
13
  },
12
14
  {
13
15
  id: "dialtone-vue",
14
- name: "dialtone-vue"
16
+ name: "dialtone-vue",
17
+ channelKey: "ch-003"
15
18
  },
16
19
  {
17
20
  id: "dialtone-internal",
18
21
  name: "dialtone-internal",
19
- locked: !0
22
+ locked: !0,
23
+ channelKey: "ch-004"
20
24
  }
21
25
  ];
22
- return e.length === 0 ? t : t.filter((n) => n.name.toLowerCase().startsWith(e.toLowerCase()));
26
+ return e.length === 0 ? n : n.filter((a) => a.name.toLowerCase().startsWith(e.toLowerCase()));
23
27
  }
24
28
  };
25
29
  export {
26
- a as default
30
+ t as default
27
31
  };
28
32
  //# sourceMappingURL=channel-suggestion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"channel-suggestion.js","sources":["../../../components/rich_text_editor/channel_suggestion.js"],"sourcesContent":["\nexport default {\n items ({ query }) {\n const CHANNEL_LIST = [\n {\n id: 'dialpad',\n name: 'dialpad',\n },\n {\n id: 'dialtone',\n name: 'dialtone',\n },\n {\n id: 'dialtone-vue',\n name: 'dialtone-vue',\n },\n {\n id: 'dialtone-internal',\n name: 'dialtone-internal',\n locked: true,\n },\n ];\n\n if (query.length === 0) return CHANNEL_LIST;\n\n return CHANNEL_LIST.filter((channel) => { return channel.name.toLowerCase().startsWith(query.toLowerCase()); });\n },\n};\n"],"names":["channel_suggestion","query","CHANNEL_LIST","channel"],"mappings":"AACA,MAAAA,IAAe;AAAA,EACb,MAAO,EAAE,OAAAC,KAAS;AAChB,UAAMC,IAAe;AAAA,MACnB;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,MACd;AAAA,MACM;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,MACd;AAAA,MACM;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,MACd;AAAA,MACM;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,MAChB;AAAA,IACA;AAEI,WAAID,EAAM,WAAW,IAAUC,IAExBA,EAAa,OAAO,CAACC,MAAqBA,EAAQ,KAAK,YAAW,EAAG,WAAWF,EAAM,YAAW,CAAE,CAAI;AAAA,EAChH;AACF;"}
1
+ {"version":3,"file":"channel-suggestion.js","sources":["../../../components/rich_text_editor/channel_suggestion.js"],"sourcesContent":["\nexport default {\n items ({ query }) {\n const CHANNEL_LIST = [\n {\n id: 'dialpad',\n name: 'dialpad',\n channelKey: 'ch-001',\n },\n {\n id: 'dialtone',\n name: 'dialtone',\n channelKey: 'ch-002',\n },\n {\n id: 'dialtone-vue',\n name: 'dialtone-vue',\n channelKey: 'ch-003',\n },\n {\n id: 'dialtone-internal',\n name: 'dialtone-internal',\n locked: true,\n channelKey: 'ch-004',\n },\n ];\n\n if (query.length === 0) return CHANNEL_LIST;\n\n return CHANNEL_LIST.filter((channel) => { return channel.name.toLowerCase().startsWith(query.toLowerCase()); });\n },\n};\n"],"names":["channel_suggestion","query","CHANNEL_LIST","channel"],"mappings":"AACA,MAAAA,IAAe;AAAA,EACb,MAAO,EAAE,OAAAC,KAAS;AAChB,UAAMC,IAAe;AAAA,MACnB;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,YAAY;AAAA,MACpB;AAAA,MACM;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,YAAY;AAAA,MACpB;AAAA,MACM;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,YAAY;AAAA,MACpB;AAAA,MACM;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,YAAY;AAAA,MACpB;AAAA,IACA;AAEI,WAAID,EAAM,WAAW,IAAUC,IAExBA,EAAa,OAAO,CAACC,MAAqBA,EAAQ,KAAK,YAAW,EAAG,WAAWF,EAAM,YAAW,CAAE,CAAI;AAAA,EAChH;AACF;"}
@@ -1,19 +1,21 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../../node_modules/@tiptap/vue-3.cjs"),u=require("@tiptap/core"),O=require("@tiptap/extension-blockquote"),P=require("@tiptap/extension-code-block"),V=require("@tiptap/extension-code"),A=require("@tiptap/extension-document"),j=require("@tiptap/extension-hard-break"),R=require("@tiptap/extension-paragraph"),q=require("@tiptap/extension-placeholder"),H=require("@tiptap/extension-bold"),K=require("@tiptap/extension-bullet-list"),W=require("@tiptap/extension-italic"),F=require("@tiptap/extension-link"),U=require("@tiptap/extension-list-item"),z=require("@tiptap/extension-ordered-list"),X=require("@tiptap/extension-strike"),J=require("@tiptap/extension-underline"),Y=require("@tiptap/extension-text"),G=require("@tiptap/extension-text-align"),Q=require("@tiptap/extension-history"),Z=require("@tiptap/extension-text-style"),ee=require("@tiptap/extension-color"),te=require("@tiptap/extension-font-family"),g=require("@tiptap/pm/state"),ne=require("@tiptap/suggestion"),$=require("regex-combined-emojis"),r=require("vue"),h=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),D=require("../emoji/emoji.cjs"),f=require("../../common/emoji/index.cjs"),oe=require("../list-item/list-item.cjs"),C=require("../stack/stack.cjs"),b=require("tippy.js"),_=require("../../common/utils/index.cjs"),re=require("@tiptap/extension-image"),N=require("@tiptap/extension-mention"),I=require("../link/link.cjs"),se=require("@dialpad/dialtone-icons/vue3"),x=require("./rich-text-editor-constants.cjs"),ie=require("../avatar/avatar.cjs"),ae=require("@dialpad/dialtone-icons/vue3/hash"),ce=require("@dialpad/dialtone-icons/vue3/lock"),le=require("deep-equal"),de=require("../../localization/index.cjs"),ue=require("../button/button.cjs"),me={compatConfig:{MODE:3},name:"EmojiComponent",components:{NodeViewWrapper:d.NodeViewWrapper,DtEmoji:D.default},props:d.nodeViewProps};function he(e,t,o,n,s,i){const a=r.resolveComponent("dt-emoji"),c=r.resolveComponent("node-view-wrapper");return r.openBlock(),r.createBlock(c,{class:"d-d-inline-block d-va-bottom d-lh0"},{default:r.withCtx(()=>[r.createVNode(a,{size:"500",code:e.node.attrs.code},null,8,["code"])]),_:1})}const pe=h._(me,[["render",he]]),fe={compatConfig:{MODE:3},name:"SuggestionList",components:{DtListItem:oe.default},props:{items:{type:Array,required:!0},command:{type:Function,required:!0},itemComponent:{type:Object,required:!0},itemType:{type:String,required:!0}},data(){return{selectedIndex:0}},watch:{items(){this.selectedIndex=0}},methods:{onKeyDown({event:e}){return e.key==="ArrowUp"?(this.upHandler(),!0):e.key==="ArrowDown"?(this.downHandler(),!0):e.key==="Enter"||e.key==="Tab"?(this.selectHandler(),!0):!1},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length,this.scrollActiveElementIntoView()},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length,this.scrollActiveElementIntoView()},async scrollActiveElementIntoView(){await this.$nextTick();const e=this.$refs.suggestionList.querySelector(".d-list-item--highlighted");e&&e.scrollIntoView({behaviour:"smooth",block:"center"})},selectHandler(){this.selectItem(this.selectedIndex)},selectItem(e){const t=this.items[e];switch(this.itemType){case"emoji":this.command(t);return;case"mention":this.command({name:t.name,id:t.id,avatarSrc:t.avatarSrc,contactKey:t.contactKey});break;case"channel":this.command({name:t.name,id:t.id,locked:t.locked});break;case"slash-command":this.command({command:t.command});break}}}},ge={class:"d-popover__dialog d-suggestion-list__container"},ke={ref:"suggestionList",class:"d-suggestion-list"};function _e(e,t,o,n,s,i){const a=r.resolveComponent("dt-list-item");return r.openBlock(),r.createElementBlock("div",ge,[r.withDirectives(r.createElementVNode("ul",ke,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.items,(c,l)=>(r.openBlock(),r.createBlock(a,{key:c.id,class:r.normalizeClass(["d-suggestion-list__item",{"d-list-item--highlighted":l===s.selectedIndex}]),"navigation-type":"arrow-keys",onClick:m=>i.selectItem(l),onKeydown:r.withModifiers(i.onKeyDown,["prevent"])},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.itemComponent),{item:c},null,8,["item"]))]),_:2},1032,["class","onClick","onKeydown"]))),128))],512),[[r.vShow,o.items.length]])])}const T=h._(fe,[["render",_e]]),Ce={compatConfig:{MODE:3},name:"EmojiSuggestion",components:{DtEmoji:D.default,DtStack:C.default},props:{item:{type:Object,required:!0}}};function we(e,t,o,n,s,i){const a=r.resolveComponent("dt-emoji"),c=r.resolveComponent("dt-stack");return r.openBlock(),r.createBlock(c,{direction:"row",gap:"400"},{default:r.withCtx(()=>[r.createVNode(a,{size:"200",code:o.item.code},null,8,["code"]),r.createTextVNode(" "+r.toDisplayString(o.item.code),1)]),_:1})}const ye=h._(Ce,[["render",we]]),E={name:"hideOnEsc",defaultValue:!0,fn({hide:e}){function t(o){o.keyCode===27&&e()}return{onShow(){document.addEventListener("keydown",t)},onHide(){document.removeEventListener("keydown",t)}}}},xe=20,be=(e,t,o)=>{var c,l;const n=(c=e.shortname)==null?void 0:c.replaceAll(":",""),s=(l=t.shortname)==null?void 0:l.replaceAll(":",""),i=n.startsWith(o),a=s.startsWith(o);return i&&!a?-1:!i&&a?1:n.localeCompare(s)},Te={items:({query:e})=>{if(e.length<2)return[];const t=Object.values(f.getEmojiData());return e=e.toLowerCase(),t.filter(n=>{var s;return[n.name,(s=n.shortname)==null?void 0:s.replaceAll(":",""),...n.keywords||[]].some(i=>i&&i.startsWith(e))}).splice(0,xe).sort((n,s)=>be(n,s,e)).map(n=>({code:n.shortname}))},command:({editor:e,range:t,props:o})=>{var i,a;const n=e.view.state.selection.$to.nodeAfter;((i=n==null?void 0:n.text)==null?void 0:i.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:"emoji",attrs:o}]).run(),(a=window.getSelection())==null||a.collapseToEnd()},render:()=>{let e,t,o=!1;return{onStart:n=>{e=new d.VueRenderer(T,{props:{itemComponent:r.markRaw(ye),itemType:"emoji",...n},editor:n.editor}),n.clientRect&&(t=b("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{o=!0},onHidden:()=>{o=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[E]}),n.items.length>0&&(t==null||t[0].show()))},onUpdate(n){e==null||e.updateProps(n),n.items.length>0?t==null||t[0].show():t==null||t[0].hide(),t==null||t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(n){var s;if(o)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(n)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},Ee=/(:\w+:)$/,Se=new RegExp($.emojiPattern+"$"),Be=e=>{if(e&&f.codeToEmojiData(e[0]))return{text:e[2]||e[0]}},Ne=e=>[...e.matchAll(f.emojiShortCodeRegex)].filter(o=>f.codeToEmojiData(o[0])).map(o=>({index:o.index,text:o[0],match:o})),ve=u.Node.create({name:"emoji",addOptions(){return{HTMLAttributes:{}}},group:"inline",inline:!0,selectable:!1,atom:!0,addNodeView(){return d.VueNodeViewRenderer(pe)},addAttributes(){return{code:{default:null}}},parseHTML(){return[{tag:"emoji-component"}]},renderText({node:e}){return f.stringToUnicode(f.codeToEmojiData(e.attrs.code).unicode_output)},renderHTML({HTMLAttributes:e}){return["emoji-component",u.mergeAttributes(this.options.HTMLAttributes,e)]},addInputRules(){return[new u.InputRule({find:e=>{const t=e.match(Ee)||e.match(Se);if(t)return Be(t)},handler:({state:e,range:t,match:o})=>{const{tr:n}=e,s=t.from,i=t.to;n.replaceWith(s,i,this.type.create({code:o[0]}))}})]},addPasteRules(){return[u.nodePasteRule({find:Ne,type:this.type,getAttributes(e){return{code:e[0]}}}),u.nodePasteRule({find:f.emojiRegex,type:this.type,getAttributes(e){return{code:e[0]}}})]},addProseMirrorPlugins(){return[ne({char:":",pluginKey:new g.PluginKey("emoji"),editor:this.editor,...this.options.suggestion,...Te})]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let o=!1;const{selection:n}=t,{empty:s,anchor:i}=n;return s?(t.doc.nodesBetween(i-1,i,(a,c)=>{if(a.type.name===this.name)return o=!0,e.insertText("",c,c+a.nodeSize),!1}),o):!1})}}});function Le(e,t,o=()=>!0){const n=[];t.lastIndex=0;let s;for(;s=t.exec(e);)o(e,s)&&n.push(s);return n}function Re(e,t){return!["#","@"].includes(e.charAt(t.index))&&!["#","@"].includes(e.charAt(t.index-1))}function $e(e){const t=new RegExp("(?:"+[`[!?.,:;'"]`,"(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"].join("|"),"g");return e.replace(t,"")}function De(e,t){const o=e.slice(0,t+1).search(/\S+\s*$/),n=e.slice(t).search(/\s/);if(n<0){const s=e.slice(o);return{text:s,from:o,to:o+s.length}}return{text:e.slice(o,n+t),from:o,to:n+t}}function B(e,t,o,n){const s=De(e,t);if(n.lastIndex=0,!n.test(s.text))return s;const i=o==="left"?s.from-1:s.to+1;return i<=0||i>=e.length||i===t?s:B(e,i,o,n)}function Ie(e,t,o,n){const s=Math.max(e.from-1,0),i=Math.min(e.to+1,t.content.size),a=u.getMarksBetween(s,i,t);for(const c of a)c.mark.type===n&&o.removeMark(c.from,c.to,n)}const v=_.getPhoneNumberRegex(1,15);function L(e,t,o,n,s,i){if(!e)return;let a=o-t-1;a=a<0?0:a;const c=n-t,l=B(e,a,"left",v),m=B(e,c,"right",v),p=e.slice(l.from,m.to);Le(p,_.linkRegex,Re).forEach(S=>{const k=$e(S[0]),y=t+l.from+S.index+1,M=y+k.length;s.addMark(y,M,i.create())})}function Me(e){let t=!1;return new g.Plugin({key:new g.PluginKey("autolink"),appendTransaction:(o,n,s)=>{const i=o.some(p=>p.docChanged)&&!n.doc.eq(s.doc);if(t&&!i)return;const{tr:a}=s,{textContent:c}=s.doc;t||L(c,0,0,c.length,a,e.type),t=!0;const l=u.combineTransactionSteps(n.doc,[...o]);return u.getChangedRanges(l).forEach(({oldRange:p,newRange:w})=>{Ie(w,s.doc,a,e.type),u.findChildrenInRange(s.doc,w,k=>k.isTextblock).forEach(({node:k,pos:y})=>{L(k.textContent,y,p.from,w.to,a,e.type)})}),a}})}const Oe={class:"d-link d-c-text d-d-inline-block d-wb-break-all",rel:"noopener noreferrer nofollow"},Pe=u.Mark.create({name:"CustomLink",renderHTML({HTMLAttributes:e}){return["a",u.mergeAttributes(this.options.HTMLAttributes,e,Oe)]},renderText({node:e}){return e.attrs.text},addProseMirrorPlugins(){return[Me({type:this.type})]}}),Ve=re.extend({name:"ConfigurableImage",addAttributes(){return{src:{default:""},alt:{default:void 0},title:{default:void 0},width:{default:void 0},height:{default:void 0},style:{default:void 0}}}}).configure({inline:!0,allowBase64:!0}),Ae=R.extend({parseHTML(){return[{tag:"div"}]},renderHTML({HTMLAttributes:e}){return["div",u.mergeAttributes(this.options.HTMLAttributes,e),0]}}),je={compatConfig:{MODE:3},name:"MentionComponent",components:{NodeViewWrapper:d.NodeViewWrapper,DtLink:I.default},props:d.nodeViewProps,computed:{text(){return"@"+this.$props.node.attrs.name}},methods:{handleClick(){const e={name:this.$props.node.attrs.name,id:this.$props.node.attrs.id,avatarSrc:this.$props.node.attrs.avatarSrc,contactKey:this.$props.node.attrs.contactKey};this.$props.editor.emit("mention-click",e)}}};function qe(e,t,o,n,s,i){const a=r.resolveComponent("dt-link"),c=r.resolveComponent("node-view-wrapper");return r.openBlock(),r.createBlock(c,{class:"d-d-inline-block"},{default:r.withCtx(()=>[r.createVNode(a,{kind:"mention",onClick:r.withModifiers(i.handleClick,["prevent"])},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(i.text),1)]),_:1},8,["onClick"])]),_:1})}const He=h._(je,[["render",qe]]),Ke=N.extend({addNodeView(){return d.VueNodeViewRenderer(He)},parseHTML(){return[{tag:"mention-component"}]},addAttributes(){return{name:{default:""},avatarSrc:{default:""},id:{default:""},contactKey:{default:""}}},renderText({node:e}){return`@${e.attrs.id}`},renderHTML({HTMLAttributes:e}){return["mention-component",u.mergeAttributes(this.options.HTMLAttributes,e)]}}).configure({suggestion:{char:"@",pluginKey:new g.PluginKey("mentionSuggestion")}}),We={compatConfig:{MODE:3},name:"ChannelComponent",components:{NodeViewWrapper:d.NodeViewWrapper,DtLink:I.default,DtIconLock:se.DtIconLock,DtStack:C.default},props:d.nodeViewProps,computed:{text(){return this.$props.node.attrs.locked?this.$props.node.attrs.name:"#"+this.$props.node.attrs.name}},methods:{handleClick(){const e={name:this.$props.node.attrs.name,id:this.$props.node.attrs.id,locked:this.$props.node.attrs.locked};this.$props.editor.emit("channel-click",e)}}};function Fe(e,t,o,n,s,i){const a=r.resolveComponent("dt-icon-lock"),c=r.resolveComponent("dt-stack"),l=r.resolveComponent("dt-link"),m=r.resolveComponent("node-view-wrapper");return r.openBlock(),r.createBlock(m,{class:"d-d-inline-block"},{default:r.withCtx(()=>[r.createVNode(l,{kind:"mention",onClick:r.withModifiers(i.handleClick,["prevent"])},{default:r.withCtx(()=>[r.createVNode(c,{direction:"row",gap:"0"},{default:r.withCtx(()=>[e.$props.node.attrs.locked?(r.openBlock(),r.createBlock(a,{key:0,size:"200"})):r.createCommentVNode("",!0),r.createElementVNode("span",null,r.toDisplayString(i.text),1)]),_:1})]),_:1},8,["onClick"])]),_:1})}const Ue=h._(We,[["render",Fe]]),ze=N.extend({name:"channel",addNodeView(){return d.VueNodeViewRenderer(Ue)},parseHTML(){return[{tag:"channel-component"}]},addAttributes(){return{name:{default:""},id:{default:""},locked:{default:!1}}},renderText({node:e}){return`#${e.attrs.id}`},renderHTML({HTMLAttributes:e}){return["channel-component",u.mergeAttributes(this.options.HTMLAttributes,e)]}}).configure({suggestion:{char:"#",pluginKey:new g.PluginKey("channelSuggestion")}}),Xe={compatConfig:{MODE:3},name:"SlashCommandsComponent",components:{NodeViewWrapper:d.NodeViewWrapper},props:{...d.nodeViewProps},emits:["selected-command"],computed:{text(){return"/"+this.$props.node.attrs.command}},created(){var o,n,s;const e=this.$props.node.attrs.command;this.$emit("selected-command",e);const t=(s=(n=(o=this.editor)==null?void 0:o.storage)==null?void 0:n["slash-commands"])==null?void 0:s.onSelectedCommand;t&&typeof t=="function"&&t(e)}};function Je(e,t,o,n,s,i){const a=r.resolveComponent("node-view-wrapper");return r.openBlock(),r.createBlock(a,{class:"d-d-inline-block"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(i.text),1)]),_:1})}const Ye=h._(Xe,[["render",Je]]),Ge=(e,t)=>[...e.matchAll(t)].map(n=>{let s=n[2];return s.endsWith(" ")||(s+=" "),{index:n.index,text:s,match:n}}),Qe=N.extend({name:"slash-commands",group:"inline",inline:!0,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),onSelectedCommand:null}},addStorage(){return{onSelectedCommand:this.options.onSelectedCommand}},addNodeView(){return d.VueNodeViewRenderer(Ye)},parseHTML(){return[{tag:"command-component"}]},addAttributes(){return{command:{default:""},parametersExample:{default:""},description:{default:""}}},renderText({node:e}){return`/${e.attrs.command}`},renderHTML({HTMLAttributes:e}){return["command-component",u.mergeAttributes(this.options.HTMLAttributes,e)]},addInputRules(){var o;const e=(o=this.options.suggestion)==null?void 0:o.items({query:""}).map(n=>n.command),t=new RegExp(`^((?:\\/)(${e.join("|")})) $`);return[u.nodeInputRule({find:t,type:this.type,getAttributes(n){return{command:n[2]}}})]},addPasteRules(){var o;const e=(o=this.options.suggestion)==null?void 0:o.items({query:""}).map(n=>n.command),t=new RegExp(`^((?:\\/)(${e.join("|")})) ?$`,"g");return[u.nodePasteRule({find:n=>Ge(n,t),type:this.type,getAttributes(n){return{command:n[0].trim()}}})]}}).configure({suggestion:{char:"/",pluginKey:new g.PluginKey("slashCommandSuggestion")}}),Ze={compatConfig:{MODE:3},name:"MentionSuggestion",components:{DtAvatar:ie.default,DtStack:C.default},props:{item:{type:Object,required:!0}},computed:{name(){return this.item.name},avatarSrc(){return this.item.avatarSrc},presence(){return this.item.presence},status(){return this.item.status},presenceText(){return this.item.presenceText},presenceFontColorClass(){return{active:"d-recipe-contact-row--active",busy:"d-recipe-contact-row--busy",away:"d-recipe-contact-row--away",offline:"d-recipe-contact-row--busy"}[this.presence]},showDetails(){return this.item.showDetails}}},et={class:"d-mention-suggestion__name"},tt={key:1,class:"d-mention-suggestion__divider"},nt={key:2,class:"d-mention-suggestion__status"};function ot(e,t,o,n,s,i){const a=r.resolveComponent("dt-avatar"),c=r.resolveComponent("dt-stack");return r.openBlock(),r.createBlock(c,{direction:"row",class:"d-mention-suggestion__container",gap:"400"},{default:r.withCtx(()=>[r.createVNode(a,{"full-name":i.name,"image-src":i.avatarSrc,"image-alt":i.name,"show-presence":i.showDetails,presence:i.presence,size:"sm"},null,8,["full-name","image-src","image-alt","show-presence","presence"]),r.createVNode(c,{class:"d-mention-suggestion__details-container",gap:"100"},{default:r.withCtx(()=>[r.createElementVNode("span",et,r.toDisplayString(i.name),1),i.showDetails?(r.openBlock(),r.createBlock(c,{key:0,direction:"row",gap:"300",class:"d-label--sm-plain"},{default:r.withCtx(()=>[i.presenceText?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(["d-mention-suggestion__presence",[i.presenceFontColorClass]])},r.toDisplayString(i.presenceText),3)):r.createCommentVNode("",!0),i.status&&i.presenceText?(r.openBlock(),r.createElementBlock("div",tt," • ")):r.createCommentVNode("",!0),i.status?(r.openBlock(),r.createElementBlock("div",nt,r.toDisplayString(i.status),1)):r.createCommentVNode("",!0)]),_:1})):r.createCommentVNode("",!0)]),_:1})]),_:1})}const rt=h._(Ze,[["render",ot]]),st={allowSpaces:!0,render:()=>{let e,t,o=!1;return{onStart:n=>{e=new d.VueRenderer(T,{props:{itemComponent:r.markRaw(rt),itemType:"mention",...n},editor:n.editor}),n.clientRect&&(t=b("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{o=!0},onHidden:()=>{o=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[E]}),n.items.length>0&&(t==null||t[0].show()))},onUpdate(n){e==null||e.updateProps(n),n.items.length>0?t==null||t[0].show():t==null||t[0].hide(),n.clientRect&&(t==null||t[0].setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(n){var s;if(o)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(n)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},it={compatConfig:{MODE:3},name:"ChannelSuggestion",components:{DtStack:C.default,DtIconHash:ae,DtIconLock:ce},props:{item:{type:Object,required:!0}},computed:{name(){return this.item.name}}};function at(e,t,o,n,s,i){const a=r.resolveComponent("dt-icon-hash"),c=r.resolveComponent("dt-icon-lock"),l=r.resolveComponent("dt-stack");return r.openBlock(),r.createBlock(l,{direction:"row",gap:"400"},{default:r.withCtx(()=>[o.item.locked?(r.openBlock(),r.createBlock(c,{key:1,size:"300"})):(r.openBlock(),r.createBlock(a,{key:0,size:"300"})),r.createElementVNode("span",null,r.toDisplayString(i.name),1)]),_:1})}const ct=h._(it,[["render",at]]),lt={allowSpaces:!0,render:()=>{let e,t,o=!1;return{onStart:n=>{e=new d.VueRenderer(T,{props:{itemComponent:r.markRaw(ct),itemType:"channel",...n},editor:n.editor}),n.clientRect&&(t=b("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{o=!0},onHidden:()=>{o=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[E]}),n.items.length>0&&(t==null||t[0].show()))},onUpdate(n){e==null||e.updateProps(n),n.items.length>0?t==null||t[0].show():t==null||t[0].hide(),n.clientRect&&(t==null||t[0].setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(n){var s;if(o)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(n)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},dt={compatConfig:{MODE:3},name:"SlashCommandSuggestion",props:{item:{type:Object,required:!0}},computed:{command(){return this.item.command},description(){return this.item.description},parametersExample(){return this.item.parametersExample}}},ut={class:"d-body--md-compact"},mt={key:0},ht={class:"d-body--sm d-fc-tertiary"};function pt(e,t,o,n,s,i){return r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",ut,[r.createElementVNode("span",null,"/"+r.toDisplayString(i.command),1),i.parametersExample?(r.openBlock(),r.createElementBlock("span",mt,r.toDisplayString(i.parametersExample),1)):r.createCommentVNode("",!0)]),r.createElementVNode("div",ht,r.toDisplayString(i.description),1)])}const ft=h._(dt,[["render",pt]]),gt={allowSpaces:!0,startOfLine:!0,render:()=>{let e,t,o=!1;return{onStart:n=>{e=new d.VueRenderer(T,{parent:void 0,props:{itemComponent:r.markRaw(ft),itemType:"slash-command",...n},editor:n.editor}),n.clientRect&&(t=b("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{o=!0},onHidden:()=>{o=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[E]}),n.items.length>0&&(t==null||t[0].show()))},onUpdate(n){e==null||e.updateProps(n),n.items.length>0?t==null||t[0].show():t==null||t[0].hide(),n.clientRect&&(t==null||t[0].setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(n){var s;if(o)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(n)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},kt={compatConfig:{MODE:3},name:"DtRichTextEditor",components:{EditorContent:d.EditorContent,BubbleMenu:d.BubbleMenu,DtButton:ue.default,DtStack:C.default},props:{modelValue:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},preventTyping:{type:Boolean,default:!1},pasteRichText:{type:Boolean,default:!0},allowLineBreaks:{type:Boolean,default:!1},inputAriaLabel:{type:String,required:!0},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(e){return typeof e=="string"?x.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(e):!0}},outputFormat:{type:String,default:"html",validator(e){return x.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(e)}},placeholder:{type:String,default:""},link:{type:[Boolean,Object],default:!1},customLink:{type:[Boolean,Object],default:!1},mentionSuggestion:{type:Object,default:null},channelSuggestion:{type:Object,default:null},slashCommandSuggestion:{type:Object,default:null},allowBlockquote:{type:Boolean,default:!0},allowBold:{type:Boolean,default:!0},allowBulletList:{type:Boolean,default:!0},allowItalic:{type:Boolean,default:!0},allowStrike:{type:Boolean,default:!0},allowUnderline:{type:Boolean,default:!0},allowCode:{type:Boolean,default:!0},allowCodeblock:{type:Boolean,default:!0},allowInlineImages:{type:Boolean,default:!1},allowFontColor:{type:Boolean,default:!1},allowFontFamily:{type:Boolean,default:!1},additionalExtensions:{type:Array,default:()=>[]},hideLinkBubbleMenu:{type:Boolean,default:!1},useDivTags:{type:Boolean,default:!1}},emits:["input","json-input","html-input","text-input","markdown-input","update:modelValue","blur","focus","enter","edit-link","selected","selected-command","mention-click","channel-click"],data(){return{editor:null,tippyOptions:{appendTo:()=>{var e;return(e=_.returnFirstEl(this.$refs.editor.$el).getRootNode())==null?void 0:e.querySelector("body")},placement:"top-start"},i18n:new de.DialtoneLocalization,jsonToMarkdownConverter:{convertToMarkdown(e){return this.processNode(e)},processNodeContent(e){return e.content?e.content.map(t=>this.processNode(t)).join(""):""},processNode(e){if(!e)return"";const o={doc:n=>this.processDocNode(n),paragraph:n=>this.processParagraphNode(n),text:n=>this.processTextNode(n),hardBreak:()=>this.processHardBreakNode(),blockquote:n=>this.processBlockquoteNode(n),bulletList:n=>this.processBulletListNode(n),orderedList:n=>this.processOrderedListNode(n),listItem:n=>this.processListItemNode(n),codeBlock:n=>this.processCodeBlockNode(n),mention:n=>this.processMentionNode(n),channel:n=>this.processChannelNode(n),"slash-commands":n=>this.processSlashCommandsNode(n),emoji:n=>this.processEmojiNode(n)}[e.type];return o?o(e):this.processUnknownNode(e)},processDocNode(e){return this.processNodeContent(e)},processParagraphNode(e){const t=this.processNodeContent(e);return t?t+`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../../node_modules/@tiptap/vue-3.cjs"),u=require("@tiptap/core"),O=require("@tiptap/extension-blockquote"),P=require("@tiptap/extension-code-block"),V=require("@tiptap/extension-code"),A=require("@tiptap/extension-document"),j=require("@tiptap/extension-hard-break"),$=require("@tiptap/extension-paragraph"),q=require("@tiptap/extension-placeholder"),H=require("@tiptap/extension-bold"),K=require("@tiptap/extension-bullet-list"),W=require("@tiptap/extension-italic"),F=require("@tiptap/extension-link"),U=require("@tiptap/extension-list-item"),z=require("@tiptap/extension-ordered-list"),X=require("@tiptap/extension-strike"),J=require("@tiptap/extension-underline"),Y=require("@tiptap/extension-text"),G=require("@tiptap/extension-text-align"),Q=require("@tiptap/extension-history"),Z=require("@tiptap/extension-text-style"),ee=require("@tiptap/extension-color"),te=require("@tiptap/extension-font-family"),g=require("@tiptap/pm/state"),ne=require("@tiptap/suggestion"),R=require("regex-combined-emojis"),o=require("vue"),h=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),D=require("../emoji/emoji.cjs"),f=require("../../common/emoji/index.cjs"),oe=require("../list-item/list-item.cjs"),w=require("../stack/stack.cjs"),b=require("tippy.js"),_=require("../../common/utils/index.cjs"),re=require("@tiptap/extension-image"),B=require("@tiptap/extension-mention"),I=require("../link/link.cjs"),se=require("@dialpad/dialtone-icons/vue3"),x=require("./rich-text-editor-constants.cjs"),ie=require("../avatar/avatar.cjs"),ae=require("@dialpad/dialtone-icons/vue3/hash"),ce=require("@dialpad/dialtone-icons/vue3/lock"),le=require("deep-equal"),de=require("../../localization/index.cjs"),ue=require("../button/button.cjs"),me={compatConfig:{MODE:3},name:"EmojiComponent",components:{NodeViewWrapper:d.NodeViewWrapper,DtEmoji:D.default},props:d.nodeViewProps};function he(e,t,r,n,s,i){const a=o.resolveComponent("dt-emoji"),c=o.resolveComponent("node-view-wrapper");return o.openBlock(),o.createBlock(c,{class:"d-d-inline-block d-va-bottom d-lh0"},{default:o.withCtx(()=>[o.createVNode(a,{size:"500",code:e.node.attrs.code},null,8,["code"])]),_:1})}const pe=h._(me,[["render",he]]),fe={compatConfig:{MODE:3},name:"SuggestionList",components:{DtListItem:oe.default},props:{items:{type:Array,required:!0},command:{type:Function,required:!0},itemComponent:{type:Object,required:!0},itemType:{type:String,required:!0}},data(){return{selectedIndex:0}},watch:{items(){this.selectedIndex=0}},methods:{onKeyDown({event:e}){return e.key==="ArrowUp"?(this.upHandler(),!0):e.key==="ArrowDown"?(this.downHandler(),!0):e.key==="Enter"||e.key==="Tab"?(this.selectHandler(),!0):!1},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length,this.scrollActiveElementIntoView()},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length,this.scrollActiveElementIntoView()},async scrollActiveElementIntoView(){await this.$nextTick();const e=this.$refs.suggestionList.querySelector(".d-list-item--highlighted");e&&e.scrollIntoView({behaviour:"smooth",block:"center"})},selectHandler(){this.selectItem(this.selectedIndex)},selectItem(e){const t=this.items[e];switch(this.itemType){case"emoji":this.command(t);return;case"mention":this.command({name:t.name,id:t.id,avatarSrc:t.avatarSrc,contactKey:t.contactKey});break;case"channel":this.command({name:t.name,id:t.id,locked:t.locked,channelKey:t.channelKey});break;case"slash-command":this.command({command:t.command});break}}}},ge={class:"d-popover__dialog d-suggestion-list__container"},ke={ref:"suggestionList",class:"d-suggestion-list"};function _e(e,t,r,n,s,i){const a=o.resolveComponent("dt-list-item");return o.openBlock(),o.createElementBlock("div",ge,[o.withDirectives(o.createElementVNode("ul",ke,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.items,(c,l)=>(o.openBlock(),o.createBlock(a,{key:c.id,class:o.normalizeClass(["d-suggestion-list__item",{"d-list-item--highlighted":l===s.selectedIndex}]),"navigation-type":"arrow-keys",onClick:m=>i.selectItem(l),onKeydown:o.withModifiers(i.onKeyDown,["prevent"])},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(r.itemComponent),{item:c},null,8,["item"]))]),_:2},1032,["class","onClick","onKeydown"]))),128))],512),[[o.vShow,r.items.length]])])}const T=h._(fe,[["render",_e]]),we={compatConfig:{MODE:3},name:"EmojiSuggestion",components:{DtEmoji:D.default,DtStack:w.default},props:{item:{type:Object,required:!0}}};function ye(e,t,r,n,s,i){const a=o.resolveComponent("dt-emoji"),c=o.resolveComponent("dt-stack");return o.openBlock(),o.createBlock(c,{direction:"row",gap:"400"},{default:o.withCtx(()=>[o.createVNode(a,{size:"200",code:r.item.code},null,8,["code"]),o.createTextVNode(" "+o.toDisplayString(r.item.code),1)]),_:1})}const Ce=h._(we,[["render",ye]]),E={name:"hideOnEsc",defaultValue:!0,fn({hide:e}){function t(r){r.keyCode===27&&e()}return{onShow(){document.addEventListener("keydown",t)},onHide(){document.removeEventListener("keydown",t)}}}},xe=20,be=(e,t,r)=>{var c,l;const n=(c=e.shortname)==null?void 0:c.replaceAll(":",""),s=(l=t.shortname)==null?void 0:l.replaceAll(":",""),i=n.startsWith(r),a=s.startsWith(r);return i&&!a?-1:!i&&a?1:n.localeCompare(s)},Te={items:({query:e})=>{if(e.length<2)return[];const t=Object.values(f.getEmojiData());return e=e.toLowerCase(),t.filter(n=>{var s;return[n.name,(s=n.shortname)==null?void 0:s.replaceAll(":",""),...n.keywords||[]].some(i=>i&&i.startsWith(e))}).splice(0,xe).sort((n,s)=>be(n,s,e)).map(n=>({code:n.shortname}))},command:({editor:e,range:t,props:r})=>{var i,a;const n=e.view.state.selection.$to.nodeAfter;((i=n==null?void 0:n.text)==null?void 0:i.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:"emoji",attrs:r}]).run(),(a=window.getSelection())==null||a.collapseToEnd()},render:()=>{let e,t,r=!1;return{onStart:n=>{e=new d.VueRenderer(T,{props:{itemComponent:o.markRaw(Ce),itemType:"emoji",...n},editor:n.editor}),n.clientRect&&(t=b("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{r=!0},onHidden:()=>{r=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[E]}),n.items.length>0&&(t==null||t[0].show()))},onUpdate(n){e==null||e.updateProps(n),n.items.length>0?t==null||t[0].show():t==null||t[0].hide(),t==null||t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(n){var s;if(r)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(n)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},Ee=/(:\w+:)$/,Se=new RegExp(R.emojiPattern+"$"),ve=e=>{if(e&&f.codeToEmojiData(e[0]))return{text:e[2]||e[0]}},Be=e=>[...e.matchAll(f.emojiShortCodeRegex)].filter(r=>f.codeToEmojiData(r[0])).map(r=>({index:r.index,text:r[0],match:r})),Ne=u.Node.create({name:"emoji",addOptions(){return{HTMLAttributes:{}}},group:"inline",inline:!0,selectable:!1,atom:!0,addNodeView(){return d.VueNodeViewRenderer(pe)},addAttributes(){return{code:{default:null}}},parseHTML(){return[{tag:"emoji-component"}]},renderText({node:e}){return f.stringToUnicode(f.codeToEmojiData(e.attrs.code).unicode_output)},renderHTML({HTMLAttributes:e}){return["emoji-component",u.mergeAttributes(this.options.HTMLAttributes,e)]},addInputRules(){return[new u.InputRule({find:e=>{const t=e.match(Ee)||e.match(Se);if(t)return ve(t)},handler:({state:e,range:t,match:r})=>{const{tr:n}=e,s=t.from,i=t.to;n.replaceWith(s,i,this.type.create({code:r[0]}))}})]},addPasteRules(){return[u.nodePasteRule({find:Be,type:this.type,getAttributes(e){return{code:e[0]}}}),u.nodePasteRule({find:f.emojiRegex,type:this.type,getAttributes(e){return{code:e[0]}}})]},addProseMirrorPlugins(){return[ne({char:":",pluginKey:new g.PluginKey("emoji"),editor:this.editor,...this.options.suggestion,...Te})]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let r=!1;const{selection:n}=t,{empty:s,anchor:i}=n;return s?(t.doc.nodesBetween(i-1,i,(a,c)=>{if(a.type.name===this.name)return r=!0,e.insertText("",c,c+a.nodeSize),!1}),r):!1})}}});function Le(e,t,r=()=>!0){const n=[];t.lastIndex=0;let s;for(;s=t.exec(e);)r(e,s)&&n.push(s);return n}function $e(e,t){return!["#","@"].includes(e.charAt(t.index))&&!["#","@"].includes(e.charAt(t.index-1))}function Re(e){const t=new RegExp("(?:"+[`[!?.,:;'"]`,"(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"].join("|"),"g");return e.replace(t,"")}function De(e,t){const r=e.slice(0,t+1).search(/\S+\s*$/),n=e.slice(t).search(/\s/);if(n<0){const s=e.slice(r);return{text:s,from:r,to:r+s.length}}return{text:e.slice(r,n+t),from:r,to:n+t}}function v(e,t,r,n){const s=De(e,t);if(n.lastIndex=0,!n.test(s.text))return s;const i=r==="left"?s.from-1:s.to+1;return i<=0||i>=e.length||i===t?s:v(e,i,r,n)}function Ie(e,t,r,n){const s=Math.max(e.from-1,0),i=Math.min(e.to+1,t.content.size),a=u.getMarksBetween(s,i,t);for(const c of a)c.mark.type===n&&r.removeMark(c.from,c.to,n)}const N=_.getPhoneNumberRegex(1,15);function L(e,t,r,n,s,i){if(!e)return;let a=r-t-1;a=a<0?0:a;const c=n-t,l=v(e,a,"left",N),m=v(e,c,"right",N),p=e.slice(l.from,m.to);Le(p,_.linkRegex,$e).forEach(S=>{const k=Re(S[0]),C=t+l.from+S.index+1,M=C+k.length;s.addMark(C,M,i.create())})}function Me(e){let t=!1;return new g.Plugin({key:new g.PluginKey("autolink"),appendTransaction:(r,n,s)=>{const i=r.some(p=>p.docChanged)&&!n.doc.eq(s.doc);if(t&&!i)return;const{tr:a}=s,{textContent:c}=s.doc;t||L(c,0,0,c.length,a,e.type),t=!0;const l=u.combineTransactionSteps(n.doc,[...r]);return u.getChangedRanges(l).forEach(({oldRange:p,newRange:y})=>{Ie(y,s.doc,a,e.type),u.findChildrenInRange(s.doc,y,k=>k.isTextblock).forEach(({node:k,pos:C})=>{L(k.textContent,C,p.from,y.to,a,e.type)})}),a}})}const Oe={class:"d-link d-c-text d-d-inline-block d-wb-break-all",rel:"noopener noreferrer nofollow"},Pe=u.Mark.create({name:"CustomLink",renderHTML({HTMLAttributes:e}){return["a",u.mergeAttributes(this.options.HTMLAttributes,e,Oe)]},renderText({node:e}){return e.attrs.text},addProseMirrorPlugins(){return[Me({type:this.type})]}}),Ve=re.extend({name:"ConfigurableImage",addAttributes(){return{src:{default:""},alt:{default:void 0},title:{default:void 0},width:{default:void 0},height:{default:void 0},style:{default:void 0}}}}).configure({inline:!0,allowBase64:!0}),Ae=$.extend({parseHTML(){return[{tag:"div"}]},renderHTML({HTMLAttributes:e}){return["div",u.mergeAttributes(this.options.HTMLAttributes,e),0]}}),je={compatConfig:{MODE:3},name:"MentionComponent",components:{NodeViewWrapper:d.NodeViewWrapper,DtLink:I.default},props:d.nodeViewProps,computed:{text(){return"@"+this.$props.node.attrs.name}},methods:{handleClick(){const e={name:this.$props.node.attrs.name,id:this.$props.node.attrs.id,avatarSrc:this.$props.node.attrs.avatarSrc,contactKey:this.$props.node.attrs.contactKey};this.$props.editor.emit("mention-click",e)}}};function qe(e,t,r,n,s,i){const a=o.resolveComponent("dt-link"),c=o.resolveComponent("node-view-wrapper");return o.openBlock(),o.createBlock(c,{class:"d-d-inline-block"},{default:o.withCtx(()=>[o.createVNode(a,{kind:"mention",onClick:o.withModifiers(i.handleClick,["prevent"])},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(i.text),1)]),_:1},8,["onClick"])]),_:1})}const He=h._(je,[["render",qe]]),Ke=B.extend({addNodeView(){return d.VueNodeViewRenderer(He)},parseHTML(){return[{tag:"mention-component"}]},addAttributes(){return{name:{default:""},avatarSrc:{default:""},id:{default:""},contactKey:{default:""}}},renderText({node:e}){return`@${e.attrs.id}`},renderHTML({HTMLAttributes:e}){return["mention-component",u.mergeAttributes(this.options.HTMLAttributes,e)]}}).configure({suggestion:{char:"@",pluginKey:new g.PluginKey("mentionSuggestion")}}),We={compatConfig:{MODE:3},name:"ChannelComponent",components:{NodeViewWrapper:d.NodeViewWrapper,DtLink:I.default,DtIconLock:se.DtIconLock,DtStack:w.default},props:d.nodeViewProps,computed:{text(){return this.$props.node.attrs.locked?this.$props.node.attrs.name:"#"+this.$props.node.attrs.name}},methods:{handleClick(){const e={name:this.$props.node.attrs.name,id:this.$props.node.attrs.id,locked:this.$props.node.attrs.locked,channelKey:this.$props.node.attrs.channelKey};this.$props.editor.emit("channel-click",e)}}};function Fe(e,t,r,n,s,i){const a=o.resolveComponent("dt-icon-lock"),c=o.resolveComponent("dt-stack"),l=o.resolveComponent("dt-link"),m=o.resolveComponent("node-view-wrapper");return o.openBlock(),o.createBlock(m,{class:"d-d-inline-block"},{default:o.withCtx(()=>[o.createVNode(l,{kind:"mention",onClick:o.withModifiers(i.handleClick,["prevent"])},{default:o.withCtx(()=>[o.createVNode(c,{direction:"row",gap:"0"},{default:o.withCtx(()=>[e.$props.node.attrs.locked?(o.openBlock(),o.createBlock(a,{key:0,size:"200"})):o.createCommentVNode("",!0),o.createElementVNode("span",null,o.toDisplayString(i.text),1)]),_:1})]),_:1},8,["onClick"])]),_:1})}const Ue=h._(We,[["render",Fe]]),ze=B.extend({name:"channel",addNodeView(){return d.VueNodeViewRenderer(Ue)},parseHTML(){return[{tag:"channel-component"}]},addAttributes(){return{name:{default:""},id:{default:""},locked:{default:!1},channelKey:{default:""}}},renderText({node:e}){return`#${e.attrs.id}`},renderHTML({HTMLAttributes:e}){return["channel-component",u.mergeAttributes(this.options.HTMLAttributes,e)]}}).configure({suggestion:{char:"#",pluginKey:new g.PluginKey("channelSuggestion")}}),Xe={compatConfig:{MODE:3},name:"SlashCommandsComponent",components:{NodeViewWrapper:d.NodeViewWrapper},props:{...d.nodeViewProps},emits:["selected-command"],computed:{text(){return"/"+this.$props.node.attrs.command}},created(){var r,n,s;const e=this.$props.node.attrs.command;this.$emit("selected-command",e);const t=(s=(n=(r=this.editor)==null?void 0:r.storage)==null?void 0:n["slash-commands"])==null?void 0:s.onSelectedCommand;t&&typeof t=="function"&&t(e)}};function Je(e,t,r,n,s,i){const a=o.resolveComponent("node-view-wrapper");return o.openBlock(),o.createBlock(a,{class:"d-d-inline-block"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(i.text),1)]),_:1})}const Ye=h._(Xe,[["render",Je]]),Ge=(e,t)=>[...e.matchAll(t)].map(n=>{let s=n[2];return s.endsWith(" ")||(s+=" "),{index:n.index,text:s,match:n}}),Qe=B.extend({name:"slash-commands",group:"inline",inline:!0,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),onSelectedCommand:null}},addStorage(){return{onSelectedCommand:this.options.onSelectedCommand}},addNodeView(){return d.VueNodeViewRenderer(Ye)},parseHTML(){return[{tag:"command-component"}]},addAttributes(){return{command:{default:""},parametersExample:{default:""},description:{default:""}}},renderText({node:e}){return`/${e.attrs.command}`},renderHTML({HTMLAttributes:e}){return["command-component",u.mergeAttributes(this.options.HTMLAttributes,e)]},addInputRules(){var r;const e=(r=this.options.suggestion)==null?void 0:r.items({query:""}).map(n=>n.command),t=new RegExp(`^((?:\\/)(${e.join("|")})) $`);return[u.nodeInputRule({find:t,type:this.type,getAttributes(n){return{command:n[2]}}})]},addPasteRules(){var r;const e=(r=this.options.suggestion)==null?void 0:r.items({query:""}).map(n=>n.command),t=new RegExp(`^((?:\\/)(${e.join("|")})) ?$`,"g");return[u.nodePasteRule({find:n=>Ge(n,t),type:this.type,getAttributes(n){return{command:n[0].trim()}}})]}}).configure({suggestion:{char:"/",pluginKey:new g.PluginKey("slashCommandSuggestion")}}),Ze={compatConfig:{MODE:3},name:"MentionSuggestion",components:{DtAvatar:ie.default,DtStack:w.default},props:{item:{type:Object,required:!0}},computed:{name(){return this.item.name},avatarSrc(){return this.item.avatarSrc},presence(){return this.item.presence},status(){return this.item.status},presenceText(){return this.item.presenceText},presenceFontColorClass(){return{active:"d-recipe-contact-row--active",busy:"d-recipe-contact-row--busy",away:"d-recipe-contact-row--away",offline:"d-recipe-contact-row--busy"}[this.presence]},showDetails(){return this.item.showDetails}}},et={class:"d-mention-suggestion__name"},tt={key:1,class:"d-mention-suggestion__divider"},nt={key:2,class:"d-mention-suggestion__status"};function ot(e,t,r,n,s,i){const a=o.resolveComponent("dt-avatar"),c=o.resolveComponent("dt-stack");return o.openBlock(),o.createBlock(c,{direction:"row",class:"d-mention-suggestion__container",gap:"400"},{default:o.withCtx(()=>[o.createVNode(a,{"full-name":i.name,"image-src":i.avatarSrc,"image-alt":i.name,"show-presence":i.showDetails,presence:i.presence,size:"sm"},null,8,["full-name","image-src","image-alt","show-presence","presence"]),o.createVNode(c,{class:"d-mention-suggestion__details-container",gap:"100"},{default:o.withCtx(()=>[o.createElementVNode("span",et,o.toDisplayString(i.name),1),i.showDetails?(o.openBlock(),o.createBlock(c,{key:0,direction:"row",gap:"300",class:"d-label--sm-plain"},{default:o.withCtx(()=>[i.presenceText?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(["d-mention-suggestion__presence",[i.presenceFontColorClass]])},o.toDisplayString(i.presenceText),3)):o.createCommentVNode("",!0),i.status&&i.presenceText?(o.openBlock(),o.createElementBlock("div",tt," • ")):o.createCommentVNode("",!0),i.status?(o.openBlock(),o.createElementBlock("div",nt,o.toDisplayString(i.status),1)):o.createCommentVNode("",!0)]),_:1})):o.createCommentVNode("",!0)]),_:1})]),_:1})}const rt=h._(Ze,[["render",ot]]),st={allowSpaces:!0,render:()=>{let e,t,r=!1;return{onStart:n=>{e=new d.VueRenderer(T,{props:{itemComponent:o.markRaw(rt),itemType:"mention",...n},editor:n.editor}),n.clientRect&&(t=b("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{r=!0},onHidden:()=>{r=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[E]}),n.items.length>0&&(t==null||t[0].show()))},onUpdate(n){e==null||e.updateProps(n),n.items.length>0?t==null||t[0].show():t==null||t[0].hide(),n.clientRect&&(t==null||t[0].setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(n){var s;if(r)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(n)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},it={compatConfig:{MODE:3},name:"ChannelSuggestion",components:{DtStack:w.default,DtIconHash:ae,DtIconLock:ce},props:{item:{type:Object,required:!0}},computed:{name(){return this.item.name}}};function at(e,t,r,n,s,i){const a=o.resolveComponent("dt-icon-hash"),c=o.resolveComponent("dt-icon-lock"),l=o.resolveComponent("dt-stack");return o.openBlock(),o.createBlock(l,{direction:"row",gap:"400"},{default:o.withCtx(()=>[r.item.locked?(o.openBlock(),o.createBlock(c,{key:1,size:"300"})):(o.openBlock(),o.createBlock(a,{key:0,size:"300"})),o.createElementVNode("span",null,o.toDisplayString(i.name),1)]),_:1})}const ct=h._(it,[["render",at]]),lt={allowSpaces:!0,render:()=>{let e,t,r=!1;return{onStart:n=>{e=new d.VueRenderer(T,{props:{itemComponent:o.markRaw(ct),itemType:"channel",...n},editor:n.editor}),n.clientRect&&(t=b("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{r=!0},onHidden:()=>{r=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[E]}),n.items.length>0&&(t==null||t[0].show()))},onUpdate(n){e==null||e.updateProps(n),n.items.length>0?t==null||t[0].show():t==null||t[0].hide(),n.clientRect&&(t==null||t[0].setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(n){var s;if(r)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(n)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},dt={compatConfig:{MODE:3},name:"SlashCommandSuggestion",props:{item:{type:Object,required:!0}},computed:{command(){return this.item.command},description(){return this.item.description},parametersExample(){return this.item.parametersExample}}},ut={class:"d-body--md-compact"},mt={key:0},ht={class:"d-body--sm d-fc-tertiary"};function pt(e,t,r,n,s,i){return o.openBlock(),o.createElementBlock("div",null,[o.createElementVNode("div",ut,[o.createElementVNode("span",null,"/"+o.toDisplayString(i.command),1),i.parametersExample?(o.openBlock(),o.createElementBlock("span",mt,o.toDisplayString(i.parametersExample),1)):o.createCommentVNode("",!0)]),o.createElementVNode("div",ht,o.toDisplayString(i.description),1)])}const ft=h._(dt,[["render",pt]]),gt={allowSpaces:!0,startOfLine:!0,render:()=>{let e,t,r=!1;return{onStart:n=>{e=new d.VueRenderer(T,{parent:void 0,props:{itemComponent:o.markRaw(ft),itemType:"slash-command",...n},editor:n.editor}),n.clientRect&&(t=b("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{r=!0},onHidden:()=>{r=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[E]}),n.items.length>0&&(t==null||t[0].show()))},onUpdate(n){e==null||e.updateProps(n),n.items.length>0?t==null||t[0].show():t==null||t[0].hide(),n.clientRect&&(t==null||t[0].setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(n){var s;if(r)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(n)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},kt={compatConfig:{MODE:3},name:"DtRichTextEditor",components:{EditorContent:d.EditorContent,BubbleMenu:d.BubbleMenu,DtButton:ue.default,DtStack:w.default},props:{modelValue:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},preventTyping:{type:Boolean,default:!1},pasteRichText:{type:Boolean,default:!0},allowLineBreaks:{type:Boolean,default:!1},inputAriaLabel:{type:String,required:!0},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(e){return typeof e=="string"?x.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(e):!0}},outputFormat:{type:String,default:"html",validator(e){return x.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(e)}},placeholder:{type:String,default:""},link:{type:[Boolean,Object],default:!1},customLink:{type:[Boolean,Object],default:!1},mentionSuggestion:{type:Object,default:null},channelSuggestion:{type:Object,default:null},slashCommandSuggestion:{type:Object,default:null},allowBlockquote:{type:Boolean,default:!0},allowBold:{type:Boolean,default:!0},allowBulletList:{type:Boolean,default:!0},allowItalic:{type:Boolean,default:!0},allowStrike:{type:Boolean,default:!0},allowUnderline:{type:Boolean,default:!0},allowCode:{type:Boolean,default:!0},allowCodeblock:{type:Boolean,default:!0},allowInlineImages:{type:Boolean,default:!1},allowFontColor:{type:Boolean,default:!1},allowFontFamily:{type:Boolean,default:!1},additionalExtensions:{type:Array,default:()=>[]},hideLinkBubbleMenu:{type:Boolean,default:!1},useDivTags:{type:Boolean,default:!1}},emits:["input","json-input","html-input","text-input","markdown-input","update:modelValue","blur","focus","enter","edit-link","selected","selected-command","mention-click","channel-click"],data(){return{editor:null,tippyOptions:{appendTo:()=>{var e;return(e=_.returnFirstEl(this.$refs.editor.$el).getRootNode())==null?void 0:e.querySelector("body")},placement:"top-start"},i18n:new de.DialtoneLocalization,jsonToMarkdownConverter:{convertToMarkdown(e){return this.processNode(e)},processNodeContent(e){return e.content?e.content.map(t=>this.processNode(t)).join(""):""},processNode(e){if(!e)return"";const r={doc:n=>this.processDocNode(n),paragraph:n=>this.processParagraphNode(n),text:n=>this.processTextNode(n),hardBreak:()=>this.processHardBreakNode(),blockquote:n=>this.processBlockquoteNode(n),bulletList:n=>this.processBulletListNode(n),orderedList:n=>this.processOrderedListNode(n),listItem:n=>this.processListItemNode(n),codeBlock:n=>this.processCodeBlockNode(n),mention:n=>this.processMentionNode(n),channel:n=>this.processChannelNode(n),"slash-commands":n=>this.processSlashCommandsNode(n),emoji:n=>this.processEmojiNode(n)}[e.type];return r?r(e):this.processUnknownNode(e)},processDocNode(e){return this.processNodeContent(e)},processParagraphNode(e){const t=this.processNodeContent(e);return t?t+`
2
2
  `:`
3
3
  `},processTextNode(e){let t=e.text||"";return e.marks&&(t=this.applyMarks(t,e.marks)),t},processHardBreakNode(){return`
4
4
  `},processBlockquoteNode(e){return this.processNodeContent(e).split(`
5
- `).map(o=>o?`> ${o}`:">").join(`
5
+ `).map(r=>r?`> ${r}`:">").join(`
6
6
  `)+`
7
- `},processBulletListNode(e){return this.processNodeContent(e)},processOrderedListNode(e){return e.content?e.content.map((t,o)=>this.processNode(t).replace(/^- /,`${o+1}. `)).join(""):""},processListItemNode(e){const t=this.processNodeContent(e);return t?`- ${t.replace(/\n$/,"")}
7
+ `},processBulletListNode(e){return this.processNodeContent(e)},processOrderedListNode(e){return e.content?e.content.map((t,r)=>this.processNode(t).replace(/^- /,`${r+1}. `)).join(""):""},processListItemNode(e){const t=this.processNodeContent(e);return t?`- ${t.replace(/\n$/,"")}
8
8
  `:""},processCodeBlockNode(e){return`\`\`\`
9
9
  ${this.processNodeContent(e)}
10
- \`\`\``},processMentionNode(e){var s,i,a;const t=((s=e.attrs)==null?void 0:s.name)||"",o=((i=e.attrs)==null?void 0:i.id)||"",n=((a=e.attrs)==null?void 0:a.contactKey)||"";return`<!-- @mention: {"id": "${o}", "contactKey": "${n}", "name": "${t}"} -->`},processChannelNode(e){var s,i,a;const t=((s=e.attrs)==null?void 0:s.name)||"",o=((i=e.attrs)==null?void 0:i.id)||"",n=((a=e.attrs)==null?void 0:a.locked.toString())||"";return`<!-- @channel: {"id": "${o}", "name": "${t}", "locked": "${n}"} -->`},processSlashCommandsNode(e){var n,s;const t=((n=e.attrs)==null?void 0:n.command)||"",o=((s=e.attrs)==null?void 0:s.parameters)||"";return`/${t}${o?` ${o}`:""}`},processEmojiNode(e){var t;return((t=e.attrs)==null?void 0:t.code)||""},processUnknownNode(e){return this.processNodeContent(e)},applyMarks(e,t){let o=e;return[...t].sort((s,i)=>{const a={link:0,bold:1,italic:2,strike:3,code:4};return(a[s.type]||5)-(a[i.type]||5)}).forEach(s=>{var i;switch(s.type){case"bold":o=`**${o}**`;break;case"italic":o=`*${o}*`;break;case"strike":o=`~~${o}~~`;break;case"code":o=`\`${o}\``;break;case"link":{const a=((i=s.attrs)==null?void 0:i.href)||"";o=`[${o}](${a})`;break}}}),o}}}},computed:{attrs(){return{...this.$attrs,onInput:()=>{},onFocus:()=>{},onBlur:()=>{}}},extensions(){const e=[A,Y,Q,j];e.push(this.useDivTags?Ae:R),this.allowBold&&e.push(H),this.allowBlockquote&&e.push(O),this.allowBulletList&&(e.push(K),e.push(U.extend({renderText({node:n}){return n.textContent}})),e.push(z)),this.allowItalic&&e.push(W),this.allowStrike&&e.push(X),this.allowUnderline&&e.push(J),this.placeholder&&e.push(q.configure({placeholder:this.placeholder}));const t=this,o=u.Extension.create({addKeyboardShortcuts(){return{"Shift-Enter":({editor:n})=>t.allowLineBreaks?!1:(n.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>t.allowBulletList&&s.splitListItem("listItem"),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),!0),Enter:()=>t.allowLineBreaks?!1:(t.$emit("enter"),!0)}}});if(e.push(o),this.link&&e.push(F.extend({inclusive:!1,addKeyboardShortcuts(){return{"Mod-k":()=>(t.$emit("edit-link"),!0)}}}).configure({HTMLAttributes:{class:"d-link d-wb-break-all"},openOnClick:!1,autolink:!0,protocols:x.RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS})),this.customLink&&e.push(this.getExtension(Pe,this.customLink)),this.mentionSuggestion){const n={...this.mentionSuggestion,...st};e.push(Ke.configure({suggestion:n}))}if(this.channelSuggestion){const n={...this.channelSuggestion,...lt};e.push(ze.configure({suggestion:n}))}if(this.slashCommandSuggestion){const n={...this.slashCommandSuggestion,...gt};e.push(Qe.configure({suggestion:n,onSelectedCommand:s=>{this.$emit("selected-command",s)}}))}return e.push(ve),e.push(G.configure({types:["paragraph"]})),this.allowCode&&e.push(V),this.allowCodeblock&&e.push(P.extend({renderText({node:n}){return`\`\`\`
10
+ \`\`\``},processMentionNode(e){var s,i,a;const t=((s=e.attrs)==null?void 0:s.name)||"",r=((i=e.attrs)==null?void 0:i.id)||"",n=((a=e.attrs)==null?void 0:a.contactKey)||"";return`<!-- @mention: {"id": "${r}", "contactKey": "${n}", "name": "${t}"} -->`},processChannelNode(e){var i,a,c,l;const t=((i=e.attrs)==null?void 0:i.name)||"",r=((a=e.attrs)==null?void 0:a.id)||"",n=((c=e.attrs)==null?void 0:c.locked.toString())||"",s=((l=e.attrs)==null?void 0:l.channelKey)||"";return`<!-- @channel: {"id": "${r}", "channelKey": "${s}", "name": "${t}", "locked": "${n}"} -->`},processSlashCommandsNode(e){var n,s;const t=((n=e.attrs)==null?void 0:n.command)||"",r=((s=e.attrs)==null?void 0:s.parameters)||"";return`/${t}${r?` ${r}`:""}`},processEmojiNode(e){var t;return((t=e.attrs)==null?void 0:t.code)||""},processUnknownNode(e){return this.processNodeContent(e)},applyMarks(e,t){let r=e;return[...t].sort((s,i)=>{const a={link:0,bold:1,italic:2,strike:3,code:4};return(a[s.type]||5)-(a[i.type]||5)}).forEach(s=>{var i;switch(s.type){case"bold":r=`**${r}**`;break;case"italic":r=`*${r}*`;break;case"strike":r=`~~${r}~~`;break;case"code":r=`\`${r}\``;break;case"link":{const a=((i=s.attrs)==null?void 0:i.href)||"";r=`[${r}](${a})`;break}}}),r}}}},computed:{attrs(){return{...this.$attrs,onInput:()=>{},onFocus:()=>{},onBlur:()=>{}}},extensions(){const e=[A,Y,Q,j];e.push(this.useDivTags?Ae:$),this.allowBold&&e.push(H),this.allowBlockquote&&e.push(O),this.allowBulletList&&(e.push(K),e.push(U.extend({renderText({node:n}){return n.textContent}})),e.push(z)),this.allowItalic&&e.push(W),this.allowStrike&&e.push(X),this.allowUnderline&&e.push(J),this.placeholder&&e.push(q.configure({placeholder:this.placeholder}));const t=this,r=u.Extension.create({addKeyboardShortcuts(){return{"Shift-Enter":({editor:n})=>t.allowLineBreaks?!1:(n.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>t.allowBulletList&&s.splitListItem("listItem"),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),!0),Enter:()=>t.allowLineBreaks?!1:(t.$emit("enter"),!0)}}});if(e.push(r),this.link&&e.push(F.extend({inclusive:!1,addKeyboardShortcuts(){return{"Mod-k":()=>(t.$emit("edit-link"),!0)}}}).configure({HTMLAttributes:{class:"d-link d-wb-break-all"},openOnClick:!1,autolink:!0,protocols:x.RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS})),this.customLink&&e.push(this.getExtension(Pe,this.customLink)),this.mentionSuggestion){const n={...this.mentionSuggestion,...st};e.push(Ke.configure({suggestion:n}))}if(this.channelSuggestion){const n={...this.channelSuggestion,...lt};e.push(ze.configure({suggestion:n}))}if(this.slashCommandSuggestion){const n={...this.slashCommandSuggestion,...gt};e.push(Qe.configure({suggestion:n,onSelectedCommand:s=>{this.$emit("selected-command",s)}}))}return e.push(Ne),e.push(G.configure({types:["paragraph"]})),this.allowCode&&e.push(V),this.allowCodeblock&&e.push(P.extend({renderText({node:n}){return`\`\`\`
11
11
  ${n.textContent}
12
- \`\`\``}}).configure({HTMLAttributes:{class:"d-rich-text-editor__code-block"}})),this.allowInlineImages&&e.push(Ve),(this.allowFontFamily||this.allowFontColor)&&(e.push(Z),this.allowFontColor&&e.push(ee),this.allowFontFamily&&e.push(te)),this.additionalExtensions.length&&e.push(...this.additionalExtensions),e},inputAttrs(){const e={"aria-label":this.inputAriaLabel,"aria-multiline":!0,role:"textbox"};return this.editable||(e["aria-readonly"]=!0),e}},watch:{editable(e){this.editor.setEditable(e),this.updateEditorAttributes({"aria-readonly":!e})},inputClass(e){this.updateEditorAttributes({class:e})},inputAriaLabel(e){this.updateEditorAttributes({"aria-label":e})},extensions(){this.destroyEditor(),this.createEditor()},modelValue(e){this.processValue(e)}},created(){this.createEditor()},beforeUnmount(){this.destroyEditor()},mounted(){_.warnIfUnmounted(_.returnFirstEl(this.$el),this.$options.name),this.processValue(this.modelValue,!1)},methods:{createEditor(){this.editor=new d.Editor({autofocus:this.autoFocus,content:this.modelValue,editable:this.editable,extensions:this.extensions,parseOptions:{preserveWhitespace:"full"},editorProps:{attributes:{...this.inputAttrs,class:this.inputClass},handleKeyDown:(e,t)=>{if(!this.preventTyping)return!1;const o=["Backspace"];return!this.allowLineBreaks&&!t.shiftKey&&o.push("Enter"),!o.includes(t.key)},handlePaste:(e,t)=>{const o=t.clipboardData||window.clipboardData,n=o.getData("text/plain"),s=o.getData("text/html");return this.processPasteData(e,n,s)},transformPastedHTML(e){return e.replace(/(<\/\w+>)((<br \/>)+)/g,"$2$3$1")}}}),this.addEditorListeners()},bubbleMenuShouldShow({editor:e}){return e.isActive("link")},getSelectedLinkText(e){var c,l,m;const{view:t,state:o}=e,{from:n,to:s}=t.state.selection,i=o.doc.textBetween(n,s,""),a=this.editor.state.doc.nodeAt(n);return a&&((m=(l=(c=a.marks)==null?void 0:c.at(0))==null?void 0:l.type)==null?void 0:m.name)==="link"?a.textContent:i},editLink(){const e=this.getSelectedLinkText(this.editor),t={href:this.editor.getAttributes("link").href,text:e};this.$emit("edit-link",t)},removeLink(){var e,t,o,n;(n=(o=(t=(e=this.editor)==null?void 0:e.chain())==null?void 0:t.focus())==null?void 0:o.unsetLink())==null||n.run()},openLink(){var t,o;(o=(t=this.editor)==null?void 0:t.chain())==null||o.focus();const e=this.editor.getAttributes("link").href;window.open(e,"_blank")},setLink(e,t,o,n=x.RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,s){var c,l,m;if(!e){this.removeLink();return}n.find(p=>p.test(e))||(e=`${s}${e}`),this.editor.chain().focus().extendMarkRange("link").run();const a=(m=(l=(c=this.editor)==null?void 0:c.view)==null?void 0:l.state)==null?void 0:m.selection;this.editor.chain().focus().insertContent(t).setTextSelection({from:a.from,to:a.from+t.length}).setLink({href:e,class:o.class}).run()},processValue(e,t=!0){const o=this.getOutput();if(!(t&&le(e,o))){if(typeof e=="string"&&this.outputFormat==="text"){const n=new RegExp(`(${$.emojiPattern})`,"g");e=e==null?void 0:e.replace(n,'<emoji-component code="$1"></emoji-component>')}this.editor.commands.setContent(e,!1,{preserveWhitespace:"full"})}},destroyEditor(){this.editor.destroy()},insertPlainTextWithHardBreaks(e,t){const{tr:o}=e.state,{from:n,to:s}=e.state.selection;o.deleteRange(n,s);const i=t.split(/\r?\n/);let a=n;for(let c=0;c<i.length;c++)c>0&&(o.insert(a,e.state.schema.nodes.hardBreak.create()),a++),o.insertText(i[c],a),a+=i[c].length;e.dispatch(o)},shouldPreserveLineBreaks(e,t){return this.pasteRichText?!t&&e&&this.hasBlankLines(e):!!e},processPasteData(e,t,o){if(this.shouldPreserveLineBreaks(t,o))return this.insertPlainTextWithHardBreaks(e,t),!0;if(this.shouldHandlePreformattedHTML(o)){const n=this.extractPreformattedText(o);if(n&&n.includes(`
13
- `))return this.insertPlainTextWithHardBreaks(e,n),!0}return!1},shouldHandlePreformattedHTML(e){return this.pasteRichText&&e&&this.containsPreformattedContent(e)},containsPreformattedContent(e){const t=document.createElement("div");t.innerHTML=e;const o=t.querySelectorAll("*");for(const n of o)if(this.hasPreWhitespace(n)&&this.hasLineBreaks(n))return!0;return!1},hasPreWhitespace(e){const t=e.getAttribute("style")||"",o=e.style.whiteSpace||"",n=o==="pre"||o==="pre-wrap",s=t.includes("white-space: pre");return n||s},hasLineBreaks(e){return e.textContent&&e.textContent.includes(`
12
+ \`\`\``}}).configure({HTMLAttributes:{class:"d-rich-text-editor__code-block"}})),this.allowInlineImages&&e.push(Ve),(this.allowFontFamily||this.allowFontColor)&&(e.push(Z),this.allowFontColor&&e.push(ee),this.allowFontFamily&&e.push(te)),this.additionalExtensions.length&&e.push(...this.additionalExtensions),e},inputAttrs(){const e={"aria-label":this.inputAriaLabel,"aria-multiline":!0,role:"textbox"};return this.editable||(e["aria-readonly"]=!0),e}},watch:{editable(e){this.editor.setEditable(e),this.updateEditorAttributes({"aria-readonly":!e})},inputClass(e){this.updateEditorAttributes({class:e})},inputAriaLabel(e){this.updateEditorAttributes({"aria-label":e})},extensions(){this.destroyEditor(),this.createEditor()},modelValue(e){this.processValue(e)}},created(){this.createEditor()},beforeUnmount(){this.destroyEditor()},mounted(){_.warnIfUnmounted(_.returnFirstEl(this.$el),this.$options.name),this.processValue(this.modelValue,!1)},methods:{createEditor(){this.editor=new d.Editor({autofocus:this.autoFocus,content:this.modelValue,editable:this.editable,extensions:this.extensions,parseOptions:{preserveWhitespace:"full"},editorProps:{attributes:{...this.inputAttrs,class:this.inputClass},handleKeyDown:(e,t)=>{if(!this.preventTyping)return!1;const r=["Backspace"];return!this.allowLineBreaks&&!t.shiftKey&&r.push("Enter"),!r.includes(t.key)},handlePaste:(e,t)=>{const r=t.clipboardData||window.clipboardData,n=r.getData("text/plain"),s=r.getData("text/html");return this.processPasteData(e,n,s)},transformPastedHTML(e){return e.replace(/(<\/\w+>)((<br \/>)+)/g,"$2$3$1")}}}),this.addEditorListeners()},bubbleMenuShouldShow({editor:e}){return e.isActive("link")},getSelectedLinkText(e){var c,l,m;const{view:t,state:r}=e,{from:n,to:s}=t.state.selection,i=r.doc.textBetween(n,s,""),a=this.editor.state.doc.nodeAt(n);return a&&((m=(l=(c=a.marks)==null?void 0:c.at(0))==null?void 0:l.type)==null?void 0:m.name)==="link"?a.textContent:i},editLink(){const e=this.getSelectedLinkText(this.editor),t={href:this.editor.getAttributes("link").href,text:e};this.$emit("edit-link",t)},removeLink(){var e,t,r,n;(n=(r=(t=(e=this.editor)==null?void 0:e.chain())==null?void 0:t.focus())==null?void 0:r.unsetLink())==null||n.run()},openLink(){var t,r;(r=(t=this.editor)==null?void 0:t.chain())==null||r.focus();const e=this.editor.getAttributes("link").href;window.open(e,"_blank")},setLink(e,t,r,n=x.RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,s){var c,l,m;if(!e){this.removeLink();return}n.find(p=>p.test(e))||(e=`${s}${e}`),this.editor.chain().focus().extendMarkRange("link").run();const a=(m=(l=(c=this.editor)==null?void 0:c.view)==null?void 0:l.state)==null?void 0:m.selection;this.editor.chain().focus().insertContent(t).setTextSelection({from:a.from,to:a.from+t.length}).setLink({href:e,class:r.class}).run()},processValue(e,t=!0){const r=this.getOutput();if(!(t&&le(e,r))){if(typeof e=="string"&&this.outputFormat==="text"){const n=new RegExp(`(${R.emojiPattern})`,"g");e=e==null?void 0:e.replace(n,'<emoji-component code="$1"></emoji-component>')}this.editor.commands.setContent(e,!1,{preserveWhitespace:"full"})}},destroyEditor(){this.editor.destroy()},insertPlainTextWithHardBreaks(e,t){const s=(this.pasteRichText?t:t.replace(/\r\n/g,`
13
+ `).replace(/\n\n/g,`
14
+ `)).replace(/[\r\n]+$/,"").split(/\r?\n/),i=[];for(let a=0;a<s.length;a++)a>0&&i.push({type:"hardBreak"}),s[a]&&i.push({type:"text",text:s[a]});this.editor.chain().focus().insertContent(i).run()},shouldPreserveLineBreaks(e,t){return this.pasteRichText?!t&&e&&this.hasBlankLines(e):!!e},processPasteData(e,t,r){if(this.shouldPreserveLineBreaks(t,r))return this.insertPlainTextWithHardBreaks(e,t),!0;if(this.shouldHandlePreformattedHTML(r)){const n=this.extractPreformattedText(r);if(n&&n.includes(`
15
+ `))return this.insertPlainTextWithHardBreaks(e,n),!0}return!1},shouldHandlePreformattedHTML(e){return this.pasteRichText&&e&&this.containsPreformattedContent(e)},containsPreformattedContent(e){const t=document.createElement("div");t.innerHTML=e;const r=t.querySelectorAll("*");for(const n of r)if(this.hasPreWhitespace(n)&&this.hasLineBreaks(n))return!0;return!1},hasPreWhitespace(e){const t=e.getAttribute("style")||"",r=e.style.whiteSpace||"",n=r==="pre"||r==="pre-wrap",s=t.includes("white-space: pre");return n||s},hasLineBreaks(e){return e.textContent&&e.textContent.includes(`
14
16
  `)},hasBlankLines(e){return e.includes(`
15
17
 
16
- `)||/\n\s*\n/.test(e)},extractPreformattedText(e){const t=document.createElement("div");return t.innerHTML=e,this.walkAndExtractText(t)},walkAndExtractText(e){let t="";if(e.nodeType===Node.TEXT_NODE)t+=e.textContent;else if(e.nodeType===Node.ELEMENT_NODE)if(this.hasPreWhitespace(e))t+=e.textContent;else for(const o of e.childNodes)t+=this.walkAndExtractText(o);return t},triggerInputChangeEvents(){const e=this.getOutput();this.$emit("input",e),this.$emit("update:modelValue",e);const t=this.editor.getJSON();this.$emit("json-input",t);const o=this.editor.getHTML();this.$emit("html-input",o);const n=this.editor.getText({blockSeparator:`
18
+ `)||/\n\s*\n/.test(e)},extractPreformattedText(e){const t=document.createElement("div");return t.innerHTML=e,this.walkAndExtractText(t)},walkAndExtractText(e){let t="";if(e.nodeType===Node.TEXT_NODE)t+=e.textContent;else if(e.nodeType===Node.ELEMENT_NODE)if(this.hasPreWhitespace(e))t+=e.textContent;else for(const r of e.childNodes)t+=this.walkAndExtractText(r);return t},triggerInputChangeEvents(){const e=this.getOutput();this.$emit("input",e),this.$emit("update:modelValue",e);const t=this.editor.getJSON();this.$emit("json-input",t);const r=this.editor.getHTML();this.$emit("html-input",r);const n=this.editor.getText({blockSeparator:`
17
19
  `});this.$emit("text-input",n);const s=this.jsonToMarkdownConverter.convertToMarkdown(t);this.$emit("markdown-input",s)},addEditorListeners(){this.editor.on("create",()=>{this.triggerInputChangeEvents()}),this.editor.on("update",()=>{this.triggerInputChangeEvents()}),this.editor.on("selectionUpdate",({editor:e})=>{this.$emit("selected",this.getSelectedLinkText(e))}),this.editor.on("focus",({event:e})=>{this.$emit("focus",e)}),this.editor.on("blur",({event:e})=>{this.$emit("blur",e)}),this.editor.on("mention-click",e=>{this.$emit("mention-click",e)}),this.editor.on("channel-click",e=>{this.$emit("channel-click",e)})},getOutput(){switch(this.outputFormat){case"json":return this.editor.getJSON();case"html":return this.editor.getHTML();case"markdown":return this.jsonToMarkdownConverter.convertToMarkdown(this.editor.getJSON());case"text":default:return this.editor.getText({blockSeparator:`
18
- `})}},getExtension(e,t){var o;return typeof t=="boolean"?e:(o=e.configure)==null?void 0:o.call(e,t)},updateEditorAttributes(e){this.editor.setOptions({editorProps:{attributes:{...this.inputAttrs,class:this.inputClass,...e}}})},focusEditor(){this.editor.commands.focus()}}},_t={class:"d-popover__dialog"};function Ct(e,t,o,n,s,i){const a=r.resolveComponent("dt-button"),c=r.resolveComponent("dt-stack"),l=r.resolveComponent("bubble-menu"),m=r.resolveComponent("editor-content");return r.openBlock(),r.createElementBlock("div",null,[s.editor&&o.link&&!o.hideLinkBubbleMenu?(r.openBlock(),r.createBlock(l,{key:0,editor:s.editor,"should-show":i.bubbleMenuShouldShow,"tippy-options":s.tippyOptions,style:{visibility:"visible"}},{default:r.withCtx(()=>[r.createElementVNode("div",_t,[r.createVNode(c,{direction:"row",class:"d-rich-text-editor-bubble-menu__button-stack",gap:"0"},{default:r.withCtx(()=>[r.createVNode(a,{kind:"muted",importance:"clear",onClick:i.editLink},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(s.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL")),1)]),_:1},8,["onClick"]),r.createVNode(a,{kind:"muted",importance:"clear",onClick:i.openLink},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(s.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL")),1)]),_:1},8,["onClick"]),r.createVNode(a,{kind:"danger",importance:"clear",onClick:i.removeLink},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(s.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL")),1)]),_:1},8,["onClick"])]),_:1})])]),_:1},8,["editor","should-show","tippy-options"])):r.createCommentVNode("",!0),r.createVNode(m,r.mergeProps({ref:"editor",editor:s.editor,class:"d-rich-text-editor","data-qa":"dt-rich-text-editor"},i.attrs),null,16,["editor"])])}const wt=h._(kt,[["render",Ct]]);exports.default=wt;
20
+ `})}},getExtension(e,t){var r;return typeof t=="boolean"?e:(r=e.configure)==null?void 0:r.call(e,t)},updateEditorAttributes(e){this.editor.setOptions({editorProps:{attributes:{...this.inputAttrs,class:this.inputClass,...e}}})},focusEditor(){this.editor.commands.focus()}}},_t={class:"d-popover__dialog"};function wt(e,t,r,n,s,i){const a=o.resolveComponent("dt-button"),c=o.resolveComponent("dt-stack"),l=o.resolveComponent("bubble-menu"),m=o.resolveComponent("editor-content");return o.openBlock(),o.createElementBlock("div",null,[s.editor&&r.link&&!r.hideLinkBubbleMenu?(o.openBlock(),o.createBlock(l,{key:0,editor:s.editor,"should-show":i.bubbleMenuShouldShow,"tippy-options":s.tippyOptions,style:{visibility:"visible"}},{default:o.withCtx(()=>[o.createElementVNode("div",_t,[o.createVNode(c,{direction:"row",class:"d-rich-text-editor-bubble-menu__button-stack",gap:"0"},{default:o.withCtx(()=>[o.createVNode(a,{kind:"muted",importance:"clear",onClick:i.editLink},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL")),1)]),_:1},8,["onClick"]),o.createVNode(a,{kind:"muted",importance:"clear",onClick:i.openLink},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL")),1)]),_:1},8,["onClick"]),o.createVNode(a,{kind:"danger",importance:"clear",onClick:i.removeLink},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL")),1)]),_:1},8,["onClick"])]),_:1})])]),_:1},8,["editor","should-show","tippy-options"])):o.createCommentVNode("",!0),o.createVNode(m,o.mergeProps({ref:"editor",editor:s.editor,class:"d-rich-text-editor","data-qa":"dt-rich-text-editor"},i.attrs),null,16,["editor"])])}const yt=h._(kt,[["render",wt]]);exports.default=yt;
19
21
  //# sourceMappingURL=rich-text-editor.cjs.map