@antscorp/antsomi-ui 1.3.5-beta.349 → 1.3.5-beta.350
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/es/components/molecules/HeaderV2/HeaderV2.js +0 -1
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/MenuInline.js +1 -1
- package/es/components/organism/LeftMenu/index.js +1 -2
- package/es/components/organism/LeftMenu/styled.d.ts +3 -1
- package/es/components/organism/LeftMenu/styled.js +2 -1
- package/es/components/template/Layout/stores/index.js +7 -2
- package/es/providers/ConfigProvider/GlobalStyle.js +2 -1
- package/package.json +1 -1
|
@@ -31,7 +31,6 @@ export const HeaderV2 = memo(props => {
|
|
|
31
31
|
const { auth, env: envContext, languageCode = 'en', appCode: contextAppCode, urlLogout: urlLogoutProvider = '', menuCode: contextMenuCode, } = useContextSelector(AppConfigContext, state => state);
|
|
32
32
|
const { search } = useLocation();
|
|
33
33
|
const { replace } = useCustomRouter();
|
|
34
|
-
console.log({ headerProps: props });
|
|
35
34
|
// * Prefer to use Header in AppConfigContext
|
|
36
35
|
const { className, style, breadcrumbs, showLogo = false, rightContent, pageTitle = '', accountSelection = {}, helpConfig, notificationConfig = {}, accountSharingConfig, useURLParam, config, } = props;
|
|
37
36
|
/** General config for children component */
|
|
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import React, { forwardRef, useCallback, useMemo, useState } from 'react';
|
|
13
|
-
import
|
|
13
|
+
import clsx from 'clsx';
|
|
14
14
|
import AutoSizer from 'react-virtualized-auto-sizer';
|
|
15
15
|
import { VirtualizedMenuContainer } from '../../styled';
|
|
16
16
|
import { INLINE_INDENT, INLINE_PADDING, ITEM_SIZE, ITEM_SPACING, MODE } from '../../config';
|
|
@@ -32,7 +32,6 @@ export const LeftMenu = memo(props => {
|
|
|
32
32
|
}, [activeAppCode, isCustomized, state.hoverItem, onMenuItemClick]);
|
|
33
33
|
const renderFeatureMenuItems = useCallback((item) => {
|
|
34
34
|
const { menu_item_name, menu_item, icon_name, menu_item_code, menu_item_path, menu_item_domain, } = item;
|
|
35
|
-
console.log('🚀 ~ item:', item);
|
|
36
35
|
const isActive = activeAppCode === menu_item_code;
|
|
37
36
|
const isHover = state.hoverItem === menu_item_code;
|
|
38
37
|
const renderLabel = () => (React.createElement("li", { role: "menuitem", className: classNames({ isActive, isHover }) },
|
|
@@ -65,7 +64,7 @@ export const LeftMenu = memo(props => {
|
|
|
65
64
|
}
|
|
66
65
|
return null;
|
|
67
66
|
};
|
|
68
|
-
return (React.createElement(LeftMenuNavWrapper, { style: style, className: className },
|
|
67
|
+
return (React.createElement(LeftMenuNavWrapper, { style: style, "$isExpandMenu": state.isExpandMenu, className: className },
|
|
69
68
|
React.createElement(LeftMenuNav, null,
|
|
70
69
|
React.createElement(FeatureMenuWrapper, { isExpandMenu: state.isExpandMenu, vertical: true },
|
|
71
70
|
React.createElement(NavLogoWrapper, { align: "center", justify: "center", onMouseEnter: onHoverMenuBar },
|
|
@@ -5,7 +5,9 @@ export declare const FeatureMenuWrapper: import("styled-components").StyledCompo
|
|
|
5
5
|
isExpandMenu: boolean;
|
|
6
6
|
}, never>;
|
|
7
7
|
export declare const ExpandWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
-
export declare const LeftMenuNavWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
export declare const LeftMenuNavWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
9
|
+
$isExpandMenu?: boolean | undefined;
|
|
10
|
+
}, never>;
|
|
9
11
|
export declare const NavLogoWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
|
|
10
12
|
export declare const LeftMenuNav: import("styled-components").StyledComponent<"nav", any, {}, never>;
|
|
11
13
|
export declare const FeatureMenu: import("styled-components").StyledComponent<"ul", any, {}, never>;
|
|
@@ -60,8 +60,9 @@ export const ExpandWrapper = styled.div `
|
|
|
60
60
|
export const LeftMenuNavWrapper = styled.div `
|
|
61
61
|
height: 100vh;
|
|
62
62
|
display: flex;
|
|
63
|
-
gap: 10px;
|
|
64
63
|
transition: all 0.2s ease-out;
|
|
64
|
+
|
|
65
|
+
${p => (p.$isExpandMenu ? `gap: 10px;` : `gap: 15px;`)}
|
|
65
66
|
`;
|
|
66
67
|
export const NavLogoWrapper = styled(Flex) `
|
|
67
68
|
height: ${HEADER_HEIGHT}px;
|
|
@@ -32,9 +32,14 @@ export const useLayoutStore = create(set => ({
|
|
|
32
32
|
state: Object.assign(Object.assign({}, store.state), { workspace: {} }),
|
|
33
33
|
})),
|
|
34
34
|
resetContentWrapperState: () => set(store => ({
|
|
35
|
-
state: Object.assign(Object.assign({}, store.state), { contentWrapper:
|
|
35
|
+
state: Object.assign(Object.assign({}, store.state), { contentWrapper: {} }),
|
|
36
36
|
})),
|
|
37
37
|
resetLayoutState: () => set(() => ({
|
|
38
|
-
state:
|
|
38
|
+
state: {
|
|
39
|
+
contentWrapper: {},
|
|
40
|
+
header: {},
|
|
41
|
+
leftMenu: { show: true },
|
|
42
|
+
workspace: {},
|
|
43
|
+
},
|
|
39
44
|
})),
|
|
40
45
|
}));
|
|
@@ -818,9 +818,10 @@ export const GlobalStyle = () => {
|
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
820
|
.antsomi-modal-footer {
|
|
821
|
+
padding: 15px !important;
|
|
821
822
|
text-align: right;
|
|
822
823
|
background: transparent;
|
|
823
|
-
border-top: 1px solid #f0f0f0;
|
|
824
|
+
border-top: 1px solid #f0f0f0 !important;
|
|
824
825
|
border-radius: 0 0 2px 2px;
|
|
825
826
|
}
|
|
826
827
|
}
|