@dialpad/dialtone-vue 2.126.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 (425) 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-IaLNHmVd.js.map +1 -0
  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-OpYAAKwF.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-QYpmdE0R.js.map +1 -0
  17. package/dist/chunks/index-DUr1xHR0.js +442 -0
  18. package/dist/chunks/{index-nIyl_PL6.js.map → index-DUr1xHR0.js.map} +1 -1
  19. package/dist/chunks/index-IA-Z8fgm.js +441 -0
  20. package/dist/chunks/index-IA-Z8fgm.js.map +1 -0
  21. package/dist/chunks/{input-1tm09l_-.js → input-6kbd8Pju.js} +83 -60
  22. package/dist/chunks/{input-1tm09l_-.js.map → input-6kbd8Pju.js.map} +1 -1
  23. package/dist/chunks/input-Axw-wFj2.js +295 -0
  24. package/dist/chunks/input-Axw-wFj2.js.map +1 -0
  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-qVZaS5Bb.js.map +1 -0
  29. package/dist/chunks/keyboard_list_navigation-ScXhrxya.js +284 -0
  30. package/dist/chunks/{keyboard_list_navigation-F0O8nht0.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-fJnl_Iox.js.map +1 -0
  33. package/dist/chunks/link_constants-Huj7D_hm.js +22 -0
  34. package/dist/chunks/{link_constants-vIUB92L4.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-nWVlXQBs.js.map +1 -0
  37. package/dist/chunks/list_item_constants-EiqkqZvP.js +13 -0
  38. package/dist/chunks/{list_item_constants-LTUc74pD.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-u1xcN9Dd.js.map +1 -0
  41. package/dist/chunks/modal-VgxXAQFP.js +105 -0
  42. package/dist/chunks/{modal-VuMFkZFH.js.map → modal-VgxXAQFP.js.map} +1 -1
  43. package/dist/chunks/modal-XOr4kiNZ.js +106 -0
  44. package/dist/chunks/modal-XOr4kiNZ.js.map +1 -0
  45. package/dist/chunks/notice_action-IRUoLX2d.js +196 -0
  46. package/dist/chunks/{notice_action-9NmtQRai.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-P6uDyE9x.js.map +1 -0
  49. package/dist/chunks/notice_constants-7Qt2CQEY.js +7 -0
  50. package/dist/chunks/{notice_constants-c--hBFQw.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-UXo9e3bS.js.map +1 -0
  53. package/dist/chunks/popover_constants-JwBF9h1Z.js +143 -0
  54. package/dist/chunks/{popover_constants-qjlEkroB.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-Qkpb0yh2.js.map +1 -0
  57. package/dist/chunks/sr_only_close_button-81bHIpPu.js +95 -0
  58. package/dist/chunks/{sr_only_close_button-JGole5Xi.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-ZaGdAHz7.js.map +1 -0
  61. package/dist/chunks/stack_constants-HraCekPm.js +15 -0
  62. package/dist/chunks/{stack_constants-u7tNqGtc.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-SMzMWnAQ.js.map +1 -0
  65. package/dist/chunks/tab-FcsV5VmK.js +386 -0
  66. package/dist/chunks/tab-FcsV5VmK.js.map +1 -0
  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/common/constants.cjs.map +1 -0
  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/common/dates.cjs.map +1 -0
  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/common/mixins.cjs.map +1 -0
  83. package/dist/common/mixins.js +17 -0
  84. package/dist/common/utils.cjs +237 -0
  85. package/dist/common/utils.cjs.map +1 -0
  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/common/validators.cjs.map +1 -0
  90. package/dist/common/validators.js +23 -0
  91. package/dist/{lib → common}/validators.js.map +1 -1
  92. package/dist/component-documentation.json +1 -1
  93. package/dist/dialtone-vue.cjs +373 -0
  94. package/dist/dialtone-vue.cjs.map +1 -0
  95. package/dist/dialtone-vue.js +325 -324
  96. package/dist/dialtone-vue.js.map +1 -1
  97. package/dist/lib/attachment-carousel.cjs +261 -0
  98. package/dist/lib/attachment-carousel.cjs.map +1 -0
  99. package/dist/lib/attachment-carousel.js +96 -85
  100. package/dist/lib/attachment-carousel.js.map +1 -1
  101. package/dist/lib/avatar.cjs +400 -0
  102. package/dist/lib/avatar.cjs.map +1 -0
  103. package/dist/lib/avatar.js +111 -80
  104. package/dist/lib/avatar.js.map +1 -1
  105. package/dist/lib/badge.cjs +183 -0
  106. package/dist/lib/badge.cjs.map +1 -0
  107. package/dist/lib/badge.js +53 -39
  108. package/dist/lib/badge.js.map +1 -1
  109. package/dist/lib/banner.cjs +210 -0
  110. package/dist/lib/banner.cjs.map +1 -0
  111. package/dist/lib/banner.js +58 -48
  112. package/dist/lib/banner.js.map +1 -1
  113. package/dist/lib/breadcrumbs.cjs +147 -0
  114. package/dist/lib/breadcrumbs.cjs.map +1 -0
  115. package/dist/lib/breadcrumbs.js +57 -48
  116. package/dist/lib/breadcrumbs.js.map +1 -1
  117. package/dist/lib/button-group.cjs +48 -0
  118. package/dist/lib/button-group.cjs.map +1 -0
  119. package/dist/lib/button-group.js +21 -18
  120. package/dist/lib/button-group.js.map +1 -1
  121. package/dist/lib/button.cjs +350 -0
  122. package/dist/lib/button.cjs.map +1 -0
  123. package/dist/lib/button.js +98 -76
  124. package/dist/lib/button.js.map +1 -1
  125. package/dist/lib/callbar-button-with-popover.cjs +250 -0
  126. package/dist/lib/callbar-button-with-popover.cjs.map +1 -0
  127. package/dist/lib/callbar-button-with-popover.js +66 -51
  128. package/dist/lib/callbar-button-with-popover.js.map +1 -1
  129. package/dist/lib/callbar-button.cjs +183 -0
  130. package/dist/lib/callbar-button.cjs.map +1 -0
  131. package/dist/lib/callbar-button.js +42 -34
  132. package/dist/lib/callbar-button.js.map +1 -1
  133. package/dist/lib/callbox.cjs +147 -0
  134. package/dist/lib/callbox.cjs.map +1 -0
  135. package/dist/lib/callbox.js +38 -33
  136. package/dist/lib/callbox.js.map +1 -1
  137. package/dist/lib/card.cjs +74 -0
  138. package/dist/lib/card.cjs.map +1 -0
  139. package/dist/lib/card.js +22 -20
  140. package/dist/lib/card.js.map +1 -1
  141. package/dist/lib/checkbox-group.cjs +130 -0
  142. package/dist/lib/checkbox-group.cjs.map +1 -0
  143. package/dist/lib/checkbox-group.js +42 -29
  144. package/dist/lib/checkbox-group.js.map +1 -1
  145. package/dist/lib/checkbox.cjs +128 -0
  146. package/dist/lib/checkbox.cjs.map +1 -0
  147. package/dist/lib/checkbox.js +46 -35
  148. package/dist/lib/checkbox.js.map +1 -1
  149. package/dist/lib/chip.cjs +199 -0
  150. package/dist/lib/chip.cjs.map +1 -0
  151. package/dist/lib/chip.js +59 -46
  152. package/dist/lib/chip.js.map +1 -1
  153. package/dist/lib/codeblock.cjs +30 -0
  154. package/dist/lib/codeblock.cjs.map +1 -0
  155. package/dist/lib/codeblock.js +15 -14
  156. package/dist/lib/codeblock.js.map +1 -1
  157. package/dist/lib/collapsible.cjs +335 -0
  158. package/dist/lib/collapsible.cjs.map +1 -0
  159. package/dist/lib/collapsible.js +91 -69
  160. package/dist/lib/collapsible.js.map +1 -1
  161. package/dist/lib/combobox-multi-select.cjs +520 -0
  162. package/dist/lib/combobox-multi-select.cjs.map +1 -0
  163. package/dist/lib/combobox-multi-select.js +223 -136
  164. package/dist/lib/combobox-multi-select.js.map +1 -1
  165. package/dist/lib/combobox-with-popover.cjs +385 -0
  166. package/dist/lib/combobox-with-popover.cjs.map +1 -0
  167. package/dist/lib/combobox-with-popover.js +131 -87
  168. package/dist/lib/combobox-with-popover.js.map +1 -1
  169. package/dist/lib/combobox.cjs +19 -0
  170. package/dist/lib/combobox.cjs.map +1 -0
  171. package/dist/lib/combobox.js +9 -9
  172. package/dist/lib/contact-info.cjs +146 -0
  173. package/dist/lib/contact-info.cjs.map +1 -0
  174. package/dist/lib/contact-info.js +34 -33
  175. package/dist/lib/contact-info.js.map +1 -1
  176. package/dist/lib/contact-row.cjs +206 -0
  177. package/dist/lib/contact-row.cjs.map +1 -0
  178. package/dist/lib/contact-row.js +42 -39
  179. package/dist/lib/contact-row.js.map +1 -1
  180. package/dist/lib/datepicker.cjs +663 -0
  181. package/dist/lib/datepicker.cjs.map +1 -0
  182. package/dist/lib/datepicker.js +330 -219
  183. package/dist/lib/datepicker.js.map +1 -1
  184. package/dist/lib/description-list.cjs +115 -0
  185. package/dist/lib/description-list.cjs.map +1 -0
  186. package/dist/lib/description-list.js +51 -19
  187. package/dist/lib/description-list.js.map +1 -1
  188. package/dist/lib/dropdown.cjs +46 -0
  189. package/dist/lib/dropdown.cjs.map +1 -0
  190. package/dist/lib/dropdown.js +27 -26
  191. package/dist/lib/dropdown.js.map +1 -1
  192. package/dist/lib/editor.cjs +556 -0
  193. package/dist/lib/editor.cjs.map +1 -0
  194. package/dist/lib/editor.js +191 -162
  195. package/dist/lib/editor.js.map +1 -1
  196. package/dist/lib/emoji-picker.cjs +1064 -0
  197. package/dist/lib/emoji-picker.cjs.map +1 -0
  198. package/dist/lib/emoji-picker.js +638 -375
  199. package/dist/lib/emoji-picker.js.map +1 -1
  200. package/dist/lib/emoji-row.cjs +89 -0
  201. package/dist/lib/emoji-row.cjs.map +1 -0
  202. package/dist/lib/emoji-row.js +46 -40
  203. package/dist/lib/emoji-row.js.map +1 -1
  204. package/dist/lib/emoji-text-wrapper.cjs +110 -0
  205. package/dist/lib/emoji-text-wrapper.cjs.map +1 -0
  206. package/dist/lib/emoji-text-wrapper.js +49 -35
  207. package/dist/lib/emoji-text-wrapper.js.map +1 -1
  208. package/dist/lib/emoji.cjs +146 -0
  209. package/dist/lib/emoji.cjs.map +1 -0
  210. package/dist/lib/emoji.js +140 -5
  211. package/dist/lib/emoji.js.map +1 -1
  212. package/dist/lib/feed-item-row.cjs +214 -0
  213. package/dist/lib/feed-item-row.cjs.map +1 -0
  214. package/dist/lib/feed-item-row.js +71 -64
  215. package/dist/lib/feed-item-row.js.map +1 -1
  216. package/dist/lib/feed-pill.cjs +150 -0
  217. package/dist/lib/feed-pill.cjs.map +1 -0
  218. package/dist/lib/feed-pill.js +60 -52
  219. package/dist/lib/feed-pill.js.map +1 -1
  220. package/dist/lib/general-row.cjs +406 -0
  221. package/dist/lib/general-row.cjs.map +1 -0
  222. package/dist/lib/general-row.js +133 -106
  223. package/dist/lib/general-row.js.map +1 -1
  224. package/dist/lib/group-row.cjs +118 -0
  225. package/dist/lib/group-row.cjs.map +1 -0
  226. package/dist/lib/group-row.js +34 -31
  227. package/dist/lib/group-row.js.map +1 -1
  228. package/dist/lib/grouped-chip.cjs +46 -0
  229. package/dist/lib/grouped-chip.cjs.map +1 -0
  230. package/dist/lib/grouped-chip.js +28 -27
  231. package/dist/lib/grouped-chip.js.map +1 -1
  232. package/dist/lib/hovercard.cjs +228 -0
  233. package/dist/lib/hovercard.cjs.map +1 -0
  234. package/dist/lib/hovercard.js +98 -64
  235. package/dist/lib/hovercard.js.map +1 -1
  236. package/dist/lib/icon.cjs +60 -0
  237. package/dist/lib/icon.cjs.map +1 -0
  238. package/dist/lib/icon.js +22 -44
  239. package/dist/lib/icon.js.map +1 -1
  240. package/dist/lib/image-viewer.cjs +191 -0
  241. package/dist/lib/image-viewer.cjs.map +1 -0
  242. package/dist/lib/image-viewer.js +83 -63
  243. package/dist/lib/image-viewer.js.map +1 -1
  244. package/dist/lib/input-group.cjs +92 -0
  245. package/dist/lib/input-group.cjs.map +1 -0
  246. package/dist/lib/input-group.js +29 -27
  247. package/dist/lib/input-group.js.map +1 -1
  248. package/dist/lib/input.cjs +493 -0
  249. package/dist/lib/input.cjs.map +1 -0
  250. package/dist/lib/input.js +127 -89
  251. package/dist/lib/input.js.map +1 -1
  252. package/dist/lib/item-layout.cjs +41 -0
  253. package/dist/lib/item-layout.cjs.map +1 -0
  254. package/dist/lib/item-layout.js +15 -13
  255. package/dist/lib/item-layout.js.map +1 -1
  256. package/dist/lib/ivr-node.cjs +210 -0
  257. package/dist/lib/ivr-node.cjs.map +1 -0
  258. package/dist/lib/ivr-node.js +115 -100
  259. package/dist/lib/ivr-node.js.map +1 -1
  260. package/dist/lib/keyboard-shortcut.cjs +107 -0
  261. package/dist/lib/keyboard-shortcut.cjs.map +1 -0
  262. package/dist/lib/keyboard-shortcut.js +42 -35
  263. package/dist/lib/keyboard-shortcut.js.map +1 -1
  264. package/dist/lib/lazy-show.cjs +81 -0
  265. package/dist/lib/lazy-show.cjs.map +1 -0
  266. package/dist/lib/lazy-show.js +20 -16
  267. package/dist/lib/lazy-show.js.map +1 -1
  268. package/dist/lib/link.cjs +71 -0
  269. package/dist/lib/link.cjs.map +1 -0
  270. package/dist/lib/link.js +22 -20
  271. package/dist/lib/link.js.map +1 -1
  272. package/dist/lib/list-item-group.cjs +61 -0
  273. package/dist/lib/list-item-group.cjs.map +1 -0
  274. package/dist/lib/list-item-group.js +19 -17
  275. package/dist/lib/list-item-group.js.map +1 -1
  276. package/dist/lib/list-item.cjs +205 -0
  277. package/dist/lib/list-item.cjs.map +1 -0
  278. package/dist/lib/list-item.js +67 -57
  279. package/dist/lib/list-item.js.map +1 -1
  280. package/dist/lib/message-input.cjs +555 -0
  281. package/dist/lib/message-input.cjs.map +1 -0
  282. package/dist/lib/message-input.js +211 -147
  283. package/dist/lib/message-input.js.map +1 -1
  284. package/dist/lib/modal.cjs +351 -0
  285. package/dist/lib/modal.cjs.map +1 -0
  286. package/dist/lib/modal.js +118 -91
  287. package/dist/lib/modal.js.map +1 -1
  288. package/dist/lib/notice.cjs +160 -0
  289. package/dist/lib/notice.cjs.map +1 -0
  290. package/dist/lib/notice.js +46 -44
  291. package/dist/lib/notice.js.map +1 -1
  292. package/dist/lib/pagination.cjs +153 -0
  293. package/dist/lib/pagination.cjs.map +1 -0
  294. package/dist/lib/pagination.js +60 -49
  295. package/dist/lib/pagination.js.map +1 -1
  296. package/dist/lib/popover.cjs +957 -0
  297. package/dist/lib/popover.cjs.map +1 -0
  298. package/dist/lib/popover.js +401 -222
  299. package/dist/lib/popover.js.map +1 -1
  300. package/dist/lib/presence.cjs +66 -0
  301. package/dist/lib/presence.cjs.map +1 -0
  302. package/dist/lib/presence.js +32 -26
  303. package/dist/lib/presence.js.map +1 -1
  304. package/dist/lib/radio-group.cjs +99 -0
  305. package/dist/lib/radio-group.cjs.map +1 -0
  306. package/dist/lib/radio-group.js +24 -22
  307. package/dist/lib/radio-group.js.map +1 -1
  308. package/dist/lib/radio.cjs +119 -0
  309. package/dist/lib/radio.cjs.map +1 -0
  310. package/dist/lib/radio.js +43 -35
  311. package/dist/lib/radio.js.map +1 -1
  312. package/dist/lib/rich-text-editor.cjs +1139 -0
  313. package/dist/lib/rich-text-editor.cjs.map +1 -0
  314. package/dist/lib/rich-text-editor.js +611 -392
  315. package/dist/lib/rich-text-editor.js.map +1 -1
  316. package/dist/lib/root-layout.cjs +131 -0
  317. package/dist/lib/root-layout.cjs.map +1 -0
  318. package/dist/lib/root-layout.js +28 -24
  319. package/dist/lib/root-layout.js.map +1 -1
  320. package/dist/lib/select-menu.cjs +283 -0
  321. package/dist/lib/select-menu.cjs.map +1 -0
  322. package/dist/lib/select-menu.js +101 -61
  323. package/dist/lib/select-menu.js.map +1 -1
  324. package/dist/lib/settings-menu-button.cjs +66 -0
  325. package/dist/lib/settings-menu-button.cjs.map +1 -0
  326. package/dist/lib/settings-menu-button.js +26 -25
  327. package/dist/lib/settings-menu-button.js.map +1 -1
  328. package/dist/lib/skeleton.cjs +613 -0
  329. package/dist/lib/skeleton.cjs.map +1 -0
  330. package/dist/lib/skeleton.js +174 -135
  331. package/dist/lib/skeleton.js.map +1 -1
  332. package/dist/lib/stack.cjs +128 -0
  333. package/dist/lib/stack.cjs.map +1 -0
  334. package/dist/lib/stack.js +66 -56
  335. package/dist/lib/stack.js.map +1 -1
  336. package/dist/lib/tabs.cjs +100 -0
  337. package/dist/lib/tabs.cjs.map +1 -0
  338. package/dist/lib/tabs.js +42 -35
  339. package/dist/lib/tabs.js.map +1 -1
  340. package/dist/lib/time-pill.cjs +48 -0
  341. package/dist/lib/time-pill.cjs.map +1 -0
  342. package/dist/lib/time-pill.js +21 -16
  343. package/dist/lib/time-pill.js.map +1 -1
  344. package/dist/lib/toast.cjs +248 -0
  345. package/dist/lib/toast.cjs.map +1 -0
  346. package/dist/lib/toast.js +78 -56
  347. package/dist/lib/toast.js.map +1 -1
  348. package/dist/lib/toggle.cjs +178 -0
  349. package/dist/lib/toggle.cjs.map +1 -0
  350. package/dist/lib/toggle.js +46 -37
  351. package/dist/lib/toggle.js.map +1 -1
  352. package/dist/lib/tooltip-directive.cjs +88 -0
  353. package/dist/lib/tooltip-directive.cjs.map +1 -0
  354. package/dist/lib/tooltip-directive.js +55 -41
  355. package/dist/lib/tooltip-directive.js.map +1 -1
  356. package/dist/lib/tooltip.cjs +437 -0
  357. package/dist/lib/tooltip.cjs.map +1 -0
  358. package/dist/lib/tooltip.js +152 -90
  359. package/dist/lib/tooltip.js.map +1 -1
  360. package/dist/lib/top-banner-info.cjs +64 -0
  361. package/dist/lib/top-banner-info.cjs.map +1 -0
  362. package/dist/lib/top-banner-info.js +22 -18
  363. package/dist/lib/top-banner-info.js.map +1 -1
  364. package/dist/lib/unread-pill.cjs +64 -0
  365. package/dist/lib/unread-pill.cjs.map +1 -0
  366. package/dist/lib/unread-pill.js +25 -22
  367. package/dist/lib/unread-pill.js.map +1 -1
  368. package/dist/lib/validation-messages.cjs +86 -0
  369. package/dist/lib/validation-messages.cjs.map +1 -0
  370. package/dist/lib/validation-messages.js +32 -29
  371. package/dist/lib/validation-messages.js.map +1 -1
  372. package/dist/style.css +1214 -1
  373. package/dist/types/components/avatar/avatar.vue.d.ts +1 -1
  374. package/dist/types/components/button/button.vue.d.ts +2 -2
  375. package/dist/types/components/card/card.vue.d.ts +1 -1
  376. package/dist/types/components/chip/chip.vue.d.ts +1 -1
  377. package/dist/types/components/collapsible/collapsible.vue.d.ts +2 -2
  378. package/dist/types/components/combobox/combobox.vue.d.ts +1 -1
  379. package/dist/types/components/dropdown/dropdown.vue.d.ts +1 -1
  380. package/dist/types/components/emoji/emoji.vue.d.ts +1 -1
  381. package/dist/types/components/icon/icon.vue.d.ts +2 -22
  382. package/dist/types/components/icon/icon.vue.d.ts.map +1 -1
  383. package/dist/types/components/list_item_group/list_item_group.vue.d.ts +1 -1
  384. package/dist/types/components/modal/modal.vue.d.ts +2 -2
  385. package/dist/types/components/popover/popover_header_footer.vue.d.ts +1 -1
  386. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
  387. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
  388. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +91 -1
  389. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  390. package/dist/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
  391. package/dist/types/components/skeleton/skeleton-paragraph.vue.d.ts +3 -3
  392. package/dist/types/components/skeleton/skeleton-shape.vue.d.ts +2 -2
  393. package/dist/types/components/skeleton/skeleton-text.vue.d.ts +2 -2
  394. package/dist/types/components/skeleton/skeleton.vue.d.ts +1 -1
  395. package/dist/types/components/tooltip/tooltip.vue.d.ts +2 -2
  396. package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  397. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  398. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +2 -2
  399. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +90 -0
  400. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  401. package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  402. package/dist/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -1
  403. package/package.json +37 -35
  404. package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js +0 -33
  405. package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js.map +0 -1
  406. package/dist/chunks/dropdown_constants-EUcDxBrX.js +0 -9
  407. package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
  408. package/dist/chunks/index-YkSDT8-g.js +0 -244
  409. package/dist/chunks/index-YkSDT8-g.js.map +0 -1
  410. package/dist/chunks/index-nIyl_PL6.js +0 -372
  411. package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +0 -197
  412. package/dist/chunks/link_constants-vIUB92L4.js +0 -16
  413. package/dist/chunks/list_item_constants-LTUc74pD.js +0 -13
  414. package/dist/chunks/modal-VuMFkZFH.js +0 -82
  415. package/dist/chunks/notice_action-9NmtQRai.js +0 -182
  416. package/dist/chunks/notice_constants-c--hBFQw.js +0 -6
  417. package/dist/chunks/popover_constants-qjlEkroB.js +0 -114
  418. package/dist/chunks/sr_only_close_button-JGole5Xi.js +0 -86
  419. package/dist/chunks/stack_constants-u7tNqGtc.js +0 -13
  420. package/dist/chunks/tab-Qm9LVkYj.js +0 -346
  421. package/dist/lib/dates.js +0 -57
  422. package/dist/lib/mixins.js +0 -17
  423. package/dist/lib/utils.js +0 -175
  424. package/dist/lib/validators.js +0 -12
  425. /package/dist/{lib → common}/mixins.js.map +0 -0
@@ -1,89 +1,93 @@
1
- import { NodeViewWrapper as R, nodeViewProps as w, VueRenderer as k, VueNodeViewRenderer as T, EditorContent as O, Editor as $ } from "@tiptap/vue-2";
2
- import M from "@tiptap/extension-blockquote";
3
- import D from "@tiptap/extension-code-block";
4
- import H from "@tiptap/extension-document";
5
- import q from "@tiptap/extension-hard-break";
6
- import N from "@tiptap/extension-paragraph";
7
- import B from "@tiptap/extension-placeholder";
8
- import F from "@tiptap/extension-bold";
9
- import U 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 ct, getPhoneNumberRegex as dt } from "./utils.js";
28
- import lt 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: R,
49
- DtEmoji: C
49
+ NodeViewWrapper,
50
+ DtEmoji
50
51
  },
51
- props: w
52
+ props: nodeViewProps
52
53
  };
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,
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);
57
+ };
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 bt = 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
- }, xt = [], Et = /* @__PURE__ */ u(
145
- vt,
146
- bt,
147
- xt,
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 = Et.exports, Rt = {
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 wt = 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
- }, kt = [], Tt = /* @__PURE__ */ u(
171
- Rt,
172
- wt,
173
- kt,
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 k(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, b = (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 b(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 b(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 Dt(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 Ht(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 qt(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 = qt(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 Nt(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 x = dt(1, 15);
400
- function E(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, l = 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
- x
410
- ), _ = h(
411
- t,
412
- a,
500
+ partialPhoneNumberRegex
501
+ );
502
+ const lastWordInRange = getWordAtUntil(
503
+ text,
504
+ rangeTo,
413
505
  "right",
414
- x
415
- ), c = t.slice(l.from, _.to);
416
- Mt(c, ct, Dt).forEach((f) => {
417
- const d = Ht(f[0]), p = e + l.from + f.index + 1, P = p + d.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 Bt(t) {
422
- let e = !1;
423
- return new it({
424
- key: new I("autolink"),
425
- appendTransaction: (r, n, o) => {
426
- const i = r.some((c) => c.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 || E(a, 0, 0, a.length, s, t.type), e = !0;
431
- const l = 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(l).forEach(({ oldRange: c, newRange: m }) => {
436
- Nt(m, o.doc, s, t.type), rt(
437
- o.doc,
438
- m,
439
- (d) => d.isTextblock
440
- ).forEach(({ node: d, pos: p }) => {
441
- E(
442
- d.textContent,
443
- p,
444
- c.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 Ft = {
559
+ const defaultAttributes = {
455
560
  class: "d-link d-c-text d-d-inline-block",
456
561
  rel: "noopener noreferrer nofollow"
457
- }, Ut = 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
- Ft
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
- Bt({ 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: R,
482
- DtLink: mt
588
+ NodeViewWrapper,
589
+ DtLink
483
590
  },
484
- props: w,
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 = lt.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 = lt.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 = lt.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 k(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.
@@ -723,6 +858,48 @@ const ne = re.exports, oe = {
723
858
  mentionSuggestion: {
724
859
  type: Object,
725
860
  default: null
861
+ },
862
+ /**
863
+ * Whether the input allows for block quote.
864
+ */
865
+ allowBlockquote: {
866
+ type: Boolean,
867
+ default: true
868
+ },
869
+ /**
870
+ * Whether the input allows for bold to be introduced in the text.
871
+ */
872
+ allowBold: {
873
+ type: Boolean,
874
+ default: true
875
+ },
876
+ /**
877
+ * Whether the input allows for bullet list to be introduced in the text.
878
+ */
879
+ allowBulletList: {
880
+ type: Boolean,
881
+ default: true
882
+ },
883
+ /**
884
+ * Whether the input allows for italic to be introduced in the text.
885
+ */
886
+ allowItalic: {
887
+ type: Boolean,
888
+ default: true
889
+ },
890
+ /**
891
+ * Whether the input allows for strike to be introduced in the text.
892
+ */
893
+ allowStrike: {
894
+ type: Boolean,
895
+ default: true
896
+ },
897
+ /**
898
+ * Whether the input allows for underline to be introduced in the text.
899
+ */
900
+ allowUnderline: {
901
+ type: Boolean,
902
+ default: true
726
903
  }
727
904
  },
728
905
  emits: [
@@ -754,64 +931,88 @@ const ne = re.exports, oe = {
754
931
  data() {
755
932
  return {
756
933
  editor: null,
757
- popoverOpened: !1
934
+ popoverOpened: false
758
935
  };
759
936
  },
760
937
  computed: {
938
+ // eslint-disable-next-line complexity
761
939
  extensions() {
762
- const t = [
763
- M,
764
- F,
765
- U,
766
- H,
767
- K,
768
- z,
769
- N,
770
- J,
771
- Y,
772
- X
773
- ];
774
- if (this.link && t.push(this.getExtension(Ut, this.link)), t.push(
775
- B.configure({ placeholder: this.placeholder })
776
- ), this.allowLineBreaks || t.push(
777
- q.extend({
778
- addKeyboardShortcuts() {
779
- return {
780
- Enter: () => !0,
781
- "Shift-Enter": () => this.editor.commands.first(({ commands: e }) => [
782
- () => e.newlineInCode(),
783
- () => e.createParagraphNear(),
784
- () => e.liftEmptyBlock(),
785
- () => e.splitBlock()
786
- ])
787
- };
788
- }
789
- })
790
- ), t.push(V.extend({ inclusive: !1 }).configure({
791
- autolink: !0,
792
- protocols: Qt
793
- })), this.mentionSuggestion) {
794
- const e = { ...this.mentionSuggestion, ...oe };
795
- t.push(Xt.configure({ suggestion: e }));
796
- }
797
- 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({
798
996
  types: ["paragraph"],
799
997
  defaultAlignment: "left"
800
- })), t.push(D.configure({
998
+ }));
999
+ extensions.push(CodeBlock.configure({
801
1000
  HTMLAttributes: {
802
1001
  class: "dt-rich-text-editor--code-block"
803
1002
  }
804
- })), t.push(W.configure({
805
- itemTypeName: "listItem"
806
- })), t;
1003
+ }));
1004
+ return extensions;
807
1005
  },
808
1006
  inputAttrs() {
809
- const t = {
1007
+ const attrs = {
810
1008
  "aria-label": this.inputAriaLabel,
811
- "aria-multiline": !0,
1009
+ "aria-multiline": true,
812
1010
  role: "textbox"
813
1011
  };
814
- return this.editable || (t["aria-readonly"] = !0), t;
1012
+ if (!this.editable) {
1013
+ attrs["aria-readonly"] = true;
1014
+ }
1015
+ return attrs;
815
1016
  }
816
1017
  },
817
1018
  /**
@@ -820,21 +1021,30 @@ const ne = re.exports, oe = {
820
1021
  * to be hooked up to the Editor's own API.
821
1022
  */
822
1023
  watch: {
823
- editable(t) {
824
- this.editor.setEditable(t), this.updateEditorAttributes({ "aria-readonly": !t });
1024
+ editable(isEditable) {
1025
+ this.editor.setEditable(isEditable);
1026
+ this.updateEditorAttributes({ "aria-readonly": !isEditable });
825
1027
  },
826
- inputClass(t) {
827
- this.updateEditorAttributes({ class: t });
1028
+ inputClass(newClass) {
1029
+ this.updateEditorAttributes({ class: newClass });
828
1030
  },
829
- inputAriaLabel(t) {
830
- this.updateEditorAttributes({ "aria-label": t });
1031
+ inputAriaLabel(newLabel) {
1032
+ this.updateEditorAttributes({ "aria-label": newLabel });
831
1033
  },
832
1034
  extensions() {
833
- this.destroyEditor(), this.createEditor();
1035
+ this.destroyEditor();
1036
+ this.createEditor();
834
1037
  },
835
- value(t) {
836
- let e = this.getOutput();
837
- 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);
838
1048
  }
839
1049
  },
840
1050
  created() {
@@ -845,7 +1055,7 @@ const ne = re.exports, oe = {
845
1055
  },
846
1056
  methods: {
847
1057
  createEditor() {
848
- this.editor = new $({
1058
+ this.editor = new Editor({
849
1059
  autofocus: this.autoFocus,
850
1060
  content: this.value,
851
1061
  editable: this.editable,
@@ -856,7 +1066,8 @@ const ne = re.exports, oe = {
856
1066
  class: this.inputClass
857
1067
  }
858
1068
  }
859
- }), this.addEditorListeners();
1069
+ });
1070
+ this.addEditorListeners();
860
1071
  },
861
1072
  destroyEditor() {
862
1073
  this.editor.destroy();
@@ -867,12 +1078,15 @@ const ne = re.exports, oe = {
867
1078
  */
868
1079
  addEditorListeners() {
869
1080
  this.editor.on("update", () => {
870
- const t = this.getOutput();
871
- this.$emit("input", t), this.$emit("update:value", t);
872
- }), this.editor.on("focus", ({ event: t }) => {
873
- this.$emit("focus", t);
874
- }), this.editor.on("blur", ({ event: t }) => {
875
- 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);
876
1090
  });
877
1091
  },
878
1092
  getOutput() {
@@ -886,35 +1100,40 @@ const ne = re.exports, oe = {
886
1100
  return this.editor.getText();
887
1101
  }
888
1102
  },
889
- getExtension(t, e) {
890
- var r;
891
- 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);
892
1109
  },
893
- updateEditorAttributes(t) {
894
- this.editor.setOptions({ editorProps: { attributes: t } });
1110
+ updateEditorAttributes(attributes) {
1111
+ this.editor.setOptions({ editorProps: { attributes } });
895
1112
  },
896
1113
  focusEditor() {
897
1114
  this.editor.commands.focus();
898
1115
  }
899
1116
  }
900
1117
  };
901
- var se = function() {
902
- var e = this, r = e._self._c;
903
- return r("editor-content", { staticClass: "dt-rich-text-editor", attrs: { editor: e.editor, "data-qa": "dt-rich-text-editor" } });
904
- }, ae = [], ue = /* @__PURE__ */ u(
905
- ie,
906
- se,
907
- ae,
908
- !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,
909
1128
  null,
910
1129
  null,
911
1130
  null,
912
1131
  null
913
1132
  );
914
- const Ze = ue.exports;
1133
+ const DtRichTextEditor = __component__.exports;
915
1134
  export {
916
- Ze as DtRichTextEditor,
917
- Gt as RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,
918
- Yt as RICH_TEXT_EDITOR_OUTPUT_FORMATS
1135
+ DtRichTextEditor,
1136
+ RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,
1137
+ RICH_TEXT_EDITOR_OUTPUT_FORMATS
919
1138
  };
920
1139
  //# sourceMappingURL=rich-text-editor.js.map