@element-plus/nightly 0.0.20240810 → 0.0.20240812

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 (360) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.full.js +65 -34
  3. package/dist/index.full.min.js +15 -15
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +20 -20
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +65 -34
  8. package/dist/locale/af.js +1 -1
  9. package/dist/locale/af.min.js +1 -1
  10. package/dist/locale/af.min.mjs +1 -1
  11. package/dist/locale/af.mjs +1 -1
  12. package/dist/locale/ar-eg.js +1 -1
  13. package/dist/locale/ar-eg.min.js +1 -1
  14. package/dist/locale/ar-eg.min.mjs +1 -1
  15. package/dist/locale/ar-eg.mjs +1 -1
  16. package/dist/locale/ar.js +1 -1
  17. package/dist/locale/ar.min.js +1 -1
  18. package/dist/locale/ar.min.mjs +1 -1
  19. package/dist/locale/ar.mjs +1 -1
  20. package/dist/locale/az.js +1 -1
  21. package/dist/locale/az.min.js +1 -1
  22. package/dist/locale/az.min.mjs +1 -1
  23. package/dist/locale/az.mjs +1 -1
  24. package/dist/locale/bg.js +1 -1
  25. package/dist/locale/bg.min.js +1 -1
  26. package/dist/locale/bg.min.mjs +1 -1
  27. package/dist/locale/bg.mjs +1 -1
  28. package/dist/locale/bn.js +1 -1
  29. package/dist/locale/bn.min.js +1 -1
  30. package/dist/locale/bn.min.mjs +1 -1
  31. package/dist/locale/bn.mjs +1 -1
  32. package/dist/locale/ca.js +1 -1
  33. package/dist/locale/ca.min.js +1 -1
  34. package/dist/locale/ca.min.mjs +1 -1
  35. package/dist/locale/ca.mjs +1 -1
  36. package/dist/locale/ckb.js +1 -1
  37. package/dist/locale/ckb.min.js +1 -1
  38. package/dist/locale/ckb.min.mjs +1 -1
  39. package/dist/locale/ckb.mjs +1 -1
  40. package/dist/locale/cs.js +1 -1
  41. package/dist/locale/cs.min.js +1 -1
  42. package/dist/locale/cs.min.mjs +1 -1
  43. package/dist/locale/cs.mjs +1 -1
  44. package/dist/locale/da.js +1 -1
  45. package/dist/locale/da.min.js +1 -1
  46. package/dist/locale/da.min.mjs +1 -1
  47. package/dist/locale/da.mjs +1 -1
  48. package/dist/locale/de.js +1 -1
  49. package/dist/locale/de.min.js +1 -1
  50. package/dist/locale/de.min.mjs +1 -1
  51. package/dist/locale/de.mjs +1 -1
  52. package/dist/locale/el.js +1 -1
  53. package/dist/locale/el.min.js +1 -1
  54. package/dist/locale/el.min.mjs +1 -1
  55. package/dist/locale/el.mjs +1 -1
  56. package/dist/locale/en.js +1 -1
  57. package/dist/locale/en.min.js +1 -1
  58. package/dist/locale/en.min.mjs +1 -1
  59. package/dist/locale/en.mjs +1 -1
  60. package/dist/locale/eo.js +1 -1
  61. package/dist/locale/eo.min.js +1 -1
  62. package/dist/locale/eo.min.mjs +1 -1
  63. package/dist/locale/eo.mjs +1 -1
  64. package/dist/locale/es.js +1 -1
  65. package/dist/locale/es.min.js +1 -1
  66. package/dist/locale/es.min.mjs +1 -1
  67. package/dist/locale/es.mjs +1 -1
  68. package/dist/locale/et.js +1 -1
  69. package/dist/locale/et.min.js +1 -1
  70. package/dist/locale/et.min.mjs +1 -1
  71. package/dist/locale/et.mjs +1 -1
  72. package/dist/locale/eu.js +1 -1
  73. package/dist/locale/eu.min.js +1 -1
  74. package/dist/locale/eu.min.mjs +1 -1
  75. package/dist/locale/eu.mjs +1 -1
  76. package/dist/locale/fa.js +1 -1
  77. package/dist/locale/fa.min.js +1 -1
  78. package/dist/locale/fa.min.mjs +1 -1
  79. package/dist/locale/fa.mjs +1 -1
  80. package/dist/locale/fi.js +1 -1
  81. package/dist/locale/fi.min.js +1 -1
  82. package/dist/locale/fi.min.mjs +1 -1
  83. package/dist/locale/fi.mjs +1 -1
  84. package/dist/locale/fr.js +1 -1
  85. package/dist/locale/fr.min.js +1 -1
  86. package/dist/locale/fr.min.mjs +1 -1
  87. package/dist/locale/fr.mjs +1 -1
  88. package/dist/locale/he.js +1 -1
  89. package/dist/locale/he.min.js +1 -1
  90. package/dist/locale/he.min.mjs +1 -1
  91. package/dist/locale/he.mjs +1 -1
  92. package/dist/locale/hr.js +1 -1
  93. package/dist/locale/hr.min.js +1 -1
  94. package/dist/locale/hr.min.mjs +1 -1
  95. package/dist/locale/hr.mjs +1 -1
  96. package/dist/locale/hu.js +1 -1
  97. package/dist/locale/hu.min.js +1 -1
  98. package/dist/locale/hu.min.mjs +1 -1
  99. package/dist/locale/hu.mjs +1 -1
  100. package/dist/locale/hy-am.js +1 -1
  101. package/dist/locale/hy-am.min.js +1 -1
  102. package/dist/locale/hy-am.min.mjs +1 -1
  103. package/dist/locale/hy-am.mjs +1 -1
  104. package/dist/locale/id.js +1 -1
  105. package/dist/locale/id.min.js +1 -1
  106. package/dist/locale/id.min.mjs +1 -1
  107. package/dist/locale/id.mjs +1 -1
  108. package/dist/locale/it.js +1 -1
  109. package/dist/locale/it.min.js +1 -1
  110. package/dist/locale/it.min.mjs +1 -1
  111. package/dist/locale/it.mjs +1 -1
  112. package/dist/locale/ja.js +1 -1
  113. package/dist/locale/ja.min.js +1 -1
  114. package/dist/locale/ja.min.mjs +1 -1
  115. package/dist/locale/ja.mjs +1 -1
  116. package/dist/locale/kk.js +1 -1
  117. package/dist/locale/kk.min.js +1 -1
  118. package/dist/locale/kk.min.mjs +1 -1
  119. package/dist/locale/kk.mjs +1 -1
  120. package/dist/locale/km.js +1 -1
  121. package/dist/locale/km.min.js +1 -1
  122. package/dist/locale/km.min.mjs +1 -1
  123. package/dist/locale/km.mjs +1 -1
  124. package/dist/locale/ko.js +1 -1
  125. package/dist/locale/ko.min.js +1 -1
  126. package/dist/locale/ko.min.mjs +1 -1
  127. package/dist/locale/ko.mjs +1 -1
  128. package/dist/locale/ku.js +1 -1
  129. package/dist/locale/ku.min.js +1 -1
  130. package/dist/locale/ku.min.mjs +1 -1
  131. package/dist/locale/ku.mjs +1 -1
  132. package/dist/locale/ky.js +1 -1
  133. package/dist/locale/ky.min.js +1 -1
  134. package/dist/locale/ky.min.mjs +1 -1
  135. package/dist/locale/ky.mjs +1 -1
  136. package/dist/locale/lt.js +1 -1
  137. package/dist/locale/lt.min.js +1 -1
  138. package/dist/locale/lt.min.mjs +1 -1
  139. package/dist/locale/lt.mjs +1 -1
  140. package/dist/locale/lv.js +1 -1
  141. package/dist/locale/lv.min.js +1 -1
  142. package/dist/locale/lv.min.mjs +1 -1
  143. package/dist/locale/lv.mjs +1 -1
  144. package/dist/locale/mg.js +1 -1
  145. package/dist/locale/mg.min.js +1 -1
  146. package/dist/locale/mg.min.mjs +1 -1
  147. package/dist/locale/mg.mjs +1 -1
  148. package/dist/locale/mn.js +1 -1
  149. package/dist/locale/mn.min.js +1 -1
  150. package/dist/locale/mn.min.mjs +1 -1
  151. package/dist/locale/mn.mjs +1 -1
  152. package/dist/locale/nb-no.js +1 -1
  153. package/dist/locale/nb-no.min.js +1 -1
  154. package/dist/locale/nb-no.min.mjs +1 -1
  155. package/dist/locale/nb-no.mjs +1 -1
  156. package/dist/locale/nl.js +1 -1
  157. package/dist/locale/nl.min.js +1 -1
  158. package/dist/locale/nl.min.mjs +1 -1
  159. package/dist/locale/nl.mjs +1 -1
  160. package/dist/locale/pa.js +1 -1
  161. package/dist/locale/pa.min.js +1 -1
  162. package/dist/locale/pa.min.mjs +1 -1
  163. package/dist/locale/pa.mjs +1 -1
  164. package/dist/locale/pl.js +1 -1
  165. package/dist/locale/pl.min.js +1 -1
  166. package/dist/locale/pl.min.mjs +1 -1
  167. package/dist/locale/pl.mjs +1 -1
  168. package/dist/locale/pt-br.js +1 -1
  169. package/dist/locale/pt-br.min.js +1 -1
  170. package/dist/locale/pt-br.min.mjs +1 -1
  171. package/dist/locale/pt-br.mjs +1 -1
  172. package/dist/locale/pt.js +1 -1
  173. package/dist/locale/pt.min.js +1 -1
  174. package/dist/locale/pt.min.mjs +1 -1
  175. package/dist/locale/pt.mjs +1 -1
  176. package/dist/locale/ro.js +1 -1
  177. package/dist/locale/ro.min.js +1 -1
  178. package/dist/locale/ro.min.mjs +1 -1
  179. package/dist/locale/ro.mjs +1 -1
  180. package/dist/locale/ru.js +1 -1
  181. package/dist/locale/ru.min.js +1 -1
  182. package/dist/locale/ru.min.mjs +1 -1
  183. package/dist/locale/ru.mjs +1 -1
  184. package/dist/locale/sk.js +1 -1
  185. package/dist/locale/sk.min.js +1 -1
  186. package/dist/locale/sk.min.mjs +1 -1
  187. package/dist/locale/sk.mjs +1 -1
  188. package/dist/locale/sl.js +1 -1
  189. package/dist/locale/sl.min.js +1 -1
  190. package/dist/locale/sl.min.mjs +1 -1
  191. package/dist/locale/sl.mjs +1 -1
  192. package/dist/locale/sr.js +1 -1
  193. package/dist/locale/sr.min.js +1 -1
  194. package/dist/locale/sr.min.mjs +1 -1
  195. package/dist/locale/sr.mjs +1 -1
  196. package/dist/locale/sv.js +1 -1
  197. package/dist/locale/sv.min.js +1 -1
  198. package/dist/locale/sv.min.mjs +1 -1
  199. package/dist/locale/sv.mjs +1 -1
  200. package/dist/locale/sw.js +1 -1
  201. package/dist/locale/sw.min.js +1 -1
  202. package/dist/locale/sw.min.mjs +1 -1
  203. package/dist/locale/sw.mjs +1 -1
  204. package/dist/locale/ta.js +1 -1
  205. package/dist/locale/ta.min.js +1 -1
  206. package/dist/locale/ta.min.mjs +1 -1
  207. package/dist/locale/ta.mjs +1 -1
  208. package/dist/locale/th.js +1 -1
  209. package/dist/locale/th.min.js +1 -1
  210. package/dist/locale/th.min.mjs +1 -1
  211. package/dist/locale/th.mjs +1 -1
  212. package/dist/locale/tk.js +1 -1
  213. package/dist/locale/tk.min.js +1 -1
  214. package/dist/locale/tk.min.mjs +1 -1
  215. package/dist/locale/tk.mjs +1 -1
  216. package/dist/locale/tr.js +1 -1
  217. package/dist/locale/tr.min.js +1 -1
  218. package/dist/locale/tr.min.mjs +1 -1
  219. package/dist/locale/tr.mjs +1 -1
  220. package/dist/locale/ug-cn.js +1 -1
  221. package/dist/locale/ug-cn.min.js +1 -1
  222. package/dist/locale/ug-cn.min.mjs +1 -1
  223. package/dist/locale/ug-cn.mjs +1 -1
  224. package/dist/locale/uk.js +1 -1
  225. package/dist/locale/uk.min.js +1 -1
  226. package/dist/locale/uk.min.mjs +1 -1
  227. package/dist/locale/uk.mjs +1 -1
  228. package/dist/locale/uz-uz.js +1 -1
  229. package/dist/locale/uz-uz.min.js +1 -1
  230. package/dist/locale/uz-uz.min.mjs +1 -1
  231. package/dist/locale/uz-uz.mjs +1 -1
  232. package/dist/locale/vi.js +1 -1
  233. package/dist/locale/vi.min.js +1 -1
  234. package/dist/locale/vi.min.mjs +1 -1
  235. package/dist/locale/vi.mjs +1 -1
  236. package/dist/locale/zh-cn.js +1 -1
  237. package/dist/locale/zh-cn.min.js +1 -1
  238. package/dist/locale/zh-cn.min.mjs +1 -1
  239. package/dist/locale/zh-cn.mjs +1 -1
  240. package/dist/locale/zh-tw.js +1 -1
  241. package/dist/locale/zh-tw.min.js +1 -1
  242. package/dist/locale/zh-tw.min.mjs +1 -1
  243. package/dist/locale/zh-tw.mjs +1 -1
  244. package/es/components/autocomplete/index.mjs +2 -2
  245. package/es/components/autocomplete/src/autocomplete.mjs +81 -364
  246. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  247. package/es/components/autocomplete/src/autocomplete2.mjs +364 -81
  248. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  249. package/es/components/breadcrumb/index.mjs +2 -2
  250. package/es/components/breadcrumb/src/breadcrumb-item.mjs +9 -57
  251. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  252. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +57 -9
  253. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  254. package/es/components/calendar/index.mjs +2 -2
  255. package/es/components/calendar/src/calendar.mjs +18 -131
  256. package/es/components/calendar/src/calendar.mjs.map +1 -1
  257. package/es/components/calendar/src/calendar2.mjs +131 -18
  258. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  259. package/es/components/cascader/src/cascader.d.ts +3 -0
  260. package/es/components/cascader/src/cascader.mjs +10 -0
  261. package/es/components/cascader/src/cascader.mjs.map +1 -1
  262. package/es/components/cascader/src/cascader.vue.d.ts +6 -0
  263. package/es/components/cascader/src/cascader2.mjs +3 -10
  264. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  265. package/es/components/collapse/index.mjs +4 -4
  266. package/es/components/collapse/src/collapse-item.mjs +13 -89
  267. package/es/components/collapse/src/collapse-item.mjs.map +1 -1
  268. package/es/components/collapse/src/collapse-item2.mjs +89 -13
  269. package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
  270. package/es/components/collapse/src/collapse.mjs +18 -28
  271. package/es/components/collapse/src/collapse.mjs.map +1 -1
  272. package/es/components/collapse/src/collapse2.mjs +28 -18
  273. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  274. package/es/components/date-picker/src/date-picker-com/basic-date-table.vue.d.ts +2 -2
  275. package/es/components/date-picker/src/date-picker-com/basic-month-table.mjs +3 -9
  276. package/es/components/date-picker/src/date-picker-com/basic-month-table.mjs.map +1 -1
  277. package/es/components/date-picker/src/date-picker-com/basic-month-table.vue.d.ts +2 -2
  278. package/es/components/date-picker/src/date-picker-com/basic-year-table.mjs +3 -1
  279. package/es/components/date-picker/src/date-picker-com/basic-year-table.mjs.map +1 -1
  280. package/es/components/date-picker/src/date-picker-com/basic-year-table.vue.d.ts +2 -2
  281. package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs +7 -4
  282. package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs.map +1 -1
  283. package/es/components/date-picker/src/props/basic-date-table.d.ts +1 -1
  284. package/es/components/date-picker/src/props/basic-month-table.d.ts +1 -1
  285. package/es/components/date-picker/src/props/basic-year-table.d.ts +1 -1
  286. package/es/components/date-picker/src/props/shared.d.ts +2 -1
  287. package/es/components/date-picker/src/props/shared.mjs.map +1 -1
  288. package/es/components/date-picker/src/utils.d.ts +4 -0
  289. package/es/components/date-picker/src/utils.mjs +34 -1
  290. package/es/components/date-picker/src/utils.mjs.map +1 -1
  291. package/es/components/index.mjs +6 -6
  292. package/es/components/steps/index.mjs +2 -2
  293. package/es/components/steps/src/item.mjs +19 -191
  294. package/es/components/steps/src/item.mjs.map +1 -1
  295. package/es/components/steps/src/item2.mjs +191 -19
  296. package/es/components/steps/src/item2.mjs.map +1 -1
  297. package/es/index.mjs +6 -6
  298. package/es/version.d.ts +1 -1
  299. package/es/version.mjs +1 -1
  300. package/es/version.mjs.map +1 -1
  301. package/lib/components/autocomplete/index.js +2 -2
  302. package/lib/components/autocomplete/src/autocomplete.js +81 -363
  303. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  304. package/lib/components/autocomplete/src/autocomplete2.js +363 -81
  305. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  306. package/lib/components/breadcrumb/index.js +2 -2
  307. package/lib/components/breadcrumb/src/breadcrumb-item.js +9 -57
  308. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  309. package/lib/components/breadcrumb/src/breadcrumb-item2.js +57 -9
  310. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  311. package/lib/components/calendar/index.js +2 -2
  312. package/lib/components/calendar/src/calendar.js +19 -131
  313. package/lib/components/calendar/src/calendar.js.map +1 -1
  314. package/lib/components/calendar/src/calendar2.js +131 -19
  315. package/lib/components/calendar/src/calendar2.js.map +1 -1
  316. package/lib/components/cascader/src/cascader.d.ts +3 -0
  317. package/lib/components/cascader/src/cascader.js +10 -0
  318. package/lib/components/cascader/src/cascader.js.map +1 -1
  319. package/lib/components/cascader/src/cascader.vue.d.ts +6 -0
  320. package/lib/components/cascader/src/cascader2.js +3 -10
  321. package/lib/components/cascader/src/cascader2.js.map +1 -1
  322. package/lib/components/collapse/index.js +4 -4
  323. package/lib/components/collapse/src/collapse-item.js +13 -89
  324. package/lib/components/collapse/src/collapse-item.js.map +1 -1
  325. package/lib/components/collapse/src/collapse-item2.js +89 -13
  326. package/lib/components/collapse/src/collapse-item2.js.map +1 -1
  327. package/lib/components/collapse/src/collapse.js +20 -28
  328. package/lib/components/collapse/src/collapse.js.map +1 -1
  329. package/lib/components/collapse/src/collapse2.js +28 -20
  330. package/lib/components/collapse/src/collapse2.js.map +1 -1
  331. package/lib/components/date-picker/src/date-picker-com/basic-date-table.vue.d.ts +2 -2
  332. package/lib/components/date-picker/src/date-picker-com/basic-month-table.js +4 -10
  333. package/lib/components/date-picker/src/date-picker-com/basic-month-table.js.map +1 -1
  334. package/lib/components/date-picker/src/date-picker-com/basic-month-table.vue.d.ts +2 -2
  335. package/lib/components/date-picker/src/date-picker-com/basic-year-table.js +3 -1
  336. package/lib/components/date-picker/src/date-picker-com/basic-year-table.js.map +1 -1
  337. package/lib/components/date-picker/src/date-picker-com/basic-year-table.vue.d.ts +2 -2
  338. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js +10 -7
  339. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js.map +1 -1
  340. package/lib/components/date-picker/src/props/basic-date-table.d.ts +1 -1
  341. package/lib/components/date-picker/src/props/basic-month-table.d.ts +1 -1
  342. package/lib/components/date-picker/src/props/basic-year-table.d.ts +1 -1
  343. package/lib/components/date-picker/src/props/shared.d.ts +2 -1
  344. package/lib/components/date-picker/src/props/shared.js.map +1 -1
  345. package/lib/components/date-picker/src/utils.d.ts +4 -0
  346. package/lib/components/date-picker/src/utils.js +36 -0
  347. package/lib/components/date-picker/src/utils.js.map +1 -1
  348. package/lib/components/index.js +6 -6
  349. package/lib/components/steps/index.js +2 -2
  350. package/lib/components/steps/src/item.js +19 -191
  351. package/lib/components/steps/src/item.js.map +1 -1
  352. package/lib/components/steps/src/item2.js +191 -19
  353. package/lib/components/steps/src/item2.js.map +1 -1
  354. package/lib/index.js +6 -6
  355. package/lib/version.d.ts +1 -1
  356. package/lib/version.js +1 -1
  357. package/lib/version.js.map +1 -1
  358. package/package.json +2 -2
  359. package/tags.json +1 -1
  360. package/web-types.json +1 -1
