@aplus-frontend/ui 6.37.0 → 6.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/es/index.mjs +224 -231
  2. package/es/src/ag-grid/components/row/index.vue.d.ts +6 -0
  3. package/es/src/ag-grid/components/row/index.vue.mjs +4 -0
  4. package/es/src/ag-grid/components/row/index.vue2.mjs +14 -0
  5. package/es/src/ag-grid/editable/form-item.vue.mjs +10 -9
  6. package/es/src/ag-grid/editable/index.vue.mjs +17 -16
  7. package/es/src/ag-grid/hooks/use-row-selection.d.ts +1 -1
  8. package/es/src/ag-grid/hooks/use-row-selection.mjs +81 -68
  9. package/es/src/ag-grid/index.vue.d.ts +2 -1
  10. package/es/src/ag-grid/index.vue.mjs +256 -232
  11. package/es/src/ag-grid/interface.d.ts +40 -3
  12. package/es/src/ap-action/group/index.vue.mjs +24 -21
  13. package/es/src/ap-action/item/index.vue2.mjs +28 -20
  14. package/es/src/index.d.ts +0 -1
  15. package/es/src/index.mjs +280 -288
  16. package/es/src/path-map.mjs +0 -1
  17. package/es/src/version.d.ts +1 -1
  18. package/es/src/version.mjs +1 -1
  19. package/lib/index.js +1 -1
  20. package/lib/src/ag-grid/components/row/index.vue.d.ts +6 -0
  21. package/lib/src/ag-grid/components/row/index.vue.js +1 -0
  22. package/lib/src/ag-grid/components/row/index.vue2.js +1 -0
  23. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  24. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  25. package/lib/src/ag-grid/hooks/use-row-selection.d.ts +1 -1
  26. package/lib/src/ag-grid/hooks/use-row-selection.js +1 -1
  27. package/lib/src/ag-grid/index.vue.d.ts +2 -1
  28. package/lib/src/ag-grid/index.vue.js +1 -1
  29. package/lib/src/ag-grid/interface.d.ts +40 -3
  30. package/lib/src/ap-action/group/index.vue.js +1 -1
  31. package/lib/src/ap-action/item/index.vue2.js +1 -1
  32. package/lib/src/index.d.ts +0 -1
  33. package/lib/src/index.js +1 -1
  34. package/lib/src/path-map.js +1 -1
  35. package/lib/src/version.d.ts +1 -1
  36. package/lib/src/version.js +1 -1
  37. package/package.json +1 -1
  38. package/theme/index.css +0 -3
  39. package/theme/index.less +0 -1
  40. package/es/src/work-order-modal/createWorkOrder.d.ts +0 -3
  41. package/es/src/work-order-modal/createWorkOrder.mjs +0 -32
  42. package/es/src/work-order-modal/help-message.vue.d.ts +0 -3
  43. package/es/src/work-order-modal/help-message.vue.mjs +0 -4
  44. package/es/src/work-order-modal/help-message.vue2.mjs +0 -36
  45. package/es/src/work-order-modal/index.d.ts +0 -4
  46. package/es/src/work-order-modal/index.mjs +0 -8
  47. package/es/src/work-order-modal/interfaces.d.ts +0 -31
  48. package/es/src/work-order-modal/interfaces.mjs +0 -9
  49. package/es/src/work-order-modal/style/css.d.ts +0 -0
  50. package/es/src/work-order-modal/style/css.js +0 -4
  51. package/es/src/work-order-modal/style/index.d.ts +0 -0
  52. package/es/src/work-order-modal/style/index.js +0 -4
  53. package/es/src/work-order-modal/work-order-modal.vue.d.ts +0 -846
  54. package/es/src/work-order-modal/work-order-modal.vue.mjs +0 -192
  55. package/es/src/work-order-modal/work-order-modal.vue2.mjs +0 -4
  56. package/lib/src/work-order-modal/createWorkOrder.d.ts +0 -3
  57. package/lib/src/work-order-modal/createWorkOrder.js +0 -1
  58. package/lib/src/work-order-modal/help-message.vue.d.ts +0 -3
  59. package/lib/src/work-order-modal/help-message.vue.js +0 -1
  60. package/lib/src/work-order-modal/help-message.vue2.js +0 -1
  61. package/lib/src/work-order-modal/index.d.ts +0 -4
  62. package/lib/src/work-order-modal/index.js +0 -1
  63. package/lib/src/work-order-modal/interfaces.d.ts +0 -31
  64. package/lib/src/work-order-modal/interfaces.js +0 -1
  65. package/lib/src/work-order-modal/style/css.cjs +0 -4
  66. package/lib/src/work-order-modal/style/css.d.ts +0 -0
  67. package/lib/src/work-order-modal/style/index.cjs +0 -4
  68. package/lib/src/work-order-modal/style/index.d.ts +0 -0
  69. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +0 -846
  70. package/lib/src/work-order-modal/work-order-modal.vue.js +0 -1
  71. package/lib/src/work-order-modal/work-order-modal.vue2.js +0 -1
