@dialpad/dialtone 9.66.0 → 9.67.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 (801) hide show
  1. package/README.md +17 -0
  2. package/dist/tokens/doc.json +13063 -13063
  3. package/dist/vue2/chunks/{dropdown-YdCyJ5Dq.js → dropdown-6UoczdUY.js} +41 -77
  4. package/dist/vue2/chunks/{dropdown-YdCyJ5Dq.js.map → dropdown-6UoczdUY.js.map} +1 -1
  5. package/dist/vue2/chunks/{dropdown-mjrYu_mK.js → dropdown-pHxnQPzT.js} +41 -77
  6. package/dist/vue2/chunks/{dropdown-mjrYu_mK.js.map → dropdown-pHxnQPzT.js.map} +1 -1
  7. package/dist/vue2/chunks/dropdown_constants-2pGCXy7m.js.map +1 -1
  8. package/dist/vue2/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -1
  9. package/dist/vue2/chunks/{icon_constants-TdxqLsS2.js → icon_constants-Dy4MEUJL.js} +2 -3
  10. package/dist/vue2/chunks/icon_constants-Dy4MEUJL.js.map +1 -0
  11. package/dist/vue2/chunks/{icon_constants-VEA0wI5C.js → icon_constants-QYpmdE0R.js} +2 -3
  12. package/dist/vue2/chunks/icon_constants-QYpmdE0R.js.map +1 -0
  13. package/dist/vue2/chunks/{index-i65YVk-U.js → index-ODod4Oj_.js} +13 -5
  14. package/dist/vue2/chunks/{index-i65YVk-U.js.map → index-ODod4Oj_.js.map} +1 -1
  15. package/dist/vue2/chunks/{index-NYFNZeHH.js → index-anN_sx1F.js} +13 -5
  16. package/dist/vue2/chunks/{index-NYFNZeHH.js.map → index-anN_sx1F.js.map} +1 -1
  17. package/dist/vue2/chunks/{index-mBWay1Qb.js → index-eJ-WWRdf.js} +87 -122
  18. package/dist/vue2/chunks/{index-mBWay1Qb.js.map → index-eJ-WWRdf.js.map} +1 -1
  19. package/dist/vue2/chunks/{index-DyqUqjvI.js → index-gj1jEXP4.js} +87 -122
  20. package/dist/vue2/chunks/{index-DyqUqjvI.js.map → index-gj1jEXP4.js.map} +1 -1
  21. package/dist/vue2/chunks/{input-PhJeBN6r.js → input-6kbd8Pju.js} +9 -3
  22. package/dist/vue2/chunks/{input-PhJeBN6r.js.map → input-6kbd8Pju.js.map} +1 -1
  23. package/dist/vue2/chunks/{input-Hqw33WBe.js → input-Axw-wFj2.js} +9 -3
  24. package/dist/vue2/chunks/{input-Hqw33WBe.js.map → input-Axw-wFj2.js.map} +1 -1
  25. package/dist/vue2/chunks/{input_group-pE6ec9R3.js → input_group-m3cWYUfI.js} +2 -4
  26. package/dist/vue2/chunks/{input_group-ZI7aVGEp.js.map → input_group-m3cWYUfI.js.map} +1 -1
  27. package/dist/vue2/chunks/{input_group-ZI7aVGEp.js → input_group-qVZaS5Bb.js} +2 -4
  28. package/dist/vue2/chunks/{input_group-pE6ec9R3.js.map → input_group-qVZaS5Bb.js.map} +1 -1
  29. package/dist/vue2/chunks/{keyboard_list_navigation-YIqTuw1W.js → keyboard_list_navigation-ScXhrxya.js} +5 -6
  30. package/dist/{vue3/chunks/keyboard_list_navigation-x3D6RcC7.js.map → vue2/chunks/keyboard_list_navigation-ScXhrxya.js.map} +1 -1
  31. package/dist/vue2/chunks/{keyboard_list_navigation-x3D6RcC7.js → keyboard_list_navigation-fJnl_Iox.js} +5 -6
  32. package/dist/{vue3/chunks/keyboard_list_navigation-YIqTuw1W.js.map → vue2/chunks/keyboard_list_navigation-fJnl_Iox.js.map} +1 -1
  33. package/dist/vue2/chunks/link_constants-AfTWrr-n.js.map +1 -1
  34. package/dist/vue2/chunks/link_constants-x8NwdqmA.js.map +1 -1
  35. package/dist/vue2/chunks/list_item_constants-EiqkqZvP.js.map +1 -1
  36. package/dist/vue2/chunks/list_item_constants-u1xcN9Dd.js.map +1 -1
  37. package/dist/vue2/chunks/{modal-OaWxzqNt.js → modal-VgxXAQFP.js} +2 -4
  38. package/dist/vue2/chunks/{modal-OaWxzqNt.js.map → modal-VgxXAQFP.js.map} +1 -1
  39. package/dist/vue2/chunks/{modal-8X6poIZW.js → modal-XOr4kiNZ.js} +2 -4
  40. package/dist/{vue3/chunks/modal-OaWxzqNt.js.map → vue2/chunks/modal-XOr4kiNZ.js.map} +1 -1
  41. package/dist/vue2/chunks/{notice_action-qQr3K2TC.js → notice_action-IRUoLX2d.js} +46 -71
  42. package/dist/vue2/chunks/{notice_action-qQr3K2TC.js.map → notice_action-IRUoLX2d.js.map} +1 -1
  43. package/dist/vue2/chunks/{notice_action-tEvvMg7Q.js → notice_action-P6uDyE9x.js} +46 -71
  44. package/dist/vue2/chunks/{notice_action-tEvvMg7Q.js.map → notice_action-P6uDyE9x.js.map} +1 -1
  45. package/dist/vue2/chunks/notice_constants-7Qt2CQEY.js.map +1 -1
  46. package/dist/vue2/chunks/notice_constants-UXo9e3bS.js.map +1 -1
  47. package/dist/vue2/chunks/{popover_constants-6YkPPbnk.js → popover_constants-WsOUIY-m.js} +47 -26
  48. package/dist/{vue3/chunks/popover_constants-6YkPPbnk.js.map → vue2/chunks/popover_constants-WsOUIY-m.js.map} +1 -1
  49. package/dist/{vue3/chunks/popover_constants-h9MD6WUt.js → vue2/chunks/popover_constants-XnGWXaxX.js} +47 -26
  50. package/dist/vue2/chunks/{popover_constants-6YkPPbnk.js.map → popover_constants-XnGWXaxX.js.map} +1 -1
  51. package/dist/vue2/chunks/{sr_only_close_button-IjMVfBDE.js → sr_only_close_button-81bHIpPu.js} +18 -24
  52. package/dist/vue2/chunks/{sr_only_close_button-IjMVfBDE.js.map → sr_only_close_button-81bHIpPu.js.map} +1 -1
  53. package/dist/vue2/chunks/{sr_only_close_button-2Q9Ny1Nc.js → sr_only_close_button-ZaGdAHz7.js} +18 -24
  54. package/dist/vue2/chunks/{sr_only_close_button-2Q9Ny1Nc.js.map → sr_only_close_button-ZaGdAHz7.js.map} +1 -1
  55. package/dist/vue2/chunks/stack_constants-HraCekPm.js.map +1 -1
  56. package/dist/vue2/chunks/stack_constants-SMzMWnAQ.js.map +1 -1
  57. package/dist/vue2/chunks/{tab-79yMX6m6.js → tab-FcsV5VmK.js} +68 -86
  58. package/dist/vue2/chunks/{tab-muPOS7JE.js.map → tab-FcsV5VmK.js.map} +1 -1
  59. package/dist/vue2/chunks/{tab-muPOS7JE.js → tab-V4cb44Ry.js} +68 -86
  60. package/dist/vue2/chunks/{tab-79yMX6m6.js.map → tab-V4cb44Ry.js.map} +1 -1
  61. package/dist/vue2/common/constants.cjs.map +1 -1
  62. package/dist/vue2/common/constants.js.map +1 -1
  63. package/dist/vue2/common/dates.cjs +1 -3
  64. package/dist/vue2/common/dates.cjs.map +1 -1
  65. package/dist/vue2/common/dates.js +1 -3
  66. package/dist/vue2/common/dates.js.map +1 -1
  67. package/dist/vue2/common/emoji.cjs +1 -1
  68. package/dist/vue2/common/emoji.js +1 -1
  69. package/dist/vue2/common/mixins.cjs +3 -3
  70. package/dist/vue2/common/mixins.js +3 -3
  71. package/dist/vue2/common/utils.cjs +44 -8
  72. package/dist/vue2/common/utils.cjs.map +1 -1
  73. package/dist/vue2/common/utils.js +44 -8
  74. package/dist/vue2/common/utils.js.map +1 -1
  75. package/dist/vue2/common/validators.cjs.map +1 -1
  76. package/dist/vue2/common/validators.js.map +1 -1
  77. package/dist/vue2/component-documentation.json +1 -1
  78. package/dist/vue2/dialtone-vue.cjs +12 -12
  79. package/dist/vue2/dialtone-vue.js +12 -12
  80. package/dist/vue2/lib/attachment-carousel.cjs +48 -172
  81. package/dist/vue2/lib/attachment-carousel.cjs.map +1 -1
  82. package/dist/vue2/lib/attachment-carousel.js +48 -172
  83. package/dist/vue2/lib/attachment-carousel.js.map +1 -1
  84. package/dist/vue2/lib/avatar.cjs +58 -75
  85. package/dist/vue2/lib/avatar.cjs.map +1 -1
  86. package/dist/vue2/lib/avatar.js +58 -75
  87. package/dist/vue2/lib/avatar.js.map +1 -1
  88. package/dist/vue2/lib/badge.cjs +20 -31
  89. package/dist/vue2/lib/badge.cjs.map +1 -1
  90. package/dist/vue2/lib/badge.js +20 -31
  91. package/dist/vue2/lib/badge.js.map +1 -1
  92. package/dist/vue2/lib/banner.cjs +29 -53
  93. package/dist/vue2/lib/banner.cjs.map +1 -1
  94. package/dist/vue2/lib/banner.js +29 -53
  95. package/dist/vue2/lib/banner.js.map +1 -1
  96. package/dist/vue2/lib/breadcrumbs.cjs +30 -36
  97. package/dist/vue2/lib/breadcrumbs.cjs.map +1 -1
  98. package/dist/vue2/lib/breadcrumbs.js +30 -36
  99. package/dist/vue2/lib/breadcrumbs.js.map +1 -1
  100. package/dist/vue2/lib/button-group.cjs +14 -7
  101. package/dist/vue2/lib/button-group.cjs.map +1 -1
  102. package/dist/vue2/lib/button-group.js +14 -7
  103. package/dist/vue2/lib/button-group.js.map +1 -1
  104. package/dist/vue2/lib/button.cjs +62 -55
  105. package/dist/vue2/lib/button.cjs.map +1 -1
  106. package/dist/vue2/lib/button.js +62 -55
  107. package/dist/vue2/lib/button.js.map +1 -1
  108. package/dist/vue2/lib/callbar-button-with-popover.cjs +23 -91
  109. package/dist/vue2/lib/callbar-button-with-popover.cjs.map +1 -1
  110. package/dist/vue2/lib/callbar-button-with-popover.js +23 -91
  111. package/dist/vue2/lib/callbar-button-with-popover.js.map +1 -1
  112. package/dist/vue2/lib/callbar-button.cjs +33 -49
  113. package/dist/vue2/lib/callbar-button.cjs.map +1 -1
  114. package/dist/vue2/lib/callbar-button.js +33 -49
  115. package/dist/vue2/lib/callbar-button.js.map +1 -1
  116. package/dist/vue2/lib/callbox.cjs +15 -78
  117. package/dist/vue2/lib/callbox.cjs.map +1 -1
  118. package/dist/vue2/lib/callbox.js +15 -78
  119. package/dist/vue2/lib/callbox.js.map +1 -1
  120. package/dist/vue2/lib/card.cjs +23 -16
  121. package/dist/vue2/lib/card.cjs.map +1 -1
  122. package/dist/vue2/lib/card.js +23 -16
  123. package/dist/vue2/lib/card.js.map +1 -1
  124. package/dist/vue2/lib/checkbox-group.cjs +15 -3
  125. package/dist/vue2/lib/checkbox-group.cjs.map +1 -1
  126. package/dist/vue2/lib/checkbox-group.js +15 -3
  127. package/dist/vue2/lib/checkbox-group.js.map +1 -1
  128. package/dist/vue2/lib/checkbox.cjs +16 -52
  129. package/dist/vue2/lib/checkbox.cjs.map +1 -1
  130. package/dist/vue2/lib/checkbox.js +16 -52
  131. package/dist/vue2/lib/checkbox.js.map +1 -1
  132. package/dist/vue2/lib/chip.cjs +26 -58
  133. package/dist/vue2/lib/chip.cjs.map +1 -1
  134. package/dist/vue2/lib/chip.js +26 -58
  135. package/dist/vue2/lib/chip.js.map +1 -1
  136. package/dist/vue2/lib/codeblock.cjs +11 -4
  137. package/dist/vue2/lib/codeblock.cjs.map +1 -1
  138. package/dist/vue2/lib/codeblock.js +11 -4
  139. package/dist/vue2/lib/codeblock.js.map +1 -1
  140. package/dist/vue2/lib/collapsible.cjs +34 -91
  141. package/dist/vue2/lib/collapsible.cjs.map +1 -1
  142. package/dist/vue2/lib/collapsible.js +34 -91
  143. package/dist/vue2/lib/collapsible.js.map +1 -1
  144. package/dist/vue2/lib/combobox-multi-select.cjs +38 -131
  145. package/dist/vue2/lib/combobox-multi-select.cjs.map +1 -1
  146. package/dist/vue2/lib/combobox-multi-select.js +38 -131
  147. package/dist/vue2/lib/combobox-multi-select.js.map +1 -1
  148. package/dist/vue2/lib/combobox-with-popover.cjs +39 -130
  149. package/dist/vue2/lib/combobox-with-popover.cjs.map +1 -1
  150. package/dist/vue2/lib/combobox-with-popover.js +39 -130
  151. package/dist/vue2/lib/combobox-with-popover.js.map +1 -1
  152. package/dist/vue2/lib/combobox.cjs +3 -3
  153. package/dist/vue2/lib/combobox.js +3 -3
  154. package/dist/vue2/lib/contact-centers-row.cjs +29 -86
  155. package/dist/vue2/lib/contact-centers-row.cjs.map +1 -1
  156. package/dist/vue2/lib/contact-centers-row.js +29 -86
  157. package/dist/vue2/lib/contact-centers-row.js.map +1 -1
  158. package/dist/vue2/lib/contact-info.cjs +31 -95
  159. package/dist/vue2/lib/contact-info.cjs.map +1 -1
  160. package/dist/vue2/lib/contact-info.js +31 -95
  161. package/dist/vue2/lib/contact-info.js.map +1 -1
  162. package/dist/vue2/lib/contact-row.cjs +18 -61
  163. package/dist/vue2/lib/contact-row.cjs.map +1 -1
  164. package/dist/vue2/lib/contact-row.js +18 -61
  165. package/dist/vue2/lib/contact-row.js.map +1 -1
  166. package/dist/vue2/lib/datepicker.cjs +102 -361
  167. package/dist/vue2/lib/datepicker.cjs.map +1 -1
  168. package/dist/vue2/lib/datepicker.js +102 -361
  169. package/dist/vue2/lib/datepicker.js.map +1 -1
  170. package/dist/vue2/lib/description-list.cjs +12 -11
  171. package/dist/vue2/lib/description-list.cjs.map +1 -1
  172. package/dist/vue2/lib/description-list.js +12 -11
  173. package/dist/vue2/lib/description-list.js.map +1 -1
  174. package/dist/vue2/lib/dropdown.cjs +17 -13
  175. package/dist/vue2/lib/dropdown.cjs.map +1 -1
  176. package/dist/vue2/lib/dropdown.js +17 -13
  177. package/dist/vue2/lib/dropdown.js.map +1 -1
  178. package/dist/vue2/lib/editor.cjs +109 -409
  179. package/dist/vue2/lib/editor.cjs.map +1 -1
  180. package/dist/vue2/lib/editor.js +109 -409
  181. package/dist/vue2/lib/editor.js.map +1 -1
  182. package/dist/vue2/lib/emoji-picker.cjs +234 -512
  183. package/dist/vue2/lib/emoji-picker.cjs.map +1 -1
  184. package/dist/vue2/lib/emoji-picker.js +234 -512
  185. package/dist/vue2/lib/emoji-picker.js.map +1 -1
  186. package/dist/vue2/lib/emoji-row.cjs +31 -69
  187. package/dist/vue2/lib/emoji-row.cjs.map +1 -1
  188. package/dist/vue2/lib/emoji-row.js +31 -69
  189. package/dist/vue2/lib/emoji-row.js.map +1 -1
  190. package/dist/vue2/lib/emoji-text-wrapper.cjs +22 -14
  191. package/dist/vue2/lib/emoji-text-wrapper.cjs.map +1 -1
  192. package/dist/vue2/lib/emoji-text-wrapper.js +22 -14
  193. package/dist/vue2/lib/emoji-text-wrapper.js.map +1 -1
  194. package/dist/vue2/lib/emoji.cjs +13 -40
  195. package/dist/vue2/lib/emoji.cjs.map +1 -1
  196. package/dist/vue2/lib/emoji.js +13 -40
  197. package/dist/vue2/lib/emoji.js.map +1 -1
  198. package/dist/vue2/lib/empty-state.cjs +12 -27
  199. package/dist/vue2/lib/empty-state.cjs.map +1 -1
  200. package/dist/vue2/lib/empty-state.js +12 -27
  201. package/dist/vue2/lib/empty-state.js.map +1 -1
  202. package/dist/vue2/lib/feed-item-row.cjs +27 -106
  203. package/dist/vue2/lib/feed-item-row.cjs.map +1 -1
  204. package/dist/vue2/lib/feed-item-row.js +27 -106
  205. package/dist/vue2/lib/feed-item-row.js.map +1 -1
  206. package/dist/vue2/lib/feed-pill.cjs +35 -90
  207. package/dist/vue2/lib/feed-pill.cjs.map +1 -1
  208. package/dist/vue2/lib/feed-pill.js +35 -90
  209. package/dist/vue2/lib/feed-pill.js.map +1 -1
  210. package/dist/vue2/lib/general-row.cjs +75 -184
  211. package/dist/vue2/lib/general-row.cjs.map +1 -1
  212. package/dist/vue2/lib/general-row.js +75 -184
  213. package/dist/vue2/lib/general-row.js.map +1 -1
  214. package/dist/vue2/lib/group-row.cjs +16 -27
  215. package/dist/vue2/lib/group-row.cjs.map +1 -1
  216. package/dist/vue2/lib/group-row.js +16 -27
  217. package/dist/vue2/lib/group-row.js.map +1 -1
  218. package/dist/vue2/lib/grouped-chip.cjs +20 -68
  219. package/dist/vue2/lib/grouped-chip.cjs.map +1 -1
  220. package/dist/vue2/lib/grouped-chip.js +20 -68
  221. package/dist/vue2/lib/grouped-chip.js.map +1 -1
  222. package/dist/vue2/lib/hovercard.cjs +41 -71
  223. package/dist/vue2/lib/hovercard.cjs.map +1 -1
  224. package/dist/vue2/lib/hovercard.js +41 -71
  225. package/dist/vue2/lib/hovercard.js.map +1 -1
  226. package/dist/vue2/lib/icon.cjs +12 -10
  227. package/dist/vue2/lib/icon.cjs.map +1 -1
  228. package/dist/vue2/lib/icon.js +12 -10
  229. package/dist/vue2/lib/icon.js.map +1 -1
  230. package/dist/vue2/lib/illustration.cjs +12 -9
  231. package/dist/vue2/lib/illustration.cjs.map +1 -1
  232. package/dist/vue2/lib/illustration.js +12 -9
  233. package/dist/vue2/lib/illustration.js.map +1 -1
  234. package/dist/vue2/lib/image-viewer.cjs +23 -88
  235. package/dist/vue2/lib/image-viewer.cjs.map +1 -1
  236. package/dist/vue2/lib/image-viewer.js +23 -88
  237. package/dist/vue2/lib/image-viewer.js.map +1 -1
  238. package/dist/vue2/lib/input-group.cjs +14 -24
  239. package/dist/vue2/lib/input-group.cjs.map +1 -1
  240. package/dist/vue2/lib/input-group.js +14 -24
  241. package/dist/vue2/lib/input-group.js.map +1 -1
  242. package/dist/vue2/lib/input.cjs +47 -109
  243. package/dist/vue2/lib/input.cjs.map +1 -1
  244. package/dist/vue2/lib/input.js +47 -109
  245. package/dist/vue2/lib/input.js.map +1 -1
  246. package/dist/vue2/lib/item-layout.cjs +11 -42
  247. package/dist/vue2/lib/item-layout.cjs.map +1 -1
  248. package/dist/vue2/lib/item-layout.js +11 -42
  249. package/dist/vue2/lib/item-layout.js.map +1 -1
  250. package/dist/vue2/lib/ivr-node.cjs +47 -135
  251. package/dist/vue2/lib/ivr-node.cjs.map +1 -1
  252. package/dist/vue2/lib/ivr-node.js +47 -135
  253. package/dist/vue2/lib/ivr-node.js.map +1 -1
  254. package/dist/vue2/lib/keyboard-shortcut.cjs +23 -35
  255. package/dist/vue2/lib/keyboard-shortcut.cjs.map +1 -1
  256. package/dist/vue2/lib/keyboard-shortcut.js +23 -35
  257. package/dist/vue2/lib/keyboard-shortcut.js.map +1 -1
  258. package/dist/vue2/lib/lazy-show.cjs +11 -15
  259. package/dist/vue2/lib/lazy-show.cjs.map +1 -1
  260. package/dist/vue2/lib/lazy-show.js +11 -15
  261. package/dist/vue2/lib/lazy-show.js.map +1 -1
  262. package/dist/vue2/lib/link.cjs +15 -9
  263. package/dist/vue2/lib/link.cjs.map +1 -1
  264. package/dist/vue2/lib/link.js +15 -9
  265. package/dist/vue2/lib/link.js.map +1 -1
  266. package/dist/vue2/lib/list-item-group.cjs +11 -17
  267. package/dist/vue2/lib/list-item-group.cjs.map +1 -1
  268. package/dist/vue2/lib/list-item-group.js +11 -17
  269. package/dist/vue2/lib/list-item-group.js.map +1 -1
  270. package/dist/vue2/lib/list-item.cjs +23 -42
  271. package/dist/vue2/lib/list-item.cjs.map +1 -1
  272. package/dist/vue2/lib/list-item.js +23 -42
  273. package/dist/vue2/lib/list-item.js.map +1 -1
  274. package/dist/vue2/lib/message-input.cjs +97 -360
  275. package/dist/vue2/lib/message-input.cjs.map +1 -1
  276. package/dist/vue2/lib/message-input.js +97 -360
  277. package/dist/vue2/lib/message-input.js.map +1 -1
  278. package/dist/vue2/lib/modal.cjs +36 -94
  279. package/dist/vue2/lib/modal.cjs.map +1 -1
  280. package/dist/vue2/lib/modal.js +36 -94
  281. package/dist/vue2/lib/modal.js.map +1 -1
  282. package/dist/vue2/lib/notice.cjs +21 -40
  283. package/dist/vue2/lib/notice.cjs.map +1 -1
  284. package/dist/vue2/lib/notice.js +21 -40
  285. package/dist/vue2/lib/notice.js.map +1 -1
  286. package/dist/vue2/lib/pagination.cjs +20 -81
  287. package/dist/vue2/lib/pagination.cjs.map +1 -1
  288. package/dist/vue2/lib/pagination.js +20 -81
  289. package/dist/vue2/lib/pagination.js.map +1 -1
  290. package/dist/vue2/lib/popover.cjs +75 -194
  291. package/dist/vue2/lib/popover.cjs.map +1 -1
  292. package/dist/vue2/lib/popover.js +76 -195
  293. package/dist/vue2/lib/popover.js.map +1 -1
  294. package/dist/vue2/lib/presence.cjs +22 -23
  295. package/dist/vue2/lib/presence.cjs.map +1 -1
  296. package/dist/vue2/lib/presence.js +22 -23
  297. package/dist/vue2/lib/presence.js.map +1 -1
  298. package/dist/vue2/lib/radio-group.cjs +11 -2
  299. package/dist/vue2/lib/radio-group.cjs.map +1 -1
  300. package/dist/vue2/lib/radio-group.js +11 -2
  301. package/dist/vue2/lib/radio-group.js.map +1 -1
  302. package/dist/vue2/lib/radio.cjs +15 -47
  303. package/dist/vue2/lib/radio.cjs.map +1 -1
  304. package/dist/vue2/lib/radio.js +15 -47
  305. package/dist/vue2/lib/radio.js.map +1 -1
  306. package/dist/vue2/lib/rich-text-editor.cjs +317 -336
  307. package/dist/vue2/lib/rich-text-editor.cjs.map +1 -1
  308. package/dist/vue2/lib/rich-text-editor.js +317 -336
  309. package/dist/vue2/lib/rich-text-editor.js.map +1 -1
  310. package/dist/vue2/lib/root-layout.cjs +15 -33
  311. package/dist/vue2/lib/root-layout.cjs.map +1 -1
  312. package/dist/vue2/lib/root-layout.js +15 -33
  313. package/dist/vue2/lib/root-layout.js.map +1 -1
  314. package/dist/vue2/lib/scrollbar-directive.cjs +422 -388
  315. package/dist/vue2/lib/scrollbar-directive.cjs.map +1 -1
  316. package/dist/vue2/lib/scrollbar-directive.js +422 -388
  317. package/dist/vue2/lib/scrollbar-directive.js.map +1 -1
  318. package/dist/vue2/lib/select-menu.cjs +33 -52
  319. package/dist/vue2/lib/select-menu.cjs.map +1 -1
  320. package/dist/vue2/lib/select-menu.js +33 -52
  321. package/dist/vue2/lib/select-menu.js.map +1 -1
  322. package/dist/vue2/lib/settings-menu-button.cjs +16 -42
  323. package/dist/vue2/lib/settings-menu-button.cjs.map +1 -1
  324. package/dist/vue2/lib/settings-menu-button.js +16 -42
  325. package/dist/vue2/lib/settings-menu-button.js.map +1 -1
  326. package/dist/vue2/lib/skeleton.cjs +93 -118
  327. package/dist/vue2/lib/skeleton.cjs.map +1 -1
  328. package/dist/vue2/lib/skeleton.js +93 -118
  329. package/dist/vue2/lib/skeleton.js.map +1 -1
  330. package/dist/vue2/lib/split-button.cjs +64 -164
  331. package/dist/vue2/lib/split-button.cjs.map +1 -1
  332. package/dist/vue2/lib/split-button.js +64 -164
  333. package/dist/vue2/lib/split-button.js.map +1 -1
  334. package/dist/vue2/lib/stack.cjs +33 -21
  335. package/dist/vue2/lib/stack.cjs.map +1 -1
  336. package/dist/vue2/lib/stack.js +33 -21
  337. package/dist/vue2/lib/stack.js.map +1 -1
  338. package/dist/vue2/lib/tabs.cjs +13 -20
  339. package/dist/vue2/lib/tabs.cjs.map +1 -1
  340. package/dist/vue2/lib/tabs.js +13 -20
  341. package/dist/vue2/lib/tabs.js.map +1 -1
  342. package/dist/vue2/lib/time-pill.cjs +11 -8
  343. package/dist/vue2/lib/time-pill.cjs.map +1 -1
  344. package/dist/vue2/lib/time-pill.js +11 -8
  345. package/dist/vue2/lib/time-pill.js.map +1 -1
  346. package/dist/vue2/lib/toast.cjs +21 -42
  347. package/dist/vue2/lib/toast.cjs.map +1 -1
  348. package/dist/vue2/lib/toast.js +21 -42
  349. package/dist/vue2/lib/toast.js.map +1 -1
  350. package/dist/vue2/lib/toggle.cjs +24 -28
  351. package/dist/vue2/lib/toggle.cjs.map +1 -1
  352. package/dist/vue2/lib/toggle.js +24 -28
  353. package/dist/vue2/lib/toggle.js.map +1 -1
  354. package/dist/vue2/lib/tooltip-directive.cjs +26 -32
  355. package/dist/vue2/lib/tooltip-directive.cjs.map +1 -1
  356. package/dist/vue2/lib/tooltip-directive.js +26 -32
  357. package/dist/vue2/lib/tooltip-directive.js.map +1 -1
  358. package/dist/vue2/lib/tooltip.cjs +21 -31
  359. package/dist/vue2/lib/tooltip.cjs.map +1 -1
  360. package/dist/vue2/lib/tooltip.js +22 -32
  361. package/dist/vue2/lib/tooltip.js.map +1 -1
  362. package/dist/vue2/lib/top-banner-info.cjs +21 -18
  363. package/dist/vue2/lib/top-banner-info.cjs.map +1 -1
  364. package/dist/vue2/lib/top-banner-info.js +21 -18
  365. package/dist/vue2/lib/top-banner-info.js.map +1 -1
  366. package/dist/vue2/lib/unread-pill.cjs +12 -18
  367. package/dist/vue2/lib/unread-pill.cjs.map +1 -1
  368. package/dist/vue2/lib/unread-pill.js +12 -18
  369. package/dist/vue2/lib/unread-pill.js.map +1 -1
  370. package/dist/vue2/lib/validation-messages.cjs +16 -23
  371. package/dist/vue2/lib/validation-messages.cjs.map +1 -1
  372. package/dist/vue2/lib/validation-messages.js +16 -23
  373. package/dist/vue2/lib/validation-messages.js.map +1 -1
  374. package/dist/vue2/style.css +9 -9
  375. package/dist/vue2/types/common/emoji/index.d.ts +59236 -2
  376. package/dist/vue2/types/common/emoji/index.d.ts.map +1 -1
  377. package/dist/vue2/types/components/button/button.vue.d.ts +1 -1
  378. package/dist/vue2/types/components/chip/chip.vue.d.ts +1 -1
  379. package/dist/vue2/types/components/combobox/combobox.vue.d.ts +1 -1
  380. package/dist/vue2/types/components/icon/icon.vue.d.ts +2 -2
  381. package/dist/vue2/types/components/icon/icon_constants.d.ts +1 -1
  382. package/dist/vue2/types/components/icon/icon_constants.d.ts.map +1 -1
  383. package/dist/vue2/types/components/illustration/illustration.vue.d.ts +2 -2
  384. package/dist/vue2/types/components/illustration/illustration_constants.d.ts +1 -1
  385. package/dist/vue2/types/components/illustration/illustration_constants.d.ts.map +1 -1
  386. package/dist/vue2/types/components/input/input.vue.d.ts +3 -2
  387. package/dist/vue2/types/components/input/input.vue.d.ts.map +1 -1
  388. package/dist/vue2/types/components/modal/modal.vue.d.ts +1 -1
  389. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +1 -1
  390. package/dist/vue2/types/components/split_button/split_button-alpha.vue.d.ts +1 -1
  391. package/dist/vue2/types/components/toast/toast.vue.d.ts +1 -1
  392. package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts +1 -1
  393. package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -1
  394. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +1 -1
  395. package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
  396. package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +15 -0
  397. package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
  398. package/dist/vue3/chunks/{dropdown-6HXkh24e.js → dropdown-oA-_Gotg.js} +45 -40
  399. package/dist/vue3/chunks/{dropdown-6HXkh24e.js.map → dropdown-oA-_Gotg.js.map} +1 -1
  400. package/dist/vue3/chunks/{dropdown-QNvAb160.js → dropdown-p-Azgwov.js} +45 -40
  401. package/dist/vue3/chunks/{dropdown-QNvAb160.js.map → dropdown-p-Azgwov.js.map} +1 -1
  402. package/dist/vue3/chunks/dropdown_constants-2pGCXy7m.js.map +1 -1
  403. package/dist/vue3/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -1
  404. package/dist/vue3/chunks/{icon_constants-gIQj4mf7.js → icon_constants-Dy4MEUJL.js} +2 -3
  405. package/dist/vue3/chunks/icon_constants-Dy4MEUJL.js.map +1 -0
  406. package/dist/vue3/chunks/{icon_constants-bvhFNOPu.js → icon_constants-QYpmdE0R.js} +2 -3
  407. package/dist/vue3/chunks/icon_constants-QYpmdE0R.js.map +1 -0
  408. package/dist/vue3/chunks/{index-ouh7Bvm-.js → index-4qgKeErp.js} +84 -71
  409. package/dist/vue3/chunks/{index-T15rAIdX.js.map → index-4qgKeErp.js.map} +1 -1
  410. package/dist/vue3/chunks/{index-dfdrE-3M.js → index-GVD15GIB.js} +12 -3
  411. package/dist/vue3/chunks/{index-dfdrE-3M.js.map → index-GVD15GIB.js.map} +1 -1
  412. package/dist/vue3/chunks/{index-T15rAIdX.js → index-b_MgDylR.js} +84 -71
  413. package/dist/vue3/chunks/{index-ouh7Bvm-.js.map → index-b_MgDylR.js.map} +1 -1
  414. package/dist/vue3/chunks/{index-fEp0B-5Z.js → index-lu2o2f4r.js} +12 -3
  415. package/dist/vue3/chunks/{index-fEp0B-5Z.js.map → index-lu2o2f4r.js.map} +1 -1
  416. package/dist/vue3/chunks/{input-HIysg24t.js → input-NmYDD5bn.js} +9 -3
  417. package/dist/vue3/chunks/{input-HIysg24t.js.map → input-NmYDD5bn.js.map} +1 -1
  418. package/dist/vue3/chunks/{input-dLLo3Wtg.js → input-ttnte8zB.js} +9 -3
  419. package/dist/vue3/chunks/{input-dLLo3Wtg.js.map → input-ttnte8zB.js.map} +1 -1
  420. package/dist/vue3/chunks/{input_group-rE6nhye8.js → input_group-M-D25pOJ.js} +2 -4
  421. package/dist/vue3/chunks/{input_group-hV1WT2it.js.map → input_group-M-D25pOJ.js.map} +1 -1
  422. package/dist/vue3/chunks/{input_group-hV1WT2it.js → input_group-jWnq2DJT.js} +2 -4
  423. package/dist/vue3/chunks/{input_group-rE6nhye8.js.map → input_group-jWnq2DJT.js.map} +1 -1
  424. package/dist/vue3/chunks/{keyboard_list_navigation-YIqTuw1W.js → keyboard_list_navigation-ScXhrxya.js} +5 -6
  425. package/dist/{vue2/chunks/keyboard_list_navigation-x3D6RcC7.js.map → vue3/chunks/keyboard_list_navigation-ScXhrxya.js.map} +1 -1
  426. package/dist/vue3/chunks/{keyboard_list_navigation-x3D6RcC7.js → keyboard_list_navigation-fJnl_Iox.js} +5 -6
  427. package/dist/{vue2/chunks/keyboard_list_navigation-YIqTuw1W.js.map → vue3/chunks/keyboard_list_navigation-fJnl_Iox.js.map} +1 -1
  428. package/dist/vue3/chunks/link_constants-AfTWrr-n.js.map +1 -1
  429. package/dist/vue3/chunks/link_constants-x8NwdqmA.js.map +1 -1
  430. package/dist/vue3/chunks/list_item_constants-EiqkqZvP.js.map +1 -1
  431. package/dist/vue3/chunks/list_item_constants-u1xcN9Dd.js.map +1 -1
  432. package/dist/vue3/chunks/{modal-OaWxzqNt.js → modal-VgxXAQFP.js} +2 -4
  433. package/dist/{vue2/chunks/modal-8X6poIZW.js.map → vue3/chunks/modal-VgxXAQFP.js.map} +1 -1
  434. package/dist/vue3/chunks/{modal-8X6poIZW.js → modal-XOr4kiNZ.js} +2 -4
  435. package/dist/vue3/chunks/{modal-8X6poIZW.js.map → modal-XOr4kiNZ.js.map} +1 -1
  436. package/dist/vue3/chunks/{notice_action-3ed0uIMN.js → notice_action-WTucGhvr.js} +61 -40
  437. package/dist/vue3/chunks/{notice_action-e08Lw5W6.js.map → notice_action-WTucGhvr.js.map} +1 -1
  438. package/dist/vue3/chunks/{notice_action-e08Lw5W6.js → notice_action-p-ePanW_.js} +61 -40
  439. package/dist/vue3/chunks/{notice_action-3ed0uIMN.js.map → notice_action-p-ePanW_.js.map} +1 -1
  440. package/dist/vue3/chunks/notice_constants-7Qt2CQEY.js.map +1 -1
  441. package/dist/vue3/chunks/notice_constants-UXo9e3bS.js.map +1 -1
  442. package/dist/vue3/chunks/{popover_constants-6YkPPbnk.js → popover_constants-WsOUIY-m.js} +47 -26
  443. package/dist/vue3/chunks/{popover_constants-h9MD6WUt.js.map → popover_constants-WsOUIY-m.js.map} +1 -1
  444. package/dist/{vue2/chunks/popover_constants-h9MD6WUt.js → vue3/chunks/popover_constants-XnGWXaxX.js} +47 -26
  445. package/dist/{vue2/chunks/popover_constants-h9MD6WUt.js.map → vue3/chunks/popover_constants-XnGWXaxX.js.map} +1 -1
  446. package/dist/vue3/chunks/{sr_only_close_button-Ji3Zlts6.js → sr_only_close_button-3EdsV-dH.js} +4 -4
  447. package/dist/vue3/chunks/{sr_only_close_button-Ji3Zlts6.js.map → sr_only_close_button-3EdsV-dH.js.map} +1 -1
  448. package/dist/vue3/chunks/{sr_only_close_button-gKr0Vlbz.js → sr_only_close_button-xGrHFjwA.js} +4 -4
  449. package/dist/vue3/chunks/{sr_only_close_button-gKr0Vlbz.js.map → sr_only_close_button-xGrHFjwA.js.map} +1 -1
  450. package/dist/vue3/chunks/stack_constants-HraCekPm.js.map +1 -1
  451. package/dist/vue3/chunks/stack_constants-SMzMWnAQ.js.map +1 -1
  452. package/dist/vue3/chunks/{tab-aD6t0MNo.js → tab-RTDgnD9-.js} +49 -46
  453. package/dist/vue3/chunks/{tab-aD6t0MNo.js.map → tab-RTDgnD9-.js.map} +1 -1
  454. package/dist/vue3/chunks/{tab-X7IvNGTl.js → tab-qc3f42Yp.js} +49 -46
  455. package/dist/vue3/chunks/{tab-X7IvNGTl.js.map → tab-qc3f42Yp.js.map} +1 -1
  456. package/dist/vue3/common/constants.cjs.map +1 -1
  457. package/dist/vue3/common/constants.js.map +1 -1
  458. package/dist/vue3/common/dates.cjs +1 -3
  459. package/dist/vue3/common/dates.cjs.map +1 -1
  460. package/dist/vue3/common/dates.js +1 -3
  461. package/dist/vue3/common/dates.js.map +1 -1
  462. package/dist/vue3/common/emoji.cjs +1 -1
  463. package/dist/vue3/common/emoji.js +1 -1
  464. package/dist/vue3/common/mixins.cjs +3 -3
  465. package/dist/vue3/common/mixins.js +3 -3
  466. package/dist/vue3/common/utils.cjs +45 -11
  467. package/dist/vue3/common/utils.cjs.map +1 -1
  468. package/dist/vue3/common/utils.js +45 -11
  469. package/dist/vue3/common/utils.js.map +1 -1
  470. package/dist/vue3/common/validators.cjs.map +1 -1
  471. package/dist/vue3/common/validators.js.map +1 -1
  472. package/dist/vue3/component-documentation.json +1 -1
  473. package/dist/vue3/dialtone-vue.cjs +12 -12
  474. package/dist/vue3/dialtone-vue.js +12 -12
  475. package/dist/vue3/lib/attachment-carousel.cjs +108 -87
  476. package/dist/vue3/lib/attachment-carousel.cjs.map +1 -1
  477. package/dist/vue3/lib/attachment-carousel.js +108 -87
  478. package/dist/vue3/lib/attachment-carousel.js.map +1 -1
  479. package/dist/vue3/lib/avatar.cjs +88 -56
  480. package/dist/vue3/lib/avatar.cjs.map +1 -1
  481. package/dist/vue3/lib/avatar.js +88 -56
  482. package/dist/vue3/lib/avatar.js.map +1 -1
  483. package/dist/vue3/lib/badge.cjs +31 -15
  484. package/dist/vue3/lib/badge.cjs.map +1 -1
  485. package/dist/vue3/lib/badge.js +31 -15
  486. package/dist/vue3/lib/badge.js.map +1 -1
  487. package/dist/vue3/lib/banner.cjs +56 -38
  488. package/dist/vue3/lib/banner.cjs.map +1 -1
  489. package/dist/vue3/lib/banner.js +56 -38
  490. package/dist/vue3/lib/banner.js.map +1 -1
  491. package/dist/vue3/lib/breadcrumbs.cjs +36 -25
  492. package/dist/vue3/lib/breadcrumbs.cjs.map +1 -1
  493. package/dist/vue3/lib/breadcrumbs.js +36 -25
  494. package/dist/vue3/lib/breadcrumbs.js.map +1 -1
  495. package/dist/vue3/lib/button-group.cjs +7 -2
  496. package/dist/vue3/lib/button-group.cjs.map +1 -1
  497. package/dist/vue3/lib/button-group.js +7 -2
  498. package/dist/vue3/lib/button-group.js.map +1 -1
  499. package/dist/vue3/lib/button.cjs +69 -44
  500. package/dist/vue3/lib/button.cjs.map +1 -1
  501. package/dist/vue3/lib/button.js +69 -44
  502. package/dist/vue3/lib/button.js.map +1 -1
  503. package/dist/vue3/lib/callbar-button-with-popover.cjs +81 -68
  504. package/dist/vue3/lib/callbar-button-with-popover.cjs.map +1 -1
  505. package/dist/vue3/lib/callbar-button-with-popover.js +81 -68
  506. package/dist/vue3/lib/callbar-button-with-popover.js.map +1 -1
  507. package/dist/vue3/lib/callbar-button.cjs +45 -32
  508. package/dist/vue3/lib/callbar-button.cjs.map +1 -1
  509. package/dist/vue3/lib/callbar-button.js +45 -32
  510. package/dist/vue3/lib/callbar-button.js.map +1 -1
  511. package/dist/vue3/lib/callbox.cjs +57 -38
  512. package/dist/vue3/lib/callbox.cjs.map +1 -1
  513. package/dist/vue3/lib/callbox.js +57 -38
  514. package/dist/vue3/lib/callbox.js.map +1 -1
  515. package/dist/vue3/lib/card.cjs +33 -13
  516. package/dist/vue3/lib/card.cjs.map +1 -1
  517. package/dist/vue3/lib/card.js +33 -13
  518. package/dist/vue3/lib/card.js.map +1 -1
  519. package/dist/vue3/lib/checkbox-group.cjs +5 -2
  520. package/dist/vue3/lib/checkbox-group.cjs.map +1 -1
  521. package/dist/vue3/lib/checkbox-group.js +5 -2
  522. package/dist/vue3/lib/checkbox-group.js.map +1 -1
  523. package/dist/vue3/lib/checkbox.cjs +45 -41
  524. package/dist/vue3/lib/checkbox.cjs.map +1 -1
  525. package/dist/vue3/lib/checkbox.js +45 -41
  526. package/dist/vue3/lib/checkbox.js.map +1 -1
  527. package/dist/vue3/lib/chip.cjs +53 -38
  528. package/dist/vue3/lib/chip.cjs.map +1 -1
  529. package/dist/vue3/lib/chip.js +53 -38
  530. package/dist/vue3/lib/chip.js.map +1 -1
  531. package/dist/vue3/lib/codeblock.cjs +6 -4
  532. package/dist/vue3/lib/codeblock.cjs.map +1 -1
  533. package/dist/vue3/lib/codeblock.js +6 -4
  534. package/dist/vue3/lib/codeblock.js.map +1 -1
  535. package/dist/vue3/lib/collapsible.cjs +76 -62
  536. package/dist/vue3/lib/collapsible.cjs.map +1 -1
  537. package/dist/vue3/lib/collapsible.js +76 -62
  538. package/dist/vue3/lib/collapsible.js.map +1 -1
  539. package/dist/vue3/lib/combobox-multi-select.cjs +88 -75
  540. package/dist/vue3/lib/combobox-multi-select.cjs.map +1 -1
  541. package/dist/vue3/lib/combobox-multi-select.js +88 -75
  542. package/dist/vue3/lib/combobox-multi-select.js.map +1 -1
  543. package/dist/vue3/lib/combobox-with-popover.cjs +85 -77
  544. package/dist/vue3/lib/combobox-with-popover.cjs.map +1 -1
  545. package/dist/vue3/lib/combobox-with-popover.js +85 -77
  546. package/dist/vue3/lib/combobox-with-popover.js.map +1 -1
  547. package/dist/vue3/lib/combobox.cjs +3 -3
  548. package/dist/vue3/lib/combobox.js +3 -3
  549. package/dist/vue3/lib/contact-centers-row.cjs +89 -65
  550. package/dist/vue3/lib/contact-centers-row.cjs.map +1 -1
  551. package/dist/vue3/lib/contact-centers-row.js +89 -65
  552. package/dist/vue3/lib/contact-centers-row.js.map +1 -1
  553. package/dist/vue3/lib/contact-info.cjs +82 -59
  554. package/dist/vue3/lib/contact-info.cjs.map +1 -1
  555. package/dist/vue3/lib/contact-info.js +82 -59
  556. package/dist/vue3/lib/contact-info.js.map +1 -1
  557. package/dist/vue3/lib/contact-row.cjs +47 -37
  558. package/dist/vue3/lib/contact-row.cjs.map +1 -1
  559. package/dist/vue3/lib/contact-row.js +47 -37
  560. package/dist/vue3/lib/contact-row.js.map +1 -1
  561. package/dist/vue3/lib/datepicker.cjs +263 -267
  562. package/dist/vue3/lib/datepicker.cjs.map +1 -1
  563. package/dist/vue3/lib/datepicker.js +263 -267
  564. package/dist/vue3/lib/datepicker.js.map +1 -1
  565. package/dist/vue3/lib/description-list.cjs +14 -9
  566. package/dist/vue3/lib/description-list.cjs.map +1 -1
  567. package/dist/vue3/lib/description-list.js +14 -9
  568. package/dist/vue3/lib/description-list.js.map +1 -1
  569. package/dist/vue3/lib/dropdown.cjs +6 -6
  570. package/dist/vue3/lib/dropdown.cjs.map +1 -1
  571. package/dist/vue3/lib/dropdown.js +6 -6
  572. package/dist/vue3/lib/dropdown.js.map +1 -1
  573. package/dist/vue3/lib/editor.cjs +249 -312
  574. package/dist/vue3/lib/editor.cjs.map +1 -1
  575. package/dist/vue3/lib/editor.js +249 -312
  576. package/dist/vue3/lib/editor.js.map +1 -1
  577. package/dist/vue3/lib/emoji-picker.cjs +419 -387
  578. package/dist/vue3/lib/emoji-picker.cjs.map +1 -1
  579. package/dist/vue3/lib/emoji-picker.js +419 -387
  580. package/dist/vue3/lib/emoji-picker.js.map +1 -1
  581. package/dist/vue3/lib/emoji-row.cjs +69 -59
  582. package/dist/vue3/lib/emoji-row.cjs.map +1 -1
  583. package/dist/vue3/lib/emoji-row.js +69 -59
  584. package/dist/vue3/lib/emoji-row.js.map +1 -1
  585. package/dist/vue3/lib/emoji-text-wrapper.cjs +12 -13
  586. package/dist/vue3/lib/emoji-text-wrapper.cjs.map +1 -1
  587. package/dist/vue3/lib/emoji-text-wrapper.js +12 -13
  588. package/dist/vue3/lib/emoji-text-wrapper.js.map +1 -1
  589. package/dist/vue3/lib/emoji.cjs +23 -19
  590. package/dist/vue3/lib/emoji.cjs.map +1 -1
  591. package/dist/vue3/lib/emoji.js +23 -19
  592. package/dist/vue3/lib/emoji.js.map +1 -1
  593. package/dist/vue3/lib/empty-state.cjs +30 -20
  594. package/dist/vue3/lib/empty-state.cjs.map +1 -1
  595. package/dist/vue3/lib/empty-state.js +30 -20
  596. package/dist/vue3/lib/empty-state.js.map +1 -1
  597. package/dist/vue3/lib/feed-item-row.cjs +74 -43
  598. package/dist/vue3/lib/feed-item-row.cjs.map +1 -1
  599. package/dist/vue3/lib/feed-item-row.js +74 -43
  600. package/dist/vue3/lib/feed-item-row.js.map +1 -1
  601. package/dist/vue3/lib/feed-pill.cjs +55 -45
  602. package/dist/vue3/lib/feed-pill.cjs.map +1 -1
  603. package/dist/vue3/lib/feed-pill.js +55 -45
  604. package/dist/vue3/lib/feed-pill.js.map +1 -1
  605. package/dist/vue3/lib/general-row.cjs +165 -115
  606. package/dist/vue3/lib/general-row.cjs.map +1 -1
  607. package/dist/vue3/lib/general-row.js +165 -115
  608. package/dist/vue3/lib/general-row.js.map +1 -1
  609. package/dist/vue3/lib/group-row.cjs +9 -7
  610. package/dist/vue3/lib/group-row.cjs.map +1 -1
  611. package/dist/vue3/lib/group-row.js +9 -7
  612. package/dist/vue3/lib/group-row.js.map +1 -1
  613. package/dist/vue3/lib/grouped-chip.cjs +48 -27
  614. package/dist/vue3/lib/grouped-chip.cjs.map +1 -1
  615. package/dist/vue3/lib/grouped-chip.js +48 -27
  616. package/dist/vue3/lib/grouped-chip.js.map +1 -1
  617. package/dist/vue3/lib/hovercard.cjs +33 -25
  618. package/dist/vue3/lib/hovercard.cjs.map +1 -1
  619. package/dist/vue3/lib/hovercard.js +33 -25
  620. package/dist/vue3/lib/hovercard.js.map +1 -1
  621. package/dist/vue3/lib/icon.cjs +1 -1
  622. package/dist/vue3/lib/icon.cjs.map +1 -1
  623. package/dist/vue3/lib/icon.js +1 -1
  624. package/dist/vue3/lib/icon.js.map +1 -1
  625. package/dist/vue3/lib/illustration.cjs +1 -2
  626. package/dist/vue3/lib/illustration.cjs.map +1 -1
  627. package/dist/vue3/lib/illustration.js +1 -2
  628. package/dist/vue3/lib/illustration.js.map +1 -1
  629. package/dist/vue3/lib/image-viewer.cjs +66 -52
  630. package/dist/vue3/lib/image-viewer.cjs.map +1 -1
  631. package/dist/vue3/lib/image-viewer.js +66 -52
  632. package/dist/vue3/lib/image-viewer.js.map +1 -1
  633. package/dist/vue3/lib/input-group.cjs +19 -15
  634. package/dist/vue3/lib/input-group.cjs.map +1 -1
  635. package/dist/vue3/lib/input-group.js +19 -15
  636. package/dist/vue3/lib/input-group.js.map +1 -1
  637. package/dist/vue3/lib/input.cjs +114 -77
  638. package/dist/vue3/lib/input.cjs.map +1 -1
  639. package/dist/vue3/lib/input.js +114 -77
  640. package/dist/vue3/lib/input.js.map +1 -1
  641. package/dist/vue3/lib/item-layout.cjs +27 -10
  642. package/dist/vue3/lib/item-layout.cjs.map +1 -1
  643. package/dist/vue3/lib/item-layout.js +27 -10
  644. package/dist/vue3/lib/item-layout.js.map +1 -1
  645. package/dist/vue3/lib/ivr-node.cjs +89 -80
  646. package/dist/vue3/lib/ivr-node.cjs.map +1 -1
  647. package/dist/vue3/lib/ivr-node.js +89 -80
  648. package/dist/vue3/lib/ivr-node.js.map +1 -1
  649. package/dist/vue3/lib/keyboard-shortcut.cjs +31 -26
  650. package/dist/vue3/lib/keyboard-shortcut.cjs.map +1 -1
  651. package/dist/vue3/lib/keyboard-shortcut.js +31 -26
  652. package/dist/vue3/lib/keyboard-shortcut.js.map +1 -1
  653. package/dist/vue3/lib/lazy-show.cjs +8 -6
  654. package/dist/vue3/lib/lazy-show.cjs.map +1 -1
  655. package/dist/vue3/lib/lazy-show.js +8 -6
  656. package/dist/vue3/lib/lazy-show.js.map +1 -1
  657. package/dist/vue3/lib/link.cjs +7 -2
  658. package/dist/vue3/lib/link.cjs.map +1 -1
  659. package/dist/vue3/lib/link.js +7 -2
  660. package/dist/vue3/lib/link.js.map +1 -1
  661. package/dist/vue3/lib/list-item-group.cjs +14 -7
  662. package/dist/vue3/lib/list-item-group.cjs.map +1 -1
  663. package/dist/vue3/lib/list-item-group.js +14 -7
  664. package/dist/vue3/lib/list-item-group.js.map +1 -1
  665. package/dist/vue3/lib/list-item.cjs +25 -24
  666. package/dist/vue3/lib/list-item.cjs.map +1 -1
  667. package/dist/vue3/lib/list-item.js +25 -24
  668. package/dist/vue3/lib/list-item.js.map +1 -1
  669. package/dist/vue3/lib/message-input.cjs +264 -227
  670. package/dist/vue3/lib/message-input.cjs.map +1 -1
  671. package/dist/vue3/lib/message-input.js +264 -227
  672. package/dist/vue3/lib/message-input.js.map +1 -1
  673. package/dist/vue3/lib/modal.cjs +99 -59
  674. package/dist/vue3/lib/modal.cjs.map +1 -1
  675. package/dist/vue3/lib/modal.js +99 -59
  676. package/dist/vue3/lib/modal.js.map +1 -1
  677. package/dist/vue3/lib/notice.cjs +46 -33
  678. package/dist/vue3/lib/notice.cjs.map +1 -1
  679. package/dist/vue3/lib/notice.js +46 -33
  680. package/dist/vue3/lib/notice.js.map +1 -1
  681. package/dist/vue3/lib/pagination.cjs +61 -49
  682. package/dist/vue3/lib/pagination.cjs.map +1 -1
  683. package/dist/vue3/lib/pagination.js +61 -49
  684. package/dist/vue3/lib/pagination.js.map +1 -1
  685. package/dist/vue3/lib/popover.cjs +156 -133
  686. package/dist/vue3/lib/popover.cjs.map +1 -1
  687. package/dist/vue3/lib/popover.js +157 -134
  688. package/dist/vue3/lib/popover.js.map +1 -1
  689. package/dist/vue3/lib/presence.cjs +17 -9
  690. package/dist/vue3/lib/presence.cjs.map +1 -1
  691. package/dist/vue3/lib/presence.js +17 -9
  692. package/dist/vue3/lib/presence.js.map +1 -1
  693. package/dist/vue3/lib/radio-group.cjs +1 -1
  694. package/dist/vue3/lib/radio-group.cjs.map +1 -1
  695. package/dist/vue3/lib/radio-group.js +1 -1
  696. package/dist/vue3/lib/radio-group.js.map +1 -1
  697. package/dist/vue3/lib/radio.cjs +41 -34
  698. package/dist/vue3/lib/radio.cjs.map +1 -1
  699. package/dist/vue3/lib/radio.js +41 -34
  700. package/dist/vue3/lib/radio.js.map +1 -1
  701. package/dist/vue3/lib/rich-text-editor.cjs +288 -292
  702. package/dist/vue3/lib/rich-text-editor.cjs.map +1 -1
  703. package/dist/vue3/lib/rich-text-editor.js +288 -292
  704. package/dist/vue3/lib/rich-text-editor.js.map +1 -1
  705. package/dist/vue3/lib/root-layout.cjs +39 -24
  706. package/dist/vue3/lib/root-layout.cjs.map +1 -1
  707. package/dist/vue3/lib/root-layout.js +39 -24
  708. package/dist/vue3/lib/root-layout.js.map +1 -1
  709. package/dist/vue3/lib/scrollbar-directive.cjs +422 -388
  710. package/dist/vue3/lib/scrollbar-directive.cjs.map +1 -1
  711. package/dist/vue3/lib/scrollbar-directive.js +422 -388
  712. package/dist/vue3/lib/scrollbar-directive.js.map +1 -1
  713. package/dist/vue3/lib/scroller.cjs +83 -100
  714. package/dist/vue3/lib/scroller.cjs.map +1 -1
  715. package/dist/vue3/lib/scroller.js +83 -100
  716. package/dist/vue3/lib/scroller.js.map +1 -1
  717. package/dist/vue3/lib/select-menu.cjs +67 -40
  718. package/dist/vue3/lib/select-menu.cjs.map +1 -1
  719. package/dist/vue3/lib/select-menu.js +67 -40
  720. package/dist/vue3/lib/select-menu.js.map +1 -1
  721. package/dist/vue3/lib/settings-menu-button.cjs +16 -10
  722. package/dist/vue3/lib/settings-menu-button.cjs.map +1 -1
  723. package/dist/vue3/lib/settings-menu-button.js +16 -10
  724. package/dist/vue3/lib/settings-menu-button.js.map +1 -1
  725. package/dist/vue3/lib/skeleton.cjs +93 -74
  726. package/dist/vue3/lib/skeleton.cjs.map +1 -1
  727. package/dist/vue3/lib/skeleton.js +93 -74
  728. package/dist/vue3/lib/skeleton.js.map +1 -1
  729. package/dist/vue3/lib/split-button.cjs +74 -68
  730. package/dist/vue3/lib/split-button.cjs.map +1 -1
  731. package/dist/vue3/lib/split-button.js +74 -68
  732. package/dist/vue3/lib/split-button.js.map +1 -1
  733. package/dist/vue3/lib/stack.cjs +26 -18
  734. package/dist/vue3/lib/stack.cjs.map +1 -1
  735. package/dist/vue3/lib/stack.js +26 -18
  736. package/dist/vue3/lib/stack.js.map +1 -1
  737. package/dist/vue3/lib/tabs.cjs +7 -3
  738. package/dist/vue3/lib/tabs.cjs.map +1 -1
  739. package/dist/vue3/lib/tabs.js +7 -3
  740. package/dist/vue3/lib/tabs.js.map +1 -1
  741. package/dist/vue3/lib/time-pill.cjs.map +1 -1
  742. package/dist/vue3/lib/time-pill.js.map +1 -1
  743. package/dist/vue3/lib/toast.cjs +51 -35
  744. package/dist/vue3/lib/toast.cjs.map +1 -1
  745. package/dist/vue3/lib/toast.js +51 -35
  746. package/dist/vue3/lib/toast.js.map +1 -1
  747. package/dist/vue3/lib/toggle.cjs +34 -24
  748. package/dist/vue3/lib/toggle.cjs.map +1 -1
  749. package/dist/vue3/lib/toggle.js +34 -24
  750. package/dist/vue3/lib/toggle.js.map +1 -1
  751. package/dist/vue3/lib/tooltip-directive.cjs +19 -26
  752. package/dist/vue3/lib/tooltip-directive.cjs.map +1 -1
  753. package/dist/vue3/lib/tooltip-directive.js +19 -26
  754. package/dist/vue3/lib/tooltip-directive.js.map +1 -1
  755. package/dist/vue3/lib/tooltip.cjs +32 -21
  756. package/dist/vue3/lib/tooltip.cjs.map +1 -1
  757. package/dist/vue3/lib/tooltip.js +33 -22
  758. package/dist/vue3/lib/tooltip.js.map +1 -1
  759. package/dist/vue3/lib/top-banner-info.cjs +23 -8
  760. package/dist/vue3/lib/top-banner-info.cjs.map +1 -1
  761. package/dist/vue3/lib/top-banner-info.js +23 -8
  762. package/dist/vue3/lib/top-banner-info.js.map +1 -1
  763. package/dist/vue3/lib/unread-pill.cjs +11 -8
  764. package/dist/vue3/lib/unread-pill.cjs.map +1 -1
  765. package/dist/vue3/lib/unread-pill.js +11 -8
  766. package/dist/vue3/lib/unread-pill.js.map +1 -1
  767. package/dist/vue3/lib/validation-messages.cjs +17 -14
  768. package/dist/vue3/lib/validation-messages.cjs.map +1 -1
  769. package/dist/vue3/lib/validation-messages.js +17 -14
  770. package/dist/vue3/lib/validation-messages.js.map +1 -1
  771. package/dist/vue3/style.css +9 -9
  772. package/dist/vue3/types/components/button/button.vue.d.ts +1 -1
  773. package/dist/vue3/types/components/chip/chip.vue.d.ts +1 -1
  774. package/dist/vue3/types/components/combobox/combobox.vue.d.ts +1 -1
  775. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +1 -1
  776. package/dist/vue3/types/components/icon/icon.vue.d.ts +2 -2
  777. package/dist/vue3/types/components/icon/icon_constants.d.ts +1 -1
  778. package/dist/vue3/types/components/icon/icon_constants.d.ts.map +1 -1
  779. package/dist/vue3/types/components/illustration/illustration_constants.d.ts +1 -1
  780. package/dist/vue3/types/components/illustration/illustration_constants.d.ts.map +1 -1
  781. package/dist/vue3/types/components/input/input.vue.d.ts +3 -2
  782. package/dist/vue3/types/components/input/input.vue.d.ts.map +1 -1
  783. package/dist/vue3/types/components/modal/modal.vue.d.ts +1 -1
  784. package/dist/vue3/types/components/notice/notice.vue.d.ts +1 -1
  785. package/dist/vue3/types/components/radio/radio.vue.d.ts +1 -1
  786. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +1 -1
  787. package/dist/vue3/types/components/scroller/modules/scroller_item.vue.d.ts +1 -1
  788. package/dist/vue3/types/components/split_button/split_button-alpha.vue.d.ts +1 -1
  789. package/dist/vue3/types/components/tabs/tab.vue.d.ts +1 -1
  790. package/dist/vue3/types/components/toast/toast.vue.d.ts +2 -2
  791. package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts +1 -1
  792. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -1
  793. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +1 -1
  794. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
  795. package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +15 -0
  796. package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
  797. package/package.json +3 -2
  798. package/dist/vue2/chunks/icon_constants-TdxqLsS2.js.map +0 -1
  799. package/dist/vue2/chunks/icon_constants-VEA0wI5C.js.map +0 -1
  800. package/dist/vue3/chunks/icon_constants-bvhFNOPu.js.map +0 -1
  801. package/dist/vue3/chunks/icon_constants-gIQj4mf7.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":["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;;;;;"}
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","isThisYear"],"mappings":";;;;;;AAYA,IAAI;AAIJ,SAAS,YAAa,MAAM,cAAc;AACxC;AACA,SAAOA,QAAM,OAAC,MAAM,cAAc;AAAA,IAChC,QAAQ;AAAA,EACZ,CAAG;AACH;AAEA,SAAS,oBAAqB,UAAU,cAAc;AACpD;AACA,SAAOC,QAAAA,eAAe,UAAU;AAAA,IAC9B,QAAQ;AAAA,IACR,QAAQ;AAAA,EACZ,CAAG;AACH;AAEA,SAAS,oBAAqB,MAAM,UAAU;AAC5C;AACA,SAAOC,QAAc,eAAC,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,WAAWC,QAAAA,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,SAAOC,mCAAsB,IAAI,cAAc,MAAM,KAAK,EAAE,CAAC,EAAE,OAAO,eAAe,IAAI;AAC3F;AA8BO,SAAS,aAAc,MAAM;AAClC,MAAIC,QAAAA,QAAQ,IAAI,GAAG;AACjB,WAAO,qBAAqB,CAAC;AAAA,EACjC,WAAaC,QAAAA,YAAY,IAAI,GAAG;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;;;;;"}
@@ -47,9 +47,7 @@ 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, {
51
- numeric: "auto"
52
- });
50
+ const rtl = new Intl.RelativeTimeFormat(dialtoneLocale.code, { numeric: "auto" });
53
51
  return capitalizeFirstLetter(rtl.formatToParts(days, "day")[0].value, dialtoneLocale.code);
