@aplus-frontend/ui 6.26.0 → 6.26.2
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/components/empty/index.vue.d.ts +3 -0
- package/es/src/ag-grid/components/empty/index.vue.mjs +4 -0
- package/es/src/ag-grid/components/empty/index.vue2.mjs +15 -0
- package/es/src/ag-grid/index.vue.mjs +53 -53
- package/es/src/ap-grid/index.vue.mjs +196 -180
- package/es/src/ap-grid/interface.d.ts +8 -1
- package/es/src/ap-pro-card/components/card/index.vue2.mjs +83 -87
- package/es/src/ap-pro-card/components/statistic-card/index.vue.d.ts +3 -1
- package/es/src/ap-pro-card/components/statistic-card/index.vue2.mjs +12 -13
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +118 -112
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/empty/index.vue.d.ts +3 -0
- package/lib/src/ag-grid/components/empty/index.vue.js +1 -0
- package/lib/src/ag-grid/components/empty/index.vue2.js +1 -0
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +8 -1
- package/lib/src/ap-pro-card/components/card/index.vue2.js +1 -1
- package/lib/src/ap-pro-card/components/statistic-card/index.vue.d.ts +3 -1
- package/lib/src/ap-pro-card/components/statistic-card/index.vue2.js +1 -1
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/theme/ag-grid/index.css +1 -1
- package/theme/ag-grid/index.less +1 -1
- package/theme/ap-draggable-grid/ap-draggable-grid.css +5 -2
- package/theme/ap-draggable-grid/ap-draggable-grid.less +3 -2
- package/theme/ap-grid/index.css +1 -0
- package/theme/ap-grid/index.less +1 -0
- package/theme/ap-pro-card/index.css +22 -6
- package/theme/ap-pro-card/index.less +22 -7
- package/theme/css-var.css +32 -0
- package/theme/css-var.less +34 -0
- package/theme/index.css +61 -9
- package/es/src/ap-pro-card/utils/css-var.d.ts +0 -17
- package/es/src/ap-pro-card/utils/css-var.mjs +0 -29
- package/lib/src/ap-pro-card/utils/css-var.d.ts +0 -17
- package/lib/src/ap-pro-card/utils/css-var.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineComponent as t, createElementBlock as o, openBlock as r, createVNode as m, unref as e } from "vue";
|
|
2
|
+
import { Empty as n } from "@aplus-frontend/antdv";
|
|
3
|
+
const l = /* @__PURE__ */ t({
|
|
4
|
+
__name: "index",
|
|
5
|
+
setup(_) {
|
|
6
|
+
return (a, c) => (r(), o("div", null, [
|
|
7
|
+
m(e(n), {
|
|
8
|
+
image: e(n).PRESENTED_IMAGE_SIMPLE
|
|
9
|
+
}, null, 8, ["image"])
|
|
10
|
+
]));
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
l as default
|
|
15
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as ze, useSlots as Ae, ref as v, toRef as
|
|
1
|
+
import { defineComponent as ze, useSlots as Ae, ref as v, toRef as $, computed as l, unref as a, nextTick as Ke, watch as k, createElementBlock as D, openBlock as w, normalizeStyle as b, normalizeClass as c, createCommentVNode as j, createElementVNode as S, createVNode as z, mergeProps as q, createSlots as Ne, withCtx as U, Fragment as Ve, renderList as Ie, createBlock as J, resolveDynamicComponent as Ee, renderSlot as Q, withDirectives as Pe, vShow as Me } from "vue";
|
|
2
2
|
import { AgGridVue as We } from "ag-grid-vue3";
|
|
3
3
|
import { ModuleRegistry as Le, AllCommunityModule as Oe } from "ag-grid-community";
|
|
4
4
|
import { Spin as Ge, Pagination as He } from "@aplus-frontend/antdv";
|
|
5
|
-
import { isUndefined as
|
|
5
|
+
import { isUndefined as C, isFunction as $e } from "lodash-unified";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { ApForm as
|
|
8
|
-
import { recursionApColumns as
|
|
9
|
-
import { useTablePaging as
|
|
7
|
+
import { ApForm as je } from "../ap-form/index.mjs";
|
|
8
|
+
import { recursionApColumns as qe } from "../ap-table/utils.mjs";
|
|
9
|
+
import { useTablePaging as Ue } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
10
10
|
import Je from "./hooks/use-row-selection.mjs";
|
|
11
11
|
import { useProvideSorter as Qe } from "./context.mjs";
|
|
12
12
|
import { useProvideApTable as Xe } from "../ap-table/context.mjs";
|
|
@@ -18,8 +18,10 @@ import { useColumnsDef as to } from "./hooks/use-columns-def.mjs";
|
|
|
18
18
|
import { isDef as ao } from "../utils/index.mjs";
|
|
19
19
|
import { getValidVNodeList as ro } from "../utils/slot.mjs";
|
|
20
20
|
import { useSearchForm as no } from "./hooks/use-search-form.mjs";
|
|
21
|
+
import "./components/empty/index.vue.mjs";
|
|
21
22
|
import { useNamespace as lo } from "../config-provider/hooks/use-namespace.mjs";
|
|
22
|
-
|
|
23
|
+
import so from "./components/empty/index.vue2.mjs";
|
|
24
|
+
const Ko = /* @__PURE__ */ ze({
|
|
23
25
|
name: "AgGrid",
|
|
24
26
|
__name: "index",
|
|
25
27
|
props: {
|
|
@@ -87,7 +89,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
87
89
|
},
|
|
88
90
|
setup(X, { expose: Y }) {
|
|
89
91
|
Le.registerModules([Oe]);
|
|
90
|
-
const o = X,
|
|
92
|
+
const o = X, y = Ae(), { e: h, b: i, be: Z } = lo("ag-grid"), f = v(o.size), _ = eo(f, $(o, "rowHeight")), g = v(), [, ee] = _e();
|
|
91
93
|
let u = !!o.dataSource;
|
|
92
94
|
const A = no(o), { shownColumns: d, shownColumnsBackup: oe } = oo(o), { defaultColDef: te, columnDefs: ae } = to(
|
|
93
95
|
d,
|
|
@@ -105,7 +107,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
105
107
|
};
|
|
106
108
|
function ne() {
|
|
107
109
|
var s;
|
|
108
|
-
const e = (s =
|
|
110
|
+
const e = (s = g.value.getColumns()) == null ? void 0 : s.filter((T) => T.getSort() !== void 0);
|
|
109
111
|
if (!(e != null && e.length))
|
|
110
112
|
return;
|
|
111
113
|
const t = e[0], r = t.getColDef(), n = t.getSort();
|
|
@@ -115,18 +117,18 @@ const Do = /* @__PURE__ */ ze({
|
|
|
115
117
|
order: n ? re[n] : null
|
|
116
118
|
});
|
|
117
119
|
}
|
|
118
|
-
const le = l(() =>
|
|
120
|
+
const le = l(() => qe(a(d), (e) => {
|
|
119
121
|
if (e.sorter === !0)
|
|
120
122
|
return e.key || e.dataIndex;
|
|
121
123
|
}).filter(Boolean)), se = l(() => {
|
|
122
124
|
var t;
|
|
123
|
-
return ao(o.manual) ? o.manual : ro(((t =
|
|
125
|
+
return ao(o.manual) ? o.manual : ro(((t = y.searchFormExtra) == null ? void 0 : t.call(y)) || []).some((r) => {
|
|
124
126
|
var n;
|
|
125
127
|
return ((n = r.type) == null ? void 0 : n.name) === "ApView";
|
|
126
128
|
});
|
|
127
129
|
}), {
|
|
128
130
|
formRef: m,
|
|
129
|
-
submit:
|
|
131
|
+
submit: R,
|
|
130
132
|
reset: F,
|
|
131
133
|
data: p,
|
|
132
134
|
tableProps: N,
|
|
@@ -136,10 +138,10 @@ const Do = /* @__PURE__ */ ze({
|
|
|
136
138
|
getPaging: ie,
|
|
137
139
|
setPaging: de,
|
|
138
140
|
setDataSource: ce
|
|
139
|
-
} =
|
|
141
|
+
} = Ue({
|
|
140
142
|
async request(e) {
|
|
141
143
|
var r;
|
|
142
|
-
if (u = !1, !
|
|
144
|
+
if (u = !1, !C(o.dataSource)) {
|
|
143
145
|
const n = e.pageSize * (e.current - 1);
|
|
144
146
|
return {
|
|
145
147
|
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(n, n + e.pageSize)) || [],
|
|
@@ -154,21 +156,21 @@ const Do = /* @__PURE__ */ ze({
|
|
|
154
156
|
},
|
|
155
157
|
namespace: "ap-grid",
|
|
156
158
|
filterFields: v([]),
|
|
157
|
-
params:
|
|
159
|
+
params: $(o, "params"),
|
|
158
160
|
defaultData: o.defaultData,
|
|
159
161
|
manual: a(se),
|
|
160
162
|
formatParams: o.beforeSearchSubmit,
|
|
161
163
|
pagination: o.pagination,
|
|
162
164
|
sortFields: le
|
|
163
165
|
}), ue = l(
|
|
164
|
-
() =>
|
|
166
|
+
() => C(o.dataSource) ? p.records : o.dataSource
|
|
165
167
|
), {
|
|
166
168
|
select: me,
|
|
167
169
|
unSelect: pe,
|
|
168
170
|
selectedRows: B,
|
|
169
171
|
selectedRowKeys: fe,
|
|
170
|
-
clearAll:
|
|
171
|
-
selectMultiByKeys:
|
|
172
|
+
clearAll: ge,
|
|
173
|
+
selectMultiByKeys: we
|
|
172
174
|
} = Je({
|
|
173
175
|
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
174
176
|
dataSource: ue,
|
|
@@ -176,7 +178,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
176
178
|
}), Se = {
|
|
177
179
|
checkbox: "multiRow",
|
|
178
180
|
radio: "singleRow"
|
|
179
|
-
},
|
|
181
|
+
}, ye = l(() => {
|
|
180
182
|
if (!o.rowSelection)
|
|
181
183
|
return;
|
|
182
184
|
const { type: e = "checkbox", disabled: t } = o.rowSelection === !0 ? {} : o.rowSelection;
|
|
@@ -184,7 +186,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
184
186
|
mode: Se[e],
|
|
185
187
|
isRowSelectable: (r) => t ? !t(r.data) : !0
|
|
186
188
|
};
|
|
187
|
-
}),
|
|
189
|
+
}), he = l(() => {
|
|
188
190
|
if (!o.rowSelection)
|
|
189
191
|
return;
|
|
190
192
|
const e = o.rowSelection === !0 ? {} : o.rowSelection;
|
|
@@ -199,10 +201,10 @@ const Do = /* @__PURE__ */ ze({
|
|
|
199
201
|
};
|
|
200
202
|
});
|
|
201
203
|
function x(e) {
|
|
202
|
-
return
|
|
204
|
+
return $e(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
|
|
203
205
|
}
|
|
204
206
|
const P = ({
|
|
205
|
-
api: e =
|
|
207
|
+
api: e = g.value
|
|
206
208
|
}) => {
|
|
207
209
|
if (!o.rowSelection)
|
|
208
210
|
return;
|
|
@@ -227,10 +229,10 @@ const Do = /* @__PURE__ */ ze({
|
|
|
227
229
|
u = !0;
|
|
228
230
|
}, M = () => {
|
|
229
231
|
var e;
|
|
230
|
-
|
|
232
|
+
ge(), (e = g.value) == null || e.deselectAll();
|
|
231
233
|
};
|
|
232
|
-
function
|
|
233
|
-
|
|
234
|
+
function Ce(e) {
|
|
235
|
+
we(e), Ke(() => {
|
|
234
236
|
P({});
|
|
235
237
|
});
|
|
236
238
|
}
|
|
@@ -273,7 +275,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
273
275
|
dataSource: l(() => a(p).records),
|
|
274
276
|
getSearchFormValues: W,
|
|
275
277
|
setSearchFormValues: L,
|
|
276
|
-
submit:
|
|
278
|
+
submit: R,
|
|
277
279
|
submitWith: I,
|
|
278
280
|
reset: F,
|
|
279
281
|
refresh: E,
|
|
@@ -281,8 +283,8 @@ const Do = /* @__PURE__ */ ze({
|
|
|
281
283
|
setSearchFormSorterItems: G,
|
|
282
284
|
resetSearchFormSorterItems: H
|
|
283
285
|
});
|
|
284
|
-
const
|
|
285
|
-
() =>
|
|
286
|
+
const Re = l(
|
|
287
|
+
() => C(o.loading) ? p.loading : o.loading
|
|
286
288
|
), Fe = l(() => [
|
|
287
289
|
i(),
|
|
288
290
|
o.card ? null : i("wrapper"),
|
|
@@ -300,7 +302,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
300
302
|
}
|
|
301
303
|
function ke(e, t) {
|
|
302
304
|
var r;
|
|
303
|
-
(r =
|
|
305
|
+
(r = g.value) == null || r.ensureIndexVisible(e, t);
|
|
304
306
|
}
|
|
305
307
|
return k(
|
|
306
308
|
() => o.dataSource,
|
|
@@ -320,7 +322,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
320
322
|
(t = o.onLoadingChange) == null || t.call(o, e);
|
|
321
323
|
}
|
|
322
324
|
), Y({
|
|
323
|
-
submit:
|
|
325
|
+
submit: R,
|
|
324
326
|
reset: F,
|
|
325
327
|
refresh: E,
|
|
326
328
|
submitWith: I,
|
|
@@ -329,7 +331,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
329
331
|
getShowColumns: () => a(d),
|
|
330
332
|
rowSelection: {
|
|
331
333
|
selectedRows: l(() => B.value),
|
|
332
|
-
setSelectedRowKeys:
|
|
334
|
+
setSelectedRowKeys: Ce,
|
|
333
335
|
clearAll: M
|
|
334
336
|
},
|
|
335
337
|
scrollToRow: ke,
|
|
@@ -341,41 +343,41 @@ const Do = /* @__PURE__ */ ze({
|
|
|
341
343
|
resetSearchFormSorterItems: H
|
|
342
344
|
}), (e, t) => {
|
|
343
345
|
var r, n;
|
|
344
|
-
return
|
|
346
|
+
return w(), D("div", {
|
|
345
347
|
class: c(Fe.value),
|
|
346
348
|
style: b(e.wrapperStyle)
|
|
347
349
|
}, [
|
|
348
|
-
a(
|
|
350
|
+
a(C)(e.dataSource) && e.searchForm !== !1 && a(A).length > 0 ? (w(), D("div", {
|
|
349
351
|
key: 0,
|
|
350
|
-
class: c(e.card ? a(
|
|
352
|
+
class: c(e.card ? a(h)("search-wrapper") : null),
|
|
351
353
|
style: b(e.searchFormWrapperStyle)
|
|
352
354
|
}, [
|
|
353
|
-
z(a(
|
|
355
|
+
z(a(je).SearchForm, q(e.searchForm || {}, {
|
|
354
356
|
ref_key: "formRef",
|
|
355
357
|
ref: m,
|
|
356
358
|
"custom-reset": "",
|
|
357
359
|
"submit-loading": a(N).loading,
|
|
358
|
-
onSubmit: a(
|
|
360
|
+
onSubmit: a(R),
|
|
359
361
|
onReset: a(F)
|
|
360
362
|
}), Ne({
|
|
361
|
-
default:
|
|
362
|
-
(
|
|
363
|
+
default: U(() => [
|
|
364
|
+
(w(!0), D(Ve, null, Ie(a(A), (s) => (w(), J(Ee(s.renderNode), {
|
|
363
365
|
key: s.dataIndex
|
|
364
366
|
}))), 128))
|
|
365
367
|
]),
|
|
366
368
|
_: 2
|
|
367
369
|
}, [
|
|
368
|
-
|
|
370
|
+
y.searchFormExtra ? {
|
|
369
371
|
name: "extra",
|
|
370
|
-
fn:
|
|
372
|
+
fn: U(() => [
|
|
371
373
|
Q(e.$slots, "searchFormExtra")
|
|
372
374
|
]),
|
|
373
375
|
key: "0"
|
|
374
376
|
} : void 0
|
|
375
377
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
376
|
-
], 6)) :
|
|
378
|
+
], 6)) : j("", !0),
|
|
377
379
|
S("div", {
|
|
378
|
-
class: c([a(
|
|
380
|
+
class: c([a(h)("table-wrapper"), e.card ? a(h)("table-wrapper-card") : null]),
|
|
379
381
|
style: b(e.tableWrapperStyle)
|
|
380
382
|
}, [
|
|
381
383
|
S("div", {
|
|
@@ -396,12 +398,9 @@ const Do = /* @__PURE__ */ ze({
|
|
|
396
398
|
"row-data": a(p).records,
|
|
397
399
|
"column-defs": a(ae),
|
|
398
400
|
"default-col-def": a(te),
|
|
399
|
-
"
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
},
|
|
403
|
-
"row-selection": he.value,
|
|
404
|
-
"selection-column-def": ye.value,
|
|
401
|
+
"suppress-loading-overlay": "",
|
|
402
|
+
"row-selection": ye.value,
|
|
403
|
+
"selection-column-def": he.value,
|
|
405
404
|
"get-row-id": Te,
|
|
406
405
|
"pinned-top-row-data": (r = e.summary) == null ? void 0 : r.top,
|
|
407
406
|
"pinned-bottom-row-data": (n = e.summary) == null ? void 0 : n.bottom,
|
|
@@ -409,27 +408,28 @@ const Do = /* @__PURE__ */ ze({
|
|
|
409
408
|
"tooltip-show-delay": 500,
|
|
410
409
|
"enable-browser-tooltips": e.browserTooltips,
|
|
411
410
|
"tooltip-interaction": "",
|
|
411
|
+
"no-rows-overlay-component": so,
|
|
412
412
|
onSortChanged: ne,
|
|
413
|
-
onGridReady: t[0] || (t[0] = (s) =>
|
|
413
|
+
onGridReady: t[0] || (t[0] = (s) => g.value = s.api),
|
|
414
414
|
onRowDataUpdated: P,
|
|
415
415
|
onRowSelected: ve,
|
|
416
416
|
onFirstDataRendered: be
|
|
417
417
|
}, null, 8, ["style", "row-data", "column-defs", "default-col-def", "row-selection", "selection-column-def", "pinned-top-row-data", "pinned-bottom-row-data", "theme", "enable-browser-tooltips"]),
|
|
418
418
|
Pe(S("div", {
|
|
419
|
-
class: c(a(
|
|
419
|
+
class: c(a(h)("table-loading-wrapper"))
|
|
420
420
|
}, [
|
|
421
421
|
z(a(Ge), { delay: 300 })
|
|
422
422
|
], 2), [
|
|
423
|
-
[Me,
|
|
423
|
+
[Me, Re.value]
|
|
424
424
|
])
|
|
425
425
|
], 2),
|
|
426
426
|
S("div", {
|
|
427
427
|
class: c(a(i)("pagination-wrapper"))
|
|
428
428
|
}, [
|
|
429
|
-
e.pagination !== !1 ? (
|
|
429
|
+
e.pagination !== !1 ? (w(), J(a(He), q({
|
|
430
430
|
key: 0,
|
|
431
431
|
class: a(i)("pagination")
|
|
432
|
-
}, a(N).pagination, { onChange: xe }), null, 16, ["class"])) :
|
|
432
|
+
}, a(N).pagination, { onChange: xe }), null, 16, ["class"])) : j("", !0)
|
|
433
433
|
], 2)
|
|
434
434
|
], 6)
|
|
435
435
|
], 6);
|
|
@@ -437,5 +437,5 @@ const Do = /* @__PURE__ */ ze({
|
|
|
437
437
|
}
|
|
438
438
|
});
|
|
439
439
|
export {
|
|
440
|
-
|
|
440
|
+
Ko as default
|
|
441
441
|
};
|