@next-core/brick-kit 2.106.2 → 2.107.0
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 +11 -0
- package/dist/index.bundle.js +44 -18
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +44 -18
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/LocationContext.d.ts +5 -0
- package/dist/types/core/LocationContext.d.ts.map +1 -1
- package/dist/types/core/Router.d.ts +4 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/dist/types/core/Runtime.d.ts +2 -1
- package/dist/types/core/Runtime.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -3134,6 +3134,12 @@ class Runtime {
|
|
|
3134
3134
|
getCurrentRoute() {
|
|
3135
3135
|
return kernel.currentRoute;
|
|
3136
3136
|
}
|
|
3137
|
+
/* istanbul ignore next */
|
|
3138
|
+
|
|
3139
|
+
|
|
3140
|
+
getNavConfig() {
|
|
3141
|
+
return kernel.router.getNavConfig();
|
|
3142
|
+
}
|
|
3137
3143
|
|
|
3138
3144
|
getMicroApps() {
|
|
3139
3145
|
var {
|
|
@@ -9657,6 +9663,8 @@ class Router {
|
|
|
9657
9663
|
|
|
9658
9664
|
_defineProperty$1(this, "featureFlags", void 0);
|
|
9659
9665
|
|
|
9666
|
+
_defineProperty$1(this, "navConfig", void 0);
|
|
9667
|
+
|
|
9660
9668
|
this.kernel = kernel;
|
|
9661
9669
|
this.featureFlags = this.kernel.getFeatureFlags();
|
|
9662
9670
|
var history = getHistory();
|
|
@@ -9980,33 +9988,37 @@ class Router {
|
|
|
9980
9988
|
|
|
9981
9989
|
if (barsHidden || getRuntimeMisc().isInIframeOfLegacyConsole) {
|
|
9982
9990
|
_this3.kernel.toggleBars(false);
|
|
9983
|
-
} else
|
|
9984
|
-
var _menuBar$menu, _menuBar$menu2;
|
|
9985
|
-
|
|
9991
|
+
} else {
|
|
9986
9992
|
yield constructMenu(menuBar, _this3.locationContext.getCurrentContext(), _this3.kernel);
|
|
9987
9993
|
|
|
9988
|
-
if (
|
|
9989
|
-
|
|
9994
|
+
if (_this3.kernel.currentLayout === "console") {
|
|
9995
|
+
var _menuBar$menu, _menuBar$menu2;
|
|
9990
9996
|
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
_this3.
|
|
9997
|
+
if (shouldBeDefaultCollapsed((_menuBar$menu = menuBar.menu) === null || _menuBar$menu === void 0 ? void 0 : _menuBar$menu.defaultCollapsed, (_menuBar$menu2 = menuBar.menu) === null || _menuBar$menu2 === void 0 ? void 0 : _menuBar$menu2.defaultCollapsedBreakpoint)) {
|
|
9998
|
+
_this3.kernel.menuBar.collapse(true);
|
|
9999
|
+
|
|
10000
|
+
_this3.defaultCollapsed = true;
|
|
10001
|
+
} else {
|
|
10002
|
+
if (_this3.defaultCollapsed) {
|
|
10003
|
+
_this3.kernel.menuBar.collapse(false);
|
|
10004
|
+
}
|
|
10005
|
+
|
|
10006
|
+
_this3.defaultCollapsed = false;
|
|
9995
10007
|
}
|
|
9996
10008
|
|
|
9997
|
-
|
|
9998
|
-
|
|
10009
|
+
if (actualLegacy === "iframe") {
|
|
10010
|
+
// Do not modify breadcrumb in iframe mode,
|
|
10011
|
+
// it will be *popped* from iframe automatically.
|
|
10012
|
+
delete appBar.breadcrumb;
|
|
10013
|
+
}
|
|
9999
10014
|
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
// it will be *popped* from iframe automatically.
|
|
10003
|
-
delete appBar.breadcrumb;
|
|
10015
|
+
mountStaticNode(_this3.kernel.menuBar.element, menuBar);
|
|
10016
|
+
mountStaticNode(_this3.kernel.appBar.element, appBar);
|
|
10004
10017
|
}
|
|
10005
|
-
|
|
10006
|
-
mountStaticNode(_this3.kernel.menuBar.element, menuBar);
|
|
10007
|
-
mountStaticNode(_this3.kernel.appBar.element, appBar);
|
|
10008
10018
|
}
|
|
10009
10019
|
|
|
10020
|
+
_this3.setNavConfig(mountRoutesResult);
|
|
10021
|
+
|
|
10010
10022
|
_this3.kernel.toggleLegacyIframe(actualLegacy === "iframe");
|
|
10011
10023
|
|
|
10012
10024
|
menuInBg.forEach(brick => {
|
|
@@ -10080,6 +10092,20 @@ class Router {
|
|
|
10080
10092
|
devtoolsHookEmit("rendered");
|
|
10081
10093
|
})();
|
|
10082
10094
|
}
|
|
10095
|
+
|
|
10096
|
+
setNavConfig(mountResult) {
|
|
10097
|
+
this.navConfig = {
|
|
10098
|
+
breadcrumb: mountResult.appBar.breadcrumb,
|
|
10099
|
+
menu: mountResult.menuBar.menu,
|
|
10100
|
+
subMenu: mountResult.menuBar.subMenu
|
|
10101
|
+
};
|
|
10102
|
+
}
|
|
10103
|
+
/* istanbul ignore next */
|
|
10104
|
+
|
|
10105
|
+
|
|
10106
|
+
getNavConfig() {
|
|
10107
|
+
return this.navConfig;
|
|
10108
|
+
}
|
|
10083
10109
|
/* istanbul ignore next */
|
|
10084
10110
|
|
|
10085
10111
|
|