@next-core/brick-kit 2.112.0 → 2.113.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
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
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.113.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.112.1...@next-core/brick-kit@2.113.0) (2022-03-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* cache fetchMenu, and APP.getMenu change ([07ede47](https://github.com/easyops-cn/next-core/commit/07ede4778f012fbbb7e72d30b1c41d6478660aec))
|
|
12
|
+
* update type ([d7b480e](https://github.com/easyops-cn/next-core/commit/d7b480ecc287263345415c536bd263b7fb317b1e))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [2.112.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.112.0...@next-core/brick-kit@2.112.1) (2022-03-29)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @next-core/brick-kit
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
# [2.112.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.111.3...@next-core/brick-kit@2.112.0) (2022-03-29)
|
|
7
27
|
|
|
8
28
|
|
package/dist/index.bundle.js
CHANGED
|
@@ -2663,6 +2663,7 @@
|
|
|
2663
2663
|
// Caching menu requests to avoid flicker.
|
|
2664
2664
|
var menuCache = new Map();
|
|
2665
2665
|
var menuTitleCache = new Map();
|
|
2666
|
+
var processMenuCache = new Map();
|
|
2666
2667
|
function constructMenu(_x, _x2, _x3) {
|
|
2667
2668
|
return _constructMenu.apply(this, arguments);
|
|
2668
2669
|
}
|
|
@@ -2699,12 +2700,14 @@
|
|
|
2699
2700
|
|
|
2700
2701
|
function _constructMenuByMenusList() {
|
|
2701
2702
|
_constructMenuByMenusList = _asyncToGenerator__default["default"](function* (menus, context, kernel) {
|
|
2702
|
-
|
|
2703
|
+
processMenuCache.clear();
|
|
2704
|
+
var data = yield Promise.all(menus.map(menuId => processMenu(menuId, context, kernel)));
|
|
2705
|
+
data.forEach((item, index) => processMenuCache.set(menus[index], item));
|
|
2703
2706
|
});
|
|
2704
2707
|
return _constructMenuByMenusList.apply(this, arguments);
|
|
2705
2708
|
}
|
|
2706
2709
|
|
|
2707
|
-
var getMenu = menuId =>
|
|
2710
|
+
var getMenu = menuId => processMenuCache.get(menuId);
|
|
2708
2711
|
function fetchMenuById(_x7, _x8) {
|
|
2709
2712
|
return _fetchMenuById.apply(this, arguments);
|
|
2710
2713
|
}
|