@next-core/brick-kit 2.172.0 → 2.173.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
|
@@ -511,11 +511,13 @@ var InstanceApi_postSearch = /*#__PURE__*/function () {
|
|
|
511
511
|
* @endpoint GET /api/v1/micro-app/menus/:menuId
|
|
512
512
|
*/
|
|
513
513
|
var InstalledMicroAppApi_getMenusInfo = /*#__PURE__*/function () {
|
|
514
|
-
var _ref = _asyncToGenerator$3(function* (menuId, options) {
|
|
515
|
-
return (/**! @contract easyops.api.micro_app.installed_micro_app.GetMenusInfo@1.0.0 */(yield http.get("api/gateway/micro_app.installed_micro_app.GetMenusInfo/api/v1/micro-app/menus/".concat(menuId), options)
|
|
514
|
+
var _ref = _asyncToGenerator$3(function* (menuId, params, options) {
|
|
515
|
+
return (/**! @contract easyops.api.micro_app.installed_micro_app.GetMenusInfo@1.0.0 */(yield http.get("api/gateway/micro_app.installed_micro_app.GetMenusInfo/api/v1/micro-app/menus/".concat(menuId), _objectSpread(_objectSpread({}, options), {}, {
|
|
516
|
+
params
|
|
517
|
+
}))).data
|
|
516
518
|
);
|
|
517
519
|
});
|
|
518
|
-
return function InstalledMicroAppApi_getMenusInfo(_x, _x2) {
|
|
520
|
+
return function InstalledMicroAppApi_getMenusInfo(_x, _x2, _x3) {
|
|
519
521
|
return _ref.apply(this, arguments);
|
|
520
522
|
};
|
|
521
523
|
}();
|
|
@@ -2955,7 +2957,9 @@ function _fetchMenuById() {
|
|
|
2955
2957
|
if (menuCache.has(menuId)) {
|
|
2956
2958
|
return menuCache.get(menuId);
|
|
2957
2959
|
}
|
|
2958
|
-
var menuList = window.STANDALONE_MICRO_APPS ? yield kernel.getStandaloneMenus(menuId, isPreFetch) : kernel.getFeatureFlags()["three-level-menu-layout"] ? (yield InstalledMicroAppApi_getMenusInfo(menuId
|
|
2960
|
+
var menuList = window.STANDALONE_MICRO_APPS ? yield kernel.getStandaloneMenus(menuId, isPreFetch) : kernel.getFeatureFlags()["three-level-menu-layout"] ? (yield InstalledMicroAppApi_getMenusInfo(menuId, {
|
|
2961
|
+
menuObjectId: "EASYOPS_STORYBOARD_MENU"
|
|
2962
|
+
})).menus : (yield InstanceApi_postSearch("EASYOPS_STORYBOARD_MENU", {
|
|
2959
2963
|
page: 1,
|
|
2960
2964
|
page_size: 200,
|
|
2961
2965
|
fields: {
|
|
@@ -3111,10 +3115,12 @@ function walkMenuItems(menuItems) {
|
|
|
3111
3115
|
var children = walkMenuItems(item.children);
|
|
3112
3116
|
return item.type === "group" ? {
|
|
3113
3117
|
type: "group",
|
|
3118
|
+
childLayout: item.childLayout,
|
|
3114
3119
|
title: item.text,
|
|
3115
3120
|
items: children
|
|
3116
3121
|
} : children !== null && children !== void 0 && children.length ? {
|
|
3117
3122
|
type: "subMenu",
|
|
3123
|
+
childLayout: item.childLayout,
|
|
3118
3124
|
title: item.text,
|
|
3119
3125
|
icon: item.icon,
|
|
3120
3126
|
items: children,
|
|
@@ -3272,6 +3278,9 @@ function computeRealValueWithOverrideApp(_x22, _x23, _x24, _x25) {
|
|
|
3272
3278
|
}
|
|
3273
3279
|
function _computeRealValueWithOverrideApp() {
|
|
3274
3280
|
_computeRealValueWithOverrideApp = _asyncToGenerator$3(function* (data, overrideAppId, context, kernel) {
|
|
3281
|
+
if ("if" in data && data.if === null) {
|
|
3282
|
+
delete data.if;
|
|
3283
|
+
}
|
|
3275
3284
|
var newContext = context;
|
|
3276
3285
|
if (overrideAppId !== context.app.id && attemptToVisit(data, ["APP", "I18N", "IMG"])) {
|
|
3277
3286
|
if (window.STANDALONE_MICRO_APPS) {
|
|
@@ -9513,7 +9522,9 @@ class Kernel {
|
|
|
9513
9522
|
});
|
|
9514
9523
|
if (!filterMenus.length) {
|
|
9515
9524
|
var _ref6, _yield$InstanceApi_po;
|
|
9516
|
-
filterMenus = (_ref6 = (
|
|
9525
|
+
filterMenus = (_ref6 = _this12.getFeatureFlags()["three-level-menu-layout"] ? (yield InstalledMicroAppApi_getMenusInfo(menuId, {
|
|
9526
|
+
menuObjectId: "STANDALONE_MENU@EASYOPS"
|
|
9527
|
+
})).menus : (_yield$InstanceApi_po = yield InstanceApi_postSearch("STANDALONE_MENU@EASYOPS", {
|
|
9517
9528
|
page: 1,
|
|
9518
9529
|
page_size: 200,
|
|
9519
9530
|
fields: {
|