@dialpad/dialtone-vue 3.187.3 → 3.187.4

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 (621) hide show
  1. package/dist/common/constants/index.cjs.map +1 -1
  2. package/dist/common/constants/index.js.map +1 -1
  3. package/dist/common/dates/index.cjs.map +1 -1
  4. package/dist/common/dates/index.js +3 -3
  5. package/dist/common/dates/index.js.map +1 -1
  6. package/dist/common/emoji/index.cjs.map +1 -1
  7. package/dist/common/emoji/index.js.map +1 -1
  8. package/dist/common/mixins/dom.cjs.map +1 -1
  9. package/dist/common/mixins/dom.js.map +1 -1
  10. package/dist/common/mixins/input-group.cjs.map +1 -1
  11. package/dist/common/mixins/input-group.js +5 -5
  12. package/dist/common/mixins/input-group.js.map +1 -1
  13. package/dist/common/mixins/input.cjs.map +1 -1
  14. package/dist/common/mixins/input.js.map +1 -1
  15. package/dist/common/mixins/keyboard-list-navigation.cjs.map +1 -1
  16. package/dist/common/mixins/keyboard-list-navigation.js.map +1 -1
  17. package/dist/common/mixins/modal.cjs.map +1 -1
  18. package/dist/common/mixins/modal.js.map +1 -1
  19. package/dist/common/mixins/skeleton.cjs.map +1 -1
  20. package/dist/common/mixins/skeleton.js.map +1 -1
  21. package/dist/common/utils/index.cjs.map +1 -1
  22. package/dist/common/utils/index.js +3 -3
  23. package/dist/common/utils/index.js.map +1 -1
  24. package/dist/common/validators/index.cjs.map +1 -1
  25. package/dist/common/validators/index.js.map +1 -1
  26. package/dist/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  27. package/dist/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  28. package/dist/lib/attachment-carousel/attachment-carousel.js +5 -5
  29. package/dist/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  30. package/dist/lib/avatar/avatar-constants.cjs.map +1 -1
  31. package/dist/lib/avatar/avatar-constants.js.map +1 -1
  32. package/dist/lib/avatar/avatar.cjs.map +1 -1
  33. package/dist/lib/avatar/avatar.js +11 -11
  34. package/dist/lib/avatar/avatar.js.map +1 -1
  35. package/dist/lib/avatar/utils.cjs.map +1 -1
  36. package/dist/lib/avatar/utils.js.map +1 -1
  37. package/dist/lib/badge/badge.cjs.map +1 -1
  38. package/dist/lib/badge/badge.js +12 -12
  39. package/dist/lib/badge/badge.js.map +1 -1
  40. package/dist/lib/banner/banner.cjs +1 -1
  41. package/dist/lib/banner/banner.cjs.map +1 -1
  42. package/dist/lib/banner/banner.js +7 -7
  43. package/dist/lib/banner/banner.js.map +1 -1
  44. package/dist/lib/breadcrumbs/breadcrumb-item.cjs.map +1 -1
  45. package/dist/lib/breadcrumbs/breadcrumb-item.js +5 -5
  46. package/dist/lib/breadcrumbs/breadcrumb-item.js.map +1 -1
  47. package/dist/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
  48. package/dist/lib/breadcrumbs/breadcrumbs.js +1 -1
  49. package/dist/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  50. package/dist/lib/button/button-constants.cjs.map +1 -1
  51. package/dist/lib/button/button-constants.js.map +1 -1
  52. package/dist/lib/button/button.cjs.map +1 -1
  53. package/dist/lib/button/button.js +22 -22
  54. package/dist/lib/button/button.js.map +1 -1
  55. package/dist/lib/button-group/button-group.cjs.map +1 -1
  56. package/dist/lib/button-group/button-group.js +2 -2
  57. package/dist/lib/button-group/button-group.js.map +1 -1
  58. package/dist/lib/button-group/buttons-decorator.cjs.map +1 -1
  59. package/dist/lib/button-group/buttons-decorator.js +2 -2
  60. package/dist/lib/button-group/buttons-decorator.js.map +1 -1
  61. package/dist/lib/callbar-button/callbar-button-constants.cjs.map +1 -1
  62. package/dist/lib/callbar-button/callbar-button-constants.js.map +1 -1
  63. package/dist/lib/callbar-button/callbar-button.cjs +1 -1
  64. package/dist/lib/callbar-button/callbar-button.cjs.map +1 -1
  65. package/dist/lib/callbar-button/callbar-button.js +13 -13
  66. package/dist/lib/callbar-button/callbar-button.js.map +1 -1
  67. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  68. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  69. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +13 -13
  70. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  71. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  72. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  73. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.js +13 -13
  74. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  75. package/dist/lib/callbox/callbox-constants.cjs.map +1 -1
  76. package/dist/lib/callbox/callbox-constants.js.map +1 -1
  77. package/dist/lib/callbox/callbox.cjs.map +1 -1
  78. package/dist/lib/callbox/callbox.js +6 -6
  79. package/dist/lib/callbox/callbox.js.map +1 -1
  80. package/dist/lib/card/card.cjs.map +1 -1
  81. package/dist/lib/card/card.js +4 -4
  82. package/dist/lib/card/card.js.map +1 -1
  83. package/dist/lib/checkbox/checkbox-constants.cjs.map +1 -1
  84. package/dist/lib/checkbox/checkbox-constants.js.map +1 -1
  85. package/dist/lib/checkbox/checkbox.cjs.map +1 -1
  86. package/dist/lib/checkbox/checkbox.js +8 -8
  87. package/dist/lib/checkbox/checkbox.js.map +1 -1
  88. package/dist/lib/checkbox-group/checkbox-group.cjs.map +1 -1
  89. package/dist/lib/checkbox-group/checkbox-group.js.map +1 -1
  90. package/dist/lib/checkbox-group/checkboxes-decorator.cjs.map +1 -1
  91. package/dist/lib/checkbox-group/checkboxes-decorator.js +1 -1
  92. package/dist/lib/checkbox-group/checkboxes-decorator.js.map +1 -1
  93. package/dist/lib/chip/chip-constants.cjs.map +1 -1
  94. package/dist/lib/chip/chip-constants.js.map +1 -1
  95. package/dist/lib/chip/chip.cjs.map +1 -1
  96. package/dist/lib/chip/chip.js +13 -13
  97. package/dist/lib/chip/chip.js.map +1 -1
  98. package/dist/lib/codeblock/codeblock.cjs.map +1 -1
  99. package/dist/lib/codeblock/codeblock.js +2 -2
  100. package/dist/lib/codeblock/codeblock.js.map +1 -1
  101. package/dist/lib/collapsible/collapsible-lazy-show.cjs.map +1 -1
  102. package/dist/lib/collapsible/collapsible-lazy-show.js +3 -3
  103. package/dist/lib/collapsible/collapsible-lazy-show.js.map +1 -1
  104. package/dist/lib/collapsible/collapsible.cjs +1 -1
  105. package/dist/lib/collapsible/collapsible.cjs.map +1 -1
  106. package/dist/lib/collapsible/collapsible.js +18 -18
  107. package/dist/lib/collapsible/collapsible.js.map +1 -1
  108. package/dist/lib/combobox/combobox-constants.cjs.map +1 -1
  109. package/dist/lib/combobox/combobox-constants.js.map +1 -1
  110. package/dist/lib/combobox/combobox-empty-list.cjs.map +1 -1
  111. package/dist/lib/combobox/combobox-empty-list.js +2 -2
  112. package/dist/lib/combobox/combobox-empty-list.js.map +1 -1
  113. package/dist/lib/combobox/combobox-loading-list.cjs +1 -1
  114. package/dist/lib/combobox/combobox-loading-list.cjs.map +1 -1
  115. package/dist/lib/combobox/combobox-loading-list.js +6 -6
  116. package/dist/lib/combobox/combobox-loading-list.js.map +1 -1
  117. package/dist/lib/combobox/combobox.cjs +1 -1
  118. package/dist/lib/combobox/combobox.cjs.map +1 -1
  119. package/dist/lib/combobox/combobox.js +8 -8
  120. package/dist/lib/combobox/combobox.js.map +1 -1
  121. package/dist/lib/combobox-multi-select/combobox-multi-select-constants.cjs.map +1 -1
  122. package/dist/lib/combobox-multi-select/combobox-multi-select-constants.js.map +1 -1
  123. package/dist/lib/combobox-multi-select/combobox-multi-select-story-constants.cjs.map +1 -1
  124. package/dist/lib/combobox-multi-select/combobox-multi-select-story-constants.js.map +1 -1
  125. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  126. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  127. package/dist/lib/combobox-multi-select/combobox-multi-select.js +16 -16
  128. package/dist/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  129. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  130. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  131. package/dist/lib/combobox-with-popover/combobox-with-popover.js +13 -13
  132. package/dist/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  133. package/dist/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  134. package/dist/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
  135. package/dist/lib/contact-centers-row/contact-centers-row.js +19 -19
  136. package/dist/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  137. package/dist/lib/contact-info/contact-info.cjs.map +1 -1
  138. package/dist/lib/contact-info/contact-info.js +1 -1
  139. package/dist/lib/contact-info/contact-info.js.map +1 -1
  140. package/dist/lib/contact-row/contact-row.cjs +1 -1
  141. package/dist/lib/contact-row/contact-row.cjs.map +1 -1
  142. package/dist/lib/contact-row/contact-row.js +12 -12
  143. package/dist/lib/contact-row/contact-row.js.map +1 -1
  144. package/dist/lib/datepicker/datepicker.cjs +1 -1
  145. package/dist/lib/datepicker/datepicker.cjs.map +1 -1
  146. package/dist/lib/datepicker/datepicker.js +139 -139
  147. package/dist/lib/datepicker/datepicker.js.map +1 -1
  148. package/dist/lib/datepicker/formatUtils.cjs.map +1 -1
  149. package/dist/lib/datepicker/formatUtils.js.map +1 -1
  150. package/dist/lib/datepicker/utils.cjs.map +1 -1
  151. package/dist/lib/datepicker/utils.js.map +1 -1
  152. package/dist/lib/description-list/description-list.cjs.map +1 -1
  153. package/dist/lib/description-list/description-list.js +3 -3
  154. package/dist/lib/description-list/description-list.js.map +1 -1
  155. package/dist/lib/dropdown/dropdown-constants.cjs.map +1 -1
  156. package/dist/lib/dropdown/dropdown-constants.js.map +1 -1
  157. package/dist/lib/dropdown/dropdown-list.cjs.map +1 -1
  158. package/dist/lib/dropdown/dropdown-list.js +5 -5
  159. package/dist/lib/dropdown/dropdown-list.js.map +1 -1
  160. package/dist/lib/dropdown/dropdown-separator.cjs.map +1 -1
  161. package/dist/lib/dropdown/dropdown-separator.js +2 -2
  162. package/dist/lib/dropdown/dropdown-separator.js.map +1 -1
  163. package/dist/lib/dropdown/dropdown-story-constants.cjs.map +1 -1
  164. package/dist/lib/dropdown/dropdown-story-constants.js.map +1 -1
  165. package/dist/lib/dropdown/dropdown.cjs +1 -1
  166. package/dist/lib/dropdown/dropdown.cjs.map +1 -1
  167. package/dist/lib/dropdown/dropdown.js +3 -3
  168. package/dist/lib/dropdown/dropdown.js.map +1 -1
  169. package/dist/lib/editor/editor-constants.cjs.map +1 -1
  170. package/dist/lib/editor/editor-constants.js.map +1 -1
  171. package/dist/lib/editor/editor.cjs +1 -1
  172. package/dist/lib/editor/editor.cjs.map +1 -1
  173. package/dist/lib/editor/editor.js +48 -48
  174. package/dist/lib/editor/editor.js.map +1 -1
  175. package/dist/lib/emoji/emoji.cjs.map +1 -1
  176. package/dist/lib/emoji/emoji.js +6 -6
  177. package/dist/lib/emoji/emoji.js.map +1 -1
  178. package/dist/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
  179. package/dist/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
  180. package/dist/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  181. package/dist/lib/emoji-picker/emoji-picker.js +2 -2
  182. package/dist/lib/emoji-picker/emoji-picker.js.map +1 -1
  183. package/dist/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
  184. package/dist/lib/emoji-row/emoji-row-constants.js.map +1 -1
  185. package/dist/lib/emoji-row/emoji-row.cjs +1 -1
  186. package/dist/lib/emoji-row/emoji-row.cjs.map +1 -1
  187. package/dist/lib/emoji-row/emoji-row.js +10 -10
  188. package/dist/lib/emoji-row/emoji-row.js.map +1 -1
  189. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.cjs +1 -1
  190. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.cjs.map +1 -1
  191. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.js +1 -1
  192. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.js.map +1 -1
  193. package/dist/lib/empty-state/empty-state-constants.cjs.map +1 -1
  194. package/dist/lib/empty-state/empty-state-constants.js.map +1 -1
  195. package/dist/lib/empty-state/empty-state.cjs.map +1 -1
  196. package/dist/lib/empty-state/empty-state.js +7 -7
  197. package/dist/lib/feed-item-pill/feed-item-pill-constants.cjs.map +1 -1
  198. package/dist/lib/feed-item-pill/feed-item-pill-constants.js.map +1 -1
  199. package/dist/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  200. package/dist/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
  201. package/dist/lib/feed-item-pill/feed-item-pill.js +6 -6
  202. package/dist/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  203. package/dist/lib/feed-item-row/feed-item-row-constants.cjs.map +1 -1
  204. package/dist/lib/feed-item-row/feed-item-row-constants.js.map +1 -1
  205. package/dist/lib/feed-item-row/feed-item-row.cjs +1 -1
  206. package/dist/lib/feed-item-row/feed-item-row.cjs.map +1 -1
  207. package/dist/lib/feed-item-row/feed-item-row.js +56 -56
  208. package/dist/lib/feed-item-row/feed-item-row.js.map +1 -1
  209. package/dist/lib/general-row/general-row-constants.cjs.map +1 -1
  210. package/dist/lib/general-row/general-row-constants.js.map +1 -1
  211. package/dist/lib/general-row/general-row.cjs +1 -1
  212. package/dist/lib/general-row/general-row.cjs.map +1 -1
  213. package/dist/lib/general-row/general-row.js +30 -30
  214. package/dist/lib/general-row/general-row.js.map +1 -1
  215. package/dist/lib/general-row/leftbar-general-row-icon.cjs.map +1 -1
  216. package/dist/lib/general-row/leftbar-general-row-icon.js +35 -35
  217. package/dist/lib/general-row/leftbar-general-row-icon.js.map +1 -1
  218. package/dist/lib/group-row/group-row.cjs.map +1 -1
  219. package/dist/lib/group-row/group-row.js +3 -3
  220. package/dist/lib/group-row/group-row.js.map +1 -1
  221. package/dist/lib/grouped-chip/grouped-chip.cjs.map +1 -1
  222. package/dist/lib/grouped-chip/grouped-chip.js +14 -14
  223. package/dist/lib/grouped-chip/grouped-chip.js.map +1 -1
  224. package/dist/lib/hovercard/hovercard.cjs +1 -1
  225. package/dist/lib/hovercard/hovercard.cjs.map +1 -1
  226. package/dist/lib/hovercard/hovercard.js +6 -6
  227. package/dist/lib/hovercard/hovercard.js.map +1 -1
  228. package/dist/lib/icon/icon-constants.cjs.map +1 -1
  229. package/dist/lib/icon/icon-constants.js.map +1 -1
  230. package/dist/lib/icon/icon.cjs.map +1 -1
  231. package/dist/lib/icon/icon.js +6 -6
  232. package/dist/lib/icon/icon.js.map +1 -1
  233. package/dist/lib/illustration/illustration-constants.cjs.map +1 -1
  234. package/dist/lib/illustration/illustration-constants.js.map +1 -1
  235. package/dist/lib/illustration/illustration.cjs.map +1 -1
  236. package/dist/lib/illustration/illustration.js +3 -3
  237. package/dist/lib/image-viewer/image-viewer.cjs.map +1 -1
  238. package/dist/lib/image-viewer/image-viewer.js +12 -12
  239. package/dist/lib/image-viewer/image-viewer.js.map +1 -1
  240. package/dist/lib/input/input-constants.cjs.map +1 -1
  241. package/dist/lib/input/input-constants.js.map +1 -1
  242. package/dist/lib/input/input.cjs.map +1 -1
  243. package/dist/lib/input/input.js +20 -20
  244. package/dist/lib/input/input.js.map +1 -1
  245. package/dist/lib/input-group/input-group.cjs.map +1 -1
  246. package/dist/lib/input-group/input-group.js +8 -8
  247. package/dist/lib/input-group/input-group.js.map +1 -1
  248. package/dist/lib/item-layout/item-layout.cjs.map +1 -1
  249. package/dist/lib/item-layout/item-layout.js +13 -13
  250. package/dist/lib/item-layout/item-layout.js.map +1 -1
  251. package/dist/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
  252. package/dist/lib/ivr-node/ivr-node-constants.js.map +1 -1
  253. package/dist/lib/ivr-node/ivr-node.cjs +1 -1
  254. package/dist/lib/ivr-node/ivr-node.cjs.map +1 -1
  255. package/dist/lib/ivr-node/ivr-node.js +36 -36
  256. package/dist/lib/ivr-node/ivr-node.js.map +1 -1
  257. package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs.map +1 -1
  258. package/dist/lib/keyboard-shortcut/keyboard-shortcut.js +15 -15
  259. package/dist/lib/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  260. package/dist/lib/lazy-show/lazy-show.cjs.map +1 -1
  261. package/dist/lib/lazy-show/lazy-show.js +2 -2
  262. package/dist/lib/lazy-show/lazy-show.js.map +1 -1
  263. package/dist/lib/link/link-constants.cjs.map +1 -1
  264. package/dist/lib/link/link-constants.js.map +1 -1
  265. package/dist/lib/link/link.cjs.map +1 -1
  266. package/dist/lib/link/link.js +5 -5
  267. package/dist/lib/link/link.js.map +1 -1
  268. package/dist/lib/list-item/list-item-constants.cjs.map +1 -1
  269. package/dist/lib/list-item/list-item-constants.js.map +1 -1
  270. package/dist/lib/list-item/list-item.cjs.map +1 -1
  271. package/dist/lib/list-item/list-item.js +4 -4
  272. package/dist/lib/list-item/list-item.js.map +1 -1
  273. package/dist/lib/list-item-group/list-item-group-constants.cjs.map +1 -1
  274. package/dist/lib/list-item-group/list-item-group-constants.js.map +1 -1
  275. package/dist/lib/list-item-group/list-item-group.cjs.map +1 -1
  276. package/dist/lib/list-item-group/list-item-group.js +5 -5
  277. package/dist/lib/list-item-group/list-item-group.js.map +1 -1
  278. package/dist/lib/loader/loader.cjs.map +1 -1
  279. package/dist/lib/loader/loader.js +2 -2
  280. package/dist/lib/loader/loader.js.map +1 -1
  281. package/dist/lib/message-input/last-active-nodes.cjs +1 -1
  282. package/dist/lib/message-input/last-active-nodes.cjs.map +1 -1
  283. package/dist/lib/message-input/last-active-nodes.js +22 -22
  284. package/dist/lib/message-input/last-active-nodes.js.map +1 -1
  285. package/dist/lib/message-input/message-input-button.cjs +1 -1
  286. package/dist/lib/message-input/message-input-button.cjs.map +1 -1
  287. package/dist/lib/message-input/message-input-button.js +14 -14
  288. package/dist/lib/message-input/message-input-button.js.map +1 -1
  289. package/dist/lib/message-input/message-input-constants.cjs.map +1 -1
  290. package/dist/lib/message-input/message-input-constants.js.map +1 -1
  291. package/dist/lib/message-input/message-input-link.cjs +1 -1
  292. package/dist/lib/message-input/message-input-link.cjs.map +1 -1
  293. package/dist/lib/message-input/message-input-link.js +10 -10
  294. package/dist/lib/message-input/message-input-link.js.map +1 -1
  295. package/dist/lib/message-input/message-input-topbar.cjs.map +1 -1
  296. package/dist/lib/message-input/message-input-topbar.js +11 -11
  297. package/dist/lib/message-input/message-input-topbar.js.map +1 -1
  298. package/dist/lib/message-input/message-input.cjs +1 -1
  299. package/dist/lib/message-input/message-input.cjs.map +1 -1
  300. package/dist/lib/message-input/message-input.js +32 -32
  301. package/dist/lib/message-input/message-input.js.map +1 -1
  302. package/dist/lib/modal/modal.cjs +1 -1
  303. package/dist/lib/modal/modal.cjs.map +1 -1
  304. package/dist/lib/modal/modal.js +14 -14
  305. package/dist/lib/modal/modal.js.map +1 -1
  306. package/dist/lib/notice/notice-action.cjs.map +1 -1
  307. package/dist/lib/notice/notice-action.js +1 -1
  308. package/dist/lib/notice/notice-action.js.map +1 -1
  309. package/dist/lib/notice/notice-constants.cjs.map +1 -1
  310. package/dist/lib/notice/notice-constants.js.map +1 -1
  311. package/dist/lib/notice/notice-content.cjs.map +1 -1
  312. package/dist/lib/notice/notice-content.js +6 -6
  313. package/dist/lib/notice/notice-content.js.map +1 -1
  314. package/dist/lib/notice/notice-icon.cjs.map +1 -1
  315. package/dist/lib/notice/notice-icon.js +13 -13
  316. package/dist/lib/notice/notice-icon.js.map +1 -1
  317. package/dist/lib/notice/notice.cjs.map +1 -1
  318. package/dist/lib/notice/notice.js +4 -4
  319. package/dist/lib/notice/notice.js.map +1 -1
  320. package/dist/lib/pagination/pagination.cjs.map +1 -1
  321. package/dist/lib/pagination/pagination.js +4 -4
  322. package/dist/lib/pagination/pagination.js.map +1 -1
  323. package/dist/lib/popover/popover-constants.cjs.map +1 -1
  324. package/dist/lib/popover/popover-constants.js.map +1 -1
  325. package/dist/lib/popover/popover-header-footer.cjs.map +1 -1
  326. package/dist/lib/popover/popover-header-footer.js +6 -6
  327. package/dist/lib/popover/popover-header-footer.js.map +1 -1
  328. package/dist/lib/popover/popover.cjs +1 -1
  329. package/dist/lib/popover/popover.cjs.map +1 -1
  330. package/dist/lib/popover/popover.js +17 -17
  331. package/dist/lib/popover/popover.js.map +1 -1
  332. package/dist/lib/popover/tippy-utils.cjs +1 -1
  333. package/dist/lib/popover/tippy-utils.cjs.map +1 -1
  334. package/dist/lib/popover/tippy-utils.js +16 -18
  335. package/dist/lib/popover/tippy-utils.js.map +1 -1
  336. package/dist/lib/presence/presence.cjs.map +1 -1
  337. package/dist/lib/presence/presence.js +4 -4
  338. package/dist/lib/presence/presence.js.map +1 -1
  339. package/dist/lib/radio/radio-constants.cjs.map +1 -1
  340. package/dist/lib/radio/radio-constants.js.map +1 -1
  341. package/dist/lib/radio/radio.cjs.map +1 -1
  342. package/dist/lib/radio/radio.js +13 -13
  343. package/dist/lib/radio/radio.js.map +1 -1
  344. package/dist/lib/radio-group/radio-group.cjs.map +1 -1
  345. package/dist/lib/radio-group/radio-group.js.map +1 -1
  346. package/dist/lib/radio-group/radios-decorator.cjs.map +1 -1
  347. package/dist/lib/radio-group/radios-decorator.js +1 -1
  348. package/dist/lib/radio-group/radios-decorator.js.map +1 -1
  349. package/dist/lib/recipes/eslint.config.cjs +2 -0
  350. package/dist/lib/recipes/eslint.config.cjs.map +1 -0
  351. package/dist/lib/recipes/eslint.config.js +12 -0
  352. package/dist/lib/recipes/eslint.config.js.map +1 -0
  353. package/dist/lib/rich-text-editor/channel-suggestion.cjs.map +1 -1
  354. package/dist/lib/rich-text-editor/channel-suggestion.js.map +1 -1
  355. package/dist/lib/rich-text-editor/mention-suggestion.cjs.map +1 -1
  356. package/dist/lib/rich-text-editor/mention-suggestion.js.map +1 -1
  357. package/dist/lib/rich-text-editor/rich-text-editor-constants.cjs.map +1 -1
  358. package/dist/lib/rich-text-editor/rich-text-editor-constants.js.map +1 -1
  359. package/dist/lib/rich-text-editor/rich-text-editor.cjs +3 -3
  360. package/dist/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  361. package/dist/lib/rich-text-editor/rich-text-editor.js +61 -54
  362. package/dist/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  363. package/dist/lib/rich-text-editor/slash-command-suggestion.cjs.map +1 -1
  364. package/dist/lib/rich-text-editor/slash-command-suggestion.js.map +1 -1
  365. package/dist/lib/root-layout/root-layout-constants.cjs.map +1 -1
  366. package/dist/lib/root-layout/root-layout-constants.js.map +1 -1
  367. package/dist/lib/root-layout/root-layout.cjs.map +1 -1
  368. package/dist/lib/root-layout/root-layout.js +3 -3
  369. package/dist/lib/root-layout/root-layout.js.map +1 -1
  370. package/dist/lib/scrollbar-directive/scrollbar.cjs.map +1 -1
  371. package/dist/lib/scrollbar-directive/scrollbar.js.map +1 -1
  372. package/dist/lib/scroller/scroller.cjs +1 -1
  373. package/dist/lib/scroller/scroller.cjs.map +1 -1
  374. package/dist/lib/scroller/scroller.js +2 -2
  375. package/dist/lib/scroller/scroller.js.map +1 -1
  376. package/dist/lib/select-menu/select-menu-constants.cjs.map +1 -1
  377. package/dist/lib/select-menu/select-menu-constants.js.map +1 -1
  378. package/dist/lib/select-menu/select-menu.cjs.map +1 -1
  379. package/dist/lib/select-menu/select-menu.js +21 -21
  380. package/dist/lib/select-menu/select-menu.js.map +1 -1
  381. package/dist/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
  382. package/dist/lib/settings-menu-button/settings-menu-button.js +3 -3
  383. package/dist/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  384. package/dist/lib/skeleton/skeleton-constants.cjs.map +1 -1
  385. package/dist/lib/skeleton/skeleton-constants.js.map +1 -1
  386. package/dist/lib/skeleton/skeleton-list-item.cjs.map +1 -1
  387. package/dist/lib/skeleton/skeleton-list-item.js +2 -2
  388. package/dist/lib/skeleton/skeleton-list-item.js.map +1 -1
  389. package/dist/lib/skeleton/skeleton-paragraph.cjs.map +1 -1
  390. package/dist/lib/skeleton/skeleton-paragraph.js +1 -1
  391. package/dist/lib/skeleton/skeleton-paragraph.js.map +1 -1
  392. package/dist/lib/skeleton/skeleton-shape.cjs.map +1 -1
  393. package/dist/lib/skeleton/skeleton-shape.js +5 -5
  394. package/dist/lib/skeleton/skeleton-shape.js.map +1 -1
  395. package/dist/lib/skeleton/skeleton-text.cjs.map +1 -1
  396. package/dist/lib/skeleton/skeleton-text.js +7 -7
  397. package/dist/lib/skeleton/skeleton-text.js.map +1 -1
  398. package/dist/lib/skeleton/skeleton.cjs +1 -1
  399. package/dist/lib/skeleton/skeleton.cjs.map +1 -1
  400. package/dist/lib/skeleton/skeleton.js +11 -11
  401. package/dist/lib/skeleton/skeleton.js.map +1 -1
  402. package/dist/lib/split-button/split-button-alpha.cjs.map +1 -1
  403. package/dist/lib/split-button/split-button-alpha.js +2 -2
  404. package/dist/lib/split-button/split-button-alpha.js.map +1 -1
  405. package/dist/lib/split-button/split-button-constants.cjs.map +1 -1
  406. package/dist/lib/split-button/split-button-constants.js.map +1 -1
  407. package/dist/lib/split-button/split-button-omega.cjs.map +1 -1
  408. package/dist/lib/split-button/split-button-omega.js +2 -2
  409. package/dist/lib/split-button/split-button-omega.js.map +1 -1
  410. package/dist/lib/split-button/split-button.cjs.map +1 -1
  411. package/dist/lib/split-button/split-button.js +19 -19
  412. package/dist/lib/split-button/split-button.js.map +1 -1
  413. package/dist/lib/stack/stack-constants.cjs.map +1 -1
  414. package/dist/lib/stack/stack-constants.js.map +1 -1
  415. package/dist/lib/stack/stack.cjs.map +1 -1
  416. package/dist/lib/stack/stack.js +11 -11
  417. package/dist/lib/stack/stack.js.map +1 -1
  418. package/dist/lib/stack/utils.cjs.map +1 -1
  419. package/dist/lib/stack/utils.js.map +1 -1
  420. package/dist/lib/stack/validators.cjs.map +1 -1
  421. package/dist/lib/stack/validators.js +5 -5
  422. package/dist/lib/stack/validators.js.map +1 -1
  423. package/dist/lib/tab/tab-group.cjs.map +1 -1
  424. package/dist/lib/tab/tab-group.js +7 -7
  425. package/dist/lib/tab/tab-group.js.map +1 -1
  426. package/dist/lib/tab/tab-panel.cjs.map +1 -1
  427. package/dist/lib/tab/tab-panel.js +2 -2
  428. package/dist/lib/tab/tab-panel.js.map +1 -1
  429. package/dist/lib/tab/tab.cjs.map +1 -1
  430. package/dist/lib/tab/tab.js +2 -2
  431. package/dist/lib/tab/tab.js.map +1 -1
  432. package/dist/lib/time-pill/time-pill.cjs.map +1 -1
  433. package/dist/lib/time-pill/time-pill.js +2 -2
  434. package/dist/lib/time-pill/time-pill.js.map +1 -1
  435. package/dist/lib/toast/toast-constants.cjs.map +1 -1
  436. package/dist/lib/toast/toast-constants.js.map +1 -1
  437. package/dist/lib/toast/toast.cjs +1 -1
  438. package/dist/lib/toast/toast.cjs.map +1 -1
  439. package/dist/lib/toast/toast.js +12 -12
  440. package/dist/lib/toast/toast.js.map +1 -1
  441. package/dist/lib/toggle/toggle-constants.cjs.map +1 -1
  442. package/dist/lib/toggle/toggle-constants.js.map +1 -1
  443. package/dist/lib/toggle/toggle.cjs +1 -1
  444. package/dist/lib/toggle/toggle.cjs.map +1 -1
  445. package/dist/lib/toggle/toggle.js +14 -14
  446. package/dist/lib/toggle/toggle.js.map +1 -1
  447. package/dist/lib/tooltip/tooltip-constants.cjs.map +1 -1
  448. package/dist/lib/tooltip/tooltip-constants.js.map +1 -1
  449. package/dist/lib/tooltip/tooltip.cjs +1 -1
  450. package/dist/lib/tooltip/tooltip.cjs.map +1 -1
  451. package/dist/lib/tooltip/tooltip.js +20 -22
  452. package/dist/lib/tooltip/tooltip.js.map +1 -1
  453. package/dist/lib/tooltip-directive/tooltip.cjs.map +1 -1
  454. package/dist/lib/tooltip-directive/tooltip.js +1 -1
  455. package/dist/lib/tooltip-directive/tooltip.js.map +1 -1
  456. package/dist/lib/top-banner-info/top-banner-info-constants.cjs.map +1 -1
  457. package/dist/lib/top-banner-info/top-banner-info-constants.js.map +1 -1
  458. package/dist/lib/top-banner-info/top-banner-info.cjs.map +1 -1
  459. package/dist/lib/top-banner-info/top-banner-info.js +2 -2
  460. package/dist/lib/top-banner-info/top-banner-info.js.map +1 -1
  461. package/dist/lib/unread-pill/unread-pill-constants.cjs.map +1 -1
  462. package/dist/lib/unread-pill/unread-pill-constants.js.map +1 -1
  463. package/dist/lib/unread-pill/unread-pill.cjs.map +1 -1
  464. package/dist/lib/unread-pill/unread-pill.js +7 -7
  465. package/dist/lib/unread-pill/unread-pill.js.map +1 -1
  466. package/dist/lib/validation-messages/validation-messages.cjs.map +1 -1
  467. package/dist/lib/validation-messages/validation-messages.js +9 -9
  468. package/dist/lib/validation-messages/validation-messages.js.map +1 -1
  469. package/dist/localization/de-DE.cjs.map +1 -1
  470. package/dist/localization/de-DE.js.map +1 -1
  471. package/dist/localization/en-US.cjs.map +1 -1
  472. package/dist/localization/en-US.js.map +1 -1
  473. package/dist/localization/es-LA.cjs.map +1 -1
  474. package/dist/localization/es-LA.js.map +1 -1
  475. package/dist/localization/fr-FR.cjs.map +1 -1
  476. package/dist/localization/fr-FR.js.map +1 -1
  477. package/dist/localization/index.cjs.map +1 -1
  478. package/dist/localization/index.js.map +1 -1
  479. package/dist/localization/it-IT.cjs.map +1 -1
  480. package/dist/localization/it-IT.js.map +1 -1
  481. package/dist/localization/ja-JP.cjs.map +1 -1
  482. package/dist/localization/ja-JP.js.map +1 -1
  483. package/dist/localization/nl-NL.cjs.map +1 -1
  484. package/dist/localization/nl-NL.js.map +1 -1
  485. package/dist/localization/pt-BR.cjs.map +1 -1
  486. package/dist/localization/pt-BR.js.map +1 -1
  487. package/dist/localization/ru-RU.cjs.map +1 -1
  488. package/dist/localization/ru-RU.js.map +1 -1
  489. package/dist/localization/zh-CN.cjs.map +1 -1
  490. package/dist/localization/zh-CN.js.map +1 -1
  491. package/dist/node_modules/@tiptap/vue-3.cjs.map +1 -1
  492. package/dist/node_modules/@tiptap/vue-3.js +3 -3
  493. package/dist/node_modules/@tiptap/vue-3.js.map +1 -1
  494. package/dist/shared/sr_only_close_button.cjs.map +1 -1
  495. package/dist/shared/sr_only_close_button.js +2 -2
  496. package/dist/shared/sr_only_close_button.js.map +1 -1
  497. package/dist/types/common/constants/index.d.ts.map +1 -1
  498. package/dist/types/common/dates/index.d.ts.map +1 -1
  499. package/dist/types/common/emoji/index.d.ts.map +1 -1
  500. package/dist/types/common/mixins/dom.d.ts.map +1 -1
  501. package/dist/types/common/mixins/input.d.ts +6 -6
  502. package/dist/types/common/mixins/input.d.ts.map +1 -1
  503. package/dist/types/common/mixins/input_group.d.ts +2 -2
  504. package/dist/types/common/mixins/modal.d.ts.map +1 -1
  505. package/dist/types/common/utils/index.d.ts.map +1 -1
  506. package/dist/types/components/avatar/avatar.vue.d.ts +12 -12
  507. package/dist/types/components/badge/badge.vue.d.ts +4 -4
  508. package/dist/types/components/banner/banner.vue.d.ts +1 -1
  509. package/dist/types/components/banner/banner.vue.d.ts.map +1 -1
  510. package/dist/types/components/breadcrumbs/breadcrumbs_constants.d.ts.map +1 -1
  511. package/dist/types/components/button/button.vue.d.ts +3 -3
  512. package/dist/types/components/button/button_constants.d.ts.map +1 -1
  513. package/dist/types/components/card/card.vue.d.ts +12 -12
  514. package/dist/types/components/checkbox/checkbox.vue.d.ts +6 -6
  515. package/dist/types/components/checkbox_group/checkbox_group.vue.d.ts +2 -2
  516. package/dist/types/components/chip/chip.vue.d.ts +6 -6
  517. package/dist/types/components/collapsible/collapsible.vue.d.ts +6 -6
  518. package/dist/types/components/combobox/combobox.vue.d.ts +4 -4
  519. package/dist/types/components/combobox/combobox_empty-list.vue.d.ts +3 -3
  520. package/dist/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
  521. package/dist/types/components/datepicker/formatUtils.d.ts +5 -5
  522. package/dist/types/components/datepicker/formatUtils.d.ts.map +1 -1
  523. package/dist/types/components/datepicker/modules/calendar.vue.d.ts +1 -1
  524. package/dist/types/components/datepicker/modules/month-year-picker.vue.d.ts +1 -1
  525. package/dist/types/components/description_list/description_list.vue.d.ts +6 -6
  526. package/dist/types/components/dropdown/dropdown.vue.d.ts +10 -10
  527. package/dist/types/components/emoji/emoji.vue.d.ts +3 -3
  528. package/dist/types/components/emoji_picker/emoji_picker_constants.d.ts.map +1 -1
  529. package/dist/types/components/emoji_picker/modules/emoji_search.vue.d.ts.map +1 -1
  530. package/dist/types/components/emoji_picker/modules/emoji_selector.vue.d.ts.map +1 -1
  531. package/dist/types/components/emoji_picker/modules/emoji_skin_selector.vue.d.ts.map +1 -1
  532. package/dist/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  533. package/dist/types/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts +1 -1
  534. package/dist/types/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts.map +1 -1
  535. package/dist/types/components/empty_state/empty_state.vue.d.ts +7 -11
  536. package/dist/types/components/empty_state/empty_state.vue.d.ts.map +1 -1
  537. package/dist/types/components/eslint.config.d.ts +8 -0
  538. package/dist/types/components/eslint.config.d.ts.map +1 -0
  539. package/dist/types/components/hovercard/hovercard.vue.d.ts +686 -11
  540. package/dist/types/components/hovercard/hovercard.vue.d.ts.map +1 -1
  541. package/dist/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  542. package/dist/types/components/input/input.vue.d.ts +8 -8
  543. package/dist/types/components/input_group/input_group.vue.d.ts +2 -2
  544. package/dist/types/components/item_layout/item_layout.vue.d.ts +1 -1
  545. package/dist/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +7 -210
  546. package/dist/types/components/lazy_show/lazy_show.vue.d.ts +1 -1
  547. package/dist/types/components/link/link_constants.d.ts.map +1 -1
  548. package/dist/types/components/list_item/list_item.vue.d.ts +3 -3
  549. package/dist/types/components/list_item_group/list_item_group.vue.d.ts +6 -6
  550. package/dist/types/components/modal/modal.vue.d.ts +16 -16
  551. package/dist/types/components/modal/modal.vue.d.ts.map +1 -1
  552. package/dist/types/components/notice/notice.vue.d.ts +1 -1
  553. package/dist/types/components/notice/notice_icon.vue.d.ts +1 -30
  554. package/dist/types/components/notice/notice_icon.vue.d.ts.map +1 -1
  555. package/dist/types/components/popover/popover.vue.d.ts +26 -26
  556. package/dist/types/components/popover/popover.vue.d.ts.map +1 -1
  557. package/dist/types/components/popover/popover_header_footer.vue.d.ts +3 -3
  558. package/dist/types/components/popover/tippy_utils.d.ts +2 -3
  559. package/dist/types/components/popover/tippy_utils.d.ts.map +1 -1
  560. package/dist/types/components/radio/radio.vue.d.ts +6 -6
  561. package/dist/types/components/radio_group/radio_group.vue.d.ts +2 -2
  562. package/dist/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +22 -22
  563. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +22 -22
  564. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +22 -22
  565. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +22 -22
  566. package/dist/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts +1 -1
  567. package/dist/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts.map +1 -1
  568. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +7 -12
  569. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  570. package/dist/types/components/root_layout/root_layout.vue.d.ts +15 -15
  571. package/dist/types/components/scroller/modules/core_scroller.vue.d.ts +26 -16
  572. package/dist/types/components/scroller/modules/core_scroller.vue.d.ts.map +1 -1
  573. package/dist/types/components/scroller/modules/scroller_item.vue.d.ts +1 -1
  574. package/dist/types/components/scroller/scroller.vue.d.ts +245 -12
  575. package/dist/types/components/scroller/scroller.vue.d.ts.map +1 -1
  576. package/dist/types/components/select_menu/select_menu.vue.d.ts +13 -13
  577. package/dist/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
  578. package/dist/types/components/skeleton/skeleton-paragraph.vue.d.ts +3 -3
  579. package/dist/types/components/skeleton/skeleton-shape.vue.d.ts +4 -4
  580. package/dist/types/components/skeleton/skeleton-text.vue.d.ts +1 -1
  581. package/dist/types/components/skeleton/skeleton.vue.d.ts +1 -1
  582. package/dist/types/components/skeleton/skeleton_constants.d.ts.map +1 -1
  583. package/dist/types/components/split_button/split_button-alpha.vue.d.ts +3 -3
  584. package/dist/types/components/split_button/split_button.vue.d.ts +3 -3
  585. package/dist/types/components/tab/tab.vue.d.ts +3 -3
  586. package/dist/types/components/tab/tab_group.vue.d.ts +3 -3
  587. package/dist/types/components/tab/tab_panel.vue.d.ts +3 -3
  588. package/dist/types/components/tab/tab_panel.vue.d.ts.map +1 -1
  589. package/dist/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +1 -1
  590. package/dist/types/components/toast/layouts/toast_layout_alternate_icon.vue.d.ts +1 -30
  591. package/dist/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -1
  592. package/dist/types/components/toast/toast.vue.d.ts +4 -4
  593. package/dist/types/components/toast/toast_constants.d.ts.map +1 -1
  594. package/dist/types/components/toggle/toggle.vue.d.ts +7 -7
  595. package/dist/types/components/tooltip/tooltip.vue.d.ts +10 -10
  596. package/dist/types/components/tooltip/tooltip_constants.d.ts.map +1 -1
  597. package/dist/types/components/validation_messages/validation_messages.vue.d.ts +0 -1
  598. package/dist/types/components/validation_messages/validation_messages.vue.d.ts.map +1 -1
  599. package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +7 -7
  600. package/dist/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +7 -7
  601. package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +9 -9
  602. package/dist/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +1 -30
  603. package/dist/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  604. package/dist/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
  605. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +9 -9
  606. package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts +9 -241
  607. package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  608. package/dist/types/recipes/conversation_view/editor/editor_constants.d.ts.map +1 -1
  609. package/dist/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +7 -36
  610. package/dist/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  611. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
  612. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  613. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row_constants.d.ts.map +1 -1
  614. package/dist/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +22 -22
  615. package/dist/types/recipes/conversation_view/message_input/last_active_nodes.d.ts.map +1 -1
  616. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +7 -7
  617. package/dist/types/recipes/eslint.config.d.ts +8 -0
  618. package/dist/types/recipes/eslint.config.d.ts.map +1 -0
  619. package/dist/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +1 -1
  620. package/dist/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -30
  621. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-multi-select-constants.cjs","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select_constants.js"],"sourcesContent":["export const MULTI_SELECT_SIZES = {\n // Chip has no 'lg' and 'xl' size. So we don't support that in multi-select.\n EXTRA_SMALL: 'xs',\n SMALL: 'sm',\n DEFAULT: 'md',\n};\n\nexport const CHIP_SIZES = {\n xs: 'xs',\n sm: 'xs',\n md: 'sm',\n};\n\nexport const CHIP_TOP_POSITION = {\n xs: 1.4,\n sm: 0.4,\n md: 0.2,\n};\n\nexport default {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n};\n"],"names":["MULTI_SELECT_SIZES","CHIP_SIZES","CHIP_TOP_POSITION","combobox_multi_select_constants"],"mappings":"4GAAY,MAACA,EAAqB,CAEhC,YAAa,KACb,MAAO,KACP,QAAS,IACX,EAEaC,EAAa,CACxB,GAAI,KACJ,GAAI,KACJ,GAAI,IACN,EAEaC,EAAoB,CAC/B,GAAI,IACJ,GAAI,GACJ,GAAI,EACN,EAEeC,EAAA,CACb,mBAAAH,EACA,WAAAC,EACA,kBAAAC,CACF"}
1
+ {"version":3,"file":"combobox-multi-select-constants.cjs","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select_constants.js"],"sourcesContent":["export const MULTI_SELECT_SIZES = {\n // Chip has no 'lg' and 'xl' size. So we don't support that in multi-select.\n EXTRA_SMALL: 'xs',\n SMALL: 'sm',\n DEFAULT: 'md',\n};\n\nexport const CHIP_SIZES = {\n xs: 'xs',\n sm: 'xs',\n md: 'sm',\n};\n\nexport const CHIP_TOP_POSITION = {\n xs: 1.4,\n sm: 0.4,\n md: 0.2,\n};\n\nexport default {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n};\n"],"names":["MULTI_SELECT_SIZES","CHIP_SIZES","CHIP_TOP_POSITION","combobox_multi_select_constants"],"mappings":"4GAAY,MAACA,EAAqB,CAEhC,YAAa,KACb,MAAO,KACP,QAAS,IACX,EAEaC,EAAa,CACxB,GAAI,KACJ,GAAI,KACJ,GAAI,IACN,EAEaC,EAAoB,CAC/B,GAAI,IACJ,GAAI,GACJ,GAAI,EACN,EAEAC,EAAe,CACb,mBAAAH,EACA,WAAAC,EACA,kBAAAC,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-multi-select-constants.js","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select_constants.js"],"sourcesContent":["export const MULTI_SELECT_SIZES = {\n // Chip has no 'lg' and 'xl' size. So we don't support that in multi-select.\n EXTRA_SMALL: 'xs',\n SMALL: 'sm',\n DEFAULT: 'md',\n};\n\nexport const CHIP_SIZES = {\n xs: 'xs',\n sm: 'xs',\n md: 'sm',\n};\n\nexport const CHIP_TOP_POSITION = {\n xs: 1.4,\n sm: 0.4,\n md: 0.2,\n};\n\nexport default {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n};\n"],"names":["MULTI_SELECT_SIZES","CHIP_SIZES","CHIP_TOP_POSITION","combobox_multi_select_constants"],"mappings":"AAAY,MAACA,IAAqB;AAAA;AAAA,EAEhC,aAAa;AAAA,EACb,OAAO;AAAA,EACP,SAAS;AACX,GAEaC,IAAa;AAAA,EACxB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAoB;AAAA,EAC/B,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEeC,IAAA;AAAA,EACb,oBAAAH;AAAA,EACA,YAAAC;AAAA,EACA,mBAAAC;AACF;"}
1
+ {"version":3,"file":"combobox-multi-select-constants.js","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select_constants.js"],"sourcesContent":["export const MULTI_SELECT_SIZES = {\n // Chip has no 'lg' and 'xl' size. So we don't support that in multi-select.\n EXTRA_SMALL: 'xs',\n SMALL: 'sm',\n DEFAULT: 'md',\n};\n\nexport const CHIP_SIZES = {\n xs: 'xs',\n sm: 'xs',\n md: 'sm',\n};\n\nexport const CHIP_TOP_POSITION = {\n xs: 1.4,\n sm: 0.4,\n md: 0.2,\n};\n\nexport default {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n};\n"],"names":["MULTI_SELECT_SIZES","CHIP_SIZES","CHIP_TOP_POSITION","combobox_multi_select_constants"],"mappings":"AAAY,MAACA,IAAqB;AAAA;AAAA,EAEhC,aAAa;AAAA,EACb,OAAO;AAAA,EACP,SAAS;AACX,GAEaC,IAAa;AAAA,EACxB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAoB;AAAA,EAC/B,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEAC,IAAe;AAAA,EACb,oBAAAH;AAAA,EACA,YAAAC;AAAA,EACA,mBAAAC;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-multi-select-story-constants.cjs","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js"],"sourcesContent":["// The item list for default story\nexport const ITEMS_LIST_DATA = [\n { id: 'item1', value: 'item1', type: 'MAINLINE' },\n { id: 'item2', value: 'item2', type: 'MAINLINE' },\n { id: 'item3', value: 'item3', type: 'MAINLINE' },\n { id: 'item4', value: 'item4', type: 'MAINLINE' },\n { id: 'item5', value: 'item5 this is a longer item for testing truncation', type: 'MAINLINE' },\n { id: 'item6', value: 'item6', type: 'MAINLINE' },\n { id: 'item7', value: 'item7', type: 'MAINLINE' },\n { id: 'item8', value: 'item8', type: 'Other' },\n { id: 'item9', value: 'item9', type: 'MAINLINE' },\n { id: 'item10', value: 'item10 another longer item', type: 'MAINLINE' },\n { id: 'item11', value: 'item11', type: 'MAINLINE' },\n { id: 'item12', value: 'item12', type: 'Other' },\n { id: 'item13', value: 'item13', type: 'MAINLINE' },\n { id: 'item14', value: 'item14', type: 'MAINLINE' },\n { id: 'item15', value: 'item15 one more slightly longer item', type: 'MAINLINE' },\n { id: 'item16', value: 'item16', type: 'MAINLINE' },\n { id: 'item17', value: 'item17', type: 'MAINLINE' },\n { id: 'item18', value: 'item18', type: 'Other' },\n { id: 'item19', value: 'item19', type: 'MAINLINE' },\n { id: 'item20', value: 'item20', type: 'MAINLINE' },\n { id: 'item21', value: 'item21', type: 'MAINLINE' },\n { id: 'item22', value: 'item22', type: 'Other' },\n];\n"],"names":["ITEMS_LIST_DATA"],"mappings":"gFACY,MAACA,EAAkB,CAC7B,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAY,EACjD,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAY,EACjD,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAY,EACjD,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAY,EACjD,CAAE,GAAI,QAAS,MAAO,qDAAsD,KAAM,UAAY,EAC9F,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAY,EACjD,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAY,EACjD,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,OAAS,EAC9C,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAY,EACjD,CAAE,GAAI,SAAU,MAAO,6BAA8B,KAAM,UAAY,EACvE,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAY,EACnD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,OAAS,EAChD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAY,EACnD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAY,EACnD,CAAE,GAAI,SAAU,MAAO,uCAAwC,KAAM,UAAY,EACjF,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAY,EACnD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAY,EACnD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,OAAS,EAChD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAY,EACnD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAY,EACnD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAY,EACnD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,OAAS,CAClD"}
1
+ {"version":3,"file":"combobox-multi-select-story-constants.cjs","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js"],"sourcesContent":["// The item list for default story\nexport const ITEMS_LIST_DATA = [\n { id: 'item1', value: 'item1', type: 'MAINLINE' },\n { id: 'item2', value: 'item2', type: 'MAINLINE' },\n { id: 'item3', value: 'item3', type: 'MAINLINE' },\n { id: 'item4', value: 'item4', type: 'MAINLINE' },\n { id: 'item5', value: 'item5 this is a longer item for testing truncation', type: 'MAINLINE' },\n { id: 'item6', value: 'item6', type: 'MAINLINE' },\n { id: 'item7', value: 'item7', type: 'MAINLINE' },\n { id: 'item8', value: 'item8', type: 'Other' },\n { id: 'item9', value: 'item9', type: 'MAINLINE' },\n { id: 'item10', value: 'item10 another longer item', type: 'MAINLINE' },\n { id: 'item11', value: 'item11', type: 'MAINLINE' },\n { id: 'item12', value: 'item12', type: 'Other' },\n { id: 'item13', value: 'item13', type: 'MAINLINE' },\n { id: 'item14', value: 'item14', type: 'MAINLINE' },\n { id: 'item15', value: 'item15 one more slightly longer item', type: 'MAINLINE' },\n { id: 'item16', value: 'item16', type: 'MAINLINE' },\n { id: 'item17', value: 'item17', type: 'MAINLINE' },\n { id: 'item18', value: 'item18', type: 'Other' },\n { id: 'item19', value: 'item19', type: 'MAINLINE' },\n { id: 'item20', value: 'item20', type: 'MAINLINE' },\n { id: 'item21', value: 'item21', type: 'MAINLINE' },\n { id: 'item22', value: 'item22', type: 'Other' },\n];\n"],"names":["ITEMS_LIST_DATA"],"mappings":"gFACY,MAACA,EAAkB,CAC7B,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAU,EAC/C,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAU,EAC/C,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAU,EAC/C,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAU,EAC/C,CAAE,GAAI,QAAS,MAAO,qDAAsD,KAAM,UAAU,EAC5F,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAU,EAC/C,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAU,EAC/C,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,OAAO,EAC5C,CAAE,GAAI,QAAS,MAAO,QAAS,KAAM,UAAU,EAC/C,CAAE,GAAI,SAAU,MAAO,6BAA8B,KAAM,UAAU,EACrE,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAU,EACjD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,OAAO,EAC9C,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAU,EACjD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAU,EACjD,CAAE,GAAI,SAAU,MAAO,uCAAwC,KAAM,UAAU,EAC/E,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAU,EACjD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAU,EACjD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,OAAO,EAC9C,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAU,EACjD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAU,EACjD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,UAAU,EACjD,CAAE,GAAI,SAAU,MAAO,SAAU,KAAM,OAAO,CAChD"}
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-multi-select-story-constants.js","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js"],"sourcesContent":["// The item list for default story\nexport const ITEMS_LIST_DATA = [\n { id: 'item1', value: 'item1', type: 'MAINLINE' },\n { id: 'item2', value: 'item2', type: 'MAINLINE' },\n { id: 'item3', value: 'item3', type: 'MAINLINE' },\n { id: 'item4', value: 'item4', type: 'MAINLINE' },\n { id: 'item5', value: 'item5 this is a longer item for testing truncation', type: 'MAINLINE' },\n { id: 'item6', value: 'item6', type: 'MAINLINE' },\n { id: 'item7', value: 'item7', type: 'MAINLINE' },\n { id: 'item8', value: 'item8', type: 'Other' },\n { id: 'item9', value: 'item9', type: 'MAINLINE' },\n { id: 'item10', value: 'item10 another longer item', type: 'MAINLINE' },\n { id: 'item11', value: 'item11', type: 'MAINLINE' },\n { id: 'item12', value: 'item12', type: 'Other' },\n { id: 'item13', value: 'item13', type: 'MAINLINE' },\n { id: 'item14', value: 'item14', type: 'MAINLINE' },\n { id: 'item15', value: 'item15 one more slightly longer item', type: 'MAINLINE' },\n { id: 'item16', value: 'item16', type: 'MAINLINE' },\n { id: 'item17', value: 'item17', type: 'MAINLINE' },\n { id: 'item18', value: 'item18', type: 'Other' },\n { id: 'item19', value: 'item19', type: 'MAINLINE' },\n { id: 'item20', value: 'item20', type: 'MAINLINE' },\n { id: 'item21', value: 'item21', type: 'MAINLINE' },\n { id: 'item22', value: 'item22', type: 'Other' },\n];\n"],"names":["ITEMS_LIST_DATA"],"mappings":"AACY,MAACA,IAAkB;AAAA,EAC7B,EAAE,IAAI,SAAS,OAAO,SAAS,MAAM,WAAY;AAAA,EACjD,EAAE,IAAI,SAAS,OAAO,SAAS,MAAM,WAAY;AAAA,EACjD,EAAE,IAAI,SAAS,OAAO,SAAS,MAAM,WAAY;AAAA,EACjD,EAAE,IAAI,SAAS,OAAO,SAAS,MAAM,WAAY;AAAA,EACjD,EAAE,IAAI,SAAS,OAAO,sDAAsD,MAAM,WAAY;AAAA,EAC9F,EAAE,IAAI,SAAS,OAAO,SAAS,MAAM,WAAY;AAAA,EACjD,EAAE,IAAI,SAAS,OAAO,SAAS,MAAM,WAAY;AAAA,EACjD,EAAE,IAAI,SAAS,OAAO,SAAS,MAAM,QAAS;AAAA,EAC9C,EAAE,IAAI,SAAS,OAAO,SAAS,MAAM,WAAY;AAAA,EACjD,EAAE,IAAI,UAAU,OAAO,8BAA8B,MAAM,WAAY;AAAA,EACvE,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,WAAY;AAAA,EACnD,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,QAAS;AAAA,EAChD,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,WAAY;AAAA,EACnD,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,WAAY;AAAA,EACnD,EAAE,IAAI,UAAU,OAAO,wCAAwC,MAAM,WAAY;AAAA,EACjF,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,WAAY;AAAA,EACnD,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,WAAY;AAAA,EACnD,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,QAAS;AAAA,EAChD,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,WAAY;AAAA,EACnD,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,WAAY;AAAA,EACnD,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,WAAY;AAAA,EACnD,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,QAAS;AAClD;"}
1
+ {"version":3,"file":"combobox-multi-select-story-constants.js","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js"],"sourcesContent":["// The item list for default story\nexport const ITEMS_LIST_DATA = [\n { id: 'item1', value: 'item1', type: 'MAINLINE' },\n { id: 'item2', value: 'item2', type: 'MAINLINE' },\n { id: 'item3', value: 'item3', type: 'MAINLINE' },\n { id: 'item4', value: 'item4', type: 'MAINLINE' },\n { id: 'item5', value: 'item5 this is a longer item for testing truncation', type: 'MAINLINE' },\n { id: 'item6', value: 'item6', type: 'MAINLINE' },\n { id: 'item7', value: 'item7', type: 'MAINLINE' },\n { id: 'item8', value: 'item8', type: 'Other' },\n { id: 'item9', value: 'item9', type: 'MAINLINE' },\n { id: 'item10', value: 'item10 another longer item', type: 'MAINLINE' },\n { id: 'item11', value: 'item11', type: 'MAINLINE' },\n { id: 'item12', value: 'item12', type: 'Other' },\n { id: 'item13', value: 'item13', type: 'MAINLINE' },\n { id: 'item14', value: 'item14', type: 'MAINLINE' },\n { id: 'item15', value: 'item15 one more slightly longer item', type: 'MAINLINE' },\n { id: 'item16', value: 'item16', type: 'MAINLINE' },\n { id: 'item17', value: 'item17', type: 'MAINLINE' },\n { id: 'item18', value: 'item18', type: 'Other' },\n { id: 'item19', value: 'item19', type: 'MAINLINE' },\n { id: 'item20', value: 'item20', type: 'MAINLINE' },\n { id: 'item21', value: 'item21', type: 'MAINLINE' },\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,MAAM,WAAU;AAAA,EACjD,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,QAAO;AAChD;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../combobox-with-popover/combobox-with-popover.cjs"),b=require("../input/input.cjs"),C=require("../chip/chip.cjs"),x=require("../validation-messages/validation-messages.cjs"),y=require("../../common/validators/index.cjs"),p=require("../../common/utils/index.cjs"),I=require("../popover/popover-constants.cjs"),u=require("./combobox-multi-select-constants.cjs"),t=require("vue"),_=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),S={compatConfig:{MODE:3},name:"DtRecipeComboboxMultiSelect",components:{DtRecipeComboboxWithPopover:f.default,DtInput:b.default,DtChip:C.default,DtValidationMessages:x.default},props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},description:{type:String,default:""},placeholder:{type:String,default:"Select one or start typing"},inputMessages:{type:Array,default:()=>[],validator:e=>y.validationMessageValidator(e)},showInputMessages:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingMessage:{type:String,default:"loading..."},showList:{type:Boolean,default:null},listMaxHeight:{type:String,default:"300px"},selectedItems:{type:Array,default:function(){return[]}},maxSelected:{type:Number,default:0},maxSelectedMessage:{type:Array,default:function(){return[]}},hasSuggestionList:{type:Boolean,default:!0},size:{type:String,default:"md",validator:e=>Object.values(u.MULTI_SELECT_SIZES).includes(e)},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>I.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},transition:{type:String,default:"fade"},collapseOnFocusOut:{type:Boolean,default:!1},listMaxWidth:{type:String,default:""},reservedRightSpace:{type:Number,default:64},chipMaxWidth:{type:String,default:""},inputClass:{type:[String,Object,Array],default:""},inputWrapperClass:{type:[String,Object,Array],default:""}},emits:["input","select","remove","max-selected","keyup","combobox-highlight"],data(){return{value:"",popoverOffset:[0,4],showValidationMessages:!1,resizeWindowObserver:null,initialInputHeight:null,CHIP_SIZES:u.CHIP_SIZES,hasSlotContent:p.hasSlotContent,inputFocused:!1,hideInputText:!1}},computed:{inputPlaceHolder(){var e;return((e=this.selectedItems)==null?void 0:e.length)>0?"":this.placeholder},chipListeners(){return{keyup:e=>{this.onChipKeyup(e),this.$emit("keyup",e)}}},inputListeners(){return{input:e=>{this.$emit("input",e),this.hasSuggestionList&&this.showComboboxList()},keyup:e=>{this.onInputKeyup(e),this.$emit("keyup",e)},click:e=>{this.hasSuggestionList&&this.showComboboxList()}}},chipWrapperClass(){return{[`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]:!this.inputFocused&&this.collapseOnFocusOut}}},watch:{selectedItems:{deep:!0,handler:async function(){this.initSelectedItems()}},chipMaxWidth:{async handler(){this.initSelectedItems()}},async label(){await this.$nextTick(),this.setChipsTopPosition()},async description(){await this.$nextTick(),this.setChipsTopPosition()},size:{async handler(){await this.$nextTick();const e=this.getInput();this.revertInputPadding(e),this.initialInputHeight=e.getBoundingClientRect().height,this.setInputPadding(),this.setChipsTopPosition()}}},mounted(){this.setInitialInputHeight(),this.resizeWindowObserver=new ResizeObserver(async()=>{this.setChipsTopPosition(),this.setInputPadding()}),this.resizeWindowObserver.observe(document.body),this.initSelectedItems()},beforeUnmount(){var e;(e=this.resizeWindowObserver)==null||e.unobserve(document.body)},methods:{comboboxHighlight(e){this.$emit("combobox-highlight",e)},async initSelectedItems(){await this.$nextTick(),this.setInputPadding(),this.setChipsTopPosition(),this.setInputMinWidth(),this.checkMaxSelected()},onChipRemove(e){var s;this.$emit("remove",e),(s=this.$refs.input)==null||s.focus()},onComboboxSelect(e){this.loading||(this.value="",this.$emit("select",e))},showComboboxList(){var e;this.showList==null&&((e=this.$refs.comboboxWithPopover)==null||e.showComboboxList())},closeComboboxList(){var e;this.showList==null&&((e=this.$refs.comboboxWithPopover)==null||e.closeComboboxList())},getChipButtons(){return this.$refs.chips&&this.$refs.chips.map(e=>p.returnFirstEl(e.$el).querySelector("button"))},getChips(){return this.$refs.chips&&this.$refs.chips.map(e=>p.returnFirstEl(e.$el))},getLastChipButton(){return this.$refs.chips&&this.getChipButtons()[this.getChipButtons().length-1]},getLastChip(){return this.$refs.chips&&this.getChips()[this.getChips().length-1]},getFirstChip(){return this.$refs.chips&&this.getChips()[0]},getInput(){var e;return(e=this.$refs.input)==null?void 0:e.$refs.input},onChipKeyup(e){var i;const s=(i=e.code)==null?void 0:i.toLowerCase();s==="arrowleft"?this.navigateBetweenChips(e.target,!0):s==="arrowright"&&(e.target.id===this.getLastChipButton().id?this.moveFromChipToInput():this.navigateBetweenChips(e.target,!1))},onInputKeyup(e){var i;const s=(i=e.code)==null?void 0:i.toLowerCase();this.selectedItems.length>0&&e.target.selectionStart===0&&(s==="backspace"||s==="arrowleft")&&this.moveFromInputToChip()},moveFromInputToChip(){var e;this.getLastChipButton().focus(),(e=this.$refs.input)==null||e.blur(),this.closeComboboxList()},moveFromChipToInput(){var e;this.getLastChipButton().blur(),(e=this.$refs.input)==null||e.focus(),this.showComboboxList()},navigateBetweenChips(e,s){var o;const i=this.getChipButtons().indexOf(e),r=s?i-1:i+1;r<0||r>=((o=this.$refs.chips)==null?void 0:o.length)||(this.getChipButtons()[i].blur(),this.getChipButtons()[r].focus(),this.closeComboboxList())},setChipsTopPosition(){const e=this.getInput();if(!e)return;const s=this.$refs.inputSlotWrapper,i=e.getBoundingClientRect().top-s.getBoundingClientRect().top,r=this.$refs.chipsWrapper;r.style.top=i-u.CHIP_TOP_POSITION[this.size]+"px"},setInputPadding(){const e=this.getLastChip(),s=this.getInput(),i=this.$refs.chipsWrapper;if(!s||(this.revertInputPadding(s),this.popoverOffset=[0,4],!e)||this.collapseOnFocusOut&&!this.inputFocused)return;const r=e.offsetLeft+this.getFullWidth(e),o=s.getBoundingClientRect().width-r;o>this.reservedRightSpace?s.style.paddingLeft=r+"px":s.style.paddingLeft="4px";const n=i.getBoundingClientRect().height-4,a=e.getBoundingClientRect().height-4,h=o>this.reservedRightSpace?e.offsetTop+2:n+a-9;s.style.paddingTop=`${h}px`},revertInputPadding(e){e.style.paddingLeft="",e.style.paddingTop="",e.style.paddingBottom=""},getFullWidth(e){const s=window.getComputedStyle(e);return e.offsetWidth+parseInt(s.marginLeft)+parseInt(s.marginRight)},setInputMinWidth(){const e=this.getFirstChip(),s=this.getInput();s&&(e?s.style.minWidth=this.getFullWidth(e)+4+"px":s.style.minWidth="")},checkMaxSelected(){this.maxSelected!==0&&(this.selectedItems.length>this.maxSelected?(this.showValidationMessages=!0,this.$emit("max-selected")):this.showValidationMessages=!1)},setInitialInputHeight(){const e=this.getInput();e&&(this.initialInputHeight=e.getBoundingClientRect().height)},async handleInputFocusIn(){this.inputFocused=!0,this.collapseOnFocusOut&&(this.hideInputText=!1,await this.$nextTick(),this.setInputPadding())},async handleInputFocusOut(){if(this.inputFocused=!1,this.collapseOnFocusOut){this.hideInputText=!0;const e=this.getInput();if(!e||!e.style.paddingTop)return;this.revertInputPadding(e)}}}},v={ref:"header"},w={key:1,class:"d-recipe-combobox-multi-select__list--loading"},L={ref:"footer"};function M(e,s,i,r,o,n){const a=t.resolveComponent("dt-chip"),h=t.resolveComponent("dt-input"),c=t.resolveComponent("dt-validation-messages"),d=t.resolveComponent("dt-recipe-combobox-with-popover");return t.openBlock(),t.createBlock(d,{ref:"comboboxWithPopover",label:i.label,"show-list":i.showList,"max-height":i.listMaxHeight,"max-width":i.listMaxWidth,"popover-offset":o.popoverOffset,"has-suggestion-list":i.hasSuggestionList,"content-width":"anchor","append-to":i.appendTo,transition:i.transition,onSelect:n.onComboboxSelect,onHighlight:n.comboboxHighlight},t.createSlots({input:t.withCtx(({onInput:g})=>[t.createElementVNode("span",{ref:"inputSlotWrapper",class:"d-recipe-combobox-multi-select__input-wrapper",onFocusin:s[1]||(s[1]=(...l)=>n.handleInputFocusIn&&n.handleInputFocusIn(...l)),onFocusout:s[2]||(s[2]=(...l)=>n.handleInputFocusOut&&n.handleInputFocusOut(...l))},[t.createElementVNode("span",{ref:"chipsWrapper",class:t.normalizeClass(["d-recipe-combobox-multi-select__chip-wrapper",n.chipWrapperClass])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.selectedItems,l=>(t.openBlock(),t.createBlock(a,t.mergeProps({ref_for:!0,ref:"chips",key:l,"label-class":["d-chip__label"],class:["d-recipe-combobox-multi-select__chip",{"d-recipe-combobox-multi-select__chip--truncate":!!i.chipMaxWidth}],style:{maxWidth:i.chipMaxWidth},size:o.CHIP_SIZES[i.size]},t.toHandlers(n.chipListeners),{onKeyup:t.withKeys(m=>n.onChipRemove(l),["backspace"]),onClose:m=>n.onChipRemove(l)}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l),1)]),_:2},1040,["class","style","size","onKeyup","onClose"]))),128))],2),t.createVNode(h,t.mergeProps({ref:"input",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l),class:"d-recipe-combobox-multi-select__input","input-class":[i.inputClass,{"d-recipe-combobox-multi-select__input--hidden":o.hideInputText}],"input-wrapper-class":i.inputWrapperClass,"aria-label":i.label,label:i.labelVisible?i.label:"",description:i.description,placeholder:n.inputPlaceHolder,"show-messages":i.showInputMessages,messages:i.inputMessages,size:i.size},t.toHandlers(n.inputListeners),{onInput:g}),null,16,["modelValue","input-class","input-wrapper-class","aria-label","label","description","placeholder","show-messages","messages","size","onInput"]),t.createVNode(c,{"validation-messages":i.maxSelectedMessage,"show-messages":o.showValidationMessages},null,8,["validation-messages","show-messages"])],544)]),list:t.withCtx(()=>[t.createElementVNode("div",{ref:"list",class:"d-recipe-combobox-multi-select__list",onMousedown:s[3]||(s[3]=t.withModifiers(()=>{},["prevent"]))},[i.loading?(t.openBlock(),t.createElementBlock("div",w,t.toDisplayString(i.loadingMessage),1)):t.renderSlot(e.$slots,"list",{key:0})],544)]),_:2},[o.hasSlotContent(e.$slots.header)?{name:"header",fn:t.withCtx(()=>[t.createElementVNode("div",v,[t.renderSlot(e.$slots,"header")],512)]),key:"0"}:void 0,o.hasSlotContent(e.$slots.footer)?{name:"footer",fn:t.withCtx(()=>[t.createElementVNode("div",L,[t.renderSlot(e.$slots,"footer")],512)]),key:"1"}:void 0]),1032,["label","show-list","max-height","max-width","popover-offset","has-suggestion-list","append-to","transition","onSelect","onHighlight"])}const W=_._(S,[["render",M]]);exports.default=W;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../combobox-with-popover/combobox-with-popover.cjs"),b=require("../input/input.cjs"),C=require("../chip/chip.cjs"),x=require("../validation-messages/validation-messages.cjs"),y=require("../../common/validators/index.cjs"),p=require("../../common/utils/index.cjs"),I=require("../popover/popover-constants.cjs"),u=require("./combobox-multi-select-constants.cjs"),t=require("vue"),_=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),S={compatConfig:{MODE:3},name:"DtRecipeComboboxMultiSelect",components:{DtRecipeComboboxWithPopover:f.default,DtInput:b.default,DtChip:C.default,DtValidationMessages:x.default},props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},description:{type:String,default:""},placeholder:{type:String,default:"Select one or start typing"},inputMessages:{type:Array,default:()=>[],validator:e=>y.validationMessageValidator(e)},showInputMessages:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingMessage:{type:String,default:"loading..."},showList:{type:Boolean,default:null},listMaxHeight:{type:String,default:"300px"},selectedItems:{type:Array,default:function(){return[]}},maxSelected:{type:Number,default:0},maxSelectedMessage:{type:Array,default:function(){return[]}},hasSuggestionList:{type:Boolean,default:!0},size:{type:String,default:"md",validator:e=>Object.values(u.MULTI_SELECT_SIZES).includes(e)},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>I.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},transition:{type:String,default:"fade"},collapseOnFocusOut:{type:Boolean,default:!1},listMaxWidth:{type:String,default:""},reservedRightSpace:{type:Number,default:64},chipMaxWidth:{type:String,default:""},inputClass:{type:[String,Object,Array],default:""},inputWrapperClass:{type:[String,Object,Array],default:""}},emits:["input","select","remove","max-selected","keyup","combobox-highlight"],data(){return{value:"",popoverOffset:[0,4],showValidationMessages:!1,resizeWindowObserver:null,initialInputHeight:null,CHIP_SIZES:u.CHIP_SIZES,hasSlotContent:p.hasSlotContent,inputFocused:!1,hideInputText:!1}},computed:{inputPlaceHolder(){var e;return((e=this.selectedItems)==null?void 0:e.length)>0?"":this.placeholder},chipListeners(){return{keyup:e=>{this.onChipKeyup(e),this.$emit("keyup",e)}}},inputListeners(){return{input:e=>{this.$emit("input",e),this.hasSuggestionList&&this.showComboboxList()},keyup:e=>{this.onInputKeyup(e),this.$emit("keyup",e)},click:()=>{this.hasSuggestionList&&this.showComboboxList()}}},chipWrapperClass(){return{[`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]:!this.inputFocused&&this.collapseOnFocusOut}}},watch:{selectedItems:{deep:!0,handler:async function(){this.initSelectedItems()}},chipMaxWidth:{async handler(){this.initSelectedItems()}},async label(){await this.$nextTick(),this.setChipsTopPosition()},async description(){await this.$nextTick(),this.setChipsTopPosition()},size:{async handler(){await this.$nextTick();const e=this.getInput();this.revertInputPadding(e),this.initialInputHeight=e.getBoundingClientRect().height,this.setInputPadding(),this.setChipsTopPosition()}}},mounted(){this.setInitialInputHeight(),this.resizeWindowObserver=new ResizeObserver(async()=>{this.setChipsTopPosition(),this.setInputPadding()}),this.resizeWindowObserver.observe(document.body),this.initSelectedItems()},beforeUnmount(){var e;(e=this.resizeWindowObserver)==null||e.unobserve(document.body)},methods:{comboboxHighlight(e){this.$emit("combobox-highlight",e)},async initSelectedItems(){await this.$nextTick(),this.setInputPadding(),this.setChipsTopPosition(),this.setInputMinWidth(),this.checkMaxSelected()},onChipRemove(e){var s;this.$emit("remove",e),(s=this.$refs.input)==null||s.focus()},onComboboxSelect(e){this.loading||(this.value="",this.$emit("select",e))},showComboboxList(){var e;this.showList==null&&((e=this.$refs.comboboxWithPopover)==null||e.showComboboxList())},closeComboboxList(){var e;this.showList==null&&((e=this.$refs.comboboxWithPopover)==null||e.closeComboboxList())},getChipButtons(){return this.$refs.chips&&this.$refs.chips.map(e=>p.returnFirstEl(e.$el).querySelector("button"))},getChips(){return this.$refs.chips&&this.$refs.chips.map(e=>p.returnFirstEl(e.$el))},getLastChipButton(){return this.$refs.chips&&this.getChipButtons()[this.getChipButtons().length-1]},getLastChip(){return this.$refs.chips&&this.getChips()[this.getChips().length-1]},getFirstChip(){return this.$refs.chips&&this.getChips()[0]},getInput(){var e;return(e=this.$refs.input)==null?void 0:e.$refs.input},onChipKeyup(e){var i;const s=(i=e.code)==null?void 0:i.toLowerCase();s==="arrowleft"?this.navigateBetweenChips(e.target,!0):s==="arrowright"&&(e.target.id===this.getLastChipButton().id?this.moveFromChipToInput():this.navigateBetweenChips(e.target,!1))},onInputKeyup(e){var i;const s=(i=e.code)==null?void 0:i.toLowerCase();this.selectedItems.length>0&&e.target.selectionStart===0&&(s==="backspace"||s==="arrowleft")&&this.moveFromInputToChip()},moveFromInputToChip(){var e;this.getLastChipButton().focus(),(e=this.$refs.input)==null||e.blur(),this.closeComboboxList()},moveFromChipToInput(){var e;this.getLastChipButton().blur(),(e=this.$refs.input)==null||e.focus(),this.showComboboxList()},navigateBetweenChips(e,s){var o;const i=this.getChipButtons().indexOf(e),r=s?i-1:i+1;r<0||r>=((o=this.$refs.chips)==null?void 0:o.length)||(this.getChipButtons()[i].blur(),this.getChipButtons()[r].focus(),this.closeComboboxList())},setChipsTopPosition(){const e=this.getInput();if(!e)return;const s=this.$refs.inputSlotWrapper,i=e.getBoundingClientRect().top-s.getBoundingClientRect().top,r=this.$refs.chipsWrapper;r.style.top=i-u.CHIP_TOP_POSITION[this.size]+"px"},setInputPadding(){const e=this.getLastChip(),s=this.getInput(),i=this.$refs.chipsWrapper;if(!s||(this.revertInputPadding(s),this.popoverOffset=[0,4],!e)||this.collapseOnFocusOut&&!this.inputFocused)return;const r=e.offsetLeft+this.getFullWidth(e),o=s.getBoundingClientRect().width-r;o>this.reservedRightSpace?s.style.paddingLeft=r+"px":s.style.paddingLeft="4px";const n=i.getBoundingClientRect().height-4,a=e.getBoundingClientRect().height-4,h=o>this.reservedRightSpace?e.offsetTop+2:n+a-9;s.style.paddingTop=`${h}px`},revertInputPadding(e){e.style.paddingLeft="",e.style.paddingTop="",e.style.paddingBottom=""},getFullWidth(e){const s=window.getComputedStyle(e);return e.offsetWidth+parseInt(s.marginLeft)+parseInt(s.marginRight)},setInputMinWidth(){const e=this.getFirstChip(),s=this.getInput();s&&(e?s.style.minWidth=this.getFullWidth(e)+4+"px":s.style.minWidth="")},checkMaxSelected(){this.maxSelected!==0&&(this.selectedItems.length>this.maxSelected?(this.showValidationMessages=!0,this.$emit("max-selected")):this.showValidationMessages=!1)},setInitialInputHeight(){const e=this.getInput();e&&(this.initialInputHeight=e.getBoundingClientRect().height)},async handleInputFocusIn(){this.inputFocused=!0,this.collapseOnFocusOut&&(this.hideInputText=!1,await this.$nextTick(),this.setInputPadding())},async handleInputFocusOut(){if(this.inputFocused=!1,this.collapseOnFocusOut){this.hideInputText=!0;const e=this.getInput();if(!e||!e.style.paddingTop)return;this.revertInputPadding(e)}}}},v={ref:"header"},w={key:1,class:"d-recipe-combobox-multi-select__list--loading"},L={ref:"footer"};function M(e,s,i,r,o,n){const a=t.resolveComponent("dt-chip"),h=t.resolveComponent("dt-input"),c=t.resolveComponent("dt-validation-messages"),d=t.resolveComponent("dt-recipe-combobox-with-popover");return t.openBlock(),t.createBlock(d,{ref:"comboboxWithPopover",label:i.label,"show-list":i.showList,"max-height":i.listMaxHeight,"max-width":i.listMaxWidth,"popover-offset":o.popoverOffset,"has-suggestion-list":i.hasSuggestionList,"content-width":"anchor","append-to":i.appendTo,transition:i.transition,onSelect:n.onComboboxSelect,onHighlight:n.comboboxHighlight},t.createSlots({input:t.withCtx(({onInput:g})=>[t.createElementVNode("span",{ref:"inputSlotWrapper",class:"d-recipe-combobox-multi-select__input-wrapper",onFocusin:s[1]||(s[1]=(...l)=>n.handleInputFocusIn&&n.handleInputFocusIn(...l)),onFocusout:s[2]||(s[2]=(...l)=>n.handleInputFocusOut&&n.handleInputFocusOut(...l))},[t.createElementVNode("span",{ref:"chipsWrapper",class:t.normalizeClass(["d-recipe-combobox-multi-select__chip-wrapper",n.chipWrapperClass])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.selectedItems,l=>(t.openBlock(),t.createBlock(a,t.mergeProps({ref_for:!0,ref:"chips",key:l,"label-class":["d-chip__label"],class:["d-recipe-combobox-multi-select__chip",{"d-recipe-combobox-multi-select__chip--truncate":!!i.chipMaxWidth}],style:{maxWidth:i.chipMaxWidth},size:o.CHIP_SIZES[i.size]},t.toHandlers(n.chipListeners),{onKeyup:t.withKeys(m=>n.onChipRemove(l),["backspace"]),onClose:m=>n.onChipRemove(l)}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l),1)]),_:2},1040,["class","style","size","onKeyup","onClose"]))),128))],2),t.createVNode(h,t.mergeProps({ref:"input",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l),class:"d-recipe-combobox-multi-select__input","input-class":[i.inputClass,{"d-recipe-combobox-multi-select__input--hidden":o.hideInputText}],"input-wrapper-class":i.inputWrapperClass,"aria-label":i.label,label:i.labelVisible?i.label:"",description:i.description,placeholder:n.inputPlaceHolder,"show-messages":i.showInputMessages,messages:i.inputMessages,size:i.size},t.toHandlers(n.inputListeners),{onInput:g}),null,16,["modelValue","input-class","input-wrapper-class","aria-label","label","description","placeholder","show-messages","messages","size","onInput"]),t.createVNode(c,{"validation-messages":i.maxSelectedMessage,"show-messages":o.showValidationMessages},null,8,["validation-messages","show-messages"])],544)]),list:t.withCtx(()=>[t.createElementVNode("div",{ref:"list",class:"d-recipe-combobox-multi-select__list",onMousedown:s[3]||(s[3]=t.withModifiers(()=>{},["prevent"]))},[i.loading?(t.openBlock(),t.createElementBlock("div",w,t.toDisplayString(i.loadingMessage),1)):t.renderSlot(e.$slots,"list",{key:0})],544)]),_:2},[o.hasSlotContent(e.$slots.header)?{name:"header",fn:t.withCtx(()=>[t.createElementVNode("div",v,[t.renderSlot(e.$slots,"header")],512)]),key:"0"}:void 0,o.hasSlotContent(e.$slots.footer)?{name:"footer",fn:t.withCtx(()=>[t.createElementVNode("div",L,[t.renderSlot(e.$slots,"footer")],512)]),key:"1"}:void 0]),1032,["label","show-list","max-height","max-width","popover-offset","has-suggestion-list","append-to","transition","onSelect","onHighlight"])}const W=_._(S,[["render",M]]);exports.default=W;
2
2
  //# sourceMappingURL=combobox-multi-select.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-multi-select.cjs","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","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","$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":"ijBAoIKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,8BAEN,WAAY,6BACVC,EAA2B,QAC3B,QAAAC,EAAO,QACP,OAAAC,EAAM,QACN,qBAAAC,EAAoB,OACrB,EAED,MAAO,CAIL,MAAO,CACL,KAAM,OACN,SAAU,EACX,EAMD,aAAc,CACZ,KAAM,QACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,4BACV,EAKD,cAAe,CACb,KAAM,MACN,QAAS,IAAM,CAAE,EACjB,UAAWC,GACFC,EAAAA,2BAA2BD,CAAa,CAElD,EAKD,kBAAmB,CACjB,KAAM,QACN,QAAS,EACV,EAYD,QAAS,CACP,KAAM,QACN,QAAS,EACV,EAKD,eAAgB,CACd,KAAM,OACN,QAAS,YACV,EAQD,SAAU,CACR,KAAM,QACN,QAAS,IACV,EAMD,cAAe,CACb,KAAM,OACN,QAAS,OACV,EAKD,cAAe,CACb,KAAM,MACN,QAAS,UAAY,CAAE,MAAO,CAAA,CAAK,CACpC,EAKD,YAAa,CACX,KAAM,OACN,QAAS,CACV,EAMD,mBAAoB,CAClB,KAAM,MACN,QAAS,UAAY,CAAE,MAAO,CAAA,CAAK,CACpC,EAMD,kBAAmB,CACjB,KAAM,QACN,QAAS,EACV,EAKD,KAAM,CACJ,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cjs","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: () => {\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","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","$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":"ijBAoIKA,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,8BAEN,WAAY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AGjBe,EAAAA,YAGEG,EAAA,CAFC,sBAAqBvB,EAAA,mBACrB,gBAAeC,EAAA,gFAgBX,eACT,IAeM,CAfNK,EAAAA,mBAeM,MAAA,CAdJ,IAAI,OACJ,MAAM,uCACL,YAASgB,EAAA,CAAA,IAAAA,EAAA,CAAA,EAxFlBE,EAAAA,cAwFQ,IAAA,CAAA,EAAkB,CAAA,SAAA,CAAA,KAGTxB,EAAA,uBAGTU,EAAAA,mBAKM,MALNe,EAKMN,EAAAA,gBADDnB,EAAA,cAAc,EAAA,CAAA,GARnB0B,EAAAA,WAGEC,iBA7FV,IAAA,CAAA,CAAA,UAAA,EAAA,IA2EY1B,EAAA,eAAe0B,EAAA,OAAO,MAAM,GA3ExC,KA4EO,SA5EP,GAAAvB,EAAAA,QA8EM,IAEM,CAFNE,EAAAA,mBAEM,MAFNV,EAEM,CADJ8B,aAAsBC,EAAA,OAAA,QAAA,UA/E9B,IAAA,KAAA,OAyGY1B,EAAA,eAAe0B,EAAA,OAAO,MAAM,GAzGxC,KA0GO,SA1GP,GAAAvB,EAAAA,QA4GM,IAEM,CAFNE,EAAAA,mBAEM,MAFNT,EAEM,CADJ6B,aAAsBC,EAAA,OAAA,QAAA,UA7G9B,IAAA,KAAA"}
