@element-plus/nightly 0.0.20220904 → 0.0.20220907

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 (362) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +95 -79
  4. package/dist/index.full.min.js +14 -14
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +14 -14
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +95 -80
  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.js +1 -1
  14. package/dist/locale/ar.min.js +1 -1
  15. package/dist/locale/ar.min.mjs +1 -1
  16. package/dist/locale/ar.mjs +1 -1
  17. package/dist/locale/az.js +1 -1
  18. package/dist/locale/az.min.js +1 -1
  19. package/dist/locale/az.min.mjs +1 -1
  20. package/dist/locale/az.mjs +1 -1
  21. package/dist/locale/bg.js +1 -1
  22. package/dist/locale/bg.min.js +1 -1
  23. package/dist/locale/bg.min.mjs +1 -1
  24. package/dist/locale/bg.mjs +1 -1
  25. package/dist/locale/bn.js +1 -1
  26. package/dist/locale/bn.min.js +1 -1
  27. package/dist/locale/bn.min.mjs +1 -1
  28. package/dist/locale/bn.mjs +1 -1
  29. package/dist/locale/ca.js +1 -1
  30. package/dist/locale/ca.min.js +1 -1
  31. package/dist/locale/ca.min.mjs +1 -1
  32. package/dist/locale/ca.mjs +1 -1
  33. package/dist/locale/cs.js +1 -1
  34. package/dist/locale/cs.min.js +1 -1
  35. package/dist/locale/cs.min.mjs +1 -1
  36. package/dist/locale/cs.mjs +1 -1
  37. package/dist/locale/da.js +1 -1
  38. package/dist/locale/da.min.js +1 -1
  39. package/dist/locale/da.min.mjs +1 -1
  40. package/dist/locale/da.mjs +1 -1
  41. package/dist/locale/de.js +1 -1
  42. package/dist/locale/de.min.js +1 -1
  43. package/dist/locale/de.min.mjs +1 -1
  44. package/dist/locale/de.mjs +1 -1
  45. package/dist/locale/el.js +1 -1
  46. package/dist/locale/el.min.js +1 -1
  47. package/dist/locale/el.min.mjs +1 -1
  48. package/dist/locale/el.mjs +1 -1
  49. package/dist/locale/en.js +1 -1
  50. package/dist/locale/en.min.js +1 -1
  51. package/dist/locale/en.min.mjs +1 -1
  52. package/dist/locale/en.mjs +1 -1
  53. package/dist/locale/eo.js +1 -1
  54. package/dist/locale/eo.min.js +1 -1
  55. package/dist/locale/eo.min.mjs +1 -1
  56. package/dist/locale/eo.mjs +1 -1
  57. package/dist/locale/es.js +1 -1
  58. package/dist/locale/es.min.js +1 -1
  59. package/dist/locale/es.min.mjs +1 -1
  60. package/dist/locale/es.mjs +1 -1
  61. package/dist/locale/et.js +1 -1
  62. package/dist/locale/et.min.js +1 -1
  63. package/dist/locale/et.min.mjs +1 -1
  64. package/dist/locale/et.mjs +1 -1
  65. package/dist/locale/eu.js +1 -1
  66. package/dist/locale/eu.min.js +1 -1
  67. package/dist/locale/eu.min.mjs +1 -1
  68. package/dist/locale/eu.mjs +1 -1
  69. package/dist/locale/fa.js +1 -1
  70. package/dist/locale/fa.min.js +1 -1
  71. package/dist/locale/fa.min.mjs +1 -1
  72. package/dist/locale/fa.mjs +1 -1
  73. package/dist/locale/fi.js +1 -1
  74. package/dist/locale/fi.min.js +1 -1
  75. package/dist/locale/fi.min.mjs +1 -1
  76. package/dist/locale/fi.mjs +1 -1
  77. package/dist/locale/fr.js +1 -1
  78. package/dist/locale/fr.min.js +1 -1
  79. package/dist/locale/fr.min.mjs +1 -1
  80. package/dist/locale/fr.mjs +1 -1
  81. package/dist/locale/he.js +1 -1
  82. package/dist/locale/he.min.js +1 -1
  83. package/dist/locale/he.min.mjs +1 -1
  84. package/dist/locale/he.mjs +1 -1
  85. package/dist/locale/hr.js +1 -1
  86. package/dist/locale/hr.min.js +1 -1
  87. package/dist/locale/hr.min.mjs +1 -1
  88. package/dist/locale/hr.mjs +1 -1
  89. package/dist/locale/hu.js +1 -1
  90. package/dist/locale/hu.min.js +1 -1
  91. package/dist/locale/hu.min.mjs +1 -1
  92. package/dist/locale/hu.mjs +1 -1
  93. package/dist/locale/hy-am.js +1 -1
  94. package/dist/locale/hy-am.min.js +1 -1
  95. package/dist/locale/hy-am.min.mjs +1 -1
  96. package/dist/locale/hy-am.mjs +1 -1
  97. package/dist/locale/id.js +1 -1
  98. package/dist/locale/id.min.js +1 -1
  99. package/dist/locale/id.min.mjs +1 -1
  100. package/dist/locale/id.mjs +1 -1
  101. package/dist/locale/it.js +1 -1
  102. package/dist/locale/it.min.js +1 -1
  103. package/dist/locale/it.min.mjs +1 -1
  104. package/dist/locale/it.mjs +1 -1
  105. package/dist/locale/ja.js +1 -1
  106. package/dist/locale/ja.min.js +1 -1
  107. package/dist/locale/ja.min.mjs +1 -1
  108. package/dist/locale/ja.mjs +1 -1
  109. package/dist/locale/kk.js +1 -1
  110. package/dist/locale/kk.min.js +1 -1
  111. package/dist/locale/kk.min.mjs +1 -1
  112. package/dist/locale/kk.mjs +1 -1
  113. package/dist/locale/km.js +1 -1
  114. package/dist/locale/km.min.js +1 -1
  115. package/dist/locale/km.min.mjs +1 -1
  116. package/dist/locale/km.mjs +1 -1
  117. package/dist/locale/ko.js +1 -1
  118. package/dist/locale/ko.min.js +1 -1
  119. package/dist/locale/ko.min.mjs +1 -1
  120. package/dist/locale/ko.mjs +1 -1
  121. package/dist/locale/ku.js +1 -1
  122. package/dist/locale/ku.min.js +1 -1
  123. package/dist/locale/ku.min.mjs +1 -1
  124. package/dist/locale/ku.mjs +1 -1
  125. package/dist/locale/ky.js +1 -1
  126. package/dist/locale/ky.min.js +1 -1
  127. package/dist/locale/ky.min.mjs +1 -1
  128. package/dist/locale/ky.mjs +1 -1
  129. package/dist/locale/lt.js +1 -1
  130. package/dist/locale/lt.min.js +1 -1
  131. package/dist/locale/lt.min.mjs +1 -1
  132. package/dist/locale/lt.mjs +1 -1
  133. package/dist/locale/lv.js +1 -1
  134. package/dist/locale/lv.min.js +1 -1
  135. package/dist/locale/lv.min.mjs +1 -1
  136. package/dist/locale/lv.mjs +1 -1
  137. package/dist/locale/mg.js +1 -1
  138. package/dist/locale/mg.min.js +1 -1
  139. package/dist/locale/mg.min.mjs +1 -1
  140. package/dist/locale/mg.mjs +1 -1
  141. package/dist/locale/mn.js +1 -1
  142. package/dist/locale/mn.min.js +1 -1
  143. package/dist/locale/mn.min.mjs +1 -1
  144. package/dist/locale/mn.mjs +1 -1
  145. package/dist/locale/nb-no.js +1 -1
  146. package/dist/locale/nb-no.min.js +1 -1
  147. package/dist/locale/nb-no.min.mjs +1 -1
  148. package/dist/locale/nb-no.mjs +1 -1
  149. package/dist/locale/nl.js +1 -1
  150. package/dist/locale/nl.min.js +1 -1
  151. package/dist/locale/nl.min.mjs +1 -1
  152. package/dist/locale/nl.mjs +1 -1
  153. package/dist/locale/pa.js +1 -1
  154. package/dist/locale/pa.min.js +1 -1
  155. package/dist/locale/pa.min.mjs +1 -1
  156. package/dist/locale/pa.mjs +1 -1
  157. package/dist/locale/pl.js +1 -1
  158. package/dist/locale/pl.min.js +1 -1
  159. package/dist/locale/pl.min.mjs +1 -1
  160. package/dist/locale/pl.mjs +1 -1
  161. package/dist/locale/pt-br.js +1 -1
  162. package/dist/locale/pt-br.min.js +1 -1
  163. package/dist/locale/pt-br.min.mjs +1 -1
  164. package/dist/locale/pt-br.mjs +1 -1
  165. package/dist/locale/pt.js +1 -1
  166. package/dist/locale/pt.min.js +1 -1
  167. package/dist/locale/pt.min.mjs +1 -1
  168. package/dist/locale/pt.mjs +1 -1
  169. package/dist/locale/ro.js +1 -1
  170. package/dist/locale/ro.min.js +1 -1
  171. package/dist/locale/ro.min.mjs +1 -1
  172. package/dist/locale/ro.mjs +1 -1
  173. package/dist/locale/ru.js +1 -1
  174. package/dist/locale/ru.min.js +1 -1
  175. package/dist/locale/ru.min.mjs +1 -1
  176. package/dist/locale/ru.mjs +1 -1
  177. package/dist/locale/sk.js +1 -1
  178. package/dist/locale/sk.min.js +1 -1
  179. package/dist/locale/sk.min.mjs +1 -1
  180. package/dist/locale/sk.mjs +1 -1
  181. package/dist/locale/sl.js +1 -1
  182. package/dist/locale/sl.min.js +1 -1
  183. package/dist/locale/sl.min.mjs +1 -1
  184. package/dist/locale/sl.mjs +1 -1
  185. package/dist/locale/sr.js +1 -1
  186. package/dist/locale/sr.min.js +1 -1
  187. package/dist/locale/sr.min.mjs +1 -1
  188. package/dist/locale/sr.mjs +1 -1
  189. package/dist/locale/sv.js +1 -1
  190. package/dist/locale/sv.min.js +1 -1
  191. package/dist/locale/sv.min.mjs +1 -1
  192. package/dist/locale/sv.mjs +1 -1
  193. package/dist/locale/ta.js +1 -1
  194. package/dist/locale/ta.min.js +1 -1
  195. package/dist/locale/ta.min.mjs +1 -1
  196. package/dist/locale/ta.mjs +1 -1
  197. package/dist/locale/th.js +1 -1
  198. package/dist/locale/th.min.js +1 -1
  199. package/dist/locale/th.min.mjs +1 -1
  200. package/dist/locale/th.mjs +1 -1
  201. package/dist/locale/tk.js +1 -1
  202. package/dist/locale/tk.min.js +1 -1
  203. package/dist/locale/tk.min.mjs +1 -1
  204. package/dist/locale/tk.mjs +1 -1
  205. package/dist/locale/tr.js +1 -1
  206. package/dist/locale/tr.min.js +1 -1
  207. package/dist/locale/tr.min.mjs +1 -1
  208. package/dist/locale/tr.mjs +1 -1
  209. package/dist/locale/ug-cn.js +1 -1
  210. package/dist/locale/ug-cn.min.js +1 -1
  211. package/dist/locale/ug-cn.min.mjs +1 -1
  212. package/dist/locale/ug-cn.mjs +1 -1
  213. package/dist/locale/uk.js +1 -1
  214. package/dist/locale/uk.min.js +1 -1
  215. package/dist/locale/uk.min.mjs +1 -1
  216. package/dist/locale/uk.mjs +1 -1
  217. package/dist/locale/uz-uz.js +1 -1
  218. package/dist/locale/uz-uz.min.js +1 -1
  219. package/dist/locale/uz-uz.min.mjs +1 -1
  220. package/dist/locale/uz-uz.mjs +1 -1
  221. package/dist/locale/vi.js +1 -1
  222. package/dist/locale/vi.min.js +1 -1
  223. package/dist/locale/vi.min.mjs +1 -1
  224. package/dist/locale/vi.mjs +1 -1
  225. package/dist/locale/zh-cn.js +1 -1
  226. package/dist/locale/zh-cn.min.js +1 -1
  227. package/dist/locale/zh-cn.min.mjs +1 -1
  228. package/dist/locale/zh-cn.mjs +1 -1
  229. package/dist/locale/zh-tw.js +1 -1
  230. package/dist/locale/zh-tw.min.js +1 -1
  231. package/dist/locale/zh-tw.min.mjs +1 -1
  232. package/dist/locale/zh-tw.mjs +1 -1
  233. package/es/components/cascader-panel/src/node.mjs +2 -1
  234. package/es/components/cascader-panel/src/node.mjs.map +1 -1
  235. package/es/components/index.mjs +1 -1
  236. package/es/components/loading/src/loading.mjs +3 -8
  237. package/es/components/loading/src/loading.mjs.map +1 -1
  238. package/es/components/message/src/method.mjs +3 -1
  239. package/es/components/message/src/method.mjs.map +1 -1
  240. package/es/components/pagination/src/components/sizes.vue.d.ts +21 -0
  241. package/es/components/rate/index.d.ts +4 -3
  242. package/es/components/rate/src/rate.vue.d.ts +17 -16
  243. package/es/components/rate/src/rate2.mjs +23 -19
  244. package/es/components/rate/src/rate2.mjs.map +1 -1
  245. package/es/components/select/index.d.ts +21 -0
  246. package/es/components/select/src/select.mjs +20 -6
  247. package/es/components/select/src/select.mjs.map +1 -1
  248. package/es/components/select/src/select.vue.d.ts +28 -7
  249. package/es/components/select/src/useSelect.mjs +5 -2
  250. package/es/components/select/src/useSelect.mjs.map +1 -1
  251. package/es/components/table/src/table-column/render-helper.mjs +1 -1
  252. package/es/components/table/src/table-column/render-helper.mjs.map +1 -1
  253. package/es/components/table/src/table.mjs +1 -1
  254. package/es/components/table/src/table.mjs.map +1 -1
  255. package/es/components/table/src/util.mjs +3 -0
  256. package/es/components/table/src/util.mjs.map +1 -1
  257. package/es/components/table-v2/src/table-v2.mjs +2 -2
  258. package/es/components/table-v2/src/table-v2.mjs.map +1 -1
  259. package/es/components/tabs/index.d.ts +8 -8
  260. package/es/components/tabs/index.mjs +1 -1
  261. package/es/components/tabs/src/tab-bar2.mjs +1 -1
  262. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  263. package/es/components/tabs/src/tab-nav.d.ts +45 -58
  264. package/es/components/tabs/src/tab-nav.mjs +12 -14
  265. package/es/components/tabs/src/tab-nav.mjs.map +1 -1
  266. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  267. package/es/components/tabs/src/tabs.d.ts +12 -12
  268. package/es/components/tabs/src/tabs.mjs +8 -8
  269. package/es/components/tabs/src/tabs.mjs.map +1 -1
  270. package/es/components/time-select/index.d.ts +84 -0
  271. package/es/components/time-select/src/time-select.vue.d.ts +42 -0
  272. package/es/components/tree/src/model/util.d.ts +3 -1
  273. package/es/components/tree/src/model/util.mjs +9 -1
  274. package/es/components/tree/src/model/util.mjs.map +1 -1
  275. package/es/components/tree/src/tree-node.mjs +2 -4
  276. package/es/components/tree/src/tree-node.mjs.map +1 -1
  277. package/es/components/tree/src/tree.mjs +3 -13
  278. package/es/components/tree/src/tree.mjs.map +1 -1
  279. package/es/hooks/use-popper-container/index.mjs +4 -1
  280. package/es/hooks/use-popper-container/index.mjs.map +1 -1
  281. package/es/index.mjs +1 -1
  282. package/es/utils/index.mjs +2 -2
  283. package/es/utils/strings.d.ts +2 -1
  284. package/es/utils/strings.mjs +4 -2
  285. package/es/utils/strings.mjs.map +1 -1
  286. package/es/version.d.ts +1 -1
  287. package/es/version.mjs +1 -1
  288. package/es/version.mjs.map +1 -1
  289. package/lib/components/cascader-panel/src/node.js +3 -2
  290. package/lib/components/cascader-panel/src/node.js.map +1 -1
  291. package/lib/components/index.js +1 -0
  292. package/lib/components/index.js.map +1 -1
  293. package/lib/components/loading/src/loading.js +3 -8
  294. package/lib/components/loading/src/loading.js.map +1 -1
  295. package/lib/components/message/src/method.js +3 -1
  296. package/lib/components/message/src/method.js.map +1 -1
  297. package/lib/components/pagination/src/components/sizes.vue.d.ts +21 -0
  298. package/lib/components/rate/index.d.ts +4 -3
  299. package/lib/components/rate/src/rate.vue.d.ts +17 -16
  300. package/lib/components/rate/src/rate2.js +21 -17
  301. package/lib/components/rate/src/rate2.js.map +1 -1
  302. package/lib/components/select/index.d.ts +21 -0
  303. package/lib/components/select/src/select.js +19 -5
  304. package/lib/components/select/src/select.js.map +1 -1
  305. package/lib/components/select/src/select.vue.d.ts +28 -7
  306. package/lib/components/select/src/useSelect.js +5 -2
  307. package/lib/components/select/src/useSelect.js.map +1 -1
  308. package/lib/components/table/src/table-column/render-helper.js +1 -1
  309. package/lib/components/table/src/table-column/render-helper.js.map +1 -1
  310. package/lib/components/table/src/table.js +1 -1
  311. package/lib/components/table/src/table.js.map +1 -1
  312. package/lib/components/table/src/util.js +3 -0
  313. package/lib/components/table/src/util.js.map +1 -1
  314. package/lib/components/table-v2/src/table-v2.js +2 -2
  315. package/lib/components/table-v2/src/table-v2.js.map +1 -1
  316. package/lib/components/tabs/index.d.ts +8 -8
  317. package/lib/components/tabs/index.js +1 -0
  318. package/lib/components/tabs/index.js.map +1 -1
  319. package/lib/components/tabs/src/tab-bar2.js +3 -3
  320. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  321. package/lib/components/tabs/src/tab-nav.d.ts +45 -58
  322. package/lib/components/tabs/src/tab-nav.js +17 -18
  323. package/lib/components/tabs/src/tab-nav.js.map +1 -1
  324. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  325. package/lib/components/tabs/src/tabs.d.ts +12 -12
  326. package/lib/components/tabs/src/tabs.js +8 -8
  327. package/lib/components/tabs/src/tabs.js.map +1 -1
  328. package/lib/components/time-select/index.d.ts +84 -0
  329. package/lib/components/time-select/src/time-select.vue.d.ts +42 -0
  330. package/lib/components/tree/src/model/util.d.ts +3 -1
  331. package/lib/components/tree/src/model/util.js +9 -0
  332. package/lib/components/tree/src/model/util.js.map +1 -1
  333. package/lib/components/tree/src/tree-node.js +1 -3
  334. package/lib/components/tree/src/tree-node.js.map +1 -1
  335. package/lib/components/tree/src/tree.js +2 -12
  336. package/lib/components/tree/src/tree.js.map +1 -1
  337. package/lib/hooks/use-popper-container/index.js +4 -1
  338. package/lib/hooks/use-popper-container/index.js.map +1 -1
  339. package/lib/index.js +1 -0
  340. package/lib/index.js.map +1 -1
  341. package/lib/utils/index.js +1 -4
  342. package/lib/utils/index.js.map +1 -1
  343. package/lib/utils/strings.d.ts +2 -1
  344. package/lib/utils/strings.js +2 -4
  345. package/lib/utils/strings.js.map +1 -1
  346. package/lib/version.d.ts +1 -1
  347. package/lib/version.js +1 -1
  348. package/lib/version.js.map +1 -1
  349. package/package.json +2 -2
  350. package/tags.json +1 -1
  351. package/theme-chalk/el-select-v2.css +1 -1
  352. package/theme-chalk/el-select.css +1 -1
  353. package/theme-chalk/index.css +1 -1
  354. package/theme-chalk/src/select-v2.scss +1 -0
  355. package/theme-chalk/src/select.scss +7 -3
  356. package/web-types.json +1 -1
  357. package/es/components/popper/src/container.d.ts +0 -3
  358. package/es/components/popper/src/container.mjs +0 -23
  359. package/es/components/popper/src/container.mjs.map +0 -1
  360. package/lib/components/popper/src/container.d.ts +0 -3
  361. package/lib/components/popper/src/container.js +0 -29
  362. package/lib/components/popper/src/container.js.map +0 -1
