@aplus-frontend/ui 7.19.8 → 7.20.0

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 (43) hide show
  1. package/es/src/ag-grid/editable/form-item.vue.mjs +113 -93
  2. package/es/src/ag-grid/editable/index.vue.mjs +91 -79
  3. package/es/src/ag-grid/editable/interface.d.ts +7 -0
  4. package/es/src/ag-grid/hooks/use-editable-api.mjs +106 -132
  5. package/es/src/ag-grid/hooks/use-editable-form-item-api.d.ts +0 -1
  6. package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +100 -165
  7. package/es/src/ag-grid/index.vue.mjs +124 -120
  8. package/es/src/ag-grid/interface.d.ts +6 -0
  9. package/es/src/business/ag-grid-modal/constants.d.ts +1 -1
  10. package/es/src/business/ag-grid-modal/constants.mjs +1 -1
  11. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.d.ts +6 -2
  12. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +51 -41
  13. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.mjs +30 -29
  14. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +46 -45
  15. package/es/src/business/ag-grid-modal/interface.d.ts +4 -4
  16. package/es/src/business/ag-grid-modal/utils.d.ts +2 -0
  17. package/es/src/business/ag-grid-modal/utils.mjs +34 -30
  18. package/es/src/business/ag-grid-modal/wrapper/index.vue.d.ts +7 -7
  19. package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +25 -25
  20. package/es/src/version.d.ts +1 -1
  21. package/es/src/version.mjs +1 -1
  22. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  23. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  24. package/lib/src/ag-grid/editable/interface.d.ts +7 -0
  25. package/lib/src/ag-grid/hooks/use-editable-api.js +1 -1
  26. package/lib/src/ag-grid/hooks/use-editable-form-item-api.d.ts +0 -1
  27. package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
  28. package/lib/src/ag-grid/index.vue.js +1 -1
  29. package/lib/src/ag-grid/interface.d.ts +6 -0
  30. package/lib/src/business/ag-grid-modal/constants.d.ts +1 -1
  31. package/lib/src/business/ag-grid-modal/constants.js +1 -1
  32. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-instance.d.ts +6 -2
  33. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-instance.js +1 -1
  34. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.js +1 -1
  35. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.js +1 -1
  36. package/lib/src/business/ag-grid-modal/interface.d.ts +4 -4
  37. package/lib/src/business/ag-grid-modal/utils.d.ts +2 -0
  38. package/lib/src/business/ag-grid-modal/utils.js +1 -1
  39. package/lib/src/business/ag-grid-modal/wrapper/index.vue.d.ts +7 -7
  40. package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
  41. package/lib/src/version.d.ts +1 -1
  42. package/lib/src/version.js +1 -1
  43. package/package.json +3 -3
@@ -1,175 +1,149 @@
1
- import { isFunction as h, isUndefined as z, isNumber as m, cloneDeep as A, isArray as x, isString as E } from "lodash-unified";
2
- import { shallowRef as N, computed as U, unref as d, isRef as $ } from "vue";
1
+ import { isFunction as K, isUndefined as S, isNumber as d, cloneDeep as T, isArray as x, isString as z } from "lodash-unified";
2
+ import { shallowRef as G, computed as N, unref as w, isRef as V } from "vue";
3
3
  import "../../utils/index.mjs";
4
- import { arrayToObject as q } from "../editable/utils.mjs";
5
- import { isDef as R } from "../../utils/is.mjs";
6
- let C = 0;
4
+ import { useDevWarning as W } from "../../utils/warning.mjs";
5
+ import { isDef as I } from "../../utils/is.mjs";
6
+ let $ = 0;
7
7
  function F() {
8
- return `_ag_grid${C++}`;
8
+ return `_ag_grid${$++}`;
9
9
  }
