vft 0.0.74 → 0.0.77

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 (373) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/es/component.js +67 -48
  4. package/es/components/affix/affix.js +45 -0
  5. package/es/components/affix/affix.vue.js +4 -0
  6. package/es/components/affix/affix.vue2.js +83 -0
  7. package/es/components/affix/index.js +12 -0
  8. package/es/components/affix/style/css.js +2 -0
  9. package/es/components/affix/style/index.js +2 -0
  10. package/es/components/back-top/back-top.vue2.js +10 -2
  11. package/es/components/button/button.vue2.js +58 -59
  12. package/es/components/button/use-button.js +26 -20
  13. package/es/components/card/card.vue.js +4 -0
  14. package/es/components/card/card.vue2.js +44 -0
  15. package/es/components/card/index.js +12 -0
  16. package/es/components/card/instance.js +1 -0
  17. package/es/components/card/style/css.js +2 -0
  18. package/es/components/card/style/index.js +2 -0
  19. package/es/components/check-tag/check-tag.vue.js +4 -0
  20. package/es/components/check-tag/check-tag.vue2.js +35 -0
  21. package/es/components/check-tag/index.js +12 -0
  22. package/es/components/check-tag/style/css.js +2 -0
  23. package/es/components/check-tag/style/index.js +2 -0
  24. package/es/components/color-picker/color-picker.vue2.js +1 -1
  25. package/es/components/context-menu/context-menu.vue2.js +10 -2
  26. package/es/components/date-picker/composables/use-month-range-header.js +1 -1
  27. package/es/components/date-picker/constants.js +16 -2
  28. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +37 -34
  29. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +0 -1
  30. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +177 -178
  31. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +328 -336
  32. package/es/components/date-picker/date-picker.js +18 -18
  33. package/es/components/date-picker/index.js +5 -4
  34. package/es/components/date-picker/props/shared.js +1 -1
  35. package/es/components/date-time-select/date-time-select.vue2.js +59 -59
  36. package/es/components/dialog/dialog.vue2.js +12 -12
  37. package/es/components/dialog/hooks/use-dialog.js +4 -4
  38. package/es/components/dropdown/dropdown-menu.vue2.js +4 -4
  39. package/es/components/footer-layout/footer-layout.vue2.js +10 -2
  40. package/es/components/header-layout/header-layout.vue2.js +10 -2
  41. package/es/components/horizontal-menu/constants.js +4 -0
  42. package/es/components/horizontal-menu/horizontal-menu.vue2.js +153 -86
  43. package/es/components/horizontal-menu/index.js +7 -5
  44. package/es/components/horizontal-menu/style/css.js +3 -0
  45. package/es/components/horizontal-menu/style/index.js +3 -0
  46. package/es/components/index.js +228 -194
  47. package/es/components/md-container/md-container.vue2.js +10 -2
  48. package/es/components/menu/menu-item.vue2.js +58 -58
  49. package/es/components/menu/menu.vue2.js +72 -68
  50. package/es/components/menu/style/css.js +3 -0
  51. package/es/components/menu/style/index.js +3 -0
  52. package/es/components/menu/sub-menu.vue2.js +139 -117
  53. package/es/components/multiple-tabs/multiple-tabs.vue2.js +35 -26
  54. package/es/components/option/style/css.js +2 -0
  55. package/es/components/option/style/index.js +2 -0
  56. package/es/components/option-group/style/css.js +2 -0
  57. package/es/components/option-group/style/index.js +2 -0
  58. package/es/components/popconfirm/index.js +12 -0
  59. package/es/components/popconfirm/popconfirm.vue.js +4 -0
  60. package/es/components/popconfirm/popconfirm.vue2.js +112 -0
  61. package/es/components/popconfirm/style/css.js +6 -0
  62. package/es/components/popconfirm/style/index.js +6 -0
  63. package/es/components/result/result.vue2.js +10 -2
  64. package/es/components/roving-focus-group/roving-focus-item.vue2.js +1 -1
  65. package/es/components/select/index.js +22 -0
  66. package/es/components/select/option-group.vue.js +25 -0
  67. package/es/components/select/option-group.vue2.js +53 -0
  68. package/es/components/select/option.vue.js +27 -0
  69. package/es/components/select/option.vue2.js +58 -0
  70. package/es/components/select/options.js +34 -0
  71. package/es/components/select/select-dropdown.vue.js +15 -0
  72. package/es/components/select/select-dropdown.vue2.js +32 -0
  73. package/es/components/select/select.vue.js +327 -0
  74. package/es/components/select/select.vue2.js +348 -0
  75. package/es/components/select/style/css.js +8 -0
  76. package/es/components/select/style/index.js +8 -0
  77. package/es/components/select/token.js +5 -0
  78. package/es/components/select/useOption.js +71 -0
  79. package/es/components/select/useSelect.js +414 -0
  80. package/es/components/select-v2/select-dropdown.js +1 -1
  81. package/es/components/select-v2/useSelect.js +269 -269
  82. package/es/components/side-menu/side-menu.vue2.js +153 -142
  83. package/es/components/side-menu/style/css.js +3 -0
  84. package/es/components/side-menu/style/index.js +3 -0
  85. package/es/components/skeleton/index.js +16 -0
  86. package/es/components/skeleton/skeleton-item.vue.js +4 -0
  87. package/es/components/skeleton/skeleton-item.vue2.js +31 -0
  88. package/es/components/skeleton/skeleton.vue.js +4 -0
  89. package/es/components/skeleton/skeleton.vue2.js +55 -0
  90. package/es/components/skeleton/style/css.js +3 -0
  91. package/es/components/skeleton/style/index.js +3 -0
  92. package/es/components/skeleton-item/style/css.js +2 -0
  93. package/es/components/skeleton-item/style/index.js +2 -0
  94. package/es/components/space/index.js +17 -0
  95. package/es/components/space/item.js +24 -0
  96. package/es/components/space/space.js +182 -0
  97. package/es/components/space/style/css.js +2 -0
  98. package/es/components/space/style/index.js +2 -0
  99. package/es/components/space/use-space.js +44 -0
  100. package/es/components/switch/switch.vue2.js +1 -1
  101. package/es/components/tabs/tab-nav.vue2.js +30 -22
  102. package/es/components/tabs/tabs.vue2.js +37 -37
  103. package/es/components/time-picker/common/picker.vue2.js +241 -257
  104. package/es/components/time-picker/common/props.js +10 -6
  105. package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +1 -1
  106. package/es/components/time-picker/time-picker.js +10 -10
  107. package/es/components/time-select/time-select.vue2.js +38 -42
  108. package/es/components/tooltip/content.vue2.js +1 -1
  109. package/es/components/tree/index.js +14 -0
  110. package/es/components/tree/model/node.js +248 -0
  111. package/es/components/tree/model/tree-store.js +197 -0
  112. package/es/components/tree/model/useDragNode.js +71 -0
  113. package/es/components/tree/model/useKeydown.js +81 -0
  114. package/es/components/tree/model/useNodeExpandEventBroadcast.js +19 -0
  115. package/es/components/tree/model/util.js +21 -0
  116. package/es/components/tree/style/css.js +3 -0
  117. package/es/components/tree/style/index.js +3 -0
  118. package/es/components/tree/tree-node-content.vue.js +4 -0
  119. package/es/components/tree/tree-node-content.vue2.js +28 -0
  120. package/es/components/tree/tree-node.vue.js +98 -0
  121. package/es/components/tree/tree-node.vue2.js +152 -0
  122. package/es/components/tree/tree.type.js +1 -0
  123. package/es/components/tree/tree.vue.js +48 -0
  124. package/es/components/tree/tree.vue2.js +268 -0
  125. package/es/components/tree-select/cache-options.js +32 -0
  126. package/es/components/tree-select/index.js +9 -0
  127. package/es/components/tree-select/select.js +38 -0
  128. package/es/components/tree-select/style/css.js +11 -0
  129. package/es/components/tree-select/style/index.js +11 -0
  130. package/es/components/tree-select/tree-select-option.js +21 -0
  131. package/es/components/tree-select/tree-select.vue.js +4 -0
  132. package/es/components/tree-select/tree-select.vue2.js +81 -0
  133. package/es/components/tree-select/tree.js +137 -0
  134. package/es/components/tree-select/utils.js +45 -0
  135. package/es/hooks/index.js +25 -21
  136. package/es/hooks/use-focus/index.js +9 -0
  137. package/es/hooks/use-throttle-render/index.js +21 -0
  138. package/es/index.js +408 -368
  139. package/es/package.json.js +1 -1
  140. package/es/utils/helper.js +5 -2
  141. package/es/utils/index.js +48 -46
  142. package/lib/component.cjs +1 -1
  143. package/lib/components/affix/affix.cjs +1 -0
  144. package/lib/components/affix/affix.vue.cjs +1 -0
  145. package/lib/components/affix/affix.vue2.cjs +1 -0
  146. package/lib/components/affix/index.cjs +1 -0
  147. package/lib/components/affix/style/css.cjs +1 -0
  148. package/lib/components/affix/style/index.cjs +1 -0
  149. package/lib/components/back-top/back-top.vue2.cjs +1 -1
  150. package/lib/components/button/button.vue2.cjs +1 -1
  151. package/lib/components/button/use-button.cjs +1 -1
  152. package/lib/components/card/card.vue.cjs +1 -0
  153. package/lib/components/card/card.vue2.cjs +1 -0
  154. package/lib/components/card/index.cjs +1 -0
  155. package/lib/components/card/instance.cjs +1 -0
  156. package/lib/components/card/style/css.cjs +1 -0
  157. package/lib/components/card/style/index.cjs +1 -0
  158. package/lib/components/check-tag/check-tag.vue.cjs +1 -0
  159. package/lib/components/check-tag/check-tag.vue2.cjs +1 -0
  160. package/lib/components/check-tag/index.cjs +1 -0
  161. package/lib/components/check-tag/style/css.cjs +1 -0
  162. package/lib/components/check-tag/style/index.cjs +1 -0
  163. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  164. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  165. package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
  166. package/lib/components/date-picker/constants.cjs +1 -1
  167. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  168. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  169. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  170. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  171. package/lib/components/date-picker/date-picker.cjs +1 -1
  172. package/lib/components/date-picker/index.cjs +1 -1
  173. package/lib/components/date-picker/props/shared.cjs +1 -1
  174. package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
  175. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  176. package/lib/components/dialog/hooks/use-dialog.cjs +1 -1
  177. package/lib/components/dropdown/dropdown-menu.vue2.cjs +1 -1
  178. package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
  179. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  180. package/lib/components/horizontal-menu/constants.cjs +1 -0
  181. package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
  182. package/lib/components/horizontal-menu/index.cjs +1 -1
  183. package/lib/components/horizontal-menu/style/css.cjs +1 -1
  184. package/lib/components/horizontal-menu/style/index.cjs +1 -1
  185. package/lib/components/index.cjs +1 -1
  186. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  187. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  188. package/lib/components/menu/menu.vue2.cjs +1 -1
  189. package/lib/components/menu/style/css.cjs +1 -1
  190. package/lib/components/menu/style/index.cjs +1 -1
  191. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  192. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  193. package/lib/components/option/style/css.cjs +1 -0
  194. package/lib/components/option/style/index.cjs +1 -0
  195. package/lib/components/option-group/style/css.cjs +1 -0
  196. package/lib/components/option-group/style/index.cjs +1 -0
  197. package/lib/components/popconfirm/index.cjs +1 -0
  198. package/lib/components/popconfirm/popconfirm.vue.cjs +1 -0
  199. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -0
  200. package/lib/components/popconfirm/style/css.cjs +1 -0
  201. package/lib/components/popconfirm/style/index.cjs +1 -0
  202. package/lib/components/result/result.vue2.cjs +1 -1
  203. package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
  204. package/lib/components/select/index.cjs +1 -0
  205. package/lib/components/select/option-group.vue.cjs +1 -0
  206. package/lib/components/select/option-group.vue2.cjs +1 -0
  207. package/lib/components/select/option.vue.cjs +1 -0
  208. package/lib/components/select/option.vue2.cjs +1 -0
  209. package/lib/components/select/options.cjs +1 -0
  210. package/lib/components/select/select-dropdown.vue.cjs +1 -0
  211. package/lib/components/select/select-dropdown.vue2.cjs +1 -0
  212. package/lib/components/select/select.vue.cjs +1 -0
  213. package/lib/components/select/select.vue2.cjs +1 -0
  214. package/lib/components/select/style/css.cjs +1 -0
  215. package/lib/components/select/style/index.cjs +1 -0
  216. package/lib/components/select/token.cjs +1 -0
  217. package/lib/components/select/useOption.cjs +1 -0
  218. package/lib/components/select/useSelect.cjs +1 -0
  219. package/lib/components/select-v2/select-dropdown.cjs +1 -1
  220. package/lib/components/select-v2/useSelect.cjs +1 -1
  221. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  222. package/lib/components/side-menu/style/css.cjs +1 -1
  223. package/lib/components/side-menu/style/index.cjs +1 -1
  224. package/lib/components/skeleton/index.cjs +1 -0
  225. package/lib/components/skeleton/skeleton-item.vue.cjs +1 -0
  226. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -0
  227. package/lib/components/skeleton/skeleton.vue.cjs +1 -0
  228. package/lib/components/skeleton/skeleton.vue2.cjs +1 -0
  229. package/lib/components/skeleton/style/css.cjs +1 -0
  230. package/lib/components/skeleton/style/index.cjs +1 -0
  231. package/lib/components/skeleton-item/style/css.cjs +1 -0
  232. package/lib/components/skeleton-item/style/index.cjs +1 -0
  233. package/lib/components/space/index.cjs +1 -0
  234. package/lib/components/space/item.cjs +1 -0
  235. package/lib/components/space/space.cjs +1 -0
  236. package/lib/components/space/style/css.cjs +1 -0
  237. package/lib/components/space/style/index.cjs +1 -0
  238. package/lib/components/space/use-space.cjs +1 -0
  239. package/lib/components/switch/switch.vue2.cjs +1 -1
  240. package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
  241. package/lib/components/tabs/tabs.vue2.cjs +1 -1
  242. package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
  243. package/lib/components/time-picker/common/props.cjs +1 -1
  244. package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
  245. package/lib/components/time-picker/time-picker.cjs +1 -1
  246. package/lib/components/time-select/time-select.vue2.cjs +1 -1
  247. package/lib/components/tooltip/content.vue2.cjs +1 -1
  248. package/lib/components/tree/index.cjs +1 -0
  249. package/lib/components/tree/model/node.cjs +1 -0
  250. package/lib/components/tree/model/tree-store.cjs +1 -0
  251. package/lib/components/tree/model/useDragNode.cjs +1 -0
  252. package/lib/components/tree/model/useKeydown.cjs +1 -0
  253. package/lib/components/tree/model/useNodeExpandEventBroadcast.cjs +1 -0
  254. package/lib/components/tree/model/util.cjs +1 -0
  255. package/lib/components/tree/style/css.cjs +1 -0
  256. package/lib/components/tree/style/index.cjs +1 -0
  257. package/lib/components/tree/tree-node-content.vue.cjs +1 -0
  258. package/lib/components/tree/tree-node-content.vue2.cjs +1 -0
  259. package/lib/components/tree/tree-node.vue.cjs +1 -0
  260. package/lib/components/tree/tree-node.vue2.cjs +1 -0
  261. package/lib/components/tree/tree.type.cjs +1 -0
  262. package/lib/components/tree/tree.vue.cjs +1 -0
  263. package/lib/components/tree/tree.vue2.cjs +1 -0
  264. package/lib/components/tree-select/cache-options.cjs +1 -0
  265. package/lib/components/tree-select/index.cjs +1 -0
  266. package/lib/components/tree-select/select.cjs +1 -0
  267. package/lib/components/tree-select/style/css.cjs +1 -0
  268. package/lib/components/tree-select/style/index.cjs +1 -0
  269. package/lib/components/tree-select/tree-select-option.cjs +1 -0
  270. package/lib/components/tree-select/tree-select.vue.cjs +1 -0
  271. package/lib/components/tree-select/tree-select.vue2.cjs +1 -0
  272. package/lib/components/tree-select/tree.cjs +1 -0
  273. package/lib/components/tree-select/utils.cjs +1 -0
  274. package/lib/hooks/index.cjs +1 -1
  275. package/lib/hooks/use-focus/index.cjs +1 -0
  276. package/lib/hooks/use-throttle-render/index.cjs +1 -0
  277. package/lib/index.cjs +1 -1
  278. package/lib/package.json.cjs +1 -1
  279. package/lib/utils/helper.cjs +1 -1
  280. package/lib/utils/index.cjs +1 -1
  281. package/package.json +2 -2
  282. package/tags.json +1 -1
  283. package/theme-style/base.css +1 -1
  284. package/theme-style/index.css +1 -1
  285. package/theme-style/src/alert.scss +1 -1
  286. package/theme-style/src/autocomplete.scss +2 -2
  287. package/theme-style/src/breadcrumb.scss +4 -4
  288. package/theme-style/src/calendar.scss +2 -2
  289. package/theme-style/src/card.scss +1 -1
  290. package/theme-style/src/carousel.scss +1 -1
  291. package/theme-style/src/cascader.scss +3 -3
  292. package/theme-style/src/check-tag.scss +3 -3
  293. package/theme-style/src/checkbox.scss +1 -1
  294. package/theme-style/src/color-picker.scss +2 -2
  295. package/theme-style/src/common/var.scss +527 -521
  296. package/theme-style/src/date-picker/date-picker.scss +1 -1
  297. package/theme-style/src/date-picker/date-range-picker.scss +2 -2
  298. package/theme-style/src/date-picker/date-table.scss +1 -1
  299. package/theme-style/src/date-picker/month-table.scss +2 -2
  300. package/theme-style/src/date-picker/picker-panel.scss +4 -5
  301. package/theme-style/src/date-picker/picker.scss +7 -9
  302. package/theme-style/src/date-picker/time-picker.scss +2 -2
  303. package/theme-style/src/date-picker/time-spinner.scss +6 -8
  304. package/theme-style/src/date-picker/year-table.scss +3 -3
  305. package/theme-style/src/date-time-select.scss +3 -4
  306. package/theme-style/src/descriptions-item.scss +4 -4
  307. package/theme-style/src/descriptions.scss +2 -2
  308. package/theme-style/src/header-layout.scss +1 -1
  309. package/theme-style/src/horizontal-menu.scss +27 -39
  310. package/theme-style/src/image-viewer.scss +1 -1
  311. package/theme-style/src/index.scss +3 -0
  312. package/theme-style/src/input-number.scss +1 -1
  313. package/theme-style/src/menu.scss +76 -66
  314. package/theme-style/src/mixins/_var.scss +2 -2
  315. package/theme-style/src/mixins/mixins.scss +2 -2
  316. package/theme-style/src/popconfirm.scss +16 -0
  317. package/theme-style/src/popper.scss +4 -2
  318. package/theme-style/src/progress.scss +1 -1
  319. package/theme-style/src/reset.scss +3 -3
  320. package/theme-style/src/result.scss +2 -2
  321. package/theme-style/src/select-dropdown-v2.scss +1 -1
  322. package/theme-style/src/select-dropdown.scss +1 -1
  323. package/theme-style/src/select-v2.scss +2 -2
  324. package/theme-style/src/select.scss +4 -5
  325. package/theme-style/src/skeleton-item.scss +83 -0
  326. package/theme-style/src/skeleton.scss +44 -0
  327. package/theme-style/src/step.scss +10 -10
  328. package/theme-style/src/tabs.scss +15 -155
  329. package/theme-style/src/timeline-item.scss +2 -2
  330. package/theme-style/src/transfer.scss +5 -5
  331. package/theme-style/src/tree.scss +2 -5
  332. package/theme-style/src/upload.scss +11 -11
  333. package/theme-style/src/var.scss +1 -1
  334. package/theme-style/vft-alert.css +1 -1
  335. package/theme-style/vft-autocomplete.css +1 -1
  336. package/theme-style/vft-breadcrumb.css +1 -1
  337. package/theme-style/vft-calendar.css +1 -1
  338. package/theme-style/vft-card.css +1 -1
  339. package/theme-style/vft-carousel.css +1 -1
  340. package/theme-style/vft-cascader.css +1 -1
  341. package/theme-style/vft-check-tag.css +1 -1
  342. package/theme-style/vft-checkbox.css +1 -1
  343. package/theme-style/vft-color-picker.css +1 -1
  344. package/theme-style/vft-date-picker.css +1 -1
  345. package/theme-style/vft-date-time-select.css +1 -1
  346. package/theme-style/vft-descriptions-item.css +1 -1
  347. package/theme-style/vft-descriptions.css +1 -1
  348. package/theme-style/vft-header-layout.css +1 -1
  349. package/theme-style/vft-horizontal-menu.css +1 -1
  350. package/theme-style/vft-image-viewer.css +1 -1
  351. package/theme-style/vft-input-number.css +1 -1
  352. package/theme-style/vft-menu.css +1 -1
  353. package/theme-style/vft-popconfirm.css +1 -0
  354. package/theme-style/vft-popper.css +1 -1
  355. package/theme-style/vft-progress.css +1 -1
  356. package/theme-style/vft-reset.css +1 -1
  357. package/theme-style/vft-result.css +1 -1
  358. package/theme-style/vft-select-dropdown-v2.css +1 -1
  359. package/theme-style/vft-select-dropdown.css +1 -1
  360. package/theme-style/vft-select-v2.css +1 -1
  361. package/theme-style/vft-select.css +1 -1
  362. package/theme-style/vft-skeleton-item.css +1 -0
  363. package/theme-style/vft-skeleton.css +1 -0
  364. package/theme-style/vft-step.css +1 -1
  365. package/theme-style/vft-tabs.css +1 -1
  366. package/theme-style/vft-time-picker.css +1 -1
  367. package/theme-style/vft-time-select.css +1 -1
  368. package/theme-style/vft-timeline-item.css +1 -1
  369. package/theme-style/vft-transfer.css +1 -1
  370. package/theme-style/vft-tree.css +1 -1
  371. package/theme-style/vft-upload.css +1 -1
  372. package/theme-style/vft-var.css +1 -1
  373. package/web-types.json +1 -1
