@dialpad/dialtone 9.65.0 → 9.66.0

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 (870) hide show
  1. package/dist/chunks/tokens-base-dark--ozK7f0P.js +4 -0
  2. package/dist/chunks/tokens-base-dark-V8E4WaJI.js +1 -0
  3. package/dist/chunks/tokens-base-light-LYlvM3eZ.js +1 -0
  4. package/dist/chunks/tokens-base-light-ljPrpLe2.js +4 -0
  5. package/dist/css/dialtone-default-theme.css +57 -55
  6. package/dist/css/dialtone-default-theme.min.css +1 -1
  7. package/dist/css/dialtone.css +8 -6
  8. package/dist/css/dialtone.min.css +1 -1
  9. package/dist/css/tokens/tokens-base-dark.css +5 -5
  10. package/dist/css/tokens/tokens-base-light.css +5 -5
  11. package/dist/css/tokens/tokens-dp-dark.css +44 -44
  12. package/dist/css/tokens/tokens-dp-light.css +44 -44
  13. package/dist/css/tokens/tokens-expressive-dark.css +50 -50
  14. package/dist/css/tokens/tokens-expressive-light.css +50 -50
  15. package/dist/css/tokens/tokens-expressive-sm-dark.css +50 -50
  16. package/dist/css/tokens/tokens-expressive-sm-light.css +50 -50
  17. package/dist/css/tokens/tokens-tmo-dark.css +44 -44
  18. package/dist/css/tokens/tokens-tmo-light.css +44 -44
  19. package/dist/themes/dp-dark.cjs +1 -1
  20. package/dist/themes/dp-dark.js +2 -2
  21. package/dist/themes/dp-light.cjs +1 -1
  22. package/dist/themes/dp-light.js +2 -2
  23. package/dist/themes/expressive-dark.cjs +1 -1
  24. package/dist/themes/expressive-dark.js +2 -2
  25. package/dist/themes/expressive-light.cjs +1 -1
  26. package/dist/themes/expressive-light.js +2 -2
  27. package/dist/themes/expressive-sm-dark.cjs +1 -1
  28. package/dist/themes/expressive-sm-dark.js +2 -2
  29. package/dist/themes/expressive-sm-light.cjs +1 -1
  30. package/dist/themes/expressive-sm-light.js +2 -2
  31. package/dist/themes/tmo-dark.cjs +1 -1
  32. package/dist/themes/tmo-dark.js +2 -2
  33. package/dist/themes/tmo-light.cjs +1 -1
  34. package/dist/themes/tmo-light.js +2 -2
  35. package/dist/tokens/css/tokens-base-dark.css +5 -5
  36. package/dist/tokens/css/tokens-base-light.css +5 -5
  37. package/dist/tokens/css/tokens-dp-dark.css +44 -44
  38. package/dist/tokens/css/tokens-dp-light.css +44 -44
  39. package/dist/tokens/css/tokens-expressive-dark.css +50 -50
  40. package/dist/tokens/css/tokens-expressive-light.css +50 -50
  41. package/dist/tokens/css/tokens-expressive-sm-dark.css +50 -50
  42. package/dist/tokens/css/tokens-expressive-sm-light.css +50 -50
  43. package/dist/tokens/css/tokens-tmo-dark.css +44 -44
  44. package/dist/tokens/css/tokens-tmo-light.css +44 -44
  45. package/dist/tokens/doc.json +14285 -14285
  46. package/dist/tokens/less/tokens-base-dark.less +5 -5
  47. package/dist/tokens/less/tokens-base-light.less +5 -5
  48. package/dist/tokens/less/tokens-dp-dark.less +44 -44
  49. package/dist/tokens/less/tokens-dp-light.less +44 -44
  50. package/dist/tokens/less/tokens-expressive-dark.less +50 -50
  51. package/dist/tokens/less/tokens-expressive-light.less +50 -50
  52. package/dist/tokens/less/tokens-expressive-sm-dark.less +50 -50
  53. package/dist/tokens/less/tokens-expressive-sm-light.less +50 -50
  54. package/dist/tokens/less/tokens-tmo-dark.less +44 -44
  55. package/dist/tokens/less/tokens-tmo-light.less +44 -44
  56. package/dist/tokens/tokens-base-dark.json +5 -5
  57. package/dist/tokens/tokens-base-light.json +5 -5
  58. package/dist/tokens/tokens-dp-dark.json +44 -44
  59. package/dist/tokens/tokens-dp-light.json +44 -44
  60. package/dist/tokens/tokens-expressive-dark.json +50 -50
  61. package/dist/tokens/tokens-expressive-light.json +50 -50
  62. package/dist/tokens/tokens-expressive-sm-dark.json +50 -50
  63. package/dist/tokens/tokens-expressive-sm-light.json +50 -50
  64. package/dist/tokens/tokens-tmo-dark.json +44 -44
  65. package/dist/tokens/tokens-tmo-light.json +44 -44
  66. package/dist/vue2/chunks/{dropdown-6UoczdUY.js → dropdown-YdCyJ5Dq.js} +77 -41
  67. package/dist/vue2/chunks/{dropdown-pHxnQPzT.js.map → dropdown-YdCyJ5Dq.js.map} +1 -1
  68. package/dist/vue2/chunks/{dropdown-pHxnQPzT.js → dropdown-mjrYu_mK.js} +77 -41
  69. package/dist/vue2/chunks/{dropdown-6UoczdUY.js.map → dropdown-mjrYu_mK.js.map} +1 -1
  70. package/dist/vue2/chunks/dropdown_constants-2pGCXy7m.js.map +1 -1
  71. package/dist/vue2/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -1
  72. package/dist/vue2/chunks/{icon_constants-Dy4MEUJL.js → icon_constants-TdxqLsS2.js} +3 -2
  73. package/dist/vue2/chunks/icon_constants-TdxqLsS2.js.map +1 -0
  74. package/dist/vue2/chunks/{icon_constants-QYpmdE0R.js → icon_constants-VEA0wI5C.js} +3 -2
  75. package/dist/vue2/chunks/icon_constants-VEA0wI5C.js.map +1 -0
  76. package/dist/vue2/chunks/{index-gj1jEXP4.js → index-DyqUqjvI.js} +122 -87
  77. package/dist/vue2/chunks/{index-eJ-WWRdf.js.map → index-DyqUqjvI.js.map} +1 -1
  78. package/dist/vue2/chunks/{index-anN_sx1F.js → index-NYFNZeHH.js} +5 -13
  79. package/dist/vue2/chunks/{index-anN_sx1F.js.map → index-NYFNZeHH.js.map} +1 -1
  80. package/dist/vue2/chunks/{index-ODod4Oj_.js → index-i65YVk-U.js} +5 -13
  81. package/dist/vue2/chunks/{index-ODod4Oj_.js.map → index-i65YVk-U.js.map} +1 -1
  82. package/dist/vue2/chunks/{index-eJ-WWRdf.js → index-mBWay1Qb.js} +122 -87
  83. package/dist/vue2/chunks/{index-gj1jEXP4.js.map → index-mBWay1Qb.js.map} +1 -1
  84. package/dist/vue2/chunks/{input-Axw-wFj2.js → input-Hqw33WBe.js} +3 -9
  85. package/dist/vue2/chunks/{input-Axw-wFj2.js.map → input-Hqw33WBe.js.map} +1 -1
  86. package/dist/vue2/chunks/{input-6kbd8Pju.js → input-PhJeBN6r.js} +3 -9
  87. package/dist/vue2/chunks/{input-6kbd8Pju.js.map → input-PhJeBN6r.js.map} +1 -1
  88. package/dist/vue2/chunks/{input_group-qVZaS5Bb.js → input_group-ZI7aVGEp.js} +4 -2
  89. package/dist/vue2/chunks/{input_group-m3cWYUfI.js.map → input_group-ZI7aVGEp.js.map} +1 -1
  90. package/dist/vue2/chunks/{input_group-m3cWYUfI.js → input_group-pE6ec9R3.js} +4 -2
  91. package/dist/vue2/chunks/{input_group-qVZaS5Bb.js.map → input_group-pE6ec9R3.js.map} +1 -1
  92. package/dist/vue2/chunks/{keyboard_list_navigation-ScXhrxya.js → keyboard_list_navigation-YIqTuw1W.js} +6 -5
  93. package/dist/{vue3/chunks/keyboard_list_navigation-fJnl_Iox.js.map → vue2/chunks/keyboard_list_navigation-YIqTuw1W.js.map} +1 -1
  94. package/dist/vue2/chunks/{keyboard_list_navigation-fJnl_Iox.js → keyboard_list_navigation-x3D6RcC7.js} +6 -5
  95. package/dist/vue2/chunks/{keyboard_list_navigation-ScXhrxya.js.map → keyboard_list_navigation-x3D6RcC7.js.map} +1 -1
  96. package/dist/vue2/chunks/link_constants-AfTWrr-n.js.map +1 -1
  97. package/dist/vue2/chunks/link_constants-x8NwdqmA.js.map +1 -1
  98. package/dist/vue2/chunks/list_item_constants-EiqkqZvP.js.map +1 -1
  99. package/dist/vue2/chunks/list_item_constants-u1xcN9Dd.js.map +1 -1
  100. package/dist/vue2/chunks/{modal-XOr4kiNZ.js → modal-8X6poIZW.js} +4 -2
  101. package/dist/{vue3/chunks/modal-XOr4kiNZ.js.map → vue2/chunks/modal-8X6poIZW.js.map} +1 -1
  102. package/dist/vue2/chunks/{modal-VgxXAQFP.js → modal-OaWxzqNt.js} +4 -2
  103. package/dist/vue2/chunks/{modal-VgxXAQFP.js.map → modal-OaWxzqNt.js.map} +1 -1
  104. package/dist/vue2/chunks/{notice_action-IRUoLX2d.js → notice_action-qQr3K2TC.js} +71 -46
  105. package/dist/vue2/chunks/{notice_action-IRUoLX2d.js.map → notice_action-qQr3K2TC.js.map} +1 -1
  106. package/dist/vue2/chunks/{notice_action-P6uDyE9x.js → notice_action-tEvvMg7Q.js} +71 -46
  107. package/dist/vue2/chunks/{notice_action-P6uDyE9x.js.map → notice_action-tEvvMg7Q.js.map} +1 -1
  108. package/dist/vue2/chunks/notice_constants-7Qt2CQEY.js.map +1 -1
  109. package/dist/vue2/chunks/notice_constants-UXo9e3bS.js.map +1 -1
  110. package/dist/vue2/chunks/{popover_constants-WsOUIY-m.js → popover_constants-6YkPPbnk.js} +26 -47
  111. package/dist/vue2/chunks/{popover_constants-WsOUIY-m.js.map → popover_constants-6YkPPbnk.js.map} +1 -1
  112. package/dist/vue2/chunks/{popover_constants-XnGWXaxX.js → popover_constants-h9MD6WUt.js} +26 -47
  113. package/dist/{vue3/chunks/popover_constants-WsOUIY-m.js.map → vue2/chunks/popover_constants-h9MD6WUt.js.map} +1 -1
  114. package/dist/vue2/chunks/{sr_only_close_button-ZaGdAHz7.js → sr_only_close_button-2Q9Ny1Nc.js} +24 -18
  115. package/dist/vue2/chunks/{sr_only_close_button-ZaGdAHz7.js.map → sr_only_close_button-2Q9Ny1Nc.js.map} +1 -1
  116. package/dist/vue2/chunks/{sr_only_close_button-81bHIpPu.js → sr_only_close_button-IjMVfBDE.js} +24 -18
  117. package/dist/vue2/chunks/{sr_only_close_button-81bHIpPu.js.map → sr_only_close_button-IjMVfBDE.js.map} +1 -1
  118. package/dist/vue2/chunks/stack_constants-HraCekPm.js.map +1 -1
  119. package/dist/vue2/chunks/stack_constants-SMzMWnAQ.js.map +1 -1
  120. package/dist/vue2/chunks/{tab-FcsV5VmK.js → tab-79yMX6m6.js} +86 -68
  121. package/dist/vue2/chunks/{tab-V4cb44Ry.js.map → tab-79yMX6m6.js.map} +1 -1
  122. package/dist/vue2/chunks/{tab-V4cb44Ry.js → tab-muPOS7JE.js} +86 -68
  123. package/dist/vue2/chunks/{tab-FcsV5VmK.js.map → tab-muPOS7JE.js.map} +1 -1
  124. package/dist/vue2/common/constants.cjs.map +1 -1
  125. package/dist/vue2/common/constants.js.map +1 -1
  126. package/dist/vue2/common/dates.cjs +3 -1
  127. package/dist/vue2/common/dates.cjs.map +1 -1
  128. package/dist/vue2/common/dates.js +3 -1
  129. package/dist/vue2/common/dates.js.map +1 -1
  130. package/dist/vue2/common/emoji.cjs +1 -1
  131. package/dist/vue2/common/emoji.js +1 -1
  132. package/dist/vue2/common/mixins.cjs +3 -3
  133. package/dist/vue2/common/mixins.js +3 -3
  134. package/dist/vue2/common/utils.cjs +8 -44
  135. package/dist/vue2/common/utils.cjs.map +1 -1
  136. package/dist/vue2/common/utils.js +8 -44
  137. package/dist/vue2/common/utils.js.map +1 -1
  138. package/dist/vue2/common/validators.cjs.map +1 -1
  139. package/dist/vue2/common/validators.js.map +1 -1
  140. package/dist/vue2/component-documentation.json +1 -1
  141. package/dist/vue2/dialtone-vue.cjs +12 -12
  142. package/dist/vue2/dialtone-vue.js +12 -12
  143. package/dist/vue2/lib/attachment-carousel.cjs +172 -48
  144. package/dist/vue2/lib/attachment-carousel.cjs.map +1 -1
  145. package/dist/vue2/lib/attachment-carousel.js +172 -48
  146. package/dist/vue2/lib/attachment-carousel.js.map +1 -1
  147. package/dist/vue2/lib/avatar.cjs +75 -58
  148. package/dist/vue2/lib/avatar.cjs.map +1 -1
  149. package/dist/vue2/lib/avatar.js +75 -58
  150. package/dist/vue2/lib/avatar.js.map +1 -1
  151. package/dist/vue2/lib/badge.cjs +31 -20
  152. package/dist/vue2/lib/badge.cjs.map +1 -1
  153. package/dist/vue2/lib/badge.js +31 -20
  154. package/dist/vue2/lib/badge.js.map +1 -1
  155. package/dist/vue2/lib/banner.cjs +53 -29
  156. package/dist/vue2/lib/banner.cjs.map +1 -1
  157. package/dist/vue2/lib/banner.js +53 -29
  158. package/dist/vue2/lib/banner.js.map +1 -1
  159. package/dist/vue2/lib/breadcrumbs.cjs +36 -30
  160. package/dist/vue2/lib/breadcrumbs.cjs.map +1 -1
  161. package/dist/vue2/lib/breadcrumbs.js +36 -30
  162. package/dist/vue2/lib/breadcrumbs.js.map +1 -1
  163. package/dist/vue2/lib/button-group.cjs +7 -14
  164. package/dist/vue2/lib/button-group.cjs.map +1 -1
  165. package/dist/vue2/lib/button-group.js +7 -14
  166. package/dist/vue2/lib/button-group.js.map +1 -1
  167. package/dist/vue2/lib/button.cjs +55 -62
  168. package/dist/vue2/lib/button.cjs.map +1 -1
  169. package/dist/vue2/lib/button.js +55 -62
  170. package/dist/vue2/lib/button.js.map +1 -1
  171. package/dist/vue2/lib/callbar-button-with-popover.cjs +91 -23
  172. package/dist/vue2/lib/callbar-button-with-popover.cjs.map +1 -1
  173. package/dist/vue2/lib/callbar-button-with-popover.js +91 -23
  174. package/dist/vue2/lib/callbar-button-with-popover.js.map +1 -1
  175. package/dist/vue2/lib/callbar-button.cjs +49 -33
  176. package/dist/vue2/lib/callbar-button.cjs.map +1 -1
  177. package/dist/vue2/lib/callbar-button.js +49 -33
  178. package/dist/vue2/lib/callbar-button.js.map +1 -1
  179. package/dist/vue2/lib/callbox.cjs +78 -15
  180. package/dist/vue2/lib/callbox.cjs.map +1 -1
  181. package/dist/vue2/lib/callbox.js +78 -15
  182. package/dist/vue2/lib/callbox.js.map +1 -1
  183. package/dist/vue2/lib/card.cjs +16 -23
  184. package/dist/vue2/lib/card.cjs.map +1 -1
  185. package/dist/vue2/lib/card.js +16 -23
  186. package/dist/vue2/lib/card.js.map +1 -1
  187. package/dist/vue2/lib/checkbox-group.cjs +3 -15
  188. package/dist/vue2/lib/checkbox-group.cjs.map +1 -1
  189. package/dist/vue2/lib/checkbox-group.js +3 -15
  190. package/dist/vue2/lib/checkbox-group.js.map +1 -1
  191. package/dist/vue2/lib/checkbox.cjs +52 -16
  192. package/dist/vue2/lib/checkbox.cjs.map +1 -1
  193. package/dist/vue2/lib/checkbox.js +52 -16
  194. package/dist/vue2/lib/checkbox.js.map +1 -1
  195. package/dist/vue2/lib/chip.cjs +58 -26
  196. package/dist/vue2/lib/chip.cjs.map +1 -1
  197. package/dist/vue2/lib/chip.js +58 -26
  198. package/dist/vue2/lib/chip.js.map +1 -1
  199. package/dist/vue2/lib/codeblock.cjs +4 -11
  200. package/dist/vue2/lib/codeblock.cjs.map +1 -1
  201. package/dist/vue2/lib/codeblock.js +4 -11
  202. package/dist/vue2/lib/codeblock.js.map +1 -1
  203. package/dist/vue2/lib/collapsible.cjs +91 -34
  204. package/dist/vue2/lib/collapsible.cjs.map +1 -1
  205. package/dist/vue2/lib/collapsible.js +91 -34
  206. package/dist/vue2/lib/collapsible.js.map +1 -1
  207. package/dist/vue2/lib/combobox-multi-select.cjs +131 -38
  208. package/dist/vue2/lib/combobox-multi-select.cjs.map +1 -1
  209. package/dist/vue2/lib/combobox-multi-select.js +131 -38
  210. package/dist/vue2/lib/combobox-multi-select.js.map +1 -1
  211. package/dist/vue2/lib/combobox-with-popover.cjs +130 -39
  212. package/dist/vue2/lib/combobox-with-popover.cjs.map +1 -1
  213. package/dist/vue2/lib/combobox-with-popover.js +130 -39
  214. package/dist/vue2/lib/combobox-with-popover.js.map +1 -1
  215. package/dist/vue2/lib/combobox.cjs +3 -3
  216. package/dist/vue2/lib/combobox.js +3 -3
  217. package/dist/vue2/lib/contact-centers-row.cjs +86 -29
  218. package/dist/vue2/lib/contact-centers-row.cjs.map +1 -1
  219. package/dist/vue2/lib/contact-centers-row.js +86 -29
  220. package/dist/vue2/lib/contact-centers-row.js.map +1 -1
  221. package/dist/vue2/lib/contact-info.cjs +95 -24
  222. package/dist/vue2/lib/contact-info.cjs.map +1 -1
  223. package/dist/vue2/lib/contact-info.js +95 -24
  224. package/dist/vue2/lib/contact-info.js.map +1 -1
  225. package/dist/vue2/lib/contact-row.cjs +61 -18
  226. package/dist/vue2/lib/contact-row.cjs.map +1 -1
  227. package/dist/vue2/lib/contact-row.js +61 -18
  228. package/dist/vue2/lib/contact-row.js.map +1 -1
  229. package/dist/vue2/lib/datepicker.cjs +361 -102
  230. package/dist/vue2/lib/datepicker.cjs.map +1 -1
  231. package/dist/vue2/lib/datepicker.js +361 -102
  232. package/dist/vue2/lib/datepicker.js.map +1 -1
  233. package/dist/vue2/lib/description-list.cjs +11 -12
  234. package/dist/vue2/lib/description-list.cjs.map +1 -1
  235. package/dist/vue2/lib/description-list.js +11 -12
  236. package/dist/vue2/lib/description-list.js.map +1 -1
  237. package/dist/vue2/lib/dropdown.cjs +13 -17
  238. package/dist/vue2/lib/dropdown.cjs.map +1 -1
  239. package/dist/vue2/lib/dropdown.js +13 -17
  240. package/dist/vue2/lib/dropdown.js.map +1 -1
  241. package/dist/vue2/lib/editor.cjs +409 -109
  242. package/dist/vue2/lib/editor.cjs.map +1 -1
  243. package/dist/vue2/lib/editor.js +409 -109
  244. package/dist/vue2/lib/editor.js.map +1 -1
  245. package/dist/vue2/lib/emoji-picker.cjs +512 -234
  246. package/dist/vue2/lib/emoji-picker.cjs.map +1 -1
  247. package/dist/vue2/lib/emoji-picker.js +512 -234
  248. package/dist/vue2/lib/emoji-picker.js.map +1 -1
  249. package/dist/vue2/lib/emoji-row.cjs +69 -31
  250. package/dist/vue2/lib/emoji-row.cjs.map +1 -1
  251. package/dist/vue2/lib/emoji-row.js +69 -31
  252. package/dist/vue2/lib/emoji-row.js.map +1 -1
  253. package/dist/vue2/lib/emoji-text-wrapper.cjs +14 -22
  254. package/dist/vue2/lib/emoji-text-wrapper.cjs.map +1 -1
  255. package/dist/vue2/lib/emoji-text-wrapper.js +14 -22
  256. package/dist/vue2/lib/emoji-text-wrapper.js.map +1 -1
  257. package/dist/vue2/lib/emoji.cjs +40 -13
  258. package/dist/vue2/lib/emoji.cjs.map +1 -1
  259. package/dist/vue2/lib/emoji.js +40 -13
  260. package/dist/vue2/lib/emoji.js.map +1 -1
  261. package/dist/vue2/lib/empty-state.cjs +27 -12
  262. package/dist/vue2/lib/empty-state.cjs.map +1 -1
  263. package/dist/vue2/lib/empty-state.js +27 -12
  264. package/dist/vue2/lib/empty-state.js.map +1 -1
  265. package/dist/vue2/lib/feed-item-row.cjs +106 -27
  266. package/dist/vue2/lib/feed-item-row.cjs.map +1 -1
  267. package/dist/vue2/lib/feed-item-row.js +106 -27
  268. package/dist/vue2/lib/feed-item-row.js.map +1 -1
  269. package/dist/vue2/lib/feed-pill.cjs +90 -35
  270. package/dist/vue2/lib/feed-pill.cjs.map +1 -1
  271. package/dist/vue2/lib/feed-pill.js +90 -35
  272. package/dist/vue2/lib/feed-pill.js.map +1 -1
  273. package/dist/vue2/lib/general-row.cjs +184 -75
  274. package/dist/vue2/lib/general-row.cjs.map +1 -1
  275. package/dist/vue2/lib/general-row.js +184 -75
  276. package/dist/vue2/lib/general-row.js.map +1 -1
  277. package/dist/vue2/lib/group-row.cjs +27 -16
  278. package/dist/vue2/lib/group-row.cjs.map +1 -1
  279. package/dist/vue2/lib/group-row.js +27 -16
  280. package/dist/vue2/lib/group-row.js.map +1 -1
  281. package/dist/vue2/lib/grouped-chip.cjs +68 -20
  282. package/dist/vue2/lib/grouped-chip.cjs.map +1 -1
  283. package/dist/vue2/lib/grouped-chip.js +68 -20
  284. package/dist/vue2/lib/grouped-chip.js.map +1 -1
  285. package/dist/vue2/lib/hovercard.cjs +71 -41
  286. package/dist/vue2/lib/hovercard.cjs.map +1 -1
  287. package/dist/vue2/lib/hovercard.js +71 -41
  288. package/dist/vue2/lib/hovercard.js.map +1 -1
  289. package/dist/vue2/lib/icon.cjs +10 -12
  290. package/dist/vue2/lib/icon.cjs.map +1 -1
  291. package/dist/vue2/lib/icon.js +10 -12
  292. package/dist/vue2/lib/icon.js.map +1 -1
  293. package/dist/vue2/lib/illustration.cjs +9 -12
  294. package/dist/vue2/lib/illustration.cjs.map +1 -1
  295. package/dist/vue2/lib/illustration.js +9 -12
  296. package/dist/vue2/lib/illustration.js.map +1 -1
  297. package/dist/vue2/lib/image-viewer.cjs +98 -23
  298. package/dist/vue2/lib/image-viewer.cjs.map +1 -1
  299. package/dist/vue2/lib/image-viewer.js +98 -23
  300. package/dist/vue2/lib/image-viewer.js.map +1 -1
  301. package/dist/vue2/lib/input-group.cjs +24 -14
  302. package/dist/vue2/lib/input-group.cjs.map +1 -1
  303. package/dist/vue2/lib/input-group.js +24 -14
  304. package/dist/vue2/lib/input-group.js.map +1 -1
  305. package/dist/vue2/lib/input.cjs +108 -40
  306. package/dist/vue2/lib/input.cjs.map +1 -1
  307. package/dist/vue2/lib/input.js +108 -40
  308. package/dist/vue2/lib/input.js.map +1 -1
  309. package/dist/vue2/lib/item-layout.cjs +42 -11
  310. package/dist/vue2/lib/item-layout.cjs.map +1 -1
  311. package/dist/vue2/lib/item-layout.js +42 -11
  312. package/dist/vue2/lib/item-layout.js.map +1 -1
  313. package/dist/vue2/lib/ivr-node.cjs +135 -47
  314. package/dist/vue2/lib/ivr-node.cjs.map +1 -1
  315. package/dist/vue2/lib/ivr-node.js +135 -47
  316. package/dist/vue2/lib/ivr-node.js.map +1 -1
  317. package/dist/vue2/lib/keyboard-shortcut.cjs +35 -23
  318. package/dist/vue2/lib/keyboard-shortcut.cjs.map +1 -1
  319. package/dist/vue2/lib/keyboard-shortcut.js +35 -23
  320. package/dist/vue2/lib/keyboard-shortcut.js.map +1 -1
  321. package/dist/vue2/lib/lazy-show.cjs +15 -11
  322. package/dist/vue2/lib/lazy-show.cjs.map +1 -1
  323. package/dist/vue2/lib/lazy-show.js +15 -11
  324. package/dist/vue2/lib/lazy-show.js.map +1 -1
  325. package/dist/vue2/lib/link.cjs +9 -15
  326. package/dist/vue2/lib/link.cjs.map +1 -1
  327. package/dist/vue2/lib/link.js +9 -15
  328. package/dist/vue2/lib/link.js.map +1 -1
  329. package/dist/vue2/lib/list-item-group.cjs +17 -11
  330. package/dist/vue2/lib/list-item-group.cjs.map +1 -1
  331. package/dist/vue2/lib/list-item-group.js +17 -11
  332. package/dist/vue2/lib/list-item-group.js.map +1 -1
  333. package/dist/vue2/lib/list-item.cjs +42 -23
  334. package/dist/vue2/lib/list-item.cjs.map +1 -1
  335. package/dist/vue2/lib/list-item.js +42 -23
  336. package/dist/vue2/lib/list-item.js.map +1 -1
  337. package/dist/vue2/lib/message-input.cjs +367 -97
  338. package/dist/vue2/lib/message-input.cjs.map +1 -1
  339. package/dist/vue2/lib/message-input.js +367 -97
  340. package/dist/vue2/lib/message-input.js.map +1 -1
  341. package/dist/vue2/lib/modal.cjs +94 -36
  342. package/dist/vue2/lib/modal.cjs.map +1 -1
  343. package/dist/vue2/lib/modal.js +94 -36
  344. package/dist/vue2/lib/modal.js.map +1 -1
  345. package/dist/vue2/lib/notice.cjs +40 -21
  346. package/dist/vue2/lib/notice.cjs.map +1 -1
  347. package/dist/vue2/lib/notice.js +40 -21
  348. package/dist/vue2/lib/notice.js.map +1 -1
  349. package/dist/vue2/lib/pagination.cjs +81 -20
  350. package/dist/vue2/lib/pagination.cjs.map +1 -1
  351. package/dist/vue2/lib/pagination.js +81 -20
  352. package/dist/vue2/lib/pagination.js.map +1 -1
  353. package/dist/vue2/lib/popover.cjs +194 -75
  354. package/dist/vue2/lib/popover.cjs.map +1 -1
  355. package/dist/vue2/lib/popover.js +195 -76
  356. package/dist/vue2/lib/popover.js.map +1 -1
  357. package/dist/vue2/lib/presence.cjs +23 -22
  358. package/dist/vue2/lib/presence.cjs.map +1 -1
  359. package/dist/vue2/lib/presence.js +23 -22
  360. package/dist/vue2/lib/presence.js.map +1 -1
  361. package/dist/vue2/lib/radio-group.cjs +2 -11
  362. package/dist/vue2/lib/radio-group.cjs.map +1 -1
  363. package/dist/vue2/lib/radio-group.js +2 -11
  364. package/dist/vue2/lib/radio-group.js.map +1 -1
  365. package/dist/vue2/lib/radio.cjs +47 -15
  366. package/dist/vue2/lib/radio.cjs.map +1 -1
  367. package/dist/vue2/lib/radio.js +47 -15
  368. package/dist/vue2/lib/radio.js.map +1 -1
  369. package/dist/vue2/lib/rich-text-editor.cjs +340 -327
  370. package/dist/vue2/lib/rich-text-editor.cjs.map +1 -1
  371. package/dist/vue2/lib/rich-text-editor.js +340 -327
  372. package/dist/vue2/lib/rich-text-editor.js.map +1 -1
  373. package/dist/vue2/lib/root-layout.cjs +33 -15
  374. package/dist/vue2/lib/root-layout.cjs.map +1 -1
  375. package/dist/vue2/lib/root-layout.js +33 -15
  376. package/dist/vue2/lib/root-layout.js.map +1 -1
  377. package/dist/vue2/lib/scrollbar-directive.cjs.map +1 -1
  378. package/dist/vue2/lib/scrollbar-directive.js.map +1 -1
  379. package/dist/vue2/lib/select-menu.cjs +52 -33
  380. package/dist/vue2/lib/select-menu.cjs.map +1 -1
  381. package/dist/vue2/lib/select-menu.js +52 -33
  382. package/dist/vue2/lib/select-menu.js.map +1 -1
  383. package/dist/vue2/lib/settings-menu-button.cjs +42 -16
  384. package/dist/vue2/lib/settings-menu-button.cjs.map +1 -1
  385. package/dist/vue2/lib/settings-menu-button.js +42 -16
  386. package/dist/vue2/lib/settings-menu-button.js.map +1 -1
  387. package/dist/vue2/lib/skeleton.cjs +118 -93
  388. package/dist/vue2/lib/skeleton.cjs.map +1 -1
  389. package/dist/vue2/lib/skeleton.js +118 -93
  390. package/dist/vue2/lib/skeleton.js.map +1 -1
  391. package/dist/vue2/lib/split-button.cjs +164 -64
  392. package/dist/vue2/lib/split-button.cjs.map +1 -1
  393. package/dist/vue2/lib/split-button.js +164 -64
  394. package/dist/vue2/lib/split-button.js.map +1 -1
  395. package/dist/vue2/lib/stack.cjs +21 -33
  396. package/dist/vue2/lib/stack.cjs.map +1 -1
  397. package/dist/vue2/lib/stack.js +21 -33
  398. package/dist/vue2/lib/stack.js.map +1 -1
  399. package/dist/vue2/lib/tabs.cjs +20 -13
  400. package/dist/vue2/lib/tabs.cjs.map +1 -1
  401. package/dist/vue2/lib/tabs.js +20 -13
  402. package/dist/vue2/lib/tabs.js.map +1 -1
  403. package/dist/vue2/lib/time-pill.cjs +8 -11
  404. package/dist/vue2/lib/time-pill.cjs.map +1 -1
  405. package/dist/vue2/lib/time-pill.js +8 -11
  406. package/dist/vue2/lib/time-pill.js.map +1 -1
  407. package/dist/vue2/lib/toast.cjs +42 -21
  408. package/dist/vue2/lib/toast.cjs.map +1 -1
  409. package/dist/vue2/lib/toast.js +42 -21
  410. package/dist/vue2/lib/toast.js.map +1 -1
  411. package/dist/vue2/lib/toggle.cjs +28 -24
  412. package/dist/vue2/lib/toggle.cjs.map +1 -1
  413. package/dist/vue2/lib/toggle.js +28 -24
  414. package/dist/vue2/lib/toggle.js.map +1 -1
  415. package/dist/vue2/lib/tooltip-directive.cjs +32 -26
  416. package/dist/vue2/lib/tooltip-directive.cjs.map +1 -1
  417. package/dist/vue2/lib/tooltip-directive.js +32 -26
  418. package/dist/vue2/lib/tooltip-directive.js.map +1 -1
  419. package/dist/vue2/lib/tooltip.cjs +31 -21
  420. package/dist/vue2/lib/tooltip.cjs.map +1 -1
  421. package/dist/vue2/lib/tooltip.js +32 -22
  422. package/dist/vue2/lib/tooltip.js.map +1 -1
  423. package/dist/vue2/lib/top-banner-info.cjs +18 -21
  424. package/dist/vue2/lib/top-banner-info.cjs.map +1 -1
  425. package/dist/vue2/lib/top-banner-info.js +18 -21
  426. package/dist/vue2/lib/top-banner-info.js.map +1 -1
  427. package/dist/vue2/lib/unread-pill.cjs +18 -12
  428. package/dist/vue2/lib/unread-pill.cjs.map +1 -1
  429. package/dist/vue2/lib/unread-pill.js +18 -12
  430. package/dist/vue2/lib/unread-pill.js.map +1 -1
  431. package/dist/vue2/lib/validation-messages.cjs +23 -16
  432. package/dist/vue2/lib/validation-messages.cjs.map +1 -1
  433. package/dist/vue2/lib/validation-messages.js +23 -16
  434. package/dist/vue2/lib/validation-messages.js.map +1 -1
  435. package/dist/vue2/style.css +5 -0
  436. package/dist/vue2/types/common/emoji/index.d.ts +2 -59236
  437. package/dist/vue2/types/common/emoji/index.d.ts.map +1 -1
  438. package/dist/vue2/types/components/button/button.vue.d.ts +1 -1
  439. package/dist/vue2/types/components/chip/chip.vue.d.ts +1 -1
  440. package/dist/vue2/types/components/combobox/combobox.vue.d.ts +1 -1
  441. package/dist/vue2/types/components/icon/icon.vue.d.ts +2 -2
  442. package/dist/vue2/types/components/icon/icon_constants.d.ts +1 -1
  443. package/dist/vue2/types/components/icon/icon_constants.d.ts.map +1 -1
  444. package/dist/vue2/types/components/illustration/illustration.vue.d.ts +2 -2
  445. package/dist/vue2/types/components/illustration/illustration_constants.d.ts +1 -1
  446. package/dist/vue2/types/components/illustration/illustration_constants.d.ts.map +1 -1
  447. package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts +21 -0
  448. package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  449. package/dist/vue2/types/components/input/input.vue.d.ts +1 -1
  450. package/dist/vue2/types/components/modal/modal.vue.d.ts +1 -1
  451. package/dist/vue2/types/components/rich_text_editor/extensions/custom_link/custom_link.d.ts.map +1 -1
  452. package/dist/vue2/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
  453. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +5 -3
  454. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  455. package/dist/vue2/types/components/split_button/split_button-alpha.vue.d.ts +1 -1
  456. package/dist/vue2/types/components/toast/toast.vue.d.ts +1 -1
  457. package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts +1 -1
  458. package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -1
  459. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +1 -1
  460. package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
  461. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  462. package/dist/vue3/chunks/{dropdown-oA-_Gotg.js → dropdown-6HXkh24e.js} +40 -45
  463. package/dist/vue3/chunks/{dropdown-p-Azgwov.js.map → dropdown-6HXkh24e.js.map} +1 -1
  464. package/dist/vue3/chunks/{dropdown-p-Azgwov.js → dropdown-QNvAb160.js} +40 -45
  465. package/dist/vue3/chunks/{dropdown-oA-_Gotg.js.map → dropdown-QNvAb160.js.map} +1 -1
  466. package/dist/vue3/chunks/dropdown_constants-2pGCXy7m.js.map +1 -1
  467. package/dist/vue3/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -1
  468. package/dist/vue3/chunks/{icon_constants-QYpmdE0R.js → icon_constants-bvhFNOPu.js} +3 -2
  469. package/dist/vue3/chunks/icon_constants-bvhFNOPu.js.map +1 -0
  470. package/dist/vue3/chunks/{icon_constants-Dy4MEUJL.js → icon_constants-gIQj4mf7.js} +3 -2
  471. package/dist/vue3/chunks/icon_constants-gIQj4mf7.js.map +1 -0
  472. package/dist/vue3/chunks/{index-b_MgDylR.js → index-T15rAIdX.js} +71 -84
  473. package/dist/vue3/chunks/{index-4qgKeErp.js.map → index-T15rAIdX.js.map} +1 -1
  474. package/dist/vue3/chunks/{index-GVD15GIB.js → index-dfdrE-3M.js} +3 -12
  475. package/dist/vue3/chunks/{index-GVD15GIB.js.map → index-dfdrE-3M.js.map} +1 -1
  476. package/dist/vue3/chunks/{index-lu2o2f4r.js → index-fEp0B-5Z.js} +3 -12
  477. package/dist/vue3/chunks/{index-lu2o2f4r.js.map → index-fEp0B-5Z.js.map} +1 -1
  478. package/dist/vue3/chunks/{index-4qgKeErp.js → index-ouh7Bvm-.js} +71 -84
  479. package/dist/vue3/chunks/{index-b_MgDylR.js.map → index-ouh7Bvm-.js.map} +1 -1
  480. package/dist/vue3/chunks/{input-NmYDD5bn.js → input-HIysg24t.js} +3 -9
  481. package/dist/vue3/chunks/{input-NmYDD5bn.js.map → input-HIysg24t.js.map} +1 -1
  482. package/dist/vue3/chunks/{input-ttnte8zB.js → input-dLLo3Wtg.js} +3 -9
  483. package/dist/vue3/chunks/{input-ttnte8zB.js.map → input-dLLo3Wtg.js.map} +1 -1
  484. package/dist/vue3/chunks/{input_group-jWnq2DJT.js → input_group-hV1WT2it.js} +4 -2
  485. package/dist/vue3/chunks/{input_group-jWnq2DJT.js.map → input_group-hV1WT2it.js.map} +1 -1
  486. package/dist/vue3/chunks/{input_group-M-D25pOJ.js → input_group-rE6nhye8.js} +4 -2
  487. package/dist/vue3/chunks/{input_group-M-D25pOJ.js.map → input_group-rE6nhye8.js.map} +1 -1
  488. package/dist/vue3/chunks/{keyboard_list_navigation-ScXhrxya.js → keyboard_list_navigation-YIqTuw1W.js} +6 -5
  489. package/dist/{vue2/chunks/keyboard_list_navigation-fJnl_Iox.js.map → vue3/chunks/keyboard_list_navigation-YIqTuw1W.js.map} +1 -1
  490. package/dist/vue3/chunks/{keyboard_list_navigation-fJnl_Iox.js → keyboard_list_navigation-x3D6RcC7.js} +6 -5
  491. package/dist/vue3/chunks/{keyboard_list_navigation-ScXhrxya.js.map → keyboard_list_navigation-x3D6RcC7.js.map} +1 -1
  492. package/dist/vue3/chunks/link_constants-AfTWrr-n.js.map +1 -1
  493. package/dist/vue3/chunks/link_constants-x8NwdqmA.js.map +1 -1
  494. package/dist/vue3/chunks/list_item_constants-EiqkqZvP.js.map +1 -1
  495. package/dist/vue3/chunks/list_item_constants-u1xcN9Dd.js.map +1 -1
  496. package/dist/vue3/chunks/{modal-XOr4kiNZ.js → modal-8X6poIZW.js} +4 -2
  497. package/dist/vue3/chunks/{modal-VgxXAQFP.js.map → modal-8X6poIZW.js.map} +1 -1
  498. package/dist/vue3/chunks/{modal-VgxXAQFP.js → modal-OaWxzqNt.js} +4 -2
  499. package/dist/{vue2/chunks/modal-XOr4kiNZ.js.map → vue3/chunks/modal-OaWxzqNt.js.map} +1 -1
  500. package/dist/vue3/chunks/{notice_action-WTucGhvr.js → notice_action-3ed0uIMN.js} +40 -61
  501. package/dist/vue3/chunks/{notice_action-p-ePanW_.js.map → notice_action-3ed0uIMN.js.map} +1 -1
  502. package/dist/vue3/chunks/{notice_action-p-ePanW_.js → notice_action-e08Lw5W6.js} +40 -61
  503. package/dist/vue3/chunks/{notice_action-WTucGhvr.js.map → notice_action-e08Lw5W6.js.map} +1 -1
  504. package/dist/vue3/chunks/notice_constants-7Qt2CQEY.js.map +1 -1
  505. package/dist/vue3/chunks/notice_constants-UXo9e3bS.js.map +1 -1
  506. package/dist/vue3/chunks/{popover_constants-WsOUIY-m.js → popover_constants-6YkPPbnk.js} +26 -47
  507. package/dist/{vue2/chunks/popover_constants-XnGWXaxX.js.map → vue3/chunks/popover_constants-6YkPPbnk.js.map} +1 -1
  508. package/dist/vue3/chunks/{popover_constants-XnGWXaxX.js → popover_constants-h9MD6WUt.js} +26 -47
  509. package/dist/vue3/chunks/{popover_constants-XnGWXaxX.js.map → popover_constants-h9MD6WUt.js.map} +1 -1
  510. package/dist/vue3/chunks/{sr_only_close_button-3EdsV-dH.js → sr_only_close_button-Ji3Zlts6.js} +4 -4
  511. package/dist/vue3/chunks/{sr_only_close_button-3EdsV-dH.js.map → sr_only_close_button-Ji3Zlts6.js.map} +1 -1
  512. package/dist/vue3/chunks/{sr_only_close_button-xGrHFjwA.js → sr_only_close_button-gKr0Vlbz.js} +4 -4
  513. package/dist/vue3/chunks/{sr_only_close_button-xGrHFjwA.js.map → sr_only_close_button-gKr0Vlbz.js.map} +1 -1
  514. package/dist/vue3/chunks/stack_constants-HraCekPm.js.map +1 -1
  515. package/dist/vue3/chunks/stack_constants-SMzMWnAQ.js.map +1 -1
  516. package/dist/vue3/chunks/{tab-qc3f42Yp.js → tab-X7IvNGTl.js} +46 -49
  517. package/dist/vue3/chunks/{tab-qc3f42Yp.js.map → tab-X7IvNGTl.js.map} +1 -1
  518. package/dist/vue3/chunks/{tab-RTDgnD9-.js → tab-aD6t0MNo.js} +46 -49
  519. package/dist/vue3/chunks/{tab-RTDgnD9-.js.map → tab-aD6t0MNo.js.map} +1 -1
  520. package/dist/vue3/common/constants.cjs.map +1 -1
  521. package/dist/vue3/common/constants.js.map +1 -1
  522. package/dist/vue3/common/dates.cjs +3 -1
  523. package/dist/vue3/common/dates.cjs.map +1 -1
  524. package/dist/vue3/common/dates.js +3 -1
  525. package/dist/vue3/common/dates.js.map +1 -1
  526. package/dist/vue3/common/emoji.cjs +1 -1
  527. package/dist/vue3/common/emoji.js +1 -1
  528. package/dist/vue3/common/mixins.cjs +3 -3
  529. package/dist/vue3/common/mixins.js +3 -3
  530. package/dist/vue3/common/utils.cjs +11 -45
  531. package/dist/vue3/common/utils.cjs.map +1 -1
  532. package/dist/vue3/common/utils.js +11 -45
  533. package/dist/vue3/common/utils.js.map +1 -1
  534. package/dist/vue3/common/validators.cjs.map +1 -1
  535. package/dist/vue3/common/validators.js.map +1 -1
  536. package/dist/vue3/component-documentation.json +1 -1
  537. package/dist/vue3/dialtone-vue.cjs +12 -12
  538. package/dist/vue3/dialtone-vue.js +12 -12
  539. package/dist/vue3/lib/attachment-carousel.cjs +87 -108
  540. package/dist/vue3/lib/attachment-carousel.cjs.map +1 -1
  541. package/dist/vue3/lib/attachment-carousel.js +87 -108
  542. package/dist/vue3/lib/attachment-carousel.js.map +1 -1
  543. package/dist/vue3/lib/avatar.cjs +56 -88
  544. package/dist/vue3/lib/avatar.cjs.map +1 -1
  545. package/dist/vue3/lib/avatar.js +56 -88
  546. package/dist/vue3/lib/avatar.js.map +1 -1
  547. package/dist/vue3/lib/badge.cjs +15 -31
  548. package/dist/vue3/lib/badge.cjs.map +1 -1
  549. package/dist/vue3/lib/badge.js +15 -31
  550. package/dist/vue3/lib/badge.js.map +1 -1
  551. package/dist/vue3/lib/banner.cjs +38 -56
  552. package/dist/vue3/lib/banner.cjs.map +1 -1
  553. package/dist/vue3/lib/banner.js +38 -56
  554. package/dist/vue3/lib/banner.js.map +1 -1
  555. package/dist/vue3/lib/breadcrumbs.cjs +25 -36
  556. package/dist/vue3/lib/breadcrumbs.cjs.map +1 -1
  557. package/dist/vue3/lib/breadcrumbs.js +25 -36
  558. package/dist/vue3/lib/breadcrumbs.js.map +1 -1
  559. package/dist/vue3/lib/button-group.cjs +2 -7
  560. package/dist/vue3/lib/button-group.cjs.map +1 -1
  561. package/dist/vue3/lib/button-group.js +2 -7
  562. package/dist/vue3/lib/button-group.js.map +1 -1
  563. package/dist/vue3/lib/button.cjs +44 -69
  564. package/dist/vue3/lib/button.cjs.map +1 -1
  565. package/dist/vue3/lib/button.js +44 -69
  566. package/dist/vue3/lib/button.js.map +1 -1
  567. package/dist/vue3/lib/callbar-button-with-popover.cjs +68 -81
  568. package/dist/vue3/lib/callbar-button-with-popover.cjs.map +1 -1
  569. package/dist/vue3/lib/callbar-button-with-popover.js +68 -81
  570. package/dist/vue3/lib/callbar-button-with-popover.js.map +1 -1
  571. package/dist/vue3/lib/callbar-button.cjs +32 -45
  572. package/dist/vue3/lib/callbar-button.cjs.map +1 -1
  573. package/dist/vue3/lib/callbar-button.js +32 -45
  574. package/dist/vue3/lib/callbar-button.js.map +1 -1
  575. package/dist/vue3/lib/callbox.cjs +38 -57
  576. package/dist/vue3/lib/callbox.cjs.map +1 -1
  577. package/dist/vue3/lib/callbox.js +38 -57
  578. package/dist/vue3/lib/callbox.js.map +1 -1
  579. package/dist/vue3/lib/card.cjs +13 -33
  580. package/dist/vue3/lib/card.cjs.map +1 -1
  581. package/dist/vue3/lib/card.js +13 -33
  582. package/dist/vue3/lib/card.js.map +1 -1
  583. package/dist/vue3/lib/checkbox-group.cjs +2 -5
  584. package/dist/vue3/lib/checkbox-group.cjs.map +1 -1
  585. package/dist/vue3/lib/checkbox-group.js +2 -5
  586. package/dist/vue3/lib/checkbox-group.js.map +1 -1
  587. package/dist/vue3/lib/checkbox.cjs +41 -45
  588. package/dist/vue3/lib/checkbox.cjs.map +1 -1
  589. package/dist/vue3/lib/checkbox.js +41 -45
  590. package/dist/vue3/lib/checkbox.js.map +1 -1
  591. package/dist/vue3/lib/chip.cjs +38 -53
  592. package/dist/vue3/lib/chip.cjs.map +1 -1
  593. package/dist/vue3/lib/chip.js +38 -53
  594. package/dist/vue3/lib/chip.js.map +1 -1
  595. package/dist/vue3/lib/codeblock.cjs +4 -6
  596. package/dist/vue3/lib/codeblock.cjs.map +1 -1
  597. package/dist/vue3/lib/codeblock.js +4 -6
  598. package/dist/vue3/lib/codeblock.js.map +1 -1
  599. package/dist/vue3/lib/collapsible.cjs +62 -76
  600. package/dist/vue3/lib/collapsible.cjs.map +1 -1
  601. package/dist/vue3/lib/collapsible.js +62 -76
  602. package/dist/vue3/lib/collapsible.js.map +1 -1
  603. package/dist/vue3/lib/combobox-multi-select.cjs +75 -88
  604. package/dist/vue3/lib/combobox-multi-select.cjs.map +1 -1
  605. package/dist/vue3/lib/combobox-multi-select.js +75 -88
  606. package/dist/vue3/lib/combobox-multi-select.js.map +1 -1
  607. package/dist/vue3/lib/combobox-with-popover.cjs +77 -85
  608. package/dist/vue3/lib/combobox-with-popover.cjs.map +1 -1
  609. package/dist/vue3/lib/combobox-with-popover.js +77 -85
  610. package/dist/vue3/lib/combobox-with-popover.js.map +1 -1
  611. package/dist/vue3/lib/combobox.cjs +3 -3
  612. package/dist/vue3/lib/combobox.js +3 -3
  613. package/dist/vue3/lib/contact-centers-row.cjs +65 -89
  614. package/dist/vue3/lib/contact-centers-row.cjs.map +1 -1
  615. package/dist/vue3/lib/contact-centers-row.js +65 -89
  616. package/dist/vue3/lib/contact-centers-row.js.map +1 -1
  617. package/dist/vue3/lib/contact-info.cjs +58 -73
  618. package/dist/vue3/lib/contact-info.cjs.map +1 -1
  619. package/dist/vue3/lib/contact-info.js +58 -73
  620. package/dist/vue3/lib/contact-info.js.map +1 -1
  621. package/dist/vue3/lib/contact-row.cjs +37 -47
  622. package/dist/vue3/lib/contact-row.cjs.map +1 -1
  623. package/dist/vue3/lib/contact-row.js +37 -47
  624. package/dist/vue3/lib/contact-row.js.map +1 -1
  625. package/dist/vue3/lib/datepicker.cjs +267 -263
  626. package/dist/vue3/lib/datepicker.cjs.map +1 -1
  627. package/dist/vue3/lib/datepicker.js +267 -263
  628. package/dist/vue3/lib/datepicker.js.map +1 -1
  629. package/dist/vue3/lib/description-list.cjs +9 -14
  630. package/dist/vue3/lib/description-list.cjs.map +1 -1
  631. package/dist/vue3/lib/description-list.js +9 -14
  632. package/dist/vue3/lib/description-list.js.map +1 -1
  633. package/dist/vue3/lib/dropdown.cjs +6 -6
  634. package/dist/vue3/lib/dropdown.cjs.map +1 -1
  635. package/dist/vue3/lib/dropdown.js +6 -6
  636. package/dist/vue3/lib/dropdown.js.map +1 -1
  637. package/dist/vue3/lib/editor.cjs +312 -249
  638. package/dist/vue3/lib/editor.cjs.map +1 -1
  639. package/dist/vue3/lib/editor.js +312 -249
  640. package/dist/vue3/lib/editor.js.map +1 -1
  641. package/dist/vue3/lib/emoji-picker.cjs +387 -419
  642. package/dist/vue3/lib/emoji-picker.cjs.map +1 -1
  643. package/dist/vue3/lib/emoji-picker.js +387 -419
  644. package/dist/vue3/lib/emoji-picker.js.map +1 -1
  645. package/dist/vue3/lib/emoji-row.cjs +59 -69
  646. package/dist/vue3/lib/emoji-row.cjs.map +1 -1
  647. package/dist/vue3/lib/emoji-row.js +59 -69
  648. package/dist/vue3/lib/emoji-row.js.map +1 -1
  649. package/dist/vue3/lib/emoji-text-wrapper.cjs +13 -12
  650. package/dist/vue3/lib/emoji-text-wrapper.cjs.map +1 -1
  651. package/dist/vue3/lib/emoji-text-wrapper.js +13 -12
  652. package/dist/vue3/lib/emoji-text-wrapper.js.map +1 -1
  653. package/dist/vue3/lib/emoji.cjs +19 -23
  654. package/dist/vue3/lib/emoji.cjs.map +1 -1
  655. package/dist/vue3/lib/emoji.js +19 -23
  656. package/dist/vue3/lib/emoji.js.map +1 -1
  657. package/dist/vue3/lib/empty-state.cjs +20 -30
  658. package/dist/vue3/lib/empty-state.cjs.map +1 -1
  659. package/dist/vue3/lib/empty-state.js +20 -30
  660. package/dist/vue3/lib/empty-state.js.map +1 -1
  661. package/dist/vue3/lib/feed-item-row.cjs +43 -74
  662. package/dist/vue3/lib/feed-item-row.cjs.map +1 -1
  663. package/dist/vue3/lib/feed-item-row.js +43 -74
  664. package/dist/vue3/lib/feed-item-row.js.map +1 -1
  665. package/dist/vue3/lib/feed-pill.cjs +45 -55
  666. package/dist/vue3/lib/feed-pill.cjs.map +1 -1
  667. package/dist/vue3/lib/feed-pill.js +45 -55
  668. package/dist/vue3/lib/feed-pill.js.map +1 -1
  669. package/dist/vue3/lib/general-row.cjs +115 -165
  670. package/dist/vue3/lib/general-row.cjs.map +1 -1
  671. package/dist/vue3/lib/general-row.js +115 -165
  672. package/dist/vue3/lib/general-row.js.map +1 -1
  673. package/dist/vue3/lib/group-row.cjs +7 -9
  674. package/dist/vue3/lib/group-row.cjs.map +1 -1
  675. package/dist/vue3/lib/group-row.js +7 -9
  676. package/dist/vue3/lib/group-row.js.map +1 -1
  677. package/dist/vue3/lib/grouped-chip.cjs +27 -48
  678. package/dist/vue3/lib/grouped-chip.cjs.map +1 -1
  679. package/dist/vue3/lib/grouped-chip.js +27 -48
  680. package/dist/vue3/lib/grouped-chip.js.map +1 -1
  681. package/dist/vue3/lib/hovercard.cjs +25 -33
  682. package/dist/vue3/lib/hovercard.cjs.map +1 -1
  683. package/dist/vue3/lib/hovercard.js +25 -33
  684. package/dist/vue3/lib/hovercard.js.map +1 -1
  685. package/dist/vue3/lib/icon.cjs +1 -1
  686. package/dist/vue3/lib/icon.cjs.map +1 -1
  687. package/dist/vue3/lib/icon.js +1 -1
  688. package/dist/vue3/lib/icon.js.map +1 -1
  689. package/dist/vue3/lib/illustration.cjs +2 -1
  690. package/dist/vue3/lib/illustration.cjs.map +1 -1
  691. package/dist/vue3/lib/illustration.js +2 -1
  692. package/dist/vue3/lib/illustration.js.map +1 -1
  693. package/dist/vue3/lib/image-viewer.cjs +62 -66
  694. package/dist/vue3/lib/image-viewer.cjs.map +1 -1
  695. package/dist/vue3/lib/image-viewer.js +62 -66
  696. package/dist/vue3/lib/image-viewer.js.map +1 -1
  697. package/dist/vue3/lib/input-group.cjs +15 -19
  698. package/dist/vue3/lib/input-group.cjs.map +1 -1
  699. package/dist/vue3/lib/input-group.js +15 -19
  700. package/dist/vue3/lib/input-group.js.map +1 -1
  701. package/dist/vue3/lib/input.cjs +76 -104
  702. package/dist/vue3/lib/input.cjs.map +1 -1
  703. package/dist/vue3/lib/input.js +76 -104
  704. package/dist/vue3/lib/input.js.map +1 -1
  705. package/dist/vue3/lib/item-layout.cjs +10 -27
  706. package/dist/vue3/lib/item-layout.cjs.map +1 -1
  707. package/dist/vue3/lib/item-layout.js +10 -27
  708. package/dist/vue3/lib/item-layout.js.map +1 -1
  709. package/dist/vue3/lib/ivr-node.cjs +80 -89
  710. package/dist/vue3/lib/ivr-node.cjs.map +1 -1
  711. package/dist/vue3/lib/ivr-node.js +80 -89
  712. package/dist/vue3/lib/ivr-node.js.map +1 -1
  713. package/dist/vue3/lib/keyboard-shortcut.cjs +26 -31
  714. package/dist/vue3/lib/keyboard-shortcut.cjs.map +1 -1
  715. package/dist/vue3/lib/keyboard-shortcut.js +26 -31
  716. package/dist/vue3/lib/keyboard-shortcut.js.map +1 -1
  717. package/dist/vue3/lib/lazy-show.cjs +6 -8
  718. package/dist/vue3/lib/lazy-show.cjs.map +1 -1
  719. package/dist/vue3/lib/lazy-show.js +6 -8
  720. package/dist/vue3/lib/lazy-show.js.map +1 -1
  721. package/dist/vue3/lib/link.cjs +2 -7
  722. package/dist/vue3/lib/link.cjs.map +1 -1
  723. package/dist/vue3/lib/link.js +2 -7
  724. package/dist/vue3/lib/link.js.map +1 -1
  725. package/dist/vue3/lib/list-item-group.cjs +7 -14
  726. package/dist/vue3/lib/list-item-group.cjs.map +1 -1
  727. package/dist/vue3/lib/list-item-group.js +7 -14
  728. package/dist/vue3/lib/list-item-group.js.map +1 -1
  729. package/dist/vue3/lib/list-item.cjs +24 -25
  730. package/dist/vue3/lib/list-item.cjs.map +1 -1
  731. package/dist/vue3/lib/list-item.js +24 -25
  732. package/dist/vue3/lib/list-item.js.map +1 -1
  733. package/dist/vue3/lib/message-input.cjs +239 -277
  734. package/dist/vue3/lib/message-input.cjs.map +1 -1
  735. package/dist/vue3/lib/message-input.js +240 -278
  736. package/dist/vue3/lib/message-input.js.map +1 -1
  737. package/dist/vue3/lib/modal.cjs +59 -99
  738. package/dist/vue3/lib/modal.cjs.map +1 -1
  739. package/dist/vue3/lib/modal.js +59 -99
  740. package/dist/vue3/lib/modal.js.map +1 -1
  741. package/dist/vue3/lib/notice.cjs +33 -46
  742. package/dist/vue3/lib/notice.cjs.map +1 -1
  743. package/dist/vue3/lib/notice.js +33 -46
  744. package/dist/vue3/lib/notice.js.map +1 -1
  745. package/dist/vue3/lib/pagination.cjs +49 -61
  746. package/dist/vue3/lib/pagination.cjs.map +1 -1
  747. package/dist/vue3/lib/pagination.js +49 -61
  748. package/dist/vue3/lib/pagination.js.map +1 -1
  749. package/dist/vue3/lib/popover.cjs +133 -156
  750. package/dist/vue3/lib/popover.cjs.map +1 -1
  751. package/dist/vue3/lib/popover.js +134 -157
  752. package/dist/vue3/lib/popover.js.map +1 -1
  753. package/dist/vue3/lib/presence.cjs +9 -17
  754. package/dist/vue3/lib/presence.cjs.map +1 -1
  755. package/dist/vue3/lib/presence.js +9 -17
  756. package/dist/vue3/lib/presence.js.map +1 -1
  757. package/dist/vue3/lib/radio-group.cjs +1 -1
  758. package/dist/vue3/lib/radio-group.cjs.map +1 -1
  759. package/dist/vue3/lib/radio-group.js +1 -1
  760. package/dist/vue3/lib/radio-group.js.map +1 -1
  761. package/dist/vue3/lib/radio.cjs +34 -41
  762. package/dist/vue3/lib/radio.cjs.map +1 -1
  763. package/dist/vue3/lib/radio.js +34 -41
  764. package/dist/vue3/lib/radio.js.map +1 -1
  765. package/dist/vue3/lib/rich-text-editor.cjs +297 -298
  766. package/dist/vue3/lib/rich-text-editor.cjs.map +1 -1
  767. package/dist/vue3/lib/rich-text-editor.js +297 -298
  768. package/dist/vue3/lib/rich-text-editor.js.map +1 -1
  769. package/dist/vue3/lib/root-layout.cjs +24 -39
  770. package/dist/vue3/lib/root-layout.cjs.map +1 -1
  771. package/dist/vue3/lib/root-layout.js +24 -39
  772. package/dist/vue3/lib/root-layout.js.map +1 -1
  773. package/dist/vue3/lib/scrollbar-directive.cjs.map +1 -1
  774. package/dist/vue3/lib/scrollbar-directive.js.map +1 -1
  775. package/dist/vue3/lib/scroller.cjs +100 -83
  776. package/dist/vue3/lib/scroller.cjs.map +1 -1
  777. package/dist/vue3/lib/scroller.js +100 -83
  778. package/dist/vue3/lib/scroller.js.map +1 -1
  779. package/dist/vue3/lib/select-menu.cjs +40 -67
  780. package/dist/vue3/lib/select-menu.cjs.map +1 -1
  781. package/dist/vue3/lib/select-menu.js +40 -67
  782. package/dist/vue3/lib/select-menu.js.map +1 -1
  783. package/dist/vue3/lib/settings-menu-button.cjs +10 -16
  784. package/dist/vue3/lib/settings-menu-button.cjs.map +1 -1
  785. package/dist/vue3/lib/settings-menu-button.js +10 -16
  786. package/dist/vue3/lib/settings-menu-button.js.map +1 -1
  787. package/dist/vue3/lib/skeleton.cjs +74 -93
  788. package/dist/vue3/lib/skeleton.cjs.map +1 -1
  789. package/dist/vue3/lib/skeleton.js +74 -93
  790. package/dist/vue3/lib/skeleton.js.map +1 -1
  791. package/dist/vue3/lib/split-button.cjs +68 -74
  792. package/dist/vue3/lib/split-button.cjs.map +1 -1
  793. package/dist/vue3/lib/split-button.js +68 -74
  794. package/dist/vue3/lib/split-button.js.map +1 -1
  795. package/dist/vue3/lib/stack.cjs +18 -26
  796. package/dist/vue3/lib/stack.cjs.map +1 -1
  797. package/dist/vue3/lib/stack.js +18 -26
  798. package/dist/vue3/lib/stack.js.map +1 -1
  799. package/dist/vue3/lib/tabs.cjs +3 -7
  800. package/dist/vue3/lib/tabs.cjs.map +1 -1
  801. package/dist/vue3/lib/tabs.js +3 -7
  802. package/dist/vue3/lib/tabs.js.map +1 -1
  803. package/dist/vue3/lib/time-pill.cjs.map +1 -1
  804. package/dist/vue3/lib/time-pill.js.map +1 -1
  805. package/dist/vue3/lib/toast.cjs +35 -51
  806. package/dist/vue3/lib/toast.cjs.map +1 -1
  807. package/dist/vue3/lib/toast.js +35 -51
  808. package/dist/vue3/lib/toast.js.map +1 -1
  809. package/dist/vue3/lib/toggle.cjs +24 -34
  810. package/dist/vue3/lib/toggle.cjs.map +1 -1
  811. package/dist/vue3/lib/toggle.js +24 -34
  812. package/dist/vue3/lib/toggle.js.map +1 -1
  813. package/dist/vue3/lib/tooltip-directive.cjs +26 -19
  814. package/dist/vue3/lib/tooltip-directive.cjs.map +1 -1
  815. package/dist/vue3/lib/tooltip-directive.js +26 -19
  816. package/dist/vue3/lib/tooltip-directive.js.map +1 -1
  817. package/dist/vue3/lib/tooltip.cjs +21 -32
  818. package/dist/vue3/lib/tooltip.cjs.map +1 -1
  819. package/dist/vue3/lib/tooltip.js +22 -33
  820. package/dist/vue3/lib/tooltip.js.map +1 -1
  821. package/dist/vue3/lib/top-banner-info.cjs +8 -23
  822. package/dist/vue3/lib/top-banner-info.cjs.map +1 -1
  823. package/dist/vue3/lib/top-banner-info.js +8 -23
  824. package/dist/vue3/lib/top-banner-info.js.map +1 -1
  825. package/dist/vue3/lib/unread-pill.cjs +8 -11
  826. package/dist/vue3/lib/unread-pill.cjs.map +1 -1
  827. package/dist/vue3/lib/unread-pill.js +8 -11
  828. package/dist/vue3/lib/unread-pill.js.map +1 -1
  829. package/dist/vue3/lib/validation-messages.cjs +14 -17
  830. package/dist/vue3/lib/validation-messages.cjs.map +1 -1
  831. package/dist/vue3/lib/validation-messages.js +14 -17
  832. package/dist/vue3/lib/validation-messages.js.map +1 -1
  833. package/dist/vue3/style.css +5 -0
  834. package/dist/vue3/types/components/button/button.vue.d.ts +1 -1
  835. package/dist/vue3/types/components/chip/chip.vue.d.ts +1 -1
  836. package/dist/vue3/types/components/combobox/combobox.vue.d.ts +1 -1
  837. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +1 -1
  838. package/dist/vue3/types/components/icon/icon.vue.d.ts +2 -2
  839. package/dist/vue3/types/components/icon/icon_constants.d.ts +1 -1
  840. package/dist/vue3/types/components/icon/icon_constants.d.ts.map +1 -1
  841. package/dist/vue3/types/components/illustration/illustration_constants.d.ts +1 -1
  842. package/dist/vue3/types/components/illustration/illustration_constants.d.ts.map +1 -1
  843. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts +21 -0
  844. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  845. package/dist/vue3/types/components/input/input.vue.d.ts +1 -1
  846. package/dist/vue3/types/components/modal/modal.vue.d.ts +1 -1
  847. package/dist/vue3/types/components/notice/notice.vue.d.ts +1 -1
  848. package/dist/vue3/types/components/radio/radio.vue.d.ts +1 -1
  849. package/dist/vue3/types/components/rich_text_editor/extensions/custom_link/custom_link.d.ts.map +1 -1
  850. package/dist/vue3/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
  851. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +5 -3
  852. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  853. package/dist/vue3/types/components/scroller/modules/scroller_item.vue.d.ts +1 -1
  854. package/dist/vue3/types/components/split_button/split_button-alpha.vue.d.ts +1 -1
  855. package/dist/vue3/types/components/tabs/tab.vue.d.ts +1 -1
  856. package/dist/vue3/types/components/toast/toast.vue.d.ts +2 -2
  857. package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts +1 -1
  858. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -1
  859. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +1 -1
  860. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
  861. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  862. package/package.json +3 -3
  863. package/dist/chunks/tokens-base-dark-BC3U5KoN.js +0 -4
  864. package/dist/chunks/tokens-base-dark-zbBpWlfP.js +0 -1
  865. package/dist/chunks/tokens-base-light-PCrr7t8W.js +0 -4
  866. package/dist/chunks/tokens-base-light-dvWvBHbM.js +0 -1
  867. package/dist/vue2/chunks/icon_constants-Dy4MEUJL.js.map +0 -1
  868. package/dist/vue2/chunks/icon_constants-QYpmdE0R.js.map +0 -1
  869. package/dist/vue3/chunks/icon_constants-Dy4MEUJL.js.map +0 -1
  870. package/dist/vue3/chunks/icon_constants-QYpmdE0R.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dates.cjs","sources":["../../common/dates/index.js"],"sourcesContent":["import {\n format,\n formatDuration,\n intervalToDuration,\n formatDistance,\n isToday,\n isYesterday,\n isThisWeek,\n isThisYear,\n} from 'date-fns';\nimport { capitalizeFirstLetter } from '../utils';\n\nlet dialtoneLocale;\n\n// Base functions just wrap core date-fns functions, but this allows us to do checks and set default options.\n\nfunction _baseFormat (date, formatString) {\n _checkLocaleSet();\n return format(date, formatString, {\n locale: dialtoneLocale,\n });\n}\n\nfunction _baseFormatDuration (duration, formatString) {\n _checkLocaleSet();\n return formatDuration(duration, {\n locale: dialtoneLocale,\n format: formatString,\n });\n}\n\nfunction _baseFormatDistance (date, baseDate) {\n _checkLocaleSet();\n return formatDistance(date, baseDate, {\n locale: dialtoneLocale,\n });\n}\n\nfunction _isLocaleSet () {\n return dialtoneLocale !== undefined;\n}\n\nfunction _checkLocaleSet () {\n if (!_isLocaleSet()) {\n throw new Error('Locale not set, please call setDateLocale(locale) and pass ' +\n 'in a datefns locale object as the locale param before calling this function');\n }\n}\n\n/**\n * Sets the locale for date-fns. This should be called before any date-fns functions are called.\n * @param {Locale} locale A date-fns locale object\n */\nexport function setDateLocale (locale) {\n dialtoneLocale = locale;\n}\n\n/**\n * This formats a date to the Dialtone standard medium date format as shown here:\n * https://dialtone.dialpad.com/guides/writing-guidelines/#formats-by-length\n * @param {Date} date A javascript date object\n * @returns {string} A string in the format of 'September 2, 2022'\n */\nexport function getDateMedium (date) {\n return _baseFormat(date, 'MMMM d, y');\n}\n\n/**\n * Converts a call duration in total number of seconds to a human readable string\n * such as 'less than a minute' or '4 hours 34 minutes'.\n * @param {number} durationInSeconds The duration of the call in seconds\n * @returns {string} A human readable string representing the duration of the call\n */\nexport function durationInHHMM (durationInSeconds) {\n if (durationInSeconds < 60) {\n // returns 'less than a minute', we're doing it like this instead of returning a string\n // so datefns handles i18n.\n return _baseFormatDistance(0, 29 * 1000);\n }\n const duration = intervalToDuration({\n start: 0,\n end: durationInSeconds * 1000,\n });\n return _baseFormatDuration(duration, ['hours', 'minutes']);\n}\n\n/**\n * gets the human readable name of the day relative to the current time. For example, if you pass in -1 it will\n * say \"Yesterday\" if you pass in 0 it will say \"Today\", if you pass in 1 it will say \"Tomorrow\".\n * @param {number} days The number of days relative to the current time\n * @returns {string} A human readable string representing the distance between the date and now\n */\nfunction _getRelativeDaysText (days) {\n const rtl = new Intl.RelativeTimeFormat(dialtoneLocale.code, { numeric: 'auto' });\n return capitalizeFirstLetter(rtl.formatToParts(days, 'day')[0].value, dialtoneLocale.code);\n}\n\n/**\n * Returns the distance between the passed in date and now in a human readable format, typically used\n * when showing a history of items in a log such as a feed list.\n *\n * datefns does not support 'today' and 'yesterday' without showing time so we use Intl for these cases.\n *\n * examples below to explain\n * the different potential formats:\n *\n * If current day:\n * Today\n *\n * If previous day:\n * Yesterday\n *\n * Older than yesterday, but in the same calendar week:\n * Monday\n *\n * Older than the most recent calendar week, but in the same year:\n * Monday, October 14\n *\n * older than a calendar year:\n * October 14, 2022\n *\n *\n * @param {Date} date The timestamp of the item's date\n * @returns {string} A human readable string representing the distance between the date and now\n */\nexport function relativeDate (date) {\n if (isToday(date)) {\n return _getRelativeDaysText(0);\n } else if (isYesterday(date)) {\n return _getRelativeDaysText(-1);\n } else if (isThisWeek(date)) {\n return _baseFormat(date, 'EEEE');\n } else if (isThisYear(date)) {\n return _baseFormat(date, 'EEEE, MMMM d');\n } else {\n return _baseFormat(date, 'MMMM d, y');\n }\n}\n"],"names":["format","formatDuration","formatDistance","intervalToDuration","capitalizeFirstLetter","isToday","isYesterday","isThisWeek","isTh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AG;AAC5B,WAAO,qBAAqB,EAAE;AAAA,EAClC,WAAaC,QAAAA,WAAW,IAAI,GAAG;AAC3B,WAAO,YAAY,MAAM,MAAM;AAAA,EACnC,WAAaC,QAAAA,WAAW,IAAI,GAAG;AAC3B,WAAO,YAAY,MAAM,cAAc;AAAA,EAC3C,OAAS;AACL,WAAO,YAAY,MAAM,WAAW;AAAA,EACrC;AACH;;;;;"}