@@ -1,61 +1,13 @@
1
- import { defineComponent, getCurrentInstance, inject, ref, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createBlock, withCtx, resolveDynamicComponent, toDisplayString } from 'vue';
2
- import { ElIcon } from '../../icon/index.mjs';
3
- import '../../../hooks/index.mjs';
4
- import { breadcrumbKey } from './constants.mjs';
5
- import { breadcrumbItemProps } from './breadcrumb-item2.mjs';
6
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
7
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
8
3
 
9
- const __default__ = defineComponent({
10
- name: "ElBreadcrumbItem"
4
+ const breadcrumbItemProps = buildProps({
5
+ to: {
6
+ type: definePropType([String, Object]),
7
+ default: ""
8
+ },
9
+ replace: Boolean
11
10
  });
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- ...__default__,
14
- props: breadcrumbItemProps,
15
- setup(__props) {
16
- const props = __props;
17
- const instance = getCurrentInstance();
18
- const breadcrumbContext = inject(breadcrumbKey, void 0);
19
- const ns = useNamespace("breadcrumb");
20
- const router = instance.appContext.config.globalProperties.$router;
21
- const link = ref();
22
- const onClick = () => {
23
- if (!props.to || !router)
24
- return;
25
- props.replace ? router.replace(props.to) : router.push(props.to);
26
- };
27
- return (_ctx, _cache) => {
28
- var _a, _b;
29
- return openBlock(), createElementBlock("span", {
30
- class: normalizeClass(unref(ns).e("item"))
31
- }, [
32
- createElementVNode("span", {
33
- ref_key: "link",
34
- ref: link,
35
- class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!_ctx.to)]),
36
- role: "link",
37
- onClick
38
- }, [
39
- renderSlot(_ctx.$slots, "default")
40
- ], 2),
41
- ((_a = unref(breadcrumbContext)) == null ? void 0 : _a.separatorIcon) ? (openBlock(), createBlock(unref(ElIcon), {
42
- key: 0,
43
- class: normalizeClass(unref(ns).e("separator"))
44
- }, {
45
- default: withCtx(() => [
46
- (openBlock(), createBlock(resolveDynamicComponent(unref(breadcrumbContext).separatorIcon)))
47
- ]),
48
- _: 1
49
- }, 8, ["class"])) : (openBlock(), createElementBlock("span", {
50
- key: 1,
51
- class: normalizeClass(unref(ns).e("separator")),
52
- role: "presentation"
53
- }, toDisplayString((_b = unref(breadcrumbContext)) == null ? void 0 : _b.separator), 3))
54
- ], 2);
55
- };
56
- }
57
- });
58
- var BreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "breadcrumb-item.vue"]]);
59
11
 
