@aplus-frontend/ui 7.20.2 → 7.20.4

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 (64) hide show
  1. package/es/index.mjs +73 -71
  2. package/es/src/ag-grid/editable/form-item.vue.mjs +72 -70
  3. package/es/src/ag-grid/editable/index.vue.mjs +59 -57
  4. package/es/src/ag-grid/editable/interface.d.ts +7 -0
  5. package/es/src/ag-grid/hooks/use-columns.mjs +18 -18
  6. package/es/src/ag-grid/hooks/use-editable-api.d.ts +1 -0
  7. package/es/src/ag-grid/hooks/use-editable-api.mjs +107 -88
  8. package/es/src/ag-grid/hooks/use-editable-form-item-api.d.ts +1 -0
  9. package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +105 -86
  10. package/es/src/ag-grid/index.vue.mjs +230 -227
  11. package/es/src/ap-action/item-popconfirm/index.vue.mjs +14 -14
  12. package/es/src/ap-list/hooks/use-offline-list.mjs +31 -18
  13. package/es/src/business/ag-grid-container/index.d.ts +3 -0
  14. package/es/src/business/ag-grid-container/index.mjs +2 -0
  15. package/es/src/business/ag-grid-container/index.vue.d.ts +33 -0
  16. package/es/src/business/ag-grid-container/index.vue.mjs +64 -0
  17. package/es/src/business/ag-grid-container/index.vue2.mjs +4 -0
  18. package/es/src/business/ag-grid-container/interface.d.ts +4 -0
  19. package/es/src/business/ag-grid-container/interface.mjs +1 -0
  20. package/es/src/business/index.d.ts +1 -0
  21. package/es/src/business/index.mjs +55 -54
  22. package/es/src/check-card/index.vue.d.ts +0 -1
  23. package/es/src/check-card/index.vue2.mjs +3 -5
  24. package/es/src/config-provider/config-provider-props.d.ts +1 -1
  25. package/es/src/config-provider/config-provider.d.ts +3 -0
  26. package/es/src/config-provider/config-provider.mjs +1 -1
  27. package/es/src/config-provider/hooks/use-global-config.d.ts +2 -0
  28. package/es/src/config-provider/index.d.ts +4 -0
  29. package/es/src/highlight/index.vue.mjs +9 -9
  30. package/es/src/index.mjs +82 -80
  31. package/es/src/version.d.ts +1 -1
  32. package/es/src/version.mjs +1 -1
  33. package/lib/index.js +1 -1
  34. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  35. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  36. package/lib/src/ag-grid/editable/interface.d.ts +7 -0
  37. package/lib/src/ag-grid/hooks/use-columns.js +1 -1
  38. package/lib/src/ag-grid/hooks/use-editable-api.d.ts +1 -0
  39. package/lib/src/ag-grid/hooks/use-editable-api.js +1 -1
  40. package/lib/src/ag-grid/hooks/use-editable-form-item-api.d.ts +1 -0
  41. package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
  42. package/lib/src/ag-grid/index.vue.js +1 -1
  43. package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
  44. package/lib/src/ap-list/hooks/use-offline-list.js +1 -1
  45. package/lib/src/business/ag-grid-container/index.d.ts +3 -0
  46. package/lib/src/business/ag-grid-container/index.js +1 -0
  47. package/lib/src/business/ag-grid-container/index.vue.d.ts +33 -0
  48. package/lib/src/business/ag-grid-container/index.vue.js +1 -0
  49. package/lib/src/business/ag-grid-container/index.vue2.js +1 -0
  50. package/lib/src/business/ag-grid-container/interface.d.ts +4 -0
  51. package/lib/src/business/ag-grid-container/interface.js +1 -0
  52. package/lib/src/business/index.d.ts +1 -0
  53. package/lib/src/business/index.js +1 -1
  54. package/lib/src/check-card/index.vue.d.ts +0 -1
  55. package/lib/src/check-card/index.vue2.js +1 -1
  56. package/lib/src/config-provider/config-provider-props.d.ts +1 -1
  57. package/lib/src/config-provider/config-provider.d.ts +3 -0
  58. package/lib/src/config-provider/config-provider.js +1 -1
  59. package/lib/src/config-provider/hooks/use-global-config.d.ts +2 -0
  60. package/lib/src/config-provider/index.d.ts +4 -0
  61. package/lib/src/index.js +1 -1
  62. package/lib/src/version.d.ts +1 -1
  63. package/lib/src/version.js +1 -1
  64. package/package.json +4 -4
