@aplus-frontend/ui 7.13.9 → 7.13.11

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