@web-utils/form-ui 1.0.0-beta56 → 1.0.0-beta58

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 (153) hide show
  1. package/chunks/-qKZw-3p2.mjs +23 -0
  2. package/chunks/{CauzhVSa2.mjs → 4-vc_q1t.mjs} +12 -12
  3. package/chunks/{Bq62m7IR2.mjs → 4C611CU2.mjs} +11 -11
  4. package/chunks/{gLPy4Sus.mjs → 8P-OAGbj.mjs} +1 -1
  5. package/chunks/B2PuSZ_F.mjs +35 -0
  6. package/chunks/B6B-rhhB.mjs +37 -0
  7. package/chunks/{C7Mak2La.mjs → BHT38Us-.mjs} +7 -6
  8. package/chunks/BWoKh6f6.mjs +66 -0
  9. package/chunks/{Dt_s96gL2.mjs → BXrA0SYn2.mjs} +2 -2
  10. package/chunks/BZ0v5mka.mjs +30 -0
  11. package/chunks/{5KomemiE2.mjs → BlmtfUfl2.mjs} +29 -29
  12. package/chunks/CE1uX9hJ.mjs +95 -0
  13. package/chunks/CGnOR2gn.mjs +59 -0
  14. package/chunks/CJ1-f8sg.mjs +30 -0
  15. package/chunks/{B3A-CnYr.mjs → CSnlDCNV.mjs} +5 -5
  16. package/chunks/CdzoVG6J.mjs +47 -0
  17. package/chunks/{BZTAuJxn2.mjs → CqoMZ9Wo2.mjs} +1 -1
  18. package/chunks/CrQmTHMA.mjs +105 -0
  19. package/chunks/Crh2RUrS.mjs +106 -0
  20. package/chunks/DBUJ7Bva.mjs +56 -0
  21. package/chunks/DB_UKPay.mjs +27 -0
  22. package/chunks/{BvKUeniN.mjs → DEC2O0q-.mjs} +46 -44
  23. package/chunks/{BoJgSMkL.mjs → DUhF8YOY.mjs} +2 -2
  24. package/chunks/{g8MIBMw92.mjs → Dqq8z1t4.mjs} +13 -13
  25. package/chunks/Du1PslcN.mjs +28 -0
  26. package/chunks/{Dluor05A.mjs → DyEYDv4B.mjs} +7 -6
  27. package/chunks/EAJCsX8W.mjs +32 -0
  28. package/chunks/ZFJ73RWd2.mjs +29 -0
  29. package/chunks/{D2B9Y3oT.mjs → fmIV_kHp.mjs} +2 -2
  30. package/chunks/h5488Kii.mjs +27 -0
  31. package/chunks/k3cC9SGC.mjs +27 -0
  32. package/chunks/{7GmKqdbC.mjs → usyXQe35.mjs} +1 -1
  33. package/chunks/{BpCiVuKL.mjs → v3wbYL_-.mjs} +7 -6
  34. package/chunks/vd9nXj8B.mjs +59 -0
  35. package/confirm-button/index.mjs +1 -1
  36. package/confirmable/index.mjs +1 -1
  37. package/editable-tree/index.mjs +591 -2
  38. package/element-dialog/index.mjs +1 -1
  39. package/element-resize-observer/index.mjs +1 -1
  40. package/form-cascader/index.mjs +1 -1
  41. package/form-checkbox/index.mjs +1 -1
  42. package/form-checkbox-group/index.mjs +1 -1
  43. package/form-date-picker/index.mjs +1 -1
  44. package/form-holder/index.mjs +1 -1
  45. package/form-image/index.mjs +1 -1
  46. package/form-input/index.mjs +1 -1
  47. package/form-input-cron-expression/index.mjs +1 -1
  48. package/form-input-email/index.mjs +1 -1
  49. package/form-input-id-card/index.mjs +1 -1
  50. package/form-input-number/index.mjs +1 -1
  51. package/form-input-phone-number/index.mjs +1 -1
  52. package/form-input-tag/index.mjs +1 -1
  53. package/form-input-time/index.mjs +1 -1
  54. package/form-item-group/index.mjs +1 -1
  55. package/form-item-x/index.mjs +1 -1
  56. package/form-radio-group/index.mjs +1 -1
  57. package/form-rate/index.mjs +1 -1
  58. package/form-row/index.mjs +1 -1
  59. package/form-select/index.mjs +1 -1
  60. package/form-slider/index.mjs +1 -1
  61. package/form-switch/index.mjs +1 -1
  62. package/form-table/index.mjs +1 -1
  63. package/form-table-plus/index.mjs +1 -1
  64. package/form-text/index.mjs +1 -1
  65. package/form-textarea/index.mjs +1 -1
  66. package/form-time-select/index.mjs +1 -1
  67. package/helper/dictionary.mjs +1 -1
  68. package/helper/form-item.d.ts +1 -1
  69. package/helper/form-item.mjs +27 -2
  70. package/helper/input.mjs +1 -1
  71. package/iframe-window/index.mjs +1 -1
  72. package/index.mjs +37 -37
  73. package/package.json +1 -1
  74. package/pageable-table/index.mjs +1 -1
  75. package/props/cascader.d.ts +326 -0
  76. package/{chunks/Czz_49pC.mjs → props/cascader.mjs} +8 -58
  77. package/props/checkbox-group.d.ts +213 -0
  78. package/props/checkbox-group.mjs +83 -0
  79. package/props/checkbox.d.ts +202 -0
  80. package/props/checkbox.mjs +71 -0
  81. package/props/col.d.ts +74 -0
  82. package/props/col.mjs +32 -0
  83. package/props/common.d.ts +114 -0
  84. package/props/common.mjs +18 -0
  85. package/props/date.d.ts +339 -0
  86. package/props/date.mjs +145 -0
  87. package/props/form-item.d.ts +144 -0
  88. package/props/form-item.mjs +73 -0
  89. package/props/form.d.ts +157 -0
  90. package/props/form.mjs +89 -0
  91. package/props/image.d.ts +102 -0
  92. package/props/image.mjs +10 -0
  93. package/props/input-cron.d.ts +102 -0
  94. package/props/input-cron.mjs +16 -0
  95. package/props/input-number.d.ts +216 -0
  96. package/props/input-number.mjs +72 -0
  97. package/props/input-tag.d.ts +123 -0
  98. package/props/input-tag.mjs +33 -0
  99. package/props/input.d.ts +299 -0
  100. package/props/input.mjs +97 -0
  101. package/props/radio-group.d.ts +205 -0
  102. package/props/radio-group.mjs +84 -0
  103. package/props/rate.d.ts +211 -0
  104. package/{chunks/D0kIhzQo.mjs → props/rate.mjs} +7 -28
  105. package/props/select.d.ts +450 -0
  106. package/props/select.mjs +218 -0
  107. package/props/slide.d.ts +235 -0
  108. package/{chunks/DZrQmH9Y.mjs → props/slide.mjs} +7 -28
  109. package/props/switch.d.ts +229 -0
  110. package/{chunks/ecpQ-ODX.mjs → props/switch.mjs} +7 -33
  111. package/props/text.d.ts +127 -0
  112. package/props/text.mjs +22 -0
  113. package/props/textarea.d.ts +266 -0
  114. package/{chunks/CNK4mfga.mjs → props/textarea.mjs} +19 -31
  115. package/props/time-select.d.ts +216 -0
  116. package/props/time-select.mjs +67 -0
  117. package/props/time.d.ts +304 -0
  118. package/{chunks/C3MF_-bN.mjs → props/time.mjs} +8 -39
  119. package/props/tree.d.ts +76 -0
  120. package/props/tree.mjs +75 -0
  121. package/sub-table/index.mjs +1 -1
  122. package/sub-table-plus/index.mjs +1 -1
  123. package/table-column/index.mjs +1 -1
  124. package/table-column-def/index.mjs +1 -1
  125. package/table-view/index.mjs +13 -13
  126. package/toolbar/index.mjs +1 -1
  127. package/toolbar-button/index.mjs +1 -1
  128. package/vue-cron/index.mjs +1 -1
  129. package/web-types.json +1 -1
  130. package/x-input-tag/index.mjs +2 -2
  131. package/year-calendar/index.mjs +1 -1
  132. package/chunks/6GcIyEQV.mjs +0 -95
  133. package/chunks/8c9TEVNY.mjs +0 -36
  134. package/chunks/AAZfNtly.mjs +0 -119
  135. package/chunks/BKlMENhV.mjs +0 -57
  136. package/chunks/BNVYEWWW.mjs +0 -57
  137. package/chunks/BTuzBfTA.mjs +0 -141
  138. package/chunks/C6Dq9Dgb.mjs +0 -17
  139. package/chunks/C6u76g6o.mjs +0 -158
  140. package/chunks/CLO5X9Lb.mjs +0 -176
  141. package/chunks/CdoiMj7L2.mjs +0 -39
  142. package/chunks/DTVTvvq-.mjs +0 -189
  143. package/chunks/DWE67l1f.mjs +0 -317
  144. package/chunks/DWMePN6q.mjs +0 -660
  145. package/chunks/D_L1p3vm2.mjs +0 -90
  146. package/chunks/Dy_5vPdP.mjs +0 -101
  147. package/chunks/Goee5Y-H.mjs +0 -198
  148. /package/chunks/{BlxLaWcU.mjs → 6av50rJm.mjs} +0 -0
  149. /package/chunks/{CkOD-_VV.mjs → B1MSrc6f.mjs} +0 -0
  150. /package/chunks/{BNqVEHk_.mjs → C-0zqLII.mjs} +0 -0
  151. /package/chunks/{xq_LR6R2.mjs → CI1ehQi5.mjs} +0 -0
  152. /package/chunks/{DcTVYqeJ.mjs → DuOxL6xh.mjs} +0 -0
  153. /package/chunks/{CXsoKP22.mjs → mekxD3ef.mjs} +0 -0
