@web-utils/component 4.0.16 → 5.0.0-beta01

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 (314) hide show
  1. package/address-input/index.mjs +76 -74
  2. package/affix/index.mjs +71 -78
  3. package/aside-menu/index.mjs +20 -31
  4. package/avatar/index.mjs +94 -82
  5. package/awesome-button/index.mjs +54 -71
  6. package/capsule-tab/index.mjs +27 -32
  7. package/card/index.mjs +86 -69
  8. package/carousel/index.mjs +45 -32
  9. package/chat/index.mjs +441 -266
  10. package/chunk-file-uploader/index.mjs +2 -103
  11. package/chunks/ChunkFileUploader.C3EA0e5t.mjs +114 -0
  12. package/chunks/EditableTree.C_IJBL5b.mjs +648 -0
  13. package/chunks/ElementBaseInfo.DyuFR6fE.mjs +209 -0
  14. package/chunks/ElementDialog.C0IjriTW.mjs +681 -0
  15. package/chunks/ElementForm.ButuYDPA.mjs +627 -0
  16. package/chunks/ElementListeners.Dg3e_dmp.mjs +656 -0
  17. package/chunks/ElementMultiInstance.Dmi79FqA.mjs +290 -0
  18. package/chunks/ElementOtherConfig.C2AddGTp.mjs +51 -0
  19. package/chunks/ElementProperties.CfV8UF7L.mjs +196 -0
  20. package/chunks/ElementTaskConfig.Bn7ycGGn.mjs +446 -0
  21. package/chunks/FlowCondition.C6PdqOAW.mjs +194 -0
  22. package/chunks/FlowDesigner.uJYFfKpR.mjs +5101 -0
  23. package/chunks/FormBlock.BEENc22F.mjs +117 -0
  24. package/chunks/FormCascader.CaM-oEhv.mjs +1226 -0
  25. package/chunks/FormInputTime.Bg3UIP8H.mjs +1773 -0
  26. package/chunks/FormItem.H9OOvNzT.mjs +90 -0
  27. package/chunks/FormItemGroup.D9eRy-cZ.mjs +147 -0
  28. package/chunks/FormSelect.CanodoAI.mjs +1472 -0
  29. package/chunks/FormSwitch.DTqdaFjv.mjs +296 -0
  30. package/chunks/FormTemp.DiI5EfgK.mjs +139 -0
  31. package/chunks/FyCurd.DMj1dMK9.mjs +2622 -0
  32. package/chunks/FyForm.vgR8ujEF.mjs +904 -0
  33. package/chunks/FyFormDesign.DEWT6LsX.mjs +5600 -0
  34. package/chunks/FyUEditor.D_rEYfll.mjs +221 -0
  35. package/chunks/FyUpload.B2QKfTxF.mjs +504 -0
  36. package/chunks/Keyboard.ItiRy7Gb.mjs +379 -0
  37. package/chunks/MonacoEditor.Bd5Kui-Y.mjs +301 -0
  38. package/chunks/PageableTable.Bujb0NUx.mjs +658 -0
  39. package/chunks/RecordVideo.B35_dLty.mjs +116 -0
  40. package/chunks/SignalAndMessage.CYVzlFuL.mjs +198 -0
  41. package/chunks/SplitPane.Dw96M0Yf.mjs +219 -0
  42. package/chunks/TableColumn.DJYkznbJ.mjs +180 -0
  43. package/chunks/TableView.DyIdIxAg.mjs +484 -0
  44. package/chunks/Toolbar.DHuXJAoG.mjs +219 -0
  45. package/chunks/UserTaskListeners.Bp-2qkHs.mjs +599 -0
  46. package/chunks/VueCron.GfjodnyM.mjs +1766 -0
  47. package/chunks/VueTreeSelect.9Ywl-I8e.mjs +1872 -0
  48. package/chunks/_plugin-vue_export-helper.7vrlOII_.mjs +8 -0
  49. package/chunks/checkbox.emIuFmnt.mjs +437 -0
  50. package/chunks/confirmable-mixin.BBil7dto.mjs +1646 -0
  51. package/chunks/core.DJv6Qrae.mjs +51 -0
  52. package/chunks/dataformat.Bfr4nOcA.mjs +144 -0
  53. package/chunks/dic.DgDfnovD.mjs +116 -0
  54. package/chunks/dictionary.5eKjWeAp.mjs +19 -0
  55. package/chunks/dictionary.DxZxP0ej.mjs +87 -0
  56. package/chunks/event.B4iwtUNO.mjs +4 -0
  57. package/chunks/event.eJ-c1Z3a.mjs +224 -0
  58. package/chunks/focus-trap.DT4GnqQI.mjs +211 -0
  59. package/chunks/form-input.D25eDRMq.mjs +34 -0
  60. package/chunks/form-item.CgmUuw_n.mjs +714 -0
  61. package/chunks/form-pick.Axem0gOO.mjs +7 -0
  62. package/chunks/form-validate.B1KPCHqN.mjs +11 -0
  63. package/chunks/icon.CbS8-322.mjs +259 -0
  64. package/chunks/init.DwpukyOB.mjs +115 -0
  65. package/chunks/input.PejnqwSH.mjs +547 -0
  66. package/chunks/install.yLcn5MLL.mjs +84 -0
  67. package/chunks/message.BCmee5N0.mjs +400 -0
  68. package/chunks/overlay.DubSnqma.mjs +122 -0
  69. package/chunks/packages.BGjydzjm.mjs +56 -0
  70. package/chunks/permission.DgEVNWlh.mjs +16 -0
  71. package/chunks/photo-swipe.BB0SJZg9.mjs +55 -0
  72. package/chunks/radio.BotKXqJr.mjs +274 -0
  73. package/chunks/scroll.CzORc5Zk.mjs +28 -0
  74. package/chunks/scrollbar.CAmrlKi9.mjs +345 -0
  75. package/chunks/slot.C6Ozd2e7.mjs +25 -0
  76. package/chunks/style.BmlGmjpO.mjs +325 -0
  77. package/chunks/sub-table-plus-props.B_lLth3j.mjs +28 -0
  78. package/chunks/tab-mixin.u0EZpx3j.mjs +70 -0
  79. package/chunks/tag.DPi-PLbb.mjs +141 -0
  80. package/chunks/teleport._VGEzK4d.mjs +22 -0
  81. package/chunks/tooltip.D50x7Rva.mjs +1926 -0
  82. package/chunks/typescript.DiWBU4nj.mjs +4 -0
  83. package/chunks/use-aria.BW7nWOl1.mjs +17 -0
  84. package/chunks/use-composition.mUaomyno.mjs +47 -0
  85. package/chunks/use-deprecated.BfDSbZS9.mjs +12 -0
  86. package/chunks/use-empty-values.Dy_r78F6.mjs +263 -0
  87. package/chunks/use-form-item.wsRjehHp.mjs +47 -0
  88. package/chunks/use-global-config.C9hs-O_x.mjs +56 -0
  89. package/chunks/use-id.CFO5NeoV.mjs +15 -0
  90. package/chunks/use-size.DxrwTUwf.mjs +18 -0
  91. package/chunks/util.B3sjVZoZ.mjs +103 -0
  92. package/chunks/util.g-WQEec9.mjs +223 -0
  93. package/chunks/utilSelf.ZED4DmCU.mjs +46 -0
  94. package/chunks/utils.Cs2fYBrT.mjs +60 -0
  95. package/chunks/utils.DsGhtCIO.mjs +14 -0
  96. package/chunks/validator.C4-z_t9p.mjs +5 -0
  97. package/chunks/vnode.D_SioRnx.mjs +14 -0
  98. package/code-mirror-editor/index.mjs +89 -88
  99. package/comment/index.mjs +62 -57
  100. package/configComponents.mjs +40 -50
  101. package/confirm-button/index.mjs +34 -46
  102. package/confirmable/index.mjs +7 -17
  103. package/context-menu/index.mjs +195 -174
  104. package/count-up/index.mjs +97 -105
  105. package/custom-scrollbar/index.mjs +91 -98
  106. package/data-box/index.mjs +64 -44
  107. package/data-card/index.mjs +60 -47
  108. package/data-card-text/index.mjs +63 -49
  109. package/data-display/index.mjs +71 -51
  110. package/data-icons/index.mjs +70 -50
  111. package/data-imgtext/index.mjs +67 -43
  112. package/data-operatext/index.mjs +51 -40
  113. package/data-panel/index.mjs +57 -44
  114. package/data-pay/index.mjs +105 -48
  115. package/data-price/index.mjs +48 -40
  116. package/data-progress/index.mjs +67 -44
  117. package/data-rotate/index.mjs +61 -44
  118. package/data-table-picker/index.mjs +119 -71
  119. package/data-tabs/index.mjs +67 -44
  120. package/dialog-form/index.mjs +139 -87
  121. package/dynamic-table/index.mjs +166 -109
  122. package/e-charts/index.mjs +174 -200
  123. package/easy-popup/index.mjs +91 -102
  124. package/editable-progress/index.mjs +112 -83
  125. package/editable-tree/index.mjs +2 -481
  126. package/element-dialog/index.mjs +2 -306
  127. package/ellipsis/index.mjs +124 -148
  128. package/empty-view/index.mjs +48 -65
  129. package/error-view/index.mjs +39 -51
  130. package/flex-column/index.mjs +32 -51
  131. package/flex-item/index.mjs +54 -64
  132. package/flex-row/index.mjs +32 -39
  133. package/flex-scroller/index.mjs +29 -30
  134. package/flow/index.mjs +240 -247
  135. package/flow-designer/index.mjs +2 -4709
  136. package/flow-node/index.mjs +56 -64
  137. package/flow-viewer/index.mjs +159 -157
  138. package/form-block/index.mjs +2 -147
  139. package/form-button/index.mjs +35 -47
  140. package/form-card/index.mjs +14 -25
  141. package/form-cascader/index.mjs +2 -115
  142. package/form-checkbox/index.mjs +89 -70
  143. package/form-checkbox-group/index.mjs +161 -113
  144. package/form-date-picker/index.mjs +155 -142
  145. package/form-holder/index.mjs +137 -109
  146. package/form-input/index.mjs +113 -86
  147. package/form-input-cron-expression/index.mjs +97 -76
  148. package/form-input-email/index.mjs +64 -51
  149. package/form-input-id-card/index.mjs +72 -54
  150. package/form-input-phone-number/index.mjs +71 -56
  151. package/form-input-tag/index.mjs +88 -61
  152. package/form-input-time/index.mjs +2 -73
  153. package/form-item/index.mjs +2 -142
  154. package/form-item-config-provider/index.mjs +46 -60
  155. package/form-item-group/index.mjs +2 -157
  156. package/form-radio-group/index.mjs +161 -121
  157. package/form-select/index.mjs +2 -179
  158. package/form-switch/index.mjs +2 -54
  159. package/form-table/index.mjs +131 -84
  160. package/form-table-plus/index.mjs +164 -108
  161. package/form-textarea/index.mjs +90 -56
  162. package/form-tree-select/index.mjs +89 -71
  163. package/form-tree-select-multiple/index.mjs +92 -77
  164. package/form-view/index.mjs +275 -207
  165. package/fy-array/index.mjs +121 -70
  166. package/fy-article/index.mjs +73 -60
  167. package/fy-cascader/index.mjs +113 -90
  168. package/fy-checkbox/index.mjs +96 -64
  169. package/fy-code/index.mjs +48 -50
  170. package/fy-curd/index.mjs +2 -1879
  171. package/fy-date/index.mjs +76 -41
  172. package/fy-draggable/index.mjs +322 -317
  173. package/fy-dynamic/index.mjs +259 -224
  174. package/fy-empty/index.mjs +35 -36
  175. package/fy-form/index.mjs +2 -640
  176. package/fy-form-design/index.mjs +2 -2852
  177. package/fy-form-design/style.css +1 -1
  178. package/fy-from/crud/zh.d.ts +1 -1
  179. package/fy-input/index.mjs +117 -97
  180. package/fy-input-color/index.mjs +77 -54
  181. package/fy-input-icon/index.mjs +129 -82
  182. package/fy-input-map/index.mjs +242 -183
  183. package/fy-input-number/index.mjs +74 -49
  184. package/fy-input-table/index.mjs +160 -105
  185. package/fy-input-tree/index.mjs +259 -178
  186. package/fy-progress/index.mjs +36 -39
  187. package/fy-radio/index.mjs +53 -37
  188. package/fy-rate/index.mjs +86 -70
  189. package/fy-select/index.mjs +224 -137
  190. package/fy-slider/index.mjs +68 -43
  191. package/fy-switch/index.mjs +67 -41
  192. package/fy-tabs/index.mjs +46 -46
  193. package/fy-time/index.mjs +81 -53
  194. package/fy-title/index.mjs +18 -27
  195. package/fy-tree/index.mjs +382 -286
  196. package/fy-u-editor/index.mjs +2 -357
  197. package/fy-upload/index.mjs +2 -421
  198. package/guide-steps/index.mjs +72 -71
  199. package/helper-function.d.ts +2 -30
  200. package/helper-function.mjs +41 -67
  201. package/highlight-j-s/index.mjs +50 -59
  202. package/icon-card/index.mjs +34 -36
  203. package/icon-temp/index.mjs +27 -27
  204. package/iframe-window/index.mjs +39 -32
  205. package/image-cropper/index.mjs +171 -73
  206. package/image-preview/index.mjs +187 -116
  207. package/image-viewer/index.mjs +69 -66
  208. package/index.d.ts +3 -9
  209. package/index.mjs +174 -489
  210. package/input-number-range/index.mjs +78 -58
  211. package/j-s-x-component/index.mjs +13 -15
  212. package/keyboard/index.mjs +2 -369
  213. package/license/index.mjs +106 -115
  214. package/loading-view/index.mjs +39 -51
  215. package/login/index.mjs +252 -120
  216. package/monaco-editor/index.mjs +2 -7
  217. package/name-avatar/index.mjs +61 -53
  218. package/nav-bar/index.mjs +33 -30
  219. package/not-implement/index.mjs +10 -22
  220. package/notice/index.mjs +100 -93
  221. package/package.json +3 -3
  222. package/page/index.mjs +18 -25
  223. package/page-header/index.mjs +27 -33
  224. package/page-index/index.mjs +121 -99
  225. package/page-index-top/index.mjs +79 -74
  226. package/page-skeleton/index.mjs +47 -44
  227. package/page-skeleton-new/index.mjs +79 -49
  228. package/pageable-table/index.mjs +2 -512
  229. package/pageable-view/index.mjs +279 -274
  230. package/photo-swipe/index.d.ts +4 -0
  231. package/photo-swipe/index.mjs +33 -36
  232. package/picker-table-view/index.mjs +224 -117
  233. package/present-view/index.mjs +266 -196
  234. package/queue/index.mjs +45 -53
  235. package/record-video/index.mjs +2 -134
  236. package/resize-observer/index.mjs +43 -46
  237. package/search/index.mjs +116 -107
  238. package/sign/index.mjs +103 -110
  239. package/sign-panel/index.mjs +182 -141
  240. package/skeleton/index.mjs +51 -54
  241. package/skeleton-panel/index.mjs +33 -37
  242. package/split-pane/index.mjs +3 -196
  243. package/stateful/index.mjs +69 -73
  244. package/static-pageable-table/index.mjs +72 -64
  245. package/sub-table/index.mjs +508 -206
  246. package/sub-table-plus/index.mjs +592 -230
  247. package/swiper/index.mjs +128 -120
  248. package/tab/index.mjs +117 -119
  249. package/tab-item/index.mjs +48 -56
  250. package/table-column/index.mjs +2 -225
  251. package/table-view/index.mjs +3 -326
  252. package/tabs-view/index.mjs +109 -104
  253. package/tag-render/index.mjs +79 -67
  254. package/text-ellipsis/index.mjs +94 -77
  255. package/toolbar/index.mjs +2 -254
  256. package/toolbar-button/index.mjs +145 -120
  257. package/verify/index.mjs +58 -64
  258. package/vue-cron/index.mjs +2 -1180
  259. package/vue-qr-code/index.mjs +30 -54
  260. package/vue-quill-editor/index.mjs +123 -99
  261. package/vue-tags-input/index.mjs +348 -431
  262. package/vue-tree-select/index.mjs +2 -2627
  263. package/vue-video-player/index.mjs +135 -136
  264. package/watermark/index.mjs +46 -74
  265. package/web-types.json +197 -975
  266. package/x-input-tag/index.mjs +144 -106
  267. package/chunks/ElementBaseInfo.ZADwixb5.mjs +0 -125
  268. package/chunks/ElementForm.CQ3PN5qj.mjs +0 -223
  269. package/chunks/ElementListeners.De_PRuIm.mjs +0 -215
  270. package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +0 -181
  271. package/chunks/ElementOtherConfig.B1NfMTYh.mjs +0 -60
  272. package/chunks/ElementProperties.CosfDrlW.mjs +0 -112
  273. package/chunks/ElementTaskConfig.Bko0kgTp.mjs +0 -317
  274. package/chunks/FlowCondition.Y6qEYi1T.mjs +0 -102
  275. package/chunks/FormTemp.BQxO5IQq.mjs +0 -123
  276. package/chunks/MonacoEditor.D31t4FTy.mjs +0 -327
  277. package/chunks/SignalAndMessage.Bb5PFX0N.mjs +0 -85
  278. package/chunks/UserTaskListeners.Bv3BDfEI.mjs +0 -169
  279. package/chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs +0 -10
  280. package/chunks/confirmable-mixin.B2TtLAdk.mjs +0 -86
  281. package/chunks/core.0Exl13Mz.mjs +0 -54
  282. package/chunks/dataformat.CpqOeGBl.mjs +0 -154
  283. package/chunks/dic.Dkl-leRW.mjs +0 -128
  284. package/chunks/dictionary.DGt59Ir7.mjs +0 -68
  285. package/chunks/dictionary.DqiP9x2m.mjs +0 -25
  286. package/chunks/event.9aDS6jcw.mjs +0 -236
  287. package/chunks/form-input.CvFdwlEV.mjs +0 -31
  288. package/chunks/form-item.LWjePsPa.mjs +0 -233
  289. package/chunks/form-pick.BFTIVn_i.mjs +0 -11
  290. package/chunks/form-validate.CVarNHKX.mjs +0 -12
  291. package/chunks/helper.BiMLcEEk.mjs +0 -41
  292. package/chunks/index.9OxHjTIE.mjs +0 -16
  293. package/chunks/index.B2TRddqf.mjs +0 -184
  294. package/chunks/index.BmYCjxZQ.mjs +0 -47
  295. package/chunks/init.DAsXSoLW.mjs +0 -122
  296. package/chunks/packages.ByyangTp.mjs +0 -58
  297. package/chunks/permission.CO31YIkD.mjs +0 -16
  298. package/chunks/slot.DXIbhGat.mjs +0 -27
  299. package/chunks/sub-table-plus-props.BVsD71hT.mjs +0 -30
  300. package/chunks/tab-mixin.BNK6dxLN.mjs +0 -81
  301. package/chunks/util.DqFv_pWg.mjs +0 -241
  302. package/chunks/utilSelf.Csq1766E.mjs +0 -48
  303. package/chunks/utils.DRcxC1Fb.mjs +0 -60
  304. package/color-picker/index.mjs +0 -78
  305. package/egd-collapse/index.mjs +0 -62
  306. package/egd-collapse-item/index.mjs +0 -72
  307. package/form-input-number/index.mjs +0 -69
  308. package/form-input-number/style.css +0 -1
  309. package/input-number/index.mjs +0 -232
  310. package/input-number/style.css +0 -1
  311. package/keep-view-alive/index.mjs +0 -117
  312. package/search-popover/index.mjs +0 -118
  313. package/search-popover/style.css +0 -1
  314. /package/{base.css → utils/style.css} +0 -0