@@ -1,17 +1,17 @@
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";
1
+ import { defineComponent as ko, useSlots as xo, ref as h, toRef as k, computed as i, unref as n, nextTick as A, watch as W, createElementBlock as U, openBlock as y, normalizeStyle as _, normalizeClass as v, createCommentVNode as ge, createElementVNode as T, createVNode as Fo, mergeProps as j, createSlots as Bo, withCtx as we, Fragment as Io, renderList as Ao, createBlock as $, resolveDynamicComponent as To, renderSlot as Se } from "vue";
2
+ import { AG_GRID_LOCALE_EN as Eo, AG_GRID_LOCALE_CN as Do } from "@ag-grid-community/locale";
3
+ import { Pagination as No } from "@aplus-frontend/antdv";
4
4
  import { useToken as zo } from "@aplus-frontend/antdv/es/theme/internal";
5
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";
6
+ import { AgGridVue as nt } from "ag-grid-vue3";
7
+ import { isUndefined as x, isFunction as E, omit as rt } from "lodash-unified";
8
+ import { DEFAULT_ROW_SELECTION_CONFIG as Ce, sizeReverseMap as lt, sizeMap as at } from "../ap-grid/constants.mjs";
9
9
  import { useProvideApTable as st } from "../ap-table/context.mjs";
10
10
  import { useTablePaging as it } from "../ap-table/hooks/use-table-paging-ng.mjs";
11
- import { recursionApColumns as ut } from "../ap-table/utils.mjs";
11
+ import { recursionApColumns as dt } from "../ap-table/utils.mjs";
12
12
  import "../config-provider/index.mjs";
13
13
  import "../utils/index.mjs";
14
- import { retryUntil as dt } from "../utils/retry.mjs";
14
+ import { retryUntil as ut } from "../utils/retry.mjs";
15
15
  import { getValidVNodeList as ct } from "../utils/slot.mjs";
16
16
  import { ApForm as mt } from "../ap-form/index.mjs";
17
17
  import "./components/empty/index.vue.mjs";
@@ -24,8 +24,8 @@ import { usePinnedRow as St } from "./hooks/use-pinned-row.mjs";
24
24
  import Ct from "./hooks/use-row-selection.mjs";
25
25
  import { useSearchForm as ht } from "./hooks/use-search-form.mjs";
26
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";
27
+ import vt from "./hooks/use-virtual-config.mjs";
28
+ import Rt from "./style/index.mjs";
29
29
  import { useTheme as bt } from "./theme.mjs";
30
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";
@@ -35,7 +35,7 @@ import { isDef as It } from "../utils/is.mjs";
35
35
  import At from "./components/row/index.vue2.mjs";
36
36
  import Tt from "./components/loading/index.vue2.mjs";
37
37
  import Et from "./components/empty/index.vue2.mjs";
