@element-plus/nightly 0.0.20241113 → 0.0.20241114

Sign up to get free protection for your applications and to get access to all the features.
Files changed (408) hide show
  1. package/dist/index.full.js +129 -111
  2. package/dist/index.full.min.js +11 -11
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +11 -11
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +129 -111
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +1 -1
  32. package/dist/locale/ca.min.js +1 -1
  33. package/dist/locale/ca.min.mjs +1 -1
  34. package/dist/locale/ca.mjs +1 -1
  35. package/dist/locale/ckb.js +1 -1
  36. package/dist/locale/ckb.min.js +1 -1
  37. package/dist/locale/ckb.min.mjs +1 -1
  38. package/dist/locale/ckb.mjs +1 -1
  39. package/dist/locale/cs.js +1 -1
  40. package/dist/locale/cs.min.js +1 -1
  41. package/dist/locale/cs.min.mjs +1 -1
  42. package/dist/locale/cs.mjs +1 -1
  43. package/dist/locale/da.js +1 -1
  44. package/dist/locale/da.min.js +1 -1
  45. package/dist/locale/da.min.mjs +1 -1
  46. package/dist/locale/da.mjs +1 -1
  47. package/dist/locale/de.js +1 -1
  48. package/dist/locale/de.min.js +1 -1
  49. package/dist/locale/de.min.mjs +1 -1
  50. package/dist/locale/de.mjs +1 -1
  51. package/dist/locale/el.js +1 -1
  52. package/dist/locale/el.min.js +1 -1
  53. package/dist/locale/el.min.mjs +1 -1
  54. package/dist/locale/el.mjs +1 -1
  55. package/dist/locale/en.js +1 -1
  56. package/dist/locale/en.min.js +1 -1
  57. package/dist/locale/en.min.mjs +1 -1
  58. package/dist/locale/en.mjs +1 -1
  59. package/dist/locale/eo.js +1 -1
  60. package/dist/locale/eo.min.js +1 -1
  61. package/dist/locale/eo.min.mjs +1 -1
  62. package/dist/locale/eo.mjs +1 -1
  63. package/dist/locale/es.js +1 -1
  64. package/dist/locale/es.min.js +1 -1
  65. package/dist/locale/es.min.mjs +1 -1
  66. package/dist/locale/es.mjs +1 -1
  67. package/dist/locale/et.js +1 -1
  68. package/dist/locale/et.min.js +1 -1
  69. package/dist/locale/et.min.mjs +1 -1
  70. package/dist/locale/et.mjs +1 -1
  71. package/dist/locale/eu.js +1 -1
  72. package/dist/locale/eu.min.js +1 -1
  73. package/dist/locale/eu.min.mjs +1 -1
  74. package/dist/locale/eu.mjs +1 -1
  75. package/dist/locale/fa.js +1 -1
  76. package/dist/locale/fa.min.js +1 -1
  77. package/dist/locale/fa.min.mjs +1 -1
  78. package/dist/locale/fa.mjs +1 -1
  79. package/dist/locale/fi.js +1 -1
  80. package/dist/locale/fi.min.js +1 -1
  81. package/dist/locale/fi.min.mjs +1 -1
  82. package/dist/locale/fi.mjs +1 -1
  83. package/dist/locale/fr.js +1 -1
  84. package/dist/locale/fr.min.js +1 -1
  85. package/dist/locale/fr.min.mjs +1 -1
  86. package/dist/locale/fr.mjs +1 -1
  87. package/dist/locale/he.js +1 -1
  88. package/dist/locale/he.min.js +1 -1
  89. package/dist/locale/he.min.mjs +1 -1
  90. package/dist/locale/he.mjs +1 -1
  91. package/dist/locale/hr.js +1 -1
  92. package/dist/locale/hr.min.js +1 -1
  93. package/dist/locale/hr.min.mjs +1 -1
  94. package/dist/locale/hr.mjs +1 -1
  95. package/dist/locale/hu.js +1 -1
  96. package/dist/locale/hu.min.js +1 -1
  97. package/dist/locale/hu.min.mjs +1 -1
  98. package/dist/locale/hu.mjs +1 -1
  99. package/dist/locale/hy-am.js +1 -1
  100. package/dist/locale/hy-am.min.js +1 -1
  101. package/dist/locale/hy-am.min.mjs +1 -1
  102. package/dist/locale/hy-am.mjs +1 -1
  103. package/dist/locale/id.js +1 -1
  104. package/dist/locale/id.min.js +1 -1
  105. package/dist/locale/id.min.mjs +1 -1
  106. package/dist/locale/id.mjs +1 -1
  107. package/dist/locale/it.js +1 -1
  108. package/dist/locale/it.min.js +1 -1
  109. package/dist/locale/it.min.mjs +1 -1
  110. package/dist/locale/it.mjs +1 -1
  111. package/dist/locale/ja.js +1 -1
  112. package/dist/locale/ja.min.js +1 -1
  113. package/dist/locale/ja.min.mjs +1 -1
  114. package/dist/locale/ja.mjs +1 -1
  115. package/dist/locale/kk.js +1 -1
  116. package/dist/locale/kk.min.js +1 -1
  117. package/dist/locale/kk.min.mjs +1 -1
  118. package/dist/locale/kk.mjs +1 -1
  119. package/dist/locale/km.js +1 -1
  120. package/dist/locale/km.min.js +1 -1
  121. package/dist/locale/km.min.mjs +1 -1
  122. package/dist/locale/km.mjs +1 -1
  123. package/dist/locale/ko.js +1 -1
  124. package/dist/locale/ko.min.js +1 -1
  125. package/dist/locale/ko.min.mjs +1 -1
  126. package/dist/locale/ko.mjs +1 -1
  127. package/dist/locale/ku.js +1 -1
  128. package/dist/locale/ku.min.js +1 -1
  129. package/dist/locale/ku.min.mjs +1 -1
  130. package/dist/locale/ku.mjs +1 -1
  131. package/dist/locale/ky.js +1 -1
  132. package/dist/locale/ky.min.js +1 -1
  133. package/dist/locale/ky.min.mjs +1 -1
  134. package/dist/locale/ky.mjs +1 -1
  135. package/dist/locale/lt.js +1 -1
  136. package/dist/locale/lt.min.js +1 -1
  137. package/dist/locale/lt.min.mjs +1 -1
  138. package/dist/locale/lt.mjs +1 -1
  139. package/dist/locale/lv.js +1 -1
  140. package/dist/locale/lv.min.js +1 -1
  141. package/dist/locale/lv.min.mjs +1 -1
  142. package/dist/locale/lv.mjs +1 -1
  143. package/dist/locale/mg.js +1 -1
  144. package/dist/locale/mg.min.js +1 -1
  145. package/dist/locale/mg.min.mjs +1 -1
  146. package/dist/locale/mg.mjs +1 -1
  147. package/dist/locale/mn.js +1 -1
  148. package/dist/locale/mn.min.js +1 -1
  149. package/dist/locale/mn.min.mjs +1 -1
  150. package/dist/locale/mn.mjs +1 -1
  151. package/dist/locale/my.js +1 -1
  152. package/dist/locale/my.min.js +1 -1
  153. package/dist/locale/my.min.mjs +1 -1
  154. package/dist/locale/my.mjs +1 -1
  155. package/dist/locale/nb-no.js +1 -1
  156. package/dist/locale/nb-no.min.js +1 -1
  157. package/dist/locale/nb-no.min.mjs +1 -1
  158. package/dist/locale/nb-no.mjs +1 -1
  159. package/dist/locale/nl.js +1 -1
  160. package/dist/locale/nl.min.js +1 -1
  161. package/dist/locale/nl.min.mjs +1 -1
  162. package/dist/locale/nl.mjs +1 -1
  163. package/dist/locale/pa.js +1 -1
  164. package/dist/locale/pa.min.js +1 -1
  165. package/dist/locale/pa.min.mjs +1 -1
  166. package/dist/locale/pa.mjs +1 -1
  167. package/dist/locale/pl.js +1 -1
  168. package/dist/locale/pl.min.js +1 -1
  169. package/dist/locale/pl.min.mjs +1 -1
  170. package/dist/locale/pl.mjs +1 -1
  171. package/dist/locale/pt-br.js +1 -1
  172. package/dist/locale/pt-br.min.js +1 -1
  173. package/dist/locale/pt-br.min.mjs +1 -1
  174. package/dist/locale/pt-br.mjs +1 -1
  175. package/dist/locale/pt.js +1 -1
  176. package/dist/locale/pt.min.js +1 -1
  177. package/dist/locale/pt.min.mjs +1 -1
  178. package/dist/locale/pt.mjs +1 -1
  179. package/dist/locale/ro.js +1 -1
  180. package/dist/locale/ro.min.js +1 -1
  181. package/dist/locale/ro.min.mjs +1 -1
  182. package/dist/locale/ro.mjs +1 -1
  183. package/dist/locale/ru.js +1 -1
  184. package/dist/locale/ru.min.js +1 -1
  185. package/dist/locale/ru.min.mjs +1 -1
  186. package/dist/locale/ru.mjs +1 -1
  187. package/dist/locale/sk.js +1 -1
  188. package/dist/locale/sk.min.js +1 -1
  189. package/dist/locale/sk.min.mjs +1 -1
  190. package/dist/locale/sk.mjs +1 -1
  191. package/dist/locale/sl.js +1 -1
  192. package/dist/locale/sl.min.js +1 -1
  193. package/dist/locale/sl.min.mjs +1 -1
  194. package/dist/locale/sl.mjs +1 -1
  195. package/dist/locale/sr.js +1 -1
  196. package/dist/locale/sr.min.js +1 -1
  197. package/dist/locale/sr.min.mjs +1 -1
  198. package/dist/locale/sr.mjs +1 -1
  199. package/dist/locale/sv.js +1 -1
  200. package/dist/locale/sv.min.js +1 -1
  201. package/dist/locale/sv.min.mjs +1 -1
  202. package/dist/locale/sv.mjs +1 -1
  203. package/dist/locale/sw.js +1 -1
  204. package/dist/locale/sw.min.js +1 -1
  205. package/dist/locale/sw.min.mjs +1 -1
  206. package/dist/locale/sw.mjs +1 -1
  207. package/dist/locale/ta.js +1 -1
  208. package/dist/locale/ta.min.js +1 -1
  209. package/dist/locale/ta.min.mjs +1 -1
  210. package/dist/locale/ta.mjs +1 -1
  211. package/dist/locale/th.js +1 -1
  212. package/dist/locale/th.min.js +1 -1
  213. package/dist/locale/th.min.mjs +1 -1
  214. package/dist/locale/th.mjs +1 -1
  215. package/dist/locale/tk.js +1 -1
  216. package/dist/locale/tk.min.js +1 -1
  217. package/dist/locale/tk.min.mjs +1 -1
  218. package/dist/locale/tk.mjs +1 -1
  219. package/dist/locale/tr.js +1 -1
  220. package/dist/locale/tr.min.js +1 -1
  221. package/dist/locale/tr.min.mjs +1 -1
  222. package/dist/locale/tr.mjs +1 -1
  223. package/dist/locale/ug-cn.js +1 -1
  224. package/dist/locale/ug-cn.min.js +1 -1
  225. package/dist/locale/ug-cn.min.mjs +1 -1
  226. package/dist/locale/ug-cn.mjs +1 -1
  227. package/dist/locale/uk.js +1 -1
  228. package/dist/locale/uk.min.js +1 -1
  229. package/dist/locale/uk.min.mjs +1 -1
  230. package/dist/locale/uk.mjs +1 -1
  231. package/dist/locale/uz-uz.js +1 -1
  232. package/dist/locale/uz-uz.min.js +1 -1
  233. package/dist/locale/uz-uz.min.mjs +1 -1
  234. package/dist/locale/uz-uz.mjs +1 -1
  235. package/dist/locale/vi.js +1 -1
  236. package/dist/locale/vi.min.js +1 -1
  237. package/dist/locale/vi.min.mjs +1 -1
  238. package/dist/locale/vi.mjs +1 -1
  239. package/dist/locale/zh-cn.js +1 -1
  240. package/dist/locale/zh-cn.min.js +1 -1
  241. package/dist/locale/zh-cn.min.mjs +1 -1
  242. package/dist/locale/zh-cn.mjs +1 -1
  243. package/dist/locale/zh-tw.js +1 -1
  244. package/dist/locale/zh-tw.min.js +1 -1
  245. package/dist/locale/zh-tw.min.mjs +1 -1
  246. package/dist/locale/zh-tw.mjs +1 -1
  247. package/es/components/carousel/index.mjs +2 -2
  248. package/es/components/carousel/src/carousel-item.mjs +8 -70
  249. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  250. package/es/components/carousel/src/carousel-item2.mjs +70 -8
  251. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  252. package/es/components/cascader/index.mjs +2 -2
  253. package/es/components/cascader/src/cascader.mjs +83 -627
  254. package/es/components/cascader/src/cascader.mjs.map +1 -1
  255. package/es/components/cascader/src/cascader2.mjs +629 -83
  256. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  257. package/es/components/cascader-panel/src/index.mjs +1 -0
  258. package/es/components/cascader-panel/src/index.mjs.map +1 -1
  259. package/es/components/collapse/index.mjs +2 -2
  260. package/es/components/collapse/src/collapse.mjs +18 -28
  261. package/es/components/collapse/src/collapse.mjs.map +1 -1
  262. package/es/components/collapse/src/collapse2.mjs +28 -18
  263. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  264. package/es/components/color-picker/src/color-picker2.mjs +1 -0
  265. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  266. package/es/components/dropdown/src/dropdown-item-impl.mjs +2 -3
  267. package/es/components/dropdown/src/dropdown-item-impl.mjs.map +1 -1
  268. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  269. package/es/components/dropdown/src/dropdown2.mjs +7 -2
  270. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  271. package/es/components/dropdown/src/useDropdown.mjs +1 -1
  272. package/es/components/dropdown/src/useDropdown.mjs.map +1 -1
  273. package/es/components/focus-trap/src/focus-trap.mjs +2 -2
  274. package/es/components/focus-trap/src/focus-trap.mjs.map +1 -1
  275. package/es/components/index.mjs +5 -5
  276. package/es/components/mention/src/mention2.mjs +51 -45
  277. package/es/components/mention/src/mention2.mjs.map +1 -1
  278. package/es/components/menu/src/utils/menu-item.mjs +1 -0
  279. package/es/components/menu/src/utils/menu-item.mjs.map +1 -1
  280. package/es/components/menu/src/utils/submenu.mjs +1 -0
  281. package/es/components/menu/src/utils/submenu.mjs.map +1 -1
  282. package/es/components/pagination/src/components/next.mjs +36 -19
  283. package/es/components/pagination/src/components/next.mjs.map +1 -1
  284. package/es/components/pagination/src/components/next2.mjs +19 -36
  285. package/es/components/pagination/src/components/next2.mjs.map +1 -1
  286. package/es/components/pagination/src/pagination.mjs +1 -1
  287. package/es/components/roving-focus-group/index.mjs +3 -3
  288. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
  289. package/es/components/roving-focus-group/src/roving-focus-group.mjs +29 -27
  290. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  291. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -29
  292. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  293. package/es/components/roving-focus-group/src/roving-focus-item.mjs +3 -3
  294. package/es/components/roving-focus-group/src/roving-focus-item.mjs.map +1 -1
  295. package/es/components/roving-focus-group/src/utils.mjs +1 -1
  296. package/es/components/roving-focus-group/src/utils.mjs.map +1 -1
  297. package/es/components/scrollbar/index.mjs +2 -2
  298. package/es/components/scrollbar/src/scrollbar.mjs +55 -171
  299. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  300. package/es/components/scrollbar/src/scrollbar2.mjs +171 -55
  301. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  302. package/es/components/segmented/index.mjs +2 -2
  303. package/es/components/segmented/src/segmented.mjs +34 -169
  304. package/es/components/segmented/src/segmented.mjs.map +1 -1
  305. package/es/components/segmented/src/segmented2.mjs +169 -34
  306. package/es/components/segmented/src/segmented2.mjs.map +1 -1
  307. package/es/components/select-v2/src/select-dropdown.mjs +7 -9
  308. package/es/components/select-v2/src/select-dropdown.mjs.map +1 -1
  309. package/es/components/select-v2/src/useSelect.mjs +2 -1
  310. package/es/components/select-v2/src/useSelect.mjs.map +1 -1
  311. package/es/components/slider/src/composables/use-slider-button.mjs +24 -15
  312. package/es/components/slider/src/composables/use-slider-button.mjs.map +1 -1
  313. package/es/components/tabs/src/tab-nav.mjs +21 -25
  314. package/es/components/tabs/src/tab-nav.mjs.map +1 -1
  315. package/es/components/tabs/src/tabs.mjs +1 -1
  316. package/es/components/tabs/src/tabs.mjs.map +1 -1
  317. package/es/components/tooltip/src/trigger.mjs +1 -1
  318. package/es/components/tooltip/src/trigger.mjs.map +1 -1
  319. package/es/components/tree/src/model/useKeydown.mjs +1 -1
  320. package/es/components/tree/src/model/useKeydown.mjs.map +1 -1
  321. package/es/hooks/use-escape-keydown/index.mjs +2 -3
  322. package/es/hooks/use-escape-keydown/index.mjs.map +1 -1
  323. package/es/index.mjs +5 -5
  324. package/es/version.d.ts +1 -1
  325. package/es/version.mjs +1 -1
  326. package/es/version.mjs.map +1 -1
  327. package/lib/components/carousel/index.js +2 -2
  328. package/lib/components/carousel/src/carousel-item.js +8 -70
  329. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  330. package/lib/components/carousel/src/carousel-item2.js +70 -8
  331. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  332. package/lib/components/cascader/index.js +2 -2
  333. package/lib/components/cascader/src/cascader.js +84 -627
  334. package/lib/components/cascader/src/cascader.js.map +1 -1
  335. package/lib/components/cascader/src/cascader2.js +629 -84
  336. package/lib/components/cascader/src/cascader2.js.map +1 -1
  337. package/lib/components/cascader-panel/src/index.js +1 -0
  338. package/lib/components/cascader-panel/src/index.js.map +1 -1
  339. package/lib/components/collapse/index.js +2 -2
  340. package/lib/components/collapse/src/collapse.js +20 -28
  341. package/lib/components/collapse/src/collapse.js.map +1 -1
  342. package/lib/components/collapse/src/collapse2.js +28 -20
  343. package/lib/components/collapse/src/collapse2.js.map +1 -1
  344. package/lib/components/color-picker/src/color-picker2.js +1 -0
  345. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  346. package/lib/components/dropdown/src/dropdown-item-impl.js +2 -3
  347. package/lib/components/dropdown/src/dropdown-item-impl.js.map +1 -1
  348. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  349. package/lib/components/dropdown/src/dropdown2.js +7 -2
  350. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  351. package/lib/components/dropdown/src/useDropdown.js +1 -1
  352. package/lib/components/dropdown/src/useDropdown.js.map +1 -1
  353. package/lib/components/focus-trap/src/focus-trap.js +2 -2
  354. package/lib/components/focus-trap/src/focus-trap.js.map +1 -1
  355. package/lib/components/index.js +5 -5
  356. package/lib/components/mention/src/mention2.js +51 -45
  357. package/lib/components/mention/src/mention2.js.map +1 -1
  358. package/lib/components/menu/src/utils/menu-item.js +1 -0
  359. package/lib/components/menu/src/utils/menu-item.js.map +1 -1
  360. package/lib/components/menu/src/utils/submenu.js +1 -0
  361. package/lib/components/menu/src/utils/submenu.js.map +1 -1
  362. package/lib/components/pagination/src/components/next.js +36 -19
  363. package/lib/components/pagination/src/components/next.js.map +1 -1
  364. package/lib/components/pagination/src/components/next2.js +19 -36
  365. package/lib/components/pagination/src/components/next2.js.map +1 -1
  366. package/lib/components/pagination/src/pagination.js +1 -1
  367. package/lib/components/roving-focus-group/index.js +2 -2
  368. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
  369. package/lib/components/roving-focus-group/src/roving-focus-group.js +33 -27
  370. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  371. package/lib/components/roving-focus-group/src/roving-focus-group2.js +27 -33
  372. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  373. package/lib/components/roving-focus-group/src/roving-focus-item.js +3 -3
  374. package/lib/components/roving-focus-group/src/roving-focus-item.js.map +1 -1
  375. package/lib/components/roving-focus-group/src/utils.js +1 -1
  376. package/lib/components/roving-focus-group/src/utils.js.map +1 -1
  377. package/lib/components/scrollbar/index.js +2 -2
  378. package/lib/components/scrollbar/src/scrollbar.js +56 -171
  379. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  380. package/lib/components/scrollbar/src/scrollbar2.js +171 -56
  381. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  382. package/lib/components/segmented/index.js +2 -2
  383. package/lib/components/segmented/src/segmented.js +34 -168
  384. package/lib/components/segmented/src/segmented.js.map +1 -1
  385. package/lib/components/segmented/src/segmented2.js +168 -34
  386. package/lib/components/segmented/src/segmented2.js.map +1 -1
  387. package/lib/components/select-v2/src/select-dropdown.js +7 -9
  388. package/lib/components/select-v2/src/select-dropdown.js.map +1 -1
  389. package/lib/components/select-v2/src/useSelect.js +2 -1
  390. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  391. package/lib/components/slider/src/composables/use-slider-button.js +24 -15
  392. package/lib/components/slider/src/composables/use-slider-button.js.map +1 -1
  393. package/lib/components/tabs/src/tab-nav.js +21 -25
  394. package/lib/components/tabs/src/tab-nav.js.map +1 -1
  395. package/lib/components/tabs/src/tabs.js +1 -1
  396. package/lib/components/tabs/src/tabs.js.map +1 -1
  397. package/lib/components/tooltip/src/trigger.js +1 -1
  398. package/lib/components/tooltip/src/trigger.js.map +1 -1
  399. package/lib/components/tree/src/model/useKeydown.js +1 -1
  400. package/lib/components/tree/src/model/useKeydown.js.map +1 -1
  401. package/lib/hooks/use-escape-keydown/index.js +2 -3
  402. package/lib/hooks/use-escape-keydown/index.js.map +1 -1
  403. package/lib/index.js +5 -5
  404. package/lib/version.d.ts +1 -1
  405. package/lib/version.js +1 -1
  406. package/lib/version.js.map +1 -1
  407. package/package.json +2 -2
  408. package/web-types.json +1 -1
