@aplus-frontend/ui 6.13.3 → 6.13.4
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/ap-form/ap-form.vue2.mjs +123 -120
- package/es/src/ap-form/dependency/index.vue.mjs +26 -28
- package/es/src/ap-form/hooks/use-watch.mjs +28 -31
- package/es/src/ap-form/interface.d.ts +5 -0
- package/es/src/ap-form/search-form/hooks/use-collapse-input-count.mjs +22 -24
- package/es/src/ap-form/utils/get.d.ts +2 -0
- package/es/src/ap-form/utils/get.mjs +12 -7
- package/es/src/ap-grid/editable/form-item.vue.mjs +84 -87
- package/es/src/business/batch-input-group/form-item.vue.mjs +34 -28
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +9 -7
- package/es/src/editable-table/form-item.vue.mjs +78 -81
- package/es/src/locale/lang/en.mjs +1 -1
- package/es/src/locale/lang/zh-cn.mjs +1 -1
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/dependency/index.vue.js +1 -1
- package/lib/src/ap-form/hooks/use-watch.js +1 -1
- package/lib/src/ap-form/interface.d.ts +5 -0
- package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.js +1 -1
- package/lib/src/ap-form/utils/get.d.ts +2 -0
- package/lib/src/ap-form/utils/get.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as K, useSlots as H, toRef as P, ref as h, unref as u, watch as A, nextTick as W, createBlock as G, openBlock as U, mergeProps as y, withCtx as g, createVNode as $, createSlots as q, renderList as J, renderSlot as Q, normalizeProps as X, guardReactiveProps as Y } from "vue";
|
|
2
2
|
import { ApForm as C } from "../../ap-form/index.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { isUndefined as Z, isNumber as m, cloneDeep as I, isArray as M, omit as ee } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { isDef as
|
|
6
|
-
import { useGetEditableColumns as
|
|
5
|
+
import { isDef as w } from "../../utils/index.mjs";
|
|
6
|
+
import { useGetEditableColumns as oe } from "../hooks/use-editable-columns.mjs";
|
|
7
7
|
import "../index.vue2.mjs";
|
|
8
|
-
import { useInjectForm as
|
|
8
|
+
import { useInjectForm as te } from "../../ap-form/context.mjs";
|
|
9
|
+
import { getModelValue as ae } from "../../ap-form/utils/get.mjs";
|
|
9
10
|
import { useNamespace as le } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
11
|
import { useGlobalConfig as ne } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
|
-
import
|
|
12
|
-
const
|
|
12
|
+
import re from "../index.vue.mjs";
|
|
13
|
+
const we = /* @__PURE__ */ K({
|
|
13
14
|
name: "EditableGridFormItem",
|
|
14
15
|
__name: "form-item",
|
|
15
16
|
props: {
|
|
@@ -161,134 +162,130 @@ const Ce = /* @__PURE__ */ P({
|
|
|
161
162
|
default: () => ({})
|
|
162
163
|
}
|
|
163
164
|
},
|
|
164
|
-
setup(
|
|
165
|
-
expose:
|
|
165
|
+
setup(b, {
|
|
166
|
+
expose: x
|
|
166
167
|
}) {
|
|
167
|
-
const
|
|
168
|
-
b:
|
|
169
|
-
} = le("editable-grid")
|
|
170
|
-
function F(e, t) {
|
|
171
|
-
return w(t) ? t.reduce((n, a) => n == null ? void 0 : n[a], e) : e == null ? void 0 : e[t];
|
|
172
|
-
}
|
|
173
|
-
const {
|
|
168
|
+
const R = H(), l = b, {
|
|
169
|
+
b: B
|
|
170
|
+
} = le("editable-grid"), {
|
|
174
171
|
internalInstance: o,
|
|
175
|
-
model:
|
|
176
|
-
} =
|
|
177
|
-
|
|
178
|
-
var
|
|
179
|
-
await
|
|
172
|
+
model: S
|
|
173
|
+
} = te(), p = P(l.name), d = h(ae(u(S), p.value) || []), v = C.useWatch(p);
|
|
174
|
+
A(() => v.value, async (e) => {
|
|
175
|
+
var a;
|
|
176
|
+
await W(), d.value = e, (a = l.onChange) == null || a.call(l, e);
|
|
180
177
|
}, {
|
|
181
178
|
deep: !0
|
|
182
179
|
});
|
|
183
|
-
const c = h(),
|
|
184
|
-
function
|
|
185
|
-
var
|
|
186
|
-
const
|
|
187
|
-
if (
|
|
180
|
+
const c = h(), F = ne("valueTypeMap"), N = oe(l, F);
|
|
181
|
+
function D(e, a) {
|
|
182
|
+
var n;
|
|
183
|
+
const r = ((n = u(d)) == null ? void 0 : n.length) || 0;
|
|
184
|
+
if (w(l.maxLength) && r >= l.maxLength)
|
|
188
185
|
return;
|
|
189
|
-
const
|
|
186
|
+
const t = {
|
|
190
187
|
...e || {}
|
|
191
188
|
};
|
|
192
|
-
o == null || o.setFieldValue(l.name,
|
|
193
|
-
if (!
|
|
194
|
-
|
|
189
|
+
o == null || o.setFieldValue(l.name, t, !0, (f, s) => {
|
|
190
|
+
if (!f[s]) {
|
|
191
|
+
f[s] = [t];
|
|
195
192
|
return;
|
|
196
193
|
}
|
|
197
|
-
|
|
194
|
+
Z(a) ? f[s].push(t) : f[s].splice(a, 0, t);
|
|
198
195
|
});
|
|
199
196
|
}
|
|
200
|
-
function
|
|
201
|
-
var
|
|
202
|
-
const
|
|
203
|
-
if (
|
|
197
|
+
function V(e, a = "suffix") {
|
|
198
|
+
var f;
|
|
199
|
+
const r = ((f = u(d)) == null ? void 0 : f.length) || 0, t = m(e) ? e : e.length;
|
|
200
|
+
if (w(l.maxLength) && r + t > l.maxLength)
|
|
204
201
|
return;
|
|
205
|
-
const
|
|
206
|
-
o == null || o.setFieldValue(l.name,
|
|
202
|
+
const n = m(e) ? new Array(e).fill(0).map(() => ({})) : I(e);
|
|
203
|
+
o == null || o.setFieldValue(l.name, n, !0, (s, i) => {
|
|
207
204
|
if (!s[i]) {
|
|
208
|
-
s[i] = [...
|
|
205
|
+
s[i] = [...n];
|
|
209
206
|
return;
|
|
210
207
|
}
|
|
211
|
-
|
|
208
|
+
a === "suffix" ? s[i].push(...n) : s[i].unshift(...n);
|
|
212
209
|
});
|
|
213
210
|
}
|
|
214
|
-
function
|
|
215
|
-
const
|
|
216
|
-
o == null || o.setFieldValue(l.name, void 0, !0, (
|
|
217
|
-
|
|
211
|
+
function L(e) {
|
|
212
|
+
const a = new Set(m(e) ? [e] : e);
|
|
213
|
+
o == null || o.setFieldValue(l.name, void 0, !0, (r, t) => {
|
|
214
|
+
r[t] = r[t].filter((n, f) => !a.has(f));
|
|
218
215
|
});
|
|
219
216
|
}
|
|
220
|
-
function
|
|
221
|
-
var
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
|
|
217
|
+
function T(e) {
|
|
218
|
+
var r;
|
|
219
|
+
const a = new Set(M(e) ? e : [e]);
|
|
220
|
+
a.size !== 0 && ((r = o == null ? void 0 : o.setFieldValue) == null || r.call(o, l.name, void 0, !0, (t, n) => {
|
|
221
|
+
t[n] = t[n].filter((f) => !a.has(f[l.rowKey]));
|
|
225
222
|
}));
|
|
226
223
|
}
|
|
227
|
-
function
|
|
224
|
+
function k() {
|
|
228
225
|
return u(d);
|
|
229
226
|
}
|
|
230
|
-
function
|
|
231
|
-
var
|
|
232
|
-
return (
|
|
227
|
+
function _(e) {
|
|
228
|
+
var a;
|
|
229
|
+
return (a = u(d)) == null ? void 0 : a[e];
|
|
233
230
|
}
|
|
234
|
-
function
|
|
235
|
-
o == null || o.setFieldValue(l.name, void 0, !0, (
|
|
236
|
-
if (!(!
|
|
237
|
-
if (!
|
|
238
|
-
const
|
|
239
|
-
for (const s of
|
|
240
|
-
s !== l.rowKey && delete
|
|
231
|
+
function j(e, a, r = !0) {
|
|
232
|
+
o == null || o.setFieldValue(l.name, void 0, !0, (t, n) => {
|
|
233
|
+
if (!(!t[n] || !t[n][e])) {
|
|
234
|
+
if (!r) {
|
|
235
|
+
const f = Object.keys(t[n][e]);
|
|
236
|
+
for (const s of f)
|
|
237
|
+
s !== l.rowKey && delete t[n][e][s];
|
|
241
238
|
}
|
|
242
|
-
Object.assign(
|
|
243
|
-
...
|
|
239
|
+
Object.assign(t[n][e], {
|
|
240
|
+
...a
|
|
244
241
|
});
|
|
245
242
|
}
|
|
246
243
|
});
|
|
247
244
|
}
|
|
248
|
-
function
|
|
245
|
+
function E(e) {
|
|
249
246
|
o == null || o.setFieldValue(l.name, e);
|
|
250
247
|
}
|
|
251
|
-
function
|
|
252
|
-
var
|
|
253
|
-
const
|
|
254
|
-
(
|
|
248
|
+
function O(e) {
|
|
249
|
+
var r;
|
|
250
|
+
const a = e === "end" ? d.value.length - 1 : e;
|
|
251
|
+
(r = c.value) == null || r.scrollToRow(a);
|
|
255
252
|
}
|
|
256
|
-
function
|
|
253
|
+
function z() {
|
|
257
254
|
var e;
|
|
258
255
|
(e = o == null ? void 0 : o.setFieldValue) == null || e.call(o, l.name, []);
|
|
259
256
|
}
|
|
260
|
-
return
|
|
261
|
-
add:
|
|
262
|
-
remove:
|
|
263
|
-
getRowData:
|
|
264
|
-
getRowsData:
|
|
265
|
-
setRowData:
|
|
266
|
-
addMultiple:
|
|
267
|
-
scrollTo:
|
|
268
|
-
setTableData:
|
|
269
|
-
clear:
|
|
270
|
-
removeByKey:
|
|
271
|
-
}), (e,
|
|
257
|
+
return x({
|
|
258
|
+
add: D,
|
|
259
|
+
remove: L,
|
|
260
|
+
getRowData: _,
|
|
261
|
+
getRowsData: k,
|
|
262
|
+
setRowData: j,
|
|
263
|
+
addMultiple: V,
|
|
264
|
+
scrollTo: O,
|
|
265
|
+
setTableData: E,
|
|
266
|
+
clear: z,
|
|
267
|
+
removeByKey: T
|
|
268
|
+
}), (e, a) => (U(), G(u(C).FormItem, y(e.formItem, {
|
|
272
269
|
name: e.name,
|
|
273
270
|
label: e.label
|
|
274
271
|
}), {
|
|
275
|
-
default: g(() => [
|
|
272
|
+
default: g(() => [$(re, y(u(ee)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
|
|
276
273
|
ref_key: "tableRef",
|
|
277
274
|
ref: c,
|
|
278
|
-
class: u(
|
|
279
|
-
columns: u(
|
|
275
|
+
class: u(B)(),
|
|
276
|
+
columns: u(N),
|
|
280
277
|
"data-source": d.value,
|
|
281
278
|
"search-form": !1
|
|
282
|
-
}),
|
|
279
|
+
}), q({
|
|
283
280
|
_: 2
|
|
284
|
-
}, [
|
|
285
|
-
name:
|
|
286
|
-
fn: g((
|
|
281
|
+
}, [J(R, (r, t) => ({
|
|
282
|
+
name: t,
|
|
283
|
+
fn: g((n) => [Q(e.$slots, t, X(Y(n || {})))])
|
|
287
284
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
288
285
|
_: 3
|
|
289
286
|
}, 16, ["name", "label"]));
|
|
290
287
|
}
|
|
291
288
|
});
|
|
292
289
|
export {
|
|
293
|
-
|
|
290
|
+
we as default
|
|
294
291
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, computed as n, createBlock as g, openBlock as V, mergeProps as m, unref as s, withCtx as _, createVNode as x } from "vue";
|
|
2
2
|
import "./index.vue2.mjs";
|
|
3
3
|
import "../../ap-form/item/index.vue2.mjs";
|
|
4
|
-
import { isValid as
|
|
5
|
-
import { omit as
|
|
6
|
-
import
|
|
7
|
-
import k from "
|
|
8
|
-
|
|
4
|
+
import { isValid as p } from "@aplus-frontend/utils";
|
|
5
|
+
import { omit as c } from "lodash-unified";
|
|
6
|
+
import { useInjectForm as F } from "../../ap-form/context.mjs";
|
|
7
|
+
import { getModelValue as k } from "../../ap-form/utils/get.mjs";
|
|
8
|
+
import C from "../../ap-form/item/index.vue.mjs";
|
|
9
|
+
import S from "./index.vue.mjs";
|
|
10
|
+
const L = /* @__PURE__ */ B({
|
|
9
11
|
name: "ApFormItemBatchInputGroup",
|
|
10
12
|
__name: "form-item",
|
|
11
13
|
props: {
|
|
@@ -56,30 +58,34 @@ const $ = /* @__PURE__ */ b({
|
|
|
56
58
|
trim: { type: Boolean, default: !0 },
|
|
57
59
|
defaultSelectedAllKey: { type: Boolean }
|
|
58
60
|
},
|
|
59
|
-
setup(
|
|
60
|
-
const l =
|
|
61
|
+
setup(v) {
|
|
62
|
+
const l = v, { internalInstance: r } = F(), y = n(() => (l == null ? void 0 : l.transform) || {
|
|
61
63
|
flat: !1,
|
|
62
64
|
transformer: (e) => {
|
|
63
|
-
var
|
|
65
|
+
var i, o, a, d, u, f;
|
|
64
66
|
if (e)
|
|
65
|
-
return !(e != null && e.value) || ((
|
|
67
|
+
return !(e != null && e.value) || ((i = e == null ? void 0 : e.value) == null ? void 0 : i.length) < 1 ? void 0 : (o = l == null ? void 0 : l.field) != null && o.options ? {
|
|
66
68
|
...e,
|
|
67
|
-
value: (
|
|
68
|
-
} : (
|
|
69
|
+
value: (d = (a = e == null ? void 0 : e.value) == null ? void 0 : a.filter((t) => p(t == null ? void 0 : t.trim()))) == null ? void 0 : d.map((t) => l.trim ? t == null ? void 0 : t.trim() : t)
|
|
70
|
+
} : (f = (u = e == null ? void 0 : e.value) == null ? void 0 : u.filter((t) => p(t == null ? void 0 : t.trim()))) == null ? void 0 : f.map((t) => l.trim ? t == null ? void 0 : t.trim() : t);
|
|
69
71
|
}
|
|
70
|
-
}),
|
|
72
|
+
}), h = n(() => {
|
|
71
73
|
var e;
|
|
72
74
|
return ((e = l.field) == null ? void 0 : e.style) || "width:auto";
|
|
73
|
-
}),
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
}), b = n(() => {
|
|
76
|
+
var i, o;
|
|
77
|
+
if (l.initialValue)
|
|
78
|
+
return l.initialValue;
|
|
79
|
+
const e = r == null ? void 0 : r.getInitialValues();
|
|
80
|
+
if (!k(e, l.name))
|
|
81
|
+
return {
|
|
82
|
+
key: (o = (i = l == null ? void 0 : l.field) == null ? void 0 : i.options) == null ? void 0 : o.map((a) => a.value)
|
|
83
|
+
};
|
|
78
84
|
});
|
|
79
|
-
return (e,
|
|
80
|
-
var o,
|
|
81
|
-
return
|
|
82
|
-
|
|
85
|
+
return (e, i) => {
|
|
86
|
+
var o, a;
|
|
87
|
+
return V(), g(C, m(
|
|
88
|
+
s(c)(l, [
|
|
83
89
|
"field",
|
|
84
90
|
"initialValue",
|
|
85
91
|
"transform",
|
|
@@ -87,14 +93,14 @@ const $ = /* @__PURE__ */ b({
|
|
|
87
93
|
"disabled"
|
|
88
94
|
]),
|
|
89
95
|
{
|
|
90
|
-
"initial-value":
|
|
91
|
-
transform:
|
|
92
|
-
bordered: (
|
|
96
|
+
"initial-value": b.value,
|
|
97
|
+
transform: y.value,
|
|
98
|
+
bordered: (a = (o = e.field) == null ? void 0 : o.options) != null && a.length ? !1 : e.bordered
|
|
93
99
|
}
|
|
94
100
|
), {
|
|
95
101
|
default: _(() => [
|
|
96
|
-
|
|
97
|
-
style:
|
|
102
|
+
x(S, m(s(c)(l.field, ["style"]), {
|
|
103
|
+
style: h.value,
|
|
98
104
|
disabled: e.disabled,
|
|
99
105
|
placeholer: e.placeholer
|
|
100
106
|
}), null, 16, ["style", "disabled", "placeholer"])
|
|
@@ -105,5 +111,5 @@ const $ = /* @__PURE__ */ b({
|
|
|
105
111
|
}
|
|
106
112
|
});
|
|
107
113
|
export {
|
|
108
|
-
|
|
114
|
+
L as default
|
|
109
115
|
};
|
|
@@ -32,30 +32,32 @@ const J = /* @__PURE__ */ k({
|
|
|
32
32
|
}
|
|
33
33
|
h(r);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function N(t) {
|
|
36
36
|
var a;
|
|
37
37
|
o.disabled ? n.value = !1 : n.value = t, !t && ((a = o.onClose) == null || a.call(o));
|
|
38
38
|
}
|
|
39
|
-
const { b: s, e:
|
|
39
|
+
const { b: s, e: V, em: y, bm: I } = R("batch-input-group-popover-input");
|
|
40
40
|
return (t, a) => (w(), A("div", {
|
|
41
41
|
class: p(e(s)())
|
|
42
42
|
}, [
|
|
43
43
|
u(e(L), {
|
|
44
|
-
"overlay-class-name": e(
|
|
44
|
+
"overlay-class-name": e(V)("popover"),
|
|
45
45
|
"get-popup-container": x,
|
|
46
46
|
trigger: "click",
|
|
47
47
|
placement: "bottomLeft",
|
|
48
48
|
open: n.value,
|
|
49
|
-
onOpenChange:
|
|
49
|
+
onOpenChange: N
|
|
50
50
|
}, {
|
|
51
51
|
content: f(() => [
|
|
52
52
|
B("div", {
|
|
53
|
-
class: p(e(
|
|
53
|
+
class: p(e(y)("popover", "content"))
|
|
54
54
|
}, [
|
|
55
55
|
u(e(P), {
|
|
56
56
|
ref_key: "textAreaRef",
|
|
57
57
|
ref: l,
|
|
58
|
-
placeholder: e(C)("ap.batchInputGroup.popoverInputPlaceholder"
|
|
58
|
+
placeholder: e(C)("ap.batchInputGroup.popoverInputPlaceholder", {
|
|
59
|
+
maxNum: t.maxNum + ""
|
|
60
|
+
}),
|
|
59
61
|
bordered: !1,
|
|
60
62
|
rows: 10,
|
|
61
63
|
value: e(b),
|
|
@@ -69,7 +71,7 @@ const J = /* @__PURE__ */ k({
|
|
|
69
71
|
u(e(z), {
|
|
70
72
|
class: p([
|
|
71
73
|
e(s)("trigger-icon"),
|
|
72
|
-
t.disabled ? e(
|
|
74
|
+
t.disabled ? e(I)("trigger-icon", "disabled") : null
|
|
73
75
|
])
|
|
74
76
|
}, null, 8, ["class"])
|
|
75
77
|
]),
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Table as
|
|
1
|
+
import { defineComponent as A, ref as c, unref as n, useSlots as O, toRef as G, watch as H, nextTick as U, createBlock as W, openBlock as $, mergeProps as h, withCtx as w, createVNode as q, createSlots as J, renderList as Q, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
|
|
2
|
+
import { Table as I } from "@aplus-frontend/antdv";
|
|
3
3
|
import { ApForm as x } from "../ap-form/index.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { isUndefined as M, isNumber as i, cloneDeep as ee, isArray as oe, omit as g } from "lodash-unified";
|
|
5
5
|
import "../config-provider/index.mjs";
|
|
6
|
-
import { useInjectForm as
|
|
7
|
-
import { isDef as
|
|
8
|
-
import
|
|
9
|
-
import { scrollToRowIndex as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
6
|
+
import { useInjectForm as te } from "../ap-form/context.mjs";
|
|
7
|
+
import { isDef as y } from "../utils/index.mjs";
|
|
8
|
+
import ae from "./hooks/use-get-columns.mjs";
|
|
9
|
+
import { scrollToRowIndex as le } from "./utils.mjs";
|
|
10
|
+
import { getModelValue as ue } from "../ap-form/utils/get.mjs";
|
|
11
|
+
import { useNamespace as se } from "../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import { useGlobalConfig as fe } from "../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
const be = /* @__PURE__ */ A({
|
|
13
14
|
name: "EditableTableFormItem",
|
|
14
15
|
__name: "form-item",
|
|
15
16
|
props: {
|
|
@@ -109,127 +110,123 @@ const ye = /* @__PURE__ */ G({
|
|
|
109
110
|
default: () => ({})
|
|
110
111
|
}
|
|
111
112
|
},
|
|
112
|
-
setup(
|
|
113
|
-
expose:
|
|
113
|
+
setup(b, {
|
|
114
|
+
expose: C
|
|
114
115
|
}) {
|
|
115
|
-
const l =
|
|
116
|
-
function B(e, a) {
|
|
117
|
-
return g(a) ? a.reduce((u, t) => u == null ? void 0 : u[t], e) : e == null ? void 0 : e[a];
|
|
118
|
-
}
|
|
119
|
-
const {
|
|
116
|
+
const l = b, {
|
|
120
117
|
internalInstance: o,
|
|
121
|
-
model:
|
|
122
|
-
} =
|
|
123
|
-
|
|
118
|
+
model: R
|
|
119
|
+
} = te(), d = c(ue(n(R), l.name) || []), B = O(), F = G(l, "name"), v = x.useWatch(F);
|
|
120
|
+
H(() => v.value, async (e) => {
|
|
124
121
|
var a;
|
|
125
|
-
await
|
|
122
|
+
await U(), d.value = e, (a = l.onChange) == null || a.call(l, e);
|
|
126
123
|
}, {
|
|
127
124
|
deep: !0
|
|
128
125
|
});
|
|
129
126
|
const {
|
|
130
|
-
b:
|
|
131
|
-
} =
|
|
132
|
-
function
|
|
133
|
-
var
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
127
|
+
b: T
|
|
128
|
+
} = se("editable-table"), p = c(), D = fe("valueTypeMap"), V = ae(l, D);
|
|
129
|
+
function L(e, a) {
|
|
130
|
+
var u;
|
|
131
|
+
const s = ((u = n(d)) == null ? void 0 : u.length) || 0;
|
|
132
|
+
if (y(l.maxLength) && s >= l.maxLength)
|
|
136
133
|
return;
|
|
137
134
|
const t = {
|
|
138
135
|
...e || {}
|
|
139
136
|
};
|
|
140
|
-
o == null || o.setFieldValue(l.name, t, !0, (
|
|
141
|
-
if (!
|
|
142
|
-
|
|
137
|
+
o == null || o.setFieldValue(l.name, t, !0, (f, r) => {
|
|
138
|
+
if (!f[r]) {
|
|
139
|
+
f[r] = [t];
|
|
143
140
|
return;
|
|
144
141
|
}
|
|
145
|
-
|
|
142
|
+
M(a) ? f[r].push(t) : f[r].splice(a, 0, t);
|
|
146
143
|
});
|
|
147
144
|
}
|
|
148
|
-
function
|
|
149
|
-
var
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
145
|
+
function S(e, a = "suffix") {
|
|
146
|
+
var f;
|
|
147
|
+
const s = ((f = n(d)) == null ? void 0 : f.length) || 0, t = i(e) ? e : e.length;
|
|
148
|
+
if (y(l.maxLength) && s + t > l.maxLength)
|
|
152
149
|
return;
|
|
153
|
-
const
|
|
154
|
-
o == null || o.setFieldValue(l.name,
|
|
155
|
-
if (!r[
|
|
156
|
-
r[
|
|
150
|
+
const u = i(e) ? new Array(e).fill(0).map(() => ({})) : ee(e);
|
|
151
|
+
o == null || o.setFieldValue(l.name, u, !0, (r, m) => {
|
|
152
|
+
if (!r[m]) {
|
|
153
|
+
r[m] = [...u];
|
|
157
154
|
return;
|
|
158
155
|
}
|
|
159
|
-
a === "suffix" ? r[
|
|
156
|
+
a === "suffix" ? r[m].push(...u) : r[m].unshift(...u);
|
|
160
157
|
});
|
|
161
158
|
}
|
|
162
|
-
function
|
|
163
|
-
const a = new Set(
|
|
164
|
-
o == null || o.setFieldValue(l.name, void 0, !0, (
|
|
165
|
-
|
|
159
|
+
function N(e) {
|
|
160
|
+
const a = new Set(i(e) ? [e] : e);
|
|
161
|
+
o == null || o.setFieldValue(l.name, void 0, !0, (s, t) => {
|
|
162
|
+
s[t] = s[t].filter((u, f) => !a.has(f));
|
|
166
163
|
});
|
|
167
164
|
}
|
|
168
|
-
function
|
|
169
|
-
var
|
|
170
|
-
const a = new Set(
|
|
171
|
-
a.size !== 0 && ((
|
|
172
|
-
t[
|
|
165
|
+
function E(e) {
|
|
166
|
+
var s;
|
|
167
|
+
const a = new Set(oe(e) ? e : [e]);
|
|
168
|
+
a.size !== 0 && ((s = o == null ? void 0 : o.setFieldValue) == null || s.call(o, l.name, void 0, !0, (t, u) => {
|
|
169
|
+
t[u] = t[u].filter((f) => !a.has(f[l.rowKey]));
|
|
173
170
|
}));
|
|
174
171
|
}
|
|
175
|
-
function
|
|
176
|
-
return
|
|
172
|
+
function _() {
|
|
173
|
+
return n(d);
|
|
177
174
|
}
|
|
178
|
-
function
|
|
175
|
+
function k(e) {
|
|
179
176
|
var a;
|
|
180
|
-
return (a =
|
|
177
|
+
return (a = n(d)) == null ? void 0 : a[e];
|
|
181
178
|
}
|
|
182
|
-
function
|
|
183
|
-
o == null || o.setFieldValue(l.name, void 0, !0, (t,
|
|
184
|
-
!t[
|
|
185
|
-
...
|
|
179
|
+
function j(e, a, s = !0) {
|
|
180
|
+
o == null || o.setFieldValue(l.name, void 0, !0, (t, u) => {
|
|
181
|
+
!t[u] || !t[u][e] || (t[u][e] = {
|
|
182
|
+
...s ? t[u][e] : {},
|
|
186
183
|
...a
|
|
187
184
|
});
|
|
188
185
|
});
|
|
189
186
|
}
|
|
190
|
-
function
|
|
187
|
+
function z(e) {
|
|
191
188
|
o == null || o.setFieldValue(l.name, e);
|
|
192
189
|
}
|
|
193
|
-
function
|
|
190
|
+
function K(e, a) {
|
|
194
191
|
var t;
|
|
195
|
-
const
|
|
196
|
-
|
|
192
|
+
const s = e === "end" ? d.value.length - 1 : e;
|
|
193
|
+
le(s, (t = p.value) == null ? void 0 : t.$el, a);
|
|
197
194
|
}
|
|
198
|
-
function
|
|
195
|
+
function P() {
|
|
199
196
|
var e;
|
|
200
197
|
(e = o == null ? void 0 : o.setFieldValue) == null || e.call(o, l.name, []);
|
|
201
198
|
}
|
|
202
|
-
return
|
|
203
|
-
add:
|
|
204
|
-
remove:
|
|
205
|
-
getRowData:
|
|
206
|
-
getRowsData:
|
|
207
|
-
setRowData:
|
|
208
|
-
addMultiple:
|
|
209
|
-
scrollTo:
|
|
210
|
-
setTableData:
|
|
211
|
-
clear:
|
|
212
|
-
removeByKey:
|
|
213
|
-
}), (e, a) => (
|
|
199
|
+
return C({
|
|
200
|
+
add: L,
|
|
201
|
+
remove: N,
|
|
202
|
+
getRowData: k,
|
|
203
|
+
getRowsData: _,
|
|
204
|
+
setRowData: j,
|
|
205
|
+
addMultiple: S,
|
|
206
|
+
scrollTo: K,
|
|
207
|
+
setTableData: z,
|
|
208
|
+
clear: P,
|
|
209
|
+
removeByKey: E
|
|
210
|
+
}), (e, a) => ($(), W(n(x).FormItem, h(e.formItem, {
|
|
214
211
|
name: e.name,
|
|
215
212
|
label: e.label
|
|
216
213
|
}), {
|
|
217
|
-
default: w(() => [
|
|
214
|
+
default: w(() => [q(n(I), h(n(g)(l, ["name", "maxLength", "onChange"]), {
|
|
218
215
|
ref_key: "tableRef",
|
|
219
216
|
ref: p,
|
|
220
|
-
class:
|
|
221
|
-
columns:
|
|
217
|
+
class: n(T)(),
|
|
218
|
+
columns: n(V),
|
|
222
219
|
"data-source": d.value
|
|
223
|
-
}),
|
|
220
|
+
}), J({
|
|
224
221
|
_: 2
|
|
225
|
-
}, [
|
|
222
|
+
}, [Q(n(g)(B, ["headerCell"]), (s, t) => ({
|
|
226
223
|
name: t,
|
|
227
|
-
fn: w((
|
|
224
|
+
fn: w((u) => [X(e.$slots, t, Y(Z(u || {})))])
|
|
228
225
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
229
226
|
_: 3
|
|
230
227
|
}, 16, ["name", "label"]));
|
|
231
228
|
}
|
|
232
229
|
});
|
|
233
230
|
export {
|
|
234
|
-
|
|
231
|
+
be as default
|
|
235
232
|
};
|
|
@@ -148,7 +148,7 @@ const a = {
|
|
|
148
148
|
appendix: "Appendix"
|
|
149
149
|
},
|
|
150
150
|
batchInputGroup: {
|
|
151
|
-
popoverInputPlaceholder: "A maximum of
|
|
151
|
+
popoverInputPlaceholder: "A maximum of {maxNum} entries can be entered in batches, separated by newlines"
|
|
152
152
|
},
|
|
153
153
|
apSummary: {
|
|
154
154
|
total: "Total"
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.13.
|
|
1
|
+
declare const _default: "6.13.4";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED