@tap-payments/os-micro-frontend-shared 0.0.31-dev-shared-migration-v1 → 0.0.33-shared-components-refactor-V1
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/build/components/DropdownMenu/index.d.ts +1 -0
- package/build/components/DropdownMenu/index.js +1 -0
- package/build/components/ExpandableSideBar/ExpandableSideBar.d.ts +1 -1
- package/build/components/ExpandableSideBar/ExpandableSideBar.js +8 -6
- package/build/components/ExpandableSideBar/style.js +1 -1
- package/build/components/ExpandableSideBar/type.d.ts +2 -1
- package/build/components/Toolbar/index.d.ts +1 -1
- package/build/components/Toolbar/index.js +1 -1
- package/build/components/index.d.ts +2 -2
- package/build/components/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ExpandableSideBarProps } from './type';
|
|
3
|
-
declare function ExpandableSideBar({ sections, isMaximized, onClick, activeSection }: ExpandableSideBarProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function ExpandableSideBar({ sections, isMaximized, onClick, activeSection, activeSubSection }: ExpandableSideBarProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof ExpandableSideBar>;
|
|
5
5
|
export default _default;
|
|
@@ -2,9 +2,10 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import { SideBar, Content, SubMenuLink, MenuHeader } from './style';
|
|
4
4
|
import AccordionAdapter from '../AccordionAdapter';
|
|
5
|
-
function ExpandableSideBar({ sections, isMaximized, onClick, activeSection }) {
|
|
6
|
-
var _a;
|
|
5
|
+
function ExpandableSideBar({ sections, isMaximized, onClick, activeSection, activeSubSection }) {
|
|
6
|
+
var _a, _b, _c, _d;
|
|
7
7
|
const currentActiveSection = activeSection || ((_a = sections === null || sections === void 0 ? void 0 : sections[0]) === null || _a === void 0 ? void 0 : _a.id);
|
|
8
|
+
const currentActiveSubSection = activeSubSection || ((_d = (_c = (_b = sections === null || sections === void 0 ? void 0 : sections[0]) === null || _b === void 0 ? void 0 : _b.subSections) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.id);
|
|
8
9
|
return (_jsx(SideBar, Object.assign({ isMaximized: isMaximized }, { children: _jsx(Content, { children: sections === null || sections === void 0 ? void 0 : sections.map((s) => {
|
|
9
10
|
var _a;
|
|
10
11
|
return (_jsx(AccordionAdapter, Object.assign({ defaultExpanded: currentActiveSection === s.id, summarySx: {
|
|
@@ -22,12 +23,13 @@ function ExpandableSideBar({ sections, isMaximized, onClick, activeSection }) {
|
|
|
22
23
|
borderRadius: '4px !important',
|
|
23
24
|
},
|
|
24
25
|
}, Header: _jsx(MenuHeader, Object.assign({ onClick: () => {
|
|
25
|
-
|
|
26
|
+
var _a, _b;
|
|
27
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(s.id, (_b = (_a = s.subSections) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id);
|
|
26
28
|
}, isActive: currentActiveSection === s.id }, { children: s.title }), s.id) }, { children: _jsx(_Fragment, { children: (_a = s.subSections) === null || _a === void 0 ? void 0 : _a.map((ss) => {
|
|
27
29
|
return (_jsx(SubMenuLink, Object.assign({ onClick: () => {
|
|
28
|
-
onClick === null || onClick === void 0 ? void 0 : onClick(s);
|
|
29
|
-
}, isActive:
|
|
30
|
-
}) }) })));
|
|
30
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(s.id, ss.id);
|
|
31
|
+
}, isActive: currentActiveSubSection === ss.id }, { children: ss.title }), `${s.id}-${ss.id}`));
|
|
32
|
+
}) }) }), `${s.id}`));
|
|
31
33
|
}) }) })));
|
|
32
34
|
}
|
|
33
35
|
export default memo(ExpandableSideBar);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Box from '@mui/material/Box';
|
|
2
2
|
import { alpha, styled } from '@mui/material/styles';
|
|
3
|
+
import { LEFT_SIDEBAR } from '../AppWindowWrapper';
|
|
3
4
|
import { TITLE_BAR_HEIGHT } from './constant';
|
|
4
|
-
import { LEFT_SIDEBAR } from '../index.js';
|
|
5
5
|
export const SideBar = styled(Box, {
|
|
6
6
|
shouldForwardProp: (props) => props !== 'isMaximized',
|
|
7
7
|
})(({ theme, isMaximized }) => ({
|
|
@@ -11,6 +11,7 @@ export interface Section {
|
|
|
11
11
|
export interface ExpandableSideBarProps {
|
|
12
12
|
sections: Section[];
|
|
13
13
|
isMaximized?: boolean;
|
|
14
|
-
onClick
|
|
14
|
+
onClick: (sectionId: string, subSectionId?: string) => void;
|
|
15
15
|
activeSection?: string;
|
|
16
|
+
activeSubSection?: string;
|
|
16
17
|
}
|
|
@@ -19,14 +19,14 @@ export { default as SimpleDialog, type SimpleDialogProps } from './SimpleDialog'
|
|
|
19
19
|
export { default as SearchButton } from './SearchButton';
|
|
20
20
|
export { default as Loaders } from './Loaders';
|
|
21
21
|
export { default as ExportButton } from './ExportButton';
|
|
22
|
-
export { default as DropdownMenu, type IProps, type MenuItemI } from './DropdownMenu';
|
|
22
|
+
export { default as DropdownMenu, type IProps, type MenuItemI, StyledIconForDropDown, StyledMenuTitle, StyledOption, StyledSelect, StyledSelectComponent, } from './DropdownMenu';
|
|
23
23
|
export { default as DockButton, type DockButtonProps, type DockButtonWrapperProps } from './DockButton';
|
|
24
24
|
export { default as DateButton } from './DateButton';
|
|
25
25
|
export { default as WindowSideBar, TITLE_BAR_HEIGHT } from './WindowSideBar';
|
|
26
26
|
export { default as WindowAppIcon } from './WindowAppIcon';
|
|
27
27
|
export { default as Window } from './Window';
|
|
28
28
|
export * from './ToolbarIcon';
|
|
29
|
-
export { default as Toolbar, type ToolbarProps } from './Toolbar';
|
|
29
|
+
export { default as Toolbar, type ToolbarProps, StyledHeaderWrapper, StyledHeaderWrapperStyled } from './Toolbar';
|
|
30
30
|
export { default as ToggleButtons, type ToggleButtonProps, type ToggleButtonsProps, type ToggleOption, type ToggleOptionKey } from './ToggleButtons';
|
|
31
31
|
export { default as Text } from './Text';
|
|
32
32
|
export * from './TableCells';
|
|
@@ -19,14 +19,14 @@ export { default as SimpleDialog } from './SimpleDialog';
|
|
|
19
19
|
export { default as SearchButton } from './SearchButton';
|
|
20
20
|
export { default as Loaders } from './Loaders';
|
|
21
21
|
export { default as ExportButton } from './ExportButton';
|
|
22
|
-
export { default as DropdownMenu } from './DropdownMenu';
|
|
22
|
+
export { default as DropdownMenu, StyledIconForDropDown, StyledMenuTitle, StyledOption, StyledSelect, StyledSelectComponent, } from './DropdownMenu';
|
|
23
23
|
export { default as DockButton } from './DockButton';
|
|
24
24
|
export { default as DateButton } from './DateButton';
|
|
25
25
|
export { default as WindowSideBar, TITLE_BAR_HEIGHT } from './WindowSideBar';
|
|
26
26
|
export { default as WindowAppIcon } from './WindowAppIcon';
|
|
27
27
|
export { default as Window } from './Window';
|
|
28
28
|
export * from './ToolbarIcon';
|
|
29
|
-
export { default as Toolbar } from './Toolbar';
|
|
29
|
+
export { default as Toolbar, StyledHeaderWrapper, StyledHeaderWrapperStyled } from './Toolbar';
|
|
30
30
|
export { default as ToggleButtons } from './ToggleButtons';
|
|
31
31
|
export { default as Text } from './Text';
|
|
32
32
|
export * from './TableCells';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
3
|
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.33-shared-components-refactor-V1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"module": "build/index.js",
|