@@ -1,32 +1,34 @@
1
- import { defineComponent as oo, useSlots as to, ref as I, toRef as T, unref as t, computed as l, nextTick as ro, watch as z, createElementBlock as A, openBlock as b, normalizeStyle as V, normalizeClass as m, createCommentVNode as ae, createElementVNode as B, createVNode as M, mergeProps as O, createSlots as ao, withCtx as ne, Fragment as no, renderList as lo, createBlock as le, resolveDynamicComponent as so, renderSlot as se, withDirectives as io, vShow as uo } from "vue";
2
- import { AgGridVue as co } from "ag-grid-vue3";
3
- import { ModuleRegistry as mo, AllCommunityModule as po } from "ag-grid-community";
4
- import { mergeProps as fo } from "./utils.mjs";
5
- import { Spin as go, Pagination as wo } from "@aplus-frontend/antdv";
6
- import { isUndefined as F, isFunction as G } from "lodash-unified";
1
+ import { defineComponent as lo, useSlots as no, ref as I, toRef as T, unref as t, computed as n, nextTick as ae, watch as A, createElementBlock as V, openBlock as b, normalizeStyle as M, normalizeClass as f, createCommentVNode as le, createElementVNode as F, createVNode as W, mergeProps as O, createSlots as so, withCtx as ne, Fragment as io, renderList as uo, createBlock as se, resolveDynamicComponent as co, renderSlot as ie, withDirectives as mo, vShow as po } from "vue";
2
+ import { AgGridVue as fo } from "ag-grid-vue3";
3
+ import { ModuleRegistry as go, AllCommunityModule as wo } from "ag-grid-community";
4
+ import { mergeProps as So } from "./utils.mjs";
5
+ import { Spin as yo, Pagination as ho } from "@aplus-frontend/antdv";
6
+ import { isUndefined as B, isFunction as G } from "lodash-unified";
7
7
  import "../config-provider/index.mjs";
8
- import { ApForm as So } from "../ap-form/index.mjs";
9
- import { recursionApColumns as yo } from "../ap-table/utils.mjs";
10
- import { useTablePaging as Co } from "../ap-table/hooks/use-table-paging-ng.mjs";
11
- import ho from "./hooks/use-row-selection.mjs";
12
- import { useProvideSorter as vo } from "./context.mjs";
13
- import { useProvideApTable as Ro } from "../ap-table/context.mjs";
14
- import { DEFAULT_ROW_SELECTION_CONFIG as ie, sizeReverseMap as bo, sizeMap as Bo } from "../ap-grid/constants.mjs";
15
- import { useToken as Fo } from "@aplus-frontend/antdv/es/theme/internal";
16
- import { useTheme as ko } from "./theme.mjs";
17
- import { useColumns as xo } from "./hooks/use-columns.mjs";
18
- import { useColumnsDef as Io } from "./hooks/use-columns-def.mjs";
19
- import { isDef as To } from "../utils/index.mjs";
20
- import { getValidVNodeList as Do } from "../utils/slot.mjs";
21
- import { useSearchForm as No } from "./hooks/use-search-form.mjs";
8
+ import { ApForm as Co } from "../ap-form/index.mjs";
9
+ import { recursionApColumns as Ro } from "../ap-table/utils.mjs";
10
+ import { useTablePaging as vo } from "../ap-table/hooks/use-table-paging-ng.mjs";
11
+ import bo from "./hooks/use-row-selection.mjs";
12
+ import { useProvideSorter as Fo } from "./context.mjs";
13
+ import { useProvideApTable as Bo } from "../ap-table/context.mjs";
14
+ import { DEFAULT_ROW_SELECTION_CONFIG as de, sizeReverseMap as ko, sizeMap as xo } from "../ap-grid/constants.mjs";
15
+ import { useToken as Io } from "@aplus-frontend/antdv/es/theme/internal";
16
+ import { useTheme as To } from "./theme.mjs";
17
+ import { useColumns as Do } from "./hooks/use-columns.mjs";
18
+ import { useColumnsDef as No } from "./hooks/use-columns-def.mjs";
19
+ import { isDef as Eo } from "../utils/index.mjs";
20
+ import { getValidVNodeList as Ko } from "../utils/slot.mjs";
21
+ import { useSearchForm as Po } from "./hooks/use-search-form.mjs";
22
22
  import "./components/empty/index.vue.mjs";
