@dazhicheng/ui 1.6.53 → 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.
Files changed (31) hide show
  1. package/dist/assets/svg/download.svg.js +1 -1
  2. package/dist/components/tt-area/TtArea.vue.js +1 -1
  3. package/dist/components/tt-button/index.d.ts +28 -28
  4. package/dist/components/tt-button/index.vue.d.ts +16 -16
  5. package/dist/components/tt-custom-export-modal/src/assets/search.svg.js +5 -5
  6. package/dist/components/tt-custom-export-modal/src/assets/star.svg.js +3 -3
  7. package/dist/components/tt-custom-export-modal/src/assets/trash.svg.js +7 -7
  8. package/dist/components/tt-custom-export-modal/src/components/FieldGridSection.vue.js +1 -1
  9. package/dist/components/tt-drawer/index.d.ts +109 -109
  10. package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +60 -60
  11. package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
  12. package/dist/components/tt-empty/index.d.ts +4 -4
  13. package/dist/components/tt-form/src/components/FormElInput.vue.d.ts +10 -10
  14. package/dist/components/tt-icon/index.vue.js +2 -2
  15. package/dist/components/tt-image/index.d.ts +29 -29
  16. package/dist/components/tt-image/src/components/ImageViewer.d.ts +20 -20
  17. package/dist/components/tt-image/tt-image.d.ts +29 -29
  18. package/dist/components/tt-input-textarea/index.vue.d.ts +40 -40
  19. package/dist/components/tt-loading/src/loading.vue.js +2 -2
  20. package/dist/components/tt-modal/index.d.ts +150 -150
  21. package/dist/components/tt-modal/src/RenderModal.vue.d.ts +42 -42
  22. package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +17 -17
  23. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +5 -5
  24. package/dist/components/tt-panel-select/src/index.vue.d.ts +5 -5
  25. package/dist/components/tt-panel-select/src/index.vue.js +125 -121
  26. package/dist/components/tt-upload/index.d.ts +60 -60
  27. package/dist/components/tt-upload/src/TtUpload.vue.d.ts +37 -37
  28. package/dist/components/tt-upload/src/typing.d.ts +17 -17
  29. package/dist/hooks/usePanelSelectSchemas.js +92 -98
  30. package/dist/style.css +1 -1
  31. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import "axios";
2
2
  import "element-plus";
