@tap-payments/os-micro-frontend-shared 0.0.31 → 0.0.33

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Tap Payments
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Tap Payments
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # os-micro-frontend-shared
2
-
3
- ## Publishing Workflow
4
-
5
- 1. Update version in package.json
6
- 2. Commit changes
7
- 3. Create and push a tag:
8
-
9
- ```bash
10
- npm version patch # or minor, major
11
- git push origin main --tags
12
- ```
1
+ # os-micro-frontend-shared
2
+
3
+ ## Publishing Workflow
4
+
5
+ 1. Update version in package.json
6
+ 2. Commit changes
7
+ 3. Create and push a tag:
8
+
9
+ ```bash
10
+ npm version patch # or minor, major
11
+ git push origin main --tags
12
+ ```
@@ -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
- onClick === null || onClick === void 0 ? void 0 : onClick(s);
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: currentActiveSection === s.id }, { children: ss.title }), s.id));
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?: (section: Section) => void;
14
+ onClick: (sectionId: string, subSectionId?: string) => void;
15
15
  activeSection?: string;
16
+ activeSubSection?: string;
16
17
  }
@@ -1,4 +1,4 @@
1
- export * from './ColumnFilter';
1
+ export { default as ColumnFilter, Inputs, List } from './ColumnFilter';
2
2
  export * from './EmptyList';
3
3
  export * from './ErrorList';
4
4
  export * from './TableFooter';
@@ -1,4 +1,4 @@
1
- export * from './ColumnFilter';
1
+ export { default as ColumnFilter, Inputs, List } from './ColumnFilter';
2
2
  export * from './EmptyList';
3
3
  export * from './ErrorList';
4
4
  export * from './TableFooter';
@@ -1,4 +1,5 @@
1
1
  import VirtualTable from './VirtualTable';
2
2
  export { default as VirtualTableWithCard } from './VirtualTableWithCard';
3
3
  export * from './components';
4
+ export { StyledCell } from './style';
4
5
  export default VirtualTable;
@@ -1,4 +1,5 @@
1
1
  import VirtualTable from './VirtualTable';
2
2
  export { default as VirtualTableWithCard } from './VirtualTableWithCard';
3
3
  export * from './components';
4
+ export { StyledCell } from './style';
4
5
  export default VirtualTable;
@@ -11,7 +11,7 @@ export { default as Checkbox } from './Checkbox';
11
11
  export { default as Dialog, DialogToolbar } from './Dialog';
12
12
  export { default as Tooltip } from './Tooltip';
13
13
  export * from './RFH';
14
- export { default as VirtualTable, TableRowLoading, TableHeader, TableLastItem, TableLoading, TableLoadingWithCard, TableNoData, TableNoDataWithCard, LastRowContent, ListItemWrapperWithCard, RowErrorState, StyledItemWrapper, TableRow, TableRowLoadingWithCard, TableRowWithCard, VirtualScrollInner, VirtualScrollList, VirtualScrollOuter, VirtualTableWithCard, Inputs, List, } from './VirtualTable';
14
+ export { default as VirtualTable, TableRowLoading, TableHeader, TableLastItem, TableLoading, TableLoadingWithCard, TableNoData, TableNoDataWithCard, LastRowContent, ListItemWrapperWithCard, RowErrorState, StyledItemWrapper, TableRow, TableRowLoadingWithCard, TableRowWithCard, VirtualScrollInner, VirtualScrollList, VirtualScrollOuter, VirtualTableWithCard, Inputs, List, ColumnFilter, StyledCell, } from './VirtualTable';
15
15
  export { default as Widget, ListItem, WidgetHeader, WidgetList } from './Widget';
16
16
  export { default as TapLogo } from './TapLogo';
17
17
  export { default as StatusButton, ChevronIcon, type ChevronIconProps, type StatusButtonIcon, type StatusButtonProps } from './StatusButton';
@@ -11,7 +11,7 @@ export { default as Checkbox } from './Checkbox';
11
11
  export { default as Dialog, DialogToolbar } from './Dialog';
