@next-core/brick-kit 2.156.7 → 2.156.8
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/dist/index.bundle.js +10 -13
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +10 -13
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Kernel.d.ts.map +1 -1
- package/dist/types/core/Router.d.ts +0 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/dist/types/core/Runtime.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.bundle.js
CHANGED
|
@@ -3937,9 +3937,9 @@
|
|
|
3937
3937
|
}
|
|
3938
3938
|
|
|
3939
3939
|
getMiscSettings() {
|
|
3940
|
-
var _kernel$bootstrapData5;
|
|
3940
|
+
var _kernel$bootstrapData5, _kernel$nextApp, _kernel$nextApp$confi, _kernel$nextApp$confi2;
|
|
3941
3941
|
|
|
3942
|
-
return Object.assign({}, (_kernel$bootstrapData5 = kernel.bootstrapData.settings) === null || _kernel$bootstrapData5 === void 0 ? void 0 : _kernel$bootstrapData5.misc);
|
|
3942
|
+
return Object.assign({}, (_kernel$bootstrapData5 = kernel.bootstrapData.settings) === null || _kernel$bootstrapData5 === void 0 ? void 0 : _kernel$bootstrapData5.misc, (_kernel$nextApp = kernel.nextApp) === null || _kernel$nextApp === void 0 ? void 0 : (_kernel$nextApp$confi = _kernel$nextApp.config) === null || _kernel$nextApp$confi === void 0 ? void 0 : (_kernel$nextApp$confi2 = _kernel$nextApp$confi.settings) === null || _kernel$nextApp$confi2 === void 0 ? void 0 : _kernel$nextApp$confi2.misc);
|
|
3943
3943
|
}
|
|
3944
3944
|
|
|
3945
3945
|
/* istanbul ignore next */
|
|
@@ -9926,9 +9926,9 @@
|
|
|
9926
9926
|
}
|
|
9927
9927
|
|
|
9928
9928
|
getFeatureFlags() {
|
|
9929
|
-
var _this$bootstrapData, _this$bootstrapData$s
|
|
9929
|
+
var _this$bootstrapData, _this$bootstrapData$s, _this$nextApp, _this$nextApp$config, _this$nextApp$config$;
|
|
9930
9930
|
|
|
9931
|
-
return Object.assign({}, (_this$bootstrapData = this.bootstrapData) === null || _this$bootstrapData === void 0 ? void 0 : (_this$bootstrapData$s = _this$bootstrapData.settings) === null || _this$bootstrapData$s === void 0 ? void 0 : _this$bootstrapData$s.featureFlags);
|
|
9931
|
+
return Object.assign({}, (_this$bootstrapData = this.bootstrapData) === null || _this$bootstrapData === void 0 ? void 0 : (_this$bootstrapData$s = _this$bootstrapData.settings) === null || _this$bootstrapData$s === void 0 ? void 0 : _this$bootstrapData$s.featureFlags, (_this$nextApp = this.nextApp) === null || _this$nextApp === void 0 ? void 0 : (_this$nextApp$config = _this$nextApp.config) === null || _this$nextApp$config === void 0 ? void 0 : (_this$nextApp$config$ = _this$nextApp$config.settings) === null || _this$nextApp$config$ === void 0 ? void 0 : _this$nextApp$config$.featureFlags);
|
|
9932
9932
|
}
|
|
9933
9933
|
|
|
9934
9934
|
getStandaloneMenus(menuId, isPreFetch) {
|
|
@@ -12149,14 +12149,11 @@
|
|
|
12149
12149
|
|
|
12150
12150
|
_defineProperty__default["default"](this, "renderId", void 0);
|
|
12151
12151
|
|
|
12152
|
-
_defineProperty__default["default"](this, "featureFlags", void 0);
|
|
12153
|
-
|
|
12154
12152
|
_defineProperty__default["default"](this, "navConfig", void 0);
|
|
12155
12153
|
|
|
12156
12154
|
_defineProperty__default["default"](this, "mediaEventTargetHandler", void 0);
|
|
12157
12155
|
|
|
12158
12156
|
this.kernel = kernel;
|
|
12159
|
-
this.featureFlags = this.kernel.getFeatureFlags();
|
|
12160
12157
|
var history = getHistory();
|
|
12161
12158
|
window.addEventListener("beforeunload", event => {
|
|
12162
12159
|
var message = this.getBlockMessageBeforePageLave({}); // See examples in https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload
|
|
@@ -12195,7 +12192,7 @@
|
|
|
12195
12192
|
}
|
|
12196
12193
|
|
|
12197
12194
|
locationChangeNotify(from, to) {
|
|
12198
|
-
if (this.
|
|
12195
|
+
if (this.kernel.getFeatureFlags()["log-location-change"]) {
|
|
12199
12196
|
var _window$CORE_ROOT;
|
|
12200
12197
|
|
|
12201
12198
|
var username = getAuth().username;
|
|
@@ -12338,9 +12335,10 @@
|
|
|
12338
12335
|
var _storyboard$meta, _storyboard$meta2, _storyboard$meta3;
|
|
12339
12336
|
|
|
12340
12337
|
yield _this3.kernel.fulfilStoryboard(storyboard);
|
|
12338
|
+
_this3.kernel.nextApp = storyboard.app;
|
|
12341
12339
|
brickUtils.removeDeadConditions(storyboard, {
|
|
12342
12340
|
constantFeatureFlags: true,
|
|
12343
|
-
featureFlags: _this3.
|
|
12341
|
+
featureFlags: _this3.kernel.getFeatureFlags()
|
|
12344
12342
|
}); // 将动态解析后的模板还原,以便重新动态解析。
|
|
12345
12343
|
|
|
12346
12344
|
brickUtils.restoreDynamicTemplates(storyboard);
|
|
@@ -12381,7 +12379,6 @@
|
|
|
12381
12379
|
|
|
12382
12380
|
var appChanged = previousApp && currentApp ? previousApp.id !== currentApp.id : previousApp !== currentApp;
|
|
12383
12381
|
var legacy = currentApp ? currentApp.legacy : undefined;
|
|
12384
|
-
_this3.kernel.nextApp = currentApp;
|
|
12385
12382
|
var layoutType = (currentApp === null || currentApp === void 0 ? void 0 : currentApp.layoutType) || "console";
|
|
12386
12383
|
var faviconElement = document.querySelector("link[rel='shortcut icon']");
|
|
12387
12384
|
var customFaviconHref = currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$config = currentApp.config) === null || _currentApp$config === void 0 ? void 0 : (_currentApp$config$_e = _currentApp$config._easyops_app_favicon) === null || _currentApp$config$_e === void 0 ? void 0 : _currentApp$config$_e.default;
|
|
@@ -12400,7 +12397,7 @@
|
|
|
12400
12397
|
unmountTree(mountPoints.bg);
|
|
12401
12398
|
|
|
12402
12399
|
var redirectToLogin = () => {
|
|
12403
|
-
history.replace(_this3.
|
|
12400
|
+
history.replace(_this3.kernel.getFeatureFlags()["sso-enabled"] ? "/sso-auth/login" : "/auth/login", {
|
|
12404
12401
|
from: location
|
|
12405
12402
|
});
|
|
12406
12403
|
};
|
|
@@ -12421,7 +12418,7 @@
|
|
|
12421
12418
|
}
|
|
12422
12419
|
}
|
|
12423
12420
|
|
|
12424
|
-
layoutType = bricks.some(brick => ["base-layout.tpl-base-page-module", "base-layout.tpl-homepage-base-module", "base-layout.tpl-homepage-base-module-cmdb", "base-layout.tpl-base-page-module-cmdb"].includes(brick)) && layoutType === "business" && !_this3.
|
|
12421
|
+
layoutType = bricks.some(brick => ["base-layout.tpl-base-page-module", "base-layout.tpl-homepage-base-module", "base-layout.tpl-homepage-base-module-cmdb", "base-layout.tpl-base-page-module-cmdb"].includes(brick)) && layoutType === "business" && !_this3.kernel.getFeatureFlags()["support-ui-8.0-base-layout"] ? "console" : layoutType;
|
|
12425
12422
|
var mountRoutesResult = {
|
|
12426
12423
|
main: [],
|
|
12427
12424
|
menuInBg: [],
|
|
@@ -12663,7 +12660,7 @@
|
|
|
12663
12660
|
_this3.state = "mounted";
|
|
12664
12661
|
devtoolsHookEmit("rendered");
|
|
12665
12662
|
|
|
12666
|
-
if (!_this3.
|
|
12663
|
+
if (!_this3.kernel.getFeatureFlags()["disable-prefetch-scripts"]) {
|
|
12667
12664
|
// Try to prefetch during a browser's idle periods.
|
|
12668
12665
|
// https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback
|
|
12669
12666
|
if (typeof window.requestIdleCallback === "function") {
|