@next-core/brick-kit 2.171.4 → 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.bundle.js
CHANGED
|
@@ -505,6 +505,54 @@
|
|
|
505
505
|
};
|
|
506
506
|
}();
|
|
507
507
|
|
|
508
|
+
/**
|
|
509
|
+
* @description 获取菜单信息
|
|
510
|
+
* @endpoint GET /api/v1/micro-app/menus/:menuId
|
|
511
|
+
*/
|
|
512
|
+
var InstalledMicroAppApi_getMenusInfo = /*#__PURE__*/function () {
|
|
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
|
|
517
|
+
);
|
|
518
|
+
});
|
|
519
|
+
return function InstalledMicroAppApi_getMenusInfo(_x, _x2, _x3) {
|
|
520
|
+
return _ref.apply(this, arguments);
|
|
521
|
+
};
|
|
522
|
+
}();
|
|
523
|
+
|
|
524
|
+
/** 微应用的i18n信息 */
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* @description 获取微应用的i18n数据
|
|
528
|
+
* @endpoint GET /api/v1/micro-app/i18n
|
|
529
|
+
*/
|
|
530
|
+
var InstalledMicroAppApi_getI18NData = /*#__PURE__*/function () {
|
|
531
|
+
var _ref = _asyncToGenerator__default["default"](function* (params, options) {
|
|
532
|
+
return (/**! @contract easyops.api.micro_app.installed_micro_app.GetI18NData@1.0.0 */(yield brickHttp.http.get("api/gateway/micro_app.installed_micro_app.GetI18NData/api/v1/micro-app/i18n", _objectSpread__default["default"](_objectSpread__default["default"]({}, options), {}, {
|
|
533
|
+
params
|
|
534
|
+
}))).data
|
|
535
|
+
);
|
|
536
|
+
});
|
|
537
|
+
return function InstalledMicroAppApi_getI18NData(_x, _x2) {
|
|
538
|
+
return _ref.apply(this, arguments);
|
|
539
|
+
};
|
|
540
|
+
}();
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* @description 校验系统权限
|
|
544
|
+
* @endpoint POST /api/micro_app/v1/permission/validate
|
|
545
|
+
*/
|
|
546
|
+
var PermissionApi_validatePermissions = /*#__PURE__*/function () {
|
|
547
|
+
var _ref = _asyncToGenerator__default["default"](function* (data, options) {
|
|
548
|
+
return (/**! @contract easyops.api.micro_app.permission.ValidatePermissions@1.0.0 */(yield brickHttp.http.post("api/gateway/micro_app.permission.ValidatePermissions/api/micro_app/v1/permission/validate", data, options)).data
|
|
549
|
+
);
|
|
550
|
+
});
|
|
551
|
+
return function PermissionApi_validatePermissions(_x, _x2) {
|
|
552
|
+
return _ref.apply(this, arguments);
|
|
553
|
+
};
|
|
554
|
+
}();
|
|
555
|
+
|
|
508
556
|
function supply(attemptToVisitGlobals, providedGlobalVariables, mock) {
|
|
509
557
|
var globalVariables = _objectSpread__default["default"]({}, providedGlobalVariables);
|
|
510
558
|
// Allow limited browser builtin values.
|
|
@@ -1231,38 +1279,6 @@
|
|
|
1231
1279
|
}
|
|
1232
1280
|
}
|
|
1233
1281
|
|
|
1234
|
-
/**
|
|
1235
|
-
* @description 获取微应用的i18n数据
|
|
1236
|
-
* @endpoint GET /api/v1/micro-app/i18n
|
|
1237
|
-
*/
|
|
1238
|
-
var InstalledMicroAppApi_getI18NData = /*#__PURE__*/function () {
|
|
1239
|
-
var _ref = _asyncToGenerator__default["default"](function* (params, options) {
|
|
1240
|
-
return (/**! @contract easyops.api.micro_app.installed_micro_app.GetI18NData@1.0.0 */
|
|
1241
|
-
(yield brickHttp.http.get("api/gateway/micro_app.installed_micro_app.GetI18NData/api/v1/micro-app/i18n", _objectSpread__default["default"](_objectSpread__default["default"]({}, options), {}, {
|
|
1242
|
-
params
|
|
1243
|
-
}))).data
|
|
1244
|
-
);
|
|
1245
|
-
});
|
|
1246
|
-
return function InstalledMicroAppApi_getI18NData(_x, _x2) {
|
|
1247
|
-
return _ref.apply(this, arguments);
|
|
1248
|
-
};
|
|
1249
|
-
}();
|
|
1250
|
-
|
|
1251
|
-
/**
|
|
1252
|
-
* @description 校验系统权限
|
|
1253
|
-
* @endpoint POST /api/micro_app/v1/permission/validate
|
|
1254
|
-
*/
|
|
1255
|
-
var PermissionApi_validatePermissions = /*#__PURE__*/function () {
|
|
1256
|
-
var _ref = _asyncToGenerator__default["default"](function* (data, options) {
|
|
1257
|
-
return (/**! @contract easyops.api.micro_app.permission.ValidatePermissions@1.0.0 */
|
|
1258
|
-
(yield brickHttp.http.post("api/gateway/micro_app.permission.ValidatePermissions/api/micro_app/v1/permission/validate", data, options)).data
|
|
1259
|
-
);
|
|
1260
|
-
});
|
|
1261
|
-
return function PermissionApi_validatePermissions(_x, _x2) {
|
|
1262
|
-
return _ref.apply(this, arguments);
|
|
1263
|
-
};
|
|
1264
|
-
}();
|
|
1265
|
-
|
|
1266
1282
|
var auth = {};
|
|
1267
1283
|
|
|
1268
1284
|
/** @internal */
|
|
@@ -2940,7 +2956,9 @@
|
|
|
2940
2956
|
if (menuCache.has(menuId)) {
|
|
2941
2957
|
return menuCache.get(menuId);
|
|
2942
2958
|
}
|
|
2943
|
-
var menuList = window.STANDALONE_MICRO_APPS ? yield kernel.getStandaloneMenus(menuId, isPreFetch) : (yield
|
|
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", {
|
|
2944
2962
|
page: 1,
|
|
2945
2963
|
page_size: 200,
|
|
2946
2964
|
fields: {
|
|
@@ -3089,6 +3107,26 @@
|
|
|
3089
3107
|
});
|
|
3090
3108
|
return _loadDynamicMenuItems.apply(this, arguments);
|
|
3091
3109
|
}
|
|
3110
|
+
function walkMenuItems(menuItems) {
|
|
3111
|
+
return menuItems === null || menuItems === void 0 ? void 0 : menuItems.filter(
|
|
3112
|
+
// `if` is already evaluated.
|
|
3113
|
+
looseCheckIfOfComputed).map(item => {
|
|
3114
|
+
var children = walkMenuItems(item.children);
|
|
3115
|
+
return item.type === "group" ? {
|
|
3116
|
+
type: "group",
|
|
3117
|
+
childLayout: item.childLayout,
|
|
3118
|
+
title: item.text,
|
|
3119
|
+
items: children
|
|
3120
|
+
} : children !== null && children !== void 0 && children.length ? {
|
|
3121
|
+
type: "subMenu",
|
|
3122
|
+
childLayout: item.childLayout,
|
|
3123
|
+
title: item.text,
|
|
3124
|
+
icon: item.icon,
|
|
3125
|
+
items: children,
|
|
3126
|
+
defaultExpanded: item.defaultExpanded
|
|
3127
|
+
} : item;
|
|
3128
|
+
});
|
|
3129
|
+
}
|
|
3092
3130
|
function processMenu(_x15, _x16, _x17, _x18, _x19) {
|
|
3093
3131
|
return _processMenu.apply(this, arguments);
|
|
3094
3132
|
}
|
|
@@ -3116,25 +3154,7 @@
|
|
|
3116
3154
|
title: yield processMenuTitle(menuData),
|
|
3117
3155
|
icon: menuData.icon,
|
|
3118
3156
|
link: menuData.link,
|
|
3119
|
-
menuItems: menuData.items
|
|
3120
|
-
// `if` is already evaluated.
|
|
3121
|
-
looseCheckIfOfComputed).map(item => {
|
|
3122
|
-
var _item$children;
|
|
3123
|
-
var children = (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.filter(
|
|
3124
|
-
// `if` is already evaluated.
|
|
3125
|
-
looseCheckIfOfComputed);
|
|
3126
|
-
return item.type === "group" ? {
|
|
3127
|
-
type: "group",
|
|
3128
|
-
title: item.text,
|
|
3129
|
-
items: children
|
|
3130
|
-
} : children !== null && children !== void 0 && children.length ? {
|
|
3131
|
-
type: "subMenu",
|
|
3132
|
-
title: item.text,
|
|
3133
|
-
icon: item.icon,
|
|
3134
|
-
items: children,
|
|
3135
|
-
defaultExpanded: item.defaultExpanded
|
|
3136
|
-
} : item;
|
|
3137
|
-
}),
|
|
3157
|
+
menuItems: walkMenuItems(menuData.items),
|
|
3138
3158
|
defaultCollapsed: menuData.defaultCollapsed || hasSubMenu,
|
|
3139
3159
|
defaultCollapsedBreakpoint: menuData.defaultCollapsedBreakpoint
|
|
3140
3160
|
};
|
|
@@ -3257,6 +3277,9 @@
|
|
|
3257
3277
|
}
|
|
3258
3278
|
function _computeRealValueWithOverrideApp() {
|
|
3259
3279
|
_computeRealValueWithOverrideApp = _asyncToGenerator__default["default"](function* (data, overrideAppId, context, kernel) {
|
|
3280
|
+
if ("if" in data && data.if === null) {
|
|
3281
|
+
delete data.if;
|
|
3282
|
+
}
|
|
3260
3283
|
var newContext = context;
|
|
3261
3284
|
if (overrideAppId !== context.app.id && attemptToVisit(data, ["APP", "I18N", "IMG"])) {
|
|
3262
3285
|
if (window.STANDALONE_MICRO_APPS) {
|
|
@@ -9498,7 +9521,9 @@
|
|
|
9498
9521
|
});
|
|
9499
9522
|
if (!filterMenus.length) {
|
|
9500
9523
|
var _ref6, _yield$InstanceApi_po;
|
|
9501
|
-
filterMenus = (_ref6 = (
|
|
9524
|
+
filterMenus = (_ref6 = _this12.getFeatureFlags()["three-level-menu-layout"] ? (yield InstalledMicroAppApi_getMenusInfo(menuId, {
|
|
9525
|
+
menuObjectId: "STANDALONE_MENU@EASYOPS"
|
|
9526
|
+
})).menus : (_yield$InstanceApi_po = yield InstanceApi_postSearch("STANDALONE_MENU@EASYOPS", {
|
|
9502
9527
|
page: 1,
|
|
9503
9528
|
page_size: 200,
|
|
9504
9529
|
fields: {
|