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