@dazhicheng/ui 1.6.80 → 1.6.82
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/dist/api/supplier.js +1 -3
- package/dist/assets/svg/download.svg.js +1 -1
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-button/index.d.ts +28 -28
- package/dist/components/tt-button/index.vue.d.ts +16 -16
- package/dist/components/tt-custom-export-modal/src/assets/search.svg.js +5 -5
- package/dist/components/tt-custom-export-modal/src/assets/star.svg.js +3 -3
- package/dist/components/tt-custom-export-modal/src/assets/trash.svg.js +7 -7
- package/dist/components/tt-custom-export-modal/src/components/FieldGridSection.vue.js +1 -1
- package/dist/components/tt-drawer/index.d.ts +109 -109
- package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +60 -60
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-empty/index.d.ts +4 -4
- package/dist/components/tt-form/src/components/FormElInput.vue.d.ts +10 -10
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-image/index.d.ts +29 -29
- package/dist/components/tt-image/src/components/ImageViewer.d.ts +20 -20
- package/dist/components/tt-image/tt-image.d.ts +29 -29
- package/dist/components/tt-input-textarea/index.vue.d.ts +40 -40
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/components/tt-modal/index.d.ts +150 -150
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts +42 -42
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +17 -17
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +5 -5
- package/dist/components/tt-panel-select/src/index.vue.d.ts +6 -5
- package/dist/components/tt-panel-select/src/index.vue.js +323 -329
- package/dist/components/tt-panel-select/src/types.d.ts +7 -0
- package/dist/components/tt-table/src/hooks/useTableFooter.js +34 -24
- package/dist/components/tt-upload/index.d.ts +60 -60
- package/dist/components/tt-upload/src/TtUpload.vue.d.ts +37 -37
- package/dist/components/tt-upload/src/typing.d.ts +17 -17
- package/dist/hooks/missingOptionsCache.d.ts +27 -1
- package/dist/hooks/missingOptionsCache.js +99 -62
- package/dist/hooks/useFormSchemasLink.js +6 -4
- package/dist/hooks/usePanelSelectSchemas.js +10 -2
- package/dist/packages/utils/src/calc.js +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,96 +1,133 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { CODE_REGISTRY as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
return `${r}::${
|
|
1
|
+
import { ref as P } from "vue";
|
|
2
|
+
import { CODE_REGISTRY as k } from "./basicDataCodes.js";
|
|
3
|
+
const A = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), K = "__tt_panel_select__", _ = P(0);
|
|
4
|
+
function E(r, e) {
|
|
5
|
+
return `${r}::${e}`;
|
|
6
6
|
}
|
|
7
7
|
function f(r) {
|
|
8
8
|
return String(r);
|
|
9
9
|
}
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
return (Array.isArray(r) ? r : []).forEach((
|
|
14
|
-
if (!(
|
|
15
|
-
if (typeof
|
|
16
|
-
const s = f(
|
|
10
|
+
const C = /[,,|/]/;
|
|
11
|
+
function R(r = []) {
|
|
12
|
+
const e = [], n = /* @__PURE__ */ new Set();
|
|
13
|
+
return (Array.isArray(r) ? r : []).forEach((o) => {
|
|
14
|
+
if (!(o == null || o === "")) {
|
|
15
|
+
if (typeof o == "number") {
|
|
16
|
+
const s = f(o);
|
|
17
17
|
if (n.has(s)) return;
|
|
18
|
-
n.add(s),
|
|
18
|
+
n.add(s), e.push(o);
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
String(
|
|
22
|
-
n.has(s) || (n.add(s),
|
|
21
|
+
String(o).split(C).map((s) => s.trim()).filter(Boolean).forEach((s) => {
|
|
22
|
+
n.has(s) || (n.add(s), e.push(s));
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
25
|
+
}), e;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const
|
|
29
|
-
|
|
27
|
+
function O(r = []) {
|
|
28
|
+
const e = /* @__PURE__ */ new Set(), n = (o = []) => {
|
|
29
|
+
o.forEach((s) => {
|
|
30
30
|
var u;
|
|
31
31
|
if ((u = s.children) != null && u.length) {
|
|
32
32
|
n(s.children);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
s.value !== void 0 && s.value !== null && s.value !== "" &&
|
|
35
|
+
s.value !== void 0 && s.value !== null && s.value !== "" && e.add(f(s.value));
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
-
return n(Array.isArray(r) ? r : []),
|
|
38
|
+
return n(Array.isArray(r) ? r : []), e;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const n =
|
|
42
|
-
let
|
|
43
|
-
return
|
|
40
|
+
function $(r, e) {
|
|
41
|
+
const n = E(r, e);
|
|
42
|
+
let o = A.get(n);
|
|
43
|
+
return o || (o = /* @__PURE__ */ new Map(), A.set(n, o)), o;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
const n =
|
|
45
|
+
function B(r, e) {
|
|
46
|
+
const n = A.get(E(r, e));
|
|
47
47
|
return n ? Array.from(n.values()) : [];
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
const
|
|
51
|
-
if (!s.length) return
|
|
52
|
-
const u =
|
|
53
|
-
return
|
|
49
|
+
function x(r, e, n = []) {
|
|
50
|
+
const o = Array.isArray(n) ? n : [], s = B(r, e);
|
|
51
|
+
if (!s.length) return o;
|
|
52
|
+
const u = O(o), a = s.filter((t) => t.value !== void 0 && !u.has(f(t.value)));
|
|
53
|
+
return a.length ? [...o, ...a] : o;
|
|
54
54
|
}
|
|
55
|
-
function V(r = [],
|
|
55
|
+
function V(r = [], e) {
|
|
56
56
|
return !Array.isArray(r) || !r.length ? Array.isArray(r) ? r : [] : r.map((n) => {
|
|
57
|
-
var
|
|
58
|
-
return (
|
|
57
|
+
var o;
|
|
58
|
+
return (o = n == null ? void 0 : n.children) != null && o.length ? { ...n, children: V(n.children, e) } : (n == null ? void 0 : n.deleted) === !0 ? { ...n, disabled: e } : n;
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
return
|
|
64
|
-
const
|
|
65
|
-
u.has(
|
|
61
|
+
function M(r, e, n) {
|
|
62
|
+
const o = O(e), s = [], u = /* @__PURE__ */ new Set();
|
|
63
|
+
return R(r).forEach((a) => {
|
|
64
|
+
const t = f(a);
|
|
65
|
+
u.has(t) || o.has(t) || n.has(t) || (u.add(t), s.push(a));
|
|
66
66
|
}), s;
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
69
|
-
const s =
|
|
68
|
+
async function L(r, e, n, o = []) {
|
|
69
|
+
const s = k[e], u = s == null ? void 0 : s.fetchMissingOptions, a = $(r, e);
|
|
70
70
|
if (!u)
|
|
71
|
-
return Array.from(
|
|
72
|
-
const
|
|
73
|
-
if (!
|
|
74
|
-
return Array.from(
|
|
75
|
-
const i = `${
|
|
76
|
-
let
|
|
77
|
-
return
|
|
78
|
-
const
|
|
79
|
-
let
|
|
80
|
-
return
|
|
71
|
+
return Array.from(a.values());
|
|
72
|
+
const t = M(n, o, a);
|
|
73
|
+
if (!t.length)
|
|
74
|
+
return Array.from(a.values());
|
|
75
|
+
const i = `${E(r, e)}::${t.map(f).sort().join(",")}`;
|
|
76
|
+
let h = p.get(i);
|
|
77
|
+
return h || (h = u(t).then((y) => {
|
|
78
|
+
const c = Array.isArray(y) ? y : [];
|
|
79
|
+
let g = !1;
|
|
80
|
+
return c.forEach((l) => {
|
|
81
|
+
if ((l == null ? void 0 : l.value) === void 0 || (l == null ? void 0 : l.value) === null || (l == null ? void 0 : l.value) === "") return;
|
|
82
|
+
const w = f(l.value);
|
|
83
|
+
a.has(w) || (a.set(w, l), g = !0);
|
|
84
|
+
}), g && (_.value += 1), Array.from(a.values());
|
|
85
|
+
}).finally(() => {
|
|
86
|
+
p.get(i) === h && p.delete(i);
|
|
87
|
+
}), p.set(i, h)), h;
|
|
88
|
+
}
|
|
89
|
+
function S(r) {
|
|
90
|
+
const e = r || K;
|
|
91
|
+
let n = v.get(e);
|
|
92
|
+
return n || (n = /* @__PURE__ */ new Map(), v.set(e, n)), n;
|
|
93
|
+
}
|
|
94
|
+
function N(r) {
|
|
95
|
+
const e = v.get(r);
|
|
96
|
+
return e ? Array.from(e.values()) : [];
|
|
97
|
+
}
|
|
98
|
+
async function T(r, e, n = [], o) {
|
|
99
|
+
const s = S(r);
|
|
100
|
+
if (!o)
|
|
101
|
+
return Array.from(s.values());
|
|
102
|
+
const u = M(e, n, s);
|
|
103
|
+
if (!u.length)
|
|
104
|
+
return Array.from(s.values());
|
|
105
|
+
const a = `${r}::${u.map(f).sort().join(",")}`;
|
|
106
|
+
let t = d.get(a);
|
|
107
|
+
return t || (t = Promise.resolve().then(() => o(u)).then((i) => {
|
|
108
|
+
const h = Array.isArray(i) ? i : [];
|
|
109
|
+
let y = !1;
|
|
110
|
+
return h.forEach((c) => {
|
|
81
111
|
if ((c == null ? void 0 : c.value) === void 0 || (c == null ? void 0 : c.value) === null || (c == null ? void 0 : c.value) === "") return;
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
}),
|
|
112
|
+
const g = f(c.value);
|
|
113
|
+
s.has(g) || (s.set(g, c), y = !0);
|
|
114
|
+
}), y && (_.value += 1), Array.from(s.values());
|
|
85
115
|
}).finally(() => {
|
|
86
|
-
|
|
87
|
-
}),
|
|
116
|
+
d.get(a) === t && d.delete(a);
|
|
117
|
+
}), d.set(a, t)), t;
|
|
118
|
+
}
|
|
119
|
+
function j(r, e, n = []) {
|
|
120
|
+
return M(e, n, S(r));
|
|
88
121
|
}
|
|
89
122
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
123
|
+
K as PANEL_MISSING_ECHO_DEFAULT_SCOPE,
|
|
124
|
+
j as diffPanelMissingCodes,
|
|
125
|
+
L as ensureMissingOptions,
|
|
126
|
+
T as ensurePanelResolveMissingOptions,
|
|
127
|
+
R as expandJoinedOptionValues,
|
|
128
|
+
B as getEchoOptions,
|
|
129
|
+
x as getMergedOptions,
|
|
130
|
+
N as getPanelMissingEchoOptions,
|
|
131
|
+
_ as missingOptionsEchoVersion,
|
|
95
132
|
V as withMissingOptionDisabled
|
|
96
133
|
};
|
|
@@ -74,9 +74,7 @@ function oe(r = {}, l = te, c) {
|
|
|
74
74
|
showAll: re
|
|
75
75
|
});
|
|
76
76
|
if (R && !c) {
|
|
77
|
-
const e = String(
|
|
78
|
-
((H = (Z = r.fieldConfigs) == null ? void 0 : Z.purchasePlaceId) == null ? void 0 : H.fieldName) || ee.purchasePlaceId
|
|
79
|
-
);
|
|
77
|
+
const e = String(((H = (Z = r.fieldConfigs) == null ? void 0 : Z.purchasePlaceId) == null ? void 0 : H.fieldName) || ee.purchasePlaceId);
|
|
80
78
|
be(P, G.PURCHASE_PLACE, e);
|
|
81
79
|
}
|
|
82
80
|
const D = R && !c ? Ie(() => {
|
|
@@ -209,7 +207,11 @@ function oe(r = {}, l = te, c) {
|
|
|
209
207
|
};
|
|
210
208
|
}
|
|
211
209
|
function q(e, t, n, o, i) {
|
|
212
|
-
const s = b(e), u = Ee(s.componentProps, t, n, o), f = E(e), {
|
|
210
|
+
const s = b(e), u = Ee(s.componentProps, t, n, o), f = E(e), {
|
|
211
|
+
onChange: a,
|
|
212
|
+
resolveMissingOptions: S,
|
|
213
|
+
...m
|
|
214
|
+
} = u, d = K(s.customOptions) ? s.customOptions(t, o) : o, I = w(e) === "TtPanelSelect", F = I && e === "shopId" ? ie(d) : I && e === "purchasePlaceId" ? se(d) : d, v = I ? X(F) : d, ae = I && e === "purchasePlaceId";
|
|
213
215
|
return I ? {
|
|
214
216
|
multiple: f,
|
|
215
217
|
showAll: s.showAll ?? (e === "shopId" && g === "action" ? V(h(t, p("platformId"))).length > 0 : !0),
|
|
@@ -104,7 +104,11 @@ function He(t, n = {}) {
|
|
|
104
104
|
const A = D(r, e.code);
|
|
105
105
|
let O = w ? se(o[w], A) : A;
|
|
106
106
|
re(e.customOptions) && (O = e.customOptions(o, O) || []);
|
|
107
|
-
const b = q(O), U = ee(e.componentProps, o, u, O), {
|
|
107
|
+
const b = q(O), U = ee(e.componentProps, o, u, O), {
|
|
108
|
+
onChange: Q,
|
|
109
|
+
resolveMissingOptions: E,
|
|
110
|
+
...I
|
|
111
|
+
} = U;
|
|
108
112
|
return {
|
|
109
113
|
multiple: K,
|
|
110
114
|
showAll: ce,
|
|
@@ -183,7 +187,11 @@ function He(t, n = {}) {
|
|
|
183
187
|
rules: o.rules,
|
|
184
188
|
dependencies: I,
|
|
185
189
|
componentProps: (d, x) => {
|
|
186
|
-
const y = D(r, e.code), M = oe(d[h], y, _), ae = q(M), de = ee(o.componentProps, d, x, M), {
|
|
190
|
+
const y = D(r, e.code), M = oe(d[h], y, _), ae = q(M), de = ee(o.componentProps, d, x, M), {
|
|
191
|
+
onChange: Fe,
|
|
192
|
+
resolveMissingOptions: be,
|
|
193
|
+
...me
|
|
194
|
+
} = de;
|
|
187
195
|
return {
|
|
188
196
|
multiple: b,
|
|
189
197
|
showAll: U,
|