@aplus-frontend/ui 6.25.0 → 6.26.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/index.vue.mjs +36 -32
- package/es/src/ap-form/search-form/index.vue.d.ts +2 -8
- package/es/src/ap-form/search-form/index.vue.mjs +23 -24
- package/es/src/ap-grid/editable/form-item.vue.mjs +1 -0
- package/es/src/ap-grid/editable/index.vue.mjs +1 -0
- package/es/src/ap-grid/index.vue.mjs +229 -212
- package/es/src/ap-grid/interface.d.ts +13 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +41 -41
- package/es/src/utils/copy.mjs +14 -4
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +2 -8
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +13 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/utils/copy.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -87,8 +87,8 @@ const Do = /* @__PURE__ */ ze({
|
|
|
87
87
|
},
|
|
88
88
|
setup(X, { expose: Y }) {
|
|
89
89
|
Le.registerModules([Oe]);
|
|
90
|
-
const o = X, h = Ae(), { e: y, b: i, be: Z } = lo("ag-grid"),
|
|
91
|
-
let
|
|
90
|
+
const o = X, h = Ae(), { e: y, b: i, be: Z } = lo("ag-grid"), f = v(o.size), _ = eo(f, j(o, "rowHeight")), w = v(), [, ee] = _e();
|
|
91
|
+
let u = !!o.dataSource;
|
|
92
92
|
const A = no(o), { shownColumns: d, shownColumnsBackup: oe } = oo(o), { defaultColDef: te, columnDefs: ae } = to(
|
|
93
93
|
d,
|
|
94
94
|
o
|
|
@@ -105,7 +105,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
105
105
|
};
|
|
106
106
|
function ne() {
|
|
107
107
|
var s;
|
|
108
|
-
const e = (s =
|
|
108
|
+
const e = (s = w.value.getColumns()) == null ? void 0 : s.filter((T) => T.getSort() !== void 0);
|
|
109
109
|
if (!(e != null && e.length))
|
|
110
110
|
return;
|
|
111
111
|
const t = e[0], r = t.getColDef(), n = t.getSort();
|
|
@@ -125,10 +125,10 @@ const Do = /* @__PURE__ */ ze({
|
|
|
125
125
|
return ((n = r.type) == null ? void 0 : n.name) === "ApView";
|
|
126
126
|
});
|
|
127
127
|
}), {
|
|
128
|
-
formRef:
|
|
128
|
+
formRef: m,
|
|
129
129
|
submit: C,
|
|
130
130
|
reset: F,
|
|
131
|
-
data:
|
|
131
|
+
data: p,
|
|
132
132
|
tableProps: N,
|
|
133
133
|
handleTableChangeOptional: V,
|
|
134
134
|
submitWith: I,
|
|
@@ -139,7 +139,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
139
139
|
} = $e({
|
|
140
140
|
async request(e) {
|
|
141
141
|
var r;
|
|
142
|
-
if (
|
|
142
|
+
if (u = !1, !R(o.dataSource)) {
|
|
143
143
|
const n = e.pageSize * (e.current - 1);
|
|
144
144
|
return {
|
|
145
145
|
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(n, n + e.pageSize)) || [],
|
|
@@ -161,7 +161,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
161
161
|
pagination: o.pagination,
|
|
162
162
|
sortFields: le
|
|
163
163
|
}), ue = l(
|
|
164
|
-
() => R(o.dataSource) ?
|
|
164
|
+
() => R(o.dataSource) ? p.records : o.dataSource
|
|
165
165
|
), {
|
|
166
166
|
select: me,
|
|
167
167
|
unSelect: pe,
|
|
@@ -202,28 +202,32 @@ const Do = /* @__PURE__ */ ze({
|
|
|
202
202
|
return je(o.rowKey) ? o.rowKey(e) : e[o.rowKey];
|
|
203
203
|
}
|
|
204
204
|
const P = ({
|
|
205
|
-
api: e =
|
|
205
|
+
api: e = w.value
|
|
206
206
|
}) => {
|
|
207
207
|
if (!o.rowSelection)
|
|
208
208
|
return;
|
|
209
209
|
const t = B.value;
|
|
210
|
-
if (!t.length)
|
|
210
|
+
if (!t.length) {
|
|
211
|
+
setTimeout(() => {
|
|
212
|
+
u = !0;
|
|
213
|
+
}, 0);
|
|
211
214
|
return;
|
|
212
|
-
|
|
215
|
+
}
|
|
216
|
+
u = !1;
|
|
213
217
|
const r = [];
|
|
214
218
|
e.forEachNode((n) => {
|
|
215
219
|
const s = n.data, T = x(s);
|
|
216
220
|
t.find((De) => x(De) === T) && r.push(n);
|
|
217
221
|
}), e.setNodesSelected({ nodes: r, newValue: !0 }), setTimeout(() => {
|
|
218
|
-
|
|
222
|
+
u = !0;
|
|
219
223
|
}, 0);
|
|
220
224
|
}, ve = (e) => {
|
|
221
|
-
|
|
225
|
+
u && (e.node.isSelected() ? me(e.data) : pe(e.data));
|
|
222
226
|
}, be = () => {
|
|
223
|
-
|
|
227
|
+
u = !0;
|
|
224
228
|
}, M = () => {
|
|
225
229
|
var e;
|
|
226
|
-
we(), (e =
|
|
230
|
+
we(), (e = w.value) == null || e.deselectAll();
|
|
227
231
|
};
|
|
228
232
|
function Re(e) {
|
|
229
233
|
ge(e), Ke(() => {
|
|
@@ -233,40 +237,40 @@ const Do = /* @__PURE__ */ ze({
|
|
|
233
237
|
function W(e = !1) {
|
|
234
238
|
var r, n, s;
|
|
235
239
|
const t = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
236
|
-
return (s = (n = (r =
|
|
240
|
+
return (s = (n = (r = m.value) == null ? void 0 : r.apForm) == null ? void 0 : n[t]) == null ? void 0 : s.call(n, !0);
|
|
237
241
|
}
|
|
238
242
|
function L(e) {
|
|
239
243
|
var t, r, n;
|
|
240
|
-
(n = (r = (t =
|
|
244
|
+
(n = (r = (t = m.value) == null ? void 0 : t.apForm) == null ? void 0 : r.setFieldsValue) == null || n.call(r, e);
|
|
241
245
|
}
|
|
242
246
|
function O() {
|
|
243
247
|
var e;
|
|
244
|
-
return ((e =
|
|
248
|
+
return ((e = m.value) == null ? void 0 : e.getSorterItems()) || [];
|
|
245
249
|
}
|
|
246
250
|
function G(e) {
|
|
247
251
|
var t;
|
|
248
|
-
(t =
|
|
252
|
+
(t = m.value) == null || t.setSorterItems(e);
|
|
249
253
|
}
|
|
250
254
|
function H() {
|
|
251
255
|
var e;
|
|
252
|
-
(e =
|
|
256
|
+
(e = m.value) == null || e.resetSorterItems();
|
|
253
257
|
}
|
|
254
258
|
Xe({
|
|
255
259
|
columns: l(() => d.value),
|
|
256
260
|
columnsBackup: l(() => oe.value),
|
|
257
|
-
size: l(() => Ze[
|
|
261
|
+
size: l(() => Ze[f.value]),
|
|
258
262
|
updateColumns(e) {
|
|
259
263
|
var t;
|
|
260
|
-
|
|
264
|
+
d.value = e, (t = o.onShownColumnsChange) == null || t.call(o, e);
|
|
261
265
|
},
|
|
262
266
|
updateSize(e) {
|
|
263
|
-
|
|
267
|
+
f.value = Ye[e];
|
|
264
268
|
},
|
|
265
269
|
renderConfig: l(() => ({
|
|
266
270
|
className: Z("table-header", "title"),
|
|
267
271
|
color: ee.value.colorTextTertiary
|
|
268
272
|
})),
|
|
269
|
-
dataSource: l(() => a(
|
|
273
|
+
dataSource: l(() => a(p).records),
|
|
270
274
|
getSearchFormValues: W,
|
|
271
275
|
setSearchFormValues: L,
|
|
272
276
|
submit: C,
|
|
@@ -278,12 +282,12 @@ const Do = /* @__PURE__ */ ze({
|
|
|
278
282
|
resetSearchFormSorterItems: H
|
|
279
283
|
});
|
|
280
284
|
const Ce = l(
|
|
281
|
-
() => R(o.loading) ?
|
|
285
|
+
() => R(o.loading) ? p.loading : o.loading
|
|
282
286
|
), Fe = l(() => [
|
|
283
287
|
i(),
|
|
284
288
|
o.card ? null : i("wrapper"),
|
|
285
289
|
i("adaptive"),
|
|
286
|
-
i(`size-${
|
|
290
|
+
i(`size-${f.value}`)
|
|
287
291
|
].filter(Boolean)), Be = l(() => ({
|
|
288
292
|
height: "100%",
|
|
289
293
|
...o.tableStyle || {}
|
|
@@ -296,7 +300,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
296
300
|
}
|
|
297
301
|
function ke(e, t) {
|
|
298
302
|
var r;
|
|
299
|
-
(r =
|
|
303
|
+
(r = w.value) == null || r.ensureIndexVisible(e, t);
|
|
300
304
|
}
|
|
301
305
|
return k(
|
|
302
306
|
() => o.dataSource,
|
|
@@ -307,10 +311,10 @@ const Do = /* @__PURE__ */ ze({
|
|
|
307
311
|
), k(
|
|
308
312
|
() => o.size,
|
|
309
313
|
(e) => {
|
|
310
|
-
|
|
314
|
+
f.value = e;
|
|
311
315
|
}
|
|
312
316
|
), k(
|
|
313
|
-
() => a(
|
|
317
|
+
() => a(p).loading,
|
|
314
318
|
(e) => {
|
|
315
319
|
var t;
|
|
316
320
|
(t = o.onLoadingChange) == null || t.call(o, e);
|
|
@@ -329,7 +333,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
329
333
|
clearAll: M
|
|
330
334
|
},
|
|
331
335
|
scrollToRow: ke,
|
|
332
|
-
getDataSource: () => a(
|
|
336
|
+
getDataSource: () => a(p.records),
|
|
333
337
|
getPaging: ie,
|
|
334
338
|
setPaging: de,
|
|
335
339
|
getSearchFormSorterItems: O,
|
|
@@ -348,7 +352,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
348
352
|
}, [
|
|
349
353
|
z(a(qe).SearchForm, U(e.searchForm || {}, {
|
|
350
354
|
ref_key: "formRef",
|
|
351
|
-
ref:
|
|
355
|
+
ref: m,
|
|
352
356
|
"custom-reset": "",
|
|
353
357
|
"submit-loading": a(N).loading,
|
|
354
358
|
onSubmit: a(C),
|
|
@@ -389,7 +393,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
389
393
|
}, [
|
|
390
394
|
z(a(We), {
|
|
391
395
|
style: b(Be.value),
|
|
392
|
-
"row-data": a(
|
|
396
|
+
"row-data": a(p).records,
|
|
393
397
|
"column-defs": a(ae),
|
|
394
398
|
"default-col-def": a(te),
|
|
395
399
|
"locale-text": {
|
|
@@ -406,7 +410,7 @@ const Do = /* @__PURE__ */ ze({
|
|
|
406
410
|
"enable-browser-tooltips": e.browserTooltips,
|
|
407
411
|
"tooltip-interaction": "",
|
|
408
412
|
onSortChanged: ne,
|
|
409
|
-
onGridReady: t[0] || (t[0] = (s) =>
|
|
413
|
+
onGridReady: t[0] || (t[0] = (s) => w.value = s.api),
|
|
410
414
|
onRowDataUpdated: P,
|
|
411
415
|
onRowSelected: ve,
|
|
412
416
|
onFirstDataRendered: be
|
|
@@ -414,10 +414,7 @@ declare function __VLS_template(): {
|
|
|
414
414
|
default: string | number | ColSize;
|
|
415
415
|
};
|
|
416
416
|
xl: {
|
|
417
|
-
type: PropType<string | number |
|
|
418
|
-
*最后一行剩余的空间
|
|
419
|
-
tips: 如果有小数,则其包含误差, 会比实际值更大
|
|
420
|
-
*/).ColSize>;
|
|
417
|
+
type: PropType<string | number | ColSize>;
|
|
421
418
|
default: string | number | ColSize;
|
|
422
419
|
};
|
|
423
420
|
xxl: {
|
|
@@ -1256,10 +1253,7 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
|
|
|
1256
1253
|
default: string | number | ColSize;
|
|
1257
1254
|
};
|
|
1258
1255
|
xl: {
|
|
1259
|
-
type: PropType<string | number |
|
|
1260
|
-
*最后一行剩余的空间
|
|
1261
|
-
tips: 如果有小数,则其包含误差, 会比实际值更大
|
|
1262
|
-
*/).ColSize>;
|
|
1256
|
+
type: PropType<string | number | ColSize>;
|
|
1263
1257
|
default: string | number | ColSize;
|
|
1264
1258
|
};
|
|
1265
1259
|
xxl: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { isVNode as se, defineComponent as ie, useSlots as
|
|
1
|
+
import { isVNode as se, defineComponent as ie, useSlots as ue, ref as D, shallowRef as U, computed as _, unref as n, watch as z, createVNode as o, Fragment as w, createBlock as g, openBlock as d, mergeProps as ce, withCtx as B, resolveDynamicComponent as I, createElementBlock as pe, renderList as de, normalizeStyle as fe } from "vue";
|
|
2
2
|
import { Col as R, Flex as k, Button as M, Row as me } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../ap-form.vue.mjs";
|
|
4
4
|
import "../item/index.vue2.mjs";
|
|
5
5
|
import { genRealChildren as q } from "../item-group/helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { isArray as he, isBoolean as xe, omit as
|
|
7
|
+
import { isArray as he, isBoolean as xe, omit as ye } from "lodash-unified";
|
|
8
8
|
import { isDef as H } from "../../utils/index.mjs";
|
|
9
|
-
import { execFunc as G, diffFormItem as
|
|
9
|
+
import { execFunc as G, diffFormItem as ge } from "./utils.mjs";
|
|
10
10
|
import "./components/popover-filter.vue.mjs";
|
|
11
11
|
import { useCountPerRow as ve } from "./hooks/use-count-per-row.mjs";
|
|
12
12
|
import "./components/popover-sorter/index.vue.mjs";
|
|
@@ -121,7 +121,7 @@ const s = 100, Xe = /* @__PURE__ */ ie({
|
|
|
121
121
|
expose: Q
|
|
122
122
|
}) {
|
|
123
123
|
var W;
|
|
124
|
-
const i =
|
|
124
|
+
const i = ue(), t = f, {
|
|
125
125
|
b: m
|
|
126
126
|
} = _e("ap-form-search-form"), {
|
|
127
127
|
t: T
|
|
@@ -143,7 +143,7 @@ const s = 100, Xe = /* @__PURE__ */ ie({
|
|
|
143
143
|
handleClickConfirm: F
|
|
144
144
|
} = Ce(h);
|
|
145
145
|
z(() => i.default(), (e) => {
|
|
146
|
-
E = h.value, h.value =
|
|
146
|
+
E = h.value, h.value = ge(E, q(e)), L.value = !1;
|
|
147
147
|
}), z(() => {
|
|
148
148
|
var e;
|
|
149
149
|
return (e = i.extra) == null ? void 0 : e.call(i);
|
|
@@ -154,28 +154,27 @@ const s = 100, Xe = /* @__PURE__ */ ie({
|
|
|
154
154
|
return J(e * (s / 24), 4);
|
|
155
155
|
}
|
|
156
156
|
const l = _(() => {
|
|
157
|
-
const e = h.value, a = [], r = [],
|
|
158
|
-
console.log("_spanPerCol", c);
|
|
157
|
+
const e = h.value, a = [], r = [], y = [], u = n(O);
|
|
159
158
|
let C = 0, N = 0;
|
|
160
|
-
const ne = s * t.maxRows -
|
|
159
|
+
const ne = s * t.maxRows - u * (n(p) && !t.extraInAction ? 2 : 1);
|
|
161
160
|
e.forEach((A) => {
|
|
162
|
-
const
|
|
163
|
-
if (xe(
|
|
161
|
+
const c = Se(A).props;
|
|
162
|
+
if (xe(c.hidden) ? !!c.hidden : H(c.hidden))
|
|
164
163
|
a.push(A);
|
|
165
164
|
else {
|
|
166
|
-
let S =
|
|
165
|
+
let S = c.span ? te(c.span) : u;
|
|
167
166
|
const j = {
|
|
168
167
|
node: A,
|
|
169
168
|
span: S,
|
|
170
|
-
key: `ApFormSearchFormItem-${ee(
|
|
169
|
+
key: `ApFormSearchFormItem-${ee(c.name)}-${c._signal}`
|
|
171
170
|
}, V = s - C % s;
|
|
172
|
-
V < S && (S += V), C += S, C > ne ? r.push(j) : (N = C,
|
|
171
|
+
V < S && (S += V), C += S, C > ne ? r.push(j) : (N = C, y.push(j));
|
|
173
172
|
}
|
|
174
173
|
});
|
|
175
|
-
const $ = s - (N +
|
|
174
|
+
const $ = s - (N + u) % s, le = Math.ceil(N) % s < u, re = $ < u ? s : $;
|
|
176
175
|
return {
|
|
177
176
|
hideNode: o(w, null, [a]),
|
|
178
|
-
nodes:
|
|
177
|
+
nodes: y,
|
|
179
178
|
collapseNodes: r,
|
|
180
179
|
extraSpan: re,
|
|
181
180
|
lastRowOnlyIncludeActionAndExtra: le
|
|
@@ -226,7 +225,7 @@ const s = 100, Xe = /* @__PURE__ */ ie({
|
|
|
226
225
|
}), t.extraInAction ? n(p) : null]
|
|
227
226
|
})]
|
|
228
227
|
})]
|
|
229
|
-
}),
|
|
228
|
+
}), y = !t.extraInAction && n(p) ? o(R, {
|
|
230
229
|
flex: x(l.value.extraSpan),
|
|
231
230
|
key: "extraNode"
|
|
232
231
|
}, {
|
|
@@ -237,10 +236,10 @@ const s = 100, Xe = /* @__PURE__ */ ie({
|
|
|
237
236
|
default: () => [e]
|
|
238
237
|
})]
|
|
239
238
|
})]
|
|
240
|
-
}) : null,
|
|
239
|
+
}) : null, u = o(R, {
|
|
241
240
|
flex: x(l.value.extraSpan)
|
|
242
241
|
}, null);
|
|
243
|
-
return l.value.lastRowOnlyIncludeActionAndExtra ? o(w, null, [
|
|
242
|
+
return l.value.lastRowOnlyIncludeActionAndExtra ? o(w, null, [y || u, r]) : o(w, null, [r, y]);
|
|
244
243
|
});
|
|
245
244
|
function ae() {
|
|
246
245
|
var a;
|
|
@@ -252,24 +251,24 @@ const s = 100, Xe = /* @__PURE__ */ ie({
|
|
|
252
251
|
getSorterItems: () => b.value,
|
|
253
252
|
setSorterItems: F,
|
|
254
253
|
resetSorterItems: ae
|
|
255
|
-
}), (e, a) => (d(),
|
|
254
|
+
}), (e, a) => (d(), g(Fe, ce({
|
|
256
255
|
ref_key: "apForm",
|
|
257
256
|
ref: v,
|
|
258
257
|
class: n(m)()
|
|
259
|
-
}, n(
|
|
260
|
-
default: B(() => [(d(),
|
|
258
|
+
}, n(ye)(t, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
|
|
259
|
+
default: B(() => [(d(), g(I(l.value.hideNode))), o(n(me), {
|
|
261
260
|
gutter: 8
|
|
262
261
|
}, {
|
|
263
|
-
default: B(() => [(d(!0), pe(w, null, de(l.value.nodes, (r) => (d(),
|
|
262
|
+
default: B(() => [(d(!0), pe(w, null, de(l.value.nodes, (r) => (d(), g(n(R), {
|
|
264
263
|
key: r.key,
|
|
265
264
|
flex: x(r.span),
|
|
266
265
|
style: fe({
|
|
267
266
|
maxWidth: x(r.span)
|
|
268
267
|
})
|
|
269
268
|
}, {
|
|
270
|
-
default: B(() => [(d(),
|
|
269
|
+
default: B(() => [(d(), g(I(r.node)))]),
|
|
271
270
|
_: 2
|
|
272
|
-
}, 1032, ["flex", "style"]))), 128)), (d(),
|
|
271
|
+
}, 1032, ["flex", "style"]))), 128)), (d(), g(I(oe.value)))]),
|
|
273
272
|
_: 1
|
|
274
273
|
})]),
|
|
275
274
|
_: 1
|