60
- export { BreadcrumbItem as default };
12
+ export { breadcrumbItemProps };
61
13
  //# sourceMappingURL=breadcrumb-item.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb-item.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('item')\">\n <span\n ref=\"link\"\n :class=\"[ns.e('inner'), ns.is('link', !!to)]\"\n role=\"link\"\n @click=\"onClick\"\n >\n <slot />\n </span>\n <el-icon v-if=\"breadcrumbContext?.separatorIcon\" :class=\"ns.e('separator')\">\n <component :is=\"breadcrumbContext.separatorIcon\" />\n </el-icon>\n <span v-else :class=\"ns.e('separator')\" role=\"presentation\">\n {{ breadcrumbContext?.separator }}\n </span>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { getCurrentInstance, inject, ref } from 'vue'\nimport ElIcon from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { breadcrumbKey } from './constants'\nimport { breadcrumbItemProps } from './breadcrumb-item'\n\nimport type { Router } from 'vue-router'\n\ndefineOptions({\n name: 'ElBreadcrumbItem',\n})\n\nconst props = defineProps(breadcrumbItemProps)\n\nconst instance = getCurrentInstance()!\nconst breadcrumbContext = inject(breadcrumbKey, undefined)\nconst ns = useNamespace('breadcrumb')\n\nconst router = instance.appContext.config.globalProperties.$router as Router\n\nconst link = ref<HTMLSpanElement>()\n\nconst onClick = () => {\n if (!props.to || !router) return\n props.replace ? router.replace(props.to) : router.push(props.to)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;mCA4Bc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAM,MAAA,iBAAA,GAAoB,MAAO,CAAA,aAAA,EAAe,KAAS,CAAA,CAAA,CAAA;AACzD,IAAM,MAAA,EAAA,GAAK,aAAa,YAAY,CAAA,CAAA;AAEpC,IAAA,MAAM,MAAS,GAAA,QAAA,CAAS,UAAW,CAAA,MAAA,CAAO,gBAAiB,CAAA,OAAA,CAAA;AAE3D,IAAA,MAAM,OAAO,GAAqB,EAAA,CAAA;AAElC,IAAA,MAAM,UAAU,MAAM;AACpB,MAAI,IAAA,CAAC,KAAM,CAAA,EAAA,IAAM,CAAC,MAAA;AAAQ,QAAA,OAAA;AAC1B,MAAM,KAAA,CAAA,OAAA,GAAU,OAAO,OAAQ,CAAA,KAAA,CAAM,EAAE,CAAI,GAAA,MAAA,CAAO,IAAK,CAAA,KAAA,CAAM,EAAE,CAAA,CAAA;AAAA,KACjE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"breadcrumb-item.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\n\nexport const breadcrumbItemProps = buildProps({\n /**\n * @description target route of the link, same as `to` of `vue-router`\n */\n to: {\n type: definePropType<RouteLocationRaw>([String, Object]),\n default: '',\n },\n /**\n * @description if `true`, the navigation will not leave a history record\n */\n replace: Boolean,\n} as const)\nexport type BreadcrumbItemProps = ExtractPropTypes<typeof breadcrumbItemProps>\n"],"names":[],"mappings":";;;AACY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,CAAC;;;;"}
