@das-fed/ui 6.4.0-dev.54.7 → 6.4.0-dev.54.9

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 (126) hide show
  1. package/package.json +5 -5
  2. package/packages/business-components/change-enterprises/i18n/index.d.ts +3 -3
  3. package/packages/business-components/change-pwd/i18n/index.d.ts +26 -34
  4. package/packages/business-components/change-pwd/index.js +66 -65
  5. package/packages/business-components/change-pwd/index.js.gz +0 -0
  6. package/packages/business-components/device-panel/i18n/index.d.ts +172 -0
  7. package/packages/business-components/device-panel/index.js +331 -261
  8. package/packages/business-components/device-panel/index.js.gz +0 -0
  9. package/packages/business-components/export-button/i18n/index.d.ts +16 -20
  10. package/packages/business-components/export-button/index.js +88 -86
  11. package/packages/business-components/export-button/index.js.gz +0 -0
  12. package/packages/business-components/import-button/i18n/index.d.ts +34 -30
  13. package/packages/business-components/import-button/index.js +148 -144
  14. package/packages/business-components/import-button/index.js.gz +0 -0
  15. package/packages/business-components/model-table-dialog/i18n/index.d.ts +6 -6
  16. package/packages/business-components/model-table-dialog/index.js +82 -83
  17. package/packages/business-components/model-table-dialog/index.js.gz +0 -0
  18. package/packages/business-components/model-table-dialog/src/ModelTable.vue.d.ts +17 -49
  19. package/packages/business-components/model-table-dialog/style.css +1 -1
  20. package/packages/business-components/model-table-dialog/style.css.gz +0 -0
  21. package/packages/business-components/process-configuration/i18n/index.d.ts +37 -29
  22. package/packages/business-components/process-configuration/index.js +103 -92
  23. package/packages/business-components/process-configuration/index.js.gz +0 -0
  24. package/packages/business-components/process-form/i18n/index.d.ts +109 -69
  25. package/packages/business-components/process-form/index.js +691 -672
  26. package/packages/business-components/process-form/index.js.gz +0 -0
  27. package/packages/business-components/process-log/i18n/index.d.ts +4 -0
  28. package/packages/business-components/process-log/index.js +29 -28
  29. package/packages/business-components/process-log/index.js.gz +0 -0
  30. package/packages/business-components/process-search-form/i18n/index.d.ts +9 -9
  31. package/packages/business-components/process-search-form/index.js +2 -2
  32. package/packages/business-components/process-search-form/index.js.gz +0 -0
  33. package/packages/business-components/process-table/i18n/index.d.ts +8 -8
  34. package/packages/business-components/process-table/index.js +36 -36
  35. package/packages/business-components/process-table/index.js.gz +0 -0
  36. package/packages/business-components/upload-file/i18n/index.d.ts +2 -2
  37. package/packages/business-components/upload-file/index.js +45 -42
  38. package/packages/business-components/upload-file/index.js.gz +0 -0
  39. package/packages/business-components/urgent-panel/i18n/index.d.ts +28 -0
  40. package/packages/business-components/urgent-panel/index.js +595 -576
  41. package/packages/business-components/urgent-panel/index.js.gz +0 -0
  42. package/packages/business-components/user-org-dialog/i18n/index.d.ts +7 -3
  43. package/packages/business-components/user-org-dialog/index.js +92 -91
  44. package/packages/business-components/user-org-dialog/index.js.gz +0 -0
  45. package/packages/business-components/video-dialog/i18n/index.d.ts +29 -17
  46. package/packages/business-components/video-dialog/index.js +116 -113
  47. package/packages/business-components/video-dialog/index.js.gz +0 -0
  48. package/packages/components/button/index.js +54 -56
  49. package/packages/components/button/index.js.gz +0 -0
  50. package/packages/components/image-upload/i18n/index.d.ts +9 -21
  51. package/packages/components/image-upload/index.js +92 -92
  52. package/packages/components/image-upload/index.js.gz +0 -0
  53. package/packages/components/image-viewer/i18n/index.d.ts +1 -30
  54. package/packages/components/image-viewer/index.js +213 -219
  55. package/packages/components/image-viewer/index.js.gz +0 -0
  56. package/packages/components/input/i18n/index.d.ts +3 -3
  57. package/packages/components/input/index.js +1 -1
  58. package/packages/components/input/index.js.gz +0 -0
  59. package/packages/components/input-dialog-select/i18n/index.d.ts +1 -6
  60. package/packages/components/input-dialog-select/index.js +49 -51
  61. package/packages/components/input-dialog-select/index.js.gz +0 -0
  62. package/packages/components/live-player/i18n/index.d.ts +3 -7
  63. package/packages/components/live-player/index.js +7 -5
  64. package/packages/components/live-player/index.js.gz +0 -0
  65. package/packages/components/live-player/style.css +1 -1
  66. package/packages/components/loading/i18n/index.d.ts +1 -1
  67. package/packages/components/loading/index.js +1 -3
  68. package/packages/components/loading/index.js.gz +0 -0
  69. package/packages/components/map/i18n/index.d.ts +7 -11
  70. package/packages/components/map/index.js +168 -167
  71. package/packages/components/map/index.js.gz +0 -0
  72. package/packages/components/menu-aside/i18n/index.d.ts +1 -1
  73. package/packages/components/menu-aside/index.js +1 -3
  74. package/packages/components/menu-aside/index.js.gz +0 -0
  75. package/packages/components/message/i18n/index.d.ts +1 -1
  76. package/packages/components/message/index.js +1 -3
  77. package/packages/components/message/index.js.gz +0 -0
  78. package/packages/components/notification/i18n/index.d.ts +1 -1
  79. package/packages/components/notification/index.js +1 -3
  80. package/packages/components/notification/index.js.gz +0 -0
  81. package/packages/components/pagination/i18n/index.d.ts +8 -8
  82. package/packages/components/pagination/index.js +124 -124
  83. package/packages/components/pagination/index.js.gz +0 -0
  84. package/packages/components/pagination/style.css +1 -1
  85. package/packages/components/pagination/style.css.gz +0 -0
  86. package/packages/components/popover/i18n/index.d.ts +2 -2
  87. package/packages/components/preview/i18n/index.d.ts +1 -1
  88. package/packages/components/preview/index.js +1 -3
  89. package/packages/components/preview/index.js.gz +0 -0
  90. package/packages/components/search/index.js +26 -36
  91. package/packages/components/search/index.js.gz +0 -0
  92. package/packages/components/search/style.css +1 -1
  93. package/packages/components/search/style.css.gz +0 -0
  94. package/packages/components/{search → search-form}/i18n/index.d.ts +6 -10
  95. package/packages/components/search-form/index.js +426 -418
  96. package/packages/components/search-form/index.js.gz +0 -0
  97. package/packages/components/search-form/style.css +1 -1
  98. package/packages/components/search-form/style.css.gz +0 -0
  99. package/packages/components/spin/i18n/index.d.ts +1 -1
  100. package/packages/components/spin/index.js +1 -3
  101. package/packages/components/spin/index.js.gz +0 -0
  102. package/packages/components/table/i18n/index.d.ts +19 -19
  103. package/packages/components/table/index.js +7 -7
  104. package/packages/components/table/index.js.gz +0 -0
  105. package/packages/components/table/style.css +1 -1
  106. package/packages/components/table/style.css.gz +0 -0
  107. package/packages/components/tabs/i18n/index.d.ts +3 -3
  108. package/packages/components/time-line/index.js +36 -40
  109. package/packages/components/time-line/index.js.gz +0 -0
  110. package/packages/components/tooltip/i18n/index.d.ts +1 -1
  111. package/packages/components/tooltip/index.js +1 -3
  112. package/packages/components/tooltip/index.js.gz +0 -0
  113. package/packages/components/tree/i18n/index.d.ts +8 -12
  114. package/packages/components/tree/index.js +137 -135
  115. package/packages/components/tree/index.js.gz +0 -0
  116. package/packages/components/tree/src/App.vue.d.ts +9 -27
  117. package/packages/components/upload/i18n/index.d.ts +5 -5
  118. package/packages/components/upload/index.js +1 -1
  119. package/packages/components/upload/index.js.gz +0 -0
  120. package/packages/components/virtual-tree/i18n/index.d.ts +1 -1
  121. package/packages/components/virtual-tree/index.js +1 -3
  122. package/packages/components/virtual-tree/index.js.gz +0 -0
  123. package/i18n-collection/en.js +0 -537
  124. package/i18n-collection/zh-CN.js +0 -537
  125. package/packages/components/button/i18n/index.d.ts +0 -2
  126. package/packages/components/time-line/i18n/index.d.ts +0 -7