1
+ {"version":3,"file":"dates.cjs","sources":["../../common/dates/index.js"],"sourcesContent":["import {\n format,\n formatDuration,\n intervalToDuration,\n formatDistance,\n isToday,\n isYesterday,\n isThisWeek,\n isThisYear,\n} from 'date-fns';\nimport { capitalizeFirstLetter } from '../utils';\n\nlet dialtoneLocale;\n\n// Base functions just wrap core date-fns functions, but this allows us to do checks and set default options.\n\nfunction _baseFormat (date, formatString) {\n _checkLocaleSet();\n return format(date, formatString, {\n locale: dialtoneLocale,\n });\n}\n\nfunction _baseFormatDuration (duration, formatString) {\n _checkLocaleSet();\n return formatDuration(duration, {\n locale: dialtoneLocale,\n format: formatString,\n });\n}\n\nfunction _baseFormatDistance (date, baseDate) {\n _checkLocaleSet();\n return formatDistance(date, baseDate, {\n locale: dialtoneLocale,\n });\n}\n\nfunction _isLocaleSet () {\n return dialtoneLocale !== undefined;\n}\n\nfunction _checkLocaleSet () {\n if (!_isLocaleSet()) {\n throw new Error('Locale not set, please call setDateLocale(locale) and pass ' +\n 'in a datefns locale object as the locale param before calling this function');\n }\n}\n\n/**\n * Sets the locale for date-fns. This should be called before any date-fns functions are called.\n * @param {Locale} locale A date-fns locale object\n */\nexport function setDateLocale (locale) {\n dialtoneLocale = locale;\n}\n\n/**\n * This formats a date to the Dialtone standard medium date format as shown here:\n * https://dialtone.dialpad.com/guides/writing-guidelines/#formats-by-length\n * @param {Date} date A javascript date object\n * @returns {string} A string in the format of 'September 2, 2022'\n */\nexport function getDateMedium (date) {\n return _baseFormat(date, 'MMMM d, y');\n}\n\n/**\n * Converts a call duration in total number of seconds to a human readable string\n * such as 'less than a minute' or '4 hours 34 minutes'.\n * @param {number} durationInSeconds The duration of the call in seconds\n * @returns {string} A human readable string representing the duration of the call\n */\nexport function durationInHHMM (durationInSeconds) {\n if (durationInSeconds < 60) {\n // returns 'less than a minute', we're doing it like this instead of returning a string\n // so datefns handles i18n.\n return _baseFormatDistance(0, 29 * 1000);\n }\n const duration = intervalToDuration({\n start: 0,\n end: durationInSeconds * 1000,\n });\n return _baseFormatDuration(duration, ['hours', 'minutes']);\n}\n\n/**\n * gets the human readable name of the day relative to the current time. For example, if you pass in -1 it will\n * say \"Yesterday\" if you pass in 0 it will say \"Today\", if you pass in 1 it will say \"Tomorrow\".\n * @param {number} days The number of days relative to the current time\n * @returns {string} A human readable string representing the distance between the date and now\n */\nfunction _getRelativeDaysText (days) {\n const rtl = new Intl.RelativeTimeFormat(dialtoneLocale.code, { numeric: 'auto' });\n return capitalizeFirstLetter(rtl.formatToParts(days, 'day')[0].value, dialtoneLocale.code);\n}\n\n/**\n * Returns the distance between the passed in date and now in a human readable format, typically used\n * when showing a history of items in a log such as a feed list.\n *\n * datefns does not support 'today' and 'yesterday' without showing time so we use Intl for these cases.\n *\n * examples below to explain\n * the different potential formats:\n *\n * If current day:\n * Today\n *\n * If previous day:\n * Yesterday\n *\n * Older than yesterday, but in the same calendar week:\n * Monday\n *\n * Older than the most recent calendar week, but in the same year:\n * Monday, October 14\n *\n * older than a calendar year:\n * October 14, 2022\n *\n *\n * @param {Date} date The timestamp of the item's date\n * @returns {string} A human readable string representing the distance between the date and now\n */\nexport function relativeDate (date) {\n if (isToday(date)) {\n return _getRelativeDaysText(0);\n } else if (isYesterday(date)) {\n return _getRelativeDaysText(-1);\n } else if (isThisWeek(date)) {\n return _baseFormat(date, 'EEEE');\n } else if (isThisYear(date)) {\n return _baseFormat(date, 'EEEE, MMMM d');\n } else {\n return _baseFormat(date, 'MMMM d, y');\n }\n}\n"],"names":["dialtoneLocale","_baseFormat","date","formatString","_checkLocaleSet","format","locale","_baseFormatDuration","duration","formatDuration","_baseFormatDistance","baseDate","formatDistance","_isLocaleSet","undefined","Error","setDateLocale","getDateMedium","durationInHHMM","durationInSeconds","intervalToDuration","start","end","_getRelativeDaysText","days","rtl","Intl","RelativeTimeFormat","code","numeric","capitalizeFirstLetter","formatToParts","value","relativeDate","isToday","isYesterday","isThisWeek","isThisYear"],"mappings":";;;;;;AAYA,IAAIA;AAIJ,SAASC,YAAaC,MAAMC,cAAc;AACxCC;AACA,SAAOC,QAAM,OAACH,MAAMC,cAAc;AAAA,IAChCG,QAAQN;AAAAA,EACV,CAAC;AACH;AAEA,SAASO,oBAAqBC,UAAUL,cAAc;AACpDC;AACA,SAAOK,QAAAA,eAAeD,UAAU;AAAA,IAC9BF,QAAQN;AAAAA,IACRK,QAAQF;AAAAA,EACV,CAAC;AACH;AAEA,SAASO,oBAAqBR,MAAMS,UAAU;AAC5CP;AACA,SAAOQ,QAAc,eAACV,MAAMS,UAAU;AAAA,IACpCL,QAAQN;AAAAA,EACV,CAAC;AACH;AAEA,SAASa,eAAgB;AACvB,SAAOb,mBAAmBc;AAC5B;AAEA,SAASV,kBAAmB;AAC1B,MAAI,CAACS,aAAY,GAAI;AACnB,UAAM,IAAIE,MAAM,wIAC6D;AAAA,EAC/E;AACF;AAMO,SAASC,cAAeV,QAAQ;AACrCN,mBAAiBM;AACnB;AAQO,SAASW,cAAef,MAAM;AACnC,SAAOD,YAAYC,MAAM,WAAW;AACtC;AAQO,SAASgB,eAAgBC,mBAAmB;AACjD,MAAIA,oBAAoB,IAAI;AAG1B,WAAOT,oBAAoB,GAAG,KAAK,GAAI;AAAA,EACzC;AACA,QAAMF,WAAWY,QAAAA,mBAAmB;AAAA,IAClCC,OAAO;AAAA,IACPC,KAAKH,oBAAoB;AAAA,EAC3B,CAAC;AACD,SAAOZ,oBAAoBC,UAAU,CAAC,SAAS,SAAS,CAAC;AAC3D;AAQA,SAASe,qBAAsBC,MAAM;AACnC,QAAMC,MAAM,IAAIC,KAAKC,mBAAmB3B,eAAe4B,MAAM;AAAA,IAAEC,SAAS;AAAA,EAAO,CAAC;AAChF,SAAOC,mCAAsBL,IAAIM,cAAcP,MAAM,KAAK,EAAE,CAAC,EAAEQ,OAAOhC,eAAe4B,IAAI;AAC3F;AA8BO,SAASK,aAAc/B,MAAM;AAClC,MAAIgC,QAAAA,QAAQhC,IAAI,GAAG;AACjB,WAAOqB,qBAAqB,CAAC;AAAA,EAC/B,WAAWY,QAAAA,YAAYjC,IAAI,GAAG;AAC5B,WAAOqB,qBAAqB,EAAE;AAAA,EAChC,WAAWa,QAAAA,WAAWlC,IAAI,GAAG;AAC3B,WAAOD,YAAYC,MAAM,MAAM;AAAA,EACjC,WAAWmC,QAAAA,WAAWnC,IAAI,GAAG;AAC3B,WAAOD,YAAYC,MAAM,cAAc;AAAA,EACzC,OAAO;AACL,WAAOD,YAAYC,MAAM,WAAW;AAAA,EACtC;AACF;;;;;"}
@@ -47,7 +47,9 @@ function durationInHHMM(durationInSeconds) {
47
47
  return _baseFormatDuration(duration, ["hours", "minutes"]);
48
48
  }
