@dialpad/dialtone-vue 3.120.0 → 3.120.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (425) hide show
  1. package/dist/chunks/_plugin-vue_export-helper-caHeSgYY.js +11 -0
  2. package/dist/chunks/_plugin-vue_export-helper-caHeSgYY.js.map +1 -0
  3. package/dist/chunks/_plugin-vue_export-helper-fhnQq0tA.js +10 -0
  4. package/dist/chunks/_plugin-vue_export-helper-fhnQq0tA.js.map +1 -0
  5. package/dist/chunks/{dropdown-eWOvBvwq.js → dropdown-Hn-TeTvZ.js} +151 -104
  6. package/dist/chunks/{dropdown-UO3UJalk.js.map → dropdown-Hn-TeTvZ.js.map} +1 -1
  7. package/dist/chunks/dropdown-w8Do29L5.js +442 -0
  8. package/dist/chunks/{dropdown-eWOvBvwq.js.map → dropdown-w8Do29L5.js.map} +1 -1
  9. package/dist/chunks/dropdown_constants-2pGCXy7m.js +8 -0
  10. package/dist/chunks/dropdown_constants-2pGCXy7m.js.map +1 -0
  11. package/dist/chunks/dropdown_constants-w1MXGC3Z.js +9 -0
  12. package/dist/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -0
  13. package/dist/chunks/{icon_constants-OpYAAKwF.js → icon_constants-Dy4MEUJL.js} +7 -6
  14. package/dist/chunks/{icon_constants-2S_OSQ1t.js.map → icon_constants-Dy4MEUJL.js.map} +1 -1
  15. package/dist/chunks/icon_constants-QYpmdE0R.js +16 -0
  16. package/dist/chunks/{icon_constants-OpYAAKwF.js.map → icon_constants-QYpmdE0R.js.map} +1 -1
  17. package/dist/chunks/index-4qgKeErp.js +446 -0
  18. package/dist/chunks/{index-b4iXYvId.js.map → index-4qgKeErp.js.map} +1 -1
  19. package/dist/chunks/index-b_MgDylR.js +447 -0
  20. package/dist/chunks/{index-6tYeqbgP.js.map → index-b_MgDylR.js.map} +1 -1
  21. package/dist/chunks/{input-4UQWegUk.js → input-NmYDD5bn.js} +83 -60
  22. package/dist/chunks/{input-0Uksk4DP.js.map → input-NmYDD5bn.js.map} +1 -1
  23. package/dist/chunks/input-ttnte8zB.js +295 -0
  24. package/dist/chunks/{input-4UQWegUk.js.map → input-ttnte8zB.js.map} +1 -1
  25. package/dist/chunks/input_group-M-D25pOJ.js +152 -0
  26. package/dist/chunks/{input_group-bBKaq3Wi.js.map → input_group-M-D25pOJ.js.map} +1 -1
  27. package/dist/chunks/{input_group-bBKaq3Wi.js → input_group-jWnq2DJT.js} +27 -24
  28. package/dist/chunks/{input_group-AS760Cp7.js.map → input_group-jWnq2DJT.js.map} +1 -1
  29. package/dist/chunks/keyboard_list_navigation-ScXhrxya.js +284 -0
  30. package/dist/chunks/{keyboard_list_navigation-N74Bpdq7.js.map → keyboard_list_navigation-ScXhrxya.js.map} +1 -1
  31. package/dist/chunks/keyboard_list_navigation-fJnl_Iox.js +283 -0
  32. package/dist/chunks/{keyboard_list_navigation-F0O8nht0.js.map → keyboard_list_navigation-fJnl_Iox.js.map} +1 -1
  33. package/dist/chunks/link_constants-Huj7D_hm.js +22 -0
  34. package/dist/chunks/{link_constants-Kn6kP4i1.js.map → link_constants-Huj7D_hm.js.map} +1 -1
  35. package/dist/chunks/link_constants-nWVlXQBs.js +23 -0
  36. package/dist/chunks/{link_constants-vIUB92L4.js.map → link_constants-nWVlXQBs.js.map} +1 -1
  37. package/dist/chunks/list_item_constants-EiqkqZvP.js +13 -0
  38. package/dist/chunks/{list_item_constants-Tsz5CO1m.js.map → list_item_constants-EiqkqZvP.js.map} +1 -1
  39. package/dist/chunks/list_item_constants-u1xcN9Dd.js +14 -0
  40. package/dist/chunks/{list_item_constants-LTUc74pD.js.map → list_item_constants-u1xcN9Dd.js.map} +1 -1
  41. package/dist/chunks/modal-VgxXAQFP.js +105 -0
  42. package/dist/chunks/{modal-qEzlo0Sj.js.map → modal-VgxXAQFP.js.map} +1 -1
  43. package/dist/chunks/modal-XOr4kiNZ.js +106 -0
  44. package/dist/chunks/{modal-VuMFkZFH.js.map → modal-XOr4kiNZ.js.map} +1 -1
  45. package/dist/chunks/notice_action-WTucGhvr.js +222 -0
  46. package/dist/chunks/{notice_action-tJfD5Qw1.js.map → notice_action-WTucGhvr.js.map} +1 -1
  47. package/dist/chunks/notice_action-p-ePanW_.js +223 -0
  48. package/dist/chunks/{notice_action-jO199emq.js.map → notice_action-p-ePanW_.js.map} +1 -1
  49. package/dist/chunks/notice_constants-7Qt2CQEY.js +7 -0
  50. package/dist/chunks/{notice_constants-mC6al2Dm.js.map → notice_constants-7Qt2CQEY.js.map} +1 -1
  51. package/dist/chunks/notice_constants-UXo9e3bS.js +6 -0
  52. package/dist/chunks/{notice_constants-c--hBFQw.js.map → notice_constants-UXo9e3bS.js.map} +1 -1
  53. package/dist/chunks/popover_constants-JwBF9h1Z.js +143 -0
  54. package/dist/chunks/{popover_constants-hOEhklvr.js.map → popover_constants-JwBF9h1Z.js.map} +1 -1
  55. package/dist/chunks/popover_constants-Qkpb0yh2.js +144 -0
  56. package/dist/chunks/{popover_constants-qjlEkroB.js.map → popover_constants-Qkpb0yh2.js.map} +1 -1
  57. package/dist/chunks/{sr_only_close_button-7O-Ev8uM.js → sr_only_close_button-3EdsV-dH.js} +28 -24
  58. package/dist/chunks/{sr_only_close_button-iD7s1Pbj.js.map → sr_only_close_button-3EdsV-dH.js.map} +1 -1
  59. package/dist/chunks/sr_only_close_button-xGrHFjwA.js +91 -0
  60. package/dist/chunks/{sr_only_close_button-7O-Ev8uM.js.map → sr_only_close_button-xGrHFjwA.js.map} +1 -1
  61. package/dist/chunks/stack_constants-HraCekPm.js +15 -0
  62. package/dist/chunks/{stack_constants-m9Ickqw0.js.map → stack_constants-HraCekPm.js.map} +1 -1
  63. package/dist/chunks/stack_constants-SMzMWnAQ.js +14 -0
  64. package/dist/chunks/{stack_constants-u7tNqGtc.js.map → stack_constants-SMzMWnAQ.js.map} +1 -1
  65. package/dist/chunks/tab-RTDgnD9-.js +391 -0
  66. package/dist/chunks/{tab-at7WWglk.js.map → tab-RTDgnD9-.js.map} +1 -1
  67. package/dist/chunks/tab-qc3f42Yp.js +390 -0
  68. package/dist/chunks/{tab-GQZFMq83.js.map → tab-qc3f42Yp.js.map} +1 -1
  69. package/dist/common/constants.cjs +60 -0
  70. package/dist/{lib → common}/constants.cjs.map +1 -1
  71. package/dist/{lib → common}/constants.js +25 -18
  72. package/dist/{lib → common}/constants.js.map +1 -1
  73. package/dist/common/dates.cjs +72 -0
  74. package/dist/{lib → common}/dates.cjs.map +1 -1
  75. package/dist/common/dates.js +72 -0
  76. package/dist/{lib → common}/dates.js.map +1 -1
  77. package/dist/common/emoji.cjs +163 -0
  78. package/dist/common/emoji.cjs.map +1 -0
  79. package/dist/common/emoji.js +168 -0
  80. package/dist/common/emoji.js.map +1 -0
  81. package/dist/common/mixins.cjs +17 -0
  82. package/dist/{lib → common}/mixins.cjs.map +1 -1
  83. package/dist/common/mixins.js +17 -0
  84. package/dist/common/utils.cjs +243 -0
  85. package/dist/{lib → common}/utils.cjs.map +1 -1
  86. package/dist/common/utils.js +243 -0
  87. package/dist/{lib → common}/utils.js.map +1 -1
  88. package/dist/common/validators.cjs +23 -0
  89. package/dist/{lib → common}/validators.cjs.map +1 -1
  90. package/dist/common/validators.js +23 -0
  91. package/dist/{lib → common}/validators.js.map +1 -1
  92. package/dist/dialtone-vue.cjs +373 -1
  93. package/dist/dialtone-vue.cjs.map +1 -1
  94. package/dist/dialtone-vue.js +328 -327
  95. package/dist/dialtone-vue.js.map +1 -1
  96. package/dist/lib/attachment-carousel.cjs +345 -1
  97. package/dist/lib/attachment-carousel.cjs.map +1 -1
  98. package/dist/lib/attachment-carousel.js +126 -108
  99. package/dist/lib/attachment-carousel.js.map +1 -1
  100. package/dist/lib/avatar.cjs +447 -1
  101. package/dist/lib/avatar.cjs.map +1 -1
  102. package/dist/lib/avatar.js +135 -101
  103. package/dist/lib/avatar.js.map +1 -1
  104. package/dist/lib/badge.cjs +206 -1
  105. package/dist/lib/badge.cjs.map +1 -1
  106. package/dist/lib/badge.js +64 -48
  107. package/dist/lib/badge.js.map +1 -1
  108. package/dist/lib/banner.cjs +242 -2
  109. package/dist/lib/banner.cjs.map +1 -1
  110. package/dist/lib/banner.js +81 -71
  111. package/dist/lib/banner.js.map +1 -1
  112. package/dist/lib/breadcrumbs.cjs +150 -1
  113. package/dist/lib/breadcrumbs.cjs.map +1 -1
  114. package/dist/lib/breadcrumbs.js +60 -52
  115. package/dist/lib/breadcrumbs.js.map +1 -1
  116. package/dist/lib/button-group.cjs +41 -1
  117. package/dist/lib/button-group.cjs.map +1 -1
  118. package/dist/lib/button-group.js +15 -14
  119. package/dist/lib/button-group.js.map +1 -1
  120. package/dist/lib/button.cjs +356 -1
  121. package/dist/lib/button.cjs.map +1 -1
  122. package/dist/lib/button.js +108 -88
  123. package/dist/lib/button.js.map +1 -1
  124. package/dist/lib/callbar-button-with-popover.cjs +322 -1
  125. package/dist/lib/callbar-button-with-popover.cjs.map +1 -1
  126. package/dist/lib/callbar-button-with-popover.js +101 -83
  127. package/dist/lib/callbar-button-with-popover.js.map +1 -1
  128. package/dist/lib/callbar-button.cjs +200 -1
  129. package/dist/lib/callbar-button.cjs.map +1 -1
  130. package/dist/lib/callbar-button.js +52 -45
  131. package/dist/lib/callbar-button.js.map +1 -1
  132. package/dist/lib/callbox.cjs +217 -1
  133. package/dist/lib/callbox.cjs.map +1 -1
  134. package/dist/lib/callbox.js +80 -67
  135. package/dist/lib/callbox.js.map +1 -1
  136. package/dist/lib/card.cjs +91 -1
  137. package/dist/lib/card.cjs.map +1 -1
  138. package/dist/lib/card.js +27 -27
  139. package/dist/lib/card.js.map +1 -1
  140. package/dist/lib/checkbox-group.cjs +115 -1
  141. package/dist/lib/checkbox-group.cjs.map +1 -1
  142. package/dist/lib/checkbox-group.js +34 -23
  143. package/dist/lib/checkbox-group.js.map +1 -1
  144. package/dist/lib/checkbox.cjs +156 -1
  145. package/dist/lib/checkbox.cjs.map +1 -1
  146. package/dist/lib/checkbox.js +72 -60
  147. package/dist/lib/checkbox.js.map +1 -1
  148. package/dist/lib/chip.cjs +235 -1
  149. package/dist/lib/chip.cjs.map +1 -1
  150. package/dist/lib/chip.js +84 -67
  151. package/dist/lib/chip.js.map +1 -1
  152. package/dist/lib/codeblock.cjs +23 -2
  153. package/dist/lib/codeblock.cjs.map +1 -1
  154. package/dist/lib/codeblock.js +13 -13
  155. package/dist/lib/codeblock.js.map +1 -1
  156. package/dist/lib/collapsible.cjs +398 -1
  157. package/dist/lib/collapsible.cjs.map +1 -1
  158. package/dist/lib/collapsible.js +123 -100
  159. package/dist/lib/collapsible.js.map +1 -1
  160. package/dist/lib/combobox-multi-select.cjs +589 -1
  161. package/dist/lib/combobox-multi-select.cjs.map +1 -1
  162. package/dist/lib/combobox-multi-select.js +270 -177
  163. package/dist/lib/combobox-multi-select.js.map +1 -1
  164. package/dist/lib/combobox-with-popover.cjs +452 -1
  165. package/dist/lib/combobox-with-popover.cjs.map +1 -1
  166. package/dist/lib/combobox-with-popover.js +172 -127
  167. package/dist/lib/combobox-with-popover.js.map +1 -1
  168. package/dist/lib/combobox.cjs +18 -1
  169. package/dist/lib/combobox.cjs.map +1 -1
  170. package/dist/lib/combobox.js +9 -9
  171. package/dist/lib/contact-info.cjs +205 -1
  172. package/dist/lib/contact-info.cjs.map +1 -1
  173. package/dist/lib/contact-info.js +69 -60
  174. package/dist/lib/contact-info.js.map +1 -1
  175. package/dist/lib/contact-row.cjs +246 -1
  176. package/dist/lib/contact-row.cjs.map +1 -1
  177. package/dist/lib/contact-row.js +67 -63
  178. package/dist/lib/contact-row.js.map +1 -1
  179. package/dist/lib/datepicker.cjs +854 -1
  180. package/dist/lib/datepicker.cjs.map +1 -1
  181. package/dist/lib/datepicker.js +585 -441
  182. package/dist/lib/datepicker.js.map +1 -1
  183. package/dist/lib/description-list.cjs +116 -1
  184. package/dist/lib/description-list.cjs.map +1 -1
  185. package/dist/lib/description-list.js +56 -24
  186. package/dist/lib/description-list.js.map +1 -1
  187. package/dist/lib/dropdown.cjs +36 -1
  188. package/dist/lib/dropdown.cjs.map +1 -1
  189. package/dist/lib/dropdown.js +22 -21
  190. package/dist/lib/dropdown.js.map +1 -1
  191. package/dist/lib/editor.cjs +711 -1
  192. package/dist/lib/editor.cjs.map +1 -1
  193. package/dist/lib/editor.js +271 -235
  194. package/dist/lib/editor.js.map +1 -1
  195. package/dist/lib/emoji-picker.cjs +1277 -1
  196. package/dist/lib/emoji-picker.cjs.map +1 -1
  197. package/dist/lib/emoji-picker.js +859 -569
  198. package/dist/lib/emoji-picker.js.map +1 -1
  199. package/dist/lib/emoji-row.cjs +128 -1
  200. package/dist/lib/emoji-row.cjs.map +1 -1
  201. package/dist/lib/emoji-row.js +89 -75
  202. package/dist/lib/emoji-row.js.map +1 -1
  203. package/dist/lib/emoji-text-wrapper.cjs +102 -1
  204. package/dist/lib/emoji-text-wrapper.cjs.map +1 -1
  205. package/dist/lib/emoji-text-wrapper.js +42 -31
  206. package/dist/lib/emoji-text-wrapper.js.map +1 -1
  207. package/dist/lib/emoji.cjs +158 -1
  208. package/dist/lib/emoji.cjs.map +1 -1
  209. package/dist/lib/emoji.js +153 -6
  210. package/dist/lib/emoji.js.map +1 -1
  211. package/dist/lib/feed-item-row.cjs +296 -1
  212. package/dist/lib/feed-item-row.cjs.map +1 -1
  213. package/dist/lib/feed-item-row.js +119 -100
  214. package/dist/lib/feed-item-row.js.map +1 -1
  215. package/dist/lib/feed-pill.cjs +173 -1
  216. package/dist/lib/feed-pill.cjs.map +1 -1
  217. package/dist/lib/feed-pill.js +70 -57
  218. package/dist/lib/feed-pill.js.map +1 -1
  219. package/dist/lib/general-row.cjs +518 -1
  220. package/dist/lib/general-row.cjs.map +1 -1
  221. package/dist/lib/general-row.js +186 -148
  222. package/dist/lib/general-row.js.map +1 -1
  223. package/dist/lib/group-row.cjs +116 -1
  224. package/dist/lib/group-row.cjs.map +1 -1
  225. package/dist/lib/group-row.js +37 -35
  226. package/dist/lib/group-row.js.map +1 -1
  227. package/dist/lib/grouped-chip.cjs +96 -1
  228. package/dist/lib/grouped-chip.cjs.map +1 -1
  229. package/dist/lib/grouped-chip.js +51 -46
  230. package/dist/lib/grouped-chip.js.map +1 -1
  231. package/dist/lib/hovercard.cjs +223 -1
  232. package/dist/lib/hovercard.cjs.map +1 -1
  233. package/dist/lib/hovercard.js +115 -80
  234. package/dist/lib/hovercard.js.map +1 -1
  235. package/dist/lib/icon.cjs +58 -1
  236. package/dist/lib/icon.cjs.map +1 -1
  237. package/dist/lib/icon.js +20 -20
  238. package/dist/lib/icon.js.map +1 -1
  239. package/dist/lib/image-viewer.cjs +243 -1
  240. package/dist/lib/image-viewer.cjs.map +1 -1
  241. package/dist/lib/image-viewer.js +104 -80
  242. package/dist/lib/image-viewer.js.map +1 -1
  243. package/dist/lib/input-group.cjs +91 -1
  244. package/dist/lib/input-group.cjs.map +1 -1
  245. package/dist/lib/input-group.js +41 -39
  246. package/dist/lib/input-group.js.map +1 -1
  247. package/dist/lib/input.cjs +578 -1
  248. package/dist/lib/input.cjs.map +1 -1
  249. package/dist/lib/input.js +185 -137
  250. package/dist/lib/input.js.map +1 -1
  251. package/dist/lib/item-layout.cjs +91 -1
  252. package/dist/lib/item-layout.cjs.map +1 -1
  253. package/dist/lib/item-layout.js +45 -39
  254. package/dist/lib/item-layout.js.map +1 -1
  255. package/dist/lib/ivr-node.cjs +263 -1
  256. package/dist/lib/ivr-node.cjs.map +1 -1
  257. package/dist/lib/ivr-node.js +130 -112
  258. package/dist/lib/ivr-node.js.map +1 -1
  259. package/dist/lib/keyboard-shortcut.cjs +119 -1
  260. package/dist/lib/keyboard-shortcut.cjs.map +1 -1
  261. package/dist/lib/keyboard-shortcut.js +58 -48
  262. package/dist/lib/keyboard-shortcut.js.map +1 -1
  263. package/dist/lib/lazy-show.cjs +82 -1
  264. package/dist/lib/lazy-show.cjs.map +1 -1
  265. package/dist/lib/lazy-show.js +21 -19
  266. package/dist/lib/lazy-show.js.map +1 -1
  267. package/dist/lib/link.cjs +43 -1
  268. package/dist/lib/link.cjs.map +1 -1
  269. package/dist/lib/link.js +20 -19
  270. package/dist/lib/link.js.map +1 -1
  271. package/dist/lib/list-item-group.cjs +67 -1
  272. package/dist/lib/list-item-group.cjs.map +1 -1
  273. package/dist/lib/list-item-group.js +24 -22
  274. package/dist/lib/list-item-group.js.map +1 -1
  275. package/dist/lib/list-item.cjs +216 -1
  276. package/dist/lib/list-item.cjs.map +1 -1
  277. package/dist/lib/list-item.js +71 -60
  278. package/dist/lib/list-item.js.map +1 -1
  279. package/dist/lib/message-input.cjs +708 -1
  280. package/dist/lib/message-input.cjs.map +1 -1
  281. package/dist/lib/message-input.js +232 -206
  282. package/dist/lib/message-input.js.map +1 -1
  283. package/dist/lib/modal.cjs +444 -2
  284. package/dist/lib/modal.cjs.map +1 -1
  285. package/dist/lib/modal.js +153 -120
  286. package/dist/lib/modal.js.map +1 -1
  287. package/dist/lib/notice.cjs +197 -1
  288. package/dist/lib/notice.cjs.map +1 -1
  289. package/dist/lib/notice.js +66 -63
  290. package/dist/lib/notice.js.map +1 -1
  291. package/dist/lib/pagination.cjs +205 -1
  292. package/dist/lib/pagination.cjs.map +1 -1
  293. package/dist/lib/pagination.js +96 -81
  294. package/dist/lib/pagination.js.map +1 -1
  295. package/dist/lib/popover.cjs +1080 -1
  296. package/dist/lib/popover.cjs.map +1 -1
  297. package/dist/lib/popover.js +447 -267
  298. package/dist/lib/popover.js.map +1 -1
  299. package/dist/lib/presence.cjs +70 -1
  300. package/dist/lib/presence.cjs.map +1 -1
  301. package/dist/lib/presence.js +33 -27
  302. package/dist/lib/presence.js.map +1 -1
  303. package/dist/lib/radio-group.cjs +88 -1
  304. package/dist/lib/radio-group.cjs.map +1 -1
  305. package/dist/lib/radio-group.js +18 -18
  306. package/dist/lib/radio-group.js.map +1 -1
  307. package/dist/lib/radio.cjs +162 -1
  308. package/dist/lib/radio.cjs.map +1 -1
  309. package/dist/lib/radio.js +66 -57
  310. package/dist/lib/radio.js.map +1 -1
  311. package/dist/lib/rich-text-editor.cjs +1137 -1
  312. package/dist/lib/rich-text-editor.cjs.map +1 -1
  313. package/dist/lib/rich-text-editor.js +567 -386
  314. package/dist/lib/rich-text-editor.js.map +1 -1
  315. package/dist/lib/root-layout.cjs +158 -1
  316. package/dist/lib/root-layout.cjs.map +1 -1
  317. package/dist/lib/root-layout.js +33 -31
  318. package/dist/lib/root-layout.js.map +1 -1
  319. package/dist/lib/scroller.cjs +1090 -1
  320. package/dist/lib/scroller.cjs.map +1 -1
  321. package/dist/lib/scroller.js +668 -345
  322. package/dist/lib/scroller.js.map +1 -1
  323. package/dist/lib/select-menu.cjs +312 -1
  324. package/dist/lib/select-menu.cjs.map +1 -1
  325. package/dist/lib/select-menu.js +124 -79
  326. package/dist/lib/select-menu.js.map +1 -1
  327. package/dist/lib/settings-menu-button.cjs +77 -1
  328. package/dist/lib/settings-menu-button.cjs.map +1 -1
  329. package/dist/lib/settings-menu-button.js +31 -30
  330. package/dist/lib/settings-menu-button.js.map +1 -1
  331. package/dist/lib/skeleton.cjs +635 -1
  332. package/dist/lib/skeleton.cjs.map +1 -1
  333. package/dist/lib/skeleton.js +189 -152
  334. package/dist/lib/skeleton.js.map +1 -1
  335. package/dist/lib/stack.cjs +123 -1
  336. package/dist/lib/stack.cjs.map +1 -1
  337. package/dist/lib/stack.js +61 -53
  338. package/dist/lib/stack.js.map +1 -1
  339. package/dist/lib/tabs.cjs +102 -1
  340. package/dist/lib/tabs.cjs.map +1 -1
  341. package/dist/lib/tabs.js +47 -41
  342. package/dist/lib/tabs.js.map +1 -1
  343. package/dist/lib/time-pill.cjs +41 -1
  344. package/dist/lib/time-pill.cjs.map +1 -1
  345. package/dist/lib/time-pill.js +18 -14
  346. package/dist/lib/time-pill.js.map +1 -1
  347. package/dist/lib/toast.cjs +281 -1
  348. package/dist/lib/toast.cjs.map +1 -1
  349. package/dist/lib/toast.js +96 -74
  350. package/dist/lib/toast.js.map +1 -1
  351. package/dist/lib/toggle.cjs +192 -1
  352. package/dist/lib/toggle.cjs.map +1 -1
  353. package/dist/lib/toggle.js +60 -49
  354. package/dist/lib/toggle.js.map +1 -1
  355. package/dist/lib/tooltip-directive.cjs +84 -1
  356. package/dist/lib/tooltip-directive.cjs.map +1 -1
  357. package/dist/lib/tooltip-directive.js +56 -42
  358. package/dist/lib/tooltip-directive.js.map +1 -1
  359. package/dist/lib/tooltip.cjs +460 -1
  360. package/dist/lib/tooltip.cjs.map +1 -1
  361. package/dist/lib/tooltip.js +162 -103
  362. package/dist/lib/tooltip.js.map +1 -1
  363. package/dist/lib/top-banner-info.cjs +71 -1
  364. package/dist/lib/top-banner-info.cjs.map +1 -1
  365. package/dist/lib/top-banner-info.js +27 -22
  366. package/dist/lib/top-banner-info.js.map +1 -1
  367. package/dist/lib/unread-pill.cjs +73 -1
  368. package/dist/lib/unread-pill.cjs.map +1 -1
  369. package/dist/lib/unread-pill.js +28 -25
  370. package/dist/lib/unread-pill.js.map +1 -1
  371. package/dist/lib/validation-messages.cjs +89 -1
  372. package/dist/lib/validation-messages.cjs.map +1 -1
  373. package/dist/lib/validation-messages.js +41 -36
  374. package/dist/lib/validation-messages.js.map +1 -1
  375. package/dist/style.css +1257 -1
  376. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
  377. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
  378. package/package.json +30 -29
  379. package/dist/chunks/_plugin-vue_export-helper-6_y-gaV6.js +0 -2
  380. package/dist/chunks/_plugin-vue_export-helper-6_y-gaV6.js.map +0 -1
  381. package/dist/chunks/_plugin-vue_export-helper-hUChTQA_.js +0 -10
  382. package/dist/chunks/_plugin-vue_export-helper-hUChTQA_.js.map +0 -1
  383. package/dist/chunks/dropdown-UO3UJalk.js +0 -2
  384. package/dist/chunks/dropdown_constants-EUcDxBrX.js +0 -9
  385. package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
  386. package/dist/chunks/dropdown_constants-KHFvVI2L.js +0 -2
  387. package/dist/chunks/dropdown_constants-KHFvVI2L.js.map +0 -1
  388. package/dist/chunks/icon_constants-2S_OSQ1t.js +0 -2
  389. package/dist/chunks/index-6tYeqbgP.js +0 -3
  390. package/dist/chunks/index-IBtQ5jRJ.js +0 -2
  391. package/dist/chunks/index-IBtQ5jRJ.js.map +0 -1
  392. package/dist/chunks/index-b4iXYvId.js +0 -399
  393. package/dist/chunks/index-mRmwpCBG.js +0 -256
  394. package/dist/chunks/index-mRmwpCBG.js.map +0 -1
  395. package/dist/chunks/input-0Uksk4DP.js +0 -2
  396. package/dist/chunks/input_group-AS760Cp7.js +0 -2
  397. package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +0 -197
  398. package/dist/chunks/keyboard_list_navigation-N74Bpdq7.js +0 -2
  399. package/dist/chunks/link_constants-Kn6kP4i1.js +0 -2
  400. package/dist/chunks/link_constants-vIUB92L4.js +0 -16
  401. package/dist/chunks/list_item_constants-LTUc74pD.js +0 -13
  402. package/dist/chunks/list_item_constants-Tsz5CO1m.js +0 -2
  403. package/dist/chunks/modal-VuMFkZFH.js +0 -82
  404. package/dist/chunks/modal-qEzlo0Sj.js +0 -2
  405. package/dist/chunks/notice_action-jO199emq.js +0 -2
  406. package/dist/chunks/notice_action-tJfD5Qw1.js +0 -209
  407. package/dist/chunks/notice_constants-c--hBFQw.js +0 -6
  408. package/dist/chunks/notice_constants-mC6al2Dm.js +0 -2
  409. package/dist/chunks/popover_constants-hOEhklvr.js +0 -2
  410. package/dist/chunks/popover_constants-qjlEkroB.js +0 -114
  411. package/dist/chunks/sr_only_close_button-iD7s1Pbj.js +0 -3
  412. package/dist/chunks/stack_constants-m9Ickqw0.js +0 -2
  413. package/dist/chunks/stack_constants-u7tNqGtc.js +0 -13
  414. package/dist/chunks/tab-GQZFMq83.js +0 -367
  415. package/dist/chunks/tab-at7WWglk.js +0 -2
  416. package/dist/lib/constants.cjs +0 -2
  417. package/dist/lib/dates.cjs +0 -2
  418. package/dist/lib/dates.js +0 -57
  419. package/dist/lib/mixins.cjs +0 -2
  420. package/dist/lib/mixins.js +0 -17
  421. package/dist/lib/utils.cjs +0 -2
  422. package/dist/lib/utils.js +0 -171
  423. package/dist/lib/validators.cjs +0 -2
  424. package/dist/lib/validators.js +0 -12
  425. /package/dist/{lib → common}/mixins.js.map +0 -0