54
52
  }
55
53
  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":["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
+ {"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,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const common_emoji = require("../chunks/index-anN_sx1F.js");
3
4
  require("emoji-toolkit/emoji_strategy.json");
4
- const common_emoji = require("../chunks/index-NYFNZeHH.js");
5
5
  exports.codeToEmojiData = common_emoji.codeToEmojiData;
6
6
  Object.defineProperty(exports, "customEmojiAssetUrl", {
7
7
  enumerable: true,
@@ -1,5 +1,5 @@
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-ODod4Oj_.js";
1
2
  import "emoji-toolkit/emoji_strategy.json";
2
- 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-i65YVk-U.js";
3
3
  export {
4
4
  codeToEmojiData,
5
5
  customEmojiAssetUrl,
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const input = require("../chunks/input-Hqw33WBe.js");
4
- const input_group = require("../chunks/input_group-pE6ec9R3.js");
5
- const keyboard_list_navigation = require("../chunks/keyboard_list_navigation-x3D6RcC7.js");
3
+ const input = require("../chunks/input-Axw-wFj2.js");
4
+ const input_group = require("../chunks/input_group-m3cWYUfI.js");
5
+ const keyboard_list_navigation = require("../chunks/keyboard_list_navigation-fJnl_Iox.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-PhJeBN6r.js";
2
- import { InputGroupMixin } from "../chunks/input_group-ZI7aVGEp.js";
3
- import { KeyboardNavigation } from "../chunks/keyboard_list_navigation-YIqTuw1W.js";
1
+ import { CheckableMixin, GroupableMixin, InputMixin } from "../chunks/input-6kbd8Pju.js";
2
+ import { InputGroupMixin } from "../chunks/input_group-qVZaS5Bb.js";
3
+ import { KeyboardNavigation } from "../chunks/keyboard_list_navigation-ScXhrxya.js";
4
4
  import "vue";
5
5
  import "./constants.js";
6
6
  import "./validators.js";
@@ -118,24 +118,60 @@ function isOutOfViewPort(element) {
118
118
  return isOut;
119
119
  }
120
120
  const domainNameRegex = /(?:(?:[^\s!@#$%^&*()_=+[\]{}\\|;:'",.<>/?]+)\.)/;
121
- 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)");
122
- 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])");
123
- const hostnameOrIpRegex = new RegExp("(?:" + [[domainNameRegex.source, tldRegerx.source].join("+"), ipv4Regex.source].join("|") + ")");
121
+ const tldRegerx = new RegExp(
122
+ "(?: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)"
123
+ );
124
+ const ipv4Regex = new RegExp(
125
+ "(?:(?:[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
+ );
127
+ const hostnameOrIpRegex = new RegExp(
128
+ "(?:" + [
129
+ [
130
+ domainNameRegex.source,
131
+ tldRegerx.source
132
+ ].join("+"),
133
+ ipv4Regex.source
134
+ ].join("|") + ")"
135
+ );
124
136
  const urlPathRegex = /(?:(?:[;/][^#?<>\s]*)?)/;
125
137
  const urlQueryOrFragmentRegex = /(?:(?:\?[^#<>\s]+)?(?:#[^<>\s]+)?)/;
126
- const urlWithoutProtocolRegex = new RegExp("\\b" + [hostnameOrIpRegex.source, urlPathRegex.source, urlQueryOrFragmentRegex.source, "(?!\\w)"].join("+"));
138
+ const urlWithoutProtocolRegex = new RegExp(
139
+ "\\b" + [
140
+ hostnameOrIpRegex.source,
141
+ urlPathRegex.source,
142
+ urlQueryOrFragmentRegex.source,
143
+ "(?!\\w)"
144
+ ].join("+")
145
+ );
127
146
  const urlWithProtocolRegex = /\b[a-z\d.-]+:\/\/[^<>\s]+/;
128
- const emailAddressRegex = new RegExp("(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" + [hostnameOrIpRegex.source, urlQueryOrFragmentRegex.source].join("+") + "(?!\\w)");
147
+ const emailAddressRegex = new RegExp(
148
+ "(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" + [
149
+ hostnameOrIpRegex.source,
150
+ urlQueryOrFragmentRegex.source
151
+ ].join("+") + "(?!\\w)"
152
+ );
129
153
  function getPhoneNumberRegex(minLength = 7, maxLength = 15) {
130
154
  try {
131
- return new RegExp(`(?:^|(?<=\\W))(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`);
155
+ return new RegExp(
156
+ `(?:^|(?<=\\W))(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`
157
+ );
132
158
  } catch (e) {
133
159
  console.warn("This browser doesn't support regex lookahead/lookbehind");
134
160
  }
135
- return new RegExp(`(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`);
161
+ return new RegExp(
162
+ `(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`
163
+ );
136
164
  }
137
165
  const phoneNumberRegex = getPhoneNumberRegex();
138
- const linkRegex = new RegExp([urlWithoutProtocolRegex.source, urlWithProtocolRegex.source, emailAddressRegex.source, phoneNumberRegex.source].join("|"), "gi");
166
+ const linkRegex = new RegExp(
167
+ [
168
+ urlWithoutProtocolRegex.source,
169
+ urlWithProtocolRegex.source,
170
+ emailAddressRegex.source,
171
+ phoneNumberRegex.source
172
+ ].join("|"),
173
+ "gi"
174
+ );
139
175
  function isPhoneNumber(input) {
140
176
  var _a;
141
177
  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 Vue 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 = {\n name: 'html-fragment',\n functional: true,\n props: ['html'],\n render (h, ctx) {\n return new Vue({\n // eslint-disable-next-line vue/multi-word-component-names\n name: 'Inner',\n beforeCreate () { this.$createElement = h; },\n template: `<div>${ctx.props.html}</div>`,\n }).$mount()._vnode.children;\n },\n};\n\nexport const flushPromises = () => {\n return new Promise((resolve) => {\n scheduler(resolve);\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\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:9010\" 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 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","name","functional","props","render","ctx","Vue","beforeCreate","$createElement","template","html","$mount","_vnode","children","flushPromises","Promise","resolve","kebabCaseToPascalCase","string","toLowerCase","split","word","charAt","toUpperCase","slice","join","pascalCaseToKebabCase","replace","x","y","debounce","func","timeout","clearTimeout","isOutOfViewPort","bounding","getBoundingClientRect","isOut","top","left","bottom","window","innerHeight","document","documentElement","clientHeight","right","innerWidth","clientWidth","any","Object","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":";;;;AAOA,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,WAAO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5BV,mBAAgC,QAAOU;AAChD;AAQO,SAASM,kBAAmBC,UAAU;AAC3C,SAAOA,SAAS7F,OAAOlB,SAAO,CAAC,CAACA,GAAG,EAAEsD,KAAK,GAAG;AAC/C;AAQO,SAAS0D,sBAAuBhH,KAAKiH,SAAS,SAAS;AAC5D,SAAOjH,IAAIwD,QAAQ,2BAAW,GAAE0D,UAAQA,KAAKC,kBAAkBF,MAAM,CAAC;AACxE;AAEA,MAAe,QAAA;AAAA,EACb7H;AAAAA,EACAG;AAAAA,EACAQ;AAAAA,EACAS;AAAAA,EACAM;AAAAA,EACAK;AAAAA,EACAF;AAAAA,EACAY;AAAAA,EACAc;AAAAA,EACAG;AAAAA,EACAa;AAAAA,EACAI;AAAAA,EACAgC;AAAAA,EACAO;AAAAA,EACAO;AAAAA,EACAN;AAAAA,EACAK;AAAAA,EACAE;AAAAA,EACAE;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 Vue 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 = {\n name: 'html-fragment',\n functional: true,\n props: ['html'],\n render (h, ctx) {\n return new Vue({\n // eslint-disable-next-line vue/multi-word-component-names\n name: 'Inner',\n beforeCreate () { this.$createElement = h; },\n template: `<div>${ctx.props.html}</div>`,\n }).$mount()._vnode.children;\n },\n};\n\nexport const flushPromises = () => {\n return new Promise((resolve) => {\n scheduler(resolve);\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\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:9010\" 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 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"],"mappings":";;;;AAOA,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,SAASA,iCAAgB;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,MAAI;AACJ,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,QAAI,KAAK,KAAK,IAAI,CAAC,IAAI,IAAI,WAAW,CAAC,IAAI;AAAA,EAC5C;AAED,SAAO;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;AAED,SAAO,SAAS,IAAI,aAAW;AAC7B,QAAI,OAAO,YAAY,UAAU;AAC/B,aAAO;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AS,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;AACF;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -116,24 +116,60 @@ function isOutOfViewPort(element) {
116
116
  return isOut;
117
117
  }
118
118
  const domainNameRegex = /(?:(?:[^\s!@#$%^&*()_=+[\]{}\\|;:'",.<>/?]+)\.)/;
119
- 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)");
120
- 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])");
121
- const hostnameOrIpRegex = new RegExp("(?:" + [[domainNameRegex.source, tldRegerx.source].join("+"), ipv4Regex.source].join("|") + ")");
119
+ const tldRegerx = new RegExp(
120
+ "(?: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)"
121
+ );
122
+ const ipv4Regex = new RegExp(
123
+ "(?:(?:[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])"
124
+ );
125
+ const hostnameOrIpRegex = new RegExp(
126
+ "(?:" + [
127
+ [
128
+ domainNameRegex.source,
129
+ tldRegerx.source
130
+ ].join("+"),
131
+ ipv4Regex.source
132
+ ].join("|") + ")"
133
+ );
122
134
  const urlPathRegex = /(?:(?:[;/][^#?<>\s]*)?)/;
123
135
  const urlQueryOrFragmentRegex = /(?:(?:\?[^#<>\s]+)?(?:#[^<>\s]+)?)/;
124
- const urlWithoutProtocolRegex = new RegExp("\\b" + [hostnameOrIpRegex.source, urlPathRegex.source, urlQueryOrFragmentRegex.source, "(?!\\w)"].join("+"));
136
+ const urlWithoutProtocolRegex = new RegExp(
137
+ "\\b" + [
138
+ hostnameOrIpRegex.source,
139
+ urlPathRegex.source,
140
+ urlQueryOrFragmentRegex.source,
141
+ "(?!\\w)"
142
+ ].join("+")
143
+ );
125
144
  const urlWithProtocolRegex = /\b[a-z\d.-]+:\/\/[^<>\s]+/;
126
- const emailAddressRegex = new RegExp("(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" + [hostnameOrIpRegex.source, urlQueryOrFragmentRegex.source].join("+") + "(?!\\w)");
145
+ const emailAddressRegex = new RegExp(
146
+ "(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" + [
147
+ hostnameOrIpRegex.source,
148
+ urlQueryOrFragmentRegex.source
149
+ ].join("+") + "(?!\\w)"
150
+ );
127
151
  function getPhoneNumberRegex(minLength = 7, maxLength = 15) {
128
152
  try {
129
- return new RegExp(`(?:^|(?<=\\W))(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`);
153
+ return new RegExp(
154
+ `(?:^|(?<=\\W))(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`
155
+ );
130
156
  } catch (e) {
131
157
  console.warn("This browser doesn't support regex lookahead/lookbehind");
132
158
  }
133
- return new RegExp(`(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`);
159
+ return new RegExp(
160
+ `(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${minLength},${maxLength}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`
161
+ );
134
162
  }
135
163
  const phoneNumberRegex = getPhoneNumberRegex();
136
- const linkRegex = new RegExp([urlWithoutProtocolRegex.source, urlWithProtocolRegex.source, emailAddressRegex.source, phoneNumberRegex.source].join("|"), "gi");
164
+ const linkRegex = new RegExp(
165
+ [
166
+ urlWithoutProtocolRegex.source,
167
+ urlWithProtocolRegex.source,
168
+ emailAddressRegex.source,
169
+ phoneNumberRegex.source
170
+ ].join("|"),
171
+ "gi"
172
+ );
137
173
  function isPhoneNumber(input) {
138
174
  var _a;
139
175
  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 Vue 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 = {\n name: 'html-fragment',\n functional: true,\n props: ['html'],\n render (h, ctx) {\n return new Vue({\n // eslint-disable-next-line vue/multi-word-component-names\n name: 'Inner',\n beforeCreate () { this.$createElement = h; },\n template: `<div>${ctx.props.html}</div>`,\n }).$mount()._vnode.children;\n },\n};\n\nexport const flushPromises = () => {\n return new Promise((resolve) => {\n scheduler(resolve);\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\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:9010\" 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 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","name","functional","props","render","ctx","Vue","beforeCreate","$createElement","template","html","$mount","_vnode","children","flushPromises","Promise","resolve","kebabCaseToPascalCase","string","toLowerCase","split","word","charAt","toUpperCase","slice","join","pascalCaseToKebabCase","replace","x","y","debounce","func","timeout","clearTimeout","isOutOfViewPort","bounding","getBoundingClientRect","isOut","top","left","bottom","window","innerHeight","document","documentElement","clientHeight","right","innerWidth","clientWidth","any","Object","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":";;AAOA,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,QAAIL,KAAKO,KAAK,IAAIF,CAAC,IAAID,IAAII,WAAWF,CAAC,IAAI;AAAA,EAC7C;AAEA,SAAOD;AACT;AAOO,SAASF,aAAcM,KAAK;AACjC,SAAOT,KAAKU,MAAMV,KAAKW,O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AOY,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,SAAS7F,OAAOlB,SAAO,CAAC,CAACA,GAAG,EAAEsD,KAAK,GAAG;AAC/C;AAQO,SAAS0D,sBAAuBhH,KAAKiH,SAAS,SAAS;AAC5D,SAAOjH,IAAIwD,QAAQ,2BAAW,GAAE0D,UAAQA,KAAKC,kBAAkBF,MAAM,CAAC;AACxE;AAEA,MAAe,QAAA;AAAA,EACb7H;AAAAA,EACAG;AAAAA,EACAQ;AAAAA,EACAS;AAAAA,EACAM;AAAAA,EACAK;AAAAA,EACAF;AAAAA,EACAY;AAAAA,EACAc;AAAAA,EACAG;AAAAA,EACAa;AAAAA,EACAI;AAAAA,EACAgC;AAAAA,EACAO;AAAAA,EACAO;AAAAA,EACAN;AAAAA,EACAK;AAAAA,EACAE;AAAAA,EACAE;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 Vue 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 = {\n name: 'html-fragment',\n functional: true,\n props: ['html'],\n render (h, ctx) {\n return new Vue({\n // eslint-disable-next-line vue/multi-word-component-names\n name: 'Inner',\n beforeCreate () { this.$createElement = h; },\n template: `<div>${ctx.props.html}</div>`,\n }).$mount()._vnode.children;\n },\n};\n\nexport const flushPromises = () => {\n return new Promise((resolve) => {\n scheduler(resolve);\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\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:9010\" 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 debounce,\n isOutOfViewPort,\n getPhoneNumberRegex,\n linkRegex,\n isEmailAddress,\n isPhoneNumber,\n isURL,\n safeConcatStrings,\n capitalizeFirstLetter,\n};\n"],"names":[],"mappings":";;AAOA,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,MAAI;AACJ,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,QAAI,KAAK,KAAK,IAAI,CAAC,IAAI,IAAI,WAAW,CAAC,IAAI;AAAA,EAC5C;AAED,SAAO;AACT;AAOO,SAAS,aAAc,KAAK;AACjC,SAAO,KAAK,MAAM,KAAK,OAAQ,IAAG,GAAG;AACvC;AAEO,SAAS,eAAgB,UAAU;AACxC,MAAI,CAAC,UAAU;AACb,WAA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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;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":["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
+ {"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 +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":["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;"}
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;"}