@kengic/vue 0.0.2-beta.36 → 0.0.2-beta.37

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