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