@aplus-frontend/ui 7.19.8 → 7.20.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 (47) hide show
  1. package/es/src/ag-grid/components/tooltip/index.vue2.mjs +9 -9
  2. package/es/src/ag-grid/editable/form-item.vue.mjs +113 -93
  3. package/es/src/ag-grid/editable/index.vue.mjs +91 -79
  4. package/es/src/ag-grid/editable/interface.d.ts +7 -0
  5. package/es/src/ag-grid/hooks/use-columns-def.mjs +74 -65
  6. package/es/src/ag-grid/hooks/use-editable-api.mjs +106 -132
  7. package/es/src/ag-grid/hooks/use-editable-form-item-api.d.ts +0 -1
  8. package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +100 -165
  9. package/es/src/ag-grid/index.vue.mjs +124 -120
  10. package/es/src/ag-grid/interface.d.ts +6 -0
  11. package/es/src/business/ag-grid-modal/constants.d.ts +1 -1
  12. package/es/src/business/ag-grid-modal/constants.mjs +1 -1
  13. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.d.ts +6 -2
  14. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +47 -37
  15. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.mjs +30 -29
  16. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +46 -45
  17. package/es/src/business/ag-grid-modal/interface.d.ts +4 -4
  18. package/es/src/business/ag-grid-modal/utils.d.ts +2 -0
  19. package/es/src/business/ag-grid-modal/utils.mjs +34 -30
  20. package/es/src/business/ag-grid-modal/wrapper/index.vue.d.ts +7 -7
  21. package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +25 -25
  22. package/es/src/version.d.ts +1 -1
  23. package/es/src/version.mjs +1 -1
  24. package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -1
  25. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  26. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  27. package/lib/src/ag-grid/editable/interface.d.ts +7 -0
  28. package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
  29. package/lib/src/ag-grid/hooks/use-editable-api.js +1 -1
  30. package/lib/src/ag-grid/hooks/use-editable-form-item-api.d.ts +0 -1
  31. package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
  32. package/lib/src/ag-grid/index.vue.js +1 -1
  33. package/lib/src/ag-grid/interface.d.ts +6 -0
  34. package/lib/src/business/ag-grid-modal/constants.d.ts +1 -1
  35. package/lib/src/business/ag-grid-modal/constants.js +1 -1
  36. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-instance.d.ts +6 -2
  37. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-instance.js +1 -1
  38. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.js +1 -1
  39. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.js +1 -1
  40. package/lib/src/business/ag-grid-modal/interface.d.ts +4 -4
  41. package/lib/src/business/ag-grid-modal/utils.d.ts +2 -0
  42. package/lib/src/business/ag-grid-modal/utils.js +1 -1
  43. package/lib/src/business/ag-grid-modal/wrapper/index.vue.d.ts +7 -7
  44. package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
  45. package/lib/src/version.d.ts +1 -1
  46. package/lib/src/version.js +1 -1
  47. package/package.json +1 -1
@@ -1,25 +1,25 @@
1
- import { defineComponent as p, ref as u, onMounted as m, withDirectives as d, openBlock as v, createElementBlock as f, normalizeClass as g, unref as h, toDisplayString as w, vShow as _ } from "vue";
1
+ import { defineComponent as m, ref as u, onMounted as d, unref as l, withDirectives as f, openBlock as v, createElementBlock as g, normalizeClass as h, toDisplayString as w, vShow as _ } from "vue";
2
2
  import "../../../config-provider/index.mjs";
3
3
  import { useNamespace as x } from "../../../config-provider/hooks/use-namespace.mjs";
