@kengic/vue 0.0.2-beta.38 → 0.0.2-beta.39

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.
@@ -1,71 +1,65 @@
1
- import { defineComponent as U, createVNode as h } from "vue";
2
- import { Collapse as D } from "ant-design-vue";
3
- const Ee = U({
1
+ import { defineComponent as _, createVNode as h } from "vue";
2
+ import { Collapse as v } from "ant-design-vue";
3
+ const be = _({
4
4
  name: "KgPage",
5
5
  setup(e, {
6
6
  slots: t
7
7
  }) {
8
8
  return () => {
9
- var n;
9
+ var i;
10
10
  return h("div", {
11
11
  class: "kg-page"
12
- }, [(n = t.default) == null ? void 0 : n.call(t)]);
12
+ }, [(i = t.default) == null ? void 0 : i.call(t)]);
13
13
  };
14
14
  }
15
15
  });
16
- const de = U({
16
+ const ge = _({
17
17
  name: "KgVarProfile",
18
18
  setup(e, {
19
19
  slots: t
20
20
  }) {
21
21
  return () => h("div", {
22
22
  class: "kg-var-profile"
23
- }, [h(D, {
23
+ }, [h(v, {
24
24
  activeKey: "1"
25
25
  }, {
26
- default: () => [h(D.Panel, {
26
+ default: () => [h(v.Panel, {
27
27
  key: "1",
28
28
  header: "This is panel header 1"
29
29
  }, {
30
30
  default: () => {
31
- var n;
32
- return [(n = t.default) == null ? void 0 : n.call(t)];
31
+ var i;
32
+ return [(i = t.default) == null ? void 0 : i.call(t)];
33
33
  }
34
34
  })]
35
35
  })]);
36
36
  }
37
- }), z = {
37
+ }), V = {
38
38
  foo: {
39
39
  x: "AAA"
40
40
  }
41
- }, V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42
- __proto__: null,
43
- default: z
44
- }, Symbol.toStringTag, { value: "Module" })), W = {
41
+ }, W = {
45
42
  foo: {
46
43
  x: "\u554A\u554A\u554A"
47
44
  }
48
- }, Z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
49
- __proto__: null,
50
- default: W
51
- }, Symbol.toStringTag, { value: "Module" })), Ne = { en: V, zh_CN: Z };
52
- var b = /* @__PURE__ */ ((e) => (e.DATA_MANAGER = "data-manager", e.BUSINESS_MANAGER = "business-manager", e.SYS = "sys", e))(b || {}), u = /* @__PURE__ */ ((e) => (e.DATA_MANAGER = "/wms/data-manager", e.BUSINESS_MANAGER = "/wms/business-manager", e.SYS = "/sys", e))(u || {});
53
- const k = ["data-manager", "business-manager", "sys"];
54
- function F(e, t) {
55
- var n, o;
45
+ }, Ee = { en: V, zh_CN: W };
46
+ var a = /* @__PURE__ */ ((e) => (e.DATA_MANAGER = "data-manager", e.BUSINESS_MANAGER = "business-manager", e.SYS = "sys", e))(a || {}), u = /* @__PURE__ */ ((e) => (e.DATA_MANAGER = "/wms/data-manager", e.BUSINESS_MANAGER = "/wms/business-manager", e.SYS = "/sys", e))(u || {});
47
+ const P = ["data-manager", "business-manager", "sys"];
48
+ function z(e, t) {
49
+ var i, o;
56
50
  switch (t) {
57
- case b.DATA_MANAGER:
58
- return (n = e == null ? void 0 : e.startsWith(u.DATA_MANAGER)) != null ? n : !1;
59
- case b.BUSINESS_MANAGER:
51
+ case a.DATA_MANAGER:
52
+ return (i = e == null ? void 0 : e.startsWith(u.DATA_MANAGER)) != null ? i : !1;
53
+ case a.BUSINESS_MANAGER:
60
54
  return (o = e == null ? void 0 : e.startsWith(u.BUSINESS_MANAGER)) != null ? o : !1;
61
- case b.SYS:
55
+ case a.SYS:
62
56
  return (e == null ? void 0 : e.startsWith(u.SYS)) || !(e != null && e.startsWith(u.DATA_MANAGER)) && !(e != null && e.startsWith(u.BUSINESS_MANAGER));
63
57
  default:
64
58
  throw new Error(`\u672A\u77E5\u6A21\u5757: ${t}`);
65
59
  }
66
60
  }
