@aplus-frontend/ui 7.17.3 → 7.18.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-editable-form-item-api.mjs +1 -1
- package/es/src/ag-grid/index.vue.mjs +183 -180
- package/es/src/ap-field/cascader/index.vue.mjs +9 -8
- package/es/src/ap-field/cascader/read.vue2.mjs +3 -2
- package/es/src/ap-field/checkbox/index.vue.mjs +12 -11
- package/es/src/ap-field/checkbox/read.vue2.mjs +5 -4
- package/es/src/ap-field/date/index.vue.mjs +83 -73
- package/es/src/ap-field/date/read.vue2.mjs +1 -0
- package/es/src/ap-field/date-range/index.vue.mjs +80 -70
- package/es/src/ap-field/date-range/read.vue2.mjs +3 -2
- package/es/src/ap-field/hooks/use-read-mode-render.d.ts +9 -0
- package/es/src/ap-field/hooks/use-read-mode-render.mjs +6 -0
- package/es/src/ap-field/interface.d.ts +8 -0
- package/es/src/ap-field/number/index.vue.mjs +57 -46
- package/es/src/ap-field/number/read.vue2.mjs +1 -0
- package/es/src/ap-field/radio/index.vue.mjs +17 -16
- package/es/src/ap-field/radio/read.vue2.mjs +1 -0
- package/es/src/ap-field/rate/index.vue.mjs +6 -5
- package/es/src/ap-field/second/index.vue.mjs +35 -20
- package/es/src/ap-field/second/read.vue2.mjs +1 -0
- package/es/src/ap-field/segmented/index.vue.mjs +15 -14
- package/es/src/ap-field/select/index.vue.mjs +53 -52
- package/es/src/ap-field/select/read.vue2.mjs +1 -0
- package/es/src/ap-field/slider/index.vue.mjs +11 -10
- package/es/src/ap-field/switch/index.vue.mjs +20 -19
- package/es/src/ap-field/switch/read.vue2.mjs +5 -4
- package/es/src/ap-field/text/index.vue2.mjs +35 -31
- package/es/src/ap-field/text/password.vue.d.ts +4 -4
- package/es/src/ap-field/text/password.vue.mjs +57 -48
- package/es/src/ap-field/text/read-password.vue2.mjs +6 -5
- package/es/src/ap-field/text/read.vue2.mjs +3 -2
- package/es/src/ap-field/text-area/index.vue.mjs +46 -36
- package/es/src/ap-field/text-area/read.vue2.mjs +1 -0
- package/es/src/ap-field/tree-select/index.vue.mjs +9 -8
- package/es/src/ap-field/tree-select/read.vue2.mjs +1 -0
- package/es/src/ap-form/items/cascader/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/date/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/date-range/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/number/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/select/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/switch/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/text/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/text/password.vue.d.ts +3 -1
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +3 -1
- package/es/src/ap-table/constants.d.ts +11 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +109 -98
- package/es/src/business/batch-input-group/index.vue.d.ts +2 -1
- package/es/src/business/batch-input-group/index.vue.mjs +11 -10
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-field/cascader/index.vue.js +1 -1
- package/lib/src/ap-field/cascader/read.vue2.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/hooks/use-read-mode-render.d.ts +9 -0
- package/lib/src/ap-field/hooks/use-read-mode-render.js +1 -0
- package/lib/src/ap-field/interface.d.ts +8 -0
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/number/read.vue2.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/radio/read.vue2.js +1 -1
- package/lib/src/ap-field/rate/index.vue.js +1 -1
- package/lib/src/ap-field/second/index.vue.js +1 -1
- package/lib/src/ap-field/second/read.vue2.js +1 -1
- package/lib/src/ap-field/segmented/index.vue.js +1 -1
- 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/slider/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/switch/read.vue2.js +1 -1
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.d.ts +4 -4
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text/read-password.vue2.js +1 -1
- package/lib/src/ap-field/text/read.vue2.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/read.vue2.js +1 -1
- 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/items/cascader/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/date/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/switch/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/text/password.vue.d.ts +3 -1
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +3 -1
- package/lib/src/ap-table/constants.d.ts +11 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +2 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { AG_GRID_LOCALE_EN as
|
|
3
|
-
import { Pagination as
|
|
4
|
-
import { useToken as
|
|
5
|
-
import { ModuleRegistry as
|
|
6
|
-
import { AgGridVue as
|
|
7
|
-
import { isUndefined as B, isFunction as
|
|
8
|
-
import { DEFAULT_ROW_SELECTION_CONFIG as fe, sizeReverseMap as
|
|
9
|
-
import { useProvideApTable as
|
|
10
|
-
import { useTablePaging as
|
|
11
|
-
import { recursionApColumns as
|
|
1
|
+
import { defineComponent as ho, useSlots as vo, ref as y, toRef as x, computed as n, unref as r, nextTick as A, watch as W, createElementBlock as H, openBlock as h, normalizeStyle as U, normalizeClass as v, createCommentVNode as ce, createElementVNode as T, createVNode as Ro, mergeProps as j, createSlots as bo, withCtx as me, Fragment as Mo, renderList as xo, createBlock as _, resolveDynamicComponent as Bo, renderSlot as pe } from "vue";
|
|
2
|
+
import { AG_GRID_LOCALE_EN as Fo, AG_GRID_LOCALE_CN as Io } from "@ag-grid-community/locale";
|
|
3
|
+
import { Pagination as ko } from "@aplus-frontend/antdv";
|
|
4
|
+
import { useToken as Ao } from "@aplus-frontend/antdv/es/theme/internal";
|
|
5
|
+
import { ModuleRegistry as To, ValidationModule as Eo, ColumnAutoSizeModule as No, PinnedRowModule as Do, RowAutoHeightModule as zo, RowStyleModule as Oo, CellSpanModule as Po, CellStyleModule as Ko, TooltipModule as Go, RowSelectionModule as Vo, LocaleModule as Lo, ValueCacheModule as Wo, GridStateModule as Ho, ColumnApiModule as Uo, RowApiModule as jo, CellApiModule as _o, RenderApiModule as $o, EventApiModule as qo, ScrollApiModule as Jo, ClientSideRowModelApiModule as Qo, ClientSideRowModelModule as Xo } from "ag-grid-community";
|
|
6
|
+
import { AgGridVue as Yo } from "ag-grid-vue3";
|
|
7
|
+
import { isUndefined as B, isFunction as E } from "lodash-unified";
|
|
8
|
+
import { DEFAULT_ROW_SELECTION_CONFIG as fe, sizeReverseMap as Zo, sizeMap as et } from "../ap-grid/constants.mjs";
|
|
9
|
+
import { useProvideApTable as ot } from "../ap-table/context.mjs";
|
|
10
|
+
import { useTablePaging as tt } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
11
|
+
import { recursionApColumns as rt } from "../ap-table/utils.mjs";
|
|
12
12
|
import "../config-provider/index.mjs";
|
|
13
13
|
import "../utils/index.mjs";
|
|
14
|
-
import { retryUntil as
|
|
15
|
-
import { getValidVNodeList as
|
|
16
|
-
import { ApForm as
|
|
14
|
+
import { retryUntil as lt } from "../utils/retry.mjs";
|
|
15
|
+
import { getValidVNodeList as at } from "../utils/slot.mjs";
|
|
16
|
+
import { ApForm as nt } from "../ap-form/index.mjs";
|
|
17
17
|
import "./components/empty/index.vue.mjs";
|
|
18
18
|
import "./components/loading/index.vue.mjs";
|
|
19
19
|
import "./components/row/index.vue.mjs";
|
|
20
|
-
import { useProvideSorter as
|
|
21
|
-
import { useColumns as
|
|
22
|
-
import { useColumnsDef as
|
|
23
|
-
import { usePinnedRow as
|
|
24
|
-
import
|
|
25
|
-
import { useSearchForm as
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import { useTheme as
|
|
30
|
-
import { mergeProps as
|
|
31
|
-
import { useNamespace as
|
|
32
|
-
import { useLocale as
|
|
33
|
-
import { useGlobalConfig as
|
|
34
|
-
import { isDef as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
const
|
|
20
|
+
import { useProvideSorter as st, useProvideExpandable as it } from "./context.mjs";
|
|
21
|
+
import { useColumns as ut } from "./hooks/use-columns.mjs";
|
|
22
|
+
import { useColumnsDef as dt } from "./hooks/use-columns-def.mjs";
|
|
23
|
+
import { usePinnedRow as ct } from "./hooks/use-pinned-row.mjs";
|
|
24
|
+
import mt from "./hooks/use-row-selection.mjs";
|
|
25
|
+
import { useSearchForm as pt } from "./hooks/use-search-form.mjs";
|
|
26
|
+
import ft from "./hooks/use-selection-col-def.mjs";
|
|
27
|
+
import gt from "./hooks/use-virtual-config.mjs";
|
|
28
|
+
import wt from "./style/index.mjs";
|
|
29
|
+
import { useTheme as St } from "./theme.mjs";
|
|
30
|
+
import { mergeProps as Ct } from "./utils.mjs";
|
|
31
|
+
import { useNamespace as yt } from "../config-provider/hooks/use-namespace.mjs";
|
|
32
|
+
import { useLocale as ht } from "../config-provider/hooks/use-locale.mjs";
|
|
33
|
+
import { useGlobalConfig as vt } from "../config-provider/hooks/use-global-config.mjs";
|
|
34
|
+
import { isDef as Rt } from "../utils/is.mjs";
|
|
35
|
+
import bt from "./components/row/index.vue2.mjs";
|
|
36
|
+
import Mt from "./components/loading/index.vue2.mjs";
|
|
37
|
+
import xt from "./components/empty/index.vue2.mjs";
|
|
38
|
+
const ur = /* @__PURE__ */ ho({
|
|
39
39
|
name: "AgGrid",
|
|
40
40
|
__name: "index",
|
|
41
41
|
props: {
|
|
@@ -117,11 +117,10 @@ const ir = /* @__PURE__ */ yo({
|
|
|
117
117
|
},
|
|
118
118
|
setup(ge, { expose: we }) {
|
|
119
119
|
const Se = {
|
|
120
|
-
"zh-cn":
|
|
121
|
-
en:
|
|
120
|
+
"zh-cn": Io,
|
|
121
|
+
en: Fo
|
|
122
122
|
};
|
|
123
|
-
|
|
124
|
-
To,
|
|
123
|
+
To.registerModules([
|
|
125
124
|
Eo,
|
|
126
125
|
No,
|
|
127
126
|
Do,
|
|
@@ -140,47 +139,48 @@ const ir = /* @__PURE__ */ yo({
|
|
|
140
139
|
$o,
|
|
141
140
|
qo,
|
|
142
141
|
Jo,
|
|
143
|
-
Qo
|
|
142
|
+
Qo,
|
|
143
|
+
Xo
|
|
144
144
|
]);
|
|
145
|
-
const o = ge,
|
|
145
|
+
const o = ge, N = vo(), { e: D, b: d, be: Ce } = yt("ag-grid"), { lang: $ } = ht(), ye = wt("ag-grid"), R = y(o.size), he = St(
|
|
146
146
|
R,
|
|
147
147
|
x(o, "rowHeight"),
|
|
148
148
|
x(o, "theme")
|
|
149
|
-
), ve =
|
|
149
|
+
), ve = gt(x(o, "virtual")), { rowPinnedGridConfig: q, getRowPinnedCellClass: Re } = ct(
|
|
150
150
|
x(o, "summary")
|
|
151
|
-
), be =
|
|
151
|
+
), be = vt("apGrid"), s = y(), [, Me] = Ao();
|
|
152
152
|
let b = !!o.dataSource;
|
|
153
|
-
const
|
|
153
|
+
const J = pt(o), {
|
|
154
154
|
shownColumns: w,
|
|
155
|
-
columns:
|
|
155
|
+
columns: Q,
|
|
156
156
|
columnKeys: xe,
|
|
157
157
|
getTargetColumnByKey: Be,
|
|
158
158
|
defaultSortOrder: F
|
|
159
|
-
} =
|
|
160
|
-
|
|
159
|
+
} = ut(o), { defaultColDef: Fe, columnDefs: Ie, gridWrapperRef: ke } = dt(
|
|
160
|
+
Q,
|
|
161
161
|
o,
|
|
162
162
|
Re,
|
|
163
|
-
|
|
163
|
+
N.headerCell
|
|
164
164
|
), Ae = {
|
|
165
165
|
asc: "ascend",
|
|
166
166
|
desc: "descend"
|
|
167
|
-
},
|
|
167
|
+
}, X = {
|
|
168
168
|
ascend: "asc",
|
|
169
169
|
descend: "desc"
|
|
170
170
|
};
|
|
171
171
|
function Te() {
|
|
172
172
|
const e = F.value;
|
|
173
173
|
return e ? {
|
|
174
|
-
[e.colKey]:
|
|
174
|
+
[e.colKey]: X[e.order]
|
|
175
175
|
} : {};
|
|
176
176
|
}
|
|
177
177
|
function Ee() {
|
|
178
|
-
const e =
|
|
178
|
+
const e = Y.value, t = F.value;
|
|
179
179
|
if (t && e.includes(t.field))
|
|
180
180
|
return t;
|
|
181
181
|
}
|
|
182
182
|
const I = y(Te());
|
|
183
|
-
|
|
183
|
+
st({
|
|
184
184
|
sorter: I,
|
|
185
185
|
setSorter(e) {
|
|
186
186
|
I.value = e;
|
|
@@ -197,13 +197,13 @@ const ir = /* @__PURE__ */ yo({
|
|
|
197
197
|
if (!l)
|
|
198
198
|
return;
|
|
199
199
|
const i = l.getColDef(), f = l.getSort(), g = Be(i.colId);
|
|
200
|
-
|
|
200
|
+
ee(void 0, void 0, {
|
|
201
201
|
column: i,
|
|
202
202
|
field: g?.field ?? i.field ?? i.colId,
|
|
203
203
|
order: f ? Ae[f] : null
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
-
const
|
|
206
|
+
const Y = n(() => rt(r(w), (e) => {
|
|
207
207
|
if (e.sorter === !0)
|
|
208
208
|
return e.field ?? e.dataIndex ?? e.key;
|
|
209
209
|
}).filter(Boolean)), De = () => {
|
|
@@ -213,30 +213,31 @@ const ir = /* @__PURE__ */ yo({
|
|
|
213
213
|
return;
|
|
214
214
|
const t = e.getColumnState()?.map((l) => ({ ...l, sort: null }));
|
|
215
215
|
e.applyColumnState({ state: t });
|
|
216
|
-
},
|
|
217
|
-
|
|
216
|
+
}, z = y({});
|
|
217
|
+
it({ expandable: z });
|
|
218
218
|
function ze(e) {
|
|
219
219
|
const t = e.columnGroup;
|
|
220
|
-
t && (
|
|
221
|
-
...
|
|
220
|
+
t && (z.value = {
|
|
221
|
+
...z.value,
|
|
222
222
|
[t.getGroupId()]: t.isExpanded()
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
|
-
const
|
|
225
|
+
const O = y(!0), Oe = n(() => Rt(o.manual) ? o.manual : at(N.searchFormExtra?.() || []).some((t) => t.type?.name === "ApView")), {
|
|
226
226
|
formRef: S,
|
|
227
|
-
submit:
|
|
228
|
-
reset:
|
|
227
|
+
submit: P,
|
|
228
|
+
reset: K,
|
|
229
229
|
data: m,
|
|
230
|
-
tableProps:
|
|
231
|
-
handleTableChangeOptional:
|
|
232
|
-
submitWith:
|
|
233
|
-
refresh:
|
|
230
|
+
tableProps: Z,
|
|
231
|
+
handleTableChangeOptional: ee,
|
|
232
|
+
submitWith: oe,
|
|
233
|
+
refresh: te,
|
|
234
234
|
getPaging: Pe,
|
|
235
235
|
setPaging: Ke,
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
setDataSource: Ge,
|
|
237
|
+
getLastParams: Ve
|
|
238
|
+
} = tt({
|
|
238
239
|
async request(e) {
|
|
239
|
-
if (b = !1, C.value && !C.value.preserveSelectedRowKeys && B(o.dataSource) && !
|
|
240
|
+
if (b = !1, C.value && !C.value.preserveSelectedRowKeys && B(o.dataSource) && !O.value && L(), O.value && (O.value = !1), !B(o.dataSource)) {
|
|
240
241
|
const l = e.pageSize * (e.current - 1);
|
|
241
242
|
return {
|
|
242
243
|
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(l, l + e.pageSize)) || [],
|
|
@@ -256,7 +257,7 @@ const ir = /* @__PURE__ */ yo({
|
|
|
256
257
|
manual: r(Oe),
|
|
257
258
|
formatParams: o.beforeSearchSubmit,
|
|
258
259
|
pagination: o.pagination,
|
|
259
|
-
sortFields:
|
|
260
|
+
sortFields: Y,
|
|
260
261
|
onClickReset: De,
|
|
261
262
|
defaultSortOrder: Ee()
|
|
262
263
|
}), C = n(() => {
|
|
@@ -266,37 +267,37 @@ const ir = /* @__PURE__ */ yo({
|
|
|
266
267
|
...fe,
|
|
267
268
|
...e
|
|
268
269
|
};
|
|
269
|
-
}),
|
|
270
|
+
}), Le = ft(o, w), We = n(
|
|
270
271
|
() => B(o.dataSource) ? m.records : o.dataSource
|
|
271
272
|
), {
|
|
272
|
-
select:
|
|
273
|
-
unSelect:
|
|
273
|
+
select: He,
|
|
274
|
+
unSelect: Ue,
|
|
274
275
|
selectedRows: G,
|
|
275
|
-
selectedRowKeys:
|
|
276
|
-
clearAll:
|
|
277
|
-
selectMultiByKeys:
|
|
278
|
-
selectMulti:
|
|
279
|
-
unSelectMulti:
|
|
280
|
-
} =
|
|
276
|
+
selectedRowKeys: je,
|
|
277
|
+
clearAll: _e,
|
|
278
|
+
selectMultiByKeys: $e,
|
|
279
|
+
selectMulti: qe,
|
|
280
|
+
unSelectMulti: Je
|
|
281
|
+
} = mt({
|
|
281
282
|
...C.value,
|
|
282
|
-
dataSource:
|
|
283
|
+
dataSource: We,
|
|
283
284
|
rowKey: o.rowKey
|
|
284
|
-
}),
|
|
285
|
+
}), Qe = {
|
|
285
286
|
checkbox: "multiRow",
|
|
286
287
|
radio: "singleRow"
|
|
287
|
-
},
|
|
288
|
+
}, Xe = n(() => {
|
|
288
289
|
const e = C.value;
|
|
289
290
|
if (!e)
|
|
290
291
|
return;
|
|
291
292
|
const { type: t = "checkbox", disabled: l } = e;
|
|
292
293
|
return {
|
|
293
|
-
mode:
|
|
294
|
+
mode: Qe[t],
|
|
294
295
|
isRowSelectable: (u) => l ? !l(u.data) : !0,
|
|
295
296
|
hideDisabledCheckboxes: e.hideDisabled ?? !1
|
|
296
297
|
};
|
|
297
298
|
});
|
|
298
299
|
function V(e) {
|
|
299
|
-
return
|
|
300
|
+
return E(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
|
|
300
301
|
}
|
|
301
302
|
const k = ({
|
|
302
303
|
api: e = s.value
|
|
@@ -312,50 +313,50 @@ const ir = /* @__PURE__ */ yo({
|
|
|
312
313
|
}), e.setNodesSelected({ nodes: l, newValue: !0 }), setTimeout(() => {
|
|
313
314
|
b = !0;
|
|
314
315
|
}, 0);
|
|
315
|
-
},
|
|
316
|
-
b && (e.node.isSelected() ?
|
|
316
|
+
}, Ye = (e) => {
|
|
317
|
+
b && (e.node.isSelected() ? He(e.data) : Ue(e.data), E(C.value?.tooltip) && e.api.refreshCells({
|
|
317
318
|
rowNodes: [e.node],
|
|
318
319
|
// todo: 取消硬编码
|
|
319
320
|
columns: ["ag-Grid-SelectionColumn"],
|
|
320
321
|
force: !0
|
|
321
322
|
}));
|
|
322
|
-
},
|
|
323
|
+
}, Ze = () => {
|
|
323
324
|
b = !0;
|
|
324
325
|
const e = s.value;
|
|
325
326
|
if (!e || !F.value)
|
|
326
327
|
return;
|
|
327
328
|
const t = e.getColumnState(), { colKey: l, order: u } = F.value, p = t.map((i) => ({
|
|
328
329
|
...i,
|
|
329
|
-
sort: i.colId === l ?
|
|
330
|
+
sort: i.colId === l ? X[u] : null
|
|
330
331
|
}));
|
|
331
332
|
e.applyColumnState({
|
|
332
333
|
state: p
|
|
333
334
|
});
|
|
334
335
|
}, L = () => {
|
|
335
|
-
|
|
336
|
+
_e(), s.value?.deselectAll();
|
|
336
337
|
};
|
|
337
|
-
function
|
|
338
|
-
|
|
338
|
+
function eo(e) {
|
|
339
|
+
$e(e), A(() => {
|
|
339
340
|
k({});
|
|
340
341
|
});
|
|
341
342
|
}
|
|
342
|
-
const
|
|
343
|
+
const oo = n(() => {
|
|
343
344
|
const e = o.customRow;
|
|
344
345
|
return e ? {
|
|
345
346
|
isFullWidthRow: e.isCustomRow,
|
|
346
|
-
fullWidthCellRenderer:
|
|
347
|
+
fullWidthCellRenderer: bt,
|
|
347
348
|
fullWidthCellRendererParams: {
|
|
348
349
|
render: e.render
|
|
349
350
|
}
|
|
350
351
|
} : {};
|
|
351
352
|
});
|
|
352
|
-
function
|
|
353
|
-
|
|
353
|
+
function to(e) {
|
|
354
|
+
qe(e), A(() => {
|
|
354
355
|
k({});
|
|
355
356
|
});
|
|
356
357
|
}
|
|
357
|
-
function
|
|
358
|
-
|
|
358
|
+
function ro(e) {
|
|
359
|
+
Je(e), A(() => {
|
|
359
360
|
k({});
|
|
360
361
|
});
|
|
361
362
|
}
|
|
@@ -378,7 +379,7 @@ const ir = /* @__PURE__ */ yo({
|
|
|
378
379
|
function ie(e) {
|
|
379
380
|
return e && String(e);
|
|
380
381
|
}
|
|
381
|
-
function
|
|
382
|
+
function lo(e) {
|
|
382
383
|
const t = s.value;
|
|
383
384
|
if (!t)
|
|
384
385
|
return;
|
|
@@ -389,7 +390,7 @@ const ir = /* @__PURE__ */ yo({
|
|
|
389
390
|
...a,
|
|
390
391
|
hide: M
|
|
391
392
|
}, de = e.find(
|
|
392
|
-
(
|
|
393
|
+
(yo) => ie(yo.key) === a.colId
|
|
393
394
|
);
|
|
394
395
|
return de && (ue.pinned = de.fixed || null), ue;
|
|
395
396
|
}), i = new Map(
|
|
@@ -405,15 +406,15 @@ const ir = /* @__PURE__ */ yo({
|
|
|
405
406
|
applyOrder: !0
|
|
406
407
|
});
|
|
407
408
|
}
|
|
408
|
-
|
|
409
|
+
ot({
|
|
409
410
|
columns: n(() => w.value),
|
|
410
|
-
columnsBackup: n(() =>
|
|
411
|
-
size: n(() =>
|
|
411
|
+
columnsBackup: n(() => Q.value),
|
|
412
|
+
size: n(() => et[R.value]),
|
|
412
413
|
updateColumns(e) {
|
|
413
|
-
w.value = e, o.onShownColumnsChange?.(e),
|
|
414
|
+
w.value = e, o.onShownColumnsChange?.(e), lt(
|
|
414
415
|
() => s.value,
|
|
415
416
|
() => {
|
|
416
|
-
|
|
417
|
+
lo(e);
|
|
417
418
|
},
|
|
418
419
|
{
|
|
419
420
|
interval: 17
|
|
@@ -421,7 +422,7 @@ const ir = /* @__PURE__ */ yo({
|
|
|
421
422
|
);
|
|
422
423
|
},
|
|
423
424
|
updateSize(e) {
|
|
424
|
-
R.value =
|
|
425
|
+
R.value = Zo[e];
|
|
425
426
|
},
|
|
426
427
|
renderConfig: n(() => ({
|
|
427
428
|
className: Ce("table-header", "title"),
|
|
@@ -430,132 +431,134 @@ const ir = /* @__PURE__ */ yo({
|
|
|
430
431
|
dataSource: n(() => r(m).records),
|
|
431
432
|
getSearchFormValues: re,
|
|
432
433
|
setSearchFormValues: le,
|
|
433
|
-
submit:
|
|
434
|
-
submitWith:
|
|
435
|
-
reset:
|
|
436
|
-
refresh:
|
|
434
|
+
submit: P,
|
|
435
|
+
submitWith: oe,
|
|
436
|
+
reset: K,
|
|
437
|
+
refresh: te,
|
|
437
438
|
getSearchFormSorterItems: ae,
|
|
438
439
|
setSearchFormSorterItems: ne,
|
|
439
440
|
resetSearchFormSorterItems: se,
|
|
440
|
-
getLastParams:
|
|
441
|
+
getLastParams: Ve
|
|
441
442
|
});
|
|
442
|
-
const
|
|
443
|
+
const ao = n(
|
|
443
444
|
() => B(o.loading) ? m.loading : o.loading
|
|
444
|
-
),
|
|
445
|
+
), no = n(() => [
|
|
445
446
|
d(),
|
|
446
447
|
o.card ? null : d("wrapper"),
|
|
447
448
|
d("adaptive"),
|
|
448
449
|
d(`size-${R.value}`),
|
|
449
450
|
o.autoHeight && m.records.length ? d("auto-height") : null,
|
|
450
451
|
ye.value
|
|
451
|
-
].filter(Boolean)),
|
|
452
|
+
].filter(Boolean)), so = n(() => ({
|
|
452
453
|
height: "100%",
|
|
453
454
|
...o.tableStyle || {}
|
|
454
|
-
})),
|
|
455
|
-
|
|
455
|
+
})), io = (e, t) => {
|
|
456
|
+
ee({ current: e, pageSize: t });
|
|
456
457
|
};
|
|
457
|
-
function
|
|
458
|
+
function uo(e) {
|
|
458
459
|
const t = e.data;
|
|
459
460
|
return V(t);
|
|
460
461
|
}
|
|
461
|
-
function uo(e, t) {
|
|
462
|
-
(T(e) ? s.value?.ensureNodeVisible : s.value?.ensureIndexVisible)?.(e, t);
|
|
463
|
-
}
|
|
464
462
|
function co(e, t) {
|
|
463
|
+
(E(e) ? s.value?.ensureNodeVisible : s.value?.ensureIndexVisible)?.(e, t);
|
|
464
|
+
}
|
|
465
|
+
function mo(e, t) {
|
|
465
466
|
s.value?.ensureColumnVisible(e, t);
|
|
466
467
|
}
|
|
467
|
-
function
|
|
468
|
+
function po(e) {
|
|
468
469
|
o.onRowClicked?.(e.data, e.event);
|
|
469
470
|
}
|
|
470
|
-
function
|
|
471
|
+
function fo(e) {
|
|
471
472
|
o.onScrollEnd?.(e.direction);
|
|
472
473
|
}
|
|
473
|
-
function
|
|
474
|
+
function go(e) {
|
|
474
475
|
return s.value?.refreshCells(e);
|
|
475
476
|
}
|
|
476
|
-
function
|
|
477
|
+
function wo(e) {
|
|
477
478
|
return s.value?.redrawRows(e);
|
|
478
479
|
}
|
|
479
|
-
function
|
|
480
|
+
function So({ finished: e, column: t }) {
|
|
480
481
|
!e || !t || o.onColumnResized?.(t.getColId(), t.getActualWidth());
|
|
481
482
|
}
|
|
482
|
-
const
|
|
483
|
+
const Co = (e) => {
|
|
483
484
|
const t = [
|
|
484
|
-
|
|
485
|
+
q.value.getRowClass?.(e)
|
|
485
486
|
];
|
|
486
487
|
if (!e.node.rowPinned) {
|
|
487
|
-
const l =
|
|
488
|
+
const l = E(o.rowClassName) ? o.rowClassName(e.data, e.rowIndex) : o.rowClassName;
|
|
488
489
|
t.push(l);
|
|
489
490
|
}
|
|
490
491
|
return t.flat().filter(Boolean);
|
|
491
492
|
};
|
|
492
|
-
return
|
|
493
|
+
return W(
|
|
493
494
|
() => o.dataSource,
|
|
494
|
-
() => {
|
|
495
|
-
|
|
495
|
+
(e) => {
|
|
496
|
+
A(() => {
|
|
497
|
+
Ge(e);
|
|
498
|
+
});
|
|
496
499
|
},
|
|
497
500
|
{ immediate: !0, deep: !0 }
|
|
498
|
-
),
|
|
501
|
+
), W(
|
|
499
502
|
() => o.size,
|
|
500
503
|
(e) => {
|
|
501
504
|
R.value = e;
|
|
502
505
|
}
|
|
503
|
-
),
|
|
506
|
+
), W(
|
|
504
507
|
() => r(m).loading,
|
|
505
508
|
(e) => {
|
|
506
509
|
o.onLoadingChange?.(e);
|
|
507
510
|
}
|
|
508
511
|
), we({
|
|
509
|
-
submit:
|
|
510
|
-
reset:
|
|
511
|
-
refresh:
|
|
512
|
-
submitWith:
|
|
512
|
+
submit: P,
|
|
513
|
+
reset: K,
|
|
514
|
+
refresh: te,
|
|
515
|
+
submitWith: oe,
|
|
513
516
|
setSearchFormValues: le,
|
|
514
517
|
getSearchFormValues: re,
|
|
515
518
|
getShowColumns: () => r(w),
|
|
516
519
|
rowSelection: {
|
|
517
520
|
selectedRows: n(() => G.value),
|
|
518
|
-
setSelectedRowKeys:
|
|
519
|
-
setSelectedRows:
|
|
521
|
+
setSelectedRowKeys: eo,
|
|
522
|
+
setSelectedRows: to,
|
|
520
523
|
clearAll: L,
|
|
521
|
-
unSelectRows:
|
|
524
|
+
unSelectRows: ro
|
|
522
525
|
},
|
|
523
|
-
scrollToRow:
|
|
524
|
-
scrollToColumn:
|
|
526
|
+
scrollToRow: co,
|
|
527
|
+
scrollToColumn: mo,
|
|
525
528
|
getDataSource: () => r(m.records),
|
|
526
529
|
getPaging: Pe,
|
|
527
530
|
setPaging: Ke,
|
|
528
531
|
getSearchFormSorterItems: ae,
|
|
529
532
|
setSearchFormSorterItems: ne,
|
|
530
533
|
resetSearchFormSorterItems: se,
|
|
531
|
-
refreshCells:
|
|
532
|
-
redrawRows:
|
|
534
|
+
refreshCells: go,
|
|
535
|
+
redrawRows: wo,
|
|
533
536
|
_internalGridApi: n(() => s.value)
|
|
534
|
-
}), (e, t) => (h(),
|
|
535
|
-
class: v(
|
|
536
|
-
style:
|
|
537
|
+
}), (e, t) => (h(), H("div", {
|
|
538
|
+
class: v(no.value),
|
|
539
|
+
style: U(e.wrapperStyle)
|
|
537
540
|
}, [
|
|
538
|
-
r(B)(e.dataSource) && e.searchForm !== !1 && r(
|
|
541
|
+
r(B)(e.dataSource) && e.searchForm !== !1 && r(J).length > 0 ? (h(), H("div", {
|
|
539
542
|
key: 0,
|
|
540
|
-
class: v(e.card ? r(
|
|
541
|
-
style:
|
|
543
|
+
class: v(e.card ? r(D)("search-wrapper") : null),
|
|
544
|
+
style: U(e.searchFormWrapperStyle)
|
|
542
545
|
}, [
|
|
543
|
-
|
|
546
|
+
Ro(r(nt).SearchForm, j(e.searchForm || {}, {
|
|
544
547
|
ref_key: "formRef",
|
|
545
548
|
ref: S,
|
|
546
549
|
"custom-reset": "",
|
|
547
|
-
"submit-loading": r(
|
|
548
|
-
onSubmit: r(
|
|
549
|
-
onReset: r(
|
|
550
|
-
}),
|
|
550
|
+
"submit-loading": r(Z).loading,
|
|
551
|
+
onSubmit: r(P),
|
|
552
|
+
onReset: r(K)
|
|
553
|
+
}), bo({
|
|
551
554
|
default: me(() => [
|
|
552
|
-
(h(!0),
|
|
555
|
+
(h(!0), H(Mo, null, xo(r(J), (l) => (h(), _(Bo(l.renderNode), {
|
|
553
556
|
key: l.dataIndex
|
|
554
557
|
}))), 128))
|
|
555
558
|
]),
|
|
556
559
|
_: 2
|
|
557
560
|
}, [
|
|
558
|
-
|
|
561
|
+
N.searchFormExtra ? {
|
|
559
562
|
name: "extra",
|
|
560
563
|
fn: me(() => [
|
|
561
564
|
pe(e.$slots, "searchFormExtra")
|
|
@@ -564,78 +567,78 @@ const ir = /* @__PURE__ */ yo({
|
|
|
564
567
|
} : void 0
|
|
565
568
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
566
569
|
], 6)) : ce("", !0),
|
|
567
|
-
|
|
568
|
-
class: v([r(
|
|
569
|
-
style:
|
|
570
|
+
T("div", {
|
|
571
|
+
class: v([r(D)("table-wrapper"), e.card ? r(D)("table-wrapper-card") : null]),
|
|
572
|
+
style: U(e.tableWrapperStyle)
|
|
570
573
|
}, [
|
|
571
|
-
|
|
574
|
+
T("div", {
|
|
572
575
|
class: v(r(d)("header-wrapper"))
|
|
573
576
|
}, [
|
|
574
577
|
pe(e.$slots, "title", {
|
|
575
578
|
selectedRows: r(G),
|
|
576
|
-
selectedRowKeys: r(
|
|
579
|
+
selectedRowKeys: r(je),
|
|
577
580
|
shownColumns: r(w),
|
|
578
581
|
clearAll: L
|
|
579
582
|
})
|
|
580
583
|
], 2),
|
|
581
|
-
|
|
584
|
+
T("div", {
|
|
582
585
|
ref_key: "gridWrapperRef",
|
|
583
586
|
ref: ke,
|
|
584
587
|
class: v(r(d)("grid-wrapper"))
|
|
585
588
|
}, [
|
|
586
|
-
(h(),
|
|
587
|
-
r(
|
|
589
|
+
(h(), _(r(Yo), j(
|
|
590
|
+
r(Ct)(r(ve), r(q), oo.value),
|
|
588
591
|
{
|
|
589
|
-
key: r(
|
|
592
|
+
key: r($),
|
|
590
593
|
"animate-rows": e.animateRows,
|
|
591
|
-
"get-row-class":
|
|
592
|
-
style:
|
|
594
|
+
"get-row-class": Co,
|
|
595
|
+
style: so.value,
|
|
593
596
|
"row-data": r(m).records,
|
|
594
597
|
"column-defs": r(Ie),
|
|
595
598
|
"default-col-def": r(Fe),
|
|
596
599
|
"suppress-loading-overlay": "",
|
|
597
|
-
"row-selection":
|
|
598
|
-
"selection-column-def": r(
|
|
599
|
-
"get-row-id":
|
|
600
|
+
"row-selection": Xe.value,
|
|
601
|
+
"selection-column-def": r(Le),
|
|
602
|
+
"get-row-id": uo,
|
|
600
603
|
"get-row-height": o.getRowHeight,
|
|
601
604
|
theme: r(he),
|
|
602
605
|
"tooltip-show-delay": 500,
|
|
603
606
|
"enable-browser-tooltips": e.browserTooltips,
|
|
604
607
|
"tooltip-interaction": "",
|
|
605
608
|
"row-class-rules": e.rowClassRules,
|
|
606
|
-
"no-rows-overlay-component":
|
|
609
|
+
"no-rows-overlay-component": xt,
|
|
607
610
|
"no-rows-overlay-component-params": { emptyComponent: e.emptyComponent, emptyText: e.emptyText },
|
|
608
|
-
"loading-overlay-component":
|
|
609
|
-
loading:
|
|
611
|
+
"loading-overlay-component": Mt,
|
|
612
|
+
loading: ao.value,
|
|
610
613
|
"suppress-cell-focus": "",
|
|
611
614
|
"tab-to-next-cell": () => !1,
|
|
612
615
|
"enable-cell-span": "",
|
|
613
616
|
"dom-layout": e.autoHeight ? "autoHeight" : "normal",
|
|
614
|
-
"locale-text": Se[r(
|
|
617
|
+
"locale-text": Se[r($)],
|
|
615
618
|
onSortChanged: Ne,
|
|
616
619
|
onGridReady: t[0] || (t[0] = (l) => s.value = l.api),
|
|
617
620
|
onRowDataUpdated: k,
|
|
618
|
-
onRowSelected:
|
|
619
|
-
onFirstDataRendered:
|
|
620
|
-
onRowClicked:
|
|
621
|
-
onBodyScrollEnd:
|
|
622
|
-
onColumnResized:
|
|
621
|
+
onRowSelected: Ye,
|
|
622
|
+
onFirstDataRendered: Ze,
|
|
623
|
+
onRowClicked: po,
|
|
624
|
+
onBodyScrollEnd: fo,
|
|
625
|
+
onColumnResized: So,
|
|
623
626
|
onColumnGroupOpened: ze
|
|
624
627
|
}
|
|
625
628
|
), null, 16, ["animate-rows", "style", "row-data", "column-defs", "default-col-def", "row-selection", "selection-column-def", "get-row-height", "theme", "enable-browser-tooltips", "row-class-rules", "no-rows-overlay-component-params", "loading", "dom-layout", "locale-text"]))
|
|
626
629
|
], 2),
|
|
627
|
-
|
|
630
|
+
T("div", {
|
|
628
631
|
class: v(r(d)("pagination-wrapper"))
|
|
629
632
|
}, [
|
|
630
|
-
e.pagination !== !1 ? (h(),
|
|
633
|
+
e.pagination !== !1 ? (h(), _(r(ko), j({
|
|
631
634
|
key: 0,
|
|
632
635
|
class: r(d)("pagination")
|
|
633
|
-
}, r(
|
|
636
|
+
}, r(Z).pagination, { onChange: io }), null, 16, ["class"])) : ce("", !0)
|
|
634
637
|
], 2)
|
|
635
638
|
], 6)
|
|
636
639
|
], 6));
|
|
637
640
|
}
|
|
638
641
|
});
|
|
639
642
|
export {
|
|
640
|
-
|
|
643
|
+
ur as default
|
|
641
644
|
};
|