@silver-formily/element-plus 3.0.2 → 3.0.3

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 (539) hide show
  1. package/README.en-US.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/__builtins__/configs/index.mjs +6 -5
  4. package/esm/__builtins__/configs/index.mjs.map +1 -1
  5. package/esm/__builtins__/shared/load-config-provider.mjs +19 -11
  6. package/esm/__builtins__/shared/load-config-provider.mjs.map +1 -1
  7. package/esm/__builtins__/shared/loading.mjs +50 -46
  8. package/esm/__builtins__/shared/loading.mjs.map +1 -1
  9. package/esm/__builtins__/shared/simple-version-compare.mjs +16 -15
  10. package/esm/__builtins__/shared/simple-version-compare.mjs.map +1 -1
  11. package/esm/__builtins__/shared/transform-component.mjs +30 -31
  12. package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
  13. package/esm/__builtins__/shared/use-enter-submit.mjs +74 -62
  14. package/esm/__builtins__/shared/use-enter-submit.mjs.map +1 -1
  15. package/esm/__builtins__/shared/utils.mjs +44 -32
  16. package/esm/__builtins__/shared/utils.mjs.map +1 -1
  17. package/esm/_virtual/_/plugin-vue/export-helper.mjs +8 -0
  18. package/esm/array-base/array-base-addition.mjs +53 -0
  19. package/esm/array-base/array-base-addition.mjs.map +1 -0
  20. package/esm/array-base/array-base-index.mjs +17 -0
  21. package/esm/array-base/array-base-index.mjs.map +1 -0
  22. package/esm/array-base/array-base-inner.mjs +30 -0
  23. package/esm/array-base/array-base-inner.mjs.map +1 -0
  24. package/esm/array-base/array-base-item.mjs +21 -0
  25. package/esm/array-base/array-base-item.mjs.map +1 -0
  26. package/esm/array-base/array-base-move-down.mjs +45 -0
  27. package/esm/array-base/array-base-move-down.mjs.map +1 -0
  28. package/esm/array-base/array-base-move-up.mjs +45 -0
  29. package/esm/array-base/array-base-move-up.mjs.map +1 -0
  30. package/esm/array-base/array-base-remove.mjs +45 -0
  31. package/esm/array-base/array-base-remove.mjs.map +1 -0
  32. package/esm/array-base/array-base-sort-handle.mjs +33 -0
  33. package/esm/array-base/array-base-sort-handle.mjs.map +1 -0
  34. package/esm/array-base/index.mjs +28 -208
  35. package/esm/array-base/index.mjs.map +1 -1
  36. package/esm/array-base/style.css +36 -0
  37. package/esm/array-base/symbols.mjs +7 -6
  38. package/esm/array-base/symbols.mjs.map +1 -1
  39. package/esm/array-base/types.d.ts +23 -24
  40. package/esm/array-base/utils.d.ts +11 -17
  41. package/esm/array-base/utils.mjs +58 -60
  42. package/esm/array-base/utils.mjs.map +1 -1
  43. package/esm/array-cards/array-cards.mjs +109 -0
  44. package/esm/array-cards/array-cards.mjs.map +1 -0
  45. package/esm/array-cards/index.d.ts +120 -113
  46. package/esm/array-cards/index.mjs +19 -118
  47. package/esm/array-cards/index.mjs.map +1 -1
  48. package/esm/array-cards/style.css +20 -0
  49. package/esm/array-collapse/array-collapse-item.mjs +74 -0
  50. package/esm/array-collapse/array-collapse-item.mjs.map +1 -0
  51. package/esm/array-collapse/array-collapse.mjs +117 -0
  52. package/esm/array-collapse/array-collapse.mjs.map +1 -0
  53. package/esm/array-collapse/index.d.ts +137 -129
  54. package/esm/array-collapse/index.mjs +21 -174
  55. package/esm/array-collapse/index.mjs.map +1 -1
  56. package/esm/array-collapse/style.css +20 -0
  57. package/esm/array-collapse/utils.mjs +7 -12
  58. package/esm/array-collapse/utils.mjs.map +1 -1
  59. package/esm/array-items/array-items-item.mjs +22 -0
  60. package/esm/array-items/array-items-item.mjs.map +1 -0
  61. package/esm/array-items/array-items.mjs +88 -0
  62. package/esm/array-items/array-items.mjs.map +1 -0
  63. package/esm/array-items/index.d.ts +132 -125
  64. package/esm/array-items/index.mjs +21 -107
  65. package/esm/array-items/index.mjs.map +1 -1
  66. package/esm/array-items/style.css +22 -0
  67. package/esm/array-list-tabs/array-list-tabs.mjs +191 -0
  68. package/esm/array-list-tabs/array-list-tabs.mjs.map +1 -0
  69. package/esm/array-list-tabs/index.d.ts +80 -74
  70. package/esm/array-list-tabs/index.mjs +12 -186
  71. package/esm/array-list-tabs/index.mjs.map +1 -1
  72. package/esm/array-list-tabs/style.css +90 -0
  73. package/esm/array-list-tabs/utils.mjs +11 -15
  74. package/esm/array-list-tabs/utils.mjs.map +1 -1
  75. package/esm/array-table/array-table.mjs +236 -0
  76. package/esm/array-table/array-table.mjs.map +1 -0
  77. package/esm/array-table/index.d.ts +106 -1597
  78. package/esm/array-table/index.mjs +24 -223
  79. package/esm/array-table/index.mjs.map +1 -1
  80. package/esm/array-table/style.css +23 -0
  81. package/esm/array-table/types.d.ts +11 -6
  82. package/esm/array-table/utils.mjs +14 -22
  83. package/esm/array-table/utils.mjs.map +1 -1
  84. package/esm/array-tabs/array-tabs.mjs +92 -0
  85. package/esm/array-tabs/array-tabs.mjs.map +1 -0
  86. package/esm/array-tabs/index.d.ts +7 -2
  87. package/esm/array-tabs/index.mjs +8 -84
  88. package/esm/array-tabs/index.mjs.map +1 -1
  89. package/esm/array-tabs/style.css +7 -0
  90. package/esm/autocomplete/autocomplete.mjs +99 -0
  91. package/esm/autocomplete/autocomplete.mjs.map +1 -0
  92. package/esm/autocomplete/index.d.ts +5 -639
  93. package/esm/autocomplete/index.mjs +14 -113
  94. package/esm/autocomplete/index.mjs.map +1 -1
  95. package/esm/cascader/cascader.mjs +32 -0
  96. package/esm/cascader/cascader.mjs.map +1 -0
  97. package/esm/cascader/index.d.ts +5 -28
  98. package/esm/cascader/index.mjs +13 -50
  99. package/esm/cascader/index.mjs.map +1 -1
  100. package/esm/checkbox/checkbox-group.mjs +64 -0
  101. package/esm/checkbox/checkbox-group.mjs.map +1 -0
  102. package/esm/checkbox/index.d.ts +5 -817
  103. package/esm/checkbox/index.mjs +16 -69
  104. package/esm/checkbox/index.mjs.map +1 -1
  105. package/esm/color-picker/index.d.ts +8 -210
  106. package/esm/color-picker/index.mjs +13 -17
  107. package/esm/color-picker/index.mjs.map +1 -1
  108. package/esm/color-picker-panel/index.d.ts +8 -129
  109. package/esm/color-picker-panel/index.mjs +16 -25
  110. package/esm/color-picker-panel/index.mjs.map +1 -1
  111. package/esm/date-picker/index.d.ts +5 -443
  112. package/esm/date-picker/index.mjs +21 -29
  113. package/esm/date-picker/index.mjs.map +1 -1
  114. package/esm/date-picker/utils.mjs +21 -26
  115. package/esm/date-picker/utils.mjs.map +1 -1
  116. package/esm/date-picker-panel/index.d.ts +5 -143
  117. package/esm/date-picker-panel/index.mjs +23 -30
  118. package/esm/date-picker-panel/index.mjs.map +1 -1
  119. package/esm/editable/editable-popover.mjs +95 -0
  120. package/esm/editable/editable-popover.mjs.map +1 -0
  121. package/esm/editable/editable.mjs +113 -0
  122. package/esm/editable/editable.mjs.map +1 -0
  123. package/esm/editable/index.d.ts +10 -150
  124. package/esm/editable/index.mjs +17 -219
  125. package/esm/editable/index.mjs.map +1 -1
  126. package/esm/editable/style.css +29 -0
  127. package/esm/form/form.mjs +50 -70
  128. package/esm/form/form.mjs.map +1 -1
  129. package/esm/form/form.vue.d.ts +48 -0
  130. package/esm/form/index.d.ts +1 -1
  131. package/esm/form-button-group/form-button-group-sticky.mjs +37 -0
  132. package/esm/form-button-group/form-button-group-sticky.mjs.map +1 -0
  133. package/esm/form-button-group/form-button-group.mjs +71 -0
  134. package/esm/form-button-group/form-button-group.mjs.map +1 -0
  135. package/esm/form-button-group/index.d.ts +94 -87
  136. package/esm/form-button-group/index.mjs +10 -96
  137. package/esm/form-button-group/index.mjs.map +1 -1
  138. package/esm/form-button-group/style.css +281 -0
  139. package/esm/form-button-group/utils.mjs +7 -12
  140. package/esm/form-button-group/utils.mjs.map +1 -1
  141. package/esm/form-collapse/form-collapse.mjs +74 -0
  142. package/esm/form-collapse/form-collapse.mjs.map +1 -0
  143. package/esm/form-collapse/index.d.ts +43 -39
  144. package/esm/form-collapse/index.mjs +20 -86
  145. package/esm/form-collapse/index.mjs.map +1 -1
  146. package/esm/form-collapse/style.css +7 -0
  147. package/esm/form-collapse/utils.d.ts +21 -27
  148. package/esm/form-collapse/utils.mjs +48 -46
  149. package/esm/form-collapse/utils.mjs.map +1 -1
  150. package/esm/form-dialog/dialog-content.mjs +118 -0
  151. package/esm/form-dialog/dialog-content.mjs.map +1 -0
  152. package/esm/form-dialog/index.d.ts +8 -4
  153. package/esm/form-dialog/index.mjs +142 -211
  154. package/esm/form-dialog/index.mjs.map +1 -1
  155. package/esm/form-dialog/types.d.ts +38 -32
  156. package/esm/form-drawer/drawer-content.mjs +118 -0
  157. package/esm/form-drawer/drawer-content.mjs.map +1 -0
  158. package/esm/form-drawer/index.d.ts +8 -4
  159. package/esm/form-drawer/index.mjs +142 -204
  160. package/esm/form-drawer/index.mjs.map +1 -1
  161. package/esm/form-drawer/types.d.ts +38 -32
  162. package/esm/form-grid/form-grid-column.mjs +28 -0
  163. package/esm/form-grid/form-grid-column.mjs.map +1 -0
  164. package/esm/form-grid/form-grid.mjs +69 -0
  165. package/esm/form-grid/form-grid.mjs.map +1 -0
  166. package/esm/form-grid/hooks.mjs +7 -7
  167. package/esm/form-grid/hooks.mjs.map +1 -1
  168. package/esm/form-grid/index.d.ts +5 -2
  169. package/esm/form-grid/index.mjs +10 -109
  170. package/esm/form-grid/index.mjs.map +1 -1
  171. package/esm/form-grid/style.css +128 -0
  172. package/esm/form-item/form-item.mjs +308 -0
  173. package/esm/form-item/form-item.mjs.map +1 -0
  174. package/esm/form-item/form-item.vue.d.ts +29 -0
  175. package/esm/form-item/index.d.ts +9 -77
  176. package/esm/form-item/index.mjs +28 -332
  177. package/esm/form-item/index.mjs.map +1 -1
  178. package/esm/form-item/style.css +263 -0
  179. package/esm/form-item/types.d.ts +34 -29
  180. package/esm/form-item/utils.mjs +15 -15
  181. package/esm/form-item/utils.mjs.map +1 -1
  182. package/esm/form-layout/form-layout.mjs +103 -83
  183. package/esm/form-layout/form-layout.mjs.map +1 -1
  184. package/esm/form-layout/form-layout.vue.d.ts +28 -0
  185. package/esm/form-layout/index.d.ts +1 -1
  186. package/esm/form-layout/types.d.ts +24 -40
  187. package/esm/form-layout/utils.mjs +73 -99
  188. package/esm/form-layout/utils.mjs.map +1 -1
  189. package/esm/form-step/form-step-pane.mjs +15 -0
  190. package/esm/form-step/form-step-pane.mjs.map +1 -0
  191. package/esm/form-step/form-step.mjs +63 -0
  192. package/esm/form-step/form-step.mjs.map +1 -0
  193. package/esm/form-step/index.d.ts +29 -23
  194. package/esm/form-step/index.mjs +12 -93
  195. package/esm/form-step/index.mjs.map +1 -1
  196. package/esm/form-step/types.d.ts +19 -19
  197. package/esm/form-step/utils.d.ts +14 -10
  198. package/esm/form-step/utils.mjs +75 -59
  199. package/esm/form-step/utils.mjs.map +1 -1
  200. package/esm/form-tab/form-tab.mjs +79 -0
  201. package/esm/form-tab/form-tab.mjs.map +1 -0
  202. package/esm/form-tab/hooks.mjs +18 -16
  203. package/esm/form-tab/hooks.mjs.map +1 -1
  204. package/esm/form-tab/index.d.ts +5 -3
  205. package/esm/form-tab/index.mjs +10 -76
  206. package/esm/form-tab/index.mjs.map +1 -1
  207. package/esm/form-tab/style.css +4 -0
  208. package/esm/form-tab/utils.mjs +14 -13
  209. package/esm/form-tab/utils.mjs.map +1 -1
  210. package/esm/index.d.ts +53 -48
  211. package/esm/index.mjs +50 -103
  212. package/esm/input/index.d.ts +5 -52
  213. package/esm/input/index.mjs +16 -68
  214. package/esm/input/index.mjs.map +1 -1
  215. package/esm/input/input.mjs +41 -0
  216. package/esm/input/input.mjs.map +1 -0
  217. package/esm/input-number/index.d.ts +8 -329
  218. package/esm/input-number/index.mjs +12 -24
  219. package/esm/input-number/index.mjs.map +1 -1
  220. package/esm/input-tag/index.d.ts +5 -32
  221. package/esm/input-tag/index.mjs +13 -49
  222. package/esm/input-tag/index.mjs.map +1 -1
  223. package/esm/input-tag/input-tag.mjs +41 -0
  224. package/esm/input-tag/input-tag.mjs.map +1 -0
  225. package/esm/mention/index.d.ts +5 -50
  226. package/esm/mention/index.mjs +15 -96
  227. package/esm/mention/index.mjs.map +1 -1
  228. package/esm/mention/mention.mjs +77 -0
  229. package/esm/mention/mention.mjs.map +1 -0
  230. package/esm/pagination/components/jumper.mjs +11 -12
  231. package/esm/pagination/components/jumper.mjs.map +1 -1
  232. package/esm/pagination/components/jumper2.mjs +59 -0
  233. package/esm/pagination/components/jumper2.mjs.map +1 -0
  234. package/esm/pagination/components/next.mjs +18 -22
  235. package/esm/pagination/components/next.mjs.map +1 -1
  236. package/esm/pagination/components/next2.mjs +38 -0
  237. package/esm/pagination/components/next2.mjs.map +1 -0
  238. package/esm/pagination/components/pager.mjs +21 -22
  239. package/esm/pagination/components/pager.mjs.map +1 -1
  240. package/esm/pagination/components/pager2.mjs +229 -0
  241. package/esm/pagination/components/pager2.mjs.map +1 -0
  242. package/esm/pagination/components/prev.mjs +16 -22
  243. package/esm/pagination/components/prev.mjs.map +1 -1
  244. package/esm/pagination/components/prev2.mjs +38 -0
  245. package/esm/pagination/components/prev2.mjs.map +1 -0
  246. package/esm/pagination/components/sizes.mjs +32 -7
  247. package/esm/pagination/components/sizes.mjs.map +1 -1
  248. package/esm/pagination/components/sizes2.mjs +66 -0
  249. package/esm/pagination/components/sizes2.mjs.map +1 -0
  250. package/esm/pagination/components/total.mjs +10 -11
  251. package/esm/pagination/components/total.mjs.map +1 -1
  252. package/esm/pagination/components/total2.mjs +26 -0
  253. package/esm/pagination/components/total2.mjs.map +1 -0
  254. package/esm/pagination/pagination.mjs +271 -626
  255. package/esm/pagination/pagination.mjs.map +1 -1
  256. package/esm/password/index.d.ts +8 -54
  257. package/esm/password/index.mjs +11 -14
  258. package/esm/password/index.mjs.map +1 -1
  259. package/esm/preview-text/cascader.mjs +51 -0
  260. package/esm/preview-text/cascader.mjs.map +1 -0
  261. package/esm/preview-text/color-picker.mjs +37 -0
  262. package/esm/preview-text/color-picker.mjs.map +1 -0
  263. package/esm/preview-text/date-picker.mjs +61 -0
  264. package/esm/preview-text/date-picker.mjs.map +1 -0
  265. package/esm/preview-text/index.d.ts +107 -106
  266. package/esm/preview-text/index.mjs +25 -363
  267. package/esm/preview-text/index.mjs.map +1 -1
  268. package/esm/preview-text/input.mjs +39 -0
  269. package/esm/preview-text/input.mjs.map +1 -0
  270. package/esm/preview-text/preview.mjs +30 -0
  271. package/esm/preview-text/preview.mjs.map +1 -0
  272. package/esm/preview-text/rate.mjs +32 -0
  273. package/esm/preview-text/rate.mjs.map +1 -0
  274. package/esm/preview-text/select.mjs +42 -0
  275. package/esm/preview-text/select.mjs.map +1 -0
  276. package/esm/preview-text/style.css +16 -0
  277. package/esm/preview-text/time-picker.mjs +39 -0
  278. package/esm/preview-text/time-picker.mjs.map +1 -0
  279. package/esm/preview-text/tree.mjs +73 -0
  280. package/esm/preview-text/tree.mjs.map +1 -0
  281. package/esm/preview-text/utils.d.ts +10 -13
  282. package/esm/preview-text/utils.mjs +15 -15
  283. package/esm/preview-text/utils.mjs.map +1 -1
  284. package/esm/query-form/default-components.mjs +45 -45
  285. package/esm/query-form/default-components.mjs.map +1 -1
  286. package/esm/query-form/hooks.mjs +31 -26
  287. package/esm/query-form/hooks.mjs.map +1 -1
  288. package/esm/query-form/index.d.ts +115 -105
  289. package/esm/query-form/index.mjs +10 -333
  290. package/esm/query-form/index.mjs.map +1 -1
  291. package/esm/query-form/query-form-light.mjs +86 -0
  292. package/esm/query-form/query-form-light.mjs.map +1 -0
  293. package/esm/query-form/query-form.mjs +263 -0
  294. package/esm/query-form/query-form.mjs.map +1 -0
  295. package/esm/query-form/style.css +27 -0
  296. package/esm/query-form/types.d.ts +42 -41
  297. package/esm/query-form-item/index.d.ts +7 -151
  298. package/esm/query-form-item/index.mjs +15 -183
  299. package/esm/query-form-item/index.mjs.map +1 -1
  300. package/esm/query-form-item/query-form-item.mjs +195 -0
  301. package/esm/query-form-item/query-form-item.mjs.map +1 -0
  302. package/esm/query-form-item/style.css +12 -0
  303. package/esm/query-form-item/types.d.ts +42 -38
  304. package/esm/radio/index.d.ts +429 -473
  305. package/esm/radio/index.mjs +15 -68
  306. package/esm/radio/index.mjs.map +1 -1
  307. package/esm/radio/radio-group.mjs +70 -0
  308. package/esm/radio/radio-group.mjs.map +1 -0
  309. package/esm/{styles/radio/index.css → radio/style.css} +3 -1
  310. package/esm/rate/index.d.ts +8 -187
  311. package/esm/rate/index.mjs +13 -17
  312. package/esm/rate/index.mjs.map +1 -1
  313. package/esm/reset/index.d.ts +5 -2
  314. package/esm/reset/index.mjs +8 -44
  315. package/esm/reset/index.mjs.map +1 -1
  316. package/esm/reset/reset.mjs +42 -0
  317. package/esm/reset/reset.mjs.map +1 -0
  318. package/esm/segmented/index.d.ts +5 -26
  319. package/esm/segmented/index.mjs +13 -40
  320. package/esm/segmented/index.mjs.map +1 -1
  321. package/esm/segmented/segmented.mjs +26 -0
  322. package/esm/segmented/segmented.mjs.map +1 -0
  323. package/esm/select/index.d.ts +5 -129
  324. package/esm/select/index.mjs +14 -127
  325. package/esm/select/index.mjs.map +1 -1
  326. package/esm/select/select.mjs +95 -0
  327. package/esm/select/select.mjs.map +1 -0
  328. package/esm/select-table/index.d.ts +4 -1557
  329. package/esm/select-table/index.mjs +12 -204
  330. package/esm/select-table/index.mjs.map +1 -1
  331. package/esm/select-table/select-table.mjs +202 -0
  332. package/esm/select-table/select-table.mjs.map +1 -0
  333. package/esm/select-table/style.css +14 -0
  334. package/esm/shared/overlay-elements.mjs +15 -16
  335. package/esm/shared/overlay-elements.mjs.map +1 -1
  336. package/esm/shared/url-change-listener.mjs +50 -0
  337. package/esm/shared/url-change-listener.mjs.map +1 -0
  338. package/esm/slider/index.d.ts +8 -177
  339. package/esm/slider/index.mjs +13 -17
  340. package/esm/slider/index.mjs.map +1 -1
  341. package/esm/space/index.d.ts +2 -1
  342. package/esm/space/index.mjs +2 -6
  343. package/esm/submit/index.d.ts +5 -2
  344. package/esm/submit/index.mjs +8 -40
  345. package/esm/submit/index.mjs.map +1 -1
  346. package/esm/submit/submit.mjs +41 -0
  347. package/esm/submit/submit.mjs.map +1 -0
  348. package/esm/switch/index.d.ts +8 -299
  349. package/esm/switch/index.mjs +8 -13
  350. package/esm/switch/index.mjs.map +1 -1
  351. package/esm/time-picker/index.d.ts +8 -445
  352. package/esm/time-picker/index.mjs +10 -17
  353. package/esm/time-picker/index.mjs.map +1 -1
  354. package/esm/time-select/index.d.ts +5 -185
  355. package/esm/time-select/index.mjs +13 -17
  356. package/esm/time-select/index.mjs.map +1 -1
  357. package/esm/transfer/index.d.ts +8 -267
  358. package/esm/transfer/index.mjs +8 -11
  359. package/esm/transfer/index.mjs.map +1 -1
  360. package/esm/tree/index.d.ts +4 -41
  361. package/esm/tree/index.mjs +14 -104
  362. package/esm/tree/index.mjs.map +1 -1
  363. package/esm/tree/tree.mjs +127 -0
  364. package/esm/tree/tree.mjs.map +1 -0
  365. package/esm/tree/utils.mjs +157 -149
  366. package/esm/tree/utils.mjs.map +1 -1
  367. package/esm/tree-select/index.d.ts +5 -16
  368. package/esm/tree-select/index.mjs +13 -40
  369. package/esm/tree-select/index.mjs.map +1 -1
  370. package/esm/tree-select/tree-select.mjs +38 -0
  371. package/esm/tree-select/tree-select.mjs.map +1 -0
  372. package/esm/upload/index.d.ts +5 -712
  373. package/esm/upload/index.mjs +11 -172
  374. package/esm/upload/index.mjs.map +1 -1
  375. package/esm/upload/upload.mjs +176 -0
  376. package/esm/upload/upload.mjs.map +1 -0
  377. package/package.json +23 -24
  378. package/esm/__builtins__/configs/index.d.ts +0 -1
  379. package/esm/__builtins__/index.d.ts +0 -2
  380. package/esm/__builtins__/index.mjs +0 -23
  381. package/esm/__builtins__/index.mjs.map +0 -1
  382. package/esm/__builtins__/shared/index.d.ts +0 -6
  383. package/esm/__builtins__/shared/index.mjs +0 -21
  384. package/esm/__builtins__/shared/index.mjs.map +0 -1
  385. package/esm/__builtins__/shared/load-config-provider.d.ts +0 -2
  386. package/esm/__builtins__/shared/loading.d.ts +0 -12
  387. package/esm/__builtins__/shared/simple-version-compare.d.ts +0 -2
  388. package/esm/__builtins__/shared/transform-component.d.ts +0 -3
  389. package/esm/__builtins__/shared/types.d.ts +0 -2
  390. package/esm/__builtins__/shared/types.mjs +0 -2
  391. package/esm/__builtins__/shared/types.mjs.map +0 -1
  392. package/esm/__builtins__/shared/use-enter-submit.d.ts +0 -9
  393. package/esm/__builtins__/shared/utils.d.ts +0 -9
  394. package/esm/array-base/array-base-addition.d.ts +0 -5
  395. package/esm/array-base/array-base-index.d.ts +0 -19
  396. package/esm/array-base/array-base-inner.d.ts +0 -18
  397. package/esm/array-base/array-base-item.d.ts +0 -18
  398. package/esm/array-base/array-base-move-down.d.ts +0 -18
  399. package/esm/array-base/array-base-move-up.d.ts +0 -18
  400. package/esm/array-base/array-base-remove.d.ts +0 -18
  401. package/esm/array-base/array-base-sort-handle.d.ts +0 -2
  402. package/esm/array-base/index.d.ts +0 -114
  403. package/esm/array-base/symbols.d.ts +0 -4
  404. package/esm/array-base/types.mjs +0 -2
  405. package/esm/array-base/types.mjs.map +0 -1
  406. package/esm/array-cards/array-cards.d.ts +0 -13
  407. package/esm/array-collapse/array-collapse-item.d.ts +0 -18
  408. package/esm/array-collapse/array-collapse.d.ts +0 -16
  409. package/esm/array-collapse/utils.d.ts +0 -1
  410. package/esm/array-items/array-items-item.d.ts +0 -30
  411. package/esm/array-items/array-items.d.ts +0 -2
  412. package/esm/array-list-tabs/array-list-tabs.d.ts +0 -31
  413. package/esm/array-list-tabs/utils.d.ts +0 -3
  414. package/esm/array-table/array-table.d.ts +0 -1505
  415. package/esm/array-table/types.mjs +0 -2
  416. package/esm/array-table/types.mjs.map +0 -1
  417. package/esm/array-table/utils.d.ts +0 -5
  418. package/esm/array-tabs/array-tabs.d.ts +0 -2
  419. package/esm/autocomplete/autocomplete.d.ts +0 -1222
  420. package/esm/cascader/cascader.d.ts +0 -25
  421. package/esm/checkbox/checkbox-group.d.ts +0 -42
  422. package/esm/date-picker/utils.d.ts +0 -4
  423. package/esm/editable/editable-popover.d.ts +0 -25
  424. package/esm/editable/editable.d.ts +0 -193
  425. package/esm/env.d.d.ts +0 -1
  426. package/esm/env.d.mjs +0 -2
  427. package/esm/env.d.mjs.map +0 -1
  428. package/esm/form/form.d.ts +0 -46
  429. package/esm/form/index.mjs +0 -6
  430. package/esm/form/index.mjs.map +0 -1
  431. package/esm/form-button-group/form-button-group-sticky.d.ts +0 -17
  432. package/esm/form-button-group/form-button-group.d.ts +0 -57
  433. package/esm/form-button-group/utils.d.ts +0 -1
  434. package/esm/form-collapse/form-collapse.d.ts +0 -18
  435. package/esm/form-dialog/dialog-content.d.ts +0 -846
  436. package/esm/form-dialog/types.mjs +0 -2
  437. package/esm/form-dialog/types.mjs.map +0 -1
  438. package/esm/form-drawer/drawer-content.d.ts +0 -976
  439. package/esm/form-drawer/types.mjs +0 -2
  440. package/esm/form-drawer/types.mjs.map +0 -1
  441. package/esm/form-grid/form-grid-column.d.ts +0 -29
  442. package/esm/form-grid/form-grid.d.ts +0 -101
  443. package/esm/form-grid/hooks.d.ts +0 -4
  444. package/esm/form-item/form-item.d.ts +0 -19
  445. package/esm/form-item/types.mjs +0 -2
  446. package/esm/form-item/types.mjs.map +0 -1
  447. package/esm/form-item/utils.d.ts +0 -3
  448. package/esm/form-layout/form-layout.d.ts +0 -31
  449. package/esm/form-layout/index.mjs +0 -6
  450. package/esm/form-layout/index.mjs.map +0 -1
  451. package/esm/form-layout/types.mjs +0 -2
  452. package/esm/form-layout/types.mjs.map +0 -1
  453. package/esm/form-layout/utils.d.ts +0 -57
  454. package/esm/form-step/form-step-pane.d.ts +0 -2
  455. package/esm/form-step/form-step.d.ts +0 -5
  456. package/esm/form-step/types.mjs +0 -2
  457. package/esm/form-step/types.mjs.map +0 -1
  458. package/esm/form-tab/form-tab.d.ts +0 -7
  459. package/esm/form-tab/hooks.d.ts +0 -8
  460. package/esm/form-tab/types.d.ts +0 -12
  461. package/esm/form-tab/types.mjs +0 -2
  462. package/esm/form-tab/types.mjs.map +0 -1
  463. package/esm/form-tab/utils.d.ts +0 -4
  464. package/esm/index.mjs.map +0 -1
  465. package/esm/input/input.d.ts +0 -25
  466. package/esm/input-tag/input-tag.d.ts +0 -32
  467. package/esm/mention/mention.d.ts +0 -51
  468. package/esm/pagination/components/jumper.d.ts +0 -16
  469. package/esm/pagination/components/next.d.ts +0 -42
  470. package/esm/pagination/components/pager.d.ts +0 -42
  471. package/esm/pagination/components/prev.d.ts +0 -39
  472. package/esm/pagination/components/sizes.d.ts +0 -56
  473. package/esm/pagination/components/total.d.ts +0 -8
  474. package/esm/pagination/pagination.d.ts +0 -128
  475. package/esm/preview-text/cascader.d.ts +0 -5
  476. package/esm/preview-text/color-picker.d.ts +0 -5
  477. package/esm/preview-text/date-picker.d.ts +0 -5
  478. package/esm/preview-text/input.d.ts +0 -28
  479. package/esm/preview-text/preview.d.ts +0 -18
  480. package/esm/preview-text/rate.d.ts +0 -5
  481. package/esm/preview-text/select.d.ts +0 -5
  482. package/esm/preview-text/time-picker.d.ts +0 -5
  483. package/esm/preview-text/tree.d.ts +0 -22
  484. package/esm/query-form/default-components.d.ts +0 -5
  485. package/esm/query-form/hooks.d.ts +0 -25
  486. package/esm/query-form/query-form-light.d.ts +0 -27
  487. package/esm/query-form/query-form.d.ts +0 -52
  488. package/esm/query-form/types.mjs +0 -2
  489. package/esm/query-form/types.mjs.map +0 -1
  490. package/esm/query-form-item/query-form-item.d.ts +0 -96
  491. package/esm/query-form-item/types.mjs +0 -2
  492. package/esm/query-form-item/types.mjs.map +0 -1
  493. package/esm/radio/radio-group.d.ts +0 -33
  494. package/esm/reset/reset.d.ts +0 -45
  495. package/esm/segmented/segmented.d.ts +0 -25
  496. package/esm/select/select.d.ts +0 -45
  497. package/esm/select-table/select-table.d.ts +0 -3030
  498. package/esm/select-table/types.d.ts +0 -17
  499. package/esm/select-table/types.mjs +0 -2
  500. package/esm/select-table/types.mjs.map +0 -1
  501. package/esm/shared/overlay-elements.d.ts +0 -6
  502. package/esm/space/index.mjs.map +0 -1
  503. package/esm/styles/array-base/index.css +0 -1
  504. package/esm/styles/array-cards/index.css +0 -1
  505. package/esm/styles/array-collapse/index.css +0 -1
  506. package/esm/styles/array-items/index.css +0 -1
  507. package/esm/styles/array-list-tabs/index.css +0 -1
  508. package/esm/styles/array-table/index.css +0 -1
  509. package/esm/styles/array-tabs/index.css +0 -1
  510. package/esm/styles/editable/index.css +0 -1
  511. package/esm/styles/form-button-group/index.css +0 -1
  512. package/esm/styles/form-collapse/index.css +0 -1
  513. package/esm/styles/form-grid/index.css +0 -1
  514. package/esm/styles/form-item/index.css +0 -1
  515. package/esm/styles/form-tab/index.css +0 -1
  516. package/esm/styles/preview-text/index.css +0 -1
  517. package/esm/styles/query-form/index.css +0 -1
  518. package/esm/styles/query-form-item/index.css +0 -1
  519. package/esm/styles/select-table/index.css +0 -1
  520. package/esm/submit/submit.d.ts +0 -36
  521. package/esm/tree/tree.d.ts +0 -20
  522. package/esm/tree/types.d.ts +0 -13
  523. package/esm/tree/types.mjs +0 -2
  524. package/esm/tree/types.mjs.map +0 -1
  525. package/esm/tree/utils.d.ts +0 -45
  526. package/esm/tree-select/tree-select.d.ts +0 -10
  527. package/esm/upload/upload.d.ts +0 -1259
  528. package/esm/vendor/icon.mjs +0 -11
  529. package/esm/vendor/icon.mjs.map +0 -1
  530. package/esm/vendor/lodash.mjs +0 -1506
  531. package/esm/vendor/lodash.mjs.map +0 -1
  532. package/esm/vendor/runtime.mjs +0 -34
  533. package/esm/vendor/runtime.mjs.map +0 -1
  534. package/esm/vendor/shared.esm-bundler.mjs +0 -9
  535. package/esm/vendor/shared.esm-bundler.mjs.map +0 -1
  536. package/esm/vendor/sizes.mjs +0 -27
  537. package/esm/vendor/sizes.mjs.map +0 -1
  538. package/esm/vendor/types.mjs +0 -19
  539. package/esm/vendor/types.mjs.map +0 -1
