@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.
Files changed (38) hide show
  1. package/dist/api/supplier.js +1 -3
  2. package/dist/assets/svg/download.svg.js +1 -1
  3. package/dist/components/tt-area/TtArea.vue.js +1 -1
  4. package/dist/components/tt-button/index.d.ts +28 -28
  5. package/dist/components/tt-button/index.vue.d.ts +16 -16
  6. package/dist/components/tt-custom-export-modal/src/assets/search.svg.js +5 -5
  7. package/dist/components/tt-custom-export-modal/src/assets/star.svg.js +3 -3
  8. package/dist/components/tt-custom-export-modal/src/assets/trash.svg.js +7 -7
  9. package/dist/components/tt-custom-export-modal/src/components/FieldGridSection.vue.js +1 -1
  10. package/dist/components/tt-drawer/index.d.ts +109 -109
  11. package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +60 -60
  12. package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
  13. package/dist/components/tt-empty/index.d.ts +4 -4
  14. package/dist/components/tt-form/src/components/FormElInput.vue.d.ts +10 -10
  15. package/dist/components/tt-icon/index.vue.js +2 -2
  16. package/dist/components/tt-image/index.d.ts +29 -29
  17. package/dist/components/tt-image/src/components/ImageViewer.d.ts +20 -20
  18. package/dist/components/tt-image/tt-image.d.ts +29 -29
  19. package/dist/components/tt-input-textarea/index.vue.d.ts +40 -40
  20. package/dist/components/tt-loading/src/loading.vue.js +2 -2
  21. package/dist/components/tt-modal/index.d.ts +150 -150
  22. package/dist/components/tt-modal/src/RenderModal.vue.d.ts +42 -42
  23. package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +17 -17
  24. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +5 -5
  25. package/dist/components/tt-panel-select/src/index.vue.d.ts +6 -5
  26. package/dist/components/tt-panel-select/src/index.vue.js +323 -329
  27. package/dist/components/tt-panel-select/src/types.d.ts +7 -0
  28. package/dist/components/tt-table/src/hooks/useTableFooter.js +34 -24
  29. package/dist/components/tt-upload/index.d.ts +60 -60
  30. package/dist/components/tt-upload/src/TtUpload.vue.d.ts +37 -37
  31. package/dist/components/tt-upload/src/typing.d.ts +17 -17
  32. package/dist/hooks/missingOptionsCache.d.ts +27 -1
  33. package/dist/hooks/missingOptionsCache.js +99 -62
  34. package/dist/hooks/useFormSchemasLink.js +6 -4
  35. package/dist/hooks/usePanelSelectSchemas.js +10 -2
  36. package/dist/packages/utils/src/calc.js +1 -0
  37. package/dist/style.css +1 -1
  38. package/package.json +1 -1
@@ -1,96 +1,133 @@
1
- import { ref as M } from "vue";
2
- import { CODE_REGISTRY as w } from "./basicDataCodes.js";
3
- const y = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), O = M(0);
4
- function g(r, o) {
5
- return `${r}::${o}`;
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 S = /[,,|/]/;
11
- function K(r = []) {
12
- const o = [], n = /* @__PURE__ */ new Set();
13
- return (Array.isArray(r) ? r : []).forEach((e) => {
14
- if (!(e == null || e === "")) {
15
- if (typeof e == "number") {
16
- const s = f(e);
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), o.push(e);
18
+ n.add(s), e.push(o);
19
19
  return;
20
20
  }
21
- String(e).split(S).map((s) => s.trim()).filter(Boolean).forEach((s) => {
22
- n.has(s) || (n.add(s), o.push(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
- }), o;
25
+ }), e;
26
26
  }
27
- function E(r) {
28
- const o = /* @__PURE__ */ new Set(), n = (e = []) => {
29
- e.forEach((s) => {
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 !== "" && o.add(f(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 : []), o;
38
+ return n(Array.isArray(r) ? r : []), e;
39
39
  }
40
- function k(r, o) {
41
- const n = g(r, o);
42
- let e = y.get(n);
43
- return e || (e = /* @__PURE__ */ new Map(), y.set(n, e)), e;
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 R(r, o) {
46
- const n = y.get(g(r, o));
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 C(r, o, n = []) {
50
- const e = Array.isArray(n) ? n : [], s = R(r, o);
51
- if (!s.length) return e;
52
- const u = E(e), t = s.filter((a) => a.value !== void 0 && !u.has(f(a.value)));
53
- return t.length ? [...e, ...t] : e;
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 = [], o) {
55
+ function V(r = [], e) {
56
56
  return !Array.isArray(r) || !r.length ? Array.isArray(r) ? r : [] : r.map((n) => {
57
- var e;
58
- return (e = n == null ? void 0 : n.children) != null && e.length ? { ...n, children: V(n.children, o) } : (n == null ? void 0 : n.deleted) === !0 ? { ...n, disabled: o } : n;
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 $(r, o, n) {
62
- const e = E(o), s = [], u = /* @__PURE__ */ new Set();
63
- return K(r).forEach((t) => {
64
- const a = f(t);
65
- u.has(a) || e.has(a) || n.has(a) || (u.add(a), s.push(t));
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 D(r, o, n, e = []) {
69
- const s = w[o], u = s == null ? void 0 : s.fetchMissingOptions, t = k(r, o);
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(t.values());
72
- const a = $(n, e, t);
73
- if (!a.length)
74
- return Array.from(t.values());
75
- const i = `${g(r, o)}::${a.map(f).sort().join(",")}`;
76
- let l = h.get(i);
77
- return l || (l = u(a).then((d) => {
78
- const v = Array.isArray(d) ? d : [];
79
- let p = !1;
80
- return v.forEach((c) => {
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 A = f(c.value);
83
- t.has(A) || (t.set(A, c), p = !0);
84
- }), p && (O.value += 1), Array.from(t.values());
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
- h.get(i) === l && h.delete(i);
87
- }), h.set(i, l)), l;
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
- D as ensureMissingOptions,
91
- K as expandJoinedOptionValues,
92
- R as getEchoOptions,
93
- C as getMergedOptions,
94
- O as missingOptionsEchoVersion,
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), { onChange: a, resolveMissingOptions: S, ...m } = 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";
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), { onChange: Q, resolveMissingOptions: E, ...I } = U;
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), { onChange: Fe, resolveMissingOptions: be, ...me } = de;
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,
@@ -24,6 +24,7 @@ function N(e) {
24
24
  return t && !n ? o : new l(Number.NaN);
25
25
  }
26
26
  export {
27
+ l as Decimal,
27
28
  i as add,
28
29
  N as calc,
29
30
  b as divide,