23
- import Eo from "./hooks/use-virtual-config.mjs";
24
- import { usePinnedRow as Ko } from "./hooks/use-pinned-row.mjs";
25
- import Po from "./hooks/use-selection-col-def.mjs";
26
- import { useNamespace as zo } from "../config-provider/hooks/use-namespace.mjs";
27
- import { useGlobalConfig as Ao } from "../config-provider/hooks/use-global-config.mjs";
28
- import Vo from "./components/empty/index.vue2.mjs";
29
- const mt = /* @__PURE__ */ oo({
23
+ import zo from "./hooks/use-virtual-config.mjs";
24
+ import { usePinnedRow as Ao } from "./hooks/use-pinned-row.mjs";
25
+ import Vo from "./hooks/use-selection-col-def.mjs";
26
+ import "./components/row/index.vue.mjs";
27
+ import { useNamespace as Mo } from "../config-provider/hooks/use-namespace.mjs";
28
+ import { useGlobalConfig as Wo } from "../config-provider/hooks/use-global-config.mjs";
29
+ import Oo from "./components/row/index.vue2.mjs";
30
+ import Go from "./components/empty/index.vue2.mjs";
31
+ const yt = /* @__PURE__ */ lo({
30
32
  name: "AgGrid",
31
33
  __name: "index",
32
34
  props: {
@@ -46,7 +48,6 @@ const mt = /* @__PURE__ */ oo({
46
48
  id: {},
47
49
  showHeader: { type: Boolean },
48
50
  components: {},
49
- customRow: {},
50
51
  customHeaderRow: {},
51
52
  direction: {},
52
53
  expandFixed: { type: [String, Boolean] },
@@ -89,6 +90,7 @@ const mt = /* @__PURE__ */ oo({
89
90
  loading: { type: Boolean, default: void 0 },
90
91
  summary: {},
91
92
  rowHeight: {},
93
+ getRowHeight: {},
92
94
  advanceRenderer: { type: Boolean },
93
95
  browserTooltips: { type: Boolean },
94
96
  virtual: { type: [Boolean, Object], default: void 0 },
@@ -97,67 +99,68 @@ const mt = /* @__PURE__ */ oo({
97
99
  rowClassName: {},
98
100
  rowClassRules: {},
99
101
  autoHeight: { type: Boolean },
100
- onUpdate: {}
102
+ onUpdate: {},
103
+ customRow: {}
101
104
  },
102
- setup(de, { expose: ue }) {
103
- mo.registerModules([po]);
104
- const o = de, W = to(), { e: k, b: u, be: ce } = zo("ag-grid"), C = I(o.size), me = ko(C, T(o, "rowHeight")), pe = Eo(T(o, "virtual")), { rowPinnedGridConfig: H, getRowPinnedCellClass: fe } = Ko(
105
+ setup(ue, { expose: ce }) {
106
+ go.registerModules([wo]);
107
+ const o = ue, H = no(), { e: k, b: u, be: me } = Mo("ag-grid"), C = I(o.size), pe = To(C, T(o, "rowHeight")), fe = zo(T(o, "virtual")), { rowPinnedGridConfig: L, getRowPinnedCellClass: ge } = Ao(
105
108
  T(o, "summary")
106
- ), ge = Ao("apGrid"), s = I(), [, we] = Fo();
107
- let p = !!o.dataSource;
108
- const L = No(o), { shownColumns: f, columns: U, columnKeys: Se, getTargetColumnByKey: ye } = xo(o), { defaultColDef: Ce, columnDefs: he, gridWrapperRef: ve } = Io(U, o, fe), x = I({});
109
- vo({
109
+ ), we = Wo("apGrid"), s = I(), [, Se] = Io();
110
+ let g = !!o.dataSource;
111
+ const U = Po(o), { shownColumns: w, columns: j, columnKeys: ye, getTargetColumnByKey: he } = Do(o), { defaultColDef: Ce, columnDefs: Re, gridWrapperRef: ve } = No(j, o, ge), x = I({});
112
+ Fo({
110
113
  sorter: x,
111
114
  setSorter(e) {
112
115
  x.value = e;
113
116
  }
114
117
  });
115
- const Re = {
118
+ const be = {
116
119
  asc: "ascend",
117
120
  desc: "descend"
118
121
  };
119
- function be() {
122
+ function Fe() {
120
123
  const e = s.value.getColumns()?.filter((c) => c.getSort() !== void 0), r = t(x) || {};
121
124
  let a = e?.[0];
122
- const d = Object.keys(r);
123
- if (d.length && d.every((c) => r[c] === null)) {
125
+ const i = Object.keys(r);
126
+ if (i.length && i.every((c) => r[c] === null)) {
124
127
  const c = Object.keys(r)[0];
125
128
  c && (a = s.value?.getColumn(c));
126
129
  }
127
130
  if (!a)
128
131
  return;
129
- const i = a.getColDef(), y = a.getSort(), v = ye(i.colId);
130
- $(void 0, void 0, {
131
- column: i,
132
- field: v?.field ?? i.field ?? i.colId,
133
- order: y ? Re[y] : null
132
+ const d = a.getColDef(), m = a.getSort(), p = he(d.colId);
133
+ q(void 0, void 0, {
134
+ column: d,
135
+ field: p?.field ?? d.field ?? d.colId,
136
+ order: m ? be[m] : null
134
137
  });
135
138
  }
136
- const Be = l(() => yo(t(f), (e) => {
139
+ const Be = n(() => Ro(t(w), (e) => {
137
140
  if (e.sorter === !0)
138
141
  return e.field ?? e.dataIndex ?? e.key;
139
- }).filter(Boolean)), Fe = () => {
142
+ }).filter(Boolean)), ke = () => {
140
143
  x.value = {};
141
144
  const e = s.value;
142
145
  if (!e)
143
146
  return;
144
147
  const r = e.getColumnState()?.map((a) => ({ ...a, sort: null }));
145
148
  e.applyColumnState({ state: r });
146
- }, ke = l(() => To(o.manual) ? o.manual : Do(W.searchFormExtra?.() || []).some((r) => r.type?.name === "ApView")), {
147
- formRef: g,
149
+ }, xe = n(() => Eo(o.manual) ? o.manual : Ko(H.searchFormExtra?.() || []).some((r) => r.type?.name === "ApView")), {
150
+ formRef: S,
148
151
  submit: D,
149
152
  reset: N,
150
- data: w,
151
- tableProps: j,
152
- handleTableChangeOptional: $,
153
- submitWith: q,
153
+ data: y,
154
+ tableProps: $,
155
+ handleTableChangeOptional: q,
156
+ submitWith: _,
154
157
  refresh: J,
155
- getPaging: xe,
156
- setPaging: Ie,
157
- setDataSource: Te
158
- } = Co({
158
+ getPaging: Ie,
159
+ setPaging: Te,
160
+ setDataSource: De
161
+ } = vo({
159
162
  async request(e) {
160
- if (p = !1, S.value && !S.value.preserveSelectedRowKeys && F(o.dataSource) && P(), !F(o.dataSource)) {
163
+ if (g = !1, h.value && !h.value.preserveSelectedRowKeys && B(o.dataSource) && z(), !B(o.dataSource)) {
161
164
  const a = e.pageSize * (e.current - 1);
162
165
  return {
163
166
  data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(a, a + e.pageSize)) || [],
@@ -174,191 +177,207 @@ const mt = /* @__PURE__ */ oo({
174
177
  filterFields: I([]),
175
178
  params: T(o, "params"),
176
179
  defaultData: o.defaultData,
177
- manual: t(ke),
180
+ manual: t(xe),
178
181
  formatParams: o.beforeSearchSubmit,
179
182
  pagination: o.pagination,
180
183
  sortFields: Be,
181
- onClickReset: Fe
182
- }), S = l(() => {
183
- const e = o.rowSelection || ge.value?.rowSelection;
184
+ onClickReset: ke
185
+ }), h = n(() => {
186
+ const e = o.rowSelection || we.value?.rowSelection;
184
187
  if (e)
185
- return e === !0 ? ie : {
186
- ...ie,
188
+ return e === !0 ? de : {
189
+ ...de,
187
190
  ...e
188
191
  };
189
- }), De = Po(o, f), Ne = l(
190
- () => F(o.dataSource) ? w.records : o.dataSource
192
+ }), Ne = Vo(o, w), Ee = n(
193
+ () => B(o.dataSource) ? y.records : o.dataSource
191
194
  ), {
192
- select: Ee,
193
- unSelect: Ke,
195
+ select: Ke,
196
+ unSelect: Pe,
194
197
  selectedRows: E,
195
- selectedRowKeys: Pe,
196
- clearAll: ze,
197
- selectMultiByKeys: Ae
198
- } = ho({
199
- ...S.value,
200
- dataSource: Ne,
198
+ selectedRowKeys: ze,
199
+ clearAll: Ae,
200
+ selectMultiByKeys: Ve,
201
+ selectMulti: Me
202
+ } = bo({
203
+ ...h.value,
204
+ dataSource: Ee,
201
205
  rowKey: o.rowKey
202
- }), Ve = {
206
+ }), We = {
203
207
  checkbox: "multiRow",
204
208
  radio: "singleRow"
205
- }, Me = l(() => {
206
- const e = S.value;
209
+ }, Oe = n(() => {
210
+ const e = h.value;
207
211
  if (!e)
208
212
  return;
209
213
  const { type: r = "checkbox", disabled: a } = e;
210
214
  return {
211
- mode: Ve[r],
212
- isRowSelectable: (d) => a ? !a(d.data) : !0,
215
+ mode: We[r],
216
+ isRowSelectable: (i) => a ? !a(i.data) : !0,
213
217
  hideDisabledCheckboxes: e.hideDisabled ?? !1
214
218
  };
215
219
  });
216
220
  function K(e) {
217
221
  return G(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
218
222
  }
219
- const Q = ({
223
+ const P = ({
220
224
  api: e = s.value
221
225
  }) => {
222
- if (o.onUpdate?.(), !S.value)
226
+ if (o.onUpdate?.(), !h.value)
223
227
  return;
224
228
  const r = E.value;
225
229
  if (!r.length) {
226
230
  setTimeout(() => {
227
- p = !0;
231
+ g = !0;
228
232
  }, 0);
229
233
  return;
230
234
  }
231
- p = !1;
235
+ g = !1;
232
236
  const a = [];
233
- e.forEachNode((d) => {
234
- const h = d.data, i = K(h);
235
- r.find((y) => K(y) === i) && a.push(d);
237
+ e.forEachNode((i) => {
238
+ const R = i.data, d = K(R), m = i.isSelected();
239
+ r.find((p) => K(p) === d) ? !m && a.push(i) : m && i.setSelected(!1);
236
240
  }), e.setNodesSelected({ nodes: a, newValue: !0 }), setTimeout(() => {
237
- p = !0;
241
+ g = !0;
238
242
  }, 0);
239
- }, Oe = (e) => {
240
- p && (e.node.isSelected() ? Ee(e.data) : Ke(e.data), G(S.value?.tooltip) && e.api.refreshCells({
243
+ }, Ge = (e) => {
244
+ g && (e.node.isSelected() ? Ke(e.data) : Pe(e.data), G(h.value?.tooltip) && e.api.refreshCells({
241
245
  rowNodes: [e.node],
242
246
  // todo: 取消硬编码
243
247
  columns: ["ag-Grid-SelectionColumn"],
244
248
  force: !0
245
249
  }));
246
- }, Ge = () => {
247
- p = !0;
248
- }, P = () => {
249
- ze(), s.value?.deselectAll();
250
+ }, He = () => {
251
+ g = !0;
252
+ }, z = () => {
253
+ Ae(), s.value?.deselectAll();
250
254
  };
251
- function We(e) {
252
- Ae(e), ro(() => {
253
- Q({});
255
+ function Le(e) {
256
+ Ve(e), ae(() => {
257
+ P({});
254
258
  });
255
259
  }
256
- function X(e = !1) {
260
+ const Ue = n(() => {
261
+ const e = o.customRow;
262
+ return e ? {
263
+ isFullWidthRow: e.isCustomRow,
264
+ fullWidthCellRenderer: Oo,
265
+ fullWidthCellRendererParams: {
266
+ render: e.render
267
+ }
268
+ } : {};
269
+ });
270
+ function je(e) {
271
+ Me(e), ae(() => {
272
+ P({});
273
+ });
274
+ }
275
+ function Q(e = !1) {
257
276
  const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
258
- return g.value?.apForm?.[r]?.(!0);
277
+ return S.value?.apForm?.[r]?.(!0);
259
278
  }
260
- function Y(e) {
261
- g.value?.apForm?.setFieldsValue?.(e);
279
+ function X(e) {
280
+ S.value?.apForm?.setFieldsValue?.(e);
262
281
  }
263
- function Z() {
264
- return g.value?.getSorterItems() || [];
282
+ function Y() {
283
+ return S.value?.getSorterItems() || [];
265
284
  }
266
- function _(e) {
267
- g.value?.setSorterItems(e);
285
+ function Z(e) {
286
+ S.value?.setSorterItems(e);
268
287
  }
269
288
  function ee() {
270
- g.value?.resetSorterItems();
289
+ S.value?.resetSorterItems();
271
290
  }
272
291
  function oe(e) {
273
292
  return e && String(e);
274
293
  }
275
- function He(e) {
294
+ function $e(e) {
276
295
  const r = s.value;
277
296
  if (!r)
278
297
  return;
279
- const a = r.getColumnState() || [], d = e.map((n) => n.key ? String(n.key) : n.key).filter(Boolean), h = a.map((n) => {
280
- if (!Se.value.includes(n.colId))
281
- return n;
282
- const R = !d.includes(n.colId), te = {
283
- ...n,
284
- hide: R
298
+ const a = r.getColumnState() || [], i = e.map((l) => l.key ? String(l.key) : l.key).filter(Boolean), R = a.map((l) => {
299
+ if (!ye.value.includes(l.colId))
300
+ return l;
301
+ const v = !i.includes(l.colId), te = {
302
+ ...l,
303
+ hide: v
285
304
  }, re = e.find(
286
- (eo) => oe(eo.key) === n.colId
305
+ (ao) => oe(ao.key) === l.colId
287
306
  );
288
307
  return re && (te.pinned = re.fixed || null), te;
289
- }), i = new Map(
290
- e.map((n, R) => [oe(n.key), R])
291
- ), y = h.filter((n) => i.has(n.colId)).sort(
292
- (n, R) => i.get(n.colId) - i.get(R.colId)
293
- ), v = [];
308
+ }), d = new Map(
309
+ e.map((l, v) => [oe(l.key), v])
310
+ ), m = R.filter((l) => d.has(l.colId)).sort(
311
+ (l, v) => d.get(l.colId) - d.get(v.colId)
312
+ ), p = [];
294
313
  let c = 0;
295
- for (const n of h)
296
- i.has(n.colId) ? v.push(y[c++]) : v.push(n);
314
+ for (const l of R)
315
+ d.has(l.colId) ? p.push(m[c++]) : p.push(l);
297
316
  r.applyColumnState({
298
- state: v,
317
+ state: p,
299
318
  applyOrder: !0
300
319
  });
301
320
  }
302
- Ro({
303
- columns: l(() => f.value),
304
- columnsBackup: l(() => U.value),
305
- size: l(() => Bo[C.value]),
321
+ Bo({
322
+ columns: n(() => w.value),
323
+ columnsBackup: n(() => j.value),
324
+ size: n(() => xo[C.value]),
306
325
  updateColumns(e) {
307
- f.value = e, o.onShownColumnsChange?.(e), He(e);
326
+ w.value = e, o.onShownColumnsChange?.(e), $e(e);
308
327
  },
309
328
  updateSize(e) {
310
- C.value = bo[e];
329
+ C.value = ko[e];
311
330
  },
312
- renderConfig: l(() => ({
313
- className: ce("table-header", "title"),
314
- color: we.value.colorTextTertiary
331
+ renderConfig: n(() => ({
332
+ className: me("table-header", "title"),
333
+ color: Se.value.colorTextTertiary
315
334
  })),
316
- dataSource: l(() => t(w).records),
317
- getSearchFormValues: X,
318
- setSearchFormValues: Y,
335
+ dataSource: n(() => t(y).records),
336
+ getSearchFormValues: Q,
337
+ setSearchFormValues: X,
319
338
  submit: D,
320
- submitWith: q,
339
+ submitWith: _,
321
340
  reset: N,
322
341
  refresh: J,
323
- getSearchFormSorterItems: Z,
324
- setSearchFormSorterItems: _,
342
+ getSearchFormSorterItems: Y,
343
+ setSearchFormSorterItems: Z,
325
344
  resetSearchFormSorterItems: ee
326
345
  });
327
- const Le = l(
328
- () => F(o.loading) ? w.loading : o.loading
329
- ), Ue = l(() => [
346
+ const qe = n(
347
+ () => B(o.loading) ? y.loading : o.loading
348
+ ), _e = n(() => [
330
349
  u(),
331
350
  o.card ? null : u("wrapper"),
332
351
  u("adaptive"),
333
352
  u(`size-${C.value}`)
334
- ].filter(Boolean)), je = l(() => ({
353
+ ].filter(Boolean)), Je = n(() => ({
335
354
  height: "100%",
336
355
  ...o.tableStyle || {}
337
- })), $e = (e, r) => {
338
- $({ current: e, pageSize: r });
356
+ })), Qe = (e, r) => {
357
+ q({ current: e, pageSize: r });
339
358
  };
340
- function qe(e) {
359
+ function Xe(e) {
341
360
  const r = e.data;
342
361
  return K(r);
343
362
  }
344
- function Je(e, r) {
363
+ function Ye(e, r) {
345
364
  s.value?.ensureIndexVisible(e, r);
346
365
  }
347
- function Qe(e) {
366
+ function Ze(e) {
348
367
  o.onRowClicked?.(e.data, e.event);
349
368
  }
350
- function Xe(e) {
369
+ function eo(e) {
351
370
  o.onScrollEnd?.(e.direction);
352
371
  }
353
- function Ye(e) {
372
+ function oo(e) {
354
373
  return s.value?.refreshCells(e);
355
374
  }
356
- function Ze(e) {
375
+ function to(e) {
357
376
  return s.value?.redrawRows(e);
358
377
  }
359
- const _e = (e) => {
378
+ const ro = (e) => {
360
379
  const r = [
361
- H.value.getRowClass?.(e)
380
+ L.value.getRowClass?.(e)
362
381
  ];
363
382
  if (!e.node.rowPinned) {
364
383
  const a = G(o.rowClassName) ? o.rowClassName(e.data, e.rowIndex) : o.rowClassName;
@@ -366,143 +385,148 @@ const mt = /* @__PURE__ */ oo({
366
385
  }
367
386
  return r.flat().filter(Boolean);
368
387
  };
369
- return z(
388
+ return A(
370
389
  () => o.dataSource,
371
390
  (e) => {
372
- Te(e);
391
+ De(e);
373
392
  },
374
393
  { immediate: !0, deep: !0 }
375
- ), z(
394
+ ), A(
376
395
  () => o.size,
377
396
  (e) => {
378
397
  C.value = e;
379
398
  }
380
- ), z(
381
- () => t(w).loading,
399
+ ), A(
400
+ () => t(y).loading,
382
401
  (e) => {
383
402
  o.onLoadingChange?.(e);
384
403
  }
385
- ), ue({
404
+ ), ce({
386
405
  submit: D,
387
406
  reset: N,
388
407
  refresh: J,
389
- submitWith: q,
390
- setSearchFormValues: Y,
391
- getSearchFormValues: X,
392
- getShowColumns: () => t(f),
408
+ submitWith: _,
409
+ setSearchFormValues: X,
410
+ getSearchFormValues: Q,
411
+ getShowColumns: () => t(w),
393
412
  rowSelection: {
394
- selectedRows: l(() => E.value),
395
- setSelectedRowKeys: We,
396
- clearAll: P
413
+ selectedRows: n(() => E.value),
414
+ setSelectedRowKeys: Le,
415
+ setSelectedRows: je,
416
+ clearAll: z
397
417
  },
398
- scrollToRow: Je,
399
- getDataSource: () => t(w.records),
400
- getPaging: xe,
401
- setPaging: Ie,
402
- getSearchFormSorterItems: Z,
403
- setSearchFormSorterItems: _,
418
+ scrollToRow: Ye,
419
+ getDataSource: () => t(y.records),
420
+ getPaging: Ie,
421
+ setPaging: Te,
422
+ getSearchFormSorterItems: Y,
423
+ setSearchFormSorterItems: Z,
404
424
  resetSearchFormSorterItems: ee,
405
- refreshCells: Ye,
406
- redrawRows: Ze,
407
- _internalGridApi: l(() => s.value)
408
- }), (e, r) => (b(), A("div", {
409
- class: m(Ue.value),
410
- style: V(e.wrapperStyle)
425
+ refreshCells: oo,
426
+ redrawRows: to,
427
+ _internalGridApi: n(() => s.value)
428
+ }), (e, r) => (b(), V("div", {
429
+ class: f(_e.value),
430
+ style: M(e.wrapperStyle)
411
431
  }, [
412
- t(F)(e.dataSource) && e.searchForm !== !1 && t(L).length > 0 ? (b(), A("div", {
432
+ t(B)(e.dataSource) && e.searchForm !== !1 && t(U).length > 0 ? (b(), V("div", {
413
433
  key: 0,
414
- class: m(e.card ? t(k)("search-wrapper") : null),
415
- style: V(e.searchFormWrapperStyle)
434
+ class: f(e.card ? t(k)("search-wrapper") : null),
435
+ style: M(e.searchFormWrapperStyle)
416
436
  }, [
417
- M(t(So).SearchForm, O(e.searchForm || {}, {
437
+ W(t(Co).SearchForm, O(e.searchForm || {}, {
418
438
  ref_key: "formRef",
419
- ref: g,
439
+ ref: S,
420
440
  "custom-reset": "",
421
- "submit-loading": t(j).loading,
441
+ "submit-loading": t($).loading,
422
442
  onSubmit: t(D),
423
443
  onReset: t(N)
424
- }), ao({
444
+ }), so({
425
445
  default: ne(() => [
426
- (b(!0), A(no, null, lo(t(L), (a) => (b(), le(so(a.renderNode), {
446
+ (b(!0), V(io, null, uo(t(U), (a) => (b(), se(co(a.renderNode), {
427
447
  key: a.dataIndex
428
448
  }))), 128))
429
449
  ]),
430
450
  _: 2
431
451
  }, [
432
- W.searchFormExtra ? {
452
+ H.searchFormExtra ? {
433
453
  name: "extra",
434
454
  fn: ne(() => [
435
- se(e.$slots, "searchFormExtra")
455
+ ie(e.$slots, "searchFormExtra")
436
456
  ]),
437
457
  key: "0"
438
458
  } : void 0
439
459
  ]), 1040, ["submit-loading", "onSubmit", "onReset"])
440
- ], 6)) : ae("", !0),
441
- B("div", {
442
- class: m([t(k)("table-wrapper"), e.card ? t(k)("table-wrapper-card") : null]),
443
- style: V(e.tableWrapperStyle)
460
+ ], 6)) : le("", !0),
461
+ F("div", {
462
+ class: f([t(k)("table-wrapper"), e.card ? t(k)("table-wrapper-card") : null]),
463
+ style: M(e.tableWrapperStyle)
444
464
  }, [
445
- B("div", {
446
- class: m(t(u)("header-wrapper"))
465
+ F("div", {
466
+ class: f(t(u)("header-wrapper"))
447
467
  }, [
448
- se(e.$slots, "title", {
468
+ ie(e.$slots, "title", {
449
469
  selectedRows: t(E),
450
- selectedRowKeys: t(Pe),
451
- shownColumns: t(f),
452
- clearAll: P
470
+ selectedRowKeys: t(ze),
471
+ shownColumns: t(w),
472
+ clearAll: z
453
473
  })
454
474
  ], 2),
455
- B("div", {
475
+ F("div", {
456
476
  ref_key: "gridWrapperRef",
457
477
  ref: ve,
458
- class: m(t(u)("grid-wrapper"))
478
+ class: f(t(u)("grid-wrapper"))
459
479
  }, [
460
- M(t(co), O(t(fo)(t(pe), t(H)), {
461
- "get-row-class": _e,
462
- style: je.value,
463
- "row-data": t(w).records,
464
- "column-defs": t(he),
465
- "default-col-def": t(Ce),
466
- "suppress-loading-overlay": "",
467
- "row-selection": Me.value,
468
- "selection-column-def": t(De),
469
- "get-row-id": qe,
470
- theme: t(me),
471
- "tooltip-show-delay": 500,
472
- "enable-browser-tooltips": e.browserTooltips,
473
- "tooltip-interaction": "",
474
- "row-class-rules": e.rowClassRules,
475
- "no-rows-overlay-component": Vo,
476
- "suppress-cell-focus": "",
477
- "dom-layout": e.autoHeight ? "autoHeight" : "normal",
478
- onSortChanged: be,
479
- onGridReady: r[0] || (r[0] = (a) => s.value = a.api),
480
- onRowDataUpdated: Q,
481
- onRowSelected: Oe,
482
- onFirstDataRendered: Ge,
483
- onRowClicked: Qe,
484
- onBodyScrollEnd: Xe
485
- }), null, 16, ["style", "row-data", "column-defs", "default-col-def", "row-selection", "selection-column-def", "theme", "enable-browser-tooltips", "row-class-rules", "dom-layout"]),
486
- io(B("div", {
487
- class: m(t(k)("table-loading-wrapper"))
480
+ W(t(fo), O(
481
+ t(So)(t(fe), t(L), Ue.value),
482
+ {
483
+ "get-row-class": ro,
484
+ style: Je.value,
485
+ "row-data": t(y).records,
486
+ "column-defs": t(Re),
487
+ "default-col-def": t(Ce),
488
+ "suppress-loading-overlay": "",
489
+ "row-selection": Oe.value,
490
+ "selection-column-def": t(Ne),
491
+ "get-row-id": Xe,
492
+ "get-row-height": o.getRowHeight,
493
+ theme: t(pe),
494
+ "tooltip-show-delay": 500,
495
+ "enable-browser-tooltips": e.browserTooltips,
496
+ "tooltip-interaction": "",
497
+ "row-class-rules": e.rowClassRules,
498
+ "no-rows-overlay-component": Go,
499
+ "suppress-cell-focus": "",
500
+ "dom-layout": e.autoHeight ? "autoHeight" : "normal",
501
+ onSortChanged: Fe,
502
+ onGridReady: r[0] || (r[0] = (a) => s.value = a.api),
503
+ onRowDataUpdated: P,
504
+ onRowSelected: Ge,
505
+ onFirstDataRendered: He,
506
+ onRowClicked: Ze,
507
+ onBodyScrollEnd: eo
508
+ }
509
+ ), 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", "dom-layout"]),
510
+ mo(F("div", {
511
+ class: f(t(k)("table-loading-wrapper"))
488
512
  }, [
489
- M(t(go), { delay: 300 })
513
+ W(t(yo), { delay: 300 })
490
514
  ], 2), [
491
- [uo, Le.value]
515
+ [po, qe.value]
492
516
  ])
493
517
  ], 2),
494
- B("div", {
495
- class: m(t(u)("pagination-wrapper"))
518
+ F("div", {
519
+ class: f(t(u)("pagination-wrapper"))
496
520
  }, [
497
- e.pagination !== !1 ? (b(), le(t(wo), O({
521
+ e.pagination !== !1 ? (b(), se(t(ho), O({
498
522
  key: 0,
499
523
  class: t(u)("pagination")
500
- }, t(j).pagination, { onChange: $e }), null, 16, ["class"])) : ae("", !0)
524
+ }, t($).pagination, { onChange: Qe }), null, 16, ["class"])) : le("", !0)
501
525
  ], 2)
502
526
  ], 6)
503
527
  ], 6));
504
528
  }
505
529
  });
506
530
  export {
507
- mt as default
531
+ yt as default
508
532
  };