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