sag_components 1.0.443 → 1.0.445
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/DropdownMulti.js +75 -84
- package/dist/stories/components/IconButton.js +4 -2
- package/dist/stories/components/IconButton.style.js +1 -1
- package/dist/stories/components/KpiFilter.js +32 -35
- package/dist/stories/components/ModalTotalBenchmark.js +0 -6
- package/dist/stories/components/ModalTotalCost.js +0 -1
- package/dist/stories/components/TotalBenchmarkAreachart.js +6 -9
- package/dist/stories/components/TotalBenchmarkArrows.style.js +2 -2
- 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
|
+
}
|
|
@@ -28,7 +28,7 @@ const checkedIcon = /*#__PURE__*/_react.default.createElement(_CheckBox.default,
|
|
|
28
28
|
const DropdownMulti = _ref => {
|
|
29
29
|
let {
|
|
30
30
|
name,
|
|
31
|
-
width =
|
|
31
|
+
width = '100%',
|
|
32
32
|
size,
|
|
33
33
|
text,
|
|
34
34
|
shape,
|
|
@@ -38,15 +38,15 @@ const DropdownMulti = _ref => {
|
|
|
38
38
|
options,
|
|
39
39
|
onChange,
|
|
40
40
|
onInputChange,
|
|
41
|
-
labelColor =
|
|
41
|
+
labelColor = '#1B30AA',
|
|
42
42
|
required,
|
|
43
43
|
inputRef,
|
|
44
|
-
allowedInput =
|
|
44
|
+
allowedInput = 'all',
|
|
45
45
|
reset = false,
|
|
46
46
|
disableClearable = false,
|
|
47
47
|
disabled = false,
|
|
48
|
-
dropdownListfontSize =
|
|
49
|
-
placeHolderFontSize =
|
|
48
|
+
dropdownListfontSize = '14px',
|
|
49
|
+
placeHolderFontSize = '14px'
|
|
50
50
|
} = _ref;
|
|
51
51
|
/**
|
|
52
52
|
* SAG DropdownMulti
|
|
@@ -54,9 +54,6 @@ const DropdownMulti = _ref => {
|
|
|
54
54
|
|
|
55
55
|
const [currentInputValue, setCurrentInputValue] = (0, _react.useState)(null);
|
|
56
56
|
const [selectedOptionsState, setSelectedOptionsState] = (0, _react.useState)([]);
|
|
57
|
-
(0, _react.useEffect)(() => {
|
|
58
|
-
console.log("selectedOptionsState", selectedOptionsState);
|
|
59
|
-
}, [selectedOptionsState]);
|
|
60
57
|
(0, _react.useEffect)(() => {
|
|
61
58
|
setSelectedOptionsState([]);
|
|
62
59
|
}, [reset]);
|
|
@@ -71,7 +68,7 @@ const DropdownMulti = _ref => {
|
|
|
71
68
|
MuiFormLabel: {
|
|
72
69
|
styleOverrides: {
|
|
73
70
|
asterisk: {
|
|
74
|
-
color:
|
|
71
|
+
color: '#db3131'
|
|
75
72
|
}
|
|
76
73
|
}
|
|
77
74
|
}
|
|
@@ -80,51 +77,51 @@ const DropdownMulti = _ref => {
|
|
|
80
77
|
|
|
81
78
|
// ---------------------------- Multi Text Style -----------------------------------------
|
|
82
79
|
const getTextFieldStyleMulti = () => {
|
|
83
|
-
if (shape ===
|
|
80
|
+
if (shape === 'round') {
|
|
84
81
|
// round
|
|
85
82
|
return {
|
|
86
|
-
|
|
87
|
-
borderRadius:
|
|
83
|
+
'& .MuiOutlinedInput-root': {
|
|
84
|
+
borderRadius: '12px',
|
|
88
85
|
legend: {
|
|
89
|
-
marginLeft:
|
|
86
|
+
marginLeft: '10px'
|
|
90
87
|
}
|
|
91
88
|
},
|
|
92
|
-
|
|
93
|
-
paddingLeft:
|
|
94
|
-
borderRadius:
|
|
89
|
+
'& .MuiAutocomplete-inputRoot': {
|
|
90
|
+
paddingLeft: '10px !important',
|
|
91
|
+
borderRadius: '12px',
|
|
95
92
|
// This matches the specificity of the default styles at https://github.com/mui-org/material-ui/blob/v4.11.3/packages/material-ui-lab/src/Autocomplete/Autocomplete.js#L90
|
|
96
93
|
'&[class*="MuiOutlinedInput-root"] .MuiAutocomplete-input:first-of-type': {
|
|
97
94
|
// Default left padding is 6px
|
|
98
|
-
paddingLeft:
|
|
95
|
+
paddingLeft: '10px'
|
|
99
96
|
},
|
|
100
|
-
|
|
101
|
-
borderColor:
|
|
97
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
98
|
+
borderColor: '#E7E7E7'
|
|
102
99
|
},
|
|
103
|
-
|
|
104
|
-
borderColor: disabled ?
|
|
100
|
+
'&:hover .MuiOutlinedInput-notchedOutline': {
|
|
101
|
+
borderColor: disabled ? '#E7E7E7' : labelColor
|
|
105
102
|
},
|
|
106
|
-
|
|
107
|
-
borderColor: disabled ?
|
|
103
|
+
'&.Mui-focused .MuiOutlinedInput-notchedOutline': {
|
|
104
|
+
borderColor: disabled ? '#E7E7E7' : labelColor
|
|
108
105
|
}
|
|
109
106
|
},
|
|
110
|
-
|
|
107
|
+
'& .MuiInputLabel-outlined:not(.MuiInputLabel-shrink)': {
|
|
111
108
|
// Default transform is "translate(14px, 20px) scale(1)""
|
|
112
109
|
// This lines up the label with the initial cursor position in the input
|
|
113
110
|
// after changing its padding-left.
|
|
114
|
-
transform:
|
|
115
|
-
fontSize:
|
|
116
|
-
color: disabled ?
|
|
111
|
+
transform: 'translate(14px, 18px) scale(1);',
|
|
112
|
+
fontSize: '14px',
|
|
113
|
+
color: disabled ? '#E7E7E7' : currentInputValue && currentInputValue.length > 0 ? '#212121' : '#757575'
|
|
117
114
|
},
|
|
118
|
-
|
|
119
|
-
paddingLeft:
|
|
120
|
-
color: disabled ?
|
|
121
|
-
fontSize:
|
|
115
|
+
'& .MuiInputLabel-outlined': {
|
|
116
|
+
paddingLeft: '10px',
|
|
117
|
+
color: disabled ? '#E7E7E7' : labelColor,
|
|
118
|
+
fontSize: '18px'
|
|
122
119
|
},
|
|
123
|
-
|
|
124
|
-
marginLeft:
|
|
125
|
-
paddingLeft:
|
|
126
|
-
paddingRight:
|
|
127
|
-
background:
|
|
120
|
+
'& .MuiInputLabel-shrink': {
|
|
121
|
+
marginLeft: '1px',
|
|
122
|
+
paddingLeft: '4px',
|
|
123
|
+
paddingRight: '6px',
|
|
124
|
+
background: 'white'
|
|
128
125
|
}
|
|
129
126
|
};
|
|
130
127
|
}
|
|
@@ -144,7 +141,6 @@ const DropdownMulti = _ref => {
|
|
|
144
141
|
// });
|
|
145
142
|
|
|
146
143
|
const newSelectedOptions = newValue === null || newValue === void 0 ? void 0 : newValue.filter((value, index, self) => index === self.findIndex(item => item.id === value.id && item.label === value.label));
|
|
147
|
-
console.log("onChangeHandler", newSelectedOptions);
|
|
148
144
|
setSelectedOptionsState(newSelectedOptions);
|
|
149
145
|
onChange({
|
|
150
146
|
syntheticBaseEvent: event,
|
|
@@ -156,15 +152,15 @@ const DropdownMulti = _ref => {
|
|
|
156
152
|
const ALPHA_REGEX = /^[a-zA-Z]+$/;
|
|
157
153
|
const ALPHA_NUMERIC_REGEX = /^[a-zA-Z0-9-]+$/;
|
|
158
154
|
switch (allowedInput) {
|
|
159
|
-
case
|
|
155
|
+
case 'all':
|
|
160
156
|
return true;
|
|
161
|
-
case
|
|
157
|
+
case 'alpha':
|
|
162
158
|
if (ALPHA_REGEX.test(inputChar)) return true;
|
|
163
159
|
return false;
|
|
164
|
-
case
|
|
160
|
+
case 'numeric':
|
|
165
161
|
if (NUMERIC_REGEX.test(inputChar)) return true;
|
|
166
162
|
return false;
|
|
167
|
-
case
|
|
163
|
+
case 'alphaNumeric':
|
|
168
164
|
if (ALPHA_NUMERIC_REGEX.test(inputChar)) return true;
|
|
169
165
|
return false;
|
|
170
166
|
default:
|
|
@@ -203,55 +199,51 @@ const DropdownMulti = _ref => {
|
|
|
203
199
|
return /*#__PURE__*/_react.default.createElement("li", props, /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
|
|
204
200
|
icon: icon,
|
|
205
201
|
checkedIcon: checkedIcon,
|
|
206
|
-
checked: isOptionChecked(option)
|
|
202
|
+
checked: isOptionChecked(option)
|
|
207
203
|
}), option.label);
|
|
208
204
|
},
|
|
209
|
-
renderInput: params =>
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
fontFamily: "Poppins"
|
|
225
|
-
}
|
|
205
|
+
renderInput: params =>
|
|
206
|
+
/*#__PURE__*/
|
|
207
|
+
// showSearchIcon &&
|
|
208
|
+
_react.default.createElement(_TextField.default, Object.assign({}, params, {
|
|
209
|
+
variant: "outlined",
|
|
210
|
+
label: text,
|
|
211
|
+
size: size,
|
|
212
|
+
sx: getTextFieldStyleMulti(),
|
|
213
|
+
placeholder: placeHolder,
|
|
214
|
+
InputProps: {
|
|
215
|
+
...params.InputProps,
|
|
216
|
+
style: {
|
|
217
|
+
fontSize: placeHolderFontSize,
|
|
218
|
+
fontFamily: 'Poppins'
|
|
219
|
+
}
|
|
226
220
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
221
|
+
// endAdornment: (
|
|
222
|
+
// <>
|
|
223
|
+
// { selectedOptionsState && Object.values( selectedOptionsState)?.map((option, index) => (
|
|
224
|
+
// <span key={index} style={{ margin: '0 5px' }}>
|
|
225
|
+
// {option.label}
|
|
226
|
+
// </span>
|
|
227
|
+
// ))}
|
|
228
|
+
// {params.InputProps.endAdornment}
|
|
235
229
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
230
|
+
// </>
|
|
231
|
+
// ),
|
|
232
|
+
},
|
|
239
233
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
);
|
|
249
|
-
},
|
|
234
|
+
onKeyDown: event => {
|
|
235
|
+
if (!isInputAllowed(event.key)) {
|
|
236
|
+
event.preventDefault();
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
inputRef: inputRef || null,
|
|
240
|
+
required: required
|
|
241
|
+
})),
|
|
250
242
|
ListboxProps: {
|
|
251
243
|
style: {
|
|
252
244
|
fontSize: dropdownListfontSize,
|
|
253
|
-
//default: 14px
|
|
254
|
-
fontFamily:
|
|
245
|
+
// default: 14px
|
|
246
|
+
fontFamily: 'Poppins'
|
|
255
247
|
}
|
|
256
248
|
}
|
|
257
249
|
}));
|
|
@@ -259,9 +251,8 @@ const DropdownMulti = _ref => {
|
|
|
259
251
|
var _Object$values;
|
|
260
252
|
if (selectedOptionsState && (_Object$values = Object.values(selectedOptionsState)) !== null && _Object$values !== void 0 && _Object$values.map(itemFilter => itemFilter.label).includes(option.label)) {
|
|
261
253
|
return true;
|
|
262
|
-
} else {
|
|
263
|
-
return false;
|
|
264
254
|
}
|
|
255
|
+
return false;
|
|
265
256
|
};
|
|
266
257
|
|
|
267
258
|
// --------------------------------- MAIN -------------------------------------
|
|
@@ -34,11 +34,12 @@ const IconButton = props => {
|
|
|
34
34
|
onCancelClick
|
|
35
35
|
} = props;
|
|
36
36
|
const [progress, setProgress] = (0, _react.useState)(0);
|
|
37
|
+
let interval;
|
|
37
38
|
const incrementProgress = () => {
|
|
38
39
|
if (showProcess && progress <= 90) {
|
|
39
|
-
|
|
40
|
+
interval = setInterval(() => {
|
|
40
41
|
setProgress(prevProgress => {
|
|
41
|
-
const newProgress = prevProgress +
|
|
42
|
+
const newProgress = prevProgress + 2;
|
|
42
43
|
if (newProgress >= 90) {
|
|
43
44
|
clearInterval(interval);
|
|
44
45
|
}
|
|
@@ -47,6 +48,7 @@ const IconButton = props => {
|
|
|
47
48
|
}, 500);
|
|
48
49
|
} else {
|
|
49
50
|
setProgress(0);
|
|
51
|
+
clearInterval(interval);
|
|
50
52
|
}
|
|
51
53
|
};
|
|
52
54
|
(0, _react.useEffect)(() => {
|
|
@@ -10,6 +10,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
10
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
11
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
12
12
|
const ButtonWrapper = exports.ButtonWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n text-align: center;\n"])));
|
|
13
|
-
const IconButtonContainer = exports.IconButtonContainer = _styledComponents.default.a(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 14px;\n font-weight: 400;\n display: flex;\n gap: 10px;\n align-items: center;\n justify-content: center;\n padding: 12px 20px;\n text-decoration: none;\n color: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n background: ", ";\n position: relative;\n transition: all .3s;\n ", "\n &:hover, &:focus {\n cursor: pointer;\n box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);\n }\n"])), props => props.color, props => props.borderRadius, props => props.borderColor.toString(), props => props.backgroundColor.toString(), props => props.inProgress && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n pointer-events: none;\n &:after {\n content:
|
|
13
|
+
const IconButtonContainer = exports.IconButtonContainer = _styledComponents.default.a(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 14px;\n font-weight: 400;\n display: flex;\n gap: 10px;\n align-items: center;\n justify-content: center;\n padding: 12px 20px;\n text-decoration: none;\n color: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n background: ", ";\n position: relative;\n transition: all .3s;\n ", "\n &:hover, &:focus {\n cursor: pointer;\n box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);\n }\n"])), props => props.color, props => props.borderRadius, props => props.borderColor.toString(), props => props.backgroundColor.toString(), props => props.inProgress && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n pointer-events: none;\n &:after {\n content: 'In progress';\n display: flex;\n align-items: center;\n justify-content: center;\n text-wrap: nowrap;\n position: absolute;\n background: linear-gradient(\n to right,\n #5FCC70 ", "%,\n #B1B1B1 ", "%,\n #B1B1B1 100%\n );\n width: 100%;\n height: 100%;\n border-radius: ", ";\n border-width: 0;\n z-index: 9;\n }\n "])), props.progress, props.progress + 1, props => props.borderRadius));
|
|
14
14
|
const SpanText = exports.SpanText = _styledComponents.default.span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n"])));
|
|
15
15
|
const CancelClick = exports.CancelClick = _styledComponents.default.span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: inherit;\n font-family: \"Lato\", sans-serif;;\n font-size: 14px;\n color: #568202;\n cursor: pointer;\n margin-top: 5px;\n"])));
|