sag_components 1.0.555 → 1.0.557

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.
Files changed (96) hide show
  1. package/.history/.env_20231001120549 +0 -0
  2. package/.history/.env_20231001120613 +1 -0
  3. package/.history/.env_20231003143620 +1 -0
  4. package/.history/.eslintrc_20230928112617.js +26 -0
  5. package/.history/.eslintrc_20230928130534.js +27 -0
  6. package/.history/.eslintrc_20230928133400.js +28 -0
  7. package/.history/.eslintrc_20230928133404.js +28 -0
  8. package/.history/.eslintrc_20230928133416.js +28 -0
  9. package/.history/.eslintrc_20230928133419.js +28 -0
  10. package/.history/.eslintrc_20230928133432.js +28 -0
  11. package/.history/.eslintrc_20230928133439.js +28 -0
  12. package/.history/.eslintrc_20230928133458.js +29 -0
  13. package/.history/.eslintrc_20230928133500.js +28 -0
  14. package/.history/.eslintrc_20230928134009.js +28 -0
  15. package/.history/.eslintrc_20230928135318.js +34 -0
  16. package/.history/.eslintrc_20230928135321.js +34 -0
  17. package/.history/.eslintrc_20230928135323.js +34 -0
  18. package/.history/.eslintrc_20230928135332.js +34 -0
  19. package/.history/.eslintrc_20230928135333.js +34 -0
  20. package/.history/.eslintrc_20230928135352.js +29 -0
  21. package/.history/.eslintrc_20230928135353.js +29 -0
  22. package/.history/.eslintrc_20230928135355.js +29 -0
  23. package/.history/.eslintrc_20230928135408.js +29 -0
  24. package/.history/.eslintrc_20230928135538.js +30 -0
  25. package/.history/.eslintrc_20230928135539.js +30 -0
  26. package/.history/.eslintrc_20230928135543.js +30 -0
  27. package/.history/.gitignore_20230921093332 +119 -0
  28. package/.history/.gitignore_20230921111638 +120 -0
  29. package/.history/.gitignore_20230921111650 +120 -0
  30. package/.history/.gitignore_20230921111810 +121 -0
  31. package/.history/package-lock_20231114111138.json +47810 -0
  32. package/.history/package-lock_20231114111158.json +47802 -0
  33. package/.history/package_20231029152422.json +82 -0
  34. package/.history/package_20231029153420.json +82 -0
  35. package/.history/package_20231029154416.json +82 -0
  36. package/.history/package_20231030094127.json +82 -0
  37. package/.history/package_20231030114707.json +82 -0
  38. package/.history/package_20231030130704.json +82 -0
  39. package/.history/package_20231030132422.json +82 -0
  40. package/.history/package_20231030134051.json +82 -0
  41. package/.history/package_20231030142913.json +82 -0
  42. package/.history/package_20231030143556.json +82 -0
  43. package/.history/package_20231030144210.json +82 -0
  44. package/.history/package_20231101113942.json +82 -0
  45. package/.history/package_20231101114544.json +82 -0
  46. package/.history/package_20231101151518.json +82 -0
  47. package/.history/package_20231101154501.json +82 -0
  48. package/.history/package_20231101155811.json +82 -0
  49. package/.history/package_20231101160235.json +82 -0
  50. package/.history/package_20231101160406.json +82 -0
  51. package/.history/package_20231101161325.json +82 -0
  52. package/.history/package_20231101161333.json +82 -0
  53. package/.history/package_20231102123623.json +82 -0
  54. package/.history/package_20231102125741.json +82 -0
  55. package/.history/package_20231102130857.json +82 -0
  56. package/.history/package_20231102132227.json +82 -0
  57. package/.history/package_20231102142340.json +82 -0
  58. package/.history/package_20231102143256.json +82 -0
  59. package/.history/package_20231105153539.json +82 -0
  60. package/.history/package_20231105154332.json +82 -0
  61. package/.history/package_20231105171201.json +82 -0
  62. package/.history/package_20231106123849.json +82 -0
  63. package/.history/package_20231107170638.json +82 -0
  64. package/.history/package_20231109103647.json +82 -0
  65. package/.history/package_20231109103911.json +82 -0
  66. package/.history/package_20231109105426.json +82 -0
  67. package/.history/package_20231109132014.json +82 -0
  68. package/.history/package_20231109132115.json +82 -0
  69. package/.history/package_20231114100517.json +82 -0
  70. package/.history/package_20231114100859.json +82 -0
  71. package/.history/package_20231114101553.json +82 -0
  72. package/.history/package_20231114102545.json +82 -0
  73. package/.history/package_20231114111208.json +83 -0
  74. package/.history/package_20231114111515.json +83 -0
  75. package/.history/package_20231114112931.json +83 -0
  76. package/.history/package_20231114113014.json +83 -0
  77. package/.history/package_20231114113155.json +83 -0
  78. package/.history/package_20231114124318.json +83 -0
  79. package/.history/package_20231114125107.json +83 -0
  80. package/.history/package_20231114125510.json +83 -0
  81. package/.history/package_20231114132634.json +83 -0
  82. package/.history/package_20231116165815.json +83 -0
  83. package/.history/package_20231116165916.json +83 -0
  84. package/.history/package_20231119113637.json +83 -0
  85. package/.history/package_20231120100907.json +83 -0
  86. package/.history/package_20231121151523.json +77 -0
  87. package/.history/package_20231121155513.json +77 -0
  88. package/.history/package_20231121162434.json +77 -0
  89. package/.history/package_20231122100718.json +77 -0
  90. package/.history/package_20231128125149.json +82 -0
  91. package/.history/package_20231128125208.json +82 -0
  92. package/dist/stories/components/AttachedFile.js +1 -1
  93. package/dist/stories/components/AttachedFile.style.js +1 -1
  94. package/dist/stories/components/CommonFunctions.js +0 -3
  95. package/dist/stories/components/TotalDoughnutChart.js +12 -2
  96. 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