@@ -1,36 +1,35 @@
1
1
  import '@das-fed/ui/packages/components/button/style.css';
2
2
  import { withInstall as oe } from "@das-fed/utils/with-install/index";
3
- import { defineComponent as le, ref as W, computed as se, watchEffect as ue, openBlock as s, createElementBlock as h, createCommentVNode as p, createBlock as y, unref as l, mergeProps as B, createSlots as K, withCtx as f, renderSlot as w, createElementVNode as U, createVNode as I, Fragment as j, renderList as N, createTextVNode as A, toDisplayString as R, isRef as de } from "vue";
3
+ import { defineComponent as le, ref as W, computed as se, watchEffect as ue, openBlock as s, createElementBlock as h, createCommentVNode as p, createBlock as y, unref as l, mergeProps as B, createSlots as K, withCtx as f, renderSlot as w, createElementVNode as U, createVNode as I, Fragment as j, renderList as N, createTextVNode as A, toDisplayString as L, isRef as de } from "vue";
4
4
  import { DasAutoRegisterIcon as fe, DasIcon as P } from "@das-fed/ui/packages/components/icon/index";
5
5
  import { DropdownButton as be, Menu as H, MenuItem as X, Dropdown as ce, Button as q, RadioGroup as me, RadioButton as pe } from "ant-design-vue";
6
6
  import "ant-design-vue/es/button/style/css";
7
7
  import "ant-design-vue/es/dropdown/style/css";
8
8
  import "ant-design-vue/es/radio/style/css";
9
- import { setI18nRule as ye } from "@das-fed/web/packages/i18n/index";
10
- import { setThemeRule as ge } from "@das-fed/web/packages/theme/index";
9
+ import { setThemeRule as ye } from "@das-fed/web/packages/theme/index";
11
10
  var E = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
