@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/dist/index.esm.js
CHANGED
|
@@ -2664,6 +2664,7 @@ var symbolAppId = Symbol("appId");
|
|
|
2664
2664
|
// Caching menu requests to avoid flicker.
|
|
2665
2665
|
var menuCache = new Map();
|
|
2666
2666
|
var menuTitleCache = new Map();
|
|
2667
|
+
var processMenuCache = new Map();
|
|
2667
2668
|
function constructMenu(_x, _x2, _x3) {
|
|
2668
2669
|
return _constructMenu.apply(this, arguments);
|
|
2669
2670
|
}
|
|
@@ -2700,12 +2701,14 @@ function constructMenuByMenusList(_x4, _x5, _x6) {
|
|
|
2700
2701
|
|
|
2701
2702
|
function _constructMenuByMenusList() {
|
|
2702
2703
|
_constructMenuByMenusList = _asyncToGenerator$4(function* (menus, context, kernel) {
|
|
2703
|
-
|
|
2704
|
+
processMenuCache.clear();
|
|
2705
|
+
var data = yield Promise.all(menus.map(menuId => processMenu(menuId, context, kernel)));
|
|
2706
|
+
data.forEach((item, index) => processMenuCache.set(menus[index], item));
|
|
2704
2707
|
});
|
|
2705
2708
|
return _constructMenuByMenusList.apply(this, arguments);
|
|
2706
2709
|
}
|
|
2707
2710
|
|
|
2708
|
-
var getMenu = menuId =>
|
|
2711
|
+
var getMenu = menuId => processMenuCache.get(menuId);
|
|
2709
2712
|
function fetchMenuById(_x7, _x8) {
|
|
2710
2713
|
return _fetchMenuById.apply(this, arguments);
|
|
2711
2714
|
}
|