@das-fed/upf-web 6.4.0-dev.233 → 6.4.0-dev.235
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/es5.js +38 -38
- package/{packages/main-app-framework/index-BP8gHC_g.js → index-CX9RvZWP.js} +1 -1
- package/index-CX9RvZWP.js.gz +0 -0
- package/{index-DeaZJ_4F.js → index-DVHBljsO.js} +36 -36
- package/index-DVHBljsO.js.gz +0 -0
- package/{index-CNxj49VD.js → index-oetoET_T.js} +1 -1
- package/index.js +1 -1
- package/package.json +5 -5
- package/packages/create-das-web-app/es5.js +22 -22
- package/packages/create-das-web-app/index.js +13 -13
- package/packages/create-das-web-app/index.js.gz +0 -0
- package/packages/layout/es5.js +96 -96
- package/packages/layout/index.js +98 -98
- package/packages/layout/index.js.gz +0 -0
- package/packages/main-app-framework/es5.js +29 -29
- package/{index-CUR2UuLR.js → packages/main-app-framework/index-BSIXDWdJ.js} +1 -1
- package/packages/main-app-framework/index-BSIXDWdJ.js.gz +0 -0
- package/packages/main-app-framework/{index-7BUmPh7i.js → index-C0K5zcvx.js} +1 -1
- package/packages/main-app-framework/{index-CUuJCTjN.js → index-y647qjnX.js} +27 -27
- package/packages/main-app-framework/index-y647qjnX.js.gz +0 -0
- 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/packages/micro-frontend/es5.js +156 -156
- package/packages/micro-frontend/index.js +127 -127
- package/packages/micro-frontend/index.js.gz +0 -0
- package/style.css +1 -1
- package/style.css.gz +0 -0
- package/index-CUR2UuLR.js.gz +0 -0
- package/index-DeaZJ_4F.js.gz +0 -0
- package/packages/main-app-framework/index-BP8gHC_g.js.gz +0 -0
- package/packages/main-app-framework/index-CUuJCTjN.js.gz +0 -0
|
@@ -32,13 +32,13 @@ var U = {
|
|
|
32
32
|
install: function install(e, u) {
|
|
33
33
|
var l;
|
|
34
34
|
var s = (l = u == null ? undefined : u.plugins) == null ? undefined : l.glob;
|
|
35
|
-
s && Object.values(s).sort(function (
|
|
36
|
-
var
|
|
37
|
-
return ((
|
|
38
|
-
}).filter(function (
|
|
39
|
-
return
|
|
40
|
-
}).forEach(function (
|
|
41
|
-
|
|
35
|
+
s && Object.values(s).sort(function (t, c) {
|
|
36
|
+
var _t$index, _c$index;
|
|
37
|
+
return ((_t$index = t.index) !== null && _t$index !== void 0 ? _t$index : 0) - ((_c$index = c.index) !== null && _c$index !== void 0 ? _c$index : 0);
|
|
38
|
+
}).filter(function (t) {
|
|
39
|
+
return t ? !!(t["default"] && t["default"].install || t.install) : false;
|
|
40
|
+
}).forEach(function (t) {
|
|
41
|
+
t["default"] && t["default"].install && e.use(t["default"], u), t.install && e.use(t, u);
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
},
|
|
@@ -50,26 +50,26 @@ var q = function q(e) {
|
|
|
50
50
|
var u = (_ref = (y = e == null ? undefined : e.router) == null ? undefined : y.routerBase) !== null && _ref !== void 0 ? _ref : "/",
|
|
51
51
|
s = ((R = e == null ? undefined : e.router) == null ? undefined : R.options) || {};
|
|
52
52
|
var l = Object.assign(((v = e == null ? undefined : e.router) == null ? undefined : v.glob) || {});
|
|
53
|
-
var
|
|
53
|
+
var t = Object.values(l).filter(function (n) {
|
|
54
54
|
return !!n;
|
|
55
|
-
}).flat().sort(function (n,
|
|
56
|
-
var _n$index,
|
|
57
|
-
return ((_n$index = n.index) !== null && _n$index !== void 0 ? _n$index : 0) - ((
|
|
55
|
+
}).flat().sort(function (n, a) {
|
|
56
|
+
var _n$index, _a$index;
|
|
57
|
+
return ((_n$index = n.index) !== null && _n$index !== void 0 ? _n$index : 0) - ((_a$index = a.index) !== null && _a$index !== void 0 ? _a$index : 0);
|
|
58
58
|
}),
|
|
59
59
|
c = [];
|
|
60
60
|
(k = e == null ? undefined : e.microApps) == null || k.map(function (n) {
|
|
61
61
|
var g;
|
|
62
|
-
var
|
|
62
|
+
var a = Object.values(((g = n.router) == null ? undefined : g.glob) || {}).filter(function (r) {
|
|
63
63
|
return !!r;
|
|
64
64
|
}).flat().sort(function (r, p) {
|
|
65
65
|
var _r$index, _p$index;
|
|
66
66
|
return ((_r$index = r.index) !== null && _r$index !== void 0 ? _r$index : 0) - ((_p$index = p.index) !== null && _p$index !== void 0 ? _p$index : 0);
|
|
67
67
|
});
|
|
68
|
-
c.push.apply(c, _toConsumableArray(
|
|
68
|
+
c.push.apply(c, _toConsumableArray(a.map(function (r) {
|
|
69
69
|
return _objectSpread(_objectSpread({}, r), {}, {
|
|
70
70
|
path: "/".concat(n.microAppName).concat(r.path)
|
|
71
71
|
});
|
|
72
|
-
}))), c.push.apply(c, _toConsumableArray(
|
|
72
|
+
}))), c.push.apply(c, _toConsumableArray(a.filter(function (r) {
|
|
73
73
|
return !!r.path;
|
|
74
74
|
}).filter(function (r) {
|
|
75
75
|
return r.path !== "";
|
|
@@ -88,7 +88,7 @@ var q = function q(e) {
|
|
|
88
88
|
})));
|
|
89
89
|
});
|
|
90
90
|
var o = (($ = e == null ? undefined : e.router) == null ? undefined : $.routers) || [],
|
|
91
|
-
d = [].concat(_toConsumableArray(b(
|
|
91
|
+
d = [].concat(_toConsumableArray(b(t, e)), _toConsumableArray(b(o, e)), _toConsumableArray(b(c, e))),
|
|
92
92
|
w = vueRouter.createRouter(_objectSpread({
|
|
93
93
|
history: vueRouter.createWebHistory(u),
|
|
94
94
|
routes: d
|
|
@@ -100,8 +100,8 @@ var q = function q(e) {
|
|
|
100
100
|
_step;
|
|
101
101
|
try {
|
|
102
102
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
103
|
-
var
|
|
104
|
-
|
|
103
|
+
var a = _step.value;
|
|
104
|
+
a != null && a.microAppName && a != null && a.i18n && n.set(a.microAppName, a.i18n);
|
|
105
105
|
}
|
|
106
106
|
} catch (err) {
|
|
107
107
|
_iterator.e(err);
|
|
@@ -109,13 +109,13 @@ var q = function q(e) {
|
|
|
109
109
|
_iterator.f();
|
|
110
110
|
}
|
|
111
111
|
w.beforeEach(/*#__PURE__*/function () {
|
|
112
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(
|
|
112
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(a, g, r) {
|
|
113
113
|
var p, m, L, _iterator2, _step2, _step2$value, i, f, N, x, _t, _t2, _t3;
|
|
114
114
|
return _regenerator().w(function (_context) {
|
|
115
115
|
while (1) switch (_context.p = _context.n) {
|
|
116
116
|
case 0:
|
|
117
117
|
_context.p = 0;
|
|
118
|
-
m = ((p =
|
|
118
|
+
m = ((p = a.query) == null ? void 0 : p.lang) || window.localStorage.getItem(index$2.languageKey) || window.navigator.language || "zh-CN", L = a.path || "";
|
|
119
119
|
_iterator2 = _createForOfIteratorHelper(n.entries());
|
|
120
120
|
_context.p = 1;
|
|
121
121
|
_iterator2.s();
|
|
@@ -140,7 +140,7 @@ var q = function q(e) {
|
|
|
140
140
|
N = typeof f == "string" ? [f] : f;
|
|
141
141
|
h.markLoaded(m, i);
|
|
142
142
|
_context.p = 5;
|
|
143
|
-
x = "/web/".concat(i, "/");
|
|
143
|
+
x = "/web/".concat(i.split("/")[1], "/");
|
|
144
144
|
_context.n = 6;
|
|
145
145
|
return index$2.registerMicroI18nData(N, m, x);
|
|
146
146
|
case 6:
|
|
@@ -209,8 +209,8 @@ var q = function q(e) {
|
|
|
209
209
|
var _ref4 = (e == null ? undefined : e.root) || {},
|
|
210
210
|
s = _ref4.container,
|
|
211
211
|
l = _ref4.component,
|
|
212
|
-
|
|
213
|
-
c = vue.createApp(l || index$1.DasWebLayout,
|
|
212
|
+
t = _ref4.props,
|
|
213
|
+
c = vue.createApp(l || index$1.DasWebLayout, t);
|
|
214
214
|
c.use(U, e), c.use(A);
|
|
215
215
|
var _q = q(e),
|
|
216
216
|
o = _q.router;
|
|
@@ -9,8 +9,8 @@ const U = {
|
|
|
9
9
|
install: (e, u) => {
|
|
10
10
|
var l;
|
|
11
11
|
const s = (l = u == null ? void 0 : u.plugins) == null ? void 0 : l.glob;
|
|
12
|
-
s && Object.values(s).sort((
|
|
13
|
-
|
|
12
|
+
s && Object.values(s).sort((t, c) => (t.index ?? 0) - (c.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, u), t.install && e.use(t, u);
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
}, A = D();
|
|
@@ -19,14 +19,14 @@ const q = (e) => {
|
|
|
19
19
|
var y, R, v, k, $;
|
|
20
20
|
const u = ((y = e == null ? void 0 : e.router) == null ? void 0 : y.routerBase) ?? "/", s = ((R = e == null ? void 0 : e.router) == null ? void 0 : R.options) || {};
|
|
21
21
|
let l = Object.assign(((v = e == null ? void 0 : e.router) == null ? void 0 : v.glob) || {});
|
|
22
|
-
const
|
|
22
|
+
const t = Object.values(l).filter((n) => !!n).flat().sort((n, a) => (n.index ?? 0) - (a.index ?? 0)), c = [];
|
|
23
23
|
(k = e == null ? void 0 : e.microApps) == null || k.map((n) => {
|
|
24
24
|
var g;
|
|
25
|
-
const
|
|
25
|
+
const a = Object.values(((g = n.router) == null ? void 0 : g.glob) || {}).filter((r) => !!r).flat().sort((r, p) => (r.index ?? 0) - (p.index ?? 0));
|
|
26
26
|
c.push(
|
|
27
|
-
...
|
|
27
|
+
...a.map((r) => ({ ...r, path: `/${n.microAppName}${r.path}` }))
|
|
28
28
|
), c.push(
|
|
29
|
-
...
|
|
29
|
+
...a.filter((r) => !!r.path).filter((r) => r.path !== "").filter((r) => r.path !== "/").filter((r) => !r.path.startsWith(`/${r.microAppName}`)).map((r) => ({
|
|
30
30
|
path: r.path,
|
|
31
31
|
redirect: `/${n.microAppName}${r.path}`,
|
|
32
32
|
meta: { ...r.meta || {}, isMicroAppRouteRedirect: !0 }
|
|
@@ -34,25 +34,25 @@ const q = (e) => {
|
|
|
34
34
|
);
|
|
35
35
|
});
|
|
36
36
|
const o = (($ = e == null ? void 0 : e.router) == null ? void 0 : $.routers) || [], d = [
|
|
37
|
-
...b(
|
|
37
|
+
...b(t, e),
|
|
38
38
|
...b(o, e),
|
|
39
39
|
...b(c, e)
|
|
40
40
|
], w = B({ history: C(u), routes: d, ...s }), h = I;
|
|
41
41
|
if (Array.isArray(e == null ? void 0 : e.microApps) && e.microApps.length && h) {
|
|
42
42
|
const n = /* @__PURE__ */ new Map();
|
|
43
|
-
for (const
|
|
44
|
-
|
|
45
|
-
w.beforeEach(async (
|
|
43
|
+
for (const a of e.microApps)
|
|
44
|
+
a != null && a.microAppName && (a != null && a.i18n) && n.set(a.microAppName, a.i18n);
|
|
45
|
+
w.beforeEach(async (a, g, r) => {
|
|
46
46
|
var p;
|
|
47
47
|
try {
|
|
48
|
-
const m = ((p =
|
|
48
|
+
const m = ((p = a.query) == null ? void 0 : p.lang) || window.localStorage.getItem(S) || window.navigator.language || "zh-CN", L = a.path || "";
|
|
49
49
|
for (const [i, f] of n.entries()) {
|
|
50
50
|
if (!i || !L.toLowerCase().startsWith(`/${i.toLowerCase()}`)) continue;
|
|
51
51
|
if (h.isLoaded(m, i) || !f || !(f != null && f.length)) break;
|
|
52
52
|
const N = typeof f == "string" ? [f] : f;
|
|
53
53
|
h.markLoaded(m, i);
|
|
54
54
|
try {
|
|
55
|
-
const x = `/web/${i}/`;
|
|
55
|
+
const x = `/web/${i.split("/")[1]}/`;
|
|
56
56
|
await E(N, m, x);
|
|
57
57
|
} catch {
|
|
58
58
|
h.markUnloaded(m, i);
|
|
@@ -76,7 +76,7 @@ const q = (e) => {
|
|
|
76
76
|
Promise.all([P(e)]).then(() => {
|
|
77
77
|
u.value = !1;
|
|
78
78
|
});
|
|
79
|
-
const { container: s, component: l, props:
|
|
79
|
+
const { container: s, component: l, props: t } = (e == null ? void 0 : e.root) || {}, c = O(l || j, t);
|
|
80
80
|
c.use(U, e), c.use(A);
|
|
81
81
|
const { router: o } = q(e);
|
|
82
82
|
return c.use(o), c.mount(s || "#app"), (d = window.top) != null && d.vueRouter || window.top && (window.top.vueRouter = o), { app: c, router: o, loading: u, store: A };
|
|
Binary file
|