@aplus-frontend/ui 7.8.0 → 7.9.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/index.mjs +26 -24
- package/es/src/ag-grid/editable/form-item.vue.mjs +2 -2
- package/es/src/ag-grid/index.vue.mjs +53 -52
- package/es/src/ag-grid/style/index.mjs +9 -4
- package/es/src/ap-form/style/item-text-group.mjs +8 -4
- package/es/src/ap-table/style/index.d.ts +2 -2
- package/es/src/ap-table/style/index.mjs +3 -3
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +20 -19
- package/es/src/business/ag-grid-modal/hooks/use-modal-title.d.ts +9 -0
- package/es/src/business/ag-grid-modal/hooks/use-modal-title.mjs +14 -10
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +73 -71
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +288 -286
- package/es/src/skeleton/components/desc/index.vue.d.ts +6 -0
- package/es/src/skeleton/components/desc/index.vue.mjs +4 -0
- package/es/src/skeleton/components/desc/index.vue2.mjs +37 -0
- package/es/src/skeleton/components/desc/item-large.vue.d.ts +6 -0
- package/es/src/skeleton/components/desc/item-large.vue.mjs +4 -0
- package/es/src/skeleton/components/desc/item-large.vue2.mjs +72 -0
- package/es/src/skeleton/components/desc/item.vue.d.ts +7 -0
- package/es/src/skeleton/components/desc/item.vue.mjs +4 -0
- package/es/src/skeleton/components/desc/item.vue2.mjs +69 -0
- package/es/src/skeleton/components/line/index.d.ts +14 -0
- package/es/src/skeleton/components/line/index.mjs +26 -0
- package/es/src/skeleton/components/list/index.vue.d.ts +10 -0
- package/es/src/skeleton/components/list/index.vue.mjs +4 -0
- package/es/src/skeleton/components/list/index.vue2.mjs +49 -0
- package/es/src/skeleton/components/list/item.vue.d.ts +6 -0
- package/es/src/skeleton/components/list/item.vue.mjs +4 -0
- package/es/src/skeleton/components/list/item.vue2.mjs +57 -0
- package/es/src/skeleton/components/page-header/index.vue.d.ts +6 -0
- package/es/src/skeleton/components/page-header/index.vue.mjs +4 -0
- package/es/src/skeleton/components/page-header/index.vue2.mjs +24 -0
- package/es/src/skeleton/components/search-form/index.vue.d.ts +6 -0
- package/es/src/skeleton/components/search-form/index.vue.mjs +4 -0
- package/es/src/skeleton/components/search-form/index.vue2.mjs +99 -0
- package/es/src/skeleton/components/table/index.vue.d.ts +11 -0
- package/es/src/skeleton/components/table/index.vue.mjs +4 -0
- package/es/src/skeleton/components/table/index.vue2.mjs +78 -0
- package/es/src/skeleton/components/table/item.vue.d.ts +9 -0
- package/es/src/skeleton/components/table/item.vue.mjs +4 -0
- package/es/src/skeleton/components/table/item.vue2.mjs +80 -0
- package/es/src/skeleton/descriptions.vue.d.ts +8 -0
- package/es/src/skeleton/descriptions.vue.mjs +4 -0
- package/es/src/skeleton/descriptions.vue2.mjs +37 -0
- package/es/src/skeleton/index.d.ts +9 -0
- package/es/src/skeleton/index.mjs +12 -0
- package/es/src/skeleton/interface.d.ts +12 -0
- package/es/src/skeleton/interface.mjs +1 -0
- package/es/src/skeleton/list-page.vue.d.ts +10 -0
- package/es/src/skeleton/list-page.vue.mjs +4 -0
- package/es/src/skeleton/list-page.vue2.mjs +50 -0
- 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/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/style/index.js +1 -1
- package/lib/src/ap-form/style/item-text-group.js +1 -1
- package/lib/src/ap-table/style/index.d.ts +2 -2
- package/lib/src/ap-table/style/index.js +1 -1
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.js +1 -1
- package/lib/src/business/ag-grid-modal/hooks/use-modal-title.d.ts +9 -0
- package/lib/src/business/ag-grid-modal/hooks/use-modal-title.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/skeleton/components/desc/index.vue.d.ts +6 -0
- package/lib/src/skeleton/components/desc/index.vue.js +1 -0
- package/lib/src/skeleton/components/desc/index.vue2.js +1 -0
- package/lib/src/skeleton/components/desc/item-large.vue.d.ts +6 -0
- package/lib/src/skeleton/components/desc/item-large.vue.js +1 -0
- package/lib/src/skeleton/components/desc/item-large.vue2.js +1 -0
- package/lib/src/skeleton/components/desc/item.vue.d.ts +7 -0
- package/lib/src/skeleton/components/desc/item.vue.js +1 -0
- package/lib/src/skeleton/components/desc/item.vue2.js +1 -0
- package/lib/src/skeleton/components/line/index.d.ts +14 -0
- package/lib/src/skeleton/components/line/index.js +1 -0
- package/lib/src/skeleton/components/list/index.vue.d.ts +10 -0
- package/lib/src/skeleton/components/list/index.vue.js +1 -0
- package/lib/src/skeleton/components/list/index.vue2.js +1 -0
- package/lib/src/skeleton/components/list/item.vue.d.ts +6 -0
- package/lib/src/skeleton/components/list/item.vue.js +1 -0
- package/lib/src/skeleton/components/list/item.vue2.js +1 -0
- package/lib/src/skeleton/components/page-header/index.vue.d.ts +6 -0
- package/lib/src/skeleton/components/page-header/index.vue.js +1 -0
- package/lib/src/skeleton/components/page-header/index.vue2.js +1 -0
- package/lib/src/skeleton/components/search-form/index.vue.d.ts +6 -0
- package/lib/src/skeleton/components/search-form/index.vue.js +1 -0
- package/lib/src/skeleton/components/search-form/index.vue2.js +1 -0
- package/lib/src/skeleton/components/table/index.vue.d.ts +11 -0
- package/lib/src/skeleton/components/table/index.vue.js +1 -0
- package/lib/src/skeleton/components/table/index.vue2.js +1 -0
- package/lib/src/skeleton/components/table/item.vue.d.ts +9 -0
- package/lib/src/skeleton/components/table/item.vue.js +1 -0
- package/lib/src/skeleton/components/table/item.vue2.js +1 -0
- package/lib/src/skeleton/descriptions.vue.d.ts +8 -0
- package/lib/src/skeleton/descriptions.vue.js +1 -0
- package/lib/src/skeleton/descriptions.vue2.js +1 -0
- package/lib/src/skeleton/index.d.ts +9 -0
- package/lib/src/skeleton/index.js +1 -0
- package/lib/src/skeleton/interface.d.ts +12 -0
- package/lib/src/skeleton/interface.js +1 -0
- package/lib/src/skeleton/list-page.vue.d.ts +10 -0
- package/lib/src/skeleton/list-page.vue.js +1 -0
- package/lib/src/skeleton/list-page.vue2.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
package/es/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { buildLocaleContext as T, buildTranslator as b, localeContextKey as C, t
|
|
|
8
8
|
import { defaultNamespace as E, namespaceContextKey as P, useGetDerivedNamespace as L, useNamespace as R } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
9
9
|
import { ConfigProvider as v, globalConfigCached as M } from "./src/config-provider/config-provider.mjs";
|
|
10
10
|
import { APConfigProvider as w } from "./src/config-provider/index.mjs";
|
|
11
|
-
import { ApFormItemText as
|
|
11
|
+
import { ApFormItemText as k } from "./src/ap-form/items/text/index.mjs";
|
|
12
12
|
import { default as U } from "./src/ap-form/items/text-area/index.vue.mjs";
|
|
13
13
|
import { default as V } from "./src/ap-form/items/number/index.vue.mjs";
|
|
14
14
|
import { default as _ } from "./src/ap-form/items/date/index.vue.mjs";
|
|
@@ -35,7 +35,7 @@ import { ApField as Le, ApFieldRead as Re } from "./src/ap-field/index.mjs";
|
|
|
35
35
|
import { ApFieldText as ve } from "./src/ap-field/text/index.mjs";
|
|
36
36
|
import { default as ye } from "./src/ap-field/checkbox/index.vue.mjs";
|
|
37
37
|
import { default as Be } from "./src/ap-field/date/index.vue.mjs";
|
|
38
|
-
import { default as
|
|
38
|
+
import { default as Ke } from "./src/ap-field/number/index.vue.mjs";
|
|
39
39
|
import { default as Oe } from "./src/ap-field/radio/index.vue.mjs";
|
|
40
40
|
import { default as ze } from "./src/ap-field/switch/index.vue.mjs";
|
|
41
41
|
import { default as He } from "./src/ap-field/text-area/index.vue.mjs";
|
|
@@ -61,7 +61,7 @@ import { default as Ro } from "./src/ap-button/ap-button.vue.mjs";
|
|
|
61
61
|
import { default as vo } from "./src/ap-button/ap-action-button.vue.mjs";
|
|
62
62
|
import { default as yo } from "./src/ap-button/ap-confirm-button.vue.mjs";
|
|
63
63
|
import { ApDrawer as Bo } from "./src/ap-drawer/index.mjs";
|
|
64
|
-
import { ApProCard as
|
|
64
|
+
import { ApProCard as Ko, ApStatisticCard as Uo } from "./src/ap-pro-card/index.mjs";
|
|
65
65
|
import { LoadingBar as Vo } from "./src/loading-bar/index.mjs";
|
|
66
66
|
import { default as _o } from "./src/render/render.mjs";
|
|
67
67
|
import { default as $o } from "./src/time-ago/index.vue.mjs";
|
|
@@ -87,7 +87,7 @@ import { ApLabel as Lr, ApLabelGroup as Rr } from "./src/business/ap-label/index
|
|
|
87
87
|
import { locales as vr } from "./src/business/ap-ladder/interface.mjs";
|
|
88
88
|
import { ApLadder as yr } from "./src/business/ap-ladder/index.mjs";
|
|
89
89
|
import { ApSelectLayout as Br } from "./src/business/ap-select-layout/index.mjs";
|
|
90
|
-
import { ApStatus as
|
|
90
|
+
import { ApStatus as Kr, ApStatusGroup as Ur } from "./src/business/ap-status/index.mjs";
|
|
91
91
|
import { ApTitle as Vr } from "./src/business/ap-title/index.mjs";
|
|
92
92
|
import { usePageListApTable as _r } from "./src/business/hooks/usePageListApTable.mjs";
|
|
93
93
|
import { usePageListApGrid as $r } from "./src/business/hooks/usePageListApGrid.mjs";
|
|
@@ -111,7 +111,7 @@ import { LruCacher as Lt } from "./src/business/ap-keep-alive/cacher/lru-cacher.
|
|
|
111
111
|
import { useApKeepAliveInject as Nt } from "./src/business/ap-keep-alive/hook.mjs";
|
|
112
112
|
import { matches as Mt } from "./src/business/ap-keep-alive/utils.mjs";
|
|
113
113
|
import { ApDraggableGrid as wt } from "./src/business/ap-draggable-grid/index.mjs";
|
|
114
|
-
import { ApValueSelectCard as
|
|
114
|
+
import { ApValueSelectCard as kt } from "./src/business/ap-value-select-card/index.mjs";
|
|
115
115
|
import { useAgGridModal as Ut } from "./src/business/ag-grid-modal/hooks/use-ag-grid-modal.mjs";
|
|
116
116
|
import { useAgGridSelectModal as Vt } from "./src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs";
|
|
117
117
|
import { ApSelectedItems as _t } from "./src/business/ag-grid-modal/selected-items/index.mjs";
|
|
@@ -138,7 +138,7 @@ import { ROW_SELECTION_FIELD as Lp } from "./src/ap-grid/constants.mjs";
|
|
|
138
138
|
import { toTreeArray as Np } from "./src/ap-grid/utils/to-tree-array.mjs";
|
|
139
139
|
import { default as Mp } from "./src/ap-grid/index.vue.mjs";
|
|
140
140
|
import { default as wp } from "./src/ap-grid/editable/index.vue.mjs";
|
|
141
|
-
import { default as
|
|
141
|
+
import { default as kp } from "./src/ap-grid/editable/form-item.vue.mjs";
|
|
142
142
|
import { default as Up } from "./src/text/index.vue.mjs";
|
|
143
143
|
import { default as Vp } from "./src/text/group.vue.mjs";
|
|
144
144
|
import { default as _p } from "./src/mask/index.vue.mjs";
|
|
@@ -146,12 +146,13 @@ import { Splitter as $p } from "./src/splitter/index.mjs";
|
|
|
146
146
|
import { default as Wp } from "./src/ag-grid/index.vue.mjs";
|
|
147
147
|
import { default as Jp } from "./src/ag-grid/editable/index.vue.mjs";
|
|
148
148
|
import { default as Xp } from "./src/ag-grid/editable/form-item.vue.mjs";
|
|
149
|
-
import {
|
|
150
|
-
import {
|
|
151
|
-
import {
|
|
152
|
-
import {
|
|
153
|
-
import {
|
|
154
|
-
import {
|
|
149
|
+
import { ApSkeleton as Zp } from "./src/skeleton/index.mjs";
|
|
150
|
+
import { useMessage as oa } from "./src/hooks/useMessage.mjs";
|
|
151
|
+
import { useControllableValue as ta } from "./src/hooks/useControllableValue.mjs";
|
|
152
|
+
import { useManualRef as aa } from "./src/hooks/useManualRef.mjs";
|
|
153
|
+
import { useThrottleRef as ma } from "./src/hooks/useThrottleRef.mjs";
|
|
154
|
+
import { useFullScreen as xa } from "./src/hooks/useFullScreen.mjs";
|
|
155
|
+
import { useResize as sa } from "./src/hooks/useResize.mjs";
|
|
155
156
|
const a = console.log;
|
|
156
157
|
a(`UI version: ${p}`);
|
|
157
158
|
const l = {
|
|
@@ -192,7 +193,7 @@ export {
|
|
|
192
193
|
ye as ApFieldCheckbox,
|
|
193
194
|
Be as ApFieldDate,
|
|
194
195
|
je as ApFieldDateRange,
|
|
195
|
-
|
|
196
|
+
Ke as ApFieldNumber,
|
|
196
197
|
Qe as ApFieldPassword,
|
|
197
198
|
Oe as ApFieldRadio,
|
|
198
199
|
ro as ApFieldRate,
|
|
@@ -221,7 +222,7 @@ export {
|
|
|
221
222
|
J as ApFormItemSelect,
|
|
222
223
|
it as ApFormItemSizeInput,
|
|
223
224
|
X as ApFormItemSwitch,
|
|
224
|
-
|
|
225
|
+
k as ApFormItemText,
|
|
225
226
|
U as ApFormItemTextArea,
|
|
226
227
|
oe as ApFormItemTextPassword,
|
|
227
228
|
te as ApFormItemTreeSelect,
|
|
@@ -241,14 +242,15 @@ export {
|
|
|
241
242
|
Po as ApList,
|
|
242
243
|
ho as ApModal,
|
|
243
244
|
rt as ApNeedNameKeyDefault,
|
|
244
|
-
|
|
245
|
+
Ko as ApProCard,
|
|
245
246
|
ct as ApProductInfo,
|
|
246
247
|
bt as ApRadioGroup,
|
|
247
248
|
Br as ApSelectLayout,
|
|
248
249
|
_t as ApSelectedItems,
|
|
249
250
|
ut as ApSizeInput,
|
|
251
|
+
Zp as ApSkeleton,
|
|
250
252
|
Uo as ApStatisticCard,
|
|
251
|
-
|
|
253
|
+
Kr as ApStatus,
|
|
252
254
|
Ur as ApStatusGroup,
|
|
253
255
|
et as ApSummary,
|
|
254
256
|
xp as ApTable,
|
|
@@ -261,7 +263,7 @@ export {
|
|
|
261
263
|
Xo as ApTransformDataHelper,
|
|
262
264
|
Xt as ApUpload,
|
|
263
265
|
ft as ApUploadSingle,
|
|
264
|
-
|
|
266
|
+
kt as ApValueSelectCard,
|
|
265
267
|
St as ApView,
|
|
266
268
|
lt as BatchInputGroup,
|
|
267
269
|
bo as CheckCard,
|
|
@@ -272,7 +274,7 @@ export {
|
|
|
272
274
|
Jp as EditableAgGrid,
|
|
273
275
|
Xp as EditableAgGridFormItem,
|
|
274
276
|
wp as EditableGrid,
|
|
275
|
-
|
|
277
|
+
kp as EditableGridFormItem,
|
|
276
278
|
sp as EditableTable,
|
|
277
279
|
Ap as EditableTableFormItem,
|
|
278
280
|
Dp as FullScreen,
|
|
@@ -319,21 +321,21 @@ export {
|
|
|
319
321
|
Ut as useAgGridModal,
|
|
320
322
|
Vt as useAgGridSelectModal,
|
|
321
323
|
Nt as useApKeepAliveInject,
|
|
322
|
-
|
|
323
|
-
|
|
324
|
+
ta as useControllableValue,
|
|
325
|
+
xa as useFullScreen,
|
|
324
326
|
L as useGetDerivedNamespace,
|
|
325
327
|
I as useGlobalConfig,
|
|
326
328
|
D as useLocale,
|
|
327
|
-
|
|
328
|
-
|
|
329
|
+
aa as useManualRef,
|
|
330
|
+
oa as useMessage,
|
|
329
331
|
R as useNamespace,
|
|
330
332
|
Wr as usePageListAgGrid,
|
|
331
333
|
$r as usePageListApGrid,
|
|
332
334
|
_r as usePageListApTable,
|
|
333
|
-
|
|
335
|
+
sa as useResize,
|
|
334
336
|
or as useTableModal,
|
|
335
337
|
mp as useTablePaging,
|
|
336
338
|
tr as useTableSelectModal,
|
|
337
|
-
|
|
339
|
+
ma as useThrottleRef,
|
|
338
340
|
Wo as useTimeAgo
|
|
339
341
|
};
|
|
@@ -173,9 +173,9 @@ const Fe = /* @__PURE__ */ M({
|
|
|
173
173
|
}), m.value = [];
|
|
174
174
|
}
|
|
175
175
|
function u(e) {
|
|
176
|
-
l.value = e;
|
|
176
|
+
l.value = [...e];
|
|
177
177
|
const a = se(e, o.rowKey);
|
|
178
|
-
s?.setFieldValue(o.name, e), s?.setFieldValue(i, a);
|
|
178
|
+
s?.setFieldValue(o.name, [...e]), s?.setFieldValue(i, a);
|
|
179
179
|
}
|
|
180
180
|
function c(e, a) {
|
|
181
181
|
const n = e === "end" ? l.value.length - 1 : e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as po, useSlots as fo, ref as M, toRef as F, unref as t, computed as n, nextTick as z, watch as G, createElementBlock as O, openBlock as
|
|
1
|
+
import { defineComponent as po, useSlots as fo, ref as M, toRef as F, unref as t, computed as n, nextTick as z, watch as G, createElementBlock as O, openBlock as C, normalizeStyle as L, normalizeClass as g, createCommentVNode as se, createElementVNode as B, createVNode as ie, mergeProps as W, createSlots as go, withCtx as ue, Fragment as wo, renderList as So, createBlock as H, resolveDynamicComponent as ho, renderSlot as de, withDirectives as Co, vShow as yo } from "vue";
|
|
2
2
|
import { AgGridVue as Ro } from "ag-grid-vue3";
|
|
3
3
|
import { ModuleRegistry as vo, ValidationModule as bo, ColumnAutoSizeModule as Mo, PinnedRowModule as Fo, RowAutoHeightModule as Bo, RowStyleModule as ko, CellSpanModule as xo, CellStyleModule as Io, TooltipModule as Ao, RowSelectionModule as No, LocaleModule as To, ValueCacheModule as Do, GridStateModule as Eo, ColumnApiModule as Po, RowApiModule as Ko, CellApiModule as Vo, RenderApiModule as zo, EventApiModule as Go, ScrollApiModule as Oo, ClientSideRowModelApiModule as Lo, ClientSideRowModelModule as Wo } from "ag-grid-community";
|
|
4
4
|
import { mergeProps as Ho } from "./utils.mjs";
|
|
@@ -139,11 +139,11 @@ const Yt = /* @__PURE__ */ po({
|
|
|
139
139
|
y,
|
|
140
140
|
F(o, "rowHeight"),
|
|
141
141
|
F(o, "theme")
|
|
142
|
-
),
|
|
142
|
+
), he = nt(F(o, "virtual")), { rowPinnedGridConfig: j, getRowPinnedCellClass: Ce } = st(
|
|
143
143
|
F(o, "summary")
|
|
144
144
|
), ye = ft("apGrid"), s = M(), [, Re] = et();
|
|
145
145
|
let R = !!o.dataSource;
|
|
146
|
-
const $ = at(o), { shownColumns:
|
|
146
|
+
const $ = at(o), { shownColumns: w, columns: q, columnKeys: ve, getTargetColumnByKey: be } = tt(o), { defaultColDef: Me, columnDefs: Fe, gridWrapperRef: Be } = rt(q, o, Ce), I = M({});
|
|
147
147
|
Qo({
|
|
148
148
|
sorter: I,
|
|
149
149
|
setSorter(e) {
|
|
@@ -164,14 +164,14 @@ const Yt = /* @__PURE__ */ po({
|
|
|
164
164
|
}
|
|
165
165
|
if (!l)
|
|
166
166
|
return;
|
|
167
|
-
const u = l.getColDef(),
|
|
167
|
+
const u = l.getColDef(), p = l.getSort(), f = be(u.colId);
|
|
168
168
|
Q(void 0, void 0, {
|
|
169
169
|
column: u,
|
|
170
|
-
field:
|
|
171
|
-
order:
|
|
170
|
+
field: f?.field ?? u.field ?? u.colId,
|
|
171
|
+
order: p ? ke[p] : null
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
|
-
const Ie = n(() => $o(t(
|
|
174
|
+
const Ie = n(() => $o(t(w), (e) => {
|
|
175
175
|
if (e.sorter === !0)
|
|
176
176
|
return e.field ?? e.dataIndex ?? e.key;
|
|
177
177
|
}).filter(Boolean)), Ae = () => {
|
|
@@ -182,10 +182,10 @@ const Yt = /* @__PURE__ */ po({
|
|
|
182
182
|
const r = e.getColumnState()?.map((l) => ({ ...l, sort: null }));
|
|
183
183
|
e.applyColumnState({ state: r });
|
|
184
184
|
}, T = M(!0), Ne = n(() => gt(o.manual) ? o.manual : lt(U.searchFormExtra?.() || []).some((r) => r.type?.name === "ApView")), {
|
|
185
|
-
formRef:
|
|
185
|
+
formRef: S,
|
|
186
186
|
submit: D,
|
|
187
187
|
reset: E,
|
|
188
|
-
data:
|
|
188
|
+
data: m,
|
|
189
189
|
tableProps: J,
|
|
190
190
|
handleTableChangeOptional: Q,
|
|
191
191
|
submitWith: X,
|
|
@@ -195,7 +195,7 @@ const Yt = /* @__PURE__ */ po({
|
|
|
195
195
|
setDataSource: Ee
|
|
196
196
|
} = qo({
|
|
197
197
|
async request(e) {
|
|
198
|
-
if (R = !1,
|
|
198
|
+
if (R = !1, h.value && !h.value.preserveSelectedRowKeys && k(o.dataSource) && !T.value && V(), T.value && (T.value = !1), !k(o.dataSource)) {
|
|
199
199
|
const l = e.pageSize * (e.current - 1);
|
|
200
200
|
return {
|
|
201
201
|
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(l, l + e.pageSize)) || [],
|
|
@@ -217,15 +217,15 @@ const Yt = /* @__PURE__ */ po({
|
|
|
217
217
|
pagination: o.pagination,
|
|
218
218
|
sortFields: Ie,
|
|
219
219
|
onClickReset: Ae
|
|
220
|
-
}),
|
|
220
|
+
}), h = n(() => {
|
|
221
221
|
const e = o.rowSelection || ye.value?.rowSelection;
|
|
222
222
|
if (e)
|
|
223
223
|
return e === !0 ? ce : {
|
|
224
224
|
...ce,
|
|
225
225
|
...e
|
|
226
226
|
};
|
|
227
|
-
}), Pe = it(o,
|
|
228
|
-
() => k(o.dataSource) ?
|
|
227
|
+
}), Pe = it(o, w), Ke = n(
|
|
228
|
+
() => k(o.dataSource) ? m.records : o.dataSource
|
|
229
229
|
), {
|
|
230
230
|
select: Ve,
|
|
231
231
|
unSelect: ze,
|
|
@@ -236,14 +236,14 @@ const Yt = /* @__PURE__ */ po({
|
|
|
236
236
|
selectMulti: We,
|
|
237
237
|
unSelectMulti: He
|
|
238
238
|
} = Jo({
|
|
239
|
-
...
|
|
239
|
+
...h.value,
|
|
240
240
|
dataSource: Ke,
|
|
241
241
|
rowKey: o.rowKey
|
|
242
242
|
}), Ue = {
|
|
243
243
|
checkbox: "multiRow",
|
|
244
244
|
radio: "singleRow"
|
|
245
245
|
}, _e = n(() => {
|
|
246
|
-
const e =
|
|
246
|
+
const e = h.value;
|
|
247
247
|
if (!e)
|
|
248
248
|
return;
|
|
249
249
|
const { type: r = "checkbox", disabled: l } = e;
|
|
@@ -259,19 +259,19 @@ const Yt = /* @__PURE__ */ po({
|
|
|
259
259
|
const A = ({
|
|
260
260
|
api: e = s.value
|
|
261
261
|
}) => {
|
|
262
|
-
if (o.onUpdate?.(), !
|
|
262
|
+
if (o.onUpdate?.(), !h.value)
|
|
263
263
|
return;
|
|
264
264
|
const r = P.value || [];
|
|
265
265
|
R = !1;
|
|
266
266
|
const l = [];
|
|
267
267
|
e.forEachNode((i) => {
|
|
268
|
-
const v = i.data, u = K(v),
|
|
269
|
-
r.find((
|
|
268
|
+
const v = i.data, u = K(v), p = i.isSelected();
|
|
269
|
+
r.find((f) => K(f) === u) ? !p && l.push(i) : p && i.setSelected(!1);
|
|
270
270
|
}), e.setNodesSelected({ nodes: l, newValue: !0 }), setTimeout(() => {
|
|
271
271
|
R = !0;
|
|
272
272
|
}, 0);
|
|
273
273
|
}, je = (e) => {
|
|
274
|
-
R && (e.node.isSelected() ? Ve(e.data) : ze(e.data), N(
|
|
274
|
+
R && (e.node.isSelected() ? Ve(e.data) : ze(e.data), N(h.value?.tooltip) && e.api.refreshCells({
|
|
275
275
|
rowNodes: [e.node],
|
|
276
276
|
// todo: 取消硬编码
|
|
277
277
|
columns: ["ag-Grid-SelectionColumn"],
|
|
@@ -309,19 +309,19 @@ const Yt = /* @__PURE__ */ po({
|
|
|
309
309
|
}
|
|
310
310
|
function Z(e = !1) {
|
|
311
311
|
const r = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
312
|
-
return
|
|
312
|
+
return S.value?.apForm?.[r]?.(!0);
|
|
313
313
|
}
|
|
314
314
|
function ee(e) {
|
|
315
|
-
|
|
315
|
+
S.value?.apForm?.setFieldsValue?.(e);
|
|
316
316
|
}
|
|
317
317
|
function oe() {
|
|
318
|
-
return
|
|
318
|
+
return S.value?.getSorterItems() || [];
|
|
319
319
|
}
|
|
320
320
|
function te(e) {
|
|
321
|
-
|
|
321
|
+
S.value?.setSorterItems(e);
|
|
322
322
|
}
|
|
323
323
|
function re() {
|
|
324
|
-
|
|
324
|
+
S.value?.resetSorterItems();
|
|
325
325
|
}
|
|
326
326
|
function le(e) {
|
|
327
327
|
return e && String(e);
|
|
@@ -342,23 +342,23 @@ const Yt = /* @__PURE__ */ po({
|
|
|
342
342
|
return ne && (ae.pinned = ne.fixed || null), ae;
|
|
343
343
|
}), u = new Map(
|
|
344
344
|
e.map((a, b) => [le(a.key), b])
|
|
345
|
-
),
|
|
345
|
+
), p = v.filter((a) => u.has(a.colId)).sort(
|
|
346
346
|
(a, b) => u.get(a.colId) - u.get(b.colId)
|
|
347
|
-
),
|
|
347
|
+
), f = [];
|
|
348
348
|
let c = 0;
|
|
349
349
|
for (const a of v)
|
|
350
|
-
u.has(a.colId) ?
|
|
350
|
+
u.has(a.colId) ? f.push(p[c++]) : f.push(a);
|
|
351
351
|
r.applyColumnState({
|
|
352
|
-
state:
|
|
352
|
+
state: f,
|
|
353
353
|
applyOrder: !0
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
356
|
Xo({
|
|
357
|
-
columns: n(() =>
|
|
357
|
+
columns: n(() => w.value),
|
|
358
358
|
columnsBackup: n(() => q.value),
|
|
359
359
|
size: n(() => Zo[y.value]),
|
|
360
360
|
updateColumns(e) {
|
|
361
|
-
|
|
361
|
+
w.value = e, o.onShownColumnsChange?.(e), Ye(e);
|
|
362
362
|
},
|
|
363
363
|
updateSize(e) {
|
|
364
364
|
y.value = Yo[e];
|
|
@@ -367,7 +367,7 @@ const Yt = /* @__PURE__ */ po({
|
|
|
367
367
|
className: ge("table-header", "title"),
|
|
368
368
|
color: Re.value.colorTextTertiary
|
|
369
369
|
})),
|
|
370
|
-
dataSource: n(() => t(
|
|
370
|
+
dataSource: n(() => t(m).records),
|
|
371
371
|
getSearchFormValues: Z,
|
|
372
372
|
setSearchFormValues: ee,
|
|
373
373
|
submit: D,
|
|
@@ -379,12 +379,13 @@ const Yt = /* @__PURE__ */ po({
|
|
|
379
379
|
resetSearchFormSorterItems: re
|
|
380
380
|
});
|
|
381
381
|
const Ze = n(
|
|
382
|
-
() => k(o.loading) ?
|
|
382
|
+
() => k(o.loading) ? m.loading : o.loading
|
|
383
383
|
), eo = n(() => [
|
|
384
384
|
d(),
|
|
385
385
|
o.card ? null : d("wrapper"),
|
|
386
386
|
d("adaptive"),
|
|
387
387
|
d(`size-${y.value}`),
|
|
388
|
+
o.autoHeight && m.records.length ? d("auto-height") : null,
|
|
388
389
|
we.value
|
|
389
390
|
].filter(Boolean)), oo = n(() => ({
|
|
390
391
|
height: "100%",
|
|
@@ -436,7 +437,7 @@ const Yt = /* @__PURE__ */ po({
|
|
|
436
437
|
y.value = e;
|
|
437
438
|
}
|
|
438
439
|
), G(
|
|
439
|
-
() => t(
|
|
440
|
+
() => t(m).loading,
|
|
440
441
|
(e) => {
|
|
441
442
|
o.onLoadingChange?.(e);
|
|
442
443
|
}
|
|
@@ -447,7 +448,7 @@ const Yt = /* @__PURE__ */ po({
|
|
|
447
448
|
submitWith: X,
|
|
448
449
|
setSearchFormValues: ee,
|
|
449
450
|
getSearchFormValues: Z,
|
|
450
|
-
getShowColumns: () => t(
|
|
451
|
+
getShowColumns: () => t(w),
|
|
451
452
|
rowSelection: {
|
|
452
453
|
selectedRows: n(() => P.value),
|
|
453
454
|
setSelectedRowKeys: qe,
|
|
@@ -457,7 +458,7 @@ const Yt = /* @__PURE__ */ po({
|
|
|
457
458
|
},
|
|
458
459
|
scrollToRow: lo,
|
|
459
460
|
scrollToColumn: ao,
|
|
460
|
-
getDataSource: () => t(
|
|
461
|
+
getDataSource: () => t(m.records),
|
|
461
462
|
getPaging: Te,
|
|
462
463
|
setPaging: De,
|
|
463
464
|
getSearchFormSorterItems: oe,
|
|
@@ -466,25 +467,25 @@ const Yt = /* @__PURE__ */ po({
|
|
|
466
467
|
refreshCells: io,
|
|
467
468
|
redrawRows: uo,
|
|
468
469
|
_internalGridApi: n(() => s.value)
|
|
469
|
-
}), (e, r) => (
|
|
470
|
-
class:
|
|
470
|
+
}), (e, r) => (C(), O("div", {
|
|
471
|
+
class: g(eo.value),
|
|
471
472
|
style: L(e.wrapperStyle)
|
|
472
473
|
}, [
|
|
473
|
-
t(k)(e.dataSource) && e.searchForm !== !1 && t($).length > 0 ? (
|
|
474
|
+
t(k)(e.dataSource) && e.searchForm !== !1 && t($).length > 0 ? (C(), O("div", {
|
|
474
475
|
key: 0,
|
|
475
|
-
class:
|
|
476
|
+
class: g(e.card ? t(x)("search-wrapper") : null),
|
|
476
477
|
style: L(e.searchFormWrapperStyle)
|
|
477
478
|
}, [
|
|
478
479
|
ie(t(jo).SearchForm, W(e.searchForm || {}, {
|
|
479
480
|
ref_key: "formRef",
|
|
480
|
-
ref:
|
|
481
|
+
ref: S,
|
|
481
482
|
"custom-reset": "",
|
|
482
483
|
"submit-loading": t(J).loading,
|
|
483
484
|
onSubmit: t(D),
|
|
484
485
|
onReset: t(E)
|
|
485
486
|
}), go({
|
|
486
487
|
default: ue(() => [
|
|
487
|
-
(
|
|
488
|
+
(C(!0), O(wo, null, So(t($), (l) => (C(), H(ho(l.renderNode), {
|
|
488
489
|
key: l.dataIndex
|
|
489
490
|
}))), 128))
|
|
490
491
|
]),
|
|
@@ -500,31 +501,31 @@ const Yt = /* @__PURE__ */ po({
|
|
|
500
501
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
501
502
|
], 6)) : se("", !0),
|
|
502
503
|
B("div", {
|
|
503
|
-
class:
|
|
504
|
+
class: g([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
|
|
504
505
|
style: L(e.tableWrapperStyle)
|
|
505
506
|
}, [
|
|
506
507
|
B("div", {
|
|
507
|
-
class:
|
|
508
|
+
class: g(t(d)("header-wrapper"))
|
|
508
509
|
}, [
|
|
509
510
|
de(e.$slots, "title", {
|
|
510
511
|
selectedRows: t(P),
|
|
511
512
|
selectedRowKeys: t(Ge),
|
|
512
|
-
shownColumns: t(
|
|
513
|
+
shownColumns: t(w),
|
|
513
514
|
clearAll: V
|
|
514
515
|
})
|
|
515
516
|
], 2),
|
|
516
517
|
B("div", {
|
|
517
518
|
ref_key: "gridWrapperRef",
|
|
518
519
|
ref: Be,
|
|
519
|
-
class:
|
|
520
|
+
class: g(t(d)("grid-wrapper"))
|
|
520
521
|
}, [
|
|
521
|
-
(
|
|
522
|
-
t(Ho)(t(
|
|
522
|
+
(C(), H(t(Ro), W(
|
|
523
|
+
t(Ho)(t(he), t(j), Je.value),
|
|
523
524
|
{
|
|
524
525
|
key: t(_),
|
|
525
526
|
"get-row-class": co,
|
|
526
527
|
style: oo.value,
|
|
527
|
-
"row-data": t(
|
|
528
|
+
"row-data": t(m).records,
|
|
528
529
|
"column-defs": t(Fe),
|
|
529
530
|
"default-col-def": t(Me),
|
|
530
531
|
"suppress-loading-overlay": "",
|
|
@@ -551,8 +552,8 @@ const Yt = /* @__PURE__ */ po({
|
|
|
551
552
|
onBodyScrollEnd: so
|
|
552
553
|
}
|
|
553
554
|
), 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", "locale-text"])),
|
|
554
|
-
|
|
555
|
-
class:
|
|
555
|
+
Co(B("div", {
|
|
556
|
+
class: g(t(x)("table-loading-wrapper"))
|
|
556
557
|
}, [
|
|
557
558
|
ie(t(Uo), { delay: 300 })
|
|
558
559
|
], 2), [
|
|
@@ -560,9 +561,9 @@ const Yt = /* @__PURE__ */ po({
|
|
|
560
561
|
])
|
|
561
562
|
], 2),
|
|
562
563
|
B("div", {
|
|
563
|
-
class:
|
|
564
|
+
class: g(t(d)("pagination-wrapper"))
|
|
564
565
|
}, [
|
|
565
|
-
e.pagination !== !1 ? (
|
|
566
|
+
e.pagination !== !1 ? (C(), H(t(_o), W({
|
|
566
567
|
key: 0,
|
|
567
568
|
class: t(d)("pagination")
|
|
568
569
|
}, t(J).pagination, { onChange: to }), null, 16, ["class"])) : se("", !0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { genSettingTriggerBtnStyle as a } from "../../ap-table/style/index.mjs";
|
|
2
|
-
import { multiRows as l, resetScrollbar as
|
|
3
|
-
import { genComponentStyleHook as
|
|
2
|
+
import { multiRows as l, resetScrollbar as r } from "../../style/index.mjs";
|
|
3
|
+
import { genComponentStyleHook as d } from "../../utils/cssinjs/index.mjs";
|
|
4
4
|
const t = {
|
|
5
5
|
agGridSearchFormWrapperMarginBlockEnd: 10,
|
|
6
6
|
agGridCellPaddingBlockMedium: 9,
|
|
@@ -12,7 +12,7 @@ const t = {
|
|
|
12
12
|
const { componentCls: e } = i;
|
|
13
13
|
return {
|
|
14
14
|
[e]: {
|
|
15
|
-
...
|
|
15
|
+
...r(i),
|
|
16
16
|
"&-adaptive": {
|
|
17
17
|
height: "100%",
|
|
18
18
|
display: "flex",
|
|
@@ -23,6 +23,11 @@ const t = {
|
|
|
23
23
|
position: "relative"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
+
"&-auto-height": {
|
|
27
|
+
".ag-center-cols-viewport": {
|
|
28
|
+
minHeight: "unset !important"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
26
31
|
"&-wrapper": {
|
|
27
32
|
padding: i.space,
|
|
28
33
|
paddingBlockEnd: i.spaceLG,
|
|
@@ -150,7 +155,7 @@ const t = {
|
|
|
150
155
|
}
|
|
151
156
|
}
|
|
152
157
|
};
|
|
153
|
-
}, s =
|
|
158
|
+
}, s = d(
|
|
154
159
|
"AgGrid",
|
|
155
160
|
(i) => [n(i)],
|
|
156
161
|
t,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { genComponentStyleHook as
|
|
2
|
-
const
|
|
1
|
+
import { genComponentStyleHook as r } from "../../utils/cssinjs/index.mjs";
|
|
2
|
+
const n = (t) => ({
|
|
3
3
|
[t.componentCls]: {
|
|
4
4
|
"&-compact": {
|
|
5
5
|
".ant-select": {
|
|
@@ -44,6 +44,10 @@ const e = (t) => ({
|
|
|
44
44
|
".ant-form-item-control-input-content > .ant-input-group > :first-child, .ant-select-selector": {
|
|
45
45
|
borderStartStartRadius: 0,
|
|
46
46
|
borderEndStartRadius: 0
|
|
47
|
+
},
|
|
48
|
+
".ant-form-item-control-input-content .ant-input-group > :first-child, .ant-select-selector": {
|
|
49
|
+
borderStartStartRadius: 0,
|
|
50
|
+
borderEndStartRadius: 0
|
|
47
51
|
}
|
|
48
52
|
},
|
|
49
53
|
".ant-form-item:not(:first-child):not(:last-child)": {
|
|
@@ -62,8 +66,8 @@ const e = (t) => ({
|
|
|
62
66
|
".ant-form-vertical .ant-input-group.ant-input-group-compact > *": {
|
|
63
67
|
verticalAlign: "bottom"
|
|
64
68
|
}
|
|
65
|
-
}), o =
|
|
69
|
+
}), o = r("ApForm.ItemTextGroup", (t) => [n(t)]);
|
|
66
70
|
export {
|
|
67
71
|
o as default,
|
|
68
|
-
|
|
72
|
+
n as genFormItemTextGroupStyle
|
|
69
73
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { GenStyleFunc, StyleMixin } from '../../design-token/interface';
|
|
1
|
+
import { BaseToken, GenStyleFunc, StyleMixin } from '../../design-token/interface';
|
|
2
2
|
import { ComputedRef } from 'vue';
|
|
3
3
|
export type ApTableToken = {
|
|
4
4
|
apTableHeaderBg: string;
|
|
5
5
|
apTableIndexSize: number;
|
|
6
6
|
apTableSettingRightWidth: number;
|
|
7
7
|
};
|
|
8
|
-
export declare const defaultValue: ApTableToken;
|
|
8
|
+
export declare const defaultValue: (token: BaseToken) => ApTableToken;
|
|
9
9
|
export declare const genSettingTriggerBtnStyle: StyleMixin;
|
|
10
10
|
export declare const genApTableStyle: GenStyleFunc<ApTableToken>;
|
|
11
11
|
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { multiRows as l, resetScrollbar as i } from "../../style/index.mjs";
|
|
2
2
|
import { genComponentStyleHook as o } from "../../utils/cssinjs/index.mjs";
|
|
3
|
-
const r = {
|
|
4
|
-
apTableHeaderBg:
|
|
3
|
+
const r = (t) => ({
|
|
4
|
+
apTableHeaderBg: t.tableHeaderBg,
|
|
5
5
|
apTableIndexSize: 14,
|
|
6
6
|
apTableSettingRightWidth: 240
|
|
7
|
-
}, p = (t) => ({
|
|
7
|
+
}), p = (t) => ({
|
|
8
8
|
[`.${t.namespace}-ap-table-setting-trigger-button`]: {
|
|
9
9
|
color: t.textColor2,
|
|
10
10
|
"&:hover": {
|