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