@@ -1,2 +1,2 @@
1
- import { s as e } from "../chunks/BvKUeniN.mjs";
1
+ import { s as e } from "../chunks/DEC2O0q-.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/BTuzBfTA.mjs";
1
+ import { t as e } from "../chunks/vd9nXj8B.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/D0kIhzQo.mjs";
1
+ import { t as e } from "../chunks/h5488Kii.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/BlxLaWcU.mjs";
1
+ import { t as e } from "../chunks/6av50rJm.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DWE67l1f.mjs";
1
+ import { t as e } from "../chunks/CrQmTHMA.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/DZrQmH9Y.mjs";
1
+ import { t as e } from "../chunks/k3cC9SGC.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/ecpQ-ODX.mjs";
1
+ import { t as e } from "../chunks/EAJCsX8W.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/Bq62m7IR2.mjs";
1
+ import { t as e } from "../chunks/4C611CU2.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/5KomemiE2.mjs";
1
+ import { t as e } from "../chunks/BlmtfUfl2.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/CdoiMj7L2.mjs";
1
+ import { t as e } from "../chunks/-qKZw-3p2.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/CNK4mfga.mjs";
1
+ import { t as e } from "../chunks/DB_UKPay.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/D_L1p3vm2.mjs";
1
+ import { t as e } from "../chunks/ZFJ73RWd2.mjs";
2
2
  export { e as default };
