@das-fed/web 6.4.0-test.6 → 6.4.0-test.7

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 (45) hide show
  1. package/{index-DxhjynU_.js → index-C94axr8O.js} +1 -1
  2. package/index-CG-NLN0B.js +13618 -0
  3. package/index-CG-NLN0B.js.gz +0 -0
  4. package/index-CuCbFhSZ.js +82 -0
  5. package/index-CuCbFhSZ.js.gz +0 -0
  6. package/index.js +4 -4
  7. package/package.json +8 -6
  8. package/packages/i18n/index.js +46 -44
  9. package/packages/i18n/index.js.gz +0 -0
  10. package/packages/layout/index.js +1 -1
  11. package/packages/layout/index.js.gz +0 -0
  12. package/packages/layout/style.css +1 -1
  13. package/packages/layout/style.css.gz +0 -0
  14. package/packages/main-app-framework/index-BfskR6Nj.js +12236 -0
  15. package/packages/main-app-framework/index-BfskR6Nj.js.gz +0 -0
  16. package/packages/main-app-framework/{index-DJS2UJ9p.js → index-CajdHIjS.js} +1 -1
  17. package/packages/main-app-framework/index-CgkGbWvz.js +82 -0
  18. package/packages/main-app-framework/index-CgkGbWvz.js.gz +0 -0
  19. package/packages/main-app-framework/index.js +1 -1
  20. package/packages/main-app-framework/style.css +1 -1
  21. package/packages/main-app-framework/style.css.gz +0 -0
  22. package/style.css +1 -1
  23. package/style.css.gz +0 -0
  24. package/types/main-app-framework/components/person-set-dialog/src/api.d.ts +2 -0
  25. package/types/main-app-framework/components/person-set-dialog/src/components/index.d.ts +2 -0
  26. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/api.d.ts +20 -0
  27. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/use-link-form/hooks/use-builtIn-dialog.d.ts +19 -0
  28. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/use-link-form/hooks/use-notBuiltIn-dialog.d.ts +22 -0
  29. package/types/main-app-framework/i18n/index.d.ts +40 -0
  30. package/types/main-app-framework/utils/src/get-portal-url/crypto.d.ts +14 -0
  31. package/types/main-app-framework/utils/src/get-portal-url/encrypt.d.ts +42 -0
  32. package/types/main-app-framework/utils/src/get-portal-url/generate-url.d.ts +4 -0
  33. package/types/main-app-framework/utils/src/get-portal-url/handle-portal-params.d.ts +2 -0
  34. package/types/main-app-framework/utils/src/get-portal-url/index.d.ts +2 -0
  35. package/types/main-app-framework/utils/src/get-portal-url/type.d.ts +16 -0
  36. package/types/main-app-framework/utils/src/set-common-info.d.ts +2 -2
  37. package/types/main-app-framework/utils/src/tools.d.ts +5 -1
  38. package/index-CaTnOy_7.js +0 -76
  39. package/index-CaTnOy_7.js.gz +0 -0
  40. package/index-DPLFD5gy.js +0 -7621
  41. package/index-DPLFD5gy.js.gz +0 -0
  42. package/packages/main-app-framework/index-VFl407K9.js +0 -76
  43. package/packages/main-app-framework/index-VFl407K9.js.gz +0 -0
  44. package/packages/main-app-framework/index-dN-CBG0Y.js +0 -6241
  45. package/packages/main-app-framework/index-dN-CBG0Y.js.gz +0 -0
