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