@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,41 +1,41 @@
1
- import { defineComponent as ko, useSlots as xo, ref as h, toRef as x, computed as i, unref as r, nextTick as A, watch as W, createElementBlock as U, openBlock as y, normalizeStyle as _, normalizeClass as R, createCommentVNode as fe, createElementVNode as T, createVNode as Mo, mergeProps as j, createSlots as Fo, withCtx as ge, Fragment as Bo, renderList as Io, createBlock as $, resolveDynamicComponent as Ao, renderSlot as we } from "vue";
2
- import { AG_GRID_LOCALE_EN as To, AG_GRID_LOCALE_CN as Eo } from "@ag-grid-community/locale";
3
- import { Pagination as No } from "@aplus-frontend/antdv";
1
+ import { defineComponent as ko, useSlots as xo, ref as h, toRef as k, computed as i, unref as r, nextTick as A, watch as W, createElementBlock as U, openBlock as y, normalizeStyle as _, normalizeClass as R, createCommentVNode as fe, createElementVNode as T, createVNode as Fo, mergeProps as j, createSlots as Bo, withCtx as ge, Fragment as Io, renderList as Ao, createBlock as $, resolveDynamicComponent as To, renderSlot as we } from "vue";
2
+ import { AG_GRID_LOCALE_EN as Eo, AG_GRID_LOCALE_CN as No } from "@ag-grid-community/locale";
3
+ import { Pagination as Do } from "@aplus-frontend/antdv";
4
4
  import { useToken as zo } from "@aplus-frontend/antdv/es/theme/internal";
5
- import { ModuleRegistry as Do, ValidationModule as Po, ColumnAutoSizeModule as Oo, PinnedRowModule as Vo, RowAutoHeightModule as Ko, RowStyleModule as Go, CellSpanModule as Lo, CellStyleModule as Ho, TooltipModule as Wo, RowSelectionModule as Uo, LocaleModule as _o, ValueCacheModule as jo, GridStateModule as $o, ColumnApiModule as qo, RowApiModule as Jo, CellApiModule as Qo, RenderApiModule as Xo, EventApiModule as Yo, ScrollApiModule as Zo, ClientSideRowModelApiModule as et, ClientSideRowModelModule as ot } from "ag-grid-community";
6
- import { AgGridVue as tt } from "ag-grid-vue3";
7
- import { isUndefined as M, isFunction as E, omit as rt } from "lodash-unified";
8
- import { DEFAULT_ROW_SELECTION_CONFIG as Se, sizeReverseMap as nt, sizeMap as at } from "../ap-grid/constants.mjs";
9
- import { useProvideApTable as lt } from "../ap-table/context.mjs";
10
- import { useTablePaging as st } from "../ap-table/hooks/use-table-paging-ng.mjs";
11
- import { recursionApColumns as it } from "../ap-table/utils.mjs";
5
+ import { ModuleRegistry as Po, ValidationModule as Oo, ColumnAutoSizeModule as Vo, PinnedRowModule as Ko, RowAutoHeightModule as Go, RowStyleModule as Lo, CellSpanModule as Ho, CellStyleModule as Wo, TooltipModule as Uo, RowSelectionModule as _o, LocaleModule as jo, ValueCacheModule as $o, GridStateModule as qo, ColumnApiModule as Jo, RowApiModule as Qo, CellApiModule as Xo, RenderApiModule as Yo, EventApiModule as Zo, ScrollApiModule as et, ClientSideRowModelApiModule as ot, ClientSideRowModelModule as tt } from "ag-grid-community";
6
+ import { AgGridVue as rt } from "ag-grid-vue3";
7
+ import { isUndefined as x, isFunction as E, omit as nt } from "lodash-unified";
8
+ import { DEFAULT_ROW_SELECTION_CONFIG as Se, sizeReverseMap as lt, sizeMap as at } from "../ap-grid/constants.mjs";
9
+ import { useProvideApTable as st } from "../ap-table/context.mjs";
10
+ import { useTablePaging as it } from "../ap-table/hooks/use-table-paging-ng.mjs";
11
+ import { recursionApColumns as ut } from "../ap-table/utils.mjs";
12
12
  import "../config-provider/index.mjs";