@@ -1,628 +1,273 @@
1
- import { DArrowLeft as ce, MoreFilled as re, DArrowRight as pe, ArrowRight as fe, ArrowLeft as me } from "@element-plus/icons-vue";
2
- import { useLocale as R, useNamespace as O, ElInput as ve, ElIcon as oe, CHANGE_EVENT as X, ElBadge as H, ElSelect as be, ElOption as Pe, useSizeProp as Ce, useGlobalSize as he, useDeprecated as ze, elPaginationKey as Se } from "element-plus";
3
- import { inject as ye, defineComponent as U, ref as M, computed as C, openBlock as d, createElementBlock as w, unref as t, normalizeClass as k, createElementVNode as j, toDisplayString as D, createVNode as ne, createBlock as z, withCtx as A, resolveDynamicComponent as ue, watchEffect as ke, withKeys as Ne, createCommentVNode as ae, Fragment as de, renderList as ge, watch as Y, getCurrentInstance as Ee, provide as xe, h as I } from "vue";
4
- import { paginationJumperProps as $e } from "./components/jumper.mjs";
5
- import { paginationNextProps as Te } from "./components/next.mjs";
6
- import { useObserver as Me, formilyComputed as te } from "@silver-formily/reactive-vue";
7
- import { useField as we } from "@silver-formily/vue";
8
- import { paginationPagerProps as _e } from "./components/pager.mjs";
9
- import { paginationPrevEmits as Le, paginationPrevProps as Be } from "./components/prev.mjs";
10
- import { isEqual as Ie, isArr as Ae } from "@formily/shared";
11
- import { p as qe, m as Fe } from "../vendor/sizes.mjs";
12
- import { paginationTotalProps as Ke } from "./components/total.mjs";
13
- import { b as je, d as De } from "../vendor/runtime.mjs";
14
- import { i as se } from "../vendor/icon.mjs";
15
- import { i as _, d as Re } from "../vendor/types.mjs";
16
- const Ue = /* @__PURE__ */ Symbol("elPaginationKey"), ie = () => ye(Ue, {}), Oe = ["disabled"], Ve = /* @__PURE__ */ U({
17
- name: "ElPaginationJumper",
18
- __name: "jumper",
19
- props: $e,
20
- setup(e) {
21
- const { t: o } = R(), n = O("pagination"), { pageCount: f, disabled: r, currentPage: g, changeEvent: b } = ie(), m = M(), E = C(() => m.value ?? g?.value);
22
- function N(p) {
23
- m.value = p ? +p : "";
24
- }
25
- function u(p) {
26
- p = Math.trunc(+p), b?.(p), m.value = void 0;
27
- }
28
- return (p, h) => (d(), w("span", {
29
- class: k(t(n).e("jump")),
30
- disabled: t(r)
31
- }, [
32
- j("span", {
33
- class: k([t(n).e("goto")])
34
- }, D(t(o)("el.pagination.goto")), 3),
35
- ne(t(ve), {
36
- size: p.size,
37
- class: k([t(n).e("editor"), t(n).is("in-pagination")]),
38
- min: 1,
39
- max: t(f),
40
- disabled: t(r),
41
- "model-value": E.value,
42
- "validate-event": !1,
43
- "aria-label": t(o)("el.pagination.page"),
44
- type: "number",
45
- "onUpdate:modelValue": N,
46
- onChange: u
47
- }, null, 8, ["size", "class", "max", "disabled", "model-value", "aria-label"]),
48
- j("span", {
49
- class: k([t(n).e("classifier")])
50
- }, D(t(o)("el.pagination.pageClassifier")), 3)
51
- ], 10, Oe));
52
- }
53
- }), We = ["disabled", "aria-label", "aria-disabled"], He = { key: 0 }, Ge = /* @__PURE__ */ U({
54
- name: "ElPaginationNext",
55
- __name: "next",
56
- props: Te,
57
- emits: ["click"],
58
- setup(e) {
59
- const o = e, { t: n } = R(), f = C(
60
- () => o.disabled || o.currentPage === o.pageCount || o.pageCount === 0
61
- );
62
- return (r, g) => (d(), w("button", {
63
- type: "button",
64
- class: "btn-next",
65
- disabled: f.value,
66
- "aria-label": r.nextText || t(n)("el.pagination.next"),
67
- "aria-disabled": f.value,
68
- onClick: g[0] || (g[0] = (b) => r.$emit("click", b))
69
- }, [
70
- r.nextText ? (d(), w("span", He, D(r.nextText), 1)) : (d(), z(t(oe), { key: 1 }, {
71
- default: A(() => [
72
- (d(), z(ue(r.nextIcon)))
73
- ]),
74
- _: 1
75
- }))
76
- ], 8, We));
77
- }
78
- }), Je = ["aria-current", "aria-label", "tabindex"], Qe = ["tabindex", "aria-label"], Xe = ["aria-current", "aria-label", "tabindex"], Ye = ["tabindex", "aria-label"], Ze = ["aria-current", "aria-label", "tabindex"], ea = /* @__PURE__ */ U({
79
- name: "ElPaginationPager",
80
- __name: "pager",
81
- props: _e,
82
- emits: [X],
83
- setup(e, { emit: o }) {
84
- const n = e, f = o, r = O("pager"), g = O("icon"), { t: b } = R(), m = M(!1), E = M(!1), N = M(!1), u = M(!1), p = M(!1), h = M(!1), L = C(() => {
85
- const a = n.pagerCount, l = (a - 1) / 2, i = Number(n.currentPage), S = Number(n.pageCount);
86
- let T = !1, F = !1;
87
- S > a && (i > a - l && (T = !0), i < S - l && (F = !0));
88
- const W = [];
89
- if (T && !F) {
90
- const y = S - (a - 2);
91
- for (let K = y; K < S; K++)
92
- W.push(K);
93
- } else if (!T && F)
94
- for (let y = 2; y < a; y++)
95
- W.push(y);
96
- else if (T && F) {
97
- const y = Math.floor(a / 2) - 1;
98
- for (let K = i - y; K <= i + y; K++)
99
- W.push(K);
100
- } else
101
- for (let y = 2; y < S; y++)
102
- W.push(y);
103
- return W;
104
- }), x = C(() => [
105
- "more",
106
- "btn-quickprev",
107
- g.b(),
108
- r.is("disabled", n.disabled)
109
- ]), v = C(() => [
110
- "more",
111
- "btn-quicknext",
112
- g.b(),
113
- r.is("disabled", n.disabled)
114
- ]), B = C(() => n.disabled ? -1 : 0);
115
- ke(() => {
116
- const a = (n.pagerCount - 1) / 2;
117
- m.value = !1, E.value = !1, n.pageCount > n.pagerCount && (n.currentPage > n.pagerCount - a && (m.value = !0), n.currentPage < n.pageCount - a && (E.value = !0));
118
- });
119
- function G(a = !1) {
120
- n.disabled || (a ? N.value = !0 : u.value = !0);
121
- }
122
- function J(a = !1) {
123
- a ? p.value = !0 : h.value = !0;
124
- }
125
- function Z(a) {
126
- const l = a.target;
127
- if (l.tagName.toLowerCase() === "li" && Array.from(l.classList).includes("number")) {
128
- const i = Number(l.textContent);
129
- i !== n.currentPage && f(X, i);
130
- } else l.tagName.toLowerCase() === "li" && Array.from(l.classList).includes("more") && q(a);
131
- }
132
- function q(a) {
133
- const l = a.target;
134
- if (l.tagName.toLowerCase() === "ul" || n.disabled)
135
- return;
136
- let i = Number(l.textContent);
137
- const S = n.pageCount, T = n.currentPage, F = n.pagerCount - 2;
138
- l.className.includes("more") && (l.className.includes("quickprev") ? i = T - F : l.className.includes("quicknext") && (i = T + F)), Number.isNaN(+i) || (i < 1 && (i = 1), i > S && (i = S)), i !== T && f(X, i);
139
- }
140
- Me();
141
- const c = we().value, Q = c.address.entire, $ = te(() => {
142
- const a = c.form.queryFeedbacks({
143
- type: "error",
144
- address: `${Q}.**`
145
- }).map((i) => Number(i.path.split(`${Q}.`)[1].split(".")[0])).reduce((i, S) => {
146
- const T = Math.floor(S / n.pageSize);
147
- return i.add(T), i;
148
- }, /* @__PURE__ */ new Set());
149
- return Array.from(a).sort((i, S) => i - S);
150
- }), ee = te(() => $.value.some((a) => a < L.value[0] - 1 && a !== 0)), V = te(() => $.value.some((a) => a > L.value.at(-1) - 1 && a !== $.value.length - 1));
151
- return (a, l) => (d(), w("ul", {
152
- class: k(t(r).b()),
153
- onClick: q,
154
- onKeyup: Ne(Z, ["enter"])
155
- }, [
156
- a.pageCount > 1 ? (d(), z(t(H), {
157
- key: 0,
158
- "is-dot": "",
159
- value: 1,
160
- hidden: t($)[0] !== 0
161
- }, {
162
- default: A(() => [
163
- j("li", {
164
- class: k([[
165
- t(r).is("active", a.currentPage === 1),
166
- t(r).is("disabled", a.disabled)
167
- ], "number"]),
168
- "aria-current": a.currentPage === 1,
169
- "aria-label": t(b)("el.pagination.currentPage", { pager: 1 }),
170
- tabindex: B.value
171
- }, " 1 ", 10, Je)
172
- ]),
173
- _: 1
174
- }, 8, ["hidden"])) : ae("", !0),
175
- m.value ? (d(), z(t(H), {
176
- key: 1,
177
- "is-dot": "",
178
- value: 1,
179
- hidden: !t(ee)
180
- }, {
181
- default: A(() => [
182
- j("li", {
183
- class: k(x.value),
184
- tabindex: B.value,
185
- "aria-label": t(b)("el.pagination.prevPages", { pager: a.pagerCount - 2 }),
186
- onMouseenter: l[0] || (l[0] = (i) => G(!0)),
187
- onMouseleave: l[1] || (l[1] = (i) => N.value = !1),
188
- onFocus: l[2] || (l[2] = (i) => J(!0)),
189
- onBlur: l[3] || (l[3] = (i) => p.value = !1)
190
- }, [
191
- (N.value || p.value) && !a.disabled ? (d(), z(t(ce), { key: 0 })) : (d(), z(t(re), { key: 1 }))
192
- ], 42, Qe)
193
- ]),
194
- _: 1
195
- }, 8, ["hidden"])) : ae("", !0),
196
- (d(!0), w(de, null, ge(L.value, (i) => (d(), z(t(H), {
197
- key: i,
198
- "is-dot": "",
199
- value: 1,
200
- hidden: !t($).includes(i - 1)
201
- }, {
202
- default: A(() => [
203
- j("li", {
204
- class: k([[
205
- t(r).is("active", a.currentPage === i),
206
- t(r).is("disabled", a.disabled)
207
- ], "number"]),
208
- "aria-current": a.currentPage === i,
209
- "aria-label": t(b)("el.pagination.currentPage", { pager: i }),
210
- tabindex: B.value
211
- }, D(i), 11, Xe)
212
- ]),
213
- _: 2
214
- }, 1032, ["hidden"]))), 128)),
215
- E.value ? (d(), z(t(H), {
216
- key: 2,
217
- "is-dot": "",
218
- value: 1,
219
- hidden: !t(V)
220
- }, {
221
- default: A(() => [
222
- j("li", {
223
- class: k(v.value),
224
- tabindex: B.value,
225
- "aria-label": t(b)("el.pagination.nextPages", { pager: a.pagerCount - 2 }),
226
- onMouseenter: l[4] || (l[4] = (i) => G()),
227
- onMouseleave: l[5] || (l[5] = (i) => u.value = !1),
228
- onFocus: l[6] || (l[6] = (i) => J()),
229
- onBlur: l[7] || (l[7] = (i) => h.value = !1)
230
- }, [
231
- (u.value || h.value) && !a.disabled ? (d(), z(t(pe), { key: 0 })) : (d(), z(t(re), { key: 1 }))
232
- ], 42, Ye)
233
- ]),
234
- _: 1
235
- }, 8, ["hidden"])) : ae("", !0),
236
- ne(t(H), {
237
- "is-dot": "",
238
- value: 1,
239
- hidden: t($)[t($).length - 1] !== a.pageCount - 1
240
- }, {
241
- default: A(() => [
242
- j("li", {
243
- class: k([[
244
- t(r).is("active", a.currentPage === a.pageCount),
245
- t(r).is("disabled", a.disabled)
246
- ], "number"]),
247
- "aria-current": a.currentPage === a.pageCount,
248
- "aria-label": t(b)("el.pagination.currentPage", { pager: a.pageCount }),
249
- tabindex: B.value
250
- }, D(a.pageCount), 11, Ze)
251
- ]),
252
- _: 1
253
- }, 8, ["hidden"])
254
- ], 34));
255
- }
256
- }), aa = ["disabled", "aria-label", "aria-disabled"], ta = { key: 0 }, na = /* @__PURE__ */ U({
257
- name: "ElPaginationPrev",
258
- __name: "prev",
259
- props: Be,
260
- emits: Le,
261
- setup(e) {
262
- const o = e, { t: n } = R(), f = C(
263
- () => o.disabled || o.currentPage <= 1
264
- );
265
- return (r, g) => (d(), w("button", {
266
- type: "button",
267
- class: "btn-prev",
268
- disabled: f.value,
269
- "aria-label": r.prevText || t(n)("el.pagination.prev"),
270
- "aria-disabled": f.value,
271
- onClick: g[0] || (g[0] = (b) => r.$emit("click", b))
272
- }, [
273
- r.prevText ? (d(), w("span", ta, D(r.prevText), 1)) : (d(), z(t(oe), { key: 1 }, {
274
- default: A(() => [
275
- (d(), z(ue(r.prevIcon)))
276
- ]),
277
- _: 1
278
- }))
279
- ], 8, aa));
280
- }
281
- }), ia = /* @__PURE__ */ U({
282
- name: "ElPaginationSizes",
283
- __name: "sizes",
284
- props: qe,
285
- emits: ["page-size-change"],
286
- setup(e, { emit: o }) {
287
- const n = e, f = o, { t: r } = R(), g = O("pagination"), b = ie(), m = M(n.pageSize);
288
- Y(
289
- () => n.pageSizes,
290
- (u, p) => {
291
- if (!Ie(u, p) && Ae(u)) {
292
- const h = u.includes(n.pageSize) ? n.pageSize : n.pageSizes[0];
293
- f("page-size-change", h);
294
- }
295
- }
296
- ), Y(
297
- () => n.pageSize,
298
- (u) => {
299
- m.value = u;
300
- }
301
- );
302
- const E = C(() => n.pageSizes);
303
- function N(u) {
304
- u !== m.value && (m.value = u, b.handleSizeChange?.(Number(u)));
305
- }
306
- return (u, p) => (d(), w("span", {
307
- class: k(t(g).e("sizes"))
308
- }, [
309
- ne(t(be), {
310
- "model-value": m.value,
311
- disabled: u.disabled,
312
- "popper-class": u.popperClass,
313
- size: u.size,
314
- teleported: u.teleported,
315
- "validate-event": !1,
316
- "append-to": u.appendSizeTo,
317
- onChange: N
318
- }, {
319
- default: A(() => [
320
- (d(!0), w(de, null, ge(E.value, (h) => (d(), z(t(Pe), {
321
- key: h,
322
- value: h,
323
- label: h + t(r)("el.pagination.pagesize")
324
- }, null, 8, ["value", "label"]))), 128))
325
- ]),
326
- _: 1
327
- }, 8, ["model-value", "disabled", "popper-class", "size", "teleported", "append-to"])
328
- ], 2));
329
- }
330
- }), ra = ["disabled"], sa = /* @__PURE__ */ U({
331
- name: "ElPaginationTotal",
332
- __name: "total",
333
- props: Ke,
334
- setup(e) {
335
- const { t: o } = R(), n = O("pagination"), { disabled: f } = ie();
336
- return (r, g) => (d(), w("span", {
337
- class: k(t(n).e("total")),
338
- disabled: t(f)
339
- }, D(t(o)("el.pagination.total", {
340
- total: r.total
341
- })), 11, ra));
342
- }
343
- }), P = (e) => typeof e != "number", la = je({
344
- /**
345
- * @description options of item count per page
346
- */
347
- pageSize: Number,
348
- /**
349
- * @description default initial value of page size, not setting is the same as setting 10
350
- */
351
- defaultPageSize: Number,
352
- /**
353
- * @description total item count
354
- */
355
- total: Number,
356
- /**
357
- * @description total page count. Set either `total` or `page-count` and pages will be displayed; if you need `page-sizes`, `total` is required
358
- */
359
- pageCount: Number,
360
- /**
361
- * @description number of pagers. Pagination collapses when the total page count exceeds this value
362
- */
363
- pagerCount: {
364
- type: Number,
365
- validator: (e) => _(e) && Math.trunc(e) === e && e > 4 && e < 22 && e % 2 === 1,
366
- default: 7
367
- },
368
- /**
369
- * @description current page number
370
- */
371
- currentPage: Number,
372
- /**
373
- * @description default initial value of current-page, not setting is the same as setting 1
374
- */
375
- defaultCurrentPage: Number,
376
- /**
377
- * @description layout of Pagination, elements separated with a comma
378
- */
379
- layout: {
380
- type: String,
381
- default: ["prev", "pager", "next", "jumper", "->", "total"].join(", ")
382
- },
383
- /**
384
- * @description item count of each page
385
- */
386
- pageSizes: {
387
- type: De(Array),
388
- default: () => Fe([10, 20, 30, 40, 50, 100])
389
- },
390
- /**
391
- * @description custom class name for the page size Select's dropdown
392
- */
393
- popperClass: {
394
- type: String,
395
- default: ""
396
- },
397
- /**
398
- * @description text for the prev button
399
- */
400
- prevText: {
401
- type: String,
402
- default: ""
403
- },
404
- /**
405
- * @description icon for the prev button, higher priority of `prev-text`
406
- */
407
- prevIcon: {
408
- type: se,
409
- default: () => me
410
- },
411
- /**
412
- * @description text for the next button
413
- */
414
- nextText: {
415
- type: String,
416
- default: ""
417
- },
418
- /**
419
- * @description icon for the next button, higher priority of `next-text`
420
- */
421
- nextIcon: {
422
- type: se,
423
- default: () => fe
424
- },
425
- /**
426
- * @description whether Pagination size is teleported to body
427
- */
428
- teleported: {
429
- type: Boolean,
430
- default: !0
431
- },
432
- /**
433
- * @description whether to use small pagination
434
- */
435
- small: Boolean,
436
- /**
437
- * @description set page size
438
- */
439
- size: Ce,
440
- /**
441
- * @description whether the buttons have a background color
442
- */
443
- background: Boolean,
444
- /**
445
- * @description whether Pagination is disabled
446
- */
447
- disabled: Boolean,
448
- /**
449
- * @description whether to hide when there's only one page
450
- */
451
- hideOnSinglePage: Boolean,
452
- /**
453
- * @description which element the size dropdown appends to.
454
- */
455
- appendSizeTo: String
456
- }), oa = {
457
- "update:current-page": (e) => _(e),
458
- "update:page-size": (e) => _(e),
459
- "size-change": (e) => _(e),
460
- change: (e, o) => _(e) && _(o),
461
- "current-change": (e) => _(e),
462
- "prev-click": (e) => _(e),
463
- "next-click": (e) => _(e)
464
- }, le = "ElPagination", ka = U({
465
- name: le,
466
- props: la,
467
- emits: oa,
468
- setup(e, { emit: o, slots: n }) {
469
- const { t: f } = R(), r = O("pagination"), g = Ee().vnode.props || {}, b = he(), m = C(
470
- () => e.small ? "small" : e.size ?? b.value
471
- );
472
- ze(
473
- {
474
- from: "small",
475
- replacement: "size",
476
- version: "3.0.0",
477
- scope: "el-pagination",
478
- ref: "https://element-plus.org/zh-CN/component/pagination.html"
479
- },
480
- C(() => !!e.small)
481
- );
482
- const E = "onUpdate:currentPage" in g || "onUpdate:current-page" in g || "onCurrentChange" in g, N = "onUpdate:pageSize" in g || "onUpdate:page-size" in g || "onSizeChange" in g, u = C(() => {
483
- if (P(e.total) && P(e.pageCount) || !P(e.currentPage) && !E)
484
- return !1;
485
- if (e.layout.includes("sizes")) {
486
- if (P(e.pageCount)) {
487
- if (!P(e.total) && !P(e.pageSize)) {
488
- if (!N)
489
- return !1;
490
- }
491
- } else if (!N)
492
- return !1;
493
- }
494
- return !0;
495
- }), p = M(
496
- P(e.defaultPageSize) ? 10 : e.defaultPageSize
497
- ), h = M(
498
- P(e.defaultCurrentPage) ? 1 : e.defaultCurrentPage
499
- ), L = C({
500
- get() {
501
- return P(e.pageSize) ? p.value : e.pageSize;
502
- },
503
- set(s) {
504
- P(e.pageSize) && (p.value = s), N && (o("update:page-size", s), o("size-change", s));
505
- }
506
- }), x = C(() => {
507
- let s = 0;
508
- return P(e.pageCount) ? P(e.total) || (s = Math.max(1, Math.ceil(e.total / L.value))) : s = e.pageCount, s;
509
- }), v = C({
510
- get() {
511
- return P(e.currentPage) ? h.value : e.currentPage;
512
- },
513
- set(s) {
514
- let c = s;
515
- s < 1 ? c = 1 : s > x.value && (c = x.value), P(e.currentPage) && (h.value = c), E && (o("update:current-page", c), o("current-change", c));
516
- }
517
- });
518
- Y(x, (s) => {
519
- v.value > s && (v.value = s);
520
- }), Y(
521
- [v, L],
522
- (s) => {
523
- o(X, ...s);
524
- },
525
- { flush: "post" }
526
- );
527
- function B(s) {
528
- v.value = s;
529
- }
530
- function G(s) {
531
- L.value = s;
532
- const c = x.value;
533
- v.value > c && (v.value = c);
534
- }
535
- function J() {
536
- e.disabled || (v.value -= 1, o("prev-click", v.value));
537
- }
538
- function Z() {
539
- e.disabled || (v.value += 1, o("next-click", v.value));
540
- }
541
- function q(s, c) {
542
- s && (s.props || (s.props = {}), s.props.class = [s.props.class, c].join(" "));
543
- }
544
- return xe(Se, {
545
- pageCount: x,
546
- disabled: C(() => e.disabled),
547
- currentPage: v,
548
- changeEvent: B,
549
- handleSizeChange: G
550
- }), () => {
551
- if (!u.value)
552
- return Re(le, f("el.pagination.deprecationWarning")), null;
553
- if (!e.layout || e.hideOnSinglePage && x.value <= 1)
554
- return null;
555
- const s = [], c = [], Q = I(
556
- "div",
557
- { class: r.e("rightwrapper") },
558
- c
559
- ), $ = {
560
- prev: I(na, {
561
- disabled: e.disabled,
562
- currentPage: v.value,
563
- prevText: e.prevText,
564
- prevIcon: e.prevIcon,
565
- onClick: J
566
- }),
567
- jumper: I(Ve, {
568
- size: m.value
569
- }),
570
- pager: I(ea, {
571
- currentPage: v.value,
572
- pageCount: x.value,
573
- pagerCount: e.pagerCount,
574
- onChange: B,
575
- disabled: e.disabled,
576
- pageSize: e.pageSize
577
- }),
578
- next: I(Ge, {
579
- disabled: e.disabled,
580
- currentPage: v.value,
581
- pageCount: x.value,
582
- nextText: e.nextText,
583
- nextIcon: e.nextIcon,
584
- onClick: Z
585
- }),
586
- sizes: I(ia, {
587
- pageSize: L.value,
588
- pageSizes: e.pageSizes,
589
- popperClass: e.popperClass,
590
- disabled: e.disabled,
591
- teleported: e.teleported,
592
- size: m.value,
593
- appendSizeTo: e.appendSizeTo
594
- }),
595
- slot: n?.default?.() ?? null,
596
- total: I(sa, { total: P(e.total) ? 0 : e.total })
597
- }, ee = e.layout.split(",").map((a) => a.trim());
598
- let V = !1;
599
- for (const a of ee) {
600
- if (a === "->") {
601
- V = !0;
602
- continue;
603
- }
604
- V ? c.push($[a]) : s.push($[a]);
605
- }
606
- return q(s[0], r.is("first")), q(s.at(-1), r.is("last")), V && c.length > 0 && (q(c[0], r.is("first")), q(
607
- c.at(-1),
608
- r.is("last")
609
- ), s.push(Q)), I(
610
- "div",
611
- {
612
- class: [
613
- r.b(),
614
- r.is("background", e.background),
615
- r.m(m.value)
616
- ]
617
- },
618
- s
619
- );
620
- };
621
- }
1
+ import _sfc_main from "./components/jumper2.mjs";
2
+ import _sfc_main$1 from "./components/next2.mjs";
3
+ import _sfc_main$2 from "./components/pager2.mjs";
4
+ import _sfc_main$3 from "./components/prev2.mjs";
5
+ import _sfc_main$4 from "./components/sizes2.mjs";
6
+ import _sfc_main$5 from "./components/total2.mjs";
7
+ import { CHANGE_EVENT, elPaginationKey, useDeprecated, useGlobalSize, useLocale, useNamespace, useSizeProp } from "element-plus";
8
+ import { computed, defineComponent, getCurrentInstance, h, provide, ref, watch } from "vue";
9
+ import { ArrowLeft, ArrowRight } from "@element-plus/icons-vue";
10
+ import { buildProps, debugWarn, definePropType, iconPropType, isNumber, mutable } from "element-plus/es/utils/index";
11
+ //#region src/pagination/pagination.ts
12
+ /**
13
+ * It it user's responsibility to guarantee that the value of props.total... is number
14
+ * (same as pageSize, defaultPageSize, currentPage, defaultCurrentPage, pageCount)
15
+ * Otherwise we can reasonable infer that the corresponding field is absent
16
+ */
17
+ const isAbsent = (v) => typeof v !== "number";
18
+ const paginationProps = buildProps({
19
+ pageSize: Number,
20
+ defaultPageSize: Number,
21
+ total: Number,
22
+ pageCount: Number,
23
+ pagerCount: {
24
+ type: Number,
25
+ validator: (value) => {
26
+ return isNumber(value) && Math.trunc(value) === value && value > 4 && value < 22 && value % 2 === 1;
27
+ },
28
+ default: 7
29
+ },
30
+ currentPage: Number,
31
+ defaultCurrentPage: Number,
32
+ layout: {
33
+ type: String,
34
+ default: [
35
+ "prev",
36
+ "pager",
37
+ "next",
38
+ "jumper",
39
+ "->",
40
+ "total"
41
+ ].join(", ")
42
+ },
43
+ pageSizes: {
44
+ type: definePropType(Array),
45
+ default: () => mutable([
46
+ 10,
47
+ 20,
48
+ 30,
49
+ 40,
50
+ 50,
51
+ 100
52
+ ])
53
+ },
54
+ popperClass: {
55
+ type: String,
56
+ default: ""
57
+ },
58
+ prevText: {
59
+ type: String,
60
+ default: ""
61
+ },
62
+ prevIcon: {
63
+ type: iconPropType,
64
+ default: () => ArrowLeft
65
+ },
66
+ nextText: {
67
+ type: String,
68
+ default: ""
69
+ },
70
+ nextIcon: {
71
+ type: iconPropType,
72
+ default: () => ArrowRight
73
+ },
74
+ teleported: {
75
+ type: Boolean,
76
+ default: true
77
+ },
78
+ small: Boolean,
79
+ size: useSizeProp,
80
+ background: Boolean,
81
+ disabled: Boolean,
82
+ hideOnSinglePage: Boolean,
83
+ appendSizeTo: String
622
84
  });
623
- export {
624
- ka as default,
625
- oa as paginationEmits,
626
- la as paginationProps
85
+ const paginationEmits = {
86
+ "update:current-page": (val) => isNumber(val),
87
+ "update:page-size": (val) => isNumber(val),
88
+ "size-change": (val) => isNumber(val),
89
+ "change": (currentPage, pageSize) => isNumber(currentPage) && isNumber(pageSize),
90
+ "current-change": (val) => isNumber(val),
91
+ "prev-click": (val) => isNumber(val),
92
+ "next-click": (val) => isNumber(val)
627
93
  };
628
- //# sourceMappingURL=pagination.mjs.map
94
+ const componentName = "ElPagination";
95
+ var pagination_default = defineComponent({
96
+ name: componentName,
97
+ props: paginationProps,
98
+ emits: paginationEmits,
99
+ setup(props, { emit, slots }) {
100
+ const { t } = useLocale();
101
+ const ns = useNamespace("pagination");
102
+ const vnodeProps = getCurrentInstance().vnode.props || {};
103
+ const _globalSize = useGlobalSize();
104
+ const _size = computed(() => props.small ? "small" : props.size ?? _globalSize.value);
105
+ useDeprecated({
106
+ from: "small",
107
+ replacement: "size",
108
+ version: "3.0.0",
109
+ scope: "el-pagination",
110
+ ref: "https://element-plus.org/zh-CN/component/pagination.html"
111
+ }, computed(() => !!props.small));
112
+ const hasCurrentPageListener = "onUpdate:currentPage" in vnodeProps || "onUpdate:current-page" in vnodeProps || "onCurrentChange" in vnodeProps;
113
+ const hasPageSizeListener = "onUpdate:pageSize" in vnodeProps || "onUpdate:page-size" in vnodeProps || "onSizeChange" in vnodeProps;
114
+ const assertValidUsage = computed(() => {
115
+ if (isAbsent(props.total) && isAbsent(props.pageCount)) return false;
116
+ if (!isAbsent(props.currentPage) && !hasCurrentPageListener) return false;
117
+ if (props.layout.includes("sizes")) {
118
+ if (!isAbsent(props.pageCount)) {
119
+ if (!hasPageSizeListener) return false;
120
+ } else if (!isAbsent(props.total)) {
121
+ if (isAbsent(props.pageSize)) {} else if (!hasPageSizeListener) return false;
122
+ }
123
+ }
124
+ return true;
125
+ });
126
+ const innerPageSize = ref(isAbsent(props.defaultPageSize) ? 10 : props.defaultPageSize);
127
+ const innerCurrentPage = ref(isAbsent(props.defaultCurrentPage) ? 1 : props.defaultCurrentPage);
128
+ const pageSizeBridge = computed({
129
+ get() {
130
+ return isAbsent(props.pageSize) ? innerPageSize.value : props.pageSize;
131
+ },
132
+ set(v) {
133
+ if (isAbsent(props.pageSize)) innerPageSize.value = v;
134
+ if (hasPageSizeListener) {
135
+ emit("update:page-size", v);
136
+ emit("size-change", v);
137
+ }
138
+ }
139
+ });
140
+ const pageCountBridge = computed(() => {
141
+ let pageCount = 0;
142
+ if (!isAbsent(props.pageCount)) pageCount = props.pageCount;
143
+ else if (!isAbsent(props.total)) pageCount = Math.max(1, Math.ceil(props.total / pageSizeBridge.value));
144
+ return pageCount;
145
+ });
146
+ const currentPageBridge = computed({
147
+ get() {
148
+ return isAbsent(props.currentPage) ? innerCurrentPage.value : props.currentPage;
149
+ },
150
+ set(v) {
151
+ let newCurrentPage = v;
152
+ if (v < 1) newCurrentPage = 1;
153
+ else if (v > pageCountBridge.value) newCurrentPage = pageCountBridge.value;
154
+ if (isAbsent(props.currentPage)) innerCurrentPage.value = newCurrentPage;
155
+ if (hasCurrentPageListener) {
156
+ emit("update:current-page", newCurrentPage);
157
+ emit("current-change", newCurrentPage);
158
+ }
159
+ }
160
+ });
161
+ watch(pageCountBridge, (val) => {
162
+ if (currentPageBridge.value > val) currentPageBridge.value = val;
163
+ });
164
+ watch([currentPageBridge, pageSizeBridge], (value) => {
165
+ emit(CHANGE_EVENT, ...value);
166
+ }, { flush: "post" });
167
+ function handleCurrentChange(val) {
168
+ currentPageBridge.value = val;
169
+ }
170
+ function handleSizeChange(val) {
171
+ pageSizeBridge.value = val;
172
+ const newPageCount = pageCountBridge.value;
173
+ if (currentPageBridge.value > newPageCount) currentPageBridge.value = newPageCount;
174
+ }
175
+ function prev() {
176
+ if (props.disabled) return;
177
+ currentPageBridge.value -= 1;
178
+ emit("prev-click", currentPageBridge.value);
179
+ }
180
+ function next() {
181
+ if (props.disabled) return;
182
+ currentPageBridge.value += 1;
183
+ emit("next-click", currentPageBridge.value);
184
+ }
185
+ function addClass(element, cls) {
186
+ if (element) {
187
+ if (!element.props) element.props = {};
188
+ element.props.class = [element.props.class, cls].join(" ");
189
+ }
190
+ }
191
+ provide(elPaginationKey, {
192
+ pageCount: pageCountBridge,
193
+ disabled: computed(() => props.disabled),
194
+ currentPage: currentPageBridge,
195
+ changeEvent: handleCurrentChange,
196
+ handleSizeChange
197
+ });
198
+ return () => {
199
+ if (!assertValidUsage.value) {
200
+ debugWarn(componentName, t("el.pagination.deprecationWarning"));
201
+ return null;
202
+ }
203
+ if (!props.layout) return null;
204
+ if (props.hideOnSinglePage && pageCountBridge.value <= 1) return null;
205
+ const rootChildren = [];
206
+ const rightWrapperChildren = [];
207
+ const rightWrapperRoot = h("div", { class: ns.e("rightwrapper") }, rightWrapperChildren);
208
+ const TEMPLATE_MAP = {
209
+ prev: h(_sfc_main$3, {
210
+ disabled: props.disabled,
211
+ currentPage: currentPageBridge.value,
212
+ prevText: props.prevText,
213
+ prevIcon: props.prevIcon,
214
+ onClick: prev
215
+ }),
216
+ jumper: h(_sfc_main, { size: _size.value }),
217
+ pager: h(_sfc_main$2, {
218
+ currentPage: currentPageBridge.value,
219
+ pageCount: pageCountBridge.value,
220
+ pagerCount: props.pagerCount,
221
+ onChange: handleCurrentChange,
222
+ disabled: props.disabled,
223
+ pageSize: props.pageSize
224
+ }),
225
+ next: h(_sfc_main$1, {
226
+ disabled: props.disabled,
227
+ currentPage: currentPageBridge.value,
228
+ pageCount: pageCountBridge.value,
229
+ nextText: props.nextText,
230
+ nextIcon: props.nextIcon,
231
+ onClick: next
232
+ }),
233
+ sizes: h(_sfc_main$4, {
234
+ pageSize: pageSizeBridge.value,
235
+ pageSizes: props.pageSizes,
236
+ popperClass: props.popperClass,
237
+ disabled: props.disabled,
238
+ teleported: props.teleported,
239
+ size: _size.value,
240
+ appendSizeTo: props.appendSizeTo
241
+ }),
242
+ slot: slots?.default?.() ?? null,
243
+ total: h(_sfc_main$5, { total: isAbsent(props.total) ? 0 : props.total })
244
+ };
245
+ const components = props.layout.split(",").map((item) => item.trim());
246
+ let haveRightWrapper = false;
247
+ for (const c of components) {
248
+ if (c === "->") {
249
+ haveRightWrapper = true;
250
+ continue;
251
+ }
252
+ if (haveRightWrapper) rightWrapperChildren.push(TEMPLATE_MAP[c]);
253
+ else rootChildren.push(TEMPLATE_MAP[c]);
254
+ }
255
+ addClass(rootChildren[0], ns.is("first"));
256
+ addClass(rootChildren.at(-1), ns.is("last"));
257
+ if (haveRightWrapper && rightWrapperChildren.length > 0) {
258
+ addClass(rightWrapperChildren[0], ns.is("first"));
259
+ addClass(rightWrapperChildren.at(-1), ns.is("last"));
260
+ rootChildren.push(rightWrapperRoot);
261
+ }
262
+ return h("div", { class: [
263
+ ns.b(),
264
+ ns.is("background", props.background),
265
+ ns.m(_size.value)
266
+ ] }, rootChildren);
267
+ };
268
+ }
269
+ });
270
+ //#endregion
271
+ export { pagination_default as default };
272
+
273
+ //# sourceMappingURL=pagination.mjs.map