vft 0.0.389 → 0.0.391

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/index.d.ts +6 -6
  14. package/es/components/date-picker/panel-utils.d.ts +6 -6
  15. package/es/components/date-picker/props/date-picker.d.ts +1 -1
  16. package/es/components/date-picker/props/panel-date-pick.d.ts +1 -1
  17. package/es/components/date-picker/props/panel-date-range.d.ts +1 -1
  18. package/es/components/date-picker/props/shared.d.ts +1 -1
  19. package/es/components/dropdown/index.d.ts +9 -9
  20. package/es/components/form/index.d.ts +18 -18
  21. package/es/components/index.js +41 -48
  22. package/es/components/input/index.d.ts +5 -5
  23. package/es/components/input/input.vue.d.ts +2 -2
  24. package/es/components/input/input.vue2.js +4 -4
  25. package/es/components/input-number/index.d.ts +1 -1
  26. package/es/components/input-number/input-number.vue.d.ts +1 -1
  27. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  28. package/es/components/input-tag/input-tag.vue.d.ts +4 -4
  29. package/es/components/radio/index.d.ts +18 -18
  30. package/es/components/search/index.d.ts +3 -3
  31. package/es/components/search/search.vue.d.ts +1 -1
  32. package/es/components/select/index.d.ts +2 -2
  33. package/es/components/select/select.vue.d.ts +2 -2
  34. package/es/components/slider/index.d.ts +1 -1
  35. package/es/components/slider/slider.vue.d.ts +1 -1
  36. package/es/components/super-form/component-map.d.ts +4 -12
  37. package/es/components/super-form/component-map.js +30 -56
  38. package/es/components/super-form/index.js +12 -19
  39. package/es/components/super-form/super-form-item.vue2.js +5 -5
  40. package/es/components/super-form/types.d.ts +3 -3
  41. package/es/components/super-form/types.js +5 -1
  42. package/es/components/super-form/use/helper.d.ts +3 -3
  43. package/es/components/super-form/use/helper.js +12 -8
  44. package/es/components/super-form/use/use-auto-focus.js +19 -15
  45. package/es/components/super-form/use/use-form-events.js +43 -41
  46. package/es/components/switch/index.d.ts +6 -6
  47. package/es/components/table/index.d.ts +9 -9
  48. package/es/components/table/table.vue2.js +1 -1
  49. package/es/components/tabs/index.d.ts +2 -2
  50. package/es/components/tabs/tabs.vue.d.ts +2 -2
  51. package/es/components/time-picker/common/picker.vue.d.ts +2 -2
  52. package/es/components/tree/tree-node.vue.d.ts +18 -18
  53. package/es/constants/index.js +9 -10
  54. package/es/constants/key.d.ts +0 -34
  55. package/es/constants/key.js +2 -4
  56. package/es/index.js +3 -2
  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.d.ts +3 -3
  75. package/lib/components/date-picker/index.d.ts +6 -6
  76. package/lib/components/date-picker/panel-utils.d.ts +6 -6
  77. package/lib/components/date-picker/props/date-picker.d.ts +1 -1
  78. package/lib/components/date-picker/props/panel-date-pick.d.ts +1 -1
  79. package/lib/components/date-picker/props/panel-date-range.d.ts +1 -1
  80. package/lib/components/date-picker/props/shared.d.ts +1 -1
  81. package/lib/components/dropdown/index.d.ts +9 -9
  82. package/lib/components/form/index.d.ts +18 -18
  83. package/lib/components/index.cjs +1 -1
  84. package/lib/components/input/index.d.ts +5 -5
  85. package/lib/components/input/input.vue.d.ts +2 -2
  86. package/lib/components/input/input.vue2.cjs +1 -1
  87. package/lib/components/input-number/index.d.ts +1 -1
  88. package/lib/components/input-number/input-number.vue.d.ts +1 -1
  89. package/lib/components/input-tag/input-tag.vue.d.ts +4 -4
  90. package/lib/components/radio/index.d.ts +18 -18
  91. package/lib/components/search/index.d.ts +3 -3
  92. package/lib/components/search/search.vue.d.ts +1 -1
  93. package/lib/components/select/index.d.ts +2 -2
  94. package/lib/components/select/select.vue.d.ts +2 -2
  95. package/lib/components/slider/index.d.ts +1 -1
  96. package/lib/components/slider/slider.vue.d.ts +1 -1
  97. package/lib/components/super-form/component-map.cjs +1 -1
  98. package/lib/components/super-form/component-map.d.ts +4 -12
  99. package/lib/components/super-form/index.cjs +1 -1
  100. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  101. package/lib/components/super-form/types.cjs +1 -1
  102. package/lib/components/super-form/types.d.ts +3 -3
  103. package/lib/components/super-form/use/helper.cjs +1 -1
  104. package/lib/components/super-form/use/helper.d.ts +3 -3
  105. package/lib/components/super-form/use/use-auto-focus.cjs +1 -1
  106. package/lib/components/super-form/use/use-form-events.cjs +1 -1
  107. package/lib/components/switch/index.d.ts +6 -6
  108. package/lib/components/table/index.d.ts +9 -9
  109. package/lib/components/table/table.vue2.cjs +1 -1
  110. package/lib/components/tabs/index.d.ts +2 -2
  111. package/lib/components/tabs/tabs.vue.d.ts +2 -2
  112. package/lib/components/time-picker/common/picker.vue.d.ts +2 -2
  113. package/lib/components/tree/tree-node.vue.d.ts +18 -18
  114. package/lib/constants/index.cjs +1 -1
  115. package/lib/constants/key.cjs +1 -1
  116. package/lib/constants/key.d.ts +0 -34
  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 +4 -4
  125. package/web-types.json +1 -1
@@ -1,24 +1,28 @@
1
- import { watchEffect as u, unref as t, nextTick as m } from "vue";
2
- import { FormCompEnum as a } from "../../../constants/key.js";
3
- async function y({
4
- getSchema: c,
5
- getProps: s,
6
- formElRef: f,
7
- isInitedDefault: i
1
+ import { watchEffect as m, unref as t, nextTick as u } from "vue";
2
+ import { FormCompEnum as p } from "../../../utils/form-register.js";
3
+ import "@vueuse/core";
4
+ import "@vft/utils";
5
+ import "../../config-provider/hooks/use-global-config.js";
6
+ import "lodash-es";
7
+ async function w({
8
+ getSchema: n,
9
+ getProps: c,
10
+ formElRef: s,
11
+ isInitedDefault: f
8
12
  }) {
9
- u(async () => {
10
- if (t(i) || !t(s).autoFocusFirstItem)
13
+ m(async () => {
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 u();
17
+ const r = t(n), o = t(s), e = o?.$el;
18
+ if (!o || !e || !r || r.length === 0 || r[0].type !== p.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,65 +1,67 @@
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";
1
+ import { isDef as H, isFunction as j, isString as A, isObject as V, isArray as m, deepMerge as nt, findDifferentValuesForObj as rt, isNullOrUndefined as J, isEmpty as st, isEmptyObject as lt } from "@vft/utils";
2
2
  import { formatToDate as Q } from "@vft/utils/date";
3
- import { get as ot, cloneDeep as m, uniqBy as at, isEqual as ft, set as X } from "lodash-es";
3
+ import { get as ot, cloneDeep as I, uniqBy as at, isEqual as ft, set as X } from "lodash-es";
4
4
  import { unref as n, toRaw as x, nextTick as W } from "vue";
5
- import { FormCompEnum as S } from "../../../constants/key.js";
5
+ import { FormCompEnum as S } from "../../../utils/form-register.js";
6
+ import "@vueuse/core";
7
+ import "../../config-provider/hooks/use-global-config.js";
6
8
  import { isInput as ct, isDatePicker as ut } from "../component-map.js";
7
9
  import { handleInputNumberValue as dt } from "./helper.js";
8
- function _(h, y) {
9
- const { show: o, ifShow: f } = h;
10
- let p = !0, c = !0;
11
- return typeof o == "boolean" ? p = o : typeof o == "function" && (p = o({
12
- 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,
13
15
  model: y,
14
16
  values: {
15
17
  ...y
16
18
  },
17
- schema: h
19
+ schema: p
18
20
  })), typeof f == "boolean" ? c = f : typeof f == "function" && (c = f({
19
- field: h.field,
21
+ field: p.field,
20
22
  model: y,
21
23
  values: {
22
24
  ...y
23
25
  },
24
- schema: h
25
- })), p && c;
26
+ schema: p
27
+ })), h && c;
26
28
  }
27
- function ht(h, y = {}) {
29
+ function pt(p, y = {}) {
28
30
  const o = /^\[(.+)\]$/;
29
- if (o.test(h)) {
30
- const f = h.match(o);
31
+ if (o.test(p)) {
32
+ const f = p.match(o);
31
33
  if (f && f[1]) {
32
- const p = f[1].split(",");
33
- if (!p.length)
34
+ const h = f[1].split(",");
35
+ if (!h.length)
34
36
  return;
35
37
  const c = [];
36
- return p.forEach((F, B) => {
38
+ return h.forEach((F, B) => {
37
39
  X(c, B, y[F.trim()]);
38
40
  }), c.filter(Boolean).length ? c : void 0;
39
41
  }
40
42
  }
41
43
  }
42
- function pt(h, y = {}) {
44
+ function ht(p, y = {}) {
43
45
  const o = /^\{(.+)\}$/;
44
- if (o.test(h)) {
45
- const f = h.match(o);
46
+ if (o.test(p)) {
47
+ const f = p.match(o);
46
48
  if (f && f[1]) {
47
- const p = f[1].split(",");
48
- if (!p.length)
49
+ const h = f[1].split(",");
50
+ if (!h.length)
49
51
  return;
50
52
  const c = {};
51
- return p.forEach((F) => {
53
+ return h.forEach((F) => {
52
54
  X(c, F.trim(), y[F.trim()]);
53
55
  }), Object.values(c).filter(Boolean).length ? c : void 0;
54
56
  }
55
57
  }
56
58
  }
57
- function Vt({
58
- emit: h,
59
+ function It({
60
+ emit: p,
59
61
  getProps: y,
60
62
  formModel: o,
61
63
  getSchema: f,
62
- defaultValueRef: p,
64
+ defaultValueRef: h,
63
65
  formElRef: c,
64
66
  schemaRef: F,
65
67
  handleFormValues: B,
@@ -73,9 +75,9 @@ function Vt({
73
75
  if (t?.length)
74
76
  return r.resetFields(t);
75
77
  Object.keys(o).forEach((a) => {
76
- const l = n(f).find((u) => u.field === a), i = m(p.value[a]);
78
+ const l = n(f).find((u) => u.field === a), i = I(h.value[a]);
77
79
  o[a] = ct(l?.type) ? i || "" : i;
78
- }), W(() => D()), h("reset", x(o)), s && await U();
80
+ }), W(() => D()), p("reset", x(o)), s && await U();
79
81
  }
80
82
  }
81
83
  async function q(t, e = !0) {
@@ -90,7 +92,7 @@ function Vt({
90
92
  const { componentProps: z } = u || {};
91
93
  let w = z;
92
94
  typeof z == "function" && (w = w({ formModel: n(o) }));
93
- const G = ht(i, t) || pt(i, t);
95
+ const G = pt(i, t) || ht(i, t);
94
96
  if (C || G) {
95
97
  const d = G || b;
96
98
  if (M(i))
@@ -110,8 +112,8 @@ function Vt({
110
112
  const v = d.split(".").reduce((E, it) => E[it], t);
111
113
  H(v) && (n(o)[d] = n(v), l.push(d));
112
114
  } catch {
113
- H(p.value[d]) && (n(o)[d] = m(
114
- n(p.value[d])
115
+ H(h.value[d]) && (n(o)[d] = I(
116
+ n(h.value[d])
115
117
  ));
116
118
  }
117
119
  });
@@ -121,7 +123,7 @@ function Vt({
121
123
  });
122
124
  }
123
125
  async function Z(t) {
124
- const e = m(n(f));
126
+ const e = I(n(f));
125
127
  if (!t)
126
128
  return;
127
129
  let s = A(t) ? [t] : t;
@@ -137,7 +139,7 @@ function Vt({
137
139
  }
138
140
  }
139
141
  async function K(t, e, s = !1) {
140
- const r = m(n(f)), 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;
141
143
  if (!e || a === -1 || s) {
142
144
  s ? r.unshift(...l) : r.push(...l), F.value = r, O(t);
143
145
  return;
@@ -146,7 +148,7 @@ function Vt({
146
148
  }
147
149
  async function R(t) {
148
150
  let e = [];
149
- if (V(t) && e.push(t), I(t) && (e = [...t]), !e.every(
151
+ if (V(t) && e.push(t), m(t) && (e = [...t]), !e.every(
150
152
  (r) => r.type === S.DIVIDER || Reflect.has(r, "field") && r.field
151
153
  )) {
152
154
  console.error(
@@ -158,7 +160,7 @@ function Vt({
158
160
  }
159
161
  async function N(t) {
160
162
  let e = [];
161
- if (V(t) && e.push(t), I(t) && (e = [...t]), !e.every(
163
+ if (V(t) && e.push(t), m(t) && (e = [...t]), !e.every(
162
164
  (l) => l.type === S.DIVIDER || Reflect.has(l, "field") && l.field
163
165
  )) {
164
166
  console.error(
@@ -179,10 +181,10 @@ function Vt({
179
181
  }), O(a, r), F.value = at(a, "field");
180
182
  }
181
183
  function O(t, e, s = !0) {
182
- if (I(e) && e?.length === 0)
184
+ if (m(e) && e?.length === 0)
183
185
  return;
184
186
  let r = [];
185
- V(t) && r.push(t), I(t) && (r = [...t]);
187
+ V(t) && r.push(t), m(t) && (r = [...t]);
186
188
  const a = {}, l = g();
187
189
  r.forEach((i) => {
188
190
  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);
@@ -235,9 +237,9 @@ function Vt({
235
237
  const u = g();
236
238
  if (s) {
237
239
  const b = ft(T.value, u), C = rt(T.value, u);
238
- h("submit", u, !b, C);
240
+ p("submit", u, !b, C);
239
241
  } else
240
- h("submit", u);
242
+ p("submit", u);
241
243
  } catch (i) {
242
244
  if (i?.outOfDate === !1 && i?.errorFields)
243
245
  return;
@@ -262,5 +264,5 @@ function Vt({
262
264
  };
263
265
  }
264
266
  export {
265
- Vt as useFormEvents
267
+ It as useFormEvents
266
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,9 +2,9 @@ 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
- import { FormCompEnum as fe } from "../../constants/key.js";
8
8
  import "lodash-es";
9
9
  import { useNamespace as me } from "../../hooks/use-namespace/index.js";
10
10
  import "../../hooks/use-model-toggle/index.js";
@@ -89,7 +89,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
89
89
  tabChange: (name: string | number) => void;
90
90
  tabRemove: (name: string | number) => void;
91
91
  tabAdd: () => void;
92
- edit: (paneName: string | number | undefined, action: "remove" | "add") => void;
92
+ edit: (paneName: string | number | undefined, action: "add" | "remove") => void;
93
93
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
94
94
  closable: {
95
95
  type: import("vue").PropType<boolean>;
@@ -178,7 +178,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
178
178
  isFocusInsidePane: () => boolean | undefined;
179
179
  }, index: number, ev: Event) => any) | undefined;
180
180
  onTabChange?: ((name: string | number) => any) | undefined;
181
- onEdit?: ((paneName: string | number | undefined, action: "remove" | "add") => any) | undefined;
181
+ onEdit?: ((paneName: string | number | undefined, action: "add" | "remove") => any) | undefined;
182
182
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & {
183
183
  TabPane: {
184
184
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
@@ -70,7 +70,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
70
70
  tabChange: (name: string | number) => void;
71
71
  tabRemove: (name: string | number) => void;
72
72
  tabAdd: () => void;
73
- edit: (paneName: string | number | undefined, action: "remove" | "add") => void;
73
+ edit: (paneName: string | number | undefined, action: "add" | "remove") => void;
74
74
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<TabsProps>>> & Readonly<{
75
75
  "onUpdate:modelValue"?: ((name: string | number) => any) | undefined;
76
76
  onTabClick?: ((pane: {
@@ -110,7 +110,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
110
110
  isFocusInsidePane: () => boolean | undefined;
111
111
  }, index: number, ev: Event) => any) | undefined;
112
112
  onTabChange?: ((name: string | number) => any) | undefined;
113
- onEdit?: ((paneName: string | number | undefined, action: "remove" | "add") => any) | undefined;
113
+ onEdit?: ((paneName: string | number | undefined, action: "add" | "remove") => any) | undefined;
114
114
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
115
115
  export default _default;
116
116
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -136,9 +136,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
136
136
  */
137
137
  onPick: (date?: any, visible?: boolean) => void;
138
138
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
139
+ clear: (...args: any[]) => void;
139
140
  "update:modelValue": (...args: any[]) => void;
140
141
  change: (...args: any[]) => void;
141
- clear: (...args: any[]) => void;
142
142
  blur: (...args: any[]) => void;
143
143
  focus: (...args: any[]) => void;
144
144
  keydown: (...args: any[]) => void;
@@ -238,9 +238,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
238
238
  };
239
239
  readonly isRange: BooleanConstructor;
240
240
  }>> & Readonly<{
241
+ onClear?: ((...args: any[]) => any) | undefined;
241
242
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
242
243
  onChange?: ((...args: any[]) => any) | undefined;
243
- onClear?: ((...args: any[]) => any) | undefined;
244
244
  onBlur?: ((...args: any[]) => any) | undefined;
245
245
  onFocus?: ((...args: any[]) => any) | undefined;
246
246
  onKeydown?: ((...args: any[]) => any) | undefined;
@@ -99,6 +99,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
99
99
  })>;
100
100
  TreeCheckbox: import("vft/es/utils").SFCWithInstall<{
101
101
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
102
+ size: {
103
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
104
+ };
102
105
  label: {
103
106
  type: import("vue").PropType<string | number>;
104
107
  };
@@ -117,9 +120,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
117
120
  id: {
118
121
  type: import("vue").PropType<string>;
119
122
  };
120
- size: {
121
- type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
122
- };
123
123
  modelValue: {
124
124
  type: import("vue").PropType<string | number | boolean>;
125
125
  };
@@ -161,6 +161,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
161
161
  M: {};
162
162
  Defaults: {};
163
163
  }, Readonly<import("vue").ExtractPropTypes<{
164
+ size: {
165
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
166
+ };
164
167
  label: {
165
168
  type: import("vue").PropType<string | number>;
166
169
  };
@@ -179,9 +182,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
179
182
  id: {
180
183
  type: import("vue").PropType<string>;
181
184
  };
182
- size: {
183
- type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
184
- };
185
185
  modelValue: {
186
186
  type: import("vue").PropType<string | number | boolean>;
187
187
  };
@@ -217,6 +217,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
217
217
  __isTeleport?: never;
218
218
  __isSuspense?: never;
219
219
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
220
+ size: {
221
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
222
+ };
220
223
  label: {
221
224
  type: import("vue").PropType<string | number>;
222
225
  };
@@ -235,9 +238,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
235
238
  id: {
236
239
  type: import("vue").PropType<string>;
237
240
  };
238
- size: {
239
- type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
240
- };
241
241
  modelValue: {
242
242
  type: import("vue").PropType<string | number | boolean>;
243
243
  };
@@ -448,6 +448,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
448
448
  });
449
449
  CheckboxGroup: {
450
450
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
451
+ size: {
452
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
453
+ };
451
454
  label: {
452
455
  type: import("vue").PropType<string>;
453
456
  };
@@ -457,9 +460,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
457
460
  fill: {
458
461
  type: import("vue").PropType<string>;
459
462
  };
460
- size: {
461
- type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
462
- };
463
463
  modelValue: {
464
464
  type: import("vue").PropType<import("vft/es/components/checkbox").CheckboxGroupValueType>;
465
465
  default: () => never[];
@@ -505,6 +505,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
505
505
  M: {};
506
506
  Defaults: {};
507
507
  }, Readonly<import("vue").ExtractPropTypes<{
508
+ size: {
509
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
510
+ };
508
511
  label: {
509
512
  type: import("vue").PropType<string>;
510
513
  };
@@ -514,9 +517,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
514
517
  fill: {
515
518
  type: import("vue").PropType<string>;
516
519
  };
517
- size: {
518
- type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
519
- };
520
520
  modelValue: {
521
521
  type: import("vue").PropType<import("vft/es/components/checkbox").CheckboxGroupValueType>;
522
522
  default: () => never[];
@@ -556,6 +556,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
556
556
  __isTeleport?: never;
557
557
  __isSuspense?: never;
558
558
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
559
+ size: {
560
+ type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
561
+ };
559
562
  label: {
560
563
  type: import("vue").PropType<string>;
561
564
  };
@@ -565,9 +568,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
565
568
  fill: {
566
569
  type: import("vue").PropType<string>;
567
570
  };
568
- size: {
569
- type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
570
- };
571
571
  modelValue: {
572
572
  type: import("vue").PropType<import("vft/es/components/checkbox").CheckboxGroupValueType>;
573
573
  default: () => never[];
@@ -1,17 +1,16 @@
1
1
  import { EVENT_CODE as e } from "./aria.js";
2
- import { WEEK_DAYS as m, datePickTypes as p } from "./date.js";
3
- import { CHANGE_EVENT as T, INPUT_EVENT as N, UPDATE_MODEL_EVENT as _ } from "./event.js";
4
- import { FormCompEnum as n, INSTALLED_KEY as x } from "./key.js";
5
- import { componentSizeMap as A, componentSizes as S } from "./size.js";
2
+ import { WEEK_DAYS as p, datePickTypes as t } from "./date.js";
3
+ import { CHANGE_EVENT as m, INPUT_EVENT as N, UPDATE_MODEL_EVENT as _ } from "./event.js";
4
+ import { INSTALLED_KEY as x } from "./key.js";
5
+ import { componentSizeMap as n, componentSizes as A } from "./size.js";
6
6
  export {
7
- T as CHANGE_EVENT,
7
+ m as CHANGE_EVENT,
8
8
  e as EVENT_CODE,
9
- n as FormCompEnum,
10
9
  N as INPUT_EVENT,
11
10
  x as INSTALLED_KEY,
12
11
  _ as UPDATE_MODEL_EVENT,
13
- m as WEEK_DAYS,
14
- A as componentSizeMap,
15
- S as componentSizes,
16
- p as datePickTypes
12
+ p as WEEK_DAYS,
13
+ n as componentSizeMap,
14
+ A as componentSizes,
15
+ t as datePickTypes
17
16
  };
@@ -1,35 +1 @@
1
1
  export declare const INSTALLED_KEY: unique symbol;
2
- export declare enum FormCompEnum {
3
- AUTOCOMPLETE = "autocomplete",
4
- Cascader = "cascader",
5
- ColorPicker = "colorPicker",
6
- INPUT = "input",
7
- INPUT_NUMBER = "input-number",
8
- INPUT_NUMBER_STEP = "input-number-step",
9
- INPUT_TAG = "input-tag",
10
- PASSWORD = "password",
11
- TEXTAREA = "textarea",
12
- Slider = "slider",
13
- DIVIDER = "divider",
14
- SELECT = "select",
15
- SEARCH = "search",
16
- RADIO = "radio",
17
- RADIO_SINGLE = "radio_single",
18
- RADIO_BUTTON = "radio-button",
19
- CHECKBOX = "checkbox",
20
- CHECKBOX_SINGLE = "checkbox_single",
21
- CHECKBOX_BUTTON = "checkbox-button",
22
- SWITCH = "switch",
23
- Upload = "upload",
24
- TIME_PICKER = "time-picker",
25
- TIMERANGE_PICKER = "time-picker",
26
- YEAR_PICKER = "year",
27
- MONTH_PICKER = "month",
28
- DATE_PICKER = "date",
29
- DATES_PICKER = "dates",
30
- DATETIME_PICKER = "datetime",
31
- WEEK_PICKER = "week",
32
- DATETIMERANGE_PICKER = "datetimerange",
33
- DATERANGE_PICKER = "daterange",
34
- MONTHRANGE_PICKER = "monthrange"
35
- }
@@ -1,6 +1,4 @@
1
- const I = Symbol("INSTALLED_KEY");
2
- var t = /* @__PURE__ */ ((e) => (e.AUTOCOMPLETE = "autocomplete", e.Cascader = "cascader", e.ColorPicker = "colorPicker", e.INPUT = "input", e.INPUT_NUMBER = "input-number", e.INPUT_NUMBER_STEP = "input-number-step", e.INPUT_TAG = "input-tag", e.PASSWORD = "password", e.TEXTAREA = "textarea", e.Slider = "slider", e.DIVIDER = "divider", e.SELECT = "select", e.SEARCH = "search", e.RADIO = "radio", e.RADIO_SINGLE = "radio_single", e.RADIO_BUTTON = "radio-button", e.CHECKBOX = "checkbox", e.CHECKBOX_SINGLE = "checkbox_single", e.CHECKBOX_BUTTON = "checkbox-button", e.SWITCH = "switch", e.Upload = "upload", e.TIME_PICKER = "time-picker", e.TIMERANGE_PICKER = "time-picker", e.YEAR_PICKER = "year", e.MONTH_PICKER = "month", e.DATE_PICKER = "date", e.DATES_PICKER = "dates", e.DATETIME_PICKER = "datetime", e.WEEK_PICKER = "week", e.DATETIMERANGE_PICKER = "datetimerange", e.DATERANGE_PICKER = "daterange", e.MONTHRANGE_PICKER = "monthrange", e))(t || {});
1
+ const E = Symbol("INSTALLED_KEY");
3
2
  export {
4
- t as FormCompEnum,
5
- I as INSTALLED_KEY
3
+ E as INSTALLED_KEY
6
4
  };
package/es/index.js CHANGED
@@ -105,7 +105,7 @@ export { VftSuperForm } from "./components/super-form/index.js";
105
105
  export { EVENT_CODE } from "./constants/aria.js";
106
106
  export { WEEK_DAYS, datePickTypes } from "./constants/date.js";
107
107
  export { CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from "./constants/event.js";
108
- export { FormCompEnum, INSTALLED_KEY } from "./constants/key.js";
108
+ export { INSTALLED_KEY } from "./constants/key.js";
109
109
  export { componentSizeMap, componentSizes } from "./constants/size.js";
110
110
  export { useAttrs } from "./hooks/use-attrs/index.js";
111
111
  export { useDraggable } from "./hooks/use-draggable/index.js";
@@ -126,6 +126,7 @@ export { ZINDEX_INJECTION_KEY, defaultInitialZIndex, useZIndex, zIndexContextKey
126
126
  export { useCalcInputWidth } from "./hooks/use-calc-input-width/index.js";
127
127
  export { useComposition } from "./hooks/use-composition/index.js";
128
128
  export { useFocusController } from "./hooks/use-focus-controller/index.js";
129
+ export { FormCompEnum, clearComponents, getComponent, getRegisteredComponents, hasComponent, registerComponent, registerComponents, removeComponent } from "./utils/form-register.js";
129
130
  export { attemptFocus, focusNode, getSibling, isFocusable, isLeaf, isVisible, obtainAllFocusableElements, triggerEvent } from "./utils/dom/aria.js";
130
131
  export { getClientXY, getOffsetTop, getOffsetTopDistance, isInContainer } from "./utils/dom/position.js";
131
132
  export { getScrollBarWidth, getScrollContainer, isScroll, scrollIntoView } from "./utils/dom/scroll.js";
@@ -202,7 +203,7 @@ export { watermarkProps } from "./components/watermark/watermark.js";
202
203
  export { vLoading, createLoadingDirective } from "./components/loading/directive.js";
203
204
  export { Loading } from "./components/loading/service.js";
204
205
  export { messageDefaults, messageTypes } from "./components/message/types.js";
205
- export { clearComponents, getComponent, getRegisteredComponents, hasComponent, isDatePicker, isInput, isRangePicker, registerComponent, registerComponents, removeComponent } from "./components/super-form/component-map.js";
206
+ export { isDatePicker, isInput, isRangePicker } from "./components/super-form/component-map.js";
206
207
  export { getDynamicProps, useForm } from "./components/super-form/use/use-form.js";
207
208
 
208
209
 
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "vft",
3
- "version": "0.0.389",
3
+ "version": "0.0.391",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
@@ -1,4 +1,4 @@
1
- const o = "0.0.389";
1
+ const o = "0.0.391";
2
2
  export {
3
3
  o as version
4
4
  };