12
- function ve(t) {
11
+ function ge(t) {
13
12
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
14
13
  }
15
- function ke(t) {
14
+ function ve(t) {
16
15
  var a = typeof t;
17
16
  return t != null && (a == "object" || a == "function");
18
17
  }
19
- var ee = ke, Te = typeof E == "object" && E && E.Object === Object && E, he = Te, $e = he, Ce = typeof self == "object" && self && self.Object === Object && self, je = $e || Ce || Function("return this")(), te = je, Se = te, Ie = function() {
20
- return Se.Date.now();
21
- }, Oe = Ie, De = /\s/;
22
- function ze(t) {
23
- for (var a = t.length; a-- && De.test(t.charAt(a)); )
18
+ var ee = ve, ke = typeof E == "object" && E && E.Object === Object && E, Te = ke, he = Te, $e = typeof self == "object" && self && self.Object === Object && self, Ce = he || $e || Function("return this")(), te = Ce, je = te, Se = function() {
19
+ return je.Date.now();
20
+ }, Ie = Se, Oe = /\s/;
21
+ function De(t) {
22
+ for (var a = t.length; a-- && Oe.test(t.charAt(a)); )
24
23
  ;
25
24
  return a;
26
25
  }
27
- var Be = ze, we = Be, Pe = /^\s+/;
28
- function Ee(t) {
29
- return t && t.slice(0, we(t) + 1).replace(Pe, "");
26
+ var ze = De, Be = ze, we = /^\s+/;
27
+ function Pe(t) {
28
+ return t && t.slice(0, Be(t) + 1).replace(we, "");
30
29
  }
31
- var Me = Ee, Ne = te, Ae = Ne.Symbol, ne = Ae, J = ne, ae = Object.prototype, Re = ae.hasOwnProperty, Le = ae.toString, O = J ? J.toStringTag : void 0;
32
- function Fe(t) {
33
- var a = Re.call(t, O), n = t[O];
30
+ var Ee = Pe, Me = te, Ne = Me.Symbol, ne = Ne, J = ne, ae = Object.prototype, Ae = ae.hasOwnProperty, Le = ae.toString, O = J ? J.toStringTag : void 0;
31
+ function Re(t) {
32
+ var a = Ae.call(t, O), n = t[O];
34
33
  try {
35
34
  t[O] = void 0;
36
35
  var o = !0;
@@ -39,27 +38,27 @@ function Fe(t) {
39
38
  var u = Le.call(t);
40
39
  return o && (a ? t[O] = n : delete t[O]), u;
41
40
  }
42
- var Ge = Fe, Ve = Object.prototype, We = Ve.toString;
43
- function Ke(t) {
44
- return We.call(t);
41
+ var Fe = Re, Ge = Object.prototype, Ve = Ge.toString;
42
+ function We(t) {
43
+ return Ve.call(t);
45
44
  }
46
- var Ue = Ke, Q = ne, He = Ge, Xe = Ue, qe = "[object Null]", Je = "[object Undefined]", Y = Q ? Q.toStringTag : void 0;
47
- function Qe(t) {
48
- return t == null ? t === void 0 ? Je : qe : Y && Y in Object(t) ? He(t) : Xe(t);
45
+ var Ke = We, Q = ne, Ue = Fe, He = Ke, Xe = "[object Null]", qe = "[object Undefined]", Y = Q ? Q.toStringTag : void 0;
46
+ function Je(t) {
47
+ return t == null ? t === void 0 ? qe : Xe : Y && Y in Object(t) ? Ue(t) : He(t);
49
48
  }
50
- var Ye = Qe;
51
- function Ze(t) {
49
+ var Qe = Je;
50
+ function Ye(t) {
52
51
  return t != null && typeof t == "object";
53
52
  }
54
- var _e = Ze, xe = Ye, et = _e, tt = "[object Symbol]";
55
- function nt(t) {
56
- return typeof t == "symbol" || et(t) && xe(t) == tt;
53
+ var Ze = Ye, _e = Qe, xe = Ze, et = "[object Symbol]";
54
+ function tt(t) {
55
+ return typeof t == "symbol" || xe(t) && _e(t) == et;
57
56
  }
58
- var at = nt, it = Me, Z = ee, rt = at, _ = NaN, ot = /^[-+]0x[0-9a-f]+$/i, lt = /^0b[01]+$/i, st = /^0o[0-7]+$/i, ut = parseInt;
59
- function dt(t) {
57
+ var nt = tt, at = Ee, Z = ee, it = nt, _ = NaN, rt = /^[-+]0x[0-9a-f]+$/i, ot = /^0b[01]+$/i, lt = /^0o[0-7]+$/i, st = parseInt;
58
+ function ut(t) {
60
59
  if (typeof t == "number")
61
60
  return t;
62
- if (rt(t))
61
+ if (it(t))
63
62
  return _;
64
63
  if (Z(t)) {
65
64
  var a = typeof t.valueOf == "function" ? t.valueOf() : t;
@@ -67,16 +66,16 @@ function dt(t) {
67
66
  }
68
67
  if (typeof t != "string")
69
68
  return t === 0 ? t : +t;
70
- t = it(t);
71
- var n = lt.test(t);
72
- return n || st.test(t) ? ut(t.slice(2), n ? 2 : 8) : ot.test(t) ? _ : +t;
69
+ t = at(t);
70
+ var n = ot.test(t);
71
+ return n || lt.test(t) ? st(t.slice(2), n ? 2 : 8) : rt.test(t) ? _ : +t;
73
72
  }
74
- var ft = dt, bt = ee, L = Oe, x = ft, ct = "Expected a function", mt = Math.max, pt = Math.min;
75
- function yt(t, a, n) {
73
+ var dt = ut, ft = ee, R = Ie, x = dt, bt = "Expected a function", ct = Math.max, mt = Math.min;
74
+ function pt(t, a, n) {
76
75
  var o, u, b, c, d, m, k = 0, D = !1, T = !1, $ = !0;
77
76
  if (typeof t != "function")
78
- throw new TypeError(ct);
79
- a = x(a) || 0, bt(n) && (D = !!n.leading, T = "maxWait" in n, b = T ? mt(x(n.maxWait) || 0, a) : b, $ = "trailing" in n ? !!n.trailing : $);
77
+ throw new TypeError(bt);
78
+ a = x(a) || 0, ft(n) && (D = !!n.leading, T = "maxWait" in n, b = T ? ct(x(n.maxWait) || 0, a) : b, $ = "trailing" in n ? !!n.trailing : $);
80
79
  function C(r) {
81
80
  var v = o, S = u;
82
81
  return o = u = void 0, k = r, c = t.apply(S, v), c;
@@ -86,14 +85,14 @@ function yt(t, a, n) {
86
85
  }
87
86
  function g(r) {
88
87
  var v = r - m, S = r - k, V = a - v;
89
- return T ? pt(V, b - S) : V;
88
+ return T ? mt(V, b - S) : V;
90
89
  }
91
90
  function i(r) {
92
91
  var v = r - m, S = r - k;
93
92
  return m === void 0 || v >= a || v < 0 || T && S >= b;
94
93
  }
95
94
  function z() {
96
- var r = L();
95
+ var r = R();
97
96
  if (i(r))
98
97
  return G(r);
99
98
  d = setTimeout(z, g(r));
@@ -105,10 +104,10 @@ function yt(t, a, n) {
105
104
  d !== void 0 && clearTimeout(d), k = 0, o = m = u = d = void 0;
106
105
  }
107
106
  function re() {
108
- return d === void 0 ? c : G(L());
107
+ return d === void 0 ? c : G(R());
109
108
  }
110
109
  function M() {
111
- var r = L(), v = i(r);
110
+ var r = R(), v = i(r);
112
111
  if (o = arguments, u = this, m = r, v) {
113
112
  if (d === void 0)
114
113
  return e(m);
@@ -119,12 +118,12 @@ function yt(t, a, n) {
119
118
  }
120
119
  return M.cancel = ie, M.flush = re, M;
121
120
  }
122
- var gt = yt;
123
- const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
121
+ var yt = pt;
122
+ const F = /* @__PURE__ */ ge(yt), gt = { class: "das-ui-button" }, vt = {
124
123
  inheritAttrs: !1
125
124
  // 不希望组件的根元素继承特性
126
- }, Tt = /* @__PURE__ */ le({
127
- ...kt,
125
+ }, kt = /* @__PURE__ */ le({
126
+ ...vt,
128
127
  __name: "Index",
129
128
  props: {
130
129
  btnType: {},
@@ -191,7 +190,7 @@ const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
191
190
  }, C = (e) => {
192
191
  e ? b.value = n.activeIcon ? n.activeIcon : n.icon : b.value = n.icon;
193
192
  };
194
- return (e, g) => (s(), h("div", vt, [
193
+ return (e, g) => (s(), h("div", gt, [
195
194
  p(" 同类集合按钮 "),
196
195
  e.btnType === "default-sameset" || e.btnType === "primary-sameset" ? (s(), y(l(be), B({ key: 0 }, e.$attrs, {
197
196
  tabindex: "-1",
@@ -238,7 +237,7 @@ const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
238
237
  }, {
239
238
  default: f(() => [
240
239
  A(
241
- R(i[e.defaultMenuProps.label]),
240
+ L(i[e.defaultMenuProps.label]),
242
241
  1
243
242
  /* TEXT */
244
243
  )
@@ -303,7 +302,7 @@ const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
303
302
  default: f(() => [
304
303
  w(e.$slots, "menu-item", { item: i }, () => [
305
304
  A(
306
- R(i[e.defaultMenuProps.label]),
305
+ L(i[e.defaultMenuProps.label]),
307
306
  1
308
307
  /* TEXT */
309
308
  )
@@ -348,7 +347,7 @@ const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
348
347
  }, {
349
348
  default: f(() => [
350
349
  A(
351
- R(i[e.defaultMenuProps.label]),
350
+ L(i[e.defaultMenuProps.label]),
352
351
  1
353
352
  /* TEXT */
354
353
  )
@@ -418,12 +417,12 @@ const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
418
417
  ))
419
418
  ]));
420
419
  }
421
- }), ht = (t, a) => {
420
+ }), Tt = (t, a) => {
422
421
  const n = t.__vccOpts || t;
423
422
  for (const [o, u] of a)
424
423
  n[o] = u;
425
424
  return n;
426
- }, $t = /* @__PURE__ */ ht(Tt, [["__scopeId", "data-v-a28d222f"]]), Ct = {}, jt = {
425
+ }, ht = /* @__PURE__ */ Tt(kt, [["__scopeId", "data-v-a28d222f"]]), $t = {
427
426
  "--demo-alert-bg": {
428
427
  light: "#fff",
429
428
  dark: "rgba(255,255,255,.2)"
@@ -443,10 +442,9 @@ const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
443
442
  "--das-ui-button-set-active": "#3B5AA9",
444
443
  "--das-ui-button-set-disabled": "#95A4C8"
445
444
  };
446
- ye(Ct);
447
- ge(jt);
448
- const Mt = oe($t);
445
+ ye($t);
446
+ const wt = oe(ht);
449
447
  export {
450
- Mt as DasButton,
451
- Mt as default
448
+ wt as DasButton,
449
+ wt as default
452
450
  };
@@ -1,38 +1,26 @@
1
1
  declare const _default: {
2
- 上传的图片大小不能超过: {
3
- "zh-CN": string;
2
+ 'das-ui-import-upload-key1': {
3
+ 'zh-CN': string;
4
4
  en: string;
5
5
  };
6
- 的: {
7
- "zh-CN": string;
6
+ 'das-ui-import-upload-key2': {
7
+ 'zh-CN': string;
8
8
  en: string;
9
9
  };
10
- 文件: {
11
- "zh-CN": string;
12
- en: string;
13
- };
14
- 上传的图片格式只能是: {
15
- "zh-CN": string;
16
- en: string;
17
- };
18
- 上传的文件格式只能是: {
19
- "zh-CN": string;
20
- en: string;
21
- };
22
- 格式: {
23
- "zh-CN": string;
10
+ 'das-ui-import-upload-key3': {
11
+ 'zh-CN': string;
24
12
  en: string;
25
13
  };
26
14
  'das-image-upload-text': {
27
- "zh-CN": string;
15
+ 'zh-CN': string;
28
16
  en: string;
29
17
  };
30
18
  'das-image-upload-reupload': {
31
- "zh-CN": string;
19
+ 'zh-CN': string;
32
20
  en: string;
33
21
  };
34
22
  'das-image-upload-fail': {
35
- "zh-CN": string;
23
+ 'zh-CN': string;
36
24
  en: string;
37
25
  };
38
26
  };
@@ -1,8 +1,8 @@
1
1
  import '@das-fed/ui/packages/components/image-upload/style.css';
2
- import { withInstall as $ } from "@das-fed/utils/with-install/index";
3
- import { i18n as b, t as N, setI18nRule as B } from "@das-fed/web/packages/i18n/index";
4
- import { getVar as z, setThemeRule as D } from "@das-fed/web/packages/theme/index";
5
- import { computed as S, defineComponent as k, openBlock as j, createElementBlock as E, createCommentVNode as M, withDirectives as U, createVNode as v, unref as a, normalizeClass as F, withCtx as h, createElementVNode as y, toDisplayString as w, vShow as T, createTextVNode as R } from "vue";
2
+ import { withInstall as M } from "@das-fed/utils/with-install/index";
3
+ import { i18n as _, t as z, setI18nRule as U } from "@das-fed/web/packages/i18n/index";
4
+ import { getVar as N, setThemeRule as B } from "@das-fed/web/packages/theme/index";
5
+ import { computed as T, defineComponent as D, openBlock as j, createElementBlock as E, createCommentVNode as I, withDirectives as k, createVNode as v, unref as a, normalizeClass as F, withCtx as y, createElementVNode as h, toDisplayString as S, vShow as w, createTextVNode as R } from "vue";
6
6
  import { UploadDragger as G, Upload as P } from "ant-design-vue";
7
7
  import "ant-design-vue/es/upload/style/css";
8
8
  import { DasSpin as J } from "@das-fed/ui/packages/components/spin/index";
@@ -12,74 +12,74 @@ import { DasIconWarning as O } from "@das-fed/ui/packages/icons/warning/index";
12
12
  import { DasMessage as V } from "@das-fed/ui/packages/components/message/index";
13
13
  import { useModelValue as W } from "@das-fed/utils/vue";
14
14
  import "@das-fed/ui/packages/global/theme";
15
- const q = () => ({ size2B: (t) => {
16
- isNaN(Number(t)) ? t = t.toString() : t = t + "M";
17
- const o = Number(t.slice(0, -1)), p = t[t.length - 1].toUpperCase(), l = 1024, g = {
15
+ const q = () => ({ size2B: (o) => {
16
+ isNaN(Number(o)) ? o = o.toString() : o = o + "M";
17
+ const t = Number(o.slice(0, -1)), p = o[o.length - 1].toUpperCase(), l = 1024, g = {
18
18
  M: l * l,
19
19
  K: l,
20
20
  B: 1
21
21
  };
22
- return { finalSize: o * g[p], sizeText: t };
23
- } }), L = (e, t) => {
24
- const o = W(e, "status"), { size2B: p } = q(), l = [".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv", ".mpeg", ".webm"], g = [".mp3", ".wav", ".aac", ".flac", ".ogg", ".alff", ".wma", ".m4a"], i = S(() => {
22
+ return { finalSize: t * g[p], sizeText: o };
23
+ } }), L = (e, o) => {
24
+ const t = W(e, "status"), { size2B: p } = q(), l = [".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv", ".mpeg", ".webm"], g = [".mp3", ".wav", ".aac", ".flac", ".ogg", ".alff", ".wma", ".m4a"], s = T(() => {
25
25
  var r;
26
26
  if (e.acceptVideo || e.acceptAudio) {
27
27
  let n = e.accept ? (r = e.accept) == null ? void 0 : r.split(",") : [];
28
28
  return e.acceptVideo && (n = [...n, ...l]), e.acceptAudio && (n = [...n, ...g]), n.join(",");
29
29
  } else
30
30
  return e.accept;
31
- }), C = S(() => o.value === "uploading"), x = S(() => o.value === "error");
32
- return { isAccept: i, uploadStatus: o, loading: C, errored: x, beforeupload: (r) => {
33
- var _, I;
31
+ }), C = T(() => t.value === "uploading"), A = T(() => t.value === "error");
32
+ return { isAccept: s, uploadStatus: t, loading: C, errored: A, beforeupload: (r) => {
33
+ var b, $;
34
34
  if (e.maxSize) {
35
- const { finalSize: s, sizeText: c } = p(e.maxSize);
36
- if (r.size > s) {
37
- const u = !e.acceptAudio && !e.acceptVideo ? b(`上传的图片大小不能超过${c}的JPG、JPEG、PNG、GIF、SVG文件`).value : b(
38
- `上传的图片大小不能超过${c}的${(_ = i.value) == null ? void 0 : _.toUpperCase().replaceAll(".", "").replaceAll(",", "、")}文件`
39
- ).value, m = e.errorMessage || u;
40
- return V.warning(m), t("update:status", "normal"), o.value = "normal", !1;
35
+ const { finalSize: i, sizeText: u } = p(e.maxSize);
36
+ if (r.size > i) {
37
+ const c = !e.acceptAudio && !e.acceptVideo ? _("das-ui-import-upload-key3", u, "JPG、JPEG、PNG、GIF、SVG").value : _(
38
+ "das-ui-import-upload-key3",
39
+ u,
40
+ (b = s.value) == null ? void 0 : b.toUpperCase().replaceAll(".", "").replaceAll(",", "、")
41
+ ).value, m = e.errorMessage || c;
42
+ return V.warning(m), o("update:status", "normal"), t.value = "normal", !1;
41
43
  }
42
44
  }
43
- const n = () => (o.value = "uploading", t("update:status", "uploading"), t("image-upload", r), !1);
45
+ const n = () => (t.value = "uploading", o("update:status", "uploading"), o("image-upload", r), !1);
44
46
  if (e.customCheck) {
45
- const s = e.customCheck(r);
46
- if (s instanceof Promise)
47
- return new Promise(async (c, u) => {
47
+ const i = e.customCheck(r);
48
+ if (i instanceof Promise)
49
+ return new Promise(async (u, c) => {
48
50
  let m;
49
51
  try {
50
- m = await s.then();
52
+ m = await i.then();
51
53
  } catch {
52
54
  m = !1;
53
55
  }
54
- m ? n() : u(!1);
56
+ m ? n() : c(!1);
55
57
  });
56
- if (!s)
57
- return t("update:status", "normal"), o.value = "normal", !1;
58
- } else if (i.value)
58
+ if (!i)
59
+ return o("update:status", "normal"), t.value = "normal", !1;
60
+ } else if (s.value)
59
61
  if (!e.acceptAudio && !e.acceptVideo) {
60
- const s = i.value.split(",").map((c) => {
61
- let u = c.trim().slice(1);
62
- return u === "svg" && (u = "svg+xml"), `image/${u}`;
62
+ const i = s.value.split(",").map((u) => {
63
+ let c = u.trim().slice(1);
64
+ return c === "svg" && (c = "svg+xml"), `image/${c}`;
63
65
  }) ?? [];
64
- if (s.includes("image/jpg") && !s.includes("image/jpeg") && s.push("image/jpeg"), !s.includes(r.type)) {
65
- const c = e.errorMessage || b(
66
- `上传的图片格式只能是${i.value.toUpperCase().replaceAll(".", "").replaceAll(",", "、")}格式`
67
- ).value;
68
- return V.warning(c), !1;
66
+ if (i.includes("image/jpg") && !i.includes("image/jpeg") && i.push("image/jpeg"), !i.includes(r.type)) {
67
+ const u = e.errorMessage || _("das-ui-import-upload-key1", s.value.toUpperCase().replaceAll(".", "").replaceAll(",", "、")).value;
68
+ return V.warning(u), !1;
69
69
  }
70
70
  } else {
71
- const s = i.value.split(",").map((d) => {
71
+ const i = s.value.split(",").map((d) => {
72
72
  let f = d.trim().slice(1);
73
73
  return f === "svg" && (f = "svg+xml"), `image/${f}`;
74
- }) ?? [], c = l.map((d) => `video/${d.split(".")[1]}`) ?? [], u = g.map((d) => `audio/${d.split(".")[1]}`) ?? [], m = l.map((d) => `audio/${d.split(".")[1]}`) ?? [];
75
- if (![...s, ...c, ...u, ...m].includes(r.type)) {
76
- const d = e.errorMessage || b(`上传的文件格式只能是${(I = i.value) == null ? void 0 : I.toUpperCase()}格式`).value;
74
+ }) ?? [], u = l.map((d) => `video/${d.split(".")[1]}`) ?? [], c = g.map((d) => `audio/${d.split(".")[1]}`) ?? [], m = l.map((d) => `audio/${d.split(".")[1]}`) ?? [];
75
+ if (![...i, ...u, ...c, ...m].includes(r.type)) {
76
+ const d = e.errorMessage || _("das-ui-import-upload-key2", ($ = s.value) == null ? void 0 : $.toUpperCase()).value;
77
77
  return V.warning(d), !1;
78
78
  }
79
79
  }
80
80
  return n();
81
81
  } };
82
- }, Q = { class: "das-ui-image-upload" }, X = { class: "das-ui-image-upload-dragger-context" }, Y = { class: "text" }, Z = { class: "das-ui-image-upload-error-container" }, ee = { class: "tips-container" }, ae = { class: "text" }, te = /* @__PURE__ */ k({
82
+ }, Q = { class: "das-ui-image-upload" }, X = { class: "das-ui-image-upload-dragger-context" }, Y = { class: "text" }, Z = { class: "das-ui-image-upload-error-container" }, ee = { class: "tips-container" }, ae = { class: "text" }, oe = /* @__PURE__ */ D({
83
83
  __name: "Index",
84
84
  props: {
85
85
  maxCount: { default: 1 },
@@ -94,35 +94,35 @@ const q = () => ({ size2B: (t) => {
94
94
  autoContentType: { type: Boolean }
95
95
  },
96
96
  emits: ["update:status", "image-upload"],
97
- setup(e, { emit: t }) {
98
- const o = e, p = t, { isAccept: l, uploadStatus: g, loading: i, errored: C, beforeupload: x } = L(o, p);
99
- return (A, r) => (j(), E("div", Q, [
100
- M(" 图片上传组件 "),
101
- U(v(a(J), {
102
- class: F([{ "loading-border": a(i) }]),
97
+ setup(e, { emit: o }) {
98
+ const t = e, p = o, { isAccept: l, uploadStatus: g, loading: s, errored: C, beforeupload: A } = L(t, p);
99
+ return (x, r) => (j(), E("div", Q, [
100
+ I(" 图片上传组件 "),
101
+ k(v(a(J), {
102
+ class: F([{ "loading-border": a(s) }]),
103
103
  type: "component",
104
- spinning: a(i)
104
+ spinning: a(s)
105
105
  }, {
106
- default: h(() => [
106
+ default: y(() => [
107
107
  v(a(G), {
108
108
  class: "das-ui-image-upload-dragger",
109
109
  accept: a(l),
110
- "max-count": A.maxCount,
111
- "before-upload": a(x)
110
+ "max-count": x.maxCount,
111
+ "before-upload": a(A)
112
112
  }, {
113
- itemRender: h(({ file: n, actions: _ }) => r[0] || (r[0] = [])),
114
- default: h(() => [
115
- U(y(
113
+ itemRender: y(({ file: n, actions: b }) => r[0] || (r[0] = [])),
114
+ default: y(() => [
115
+ k(h(
116
116
  "div",
117
117
  X,
118
118
  [
119
119
  v(a(K), {
120
- iconColor: a(z)("--das-ui-color-secondary")
120
+ iconColor: a(N)("--das-ui-color-secondary")
121
121
  }, null, 8, ["iconColor"]),
122
- y(
122
+ h(
123
123
  "div",
124
124
  Y,
125
- w(A.message || a(N)("das-image-upload-text")),
125
+ S(x.message || a(z)("das-image-upload-text")),
126
126
  1
127
127
  /* TEXT */
128
128
  )
@@ -130,7 +130,7 @@ const q = () => ({ size2B: (t) => {
130
130
  512
131
131
  /* NEED_PATCH */
132
132
  ), [
133
- [T, a(g) === "normal"]
133
+ [w, a(g) === "normal"]
134
134
  ])
135
135
  ]),
136
136
  _: 1
@@ -140,40 +140,40 @@ const q = () => ({ size2B: (t) => {
140
140
  _: 1
141
141
  /* STABLE */
142
142
  }, 8, ["class", "spinning"]), [
143
- [T, !a(C)]
143
+ [w, !a(C)]
144
144
  ]),
145
- M(" 错误状态 "),
146
- U(y(
145
+ I(" 错误状态 "),
146
+ k(h(
147
147
  "div",
148
148
  Z,
149
149
  [
150
- y("div", ee, [
150
+ h("div", ee, [
151
151
  v(a(O), {
152
- iconColor: a(z)("--das-ui-color-danger"),
152
+ iconColor: a(N)("--das-ui-color-danger"),
153
153
  size: "small"
154
154
  }, null, 8, ["iconColor"]),
155
- y(
155
+ h(
156
156
  "div",
157
157
  ae,
158
- w(a(N)("das-image-upload-fail")),
158
+ S(a(z)("das-image-upload-fail")),
159
159
  1
160
160
  /* TEXT */
161
161
  )
162
162
  ]),
163
163
  v(a(P), {
164
164
  accept: a(l),
165
- "before-upload": a(x),
166
- "max-count": A.maxCount
165
+ "before-upload": a(A),
166
+ "max-count": x.maxCount
167
167
  }, {
168
- itemRender: h(({ file: n, actions: _ }) => r[1] || (r[1] = [])),
169
- default: h(() => [
168
+ itemRender: y(({ file: n, actions: b }) => r[1] || (r[1] = [])),
169
+ default: y(() => [
170
170
  v(a(H), {
171
171
  "btn-type": "primary-text",
172
172
  block: ""
173
173
  }, {
174
- default: h(() => [
174
+ default: y(() => [
175
175
  R(
176
- w(a(N)("das-image-upload-reupload")),
176
+ S(a(z)("das-image-upload-reupload")),
177
177
  1
178
178
  /* TEXT */
179
179
  )
@@ -189,35 +189,35 @@ const q = () => ({ size2B: (t) => {
189
189
  512
190
190
  /* NEED_PATCH */
191
191
  ), [
192
- [T, a(C)]
192
+ [w, a(C)]
193
193
  ])
194
194
  ]));
195
195
  }
196
- }), oe = (e, t) => {
197
- const o = e.__vccOpts || e;
198
- for (const [p, l] of t)
199
- o[p] = l;
200
- return o;
201
- }, re = /* @__PURE__ */ oe(te, [["__scopeId", "data-v-5821ad3e"]]), le = {
202
- 上传的图片大小不能超过: { "zh-CN": "上传的图片大小不能超过", en: "Uploaded image size cannot exceed" },
203
- 的: { "zh-CN": "", en: "of" },
204
- 文件: { "zh-CN": "文件", en: "file" },
205
- 上传的图片格式只能是: { "zh-CN": "上传的图片格式只能是", en: "Uploaded image format can only be" },
206
- 上传的文件格式只能是: { "zh-CN": "上传的文件格式只能是", en: "Uploaded file format can only be" },
207
- 格式: { "zh-CN": "格式", en: "format" },
196
+ }), te = (e, o) => {
197
+ const t = e.__vccOpts || e;
198
+ for (const [p, l] of o)
199
+ t[p] = l;
200
+ return t;
201
+ }, re = /* @__PURE__ */ te(oe, [["__scopeId", "data-v-5821ad3e"]]), le = {
202
+ "das-ui-import-upload-key1": { "zh-CN": "上传的图片格式只能是$0", en: "The uploaded picture format can only be $0" },
203
+ "das-ui-import-upload-key2": { "zh-CN": "上传的文件格式只能是$0", en: "The uploaded file format can only be $0" },
204
+ "das-ui-import-upload-key3": {
205
+ "zh-CN": "上传的图片大小不能超过$0的$1文件",
206
+ en: "The uploaded file format can only be $0"
207
+ },
208
208
  "das-image-upload-text": { "zh-CN": "上传图片", en: "Upload Image" },
209
209
  "das-image-upload-reupload": { "zh-CN": "重新上传", en: "Re-upload" },
210
210
  "das-image-upload-fail": { "zh-CN": "上传失败", en: "Upload Failed" }
211
- }, se = {
211
+ }, ie = {
212
212
  "--das-ui-image-upload-bgcolor": { light: "#FAFAFA" },
213
213
  "--das-ui-image-upload-border-color": { light: "#E5E5E5" },
214
- "--das-ui-image-upload-bgcolor-hover": { light: z("--das-ui-color-primary-level1") },
214
+ "--das-ui-image-upload-bgcolor-hover": { light: N("--das-ui-color-primary-level1") },
215
215
  "--das-ui-image-upload-border-color-hover": { light: "#5582F3" },
216
- "--das-ui-image-upload-border-color-error": { light: z("--das-ui-color-danger-level2") }
217
- }, Ae = $(re);
218
- B(le);
219
- D(se);
216
+ "--das-ui-image-upload-border-color-error": { light: N("--das-ui-color-danger-level2") }
217
+ }, xe = M(re);
218
+ U(le);
219
+ B(ie);
220
220
  export {
221
- Ae as DasImageUpload,
222
- Ae as default
221
+ xe as DasImageUpload,
222
+ xe as default
223
223
  };
@@ -1,31 +1,2 @@
1
- declare const _default: {
2
- 上传的图片大小不能超过: {
3
- "zh-CN": string;
4
- en: string;
5
- };
6
- 的: {
7
- "zh-CN": string;
8
- en: string;
9
- };
10
- 文件: {
11
- "zh-CN": string;
12
- en: string;
13
- };
14
- 上传的文件大小不能超过: {
15
- "zh-CN": string;
16
- en: string;
17
- };
18
- 上传的图片格式只能是: {
19
- "zh-CN": string;
20
- en: string;
21
- };
22
- 上传的文件格式只能是: {
23
- "zh-CN": string;
24
- en: string;
25
- };
26
- 格式: {
27
- "zh-CN": string;
28
- en: string;
29
- };
30
- };
1
+ declare const _default: {};
31
2
  export default _default;