@next-core/brick-kit 2.177.2 → 2.177.4
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 +7 -4
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +7 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -3039,7 +3039,7 @@ function _fetchMenuById() {
|
|
|
3039
3039
|
if (!menuData) {
|
|
3040
3040
|
throw new Error("Menu not found: ".concat(menuId));
|
|
3041
3041
|
}
|
|
3042
|
-
|
|
3042
|
+
reorderMenu(menuData);
|
|
3043
3043
|
menuData[symbolShouldCache] && menuCache.set(menuId, menuData);
|
|
3044
3044
|
return menuData;
|
|
3045
3045
|
});
|
|
@@ -3278,9 +3278,12 @@ function clearMenuTitleCache() {
|
|
|
3278
3278
|
function clearMenuCache() {
|
|
3279
3279
|
menuCache.clear();
|
|
3280
3280
|
}
|
|
3281
|
-
function
|
|
3282
|
-
menuData.items =
|
|
3283
|
-
|
|
3281
|
+
function reorderMenu(menuData) {
|
|
3282
|
+
menuData.items = reorderMenuItems(menuData.items);
|
|
3283
|
+
}
|
|
3284
|
+
function reorderMenuItems(list) {
|
|
3285
|
+
return sortMenuItems(list).map(item => _objectSpread(_objectSpread({}, item), {}, {
|
|
3286
|
+
children: reorderMenuItems(item.children)
|
|
3284
3287
|
}));
|
|
3285
3288
|
}
|
|
3286
3289
|
function sortMenuItems(list) {
|