@aplus-frontend/ui 6.12.0 → 6.13.1

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 (70) hide show
  1. package/es/src/ap-descriptions/interface.d.ts +1 -1
  2. package/es/src/ap-form/ap-form.vue2.mjs +118 -108
  3. package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
  4. package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
  5. package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
  6. package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
  7. package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  8. package/es/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +8 -1
  9. package/es/src/ap-form/search-form/hooks/use-collapse-input-count.mjs +23 -18
  10. package/es/src/ap-form/search-form/hooks/use-sorter.mjs +31 -30
  11. package/es/src/ap-form/search-form/index.vue.mjs +42 -41
  12. package/es/src/ap-grid/index.vue.mjs +221 -225
  13. package/es/src/ap-modal/interface.d.ts +8 -0
  14. package/es/src/ap-modal/utils/createModalStream.mjs +69 -66
  15. package/es/src/ap-table/ap-table.vue2.mjs +107 -111
  16. package/es/src/ap-table/constants.d.ts +5 -5
  17. package/es/src/ap-table/context.d.ts +1 -0
  18. package/es/src/ap-table/context.mjs +6 -5
  19. package/es/src/ap-table/utils.d.ts +5 -3247
  20. package/es/src/ap-table/utils.mjs +107 -121
  21. package/es/src/business/ap-view/ap-view.vue2.mjs +76 -74
  22. package/es/src/business/ap-view/interface.d.ts +1 -0
  23. package/es/src/business/batch-input-group/index.vue.d.ts +2 -1
  24. package/es/src/business/batch-input-group/index.vue.mjs +56 -52
  25. package/es/src/business/batch-input-group/interface.d.ts +5 -0
  26. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +36 -32
  27. package/es/src/business/batch-input-group/utils.d.ts +8 -0
  28. package/es/src/business/batch-input-group/utils.mjs +10 -0
  29. package/es/src/version.d.ts +1 -1
  30. package/es/src/version.mjs +1 -1
  31. package/lib/src/ap-descriptions/interface.d.ts +1 -1
  32. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  33. package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
  34. package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
  35. package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
  36. package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
  37. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  38. package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +8 -1
  39. package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.js +1 -1
  40. package/lib/src/ap-form/search-form/hooks/use-sorter.js +1 -1
  41. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  42. package/lib/src/ap-grid/index.vue.js +1 -1
  43. package/lib/src/ap-modal/interface.d.ts +8 -0
  44. package/lib/src/ap-modal/utils/createModalStream.js +1 -1
  45. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  46. package/lib/src/ap-table/constants.d.ts +5 -5
  47. package/lib/src/ap-table/context.d.ts +1 -0
  48. package/lib/src/ap-table/context.js +1 -1
  49. package/lib/src/ap-table/utils.d.ts +5 -3247
  50. package/lib/src/ap-table/utils.js +1 -1
  51. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  52. package/lib/src/business/ap-view/interface.d.ts +1 -0
  53. package/lib/src/business/batch-input-group/index.vue.d.ts +2 -1
  54. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  55. package/lib/src/business/batch-input-group/interface.d.ts +5 -0
  56. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +3 -2
  57. package/lib/src/business/batch-input-group/utils.d.ts +8 -0
  58. package/lib/src/business/batch-input-group/utils.js +1 -0
  59. package/lib/src/version.d.ts +1 -1
  60. package/lib/src/version.js +1 -1
  61. package/package.json +1 -1
  62. package/theme/ap-grid/index.css +3 -0
  63. package/theme/ap-grid/index.less +3 -4
  64. package/theme/index.css +3 -0
  65. package/es/src/ap-table/components/dynamic-component/index.vue.d.ts +0 -4
  66. package/es/src/ap-table/components/dynamic-component/index.vue.mjs +0 -4
  67. package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +0 -15
  68. package/lib/src/ap-table/components/dynamic-component/index.vue.d.ts +0 -4
  69. package/lib/src/ap-table/components/dynamic-component/index.vue.js +0 -1
  70. package/lib/src/ap-table/components/dynamic-component/index.vue2.js +0 -1
