@antscorp/antsomi-ui 1.3.5-beta.513 → 1.3.5-beta.514
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.
|
@@ -137,7 +137,7 @@ export const DrawerDetail = props => {
|
|
|
137
137
|
React.createElement("div", null,
|
|
138
138
|
showClose && (React.createElement(CloseBtn, { onClick: onClose },
|
|
139
139
|
React.createElement(Icon, { type: "icon-ants-remove-slim", size: 14 }))),
|
|
140
|
-
React.createElement(Flex, { vertical: true, gap: 10, align: "center", justify: "center" }, items === null || items === void 0 ? void 0 : items.map((item) => (React.createElement(Tooltip, { key: item === null || item === void 0 ? void 0 : item.key, title: item === null || item === void 0 ? void 0 : item.label, mouseEnterDelay: 0.3 },
|
|
140
|
+
React.createElement(Flex, { vertical: true, gap: 10, align: "center", justify: "center" }, items === null || items === void 0 ? void 0 : items.map((item) => (React.createElement(Tooltip, { key: item === null || item === void 0 ? void 0 : item.key, title: item === null || item === void 0 ? void 0 : item.label, mouseEnterDelay: 0.3, placement: "right" },
|
|
141
141
|
React.createElement(MenuItem, { key: item === null || item === void 0 ? void 0 : item.key, className: (selectedKeys === null || selectedKeys === void 0 ? void 0 : selectedKeys.includes(item.key)) ? 'active' : '', onClick: () => onClick && onClick(item) }, item.icon)))))),
|
|
142
142
|
React.createElement(MenuFooter, null, footer))),
|
|
143
143
|
React.createElement(Content, null,
|
|
@@ -53,10 +53,10 @@ export const flattenMenuArray = (menuItems, childKey) => {
|
|
|
53
53
|
export const recursivePermissionMenu = (menuItems, menuPermissions) => {
|
|
54
54
|
var _a, _b;
|
|
55
55
|
const menu = (_b = (_a = menuItems === null || menuItems === void 0 ? void 0 : menuItems.filter(({ permission_code, menu_item_type }) => {
|
|
56
|
-
if (Number(menu_item_type)
|
|
56
|
+
if (Number(menu_item_type) !== MENU_ITEM_TYPE.MENU) {
|
|
57
57
|
return true;
|
|
58
58
|
}
|
|
59
|
-
return !!(menuPermissions === null || menuPermissions === void 0 ? void 0 : menuPermissions.find(({
|
|
59
|
+
return !!(menuPermissions === null || menuPermissions === void 0 ? void 0 : menuPermissions.find(({ menu_code = '' }) => !!permission_code && [menu_code].includes(permission_code)));
|
|
60
60
|
})) === null || _a === void 0 ? void 0 : _a.map(item => (Object.assign(Object.assign({}, item), (isArray(item.children)
|
|
61
61
|
? {
|
|
62
62
|
children: recursivePermissionMenu(sortBy(item.children || [], ['level_position']), menuPermissions),
|