10
- const W = (i, K, f, g) => {
11
- const w = N([]), y = U(() => $(K) ? d(K) : K);
12
- function I(n, o) {
13
- const r = d(f)?.length || 0;
14
- if (R(i.maxLength) && r >= i.maxLength || !n && h(i.rowKey))
10
+ const Q = (u, g, i, y) => {
11
+ const h = W("EditableAgGrid"), l = G([]), m = N(() => V(g) ? w(g) : g);
12
+ function a(e, o) {
13
+ const r = w(i)?.length || 0;
14
+ if (I(u.maxLength) && r >= u.maxLength || !e && K(u.rowKey))
15
15
  return;
16
- const u = {
17
- ...n || { [i.rowKey]: F() }
16
+ const t = {
17
+ ...e || { [u.rowKey]: F() }
18
18
  };
19
- y.value?.setFieldValue?.(
20
- i.name,
21
- u,
22
- !0,
23
- (t, s) => {
24
- const e = c(u, void 0, i.rowKey);
25
- if (t[s] ? t[s][e] = u : t[s] = { [e]: u }, !f.value) {
26
- f.value = [u];
27
- return;
28
- }
29
- z(o) ? f.value.push(u) : (w.value = f.value.map(
30
- (l, v) => v < o ? null : c(l, v, i.rowKey)
31
- ).filter(Boolean), f.value.splice(o, 0, u));
32
- }
33
- );
19
+ if (!i.value) {
20
+ i.value = [t];
21
+ return;
22
+ }
23
+ S(o) ? i.value.push(t) : (l.value = i.value.map(
24
+ (n, f) => f < o ? null : c(n, f, u.rowKey)
25
+ ).filter(Boolean), i.value.splice(o, 0, t));
34
26
  }
35
- function j(n, o = "suffix") {
36
- const r = d(f)?.length || 0, u = m(n) ? n : n.length;
37
- if (R(i.maxLength) && r + u > i.maxLength || m(n) && h(i.rowKey))
27
+ function B(e, o = "suffix") {
28
+ const r = w(i)?.length || 0, t = d(e) ? e : e.length;
29
+ if (I(u.maxLength) && r + t > u.maxLength || d(e) && K(u.rowKey))
38
30
  return;
39
- const t = m(n) ? new Array(n).fill(0).map(() => ({ [i.rowKey]: F() })) : A(n), s = q(t, i.rowKey);
40
- y.value?.setFieldValue?.(
41
- i.name,
42
- t,
43
- !0,
44
- (e, l) => {
45
- if (e[l] ? Object.assign(e[l], s) : e[l] = s, !f.value) {
46
- f.value = [...t];
47
- return;
48
- }
49
- o === "suffix" ? f.value.push(...t) : (w.value = f.value.map(
50
- (v, S) => c(v, S, i.rowKey)
51
- ), f.value.unshift(...t));
52
- }
53
- );
31
+ const n = d(e) ? new Array(e).fill(0).map(() => ({ [u.rowKey]: F() })) : T(e);
32
+ if (!i.value) {
33
+ i.value = [...n];
34
+ return;
35
+ }
36
+ o === "suffix" ? i.value.push(...n) : (l.value = i.value.map(
37
+ (f, s) => c(f, s, u.rowKey)
38
+ ), i.value.unshift(...n));
54
39
  }
55
- function O(n) {
56
- const o = x(n) ? n : [n];
57
- y.value?.setFieldValue?.(
58
- i.name,
59
- void 0,
60
- !0,
61
- (r, u) => {
62
- for (const e of o) {
63
- const l = c(e, void 0, i.rowKey);
64
- delete r[u][l];
65
- }
66
- const t = f.value.filter(
67
- (e) => !o.includes(e)
68
- ), s = f.value.findIndex(
69
- (e) => o.includes(e)
70
- );
71
- w.value = f.value.map(
72
- (e, l) => l <= s ? null : c(e, l, i.rowKey)
73
- ).filter(Boolean), g?.(t);
74
- }
40
+ function L(e) {
41
+ const o = x(e) ? e : [e], r = i.value.filter(
42
+ (n) => !o.includes(n)
43
+ ), t = i.value.findIndex(
44
+ (n) => o.includes(n)
75
45
  );
46
+ l.value = i.value.map(
47
+ (n, f) => f <= t ? null : c(n, f, u.rowKey)
48
+ ).filter(Boolean), y?.(r);
76
49
  }
77
- function c(n, o, r) {
50
+ function c(e, o, r) {
78
51
  if (r)
79
- return E(r) ? n[r] : r(n, o);
52
+ return z(r) ? e[r] : r(e, o);
80
53
  }
81
- function k(n) {
82
- const o = new Set(x(n) ? n : [n]);
83
- o.size !== 0 && y.value?.setFieldValue?.(
84
- i.name,
85
- void 0,
86
- !0,
87
- (r, u) => {
88
- for (const e of o)
89
- delete r[u][e];
90
- const t = f.value.filter(
91
- (e, l) => !o.has(c(e, l, i.rowKey))
92
- ), s = f.value.findIndex(
93
- (e, l) => o.has(c(e, l, i.rowKey))
94
- );
95
- w.value = f.value.map(
96
- (e, l) => l <= s ? null : c(e, l, i.rowKey)
97
- ).filter(Boolean), g?.(t);
98
- }
54
+ function U(e) {
55
+ const o = new Set(x(e) ? e : [e]);
56
+ if (o.size === 0)
57
+ return;
58
+ const r = i.value.filter(
59
+ (n, f) => !o.has(c(n, f, u.rowKey))
60
+ ), t = i.value.findIndex(
61
+ (n, f) => o.has(c(n, f, u.rowKey))
99
62
  );
63
+ l.value = i.value.map(
64
+ (n, f) => f <= t ? null : c(n, f, u.rowKey)
65
+ ).filter(Boolean), y?.(r);
100
66
  }
101
- function B(n) {
102
- return d(f)?.[n];
67
+ function j(e) {
68
+ return h(
69
+ !u.supressForceRowUpdate,
70
+ "usage",
71
+ 'Avoid using getRowData/setRowData methods while suppressForceRowUpdate is enabled."'
72
+ ), w(i)?.[e];
103
73
  }
104
- function V(n) {
105
- return f.value?.find(
106
- (o, r) => c(o, r, i.rowKey) === n
74
+ function k(e) {
75
+ return i.value?.find(
76
+ (o, r) => c(o, r, u.rowKey) === e
107
77
  );
108
78
  }
109
- function a() {
110
- return d(f);
79
+ function A() {
80
+ return w(i);
111
81
  }
112
- function L(n, o, r = !0) {
113
- y.value?.setFieldValue?.(
114
- i.name,
82
+ function O(e, o, r = !0) {
83
+ h(
84
+ !u.supressForceRowUpdate,
85
+ "usage",
86
+ 'Avoid using getRowData/setRowData methods while suppressForceRowUpdate is enabled."'
87
+ ), m.value?.setFieldValue?.(
88
+ u.name,
115
89
  void 0,
116
90
  !0,
117
- (u, t) => {
118
- const s = f.value.findIndex(
119
- (l, v) => n === v
91
+ (t, n) => {
92
+ const f = i.value.findIndex(
93
+ (R, v) => e === v
120
94
  );
121
- if (!~s)
95
+ if (!~f)
122
96
  return;
123
- const e = c(
124
- f.value[s],
125
- s,
126
- i.rowKey
97
+ const s = c(
98
+ i.value[f],
99
+ f,
100
+ u.rowKey
127
101
  );
128
- if (e && !(!u[t] || !u[t][e])) {
102
+ if (s && !(!t[n] || !t[n][s])) {
129
103
  if (!r) {
130
- const l = Object.keys(u[t][e]);
131
- for (const v of l)
132
- v !== i.rowKey && delete u[t][e][v];
104
+ const R = Object.keys(t[n][s]);
105
+ for (const v of R)
106
+ v !== u.rowKey && delete t[n][s][v];
133
107
  }
134
- Object.assign(u[t][e], { ...o });
108
+ Object.assign(t[n][s], { ...o });
135
109
  }
136
110
  }
137
111
  );
138
112
  }
139
- function T(n, o, r = !0) {
140
- y.value?.setFieldValue?.(
141
- i.name,
113
+ function _(e, o, r = !0) {
114
+ m.value?.setFieldValue?.(
115
+ u.name,
142
116
  void 0,
143
117
  !0,
144
- (u, t) => {
145
- if (!(!u[t] || !u[t][n])) {
118
+ (t, n) => {
119
+ if (!(!t[n] || !t[n][e])) {
146
120
  if (!r) {
147
- const s = Object.keys(u[t][n]);
148
- for (const e of s)
149
- e !== i.rowKey && delete u[t][e][e];
121
+ const f = Object.keys(t[n][e]);
122
+ for (const s of f)
123
+ s !== u.rowKey && delete t[n][s][s];
150
124
  }
151
- Object.assign(u[t][n], { ...o });
125
+ Object.assign(t[n][e], { ...o });
152
126
  }
153
127
  }
154
128
  );
155
129
  }
156
- function _() {
157
- y.value?.setFieldValue?.(i.name, {}), g?.([]);
130
+ function E() {
131
+ y?.([]);
158
132
  }
159
133
  return {
160
- add: I,
161
- addMultiple: j,
162
- remove: O,
163
- removeByKey: k,
164
- getRowData: B,
165
- getRowsData: a,
166
- setRowDataByKey: T,
167
- setRowData: L,
168
- clear: _,
169
- refreshRowIds: w,
170
- getRowDataByKey: V
134
+ add: a,
135
+ addMultiple: B,
136
+ remove: L,
137
+ removeByKey: U,
138
+ getRowData: j,
139
+ getRowsData: A,
140
+ setRowDataByKey: _,
141
+ setRowData: O,
142
+ clear: E,
143
+ refreshRowIds: l,
144
+ getRowDataByKey: k
171
145
  };
172
146
  };
173
147
  export {
174
- W as useEditableApi
148
+ Q as useEditableApi
175
149
  };
@@ -5,7 +5,6 @@ import { EditableAgGridProps } from '../editable/interface';
5
5
  export declare const useEditableFormItemApi: <RecordType>(props: EditableAgGridProps<RecordType>, formApi: ApFormInternalInstance | undefined, tableData: Ref<RecordType[]>, shadowName: string) => {
6
6
  add: (defaultValue?: Partial<RecordType>, insertIndex?: number) => void;
7
7
  addMultiple: (list: number | Partial<RecordType>[], insetIn?: "prefix" | "suffix") => void;
8
- __addMultiple: (list: number | Partial<RecordType>[], insetIn?: "prefix" | "suffix", overwriting?: boolean) => void;
9
8
  remove: (data: RecordType | RecordType[]) => void;
10
9
  removeByKey: (key: Key | Key[]) => void;
11
10
  getRowData: (index: number) => RecordType;
@@ -1,205 +1,140 @@
1
- import { isFunction as V, isUndefined as R, isNumber as F, cloneDeep as q, isArray as j } from "lodash-unified";
2
- import { shallowRef as C, unref as h } from "vue";
1
+ import { isFunction as K, isUndefined as E, isNumber as g, cloneDeep as z, isArray as R } from "lodash-unified";
2
+ import { shallowRef as G, unref as w } from "vue";
3
3
  import "../../utils/index.mjs";
4
- import { getRowKey as y, arrayToObject as G } from "../editable/utils.mjs";
5
- import { isDef as O } from "../../utils/is.mjs";
6
- let H = 0;
7
- function B() {
8
- return `_ag_grid${H++}`;
4
+ import { useDevWarning as S } from "../../utils/warning.mjs";
5
+ import { getRowKey as l } from "../editable/utils.mjs";
6
+ import { isDef as x } from "../../utils/is.mjs";
7
+ let V = 0;
8
+ function I() {
9
+ return `_ag_grid${V++}`;
9
10
  }
10
- const Y = (l, r, i, w) => {
11
- const d = C([]);
12
- function I(u, t) {
13
- const v = h(i)?.length || 0;
14
- if (O(l.maxLength) && v >= l.maxLength || !u && V(l.rowKey))
11
+ const N = (o, y, e, d) => {
12
+ const c = G([]), h = S("EditableAgGridFormItem");
13
+ function F(n, s) {
14
+ const r = w(e)?.length || 0;
15
+ if (x(o.maxLength) && r >= o.maxLength || !n && K(o.rowKey))
15
16
  return;
16
- const n = {
17
- ...u || { [l.rowKey]: B() }
17
+ const u = {
18
+ ...n || { [o.rowKey]: I() }
18
19
  };
19
- r?.setFieldValue(
20
- w,
21
- n,
22
- !1,
23
- (s, o) => {
24
- const e = y(n, void 0, l.rowKey);
25
- s[o] ? s[o][e] = n : s[o] = { [e]: n }, i.value ? R(t) ? i.value.push(n) : (d.value = i.value.map(
26
- (f, c) => c < t ? null : y(f, c, l.rowKey)
27
- ).filter(Boolean), i.value.splice(t, 0, n)) : i.value = [n], r?.setFieldValue(
28
- l.name,
29
- n,
30
- !0,
31
- (f, c) => {
32
- if (!f[c]) {
33
- f[c] = [n];
34
- return;
35
- }
36
- R(t) ? f[c].push(n) : f[c].splice(t, 0, n);
37
- }
38
- );
39
- }
40
- );
20
+ e.value ? E(s) ? e.value.push(u) : (c.value = e.value.map(
21
+ (i, f) => f < s ? null : l(i, f, o.rowKey)
22
+ ).filter(Boolean), e.value.splice(s, 0, u)) : e.value = [u];
41
23
  }
42
- function x(u, t = "suffix", v = !1) {
43
- if (!u)
24
+ function B(n, s = "suffix") {
25
+ if (!n)
44
26
  return;
45
- const n = h(i)?.length || 0, s = F(u) ? u : u.length;
46
- if (O(l.maxLength) && n + s > l.maxLength || F(u) && V(l.rowKey))
27
+ const r = w(e)?.length || 0, u = g(n) ? n : n.length;
28
+ if (x(o.maxLength) && r + u > o.maxLength || g(n) && K(o.rowKey))
47
29
  return;
48
- const o = F(u) ? new Array(u).fill(0).map(() => ({ [l.rowKey]: B() })) : q(u), e = G(o, l.rowKey);
49
- r?.setFieldValue(
50
- w,
51
- e,
52
- !1,
53
- (f, c) => {
54
- f[c] ? Object.assign(f[c], e) : f[c] = e, i.value ? t === "suffix" ? i.value.push(...o) : (d.value = i.value.map(
55
- (K, g) => y(K, g, l.rowKey)
56
- ), i.value.unshift(...o)) : i.value = [...o], r?.setFieldValue(
57
- l.name,
58
- o,
59
- !0,
60
- (K, g) => {
61
- if (!K[g] || v) {
62
- K[g] = [...o];
63
- return;
64
- }
65
- t === "suffix" ? K[g].push(...o) : K[g].unshift(...o);
66
- }
67
- );
68
- }
69
- );
30
+ const i = g(n) ? new Array(n).fill(0).map(() => ({ [o.rowKey]: I() })) : z(n);
31
+ e.value ? s === "suffix" ? e.value.push(...i) : (c.value = e.value.map(
32
+ (f, t) => l(f, t, o.rowKey)
33
+ ), e.value.unshift(...i)) : e.value = [...i];
70
34
  }
71
- function _(u, t = "suffix") {
72
- x(u, t, !1);
73
- }
74
- function k(u) {
75
- const t = j(u) ? u : [u];
76
- r?.setFieldValue(
77
- w,
78
- void 0,
79
- !1,
80
- (v, n) => {
81
- for (const e of t) {
82
- const f = y(e, void 0, l.rowKey);
83
- delete v[n][f];
84
- }
85
- const s = i.value.filter(
86
- (e) => !t.includes(e)
87
- ), o = i.value.findIndex(
88
- (e) => t.includes(e)
89
- );
90
- d.value = i.value.map(
91
- (e, f) => f <= o ? null : y(e, f, l.rowKey)
92
- ).filter(Boolean), s.length ? i.value = s : i.value.splice(0, i.value.length), r.setFieldValue(
93
- l.name,
94
- void 0,
95
- !0,
96
- (e, f) => {
97
- e[f] = [...s];
98
- }
99
- );
100
- }
35
+ function A(n) {
36
+ const s = R(n) ? n : [n], r = e.value.filter(
37
+ (i) => !s.includes(i)
38
+ ), u = e.value.findIndex(
39
+ (i) => s.includes(i)
101
40
  );
41
+ c.value = e.value.map(
42
+ (i, f) => f <= u ? null : l(i, f, o.rowKey)
43
+ ).filter(Boolean), r.length ? e.value = r : e.value.splice(0, e.value.length);
102
44
  }
103
- function L(u) {
104
- const t = new Set(j(u) ? u : [u]);
105
- t.size !== 0 && r?.setFieldValue(
106
- w,
107
- void 0,
108
- !1,
109
- (v, n) => {
110
- for (const e of t)
111
- delete v[n][e];
112
- const s = i.value.filter(
113
- (e, f) => !t.has(y(e, f, l.rowKey))
114
- ), o = i.value.findIndex(
115
- (e, f) => t.has(y(e, f, l.rowKey))
116
- );
117
- d.value = i.value.map(
118
- (e, f) => f <= o ? null : y(e, f, l.rowKey)
119
- ).filter(Boolean), s.length ? i.value = s : i.value.splice(0, i.value.length), r.setFieldValue(
120
- l.name,
121
- void 0,
122
- !0,
123
- (e, f) => {
124
- e[f] = [...s];
125
- }
126
- );
127
- }
45
+ function L(n) {
46
+ const s = new Set(R(n) ? n : [n]);
47
+ if (s.size === 0)
48
+ return;
49
+ const r = e.value.filter(
50
+ (i, f) => !s.has(l(i, f, o.rowKey))
51
+ ), u = e.value.findIndex(
52
+ (i, f) => s.has(l(i, f, o.rowKey))
128
53
  );
54
+ c.value = e.value.map(
55
+ (i, f) => f <= u ? null : l(i, f, o.rowKey)
56
+ ).filter(Boolean), r.length ? e.value = r : e.value.splice(0, e.value.length);
129
57
  }
130
- function T(u) {
131
- return h(i)?.[u];
58
+ function U(n) {
59
+ return h(
60
+ !o.supressForceRowUpdate,
61
+ "usage",
62
+ 'Avoid using getRowData/setRowData methods while suppressForceRowUpdate is enabled."'
63
+ ), w(e)?.[n];
132
64
  }
133
- function z(u) {
134
- return i.value?.find(
135
- (t, v) => y(t, v, l.rowKey) === u
65
+ function j(n) {
66
+ return e.value?.find(
67
+ (s, r) => l(s, r, o.rowKey) === n
136
68
  );
137
69
  }
138
- function E() {
139
- return h(i);
70
+ function O() {
71
+ return w(e);
140
72
  }
141
- function S(u, t, v = !0) {
142
- r?.setFieldValue?.(
143
- w,
73
+ function T(n, s, r = !0) {
74
+ h(
75
+ !o.supressForceRowUpdate,
76
+ "usage",
77
+ 'Avoid using getRowData/setRowData methods while suppressForceRowUpdate is enabled."'
78
+ ), y?.setFieldValue?.(
79
+ d,
144
80
  void 0,
145
81
  !1,
146
- (n, s) => {
147
- const o = i.value.findIndex(
148
- (f, c) => u === c
82
+ (u, i) => {
83
+ const f = e.value.findIndex(
84
+ (m, v) => n === v
149
85
  );
150
- if (!~o)
86
+ if (!~f)
151
87
  return;
152
- const e = y(
153
- i.value[o],
154
- o,
155
- l.rowKey
88
+ const t = l(
89
+ e.value[f],
90
+ f,
91
+ o.rowKey
156
92
  );
157
- if (e && !(!n[s] || !n[s][e])) {
158
- if (!v) {
159
- const f = Object.keys(n[s][e]);
160
- for (const c of f)
161
- c !== l.rowKey && delete n[s][e][c];
93
+ if (t && !(!u[i] || !u[i][t])) {
94
+ if (!r) {
95
+ const m = Object.keys(u[i][t]);
96
+ for (const v of m)
97
+ v !== o.rowKey && delete u[i][t][v];
162
98
  }
163
- Object.assign(n[s][e], { ...t });
99
+ Object.assign(u[i][t], { ...s });
164
100
  }
165
101
  }
166
102
  );
167
103
  }
168
- function U(u, t, v = !0) {
169
- r?.setFieldValue?.(
170
- w,
104
+ function _(n, s, r = !0) {
105
+ y?.setFieldValue?.(
106
+ d,
171
107
  void 0,
172
108
  !1,
173
- (n, s) => {
174
- if (!(!n[s] || !n[s][u])) {
175
- if (!v) {
176
- const o = Object.keys(n[s][u]);
177
- for (const e of o)
178
- e !== l.rowKey && delete n[s][u][e];
109
+ (u, i) => {
110
+ if (!(!u[i] || !u[i][n])) {
111
+ if (!r) {
112
+ const f = Object.keys(u[i][n]);
113
+ for (const t of f)
114
+ t !== o.rowKey && delete u[i][n][t];
179
115
  }
180
- Object.assign(n[s][u], { ...t });
116
+ Object.assign(u[i][n], { ...s });
181
117
  }
182
118
  }
183
119
  );
184
120
  }
185
- function $() {
186
- r?.setFieldValue(w, {}), r?.setFieldValue(l.name, []);
121
+ function k() {
122
+ e.value = [];
187
123
  }
188
124
  return {
189
- add: I,
190
- addMultiple: _,
191
- __addMultiple: x,
192
- remove: k,
125
+ add: F,
126
+ addMultiple: B,
127
+ remove: A,
193
128
  removeByKey: L,
194
- getRowData: T,
195
- getRowsData: E,
196
- setRowDataByKey: U,
197
- setRowData: S,
198
- clear: $,
199
- refreshRowIds: d,
200
- getRowDataByKey: z
129
+ getRowData: U,
130
+ getRowsData: O,
131
+ setRowDataByKey: _,
132
+ setRowData: T,
133
+ clear: k,
134
+ refreshRowIds: c,
135
+ getRowDataByKey: j
201
136
  };
202
137
  };
203
138
  export {
204
- Y as useEditableFormItemApi
139
+ N as useEditableFormItemApi
205
140
  };