@silver-formily/element-plus 0.0.1-alpha.0 → 0.0.1-alpha.1

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