sag_components 1.0.481 → 1.0.482
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/AttachedFile.js +8 -3
- package/package.json +1 -1
- package/dist/stories/components/TotalCostModal.js +0 -143
|
@@ -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
|
+
}
|
|
@@ -13,15 +13,19 @@ var _AttachedIcon = _interopRequireDefault(require("./icons/AttachedIcon"));
|
|
|
13
13
|
var _FileIcon = _interopRequireDefault(require("./icons/FileIcon"));
|
|
14
14
|
const AttachedFile = props => {
|
|
15
15
|
const {
|
|
16
|
-
inputText
|
|
16
|
+
inputText,
|
|
17
|
+
onSelectFile,
|
|
18
|
+
onRemoveFile
|
|
17
19
|
} = props;
|
|
18
20
|
const [selectedFiles, setSelectedFiles] = (0, _react.useState)([]);
|
|
19
21
|
const handleFileChange = event => {
|
|
20
22
|
const files = Array.from(event.target.files);
|
|
21
23
|
setSelectedFiles([...selectedFiles, ...files]);
|
|
24
|
+
onSelectFile();
|
|
22
25
|
};
|
|
23
26
|
const handleRemoveFile = fileToRemove => {
|
|
24
27
|
setSelectedFiles(selectedFiles.filter(file => file !== fileToRemove));
|
|
28
|
+
onRemoveFile();
|
|
25
29
|
};
|
|
26
30
|
return /*#__PURE__*/_react.default.createElement(_AttachedFile.AttachedFileContainer, null, selectedFiles.map((file, index) => /*#__PURE__*/_react.default.createElement(_AttachedFile.UploadedFile, {
|
|
27
31
|
key: index
|
|
@@ -41,6 +45,7 @@ const AttachedFile = props => {
|
|
|
41
45
|
};
|
|
42
46
|
var _default = exports.default = AttachedFile;
|
|
43
47
|
AttachedFile.defaultProps = {
|
|
44
|
-
inputText: 'Attach file'
|
|
45
|
-
|
|
48
|
+
inputText: 'Attach file',
|
|
49
|
+
onSelectFile: () => {},
|
|
50
|
+
onRemoveFile: () => {}
|
|
46
51
|
};
|
package/package.json
CHANGED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _Modal = _interopRequireDefault(require("./Modal"));
|
|
12
|
-
var _CodeEditor = _interopRequireDefault(require("./CodeEditor"));
|
|
13
|
-
var _TextField = _interopRequireDefault(require("./TextField"));
|
|
14
|
-
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
15
|
-
var _reactHookForm = require("react-hook-form");
|
|
16
|
-
var _Modal2 = require("./Modal.style");
|
|
17
|
-
var TotalCostModal = function TotalCostModal(_ref) {
|
|
18
|
-
var title = _ref.title,
|
|
19
|
-
isModalOpen = _ref.isModalOpen,
|
|
20
|
-
setModalOpen = _ref.setModalOpen,
|
|
21
|
-
setResult = _ref.setResult;
|
|
22
|
-
var _useState = (0, _react.useState)([{
|
|
23
|
-
id: "title",
|
|
24
|
-
label: "Title",
|
|
25
|
-
type: "text"
|
|
26
|
-
}, {
|
|
27
|
-
id: "dotCut",
|
|
28
|
-
label: "Do Cut",
|
|
29
|
-
type: "select",
|
|
30
|
-
options: ["true", "false"]
|
|
31
|
-
}, {
|
|
32
|
-
id: "currency",
|
|
33
|
-
label: "Currency",
|
|
34
|
-
type: "select",
|
|
35
|
-
options: ["true", "false"]
|
|
36
|
-
}, {
|
|
37
|
-
id: "currencyType",
|
|
38
|
-
label: "Currency Type",
|
|
39
|
-
type: "select",
|
|
40
|
-
options: ["USD", "EUR", "ILS", "GBP", "JPY"]
|
|
41
|
-
}, {
|
|
42
|
-
id: "width",
|
|
43
|
-
label: "Width",
|
|
44
|
-
type: "text"
|
|
45
|
-
}, {
|
|
46
|
-
id: "height",
|
|
47
|
-
label: "Height",
|
|
48
|
-
type: "text"
|
|
49
|
-
}, {
|
|
50
|
-
id: "textColor",
|
|
51
|
-
label: "Text Color",
|
|
52
|
-
type: "text"
|
|
53
|
-
}, {
|
|
54
|
-
id: "noDataText",
|
|
55
|
-
label: "No Data Text",
|
|
56
|
-
type: "text"
|
|
57
|
-
}]),
|
|
58
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
59
|
-
params = _useState2[0],
|
|
60
|
-
setParams = _useState2[1];
|
|
61
|
-
var _useState3 = (0, _react.useState)("Select PACKAGE_COST,REDEMPTION_COST,(PACKAGE_COST+REDEMPTION_COST) AS TOTAL_COST,from FACT_EVENT_MEASURES A INNER JOIN DIM_EVENTS B ON A.EVENT_CODE = B.EVENT_CODE"),
|
|
62
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
63
|
-
code = _useState4[0],
|
|
64
|
-
setCode = _useState4[1];
|
|
65
|
-
var _useForm = (0, _reactHookForm.useForm)(),
|
|
66
|
-
register = _useForm.register,
|
|
67
|
-
handleSubmit = _useForm.handleSubmit,
|
|
68
|
-
watch = _useForm.watch,
|
|
69
|
-
control = _useForm.control,
|
|
70
|
-
errors = _useForm.formState.errors;
|
|
71
|
-
var onSubmit = function onSubmit(data) {
|
|
72
|
-
return setResult(data);
|
|
73
|
-
};
|
|
74
|
-
return /*#__PURE__*/_react.default.createElement("form", {
|
|
75
|
-
onSubmit: handleSubmit(onSubmit)
|
|
76
|
-
}, /*#__PURE__*/_react.default.createElement(_Modal.default, {
|
|
77
|
-
isOpen: isModalOpen,
|
|
78
|
-
onClose: function onClose() {
|
|
79
|
-
return setModalOpen(false);
|
|
80
|
-
}
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement("h2", null, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
82
|
-
style: {
|
|
83
|
-
gap: "10px",
|
|
84
|
-
display: "grid"
|
|
85
|
-
}
|
|
86
|
-
}, /*#__PURE__*/_react.default.createElement(_CodeEditor.default, {
|
|
87
|
-
value: code,
|
|
88
|
-
onChange: setCode
|
|
89
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
-
style: {
|
|
91
|
-
gap: "10px",
|
|
92
|
-
display: "grid",
|
|
93
|
-
gridTemplateColumns: "auto auto auto"
|
|
94
|
-
}
|
|
95
|
-
}, params.map(function (item) {
|
|
96
|
-
if (item.type === "text") {
|
|
97
|
-
return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
98
|
-
control: control,
|
|
99
|
-
name: item.id,
|
|
100
|
-
render: function render(_ref2) {
|
|
101
|
-
var field = _ref2.field;
|
|
102
|
-
return /*#__PURE__*/_react.default.createElement(_TextField.default, Object.assign({}, field, {
|
|
103
|
-
allowedInput: "all",
|
|
104
|
-
height: "100%",
|
|
105
|
-
label: item.label,
|
|
106
|
-
multiline: true,
|
|
107
|
-
placeHolder: "Type...",
|
|
108
|
-
shape: "round",
|
|
109
|
-
size: "small",
|
|
110
|
-
width: "300px"
|
|
111
|
-
}));
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
} else {
|
|
115
|
-
return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
116
|
-
control: control,
|
|
117
|
-
name: item.id,
|
|
118
|
-
render: function render(_ref3) {
|
|
119
|
-
var field = _ref3.field;
|
|
120
|
-
return /*#__PURE__*/_react.default.createElement(_Dropdown.default, Object.assign({}, field, {
|
|
121
|
-
allowedInput: "all",
|
|
122
|
-
labelColor: "#1B30AA",
|
|
123
|
-
limitTagsOnMultiSelect: 0,
|
|
124
|
-
onInputChange: function onInputChange(e) {
|
|
125
|
-
var _e$inputValue;
|
|
126
|
-
console.log("e", e);
|
|
127
|
-
field.onChange((_e$inputValue = e === null || e === void 0 ? void 0 : e.inputValue) !== null && _e$inputValue !== void 0 ? _e$inputValue : "");
|
|
128
|
-
},
|
|
129
|
-
options: item.options,
|
|
130
|
-
placeHolder: "Type...",
|
|
131
|
-
shape: "round",
|
|
132
|
-
size: "small",
|
|
133
|
-
text: item.label,
|
|
134
|
-
width: "300px"
|
|
135
|
-
}));
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
}))), /*#__PURE__*/_react.default.createElement(_Modal2.SubmitButton, {
|
|
140
|
-
type: "submit"
|
|
141
|
-
})));
|
|
142
|
-
};
|
|
143
|
-
var _default = exports.default = TotalCostModal;
|