@@ -1,13 +1,61 @@
1
- import '../../../utils/index.mjs';
2
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, getCurrentInstance, inject, ref, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createBlock, withCtx, resolveDynamicComponent, toDisplayString } from 'vue';
2
+ import { ElIcon } from '../../icon/index.mjs';
3
+ import '../../../hooks/index.mjs';
4
+ import { breadcrumbKey } from './constants.mjs';
5
+ import { breadcrumbItemProps } from './breadcrumb-item.mjs';
6
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
7
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
3
8
 
4
- const breadcrumbItemProps = buildProps({
5
- to: {
6
- type: definePropType([String, Object]),
7
- default: ""
8
- },
9
- replace: Boolean
9
+ const __default__ = defineComponent({
10
+ name: "ElBreadcrumbItem"
10
11
  });
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ ...__default__,
14
+ props: breadcrumbItemProps,
15
+ setup(__props) {
16
+ const props = __props;
17
+ const instance = getCurrentInstance();
18
+ const breadcrumbContext = inject(breadcrumbKey, void 0);
19
+ const ns = useNamespace("breadcrumb");
20
+ const router = instance.appContext.config.globalProperties.$router;
21
+ const link = ref();
22
+ const onClick = () => {
23
+ if (!props.to || !router)
24
+ return;
25
+ props.replace ? router.replace(props.to) : router.push(props.to);
26
+ };
27
+ return (_ctx, _cache) => {
28
+ var _a, _b;
29
+ return openBlock(), createElementBlock("span", {
30
+ class: normalizeClass(unref(ns).e("item"))
31
+ }, [
32
+ createElementVNode("span", {
33
+ ref_key: "link",
34
+ ref: link,
35
+ class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!_ctx.to)]),
36
+ role: "link",
37
+ onClick
38
+ }, [
39
+ renderSlot(_ctx.$slots, "default")
40
+ ], 2),
41
+ ((_a = unref(breadcrumbContext)) == null ? void 0 : _a.separatorIcon) ? (openBlock(), createBlock(unref(ElIcon), {
42
+ key: 0,
43
+ class: normalizeClass(unref(ns).e("separator"))
44
+ }, {
45
+ default: withCtx(() => [
46
+ (openBlock(), createBlock(resolveDynamicComponent(unref(breadcrumbContext).separatorIcon)))
47
+ ]),
48
+ _: 1
49
+ }, 8, ["class"])) : (openBlock(), createElementBlock("span", {
50
+ key: 1,
51
+ class: normalizeClass(unref(ns).e("separator")),
52
+ role: "presentation"
53
+ }, toDisplayString((_b = unref(breadcrumbContext)) == null ? void 0 : _b.separator), 3))
54
+ ], 2);
55
+ };
56
+ }
57
+ });
58
+ var BreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "breadcrumb-item.vue"]]);
11
59
 
12
- export { breadcrumbItemProps };
60
+ export { BreadcrumbItem as default };
13
61
  //# sourceMappingURL=breadcrumb-item2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb-item2.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\n\nexport const breadcrumbItemProps = buildProps({\n /**\n * @description target route of the link, same as `to` of `vue-router`\n */\n to: {\n type: definePropType<RouteLocationRaw>([String, Object]),\n default: '',\n },\n /**\n * @description if `true`, the navigation will not leave a history record\n */\n replace: Boolean,\n} as const)\nexport type BreadcrumbItemProps = ExtractPropTypes<typeof breadcrumbItemProps>\n"],"names":[],"mappings":";;;AACY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,CAAC;;;;"}