@@ -1,6 +1,6 @@
1
- import { reactive as ae, ref as U, computed as j, watch as me, onMounted as we, nextTick as xe, openBlock as O, createElementBlock as ce, normalizeClass as de, createBlock as E, resolveDynamicComponent as Y, normalizeStyle as fe, unref as Fe, withCtx as B, Fragment as Ae, renderList as Ue, mergeProps as he, toHandlers as Oe, renderSlot as X, markRaw as Pe, shallowReactive as Re, h as Be, resolveComponent as ue, createVNode as Ve, normalizeProps as pe, guardReactiveProps as ve, provide as Me } from "vue";
2
- import { _ as He } from "../chunks/_plugin-vue_export-helper-hUChTQA_.js";
3
- const ye = {
1
+ import { reactive, ref, computed, watch, onMounted, nextTick, openBlock, createElementBlock, normalizeClass, createBlock, resolveDynamicComponent, normalizeStyle, unref, withCtx, Fragment, renderList, mergeProps, toHandlers, renderSlot, markRaw, shallowReactive, h, resolveComponent, createVNode, normalizeProps, guardReactiveProps, provide } from "vue";
2
+ import { _export_sfc } from "../chunks/_plugin-vue_export-helper-caHeSgYY.js";
3
+ const _sfc_main$3 = {
4
4
  __name: "core_scroller",
5
5
  props: {
6
6
  /**
@@ -8,7 +8,7 @@ const ye = {
8
8
  */
9
9
  items: {
10
10
  type: Array,
11
- required: !0
11
+ required: true
12
12
  },
13
13
  /**
14
14
  *
@@ -24,7 +24,7 @@ const ye = {
24
24
  direction: {
25
25
  type: String,
26
26
  default: "vertical",
27
- validator: (e) => ["vertical", "horizontal"].includes(e)
27
+ validator: (value) => ["vertical", "horizontal"].includes(value)
28
28
  },
29
29
  /**
30
30
  * Size of the items in the list.
@@ -61,7 +61,7 @@ const ye = {
61
61
  */
62
62
  skipHover: {
63
63
  type: Boolean,
64
- default: !1
64
+ default: false
65
65
  },
66
66
  /**
67
67
  * The element to render as the list's wrapper.
@@ -93,194 +93,375 @@ const ye = {
93
93
  }
94
94
  },
95
95
  emits: ["user-position"],
96
- setup(e, { expose: i, emit: o }) {
97
- const t = e, z = o, u = ae(/* @__PURE__ */ new Map()), v = ae(/* @__PURE__ */ new Map()), f = U([]), y = U(null), S = U(!1), h = U(null), x = U("top");
98
- let w = 0, F = !1, A = 0, V = null, M = null, G = 0, ze = 0;
99
- const L = j(() => {
100
- if (t.itemSize === null) {
101
- const r = {
96
+ setup(__props, { expose: __expose, emit: __emit }) {
97
+ const props = __props;
98
+ const emit = __emit;
99
+ const views = reactive(/* @__PURE__ */ new Map());
100
+ const unusedViews = reactive(/* @__PURE__ */ new Map());
101
+ const pool = ref([]);
102
+ const hoverKey = ref(null);
103
+ const ready = ref(false);
104
+ const scroller = ref(null);
105
+ const userPosition = ref("top");
106
+ let endIndex = 0;
107
+ let scrollDirty = false;
108
+ let lastUpdateScrollPosition = 0;
109
+ let sortTimer = null;
110
+ let computedMinItemSize = null;
111
+ let totalSize = 0;
112
+ let uid = 0;
113
+ const sizes = computed(() => {
114
+ if (props.itemSize === null) {
115
+ const sizes2 = {
102
116
  "-1": { accumulator: 0 }
103
- }, n = t.items, s = t.sizeField, D = t.minItemSize;
104
- let p = 1e4, k = 0, d;
105
- for (let b = 0, P = n.length; b < P; b++)
106
- d = n[b][s] || D, d < p && (p = d), k += d, r[b] = { accumulator: k, size: d };
107
- return M = p, r;
117
+ };
118
+ const items = props.items;
119
+ const field = props.sizeField;
120
+ const minItemSize = props.minItemSize;
121
+ let computedMinSize = 1e4;
122
+ let accumulator = 0;
123
+ let current;
124
+ for (let i = 0, l = items.length; i < l; i++) {
125
+ current = items[i][field] || minItemSize;
126
+ if (current < computedMinSize) {
127
+ computedMinSize = current;
128
+ }
129
+ accumulator += current;
130
+ sizes2[i] = { accumulator, size: current };
131
+ }
132
+ computedMinItemSize = computedMinSize;
133
+ return sizes2;
108
134
  }
109
135
  return [];
110
- }), Se = j(() => t.items.length && typeof t.items[0] != "object"), ge = j(() => {
111
- const r = {};
112
- for (let n = 0, s = t.items.length; n < s; n++)
113
- r[t.items[n][t.keyField]] = n;
114
- return r;
115
136
  });
116
- me(L, () => {
117
- H(!1);
118
- }, { deep: !0 }), we(() => {
119
- xe(() => {
120
- H(!0), S.value = !0;
137
+ const simpleArray = computed(() => {
138
+ return props.items.length && typeof props.items[0] !== "object";
139
+ });
140
+ const itemIndexByKey = computed(() => {
141
+ const result = {};
142
+ for (let i = 0, l = props.items.length; i < l; i++) {
143
+ result[props.items[i][props.keyField]] = i;
144
+ }
145
+ return result;
146
+ });
147
+ watch(sizes, () => {
148
+ _updateVisibleItems(false);
149
+ }, { deep: true });
150
+ onMounted(() => {
151
+ nextTick(() => {
152
+ _updateVisibleItems(true);
153
+ ready.value = true;
121
154
  });
122
155
  });
123
- const J = (r, n, s, D, p) => {
124
- const k = Pe({
125
- id: ze++,
126
- index: n,
127
- used: !0,
128
- key: D,
129
- type: p
130
- }), d = Re({
131
- item: s,
156
+ const _addView = (pool2, index, item, key, type) => {
157
+ const nr = markRaw({
158
+ id: uid++,
159
+ index,
160
+ used: true,
161
+ key,
162
+ type
163
+ });
164
+ const view = shallowReactive({
165
+ item,
132
166
  position: 0,
133
- nr: k
167
+ nr
168
+ });
169
+ pool2.value.push(view);
170
+ return view;
171
+ };
172
+ const _unuseView = (view, fake = false) => {
173
+ const _unusedViews = unusedViews;
174
+ const type = view.nr.type;
175
+ let unusedPool = _unusedViews.get(type);
176
+ if (!unusedPool) {
177
+ unusedPool = [];
178
+ _unusedViews.set(type, unusedPool);
179
+ }
180
+ unusedPool.push(view);
181
+ if (!fake) {
182
+ view.nr.used = false;
183
+ view.position = -9999;
184
+ }
185
+ };
186
+ const _getScroll = () => {
187
+ const isVertical = props.direction === "vertical";
188
+ let scrollState;
189
+ if (isVertical) {
190
+ scrollState = {
191
+ start: scroller.value.scrollTop,
192
+ end: scroller.value.scrollTop + scroller.value.clientHeight
193
+ };
194
+ } else {
195
+ scrollState = {
196
+ start: scroller.value.scrollLeft,
197
+ end: scroller.value.scrollLeft + scroller.value.clientWidth
198
+ };
199
+ }
200
+ return scrollState;
201
+ };
202
+ const _itemsLimitError = () => {
203
+ setTimeout(() => {
204
+ console.error("It seems the scroller element isn't scrolling, so it tries to render all the items at once.", "Scroller:", scroller);
205
+ console.error("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.");
134
206
  });
135
- return r.value.push(d), d;
136
- }, K = (r, n = !1) => {
137
- const s = v, D = r.nr.type;
138
- let p = s.get(D);
139
- p || (p = [], s.set(D, p)), p.push(r), n || (r.nr.used = !1, r.position = -9999);
140
- }, $e = () => {
141
- const r = t.direction === "vertical";
142
- let n;
143
- return r ? n = {
144
- start: h.value.scrollTop,
145
- end: h.value.scrollTop + h.value.clientHeight
146
- } : n = {
147
- start: h.value.scrollLeft,
148
- end: h.value.scrollLeft + h.value.clientWidth
149
- }, n;
150
- }, _e = () => {
151
- throw setTimeout(() => {
152
- console.error("It seems the scroller element isn't scrolling, so it tries to render all the items at once.", "Scroller:", h), console.error("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.");
153
- }), new Error("Rendered items limit reached");
154
- }, be = () => {
155
- f.value.sort((r, n) => r.nr.index - n.nr.index);
156
- }, H = (r, n = !1) => {
157
- var ee, te, ie, se, le, re;
158
- const s = t.itemSize, D = M, p = Se.value ? null : t.keyField, k = t.items, d = k.length, b = L.value, P = u, Q = v, q = f, Ie = ge;
159
- let g, m, N;
160
- if (!d)
161
- g = m = N = 0;
162
- else {
163
- const a = $e();
164
- if (n) {
165
- let c = a.start - A.value;
166
- if (c < 0 && (c = -c), s === null && c < D.value || c < s)
207
+ throw new Error("Rendered items limit reached");
208
+ };
209
+ const _sortViews = () => {
210
+ pool.value.sort((viewA, viewB) => viewA.nr.index - viewB.nr.index);
211
+ };
212
+ const _updateVisibleItems = (checkItem, checkPositionDiff = false) => {
213
+ var _a, _b, _c, _d, _e, _f;
214
+ const itemSize = props.itemSize;
215
+ const minItemSize = computedMinItemSize;
216
+ const keyField = simpleArray.value ? null : props.keyField;
217
+ const items = props.items;
218
+ const count = items.length;
219
+ const _sizes = sizes.value;
220
+ const _views = views;
221
+ const _unusedViews = unusedViews;
222
+ const _pool = pool;
223
+ const _itemIndexByKey = itemIndexByKey;
224
+ let _startIndex, _endIndex;
225
+ let _totalSize;
226
+ if (!count) {
227
+ _startIndex = _endIndex = _totalSize = 0;
228
+ } else {
229
+ const scroll = _getScroll();
230
+ if (checkPositionDiff) {
231
+ let positionDiff = scroll.start - lastUpdateScrollPosition.value;
232
+ if (positionDiff < 0)
233
+ positionDiff = -positionDiff;
234
+ if (itemSize === null && positionDiff < minItemSize.value || positionDiff < itemSize) {
167
235
  return {
168
- continuous: !0
236
+ continuous: true
169
237
  };
238
+ }
170
239
  }
171
- A = a.start;
172
- const $ = t.buffer;
173
- if (a.start -= $, a.end += $, s === null) {
174
- let c, R = 0, oe = d - 1, _ = ~~(d / 2), ne;
175
- do
176
- ne = _, c = (ee = b[_]) == null ? void 0 : ee.accumulator, c < a.start ? R = _ : _ < d - 1 && ((te = b[_ + 1]) == null ? void 0 : te.accumulator) > a.start && (oe = _), _ = ~~((R + oe) / 2);
177
- while (_ !== ne);
178
- for (_ < 0 && (_ = 0), g = _, N = (ie = b[d - 1]) == null ? void 0 : ie.accumulator, m = _; m < d && ((se = b[m]) == null ? void 0 : se.accumulator) < a.end; m++)
240
+ lastUpdateScrollPosition = scroll.start;
241
+ const _buffer = props.buffer;
242
+ scroll.start -= _buffer;
243
+ scroll.end += _buffer;
244
+ if (itemSize === null) {
245
+ let h2;
246
+ let a = 0;
247
+ let b = count - 1;
248
+ let i = ~~(count / 2);
249
+ let oldI;
250
+ do {
251
+ oldI = i;
252
+ h2 = (_a = _sizes[i]) == null ? void 0 : _a.accumulator;
253
+ if (h2 < scroll.start) {
254
+ a = i;
255
+ } else if (i < count - 1 && ((_b = _sizes[i + 1]) == null ? void 0 : _b.accumulator) > scroll.start) {
256
+ b = i;
257
+ }
258
+ i = ~~((a + b) / 2);
259
+ } while (i !== oldI);
260
+ i < 0 && (i = 0);
261
+ _startIndex = i;
262
+ _totalSize = (_c = _sizes[count - 1]) == null ? void 0 : _c.accumulator;
263
+ for (_endIndex = i; _endIndex < count && ((_d = _sizes[_endIndex]) == null ? void 0 : _d.accumulator) < scroll.end; _endIndex++)
179
264
  ;
180
- m === -1 ? m = k.length - 1 : (m++, m > d && (m = d));
265
+ if (_endIndex === -1) {
266
+ _endIndex = items.length - 1;
267
+ } else {
268
+ _endIndex++;
269
+ _endIndex > count && (_endIndex = count);
270
+ }
181
271
  } else {
182
- g = ~~(a.start / s);
183
- const c = g % 1;
184
- g -= c, m = Math.ceil(a.end / s), g < 0 && (g = 0), m > d && (m = d), N = Math.ceil(d / 1) * s;
272
+ _startIndex = ~~(scroll.start / itemSize);
273
+ const remainer = _startIndex % 1;
274
+ _startIndex -= remainer;
275
+ _endIndex = Math.ceil(scroll.end / itemSize);
276
+ _startIndex < 0 && (_startIndex = 0);
277
+ _endIndex > count && (_endIndex = count);
278
+ _totalSize = Math.ceil(count / 1) * itemSize;
185
279
  }
186
280
  }
187
- m - g > 1e3 && _e(), G = N;
188
- let l;
189
- const W = g <= w && m >= g;
190
- if (W)
191
- for (let a = 0, $ = q.value.length; a < $; a++)
192
- l = q.value[a], l != null && l.nr.used && (r && (l.nr.index = Ie[l.item[p]]), (l.nr.index == null || l.nr.index < g || l.nr.index >= m) && K(l));
193
- const Z = W ? null : /* @__PURE__ */ new Map();
194
- let T, I, C;
195
- for (let a = g; a < m; a++) {
196
- T = k[a];
197
- const $ = p ? T == null ? void 0 : T[p] : T;
198
- if ($ == null)
199
- throw new Error(`Key is ${$} on item (keyField is '${p}')`);
200
- if (l = P.get($), !s && !((le = b[a]) != null && le.size)) {
201
- l && K(l);
281
+ if (_endIndex - _startIndex > 1e3) {
282
+ _itemsLimitError();
283
+ }
284
+ totalSize = _totalSize;
285
+ let view;
286
+ const continuous = _startIndex <= endIndex && _endIndex >= _startIndex;
287
+ if (continuous) {
288
+ for (let i = 0, l = _pool.value.length; i < l; i++) {
289
+ view = _pool.value[i];
290
+ if (view == null ? void 0 : view.nr.used) {
291
+ if (checkItem) {
292
+ view.nr.index = _itemIndexByKey[view.item[keyField]];
293
+ }
294
+ if (view.nr.index == null || view.nr.index < _startIndex || view.nr.index >= _endIndex) {
295
+ _unuseView(view);
296
+ }
297
+ }
298
+ }
299
+ }
300
+ const unusedIndex = continuous ? null : /* @__PURE__ */ new Map();
301
+ let item, type;
302
+ let v;
303
+ for (let i = _startIndex; i < _endIndex; i++) {
304
+ item = items[i];
305
+ const key = keyField ? item == null ? void 0 : item[keyField] : item;
306
+ if (key == null) {
307
+ throw new Error(`Key is ${key} on item (keyField is '${keyField}')`);
308
+ }
309
+ view = _views.get(key);
310
+ if (!itemSize && !((_e = _sizes[i]) == null ? void 0 : _e.size)) {
311
+ if (view)
312
+ _unuseView(view);
202
313
  continue;
203
314
  }
204
- I = T.type;
205
- let c = Q.get(I);
206
- if (!l)
207
- W ? c && c.length ? l = c.pop() : l = J(q, a, T, $, I) : (C = Z.get(I) || 0, (!c || C >= c.length) && (l = J(q, a, T, $, I), K(l, !0), c = Q.get(I)), l = c[C], Z.set(I, C + 1)), P.delete(l.nr.key), l.nr.used = !0, l.nr.index = a, l.nr.key = $, l.nr.type = I, P.set($, l);
208
- else if (!l.nr.used && (l.nr.used = !0, c)) {
209
- const R = c.indexOf(l);
210
- R !== -1 && c.splice(R, 1);
315
+ type = item.type;
316
+ let unusedPool = _unusedViews.get(type);
317
+ if (!view) {
318
+ if (continuous) {
319
+ if (unusedPool && unusedPool.length) {
320
+ view = unusedPool.pop();
321
+ } else {
322
+ view = _addView(_pool, i, item, key, type);
323
+ }
324
+ } else {
325
+ v = unusedIndex.get(type) || 0;
326
+ if (!unusedPool || v >= unusedPool.length) {
327
+ view = _addView(_pool, i, item, key, type);
328
+ _unuseView(view, true);
329
+ unusedPool = _unusedViews.get(type);
330
+ }
331
+ view = unusedPool[v];
332
+ unusedIndex.set(type, v + 1);
333
+ }
334
+ _views.delete(view.nr.key);
335
+ view.nr.used = true;
336
+ view.nr.index = i;
337
+ view.nr.key = key;
338
+ view.nr.type = type;
339
+ _views.set(key, view);
340
+ } else {
341
+ if (!view.nr.used) {
342
+ view.nr.used = true;
343
+ if (unusedPool) {
344
+ const index = unusedPool.indexOf(view);
345
+ if (index !== -1)
346
+ unusedPool.splice(index, 1);
347
+ }
348
+ }
349
+ }
350
+ view.item = item;
351
+ if (itemSize === null) {
352
+ view.position = (_f = _sizes[i - 1]) == null ? void 0 : _f.accumulator;
353
+ view.offset = 0;
354
+ } else {
355
+ view.position = Math.floor(i) * itemSize;
356
+ view.offset = i % 1 * itemSize;
211
357
  }
212
- l.item = T, s === null ? (l.position = (re = b[a - 1]) == null ? void 0 : re.accumulator, l.offset = 0) : (l.position = Math.floor(a) * s, l.offset = a % 1 * s);
213
358
  }
214
- return w = m, clearTimeout(V), V = setTimeout(be, 300), {
215
- continuous: W
359
+ endIndex = _endIndex;
360
+ clearTimeout(sortTimer);
361
+ sortTimer = setTimeout(_sortViews, 300);
362
+ return {
363
+ continuous
216
364
  };
217
- }, De = (r) => {
218
- const n = t.direction === "vertical" ? { scroll: "scrollTop", start: "top" } : { scroll: "scrollLeft", start: "left" }, s = h.value, D = n.scroll;
219
- s[D] = r;
220
- }, Te = (r) => {
221
- var s;
222
- let n;
223
- t.itemSize === null ? n = r > 0 ? (s = L.value[r - 1]) == null ? void 0 : s.accumulator : 0 : n = Math.floor(r) * t.itemSize, De(n);
224
- }, ke = () => {
225
- const r = h.value;
226
- x.value !== "middle" && (x.value = "middle", z("user-position", "middle")), r.scrollTop === 0 && (x.value = "top", z("user-position", "top")), r.scrollTop + r.clientHeight === r.scrollHeight && (x.value = "bottom", z("user-position", "bottom")), F || (F = !0, requestAnimationFrame(() => {
227
- F = !1, H(!1, !0);
228
- }));
229
365
  };
230
- return i({
231
- scrollToItem: Te,
232
- _updateVisibleItems: H
233
- }), (r, n) => (O(), ce("div", {
234
- ref_key: "scroller",
235
- ref: h,
236
- class: de(["vue-recycle-scroller", {
237
- ready: S.value,
238
- [`direction-${e.direction}`]: !0
239
- }]),
240
- onScrollPassive: ke
241
- }, [
242
- (O(), E(Y(e.listTag), {
243
- ref: "wrapper",
244
- style: fe({ [e.direction === "vertical" ? "minHeight" : "minWidth"]: `${Fe(G)}px` }),
245
- class: de(["vue-recycle-scroller__item-wrapper", e.listClass])
246
- }, {
247
- default: B(() => [
248
- (O(!0), ce(Ae, null, Ue(f.value, (s) => (O(), E(Y(e.itemTag), he({
249
- key: s.nr.id,
250
- style: S.value ? {
251
- transform: `translate${e.direction === "vertical" ? "Y" : "X"}(${s.position}px) translate${e.direction === "vertical" ? "X" : "Y"}(${s.offset}px)`,
252
- width: void 0,
253
- height: void 0
254
- } : null,
255
- class: ["vue-recycle-scroller__item-view", [
256
- e.itemClass,
257
- {
258
- hover: !e.skipHover && y.value === s.nr.key
259
- }
260
- ]]
261
- }, Oe(e.skipHover ? {} : {
262
- mouseenter: () => {
263
- y.value = s.nr.key;
264
- },
265
- mouseleave: () => {
266
- y.value = null;
267
- }
268
- })), {
269
- default: B(() => [
270
- X(r.$slots, "default", {
271
- item: s.item,
272
- index: s.nr.index,
273
- active: s.nr.used
274
- })
275
- ]),
276
- _: 2
277
- }, 1040, ["style", "class"]))), 128))
278
- ]),
279
- _: 3
280
- }, 8, ["style", "class"]))
281
- ], 34));
366
+ const _scrollToPosition = (position) => {
367
+ const direction = props.direction === "vertical" ? { scroll: "scrollTop", start: "top" } : { scroll: "scrollLeft", start: "left" };
368
+ const viewport = scroller.value;
369
+ const scrollDirection = direction.scroll;
370
+ viewport[scrollDirection] = position;
371
+ };
372
+ const scrollToItem = (index) => {
373
+ var _a;
374
+ let scroll;
375
+ if (props.itemSize === null) {
376
+ scroll = index > 0 ? (_a = sizes.value[index - 1]) == null ? void 0 : _a.accumulator : 0;
377
+ } else {
378
+ scroll = Math.floor(index) * props.itemSize;
379
+ }
380
+ _scrollToPosition(scroll);
381
+ };
382
+ const handleScroll = () => {
383
+ const container = scroller.value;
384
+ if (userPosition.value !== "middle") {
385
+ userPosition.value = "middle";
386
+ emit("user-position", "middle");
387
+ }
388
+ if (container.scrollTop === 0) {
389
+ userPosition.value = "top";
390
+ emit("user-position", "top");
391
+ }
392
+ if (container.scrollTop + container.clientHeight === container.scrollHeight) {
393
+ userPosition.value = "bottom";
394
+ emit("user-position", "bottom");
395
+ }
396
+ if (!scrollDirty) {
397
+ scrollDirty = true;
398
+ const requestUpdate = () => requestAnimationFrame(() => {
399
+ scrollDirty = false;
400
+ _updateVisibleItems(false, true);
401
+ });
402
+ requestUpdate();
403
+ }
404
+ };
405
+ __expose({
406
+ scrollToItem,
407
+ _updateVisibleItems
408
+ });
409
+ return (_ctx, _cache) => {
410
+ return openBlock(), createElementBlock("div", {
411
+ ref_key: "scroller",
412
+ ref: scroller,
413
+ class: normalizeClass(["vue-recycle-scroller", {
414
+ ready: ready.value,
415
+ [`direction-${__props.direction}`]: true
416
+ }]),
417
+ onScrollPassive: handleScroll
418
+ }, [
419
+ (openBlock(), createBlock(resolveDynamicComponent(__props.listTag), {
420
+ ref: "wrapper",
421
+ style: normalizeStyle({ [__props.direction === "vertical" ? "minHeight" : "minWidth"]: `${unref(totalSize)}px` }),
422
+ class: normalizeClass(["vue-recycle-scroller__item-wrapper", __props.listClass])
423
+ }, {
424
+ default: withCtx(() => [
425
+ (openBlock(true), createElementBlock(Fragment, null, renderList(pool.value, (view) => {
426
+ return openBlock(), createBlock(resolveDynamicComponent(__props.itemTag), mergeProps({
427
+ key: view.nr.id,
428
+ style: ready.value ? {
429
+ transform: `translate${__props.direction === "vertical" ? "Y" : "X"}(${view.position}px) translate${__props.direction === "vertical" ? "X" : "Y"}(${view.offset}px)`,
430
+ width: void 0,
431
+ height: void 0
432
+ } : null,
433
+ class: ["vue-recycle-scroller__item-view", [
434
+ __props.itemClass,
435
+ {
436
+ hover: !__props.skipHover && hoverKey.value === view.nr.key
437
+ }
438
+ ]]
439
+ }, toHandlers(__props.skipHover ? {} : {
440
+ mouseenter: () => {
441
+ hoverKey.value = view.nr.key;
442
+ },
443
+ mouseleave: () => {
444
+ hoverKey.value = null;
445
+ }
446
+ })), {
447
+ default: withCtx(() => [
448
+ renderSlot(_ctx.$slots, "default", {
449
+ item: view.item,
450
+ index: view.nr.index,
451
+ active: view.nr.used
452
+ })
453
+ ]),
454
+ _: 2
455
+ }, 1040, ["style", "class"]);
456
+ }), 128))
457
+ ]),
458
+ _: 3
459
+ }, 8, ["style", "class"]))
460
+ ], 34);
461
+ };
282
462
  }
283
- }, qe = {
463
+ };
464
+ const _sfc_main$2 = {
284
465
  name: "DtScrollerItem",
285
466
  inject: [
286
467
  "vscrollData",
@@ -290,18 +471,18 @@ const ye = {
290
471
  props: {
291
472
  // eslint-disable-next-line vue/require-prop-types
292
473
  item: {
293
- required: !0
474
+ required: true
294
475
  },
295
476
  watchData: {
296
477
  type: Boolean,
297
- default: !1
478
+ default: false
298
479
  },
299
480
  /**
300
481
  * Indicates if the view is actively used to display an item.
301
482
  */
302
483
  active: {
303
484
  type: Boolean,
304
- required: !0
485
+ required: true
305
486
  },
306
487
  index: {
307
488
  type: Number,
@@ -333,102 +514,189 @@ const ye = {
333
514
  },
334
515
  watch: {
335
516
  watchData: "updateWatchData",
336
- id(e, i) {
337
- if (this.$el.$_vs_id = this.id, this.size || this.onDataUpdate(), this.$_sizeObserved) {
338
- const o = this.vscrollData.sizes[i], t = this.vscrollData.sizes[e];
339
- o != null && o !== t && this.applySize(o);
517
+ id(value, oldValue) {
518
+ this.$el.$_vs_id = this.id;
519
+ if (!this.size) {
520
+ this.onDataUpdate();
521
+ }
522
+ if (this.$_sizeObserved) {
523
+ const oldSize = this.vscrollData.sizes[oldValue];
524
+ const size = this.vscrollData.sizes[value];
525
+ if (oldSize != null && oldSize !== size) {
526
+ this.applySize(oldSize);
527
+ }
340
528
  }
341
529
  },
342
- finalActive(e) {
343
- this.size || (e ? this.vscrollParent.$_undefinedMap[this.id] || (this.vscrollParent.$_undefinedSizes++, this.vscrollParent.$_undefinedMap[this.id] = !0) : this.vscrollParent.$_undefinedMap[this.id] && (this.vscrollParent.$_undefinedSizes--, this.vscrollParent.$_undefinedMap[this.id] = !1)), this.vscrollResizeObserver ? e ? this.observeSize() : this.unobserveSize() : e && this.$_pendingVScrollUpdate === this.id && this.updateSize();
530
+ finalActive(value) {
531
+ if (!this.size) {
532
+ if (value) {
533
+ if (!this.vscrollParent.$_undefinedMap[this.id]) {
534
+ this.vscrollParent.$_undefinedSizes++;
535
+ this.vscrollParent.$_undefinedMap[this.id] = true;
536
+ }
537
+ } else {
538
+ if (this.vscrollParent.$_undefinedMap[this.id]) {
539
+ this.vscrollParent.$_undefinedSizes--;
540
+ this.vscrollParent.$_undefinedMap[this.id] = false;
541
+ }
542
+ }
543
+ }
544
+ if (this.vscrollResizeObserver) {
545
+ if (value) {
546
+ this.observeSize();
547
+ } else {
548
+ this.unobserveSize();
549
+ }
550
+ } else if (value && this.$_pendingVScrollUpdate === this.id) {
551
+ this.updateSize();
552
+ }
344
553
  }
345
554
  },
346
555
  created() {
347
- if (!this.$isServer && (this.$_forceNextVScrollUpdate = null, this.updateWatchData(), !this.vscrollResizeObserver))
348
- for (const e in this.sizeDependencies)
349
- this.$watch(() => this.sizeDependencies[e], this.onDataUpdate);
556
+ if (this.$isServer)
557
+ return;
558
+ this.$_forceNextVScrollUpdate = null;
559
+ this.updateWatchData();
560
+ if (!this.vscrollResizeObserver) {
561
+ for (const k in this.sizeDependencies) {
562
+ this.$watch(() => this.sizeDependencies[k], this.onDataUpdate);
563
+ }
564
+ }
350
565
  },
351
566
  mounted() {
352
- this.finalActive && (this.updateSize(), this.observeSize());
567
+ if (this.finalActive) {
568
+ this.updateSize();
569
+ this.observeSize();
570
+ }
353
571
  },
354
572
  beforeUnmount() {
355
573
  this.unobserveSize();
356
574
  },
357
575
  methods: {
358
576
  updateSize() {
359
- this.finalActive ? this.$_pendingSizeUpdate !== this.id && (this.$_pendingSizeUpdate = this.id, this.$_forceNextVScrollUpdate = null, this.$_pendingVScrollUpdate = null, this.computeSize(this.id)) : this.$_forceNextVScrollUpdate = this.id;
577
+ if (this.finalActive) {
578
+ if (this.$_pendingSizeUpdate !== this.id) {
579
+ this.$_pendingSizeUpdate = this.id;
580
+ this.$_forceNextVScrollUpdate = null;
581
+ this.$_pendingVScrollUpdate = null;
582
+ this.computeSize(this.id);
583
+ }
584
+ } else {
585
+ this.$_forceNextVScrollUpdate = this.id;
586
+ }
360
587
  },
361
588
  updateWatchData() {
362
- this.watchData && !this.vscrollResizeObserver ? this.$_watchData = this.$watch("item", () => {
363
- this.onDataUpdate();
364
- }, {
365
- deep: !0
366
- }) : this.$_watchData && (this.$_watchData(), this.$_watchData = null);
589
+ if (this.watchData && !this.vscrollResizeObserver) {
590
+ this.$_watchData = this.$watch("item", () => {
591
+ this.onDataUpdate();
592
+ }, {
593
+ deep: true
594
+ });
595
+ } else if (this.$_watchData) {
596
+ this.$_watchData();
597
+ this.$_watchData = null;
598
+ }
367
599
  },
368
- onVscrollUpdate({ force: e }) {
369
- !this.finalActive && e && (this.$_pendingVScrollUpdate = this.id), (this.$_forceNextVScrollUpdate === this.id || e || !this.size) && this.updateSize();
600
+ onVscrollUpdate({ force }) {
601
+ if (!this.finalActive && force) {
602
+ this.$_pendingVScrollUpdate = this.id;
603
+ }
604
+ if (this.$_forceNextVScrollUpdate === this.id || force || !this.size) {
605
+ this.updateSize();
606
+ }
370
607
  },
371
608
  onDataUpdate() {
372
609
  this.updateSize();
373
610
  },
374
- computeSize(e) {
611
+ computeSize(id) {
375
612
  this.$nextTick(() => {
376
- if (this.id === e) {
377
- const i = this.$el.offsetWidth, o = this.$el.offsetHeight;
378
- this.applyWidthHeight(i, o);
613
+ if (this.id === id) {
614
+ const width = this.$el.offsetWidth;
615
+ const height = this.$el.offsetHeight;
616
+ this.applyWidthHeight(width, height);
379
617
  }
380
618
  this.$_pendingSizeUpdate = null;
381
619
  });
382
620
  },
383
- applyWidthHeight(e, i) {
384
- const o = ~~(this.vscrollParent.direction === "vertical" ? i : e);
385
- o && this.size !== o && this.applySize(o);
621
+ applyWidthHeight(width, height) {
622
+ const size = ~~(this.vscrollParent.direction === "vertical" ? height : width);
623
+ if (size && this.size !== size) {
624
+ this.applySize(size);
625
+ }
386
626
  },
387
- applySize(e) {
388
- this.vscrollParent.$_undefinedMap[this.id] && (this.vscrollParent.$_undefinedSizes--, this.vscrollParent.$_undefinedMap[this.id] = void 0), this.vscrollData.sizes[this.id] = e;
627
+ applySize(size) {
628
+ if (this.vscrollParent.$_undefinedMap[this.id]) {
629
+ this.vscrollParent.$_undefinedSizes--;
630
+ this.vscrollParent.$_undefinedMap[this.id] = void 0;
631
+ }
632
+ this.vscrollData.sizes[this.id] = size;
389
633
  },
390
634
  observeSize() {
391
- this.vscrollResizeObserver && (this.$_sizeObserved || (this.vscrollResizeObserver.observe(this.$el), this.$el.$_vs_id = this.id, this.$el.$_vs_onResize = this.onResize, this.$_sizeObserved = !0));
635
+ if (!this.vscrollResizeObserver)
636
+ return;
637
+ if (this.$_sizeObserved)
638
+ return;
639
+ this.vscrollResizeObserver.observe(this.$el);
640
+ this.$el.$_vs_id = this.id;
641
+ this.$el.$_vs_onResize = this.onResize;
642
+ this.$_sizeObserved = true;
392
643
  },
393
644
  unobserveSize() {
394
- this.vscrollResizeObserver && this.$_sizeObserved && (this.vscrollResizeObserver.unobserve(this.$el), this.$el.$_vs_onResize = void 0, this.$_sizeObserved = !1);
645
+ if (!this.vscrollResizeObserver)
646
+ return;
647
+ if (!this.$_sizeObserved)
648
+ return;
649
+ this.vscrollResizeObserver.unobserve(this.$el);
650
+ this.$el.$_vs_onResize = void 0;
651
+ this.$_sizeObserved = false;
395
652
  },
396
- onResize(e, i, o) {
397
- this.id === e && this.applyWidthHeight(i, o);
653
+ onResize(id, width, height) {
654
+ if (this.id === id) {
655
+ this.applyWidthHeight(width, height);
656
+ }
398
657
  }
399
658
  },
400
659
  render() {
401
- return Be(this.tag, this.$slots.default());
660
+ return h(this.tag, this.$slots.default());
402
661
  }
403
- }, Ne = {
662
+ };
663
+ const _sfc_main$1 = {
404
664
  name: "DynamicScroller",
405
665
  components: {
406
- CoreScroller: ye,
407
- DtScrollerItem: qe
666
+ CoreScroller: _sfc_main$3,
667
+ DtScrollerItem: _sfc_main$2
408
668
  },
409
669
  provide() {
410
- return typeof ResizeObserver < "u" && (this.$_resizeObserver = new ResizeObserver((e) => {
411
- requestAnimationFrame(() => {
412
- if (Array.isArray(e)) {
413
- for (const i of e)
414
- if (i.target && i.target.$_vs_onResize) {
415
- let o, t;
416
- if (i.borderBoxSize) {
417
- const z = i.borderBoxSize[0];
418
- o = z.inlineSize, t = z.blockSize;
419
- } else
420
- o = i.contentRect.width, t = i.contentRect.height;
421
- i.target.$_vs_onResize(i.target.$_vs_id, o, t);
670
+ if (typeof ResizeObserver !== "undefined") {
671
+ this.$_resizeObserver = new ResizeObserver((entries) => {
672
+ requestAnimationFrame(() => {
673
+ if (!Array.isArray(entries)) {
674
+ return;
675
+ }
676
+ for (const entry of entries) {
677
+ if (entry.target && entry.target.$_vs_onResize) {
678
+ let width, height;
679
+ if (entry.borderBoxSize) {
680
+ const resizeObserverSize = entry.borderBoxSize[0];
681
+ width = resizeObserverSize.inlineSize;
682
+ height = resizeObserverSize.blockSize;
683
+ } else {
684
+ width = entry.contentRect.width;
685
+ height = entry.contentRect.height;
686
+ }
687
+ entry.target.$_vs_onResize(entry.target.$_vs_id, width, height);
422
688
  }
423
- }
689
+ }
690
+ });
424
691
  });
425
- })), {
692
+ }
693
+ return {
426
694
  vscrollData: this.vscrollData,
427
695
  vscrollParent: this,
428
696
  vscrollResizeObserver: this.$_resizeObserver
429
697
  };
430
698
  },
431
- inheritAttrs: !1,
699
+ inheritAttrs: false,
432
700
  props: {
433
701
  /*
434
702
  * The items to render.
@@ -437,7 +705,7 @@ const ye = {
437
705
  */
438
706
  items: {
439
707
  type: Array,
440
- required: !0
708
+ required: true
441
709
  },
442
710
  /*
443
711
  * Indicates if the items are dynamic.
@@ -446,7 +714,7 @@ const ye = {
446
714
  */
447
715
  dynamic: {
448
716
  type: Boolean,
449
- default: !1
717
+ default: false
450
718
  },
451
719
  /*
452
720
  * The key field to use for the items.
@@ -463,7 +731,7 @@ const ye = {
463
731
  direction: {
464
732
  type: String,
465
733
  default: "vertical",
466
- validator: (e) => ["vertical", "horizontal"].includes(e)
734
+ validator: (value) => ["vertical", "horizontal"].includes(value)
467
735
  },
468
736
  /*
469
737
  * The tag to use for the list.
@@ -491,113 +759,141 @@ const ye = {
491
759
  data() {
492
760
  return {
493
761
  vscrollData: {
494
- active: !0,
762
+ active: true,
495
763
  sizes: {},
496
764
  keyField: this.keyField,
497
- simpleArray: !1
765
+ simpleArray: false
498
766
  }
499
767
  };
500
768
  },
501
769
  computed: {
502
770
  simpleArray() {
503
- return this.items.length && typeof this.items[0] != "object";
771
+ return this.items.length && typeof this.items[0] !== "object";
504
772
  },
505
773
  itemsWithSize() {
506
- const e = [], { items: i, keyField: o, simpleArray: t } = this, z = this.vscrollData.sizes, u = i.length;
507
- for (let v = 0; v < u; v++) {
508
- const f = i[v], y = t ? v : f[o];
509
- let S = z[y];
510
- typeof S > "u" && !this.$_undefinedMap[y] && (S = 0), e.push({
511
- item: f,
512
- [o]: y,
513
- size: S
774
+ const result = [];
775
+ const { items, keyField, simpleArray } = this;
776
+ const sizes = this.vscrollData.sizes;
777
+ const l = items.length;
778
+ for (let i = 0; i < l; i++) {
779
+ const item = items[i];
780
+ const id = simpleArray ? i : item[keyField];
781
+ let size = sizes[id];
782
+ if (typeof size === "undefined" && !this.$_undefinedMap[id]) {
783
+ size = 0;
784
+ }
785
+ result.push({
786
+ item,
787
+ [keyField]: id,
788
+ size
514
789
  });
515
790
  }
516
- return e;
791
+ return result;
517
792
  }
518
793
  },
519
794
  watch: {
520
795
  simpleArray: {
521
- handler(e) {
522
- this.vscrollData.simpleArray = e;
796
+ handler(value) {
797
+ this.vscrollData.simpleArray = value;
523
798
  },
524
- immediate: !0
525
- },
526
- itemsWithSize(e, i) {
527
- const o = this.$el.scrollTop;
528
- let t = 0, z = 0;
529
- const u = Math.min(e.length, i.length);
530
- for (let f = 0; f < u && !(t >= o); f++)
531
- t += i[f].size || this.minItemSize, z += e[f].size || this.minItemSize;
532
- const v = z - t;
533
- v !== 0 && (this.$el.scrollTop += v);
799
+ immediate: true
800
+ },
801
+ itemsWithSize(next, prev) {
802
+ const scrollTop = this.$el.scrollTop;
803
+ let prevActiveTop = 0;
804
+ let activeTop = 0;
805
+ const length = Math.min(next.length, prev.length);
806
+ for (let i = 0; i < length; i++) {
807
+ if (prevActiveTop >= scrollTop) {
808
+ break;
809
+ }
810
+ prevActiveTop += prev[i].size || this.minItemSize;
811
+ activeTop += next[i].size || this.minItemSize;
812
+ }
813
+ const offset = activeTop - prevActiveTop;
814
+ if (offset === 0) {
815
+ return;
816
+ }
817
+ this.$el.scrollTop += offset;
534
818
  }
535
819
  },
536
820
  beforeCreate() {
537
- this.$_updates = [], this.$_undefinedSizes = 0, this.$_undefinedMap = {};
821
+ this.$_updates = [];
822
+ this.$_undefinedSizes = 0;
823
+ this.$_undefinedMap = {};
538
824
  },
539
825
  activated() {
540
- this.vscrollData.active = !0;
826
+ this.vscrollData.active = true;
541
827
  },
542
828
  deactivated() {
543
- this.vscrollData.active = !1;
829
+ this.vscrollData.active = false;
544
830
  },
545
831
  methods: {
546
832
  dynamicScrollerUpdateItems() {
547
- const e = this.$refs.scroller;
548
- e && e._updateVisibleItems(!0);
833
+ const scroller = this.$refs.scroller;
834
+ if (scroller)
835
+ scroller._updateVisibleItems(true);
549
836
  },
550
837
  dynamicScrollerUpdateItemsFromBottom() {
551
- const e = this.$refs.scroller;
552
- e && e._updateVisibleItems(!1, !0);
838
+ const scroller = this.$refs.scroller;
839
+ if (scroller)
840
+ scroller._updateVisibleItems(false, true);
553
841
  },
554
- scrollToItem(e) {
555
- const i = this.$refs.scroller;
556
- i && i.scrollToItem(e);
842
+ scrollToItem(index) {
843
+ const scroller = this.$refs.scroller;
844
+ if (scroller)
845
+ scroller.scrollToItem(index);
557
846
  },
558
847
  scrollToBottom() {
559
848
  if (this.$_scrollingToBottom)
560
849
  return;
561
- this.$_scrollingToBottom = !0;
562
- const e = this.$el;
850
+ this.$_scrollingToBottom = true;
851
+ const el = this.$el;
563
852
  this.$nextTick(() => {
564
- e.scrollTop = e.scrollHeight + 5e3;
565
- const i = () => {
566
- e.scrollTop = e.scrollHeight + 5e3, requestAnimationFrame(() => {
567
- e.scrollTop = e.scrollHeight + 5e3, this.$_undefinedSizes === 0 ? this.$_scrollingToBottom = !1 : requestAnimationFrame(i);
853
+ el.scrollTop = el.scrollHeight + 5e3;
854
+ const cb = () => {
855
+ el.scrollTop = el.scrollHeight + 5e3;
856
+ requestAnimationFrame(() => {
857
+ el.scrollTop = el.scrollHeight + 5e3;
858
+ if (this.$_undefinedSizes === 0) {
859
+ this.$_scrollingToBottom = false;
860
+ } else {
861
+ requestAnimationFrame(cb);
862
+ }
568
863
  });
569
864
  };
570
- requestAnimationFrame(i);
865
+ requestAnimationFrame(cb);
571
866
  });
572
867
  }
573
868
  }
574
869
  };
575
- function We(e, i, o, t, z, u) {
576
- const v = ue("dt-scroller-item"), f = ue("core-scroller");
577
- return O(), E(f, he({
870
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
871
+ const _component_dt_scroller_item = resolveComponent("dt-scroller-item");
872
+ const _component_core_scroller = resolveComponent("core-scroller");
873
+ return openBlock(), createBlock(_component_core_scroller, mergeProps({
578
874
  ref: "scroller",
579
- items: u.itemsWithSize,
580
- "min-item-size": o.minItemSize,
581
- direction: o.direction,
582
- "key-field": o.keyField,
583
- "list-tag": o.listTag,
584
- "item-tag": o.itemTag
585
- }, e.$attrs), {
586
- default: B(({ item: y, index: S, active: h }) => [
587
- Ve(v, {
588
- item: y,
589
- active: h,
875
+ items: $options.itemsWithSize,
876
+ "min-item-size": $props.minItemSize,
877
+ direction: $props.direction,
878
+ "key-field": $props.keyField,
879
+ "list-tag": $props.listTag,
880
+ "item-tag": $props.itemTag
881
+ }, _ctx.$attrs), {
882
+ default: withCtx(({ item: itemWithSize, index, active }) => [
883
+ createVNode(_component_dt_scroller_item, {
884
+ item: itemWithSize,
885
+ active,
590
886
  "size-dependencies": [
591
- y.message
887
+ itemWithSize.message
592
888
  ],
593
- "data-index": S
889
+ "data-index": index
594
890
  }, {
595
- default: B(() => [
596
- X(e.$slots, "default", pe(ve({
597
- item: y.item,
598
- index: S,
599
- active: h,
600
- itemWithSize: y
891
+ default: withCtx(() => [
892
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
893
+ item: itemWithSize.item,
894
+ index,
895
+ active,
896
+ itemWithSize
601
897
  })))
602
898
  ]),
603
899
  _: 2
@@ -606,7 +902,8 @@ function We(e, i, o, t, z, u) {
606
902
  _: 3
607
903
  }, 16, ["items", "min-item-size", "direction", "key-field", "list-tag", "item-tag"]);
608
904
  }
609
- const Ce = /* @__PURE__ */ He(Ne, [["render", We]]), Le = {
905
+ const DynamicScroller = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
906
+ const _sfc_main = {
610
907
  __name: "DtScroller",
611
908
  props: {
612
909
  /**
@@ -616,7 +913,7 @@ const Ce = /* @__PURE__ */ He(Ne, [["render", We]]), Le = {
616
913
  direction: {
617
914
  type: String,
618
915
  default: "vertical",
619
- validator: (e) => ["vertical", "horizontal"].includes(e)
916
+ validator: (value) => ["vertical", "horizontal"].includes(value)
620
917
  },
621
918
  /**
622
919
  * Indicates if the items need to react to changes in their size.
@@ -627,7 +924,7 @@ const Ce = /* @__PURE__ */ He(Ne, [["render", We]]), Le = {
627
924
  */
628
925
  dynamic: {
629
926
  type: Boolean,
630
- default: !1
927
+ default: false
631
928
  },
632
929
  /**
633
930
  * Display height (or width in horizontal mode) of the items in pixels
@@ -654,7 +951,7 @@ const Ce = /* @__PURE__ */ He(Ne, [["render", We]]), Le = {
654
951
  */
655
952
  items: {
656
953
  type: Array,
657
- required: !0
954
+ required: true
658
955
  },
659
956
  /**
660
957
  * The key field to use for the items.
@@ -706,63 +1003,89 @@ const Ce = /* @__PURE__ */ He(Ne, [["render", We]]), Le = {
706
1003
  */
707
1004
  "user-position"
708
1005
  ],
709
- setup(e, { expose: i, emit: o }) {
710
- const t = e;
711
- Me("emit", o);
712
- const u = U(null), v = j(() => ({
713
- width: typeof t.scrollerWidth == "number" ? `${t.scrollerWidth}px` : t.scrollerWidth,
714
- height: typeof t.scrollerHeight == "number" ? `${t.scrollerHeight}px` : t.scrollerHeight
715
- }));
716
- me(t, () => {
717
- x();
718
- }, { deep: !0, immediate: !0 });
719
- function f() {
720
- u.value && u.value.scrollToBottom();
1006
+ setup(__props, { expose: __expose, emit: __emit }) {
1007
+ const props = __props;
1008
+ const emits = __emit;
1009
+ provide("emit", emits);
1010
+ const scroller = ref(null);
1011
+ const computedStyle = computed(() => {
1012
+ return {
1013
+ width: typeof props.scrollerWidth === "number" ? `${props.scrollerWidth}px` : props.scrollerWidth,
1014
+ height: typeof props.scrollerHeight === "number" ? `${props.scrollerHeight}px` : props.scrollerHeight
1015
+ };
1016
+ });
1017
+ watch(props, () => {
1018
+ validateProps();
1019
+ }, { deep: true, immediate: true });
1020
+ function scrollToBottom() {
1021
+ if (scroller.value)
1022
+ scroller.value.scrollToBottom();
721
1023
  }
722
- function y(w) {
723
- u.value && u.value.scrollToItem(w);
1024
+ function scrollToItem(index) {
1025
+ if (scroller.value)
1026
+ scroller.value.scrollToItem(index);
724
1027
  }
725
- function S() {
726
- u.value && (t.dynamic ? u.value.dynamicScrollerUpdateItems() : u.value._updateVisibleItems(!0));
1028
+ function updateItems() {
1029
+ if (!scroller.value)
1030
+ return;
1031
+ if (props.dynamic) {
1032
+ scroller.value.dynamicScrollerUpdateItems();
1033
+ } else {
1034
+ scroller.value._updateVisibleItems(true);
1035
+ }
727
1036
  }
728
- function h() {
729
- u.value && (t.dynamic ? u.value.dynamicScrollerUpdateItemsFromBottom() : u.value._updateVisibleItems(!1, !0));
1037
+ function updateItemsFromBottom() {
1038
+ if (!scroller.value)
1039
+ return;
1040
+ if (props.dynamic) {
1041
+ scroller.value.dynamicScrollerUpdateItemsFromBottom();
1042
+ } else {
1043
+ scroller.value._updateVisibleItems(false, true);
1044
+ }
730
1045
  }
731
- function x() {
732
- t.dynamic && !t.minItemSize && console.error("scroller error: 'minItemSize' is required on 'dynamic' mode."), !t.dynamic && !t.itemSize && console.error("scroller error: 'itemSize' is required.");
1046
+ function validateProps() {
1047
+ if (props.dynamic && !props.minItemSize) {
1048
+ console.error("scroller error: 'minItemSize' is required on 'dynamic' mode.");
1049
+ }
1050
+ if (!props.dynamic && !props.itemSize) {
1051
+ console.error("scroller error: 'itemSize' is required.");
1052
+ }
733
1053
  }
734
- return i({
735
- scrollToBottom: f,
736
- scrollToItem: y,
737
- updateItems: S,
738
- updateItemsFromBottom: h
739
- }), (w, F) => (O(), E(Y(e.dynamic ? Ce : ye), {
740
- ref_key: "scroller",
741
- ref: u,
742
- "data-qa": "dt-scroller",
743
- items: e.items,
744
- "item-size": e.itemSize,
745
- "min-item-size": e.minItemSize,
746
- direction: e.direction,
747
- "key-field": e.keyField,
748
- "list-tag": e.listTag,
749
- "item-tag": e.itemTag,
750
- style: fe(v.value),
751
- tabindex: "0",
752
- onUserPosition: F[0] || (F[0] = (A) => w.$emit("user-position", A))
753
- }, {
754
- default: B(({ item: A, index: V, active: M }) => [
755
- X(w.$slots, "default", pe(ve({
756
- item: A,
757
- index: V,
758
- active: M
759
- })))
760
- ]),
761
- _: 3
762
- }, 40, ["items", "item-size", "min-item-size", "direction", "key-field", "list-tag", "item-tag", "style"]));
1054
+ __expose({
1055
+ scrollToBottom,
1056
+ scrollToItem,
1057
+ updateItems,
1058
+ updateItemsFromBottom
1059
+ });
1060
+ return (_ctx, _cache) => {
1061
+ return openBlock(), createBlock(resolveDynamicComponent(__props.dynamic ? DynamicScroller : _sfc_main$3), {
1062
+ ref_key: "scroller",
1063
+ ref: scroller,
1064
+ "data-qa": "dt-scroller",
1065
+ items: __props.items,
1066
+ "item-size": __props.itemSize,
1067
+ "min-item-size": __props.minItemSize,
1068
+ direction: __props.direction,
1069
+ "key-field": __props.keyField,
1070
+ "list-tag": __props.listTag,
1071
+ "item-tag": __props.itemTag,
1072
+ style: normalizeStyle(computedStyle.value),
1073
+ tabindex: "0",
1074
+ onUserPosition: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("user-position", $event))
1075
+ }, {
1076
+ default: withCtx(({ item, index, active }) => [
1077
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
1078
+ item,
1079
+ index,
1080
+ active
1081
+ })))
1082
+ ]),
1083
+ _: 3
1084
+ }, 40, ["items", "item-size", "min-item-size", "direction", "key-field", "list-tag", "item-tag", "style"]);
1085
+ };
763
1086
  }
764
1087
  };
765
1088
  export {
766
- Le as DtScroller
1089
+ _sfc_main as DtScroller
767
1090
  };
768
1091
  //# sourceMappingURL=scroller.js.map