@@ -1,4 +1,4 @@
1
- import { c as e, u as t } from "../chunks/DcTVYqeJ.mjs";
1
+ import { c as e, u as t } from "../chunks/DuOxL6xh.mjs";
2
2
  import { getDictTreeByType as n, remote as r } from "../api/index.mjs";
3
3
  //#region src/helper/dictionary.ts
4
4
  var i = {}, a = {}, o = {}, s = () => {
@@ -11,7 +11,7 @@ export declare const useFormItemProps: (props: Record<string, any>, { rules, att
11
11
  rules?: object[];
12
12
  attrs?: Attrs;
13
13
  class?: string;
14
- block?: boolean;
14
+ block?: Readonly<Ref<any, any>>;
15
15
  messagePrefix?: string;
16
16
  message?: string;
17
17
  }) => ComputedRef<Record<string, any>>;
@@ -1,2 +1,27 @@
1
- import { n as e, t } from "../chunks/AAZfNtly.mjs";
2
- export { t as useFormItemProps, e as useRequired };
1
+ import { formItemProps as e } from "../props/form-item.mjs";
2
+ import { colProps as t } from "../props/col.mjs";
3
+ import { formHolderContextKey as n } from "../constants/index.mjs";
4
+ import { isArray as r, isPlainObject as i, isString as a } from "@web-utils/core";
5
+ import { computed as o, inject as s, unref as c } from "vue";
6
+ //#region src/helper/form-item.ts
7
+ var l = (e) => {
8
+ let t = s(n, null);
9
+ return o(() => e.required === !0 ? !0 : (t == null ? void 0 : t.requiredFieldsMap[e.prop]) === !0);
10
+ }, u = (e, t) => {
11
+ a(t) ? e.push(t) : r(t) ? e.push(...t) : i(t) && e.push(t);
12
+ }, d = (n, { rules: r, attrs: i, block: a, class: s, messagePrefix: d, message: f } = {}) => {
13
+ let p = l(n);
14
+ return o(() => {
15
+ let o = { message: f }, l = c(r);
16
+ Object.keys({
17
+ ...e,
18
+ ...t
19
+ }).forEach((e) => {
20
+ e === "rules" ? n[e] && l ? o[e] = [...n[e], ...l] : n[e] ? o[e] = n[e] : l && (o[e] = l) : e === "messagePrefix" ? o[e] = n.messagePrefix || d : e === "block" ? o[e] = (a == null ? void 0 : a.value) ?? n.block : o[e] = n[e];
21
+ });
22
+ let m = [];
23
+ return u(m, c(i == null ? void 0 : i.class)), u(m, c(s)), o.required = p.value, o.class = m, o.style = i == null ? void 0 : i.style, o;
24
+ });
25
+ };
26
+ //#endregion
27
+ export { d as useFormItemProps, l as useRequired };
package/helper/input.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/BvKUeniN.mjs";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/DEC2O0q-.mjs";
2
2
  export { a as FontIcon, n as inputEmits, i as renderFormItem, t as updateModelValue, e as useDisabled, r as useInput };
@@ -1,4 +1,4 @@
1
- import { t as e } from "../chunks/gLPy4Sus.mjs";
1
+ import { t as e } from "../chunks/8P-OAGbj.mjs";
2
2
  import { createBlock as t, createElementVNode as n, mergeModels as r, mergeProps as i, openBlock as a, useModel as o, withCtx as s } from "vue";
3
3
  //#region src/components/iframe-window/IframeWindow.vue
4
4
  var c = ["src"], l = /* @__PURE__ */ Object.assign({ name: "IframeWindow" }, {
package/index.mjs CHANGED
@@ -2,57 +2,57 @@ import e from "./awesome-button/index.mjs";
2
2
  import t from "./confirmable/index.mjs";
3
3
  import ee from "./confirm-button/index.mjs";
4
4
  import { t as n } from "./chunks/DOZRzqlo.mjs";
5
- import { t as r } from "./chunks/7GmKqdbC.mjs";
6
- import { t as i } from "./chunks/DWMePN6q.mjs";
7
- import { t as a } from "./chunks/gLPy4Sus.mjs";
5
+ import { t as r } from "./chunks/usyXQe35.mjs";
6
+ import i from "./editable-tree/index.mjs";
7
+ import { t as a } from "./chunks/8P-OAGbj.mjs";
8
8
  import o from "./element-resize-observer/index.mjs";
9
9
  import s from "./empty-view/index.mjs";
10
10
  import c from "./flex-scroll-area/index.mjs";
11
11
  import l from "./form-advice/index.mjs";
12
12
  import u from "./form-button/index.mjs";
13
13
  import d from "./form-card/index.mjs";
14
- import { s as f } from "./chunks/BvKUeniN.mjs";
15
- import { t as p } from "./chunks/Czz_49pC.mjs";
14
+ import { s as f } from "./chunks/DEC2O0q-.mjs";
15
+ import { t as p } from "./chunks/DBUJ7Bva.mjs";
16
16
  import m from "./form-cell/index.mjs";
17
- import { t as h } from "./chunks/6GcIyEQV.mjs";
18
- import { t as g } from "./chunks/C6u76g6o.mjs";
19
- import { t as _ } from "./chunks/CLO5X9Lb.mjs";
20
- import { t as v } from "./chunks/Goee5Y-H.mjs";
17
+ import { t as h } from "./chunks/BZ0v5mka.mjs";
18
+ import { t as g } from "./chunks/BWoKh6f6.mjs";
19
+ import { t as _ } from "./chunks/CE1uX9hJ.mjs";
20
+ import { t as v } from "./chunks/CGnOR2gn.mjs";
21
21
  import y from "./form-red-table/index.mjs";
22
- import { t as b } from "./chunks/DTVTvvq-.mjs";
23
- import { t as x } from "./chunks/8c9TEVNY.mjs";
24
- import { t as S } from "./chunks/BoJgSMkL.mjs";
25
- import { t as C } from "./chunks/BKlMENhV.mjs";
26
- import { t as w } from "./chunks/Dluor05A.mjs";
27
- import { t as T } from "./chunks/BpCiVuKL.mjs";
28
- import { t as E } from "./chunks/Dy_5vPdP.mjs";
29
- import { t as D } from "./chunks/C7Mak2La.mjs";
22
+ import { t as b } from "./chunks/Crh2RUrS.mjs";
23
+ import { t as x } from "./chunks/Du1PslcN.mjs";
24
+ import { t as S } from "./chunks/DUhF8YOY.mjs";
25
+ import { t as C } from "./chunks/CdzoVG6J.mjs";
26
+ import { t as w } from "./chunks/DyEYDv4B.mjs";
27
+ import { t as T } from "./chunks/v3wbYL_-.mjs";
28
+ import { t as E } from "./chunks/B2PuSZ_F.mjs";
29
+ import { t as D } from "./chunks/BHT38Us-.mjs";
30
30
  import O from "./x-input-tag/index.mjs";
31
- import { t as te } from "./chunks/BNVYEWWW.mjs";
32
- import { t as k } from "./chunks/C3MF_-bN.mjs";
31
+ import { t as te } from "./chunks/CJ1-f8sg.mjs";
32
+ import { t as k } from "./chunks/B6B-rhhB.mjs";
33
33
  import A from "./form-item-config-provider/index.mjs";
34
- import { t as j } from "./chunks/BNqVEHk_.mjs";
35
- import { t as M } from "./chunks/BTuzBfTA.mjs";
36
- import { t as N } from "./chunks/D0kIhzQo.mjs";
37
- import { t as P } from "./chunks/BlxLaWcU.mjs";
38
- import { t as F } from "./chunks/DWE67l1f.mjs";
39
- import { t as I } from "./chunks/DZrQmH9Y.mjs";
40
- import { t as L } from "./chunks/ecpQ-ODX.mjs";
41
- import { t as R } from "./chunks/B3A-CnYr.mjs";
42
- import { t as z } from "./chunks/D2B9Y3oT.mjs";
34
+ import { t as j } from "./chunks/C-0zqLII.mjs";
35
+ import { t as M } from "./chunks/vd9nXj8B.mjs";
36
+ import { t as N } from "./chunks/h5488Kii.mjs";
37
+ import { t as P } from "./chunks/6av50rJm.mjs";
38
+ import { t as F } from "./chunks/CrQmTHMA.mjs";
39
+ import { t as I } from "./chunks/k3cC9SGC.mjs";
40
+ import { t as L } from "./chunks/EAJCsX8W.mjs";
41
+ import { t as R } from "./chunks/CSnlDCNV.mjs";
42
+ import { t as z } from "./chunks/fmIV_kHp.mjs";
43
43
  import B from "./table-column-def/index.mjs";
44
- import { t as V } from "./chunks/CNK4mfga.mjs";
45
- import { t as H } from "./chunks/CauzhVSa2.mjs";
46
- import { t as U } from "./chunks/Bq62m7IR2.mjs";
47
- import { t as W } from "./chunks/g8MIBMw92.mjs";
48
- import { t as G } from "./chunks/5KomemiE2.mjs";
49
- import { t as K } from "./chunks/CdoiMj7L2.mjs";
50
- import { t as q } from "./chunks/D_L1p3vm2.mjs";
44
+ import { t as V } from "./chunks/DB_UKPay.mjs";
45
+ import { t as H } from "./chunks/4-vc_q1t.mjs";
46
+ import { t as U } from "./chunks/4C611CU2.mjs";
47
+ import { t as W } from "./chunks/Dqq8z1t4.mjs";
48
+ import { t as G } from "./chunks/BlmtfUfl2.mjs";
49
+ import { t as K } from "./chunks/-qKZw-3p2.mjs";
50
+ import { t as q } from "./chunks/ZFJ73RWd2.mjs";
51
51
  import J from "./form-view/index.mjs";
52
52
  import Y from "./iframe-window/index.mjs";
53
- import { t as X } from "./chunks/Dt_s96gL2.mjs";
53
+ import { t as X } from "./chunks/BXrA0SYn2.mjs";
54
54
  import Z from "./table-view/index.mjs";
55
- import { t as Q } from "./chunks/BZTAuJxn2.mjs";
55
+ import { t as Q } from "./chunks/CqoMZ9Wo2.mjs";
56
56
  //#region src/components/index.ts
57
57
  var $ = /* @__PURE__ */ "AwesomeButton.Confirmable.ConfirmButton.DictRender.EditableTree.ElementDialog.ElementResizeObserver.EmptyView.FlexScrollArea.FormAdvice.FormButton.FormCard.FormCascader.FormCell.FormCheckbox.FormCheckboxGroup.FormDatePicker.FormHolder.FormImage.FormInput.FormInputCronExpression.FormInputEmail.FormInputIdCard.FormInputNumber.FormInputPhoneNumber.FormInputTag.FormInputTime.FormItemConfigProvider.FormItemGroup.FormItemX.FormRadioGroup.FormRate.FormRedTable.FormRow.FormSelect.FormSlider.FormSwitch.FormTable.FormTablePlus.FormText.FormTextarea.FormTimeSelect.FormView.IframeWindow.PageableTable.SubTable.SubTablePlus.TableColumn.TableColumnDef.TableView.Toolbar.ToolbarButton.VueCron.XInputTag.YearCalendar".split("."), ne = /* @__PURE__ */ "AwesomeButton.Confirmable.ConfirmButton.DictRender.FlexScrollArea.FormAdvice.FormButton.FormCard.FormCascader.FormCell.FormCheckbox.FormDatePicker.FormImage.FormInputEmail.FormInputIdCard.FormInputNumber.FormInputPhoneNumber.FormInputTag.FormInputTime.FormItemConfigProvider.FormRadioGroup.FormRate.FormSelect.FormSlider.FormSwitch.FormTable.FormTablePlus.FormText.FormTextarea.FormTimeSelect.FormView.TableColumnDef".split("."), re = ($) => {
58
58
  $.component(e.name, e), $.component(t.name, t), $.component(ee.name, ee), $.component(n.name, n), $.component(i.name, i), $.component(a.name, a), $.component(o.name, o), $.component(s.name, s), $.component(c.name, c), $.component(l.name, l), $.component(u.name, u), $.component(d.name, d), $.component(p.name, p), $.component(m.name, m), $.component(h.name, h), $.component(_.name, _), $.component(v.name, v), $.component(b.name, b), $.component(x.name, x), $.component(g.name, g), $.component(C.name, C), $.component(w.name, w), $.component(T.name, T), $.component(E.name, E), $.component(D.name, D), $.component(te.name, te), $.component(k.name, k), $.component(A.name, A), $.component(j.name, j), $.component(f.name, f), $.component(M.name, M), $.component(N.name, N), $.component(y.name, y), $.component(P.name, P), $.component(F.name, F), $.component(I.name, I), $.component(L.name, L), $.component(U.name, U), $.component(G.name, G), $.component(K.name, K), $.component(V.name, V), $.component(q.name, q), $.component(J.name, J), $.component(Y.name, Y), $.component(R.name, R), $.component(H.name, H), $.component(W.name, W), $.component(z.name, z), $.component(B.name, B), $.component(Z.name, Z), $.component(X.name, X), $.component(r.name, r), $.component(S.name, S), $.component(O.name, O), $.component(Q.name, Q);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@web-utils/form-ui",
3
3
  "description": "form-ui",
4
- "version": "1.0.0-beta56",
4
+ "version": "1.0.0-beta58",
5
5
  "author": "Simple",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/B3A-CnYr.mjs";
1
+ import { t as e } from "../chunks/CSnlDCNV.mjs";
2
2
  export { e as default };
@@ -0,0 +1,326 @@
1
+ import { commonManualBindProps } from './common.ts';
2
+ export declare const allProps: {
3
+ /**
4
+ * 选中项绑定值
5
+ */
6
+ modelValue: (StringConstructor | ArrayConstructor | NumberConstructor)[];
7
+ /**
8
+ * 选项的数据源,value 和 label 可以通过 CascaderProps 自定义
9
+ */
10
+ options: ArrayConstructor;
11
+ /**
12
+ * 配置选项,请参阅下面 CascaderProps 表
13
+ */
14
+ props: ObjectConstructor;
15
+ /**
16
+ * 尺寸
17
+ * @values large, default, small
18
+ */
19
+ size: StringConstructor;
20
+ /**
21
+ * 输入框占位文本
22
+ */
23
+ placeholder: StringConstructor;
24
+ /**
25
+ * 是否支持清空选项
26
+ */
27
+ clearable: {
28
+ type: BooleanConstructor;
29
+ default: boolean;
30
+ };
31
+ /**
32
+ * 自定义清除图标
33
+ * @since 2.11.0
34
+ */
35
+ clearIcon: (StringConstructor | ObjectConstructor)[];
36
+ /**
37
+ * 输入框中是否显示选中值的完整路径
38
+ */
39
+ showAllLevels: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
43
+ /**
44
+ * 多选模式下是否折叠 Tag
45
+ */
46
+ collapseTags: {
47
+ type: BooleanConstructor;
48
+ default: boolean;
49
+ };
50
+ /**
51
+ * 当鼠标悬停于折叠标签的文本时,是否显示所有选中的标签。要使用此属性,collapseTags 属性必须设定为 true
52
+ */
53
+ collapseTagsTooltip: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
57
+ /**
58
+ * collapse tags 的最大高度
59
+ * @since 2.10.2
60
+ */
61
+ maxCollapseTagsTooltipHeight: (StringConstructor | NumberConstructor)[];
62
+ /**
63
+ * 用于分隔选项的字符
64
+ */
65
+ separator: {
66
+ type: StringConstructor;
67
+ default: string;
68
+ };
69
+ /**
70
+ * 该选项是否可以被搜索
71
+ */
72
+ filterable: {
73
+ type: BooleanConstructor;
74
+ default: boolean;
75
+ };
76
+ /**
77
+ * 自定义搜索逻辑,第一个参数是 node,第二个参数是 keyword,返回的布尔值表示是否保留该选项
78
+ */
79
+ filterMethod: FunctionConstructor;
80
+ /**
81
+ * 搜索关键词正在输入时的去抖延迟,单位为毫秒
82
+ */
83
+ debounce: {
84
+ type: NumberConstructor;
85
+ default: number;
86
+ };
87
+ /**
88
+ * 过滤函数调用前,所要调用的钩子函数,该函数接收要过滤的值作为参数。如果该函数的返回值是 false 或者是一个被拒绝的 Promise,那么接下来的过滤逻辑便不会执行
89
+ */
90
+ beforeFilter: FunctionConstructor;
91
+ /**
92
+ * Cascader 下拉菜单和标签提示的自定义类名
93
+ */
94
+ popperClass: {
95
+ type: StringConstructor;
96
+ default: string;
97
+ };
98
+ /**
99
+ * Cascader 下拉菜单和标签提示的自定义样式
100
+ */
101
+ popperStyle: (StringConstructor | ObjectConstructor)[];
102
+ /**
103
+ * 弹层是否使用 teleport
104
+ */
105
+ teleported: {
106
+ type: BooleanConstructor;
107
+ default: boolean;
108
+ };
109
+ /**
110
+ * tooltip 主题,内置了 dark / light 两种
111
+ * @since 2.10.5
112
+ * @values dark, light
113
+ */
114
+ effect: {
115
+ type: StringConstructor;
116
+ default: string;
117
+ };
118
+ /**
119
+ * 标签类型
120
+ * @values success, info, warning, danger
121
+ */
122
+ tagType: {
123
+ type: StringConstructor;
124
+ default: string;
125
+ };
126
+ /**
127
+ * tag effect
128
+ * @since 2.7.8
129
+ * @values dark, light, plain
130
+ */
131
+ tagEffect: {
132
+ type: StringConstructor;
133
+ default: string;
134
+ };
135
+ /**
136
+ * 输入时是否触发表单的校验
137
+ */
138
+ validateEvent: {
139
+ type: BooleanConstructor;
140
+ default: boolean;
141
+ };
142
+ /**
143
+ * 需要显示的 Tag 的最大数量 要使用此功能,collapseTags 的值必须为 true
144
+ * @since 2.3.10
145
+ */
146
+ maxCollapseTags: {
147
+ type: NumberConstructor;
148
+ default: number;
149
+ };
150
+ /**
151
+ * 组件的空值配置,参考 config-provider
152
+ * @since 2.7.0
153
+ */
154
+ emptyValues: ArrayConstructor;
155
+ /**
156
+ * 清空选项的值,参考 config-provider
157
+ * @since 2.7.0
158
+ */
159
+ valueOnClear: (StringConstructor | BooleanConstructor | FunctionConstructor | NumberConstructor)[];
160
+ /**
161
+ * 当下拉框未被激活并且 persistent 设置为 false,下拉框容器会被删除
162
+ * @since 2.7.8
163
+ */
164
+ persistent: {
165
+ type: BooleanConstructor;
166
+ default: boolean;
167
+ };
168
+ /**
169
+ * Tooltip 可用的 positions 请查看 popper.js 文档
170
+ * @since 2.8.1
171
+ */
172
+ fallbackPlacements: {
173
+ type: ArrayConstructor;
174
+ default: () => string[];
175
+ };
176
+ /**
177
+ * 下拉框出现的位置
178
+ * @since 2.8.1
179
+ * @values top, top-start, top-end, bottom, bottom-start, bottom-end, left, left-start, left-end, right, right-start, right-end
180
+ */
181
+ placement: {
182
+ type: StringConstructor;
183
+ default: string;
184
+ };
185
+ /**
186
+ * 是否将弹出的内容直接插入到 body 元素。在弹出内容的边框定位出现问题时,可将该属性设置为 false
187
+ * @deprecated
188
+ */
189
+ popperAppendToBody: {
190
+ type: BooleanConstructor;
191
+ default: boolean;
192
+ };
193
+ /**
194
+ * 多选模式下已选节点的展示策略。当你想让显示更简洁时,使用 parent。当你想显示每个子项时,使用 child
195
+ * @since 2.10.5
196
+ * @values parent, child, all
197
+ */
198
+ showCheckedStrategy: {
199
+ type: StringConstructor;
200
+ default: string;
201
+ };
202
+ readonly: BooleanConstructor;
203
+ last: BooleanConstructor;
204
+ checkStrictly: BooleanConstructor;
205
+ labelKey: {
206
+ type: StringConstructor;
207
+ default: string;
208
+ };
209
+ valueKey: {
210
+ type: StringConstructor;
211
+ default: string;
212
+ };
213
+ emitPath: {
214
+ type: BooleanConstructor;
215
+ default: boolean;
216
+ };
217
+ join: {
218
+ type: BooleanConstructor;
219
+ default: boolean;
220
+ };
221
+ idAsValue: {
222
+ type: BooleanConstructor;
223
+ default: boolean;
224
+ };
225
+ labelAsValue: BooleanConstructor;
226
+ treeDict: {
227
+ type: BooleanConstructor;
228
+ default: boolean;
229
+ };
230
+ dictType: StringConstructor;
231
+ wrapFormItem: {
232
+ type: BooleanConstructor;
233
+ default: boolean;
234
+ };
235
+ disabled: {
236
+ type: BooleanConstructor;
237
+ default: undefined;
238
+ };
239
+ col: BooleanConstructor;
240
+ span: {
241
+ type: NumberConstructor;
242
+ default: number;
243
+ };
244
+ offset: {
245
+ type: NumberConstructor;
246
+ default: number;
247
+ };
248
+ push: {
249
+ type: NumberConstructor;
250
+ default: number;
251
+ };
252
+ pull: {
253
+ type: NumberConstructor;
254
+ default: number;
255
+ };
256
+ xs: {
257
+ type: (ObjectConstructor | NumberConstructor)[];
258
+ };
259
+ sm: {
260
+ type: (ObjectConstructor | NumberConstructor)[];
261
+ };
262
+ md: {
263
+ type: (ObjectConstructor | NumberConstructor)[];
264
+ };
265
+ lg: {
266
+ type: (ObjectConstructor | NumberConstructor)[];
267
+ };
268
+ xl: {
269
+ type: (ObjectConstructor | NumberConstructor)[];
270
+ };
271
+ tag: {
272
+ type: StringConstructor;
273
+ default: string;
274
+ };
275
+ prop: (StringConstructor | ArrayConstructor)[];
276
+ label: StringConstructor;
277
+ labelPosition: {
278
+ type: StringConstructor;
279
+ default: string;
280
+ };
281
+ labelWidth: (StringConstructor | NumberConstructor)[];
282
+ required: {
283
+ type: BooleanConstructor;
284
+ default: boolean;
285
+ };
286
+ rules: ObjectConstructor;
287
+ error: StringConstructor;
288
+ showMessage: {
289
+ type: BooleanConstructor;
290
+ default: boolean;
291
+ };
292
+ inlineMessage: {
293
+ type: BooleanConstructor;
294
+ default: boolean;
295
+ };
296
+ for: StringConstructor;
297
+ validateStatus: StringConstructor;
298
+ messagePrefix: StringConstructor;
299
+ message: StringConstructor;
300
+ wrapCol: {
301
+ type: BooleanConstructor;
302
+ default: boolean;
303
+ };
304
+ fixedSpan: NumberConstructor;
305
+ block: {
306
+ type: BooleanConstructor;
307
+ default: undefined;
308
+ };
309
+ unwrap: BooleanConstructor;
310
+ half: BooleanConstructor;
311
+ formItemClass: StringConstructor;
312
+ hideLabel: BooleanConstructor;
313
+ tips: {
314
+ type: StringConstructor;
315
+ };
316
+ tipsAfterLabel: {
317
+ type: BooleanConstructor;
318
+ default: boolean;
319
+ };
320
+ labelColspan: (StringConstructor | NumberConstructor)[];
321
+ inputColspan: (StringConstructor | NumberConstructor)[];
322
+ labelRowspan: (StringConstructor | NumberConstructor)[];
323
+ inputRowspan: (StringConstructor | NumberConstructor)[];
324
+ };
325
+ export declare const manualBindProps: Record<string, boolean | undefined>;
326
+ export declare const predicate: (propsKey: keyof typeof commonManualBindProps) => boolean;
@@ -1,14 +1,8 @@
1
- import { n as e, o as t } from "./BvKUeniN.mjs";
2
- import { n, t as r } from "./C6Dq9Dgb.mjs";
3
- import { useDictionary as i } from "../hook/useDictionary.mjs";
4
- import { findTreeChildren as a, isArray as o, isString as s, setParent as c } from "@web-utils/core";
5
- import { computed as l, createVNode as u, mergeProps as d } from "vue";
6
- import { cloneDeep as f } from "@web-utils/integrations/lodash";
7
- import { ElCascader as p } from "element-plus/es";
8
- //#region src/components/form/props/cascader.ts
9
- var m = {
10
- ...n,
11
- ...r,
1
+ import { commonAutoBindProps as e, commonManualBindProps as t } from "./common.mjs";
2
+ //#region src/props/cascader.ts
3
+ var n = {
4
+ ...t,
5
+ ...e,
12
6
  modelValue: [
13
7
  String,
14
8
  Number,
@@ -140,56 +134,12 @@ var m = {
140
134
  default: !0
141
135
  },
142
136
  dictType: String
143
- }, h = {
137
+ }, r = {
144
138
  modelValue: !0,
145
139
  readonly: !0,
146
140
  disabled: !0,
147
141
  props: !0,
148
142
  valueOnClear: !0
149
- }, g = (e) => n[e] === void 0 && h[e] !== !0, _ = {
150
- name: "FormCascader",
151
- props: { ...m },
152
- emits: { ...e },
153
- setup(e, { emit: n, slots: r, attrs: m }) {
154
- let { emitInput: h, render: _, placeholder: v, disabled: y, listeners: b, inputProps: x } = t(e, {
155
- emit: n,
156
- slots: r,
157
- attrs: m,
158
- predicate: g
159
- }), { dictItems: S } = i(e), C = l(() => {
160
- if (e.dictType) return S.value;
161
- if (e.options) {
162
- let t = f(e.options);
163
- return e.last && c(t), t;
164
- } else return [];
165
- }), w = l(() => {
166
- if (e.join) return o(e.modelValue) ? e.modelValue : s(e.modelValue) ? e.modelValue.split(e.separator) : [];
167
- if (e.last) {
168
- let [t] = a(C.value, (t) => t[e.valueKey] === e.modelValue), n = [];
169
- for (; t;) n.push(t[e.valueKey]), t = t.parent;
170
- return n.reverse();
171
- }
172
- return e.modelValue;
173
- }), T = (t) => {
174
- e.join && o(t) ? h(t.join(e.separator)) : h(e.last ? t[t.length - 1] : t);
175
- };
176
- return () => _({ vNodes: u(p, d(b.value, x.value, {
177
- style: "width: 100%",
178
- class: { "is-readonly": e.readonly },
179
- "model-value": w.value,
180
- options: C.value,
181
- props: {
182
- checkStrictly: e.checkStrictly,
183
- label: e.labelKey,
184
- value: e.valueKey,
185
- emitPath: e.emitPath,
186
- expandTrigger: "hover"
187
- },
188
- disabled: y.value,
189
- placeholder: v.value,
190
- "onUpdate:modelValue": T
191
- }), null) });
192
- }
193
- };
143
+ }, i = (e) => t[e] === void 0 && r[e] !== !0;
194
144
  //#endregion
195
- export { _ as t };
145
+ export { n as allProps, r as manualBindProps, i as predicate };