1
+ {"version":3,"file":"breadcrumb-item2.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('item')\">\n <span\n ref=\"link\"\n :class=\"[ns.e('inner'), ns.is('link', !!to)]\"\n role=\"link\"\n @click=\"onClick\"\n >\n <slot />\n </span>\n <el-icon v-if=\"breadcrumbContext?.separatorIcon\" :class=\"ns.e('separator')\">\n <component :is=\"breadcrumbContext.separatorIcon\" />\n </el-icon>\n <span v-else :class=\"ns.e('separator')\" role=\"presentation\">\n {{ breadcrumbContext?.separator }}\n </span>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { getCurrentInstance, inject, ref } from 'vue'\nimport ElIcon from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { breadcrumbKey } from './constants'\nimport { breadcrumbItemProps } from './breadcrumb-item'\n\nimport type { Router } from 'vue-router'\n\ndefineOptions({\n name: 'ElBreadcrumbItem',\n})\n\nconst props = defineProps(breadcrumbItemProps)\n\nconst instance = getCurrentInstance()!\nconst breadcrumbContext = inject(breadcrumbKey, undefined)\nconst ns = useNamespace('breadcrumb')\n\nconst router = instance.appContext.config.globalProperties.$router as Router\n\nconst link = ref<HTMLSpanElement>()\n\nconst onClick = () => {\n if (!props.to || !router) return\n props.replace ? router.replace(props.to) : router.push(props.to)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;mCA4Bc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAM,MAAA,iBAAA,GAAoB,MAAO,CAAA,aAAA,EAAe,KAAS,CAAA,CAAA,CAAA;AACzD,IAAM,MAAA,EAAA,GAAK,aAAa,YAAY,CAAA,CAAA;AAEpC,IAAA,MAAM,MAAS,GAAA,QAAA,CAAS,UAAW,CAAA,MAAA,CAAO,gBAAiB,CAAA,OAAA,CAAA;AAE3D,IAAA,MAAM,OAAO,GAAqB,EAAA,CAAA;AAElC,IAAA,MAAM,UAAU,MAAM;AACpB,MAAI,IAAA,CAAC,KAAM,CAAA,EAAA,IAAM,CAAC,MAAA;AAAQ,QAAA,OAAA;AAC1B,MAAM,KAAA,CAAA,OAAA,GAAU,OAAO,OAAQ,CAAA,KAAA,CAAM,EAAE,CAAI,GAAA,MAAA,CAAO,IAAK,CAAA,KAAA,CAAM,EAAE,CAAA,CAAA;AAAA,KACjE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Calendar from './src/calendar.mjs';
3
- export { calendarEmits, calendarProps } from './src/calendar2.mjs';
2
+ import Calendar from './src/calendar2.mjs';
3
+ export { calendarEmits, calendarProps } from './src/calendar.mjs';
4
4
  import { withInstall } from '../../utils/vue/install.mjs';
5
5
 
6
6
  const ElCalendar = withInstall(Calendar);
@@ -1,136 +1,23 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, toDisplayString, createVNode, withCtx, createTextVNode, createCommentVNode, createSlots, normalizeProps, guardReactiveProps, Fragment, renderList, createBlock } from 'vue';
2
- import { ElButtonGroup, ElButton } from '../../button/index.mjs';
3
- import '../../../hooks/index.mjs';
4
- import DateTable from './date-table2.mjs';
5
- import { useCalendar } from './use-calendar.mjs';
6
- import { calendarProps, calendarEmits } from './calendar2.mjs';
7
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
9
- import { useLocale } from '../../../hooks/use-locale/index.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import '../../../constants/index.mjs';
3
+ import { isArray, isDate } from '@vue/shared';
4
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
+ import { UPDATE_MODEL_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
10
6
 
11
- const COMPONENT_NAME = "ElCalendar";
12
- const __default__ = defineComponent({
13
- name: COMPONENT_NAME
14
- });
15
- const _sfc_main = /* @__PURE__ */ defineComponent({
16
- ...__default__,
17
- props: calendarProps,
18
- emits: calendarEmits,
19
- setup(__props, { expose, emit }) {
20
- const props = __props;
21
- const ns = useNamespace("calendar");
22
- const {
23
- calculateValidatedDateRange,
24
- date,
25
- pickDay,
26
- realSelectedDay,
27
- selectDate,
28
- validatedRange
29
- } = useCalendar(props, emit, COMPONENT_NAME);
30
- const { t } = useLocale();
31
- const i18nDate = computed(() => {
32
- const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
33
- return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
34
- });
35
- expose({
36
- selectedDay: realSelectedDay,
37
- pickDay,
38
- selectDate,
39
- calculateValidatedDateRange
40
- });
41
- return (_ctx, _cache) => {
42
- return openBlock(), createElementBlock("div", {
43
- class: normalizeClass(unref(ns).b())
44
- }, [
45
- createElementVNode("div", {
46
- class: normalizeClass(unref(ns).e("header"))
47
- }, [
48
- renderSlot(_ctx.$slots, "header", { date: unref(i18nDate) }, () => [
49
- createElementVNode("div", {
50
- class: normalizeClass(unref(ns).e("title"))
51
- }, toDisplayString(unref(i18nDate)), 3),
52
- unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
53
- key: 0,
54
- class: normalizeClass(unref(ns).e("button-group"))
55
- }, [
56
- createVNode(unref(ElButtonGroup), null, {
57
- default: withCtx(() => [
58
- createVNode(unref(ElButton), {
59
- size: "small",
60
- onClick: ($event) => unref(selectDate)("prev-month")
61
- }, {
62
- default: withCtx(() => [
63
- createTextVNode(toDisplayString(unref(t)("el.datepicker.prevMonth")), 1)
64
- ]),
65
- _: 1
66
- }, 8, ["onClick"]),
67
- createVNode(unref(ElButton), {
68
- size: "small",
69
- onClick: ($event) => unref(selectDate)("today")
70
- }, {
71
- default: withCtx(() => [
72
- createTextVNode(toDisplayString(unref(t)("el.datepicker.today")), 1)
73
- ]),
74
- _: 1
75
- }, 8, ["onClick"]),
76
- createVNode(unref(ElButton), {
77
- size: "small",
78
- onClick: ($event) => unref(selectDate)("next-month")
79
- }, {
80
- default: withCtx(() => [
81
- createTextVNode(toDisplayString(unref(t)("el.datepicker.nextMonth")), 1)
82
- ]),
83
- _: 1
84
- }, 8, ["onClick"])
85
- ]),
86
- _: 1
87
- })
88
- ], 2)) : createCommentVNode("v-if", true)
89
- ])
90
- ], 2),
91
- unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
92
- key: 0,
93
- class: normalizeClass(unref(ns).e("body"))
94
- }, [
95
- createVNode(DateTable, {
96
- date: unref(date),
97
- "selected-day": unref(realSelectedDay),
98
- onPick: unref(pickDay)
99
- }, createSlots({ _: 2 }, [
100
- _ctx.$slots["date-cell"] ? {
101
- name: "date-cell",
102
- fn: withCtx((data) => [
103
- renderSlot(_ctx.$slots, "date-cell", normalizeProps(guardReactiveProps(data)))
104
- ])
105
- } : void 0
106
- ]), 1032, ["date", "selected-day", "onPick"])
107
- ], 2)) : (openBlock(), createElementBlock("div", {
108
- key: 1,
109
- class: normalizeClass(unref(ns).e("body"))
110
- }, [
111
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(validatedRange), (range_, index) => {
112
- return openBlock(), createBlock(DateTable, {
113
- key: index,
114
- date: range_[0],
115
- "selected-day": unref(realSelectedDay),
116
- range: range_,
117
- "hide-header": index !== 0,
118
- onPick: unref(pickDay)
119
- }, createSlots({ _: 2 }, [
120
- _ctx.$slots["date-cell"] ? {
121
- name: "date-cell",
122
- fn: withCtx((data) => [
123
- renderSlot(_ctx.$slots, "date-cell", normalizeProps(guardReactiveProps(data)))
124
- ])
125
- } : void 0
126
- ]), 1032, ["date", "selected-day", "range", "hide-header", "onPick"]);
127
- }), 128))
128
- ], 2))
129
- ], 2);
130
- };
7
+ const isValidRange = (range) => isArray(range) && range.length === 2 && range.every((item) => isDate(item));
8
+ const calendarProps = buildProps({
9
+ modelValue: {
10
+ type: Date
11
+ },
12
+ range: {
13
+ type: definePropType(Array),
14
+ validator: isValidRange
131
15
  }
132
16
  });
133
- var Calendar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "calendar.vue"]]);
17
+ const calendarEmits = {
18
+ [UPDATE_MODEL_EVENT]: (value) => isDate(value),
19
+ [INPUT_EVENT]: (value) => isDate(value)
20
+ };
134
21
 
