@dialpad/dialtone-vue 3.120.0 → 3.120.2

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 (425) hide show
  1. package/dist/chunks/_plugin-vue_export-helper-caHeSgYY.js +11 -0
  2. package/dist/chunks/_plugin-vue_export-helper-caHeSgYY.js.map +1 -0
  3. package/dist/chunks/_plugin-vue_export-helper-fhnQq0tA.js +10 -0
  4. package/dist/chunks/_plugin-vue_export-helper-fhnQq0tA.js.map +1 -0
  5. package/dist/chunks/{dropdown-eWOvBvwq.js → dropdown-Hn-TeTvZ.js} +151 -104
  6. package/dist/chunks/{dropdown-UO3UJalk.js.map → dropdown-Hn-TeTvZ.js.map} +1 -1
  7. package/dist/chunks/dropdown-w8Do29L5.js +442 -0
  8. package/dist/chunks/{dropdown-eWOvBvwq.js.map → dropdown-w8Do29L5.js.map} +1 -1
  9. package/dist/chunks/dropdown_constants-2pGCXy7m.js +8 -0
  10. package/dist/chunks/dropdown_constants-2pGCXy7m.js.map +1 -0
  11. package/dist/chunks/dropdown_constants-w1MXGC3Z.js +9 -0
  12. package/dist/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -0
  13. package/dist/chunks/{icon_constants-OpYAAKwF.js → icon_constants-Dy4MEUJL.js} +7 -6
  14. package/dist/chunks/{icon_constants-2S_OSQ1t.js.map → icon_constants-Dy4MEUJL.js.map} +1 -1
  15. package/dist/chunks/icon_constants-QYpmdE0R.js +16 -0
  16. package/dist/chunks/{icon_constants-OpYAAKwF.js.map → icon_constants-QYpmdE0R.js.map} +1 -1
  17. package/dist/chunks/index-4qgKeErp.js +446 -0
  18. package/dist/chunks/{index-b4iXYvId.js.map → index-4qgKeErp.js.map} +1 -1
  19. package/dist/chunks/index-b_MgDylR.js +447 -0
  20. package/dist/chunks/{index-6tYeqbgP.js.map → index-b_MgDylR.js.map} +1 -1
  21. package/dist/chunks/{input-4UQWegUk.js → input-NmYDD5bn.js} +83 -60
  22. package/dist/chunks/{input-0Uksk4DP.js.map → input-NmYDD5bn.js.map} +1 -1
  23. package/dist/chunks/input-ttnte8zB.js +295 -0
  24. package/dist/chunks/{input-4UQWegUk.js.map → input-ttnte8zB.js.map} +1 -1
  25. package/dist/chunks/input_group-M-D25pOJ.js +152 -0
  26. package/dist/chunks/{input_group-bBKaq3Wi.js.map → input_group-M-D25pOJ.js.map} +1 -1
  27. package/dist/chunks/{input_group-bBKaq3Wi.js → input_group-jWnq2DJT.js} +27 -24
  28. package/dist/chunks/{input_group-AS760Cp7.js.map → input_group-jWnq2DJT.js.map} +1 -1
  29. package/dist/chunks/keyboard_list_navigation-ScXhrxya.js +284 -0
  30. package/dist/chunks/{keyboard_list_navigation-N74Bpdq7.js.map → keyboard_list_navigation-ScXhrxya.js.map} +1 -1
  31. package/dist/chunks/keyboard_list_navigation-fJnl_Iox.js +283 -0
  32. package/dist/chunks/{keyboard_list_navigation-F0O8nht0.js.map → keyboard_list_navigation-fJnl_Iox.js.map} +1 -1
  33. package/dist/chunks/link_constants-Huj7D_hm.js +22 -0
  34. package/dist/chunks/{link_constants-Kn6kP4i1.js.map → link_constants-Huj7D_hm.js.map} +1 -1
  35. package/dist/chunks/link_constants-nWVlXQBs.js +23 -0
  36. package/dist/chunks/{link_constants-vIUB92L4.js.map → link_constants-nWVlXQBs.js.map} +1 -1
  37. package/dist/chunks/list_item_constants-EiqkqZvP.js +13 -0
  38. package/dist/chunks/{list_item_constants-Tsz5CO1m.js.map → list_item_constants-EiqkqZvP.js.map} +1 -1
  39. package/dist/chunks/list_item_constants-u1xcN9Dd.js +14 -0
  40. package/dist/chunks/{list_item_constants-LTUc74pD.js.map → list_item_constants-u1xcN9Dd.js.map} +1 -1
  41. package/dist/chunks/modal-VgxXAQFP.js +105 -0
  42. package/dist/chunks/{modal-qEzlo0Sj.js.map → modal-VgxXAQFP.js.map} +1 -1
  43. package/dist/chunks/modal-XOr4kiNZ.js +106 -0
  44. package/dist/chunks/{modal-VuMFkZFH.js.map → modal-XOr4kiNZ.js.map} +1 -1
  45. package/dist/chunks/notice_action-WTucGhvr.js +222 -0
  46. package/dist/chunks/{notice_action-tJfD5Qw1.js.map → notice_action-WTucGhvr.js.map} +1 -1
  47. package/dist/chunks/notice_action-p-ePanW_.js +223 -0
  48. package/dist/chunks/{notice_action-jO199emq.js.map → notice_action-p-ePanW_.js.map} +1 -1
  49. package/dist/chunks/notice_constants-7Qt2CQEY.js +7 -0
  50. package/dist/chunks/{notice_constants-mC6al2Dm.js.map → notice_constants-7Qt2CQEY.js.map} +1 -1
  51. package/dist/chunks/notice_constants-UXo9e3bS.js +6 -0
  52. package/dist/chunks/{notice_constants-c--hBFQw.js.map → notice_constants-UXo9e3bS.js.map} +1 -1
  53. package/dist/chunks/popover_constants-JwBF9h1Z.js +143 -0
  54. package/dist/chunks/{popover_constants-hOEhklvr.js.map → popover_constants-JwBF9h1Z.js.map} +1 -1
  55. package/dist/chunks/popover_constants-Qkpb0yh2.js +144 -0
  56. package/dist/chunks/{popover_constants-qjlEkroB.js.map → popover_constants-Qkpb0yh2.js.map} +1 -1
  57. package/dist/chunks/{sr_only_close_button-7O-Ev8uM.js → sr_only_close_button-3EdsV-dH.js} +28 -24
  58. package/dist/chunks/{sr_only_close_button-iD7s1Pbj.js.map → sr_only_close_button-3EdsV-dH.js.map} +1 -1
  59. package/dist/chunks/sr_only_close_button-xGrHFjwA.js +91 -0
  60. package/dist/chunks/{sr_only_close_button-7O-Ev8uM.js.map → sr_only_close_button-xGrHFjwA.js.map} +1 -1
  61. package/dist/chunks/stack_constants-HraCekPm.js +15 -0
  62. package/dist/chunks/{stack_constants-m9Ickqw0.js.map → stack_constants-HraCekPm.js.map} +1 -1
  63. package/dist/chunks/stack_constants-SMzMWnAQ.js +14 -0
  64. package/dist/chunks/{stack_constants-u7tNqGtc.js.map → stack_constants-SMzMWnAQ.js.map} +1 -1
  65. package/dist/chunks/tab-RTDgnD9-.js +391 -0
  66. package/dist/chunks/{tab-at7WWglk.js.map → tab-RTDgnD9-.js.map} +1 -1
  67. package/dist/chunks/tab-qc3f42Yp.js +390 -0
  68. package/dist/chunks/{tab-GQZFMq83.js.map → tab-qc3f42Yp.js.map} +1 -1
  69. package/dist/common/constants.cjs +60 -0
  70. package/dist/{lib → common}/constants.cjs.map +1 -1
  71. package/dist/{lib → common}/constants.js +25 -18
  72. package/dist/{lib → common}/constants.js.map +1 -1
  73. package/dist/common/dates.cjs +72 -0
  74. package/dist/{lib → common}/dates.cjs.map +1 -1
  75. package/dist/common/dates.js +72 -0
  76. package/dist/{lib → common}/dates.js.map +1 -1
  77. package/dist/common/emoji.cjs +163 -0
  78. package/dist/common/emoji.cjs.map +1 -0
  79. package/dist/common/emoji.js +168 -0
  80. package/dist/common/emoji.js.map +1 -0
  81. package/dist/common/mixins.cjs +17 -0
  82. package/dist/{lib → common}/mixins.cjs.map +1 -1
  83. package/dist/common/mixins.js +17 -0
  84. package/dist/common/utils.cjs +243 -0
  85. package/dist/{lib → common}/utils.cjs.map +1 -1
  86. package/dist/common/utils.js +243 -0
  87. package/dist/{lib → common}/utils.js.map +1 -1
  88. package/dist/common/validators.cjs +23 -0
  89. package/dist/{lib → common}/validators.cjs.map +1 -1
  90. package/dist/common/validators.js +23 -0
  91. package/dist/{lib → common}/validators.js.map +1 -1
  92. package/dist/dialtone-vue.cjs +373 -1
  93. package/dist/dialtone-vue.cjs.map +1 -1
  94. package/dist/dialtone-vue.js +328 -327
  95. package/dist/dialtone-vue.js.map +1 -1
  96. package/dist/lib/attachment-carousel.cjs +345 -1
  97. package/dist/lib/attachment-carousel.cjs.map +1 -1
  98. package/dist/lib/attachment-carousel.js +126 -108
  99. package/dist/lib/attachment-carousel.js.map +1 -1
  100. package/dist/lib/avatar.cjs +447 -1
  101. package/dist/lib/avatar.cjs.map +1 -1
  102. package/dist/lib/avatar.js +135 -101
  103. package/dist/lib/avatar.js.map +1 -1
  104. package/dist/lib/badge.cjs +206 -1
  105. package/dist/lib/badge.cjs.map +1 -1
  106. package/dist/lib/badge.js +64 -48
  107. package/dist/lib/badge.js.map +1 -1
  108. package/dist/lib/banner.cjs +242 -2
  109. package/dist/lib/banner.cjs.map +1 -1
  110. package/dist/lib/banner.js +81 -71
  111. package/dist/lib/banner.js.map +1 -1
  112. package/dist/lib/breadcrumbs.cjs +150 -1
  113. package/dist/lib/breadcrumbs.cjs.map +1 -1
  114. package/dist/lib/breadcrumbs.js +60 -52
  115. package/dist/lib/breadcrumbs.js.map +1 -1
  116. package/dist/lib/button-group.cjs +41 -1
  117. package/dist/lib/button-group.cjs.map +1 -1
  118. package/dist/lib/button-group.js +15 -14
  119. package/dist/lib/button-group.js.map +1 -1
  120. package/dist/lib/button.cjs +356 -1
  121. package/dist/lib/button.cjs.map +1 -1
  122. package/dist/lib/button.js +108 -88
  123. package/dist/lib/button.js.map +1 -1
  124. package/dist/lib/callbar-button-with-popover.cjs +322 -1
  125. package/dist/lib/callbar-button-with-popover.cjs.map +1 -1
  126. package/dist/lib/callbar-button-with-popover.js +101 -83
  127. package/dist/lib/callbar-button-with-popover.js.map +1 -1
  128. package/dist/lib/callbar-button.cjs +200 -1
  129. package/dist/lib/callbar-button.cjs.map +1 -1
  130. package/dist/lib/callbar-button.js +52 -45
  131. package/dist/lib/callbar-button.js.map +1 -1
  132. package/dist/lib/callbox.cjs +217 -1
  133. package/dist/lib/callbox.cjs.map +1 -1
  134. package/dist/lib/callbox.js +80 -67
  135. package/dist/lib/callbox.js.map +1 -1
  136. package/dist/lib/card.cjs +91 -1
  137. package/dist/lib/card.cjs.map +1 -1
  138. package/dist/lib/card.js +27 -27
  139. package/dist/lib/card.js.map +1 -1
  140. package/dist/lib/checkbox-group.cjs +115 -1
  141. package/dist/lib/checkbox-group.cjs.map +1 -1
  142. package/dist/lib/checkbox-group.js +34 -23
  143. package/dist/lib/checkbox-group.js.map +1 -1
  144. package/dist/lib/checkbox.cjs +156 -1
  145. package/dist/lib/checkbox.cjs.map +1 -1
  146. package/dist/lib/checkbox.js +72 -60
  147. package/dist/lib/checkbox.js.map +1 -1
  148. package/dist/lib/chip.cjs +235 -1
  149. package/dist/lib/chip.cjs.map +1 -1
  150. package/dist/lib/chip.js +84 -67
  151. package/dist/lib/chip.js.map +1 -1
  152. package/dist/lib/codeblock.cjs +23 -2
  153. package/dist/lib/codeblock.cjs.map +1 -1
  154. package/dist/lib/codeblock.js +13 -13
  155. package/dist/lib/codeblock.js.map +1 -1
  156. package/dist/lib/collapsible.cjs +398 -1
  157. package/dist/lib/collapsible.cjs.map +1 -1
  158. package/dist/lib/collapsible.js +123 -100
  159. package/dist/lib/collapsible.js.map +1 -1
  160. package/dist/lib/combobox-multi-select.cjs +589 -1
  161. package/dist/lib/combobox-multi-select.cjs.map +1 -1
  162. package/dist/lib/combobox-multi-select.js +270 -177
  163. package/dist/lib/combobox-multi-select.js.map +1 -1
  164. package/dist/lib/combobox-with-popover.cjs +452 -1
  165. package/dist/lib/combobox-with-popover.cjs.map +1 -1
  166. package/dist/lib/combobox-with-popover.js +172 -127
  167. package/dist/lib/combobox-with-popover.js.map +1 -1
  168. package/dist/lib/combobox.cjs +18 -1
  169. package/dist/lib/combobox.cjs.map +1 -1
  170. package/dist/lib/combobox.js +9 -9
  171. package/dist/lib/contact-info.cjs +205 -1
  172. package/dist/lib/contact-info.cjs.map +1 -1
  173. package/dist/lib/contact-info.js +69 -60
  174. package/dist/lib/contact-info.js.map +1 -1
  175. package/dist/lib/contact-row.cjs +246 -1
  176. package/dist/lib/contact-row.cjs.map +1 -1
  177. package/dist/lib/contact-row.js +67 -63
  178. package/dist/lib/contact-row.js.map +1 -1
  179. package/dist/lib/datepicker.cjs +854 -1
  180. package/dist/lib/datepicker.cjs.map +1 -1
  181. package/dist/lib/datepicker.js +585 -441
  182. package/dist/lib/datepicker.js.map +1 -1
  183. package/dist/lib/description-list.cjs +116 -1
  184. package/dist/lib/description-list.cjs.map +1 -1
  185. package/dist/lib/description-list.js +56 -24
  186. package/dist/lib/description-list.js.map +1 -1
  187. package/dist/lib/dropdown.cjs +36 -1
  188. package/dist/lib/dropdown.cjs.map +1 -1
  189. package/dist/lib/dropdown.js +22 -21
  190. package/dist/lib/dropdown.js.map +1 -1
  191. package/dist/lib/editor.cjs +711 -1
  192. package/dist/lib/editor.cjs.map +1 -1
  193. package/dist/lib/editor.js +271 -235
  194. package/dist/lib/editor.js.map +1 -1
  195. package/dist/lib/emoji-picker.cjs +1277 -1
  196. package/dist/lib/emoji-picker.cjs.map +1 -1
  197. package/dist/lib/emoji-picker.js +859 -569
  198. package/dist/lib/emoji-picker.js.map +1 -1
  199. package/dist/lib/emoji-row.cjs +128 -1
  200. package/dist/lib/emoji-row.cjs.map +1 -1
  201. package/dist/lib/emoji-row.js +89 -75
  202. package/dist/lib/emoji-row.js.map +1 -1
  203. package/dist/lib/emoji-text-wrapper.cjs +102 -1
  204. package/dist/lib/emoji-text-wrapper.cjs.map +1 -1
  205. package/dist/lib/emoji-text-wrapper.js +42 -31
  206. package/dist/lib/emoji-text-wrapper.js.map +1 -1
  207. package/dist/lib/emoji.cjs +158 -1
  208. package/dist/lib/emoji.cjs.map +1 -1
  209. package/dist/lib/emoji.js +153 -6
  210. package/dist/lib/emoji.js.map +1 -1
  211. package/dist/lib/feed-item-row.cjs +296 -1
  212. package/dist/lib/feed-item-row.cjs.map +1 -1
  213. package/dist/lib/feed-item-row.js +119 -100
  214. package/dist/lib/feed-item-row.js.map +1 -1
  215. package/dist/lib/feed-pill.cjs +173 -1
  216. package/dist/lib/feed-pill.cjs.map +1 -1
  217. package/dist/lib/feed-pill.js +70 -57
  218. package/dist/lib/feed-pill.js.map +1 -1
  219. package/dist/lib/general-row.cjs +518 -1
  220. package/dist/lib/general-row.cjs.map +1 -1
  221. package/dist/lib/general-row.js +186 -148
  222. package/dist/lib/general-row.js.map +1 -1
  223. package/dist/lib/group-row.cjs +116 -1
  224. package/dist/lib/group-row.cjs.map +1 -1
  225. package/dist/lib/group-row.js +37 -35
  226. package/dist/lib/group-row.js.map +1 -1
  227. package/dist/lib/grouped-chip.cjs +96 -1
  228. package/dist/lib/grouped-chip.cjs.map +1 -1
  229. package/dist/lib/grouped-chip.js +51 -46
  230. package/dist/lib/grouped-chip.js.map +1 -1
  231. package/dist/lib/hovercard.cjs +223 -1
  232. package/dist/lib/hovercard.cjs.map +1 -1
  233. package/dist/lib/hovercard.js +115 -80
  234. package/dist/lib/hovercard.js.map +1 -1
  235. package/dist/lib/icon.cjs +58 -1
  236. package/dist/lib/icon.cjs.map +1 -1
  237. package/dist/lib/icon.js +20 -20
  238. package/dist/lib/icon.js.map +1 -1
  239. package/dist/lib/image-viewer.cjs +243 -1
  240. package/dist/lib/image-viewer.cjs.map +1 -1
  241. package/dist/lib/image-viewer.js +104 -80
  242. package/dist/lib/image-viewer.js.map +1 -1
  243. package/dist/lib/input-group.cjs +91 -1
  244. package/dist/lib/input-group.cjs.map +1 -1
  245. package/dist/lib/input-group.js +41 -39
  246. package/dist/lib/input-group.js.map +1 -1
  247. package/dist/lib/input.cjs +578 -1
  248. package/dist/lib/input.cjs.map +1 -1
  249. package/dist/lib/input.js +185 -137
  250. package/dist/lib/input.js.map +1 -1
  251. package/dist/lib/item-layout.cjs +91 -1
  252. package/dist/lib/item-layout.cjs.map +1 -1
  253. package/dist/lib/item-layout.js +45 -39
  254. package/dist/lib/item-layout.js.map +1 -1
  255. package/dist/lib/ivr-node.cjs +263 -1
  256. package/dist/lib/ivr-node.cjs.map +1 -1
  257. package/dist/lib/ivr-node.js +130 -112
  258. package/dist/lib/ivr-node.js.map +1 -1
  259. package/dist/lib/keyboard-shortcut.cjs +119 -1
  260. package/dist/lib/keyboard-shortcut.cjs.map +1 -1
  261. package/dist/lib/keyboard-shortcut.js +58 -48
  262. package/dist/lib/keyboard-shortcut.js.map +1 -1
  263. package/dist/lib/lazy-show.cjs +82 -1
  264. package/dist/lib/lazy-show.cjs.map +1 -1
  265. package/dist/lib/lazy-show.js +21 -19
  266. package/dist/lib/lazy-show.js.map +1 -1
  267. package/dist/lib/link.cjs +43 -1
  268. package/dist/lib/link.cjs.map +1 -1
  269. package/dist/lib/link.js +20 -19
  270. package/dist/lib/link.js.map +1 -1
  271. package/dist/lib/list-item-group.cjs +67 -1
  272. package/dist/lib/list-item-group.cjs.map +1 -1
  273. package/dist/lib/list-item-group.js +24 -22
  274. package/dist/lib/list-item-group.js.map +1 -1
  275. package/dist/lib/list-item.cjs +216 -1
  276. package/dist/lib/list-item.cjs.map +1 -1
  277. package/dist/lib/list-item.js +71 -60
  278. package/dist/lib/list-item.js.map +1 -1
  279. package/dist/lib/message-input.cjs +708 -1
  280. package/dist/lib/message-input.cjs.map +1 -1
  281. package/dist/lib/message-input.js +232 -206
  282. package/dist/lib/message-input.js.map +1 -1
  283. package/dist/lib/modal.cjs +444 -2
  284. package/dist/lib/modal.cjs.map +1 -1
  285. package/dist/lib/modal.js +153 -120
  286. package/dist/lib/modal.js.map +1 -1
  287. package/dist/lib/notice.cjs +197 -1
  288. package/dist/lib/notice.cjs.map +1 -1
  289. package/dist/lib/notice.js +66 -63
  290. package/dist/lib/notice.js.map +1 -1
  291. package/dist/lib/pagination.cjs +205 -1
  292. package/dist/lib/pagination.cjs.map +1 -1
  293. package/dist/lib/pagination.js +96 -81
  294. package/dist/lib/pagination.js.map +1 -1
  295. package/dist/lib/popover.cjs +1080 -1
  296. package/dist/lib/popover.cjs.map +1 -1
  297. package/dist/lib/popover.js +447 -267
  298. package/dist/lib/popover.js.map +1 -1
  299. package/dist/lib/presence.cjs +70 -1
  300. package/dist/lib/presence.cjs.map +1 -1
  301. package/dist/lib/presence.js +33 -27
  302. package/dist/lib/presence.js.map +1 -1
  303. package/dist/lib/radio-group.cjs +88 -1
  304. package/dist/lib/radio-group.cjs.map +1 -1
  305. package/dist/lib/radio-group.js +18 -18
  306. package/dist/lib/radio-group.js.map +1 -1
  307. package/dist/lib/radio.cjs +162 -1
  308. package/dist/lib/radio.cjs.map +1 -1
  309. package/dist/lib/radio.js +66 -57
  310. package/dist/lib/radio.js.map +1 -1
  311. package/dist/lib/rich-text-editor.cjs +1137 -1
  312. package/dist/lib/rich-text-editor.cjs.map +1 -1
  313. package/dist/lib/rich-text-editor.js +567 -386
  314. package/dist/lib/rich-text-editor.js.map +1 -1
  315. package/dist/lib/root-layout.cjs +158 -1
  316. package/dist/lib/root-layout.cjs.map +1 -1
  317. package/dist/lib/root-layout.js +33 -31
  318. package/dist/lib/root-layout.js.map +1 -1
  319. package/dist/lib/scroller.cjs +1090 -1
  320. package/dist/lib/scroller.cjs.map +1 -1
  321. package/dist/lib/scroller.js +668 -345
  322. package/dist/lib/scroller.js.map +1 -1
  323. package/dist/lib/select-menu.cjs +312 -1
  324. package/dist/lib/select-menu.cjs.map +1 -1
  325. package/dist/lib/select-menu.js +124 -79
  326. package/dist/lib/select-menu.js.map +1 -1
  327. package/dist/lib/settings-menu-button.cjs +77 -1
  328. package/dist/lib/settings-menu-button.cjs.map +1 -1
  329. package/dist/lib/settings-menu-button.js +31 -30
  330. package/dist/lib/settings-menu-button.js.map +1 -1
  331. package/dist/lib/skeleton.cjs +635 -1
  332. package/dist/lib/skeleton.cjs.map +1 -1
  333. package/dist/lib/skeleton.js +189 -152
  334. package/dist/lib/skeleton.js.map +1 -1
  335. package/dist/lib/stack.cjs +123 -1
  336. package/dist/lib/stack.cjs.map +1 -1
  337. package/dist/lib/stack.js +61 -53
  338. package/dist/lib/stack.js.map +1 -1
  339. package/dist/lib/tabs.cjs +102 -1
  340. package/dist/lib/tabs.cjs.map +1 -1
  341. package/dist/lib/tabs.js +47 -41
  342. package/dist/lib/tabs.js.map +1 -1
  343. package/dist/lib/time-pill.cjs +41 -1
  344. package/dist/lib/time-pill.cjs.map +1 -1
  345. package/dist/lib/time-pill.js +18 -14
  346. package/dist/lib/time-pill.js.map +1 -1
  347. package/dist/lib/toast.cjs +281 -1
  348. package/dist/lib/toast.cjs.map +1 -1
  349. package/dist/lib/toast.js +96 -74
  350. package/dist/lib/toast.js.map +1 -1
  351. package/dist/lib/toggle.cjs +192 -1
  352. package/dist/lib/toggle.cjs.map +1 -1
  353. package/dist/lib/toggle.js +60 -49
  354. package/dist/lib/toggle.js.map +1 -1
  355. package/dist/lib/tooltip-directive.cjs +84 -1
  356. package/dist/lib/tooltip-directive.cjs.map +1 -1
  357. package/dist/lib/tooltip-directive.js +56 -42
  358. package/dist/lib/tooltip-directive.js.map +1 -1
  359. package/dist/lib/tooltip.cjs +460 -1
  360. package/dist/lib/tooltip.cjs.map +1 -1
  361. package/dist/lib/tooltip.js +162 -103
  362. package/dist/lib/tooltip.js.map +1 -1
  363. package/dist/lib/top-banner-info.cjs +71 -1
  364. package/dist/lib/top-banner-info.cjs.map +1 -1
  365. package/dist/lib/top-banner-info.js +27 -22
  366. package/dist/lib/top-banner-info.js.map +1 -1
  367. package/dist/lib/unread-pill.cjs +73 -1
  368. package/dist/lib/unread-pill.cjs.map +1 -1
  369. package/dist/lib/unread-pill.js +28 -25
  370. package/dist/lib/unread-pill.js.map +1 -1
  371. package/dist/lib/validation-messages.cjs +89 -1
  372. package/dist/lib/validation-messages.cjs.map +1 -1
  373. package/dist/lib/validation-messages.js +41 -36
  374. package/dist/lib/validation-messages.js.map +1 -1
  375. package/dist/style.css +1257 -1
  376. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
  377. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
  378. package/package.json +30 -29
  379. package/dist/chunks/_plugin-vue_export-helper-6_y-gaV6.js +0 -2
  380. package/dist/chunks/_plugin-vue_export-helper-6_y-gaV6.js.map +0 -1
  381. package/dist/chunks/_plugin-vue_export-helper-hUChTQA_.js +0 -10
  382. package/dist/chunks/_plugin-vue_export-helper-hUChTQA_.js.map +0 -1
  383. package/dist/chunks/dropdown-UO3UJalk.js +0 -2
  384. package/dist/chunks/dropdown_constants-EUcDxBrX.js +0 -9
  385. package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
  386. package/dist/chunks/dropdown_constants-KHFvVI2L.js +0 -2
  387. package/dist/chunks/dropdown_constants-KHFvVI2L.js.map +0 -1
  388. package/dist/chunks/icon_constants-2S_OSQ1t.js +0 -2
  389. package/dist/chunks/index-6tYeqbgP.js +0 -3
  390. package/dist/chunks/index-IBtQ5jRJ.js +0 -2
  391. package/dist/chunks/index-IBtQ5jRJ.js.map +0 -1
  392. package/dist/chunks/index-b4iXYvId.js +0 -399
  393. package/dist/chunks/index-mRmwpCBG.js +0 -256
  394. package/dist/chunks/index-mRmwpCBG.js.map +0 -1
  395. package/dist/chunks/input-0Uksk4DP.js +0 -2
  396. package/dist/chunks/input_group-AS760Cp7.js +0 -2
  397. package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +0 -197
  398. package/dist/chunks/keyboard_list_navigation-N74Bpdq7.js +0 -2
  399. package/dist/chunks/link_constants-Kn6kP4i1.js +0 -2
  400. package/dist/chunks/link_constants-vIUB92L4.js +0 -16
  401. package/dist/chunks/list_item_constants-LTUc74pD.js +0 -13
  402. package/dist/chunks/list_item_constants-Tsz5CO1m.js +0 -2
  403. package/dist/chunks/modal-VuMFkZFH.js +0 -82
  404. package/dist/chunks/modal-qEzlo0Sj.js +0 -2
  405. package/dist/chunks/notice_action-jO199emq.js +0 -2
  406. package/dist/chunks/notice_action-tJfD5Qw1.js +0 -209
  407. package/dist/chunks/notice_constants-c--hBFQw.js +0 -6
  408. package/dist/chunks/notice_constants-mC6al2Dm.js +0 -2
  409. package/dist/chunks/popover_constants-hOEhklvr.js +0 -2
  410. package/dist/chunks/popover_constants-qjlEkroB.js +0 -114
  411. package/dist/chunks/sr_only_close_button-iD7s1Pbj.js +0 -3
  412. package/dist/chunks/stack_constants-m9Ickqw0.js +0 -2
  413. package/dist/chunks/stack_constants-u7tNqGtc.js +0 -13
  414. package/dist/chunks/tab-GQZFMq83.js +0 -367
  415. package/dist/chunks/tab-at7WWglk.js +0 -2
  416. package/dist/lib/constants.cjs +0 -2
  417. package/dist/lib/dates.cjs +0 -2
  418. package/dist/lib/dates.js +0 -57
  419. package/dist/lib/mixins.cjs +0 -2
  420. package/dist/lib/mixins.js +0 -17
  421. package/dist/lib/utils.cjs +0 -2
  422. package/dist/lib/utils.js +0 -171
  423. package/dist/lib/validators.cjs +0 -2
  424. package/dist/lib/validators.js +0 -12
  425. /package/dist/{lib → common}/mixins.js.map +0 -0
