@dazhicheng/ui 1.6.52 → 1.6.54
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/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 +5 -5
- package/dist/components/tt-panel-select/src/index.vue.js +127 -124
- 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/usePanelSelectSchemas.js +92 -98
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "axios";
|
|
2
2
|
import "element-plus";
|
|
3
|
-
import { isFunction as
|
|
3
|
+
import { isFunction as X } from "../packages/utils/src/is.js";
|
|
4
4
|
import "vue";
|
|
5
5
|
import "dayjs";
|
|
6
6
|
import "numeral";
|
|
@@ -12,129 +12,124 @@ import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
|
12
12
|
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
13
13
|
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
14
|
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
15
|
-
import { omit as
|
|
16
|
-
import { CODE_REGISTRY as
|
|
17
|
-
import { useBasicDataOptions as
|
|
15
|
+
import { omit as _ } from "lodash-es";
|
|
16
|
+
import { CODE_REGISTRY as ce, resolveDefaultGroupBy as le, CODES as pe, GROUP_BY as V, groupPurchasePlaceOptions as ue, groupBasicDataOptions as ie } from "./basicDataCodes.js";
|
|
17
|
+
import { useBasicDataOptions as ae } from "./useBasicDataOptions.js";
|
|
18
18
|
const E = "all";
|
|
19
19
|
function d(t) {
|
|
20
20
|
return Array.isArray(t) ? t : t == null || t === "" ? [] : [t];
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function de(t, n = E) {
|
|
23
23
|
return t === n ? !0 : typeof t == "string" && typeof n == "string" && t.toLowerCase() === String(n).toLowerCase();
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return d(t).some((r) =>
|
|
25
|
+
function me(t, n = E) {
|
|
26
|
+
return d(t).some((r) => de(r, n));
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function he(t) {
|
|
29
29
|
return t.replace(/[-_]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").split(/\s+/).filter(Boolean).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join("");
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
return s.includes(r) ? s : `${s},${r}`;
|
|
34
|
-
}
|
|
35
|
-
function H(t, n, r, s) {
|
|
36
|
-
return t ? v(t) ? t(n, r, s) : t : {};
|
|
31
|
+
function j(t, n, r, c) {
|
|
32
|
+
return t ? X(t) ? t(n, r, c) : t : {};
|
|
37
33
|
}
|
|
38
|
-
function
|
|
34
|
+
function q(t, n, r, c) {
|
|
39
35
|
const p = new Set(r.map((e) => e.value)), l = t[n];
|
|
40
|
-
if (
|
|
41
|
-
const e = d(l).filter((u) => p.has(u)),
|
|
42
|
-
(e.length !==
|
|
36
|
+
if (c) {
|
|
37
|
+
const e = d(l).filter((u) => p.has(u)), s = d(l);
|
|
38
|
+
(e.length !== s.length || e.some((u, g) => u !== s[g])) && (t[n] = e);
|
|
43
39
|
return;
|
|
44
40
|
}
|
|
45
41
|
l == null || l === "" || p.has(l) || (t[n] = void 0);
|
|
46
42
|
}
|
|
47
|
-
function
|
|
48
|
-
const e = l ? p.filter((
|
|
43
|
+
function H(t, n, r, c, p, l) {
|
|
44
|
+
const e = l ? p.filter((s) => d(r[n]).includes(s.value)) : p.find((s) => s.value === r[n]);
|
|
49
45
|
return {
|
|
50
46
|
values: r,
|
|
51
|
-
actions:
|
|
47
|
+
actions: c,
|
|
52
48
|
fieldName: n,
|
|
53
49
|
code: t,
|
|
54
50
|
options: p,
|
|
55
51
|
currentOption: e
|
|
56
52
|
};
|
|
57
53
|
}
|
|
58
|
-
function
|
|
59
|
-
const
|
|
60
|
-
if (!
|
|
61
|
-
if (
|
|
62
|
-
const p = new Set(
|
|
54
|
+
function Z(t, n, r) {
|
|
55
|
+
const c = d(t);
|
|
56
|
+
if (!c.length) return [];
|
|
57
|
+
if (me(t, r)) return n;
|
|
58
|
+
const p = new Set(c);
|
|
63
59
|
return n.filter((l) => p.has(l.value));
|
|
64
60
|
}
|
|
65
|
-
function
|
|
61
|
+
function J(t, n) {
|
|
66
62
|
const r = new Set(d(t));
|
|
67
|
-
return r.size ? n.filter((
|
|
63
|
+
return r.size ? n.filter((c) => !r.has(c.value)) : n;
|
|
68
64
|
}
|
|
69
|
-
function
|
|
70
|
-
var
|
|
71
|
-
const r = (
|
|
65
|
+
function Q(t, n) {
|
|
66
|
+
var c;
|
|
67
|
+
const r = (c = t.value) == null ? void 0 : c[n];
|
|
72
68
|
return Array.isArray(r) ? r : [];
|
|
73
69
|
}
|
|
74
|
-
function
|
|
75
|
-
const r = [...new Set(t.map((e) => e.code))],
|
|
76
|
-
(e,
|
|
70
|
+
function _e(t, n = {}) {
|
|
71
|
+
const r = [...new Set(t.map((e) => e.code))], c = t.reduce(
|
|
72
|
+
(e, s) => (e[s.code] = (e[s.code] || 0) + 1, e),
|
|
77
73
|
{}
|
|
78
|
-
), { dataSource: p } =
|
|
74
|
+
), { dataSource: p } = ae({
|
|
79
75
|
codes: r,
|
|
80
76
|
dataSource: n.dataSource
|
|
81
77
|
}), l = {};
|
|
82
78
|
return t.forEach((e) => {
|
|
83
|
-
var
|
|
84
|
-
const
|
|
85
|
-
function
|
|
86
|
-
return
|
|
79
|
+
var $;
|
|
80
|
+
const s = ce[e.code], u = e.fieldName || s.defaultFieldName, g = e.key || ((c[e.code] || 0) > 1 ? u : e.code), k = e.label || s.defaultLabel, R = e.multiple ?? s.defaultMultiple, v = e.showAll ?? s.defaultShowAll, N = e.showAllField ?? E, m = e.mutexWith, b = le(e.code, e.groupBy), y = e.code === pe.PURCHASE_PLACE, D = b === V.NONE, T = b === V.PINYIN, f = !y && !D && !T, S = s.defaultTreeConfig, U = !!S, I = y ? !1 : s.defaultShowNav ?? !1;
|
|
81
|
+
function W(o) {
|
|
82
|
+
return y ? ue(o) : f ? ie(o, b) : o;
|
|
87
83
|
}
|
|
88
|
-
const
|
|
84
|
+
const C = [
|
|
89
85
|
...m ? [m] : [],
|
|
90
|
-
...((
|
|
91
|
-
],
|
|
92
|
-
...
|
|
93
|
-
triggerFields:
|
|
86
|
+
...(($ = e.dependencies) == null ? void 0 : $.triggerFields) || []
|
|
87
|
+
], Y = [...new Set(C)], ee = _(e.dependencies || {}, ["triggerFields"]), te = Y.length ? {
|
|
88
|
+
...ee,
|
|
89
|
+
triggerFields: Y
|
|
94
90
|
} : e.dependencies, L = {
|
|
95
91
|
component: "TtPanelSelect",
|
|
96
92
|
fieldName: u,
|
|
97
93
|
label: k,
|
|
98
94
|
rules: e.rules,
|
|
99
|
-
dependencies:
|
|
95
|
+
dependencies: te,
|
|
100
96
|
componentProps: (o, x) => {
|
|
101
|
-
const P =
|
|
102
|
-
let a = m ?
|
|
103
|
-
|
|
104
|
-
const
|
|
97
|
+
const P = Q(p, e.code);
|
|
98
|
+
let a = m ? J(o[m], P) : P;
|
|
99
|
+
X(e.customOptions) && (a = e.customOptions(o, a) || []);
|
|
100
|
+
const F = W(a), M = j(e.componentProps, o, x, a), { onChange: z, ...O } = M;
|
|
105
101
|
return {
|
|
106
|
-
multiple:
|
|
107
|
-
showAll:
|
|
108
|
-
showAllField:
|
|
109
|
-
showNav:
|
|
110
|
-
showOriginMode:
|
|
111
|
-
showPinyinMode:
|
|
112
|
-
...
|
|
113
|
-
...
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
var y;
|
|
102
|
+
multiple: R,
|
|
103
|
+
showAll: v,
|
|
104
|
+
showAllField: N,
|
|
105
|
+
showNav: I,
|
|
106
|
+
showOriginMode: D,
|
|
107
|
+
showPinyinMode: U || y ? !1 : T,
|
|
108
|
+
...S ? { treeConfig: S } : {},
|
|
109
|
+
...O,
|
|
110
|
+
options: F,
|
|
111
|
+
onChange(A) {
|
|
112
|
+
var w;
|
|
118
113
|
if (m) {
|
|
119
|
-
const i = Array.isArray(o[m]), h =
|
|
120
|
-
|
|
114
|
+
const i = Array.isArray(o[m]), h = J(A, P);
|
|
115
|
+
q(o, m, h, i);
|
|
121
116
|
}
|
|
122
117
|
if (e.exclude) {
|
|
123
|
-
const i = e.exclude.fieldName, h = e.exclude.multiple ?? !0,
|
|
124
|
-
d(
|
|
118
|
+
const i = e.exclude.fieldName, h = e.exclude.multiple ?? !0, B = Z(A, P, N);
|
|
119
|
+
d(A).length ? q(o, i, B, h) : o[i] = h ? [] : void 0;
|
|
125
120
|
}
|
|
126
|
-
(
|
|
121
|
+
(w = e.onChange) == null || w.call(
|
|
127
122
|
e,
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
A,
|
|
124
|
+
H(e.code, u, o, x, a, R)
|
|
130
125
|
);
|
|
131
126
|
}
|
|
132
127
|
};
|
|
133
128
|
}
|
|
134
129
|
};
|
|
135
|
-
if (l[
|
|
130
|
+
if (l[g] = {
|
|
136
131
|
...L,
|
|
137
|
-
|
|
132
|
+
..._(e, [
|
|
138
133
|
"code",
|
|
139
134
|
"key",
|
|
140
135
|
"fieldName",
|
|
@@ -159,41 +154,40 @@ function $e(t, n = {}) {
|
|
|
159
154
|
componentProps: L.componentProps,
|
|
160
155
|
component: "TtPanelSelect"
|
|
161
156
|
}, e.exclude) {
|
|
162
|
-
const o = e.exclude, x = o.fieldName, P = o.key || `exclude${
|
|
163
|
-
...
|
|
164
|
-
triggerFields:
|
|
165
|
-
if:
|
|
166
|
-
},
|
|
157
|
+
const o = e.exclude, x = o.fieldName, P = o.key || `exclude${he(g)}`, a = o.label || s.defaultExcludeLabel, F = o.multiple ?? !0, M = o.showAll ?? !1, z = o.showAllField ?? E, O = o.dependencies || {}, A = {
|
|
158
|
+
...O,
|
|
159
|
+
triggerFields: O.triggerFields ?? [u],
|
|
160
|
+
if: O.if ?? ((i) => d(i[u]).length > 0)
|
|
161
|
+
}, w = {
|
|
167
162
|
component: "TtPanelSelect",
|
|
168
163
|
fieldName: x,
|
|
169
164
|
label: a,
|
|
170
165
|
rules: o.rules,
|
|
171
|
-
dependencies:
|
|
166
|
+
dependencies: A,
|
|
172
167
|
componentProps: (i, h) => {
|
|
173
|
-
const
|
|
168
|
+
const B = Q(p, e.code), G = Z(i[u], B, N), ne = W(G), oe = j(o.componentProps, i, h, G), { onChange: xe, ...re } = oe;
|
|
174
169
|
return {
|
|
175
|
-
multiple:
|
|
176
|
-
showAll:
|
|
170
|
+
multiple: F,
|
|
171
|
+
showAll: M,
|
|
177
172
|
showAllField: z,
|
|
178
|
-
showNav:
|
|
179
|
-
showOriginMode:
|
|
180
|
-
showPinyinMode:
|
|
181
|
-
...
|
|
182
|
-
...
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
(V = o.onChange) == null || V.call(
|
|
173
|
+
showNav: I,
|
|
174
|
+
showOriginMode: D,
|
|
175
|
+
showPinyinMode: U || y ? !1 : T,
|
|
176
|
+
...S ? { treeConfig: S } : {},
|
|
177
|
+
...re,
|
|
178
|
+
options: ne,
|
|
179
|
+
onChange(se) {
|
|
180
|
+
var K;
|
|
181
|
+
(K = o.onChange) == null || K.call(
|
|
188
182
|
o,
|
|
189
|
-
|
|
190
|
-
|
|
183
|
+
se,
|
|
184
|
+
H(
|
|
191
185
|
e.code,
|
|
192
186
|
x,
|
|
193
187
|
i,
|
|
194
188
|
h,
|
|
195
|
-
|
|
196
|
-
|
|
189
|
+
G,
|
|
190
|
+
F
|
|
197
191
|
)
|
|
198
192
|
);
|
|
199
193
|
}
|
|
@@ -201,8 +195,8 @@ function $e(t, n = {}) {
|
|
|
201
195
|
}
|
|
202
196
|
};
|
|
203
197
|
l[P] = {
|
|
204
|
-
...
|
|
205
|
-
|
|
198
|
+
...w,
|
|
199
|
+
..._(o, [
|
|
206
200
|
"fieldName",
|
|
207
201
|
"label",
|
|
208
202
|
"key",
|
|
@@ -217,8 +211,8 @@ function $e(t, n = {}) {
|
|
|
217
211
|
fieldName: x,
|
|
218
212
|
label: a,
|
|
219
213
|
rules: o.rules,
|
|
220
|
-
dependencies:
|
|
221
|
-
componentProps:
|
|
214
|
+
dependencies: w.dependencies,
|
|
215
|
+
componentProps: w.componentProps,
|
|
222
216
|
component: "TtPanelSelect"
|
|
223
217
|
};
|
|
224
218
|
}
|
|
@@ -228,5 +222,5 @@ function $e(t, n = {}) {
|
|
|
228
222
|
};
|
|
229
223
|
}
|
|
230
224
|
export {
|
|
231
|
-
|
|
225
|
+
_e as usePanelSelectSchemas
|
|
232
226
|
};
|