49
49
  function _getRelativeDaysText(days) {
50
- const rtl = new Intl.RelativeTimeFormat(dialtoneLocale.code, { numeric: "auto" });
50
+ const rtl = new Intl.RelativeTimeFormat(dialtoneLocale.code, {
51
+ numeric: "auto"
52
+ });
51
53
  return capitalizeFirstLetter(rtl.formatToParts(days, "day")[0].value, dialtoneLocale.code);
52
54
  }
53
55
  function relativeDate(date) {
@@ -1 +1 @@
1
- {"version":3,"file":"dates.js","sources":["../../common/dates/index.js"],"sourcesContent":["import {\n format,\n formatDuration,\n intervalToDuration,\n formatDistance,\n isToday,\n isYesterday,\n isThisWeek,\n isThisYear,\n} from 'date-fns';\nimport { capitalizeFirstLetter } from '../utils';\n\nlet dialtoneLocale;\n\n// Base functions just wrap core date-fns functions, but this allows us to do checks and set default options.\n\nfunction _baseFormat (date, formatString) {\n _checkLocaleSet();\n return format(date, formatString, {\n locale: dialtoneLocale,\n });\n}\n\nfunction _baseFormatDuration (duration, formatString) {\n _checkLocaleSet();\n return formatDuration(duration, {\n locale: dialtoneLocale,\n format: formatString,\n });\n}\n\nfunction _baseFormatDistance (date, baseDate) {\n _checkLocaleSet();\n return formatDistance(date, baseDate, {\n locale: dialtoneLocale,\n });\n}\n\nfunction _isLocaleSet () {\n return dialtoneLocale !== undefined;\n}\n\nfunction _checkLocaleSet () {\n if (!_isLocaleSet()) {\n throw new Error('Locale not set, please call setDateLocale(locale) and pass ' +\n 'in a datefns locale object as the locale param before calling this function');\n }\n}\n\n/**\n * Sets the locale for date-fns. This should be called before any date-fns functions are called.\n * @param {Locale} locale A date-fns locale object\n */\nexport function setDateLocale (locale) {\n dialtoneLocale = locale;\n}\n\n/**\n * This formats a date to the Dialtone standard medium date format as shown here:\n * https://dialtone.dialpad.com/guides/writing-guidelines/#formats-by-length\n * @param {Date} date A javascript date object\n * @returns {string} A string in the format of 'September 2, 2022'\n */\nexport function getDateMedium (date) {\n return _baseFormat(date, 'MMMM d, y');\n}\n\n/**\n * Converts a call duration in total number of seconds to a human readable string\n * such as 'less than a minute' or '4 hours 34 minutes'.\n * @param {number} durationInSeconds The duration of the call in seconds\n * @returns {string} A human readable string representing the duration of the call\n */\nexport function durationInHHMM (durationInSeconds) {\n if (durationInSeconds < 60) {\n // returns 'less than a minute', we're doing it like this instead of returning a string\n // so datefns handles i18n.\n return _baseFormatDistance(0, 29 * 1000);\n }\n const duration = intervalToDuration({\n start: 0,\n end: durationInSeconds * 1000,\n });\n return _baseFormatDuration(duration, ['hours', 'minutes']);\n}\n\n/**\n * gets the human readable name of the day relative to the current time. For example, if you pass in -1 it will\n * say \"Yesterday\" if you pass in 0 it will say \"Today\", if you pass in 1 it will say \"Tomorrow\".\n * @param {number} days The number of days relative to the current time\n * @returns {string} A human readable string representing the distance between the date and now\n */\nfunction _getRelativeDaysText (days) {\n const rtl = new Intl.RelativeTimeFormat(dialtoneLocale.code, { numeric: 'auto' });\n return capitalizeFirstLetter(rtl.formatToParts(days, 'day')[0].value, dialtoneLocale.code);\n}\n\n/**\n * Returns the distance between the passed in date and now in a human readable format, typically used\n * when showing a history of items in a log such as a feed list.\n *\n * datefns does not support 'today' and 'yesterday' without showing time so we use Intl for these cases.\n *\n * examples below to explain\n * the different potential formats:\n *\n * If current day:\n * Today\n *\n * If previous day:\n * Yesterday\n *\n * Older than yesterday, but in the same calendar week:\n * Monday\n *\n * Older than the most recent calendar week, but in the same year:\n * Monday, October 14\n *\n * older than a calendar year:\n * October 14, 2022\n *\n *\n * @param {Date} date The timestamp of the item's date\n * @returns {string} A human readable string representing the distance between the date and now\n */\nexport function relativeDate (date) {\n if (isToday(date)) {\n return _getRelativeDaysText(0);\n } else if (isYesterday(date)) {\n return _getRelativeDaysText(-1);\n } else if (isThisWeek(date)) {\n return _baseFormat(date, 'EEEE');\n } else if (isThisYear(date)) {\n return _baseFormat(date, 'EEEE, MMMM d');\n } else {\n return _baseFormat(date, 'MMMM d, y');\n }\n}\n"],"names":[],"mappings":";;;;AAYA,IAAI;AAIJ,SAAS,YAAa,MAAM,cAAc;AACxC;AACA,SAAO,OAAO,MAAM,cAAc;AAAA,IAChC,QAAQ;AAAA,EACZ,CAAG;AACH;AAEA,SAAS,oBAAqB,UAAU,cAAc;AACpD;AACA,SAAO,eAAe,UAAU;AAAA,IAC9B,QAAQ;AAAA,IACR,QAAQ;AAAA,EACZ,CAAG;AACH;AAEA,SAAS,oBAAqB,MAAM,UAAU;AAC5C;AACA,SAAO,eAAe,MAAM,UAAU;AAAA,IACpC,QAAQ;AAAA,EACZ,CAAG;AACH;AAEA,SAAS,eAAgB;AACvB,SAAO,mBAAmB;AAC5B;AAEA,SAAS,kBAAmB;AAC1B,MAAI,CAAC,aAAY,GAAI;AACnB,UAAM,IAAI,MAAM,wIAC6D;AAAA,EAC9E;AACH;AAMO,SAAS,cAAe,QAAQ;AACrC,mBAAiB;AACnB;AAQO,SAAS,cAAe,MAAM;AACnC,SAAO,YAAY,MAAM,WAAW;AACtC;AAQO,SAAS,eAAgB,mBAAmB;AACjD,MAAI,oBAAoB,IAAI;AAG1B,WAAO,oBAAoB,GAAG,KAAK,GAAI;AAAA,EACxC;AACD,QAAM,WAAW,mBAAmB;AAAA,IAClC,OAAO;AAAA,IACP,KAAK,oBAAoB;AAAA,EAC7B,CAAG;AACD,SAAO,oBAAoB,UAAU,CAAC,SAAS,SAAS,CAAC;AAC3D;AAQA,SAAS,qBAAsB,MAAM;AACnC,QAAM,MAAM,IAAI,KAAK,mBAAmB,eAAe,MAAM,EAAE,SAAS,OAAM,CAAE;AAChF,SAAO,sBAAsB,IAAI,cAAc,MAAM,KAAK,EAAE,CAAC,EAAE,OAAO,eAAe,IAAI;AAC3F;AA8BO,SAAS,aAAc,MAAM;AAClC,MAAI,QAAQ,IAAI,GAAG;AACjB,WAAO,qBAAqB,CAAC;AAAA,EACjC,WAAa,YAAY,IAAI,GAAG;AAC5B,WAAO,qBAAqB,EAAE;AAAA,EAClC,WAAa,WAAW,IAAI,GAAG;AAC3B,WAAO,YAAY,MAAM,MAAM;AAAA,EACnC,WAAa,WAAW,IAAI,GAAG;AAC3B,WAAO,YAAY,MAAM,cAAc;AAAA,EAC3C,OAAS;AACL,WAAO,YAAY,MAAM,WAAW;AAAA,EACrC;AACH;"}
1
+ {"version":3,"file":"dates.js","sources":["../../common/dates/index.js"],"sourcesContent":["import {\n format,\n formatDuration,\n intervalToDuration,\n formatDistance,\n isToday,\n isYesterday,\n isThisWeek,\n isThisYear,\n} from 'date-fns';\nimport { capitalizeFirstLetter } from '../utils';\n\nlet dialtoneLocale;\n\n// Base functions just wrap core date-fns functions, but this allows us to do checks and set default options.\n\nfunction _baseFormat (date, formatString) {\n _checkLocaleSet();\n return format(date, formatString, {\n locale: dialtoneLocale,\n });\n}\n\nfunction _baseFormatDuration (duration, formatString) {\n _checkLocaleSet();\n return formatDuration(duration, {\n locale: dialtoneLocale,\n format: formatString,\n });\n}\n\nfunction _baseFormatDistance (date, baseDate) {\n _checkLocaleSet();\n return formatDistance(date, baseDate, {\n locale: dialtoneLocale,\n });\n}\n\nfunction _isLocaleSet () {\n return dialtoneLocale !== undefined;\n}\n\nfunction _checkLocaleSet () {\n if (!_isLocaleSet()) {\n throw new Error('Locale not set, please call setDateLocale(locale) and pass ' +\n 'in a datefns locale object as the locale param before calling this function');\n }\n}\n\n/**\n * Sets the locale for date-fns. This should be called before any date-fns functions are called.\n * @param {Locale} locale A date-fns locale object\n */\nexport function setDateLocale (locale) {\n dialtoneLocale = locale;\n}\n\n/**\n * This formats a date to the Dialtone standard medium date format as shown here:\n * https://dialtone.dialpad.com/guides/writing-guidelines/#formats-by-length\n * @param {Date} date A javascript date object\n * @returns {string} A string in the format of 'September 2, 2022'\n */\nexport function getDateMedium (date) {\n return _baseFormat(date, 'MMMM d, y');\n}\n\n/**\n * Converts a call duration in total number of seconds to a human readable string\n * such as 'less than a minute' or '4 hours 34 minutes'.\n * @param {number} durationInSeconds The duration of the call in seconds\n * @returns {string} A human readable string representing the duration of the call\n */\nexport function durationInHHMM (durationInSeconds) {\n if (durationInSeconds < 60) {\n // returns 'less than a minute', we're doing it like this instead of returning a string\n // so datefns handles i18n.\n return _baseFormatDistance(0, 29 * 1000);\n }\n const duration = intervalToDuration({\n start: 0,\n end: durationInSeconds * 1000,\n });\n return _baseFormatDuration(duration, ['hours', 'minutes']);\n}\n\n/**\n * gets the human readable name of the day relative to the current time. For example, if you pass in -1 it will\n * say \"Yesterday\" if you pass in 0 it will say \"Today\", if you pass in 1 it will say \"Tomorrow\".\n * @param {number} days The number of days relative to the current time\n * @returns {string} A human readable string representing the distance between the date and now\n */\nfunction _getRelativeDaysText (days) {\n const rtl = new Intl.RelativeTimeFormat(dialtoneLocale.code, { numeric: 'auto' });\n return capitalizeFirstLetter(rtl.formatToParts(days, 'day')[0].value, dialtoneLocale.code);\n}\n\n/**\n * Returns the distance between the passed in date and now in a human readable format, typically used\n * when showing a history of items in a log such as a feed list.\n *\n * datefns does not support 'today' and 'yesterday' without showing time so we use Intl for these cases.\n *\n * examples below to explain\n * the different potential formats:\n *\n * If current day:\n * Today\n *\n * If previous day:\n * Yesterday\n *\n * Older than yesterday, but in the same calendar week:\n * Monday\n *\n * Older than the most recent calendar week, but in the same year:\n * Monday, October 14\n *\n * older than a calendar year:\n * October 14, 2022\n *\n *\n * @param {Date} date The timestamp of the item's date\n * @returns {string} A human readable string representing the distance between the date and now\n */\nexport function relativeDate (date) {\n if (isToday(date)) {\n return _getRelativeDaysText(0);\n } else if (isYesterday(date)) {\n return _getRelativeDaysText(-1);\n } else if (isThisWeek(date)) {\n return _baseFormat(date, 'EEEE');\n } else if (isThisYear(date)) {\n return _baseFormat(date, 'EEEE, MMMM d');\n } else {\n return _baseFormat(date, 'MMMM d, y');\n }\n}\n"],"names":["dialtoneLocale","_baseFormat","date","formatString","_checkLocaleSet","format","locale","_baseFormatDuration","duration","formatDuration","_baseFormatDistance","baseDate","formatDistance","_isLocaleSet","undefined","Error","setDateLocale","getDateMedium","durationInHHMM","durationInSeconds","intervalToDuration","start","end","_getRelativeDaysText","days","rtl","Intl","RelativeTimeFormat","code","numeric","capitalizeFirstLetter","formatToParts","value","relativeDate","isToday","isYesterday","isThisWeek","isThisYear"],"mappings":";;;;AAYA,IAAIA;AAIJ,SAASC,YAAaC,MAAMC,cAAc;AACxCC;AACA,SAAOC,OAAOH,MAAMC,cAAc;AAAA,IAChCG,QAAQN;AAAAA,EACV,CAAC;AACH;AAEA,SAASO,oBAAqBC,UAAUL,cAAc;AACpDC;AACA,SAAOK,eAAeD,UAAU;AAAA,IAC9BF,QAAQN;AAAAA,IACRK,QAAQF;AAAAA,EACV,CAAC;AACH;AAEA,SAASO,oBAAqBR,MAAMS,UAAU;AAC5CP;AACA,SAAOQ,eAAeV,MAAMS,UAAU;AAAA,IACpCL,QAAQN;AAAAA,EACV,CAAC;AACH;AAEA,SAASa,eAAgB;AACvB,SAAOb,mBAAmBc;AAC5B;AAEA,SAASV,kBAAmB;AAC1B,MAAI,CAACS,aAAY,GAAI;AACnB,UAAM,IAAIE,MAAM,wIAC6D;AAAA,EAC/E;AACF;AAMO,SAASC,cAAeV,QAAQ;AACrCN,mBAAiBM;AACnB;AAQO,SAASW,cAAef,MAAM;AACnC,SAAOD,YAAYC,MAAM,WAAW;AACtC;AAQO,SAASgB,eAAgBC,mBAAmB;AACjD,MAAIA,oBAAoB,IAAI;AAG1B,WAAOT,oBAAoB,GAAG,KAAK,GAAI;AAAA,EACzC;AACA,QAAMF,WAAWY,mBAAmB;AAAA,IAClCC,OAAO;AAAA,IACPC,KAAKH,oBAAoB;AAAA,EAC3B,CAAC;AACD,SAAOZ,oBAAoBC,UAAU,CAAC,SAAS,SAAS,CAAC;AAC3D;AAQA,SAASe,qBAAsBC,MAAM;AACnC,QAAMC,MAAM,IAAIC,KAAKC,mBAAmB3B,eAAe4B,MAAM;AAAA,IAAEC,SAAS;AAAA,EAAO,CAAC;AAChF,SAAOC,sBAAsBL,IAAIM,cAAcP,MAAM,KAAK,EAAE,CAAC,EAAEQ,OAAOhC,eAAe4B,IAAI;AAC3F;AA8BO,SAASK,aAAc/B,MAAM;AAClC,MAAIgC,QAAQhC,IAAI,GAAG;AACjB,WAAOqB,qBAAqB,CAAC;AAAA,EAC/B,WAAWY,YAAYjC,IAAI,GAAG;AAC5B,WAAOqB,qBAAqB,EAAE;AAAA,EAChC,WAAWa,WAAWlC,IAAI,GAAG;AAC3B,WAAOD,YAAYC,MAAM,MAAM;AAAA,EACjC,WAAWmC,WAAWnC,IAAI,GAAG;AAC3B,WAAOD,YAAYC,MAAM,cAAc;AAAA,EACzC,OAAO;AACL,WAAOD,YAAYC,MAAM,WAAW;AAAA,EACtC;AACF;"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const common_emoji = require("../chunks/index-lu2o2f4r.js");
3
+ const common_emoji = require("../chunks/index-fEp0B-5Z.js");
4
4
  require("@dialpad/dialtone-emojis");
5
5
  exports.codeToEmojiData = common_emoji.codeToEmojiData;
6
6
  Object.defineProperty(exports, "customEmojiAssetUrl", {
@@ -1,4 +1,4 @@
1
- import { codeToEmojiData, customEmojiAssetUrl, defaultEmojiAssetUrl, emojiFileExtensionLarge, emojiFileExtensionSmall, emojiImageUrlLarge, emojiImageUrlSmall, emojiJson, emojiRegex, emojiShortCodeRegex, emojiVersion, filterValidShortCodes, findEmojis, findShortCodes, getEmojiData, setCustomEmojiJson, setCustomEmojiUrl, setEmojiAssetUrlLarge, setEmojiAssetUrlSmall, shortcodeToEmojiData, stringToUnicode, unicodeToString, validateCustomEmojiJson } from "../chunks/index-GVD15GIB.js";
1
+ import { codeToEmojiData, customEmojiAssetUrl, defaultEmojiAssetUrl, emojiFileExtensionLarge, emojiFileExtensionSmall, emojiImageUrlLarge, emojiImageUrlSmall, emojiJson, emojiRegex, emojiShortCodeRegex, emojiVersion, filterValidShortCodes, findEmojis, findShortCodes, getEmojiData, setCustomEmojiJson, setCustomEmojiUrl, setEmojiAssetUrlLarge, setEmojiAssetUrlSmall, shortcodeToEmojiData, stringToUnicode, unicodeToString, validateCustomEmojiJson } from "../chunks/index-dfdrE-3M.js";
2
2
  import "@dialpad/dialtone-emojis";
3
3
  export {
4
4
  codeToEmojiData,
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const input = require("../chunks/input-ttnte8zB.js");
4
- const input_group = require("../chunks/input_group-M-D25pOJ.js");
5
- const keyboard_list_navigation = require("../chunks/keyboard_list_navigation-fJnl_Iox.js");
3
+ const input = require("../chunks/input-dLLo3Wtg.js");
4
+ const input_group = require("../chunks/input_group-rE6nhye8.js");
5
+ const keyboard_list_navigation = require("../chunks/keyboard_list_navigation-x3D6RcC7.js");
6
6
  require("vue");
7
7
  require("./constants.cjs");
8
8
  require("./validators.cjs");
@@ -1,6 +1,6 @@
1
- import { CheckableMixin, GroupableMixin, InputMixin } from "../chunks/input-NmYDD5bn.js";
2
- import { InputGroupMixin } from "../chunks/input_group-jWnq2DJT.js";
3
- import { KeyboardNavigation } from "../chunks/keyboard_list_navigation-ScXhrxya.js";
1
+ import { CheckableMixin, GroupableMixin, InputMixin } from "../chunks/input-HIysg24t.js";
2
+ import { InputGroupMixin } from "../chunks/input_group-hV1WT2it.js";
3
+ import { KeyboardNavigation } from "../chunks/keyboard_list_navigation-YIqTuw1W.js";
4
4
  import "vue";
5
5
  import "./constants.js";
6
6
  import "./validators.js";
@@ -76,7 +76,9 @@ function findFirstFocusableNode(element) {
76
76
  return element == null ? void 0 : element.querySelector(FOCUSABLE_SELECTOR);
77
77
  }
78
78
  const htmlFragment = (props) => {
79
- return vue.h("div", { innerHTML: props.html });
79
+ return vue.h("div", {
80
+ innerHTML: props.html
81
+ });
80
82
  };
81
83
  const flushPromises = () => {
82
84
  return new Promise((resolve) => {
@@ -121,60 +123,24 @@ function isOutOfViewPort(element) {
121
123
  return isOut;
122
124
  }
123
125
  const domainNameRegex = /(?:(?:[^\s!@#$%^&*()_=+[\]{}\\|;:'",.<>/?]+)\.)/;
124
- const tldRegerx = new RegExp(
125
- "(?:com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|ae|ph|online|ng|ee|ws|ve|cat)"
126
- );
127
- const ipv4Regex = new RegExp(
128
- "(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])"
129
- );
130
- const hostnameOrIpRegex = new RegExp(
131
- "(?:" + [
132
- [
133
- domainNameRegex.source,
134
- tldRegerx.source
135
- ].join("+"),
136
- ipv4Regex.source
137
- ].join("|") + ")"
138
- );
126
+ const tldRegerx = new RegExp("(?:com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|ae|ph|online|ng|ee|ws|ve|cat)");
127
+ const ipv4Regex = new RegExp("(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])");
128
+ const hostnameOrIpRegex = new RegExp("(?:" + [[domainNameRegex.source, tldRegerx.source].join("+"), ipv4Regex.source].join("|") + ")");
139
129
  const urlPathRegex = /(?:(?:[;/][^#?<>\s]*)?)/;
140
130
  const urlQueryOrFragmentRegex = /(?:(?:\?[^#<>\s]+)?(?:#[^<>\s]+)?)/;
141
- const urlWithoutProtocolRegex = new RegExp(
142
- "\\b" + [
143
- hostnameOrIpRegex.source,
144
- urlPathRegex.source,
145
- urlQueryOrFragmentRegex.source,
146
- "(?!\\w)"
147
- ].join("+")
148
- );
131
+ const urlWithoutProtocolRegex = new RegExp("\\b" + [hostnameOrIpRegex.source, urlPathRegex.source, urlQueryOrFragmentRegex.source, "(?!\\w)"].join("+"));
149
132
  const urlWithProtocolRegex = /\b[a-z\d.-]+:\/\/[^<>\s]+/;
150
- const emailAddressRegex = new RegExp(
151
- "(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" + [
152
- hostnameOrIpRegex.source,
153
- urlQueryOrFragmentRegex.source
154
- ].join("+") + "(?!\\w)"
155
- );
133
+ const emailAddressRegex = new RegExp("(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" + [hostnameOrIpRegex.source, urlQueryOrFragmentRegex.source].join("+") + "(?!\\w)");
156
134
  function getPhoneNumberRegex(minLength = 7, maxLength = 15) {
157
135
  try {
158
- return new RegExp(
159
- `(?:^|(?<=\\W))(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`
160
- );
136
+ return new RegExp(`(?:^|(?<=\\W))(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`);
161
137
  } catch (e) {
162
138
  console.warn("This browser doesn't support regex lookahead/lookbehind");
163
139
  }
164
- return new RegExp(
165
- `(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`
166
- );
140
+ return new RegExp(`(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`);
167
141
  }
168
142
  const phoneNumberRegex = getPhoneNumberRegex();
169
- const linkRegex = new RegExp(
170
- [
171
- urlWithoutProtocolRegex.source,
172
- urlWithProtocolRegex.source,
173
- emailAddressRegex.source,
174
- phoneNumberRegex.source
175
- ].join("|"),
176
- "gi"
177
- );
143
+ const linkRegex = new RegExp([urlWithoutProtocolRegex.source, urlWithProtocolRegex.source, emailAddressRegex.source, phoneNumberRegex.source].join("|"), "gi");
178
144
  function isPhoneNumber(input) {
179
145
  var _a;
180
146
  if (!input || !["string", "number"].includes(typeof input))
@@ -1 +1 @@
1
- {"version":3,"file":"utils.cjs","sources":["../../common/utils/index.js"],"sourcesContent":["import {\n DEFAULT_PREFIX,\n DEFAULT_VALIDATION_MESSAGE_TYPE,\n VALIDATION_MESSAGE_TYPES,\n} from '../constants';\nimport {\n h,\n Comment,\n Text,\n} from 'vue';\n\nlet UNIQUE_ID_COUNTER = 0;\nlet TIMER;\n\n// selector to find focusable not hidden inputs\nconst FOCUSABLE_SELECTOR_NOT_HIDDEN = 'input:not([type=hidden]):not(:disabled)';\n// selector to find focusable not disables elements\nconst FOCUSABLE_SELECTOR_NOT_DISABLED = 'select:not(:disabled),textarea:not(:disabled),button:not(:disabled)';\n// // selector to find focusable not hidden and disabled elements\nconst FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED = `${FOCUSABLE_SELECTOR_NOT_HIDDEN},${FOCUSABLE_SELECTOR_NOT_DISABLED}`;\n// selector to find focusable elements\nconst FOCUSABLE_SELECTOR = `a,frame,iframe,${FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED},*[tabindex]`;\n\nconst scheduler = typeof setImmediate === 'function' ? setImmediate : setTimeout;\n\nexport function getUniqueString (prefix = DEFAULT_PREFIX) {\n return `${prefix}${UNIQUE_ID_COUNTER++}`;\n}\n\n/**\n * Returns a random element from array\n * @param array - the array to return a random element from\n * @param {string} seed - use a string to seed the randomization, so it returns the same element each time\n * based on that string.\n * @returns {*} - the random element\n */\nexport function getRandomElement (array, seed) {\n if (seed) {\n const hash = javaHashCode(seed);\n return array[Math.abs(hash) % array.length];\n } else {\n return array[getRandomInt(array.length)];\n }\n}\n\n/**\n * Returns a hash code for a string.\n * (Compatible to Java's String.hashCode())\n * We use this algo to be in sync with android.\n *\n * The hash code for a string object is computed as\n * s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]\n * using number arithmetic, where s[i] is the i th character\n * of the given string, n is the length of the string,\n * and ^ indicates exponentiation.\n * (The hash value of the empty string is zero.)\n *\n * @param {string} str a string\n * @return {number} a hash code value for the given string.\n */\nexport function javaHashCode (str) {\n let h;\n for (let i = 0; i < str.length; i++) {\n h = Math.imul(31, h) + str.charCodeAt(i) | 0;\n }\n\n return h;\n}\n\n/**\n * Generate a random integer\n * @param {number} max - max range of integer to generate\n * @returns {number} randomly generated integer between 0 and max\n */\nexport function getRandomInt (max) {\n return Math.floor(Math.random() * max);\n}\n\nexport function formatMessages (messages) {\n if (!messages) {\n return [];\n }\n\n return messages.map(message => {\n if (typeof message === 'string') {\n return {\n message,\n type: DEFAULT_VALIDATION_MESSAGE_TYPE,\n };\n }\n\n return message;\n });\n}\n\nexport function filterFormattedMessages (formattedMessages) {\n const validationState = getValidationState(formattedMessages);\n\n if (!formattedMessages || !validationState) {\n return [];\n }\n\n return formattedMessages.filter(message => !!message.message && message.type === validationState);\n}\n\n/*\n * The priority order of message types is as flows: 'error' > 'warning' > 'success'.\n * If any message of type 'error' is present in messages, the input state is considered\n * to be 'error', then 'warning' and lastly 'success'.\n */\nexport function getValidationState (formattedMessages) {\n if (!formattedMessages) {\n return null;\n }\n\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.ERROR)) {\n return VALIDATION_MESSAGE_TYPES.ERROR;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.WARNING)) {\n return VALIDATION_MESSAGE_TYPES.WARNING;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.SUCCESS)) {\n return VALIDATION_MESSAGE_TYPES.SUCCESS;\n }\n\n return null;\n}\n\nexport function hasFormattedMessageOfType (formattedMessages, messageType) {\n if (!formattedMessages || !messageType) {\n return false;\n }\n\n return formattedMessages.some(message => message?.type === messageType);\n}\n\nexport function findFirstFocusableNode (element) {\n return element?.querySelector(FOCUSABLE_SELECTOR);\n}\n\n/* html-fragment component:\n * To render html without wrapping in another element as when using v-html.\n * props: html\n */\nexport const htmlFragment = (props) => {\n return h('div', { innerHTML: props.html });\n};\n\nexport const flushPromises = () => {\n return new Promise((resolve) => {\n scheduler(resolve);\n });\n};\n\n/*\n It is very cumbersome to check if a slot is empty in vue 3. Copied this method from the following thread\n https://github.com/vuejs/core/issues/4733. There is an RFC to fix this but not yet being worked on.\n https://github.com/vuejs/rfcs/discussions/453\n*/\nexport function hasSlotContent (slot, slotProps = {}) {\n if (!slot) return false;\n\n // eslint-disable-next-line complexity\n return slot(slotProps).some((vnode) => {\n if (vnode.type === Comment) return false;\n\n if (Array.isArray(vnode.children) && !vnode.children.length) return false;\n\n return (\n vnode.type !== Text ||\n (typeof vnode.children === 'string' && vnode.children.trim() !== '')\n );\n });\n}\n\n/**\n * Transform a string from kebab-case to PascalCase\n * @param string\n * @returns {string}\n */\nexport const kebabCaseToPascalCase = (string) => {\n return string?.toLowerCase()\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join('');\n};\n\n/**\n * Transform a string from PascalCase to kebab-case\n * @param string\n * @returns {string}\n */\nexport const pascalCaseToKebabCase = (string) => {\n return string\n .replace(/\\.?([A-Z0-9]+)/g, (x, y) => '-' + y.toLowerCase())\n .replace(/^-/, '');\n};\n\nexport const extractVueListeners = (attrs) => {\n const listeners = Object.entries(attrs)\n .filter(([key]) => key.startsWith('on'));\n return Object.fromEntries(listeners);\n};\n\n/*\n* Set's a global timer to debounce the execution of a function.\n* @param { object } func - the function that is going to be called after timeout\n* @param { number } [timeout=300] timeout\n* */\nexport function debounce (func, timeout = 300) {\n clearTimeout(TIMER);\n TIMER = setTimeout(func, timeout);\n}\n\n/**\n * Checks if the element is out of the viewport\n * https://gomakethings.com/how-to-check-if-any-part-of-an-element-is-out-of-the-viewport-with-vanilla-js/\n * @param {HTMLElement} element The element to check\n * @return {Object} A set of booleans for each side of the element\n */\n\nexport function isOutOfViewPort (element) {\n const bounding = element.getBoundingClientRect();\n\n const isOut = {\n top: bounding.top < 0,\n left: bounding.left < 0,\n bottom: bounding.bottom > (window.innerHeight || document.documentElement.clientHeight),\n right: bounding.right > (window.innerWidth || document.documentElement.clientWidth),\n };\n isOut.any = Object.values(isOut).some(val => val);\n isOut.all = Object.values(isOut).every(val => val);\n return isOut;\n}\n\n// match valid characters for a domain name followed by a dot, e.g. \"dialpad.\"\nconst domainNameRegex = /(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)/;\n\n// match valid TLDs for a hostname (outdated list from ~2017)\nconst tldRegerx = new RegExp(\n '(?:' +\n 'com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|' +\n 'za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|' +\n 'il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|' +\n 'ae|ph|online|ng|ee|ws|ve|cat' +\n ')',\n);\n\n// match valid IPv4 addresses, e.g. \"192.158.1.38\"\nconst ipv4Regex = new RegExp(\n '(?:(?:[0-9]|[1-9]\\\\d|1\\\\d{2}|2[0-4]\\\\d|25[0-5])\\\\.){3}' +\n '(?:[0-9]|[1-9]\\\\d|1\\\\d{2}|2[0-4]\\\\d|25[0-5])',\n);\n\n// match hostnames OR IPv4 addresses, e.g. \"dialpad.com\" or \"192.158.1.38\"\nconst hostnameOrIpRegex = new RegExp(\n '(?:' +\n [\n [\n domainNameRegex.source,\n tldRegerx.source,\n ].join('+'),\n ipv4Regex.source,\n ].join('|') +\n ')',\n);\n\n// match URL paths, e.g. \"/news\"\nconst urlPathRegex = /(?:(?:[;/][^#?<>\\s]*)?)/;\n\n// match URL queries and fragments, e.g. \"?cache=1&new=true\" or \"#heading1\"\nconst urlQueryOrFragmentRegex = /(?:(?:\\?[^#<>\\s]+)?(?:#[^<>\\s]+)?)/;\n\n// match complete hostnames or IPv4 addresses without a protocol and with optional\n// URL paths, queries and fragments e.g. \"dialpad.com/news?cache=1#heading1\"\nconst urlWithoutProtocolRegex = new RegExp(\n '\\\\b' +\n [\n hostnameOrIpRegex.source,\n urlPathRegex.source,\n urlQueryOrFragmentRegex.source,\n '(?!\\\\w)',\n ].join('+'),\n);\n\n// match complete hostnames with protocols and optional URL paths, queries and fragments,\n// e.g. \"ws://localhost:9011\" or \"https://dialpad.com/news?cache=1#heading1\"\nconst urlWithProtocolRegex = /\\b[a-z\\d.-]+:\\/\\/[^<>\\s]+/;\n\n// match email addresses with an optional \"mailto:\" prefix and URL queries, e.g.\n// \"hey@dialpad.com\" or \"mailto:hey@dialpad.com?subject=Hi&body=Hey%20there\"\nconst emailAddressRegex = new RegExp(\n '(?:mailto:)?' +\n '[a-z0-9!#$%&\\'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&\\'*+/=?^_`{|}~-]+)*@' +\n [\n hostnameOrIpRegex.source,\n urlQueryOrFragmentRegex.source,\n ].join('+') +\n '(?!\\\\w)',\n);\n\n/**\n * Match phone numbers, e.g. \"765-8813\", \"(778) 765-8813\" or \"+17787658813\".\n * @param {number} minLength\n * @param {number} maxLength\n * @returns {RegExp}\n */\nexport function getPhoneNumberRegex (minLength = 7, maxLength = 15) {\n // Some older browser versions don't support lookbehind, so provide a RegExp\n // version without it. It fails just one test case, so IMO it's still good\n // enough to use. https://caniuse.com/js-regexp-lookbehind\n try {\n return new RegExp(\n '(?:^|(?<=\\\\W))' +\n '(?![\\\\s\\\\-])\\\\+?(?:[0-9()\\\\- \\\\t]' +\n `{${minLength},${maxLength}}` +\n ')(?=\\\\b)(?=\\\\W(?=\\\\W|$)|\\\\s|$)',\n );\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('This browser doesn\\'t support regex lookahead/lookbehind');\n }\n\n return new RegExp(\n '(?![\\\\s\\\\-])\\\\+?(?:[0-9()\\\\- \\\\t]' +\n `{${minLength},${maxLength}}` +\n ')(?=\\\\b)(?=\\\\W(?=\\\\W|$)|\\\\s|$)',\n );\n}\n\nconst phoneNumberRegex = getPhoneNumberRegex();\n\n// match all link types\nexport const linkRegex = new RegExp(\n [\n urlWithoutProtocolRegex.source,\n urlWithProtocolRegex.source,\n emailAddressRegex.source,\n phoneNumberRegex.source,\n ].join('|'),\n 'gi',\n);\n\n/**\n * Check if a string is a phone number. Validates only exact matches.\n * @param {string|number} input\n * @returns {boolean}\n */\nexport function isPhoneNumber (input) {\n if (!input || (!['string', 'number'].includes(typeof input))) return false;\n input = input.toString();\n return phoneNumberRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Check if a string is an URL. Validates only exact matches.\n * @param {string} input\n * @returns {boolean}\n */\nexport function isURL (input) {\n if (!input || typeof input !== 'string') return false;\n return urlWithoutProtocolRegex.exec(input)?.[0] === input ||\n urlWithProtocolRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Check if a string is an email address. Validates only exact matches.\n * @param {string} input\n * @returns {boolean}\n */\nexport function isEmailAddress (input) {\n if (!input || typeof input !== 'string') return false;\n return emailAddressRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Concatenate a string removing null or undefined elements\n * avoiding parsing them as string with template strings\n * @param {Array} elements\n * @returns {String}\n */\nexport function safeConcatStrings (elements) {\n return elements.filter(str => !!str).join(' ');\n}\n\n/**\n * Locale safe function to capitalize the first letter of a string.\n * @param {string} str the string to capitalize the first letter of\n * @param {string} locale a string representing the locale to be used. Defaults to 'en-US'\n * @returns The passed in string with the first letter capitalized\n */\nexport function capitalizeFirstLetter (str, locale = 'en-US') {\n return str.replace(/^\\p{CWU}/u, char => char.toLocaleUpperCase(locale));\n}\n\nexport default {\n getUniqueString,\n getRandomElement,\n getRandomInt,\n formatMessages,\n filterFormattedMessages,\n hasFormattedMessageOfType,\n getValidationState,\n htmlFragment,\n flushPromises,\n kebabCaseToPascalCase,\n extractVueListeners,\n debounce,\n isOutOfViewPort,\n getPhoneNumberRegex,\n linkRegex,\n isEmailAddress,\n isPhoneNumber,\n isURL,\n safeConcatStrings,\n capitalizeFirstLetter,\n};\n"],"names":["DEFAULT_PREFIX","DEFAULT_VALIDATION_MESSAGE_TYPE","VALIDATION_MESSAGE_TYPES","h","Comment","Text"],"mappings":";;;;AAWA,IAAI,oBAAoB;AACxB,IAAI;AAGJ,MAAM,gCAAgC;AAEtC,MAAM,kCAAkC;AAExC,MAAM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S,SAAS;AAC5D,SAAO,IAAI,QAAQ,2BAAW,GAAE,UAAQ,KAAK,kBAAkB,MAAM,CAAC;AACxE;AAEA,MAAe,QAAA;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"utils.cjs","sources":["../../common/utils/index.js"],"sourcesContent":["import {\n DEFAULT_PREFIX,\n DEFAULT_VALIDATION_MESSAGE_TYPE,\n VALIDATION_MESSAGE_TYPES,\n} from '../constants';\nimport {\n h,\n Comment,\n Text,\n} from 'vue';\n\nlet UNIQUE_ID_COUNTER = 0;\nlet TIMER;\n\n// selector to find focusable not hidden inputs\nconst FOCUSABLE_SELECTOR_NOT_HIDDEN = 'input:not([type=hidden]):not(:disabled)';\n// selector to find focusable not disables elements\nconst FOCUSABLE_SELECTOR_NOT_DISABLED = 'select:not(:disabled),textarea:not(:disabled),button:not(:disabled)';\n// // selector to find focusable not hidden and disabled elements\nconst FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED = `${FOCUSABLE_SELECTOR_NOT_HIDDEN},${FOCUSABLE_SELECTOR_NOT_DISABLED}`;\n// selector to find focusable elements\nconst FOCUSABLE_SELECTOR = `a,frame,iframe,${FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED},*[tabindex]`;\n\nconst scheduler = typeof setImmediate === 'function' ? setImmediate : setTimeout;\n\nexport function getUniqueString (prefix = DEFAULT_PREFIX) {\n return `${prefix}${UNIQUE_ID_COUNTER++}`;\n}\n\n/**\n * Returns a random element from array\n * @param array - the array to return a random element from\n * @param {string} seed - use a string to seed the randomization, so it returns the same element each time\n * based on that string.\n * @returns {*} - the random element\n */\nexport function getRandomElement (array, seed) {\n if (seed) {\n const hash = javaHashCode(seed);\n return array[Math.abs(hash) % array.length];\n } else {\n return array[getRandomInt(array.length)];\n }\n}\n\n/**\n * Returns a hash code for a string.\n * (Compatible to Java's String.hashCode())\n * We use this algo to be in sync with android.\n *\n * The hash code for a string object is computed as\n * s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]\n * using number arithmetic, where s[i] is the i th character\n * of the given string, n is the length of the string,\n * and ^ indicates exponentiation.\n * (The hash value of the empty string is zero.)\n *\n * @param {string} str a string\n * @return {number} a hash code value for the given string.\n */\nexport function javaHashCode (str) {\n let h;\n for (let i = 0; i < str.length; i++) {\n h = Math.imul(31, h) + str.charCodeAt(i) | 0;\n }\n\n return h;\n}\n\n/**\n * Generate a random integer\n * @param {number} max - max range of integer to generate\n * @returns {number} randomly generated integer between 0 and max\n */\nexport function getRandomInt (max) {\n return Math.floor(Math.random() * max);\n}\n\nexport function formatMessages (messages) {\n if (!messages) {\n return [];\n }\n\n return messages.map(message => {\n if (typeof message === 'string') {\n return {\n message,\n type: DEFAULT_VALIDATION_MESSAGE_TYPE,\n };\n }\n\n return message;\n });\n}\n\nexport function filterFormattedMessages (formattedMessages) {\n const validationState = getValidationState(formattedMessages);\n\n if (!formattedMessages || !validationState) {\n return [];\n }\n\n return formattedMessages.filter(message => !!message.message && message.type === validationState);\n}\n\n/*\n * The priority order of message types is as flows: 'error' > 'warning' > 'success'.\n * If any message of type 'error' is present in messages, the input state is considered\n * to be 'error', then 'warning' and lastly 'success'.\n */\nexport function getValidationState (formattedMessages) {\n if (!formattedMessages) {\n return null;\n }\n\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.ERROR)) {\n return VALIDATION_MESSAGE_TYPES.ERROR;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.WARNING)) {\n return VALIDATION_MESSAGE_TYPES.WARNING;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.SUCCESS)) {\n return VALIDATION_MESSAGE_TYPES.SUCCESS;\n }\n\n return null;\n}\n\nexport function hasFormattedMessageOfType (formattedMessages, messageType) {\n if (!formattedMessages || !messageType) {\n return false;\n }\n\n return formattedMessages.some(message => message?.type === messageType);\n}\n\nexport function findFirstFocusableNode (element) {\n return element?.querySelector(FOCUSABLE_SELECTOR);\n}\n\n/* html-fragment component:\n * To render html without wrapping in another element as when using v-html.\n * props: html\n */\nexport const htmlFragment = (props) => {\n return h('div', { innerHTML: props.html });\n};\n\nexport const flushPromises = () => {\n return new Promise((resolve) => {\n scheduler(resolve);\n });\n};\n\n/*\n It is very cumbersome to check if a slot is empty in vue 3. Copied this method from the following thread\n https://github.com/vuejs/core/issues/4733. There is an RFC to fix this but not yet being worked on.\n https://github.com/vuejs/rfcs/discussions/453\n*/\nexport function hasSlotContent (slot, slotProps = {}) {\n if (!slot) return false;\n\n // eslint-disable-next-line complexity\n return slot(slotProps).some((vnode) => {\n if (vnode.type === Comment) return false;\n\n if (Array.isArray(vnode.children) && !vnode.children.length) return false;\n\n return (\n vnode.type !== Text ||\n (typeof vnode.children === 'string' && vnode.children.trim() !== '')\n );\n });\n}\n\n/**\n * Transform a string from kebab-case to PascalCase\n * @param string\n * @returns {string}\n */\nexport const kebabCaseToPascalCase = (string) => {\n return string?.toLowerCase()\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join('');\n};\n\n/**\n * Transform a string from PascalCase to kebab-case\n * @param string\n * @returns {string}\n */\nexport const pascalCaseToKebabCase = (string) => {\n return string\n .replace(/\\.?([A-Z0-9]+)/g, (x, y) => '-' + y.toLowerCase())\n .replace(/^-/, '');\n};\n\nexport const extractVueListeners = (attrs) => {\n const listeners = Object.entries(attrs)\n .filter(([key]) => key.startsWith('on'));\n return Object.fromEntries(listeners);\n};\n\n/*\n* Set's a global timer to debounce the execution of a function.\n* @param { object } func - the function that is going to be called after timeout\n* @param { number } [timeout=300] timeout\n* */\nexport function debounce (func, timeout = 300) {\n clearTimeout(TIMER);\n TIMER = setTimeout(func, timeout);\n}\n\n/**\n * Checks if the element is out of the viewport\n * https://gomakethings.com/how-to-check-if-any-part-of-an-element-is-out-of-the-viewport-with-vanilla-js/\n * @param {HTMLElement} element The element to check\n * @return {Object} A set of booleans for each side of the element\n */\n\nexport function isOutOfViewPort (element) {\n const bounding = element.getBoundingClientRect();\n\n const isOut = {\n top: bounding.top < 0,\n left: bounding.left < 0,\n bottom: bounding.bottom > (window.innerHeight || document.documentElement.clientHeight),\n right: bounding.right > (window.innerWidth || document.documentElement.clientWidth),\n };\n isOut.any = Object.values(isOut).some(val => val);\n isOut.all = Object.values(isOut).every(val => val);\n return isOut;\n}\n\n// match valid characters for a domain name followed by a dot, e.g. \"dialpad.\"\nconst domainNameRegex = /(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)/;\n\n// match valid TLDs for a hostname (outdated list from ~2017)\nconst tldRegerx = new RegExp(\n '(?:' +\n 'com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|' +\n 'za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|' +\n 'il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|' +\n 'ae|ph|online|ng|ee|ws|ve|cat' +\n ')',\n);\n\n// match valid IPv4 addresses, e.g. \"192.158.1.38\"\nconst ipv4Regex = new RegExp(\n '(?:(?:[0-9]|[1-9]\\\\d|1\\\\d{2}|2[0-4]\\\\d|25[0-5])\\\\.){3}' +\n '(?:[0-9]|[1-9]\\\\d|1\\\\d{2}|2[0-4]\\\\d|25[0-5])',\n);\n\n// match hostnames OR IPv4 addresses, e.g. \"dialpad.com\" or \"192.158.1.38\"\nconst hostnameOrIpRegex = new RegExp(\n '(?:' +\n [\n [\n domainNameRegex.source,\n tldRegerx.source,\n ].join('+'),\n ipv4Regex.source,\n ].join('|') +\n ')',\n);\n\n// match URL paths, e.g. \"/news\"\nconst urlPathRegex = /(?:(?:[;/][^#?<>\\s]*)?)/;\n\n// match URL queries and fragments, e.g. \"?cache=1&new=true\" or \"#heading1\"\nconst urlQueryOrFragmentRegex = /(?:(?:\\?[^#<>\\s]+)?(?:#[^<>\\s]+)?)/;\n\n// match complete hostnames or IPv4 addresses without a protocol and with optional\n// URL paths, queries and fragments e.g. \"dialpad.com/news?cache=1#heading1\"\nconst urlWithoutProtocolRegex = new RegExp(\n '\\\\b' +\n [\n hostnameOrIpRegex.source,\n urlPathRegex.source,\n urlQueryOrFragmentRegex.source,\n '(?!\\\\w)',\n ].join('+'),\n);\n\n// match complete hostnames with protocols and optional URL paths, queries and fragments,\n// e.g. \"ws://localhost:9011\" or \"https://dialpad.com/news?cache=1#heading1\"\nconst urlWithProtocolRegex = /\\b[a-z\\d.-]+:\\/\\/[^<>\\s]+/;\n\n// match email addresses with an optional \"mailto:\" prefix and URL queries, e.g.\n// \"hey@dialpad.com\" or \"mailto:hey@dialpad.com?subject=Hi&body=Hey%20there\"\nconst emailAddressRegex = new RegExp(\n '(?:mailto:)?' +\n '[a-z0-9!#$%&\\'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&\\'*+/=?^_`{|}~-]+)*@' +\n [\n hostnameOrIpRegex.source,\n urlQueryOrFragmentRegex.source,\n ].join('+') +\n '(?!\\\\w)',\n);\n\n/**\n * Match phone numbers, e.g. \"765-8813\", \"(778) 765-8813\" or \"+17787658813\".\n * @param {number} minLength\n * @param {number} maxLength\n * @returns {RegExp}\n */\nexport function getPhoneNumberRegex (minLength = 7, maxLength = 15) {\n // Some older browser versions don't support lookbehind, so provide a RegExp\n // version without it. It fails just one test case, so IMO it's still good\n // enough to use. https://caniuse.com/js-regexp-lookbehind\n try {\n return new RegExp(\n '(?:^|(?<=\\\\W))' +\n '(?![\\\\s\\\\-])\\\\+?(?:[0-9()\\\\- \\\\t]' +\n `{${minLength},${maxLength}}` +\n ')(?=\\\\b)(?=\\\\W(?=\\\\W|$)|\\\\s|$)',\n );\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('This browser doesn\\'t support regex lookahead/lookbehind');\n }\n\n return new RegExp(\n '(?![\\\\s\\\\-])\\\\+?(?:[0-9()\\\\- \\\\t]' +\n `{${minLength},${maxLength}}` +\n ')(?=\\\\b)(?=\\\\W(?=\\\\W|$)|\\\\s|$)',\n );\n}\n\nconst phoneNumberRegex = getPhoneNumberRegex();\n\n// match all link types\nexport const linkRegex = new RegExp(\n [\n urlWithoutProtocolRegex.source,\n urlWithProtocolRegex.source,\n emailAddressRegex.source,\n phoneNumberRegex.source,\n ].join('|'),\n 'gi',\n);\n\n/**\n * Check if a string is a phone number. Validates only exact matches.\n * @param {string|number} input\n * @returns {boolean}\n */\nexport function isPhoneNumber (input) {\n if (!input || (!['string', 'number'].includes(typeof input))) return false;\n input = input.toString();\n return phoneNumberRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Check if a string is an URL. Validates only exact matches.\n * @param {string} input\n * @returns {boolean}\n */\nexport function isURL (input) {\n if (!input || typeof input !== 'string') return false;\n return urlWithoutProtocolRegex.exec(input)?.[0] === input ||\n urlWithProtocolRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Check if a string is an email address. Validates only exact matches.\n * @param {string} input\n * @returns {boolean}\n */\nexport function isEmailAddress (input) {\n if (!input || typeof input !== 'string') return false;\n return emailAddressRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Concatenate a string removing null or undefined elements\n * avoiding parsing them as string with template strings\n * @param {Array} elements\n * @returns {String}\n */\nexport function safeConcatStrings (elements) {\n return elements.filter(str => !!str).join(' ');\n}\n\n/**\n * Locale safe function to capitalize the first letter of a string.\n * @param {string} str the string to capitalize the first letter of\n * @param {string} locale a string representing the locale to be used. Defaults to 'en-US'\n * @returns The passed in string with the first letter capitalized\n */\nexport function capitalizeFirstLetter (str, locale = 'en-US') {\n return str.replace(/^\\p{CWU}/u, char => char.toLocaleUpperCase(locale));\n}\n\nexport default {\n getUniqueString,\n getRandomElement,\n getRandomInt,\n formatMessages,\n filterFormattedMessages,\n hasFormattedMessageOfType,\n getValidationState,\n htmlFragment,\n flushPromises,\n kebabCaseToPascalCase,\n extractVueListeners,\n debounce,\n isOutOfViewPort,\n getPhoneNumberRegex,\n linkRegex,\n isEmailAddress,\n isPhoneNumber,\n isURL,\n safeConcatStrings,\n capitalizeFirstLetter,\n};\n"],"names":["UNIQUE_ID_COUNTER","TIMER","FOCUSABLE_SELECTOR_NOT_HIDDEN","FOCUSABLE_SELECTOR_NOT_DISABLED","FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED","FOCUSABLE_SELECTOR","scheduler","setImmediate","setTimeout","getUniqueString","prefix","DEFAULT_PREFIX","getRandomElement","array","seed","hash","javaHashCode","Math","abs","length","getRandomInt","str","h","i","imul","charCodeAt","max","floor","random","formatMessages","messages","map","message","type","DEFAULT_VALIDATION_MESSAGE_TYPE","filterFormattedMessages","formattedMessages","validationState","getValidationState","filter","hasFormattedMessageOfType","VALIDATION_MESSAGE_TYPES","ERROR","WARNING","SUCCESS","messageType","some","findFirstFocusableNode","element","querySelector","htmlFragment","props","innerHTML","html","flushPromises","Promise","resolve","hasSlotContent","slot","slotProps","vnode","Comment","Array","isArray","children","Text","trim","kebabCaseToPascalCase","string","toLowerCase","split","word","charAt","toUpperCase","slice","join","pascalCaseToKebabCase","replace","x","y","extractVueListeners","attrs","listeners","Object","entries","key","startsWith","fromEntries","debounce","func","timeout","clearTimeout","isOutOfViewPort","bounding","getBoundingClientRect","isOut","top","left","bottom","window","innerHeight","document","documentElement","clientHeight","right","innerWidth","clientWidth","any","values","val","all","every","domainNameRegex","tldRegerx","RegExp","ipv4Regex","hostnameOrIpRegex","source","urlPathRegex","urlQueryOrFragmentRegex","urlWithoutProtocolRegex","urlWithProtocolRegex","emailAddressRegex","getPhoneNumberRegex","minLength","maxLength","e","console","warn","phoneNumberRegex","linkRegex","isPhoneNumber","input","includes","toString","exec","isURL","isEmailAddress","safeConcatStrings","elements","capitalizeFirstLetter","locale","char","toLocaleUpperCase"],"mappings":";;;;AAWA,IAAIA,oBAAoB;AACxB,IAAIC;AAGJ,MAAMC,gCAAgC;AAEtC,MAAMC,kCAAkC;AAExC,MAAMC,yCAAyC,GAAGF,6BAA6B,IAAIC,+BAA+B;AAElH,MAAME,qBAAqB,kBAAkBD,sCAAsC;AAEnF,MAAME,YAAY,OAAOC,iBAAiB,aAAaA,eAAeC;AAE/D,SAASC,gBAAiBC,SAASC,iCAAgB;AACxD,SAAO,GAAGD,MAAM,GAAGV,mBAAmB;AACxC;AASO,SAASY,iBAAkBC,OAAOC,MAAM;AAC7C,MAAIA,MAAM;AACR,UAAMC,OAAOC,aAAaF,IAAI;AAC9B,WAAOD,MAAMI,KAAKC,IAAIH,IAAI,IAAIF,MAAMM,MAAM;AAAA,EAC5C,OAAO;AACL,WAAON,MAAMO,aAAaP,MAAMM,MAAM,CAAC;AAAA,EACzC;AACF;AAiBO,SAASH,aAAcK,KAAK;AACjC,MAAIC;AACJ,WAASC,IAAI,GAAGA,IAAIF,IAAIF,QAAQI,KAAK;AACnCD,QAAIL,KAAKO,KAAK,IAAIF,CAAC,IAAID,IAAII,WAAWF,CAAC,IAAI;AAAA,EAC7C;AAEA,SAAOD;AACT;AAOO,SAASF,aAAcM,KAAK;AACjC,SAAOT,KAAKU,MAAMV,KAAKW,OAAQ,IAAGF,GAAG;AACvC;AAEO,SAASG,eAAgBC,UAAU;AACxC,MAAI,CAACA,UAAU;AACb,WAAO;EACT;AAEA,SAAOA,SAASC,IAAIC,aAAW;AAC7B,QAAI,OAAOA,YAAY,UAAU;AAC/B,aAAO;AAAA,QACLA;AAAAA,QACAC,MAAMC,iBAAAA;AAAAA;IAEV;AAEA,WAAOF;AAAAA,EACT,CAAC;AACH;AAEO,SAASG,wBAA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C5B,MAAI,CAACA,SAAS,OAAOA,UAAU;AAAU,WAAO;AAChD,WAAOZ,6BAAwBe,KAAKH,KAAK,MAAlCZ,mBAAsC,QAAOY,WAClDX,0BAAqBc,KAAKH,KAAK,MAA/BX,mBAAmC,QAAOW;AAC9C;AAOO,SAASK,eAAgBL,OAAO;;AACrC,MAAI,CAACA,SAAS,OAAOA,UAAU;AAAU,WAAO;AAChD,WAAOV,uBAAkBa,KAAKH,KAAK,MAA5BV,mBAAgC,QAAOU;AAChD;AAQO,SAASM,kBAAmBC,UAAU;AAC3C,SAAOA,SAASpG,OAAOlB,SAAO,CAAC,CAACA,GAAG,EAAEsD,KAAK,GAAG;AAC/C;AAQO,SAASiE,sBAAuBvH,KAAKwH,SAAS,SAAS;AAC5D,SAAOxH,IAAIwD,QAAQ,2BAAW,GAAEiE,UAAQA,KAAKC,kBAAkBF,MAAM,CAAC;AACxE;AAEA,MAAe,QAAA;AAAA,EACbpI;AAAAA,EACAG;AAAAA,EACAQ;AAAAA,EACAS;AAAAA,EACAM;AAAAA,EACAK;AAAAA,EACAF;AAAAA,EACAY;AAAAA,EACAI;AAAAA,EACAa;AAAAA,EACAa;AAAAA,EACAQ;AAAAA,EACAI;AAAAA,EACA+B;AAAAA,EACAO;AAAAA,EACAO;AAAAA,EACAN;AAAAA,EACAK;AAAAA,EACAE;AAAAA,EACAE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -74,7 +74,9 @@ function findFirstFocusableNode(element) {
74
74
  return element == null ? void 0 : element.querySelector(FOCUSABLE_SELECTOR);
75
75
  }
76
76
  const htmlFragment = (props) => {
77
- return h("div", { innerHTML: props.html });
77
+ return h("div", {
78
+ innerHTML: props.html
79
+ });
78
80
  };
79
81
  const flushPromises = () => {
80
82
  return new Promise((resolve) => {
@@ -119,60 +121,24 @@ function isOutOfViewPort(element) {
119
121
  return isOut;
120
122
  }
121
123
  const domainNameRegex = /(?:(?:[^\s!@#$%^&*()_=+[\]{}\\|;:'",.<>/?]+)\.)/;
122
- const tldRegerx = new RegExp(
123
- "(?:com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|ae|ph|online|ng|ee|ws|ve|cat)"
124
- );
125
- const ipv4Regex = new RegExp(
126
- "(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])"
127
- );
128
- const hostnameOrIpRegex = new RegExp(
129
- "(?:" + [
130
- [
131
- domainNameRegex.source,
132
- tldRegerx.source
133
- ].join("+"),
134
- ipv4Regex.source
135
- ].join("|") + ")"
136
- );
124
+ const tldRegerx = new RegExp("(?:com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|ae|ph|online|ng|ee|ws|ve|cat)");
125
+ const ipv4Regex = new RegExp("(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])");
126
+ const hostnameOrIpRegex = new RegExp("(?:" + [[domainNameRegex.source, tldRegerx.source].join("+"), ipv4Regex.source].join("|") + ")");
137
127
  const urlPathRegex = /(?:(?:[;/][^#?<>\s]*)?)/;
138
128
  const urlQueryOrFragmentRegex = /(?:(?:\?[^#<>\s]+)?(?:#[^<>\s]+)?)/;
139
- const urlWithoutProtocolRegex = new RegExp(
140
- "\\b" + [
141
- hostnameOrIpRegex.source,
142
- urlPathRegex.source,
143
- urlQueryOrFragmentRegex.source,
144
- "(?!\\w)"
145
- ].join("+")
146
- );
129
+ const urlWithoutProtocolRegex = new RegExp("\\b" + [hostnameOrIpRegex.source, urlPathRegex.source, urlQueryOrFragmentRegex.source, "(?!\\w)"].join("+"));
147
130
  const urlWithProtocolRegex = /\b[a-z\d.-]+:\/\/[^<>\s]+/;
148
- const emailAddressRegex = new RegExp(
149
- "(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" + [
150
- hostnameOrIpRegex.source,
151
- urlQueryOrFragmentRegex.source
152
- ].join("+") + "(?!\\w)"
153
- );
131
+ const emailAddressRegex = new RegExp("(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" + [hostnameOrIpRegex.source, urlQueryOrFragmentRegex.source].join("+") + "(?!\\w)");
154
132
  function getPhoneNumberRegex(minLength = 7, maxLength = 15) {
155
133
  try {
156
- return new RegExp(
157
- `(?:^|(?<=\\W))(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`
158
- );
134
+ return new RegExp(`(?:^|(?<=\\W))(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`);
159
135
  } catch (e) {
160
136
  console.warn("This browser doesn't support regex lookahead/lookbehind");
161
137
  }
162
- return new RegExp(
163
- `(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`
164
- );
138
+ return new RegExp(`(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`);
165
139
  }
166
140
  const phoneNumberRegex = getPhoneNumberRegex();
167
- const linkRegex = new RegExp(
168
- [
169
- urlWithoutProtocolRegex.source,
170
- urlWithProtocolRegex.source,
171
- emailAddressRegex.source,
172
- phoneNumberRegex.source
173
- ].join("|"),
174
- "gi"
175
- );
141
+ const linkRegex = new RegExp([urlWithoutProtocolRegex.source, urlWithProtocolRegex.source, emailAddressRegex.source, phoneNumberRegex.source].join("|"), "gi");
176
142
  function isPhoneNumber(input) {
177
143
  var _a;
178
144
  if (!input || !["string", "number"].includes(typeof input))
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../common/utils/index.js"],"sourcesContent":["import {\n DEFAULT_PREFIX,\n DEFAULT_VALIDATION_MESSAGE_TYPE,\n VALIDATION_MESSAGE_TYPES,\n} from '../constants';\nimport {\n h,\n Comment,\n Text,\n} from 'vue';\n\nlet UNIQUE_ID_COUNTER = 0;\nlet TIMER;\n\n// selector to find focusable not hidden inputs\nconst FOCUSABLE_SELECTOR_NOT_HIDDEN = 'input:not([type=hidden]):not(:disabled)';\n// selector to find focusable not disables elements\nconst FOCUSABLE_SELECTOR_NOT_DISABLED = 'select:not(:disabled),textarea:not(:disabled),button:not(:disabled)';\n// // selector to find focusable not hidden and disabled elements\nconst FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED = `${FOCUSABLE_SELECTOR_NOT_HIDDEN},${FOCUSABLE_SELECTOR_NOT_DISABLED}`;\n// selector to find focusable elements\nconst FOCUSABLE_SELECTOR = `a,frame,iframe,${FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED},*[tabindex]`;\n\nconst scheduler = typeof setImmediate === 'function' ? setImmediate : setTimeout;\n\nexport function getUniqueString (prefix = DEFAULT_PREFIX) {\n return `${prefix}${UNIQUE_ID_COUNTER++}`;\n}\n\n/**\n * Returns a random element from array\n * @param array - the array to return a random element from\n * @param {string} seed - use a string to seed the randomization, so it returns the same element each time\n * based on that string.\n * @returns {*} - the random element\n */\nexport function getRandomElement (array, seed) {\n if (seed) {\n const hash = javaHashCode(seed);\n return array[Math.abs(hash) % array.length];\n } else {\n return array[getRandomInt(array.length)];\n }\n}\n\n/**\n * Returns a hash code for a string.\n * (Compatible to Java's String.hashCode())\n * We use this algo to be in sync with android.\n *\n * The hash code for a string object is computed as\n * s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]\n * using number arithmetic, where s[i] is the i th character\n * of the given string, n is the length of the string,\n * and ^ indicates exponentiation.\n * (The hash value of the empty string is zero.)\n *\n * @param {string} str a string\n * @return {number} a hash code value for the given string.\n */\nexport function javaHashCode (str) {\n let h;\n for (let i = 0; i < str.length; i++) {\n h = Math.imul(31, h) + str.charCodeAt(i) | 0;\n }\n\n return h;\n}\n\n/**\n * Generate a random integer\n * @param {number} max - max range of integer to generate\n * @returns {number} randomly generated integer between 0 and max\n */\nexport function getRandomInt (max) {\n return Math.floor(Math.random() * max);\n}\n\nexport function formatMessages (messages) {\n if (!messages) {\n return [];\n }\n\n return messages.map(message => {\n if (typeof message === 'string') {\n return {\n message,\n type: DEFAULT_VALIDATION_MESSAGE_TYPE,\n };\n }\n\n return message;\n });\n}\n\nexport function filterFormattedMessages (formattedMessages) {\n const validationState = getValidationState(formattedMessages);\n\n if (!formattedMessages || !validationState) {\n return [];\n }\n\n return formattedMessages.filter(message => !!message.message && message.type === validationState);\n}\n\n/*\n * The priority order of message types is as flows: 'error' > 'warning' > 'success'.\n * If any message of type 'error' is present in messages, the input state is considered\n * to be 'error', then 'warning' and lastly 'success'.\n */\nexport function getValidationState (formattedMessages) {\n if (!formattedMessages) {\n return null;\n }\n\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.ERROR)) {\n return VALIDATION_MESSAGE_TYPES.ERROR;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.WARNING)) {\n return VALIDATION_MESSAGE_TYPES.WARNING;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.SUCCESS)) {\n return VALIDATION_MESSAGE_TYPES.SUCCESS;\n }\n\n return null;\n}\n\nexport function hasFormattedMessageOfType (formattedMessages, messageType) {\n if (!formattedMessages || !messageType) {\n return false;\n }\n\n return formattedMessages.some(message => message?.type === messageType);\n}\n\nexport function findFirstFocusableNode (element) {\n return element?.querySelector(FOCUSABLE_SELECTOR);\n}\n\n/* html-fragment component:\n * To render html without wrapping in another element as when using v-html.\n * props: html\n */\nexport const htmlFragment = (props) => {\n return h('div', { innerHTML: props.html });\n};\n\nexport const flushPromises = () => {\n return new Promise((resolve) => {\n scheduler(resolve);\n });\n};\n\n/*\n It is very cumbersome to check if a slot is empty in vue 3. Copied this method from the following thread\n https://github.com/vuejs/core/issues/4733. There is an RFC to fix this but not yet being worked on.\n https://github.com/vuejs/rfcs/discussions/453\n*/\nexport function hasSlotContent (slot, slotProps = {}) {\n if (!slot) return false;\n\n // eslint-disable-next-line complexity\n return slot(slotProps).some((vnode) => {\n if (vnode.type === Comment) return false;\n\n if (Array.isArray(vnode.children) && !vnode.children.length) return false;\n\n return (\n vnode.type !== Text ||\n (typeof vnode.children === 'string' && vnode.children.trim() !== '')\n );\n });\n}\n\n/**\n * Transform a string from kebab-case to PascalCase\n * @param string\n * @returns {string}\n */\nexport const kebabCaseToPascalCase = (string) => {\n return string?.toLowerCase()\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join('');\n};\n\n/**\n * Transform a string from PascalCase to kebab-case\n * @param string\n * @returns {string}\n */\nexport const pascalCaseToKebabCase = (string) => {\n return string\n .replace(/\\.?([A-Z0-9]+)/g, (x, y) => '-' + y.toLowerCase())\n .replace(/^-/, '');\n};\n\nexport const extractVueListeners = (attrs) => {\n const listeners = Object.entries(attrs)\n .filter(([key]) => key.startsWith('on'));\n return Object.fromEntries(listeners);\n};\n\n/*\n* Set's a global timer to debounce the execution of a function.\n* @param { object } func - the function that is going to be called after timeout\n* @param { number } [timeout=300] timeout\n* */\nexport function debounce (func, timeout = 300) {\n clearTimeout(TIMER);\n TIMER = setTimeout(func, timeout);\n}\n\n/**\n * Checks if the element is out of the viewport\n * https://gomakethings.com/how-to-check-if-any-part-of-an-element-is-out-of-the-viewport-with-vanilla-js/\n * @param {HTMLElement} element The element to check\n * @return {Object} A set of booleans for each side of the element\n */\n\nexport function isOutOfViewPort (element) {\n const bounding = element.getBoundingClientRect();\n\n const isOut = {\n top: bounding.top < 0,\n left: bounding.left < 0,\n bottom: bounding.bottom > (window.innerHeight || document.documentElement.clientHeight),\n right: bounding.right > (window.innerWidth || document.documentElement.clientWidth),\n };\n isOut.any = Object.values(isOut).some(val => val);\n isOut.all = Object.values(isOut).every(val => val);\n return isOut;\n}\n\n// match valid characters for a domain name followed by a dot, e.g. \"dialpad.\"\nconst domainNameRegex = /(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)/;\n\n// match valid TLDs for a hostname (outdated list from ~2017)\nconst tldRegerx = new RegExp(\n '(?:' +\n 'com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|' +\n 'za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|' +\n 'il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|' +\n 'ae|ph|online|ng|ee|ws|ve|cat' +\n ')',\n);\n\n// match valid IPv4 addresses, e.g. \"192.158.1.38\"\nconst ipv4Regex = new RegExp(\n '(?:(?:[0-9]|[1-9]\\\\d|1\\\\d{2}|2[0-4]\\\\d|25[0-5])\\\\.){3}' +\n '(?:[0-9]|[1-9]\\\\d|1\\\\d{2}|2[0-4]\\\\d|25[0-5])',\n);\n\n// match hostnames OR IPv4 addresses, e.g. \"dialpad.com\" or \"192.158.1.38\"\nconst hostnameOrIpRegex = new RegExp(\n '(?:' +\n [\n [\n domainNameRegex.source,\n tldRegerx.source,\n ].join('+'),\n ipv4Regex.source,\n ].join('|') +\n ')',\n);\n\n// match URL paths, e.g. \"/news\"\nconst urlPathRegex = /(?:(?:[;/][^#?<>\\s]*)?)/;\n\n// match URL queries and fragments, e.g. \"?cache=1&new=true\" or \"#heading1\"\nconst urlQueryOrFragmentRegex = /(?:(?:\\?[^#<>\\s]+)?(?:#[^<>\\s]+)?)/;\n\n// match complete hostnames or IPv4 addresses without a protocol and with optional\n// URL paths, queries and fragments e.g. \"dialpad.com/news?cache=1#heading1\"\nconst urlWithoutProtocolRegex = new RegExp(\n '\\\\b' +\n [\n hostnameOrIpRegex.source,\n urlPathRegex.source,\n urlQueryOrFragmentRegex.source,\n '(?!\\\\w)',\n ].join('+'),\n);\n\n// match complete hostnames with protocols and optional URL paths, queries and fragments,\n// e.g. \"ws://localhost:9011\" or \"https://dialpad.com/news?cache=1#heading1\"\nconst urlWithProtocolRegex = /\\b[a-z\\d.-]+:\\/\\/[^<>\\s]+/;\n\n// match email addresses with an optional \"mailto:\" prefix and URL queries, e.g.\n// \"hey@dialpad.com\" or \"mailto:hey@dialpad.com?subject=Hi&body=Hey%20there\"\nconst emailAddressRegex = new RegExp(\n '(?:mailto:)?' +\n '[a-z0-9!#$%&\\'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&\\'*+/=?^_`{|}~-]+)*@' +\n [\n hostnameOrIpRegex.source,\n urlQueryOrFragmentRegex.source,\n ].join('+') +\n '(?!\\\\w)',\n);\n\n/**\n * Match phone numbers, e.g. \"765-8813\", \"(778) 765-8813\" or \"+17787658813\".\n * @param {number} minLength\n * @param {number} maxLength\n * @returns {RegExp}\n */\nexport function getPhoneNumberRegex (minLength = 7, maxLength = 15) {\n // Some older browser versions don't support lookbehind, so provide a RegExp\n // version without it. It fails just one test case, so IMO it's still good\n // enough to use. https://caniuse.com/js-regexp-lookbehind\n try {\n return new RegExp(\n '(?:^|(?<=\\\\W))' +\n '(?![\\\\s\\\\-])\\\\+?(?:[0-9()\\\\- \\\\t]' +\n `{${minLength},${maxLength}}` +\n ')(?=\\\\b)(?=\\\\W(?=\\\\W|$)|\\\\s|$)',\n );\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('This browser doesn\\'t support regex lookahead/lookbehind');\n }\n\n return new RegExp(\n '(?![\\\\s\\\\-])\\\\+?(?:[0-9()\\\\- \\\\t]' +\n `{${minLength},${maxLength}}` +\n ')(?=\\\\b)(?=\\\\W(?=\\\\W|$)|\\\\s|$)',\n );\n}\n\nconst phoneNumberRegex = getPhoneNumberRegex();\n\n// match all link types\nexport const linkRegex = new RegExp(\n [\n urlWithoutProtocolRegex.source,\n urlWithProtocolRegex.source,\n emailAddressRegex.source,\n phoneNumberRegex.source,\n ].join('|'),\n 'gi',\n);\n\n/**\n * Check if a string is a phone number. Validates only exact matches.\n * @param {string|number} input\n * @returns {boolean}\n */\nexport function isPhoneNumber (input) {\n if (!input || (!['string', 'number'].includes(typeof input))) return false;\n input = input.toString();\n return phoneNumberRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Check if a string is an URL. Validates only exact matches.\n * @param {string} input\n * @returns {boolean}\n */\nexport function isURL (input) {\n if (!input || typeof input !== 'string') return false;\n return urlWithoutProtocolRegex.exec(input)?.[0] === input ||\n urlWithProtocolRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Check if a string is an email address. Validates only exact matches.\n * @param {string} input\n * @returns {boolean}\n */\nexport function isEmailAddress (input) {\n if (!input || typeof input !== 'string') return false;\n return emailAddressRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Concatenate a string removing null or undefined elements\n * avoiding parsing them as string with template strings\n * @param {Array} elements\n * @returns {String}\n */\nexport function safeConcatStrings (elements) {\n return elements.filter(str => !!str).join(' ');\n}\n\n/**\n * Locale safe function to capitalize the first letter of a string.\n * @param {string} str the string to capitalize the first letter of\n * @param {string} locale a string representing the locale to be used. Defaults to 'en-US'\n * @returns The passed in string with the first letter capitalized\n */\nexport function capitalizeFirstLetter (str, locale = 'en-US') {\n return str.replace(/^\\p{CWU}/u, char => char.toLocaleUpperCase(locale));\n}\n\nexport default {\n getUniqueString,\n getRandomElement,\n getRandomInt,\n formatMessages,\n filterFormattedMessages,\n hasFormattedMessageOfType,\n getValidationState,\n htmlFragment,\n flushPromises,\n kebabCaseToPascalCase,\n extractVueListeners,\n debounce,\n isOutOfViewPort,\n getPhoneNumberRegex,\n linkRegex,\n isEmailAddress,\n isPhoneNumber,\n isURL,\n safeConcatStrings,\n capitalizeFirstLetter,\n};\n"],"names":["h"],"mappings":";;AAWA,IAAI,oBAAoB;AACxB,IAAI;AAGJ,MAAM,gCAAgC;AAEtC,MAAM,kCAAkC;AAExC,MAAM,yCAAyC,GAAG,6BAA6B,IAAI,+BAA+B;AAElH,MAAM,qBAAqB,kBAAkB,sCAAsC;AAEnF,MAAM,YAAY,OAAO,iBAAiB,aAAa,eAAe;AAE/D,SAAS,gBAAiB,SAAS,gBAAgB;AACxD,SAAO,GAAG,MAAM,GAAG,mBAAmB;AACxC;AASO,SAAS,iBAAkB,OAAO,MAAM;AAC7C,MAAI,MAAM;AACR,UAAM,OAAO,aAAa,IAAI;AAC9B,WAAO,MAAM,KAAK,IAAI,IAAI,IAAI,MAAM,MAAM;AAAA,EAC9C,OAAS;AACL,WAAO,MAAM,aAAa,MAAM,MAAM,CAAC;AAAA,EACxC;AACH;AAiBO,SAAS,aAAc,KAAK;AACjC,MAAIA;AACJ,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,IAAAA,KAAI,KAAK,KAAK,IAAIA,EAAC,IAAI,IAAI,WAAW,CAAC,IAAI;AAAA,EAC5C;AAED,SAAOA;AACT;AAOO,SAAS,aAAc,KAAK;AACjC,SAAO,KAAK,MAAM,KAAK,OAAQ,IAAG,GAAG;AACvC;AAEO,SAAS,eAAgB,UAAU;AACxC,MAAI,CAAC,UAAU;AACb,WAAO;EACR;AA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S,OAAO,UAAU;AAAU,WAAO;AAChD,WAAO,6BAAwB,KAAK,KAAK,MAAlC,mBAAsC,QAAO,WAClD,0BAAqB,KAAK,KAAK,MAA/B,mBAAmC,QAAO;AAC9C;AAOO,SAAS,eAAgB,OAAO;;AACrC,MAAI,CAAC,SAAS,OAAO,UAAU;AAAU,WAAO;AAChD,WAAO,uBAAkB,KAAK,KAAK,MAA5B,mBAAgC,QAAO;AAChD;AAQO,SAAS,kBAAmB,UAAU;AAC3C,SAAO,SAAS,OAAO,SAAO,CAAC,CAAC,GAAG,EAAE,KAAK,GAAG;AAC/C;AAQO,SAAS,sBAAuB,KAAK,SAAS,SAAS;AAC5D,SAAO,IAAI,QAAQ,2BAAW,GAAE,UAAQ,KAAK,kBAAkB,MAAM,CAAC;AACxE;AAEA,MAAe,QAAA;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
1
+ {"version":3,"file":"utils.js","sources":["../../common/utils/index.js"],"sourcesContent":["import {\n DEFAULT_PREFIX,\n DEFAULT_VALIDATION_MESSAGE_TYPE,\n VALIDATION_MESSAGE_TYPES,\n} from '../constants';\nimport {\n h,\n Comment,\n Text,\n} from 'vue';\n\nlet UNIQUE_ID_COUNTER = 0;\nlet TIMER;\n\n// selector to find focusable not hidden inputs\nconst FOCUSABLE_SELECTOR_NOT_HIDDEN = 'input:not([type=hidden]):not(:disabled)';\n// selector to find focusable not disables elements\nconst FOCUSABLE_SELECTOR_NOT_DISABLED = 'select:not(:disabled),textarea:not(:disabled),button:not(:disabled)';\n// // selector to find focusable not hidden and disabled elements\nconst FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED = `${FOCUSABLE_SELECTOR_NOT_HIDDEN},${FOCUSABLE_SELECTOR_NOT_DISABLED}`;\n// selector to find focusable elements\nconst FOCUSABLE_SELECTOR = `a,frame,iframe,${FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED},*[tabindex]`;\n\nconst scheduler = typeof setImmediate === 'function' ? setImmediate : setTimeout;\n\nexport function getUniqueString (prefix = DEFAULT_PREFIX) {\n return `${prefix}${UNIQUE_ID_COUNTER++}`;\n}\n\n/**\n * Returns a random element from array\n * @param array - the array to return a random element from\n * @param {string} seed - use a string to seed the randomization, so it returns the same element each time\n * based on that string.\n * @returns {*} - the random element\n */\nexport function getRandomElement (array, seed) {\n if (seed) {\n const hash = javaHashCode(seed);\n return array[Math.abs(hash) % array.length];\n } else {\n return array[getRandomInt(array.length)];\n }\n}\n\n/**\n * Returns a hash code for a string.\n * (Compatible to Java's String.hashCode())\n * We use this algo to be in sync with android.\n *\n * The hash code for a string object is computed as\n * s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]\n * using number arithmetic, where s[i] is the i th character\n * of the given string, n is the length of the string,\n * and ^ indicates exponentiation.\n * (The hash value of the empty string is zero.)\n *\n * @param {string} str a string\n * @return {number} a hash code value for the given string.\n */\nexport function javaHashCode (str) {\n let h;\n for (let i = 0; i < str.length; i++) {\n h = Math.imul(31, h) + str.charCodeAt(i) | 0;\n }\n\n return h;\n}\n\n/**\n * Generate a random integer\n * @param {number} max - max range of integer to generate\n * @returns {number} randomly generated integer between 0 and max\n */\nexport function getRandomInt (max) {\n return Math.floor(Math.random() * max);\n}\n\nexport function formatMessages (messages) {\n if (!messages) {\n return [];\n }\n\n return messages.map(message => {\n if (typeof message === 'string') {\n return {\n message,\n type: DEFAULT_VALIDATION_MESSAGE_TYPE,\n };\n }\n\n return message;\n });\n}\n\nexport function filterFormattedMessages (formattedMessages) {\n const validationState = getValidationState(formattedMessages);\n\n if (!formattedMessages || !validationState) {\n return [];\n }\n\n return formattedMessages.filter(message => !!message.message && message.type === validationState);\n}\n\n/*\n * The priority order of message types is as flows: 'error' > 'warning' > 'success'.\n * If any message of type 'error' is present in messages, the input state is considered\n * to be 'error', then 'warning' and lastly 'success'.\n */\nexport function getValidationState (formattedMessages) {\n if (!formattedMessages) {\n return null;\n }\n\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.ERROR)) {\n return VALIDATION_MESSAGE_TYPES.ERROR;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.WARNING)) {\n return VALIDATION_MESSAGE_TYPES.WARNING;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.SUCCESS)) {\n return VALIDATION_MESSAGE_TYPES.SUCCESS;\n }\n\n return null;\n}\n\nexport function hasFormattedMessageOfType (formattedMessages, messageType) {\n if (!formattedMessages || !messageType) {\n return false;\n }\n\n return formattedMessages.some(message => message?.type === messageType);\n}\n\nexport function findFirstFocusableNode (element) {\n return element?.querySelector(FOCUSABLE_SELECTOR);\n}\n\n/* html-fragment component:\n * To render html without wrapping in another element as when using v-html.\n * props: html\n */\nexport const htmlFragment = (props) => {\n return h('div', { innerHTML: props.html });\n};\n\nexport const flushPromises = () => {\n return new Promise((resolve) => {\n scheduler(resolve);\n });\n};\n\n/*\n It is very cumbersome to check if a slot is empty in vue 3. Copied this method from the following thread\n https://github.com/vuejs/core/issues/4733. There is an RFC to fix this but not yet being worked on.\n https://github.com/vuejs/rfcs/discussions/453\n*/\nexport function hasSlotContent (slot, slotProps = {}) {\n if (!slot) return false;\n\n // eslint-disable-next-line complexity\n return slot(slotProps).some((vnode) => {\n if (vnode.type === Comment) return false;\n\n if (Array.isArray(vnode.children) && !vnode.children.length) return false;\n\n return (\n vnode.type !== Text ||\n (typeof vnode.children === 'string' && vnode.children.trim() !== '')\n );\n });\n}\n\n/**\n * Transform a string from kebab-case to PascalCase\n * @param string\n * @returns {string}\n */\nexport const kebabCaseToPascalCase = (string) => {\n return string?.toLowerCase()\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join('');\n};\n\n/**\n * Transform a string from PascalCase to kebab-case\n * @param string\n * @returns {string}\n */\nexport const pascalCaseToKebabCase = (string) => {\n return string\n .replace(/\\.?([A-Z0-9]+)/g, (x, y) => '-' + y.toLowerCase())\n .replace(/^-/, '');\n};\n\nexport const extractVueListeners = (attrs) => {\n const listeners = Object.entries(attrs)\n .filter(([key]) => key.startsWith('on'));\n return Object.fromEntries(listeners);\n};\n\n/*\n* Set's a global timer to debounce the execution of a function.\n* @param { object } func - the function that is going to be called after timeout\n* @param { number } [timeout=300] timeout\n* */\nexport function debounce (func, timeout = 300) {\n clearTimeout(TIMER);\n TIMER = setTimeout(func, timeout);\n}\n\n/**\n * Checks if the element is out of the viewport\n * https://gomakethings.com/how-to-check-if-any-part-of-an-element-is-out-of-the-viewport-with-vanilla-js/\n * @param {HTMLElement} element The element to check\n * @return {Object} A set of booleans for each side of the element\n */\n\nexport function isOutOfViewPort (element) {\n const bounding = element.getBoundingClientRect();\n\n const isOut = {\n top: bounding.top < 0,\n left: bounding.left < 0,\n bottom: bounding.bottom > (window.innerHeight || document.documentElement.clientHeight),\n right: bounding.right > (window.innerWidth || document.documentElement.clientWidth),\n };\n isOut.any = Object.values(isOut).some(val => val);\n isOut.all = Object.values(isOut).every(val => val);\n return isOut;\n}\n\n// match valid characters for a domain name followed by a dot, e.g. \"dialpad.\"\nconst domainNameRegex = /(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)/;\n\n// match valid TLDs for a hostname (outdated list from ~2017)\nconst tldRegerx = new RegExp(\n '(?:' +\n 'com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|' +\n 'za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|' +\n 'il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|' +\n 'ae|ph|online|ng|ee|ws|ve|cat' +\n ')',\n);\n\n// match valid IPv4 addresses, e.g. \"192.158.1.38\"\nconst ipv4Regex = new RegExp(\n '(?:(?:[0-9]|[1-9]\\\\d|1\\\\d{2}|2[0-4]\\\\d|25[0-5])\\\\.){3}' +\n '(?:[0-9]|[1-9]\\\\d|1\\\\d{2}|2[0-4]\\\\d|25[0-5])',\n);\n\n// match hostnames OR IPv4 addresses, e.g. \"dialpad.com\" or \"192.158.1.38\"\nconst hostnameOrIpRegex = new RegExp(\n '(?:' +\n [\n [\n domainNameRegex.source,\n tldRegerx.source,\n ].join('+'),\n ipv4Regex.source,\n ].join('|') +\n ')',\n);\n\n// match URL paths, e.g. \"/news\"\nconst urlPathRegex = /(?:(?:[;/][^#?<>\\s]*)?)/;\n\n// match URL queries and fragments, e.g. \"?cache=1&new=true\" or \"#heading1\"\nconst urlQueryOrFragmentRegex = /(?:(?:\\?[^#<>\\s]+)?(?:#[^<>\\s]+)?)/;\n\n// match complete hostnames or IPv4 addresses without a protocol and with optional\n// URL paths, queries and fragments e.g. \"dialpad.com/news?cache=1#heading1\"\nconst urlWithoutProtocolRegex = new RegExp(\n '\\\\b' +\n [\n hostnameOrIpRegex.source,\n urlPathRegex.source,\n urlQueryOrFragmentRegex.source,\n '(?!\\\\w)',\n ].join('+'),\n);\n\n// match complete hostnames with protocols and optional URL paths, queries and fragments,\n// e.g. \"ws://localhost:9011\" or \"https://dialpad.com/news?cache=1#heading1\"\nconst urlWithProtocolRegex = /\\b[a-z\\d.-]+:\\/\\/[^<>\\s]+/;\n\n// match email addresses with an optional \"mailto:\" prefix and URL queries, e.g.\n// \"hey@dialpad.com\" or \"mailto:hey@dialpad.com?subject=Hi&body=Hey%20there\"\nconst emailAddressRegex = new RegExp(\n '(?:mailto:)?' +\n '[a-z0-9!#$%&\\'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&\\'*+/=?^_`{|}~-]+)*@' +\n [\n hostnameOrIpRegex.source,\n urlQueryOrFragmentRegex.source,\n ].join('+') +\n '(?!\\\\w)',\n);\n\n/**\n * Match phone numbers, e.g. \"765-8813\", \"(778) 765-8813\" or \"+17787658813\".\n * @param {number} minLength\n * @param {number} maxLength\n * @returns {RegExp}\n */\nexport function getPhoneNumberRegex (minLength = 7, maxLength = 15) {\n // Some older browser versions don't support lookbehind, so provide a RegExp\n // version without it. It fails just one test case, so IMO it's still good\n // enough to use. https://caniuse.com/js-regexp-lookbehind\n try {\n return new RegExp(\n '(?:^|(?<=\\\\W))' +\n '(?![\\\\s\\\\-])\\\\+?(?:[0-9()\\\\- \\\\t]' +\n `{${minLength},${maxLength}}` +\n ')(?=\\\\b)(?=\\\\W(?=\\\\W|$)|\\\\s|$)',\n );\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('This browser doesn\\'t support regex lookahead/lookbehind');\n }\n\n return new RegExp(\n '(?![\\\\s\\\\-])\\\\+?(?:[0-9()\\\\- \\\\t]' +\n `{${minLength},${maxLength}}` +\n ')(?=\\\\b)(?=\\\\W(?=\\\\W|$)|\\\\s|$)',\n );\n}\n\nconst phoneNumberRegex = getPhoneNumberRegex();\n\n// match all link types\nexport const linkRegex = new RegExp(\n [\n urlWithoutProtocolRegex.source,\n urlWithProtocolRegex.source,\n emailAddressRegex.source,\n phoneNumberRegex.source,\n ].join('|'),\n 'gi',\n);\n\n/**\n * Check if a string is a phone number. Validates only exact matches.\n * @param {string|number} input\n * @returns {boolean}\n */\nexport function isPhoneNumber (input) {\n if (!input || (!['string', 'number'].includes(typeof input))) return false;\n input = input.toString();\n return phoneNumberRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Check if a string is an URL. Validates only exact matches.\n * @param {string} input\n * @returns {boolean}\n */\nexport function isURL (input) {\n if (!input || typeof input !== 'string') return false;\n return urlWithoutProtocolRegex.exec(input)?.[0] === input ||\n urlWithProtocolRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Check if a string is an email address. Validates only exact matches.\n * @param {string} input\n * @returns {boolean}\n */\nexport function isEmailAddress (input) {\n if (!input || typeof input !== 'string') return false;\n return emailAddressRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Concatenate a string removing null or undefined elements\n * avoiding parsing them as string with template strings\n * @param {Array} elements\n * @returns {String}\n */\nexport function safeConcatStrings (elements) {\n return elements.filter(str => !!str).join(' ');\n}\n\n/**\n * Locale safe function to capitalize the first letter of a string.\n * @param {string} str the string to capitalize the first letter of\n * @param {string} locale a string representing the locale to be used. Defaults to 'en-US'\n * @returns The passed in string with the first letter capitalized\n */\nexport function capitalizeFirstLetter (str, locale = 'en-US') {\n return str.replace(/^\\p{CWU}/u, char => char.toLocaleUpperCase(locale));\n}\n\nexport default {\n getUniqueString,\n getRandomElement,\n getRandomInt,\n formatMessages,\n filterFormattedMessages,\n hasFormattedMessageOfType,\n getValidationState,\n htmlFragment,\n flushPromises,\n kebabCaseToPascalCase,\n extractVueListeners,\n debounce,\n isOutOfViewPort,\n getPhoneNumberRegex,\n linkRegex,\n isEmailAddress,\n isPhoneNumber,\n isURL,\n safeConcatStrings,\n capitalizeFirstLetter,\n};\n"],"names":["UNIQUE_ID_COUNTER","TIMER","FOCUSABLE_SELECTOR_NOT_HIDDEN","FOCUSABLE_SELECTOR_NOT_DISABLED","FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED","FOCUSABLE_SELECTOR","scheduler","setImmediate","setTimeout","getUniqueString","prefix","DEFAULT_PREFIX","getRandomElement","array","seed","hash","javaHashCode","Math","abs","length","getRandomInt","str","h","i","imul","charCodeAt","max","floor","random","formatMessages","messages","map","message","type","DEFAULT_VALIDATION_MESSAGE_TYPE","filterFormattedMessages","formattedMessages","validationState","getValidationState","filter","hasFormattedMessageOfType","VALIDATION_MESSAGE_TYPES","ERROR","WARNING","SUCCESS","messageType","some","findFirstFocusableNode","element","querySelector","htmlFragment","props","innerHTML","html","flushPromises","Promise","resolve","hasSlotContent","slot","slotProps","vnode","Comment","Array","isArray","children","Text","trim","kebabCaseToPascalCase","string","toLowerCase","split","word","charAt","toUpperCase","slice","join","pascalCaseToKebabCase","replace","x","y","extractVueListeners","attrs","listeners","Object","entries","key","startsWith","fromEntries","debounce","func","timeout","clearTimeout","isOutOfViewPort","bounding","getBoundingClientRect","isOut","top","left","bottom","window","innerHeight","document","documentElement","clientHeight","right","innerWidth","clientWidth","any","values","val","all","every","domainNameRegex","tldRegerx","RegExp","ipv4Regex","hostnameOrIpRegex","source","urlPathRegex","urlQueryOrFragmentRegex","urlWithoutProtocolRegex","urlWithProtocolRegex","emailAddressRegex","getPhoneNumberRegex","minLength","maxLength","e","console","warn","phoneNumberRegex","linkRegex","isPhoneNumber","input","includes","toString","exec","isURL","isEmailAddress","safeConcatStrings","elements","capitalizeFirstLetter","locale","char","toLocaleUpperCase"],"mappings":";;AAWA,IAAIA,oBAAoB;AACxB,IAAIC;AAGJ,MAAMC,gCAAgC;AAEtC,MAAMC,kCAAkC;AAExC,MAAMC,yCAAyC,GAAGF,6BAA6B,IAAIC,+BAA+B;AAElH,MAAME,qBAAqB,kBAAkBD,sCAAsC;AAEnF,MAAME,YAAY,OAAOC,iBAAiB,aAAaA,eAAeC;AAE/D,SAASC,gBAAiBC,SAASC,gBAAgB;AACxD,SAAO,GAAGD,MAAM,GAAGV,mBAAmB;AACxC;AASO,SAASY,iBAAkBC,OAAOC,MAAM;AAC7C,MAAIA,MAAM;AACR,UAAMC,OAAOC,aAAaF,IAAI;AAC9B,WAAOD,MAAMI,KAAKC,IAAIH,IAAI,IAAIF,MAAMM,MAAM;AAAA,EAC5C,OAAO;AACL,WAAON,MAAMO,aAAaP,MAAMM,MAAM,CAAC;AAAA,EACzC;AACF;AAiBO,SAASH,aAAcK,KAAK;AACjC,MAAIC;AACJ,WAASC,IAAI,GAAGA,IAAIF,IAAIF,QAAQI,KAAK;AACnCD,IAAAA,KAAIL,KAAKO,KAAK,IAAIF,EAAC,IAAID,IAAII,WAAWF,CAAC,I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ACrBK,kBAAkBL,QAClBY,iBAAiBZ,MAAM,EACvB1C,KAAK,GAAG,GACV,IACF;AAOO,SAASwD,cAAeC,OAAO;;AACpC,MAAI,CAACA,SAAU,CAAC,CAAC,UAAU,QAAQ,EAAEC,SAAS,OAAOD,KAAK;AAAI,WAAO;AACrEA,UAAQA,MAAME;AACd,WAAOL,sBAAiBM,KAAKH,KAAK,MAA3BH,mBAA+B,QAAOG;AAC/C;AAOO,SAASI,MAAOJ,OAAO;;AAC5B,MAAI,CAACA,SAAS,OAAOA,UAAU;AAAU,WAAO;AAChD,WAAOZ,6BAAwBe,KAAKH,KAAK,MAAlCZ,mBAAsC,QAAOY,WAClDX,0BAAqBc,KAAKH,KAAK,MAA/BX,mBAAmC,QAAOW;AAC9C;AAOO,SAASK,eAAgBL,OAAO;;AACrC,MAAI,CAACA,SAAS,OAAOA,UAAU;AAAU,WAAO;AAChD,WAAOV,uBAAkBa,KAAKH,KAAK,MAA5BV,mBAAgC,QAAOU;AAChD;AAQO,SAASM,kBAAmBC,UAAU;AAC3C,SAAOA,SAASpG,OAAOlB,SAAO,CAAC,CAACA,GAAG,EAAEsD,KAAK,GAAG;AAC/C;AAQO,SAASiE,sBAAuBvH,KAAKwH,SAAS,SAAS;AAC5D,SAAOxH,IAAIwD,QAAQ,2BAAW,GAAEiE,UAAQA,KAAKC,kBAAkBF,MAAM,CAAC;AACxE;AAEA,MAAe,QAAA;AAAA,EACbpI;AAAAA,EACAG;AAAAA,EACAQ;AAAAA,EACAS;AAAAA,EACAM;AAAAA,EACAK;AAAAA,EACAF;AAAAA,EACAY;AAAAA,EACAI;AAAAA,EACAa;AAAAA,EACAa;AAAAA,EACAQ;AAAAA,EACAI;AAAAA,EACA+B;AAAAA,EACAO;AAAAA,EACAO;AAAAA,EACAN;AAAAA,EACAK;AAAAA,EACAE;AAAAA,EACAE;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"validators.cjs","sources":["../../common/validators/index.js"],"sourcesContent":["import {\n VALIDATION_MESSAGE_TYPES,\n} from '../constants';\n\nexport function validationMessageValidator (rawMessages) {\n if (!rawMessages) {\n return true;\n }\n\n return rawMessages.every(message => {\n if (typeof message === 'string') {\n return true;\n }\n\n if (typeof message === 'object') {\n return Object.values(VALIDATION_MESSAGE_TYPES).includes(message?.type);\n }\n\n return false;\n });\n}\n\nexport default {\n validationMessageValidator,\n};\n"],"names":["VALIDATION_MESSAGE_TYPES"],"mappings":";;;AAIO,SAAS,2BAA4B,aAAa;AACvD,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACR;AAED,SAAO,YAAY,MAAM,aAAW;AAClC,QAAI,OAAO,YAAY,UAAU;AAC/B,aAAO;AAAA,IACR;AAED,QAAI,OAAO,YAAY,UAAU;AAC/B,aAAO,OAAO,OAAOA,iBAAwB,wBAAA,EAAE,SAAS,mCAAS,IAAI;AAAA,IACtE;AAED,WAAO;AAAA,EACX,CAAG;AACH;AAEA,MAAe,QAAA;AAAA,EACb;AACF;;;"}
1
+ {"version":3,"file":"validators.cjs","sources":["../../common/validators/index.js"],"sourcesContent":["import {\n VALIDATION_MESSAGE_TYPES,\n} from '../constants';\n\nexport function validationMessageValidator (rawMessages) {\n if (!rawMessages) {\n return true;\n }\n\n return rawMessages.every(message => {\n if (typeof message === 'string') {\n return true;\n }\n\n if (typeof message === 'object') {\n return Object.values(VALIDATION_MESSAGE_TYPES).includes(message?.type);\n }\n\n return false;\n });\n}\n\nexport default {\n validationMessageValidator,\n};\n"],"names":["validationMessageValidator","rawMessages","every","message","Object","values","VALIDATION_MESSAGE_TYPES","includes","type"],"mappings":";;;AAIO,SAASA,2BAA4BC,aAAa;AACvD,MAAI,CAACA,aAAa;AAChB,WAAO;AAAA,EACT;AAEA,SAAOA,YAAYC,MAAMC,aAAW;AAClC,QAAI,OAAOA,YAAY,UAAU;AAC/B,aAAO;AAAA,IACT;AAEA,QAAI,OAAOA,YAAY,UAAU;AAC/B,aAAOC,OAAOC,OAAOC,iBAAwB,wBAAA,EAAEC,SAASJ,mCAASK,IAAI;AAAA,IACvE;AAEA,WAAO;AAAA,EACT,CAAC;AACH;AAEA,MAAe,QAAA;AAAA,EACbR;AACF;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"validators.js","sources":["../../common/validators/index.js"],"sourcesContent":["import {\n VALIDATION_MESSAGE_TYPES,\n} from '../constants';\n\nexport function validationMessageValidator (rawMessages) {\n if (!rawMessages) {\n return true;\n }\n\n return rawMessages.every(message => {\n if (typeof message === 'string') {\n return true;\n }\n\n if (typeof message === 'object') {\n return Object.values(VALIDATION_MESSAGE_TYPES).includes(message?.type);\n }\n\n return false;\n });\n}\n\nexport default {\n validationMessageValidator,\n};\n"],"names":[],"mappings":";AAIO,SAAS,2BAA4B,aAAa;AACvD,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACR;AAED,SAAO,YAAY,MAAM,aAAW;AAClC,QAAI,OAAO,YAAY,UAAU;AAC/B,aAAO;AAAA,IACR;AAED,QAAI,OAAO,YAAY,UAAU;AAC/B,aAAO,OAAO,OAAO,wBAAwB,EAAE,SAAS,mCAAS,IAAI;AAAA,IACtE;AAED,WAAO;AAAA,EACX,CAAG;AACH;AAEA,MAAe,QAAA;AAAA,EACb;AACF;"}
1
+ {"version":3,"file":"validators.js","sources":["../../common/validators/index.js"],"sourcesContent":["import {\n VALIDATION_MESSAGE_TYPES,\n} from '../constants';\n\nexport function validationMessageValidator (rawMessages) {\n if (!rawMessages) {\n return true;\n }\n\n return rawMessages.every(message => {\n if (typeof message === 'string') {\n return true;\n }\n\n if (typeof message === 'object') {\n return Object.values(VALIDATION_MESSAGE_TYPES).includes(message?.type);\n }\n\n return false;\n });\n}\n\nexport default {\n validationMessageValidator,\n};\n"],"names":["validationMessageValidator","rawMessages","every","message","Object","values","VALIDATION_MESSAGE_TYPES","includes","type"],"mappings":";AAIO,SAASA,2BAA4BC,aAAa;AACvD,MAAI,CAACA,aAAa;AAChB,WAAO;AAAA,EACT;AAEA,SAAOA,YAAYC,MAAMC,aAAW;AAClC,QAAI,OAAOA,YAAY,UAAU;AAC/B,aAAO;AAAA,IACT;AAEA,QAAI,OAAOA,YAAY,UAAU;AAC/B,aAAOC,OAAOC,OAAOC,wBAAwB,EAAEC,SAASJ,mCAASK,IAAI;AAAA,IACvE;AAEA,WAAO;AAAA,EACT,CAAC;AACH;AAEA,MAAe,QAAA;AAAA,EACbR;AACF;"}