@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.
- package/es/index.mjs +224 -231
- package/es/src/ag-grid/components/row/index.vue.d.ts +6 -0
- package/es/src/ag-grid/components/row/index.vue.mjs +4 -0
- package/es/src/ag-grid/components/row/index.vue2.mjs +14 -0
- package/es/src/ag-grid/editable/form-item.vue.mjs +10 -9
- package/es/src/ag-grid/editable/index.vue.mjs +17 -16
- package/es/src/ag-grid/hooks/use-row-selection.d.ts +1 -1
- package/es/src/ag-grid/hooks/use-row-selection.mjs +81 -68
- package/es/src/ag-grid/index.vue.d.ts +2 -1
- package/es/src/ag-grid/index.vue.mjs +256 -232
- package/es/src/ag-grid/interface.d.ts +40 -3
- package/es/src/ap-action/group/index.vue.mjs +24 -21
- package/es/src/ap-action/item/index.vue2.mjs +28 -20
- package/es/src/index.d.ts +0 -1
- package/es/src/index.mjs +280 -288
- package/es/src/path-map.mjs +0 -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/components/row/index.vue.d.ts +6 -0
- package/lib/src/ag-grid/components/row/index.vue.js +1 -0
- package/lib/src/ag-grid/components/row/index.vue2.js +1 -0
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/hooks/use-row-selection.d.ts +1 -1
- package/lib/src/ag-grid/hooks/use-row-selection.js +1 -1
- package/lib/src/ag-grid/index.vue.d.ts +2 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +40 -3
- package/lib/src/ap-action/group/index.vue.js +1 -1
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/index.d.ts +0 -1
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/theme/index.css +0 -3
- package/theme/index.less +0 -1
- package/es/src/work-order-modal/createWorkOrder.d.ts +0 -3
- package/es/src/work-order-modal/createWorkOrder.mjs +0 -32
- package/es/src/work-order-modal/help-message.vue.d.ts +0 -3
- package/es/src/work-order-modal/help-message.vue.mjs +0 -4
- package/es/src/work-order-modal/help-message.vue2.mjs +0 -36
- package/es/src/work-order-modal/index.d.ts +0 -4
- package/es/src/work-order-modal/index.mjs +0 -8
- package/es/src/work-order-modal/interfaces.d.ts +0 -31
- package/es/src/work-order-modal/interfaces.mjs +0 -9
- package/es/src/work-order-modal/style/css.d.ts +0 -0
- package/es/src/work-order-modal/style/css.js +0 -4
- package/es/src/work-order-modal/style/index.d.ts +0 -0
- package/es/src/work-order-modal/style/index.js +0 -4
- package/es/src/work-order-modal/work-order-modal.vue.d.ts +0 -846
- package/es/src/work-order-modal/work-order-modal.vue.mjs +0 -192
- package/es/src/work-order-modal/work-order-modal.vue2.mjs +0 -4
- package/lib/src/work-order-modal/createWorkOrder.d.ts +0 -3
- package/lib/src/work-order-modal/createWorkOrder.js +0 -1
- package/lib/src/work-order-modal/help-message.vue.d.ts +0 -3
- package/lib/src/work-order-modal/help-message.vue.js +0 -1
- package/lib/src/work-order-modal/help-message.vue2.js +0 -1
- package/lib/src/work-order-modal/index.d.ts +0 -4
- package/lib/src/work-order-modal/index.js +0 -1
- package/lib/src/work-order-modal/interfaces.d.ts +0 -31
- package/lib/src/work-order-modal/interfaces.js +0 -1
- package/lib/src/work-order-modal/style/css.cjs +0 -4
- package/lib/src/work-order-modal/style/css.d.ts +0 -0
- package/lib/src/work-order-modal/style/index.cjs +0 -4
- package/lib/src/work-order-modal/style/index.d.ts +0 -0
- package/lib/src/work-order-modal/work-order-modal.vue.d.ts +0 -846
- package/lib/src/work-order-modal/work-order-modal.vue.js +0 -1
- package/lib/src/work-order-modal/work-order-modal.vue2.js +0 -1
|
@@ -1,32 +1,34 @@
|
|
|
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 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
|
|
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 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
|
|
24
|
-
import { usePinnedRow as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
|
|
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(
|
|
103
|
-
|
|
104
|
-
const o =
|
|
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
|
-
),
|
|
107
|
-
let
|
|
108
|
-
const
|
|
109
|
-
|
|
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
|
|
118
|
+
const be = {
|
|
116
119
|
asc: "ascend",
|
|
117
120
|
desc: "descend"
|
|
118
121
|
};
|
|
119
|
-
function
|
|
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
|
|
123
|
-
if (
|
|
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
|
|
130
|
-
|
|
131
|
-
column:
|
|
132
|
-
field:
|
|
133
|
-
order:
|
|
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 =
|
|
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)),
|
|
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
|
-
},
|
|
147
|
-
formRef:
|
|
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:
|
|
151
|
-
tableProps:
|
|
152
|
-
handleTableChangeOptional:
|
|
153
|
-
submitWith:
|
|
153
|
+
data: y,
|
|
154
|
+
tableProps: $,
|
|
155
|
+
handleTableChangeOptional: q,
|
|
156
|
+
submitWith: _,
|
|
154
157
|
refresh: J,
|
|
155
|
-
getPaging:
|
|
156
|
-
setPaging:
|
|
157
|
-
setDataSource:
|
|
158
|
-
} =
|
|
158
|
+
getPaging: Ie,
|
|
159
|
+
setPaging: Te,
|
|
160
|
+
setDataSource: De
|
|
161
|
+
} = vo({
|
|
159
162
|
async request(e) {
|
|
160
|
-
if (
|
|
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(
|
|
180
|
+
manual: t(xe),
|
|
178
181
|
formatParams: o.beforeSearchSubmit,
|
|
179
182
|
pagination: o.pagination,
|
|
180
183
|
sortFields: Be,
|
|
181
|
-
onClickReset:
|
|
182
|
-
}),
|
|
183
|
-
const e = o.rowSelection ||
|
|
184
|
+
onClickReset: ke
|
|
185
|
+
}), h = n(() => {
|
|
186
|
+
const e = o.rowSelection || we.value?.rowSelection;
|
|
184
187
|
if (e)
|
|
185
|
-
return e === !0 ?
|
|
186
|
-
...
|
|
188
|
+
return e === !0 ? de : {
|
|
189
|
+
...de,
|
|
187
190
|
...e
|
|
188
191
|
};
|
|
189
|
-
}),
|
|
190
|
-
() =>
|
|
192
|
+
}), Ne = Vo(o, w), Ee = n(
|
|
193
|
+
() => B(o.dataSource) ? y.records : o.dataSource
|
|
191
194
|
), {
|
|
192
|
-
select:
|
|
193
|
-
unSelect:
|
|
195
|
+
select: Ke,
|
|
196
|
+
unSelect: Pe,
|
|
194
197
|
selectedRows: E,
|
|
195
|
-
selectedRowKeys:
|
|
196
|
-
clearAll:
|
|
197
|
-
selectMultiByKeys:
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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
|
-
}),
|
|
206
|
+
}), We = {
|
|
203
207
|
checkbox: "multiRow",
|
|
204
208
|
radio: "singleRow"
|
|
205
|
-
},
|
|
206
|
-
const e =
|
|
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:
|
|
212
|
-
isRowSelectable: (
|
|
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
|
|
223
|
+
const P = ({
|
|
220
224
|
api: e = s.value
|
|
221
225
|
}) => {
|
|
222
|
-
if (o.onUpdate?.(), !
|
|
226
|
+
if (o.onUpdate?.(), !h.value)
|
|
223
227
|
return;
|
|
224
228
|
const r = E.value;
|
|
225
229
|
if (!r.length) {
|
|
226
230
|
setTimeout(() => {
|
|
227
|
-
|
|
231
|
+
g = !0;
|
|
228
232
|
}, 0);
|
|
229
233
|
return;
|
|
230
234
|
}
|
|
231
|
-
|
|
235
|
+
g = !1;
|
|
232
236
|
const a = [];
|
|
233
|
-
e.forEachNode((
|
|
234
|
-
const
|
|
235
|
-
r.find((
|
|
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
|
-
|
|
241
|
+
g = !0;
|
|
238
242
|
}, 0);
|
|
239
|
-
},
|
|
240
|
-
|
|
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
|
-
},
|
|
247
|
-
|
|
248
|
-
},
|
|
249
|
-
|
|
250
|
+
}, He = () => {
|
|
251
|
+
g = !0;
|
|
252
|
+
}, z = () => {
|
|
253
|
+
Ae(), s.value?.deselectAll();
|
|
250
254
|
};
|
|
251
|
-
function
|
|
252
|
-
|
|
253
|
-
|
|
255
|
+
function Le(e) {
|
|
256
|
+
Ve(e), ae(() => {
|
|
257
|
+
P({});
|
|
254
258
|
});
|
|
255
259
|
}
|
|
256
|
-
|
|
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
|
|
277
|
+
return S.value?.apForm?.[r]?.(!0);
|
|
259
278
|
}
|
|
260
|
-
function
|
|
261
|
-
|
|
279
|
+
function X(e) {
|
|
280
|
+
S.value?.apForm?.setFieldsValue?.(e);
|
|
262
281
|
}
|
|
263
|
-
function
|
|
264
|
-
return
|
|
282
|
+
function Y() {
|
|
283
|
+
return S.value?.getSorterItems() || [];
|
|
265
284
|
}
|
|
266
|
-
function
|
|
267
|
-
|
|
285
|
+
function Z(e) {
|
|
286
|
+
S.value?.setSorterItems(e);
|
|
268
287
|
}
|
|
269
288
|
function ee() {
|
|
270
|
-
|
|
289
|
+
S.value?.resetSorterItems();
|
|
271
290
|
}
|
|
272
291
|
function oe(e) {
|
|
273
292
|
return e && String(e);
|
|
274
293
|
}
|
|
275
|
-
function
|
|
294
|
+
function $e(e) {
|
|
276
295
|
const r = s.value;
|
|
277
296
|
if (!r)
|
|
278
297
|
return;
|
|
279
|
-
const a = r.getColumnState() || [],
|
|
280
|
-
if (!
|
|
281
|
-
return
|
|
282
|
-
const
|
|
283
|
-
...
|
|
284
|
-
hide:
|
|
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
|
-
(
|
|
305
|
+
(ao) => oe(ao.key) === l.colId
|
|
287
306
|
);
|
|
288
307
|
return re && (te.pinned = re.fixed || null), te;
|
|
289
|
-
}),
|
|
290
|
-
e.map((
|
|
291
|
-
),
|
|
292
|
-
(
|
|
293
|
-
),
|
|
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
|
|
296
|
-
|
|
314
|
+
for (const l of R)
|
|
315
|
+
d.has(l.colId) ? p.push(m[c++]) : p.push(l);
|
|
297
316
|
r.applyColumnState({
|
|
298
|
-
state:
|
|
317
|
+
state: p,
|
|
299
318
|
applyOrder: !0
|
|
300
319
|
});
|
|
301
320
|
}
|
|
302
|
-
|
|
303
|
-
columns:
|
|
304
|
-
columnsBackup:
|
|
305
|
-
size:
|
|
321
|
+
Bo({
|
|
322
|
+
columns: n(() => w.value),
|
|
323
|
+
columnsBackup: n(() => j.value),
|
|
324
|
+
size: n(() => xo[C.value]),
|
|
306
325
|
updateColumns(e) {
|
|
307
|
-
|
|
326
|
+
w.value = e, o.onShownColumnsChange?.(e), $e(e);
|
|
308
327
|
},
|
|
309
328
|
updateSize(e) {
|
|
310
|
-
C.value =
|
|
329
|
+
C.value = ko[e];
|
|
311
330
|
},
|
|
312
|
-
renderConfig:
|
|
313
|
-
className:
|
|
314
|
-
color:
|
|
331
|
+
renderConfig: n(() => ({
|
|
332
|
+
className: me("table-header", "title"),
|
|
333
|
+
color: Se.value.colorTextTertiary
|
|
315
334
|
})),
|
|
316
|
-
dataSource:
|
|
317
|
-
getSearchFormValues:
|
|
318
|
-
setSearchFormValues:
|
|
335
|
+
dataSource: n(() => t(y).records),
|
|
336
|
+
getSearchFormValues: Q,
|
|
337
|
+
setSearchFormValues: X,
|
|
319
338
|
submit: D,
|
|
320
|
-
submitWith:
|
|
339
|
+
submitWith: _,
|
|
321
340
|
reset: N,
|
|
322
341
|
refresh: J,
|
|
323
|
-
getSearchFormSorterItems:
|
|
324
|
-
setSearchFormSorterItems:
|
|
342
|
+
getSearchFormSorterItems: Y,
|
|
343
|
+
setSearchFormSorterItems: Z,
|
|
325
344
|
resetSearchFormSorterItems: ee
|
|
326
345
|
});
|
|
327
|
-
const
|
|
328
|
-
() =>
|
|
329
|
-
),
|
|
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)),
|
|
353
|
+
].filter(Boolean)), Je = n(() => ({
|
|
335
354
|
height: "100%",
|
|
336
355
|
...o.tableStyle || {}
|
|
337
|
-
})),
|
|
338
|
-
|
|
356
|
+
})), Qe = (e, r) => {
|
|
357
|
+
q({ current: e, pageSize: r });
|
|
339
358
|
};
|
|
340
|
-
function
|
|
359
|
+
function Xe(e) {
|
|
341
360
|
const r = e.data;
|
|
342
361
|
return K(r);
|
|
343
362
|
}
|
|
344
|
-
function
|
|
363
|
+
function Ye(e, r) {
|
|
345
364
|
s.value?.ensureIndexVisible(e, r);
|
|
346
365
|
}
|
|
347
|
-
function
|
|
366
|
+
function Ze(e) {
|
|
348
367
|
o.onRowClicked?.(e.data, e.event);
|
|
349
368
|
}
|
|
350
|
-
function
|
|
369
|
+
function eo(e) {
|
|
351
370
|
o.onScrollEnd?.(e.direction);
|
|
352
371
|
}
|
|
353
|
-
function
|
|
372
|
+
function oo(e) {
|
|
354
373
|
return s.value?.refreshCells(e);
|
|
355
374
|
}
|
|
356
|
-
function
|
|
375
|
+
function to(e) {
|
|
357
376
|
return s.value?.redrawRows(e);
|
|
358
377
|
}
|
|
359
|
-
const
|
|
378
|
+
const ro = (e) => {
|
|
360
379
|
const r = [
|
|
361
|
-
|
|
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
|
|
388
|
+
return A(
|
|
370
389
|
() => o.dataSource,
|
|
371
390
|
(e) => {
|
|
372
|
-
|
|
391
|
+
De(e);
|
|
373
392
|
},
|
|
374
393
|
{ immediate: !0, deep: !0 }
|
|
375
|
-
),
|
|
394
|
+
), A(
|
|
376
395
|
() => o.size,
|
|
377
396
|
(e) => {
|
|
378
397
|
C.value = e;
|
|
379
398
|
}
|
|
380
|
-
),
|
|
381
|
-
() => t(
|
|
399
|
+
), A(
|
|
400
|
+
() => t(y).loading,
|
|
382
401
|
(e) => {
|
|
383
402
|
o.onLoadingChange?.(e);
|
|
384
403
|
}
|
|
385
|
-
),
|
|
404
|
+
), ce({
|
|
386
405
|
submit: D,
|
|
387
406
|
reset: N,
|
|
388
407
|
refresh: J,
|
|
389
|
-
submitWith:
|
|
390
|
-
setSearchFormValues:
|
|
391
|
-
getSearchFormValues:
|
|
392
|
-
getShowColumns: () => t(
|
|
408
|
+
submitWith: _,
|
|
409
|
+
setSearchFormValues: X,
|
|
410
|
+
getSearchFormValues: Q,
|
|
411
|
+
getShowColumns: () => t(w),
|
|
393
412
|
rowSelection: {
|
|
394
|
-
selectedRows:
|
|
395
|
-
setSelectedRowKeys:
|
|
396
|
-
|
|
413
|
+
selectedRows: n(() => E.value),
|
|
414
|
+
setSelectedRowKeys: Le,
|
|
415
|
+
setSelectedRows: je,
|
|
416
|
+
clearAll: z
|
|
397
417
|
},
|
|
398
|
-
scrollToRow:
|
|
399
|
-
getDataSource: () => t(
|
|
400
|
-
getPaging:
|
|
401
|
-
setPaging:
|
|
402
|
-
getSearchFormSorterItems:
|
|
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:
|
|
406
|
-
redrawRows:
|
|
407
|
-
_internalGridApi:
|
|
408
|
-
}), (e, r) => (b(),
|
|
409
|
-
class:
|
|
410
|
-
style:
|
|
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(
|
|
432
|
+
t(B)(e.dataSource) && e.searchForm !== !1 && t(U).length > 0 ? (b(), V("div", {
|
|
413
433
|
key: 0,
|
|
414
|
-
class:
|
|
415
|
-
style:
|
|
434
|
+
class: f(e.card ? t(k)("search-wrapper") : null),
|
|
435
|
+
style: M(e.searchFormWrapperStyle)
|
|
416
436
|
}, [
|
|
417
|
-
|
|
437
|
+
W(t(Co).SearchForm, O(e.searchForm || {}, {
|
|
418
438
|
ref_key: "formRef",
|
|
419
|
-
ref:
|
|
439
|
+
ref: S,
|
|
420
440
|
"custom-reset": "",
|
|
421
|
-
"submit-loading": t(
|
|
441
|
+
"submit-loading": t($).loading,
|
|
422
442
|
onSubmit: t(D),
|
|
423
443
|
onReset: t(N)
|
|
424
|
-
}),
|
|
444
|
+
}), so({
|
|
425
445
|
default: ne(() => [
|
|
426
|
-
(b(!0),
|
|
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
|
-
|
|
452
|
+
H.searchFormExtra ? {
|
|
433
453
|
name: "extra",
|
|
434
454
|
fn: ne(() => [
|
|
435
|
-
|
|
455
|
+
ie(e.$slots, "searchFormExtra")
|
|
436
456
|
]),
|
|
437
457
|
key: "0"
|
|
438
458
|
} : void 0
|
|
439
459
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
440
|
-
], 6)) :
|
|
441
|
-
|
|
442
|
-
class:
|
|
443
|
-
style:
|
|
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
|
-
|
|
446
|
-
class:
|
|
465
|
+
F("div", {
|
|
466
|
+
class: f(t(u)("header-wrapper"))
|
|
447
467
|
}, [
|
|
448
|
-
|
|
468
|
+
ie(e.$slots, "title", {
|
|
449
469
|
selectedRows: t(E),
|
|
450
|
-
selectedRowKeys: t(
|
|
451
|
-
shownColumns: t(
|
|
452
|
-
clearAll:
|
|
470
|
+
selectedRowKeys: t(ze),
|
|
471
|
+
shownColumns: t(w),
|
|
472
|
+
clearAll: z
|
|
453
473
|
})
|
|
454
474
|
], 2),
|
|
455
|
-
|
|
475
|
+
F("div", {
|
|
456
476
|
ref_key: "gridWrapperRef",
|
|
457
477
|
ref: ve,
|
|
458
|
-
class:
|
|
478
|
+
class: f(t(u)("grid-wrapper"))
|
|
459
479
|
}, [
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
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
|
-
|
|
513
|
+
W(t(yo), { delay: 300 })
|
|
490
514
|
], 2), [
|
|
491
|
-
[
|
|
515
|
+
[po, qe.value]
|
|
492
516
|
])
|
|
493
517
|
], 2),
|
|
494
|
-
|
|
495
|
-
class:
|
|
518
|
+
F("div", {
|
|
519
|
+
class: f(t(u)("pagination-wrapper"))
|
|
496
520
|
}, [
|
|
497
|
-
e.pagination !== !1 ? (b(),
|
|
521
|
+
e.pagination !== !1 ? (b(), se(t(ho), O({
|
|
498
522
|
key: 0,
|
|
499
523
|
class: t(u)("pagination")
|
|
500
|
-
}, t(
|
|
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
|
-
|
|
531
|
+
yt as default
|
|
508
532
|
};
|