135
- export { Calendar as default };
22
+ export { calendarEmits, calendarProps };
136
23
  //# sourceMappingURL=calendar.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.mjs","sources":["../../../../../../packages/components/calendar/src/calendar.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('header')\">\n <slot name=\"header\" :date=\"i18nDate\">\n <div :class=\"ns.e('title')\">{{ i18nDate }}</div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('button-group')\">\n <el-button-group>\n <el-button size=\"small\" @click=\"selectDate('prev-month')\">\n {{ t('el.datepicker.prevMonth') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('today')\">\n {{ t('el.datepicker.today') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('next-month')\">\n {{ t('el.datepicker.nextMonth') }}\n </el-button>\n </el-button-group>\n </div>\n </slot>\n </div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('body')\">\n <date-table :date=\"date\" :selected-day=\"realSelectedDay\" @pick=\"pickDay\">\n <template v-if=\"$slots['date-cell']\" #date-cell=\"data\">\n <slot name=\"date-cell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n <div v-else :class=\"ns.e('body')\">\n <date-table\n v-for=\"(range_, index) in validatedRange\"\n :key=\"index\"\n :date=\"range_[0]\"\n :selected-day=\"realSelectedDay\"\n :range=\"range_\"\n :hide-header=\"index !== 0\"\n @pick=\"pickDay\"\n >\n <template v-if=\"$slots['date-cell']\" #date-cell=\"data\">\n <slot name=\"date-cell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElButton, ElButtonGroup } from '@element-plus/components/button'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\n\nimport DateTable from './date-table.vue'\nimport { useCalendar } from './use-calendar'\nimport { calendarEmits, calendarProps } from './calendar'\n\nconst ns = useNamespace('calendar')\n\nconst COMPONENT_NAME = 'ElCalendar'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(calendarProps)\nconst emit = defineEmits(calendarEmits)\n\nconst {\n calculateValidatedDateRange,\n date,\n pickDay,\n realSelectedDay,\n selectDate,\n validatedRange,\n} = useCalendar(props, emit, COMPONENT_NAME)\n\nconst { t } = useLocale()\n\nconst i18nDate = computed(() => {\n const pickedMonth = `el.datepicker.month${date.value.format('M')}`\n return `${date.value.year()} ${t('el.datepicker.year')} ${t(pickedMonth)}`\n})\n\ndefineExpose({\n /** @description currently selected date */\n selectedDay: realSelectedDay,\n /** @description select a specific date */\n pickDay,\n /** @description select date */\n selectDate,\n /** @description Calculate the validate date range according to the start and end dates */\n calculateValidatedDateRange,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;mCAyDc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AALA,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAUlC,IAAM,MAAA;AAAA,MACJ,2BAAA;AAAA,MACA,IAAA;AAAA,MACA,OAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,KACE,GAAA,WAAA,CAAY,KAAO,EAAA,IAAA,EAAM,cAAc,CAAA,CAAA;AAE3C,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AAExB,IAAM,MAAA,QAAA,GAAW,SAAS,MAAM;AAC9B,MAAA,MAAM,WAAc,GAAA,CAAA,mBAAA,EAAsB,IAAK,CAAA,KAAA,CAAM,OAAO,GAAG,CAAA,CAAA,CAAA,CAAA;AAC/D,MAAO,OAAA,CAAA,EAAG,KAAK,KAAM,CAAA,IAAA,MAAU,CAAE,CAAA,oBAAoB,CAAK,CAAA,CAAA,EAAA,CAAA,CAAE,WAAW,CAAA,CAAA,CAAA,CAAA;AAAA,KACxE,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,WAAa,EAAA,eAAA;AAAA,MAEb,OAAA;AAAA,MAEA,UAAA;AAAA,MAEA,2BAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"calendar.mjs","sources":["../../../../../../packages/components/calendar/src/calendar.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isArray,\n isDate,\n} from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\n\nexport type CalendarDateType =\n | 'prev-month'\n | 'next-month'\n | 'prev-year'\n | 'next-year'\n | 'today'\n\nconst isValidRange = (range: unknown): range is [Date, Date] =>\n isArray(range) && range.length === 2 && range.every((item) => isDate(item))\n\nexport const calendarProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: Date,\n },\n /**\n * @description time range, including start time and end time.\n * Start time must be start day of week, end time must be end day of week, the time span cannot exceed two months.\n */\n range: {\n type: definePropType<[Date, Date]>(Array),\n validator: isValidRange,\n },\n} as const)\nexport type CalendarProps = ExtractPropTypes<typeof calendarProps>\n\nexport const calendarEmits = {\n [UPDATE_MODEL_EVENT]: (value: Date) => isDate(value),\n [INPUT_EVENT]: (value: Date) => isDate(value),\n}\nexport type CalendarEmits = typeof calendarEmits\n"],"names":[],"mappings":";;;;;;AAOA,MAAM,YAAY,GAAG,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAChG,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,SAAS,EAAE,YAAY;AAC3B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC;AAChD,EAAE,CAAC,WAAW,GAAG,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC;AACzC;;;;"}
@@ -1,23 +1,136 @@
1
- import '../../../utils/index.mjs';
2
- import '../../../constants/index.mjs';
3
- import { isArray, isDate } from '@vue/shared';
4
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
- import { UPDATE_MODEL_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, toDisplayString, createVNode, withCtx, createTextVNode, createCommentVNode, createSlots, normalizeProps, guardReactiveProps, Fragment, renderList, createBlock } from 'vue';
2
+ import { ElButtonGroup, ElButton } from '../../button/index.mjs';
3
+ import '../../../hooks/index.mjs';
4
+ import DateTable from './date-table2.mjs';
5
+ import { useCalendar } from './use-calendar.mjs';
6
+ import { calendarProps, calendarEmits } from './calendar.mjs';
7
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
9
+ import { useLocale } from '../../../hooks/use-locale/index.mjs';
6
10
 
7
- const isValidRange = (range) => isArray(range) && range.length === 2 && range.every((item) => isDate(item));
8
- const calendarProps = buildProps({
9
- modelValue: {
10
- type: Date
11
- },
12
- range: {
13
- type: definePropType(Array),
14
- validator: isValidRange
11
+ const COMPONENT_NAME = "ElCalendar";
12
+ const __default__ = defineComponent({
13
+ name: COMPONENT_NAME
14
+ });
15
+ const _sfc_main = /* @__PURE__ */ defineComponent({
16
+ ...__default__,
17
+ props: calendarProps,
18
+ emits: calendarEmits,
19
+ setup(__props, { expose, emit }) {
20
+ const props = __props;
21
+ const ns = useNamespace("calendar");
22
+ const {
23
+ calculateValidatedDateRange,
24
+ date,
25
+ pickDay,
26
+ realSelectedDay,
27
+ selectDate,
28
+ validatedRange
29
+ } = useCalendar(props, emit, COMPONENT_NAME);
30
+ const { t } = useLocale();
31
+ const i18nDate = computed(() => {
32
+ const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
33
+ return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
34
+ });
35
+ expose({
36
+ selectedDay: realSelectedDay,
37
+ pickDay,
38
+ selectDate,
39
+ calculateValidatedDateRange
40
+ });
41
+ return (_ctx, _cache) => {
42
+ return openBlock(), createElementBlock("div", {
43
+ class: normalizeClass(unref(ns).b())
44
+ }, [
45
+ createElementVNode("div", {
46
+ class: normalizeClass(unref(ns).e("header"))
47
+ }, [
48
+ renderSlot(_ctx.$slots, "header", { date: unref(i18nDate) }, () => [
49
+ createElementVNode("div", {
50
+ class: normalizeClass(unref(ns).e("title"))
51
+ }, toDisplayString(unref(i18nDate)), 3),
52
+ unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
53
+ key: 0,
54
+ class: normalizeClass(unref(ns).e("button-group"))
55
+ }, [
56
+ createVNode(unref(ElButtonGroup), null, {
57
+ default: withCtx(() => [
58
+ createVNode(unref(ElButton), {
59
+ size: "small",
60
+ onClick: ($event) => unref(selectDate)("prev-month")
61
+ }, {
62
+ default: withCtx(() => [
63
+ createTextVNode(toDisplayString(unref(t)("el.datepicker.prevMonth")), 1)
64
+ ]),
65
+ _: 1
66
+ }, 8, ["onClick"]),
67
+ createVNode(unref(ElButton), {
68
+ size: "small",
69
+ onClick: ($event) => unref(selectDate)("today")
70
+ }, {
71
+ default: withCtx(() => [
72
+ createTextVNode(toDisplayString(unref(t)("el.datepicker.today")), 1)
73
+ ]),
74
+ _: 1
75
+ }, 8, ["onClick"]),
76
+ createVNode(unref(ElButton), {
77
+ size: "small",
78
+ onClick: ($event) => unref(selectDate)("next-month")
79
+ }, {
80
+ default: withCtx(() => [
81
+ createTextVNode(toDisplayString(unref(t)("el.datepicker.nextMonth")), 1)
82
+ ]),
83
+ _: 1
84
+ }, 8, ["onClick"])
85
+ ]),
86
+ _: 1
87
+ })
88
+ ], 2)) : createCommentVNode("v-if", true)
89
+ ])
90
+ ], 2),
91
+ unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
92
+ key: 0,
93
+ class: normalizeClass(unref(ns).e("body"))
94
+ }, [
95
+ createVNode(DateTable, {
96
+ date: unref(date),
97
+ "selected-day": unref(realSelectedDay),
98
+ onPick: unref(pickDay)
99
+ }, createSlots({ _: 2 }, [
100
+ _ctx.$slots["date-cell"] ? {
101
+ name: "date-cell",
102
+ fn: withCtx((data) => [
103
+ renderSlot(_ctx.$slots, "date-cell", normalizeProps(guardReactiveProps(data)))
104
+ ])
105
+ } : void 0
106
+ ]), 1032, ["date", "selected-day", "onPick"])
107
+ ], 2)) : (openBlock(), createElementBlock("div", {
108
+ key: 1,
109
+ class: normalizeClass(unref(ns).e("body"))
110
+ }, [
111
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(validatedRange), (range_, index) => {
112
+ return openBlock(), createBlock(DateTable, {
113
+ key: index,
114
+ date: range_[0],
115
+ "selected-day": unref(realSelectedDay),
116
+ range: range_,
117
+ "hide-header": index !== 0,
118
+ onPick: unref(pickDay)
119
+ }, createSlots({ _: 2 }, [
120
+ _ctx.$slots["date-cell"] ? {
121
+ name: "date-cell",
122
+ fn: withCtx((data) => [
123
+ renderSlot(_ctx.$slots, "date-cell", normalizeProps(guardReactiveProps(data)))
124
+ ])
125
+ } : void 0
126
+ ]), 1032, ["date", "selected-day", "range", "hide-header", "onPick"]);
127
+ }), 128))
128
+ ], 2))
129
+ ], 2);
130
+ };
15
131
  }
