@web-utils/component 4.0.16 → 5.0.0-beta02

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