@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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.107.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.106.2...@next-core/brick-kit@2.107.0) (2022-03-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* support export nav config ([#1589](https://github.com/easyops-cn/next-core/issues/1589)) ([20f0493](https://github.com/easyops-cn/next-core/commit/20f0493e51a08e009b95a902452bcc7e155386ee))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.106.2](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.106.1...@next-core/brick-kit@2.106.2) (2022-03-04)
|
|
7
18
|
|
|
8
19
|
|
package/dist/index.bundle.js
CHANGED
|
@@ -3133,6 +3133,12 @@
|
|
|
3133
3133
|
getCurrentRoute() {
|
|
3134
3134
|
return kernel.currentRoute;
|
|
3135
3135
|
}
|
|
3136
|
+
/* istanbul ignore next */
|
|
3137
|
+
|
|
3138
|
+
|
|
3139
|
+
getNavConfig() {
|
|
3140
|
+
return kernel.router.getNavConfig();
|
|
3141
|
+
}
|
|
3136
3142
|
|
|
3137
3143
|
getMicroApps() {
|
|
3138
3144
|
var {
|
|
@@ -9656,6 +9662,8 @@
|
|
|
9656
9662
|
|
|
9657
9663
|
_defineProperty__default["default"](this, "featureFlags", void 0);
|
|
9658
9664
|
|
|
9665
|
+
_defineProperty__default["default"](this, "navConfig", void 0);
|
|
9666
|
+
|
|
9659
9667
|
this.kernel = kernel;
|
|
9660
9668
|
this.featureFlags = this.kernel.getFeatureFlags();
|
|
9661
9669
|
var history = getHistory();
|
|
@@ -9979,33 +9987,37 @@
|
|
|
9979
9987
|
|
|
9980
9988
|
if (barsHidden || getRuntimeMisc().isInIframeOfLegacyConsole) {
|
|
9981
9989
|
_this3.kernel.toggleBars(false);
|
|
9982
|
-
} else
|
|
9983
|
-
var _menuBar$menu, _menuBar$menu2;
|
|
9984
|
-
|
|
9990
|
+
} else {
|
|
9985
9991
|
yield constructMenu(menuBar, _this3.locationContext.getCurrentContext(), _this3.kernel);
|
|
9986
9992
|
|
|
9987
|
-
if (
|
|
9988
|
-
|
|
9993
|
+
if (_this3.kernel.currentLayout === "console") {
|
|
9994
|
+
var _menuBar$menu, _menuBar$menu2;
|
|
9989
9995
|
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
_this3.
|
|
9996
|
+
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)) {
|
|
9997
|
+
_this3.kernel.menuBar.collapse(true);
|
|
9998
|
+
|
|
9999
|
+
_this3.defaultCollapsed = true;
|
|
10000
|
+
} else {
|
|
10001
|
+
if (_this3.defaultCollapsed) {
|
|
10002
|
+
_this3.kernel.menuBar.collapse(false);
|
|
10003
|
+
}
|
|
10004
|
+
|
|
10005
|
+
_this3.defaultCollapsed = false;
|
|
9994
10006
|
}
|
|
9995
10007
|
|
|
9996
|
-
|
|
9997
|
-
|
|
10008
|
+
if (actualLegacy === "iframe") {
|
|
10009
|
+
// Do not modify breadcrumb in iframe mode,
|
|
10010
|
+
// it will be *popped* from iframe automatically.
|
|
10011
|
+
delete appBar.breadcrumb;
|
|
10012
|
+
}
|
|
9998
10013
|
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
// it will be *popped* from iframe automatically.
|
|
10002
|
-
delete appBar.breadcrumb;
|
|
10014
|
+
mountStaticNode(_this3.kernel.menuBar.element, menuBar);
|
|
10015
|
+
mountStaticNode(_this3.kernel.appBar.element, appBar);
|
|
10003
10016
|
}
|
|
10004
|
-
|
|
10005
|
-
mountStaticNode(_this3.kernel.menuBar.element, menuBar);
|
|
10006
|
-
mountStaticNode(_this3.kernel.appBar.element, appBar);
|
|
10007
10017
|
}
|
|
10008
10018
|
|
|
10019
|
+
_this3.setNavConfig(mountRoutesResult);
|
|
10020
|
+
|
|
10009
10021
|
_this3.kernel.toggleLegacyIframe(actualLegacy === "iframe");
|
|
10010
10022
|
|
|
10011
10023
|
menuInBg.forEach(brick => {
|
|
@@ -10079,6 +10091,20 @@
|
|
|
10079
10091
|
devtoolsHookEmit("rendered");
|
|
10080
10092
|
})();
|
|
10081
10093
|
}
|
|
10094
|
+
|
|
10095
|
+
setNavConfig(mountResult) {
|
|
10096
|
+
this.navConfig = {
|
|
10097
|
+
breadcrumb: mountResult.appBar.breadcrumb,
|
|
10098
|
+
menu: mountResult.menuBar.menu,
|
|
10099
|
+
subMenu: mountResult.menuBar.subMenu
|
|
10100
|
+
};
|
|
10101
|
+
}
|
|
10102
|
+
/* istanbul ignore next */
|
|
10103
|
+
|
|
10104
|
+
|
|
10105
|
+
getNavConfig() {
|
|
10106
|
+
return this.navConfig;
|
|
10107
|
+
}
|
|
10082
10108
|
/* istanbul ignore next */
|
|
10083
10109
|
|
|
10084
10110
|
|