@@ -1,87 +1,90 @@
1
- import { NodeViewWrapper as A, nodeViewProps as L, VueRenderer as P, VueNodeViewRenderer as $, EditorContent as U, Editor as K } from "@tiptap/vue-3";
2
- import F from "@tiptap/extension-blockquote";
3
- import z from "@tiptap/extension-code-block";
4
- import W from "@tiptap/extension-document";
5
- import J from "@tiptap/extension-hard-break";
6
- import X from "@tiptap/extension-paragraph";
7
- import Y from "@tiptap/extension-placeholder";
8
- import G from "@tiptap/extension-bold";
9
- import Q from "@tiptap/extension-bullet-list";
10
- import Z from "@tiptap/extension-italic";
11
- import tt from "@tiptap/extension-link";
12
- import et from "@tiptap/extension-list-item";
13
- import ot from "@tiptap/extension-ordered-list";
14
- import nt from "@tiptap/extension-strike";
15
- import rt from "@tiptap/extension-underline";
16
- import it from "@tiptap/extension-text";
17
- import st from "@tiptap/extension-text-align";
18
- import { Node as at, mergeAttributes as x, nodeInputRule as R, nodePasteRule as S, getMarksBetween as ct, combineTransactionSteps as dt, getChangedRanges as ut, findChildrenInRange as lt, Mark as mt } from "@tiptap/core";
19
- import { resolveComponent as c, openBlock as d, createBlock as l, withCtx as m, createVNode as y, createElementBlock as C, withDirectives as pt, createElementVNode as ft, Fragment as ht, renderList as gt, normalizeClass as _t, withModifiers as yt, resolveDynamicComponent as wt, vShow as bt, createTextVNode as E, toDisplayString as T, markRaw as M } from "vue";
20
- import { _ as p } from "../chunks/_plugin-vue_export-helper-hUChTQA_.js";
21
- import { D as O, m as kt, o as B } from "../chunks/index-mRmwpCBG.js";
22
- import { PluginKey as D, Plugin as xt } from "@tiptap/pm/state";
23
- import Et from "@tiptap/suggestion";
24
- import { emojisIndexed as Tt } from "@dialpad/dialtone-emojis";
25
- import { DtListItem as Rt } from "./list-item.js";
26
- import { DtStack as H } from "./stack.js";
27
- import V from "tippy.js";
28
- import { linkRegex as St, getPhoneNumberRegex as Ct } from "./utils.js";
29
- import It from "@tiptap/extension-mention";
30
- import { DtLink as jt } from "./link.js";
31
- import { DtAvatar as vt } from "./avatar.js";
32
- import "emoji-regex";
1
+ import { NodeViewWrapper, nodeViewProps, VueRenderer, VueNodeViewRenderer, EditorContent, Editor } from "@tiptap/vue-3";
2
+ import Blockquote from "@tiptap/extension-blockquote";
3
+ import CodeBlock from "@tiptap/extension-code-block";
4
+ import Document from "@tiptap/extension-document";
5
+ import HardBreak from "@tiptap/extension-hard-break";
6
+ import Paragraph from "@tiptap/extension-paragraph";
7
+ import Placeholder from "@tiptap/extension-placeholder";
8
+ import Bold from "@tiptap/extension-bold";
9
+ import BulletList from "@tiptap/extension-bullet-list";
10
+ import Italic from "@tiptap/extension-italic";
11
+ import TipTapLink from "@tiptap/extension-link";
12
+ import ListItem from "@tiptap/extension-list-item";
13
+ import OrderedList from "@tiptap/extension-ordered-list";
14
+ import Strike from "@tiptap/extension-strike";
15
+ import Underline from "@tiptap/extension-underline";
16
+ import Text from "@tiptap/extension-text";
17
+ import TextAlign from "@tiptap/extension-text-align";
18
+ import { Node, mergeAttributes, nodeInputRule, nodePasteRule, getMarksBetween, combineTransactionSteps, getChangedRanges, findChildrenInRange, Mark } from "@tiptap/core";
19
+ import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementBlock, withDirectives, createElementVNode, Fragment, renderList, normalizeClass, withModifiers, resolveDynamicComponent, vShow, createTextVNode, toDisplayString, markRaw } from "vue";
20
+ import { _export_sfc } from "../chunks/_plugin-vue_export-helper-caHeSgYY.js";
21
+ import { DtEmoji } from "./emoji.js";
22
+ import { shortcodeToEmojiData, codeToEmojiData } from "../common/emoji.js";
23
+ import { PluginKey, Plugin } from "@tiptap/pm/state";
24
+ import Suggestion from "@tiptap/suggestion";
25
+ import { emojisIndexed } from "@dialpad/dialtone-emojis";
26
+ import { DtListItem } from "./list-item.js";
27
+ import { DtStack } from "./stack.js";
28
+ import tippy from "tippy.js";
29
+ import { linkRegex, getPhoneNumberRegex } from "../common/utils.js";
30
+ import Mention from "@tiptap/extension-mention";
31
+ import { DtLink } from "./link.js";
32
+ import { DtAvatar } from "./avatar.js";
33
33
  import "./skeleton.js";