package/es/index.mjs CHANGED
@@ -143,7 +143,7 @@ export { tableV2RowProps } from './components/table-v2/src/row.mjs';
143
143
  export { ElAutoResizer, ElTableV2 } from './components/table-v2/index.mjs';
144
144
  export { tabsEmits, tabsProps } from './components/tabs/src/tabs.mjs';
145
145
  export { tabBarProps } from './components/tabs/src/tab-bar.mjs';
146
- export { tabNavProps } from './components/tabs/src/tab-nav.mjs';
146
+ export { tabNavEmits, tabNavProps } from './components/tabs/src/tab-nav.mjs';
147
147
  export { tabPaneProps } from './components/tabs/src/tab-pane.mjs';
148
148
  export { ElTabPane, ElTabs } from './components/tabs/index.mjs';
149
149
  export { tagEmits, tagProps } from './components/tag/src/tag.mjs';
@@ -9,7 +9,7 @@ export { isKorean } from './i18n.mjs';
9
9
  export { entriesOf, getProp, keysOf } from './objects.mjs';
10
10
  export { cAF, rAF } from './raf.mjs';
11
11
  export { generateId, getRandomInt } from './rand.mjs';
12
- export { escapeStringRegexp } from './strings.mjs';
12
+ export { capitalize, escapeStringRegexp } from './strings.mjs';
13
13
  export { isElement, isEmpty, isPropAbsent, isUndefined } from './types.mjs';
