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