13
13
  import "../utils/index.mjs";
14
- import { retryUntil as ut } from "../utils/retry.mjs";
15
- import { getValidVNodeList as dt } from "../utils/slot.mjs";
16
- import { ApForm as ct } from "../ap-form/index.mjs";
14
+ import { retryUntil as dt } from "../utils/retry.mjs";
15
+ import { getValidVNodeList as ct } from "../utils/slot.mjs";
16
+ import { ApForm as mt } from "../ap-form/index.mjs";
17
17
  import "./components/empty/index.vue.mjs";
18
18
  import "./components/loading/index.vue.mjs";
19
19
  import "./components/row/index.vue.mjs";
20
- import { useProvideSorter as mt, useProvideExpandable as pt } from "./context.mjs";
21
- import { useColumns as ft } from "./hooks/use-columns.mjs";
22
- import { useColumnsDef as gt } from "./hooks/use-columns-def.mjs";
23
- import { usePinnedRow as wt } from "./hooks/use-pinned-row.mjs";
24
- import St from "./hooks/use-row-selection.mjs";
25
- import { useSearchForm as Ct } from "./hooks/use-search-form.mjs";
26
- import ht from "./hooks/use-selection-col-def.mjs";
27
- import yt from "./hooks/use-virtual-config.mjs";
28
- import Rt from "./style/index.mjs";
29
- import { useTheme as vt } from "./theme.mjs";
30
- import { runPipelineHooks as bt, runEffectHooks as q, mergeProps as kt } from "./utils.mjs";
20
+ import { useProvideSorter as pt, useProvideExpandable as ft } from "./context.mjs";
21
+ import { useColumns as gt } from "./hooks/use-columns.mjs";
22
+ import { useColumnsDef as wt } from "./hooks/use-columns-def.mjs";
23
+ import { usePinnedRow as St } from "./hooks/use-pinned-row.mjs";
24
+ import Ct from "./hooks/use-row-selection.mjs";
25
+ import { useSearchForm as ht } from "./hooks/use-search-form.mjs";
26
+ import yt from "./hooks/use-selection-col-def.mjs";
27
+ import Rt from "./hooks/use-virtual-config.mjs";
28
+ import vt from "./style/index.mjs";
29
+ import { useTheme as bt } from "./theme.mjs";
30
+ import { runPipelineHooks as Mt, runEffectHooks as q, mergeProps as kt } from "./utils.mjs";
31
31
  import { useNamespace as xt } from "../config-provider/hooks/use-namespace.mjs";