@@ -0,0 +1,714 @@
1
+ import { _ as e, d as t, m as n, o as r, p as i, r as a, t as o } from "./install.yLcn5MLL.mjs";
2
+ import { i as s } from "./use-size.DxrwTUwf.mjs";
3
+ import { F as c, M as l, N as u, O as d, R as f, b as p, j as m, k as h, n as g, w as ee } from "./style.BmlGmjpO.mjs";
4
+ import { a as _, i as te, o as v } from "./use-form-item.wsRjehHp.mjs";
5
+ import { t as ne } from "./use-id.CFO5NeoV.mjs";
6
+ import { t as y } from "./typescript.DiWBU4nj.mjs";
7
+ import { n as b, u as x } from "./util.B3sjVZoZ.mjs";
8
+ import { Fragment as S, TransitionGroup as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as re, createElementVNode as D, createTextVNode as ie, createVNode as O, defineComponent as k, inject as A, nextTick as ae, normalizeClass as j, normalizeStyle as M, onBeforeUnmount as oe, onMounted as se, onUpdated as N, openBlock as P, provide as ce, reactive as F, ref as I, renderSlot as L, resolveDynamicComponent as le, toDisplayString as ue, toRefs as de, unref as R, useSlots as fe, watch as z, withCtx as B } from "vue";
9
+ import { castArray as V, cloneDeep as H } from "lodash-unified";
10
+ import pe from "async-validator";
11
+ var U = m({
12
+ ...m({
13
+ size: {
14
+ type: String,
15
+ values: s
16
+ },
17
+ disabled: Boolean
18
+ }),
19
+ model: Object,
20
+ rules: { type: l(Object) },
21
+ labelPosition: {
22
+ type: String,
23
+ values: [
24
+ "left",
25
+ "right",
26
+ "top"
27
+ ],
28
+ default: "right"
29
+ },
30
+ requireAsteriskPosition: {
31
+ type: String,
32
+ values: ["left", "right"],
33
+ default: "left"
34
+ },
35
+ labelWidth: {
36
+ type: [String, Number],
37
+ default: ""
38
+ },
39
+ labelSuffix: {
40
+ type: String,
41
+ default: ""
42
+ },
43
+ inline: Boolean,
44
+ inlineMessage: Boolean,
45
+ statusIcon: Boolean,
46
+ showMessage: {
47
+ type: Boolean,
48
+ default: !0
49
+ },
50
+ validateOnRuleChange: {
51
+ type: Boolean,
52
+ default: !0
53
+ },
54
+ hideRequiredAsterisk: Boolean,
55
+ scrollToError: Boolean,
56
+ scrollIntoViewOptions: {
57
+ type: l([Object, Boolean]),
58
+ default: !0
59
+ }
60
+ }), me = { validate: (n, r, i) => (t(n) || e(n)) && c(r) && e(i) }, he = m({
61
+ label: String,
62
+ labelWidth: { type: [String, Number] },
63
+ labelPosition: {
64
+ type: String,
65
+ values: [
66
+ "left",
67
+ "right",
68
+ "top",
69
+ ""
70
+ ],
71
+ default: ""
72
+ },
73
+ prop: { type: l([String, Array]) },
74
+ required: {
75
+ type: Boolean,
76
+ default: void 0
77
+ },
78
+ rules: { type: l([Object, Array]) },
79
+ error: String,
80
+ validateStatus: {
81
+ type: String,
82
+ values: [
83
+ "",
84
+ "error",
85
+ "validating",
86
+ "success"
87
+ ]
88
+ },
89
+ for: String,
90
+ inlineMessage: {
91
+ type: Boolean,
92
+ default: void 0
93
+ },
94
+ showMessage: {
95
+ type: Boolean,
96
+ default: !0
97
+ },
98
+ size: {
99
+ type: String,
100
+ values: s
101
+ }
102
+ }), ge = (e) => [...new Set(e)], _e = (e) => !e && e !== 0 ? [] : t(e) ? e : [e], W = "ElForm";
103
+ function G() {
104
+ let e = I([]), t = w(() => {
105
+ if (!e.value.length) return "0";
106
+ let t = Math.max(...e.value);
107
+ return t ? `${t}px` : "";
108
+ });
109
+ function n(n) {
110
+ let r = e.value.indexOf(n);
111
+ return r === -1 && t.value === "0" && d(W, `unexpected width ${n}`), r;
112
+ }
113
+ function r(t, r) {
114
+ if (t && r) {
115
+ let i = n(r);
116
+ e.value.splice(i, 1, t);
117
+ } else t && e.value.push(t);
118
+ }
119
+ function i(t) {
120
+ let r = n(t);
121
+ r > -1 && e.value.splice(r, 1);
122
+ }
123
+ return {
124
+ autoLabelWidth: t,
125
+ registerLabelWidth: r,
126
+ deregisterLabelWidth: i
127
+ };
128
+ }
129
+ var K = (e, n) => {
130
+ let r = V(n).map((e) => t(e) ? e.join(".") : e);
131
+ return r.length > 0 ? e.filter((e) => e.propString && r.includes(e.propString)) : e;
132
+ }, q = "ElForm", ve = /* @__PURE__ */ k({
133
+ name: q,
134
+ __name: "form",
135
+ props: U,
136
+ emits: me,
137
+ setup(e, { expose: n, emit: a }) {
138
+ let o = e, s = a, c = I(), l = F([]), f = /* @__PURE__ */ new Map(), p = te(), m = r("form"), h = w(() => {
139
+ let { labelPosition: e, inline: t } = o;
140
+ return [
141
+ m.b(),
142
+ m.m(p.value || "default"),
143
+ {
144
+ [m.m(`label-${e}`)]: e,
145
+ [m.m("inline")]: t
146
+ }
147
+ ];
148
+ }), g = (e) => K(l, [e])[0], ee = (e) => {
149
+ l.push(e), e.propString && (f.has(e.propString) ? e.setInitialValue(f.get(e.propString)) : f.set(e.propString, H(e.fieldValue)));
150
+ }, v = (e) => {
151
+ e.prop && l.splice(l.indexOf(e), 1);
152
+ }, ne = (e) => {
153
+ if (!o.model) {
154
+ d(q, "model is required for setInitialValues to work.");
155
+ return;
156
+ }
157
+ if (!e) {
158
+ d(q, "initModel is required for setInitialValues to work.");
159
+ return;
160
+ }
161
+ for (let t of f.keys()) f.set(t, H(u(e, t).value));
162
+ l.forEach((t) => {
163
+ t.prop && t.setInitialValue(u(e, t.prop).value);
164
+ });
165
+ }, y = (e = []) => {
166
+ if (!o.model) {
167
+ d(q, "model is required for resetFields to work.");
168
+ return;
169
+ }
170
+ K(l, e).forEach((e) => e.resetField());
171
+ let n = new Set(l.map((e) => e.propString).filter(Boolean)), r = e.length > 0 ? V(e).map((e) => t(e) ? e.join(".") : e) : [...f.keys()];
172
+ for (let e of r) !n.has(e) && f.has(e) && (u(o.model, e).value = H(f.get(e)));
173
+ }, b = (e = []) => {
174
+ K(l, e).forEach((e) => e.clearValidate());
175
+ }, x = w(() => {
176
+ let e = !!o.model;
177
+ return e || d(q, "model is required for validate to work."), e;
178
+ }), S = (e) => {
179
+ if (l.length === 0) return [];
180
+ let t = K(l, e);
181
+ return t.length ? t : (d(q, "please pass correct props!"), []);
182
+ }, C = async (e) => E(void 0, e), T = async (e = []) => {
183
+ if (!x.value) return !1;
184
+ let t = S(e);
185
+ if (t.length === 0) return !0;
186
+ let n = {};
187
+ for (let e of t) try {
188
+ await e.validate(""), e.validateState === "error" && !e.error && e.resetField();
189
+ } catch (e) {
190
+ n = {
191
+ ...n,
192
+ ...e
193
+ };
194
+ }
195
+ return Object.keys(n).length === 0 ? !0 : Promise.reject(n);
196
+ }, E = async (e = [], t) => {
197
+ let n = !1, r = !i(t);
198
+ try {
199
+ return n = await T(e), n === !0 && await (t == null ? void 0 : t(n)), n;
200
+ } catch (e) {
201
+ if (e instanceof Error) throw e;
202
+ let i = e;
203
+ if (o.scrollToError) {
204
+ var a;
205
+ c.value && ((a = c.value.querySelector(`.${m.b()}-item.is-error`)) == null || a.scrollIntoView(o.scrollIntoViewOptions));
206
+ }
207
+ return !n && await (t == null ? void 0 : t(!1, i)), r && Promise.reject(i);
208
+ }
209
+ }, D = (e) => {
210
+ var t;
211
+ let n = g(e);
212
+ n && ((t = n.$el) == null || t.scrollIntoView(o.scrollIntoViewOptions));
213
+ };
214
+ return z(() => o.rules, () => {
215
+ o.validateOnRuleChange && C().catch((e) => d(e));
216
+ }, {
217
+ deep: !0,
218
+ flush: "post"
219
+ }), ce(_, F({
220
+ ...de(o),
221
+ emit: s,
222
+ resetFields: y,
223
+ clearValidate: b,
224
+ validateField: E,
225
+ getField: g,
226
+ addField: ee,
227
+ removeField: v,
228
+ setInitialValues: ne,
229
+ ...G()
230
+ })), n({
231
+ validate: C,
232
+ validateField: E,
233
+ resetFields: y,
234
+ clearValidate: b,
235
+ scrollToField: D,
236
+ getField: g,
237
+ fields: l,
238
+ setInitialValues: ne
239
+ }), (e, t) => (P(), re("form", {
240
+ ref_key: "formRef",
241
+ ref: c,
242
+ class: j(h.value)
243
+ }, [L(e.$slots, "default")], 2));
244
+ }
245
+ }), J = "ElLabelWrap", ye = /* @__PURE__ */ k({
246
+ name: J,
247
+ props: {
248
+ isAutoWidth: Boolean,
249
+ updateAll: Boolean
250
+ },
251
+ setup(e, { slots: t }) {
252
+ let n = A(_, void 0), i = A(v);
253
+ i || h(J, "usage: <el-form-item><label-wrap /></el-form-item>");
254
+ let a = r("form"), o = I(), s = I(0), c = () => {
255
+ var e;
256
+ if ((e = o.value) != null && e.firstElementChild) {
257
+ let e = window.getComputedStyle(o.value.firstElementChild).width;
258
+ return Math.ceil(Number.parseFloat(e));
259
+ } else return 0;
260
+ }, l = (r = "update") => {
261
+ ae(() => {
262
+ t.default && e.isAutoWidth && (r === "update" ? s.value = c() : r === "remove" && (n == null || n.deregisterLabelWidth(s.value)));
263
+ });
264
+ }, u = () => l("update");
265
+ return se(() => {
266
+ u();
267
+ }), oe(() => {
268
+ l("remove");
269
+ }), N(() => u()), z(s, (t, r) => {
270
+ e.updateAll && (n == null || n.registerLabelWidth(t, r));
271
+ }), p(w(() => {
272
+ var e;
273
+ return ((e = o.value) == null ? void 0 : e.firstElementChild) ?? null;
274
+ }), u), () => {
275
+ var r;
276
+ if (!t) return null;
277
+ let { isAutoWidth: c } = e;
278
+ if (c) {
279
+ var l;
280
+ let e = n == null ? void 0 : n.autoLabelWidth, r = i == null ? void 0 : i.hasLabel, c = {};
281
+ if (r && e && e !== "auto") {
282
+ let t = Math.max(0, Number.parseInt(e, 10) - s.value), r = (i.labelPosition || n.labelPosition) === "left" ? "marginRight" : "marginLeft";
283
+ t && (c[r] = `${t}px`);
284
+ }
285
+ return O("div", {
286
+ ref: o,
287
+ class: [a.be("item", "label-wrap")],
288
+ style: c
289
+ }, [(l = t.default) == null ? void 0 : l.call(t)]);
290
+ } else return O(S, { ref: o }, [(r = t.default) == null ? void 0 : r.call(t)]);
291
+ };
292
+ }
293
+ }), be = ["role", "aria-labelledby"], Y = /* @__PURE__ */ k({
294
+ name: "ElFormItem",
295
+ __name: "form-item",
296
+ props: he,
297
+ setup(e, { expose: n }) {
298
+ let a = e, o = fe(), s = A(_, void 0), l = A(v, void 0), d = te(void 0, { formItem: !1 }), f = r("form-item"), p = ne().value, m = I([]), h = I(""), y = ee(h, 100), b = I(""), x = I(), S, k = !1, N = w(() => a.labelPosition || (s == null ? void 0 : s.labelPosition)), U = w(() => N.value === "top" ? {} : { width: g(a.labelWidth ?? (s == null ? void 0 : s.labelWidth)) }), me = w(() => {
299
+ if (N.value === "top" || s != null && s.inline || !a.label && !a.labelWidth && ve) return {};
300
+ let e = g(a.labelWidth ?? (s == null ? void 0 : s.labelWidth));
301
+ return !a.label && !o.label ? { marginLeft: e } : {};
302
+ }), he = w(() => [
303
+ f.b(),
304
+ f.m(d.value),
305
+ f.is("error", h.value === "error"),
306
+ f.is("validating", h.value === "validating"),
307
+ f.is("success", h.value === "success"),
308
+ f.is("required", Ce.value || a.required),
309
+ f.is("no-asterisk", s == null ? void 0 : s.hideRequiredAsterisk),
310
+ (s == null ? void 0 : s.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
311
+ {
312
+ [f.m("feedback")]: s == null ? void 0 : s.statusIcon,
313
+ [f.m(`label-${N.value}`)]: N.value
314
+ }
315
+ ]), ge = w(() => c(a.inlineMessage) ? a.inlineMessage : (s == null ? void 0 : s.inlineMessage) || !1), _e = w(() => [f.e("error"), { [f.em("error", "inline")]: ge.value }]), W = w(() => a.prop ? t(a.prop) ? a.prop.join(".") : a.prop : ""), G = w(() => !!(a.label || o.label)), K = w(() => a.for ?? (m.value.length === 1 ? m.value[0] : void 0)), q = w(() => !K.value && G.value), ve = !!l, J = w(() => {
316
+ let e = s == null ? void 0 : s.model;
317
+ if (!(!e || !a.prop)) return u(e, a.prop).value;
318
+ }), Y = w(() => {
319
+ let { required: e } = a, t = [];
320
+ a.rules && t.push(...V(a.rules));
321
+ let n = s == null ? void 0 : s.rules;
322
+ if (n && a.prop) {
323
+ let e = u(n, a.prop).value;
324
+ e && t.push(...V(e));
325
+ }
326
+ if (e !== void 0) {
327
+ let n = t.map((e, t) => [e, t]).filter(([e]) => "required" in e);
328
+ if (n.length > 0) for (let [r, i] of n) r.required !== e && (t[i] = {
329
+ ...r,
330
+ required: e
331
+ });
332
+ else t.push({ required: e });
333
+ }
334
+ return t;
335
+ }), xe = w(() => Y.value.length > 0), Se = (e) => Y.value.filter((n) => !n.trigger || !e ? !0 : t(n.trigger) ? n.trigger.includes(e) : n.trigger === e).map(({ trigger: e, ...t }) => t), Ce = w(() => Y.value.some((e) => e.required)), we = w(() => y.value === "error" && a.showMessage && ((s == null ? void 0 : s.showMessage) ?? !0)), X = w(() => `${a.label || ""}${(s == null ? void 0 : s.labelSuffix) || ""}`), Z = (e) => {
336
+ h.value = e;
337
+ }, Te = (e) => {
338
+ var t;
339
+ let { errors: n, fields: r } = e;
340
+ (!n || !r) && console.error(e), Z("error"), b.value = n ? (n == null || (t = n[0]) == null ? void 0 : t.message) ?? `${a.prop} is required` : "", s == null || s.emit("validate", a.prop, !1, b.value);
341
+ }, Ee = () => {
342
+ Z("success"), s == null || s.emit("validate", a.prop, !0, "");
343
+ }, De = async (e) => {
344
+ let t = W.value;
345
+ return new pe({ [t]: e }).validate({ [t]: J.value }, { firstFields: !0 }).then(() => (Ee(), !0)).catch((e) => (Te(e), Promise.reject(e)));
346
+ }, Oe = async (e, t) => {
347
+ if (k || !a.prop) return !1;
348
+ let n = i(t);
349
+ if (!xe.value) return t == null || t(!1), !1;
350
+ let r = Se(e);
351
+ return r.length === 0 ? (t == null || t(!0), !0) : (Z("validating"), De(r).then(() => (t == null || t(!0), !0)).catch((e) => {
352
+ let { fields: r } = e;
353
+ return t == null || t(!1, r), n ? !1 : Promise.reject(r);
354
+ }));
355
+ }, Q = () => {
356
+ Z(""), b.value = "", k = !1;
357
+ }, $ = async () => {
358
+ let e = s == null ? void 0 : s.model;
359
+ if (!e || !a.prop) return;
360
+ let t = u(e, a.prop);
361
+ k = !0, t.value = H(S), await ae(), Q(), k = !1;
362
+ }, ke = (e) => {
363
+ m.value.includes(e) || m.value.push(e);
364
+ }, Ae = (e) => {
365
+ m.value = m.value.filter((t) => t !== e);
366
+ }, je = (e) => {
367
+ S = H(e);
368
+ };
369
+ z(() => a.error, (e) => {
370
+ b.value = e || "", Z(e ? "error" : "");
371
+ }, { immediate: !0 }), z(() => a.validateStatus, (e) => Z(e || ""));
372
+ let Me = F({
373
+ ...de(a),
374
+ $el: x,
375
+ size: d,
376
+ validateMessage: b,
377
+ validateState: h,
378
+ labelId: p,
379
+ inputIds: m,
380
+ isGroup: q,
381
+ hasLabel: G,
382
+ fieldValue: J,
383
+ addInputId: ke,
384
+ removeInputId: Ae,
385
+ resetField: $,
386
+ clearValidate: Q,
387
+ validate: Oe,
388
+ propString: W,
389
+ setInitialValue: je
390
+ });
391
+ return ce(v, Me), se(() => {
392
+ a.prop && (je(J.value), s == null || s.addField(Me));
393
+ }), oe(() => {
394
+ s == null || s.removeField(Me);
395
+ }), n({
396
+ size: d,
397
+ validateMessage: b,
398
+ validateState: h,
399
+ validate: Oe,
400
+ clearValidate: Q,
401
+ resetField: $,
402
+ setInitialValue: je
403
+ }), (t, n) => {
404
+ var r;
405
+ return P(), re("div", {
406
+ ref_key: "formItemRef",
407
+ ref: x,
408
+ class: j(he.value),
409
+ role: q.value ? "group" : void 0,
410
+ "aria-labelledby": q.value ? R(p) : void 0
411
+ }, [O(R(ye), {
412
+ "is-auto-width": U.value.width === "auto",
413
+ "update-all": ((r = R(s)) == null ? void 0 : r.labelWidth) === "auto"
414
+ }, {
415
+ default: B(() => [e.label || t.$slots.label ? (P(), T(le(K.value ? "label" : "div"), {
416
+ key: 0,
417
+ id: R(p),
418
+ for: K.value,
419
+ class: j(R(f).e("label")),
420
+ style: M(U.value)
421
+ }, {
422
+ default: B(() => [L(t.$slots, "label", { label: X.value }, () => [ie(ue(X.value), 1)])]),
423
+ _: 3
424
+ }, 8, [
425
+ "id",
426
+ "for",
427
+ "class",
428
+ "style"
429
+ ])) : E("v-if", !0)]),
430
+ _: 3
431
+ }, 8, ["is-auto-width", "update-all"]), D("div", {
432
+ class: j(R(f).e("content")),
433
+ style: M(me.value)
434
+ }, [L(t.$slots, "default"), O(C, { name: `${R(f).namespace.value}-zoom-in-top` }, {
435
+ default: B(() => [we.value ? L(t.$slots, "error", {
436
+ key: 0,
437
+ error: b.value
438
+ }, () => [D("div", { class: j(_e.value) }, ue(b.value), 3)]) : E("v-if", !0)]),
439
+ _: 3
440
+ }, 8, ["name"])], 6)], 10, be);
441
+ };
442
+ }
443
+ });
444
+ o(ve, { FormItem: Y });
445
+ var xe = a(Y), Se = m({
446
+ tag: {
447
+ type: String,
448
+ default: "div"
449
+ },
450
+ span: {
451
+ type: Number,
452
+ default: 24
453
+ },
454
+ offset: {
455
+ type: Number,
456
+ default: 0
457
+ },
458
+ pull: {
459
+ type: Number,
460
+ default: 0
461
+ },
462
+ push: {
463
+ type: Number,
464
+ default: 0
465
+ },
466
+ xs: {
467
+ type: l([Number, Object]),
468
+ default: () => y({})
469
+ },
470
+ sm: {
471
+ type: l([Number, Object]),
472
+ default: () => y({})
473
+ },
474
+ md: {
475
+ type: l([Number, Object]),
476
+ default: () => y({})
477
+ },
478
+ lg: {
479
+ type: l([Number, Object]),
480
+ default: () => y({})
481
+ },
482
+ xl: {
483
+ type: l([Number, Object]),
484
+ default: () => y({})
485
+ }
486
+ }), Ce = Symbol("rowContextKey"), we = o(/* @__PURE__ */ k({
487
+ name: "ElCol",
488
+ __name: "col",
489
+ props: Se,
490
+ setup(e) {
491
+ let t = e, { gutter: i } = A(Ce, { gutter: w(() => 0) }), a = r("col"), o = w(() => {
492
+ let e = {};
493
+ return i.value && (e.paddingLeft = e.paddingRight = `${i.value / 2}px`), e;
494
+ }), s = w(() => {
495
+ let e = [];
496
+ return [
497
+ "span",
498
+ "offset",
499
+ "pull",
500
+ "push"
501
+ ].forEach((n) => {
502
+ let r = t[n];
503
+ f(r) && (n === "span" ? e.push(a.b(`${t[n]}`)) : r > 0 && e.push(a.b(`${n}-${t[n]}`)));
504
+ }), [
505
+ "xs",
506
+ "sm",
507
+ "md",
508
+ "lg",
509
+ "xl"
510
+ ].forEach((r) => {
511
+ f(t[r]) ? e.push(a.b(`${r}-${t[r]}`)) : n(t[r]) && Object.entries(t[r]).forEach(([t, n]) => {
512
+ e.push(t === "span" ? a.b(`${r}-${n}`) : a.b(`${r}-${t}-${n}`));
513
+ });
514
+ }), i.value && e.push(a.is("guttered")), [a.b(), e];
515
+ });
516
+ return (t, n) => (P(), T(le(e.tag), {
517
+ class: j(s.value),
518
+ style: M(o.value)
519
+ }, {
520
+ default: B(() => [L(t.$slots, "default")]),
521
+ _: 3
522
+ }, 8, ["class", "style"]));
523
+ }
524
+ })), X = ["span"], Z = x(we), Te = Z.filter((e) => !X.includes(e)), Ee = [
525
+ "label",
526
+ "prop",
527
+ "rules",
528
+ "labelWidth",
529
+ "required"
530
+ ], De = x(xe), Oe = De.filter((e) => !Ee.includes(e)), Q = [
531
+ "wrapCol",
532
+ "wrapFormItem",
533
+ "unwrap",
534
+ "prefixConfig",
535
+ "block",
536
+ "prefixPick",
537
+ "picker",
538
+ "half",
539
+ "tips",
540
+ "hideLabel",
541
+ "fixedSpan",
542
+ ...Z,
543
+ ...De
544
+ ], $ = [
545
+ "disabled",
546
+ "size",
547
+ "statusIcon",
548
+ "inlineMessage",
549
+ "autoLabelWidth",
550
+ "hideRequiredAsterisk",
551
+ "$emit",
552
+ "validate",
553
+ "clearValidate"
554
+ ], ke = [
555
+ "$emit",
556
+ "validate",
557
+ "clearValidate"
558
+ ], Ae = {
559
+ name: "FormInput",
560
+ inject: {
561
+ elForm: { default: {} },
562
+ formItemGroup: { default: {} },
563
+ formHolder: { default: {} }
564
+ },
565
+ provide() {
566
+ return {
567
+ elForm: this.proxyForm,
568
+ formItemGroup: this
569
+ };
570
+ },
571
+ props: {
572
+ embed: Boolean,
573
+ disabled: Boolean,
574
+ fixedSpan: Number,
575
+ wrapCol: {
576
+ type: Boolean,
577
+ default: !0
578
+ },
579
+ wrapFormItem: {
580
+ type: Boolean,
581
+ default: !0
582
+ },
583
+ unwrap: Boolean,
584
+ half: Boolean,
585
+ prefixConfig: Boolean,
586
+ prefixAdd: Boolean,
587
+ prefixPick: Boolean,
588
+ block: Boolean,
589
+ formItemClass: String,
590
+ tips: String,
591
+ trigger: {
592
+ type: String,
593
+ default: "blur"
594
+ },
595
+ hideLabel: Boolean,
596
+ labelColspan: [Number, String],
597
+ inputColspan: [Number, String],
598
+ labelRowspan: [Number, String],
599
+ inputRowspan: [Number, String],
600
+ prop: String,
601
+ label: String,
602
+ labelWidth: String,
603
+ required: Boolean,
604
+ rules: [Object, Array],
605
+ error: String,
606
+ showMessage: {
607
+ type: Boolean,
608
+ default: !0
609
+ },
610
+ inlineMessage: {
611
+ type: [String, Boolean],
612
+ default: ""
613
+ },
614
+ size: String,
615
+ validateStatus: String,
616
+ for: String,
617
+ span: {
618
+ type: Number,
619
+ default: 12
620
+ },
621
+ offset: Number,
622
+ push: Number,
623
+ pull: Number,
624
+ xs: [Number, Object],
625
+ sm: [Number, Object],
626
+ md: [Number, Object],
627
+ lg: [Number, Object],
628
+ xl: [Number, Object],
629
+ tag: String
630
+ },
631
+ data() {
632
+ let e = {};
633
+ return $.forEach((t) => {
634
+ e[t] = null;
635
+ }), { proxyForm: e };
636
+ },
637
+ computed: {
638
+ prefix() {
639
+ return this.prefixConfig ? "请配置" : this.prefixPick || this.picker ? "请选择" : this.prefixAdd ? "请添加" : "请输入";
640
+ },
641
+ message() {
642
+ var e;
643
+ return `${this.prefix}${((e = this.label) == null ? void 0 : e.replace(":", "")) || ""}`;
644
+ },
645
+ computeRules() {
646
+ var e;
647
+ let t = [...this.rules || []], n = t.find((e) => e.required);
648
+ if (this.required || n || (e = this.formHolder.requiredFields) != null && e.includes(this.prop)) {
649
+ let e = t.find((e) => e.required);
650
+ e ? e.ref ? e.label = e.label || this.label : e.message = e.message || this.message : t.unshift(this.getRequireRule());
651
+ }
652
+ return t.concat(this.getRules());
653
+ },
654
+ computeSpan() {
655
+ return this.block ? 24 : this.span;
656
+ },
657
+ formItemProps() {
658
+ return b({
659
+ ...this.$props,
660
+ ...this.$attrs
661
+ }, Q);
662
+ },
663
+ elFormItemProps() {
664
+ return b({
665
+ ...this.$props,
666
+ ...this.$attrs
667
+ }, Oe);
668
+ },
669
+ elColProps() {
670
+ return b({
671
+ ...this.$props,
672
+ ...this.$attrs
673
+ }, Te);
674
+ },
675
+ formCfg() {
676
+ let e = { disabled: this.disabled };
677
+ return $.forEach((t) => {
678
+ e[t] = this.elForm[t];
679
+ }), e;
680
+ }
681
+ },
682
+ watch: {
683
+ computeRules() {
684
+ var e, t;
685
+ (e = this.elForm) == null || (t = e.clearValidate) == null || t.call(e, this.prop);
686
+ },
687
+ formCfg: {
688
+ immediate: !0,
689
+ handler() {
690
+ var e;
691
+ this.proxyForm.disabled = (e = this.formHolder.enabledFields) != null && e.includes(this.prop) ? !1 : (this.elForm || {}).disabled, $.forEach((e) => {
692
+ if (e !== "disabled") if (ke.includes(e)) {
693
+ var t;
694
+ this.proxyForm[e] = (t = this.elForm[e]) == null ? void 0 : t.bind(this.elForm);
695
+ } else this.proxyForm[e] = this.elForm[e];
696
+ });
697
+ }
698
+ }
699
+ },
700
+ methods: {
701
+ getRules() {
702
+ return [];
703
+ },
704
+ getRequireRule() {
705
+ return {
706
+ required: !0,
707
+ trigger: this.trigger,
708
+ message: this.message
709
+ };
710
+ }
711
+ }
712
+ };
713
+ //#endregion
714
+ export { ge as i, _e as n, V as r, Ae as t };
@@ -0,0 +1,7 @@
1
+ //#region src/components/form/form-pick.js
2
+ var e = { props: { prefixPick: {
3
+ type: Boolean,
4
+ default: !0
5
+ } } };
6
+ //#endregion
7
+ export { e as t };