12
12
  export { default as Tooltip } from './Tooltip';
13
13
  export * from './RFH';
14
- export { default as VirtualTable, TableRowLoading, TableHeader, TableLastItem, TableLoading, TableLoadingWithCard, TableNoData, TableNoDataWithCard, LastRowContent, ListItemWrapperWithCard, RowErrorState, StyledItemWrapper, TableRow, TableRowLoadingWithCard, TableRowWithCard, VirtualScrollInner, VirtualScrollList, VirtualScrollOuter, VirtualTableWithCard, Inputs, List, } from './VirtualTable';
14
+ export { default as VirtualTable, TableRowLoading, TableHeader, TableLastItem, TableLoading, TableLoadingWithCard, TableNoData, TableNoDataWithCard, LastRowContent, ListItemWrapperWithCard, RowErrorState, StyledItemWrapper, TableRow, TableRowLoadingWithCard, TableRowWithCard, VirtualScrollInner, VirtualScrollList, VirtualScrollOuter, VirtualTableWithCard, Inputs, List, ColumnFilter, StyledCell, } from './VirtualTable';
15
15
  export { default as Widget, ListItem, WidgetHeader, WidgetList } from './Widget';
16
16
  export { default as TapLogo } from './TapLogo';
17
17
  export { default as StatusButton, ChevronIcon } from './StatusButton';