34
- import "../chunks/icon_constants-OpYAAKwF.js";
34
+ import "../chunks/icon_constants-Dy4MEUJL.js";
35
35
  import "@dialpad/dialtone-icons/icons.json";
36
- import "../chunks/list_item_constants-LTUc74pD.js";
36
+ import "emoji-regex";
37
+ import "../chunks/list_item_constants-u1xcN9Dd.js";
37
38
  import "./item-layout.js";
38
39
  import "./icon.js";
39
40
  import "@dialpad/dialtone-icons/vue3";
40
- import "../chunks/stack_constants-u7tNqGtc.js";
41
- import "./constants.js";
42
- import "../chunks/link_constants-vIUB92L4.js";
41
+ import "../chunks/stack_constants-HraCekPm.js";
42
+ import "../common/constants.js";
43
+ import "../chunks/link_constants-nWVlXQBs.js";
43
44
  import "./presence.js";
44
- const At = {
45
+ const _sfc_main$5 = {
45
46
  name: "EmojiComponent",
46
47
  components: {
47
- NodeViewWrapper: A,
48
- DtEmoji: O
48
+ NodeViewWrapper,
49
+ DtEmoji
49
50
  },
50
- props: L
51
+ props: nodeViewProps
51
52
  };
52
- function Lt(t, e, o, n, r, i) {
53
- const s = c("dt-emoji"), a = c("node-view-wrapper");
54
- return d(), l(a, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
55
- default: m(() => [
56
- y(s, {
53
+ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
54
+ const _component_dt_emoji = resolveComponent("dt-emoji");
55
+ const _component_node_view_wrapper = resolveComponent("node-view-wrapper");
56
+ return openBlock(), createBlock(_component_node_view_wrapper, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
57
+ default: withCtx(() => [
58
+ createVNode(_component_dt_emoji, {
57
59
  size: "500",
58
- code: t.node.attrs.code
60
+ code: _ctx.node.attrs.code
59
61
  }, null, 8, ["code"])
60
62
  ]),
61
63
  _: 1
62
64
  });
63
65
  }
64
- const Pt = /* @__PURE__ */ p(At, [["render", Lt]]), $t = {
66
+ const EmojiComponent = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
67
+ const _sfc_main$4 = {
65
68
  name: "SuggestionList",
66
69
  components: {
67
- DtListItem: Rt
70
+ DtListItem
68
71
  },
69
72
  props: {
70
73
  items: {
71
74
  type: Array,
72
- required: !0
75
+ required: true
73
76
  },
74
77
  command: {
75
78
  type: Function,
76
- required: !0
79
+ required: true
77
80
  },
78
81
  itemComponent: {
79
82
  type: Object,
80
- required: !0
83
+ required: true
81
84
  },
82
85
  itemType: {
83
86
  type: String,
84
- required: !0
87
+ required: true
85
88
  }
86
89
  },
87
90
  data() {
@@ -95,176 +98,244 @@ const Pt = /* @__PURE__ */ p(At, [["render", Lt]]), $t = {
95
98
  }
96
99
  },
97
100
  methods: {
98
- onKeyDown({ event: t }) {
99
- return t.key === "ArrowUp" ? (this.upHandler(), !0) : t.key === "ArrowDown" ? (this.downHandler(), !0) : t.key === "Enter" || t.key === "Tab" ? (t.preventDefault(), this.selectHandler(), t.stopPropagation(), !0) : !1;
101
+ onKeyDown({ event }) {
102
+ if (event.key === "ArrowUp") {
103
+ this.upHandler();
104
+ return true;
105
+ }
106
+ if (event.key === "ArrowDown") {
107
+ this.downHandler();
108
+ return true;
109
+ }
110
+ if (event.key === "Enter" || event.key === "Tab") {
111
+ event.preventDefault();
112
+ this.selectHandler();
113
+ event.stopPropagation();
114
+ return true;
115
+ }
116
+ return false;
100
117
  },
101
118
  upHandler() {
102
- this.selectedIndex = (this.selectedIndex + this.items.length - 1) % this.items.length, this.scrollActiveElementIntoView();
119
+ this.selectedIndex = (this.selectedIndex + this.items.length - 1) % this.items.length;
120
+ this.scrollActiveElementIntoView();
103
121
  },
104
122
  downHandler() {
105
- this.selectedIndex = (this.selectedIndex + 1) % this.items.length, this.scrollActiveElementIntoView();
123
+ this.selectedIndex = (this.selectedIndex + 1) % this.items.length;
124
+ this.scrollActiveElementIntoView();
106
125
  },
107
126
  scrollActiveElementIntoView() {
108
- const t = this.$refs.suggestionList.querySelector(".dt-list-item--highlighted");
109
- t && t.scrollIntoView({
110
- behaviour: "smooth",
111
- block: "center"
112
- });
127
+ const activeElement = this.$refs.suggestionList.querySelector(".dt-list-item--highlighted");
128
+ if (activeElement) {
129
+ activeElement.scrollIntoView({
130
+ behaviour: "smooth",
131
+ block: "center"
132
+ });
133
+ }
113
134
  },
114
135
  selectHandler() {
115
136
  this.selectItem(this.selectedIndex);
116
137
  },
117
- selectItem(t) {
118
- const e = this.items[t];
138
+ selectItem(index) {
139
+ const item = this.items[index];
119
140
  switch (this.itemType) {
120
141
  case "emoji":
121
- this.command(e);
142
+ this.command(item);
122
143
  return;
123
144
  case "mention":
124
- this.command({ name: e.name, id: e.id, avatarSrc: e.avatarSrc });
145
+ this.command({ name: item.name, id: item.id, avatarSrc: item.avatarSrc });
125
146
  break;
126
147
  }
127
148
  }
128
149
  }
129
- }, Mt = { class: "d-popover__dialog" }, Ot = {
150
+ };
151
+ const _hoisted_1 = { class: "d-popover__dialog" };
152
+ const _hoisted_2 = {
130
153
  ref: "suggestionList",
131
154
  class: "dt-suggestion-list"
132
155
  };
133
- function Bt(t, e, o, n, r, i) {
134
- const s = c("dt-list-item");
135
- return d(), C("div", Mt, [
136
- pt(ft("ul", Ot, [
137
- (d(!0), C(ht, null, gt(o.items, (a, u) => (d(), l(s, {
138
- key: a.id,
139
- class: _t([
140
- "dt-suggestion-list--item",
141
- { "dt-list-item--highlighted": u === r.selectedIndex }
142
- ]),
143
- "navigation-type": "arrow-keys",
144
- onClick: (w) => i.selectItem(u),
145
- onKeydown: yt(i.onKeyDown, ["prevent", "stop"])
146
- }, {
147
- default: m(() => [
148
- (d(), l(wt(o.itemComponent), { item: a }, null, 8, ["item"]))
149
- ]),
150
- _: 2
151
- }, 1032, ["class", "onClick", "onKeydown"]))), 128))
156
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
157
+ const _component_dt_list_item = resolveComponent("dt-list-item");
158
+ return openBlock(), createElementBlock("div", _hoisted_1, [
159
+ withDirectives(createElementVNode("ul", _hoisted_2, [
160
+ (openBlock(true), createElementBlock(Fragment, null, renderList($props.items, (item, index) => {
161
+ return openBlock(), createBlock(_component_dt_list_item, {
162
+ key: item.id,
163
+ class: normalizeClass([
164
+ "dt-suggestion-list--item",
165
+ { "dt-list-item--highlighted": index === $data.selectedIndex }
166
+ ]),
167
+ "navigation-type": "arrow-keys",
168
+ onClick: ($event) => $options.selectItem(index),
169
+ onKeydown: withModifiers($options.onKeyDown, ["prevent", "stop"])
170
+ }, {
171
+ default: withCtx(() => [
172
+ (openBlock(), createBlock(resolveDynamicComponent($props.itemComponent), { item }, null, 8, ["item"]))
173
+ ]),
174
+ _: 2
175
+ }, 1032, ["class", "onClick", "onKeydown"]);
176
+ }), 128))
152
177
  ], 512), [
153
- [bt, o.items.length]
178
+ [vShow, $props.items.length]
154
179
  ])
155
180
  ]);
156
181
  }
157
- const q = /* @__PURE__ */ p($t, [["render", Bt]]), Dt = {
182
+ const SuggestionList = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
183
+ const _sfc_main$3 = {
158
184
  name: "EmojiSuggestion",
159
185
  components: {
160
- DtEmoji: O,
161
- DtStack: H
186
+ DtEmoji,
187
+ DtStack
162
188
  },
163
189
  props: {
164
190
  item: {
165
191
  type: Object,
166
- required: !0
192
+ required: true
167
193
  }
168
194
  }
169
195
  };
170
- function Ht(t, e, o, n, r, i) {
171
- const s = c("dt-emoji"), a = c("dt-stack");
172
- return d(), l(a, {
196
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
197
+ const _component_dt_emoji = resolveComponent("dt-emoji");
198
+ const _component_dt_stack = resolveComponent("dt-stack");
199
+ return openBlock(), createBlock(_component_dt_stack, {
173
200
  direction: "row",
174
201
  gap: "400"
175
202
  }, {
176
- default: m(() => [
177
- y(s, {
203
+ default: withCtx(() => [
204
+ createVNode(_component_dt_emoji, {
178
205
  size: "200",
179
- code: o.item.code
206
+ code: $props.item.code
180
207
  }, null, 8, ["code"]),
181
- E(" " + T(o.item.code), 1)
208
+ createTextVNode(" " + toDisplayString($props.item.code), 1)
182
209
  ]),
183
210
  _: 1
184
211
  });
185
212
  }
186
- const Vt = /* @__PURE__ */ p(Dt, [["render", Ht]]), qt = {
187
- items: ({ query: t }) => t.length < 2 ? [] : Object.values(Tt).filter(function(n) {
188
- return !!n.shortname.substring(1, n.shortname.length - 1).startsWith(t.toLowerCase());
189
- }).map((n) => ({ id: n.unicode_character, code: n.shortname })),
190
- command: ({ editor: t, range: e, props: o }) => {
191
- var i, s;
192
- const n = t.view.state.selection.$to.nodeAfter;
193
- ((i = n == null ? void 0 : n.text) == null ? void 0 : i.startsWith(" ")) && (e.to += 1), t.chain().focus().insertContentAt(e, [
213
+ const EmojiSuggestion = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
214
+ const suggestionOptions = {
215
+ items: ({ query }) => {
216
+ if (query.length < 2) {
217
+ return [];
218
+ }
219
+ const emojiList = Object.values(emojisIndexed);
220
+ const filteredEmoji = emojiList.filter(function(item) {
221
+ if (item.shortname.substring(1, item.shortname.length - 1).startsWith(query.toLowerCase())) {
222
+ return true;
223
+ }
224
+ return false;
225
+ });
226
+ return filteredEmoji.map((item) => {
227
+ return { id: item.unicode_character, code: item.shortname };
228
+ });
229
+ },
230
+ command: ({ editor, range, props }) => {
231
+ var _a, _b;
232
+ const nodeAfter = editor.view.state.selection.$to.nodeAfter;
233
+ const overrideSpace = (_a = nodeAfter == null ? void 0 : nodeAfter.text) == null ? void 0 : _a.startsWith(" ");
234
+ if (overrideSpace) {
235
+ range.to += 1;
236
+ }
237
+ editor.chain().focus().insertContentAt(range, [
194
238
  {
195
239
  type: "emoji",
196
- attrs: o
240
+ attrs: props
197
241
  },
198
242
  {
199
243
  type: "text",
200
244
  text: " "
201
245
  }
202
- ]).run(), (s = window.getSelection()) == null || s.collapseToEnd();
246
+ ]).run();
247
+ (_b = window.getSelection()) == null ? void 0 : _b.collapseToEnd();
203
248
  },
204
249
  render: () => {
205
- let t, e;
250
+ let component;
251
+ let popup;
206
252
  return {
207
- onStart: (o) => {
208
- t = new P(q, {
253
+ onStart: (props) => {
254
+ component = new VueRenderer(SuggestionList, {
209
255
  props: {
210
- itemComponent: M(Vt),
256
+ itemComponent: markRaw(EmojiSuggestion),
211
257
  itemType: "emoji",
212
- ...o
258
+ ...props
213
259
  },
214
- editor: o.editor
215
- }), o.clientRect && (e = V("body", {
216
- getReferenceClientRect: o.clientRect,
260
+ editor: props.editor
261
+ });
262
+ if (!props.clientRect) {
263
+ return;
264
+ }
265
+ popup = tippy("body", {
266
+ getReferenceClientRect: props.clientRect,
217
267
  appendTo: () => document.body,
218
- content: t.element,
219
- showOnCreate: !0,
220
- interactive: !0,
268
+ content: component.element,
269
+ showOnCreate: true,
270
+ interactive: true,
221
271
  trigger: "manual",
222
272
  placement: "top-start",
223
273
  contentElement: null,
224
274
  zIndex: 650
225
- }));
275
+ });
226
276
  },
227
- onUpdate(o) {
228
- t.updateProps(o), o.clientRect && e[0].setProps({
229
- getReferenceClientRect: o.clientRect
277
+ onUpdate(props) {
278
+ component.updateProps(props);
279
+ if (!props.clientRect) {
280
+ return;
281
+ }
282
+ popup[0].setProps({
283
+ getReferenceClientRect: props.clientRect
230
284
  });
231
285
  },
232
- onKeyDown(o) {
233
- var n;
234
- return o.event.key === "Escape" ? (e[0].hide(), !0) : (n = t.ref) == null ? void 0 : n.onKeyDown(o);
286
+ onKeyDown(props) {
287
+ var _a;
288
+ if (props.event.key === "Escape") {
289
+ popup[0].hide();
290
+ return true;
291
+ }
292
+ return (_a = component.ref) == null ? void 0 : _a.onKeyDown(props);
235
293
  },
236
294
  onExit() {
237
- e[0].destroy(), t.destroy();
295
+ popup[0].destroy();
296
+ component.destroy();
238
297
  }
239
298
  };
240
299
  }
241
- }, Nt = new D("emoji"), Ut = /:\w+:$/, Kt = /:\w+:/g, Ft = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/, zt = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g, I = (t) => {
242
- if (t && B(t[0]))
300
+ };
301
+ const EmojiPluginKey = new PluginKey("emoji");
302
+ const inputShortCodeRegex = /:\w+:$/;
303
+ const pasteShortCodeRegex = /:\w+:/g;
304
+ const inputUnicodeRegex = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/;
305
+ const pasteUnicodeRegex = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g;
306
+ const inputRuleMatch = (match) => {
307
+ if (match && codeToEmojiData(match[0])) {
243
308
  return {
244
- index: t.index,
245
- text: t[0],
246
- match: t
309
+ index: match.index,
310
+ text: match[0],
311
+ match
247
312
  };
248
- }, Wt = (t) => [...t.matchAll(Kt)].filter((o) => B(o[0])).map((o) => ({
249
- index: o.index,
250
- text: o[0],
251
- match: o
252
- })), Jt = at.create({
313
+ }
314
+ };
315
+ const shortCodePasteMatch = (text) => {
316
+ const matches = [...text.matchAll(pasteShortCodeRegex)];
317
+ return matches.filter((match) => codeToEmojiData(match[0])).map((match) => ({
318
+ index: match.index,
319
+ text: match[0],
320
+ match
321
+ }));
322
+ };
323
+ const Emoji = Node.create({
253
324
  addOptions() {
254
325
  return {
255
326
  HTMLAttributes: {},
256
327
  suggestion: {
257
328
  char: ":",
258
- pluginKey: Nt
329
+ pluginKey: EmojiPluginKey
259
330
  }
260
331
  };
261
332
  },
262
333
  name: "emoji",
263
334
  group: "inline",
264
- inline: !0,
265
- selectable: !0,
335
+ inline: true,
336
+ selectable: true,
266
337
  addNodeView() {
267
- return $(Pt);
338
+ return VueNodeViewRenderer(EmojiComponent);
268
339
  },
269
340
  addAttributes() {
270
341
  return {
@@ -283,37 +354,38 @@ const Vt = /* @__PURE__ */ p(Dt, [["render", Ht]]), qt = {
283
354
  }
284
355
  ];
285
356
  },
286
- renderText({ node: t }) {
287
- return t.attrs.code;
357
+ renderText({ node }) {
358
+ return node.attrs.code;
288
359
  },
289
- renderHTML({ HTMLAttributes: t }) {
290
- return ["emoji-component", x(this.options.HTMLAttributes, t)];
360
+ renderHTML({ HTMLAttributes }) {
361
+ return ["emoji-component", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];
291
362
  },
292
363
  addInputRules() {
293
364
  return [
294
365
  // shortcode input
295
- R({
296
- find: (t) => {
297
- const e = t.match(Ut);
298
- return I(e);
366
+ nodeInputRule({
367
+ find: (text) => {
368
+ const match = text.match(inputShortCodeRegex);
369
+ return inputRuleMatch(match);
299
370
  },
300
371
  type: this.type,
301
- getAttributes(t) {
372
+ getAttributes(attrs) {
302
373
  return {
303
- code: t[0]
374
+ code: attrs[0]
304
375
  };
305
376
  }
306
377
  }),
307
- R({
308
- find: (t) => {
309
- const e = t.match(Ft);
310
- return I(e);
378
+ nodeInputRule({
379
+ find: (text) => {
380
+ const match = text.match(inputUnicodeRegex);
381
+ return inputRuleMatch(match);
311
382
  },
312
383
  type: this.type,
313
- getAttributes(t) {
314
- const e = kt(t[0]).unicode_output;
384
+ getAttributes(attrs) {
385
+ const unicode = shortcodeToEmojiData(attrs[0]).unicode_output;
386
+ const emoji = String.fromCodePoint(parseInt(unicode, 16));
315
387
  return {
316
- code: String.fromCodePoint(parseInt(e, 16)),
388
+ code: emoji,
317
389
  label: "emoji"
318
390
  };
319
391
  }
@@ -322,21 +394,21 @@ const Vt = /* @__PURE__ */ p(Dt, [["render", Ht]]), qt = {
322
394
  },
323
395
  addPasteRules() {
324
396
  return [
325
- S({
326
- find: Wt,
397
+ nodePasteRule({
398
+ find: shortCodePasteMatch,
327
399
  type: this.type,
328
- getAttributes(t) {
400
+ getAttributes(attrs) {
329
401
  return {
330
- code: t[0]
402
+ code: attrs[0]
331
403
  };
332
404
  }
333
405
  }),
334
- S({
335
- find: zt,
406
+ nodePasteRule({
407
+ find: pasteUnicodeRegex,
336
408
  type: this.type,
337
- getAttributes(t) {
409
+ getAttributes(attrs) {
338
410
  return {
339
- code: t[0]
411
+ code: attrs[0]
340
412
  };
341
413
  }
342
414
  })
@@ -344,162 +416,196 @@ const Vt = /* @__PURE__ */ p(Dt, [["render", Ht]]), qt = {
344
416
  },
345
417
  addProseMirrorPlugins() {
346
418
  return [
347
- Et({
419
+ Suggestion({
348
420
  editor: this.editor,
349
421
  ...this.options.suggestion,
350
- ...qt
422
+ ...suggestionOptions
351
423
  })
352
424
  ];
353
425
  }
354
426
  });
355
- function Xt(t, e, o = () => !0) {
356
- const n = [];
357
- e.lastIndex = 0;
358
- let r;
359
- for (; r = e.exec(t); )
360
- o(t, r) && n.push(r);
361
- return n;
427
+ function getRegexMatches(text, regex, validator = () => true) {
428
+ const matches = [];
429
+ regex.lastIndex = 0;
430
+ let match;
431
+ while (match = regex.exec(text)) {
432
+ if (validator(text, match)) {
433
+ matches.push(match);
434
+ }
435
+ }
436
+ return matches;
362
437
  }
363
- function Yt(t, e) {
364
- return !["#", "@"].includes(t.charAt(e.index)) && !["#", "@"].includes(t.charAt(e.index - 1));
438
+ function hasValidPrefix(text, match) {
439
+ return !["#", "@"].includes(text.charAt(match.index)) && !["#", "@"].includes(text.charAt(match.index - 1));
365
440
  }
366
- function Gt(t) {
367
- const e = new RegExp(
441
+ function trimEndPunctiation(string) {
442
+ const endPunctuationRegex = new RegExp(
368
443
  "(?:" + [
369
444
  `[!?.,:;'"]`,
370
445
  "(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"
371
446
  ].join("|"),
372
447
  "g"
373
448
  );
374
- return t.replace(e, "");
449
+ return string.replace(endPunctuationRegex, "");
375
450
  }
376
- function Qt(t, e) {
377
- const o = t.slice(0, e + 1).search(/\S+\s*$/), n = t.slice(e).search(/\s/);
378
- if (n < 0) {
379
- const r = t.slice(o);
451
+ function getWordAt(text, index) {
452
+ const left = text.slice(0, index + 1).search(/\S+\s*$/);
453
+ const right = text.slice(index).search(/\s/);
454
+ if (right < 0) {
455
+ const word = text.slice(left);
380
456
  return {
381
- text: r,
382
- from: o,
383
- to: o + r.length
457
+ text: word,
458
+ from: left,
459
+ to: left + word.length
384
460
  };
385
461
  }
386
462
  return {
387
- text: t.slice(o, n + e),
388
- from: o,
389
- to: n + e
463
+ text: text.slice(left, right + index),
464
+ from: left,
465
+ to: right + index
390
466
  };
391
467
  }
392
- function k(t, e, o, n) {
393
- const r = Qt(t, e);
394
- if (n.lastIndex = 0, !n.test(r.text))
395
- return r;
396
- const i = o === "left" ? r.from - 1 : r.to + 1;
397
- return i <= 0 || i >= t.length || i === e ? r : k(t, i, o, n);
468
+ function getWordAtUntil(text, index, direction, regex) {
469
+ const word = getWordAt(text, index);
470
+ regex.lastIndex = 0;
471
+ if (!regex.test(word.text)) {
472
+ return word;
473
+ }
474
+ const newIndex = direction === "left" ? word.from - 1 : word.to + 1;
475
+ if (newIndex <= 0 || newIndex >= text.length || newIndex === index) {
476
+ return word;
477
+ }
478
+ return getWordAtUntil(text, newIndex, direction, regex);
398
479
  }
399
- function Zt(t, e, o, n) {
400
- const r = Math.max(t.from - 1, 0), i = Math.min(t.to + 1, e.content.size), s = ct(r, i, e);
401
- for (const a of s)
402
- a.mark.type === n && o.removeMark(a.from, a.to, n);
480
+ function removeMarks(range, doc, tr, type) {
481
+ const from = Math.max(range.from - 1, 0);
482
+ const to = Math.min(range.to + 1, doc.content.size);
483
+ const marksInRange = getMarksBetween(from, to, doc);
484
+ for (const mark of marksInRange) {
485
+ if (mark.mark.type !== type) {
486
+ continue;
487
+ }
488
+ tr.removeMark(mark.from, mark.to, type);
489
+ }
403
490
  }
404
- const j = Ct(1, 15);
405
- function v(t, e, o, n, r, i) {
406
- if (!t)
491
+ const partialPhoneNumberRegex = getPhoneNumberRegex(1, 15);
492
+ function addMarks(text, pos, from, to, tr, type) {
493
+ if (!text) {
407
494
  return;
408
- let s = o - e - 1;
409
- s = s < 0 ? 0 : s;
410
- const a = n - e, u = k(
411
- t,
412
- s,
495
+ }
496
+ let rangeFrom = from - pos - 1;
497
+ rangeFrom = rangeFrom < 0 ? 0 : rangeFrom;
498
+ const rangeTo = to - pos;
499
+ const firstWordInRange = getWordAtUntil(
500
+ text,
501
+ rangeFrom,
413
502
  "left",
414
- j
415
- ), w = k(
416
- t,
417
- a,
503
+ partialPhoneNumberRegex
504
+ );
505
+ const lastWordInRange = getWordAtUntil(
506
+ text,
507
+ rangeTo,
418
508
  "right",
419
- j
420
- ), f = t.slice(u.from, w.to);
421
- Xt(f, St, Yt).forEach((b) => {
422
- const h = Gt(b[0]), _ = e + u.from + b.index + 1, N = _ + h.length;
423
- r.addMark(_, N, i.create());
509
+ partialPhoneNumberRegex
510
+ );
511
+ const wordsInRange = text.slice(firstWordInRange.from, lastWordInRange.to);
512
+ const matches = getRegexMatches(wordsInRange, linkRegex, hasValidPrefix);
513
+ matches.forEach((match) => {
514
+ const word = trimEndPunctiation(match[0]);
515
+ const from2 = pos + firstWordInRange.from + match.index + 1;
516
+ const to2 = from2 + word.length;
517
+ tr.addMark(from2, to2, type.create());
424
518
  });
425
519
  }
426
- function te(t) {
427
- let e = !1;
428
- return new xt({
429
- key: new D("autolink"),
430
- appendTransaction: (o, n, r) => {
431
- const i = o.some((f) => f.docChanged) && !n.doc.eq(r.doc);
432
- if (e && !i)
520
+ function autolink(options) {
521
+ let hasInitialized = false;
522
+ return new Plugin({
523
+ key: new PluginKey("autolink"),
524
+ appendTransaction: (transactions, oldState, newState) => {
525
+ const contentChanged = transactions.some((tr2) => tr2.docChanged) && !oldState.doc.eq(newState.doc);
526
+ if (hasInitialized && !contentChanged) {
433
527
  return;
434
- const { tr: s } = r, { textContent: a } = r.doc;
435
- e || v(a, 0, 0, a.length, s, t.type), e = !0;
436
- const u = dt(
437
- n.doc,
438
- [...o]
528
+ }
529
+ const { tr } = newState;
530
+ const { textContent } = newState.doc;
531
+ if (!hasInitialized) {
532
+ addMarks(textContent, 0, 0, textContent.length, tr, options.type);
533
+ }
534
+ hasInitialized = true;
535
+ const transform = combineTransactionSteps(
536
+ oldState.doc,
537
+ [...transactions]
439
538
  );
440
- return ut(u).forEach(({ oldRange: f, newRange: g }) => {
441
- Zt(g, r.doc, s, t.type), lt(
442
- r.doc,
443
- g,
444
- (h) => h.isTextblock
445
- ).forEach(({ node: h, pos: _ }) => {
446
- v(
447
- h.textContent,
448
- _,
449
- f.from,
450
- g.to,
451
- s,
452
- t.type
539
+ const changes = getChangedRanges(transform);
540
+ changes.forEach(({ oldRange, newRange }) => {
541
+ removeMarks(newRange, newState.doc, tr, options.type);
542
+ const paragraphs = findChildrenInRange(
543
+ newState.doc,
544
+ newRange,
545
+ (node) => node.isTextblock
546
+ );
547
+ paragraphs.forEach(({ node, pos }) => {
548
+ addMarks(
549
+ node.textContent,
550
+ pos,
551
+ oldRange.from,
552
+ newRange.to,
553
+ tr,
554
+ options.type
453
555
  );
454
556
  });
455
- }), s;
557
+ });
558
+ return tr;
456
559
  }
457
560
  });
458
561
  }
459
- const ee = {
562
+ const defaultAttributes = {
460
563
  class: "d-link d-c-text d-d-inline-block",
461
564
  rel: "noopener noreferrer nofollow"
462
- }, oe = mt.create({
565
+ };
566
+ const Link = Mark.create({
463
567
  name: "Link",
464
- renderHTML({ HTMLAttributes: t }) {
568
+ renderHTML({ HTMLAttributes }) {
465
569
  return [
466
570
  "a",
467
- x(
571
+ mergeAttributes(
468
572
  this.options.HTMLAttributes,
469
- t,
470
- ee
573
+ HTMLAttributes,
574
+ defaultAttributes
471
575
  ),
472
576
  0
473
577
  ];
474
578
  },
475
- renderText({ node: t }) {
476
- return t.attrs.text;
579
+ renderText({ node }) {
580
+ return node.attrs.text;
477
581
  },
478
582
  addProseMirrorPlugins() {
479
583
  return [
480
- te({ type: this.type })
584
+ autolink({ type: this.type })
481
585
  ];
482
586
  }
483
- }), ne = {
587
+ });
588
+ const _sfc_main$2 = {
484
589
  name: "MentionComponent",
485
590
  components: {
486
- NodeViewWrapper: A,
487
- DtLink: jt
591
+ NodeViewWrapper,
592
+ DtLink
488
593
  },
489
- props: L,
594
+ props: nodeViewProps,
490
595
  computed: {
491
596
  text() {
492
597
  return "@" + this.$props.node.attrs.name;
493
598
  }
494
599
  }
495
600
  };
496
- function re(t, e, o, n, r, i) {
497
- const s = c("dt-link"), a = c("node-view-wrapper");
498
- return d(), l(a, { class: "d-d-inline-block" }, {
499
- default: m(() => [
500
- y(s, { kind: "mention" }, {
501
- default: m(() => [
502
- E(T(i.text), 1)
601
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
602
+ const _component_dt_link = resolveComponent("dt-link");
603
+ const _component_node_view_wrapper = resolveComponent("node-view-wrapper");
604
+ return openBlock(), createBlock(_component_node_view_wrapper, { class: "d-d-inline-block" }, {
605
+ default: withCtx(() => [
606
+ createVNode(_component_dt_link, { kind: "mention" }, {
607
+ default: withCtx(() => [
608
+ createTextVNode(toDisplayString($options.text), 1)
503
609
  ]),
504
610
  _: 1
505
611
  })
@@ -507,9 +613,10 @@ function re(t, e, o, n, r, i) {
507
613
  _: 1
508
614
  });
509
615
  }
510
- const ie = /* @__PURE__ */ p(ne, [["render", re]]), se = It.extend({
616
+ const MentionComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
617
+ const MentionPlugin = Mention.extend({
511
618
  addNodeView() {
512
- return $(ie);
619
+ return VueNodeViewRenderer(MentionComponent);
513
620
  },
514
621
  parseHTML() {
515
622
  return [
@@ -531,37 +638,41 @@ const ie = /* @__PURE__ */ p(ne, [["render", re]]), se = It.extend({
531
638
  }
532
639
  };
533
640
  },
534
- renderText({ node: t }) {
535
- return `@${t.attrs.id}`;
641
+ renderText({ node }) {
642
+ return `@${node.attrs.id}`;
536
643
  },
537
- renderHTML({ HTMLAttributes: t }) {
538
- return ["mention-component", x(this.options.HTMLAttributes, t), 0];
644
+ renderHTML({ HTMLAttributes }) {
645
+ return ["mention-component", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
539
646
  }
540
- }), ae = [
647
+ });
648
+ const RICH_TEXT_EDITOR_OUTPUT_FORMATS = [
541
649
  "text",
542
650
  "json",
543
651
  "html"
544
- ], ce = [
652
+ ];
653
+ const RICH_TEXT_EDITOR_AUTOFOCUS_TYPES = [
545
654
  "start",
546
655
  "end",
547
656
  "all"
548
- ], de = [
657
+ ];
658
+ const RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS = [
549
659
  "https",
550
660
  "http",
551
661
  "ftp",
552
662
  "ftps",
553
663
  "sftp",
554
664
  "mailto"
555
- ], ue = {
665
+ ];
666
+ const _sfc_main$1 = {
556
667
  name: "MentionSuggestion",
557
668
  components: {
558
- DtAvatar: vt,
559
- DtStack: H
669
+ DtAvatar,
670
+ DtStack
560
671
  },
561
672
  props: {
562
673
  item: {
563
674
  type: Object,
564
- required: !0
675
+ required: true
565
676
  }
566
677
  },
567
678
  computed: {
@@ -573,67 +684,84 @@ const ie = /* @__PURE__ */ p(ne, [["render", re]]), se = It.extend({
573
684
  }
574
685
  }
575
686
  };
576
- function le(t, e, o, n, r, i) {
577
- const s = c("dt-avatar"), a = c("dt-stack");
578
- return d(), l(a, {
687
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
688
+ const _component_dt_avatar = resolveComponent("dt-avatar");
689
+ const _component_dt_stack = resolveComponent("dt-stack");
690
+ return openBlock(), createBlock(_component_dt_stack, {
579
691
  direction: "row",
580
692
  gap: "400"
581
693
  }, {
582
- default: m(() => [
583
- y(s, {
584
- "full-name": i.name,
585
- "image-src": i.avatarSrc,
586
- "image-alt": i.name,
694
+ default: withCtx(() => [
695
+ createVNode(_component_dt_avatar, {
696
+ "full-name": $options.name,
697
+ "image-src": $options.avatarSrc,
698
+ "image-alt": $options.name,
587
699
  size: "xs"
588
700
  }, null, 8, ["full-name", "image-src", "image-alt"]),
589
- E(" " + T(i.name), 1)
701
+ createTextVNode(" " + toDisplayString($options.name), 1)
590
702
  ]),
591
703
  _: 1
592
704
  });
593
705
  }
594
- const me = /* @__PURE__ */ p(ue, [["render", le]]), pe = {
706
+ const MentionSuggestion = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
707
+ const suggestion = {
595
708
  // This function comes from the user and passed to the editor directly.
596
709
  // This will also activate the mention plugin on the editor
597
710
  // items: ({ query }) => { return [] },
598
- allowSpaces: !0,
711
+ allowSpaces: true,
599
712
  render: () => {
600
- let t, e;
713
+ let component;
714
+ let popup;
601
715
  return {
602
- onStart: (o) => {
603
- t = new P(q, {
716
+ onStart: (props) => {
717
+ component = new VueRenderer(SuggestionList, {
604
718
  props: {
605
- itemComponent: M(me),
719
+ itemComponent: markRaw(MentionSuggestion),
606
720
  itemType: "mention",
607
- ...o
721
+ ...props
608
722
  },
609
- editor: o.editor
610
- }), o.clientRect && (e = V("body", {
611
- getReferenceClientRect: o.clientRect,
723
+ editor: props.editor
724
+ });
725
+ if (!props.clientRect) {
726
+ return;
727
+ }
728
+ popup = tippy("body", {
729
+ getReferenceClientRect: props.clientRect,
612
730
  appendTo: () => document.body,
613
- content: t.element,
614
- showOnCreate: !0,
615
- interactive: !0,
731
+ content: component.element,
732
+ showOnCreate: true,
733
+ interactive: true,
616
734
  trigger: "manual",
617
735
  placement: "top-start"
618
- }));
736
+ });
619
737
  },
620
- onUpdate(o) {
621
- t.updateProps(o), o.clientRect && e[0].setProps({
622
- getReferenceClientRect: o.clientRect
738
+ onUpdate(props) {
739
+ component.updateProps(props);
740
+ if (!props.clientRect) {
741
+ return;
742
+ }
743
+ popup[0].setProps({
744
+ getReferenceClientRect: props.clientRect
623
745
  });
624
746
  },
625
- onKeyDown(o) {
626
- return o.event.key === "Escape" ? (e[0].hide(), !0) : t == null ? void 0 : t.ref.onKeyDown(o);
747
+ onKeyDown(props) {
748
+ if (props.event.key === "Escape") {
749
+ popup[0].hide();
750
+ return true;
751
+ }
752
+ return component == null ? void 0 : component.ref.onKeyDown(props);
627
753
  },
628
754
  onExit() {
629
- e[0].destroy(), t.destroy();
755
+ popup[0].destroy();
756
+ component.destroy();
630
757
  }
631
758
  };
632
759
  }
633
- }, fe = {
760
+ };
761
+ const _sfc_main = {
634
762
  name: "DtRichTextEditor",
635
763
  components: {
636
- EditorContent: U
764
+ EditorContent
637
765
  },
638
766
  props: {
639
767
  /**
@@ -649,21 +777,21 @@ const me = /* @__PURE__ */ p(ue, [["render", le]]), pe = {
649
777
  */
650
778
  editable: {
651
779
  type: Boolean,
652
- default: !0
780
+ default: true
653
781
  },
654
782
  /**
655
783
  * Whether the input allows for line breaks to be introduced in the text.
656
784
  */
657
785
  allowLineBreaks: {
658
786
  type: Boolean,
659
- default: !1
787
+ default: false
660
788
  },
661
789
  /**
662
790
  * Descriptive label for the input element
663
791
  */
664
792
  inputAriaLabel: {
665
793
  type: String,
666
- required: !0
794
+ required: true
667
795
  },
668
796
  /**
669
797
  * Additional class name for the input element. Only accepts a String value
@@ -687,9 +815,12 @@ const me = /* @__PURE__ */ p(ue, [["render", le]]), pe = {
687
815
  */
688
816
  autoFocus: {
689
817
  type: [Boolean, String, Number],
690
- default: !1,
691
- validator(t) {
692
- return typeof t == "string" ? ce.includes(t) : !0;
818
+ default: false,
819
+ validator(autoFocus) {
820
+ if (typeof autoFocus === "string") {
821
+ return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);
822
+ }
823
+ return true;
693
824
  }
694
825
  },
695
826
  /**
@@ -701,8 +832,8 @@ const me = /* @__PURE__ */ p(ue, [["render", le]]), pe = {
701
832
  outputFormat: {
702
833
  type: String,
703
834
  default: "text",
704
- validator(t) {
705
- return ae.includes(t);
835
+ validator(outputFormat) {
836
+ return RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);
706
837
  }
707
838
  },
708
839
  /**
@@ -717,7 +848,7 @@ const me = /* @__PURE__ */ p(ue, [["render", le]]), pe = {
717
848
  */
718
849
  link: {
719
850
  type: [Boolean, Object],
720
- default: !1
851
+ default: false
721
852
  },
722
853
  /**
723
854
  * suggestion object containing the items query function.
@@ -739,42 +870,42 @@ const me = /* @__PURE__ */ p(ue, [["render", le]]), pe = {
739
870
  */
740
871
  allowBlockquote: {
741
872
  type: Boolean,
742
- default: !0
873
+ default: true
743
874
  },
744
875
  /**
745
876
  * Whether the input allows for bold to be introduced in the text.
746
877
  */
747
878
  allowBold: {
748
879
  type: Boolean,
749
- default: !0
880
+ default: true
750
881
  },
751
882
  /**
752
883
  * Whether the input allows for bullet list to be introduced in the text.
753
884
  */
754
885
  allowBulletList: {
755
886
  type: Boolean,
756
- default: !0
887
+ default: true
757
888
  },
758
889
  /**
759
890
  * Whether the input allows for italic to be introduced in the text.
760
891
  */
761
892
  allowItalic: {
762
893
  type: Boolean,
763
- default: !0
894
+ default: true
764
895
  },
765
896
  /**
766
897
  * Whether the input allows for strike to be introduced in the text.
767
898
  */
768
899
  allowStrike: {
769
900
  type: Boolean,
770
- default: !0
901
+ default: true
771
902
  },
772
903
  /**
773
904
  * Whether the input allows for underline to be introduced in the text.
774
905
  */
775
906
  allowUnderline: {
776
907
  type: Boolean,
777
- default: !0
908
+ default: true
778
909
  }
779
910
  },
780
911
  emits: [
@@ -806,54 +937,88 @@ const me = /* @__PURE__ */ p(ue, [["render", le]]), pe = {
806
937
  data() {
807
938
  return {
808
939
  editor: null,
809
- popoverOpened: !1
940
+ popoverOpened: false
810
941
  };
811
942
  },
812
943
  computed: {
813
944
  // eslint-disable-next-line complexity
814
945
  extensions() {
815
- const t = [W, X, it];
816
- if (this.link && t.push(this.getExtension(oe, this.link)), this.allowBlockquote && t.push(F), this.allowBold && t.push(G), this.allowBulletList && (t.push(Q), t.push(et), t.push(ot.configure({
817
- itemTypeName: "listItem"
818
- }))), this.allowItalic && t.push(Z), this.allowStrike && t.push(nt), this.allowUnderline && t.push(rt), t.push(
819
- Y.configure({ placeholder: this.placeholder })
820
- ), this.allowLineBreaks || t.push(
821
- J.extend({
822
- addKeyboardShortcuts() {
823
- return {
824
- Enter: () => !0,
825
- "Shift-Enter": () => this.editor.commands.first(({ commands: e }) => [
826
- () => e.newlineInCode(),
827
- () => e.createParagraphNear(),
828
- () => e.liftEmptyBlock(),
829
- () => e.splitBlock()
830
- ])
831
- };
832
- }
833
- })
834
- ), t.push(tt.extend({ inclusive: !1 }).configure({
835
- autolink: !0,
836
- protocols: de
837
- })), this.mentionSuggestion) {
838
- const e = { ...this.mentionSuggestion, ...pe };
839
- t.push(se.configure({ suggestion: e }));
840
- }
841
- return t.push(Jt), t.push(st.configure({
946
+ const extensions = [Document, Paragraph, Text];
947
+ if (this.link) {
948
+ extensions.push(this.getExtension(Link, this.link));
949
+ }
950
+ if (this.allowBlockquote) {
951
+ extensions.push(Blockquote);
952
+ }
953
+ if (this.allowBold) {
954
+ extensions.push(Bold);
955
+ }
956
+ if (this.allowBulletList) {
957
+ extensions.push(BulletList);
958
+ extensions.push(ListItem);
959
+ extensions.push(OrderedList.configure({
960
+ itemTypeName: "listItem"
961
+ }));
962
+ }
963
+ if (this.allowItalic) {
964
+ extensions.push(Italic);
965
+ }
966
+ if (this.allowStrike) {
967
+ extensions.push(Strike);
968
+ }
969
+ if (this.allowUnderline) {
970
+ extensions.push(Underline);
971
+ }
972
+ extensions.push(
973
+ Placeholder.configure({ placeholder: this.placeholder })
974
+ );
975
+ if (!this.allowLineBreaks) {
976
+ extensions.push(
977
+ HardBreak.extend({
978
+ addKeyboardShortcuts() {
979
+ return {
980
+ Enter: () => true,
981
+ "Shift-Enter": () => this.editor.commands.first(({ commands }) => [
982
+ () => commands.newlineInCode(),
983
+ () => commands.createParagraphNear(),
984
+ () => commands.liftEmptyBlock(),
985
+ () => commands.splitBlock()
986
+ ])
987
+ };
988
+ }
989
+ })
990
+ );
991
+ }
992
+ extensions.push(TipTapLink.extend({ inclusive: false }).configure({
993
+ autolink: true,
994
+ protocols: RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS
995
+ }));
996
+ if (this.mentionSuggestion) {
997
+ const suggestionObject = { ...this.mentionSuggestion, ...suggestion };
998
+ extensions.push(MentionPlugin.configure({ suggestion: suggestionObject }));
999
+ }
1000
+ extensions.push(Emoji);
1001
+ extensions.push(TextAlign.configure({
842
1002
  types: ["paragraph"],
843
1003
  defaultAlignment: "left"
844
- })), t.push(z.configure({
1004
+ }));
1005
+ extensions.push(CodeBlock.configure({
845
1006
  HTMLAttributes: {
846
1007
  class: "dt-rich-text-editor--code-block"
847
1008
  }
848
- })), t;
1009
+ }));
1010
+ return extensions;
849
1011
  },
850
1012
  inputAttrs() {
851
- const t = {
1013
+ const attrs = {
852
1014
  "aria-label": this.inputAriaLabel,
853
- "aria-multiline": !0,
1015
+ "aria-multiline": true,
854
1016
  role: "textbox"
855
1017
  };
856
- return this.editable || (t["aria-readonly"] = !0), t;
1018
+ if (!this.editable) {
1019
+ attrs["aria-readonly"] = true;
1020
+ }
1021
+ return attrs;
857
1022
  }
858
1023
  },
859
1024
  /**
@@ -862,21 +1027,30 @@ const me = /* @__PURE__ */ p(ue, [["render", le]]), pe = {
862
1027
  * to be hooked up to the Editor's own API.
863
1028
  */
864
1029
  watch: {
865
- editable(t) {
866
- this.editor.setEditable(t), this.updateEditorAttributes({ "aria-readonly": !t });
1030
+ editable(isEditable) {
1031
+ this.editor.setEditable(isEditable);
1032
+ this.updateEditorAttributes({ "aria-readonly": !isEditable });
867
1033
  },
868
- inputClass(t) {
869
- this.updateEditorAttributes({ class: t });
1034
+ inputClass(newClass) {
1035
+ this.updateEditorAttributes({ class: newClass });
870
1036
  },
871
- inputAriaLabel(t) {
872
- this.updateEditorAttributes({ "aria-label": t });
1037
+ inputAriaLabel(newLabel) {
1038
+ this.updateEditorAttributes({ "aria-label": newLabel });
873
1039
  },
874
1040
  extensions() {
875
- this.destroyEditor(), this.createEditor();
1041
+ this.destroyEditor();
1042
+ this.createEditor();
876
1043
  },
877
- modelValue(t) {
878
- let e = this.getOutput();
879
- this.outputFormat === "json" && (t = JSON.stringify(t), e = JSON.stringify(e)), t !== e && this.editor.commands.setContent(t, !1);
1044
+ modelValue(newValue) {
1045
+ let currentValue = this.getOutput();
1046
+ if (this.outputFormat === "json") {
1047
+ newValue = JSON.stringify(newValue);
1048
+ currentValue = JSON.stringify(currentValue);
1049
+ }
1050
+ if (newValue === currentValue) {
1051
+ return;
1052
+ }
1053
+ this.editor.commands.setContent(newValue, false);
880
1054
  }
881
1055
  },
882
1056
  created() {
@@ -887,7 +1061,7 @@ const me = /* @__PURE__ */ p(ue, [["render", le]]), pe = {
887
1061
  },
888
1062
  methods: {
889
1063
  createEditor() {
890
- this.editor = new K({
1064
+ this.editor = new Editor({
891
1065
  autofocus: this.autoFocus,
892
1066
  content: this.modelValue,
893
1067
  editable: this.editable,
@@ -898,7 +1072,8 @@ const me = /* @__PURE__ */ p(ue, [["render", le]]), pe = {
898
1072
  class: this.inputClass
899
1073
  }
900
1074
  }
901
- }), this.addEditorListeners();
1075
+ });
1076
+ this.addEditorListeners();
902
1077
  },
903
1078
  destroyEditor() {
904
1079
  this.editor.destroy();
@@ -909,12 +1084,15 @@ const me = /* @__PURE__ */ p(ue, [["render", le]]), pe = {
909
1084
  */
910
1085
  addEditorListeners() {
911
1086
  this.editor.on("update", () => {
912
- const t = this.getOutput();
913
- this.$emit("input", t), this.$emit("update:modelValue", t);
914
- }), this.editor.on("focus", ({ event: t }) => {
915
- this.$emit("focus", t);
916
- }), this.editor.on("blur", ({ event: t }) => {
917
- this.$emit("blur", t);
1087
+ const value = this.getOutput();
1088
+ this.$emit("input", value);
1089
+ this.$emit("update:modelValue", value);
1090
+ });
1091
+ this.editor.on("focus", ({ event }) => {
1092
+ this.$emit("focus", event);
1093
+ });
1094
+ this.editor.on("blur", ({ event }) => {
1095
+ this.$emit("blur", event);
918
1096
  });
919
1097
  },
920
1098
  getOutput() {
@@ -928,30 +1106,33 @@ const me = /* @__PURE__ */ p(ue, [["render", le]]), pe = {
928
1106
  return this.editor.getText();
929
1107
  }
930
1108
  },
931
- getExtension(t, e) {
932
- var o;
933
- return typeof e == "boolean" ? t : (o = t.configure) == null ? void 0 : o.call(t, e);
1109
+ getExtension(extension, options) {
1110
+ var _a;
1111
+ if (typeof options === "boolean") {
1112
+ return extension;
1113
+ }
1114
+ return (_a = extension.configure) == null ? void 0 : _a.call(extension, options);
934
1115
  },
935
- updateEditorAttributes(t) {
936
- this.editor.setOptions({ editorProps: { attributes: t } });
1116
+ updateEditorAttributes(attributes) {
1117
+ this.editor.setOptions({ editorProps: { attributes } });
937
1118
  },
938
1119
  focusEditor() {
939
1120
  this.editor.commands.focus();
940
1121
  }
941
1122
  }
942
1123
  };
943
- function he(t, e, o, n, r, i) {
944
- const s = c("editor-content");
945
- return d(), l(s, {
946
- editor: r.editor,
1124
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1125
+ const _component_editor_content = resolveComponent("editor-content");
1126
+ return openBlock(), createBlock(_component_editor_content, {
1127
+ editor: $data.editor,
947
1128
  "data-qa": "dt-rich-text-editor",
948
1129
  class: "dt-rich-text-editor"
949
1130
  }, null, 8, ["editor"]);
950
1131
  }
951
- const io = /* @__PURE__ */ p(fe, [["render", he]]);
1132
+ const DtRichTextEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
952
1133
  export {
953
- io as DtRichTextEditor,
954
- ce as RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,
955
- ae as RICH_TEXT_EDITOR_OUTPUT_FORMATS
1134
+ DtRichTextEditor,
1135
+ RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,
1136
+ RICH_TEXT_EDITOR_OUTPUT_FORMATS
956
1137
  };
957
1138
  //# sourceMappingURL=rich-text-editor.js.map