16
132
  });
17
- const calendarEmits = {
18
- [UPDATE_MODEL_EVENT]: (value) => isDate(value),
19
- [INPUT_EVENT]: (value) => isDate(value)
20
- };
133
+ var Calendar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "calendar.vue"]]);
21
134
 
22
- export { calendarEmits, calendarProps };
135
+ export { Calendar as default };
23
136
  //# sourceMappingURL=calendar2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar2.mjs","sources":["../../../../../../packages/components/calendar/src/calendar.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isArray,\n isDate,\n} from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\n\nexport type CalendarDateType =\n | 'prev-month'\n | 'next-month'\n | 'prev-year'\n | 'next-year'\n | 'today'\n\nconst isValidRange = (range: unknown): range is [Date, Date] =>\n isArray(range) && range.length === 2 && range.every((item) => isDate(item))\n\nexport const calendarProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: Date,\n },\n /**\n * @description time range, including start time and end time.\n * Start time must be start day of week, end time must be end day of week, the time span cannot exceed two months.\n */\n range: {\n type: definePropType<[Date, Date]>(Array),\n validator: isValidRange,\n },\n} as const)\nexport type CalendarProps = ExtractPropTypes<typeof calendarProps>\n\nexport const calendarEmits = {\n [UPDATE_MODEL_EVENT]: (value: Date) => isDate(value),\n [INPUT_EVENT]: (value: Date) => isDate(value),\n}\nexport type CalendarEmits = typeof calendarEmits\n"],"names":[],"mappings":";;;;;;AAOA,MAAM,YAAY,GAAG,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAChG,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,SAAS,EAAE,YAAY;AAC3B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC;AAChD,EAAE,CAAC,WAAW,GAAG,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC;AACzC;;;;"}
1
+ {"version":3,"file":"calendar2.mjs","sources":["../../../../../../packages/components/calendar/src/calendar.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('header')\">\n <slot name=\"header\" :date=\"i18nDate\">\n <div :class=\"ns.e('title')\">{{ i18nDate }}</div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('button-group')\">\n <el-button-group>\n <el-button size=\"small\" @click=\"selectDate('prev-month')\">\n {{ t('el.datepicker.prevMonth') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('today')\">\n {{ t('el.datepicker.today') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('next-month')\">\n {{ t('el.datepicker.nextMonth') }}\n </el-button>\n </el-button-group>\n </div>\n </slot>\n </div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('body')\">\n <date-table :date=\"date\" :selected-day=\"realSelectedDay\" @pick=\"pickDay\">\n <template v-if=\"$slots['date-cell']\" #date-cell=\"data\">\n <slot name=\"date-cell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n <div v-else :class=\"ns.e('body')\">\n <date-table\n v-for=\"(range_, index) in validatedRange\"\n :key=\"index\"\n :date=\"range_[0]\"\n :selected-day=\"realSelectedDay\"\n :range=\"range_\"\n :hide-header=\"index !== 0\"\n @pick=\"pickDay\"\n >\n <template v-if=\"$slots['date-cell']\" #date-cell=\"data\">\n <slot name=\"date-cell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElButton, ElButtonGroup } from '@element-plus/components/button'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\n\nimport DateTable from './date-table.vue'\nimport { useCalendar } from './use-calendar'\nimport { calendarEmits, calendarProps } from './calendar'\n\nconst ns = useNamespace('calendar')\n\nconst COMPONENT_NAME = 'ElCalendar'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(calendarProps)\nconst emit = defineEmits(calendarEmits)\n\nconst {\n calculateValidatedDateRange,\n date,\n pickDay,\n realSelectedDay,\n selectDate,\n validatedRange,\n} = useCalendar(props, emit, COMPONENT_NAME)\n\nconst { t } = useLocale()\n\nconst i18nDate = computed(() => {\n const pickedMonth = `el.datepicker.month${date.value.format('M')}`\n return `${date.value.year()} ${t('el.datepicker.year')} ${t(pickedMonth)}`\n})\n\ndefineExpose({\n /** @description currently selected date */\n selectedDay: realSelectedDay,\n /** @description select a specific date */\n pickDay,\n /** @description select date */\n selectDate,\n /** @description Calculate the validate date range according to the start and end dates */\n calculateValidatedDateRange,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;mCAyDc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AALA,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAUlC,IAAM,MAAA;AAAA,MACJ,2BAAA;AAAA,MACA,IAAA;AAAA,MACA,OAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,KACE,GAAA,WAAA,CAAY,KAAO,EAAA,IAAA,EAAM,cAAc,CAAA,CAAA;AAE3C,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AAExB,IAAM,MAAA,QAAA,GAAW,SAAS,MAAM;AAC9B,MAAA,MAAM,WAAc,GAAA,CAAA,mBAAA,EAAsB,IAAK,CAAA,KAAA,CAAM,OAAO,GAAG,CAAA,CAAA,CAAA,CAAA;AAC/D,MAAO,OAAA,CAAA,EAAG,KAAK,KAAM,CAAA,IAAA,MAAU,CAAE,CAAA,oBAAoB,CAAK,CAAA,CAAA,EAAA,CAAA,CAAE,WAAW,CAAA,CAAA,CAAA,CAAA;AAAA,KACxE,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,WAAa,EAAA,eAAA;AAAA,MAEb,OAAA;AAAA,MAEA,UAAA;AAAA,MAEA,2BAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,5 @@
1
1
  import type { CascaderNode, CascaderValue } from '@element-plus/nightly/es/components/cascader-panel';
2
+ import type { Placement } from '@element-plus/nightly/es/components/popper';
2
3
  export declare const cascaderProps: {
3
4
  emptyValues: ArrayConstructor;
4
5
  valueOnClear: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown, undefined, boolean>;
@@ -36,6 +37,8 @@ export declare const cascaderProps: {
36
37
  new (): any;
37
38
  readonly prototype: any;
38
39
  })[], unknown, unknown, () => true, boolean>;
40
+ placement: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => Placement & {}) | (() => Placement) | ((new (...args: any[]) => Placement & {}) | (() => Placement))[], Placement, unknown, string, boolean>;
41
+ fallbackPlacements: import("@element-plus/nightly/es/utils").EpPropFinalized<(new (...args: any[]) => Placement[]) | (() => Placement[]) | ((new (...args: any[]) => Placement[]) | (() => Placement[]))[], unknown, unknown, string[], boolean>;
39
42
  popperClass: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
40
43
  teleported: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
41
44
  tagType: {
@@ -1,3 +1,4 @@
1
+ import { placements } from '@popperjs/core';
1
2
  import '../../cascader-panel/index.mjs';
2
3
  import '../../../utils/index.mjs';
3
4
  import '../../../hooks/index.mjs';
@@ -49,6 +50,15 @@ const cascaderProps = buildProps({
49
50
  type: definePropType(Function),
50
51
  default: () => true
51
52
  },
53
+ placement: {
54
+ type: definePropType(String),
55
+ values: placements,
56
+ default: "bottom-start"
57
+ },
58
+ fallbackPlacements: {
59
+ type: definePropType(Array),
60
+ default: ["bottom-start", "bottom", "top-start", "top", "right", "left"]
61
+ },
52
62
  popperClass: {
53
63
  type: String,
54
64
  default: ""
@@ -1 +1 @@
1
- {"version":3,"file":"cascader.mjs","sources":["../../../../../../packages/components/cascader/src/cascader.ts"],"sourcesContent":["import { CommonProps } from '@element-plus/components/cascader-panel'\nimport { buildProps, definePropType, isBoolean } from '@element-plus/utils'\nimport { useEmptyValuesProps, useSizeProp } from '@element-plus/hooks'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { tagProps } from '@element-plus/components/tag'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type {\n CascaderNode,\n CascaderValue,\n} from '@element-plus/components/cascader-panel'\n\nexport const cascaderProps = buildProps({\n ...CommonProps,\n /**\n * @description size of input\n */\n size: useSizeProp,\n /**\n * @description placeholder of input\n */\n placeholder: String,\n /**\n * @description whether Cascader is disabled\n */\n disabled: Boolean,\n /**\n * @description whether selected value can be cleared\n */\n clearable: Boolean,\n /**\n * @description whether the options can be searched\n */\n filterable: Boolean,\n /**\n * @description customize search logic, the first parameter is `node`, the second is `keyword`, and need return a boolean value indicating whether it hits.\n */\n filterMethod: {\n type: definePropType<(node: CascaderNode, keyword: string) => boolean>(\n Function\n ),\n default: (node: CascaderNode, keyword: string) =>\n node.text.includes(keyword),\n },\n /**\n * @description option label separator\n */\n separator: {\n type: String,\n default: ' / ',\n },\n /**\n * @description whether to display all levels of the selected value in the input\n */\n showAllLevels: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to collapse tags in multiple selection mode\n */\n collapseTags: Boolean,\n /**\n * @description The max tags number to be shown. To use this, collapse-tags must be true\n */\n maxCollapseTags: {\n type: Number,\n default: 1,\n },\n /**\n * @description native input id\n */\n collapseTagsTooltip: {\n type: Boolean,\n default: false,\n },\n /**\n * @description debounce delay when typing filter keyword, in milliseconds\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description hook function before filtering with the value to be filtered as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, filtering will be aborted\n */\n beforeFilter: {\n type: definePropType<(value: string) => boolean | Promise<any>>(Function),\n default: () => true,\n },\n /**\n * @description custom class name for Cascader's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description whether cascader popup is teleported\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description tag type\n */\n // eslint-disable-next-line vue/require-prop-types\n tagType: { ...tagProps.type, default: 'info' },\n /**\n * @description tag effect\n */\n tagEffect: { ...tagProps.effect, default: 'light' },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description when dropdown is inactive and `persistent` is `false`, dropdown will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n ...useEmptyValuesProps,\n})\n\nexport const cascaderEmits = {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n [UPDATE_MODEL_EVENT]: (_: CascaderValue) => true,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n [CHANGE_EVENT]: (_: CascaderValue) => true,\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n visibleChange: (val: boolean) => isBoolean(val),\n expandChange: (val: CascaderValue) => !!val,\n removeTag: (val: CascaderNode['valueByOption']) => !!val,\n}\n\n// Type name is taken(cascader-panel/src/node), needs discussion\n// export type CascaderProps = ExtractPropTypes<typeof cascaderProps>\n\nexport type CascaderEmits = typeof cascaderEmits\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,GAAG,WAAW;AAChB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC3D,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,YAAY,EAAE,OAAO;AACvB,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,MAAM,IAAI;AACvB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,UAAU,EAAE,sBAAsB,CAAC,UAAU;AAC/C,EAAE,OAAO,EAAE,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE;AAChD,EAAE,SAAS,EAAE,EAAE,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE;AACrD,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,GAAG,mBAAmB;AACxB,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,CAAC,CAAC,KAAK,IAAI;AACnC,EAAE,CAAC,YAAY,GAAG,CAAC,CAAC,KAAK,IAAI;AAC7B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC1C,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,aAAa,EAAE,CAAC,GAAG,KAAK,SAAS,CAAC,GAAG,CAAC;AACxC,EAAE,YAAY,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;AAC9B,EAAE,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;AAC3B;;;;"}
1
+ {"version":3,"file":"cascader.mjs","sources":["../../../../../../packages/components/cascader/src/cascader.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { CommonProps } from '@element-plus/components/cascader-panel'\nimport { buildProps, definePropType, isBoolean } from '@element-plus/utils'\nimport { useEmptyValuesProps, useSizeProp } from '@element-plus/hooks'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { tagProps } from '@element-plus/components/tag'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type {\n CascaderNode,\n CascaderValue,\n} from '@element-plus/components/cascader-panel'\nimport type { Placement } from '@element-plus/components/popper'\n\nexport const cascaderProps = buildProps({\n ...CommonProps,\n /**\n * @description size of input\n */\n size: useSizeProp,\n /**\n * @description placeholder of input\n */\n placeholder: String,\n /**\n * @description whether Cascader is disabled\n */\n disabled: Boolean,\n /**\n * @description whether selected value can be cleared\n */\n clearable: Boolean,\n /**\n * @description whether the options can be searched\n */\n filterable: Boolean,\n /**\n * @description customize search logic, the first parameter is `node`, the second is `keyword`, and need return a boolean value indicating whether it hits.\n */\n filterMethod: {\n type: definePropType<(node: CascaderNode, keyword: string) => boolean>(\n Function\n ),\n default: (node: CascaderNode, keyword: string) =>\n node.text.includes(keyword),\n },\n /**\n * @description option label separator\n */\n separator: {\n type: String,\n default: ' / ',\n },\n /**\n * @description whether to display all levels of the selected value in the input\n */\n showAllLevels: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to collapse tags in multiple selection mode\n */\n collapseTags: Boolean,\n /**\n * @description The max tags number to be shown. To use this, collapse-tags must be true\n */\n maxCollapseTags: {\n type: Number,\n default: 1,\n },\n /**\n * @description native input id\n */\n collapseTagsTooltip: {\n type: Boolean,\n default: false,\n },\n /**\n * @description debounce delay when typing filter keyword, in milliseconds\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description hook function before filtering with the value to be filtered as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, filtering will be aborted\n */\n beforeFilter: {\n type: definePropType<(value: string) => boolean | Promise<any>>(Function),\n default: () => true,\n },\n /**\n * @description position of dropdown\n */\n placement: {\n type: definePropType<Placement>(String),\n values: placements,\n default: 'bottom-start',\n },\n /**\n * @description list of possible positions for dropdown\n */\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: ['bottom-start', 'bottom', 'top-start', 'top', 'right', 'left'],\n },\n /**\n * @description custom class name for Cascader's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description whether cascader popup is teleported\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description tag type\n */\n // eslint-disable-next-line vue/require-prop-types\n tagType: { ...tagProps.type, default: 'info' },\n /**\n * @description tag effect\n */\n tagEffect: { ...tagProps.effect, default: 'light' },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description when dropdown is inactive and `persistent` is `false`, dropdown will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n ...useEmptyValuesProps,\n})\n\nexport const cascaderEmits = {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n [UPDATE_MODEL_EVENT]: (_: CascaderValue) => true,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n [CHANGE_EVENT]: (_: CascaderValue) => true,\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n visibleChange: (val: boolean) => isBoolean(val),\n expandChange: (val: CascaderValue) => !!val,\n removeTag: (val: CascaderNode['valueByOption']) => !!val,\n}\n\n// Type name is taken(cascader-panel/src/node), needs discussion\n// export type CascaderProps = ExtractPropTypes<typeof cascaderProps>\n\nexport type CascaderEmits = typeof cascaderEmits\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAOY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,GAAG,WAAW;AAChB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC3D,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,YAAY,EAAE,OAAO;AACvB,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,MAAM,IAAI;AACvB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,UAAU;AACtB,IAAI,OAAO,EAAE,cAAc;AAC3B,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,CAAC,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC;AAC5E,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,UAAU,EAAE,sBAAsB,CAAC,UAAU;AAC/C,EAAE,OAAO,EAAE,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE;AAChD,EAAE,SAAS,EAAE,EAAE,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE;AACrD,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,GAAG,mBAAmB;AACxB,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,CAAC,CAAC,KAAK,IAAI;AACnC,EAAE,CAAC,YAAY,GAAG,CAAC,CAAC,KAAK,IAAI;AAC7B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC1C,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,aAAa,EAAE,CAAC,GAAG,KAAK,SAAS,CAAC,GAAG,CAAC;AACxC,EAAE,YAAY,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;AAC9B,EAAE,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;AAC3B;;;;"}