package/package.json CHANGED
@@ -1,130 +1,130 @@
1
- {
2
- "name": "@tap-payments/os-micro-frontend-shared",
3
- "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.0.31",
5
- "type": "module",
6
- "main": "build/index.js",
7
- "module": "build/index.js",
8
- "types": "build/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "import": "./build/index.js",
12
- "require": "./build/index.js",
13
- "types": "./build/index.d.ts"
14
- },
15
- "./constants": {
16
- "import": "./build/constants/index.js",
17
- "require": "./build/constants/index.js",
18
- "types": "./build/constants/index.d.ts"
19
- },
20
- "./components": {
21
- "import": "./build/components/index.js",
22
- "require": "./build/components/index.js",
23
- "types": "./build/components/index.d.ts"
24
- },
25
- "./components/*": {
26
- "import": "./build/components/*/index.js",
27
- "require": "./build/components/*/index.js",
28
- "types": "./build/components/*/index.d.ts"
29
- },
30
- "./hooks": {
31
- "import": "./build/hooks/index.js",
32
- "require": "./build/hooks/index.js",
33
- "types": "./build/hooks/index.d.ts"
34
- },
35
- "./utils": {
36
- "import": "./build/utils/index.js",
37
- "require": "./build/utils/index.js",
38
- "types": "./build/utils/index.d.ts"
39
- },
40
- "./theme": {
41
- "import": "./build/theme/index.js",
42
- "require": "./build/theme/index.js",
43
- "types": "./build/theme/index.d.ts"
44
- },
45
- "./types": {
46
- "import": "./build/types/index.js",
47
- "require": "./build/types/index.js",
48
- "types": "./build/types/index.d.ts"
49
- }
50
- },
51
- "license": "MIT",
52
- "author": {
53
- "name": "Ahmed Sharkawy",
54
- "email": "a.elsharkawy@tap.company"
55
- },
56
- "files": [
57
- "build",
58
- "readme.md"
59
- ],
60
- "scripts": {
61
- "ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
62
- "push": "npm version patch --no-git-tag-version && npm run ts:build && npm publish --access public",
63
- "dev": "vite",
64
- "build": "tsc -b && vite build ",
65
- "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
66
- "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
67
- "lint": "eslint . --color",
68
- "lint:fix": "eslint src --fix --color",
69
- "preview": "vite preview",
70
- "prepare": "husky"
71
- },
72
- "dependencies": {
73
- "@emotion/react": "^11.11.0",
74
- "@emotion/styled": "^11.11.0",
75
- "@hookform/resolvers": "^3.3.1",
76
- "@mui/material": "^5.12.3",
77
- "@uiw/react-json-view": "^2.0.0-alpha.16",
78
- "axios": "^1.4.0",
79
- "dayjs": "^1.11.8",
80
- "framer-motion": "10.11.0",
81
- "i18next": "^22.4.15",
82
- "memoize-one": "^6.0.0",
83
- "re-resizable": "^6.9.9",
84
- "react": "^18.2.0",
85
- "react-currency-input-field": "^3.6.11",
86
- "react-dom": "^18.2.0",
87
- "react-draggable": "^4.4.6",
88
- "react-dropzone": "^14.2.3",
89
- "react-hook-form": "^7.45.4",
90
- "react-hot-toast": "^2.4.1",
91
- "react-i18next": "^12.2.2",
92
- "react-multi-date-picker": "^4.1.2",
93
- "react-router-dom": "^6.14.2",
94
- "react-virtualized-auto-sizer": "^1.0.20",
95
- "react-window": "^1.8.9",
96
- "react-window-infinite-loader": "^1.0.9",
97
- "react18-input-otp": "^1.1.4",
98
- "recharts": "^2.15.1"
99
- },
100
- "devDependencies": {
101
- "@eslint/js": "^9.17.0",
102
- "@testing-library/jest-dom": "^5.16.5",
103
- "@types/lodash": "^4.17.15",
104
- "@types/react": "^18.2.6",
105
- "@types/react-dom": "^18.3.5",
106
- "@types/react-virtualized-auto-sizer": "^1.0.8",
107
- "@types/react-window": "^1.8.5",
108
- "@types/react-window-infinite-loader": "^1.0.6",
109
- "@vitejs/plugin-react": "^4.3.4",
110
- "eslint": "^9.17.0",
111
- "eslint-plugin-react-hooks": "^5.0.0",
112
- "eslint-plugin-react-refresh": "^0.4.16",
113
- "globals": "^15.14.0",
114
- "husky": "^8.0.3",
115
- "lint-staged": "^13.2.2",
116
- "prettier": "^2.8.8",
117
- "tsc-alias": "^1.8.16",
118
- "typescript": "5.0.2",
119
- "typescript-eslint": "^8.18.2",
120
- "vite": "6.0.5",
121
- "vite-plugin-svgr": "^4.3.0",
122
- "vite-tsconfig-paths": "^4.2.0"
123
- },
124
- "lint-staged": {
125
- "src/**/*.{ts,tsx,json,js,jsx}": [
126
- "yarn run prettier:fix",
127
- "yarn run lint"
128
- ]
129
- }
130
- }
1
+ {
2
+ "name": "@tap-payments/os-micro-frontend-shared",
3
+ "description": "Shared components and utilities for Tap Payments micro frontends",
4
+ "version": "0.0.33",
5
+ "type": "module",
6
+ "main": "build/index.js",
7
+ "module": "build/index.js",
8
+ "types": "build/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./build/index.js",
12
+ "require": "./build/index.js",
13
+ "types": "./build/index.d.ts"
14
+ },
15
+ "./constants": {
16
+ "import": "./build/constants/index.js",
17
+ "require": "./build/constants/index.js",
18
+ "types": "./build/constants/index.d.ts"
19
+ },
20
+ "./components": {
21
+ "import": "./build/components/index.js",
22
+ "require": "./build/components/index.js",
23
+ "types": "./build/components/index.d.ts"
24
+ },
25
+ "./components/*": {
26
+ "import": "./build/components/*/index.js",
27
+ "require": "./build/components/*/index.js",
28
+ "types": "./build/components/*/index.d.ts"
29
+ },
30
+ "./hooks": {
31
+ "import": "./build/hooks/index.js",
32
+ "require": "./build/hooks/index.js",
33
+ "types": "./build/hooks/index.d.ts"
34
+ },
35
+ "./utils": {
36
+ "import": "./build/utils/index.js",
37
+ "require": "./build/utils/index.js",
38
+ "types": "./build/utils/index.d.ts"
39
+ },
40
+ "./theme": {
41
+ "import": "./build/theme/index.js",
42
+ "require": "./build/theme/index.js",
43
+ "types": "./build/theme/index.d.ts"
44
+ },
45
+ "./types": {
46
+ "import": "./build/types/index.js",
47
+ "require": "./build/types/index.js",
48
+ "types": "./build/types/index.d.ts"
49
+ }
50
+ },
51
+ "license": "MIT",
52
+ "author": {
53
+ "name": "Ahmed Sharkawy",
54
+ "email": "a.elsharkawy@tap.company"
55
+ },
56
+ "files": [
57
+ "build",
58
+ "readme.md"
59
+ ],
60
+ "scripts": {
61
+ "ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
62
+ "push": "npm version patch --no-git-tag-version && npm run ts:build && npm publish --access public",
63
+ "dev": "vite",
64
+ "build": "tsc -b && vite build ",
65
+ "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
66
+ "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
67
+ "lint": "eslint . --color",
68
+ "lint:fix": "eslint src --fix --color",
69
+ "preview": "vite preview",
70
+ "prepare": "husky"
71
+ },
72
+ "dependencies": {
73
+ "@emotion/react": "^11.11.0",
74
+ "@emotion/styled": "^11.11.0",
75
+ "@hookform/resolvers": "^3.3.1",
76
+ "@mui/material": "^5.12.3",
77
+ "@uiw/react-json-view": "^2.0.0-alpha.16",
78
+ "axios": "^1.4.0",
79
+ "dayjs": "^1.11.8",
80
+ "framer-motion": "10.11.0",
81
+ "i18next": "^22.4.15",
82
+ "memoize-one": "^6.0.0",
83
+ "re-resizable": "^6.9.9",
84
+ "react": "^18.2.0",
85
+ "react-currency-input-field": "^3.6.11",
86
+ "react-dom": "^18.2.0",
87
+ "react-draggable": "^4.4.6",
88
+ "react-dropzone": "^14.2.3",
89
+ "react-hook-form": "^7.45.4",
90
+ "react-hot-toast": "^2.4.1",
91
+ "react-i18next": "^12.2.2",
92
+ "react-multi-date-picker": "^4.1.2",
93
+ "react-router-dom": "^6.14.2",
94
+ "react-virtualized-auto-sizer": "^1.0.20",
95
+ "react-window": "^1.8.9",
96
+ "react-window-infinite-loader": "^1.0.9",
97
+ "react18-input-otp": "^1.1.4",
98
+ "recharts": "^2.15.1"
99
+ },
100
+ "devDependencies": {
101
+ "@eslint/js": "^9.17.0",
102
+ "@testing-library/jest-dom": "^5.16.5",
103
+ "@types/lodash": "^4.17.15",
104
+ "@types/react": "^18.2.6",
105
+ "@types/react-dom": "^18.3.5",
106
+ "@types/react-virtualized-auto-sizer": "^1.0.8",
107
+ "@types/react-window": "^1.8.5",
108
+ "@types/react-window-infinite-loader": "^1.0.6",
109
+ "@vitejs/plugin-react": "^4.3.4",
110
+ "eslint": "^9.17.0",
111
+ "eslint-plugin-react-hooks": "^5.0.0",
112
+ "eslint-plugin-react-refresh": "^0.4.16",
113
+ "globals": "^15.14.0",
114
+ "husky": "^8.0.3",
115
+ "lint-staged": "^13.2.2",
116
+ "prettier": "^2.8.8",
117
+ "tsc-alias": "^1.8.16",
118
+ "typescript": "5.0.2",
119
+ "typescript-eslint": "^8.18.2",
120
+ "vite": "6.0.5",
121
+ "vite-plugin-svgr": "^4.3.0",
122
+ "vite-tsconfig-paths": "^4.2.0"
123
+ },
124
+ "lint-staged": {
125
+ "src/**/*.{ts,tsx,json,js,jsx}": [
126
+ "yarn run prettier:fix",
127
+ "yarn run lint"
128
+ ]
129
+ }
130
+ }