vft 0.0.392 → 0.0.394

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 (125) hide show
  1. package/es/components/autocomplete/autocomplete.vue.d.ts +3 -3
  2. package/es/components/autocomplete/index.d.ts +7 -7
  3. package/es/components/button/button.vue.d.ts +1 -1
  4. package/es/components/button/index.d.ts +12 -12
  5. package/es/components/button/use-button.d.ts +1 -1
  6. package/es/components/carousel/use-carousel.js +1 -1
  7. package/es/components/cascader/cascader.vue.d.ts +2 -2
  8. package/es/components/checkbox/index.d.ts +27 -27
  9. package/es/components/color-picker/index.d.ts +6 -6
  10. package/es/components/date-picker/date-picker-com/panel-date-pick.vue.d.ts +2 -2
  11. package/es/components/date-picker/date-picker-com/panel-date-range.vue.d.ts +2 -2
  12. package/es/components/date-picker/date-picker.d.ts +3 -3
  13. package/es/components/date-picker/date-picker.js +8 -8
  14. package/es/components/date-picker/index.d.ts +6 -6
  15. package/es/components/date-picker/panel-utils.d.ts +6 -6
  16. package/es/components/date-picker/props/date-picker.d.ts +1 -1
  17. package/es/components/date-picker/props/panel-date-pick.d.ts +1 -1
  18. package/es/components/date-picker/props/panel-date-range.d.ts +1 -1
  19. package/es/components/date-picker/props/shared.d.ts +1 -1
  20. package/es/components/dropdown/index.d.ts +9 -9
  21. package/es/components/form/index.d.ts +18 -18
  22. package/es/components/index.js +155 -163
  23. package/es/components/input/index.d.ts +5 -5
  24. package/es/components/input/input.vue.d.ts +2 -2
  25. package/es/components/input/input.vue2.js +4 -4
  26. package/es/components/input-number/index.d.ts +1 -1
  27. package/es/components/input-number/input-number.vue.d.ts +1 -1
  28. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  29. package/es/components/input-tag/input-tag.vue.d.ts +4 -4
  30. package/es/components/radio/index.d.ts +18 -18
  31. package/es/components/search/index.d.ts +3 -3
  32. package/es/components/search/search.vue.d.ts +1 -1
  33. package/es/components/select/index.d.ts +2 -2
  34. package/es/components/select/select.vue.d.ts +2 -2
  35. package/es/components/slider/index.d.ts +1 -1
  36. package/es/components/slider/slider.vue.d.ts +1 -1
  37. package/es/components/super-form/component-map.d.ts +4 -45
  38. package/es/components/super-form/component-map.js +30 -60
  39. package/es/components/super-form/index.js +12 -20
  40. package/es/components/super-form/super-form-item.vue2.js +7 -6
  41. package/es/components/super-form/types.d.ts +3 -3
  42. package/es/components/super-form/types.js +5 -1
  43. package/es/components/super-form/use/helper.d.ts +3 -3
  44. package/es/components/super-form/use/helper.js +37 -32
  45. package/es/components/super-form/use/use-auto-focus.js +18 -14
  46. package/es/components/super-form/use/use-form-events.js +84 -81
  47. package/es/components/switch/index.d.ts +6 -6
  48. package/es/components/table/index.d.ts +9 -9
  49. package/es/components/table/table.vue2.js +22 -22
  50. package/es/components/tabs/index.d.ts +2 -2
  51. package/es/components/tabs/tabs.vue.d.ts +2 -2
  52. package/es/components/time-picker/common/picker.vue.d.ts +2 -2
  53. package/es/components/time-picker/time-picker.js +1 -1
  54. package/es/components/time-select/time-select.vue2.js +1 -1
  55. package/es/components/tree/tree-node.vue.d.ts +18 -18
  56. package/es/index.js +2 -1
  57. package/es/package.json.d.ts +1 -1
  58. package/es/package.json.js +1 -1
  59. package/es/utils/form-register.d.ts +43 -0
  60. package/es/utils/form-register.js +68 -0
  61. package/es/utils/index.d.ts +1 -0
  62. package/es/utils/index.js +80 -71
  63. package/es/utils/vue/vnode.js +1 -1
  64. package/lib/components/autocomplete/autocomplete.vue.d.ts +3 -3
  65. package/lib/components/autocomplete/index.d.ts +7 -7
  66. package/lib/components/button/button.vue.d.ts +1 -1
  67. package/lib/components/button/index.d.ts +12 -12
  68. package/lib/components/button/use-button.d.ts +1 -1
  69. package/lib/components/cascader/cascader.vue.d.ts +2 -2
  70. package/lib/components/checkbox/index.d.ts +27 -27
  71. package/lib/components/color-picker/index.d.ts +6 -6
  72. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue.d.ts +2 -2
  73. package/lib/components/date-picker/date-picker-com/panel-date-range.vue.d.ts +2 -2
  74. package/lib/components/date-picker/date-picker.cjs +1 -1
  75. package/lib/components/date-picker/date-picker.d.ts +3 -3
  76. package/lib/components/date-picker/index.d.ts +6 -6
  77. package/lib/components/date-picker/panel-utils.d.ts +6 -6
  78. package/lib/components/date-picker/props/date-picker.d.ts +1 -1
  79. package/lib/components/date-picker/props/panel-date-pick.d.ts +1 -1
  80. package/lib/components/date-picker/props/panel-date-range.d.ts +1 -1
  81. package/lib/components/date-picker/props/shared.d.ts +1 -1
  82. package/lib/components/dropdown/index.d.ts +9 -9
  83. package/lib/components/form/index.d.ts +18 -18
  84. package/lib/components/index.cjs +1 -1
  85. package/lib/components/input/index.d.ts +5 -5
  86. package/lib/components/input/input.vue.d.ts +2 -2
  87. package/lib/components/input/input.vue2.cjs +1 -1
  88. package/lib/components/input-number/index.d.ts +1 -1
  89. package/lib/components/input-number/input-number.vue.d.ts +1 -1
  90. package/lib/components/input-tag/input-tag.vue.d.ts +4 -4
  91. package/lib/components/radio/index.d.ts +18 -18
  92. package/lib/components/search/index.d.ts +3 -3
  93. package/lib/components/search/search.vue.d.ts +1 -1
  94. package/lib/components/select/index.d.ts +2 -2
  95. package/lib/components/select/select.vue.d.ts +2 -2
  96. package/lib/components/slider/index.d.ts +1 -1
  97. package/lib/components/slider/slider.vue.d.ts +1 -1
  98. package/lib/components/super-form/component-map.cjs +1 -1
  99. package/lib/components/super-form/component-map.d.ts +4 -45
  100. package/lib/components/super-form/index.cjs +1 -1
  101. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  102. package/lib/components/super-form/types.cjs +1 -1
  103. package/lib/components/super-form/types.d.ts +3 -3
  104. package/lib/components/super-form/use/helper.cjs +1 -1
  105. package/lib/components/super-form/use/helper.d.ts +3 -3
  106. package/lib/components/super-form/use/use-auto-focus.cjs +1 -1
  107. package/lib/components/super-form/use/use-form-events.cjs +1 -1
  108. package/lib/components/switch/index.d.ts +6 -6
  109. package/lib/components/table/index.d.ts +9 -9
  110. package/lib/components/table/table.vue2.cjs +1 -1
  111. package/lib/components/tabs/index.d.ts +2 -2
  112. package/lib/components/tabs/tabs.vue.d.ts +2 -2
  113. package/lib/components/time-picker/common/picker.vue.d.ts +2 -2
  114. package/lib/components/time-picker/time-picker.cjs +1 -1
  115. package/lib/components/time-select/time-select.vue2.cjs +1 -1
  116. package/lib/components/tree/tree-node.vue.d.ts +18 -18
  117. package/lib/index.cjs +1 -1
  118. package/lib/package.json.cjs +1 -1
  119. package/lib/package.json.d.ts +1 -1
  120. package/lib/utils/form-register.cjs +1 -0
  121. package/lib/utils/form-register.d.ts +43 -0
  122. package/lib/utils/index.cjs +1 -1
  123. package/lib/utils/index.d.ts +1 -0
  124. package/package.json +2 -2
  125. package/web-types.json +1 -1