32
- import { useLocale as Mt } from "../config-provider/hooks/use-locale.mjs";
33
- import { useGlobalConfig as Ft } from "../config-provider/hooks/use-global-config.mjs";
34
- import { isDef as Bt } from "../utils/is.mjs";
35
- import It from "./components/row/index.vue2.mjs";
36
- import At from "./components/loading/index.vue2.mjs";
37
- import Tt from "./components/empty/index.vue2.mjs";
38
- const gr = /* @__PURE__ */ ko({
32
+ import { useLocale as Ft } from "../config-provider/hooks/use-locale.mjs";
33
+ import { useGlobalConfig as Bt } from "../config-provider/hooks/use-global-config.mjs";
34
+ import { isDef as It } from "../utils/is.mjs";
35
+ import At from "./components/row/index.vue2.mjs";
36
+ import Tt from "./components/loading/index.vue2.mjs";
37
+ import Et from "./components/empty/index.vue2.mjs";
38
+ const wr = /* @__PURE__ */ ko({
39
39
  name: "AgGrid",
40
40
  __name: "index",
41
41
  props: {
@@ -108,6 +108,7 @@ const gr = /* @__PURE__ */ ko({
108
108
  rowClassRules: {},
109
109
  autoHeight: { type: Boolean },
110
110
  onUpdate: {},
111
+ onModelUpdated: {},
111
112
  customRow: {},
112
113
  theme: {},
113
114
  emptyComponent: {},
@@ -118,11 +119,10 @@ const gr = /* @__PURE__ */ ko({
118
119
  },
119
120
  setup(Ce, { expose: he }) {
120
121
  const ye = {
121
- "zh-cn": Eo,
122
- en: To
122
+ "zh-cn": No,
123
+ en: Eo
123
124
  };
124
- Do.registerModules([
125
- Po,
125
+ Po.registerModules([
126
126
  Oo,
127
127
  Vo,
128
128
  Ko,
@@ -141,34 +141,35 @@ const gr = /* @__PURE__ */ ko({
141
141
  Yo,
142
142
  Zo,
143
143
  et,
144
- ot
144
+ ot,
145
+ tt
145
146
  ]);
146
- const o = Ce, N = xo(), { e: z, b: c, be: Re } = xt("ag-grid"), { lang: J } = Mt(), ve = Rt("ag-grid"), v = h(o.size), be = vt(
147
+ const o = Ce, N = xo(), { e: D, b: c, be: Re } = xt("ag-grid"), { lang: J } = Ft(), ve = vt("ag-grid"), v = h(o.size), be = bt(
147
148
  v,
148
- x(o, "rowHeight"),
149
- x(o, "theme")
150
- ), ke = yt(x(o, "virtual")), { rowPinnedGridConfig: Q, getRowPinnedCellClass: xe } = wt(
151
- x(o, "summary")
152
- ), Me = Ft("apGrid"), s = h(), [, Fe] = zo();
149
+ k(o, "rowHeight"),
150
+ k(o, "theme")
151
+ ), Me = Rt(k(o, "virtual")), { rowPinnedGridConfig: Q, getRowPinnedCellClass: ke } = St(
152
+ k(o, "summary")
153
+ ), xe = Bt("apGrid"), s = h(), [, Fe] = zo();
153
154
  let b = !!o.dataSource;
154
- async function D(e, t = {}) {
155
- const n = await bt(
155
+ async function z(e, t = {}) {
156
+ const n = await Mt(
156
157
  o.plugins,
157
158
  e,
158
- (a) => a.beforeApplyColumnState?.bind(a)
159
+ (l) => l.beforeApplyColumnState?.bind(l)
159
160
  );
160
161
  s.value.applyColumnState({ state: n, ...t });
161
162
  }
162
- const X = Ct(o), {
163
+ const X = ht(o), {
163
164
  shownColumns: w,
164
165
  columns: Y,
165
166
  columnKeys: Be,
166
167
  getTargetColumnByKey: Ie,
167
168
  defaultSortOrder: F
168
- } = ft(o), { defaultColDef: Ae, columnDefs: Z, gridWrapperRef: Te } = gt(
169
+ } = gt(o), { defaultColDef: Ae, columnDefs: Z, gridWrapperRef: Te } = wt(
169
170
  Y,
170
171
  o,
171
- xe,
172
+ ke,
172
173
  N.headerCell
173
174
  ), Ee = {
174
175
  asc: "ascend",
@@ -183,23 +184,23 @@ const gr = /* @__PURE__ */ ko({
183
184
  [e.colKey]: ee[e.order]
184
185
  } : {};
185
186
  }
186
- function ze() {
187
+ function De() {
187
188
  const e = oe.value, t = F.value;
188
189
  if (t && e.includes(t.field))
189
190
  return t;
190
191
  }
191
192
  const B = h(Ne());
192
- mt({
193
+ pt({
193
194
  sorter: B,
194
195
  setSorter(e) {
195
196
  B.value = e;
196
197
  }
197
198
  });
198
- function De() {
199
+ function ze() {
199
200
  const e = s.value.getColumns()?.filter((m) => m.getSort() != null), t = r(B) || {};
200
201
  let n = e?.[0];
201
- const a = Object.keys(t);
202
- if (a.length && a.every((m) => t[m] === null)) {
202
+ const l = Object.keys(t);
203
+ if (l.length && l.every((m) => t[m] === null)) {
203
204
  const m = Object.keys(t)[0];
204
205
  m && (n = s.value?.getColumn(m));
205
206
  }
@@ -212,7 +213,7 @@ const gr = /* @__PURE__ */ ko({
212
213
  order: f ? Ee[f] : null
213
214
  });
214
215
  }
215
- const oe = i(() => it(r(w), (e) => {
216
+ const oe = i(() => ut(r(w), (e) => {
216
217
  if (e.sorter === !0)
217
218
  return e.field ?? e.dataIndex ?? e.key;
218
219
  }).filter(Boolean)), Pe = () => {
@@ -221,9 +222,9 @@ const gr = /* @__PURE__ */ ko({
221
222
  if (!e)
222
223
  return;
223
224
  const t = e.getColumnState()?.map((n) => ({ ...n, sort: null }));
224
- D(t);
225
+ z(t);
225
226
  }, P = h({});
226
- pt({ expandable: P });
227
+ ft({ expandable: P });
227
228
  function Oe(e) {
228
229
  const t = e.columnGroup;
229
230
  t && (P.value = {
@@ -231,7 +232,7 @@ const gr = /* @__PURE__ */ ko({
231
232
  [t.getGroupId()]: t.isExpanded()
232
233
  });
233
234
  }
234
- const O = h(!0), Ve = i(() => Bt(o.manual) ? o.manual : dt(N.searchFormExtra?.() || []).some((t) => t.type?.name === "ApView")), {
235
+ const O = h(!0), Ve = i(() => It(o.manual) ? o.manual : ct(N.searchFormExtra?.() || []).some((t) => t.type?.name === "ApView")), {
235
236
  formRef: S,
236
237
  submit: V,
237
238
  reset: K,
@@ -239,14 +240,14 @@ const gr = /* @__PURE__ */ ko({
239
240
  tableProps: te,
240
241
  handleTableChangeOptional: re,
241
242
  submitWith: ne,
242
- refresh: ae,
243
+ refresh: le,
243
244
  getPaging: Ke,
244
245
  setPaging: Ge,
245
246
  setDataSource: Le,
246
247
  getLastParams: He
247
- } = st({
248
+ } = it({
248
249
  async request(e) {
249
- if (b = !1, C.value && !C.value.preserveSelectedRowKeys && M(o.dataSource) && !O.value && H(), O.value && (O.value = !1), !M(o.dataSource)) {
250
+ if (b = !1, C.value && !C.value.preserveSelectedRowKeys && x(o.dataSource) && !O.value && H(), O.value && (O.value = !1), !x(o.dataSource)) {
250
251
  const n = e.pageSize * (e.current - 1);
251
252
  return {
252
253
  data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(n, n + e.pageSize)) || [],
@@ -261,23 +262,23 @@ const gr = /* @__PURE__ */ ko({
261
262
  },
262
263
  namespace: "ap-grid",
263
264
  filterFields: h([]),
264
- params: x(o, "params"),
265
+ params: k(o, "params"),
265
266
  defaultData: o.defaultData,
266
267
  manual: r(Ve),
267
268
  formatParams: o.beforeSearchSubmit,
268
269
  pagination: o.pagination,
269
270
  sortFields: oe,
270
271
  onClickReset: Pe,
271
- defaultSortOrder: ze()
272
+ defaultSortOrder: De()
272
273
  }), C = i(() => {
273
- const e = o.rowSelection || Me.value?.rowSelection;
274
+ const e = o.rowSelection || xe.value?.rowSelection;
274
275
  if (e)
275
276
  return e === !0 ? Se : {
276
277
  ...Se,
277
278
  ...e
278
279
  };
279
- }), We = ht(o, w), Ue = i(
280
- () => M(o.dataSource) ? p.records : o.dataSource
280
+ }), We = yt(o, w), Ue = i(
281
+ () => x(o.dataSource) ? p.records : o.dataSource
281
282
  ), {
282
283
  select: _e,
283
284
  unSelect: je,
@@ -287,7 +288,7 @@ const gr = /* @__PURE__ */ ko({
287
288
  selectMultiByKeys: Je,
288
289
  selectMulti: Qe,
289
290
  unSelectMulti: Xe
290
- } = St({
291
+ } = Ct({
291
292
  ...C.value,
292
293
  dataSource: Ue,
293
294
  rowKey: o.rowKey
@@ -301,7 +302,7 @@ const gr = /* @__PURE__ */ ko({
301
302
  const { type: t = "checkbox", disabled: n } = e;
302
303
  return {
303
304
  mode: Ye[t],
304
- isRowSelectable: (a) => n ? !n(a.data) : !0,
305
+ isRowSelectable: (l) => n ? !n(l.data) : !0,
305
306
  hideDisabledCheckboxes: e.hideDisabled ?? !1
306
307
  };
307
308
  });
@@ -316,9 +317,9 @@ const gr = /* @__PURE__ */ ko({
316
317
  const t = G.value || [];
317
318
  b = !1;
318
319
  const n = [];
319
- e.forEachNode((a) => {
320
- const d = a.data, u = L(d), f = a.isSelected();
321
- t.find((g) => L(g) === u) ? !f && n.push(a) : f && a.setSelected(!1);
320
+ e.forEachNode((l) => {
321
+ const d = l.data, u = L(d), f = l.isSelected();
322
+ t.find((g) => L(g) === u) ? !f && n.push(l) : f && l.setSelected(!1);
322
323
  }), e.setNodesSelected({ nodes: n, newValue: !0 }), setTimeout(() => {
323
324
  b = !0;
324
325
  }, 0);
@@ -334,11 +335,11 @@ const gr = /* @__PURE__ */ ko({
334
335
  const e = s.value;
335
336
  if (!e || !F.value)
336
337
  return;
337
- const t = e.getColumnState(), { colKey: n, order: a } = F.value, d = t.map((u) => ({
338
+ const t = e.getColumnState(), { colKey: n, order: l } = F.value, d = t.map((u) => ({
338
339
  ...u,
339
- sort: u.colId === n ? ee[a] : null
340
+ sort: u.colId === n ? ee[l] : null
340
341
  }));
341
- D(d);
342
+ z(d);
342
343
  }, H = () => {
343
344
  qe(), s.value?.deselectAll();
344
345
  };
@@ -351,7 +352,7 @@ const gr = /* @__PURE__ */ ko({
351
352
  const e = o.customRow;
352
353
  return e ? {
353
354
  isFullWidthRow: e.isCustomRow,
354
- fullWidthCellRenderer: It,
355
+ fullWidthCellRenderer: At,
355
356
  fullWidthCellRendererParams: {
356
357
  render: e.render
357
358
  }
@@ -362,12 +363,12 @@ const gr = /* @__PURE__ */ ko({
362
363
  I({});
363
364
  });
364
365
  }
365
- function ao(e) {
366
+ function lo(e) {
366
367
  Xe(e), A(() => {
367
368
  I({});
368
369
  });
369
370
  }
370
- function le(e = !1) {
371
+ function ae(e = !1) {
371
372
  const t = e ? "getFieldsValueTransformed" : "getFieldsValue";
372
373
  return S.value?.apForm?.[t]?.(!0);
373
374
  }
@@ -386,39 +387,39 @@ const gr = /* @__PURE__ */ ko({
386
387
  function ce(e) {
387
388
  return e && String(e);
388
389
  }
389
- function lo(e) {
390
+ function ao(e) {
390
391
  const t = s.value;
391
392
  if (!t)
392
393
  return;
393
- const n = t.getColumnState() || [], a = e.map((l) => l.key ? String(l.key) : l.key).filter(Boolean), d = n.map((l) => {
394
- if (!Be.value.includes(l.colId))
395
- return l;
396
- const k = !a.includes(l.colId), me = {
397
- ...l,
398
- hide: k
394
+ const n = t.getColumnState() || [], l = e.map((a) => a.key ? String(a.key) : a.key).filter(Boolean), d = n.map((a) => {
395
+ if (!Be.value.includes(a.colId))
396
+ return a;
397
+ const M = !l.includes(a.colId), me = {
398
+ ...a,
399
+ hide: M
399
400
  }, pe = e.find(
400
- (bo) => ce(bo.key) === l.colId
401
+ (Mo) => ce(Mo.key) === a.colId
401
402
  );
402
403
  return pe && (me.pinned = pe.fixed || null), me;
403
404
  }), u = new Map(
404
- e.map((l, k) => [ce(l.key), k])
405
- ), f = d.filter((l) => u.has(l.colId)).sort(
406
- (l, k) => u.get(l.colId) - u.get(k.colId)
405
+ e.map((a, M) => [ce(a.key), M])
406
+ ), f = d.filter((a) => u.has(a.colId)).sort(
407
+ (a, M) => u.get(a.colId) - u.get(M.colId)
407
408
  ), g = [];
408
409
  let m = 0;
409
- for (const l of d)
410
- u.has(l.colId) ? g.push(f[m++]) : g.push(l);
411
- D(g, { applyOrder: !0 });
410
+ for (const a of d)
411
+ u.has(a.colId) ? g.push(f[m++]) : g.push(a);
412
+ z(g, { applyOrder: !0 });
412
413
  }
413
- lt({
414
+ st({
414
415
  columns: i(() => w.value),
415
416
  columnsBackup: i(() => Y.value),
416
417
  size: i(() => at[v.value]),
417
418
  updateColumns(e) {
418
- w.value = e, o.onShownColumnsChange?.(e), ut(
419
- () => s.value?.getColumnState(),
419
+ w.value = e, o.onShownColumnsChange?.(e), dt(
420
+ () => s.value?.getAllDisplayedColumns(),
420
421
  () => {
421
- lo(e);
422
+ ao(e);
422
423
  },
423
424
  {
424
425
  interval: 17,
@@ -427,25 +428,25 @@ const gr = /* @__PURE__ */ ko({
427
428
  );
428
429
  },
429
430
  updateSize(e) {
430
- v.value = nt[e];
431
+ v.value = lt[e];
431
432
  },
432
433
  renderConfig: i(() => ({
433
434
  className: Re("table-header", "title"),
434
435
  color: Fe.value.colorTextTertiary
435
436
  })),
436
437
  dataSource: i(() => r(p).records),
437
- getSearchFormValues: le,
438
+ getSearchFormValues: ae,
438
439
  setSearchFormValues: se,
439
440
  submit: V,
440
441
  submitWith: ne,
441
442
  reset: K,
442
- refresh: ae,
443
+ refresh: le,
443
444
  getSearchFormSorterItems: ie,
444
445
  setSearchFormSorterItems: ue,
445
446
  resetSearchFormSorterItems: de,
446
447
  getLastParams: He
447
448
  });
448
- const so = i(() => (M(o.loading) ? p.loading : o.loading) || Z.value.length === 0), io = i(() => [
449
+ const so = i(() => (x(o.loading) ? p.loading : o.loading) || Z.value.length === 0), io = i(() => [
449
450
  c(),
450
451
  o.card ? null : c("wrapper"),
451
452
  c("adaptive"),
@@ -487,11 +488,11 @@ const gr = /* @__PURE__ */ ko({
487
488
  }) {
488
489
  if (!e || n !== "uiColumnResized")
489
490
  return;
490
- const a = (t || []).map((d) => ({
491
+ const l = (t || []).map((d) => ({
491
492
  key: d.getColId(),
492
493
  width: d.getActualWidth()
493
494
  }));
494
- q(o.plugins, (d) => d.onColumnResized?.bind(d), a), o.onColumnResized?.(a);
495
+ q(o.plugins, (d) => d.onColumnResized?.bind(d), l), o.onColumnResized?.(l);
495
496
  }
496
497
  const yo = (e) => {
497
498
  const t = [
@@ -504,10 +505,12 @@ const gr = /* @__PURE__ */ ko({
504
505
  return t.flat().filter(Boolean);
505
506
  }, Ro = ({ api: e }) => {
506
507
  s.value = e, q(o.plugins, (t) => t.init?.bind(t), e);
507
- }, vo = (e, t, n) => {
508
+ }, vo = ({ api: e }) => {
509
+ o.onModelUpdated?.(e);
510
+ }, bo = (e, t, n) => {
508
511
  q(
509
512
  o.plugins,
510
- (a) => a.searchParamsChange?.bind(this),
513
+ (l) => l.searchParamsChange?.bind(this),
511
514
  t
512
515
  ), o.searchForm && o.searchForm.onValuesChange?.(e, t, n);
513
516
  };
@@ -532,17 +535,17 @@ const gr = /* @__PURE__ */ ko({
532
535
  ), he({
533
536
  submit: V,
534
537
  reset: K,
535
- refresh: ae,
538
+ refresh: le,
536
539
  submitWith: ne,
537
540
  setSearchFormValues: se,
538
- getSearchFormValues: le,
541
+ getSearchFormValues: ae,
539
542
  getShowColumns: () => r(w),
540
543
  rowSelection: {
541
544
  selectedRows: i(() => G.value),
542
545
  setSelectedRowKeys: to,
543
546
  setSelectedRows: no,
544
547
  clearAll: H,
545
- unSelectRows: ao
548
+ unSelectRows: lo
546
549
  },
547
550
  scrollToRow: po,
548
551
  scrollToColumn: fo,
@@ -559,22 +562,22 @@ const gr = /* @__PURE__ */ ko({
559
562
  class: R(io.value),
560
563
  style: _(e.wrapperStyle)
561
564
  }, [
562
- r(M)(e.dataSource) && e.searchForm !== !1 && r(X).length > 0 ? (y(), U("div", {
565
+ r(x)(e.dataSource) && e.searchForm !== !1 && r(X).length > 0 ? (y(), U("div", {
563
566
  key: 0,
564
- class: R(e.card ? r(z)("search-wrapper") : null),
567
+ class: R(e.card ? r(D)("search-wrapper") : null),
565
568
  style: _(e.searchFormWrapperStyle)
566
569
  }, [
567
- Mo(r(ct).SearchForm, j(r(rt)(e.searchForm || {}, ["onValuesChange"]), {
570
+ Fo(r(mt).SearchForm, j(r(nt)(e.searchForm || {}, ["onValuesChange"]), {
568
571
  ref_key: "formRef",
569
572
  ref: S,
570
573
  "custom-reset": "",
571
574
  "submit-loading": r(te).loading,
572
575
  onSubmit: r(V),
573
576
  onReset: r(K),
574
- onValuesChange: vo
575
- }), Fo({
577
+ onValuesChange: bo
578
+ }), Bo({
576
579
  default: ge(() => [
577
- (y(!0), U(Bo, null, Io(r(X), (n) => (y(), $(Ao(n.renderNode), {
580
+ (y(!0), U(Io, null, Ao(r(X), (n) => (y(), $(To(n.renderNode), {
578
581
  key: n.dataIndex
579
582
  }))), 128))
580
583
  ]),
@@ -590,7 +593,7 @@ const gr = /* @__PURE__ */ ko({
590
593
  ]), 1040, ["submit-loading", "onSubmit", "onReset"])
591
594
  ], 6)) : fe("", !0),
592
595
  T("div", {
593
- class: R([r(z)("table-wrapper"), e.card ? r(z)("table-wrapper-card") : null]),
596
+ class: R([r(D)("table-wrapper"), e.card ? r(D)("table-wrapper-card") : null]),
594
597
  style: _(e.tableWrapperStyle)
595
598
  }, [
596
599
  T("div", {
@@ -608,8 +611,8 @@ const gr = /* @__PURE__ */ ko({
608
611
  ref: Te,
609
612
  class: R(r(c)("grid-wrapper"))
610
613
  }, [
611
- (y(), $(r(tt), j(
612
- r(kt)(r(ke), r(Q), ro.value),
614
+ (y(), $(r(rt), j(
615
+ r(kt)(r(Me), r(Q), ro.value),
613
616
  {
614
617
  key: r(J),
615
618
  "animate-rows": e.animateRows,
@@ -628,16 +631,16 @@ const gr = /* @__PURE__ */ ko({
628
631
  "enable-browser-tooltips": e.browserTooltips,
629
632
  "tooltip-interaction": "",
630
633
  "row-class-rules": e.rowClassRules,
631
- "no-rows-overlay-component": Tt,
634
+ "no-rows-overlay-component": Et,
632
635
  "no-rows-overlay-component-params": { emptyComponent: e.emptyComponent, emptyText: e.emptyText },
633
- "loading-overlay-component": At,
636
+ "loading-overlay-component": Tt,
634
637
  loading: so.value,
635
638
  "suppress-cell-focus": "",
636
639
  "tab-to-next-cell": () => !1,
637
640
  "enable-cell-span": "",
638
641
  "dom-layout": e.autoHeight ? "autoHeight" : "normal",
639
642
  "locale-text": ye[r(J)],
640
- onSortChanged: De,
643
+ onSortChanged: ze,
641
644
  onGridReady: Ro,
642
645
  onRowDataUpdated: I,
643
646
  onRowSelected: eo,
@@ -645,14 +648,15 @@ const gr = /* @__PURE__ */ ko({
645
648
  onRowClicked: go,
646
649
  onBodyScrollEnd: wo,
647
650
  onColumnResized: ho,
648
- onColumnGroupOpened: Oe
651
+ onColumnGroupOpened: Oe,
652
+ onModelUpdated: vo
649
653
  }
650
654
  ), null, 16, ["animate-rows", "style", "row-data", "column-defs", "default-col-def", "row-selection", "selection-column-def", "get-row-height", "theme", "enable-browser-tooltips", "row-class-rules", "no-rows-overlay-component-params", "loading", "dom-layout", "locale-text"]))
651
655
  ], 2),
652
656
  T("div", {
653
657
  class: R(r(c)("pagination-wrapper"))
654
658
  }, [
655
- e.pagination !== !1 ? (y(), $(r(No), j({
659
+ e.pagination !== !1 ? (y(), $(r(Do), j({
656
660
  key: 0,
657
661
  class: r(c)("pagination")
658
662
  }, r(te).pagination, { onChange: co }), null, 16, ["class"])) : fe("", !0)
@@ -662,5 +666,5 @@ const gr = /* @__PURE__ */ ko({
662
666
  }
663
667
  });
664
668
  export {
665
- gr as default
669
+ wr as default
666
670
  };
@@ -340,6 +340,12 @@ export type AgGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
340
340
  * @returns
341
341
  */
342
342
  onUpdate?: () => void;
343
+ /**
344
+ * Displayed rows have changed. Triggered after sort, filter or tree expand / collapse events.
345
+ * @param api
346
+ * @returns
347
+ */
348
+ onModelUpdated?: (api: GridApi) => void;
343
349
  /**
344
350
  * 自定义行渲染配置
345
351
  * @since 6.37.0
@@ -1,4 +1,4 @@
1
1
  /** 非字符串增加key值字段 */
2
2
  export declare const ROW_KEY = "__ag-grid-modal-row-key";
3
- export declare const SMALL_HEIGHT = "480px";
3
+ export declare const SMALL_HEIGHT = 480;
4
4
  export declare const LARGER_HEIGHT = "calc(100vh - 200px)";
@@ -1,4 +1,4 @@
1
- const o = "__ag-grid-modal-row-key", c = "480px", _ = "calc(100vh - 200px)";
1
+ const o = "__ag-grid-modal-row-key", c = 480, _ = "calc(100vh - 200px)";
2
2
  export {
3
3
  _ as LARGER_HEIGHT,
4
4
  o as ROW_KEY,
@@ -1,4 +1,5 @@
1
- import { ComputedRef } from 'vue';
1
+ import { GridApi as AgGridApi } from 'ag-grid-community';
2
+ import { ComputedRef, Ref } from 'vue';
2
3
  import { AgGridExpose } from '../../../ag-grid';
3
4
  import { RefreshType } from '../interface';
4
5
  interface Options {
@@ -22,10 +23,13 @@ export interface GridApi {
22
23
  removeSelected: (record: any) => void;
23
24
  /** 设置表格数据length */
24
25
  setDataSourceLength: (len: number) => void;
26
+ /** 获取表格高度 */
27
+ onAgGridUpdate(api: AgGridApi<any> | undefined): void;
25
28
  }
26
29
  interface GridApiProvider extends GridApi {
27
30
  selectedRows?: ComputedRef<any[]>;
28
- dataSourceLength?: ComputedRef<number>;
31
+ dataSourceLength?: Readonly<Ref<number>>;
32
+ agGridBodyHeight?: Readonly<Ref<number>>;
29
33
  }
30
34
  export declare function useAgGridInstance(options?: Options): [GridApi, any];
31
35
  /** 获取上下文中grid的api */