@mailstep/design-system 0.6.53 → 0.6.55-beta.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/package.json +1 -1
- package/ui/Blocks/LanguageSwitch/LanguageSwitch.d.ts +2 -7
- package/ui/Blocks/LanguageSwitch/LanguageSwitch.js +4 -4
- package/ui/Blocks/LanguageSwitch/stories/LanguageSwith.stories.d.ts +1 -5
- package/ui/Blocks/LanguageSwitch/styles.d.ts +4 -1
- package/ui/Blocks/LanguageSwitch/styles.js +8 -2
- package/ui/Blocks/LanguageSwitch/types.d.ts +7 -0
- package/ui/Blocks/SideMenu/MenuItem.d.ts +12 -0
- package/ui/Blocks/SideMenu/MenuItem.js +54 -0
- package/ui/Blocks/SideMenu/SideMenu.d.ts +3 -0
- package/ui/Blocks/SideMenu/SideMenu.js +25 -0
- package/ui/Blocks/SideMenu/components/Footer.d.ts +14 -0
- package/ui/Blocks/SideMenu/components/Footer.js +28 -0
- package/ui/Blocks/SideMenu/components/HamburgerMenu.d.ts +6 -0
- package/ui/Blocks/SideMenu/components/HamburgerMenu.js +24 -0
- package/ui/Blocks/SideMenu/components/SubitemTooltip.d.ts +13 -0
- package/ui/Blocks/SideMenu/components/SubitemTooltip.js +42 -0
- package/ui/Blocks/SideMenu/context/LeftMenuContext.d.ts +12 -0
- package/ui/Blocks/SideMenu/context/LeftMenuContext.js +15 -0
- package/ui/Blocks/SideMenu/context/useLeftMenuContext.d.ts +4 -0
- package/ui/Blocks/SideMenu/context/useLeftMenuContext.js +8 -0
- package/ui/Blocks/SideMenu/hooks/useOutsideHover.d.ts +11 -0
- package/ui/Blocks/SideMenu/hooks/useOutsideHover.js +23 -0
- package/ui/Blocks/SideMenu/index.d.ts +4 -0
- package/ui/Blocks/SideMenu/index.js +2 -0
- package/ui/Blocks/SideMenu/stories/SideMenu.stories.d.ts +12 -0
- package/ui/Blocks/SideMenu/stories/SideMenu.stories.js +23 -0
- package/ui/Blocks/SideMenu/stories/menuItems.d.ts +17 -0
- package/ui/Blocks/SideMenu/stories/menuItems.js +102 -0
- package/ui/Blocks/SideMenu/styles.d.ts +40 -0
- package/ui/Blocks/SideMenu/styles.js +157 -0
- package/ui/Blocks/SideMenu/types.d.ts +21 -0
- package/ui/Blocks/SideMenu/types.js +1 -0
- package/ui/index.d.ts +4 -2
- package/ui/index.es.js +16292 -15689
- package/ui/index.js +4 -2
- package/ui/index.umd.js +898 -569
package/package.json
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
activeLanguage?: string;
|
|
5
|
-
onLanguageChange: (languageCode: string) => void;
|
|
6
|
-
languageItems?: LanguageItem[];
|
|
7
|
-
};
|
|
8
|
-
declare const LanguageSwitch: FC<Props>;
|
|
2
|
+
import { LanguageSwitchProps } from './types';
|
|
3
|
+
declare const LanguageSwitch: FC<LanguageSwitchProps>;
|
|
9
4
|
export default LanguageSwitch;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
3
3
|
import { useClickOutside } from '../Modal/hooks/useClickOutside';
|
|
4
4
|
import { StyledFlag, LanguageFlagWrap, LanguageSwitchWrap, DownImg, StyledDropdownMenu } from './styles';
|
|
5
5
|
var LanguageSwitch = function (_a) {
|
|
6
|
-
var activeLanguage = _a.activeLanguage, onLanguageChange = _a.onLanguageChange, languageItems = _a.languageItems;
|
|
7
|
-
var
|
|
6
|
+
var activeLanguage = _a.activeLanguage, onLanguageChange = _a.onLanguageChange, languageItems = _a.languageItems, _b = _a.placement, placement = _b === void 0 ? 'right' : _b;
|
|
7
|
+
var _c = useState(false), flagDropdownVisible = _c[0], setFlagDropdownVisible = _c[1];
|
|
8
8
|
var onClose = useCallback(function () {
|
|
9
9
|
setFlagDropdownVisible(false);
|
|
10
10
|
}, []);
|
|
@@ -29,6 +29,6 @@ var LanguageSwitch = function (_a) {
|
|
|
29
29
|
}, [filteredLanguages, languageToggle]);
|
|
30
30
|
if (!activeLanguageObj || !languageItems)
|
|
31
31
|
return null;
|
|
32
|
-
return (_jsxs(LanguageSwitchWrap, { ref: flagMenuRef, children: [_jsxs(LanguageFlagWrap, { onClick: handleFlagClick, children: [_jsx(StyledFlag, { children: activeLanguageObj.icon }), _jsx(DownImg, { width: "10", height: "10", src: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMCAxMCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogI2YwZjsKICAgICAgICBvcGFjaXR5OiAwOwogICAgICB9CgogICAgICAuY2xzLTIgewogICAgICAgIGZpbGw6ICM3MDcwNzA7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnIGlkPSJDaGV2cm9uIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4KSByb3RhdGUoOTApIj4KICAgIDxyZWN0IGlkPSJGcmFtZSIgY2xhc3M9ImNscy0xIiB3aWR0aD0iMTAiIGhlaWdodD0iNiIvPgogICAgPHBhdGggaWQ9IlNoYXBlIiBjbGFzcz0iY2xzLTIiIGQ9Ik0xMCwxQTEsMSwwLDAsMCw4LjI5My4yOTNMNSwzLjU4NiwxLjcwNy4yOTNBMSwxLDAsMSwwLC4yOTMsMS43MDdsNCw0YTEsMSwwLDAsMCwxLjQxNSwwbDQtNEExLDEsMCwwLDAsMTAsMVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIgOCkgcm90YXRlKC05MCkiLz4KICA8L2c+Cjwvc3ZnPgo=" })] }), _jsx(StyledDropdownMenu, { showMenu: flagDropdownVisible, items: formattedLanguages })] }));
|
|
32
|
+
return (_jsxs(LanguageSwitchWrap, { ref: flagMenuRef, children: [_jsxs(LanguageFlagWrap, { onClick: handleFlagClick, children: [_jsx(StyledFlag, { children: activeLanguageObj.icon }), _jsx(DownImg, { width: "10", height: "10", src: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMCAxMCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogI2YwZjsKICAgICAgICBvcGFjaXR5OiAwOwogICAgICB9CgogICAgICAuY2xzLTIgewogICAgICAgIGZpbGw6ICM3MDcwNzA7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnIGlkPSJDaGV2cm9uIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4KSByb3RhdGUoOTApIj4KICAgIDxyZWN0IGlkPSJGcmFtZSIgY2xhc3M9ImNscy0xIiB3aWR0aD0iMTAiIGhlaWdodD0iNiIvPgogICAgPHBhdGggaWQ9IlNoYXBlIiBjbGFzcz0iY2xzLTIiIGQ9Ik0xMCwxQTEsMSwwLDAsMCw4LjI5My4yOTNMNSwzLjU4NiwxLjcwNy4yOTNBMSwxLDAsMSwwLC4yOTMsMS43MDdsNCw0YTEsMSwwLDAsMCwxLjQxNSwwbDQtNEExLDEsMCwwLDAsMTAsMVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIgOCkgcm90YXRlKC05MCkiLz4KICA8L2c+Cjwvc3ZnPgo=" })] }), _jsx(StyledDropdownMenu, { showMenu: flagDropdownVisible, items: formattedLanguages, placement: placement })] }));
|
|
33
33
|
};
|
|
34
34
|
export default LanguageSwitch;
|
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
import { StoryObj } from '@storybook/react';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import("react").FC<
|
|
6
|
-
activeLanguage?: string | undefined;
|
|
7
|
-
onLanguageChange: (languageCode: string) => void;
|
|
8
|
-
languageItems?: import("../types").LanguageItem[] | undefined;
|
|
9
|
-
}>;
|
|
5
|
+
component: import("react").FC<import("../types").LanguageSwitchProps>;
|
|
10
6
|
tags: string[];
|
|
11
7
|
argTypes: {};
|
|
12
8
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { Placement } from './types';
|
|
2
3
|
export declare const StyledFlag: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
|
|
3
|
-
export declare const StyledDropdownMenu: import("styled-components").StyledComponent<(<T extends import("../../Elements/DropdownMenu/types").Item>({ items, showMenu, className, ItemComponent, header, footer, ...rest }: import("../../Elements/DropdownMenu/types").DropdownMenuProps<T>) => JSX.Element), import("@xstyled/system").Theme, {
|
|
4
|
+
export declare const StyledDropdownMenu: import("styled-components").StyledComponent<(<T extends import("../../Elements/DropdownMenu/types").Item>({ items, showMenu, className, ItemComponent, header, footer, ...rest }: import("../../Elements/DropdownMenu/types").DropdownMenuProps<T>) => JSX.Element), import("@xstyled/system").Theme, {
|
|
5
|
+
placement: Placement;
|
|
6
|
+
}, never>;
|
|
4
7
|
export declare const LanguageSwitchWrap: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
|
|
5
8
|
export declare const DownImg: import("styled-components").StyledComponent<"img", import("@xstyled/system").Theme, {}, never>;
|
|
6
9
|
export declare const LanguageFlagWrap: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
|
|
@@ -5,8 +5,14 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
import styled from '@xstyled/styled-components';
|
|
6
6
|
import DropdownMenu from '../../Elements/DropdownMenu';
|
|
7
7
|
export var StyledFlag = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: auto;\n cursor: pointer;\n"], ["\n width: auto;\n cursor: pointer;\n"])));
|
|
8
|
-
export var StyledDropdownMenu = styled(DropdownMenu)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: absolute;\n top: 30px;\n right: -5px;\n width: max-content;\n @media (min-width: 1024px) {\n
|
|
9
|
-
|
|
8
|
+
export var StyledDropdownMenu = styled(DropdownMenu)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: absolute;\n top: 30px;\n right: -5px;\n\n width: max-content;\n @media (min-width: 1024px) {\n ", "\n }\n & > ul > a > * {\n display: flex;\n align-items: center;\n }\n\n :before {\n content: '';\n top: -1px;\n right: 15px;\n position: absolute;\n height: 10px;\n width: 10px;\n -webkit-transform: rotate(45deg) translate(-7px);\n -ms-transform: rotate(45deg) translate(-7px);\n transform: rotate(45deg) translate(-7px);\n border-left: 1px solid rgba(0, 0, 0, 0.1);\n background: white;\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n @media (min-width: 1024px) {\n ", "\n }\n }\n"], ["\n position: absolute;\n top: 30px;\n right: -5px;\n\n width: max-content;\n @media (min-width: 1024px) {\n ", "\n }\n & > ul > a > * {\n display: flex;\n align-items: center;\n }\n\n :before {\n content: '';\n top: -1px;\n right: 15px;\n position: absolute;\n height: 10px;\n width: 10px;\n -webkit-transform: rotate(45deg) translate(-7px);\n -ms-transform: rotate(45deg) translate(-7px);\n transform: rotate(45deg) translate(-7px);\n border-left: 1px solid rgba(0, 0, 0, 0.1);\n background: white;\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n @media (min-width: 1024px) {\n ", "\n }\n }\n"])), function (_a) {
|
|
9
|
+
var placement = _a.placement;
|
|
10
|
+
return "".concat(placement, ": -5px");
|
|
11
|
+
}, function (_a) {
|
|
12
|
+
var placement = _a.placement;
|
|
13
|
+
return "".concat(placement, ": 15px");
|
|
14
|
+
});
|
|
15
|
+
export var LanguageSwitchWrap = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n width: fit-content;\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n width: fit-content;\n"])));
|
|
10
16
|
export var DownImg = styled.img(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-left: 15px;\n display: inline-block;\n width: 8px;\n height: 8px;\n"], ["\n margin-left: 15px;\n display: inline-block;\n width: 8px;\n height: 8px;\n"])));
|
|
11
17
|
export var LanguageFlagWrap = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n cursor: pointer;\n position: relative;\n display: grid;\n grid-template-columns: 20px auto;\n align-items: center;\n"], ["\n cursor: pointer;\n position: relative;\n display: grid;\n grid-template-columns: 20px auto;\n align-items: center;\n"])));
|
|
12
18
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -4,3 +4,10 @@ export type LanguageItem = {
|
|
|
4
4
|
icon: ReactElement;
|
|
5
5
|
title: string;
|
|
6
6
|
};
|
|
7
|
+
export type Placement = 'left' | 'right';
|
|
8
|
+
export type LanguageSwitchProps = {
|
|
9
|
+
activeLanguage?: string;
|
|
10
|
+
onLanguageChange: (languageCode: string) => void;
|
|
11
|
+
languageItems?: LanguageItem[];
|
|
12
|
+
placement?: Placement;
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MenuItemType } from './types';
|
|
3
|
+
type Props = MenuItemType & {
|
|
4
|
+
isSubitem?: boolean;
|
|
5
|
+
isCompact: boolean;
|
|
6
|
+
lightMode?: boolean;
|
|
7
|
+
separator?: boolean;
|
|
8
|
+
isLeftMenuOpen?: boolean;
|
|
9
|
+
onCloseLeftMenu?: () => void;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: React.MemoExoticComponent<({ icon, title, link, items, id, isSubitem, isCompact, lightMode, separator, isLeftMenuOpen, onCloseLeftMenu }: Props) => JSX.Element | null>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import { memo, useCallback, useMemo, useRef } from 'react';
|
|
14
|
+
import { matchPath } from 'react-router';
|
|
15
|
+
import { ItemLinkWrap, ItemIcon, ItemDropdownArrow, SubItemsWrap, OverflowWithEllipsis, MenuItemContainer, ItemLabel, ItemsSeparator } from './styles';
|
|
16
|
+
import SubitemTooltip from './components/SubitemTooltip';
|
|
17
|
+
import { useLeftMenuContext } from './context/useLeftMenuContext';
|
|
18
|
+
import { Paragraph3, Paragraph5 } from '../../Elements/Typography/Typography';
|
|
19
|
+
import Icon from '../../Elements/Icon/Icon';
|
|
20
|
+
import useOutSideHover from './hooks/useOutsideHover';
|
|
21
|
+
var removeOptionalEnd = /\?$/;
|
|
22
|
+
var MenuItem = function (_a) {
|
|
23
|
+
var icon = _a.icon, title = _a.title, _b = _a.link, link = _b === void 0 ? '' : _b, items = _a.items, id = _a.id, isSubitem = _a.isSubitem, isCompact = _a.isCompact, _c = _a.lightMode, lightMode = _c === void 0 ? false : _c, _d = _a.separator, separator = _d === void 0 ? false : _d, isLeftMenuOpen = _a.isLeftMenuOpen, onCloseLeftMenu = _a.onCloseLeftMenu;
|
|
24
|
+
var hasChildren = useMemo(function () { return items && (items === null || items === void 0 ? void 0 : items.length) > 0; }, [items]);
|
|
25
|
+
var _e = useLeftMenuContext(), expandedItem = _e.expandedItem, expandItem = _e.expandItem;
|
|
26
|
+
var isExpanded = expandedItem === id;
|
|
27
|
+
var toggleChildren = useCallback(function () {
|
|
28
|
+
hasChildren && expandItem(isExpanded ? null : id);
|
|
29
|
+
!hasChildren && !lightMode && onCloseLeftMenu && onCloseLeftMenu();
|
|
30
|
+
}, [hasChildren, expandItem, isExpanded, id, lightMode, onCloseLeftMenu]);
|
|
31
|
+
var linkProps = useMemo(function () { return (link.startsWith('https://') ? { to: { pathname: link }, target: '_blank' } : { to: link }); }, [link]);
|
|
32
|
+
var Title = isCompact ? Paragraph5 : Paragraph3;
|
|
33
|
+
var listExpandedItems = isExpanded && !isCompact;
|
|
34
|
+
var parentRef = useRef(null);
|
|
35
|
+
var _f = useOutSideHover({ parentRef: parentRef }), childRef = _f.ref, isHovering = _f.isHovering, handleMouseOver = _f.handleMouseOver;
|
|
36
|
+
var itemLinkWrapClassName = !isSubitem ? 'toplevel' : 'nestedlevel';
|
|
37
|
+
if (isExpanded) {
|
|
38
|
+
itemLinkWrapClassName += ' expanded';
|
|
39
|
+
}
|
|
40
|
+
if (separator) {
|
|
41
|
+
itemLinkWrapClassName += ' separator';
|
|
42
|
+
}
|
|
43
|
+
var isActive = useCallback(function (match, location) {
|
|
44
|
+
var childSelected = !!(items === null || items === void 0 ? void 0 : items.find(function (item) { var _a; return ((_a = item.link) === null || _a === void 0 ? void 0 : _a.replace(removeOptionalEnd, '')) === location.pathname; }));
|
|
45
|
+
var isActive = !!matchPath(location.pathname, { path: match === null || match === void 0 ? void 0 : match.path });
|
|
46
|
+
// partial match helps to match paths with parameters which are not matched by matchPath above
|
|
47
|
+
var partialMatch = location.pathname.startsWith(link.slice(0, -1)) && location.pathname.includes('/settings/');
|
|
48
|
+
return isActive || childSelected || partialMatch;
|
|
49
|
+
}, [items, link]);
|
|
50
|
+
return (_jsxs(_Fragment, { children: [separator && _jsx(ItemsSeparator, {}), _jsxs(MenuItemContainer, { ref: parentRef, "$isCompact": isCompact, "$lightMode": lightMode, hasChildren: hasChildren, isHovering: isHovering, children: [_jsxs(ItemLinkWrap, __assign({}, linkProps, { onMouseOver: handleMouseOver, exact: true, activeClassName: hasChildren ? 'selected' : undefined, onClick: toggleChildren, "$isCompact": isCompact, className: itemLinkWrapClassName,
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
isActive: isActive, "$lightMode": lightMode, children: [_jsxs(ItemLabel, { "$isCompact": isCompact, isSubitem: isSubitem, children: [!isSubitem && icon && (_jsx(ItemIcon, { className: "mainIcon", "$isCompact": isCompact, children: typeof icon === 'string' ? _jsx(Icon, { icon: icon, fill: "none" }) : icon })), _jsx(Title, { variant: "semiBold", mt: 0, mb: 0, children: _jsx(OverflowWithEllipsis, { children: title }) })] }), !isCompact && hasChildren && _jsx(ItemDropdownArrow, { icon: "goDown", "$lightMode": lightMode })] })), isHovering && isCompact && hasChildren && !listExpandedItems && (_jsx(SubitemTooltip, { items: items, childRef: childRef, parentRef: parentRef, isLeftMenuOpen: isLeftMenuOpen, onCloseLeftMenu: onCloseLeftMenu, lightMode: lightMode }))] }), hasChildren && listExpandedItems && (_jsx(SubItemsWrap, { children: items === null || items === void 0 ? void 0 : items.map(function (item, index) { return (_jsx(MenuItem, __assign({ isCompact: isCompact, lightMode: lightMode }, item, { onCloseLeftMenu: onCloseLeftMenu, isSubitem: true }), "".concat(index))); }) }))] }));
|
|
53
|
+
};
|
|
54
|
+
export default memo(MenuItem);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import FooterRow from './components/Footer';
|
|
14
|
+
import MenuItem from './MenuItem';
|
|
15
|
+
import { LeftMenuProvider } from './context/LeftMenuContext';
|
|
16
|
+
import { HamburgerMenu } from './components/HamburgerMenu';
|
|
17
|
+
import { useClickOutside } from '../Modal/hooks/useClickOutside';
|
|
18
|
+
import { TopLevelWrap, ScrollWrap, BodyWrap, Overlay } from './styles';
|
|
19
|
+
var SideMenu = function (_a) {
|
|
20
|
+
var menuItems = _a.menuItems, isCompact = _a.isCompact, setIsCompact = _a.setIsCompact, isLeftMenuOpen = _a.isLeftMenuOpen, onCloseLeftMenu = _a.onCloseLeftMenu, _b = _a.variant, variant = _b === void 0 ? 'dark' : _b, children = _a.children;
|
|
21
|
+
var lightMode = variant === 'light';
|
|
22
|
+
var pickerRef = useClickOutside({ onClose: onCloseLeftMenu });
|
|
23
|
+
return (_jsxs(LeftMenuProvider, { children: [_jsxs(TopLevelWrap, { isCompact: isCompact, isLeftMenuOpen: isLeftMenuOpen, ref: pickerRef, lightMode: lightMode, children: [_jsx(HamburgerMenu, { isLeftMenuOpen: isLeftMenuOpen, onClick: onCloseLeftMenu }), _jsx(ScrollWrap, { children: _jsxs(BodyWrap, { isCompact: isCompact, children: [menuItems.map(function (item, index) { return (_jsx(MenuItem, __assign({ isCompact: isCompact, isLeftMenuOpen: isLeftMenuOpen, onCloseLeftMenu: onCloseLeftMenu, lightMode: lightMode, separator: !!item.separator }, item), "".concat(item.id, "-").concat(index))); }), children] }) }), _jsx(FooterRow, { isCompact: isCompact, setIsCompact: setIsCompact, lightMode: lightMode })] }), _jsx(Overlay, {})] }));
|
|
24
|
+
};
|
|
25
|
+
export default SideMenu;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const FooterWrap: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|
|
2
|
+
isCompact: boolean;
|
|
3
|
+
}, never>;
|
|
4
|
+
export declare const SizeToggle: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|
|
5
|
+
isCompact: boolean;
|
|
6
|
+
$lightMode?: boolean | undefined;
|
|
7
|
+
}, never>;
|
|
8
|
+
type Props = {
|
|
9
|
+
isCompact: boolean;
|
|
10
|
+
setIsCompact?: (compact: boolean) => void;
|
|
11
|
+
lightMode?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const MenuFooter: ({ isCompact, setIsCompact, lightMode }: Props) => JSX.Element;
|
|
14
|
+
export default MenuFooter;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useCallback } from 'react';
|
|
7
|
+
import styled, { css } from '@xstyled/styled-components';
|
|
8
|
+
import { th } from '@xstyled/system';
|
|
9
|
+
import { MenuItems } from '../../../Elements/Icon/icons/MenuItems';
|
|
10
|
+
import { Paragraph4 } from '../../../Elements/Typography';
|
|
11
|
+
import { Trans } from '@lingui/react';
|
|
12
|
+
export var FooterWrap = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n height: 24px;\n width: 100%;\n margin-bottom: 24px;\n justify-content: ", ";\n padding-left: ", ";\n"], ["\n display: flex;\n align-items: center;\n height: 24px;\n width: 100%;\n margin-bottom: 24px;\n justify-content: ", ";\n padding-left: ", ";\n"])), function (props) { return (props.isCompact ? 'center' : 'flex-start'); }, function (props) { return (props.isCompact ? '0' : '22px'); });
|
|
13
|
+
export var SizeToggle = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: none;\n @media (min-width: 1024px) {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n color: ", ";\n font-size: 11px;\n & svg {\n transform: ", ";\n ", "\n\n & > path {\n stroke: ", ";\n }\n }\n }\n"], ["\n display: none;\n @media (min-width: 1024px) {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n color: ", ";\n font-size: 11px;\n & svg {\n transform: ", ";\n ", "\n\n & > path {\n stroke: ", ";\n }\n }\n }\n"])), function (_a) {
|
|
14
|
+
var $lightMode = _a.$lightMode;
|
|
15
|
+
return ($lightMode ? th.color('typoPrimary') : th.color('gray'));
|
|
16
|
+
}, function (props) { return (props.isCompact ? 'rotate(180deg)' : 'rotate(0deg)'); }, function (_a) {
|
|
17
|
+
var $lightMode = _a.$lightMode;
|
|
18
|
+
return $lightMode && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n fill: ", ";\n "], ["\n fill: ", ";\n "])), th.color('neutral20'));
|
|
19
|
+
}, th.color('lightGray5'));
|
|
20
|
+
var MenuFooter = function (_a) {
|
|
21
|
+
var isCompact = _a.isCompact, setIsCompact = _a.setIsCompact, lightMode = _a.lightMode;
|
|
22
|
+
var toggleIsCompact = useCallback(function () {
|
|
23
|
+
setIsCompact && setIsCompact(!isCompact);
|
|
24
|
+
}, [setIsCompact, isCompact]);
|
|
25
|
+
return (_jsx(FooterWrap, { isCompact: isCompact, children: _jsxs(SizeToggle, { onClick: toggleIsCompact, isCompact: isCompact, "$lightMode": lightMode, children: [_jsx(MenuItems, { stroke: "none", width: "24px" }), !isCompact && (_jsx(Paragraph4, { ml: 2, variant: "semiBold", children: _jsx(Trans, { id: "footer.collapse", message: "Collapse" }) }))] }) }));
|
|
26
|
+
};
|
|
27
|
+
export default MenuFooter;
|
|
28
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { css, x } from '@xstyled/styled-components';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import { HamburgerMenu as HamburgerMenuIcon } from '../../../Elements/Icon/icons/HamburgerMenu';
|
|
9
|
+
import { MobileCancel } from '../../../Elements/Icon/icons/MobileCancel';
|
|
10
|
+
import { th } from '@xstyled/system';
|
|
11
|
+
import { useTheme } from '@xstyled/styled-components';
|
|
12
|
+
var HamburgerMenuWrapper = styled(x.div)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 36px;\n height: 36px;\n border-radius: 70px;\n background-color: ", ";\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-shadow: ", ";\n &:hover {\n cursor: pointer;\n }\n\n ", ";\n\n @media (min-width: 1024px) {\n display: none;\n }\n"], ["\n width: 36px;\n height: 36px;\n border-radius: 70px;\n background-color: ", ";\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-shadow: ", ";\n &:hover {\n cursor: pointer;\n }\n\n ", ";\n\n @media (min-width: 1024px) {\n display: none;\n }\n"])), th.color('neutral20'), th.shadow('dropShadow'), function (_a) {
|
|
13
|
+
var isLeftMenuOpen = _a.isLeftMenuOpen;
|
|
14
|
+
return isLeftMenuOpen
|
|
15
|
+
? css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n left: 92%;\n top: 7px;\n z-index: 6;\n "], ["\n position: absolute;\n left: 92%;\n top: 7px;\n z-index: 6;\n "]))) : css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n & > svg > path {\n stroke: ", ";\n }\n "], ["\n & > svg > path {\n stroke: ", ";\n }\n "])), th.color('blue2'));
|
|
16
|
+
});
|
|
17
|
+
export var HamburgerMenu = function (_a) {
|
|
18
|
+
var isLeftMenuOpen = _a.isLeftMenuOpen, onClick = _a.onClick;
|
|
19
|
+
var theme = useTheme();
|
|
20
|
+
var neutralColor = th.color('neutral20')({ theme: theme });
|
|
21
|
+
var dispalyedIcon = isLeftMenuOpen ? (_jsx(MobileCancel, { fill: neutralColor })) : (_jsx(HamburgerMenuIcon, { fill: neutralColor, stroke: 'none' }));
|
|
22
|
+
return (_jsx(HamburgerMenuWrapper, { mr: 3, onClick: onClick, isLeftMenuOpen: !!isLeftMenuOpen, children: dispalyedIcon }));
|
|
23
|
+
};
|
|
24
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { MenuItemType } from '../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
itemsOpen?: number;
|
|
5
|
+
childRef: MutableRefObject<HTMLElement | null>;
|
|
6
|
+
parentRef: MutableRefObject<HTMLElement | null>;
|
|
7
|
+
items: MenuItemType[] | undefined;
|
|
8
|
+
isLeftMenuOpen?: boolean;
|
|
9
|
+
onCloseLeftMenu?: () => void;
|
|
10
|
+
lightMode?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const SubitemTooltip: ({ items, childRef, parentRef, isLeftMenuOpen, onCloseLeftMenu, lightMode }: Props) => JSX.Element;
|
|
13
|
+
export default SubitemTooltip;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { useMemo } from 'react';
|
|
18
|
+
import { Popper } from 'react-popper';
|
|
19
|
+
import styled from 'styled-components';
|
|
20
|
+
import Portal from '../../../Elements/Portal';
|
|
21
|
+
import { H6 } from '../../../Elements/Typography/Typography';
|
|
22
|
+
import { ItemLinkWrap, TooltipWrap, TooltipItemLabel } from '../styles';
|
|
23
|
+
var TooltipItem = function (_a) {
|
|
24
|
+
var title = _a.title, _b = _a.link, link = _b === void 0 ? '' : _b, lightMode = _a.lightMode;
|
|
25
|
+
var linkProps = useMemo(function () {
|
|
26
|
+
return link.startsWith('https://') ? { to: { pathname: link }, target: '_blank' } : { to: link };
|
|
27
|
+
}, [link]);
|
|
28
|
+
return (_jsx(ItemLinkWrap, __assign({}, linkProps, { exact: true, "$lightMode": lightMode, children: _jsx(TooltipItemLabel, { children: _jsx(H6, { variant: "medium", children: title }) }) })));
|
|
29
|
+
};
|
|
30
|
+
var PopoverWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n z-index: 5;\n display: ", ";\n @media (min-width: 1024px) {\n display: block;\n }\n"], ["\n z-index: 5;\n display: ", ";\n @media (min-width: 1024px) {\n display: block;\n }\n"])), function (_a) {
|
|
31
|
+
var isLeftMenuOpen = _a.isLeftMenuOpen;
|
|
32
|
+
return (isLeftMenuOpen ? 'block' : 'none');
|
|
33
|
+
});
|
|
34
|
+
var SubitemTooltip = function (_a) {
|
|
35
|
+
var items = _a.items, childRef = _a.childRef, parentRef = _a.parentRef, isLeftMenuOpen = _a.isLeftMenuOpen, onCloseLeftMenu = _a.onCloseLeftMenu, lightMode = _a.lightMode;
|
|
36
|
+
return (_jsx(Portal, { children: _jsx(Popper, { innerRef: childRef, referenceElement: parentRef.current, placement: "right-start", children: function (_a) {
|
|
37
|
+
var ref = _a.ref, style = _a.style;
|
|
38
|
+
return (_jsx(PopoverWrapper, { ref: ref, style: style, onClick: onCloseLeftMenu, isLeftMenuOpen: isLeftMenuOpen, children: _jsx(TooltipWrap, { "$lightMode": lightMode, children: items === null || items === void 0 ? void 0 : items.map(function (item, index) { return (_jsx(TooltipItem, __assign({}, item, { lightMode: lightMode }), "".concat(index))); }) }) }));
|
|
39
|
+
} }) }));
|
|
40
|
+
};
|
|
41
|
+
export default SubitemTooltip;
|
|
42
|
+
var templateObject_1;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type LeftMenuContextType = {
|
|
3
|
+
expandedItem: string | null;
|
|
4
|
+
expandItem: (item: string | null) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const LeftMenuContext: React.Context<LeftMenuContextType | null>;
|
|
7
|
+
type LeftMenuProviderProps = {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
defaultItemSelected?: string | null;
|
|
10
|
+
};
|
|
11
|
+
export declare const LeftMenuProvider: ({ children, defaultItemSelected }: LeftMenuProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useCallback, useMemo, useState } from 'react';
|
|
3
|
+
export var LeftMenuContext = createContext(null);
|
|
4
|
+
export var LeftMenuProvider = function (_a) {
|
|
5
|
+
var children = _a.children, _b = _a.defaultItemSelected, defaultItemSelected = _b === void 0 ? null : _b;
|
|
6
|
+
var _c = useState(defaultItemSelected), expandedItem = _c[0], setExpandedItem = _c[1];
|
|
7
|
+
var expandItem = useCallback(function (item) {
|
|
8
|
+
setExpandedItem(item);
|
|
9
|
+
}, []);
|
|
10
|
+
var value = useMemo(function () { return ({
|
|
11
|
+
expandedItem: expandedItem,
|
|
12
|
+
expandItem: expandItem,
|
|
13
|
+
}); }, [expandedItem, expandItem]);
|
|
14
|
+
return _jsx(LeftMenuContext.Provider, { value: value, children: children });
|
|
15
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { LeftMenuContext } from './LeftMenuContext';
|
|
3
|
+
export var useLeftMenuContext = function () {
|
|
4
|
+
var context = useContext(LeftMenuContext);
|
|
5
|
+
if (!context)
|
|
6
|
+
throw new Error('useLeftMenuContext context must be use inside LeftMenuProvider');
|
|
7
|
+
return context;
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
parentRef: MutableRefObject<HTMLDivElement | null | undefined>;
|
|
4
|
+
}
|
|
5
|
+
interface ReturnType {
|
|
6
|
+
isHovering: boolean;
|
|
7
|
+
handleMouseOver: () => void;
|
|
8
|
+
ref: MutableRefObject<HTMLElement | null>;
|
|
9
|
+
}
|
|
10
|
+
declare const useOutSideHover: ({ parentRef }: Props) => ReturnType;
|
|
11
|
+
export default useOutSideHover;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
var useOutSideHover = function (_a) {
|
|
3
|
+
var parentRef = _a.parentRef;
|
|
4
|
+
var ref = useRef(null);
|
|
5
|
+
var _b = useState(false), isHovering = _b[0], setIsHovering = _b[1];
|
|
6
|
+
var handleMouseOver = useCallback(function () {
|
|
7
|
+
setIsHovering(true);
|
|
8
|
+
}, []);
|
|
9
|
+
var handleMouseOut = useCallback(function (e) {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
if (!((_a = parentRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) && !((_b = ref.current) === null || _b === void 0 ? void 0 : _b.contains(e.target))) {
|
|
12
|
+
setIsHovering(false);
|
|
13
|
+
}
|
|
14
|
+
}, [parentRef]);
|
|
15
|
+
useEffect(function () {
|
|
16
|
+
document.addEventListener('mouseover', handleMouseOut);
|
|
17
|
+
return function () {
|
|
18
|
+
document.removeEventListener('mouseover', handleMouseOut);
|
|
19
|
+
};
|
|
20
|
+
}, [handleMouseOut]);
|
|
21
|
+
return { isHovering: isHovering, handleMouseOver: handleMouseOver, ref: ref };
|
|
22
|
+
};
|
|
23
|
+
export default useOutSideHover;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ menuItems, isCompact, setIsCompact, isLeftMenuOpen, onCloseLeftMenu, variant, children }: import("../types").SideMenuProps) => JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
argTypes: {};
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export declare const Dark: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const DarkCompact: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const Light: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const LightCompact: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import SideMenu from '../';
|
|
3
|
+
import { menuItems } from './menuItems';
|
|
4
|
+
import { LinguiContainer } from '../../../utils/LinguiContainer';
|
|
5
|
+
var meta = {
|
|
6
|
+
title: 'Blocks/SideMenu',
|
|
7
|
+
component: SideMenu,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
argTypes: {}
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export var Dark = function () {
|
|
13
|
+
return (_jsx(LinguiContainer, { children: _jsx(SideMenu, { variant: "dark", isCompact: false, menuItems: menuItems }) }));
|
|
14
|
+
};
|
|
15
|
+
export var DarkCompact = function () {
|
|
16
|
+
return (_jsx(LinguiContainer, { children: _jsx(SideMenu, { variant: "dark", isCompact: true, menuItems: menuItems }) }));
|
|
17
|
+
};
|
|
18
|
+
export var Light = function () {
|
|
19
|
+
return (_jsx(LinguiContainer, { children: _jsx(SideMenu, { variant: "light", isCompact: false, menuItems: menuItems }) }));
|
|
20
|
+
};
|
|
21
|
+
export var LightCompact = function () {
|
|
22
|
+
return (_jsx(LinguiContainer, { children: _jsx(SideMenu, { variant: "light", isCompact: true, menuItems: menuItems }) }));
|
|
23
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const menuItems: ({
|
|
2
|
+
title: string;
|
|
3
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
link: string;
|
|
5
|
+
id: string;
|
|
6
|
+
items?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
title: string;
|
|
9
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
link: string;
|
|
11
|
+
id: string;
|
|
12
|
+
items: {
|
|
13
|
+
title: string;
|
|
14
|
+
link: string;
|
|
15
|
+
id: string;
|
|
16
|
+
}[];
|
|
17
|
+
})[];
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Complaint, Income, Transfer, Return, Expeditions, Inventory, Products } from '../../../Elements/Icon/icons';
|
|
3
|
+
export var menuItems = [
|
|
4
|
+
{
|
|
5
|
+
title: 'Products',
|
|
6
|
+
icon: _jsx(Products, {}),
|
|
7
|
+
link: '/',
|
|
8
|
+
id: 'product'
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
title: 'Inventory',
|
|
12
|
+
icon: _jsx(Inventory, {}),
|
|
13
|
+
link: '/inventory',
|
|
14
|
+
id: 'inventory',
|
|
15
|
+
items: [
|
|
16
|
+
{
|
|
17
|
+
title: 'Stocks',
|
|
18
|
+
link: '/inventory/stock',
|
|
19
|
+
id: 'stock'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
title: 'Reservations',
|
|
23
|
+
link: '/inventory/reservations',
|
|
24
|
+
id: 'reservations'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: 'Movements',
|
|
28
|
+
link: '/inventory/movements',
|
|
29
|
+
id: 'movements'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: 'Inventory movements',
|
|
33
|
+
link: '/inventory/inventory-movements',
|
|
34
|
+
id: 'inventoryMovements'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: 'Internal inv. movements',
|
|
38
|
+
link: '/inventory/internal-inv-movements',
|
|
39
|
+
id: 'internalInvMovements'
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: 'Expeditions',
|
|
45
|
+
icon: _jsx(Expeditions, {}),
|
|
46
|
+
link: '/expeditions',
|
|
47
|
+
id: 'expeditions',
|
|
48
|
+
items: [
|
|
49
|
+
{
|
|
50
|
+
title: 'Expeditions',
|
|
51
|
+
link: '/expeditions',
|
|
52
|
+
id: 'expeditionsChild'
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
title: 'Outbound receipts',
|
|
56
|
+
link: '/expeditions/outbound-receipts',
|
|
57
|
+
id: 'outboundReceipts'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
title: 'Missing goods',
|
|
61
|
+
link: '/expeditions/missing-goods',
|
|
62
|
+
id: 'missingGoods'
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
title: 'Inbound',
|
|
68
|
+
icon: _jsx(Income, {}),
|
|
69
|
+
link: '/inbound',
|
|
70
|
+
id: 'inbound',
|
|
71
|
+
items: [
|
|
72
|
+
{
|
|
73
|
+
title: 'Stock advices',
|
|
74
|
+
link: '/inbound/stock-advices',
|
|
75
|
+
id: 'stockAdvices'
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
title: 'Inbound receipt',
|
|
79
|
+
link: '/inbound/inbound-receipt',
|
|
80
|
+
id: 'inboundReceipts'
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
title: 'Returns',
|
|
86
|
+
icon: _jsx(Return, {}),
|
|
87
|
+
link: '/returns',
|
|
88
|
+
id: 'returns'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'Transfers',
|
|
92
|
+
icon: _jsx(Transfer, {}),
|
|
93
|
+
link: '/transfers',
|
|
94
|
+
id: 'transfers'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
title: 'Claims',
|
|
98
|
+
icon: _jsx(Complaint, {}),
|
|
99
|
+
link: '/claims',
|
|
100
|
+
id: 'claims'
|
|
101
|
+
}
|
|
102
|
+
];
|