@@ -1,37 +1,42 @@
1
- import { isNumber as n } from "@vft/utils";
2
- import { FormCompEnum as e, isInput as u } from "../component-map.js";
3
- function T(r, E = "") {
1
+ import { isNumber as i } from "@vft/utils";
2
+ import { isInput as n } from "../component-map.js";
3
+ import { FormCompEnum as r } from "../../../utils/form-register.js";
4
+ import "@vueuse/core";
5
+ import "../../config-provider/hooks/use-global-config.js";
6
+ import "vue";
7
+ import "lodash-es";
8
+ function A(e, E = "") {
4
9
  return E = (E || "").replace(":", "") || "", [
5
- e.INPUT,
6
- e.INPUT_NUMBER,
7
- e.TEXTAREA,
8
- e.AUTOCOMPLETE
9
- ].includes(r) ? "请输入" + E : [e.PASSWORD].includes(r) ? "请输入密码" : [
10
- e.SELECT,
11
- e.RADIO,
12
- e.RADIO_SINGLE,
13
- e.RADIO_BUTTON,
14
- e.Cascader,
15
- e.ColorPicker,
16
- e.CHECKBOX,
17
- e.CHECKBOX_BUTTON
18
- ].includes(r) ? "请选择" + E : [e.CHECKBOX_SINGLE].includes(r) ? "请勾选" + E : [e.SEARCH].includes(r) ? "请输入要搜索的内容" : [e.INPUT_TAG].includes(r) ? "请输入标签内容" : [e.Upload].includes(r) ? "请选择上传文件" : [e.Slider].includes(r) ? "请拖动滑块" : [
19
- e.TIME_PICKER,
20
- e.YEAR_PICKER,
21
- e.MONTH_PICKER,
22
- e.DATE_PICKER,
23
- e.DATES_PICKER,
24
- e.DATETIME_PICKER,
25
- e.WEEK_PICKER,
26
- e.DATETIMERANGE_PICKER,
27
- e.DATERANGE_PICKER,
28
- e.MONTHRANGE_PICKER
29
- ].includes(r) ? "请选择时间" : "";
10
+ r.INPUT,
11
+ r.INPUT_NUMBER,
12
+ r.TEXTAREA,
13
+ r.AUTOCOMPLETE
14
+ ].includes(e) ? "请输入" + E : [r.PASSWORD].includes(e) ? "请输入密码" : [
15
+ r.SELECT,
16
+ r.RADIO,
17
+ r.RADIO_SINGLE,
18
+ r.RADIO_BUTTON,
19
+ r.Cascader,
20
+ r.ColorPicker,
21
+ r.CHECKBOX,
22
+ r.CHECKBOX_BUTTON
23
+ ].includes(e) ? "请选择" + E : [r.CHECKBOX_SINGLE].includes(e) ? "请勾选" + E : [r.SEARCH].includes(e) ? "请输入要搜索的内容" : [r.INPUT_TAG].includes(e) ? "请输入标签内容" : [r.Upload].includes(e) ? "请选择上传文件" : [r.Slider].includes(e) ? "请拖动滑块" : [
24
+ r.TIME_PICKER,
25
+ r.YEAR_PICKER,
26
+ r.MONTH_PICKER,
27
+ r.DATE_PICKER,
28
+ r.DATES_PICKER,
29
+ r.DATETIME_PICKER,
30
+ r.WEEK_PICKER,
31
+ r.DATETIMERANGE_PICKER,
32
+ r.DATERANGE_PICKER,
33
+ r.MONTHRANGE_PICKER
34
+ ].includes(e) ? "请选择时间" : "";
30
35
  }
31
- function s(r, E) {
32
- return r && u(r) && E && n(E) ? `${E}` : E;
36
+ function t(e, E) {
37
+ return e && n(e) && E && i(E) ? `${E}` : E;
33
38
  }
34
39
  export {
35
- T as createPlaceholderMessage,
36
- s as handleInputNumberValue
40
+ A as createPlaceholderMessage,
41
+ t as handleInputNumberValue
37
42
  };
@@ -1,24 +1,28 @@
1
- import { watchEffect as u, unref as t, nextTick as m } from "vue";
2
- import { FormCompEnum as a } from "../component-map.js";
3
- async function y({
4
- getSchema: c,
5
- getProps: s,
6
- formElRef: f,
7
- isInitedDefault: i
1
+ import { FormCompEnum as m } from "../../../utils/form-register.js";
2
+ import "@vueuse/core";
3
+ import "@vft/utils";
4
+ import "../../config-provider/hooks/use-global-config.js";
5
+ import { watchEffect as u, unref as t, nextTick as p } from "vue";
6
+ import "lodash-es";
7
+ async function w({
8
+ getSchema: n,
9
+ getProps: c,
10
+ formElRef: s,
11
+ isInitedDefault: f
8
12
  }) {
9
13
  u(async () => {
10
- if (t(i) || !t(s).autoFocusFirstItem)
14
+ if (t(f) || !t(c).autoFocusFirstItem)
11
15
  return;
12
- await m();
13
- const r = t(c), o = t(f), e = o?.$el;
14
- if (!o || !e || !r || r.length === 0 || r[0].type !== a.INPUT)
16
+ await p();
17
+ const r = t(n), o = t(s), e = o?.$el;
18
+ if (!o || !e || !r || r.length === 0 || r[0].type !== m.INPUT)
15
19
  return;
16
- const n = e.querySelector(
20
+ const i = e.querySelector(
17
21
  ".vft-row:first-child input"
18
22
  );
19
- n && n?.focus();
23
+ i && i?.focus();
20
24
  });
21
25
  }
22
26
  export {
23
- y as useAutoFocus
27
+ w as useAutoFocus
24
28
  };
@@ -1,105 +1,108 @@
1
- import { isDef as H, isFunction as j, isString as A, isObject as V, isArray as I, deepMerge as nt, findDifferentValuesForObj as rt, isNullOrUndefined as J, isEmpty as st, isEmptyObject as lt } from "@vft/utils";
2
- import { formatToDate as Q } from "@vft/utils/date";
3
- import { get as ot, cloneDeep as m, uniqBy as at, isEqual as ct, set as X } from "lodash-es";
4
- import { unref as n, toRaw as x, nextTick as W } from "vue";
5
- import { isInput as ft, FormCompEnum as S, isDatePicker as ut } from "../component-map.js";
1
+ import { FormCompEnum as j } from "../../../utils/form-register.js";
2
+ import "@vueuse/core";
3
+ import { isDef as H, isFunction as A, isString as x, isObject as V, isArray as m, deepMerge as nt, findDifferentValuesForObj as rt, isNullOrUndefined as J, isEmpty as st, isEmptyObject as lt } from "@vft/utils";
4
+ import "../../config-provider/hooks/use-global-config.js";
5
+ import { unref as n, toRaw as S, nextTick as Q } from "vue";
6
+ import { get as ot, cloneDeep as I, uniqBy as at, isEqual as ft, set as X } from "lodash-es";
7
+ import { formatToDate as W } from "@vft/utils/date";
8
+ import { isInput as ct, isDatePicker as ut } from "../component-map.js";
6
9
  import { handleInputNumberValue as dt } from "./helper.js";
7
- function _(h, y) {
8
- const { show: o, ifShow: c } = h;
9
- let p = !0, f = !0;
10
- return typeof o == "boolean" ? p = o : typeof o == "function" && (p = o({
11
- field: h.field,
10
+ function _(p, y) {
11
+ const { show: o, ifShow: f } = p;
12
+ let h = !0, c = !0;
13
+ return typeof o == "boolean" ? h = o : typeof o == "function" && (h = o({
14
+ field: p.field,
12
15
  model: y,
13
16
  values: {
14
17
  ...y
15
18
  },
16
- schema: h
17
- })), typeof c == "boolean" ? f = c : typeof c == "function" && (f = c({
18
- field: h.field,
19
+ schema: p
20
+ })), typeof f == "boolean" ? c = f : typeof f == "function" && (c = f({
21
+ field: p.field,
19
22
  model: y,
20
23
  values: {
21
24
  ...y
22
25
  },
23
- schema: h
24
- })), p && f;
26
+ schema: p
27
+ })), h && c;
25
28
  }
26
- function ht(h, y = {}) {
29
+ function pt(p, y = {}) {
27
30
  const o = /^\[(.+)\]$/;
28
- if (o.test(h)) {
29
- const c = h.match(o);
30
- if (c && c[1]) {
31
- const p = c[1].split(",");
32
- if (!p.length)
31
+ if (o.test(p)) {
32
+ const f = p.match(o);
33
+ if (f && f[1]) {
34
+ const h = f[1].split(",");
35
+ if (!h.length)
33
36
  return;
34
- const f = [];
35
- return p.forEach((F, B) => {
36
- X(f, B, y[F.trim()]);
37
- }), f.filter(Boolean).length ? f : void 0;
37
+ const c = [];
38
+ return h.forEach((F, B) => {
39
+ X(c, B, y[F.trim()]);
40
+ }), c.filter(Boolean).length ? c : void 0;
38
41
  }
39
42
  }
40
43
  }
41
- function pt(h, y = {}) {
44
+ function ht(p, y = {}) {
42
45
  const o = /^\{(.+)\}$/;
43
- if (o.test(h)) {
44
- const c = h.match(o);
45
- if (c && c[1]) {
46
- const p = c[1].split(",");
47
- if (!p.length)
46
+ if (o.test(p)) {
47
+ const f = p.match(o);
48
+ if (f && f[1]) {
49
+ const h = f[1].split(",");
50
+ if (!h.length)
48
51
  return;
49
- const f = {};
50
- return p.forEach((F) => {
51
- X(f, F.trim(), y[F.trim()]);
52
- }), Object.values(f).filter(Boolean).length ? f : void 0;
52
+ const c = {};
53
+ return h.forEach((F) => {
54
+ X(c, F.trim(), y[F.trim()]);
55
+ }), Object.values(c).filter(Boolean).length ? c : void 0;
53
56
  }
54
57
  }
55
58
  }
56
- function Et({
57
- emit: h,
59
+ function It({
60
+ emit: p,
58
61
  getProps: y,
59
62
  formModel: o,
60
- getSchema: c,
61
- defaultValueRef: p,
62
- formElRef: f,
63
+ getSchema: f,
64
+ defaultValueRef: h,
65
+ formElRef: c,
63
66
  schemaRef: F,
64
67
  handleFormValues: B,
65
68
  initValues: T
66
69
  }) {
67
70
  async function Y(t) {
68
71
  const { resetFunc: e, submitOnReset: s } = n(y);
69
- e && j(e) && await e();
70
- const r = n(f);
72
+ e && A(e) && await e();
73
+ const r = n(c);
71
74
  if (r) {
72
75
  if (t?.length)
73
76
  return r.resetFields(t);
74
77
  Object.keys(o).forEach((a) => {
75
- const l = n(c).find((u) => u.field === a), i = m(p.value[a]);
76
- o[a] = ft(l?.type) ? i || "" : i;
77
- }), W(() => D()), h("reset", x(o)), s && await U();
78
+ const l = n(f).find((u) => u.field === a), i = I(h.value[a]);
79
+ o[a] = ct(l?.type) ? i || "" : i;
80
+ }), Q(() => D()), p("reset", S(o)), s && await U();
78
81
  }
79
82
  }
80
83
  async function q(t, e = !0) {
81
- const s = n(c).map((i) => i.field).filter(Boolean), r = ".", a = s.filter(
84
+ const s = n(f).map((i) => i.field).filter(Boolean), r = ".", a = s.filter(
82
85
  (i) => String(i).indexOf(r) >= 0
83
86
  ), l = [];
84
87
  s.forEach((i) => {
85
- const u = n(c).find((d) => d.field === i);
88
+ const u = n(f).find((d) => d.field === i);
86
89
  let b = ot(t, i);
87
90
  const C = Reflect.has(t, i);
88
91
  b = dt(u?.type, b);
89
92
  const { componentProps: z } = u || {};
90
93
  let w = z;
91
94
  typeof z == "function" && (w = w({ formModel: n(o) }));
92
- const G = ht(i, t) || pt(i, t);
95
+ const G = pt(i, t) || ht(i, t);
93
96
  if (C || G) {
94
97
  const d = G || b;
95
98
  if (M(i))
96
99
  if (Array.isArray(d)) {
97
100
  const v = [];
98
101
  for (const E of d)
99
- v.push(E ? Q(E) : null);
102
+ v.push(E ? W(E) : null);
100
103
  n(o)[i] = v;
101
104
  } else
102
- n(o)[i] = d ? w?.valueFormat ? d : Q(d) : null;
105
+ n(o)[i] = d ? w?.valueFormat ? d : W(d) : null;
103
106
  else
104
107
  n(o)[i] = d;
105
108
  w?.onChange && w?.onChange(d), l.push(i);
@@ -109,34 +112,34 @@ function Et({
109
112
  const v = d.split(".").reduce((E, it) => E[it], t);
110
113
  H(v) && (n(o)[d] = n(v), l.push(d));
111
114
  } catch {
112
- H(p.value[d]) && (n(o)[d] = m(
113
- n(p.value[d])
115
+ H(h.value[d]) && (n(o)[d] = I(
116
+ n(h.value[d])
114
117
  ));
115
118
  }
116
119
  });
117
- }), e && W(async () => {
120
+ }), e && Q(async () => {
118
121
  await $(l).catch((i) => {
119
122
  });
120
123
  });
121
124
  }
122
125
  async function Z(t) {
123
- const e = m(n(c));
126
+ const e = I(n(f));
124
127
  if (!t)
125
128
  return;
126
- let s = A(t) ? [t] : t;
127
- A(t) && (s = [t]);
129
+ let s = x(t) ? [t] : t;
130
+ x(t) && (s = [t]);
128
131
  for (const r of s)
129
132
  L(r, e);
130
133
  F.value = e;
131
134
  }
132
135
  function L(t, e) {
133
- if (A(t)) {
136
+ if (x(t)) {
134
137
  const s = e.findIndex((r) => r.field === t);
135
138
  s !== -1 && (delete o[t], e.splice(s, 1));
136
139
  }
137
140
  }
138
141
  async function K(t, e, s = !1) {
139
- const r = m(n(c)), a = r.findIndex((i) => i.field === e), l = V(t) ? [t] : t;
142
+ const r = I(n(f)), a = r.findIndex((i) => i.field === e), l = V(t) ? [t] : t;
140
143
  if (!e || a === -1 || s) {
141
144
  s ? r.unshift(...l) : r.push(...l), F.value = r, O(t);
142
145
  return;
@@ -145,8 +148,8 @@ function Et({
145
148
  }
146
149
  async function R(t) {
147
150
  let e = [];
148
- if (V(t) && e.push(t), I(t) && (e = [...t]), !e.every(
149
- (r) => r.type === S.DIVIDER || Reflect.has(r, "field") && r.field
151
+ if (V(t) && e.push(t), m(t) && (e = [...t]), !e.every(
152
+ (r) => r.type === j.DIVIDER || Reflect.has(r, "field") && r.field
150
153
  )) {
151
154
  console.error(
152
155
  "All children of the form Schema array that need to be updated must contain the `field` field"
@@ -157,8 +160,8 @@ function Et({
157
160
  }
158
161
  async function N(t) {
159
162
  let e = [];
160
- if (V(t) && e.push(t), I(t) && (e = [...t]), !e.every(
161
- (l) => l.type === S.DIVIDER || Reflect.has(l, "field") && l.field
163
+ if (V(t) && e.push(t), m(t) && (e = [...t]), !e.every(
164
+ (l) => l.type === j.DIVIDER || Reflect.has(l, "field") && l.field
162
165
  )) {
163
166
  console.error(
164
167
  "All children of the form Schema array that need to be updated must contain the `field` field"
@@ -166,7 +169,7 @@ function Et({
166
169
  return;
167
170
  }
168
171
  const r = [], a = [];
169
- n(c).forEach((l) => {
172
+ n(f).forEach((l) => {
170
173
  let i;
171
174
  if (e.forEach((u) => {
172
175
  l.field === u.field && (i = u), u.defaultValue && u.field && r.push(u.field);
@@ -178,65 +181,65 @@ function Et({
178
181
  }), O(a, r), F.value = at(a, "field");
179
182
  }
180
183
  function O(t, e, s = !0) {
181
- if (I(e) && e?.length === 0)
184
+ if (m(e) && e?.length === 0)
182
185
  return;
183
186
  let r = [];
184
- V(t) && r.push(t), I(t) && (r = [...t]);
187
+ V(t) && r.push(t), m(t) && (r = [...t]);
185
188
  const a = {}, l = g();
186
189
  r.forEach((i) => {
187
- i.type !== S.DIVIDER && Reflect.has(i, "field") && i.field && !J(i.defaultValue) && (!(i.field in l) || J(l[i.field]) || st(l[i.field])) && (a[i.field] = i.defaultValue);
190
+ i.type !== j.DIVIDER && Reflect.has(i, "field") && i.field && !J(i.defaultValue) && (!(i.field in l) || J(l[i.field]) || st(l[i.field])) && (a[i.field] = i.defaultValue);
188
191
  }), lt(a) || q(a, s);
189
192
  }
190
193
  function g(t = !1) {
191
- if (!n(f)) return {};
192
- const s = B(x(n(o)));
194
+ if (!n(c)) return {};
195
+ const s = B(S(n(o)));
193
196
  if (t)
194
197
  return s;
195
- const r = n(c).filter((l) => _(l, n(o))).map((l) => l.field).filter(Boolean), a = {};
198
+ const r = n(f).filter((l) => _(l, n(o))).map((l) => l.field).filter(Boolean), a = {};
196
199
  return r.forEach((l) => {
197
200
  l in s && (a[l] = s[l]);
198
201
  }), a;
199
202
  }
200
203
  function k(t) {
201
- return n(f) ? x(n(o))[t] : {};
204
+ return n(c) ? S(n(o))[t] : {};
202
205
  }
203
206
  function M(t) {
204
- return n(c).some((e) => e.field === t ? ut(e.type) : !1);
207
+ return n(f).some((e) => e.field === t ? ut(e.type) : !1);
205
208
  }
206
209
  async function $(t) {
207
- return t || (t = n(c).filter((s) => _(s, n(o))).map((s) => s.field).filter(Boolean)), n(f)?.validateField(t);
210
+ return t || (t = n(f).filter((s) => _(s, n(o))).map((s) => s.field).filter(Boolean)), n(c)?.validateField(t);
208
211
  }
209
212
  async function P(t) {
210
- return t || (t = n(c).filter((s) => _(s, n(o))).map((s) => s.field).filter(Boolean)), await n(f)?.validate(t, () => {
213
+ return t || (t = n(f).filter((s) => _(s, n(o))).map((s) => s.field).filter(Boolean)), await n(c)?.validate(t, () => {
211
214
  });
212
215
  }
213
216
  async function D(t) {
214
- await n(f)?.clearValidate(t);
217
+ await n(c)?.clearValidate(t);
215
218
  }
216
219
  async function tt(t, e) {
217
220
  await D(t), await N([{ field: t, itemProps: { error: e } }]);
218
221
  }
219
222
  async function et(t, e) {
220
- await n(f)?.scrollToField(t, e);
223
+ await n(c)?.scrollToField(t, e);
221
224
  }
222
225
  async function U(t) {
223
226
  const { autoCleanErrorMessage: e, watchDataIsChange: s } = n(y);
224
227
  t && t.preventDefault(), e && await D();
225
228
  const { submitFunc: r, beforeSubmitFunc: a } = n(y);
226
- if (a && j(a) && await a(), r && j(r)) {
229
+ if (a && A(a) && await a(), r && A(r)) {
227
230
  await r();
228
231
  return;
229
232
  }
230
- if (n(f))
233
+ if (n(c))
231
234
  try {
232
235
  if (!await P())
233
236
  return;
234
237
  const u = g();
235
238
  if (s) {
236
- const b = ct(T.value, u), C = rt(T.value, u);
237
- h("submit", u, !b, C);
239
+ const b = ft(T.value, u), C = rt(T.value, u);
240
+ p("submit", u, !b, C);
238
241
  } else
239
- h("submit", u);
242
+ p("submit", u);
240
243
  } catch (i) {
241
244
  if (i?.outOfDate === !1 && i?.errorFields)
242
245
  return;
@@ -261,5 +264,5 @@ function Et({
261
264
  };
262
265
  }
263
266
  export {
264
- Et as useFormEvents
267
+ It as useFormEvents
265
268
  };
@@ -1,4 +1,7 @@
1
1
  export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ size: {
3
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
4
+ };
2
5
  disabled: {
3
6
  type: import("vue").PropType<boolean>;
4
7
  default: boolean;
@@ -19,9 +22,6 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
19
22
  id: {
20
23
  type: import("vue").PropType<string>;
21
24
  };
22
- size: {
23
- type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
24
- };
25
25
  modelValue: {
26
26
  type: import("vue").PropType<string | number | boolean>;
27
27
  default: boolean;
@@ -78,6 +78,9 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
78
78
  "update:modelValue": (...args: any[]) => void;
79
79
  change: (...args: any[]) => void;
80
80
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
81
+ size: {
82
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
83
+ };
81
84
  disabled: {
82
85
  type: import("vue").PropType<boolean>;
83
86
  default: boolean;
@@ -98,9 +101,6 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
98
101
  id: {
99
102
  type: import("vue").PropType<string>;
100
103
  };
101
- size: {
102
- type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
103
- };
104
104
  modelValue: {
105
105
  type: import("vue").PropType<string | number | boolean>;
106
106
  default: boolean;
@@ -1,5 +1,8 @@
1
1
  export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
2
2
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
3
+ size: {
4
+ type: import("vue").PropType<import("vxe-table").VxeComponentSizeType>;
5
+ };
3
6
  data: {
4
7
  type: import("vue").PropType<import("vxe-table").VxeTablePropTypes.Data<any>>;
5
8
  };
@@ -29,9 +32,6 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
29
32
  params: {
30
33
  type: import("vue").PropType<any>;
31
34
  };
32
- size: {
33
- type: import("vue").PropType<import("vxe-table").VxeComponentSizeType>;
34
- };
35
35
  immediate: {
36
36
  type: import("vue").PropType<boolean>;
37
37
  default: boolean;
@@ -686,6 +686,9 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
686
686
  M: {};
687
687
  Defaults: {};
688
688
  }, Readonly<import("vue").ExtractPropTypes<{
689
+ size: {
690
+ type: import("vue").PropType<import("vxe-table").VxeComponentSizeType>;
691
+ };
689
692
  data: {
690
693
  type: import("vue").PropType<import("vxe-table").VxeTablePropTypes.Data<any>>;
691
694
  };
@@ -715,9 +718,6 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
715
718
  params: {
716
719
  type: import("vue").PropType<any>;
717
720
  };
718
- size: {
719
- type: import("vue").PropType<import("vxe-table").VxeComponentSizeType>;
720
- };
721
721
  immediate: {
722
722
  type: import("vue").PropType<boolean>;
723
723
  default: boolean;
@@ -1256,6 +1256,9 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
1256
1256
  __isTeleport?: never;
1257
1257
  __isSuspense?: never;
1258
1258
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
1259
+ size: {
1260
+ type: import("vue").PropType<import("vxe-table").VxeComponentSizeType>;
1261
+ };
1259
1262
  data: {
1260
1263
  type: import("vue").PropType<import("vxe-table").VxeTablePropTypes.Data<any>>;
1261
1264
  };
@@ -1285,9 +1288,6 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
1285
1288
  params: {
1286
1289
  type: import("vue").PropType<any>;
1287
1290
  };
1288
- size: {
1289
- type: import("vue").PropType<import("vxe-table").VxeComponentSizeType>;
1290
- };
1291
1291
  immediate: {
1292
1292
  type: import("vue").PropType<boolean>;
1293
1293
  default: boolean;
@@ -2,24 +2,24 @@ import { defineComponent as T, useAttrs as ee, ref as d, getCurrentInstance as a
2
2
  import { VftEmpty as se } from "../empty/index.js";
3
3
  import { vLoading as ge } from "../loading/directive.js";
4
4
  import { deepMerge as _, omit as de, isFunction as ue } from "@vft/utils";
5
+ import { FormCompEnum as fe } from "../../utils/form-register.js";
5
6
  import "@vueuse/core";
6
7
  import "../config-provider/hooks/use-global-config.js";
7
8
  import "lodash-es";
8
- import { useNamespace as fe } from "../../hooks/use-namespace/index.js";
9
+ import { useNamespace as me } from "../../hooks/use-namespace/index.js";
9
10
  import "../../hooks/use-model-toggle/index.js";
10
11
  import "@popperjs/core";
11
12
  import "../../hooks/use-z-index/index.js";
12
13
  import "../icon/index.js";
13
- import { VftPagination as me } from "../pagination/index.js";
14
- import { VftSuperForm as pe } from "../super-form/index.js";
15
- import { VxeGrid as he } from "vxe-table";
16
- import be from "xe-utils";
17
- import { PAGE_SIZE as Ce } from "./constants.js";
18
- import { useColumns as ye } from "./use/use-columns.js";
19
- import { useDataSource as we } from "./use/use-data-source.js";
20
- import { useLoading as ve } from "./use/use-loading.js";
21
- import { usePagination as xe } from "./use/use-pagination.js";
22
- import { FormCompEnum as ke } from "../super-form/component-map.js";
14
+ import { VftPagination as pe } from "../pagination/index.js";
15
+ import { VftSuperForm as he } from "../super-form/index.js";
16
+ import { VxeGrid as be } from "vxe-table";
17
+ import Ce from "xe-utils";
18
+ import { PAGE_SIZE as ye } from "./constants.js";
19
+ import { useColumns as we } from "./use/use-columns.js";
20
+ import { useDataSource as ve } from "./use/use-data-source.js";
21
+ import { useLoading as xe } from "./use/use-loading.js";
22
+ import { usePagination as ke } from "./use/use-pagination.js";
23
23
  import { useForm as Se } from "../super-form/use/use-form.js";
24
24
  import { EmptyEnum as Be } from "../empty/constants.js";
25
25
  const ze = {
@@ -34,7 +34,7 @@ const ze = {
34
34
  },
35
35
  api: {},
36
36
  pageSize: {
37
- default: Ce
37
+ default: ye
38
38
  },
39
39
  total: {},
40
40
  rowkey: {
@@ -387,18 +387,18 @@ const ze = {
387
387
  expose: F,
388
388
  emit: A
389
389
  }) {
390
- const i = fe("table"), l = A, E = ee(), p = d(), N = d([]), s = d(), O = ae(), t = u(() => _(O.props, e(s))), {
390
+ const i = me("table"), l = A, E = ee(), p = d(), N = d([]), s = d(), O = ae(), t = u(() => _(O.props, e(s))), {
391
391
  getLoading: V,
392
392
  setLoading: I
393
- } = ve(t), {
393
+ } = xe(t), {
394
394
  getPaginationInfo: c,
395
395
  setPagination: g,
396
396
  getShowPagination: h,
397
397
  getCurrentPage: q
398
- } = xe(t), {
398
+ } = ke(t), {
399
399
  getViewColumns: G,
400
400
  setColumns: K
401
- } = ye(t);
401
+ } = we(t);
402
402
  te(() => q(), (a) => {
403
403
  oe(() => {
404
404
  b({
@@ -428,7 +428,7 @@ const ze = {
428
428
  getDataSource: W,
429
429
  getRawDataSource: w,
430
430
  tableSearch: v
431
- } = we(t, {
431
+ } = ve(t, {
432
432
  tableData: N,
433
433
  setLoading: I,
434
434
  getPaginationInfo: c,
@@ -565,7 +565,7 @@ const ze = {
565
565
  "toolbar-tool-click",
566
566
  "zoom"
567
567
  ].forEach((a) => {
568
- const o = be.camelCase(`on-${a}`);
568
+ const o = Ce.camelCase(`on-${a}`);
569
569
  k[o] = (...n) => l(a, ...n);
570
570
  });
571
571
  const r = u(() => {
@@ -600,7 +600,7 @@ const ze = {
600
600
  const Z = {
601
601
  field: "_filterTableData",
602
602
  label: "",
603
- type: ke.SEARCH,
603
+ type: fe.SEARCH,
604
604
  componentProps: ({}) => ({
605
605
  onChange: (a) => {
606
606
  B({
@@ -637,11 +637,11 @@ const ze = {
637
637
  ...S
638
638
  }), (a, o) => (f(), re("div", {
639
639
  class: ne(e(i).b())
640
- }, [z(e(he), D({
640
+ }, [z(e(be), D({
641
641
  ref_key: "xGrid",
642
642
  ref: p
643
643
  }, r.value), {
644
- toolbarButtons: m(() => [H(a.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (f(), R(e(pe), {
644
+ toolbarButtons: m(() => [H(a.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (f(), R(e(he), {
645
645
  key: 0,
646
646
  onRegister: e(J),
647
647
  onSubmit: B,
@@ -652,7 +652,7 @@ const ze = {
652
652
  }, null, 8, ["type"])]),
653
653
  loading: m(() => [ce(ie("div", ze, null, 512), [[e(ge), r.value.loading]])]),
654
654
  _: 3
655
- }, 16), r.value.showPager && e(h) ? (f(), R(e(me), D({
655
+ }, 16), r.value.showPager && e(h) ? (f(), R(e(pe), D({
656
656
  key: 0
657
657
  }, e(c), {
658
658
  class: [e(i).e("pager"), e(i).m("pager-" + e(c).pagePlacement)],