4
- const k = /* @__PURE__ */ p({
4
+ const k = /* @__PURE__ */ m({
5
5
  __name: "index",
6
6
  props: {
7
7
  params: {}
8
8
  },
9
- setup(l) {
10
- const n = l, e = u(!1), { e: i } = x("ag-grid");
11
- return m(() => {
12
- const { rowIndex: o, column: t, gridWrapperRef: s, lineClamp: c } = n.params, r = s.value?.querySelector(
9
+ setup(n) {
10
+ const i = n, e = u(!1), { e: s } = x("ag-grid");
11
+ return d(() => {
12
+ const { rowIndex: o, column: t, gridWrapperRef: c, lineClamp: p } = i.params, r = l(c)?.querySelector(
13
13
  `div.ag-row[row-index="${o}"] .ag-cell[col-id="${t.colId}"] span.ag-cell-value`
14
14
  );
15
15
  if (!r) {
16
16
  e.value = !0;
17
17
  return;
18
18
  }
19
- const a = c === 1 ? "Width" : "Height";
19
+ const a = p === 1 ? "Width" : "Height";
20
20
  e.value = r[`scroll${a}`] > r[`client${a}`];
21
- }), (o, t) => d((v(), f("div", {
22
- class: g(h(i)("tooltip"))
21
+ }), (o, t) => f((v(), g("div", {
22
+ class: h(l(s)("tooltip"))
23
23
  }, w(o.params.value), 3)), [
24
24
  [_, e.value]
25
25
  ]);
@@ -1,21 +1,21 @@
1
- import { defineComponent as W, useSlots as $, ref as g, onMounted as q, watch as J, unref as r, createElementBlock as Q, openBlock as X, Fragment as Y, createVNode as f, mergeProps as h, withCtx as C, createSlots as Z, renderList as ee, renderSlot as oe, normalizeProps as te, guardReactiveProps as ae } from "vue";
2
- import { cloneDeep as u, isEqual as ne, omit as le } from "lodash-unified";
3
- import { ApForm as R } from "../../ap-form/index.mjs";
4
- import { useInjectForm as re } from "../../ap-form/context.mjs";
5
- import { useWatch as se } from "../../ap-form/hooks/use-watch.mjs";
6
- import { getModelValue as ie } from "../../ap-form/utils/get.mjs";
7
- import { transformValues as me } from "../../ap-form/utils/transform.mjs";
1
+ import { defineComponent as Q, useSlots as X, ref as w, watch as y, unref as l, createElementBlock as Y, openBlock as Z, Fragment as ee, createVNode as c, mergeProps as g, withCtx as h, createSlots as oe, renderList as te, renderSlot as ae, normalizeProps as ne, guardReactiveProps as le } from "vue";
2
+ import { isEqual as C, cloneDeep as re, omit as se } from "lodash-unified";
3
+ import { ApForm as b } from "../../ap-form/index.mjs";
4
+ import { useInjectForm as ie } from "../../ap-form/context.mjs";
5
+ import { useWatch as R } from "../../ap-form/hooks/use-watch.mjs";
6
+ import { getModelValue as me } from "../../ap-form/utils/get.mjs";
7
+ import { transformValues as ue } from "../../ap-form/utils/transform.mjs";
8
8
  import "../../config-provider/index.mjs";
9
- import { useGetEditableColumns as ue } from "../hooks/use-editable-columns.mjs";
10
- import { useEditableFormItemApi as de } from "../hooks/use-editable-form-item-api.mjs";
9
+ import { useGetEditableColumns as de } from "../hooks/use-editable-columns.mjs";
10
+ import { useEditableFormItemApi as pe } from "../hooks/use-editable-form-item-api.mjs";
11
11
  import "../index.vue2.mjs";
12
- import pe from "../style/editable.mjs";
12
+ import ce from "../style/editable.mjs";
13
13
  import { getShadowName as fe } from "../utils.mjs";
14
- import { getColumnTransformOptions as ce, arrayToObject as b, getRowKey as we } from "./utils.mjs";
15
- import { useNamespace as ye } from "../../config-provider/hooks/use-namespace.mjs";
16
- import { useGlobalConfig as ge } from "../../config-provider/hooks/use-global-config.mjs";
17
- import he from "../index.vue.mjs";
18
- const ke = /* @__PURE__ */ W({
14
+ import { getColumnTransformOptions as we, arrayToObject as ye, getRowKey as ge } from "./utils.mjs";
15
+ import { useNamespace as he } from "../../config-provider/hooks/use-namespace.mjs";
16
+ import { useGlobalConfig as Ce } from "../../config-provider/hooks/use-global-config.mjs";
17
+ import be from "../index.vue.mjs";
18
+ const ze = /* @__PURE__ */ Q({
19
19
  name: "EditableGrid",
20
20
  __name: "form-item",
21
21
  props: {
@@ -120,6 +120,7 @@ const ke = /* @__PURE__ */ W({
120
120
  type: Boolean
121
121
  },
122
122
  onUpdate: {},
123
+ onModelUpdated: {},
123
124
  customRow: {},
124
125
  theme: {},
125
126
  emptyComponent: {},
@@ -142,126 +143,145 @@ const ke = /* @__PURE__ */ W({
142
143
  name: {},
143
144
  formItem: {}
144
145
  },
145
- setup(B, {
146
- expose: v
146
+ setup(v, {
147
+ expose: B
147
148
  }) {
148
- const x = $(), t = B, {
149
- b: S
150
- } = ye("editable-aggrid"), I = pe("editable-aggrid"), m = g(), {
151
- internalInstance: n
152
- } = re();
153
- function F(e) {
154
- const o = ce(t.columns || []);
149
+ const x = X(), a = v, {
150
+ b: T
151
+ } = he("editable-aggrid"), S = ce("editable-aggrid"), r = w(), {
152
+ internalInstance: s
153
+ } = ie();
154
+ function I(e) {
155
+ const o = we(a.columns || []);
155
156
  if (!Object.keys(o).length || !e?.length)
156
157
  return e;
157
- let a = [];
158
- for (const i of e)
159
- a.push(me(i, o));
160
- return a;
158
+ let t = [];
159
+ for (const m of e)
160
+ t.push(ue(m, o));
161
+ return t;
161
162
  }
162
- const s = fe(t.name);
163
- let c = [];
164
- q(() => {
165
- const e = t.formItem?.initialValue ?? ie(n?.getInitialValues() ?? {}, t.name);
166
- e && (n?.updateInitialModel(s, b(u(e), t.rowKey)), c = u(e), l.value || _(u(e), "suffix", !0));
167
- });
168
- const l = g([]), T = se(t.name);
169
- J(() => T.value, (e) => {
170
- ne(e, l.value) || w(e ?? u(c));
163
+ const i = fe(a.name);
164
+ function F() {
165
+ return a.formItem?.initialValue ?? me(s?.getInitialValues() ?? {}, a.name) ?? [];
166
+ }
167
+ let V = F();
168
+ const n = w([]), E = R(a.name), D = R(i);
169
+ y(() => E.value, (e) => {
170
+ if (C(e, n.value))
171
+ return;
172
+ const o = e ?? re(V);
173
+ n.value = [...o];
171
174
  }, {
172
175
  deep: !0,
173
176
  flush: "post",
174
177
  immediate: !0
175
178
  });
176
- const E = ge("valueTypeMap"), V = ue(t, E, s), {
179
+ let u;
180
+ y(n, (e) => {
181
+ const o = ye(e, a.rowKey);
182
+ C(o, l(D)) || (u = () => {
183
+ s?.setFieldValue(a.name, [...e]), s?.setFieldValue(i, o);
184
+ });
185
+ }, {
186
+ deep: !0,
187
+ immediate: !0
188
+ });
189
+ const N = Ce("valueTypeMap"), A = de(a, N, i), {
177
190
  add: K,
178
- addMultiple: N,
179
- __addMultiple: _,
180
- remove: D,
181
- removeByKey: j,
182
- getRowData: k,
191
+ addMultiple: j,
192
+ remove: _,
193
+ removeByKey: k,
194
+ getRowData: z,
183
195
  getRowsData: O,
184
- getRowDataByKey: z,
196
+ getRowDataByKey: U,
185
197
  setRowData: H,
186
198
  setRowDataByKey: L,
187
- clear: M,
199
+ clear: P,
188
200
  refreshRowIds: d
189
- } = de(t, n, l, s);
190
- function P() {
191
- const e = m.value?._internalGridApi;
201
+ } = pe(a, s, n, i);
202
+ function G() {
203
+ if (a.onUpdate?.(), u && (u(), u = void 0), a.supressForceRowUpdate)
204
+ return;
205
+ const e = r.value?._internalGridApi;
192
206
  if (!d.value?.length || !e)
193
207
  return;
194
- const o = d.value.map((a) => e.getRowNode(a)).filter((a) => !!a);
195
- t.supressForceRowUpdate || e.refreshCells({
208
+ const o = d.value.map((t) => e.getRowNode(t)).filter((t) => !!t);
209
+ e.refreshCells({
196
210
  rowNodes: o,
197
211
  force: !0
198
212
  }), d.value = [];
199
213
  }
200
- function w(e) {
201
- l.value = [...e];
202
- const o = b(e, t.rowKey);
203
- n?.setFieldValue(t.name, [...e]), n?.setFieldValue(s, o);
214
+ function M(e) {
215
+ n.value = [...e];
216
+ }
217
+ function f(e, o) {
218
+ const t = e === "end" ? n.value.length - 1 : e;
219
+ r.value?.scrollToRow(t, o);
204
220
  }
205
- function y(e, o) {
206
- const a = e === "end" ? l.value.length - 1 : e;
207
- m.value?.scrollToRow(a, o);
221
+ function W(e, o) {
222
+ r.value?.scrollToColumn(e, o);
208
223
  }
209
- function A(e, o) {
210
- m.value?.scrollToColumn(e, o);
224
+ function $(e, o) {
225
+ const t = [i, String(e), o].flat();
226
+ return s?.validateFields([t]);
211
227
  }
212
- function G(e, o) {
213
- const a = [s, String(e), o].flat();
214
- return n?.validateFields([a]);
228
+ function q(e) {
229
+ const t = l(n).map((m, p) => [i, String(ge(m, p, a.rowKey)), e].flat());
230
+ return s?.validateFields(t);
215
231
  }
216
- function U(e) {
217
- const a = r(l).map((i, p) => [s, String(we(i, p, t.rowKey)), e].flat());
218
- return n?.validateFields(a);
232
+ function J(e, o = !0) {
233
+ const t = Array.isArray(e) ? e : [e];
234
+ r.value?._internalGridApi?.refreshCells({
235
+ columns: t,
236
+ force: o
237
+ });
219
238
  }
220
- return v({
239
+ return B({
221
240
  add: K,
222
- addMultiple: N,
223
- remove: D,
224
- removeByKey: j,
225
- getRowData: k,
241
+ addMultiple: j,
242
+ remove: _,
243
+ removeByKey: k,
244
+ getRowData: z,
226
245
  getRowsData: O,
227
- getRowDataByKey: z,
246
+ getRowDataByKey: U,
228
247
  setRowData: H,
229
- clear: M,
230
- setTableData: w,
231
- scrollTo: y,
232
- scrollToRow: y,
233
- scrollToColumn: A,
234
- validateCell: G,
235
- validateColumn: U,
248
+ clear: P,
249
+ setTableData: M,
250
+ scrollTo: f,
251
+ scrollToRow: f,
252
+ scrollToColumn: W,
253
+ validateCell: $,
254
+ validateColumn: q,
236
255
  setRowDataByKey: L,
237
- table: m
238
- }), (e, o) => (X(), Q(Y, null, [f(r(R).FormItem, {
256
+ table: r,
257
+ refreshColumns: J
258
+ }), (e, o) => (Z(), Y(ee, null, [c(l(b).FormItem, {
239
259
  hidden: "",
240
260
  name: e.name,
241
261
  "initial-value": e.formItem?.initialValue,
242
- transform: F
243
- }, null, 8, ["name", "initial-value"]), f(r(R).FormItem, h({
262
+ transform: I
263
+ }, null, 8, ["name", "initial-value"]), c(l(b).FormItem, g({
244
264
  label: e.label
245
265
  }, e.formItem), {
246
- default: C(() => [f(he, h(r(le)(t, ["name", "maxLength", "onChange", "defaultValue", "formItem"]), {
266
+ default: h(() => [c(be, g(l(se)(a, ["name", "maxLength", "onChange", "defaultValue", "formItem", "onUpdate"]), {
247
267
  ref_key: "tableRef",
248
- ref: m,
249
- class: [r(S)(), r(I)],
268
+ ref: r,
269
+ class: [l(T)(), l(S)],
250
270
  size: "mini",
251
- columns: r(V),
252
- "data-source": l.value,
271
+ columns: l(A),
272
+ "data-source": n.value,
253
273
  "search-form": !1,
254
- onUpdate: P
255
- }), Z({
274
+ onUpdate: G
275
+ }), oe({
256
276
  _: 2
257
- }, [ee(x, (a, i) => ({
258
- name: i,
259
- fn: C((p) => [oe(e.$slots, i, te(ae(p || {})))])
277
+ }, [te(x, (t, m) => ({
278
+ name: m,
279
+ fn: h((p) => [ae(e.$slots, m, ne(le(p || {})))])
260
280
  }))]), 1040, ["class", "columns", "data-source"])]),
261
281
  _: 3
262
282
  }, 16, ["label"])], 64));
263
283
  }
264
284
  });
265
285
  export {
266
- ke as default
286
+ ze as default
267
287
  };
@@ -1,18 +1,18 @@
1
- import { defineComponent as q, useSlots as J, ref as h, watch as Q, unref as l, createBlock as X, openBlock as Y, withCtx as m, createVNode as b, mergeProps as Z, createSlots as ee, renderList as oe, renderSlot as ae, normalizeProps as te, guardReactiveProps as ne } from "vue";
2
- import { isEqual as le, isArray as v, omit as re } from "lodash-unified";
3
- import { ApForm as c } from "../../ap-form/index.mjs";
1
+ import { defineComponent as Q, useSlots as X, ref as h, watch as Y, unref as r, createBlock as Z, openBlock as ee, withCtx as c, createVNode as C, mergeProps as oe, createSlots as ae, renderList as te, renderSlot as ne, normalizeProps as re, guardReactiveProps as le } from "vue";
2
+ import { isEqual as se, isArray as b, omit as ie } from "lodash-unified";
3
+ import { ApForm as f } from "../../ap-form/index.mjs";
4
4
  import "../../config-provider/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
- import { useEditableApi as se } from "../hooks/use-editable-api.mjs";
7
- import { useGetEditableColumns as ie } from "../hooks/use-editable-columns.mjs";
6
+ import { useEditableApi as de } from "../hooks/use-editable-api.mjs";
7
+ import { useGetEditableColumns as ue } from "../hooks/use-editable-columns.mjs";
8
8
  import "../index.vue2.mjs";
9
- import de from "../style/editable.mjs";
10
- import { arrayToObject as f, getRowKey as ue } from "./utils.mjs";
11
- import { useNamespace as pe } from "../../config-provider/hooks/use-namespace.mjs";
12
- import { useControllableValue as me } from "../../hooks/useControllableValue.mjs";
13
- import { useGlobalConfig as ce } from "../../config-provider/hooks/use-global-config.mjs";
14
- import fe from "../index.vue.mjs";
15
- const Ke = /* @__PURE__ */ q({
9
+ import pe from "../style/editable.mjs";
10
+ import { arrayToObject as v, getRowKey as me } from "./utils.mjs";
11
+ import { useNamespace as ce } from "../../config-provider/hooks/use-namespace.mjs";
12
+ import { useControllableValue as fe } from "../../hooks/useControllableValue.mjs";
13
+ import { useGlobalConfig as ye } from "../../config-provider/hooks/use-global-config.mjs";
14
+ import we from "../index.vue.mjs";
15
+ const Ke = /* @__PURE__ */ Q({
16
16
  name: "EditableGrid",
17
17
  __name: "index",
18
18
  props: {
@@ -117,6 +117,7 @@ const Ke = /* @__PURE__ */ q({
117
117
  type: Boolean
118
118
  },
119
119
  onUpdate: {},
120
+ onModelUpdated: {},
120
121
  customRow: {},
121
122
  theme: {},
122
123
  emptyComponent: {},
@@ -142,126 +143,137 @@ const Ke = /* @__PURE__ */ q({
142
143
  }
143
144
  },
144
145
  emits: ["update:value"],
145
- setup(C, {
146
- expose: x,
147
- emit: B
146
+ setup(x, {
147
+ expose: B,
148
+ emit: S
148
149
  }) {
149
- const S = J(), a = C, {
150
- b: T
151
- } = pe("editable-aggrid"), F = de("editable-aggrid"), _ = B, i = h(), {
152
- value: s,
150
+ const T = X(), t = x, {
151
+ b: F
152
+ } = ce("editable-aggrid"), _ = pe("editable-aggrid"), A = S, s = h(), {
153
+ value: i,
153
154
  updateValue: y
154
- } = me(a, _), r = h(), K = c.useWatch(a.name, r);
155
- Q(s, (e) => {
156
- const o = f(e, a.rowKey);
157
- le(o, l(K)) || r.value?.setFieldValue(a.name, o);
155
+ } = fe(t, A), l = h(), E = f.useWatch(t.name, l);
156
+ let d;
157
+ Y(i, (e) => {
158
+ const o = v(e, t.rowKey);
159
+ se(o, r(E)) || (d = () => {
160
+ l.value?.setFieldValue(t.name, o);
161
+ });
158
162
  }, {
159
163
  deep: !0
160
164
  });
161
- const E = ce("valueTypeMap"), k = ie(a, E), {
162
- add: A,
163
- addMultiple: D,
164
- remove: N,
165
- removeByKey: j,
166
- getRowData: I,
167
- getRowsData: V,
168
- getRowDataByKey: z,
165
+ const K = ye("valueTypeMap"), k = ue(t, K), {
166
+ add: D,
167
+ addMultiple: N,
168
+ remove: U,
169
+ removeByKey: I,
170
+ getRowData: j,
171
+ getRowsData: z,
172
+ getRowDataByKey: V,
169
173
  setRowData: H,
170
174
  setRowDataByKey: O,
171
- clear: U,
172
- refreshRowIds: d
173
- } = se(a, r, s, y);
175
+ clear: G,
176
+ refreshRowIds: u
177
+ } = de(t, l, i, y);
174
178
  function L() {
175
- const e = i.value?._internalGridApi;
176
- if (!d.value?.length || !e)
179
+ if (t.onUpdate?.(), d && (d(), d = void 0), t.supressForceRowUpdate)
177
180
  return;
178
- const o = d.value.map((t) => e.getRowNode(t)).filter((t) => !!t);
179
- a.supressForceRowUpdate || e.refreshCells({
181
+ const e = s.value?._internalGridApi;
182
+ if (!u.value?.length || !e)
183
+ return;
184
+ const o = u.value.map((a) => e.getRowNode(a)).filter((a) => !!a);
185
+ e.refreshCells({
180
186
  rowNodes: o,
181
187
  force: !0
182
- }), d.value = [];
188
+ }), u.value = [];
183
189
  }
184
190
  function P() {
185
- r.value?.resetFields();
191
+ l.value?.resetFields();
186
192
  }
187
193
  function w(e) {
188
- return e ? (v(e) ? e : [e]).map((t) => v(t) ? [a.name, ...t] : [a.name, t]) : void 0;
194
+ return e ? (b(e) ? e : [e]).map((a) => b(a) ? [t.name, ...a] : [t.name, a]) : void 0;
189
195
  }
190
196
  function g(e) {
191
197
  try {
192
- const o = Object.keys(e), t = s.value.map((n) => ue(n, void 0, a.rowKey));
193
- return o.sort((n, u) => t.findIndex((p) => String(p) === n) - t.findIndex((p) => String(p) === u)), o.map((n) => e[n]);
198
+ const o = Object.keys(e), a = i.value.map((n) => me(n, void 0, t.rowKey));
199
+ return o.sort((n, p) => a.findIndex((m) => String(m) === n) - a.findIndex((m) => String(m) === p)), o.map((n) => e[n]);
194
200
  } catch {
195
201
  return e;
196
202
  }
197
203
  }
198
- async function G(e, o) {
199
- const n = (await r.value?.validateFields(w(e), o))?.[a.name];
204
+ async function M(e, o) {
205
+ const n = (await l.value?.validateFields(w(e), o))?.[t.name];
200
206
  return g(n);
201
207
  }
202
208
  async function W(e, o) {
203
- const n = (await r.value?.validateFieldsReturnTransformed(w(e), o))?.[a.name];
209
+ const n = (await l.value?.validateFieldsReturnTransformed(w(e), o))?.[t.name];
204
210
  return g(n);
205
211
  }
206
- function M(e) {
212
+ function $(e) {
207
213
  y(e);
208
- const o = f(e, a.rowKey);
209
- r.value?.setFieldValue(a.name, o);
210
214
  }
211
215
  function R(e, o) {
212
- const t = e === "end" ? s.value.length - 1 : e;
213
- i.value?.scrollToRow(t, o);
216
+ const a = e === "end" ? i.value.length - 1 : e;
217
+ s.value?.scrollToRow(a, o);
218
+ }
219
+ function q(e, o) {
220
+ s.value?.scrollToColumn(e, o);
214
221
  }
215
- function $(e, o) {
216
- i.value?.scrollToColumn(e, o);
222
+ function J(e, o = !0) {
223
+ const a = Array.isArray(e) ? e : [e];
224
+ s.value?._internalGridApi?.refreshCells({
225
+ columns: a,
226
+ force: o
227
+ });
217
228
  }
218
- return x({
229
+ return B({
219
230
  resetFields: P,
220
- validateFields: G,
231
+ validateFields: M,
221
232
  validateFieldsReturnTransformed: W,
222
- add: A,
223
- addMultiple: D,
224
- remove: N,
225
- removeByKey: j,
226
- getRowData: I,
227
- getRowsData: V,
233
+ add: D,
234
+ addMultiple: N,
235
+ remove: U,
236
+ removeByKey: I,
237
+ getRowData: j,
238
+ getRowsData: z,
228
239
  setRowData: H,
229
- clear: U,
230
- setTableData: M,
240
+ clear: G,
241
+ setTableData: $,
231
242
  scrollTo: R,
232
243
  scrollToRow: R,
233
- scrollToColumn: $,
234
- table: i,
235
- getRowDataByKey: z,
236
- setRowDataByKey: O
237
- }), (e, o) => (Y(), X(l(c), {
244
+ scrollToColumn: q,
245
+ table: s,
246
+ getRowDataByKey: V,
247
+ setRowDataByKey: O,
248
+ refreshColumns: J
249
+ }), (e, o) => (ee(), Z(r(f), {
238
250
  ref_key: "formRef",
239
- ref: r,
251
+ ref: l,
240
252
  "initial-values": {
241
- [a.name]: l(f)(l(s), a.rowKey)
253
+ [t.name]: r(v)(r(i), t.rowKey)
242
254
  },
243
255
  style: {
244
256
  height: "100%"
245
257
  }
246
258
  }, {
247
- default: m(() => [b(l(c).FormItem, {
259
+ default: c(() => [C(r(f).FormItem, {
248
260
  name: e.name,
249
261
  "no-style": ""
250
262
  }, {
251
- default: m(() => [b(fe, Z(l(re)(a, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
263
+ default: c(() => [C(we, oe(r(ie)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "onUpdate"]), {
252
264
  ref_key: "tableRef",
253
- ref: i,
254
- class: [l(T)(), l(F)],
265
+ ref: s,
266
+ class: [r(F)(), r(_)],
255
267
  size: "mini",
256
- columns: l(k),
257
- "data-source": l(s),
268
+ columns: r(k),
269
+ "data-source": r(i),
258
270
  "search-form": !1,
259
271
  onUpdate: L
260
- }), ee({
272
+ }), ae({
261
273
  _: 2
262
- }, [oe(S, (t, n) => ({
274
+ }, [te(T, (a, n) => ({
263
275
  name: n,
264
- fn: m((u) => [ae(e.$slots, n, te(ne(u || {})))])
276
+ fn: c((p) => [ne(e.$slots, n, re(le(p || {})))])
265
277
  }))]), 1040, ["class", "columns", "data-source"])]),
266
278
  _: 3
267
279
  }, 8, ["name"])]),
@@ -104,6 +104,13 @@ export type EditableAgGridExpose<RecordType = any, ModelType = RecordType[]> = O
104
104
  * @returns
105
105
  */
106
106
  setRowDataByKey: (key: any, data: Partial<RecordType>, merge?: boolean) => void;
107
+ /**
108
+ * 刷新列单元格
109
+ * @param columnKey
110
+ * @param force 是否强制刷新,默认为 `true`
111
+ * @returns
112
+ */
113
+ refreshColumns: (columnKey: string | string[], force?: boolean) => void;
107
114
  };
108
115
  export type EditableAgGridFormItemExpose<RecordType = any, ModelType = RecordType[]> = Omit<EditableAgGridExpose<RecordType, ModelType>, 'resetFields' | 'validateFields' | 'validateFieldsReturnTransformed'> & {
109
116
  /**