@das-fed/web 7.0.7-hot.49 → 7.0.7-hot.50
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/package.json +6 -6
- package/packages/create-das-web-app/runtime.js +58 -45
- package/packages/create-das-web-app/runtime.js.gz +0 -0
- package/packages/main-app-framework/{index-B5BuSOUg.js → index-CbPnzzxg.js} +1 -1
- package/packages/main-app-framework/{index-CkW_eET7.js → index-DBZ2IMHx.js} +4176 -4010
- package/packages/main-app-framework/index-DBZ2IMHx.js.gz +0 -0
- package/packages/main-app-framework/{index-1EqVNVzw.js → index-v2jIZW8u.js} +1 -1
- package/packages/main-app-framework/index-v2jIZW8u.js.gz +0 -0
- package/packages/main-app-framework/runtime.js +1 -1
- package/packages/main-app-framework/style.css +1 -1
- package/packages/main-app-framework/style.css.gz +0 -0
- package/types/create-das-web-app/get-web-config.d.ts +1 -0
- package/types/main-app-framework/project-custom/jiangling/auth-recovery.d.ts +5 -0
- package/types/main-app-framework/project-custom/jiangling/sso-api.d.ts +49 -0
- package/types/main-app-framework/project-custom/jiangling/use-sso.d.ts +11 -0
- package/types/main-app-framework/project-custom/jiangling/utils.d.ts +3 -0
- package/packages/main-app-framework/index-1EqVNVzw.js.gz +0 -0
- package/packages/main-app-framework/index-CkW_eET7.js.gz +0 -0
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/web",
|
|
3
|
-
"version": "7.0.7-hot.
|
|
3
|
+
"version": "7.0.7-hot.50",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@das-fed/ui": "7.0.7-hot.
|
|
8
|
-
"@das-fed/utils": "7.0.7-hot.
|
|
9
|
-
"@das-fed/web": "7.0.7-hot.
|
|
10
|
-
"@das-fed/web-components": "7.0.7-hot.
|
|
7
|
+
"@das-fed/ui": "7.0.7-hot.50",
|
|
8
|
+
"@das-fed/utils": "7.0.7-hot.50",
|
|
9
|
+
"@das-fed/web": "7.0.7-hot.50",
|
|
10
|
+
"@das-fed/web-components": "7.0.7-hot.50",
|
|
11
11
|
"@microsoft/signalr": "^8.0.7",
|
|
12
12
|
"@vueuse/core": "^9.13.0",
|
|
13
13
|
"animate.css": "^4.1.1",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"vue-router": "^4.4.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@das-fed/cli": "7.0.7-hot.
|
|
22
|
+
"@das-fed/cli": "7.0.7-hot.50",
|
|
23
23
|
"@types/crypto-js": "^4.2.2",
|
|
24
24
|
"@types/lodash": "^4.14.194",
|
|
25
25
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -1,58 +1,71 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { initTheme as
|
|
3
|
-
import { initI18n as
|
|
4
|
-
import { DasWebLayout as
|
|
5
|
-
import { createPinia as
|
|
6
|
-
import
|
|
7
|
-
import { createRouter as y, createWebHistory as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
c
|
|
13
|
-
|
|
1
|
+
import { ref as v, createApp as x } from "vue";
|
|
2
|
+
import { initTheme as k } from "@das-fed/web/packages/theme/index";
|
|
3
|
+
import { initI18n as w } from "@das-fed/web/packages/i18n/index";
|
|
4
|
+
import { DasWebLayout as W } from "@das-fed/web/packages/layout/index";
|
|
5
|
+
import { createPinia as $ } from "pinia";
|
|
6
|
+
import j from "pinia-plugin-persistedstate";
|
|
7
|
+
import { createRouter as y, createWebHistory as O } from "vue-router";
|
|
8
|
+
import { getConfig as P } from "@das-fed/utils/config";
|
|
9
|
+
const C = {
|
|
10
|
+
install: (e, t) => {
|
|
11
|
+
var u;
|
|
12
|
+
const c = (u = t == null ? void 0 : t.plugins) == null ? void 0 : u.glob;
|
|
13
|
+
c && Object.values(c).sort((a, l) => (a.index ?? 0) - (l.index ?? 0)).filter((a) => a ? !!(a.default && a.default.install || a.install) : !1).forEach((a) => {
|
|
14
|
+
a.default && a.default.install && e.use(a.default, t), a.install && e.use(a, t);
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
var
|
|
20
|
-
const
|
|
21
|
-
let
|
|
22
|
-
const
|
|
23
|
-
(
|
|
24
|
-
var
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
...
|
|
28
|
-
),
|
|
29
|
-
...
|
|
17
|
+
}, m = $();
|
|
18
|
+
m.use(j);
|
|
19
|
+
const D = (e) => {
|
|
20
|
+
var d, b, o, h, g;
|
|
21
|
+
const t = ((d = e == null ? void 0 : e.router) == null ? void 0 : d.routerBase) ?? "/", c = ((b = e == null ? void 0 : e.router) == null ? void 0 : b.options) || {};
|
|
22
|
+
let u = Object.assign(((o = e == null ? void 0 : e.router) == null ? void 0 : o.glob) || {});
|
|
23
|
+
const a = Object.values(u).filter((s) => !!s).flat().sort((s, n) => (s.index ?? 0) - (n.index ?? 0)), l = [];
|
|
24
|
+
(h = e == null ? void 0 : e.microApps) == null || h.map((s) => {
|
|
25
|
+
var A;
|
|
26
|
+
const n = Object.values(((A = s.router) == null ? void 0 : A.glob) || {}).filter((r) => !!r).flat().sort((r, R) => (r.index ?? 0) - (R.index ?? 0));
|
|
27
|
+
l.push(
|
|
28
|
+
...n.map((r) => ({ ...r, path: `/${s.microAppName}${r.path}` }))
|
|
29
|
+
), l.push(
|
|
30
|
+
...n.filter((r) => !!r.path).filter((r) => r.path !== "").filter((r) => r.path !== "/").filter((r) => !r.path.startsWith(`/${r.microAppName}`)).map((r) => ({
|
|
30
31
|
path: r.path,
|
|
31
|
-
redirect: `/${
|
|
32
|
+
redirect: `/${s.microAppName}${r.path}`,
|
|
32
33
|
meta: { ...r.meta || {}, isMicroAppRouteRedirect: !0 }
|
|
33
34
|
}))
|
|
34
35
|
);
|
|
35
36
|
});
|
|
36
|
-
const
|
|
37
|
-
...
|
|
38
|
-
...
|
|
39
|
-
...
|
|
37
|
+
const f = ((g = e == null ? void 0 : e.router) == null ? void 0 : g.routers) || [], p = [
|
|
38
|
+
...i(a, e),
|
|
39
|
+
...i(f, e),
|
|
40
|
+
...i(l, e)
|
|
40
41
|
];
|
|
41
|
-
return { router: y({ history:
|
|
42
|
-
},
|
|
43
|
-
const
|
|
44
|
-
return
|
|
45
|
-
}),
|
|
42
|
+
return { router: y({ history: O(t), routes: p, ...c }) };
|
|
43
|
+
}, i = (e, t) => e.map((c) => {
|
|
44
|
+
const u = c.meta || {};
|
|
45
|
+
return u.keepAlive = u.keepAlive ?? (t == null ? void 0 : t.keepAlive) ?? !0, { ...c, meta: u };
|
|
46
|
+
}), N = async () => {
|
|
47
|
+
const { baseURL: e = "" } = P();
|
|
48
|
+
let t = !1;
|
|
49
|
+
try {
|
|
50
|
+
const c = await fetch(`${e}/oss/resource/front-end/web/_config/config.json`);
|
|
51
|
+
if (c.ok) {
|
|
52
|
+
const u = await c.json().catch(() => ({}));
|
|
53
|
+
t = (u == null ? void 0 : u.disableSaveToken) ?? !1;
|
|
54
|
+
}
|
|
55
|
+
} catch {
|
|
56
|
+
}
|
|
57
|
+
window.webConfig = { disableSaveToken: t };
|
|
58
|
+
}, _ = (e) => {
|
|
46
59
|
e || (e = {});
|
|
47
|
-
const
|
|
48
|
-
Promise.all([
|
|
49
|
-
|
|
60
|
+
const t = v(!0);
|
|
61
|
+
Promise.all([N(), k(e), w(e)]).then(() => {
|
|
62
|
+
t.value = !1;
|
|
50
63
|
});
|
|
51
|
-
const { container: c, component:
|
|
52
|
-
|
|
53
|
-
const { router:
|
|
54
|
-
return
|
|
64
|
+
const { container: c, component: u, props: a } = (e == null ? void 0 : e.root) || {}, l = x(u || W, a);
|
|
65
|
+
l.use(C, e), l.use(m);
|
|
66
|
+
const { router: f } = D(e);
|
|
67
|
+
return l.use(f), l.mount(c || "#app"), { app: l, router: f, loading: t, store: m };
|
|
55
68
|
};
|
|
56
69
|
export {
|
|
57
|
-
|
|
70
|
+
_ as createDasWebApp
|
|
58
71
|
};
|
|
Binary file
|