@next-core/brick-kit 2.172.0 → 2.173.1

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.
@@ -510,11 +510,13 @@
510
510
  * @endpoint GET /api/v1/micro-app/menus/:menuId
511
511
  */
512
512
  var InstalledMicroAppApi_getMenusInfo = /*#__PURE__*/function () {
513
- var _ref = _asyncToGenerator__default["default"](function* (menuId, options) {
514
- return (/**! @contract easyops.api.micro_app.installed_micro_app.GetMenusInfo@1.0.0 */(yield brickHttp.http.get("api/gateway/micro_app.installed_micro_app.GetMenusInfo/api/v1/micro-app/menus/".concat(menuId), options)).data
513
+ var _ref = _asyncToGenerator__default["default"](function* (menuId, params, options) {
514
+ return (/**! @contract easyops.api.micro_app.installed_micro_app.GetMenusInfo@1.0.0 */(yield brickHttp.http.get("api/gateway/micro_app.installed_micro_app.GetMenusInfo/api/v1/micro-app/menus/".concat(menuId), _objectSpread__default["default"](_objectSpread__default["default"]({}, options), {}, {
515
+ params
516
+ }))).data
515
517
  );
516
518
  });
517
- return function InstalledMicroAppApi_getMenusInfo(_x, _x2) {
519
+ return function InstalledMicroAppApi_getMenusInfo(_x, _x2, _x3) {
518
520
  return _ref.apply(this, arguments);
519
521
  };
520
522
  }();
@@ -2954,7 +2956,9 @@
2954
2956
  if (menuCache.has(menuId)) {
2955
2957
  return menuCache.get(menuId);
2956
2958
  }
2957
- var menuList = window.STANDALONE_MICRO_APPS ? yield kernel.getStandaloneMenus(menuId, isPreFetch) : kernel.getFeatureFlags()["three-level-menu-layout"] ? (yield InstalledMicroAppApi_getMenusInfo(menuId)).menus : (yield InstanceApi_postSearch("EASYOPS_STORYBOARD_MENU", {
2959
+ var menuList = window.STANDALONE_MICRO_APPS ? yield kernel.getStandaloneMenus(menuId, isPreFetch) : kernel.getFeatureFlags()["three-level-menu-layout"] ? (yield InstalledMicroAppApi_getMenusInfo(menuId, {
2960
+ menuObjectId: "EASYOPS_STORYBOARD_MENU"
2961
+ })).menus : (yield InstanceApi_postSearch("EASYOPS_STORYBOARD_MENU", {
2958
2962
  page: 1,
2959
2963
  page_size: 200,
2960
2964
  fields: {
@@ -3110,10 +3114,12 @@
3110
3114
  var children = walkMenuItems(item.children);
3111
3115
  return item.type === "group" ? {
3112
3116
  type: "group",
3117
+ childLayout: item.childLayout,
3113
3118
  title: item.text,
3114
3119
  items: children
3115
3120
  } : children !== null && children !== void 0 && children.length ? {
3116
3121
  type: "subMenu",
3122
+ childLayout: item.childLayout,
3117
3123
  title: item.text,
3118
3124
  icon: item.icon,
3119
3125
  items: children,
@@ -3271,6 +3277,15 @@
3271
3277
  }
3272
3278
  function _computeRealValueWithOverrideApp() {
3273
3279
  _computeRealValueWithOverrideApp = _asyncToGenerator__default["default"](function* (data, overrideAppId, context, kernel) {
3280
+ if ("titleDataSource" in data && brickUtils.isObject(data.titleDataSource) && Object.entries(data.titleDataSource).every(_ref7 => {
3281
+ var [key, value] = _ref7;
3282
+ return value === null || value === "";
3283
+ })) {
3284
+ delete data.titleDataSource;
3285
+ }
3286
+ if ("if" in data && data.if === null) {
3287
+ delete data.if;
3288
+ }
3274
3289
  var newContext = context;
3275
3290
  if (overrideAppId !== context.app.id && attemptToVisit(data, ["APP", "I18N", "IMG"])) {
3276
3291
  if (window.STANDALONE_MICRO_APPS) {
@@ -9512,7 +9527,9 @@
9512
9527
  });
9513
9528
  if (!filterMenus.length) {
9514
9529
  var _ref6, _yield$InstanceApi_po;
9515
- filterMenus = (_ref6 = (_yield$InstanceApi_po = yield InstanceApi_postSearch("STANDALONE_MENU@EASYOPS", {
9530
+ filterMenus = (_ref6 = _this12.getFeatureFlags()["three-level-menu-layout"] ? (yield InstalledMicroAppApi_getMenusInfo(menuId, {
9531
+ menuObjectId: "STANDALONE_MENU@EASYOPS"
9532
+ })).menus : (_yield$InstanceApi_po = yield InstanceApi_postSearch("STANDALONE_MENU@EASYOPS", {
9516
9533
  page: 1,
9517
9534
  page_size: 200,
9518
9535
  fields: {