38
- const wr = /* @__PURE__ */ ko({
38
+ const Sn = /* @__PURE__ */ ko({
39
39
  name: "AgGrid",
40
40
  __name: "index",
41
41
  props: {
@@ -117,9 +117,9 @@ const wr = /* @__PURE__ */ ko({
117
117
  animateRows: { type: Boolean, default: !0 },
118
118
  plugins: { default: () => [] }
119
119
  },
120
- setup(Ce, { expose: he }) {
121
- const ye = {
122
- "zh-cn": No,
120
+ setup(he, { expose: ye }) {
121
+ const ve = {
122
+ "zh-cn": Do,
123
123
  en: Eo
124
124
  };
125
125
  Po.registerModules([
@@ -144,52 +144,52 @@ const wr = /* @__PURE__ */ ko({
144
144
  ot,
145
145
  tt
146
146
  ]);
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(
148
- v,
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();
154
- let b = !!o.dataSource;
155
- async function z(e, t = {}) {
156
- const n = await Mt(
157
- o.plugins,
147
+ const t = he, D = xo(), { e: N, b: c, be: Re } = xt("ag-grid"), { lang: J } = Ft(), be = Rt("ag-grid"), R = h(t.size), Me = bt(
148
+ R,
149
+ k(t, "rowHeight"),
150
+ k(t, "theme")
151
+ ), ke = vt(k(t, "virtual")), { rowPinnedGridConfig: Q, getRowPinnedCellClass: xe } = St(
152
+ k(t, "summary")
153
+ ), X = Bt("agGrid"), s = h(), [, Fe] = zo();
154
+ let b = !!t.dataSource;
155
+ async function z(e, o = {}) {
156
+ const r = await Mt(
157
+ t.plugins,
158
158
  e,
159
159
  (l) => l.beforeApplyColumnState?.bind(l)
160
160
  );
161
- s.value.applyColumnState({ state: n, ...t });
161
+ s.value.applyColumnState({ state: r, ...o });
162
162
  }
163
- const X = ht(o), {
164
- shownColumns: w,
165
- columns: Y,
163
+ const Y = ht(t), {
164
+ shownColumns: p,
165
+ columns: Z,
166
166
  columnKeys: Be,
167
167
  getTargetColumnByKey: Ie,
168
168
  defaultSortOrder: F
169
- } = gt(o), { defaultColDef: Ae, columnDefs: Z, gridWrapperRef: Te } = wt(
170
- Y,
171
- o,
172
- ke,
173
- N.headerCell
169
+ } = gt(t), { defaultColDef: Ae, columnDefs: ee, gridWrapperRef: Te } = wt(
170
+ Z,
171
+ t,
172
+ xe,
173
+ D.headerCell
174
174
  ), Ee = {
175
175
  asc: "ascend",
176
176
  desc: "descend"
177
- }, ee = {
177
+ }, oe = {
178
178
  ascend: "asc",
179
179
  descend: "desc"
180
180
  };
181
- function Ne() {
181
+ function De() {
182
182
  const e = F.value;
183
183
  return e ? {
184
- [e.colKey]: ee[e.order]
184
+ [e.colKey]: oe[e.order]
185
185
  } : {};
186
186
  }
187
- function De() {
188
- const e = oe.value, t = F.value;
189
- if (t && e.includes(t.field))
190
- return t;
187
+ function Ne() {
188
+ const e = te.value, o = F.value;
189
+ if (o && e.includes(o.field))
190
+ return o;
191
191
  }
192
- const B = h(Ne());
192
+ const B = h(De());
193
193
  pt({
194
194
  sorter: B,
195
195
  setSorter(e) {
@@ -197,88 +197,91 @@ const wr = /* @__PURE__ */ ko({
197
197
  }
198
198
  });
199
199
  function ze() {
200
- const e = s.value.getColumns()?.filter((m) => m.getSort() != null), t = r(B) || {};
201
- let n = e?.[0];
202
- const l = Object.keys(t);
203
- if (l.length && l.every((m) => t[m] === null)) {
204
- const m = Object.keys(t)[0];
205
- m && (n = s.value?.getColumn(m));
200
+ const e = s.value.getColumns()?.filter((m) => m.getSort() != null), o = n(B) || {};
201
+ let r = e?.[0];
202
+ const l = Object.keys(o);
203
+ if (l.length && l.every((m) => o[m] === null)) {
204
+ const m = Object.keys(o)[0];
205
+ m && (r = s.value?.getColumn(m));
206
206
  }
207
- if (!n)
207
+ if (!r)
208
208
  return;
209
- const u = n.getColDef(), f = n.getSort(), g = Ie(u.colId);
209
+ const d = r.getColDef(), g = r.getSort(), w = Ie(d.colId);
210
210
  re(void 0, void 0, {
211
- column: u,
212
- field: g?.field ?? u.field ?? u.colId,
213
- order: f ? Ee[f] : null
211
+ column: d,
212
+ field: w?.field ?? d.field ?? d.colId,
213
+ order: g ? Ee[g] : null
214
214
  });
215
215
  }
216
- const oe = i(() => ut(r(w), (e) => {
217
- if (e.sorter === !0)
218
- return e.field ?? e.dataIndex ?? e.key;
219
- }).filter(Boolean)), Pe = () => {
216
+ const te = i(() => {
217
+ const e = n(p).length ? n(p) : t.columns;
218
+ return dt(e, (o) => {
219
+ if (o.sorter === !0)
220
+ return o.field ?? o.dataIndex ?? o.key;
221
+ }).filter(Boolean);
222
+ }), Pe = () => {
220
223
  B.value = {};
221
224
  const e = s.value;
222
225
  if (!e)
223
226
  return;
224
- const t = e.getColumnState()?.map((n) => ({ ...n, sort: null }));
225
- z(t);
227
+ const o = e.getColumnState()?.map((r) => ({ ...r, sort: null }));
228
+ z(o);
226
229
  }, P = h({});
227
230
  ft({ expandable: P });
228
231
  function Oe(e) {
229
- const t = e.columnGroup;
230
- t && (P.value = {
232
+ const o = e.columnGroup;
233
+ o && (P.value = {
231
234
  ...P.value,
232
- [t.getGroupId()]: t.isExpanded()
235
+ [o.getGroupId()]: o.isExpanded()
233
236
  });
234
237
  }
235
- const O = h(!0), Ve = i(() => It(o.manual) ? o.manual : ct(N.searchFormExtra?.() || []).some((t) => t.type?.name === "ApView")), {
238
+ const O = h(!0), Ve = i(() => It(t.manual) ? t.manual : ct(D.searchFormExtra?.() || []).some((o) => o.type?.name === "ApView")), {
236
239
  formRef: S,
237
240
  submit: V,
238
241
  reset: K,
239
- data: p,
240
- tableProps: te,
242
+ data: f,
243
+ tableProps: ne,
241
244
  handleTableChangeOptional: re,
242
- submitWith: ne,
243
- refresh: le,
245
+ submitWith: le,
246
+ refresh: ae,
244
247
  getPaging: Ke,
245
248
  setPaging: Ge,
246
249
  setDataSource: Le,
247
250
  getLastParams: He
248
251
  } = it({
249
252
  async request(e) {
250
- if (b = !1, C.value && !C.value.preserveSelectedRowKeys && x(o.dataSource) && !O.value && H(), O.value && (O.value = !1), !x(o.dataSource)) {
251
- const n = e.pageSize * (e.current - 1);
253
+ if (b = !1, C.value && !C.value.preserveSelectedRowKeys && x(t.dataSource) && !O.value && H(), O.value && (O.value = !1), !x(t.dataSource)) {
254
+ const r = e.pageSize * (e.current - 1);
252
255
  return {
253
- data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(n, n + e.pageSize)) || [],
254
- total: o.dataSource.length || 0
256
+ data: (t.pagination === !1 ? t.dataSource : t.dataSource.slice(r, r + e.pageSize)) || [],
257
+ total: t.dataSource.length || 0
255
258
  };
256
259
  }
257
- const t = await o.request?.(e);
260
+ const o = await t.request?.(e);
258
261
  return {
259
- data: t?.data || [],
260
- total: t?.total || 0
262
+ data: o?.data || [],
263
+ total: o?.total || 0
261
264
  };
262
265
  },
263
266
  namespace: "ap-grid",
264
267
  filterFields: h([]),
265
- params: k(o, "params"),
266
- defaultData: o.defaultData,
267
- manual: r(Ve),
268
- formatParams: o.beforeSearchSubmit,
269
- pagination: o.pagination,
270
- sortFields: oe,
268
+ params: k(t, "params"),
269
+ defaultData: t.defaultData,
270
+ manual: n(Ve),
271
+ formatParams: t.beforeSearchSubmit,
272
+ pagination: t.pagination,
273
+ sortFields: te,
271
274
  onClickReset: Pe,
272
- defaultSortOrder: De()
275
+ defaultSortOrder: Ne()
273
276
  }), C = i(() => {
274
- const e = o.rowSelection || xe.value?.rowSelection;
277
+ const e = t.rowSelection || X.value?.rowSelection;
275
278
  if (e)
276
- return e === !0 ? Se : {
277
- ...Se,
279
+ return e === !0 ? Ce : {
280
+ ...Ce,
278
281
  ...e
279
282
  };
280
- }), We = yt(o, w), Ue = i(
281
- () => x(o.dataSource) ? p.records : o.dataSource
283
+ }), We = yt(t, p), Ue = i(
284
+ () => x(t.dataSource) ? f.records : t.dataSource
282
285
  ), {
283
286
  select: _e,
284
287
  unSelect: je,
@@ -291,7 +294,7 @@ const wr = /* @__PURE__ */ ko({
291
294
  } = Ct({
292
295
  ...C.value,
293
296
  dataSource: Ue,
294
- rowKey: o.rowKey
297
+ rowKey: t.rowKey
295
298
  }), Ye = {
296
299
  checkbox: "multiRow",
297
300
  radio: "singleRow"
@@ -299,28 +302,28 @@ const wr = /* @__PURE__ */ ko({
299
302
  const e = C.value;
300
303
  if (!e)
301
304
  return;
302
- const { type: t = "checkbox", disabled: n } = e;
305
+ const { type: o = "checkbox", disabled: r } = e;
303
306
  return {
304
- mode: Ye[t],
305
- isRowSelectable: (l) => n ? !n(l.data) : !0,
307
+ mode: Ye[o],
308
+ isRowSelectable: (l) => r ? !r(l.data) : !0,
306
309
  hideDisabledCheckboxes: e.hideDisabled ?? !1
307
310
  };
308
311
  });
309
312
  function L(e) {
310
- return E(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
313
+ return E(t.rowKey) ? t.rowKey(e) : e[t.rowKey];
311
314
  }
312
315
  const I = ({
313
316
  api: e = s.value
314
317
  }) => {
315
- if (o.onUpdate?.(), !C.value)
318
+ if (t.onUpdate?.(), !C.value)
316
319
  return;
317
- const t = G.value || [];
320
+ const o = G.value || [];
318
321
  b = !1;
319
- const n = [];
322
+ const r = [];
320
323
  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);
323
- }), e.setNodesSelected({ nodes: n, newValue: !0 }), setTimeout(() => {
324
+ const u = l.data, d = L(u), g = l.isSelected();
325
+ o.find((w) => L(w) === d) ? !g && r.push(l) : g && l.setSelected(!1);
326
+ }), e.setNodesSelected({ nodes: r, newValue: !0 }), setTimeout(() => {
324
327
  b = !0;
325
328
  }, 0);
326
329
  }, eo = (e) => {
@@ -335,11 +338,11 @@ const wr = /* @__PURE__ */ ko({
335
338
  const e = s.value;
336
339
  if (!e || !F.value)
337
340
  return;
338
- const t = e.getColumnState(), { colKey: n, order: l } = F.value, d = t.map((u) => ({
339
- ...u,
340
- sort: u.colId === n ? ee[l] : null
341
+ const o = e.getColumnState(), { colKey: r, order: l } = F.value, u = o.map((d) => ({
342
+ ...d,
343
+ sort: d.colId === r ? oe[l] : null
341
344
  }));
342
- z(d);
345
+ z(u);
343
346
  }, H = () => {
344
347
  qe(), s.value?.deselectAll();
345
348
  };
@@ -348,8 +351,8 @@ const wr = /* @__PURE__ */ ko({
348
351
  I({});
349
352
  });
350
353
  }
351
- const ro = i(() => {
352
- const e = o.customRow;
354
+ const no = i(() => {
355
+ const e = t.customRow;
353
356
  return e ? {
354
357
  isFullWidthRow: e.isCustomRow,
355
358
  fullWidthCellRenderer: At,
@@ -358,7 +361,7 @@ const wr = /* @__PURE__ */ ko({
358
361
  }
359
362
  } : {};
360
363
  });
361
- function no(e) {
364
+ function ro(e) {
362
365
  Qe(e), A(() => {
363
366
  I({});
364
367
  });
@@ -368,112 +371,112 @@ const wr = /* @__PURE__ */ ko({
368
371
  I({});
369
372
  });
370
373
  }
371
- function ae(e = !1) {
372
- const t = e ? "getFieldsValueTransformed" : "getFieldsValue";
373
- return S.value?.apForm?.[t]?.(!0);
374
+ function se(e = !1) {
375
+ const o = e ? "getFieldsValueTransformed" : "getFieldsValue";
376
+ return S.value?.apForm?.[o]?.(!0);
374
377
  }
375
- function se(e) {
378
+ function ie(e) {
376
379
  S.value?.apForm?.setFieldsValue?.(e);
377
380
  }
378
- function ie() {
381
+ function de() {
379
382
  return S.value?.getSorterItems() || [];
380
383
  }
381
384
  function ue(e) {
382
385
  S.value?.setSorterItems(e);
383
386
  }
384
- function de() {
387
+ function ce() {
385
388
  S.value?.resetSorterItems();
386
389
  }
387
- function ce(e) {
390
+ function me(e) {
388
391
  return e && String(e);
389
392
  }
390
393
  function ao(e) {
391
- const t = s.value;
392
- if (!t)
394
+ const o = s.value;
395
+ if (!o)
393
396
  return;
394
- const n = t.getColumnState() || [], l = e.map((a) => a.key ? String(a.key) : a.key).filter(Boolean), d = n.map((a) => {
397
+ const r = o.getColumnState() || [], l = e.map((a) => a.key ? String(a.key) : a.key).filter(Boolean), u = r.map((a) => {
395
398
  if (!Be.value.includes(a.colId))
396
399
  return a;
397
- const M = !l.includes(a.colId), me = {
400
+ const M = !l.includes(a.colId), pe = {
398
401
  ...a,
399
402
  hide: M
400
- }, pe = e.find(
401
- (Mo) => ce(Mo.key) === a.colId
403
+ }, fe = e.find(
404
+ (Mo) => me(Mo.key) === a.colId
402
405
  );
403
- return pe && (me.pinned = pe.fixed || null), me;
404
- }), u = new Map(
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)
408
- ), g = [];
406
+ return fe && (pe.pinned = fe.fixed || null), pe;
407
+ }), d = new Map(
408
+ e.map((a, M) => [me(a.key), M])
409
+ ), g = u.filter((a) => d.has(a.colId)).sort(
410
+ (a, M) => d.get(a.colId) - d.get(M.colId)
411
+ ), w = [];
409
412
  let m = 0;
410
- for (const a of d)
411
- u.has(a.colId) ? g.push(f[m++]) : g.push(a);
412
- z(g, { applyOrder: !0 });
413
+ for (const a of u)
414
+ d.has(a.colId) ? w.push(g[m++]) : w.push(a);
415
+ z(w, { applyOrder: !0 });
413
416
  }
414
417
  st({
415
- columns: i(() => w.value),
416
- columnsBackup: i(() => Y.value),
417
- size: i(() => at[v.value]),
418
+ columns: i(() => p.value),
419
+ columnsBackup: i(() => Z.value),
420
+ size: i(() => at[R.value]),
418
421
  updateColumns(e) {
419
- w.value = e, o.onShownColumnsChange?.(e), dt(
422
+ p.value = e, t.onShownColumnsChange?.(e), ut(
420
423
  () => s.value?.getAllDisplayedColumns(),
421
424
  () => {
422
425
  ao(e);
423
426
  },
424
427
  {
425
428
  interval: 17,
426
- check: (t) => !!(t && t.length > 0)
429
+ check: (o) => !!(o && o.length > 0)
427
430
  }
428
431
  );
429
432
  },
430
433
  updateSize(e) {
431
- v.value = lt[e];
434
+ R.value = lt[e];
432
435
  },
433
436
  renderConfig: i(() => ({
434
437
  className: Re("table-header", "title"),
435
438
  color: Fe.value.colorTextTertiary
436
439
  })),
437
- dataSource: i(() => r(p).records),
438
- getSearchFormValues: ae,
439
- setSearchFormValues: se,
440
+ dataSource: i(() => n(f).records),
441
+ getSearchFormValues: se,
442
+ setSearchFormValues: ie,
440
443
  submit: V,
441
- submitWith: ne,
444
+ submitWith: le,
442
445
  reset: K,
443
- refresh: le,
444
- getSearchFormSorterItems: ie,
446
+ refresh: ae,
447
+ getSearchFormSorterItems: de,
445
448
  setSearchFormSorterItems: ue,
446
- resetSearchFormSorterItems: de,
449
+ resetSearchFormSorterItems: ce,
447
450
  getLastParams: He
448
451
  });
449
- const so = i(() => (x(o.loading) ? p.loading : o.loading) || Z.value.length === 0), io = i(() => [
452
+ const so = i(() => (x(t.loading) ? f.loading : t.loading) || ee.value.length === 0), io = i(() => [
450
453
  c(),
451
- o.card ? null : c("wrapper"),
454
+ t.card ? null : c("wrapper"),
452
455
  c("adaptive"),
453
- c(`size-${v.value}`),
454
- o.autoHeight && p.records.length ? c("auto-height") : null,
455
- ve.value
456
+ c(`size-${R.value}`),
457
+ t.autoHeight && f.records.length ? c("auto-height") : null,
458
+ be.value
456
459
  ].filter(Boolean)), uo = i(() => ({
457
460
  height: "100%",
458
- ...o.tableStyle || {}
459
- })), co = (e, t) => {
460
- re({ current: e, pageSize: t });
461
+ ...t.tableStyle || {}
462
+ })), co = (e, o) => {
463
+ re({ current: e, pageSize: o });
461
464
  };
462
465
  function mo(e) {
463
- const t = e.data;
464
- return L(t);
466
+ const o = e.data;
467
+ return L(o);
465
468
  }
466
- function po(e, t) {
467
- (E(e) ? s.value?.ensureNodeVisible : s.value?.ensureIndexVisible)?.(e, t);
469
+ function po(e, o) {
470
+ (E(e) ? s.value?.ensureNodeVisible : s.value?.ensureIndexVisible)?.(e, o);
468
471
  }
469
- function fo(e, t) {
470
- s.value?.ensureColumnVisible(e, t);
472
+ function fo(e, o) {
473
+ s.value?.ensureColumnVisible(e, o);
471
474
  }
472
475
  function go(e) {
473
- o.onRowClicked?.(e.data, e.event);
476
+ t.onRowClicked?.(e.data, e.event);
474
477
  }
475
478
  function wo(e) {
476
- o.onScrollEnd?.(e.direction);
479
+ t.onScrollEnd?.(e.direction);
477
480
  }
478
481
  function So(e) {
479
482
  return s.value?.refreshCells(e);
@@ -483,39 +486,39 @@ const wr = /* @__PURE__ */ ko({
483
486
  }
484
487
  function ho({
485
488
  finished: e,
486
- columns: t,
487
- source: n
489
+ columns: o,
490
+ source: r
488
491
  }) {
489
- if (!e || n !== "uiColumnResized")
492
+ if (!e || r !== "uiColumnResized")
490
493
  return;
491
- const l = (t || []).map((d) => ({
492
- key: d.getColId(),
493
- width: d.getActualWidth()
494
+ const l = (o || []).map((u) => ({
495
+ key: u.getColId(),
496
+ width: u.getActualWidth()
494
497
  }));
495
- q(o.plugins, (d) => d.onColumnResized?.bind(d), l), o.onColumnResized?.(l);
498
+ q(t.plugins, (u) => u.onColumnResized?.bind(u), l), t.onColumnResized?.(l);
496
499
  }
497
500
  const yo = (e) => {
498
- const t = [
501
+ const o = [
499
502
  Q.value.getRowClass?.(e)
500
503
  ];
501
504
  if (!e.node.rowPinned) {
502
- const n = E(o.rowClassName) ? o.rowClassName(e.data, e.rowIndex) : o.rowClassName;
503
- t.push(n);
505
+ const r = E(t.rowClassName) ? t.rowClassName(e.data, e.rowIndex) : t.rowClassName;
506
+ o.push(r);
504
507
  }
505
- return t.flat().filter(Boolean);
506
- }, Ro = ({ api: e }) => {
507
- s.value = e, q(o.plugins, (t) => t.init?.bind(t), e);
508
+ return o.flat().filter(Boolean);
508
509
  }, vo = ({ api: e }) => {
509
- o.onModelUpdated?.(e);
510
- }, bo = (e, t, n) => {
510
+ s.value = e, q(t.plugins, (o) => o.init?.bind(o), e);
511
+ }, Ro = ({ api: e }) => {
512
+ t.onModelUpdated?.(e), X.value?.onModelUpdated?.(e);
513
+ }, bo = (e, o, r) => {
511
514
  q(
512
- o.plugins,
515
+ t.plugins,
513
516
  (l) => l.searchParamsChange?.bind(this),
514
- t
515
- ), o.searchForm && o.searchForm.onValuesChange?.(e, t, n);
517
+ o
518
+ ), t.searchForm && t.searchForm.onValuesChange?.(e, o, r);
516
519
  };
517
520
  return W(
518
- () => o.dataSource,
521
+ () => t.dataSource,
519
522
  (e) => {
520
523
  A(() => {
521
524
  Le(e, !0);
@@ -523,110 +526,110 @@ const wr = /* @__PURE__ */ ko({
523
526
  },
524
527
  { immediate: !0, deep: !0 }
525
528
  ), W(
526
- () => o.size,
529
+ () => t.size,
527
530
  (e) => {
528
- v.value = e;
531
+ R.value = e;
529
532
  }
530
533
  ), W(
531
- () => r(p).loading,
534
+ () => n(f).loading,
532
535
  (e) => {
533
- o.onLoadingChange?.(e);
536
+ t.onLoadingChange?.(e);
534
537
  }
535
- ), he({
538
+ ), ye({
536
539
  submit: V,
537
540
  reset: K,
538
- refresh: le,
539
- submitWith: ne,
540
- setSearchFormValues: se,
541
- getSearchFormValues: ae,
542
- getShowColumns: () => r(w),
541
+ refresh: ae,
542
+ submitWith: le,
543
+ setSearchFormValues: ie,
544
+ getSearchFormValues: se,
545
+ getShowColumns: () => n(p),
543
546
  rowSelection: {
544
547
  selectedRows: i(() => G.value),
545
548
  setSelectedRowKeys: to,
546
- setSelectedRows: no,
549
+ setSelectedRows: ro,
547
550
  clearAll: H,
548
551
  unSelectRows: lo
549
552
  },
550
553
  scrollToRow: po,
551
554
  scrollToColumn: fo,
552
- getDataSource: () => r(p.records),
555
+ getDataSource: () => n(f.records),
553
556
  getPaging: Ke,
554
557
  setPaging: Ge,
555
- getSearchFormSorterItems: ie,
558
+ getSearchFormSorterItems: de,
556
559
  setSearchFormSorterItems: ue,
557
- resetSearchFormSorterItems: de,
560
+ resetSearchFormSorterItems: ce,
558
561
  refreshCells: So,
559
562
  redrawRows: Co,
560
563
  _internalGridApi: i(() => s.value)
561
- }), (e, t) => (y(), U("div", {
562
- class: R(io.value),
564
+ }), (e, o) => (y(), U("div", {
565
+ class: v(io.value),
563
566
  style: _(e.wrapperStyle)
564
567
  }, [
565
- r(x)(e.dataSource) && e.searchForm !== !1 && r(X).length > 0 ? (y(), U("div", {
568
+ n(x)(e.dataSource) && e.searchForm !== !1 && n(Y).length > 0 ? (y(), U("div", {
566
569
  key: 0,
567
- class: R(e.card ? r(D)("search-wrapper") : null),
570
+ class: v(e.card ? n(N)("search-wrapper") : null),
568
571
  style: _(e.searchFormWrapperStyle)
569
572
  }, [
570
- Fo(r(mt).SearchForm, j(r(nt)(e.searchForm || {}, ["onValuesChange"]), {
573
+ Fo(n(mt).SearchForm, j(n(rt)(e.searchForm || {}, ["onValuesChange"]), {
571
574
  ref_key: "formRef",
572
575
  ref: S,
573
576
  "custom-reset": "",
574
- "submit-loading": r(te).loading,
575
- onSubmit: r(V),
576
- onReset: r(K),
577
+ "submit-loading": n(ne).loading,
578
+ onSubmit: n(V),
579
+ onReset: n(K),
577
580
  onValuesChange: bo
578
581
  }), Bo({
579
- default: ge(() => [
580
- (y(!0), U(Io, null, Ao(r(X), (n) => (y(), $(To(n.renderNode), {
581
- key: n.dataIndex
582
+ default: we(() => [
583
+ (y(!0), U(Io, null, Ao(n(Y), (r) => (y(), $(To(r.renderNode), {
584
+ key: r.dataIndex
582
585
  }))), 128))
583
586
  ]),
584
587
  _: 2
585
588
  }, [
586
- N.searchFormExtra ? {
589
+ D.searchFormExtra ? {
587
590
  name: "extra",
588
- fn: ge(() => [
589
- we(e.$slots, "searchFormExtra")
591
+ fn: we(() => [
592
+ Se(e.$slots, "searchFormExtra")
590
593
  ]),
591
594
  key: "0"
592
595
  } : void 0
593
596
  ]), 1040, ["submit-loading", "onSubmit", "onReset"])
594
- ], 6)) : fe("", !0),
597
+ ], 6)) : ge("", !0),
595
598
  T("div", {
596
- class: R([r(D)("table-wrapper"), e.card ? r(D)("table-wrapper-card") : null]),
599
+ class: v([n(N)("table-wrapper"), e.card ? n(N)("table-wrapper-card") : null]),
597
600
  style: _(e.tableWrapperStyle)
598
601
  }, [
599
602
  T("div", {
600
- class: R(r(c)("header-wrapper"))
603
+ class: v(n(c)("header-wrapper"))
601
604
  }, [
602
- we(e.$slots, "title", {
603
- selectedRows: r(G),
604
- selectedRowKeys: r($e),
605
- shownColumns: r(w),
605
+ Se(e.$slots, "title", {
606
+ selectedRows: n(G),
607
+ selectedRowKeys: n($e),
608
+ shownColumns: n(p),
606
609
  clearAll: H
607
610
  })
608
611
  ], 2),
609
612
  T("div", {
610
613
  ref_key: "gridWrapperRef",
611
614
  ref: Te,
612
- class: R(r(c)("grid-wrapper"))
615
+ class: v(n(c)("grid-wrapper"))
613
616
  }, [
614
- (y(), $(r(rt), j(
615
- r(kt)(r(Me), r(Q), ro.value),
617
+ (y(), $(n(nt), j(
618
+ n(kt)(n(ke), n(Q), no.value),
616
619
  {
617
- key: r(J),
620
+ key: n(J),
618
621
  "animate-rows": e.animateRows,
619
622
  "get-row-class": yo,
620
623
  style: uo.value,
621
- "row-data": r(p).records,
622
- "column-defs": r(Z),
623
- "default-col-def": r(Ae),
624
+ "row-data": n(f).records,
625
+ "column-defs": n(ee),
626
+ "default-col-def": n(Ae),
624
627
  "suppress-loading-overlay": "",
625
628
  "row-selection": Ze.value,
626
- "selection-column-def": r(We),
629
+ "selection-column-def": n(We),
627
630
  "get-row-id": mo,
628
- "get-row-height": o.getRowHeight,
629
- theme: r(be),
631
+ "get-row-height": t.getRowHeight,
632
+ theme: n(Me),
630
633
  "tooltip-show-delay": 500,
631
634
  "enable-browser-tooltips": e.browserTooltips,
632
635
  "tooltip-interaction": "",
@@ -639,9 +642,9 @@ const wr = /* @__PURE__ */ ko({
639
642
  "tab-to-next-cell": () => !1,
640
643
  "enable-cell-span": "",
641
644
  "dom-layout": e.autoHeight ? "autoHeight" : "normal",
642
- "locale-text": ye[r(J)],
645
+ "locale-text": ve[n(J)],
643
646
  onSortChanged: ze,
644
- onGridReady: Ro,
647
+ onGridReady: vo,
645
648
  onRowDataUpdated: I,
646
649
  onRowSelected: eo,
647
650
  onFirstDataRendered: oo,
@@ -649,22 +652,22 @@ const wr = /* @__PURE__ */ ko({
649
652
  onBodyScrollEnd: wo,
650
653
  onColumnResized: ho,
651
654
  onColumnGroupOpened: Oe,
652
- onModelUpdated: vo
655
+ onModelUpdated: Ro
653
656
  }
654
657
  ), 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"]))
655
658
  ], 2),
656
659
  T("div", {
657
- class: R(r(c)("pagination-wrapper"))
660
+ class: v(n(c)("pagination-wrapper"))
658
661
  }, [
659
- e.pagination !== !1 ? (y(), $(r(Do), j({
662
+ e.pagination !== !1 ? (y(), $(n(No), j({
660
663
  key: 0,
661
- class: r(c)("pagination")
662
- }, r(te).pagination, { onChange: co }), null, 16, ["class"])) : fe("", !0)
664
+ class: n(c)("pagination")
665
+ }, n(ne).pagination, { onChange: co }), null, 16, ["class"])) : ge("", !0)
663
666
  ], 2)
664
667
  ], 6)
665
668
  ], 6));
666
669
  }
667
670
  });
668
671
  export {
669
- wr as default
672
+ Sn as default
670
673
  };