@@ -1,28 +1,28 @@
1
- import { reactive as ke, ref as f, computed as o, watch as T, nextTick as g, onMounted as Ge } from "vue";
2
- import { isArray as _, isFunction as ie, isObject as z } from "@vft/utils";
3
- import { isNil as oe, debounce as $e, isEqual as se, get as S } from "lodash";
4
- import { useResizeObserver as je } from "@vueuse/core";
5
- import { useNamespace as ce } from "../../hooks/use-namespace/index.js";
1
+ import { reactive as qe, ref as d, computed as i, watch as L, nextTick as v, onMounted as ke } from "vue";
2
+ import { isArray as D, isFunction as ae, isObject as _ } from "@vft/utils";
3
+ import { isNil as ie, debounce as Ge, isEqual as oe, get as x } from "lodash";
4
+ import { useResizeObserver as $e } from "@vueuse/core";
5
+ import { useNamespace as se } from "../../hooks/use-namespace/index.js";
6
6
  import "@popperjs/core";
7
7
  import "../../hooks/use-z-index/index.js";
8
- import { debugWarn as Je } from "../../utils/error.js";
9
- import { escapeStringRegexp as Xe } from "../../utils/vue/data-helper.js";
8
+ import { debugWarn as je } from "../../utils/error.js";
9
+ import { escapeStringRegexp as Je } from "../../utils/vue/data-helper.js";
10
+ import { UPDATE_MODEL_EVENT as Xe, CHANGE_EVENT as Ye } from "../../constants/event.js";
10
11
  import "../../utils/ns-cover.js";
