sag_components 1.0.556 → 1.0.558
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/.history/.env_20231001120549 +0 -0
- package/.history/.env_20231001120613 +1 -0
- package/.history/.env_20231003143620 +1 -0
- package/.history/.eslintrc_20230928112617.js +26 -0
- package/.history/.eslintrc_20230928130534.js +27 -0
- package/.history/.eslintrc_20230928133400.js +28 -0
- package/.history/.eslintrc_20230928133404.js +28 -0
- package/.history/.eslintrc_20230928133416.js +28 -0
- package/.history/.eslintrc_20230928133419.js +28 -0
- package/.history/.eslintrc_20230928133432.js +28 -0
- package/.history/.eslintrc_20230928133439.js +28 -0
- package/.history/.eslintrc_20230928133458.js +29 -0
- package/.history/.eslintrc_20230928133500.js +28 -0
- package/.history/.eslintrc_20230928134009.js +28 -0
- package/.history/.eslintrc_20230928135318.js +34 -0
- package/.history/.eslintrc_20230928135321.js +34 -0
- package/.history/.eslintrc_20230928135323.js +34 -0
- package/.history/.eslintrc_20230928135332.js +34 -0
- package/.history/.eslintrc_20230928135333.js +34 -0
- package/.history/.eslintrc_20230928135352.js +29 -0
- package/.history/.eslintrc_20230928135353.js +29 -0
- package/.history/.eslintrc_20230928135355.js +29 -0
- package/.history/.eslintrc_20230928135408.js +29 -0
- package/.history/.eslintrc_20230928135538.js +30 -0
- package/.history/.eslintrc_20230928135539.js +30 -0
- package/.history/.eslintrc_20230928135543.js +30 -0
- package/.history/.gitignore_20230921093332 +119 -0
- package/.history/.gitignore_20230921111638 +120 -0
- package/.history/.gitignore_20230921111650 +120 -0
- package/.history/.gitignore_20230921111810 +121 -0
- package/.history/package-lock_20231114111138.json +47810 -0
- package/.history/package-lock_20231114111158.json +47802 -0
- package/.history/package_20231029152422.json +82 -0
- package/.history/package_20231029153420.json +82 -0
- package/.history/package_20231029154416.json +82 -0
- package/.history/package_20231030094127.json +82 -0
- package/.history/package_20231030114707.json +82 -0
- package/.history/package_20231030130704.json +82 -0
- package/.history/package_20231030132422.json +82 -0
- package/.history/package_20231030134051.json +82 -0
- package/.history/package_20231030142913.json +82 -0
- package/.history/package_20231030143556.json +82 -0
- package/.history/package_20231030144210.json +82 -0
- package/.history/package_20231101113942.json +82 -0
- package/.history/package_20231101114544.json +82 -0
- package/.history/package_20231101151518.json +82 -0
- package/.history/package_20231101154501.json +82 -0
- package/.history/package_20231101155811.json +82 -0
- package/.history/package_20231101160235.json +82 -0
- package/.history/package_20231101160406.json +82 -0
- package/.history/package_20231101161325.json +82 -0
- package/.history/package_20231101161333.json +82 -0
- package/.history/package_20231102123623.json +82 -0
- package/.history/package_20231102125741.json +82 -0
- package/.history/package_20231102130857.json +82 -0
- package/.history/package_20231102132227.json +82 -0
- package/.history/package_20231102142340.json +82 -0
- package/.history/package_20231102143256.json +82 -0
- package/.history/package_20231105153539.json +82 -0
- package/.history/package_20231105154332.json +82 -0
- package/.history/package_20231105171201.json +82 -0
- package/.history/package_20231106123849.json +82 -0
- package/.history/package_20231107170638.json +82 -0
- package/.history/package_20231109103647.json +82 -0
- package/.history/package_20231109103911.json +82 -0
- package/.history/package_20231109105426.json +82 -0
- package/.history/package_20231109132014.json +82 -0
- package/.history/package_20231109132115.json +82 -0
- package/.history/package_20231114100517.json +82 -0
- package/.history/package_20231114100859.json +82 -0
- package/.history/package_20231114101553.json +82 -0
- package/.history/package_20231114102545.json +82 -0
- package/.history/package_20231114111208.json +83 -0
- package/.history/package_20231114111515.json +83 -0
- package/.history/package_20231114112931.json +83 -0
- package/.history/package_20231114113014.json +83 -0
- package/.history/package_20231114113155.json +83 -0
- package/.history/package_20231114124318.json +83 -0
- package/.history/package_20231114125107.json +83 -0
- package/.history/package_20231114125510.json +83 -0
- package/.history/package_20231114132634.json +83 -0
- package/.history/package_20231116165815.json +83 -0
- package/.history/package_20231116165916.json +83 -0
- package/.history/package_20231119113637.json +83 -0
- package/.history/package_20231120100907.json +83 -0
- package/.history/package_20231121151523.json +77 -0
- package/.history/package_20231121155513.json +77 -0
- package/.history/package_20231121162434.json +77 -0
- package/.history/package_20231122100718.json +77 -0
- package/.history/package_20231128125149.json +82 -0
- package/.history/package_20231128125208.json +82 -0
- package/dist/stories/components/CollapseMenuItem.js +4 -4
- package/dist/stories/components/ReportTable.js +46 -48
- package/dist/stories/components/TabMenu.js +49 -0
- package/dist/stories/components/TabMenu.style.js +16 -0
- package/package.json +1 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sag_components",
|
|
3
|
+
"version": "1.0.338",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "react-scripts start",
|
|
8
|
+
"lint": "eslint .",
|
|
9
|
+
"build": "cross-env BABEL_ENV=production babel src -d dist ",
|
|
10
|
+
"storybook": "storybook dev -p 6006",
|
|
11
|
+
"build-storybook": "storybook build"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [],
|
|
14
|
+
"author": "SAG",
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
18
|
+
"@babel/cli": "^7.23.0",
|
|
19
|
+
"@babel/preset-env": "^7.23.2",
|
|
20
|
+
"@babel/preset-react": "^7.22.15",
|
|
21
|
+
"@babel/preset-typescript": "^7.23.2",
|
|
22
|
+
"babel-plugin-react-css-modules": "^5.2.6",
|
|
23
|
+
"babel-preset-react-app": "^10.0.1",
|
|
24
|
+
"@storybook/addon-designs": "^7.0.5",
|
|
25
|
+
"@storybook/addon-essentials": "^7.4.6",
|
|
26
|
+
"@storybook/addon-interactions": "^7.4.6",
|
|
27
|
+
"@storybook/addon-links": "^7.4.6",
|
|
28
|
+
"@storybook/addon-storysource": "^7.4.6",
|
|
29
|
+
"@storybook/addons": "^7.5.3",
|
|
30
|
+
"@storybook/blocks": "^7.4.6",
|
|
31
|
+
"@storybook/preset-scss": "^1.0.3",
|
|
32
|
+
"@storybook/react": "^7.4.6",
|
|
33
|
+
"@storybook/react-webpack5": "^7.4.6",
|
|
34
|
+
"@storybook/testing-library": "^0.2.2",
|
|
35
|
+
"@storybook/theming": "^7.5.3",
|
|
36
|
+
"cross-env": "^7.0.3",
|
|
37
|
+
"css-loader": "^6.8.1",
|
|
38
|
+
"eslint": "^8.53.0",
|
|
39
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
40
|
+
"eslint-plugin-import": "^2.29.0",
|
|
41
|
+
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
42
|
+
"eslint-plugin-react": "^7.33.2",
|
|
43
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
44
|
+
"react-dom": "^18.2.0",
|
|
45
|
+
"sass": "^1.69.5",
|
|
46
|
+
"sass-loader": "^13.3.2",
|
|
47
|
+
"style-loader": "^3.3.3"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@emotion/react": "^11.11.1",
|
|
51
|
+
"@emotion/styled": "^11.11.0",
|
|
52
|
+
"@mui/icons-material": "^5.14.16",
|
|
53
|
+
"@mui/material": "^5.14.16",
|
|
54
|
+
"@mui/x-date-pickers": "^6.18.0",
|
|
55
|
+
"classnames": "^2.3.2",
|
|
56
|
+
"dayjs": "^1.11.10",
|
|
57
|
+
"prop-types": "^15.8.1",
|
|
58
|
+
"react": "^18.2.0",
|
|
59
|
+
"react-css-modules": "^4.7.11",
|
|
60
|
+
"react-loading-skeleton": "^3.3.1",
|
|
61
|
+
"recharts": "^2.9.2",
|
|
62
|
+
"storybook": "^7.4.6",
|
|
63
|
+
"styled-components": "^5.3.1"
|
|
64
|
+
},
|
|
65
|
+
"browserslist": {
|
|
66
|
+
"production": [
|
|
67
|
+
">0.2%",
|
|
68
|
+
"not dead",
|
|
69
|
+
"not op_mini all"
|
|
70
|
+
],
|
|
71
|
+
"development": [
|
|
72
|
+
"last 1 chrome version",
|
|
73
|
+
"last 1 firefox version",
|
|
74
|
+
"last 1 safari version"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sag_components",
|
|
3
|
+
"version": "1.0.346",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "react-scripts start",
|
|
8
|
+
"lint": "eslint .",
|
|
9
|
+
"build": "cross-env BABEL_ENV=production babel src -d dist ",
|
|
10
|
+
"storybook": "storybook dev -p 6006",
|
|
11
|
+
"build-storybook": "storybook build"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [],
|
|
14
|
+
"author": "SAG",
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
18
|
+
"@babel/cli": "^7.23.0",
|
|
19
|
+
"@babel/preset-env": "^7.23.2",
|
|
20
|
+
"@babel/preset-react": "^7.22.15",
|
|
21
|
+
"@babel/preset-typescript": "^7.23.2",
|
|
22
|
+
"babel-plugin-react-css-modules": "^5.2.6",
|
|
23
|
+
"babel-preset-react-app": "^10.0.1",
|
|
24
|
+
"@storybook/addon-designs": "^7.0.5",
|
|
25
|
+
"@storybook/addon-essentials": "^7.4.6",
|
|
26
|
+
"@storybook/addon-interactions": "^7.4.6",
|
|
27
|
+
"@storybook/addon-links": "^7.4.6",
|
|
28
|
+
"@storybook/addon-storysource": "^7.4.6",
|
|
29
|
+
"@storybook/addons": "^7.5.3",
|
|
30
|
+
"@storybook/blocks": "^7.4.6",
|
|
31
|
+
"@storybook/preset-scss": "^1.0.3",
|
|
32
|
+
"@storybook/react": "^7.4.6",
|
|
33
|
+
"@storybook/react-webpack5": "^7.4.6",
|
|
34
|
+
"@storybook/testing-library": "^0.2.2",
|
|
35
|
+
"@storybook/theming": "^7.5.3",
|
|
36
|
+
"cross-env": "^7.0.3",
|
|
37
|
+
"css-loader": "^6.8.1",
|
|
38
|
+
"eslint": "^8.53.0",
|
|
39
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
40
|
+
"eslint-plugin-import": "^2.29.0",
|
|
41
|
+
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
42
|
+
"eslint-plugin-react": "^7.33.2",
|
|
43
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
44
|
+
"react-dom": "^18.2.0",
|
|
45
|
+
"sass": "^1.69.5",
|
|
46
|
+
"sass-loader": "^13.3.2",
|
|
47
|
+
"style-loader": "^3.3.3"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@emotion/react": "^11.11.1",
|
|
51
|
+
"@emotion/styled": "^11.11.0",
|
|
52
|
+
"@mui/icons-material": "^5.14.16",
|
|
53
|
+
"@mui/material": "^5.14.16",
|
|
54
|
+
"@mui/x-date-pickers": "^6.18.0",
|
|
55
|
+
"classnames": "^2.3.2",
|
|
56
|
+
"dayjs": "^1.11.10",
|
|
57
|
+
"prop-types": "^15.8.1",
|
|
58
|
+
"react": "^18.2.0",
|
|
59
|
+
"react-css-modules": "^4.7.11",
|
|
60
|
+
"react-loading-skeleton": "^3.3.1",
|
|
61
|
+
"recharts": "^2.9.2",
|
|
62
|
+
"storybook": "^7.4.6",
|
|
63
|
+
"styled-components": "^5.3.1"
|
|
64
|
+
},
|
|
65
|
+
"bundler": {
|
|
66
|
+
"exportEntries": ["src/index.ts"],
|
|
67
|
+
"managerEntries": ["src/manager.ts"],
|
|
68
|
+
"previewEntries": ["src/preview.ts"]
|
|
69
|
+
},
|
|
70
|
+
"browserslist": {
|
|
71
|
+
"production": [
|
|
72
|
+
">0.2%",
|
|
73
|
+
"not dead",
|
|
74
|
+
"not op_mini all"
|
|
75
|
+
],
|
|
76
|
+
"development": [
|
|
77
|
+
"last 1 chrome version",
|
|
78
|
+
"last 1 firefox version",
|
|
79
|
+
"last 1 safari version"
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sag_components",
|
|
3
|
+
"version": "1.0.346",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "react-scripts start",
|
|
8
|
+
"lint": "eslint .",
|
|
9
|
+
"build": "cross-env BABEL_ENV=production babel src -d dist ",
|
|
10
|
+
"storybook": "storybook dev -p 6006",
|
|
11
|
+
"build-storybook": "storybook build"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [],
|
|
14
|
+
"author": "SAG",
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
18
|
+
"@babel/cli": "^7.23.0",
|
|
19
|
+
"@babel/preset-env": "^7.23.2",
|
|
20
|
+
"@babel/preset-react": "^7.22.15",
|
|
21
|
+
"@babel/preset-typescript": "^7.23.2",
|
|
22
|
+
"babel-plugin-react-css-modules": "^5.2.6",
|
|
23
|
+
"babel-preset-react-app": "^10.0.1",
|
|
24
|
+
"@storybook/addon-designs": "^7.0.5",
|
|
25
|
+
"@storybook/addon-essentials": "^7.4.6",
|
|
26
|
+
"@storybook/addon-interactions": "^7.4.6",
|
|
27
|
+
"@storybook/addon-links": "^7.4.6",
|
|
28
|
+
"@storybook/addon-storysource": "^7.4.6",
|
|
29
|
+
"@storybook/addons": "^7.5.3",
|
|
30
|
+
"@storybook/blocks": "^7.4.6",
|
|
31
|
+
"@storybook/preset-scss": "^1.0.3",
|
|
32
|
+
"@storybook/react": "^7.4.6",
|
|
33
|
+
"@storybook/react-webpack5": "^7.4.6",
|
|
34
|
+
"@storybook/testing-library": "^0.2.2",
|
|
35
|
+
"@storybook/theming": "^7.5.3",
|
|
36
|
+
"cross-env": "^7.0.3",
|
|
37
|
+
"css-loader": "^6.8.1",
|
|
38
|
+
"eslint": "^8.53.0",
|
|
39
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
40
|
+
"eslint-plugin-import": "^2.29.0",
|
|
41
|
+
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
42
|
+
"eslint-plugin-react": "^7.33.2",
|
|
43
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
44
|
+
"react-dom": "^18.2.0",
|
|
45
|
+
"sass": "^1.69.5",
|
|
46
|
+
"sass-loader": "^13.3.2",
|
|
47
|
+
"style-loader": "^3.3.3"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@emotion/react": "^11.11.1",
|
|
51
|
+
"@emotion/styled": "^11.11.0",
|
|
52
|
+
"@mui/icons-material": "^5.14.16",
|
|
53
|
+
"@mui/material": "^5.14.16",
|
|
54
|
+
"@mui/x-date-pickers": "^6.18.0",
|
|
55
|
+
"classnames": "^2.3.2",
|
|
56
|
+
"dayjs": "^1.11.10",
|
|
57
|
+
"prop-types": "^15.8.1",
|
|
58
|
+
"react": "^18.2.0",
|
|
59
|
+
"react-css-modules": "^4.7.11",
|
|
60
|
+
"react-loading-skeleton": "^3.3.1",
|
|
61
|
+
"recharts": "^2.9.2",
|
|
62
|
+
"storybook": "^7.4.6",
|
|
63
|
+
"styled-components": "^5.3.1"
|
|
64
|
+
},
|
|
65
|
+
"bundler": {
|
|
66
|
+
"exportEntries": ["src/index.js"],
|
|
67
|
+
"managerEntries": ["src/manager.js"],
|
|
68
|
+
"previewEntries": ["src/preview.js"]
|
|
69
|
+
},
|
|
70
|
+
"browserslist": {
|
|
71
|
+
"production": [
|
|
72
|
+
">0.2%",
|
|
73
|
+
"not dead",
|
|
74
|
+
"not op_mini all"
|
|
75
|
+
],
|
|
76
|
+
"development": [
|
|
77
|
+
"last 1 chrome version",
|
|
78
|
+
"last 1 firefox version",
|
|
79
|
+
"last 1 safari version"
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -25,7 +25,7 @@ const CollapseMenuItem = props => {
|
|
|
25
25
|
id: "CollapseMenuItemContainer",
|
|
26
26
|
onClick: handleToggle,
|
|
27
27
|
style: {
|
|
28
|
-
cursor:
|
|
28
|
+
cursor: 'pointer'
|
|
29
29
|
}
|
|
30
30
|
}, /*#__PURE__*/_react.default.createElement(_CollapseMenuItem.CollapseMenuItemIconContainer, {
|
|
31
31
|
id: "CollapseMenuItemIconContainer"
|
|
@@ -41,10 +41,10 @@ const CollapseMenuItem = props => {
|
|
|
41
41
|
id: "CollapseMenuItemSubTitle"
|
|
42
42
|
}, subTitle)), IsItemOpen && /*#__PURE__*/_react.default.createElement(_CollapseMenuItem.CollapseMenuItemContentContainer, {
|
|
43
43
|
id: "CollapseMenuItemContentContainer"
|
|
44
|
-
}, children
|
|
44
|
+
}, children || ''));
|
|
45
45
|
};
|
|
46
46
|
var _default = exports.default = CollapseMenuItem;
|
|
47
47
|
CollapseMenuItem.defaultProps = {
|
|
48
|
-
title:
|
|
49
|
-
subTitle:
|
|
48
|
+
title: '',
|
|
49
|
+
subTitle: ''
|
|
50
50
|
};
|
|
@@ -27,7 +27,7 @@ const ReportTable = props => {
|
|
|
27
27
|
}
|
|
28
28
|
if (!useSelectButtons) {
|
|
29
29
|
var _tableData$columnsHea;
|
|
30
|
-
//do not use select Buttons - remove the "button" from table data
|
|
30
|
+
// do not use select Buttons - remove the "button" from table data
|
|
31
31
|
const newTableData = {
|
|
32
32
|
columnsHeadings: [],
|
|
33
33
|
rowsValues: []
|
|
@@ -43,28 +43,28 @@ const ReportTable = props => {
|
|
|
43
43
|
}
|
|
44
44
|
if (useSelectButtons) {
|
|
45
45
|
var _tableData$columnsHea2, _newTableData$columns, _tableData$rowsValues;
|
|
46
|
-
//use select Buttons - add a "button" to table data
|
|
46
|
+
// use select Buttons - add a "button" to table data
|
|
47
47
|
|
|
48
48
|
const newTableData = {
|
|
49
49
|
columnsHeadings: [],
|
|
50
50
|
rowsValues: []
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
//columnsHeadings
|
|
53
|
+
// columnsHeadings
|
|
54
54
|
tableData === null || tableData === void 0 ? void 0 : (_tableData$columnsHea2 = tableData.columnsHeadings) === null || _tableData$columnsHea2 === void 0 ? void 0 : _tableData$columnsHea2.forEach(item => {
|
|
55
55
|
newTableData.columnsHeadings.push(item);
|
|
56
56
|
});
|
|
57
|
-
if (!((_newTableData$columns = newTableData.columnsHeadings) !== null && _newTableData$columns !== void 0 && _newTableData$columns.some(item => item.label ===
|
|
57
|
+
if (!((_newTableData$columns = newTableData.columnsHeadings) !== null && _newTableData$columns !== void 0 && _newTableData$columns.some(item => item.label === 'button' && item.key === 'button'))) {
|
|
58
58
|
newTableData.columnsHeadings.push({
|
|
59
|
-
label:
|
|
60
|
-
key:
|
|
59
|
+
label: 'button',
|
|
60
|
+
key: 'button'
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
//rowsValues
|
|
64
|
+
// rowsValues
|
|
65
65
|
const newRowValues = (_tableData$rowsValues = tableData.rowsValues) === null || _tableData$rowsValues === void 0 ? void 0 : _tableData$rowsValues.map((item, index) => useSelectButtons ? {
|
|
66
66
|
...item,
|
|
67
|
-
button:
|
|
67
|
+
button: 'button',
|
|
68
68
|
rowIndex: index
|
|
69
69
|
} : item);
|
|
70
70
|
newTableData.rowsValues = newRowValues;
|
|
@@ -75,85 +75,83 @@ const ReportTable = props => {
|
|
|
75
75
|
const tableWidthSize = 100 / (useSelectButtons ? maxColumnsNumber + 1 : maxColumnsNumber) * (useSelectButtons ? columnsNumber + 1 : columnsNumber);
|
|
76
76
|
const handleRowClick = row => {
|
|
77
77
|
const {
|
|
78
|
-
|
|
78
|
+
button: propToRemove,
|
|
79
79
|
...rest
|
|
80
80
|
} = row;
|
|
81
81
|
onSelectRowClick(rest);
|
|
82
82
|
};
|
|
83
|
-
const displaySelectButton = rowData => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
})));
|
|
93
|
-
};
|
|
83
|
+
const displaySelectButton = rowData => /*#__PURE__*/_react.default.createElement(_ReportTable.SelectButtonContainer, {
|
|
84
|
+
id: "SelectButtonContainer"
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement(_ReportTable.SelectButtonSubContainer, {
|
|
86
|
+
id: "SelectButtonSubContainer",
|
|
87
|
+
selectTextColor: selectTextColor,
|
|
88
|
+
onClick: () => handleRowClick(rowData)
|
|
89
|
+
}, "Select", ' ', /*#__PURE__*/_react.default.createElement(_ArrowSelectIcon.default, {
|
|
90
|
+
id: "ArrowSelectIcon"
|
|
91
|
+
})));
|
|
94
92
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ReportTable.TableWrapper, {
|
|
95
93
|
maxColumnsNumber: useSelectButtons ? maxColumnsNumber + 1 : maxColumnsNumber,
|
|
96
94
|
columnsNumber: columnsNumber
|
|
97
95
|
}, /*#__PURE__*/_react.default.createElement(_ReportTable.Table, {
|
|
98
96
|
tableWidthSize: tableWidthSize
|
|
99
|
-
}, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, FormattedTableData.columnsHeadings.map((headline, index) => headline.label ===
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, FormattedTableData.columnsHeadings.map((headline, index) => headline.label === 'button' ? /*#__PURE__*/_react.default.createElement(_ReportTable.Th, {
|
|
100
98
|
key: index
|
|
101
99
|
}) : /*#__PURE__*/_react.default.createElement(_ReportTable.Th, {
|
|
102
100
|
key: index
|
|
103
101
|
}, headline.label)))), /*#__PURE__*/_react.default.createElement("tbody", null, FormattedTableData.rowsValues.map((rowData, index) => /*#__PURE__*/_react.default.createElement(_ReportTable.Tr, {
|
|
104
102
|
key: index,
|
|
105
103
|
useColorLinearGradient: useColorLinearGradient
|
|
106
|
-
}, Object.values(rowData).map((value, dataIndex) => value ===
|
|
104
|
+
}, Object.values(rowData).map((value, dataIndex) => value === 'button' ? /*#__PURE__*/_react.default.createElement(_ReportTable.Td, {
|
|
107
105
|
key: index
|
|
108
106
|
}, displaySelectButton(rowData)) : /*#__PURE__*/_react.default.createElement(_ReportTable.Td, {
|
|
109
107
|
key: dataIndex
|
|
110
108
|
}, value))))))), !disableInfo ? /*#__PURE__*/_react.default.createElement(_ReportTable.InfoBlock, null, /*#__PURE__*/_react.default.createElement(_InfoIcon.InfoIcon, {
|
|
111
109
|
color: "#1B30AA"
|
|
112
|
-
}), /*#__PURE__*/_react.default.createElement(_ReportTable.InfoText, null, "Download table to get the full data")) :
|
|
110
|
+
}), /*#__PURE__*/_react.default.createElement(_ReportTable.InfoText, null, "Download table to get the full data")) : '');
|
|
113
111
|
};
|
|
114
112
|
exports.ReportTable = ReportTable;
|
|
115
113
|
var _default = exports.default = ReportTable;
|
|
116
114
|
ReportTable.defaultProps = {
|
|
117
115
|
tableData: {
|
|
118
116
|
columnsHeadings: [{
|
|
119
|
-
label:
|
|
120
|
-
key:
|
|
117
|
+
label: 'Event Name',
|
|
118
|
+
key: 'eventName'
|
|
121
119
|
}, {
|
|
122
|
-
label:
|
|
123
|
-
key:
|
|
120
|
+
label: 'Retailer',
|
|
121
|
+
key: 'retailer'
|
|
124
122
|
}, {
|
|
125
|
-
label:
|
|
126
|
-
key:
|
|
123
|
+
label: 'Total Cost',
|
|
124
|
+
key: 'totalCost'
|
|
127
125
|
}, {
|
|
128
|
-
label:
|
|
129
|
-
key:
|
|
126
|
+
label: 'Inc. Baseline Sales',
|
|
127
|
+
key: 'incBaselineSales'
|
|
130
128
|
}],
|
|
131
129
|
rowsValues: [{
|
|
132
|
-
retailer:
|
|
133
|
-
eventDescription:
|
|
134
|
-
totalCost:
|
|
135
|
-
incBaselineSales:
|
|
130
|
+
retailer: 'Large Selling Event P2 2023',
|
|
131
|
+
eventDescription: 'Food',
|
|
132
|
+
totalCost: 'Food Lion',
|
|
133
|
+
incBaselineSales: '50K'
|
|
136
134
|
}, {
|
|
137
|
-
retailer:
|
|
138
|
-
eventDescription:
|
|
139
|
-
totalCost:
|
|
140
|
-
incBaselineSales:
|
|
135
|
+
retailer: 'Large Selling Event P2 2023',
|
|
136
|
+
eventDescription: 'Food',
|
|
137
|
+
totalCost: '$500K',
|
|
138
|
+
incBaselineSales: '50K'
|
|
141
139
|
}, {
|
|
142
|
-
retailer:
|
|
143
|
-
eventDescription:
|
|
144
|
-
totalCost:
|
|
145
|
-
incBaselineSales:
|
|
140
|
+
retailer: 'Large Selling Event P2 2023',
|
|
141
|
+
eventDescription: 'Food',
|
|
142
|
+
totalCost: '$500K',
|
|
143
|
+
incBaselineSales: '50K'
|
|
146
144
|
}, {
|
|
147
|
-
retailer:
|
|
148
|
-
eventDescription:
|
|
149
|
-
totalCost:
|
|
150
|
-
incBaselineSales:
|
|
145
|
+
retailer: 'Large Selling Event P2 2023',
|
|
146
|
+
eventDescription: 'Food',
|
|
147
|
+
totalCost: '$500K',
|
|
148
|
+
incBaselineSales: '50K'
|
|
151
149
|
}]
|
|
152
150
|
},
|
|
153
151
|
maxColumnsNumber: 4,
|
|
154
152
|
useColorLinearGradient: true,
|
|
155
153
|
useSelectButtons: false,
|
|
156
154
|
disableInfo: false,
|
|
157
|
-
selectTextColor:
|
|
155
|
+
selectTextColor: '#229E38',
|
|
158
156
|
onSelectRowClick: () => {}
|
|
159
157
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _TabMenu = require("./TabMenu.style");
|
|
10
|
+
const TabMenu = props => {
|
|
11
|
+
const {
|
|
12
|
+
tabs,
|
|
13
|
+
color,
|
|
14
|
+
onTabChange
|
|
15
|
+
} = props;
|
|
16
|
+
const [activeTab, setActiveTab] = (0, _react.useState)(1);
|
|
17
|
+
const handleTabChange = index => {
|
|
18
|
+
onTabChange(index);
|
|
19
|
+
setActiveTab(index);
|
|
20
|
+
};
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_TabMenu.TabMenuContainer, null, /*#__PURE__*/_react.default.createElement(_TabMenu.Nav, null, /*#__PURE__*/_react.default.createElement(_TabMenu.Tabs, null, tabs.map((tab, index) => /*#__PURE__*/_react.default.createElement(_TabMenu.Tab, {
|
|
22
|
+
key: index,
|
|
23
|
+
isActive: index === activeTab,
|
|
24
|
+
className: index === activeTab ? 'active' : '',
|
|
25
|
+
color: color,
|
|
26
|
+
onClick: () => handleTabChange(index)
|
|
27
|
+
}, tab.title)), /*#__PURE__*/_react.default.createElement(_TabMenu.PresentationSlider, {
|
|
28
|
+
activeTab: activeTab,
|
|
29
|
+
color: color,
|
|
30
|
+
width: "".concat(100 / tabs.length, "%"),
|
|
31
|
+
role: "presentation"
|
|
32
|
+
}))), /*#__PURE__*/_react.default.createElement(_TabMenu.Body, {
|
|
33
|
+
id: "tabsBody"
|
|
34
|
+
}, tabs[activeTab].content));
|
|
35
|
+
};
|
|
36
|
+
TabMenu.defaultProps = {
|
|
37
|
+
color: '#229E38',
|
|
38
|
+
tabs: [
|
|
39
|
+
// { title: 'Tab 1', content: <ReportTable /> },
|
|
40
|
+
{
|
|
41
|
+
title: 'Tab 2',
|
|
42
|
+
content: 'Content for Tab 2'
|
|
43
|
+
}, {
|
|
44
|
+
title: 'Tab 3',
|
|
45
|
+
content: 'Content for Tab 3'
|
|
46
|
+
}],
|
|
47
|
+
onTabChange: () => {}
|
|
48
|
+
};
|
|
49
|
+
var _default = exports.default = TabMenu;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Tabs = exports.TabMenuContainer = exports.Tab = exports.PresentationSlider = exports.Nav = exports.Body = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
11
|
+
const TabMenuContainer = exports.TabMenuContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: 'Poppins', sans-serif;\n"])));
|
|
12
|
+
const Nav = exports.Nav = _styledComponents.default.nav(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)([" \n display: inline-block;\n"])));
|
|
13
|
+
const Tabs = exports.Tabs = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n position: relative;\n"])));
|
|
14
|
+
const Tab = exports.Tab = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n position: relative;\n text-align: center;\n padding: 8px 12px;\n font-size: 16px;\n color: #000000;\n &.active {\n font-weight: 600;\n color: ", ";\n }\n"])), props => props.color);
|
|
15
|
+
const PresentationSlider = exports.PresentationSlider = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 2px;\n background-color: #EAEAEA;\n &::before {\n content: '';\n position: absolute;\n left: 0;\n z-index: 1;\n width: ", ";\n height: 2px;\n background-color: ", ";\n transform: translateX(calc(100% * ", "));\n transition: transform .35s ease;\n }\n"])), props => props.width, props => props.color, props => props.activeTab);
|
|
16
|
+
const Body = exports.Body = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n padding: 24px 0;\n "])));
|