14
14
  export { mutable } from './typescript.mjs';
15
15
  export { attemptFocus, focusNode, getSibling, isFocusable, isLeaf, isVisible, obtainAllFocusableElements, triggerEvent } from './dom/aria.mjs';
@@ -26,7 +26,7 @@ export { getComponentSize } from './vue/size.mjs';
26
26
  export { isValidComponentSize, isValidDatePickType } from './vue/validator.mjs';
27
27
  export { PatchFlags, ensureOnlyChild, getFirstValidNode, getNormalizedProps, isComment, isFragment, isTemplate, isText, isValidElementNode, renderBlock, renderIf } from './vue/vnode.mjs';
28
28
  export { castArray as ensureArray } from 'lodash-unified';
29
- export { NOOP, camelize, capitalize, hasOwn, hyphenate, isArray, isDate, isFunction, isObject, isPromise, isString, isSymbol, hyphenate as kebabCase } from '@vue/shared';
29
+ export { NOOP, camelize, hasOwn, hyphenate, isArray, isDate, isFunction, isObject, isPromise, isString, isSymbol, hyphenate as kebabCase } from '@vue/shared';
30
30
  export { isBoolean, isNumber } from '@vueuse/core';
31
31
  export { isVNode } from 'vue';
32
32
  //# sourceMappingURL=index.mjs.map
@@ -1,5 +1,6 @@
1
- export { camelize, capitalize, hyphenate, hyphenate as kebabCase, } from '@vue/shared';
1
+ export { camelize, hyphenate, hyphenate as kebabCase, } from '@vue/shared';
2
2
  /**
3
3
  * fork from {@link https://github.com/sindresorhus/escape-string-regexp}
4
4
  */
5
5
  export declare const escapeStringRegexp: (string?: string) => string;
6
+ export declare const capitalize: <T extends string>(str: T) => Capitalize<T>;
@@ -1,6 +1,8 @@
1
- export { camelize, capitalize, hyphenate, hyphenate as kebabCase } from '@vue/shared';
1
+ import { capitalize as capitalize$1 } from '@vue/shared';
2
+ export { camelize, hyphenate, hyphenate as kebabCase } from '@vue/shared';
2
3
 
3
4
  const escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
5
+ const capitalize = (str) => capitalize$1(str);
4
6
 
5
- export { escapeStringRegexp };
7
+ export { capitalize, escapeStringRegexp };
6
8
  //# sourceMappingURL=strings.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"strings.mjs","sources":["../../../../packages/utils/strings.ts"],"sourcesContent":["export {\n camelize,\n capitalize,\n hyphenate,\n hyphenate as kebabCase, // alias\n} from '@vue/shared'\n\n/**\n * fork from {@link https://github.com/sindresorhus/escape-string-regexp}\n */\nexport const escapeStringRegexp = (string = '') =>\n string.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d')\n"],"names":[],"mappings":";;AAMY,MAAC,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,KAAK,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO;;;;"}
1
+ {"version":3,"file":"strings.mjs","sources":["../../../../packages/utils/strings.ts"],"sourcesContent":["import { capitalize as toCapitalize } from '@vue/shared'\nexport {\n camelize,\n hyphenate,\n hyphenate as kebabCase, // alias\n} from '@vue/shared'\n\n/**\n * fork from {@link https://github.com/sindresorhus/escape-string-regexp}\n */\nexport const escapeStringRegexp = (string = '') =>\n string.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d')\n\n// NOTE: improve capitalize types. Restore previous code after the [PR](https://github.com/vuejs/core/pull/6212) merge\nexport const capitalize = <T extends string>(str: T) =>\n toCapitalize(str) as Capitalize<T>\n"],"names":["toCapitalize"],"mappings":";;;AAMY,MAAC,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,KAAK,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE;AAC5G,MAAC,UAAU,GAAG,CAAC,GAAG,KAAKA,YAAY,CAAC,GAAG;;;;"}
package/es/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.0.20220904";
1
+ export declare const version = "0.0.20220907";
package/es/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const version = "0.0.20220904";
1
+ const version = "0.0.20220907";
2
2
 
3
3
  export { version };
4
4
  //# sourceMappingURL=version.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20220904'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20220907'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var shared = require('@vue/shared');
6
6
  require('../../../utils/index.js');
7
7
  var types = require('../../../utils/types.js');
8
+ var strings = require('../../../utils/strings.js');
8
9
 
9
10
  let uid = 0;