11
- import { UPDATE_MODEL_EVENT as Ye, CHANGE_EVENT as Ze } from "../../constants/event.js";
12
12
  import "../form/index.js";
13
- import { useAllowCreate as et } from "./useAllowCreate.js";
14
- import { flattenOptions as tt } from "./util.js";
15
- import { useInput as lt } from "./useInput.js";
16
- import { useFormItem as nt } from "../form/hooks/use-form-item.js";
17
- import { useFormSize as at } from "../form/hooks/use-form-common-props.js";
18
- const de = "", re = 11, ut = {
13
+ import { useAllowCreate as Ze } from "./useAllowCreate.js";
14
+ import { flattenOptions as et } from "./util.js";
15
+ import { useInput as tt } from "./useInput.js";
16
+ import { useFormItem as lt } from "../form/hooks/use-form-item.js";
17
+ import { useFormSize as nt } from "../form/hooks/use-form-common-props.js";
18
+ const ce = "", re = 11, ut = {
19
19
  larget: 51,
20
20
  default: 42,
21
21
  small: 33
22
- }, St = (n, m) => {
23
- const K = ce("select-v2"), fe = ce("input"), { form: R, formItem: h } = nt(), l = ke({
24
- inputValue: de,
25
- displayInputValue: de,
22
+ }, xt = (l, g) => {
23
+ const z = se("select-v2"), de = se("input"), { form: T, formItem: f } = lt(), t = qe({
24
+ inputValue: ce,
25
+ displayInputValue: ce,
26
26
  calculatedWidth: 0,
27
27
  cachedPlaceholder: "",
28
28
  cachedOptions: [],
@@ -44,315 +44,315 @@ const de = "", re = 11, ut = {
44
44
  selectedLabel: "",
45
45
  softFocus: !1,
46
46
  tagInMultiLine: !1
47
- }), he = f(-1), U = f(-1), ve = f(null), v = f(null), E = f(null), b = f(null), C = f(null), O = f(null), I = f(null), s = f(!1), y = o(() => n.disabled || (R == null ? void 0 : R.disabled)), ge = o(() => {
48
- const e = c.value.length * 34;
49
- return e > n.height ? n.height : e;
50
- }), M = o(() => !oe(n.modelValue)), me = o(() => {
51
- const e = n.multiple ? Array.isArray(n.modelValue) && n.modelValue.length > 0 : M.value;
52
- return n.clearable && !y.value && l.comboBoxHovering && e;
53
- }), F = o(
54
- () => n.remote && n.filterable ? "" : "ico-ep:arrow-up"
55
- ), Ve = o(
56
- () => F.value && K.is("reverse", s.value)
57
- ), pe = o(() => (h == null ? void 0 : h.validateState) || ""), be = "validateIcon", Q = o(() => n.remote ? 300 : 0), W = o(() => {
58
- const e = c.value;
59
- return n.loading ? n.loadingText || t("el.select.loading") : n.remote && l.inputValue === "" && e.length === 0 ? !1 : n.filterable && l.inputValue && e.length > 0 ? n.noMatchText || t("el.select.noMatch") : e.length === 0 ? n.noDataText || t("el.select.noData") : null;
60
- }), c = o(() => {
61
- const e = (a) => {
62
- const u = l.inputValue, i = new RegExp(Xe(u), "i");
63
- return u ? i.test(a.label || "") : !0;
47
+ }), fe = d(-1), K = d(-1), he = d(null), h = d(null), R = d(null), b = d(null), S = d(null), C = d(null), p = d(null), o = d(!1), I = i(() => l.disabled || (T == null ? void 0 : T.disabled)), ve = i(() => {
48
+ const e = s.value.length * 34;
49
+ return e > l.height ? l.height : e;
50
+ }), E = i(() => !ie(l.modelValue)), ge = i(() => {
51
+ const e = l.multiple ? Array.isArray(l.modelValue) && l.modelValue.length > 0 : E.value;
52
+ return l.clearable && !I.value && t.comboBoxHovering && e;
53
+ }), U = i(
54
+ () => l.remote && l.filterable ? "" : "ico-ep:arrow-up"
55
+ ), me = i(
56
+ () => U.value && z.is("reverse", o.value)
57
+ ), Ve = i(() => (f == null ? void 0 : f.validateState) || ""), be = "validateIcon", F = i(() => l.remote ? 300 : 0), M = i(() => {
58
+ const e = s.value;
59
+ return l.loading ? l.loadingText || "加载中" : l.remote && t.inputValue === "" && e.length === 0 ? !1 : l.filterable && t.inputValue && e.length > 0 ? l.noMatchText || "无匹配数据" : e.length === 0 ? l.noDataText || "暂无数据" : null;
60
+ }), s = i(() => {
61
+ const e = (n) => {
62
+ const u = t.inputValue, a = new RegExp(Je(u), "i");
63
+ return u ? a.test(n.label || "") : !0;
64
64
  };
65
- return n.loading ? [] : tt(
65
+ return l.loading ? [] : et(
66
66
  // @ts-ignore
67
- n.options.concat(l.createdOptions).map((a) => {
68
- if (_(a.options)) {
69
- const u = a.options.filter(e);
67
+ l.options.concat(t.createdOptions).map((n) => {
68
+ if (D(n.options)) {
69
+ const u = n.options.filter(e);
70
70
  if (u.length > 0)
71
71
  return {
72
- ...a,
72
+ ...n,
73
73
  options: u
74
74
  };
75
- } else if (n.remote || e(a))
76
- return a;
75
+ } else if (l.remote || e(n))
76
+ return n;
77
77
  return null;
78
- }).filter((a) => a !== null)
78
+ }).filter((n) => n !== null)
79
79
  );
80
- }), Ie = o(
81
- () => c.value.every((e) => e.disabled)
82
- ), q = at(), k = o(
83
- () => q.value === "small" ? "small" : "default"
84
- ), ye = o(() => {
85
- const e = O.value, a = k.value || "default", u = e ? Number.parseInt(getComputedStyle(e).paddingLeft) : 0, i = e ? Number.parseInt(getComputedStyle(e).paddingRight) : 0;
86
- return l.selectWidth - i - u - ut[a];
87
- }), G = () => {
80
+ }), pe = i(
81
+ () => s.value.every((e) => e.disabled)
82
+ ), Q = nt(), q = i(
83
+ () => Q.value === "small" ? "small" : "default"
84
+ ), Ie = i(() => {
85
+ const e = C.value, n = q.value || "default", u = e ? Number.parseInt(getComputedStyle(e).paddingLeft) : 0, a = e ? Number.parseInt(getComputedStyle(e).paddingRight) : 0;
86
+ return t.selectWidth - a - u - ut[n];
87
+ }), k = () => {
88
88
  var e;
89
- U.value = ((e = C.value) == null ? void 0 : e.offsetWidth) || 200;
90
- }, xe = o(() => ({
91
- width: `${l.calculatedWidth === 0 ? re : Math.ceil(l.calculatedWidth) + re}px`
92
- })), Se = o(() => _(n.modelValue) ? n.modelValue.length === 0 && !l.displayInputValue : n.filterable ? l.displayInputValue.length === 0 : !0), Ce = o(() => {
93
- const e = n.placeholder || t("el.select.placeholder");
94
- return n.multiple || oe(n.modelValue) ? e : l.selectedLabel;
95
- }), Oe = o(() => {
96
- var e, a;
97
- return (a = (e = b.value) == null ? void 0 : e.popperRef) == null ? void 0 : a.contentRef;
98
- }), $ = o(() => {
99
- if (n.multiple) {
100
- const e = n.modelValue.length;
101
- if (n.modelValue.length > 0)
102
- return c.value.findIndex(
103
- (a) => a.value === n.modelValue[e - 1]
89
+ K.value = ((e = S.value) == null ? void 0 : e.offsetWidth) || 200;
90
+ }, ye = i(() => ({
91
+ width: `${t.calculatedWidth === 0 ? re : Math.ceil(t.calculatedWidth) + re}px`
92
+ })), xe = i(() => D(l.modelValue) ? l.modelValue.length === 0 && !t.displayInputValue : l.filterable ? t.displayInputValue.length === 0 : !0), Se = i(() => {
93
+ const e = l.placeholder || "请选择";
94
+ return l.multiple || ie(l.modelValue) ? e : t.selectedLabel;
95
+ }), Ce = i(() => {
96
+ var e, n;
97
+ return (n = (e = b.value) == null ? void 0 : e.popperRef) == null ? void 0 : n.contentRef;
98
+ }), G = i(() => {
99
+ if (l.multiple) {
100
+ const e = l.modelValue.length;
101
+ if (l.modelValue.length > 0)
102
+ return s.value.findIndex(
103
+ (n) => n.value === l.modelValue[e - 1]
104
104
  );
105
- } else if (n.modelValue)
106
- return c.value.findIndex(
107
- (e) => e.value === n.modelValue
105
+ } else if (l.modelValue)
106
+ return s.value.findIndex(
107
+ (e) => e.value === l.modelValue
108
108
  );
109
109
  return -1;
110
- }), we = o({
110
+ }), Oe = i({
111
111
  get() {
112
- return s.value && W.value !== !1;
112
+ return o.value && M.value !== !1;
113
113
  },
114
114
  set(e) {
115
- s.value = e;
115
+ o.value = e;
116
116
  }
117
- }), Le = o(
118
- () => l.cachedOptions.slice(0, n.maxCollapseTags)
119
- ), Te = o(
120
- () => l.cachedOptions.slice(n.maxCollapseTags)
117
+ }), we = i(
118
+ () => t.cachedOptions.slice(0, l.maxCollapseTags)
119
+ ), Le = i(
120
+ () => t.cachedOptions.slice(l.maxCollapseTags)
121
121
  ), {
122
- createNewOption: j,
123
- removeNewOption: H,
124
- selectNewOption: J,
125
- clearAllNewOption: N
126
- } = et(n, l), {
127
- handleCompositionStart: Re,
128
- handleCompositionUpdate: Ee,
129
- handleCompositionEnd: Me
130
- } = lt((e) => ue(e)), X = () => {
131
- var e, a, u;
132
- (a = (e = v.value) == null ? void 0 : e.focus) == null || a.call(e), (u = b.value) == null || u.updatePopper();
133
- }, P = () => {
134
- if (!n.automaticDropdown && !y.value)
135
- return l.isComposing && (l.softFocus = !0), g(() => {
136
- var e, a;
137
- s.value = !s.value, (a = (e = v.value) == null ? void 0 : e.focus) == null || a.call(e);
122
+ createNewOption: $,
123
+ removeNewOption: W,
124
+ selectNewOption: j,
125
+ clearAllNewOption: H
126
+ } = Ze(l, t), {
127
+ handleCompositionStart: Te,
128
+ handleCompositionUpdate: Re,
129
+ handleCompositionEnd: Ee
130
+ } = tt((e) => ue(e)), J = () => {
131
+ var e, n, u;
132
+ (n = (e = h.value) == null ? void 0 : e.focus) == null || n.call(e), (u = b.value) == null || u.updatePopper();
133
+ }, N = () => {
134
+ if (!l.automaticDropdown && !I.value)
135
+ return t.isComposing && (t.softFocus = !0), v(() => {
136
+ var e, n;
137
+ o.value = !o.value, (n = (e = h.value) == null ? void 0 : e.focus) == null || n.call(e);
138
138
  });
139
- }, Y = () => (n.filterable && l.inputValue !== l.selectedLabel && (l.query = l.selectedLabel), ee(l.inputValue), g(() => {
140
- j(l.inputValue);
141
- })), Z = $e(Y, Q.value), ee = (e) => {
142
- l.previousQuery !== e && (l.previousQuery = e, n.filterable && ie(n.filterMethod) ? n.filterMethod(e) : n.filterable && n.remote && ie(n.remoteMethod) && n.remoteMethod(e));
143
- }, We = (e) => {
144
- se(n.modelValue, e) || m(Ze, e);
145
- }, x = (e) => {
146
- m(Ye, e), We(e), l.previousValue = e == null ? void 0 : e.toString();
147
- }, He = (e = [], a) => {
148
- if (!z(a))
149
- return e.indexOf(a);
150
- const u = n.valueKey;
151
- let i = -1;
152
- return e.some((d, r) => S(d, u) === S(a, u) ? (i = r, !0) : !1), i;
153
- }, V = (e) => z(e) ? S(e, n.valueKey) : e, Ne = (e) => z(e) ? e.label : e, A = () => g(() => {
154
- var a, u;
155
- if (!v.value)
139
+ }, X = () => (l.filterable && t.inputValue !== t.selectedLabel && (t.query = t.selectedLabel), Z(t.inputValue), v(() => {
140
+ $(t.inputValue);
141
+ })), Y = Ge(X, F.value), Z = (e) => {
142
+ t.previousQuery !== e && (t.previousQuery = e, l.filterable && ae(l.filterMethod) ? l.filterMethod(e) : l.filterable && l.remote && ae(l.remoteMethod) && l.remoteMethod(e));
143
+ }, Me = (e) => {
144
+ oe(l.modelValue, e) || g(Ye, e);
145
+ }, y = (e) => {
146
+ g(Xe, e), Me(e), t.previousValue = e == null ? void 0 : e.toString();
147
+ }, We = (e = [], n) => {
148
+ if (!_(n))
149
+ return e.indexOf(n);
150
+ const u = l.valueKey;
151
+ let a = -1;
152
+ return e.some((c, r) => x(c, u) === x(n, u) ? (a = r, !0) : !1), a;
153
+ }, m = (e) => _(e) ? x(e, l.valueKey) : e, He = (e) => _(e) ? e.label : e, P = () => v(() => {
154
+ var n, u;
155
+ if (!h.value)
156
156
  return;
157
- const e = O.value;
158
- C.value.height = e.offsetHeight, s.value && W.value !== !1 && ((u = (a = b.value) == null ? void 0 : a.updatePopper) == null || u.call(a));
159
- }), te = () => {
160
- var e, a;
161
- if (Pe(), G(), (a = (e = b.value) == null ? void 0 : e.updatePopper) == null || a.call(e), n.multiple)
162
- return A();
163
- }, Pe = () => {
164
- const e = O.value;
165
- e && (l.selectWidth = e.getBoundingClientRect().width);
166
- }, le = (e, a, u = !0) => {
167
- var i, d;
168
- if (n.multiple) {
169
- let r = n.modelValue.slice();
170
- const L = He(r, V(e));
171
- L > -1 ? (r = [
172
- ...r.slice(0, L),
173
- ...r.slice(L + 1)
174
- ], l.cachedOptions.splice(L, 1), H(e)) : (n.multipleLimit <= 0 || r.length < n.multipleLimit) && (r = [...r, V(e)], l.cachedOptions.push(e), J(e), p(a)), x(r), e.created && (l.query = "", ee(""), l.inputLength = 20), n.filterable && !n.reserveKeyword && ((d = (i = v.value).focus) == null || d.call(i), w("")), n.filterable && (l.calculatedWidth = I.value.getBoundingClientRect().width), A(), Fe();
157
+ const e = C.value;
158
+ S.value.height = e.offsetHeight, o.value && M.value !== !1 && ((u = (n = b.value) == null ? void 0 : n.updatePopper) == null || u.call(n));
159
+ }), ee = () => {
160
+ var e, n;
161
+ if (Ne(), k(), (n = (e = b.value) == null ? void 0 : e.updatePopper) == null || n.call(e), l.multiple)
162
+ return P();
163
+ }, Ne = () => {
164
+ const e = C.value;
165
+ e && (t.selectWidth = e.getBoundingClientRect().width);
166
+ }, te = (e, n, u = !0) => {
167
+ var a, c;
168
+ if (l.multiple) {
169
+ let r = l.modelValue.slice();
170
+ const w = We(r, m(e));
171
+ w > -1 ? (r = [
172
+ ...r.slice(0, w),
173
+ ...r.slice(w + 1)
174
+ ], t.cachedOptions.splice(w, 1), W(e)) : (l.multipleLimit <= 0 || r.length < l.multipleLimit) && (r = [...r, m(e)], t.cachedOptions.push(e), j(e), V(n)), y(r), e.created && (t.query = "", Z(""), t.inputLength = 20), l.filterable && !l.reserveKeyword && ((c = (a = h.value).focus) == null || c.call(a), O("")), l.filterable && (t.calculatedWidth = p.value.getBoundingClientRect().width), P(), Ue();
175
175
  } else
176
- he.value = a, l.selectedLabel = e.label, x(V(e)), s.value = !1, l.isComposing = !1, l.isSilentBlur = u, J(e), e.created || N(), p(a);
177
- }, Ae = (e, a) => {
178
- const { valueKey: u } = n, i = n.modelValue.indexOf(S(a, u));
179
- if (i > -1 && !y.value) {
180
- const d = [
181
- ...n.modelValue.slice(0, i),
182
- ...n.modelValue.slice(i + 1)
176
+ fe.value = n, t.selectedLabel = e.label, y(m(e)), o.value = !1, t.isComposing = !1, t.isSilentBlur = u, j(e), e.created || H(), V(n);
177
+ }, Pe = (e, n) => {
178
+ const { valueKey: u } = l, a = l.modelValue.indexOf(x(n, u));
179
+ if (a > -1 && !I.value) {
180
+ const c = [
181
+ ...l.modelValue.slice(0, a),
182
+ ...l.modelValue.slice(a + 1)
183
183
  ];
184
- return l.cachedOptions.splice(i, 1), x(d), m("remove-tag", S(a, u)), l.softFocus = !0, H(a), g(X);
184
+ return t.cachedOptions.splice(a, 1), y(c), g("remove-tag", x(n, u)), t.softFocus = !0, W(n), v(J);
185
185
  }
186
186
  e.stopPropagation();
187
- }, Be = (e) => {
188
- const a = l.isComposing;
189
- l.isComposing = !0, l.softFocus ? l.softFocus = !1 : a || m("focus", e);
190
- }, ne = (e) => (l.softFocus = !1, g(() => {
191
- var a, u;
192
- (u = (a = v.value) == null ? void 0 : a.blur) == null || u.call(a), I.value && (l.calculatedWidth = I.value.getBoundingClientRect().width), l.isSilentBlur ? l.isSilentBlur = !1 : l.isComposing && m("blur", e), l.isComposing = !1;
193
- })), De = () => {
194
- l.displayInputValue.length > 0 ? w("") : s.value = !1;
195
- }, _e = (e) => {
196
- if (l.displayInputValue.length === 0) {
187
+ }, Ae = (e) => {
188
+ const n = t.isComposing;
189
+ t.isComposing = !0, t.softFocus ? t.softFocus = !1 : n || g("focus", e);
190
+ }, le = (e) => (t.softFocus = !1, v(() => {
191
+ var n, u;
192
+ (u = (n = h.value) == null ? void 0 : n.blur) == null || u.call(n), p.value && (t.calculatedWidth = p.value.getBoundingClientRect().width), t.isSilentBlur ? t.isSilentBlur = !1 : t.isComposing && g("blur", e), t.isComposing = !1;
193
+ })), Be = () => {
194
+ t.displayInputValue.length > 0 ? O("") : o.value = !1;
195
+ }, De = (e) => {
196
+ if (t.displayInputValue.length === 0) {
197
197
  e.preventDefault();
198
- const a = n.modelValue.slice();
199
- a.pop(), H(l.cachedOptions.pop()), x(a);
198
+ const n = l.modelValue.slice();
199
+ n.pop(), W(t.cachedOptions.pop()), y(n);
200
200
  }
201
- }, ze = () => {
201
+ }, _e = () => {
202
202
  let e;
203
- return _(n.modelValue) ? e = [] : e = void 0, l.softFocus = !0, n.multiple ? l.cachedOptions = [] : l.selectedLabel = "", s.value = !1, x(e), m("clear"), N(), g(X);
204
- }, w = (e) => {
205
- l.displayInputValue = e, l.inputValue = e;
206
- }, ae = (e, a = void 0) => {
207
- const u = c.value;
208
- if (!["forward", "backward"].includes(e) || y.value || u.length <= 0 || Ie.value)
203
+ return D(l.modelValue) ? e = [] : e = void 0, t.softFocus = !0, l.multiple ? t.cachedOptions = [] : t.selectedLabel = "", o.value = !1, y(e), g("clear"), H(), v(J);
204
+ }, O = (e) => {
205
+ t.displayInputValue = e, t.inputValue = e;
206
+ }, ne = (e, n = void 0) => {
207
+ const u = s.value;
208
+ if (!["forward", "backward"].includes(e) || I.value || u.length <= 0 || pe.value)
209
209
  return;
210
- if (!s.value)
211
- return P();
212
- a === void 0 && (a = l.hoveringIndex);
213
- let i = -1;
214
- e === "forward" ? (i = a + 1, i >= u.length && (i = 0)) : e === "backward" && (i = a - 1, (i < 0 || i >= u.length) && (i = u.length - 1));
215
- const d = u[i];
216
- if (d.disabled || d.type === "Group")
217
- return ae(e, i);
218
- p(i), B(i);
219
- }, Ke = () => {
220
- if (s.value)
221
- ~l.hoveringIndex && c.value[l.hoveringIndex] && le(
222
- c.value[l.hoveringIndex],
223
- l.hoveringIndex,
210
+ if (!o.value)
211
+ return N();
212
+ n === void 0 && (n = t.hoveringIndex);
213
+ let a = -1;
214
+ e === "forward" ? (a = n + 1, a >= u.length && (a = 0)) : e === "backward" && (a = n - 1, (a < 0 || a >= u.length) && (a = u.length - 1));
215
+ const c = u[a];
216
+ if (c.disabled || c.type === "Group")
217
+ return ne(e, a);
218
+ V(a), A(a);
219
+ }, ze = () => {
220
+ if (o.value)
221
+ ~t.hoveringIndex && s.value[t.hoveringIndex] && te(
222
+ s.value[t.hoveringIndex],
223
+ t.hoveringIndex,
224
224
  !1
225
225
  );
226
226
  else
227
- return P();
228
- }, p = (e) => {
229
- l.hoveringIndex = e;
227
+ return N();
228
+ }, V = (e) => {
229
+ t.hoveringIndex = e;
230
+ }, Ke = () => {
231
+ t.hoveringIndex = -1;
230
232
  }, Ue = () => {
231
- l.hoveringIndex = -1;
232
- }, Fe = () => {
233
- var a;
234
- const e = v.value;
235
- e && ((a = e.focus) == null || a.call(e));
233
+ var n;
234
+ const e = h.value;
235
+ e && ((n = e.focus) == null || n.call(e));
236
236
  }, ue = (e) => {
237
- const a = e.target.value;
238
- if (w(a), l.displayInputValue.length > 0 && !s.value && (s.value = !0), l.calculatedWidth = I.value.getBoundingClientRect().width, n.multiple && A(), n.remote)
239
- Z();
237
+ const n = e.target.value;
238
+ if (O(n), t.displayInputValue.length > 0 && !o.value && (o.value = !0), t.calculatedWidth = p.value.getBoundingClientRect().width, l.multiple && P(), l.remote)
239
+ Y();
240
240
  else
241
- return Y();
242
- }, Qe = () => (s.value = !1, ne()), qe = () => (l.inputValue = l.displayInputValue, g(() => {
243
- ~$.value && (p($.value), B(l.hoveringIndex));
244
- })), B = (e) => {
245
- E.value.scrollToItem(e);
246
- }, D = () => {
247
- if (Ue(), n.multiple)
248
- if (n.modelValue.length > 0) {
241
+ return X();
242
+ }, Fe = () => (o.value = !1, le()), Qe = () => (t.inputValue = t.displayInputValue, v(() => {
243
+ ~G.value && (V(G.value), A(t.hoveringIndex));
244
+ })), A = (e) => {
245
+ R.value.scrollToItem(e);
246
+ }, B = () => {
247
+ if (Ke(), l.multiple)
248
+ if (l.modelValue.length > 0) {
249
249
  let e = !1;
250
- l.cachedOptions.length = 0, l.previousValue = n.modelValue.toString(), n.modelValue.forEach((a) => {
251
- const u = c.value.findIndex(
252
- (i) => V(i) === a
250
+ t.cachedOptions.length = 0, t.previousValue = l.modelValue.toString(), l.modelValue.forEach((n) => {
251
+ const u = s.value.findIndex(
252
+ (a) => m(a) === n
253
253
  );
254
- ~u && (l.cachedOptions.push(
255
- c.value[u]
256
- ), e || p(u), e = !0);
254
+ ~u && (t.cachedOptions.push(
255
+ s.value[u]
256
+ ), e || V(u), e = !0);
257
257
  });
258
258
  } else
259
- l.cachedOptions = [], l.previousValue = void 0;
260
- else if (M.value) {
261
- l.previousValue = n.modelValue;
262
- const e = c.value, a = e.findIndex(
263
- (u) => V(u) === V(n.modelValue)
259
+ t.cachedOptions = [], t.previousValue = void 0;
260
+ else if (E.value) {
261
+ t.previousValue = l.modelValue;
262
+ const e = s.value, n = e.findIndex(
263
+ (u) => m(u) === m(l.modelValue)
264
264
  );
265
- ~a ? (l.selectedLabel = e[a].label, p(a)) : l.selectedLabel = `${n.modelValue}`;
265
+ ~n ? (t.selectedLabel = e[n].label, V(n)) : t.selectedLabel = `${l.modelValue}`;
266
266
  } else
267
- l.selectedLabel = "", l.previousValue = void 0;
268
- N(), G();
267
+ t.selectedLabel = "", t.previousValue = void 0;
268
+ H(), k();
269
269
  };
270
- return T(s, (e) => {
271
- var a, u;
272
- m("visible-change", e), e ? (u = (a = b.value).update) == null || u.call(a) : (l.displayInputValue = "", l.previousQuery = null, j(""));
273
- }), T(
274
- () => n.modelValue,
275
- (e, a) => {
270
+ return L(o, (e) => {
271
+ var n, u;
272
+ g("visible-change", e), e ? (u = (n = b.value).update) == null || u.call(n) : (t.displayInputValue = "", t.previousQuery = null, $(""));
273
+ }), L(
274
+ () => l.modelValue,
275
+ (e, n) => {
276
276
  var u;
277
- (!e || e.toString() !== l.previousValue) && D(), !se(e, a) && n.validateEvent && ((u = h == null ? void 0 : h.validate) == null || u.call(h, "change").catch((i) => Je(i)));
277
+ (!e || e.toString() !== t.previousValue) && B(), !oe(e, n) && l.validateEvent && ((u = f == null ? void 0 : f.validate) == null || u.call(f, "change").catch((a) => je(a)));
278
278
  },
279
279
  {
280
280
  deep: !0
281
281
  }
282
- ), T(
283
- () => n.options,
282
+ ), L(
283
+ () => l.options,
284
284
  () => {
285
- const e = v.value;
286
- (!e || e && document.activeElement !== e) && D();
285
+ const e = h.value;
286
+ (!e || e && document.activeElement !== e) && B();
287
287
  },
288
288
  {
289
289
  deep: !0
290
290
  }
291
- ), T(c, () => g(E.value.resetScrollTop)), Ge(() => {
292
- D();
293
- }), je(C, te), {
291
+ ), L(s, () => v(R.value.resetScrollTop)), ke(() => {
292
+ B();
293
+ }), $e(S, ee), {
294
294
  // data exports
295
- collapseTagSize: k,
296
- currentPlaceholder: Ce,
297
- expanded: s,
298
- emptyText: W,
299
- popupHeight: ge,
300
- debounce: Q,
301
- filteredOptions: c,
302
- iconComponent: F,
303
- iconReverse: Ve,
304
- inputWrapperStyle: xe,
305
- popperSize: U,
306
- dropdownMenuVisible: we,
307
- hasModelValue: M,
295
+ collapseTagSize: q,
296
+ currentPlaceholder: Se,
297
+ expanded: o,
298
+ emptyText: M,
299
+ popupHeight: ve,
300
+ debounce: F,
301
+ filteredOptions: s,
302
+ iconComponent: U,
303
+ iconReverse: me,
304
+ inputWrapperStyle: ye,
305
+ popperSize: K,
306
+ dropdownMenuVisible: Oe,
307
+ hasModelValue: E,
308
308
  // readonly,
309
- shouldShowPlaceholder: Se,
310
- selectDisabled: y,
311
- selectSize: q,
312
- showClearBtn: me,
313
- states: l,
314
- tagMaxWidth: ye,
315
- nsSelectV2: K,
316
- nsInput: fe,
309
+ shouldShowPlaceholder: xe,
310
+ selectDisabled: I,
311
+ selectSize: Q,
312
+ showClearBtn: ge,
313
+ states: t,
314
+ tagMaxWidth: Ie,
315
+ nsSelectV2: z,
316
+ nsInput: de,
317
317
  // refs items exports
318
- calculatorRef: I,
319
- controlRef: ve,
320
- inputRef: v,
321
- menuRef: E,
318
+ calculatorRef: p,
319
+ controlRef: he,
320
+ inputRef: h,
321
+ menuRef: R,
322
322
  popper: b,
323
- selectRef: C,
324
- selectionRef: O,
325
- popperRef: Oe,
326
- validateState: pe,
323
+ selectRef: S,
324
+ selectionRef: C,
325
+ popperRef: Ce,
326
+ validateState: Ve,
327
327
  validateIcon: be,
328
- showTagList: Le,
329
- collapseTagList: Te,
328
+ showTagList: we,
329
+ collapseTagList: Le,
330
330
  // methods exports
331
- debouncedOnInputChange: Z,
332
- deleteTag: Ae,
333
- getLabel: Ne,
334
- getValueKey: V,
335
- handleBlur: ne,
336
- handleClear: ze,
337
- handleClickOutside: Qe,
338
- handleDel: _e,
339
- handleEsc: De,
340
- handleFocus: Be,
341
- handleMenuEnter: qe,
342
- handleResize: te,
343
- toggleMenu: P,
344
- scrollTo: B,
331
+ debouncedOnInputChange: Y,
332
+ deleteTag: Pe,
333
+ getLabel: He,
334
+ getValueKey: m,
335
+ handleBlur: le,
336
+ handleClear: _e,
337
+ handleClickOutside: Fe,
338
+ handleDel: De,
339
+ handleEsc: Be,
340
+ handleFocus: Ae,
341
+ handleMenuEnter: Qe,
342
+ handleResize: ee,
343
+ toggleMenu: N,
344
+ scrollTo: A,
345
345
  onInput: ue,
346
- onKeyboardNavigate: ae,
347
- onKeyboardSelect: Ke,
348
- onSelect: le,
349
- onHover: p,
350
- onUpdateInputValue: w,
351
- handleCompositionStart: Re,
352
- handleCompositionEnd: Me,
353
- handleCompositionUpdate: Ee
346
+ onKeyboardNavigate: ne,
347
+ onKeyboardSelect: ze,
348
+ onSelect: te,
349
+ onHover: V,
350
+ onUpdateInputValue: O,
351
+ handleCompositionStart: Te,
352
+ handleCompositionEnd: Ee,
353
+ handleCompositionUpdate: Re
354
354
  };
355
355
  };
356
356
  export {
357
- St as default
357
+ xt as default
358
358
  };