@next-core/brick-kit 2.145.1 → 2.145.3
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/CHANGELOG.md +23 -0
- package/dist/index.bundle.js +21 -20
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +21 -20
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Kernel.d.ts.map +1 -1
- package/dist/types/core/LocationContext.d.ts +1 -1
- package/dist/types/core/LocationContext.d.ts.map +1 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -9208,7 +9208,7 @@ class Kernel {
|
|
|
9208
9208
|
|
|
9209
9209
|
var bootstrapResponse = _objectSpread({
|
|
9210
9210
|
templatePackages: []
|
|
9211
|
-
}, data); // Merge `app.defaultConfig` and `app.userConfig` to `app.config`.
|
|
9211
|
+
}, data); // Merge `app.defaultConfig` and `app.userConfig` to `app.config`. Should merge config again in standalone mode when doFulfilStoryboard because static bootstrap.json do not have userConfig.
|
|
9212
9212
|
|
|
9213
9213
|
|
|
9214
9214
|
processBootstrapResponse(bootstrapResponse);
|
|
@@ -9263,8 +9263,9 @@ class Kernel {
|
|
|
9263
9263
|
}
|
|
9264
9264
|
|
|
9265
9265
|
if (appRuntimeData) {
|
|
9266
|
-
//
|
|
9267
|
-
storyboard.app.userConfig = _objectSpread(_objectSpread({}, storyboard.app.userConfig), appRuntimeData.userConfig);
|
|
9266
|
+
// Merge `app.defaultConfig` and `app.userConfig` to `app.config`.
|
|
9267
|
+
storyboard.app.userConfig = _objectSpread(_objectSpread({}, storyboard.app.userConfig), appRuntimeData.userConfig);
|
|
9268
|
+
storyboard.app.config = deepFreeze(merge({}, storyboard.app.defaultConfig, storyboard.app.userConfig)); // get inject menus (Actually, appRuntimeData contains both main and inject menus)
|
|
9268
9269
|
|
|
9269
9270
|
storyboard.meta = _objectSpread(_objectSpread({}, storyboard.meta), {}, {
|
|
9270
9271
|
injectMenus: appRuntimeData.injectMenus
|
|
@@ -10614,14 +10615,10 @@ class LocationContext {
|
|
|
10614
10615
|
return "missed";
|
|
10615
10616
|
}
|
|
10616
10617
|
|
|
10617
|
-
matchStoryboard(storyboards) {
|
|
10618
|
-
|
|
10619
|
-
return storyboards[0];
|
|
10620
|
-
} // Put apps with longer homepage before shorter ones.
|
|
10618
|
+
matchStoryboard(storyboards, location) {
|
|
10619
|
+
// Put apps with longer homepage before shorter ones.
|
|
10621
10620
|
// E.g., `/legacy/tool` will match first before `/legacy`.
|
|
10622
10621
|
// This enables two apps with relationship of parent-child of homepage.
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
10622
|
var sortedStoryboards = orderBy(storyboards, storyboard => {
|
|
10626
10623
|
var _storyboard$app$homep, _storyboard$app, _storyboard$app$homep2;
|
|
10627
10624
|
|
|
@@ -10634,7 +10631,7 @@ class LocationContext {
|
|
|
10634
10631
|
var homepage = (_storyboard$app2 = storyboard.app) === null || _storyboard$app2 === void 0 ? void 0 : _storyboard$app2.homepage;
|
|
10635
10632
|
|
|
10636
10633
|
if (typeof homepage === "string" && homepage[0] === "/") {
|
|
10637
|
-
if (matchPath(this.location.pathname, {
|
|
10634
|
+
if (matchPath((location || this.location).pathname, {
|
|
10638
10635
|
path: homepage,
|
|
10639
10636
|
exact: homepage === "/"
|
|
10640
10637
|
})) {
|
|
@@ -12023,6 +12020,20 @@ class Router {
|
|
|
12023
12020
|
|
|
12024
12021
|
_this.locationContext.messageDispatcher.reset();
|
|
12025
12022
|
|
|
12023
|
+
var storyboard = _this.locationContext.matchStoryboard(_this.kernel.bootstrapData.storyboards, location);
|
|
12024
|
+
|
|
12025
|
+
if (!window.STANDALONE_MICRO_APPS) {
|
|
12026
|
+
if (storyboard && storyboard.app.standaloneMode) {
|
|
12027
|
+
// from non-standalone app to standalone app, should jump out off site
|
|
12028
|
+
window.location.assign(window.location.href);
|
|
12029
|
+
}
|
|
12030
|
+
} else {
|
|
12031
|
+
if (!storyboard) {
|
|
12032
|
+
// from standalone app goback to non-standalone app, should reload
|
|
12033
|
+
window.location.reload();
|
|
12034
|
+
}
|
|
12035
|
+
}
|
|
12036
|
+
|
|
12026
12037
|
if (_this.rendering) {
|
|
12027
12038
|
_this.nextLocation = location;
|
|
12028
12039
|
} else {
|
|
@@ -12092,16 +12103,6 @@ class Router {
|
|
|
12092
12103
|
if (storyboard) {
|
|
12093
12104
|
var _storyboard$meta, _storyboard$meta2, _storyboard$meta3;
|
|
12094
12105
|
|
|
12095
|
-
if (!window.STANDALONE_MICRO_APPS) {
|
|
12096
|
-
if (storyboard.app.standaloneMode) {
|
|
12097
|
-
// if nextApp was standalone micro-apps, use location.replace to reload window;
|
|
12098
|
-
var path = history.createHref({
|
|
12099
|
-
pathname: storyboard.app.homepage
|
|
12100
|
-
});
|
|
12101
|
-
window.location.replace(path);
|
|
12102
|
-
}
|
|
12103
|
-
}
|
|
12104
|
-
|
|
12105
12106
|
yield _this3.kernel.fulfilStoryboard(storyboard); // 将动态解析后的模板还原,以便重新动态解析。
|
|
12106
12107
|
|
|
12107
12108
|
restoreDynamicTemplates(storyboard); // 预加载权限信息
|