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