sag_components 1.0.346 → 1.0.348
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/.eslintrc.js +1 -0
- 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/Benchmark.js +28 -28
- package/dist/stories/components/Button.js +55 -41
- package/dist/stories/components/CodeEditor.js +40 -0
- package/dist/stories/components/CodeEditor.style.js +12 -0
- package/dist/stories/components/CommonFunctions.js +16 -19
- package/dist/stories/components/KpiFilter.js +46 -42
- package/dist/stories/components/Modal.js +19 -0
- package/dist/stories/components/Modal.style.js +17 -0
- package/dist/stories/components/ModalTotalBenchmark.js +190 -0
- package/dist/stories/components/ModalTotalCost.js +142 -0
- package/dist/stories/components/NoDataFoundMessage.js +5 -3
- package/dist/stories/components/OneColumnContainer.js +37 -27
- package/dist/stories/components/PerformanceAnalytics.js +43 -67
- package/dist/stories/components/PerformanceAnalyticsLegend.js +14 -10
- package/dist/stories/components/PerformanceAnalyticsOneColumn.js +60 -65
- package/dist/stories/components/PerformanceAnalyticsTotals.js +20 -18
- package/dist/stories/components/SegmentedButton.js +35 -26
- package/dist/stories/components/TitleDescription.js +45 -21
- package/dist/stories/components/TotalBenchmark.js +24 -18
- package/dist/stories/components/TotalBenchmarkAreachart.js +56 -51
- package/dist/stories/components/TotalBenchmarkArrows.js +38 -24
- package/dist/stories/components/TotalBenchmarkBarchart.js +40 -26
- package/dist/stories/utils/ComponentFactory.js +34 -0
- package/package.json +7 -4
|
@@ -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
|
+
}
|
|
@@ -5,38 +5,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.Benchmark = void 0;
|
|
8
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _Benchmark = require("./Benchmark.style");
|
|
11
10
|
var _CommonFunctions = require("./CommonFunctions");
|
|
12
11
|
var _Tooltip = _interopRequireDefault(require("./Tooltip"));
|
|
13
|
-
var _excluded = ["totalValue", "currentValue", "benchmarkValue", "width", "height", "color", "linearGradientColor", "underAvarageColor", "linearGradientUnderAvarageColor", "backgroundColor", "tooltipLabel", "tooltipDirection"];
|
|
14
12
|
/* Benchmark */
|
|
15
|
-
var Benchmark = exports.Benchmark = function Benchmark(
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
linearGradientColor = _ref$linearGradientCo === void 0 ? '#C3EFD0' : _ref$linearGradientCo,
|
|
29
|
-
_ref$underAvarageColo = _ref.underAvarageColor,
|
|
30
|
-
underAvarageColor = _ref$underAvarageColo === void 0 ? '#FD5959' : _ref$underAvarageColo,
|
|
31
|
-
_ref$linearGradientUn = _ref.linearGradientUnderAvarageColor,
|
|
32
|
-
linearGradientUnderAvarageColor = _ref$linearGradientUn === void 0 ? '#FDB1B1' : _ref$linearGradientUn,
|
|
33
|
-
_ref$backgroundColor = _ref.backgroundColor,
|
|
34
|
-
backgroundColor = _ref$backgroundColor === void 0 ? '#F2F2F2' : _ref$backgroundColor,
|
|
35
|
-
_ref$tooltipLabel = _ref.tooltipLabel,
|
|
36
|
-
tooltipLabel = _ref$tooltipLabel === void 0 ? 'Benchmark' : _ref$tooltipLabel,
|
|
37
|
-
_ref$tooltipDirection = _ref.tooltipDirection,
|
|
38
|
-
tooltipDirection = _ref$tooltipDirection === void 0 ? 'top' : _ref$tooltipDirection,
|
|
39
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
13
|
+
var Benchmark = exports.Benchmark = function Benchmark(props) {
|
|
14
|
+
var totalValue = props.totalValue,
|
|
15
|
+
currentValue = props.currentValue,
|
|
16
|
+
benchmarkValue = props.benchmarkValue,
|
|
17
|
+
width = props.width,
|
|
18
|
+
height = props.height,
|
|
19
|
+
color = props.color,
|
|
20
|
+
linearGradientColor = props.linearGradientColor,
|
|
21
|
+
underAvarageColor = props.underAvarageColor,
|
|
22
|
+
linearGradientUnderAvarageColor = props.linearGradientUnderAvarageColor,
|
|
23
|
+
backgroundColor = props.backgroundColor,
|
|
24
|
+
tooltipLabel = props.tooltipLabel,
|
|
25
|
+
tooltipDirection = props.tooltipDirection;
|
|
40
26
|
var getCurrentValueRectangleWidth = function getCurrentValueRectangleWidth() {
|
|
41
27
|
if (!totalValue) return 0;
|
|
42
28
|
if (currentValue > totalValue) return width;
|
|
@@ -118,4 +104,18 @@ var Benchmark = exports.Benchmark = function Benchmark(_ref) {
|
|
|
118
104
|
left: getBenchmarkLeft()
|
|
119
105
|
}))));
|
|
120
106
|
};
|
|
121
|
-
var _default = exports.default = Benchmark;
|
|
107
|
+
var _default = exports.default = Benchmark;
|
|
108
|
+
Benchmark.defaultProps = {
|
|
109
|
+
totalValue: 100,
|
|
110
|
+
currentValue: 60,
|
|
111
|
+
benchmarkValue: 500,
|
|
112
|
+
width: 100,
|
|
113
|
+
height: 12,
|
|
114
|
+
color: '#79DB95',
|
|
115
|
+
linearGradientColor: '#C3EFD0',
|
|
116
|
+
underAvarageColor: '#FD5959',
|
|
117
|
+
linearGradientUnderAvarageColor: '#FDB1B1',
|
|
118
|
+
backgroundColor: '#F2F2F2',
|
|
119
|
+
tooltipLabel: 'Benchmark',
|
|
120
|
+
tooltipDirection: 'top'
|
|
121
|
+
};
|
|
@@ -6,55 +6,50 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.Button = void 0;
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
9
|
var React = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
12
11
|
var _styles = require("@mui/material/styles");
|
|
13
12
|
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
_onClick = _ref.onClick,
|
|
33
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
13
|
+
var Button = exports.Button = function Button(props) {
|
|
14
|
+
var text = props.text,
|
|
15
|
+
type = props.type,
|
|
16
|
+
fontFamily = props.fontFamily,
|
|
17
|
+
fontSize = props.fontSize,
|
|
18
|
+
shape = props.shape,
|
|
19
|
+
size = props.size,
|
|
20
|
+
height = props.height,
|
|
21
|
+
width = props.width,
|
|
22
|
+
disabled = props.disabled,
|
|
23
|
+
radius = props.radius,
|
|
24
|
+
textColor = props.textColor,
|
|
25
|
+
backgroundColor = props.backgroundColor,
|
|
26
|
+
borderColor = props.borderColor,
|
|
27
|
+
hoverTextColor = props.hoverTextColor,
|
|
28
|
+
hoverBackgroundColor = props.hoverBackgroundColor,
|
|
29
|
+
hoverBorderColor = props.hoverBorderColor,
|
|
30
|
+
_onClick = props.onClick;
|
|
34
31
|
var getTextColor = function getTextColor() {
|
|
35
|
-
if (!textColor || textColor
|
|
36
|
-
//default when parameter was not set
|
|
37
|
-
if (shape ===
|
|
38
|
-
return
|
|
39
|
-
} else {
|
|
40
|
-
return "black";
|
|
32
|
+
if (!textColor || textColor === '' || textColor === 'none') {
|
|
33
|
+
// default when parameter was not set
|
|
34
|
+
if (shape === 'contained') {
|
|
35
|
+
return 'white';
|
|
41
36
|
}
|
|
42
|
-
|
|
43
|
-
return textColor;
|
|
37
|
+
return 'black';
|
|
44
38
|
}
|
|
39
|
+
return textColor;
|
|
45
40
|
};
|
|
46
41
|
var theme = (0, _styles.createTheme)({
|
|
47
42
|
typography: {
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
fontFamily: fontFamily,
|
|
44
|
+
fontSize: fontSize
|
|
50
45
|
},
|
|
51
46
|
components: {
|
|
52
47
|
MuiButton: {
|
|
53
48
|
styleOverrides: {
|
|
54
|
-
root: function root(
|
|
55
|
-
var ownerState =
|
|
49
|
+
root: function root(_ref) {
|
|
50
|
+
var ownerState = _ref.ownerState;
|
|
56
51
|
return {
|
|
57
|
-
|
|
52
|
+
'&:hover': {
|
|
58
53
|
backgroundColor: hoverBackgroundColor,
|
|
59
54
|
color: hoverTextColor,
|
|
60
55
|
borderColor: hoverBorderColor
|
|
@@ -73,11 +68,11 @@ var Button = exports.Button = function Button(_ref) {
|
|
|
73
68
|
}, /*#__PURE__*/React.createElement(_Button.default, {
|
|
74
69
|
type: type,
|
|
75
70
|
sx: {
|
|
76
|
-
minHeight: height
|
|
77
|
-
maxHeight: height
|
|
78
|
-
minWidth: width
|
|
79
|
-
maxWidth: width
|
|
80
|
-
textTransform:
|
|
71
|
+
minHeight: height || null,
|
|
72
|
+
maxHeight: height || null,
|
|
73
|
+
minWidth: width || null,
|
|
74
|
+
maxWidth: width || null,
|
|
75
|
+
textTransform: 'none',
|
|
81
76
|
borderRadius: radius * 0.05,
|
|
82
77
|
color: getTextColor(),
|
|
83
78
|
// shape === "contained" ? "white" : "black",
|
|
@@ -89,10 +84,29 @@ var Button = exports.Button = function Button(_ref) {
|
|
|
89
84
|
},
|
|
90
85
|
variant: shape,
|
|
91
86
|
size: size,
|
|
92
|
-
disabled: disabled
|
|
87
|
+
disabled: !!disabled,
|
|
93
88
|
onClick: function onClick(event) {
|
|
94
89
|
_onClick(event);
|
|
95
90
|
}
|
|
96
91
|
}, text)));
|
|
97
92
|
};
|
|
98
|
-
var _default = exports.default = Button;
|
|
93
|
+
var _default = exports.default = Button;
|
|
94
|
+
Button.defaultProps = {
|
|
95
|
+
text: '',
|
|
96
|
+
type: '',
|
|
97
|
+
fontFamily: '',
|
|
98
|
+
fontSize: 18,
|
|
99
|
+
shape: 'contained',
|
|
100
|
+
size: 'small',
|
|
101
|
+
height: '50px',
|
|
102
|
+
width: 'auto',
|
|
103
|
+
disabled: true,
|
|
104
|
+
radius: 30,
|
|
105
|
+
textColor: '#212121',
|
|
106
|
+
backgroundColor: '#212121',
|
|
107
|
+
borderColor: '#212121',
|
|
108
|
+
hoverTextColor: '',
|
|
109
|
+
hoverBackgroundColor: '',
|
|
110
|
+
hoverBorderColor: '#212121',
|
|
111
|
+
onClick: function onClick() {}
|
|
112
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactAce = _interopRequireDefault(require("react-ace"));
|
|
10
|
+
require("ace-builds/src-noconflict/mode-mysql");
|
|
11
|
+
require("ace-builds/src-noconflict/theme-monokai");
|
|
12
|
+
require("ace-builds/src-noconflict/ext-language_tools");
|
|
13
|
+
require("ace-builds/src-noconflict/snippets/mysql");
|
|
14
|
+
// CodeEditor.js
|
|
15
|
+
|
|
16
|
+
var CodeEditor = function CodeEditor(_ref) {
|
|
17
|
+
var value = _ref.value,
|
|
18
|
+
onChange = _ref.onChange;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_reactAce.default, {
|
|
20
|
+
style: {
|
|
21
|
+
height: "200px"
|
|
22
|
+
},
|
|
23
|
+
mode: "mysql",
|
|
24
|
+
theme: "monokai",
|
|
25
|
+
value: value,
|
|
26
|
+
onChange: onChange,
|
|
27
|
+
name: "code-editor",
|
|
28
|
+
editorProps: {
|
|
29
|
+
$blockScrolling: true
|
|
30
|
+
},
|
|
31
|
+
setOptions: {
|
|
32
|
+
enableBasicAutocompletion: true,
|
|
33
|
+
enableLiveAutocompletion: true,
|
|
34
|
+
enableSnippets: true,
|
|
35
|
+
showLineNumbers: true,
|
|
36
|
+
tabSize: 1
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
var _default = exports.default = CodeEditor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.AceEditorContent = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
+
var _reactAce = _interopRequireDefault(require("react-ace"));
|
|
11
|
+
var _templateObject;
|
|
12
|
+
var AceEditorContent = exports.AceEditorContent = (0, _styledComponents.default)(_reactAce.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 400px;\n"])));
|
|
@@ -6,16 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getNumberWithCommas = exports.getFormattedValue = exports.getFormattedUnits = exports.getCurrencySign = void 0;
|
|
7
7
|
var getCurrencySign = exports.getCurrencySign = function getCurrencySign(currencyTypeToConvert, value) {
|
|
8
8
|
if (value === undefined || value === null) {
|
|
9
|
-
return
|
|
9
|
+
return '';
|
|
10
10
|
}
|
|
11
11
|
if (isNaN(parseFloat(value))) {
|
|
12
|
-
|
|
13
|
-
return "";
|
|
12
|
+
return '';
|
|
14
13
|
}
|
|
15
|
-
if (!currencyTypeToConvert) return
|
|
16
|
-
var currencySign =
|
|
17
|
-
var currencyFormatter = new Intl.NumberFormat(
|
|
18
|
-
style:
|
|
14
|
+
if (!currencyTypeToConvert) return '';
|
|
15
|
+
var currencySign = '';
|
|
16
|
+
var currencyFormatter = new Intl.NumberFormat('en-US', {
|
|
17
|
+
style: 'currency',
|
|
19
18
|
currency: currencyTypeToConvert
|
|
20
19
|
});
|
|
21
20
|
currencySign = currencyFormatter.format(Math.abs(value)).substring(0, 1);
|
|
@@ -23,41 +22,39 @@ var getCurrencySign = exports.getCurrencySign = function getCurrencySign(currenc
|
|
|
23
22
|
};
|
|
24
23
|
var getFormattedUnits = exports.getFormattedUnits = function getFormattedUnits(num) {
|
|
25
24
|
if (num === undefined || num === null) {
|
|
26
|
-
return
|
|
25
|
+
return '';
|
|
27
26
|
}
|
|
28
27
|
if (isNaN(parseFloat(num))) {
|
|
29
|
-
|
|
30
|
-
return "";
|
|
28
|
+
return '';
|
|
31
29
|
}
|
|
32
30
|
if (Math.abs(num) >= 1000000000) {
|
|
33
|
-
return
|
|
31
|
+
return 'B';
|
|
34
32
|
}
|
|
35
33
|
if (Math.abs(num) >= 1000000) {
|
|
36
|
-
return
|
|
34
|
+
return 'M';
|
|
37
35
|
}
|
|
38
36
|
if (Math.abs(num) >= 1000) {
|
|
39
|
-
return
|
|
37
|
+
return 'K';
|
|
40
38
|
}
|
|
41
|
-
return
|
|
39
|
+
return '';
|
|
42
40
|
};
|
|
43
41
|
var getFormattedValue = exports.getFormattedValue = function getFormattedValue(num) {
|
|
44
42
|
if (num === undefined || num === null) {
|
|
45
43
|
return null;
|
|
46
44
|
}
|
|
47
45
|
if (isNaN(parseFloat(num))) {
|
|
48
|
-
console.log("getFormattedUnits", num);
|
|
49
46
|
return null;
|
|
50
47
|
}
|
|
51
48
|
|
|
52
49
|
// if (typeof num === 'number') {
|
|
53
50
|
if (Math.abs(num) >= 1000000000) {
|
|
54
|
-
return (num / 1000000000).toFixed(1).replace(/\.0$/,
|
|
51
|
+
return (num / 1000000000).toFixed(1).replace(/\.0$/, '');
|
|
55
52
|
}
|
|
56
53
|
if (Math.abs(num) >= 1000000) {
|
|
57
|
-
return (num / 1000000).toFixed(1).replace(/\.0$/,
|
|
54
|
+
return (num / 1000000).toFixed(1).replace(/\.0$/, '');
|
|
58
55
|
}
|
|
59
56
|
if (Math.abs(num) >= 1000) {
|
|
60
|
-
return (num / 1000).toFixed(1).replace(/\.0$/,
|
|
57
|
+
return (num / 1000).toFixed(1).replace(/\.0$/, '');
|
|
61
58
|
}
|
|
62
59
|
return num;
|
|
63
60
|
// }
|
|
@@ -66,6 +63,6 @@ var getFormattedValue = exports.getFormattedValue = function getFormattedValue(n
|
|
|
66
63
|
var getNumberWithCommas = exports.getNumberWithCommas = function getNumberWithCommas(x) {
|
|
67
64
|
var param = x.toString();
|
|
68
65
|
var pattern = /(-?\d+)(\d{3})/;
|
|
69
|
-
while (pattern.test(param)) param = param.replace(pattern,
|
|
66
|
+
while (pattern.test(param)) param = param.replace(pattern, '$1,$2');
|
|
70
67
|
return param;
|
|
71
68
|
};
|