67
- function Se(e) {
68
- const t = k.find((n) => F(e, n));
61
+ function Ne(e) {
62
+ const t = P.find((i) => z(e, i));
69
63
  if (t)
70
64
  return t;
71
65
  throw new Error(`\u5730\u5740\u65E0\u6CD5\u5339\u914D\u6A21\u5757. \u5730\u5740: ${e}`);
@@ -73,13 +67,13 @@ function Se(e) {
73
67
  function me(e) {
74
68
  let t = "";
75
69
  switch (e) {
76
- case b.DATA_MANAGER:
70
+ case a.DATA_MANAGER:
77
71
  t = `${u.DATA_MANAGER}/views/adrmst`;
78
72
  break;
79
- case b.BUSINESS_MANAGER:
73
+ case a.BUSINESS_MANAGER:
80
74
  t = `${u.BUSINESS_MANAGER}/outbound-plan/outbound-order/outbound-order`;
81
75
  break;
82
- case b.SYS:
76
+ case a.SYS:
83
77
  t = "/about/index";
84
78
  break;
85
79
  default:
@@ -94,7 +88,7 @@ function me(e) {
94
88
  * @license BSD-3-Clause
95
89
  * @version 10.0.6
96
90
  */
97
- const J = "array", q = "bit", O = "bits", H = "byte", Y = "bytes", E = "", Q = "exponent", X = "function", y = "iec", ee = "Invalid number", te = "Invalid rounding method", N = "jedec", ne = "object", P = ".", ie = "round", oe = "s", re = "kbit", se = "kB", ce = " ", le = "string", ue = "0", I = {
91
+ const Z = "array", F = "bit", U = "bits", J = "byte", k = "bytes", E = "", q = "exponent", H = "function", y = "iec", Q = "Invalid number", X = "Invalid rounding method", m = "jedec", ee = "object", K = ".", te = "round", ie = "s", ne = "kbit", oe = "kB", re = " ", se = "string", ce = "0", T = {
98
92
  symbol: {
99
93
  iec: {
100
94
  bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"],
@@ -110,105 +104,105 @@ const J = "array", q = "bit", O = "bits", H = "byte", Y = "bytes", E = "", Q = "
110
104
  jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"]
111
105
  }
112
106
  };
113
- function fe(e, {
107
+ function le(e, {
114
108
  bits: t = !1,
115
- pad: n = !1,
109
+ pad: i = !1,
116
110
  base: o = -1,
117
111
  round: l = 2,
118
112
  locale: c = E,
119
- localeOptions: A = {},
113
+ localeOptions: b = {},
120
114
  separator: f = E,
121
- spacer: S = ce,
115
+ spacer: B = re,
122
116
  symbols: R = {},
123
117
  standard: s = E,
124
- output: T = le,
125
- fullform: K = !1,
118
+ output: w = se,
119
+ fullform: x = !1,
126
120
  fullforms: M = [],
127
121
  exponent: p = -1,
128
- roundingMethod: j = ie,
129
- precision: m = 0
122
+ roundingMethod: L = te,
123
+ precision: S = 0
130
124
  } = {}) {
131
- let r = p, g = Number(e), i = [], a = 0, w = E;
132
- o === -1 && s.length === 0 ? (o = 10, s = N) : o === -1 && s.length > 0 ? (s = s === y ? y : N, o = s === y ? 2 : 10) : (o = o === 2 ? 2 : 10, s = o === 10 || s === N ? N : y);
133
- const B = o === 10 ? 1e3 : 1024, x = K === !0, _ = g < 0, G = Math[j];
125
+ let r = p, g = Number(e), n = [], A = 0, I = E;
126
+ o === -1 && s.length === 0 ? (o = 10, s = m) : o === -1 && s.length > 0 ? (s = s === y ? y : m, o = s === y ? 2 : 10) : (o = o === 2 ? 2 : 10, s = o === 10 || s === m ? m : y);
127
+ const d = o === 10 ? 1e3 : 1024, O = x === !0, G = g < 0, $ = Math[L];
134
128
  if (typeof e != "bigint" && isNaN(e))
135
- throw new TypeError(ee);
136
- if (typeof G !== X)
137
- throw new TypeError(te);
138
- if (_ && (g = -g), (r === -1 || isNaN(r)) && (r = Math.floor(Math.log(g) / Math.log(B)), r < 0 && (r = 0)), r > 8 && (m > 0 && (m += 8 - r), r = 8), T === Q)
129
+ throw new TypeError(Q);
130
+ if (typeof $ !== H)
131
+ throw new TypeError(X);
132
+ if (G && (g = -g), (r === -1 || isNaN(r)) && (r = Math.floor(Math.log(g) / Math.log(d)), r < 0 && (r = 0)), r > 8 && (S > 0 && (S += 8 - r), r = 8), w === q)
139
133
  return r;
140
134
  if (g === 0)
141
- i[0] = 0, w = i[1] = I.symbol[s][t ? O : Y][r];
135
+ n[0] = 0, I = n[1] = T.symbol[s][t ? U : k][r];
142
136
  else {
143
- a = g / (o === 2 ? Math.pow(2, r * 10) : Math.pow(1e3, r)), t && (a = a * 8, a >= B && r < 8 && (a = a / B, r++));
144
- const d = Math.pow(10, r > 0 ? l : 0);
145
- i[0] = G(a * d) / d, i[0] === B && r < 8 && p === -1 && (i[0] = 1, r++), w = i[1] = o === 10 && r === 1 ? t ? re : se : I.symbol[s][t ? O : Y][r];
137
+ A = g / (o === 2 ? Math.pow(2, r * 10) : Math.pow(1e3, r)), t && (A = A * 8, A >= d && r < 8 && (A = A / d, r++));
138
+ const N = Math.pow(10, r > 0 ? l : 0);
139
+ n[0] = $(A * N) / N, n[0] === d && r < 8 && p === -1 && (n[0] = 1, r++), I = n[1] = o === 10 && r === 1 ? t ? ne : oe : T.symbol[s][t ? U : k][r];
146
140
  }
147
- if (_ && (i[0] = -i[0]), m > 0 && (i[0] = i[0].toPrecision(m)), i[1] = R[i[1]] || i[1], c === !0 ? i[0] = i[0].toLocaleString() : c.length > 0 ? i[0] = i[0].toLocaleString(c, A) : f.length > 0 && (i[0] = i[0].toString().replace(P, f)), n && Number.isInteger(i[0]) === !1 && l > 0) {
148
- const d = f || P, $ = i[0].toString().split(d), v = $[1] || E, C = v.length, L = l - C;
149
- i[0] = `${$[0]}${d}${v.padEnd(C + L, ue)}`;
141
+ if (G && (n[0] = -n[0]), S > 0 && (n[0] = n[0].toPrecision(S)), n[1] = R[n[1]] || n[1], c === !0 ? n[0] = n[0].toLocaleString() : c.length > 0 ? n[0] = n[0].toLocaleString(c, b) : f.length > 0 && (n[0] = n[0].toString().replace(K, f)), i && Number.isInteger(n[0]) === !1 && l > 0) {
142
+ const N = f || K, D = n[0].toString().split(N), C = D[1] || E, Y = C.length, j = l - Y;
143
+ n[0] = `${D[0]}${N}${C.padEnd(Y + j, ce)}`;
150
144
  }
151
- return x && (i[1] = M[r] ? M[r] : I.fullform[s][r] + (t ? q : H) + (i[0] === 1 ? E : oe)), T === J ? i : T === ne ? {
152
- value: i[0],
153
- symbol: i[1],
145
+ return O && (n[1] = M[r] ? M[r] : T.fullform[s][r] + (t ? F : J) + (n[0] === 1 ? E : ie)), w === Z ? n : w === ee ? {
146
+ value: n[0],
147
+ symbol: n[1],
154
148
  exponent: r,
155
- unit: w
156
- } : i.join(S);
149
+ unit: I
150
+ } : n.join(B);
157
151
  }
158
152
  function Be(e) {
159
153
  const t = Number(e);
160
- return Number.isNaN(t) || t <= 0 ? "0 KB" : String(fe(t)).toUpperCase();
154
+ return Number.isNaN(t) || t <= 0 ? "0 KB" : String(le(t)).toUpperCase();
161
155
  }
162
- function ae(e, t, n = 512) {
156
+ function ue(e, t, i = 512) {
163
157
  let o = e;
164
158
  o.startsWith("data:") && (o = e.split("base64,")[1]);
165
159
  const l = atob(o), c = [];
166
- for (let A = 0; A < l.length; A += n) {
167
- const f = l.slice(A, A + n), S = new Array(f.length);
160
+ for (let b = 0; b < l.length; b += i) {
161
+ const f = l.slice(b, b + i), B = new Array(f.length);
168
162
  for (let s = 0; s < f.length; s++)
169
- S[s] = f.charCodeAt(s);
170
- const R = new Uint8Array(S);
163
+ B[s] = f.charCodeAt(s);
164
+ const R = new Uint8Array(B);
171
165
  c.push(R);
172
166
  }
173
167
  return new Blob(c, { type: t });
174
168
  }
175
- function ye(e, t, n) {
169
+ function Se(e, t, i) {
176
170
  let o;
177
- typeof e == "string" ? o = new Blob([ae(e, n)], { type: n }) : o = new Blob([e], { type: n });
171
+ typeof e == "string" ? o = new Blob([ue(e, i)], { type: i }) : o = new Blob([e], { type: i });
178
172
  const l = URL.createObjectURL(o), c = document.createElement("a");
179
173
  document.body.appendChild(c), c.setAttribute("style", "display:none"), c.setAttribute("href", l), c.setAttribute("download", t), c.click(), URL.revokeObjectURL(l);
180
174
  }
181
- function be(e) {
175
+ function fe(e) {
182
176
  const t = [];
183
- return e.forEach((n) => {
177
+ return e.forEach((i) => {
184
178
  [
185
179
  "/online/copyform/:code",
186
180
  "/online/cgformList/:id",
187
181
  "/online/cgformTreeList/:id",
188
182
  "/online/cgreport/:id",
189
183
  "/online/graphreport/chart/:code"
190
- ].includes(n.path) && k.forEach((o) => {
184
+ ].includes(i.path) && P.forEach((o) => {
191
185
  t.push({
192
- ...n,
193
- path: `/${o}${n.path}`,
194
- name: `${o}-${n.name}`,
195
- id: `${o}-${n.id}`
186
+ ...i,
187
+ path: `/${o}${i.path}`,
188
+ name: `${o}-${i.name}`,
189
+ id: `${o}-${i.id}`
196
190
  });
197
- }), n.children && (n.children = be(n.children));
191
+ }), i.children && (i.children = fe(i.children));
198
192
  }), [...e, ...t];
199
193
  }
200
194
  export {
201
- k as KG_APPS,
202
- b as KG_APPS_ENUM,
195
+ P as KG_APPS,
196
+ a as KG_APPS_ENUM,
203
197
  u as KG_APPS_PREFIXS_ENUM,
204
- Ne as KG_I18N,
205
- Ee as KgPage,
206
- de as KgVarProfile,
207
- be as addOnlineRoutesForAllApps,
208
- ae as base64toBlob,
209
- ye as downloadFile,
210
- Se as getAppByPath,
198
+ Ee as KG_I18N,
199
+ be as KgPage,
200
+ ge as KgVarProfile,
201
+ fe as addOnlineRoutesForAllApps,
202
+ ue as base64toBlob,
203
+ Se as downloadFile,
204
+ Ne as getAppByPath,
211
205
  me as getAppIndexPath,
212
206
  Be as getFileSize,
213
- F as isPathInApp
207
+ z as isPathInApp
214
208
  };
@@ -1,6 +1,12 @@
1
- import * as en from './en';
2
- import * as zh_CN from './zh_CN';
3
1
  export declare const KG_I18N: {
4
- en: typeof en;
5
- zh_CN: typeof zh_CN;
2
+ en: {
3
+ foo: {
4
+ x: string;
5
+ };
6
+ };
7
+ zh_CN: {
8
+ foo: {
9
+ x: string;
10
+ };
11
+ };
6
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.0.2-beta.38",
3
+ "version": "0.0.2-beta.39",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "publish:all:beta": "npm run bump-version:beta && npm run publish:all",