@antscorp/antsomi-ui 1.3.7-beta.59 → 1.3.7-beta.60

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.
@@ -20,7 +20,7 @@ import { renderMenuIcon } from './utils';
20
20
  const SubLogoAntsomi = 'https://st-media-template.antsomi.com/icons/antsomi/antsomi.png';
21
21
  const homePermissionCode = 'DASHBOARD';
22
22
  export const LeftMenuComponent = memo(props => {
23
- const { show = true, style, className, customization, showLogo = true, onClickLogo } = props;
23
+ const { show = true, style, className, customization, showLogo = true, footer, onClickLogo, } = props;
24
24
  const { showMenuPopover = true, showButtonExpand = true, type, items = [], onMenuItemClick, } = customization || {};
25
25
  const appHoverMenuChildren = useLeftMenuContext(store => store.appHoverMenuChildren);
26
26
  const customHoverMenuChildren = useLeftMenuContext(store => store.customHoverMenuChildren);
@@ -99,9 +99,9 @@ export const LeftMenuComponent = memo(props => {
99
99
  }
100
100
  return null;
101
101
  };
102
- return (_jsxs(LeftMenuNavWrapper, { "$show": show, style: style, "$isExpandMenu": state.isExpandMenu, className: className, children: [_jsxs(LeftMenuNav, { className: "left-menu-nav", children: [_jsxs(FeatureMenuWrapper, { vertical: true, onMouseEnter: () => onShowPopover(), onMouseLeave: onMouseLeave, children: [showLogo && (_jsx(NavLogoWrapper, { align: "center", justify: "center", onMouseEnter: onHoverMenuBar, onClick: onClickLogo, children: _jsx("div", { className: "image-wrapper", children: _jsx("img", { src: SubLogoAntsomi, alt: "Antsomi sub logo" }) }) })), _jsxs(FeatureMenu, { role: "menu", className: "antsomi-scroll-box", children: [_jsx("div", { className: "menu-content scroll-content", children: renderAppMenuItems() }), _jsx("div", { className: "nav-blank", onMouseEnter: onHoverMenuBar }), showMenuPopover && (_jsx(PopoverWrapper, { show: state.isShowPopover && !isEmpty(hoverMenuChildren), hasMarginTop: type !== 'recommendation', className: "antsomi-scroll-box antsomi-child-menu-popover", children: _jsx("div", { className: "scroll-content", style: { width: '200px', maxHeight: '100%' }, children: childHoverMenu }) }))] }), _jsx("div", { style: { flexShrink: 0 }, children: renderSettings() })] }), showButtonExpand && (_jsx(ExpandWrapper, { onMouseEnter: onMouseLeave, children: _jsx(Icon, { type: "icon-ants-expand-more", style: {
102
+ return (_jsxs(LeftMenuNavWrapper, { "$show": show, style: style, "$isExpandMenu": state.isExpandMenu, className: className, children: [_jsxs(LeftMenuNav, { className: "left-menu-nav", children: [_jsxs(FeatureMenuWrapper, { vertical: true, onMouseEnter: () => onShowPopover(), onMouseLeave: onMouseLeave, children: [showLogo && (_jsx(NavLogoWrapper, { align: "center", justify: "center", onMouseEnter: onHoverMenuBar, onClick: onClickLogo, children: _jsx("div", { className: "image-wrapper", children: _jsx("img", { src: SubLogoAntsomi, alt: "Antsomi sub logo" }) }) })), _jsxs(FeatureMenu, { role: "menu", className: "antsomi-scroll-box", children: [_jsx("div", { className: "menu-content scroll-content", children: renderAppMenuItems() }), _jsx("div", { className: "nav-blank", onMouseEnter: onHoverMenuBar }), showMenuPopover && (_jsx(PopoverWrapper, { show: state.isShowPopover && !isEmpty(hoverMenuChildren), hasMarginTop: type !== 'recommendation', className: "antsomi-scroll-box antsomi-child-menu-popover", children: _jsx("div", { className: "scroll-content", style: { width: '200px', maxHeight: '100%' }, children: childHoverMenu }) }))] }), footer === undefined && _jsx("div", { style: { flexShrink: 0 }, children: renderSettings() })] }), footer !== undefined ? (_jsx("div", { style: { flexShrink: 0 }, children: footer })) : showButtonExpand ? (_jsx(ExpandWrapper, { onMouseEnter: onMouseLeave, children: _jsx(Icon, { type: "icon-ants-expand-more", style: {
103
103
  cursor: 'pointer',
104
104
  fontSize: '20px',
105
105
  transform: `rotate(${state.isExpandMenu ? '90deg' : '270deg'})`,
106
- }, onClick: onToggleChildMenu }) }))] }), _jsx(ChildMenuWrapper, { isExpand: state.isExpandMenu, isMarginTop: showLogo, className: "antsomi-scroll-box", children: _jsx("div", { className: "scroll-content", style: { width: '200px', maxHeight: '100%' }, children: childActiveMenu }) })] }));
106
+ }, onClick: onToggleChildMenu }) })) : null] }), _jsx(ChildMenuWrapper, { isExpand: state.isExpandMenu, isMarginTop: showLogo, className: "antsomi-scroll-box", children: _jsx("div", { className: "scroll-content", style: { width: '200px', maxHeight: '100%' }, children: childActiveMenu }) })] }));
107
107
  }, (prevProps, nextProps) => isEqual(prevProps, nextProps));
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  import { AppConfigProviderProps } from '@antscorp/antsomi-ui/es/providers';
2
3
  import { FeatureMenuPermission, TFeatureMenu } from '@antscorp/antsomi-ui/es/models/LeftMenu';
3
4
  export type TMenuItem = Omit<Partial<TFeatureMenu>, 'children' | keyof TRequireMenuItemKey> & {
@@ -37,6 +38,12 @@ export interface LeftMenuProps {
37
38
  style?: React.CSSProperties;
38
39
  className?: string;
39
40
  showLogo?: boolean;
41
+ /**
42
+ * Custom content rendered at the bottom of the primary menu rail.
43
+ * When provided, it replaces the default Settings item and Expand button.
44
+ * Pass `null` to hide the default footer without rendering a replacement.
45
+ */
46
+ footer?: ReactNode;
40
47
  customization?: {
41
48
  type?: TLeftMenuType;
42
49
  showButtonExpand?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.7-beta.59",
3
+ "version": "1.3.7-beta.60",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",