@@ -21,7 +21,7 @@ type AllKeys<T, P extends string = '', Level extends unknown[] = []> = Level['le
21
21
  /** 基本描述类型 */
22
22
  export interface ItemSchema<T extends Recordable = Recordable> {
23
23
  label: VNodeChild | VNode;
24
- field: Extract<AllKeys<T>, string> | string[];
24
+ field: Extract<AllKeys<T>, string> | (string & {}) | string[];
25
25
  span?: number;
26
26
  prefix?: VNodeChild | VNode;
27
27
  suffix?: VNodeChild | VNode;
@@ -1,14 +1,14 @@
1
- import { defineComponent as Q, reactive as X, ref as E, unref as m, nextTick as Y, toRaw as B, watch as Z, onWatcherCleanup as z, computed as ee, createBlock as te, openBlock as re, mergeProps as oe, withCtx as le, renderSlot as ne } from "vue";
2
- import { Form as se } from "@aplus-frontend/antdv";
3
- import { useProvideForm as ie } from "./context.mjs";
4
- import { isArray as f, cloneDeep as ae, isFunction as M, isPlainObject as _, omit as ue } from "lodash-unified";
5
- import { useUrlSearchParams as ce } from "@vueuse/core";
6
- import { INTERNAL_FORM_INSTANCE_MARK as fe } from "./constant.mjs";
7
- import { getRouteType as de, isDef as V } from "../utils/index.mjs";
8
- import ge from "./utils/set.mjs";
9
- import { genParams as b, setToParams as x } from "./utils/params.mjs";
10
- import { useInjectFormProvider as Fe } from "./provider/context.mjs";
11
- const Re = /* @__PURE__ */ Q({
1
+ import { defineComponent as Z, reactive as z, ref as x, unref as m, nextTick as ee, toRaw as R, watch as te, onWatcherCleanup as re, computed as ie, createBlock as le, openBlock as ne, mergeProps as oe, withCtx as se, renderSlot as ae } from "vue";
2
+ import { Form as ue } from "@aplus-frontend/antdv";
3
+ import { useProvideForm as ce } from "./context.mjs";
4
+ import { isArray as f, cloneDeep as fe, isEqual as de, isFunction as B, isPlainObject as _, omit as ge } from "lodash-unified";
5
+ import { useUrlSearchParams as Fe } from "@vueuse/core";
6
+ import { INTERNAL_FORM_INSTANCE_MARK as he } from "./constant.mjs";
7
+ import { getRouteType as pe, isDef as V } from "../utils/index.mjs";
8
+ import me from "./utils/set.mjs";
9
+ import { genParams as b, setToParams as C } from "./utils/params.mjs";
10
+ import { useInjectFormProvider as ye } from "./provider/context.mjs";
11
+ const be = /* @__PURE__ */ Z({
12
12
  name: "ApForm",
13
13
  __name: "ap-form",
14
14
  props: {
@@ -39,153 +39,163 @@ const Re = /* @__PURE__ */ Q({
39
39
  syncToUrl: { type: [Boolean, Function], default: !1 },
40
40
  syncToUrlPriority: { type: Boolean }
41
41
  },
42
- setup(C, { expose: N }) {
43
- function S(e, t) {
44
- return f(t) ? t.reduce((r, l) => r == null ? void 0 : r[l], e) : e == null ? void 0 : e[t];
42
+ setup(N, { expose: S }) {
43
+ function w(e, t) {
44
+ return f(t) ? t.reduce((r, i) => r == null ? void 0 : r[i], e) : e == null ? void 0 : e[t];
45
45
  }
46
- const o = C;
47
- function v(e, t, r = !0, l) {
48
- var n;
46
+ const l = N;
47
+ function I(e, t, r = !0, i) {
48
+ var o;
49
49
  if (f(e)) {
50
- let a = s;
50
+ let s = n;
51
51
  for (let d = 0; d < e.length - 1; d++)
52
- e[d] in a || (a[e[d]] = {}), a = a[e[d]];
53
- l ? l(a, e[e.length - 1]) : a[e[e.length - 1]] = t;
52
+ e[d] in s || (s[e[d]] = {}), s = s[e[d]];
53
+ i ? i(s, e[e.length - 1]) : s[e[e.length - 1]] = t;
54
54
  } else
55
- l ? l(s, e) : s[e] = t;
56
- let i = f(e) ? e[0] : e;
55
+ i ? i(n, e) : n[e] = t;
56
+ let u = f(e) ? e[0] : e;
57
57
  if (r) {
58
- const a = { [i]: s[i] };
59
- p.triggerFormChange(o.name, a), (n = o.onValuesChange) == null || n.call(o, a, s, e);
58
+ const s = { [u]: n[u] };
59
+ y.triggerFormChange(l.name, s), (o = l.onValuesChange) == null || o.call(l, s, n, e);
60
60
  }
61
61
  T();
62
62
  }
63
- const u = E(), U = ce(de()), p = Fe(), P = E(
64
- o.syncToUrl ? b(o.syncToUrl, U, "get") : {}
63
+ const a = x(), U = Fe(pe()), y = ye(), v = x(
64
+ l.syncToUrl ? b(l.syncToUrl, U, "get") : {}
65
65
  );
66
- let y = ae(w()), g = {};
67
- const s = X(w());
68
- let F = [];
69
- function w() {
70
- const e = o.initialValues || {};
71
- return o.syncToUrlPriority ? {
66
+ let F = fe(E()), g = {};
67
+ const n = z(E());
68
+ let h = [];
69
+ function E() {
70
+ const e = l.initialValues || {};
71
+ return l.syncToUrlPriority ? {
72
72
  ...e,
73
- ...m(P)
73
+ ...m(v)
74
74
  } : {
75
- ...m(P),
75
+ ...m(v),
76
76
  ...e
77
77
  };
78
78
  }
79
79
  function W(e) {
80
80
  var r;
81
- const t = h(e, g);
82
- p.triggerFormFinish(o.name, e), o.syncToUrl && x(U, b(o.syncToUrl, t, "set")), (r = o.onFinish) == null || r.call(o, t);
81
+ const t = p(e, g);
82
+ y.triggerFormFinish(l.name, e), l.syncToUrl && C(U, b(l.syncToUrl, t, "set")), (r = l.onFinish) == null || r.call(l, t);
83
83
  }
84
84
  const q = async () => {
85
85
  var e;
86
- (e = u.value) == null || e.resetFields(), await Y(() => {
87
- Object.keys(s).forEach((t) => delete s[t]), Object.assign(s, y), T(), o.syncToUrl && x(
86
+ (e = a.value) == null || e.resetFields(), await ee(() => {
87
+ Object.keys(n).forEach((t) => delete n[t]), Object.assign(n, F), T(), l.syncToUrl && C(
88
88
  U,
89
89
  b(
90
- o.syncToUrl,
91
- h(y, g),
90
+ l.syncToUrl,
91
+ p(F, g),
92
92
  "set"
93
93
  )
94
94
  );
95
95
  });
96
96
  }, D = (e) => {
97
97
  var t;
98
- (t = u.value) == null || t.clearValidate(e);
98
+ (t = a.value) == null || t.clearValidate(e);
99
99
  }, k = (e, t) => {
100
100
  var r;
101
- return (r = u.value) == null ? void 0 : r.validateFields(e, t);
101
+ return (r = a.value) == null ? void 0 : r.validateFields(e, t);
102
102
  }, K = async (e, t) => {
103
- var l;
104
- const r = await ((l = u.value) == null ? void 0 : l.validateFields(
103
+ var i;
104
+ const r = await ((i = a.value) == null ? void 0 : i.validateFields(
105
105
  e,
106
106
  t
107
107
  ));
108
- return h(r, g);
108
+ return p(r, g);
109
109
  }, O = (e) => {
110
110
  var t;
111
- return e === !0 ? B(s) : (t = u.value) == null ? void 0 : t.getFieldsValue(e);
111
+ return e === !0 ? R(n) : (t = a.value) == null ? void 0 : t.getFieldsValue(e);
112
112
  }, L = (e) => {
113
113
  const t = O(e);
114
- return h(t, g);
114
+ return p(t, g);
115
115
  }, $ = (e, t) => {
116
116
  var r;
117
- return (r = u.value) == null ? void 0 : r.validate(e, t);
117
+ return (r = a.value) == null ? void 0 : r.validate(e, t);
118
118
  }, G = (e, t = {}) => {
119
119
  var r;
120
- (r = u.value) == null || r.scrollToField(e, t);
120
+ (r = a.value) == null || r.scrollToField(e, t);
121
121
  }, H = (e) => {
122
- Object.assign(s, e), T();
123
- }, I = (e, t, r = !0, l) => {
124
- v(e, t, r, l), T();
122
+ Object.assign(n, e), T();
123
+ }, P = (e, t, r = !0, i) => {
124
+ I(e, t, r, i), T();
125
125
  };
126
- function R(e, t) {
127
- return t || e(B(s)), F.push(e), () => {
128
- F = F.filter((r) => r !== e);
126
+ function M(e, t) {
127
+ return t || e(R(n)), h.push(e), () => {
128
+ h = h.filter((r) => r !== e);
129
129
  };
130
130
  }
131
- function j({ initialValue: e, name: t, transform: r }) {
132
- if (V(e) && V(t)) {
133
- const l = S(m(P), t);
134
- if (!V(l) || !o.syncToUrlPriority)
135
- if (v(t, e, !1), f(t)) {
136
- let i = y;
137
- for (let n = 0; n < t.length - 1; n++)
138
- V(i[t[n]]) || (i[t[n]] = {}), i = i[t[n]];
139
- i[t[t.length - 1]] = e;
140
- } else
141
- y[t] = e;
142
- }
143
- r && (g = ge(
131
+ function J(e, t) {
132
+ if (f(e)) {
133
+ let r = F;
134
+ for (let i = 0; i < e.length - 1; i++)
135
+ V(r[e[i]]) || (r[e[i]] = {}), r = r[e[i]];
136
+ r[e[e.length - 1]] = t;
137
+ } else
138
+ F[e] = t;
139
+ }
140
+ function Q(e, t) {
141
+ if (!V(e) || !V(t))
142
+ return;
143
+ const r = w(F, t);
144
+ if (de(r, e))
145
+ return;
146
+ const i = w(m(v), t);
147
+ V(i) && l.syncToUrlPriority || (I(t, e, !1), J(t, e));
148
+ }
149
+ function X(e, t) {
150
+ t && (g = me(
144
151
  g,
145
- [t].flat(1),
146
- r,
152
+ [e].flat(1),
153
+ t,
147
154
  !0
148
155
  ));
149
156
  }
150
- function J(e) {
151
- if (e !== fe) {
157
+ function j({ initialValue: e, name: t, transform: r }) {
158
+ Q(e, t), X(t, r);
159
+ }
160
+ function Y(e) {
161
+ if (e !== he) {
152
162
  console.warn("getInternalInstance should only used at internal");
153
163
  return;
154
164
  }
155
165
  return {
156
166
  registerField: j,
157
- registerWatch: R,
158
- setFieldValue: I
167
+ registerWatch: M,
168
+ setFieldValue: P
159
169
  };
160
170
  }
161
171
  function T() {
162
- if (F.length) {
163
- const e = B(s);
164
- F.forEach((t) => {
172
+ if (h.length) {
173
+ const e = R(n);
174
+ h.forEach((t) => {
165
175
  t(e);
166
176
  });
167
177
  }
168
178
  }
169
- function h(e, t) {
179
+ function p(e, t) {
170
180
  if (e == null)
171
181
  return;
172
182
  let r = f(e) ? [] : {};
173
- return Object.keys(e).forEach((l) => {
174
- const i = e[l], n = t == null ? void 0 : t[l], a = M(n) ? n : n == null ? void 0 : n.transformer, d = M(n) ? !0 : n == null ? void 0 : n.flat;
175
- if (M(a)) {
176
- const c = a(i);
183
+ return Object.keys(e).forEach((i) => {
184
+ const u = e[i], o = t == null ? void 0 : t[i], s = B(o) ? o : o == null ? void 0 : o.transformer, d = B(o) ? !0 : o == null ? void 0 : o.flat;
185
+ if (B(s)) {
186
+ const c = s(u);
177
187
  d ? f(c) && f(r) ? r = [...r, ...c] : _(c) && _(r) ? r = {
178
188
  ...r,
179
189
  ...c
180
- } : r[l] = c : r[l] = c;
181
- } else if (_(i) || f(i)) {
182
- const c = h(
183
- i,
184
- n
190
+ } : r[i] = c : r[i] = c;
191
+ } else if (_(u) || f(u)) {
192
+ const c = p(
193
+ u,
194
+ o
185
195
  );
186
- r[l] = c;
196
+ r[i] = c;
187
197
  } else
188
- r[l] = i;
198
+ r[i] = u;
189
199
  }), r;
190
200
  }
191
201
  const A = {
@@ -196,36 +206,36 @@ const Re = /* @__PURE__ */ Q({
196
206
  validate: $,
197
207
  scrollToField: G,
198
208
  setFieldsValue: H,
199
- setFieldValue: I,
200
- registerWatch: R,
209
+ setFieldValue: P,
210
+ registerWatch: M,
201
211
  validateFieldsReturnTransformed: K,
202
212
  getFieldsValueTransformed: L,
203
- getInternalInstance: J
213
+ getInternalInstance: Y
204
214
  };
205
- return Z(
206
- () => o.name,
215
+ return te(
216
+ () => l.name,
207
217
  (e) => {
208
- e && (p.registerForm(e, A), z(() => {
209
- p.unregisterForm(o.name);
218
+ e && (y.registerForm(e, A), re(() => {
219
+ y.unregisterForm(l.name);
210
220
  }));
211
221
  },
212
222
  {
213
223
  immediate: !0
214
224
  }
215
- ), ie({
216
- model: ee(() => s),
217
- updateModel: v,
225
+ ), ce({
226
+ model: ie(() => n),
227
+ updateModel: I,
218
228
  internalInstance: {
219
- registerWatch: R,
229
+ registerWatch: M,
220
230
  registerField: j,
221
- setFieldValue: I
231
+ setFieldValue: P
222
232
  }
223
- }), N(A), (e, t) => (re(), te(m(se), oe(
233
+ }), S(A), (e, t) => (ne(), le(m(ue), oe(
224
234
  {
225
235
  ref_key: "formRef",
226
- ref: u
236
+ ref: a
227
237
  },
228
- m(ue)(o, [
238
+ m(ge)(l, [
229
239
  "initialValues",
230
240
  "onValuesChange",
231
241
  "onFinish",
@@ -233,18 +243,18 @@ const Re = /* @__PURE__ */ Q({
233
243
  "syncToUrlPriority"
234
244
  ]),
235
245
  {
236
- model: s,
246
+ model: n,
237
247
  "data-form-name": e.name,
238
248
  onFinish: W
239
249
  }
240
250
  ), {
241
- default: le(() => [
242
- ne(e.$slots, "default")
251
+ default: se(() => [
252
+ ae(e.$slots, "default")
243
253
  ]),
244
254
  _: 3
245
255
  }, 16, ["model", "data-form-name"]));
246
256
  }
247
257
  });
248
258
  export {
249
- Re as default
259
+ be as default
250
260
  };
@@ -66,8 +66,8 @@ declare function __VLS_template(): {
66
66
  readonly type?: string | undefined;
67
67
  readonly name?: string | undefined;
68
68
  readonly suffix?: any;
69
- readonly placeholder?: string | undefined;
70
69
  readonly id?: string | undefined;
70
+ readonly placeholder?: string | undefined;
71
71
  readonly valueModifiers?: Record<string, any> | undefined;
72
72
  readonly addonBefore?: any;
73
73
  readonly addonAfter?: any;
@@ -539,8 +539,8 @@ declare const __VLS_component: DefineComponent<ApFormItemNumberProps, {
539
539
  readonly type?: string | undefined;
540
540
  readonly name?: string | undefined;
541
541
  readonly suffix?: any;
542
- readonly placeholder?: string | undefined;
543
542
  readonly id?: string | undefined;
543
+ readonly placeholder?: string | undefined;
544
544
  readonly valueModifiers?: Record<string, any> | undefined;
545
545
  readonly addonBefore?: any;
546
546
  readonly addonAfter?: any;
@@ -74,9 +74,9 @@ declare function __VLS_template(): {
74
74
  readonly getPopupContainer?: RenderDOMFunc | undefined;
75
75
  readonly virtual?: boolean | undefined;
76
76
  readonly dropdownMatchSelectWidth?: number | boolean | undefined;
77
- readonly placeholder?: any;
78
77
  readonly defaultValue?: SelectValue;
79
78
  readonly id?: string | undefined;
79
+ readonly placeholder?: any;
80
80
  readonly status?: "" | "error" | "warning" | undefined;
81
81
  readonly clearIcon?: any;
82
82
  readonly allowClear?: boolean | undefined;
@@ -705,9 +705,9 @@ declare const __VLS_component: DefineComponent<ApFormItemSelectProps, {
705
705
  readonly getPopupContainer?: RenderDOMFunc | undefined;
706
706
  readonly virtual?: boolean | undefined;
707
707
  readonly dropdownMatchSelectWidth?: number | boolean | undefined;
708
- readonly placeholder?: any;
709
708
  readonly defaultValue?: SelectValue;
710
709
  readonly id?: string | undefined;
710
+ readonly placeholder?: any;
711
711
  readonly status?: "" | "error" | "warning" | undefined;
712
712
  readonly clearIcon?: any;
713
713
  readonly allowClear?: boolean | undefined;
@@ -54,9 +54,9 @@ declare function __VLS_template(): {
54
54
  readonly suffix?: any;
55
55
  readonly focused?: boolean | undefined;
56
56
  readonly handleReset?: MouseEventHandler | undefined;
57
- readonly placeholder?: string | number | undefined;
58
57
  readonly defaultValue?: string | number | undefined;
59
58
  readonly id?: string | undefined;
59
+ readonly placeholder?: string | number | undefined;
60
60
  readonly autocomplete?: string | undefined;
61
61
  readonly maxlength?: number | undefined;
62
62
  readonly showCount?: boolean | ShowCountProps | undefined;
@@ -210,9 +210,9 @@ declare const __VLS_component: DefineComponent<ApFormItemTextProps, {
210
210
  readonly suffix?: any;
211
211
  readonly focused?: boolean | undefined;
212
212
  readonly handleReset?: MouseEventHandler | undefined;
213
- readonly placeholder?: string | number | undefined;
214
213
  readonly defaultValue?: string | number | undefined;
215
214
  readonly id?: string | undefined;
215
+ readonly placeholder?: string | number | undefined;
216
216
  readonly autocomplete?: string | undefined;
217
217
  readonly maxlength?: number | undefined;
218
218
  readonly showCount?: boolean | ShowCountProps | undefined;
@@ -55,9 +55,9 @@ declare function __VLS_template(): {
55
55
  readonly suffix?: any;
56
56
  readonly focused?: boolean | undefined;
57
57
  readonly handleReset?: MouseEventHandler | undefined;
58
- readonly placeholder?: string | number | undefined;
59
58
  readonly defaultValue?: string | number | undefined;
60
59
  readonly id?: string | undefined;
60
+ readonly placeholder?: string | number | undefined;
61
61
  readonly autocomplete?: string | undefined;
62
62
  readonly maxlength?: number | undefined;
63
63
  readonly showCount?: boolean | ShowCountProps | undefined;
@@ -217,9 +217,9 @@ declare const __VLS_component: DefineComponent<ApFormItemTextPasswordProps, {
217
217
  readonly suffix?: any;
218
218
  readonly focused?: boolean | undefined;
219
219
  readonly handleReset?: MouseEventHandler | undefined;
220
- readonly placeholder?: string | number | undefined;
221
220
  readonly defaultValue?: string | number | undefined;
222
221
  readonly id?: string | undefined;
222
+ readonly placeholder?: string | number | undefined;
223
223
  readonly autocomplete?: string | undefined;
224
224
  readonly maxlength?: number | undefined;
225
225
  readonly showCount?: boolean | ShowCountProps | undefined;
@@ -79,9 +79,9 @@ declare function __VLS_template(): {
79
79
  readonly getPopupContainer?: RenderDOMFunc | undefined;
80
80
  readonly virtual?: boolean | undefined;
81
81
  readonly dropdownMatchSelectWidth?: number | boolean | undefined;
82
- readonly placeholder?: any;
83
82
  readonly defaultValue?: unknown;
84
83
  readonly id?: string | undefined;
84
+ readonly placeholder?: any;
85
85
  readonly status?: "" | "error" | "warning" | undefined;
86
86
  readonly clearIcon?: any;
87
87
  readonly allowClear?: boolean | undefined;
@@ -853,9 +853,9 @@ declare const __VLS_component: DefineComponent<ApFormItemTreeSelectProps, {
853
853
  readonly getPopupContainer?: RenderDOMFunc | undefined;
854
854
  readonly virtual?: boolean | undefined;
855
855
  readonly dropdownMatchSelectWidth?: number | boolean | undefined;
856
- readonly placeholder?: any;
857
856
  readonly defaultValue?: unknown;
858
857
  readonly id?: string | undefined;
858
+ readonly placeholder?: any;
859
859
  readonly status?: "" | "error" | "warning" | undefined;
860
860
  readonly clearIcon?: any;
861
861
  readonly allowClear?: boolean | undefined;
@@ -1,5 +1,12 @@
1
- import { Ref, ComputedRef } from 'vue';
1
+ import { Ref, VNode, ComputedRef } from 'vue';
2
2
  import { SearchFormRenderNodeConfig } from '../../interface';
3
+ /**
4
+ * 默认用于判断当前值是否是空值的判断函数
5
+ * @param value
6
+ * @returns
7
+ */
8
+ export declare function defaultFilled(value: any): boolean;
9
+ export declare function getTargetNode(node: VNode): any;
3
10
  export declare const useCollapseInputCount: (config: Ref<SearchFormRenderNodeConfig[]>) => {
4
11
  count: ComputedRef<number>;
5
12
  };
@@ -1,42 +1,47 @@
1
- import { computed as F } from "vue";
2
- import { useInjectForm as a } from "../../context.mjs";
3
- import { isArray as d, isObject as m } from "lodash-unified";
1
+ import { computed as m } from "vue";
2
+ import { useInjectForm as d } from "../../context.mjs";
3
+ import { isArray as a, isObject as g, isFunction as h } from "lodash-unified";
4
4
  import "../../../config-provider/index.mjs";
5
- import { useGlobalConfig as h } from "../../../config-provider/hooks/use-global-config.mjs";
6
- function g(t, o) {
7
- return d(o) ? o.reduce((n, i) => n == null ? void 0 : n[i], t) : t == null ? void 0 : t[o];
5
+ import { useGlobalConfig as y } from "../../../config-provider/hooks/use-global-config.mjs";
6
+ function C(t, r) {
7
+ return a(r) ? r.reduce((n, i) => n == null ? void 0 : n[i], t) : t == null ? void 0 : t[r];
8
8
  }
9
9
  function c(t) {
10
10
  if (t == null)
11
11
  return !1;
12
12
  if (typeof t == "string")
13
13
  return t.trim() !== "";
14
- if (d(t))
14
+ if (a(t))
15
15
  return t.some((n) => c(n));
16
- if (m(t)) {
17
- const o = Object.keys(t);
18
- if (o.length === 0)
16
+ if (g(t)) {
17
+ const r = Object.keys(t);
18
+ if (r.length === 0)
19
19
  return !1;
20
- for (const n of o)
20
+ for (const n of r)
21
21
  if (c(t[n]))
22
22
  return !0;
23
23
  return !1;
24
24
  }
25
25
  return !0;
26
26
  }
27
- const O = (t) => {
28
- const { model: o } = a(), n = h("searchForm");
27
+ function b(t) {
28
+ return h(t.type) ? t.type() : t;
29
+ }
30
+ const x = (t) => {
31
+ const { model: r } = d(), n = y("searchForm");
29
32
  return {
30
- count: F(() => {
33
+ count: m(() => {
31
34
  let s = 0;
32
- return t.value.forEach((r) => {
35
+ return t.value.forEach((p) => {
33
36
  var u;
34
- const p = [r.node.props.name].flat(1), l = g(o == null ? void 0 : o.value, p), f = r.node.props.customFilled || r.node.props["custom-filled"], e = (u = n.value) == null ? void 0 : u.customFilled;
35
- !f && e ? e != null && e(r.node, l) && (s += 1) : (f || c)(l) && (s += 1);
37
+ const o = b(p.node), F = [o.props.name].flat(1), f = C(r == null ? void 0 : r.value, F), l = o.props.customFilled || o.props["custom-filled"], e = (u = n.value) == null ? void 0 : u.customFilled;
38
+ !l && e ? e != null && e(o, f) && (s += 1) : (l || c)(f) && (s += 1);
36
39
  }), s;
37
40
  })
38
41
  };
39
42
  };
40
43
  export {
41
- O as useCollapseInputCount
44
+ c as defaultFilled,
45
+ b as getTargetNode,
46
+ x as useCollapseInputCount
42
47
  };
@@ -1,45 +1,46 @@
1
- import { isBoolean as d } from "lodash-unified";
2
- import { ref as f, computed as c } from "vue";
3
- import { getStringName as p } from "../../item-group/helper.mjs";
4
- import { isDef as u } from "../../../utils/index.mjs";
5
- function l(s, r) {
6
- var e;
7
- const m = new Set(s.map((o) => o.name)), i = /* @__PURE__ */ new Map();
8
- for (const o of r) {
9
- const t = String(p((e = o.props) == null ? void 0 : e.name));
10
- t && m.has(t) && i.set(t, o);
1
+ import { isBoolean as f } from "lodash-unified";
2
+ import { ref as c, computed as u } from "vue";
3
+ import { getStringName as m } from "../../item-group/helper.mjs";
4
+ import { isDef as l } from "../../../utils/index.mjs";
5
+ import { getTargetNode as p } from "./use-collapse-input-count.mjs";
6
+ function g(n, r) {
7
+ var d;
8
+ const i = new Set(n.map((e) => e.name)), a = /* @__PURE__ */ new Map();
9
+ for (const e of r) {
10
+ const t = String(m((d = p(e).props) == null ? void 0 : d.name));
11
+ t && i.has(t) && a.set(t, e);
11
12
  }
12
- const a = /* @__PURE__ */ new Set(), n = [];
13
- for (const o of s) {
14
- const t = i.get(o.name);
15
- t && (n.push(t), a.add(t));
13
+ const s = /* @__PURE__ */ new Set(), o = [];
14
+ for (const e of n) {
15
+ const t = a.get(e.name);
16
+ t && (o.push(t), s.add(t));
16
17
  }
17
- for (const o of r)
18
- a.has(o) || n.push(o);
19
- return n;
18
+ for (const e of r)
19
+ s.has(e) || o.push(e);
20
+ return o;
20
21
  }
21
- const w = (s) => {
22
- const r = f(!1), m = c(() => (s.value || []).map((n) => {
23
- const e = n.props;
22
+ const C = (n) => {
23
+ const r = c(!1), i = u(() => (n.value || []).map((o) => {
24
+ const e = p(o).props;
24
25
  return {
25
26
  label: e.description || e.label || e.placeholder,
26
- name: p(e.name),
27
- isHidden: d(e.hidden) ? !!e.hidden : u(e.hidden)
27
+ name: m(e.name),
28
+ isHidden: f(e.hidden) ? !!e.hidden : l(e.hidden)
28
29
  };
29
30
  }));
30
- function i(a) {
31
- const n = l(
32
- a || [],
33
- s.value || []
31
+ function a(s) {
32
+ const o = g(
33
+ s || [],
34
+ n.value || []
34
35
  );
35
- r.value = !0, s.value = n;
36
+ r.value = !0, n.value = o;
36
37
  }
37
38
  return {
38
- items: m,
39
- handleClickConfirm: i,
39
+ items: i,
40
+ handleClickConfirm: a,
40
41
  sorted: r
41
42
  };
42
43
  };
43
44
  export {
44
- w as useSorter
45
+ C as useSorter
45
46
  };