@@ -3,10 +3,10 @@ import L from "../input/input.js";
3
3
  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
- import { hasSlotContent as T, returnFirstEl as g } from "../../common/utils/index.js";
6
+ import { returnFirstEl as g, hasSlotContent as T } from "../../common/utils/index.js";
7
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";
8
+ import { CHIP_TOP_POSITION as B, CHIP_SIZES as F, MULTI_SELECT_SIZES as k } from "./combobox-multi-select-constants.js";
9
+ import { resolveComponent as h, createBlock as m, openBlock as p, createSlots as H, withCtx as r, createElementVNode as a, withModifiers as R, renderSlot as d, createElementBlock as f, toDisplayString as b, createVNode as C, normalizeClass as z, Fragment as V, renderList as E, mergeProps as y, toHandlers as x, withKeys as D, createTextVNode as A } from "vue";
10
10
  import { _ as K } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
11
11
  const N = {
12
12
  compatConfig: { MODE: 3 },
@@ -140,7 +140,7 @@ const N = {
140
140
  size: {
141
141
  type: String,
142
142
  default: "md",
143
- validator: (t) => Object.values(B).includes(t)
143
+ validator: (t) => Object.values(k).includes(t)
144
144
  },
145
145
  /**
146
146
  * Sets the element to which the popover is going to append to.
@@ -290,7 +290,7 @@ const N = {
290
290
  keyup: (t) => {
291
291
  this.onInputKeyup(t), this.$emit("keyup", t);
292
292
  },
293
- click: (t) => {
293
+ click: () => {
294
294
  this.hasSuggestionList && this.showComboboxList();
295
295
  }
296
296
  };
@@ -404,7 +404,7 @@ const N = {
404
404
  const t = this.getInput();
405
405
  if (!t) return;
406
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";
407
+ l.style.top = e - B[this.size] + "px";
408
408
  },
409
409
  setInputPadding() {
410
410
  const t = this.getLastChip(), i = this.getInput(), e = this.$refs.chipsWrapper;
@@ -474,9 +474,9 @@ function q(t, i, e, l, s, o) {
474
474
  }, [
475
475
  a("span", {
476
476
  ref: "chipsWrapper",
477
- class: R(["d-recipe-combobox-multi-select__chip-wrapper", o.chipWrapperClass])
477
+ class: z(["d-recipe-combobox-multi-select__chip-wrapper", o.chipWrapperClass])
478
478
  }, [
479
- (p(!0), f(z, null, V(e.selectedItems, (n) => (p(), m(u, b({
479
+ (p(!0), f(V, null, E(e.selectedItems, (n) => (p(), m(u, y({
480
480
  ref_for: !0,
481
481
  ref: "chips",
482
482
  key: n,
@@ -487,17 +487,17 @@ function q(t, i, e, l, s, o) {
487
487
  ],
488
488
  style: { maxWidth: e.chipMaxWidth },
489
489
  size: s.CHIP_SIZES[e.size]
490
- }, C(o.chipListeners), {
491
- onKeyup: E((v) => o.onChipRemove(n), ["backspace"]),
490
+ }, x(o.chipListeners), {
491
+ onKeyup: D((v) => o.onChipRemove(n), ["backspace"]),
492
492
  onClose: (v) => o.onChipRemove(n)
493
493
  }), {
494
494
  default: r(() => [
495
- D(y(n), 1)
495
+ A(b(n), 1)
496
496
  ]),
497
497
  _: 2
498
498
  }, 1040, ["class", "style", "size", "onKeyup", "onClose"]))), 128))
499
499
  ], 2),
500
- x(c, b({
500
+ C(c, y({
501
501
  ref: "input",
502
502
  modelValue: s.value,
503
503
  "onUpdate:modelValue": i[0] || (i[0] = (n) => s.value = n),
@@ -516,8 +516,8 @@ function q(t, i, e, l, s, o) {
516
516
  "show-messages": e.showInputMessages,
517
517
  messages: e.inputMessages,
518
518
  size: e.size
519
- }, C(o.inputListeners), { onInput: S }), null, 16, ["modelValue", "input-class", "input-wrapper-class", "aria-label", "label", "description", "placeholder", "show-messages", "messages", "size", "onInput"]),
520
- x(I, {
519
+ }, x(o.inputListeners), { onInput: S }), null, 16, ["modelValue", "input-class", "input-wrapper-class", "aria-label", "label", "description", "placeholder", "show-messages", "messages", "size", "onInput"]),
520
+ C(I, {
521
521
  "validation-messages": e.maxSelectedMessage,
522
522
  "show-messages": s.showValidationMessages
523
523
  }, null, 8, ["validation-messages", "show-messages"])
@@ -527,10 +527,10 @@ function q(t, i, e, l, s, o) {
527
527
  a("div", {
528
528
  ref: "list",
529
529
  class: "d-recipe-combobox-multi-select__list",
530
- onMousedown: i[3] || (i[3] = A(() => {
530
+ onMousedown: i[3] || (i[3] = R(() => {
531
531
  }, ["prevent"]))
532
532
  }, [
533
- e.loading ? (p(), f("div", j, y(e.loadingMessage), 1)) : d(t.$slots, "list", { key: 0 })
533
+ e.loading ? (p(), f("div", j, b(e.loadingMessage), 1)) : d(t.$slots, "list", { key: 0 })
534
534
  ], 544)
535
535
  ]),
536
536
  _: 2
@@ -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 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;AAAA;AAAA;AAAA;AAAA,IAKD,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,MACjB,WAAW,CAAAC,MACFC,EAA2BD,CAAa;AAAA,IAElD;AAAA;AAAA;AAAA;AAAA,IAKD,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAYD,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA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,aAAaA,EAAW;AAAA,UACxB,aAAaE,EAAgB;AAAA,UAC7B,iBAAeF,EAAiB;AAAA,UAChC,UAAUA,EAAa;AAAA,UACvB,MAAMA,EAAI;AAAA,QACX,GAAAe,EAAqBb,EAAf,cAAc,GACnB,EAAA,SAAOG,GAAO,GAAA,MAAA,IAAA,CAAA,cAAA,eAAA,uBAAA,cAAA,SAAA,eAAA,eAAA,iBAAA,YAAA,QAAA,SAAA,CAAA;AAAA,QAGjBe,EAGEG,GAAA;AAAA,UAFC,uBAAqBvB,EAAkB;AAAA,UACvC,iBAAeC,EAAsB;AAAA;;;IAgBjC,QACT,MAeM;AAAA,MAfNK,EAeM,OAAA;AAAA,QAdJ,KAAI;AAAA,QACJ,OAAM;AAAA,QACL,aAASgB,EAAA,CAAA,MAAAA,EAAA,CAAA,IAxFlBE,EAwFQ,MAAkB;AAAA,QAAA,GAAA,CAAA,SAAA,CAAA;AAAA;QAGTxB,EAAO,gBAGhBU,EAKM,OALNe,GAKMN,EADDnB,EAAc,cAAA,GAAA,CAAA,KARnB0B,EAGEC,oBA7FV,KAAA,GAAA;AAAA;;IAAA,GAAA;AAAA;IA2EY1B,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
+ {"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: () => {\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;EACtB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,6BAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC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O;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 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;
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"),h=require("../popover/popover-constants.cjs"),_=require("../popover/popover.cjs"),x=require("../combobox/combobox.cjs"),m=require("../dropdown/dropdown-constants.cjs"),w=require("../combobox/combobox-constants.cjs"),C={compatConfig:{MODE:3},name:"DtRecipeComboboxWithPopover",components:{DtCombobox:x.default,DtPopover:_.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(m.DROPDOWN_PADDING_CLASSES).some(n=>n===e)},contentWidth:{type:String,default:null,validator:e=>h.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=>h.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},transition:{type:String,default:"fade"}},emits:["select","escape","highlight","opened"],data(){return{DROPDOWN_PADDING_CLASSES:m.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