@element-plus/nightly 0.0.20240228 → 0.0.20240229

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +158 -85
  4. package/dist/index.full.min.js +19 -19
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +19 -19
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +158 -85
  9. package/dist/locale/af.js +1 -1
  10. package/dist/locale/af.min.js +1 -1
  11. package/dist/locale/af.min.mjs +1 -1
  12. package/dist/locale/af.mjs +1 -1
  13. package/dist/locale/ar-eg.js +1 -1
  14. package/dist/locale/ar-eg.min.js +1 -1
  15. package/dist/locale/ar-eg.min.mjs +1 -1
  16. package/dist/locale/ar-eg.mjs +1 -1
  17. package/dist/locale/ar.js +1 -1
  18. package/dist/locale/ar.min.js +1 -1
  19. package/dist/locale/ar.min.mjs +1 -1
  20. package/dist/locale/ar.mjs +1 -1
  21. package/dist/locale/az.js +1 -1
  22. package/dist/locale/az.min.js +1 -1
  23. package/dist/locale/az.min.mjs +1 -1
  24. package/dist/locale/az.mjs +1 -1
  25. package/dist/locale/bg.js +1 -1
  26. package/dist/locale/bg.min.js +1 -1
  27. package/dist/locale/bg.min.mjs +1 -1
  28. package/dist/locale/bg.mjs +1 -1
  29. package/dist/locale/bn.js +1 -1
  30. package/dist/locale/bn.min.js +1 -1
  31. package/dist/locale/bn.min.mjs +1 -1
  32. package/dist/locale/bn.mjs +1 -1
  33. package/dist/locale/ca.js +1 -1
  34. package/dist/locale/ca.min.js +1 -1
  35. package/dist/locale/ca.min.mjs +1 -1
  36. package/dist/locale/ca.mjs +1 -1
  37. package/dist/locale/ckb.js +1 -1
  38. package/dist/locale/ckb.min.js +1 -1
  39. package/dist/locale/ckb.min.mjs +1 -1
  40. package/dist/locale/ckb.mjs +1 -1
  41. package/dist/locale/cs.js +1 -1
  42. package/dist/locale/cs.min.js +1 -1
  43. package/dist/locale/cs.min.mjs +1 -1
  44. package/dist/locale/cs.mjs +1 -1
  45. package/dist/locale/da.js +1 -1
  46. package/dist/locale/da.min.js +1 -1
  47. package/dist/locale/da.min.mjs +1 -1
  48. package/dist/locale/da.mjs +1 -1
  49. package/dist/locale/de.js +1 -1
  50. package/dist/locale/de.min.js +1 -1
  51. package/dist/locale/de.min.mjs +1 -1
  52. package/dist/locale/de.mjs +1 -1
  53. package/dist/locale/el.js +1 -1
  54. package/dist/locale/el.min.js +1 -1
  55. package/dist/locale/el.min.mjs +1 -1
  56. package/dist/locale/el.mjs +1 -1
  57. package/dist/locale/en.js +1 -1
  58. package/dist/locale/en.min.js +1 -1
  59. package/dist/locale/en.min.mjs +1 -1
  60. package/dist/locale/en.mjs +1 -1
  61. package/dist/locale/eo.js +1 -1
  62. package/dist/locale/eo.min.js +1 -1
  63. package/dist/locale/eo.min.mjs +1 -1
  64. package/dist/locale/eo.mjs +1 -1
  65. package/dist/locale/es.js +1 -1
  66. package/dist/locale/es.min.js +1 -1
  67. package/dist/locale/es.min.mjs +1 -1
  68. package/dist/locale/es.mjs +1 -1
  69. package/dist/locale/et.js +1 -1
  70. package/dist/locale/et.min.js +1 -1
  71. package/dist/locale/et.min.mjs +1 -1
  72. package/dist/locale/et.mjs +1 -1
  73. package/dist/locale/eu.js +1 -1
  74. package/dist/locale/eu.min.js +1 -1
  75. package/dist/locale/eu.min.mjs +1 -1
  76. package/dist/locale/eu.mjs +1 -1
  77. package/dist/locale/fa.js +1 -1
  78. package/dist/locale/fa.min.js +1 -1
  79. package/dist/locale/fa.min.mjs +1 -1
  80. package/dist/locale/fa.mjs +1 -1
  81. package/dist/locale/fi.js +1 -1
  82. package/dist/locale/fi.min.js +1 -1
  83. package/dist/locale/fi.min.mjs +1 -1
  84. package/dist/locale/fi.mjs +1 -1
  85. package/dist/locale/fr.js +1 -1
  86. package/dist/locale/fr.min.js +1 -1
  87. package/dist/locale/fr.min.mjs +1 -1
  88. package/dist/locale/fr.mjs +1 -1
  89. package/dist/locale/he.js +1 -1
  90. package/dist/locale/he.min.js +1 -1
  91. package/dist/locale/he.min.mjs +1 -1
  92. package/dist/locale/he.mjs +1 -1
  93. package/dist/locale/hr.js +1 -1
  94. package/dist/locale/hr.min.js +1 -1
  95. package/dist/locale/hr.min.mjs +1 -1
  96. package/dist/locale/hr.mjs +1 -1
  97. package/dist/locale/hu.js +1 -1
  98. package/dist/locale/hu.min.js +1 -1
  99. package/dist/locale/hu.min.mjs +1 -1
  100. package/dist/locale/hu.mjs +1 -1
  101. package/dist/locale/hy-am.js +1 -1
  102. package/dist/locale/hy-am.min.js +1 -1
  103. package/dist/locale/hy-am.min.mjs +1 -1
  104. package/dist/locale/hy-am.mjs +1 -1
  105. package/dist/locale/id.js +1 -1
  106. package/dist/locale/id.min.js +1 -1
  107. package/dist/locale/id.min.mjs +1 -1
  108. package/dist/locale/id.mjs +1 -1
  109. package/dist/locale/it.js +1 -1
  110. package/dist/locale/it.min.js +1 -1
  111. package/dist/locale/it.min.mjs +1 -1
  112. package/dist/locale/it.mjs +1 -1
  113. package/dist/locale/ja.js +1 -1
  114. package/dist/locale/ja.min.js +1 -1
  115. package/dist/locale/ja.min.mjs +1 -1
  116. package/dist/locale/ja.mjs +1 -1
  117. package/dist/locale/kk.js +1 -1
  118. package/dist/locale/kk.min.js +1 -1
  119. package/dist/locale/kk.min.mjs +1 -1
  120. package/dist/locale/kk.mjs +1 -1
  121. package/dist/locale/km.js +1 -1
  122. package/dist/locale/km.min.js +1 -1
  123. package/dist/locale/km.min.mjs +1 -1
  124. package/dist/locale/km.mjs +1 -1
  125. package/dist/locale/ko.js +1 -1
  126. package/dist/locale/ko.min.js +1 -1
  127. package/dist/locale/ko.min.mjs +1 -1
  128. package/dist/locale/ko.mjs +1 -1
  129. package/dist/locale/ku.js +1 -1
  130. package/dist/locale/ku.min.js +1 -1
  131. package/dist/locale/ku.min.mjs +1 -1
  132. package/dist/locale/ku.mjs +1 -1
  133. package/dist/locale/ky.js +1 -1
  134. package/dist/locale/ky.min.js +1 -1
  135. package/dist/locale/ky.min.mjs +1 -1
  136. package/dist/locale/ky.mjs +1 -1
  137. package/dist/locale/lt.js +1 -1
  138. package/dist/locale/lt.min.js +1 -1
  139. package/dist/locale/lt.min.mjs +1 -1
  140. package/dist/locale/lt.mjs +1 -1
  141. package/dist/locale/lv.js +1 -1
  142. package/dist/locale/lv.min.js +1 -1
  143. package/dist/locale/lv.min.mjs +1 -1
  144. package/dist/locale/lv.mjs +1 -1
  145. package/dist/locale/mg.js +1 -1
  146. package/dist/locale/mg.min.js +1 -1
  147. package/dist/locale/mg.min.mjs +1 -1
  148. package/dist/locale/mg.mjs +1 -1
  149. package/dist/locale/mn.js +1 -1
  150. package/dist/locale/mn.min.js +1 -1
  151. package/dist/locale/mn.min.mjs +1 -1
  152. package/dist/locale/mn.mjs +1 -1
  153. package/dist/locale/nb-no.js +1 -1
  154. package/dist/locale/nb-no.min.js +1 -1
  155. package/dist/locale/nb-no.min.mjs +1 -1
  156. package/dist/locale/nb-no.mjs +1 -1
  157. package/dist/locale/nl.js +1 -1
  158. package/dist/locale/nl.min.js +1 -1
  159. package/dist/locale/nl.min.mjs +1 -1
  160. package/dist/locale/nl.mjs +1 -1
  161. package/dist/locale/pa.js +1 -1
  162. package/dist/locale/pa.min.js +1 -1
  163. package/dist/locale/pa.min.mjs +1 -1
  164. package/dist/locale/pa.mjs +1 -1
  165. package/dist/locale/pl.js +1 -1
  166. package/dist/locale/pl.min.js +1 -1
  167. package/dist/locale/pl.min.mjs +1 -1
  168. package/dist/locale/pl.mjs +1 -1
  169. package/dist/locale/pt-br.js +1 -1
  170. package/dist/locale/pt-br.min.js +1 -1
  171. package/dist/locale/pt-br.min.mjs +1 -1
  172. package/dist/locale/pt-br.mjs +1 -1
  173. package/dist/locale/pt.js +1 -1
  174. package/dist/locale/pt.min.js +1 -1
  175. package/dist/locale/pt.min.mjs +1 -1
  176. package/dist/locale/pt.mjs +1 -1
  177. package/dist/locale/ro.js +1 -1
  178. package/dist/locale/ro.min.js +1 -1
  179. package/dist/locale/ro.min.mjs +1 -1
  180. package/dist/locale/ro.mjs +1 -1
  181. package/dist/locale/ru.js +1 -1
  182. package/dist/locale/ru.min.js +1 -1
  183. package/dist/locale/ru.min.mjs +1 -1
  184. package/dist/locale/ru.mjs +1 -1
  185. package/dist/locale/sk.js +1 -1
  186. package/dist/locale/sk.min.js +1 -1
  187. package/dist/locale/sk.min.mjs +1 -1
  188. package/dist/locale/sk.mjs +1 -1
  189. package/dist/locale/sl.js +1 -1
  190. package/dist/locale/sl.min.js +1 -1
  191. package/dist/locale/sl.min.mjs +1 -1
  192. package/dist/locale/sl.mjs +1 -1
  193. package/dist/locale/sr.js +1 -1
  194. package/dist/locale/sr.min.js +1 -1
  195. package/dist/locale/sr.min.mjs +1 -1
  196. package/dist/locale/sr.mjs +1 -1
  197. package/dist/locale/sv.js +1 -1
  198. package/dist/locale/sv.min.js +1 -1
  199. package/dist/locale/sv.min.mjs +1 -1
  200. package/dist/locale/sv.mjs +1 -1
  201. package/dist/locale/sw.js +1 -1
  202. package/dist/locale/sw.min.js +1 -1
  203. package/dist/locale/sw.min.mjs +1 -1
  204. package/dist/locale/sw.mjs +1 -1
  205. package/dist/locale/ta.js +1 -1
  206. package/dist/locale/ta.min.js +1 -1
  207. package/dist/locale/ta.min.mjs +1 -1
  208. package/dist/locale/ta.mjs +1 -1
  209. package/dist/locale/th.js +1 -1
  210. package/dist/locale/th.min.js +1 -1
  211. package/dist/locale/th.min.mjs +1 -1
  212. package/dist/locale/th.mjs +1 -1
  213. package/dist/locale/tk.js +1 -1
  214. package/dist/locale/tk.min.js +1 -1
  215. package/dist/locale/tk.min.mjs +1 -1
  216. package/dist/locale/tk.mjs +1 -1
  217. package/dist/locale/tr.js +1 -1
  218. package/dist/locale/tr.min.js +1 -1
  219. package/dist/locale/tr.min.mjs +1 -1
  220. package/dist/locale/tr.mjs +1 -1
  221. package/dist/locale/ug-cn.js +1 -1
  222. package/dist/locale/ug-cn.min.js +1 -1
  223. package/dist/locale/ug-cn.min.mjs +1 -1
  224. package/dist/locale/ug-cn.mjs +1 -1
  225. package/dist/locale/uk.js +1 -1
  226. package/dist/locale/uk.min.js +1 -1
  227. package/dist/locale/uk.min.mjs +1 -1
  228. package/dist/locale/uk.mjs +1 -1
  229. package/dist/locale/uz-uz.js +1 -1
  230. package/dist/locale/uz-uz.min.js +1 -1
  231. package/dist/locale/uz-uz.min.mjs +1 -1
  232. package/dist/locale/uz-uz.mjs +1 -1
  233. package/dist/locale/vi.js +1 -1
  234. package/dist/locale/vi.min.js +1 -1
  235. package/dist/locale/vi.min.mjs +1 -1
  236. package/dist/locale/vi.mjs +1 -1
  237. package/dist/locale/zh-cn.js +1 -1
  238. package/dist/locale/zh-cn.min.js +1 -1
  239. package/dist/locale/zh-cn.min.mjs +1 -1
  240. package/dist/locale/zh-cn.mjs +1 -1
  241. package/dist/locale/zh-tw.js +1 -1
  242. package/dist/locale/zh-tw.min.js +1 -1
  243. package/dist/locale/zh-tw.min.mjs +1 -1
  244. package/dist/locale/zh-tw.mjs +1 -1
  245. package/es/components/anchor/index.mjs +2 -2
  246. package/es/components/anchor/src/anchor.mjs +38 -190
  247. package/es/components/anchor/src/anchor.mjs.map +1 -1
  248. package/es/components/anchor/src/anchor2.mjs +190 -38
  249. package/es/components/anchor/src/anchor2.mjs.map +1 -1
  250. package/es/components/avatar/index.mjs +2 -2
  251. package/es/components/avatar/src/avatar.mjs +32 -67
  252. package/es/components/avatar/src/avatar.mjs.map +1 -1
  253. package/es/components/avatar/src/avatar2.mjs +67 -32
  254. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  255. package/es/components/calendar/index.mjs +2 -2
  256. package/es/components/calendar/src/calendar.mjs +18 -131
  257. package/es/components/calendar/src/calendar.mjs.map +1 -1
  258. package/es/components/calendar/src/calendar2.mjs +131 -18
  259. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  260. package/es/components/card/index.mjs +2 -2
  261. package/es/components/card/src/card.mjs +43 -21
  262. package/es/components/card/src/card.mjs.map +1 -1
  263. package/es/components/card/src/card2.mjs +21 -43
  264. package/es/components/card/src/card2.mjs.map +1 -1
  265. package/es/components/carousel/index.d.ts +7 -0
  266. package/es/components/carousel/index.mjs +2 -2
  267. package/es/components/carousel/src/carousel-item.mjs +8 -70
  268. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  269. package/es/components/carousel/src/carousel-item2.mjs +70 -8
  270. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  271. package/es/components/carousel/src/carousel.d.ts +1 -0
  272. package/es/components/carousel/src/carousel.mjs +4 -0
  273. package/es/components/carousel/src/carousel.mjs.map +1 -1
  274. package/es/components/carousel/src/carousel.vue.d.ts +7 -0
  275. package/es/components/carousel/src/carousel2.mjs +100 -66
  276. package/es/components/carousel/src/carousel2.mjs.map +1 -1
  277. package/es/components/carousel/src/use-carousel.d.ts +2 -0
  278. package/es/components/carousel/src/use-carousel.mjs +23 -0
  279. package/es/components/carousel/src/use-carousel.mjs.map +1 -1
  280. package/es/components/cascader/index.mjs +2 -2
  281. package/es/components/cascader/src/cascader.mjs +65 -626
  282. package/es/components/cascader/src/cascader.mjs.map +1 -1
  283. package/es/components/cascader/src/cascader2.mjs +626 -65
  284. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  285. package/es/components/index.mjs +10 -10
  286. package/es/components/menu/index.mjs +2 -2
  287. package/es/components/menu/src/menu-item-group.mjs +35 -4
  288. package/es/components/menu/src/menu-item-group.mjs.map +1 -1
  289. package/es/components/menu/src/menu-item-group2.mjs +4 -35
  290. package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
  291. package/es/components/menu/src/menu.mjs +2 -0
  292. package/es/components/menu/src/menu.mjs.map +1 -1
  293. package/es/components/select-v2/src/useSelect.mjs +9 -2
  294. package/es/components/select-v2/src/useSelect.mjs.map +1 -1
  295. package/es/components/switch/index.mjs +2 -2
  296. package/es/components/switch/src/switch.mjs +82 -234
  297. package/es/components/switch/src/switch.mjs.map +1 -1
  298. package/es/components/switch/src/switch2.mjs +234 -82
  299. package/es/components/switch/src/switch2.mjs.map +1 -1
  300. package/es/components/tour/index.mjs +2 -2
  301. package/es/components/tour/src/tour.mjs +69 -152
  302. package/es/components/tour/src/tour.mjs.map +1 -1
  303. package/es/components/tour/src/tour2.mjs +152 -69
  304. package/es/components/tour/src/tour2.mjs.map +1 -1
  305. package/es/components/tree-select/src/select.d.ts +1 -1
  306. package/es/components/tree-select/src/select.mjs +15 -11
  307. package/es/components/tree-select/src/select.mjs.map +1 -1
  308. package/es/components/tree-select/src/tree.mjs +5 -6
  309. package/es/components/tree-select/src/tree.mjs.map +1 -1
  310. package/es/components/upload/index.mjs +2 -2
  311. package/es/components/upload/src/upload-content.mjs +1 -1
  312. package/es/components/upload/src/upload-content2.mjs +1 -1
  313. package/es/components/upload/src/upload-list.mjs +1 -1
  314. package/es/components/upload/src/upload.mjs +118 -104
  315. package/es/components/upload/src/upload.mjs.map +1 -1
  316. package/es/components/upload/src/upload2.mjs +104 -118
  317. package/es/components/upload/src/upload2.mjs.map +1 -1
  318. package/es/components/upload/src/use-handlers.mjs +1 -1
  319. package/es/index.mjs +10 -10
  320. package/es/version.d.ts +1 -1
  321. package/es/version.mjs +1 -1
  322. package/es/version.mjs.map +1 -1
  323. package/lib/components/anchor/index.js +2 -2
  324. package/lib/components/anchor/src/anchor.js +38 -189
  325. package/lib/components/anchor/src/anchor.js.map +1 -1
  326. package/lib/components/anchor/src/anchor2.js +189 -38
  327. package/lib/components/anchor/src/anchor2.js.map +1 -1
  328. package/lib/components/avatar/index.js +2 -2
  329. package/lib/components/avatar/src/avatar.js +33 -67
  330. package/lib/components/avatar/src/avatar.js.map +1 -1
  331. package/lib/components/avatar/src/avatar2.js +67 -33
  332. package/lib/components/avatar/src/avatar2.js.map +1 -1
  333. package/lib/components/calendar/index.js +2 -2
  334. package/lib/components/calendar/src/calendar.js +19 -131
  335. package/lib/components/calendar/src/calendar.js.map +1 -1
  336. package/lib/components/calendar/src/calendar2.js +131 -19
  337. package/lib/components/calendar/src/calendar2.js.map +1 -1
  338. package/lib/components/card/index.js +2 -2
  339. package/lib/components/card/src/card.js +43 -21
  340. package/lib/components/card/src/card.js.map +1 -1
  341. package/lib/components/card/src/card2.js +21 -43
  342. package/lib/components/card/src/card2.js.map +1 -1
  343. package/lib/components/carousel/index.d.ts +7 -0
  344. package/lib/components/carousel/index.js +2 -2
  345. package/lib/components/carousel/src/carousel-item.js +8 -70
  346. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  347. package/lib/components/carousel/src/carousel-item2.js +70 -8
  348. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  349. package/lib/components/carousel/src/carousel.d.ts +1 -0
  350. package/lib/components/carousel/src/carousel.js +4 -0
  351. package/lib/components/carousel/src/carousel.js.map +1 -1
  352. package/lib/components/carousel/src/carousel.vue.d.ts +7 -0
  353. package/lib/components/carousel/src/carousel2.js +99 -65
  354. package/lib/components/carousel/src/carousel2.js.map +1 -1
  355. package/lib/components/carousel/src/use-carousel.d.ts +2 -0
  356. package/lib/components/carousel/src/use-carousel.js +23 -0
  357. package/lib/components/carousel/src/use-carousel.js.map +1 -1
  358. package/lib/components/cascader/index.js +2 -2
  359. package/lib/components/cascader/src/cascader.js +66 -626
  360. package/lib/components/cascader/src/cascader.js.map +1 -1
  361. package/lib/components/cascader/src/cascader2.js +626 -66
  362. package/lib/components/cascader/src/cascader2.js.map +1 -1
  363. package/lib/components/index.js +10 -10
  364. package/lib/components/menu/index.js +2 -2
  365. package/lib/components/menu/src/menu-item-group.js +35 -4
  366. package/lib/components/menu/src/menu-item-group.js.map +1 -1
  367. package/lib/components/menu/src/menu-item-group2.js +4 -35
  368. package/lib/components/menu/src/menu-item-group2.js.map +1 -1
  369. package/lib/components/menu/src/menu.js +2 -0
  370. package/lib/components/menu/src/menu.js.map +1 -1
  371. package/lib/components/select-v2/src/useSelect.js +9 -2
  372. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  373. package/lib/components/switch/index.js +2 -2
  374. package/lib/components/switch/src/switch.js +82 -233
  375. package/lib/components/switch/src/switch.js.map +1 -1
  376. package/lib/components/switch/src/switch2.js +233 -82
  377. package/lib/components/switch/src/switch2.js.map +1 -1
  378. package/lib/components/tour/index.js +2 -2
  379. package/lib/components/tour/src/tour.js +69 -151
  380. package/lib/components/tour/src/tour.js.map +1 -1
  381. package/lib/components/tour/src/tour2.js +151 -69
  382. package/lib/components/tour/src/tour2.js.map +1 -1
  383. package/lib/components/tree-select/src/select.d.ts +1 -1
  384. package/lib/components/tree-select/src/select.js +14 -10
  385. package/lib/components/tree-select/src/select.js.map +1 -1
  386. package/lib/components/tree-select/src/tree.js +5 -6
  387. package/lib/components/tree-select/src/tree.js.map +1 -1
  388. package/lib/components/upload/index.js +2 -2
  389. package/lib/components/upload/src/upload-content.js +1 -1
  390. package/lib/components/upload/src/upload-content2.js +1 -1
  391. package/lib/components/upload/src/upload-list.js +1 -1
  392. package/lib/components/upload/src/upload.js +118 -107
  393. package/lib/components/upload/src/upload.js.map +1 -1
  394. package/lib/components/upload/src/upload2.js +107 -118
  395. package/lib/components/upload/src/upload2.js.map +1 -1
  396. package/lib/components/upload/src/use-handlers.js +1 -1
  397. package/lib/index.js +10 -10
  398. package/lib/version.d.ts +1 -1
  399. package/lib/version.js +1 -1
  400. package/lib/version.js.map +1 -1
  401. package/package.json +2 -2
  402. package/tags.json +1 -1
  403. package/theme-chalk/el-carousel.css +1 -1
  404. package/theme-chalk/index.css +1 -1
  405. package/theme-chalk/src/carousel.scss +8 -0
  406. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tour.mjs","sources":["../../../../../../packages/components/tour/src/tour.vue"],"sourcesContent":["<template>\n <teleport :to=\"appendTo\">\n <div :class=\"kls\" v-bind=\"$attrs\">\n <el-tour-mask\n :visible=\"mergedShowMask\"\n :fill=\"mergedMaskStyle?.color\"\n :style=\"mergedMaskStyle?.style\"\n :pos=\"pos\"\n :z-index=\"mergedZIndex\"\n :target-area-clickable=\"targetAreaClickable\"\n />\n <el-tour-content\n v-if=\"modelValue\"\n :key=\"current\"\n :reference=\"triggerTarget\"\n :placement=\"mergedPlacement\"\n :show-arrow=\"mergedShowArrow\"\n :z-index=\"mergedZIndex\"\n :style=\"mergedContentStyle\"\n @close=\"onEscClose\"\n >\n <el-tour-steps :current=\"current\" @update-total=\"onUpdateTotal\">\n <slot />\n </el-tour-steps>\n </el-tour-content>\n </div>\n </teleport>\n <!-- just for IDE -->\n <slot v-if=\"false\" name=\"indicators\" :current=\"current + 1\" :total=\"total\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref, toRef, useSlots, watch } from 'vue'\nimport { useVModel } from '@vueuse/core'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\nimport { isBoolean } from '@element-plus/utils'\nimport ElTourMask from './mask.vue'\nimport ElTourContent from './content.vue'\nimport ElTourSteps from './steps'\nimport { tourEmits, tourProps } from './tour'\nimport { tourKey, useTarget } from './helper'\nimport type { TourStepProps } from './step'\n\ndefineOptions({\n name: 'ElTour',\n})\n\nconst props = defineProps(tourProps)\nconst emit = defineEmits(tourEmits)\n\nconst ns = useNamespace('tour')\nconst total = ref(0)\nconst currentStep = ref<TourStepProps>()\n\nconst current = useVModel(props, 'current', emit, {\n passive: true,\n})\n\nconst currentTarget = computed(() => currentStep.value?.target)\n\nconst kls = computed(() => [\n ns.b(),\n mergedType.value === 'primary' ? ns.m('primary') : '',\n])\n\nconst mergedPlacement = computed(\n () => currentStep.value?.placement || props.placement\n)\n\nconst mergedContentStyle = computed(\n () => currentStep.value?.contentStyle ?? props.contentStyle\n)\n\nconst mergedMask = computed(() => currentStep.value?.mask ?? props.mask)\nconst mergedShowMask = computed(() => !!mergedMask.value && props.modelValue)\nconst mergedMaskStyle = computed(() =>\n isBoolean(mergedMask.value) ? undefined : mergedMask.value\n)\n\nconst mergedShowArrow = computed(\n () =>\n !!currentTarget.value && (currentStep.value?.showArrow ?? props.showArrow)\n)\n\nconst mergedScrollIntoViewOptions = computed(\n () => currentStep.value?.scrollIntoViewOptions ?? props.scrollIntoViewOptions\n)\nconst mergedType = computed(() => currentStep.value?.type ?? props.type)\n\nconst { nextZIndex } = useZIndex()\nconst nowZIndex = nextZIndex()\nconst mergedZIndex = computed(() => props.zIndex ?? nowZIndex)\n\nconst { mergedPosInfo: pos, triggerTarget } = useTarget(\n currentTarget,\n toRef(props, 'modelValue'),\n toRef(props, 'gap'),\n mergedMask,\n mergedScrollIntoViewOptions\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n if (!val) {\n current.value = 0\n }\n }\n)\n\nconst onEscClose = () => {\n if (props.closeOnPressEscape) {\n emit('update:modelValue', false)\n emit('close', current.value)\n }\n}\n\nconst onUpdateTotal = (val: number) => {\n total.value = val\n}\n\nconst slots = useSlots()\n\nprovide(tourKey, {\n currentStep,\n current,\n total,\n showClose: toRef(props, 'showClose'),\n closeIcon: toRef(props, 'closeIcon') as any,\n mergedType: mergedType as any,\n ns,\n slots,\n updateModelValue(modelValue) {\n emit('update:modelValue', modelValue)\n },\n onClose() {\n emit('close', current.value)\n },\n onFinish() {\n emit('finish')\n },\n onChange() {\n emit('change', current.value)\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;mCA2Cc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAC9B,IAAM,MAAA,KAAA,GAAQ,IAAI,CAAC,CAAA,CAAA;AACnB,IAAA,MAAM,cAAc,GAAmB,EAAA,CAAA;AAEvC,IAAA,MAAM,OAAU,GAAA,SAAA,CAAU,KAAO,EAAA,SAAA,EAAW,IAAM,EAAA;AAAA,MAChD,OAAS,EAAA,IAAA;AAAA,KACV,CAAA,CAAA;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AmC,MACnC,OAAA,CAAA,EAAA,GAAA,KAAA,CAAA,MAAA,KAAA,IAAA,GAAA,EAAA,GAAA,SAAA,CAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACA,MAAA,EAAA,aAAA,EAAA,GAAA,EAAA,aAAA,EAAA,GAAA,SAAA,CAAA,aAAA,EAAA,KAAA,CAAA,KAAA,EAAA,YAAA,CAAA,EAAA,KAAA,CAAA,KAAA,EAAA,KAAA,CAAA,EAAA,UAAA,EAAA,2BAAA,CAAA,CAAA;AAAA,IAAA,4BAC6B,EAAA,CAAA,GAAA,KAAA;AAC3B,MAAA,IAAA,CAAA;AAAoC,QACtC,OAAA,CAAA,KAAA,GAAA,CAAA,CAAA;AAAA,OACU;AACR,KAAK,CAAA,CAAA;AAAsB,IAC7B,MAAA,UAAA,GAAA,MAAA;AAAA,MACA,IAAW,KAAA,CAAA,kBAAA,EAAA;AACT,QAAA,IAAA,CAAK,mBAAQ,EAAA,KAAA,CAAA,CAAA;AAAA,QACf,IAAA,CAAA,OAAA,EAAA,OAAA,CAAA,KAAA,CAAA,CAAA;AAAA,OACW;AACT,KAAK,CAAA;AAAuB,IAC9B,MAAA,aAAA,GAAA,CAAA,GAAA,KAAA;AAAA,MACD,KAAA,CAAA,KAAA,GAAA,GAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"tour.mjs","sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { tourContentProps } from './content'\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport const tourProps = buildProps({\n /**\n * @description open tour\n */\n modelValue: Boolean,\n /**\n * @description what is the current step\n */\n current: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom close icon\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: true,\n },\n /**\n * @description transparent gap between mask and target\n */\n gap: {\n type: definePropType<TourGap>(Object),\n default: () => ({\n offset: 6,\n radius: 2,\n }),\n },\n /**\n * @description tour's zIndex\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: () => ({\n block: 'center',\n }),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'defalut' | 'primary'>(String),\n },\n /**\n * @description which element the TourContent appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElement>([String, Object]),\n default: 'body',\n },\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\nexport type TourProps = ExtractPropTypes<typeof tourProps>\nexport type TourInstance = InstanceType<typeof Tour>\n\nexport const tourEmits = {\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n ['update:current']: (current: number) => isNumber(current),\n close: (current: number) => isNumber(current),\n finish: () => true,\n change: (current: number) => isNumber(current),\n}\nexport type TourEmits = typeof tourEmits\n"],"names":[],"mappings":";;;;;;;;AASY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,UA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AAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,SAAS,GAAG;AACzB,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AACnD,EAAE,CAAC,gBAAgB,GAAG,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,CAAC;AACpD,EAAE,KAAK,EAAE,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,CAAC;AACvC,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,MAAM,EAAE,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,CAAC;AACxC;;;;"}
@@ -1,75 +1,158 @@
1
+ import { defineComponent, ref, computed, toRef, watch, useSlots, provide, openBlock, createElementBlock, Fragment, createBlock, Teleport, createElementVNode, mergeProps, unref, createVNode, normalizeStyle, withCtx, renderSlot, createCommentVNode } from 'vue';
2
+ import { useVModel } from '@vueuse/core';
3
+ import '../../../hooks/index.mjs';
1
4
  import '../../../utils/index.mjs';
2
- import '../../../constants/index.mjs';
3
- import { tourContentProps } from './content.mjs';
4
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
- import { iconPropType } from '../../../utils/vue/icon.mjs';
6
- import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
7
- import { isBoolean, isNumber } from '../../../utils/types.mjs';
5
+ import ElTourMask from './mask2.mjs';
6
+ import ElTourContent from './content2.mjs';
7
+ import ElTourSteps from './steps.mjs';
8
+ import { tourProps, tourEmits } from './tour.mjs';
9
+ import { useTarget, tourKey } from './helper.mjs';
10
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
11
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
12
+ import { isBoolean } from '../../../utils/types.mjs';
13
+ import { useZIndex } from '../../../hooks/use-z-index/index.mjs';
8
14
 
9
- const tourProps = buildProps({
10
- modelValue: Boolean,
11
- current: {
12
- type: Number,
13
- default: 0
14
- },
15
- showArrow: {
16
- type: Boolean,
17
- default: true
18
- },
19
- showClose: {
20
- type: Boolean,
21
- default: true
22
- },
23
- closeIcon: {
24
- type: iconPropType
25
- },
26
- placement: tourContentProps.placement,
27
- contentStyle: {
28
- type: definePropType([Object])
29
- },
30
- mask: {
31
- type: definePropType([Boolean, Object]),
32
- default: true
33
- },
34
- gap: {
35
- type: definePropType(Object),
36
- default: () => ({
37
- offset: 6,
38
- radius: 2
39
- })
40
- },
41
- zIndex: {
42
- type: Number
43
- },
44
- scrollIntoViewOptions: {
45
- type: definePropType([Boolean, Object]),
46
- default: () => ({
47
- block: "center"
48
- })
49
- },
50
- type: {
51
- type: definePropType(String)
52
- },
53
- appendTo: {
54
- type: definePropType([String, Object]),
55
- default: "body"
56
- },
57
- closeOnPressEscape: {
58
- type: Boolean,
59
- default: true
60
- },
61
- targetAreaClickable: {
62
- type: Boolean,
63
- default: true
15
+ const __default__ = defineComponent({
16
+ name: "ElTour"
17
+ });
18
+ const _sfc_main = /* @__PURE__ */ defineComponent({
19
+ ...__default__,
20
+ props: tourProps,
21
+ emits: tourEmits,
22
+ setup(__props, { emit }) {
23
+ const props = __props;
24
+ const ns = useNamespace("tour");
25
+ const total = ref(0);
26
+ const currentStep = ref();
27
+ const current = useVModel(props, "current", emit, {
28
+ passive: true
29
+ });
30
+ const currentTarget = computed(() => {
31
+ var _a;
32
+ return (_a = currentStep.value) == null ? void 0 : _a.target;
33
+ });
34
+ const kls = computed(() => [
35
+ ns.b(),
36
+ mergedType.value === "primary" ? ns.m("primary") : ""
37
+ ]);
38
+ const mergedPlacement = computed(() => {
39
+ var _a;
40
+ return ((_a = currentStep.value) == null ? void 0 : _a.placement) || props.placement;
41
+ });
42
+ const mergedContentStyle = computed(() => {
43
+ var _a, _b;
44
+ return (_b = (_a = currentStep.value) == null ? void 0 : _a.contentStyle) != null ? _b : props.contentStyle;
45
+ });
46
+ const mergedMask = computed(() => {
47
+ var _a, _b;
48
+ return (_b = (_a = currentStep.value) == null ? void 0 : _a.mask) != null ? _b : props.mask;
49
+ });
50
+ const mergedShowMask = computed(() => !!mergedMask.value && props.modelValue);
51
+ const mergedMaskStyle = computed(() => isBoolean(mergedMask.value) ? void 0 : mergedMask.value);
52
+ const mergedShowArrow = computed(() => {
53
+ var _a, _b;
54
+ return !!currentTarget.value && ((_b = (_a = currentStep.value) == null ? void 0 : _a.showArrow) != null ? _b : props.showArrow);
55
+ });
56
+ const mergedScrollIntoViewOptions = computed(() => {
57
+ var _a, _b;
58
+ return (_b = (_a = currentStep.value) == null ? void 0 : _a.scrollIntoViewOptions) != null ? _b : props.scrollIntoViewOptions;
59
+ });
60
+ const mergedType = computed(() => {
61
+ var _a, _b;
62
+ return (_b = (_a = currentStep.value) == null ? void 0 : _a.type) != null ? _b : props.type;
63
+ });
64
+ const { nextZIndex } = useZIndex();
65
+ const nowZIndex = nextZIndex();
66
+ const mergedZIndex = computed(() => {
67
+ var _a;
68
+ return (_a = props.zIndex) != null ? _a : nowZIndex;
69
+ });
70
+ const { mergedPosInfo: pos, triggerTarget } = useTarget(currentTarget, toRef(props, "modelValue"), toRef(props, "gap"), mergedMask, mergedScrollIntoViewOptions);
71
+ watch(() => props.modelValue, (val) => {
72
+ if (!val) {
73
+ current.value = 0;
74
+ }
75
+ });
76
+ const onEscClose = () => {
77
+ if (props.closeOnPressEscape) {
78
+ emit("update:modelValue", false);
79
+ emit("close", current.value);
80
+ }
81
+ };
82
+ const onUpdateTotal = (val) => {
83
+ total.value = val;
84
+ };
85
+ const slots = useSlots();
86
+ provide(tourKey, {
87
+ currentStep,
88
+ current,
89
+ total,
90
+ showClose: toRef(props, "showClose"),
91
+ closeIcon: toRef(props, "closeIcon"),
92
+ mergedType,
93
+ ns,
94
+ slots,
95
+ updateModelValue(modelValue) {
96
+ emit("update:modelValue", modelValue);
97
+ },
98
+ onClose() {
99
+ emit("close", current.value);
100
+ },
101
+ onFinish() {
102
+ emit("finish");
103
+ },
104
+ onChange() {
105
+ emit("change", current.value);
106
+ }
107
+ });
108
+ return (_ctx, _cache) => {
109
+ var _a, _b;
110
+ return openBlock(), createElementBlock(Fragment, null, [
111
+ (openBlock(), createBlock(Teleport, { to: _ctx.appendTo }, [
112
+ createElementVNode("div", mergeProps({ class: unref(kls) }, _ctx.$attrs), [
113
+ createVNode(ElTourMask, {
114
+ visible: unref(mergedShowMask),
115
+ fill: (_a = unref(mergedMaskStyle)) == null ? void 0 : _a.color,
116
+ style: normalizeStyle((_b = unref(mergedMaskStyle)) == null ? void 0 : _b.style),
117
+ pos: unref(pos),
118
+ "z-index": unref(mergedZIndex),
119
+ "target-area-clickable": _ctx.targetAreaClickable
120
+ }, null, 8, ["visible", "fill", "style", "pos", "z-index", "target-area-clickable"]),
121
+ _ctx.modelValue ? (openBlock(), createBlock(ElTourContent, {
122
+ key: unref(current),
123
+ reference: unref(triggerTarget),
124
+ placement: unref(mergedPlacement),
125
+ "show-arrow": unref(mergedShowArrow),
126
+ "z-index": unref(mergedZIndex),
127
+ style: normalizeStyle(unref(mergedContentStyle)),
128
+ onClose: onEscClose
129
+ }, {
130
+ default: withCtx(() => [
131
+ createVNode(unref(ElTourSteps), {
132
+ current: unref(current),
133
+ onUpdateTotal
134
+ }, {
135
+ default: withCtx(() => [
136
+ renderSlot(_ctx.$slots, "default")
137
+ ]),
138
+ _: 3
139
+ }, 8, ["current"])
140
+ ]),
141
+ _: 3
142
+ }, 8, ["reference", "placement", "show-arrow", "z-index", "style"])) : createCommentVNode("v-if", true)
143
+ ], 16)
144
+ ], 8, ["to"])),
145
+ createCommentVNode(" just for IDE "),
146
+ false ? renderSlot(_ctx.$slots, "indicators", {
147
+ key: 0,
148
+ current: unref(current) + 1,
149
+ total: total.value
150
+ }) : createCommentVNode("v-if", true)
151
+ ], 64);
152
+ };
64
153
  }
65
154
  });
66
- const tourEmits = {
67
- [UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
68
- ["update:current"]: (current) => isNumber(current),
69
- close: (current) => isNumber(current),
70
- finish: () => true,
71
- change: (current) => isNumber(current)
72
- };
155
+ var Tour = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tour.vue"]]);
73
156
 
74
- export { tourEmits, tourProps };
157
+ export { Tour as default };
75
158
  //# sourceMappingURL=tour2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tour2.mjs","sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { tourContentProps } from './content'\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport const tourProps = buildProps({\n /**\n * @description open tour\n */\n modelValue: Boolean,\n /**\n * @description what is the current step\n */\n current: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom close icon\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: true,\n },\n /**\n * @description transparent gap between mask and target\n */\n gap: {\n type: definePropType<TourGap>(Object),\n default: () => ({\n offset: 6,\n radius: 2,\n }),\n },\n /**\n * @description tour's zIndex\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: () => ({\n block: 'center',\n }),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'defalut' | 'primary'>(String),\n },\n /**\n * @description which element the TourContent appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElement>([String, Object]),\n default: 'body',\n },\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\nexport type TourProps = ExtractPropTypes<typeof tourProps>\nexport type TourInstance = InstanceType<typeof Tour>\n\nexport const tourEmits = {\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n ['update:current']: (current: number) => isNumber(current),\n close: (current: number) => isNumber(current),\n finish: () => true,\n change: (current: number) => isNumber(current),\n}\nexport type TourEmits = typeof tourEmits\n"],"names":[],"mappings":";;;;;;;;AASY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,SAAS,EAAE,gBAAgB,CAAC,SAAS;AACvC,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAClC,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AAQ,CAAC,OAAO,CAAC;AACvC,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,MAAM,EAAE,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,CAAC;AACxC;;;;"}
1
+ {"version":3,"file":"tour2.mjs","sources":["../../../../../../packages/components/tour/src/tour.vue"],"sourcesContent":["<template>\n <teleport :to=\"appendTo\">\n <div :class=\"kls\" v-bind=\"$attrs\">\n <el-tour-mask\n :visible=\"mergedShowMask\"\n :fill=\"mergedMaskStyle?.color\"\n :style=\"mergedMaskStyle?.style\"\n :pos=\"pos\"\n :z-index=\"mergedZIndex\"\n :target-area-clickable=\"targetAreaClickable\"\n />\n <el-tour-content\n v-if=\"modelValue\"\n :key=\"current\"\n :reference=\"triggerTarget\"\n :placement=\"mergedPlacement\"\n :show-arrow=\"mergedShowArrow\"\n :z-index=\"mergedZIndex\"\n :style=\"mergedContentStyle\"\n @close=\"onEscClose\"\n >\n <el-tour-steps :current=\"current\" @update-total=\"onUpdateTotal\">\n <slot />\n </el-tour-steps>\n </el-tour-content>\n </div>\n </teleport>\n <!-- just for IDE -->\n <slot v-if=\"false\" name=\"indicators\" :current=\"current + 1\" :total=\"total\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref, toRef, useSlots, watch } from 'vue'\nimport { useVModel } from '@vueuse/core'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\nimport { isBoolean } from '@element-plus/utils'\nimport ElTourMask from './mask.vue'\nimport ElTourContent from './content.vue'\nimport ElTourSteps from './steps'\nimport { tourEmits, tourProps } from './tour'\nimport { tourKey, useTarget } from './helper'\nimport type { TourStepProps } from './step'\n\ndefineOptions({\n name: 'ElTour',\n})\n\nconst props = defineProps(tourProps)\nconst emit = defineEmits(tourEmits)\n\nconst ns = useNamespace('tour')\nconst total = ref(0)\nconst currentStep = ref<TourStepProps>()\n\nconst current = useVModel(props, 'current', emit, {\n passive: true,\n})\n\nconst currentTarget = computed(() => currentStep.value?.target)\n\nconst kls = computed(() => [\n ns.b(),\n mergedType.value === 'primary' ? ns.m('primary') : '',\n])\n\nconst mergedPlacement = computed(\n () => currentStep.value?.placement || props.placement\n)\n\nconst mergedContentStyle = computed(\n () => currentStep.value?.contentStyle ?? props.contentStyle\n)\n\nconst mergedMask = computed(() => currentStep.value?.mask ?? props.mask)\nconst mergedShowMask = computed(() => !!mergedMask.value && props.modelValue)\nconst mergedMaskStyle = computed(() =>\n isBoolean(mergedMask.value) ? undefined : mergedMask.value\n)\n\nconst mergedShowArrow = computed(\n () =>\n !!currentTarget.value && (currentStep.value?.showArrow ?? props.showArrow)\n)\n\nconst mergedScrollIntoViewOptions = computed(\n () => currentStep.value?.scrollIntoViewOptions ?? props.scrollIntoViewOptions\n)\nconst mergedType = computed(() => currentStep.value?.type ?? props.type)\n\nconst { nextZIndex } = useZIndex()\nconst nowZIndex = nextZIndex()\nconst mergedZIndex = computed(() => props.zIndex ?? nowZIndex)\n\nconst { mergedPosInfo: pos, triggerTarget } = useTarget(\n currentTarget,\n toRef(props, 'modelValue'),\n toRef(props, 'gap'),\n mergedMask,\n mergedScrollIntoViewOptions\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n if (!val) {\n current.value = 0\n }\n }\n)\n\nconst onEscClose = () => {\n if (props.closeOnPressEscape) {\n emit('update:modelValue', false)\n emit('close', current.value)\n }\n}\n\nconst onUpdateTotal = (val: number) => {\n total.value = val\n}\n\nconst slots = useSlots()\n\nprovide(tourKey, {\n currentStep,\n current,\n total,\n showClose: toRef(props, 'showClose'),\n closeIcon: toRef(props, 'closeIcon') as any,\n mergedType: mergedType as any,\n ns,\n slots,\n updateModelValue(modelValue) {\n emit('update:modelValue', modelValue)\n },\n onClose() {\n emit('close', current.value)\n },\n onFinish() {\n emit('finish')\n },\n onChange() {\n emit('change', current.value)\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;mCA2Cc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAA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/nightly/es/components/tree';
4
4
  export declare const useSelect: (props: any, { attrs, emit }: {
5
5
  attrs: any;
6
6
  emit: any;
7
- }, { tree, key, }: {
7
+ }, { select, tree, key, }: {
8
8
  select: Ref<InstanceType<typeof ElSelect> | undefined>;
9
9
  tree: Ref<InstanceType<typeof ElTree> | undefined>;
10
10
  key: Ref<string>;
@@ -1,4 +1,4 @@
1
- import { toRefs, computed, nextTick } from 'vue';
1
+ import { watch, nextTick, toRefs, computed } from 'vue';
2
2
  import { pick } from 'lodash-unified';
3
3
  import { ElSelect } from '../../select/index.mjs';
4
4
  import '../../../hooks/index.mjs';
@@ -7,10 +7,19 @@ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
7
7
  import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
8
8
 
9
9
  const useSelect = (props, { attrs, emit }, {
10
+ select,
10
11
  tree,
11
12
  key
12
13
  }) => {
13
14
  const ns = useNamespace("tree-select");
15
+ watch(() => props.data, () => {
16
+ if (props.filterable) {
17
+ nextTick(() => {
18
+ var _a, _b;
19
+ (_b = tree.value) == null ? void 0 : _b.filter((_a = select.value) == null ? void 0 : _a.states.inputValue);
20
+ });
21
+ }
22
+ }, { flush: "post" });
14
23
  const result = {
15
24
  ...pick(toRefs(props), Object.keys(ElSelect.props)),
16
25
  ...attrs,
@@ -23,18 +32,13 @@ const useSelect = (props, { attrs, emit }, {
23
32
  return classes.join(" ");
24
33
  }),
25
34
  filterMethod: (keyword = "") => {
26
- if (props.filterMethod)
35
+ var _a;
36
+ if (props.filterMethod) {
27
37
  props.filterMethod(keyword);
28
- nextTick(() => {
29
- var _a;
38
+ } else if (props.remoteMethod) {
39
+ props.remoteMethod(keyword);
40
+ } else {
30
41
  (_a = tree.value) == null ? void 0 : _a.filter(keyword);
31
- });
32
- },
33
- onVisibleChange: (visible) => {
34
- var _a;
35
- (_a = attrs.onVisibleChange) == null ? void 0 : _a.call(attrs, visible);
36
- if (props.filterable && visible) {
37
- result.filterMethod();
38
42
  }
39
43
  }
40
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"select.mjs","sources":["../../../../../../packages/components/tree-select/src/select.ts"],"sourcesContent":["// @ts-nocheck\nimport { computed, nextTick, toRefs } from 'vue'\nimport { pick } from 'lodash-unified'\nimport ElSelect from '@element-plus/components/select'\nimport { useNamespace } from '@element-plus/hooks'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { Ref } from 'vue'\nimport type ElTree from '@element-plus/components/tree'\n\nexport const useSelect = (\n props,\n { attrs, emit },\n {\n tree,\n key,\n }: {\n select: Ref<InstanceType<typeof ElSelect> | undefined>\n tree: Ref<InstanceType<typeof ElTree> | undefined>\n key: Ref<string>\n }\n) => {\n const ns = useNamespace('tree-select')\n\n const result = {\n ...pick(toRefs(props), Object.keys(ElSelect.props)),\n ...attrs,\n // attrs is not reactive, when v-model binding source changes,\n // this listener is still old, see the bug(or test 'v-model source change'):\n // https://github.com/element-plus/element-plus/issues/14204\n 'onUpdate:modelValue': (value) => emit(UPDATE_MODEL_EVENT, value),\n valueKey: key,\n popperClass: computed(() => {\n const classes = [ns.e('popper')]\n if (props.popperClass) classes.push(props.popperClass)\n return classes.join(' ')\n }),\n filterMethod: (keyword = '') => {\n if (props.filterMethod) props.filterMethod(keyword)\n\n nextTick(() => {\n // let tree node expand only, same with tree filter\n tree.value?.filter(keyword)\n })\n },\n // clear filter text when visible change\n onVisibleChange: (visible: boolean) => {\n attrs.onVisibleChange?.(visible)\n\n if (props.filterable && visible) {\n result.filterMethod()\n }\n },\n }\n\n return result\n}\n"],"names":[],"mappings":";;;;;;;;AAKY,MAAC,SAAS,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;AAClD,EAAE,IAAI;AACN,EAAE,GAAG;AACL,CAAC,KAAK;AACN,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;AACzC,EAAE,MAAM,MAAM,GAAG;AACjB,IAAI,GAAG,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OAAO;AACP,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO,MAAM,CAAC;AAChB;;;;"}
1
+ {"version":3,"file":"select.mjs","sources":["../../../../../../packages/components/tree-select/src/select.ts"],"sourcesContent":["// @ts-nocheck\nimport { computed, nextTick, toRefs, watch } from 'vue'\nimport { pick } from 'lodash-unified'\nimport ElSelect from '@element-plus/components/select'\nimport { useNamespace } from '@element-plus/hooks'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { Ref } from 'vue'\nimport type ElTree from '@element-plus/components/tree'\n\nexport const useSelect = (\n props,\n { attrs, emit },\n {\n select,\n tree,\n key,\n }: {\n select: Ref<InstanceType<typeof ElSelect> | undefined>\n tree: Ref<InstanceType<typeof ElTree> | undefined>\n key: Ref<string>\n }\n) => {\n const ns = useNamespace('tree-select')\n\n // update tree data when use filterMethod/remoteMethod\n watch(\n () => props.data,\n () => {\n if (props.filterable) {\n nextTick(() => {\n // let tree node expand only, same with tree filter\n tree.value?.filter(select.value?.states.inputValue)\n })\n }\n },\n { flush: 'post' }\n )\n\n const result = {\n ...pick(toRefs(props), Object.keys(ElSelect.props)),\n ...attrs,\n // attrs is not reactive, when v-model binding source changes,\n // this listener is still old, see the bug(or test 'v-model source change'):\n // https://github.com/element-plus/element-plus/issues/14204\n 'onUpdate:modelValue': (value) => emit(UPDATE_MODEL_EVENT, value),\n valueKey: key,\n popperClass: computed(() => {\n const classes = [ns.e('popper')]\n if (props.popperClass) classes.push(props.popperClass)\n return classes.join(' ')\n }),\n filterMethod: (keyword = '') => {\n if (props.filterMethod) {\n props.filterMethod(keyword)\n } else if (props.remoteMethod) {\n props.remoteMethod(keyword)\n } else {\n // let tree node expand only, same with tree filter\n tree.value?.filter(keyword)\n }\n },\n }\n\n return result\n}\n"],"names":[],"mappings":";;;;;;;;AAKY,MAAC,SAAS,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;AAClD,EAAE,MAAM;AACR,EA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AG,EAAE,KAAK;AACpC,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,IAAI,KAAK,CAAC,YAAY,EAAE;AAC9B,QAAQ,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACpC,OAAO,MAAM,IAAI,KAAK,CAAC,YAAY,EAAE;AACrC,QAAQ,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACpC,OAAO,MAAM;AACb,QAAQ,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAChE,OAAO;AACP,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO,MAAM,CAAC;AAChB;;;;"}
@@ -61,9 +61,6 @@ const useTree = (props, { attrs, slots, emit }, {
61
61
  }, (data) => getNodeValByProp("children", data));
62
62
  return options;
63
63
  });
64
- const cacheOptionsMap = computed(() => {
65
- return cacheOptions.value.reduce((prev, next) => ({ ...prev, [next.value]: next }), {});
66
- });
67
64
  return {
68
65
  ...pick(toRefs(props), Object.keys(_Tree.props)),
69
66
  ...attrs,
@@ -109,14 +106,16 @@ const useTree = (props, { attrs, slots, emit }, {
109
106
  if (!props.showCheckbox)
110
107
  return;
111
108
  const dataValue = getNodeValByProp("value", data);
109
+ const dataMap = {};
110
+ treeEach([tree.value.store.root], (node) => dataMap[node.key] = node, (node) => node.childNodes);
112
111
  const uncachedCheckedKeys = params.checkedKeys;
113
- const cachedKeys = props.multiple ? toValidArray(props.modelValue).filter((item) => item in cacheOptionsMap.value && !tree.value.getNode(item) && !uncachedCheckedKeys.includes(item)) : [];
114
- const checkedKeys = uncachedCheckedKeys.concat(cachedKeys);
112
+ const cachedKeys = props.multiple ? toValidArray(props.modelValue).filter((item) => !(item in dataMap) && !uncachedCheckedKeys.includes(item)) : [];
113
+ const checkedKeys = cachedKeys.concat(uncachedCheckedKeys);
115
114
  if (props.checkStrictly) {
116
115
  emit(UPDATE_MODEL_EVENT, props.multiple ? checkedKeys : checkedKeys.includes(dataValue) ? dataValue : void 0);
117
116
  } else {
118
117
  if (props.multiple) {
119
- emit(UPDATE_MODEL_EVENT, tree.value.getCheckedKeys(true));
118
+ emit(UPDATE_MODEL_EVENT, cachedKeys.concat(tree.value.getCheckedKeys(true)));
120
119
  } else {
121
120
  const firstLeaf = treeFind([data], (data2) => !isValidArray(getNodeValByProp("children", data2)) && !getNodeValByProp("disabled", data2), (data2) => getNodeValByProp("children", data2));
122
121
  const firstLeafKey = firstLeaf ? getNodeValByProp("value", firstLeaf) : void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"tree.mjs","sources":["../../../../../../packages/components/tree-select/src/tree.ts"],"sourcesContent":["// @ts-nocheck\nimport { computed, nextTick, toRefs, watch } from 'vue'\nimport { isEqual, pick } from 'lodash-unified'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { escapeStringRegexp, isFunction } from '@element-plus/utils'\nimport ElTree from '@element-plus/components/tree'\nimport TreeSelectOption from './tree-select-option'\nimport {\n isValidArray,\n isValidValue,\n toValidArray,\n treeEach,\n treeFind,\n} from './utils'\nimport type { CacheOption } from './cache-options'\nimport type { Ref } from 'vue'\nimport type ElSelect from '@element-plus/components/select'\nimport type Node from '@element-plus/components/tree/src/model/node'\nimport type { TreeNodeData } from '@element-plus/components/tree/src/tree.type'\n\nexport const useTree = (\n props,\n { attrs, slots, emit },\n {\n select,\n tree,\n key,\n }: {\n select: Ref<InstanceType<typeof ElSelect> | undefined>\n tree: Ref<InstanceType<typeof ElTree> | undefined>\n key: Ref<string>\n }\n) => {\n watch(\n () => props.modelValue,\n () => {\n if (props.showCheckbox) {\n nextTick(() => {\n const treeInstance = tree.value\n if (\n treeInstance &&\n !isEqual(\n treeInstance.getCheckedKeys(),\n toValidArray(props.modelValue)\n )\n ) {\n treeInstance.setCheckedKeys(toValidArray(props.modelValue))\n }\n })\n }\n },\n {\n immediate: true,\n deep: true,\n }\n )\n\n const propsMap = computed(() => ({\n value: key.value,\n label: 'label',\n children: 'children',\n disabled: 'disabled',\n isLeaf: 'isLeaf',\n ...props.props,\n }))\n\n const getNodeValByProp = (\n prop: 'value' | 'label' | 'children' | 'disabled' | 'isLeaf',\n data: TreeNodeData\n ) => {\n const propVal = propsMap.value[prop]\n if (isFunction(propVal)) {\n return propVal(\n data,\n tree.value?.getNode(getNodeValByProp('value', data)) as Node\n )\n } else {\n return data[propVal as string]\n }\n }\n\n const defaultExpandedParentKeys = toValidArray(props.modelValue)\n .map((value) => {\n return treeFind(\n props.data || [],\n (data) => getNodeValByProp('value', data) === value,\n (data) => getNodeValByProp('children', data),\n (data, index, array, parent) =>\n parent && getNodeValByProp('value', parent)\n )\n })\n .filter((item) => isValidValue(item))\n\n const cacheOptions = computed(() => {\n if (!props.renderAfterExpand && !props.lazy) return []\n\n const options: CacheOption[] = []\n\n treeEach(\n props.data.concat(props.cacheData),\n (node) => {\n const value = getNodeValByProp('value', node)\n options.push({\n value,\n currentLabel: getNodeValByProp('label', node),\n isDisabled: getNodeValByProp('disabled', node),\n })\n },\n (data) => getNodeValByProp('children', data)\n )\n\n return options\n })\n\n const cacheOptionsMap = computed(() => {\n return cacheOptions.value.reduce(\n (prev, next) => ({ ...prev, [next.value]: next }),\n {}\n )\n })\n\n return {\n ...pick(toRefs(props), Object.keys(ElTree.props)),\n ...attrs,\n nodeKey: key,\n\n // only expand on click node when the `check-strictly` is false\n expandOnClickNode: computed(() => {\n return !props.checkStrictly && props.expandOnClickNode\n }),\n\n // show current selected node only first time,\n // fix the problem of expanding multiple nodes when checking multiple nodes\n defaultExpandedKeys: computed(() => {\n return props.defaultExpandedKeys\n ? props.defaultExpandedKeys.concat(defaultExpandedParentKeys)\n : defaultExpandedParentKeys\n }),\n\n renderContent: (h, { node, data, store }) => {\n return h(\n TreeSelectOption,\n {\n value: getNodeValByProp('value', data),\n label: getNodeValByProp('label', data),\n disabled: getNodeValByProp('disabled', data),\n },\n props.renderContent\n ? () => props.renderContent(h, { node, data, store })\n : slots.default\n ? () => slots.default({ node, data, store })\n : undefined\n )\n },\n filterNodeMethod: (value, data, node) => {\n if (props.filterNodeMethod)\n return props.filterNodeMethod(value, data, node)\n if (!value) return true\n const regexp = new RegExp(escapeStringRegexp(value), 'i')\n return regexp.test(getNodeValByProp('label', data) || '')\n },\n onNodeClick: (data, node, e) => {\n attrs.onNodeClick?.(data, node, e)\n\n // `onCheck` is trigger when `checkOnClickNode`\n if (props.showCheckbox && props.checkOnClickNode) return\n\n // now `checkOnClickNode` is false, only no checkbox and `checkStrictly` or `isLeaf`\n if (!props.showCheckbox && (props.checkStrictly || node.isLeaf)) {\n if (!getNodeValByProp('disabled', data)) {\n const option = select.value?.states.options.get(\n getNodeValByProp('value', data)\n )\n select.value?.handleOptionSelect(option)\n }\n } else if (props.expandOnClickNode) {\n e.proxy.handleExpandIconClick()\n }\n select.value?.focus()\n },\n onCheck: (data, params) => {\n // ignore when no checkbox, like only `checkOnClickNode` is true\n if (!props.showCheckbox) return\n\n const dataValue = getNodeValByProp('value', data)\n\n // fix: checkedKeys has not cached keys\n const uncachedCheckedKeys = params.checkedKeys\n const cachedKeys = props.multiple\n ? toValidArray(props.modelValue).filter(\n (item) =>\n item in cacheOptionsMap.value &&\n !tree.value.getNode(item) &&\n !uncachedCheckedKeys.includes(item)\n )\n : []\n const checkedKeys = uncachedCheckedKeys.concat(cachedKeys)\n\n if (props.checkStrictly) {\n emit(\n UPDATE_MODEL_EVENT,\n // Checking for changes may come from `check-on-node-click`\n props.multiple\n ? checkedKeys\n : checkedKeys.includes(dataValue)\n ? dataValue\n : undefined\n )\n }\n // only can select leaf node\n else {\n if (props.multiple) {\n emit(\n UPDATE_MODEL_EVENT,\n (tree.value as InstanceType<typeof ElTree>).getCheckedKeys(true)\n )\n } else {\n // select first leaf node when check parent\n const firstLeaf = treeFind(\n [data],\n (data) =>\n !isValidArray(getNodeValByProp('children', data)) &&\n !getNodeValByProp('disabled', data),\n (data) => getNodeValByProp('children', data)\n )\n const firstLeafKey = firstLeaf\n ? getNodeValByProp('value', firstLeaf)\n : undefined\n\n // unselect when any child checked\n const hasCheckedChild =\n isValidValue(props.modelValue) &&\n !!treeFind(\n [data],\n (data) => getNodeValByProp('value', data) === props.modelValue,\n (data) => getNodeValByProp('children', data)\n )\n\n emit(\n UPDATE_MODEL_EVENT,\n firstLeafKey === props.modelValue || hasCheckedChild\n ? undefined\n : firstLeafKey\n )\n }\n }\n\n nextTick(() => {\n const checkedKeys = toValidArray(props.modelValue)\n tree.value.setCheckedKeys(checkedKeys)\n\n attrs.onCheck?.(data, {\n checkedKeys: tree.value.getCheckedKeys(),\n checkedNodes: tree.value.getCheckedNodes(),\n halfCheckedKeys: tree.value.getHalfCheckedKeys(),\n halfCheckedNodes: tree.value.getHalfCheckedNodes(),\n })\n })\n\n select.value?.focus()\n },\n\n // else\n cacheOptions,\n }\n}\n"],"names":["ElTree","TreeSelectOption"],"mappings":";;;;;;;;;;;AAaY,MAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;AACvD,EAAE,MAAM;AACR,EAAE,IAAI;AACN,EAAE,GAAG;AACL,CAAC,KAAK;AACN,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,UAAU,EAAE,MAAM;AACtC,IAAI,IAAI,KAAK,CAAC,YAAY,EAAE;AAC5B,MAAM,QAAQ,CAAC,MAAM;AACrB,QAAQ,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC;AACxC,QAAQ,IAAI,YAAY,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE,YAAY,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE;AACrG,UAAU,YAAY,CAAC,cAAc,CAAC,YAAY,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AACtE,SAAS;AACT,OAAO,CAAC,CAAC;AACT,KAAK;AACL,GAAG,EAAE;AAC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AI,CAAC,KAAK,CAAC,kBAAkB,EAAE;AAC1D,UAAU,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE;AAC5D,SAAS,CAAC,CAAC;AACX,OAAO,CAAC,CAAC;AACT,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;AACxD,KAAK;AACL,IAAI,YAAY;AAChB,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"tree.mjs","sources":["../../../../../../packages/components/tree-select/src/tree.ts"],"sourcesContent":["// @ts-nocheck\nimport { computed, nextTick, toRefs, watch } from 'vue'\nimport { isEqual, pick } from 'lodash-unified'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { escapeStringRegexp, isFunction } from '@element-plus/utils'\nimport ElTree from '@element-plus/components/tree'\nimport TreeSelectOption from './tree-select-option'\nimport {\n isValidArray,\n isValidValue,\n toValidArray,\n treeEach,\n treeFind,\n} from './utils'\nimport type { CacheOption } from './cache-options'\nimport type { Ref } from 'vue'\nimport type ElSelect from '@element-plus/components/select'\nimport type Node from '@element-plus/components/tree/src/model/node'\nimport type { TreeNodeData } from '@element-plus/components/tree/src/tree.type'\n\nexport const useTree = (\n props,\n { attrs, slots, emit },\n {\n select,\n tree,\n key,\n }: {\n select: Ref<InstanceType<typeof ElSelect> | undefined>\n tree: Ref<InstanceType<typeof ElTree> | undefined>\n key: Ref<string>\n }\n) => {\n watch(\n () => props.modelValue,\n () => {\n if (props.showCheckbox) {\n nextTick(() => {\n const treeInstance = tree.value\n if (\n treeInstance &&\n !isEqual(\n treeInstance.getCheckedKeys(),\n toValidArray(props.modelValue)\n )\n ) {\n treeInstance.setCheckedKeys(toValidArray(props.modelValue))\n }\n })\n }\n },\n {\n immediate: true,\n deep: true,\n }\n )\n\n const propsMap = computed(() => ({\n value: key.value,\n label: 'label',\n children: 'children',\n disabled: 'disabled',\n isLeaf: 'isLeaf',\n ...props.props,\n }))\n\n const getNodeValByProp = (\n prop: 'value' | 'label' | 'children' | 'disabled' | 'isLeaf',\n data: TreeNodeData\n ) => {\n const propVal = propsMap.value[prop]\n if (isFunction(propVal)) {\n return propVal(\n data,\n tree.value?.getNode(getNodeValByProp('value', data)) as Node\n )\n } else {\n return data[propVal as string]\n }\n }\n\n const defaultExpandedParentKeys = toValidArray(props.modelValue)\n .map((value) => {\n return treeFind(\n props.data || [],\n (data) => getNodeValByProp('value', data) === value,\n (data) => getNodeValByProp('children', data),\n (data, index, array, parent) =>\n parent && getNodeValByProp('value', parent)\n )\n })\n .filter((item) => isValidValue(item))\n\n const cacheOptions = computed(() => {\n if (!props.renderAfterExpand && !props.lazy) return []\n\n const options: CacheOption[] = []\n\n treeEach(\n props.data.concat(props.cacheData),\n (node) => {\n const value = getNodeValByProp('value', node)\n options.push({\n value,\n currentLabel: getNodeValByProp('label', node),\n isDisabled: getNodeValByProp('disabled', node),\n })\n },\n (data) => getNodeValByProp('children', data)\n )\n\n return options\n })\n\n return {\n ...pick(toRefs(props), Object.keys(ElTree.props)),\n ...attrs,\n nodeKey: key,\n\n // only expand on click node when the `check-strictly` is false\n expandOnClickNode: computed(() => {\n return !props.checkStrictly && props.expandOnClickNode\n }),\n\n // show current selected node only first time,\n // fix the problem of expanding multiple nodes when checking multiple nodes\n defaultExpandedKeys: computed(() => {\n return props.defaultExpandedKeys\n ? props.defaultExpandedKeys.concat(defaultExpandedParentKeys)\n : defaultExpandedParentKeys\n }),\n\n renderContent: (h, { node, data, store }) => {\n return h(\n TreeSelectOption,\n {\n value: getNodeValByProp('value', data),\n label: getNodeValByProp('label', data),\n disabled: getNodeValByProp('disabled', data),\n },\n props.renderContent\n ? () => props.renderContent(h, { node, data, store })\n : slots.default\n ? () => slots.default({ node, data, store })\n : undefined\n )\n },\n filterNodeMethod: (value, data, node) => {\n if (props.filterNodeMethod)\n return props.filterNodeMethod(value, data, node)\n if (!value) return true\n const regexp = new RegExp(escapeStringRegexp(value), 'i')\n return regexp.test(getNodeValByProp('label', data) || '')\n },\n onNodeClick: (data, node, e) => {\n attrs.onNodeClick?.(data, node, e)\n\n // `onCheck` is trigger when `checkOnClickNode`\n if (props.showCheckbox && props.checkOnClickNode) return\n\n // now `checkOnClickNode` is false, only no checkbox and `checkStrictly` or `isLeaf`\n if (!props.showCheckbox && (props.checkStrictly || node.isLeaf)) {\n if (!getNodeValByProp('disabled', data)) {\n const option = select.value?.states.options.get(\n getNodeValByProp('value', data)\n )\n select.value?.handleOptionSelect(option)\n }\n } else if (props.expandOnClickNode) {\n e.proxy.handleExpandIconClick()\n }\n select.value?.focus()\n },\n onCheck: (data, params) => {\n // ignore when no checkbox, like only `checkOnClickNode` is true\n if (!props.showCheckbox) return\n\n const dataValue = getNodeValByProp('value', data)\n const dataMap = {}\n treeEach(\n [tree.value.store.root],\n (node) => (dataMap[node.key] = node),\n (node) => node.childNodes\n )\n\n // fix: checkedKeys has not cached keys\n const uncachedCheckedKeys = params.checkedKeys\n const cachedKeys = props.multiple\n ? toValidArray(props.modelValue).filter(\n (item) => !(item in dataMap) && !uncachedCheckedKeys.includes(item)\n )\n : []\n const checkedKeys = cachedKeys.concat(uncachedCheckedKeys)\n\n if (props.checkStrictly) {\n emit(\n UPDATE_MODEL_EVENT,\n // Checking for changes may come from `check-on-node-click`\n props.multiple\n ? checkedKeys\n : checkedKeys.includes(dataValue)\n ? dataValue\n : undefined\n )\n }\n // only can select leaf node\n else {\n if (props.multiple) {\n emit(\n UPDATE_MODEL_EVENT,\n cachedKeys.concat(\n (tree.value as InstanceType<typeof ElTree>).getCheckedKeys(true)\n )\n )\n } else {\n // select first leaf node when check parent\n const firstLeaf = treeFind(\n [data],\n (data) =>\n !isValidArray(getNodeValByProp('children', data)) &&\n !getNodeValByProp('disabled', data),\n (data) => getNodeValByProp('children', data)\n )\n const firstLeafKey = firstLeaf\n ? getNodeValByProp('value', firstLeaf)\n : undefined\n\n // unselect when any child checked\n const hasCheckedChild =\n isValidValue(props.modelValue) &&\n !!treeFind(\n [data],\n (data) => getNodeValByProp('value', data) === props.modelValue,\n (data) => getNodeValByProp('children', data)\n )\n\n emit(\n UPDATE_MODEL_EVENT,\n firstLeafKey === props.modelValue || hasCheckedChild\n ? undefined\n : firstLeafKey\n )\n }\n }\n\n nextTick(() => {\n const checkedKeys = toValidArray(props.modelValue)\n tree.value.setCheckedKeys(checkedKeys)\n\n attrs.onCheck?.(data, {\n checkedKeys: tree.value.getCheckedKeys(),\n checkedNodes: tree.value.getCheckedNodes(),\n halfCheckedKeys: tree.value.getHalfCheckedKeys(),\n halfCheckedNodes: tree.value.getHalfCheckedNodes(),\n })\n })\n\n select.value?.focus()\n },\n\n // else\n cacheOptions,\n }\n}\n"],"names":["ElTree","TreeSelectOption"],"mappings":";;;;;;;;;;;AAaY,MAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;AACvD,EAAE,MAAM;AACR,EAAE,IAAI;AACN,EAAE,GAAG;AACL,CAAC,KAAK;AACN,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,UAAU,EAAE,MAAM;AACtC,IAAI,IAAI,KAAK,CAAC,YAAY,EAAE;AAC5B,MAAM,QAAQ,CAAC,MAAM;AACrB,QAAQ,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC;AACxC,QAAQ,IAAI,YAAY,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE,YAAY,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE;AACrG,UAAU,YAAY,CAAC,cAAc,CAAC,YAAY,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AACtE,SAAS;AACT,OAAO,CAAC,CAAC;AACT,KAAK;AACL,GAAG,EAAE;AACL,IAAI,SAAS,EAAE,IAAI;AACnB,IAAI,IAAI,EAAE,IAAI;AACd,GAAG,CAAC,CAAC;AACL,EAA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AAC;AACX,OAAO,CAAC,CAAC;AACT,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;AACxD,KAAK;AACL,IAAI,YAAY;AAChB,GAAG,CAAC;AACJ;;;;"}
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Upload from './src/upload2.mjs';
3
- export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './src/upload.mjs';
2
+ import Upload from './src/upload.mjs';
3
+ export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './src/upload2.mjs';
4
4
  export { uploadContentProps } from './src/upload-content.mjs';
5
5
  export { uploadListEmits, uploadListProps } from './src/upload-list.mjs';
6
6
  export { uploadDraggerEmits, uploadDraggerProps } from './src/upload-dragger.mjs';
@@ -1,6 +1,6 @@
1
1
  import { NOOP } from '@vue/shared';
2
2
  import '../../../utils/index.mjs';
3
- import { uploadBaseProps } from './upload.mjs';
3
+ import { uploadBaseProps } from './upload2.mjs';
4
4
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
5
 
6
6
  const uploadContentProps = buildProps({
@@ -6,7 +6,7 @@ import '../../../utils/index.mjs';
6
6
  import '../../form/index.mjs';
7
7
  import UploadDragger from './upload-dragger2.mjs';
8
8
  import { uploadContentProps } from './upload-content.mjs';
9
- import { genFileId } from './upload.mjs';
9
+ import { genFileId } from './upload2.mjs';
10
10
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
11
11
  import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
12
12
  import { useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
@@ -1,6 +1,6 @@
1
1
  import { NOOP } from '@vue/shared';
2
2
  import '../../../utils/index.mjs';
3
- import { uploadListTypes } from './upload.mjs';
3
+ import { uploadListTypes } from './upload2.mjs';
4
4
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
5
  import { mutable } from '../../../utils/typescript.mjs';
6
6