@@ -594,7 +594,8 @@ const useSelect = (props, emit) => {
594
594
  });
595
595
  watch(() => props.modelValue, (val, oldVal) => {
596
596
  var _a;
597
- if (!val || props.multiple && val.toString() !== states.previousValue || !props.multiple && getValueKey(val) !== getValueKey(states.previousValue)) {
597
+ const isValEmpty = !val || isArray(val) && val.length === 0;
598
+ if (isValEmpty || props.multiple && !isEqual(val.toString(), states.previousValue) || !props.multiple && getValueKey(val) !== getValueKey(states.previousValue)) {
598
599
  initStates(true);
599
600
  }
600
601
  if (!isEqual(val, oldVal) && props.validateEvent) {
@@ -1 +1 @@
1
- {"version":3,"file":"useSelect.mjs","sources":["../../../../../../packages/components/select-v2/src/useSelect.ts"],"sourcesContent":["import {\n computed,\n nextTick,\n onMounted,\n reactive,\n ref,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n findLastIndex,\n get,\n isEqual,\n debounce as lodashDebounce,\n} from 'lodash-unified'\nimport { useResizeObserver } from '@vueuse/core'\nimport {\n ValidateComponentsMap,\n debugWarn,\n escapeStringRegexp,\n isArray,\n isFunction,\n isObject,\n} from '@element-plus/utils'\nimport {\n useComposition,\n useEmptyValues,\n useFocusController,\n useLocale,\n useNamespace,\n} from '@element-plus/hooks'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport {\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\n\nimport { ArrowDown } from '@element-plus/icons-vue'\nimport { useAllowCreate } from './useAllowCreate'\nimport { useProps } from './useProps'\n\nimport type { Option, OptionType, SelectStates } from './select.types'\nimport type { ISelectV2Props } from './token'\nimport type { SelectEmitFn } from './defaults'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { SelectDropdownInstance } from './select-dropdown'\n\nconst MINIMUM_INPUT_WIDTH = 11\n\nconst useSelect = (props: ISelectV2Props, emit: SelectEmitFn) => {\n // inject\n const { t } = useLocale()\n const nsSelect = useNamespace('select')\n const nsInput = useNamespace('input')\n const { form: elForm, formItem: elFormItem } = useFormItem()\n const { inputId } = useFormItemInputId(props, {\n formItemContext: elFormItem,\n })\n const { aliasProps, getLabel, getValue, getDisabled, getOptions } =\n useProps(props)\n const { valueOnClear, isEmptyValue } = useEmptyValues(props)\n\n const states: SelectStates = reactive({\n inputValue: '',\n cachedOptions: [],\n createdOptions: [],\n hoveringIndex: -1,\n inputHovering: false,\n selectionWidth: 0,\n calculatorWidth: 0,\n collapseItemWidth: 0,\n previousQuery: null,\n previousValue: undefined,\n selectedLabel: '',\n menuVisibleOnFocus: false,\n isBeforeHide: false,\n })\n\n // data refs\n const popperSize = ref(-1)\n\n // DOM & Component refs\n const selectRef = ref<HTMLElement>()\n const selectionRef = ref<HTMLElement>()\n const tooltipRef = ref<TooltipInstance>()\n const tagTooltipRef = ref<TooltipInstance>()\n const inputRef = ref<HTMLElement>()\n const calculatorRef = ref<HTMLElement>()\n const prefixRef = ref<HTMLElement>()\n const suffixRef = ref<HTMLElement>()\n const menuRef = ref<SelectDropdownInstance>()\n const tagMenuRef = ref<HTMLElement>()\n const collapseItemRef = ref<HTMLElement>()\n\n const {\n isComposing,\n handleCompositionStart,\n handleCompositionEnd,\n handleCompositionUpdate,\n } = useComposition({\n afterComposition: (e) => onInput(e),\n })\n\n const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {\n beforeFocus() {\n return selectDisabled.value\n },\n afterFocus() {\n if (props.automaticDropdown && !expanded.value) {\n expanded.value = true\n states.menuVisibleOnFocus = true\n }\n },\n beforeBlur(event) {\n return (\n tooltipRef.value?.isFocusInsideContent(event) ||\n tagTooltipRef.value?.isFocusInsideContent(event)\n )\n },\n afterBlur() {\n expanded.value = false\n states.menuVisibleOnFocus = false\n },\n })\n\n const allOptions = ref<OptionType[]>([])\n const filteredOptions = ref<OptionType[]>([])\n // the controller of the expanded popup\n const expanded = ref(false)\n\n const selectDisabled = computed(() => props.disabled || elForm?.disabled)\n\n const needStatusIcon = computed(() => elForm?.statusIcon ?? false)\n\n const popupHeight = computed(() => {\n const totalHeight = filteredOptions.value.length * props.itemHeight\n return totalHeight > props.height ? props.height : totalHeight\n })\n\n const hasModelValue = computed(() => {\n return props.multiple\n ? isArray(props.modelValue) && props.modelValue.length > 0\n : !isEmptyValue(props.modelValue)\n })\n\n const showClearBtn = computed(() => {\n return (\n props.clearable &&\n !selectDisabled.value &&\n states.inputHovering &&\n hasModelValue.value\n )\n })\n\n const iconComponent = computed(() =>\n props.remote && props.filterable ? '' : ArrowDown\n )\n\n const iconReverse = computed(\n () => iconComponent.value && nsSelect.is('reverse', expanded.value)\n )\n\n const validateState = computed(() => elFormItem?.validateState || '')\n const validateIcon = computed(() => {\n // When we use indexed access to get the type of an undeclared property,\n // the unsafe type `any` will be inferred, which TypeScript throws an error to emphasize it.\n // To avoid TypeScript complaining about it, we use truthiness narrowing to narrow the type of validateState.\n if (!validateState.value) return\n return ValidateComponentsMap[validateState.value]\n })\n\n const debounce = computed(() => (props.remote ? 300 : 0))\n\n // filteredOptions includes flatten the data into one dimensional array.\n const emptyText = computed(() => {\n if (props.loading) {\n return props.loadingText || t('el.select.loading')\n } else {\n if (props.remote && !states.inputValue && allOptions.value.length === 0)\n return false\n if (\n props.filterable &&\n states.inputValue &&\n allOptions.value.length > 0 &&\n filteredOptions.value.length === 0\n ) {\n return props.noMatchText || t('el.select.noMatch')\n }\n if (allOptions.value.length === 0) {\n return props.noDataText || t('el.select.noData')\n }\n }\n return null\n })\n\n const filterOptions = (query: string) => {\n const isValidOption = (o: Option): boolean => {\n if (props.filterable && isFunction(props.filterMethod)) return true\n if (props.filterable && props.remote && isFunction(props.remoteMethod))\n return true\n // when query was given, we should test on the label see whether the label contains the given query\n const regexp = new RegExp(escapeStringRegexp(query), 'i')\n return query ? regexp.test(getLabel(o) || '') : true\n }\n if (props.loading) {\n return []\n }\n\n return [...states.createdOptions, ...props.options].reduce((all, item) => {\n const options = getOptions(item)\n\n if (isArray(options)) {\n const filtered = options.filter(isValidOption)\n\n if (filtered.length > 0) {\n all.push(\n {\n label: getLabel(item),\n type: 'Group',\n },\n ...filtered\n )\n }\n } else if (props.remote || isValidOption(item)) {\n all.push(item)\n }\n\n return all\n }, []) as OptionType[]\n }\n\n const updateOptions = () => {\n allOptions.value = filterOptions('')\n filteredOptions.value = filterOptions(states.inputValue)\n }\n\n const allOptionsValueMap = computed(() => {\n const valueMap = new Map()\n\n allOptions.value.forEach((option, index) => {\n valueMap.set(getValueKey(getValue(option)), { option, index })\n })\n return valueMap\n })\n\n const filteredOptionsValueMap = computed(() => {\n const valueMap = new Map()\n\n filteredOptions.value.forEach((option, index) => {\n valueMap.set(getValueKey(getValue(option)), { option, index })\n })\n return valueMap\n })\n\n const optionsAllDisabled = computed(() =>\n filteredOptions.value.every((option) => getDisabled(option))\n )\n\n const selectSize = useFormSize()\n\n const collapseTagSize = computed(() =>\n 'small' === selectSize.value ? 'small' : 'default'\n )\n\n const calculatePopperSize = () => {\n popperSize.value = selectRef.value?.offsetWidth || 200\n }\n\n const getGapWidth = () => {\n if (!selectionRef.value) return 0\n const style = window.getComputedStyle(selectionRef.value)\n return Number.parseFloat(style.gap || '6px')\n }\n\n // computed style\n const tagStyle = computed(() => {\n const gapWidth = getGapWidth()\n const maxWidth =\n collapseItemRef.value && props.maxCollapseTags === 1\n ? states.selectionWidth - states.collapseItemWidth - gapWidth\n : states.selectionWidth\n return { maxWidth: `${maxWidth}px` }\n })\n\n const collapseTagStyle = computed(() => {\n return { maxWidth: `${states.selectionWidth}px` }\n })\n\n const inputStyle = computed(() => ({\n width: `${Math.max(states.calculatorWidth, MINIMUM_INPUT_WIDTH)}px`,\n }))\n\n const shouldShowPlaceholder = computed(() => {\n if (isArray(props.modelValue)) {\n return props.modelValue.length === 0 && !states.inputValue\n }\n\n // when it's not multiple mode, we only determine this flag based on filterable and expanded\n // when filterable flag is true, which means we have input box on the screen\n return props.filterable ? !states.inputValue : true\n })\n\n const currentPlaceholder = computed(() => {\n const _placeholder = props.placeholder ?? t('el.select.placeholder')\n return props.multiple || !hasModelValue.value\n ? _placeholder\n : states.selectedLabel\n })\n\n // this obtains the actual popper DOM element.\n const popperRef = computed(() => tooltipRef.value?.popperRef?.contentRef)\n\n // the index with current value in options\n const indexRef = computed<number>(() => {\n if (props.multiple) {\n const len = (props.modelValue as []).length\n if (\n (props.modelValue as Array<any>).length > 0 &&\n filteredOptionsValueMap.value.has(props.modelValue[len - 1])\n ) {\n const { index } = filteredOptionsValueMap.value.get(\n props.modelValue[len - 1]\n )\n return index\n }\n } else {\n if (\n props.modelValue &&\n filteredOptionsValueMap.value.has(props.modelValue)\n ) {\n const { index } = filteredOptionsValueMap.value.get(props.modelValue)\n return index\n }\n }\n return -1\n })\n\n const dropdownMenuVisible = computed({\n get() {\n return expanded.value && emptyText.value !== false\n },\n set(val: boolean) {\n expanded.value = val\n },\n })\n\n const showTagList = computed(() => {\n if (!props.multiple) {\n return []\n }\n return props.collapseTags\n ? states.cachedOptions.slice(0, props.maxCollapseTags)\n : states.cachedOptions\n })\n\n const collapseTagList = computed(() => {\n if (!props.multiple) {\n return []\n }\n return props.collapseTags\n ? states.cachedOptions.slice(props.maxCollapseTags)\n : []\n })\n\n // hooks\n const {\n createNewOption,\n removeNewOption,\n selectNewOption,\n clearAllNewOption,\n } = useAllowCreate(props, states)\n\n // methods\n const toggleMenu = () => {\n if (selectDisabled.value) return\n\n if (states.menuVisibleOnFocus) {\n // controlled by automaticDropdown\n states.menuVisibleOnFocus = false\n } else {\n expanded.value = !expanded.value\n }\n }\n\n const onInputChange = () => {\n if (states.inputValue.length > 0 && !expanded.value) {\n expanded.value = true\n }\n createNewOption(states.inputValue)\n handleQueryChange(states.inputValue)\n }\n\n const debouncedOnInputChange = lodashDebounce(onInputChange, debounce.value)\n\n const handleQueryChange = (val: string) => {\n if (states.previousQuery === val || isComposing.value) {\n return\n }\n states.previousQuery = val\n if (props.filterable && isFunction(props.filterMethod)) {\n props.filterMethod(val)\n } else if (\n props.filterable &&\n props.remote &&\n isFunction(props.remoteMethod)\n ) {\n props.remoteMethod(val)\n }\n if (\n props.defaultFirstOption &&\n (props.filterable || props.remote) &&\n filteredOptions.value.length\n ) {\n nextTick(checkDefaultFirstOption)\n } else {\n nextTick(updateHoveringIndex)\n }\n }\n\n /**\n * find and highlight first option as default selected\n * @remark\n * - if the first option in dropdown list is user-created,\n * it would be at the end of the optionsArray\n * so find it and set hover.\n * (NOTE: there must be only one user-created option in dropdown list with query)\n * - if there's no user-created option in list, just find the first one as usual\n * (NOTE: exclude options that are disabled or in disabled-group)\n */\n const checkDefaultFirstOption = () => {\n const optionsInDropdown = filteredOptions.value.filter(\n (n) => !n.disabled && n.type !== 'Group'\n )\n const userCreatedOption = optionsInDropdown.find((n) => n.created)\n const firstOriginOption = optionsInDropdown[0]\n states.hoveringIndex = getValueIndex(\n filteredOptions.value,\n userCreatedOption || firstOriginOption\n )\n }\n\n const emitChange = (val: any | any[]) => {\n if (!isEqual(props.modelValue, val)) {\n emit(CHANGE_EVENT, val)\n }\n }\n\n const update = (val: any) => {\n emit(UPDATE_MODEL_EVENT, val)\n emitChange(val)\n states.previousValue = props.multiple ? String(val) : val\n }\n\n const getValueIndex = (arr: unknown[] = [], value: unknown) => {\n if (!isObject(value)) {\n return arr.indexOf(value)\n }\n const valueKey = props.valueKey\n let index = -1\n arr.some((item, i) => {\n if (get(item, valueKey) === get(value, valueKey)) {\n index = i\n return true\n }\n return false\n })\n return index\n }\n\n const getValueKey = (item: unknown) => {\n return isObject(item) ? get(item, props.valueKey) : item\n }\n\n const handleResize = () => {\n calculatePopperSize()\n }\n\n const resetSelectionWidth = () => {\n states.selectionWidth = selectionRef.value!.getBoundingClientRect().width\n }\n\n const resetCalculatorWidth = () => {\n states.calculatorWidth = calculatorRef.value!.getBoundingClientRect().width\n }\n\n const resetCollapseItemWidth = () => {\n states.collapseItemWidth =\n collapseItemRef.value!.getBoundingClientRect().width\n }\n\n const updateTooltip = () => {\n tooltipRef.value?.updatePopper?.()\n }\n\n const updateTagTooltip = () => {\n tagTooltipRef.value?.updatePopper?.()\n }\n\n const onSelect = (option: Option) => {\n if (props.multiple) {\n let selectedOptions = (props.modelValue as any[]).slice()\n\n const index = getValueIndex(selectedOptions, getValue(option))\n if (index > -1) {\n selectedOptions = [\n ...selectedOptions.slice(0, index),\n ...selectedOptions.slice(index + 1),\n ]\n states.cachedOptions.splice(index, 1)\n removeNewOption(option)\n } else if (\n props.multipleLimit <= 0 ||\n selectedOptions.length < props.multipleLimit\n ) {\n selectedOptions = [...selectedOptions, getValue(option)]\n states.cachedOptions.push(option)\n selectNewOption(option)\n }\n update(selectedOptions)\n if (option.created) {\n handleQueryChange('')\n }\n if (props.filterable && !props.reserveKeyword) {\n states.inputValue = ''\n }\n } else {\n states.selectedLabel = getLabel(option)\n update(getValue(option))\n expanded.value = false\n selectNewOption(option)\n if (!option.created) {\n clearAllNewOption()\n }\n }\n focus()\n }\n\n const deleteTag = (event: MouseEvent, option: Option) => {\n let selectedOptions = (props.modelValue as any[]).slice()\n\n const index = getValueIndex(selectedOptions, getValue(option))\n\n if (index > -1 && !selectDisabled.value) {\n selectedOptions = [\n ...(props.modelValue as Array<unknown>).slice(0, index),\n ...(props.modelValue as Array<unknown>).slice(index + 1),\n ]\n states.cachedOptions.splice(index, 1)\n update(selectedOptions)\n emit('remove-tag', getValue(option))\n removeNewOption(option)\n }\n event.stopPropagation()\n focus()\n }\n\n const focus = () => {\n inputRef.value?.focus()\n }\n\n const blur = () => {\n if (expanded.value) {\n expanded.value = false\n nextTick(() => inputRef.value?.blur())\n return\n }\n inputRef.value?.blur()\n }\n\n // keyboard handlers\n const handleEsc = () => {\n if (states.inputValue.length > 0) {\n states.inputValue = ''\n } else {\n expanded.value = false\n }\n }\n\n const getLastNotDisabledIndex = (value: unknown[]) =>\n findLastIndex(\n value,\n (it) =>\n !states.cachedOptions.some(\n (option) => getValue(option) === it && getDisabled(option)\n )\n )\n\n const handleDel = (e: KeyboardEvent) => {\n if (!props.multiple) return\n if (e.code === EVENT_CODE.delete) return\n if (states.inputValue.length === 0) {\n e.preventDefault()\n const selected = (props.modelValue as Array<any>).slice()\n const lastNotDisabledIndex = getLastNotDisabledIndex(selected)\n if (lastNotDisabledIndex < 0) return\n const removeTagValue = selected[lastNotDisabledIndex]\n selected.splice(lastNotDisabledIndex, 1)\n const option = states.cachedOptions[lastNotDisabledIndex]\n states.cachedOptions.splice(lastNotDisabledIndex, 1)\n removeNewOption(option)\n update(selected)\n emit('remove-tag', removeTagValue)\n }\n }\n\n const handleClear = () => {\n let emptyValue: string | any[]\n if (isArray(props.modelValue)) {\n emptyValue = []\n } else {\n emptyValue = valueOnClear.value\n }\n\n if (props.multiple) {\n states.cachedOptions = []\n } else {\n states.selectedLabel = ''\n }\n expanded.value = false\n update(emptyValue)\n emit('clear')\n clearAllNewOption()\n focus()\n }\n\n const onKeyboardNavigate = (\n direction: 'forward' | 'backward',\n hoveringIndex: number | undefined = undefined\n ): void => {\n const options = filteredOptions.value\n if (\n !['forward', 'backward'].includes(direction) ||\n selectDisabled.value ||\n options.length <= 0 ||\n optionsAllDisabled.value ||\n isComposing.value\n ) {\n return\n }\n if (!expanded.value) {\n return toggleMenu()\n }\n if (hoveringIndex === undefined) {\n hoveringIndex = states.hoveringIndex\n }\n let newIndex = -1\n if (direction === 'forward') {\n newIndex = hoveringIndex + 1\n if (newIndex >= options.length) {\n // return to the first option\n newIndex = 0\n }\n } else if (direction === 'backward') {\n newIndex = hoveringIndex - 1\n if (newIndex < 0 || newIndex >= options.length) {\n // navigate to the last one\n newIndex = options.length - 1\n }\n }\n const option = options[newIndex]\n if (getDisabled(option) || option.type === 'Group') {\n // prevent dispatching multiple nextTick callbacks.\n return onKeyboardNavigate(direction, newIndex)\n } else {\n states.hoveringIndex = newIndex\n scrollToItem(newIndex)\n }\n }\n\n const onKeyboardSelect = () => {\n if (!expanded.value) {\n return toggleMenu()\n } else if (\n ~states.hoveringIndex &&\n filteredOptions.value[states.hoveringIndex]\n ) {\n onSelect(filteredOptions.value[states.hoveringIndex])\n }\n }\n\n const onHoverOption = (idx?: number) => {\n states.hoveringIndex = idx ?? -1\n }\n\n const updateHoveringIndex = () => {\n if (!props.multiple) {\n states.hoveringIndex = filteredOptions.value.findIndex((item) => {\n return getValueKey(item) === getValueKey(props.modelValue)\n })\n } else {\n states.hoveringIndex = filteredOptions.value.findIndex((item) =>\n props.modelValue.some(\n (modelValue: unknown) => getValueKey(modelValue) === getValueKey(item)\n )\n )\n }\n }\n\n const onInput = (event: Event) => {\n states.inputValue = (event.target as HTMLInputElement).value\n if (props.remote) {\n debouncedOnInputChange()\n } else {\n return onInputChange()\n }\n }\n\n const handleClickOutside = (event: Event) => {\n expanded.value = false\n\n if (isFocused.value) {\n const _event = new FocusEvent('focus', event)\n handleBlur(_event)\n }\n }\n\n const handleMenuEnter = () => {\n states.isBeforeHide = false\n return nextTick(() => {\n if (~indexRef.value) {\n scrollToItem(states.hoveringIndex)\n }\n })\n }\n\n const scrollToItem = (index: number) => {\n menuRef.value!.scrollToItem(index)\n }\n\n const getOption = (value: unknown, cachedOptions?: Option[]) => {\n // match the option with the given value, if not found, create a new option\n const selectValue = getValueKey(value)\n\n if (allOptionsValueMap.value.has(selectValue)) {\n const { option } = allOptionsValueMap.value.get(selectValue)\n\n return option\n }\n if (cachedOptions && cachedOptions.length) {\n const option = cachedOptions.find(\n (option) => getValueKey(getValue(option)) === selectValue\n )\n if (option) {\n return option\n }\n }\n\n return {\n [aliasProps.value.value]: value,\n [aliasProps.value.label]: value,\n }\n }\n\n const initStates = (needUpdateSelectedLabel = false) => {\n if (props.multiple) {\n if ((props.modelValue as Array<any>).length > 0) {\n const cachedOptions = states.cachedOptions.slice()\n states.cachedOptions.length = 0\n states.previousValue = props.modelValue.toString()\n\n for (const value of props.modelValue) {\n const option = getOption(value, cachedOptions)\n states.cachedOptions.push(option)\n }\n } else {\n states.cachedOptions = []\n states.previousValue = undefined\n }\n } else {\n if (hasModelValue.value) {\n states.previousValue = props.modelValue\n const options = filteredOptions.value\n const selectedItemIndex = options.findIndex(\n (option) =>\n getValueKey(getValue(option)) === getValueKey(props.modelValue)\n )\n if (~selectedItemIndex) {\n states.selectedLabel = getLabel(options[selectedItemIndex])\n } else {\n if (!states.selectedLabel || needUpdateSelectedLabel) {\n states.selectedLabel = getValueKey(props.modelValue)\n }\n }\n } else {\n states.selectedLabel = ''\n states.previousValue = undefined\n }\n }\n clearAllNewOption()\n calculatePopperSize()\n }\n\n // in order to track these individually, we need to turn them into refs instead of watching the entire\n // reactive object which could cause perf penalty when unnecessary field gets changed the watch method will\n // be invoked.\n\n watch(expanded, (val) => {\n if (val) {\n handleQueryChange('')\n } else {\n states.inputValue = ''\n states.previousQuery = null\n states.isBeforeHide = true\n createNewOption('')\n }\n emit('visible-change', val)\n })\n\n watch(\n () => props.modelValue,\n (val, oldVal) => {\n if (\n !val ||\n (props.multiple && val.toString() !== states.previousValue) ||\n (!props.multiple &&\n getValueKey(val) !== getValueKey(states.previousValue))\n ) {\n initStates(true)\n }\n if (!isEqual(val, oldVal) && props.validateEvent) {\n elFormItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n },\n {\n deep: true,\n }\n )\n\n watch(\n () => props.options,\n () => {\n const input = inputRef.value\n // filter or remote-search scenarios are not initialized\n if (!input || (input && document.activeElement !== input)) {\n initStates()\n }\n },\n {\n deep: true,\n flush: 'post',\n }\n )\n\n // fix the problem that scrollTop is not reset in filterable mode\n watch(\n () => filteredOptions.value,\n () => {\n return menuRef.value && nextTick(menuRef.value.resetScrollTop)\n }\n )\n\n watchEffect(() => {\n // Anything could cause options changed, then update options\n // If you want to control it by condition, write here\n if (states.isBeforeHide) return\n updateOptions()\n })\n\n watchEffect(() => {\n const { valueKey, options } = props\n const duplicateValue = new Map()\n for (const item of options) {\n const optionValue = getValue(item)\n let v = optionValue\n if (isObject(v)) {\n v = get(optionValue, valueKey)\n }\n if (duplicateValue.get(v)) {\n debugWarn(\n 'ElSelectV2',\n `The option values you provided seem to be duplicated, which may cause some problems, please check.`\n )\n break\n } else {\n duplicateValue.set(v, true)\n }\n }\n })\n\n onMounted(() => {\n initStates()\n })\n useResizeObserver(selectRef, handleResize)\n useResizeObserver(selectionRef, resetSelectionWidth)\n useResizeObserver(calculatorRef, resetCalculatorWidth)\n useResizeObserver(menuRef, updateTooltip)\n useResizeObserver(wrapperRef, updateTooltip)\n useResizeObserver(tagMenuRef, updateTagTooltip)\n useResizeObserver(collapseItemRef, resetCollapseItemWidth)\n\n return {\n // data exports\n inputId,\n collapseTagSize,\n currentPlaceholder,\n expanded,\n emptyText,\n popupHeight,\n debounce,\n allOptions,\n filteredOptions,\n iconComponent,\n iconReverse,\n tagStyle,\n collapseTagStyle,\n inputStyle,\n popperSize,\n dropdownMenuVisible,\n hasModelValue,\n shouldShowPlaceholder,\n selectDisabled,\n selectSize,\n needStatusIcon,\n showClearBtn,\n states,\n isFocused,\n nsSelect,\n nsInput,\n\n // refs items exports\n calculatorRef,\n inputRef,\n menuRef,\n tagMenuRef,\n tooltipRef,\n tagTooltipRef,\n selectRef,\n wrapperRef,\n selectionRef,\n prefixRef,\n suffixRef,\n collapseItemRef,\n\n popperRef,\n\n validateState,\n validateIcon,\n showTagList,\n collapseTagList,\n\n // methods exports\n debouncedOnInputChange,\n deleteTag,\n getLabel,\n getValue,\n getDisabled,\n getValueKey,\n handleClear,\n handleClickOutside,\n handleDel,\n handleEsc,\n focus,\n blur,\n handleMenuEnter,\n handleResize,\n resetSelectionWidth,\n resetCalculatorWidth,\n updateTooltip,\n updateTagTooltip,\n updateOptions,\n toggleMenu,\n scrollTo: scrollToItem,\n onInput,\n onKeyboardNavigate,\n onKeyboardSelect,\n onSelect,\n onHover: onHoverOption,\n handleCompositionStart,\n handleCompositionEnd,\n handleCompositionUpdate,\n }\n}\n\nexport default useSelect\n"],"names":["debounce","lodashDebounce"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC1B,MAAC,SAAS,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK;AACnC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC;AAC5B,EAAE,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;AAC1C,EAAE,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;AACxC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,CAAC;AAC/D,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,kBAAkB,CAAC,KAAK,EAAE;AAChD,IAAI,eAAe,EAAE,UAAU;AAC/B,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;AACtF,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/D,EAAE,MAAM,MAAM,GAAG,QAAQ,CAAC;AAC1B,IAAI,UAAU,EAAE,EAAE;AAClB,IAAI,aAAa,EAAE,EAAE;AACrB,IAAI,cAAc,EAAE,EAAE;AACtB,IAAI,aAAa,EAAE,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U;AACd,IAAI,cAAc;AAClB,IAAI,YAAY;AAChB,IAAI,MAAM;AACV,IAAI,SAAS;AACb,IAAI,QAAQ;AACZ,IAAI,OAAO;AACX,IAAI,aAAa;AACjB,IAAI,QAAQ;AACZ,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,UAAU;AACd,IAAI,aAAa;AACjB,IAAI,SAAS;AACb,IAAI,UAAU;AACd,IAAI,YAAY;AAChB,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,SAAS;AACb,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,eAAe;AACnB,IAAI,sBAAsB;AAC1B,IAAI,SAAS;AACb,IAAI,QAAQ;AACZ,IAAI,QAAQ;AACZ,IAAI,WAAW;AACf,IAAI,WAAW;AACf,IAAI,WAAW;AACf,IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,KAAK;AACT,IAAI,IAAI;AACR,IAAI,eAAe;AACnB,IAAI,YAAY;AAChB,IAAI,mBAAmB;AACvB,IAAI,oBAAoB;AACxB,IAAI,aAAa;AACjB,IAAI,gBAAgB;AACpB,IAAI,aAAa;AACjB,IAAI,UAAU;AACd,IAAI,QAAQ,EAAE,YAAY;AAC1B,IAAI,OAAO;AACX,IAAI,kBAAkB;AACtB,IAAI,gBAAgB;AACpB,IAAI,QAAQ;AACZ,IAAI,OAAO,EAAE,aAAa;AAC1B,IAAI,sBAAsB;AAC1B,IAAI,oBAAoB;AACxB,IAAI,uBAAuB;AAC3B,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"useSelect.mjs","sources":["../../../../../../packages/components/select-v2/src/useSelect.ts"],"sourcesContent":["import {\n computed,\n nextTick,\n onMounted,\n reactive,\n ref,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n findLastIndex,\n get,\n isEqual,\n debounce as lodashDebounce,\n} from 'lodash-unified'\nimport { useResizeObserver } from '@vueuse/core'\nimport {\n ValidateComponentsMap,\n debugWarn,\n escapeStringRegexp,\n isArray,\n isFunction,\n isObject,\n} from '@element-plus/utils'\nimport {\n useComposition,\n useEmptyValues,\n useFocusController,\n useLocale,\n useNamespace,\n} from '@element-plus/hooks'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport {\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\n\nimport { ArrowDown } from '@element-plus/icons-vue'\nimport { useAllowCreate } from './useAllowCreate'\nimport { useProps } from './useProps'\n\nimport type { Option, OptionType, SelectStates } from './select.types'\nimport type { ISelectV2Props } from './token'\nimport type { SelectEmitFn } from './defaults'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { SelectDropdownInstance } from './select-dropdown'\n\nconst MINIMUM_INPUT_WIDTH = 11\n\nconst useSelect = (props: ISelectV2Props, emit: SelectEmitFn) => {\n // inject\n const { t } = useLocale()\n const nsSelect = useNamespace('select')\n const nsInput = useNamespace('input')\n const { form: elForm, formItem: elFormItem } = useFormItem()\n const { inputId } = useFormItemInputId(props, {\n formItemContext: elFormItem,\n })\n const { aliasProps, getLabel, getValue, getDisabled, getOptions } =\n useProps(props)\n const { valueOnClear, isEmptyValue } = useEmptyValues(props)\n\n const states: SelectStates = reactive({\n inputValue: '',\n cachedOptions: [],\n createdOptions: [],\n hoveringIndex: -1,\n inputHovering: false,\n selectionWidth: 0,\n calculatorWidth: 0,\n collapseItemWidth: 0,\n previousQuery: null,\n previousValue: undefined,\n selectedLabel: '',\n menuVisibleOnFocus: false,\n isBeforeHide: false,\n })\n\n // data refs\n const popperSize = ref(-1)\n\n // DOM & Component refs\n const selectRef = ref<HTMLElement>()\n const selectionRef = ref<HTMLElement>()\n const tooltipRef = ref<TooltipInstance>()\n const tagTooltipRef = ref<TooltipInstance>()\n const inputRef = ref<HTMLElement>()\n const calculatorRef = ref<HTMLElement>()\n const prefixRef = ref<HTMLElement>()\n const suffixRef = ref<HTMLElement>()\n const menuRef = ref<SelectDropdownInstance>()\n const tagMenuRef = ref<HTMLElement>()\n const collapseItemRef = ref<HTMLElement>()\n\n const {\n isComposing,\n handleCompositionStart,\n handleCompositionEnd,\n handleCompositionUpdate,\n } = useComposition({\n afterComposition: (e) => onInput(e),\n })\n\n const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {\n beforeFocus() {\n return selectDisabled.value\n },\n afterFocus() {\n if (props.automaticDropdown && !expanded.value) {\n expanded.value = true\n states.menuVisibleOnFocus = true\n }\n },\n beforeBlur(event) {\n return (\n tooltipRef.value?.isFocusInsideContent(event) ||\n tagTooltipRef.value?.isFocusInsideContent(event)\n )\n },\n afterBlur() {\n expanded.value = false\n states.menuVisibleOnFocus = false\n },\n })\n\n const allOptions = ref<OptionType[]>([])\n const filteredOptions = ref<OptionType[]>([])\n // the controller of the expanded popup\n const expanded = ref(false)\n\n const selectDisabled = computed(() => props.disabled || elForm?.disabled)\n\n const needStatusIcon = computed(() => elForm?.statusIcon ?? false)\n\n const popupHeight = computed(() => {\n const totalHeight = filteredOptions.value.length * props.itemHeight\n return totalHeight > props.height ? props.height : totalHeight\n })\n\n const hasModelValue = computed(() => {\n return props.multiple\n ? isArray(props.modelValue) && props.modelValue.length > 0\n : !isEmptyValue(props.modelValue)\n })\n\n const showClearBtn = computed(() => {\n return (\n props.clearable &&\n !selectDisabled.value &&\n states.inputHovering &&\n hasModelValue.value\n )\n })\n\n const iconComponent = computed(() =>\n props.remote && props.filterable ? '' : ArrowDown\n )\n\n const iconReverse = computed(\n () => iconComponent.value && nsSelect.is('reverse', expanded.value)\n )\n\n const validateState = computed(() => elFormItem?.validateState || '')\n const validateIcon = computed(() => {\n // When we use indexed access to get the type of an undeclared property,\n // the unsafe type `any` will be inferred, which TypeScript throws an error to emphasize it.\n // To avoid TypeScript complaining about it, we use truthiness narrowing to narrow the type of validateState.\n if (!validateState.value) return\n return ValidateComponentsMap[validateState.value]\n })\n\n const debounce = computed(() => (props.remote ? 300 : 0))\n\n // filteredOptions includes flatten the data into one dimensional array.\n const emptyText = computed(() => {\n if (props.loading) {\n return props.loadingText || t('el.select.loading')\n } else {\n if (props.remote && !states.inputValue && allOptions.value.length === 0)\n return false\n if (\n props.filterable &&\n states.inputValue &&\n allOptions.value.length > 0 &&\n filteredOptions.value.length === 0\n ) {\n return props.noMatchText || t('el.select.noMatch')\n }\n if (allOptions.value.length === 0) {\n return props.noDataText || t('el.select.noData')\n }\n }\n return null\n })\n\n const filterOptions = (query: string) => {\n const isValidOption = (o: Option): boolean => {\n if (props.filterable && isFunction(props.filterMethod)) return true\n if (props.filterable && props.remote && isFunction(props.remoteMethod))\n return true\n // when query was given, we should test on the label see whether the label contains the given query\n const regexp = new RegExp(escapeStringRegexp(query), 'i')\n return query ? regexp.test(getLabel(o) || '') : true\n }\n if (props.loading) {\n return []\n }\n\n return [...states.createdOptions, ...props.options].reduce((all, item) => {\n const options = getOptions(item)\n\n if (isArray(options)) {\n const filtered = options.filter(isValidOption)\n\n if (filtered.length > 0) {\n all.push(\n {\n label: getLabel(item),\n type: 'Group',\n },\n ...filtered\n )\n }\n } else if (props.remote || isValidOption(item)) {\n all.push(item)\n }\n\n return all\n }, []) as OptionType[]\n }\n\n const updateOptions = () => {\n allOptions.value = filterOptions('')\n filteredOptions.value = filterOptions(states.inputValue)\n }\n\n const allOptionsValueMap = computed(() => {\n const valueMap = new Map()\n\n allOptions.value.forEach((option, index) => {\n valueMap.set(getValueKey(getValue(option)), { option, index })\n })\n return valueMap\n })\n\n const filteredOptionsValueMap = computed(() => {\n const valueMap = new Map()\n\n filteredOptions.value.forEach((option, index) => {\n valueMap.set(getValueKey(getValue(option)), { option, index })\n })\n return valueMap\n })\n\n const optionsAllDisabled = computed(() =>\n filteredOptions.value.every((option) => getDisabled(option))\n )\n\n const selectSize = useFormSize()\n\n const collapseTagSize = computed(() =>\n 'small' === selectSize.value ? 'small' : 'default'\n )\n\n const calculatePopperSize = () => {\n popperSize.value = selectRef.value?.offsetWidth || 200\n }\n\n const getGapWidth = () => {\n if (!selectionRef.value) return 0\n const style = window.getComputedStyle(selectionRef.value)\n return Number.parseFloat(style.gap || '6px')\n }\n\n // computed style\n const tagStyle = computed(() => {\n const gapWidth = getGapWidth()\n const maxWidth =\n collapseItemRef.value && props.maxCollapseTags === 1\n ? states.selectionWidth - states.collapseItemWidth - gapWidth\n : states.selectionWidth\n return { maxWidth: `${maxWidth}px` }\n })\n\n const collapseTagStyle = computed(() => {\n return { maxWidth: `${states.selectionWidth}px` }\n })\n\n const inputStyle = computed(() => ({\n width: `${Math.max(states.calculatorWidth, MINIMUM_INPUT_WIDTH)}px`,\n }))\n\n const shouldShowPlaceholder = computed(() => {\n if (isArray(props.modelValue)) {\n return props.modelValue.length === 0 && !states.inputValue\n }\n\n // when it's not multiple mode, we only determine this flag based on filterable and expanded\n // when filterable flag is true, which means we have input box on the screen\n return props.filterable ? !states.inputValue : true\n })\n\n const currentPlaceholder = computed(() => {\n const _placeholder = props.placeholder ?? t('el.select.placeholder')\n return props.multiple || !hasModelValue.value\n ? _placeholder\n : states.selectedLabel\n })\n\n // this obtains the actual popper DOM element.\n const popperRef = computed(() => tooltipRef.value?.popperRef?.contentRef)\n\n // the index with current value in options\n const indexRef = computed<number>(() => {\n if (props.multiple) {\n const len = (props.modelValue as []).length\n if (\n (props.modelValue as Array<any>).length > 0 &&\n filteredOptionsValueMap.value.has(props.modelValue[len - 1])\n ) {\n const { index } = filteredOptionsValueMap.value.get(\n props.modelValue[len - 1]\n )\n return index\n }\n } else {\n if (\n props.modelValue &&\n filteredOptionsValueMap.value.has(props.modelValue)\n ) {\n const { index } = filteredOptionsValueMap.value.get(props.modelValue)\n return index\n }\n }\n return -1\n })\n\n const dropdownMenuVisible = computed({\n get() {\n return expanded.value && emptyText.value !== false\n },\n set(val: boolean) {\n expanded.value = val\n },\n })\n\n const showTagList = computed(() => {\n if (!props.multiple) {\n return []\n }\n return props.collapseTags\n ? states.cachedOptions.slice(0, props.maxCollapseTags)\n : states.cachedOptions\n })\n\n const collapseTagList = computed(() => {\n if (!props.multiple) {\n return []\n }\n return props.collapseTags\n ? states.cachedOptions.slice(props.maxCollapseTags)\n : []\n })\n\n // hooks\n const {\n createNewOption,\n removeNewOption,\n selectNewOption,\n clearAllNewOption,\n } = useAllowCreate(props, states)\n\n // methods\n const toggleMenu = () => {\n if (selectDisabled.value) return\n\n if (states.menuVisibleOnFocus) {\n // controlled by automaticDropdown\n states.menuVisibleOnFocus = false\n } else {\n expanded.value = !expanded.value\n }\n }\n\n const onInputChange = () => {\n if (states.inputValue.length > 0 && !expanded.value) {\n expanded.value = true\n }\n createNewOption(states.inputValue)\n handleQueryChange(states.inputValue)\n }\n\n const debouncedOnInputChange = lodashDebounce(onInputChange, debounce.value)\n\n const handleQueryChange = (val: string) => {\n if (states.previousQuery === val || isComposing.value) {\n return\n }\n states.previousQuery = val\n if (props.filterable && isFunction(props.filterMethod)) {\n props.filterMethod(val)\n } else if (\n props.filterable &&\n props.remote &&\n isFunction(props.remoteMethod)\n ) {\n props.remoteMethod(val)\n }\n if (\n props.defaultFirstOption &&\n (props.filterable || props.remote) &&\n filteredOptions.value.length\n ) {\n nextTick(checkDefaultFirstOption)\n } else {\n nextTick(updateHoveringIndex)\n }\n }\n\n /**\n * find and highlight first option as default selected\n * @remark\n * - if the first option in dropdown list is user-created,\n * it would be at the end of the optionsArray\n * so find it and set hover.\n * (NOTE: there must be only one user-created option in dropdown list with query)\n * - if there's no user-created option in list, just find the first one as usual\n * (NOTE: exclude options that are disabled or in disabled-group)\n */\n const checkDefaultFirstOption = () => {\n const optionsInDropdown = filteredOptions.value.filter(\n (n) => !n.disabled && n.type !== 'Group'\n )\n const userCreatedOption = optionsInDropdown.find((n) => n.created)\n const firstOriginOption = optionsInDropdown[0]\n states.hoveringIndex = getValueIndex(\n filteredOptions.value,\n userCreatedOption || firstOriginOption\n )\n }\n\n const emitChange = (val: any | any[]) => {\n if (!isEqual(props.modelValue, val)) {\n emit(CHANGE_EVENT, val)\n }\n }\n\n const update = (val: any) => {\n emit(UPDATE_MODEL_EVENT, val)\n emitChange(val)\n states.previousValue = props.multiple ? String(val) : val\n }\n\n const getValueIndex = (arr: unknown[] = [], value: unknown) => {\n if (!isObject(value)) {\n return arr.indexOf(value)\n }\n const valueKey = props.valueKey\n let index = -1\n arr.some((item, i) => {\n if (get(item, valueKey) === get(value, valueKey)) {\n index = i\n return true\n }\n return false\n })\n return index\n }\n\n const getValueKey = (item: unknown) => {\n return isObject(item) ? get(item, props.valueKey) : item\n }\n\n const handleResize = () => {\n calculatePopperSize()\n }\n\n const resetSelectionWidth = () => {\n states.selectionWidth = selectionRef.value!.getBoundingClientRect().width\n }\n\n const resetCalculatorWidth = () => {\n states.calculatorWidth = calculatorRef.value!.getBoundingClientRect().width\n }\n\n const resetCollapseItemWidth = () => {\n states.collapseItemWidth =\n collapseItemRef.value!.getBoundingClientRect().width\n }\n\n const updateTooltip = () => {\n tooltipRef.value?.updatePopper?.()\n }\n\n const updateTagTooltip = () => {\n tagTooltipRef.value?.updatePopper?.()\n }\n\n const onSelect = (option: Option) => {\n if (props.multiple) {\n let selectedOptions = (props.modelValue as any[]).slice()\n\n const index = getValueIndex(selectedOptions, getValue(option))\n if (index > -1) {\n selectedOptions = [\n ...selectedOptions.slice(0, index),\n ...selectedOptions.slice(index + 1),\n ]\n states.cachedOptions.splice(index, 1)\n removeNewOption(option)\n } else if (\n props.multipleLimit <= 0 ||\n selectedOptions.length < props.multipleLimit\n ) {\n selectedOptions = [...selectedOptions, getValue(option)]\n states.cachedOptions.push(option)\n selectNewOption(option)\n }\n update(selectedOptions)\n if (option.created) {\n handleQueryChange('')\n }\n if (props.filterable && !props.reserveKeyword) {\n states.inputValue = ''\n }\n } else {\n states.selectedLabel = getLabel(option)\n update(getValue(option))\n expanded.value = false\n selectNewOption(option)\n if (!option.created) {\n clearAllNewOption()\n }\n }\n focus()\n }\n\n const deleteTag = (event: MouseEvent, option: Option) => {\n let selectedOptions = (props.modelValue as any[]).slice()\n\n const index = getValueIndex(selectedOptions, getValue(option))\n\n if (index > -1 && !selectDisabled.value) {\n selectedOptions = [\n ...(props.modelValue as Array<unknown>).slice(0, index),\n ...(props.modelValue as Array<unknown>).slice(index + 1),\n ]\n states.cachedOptions.splice(index, 1)\n update(selectedOptions)\n emit('remove-tag', getValue(option))\n removeNewOption(option)\n }\n event.stopPropagation()\n focus()\n }\n\n const focus = () => {\n inputRef.value?.focus()\n }\n\n const blur = () => {\n if (expanded.value) {\n expanded.value = false\n nextTick(() => inputRef.value?.blur())\n return\n }\n inputRef.value?.blur()\n }\n\n // keyboard handlers\n const handleEsc = () => {\n if (states.inputValue.length > 0) {\n states.inputValue = ''\n } else {\n expanded.value = false\n }\n }\n\n const getLastNotDisabledIndex = (value: unknown[]) =>\n findLastIndex(\n value,\n (it) =>\n !states.cachedOptions.some(\n (option) => getValue(option) === it && getDisabled(option)\n )\n )\n\n const handleDel = (e: KeyboardEvent) => {\n if (!props.multiple) return\n if (e.code === EVENT_CODE.delete) return\n if (states.inputValue.length === 0) {\n e.preventDefault()\n const selected = (props.modelValue as Array<any>).slice()\n const lastNotDisabledIndex = getLastNotDisabledIndex(selected)\n if (lastNotDisabledIndex < 0) return\n const removeTagValue = selected[lastNotDisabledIndex]\n selected.splice(lastNotDisabledIndex, 1)\n const option = states.cachedOptions[lastNotDisabledIndex]\n states.cachedOptions.splice(lastNotDisabledIndex, 1)\n removeNewOption(option)\n update(selected)\n emit('remove-tag', removeTagValue)\n }\n }\n\n const handleClear = () => {\n let emptyValue: string | any[]\n if (isArray(props.modelValue)) {\n emptyValue = []\n } else {\n emptyValue = valueOnClear.value\n }\n\n if (props.multiple) {\n states.cachedOptions = []\n } else {\n states.selectedLabel = ''\n }\n expanded.value = false\n update(emptyValue)\n emit('clear')\n clearAllNewOption()\n focus()\n }\n\n const onKeyboardNavigate = (\n direction: 'forward' | 'backward',\n hoveringIndex: number | undefined = undefined\n ): void => {\n const options = filteredOptions.value\n if (\n !['forward', 'backward'].includes(direction) ||\n selectDisabled.value ||\n options.length <= 0 ||\n optionsAllDisabled.value ||\n isComposing.value\n ) {\n return\n }\n if (!expanded.value) {\n return toggleMenu()\n }\n if (hoveringIndex === undefined) {\n hoveringIndex = states.hoveringIndex\n }\n let newIndex = -1\n if (direction === 'forward') {\n newIndex = hoveringIndex + 1\n if (newIndex >= options.length) {\n // return to the first option\n newIndex = 0\n }\n } else if (direction === 'backward') {\n newIndex = hoveringIndex - 1\n if (newIndex < 0 || newIndex >= options.length) {\n // navigate to the last one\n newIndex = options.length - 1\n }\n }\n const option = options[newIndex]\n if (getDisabled(option) || option.type === 'Group') {\n // prevent dispatching multiple nextTick callbacks.\n return onKeyboardNavigate(direction, newIndex)\n } else {\n states.hoveringIndex = newIndex\n scrollToItem(newIndex)\n }\n }\n\n const onKeyboardSelect = () => {\n if (!expanded.value) {\n return toggleMenu()\n } else if (\n ~states.hoveringIndex &&\n filteredOptions.value[states.hoveringIndex]\n ) {\n onSelect(filteredOptions.value[states.hoveringIndex])\n }\n }\n\n const onHoverOption = (idx?: number) => {\n states.hoveringIndex = idx ?? -1\n }\n\n const updateHoveringIndex = () => {\n if (!props.multiple) {\n states.hoveringIndex = filteredOptions.value.findIndex((item) => {\n return getValueKey(item) === getValueKey(props.modelValue)\n })\n } else {\n states.hoveringIndex = filteredOptions.value.findIndex((item) =>\n props.modelValue.some(\n (modelValue: unknown) => getValueKey(modelValue) === getValueKey(item)\n )\n )\n }\n }\n\n const onInput = (event: Event) => {\n states.inputValue = (event.target as HTMLInputElement).value\n if (props.remote) {\n debouncedOnInputChange()\n } else {\n return onInputChange()\n }\n }\n\n const handleClickOutside = (event: Event) => {\n expanded.value = false\n\n if (isFocused.value) {\n const _event = new FocusEvent('focus', event)\n handleBlur(_event)\n }\n }\n\n const handleMenuEnter = () => {\n states.isBeforeHide = false\n return nextTick(() => {\n if (~indexRef.value) {\n scrollToItem(states.hoveringIndex)\n }\n })\n }\n\n const scrollToItem = (index: number) => {\n menuRef.value!.scrollToItem(index)\n }\n\n const getOption = (value: unknown, cachedOptions?: Option[]) => {\n // match the option with the given value, if not found, create a new option\n const selectValue = getValueKey(value)\n\n if (allOptionsValueMap.value.has(selectValue)) {\n const { option } = allOptionsValueMap.value.get(selectValue)\n\n return option\n }\n if (cachedOptions && cachedOptions.length) {\n const option = cachedOptions.find(\n (option) => getValueKey(getValue(option)) === selectValue\n )\n if (option) {\n return option\n }\n }\n\n return {\n [aliasProps.value.value]: value,\n [aliasProps.value.label]: value,\n }\n }\n\n const initStates = (needUpdateSelectedLabel = false) => {\n if (props.multiple) {\n if ((props.modelValue as Array<any>).length > 0) {\n const cachedOptions = states.cachedOptions.slice()\n states.cachedOptions.length = 0\n states.previousValue = props.modelValue.toString()\n\n for (const value of props.modelValue) {\n const option = getOption(value, cachedOptions)\n states.cachedOptions.push(option)\n }\n } else {\n states.cachedOptions = []\n states.previousValue = undefined\n }\n } else {\n if (hasModelValue.value) {\n states.previousValue = props.modelValue\n const options = filteredOptions.value\n const selectedItemIndex = options.findIndex(\n (option) =>\n getValueKey(getValue(option)) === getValueKey(props.modelValue)\n )\n if (~selectedItemIndex) {\n states.selectedLabel = getLabel(options[selectedItemIndex])\n } else {\n if (!states.selectedLabel || needUpdateSelectedLabel) {\n states.selectedLabel = getValueKey(props.modelValue)\n }\n }\n } else {\n states.selectedLabel = ''\n states.previousValue = undefined\n }\n }\n clearAllNewOption()\n calculatePopperSize()\n }\n\n // in order to track these individually, we need to turn them into refs instead of watching the entire\n // reactive object which could cause perf penalty when unnecessary field gets changed the watch method will\n // be invoked.\n\n watch(expanded, (val) => {\n if (val) {\n handleQueryChange('')\n } else {\n states.inputValue = ''\n states.previousQuery = null\n states.isBeforeHide = true\n createNewOption('')\n }\n emit('visible-change', val)\n })\n\n watch(\n () => props.modelValue,\n (val, oldVal) => {\n const isValEmpty = !val || (isArray(val) && val.length === 0)\n\n if (\n isValEmpty ||\n (props.multiple && !isEqual(val.toString(), states.previousValue)) ||\n (!props.multiple &&\n getValueKey(val) !== getValueKey(states.previousValue))\n ) {\n initStates(true)\n }\n if (!isEqual(val, oldVal) && props.validateEvent) {\n elFormItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n },\n {\n deep: true,\n }\n )\n\n watch(\n () => props.options,\n () => {\n const input = inputRef.value\n // filter or remote-search scenarios are not initialized\n if (!input || (input && document.activeElement !== input)) {\n initStates()\n }\n },\n {\n deep: true,\n flush: 'post',\n }\n )\n\n // fix the problem that scrollTop is not reset in filterable mode\n watch(\n () => filteredOptions.value,\n () => {\n return menuRef.value && nextTick(menuRef.value.resetScrollTop)\n }\n )\n\n watchEffect(() => {\n // Anything could cause options changed, then update options\n // If you want to control it by condition, write here\n if (states.isBeforeHide) return\n updateOptions()\n })\n\n watchEffect(() => {\n const { valueKey, options } = props\n const duplicateValue = new Map()\n for (const item of options) {\n const optionValue = getValue(item)\n let v = optionValue\n if (isObject(v)) {\n v = get(optionValue, valueKey)\n }\n if (duplicateValue.get(v)) {\n debugWarn(\n 'ElSelectV2',\n `The option values you provided seem to be duplicated, which may cause some problems, please check.`\n )\n break\n } else {\n duplicateValue.set(v, true)\n }\n }\n })\n\n onMounted(() => {\n initStates()\n })\n useResizeObserver(selectRef, handleResize)\n useResizeObserver(selectionRef, resetSelectionWidth)\n useResizeObserver(calculatorRef, resetCalculatorWidth)\n useResizeObserver(menuRef, updateTooltip)\n useResizeObserver(wrapperRef, updateTooltip)\n useResizeObserver(tagMenuRef, updateTagTooltip)\n useResizeObserver(collapseItemRef, resetCollapseItemWidth)\n\n return {\n // data exports\n inputId,\n collapseTagSize,\n currentPlaceholder,\n expanded,\n emptyText,\n popupHeight,\n debounce,\n allOptions,\n filteredOptions,\n iconComponent,\n iconReverse,\n tagStyle,\n collapseTagStyle,\n inputStyle,\n popperSize,\n dropdownMenuVisible,\n hasModelValue,\n shouldShowPlaceholder,\n selectDisabled,\n selectSize,\n needStatusIcon,\n showClearBtn,\n states,\n isFocused,\n nsSelect,\n nsInput,\n\n // refs items exports\n calculatorRef,\n inputRef,\n menuRef,\n tagMenuRef,\n tooltipRef,\n tagTooltipRef,\n selectRef,\n wrapperRef,\n selectionRef,\n prefixRef,\n suffixRef,\n collapseItemRef,\n\n popperRef,\n\n validateState,\n validateIcon,\n showTagList,\n collapseTagList,\n\n // methods exports\n debouncedOnInputChange,\n deleteTag,\n getLabel,\n getValue,\n getDisabled,\n getValueKey,\n handleClear,\n handleClickOutside,\n handleDel,\n handleEsc,\n focus,\n blur,\n handleMenuEnter,\n handleResize,\n resetSelectionWidth,\n resetCalculatorWidth,\n updateTooltip,\n updateTagTooltip,\n updateOptions,\n toggleMenu,\n scrollTo: scrollToItem,\n onInput,\n onKeyboardNavigate,\n onKeyboardSelect,\n onSelect,\n onHover: onHoverOption,\n handleCompositionStart,\n handleCompositionEnd,\n handleCompositionUpdate,\n }\n}\n\nexport default useSelect\n"],"names":["debounce","lodashDebounce"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC1B,MAAC,SAAS,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK;AACnC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC;AAC5B,EAAE,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;AAC1C,EAAE,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;AACxC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,CAAC;AAC/D,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,kBAAkB,CAAC,KAAK,EAAE;AAChD,IAAI,eAAe,EAAE,UAAU;AAC/B,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAA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AO;AACX,IAAI,kBAAkB;AACtB,IAAI,gBAAgB;AACpB,IAAI,QAAQ;AACZ,IAAI,OAAO,EAAE,aAAa;AAC1B,IAAI,sBAAsB;AAC1B,IAAI,oBAAoB;AACxB,IAAI,uBAAuB;AAC3B,GAAG,CAAC;AACJ;;;;"}
@@ -6,7 +6,6 @@ import { sliderContextKey } from '../constants.mjs';
6
6
  import { EVENT_CODE } from '../../../../constants/aria.mjs';
7
7
  import { UPDATE_MODEL_EVENT } from '../../../../constants/event.mjs';
8
8
 
9
- const { left, down, right, up, home, end, pageUp, pageDown } = EVENT_CODE;
10
9
  const useTooltip = (props, formatTooltip, showTooltip) => {
11
10
  const tooltip = ref();
12
11
  const tooltipVisible = ref(false);
@@ -107,20 +106,30 @@ const useSliderButton = (props, initData, emit) => {
107
106
  };
108
107
  const onKeyDown = (event) => {
109
108
  let isPreventDefault = true;
110
- if ([left, down].includes(event.key)) {
111
- onLeftKeyDown();
112
- } else if ([right, up].includes(event.key)) {
113
- onRightKeyDown();
114
- } else if (event.key === home) {
115
- onHomeKeyDown();
116
- } else if (event.key === end) {
117
- onEndKeyDown();
118
- } else if (event.key === pageDown) {
119
- onPageDownKeyDown();
120
- } else if (event.key === pageUp) {
121
- onPageUpKeyDown();
122
- } else {
123
- isPreventDefault = false;
109
+ switch (event.code) {
110
+ case EVENT_CODE.left:
111
+ case EVENT_CODE.down:
112
+ onLeftKeyDown();
113
+ break;
114
+ case EVENT_CODE.right:
115
+ case EVENT_CODE.up:
116
+ onRightKeyDown();
117
+ break;
118
+ case EVENT_CODE.home:
119
+ onHomeKeyDown();
120
+ break;
121
+ case EVENT_CODE.end:
122
+ onEndKeyDown();
123
+ break;
124
+ case EVENT_CODE.pageDown:
125
+ onPageDownKeyDown();
126
+ break;
127
+ case EVENT_CODE.pageUp:
128
+ onPageUpKeyDown();
129
+ break;
130
+ default:
131
+ isPreventDefault = false;
132
+ break;
124
133
  }
125
134
  isPreventDefault && event.preventDefault();
126
135
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-slider-button.mjs","sources":["../../../../../../../packages/components/slider/src/composables/use-slider-button.ts"],"sourcesContent":["import { computed, inject, nextTick, ref, watch } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { useEventListener } from '@vueuse/core'\nimport { EVENT_CODE, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { sliderContextKey } from '../constants'\n\nimport type { CSSProperties, ComputedRef, Ref, SetupContext } from 'vue'\nimport type { SliderProps } from '../slider'\nimport type {\n SliderButtonEmits,\n SliderButtonInitData,\n SliderButtonProps,\n} from '../button'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\nconst { left, down, right, up, home, end, pageUp, pageDown } = EVENT_CODE\n\nconst useTooltip = (\n props: SliderButtonProps,\n formatTooltip: Ref<SliderProps['formatTooltip']>,\n showTooltip: Ref<SliderProps['showTooltip']>\n) => {\n const tooltip = ref<TooltipInstance>()\n\n const tooltipVisible = ref(false)\n\n const enableFormat = computed(() => {\n return formatTooltip.value instanceof Function\n })\n\n const formatValue = computed(() => {\n return (\n (enableFormat.value && formatTooltip.value!(props.modelValue)) ||\n props.modelValue\n )\n })\n\n const displayTooltip = debounce(() => {\n showTooltip.value && (tooltipVisible.value = true)\n }, 50)\n\n const hideTooltip = debounce(() => {\n showTooltip.value && (tooltipVisible.value = false)\n }, 50)\n\n return {\n tooltip,\n tooltipVisible,\n formatValue,\n displayTooltip,\n hideTooltip,\n }\n}\n\nexport const useSliderButton = (\n props: SliderButtonProps,\n initData: SliderButtonInitData,\n emit: SetupContext<SliderButtonEmits>['emit']\n) => {\n const {\n disabled,\n min,\n max,\n step,\n showTooltip,\n precision,\n sliderSize,\n formatTooltip,\n emitChange,\n resetSize,\n updateDragging,\n } = inject(sliderContextKey)!\n\n const { tooltip, tooltipVisible, formatValue, displayTooltip, hideTooltip } =\n useTooltip(props, formatTooltip!, showTooltip)\n\n const button = ref<HTMLDivElement>()\n\n const currentPosition = computed(() => {\n return `${\n ((props.modelValue - min.value) / (max.value - min.value)) * 100\n }%`\n })\n\n const wrapperStyle: ComputedRef<CSSProperties> = computed(() => {\n return props.vertical\n ? { bottom: currentPosition.value }\n : { left: currentPosition.value }\n })\n\n const handleMouseEnter = () => {\n initData.hovering = true\n displayTooltip()\n }\n\n const handleMouseLeave = () => {\n initData.hovering = false\n if (!initData.dragging) {\n hideTooltip()\n }\n }\n\n const onButtonDown = (event: MouseEvent | TouchEvent) => {\n if (disabled.value) return\n event.preventDefault()\n onDragStart(event)\n window.addEventListener('mousemove', onDragging)\n window.addEventListener('touchmove', onDragging)\n window.addEventListener('mouseup', onDragEnd)\n window.addEventListener('touchend', onDragEnd)\n window.addEventListener('contextmenu', onDragEnd)\n button.value!.focus()\n }\n\n const incrementPosition = (amount: number) => {\n if (disabled.value) return\n initData.newPosition =\n Number.parseFloat(currentPosition.value) +\n (amount / (max.value - min.value)) * 100\n setPosition(initData.newPosition)\n emitChange()\n }\n\n const onLeftKeyDown = () => {\n incrementPosition(-step.value)\n }\n\n const onRightKeyDown = () => {\n incrementPosition(step.value)\n }\n\n const onPageDownKeyDown = () => {\n incrementPosition(-step.value * 4)\n }\n\n const onPageUpKeyDown = () => {\n incrementPosition(step.value * 4)\n }\n\n const onHomeKeyDown = () => {\n if (disabled.value) return\n setPosition(0)\n emitChange()\n }\n\n const onEndKeyDown = () => {\n if (disabled.value) return\n setPosition(100)\n emitChange()\n }\n\n const onKeyDown = (event: KeyboardEvent) => {\n let isPreventDefault = true\n if ([left, down].includes(event.key)) {\n onLeftKeyDown()\n } else if ([right, up].includes(event.key)) {\n onRightKeyDown()\n } else if (event.key === home) {\n onHomeKeyDown()\n } else if (event.key === end) {\n onEndKeyDown()\n } else if (event.key === pageDown) {\n onPageDownKeyDown()\n } else if (event.key === pageUp) {\n onPageUpKeyDown()\n } else {\n isPreventDefault = false\n }\n isPreventDefault && event.preventDefault()\n }\n\n const getClientXY = (event: MouseEvent | TouchEvent) => {\n let clientX: number\n let clientY: number\n if (event.type.startsWith('touch')) {\n clientY = (event as TouchEvent).touches[0].clientY\n clientX = (event as TouchEvent).touches[0].clientX\n } else {\n clientY = (event as MouseEvent).clientY\n clientX = (event as MouseEvent).clientX\n }\n return {\n clientX,\n clientY,\n }\n }\n\n const onDragStart = (event: MouseEvent | TouchEvent) => {\n initData.dragging = true\n initData.isClick = true\n const { clientX, clientY } = getClientXY(event)\n if (props.vertical) {\n initData.startY = clientY\n } else {\n initData.startX = clientX\n }\n initData.startPosition = Number.parseFloat(currentPosition.value)\n initData.newPosition = initData.startPosition\n }\n\n const onDragging = (event: MouseEvent | TouchEvent) => {\n if (initData.dragging) {\n initData.isClick = false\n displayTooltip()\n resetSize()\n let diff: number\n const { clientX, clientY } = getClientXY(event)\n if (props.vertical) {\n initData.currentY = clientY\n diff = ((initData.startY - initData.currentY) / sliderSize.value) * 100\n } else {\n initData.currentX = clientX\n diff = ((initData.currentX - initData.startX) / sliderSize.value) * 100\n }\n initData.newPosition = initData.startPosition + diff\n setPosition(initData.newPosition)\n }\n }\n\n const onDragEnd = () => {\n if (initData.dragging) {\n /*\n * 防止在 mouseup 后立即触发 click,导致滑块有几率产生一小段位移\n * 不使用 preventDefault 是因为 mouseup 和 click 没有注册在同一个 DOM 上\n */\n setTimeout(() => {\n initData.dragging = false\n if (!initData.hovering) {\n hideTooltip()\n }\n if (!initData.isClick) {\n setPosition(initData.newPosition)\n }\n emitChange()\n }, 0)\n window.removeEventListener('mousemove', onDragging)\n window.removeEventListener('touchmove', onDragging)\n window.removeEventListener('mouseup', onDragEnd)\n window.removeEventListener('touchend', onDragEnd)\n window.removeEventListener('contextmenu', onDragEnd)\n }\n }\n\n const setPosition = async (newPosition: number) => {\n if (newPosition === null || Number.isNaN(+newPosition)) return\n if (newPosition < 0) {\n newPosition = 0\n } else if (newPosition > 100) {\n newPosition = 100\n }\n const lengthPerStep = 100 / ((max.value - min.value) / step.value)\n const steps = Math.round(newPosition / lengthPerStep)\n let value =\n steps * lengthPerStep * (max.value - min.value) * 0.01 + min.value\n value = Number.parseFloat(value.toFixed(precision.value))\n\n if (value !== props.modelValue) {\n emit(UPDATE_MODEL_EVENT, value)\n }\n\n if (!initData.dragging && props.modelValue !== initData.oldValue) {\n initData.oldValue = props.modelValue\n }\n\n await nextTick()\n initData.dragging && displayTooltip()\n tooltip.value!.updatePopper()\n }\n\n watch(\n () => initData.dragging,\n (val) => {\n updateDragging(val)\n }\n )\n\n useEventListener(button, 'touchstart', onButtonDown, { passive: false })\n\n return {\n disabled,\n button,\n tooltip,\n tooltipVisible,\n showTooltip,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onKeyDown,\n setPosition,\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAKA,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;AAC1E,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,WAAW,KAAK;AAC1D,EAAE,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC;AACxB,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACpC,EAAE,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM;AACtC,IAAI,OAAO,aAAa,CAAC,KAAK,YAAY,QAAQ,CAAC;AACnD,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM;AACrC,IAAI,OAAO,YAAY,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC;AAC3F,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM;AACxC,IAAI,WAAW,CAAC,KAAK,KAAK,cAAc,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;AACvD,GAAG,E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,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AAC3E,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,MAAM;AACV,IAAI,OAAO;AACX,IAAI,cAAc;AAClB,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,YAAY;AAChB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-slider-button.mjs","sources":["../../../../../../../packages/components/slider/src/composables/use-slider-button.ts"],"sourcesContent":["import { computed, inject, nextTick, ref, watch } from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { useEventListener } from '@vueuse/core'\nimport { EVENT_CODE, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { sliderContextKey } from '../constants'\n\nimport type { CSSProperties, ComputedRef, Ref, SetupContext } from 'vue'\nimport type { SliderProps } from '../slider'\nimport type {\n SliderButtonEmits,\n SliderButtonInitData,\n SliderButtonProps,\n} from '../button'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\nconst useTooltip = (\n props: SliderButtonProps,\n formatTooltip: Ref<SliderProps['formatTooltip']>,\n showTooltip: Ref<SliderProps['showTooltip']>\n) => {\n const tooltip = ref<TooltipInstance>()\n\n const tooltipVisible = ref(false)\n\n const enableFormat = computed(() => {\n return formatTooltip.value instanceof Function\n })\n\n const formatValue = computed(() => {\n return (\n (enableFormat.value && formatTooltip.value!(props.modelValue)) ||\n props.modelValue\n )\n })\n\n const displayTooltip = debounce(() => {\n showTooltip.value && (tooltipVisible.value = true)\n }, 50)\n\n const hideTooltip = debounce(() => {\n showTooltip.value && (tooltipVisible.value = false)\n }, 50)\n\n return {\n tooltip,\n tooltipVisible,\n formatValue,\n displayTooltip,\n hideTooltip,\n }\n}\n\nexport const useSliderButton = (\n props: SliderButtonProps,\n initData: SliderButtonInitData,\n emit: SetupContext<SliderButtonEmits>['emit']\n) => {\n const {\n disabled,\n min,\n max,\n step,\n showTooltip,\n precision,\n sliderSize,\n formatTooltip,\n emitChange,\n resetSize,\n updateDragging,\n } = inject(sliderContextKey)!\n\n const { tooltip, tooltipVisible, formatValue, displayTooltip, hideTooltip } =\n useTooltip(props, formatTooltip!, showTooltip)\n\n const button = ref<HTMLDivElement>()\n\n const currentPosition = computed(() => {\n return `${\n ((props.modelValue - min.value) / (max.value - min.value)) * 100\n }%`\n })\n\n const wrapperStyle: ComputedRef<CSSProperties> = computed(() => {\n return props.vertical\n ? { bottom: currentPosition.value }\n : { left: currentPosition.value }\n })\n\n const handleMouseEnter = () => {\n initData.hovering = true\n displayTooltip()\n }\n\n const handleMouseLeave = () => {\n initData.hovering = false\n if (!initData.dragging) {\n hideTooltip()\n }\n }\n\n const onButtonDown = (event: MouseEvent | TouchEvent) => {\n if (disabled.value) return\n event.preventDefault()\n onDragStart(event)\n window.addEventListener('mousemove', onDragging)\n window.addEventListener('touchmove', onDragging)\n window.addEventListener('mouseup', onDragEnd)\n window.addEventListener('touchend', onDragEnd)\n window.addEventListener('contextmenu', onDragEnd)\n button.value!.focus()\n }\n\n const incrementPosition = (amount: number) => {\n if (disabled.value) return\n initData.newPosition =\n Number.parseFloat(currentPosition.value) +\n (amount / (max.value - min.value)) * 100\n setPosition(initData.newPosition)\n emitChange()\n }\n\n const onLeftKeyDown = () => {\n incrementPosition(-step.value)\n }\n\n const onRightKeyDown = () => {\n incrementPosition(step.value)\n }\n\n const onPageDownKeyDown = () => {\n incrementPosition(-step.value * 4)\n }\n\n const onPageUpKeyDown = () => {\n incrementPosition(step.value * 4)\n }\n\n const onHomeKeyDown = () => {\n if (disabled.value) return\n setPosition(0)\n emitChange()\n }\n\n const onEndKeyDown = () => {\n if (disabled.value) return\n setPosition(100)\n emitChange()\n }\n\n const onKeyDown = (event: KeyboardEvent) => {\n let isPreventDefault = true\n\n switch (event.code) {\n case EVENT_CODE.left:\n case EVENT_CODE.down:\n onLeftKeyDown()\n break\n case EVENT_CODE.right:\n case EVENT_CODE.up:\n onRightKeyDown()\n break\n case EVENT_CODE.home:\n onHomeKeyDown()\n break\n case EVENT_CODE.end:\n onEndKeyDown()\n break\n case EVENT_CODE.pageDown:\n onPageDownKeyDown()\n break\n case EVENT_CODE.pageUp:\n onPageUpKeyDown()\n break\n default:\n isPreventDefault = false\n break\n }\n\n isPreventDefault && event.preventDefault()\n }\n\n const getClientXY = (event: MouseEvent | TouchEvent) => {\n let clientX: number\n let clientY: number\n if (event.type.startsWith('touch')) {\n clientY = (event as TouchEvent).touches[0].clientY\n clientX = (event as TouchEvent).touches[0].clientX\n } else {\n clientY = (event as MouseEvent).clientY\n clientX = (event as MouseEvent).clientX\n }\n return {\n clientX,\n clientY,\n }\n }\n\n const onDragStart = (event: MouseEvent | TouchEvent) => {\n initData.dragging = true\n initData.isClick = true\n const { clientX, clientY } = getClientXY(event)\n if (props.vertical) {\n initData.startY = clientY\n } else {\n initData.startX = clientX\n }\n initData.startPosition = Number.parseFloat(currentPosition.value)\n initData.newPosition = initData.startPosition\n }\n\n const onDragging = (event: MouseEvent | TouchEvent) => {\n if (initData.dragging) {\n initData.isClick = false\n displayTooltip()\n resetSize()\n let diff: number\n const { clientX, clientY } = getClientXY(event)\n if (props.vertical) {\n initData.currentY = clientY\n diff = ((initData.startY - initData.currentY) / sliderSize.value) * 100\n } else {\n initData.currentX = clientX\n diff = ((initData.currentX - initData.startX) / sliderSize.value) * 100\n }\n initData.newPosition = initData.startPosition + diff\n setPosition(initData.newPosition)\n }\n }\n\n const onDragEnd = () => {\n if (initData.dragging) {\n /*\n * 防止在 mouseup 后立即触发 click,导致滑块有几率产生一小段位移\n * 不使用 preventDefault 是因为 mouseup 和 click 没有注册在同一个 DOM 上\n */\n setTimeout(() => {\n initData.dragging = false\n if (!initData.hovering) {\n hideTooltip()\n }\n if (!initData.isClick) {\n setPosition(initData.newPosition)\n }\n emitChange()\n }, 0)\n window.removeEventListener('mousemove', onDragging)\n window.removeEventListener('touchmove', onDragging)\n window.removeEventListener('mouseup', onDragEnd)\n window.removeEventListener('touchend', onDragEnd)\n window.removeEventListener('contextmenu', onDragEnd)\n }\n }\n\n const setPosition = async (newPosition: number) => {\n if (newPosition === null || Number.isNaN(+newPosition)) return\n if (newPosition < 0) {\n newPosition = 0\n } else if (newPosition > 100) {\n newPosition = 100\n }\n const lengthPerStep = 100 / ((max.value - min.value) / step.value)\n const steps = Math.round(newPosition / lengthPerStep)\n let value =\n steps * lengthPerStep * (max.value - min.value) * 0.01 + min.value\n value = Number.parseFloat(value.toFixed(precision.value))\n\n if (value !== props.modelValue) {\n emit(UPDATE_MODEL_EVENT, value)\n }\n\n if (!initData.dragging && props.modelValue !== initData.oldValue) {\n initData.oldValue = props.modelValue\n }\n\n await nextTick()\n initData.dragging && displayTooltip()\n tooltip.value!.updatePopper()\n }\n\n watch(\n () => initData.dragging,\n (val) => {\n updateDragging(val)\n }\n )\n\n useEventListener(button, 'touchstart', onButtonDown, { passive: false })\n\n return {\n disabled,\n button,\n tooltip,\n tooltipVisible,\n showTooltip,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onKeyDown,\n setPosition,\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAKA,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,WAAW,KAAK;AAC1D,EAAE,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC;AACxB,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACpC,EAAE,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM;AACtC,IAAI,OAAO,aAAa,CAAC,KAAK,YAAY,QAAQ,CAAC;AACnD,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM;AACrC,IAAI,OAAO,YAAY,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,KA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jC,GAAG,CAAC;AACJ,EAAE,KAAK,CAAC,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,KAAK;AAC1C,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;AACxB,GAAG,CAAC,CAAC;AACL,EAAE,gBAAgB,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AAC3E,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,MAAM;AACV,IAAI,OAAO;AACX,IAAI,cAAc;AAClB,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,YAAY;AAChB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
@@ -141,31 +141,27 @@ const TabNav = defineComponent({
141
141
  }
142
142
  }
143
143
  };
144
- const changeTab = (e) => {
145
- const code = e.code;
146
- const {
147
- up,
148
- down,
149
- left,
150
- right
151
- } = EVENT_CODE;
152
- if (![up, down, left, right].includes(code))
153
- return;
154
- const tabList = Array.from(e.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));
155
- const currentIndex = tabList.indexOf(e.target);
156
- let nextIndex;
157
- if (code === left || code === up) {
158
- if (currentIndex === 0) {
159
- nextIndex = tabList.length - 1;
160
- } else {
161
- nextIndex = currentIndex - 1;
162
- }
163
- } else {
164
- if (currentIndex < tabList.length - 1) {
165
- nextIndex = currentIndex + 1;
166
- } else {
167
- nextIndex = 0;
168
- }
144
+ const changeTab = (event) => {
145
+ let step = 0;
146
+ switch (event.code) {
147
+ case EVENT_CODE.left:
148
+ case EVENT_CODE.up:
149
+ step = -1;
150
+ break;
151
+ case EVENT_CODE.right:
152
+ case EVENT_CODE.down:
153
+ step = 1;
154
+ break;
155
+ default:
156
+ return;
157
+ }
158
+ const tabList = Array.from(event.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));
159
+ const currentIndex = tabList.indexOf(event.target);
160
+ let nextIndex = currentIndex + step;
161
+ if (nextIndex < 0) {
162
+ nextIndex = tabList.length - 1;
163
+ } else if (nextIndex >= tabList.length) {
164
+ nextIndex = 0;
169
165
  }
170
166
  tabList[nextIndex].focus({
171
167
  preventScroll: true
@@ -1 +1 @@
1
- {"version":3,"file":"tab-nav.mjs","sources":["../../../../../../packages/components/tabs/src/tab-nav.tsx"],"sourcesContent":["import {\n computed,\n defineComponent,\n inject,\n nextTick,\n onMounted,\n onUpdated,\n ref,\n watch,\n} from 'vue'\nimport {\n useDocumentVisibility,\n useResizeObserver,\n useWindowFocus,\n} from '@vueuse/core'\nimport {\n buildProps,\n capitalize,\n definePropType,\n mutable,\n throwError,\n} from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowLeft, ArrowRight, Close } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport TabBar from './tab-bar.vue'\nimport { tabsRootContextKey } from './constants'\n\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TabsPaneContext } from './constants'\nimport type { TabPaneName } from './tabs'\n\ninterface Scrollable {\n next?: boolean\n prev?: number\n}\n\nexport const tabNavProps = buildProps({\n panes: {\n type: definePropType<TabsPaneContext[]>(Array),\n default: () => mutable([] as const),\n },\n currentName: {\n type: [String, Number],\n default: '',\n },\n editable: Boolean,\n type: {\n type: String,\n values: ['card', 'border-card', ''],\n default: '',\n },\n stretch: Boolean,\n} as const)\n\nexport const tabNavEmits = {\n tabClick: (tab: TabsPaneContext, tabName: TabPaneName, ev: Event) =>\n ev instanceof Event,\n tabRemove: (tab: TabsPaneContext, ev: Event) => ev instanceof Event,\n}\n\nexport type TabNavProps = ExtractPropTypes<typeof tabNavProps>\nexport type TabNavEmits = typeof tabNavEmits\n\nconst COMPONENT_NAME = 'ElTabNav'\nconst TabNav = defineComponent({\n name: COMPONENT_NAME,\n props: tabNavProps,\n emits: tabNavEmits,\n setup(props, { expose, emit }) {\n const rootTabs = inject(tabsRootContextKey)\n if (!rootTabs) throwError(COMPONENT_NAME, `<el-tabs><tab-nav /></el-tabs>`)\n\n const ns = useNamespace('tabs')\n const visibility = useDocumentVisibility()\n const focused = useWindowFocus()\n\n const navScroll$ = ref<HTMLDivElement>()\n const nav$ = ref<HTMLDivElement>()\n const el$ = ref<HTMLDivElement>()\n\n const tabBarRef = ref<InstanceType<typeof TabBar>>()\n\n const scrollable = ref<false | Scrollable>(false)\n const navOffset = ref(0)\n const isFocus = ref(false)\n const focusable = ref(true)\n\n const sizeName = computed(() =>\n ['top', 'bottom'].includes(rootTabs.props.tabPosition)\n ? 'width'\n : 'height'\n )\n const navStyle = computed<CSSProperties>(() => {\n const dir = sizeName.value === 'width' ? 'X' : 'Y'\n return {\n transform: `translate${dir}(-${navOffset.value}px)`,\n }\n })\n\n const scrollPrev = () => {\n if (!navScroll$.value) return\n\n const containerSize =\n navScroll$.value[`offset${capitalize(sizeName.value)}`]\n const currentOffset = navOffset.value\n\n if (!currentOffset) return\n\n const newOffset =\n currentOffset > containerSize ? currentOffset - containerSize : 0\n\n navOffset.value = newOffset\n }\n\n const scrollNext = () => {\n if (!navScroll$.value || !nav$.value) return\n\n const navSize = nav$.value[`offset${capitalize(sizeName.value)}`]\n const containerSize =\n navScroll$.value[`offset${capitalize(sizeName.value)}`]\n const currentOffset = navOffset.value\n\n if (navSize - currentOffset <= containerSize) return\n\n const newOffset =\n navSize - currentOffset > containerSize * 2\n ? currentOffset + containerSize\n : navSize - containerSize\n\n navOffset.value = newOffset\n }\n\n const scrollToActiveTab = async () => {\n const nav = nav$.value\n if (!scrollable.value || !el$.value || !navScroll$.value || !nav) return\n\n await nextTick()\n\n const activeTab = el$.value.querySelector('.is-active')\n if (!activeTab) return\n\n const navScroll = navScroll$.value\n const isHorizontal = ['top', 'bottom'].includes(\n rootTabs.props.tabPosition\n )\n const activeTabBounding = activeTab.getBoundingClientRect()\n const navScrollBounding = navScroll.getBoundingClientRect()\n const maxOffset = isHorizontal\n ? nav.offsetWidth - navScrollBounding.width\n : nav.offsetHeight - navScrollBounding.height\n const currentOffset = navOffset.value\n let newOffset = currentOffset\n\n if (isHorizontal) {\n if (activeTabBounding.left < navScrollBounding.left) {\n newOffset =\n currentOffset - (navScrollBounding.left - activeTabBounding.left)\n }\n if (activeTabBounding.right > navScrollBounding.right) {\n newOffset =\n currentOffset + activeTabBounding.right - navScrollBounding.right\n }\n } else {\n if (activeTabBounding.top < navScrollBounding.top) {\n newOffset =\n currentOffset - (navScrollBounding.top - activeTabBounding.top)\n }\n if (activeTabBounding.bottom > navScrollBounding.bottom) {\n newOffset =\n currentOffset +\n (activeTabBounding.bottom - navScrollBounding.bottom)\n }\n }\n newOffset = Math.max(newOffset, 0)\n navOffset.value = Math.min(newOffset, maxOffset)\n }\n\n const update = () => {\n if (!nav$.value || !navScroll$.value) return\n\n props.stretch && tabBarRef.value?.update()\n\n const navSize = nav$.value[`offset${capitalize(sizeName.value)}`]\n const containerSize =\n navScroll$.value[`offset${capitalize(sizeName.value)}`]\n const currentOffset = navOffset.value\n\n if (containerSize < navSize) {\n scrollable.value = scrollable.value || {}\n scrollable.value.prev = currentOffset\n scrollable.value.next = currentOffset + containerSize < navSize\n if (navSize - currentOffset < containerSize) {\n navOffset.value = navSize - containerSize\n }\n } else {\n scrollable.value = false\n if (currentOffset > 0) {\n navOffset.value = 0\n }\n }\n }\n\n const changeTab = (e: KeyboardEvent) => {\n const code = e.code\n\n const { up, down, left, right } = EVENT_CODE\n if (![up, down, left, right].includes(code)) return\n\n // 左右上下键更换tab\n const tabList = Array.from(\n (e.currentTarget as HTMLDivElement).querySelectorAll<HTMLDivElement>(\n '[role=tab]:not(.is-disabled)'\n )\n )\n const currentIndex = tabList.indexOf(e.target as HTMLDivElement)\n\n let nextIndex: number\n if (code === left || code === up) {\n // left\n if (currentIndex === 0) {\n // first\n nextIndex = tabList.length - 1\n } else {\n nextIndex = currentIndex - 1\n }\n } else {\n // right\n if (currentIndex < tabList.length - 1) {\n // not last\n nextIndex = currentIndex + 1\n } else {\n nextIndex = 0\n }\n }\n tabList[nextIndex].focus({ preventScroll: true }) // 改变焦点元素\n tabList[nextIndex].click() // 选中下一个tab\n setFocus()\n }\n\n const setFocus = () => {\n if (focusable.value) isFocus.value = true\n }\n const removeFocus = () => (isFocus.value = false)\n\n watch(visibility, (visibility) => {\n if (visibility === 'hidden') {\n focusable.value = false\n } else if (visibility === 'visible') {\n setTimeout(() => (focusable.value = true), 50)\n }\n })\n watch(focused, (focused) => {\n if (focused) {\n setTimeout(() => (focusable.value = true), 50)\n } else {\n focusable.value = false\n }\n })\n\n useResizeObserver(el$, update)\n\n onMounted(() => setTimeout(() => scrollToActiveTab(), 0))\n onUpdated(() => update())\n\n expose({\n scrollToActiveTab,\n removeFocus,\n })\n\n return () => {\n const scrollBtn = scrollable.value\n ? [\n <span\n class={[\n ns.e('nav-prev'),\n ns.is('disabled', !scrollable.value.prev),\n ]}\n onClick={scrollPrev}\n >\n <ElIcon>\n <ArrowLeft />\n </ElIcon>\n </span>,\n <span\n class={[\n ns.e('nav-next'),\n ns.is('disabled', !scrollable.value.next),\n ]}\n onClick={scrollNext}\n >\n <ElIcon>\n <ArrowRight />\n </ElIcon>\n </span>,\n ]\n : null\n\n const tabs = props.panes.map((pane, index) => {\n const uid = pane.uid\n const disabled = pane.props.disabled\n const tabName = pane.props.name ?? pane.index ?? `${index}`\n const closable = !disabled && (pane.isClosable || props.editable)\n pane.index = `${index}`\n\n const btnClose = closable ? (\n <ElIcon\n class=\"is-icon-close\"\n // `onClick` not exist when generate dts\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n onClick={(ev: MouseEvent) => emit('tabRemove', pane, ev)}\n >\n <Close />\n </ElIcon>\n ) : null\n\n const tabLabelContent = pane.slots.label?.() || pane.props.label\n const tabindex = !disabled && pane.active ? 0 : -1\n\n return (\n <div\n ref={`tab-${uid}`}\n class={[\n ns.e('item'),\n ns.is(rootTabs.props.tabPosition),\n ns.is('active', pane.active),\n ns.is('disabled', disabled),\n ns.is('closable', closable),\n ns.is('focus', isFocus.value),\n ]}\n id={`tab-${tabName}`}\n key={`tab-${uid}`}\n aria-controls={`pane-${tabName}`}\n role=\"tab\"\n aria-selected={pane.active}\n tabindex={tabindex}\n onFocus={() => setFocus()}\n onBlur={() => removeFocus()}\n onClick={(ev: MouseEvent) => {\n removeFocus()\n emit('tabClick', pane, tabName, ev)\n }}\n onKeydown={(ev: KeyboardEvent) => {\n if (\n closable &&\n (ev.code === EVENT_CODE.delete ||\n ev.code === EVENT_CODE.backspace)\n ) {\n emit('tabRemove', pane, ev)\n }\n }}\n >\n {...[tabLabelContent, btnClose]}\n </div>\n )\n })\n\n return (\n <div\n ref={el$}\n class={[\n ns.e('nav-wrap'),\n ns.is('scrollable', !!scrollable.value),\n ns.is(rootTabs.props.tabPosition),\n ]}\n >\n {scrollBtn}\n <div class={ns.e('nav-scroll')} ref={navScroll$}>\n <div\n class={[\n ns.e('nav'),\n ns.is(rootTabs.props.tabPosition),\n ns.is(\n 'stretch',\n props.stretch &&\n ['top', 'bottom'].includes(rootTabs.props.tabPosition)\n ),\n ]}\n ref={nav$}\n style={navStyle.value}\n role=\"tablist\"\n onKeydown={changeTab}\n >\n {...[\n !props.type ? (\n <TabBar ref={tabBarRef} tabs={[...props.panes]} />\n ) : null,\n tabs,\n ]}\n </div>\n </div>\n </div>\n )\n }\n },\n})\n\nexport type TabNavInstance = InstanceType<typeof TabNav> & {\n scrollToActiveTab: () => Promise<void>\n removeFocus: () => void\n}\nexport default TabNav\n"],"names":["tabNavProps","buildProps","panes","type","definePropType","Array","default","mutable","currentName","String","Number","editable","Boolean","values","stretch","tabNavEmits","tabClick","tab","tabName","ev","Event","tabRemove","COMPONENT_NAME","TabNav","defineComponent","name","props","emits","expose","emit","ns","useNamespace","visibility","useDocumentVisibility","focused","useWindowFocus","navScroll$","ref","nav$","el$","tabBarRef","scrollable","navOffset","isFocus","focusable","sizeName","computed","includes","rootTabs","tabPosition","navStyle","dir","value","transform","scrollPrev","containerSize","capitalize","currentOffset","newOffset","scrollNext","scrollToActiveTab","activeTab","navScroll","navScrollBounding","maxOffset","isHorizontal","offsetWidth","activeTabBounding","right","top","bottom","max","update","navSize","prev","changeTab","code","left","down","tabList","currentIndex","nextIndex","preventScroll","click","setFocus","watch","_createVNode","setTimeout","useResizeObserver","onUpdated","removeFocus","e","pane","index","closable","disabled","btnClose","delete","backspace","tabLabelContent"],"mappings":";;;;;;;;;;;;;;;;AAsCaA,MAAAA,WAAW,GAAGC,UAAU,CAAC;AACpCC,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAEC,cAAc,CAAoBC,KAApB,CADf;AAELC,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAAC,EAAD,CAAA;GAHY;AAKpCC,EAAAA,WAAW,EAAE;AACXL,IAAAA,IAAI,EAAE,CAACM,MAAD,EAASC,MAAT,CADK;AAEXJ,IAAAA,OAAO,EAAE,EAAA;GAPyB;AASpCK,EAAAA,QAAQ,EAAEC,OAT0B;AAUpCT,EAAAA,IAAI,EAAE;AACJA,IAAAA,IAAI,EAAEM,MADF;AAEJI,IAAAA,MAAM,EAAE,CAAC,MAAD,EAAS,aAAT,EAAwB,EAAxB,CAFJ;AAGJP,IAAAA,OAAO,EAAE,EAAA;GAbyB;AAepCQ,EAAAA,OAAO,EAAEF,OAAAA;AAf2B,CAAD,EAA9B;AAkBA,MAAMG,WAAW,GAAG;EACzBC,QAAQ,EAAE,CAACC,GAAD,EAAuBC,OAAvB,EAA6CC,EAA7C,KACRA,EAAE,YAAYC,KAFS;AAGzBC,EAAAA,SAAS,EAAE,CAACJ,GAAD,EAAuBE,EAAvB,KAAqCA,EAAE,YAAYC,KAAAA;AAHrC,EAApB;AASP,MAAME,cAAc,GAAG,UAAvB,CAAA;AACMC,MAAAA,MAAM,GAAGC,eAAe,CAAC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AA,KAAA,CAAA;AAAA,OAAA,EAAA,IAAA,CAAA,GAGW,IACFK,EAAE,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAL,CADK,CAAA;AAHX,KAAA,CAAA;AAAA,GAAA;;;;;"}
1
+ {"version":3,"file":"tab-nav.mjs","sources":["../../../../../../packages/components/tabs/src/tab-nav.tsx"],"sourcesContent":["import {\n computed,\n defineComponent,\n inject,\n nextTick,\n onMounted,\n onUpdated,\n ref,\n watch,\n} from 'vue'\nimport {\n useDocumentVisibility,\n useResizeObserver,\n useWindowFocus,\n} from '@vueuse/core'\nimport {\n buildProps,\n capitalize,\n definePropType,\n mutable,\n throwError,\n} from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowLeft, ArrowRight, Close } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport TabBar from './tab-bar.vue'\nimport { tabsRootContextKey } from './constants'\n\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TabsPaneContext } from './constants'\nimport type { TabPaneName } from './tabs'\n\ninterface Scrollable {\n next?: boolean\n prev?: number\n}\n\nexport const tabNavProps = buildProps({\n panes: {\n type: definePropType<TabsPaneContext[]>(Array),\n default: () => mutable([] as const),\n },\n currentName: {\n type: [String, Number],\n default: '',\n },\n editable: Boolean,\n type: {\n type: String,\n values: ['card', 'border-card', ''],\n default: '',\n },\n stretch: Boolean,\n} as const)\n\nexport const tabNavEmits = {\n tabClick: (tab: TabsPaneContext, tabName: TabPaneName, ev: Event) =>\n ev instanceof Event,\n tabRemove: (tab: TabsPaneContext, ev: Event) => ev instanceof Event,\n}\n\nexport type TabNavProps = ExtractPropTypes<typeof tabNavProps>\nexport type TabNavEmits = typeof tabNavEmits\n\nconst COMPONENT_NAME = 'ElTabNav'\nconst TabNav = defineComponent({\n name: COMPONENT_NAME,\n props: tabNavProps,\n emits: tabNavEmits,\n setup(props, { expose, emit }) {\n const rootTabs = inject(tabsRootContextKey)\n if (!rootTabs) throwError(COMPONENT_NAME, `<el-tabs><tab-nav /></el-tabs>`)\n\n const ns = useNamespace('tabs')\n const visibility = useDocumentVisibility()\n const focused = useWindowFocus()\n\n const navScroll$ = ref<HTMLDivElement>()\n const nav$ = ref<HTMLDivElement>()\n const el$ = ref<HTMLDivElement>()\n\n const tabBarRef = ref<InstanceType<typeof TabBar>>()\n\n const scrollable = ref<false | Scrollable>(false)\n const navOffset = ref(0)\n const isFocus = ref(false)\n const focusable = ref(true)\n\n const sizeName = computed(() =>\n ['top', 'bottom'].includes(rootTabs.props.tabPosition)\n ? 'width'\n : 'height'\n )\n const navStyle = computed<CSSProperties>(() => {\n const dir = sizeName.value === 'width' ? 'X' : 'Y'\n return {\n transform: `translate${dir}(-${navOffset.value}px)`,\n }\n })\n\n const scrollPrev = () => {\n if (!navScroll$.value) return\n\n const containerSize =\n navScroll$.value[`offset${capitalize(sizeName.value)}`]\n const currentOffset = navOffset.value\n\n if (!currentOffset) return\n\n const newOffset =\n currentOffset > containerSize ? currentOffset - containerSize : 0\n\n navOffset.value = newOffset\n }\n\n const scrollNext = () => {\n if (!navScroll$.value || !nav$.value) return\n\n const navSize = nav$.value[`offset${capitalize(sizeName.value)}`]\n const containerSize =\n navScroll$.value[`offset${capitalize(sizeName.value)}`]\n const currentOffset = navOffset.value\n\n if (navSize - currentOffset <= containerSize) return\n\n const newOffset =\n navSize - currentOffset > containerSize * 2\n ? currentOffset + containerSize\n : navSize - containerSize\n\n navOffset.value = newOffset\n }\n\n const scrollToActiveTab = async () => {\n const nav = nav$.value\n if (!scrollable.value || !el$.value || !navScroll$.value || !nav) return\n\n await nextTick()\n\n const activeTab = el$.value.querySelector('.is-active')\n if (!activeTab) return\n\n const navScroll = navScroll$.value\n const isHorizontal = ['top', 'bottom'].includes(\n rootTabs.props.tabPosition\n )\n const activeTabBounding = activeTab.getBoundingClientRect()\n const navScrollBounding = navScroll.getBoundingClientRect()\n const maxOffset = isHorizontal\n ? nav.offsetWidth - navScrollBounding.width\n : nav.offsetHeight - navScrollBounding.height\n const currentOffset = navOffset.value\n let newOffset = currentOffset\n\n if (isHorizontal) {\n if (activeTabBounding.left < navScrollBounding.left) {\n newOffset =\n currentOffset - (navScrollBounding.left - activeTabBounding.left)\n }\n if (activeTabBounding.right > navScrollBounding.right) {\n newOffset =\n currentOffset + activeTabBounding.right - navScrollBounding.right\n }\n } else {\n if (activeTabBounding.top < navScrollBounding.top) {\n newOffset =\n currentOffset - (navScrollBounding.top - activeTabBounding.top)\n }\n if (activeTabBounding.bottom > navScrollBounding.bottom) {\n newOffset =\n currentOffset +\n (activeTabBounding.bottom - navScrollBounding.bottom)\n }\n }\n newOffset = Math.max(newOffset, 0)\n navOffset.value = Math.min(newOffset, maxOffset)\n }\n\n const update = () => {\n if (!nav$.value || !navScroll$.value) return\n\n props.stretch && tabBarRef.value?.update()\n\n const navSize = nav$.value[`offset${capitalize(sizeName.value)}`]\n const containerSize =\n navScroll$.value[`offset${capitalize(sizeName.value)}`]\n const currentOffset = navOffset.value\n\n if (containerSize < navSize) {\n scrollable.value = scrollable.value || {}\n scrollable.value.prev = currentOffset\n scrollable.value.next = currentOffset + containerSize < navSize\n if (navSize - currentOffset < containerSize) {\n navOffset.value = navSize - containerSize\n }\n } else {\n scrollable.value = false\n if (currentOffset > 0) {\n navOffset.value = 0\n }\n }\n }\n\n const changeTab = (event: KeyboardEvent) => {\n let step = 0\n\n switch (event.code) {\n case EVENT_CODE.left:\n case EVENT_CODE.up:\n step = -1\n break\n case EVENT_CODE.right:\n case EVENT_CODE.down:\n step = 1\n break\n default:\n return\n }\n\n const tabList = Array.from(\n (\n event.currentTarget as HTMLDivElement\n ).querySelectorAll<HTMLDivElement>('[role=tab]:not(.is-disabled)')\n )\n const currentIndex = tabList.indexOf(event.target as HTMLDivElement)\n let nextIndex = currentIndex + step\n\n if (nextIndex < 0) {\n nextIndex = tabList.length - 1\n } else if (nextIndex >= tabList.length) {\n nextIndex = 0\n }\n\n tabList[nextIndex].focus({ preventScroll: true }) // 改变焦点元素\n tabList[nextIndex].click() // 选中下一个tab\n setFocus()\n }\n\n const setFocus = () => {\n if (focusable.value) isFocus.value = true\n }\n const removeFocus = () => (isFocus.value = false)\n\n watch(visibility, (visibility) => {\n if (visibility === 'hidden') {\n focusable.value = false\n } else if (visibility === 'visible') {\n setTimeout(() => (focusable.value = true), 50)\n }\n })\n watch(focused, (focused) => {\n if (focused) {\n setTimeout(() => (focusable.value = true), 50)\n } else {\n focusable.value = false\n }\n })\n\n useResizeObserver(el$, update)\n\n onMounted(() => setTimeout(() => scrollToActiveTab(), 0))\n onUpdated(() => update())\n\n expose({\n scrollToActiveTab,\n removeFocus,\n })\n\n return () => {\n const scrollBtn = scrollable.value\n ? [\n <span\n class={[\n ns.e('nav-prev'),\n ns.is('disabled', !scrollable.value.prev),\n ]}\n onClick={scrollPrev}\n >\n <ElIcon>\n <ArrowLeft />\n </ElIcon>\n </span>,\n <span\n class={[\n ns.e('nav-next'),\n ns.is('disabled', !scrollable.value.next),\n ]}\n onClick={scrollNext}\n >\n <ElIcon>\n <ArrowRight />\n </ElIcon>\n </span>,\n ]\n : null\n\n const tabs = props.panes.map((pane, index) => {\n const uid = pane.uid\n const disabled = pane.props.disabled\n const tabName = pane.props.name ?? pane.index ?? `${index}`\n const closable = !disabled && (pane.isClosable || props.editable)\n pane.index = `${index}`\n\n const btnClose = closable ? (\n <ElIcon\n class=\"is-icon-close\"\n // `onClick` not exist when generate dts\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n onClick={(ev: MouseEvent) => emit('tabRemove', pane, ev)}\n >\n <Close />\n </ElIcon>\n ) : null\n\n const tabLabelContent = pane.slots.label?.() || pane.props.label\n const tabindex = !disabled && pane.active ? 0 : -1\n\n return (\n <div\n ref={`tab-${uid}`}\n class={[\n ns.e('item'),\n ns.is(rootTabs.props.tabPosition),\n ns.is('active', pane.active),\n ns.is('disabled', disabled),\n ns.is('closable', closable),\n ns.is('focus', isFocus.value),\n ]}\n id={`tab-${tabName}`}\n key={`tab-${uid}`}\n aria-controls={`pane-${tabName}`}\n role=\"tab\"\n aria-selected={pane.active}\n tabindex={tabindex}\n onFocus={() => setFocus()}\n onBlur={() => removeFocus()}\n onClick={(ev: MouseEvent) => {\n removeFocus()\n emit('tabClick', pane, tabName, ev)\n }}\n onKeydown={(ev: KeyboardEvent) => {\n if (\n closable &&\n (ev.code === EVENT_CODE.delete ||\n ev.code === EVENT_CODE.backspace)\n ) {\n emit('tabRemove', pane, ev)\n }\n }}\n >\n {...[tabLabelContent, btnClose]}\n </div>\n )\n })\n\n return (\n <div\n ref={el$}\n class={[\n ns.e('nav-wrap'),\n ns.is('scrollable', !!scrollable.value),\n ns.is(rootTabs.props.tabPosition),\n ]}\n >\n {scrollBtn}\n <div class={ns.e('nav-scroll')} ref={navScroll$}>\n <div\n class={[\n ns.e('nav'),\n ns.is(rootTabs.props.tabPosition),\n ns.is(\n 'stretch',\n props.stretch &&\n ['top', 'bottom'].includes(rootTabs.props.tabPosition)\n ),\n ]}\n ref={nav$}\n style={navStyle.value}\n role=\"tablist\"\n onKeydown={changeTab}\n >\n {...[\n !props.type ? (\n <TabBar ref={tabBarRef} tabs={[...props.panes]} />\n ) : null,\n tabs,\n ]}\n </div>\n </div>\n </div>\n )\n }\n },\n})\n\nexport type TabNavInstance = InstanceType<typeof TabNav> & {\n scrollToActiveTab: () => Promise<void>\n removeFocus: () => void\n}\nexport default TabNav\n"],"names":["tabNavProps","buildProps","panes","type","definePropType","Array","default","mutable","currentName","String","Number","editable","Boolean","values","stretch","tabNavEmits","tabClick","tab","tabName","ev","Event","tabRemove","COMPONENT_NAME","TabNav","defineComponent","name","props","emits","expose","emit","ns","useNamespace","visibility","useDocumentVisibility","focused","useWindowFocus","navScroll$","ref","nav$","el$","tabBarRef","scrollable","navOffset","isFocus","focusable","sizeName","computed","includes","rootTabs","tabPosition","navStyle","dir","value","transform","scrollPrev","containerSize","capitalize","currentOffset","newOffset","scrollNext","scrollToActiveTab","activeTab","navScroll","navScrollBounding","maxOffset","isHorizontal","offsetWidth","activeTabBounding","right","top","bottom","max","update","navSize","prev","changeTab","event","step","EVENT_CODE","left","currentIndex","tabList","nextIndex","preventScroll","click","setFocus","watch","_createVNode","setTimeout","useResizeObserver","onUpdated","removeFocus","e","pane","index","closable","disabled","btnClose","delete","backspace","tabLabelContent"],"mappings":";;;;;;;;;;;;;;;;AAsCaA,MAAAA,WAAW,GAAGC,UAAU,CAAC;AACpCC,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAEC,cAAc,CAAoBC,KAApB,CADf;AAELC,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAAC,EAAD,CAAA;GAHY;AAKpCC,EAAAA,WAAW,EAAE;AACXL,IAAAA,IAAI,EAAE,CAACM,MAAD,EAASC,MAAT,CADK;AAEXJ,IAAAA,OAAO,EAAE,EAAA;GAPyB;AASpCK,EAAAA,QAAQ,EAAEC,OAT0B;AAUpCT,EAAAA,IAAI,EAAE;AACJA,IAAAA,IAAI,EAAEM,MADF;AAEJI,IAAAA,MAAM,EAAE,CAAC,MAAD,EAAS,aAAT,EAAwB,EAAxB,CAFJ;AAGJP,IAAAA,OAAO,EAAE,EAAA;GAbyB;AAepCQ,EAAAA,OAAO,EAAEF,OAAAA;AAf2B,CAAD,EAA9B;AAkBA,MAAMG,WAAW,GAAG;EACzBC,QAAQ,EAAE,CAACC,GAAD,EAAuBC,OAAvB,EAA6CC,EAA7C,KACRA,EAAE,YAAYC,KAFS;AAGzBC,EAAAA,SAAS,EAAE,CAACJ,GAAD,EAAuBE,EAAvB,KAAqCA,EAAE,YAAYC,KAAAA;AAHrC,EAApB;AASP,MAAME,cAAc,GAAG,UAAvB,CAAA;AACMC,MAAAA,MAAM,GAAGC,eAAe,CAAC;AAC7BC,EAAAA,IAAI,EAAEH,cADuB;AAE7BI,EAAAA,KAAK,EAAE1B,WAFsB;AAG7B2B,EAAAA,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- if (ev.code === EVENT_CODE.enter)
132
+ if ([EVENT_CODE.enter, EVENT_CODE.numpadEnter].includes(ev.code))
133
133
  handleTabAdd();
134
134
  }
135
135
  }, [addSlot ? renderSlot(slots, "add-icon") : createVNode(ElIcon, {