@dialpad/dialtone 9.126.6 → 9.127.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 (449) hide show
  1. package/README.md +1 -1
  2. package/dist/tokens/doc.json +23168 -23168
  3. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  4. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  5. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +7 -7
  6. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  7. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  8. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  9. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +5 -5
  10. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  11. package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
  12. package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
  13. package/dist/vue2/lib/datepicker/datepicker.js +10 -10
  14. package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
  15. package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
  16. package/dist/vue2/lib/dropdown/dropdown.cjs.map +1 -1
  17. package/dist/vue2/lib/dropdown/dropdown.js +24 -26
  18. package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
  19. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  20. package/dist/vue2/lib/emoji-picker/emoji-picker.js +1 -0
  21. package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
  22. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +2 -2
  23. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  24. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +33 -29
  25. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  26. package/dist/vue2/lib/toast/toast.cjs.map +1 -1
  27. package/dist/vue2/lib/toast/toast.js.map +1 -1
  28. package/dist/vue2/localization/de-DE.cjs +1 -13
  29. package/dist/vue2/localization/de-DE.cjs.map +1 -1
  30. package/dist/vue2/localization/de-DE.js +1 -13
  31. package/dist/vue2/localization/de-DE.js.map +1 -1
  32. package/dist/vue2/localization/es-LA.cjs +1 -13
  33. package/dist/vue2/localization/es-LA.cjs.map +1 -1
  34. package/dist/vue2/localization/es-LA.js +1 -13
  35. package/dist/vue2/localization/es-LA.js.map +1 -1
  36. package/dist/vue2/localization/fr-FR.cjs +1 -13
  37. package/dist/vue2/localization/fr-FR.cjs.map +1 -1
  38. package/dist/vue2/localization/fr-FR.js +1 -13
  39. package/dist/vue2/localization/fr-FR.js.map +1 -1
  40. package/dist/vue2/localization/it-IT.cjs +1 -13
  41. package/dist/vue2/localization/it-IT.cjs.map +1 -1
  42. package/dist/vue2/localization/it-IT.js +1 -13
  43. package/dist/vue2/localization/it-IT.js.map +1 -1
  44. package/dist/vue2/localization/ja-JP.cjs +1 -8
  45. package/dist/vue2/localization/ja-JP.cjs.map +1 -1
  46. package/dist/vue2/localization/ja-JP.js +1 -8
  47. package/dist/vue2/localization/ja-JP.js.map +1 -1
  48. package/dist/vue2/localization/nl-NL.cjs +1 -13
  49. package/dist/vue2/localization/nl-NL.cjs.map +1 -1
  50. package/dist/vue2/localization/nl-NL.js +1 -13
  51. package/dist/vue2/localization/nl-NL.js.map +1 -1
  52. package/dist/vue2/localization/pt-BR.cjs +1 -13
  53. package/dist/vue2/localization/pt-BR.cjs.map +1 -1
  54. package/dist/vue2/localization/pt-BR.js +1 -13
  55. package/dist/vue2/localization/pt-BR.js.map +1 -1
  56. package/dist/vue2/localization/ru-RU.cjs +1 -23
  57. package/dist/vue2/localization/ru-RU.cjs.map +1 -1
  58. package/dist/vue2/localization/ru-RU.js +1 -23
  59. package/dist/vue2/localization/ru-RU.js.map +1 -1
  60. package/dist/vue2/localization/zh-CN.cjs +1 -8
  61. package/dist/vue2/localization/zh-CN.cjs.map +1 -1
  62. package/dist/vue2/localization/zh-CN.js +1 -8
  63. package/dist/vue2/localization/zh-CN.js.map +1 -1
  64. package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  65. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  66. package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  67. package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +1 -1
  68. package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  69. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  70. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  71. package/dist/vue3/common/mixins/index.cjs +1 -1
  72. package/dist/vue3/common/mixins/index.js +8 -10
  73. package/dist/vue3/common/mixins/index.js.map +1 -1
  74. package/dist/vue3/common/utils/index.cjs +1 -1
  75. package/dist/vue3/common/utils/index.cjs.map +1 -1
  76. package/dist/vue3/common/utils/index.js +42 -38
  77. package/dist/vue3/common/utils/index.js.map +1 -1
  78. package/dist/vue3/component-documentation.json +1 -1
  79. package/dist/vue3/dialtone-vue.cjs +1 -1
  80. package/dist/vue3/dialtone-vue.js +298 -299
  81. package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  82. package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  83. package/dist/vue3/lib/attachment-carousel/attachment-carousel.js +86 -110
  84. package/dist/vue3/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  85. package/dist/vue3/lib/banner/banner.cjs +2 -2
  86. package/dist/vue3/lib/banner/banner.cjs.map +1 -1
  87. package/dist/vue3/lib/banner/banner.js +27 -38
  88. package/dist/vue3/lib/banner/banner.js.map +1 -1
  89. package/dist/vue3/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  90. package/dist/vue3/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
  91. package/dist/vue3/lib/breadcrumbs/breadcrumbs.js +20 -18
  92. package/dist/vue3/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  93. package/dist/vue3/lib/button/button.cjs +1 -1
  94. package/dist/vue3/lib/button/button.cjs.map +1 -1
  95. package/dist/vue3/lib/button/button.js +26 -24
  96. package/dist/vue3/lib/button/button.js.map +1 -1
  97. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  98. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  99. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +36 -41
  100. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  101. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  102. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  103. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js +35 -37
  104. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  105. package/dist/vue3/lib/chip/chip.cjs +1 -1
  106. package/dist/vue3/lib/chip/chip.cjs.map +1 -1
  107. package/dist/vue3/lib/chip/chip.js +54 -57
  108. package/dist/vue3/lib/chip/chip.js.map +1 -1
  109. package/dist/vue3/lib/combobox/combobox-constants.cjs +1 -1
  110. package/dist/vue3/lib/combobox/combobox-constants.cjs.map +1 -1
  111. package/dist/vue3/lib/combobox/combobox-constants.js +2 -2
  112. package/dist/vue3/lib/combobox/combobox-constants.js.map +1 -1
  113. package/dist/vue3/lib/combobox/combobox-empty-list.cjs.map +1 -1
  114. package/dist/vue3/lib/combobox/combobox-empty-list.js.map +1 -1
  115. package/dist/vue3/lib/combobox/combobox-loading-list.cjs.map +1 -1
  116. package/dist/vue3/lib/combobox/combobox-loading-list.js.map +1 -1
  117. package/dist/vue3/lib/combobox/combobox.cjs +2 -2
  118. package/dist/vue3/lib/combobox/combobox.cjs.map +1 -1
  119. package/dist/vue3/lib/combobox/combobox.js +20 -20
  120. package/dist/vue3/lib/combobox/combobox.js.map +1 -1
  121. package/dist/vue3/lib/combobox/index.cjs +1 -1
  122. package/dist/vue3/lib/combobox/index.js +3 -3
  123. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  124. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  125. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js +119 -124
  126. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  127. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  128. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  129. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js +76 -80
  130. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  131. package/dist/vue3/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  132. package/dist/vue3/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
  133. package/dist/vue3/lib/contact-centers-row/contact-centers-row.js +68 -63
  134. package/dist/vue3/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  135. package/dist/vue3/lib/contact-row/contact-row.cjs +1 -1
  136. package/dist/vue3/lib/contact-row/contact-row.cjs.map +1 -1
  137. package/dist/vue3/lib/contact-row/contact-row.js +32 -48
  138. package/dist/vue3/lib/contact-row/contact-row.js.map +1 -1
  139. package/dist/vue3/lib/datepicker/datepicker-constants.cjs +1 -1
  140. package/dist/vue3/lib/datepicker/datepicker-constants.cjs.map +1 -1
  141. package/dist/vue3/lib/datepicker/datepicker-constants.js +2 -3
  142. package/dist/vue3/lib/datepicker/datepicker-constants.js.map +1 -1
  143. package/dist/vue3/lib/datepicker/datepicker.cjs +1 -1
  144. package/dist/vue3/lib/datepicker/datepicker.cjs.map +1 -1
  145. package/dist/vue3/lib/datepicker/datepicker.js +264 -349
  146. package/dist/vue3/lib/datepicker/datepicker.js.map +1 -1
  147. package/dist/vue3/lib/datepicker/formatUtils.cjs +1 -1
  148. package/dist/vue3/lib/datepicker/formatUtils.cjs.map +1 -1
  149. package/dist/vue3/lib/datepicker/formatUtils.js +21 -20
  150. package/dist/vue3/lib/datepicker/formatUtils.js.map +1 -1
  151. package/dist/vue3/lib/datepicker/utils.cjs +1 -1
  152. package/dist/vue3/lib/datepicker/utils.cjs.map +1 -1
  153. package/dist/vue3/lib/datepicker/utils.js +12 -11
  154. package/dist/vue3/lib/datepicker/utils.js.map +1 -1
  155. package/dist/vue3/lib/description-list/description-list.cjs +1 -1
  156. package/dist/vue3/lib/description-list/description-list.cjs.map +1 -1
  157. package/dist/vue3/lib/description-list/description-list.js +10 -10
  158. package/dist/vue3/lib/description-list/description-list.js.map +1 -1
  159. package/dist/vue3/lib/dropdown/dropdown.cjs +1 -1
  160. package/dist/vue3/lib/dropdown/dropdown.cjs.map +1 -1
  161. package/dist/vue3/lib/dropdown/dropdown.js +36 -46
  162. package/dist/vue3/lib/dropdown/dropdown.js.map +1 -1
  163. package/dist/vue3/lib/editor/editor.cjs +1 -1
  164. package/dist/vue3/lib/editor/editor.cjs.map +1 -1
  165. package/dist/vue3/lib/editor/editor.js +169 -186
  166. package/dist/vue3/lib/editor/editor.js.map +1 -1
  167. package/dist/vue3/lib/editor/index.cjs +1 -1
  168. package/dist/vue3/lib/editor/index.js +2 -2
  169. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
  170. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
  171. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js +7 -20
  172. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
  173. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs +1 -1
  174. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  175. package/dist/vue3/lib/emoji-picker/emoji-picker.js +419 -477
  176. package/dist/vue3/lib/emoji-picker/emoji-picker.js.map +1 -1
  177. package/dist/vue3/lib/emoji-picker/index.cjs +1 -1
  178. package/dist/vue3/lib/emoji-picker/index.js +3 -4
  179. package/dist/vue3/lib/emoji-row/emoji-row-constants.cjs +1 -1
  180. package/dist/vue3/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
  181. package/dist/vue3/lib/emoji-row/emoji-row-constants.js +6 -7
  182. package/dist/vue3/lib/emoji-row/emoji-row-constants.js.map +1 -1
  183. package/dist/vue3/lib/emoji-row/emoji-row.cjs +1 -1
  184. package/dist/vue3/lib/emoji-row/emoji-row.cjs.map +1 -1
  185. package/dist/vue3/lib/emoji-row/emoji-row.js +53 -43
  186. package/dist/vue3/lib/emoji-row/emoji-row.js.map +1 -1
  187. package/dist/vue3/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  188. package/dist/vue3/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
  189. package/dist/vue3/lib/feed-item-pill/feed-item-pill.js +52 -53
  190. package/dist/vue3/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  191. package/dist/vue3/lib/general-row/general-row.cjs +1 -1
  192. package/dist/vue3/lib/general-row/general-row.cjs.map +1 -1
  193. package/dist/vue3/lib/general-row/general-row.js +133 -118
  194. package/dist/vue3/lib/general-row/general-row.js.map +1 -1
  195. package/dist/vue3/lib/group-row/group-row.cjs +1 -1
  196. package/dist/vue3/lib/group-row/group-row.cjs.map +1 -1
  197. package/dist/vue3/lib/group-row/group-row.js +53 -39
  198. package/dist/vue3/lib/group-row/group-row.js.map +1 -1
  199. package/dist/vue3/lib/icon/icon-constants.cjs.map +1 -1
  200. package/dist/vue3/lib/icon/icon-constants.js.map +1 -1
  201. package/dist/vue3/lib/icon/icon.cjs +1 -1
  202. package/dist/vue3/lib/icon/icon.cjs.map +1 -1
  203. package/dist/vue3/lib/icon/icon.js +15 -11
  204. package/dist/vue3/lib/icon/icon.js.map +1 -1
  205. package/dist/vue3/lib/image-viewer/image-viewer.cjs +1 -1
  206. package/dist/vue3/lib/image-viewer/image-viewer.cjs.map +1 -1
  207. package/dist/vue3/lib/image-viewer/image-viewer.js +51 -47
  208. package/dist/vue3/lib/image-viewer/image-viewer.js.map +1 -1
  209. package/dist/vue3/lib/ivr-node/ivr-node-constants.cjs +1 -1
  210. package/dist/vue3/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
  211. package/dist/vue3/lib/ivr-node/ivr-node-constants.js +24 -24
  212. package/dist/vue3/lib/ivr-node/ivr-node-constants.js.map +1 -1
  213. package/dist/vue3/lib/ivr-node/ivr-node.cjs +1 -1
  214. package/dist/vue3/lib/ivr-node/ivr-node.cjs.map +1 -1
  215. package/dist/vue3/lib/ivr-node/ivr-node.js +80 -76
  216. package/dist/vue3/lib/ivr-node/ivr-node.js.map +1 -1
  217. package/dist/vue3/lib/message-input/message-input-link.cjs +1 -1
  218. package/dist/vue3/lib/message-input/message-input-link.cjs.map +1 -1
  219. package/dist/vue3/lib/message-input/message-input-link.js +100 -77
  220. package/dist/vue3/lib/message-input/message-input-link.js.map +1 -1
  221. package/dist/vue3/lib/message-input/message-input-topbar.cjs +1 -1
  222. package/dist/vue3/lib/message-input/message-input-topbar.cjs.map +1 -1
  223. package/dist/vue3/lib/message-input/message-input-topbar.js +126 -94
  224. package/dist/vue3/lib/message-input/message-input-topbar.js.map +1 -1
  225. package/dist/vue3/lib/message-input/message-input.cjs +1 -1
  226. package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
  227. package/dist/vue3/lib/message-input/message-input.js +272 -296
  228. package/dist/vue3/lib/message-input/message-input.js.map +1 -1
  229. package/dist/vue3/lib/modal/modal.cjs +1 -2
  230. package/dist/vue3/lib/modal/modal.cjs.map +1 -1
  231. package/dist/vue3/lib/modal/modal.js +64 -79
  232. package/dist/vue3/lib/modal/modal.js.map +1 -1
  233. package/dist/vue3/lib/notice/notice-action.cjs +1 -1
  234. package/dist/vue3/lib/notice/notice-action.cjs.map +1 -1
  235. package/dist/vue3/lib/notice/notice-action.js +38 -39
  236. package/dist/vue3/lib/notice/notice-action.js.map +1 -1
  237. package/dist/vue3/lib/notice/notice.cjs +1 -1
  238. package/dist/vue3/lib/notice/notice.cjs.map +1 -1
  239. package/dist/vue3/lib/notice/notice.js +37 -49
  240. package/dist/vue3/lib/notice/notice.js.map +1 -1
  241. package/dist/vue3/lib/pagination/pagination.cjs +1 -1
  242. package/dist/vue3/lib/pagination/pagination.cjs.map +1 -1
  243. package/dist/vue3/lib/pagination/pagination.js +72 -81
  244. package/dist/vue3/lib/pagination/pagination.js.map +1 -1
  245. package/dist/vue3/lib/popover/popover-header-footer.cjs +1 -1
  246. package/dist/vue3/lib/popover/popover-header-footer.cjs.map +1 -1
  247. package/dist/vue3/lib/popover/popover-header-footer.js +44 -45
  248. package/dist/vue3/lib/popover/popover-header-footer.js.map +1 -1
  249. package/dist/vue3/lib/popover/popover.cjs +1 -1
  250. package/dist/vue3/lib/popover/popover.cjs.map +1 -1
  251. package/dist/vue3/lib/popover/popover.js +26 -37
  252. package/dist/vue3/lib/popover/popover.js.map +1 -1
  253. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +3 -3
  254. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  255. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +187 -181
  256. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  257. package/dist/vue3/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
  258. package/dist/vue3/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  259. package/dist/vue3/lib/time-pill/time-pill.cjs.map +1 -1
  260. package/dist/vue3/lib/time-pill/time-pill.js.map +1 -1
  261. package/dist/vue3/lib/toast/toast.cjs +1 -1
  262. package/dist/vue3/lib/toast/toast.cjs.map +1 -1
  263. package/dist/vue3/lib/toast/toast.js +83 -127
  264. package/dist/vue3/lib/toast/toast.js.map +1 -1
  265. package/dist/vue3/lib/unread-pill/unread-pill.cjs +1 -1
  266. package/dist/vue3/lib/unread-pill/unread-pill.cjs.map +1 -1
  267. package/dist/vue3/lib/unread-pill/unread-pill.js +25 -14
  268. package/dist/vue3/lib/unread-pill/unread-pill.js.map +1 -1
  269. package/dist/vue3/localization/de-DE.cjs +157 -0
  270. package/dist/vue3/localization/de-DE.cjs.map +1 -0
  271. package/dist/vue3/localization/de-DE.js +160 -0
  272. package/dist/vue3/localization/de-DE.js.map +1 -0
  273. package/dist/vue3/localization/en-US.cjs +175 -0
  274. package/dist/vue3/localization/en-US.cjs.map +1 -0
  275. package/dist/vue3/localization/en-US.js +178 -0
  276. package/dist/vue3/localization/en-US.js.map +1 -0
  277. package/dist/vue3/localization/es-LA.cjs +157 -0
  278. package/dist/vue3/localization/es-LA.cjs.map +1 -0
  279. package/dist/vue3/localization/es-LA.js +160 -0
  280. package/dist/vue3/localization/es-LA.js.map +1 -0
  281. package/dist/vue3/localization/fr-FR.cjs +157 -0
  282. package/dist/vue3/localization/fr-FR.cjs.map +1 -0
  283. package/dist/vue3/localization/fr-FR.js +160 -0
  284. package/dist/vue3/localization/fr-FR.js.map +1 -0
  285. package/dist/vue3/localization/index.cjs +2 -0
  286. package/dist/vue3/localization/index.cjs.map +1 -0
  287. package/dist/vue3/localization/index.js +82 -0
  288. package/dist/vue3/localization/index.js.map +1 -0
  289. package/dist/vue3/localization/it-IT.cjs +157 -0
  290. package/dist/vue3/localization/it-IT.cjs.map +1 -0
  291. package/dist/vue3/localization/it-IT.js +160 -0
  292. package/dist/vue3/localization/it-IT.js.map +1 -0
  293. package/dist/vue3/localization/ja-JP.cjs +157 -0
  294. package/dist/vue3/localization/ja-JP.cjs.map +1 -0
  295. package/dist/vue3/localization/ja-JP.js +160 -0
  296. package/dist/vue3/localization/ja-JP.js.map +1 -0
  297. package/dist/vue3/localization/nl-NL.cjs +157 -0
  298. package/dist/vue3/localization/nl-NL.cjs.map +1 -0
  299. package/dist/vue3/localization/nl-NL.js +160 -0
  300. package/dist/vue3/localization/nl-NL.js.map +1 -0
  301. package/dist/vue3/localization/pt-BR.cjs +157 -0
  302. package/dist/vue3/localization/pt-BR.cjs.map +1 -0
  303. package/dist/vue3/localization/pt-BR.js +160 -0
  304. package/dist/vue3/localization/pt-BR.js.map +1 -0
  305. package/dist/vue3/localization/ru-RU.cjs +157 -0
  306. package/dist/vue3/localization/ru-RU.cjs.map +1 -0
  307. package/dist/vue3/localization/ru-RU.js +160 -0
  308. package/dist/vue3/localization/ru-RU.js.map +1 -0
  309. package/dist/vue3/localization/zh-CN.cjs +157 -0
  310. package/dist/vue3/localization/zh-CN.cjs.map +1 -0
  311. package/dist/vue3/localization/zh-CN.js +160 -0
  312. package/dist/vue3/localization/zh-CN.js.map +1 -0
  313. package/dist/vue3/shared/sr_only_close_button.cjs +1 -1
  314. package/dist/vue3/shared/sr_only_close_button.cjs.map +1 -1
  315. package/dist/vue3/shared/sr_only_close_button.js +27 -25
  316. package/dist/vue3/shared/sr_only_close_button.js.map +1 -1
  317. package/dist/vue3/types/common/mixins/index.d.ts +0 -1
  318. package/dist/vue3/types/common/sr_only_close_button.vue.d.ts +8 -15
  319. package/dist/vue3/types/common/sr_only_close_button.vue.d.ts.map +1 -1
  320. package/dist/vue3/types/common/utils/index.d.ts +1 -0
  321. package/dist/vue3/types/common/utils/index.d.ts.map +1 -1
  322. package/dist/vue3/types/components/banner/banner.vue.d.ts +0 -33
  323. package/dist/vue3/types/components/banner/banner.vue.d.ts.map +1 -1
  324. package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts +2 -0
  325. package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts.map +1 -1
  326. package/dist/vue3/types/components/button/button.vue.d.ts +2 -0
  327. package/dist/vue3/types/components/button/button.vue.d.ts.map +1 -1
  328. package/dist/vue3/types/components/chip/chip.vue.d.ts +3 -15
  329. package/dist/vue3/types/components/chip/chip.vue.d.ts.map +1 -1
  330. package/dist/vue3/types/components/combobox/combobox.vue.d.ts.map +1 -1
  331. package/dist/vue3/types/components/combobox/combobox_constants.d.ts +2 -2
  332. package/dist/vue3/types/components/combobox/index.d.ts +1 -1
  333. package/dist/vue3/types/components/datepicker/composables/useCalendar.d.ts.map +1 -1
  334. package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts +5 -1
  335. package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts.map +1 -1
  336. package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
  337. package/dist/vue3/types/components/datepicker/datepicker_constants.d.ts +0 -1
  338. package/dist/vue3/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
  339. package/dist/vue3/types/components/datepicker/formatUtils.d.ts +5 -5
  340. package/dist/vue3/types/components/datepicker/formatUtils.d.ts.map +1 -1
  341. package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts +0 -4
  342. package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts.map +1 -1
  343. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +0 -12
  344. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts.map +1 -1
  345. package/dist/vue3/types/components/datepicker/utils.d.ts +1 -0
  346. package/dist/vue3/types/components/datepicker/utils.d.ts.map +1 -1
  347. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts +0 -24
  348. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  349. package/dist/vue3/types/components/emoji_picker/emoji_picker_constants.d.ts +0 -13
  350. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  351. package/dist/vue3/types/components/icon/icon.vue.d.ts +1 -0
  352. package/dist/vue3/types/components/icon/icon_constants.d.ts.map +1 -1
  353. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts +3 -8
  354. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  355. package/dist/vue3/types/components/modal/modal.vue.d.ts +3 -35
  356. package/dist/vue3/types/components/modal/modal.vue.d.ts.map +1 -1
  357. package/dist/vue3/types/components/notice/notice.vue.d.ts +1 -34
  358. package/dist/vue3/types/components/notice/notice.vue.d.ts.map +1 -1
  359. package/dist/vue3/types/components/notice/notice_action.vue.d.ts +7 -35
  360. package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
  361. package/dist/vue3/types/components/pagination/pagination.vue.d.ts +5 -24
  362. package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
  363. package/dist/vue3/types/components/popover/popover.vue.d.ts +0 -33
  364. package/dist/vue3/types/components/popover/popover.vue.d.ts.map +1 -1
  365. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts +5 -10
  366. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
  367. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +2 -0
  368. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  369. package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +2 -46
  370. package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  371. package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -34
  372. package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
  373. package/dist/vue3/types/components/toast/toast.vue.d.ts +4 -115
  374. package/dist/vue3/types/components/toast/toast.vue.d.ts.map +1 -1
  375. package/dist/vue3/types/index.d.ts +1 -0
  376. package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +3 -11
  377. package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  378. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +3 -10
  379. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  380. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +4 -8
  381. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  382. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node_constants.d.ts +7 -7
  383. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
  384. package/dist/vue3/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
  385. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -25
  386. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  387. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +3 -41
  388. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  389. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +6 -25
  390. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
  391. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +2 -2
  392. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +6 -49
  393. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  394. package/dist/vue3/types/recipes/conversation_view/editor/index.d.ts +1 -1
  395. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +6 -2
  396. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
  397. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row_constants.d.ts.map +1 -1
  398. package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +3 -8
  399. package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  400. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
  401. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +6 -1
  402. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
  403. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +12 -88
  404. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  405. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +11 -1
  406. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
  407. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +13 -1
  408. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
  409. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +5 -8
  410. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  411. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -18
  412. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  413. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +9 -27
  414. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  415. package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts +11 -21
  416. package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
  417. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +6 -2
  418. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  419. package/package.json +4 -4
  420. package/dist/vue3/common/mixins/sr-only-close-button.cjs +0 -3
  421. package/dist/vue3/common/mixins/sr-only-close-button.cjs.map +0 -1
  422. package/dist/vue3/common/mixins/sr-only-close-button.js +0 -44
  423. package/dist/vue3/common/mixins/sr-only-close-button.js.map +0 -1
  424. package/dist/vue3/lib/contact-row/contact-row-constants.cjs +0 -2
  425. package/dist/vue3/lib/contact-row/contact-row-constants.cjs.map +0 -1
  426. package/dist/vue3/lib/contact-row/contact-row-constants.js +0 -5
  427. package/dist/vue3/lib/contact-row/contact-row-constants.js.map +0 -1
  428. package/dist/vue3/lib/emoji/emoji-constants.cjs +0 -2
  429. package/dist/vue3/lib/emoji/emoji-constants.cjs.map +0 -1
  430. package/dist/vue3/lib/emoji/emoji-constants.js +0 -5
  431. package/dist/vue3/lib/emoji/emoji-constants.js.map +0 -1
  432. package/dist/vue3/lib/group-row/group-row-constants.cjs +0 -2
  433. package/dist/vue3/lib/group-row/group-row-constants.cjs.map +0 -1
  434. package/dist/vue3/lib/group-row/group-row-constants.js +0 -8
  435. package/dist/vue3/lib/group-row/group-row-constants.js.map +0 -1
  436. package/dist/vue3/lib/time-pill/time-pill-constants.cjs +0 -2
  437. package/dist/vue3/lib/time-pill/time-pill-constants.cjs.map +0 -1
  438. package/dist/vue3/lib/time-pill/time-pill-constants.js +0 -8
  439. package/dist/vue3/lib/time-pill/time-pill-constants.js.map +0 -1
  440. package/dist/vue3/types/common/mixins/sr_only_close_button.d.ts +0 -30
  441. package/dist/vue3/types/common/mixins/sr_only_close_button.d.ts.map +0 -1
  442. package/dist/vue3/types/components/emoji/emoji_constants.d.ts +0 -3
  443. package/dist/vue3/types/components/emoji/emoji_constants.d.ts.map +0 -1
  444. package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts +0 -6
  445. package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts.map +0 -1
  446. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row_constants.d.ts +0 -3
  447. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row_constants.d.ts.map +0 -1
  448. package/dist/vue3/types/recipes/leftbar/group_row/group_row_constants.d.ts +0 -6
  449. package/dist/vue3/types/recipes/leftbar/group_row/group_row_constants.d.ts.map +0 -1
