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