@das-fed/web 7.1.0-dev.7 → 7.1.0-hongfa.1
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.
- package/{packages/main-app-framework/index-DyPfvPdh.js → index-BWn-Pl08.js} +1 -1
- package/{packages/main-app-framework/index-B3ZoovpL.js → index-CqoyDk2A.js} +1 -1
- package/index-CqoyDk2A.js.gz +0 -0
- package/{index-CKXxdzZD.js → index-DWQBmiPa.js} +5709 -5658
- package/index-DWQBmiPa.js.gz +0 -0
- package/index.js +1 -1
- package/package.json +12 -8
- package/packages/create-das-web-app/index.js +44 -53
- package/packages/create-das-web-app/index.js.gz +0 -0
- package/packages/i18n/index.js +48 -54
- package/packages/i18n/index.js.gz +0 -0
- package/packages/layout/index.js +287 -281
- package/packages/layout/index.js.gz +0 -0
- package/packages/layout/style.css +1 -1
- package/packages/layout/style.css.gz +0 -0
- package/packages/main-app-framework/assets/black-logo-B-Qipuvf.png +0 -0
- package/packages/main-app-framework/assets/cjb-CTZzysmN.png +0 -0
- package/packages/main-app-framework/assets/cjb-preview-Cz6ZEp0h.png +0 -0
- package/packages/main-app-framework/assets/cjb-preview-DWYaDhQb.png +0 -0
- package/packages/main-app-framework/assets/default-DOjV2jIm.png +0 -0
- package/packages/main-app-framework/assets/default-preview-DEfMZxi2.png +0 -0
- package/packages/main-app-framework/assets/default-preview-HZjPO_Oz.png +0 -0
- package/packages/main-app-framework/assets/dkh-DkyUTuR0.png +0 -0
- package/packages/main-app-framework/assets/dkh-preview-DQZDuJfb.png +0 -0
- package/packages/main-app-framework/assets/dkh-preview-SJ0YoU2z.png +0 -0
- package/packages/main-app-framework/assets/feedback-QNGIKgWm.png +0 -0
- package/packages/main-app-framework/assets/hengxian-CyCsW-Hu.png +0 -0
- package/packages/main-app-framework/assets/kjl-DozNzlyC.png +0 -0
- package/packages/main-app-framework/assets/kjl-preview-CCoSuYDK.png +0 -0
- package/packages/main-app-framework/assets/kjl-preview-xHIEscys.png +0 -0
- package/packages/main-app-framework/assets/noIconurl-7L4lHbul.png +0 -0
- package/packages/main-app-framework/assets/qianru-Bsf1Lhh2.png +0 -0
- package/packages/main-app-framework/assets/setected-tvECHVG9.svg +31 -0
- package/packages/main-app-framework/assets/ssl-XnQ4A9bQ.png +0 -0
- package/packages/main-app-framework/assets/ssl-preview-C4BD2d61.png +0 -0
- package/packages/main-app-framework/assets/ssl-preview-DI5pA3Df.png +0 -0
- package/packages/main-app-framework/assets/unselected-C4QVkFPL.svg +39 -0
- package/packages/main-app-framework/assets/white-logo-D7bqAkJL.png +0 -0
- package/{index-Ykq1RIwb.js → packages/main-app-framework/index-KrpfKz6n.js} +1 -1
- package/packages/main-app-framework/index-KrpfKz6n.js.gz +0 -0
- package/packages/main-app-framework/index-TlWCq0Vp.js +16724 -0
- package/packages/main-app-framework/index-TlWCq0Vp.js.gz +0 -0
- package/{index-D28elq7K.js → packages/main-app-framework/index-mcZhp5kH.js} +1 -1
- package/packages/main-app-framework/index.js +1 -1
- package/packages/main-app-framework/style.css +1 -1
- package/packages/main-app-framework/style.css.gz +0 -0
- package/style.css +1 -1
- package/style.css.gz +0 -0
- package/types/i18n/index.d.ts +4 -0
- package/types/main-app-framework/i18n/index.d.ts +10 -0
- package/types/main-app-framework/init-platform/api.d.ts +1 -0
- package/types/main-app-framework/init-sso/useTokenRefresh.d.ts +9 -0
- package/index-CKXxdzZD.js.gz +0 -0
- package/index-Ykq1RIwb.js.gz +0 -0
- package/packages/main-app-framework/index-B3ZoovpL.js.gz +0 -0
- package/packages/main-app-framework/index-DBf1eyH9.js +0 -16665
- package/packages/main-app-framework/index-DBf1eyH9.js.gz +0 -0
- package/types/create-das-web-app/get-web-config.d.ts +0 -1
|
Binary file
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-DWQBmiPa.js";
|
|
2
2
|
export {
|
|
3
3
|
e as DasMainAppLayout,
|
|
4
4
|
t as DasWebLayout,
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/web",
|
|
3
|
-
"version": "7.1.0-
|
|
3
|
+
"version": "7.1.0-hongfa.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@das-fed/ui": "7.1.0-
|
|
8
|
-
"@das-fed/utils": "7.1.0-
|
|
9
|
-
"@das-fed/web": "7.1.0-
|
|
10
|
-
"@das-fed/web-components": "7.1.0-
|
|
7
|
+
"@das-fed/ui": "7.1.0-hongfa.1",
|
|
8
|
+
"@das-fed/utils": "7.1.0-hongfa.1",
|
|
9
|
+
"@das-fed/web": "7.1.0-hongfa.1",
|
|
10
|
+
"@das-fed/web-components": "7.1.0-hongfa.1",
|
|
11
11
|
"@microsoft/signalr": "^8.0.7",
|
|
12
12
|
"@vueuse/core": "^9.13.0",
|
|
13
13
|
"animate.css": "^4.1.1",
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
"vue-router": "^4.4.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@das-fed/cli": "7.1.0-
|
|
22
|
+
"@das-fed/cli": "7.1.0-hongfa.1",
|
|
23
23
|
"@types/crypto-js": "^4.2.2",
|
|
24
24
|
"@types/lodash": "^4.14.194",
|
|
25
25
|
"@types/lodash-es": "^4.17.12",
|
|
26
|
+
"@types/js-cookie": "^3.0.6",
|
|
26
27
|
"@vitejs/plugin-vue": "^5.1.0",
|
|
27
28
|
"consola": "^3.2.3",
|
|
28
29
|
"execa": "^9.3.0",
|
|
@@ -35,14 +36,17 @@
|
|
|
35
36
|
"typescript": "^5.5.3",
|
|
36
37
|
"vite": "^5.3.4",
|
|
37
38
|
"vite-plugin-dts": "^3.9.1",
|
|
38
|
-
"vue-tsc": "^1.8.27"
|
|
39
|
+
"vue-tsc": "^1.8.27",
|
|
40
|
+
"js-cookie": "^3.0.5"
|
|
39
41
|
},
|
|
40
42
|
"peerDependencies": {
|
|
41
43
|
"vue": ">=3.4.21",
|
|
42
44
|
"vue-router": ">=4.2.5"
|
|
43
45
|
},
|
|
44
46
|
"sideEffects": [
|
|
45
|
-
"@das-fed/utils/*"
|
|
47
|
+
"@das-fed/utils/*",
|
|
48
|
+
"./packages/style/*",
|
|
49
|
+
"./packages/**/*.css"
|
|
46
50
|
],
|
|
47
51
|
"publishConfig": {
|
|
48
52
|
"access": "public",
|
|
@@ -1,67 +1,58 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { initTheme as
|
|
3
|
-
import { initI18n as
|
|
4
|
-
import { DasWebLayout as
|
|
5
|
-
import { createPinia as
|
|
1
|
+
import { ref as x, createApp as O } from "vue";
|
|
2
|
+
import { initTheme as P } from "@das-fed/web/packages/theme/index";
|
|
3
|
+
import { initI18n as W } from "@das-fed/web/packages/i18n/index";
|
|
4
|
+
import { DasWebLayout as $ } from "@das-fed/web/packages/layout/index";
|
|
5
|
+
import { createPinia as j } from "pinia";
|
|
6
6
|
import k from "pinia-plugin-persistedstate";
|
|
7
|
-
import { createRouter as y, createWebHistory as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
a.default && a.default.install && e.use(a.default, t), a.install && e.use(a, t);
|
|
7
|
+
import { createRouter as y, createWebHistory as D } from "vue-router";
|
|
8
|
+
const N = {
|
|
9
|
+
install: (e, a) => {
|
|
10
|
+
var l;
|
|
11
|
+
const c = (l = a == null ? void 0 : a.plugins) == null ? void 0 : l.glob;
|
|
12
|
+
c && Object.values(c).sort((t, u) => (t.index ?? 0) - (u.index ?? 0)).filter((t) => t ? !!(t.default && t.default.install || t.install) : !1).forEach((t) => {
|
|
13
|
+
t.default && t.default.install && e.use(t.default, a), t.install && e.use(t, a);
|
|
15
14
|
});
|
|
16
15
|
}
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
var
|
|
21
|
-
const
|
|
22
|
-
let
|
|
23
|
-
const
|
|
24
|
-
(
|
|
25
|
-
var
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
...
|
|
29
|
-
),
|
|
30
|
-
...
|
|
16
|
+
}, d = j();
|
|
17
|
+
d.use(k);
|
|
18
|
+
const B = (e) => {
|
|
19
|
+
var i, h, b, A, g;
|
|
20
|
+
const a = ((i = e == null ? void 0 : e.router) == null ? void 0 : i.routerBase) ?? "/", c = ((h = e == null ? void 0 : e.router) == null ? void 0 : h.options) || {};
|
|
21
|
+
let l = Object.assign(((b = e == null ? void 0 : e.router) == null ? void 0 : b.glob) || {});
|
|
22
|
+
const t = Object.values(l).filter((f) => !!f).flat().sort((f, m) => (f.index ?? 0) - (m.index ?? 0)), u = [];
|
|
23
|
+
(A = e == null ? void 0 : e.microApps) == null || A.map((f) => {
|
|
24
|
+
var p;
|
|
25
|
+
const m = Object.values(((p = f.router) == null ? void 0 : p.glob) || {}).filter((r) => !!r).flat().sort((r, v) => (r.index ?? 0) - (v.index ?? 0));
|
|
26
|
+
u.push(
|
|
27
|
+
...m.map((r) => ({ ...r, path: `/${f.microAppName}${r.path}` }))
|
|
28
|
+
), u.push(
|
|
29
|
+
...m.filter((r) => !!r.path).filter((r) => r.path !== "").filter((r) => r.path !== "/").filter((r) => !r.path.startsWith(`/${r.microAppName}`)).map((r) => ({
|
|
31
30
|
path: r.path,
|
|
32
|
-
redirect: `/${
|
|
31
|
+
redirect: `/${f.microAppName}${r.path}`,
|
|
33
32
|
meta: { ...r.meta || {}, isMicroAppRouteRedirect: !0 }
|
|
34
33
|
}))
|
|
35
34
|
);
|
|
36
35
|
});
|
|
37
|
-
const
|
|
38
|
-
...
|
|
39
|
-
...
|
|
40
|
-
...
|
|
36
|
+
const s = ((g = e == null ? void 0 : e.router) == null ? void 0 : g.routers) || [], R = [
|
|
37
|
+
...n(t, e),
|
|
38
|
+
...n(s, e),
|
|
39
|
+
...n(u, e)
|
|
41
40
|
];
|
|
42
|
-
return { router: y({ history:
|
|
43
|
-
},
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
}),
|
|
47
|
-
const { baseURL: e = "" } = P();
|
|
48
|
-
try {
|
|
49
|
-
const c = await (await fetch(`${e}/oss/resource/front-end/web/_config/config.json`)).json().catch(() => ({})), { disableSaveToken: u = !1 } = c || {};
|
|
50
|
-
window.webConfig = { disableSaveToken: u };
|
|
51
|
-
} catch {
|
|
52
|
-
window.webConfig = { disableSaveToken: !1 };
|
|
53
|
-
}
|
|
54
|
-
}, _ = (e) => {
|
|
41
|
+
return { router: y({ history: D(a), routes: R, ...c }) };
|
|
42
|
+
}, n = (e, a) => e.map((c) => {
|
|
43
|
+
const l = c.meta || {};
|
|
44
|
+
return l.keepAlive = l.keepAlive ?? (a == null ? void 0 : a.keepAlive) ?? !0, { ...c, meta: l };
|
|
45
|
+
}), w = (e) => {
|
|
55
46
|
e || (e = {});
|
|
56
|
-
const
|
|
57
|
-
Promise.all([
|
|
58
|
-
|
|
47
|
+
const a = x(!0);
|
|
48
|
+
Promise.all([P(e), W(e)]).then(() => {
|
|
49
|
+
a.value = !1;
|
|
59
50
|
});
|
|
60
|
-
const { container: c, component:
|
|
61
|
-
|
|
62
|
-
const { router:
|
|
63
|
-
return
|
|
51
|
+
const { container: c, component: l, props: t } = (e == null ? void 0 : e.root) || {}, u = O(l || $, t);
|
|
52
|
+
u.use(N, e), u.use(d);
|
|
53
|
+
const { router: s } = B(e);
|
|
54
|
+
return u.use(s), u.mount(c || "#app"), { app: u, router: s, loading: a, store: d };
|
|
64
55
|
};
|
|
65
56
|
export {
|
|
66
|
-
|
|
57
|
+
w as createDasWebApp
|
|
67
58
|
};
|
|
Binary file
|
package/packages/i18n/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
const
|
|
1
|
+
import { reactive as h, ref as z, computed as k } from "vue";
|
|
2
|
+
const _ = {
|
|
3
3
|
// 按钮
|
|
4
4
|
详情: { "zh-CN": "详情", en: "Details", _appCode: "framework" },
|
|
5
5
|
下载: { "zh-CN": "下载", en: "Download", _appCode: "framework" },
|
|
@@ -119,61 +119,55 @@ const l = {
|
|
|
119
119
|
删除失败: { "zh-CN": "删除失败", en: "Deleted Failed", _appCode: "framework" },
|
|
120
120
|
操作成功: { "zh-CN": "操作成功", en: "Operated Successfully", _appCode: "framework" },
|
|
121
121
|
操作失败: { "zh-CN": "操作失败", en: "Operated Failed", _appCode: "framework" }
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
for (const o in e)
|
|
137
|
-
if (C && !t[o] && (t[o] = e[o]), n) {
|
|
138
|
-
const a = (p = e[o]) != null && p._appCode ? e[o]._appCode.toLowerCase() : "";
|
|
139
|
-
a && (m[a] || (m[a] = {}), m[a][o] = e[o]), f[o] || (f[o] = e[o]);
|
|
122
|
+
}, d = h({}), f = h({}), m = h({});
|
|
123
|
+
var i;
|
|
124
|
+
const l = sessionStorage.getItem("currentLang") ? sessionStorage.getItem("currentLang") : (i = navigator.language) != null && i.toLowerCase().startsWith("zh") ? "zh-CN" : "en", t = z(l), c = "dasI18n", S = (o = {}, r) => {
|
|
125
|
+
const p = r === "global", C = !p, n = {};
|
|
126
|
+
for (const e in o)
|
|
127
|
+
for (const a in o[e])
|
|
128
|
+
n[a] || (n[a] = {}), n[a][e] = o[e][a] ?? "", p && (f[a] || (f[a] = {}), f[a][e] = n[a][e]), C && (d[a] || (d[a] = {}), d[a][e] = n[a][e]);
|
|
129
|
+
}, w = (o = {}, r) => {
|
|
130
|
+
var n;
|
|
131
|
+
const p = r === "global", C = !p;
|
|
132
|
+
for (const e in o)
|
|
133
|
+
if (p && !f[e] && (f[e] = o[e]), C) {
|
|
134
|
+
const a = (n = o[e]) != null && n._appCode ? o[e]._appCode.toLowerCase() : "";
|
|
135
|
+
a && (m[a] || (m[a] = {}), m[a][e] = o[e]), d[e] || (d[e] = o[e]);
|
|
140
136
|
}
|
|
141
|
-
},
|
|
142
|
-
var
|
|
137
|
+
}, b = async (o) => {
|
|
138
|
+
var n;
|
|
143
139
|
const r = document.documentElement;
|
|
144
|
-
r && r.setAttribute("lang",
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}), Object.values(n).filter((a) => !!a).flat().map((a) => i(a));
|
|
152
|
-
}, P = (e) => {
|
|
140
|
+
r && r.setAttribute("lang", t.value);
|
|
141
|
+
const p = window[c];
|
|
142
|
+
p && w(p, "global"), w(_), [(n = o == null ? void 0 : o.i18n) == null ? void 0 : n.glob, ...((o == null ? void 0 : o.microApps) ?? []).map((e) => {
|
|
143
|
+
var a;
|
|
144
|
+
return (a = e.i18n) == null ? void 0 : a.glob;
|
|
145
|
+
})].flatMap((e) => Object.values(e ?? {})).filter(Boolean).flat().forEach((e) => w(e));
|
|
146
|
+
}, u = (o) => {
|
|
153
147
|
let r = "";
|
|
154
|
-
const
|
|
155
|
-
return
|
|
156
|
-
},
|
|
157
|
-
const
|
|
158
|
-
let
|
|
159
|
-
if (
|
|
160
|
-
typeof
|
|
161
|
-
let a =
|
|
162
|
-
return
|
|
163
|
-
a && (a = a.replace(`$${
|
|
148
|
+
const p = /\/([^\/]+)\/([^\/]+)\//, C = o.match(p);
|
|
149
|
+
return C && C.length >= 3 && (r = C[1] + "/" + C[2]), r ? r.toLowerCase() : "";
|
|
150
|
+
}, g = (o, ...r) => k(() => {
|
|
151
|
+
const p = u(location.pathname);
|
|
152
|
+
let C = m.framework ?? {}, n = m[p] ?? {}, e = f[o] || C[o] || n[o] || d[o] || o;
|
|
153
|
+
if (e === o) return o;
|
|
154
|
+
typeof e == "string" && (e = { "zh-CN": e });
|
|
155
|
+
let a = e[t.value];
|
|
156
|
+
return t.value === "zh-CN" && e["zh-cn"] && !e["zh-CN"] && (a = e["zh-cn"]), r.map((s, N) => {
|
|
157
|
+
a && (a = a.replace(`$${N}`, s));
|
|
164
158
|
}), a;
|
|
165
|
-
}),
|
|
166
|
-
sessionStorage.setItem("currentLang",
|
|
167
|
-
},
|
|
159
|
+
}), P = g, R = (o, ...r) => P(o, ...r).value, D = (o) => {
|
|
160
|
+
sessionStorage.setItem("currentLang", o), t.value = o;
|
|
161
|
+
}, L = () => t;
|
|
168
162
|
export {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
163
|
+
t as currentLang,
|
|
164
|
+
d as customLangeData,
|
|
165
|
+
g as getI18nRule,
|
|
166
|
+
L as getLang,
|
|
167
|
+
P as i18n,
|
|
168
|
+
b as initI18n,
|
|
169
|
+
w as setI18nRule,
|
|
170
|
+
D as setLang,
|
|
171
|
+
S as setLangRule,
|
|
172
|
+
R as t
|
|
179
173
|
};
|
|
Binary file
|