@@ -4,12 +4,11 @@ import W from "../chip/chip.js";
4
4
  import M from "../validation-messages/validation-messages.js";
5
5
  import { validationMessageValidator as O } from "../../common/validators/index.js";
6
6
  import { hasSlotContent as T, returnFirstEl as g } from "../../common/utils/index.js";
7
- import { POPOVER_APPEND_TO_VALUES as B } from "../popover/popover-constants.js";
8
- import { MULTI_SELECT_SIZES as P, CHIP_SIZES as F, CHIP_TOP_POSITION as k } from "./combobox-multi-select-constants.js";
9
- import H from "../../common/mixins/sr-only-close-button.js";
10
- import { resolveComponent as h, openBlock as p, createBlock as m, createSlots as R, withCtx as a, createElementVNode as r, normalizeClass as z, createElementBlock as f, Fragment as V, renderList as E, mergeProps as b, toHandlers as C, withKeys as D, createTextVNode as A, toDisplayString as y, createVNode as x, withModifiers as K, renderSlot as d } from "vue";
11
- import { _ as N } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
12
- const U = {
7
+ import { POPOVER_APPEND_TO_VALUES as P } from "../popover/popover-constants.js";
8
+ import { MULTI_SELECT_SIZES as B, CHIP_SIZES as F, CHIP_TOP_POSITION as k } from "./combobox-multi-select-constants.js";
9
+ import { resolveComponent as h, openBlock as p, createBlock as m, createSlots as H, withCtx as r, createElementVNode as a, normalizeClass as R, createElementBlock as f, Fragment as z, renderList as V, mergeProps as b, toHandlers as C, withKeys as E, createTextVNode as D, toDisplayString as y, createVNode as x, withModifiers as A, renderSlot as d } from "vue";
10
+ import { _ as K } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const N = {
13
12
  compatConfig: { MODE: 3 },
14
13
  name: "DtRecipeComboboxMultiSelect",
15
14
  components: {
@@ -18,7 +17,6 @@ const U = {
18
17
  DtChip: W,
19
18
  DtValidationMessages: M
20
19
  },
21
- mixins: [H],
22
20
  props: {
23
21
  /**
24
22
  * String to use for the input label.
@@ -55,7 +53,7 @@ const U = {
55
53
  inputMessages: {
56
54
  type: Array,
57
55
  default: () => [],
58
- validator: (e) => O(e)
56
+ validator: (t) => O(t)
59
57
  },
60
58
  /**
61
59
  * Show input validation message
@@ -142,7 +140,7 @@ const U = {
142
140
  size: {
143
141
  type: String,
144
142
  default: "md",
145
- validator: (e) => Object.values(P).includes(e)
143
+ validator: (t) => Object.values(B).includes(t)
146
144
  },
147
145
  /**
148
146
  * Sets the element to which the popover is going to append to.
@@ -152,7 +150,7 @@ const U = {
152
150
  appendTo: {
153
151
  type: [HTMLElement, String],
154
152
  default: "body",
155
- validator: (e) => B.includes(e) || e instanceof HTMLElement
153
+ validator: (t) => P.includes(t) || t instanceof HTMLElement
156
154
  },
157
155
  /**
158
156
  * Named transition when the content display is toggled.
@@ -274,25 +272,25 @@ const U = {
274
272
  },
275
273
  computed: {
276
274
  inputPlaceHolder() {
277
- var e;
278
- return ((e = this.selectedItems) == null ? void 0 : e.length) > 0 ? "" : this.placeholder;
275
+ var t;
276
+ return ((t = this.selectedItems) == null ? void 0 : t.length) > 0 ? "" : this.placeholder;
279
277
  },
280
278
  chipListeners() {
281
279
  return {
282
- keyup: (e) => {
283
- this.onChipKeyup(e), this.$emit("keyup", e);
280
+ keyup: (t) => {
281
+ this.onChipKeyup(t), this.$emit("keyup", t);
284
282
  }
285
283
  };
286
284
  },
287
285
  inputListeners() {
288
286
  return {
289
- input: (e) => {
290
- this.$emit("input", e), this.hasSuggestionList && this.showComboboxList();
287
+ input: (t) => {
288
+ this.$emit("input", t), this.hasSuggestionList && this.showComboboxList();
291
289
  },
292
- keyup: (e) => {
293
- this.onInputKeyup(e), this.$emit("keyup", e);
290
+ keyup: (t) => {
291
+ this.onInputKeyup(t), this.$emit("keyup", t);
294
292
  },
295
- click: (e) => {
293
+ click: (t) => {
296
294
  this.hasSuggestionList && this.showComboboxList();
297
295
  }
298
296
  };
@@ -324,8 +322,8 @@ const U = {
324
322
  size: {
325
323
  async handler() {
326
324
  await this.$nextTick();
327
- const e = this.getInput();
328
- this.revertInputPadding(e), this.initialInputHeight = e.getBoundingClientRect().height, this.setInputPadding(), this.setChipsTopPosition();
325
+ const t = this.getInput();
326
+ this.revertInputPadding(t), this.initialInputHeight = t.getBoundingClientRect().height, this.setInputPadding(), this.setChipsTopPosition();
329
327
  }
330
328
  }
331
329
  },
@@ -335,36 +333,36 @@ const U = {
335
333
  }), this.resizeWindowObserver.observe(document.body), this.initSelectedItems();
336
334
  },
337
335
  beforeUnmount() {
338
- var e;
339
- (e = this.resizeWindowObserver) == null || e.unobserve(document.body);
336
+ var t;
337
+ (t = this.resizeWindowObserver) == null || t.unobserve(document.body);
340
338
  },
341
339
  methods: {
342
- comboboxHighlight(e) {
343
- this.$emit("combobox-highlight", e);
340
+ comboboxHighlight(t) {
341
+ this.$emit("combobox-highlight", t);
344
342
  },
345
343
  async initSelectedItems() {
346
344
  await this.$nextTick(), this.setInputPadding(), this.setChipsTopPosition(), this.setInputMinWidth(), this.checkMaxSelected();
347
345
  },
348
- onChipRemove(e) {
346
+ onChipRemove(t) {
349
347
  var i;
350
- this.$emit("remove", e), (i = this.$refs.input) == null || i.focus();
348
+ this.$emit("remove", t), (i = this.$refs.input) == null || i.focus();
351
349
  },
352
- onComboboxSelect(e) {
353
- this.loading || (this.value = "", this.$emit("select", e));
350
+ onComboboxSelect(t) {
351
+ this.loading || (this.value = "", this.$emit("select", t));
354
352
  },
355
353
  showComboboxList() {
356
- var e;
357
- this.showList == null && ((e = this.$refs.comboboxWithPopover) == null || e.showComboboxList());
354
+ var t;
355
+ this.showList == null && ((t = this.$refs.comboboxWithPopover) == null || t.showComboboxList());
358
356
  },
359
357
  closeComboboxList() {
360
- var e;
361
- this.showList == null && ((e = this.$refs.comboboxWithPopover) == null || e.closeComboboxList());
358
+ var t;
359
+ this.showList == null && ((t = this.$refs.comboboxWithPopover) == null || t.closeComboboxList());
362
360
  },
363
361
  getChipButtons() {
364
- return this.$refs.chips && this.$refs.chips.map((e) => g(e.$el).querySelector("button"));
362
+ return this.$refs.chips && this.$refs.chips.map((t) => g(t.$el).querySelector("button"));
365
363
  },
366
364
  getChips() {
367
- return this.$refs.chips && this.$refs.chips.map((e) => g(e.$el));
365
+ return this.$refs.chips && this.$refs.chips.map((t) => g(t.$el));
368
366
  },
369
367
  getLastChipButton() {
370
368
  return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];
@@ -376,63 +374,63 @@ const U = {
376
374
  return this.$refs.chips && this.getChips()[0];
377
375
  },
378
376
  getInput() {
379
- var e;
380
- return (e = this.$refs.input) == null ? void 0 : e.$refs.input;
381
- },
382
- onChipKeyup(e) {
383
377
  var t;
384
- const i = (t = e.code) == null ? void 0 : t.toLowerCase();
385
- i === "arrowleft" ? this.navigateBetweenChips(e.target, !0) : i === "arrowright" && (e.target.id === this.getLastChipButton().id ? this.moveFromChipToInput() : this.navigateBetweenChips(e.target, !1));
378
+ return (t = this.$refs.input) == null ? void 0 : t.$refs.input;
386
379
  },
387
- onInputKeyup(e) {
388
- var t;
389
- const i = (t = e.code) == null ? void 0 : t.toLowerCase();
390
- this.selectedItems.length > 0 && e.target.selectionStart === 0 && (i === "backspace" || i === "arrowleft") && this.moveFromInputToChip();
380
+ onChipKeyup(t) {
381
+ var e;
382
+ const i = (e = t.code) == null ? void 0 : e.toLowerCase();
383
+ i === "arrowleft" ? this.navigateBetweenChips(t.target, !0) : i === "arrowright" && (t.target.id === this.getLastChipButton().id ? this.moveFromChipToInput() : this.navigateBetweenChips(t.target, !1));
391
384
  },
392
- moveFromInputToChip() {
385
+ onInputKeyup(t) {
393
386
  var e;
394
- this.getLastChipButton().focus(), (e = this.$refs.input) == null || e.blur(), this.closeComboboxList();
387
+ const i = (e = t.code) == null ? void 0 : e.toLowerCase();
388
+ this.selectedItems.length > 0 && t.target.selectionStart === 0 && (i === "backspace" || i === "arrowleft") && this.moveFromInputToChip();
389
+ },
390
+ moveFromInputToChip() {
391
+ var t;
392
+ this.getLastChipButton().focus(), (t = this.$refs.input) == null || t.blur(), this.closeComboboxList();
395
393
  },
396
394
  moveFromChipToInput() {
397
- var e;
398
- this.getLastChipButton().blur(), (e = this.$refs.input) == null || e.focus(), this.showComboboxList();
395
+ var t;
396
+ this.getLastChipButton().blur(), (t = this.$refs.input) == null || t.focus(), this.showComboboxList();
399
397
  },
400
- navigateBetweenChips(e, i) {
398
+ navigateBetweenChips(t, i) {
401
399
  var s;
402
- const t = this.getChipButtons().indexOf(e), l = i ? t - 1 : t + 1;
403
- l < 0 || l >= ((s = this.$refs.chips) == null ? void 0 : s.length) || (this.getChipButtons()[t].blur(), this.getChipButtons()[l].focus(), this.closeComboboxList());
400
+ const e = this.getChipButtons().indexOf(t), l = i ? e - 1 : e + 1;
401
+ l < 0 || l >= ((s = this.$refs.chips) == null ? void 0 : s.length) || (this.getChipButtons()[e].blur(), this.getChipButtons()[l].focus(), this.closeComboboxList());
404
402
  },
405
403
  setChipsTopPosition() {
406
- const e = this.getInput();
407
- if (!e) return;
408
- const i = this.$refs.inputSlotWrapper, t = e.getBoundingClientRect().top - i.getBoundingClientRect().top, l = this.$refs.chipsWrapper;
409
- l.style.top = t - k[this.size] + "px";
404
+ const t = this.getInput();
405
+ if (!t) return;
406
+ const i = this.$refs.inputSlotWrapper, e = t.getBoundingClientRect().top - i.getBoundingClientRect().top, l = this.$refs.chipsWrapper;
407
+ l.style.top = e - k[this.size] + "px";
410
408
  },
411
409
  setInputPadding() {
412
- const e = this.getLastChip(), i = this.getInput(), t = this.$refs.chipsWrapper;
413
- if (!i || (this.revertInputPadding(i), this.popoverOffset = [0, 4], !e) || this.collapseOnFocusOut && !this.inputFocused) return;
414
- const l = e.offsetLeft + this.getFullWidth(e), s = i.getBoundingClientRect().width - l;
410
+ const t = this.getLastChip(), i = this.getInput(), e = this.$refs.chipsWrapper;
411
+ if (!i || (this.revertInputPadding(i), this.popoverOffset = [0, 4], !t) || this.collapseOnFocusOut && !this.inputFocused) return;
412
+ const l = t.offsetLeft + this.getFullWidth(t), s = i.getBoundingClientRect().width - l;
415
413
  s > this.reservedRightSpace ? i.style.paddingLeft = l + "px" : i.style.paddingLeft = "4px";
416
- const o = t.getBoundingClientRect().height - 4, u = e.getBoundingClientRect().height - 4, c = s > this.reservedRightSpace ? e.offsetTop + 2 : o + u - 9;
414
+ const o = e.getBoundingClientRect().height - 4, u = t.getBoundingClientRect().height - 4, c = s > this.reservedRightSpace ? t.offsetTop + 2 : o + u - 9;
417
415
  i.style.paddingTop = `${c}px`;
418
416
  },
419
- revertInputPadding(e) {
420
- e.style.paddingLeft = "", e.style.paddingTop = "", e.style.paddingBottom = "";
417
+ revertInputPadding(t) {
418
+ t.style.paddingLeft = "", t.style.paddingTop = "", t.style.paddingBottom = "";
421
419
  },
422
- getFullWidth(e) {
423
- const i = window.getComputedStyle(e);
424
- return e.offsetWidth + parseInt(i.marginLeft) + parseInt(i.marginRight);
420
+ getFullWidth(t) {
421
+ const i = window.getComputedStyle(t);
422
+ return t.offsetWidth + parseInt(i.marginLeft) + parseInt(i.marginRight);
425
423
  },
426
424
  setInputMinWidth() {
427
- const e = this.getFirstChip(), i = this.getInput();
428
- i && (e ? i.style.minWidth = this.getFullWidth(e) + 4 + "px" : i.style.minWidth = "");
425
+ const t = this.getFirstChip(), i = this.getInput();
426
+ i && (t ? i.style.minWidth = this.getFullWidth(t) + 4 + "px" : i.style.minWidth = "");
429
427
  },
430
428
  checkMaxSelected() {
431
429
  this.maxSelected !== 0 && (this.selectedItems.length > this.maxSelected ? (this.showValidationMessages = !0, this.$emit("max-selected")) : this.showValidationMessages = !1);
432
430
  },
433
431
  setInitialInputHeight() {
434
- const e = this.getInput();
435
- e && (this.initialInputHeight = e.getBoundingClientRect().height);
432
+ const t = this.getInput();
433
+ t && (this.initialInputHeight = t.getBoundingClientRect().height);
436
434
  },
437
435
  async handleInputFocusIn() {
438
436
  this.inputFocused = !0, this.collapseOnFocusOut && (this.hideInputText = !1, await this.$nextTick(), this.setInputPadding());
@@ -440,64 +438,61 @@ const U = {
440
438
  async handleInputFocusOut() {
441
439
  if (this.inputFocused = !1, this.collapseOnFocusOut) {
442
440
  this.hideInputText = !0;
443
- const e = this.getInput();
444
- if (!e || !e.style.paddingTop)
441
+ const t = this.getInput();
442
+ if (!t || !t.style.paddingTop)
445
443
  return;
446
- this.revertInputPadding(e);
444
+ this.revertInputPadding(t);
447
445
  }
448
446
  }
449
447
  }
450
- }, j = { ref: "header" }, Z = {
448
+ }, U = { ref: "header" }, j = {
451
449
  key: 1,
452
450
  class: "d-recipe-combobox-multi-select__list--loading"
453
- }, q = { ref: "footer" };
454
- function $(e, i, t, l, s, o) {
455
- const u = h("dt-chip"), c = h("dt-input"), I = h("dt-validation-messages"), v = h("dt-recipe-combobox-with-popover");
456
- return p(), m(v, {
451
+ }, Z = { ref: "footer" };
452
+ function q(t, i, e, l, s, o) {
453
+ const u = h("dt-chip"), c = h("dt-input"), I = h("dt-validation-messages"), w = h("dt-recipe-combobox-with-popover");
454
+ return p(), m(w, {
457
455
  ref: "comboboxWithPopover",
458
- label: t.label,
459
- "show-list": t.showList,
460
- "max-height": t.listMaxHeight,
461
- "max-width": t.listMaxWidth,
456
+ label: e.label,
457
+ "show-list": e.showList,
458
+ "max-height": e.listMaxHeight,
459
+ "max-width": e.listMaxWidth,
462
460
  "popover-offset": s.popoverOffset,
463
- "has-suggestion-list": t.hasSuggestionList,
464
- "visually-hidden-close-label": e.visuallyHiddenCloseLabel,
465
- "visually-hidden-close": e.visuallyHiddenClose,
461
+ "has-suggestion-list": e.hasSuggestionList,
466
462
  "content-width": "anchor",
467
- "append-to": t.appendTo,
468
- transition: t.transition,
463
+ "append-to": e.appendTo,
464
+ transition: e.transition,
469
465
  onSelect: o.onComboboxSelect,
470
466
  onHighlight: o.comboboxHighlight
471
- }, R({
472
- input: a(({ onInput: S }) => [
473
- r("span", {
467
+ }, H({
468
+ input: r(({ onInput: S }) => [
469
+ a("span", {
474
470
  ref: "inputSlotWrapper",
475
471
  class: "d-recipe-combobox-multi-select__input-wrapper",
476
472
  onFocusin: i[1] || (i[1] = (...n) => o.handleInputFocusIn && o.handleInputFocusIn(...n)),
477
473
  onFocusout: i[2] || (i[2] = (...n) => o.handleInputFocusOut && o.handleInputFocusOut(...n))
478
474
  }, [
479
- r("span", {
475
+ a("span", {
480
476
  ref: "chipsWrapper",
481
- class: z(["d-recipe-combobox-multi-select__chip-wrapper", o.chipWrapperClass])
477
+ class: R(["d-recipe-combobox-multi-select__chip-wrapper", o.chipWrapperClass])
482
478
  }, [
483
- (p(!0), f(V, null, E(t.selectedItems, (n) => (p(), m(u, b({
479
+ (p(!0), f(z, null, V(e.selectedItems, (n) => (p(), m(u, b({
484
480
  ref_for: !0,
485
481
  ref: "chips",
486
482
  key: n,
487
483
  "label-class": ["d-chip__label"],
488
484
  class: [
489
485
  "d-recipe-combobox-multi-select__chip",
490
- { "d-recipe-combobox-multi-select__chip--truncate": !!t.chipMaxWidth }
486
+ { "d-recipe-combobox-multi-select__chip--truncate": !!e.chipMaxWidth }
491
487
  ],
492
- style: { maxWidth: t.chipMaxWidth },
493
- "close-button-props": { ariaLabel: "close" },
494
- size: s.CHIP_SIZES[t.size]
488
+ style: { maxWidth: e.chipMaxWidth },
489
+ size: s.CHIP_SIZES[e.size]
495
490
  }, C(o.chipListeners), {
496
- onKeyup: D((w) => o.onChipRemove(n), ["backspace"]),
497
- onClose: (w) => o.onChipRemove(n)
491
+ onKeyup: E((v) => o.onChipRemove(n), ["backspace"]),
492
+ onClose: (v) => o.onChipRemove(n)
498
493
  }), {
499
- default: a(() => [
500
- A(y(n), 1)
494
+ default: r(() => [
495
+ D(y(n), 1)
501
496
  ]),
502
497
  _: 2
503
498
  }, 1040, ["class", "style", "size", "onKeyup", "onClose"]))), 128))
@@ -508,60 +503,60 @@ function $(e, i, t, l, s, o) {
508
503
  "onUpdate:modelValue": i[0] || (i[0] = (n) => s.value = n),
509
504
  class: "d-recipe-combobox-multi-select__input",
510
505
  "input-class": [
511
- t.inputClass,
506
+ e.inputClass,
512
507
  {
513
508
  "d-recipe-combobox-multi-select__input--hidden": s.hideInputText
514
509
  }
515
510
  ],
516
- "input-wrapper-class": t.inputWrapperClass,
517
- "aria-label": t.label,
518
- label: t.labelVisible ? t.label : "",
519
- description: t.description,
511
+ "input-wrapper-class": e.inputWrapperClass,
512
+ "aria-label": e.label,
513
+ label: e.labelVisible ? e.label : "",
514
+ description: e.description,
520
515
  placeholder: o.inputPlaceHolder,
521
- "show-messages": t.showInputMessages,
522
- messages: t.inputMessages,
523
- size: t.size
516
+ "show-messages": e.showInputMessages,
517
+ messages: e.inputMessages,
518
+ size: e.size
524
519
  }, C(o.inputListeners), { onInput: S }), null, 16, ["modelValue", "input-class", "input-wrapper-class", "aria-label", "label", "description", "placeholder", "show-messages", "messages", "size", "onInput"]),
525
520
  x(I, {
526
- "validation-messages": t.maxSelectedMessage,
521
+ "validation-messages": e.maxSelectedMessage,
527
522
  "show-messages": s.showValidationMessages
528
523
  }, null, 8, ["validation-messages", "show-messages"])
529
524
  ], 544)
530
525
  ]),
531
- list: a(() => [
532
- r("div", {
526
+ list: r(() => [
527
+ a("div", {
533
528
  ref: "list",
534
529
  class: "d-recipe-combobox-multi-select__list",
535
- onMousedown: i[3] || (i[3] = K(() => {
530
+ onMousedown: i[3] || (i[3] = A(() => {
536
531
  }, ["prevent"]))
537
532
  }, [
538
- t.loading ? (p(), f("div", Z, y(t.loadingMessage), 1)) : d(e.$slots, "list", { key: 0 })
533
+ e.loading ? (p(), f("div", j, y(e.loadingMessage), 1)) : d(t.$slots, "list", { key: 0 })
539
534
  ], 544)
540
535
  ]),
541
536
  _: 2
542
537
  }, [
543
- s.hasSlotContent(e.$slots.header) ? {
538
+ s.hasSlotContent(t.$slots.header) ? {
544
539
  name: "header",
545
- fn: a(() => [
546
- r("div", j, [
547
- d(e.$slots, "header")
540
+ fn: r(() => [
541
+ a("div", U, [
542
+ d(t.$slots, "header")
548
543
  ], 512)
549
544
  ]),
550
545
  key: "0"
551
546
  } : void 0,
552
- s.hasSlotContent(e.$slots.footer) ? {
547
+ s.hasSlotContent(t.$slots.footer) ? {
553
548
  name: "footer",
554
- fn: a(() => [
555
- r("div", q, [
556
- d(e.$slots, "footer")
549
+ fn: r(() => [
550
+ a("div", Z, [
551
+ d(t.$slots, "footer")
557
552
  ], 512)
558
553
  ]),
559
554
  key: "1"
560
555
  } : void 0
561
- ]), 1032, ["label", "show-list", "max-height", "max-width", "popover-offset", "has-suggestion-list", "visually-hidden-close-label", "visually-hidden-close", "append-to", "transition", "onSelect", "onHighlight"]);
556
+ ]), 1032, ["label", "show-list", "max-height", "max-width", "popover-offset", "has-suggestion-list", "append-to", "transition", "onSelect", "onHighlight"]);
562
557
  }
563
- const le = /* @__PURE__ */ N(U, [["render", $]]);
558
+ const ot = /* @__PURE__ */ K(N, [["render", q]]);
564
559
  export {
565
- le as default
560
+ ot as default
566
561
  };
567
562
  //# sourceMappingURL=combobox-multi-select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-multi-select.js","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<template>\n <dt-recipe-combobox-with-popover\n ref=\"comboboxWithPopover\"\n :label=\"label\"\n :show-list=\"showList\"\n :max-height=\"listMaxHeight\"\n :max-width=\"listMaxWidth\"\n :popover-offset=\"popoverOffset\"\n :has-suggestion-list=\"hasSuggestionList\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n content-width=\"anchor\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n @select=\"onComboboxSelect\"\n @highlight=\"comboboxHighlight\"\n >\n <template #input=\"{ onInput }\">\n <span\n ref=\"inputSlotWrapper\"\n class=\"d-recipe-combobox-multi-select__input-wrapper\"\n @focusin=\"handleInputFocusIn\"\n @focusout=\"handleInputFocusOut\"\n >\n <span\n ref=\"chipsWrapper\"\n :class=\"['d-recipe-combobox-multi-select__chip-wrapper', chipWrapperClass]\"\n >\n <dt-chip\n v-for=\"item in selectedItems\"\n ref=\"chips\"\n :key=\"item\"\n :label-class=\"['d-chip__label']\"\n :class=\"[\n 'd-recipe-combobox-multi-select__chip',\n { 'd-recipe-combobox-multi-select__chip--truncate': !!chipMaxWidth },\n ]\"\n :style=\"{ maxWidth: chipMaxWidth }\"\n :close-button-props=\"{ ariaLabel: 'close' }\"\n :size=\"CHIP_SIZES[size]\"\n v-on=\"chipListeners\"\n @keyup.backspace=\"onChipRemove(item)\"\n @close=\"onChipRemove(item)\"\n >\n {{ item }}\n </dt-chip>\n </span>\n\n <dt-input\n ref=\"input\"\n v-model=\"value\"\n class=\"d-recipe-combobox-multi-select__input\"\n :input-class=\"[\n inputClass, {\n 'd-recipe-combobox-multi-select__input--hidden': hideInputText,\n }]\"\n :input-wrapper-class=\"inputWrapperClass\"\n :aria-label=\"label\"\n :label=\"labelVisible ? label : ''\"\n :description=\"description\"\n :placeholder=\"inputPlaceHolder\"\n :show-messages=\"showInputMessages\"\n :messages=\"inputMessages\"\n :size=\"size\"\n v-on=\"inputListeners\"\n @input=\"onInput\"\n />\n\n <dt-validation-messages\n :validation-messages=\"maxSelectedMessage\"\n :show-messages=\"showValidationMessages\"\n />\n </span>\n </template>\n\n <!-- @slot slot for popover header -->\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #header\n >\n <div ref=\"header\">\n <slot name=\"header\" />\n </div>\n </template>\n\n <!-- @slot slot for popover list -->\n <template #list>\n <div\n ref=\"list\"\n class=\"d-recipe-combobox-multi-select__list\"\n @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"d-recipe-combobox-multi-select__list--loading\"\n >\n {{ loadingMessage }}\n </div>\n </div>\n </template>\n\n <!-- @slot slot for popover footer -->\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footer\n >\n <div ref=\"footer\">\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-recipe-combobox-with-popover>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport DtRecipeComboboxWithPopover from '@/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue';\nimport DtInput from '@/components/input/input.vue';\nimport DtChip from '@/components/chip/chip.vue';\nimport DtValidationMessages from '@/components/validation_messages/validation_messages.vue';\nimport { validationMessageValidator } from '@/common/validators';\nimport { hasSlotContent, returnFirstEl } from '@/common/utils';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '@/components/popover/popover_constants';\nimport {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n} from './combobox_multi_select_constants';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeComboboxMultiSelect',\n\n components: {\n DtRecipeComboboxWithPopover,\n DtInput,\n DtChip,\n DtValidationMessages,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Input placeholder\n */\n placeholder: {\n type: String,\n default: 'Select one or start typing',\n },\n\n /**\n * Input validation messages\n */\n inputMessages: {\n type: Array,\n default: () => [],\n validator: inputMessages => {\n return validationMessageValidator(inputMessages);\n },\n },\n\n /**\n * Show input validation message\n */\n showInputMessages: {\n type: Boolean,\n default: true,\n },\n\n // @TODO: https://dialpad.atlassian.net/browse/DP-52324\n // type: {\n // type: String,\n // values: ['input', 'select'],\n // default: 'select',\n // },\n\n /**\n * Determines if the list is loading\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The message when the list is loading\n */\n loadingMessage: {\n type: String,\n default: 'loading...',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxHeight: {\n type: String,\n default: '300px',\n },\n\n /**\n * The selected items\n */\n selectedItems: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Would be the maximum number of selections you can make. 0 is unlimited\n */\n maxSelected: {\n type: Number,\n default: 0,\n },\n\n /**\n * Max select message when the max selections is exceeded with the structure:\n * `[{\"message\": string, \"type\": VALIDATION_MESSAGE_TYPES }]`\n */\n maxSelectedMessage: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the chip, one of `xs`, `sm`, `md`\n */\n size: {\n type: String,\n default: 'md',\n validator: (t) => Object.values(MULTI_SELECT_SIZES).includes(t),\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * Determines whether the combobox should collapse to a single when losing focus.\n * @type {boolean}\n */\n collapseOnFocusOut: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Amount of reserved space (in px) on the right side of the input\n * before the chips and the input caret jump to the next line.\n * default is 64\n */\n reservedRightSpace: {\n type: Number,\n default: 64,\n },\n\n /**\n * Determines the maximum width of a single chip. If the text within this chip exceeds the value\n * it will be truncated with ellipses.\n * Possible units rem|px|em\n */\n chipMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the input element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String }\n */\n 'input',\n\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when item removed\n *\n * @event remove\n * @type {String}\n */\n 'remove',\n\n /**\n * Event fired when max selected items limit is reached\n *\n * @event max-selected\n * @type {Object}\n */\n 'max-selected',\n\n /**\n * Native keyup event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n\n /**\n * Event fired when combobox item is highlighted\n *\n * @event combobox-highlight\n * @type {Object}\n */\n 'combobox-highlight',\n ],\n\n data () {\n return {\n value: '',\n popoverOffset: [0, 4],\n showValidationMessages: false,\n resizeWindowObserver: null,\n initialInputHeight: null,\n CHIP_SIZES,\n hasSlotContent,\n inputFocused: false,\n hideInputText: false,\n };\n },\n\n computed: {\n inputPlaceHolder () {\n return this.selectedItems?.length > 0 ? '' : this.placeholder;\n },\n\n chipListeners () {\n return {\n keyup: event => {\n this.onChipKeyup(event);\n this.$emit('keyup', event);\n },\n };\n },\n\n inputListeners () {\n return {\n input: event => {\n this.$emit('input', event);\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n\n keyup: event => {\n this.onInputKeyup(event);\n this.$emit('keyup', event);\n },\n\n click: event => {\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n };\n },\n\n chipWrapperClass () {\n return {\n [`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]: !this.inputFocused && this.collapseOnFocusOut,\n };\n },\n },\n\n watch: {\n selectedItems: {\n deep: true,\n handler: async function () {\n this.initSelectedItems();\n },\n },\n\n chipMaxWidth: {\n async handler () {\n this.initSelectedItems();\n },\n },\n\n async label () {\n await this.$nextTick();\n // Adjust the chips position if label changed\n this.setChipsTopPosition();\n },\n\n async description () {\n await this.$nextTick();\n // Adjust the chips position if description changed\n this.setChipsTopPosition();\n },\n\n size: {\n async handler () {\n await this.$nextTick();\n const input = this.getInput();\n this.revertInputPadding(input);\n this.initialInputHeight = input.getBoundingClientRect().height;\n this.setInputPadding();\n this.setChipsTopPosition();\n },\n },\n },\n\n mounted () {\n this.setInitialInputHeight();\n // Recalculate chip position and input padding when resizing window\n this.resizeWindowObserver = new ResizeObserver(async () => {\n this.setChipsTopPosition();\n this.setInputPadding();\n });\n this.resizeWindowObserver.observe(document.body);\n\n this.initSelectedItems();\n },\n\n beforeUnmount () {\n this.resizeWindowObserver?.unobserve(document.body);\n },\n\n methods: {\n comboboxHighlight (highlightIndex) {\n this.$emit('combobox-highlight', highlightIndex);\n },\n\n async initSelectedItems () {\n await this.$nextTick();\n this.setInputPadding();\n this.setChipsTopPosition();\n this.setInputMinWidth();\n this.checkMaxSelected();\n },\n\n onChipRemove (item) {\n this.$emit('remove', item);\n this.$refs.input?.focus();\n },\n\n onComboboxSelect (i) {\n if (this.loading) return;\n this.value = '';\n this.$emit('select', i);\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.showComboboxList();\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.closeComboboxList();\n },\n\n getChipButtons () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el).querySelector('button'));\n },\n\n getChips () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el));\n },\n\n getLastChipButton () {\n return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];\n },\n\n getLastChip () {\n return this.$refs.chips && this.getChips()[this.getChips().length - 1];\n },\n\n getFirstChip () {\n return this.$refs.chips && this.getChips()[0];\n },\n\n getInput () {\n return this.$refs.input?.$refs.input;\n },\n\n onChipKeyup (event) {\n const key = event.code?.toLowerCase();\n if (key === 'arrowleft') {\n // Move to the previous chip\n this.navigateBetweenChips(event.target, true);\n } else if (key === 'arrowright') {\n if (event.target.id === this.getLastChipButton().id) {\n // Move to the input if it's the last chip\n this.moveFromChipToInput();\n } else {\n // Move to the next chip\n this.navigateBetweenChips(event.target, false);\n }\n }\n },\n\n onInputKeyup (event) {\n const key = event.code?.toLowerCase();\n // If the cursor is at the start of the text,\n // press 'backspace' or 'left' focuses the last chip\n if (this.selectedItems.length > 0 && event.target.selectionStart === 0) {\n if (key === 'backspace' || key === 'arrowleft') {\n this.moveFromInputToChip();\n }\n }\n },\n\n moveFromInputToChip () {\n this.getLastChipButton().focus();\n this.$refs.input?.blur();\n this.closeComboboxList();\n },\n\n moveFromChipToInput () {\n this.getLastChipButton().blur();\n this.$refs.input?.focus();\n this.showComboboxList();\n },\n\n navigateBetweenChips (target, toLeft) {\n const from = this.getChipButtons().indexOf(target);\n const to = toLeft ? from - 1 : from + 1;\n if (to < 0 || to >= this.$refs.chips?.length) {\n return;\n }\n this.getChipButtons()[from].blur();\n this.getChipButtons()[to].focus();\n this.closeComboboxList();\n },\n\n setChipsTopPosition () {\n // To place the chips in the input box\n // The chip \"top\" position should be the same line as the input box\n const input = this.getInput();\n if (!input) return;\n const inputSlotWrapper = this.$refs.inputSlotWrapper;\n const top = input.getBoundingClientRect().top -\n inputSlotWrapper.getBoundingClientRect().top;\n const chipsWrapper = this.$refs.chipsWrapper;\n chipsWrapper.style.top = (top - CHIP_TOP_POSITION[this.size]) + 'px';\n },\n\n setInputPadding () {\n const lastChip = this.getLastChip();\n const input = this.getInput();\n const chipsWrapper = this.$refs.chipsWrapper;\n if (!input) return;\n this.revertInputPadding(input);\n this.popoverOffset = [0, 4];\n if (!lastChip) return;\n // Avoid adding extra padding when the input is not focused if collapseOnFocusOut is true\n // This ensures the input returns to its original state when resizing\n if (this.collapseOnFocusOut && !this.inputFocused) return;\n\n // Get the position of the last chip\n // The input cursor should be the same \"top\" as that chip and next besides it\n const left = lastChip.offsetLeft + this.getFullWidth(lastChip);\n const spaceLeft = input.getBoundingClientRect().width - left;\n // input.style.paddingLeft = left + 'px';\n\n if (spaceLeft > this.reservedRightSpace) {\n input.style.paddingLeft = left + 'px';\n } else {\n input.style.paddingLeft = '4px';\n }\n\n // Get the chip wrapper height minus the 4px padding\n const chipsWrapperHeight = chipsWrapper.getBoundingClientRect().height - 4;\n const lastChipHeight = lastChip.getBoundingClientRect().height - 4;\n\n // Get lastChip offsetTop plus 2px of the input padding.\n const top = spaceLeft > this.reservedRightSpace\n ? lastChip.offsetTop + 2\n : (chipsWrapperHeight + lastChipHeight - 9);\n\n input.style.paddingTop = `${top}px`;\n },\n\n revertInputPadding (input) {\n input.style.paddingLeft = '';\n input.style.paddingTop = '';\n input.style.paddingBottom = '';\n },\n\n getFullWidth (el) {\n const styles = window.getComputedStyle(el);\n return el.offsetWidth + parseInt(styles.marginLeft) + parseInt(styles.marginRight);\n },\n\n setInputMinWidth () {\n // Ensure the width of the input is \"slightly bigger\" than the width of a single chip\n const firstChip = this.getFirstChip();\n const input = this.getInput();\n if (!input) return;\n if (firstChip) {\n // Add 4px buffer for typing room\n input.style.minWidth = (this.getFullWidth(firstChip) + 4) + 'px';\n } else {\n input.style.minWidth = '';\n }\n },\n\n checkMaxSelected () {\n if (this.maxSelected === 0) return;\n if (this.selectedItems.length > this.maxSelected) {\n this.showValidationMessages = true;\n this.$emit('max-selected');\n } else {\n this.showValidationMessages = false;\n }\n },\n\n setInitialInputHeight () {\n const input = this.getInput();\n if (!input) return;\n this.initialInputHeight = input.getBoundingClientRect().height;\n },\n\n async handleInputFocusIn () {\n this.inputFocused = true;\n if (this.collapseOnFocusOut) {\n this.hideInputText = false;\n await this.$nextTick();\n this.setInputPadding();\n }\n },\n\n async handleInputFocusOut () {\n this.inputFocused = false;\n if (this.collapseOnFocusOut) {\n this.hideInputText = true;\n const input = this.getInput();\n if (!input) return;\n // Hide the input text when is not on first line\n if (!input.style.paddingTop) {\n return;\n }\n this.revertInputPadding(input);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtRecipeComboboxWithPopover","DtInput","DtChip","DtValidationMessages","SrOnlyCloseButtonMixin","inputMessages","validationMessageValidator","t","MULTI_SELECT_SIZES","appendTo","POPOVER_APPEND_TO_VALUES","CHIP_SIZES","hasSlotContent","_a","event","input","highlightIndex","item","i","chip","returnFirstEl","key","target","toLeft","from","to","inputSlotWrapper","top","chipsWrapper","CHIP_TOP_POSITION","lastChip","left","spaceLeft","chipsWrapperHeight","lastChipHeight","el","styles","firstChip","_hoisted_1","_hoisted_3","_createBlock","_component_dt_recipe_combobox_with_popover","$props","$data","_ctx","$options","_createSlots","_withCtx","onInput","_createElementVNode","args","_normalizeClass","_openBlock","_createElementBlock","_Fragment","_renderList","_component_dt_chip","_mergeProps","_toHandlers","_withKeys","$event","_createTextVNode","_toDisplayString","_createVNode","_component_dt_input","_cache","_component_dt_validation_messages","_withModifiers","_hoisted_2","_renderSlot"],"mappings":";;;;;;;;;;;AAwIA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,6BAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,sBAAAC;AAAA,EACD;AAAA,EAED,QAAQ,CAACC,CAAsB;AAAA,EAE/B,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA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,QACT,MAeM;AAAA,MAfNM,EAeM,OAAA;AAAA,QAdJ,KAAI;AAAA,QACJ,OAAM;AAAA,QACL,aAASgB,EAAA,CAAA,MAAAA,EAAA,CAAA,IA3FlBE,EA2FQ,MAAkB;AAAA,QAAA,GAAA,CAAA,SAAA,CAAA;AAAA;QAGTzB,EAAO,gBAGhBW,EAKM,OALNe,GAKMN,EADDpB,EAAc,cAAA,GAAA,CAAA,KARnB2B,EAGEzB,oBAhGV,KAAA,GAAA;AAAA;;IAAA,GAAA;AAAA;IA8EYD,EAAc,eAACC,EAAM,OAAC,MAAM;MA9ExC,MA+EO;AAAA,MA/EP,IAAAG,EAiFM,MAEM;AAAA,QAFNE,EAEM,OAFNX,GAEM;AAAA,UADJ+B,EAAsBzB,EAAA,QAAA,QAAA;AAAA;;MAlF9B,KAAA;AAAA,QAAA;AAAA,IA4GYD,EAAc,eAACC,EAAM,OAAC,MAAM;MA5GxC,MA6GO;AAAA,MA7GP,IAAAG,EA+GM,MAEM;AAAA,QAFNE,EAEM,OAFNV,GAEM;AAAA,UADJ8B,EAAsBzB,EAAA,QAAA,QAAA;AAAA;;MAhH9B,KAAA;AAAA,QAAA;AAAA;;;"}
1
+ {"version":3,"file":"combobox-multi-select.js","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<template>\n <dt-recipe-combobox-with-popover\n ref=\"comboboxWithPopover\"\n :label=\"label\"\n :show-list=\"showList\"\n :max-height=\"listMaxHeight\"\n :max-width=\"listMaxWidth\"\n :popover-offset=\"popoverOffset\"\n :has-suggestion-list=\"hasSuggestionList\"\n content-width=\"anchor\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n @select=\"onComboboxSelect\"\n @highlight=\"comboboxHighlight\"\n >\n <template #input=\"{ onInput }\">\n <span\n ref=\"inputSlotWrapper\"\n class=\"d-recipe-combobox-multi-select__input-wrapper\"\n @focusin=\"handleInputFocusIn\"\n @focusout=\"handleInputFocusOut\"\n >\n <span\n ref=\"chipsWrapper\"\n :class=\"['d-recipe-combobox-multi-select__chip-wrapper', chipWrapperClass]\"\n >\n <dt-chip\n v-for=\"item in selectedItems\"\n ref=\"chips\"\n :key=\"item\"\n :label-class=\"['d-chip__label']\"\n :class=\"[\n 'd-recipe-combobox-multi-select__chip',\n { 'd-recipe-combobox-multi-select__chip--truncate': !!chipMaxWidth },\n ]\"\n :style=\"{ maxWidth: chipMaxWidth }\"\n :size=\"CHIP_SIZES[size]\"\n v-on=\"chipListeners\"\n @keyup.backspace=\"onChipRemove(item)\"\n @close=\"onChipRemove(item)\"\n >\n {{ item }}\n </dt-chip>\n </span>\n\n <dt-input\n ref=\"input\"\n v-model=\"value\"\n class=\"d-recipe-combobox-multi-select__input\"\n :input-class=\"[\n inputClass, {\n 'd-recipe-combobox-multi-select__input--hidden': hideInputText,\n }]\"\n :input-wrapper-class=\"inputWrapperClass\"\n :aria-label=\"label\"\n :label=\"labelVisible ? label : ''\"\n :description=\"description\"\n :placeholder=\"inputPlaceHolder\"\n :show-messages=\"showInputMessages\"\n :messages=\"inputMessages\"\n :size=\"size\"\n v-on=\"inputListeners\"\n @input=\"onInput\"\n />\n\n <dt-validation-messages\n :validation-messages=\"maxSelectedMessage\"\n :show-messages=\"showValidationMessages\"\n />\n </span>\n </template>\n\n <!-- @slot slot for popover header -->\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #header\n >\n <div ref=\"header\">\n <slot name=\"header\" />\n </div>\n </template>\n\n <!-- @slot slot for popover list -->\n <template #list>\n <div\n ref=\"list\"\n class=\"d-recipe-combobox-multi-select__list\"\n @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"d-recipe-combobox-multi-select__list--loading\"\n >\n {{ loadingMessage }}\n </div>\n </div>\n </template>\n\n <!-- @slot slot for popover footer -->\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footer\n >\n <div ref=\"footer\">\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-recipe-combobox-with-popover>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport DtRecipeComboboxWithPopover from '@/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue';\nimport DtInput from '@/components/input/input.vue';\nimport DtChip from '@/components/chip/chip.vue';\nimport DtValidationMessages from '@/components/validation_messages/validation_messages.vue';\nimport { validationMessageValidator } from '@/common/validators';\nimport { hasSlotContent, returnFirstEl } from '@/common/utils';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '@/components/popover/popover_constants';\nimport {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n} from './combobox_multi_select_constants';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeComboboxMultiSelect',\n\n components: {\n DtRecipeComboboxWithPopover,\n DtInput,\n DtChip,\n DtValidationMessages,\n },\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Input placeholder\n */\n placeholder: {\n type: String,\n default: 'Select one or start typing',\n },\n\n /**\n * Input validation messages\n */\n inputMessages: {\n type: Array,\n default: () => [],\n validator: inputMessages => {\n return validationMessageValidator(inputMessages);\n },\n },\n\n /**\n * Show input validation message\n */\n showInputMessages: {\n type: Boolean,\n default: true,\n },\n\n // @TODO: https://dialpad.atlassian.net/browse/DP-52324\n // type: {\n // type: String,\n // values: ['input', 'select'],\n // default: 'select',\n // },\n\n /**\n * Determines if the list is loading\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The message when the list is loading\n */\n loadingMessage: {\n type: String,\n default: 'loading...',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxHeight: {\n type: String,\n default: '300px',\n },\n\n /**\n * The selected items\n */\n selectedItems: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Would be the maximum number of selections you can make. 0 is unlimited\n */\n maxSelected: {\n type: Number,\n default: 0,\n },\n\n /**\n * Max select message when the max selections is exceeded with the structure:\n * `[{\"message\": string, \"type\": VALIDATION_MESSAGE_TYPES }]`\n */\n maxSelectedMessage: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the chip, one of `xs`, `sm`, `md`\n */\n size: {\n type: String,\n default: 'md',\n validator: (t) => Object.values(MULTI_SELECT_SIZES).includes(t),\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * Determines whether the combobox should collapse to a single when losing focus.\n * @type {boolean}\n */\n collapseOnFocusOut: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Amount of reserved space (in px) on the right side of the input\n * before the chips and the input caret jump to the next line.\n * default is 64\n */\n reservedRightSpace: {\n type: Number,\n default: 64,\n },\n\n /**\n * Determines the maximum width of a single chip. If the text within this chip exceeds the value\n * it will be truncated with ellipses.\n * Possible units rem|px|em\n */\n chipMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the input element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String }\n */\n 'input',\n\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when item removed\n *\n * @event remove\n * @type {String}\n */\n 'remove',\n\n /**\n * Event fired when max selected items limit is reached\n *\n * @event max-selected\n * @type {Object}\n */\n 'max-selected',\n\n /**\n * Native keyup event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n\n /**\n * Event fired when combobox item is highlighted\n *\n * @event combobox-highlight\n * @type {Object}\n */\n 'combobox-highlight',\n ],\n\n data () {\n return {\n value: '',\n popoverOffset: [0, 4],\n showValidationMessages: false,\n resizeWindowObserver: null,\n initialInputHeight: null,\n CHIP_SIZES,\n hasSlotContent,\n inputFocused: false,\n hideInputText: false,\n };\n },\n\n computed: {\n inputPlaceHolder () {\n return this.selectedItems?.length > 0 ? '' : this.placeholder;\n },\n\n chipListeners () {\n return {\n keyup: event => {\n this.onChipKeyup(event);\n this.$emit('keyup', event);\n },\n };\n },\n\n inputListeners () {\n return {\n input: event => {\n this.$emit('input', event);\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n\n keyup: event => {\n this.onInputKeyup(event);\n this.$emit('keyup', event);\n },\n\n click: event => {\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n };\n },\n\n chipWrapperClass () {\n return {\n [`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]: !this.inputFocused && this.collapseOnFocusOut,\n };\n },\n },\n\n watch: {\n selectedItems: {\n deep: true,\n handler: async function () {\n this.initSelectedItems();\n },\n },\n\n chipMaxWidth: {\n async handler () {\n this.initSelectedItems();\n },\n },\n\n async label () {\n await this.$nextTick();\n // Adjust the chips position if label changed\n this.setChipsTopPosition();\n },\n\n async description () {\n await this.$nextTick();\n // Adjust the chips position if description changed\n this.setChipsTopPosition();\n },\n\n size: {\n async handler () {\n await this.$nextTick();\n const input = this.getInput();\n this.revertInputPadding(input);\n this.initialInputHeight = input.getBoundingClientRect().height;\n this.setInputPadding();\n this.setChipsTopPosition();\n },\n },\n },\n\n mounted () {\n this.setInitialInputHeight();\n // Recalculate chip position and input padding when resizing window\n this.resizeWindowObserver = new ResizeObserver(async () => {\n this.setChipsTopPosition();\n this.setInputPadding();\n });\n this.resizeWindowObserver.observe(document.body);\n\n this.initSelectedItems();\n },\n\n beforeUnmount () {\n this.resizeWindowObserver?.unobserve(document.body);\n },\n\n methods: {\n comboboxHighlight (highlightIndex) {\n this.$emit('combobox-highlight', highlightIndex);\n },\n\n async initSelectedItems () {\n await this.$nextTick();\n this.setInputPadding();\n this.setChipsTopPosition();\n this.setInputMinWidth();\n this.checkMaxSelected();\n },\n\n onChipRemove (item) {\n this.$emit('remove', item);\n this.$refs.input?.focus();\n },\n\n onComboboxSelect (i) {\n if (this.loading) return;\n this.value = '';\n this.$emit('select', i);\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.showComboboxList();\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.closeComboboxList();\n },\n\n getChipButtons () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el).querySelector('button'));\n },\n\n getChips () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el));\n },\n\n getLastChipButton () {\n return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];\n },\n\n getLastChip () {\n return this.$refs.chips && this.getChips()[this.getChips().length - 1];\n },\n\n getFirstChip () {\n return this.$refs.chips && this.getChips()[0];\n },\n\n getInput () {\n return this.$refs.input?.$refs.input;\n },\n\n onChipKeyup (event) {\n const key = event.code?.toLowerCase();\n if (key === 'arrowleft') {\n // Move to the previous chip\n this.navigateBetweenChips(event.target, true);\n } else if (key === 'arrowright') {\n if (event.target.id === this.getLastChipButton().id) {\n // Move to the input if it's the last chip\n this.moveFromChipToInput();\n } else {\n // Move to the next chip\n this.navigateBetweenChips(event.target, false);\n }\n }\n },\n\n onInputKeyup (event) {\n const key = event.code?.toLowerCase();\n // If the cursor is at the start of the text,\n // press 'backspace' or 'left' focuses the last chip\n if (this.selectedItems.length > 0 && event.target.selectionStart === 0) {\n if (key === 'backspace' || key === 'arrowleft') {\n this.moveFromInputToChip();\n }\n }\n },\n\n moveFromInputToChip () {\n this.getLastChipButton().focus();\n this.$refs.input?.blur();\n this.closeComboboxList();\n },\n\n moveFromChipToInput () {\n this.getLastChipButton().blur();\n this.$refs.input?.focus();\n this.showComboboxList();\n },\n\n navigateBetweenChips (target, toLeft) {\n const from = this.getChipButtons().indexOf(target);\n const to = toLeft ? from - 1 : from + 1;\n if (to < 0 || to >= this.$refs.chips?.length) {\n return;\n }\n this.getChipButtons()[from].blur();\n this.getChipButtons()[to].focus();\n this.closeComboboxList();\n },\n\n setChipsTopPosition () {\n // To place the chips in the input box\n // The chip \"top\" position should be the same line as the input box\n const input = this.getInput();\n if (!input) return;\n const inputSlotWrapper = this.$refs.inputSlotWrapper;\n const top = input.getBoundingClientRect().top -\n inputSlotWrapper.getBoundingClientRect().top;\n const chipsWrapper = this.$refs.chipsWrapper;\n chipsWrapper.style.top = (top - CHIP_TOP_POSITION[this.size]) + 'px';\n },\n\n setInputPadding () {\n const lastChip = this.getLastChip();\n const input = this.getInput();\n const chipsWrapper = this.$refs.chipsWrapper;\n if (!input) return;\n this.revertInputPadding(input);\n this.popoverOffset = [0, 4];\n if (!lastChip) return;\n // Avoid adding extra padding when the input is not focused if collapseOnFocusOut is true\n // This ensures the input returns to its original state when resizing\n if (this.collapseOnFocusOut && !this.inputFocused) return;\n\n // Get the position of the last chip\n // The input cursor should be the same \"top\" as that chip and next besides it\n const left = lastChip.offsetLeft + this.getFullWidth(lastChip);\n const spaceLeft = input.getBoundingClientRect().width - left;\n // input.style.paddingLeft = left + 'px';\n\n if (spaceLeft > this.reservedRightSpace) {\n input.style.paddingLeft = left + 'px';\n } else {\n input.style.paddingLeft = '4px';\n }\n\n // Get the chip wrapper height minus the 4px padding\n const chipsWrapperHeight = chipsWrapper.getBoundingClientRect().height - 4;\n const lastChipHeight = lastChip.getBoundingClientRect().height - 4;\n\n // Get lastChip offsetTop plus 2px of the input padding.\n const top = spaceLeft > this.reservedRightSpace\n ? lastChip.offsetTop + 2\n : (chipsWrapperHeight + lastChipHeight - 9);\n\n input.style.paddingTop = `${top}px`;\n },\n\n revertInputPadding (input) {\n input.style.paddingLeft = '';\n input.style.paddingTop = '';\n input.style.paddingBottom = '';\n },\n\n getFullWidth (el) {\n const styles = window.getComputedStyle(el);\n return el.offsetWidth + parseInt(styles.marginLeft) + parseInt(styles.marginRight);\n },\n\n setInputMinWidth () {\n // Ensure the width of the input is \"slightly bigger\" than the width of a single chip\n const firstChip = this.getFirstChip();\n const input = this.getInput();\n if (!input) return;\n if (firstChip) {\n // Add 4px buffer for typing room\n input.style.minWidth = (this.getFullWidth(firstChip) + 4) + 'px';\n } else {\n input.style.minWidth = '';\n }\n },\n\n checkMaxSelected () {\n if (this.maxSelected === 0) return;\n if (this.selectedItems.length > this.maxSelected) {\n this.showValidationMessages = true;\n this.$emit('max-selected');\n } else {\n this.showValidationMessages = false;\n }\n },\n\n setInitialInputHeight () {\n const input = this.getInput();\n if (!input) return;\n this.initialInputHeight = input.getBoundingClientRect().height;\n },\n\n async handleInputFocusIn () {\n this.inputFocused = true;\n if (this.collapseOnFocusOut) {\n this.hideInputText = false;\n await this.$nextTick();\n this.setInputPadding();\n }\n },\n\n async handleInputFocusOut () {\n this.inputFocused = false;\n if (this.collapseOnFocusOut) {\n this.hideInputText = true;\n const input = this.getInput();\n if (!input) return;\n // Hide the input text when is not on first line\n if (!input.style.paddingTop) {\n return;\n }\n this.revertInputPadding(input);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtRecipeComboboxWithPopover","DtInput","DtChip","DtValidationMessages","inputMessages","validationMessageValidator","MULTI_SELECT_SIZES","appendTo","POPOVER_APPEND_TO_VALUES","CHIP_SIZES","hasSlotContent","_a","event","input","highlightIndex","item","i","chip","returnFirstEl","key","target","toLeft","from","to","inputSlotWrapper","top","chipsWrapper","CHIP_TOP_POSITION","lastChip","left","spaceLeft","chipsWrapperHeight","lastChipHeight","el","styles","firstChip","_hoisted_1","_hoisted_3","_createBlock","_component_dt_recipe_combobox_with_popover","$props","$data","$options","_createSlots","_withCtx","onInput","_createElementVNode","args","_normalizeClass","_openBlock","_createElementBlock","_Fragment","_renderList","_component_dt_chip","_mergeProps","_toHandlers","_withKeys","$event","_createTextVNode","_toDisplayString","_createVNode","_component_dt_input","_cache","_component_dt_validation_messages","_withModifiers","_hoisted_2","_renderSlot","_ctx"],"mappings":";;;;;;;;;;AAoIA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,6BAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,sBAAAC;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;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Y1B,EAAc,eAAC0B,EAAM,OAAC,MAAM;MA3ExC,MA4EO;AAAA,MA5EP,IAAAvB,EA8EM,MAEM;AAAA,QAFNE,EAEM,OAFNV,GAEM;AAAA,UADJ8B,EAAsBC,EAAA,QAAA,QAAA;AAAA;;MA/E9B,KAAA;AAAA,QAAA;AAAA,IAyGY1B,EAAc,eAAC0B,EAAM,OAAC,MAAM;MAzGxC,MA0GO;AAAA,MA1GP,IAAAvB,EA4GM,MAEM;AAAA,QAFNE,EAEM,OAFNT,GAEM;AAAA,UADJ6B,EAAsBC,EAAA,QAAA,QAAA;AAAA;;MA7G9B,KAAA;AAAA,QAAA;AAAA;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("../combobox/combobox-loading-list.cjs"),S=require("../combobox/combobox-empty-list.cjs"),u=require("../../common/utils/index.cjs"),L=require("../../common/mixins/sr-only-close-button.cjs"),t=require("vue"),_=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),x=require("../combobox/combobox.cjs"),w=require("../popover/popover.cjs"),v=require("../combobox/combobox-constants.cjs"),h=require("../dropdown/dropdown-constants.cjs"),m=require("../popover/popover-constants.cjs"),C={compatConfig:{MODE:3},name:"DtRecipeComboboxWithPopover",components:{DtCombobox:x.default,DtPopover:w.default,ComboboxLoadingList:y.default,ComboboxEmptyList:S.default},mixins:[L.default],props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},size:{type:String,default:null,validator:e=>Object.values(v.LABEL_SIZES).includes(e)},description:{type:String,default:""},showList:{type:Boolean,default:null},listId:{type:String,default(){return u.getUniqueString()}},listClass:{type:[String,Array,Object],default:""},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},padding:{type:String,default:"small",validator:e=>Object.keys(h.DROPDOWN_PADDING_CLASSES).some(n=>n===e)},contentWidth:{type:String,default:null,validator:e=>m.POPOVER_CONTENT_WIDTHS.includes(e)},openWithArrowKeys:{type:Boolean,default:!1},popoverOffset:{type:Array,default:()=>[0,4]},popoverSticky:{type:[Boolean,String],default:!1},hasSuggestionList:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},emptyList:{type:Boolean,default:!1},emptyStateMessage:{type:String,default:""},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>m.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},transition:{type:String,default:"fade"}},emits:["select","escape","highlight","opened"],data(){return{DROPDOWN_PADDING_CLASSES:h.DROPDOWN_PADDING_CLASSES,isListShown:!1,isInputFocused:!1,isListFocused:!1,externalAnchor:u.getUniqueString(),hasSlotContent:u.hasSlotContent}},computed:{comboboxListeners(){return{...this.$attrs,onSelect:this.onSelect,onEscape:this.onEscape,onHighlight:this.onHighlight}}},watch:{showList:{handler:function(e){e!==null&&(this.isListShown=e)},immediate:!0},isListShown(e){e?window.addEventListener("mousedown",this.onFocusOut):window.removeEventListener("mousedown",this.onFocusOut),this.onOpened(e)}},methods:{handleDisplayList(e){!this.hasSuggestionList&&e&&this.showComboboxList(),!this.hasSuggestionList&&!e&&this.closeComboboxList()},showComboboxList(){this.showList==null&&(this.isListShown=!0)},closeComboboxList(){this.showList==null&&(this.isListShown=!1)},onSelect(e){this.loading||(this.$emit("select",e),this.hasSuggestionList||this.closeComboboxList())},onEscape(){this.$emit("escape"),this.closeComboboxList()},onHighlight(e){this.loading||this.$emit("highlight",e)},onOpened(e){this.$emit("opened",e)},onFocusIn(e){var n;this.hasSuggestionList&&e&&((n=this.$refs.input)==null?void 0:n.querySelector("input"))===e.target&&this.showComboboxList()},onFocusOut(e){var r,i,s;const n=(i=(r=this.$refs.popover)==null?void 0:r.tip)==null?void 0:i.popper,o=this.$refs.input;(s=e.composedPath())!=null&&s.some(a=>[n,o].includes(a))||this.closeComboboxList()},openOnArrowKeyPress(){this.showList!==null||this.isListShown||!this.openWithArrowKeys||this.showComboboxList()}}},O=["id"],E={ref:"header"},P=["onMouseleave","onFocusout"],D={ref:"footer"};function A(e,n,o,r,i,s){const a=t.resolveComponent("combobox-loading-list"),p=t.resolveComponent("combobox-empty-list"),b=t.resolveComponent("dt-popover"),f=t.resolveComponent("dt-combobox");return t.openBlock(),t.createBlock(f,t.mergeProps({ref:"combobox",loading:o.loading,label:o.label,"label-visible":o.labelVisible,size:o.size,description:o.description,"empty-list":o.emptyList,"empty-state-message":o.emptyStateMessage,"show-list":i.isListShown,"on-beginning-of-list":o.onBeginningOfList,"on-end-of-list":o.onEndOfList,"list-rendered-outside":!0,"list-id":o.listId,"data-qa":"dt-combobox"},s.comboboxListeners),{input:t.withCtx(({inputProps:d})=>[t.createElementVNode("div",{id:i.externalAnchor,ref:"input",onFocusin:n[0]||(n[0]=(...l)=>s.onFocusIn&&s.onFocusIn(...l)),onKeydown:[n[1]||(n[1]=t.withKeys(l=>s.openOnArrowKeyPress(l),["up"])),n[2]||(n[2]=t.withKeys(l=>s.openOnArrowKeyPress(l),["down"]))]},[t.renderSlot(e.$slots,"input",{inputProps:d,onInput:s.handleDisplayList})],40,O)]),list:t.withCtx(({opened:d,listProps:l,clearHighlightIndex:c})=>[t.createVNode(b,{ref:"popover",open:i.isListShown,"onUpdate:open":n[3]||(n[3]=g=>i.isListShown=g),"hide-on-click":!1,"max-height":o.maxHeight,"max-width":o.maxWidth,offset:o.popoverOffset,sticky:o.popoverSticky,placement:"bottom-start","initial-focus-element":"none",padding:"none",role:"listbox","external-anchor":i.externalAnchor,"content-width":o.contentWidth,"content-appear":!0,"content-tabindex":null,modal:!1,"auto-focus":!1,"append-to":o.appendTo,transition:o.transition,"visually-hidden-close-label":e.visuallyHiddenCloseLabel,"visually-hidden-close":e.visuallyHiddenClose,onOpened:d},t.createSlots({content:t.withCtx(()=>[t.createElementVNode("div",{ref:"listWrapper",class:t.normalizeClass(["d-recipe-combobox-with-popover__list",i.DROPDOWN_PADDING_CLASSES[o.padding],o.listClass]),onMouseleave:c,onFocusout:c},[o.loading?(t.openBlock(),t.createBlock(a,t.normalizeProps(t.mergeProps({key:0},l)),null,16)):o.emptyList&&o.emptyStateMessage?(t.openBlock(),t.createBlock(p,t.mergeProps({key:1},l,{message:o.emptyStateMessage}),null,16,["message"])):t.renderSlot(e.$slots,"list",{key:2,listProps:l})],42,P)]),_:2},[i.hasSlotContent(e.$slots.header)?{name:"headerContent",fn:t.withCtx(()=>[t.createElementVNode("div",E,[t.renderSlot(e.$slots,"header")],512)]),key:"0"}:void 0,i.hasSlotContent(e.$slots.footer)?{name:"footerContent",fn:t.withCtx(()=>[t.createElementVNode("div",D,[t.renderSlot(e.$slots,"footer")],512)]),key:"1"}:void 0]),1032,["open","max-height","max-width","offset","sticky","external-anchor","content-width","append-to","transition","visually-hidden-close-label","visually-hidden-close","onOpened"])]),_:3},16,["loading","label","label-visible","size","description","empty-list","empty-state-message","show-list","on-beginning-of-list","on-end-of-list","list-id"])}const k=_._(C,[["render",A]]);exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("../combobox/combobox-loading-list.cjs"),y=require("../combobox/combobox-empty-list.cjs"),u=require("../../common/utils/index.cjs"),t=require("vue"),L=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),_=require("../combobox/combobox.cjs"),x=require("../popover/popover.cjs"),w=require("../combobox/combobox-constants.cjs"),h=require("../dropdown/dropdown-constants.cjs"),m=require("../popover/popover-constants.cjs"),C={compatConfig:{MODE:3},name:"DtRecipeComboboxWithPopover",components:{DtCombobox:_.default,DtPopover:x.default,ComboboxLoadingList:S.default,ComboboxEmptyList:y.default},props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},size:{type:String,default:null,validator:e=>Object.values(w.COMBOBOX_LABEL_SIZES).includes(e)},description:{type:String,default:""},showList:{type:Boolean,default:null},listId:{type:String,default(){return u.getUniqueString()}},listClass:{type:[String,Array,Object],default:""},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},padding:{type:String,default:"small",validator:e=>Object.keys(h.DROPDOWN_PADDING_CLASSES).some(n=>n===e)},contentWidth:{type:String,default:null,validator:e=>m.POPOVER_CONTENT_WIDTHS.includes(e)},openWithArrowKeys:{type:Boolean,default:!1},popoverOffset:{type:Array,default:()=>[0,4]},popoverSticky:{type:[Boolean,String],default:!1},hasSuggestionList:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},emptyList:{type:Boolean,default:!1},emptyStateMessage:{type:String,default:""},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>m.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},transition:{type:String,default:"fade"}},emits:["select","escape","highlight","opened"],data(){return{DROPDOWN_PADDING_CLASSES:h.DROPDOWN_PADDING_CLASSES,isListShown:!1,isInputFocused:!1,isListFocused:!1,externalAnchor:u.getUniqueString(),hasSlotContent:u.hasSlotContent}},computed:{comboboxListeners(){return{...this.$attrs,onSelect:this.onSelect,onEscape:this.onEscape,onHighlight:this.onHighlight}}},watch:{showList:{handler:function(e){e!==null&&(this.isListShown=e)},immediate:!0},isListShown(e){e?window.addEventListener("mousedown",this.onFocusOut):window.removeEventListener("mousedown",this.onFocusOut),this.onOpened(e)}},methods:{handleDisplayList(e){!this.hasSuggestionList&&e&&this.showComboboxList(),!this.hasSuggestionList&&!e&&this.closeComboboxList()},showComboboxList(){this.showList==null&&(this.isListShown=!0)},closeComboboxList(){this.showList==null&&(this.isListShown=!1)},onSelect(e){this.loading||(this.$emit("select",e),this.hasSuggestionList||this.closeComboboxList())},onEscape(){this.$emit("escape"),this.closeComboboxList()},onHighlight(e){this.loading||this.$emit("highlight",e)},onOpened(e){this.$emit("opened",e)},onFocusIn(e){var n;this.hasSuggestionList&&e&&((n=this.$refs.input)==null?void 0:n.querySelector("input"))===e.target&&this.showComboboxList()},onFocusOut(e){var r,i,s;const n=(i=(r=this.$refs.popover)==null?void 0:r.tip)==null?void 0:i.popper,o=this.$refs.input;(s=e.composedPath())!=null&&s.some(a=>[n,o].includes(a))||this.closeComboboxList()},openOnArrowKeyPress(){this.showList!==null||this.isListShown||!this.openWithArrowKeys||this.showComboboxList()}}},v=["id"],O={ref:"header"},E=["onMouseleave","onFocusout"],P={ref:"footer"};function D(e,n,o,r,i,s){const a=t.resolveComponent("combobox-loading-list"),p=t.resolveComponent("combobox-empty-list"),b=t.resolveComponent("dt-popover"),f=t.resolveComponent("dt-combobox");return t.openBlock(),t.createBlock(f,t.mergeProps({ref:"combobox",loading:o.loading,label:o.label,"label-visible":o.labelVisible,size:o.size,description:o.description,"empty-list":o.emptyList,"empty-state-message":o.emptyStateMessage,"show-list":i.isListShown,"on-beginning-of-list":o.onBeginningOfList,"on-end-of-list":o.onEndOfList,"list-rendered-outside":!0,"list-id":o.listId,"data-qa":"dt-combobox"},s.comboboxListeners),{input:t.withCtx(({inputProps:d})=>[t.createElementVNode("div",{id:i.externalAnchor,ref:"input",onFocusin:n[0]||(n[0]=(...l)=>s.onFocusIn&&s.onFocusIn(...l)),onKeydown:[n[1]||(n[1]=t.withKeys(l=>s.openOnArrowKeyPress(l),["up"])),n[2]||(n[2]=t.withKeys(l=>s.openOnArrowKeyPress(l),["down"]))]},[t.renderSlot(e.$slots,"input",{inputProps:d,onInput:s.handleDisplayList})],40,v)]),list:t.withCtx(({opened:d,listProps:l,clearHighlightIndex:c})=>[t.createVNode(b,{ref:"popover",open:i.isListShown,"onUpdate:open":n[3]||(n[3]=g=>i.isListShown=g),"hide-on-click":!1,"max-height":o.maxHeight,"max-width":o.maxWidth,offset:o.popoverOffset,sticky:o.popoverSticky,placement:"bottom-start","initial-focus-element":"none",padding:"none",role:"listbox","external-anchor":i.externalAnchor,"content-width":o.contentWidth,"content-appear":!0,"content-tabindex":null,modal:!1,"auto-focus":!1,"append-to":o.appendTo,transition:o.transition,onOpened:d},t.createSlots({content:t.withCtx(()=>[t.createElementVNode("div",{ref:"listWrapper",class:t.normalizeClass(["d-recipe-combobox-with-popover__list",i.DROPDOWN_PADDING_CLASSES[o.padding],o.listClass]),onMouseleave:c,onFocusout:c},[o.loading?(t.openBlock(),t.createBlock(a,t.normalizeProps(t.mergeProps({key:0},l)),null,16)):o.emptyList&&o.emptyStateMessage?(t.openBlock(),t.createBlock(p,t.mergeProps({key:1},l,{message:o.emptyStateMessage}),null,16,["message"])):t.renderSlot(e.$slots,"list",{key:2,listProps:l})],42,E)]),_:2},[i.hasSlotContent(e.$slots.header)?{name:"headerContent",fn:t.withCtx(()=>[t.createElementVNode("div",O,[t.renderSlot(e.$slots,"header")],512)]),key:"0"}:void 0,i.hasSlotContent(e.$slots.footer)?{name:"footerContent",fn:t.withCtx(()=>[t.createElementVNode("div",P,[t.renderSlot(e.$slots,"footer")],512)]),key:"1"}:void 0]),1032,["open","max-height","max-width","offset","sticky","external-anchor","content-width","append-to","transition","onOpened"])]),_:3},16,["loading","label","label-visible","size","description","empty-list","empty-state-message","show-list","on-beginning-of-list","on-end-of-list","list-id"])}const A=L._(C,[["render",D]]);exports.default=A;
2
2
  //# sourceMappingURL=combobox-with-popover.cjs.map