3
- import { isFunction as v } from "../packages/utils/src/is.js";
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 $ } from "lodash-es";
16
- import { CODE_REGISTRY as le, resolveDefaultGroupBy as pe, CODES as ue, GROUP_BY as j, groupPurchasePlaceOptions as ie, groupBasicDataOptions as ae } from "./basicDataCodes.js";
17
- import { useBasicDataOptions as de } from "./useBasicDataOptions.js";
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 me(t, n = E) {
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 he(t, n = E) {
26
- return d(t).some((r) => me(r, n));
25
+ function me(t, n = E) {
26
+ return d(t).some((r) => de(r, n));
27
27
  }
28
- function xe(t) {
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 q(t, n) {
32
- const r = "支持多选和全选", s = typeof t == "string" && t.trim() ? t.trim().replace(/[,,]\s*$/, "") : "请选择";
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 Z(t, n, r, s) {
34
+ function q(t, n, r, c) {
39
35
  const p = new Set(r.map((e) => e.value)), l = t[n];
40
- if (s) {
41
- const e = d(l).filter((u) => p.has(u)), c = d(l);
42
- (e.length !== c.length || e.some((u, F) => u !== c[F])) && (t[n] = e);
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 J(t, n, r, s, p, l) {
48
- const e = l ? p.filter((c) => d(r[n]).includes(c.value)) : p.find((c) => c.value === r[n]);
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: s,
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 Q(t, n, r) {
59
- const s = d(t);
60
- if (!s.length) return [];
61
- if (he(t, r)) return n;
62
- const p = new Set(s);
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 X(t, n) {
61
+ function J(t, n) {
66
62
  const r = new Set(d(t));
67
- return r.size ? n.filter((s) => !r.has(s.value)) : n;
63
+ return r.size ? n.filter((c) => !r.has(c.value)) : n;
68
64
  }
69
- function f(t, n) {
70
- var s;
71
- const r = (s = t.value) == null ? void 0 : s[n];
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 $e(t, n = {}) {
75
- const r = [...new Set(t.map((e) => e.code))], s = t.reduce(
76
- (e, c) => (e[c.code] = (e[c.code] || 0) + 1, 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 } = de({
74
+ ), { dataSource: p } = ae({
79
75
  codes: r,
80
76
  dataSource: n.dataSource
81
77
  }), l = {};
82
78
  return t.forEach((e) => {
83
- var Y;
84
- const c = le[e.code], u = e.fieldName || c.defaultFieldName, F = e.key || ((s[e.code] || 0) > 1 ? u : e.code), k = e.label || c.defaultLabel, N = e.multiple ?? c.defaultMultiple, C = e.showAll ?? c.defaultShowAll, b = e.showAllField ?? E, m = e.mutexWith, D = pe(e.code, e.groupBy), S = e.code === ue.PURCHASE_PLACE, M = D === j.NONE, T = D === j.PINYIN, ee = !S && !M && !T, O = c.defaultTreeConfig, R = !!O, U = S ? !1 : c.defaultShowNav ?? !1;
85
- function I(o) {
86
- return S ? ie(o) : ee ? ae(o, D) : o;
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 te = [
84
+ const C = [
89
85
  ...m ? [m] : [],
90
- ...((Y = e.dependencies) == null ? void 0 : Y.triggerFields) || []
91
- ], W = [...new Set(te)], ne = $(e.dependencies || {}, ["triggerFields"]), oe = W.length ? {
92
- ...ne,
93
- triggerFields: W
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: oe,
95
+ dependencies: te,
100
96
  componentProps: (o, x) => {
101
- const P = f(p, e.code);
102
- let a = m ? X(o[m], P) : P;
103
- v(e.customOptions) && (a = e.customOptions(o, a) || []);
104
- const g = I(a), B = H(e.componentProps, o, x, a), { onChange: z, ...A } = B;
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: N,
107
- showAll: C,
108
- showAllField: b,
109
- showNav: U,
110
- showOriginMode: M,
111
- showPinyinMode: R || S ? !1 : T,
112
- ...O ? { treeConfig: O } : {},
113
- ...A,
114
- ...N ? { placeholder: q(A.placeholder) } : {},
115
- options: g,
116
- onChange(w) {
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 = X(w, P);
120
- Z(o, m, h, i);
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, G = Q(w, P, b);
124
- d(w).length ? Z(o, i, G, h) : o[i] = h ? [] : void 0;
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
- (y = e.onChange) == null || y.call(
121
+ (w = e.onChange) == null || w.call(
127
122
  e,
128
- w,
129
- J(e.code, u, o, x, a, N)
123
+ A,
124
+ H(e.code, u, o, x, a, R)
130
125
  );
131
126
  }
132
127
  };
133
128
  }
134
129
  };
135
- if (l[F] = {
130
+ if (l[g] = {
136
131
  ...L,
137
- ...$(e, [
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${xe(F)}`, a = o.label || c.defaultExcludeLabel, g = o.multiple ?? !0, B = o.showAll ?? !1, z = o.showAllField ?? E, A = o.dependencies || {}, w = {
163
- ...A,
164
- triggerFields: A.triggerFields ?? [u],
165
- if: A.if ?? ((i) => d(i[u]).length > 0)
166
- }, y = {
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: w,
166
+ dependencies: A,
172
167
  componentProps: (i, h) => {
173
- const G = f(p, e.code), _ = Q(i[u], G, b), re = I(_), se = H(o.componentProps, i, h, _), { onChange: Pe, ...K } = se;
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: g,
176
- showAll: B,
170
+ multiple: F,
171
+ showAll: M,
177
172
  showAllField: z,
178
- showNav: U,
179
- showOriginMode: M,
180
- showPinyinMode: R || S ? !1 : T,
181
- ...O ? { treeConfig: O } : {},
182
- ...K,
183
- ...g ? { placeholder: q(K.placeholder) } : {},
184
- options: re,
185
- onChange(ce) {
186
- var V;
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
- ce,
190
- J(
183
+ se,
184
+ H(
191
185
  e.code,
192
186
  x,
193
187
  i,
194
188
  h,
195
- _,
196
- g
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
- ...y,
205
- ...$(o, [
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: y.dependencies,
221
- componentProps: y.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
- $e as usePanelSelectSchemas
225
+ _e as usePanelSelectSchemas
232
226
  };