10
11
  const calculatePathNodes = (node) => {
@@ -71,7 +72,7 @@ class Node {
71
72
  return text;
72
73
  }
73
74
  broadcast(event, ...args) {
74
- const handlerName = `onParent${shared.capitalize(event)}`;
75
+ const handlerName = `onParent${strings.capitalize(event)}`;
75
76
  this.children.forEach((child) => {
76
77
  if (child) {
77
78
  child.broadcast(event, ...args);
@@ -81,7 +82,7 @@ class Node {
81
82
  }
82
83
  emit(event, ...args) {
83
84
  const { parent } = this;
84
- const handlerName = `onChild${shared.capitalize(event)}`;
85
+ const handlerName = `onChild${strings.capitalize(event)}`;
85
86
  if (parent) {
86
87
  parent[handlerName] && parent[handlerName](...args);
87
88
  parent.emit(event, ...args);
@@ -1 +1 @@
1
- {"version":3,"file":"node.js","sources":["../../../../../../packages/components/cascader-panel/src/node.ts"],"sourcesContent":["// @ts-nocheck\nimport { isFunction } from '@vue/shared'\nimport { capitalize, isEmpty, isUndefined } from '@element-plus/utils'\nimport type { VNode } from 'vue'\n\nexport type CascaderNodeValue = string | number\nexport type CascaderNodePathValue = CascaderNodeValue[]\nexport type CascaderValue =\n | CascaderNodeValue\n | CascaderNodePathValue\n | (CascaderNodeValue | CascaderNodePathValue)[]\nexport type CascaderConfig = Required<CascaderProps>\nexport type ExpandTrigger = 'click' | 'hover'\nexport type isDisabled = (data: CascaderOption, node: Node) => boolean\nexport type isLeaf = (data: CascaderOption, node: Node) => boolean\nexport type Resolve = (dataList?: CascaderOption[]) => void\nexport type LazyLoad = (node: Node, resolve: Resolve) => void\nexport type RenderLabel = ({\n node: Node,\n data: CascaderOption,\n}) => VNode | VNode[]\nexport interface CascaderOption extends Record<string, unknown> {\n label?: string\n value?: CascaderNodeValue\n children?: CascaderOption[]\n disabled?: boolean\n leaf?: boolean\n}\n\nexport interface CascaderProps {\n expandTrigger?: ExpandTrigger\n multiple?: boolean\n checkStrictly?: boolean\n emitPath?: boolean\n lazy?: boolean\n lazyLoad?: LazyLoad\n value?: string\n label?: string\n children?: string\n disabled?: string | isDisabled\n leaf?: string | isLeaf\n hoverThreshold?: number\n}\n\nexport type Nullable<T> = null | T\n\ntype ChildrenData = CascaderOption[] | undefined\n\nlet uid = 0\n\nconst calculatePathNodes = (node: Node) => {\n const nodes = [node]\n let { parent } = node\n\n while (parent) {\n nodes.unshift(parent)\n parent = parent.parent\n }\n\n return nodes\n}\n\nclass Node {\n readonly uid: number = uid++\n readonly level: number\n readonly value: CascaderNodeValue\n readonly label: string\n readonly pathNodes: Node[]\n readonly pathValues: CascaderNodePathValue\n readonly pathLabels: string[]\n\n childrenData: ChildrenData\n children: Node[]\n text: string\n loaded: boolean\n checked = false\n indeterminate = false\n loading = false\n\n constructor(\n readonly data: Nullable<CascaderOption>,\n readonly config: CascaderConfig,\n readonly parent?: Node,\n readonly root = false\n ) {\n const { value: valueKey, label: labelKey, children: childrenKey } = config\n\n const childrenData = data[childrenKey] as ChildrenData\n const pathNodes = calculatePathNodes(this)\n\n this.level = root ? 0 : parent ? parent.level + 1 : 1\n this.value = data[valueKey] as CascaderNodeValue\n this.label = data[labelKey] as string\n this.pathNodes = pathNodes\n this.pathValues = pathNodes.map((node) => node.value)\n this.pathLabels = pathNodes.map((node) => node.label)\n this.childrenData = childrenData\n this.children = (childrenData || []).map(\n (child) => new Node(child, config, this)\n )\n this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData)\n }\n\n get isDisabled(): boolean {\n const { data, parent, config } = this\n const { disabled, checkStrictly } = config\n const isDisabled = isFunction(disabled)\n ? disabled(data, this)\n : !!data[disabled]\n return isDisabled || (!checkStrictly && parent?.isDisabled)\n }\n\n get isLeaf(): boolean {\n const { data, config, childrenData, loaded } = this\n const { lazy, leaf } = config\n const isLeaf = isFunction(leaf) ? leaf(data, this) : data[leaf]\n\n return isUndefined(isLeaf)\n ? lazy && !loaded\n ? false\n : !(Array.isArray(childrenData) && childrenData.length)\n : !!isLeaf\n }\n\n get valueByOption() {\n return this.config.emitPath ? this.pathValues : this.value\n }\n\n appendChild(childData: CascaderOption) {\n const { childrenData, children } = this\n const node = new Node(childData, this.config, this)\n\n if (Array.isArray(childrenData)) {\n childrenData.push(childData)\n } else {\n this.childrenData = [childData]\n }\n\n children.push(node)\n\n return node\n }\n\n calcText(allLevels: boolean, separator: string) {\n const text = allLevels ? this.pathLabels.join(separator) : this.label\n this.text = text\n return text\n }\n\n broadcast(event: string, ...args: unknown[]) {\n const handlerName = `onParent${capitalize(event)}`\n this.children.forEach((child) => {\n if (child) {\n // bottom up\n child.broadcast(event, ...args)\n child[handlerName] && child[handlerName](...args)\n }\n })\n }\n\n emit(event: string, ...args: unknown[]) {\n const { parent } = this\n const handlerName = `onChild${capitalize(event)}`\n if (parent) {\n parent[handlerName] && parent[handlerName](...args)\n parent.emit(event, ...args)\n }\n }\n\n onParentCheck(checked: boolean) {\n if (!this.isDisabled) {\n this.setCheckState(checked)\n }\n }\n\n onChildCheck() {\n const { children } = this\n const validChildren = children.filter((child) => !child.isDisabled)\n const checked = validChildren.length\n ? validChildren.every((child) => child.checked)\n : false\n\n this.setCheckState(checked)\n }\n\n setCheckState(checked: boolean) {\n const totalNum = this.children.length\n const checkedNum = this.children.reduce((c, p) => {\n const num = p.checked ? 1 : p.indeterminate ? 0.5 : 0\n return c + num\n }, 0)\n\n this.checked =\n this.loaded &&\n this.children\n .filter((child) => !child.isDisabled)\n .every((child) => child.loaded && child.checked) &&\n checked\n this.indeterminate =\n this.loaded && checkedNum !== totalNum && checkedNum > 0\n }\n\n doCheck(checked: boolean) {\n if (this.checked === checked) return\n\n const { checkStrictly, multiple } = this.config\n\n if (checkStrictly || !multiple) {\n this.checked = checked\n } else {\n // bottom up to unify the calculation of the indeterminate state\n this.broadcast('check', checked)\n this.setCheckState(checked)\n this.emit('check')\n }\n }\n}\n\nexport default Node\n"],"names":["isEmpty","isFunction","isUndefined","capitalize"],"mappings":";;;;;;;;AAEA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,MAAM,kBAAkB,GAAG,CAAC,IAAI,KAAK;AACrC,EAAE,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC;AACvB,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;AACxB,EAAE,OAAO,MAAM,EAAE;AACjB,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC1B,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC3B,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AACF,MAAM,IAAI,CAAC;AACX,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,GAAG,KAAK,EAAE;AAClD,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,IAAI,IAAI,CAAC,MA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,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;AACtD,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,aAAa,GAAG,GAAG,GAAG,CAAC,CAAC;AAC5D,MAAM,OAAO,CAAC,GAAG,GAAG,CAAC;AACrB,KAAK,EAAE,CAAC,CAAC,CAAC;AACV,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC;AAChJ,IAAI,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,IAAI,UAAU,KAAK,QAAQ,IAAI,UAAU,GAAG,CAAC,CAAC;AAClF,GAAG;AACH,EAAE,OAAO,CAAC,OAAO,EAAE;AACnB,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO;AAChC,MAAM,OAAO;AACb,IAAI,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;AACpD,IAAI,IAAI,aAAa,IAAI,CAAC,QAAQ,EAAE;AACpC,MAAM,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC7B,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACvC,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAClC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACzB,KAAK;AACL,GAAG;AACH;;;;"}
1
+ {"version":3,"file":"node.js","sources":["../../../../../../packages/components/cascader-panel/src/node.ts"],"sourcesContent":["// @ts-nocheck\nimport { isFunction } from '@vue/shared'\nimport { capitalize, isEmpty, isUndefined } from '@element-plus/utils'\nimport type { VNode } from 'vue'\n\nexport type CascaderNodeValue = string | number\nexport type CascaderNodePathValue = CascaderNodeValue[]\nexport type CascaderValue =\n | CascaderNodeValue\n | CascaderNodePathValue\n | (CascaderNodeValue | CascaderNodePathValue)[]\nexport type CascaderConfig = Required<CascaderProps>\nexport type ExpandTrigger = 'click' | 'hover'\nexport type isDisabled = (data: CascaderOption, node: Node) => boolean\nexport type isLeaf = (data: CascaderOption, node: Node) => boolean\nexport type Resolve = (dataList?: CascaderOption[]) => void\nexport type LazyLoad = (node: Node, resolve: Resolve) => void\nexport type RenderLabel = ({\n node: Node,\n data: CascaderOption,\n}) => VNode | VNode[]\nexport interface CascaderOption extends Record<string, unknown> {\n label?: string\n value?: CascaderNodeValue\n children?: CascaderOption[]\n disabled?: boolean\n leaf?: boolean\n}\n\nexport interface CascaderProps {\n expandTrigger?: ExpandTrigger\n multiple?: boolean\n checkStrictly?: boolean\n emitPath?: boolean\n lazy?: boolean\n lazyLoad?: LazyLoad\n value?: string\n label?: string\n children?: string\n disabled?: string | isDisabled\n leaf?: string | isLeaf\n hoverThreshold?: number\n}\n\nexport type Nullable<T> = null | T\n\ntype ChildrenData = CascaderOption[] | undefined\n\nlet uid = 0\n\nconst calculatePathNodes = (node: Node) => {\n const nodes = [node]\n let { parent } = node\n\n while (parent) {\n nodes.unshift(parent)\n parent = parent.parent\n }\n\n return nodes\n}\n\nclass Node {\n readonly uid: number = uid++\n readonly level: number\n readonly value: CascaderNodeValue\n readonly label: string\n readonly pathNodes: Node[]\n readonly pathValues: CascaderNodePathValue\n readonly pathLabels: string[]\n\n childrenData: ChildrenData\n children: Node[]\n text: string\n loaded: boolean\n checked = false\n indeterminate = false\n loading = false\n\n constructor(\n readonly data: Nullable<CascaderOption>,\n readonly config: CascaderConfig,\n readonly parent?: Node,\n readonly root = false\n ) {\n const { value: valueKey, label: labelKey, children: childrenKey } = config\n\n const childrenData = data[childrenKey] as ChildrenData\n const pathNodes = calculatePathNodes(this)\n\n this.level = root ? 0 : parent ? parent.level + 1 : 1\n this.value = data[valueKey] as CascaderNodeValue\n this.label = data[labelKey] as string\n this.pathNodes = pathNodes\n this.pathValues = pathNodes.map((node) => node.value)\n this.pathLabels = pathNodes.map((node) => node.label)\n this.childrenData = childrenData\n this.children = (childrenData || []).map(\n (child) => new Node(child, config, this)\n )\n this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData)\n }\n\n get isDisabled(): boolean {\n const { data, parent, config } = this\n const { disabled, checkStrictly } = config\n const isDisabled = isFunction(disabled)\n ? disabled(data, this)\n : !!data[disabled]\n return isDisabled || (!checkStrictly && parent?.isDisabled)\n }\n\n get isLeaf(): boolean {\n const { data, config, childrenData, loaded } = this\n const { lazy, leaf } = config\n const isLeaf = isFunction(leaf) ? leaf(data, this) : data[leaf]\n\n return isUndefined(isLeaf)\n ? lazy && !loaded\n ? false\n : !(Array.isArray(childrenData) && childrenData.length)\n : !!isLeaf\n }\n\n get valueByOption() {\n return this.config.emitPath ? this.pathValues : this.value\n }\n\n appendChild(childData: CascaderOption) {\n const { childrenData, children } = this\n const node = new Node(childData, this.config, this)\n\n if (Array.isArray(childrenData)) {\n childrenData.push(childData)\n } else {\n this.childrenData = [childData]\n }\n\n children.push(node)\n\n return node\n }\n\n calcText(allLevels: boolean, separator: string) {\n const text = allLevels ? this.pathLabels.join(separator) : this.label\n this.text = text\n return text\n }\n\n broadcast(event: string, ...args: unknown[]) {\n const handlerName = `onParent${capitalize(event)}`\n this.children.forEach((child) => {\n if (child) {\n // bottom up\n child.broadcast(event, ...args)\n child[handlerName] && child[handlerName](...args)\n }\n })\n }\n\n emit(event: string, ...args: unknown[]) {\n const { parent } = this\n const handlerName = `onChild${capitalize(event)}`\n if (parent) {\n parent[handlerName] && parent[handlerName](...args)\n parent.emit(event, ...args)\n }\n }\n\n onParentCheck(checked: boolean) {\n if (!this.isDisabled) {\n this.setCheckState(checked)\n }\n }\n\n onChildCheck() {\n const { children } = this\n const validChildren = children.filter((child) => !child.isDisabled)\n const checked = validChildren.length\n ? validChildren.every((child) => child.checked)\n : false\n\n this.setCheckState(checked)\n }\n\n setCheckState(checked: boolean) {\n const totalNum = this.children.length\n const checkedNum = this.children.reduce((c, p) => {\n const num = p.checked ? 1 : p.indeterminate ? 0.5 : 0\n return c + num\n }, 0)\n\n this.checked =\n this.loaded &&\n this.children\n .filter((child) => !child.isDisabled)\n .every((child) => child.loaded && child.checked) &&\n checked\n this.indeterminate =\n this.loaded && checkedNum !== totalNum && checkedNum > 0\n }\n\n doCheck(checked: boolean) {\n if (this.checked === checked) return\n\n const { checkStrictly, multiple } = this.config\n\n if (checkStrictly || !multiple) {\n this.checked = checked\n } else {\n // bottom up to unify the calculation of the indeterminate state\n this.broadcast('check', checked)\n this.setCheckState(checked)\n this.emit('check')\n }\n }\n}\n\nexport default Node\n"],"names":["isEmpty","isFunction","isUndefined","capitalize"],"mappings":";;;;;;;;;AAEA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,MAAM,kBAAkB,GAAG,CAAC,IAAI,KAAK;AACrC,EAAE,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC;AACvB,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;AACxB,EAAE,OAAO,MAAM,EAAE;AACjB,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC1B,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC3B,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AACF,MAAM,IAAI,CAAC;AACX,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,GAAG,KAAK,EAAE;AAClD,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,IAAI,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AC,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,aAAa,GAAG,GAAG,GAAG,CAAC,CAAC;AAC5D,MAAM,OAAO,CAAC,GAAG,GAAG,CAAC;AACrB,KAAK,EAAE,CAAC,CAAC,CAAC;AACV,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC;AAChJ,IAAI,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,IAAI,UAAU,KAAK,QAAQ,IAAI,UAAU,GAAG,CAAC,CAAC;AAClF,GAAG;AACH,EAAE,OAAO,CAAC,OAAO,EAAE;AACnB,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO;AAChC,MAAM,OAAO;AACb,IAAI,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;AACpD,IAAI,IAAI,aAAa,IAAI,CAAC,QAAQ,EAAE;AACpC,MAAM,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC7B,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACvC,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAClC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACzB,KAAK;AACL,GAAG;AACH;;;;"}
@@ -434,6 +434,7 @@ exports.tableV2RowProps = row$1.tableV2RowProps;
434
434
  exports.tabsEmits = tabs.tabsEmits;
435
435
  exports.tabsProps = tabs.tabsProps;
436
436
  exports.tabBarProps = tabBar.tabBarProps;
437
+ exports.tabNavEmits = tabNav.tabNavEmits;
437
438
  exports.tabNavProps = tabNav.tabNavProps;
438
439
  exports.tabPaneProps = tabPane.tabPaneProps;
439
440
  exports.tagEmits = tag.tagEmits;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -45,23 +45,18 @@ function createLoadingComponent(options) {
45
45
  var _a;
46
46
  if (options.beforeClose && !options.beforeClose())
47
47
  return;
48
- const target = data.parent;
49
- target.vLoadingAddClassList = void 0;
50
48
  afterLeaveFlag.value = true;
51
49
  clearTimeout(afterLeaveTimer);
52
- afterLeaveTimer = window.setTimeout(() => {
53
- if (afterLeaveFlag.value) {
54
- afterLeaveFlag.value = false;
55
- destroySelf();
56
- }
57
- }, 400);
50
+ afterLeaveTimer = window.setTimeout(handleAfterLeave, 400);
58
51
  data.visible = false;
59
52
  (_a = options.closed) == null ? void 0 : _a.call(options);
60
53
  }
61
54
  function handleAfterLeave() {
62
55
  if (!afterLeaveFlag.value)
63
56
  return;
57
+ const target = data.parent;
64
58
  afterLeaveFlag.value = false;
59
+ target.vLoadingAddClassList = void 0;
65
60
  destroySelf();
66
61
  }
67
62
  const elLoadingComponent = {
@@ -1 +1 @@
1
- {"version":3,"file":"loading.js","sources":["../../../../../../packages/components/loading/src/loading.ts"],"sourcesContent":["import {\n Transition,\n createApp,\n createVNode,\n h,\n reactive,\n ref,\n toRefs,\n vShow,\n withCtx,\n withDirectives,\n} from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { removeClass } from '@element-plus/utils'\n\nimport type { LoadingOptionsResolved } from './types'\n\nexport function createLoadingComponent(options: LoadingOptionsResolved) {\n let afterLeaveTimer: number\n\n const ns = useNamespace('loading')\n const afterLeaveFlag = ref(false)\n const data = reactive({\n ...options,\n originalPosition: '',\n originalOverflow: '',\n visible: false,\n })\n\n function setText(text: string) {\n data.text = text\n }\n\n function destroySelf() {\n const target = data.parent\n if (!target.vLoadingAddClassList) {\n let loadingNumber: number | string | null =\n target.getAttribute('loading-number')\n loadingNumber = Number.parseInt(loadingNumber as any) - 1\n if (!loadingNumber) {\n removeClass(target, ns.bm('parent', 'relative'))\n target.removeAttribute('loading-number')\n } else {\n target.setAttribute('loading-number', loadingNumber.toString())\n }\n removeClass(target, ns.bm('parent', 'hidden'))\n }\n removeElLoadingChild()\n loadingInstance.unmount()\n }\n function removeElLoadingChild(): void {\n vm.$el?.parentNode?.removeChild(vm.$el)\n }\n function close() {\n if (options.beforeClose && !options.beforeClose()) return\n\n const target = data.parent\n target.vLoadingAddClassList = undefined\n afterLeaveFlag.value = true\n clearTimeout(afterLeaveTimer)\n\n afterLeaveTimer = window.setTimeout(() => {\n if (afterLeaveFlag.value) {\n afterLeaveFlag.value = false\n destroySelf()\n }\n }, 400)\n data.visible = false\n\n options.closed?.()\n }\n\n function handleAfterLeave() {\n if (!afterLeaveFlag.value) return\n afterLeaveFlag.value = false\n destroySelf()\n }\n\n const elLoadingComponent = {\n name: 'ElLoading',\n setup() {\n return () => {\n const svg = data.spinner || data.svg\n const spinner = h(\n 'svg',\n {\n class: 'circular',\n viewBox: data.svgViewBox ? data.svgViewBox : '25 25 50 50',\n ...(svg ? { innerHTML: svg } : {}),\n },\n [\n h('circle', {\n class: 'path',\n cx: '50',\n cy: '50',\n r: '20',\n fill: 'none',\n }),\n ]\n )\n\n const spinnerText = data.text\n ? h('p', { class: ns.b('text') }, [data.text])\n : undefined\n\n return h(\n Transition,\n {\n name: ns.b('fade'),\n onAfterLeave: handleAfterLeave,\n },\n {\n default: withCtx(() => [\n withDirectives(\n createVNode(\n 'div',\n {\n style: {\n backgroundColor: data.background || '',\n },\n class: [\n ns.b('mask'),\n data.customClass,\n data.fullscreen ? 'is-fullscreen' : '',\n ],\n },\n [\n h(\n 'div',\n {\n class: ns.b('spinner'),\n },\n [spinner, spinnerText]\n ),\n ]\n ),\n [[vShow, data.visible]]\n ),\n ]),\n }\n )\n }\n },\n }\n\n const loadingInstance = createApp(elLoadingComponent)\n const vm = loadingInstance.mount(document.createElement('div'))\n\n return {\n ...toRefs(data),\n setText,\n removeElLoadingChild,\n close,\n handleAfterLeave,\n vm,\n get $el(): HTMLElement {\n return vm.$el\n },\n }\n}\n\nexport type LoadingInstance = ReturnType<typeof createLoadingComponent>\n"],"names":["useNamespace","ref","reactive","removeClass","h","Transition","withCtx","withDirectives","createVNode","vShow","createApp","toRefs"],"mappings":";;;;;;;;;;AAcO,SAAS,sBAAsB,CAAC,OAAO,EAAE;AAChD,EAAE,IAAI,eAAe,CAAC;AACtB,EAAE,MAAM,EAAE,GAAGA,kBAAY,CAAC,SAAS,CAAC,CAAC;AACrC,EAAE,MAAM,cAAc,GAAGC,OAAG,CAAC,KAAK,CAAC,CAAC;AACpC,EAAE,MAAM,IAAI,GAAGC,YAAQ,CAAC;AACxB,IAAI,GAAG,OAAO;AACd,IAAI,gBAAgB,EAAE,EAAE;AACxB,IAAI,gBAAgB,EAAE,EAAE;AACxB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG,CAAC,CAAC;AACL,EAAE,SAAS,OAAO,CAAC,IAAI,EAAE;AACzB,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,GAAG;AACH,EAAE,SAAS,WAAW,GAAG;AACzB,IAAI,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAC/B,IAAI,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE;AACtC,MAAM,IAAI,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;AAChE,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;AACzD,MAAM,IAAI,CAAC,aAAa,EAAE;AAC1B,QAAQC,iBAAW,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AACzD,QAAQ,MAAM,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;AACjD,OAAO,MAAM;AACb,QAAQ,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;;;;"}
1
+ {"version":3,"file":"loading.js","sources":["../../../../../../packages/components/loading/src/loading.ts"],"sourcesContent":["import {\n Transition,\n createApp,\n createVNode,\n h,\n reactive,\n ref,\n toRefs,\n vShow,\n withCtx,\n withDirectives,\n} from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { removeClass } from '@element-plus/utils'\n\nimport type { LoadingOptionsResolved } from './types'\n\nexport function createLoadingComponent(options: LoadingOptionsResolved) {\n let afterLeaveTimer: number\n\n const ns = useNamespace('loading')\n const afterLeaveFlag = ref(false)\n const data = reactive({\n ...options,\n originalPosition: '',\n originalOverflow: '',\n visible: false,\n })\n\n function setText(text: string) {\n data.text = text\n }\n\n function destroySelf() {\n const target = data.parent\n if (!target.vLoadingAddClassList) {\n let loadingNumber: number | string | null =\n target.getAttribute('loading-number')\n loadingNumber = Number.parseInt(loadingNumber as any) - 1\n if (!loadingNumber) {\n removeClass(target, ns.bm('parent', 'relative'))\n target.removeAttribute('loading-number')\n } else {\n target.setAttribute('loading-number', loadingNumber.toString())\n }\n removeClass(target, ns.bm('parent', 'hidden'))\n }\n removeElLoadingChild()\n loadingInstance.unmount()\n }\n function removeElLoadingChild(): void {\n vm.$el?.parentNode?.removeChild(vm.$el)\n }\n function close() {\n if (options.beforeClose && !options.beforeClose()) return\n\n afterLeaveFlag.value = true\n clearTimeout(afterLeaveTimer)\n\n afterLeaveTimer = window.setTimeout(handleAfterLeave, 400)\n data.visible = false\n\n options.closed?.()\n }\n\n function handleAfterLeave() {\n if (!afterLeaveFlag.value) return\n const target = data.parent\n afterLeaveFlag.value = false\n target.vLoadingAddClassList = undefined\n destroySelf()\n }\n\n const elLoadingComponent = {\n name: 'ElLoading',\n setup() {\n return () => {\n const svg = data.spinner || data.svg\n const spinner = h(\n 'svg',\n {\n class: 'circular',\n viewBox: data.svgViewBox ? data.svgViewBox : '25 25 50 50',\n ...(svg ? { innerHTML: svg } : {}),\n },\n [\n h('circle', {\n class: 'path',\n cx: '50',\n cy: '50',\n r: '20',\n fill: 'none',\n }),\n ]\n )\n\n const spinnerText = data.text\n ? h('p', { class: ns.b('text') }, [data.text])\n : undefined\n\n return h(\n Transition,\n {\n name: ns.b('fade'),\n onAfterLeave: handleAfterLeave,\n },\n {\n default: withCtx(() => [\n withDirectives(\n createVNode(\n 'div',\n {\n style: {\n backgroundColor: data.background || '',\n },\n class: [\n ns.b('mask'),\n data.customClass,\n data.fullscreen ? 'is-fullscreen' : '',\n ],\n },\n [\n h(\n 'div',\n {\n class: ns.b('spinner'),\n },\n [spinner, spinnerText]\n ),\n ]\n ),\n [[vShow, data.visible]]\n ),\n ]),\n }\n )\n }\n },\n }\n\n const loadingInstance = createApp(elLoadingComponent)\n const vm = loadingInstance.mount(document.createElement('div'))\n\n return {\n ...toRefs(data),\n setText,\n removeElLoadingChild,\n close,\n handleAfterLeave,\n vm,\n get $el(): HTMLElement {\n return vm.$el\n },\n }\n}\n\nexport type LoadingInstance = ReturnType<typeof createLoadingComponent>\n"],"names":["useNamespace","ref","reactive","removeClass","h","Transition","withCtx","withDirectives","createVNode","vShow","createApp","toRefs"],"mappings":";;;;;;;;;;AAcO,SAAS,sBAAsB,CAAC,OAAO,EAAE;AAChD,EAAE,IAAI,eAAe,CAAC;AACtB,EAAE,MAAM,EAAE,GAAGA,kBAAY,CAAC,SAAS,CAAC,CAAC;AACrC,EAAE,MAAM,cAAc,GAAGC,OAAG,CAAC,KAAK,CAAC,CAAC;AACpC,EAAE,MAAM,IAAI,GAAGC,YAAQ,CAAC;AACxB,IAAI,GAAG,OAAO;AACd,IAAI,gBAAgB,EAAE,EAAE;AACxB,IAAI,gBAAgB,EAAE,EAAE;AACxB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG,CAAC,CAAC;AACL,EAAE,SAAS,OAAO,CAAC,IAAI,EAAE;AACzB,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,GAAG;AACH,EAAE,SAAS,WAAW,GAAG;AACzB,IAAI,MAAM,MAA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AC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAClE,EAAE,OAAO;AACT,IAAI,GAAGC,UAAM,CAAC,IAAI,CAAC;AACnB,IAAI,OAAO;AACX,IAAI,oBAAoB;AACxB,IAAI,KAAK;AACT,IAAI,gBAAgB;AACpB,IAAI,EAAE;AACN,IAAI,IAAI,GAAG,GAAG;AACd,MAAM,OAAO,EAAE,CAAC,GAAG,CAAC;AACpB,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
@@ -59,7 +59,9 @@ const createMessage = ({ appendTo, ...options }, context) => {
59
59
  vue.render(null, container);
60
60
  }
61
61
  };
62
- const vnode = vue.createVNode(message$2["default"], props, shared.isFunction(props.message) || vue.isVNode(props.message) ? { default: props.message } : null);
62
+ const vnode = vue.createVNode(message$2["default"], props, shared.isFunction(props.message) || vue.isVNode(props.message) ? {
63
+ default: shared.isFunction(props.message) ? props.message : () => props.message
64
+ } : null);
63
65
  vnode.appContext = context || message._context;
64
66
  vue.render(vnode, container);
65
67
  appendTo.appendChild(container.firstElementChild);
@@ -1 +1 @@
1
- {"version":3,"file":"method.js","sources":["../../../../../../packages/components/message/src/method.ts"],"sourcesContent":["import { createVNode, render } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport {\n debugWarn,\n isElement,\n isFunction,\n isNumber,\n isString,\n isVNode,\n} from '@element-plus/utils'\nimport { useZIndex } from '@element-plus/hooks'\nimport { messageConfig } from '@element-plus/components/config-provider/src/config-provider'\nimport MessageConstructor from './message.vue'\nimport { messageDefaults, messageTypes } from './message'\nimport { instances } from './instance'\n\nimport type { MessageContext } from './instance'\nimport type { AppContext } from 'vue'\nimport type {\n Message,\n MessageFn,\n MessageHandler,\n MessageOptions,\n MessageParams,\n MessageParamsNormalized,\n messageType,\n} from './message'\n\nlet seed = 1\n\n// TODO: Since Notify.ts is basically the same like this file. So we could do some encapsulation against them to reduce code duplication.\n\nconst normalizeOptions = (params?: MessageParams) => {\n const options: MessageOptions =\n !params || isString(params) || isVNode(params) || isFunction(params)\n ? { message: params }\n : params\n\n const normalized = {\n ...messageDefaults,\n ...options,\n }\n\n if (!normalized.appendTo) {\n normalized.appendTo = document.body\n } else if (isString(normalized.appendTo)) {\n let appendTo = document.querySelector<HTMLElement>(normalized.appendTo)\n\n // should fallback to default value with a warning\n if (!isElement(appendTo)) {\n debugWarn(\n 'ElMessage',\n 'the appendTo option is not an HTMLElement. Falling back to document.body.'\n )\n appendTo = document.body\n }\n\n normalized.appendTo = appendTo\n }\n\n return normalized as MessageParamsNormalized\n}\n\nconst closeMessage = (instance: MessageContext) => {\n const idx = instances.indexOf(instance)\n if (idx === -1) return\n\n instances.splice(idx, 1)\n const { handler } = instance\n handler.close()\n}\n\nconst createMessage = (\n { appendTo, ...options }: MessageParamsNormalized,\n context?: AppContext | null\n): MessageContext => {\n const { nextZIndex } = useZIndex()\n\n const id = `message_${seed++}`\n const userOnClose = options.onClose\n\n const container = document.createElement('div')\n\n const props = {\n ...options,\n zIndex: nextZIndex() + options.zIndex,\n id,\n onClose: () => {\n userOnClose?.()\n closeMessage(instance)\n },\n\n // clean message element preventing mem leak\n onDestroy: () => {\n // since the element is destroy, then the VNode should be collected by GC as well\n // we do not want cause any mem leak because we have returned vm as a reference to users\n // so that we manually set it to false.\n render(null, container)\n },\n }\n const vnode = createVNode(\n MessageConstructor,\n props,\n isFunction(props.message) || isVNode(props.message)\n ? { default: props.message }\n : null\n )\n vnode.appContext = context || message._context\n\n render(vnode, container)\n // instances will remove this item when close function gets called. So we do not need to worry about it.\n appendTo.appendChild(container.firstElementChild!)\n\n const vm = vnode.component!\n\n const handler: MessageHandler = {\n // instead of calling the onClose function directly, setting this value so that we can have the full lifecycle\n // for out component, so that all closing steps will not be skipped.\n close: () => {\n vm.exposed!.visible.value = false\n },\n }\n\n const instance: MessageContext = {\n id,\n vnode,\n vm,\n handler,\n props: (vnode.component as any).props,\n }\n\n return instance\n}\n\nconst message: MessageFn &\n Partial<Message> & { _context: AppContext | null } = (\n options = {},\n context\n) => {\n if (!isClient) return { close: () => undefined }\n\n if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {\n return { close: () => undefined }\n }\n\n const normalized = normalizeOptions(options)\n\n if (normalized.grouping && instances.length) {\n const instance = instances.find(\n ({ vnode: vm }) => vm.props?.message === normalized.message\n )\n if (instance) {\n instance.props.repeatNum += 1\n instance.props.type = normalized.type\n return instance.handler\n }\n }\n\n const instance = createMessage(normalized, context)\n\n instances.push(instance)\n return instance.handler\n}\n\nmessageTypes.forEach((type) => {\n message[type] = (options = {}, appContext) => {\n const normalized = normalizeOptions(options)\n return message({ ...normalized, type }, appContext)\n }\n})\n\nexport function closeAll(type?: messageType): void {\n for (const instance of instances) {\n if (!type || type === instance.props.type) {\n instance.handler.close()\n }\n }\n}\n\nmessage.closeAll = closeAll\nmessage._context = null\n\nexport default message as Message\n"],"names":["isString","isVNode","isFunction","messageDefaults","isElement","debugWarn","instance","instances","useZIndex","render","createVNode","MessageConstructor","isClient","isNumber","messageConfig","messageTypes"],"mappings":";;;;;;;;;;;;;;;;;AAeA,IAAI,IAAI,GAAG,CAAC,CAAC;AACb,MAAM,gBAAgB,GAAG,CAAC,MAAM,KAAK;AACrC,EAAE,MAAM,OAAO,GAAG,CAAC,MAAM,IAAIA,eAAQ,CAAC,MAAM,CAAC,IAAIC,WAAO,CAAC,MAAM,CAAC,IAAIC,iBAAU,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;AACtH,EAAE,MAAM,UAAU,GAAG;AACrB,IAAI,GAAGC,yBAAe;AACtB,IAAI,GAAG,OAAO;AACd,GAAG,CAAC;AACJ,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;AAC5B,IAAI,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AACxC,GAAG,MAAM,IAAIH,eAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;A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AAK;AAChD,IAAI,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AACjD,IAAI,OAAO,OAAO,CAAC,EAAE,GAAG,UAAU,EAAE,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC;AACxD,GAAG,CAAC;AACJ,CAAC,CAAC,CAAC;AACI,SAAS,QAAQ,CAAC,IAAI,EAAE;AAC/B,EAAE,KAAK,MAAMT,UAAQ,IAAIC,kBAAS,EAAE;AACpC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,KAAKD,UAAQ,CAAC,KAAK,CAAC,IAAI,EAAE;AAC/C,MAAMA,UAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;AAC/B,KAAK;AACL,GAAG;AACH,CAAC;AACD,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5B,OAAO,CAAC,QAAQ,GAAG,IAAI;;;;;"}
1
+ {"version":3,"file":"method.js","sources":["../../../../../../packages/components/message/src/method.ts"],"sourcesContent":["import { createVNode, render } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport {\n debugWarn,\n isElement,\n isFunction,\n isNumber,\n isString,\n isVNode,\n} from '@element-plus/utils'\nimport { useZIndex } from '@element-plus/hooks'\nimport { messageConfig } from '@element-plus/components/config-provider/src/config-provider'\nimport MessageConstructor from './message.vue'\nimport { messageDefaults, messageTypes } from './message'\nimport { instances } from './instance'\n\nimport type { MessageContext } from './instance'\nimport type { AppContext } from 'vue'\nimport type {\n Message,\n MessageFn,\n MessageHandler,\n MessageOptions,\n MessageParams,\n MessageParamsNormalized,\n messageType,\n} from './message'\n\nlet seed = 1\n\n// TODO: Since Notify.ts is basically the same like this file. So we could do some encapsulation against them to reduce code duplication.\n\nconst normalizeOptions = (params?: MessageParams) => {\n const options: MessageOptions =\n !params || isString(params) || isVNode(params) || isFunction(params)\n ? { message: params }\n : params\n\n const normalized = {\n ...messageDefaults,\n ...options,\n }\n\n if (!normalized.appendTo) {\n normalized.appendTo = document.body\n } else if (isString(normalized.appendTo)) {\n let appendTo = document.querySelector<HTMLElement>(normalized.appendTo)\n\n // should fallback to default value with a warning\n if (!isElement(appendTo)) {\n debugWarn(\n 'ElMessage',\n 'the appendTo option is not an HTMLElement. Falling back to document.body.'\n )\n appendTo = document.body\n }\n\n normalized.appendTo = appendTo\n }\n\n return normalized as MessageParamsNormalized\n}\n\nconst closeMessage = (instance: MessageContext) => {\n const idx = instances.indexOf(instance)\n if (idx === -1) return\n\n instances.splice(idx, 1)\n const { handler } = instance\n handler.close()\n}\n\nconst createMessage = (\n { appendTo, ...options }: MessageParamsNormalized,\n context?: AppContext | null\n): MessageContext => {\n const { nextZIndex } = useZIndex()\n\n const id = `message_${seed++}`\n const userOnClose = options.onClose\n\n const container = document.createElement('div')\n\n const props = {\n ...options,\n zIndex: nextZIndex() + options.zIndex,\n id,\n onClose: () => {\n userOnClose?.()\n closeMessage(instance)\n },\n\n // clean message element preventing mem leak\n onDestroy: () => {\n // since the element is destroy, then the VNode should be collected by GC as well\n // we do not want cause any mem leak because we have returned vm as a reference to users\n // so that we manually set it to false.\n render(null, container)\n },\n }\n const vnode = createVNode(\n MessageConstructor,\n props,\n isFunction(props.message) || isVNode(props.message)\n ? {\n default: isFunction(props.message)\n ? props.message\n : () => props.message,\n }\n : null\n )\n vnode.appContext = context || message._context\n\n render(vnode, container)\n // instances will remove this item when close function gets called. So we do not need to worry about it.\n appendTo.appendChild(container.firstElementChild!)\n\n const vm = vnode.component!\n\n const handler: MessageHandler = {\n // instead of calling the onClose function directly, setting this value so that we can have the full lifecycle\n // for out component, so that all closing steps will not be skipped.\n close: () => {\n vm.exposed!.visible.value = false\n },\n }\n\n const instance: MessageContext = {\n id,\n vnode,\n vm,\n handler,\n props: (vnode.component as any).props,\n }\n\n return instance\n}\n\nconst message: MessageFn &\n Partial<Message> & { _context: AppContext | null } = (\n options = {},\n context\n) => {\n if (!isClient) return { close: () => undefined }\n\n if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {\n return { close: () => undefined }\n }\n\n const normalized = normalizeOptions(options)\n\n if (normalized.grouping && instances.length) {\n const instance = instances.find(\n ({ vnode: vm }) => vm.props?.message === normalized.message\n )\n if (instance) {\n instance.props.repeatNum += 1\n instance.props.type = normalized.type\n return instance.handler\n }\n }\n\n const instance = createMessage(normalized, context)\n\n instances.push(instance)\n return instance.handler\n}\n\nmessageTypes.forEach((type) => {\n message[type] = (options = {}, appContext) => {\n const normalized = normalizeOptions(options)\n return message({ ...normalized, type }, appContext)\n }\n})\n\nexport function closeAll(type?: messageType): void {\n for (const instance of instances) {\n if (!type || type === instance.props.type) {\n instance.handler.close()\n }\n }\n}\n\nmessage.closeAll = closeAll\nmessage._context = null\n\nexport default message as Message\n"],"names":["isString","isVNode","isFunction","messageDefaults","isElement","debugWarn","instance","instances","useZIndex","render","createVNode","MessageConstructor","isClient","isNumber","messageConfig","messageTypes"],"mappings":";;;;;;;;;;;;;;;;;AAeA,IAAI,IAAI,GAAG,CAAC,CAAC;AACb,MAAM,gBAAgB,GAAG,CAAC,MAAM,KAAK;AACrC,EAAE,MAAM,OAAO,GAAG,CAAC,MAAM,IAAIA,eAAQ,CAAC,MAAM,CAAC,IAAIC,WAAO,CAAC,MAAM,CAAC,IAAIC,iBAAU,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;AACtH,EAAE,MAAM,UAAU,GAAG;AACrB,IAAI,GAAGC,yBAAe;AACtB,IAAI,GAAG,OAAO;AACd,GAAG,CAAC;AACJ,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;AAC5B,IAAI,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AACxC,GAAG,MAAM,IAAIH,eAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AAC5C,IAAI,IAAI,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC/D,IAA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AAI,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AACjD,IAAI,OAAO,OAAO,CAAC,EAAE,GAAG,UAAU,EAAE,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC;AACxD,GAAG,CAAC;AACJ,CAAC,CAAC,CAAC;AACI,SAAS,QAAQ,CAAC,IAAI,EAAE;AAC/B,EAAE,KAAK,MAAMT,UAAQ,IAAIC,kBAAS,EAAE;AACpC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,KAAKD,UAAQ,CAAC,KAAK,CAAC,IAAI,EAAE;AAC/C,MAAMA,UAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;AAC/B,KAAK;AACL,GAAG;AACH,CAAC;AACD,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5B,OAAO,CAAC,QAAQ,GAAG,IAAI;;;;;"}
@@ -203,6 +203,14 @@ declare const _default: import("vue").DefineComponent<{
203
203
  type: BooleanConstructor;
204
204
  default: boolean;
205
205
  };
206
+ remoteShowSuffix: {
207
+ type: BooleanConstructor;
208
+ default: boolean;
209
+ };
210
+ suffixTransition: {
211
+ type: BooleanConstructor;
212
+ default: boolean;
213
+ };
206
214
  placement: {
207
215
  type: StringConstructor;
208
216
  values: import("@popperjs/core").Placement[];
@@ -9366,6 +9374,9 @@ declare const _default: import("vue").DefineComponent<{
9366
9374
  cssVarBlock: (object: Record<string, string>) => Record<string, string>;
9367
9375
  cssVarBlockName: (name: string) => string;
9368
9376
  };
9377
+ tagTextStyle: import("vue").ComputedRef<{
9378
+ maxWidth: string;
9379
+ }>;
9369
9380
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "clear" | "focus" | "blur" | "visible-change" | "remove-tag")[], "update:modelValue" | "change" | "focus" | "blur" | "clear" | "visible-change" | "remove-tag", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9370
9381
  name: StringConstructor;
9371
9382
  id: StringConstructor;
@@ -9451,6 +9462,14 @@ declare const _default: import("vue").DefineComponent<{
9451
9462
  type: BooleanConstructor;
9452
9463
  default: boolean;
9453
9464
  };
9465
+ remoteShowSuffix: {
9466
+ type: BooleanConstructor;
9467
+ default: boolean;
9468
+ };
9469
+ suffixTransition: {
9470
+ type: BooleanConstructor;
9471
+ default: boolean;
9472
+ };
9454
9473
  placement: {
9455
9474
  type: StringConstructor;
9456
9475
  values: import("@popperjs/core").Placement[];
@@ -9491,6 +9510,8 @@ declare const _default: import("vue").DefineComponent<{
9491
9510
  multipleLimit: number;
9492
9511
  defaultFirstOption: boolean;
9493
9512
  reserveKeyword: boolean;
9513
+ remoteShowSuffix: boolean;
9514
+ suffixTransition: boolean;
9494
9515
  }>> & {
9495
9516
  Option: import("vue").DefineComponent<{
9496
9517
  value: {
@@ -145,7 +145,9 @@ export declare const ElRate: import("element-plus/es/utils").SFCWithInstall<impo
145
145
  color: string;
146
146
  width: string;
147
147
  }>;
148
- componentMap: import("vue").ComputedRef<Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>>;
148
+ componentMap: import("vue").ComputedRef<{
149
+ [x: number]: string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
150
+ }>;
149
151
  decimalIconComponent: import("vue").ComputedRef<string | import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any> | import("vue").FunctionalComponent<any, any> | {
150
152
  new (...args: any[]): any;
151
153
  __isFragment?: undefined;
@@ -160,7 +162,7 @@ export declare const ElRate: import("element-plus/es/utils").SFCWithInstall<impo
160
162
  __isSuspense?: undefined;
161
163
  };
162
164
  }>;
163
- voidComponent: import("vue").ComputedRef<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
165
+ voidComponent: import("vue").ComputedRef<string | import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>>;
164
166
  activeComponent: import("vue").ComputedRef<string | import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any> | import("vue").FunctionalComponent<any, any> | {
165
167
  new (...args: any[]): any;
166
168
  __isFragment?: undefined;
@@ -175,7 +177,6 @@ export declare const ElRate: import("element-plus/es/utils").SFCWithInstall<impo
175
177
  __isSuspense?: undefined;
176
178
  };
177
179
  }>;
178
- iconComponents: import("vue").ComputedRef<unknown[]>;
179
180
  showDecimalIcon: (item: number) => boolean | undefined;
180
181
  selectValue: (value: number) => void;
181
182
  handleKey: (e: KeyboardEvent) => number | undefined;
@@ -1,4 +1,4 @@
1
- import { type CSSProperties } from 'vue';
1
+ import type { CSSProperties, Component } from 'vue';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  readonly modelValue: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
4
4
  readonly id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
@@ -8,9 +8,9 @@ declare const _default: import("vue").DefineComponent<{
8
8
  readonly colors: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[] | Record<number, string>) | (() => string[] | Record<number, string>) | ((new (...args: any[]) => string[] | Record<number, string>) | (() => string[] | Record<number, string>))[], unknown, unknown, () => ["", "", ""], boolean>;
9
9
  readonly voidColor: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
10
10
  readonly disabledVoidColor: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
11
- readonly icons: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>[], boolean>;
12
- readonly voidIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
13
- readonly disabledVoidIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
11
+ readonly icons: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>[], boolean>;
12
+ readonly voidIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
13
+ readonly disabledVoidIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
14
14
  readonly disabled: {
15
15
  readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>>;
16
16
  readonly required: false;
@@ -62,9 +62,9 @@ declare const _default: import("vue").DefineComponent<{
62
62
  readonly colors: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[] | Record<number, string>) | (() => string[] | Record<number, string>) | ((new (...args: any[]) => string[] | Record<number, string>) | (() => string[] | Record<number, string>))[], unknown, unknown, () => ["", "", ""], boolean>;
63
63
  readonly voidColor: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
64
64
  readonly disabledVoidColor: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
65
- readonly icons: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>[], boolean>;
66
- readonly voidIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
67
- readonly disabledVoidIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
65
+ readonly icons: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>[], boolean>;
66
+ readonly voidIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
67
+ readonly disabledVoidIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
68
68
  readonly disabled: {
69
69
  readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>>;
70
70
  readonly required: false;
@@ -146,7 +146,9 @@ declare const _default: import("vue").DefineComponent<{
146
146
  color: string;
147
147
  width: string;
148
148
  }>;
149
- componentMap: import("vue").ComputedRef<Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>>;
149
+ componentMap: import("vue").ComputedRef<{
150
+ [x: number]: string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
151
+ }>;
150
152
  decimalIconComponent: import("vue").ComputedRef<string | import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any> | import("vue").FunctionalComponent<any, any> | {
151
153
  new (...args: any[]): any;
152
154
  __isFragment?: undefined;
@@ -161,7 +163,7 @@ declare const _default: import("vue").DefineComponent<{
161
163
  __isSuspense?: undefined;
162
164
  };
163
165
  }>;
164
- voidComponent: import("vue").ComputedRef<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
166
+ voidComponent: import("vue").ComputedRef<string | import("vue").PropType<string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>>;
165
167
  activeComponent: import("vue").ComputedRef<string | import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any> | import("vue").FunctionalComponent<any, any> | {
166
168
  new (...args: any[]): any;
167
169
  __isFragment?: undefined;
@@ -176,7 +178,6 @@ declare const _default: import("vue").DefineComponent<{
176
178
  __isSuspense?: undefined;
177
179
  };
178
180
  }>;
179
- iconComponents: import("vue").ComputedRef<unknown[]>;
180
181
  showDecimalIcon: (item: number) => boolean | undefined;
181
182
  selectValue: (value: number) => void;
182
183
  handleKey: (e: KeyboardEvent) => number | undefined;
@@ -257,9 +258,9 @@ declare const _default: import("vue").DefineComponent<{
257
258
  readonly colors: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[] | Record<number, string>) | (() => string[] | Record<number, string>) | ((new (...args: any[]) => string[] | Record<number, string>) | (() => string[] | Record<number, string>))[], unknown, unknown, () => ["", "", ""], boolean>;
258
259
  readonly voidColor: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
259
260
  readonly disabledVoidColor: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
260
- readonly icons: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>[], boolean>;
261
- readonly voidIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
262
- readonly disabledVoidIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
261
+ readonly icons: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>[], boolean>;
262
+ readonly voidIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
263
+ readonly disabledVoidIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, () => import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
263
264
  readonly disabled: {
264
265
  readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>>;
265
266
  readonly required: false;
@@ -308,9 +309,9 @@ declare const _default: import("vue").DefineComponent<{
308
309
  readonly highThreshold: number;
309
310
  readonly voidColor: string;
310
311
  readonly disabledVoidColor: string;
311
- readonly icons: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>))[], unknown, unknown>;
312
- readonly voidIcon: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
313
- readonly disabledVoidIcon: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
312
+ readonly icons: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>) | (() => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>)[] | Record<number, string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>))[], unknown, unknown>;
313
+ readonly voidIcon: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
314
+ readonly disabledVoidIcon: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
314
315
  readonly texts: string[];
315
316
  readonly scoreTemplate: string;
316
317
  }>;
@@ -90,24 +90,21 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
90
90
  width
91
91
  };
92
92
  });
93
- const componentMap = vue.computed(() => shared.isArray(props.icons) ? {
94
- [props.lowThreshold]: props.icons[0],
95
- [props.highThreshold]: {
96
- value: props.icons[1],
97
- excluded: true
98
- },
99
- [props.max]: props.icons[2]
100
- } : props.icons);
93
+ const componentMap = vue.computed(() => {
94
+ let icons = shared.isArray(props.icons) ? [...props.icons] : { ...props.icons };
95
+ icons = vue.markRaw(icons);
96
+ return shared.isArray(icons) ? {
97
+ [props.lowThreshold]: icons[0],
98
+ [props.highThreshold]: {
99
+ value: icons[1],
100
+ excluded: true
101
+ },
102
+ [props.max]: icons[2]
103
+ } : icons;
104
+ });
101
105
  const decimalIconComponent = vue.computed(() => getValueFromMap(props.modelValue, componentMap.value));
102
- const voidComponent = vue.computed(() => rateDisabled.value ? props.disabledVoidIcon : props.voidIcon);
106
+ const voidComponent = vue.computed(() => rateDisabled.value ? shared.isString(props.disabledVoidIcon) ? props.disabledVoidIcon : vue.markRaw(props.disabledVoidIcon) : shared.isString(props.voidIcon) ? props.voidIcon : vue.markRaw(props.voidIcon));
103
107
  const activeComponent = vue.computed(() => getValueFromMap(currentValue.value, componentMap.value));
104
- const iconComponents = vue.computed(() => {
105
- const result = Array.from({ length: props.max });
106
- const threshold = currentValue.value;
107
- result.fill(activeComponent.value, 0, threshold);
108
- result.fill(voidComponent.value, threshold, props.max);
109
- return result;
110
- });
111
108
  function showDecimalIcon(item) {
112
109
  const showWhenDisabled = rateDisabled.value && valueDecimal.value > 0 && item - 1 < props.modelValue && item > props.modelValue;
113
110
  const showWhenAllowHalf = props.allowHalf && pointerAtLeftHalf.value && item - 0.5 <= currentValue.value && item > currentValue.value;
@@ -230,7 +227,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
230
227
  ])
231
228
  }, {
232
229
  default: vue.withCtx(() => [
233
- !showDecimalIcon(item) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponents)[item - 1]), { key: 0 })) : vue.createCommentVNode("v-if", true),
230
+ !showDecimalIcon(item) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
231
+ vue.withDirectives((vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(activeComponent)), null, null, 512)), [
232
+ [vue.vShow, item <= currentValue.value]
233
+ ]),
234
+ vue.withDirectives((vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(voidComponent)), null, null, 512)), [
235
+ [vue.vShow, !(item <= currentValue.value)]
236
+ ])
237
+ ], 64)) : vue.createCommentVNode("v-if", true),
234
238
  showDecimalIcon(item) ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElIcon), {
235
239
  key: 1,
236
240
  style: vue.normalizeStyle(vue.unref(decimalStyle)),