Binary file
@@ -0,0 +1,82 @@
1
+ import { defineComponent as k, computed as p, withDirectives as v, openBlock as U, createBlock as C, unref as c, withCtx as A, createVNode as S, vShow as I } from "vue";
2
+ import { layoutData as j } from "@das-fed/web/packages/layout/index";
3
+ import { t as D } from "@das-fed/web/packages/i18n/index";
4
+ import { DasAppContainer as $ } from "@das-fed/ui/packages/business-components/app-container/index";
5
+ import { DasSpin as x } from "@das-fed/ui/packages/components/spin/index";
6
+ import { getTabInfo as T } from "@das-fed/utils/common-info";
7
+ import { setShowLayout as b } from "@das-fed/utils/common-tools";
8
+ import { createService as E } from "@das-fed/utils/create-api-service";
9
+ import { u as L, p as P, a as u, c as f, b as q, l as B, g as K, d as M } from "./index-CG-NLN0B.js";
10
+ const N = "v1", O = E(`/api/justauth/client/${N}`), V = O.get("/visitor/kingdee/auth/user/auth_code"), z = /* @__PURE__ */ k({
11
+ __name: "index",
12
+ setup(F) {
13
+ const { beforeEntryApp: d, entryApp: g } = L(), m = p(() => P.value.skinStyle), h = p(() => !!j.menu.items.length), w = p(() => {
14
+ if (!u.value || !u.value.length) return [];
15
+ const o = f(u.value);
16
+ return Array.isArray(o) ? o.length ? (o.forEach((r) => r.apps = y(r.apps, 4)), o) : [] : [];
17
+ }), y = (o, r) => {
18
+ const t = [];
19
+ for (let a = 0; a < o.length; a += r)
20
+ t.push(o.slice(a, a + r));
21
+ return t;
22
+ }, _ = async (o) => {
23
+ if (!o) return;
24
+ if (!sessionStorage.getItem("projectInfo")) {
25
+ window.confirm(D("系统资源更新,请刷新系统")) && (window.__isAutoCloseApp = !1, window.location.reload());
26
+ return;
27
+ }
28
+ const t = f(o);
29
+ if (B.innerSet = !0, t.routeUrl) {
30
+ if (o.code === "Ioc") {
31
+ window.open(t.routeUrl, "_blank");
32
+ return;
33
+ }
34
+ if (o.code === "wojiacloud") {
35
+ const e = sessionStorage.getItem("kingdee_token") || "";
36
+ if (e) {
37
+ const [n, i] = await V().run({ accessToken: e });
38
+ if (i) {
39
+ const s = (i == null ? void 0 : i.auth_code) ?? "";
40
+ t.routeUrl = t.routeUrl.includes("?") ? `${t.routeUrl}&code=${s}` : `${t.routeUrl}?code=${s}`;
41
+ }
42
+ }
43
+ }
44
+ }
45
+ const a = (o == null ? void 0 : o.openType) ?? 1, l = (o == null ? void 0 : o.type) ?? 1;
46
+ if (a === 1) {
47
+ if (!await d(o)) return;
48
+ const n = T().preTab[o.code], i = (n == null ? void 0 : n.code) ?? "", s = { ...(n == null ? void 0 : n.query) ?? {} };
49
+ g({ microApp: t, menuCode: i, route: { query: s } });
50
+ }
51
+ if (a === 2 && t.routeUrl) {
52
+ let e = "";
53
+ if (l === 1)
54
+ e = t != null && t.applicationPath ? location.origin + "/" + t.applicationPath + t.routeUrl : location.origin + t.routeUrl, e = b(e);
55
+ else if (l === 2) {
56
+ const n = await K(t.routeUrl, (t == null ? void 0 : t.param) ?? []);
57
+ e = M(n);
58
+ }
59
+ window.open(e, "_blank");
60
+ }
61
+ };
62
+ return (o, r) => v((U(), C(c(x), {
63
+ full: "",
64
+ spinning: c(q)
65
+ }, {
66
+ default: A(() => [
67
+ S(c($), {
68
+ theme: m.value,
69
+ appCategorys: w.value,
70
+ onOpenApp: _
71
+ }, null, 8, ["theme", "appCategorys"])
72
+ ]),
73
+ _: 1
74
+ /* STABLE */
75
+ }, 8, ["spinning"])), [
76
+ [I, !h.value]
77
+ ]);
78
+ }
79
+ });
80
+ export {
81
+ z as default
82
+ };
Binary file
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as e, z as t, B as n, A as i, C as r, e as u, k as o, v as g, n as m, g as p, j as D, r as l, x as L, y as b, f as c, i as h, F as A, G as T, o as y, D as R, E as W, J as I, H as M, s as F, h as V, m as f, q as k, w as v, t as w } from "./index-DPLFD5gy.js";
1
+ import { J as e, A as t, C as n, B as i, D as r, e as u, m as o, w as m, o as p, f as g, k as D, v as l, y as L, z as b, h as c, i as h, G as A, H as T, q as y, E as R, F as W, K as I, I as M, s as F, j as V, n as f, r as k, x as v, t as w } from "./index-CG-NLN0B.js";
2
2
  export {
3
3
  e as DasMainAppLayout,
4
4
  t as DasWebLayout,
@@ -7,9 +7,9 @@ export {
7
7
  r as DasWebTabs,
8
8
  u as createDasWebApp,
9
9
  o as currentLang,
10
- g as currentTheme,
11
- m as customLangeData,
12
- p as getI18nRule,
10
+ m as currentTheme,
11
+ p as customLangeData,
12
+ g as getI18nRule,
13
13
  D as getLang,
14
14
  l as getThemeRule,
15
15
  L as getVar,
package/package.json CHANGED
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "name": "@das-fed/web",
3
- "version": "6.4.0-test.6",
3
+ "version": "6.4.0-test.7",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "dependencies": {
7
- "@das-fed/ui": "6.4.0-test.6",
8
- "@das-fed/utils": "6.4.0-test.6",
9
- "@das-fed/web": "6.4.0-test.6",
10
- "@das-fed/web-components": "6.4.0-test.6",
7
+ "@das-fed/ui": "6.4.0-test.7",
8
+ "@das-fed/utils": "6.4.0-test.7",
9
+ "@das-fed/web": "6.4.0-test.7",
10
+ "@das-fed/web-components": "6.4.0-test.7",
11
11
  "@microsoft/signalr": "^8.0.7",
12
12
  "@vueuse/core": "^9.13.0",
13
13
  "animate.css": "^4.1.1",
14
+ "crypto-js": "^4.2.0",
14
15
  "lodash": "^4.17.21",
15
16
  "lodash-es": "^4.17.21",
16
17
  "nanoid": "3.2.0",
@@ -18,7 +19,8 @@
18
19
  "vue-router": "^4.4.0"
19
20
  },
20
21
  "devDependencies": {
21
- "@das-fed/cli": "6.4.0-test.6",
22
+ "@das-fed/cli": "6.4.0-test.7",
23
+ "@types/crypto-js": "^4.2.2",
22
24
  "@types/lodash": "^4.14.194",
23
25
  "@types/lodash-es": "^4.17.12",
24
26
  "@vitejs/plugin-vue": "^5.1.0",
@@ -1,5 +1,5 @@
1
- import { reactive as i, ref as w, computed as d } from "vue";
2
- const z = {
1
+ import { reactive as m, ref as g, computed as w } from "vue";
2
+ const u = {
3
3
  详情: { "zh-CN": "详情", en: "Details", _appCode: "framework" },
4
4
  下载: { "zh-CN": "下载", en: "Download", _appCode: "framework" },
5
5
  审核: { "zh-CN": "审核", en: "Approve", _appCode: "framework" },
@@ -23,55 +23,57 @@ const z = {
23
23
  离线数: { "zh-CN": "离线数", en: "Offline", _appCode: "framework" },
24
24
  已停用: { "zh-CN": "已停用", en: "Deactivated", _appCode: "framework" },
25
25
  未激活: { "zh-CN": "未激活", en: "Inactive", _appCode: "framework" }
26
- }, p = i({}), C = i({}), l = i({});
27
- var m;
28
- const u = (m = navigator.language) != null && m.toLowerCase().startsWith("zh") ? "zh-CN" : "en", c = w(u), N = "dasI18n", L = (a = {}, n) => {
29
- const r = n === "global", t = !r, s = {};
30
- for (const e in a)
31
- for (const o in a[e])
32
- s[o] || (s[o] = {}), s[o][e] = a[e][o] ?? "", r && (C[o] || (C[o] = {}), C[o][e] = s[o][e]), t && (p[o] || (p[o] = {}), p[o][e] = s[o][e]);
33
- }, f = (a = {}, n) => {
34
- var s;
35
- const r = n === "global", t = !r;
36
- for (const e in a)
37
- if (r && !C[e] && (C[e] = a[e]), t) {
38
- const o = (s = a[e]) != null && s._appCode ? a[e]._appCode.toLowerCase() : "";
39
- o && (l[o] || (l[o] = {}), l[o][e] = a[e]), p[e] || (p[e] = a[e]);
26
+ }, p = m({}), l = m({}), C = m({});
27
+ var h;
28
+ const z = (h = navigator.language) != null && h.toLowerCase().startsWith("zh") ? "zh-CN" : "en", c = g(z), N = "dasI18n", v = (e = {}, n) => {
29
+ const s = n === "global", t = !s, r = {};
30
+ for (const a in e)
31
+ for (const o in e[a])
32
+ r[o] || (r[o] = {}), r[o][a] = e[a][o] ?? "", s && (l[o] || (l[o] = {}), l[o][a] = r[o][a]), t && (p[o] || (p[o] = {}), p[o][a] = r[o][a]);
33
+ }, i = (e = {}, n) => {
34
+ var r;
35
+ const s = n === "global", t = !s;
36
+ for (const a in e)
37
+ if (s && !l[a] && (l[a] = e[a]), t) {
38
+ const o = (r = e[a]) != null && r._appCode ? e[a]._appCode.toLowerCase() : "";
39
+ o && (C[o] || (C[o] = {}), C[o][a] = e[a]), p[a] || (p[a] = e[a]);
40
40
  }
41
- }, v = async (a) => {
42
- var t, s;
43
- const n = window[N];
44
- n && f(n, "global"), f(z);
45
- let r = Object.assign(((t = a == null ? void 0 : a.i18n) == null ? void 0 : t.glob) || {});
46
- (s = a == null ? void 0 : a.microApps) == null || s.map((e) => {
47
- var o;
48
- r = Object.assign(r, ((o = e.i18n) == null ? void 0 : o.glob) || {});
49
- }), Object.values(r).filter((e) => !!e).flat().map((e) => f(e));
50
- }, _ = (a) => {
41
+ }, L = async (e) => {
42
+ var r, a;
43
+ const n = document.documentElement;
44
+ n && n.setAttribute("lang", c.value);
45
+ const s = window[N];
46
+ s && i(s, "global"), i(u);
47
+ let t = Object.assign(((r = e == null ? void 0 : e.i18n) == null ? void 0 : r.glob) || {});
48
+ (a = e == null ? void 0 : e.microApps) == null || a.map((o) => {
49
+ var f;
50
+ t = Object.assign(t, ((f = o.i18n) == null ? void 0 : f.glob) || {});
51
+ }), Object.values(t).filter((o) => !!o).flat().map((o) => i(o));
52
+ }, _ = (e) => {
51
53
  let n = "";
52
- const r = /\/([^\/]+)\/([^\/]+)\//, t = a.match(r);
54
+ const s = /\/([^\/]+)\/([^\/]+)\//, t = e.match(s);
53
55
  return t && t.length >= 3 && (n = t[1] + "/" + t[2]), n ? n.toLowerCase() : "";
54
- }, k = (a, ...n) => d(() => {
55
- const r = _(location.pathname);
56
- let t = l.framework ?? {}, s = l[r] ?? {}, e = C[a] || t[a] || s[a] || p[a] || a;
57
- if (e === a) return a;
58
- typeof e == "string" && (e = { "zh-CN": e });
59
- let o = e[c.value];
60
- return c.value === "zh-CN" && e["zh-cn"] && !e["zh-CN"] && (o = e["zh-cn"]), n.map((h, g) => {
61
- o = o.replace(`$${g}`, h);
56
+ }, k = (e, ...n) => w(() => {
57
+ const s = _(location.pathname);
58
+ let t = C.framework ?? {}, r = C[s] ?? {}, a = l[e] || t[e] || r[e] || p[e] || e;
59
+ if (a === e) return e;
60
+ typeof a == "string" && (a = { "zh-CN": a });
61
+ let o = a[c.value];
62
+ return c.value === "zh-CN" && a["zh-cn"] && !a["zh-CN"] && (o = a["zh-cn"]), n.map((f, d) => {
63
+ o = o.replace(`$${d}`, f);
62
64
  }), o;
63
- }), D = k, I = (a, ...n) => D(a, ...n).value, O = (a) => {
64
- c.value = a;
65
- }, x = () => c;
65
+ }), b = k, I = (e, ...n) => b(e, ...n).value, A = (e) => {
66
+ c.value = e;
67
+ }, O = () => c;
66
68
  export {
67
69
  c as currentLang,
68
70
  p as customLangeData,
69
71
  k as getI18nRule,
70
- x as getLang,
71
- D as i18n,
72
- v as initI18n,
73
- f as setI18nRule,
74
- O as setLang,
75
- L as setLangRule,
72
+ O as getLang,
73
+ b as i18n,
74
+ L as initI18n,
75
+ i as setI18nRule,
76
+ A as setLang,
77
+ v as setLangRule,
76
78
  I as t
77
79
  };
Binary file
@@ -634,7 +634,7 @@ const h = z({
634
634
  ]);
635
635
  };
636
636
  }
637
- }), at = /* @__PURE__ */ fe(qe, [["__scopeId", "data-v-b6d7b17e"]]), Ge = ["theme", "modelValue", "logoUrl", "config", "innerPagesConfig", "searchConfig", "projectTreeConfig", "userInfoConfig"], rt = /* @__PURE__ */ Q({
637
+ }), at = /* @__PURE__ */ fe(qe, [["__scopeId", "data-v-4e4b4c13"]]), Ge = ["theme", "modelValue", "logoUrl", "config", "innerPagesConfig", "searchConfig", "projectTreeConfig", "userInfoConfig"], rt = /* @__PURE__ */ Q({
638
638
  __name: "das-web-nav",
639
639
  setup(e) {
640
640
  const { nav: t } = H, n = u(() => t.theme), l = u(() => t.logo || ""), d = u(() => t.activeItem || ""), r = u(() => (t.items || []).filter((g) => g.fixed)), f = u(() => (t.items || []).filter((g) => !g.fixed)), y = u(() => {
Binary file