+ }
@@ -29,7 +29,7 @@ const AttachedFile = props => {
29
29
  setSelectedFiles(prevFiles => prevFiles.filter(file => file !== fileToRemove));
30
30
  const fileInput = document.getElementById('fileInput');
31
31
  fileInput.value = ''; // Reset input value
32
- onRemoveFile();
32
+ onRemoveFile(fileToRemove);
33
33
  };
34
34
  return /*#__PURE__*/_react.default.createElement(_AttachedFile.AttachedFileContainer, null, selectedFiles.map(file => /*#__PURE__*/_react.default.createElement(_AttachedFile.UploadedFile, {
35
35
  key: "".concat(file.name, "_").concat(file.lastModified)
@@ -10,5 +10,5 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
10
10
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
11
11
  const AttachedFileContainer = exports.AttachedFileContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: 'Poppins';\n font-size: 14px;\n font-weight: 400;\n"])));
12
12
  const InputLabel = exports.InputLabel = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 8px;\n align-items: center;\n cursor: pointer;\n > span {\n color: ", ";\n }\n"])), props => props.inputColor);
13
- const UploadedFile = exports.UploadedFile = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 8px;\n align-items: center;\n color: #A4A4A4;\n max-width: 220px;\n padding: 2px 8px;\n margin-bottom: 10px;\n"])));
13
+ const UploadedFile = exports.UploadedFile = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 8px;\n align-items: center;\n color: #A4A4A4;\n max-width: 220px;\n padding: 2px 8px;\n margin-bottom: 10px;\n > span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n > svg {\n min-width: 12px;\n }\n"])));
14
14
  const RemoveButton = exports.RemoveButton = _styledComponents.default.button(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n border: none;\n background: none;\n padding: 0;\n display: flex;\n align-items: center;\n margin-left: auto;\n cursor: pointer;\n"])));
@@ -56,9 +56,6 @@ const getFormattedValue = num => {
56
56
  if (Math.abs(num) >= 1000) {
57
57
  return (num / 1000).toFixed(1).replace(/\.0$/, "");
58
58
  }
59
- if (num && num % 1 != 0) {
60
- return num === null || num === void 0 ? void 0 : num.toFixed(2);
61
- }
62
59
  return num;
63
60
  };
64
61
  exports.getFormattedValue = getFormattedValue;
@@ -34,7 +34,17 @@ const TotalDoughnutChart = props => {
34
34
  const [DoughnutChartRadius, setDoughnutChartRadius] = (0, _react.useState)(0);
35
35
  const [zoomResolution, setZoomResolution] = (0, _react.useState)(1);
36
36
  const DoughnutChartContainerRef = (0, _react.useRef)();
37
- const dotCutTrenty = row => dotCut ? (0, _CommonFunctions.getFormattedValue)(row.value) : (0, _CommonFunctions.getNumberWithCommas)(row.value);
37
+ const dotCutTrenty = row => {
38
+ if (!row || !row.value) return 0;
39
+ let value = 0;
40
+ if (row !== null && row !== void 0 && row.value && Math.abs(row.value) > 0 && row.value % 1 != 0) {
41
+ var _row$value;
42
+ value = row === null || row === void 0 ? void 0 : (_row$value = row.value) === null || _row$value === void 0 ? void 0 : _row$value.toFixed(2);
43
+ } else {
44
+ value = row === null || row === void 0 ? void 0 : row.value;
45
+ }
46
+ return dotCut ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value);
47
+ };
38
48
  (0, _react.useEffect)(() => {
39
49
  const handleResize = () => {
40
50
  setZoomResolution(window.devicePixelRatio);
@@ -101,7 +111,7 @@ const TotalDoughnutChart = props => {
101
111
  width: width
102
112
  }, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.CurrencySign, {
103
113
  id: "CurrencySign"
104
- }, currencySign ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ""), dotCut ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ""), addingBenchmark && /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, null))), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartAndLegendContainer, {
114
+ }, currencySign ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ""), dotCut ? (0, _CommonFunctions.getFormattedValue)(value && Math.abs(value) > 0 && value % 1 != 0 ? value === null || value === void 0 ? void 0 : value.toFixed(2) : value) : (0, _CommonFunctions.getNumberWithCommas)(value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ""), addingBenchmark && /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, null))), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartAndLegendContainer, {
105
115
  id: "DoughnutChartAndLegendContainer"
106
116
  }, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartContainer, {
107
117
  id: "DoughnutChartContainer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.555",
3
+ "version": "1.0.557",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {