vft 0.0.387 → 0.0.389

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 (68) hide show
  1. package/es/components/alert/alert.vue.d.ts +11 -1
  2. package/es/components/alert/alert.vue2.js +65 -13
  3. package/es/components/alert/index.d.ts +76 -28
  4. package/es/components/autocomplete/autocomplete.vue.d.ts +2 -2
  5. package/es/components/autocomplete/index.d.ts +6 -6
  6. package/es/components/carousel/index.d.ts +3 -3
  7. package/es/components/carousel/types.d.ts +1 -1
  8. package/es/components/carousel/use-carousel.d.ts +2 -2
  9. package/es/components/carousel/use-carousel.js +37 -37
  10. package/es/components/index.js +137 -138
  11. package/es/components/input-tag/input-tag.vue.d.ts +1 -1
  12. package/es/components/select/index.d.ts +5 -5
  13. package/es/components/select/select.vue.d.ts +5 -5
  14. package/es/components/select/select.vue2.js +1 -1
  15. package/es/components/select/useSelect.d.ts +4 -4
  16. package/es/components/super-form/component-map.d.ts +1 -34
  17. package/es/components/super-form/component-map.js +39 -43
  18. package/es/components/super-form/index.js +8 -9
  19. package/es/components/super-form/super-form-item.vue2.js +4 -3
  20. package/es/components/super-form/types.d.ts +1 -1
  21. package/es/components/super-form/use/helper.d.ts +1 -1
  22. package/es/components/super-form/use/helper.js +32 -31
  23. package/es/components/super-form/use/use-auto-focus.js +1 -1
  24. package/es/components/super-form/use/use-form-events.js +41 -40
  25. package/es/components/table/table.vue2.js +22 -22
  26. package/es/constants/index.js +10 -9
  27. package/es/constants/key.d.ts +34 -0
  28. package/es/constants/key.js +4 -2
  29. package/es/index.js +2 -2
  30. package/es/package.json.d.ts +1 -1
  31. package/es/package.json.js +1 -1
  32. package/lib/components/alert/alert.vue.d.ts +11 -1
  33. package/lib/components/alert/alert.vue2.cjs +1 -1
  34. package/lib/components/alert/index.d.ts +76 -28
  35. package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
  36. package/lib/components/autocomplete/index.d.ts +6 -6
  37. package/lib/components/carousel/index.d.ts +3 -3
  38. package/lib/components/carousel/types.d.ts +1 -1
  39. package/lib/components/carousel/use-carousel.cjs +1 -1
  40. package/lib/components/carousel/use-carousel.d.ts +2 -2
  41. package/lib/components/index.cjs +1 -1
  42. package/lib/components/input-tag/input-tag.vue.d.ts +1 -1
  43. package/lib/components/select/index.d.ts +5 -5
  44. package/lib/components/select/select.vue.d.ts +5 -5
  45. package/lib/components/select/select.vue2.cjs +1 -1
  46. package/lib/components/select/useSelect.d.ts +4 -4
  47. package/lib/components/super-form/component-map.cjs +1 -1
  48. package/lib/components/super-form/component-map.d.ts +1 -34
  49. package/lib/components/super-form/index.cjs +1 -1
  50. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  51. package/lib/components/super-form/types.d.ts +1 -1
  52. package/lib/components/super-form/use/helper.cjs +1 -1
  53. package/lib/components/super-form/use/helper.d.ts +1 -1
  54. package/lib/components/super-form/use/use-auto-focus.cjs +1 -1
  55. package/lib/components/super-form/use/use-form-events.cjs +1 -1
  56. package/lib/components/table/table.vue2.cjs +1 -1
  57. package/lib/constants/index.cjs +1 -1
  58. package/lib/constants/key.cjs +1 -1
  59. package/lib/constants/key.d.ts +34 -0
  60. package/lib/index.cjs +1 -1
  61. package/lib/package.json.cjs +1 -1
  62. package/lib/package.json.d.ts +1 -1
  63. package/package.json +5 -5
  64. package/web-types.json +1 -1
  65. package/es/utils/click-out-side.d.ts +0 -3
  66. package/es/utils/click-out-side.js +0 -43
  67. package/lib/utils/click-out-side.cjs +0 -1
  68. package/lib/utils/click-out-side.d.ts +0 -3
@@ -104,9 +104,9 @@ declare const useSelect: (props: SelectV2Props, emit: any) => {
104
104
  readonly strategy?: "fixed" | "absolute" | undefined;
105
105
  readonly effect?: "light" | "dark" | undefined;
106
106
  readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
107
+ readonly visible?: boolean | undefined;
107
108
  readonly teleported?: boolean | undefined;
108
109
  readonly open?: boolean | undefined;
109
- readonly visible?: boolean | undefined;
110
110
  readonly arrowOffset?: number | undefined;
111
111
  readonly gpuAcceleration?: boolean | undefined;
112
112
  readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
@@ -522,9 +522,9 @@ declare const useSelect: (props: SelectV2Props, emit: any) => {
522
522
  readonly strategy?: "fixed" | "absolute" | undefined;
523
523
  readonly effect?: "light" | "dark" | undefined;
524
524
  readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
525
+ readonly visible?: boolean | undefined;
525
526
  readonly teleported?: boolean | undefined;
526
527
  readonly open?: boolean | undefined;
527
- readonly visible?: boolean | undefined;
528
528
  readonly arrowOffset?: number | undefined;
529
529
  readonly gpuAcceleration?: boolean | undefined;
530
530
  readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
@@ -941,9 +941,9 @@ declare const useSelect: (props: SelectV2Props, emit: any) => {
941
941
  readonly strategy?: "fixed" | "absolute" | undefined;
942
942
  readonly effect?: "light" | "dark" | undefined;
943
943
  readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
944
+ readonly visible?: boolean | undefined;
944
945
  readonly teleported?: boolean | undefined;
945
946
  readonly open?: boolean | undefined;
946
- readonly visible?: boolean | undefined;
947
947
  readonly arrowOffset?: number | undefined;
948
948
  readonly gpuAcceleration?: boolean | undefined;
949
949
  readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
@@ -1359,9 +1359,9 @@ declare const useSelect: (props: SelectV2Props, emit: any) => {
1359
1359
  readonly strategy?: "fixed" | "absolute" | undefined;
1360
1360
  readonly effect?: "light" | "dark" | undefined;
1361
1361
  readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
1362
+ readonly visible?: boolean | undefined;
1362
1363
  readonly teleported?: boolean | undefined;
1363
1364
  readonly open?: boolean | undefined;
1364
- readonly visible?: boolean | undefined;
1365
1365
  readonly arrowOffset?: number | undefined;
1366
1366
  readonly gpuAcceleration?: boolean | undefined;
1367
1367
  readonly fallbackPlacements?: import("@popperjs/core").Placement[] | undefined;
@@ -1,38 +1,5 @@
1
1
  import type { Component } from 'vue';
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
- }
2
+ import { FormCompEnum } from 'vft/es/constants';
36
3
  export declare function registerComponent(compName: FormCompEnum | string, component: Component): void;
37
4
  export declare function registerComponents(components: Record<string, Component>): void;
38
5
  export declare function getComponent(compName: FormCompEnum): Component | undefined;
@@ -1,62 +1,58 @@
1
- var n = /* @__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))(n || {});
1
+ import { FormCompEnum as n } from "../../constants/key.js";
2
2
  const t = /* @__PURE__ */ new Map();
3
- function c(e, a) {
4
- t.set(e, a);
3
+ function R(e, E) {
4
+ t.set(e, E);
5
5
  }
6
6
  function s(e) {
7
- Object.entries(e).forEach(([a, i]) => {
8
- t.set(a, i);
7
+ Object.entries(e).forEach(([E, o]) => {
8
+ t.set(E, o);
9
9
  });
10
10
  }
11
- function r(e) {
11
+ function c(e) {
12
12
  return t.get(e);
13
13
  }
14
- function d(e) {
14
+ function C(e) {
15
15
  t.delete(e);
16
16
  }
17
- function I(e) {
17
+ function i(e) {
18
18
  return t.has(e);
19
19
  }
20
- function R() {
20
+ function A() {
21
21
  return Array.from(t.keys());
22
22
  }
23
- function T() {
23
+ function u() {
24
24
  t.clear();
25
25
  }
26
- const P = (e) => [
27
- "datetimerange",
28
- "daterange",
29
- "monthrange"
30
- /* MONTHRANGE_PICKER */
31
- ].includes(e), _ = (e) => [
32
- "input",
33
- "input-number",
34
- "password",
35
- "textarea",
36
- "search"
37
- /* SEARCH */
38
- ].includes(e), A = (e) => [
39
- "year",
40
- "month",
41
- "date",
42
- "dates",
43
- "datetime",
44
- "week",
45
- "datetimerange",
46
- "daterange",
47
- "monthrange"
48
- /* MONTHRANGE_PICKER */
26
+ const I = (e) => [
27
+ n.DATETIMERANGE_PICKER,
28
+ n.DATERANGE_PICKER,
29
+ n.MONTHRANGE_PICKER
30
+ ].includes(e), P = (e) => [
31
+ n.INPUT,
32
+ n.INPUT_NUMBER,
33
+ n.PASSWORD,
34
+ n.TEXTAREA,
35
+ n.SEARCH
36
+ ].includes(e), T = (e) => [
37
+ n.YEAR_PICKER,
38
+ n.MONTH_PICKER,
39
+ n.DATE_PICKER,
40
+ n.DATES_PICKER,
41
+ n.DATETIME_PICKER,
42
+ n.WEEK_PICKER,
43
+ n.DATETIMERANGE_PICKER,
44
+ n.DATERANGE_PICKER,
45
+ n.MONTHRANGE_PICKER
49
46
  ].includes(e);
50
47
  export {
51
- n as FormCompEnum,
52
- T as clearComponents,
53
- r as getComponent,
54
- R as getRegisteredComponents,
55
- I as hasComponent,
56
- A as isDatePicker,
57
- _ as isInput,
58
- P as isRangePicker,
59
- c as registerComponent,
48
+ u as clearComponents,
49
+ c as getComponent,
50
+ A as getRegisteredComponents,
51
+ i as hasComponent,
52
+ T as isDatePicker,
53
+ P as isInput,
54
+ I as isRangePicker,
55
+ R as registerComponent,
60
56
  s as registerComponents,
61
- d as removeComponent
57
+ C as removeComponent
62
58
  };
@@ -5,23 +5,22 @@ import "vue";
5
5
  import { withInstall as o } from "../../utils/vue/install.js";
6
6
  import "lodash-es";
7
7
  import e from "./super-form.vue2.js";
8
- import { FormCompEnum as g, clearComponents as c, getComponent as u, getRegisteredComponents as l, hasComponent as x, isDatePicker as F, isInput as P, isRangePicker as d, registerComponent as h, registerComponents as k, removeComponent as D } from "./component-map.js";
9
- import { getDynamicProps as R, useForm as _ } from "./use/use-form.js";
8
+ import { clearComponents as C, getComponent as c, getRegisteredComponents as l, hasComponent as u, isDatePicker as x, isInput as P, isRangePicker as d, registerComponent as h, registerComponents as k, removeComponent as D } from "./component-map.js";
9
+ import { getDynamicProps as I, useForm as R } from "./use/use-form.js";
10
10
  const a = o(e);
11
11
  export {
12
- g as FormCompEnum,
13
12
  a as VftSuperForm,
14
- c as clearComponents,
13
+ C as clearComponents,
15
14
  a as default,
16
- u as getComponent,
17
- R as getDynamicProps,
15
+ c as getComponent,
16
+ I as getDynamicProps,
18
17
  l as getRegisteredComponents,
19
- x as hasComponent,
20
- F as isDatePicker,
18
+ u as hasComponent,
19
+ x as isDatePicker,
21
20
  P as isInput,
22
21
  d as isRangePicker,
23
22
  h as registerComponent,
24
23
  k as registerComponents,
25
24
  D as removeComponent,
26
- _ as useForm
25
+ R as useForm
27
26
  };
@@ -100,6 +100,7 @@ import "../md-vue-playground/index.js";
100
100
  import "../infinite-scroll/index.js";
101
101
  import "@vueuse/core";
102
102
  import "../config-provider/hooks/use-global-config.js";
103
+ import { FormCompEnum as e } from "../../constants/key.js";
103
104
  import "lodash-es";
104
105
  import { useNamespace as de } from "../../hooks/use-namespace/index.js";
105
106
  import "../../hooks/use-model-toggle/index.js";
@@ -108,14 +109,14 @@ import "../../hooks/use-z-index/index.js";
108
109
  import "../message/index.js";
109
110
  import "../progress-i/index.js";
110
111
  import "./index.js";
111
- import { FormCompEnum as e, getComponent as $, isInput as he, isDatePicker as Ee, isRangePicker as Pe } from "./component-map.js";
112
+ import { getComponent as $, isInput as he, isDatePicker as Ee, isRangePicker as Pe } from "./component-map.js";
112
113
  import { createPlaceholderMessage as Y } from "./use/helper.js";
113
114
  function q(o) {
114
115
  return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !le(o);
115
116
  }
116
117
  const Ce = Q({
117
118
  inheritAttrs: !1
118
- }), Tr = /* @__PURE__ */ Q({
119
+ }), yr = /* @__PURE__ */ Q({
119
120
  ...Ce,
120
121
  __name: "super-form-item",
121
122
  props: {
@@ -492,5 +493,5 @@ const Ce = Q({
492
493
  }
493
494
  });
494
495
  export {
495
- Tr as default
496
+ yr as default
496
497
  };
@@ -9,7 +9,7 @@ import type { InternalRuleItem, RuleItem } from 'async-validator';
9
9
  import type { ComponentPublicInstance, Ref, StyleValue, VNode } from 'vue';
10
10
  import type { Arrayable } from 'vft/es/utils';
11
11
  import type { Recordable } from '../types';
12
- import { FormCompEnum } from './component-map';
12
+ import { FormCompEnum } from 'vft/es/constants';
13
13
  /** 按钮配置选项 */
14
14
  export type ButtonOptions = Partial<ButtonProps> & {
15
15
  btnText?: string;
@@ -1,4 +1,4 @@
1
- import { FormCompEnum } from '../component-map';
1
+ import { FormCompEnum } from 'vft/es/constants';
2
2
  /**
3
3
  * @description 自动创建 placeholder
4
4
  * @example
@@ -1,37 +1,38 @@
1
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 = "") {
2
+ import { isInput as u } from "../component-map.js";
3
+ import { FormCompEnum as r } from "../../../constants/key.js";
4
+ function s(e, E = "") {
4
5
  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) ? "请选择时间" : "";
6
+ r.INPUT,
7
+ r.INPUT_NUMBER,
8
+ r.TEXTAREA,
9
+ r.AUTOCOMPLETE
10
+ ].includes(e) ? "请输入" + E : [r.PASSWORD].includes(e) ? "请输入密码" : [
11
+ r.SELECT,
12
+ r.RADIO,
13
+ r.RADIO_SINGLE,
14
+ r.RADIO_BUTTON,
15
+ r.Cascader,
16
+ r.ColorPicker,
17
+ r.CHECKBOX,
18
+ r.CHECKBOX_BUTTON
19
+ ].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) ? "请拖动滑块" : [
20
+ r.TIME_PICKER,
21
+ r.YEAR_PICKER,
22
+ r.MONTH_PICKER,
23
+ r.DATE_PICKER,
24
+ r.DATES_PICKER,
25
+ r.DATETIME_PICKER,
26
+ r.WEEK_PICKER,
27
+ r.DATETIMERANGE_PICKER,
28
+ r.DATERANGE_PICKER,
29
+ r.MONTHRANGE_PICKER
30
+ ].includes(e) ? "请选择时间" : "";
30
31
  }
31
- function s(r, E) {
32
- return r && u(r) && E && n(E) ? `${E}` : E;
32
+ function C(e, E) {
33
+ return e && u(e) && E && n(E) ? `${E}` : E;
33
34
  }
34
35
  export {
35
- T as createPlaceholderMessage,
36
- s as handleInputNumberValue
36
+ s as createPlaceholderMessage,
37
+ C as handleInputNumberValue
37
38
  };
@@ -1,5 +1,5 @@
1
1
  import { watchEffect as u, unref as t, nextTick as m } from "vue";
2
- import { FormCompEnum as a } from "../component-map.js";
2
+ import { FormCompEnum as a } from "../../../constants/key.js";
3
3
  async function y({
4
4
  getSchema: c,
5
5
  getProps: s,
@@ -1,12 +1,13 @@
1
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
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";
3
+ import { get as ot, cloneDeep as m, 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 { isInput as ft, FormCompEnum as S, isDatePicker as ut } from "../component-map.js";
5
+ import { FormCompEnum as S } from "../../../constants/key.js";
6
+ import { isInput as ct, isDatePicker as ut } from "../component-map.js";
6
7
  import { handleInputNumberValue as dt } from "./helper.js";
7
8
  function _(h, y) {
8
- const { show: o, ifShow: c } = h;
9
- let p = !0, f = !0;
9
+ const { show: o, ifShow: f } = h;
10
+ let p = !0, c = !0;
10
11
  return typeof o == "boolean" ? p = o : typeof o == "function" && (p = o({
11
12
  field: h.field,
12
13
  model: y,
@@ -14,52 +15,52 @@ function _(h, y) {
14
15
  ...y
15
16
  },
16
17
  schema: h
17
- })), typeof c == "boolean" ? f = c : typeof c == "function" && (f = c({
18
+ })), typeof f == "boolean" ? c = f : typeof f == "function" && (c = f({
18
19
  field: h.field,
19
20
  model: y,
20
21
  values: {
21
22
  ...y
22
23
  },
23
24
  schema: h
24
- })), p && f;
25
+ })), p && c;
25
26
  }
26
27
  function ht(h, y = {}) {
27
28
  const o = /^\[(.+)\]$/;
28
29
  if (o.test(h)) {
29
- const c = h.match(o);
30
- if (c && c[1]) {
31
- const p = c[1].split(",");
30
+ const f = h.match(o);
31
+ if (f && f[1]) {
32
+ const p = f[1].split(",");
32
33
  if (!p.length)
33
34
  return;
34
- const f = [];
35
+ const c = [];
35
36
  return p.forEach((F, B) => {
36
- X(f, B, y[F.trim()]);
37
- }), f.filter(Boolean).length ? f : void 0;
37
+ X(c, B, y[F.trim()]);
38
+ }), c.filter(Boolean).length ? c : void 0;
38
39
  }
39
40
  }
40
41
  }
41
42
  function pt(h, y = {}) {
42
43
  const o = /^\{(.+)\}$/;
43
44
  if (o.test(h)) {
44
- const c = h.match(o);
45
- if (c && c[1]) {
46
- const p = c[1].split(",");
45
+ const f = h.match(o);
46
+ if (f && f[1]) {
47
+ const p = f[1].split(",");
47
48
  if (!p.length)
48
49
  return;
49
- const f = {};
50
+ const c = {};
50
51
  return p.forEach((F) => {
51
- X(f, F.trim(), y[F.trim()]);
52
- }), Object.values(f).filter(Boolean).length ? f : void 0;
52
+ X(c, F.trim(), y[F.trim()]);
53
+ }), Object.values(c).filter(Boolean).length ? c : void 0;
53
54
  }
54
55
  }
55
56
  }
56
- function Et({
57
+ function Vt({
57
58
  emit: h,
58
59
  getProps: y,
59
60
  formModel: o,
60
- getSchema: c,
61
+ getSchema: f,
61
62
  defaultValueRef: p,
62
- formElRef: f,
63
+ formElRef: c,
63
64
  schemaRef: F,
64
65
  handleFormValues: B,
65
66
  initValues: T
@@ -67,22 +68,22 @@ function Et({
67
68
  async function Y(t) {
68
69
  const { resetFunc: e, submitOnReset: s } = n(y);
69
70
  e && j(e) && await e();
70
- const r = n(f);
71
+ const r = n(c);
71
72
  if (r) {
72
73
  if (t?.length)
73
74
  return r.resetFields(t);
74
75
  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;
76
+ const l = n(f).find((u) => u.field === a), i = m(p.value[a]);
77
+ o[a] = ct(l?.type) ? i || "" : i;
77
78
  }), W(() => D()), h("reset", x(o)), s && await U();
78
79
  }
79
80
  }
80
81
  async function q(t, e = !0) {
81
- const s = n(c).map((i) => i.field).filter(Boolean), r = ".", a = s.filter(
82
+ const s = n(f).map((i) => i.field).filter(Boolean), r = ".", a = s.filter(
82
83
  (i) => String(i).indexOf(r) >= 0
83
84
  ), l = [];
84
85
  s.forEach((i) => {
85
- const u = n(c).find((d) => d.field === i);
86
+ const u = n(f).find((d) => d.field === i);
86
87
  let b = ot(t, i);
87
88
  const C = Reflect.has(t, i);
88
89
  b = dt(u?.type, b);
@@ -120,7 +121,7 @@ function Et({
120
121
  });
121
122
  }
122
123
  async function Z(t) {
123
- const e = m(n(c));
124
+ const e = m(n(f));
124
125
  if (!t)
125
126
  return;
126
127
  let s = A(t) ? [t] : t;
@@ -136,7 +137,7 @@ function Et({
136
137
  }
137
138
  }
138
139
  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;
140
+ const r = m(n(f)), a = r.findIndex((i) => i.field === e), l = V(t) ? [t] : t;
140
141
  if (!e || a === -1 || s) {
141
142
  s ? r.unshift(...l) : r.push(...l), F.value = r, O(t);
142
143
  return;
@@ -166,7 +167,7 @@ function Et({
166
167
  return;
167
168
  }
168
169
  const r = [], a = [];
169
- n(c).forEach((l) => {
170
+ n(f).forEach((l) => {
170
171
  let i;
171
172
  if (e.forEach((u) => {
172
173
  l.field === u.field && (i = u), u.defaultValue && u.field && r.push(u.field);
@@ -188,36 +189,36 @@ function Et({
188
189
  }), lt(a) || q(a, s);
189
190
  }
190
191
  function g(t = !1) {
191
- if (!n(f)) return {};
192
+ if (!n(c)) return {};
192
193
  const s = B(x(n(o)));
193
194
  if (t)
194
195
  return s;
195
- const r = n(c).filter((l) => _(l, n(o))).map((l) => l.field).filter(Boolean), a = {};
196
+ const r = n(f).filter((l) => _(l, n(o))).map((l) => l.field).filter(Boolean), a = {};
196
197
  return r.forEach((l) => {
197
198
  l in s && (a[l] = s[l]);
198
199
  }), a;
199
200
  }
200
201
  function k(t) {
201
- return n(f) ? x(n(o))[t] : {};
202
+ return n(c) ? x(n(o))[t] : {};
202
203
  }
203
204
  function M(t) {
204
- return n(c).some((e) => e.field === t ? ut(e.type) : !1);
205
+ return n(f).some((e) => e.field === t ? ut(e.type) : !1);
205
206
  }
206
207
  async function $(t) {
207
- return t || (t = n(c).filter((s) => _(s, n(o))).map((s) => s.field).filter(Boolean)), n(f)?.validateField(t);
208
+ return t || (t = n(f).filter((s) => _(s, n(o))).map((s) => s.field).filter(Boolean)), n(c)?.validateField(t);
208
209
  }
209
210
  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, () => {
211
+ return t || (t = n(f).filter((s) => _(s, n(o))).map((s) => s.field).filter(Boolean)), await n(c)?.validate(t, () => {
211
212
  });
212
213
  }
213
214
  async function D(t) {
214
- await n(f)?.clearValidate(t);
215
+ await n(c)?.clearValidate(t);
215
216
  }
216
217
  async function tt(t, e) {
217
218
  await D(t), await N([{ field: t, itemProps: { error: e } }]);
218
219
  }
219
220
  async function et(t, e) {
220
- await n(f)?.scrollToField(t, e);
221
+ await n(c)?.scrollToField(t, e);
221
222
  }
222
223
  async function U(t) {
223
224
  const { autoCleanErrorMessage: e, watchDataIsChange: s } = n(y);
@@ -227,13 +228,13 @@ function Et({
227
228
  await r();
228
229
  return;
229
230
  }
230
- if (n(f))
231
+ if (n(c))
231
232
  try {
232
233
  if (!await P())
233
234
  return;
234
235
  const u = g();
235
236
  if (s) {
236
- const b = ct(T.value, u), C = rt(T.value, u);
237
+ const b = ft(T.value, u), C = rt(T.value, u);
237
238
  h("submit", u, !b, C);
238
239
  } else
239
240
  h("submit", u);
@@ -261,5 +262,5 @@ function Et({
261
262
  };
262
263
  }
263
264
  export {
264
- Et as useFormEvents
265
+ Vt as useFormEvents
265
266
  };