sag_components 1.0.346 → 1.0.347

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 (116) hide show
  1. package/.eslintrc.js +1 -0
  2. package/.history/.env_20231001120549 +0 -0
  3. package/.history/.env_20231001120613 +1 -0
  4. package/.history/.env_20231003143620 +1 -0
  5. package/.history/.eslintrc_20230928112617.js +26 -0
  6. package/.history/.eslintrc_20230928130534.js +27 -0
  7. package/.history/.eslintrc_20230928133400.js +28 -0
  8. package/.history/.eslintrc_20230928133404.js +28 -0
  9. package/.history/.eslintrc_20230928133416.js +28 -0
  10. package/.history/.eslintrc_20230928133419.js +28 -0
  11. package/.history/.eslintrc_20230928133432.js +28 -0
  12. package/.history/.eslintrc_20230928133439.js +28 -0
  13. package/.history/.eslintrc_20230928133458.js +29 -0
  14. package/.history/.eslintrc_20230928133500.js +28 -0
  15. package/.history/.eslintrc_20230928134009.js +28 -0
  16. package/.history/.eslintrc_20230928135318.js +34 -0
  17. package/.history/.eslintrc_20230928135321.js +34 -0
  18. package/.history/.eslintrc_20230928135323.js +34 -0
  19. package/.history/.eslintrc_20230928135332.js +34 -0
  20. package/.history/.eslintrc_20230928135333.js +34 -0
  21. package/.history/.eslintrc_20230928135352.js +29 -0
  22. package/.history/.eslintrc_20230928135353.js +29 -0
  23. package/.history/.eslintrc_20230928135355.js +29 -0
  24. package/.history/.eslintrc_20230928135408.js +29 -0
  25. package/.history/.eslintrc_20230928135538.js +30 -0
  26. package/.history/.eslintrc_20230928135539.js +30 -0
  27. package/.history/.eslintrc_20230928135543.js +30 -0
  28. package/.history/.gitignore_20230921093332 +119 -0
  29. package/.history/.gitignore_20230921111638 +120 -0
  30. package/.history/.gitignore_20230921111650 +120 -0
  31. package/.history/.gitignore_20230921111810 +121 -0
  32. package/.history/package-lock_20231114111138.json +47810 -0
  33. package/.history/package-lock_20231114111158.json +47802 -0
  34. package/.history/package_20231029152422.json +82 -0
  35. package/.history/package_20231029153420.json +82 -0
  36. package/.history/package_20231029154416.json +82 -0
  37. package/.history/package_20231030094127.json +82 -0
  38. package/.history/package_20231030114707.json +82 -0
  39. package/.history/package_20231030130704.json +82 -0
  40. package/.history/package_20231030132422.json +82 -0
  41. package/.history/package_20231030134051.json +82 -0
  42. package/.history/package_20231030142913.json +82 -0
  43. package/.history/package_20231030143556.json +82 -0
  44. package/.history/package_20231030144210.json +82 -0
  45. package/.history/package_20231101113942.json +82 -0
  46. package/.history/package_20231101114544.json +82 -0
  47. package/.history/package_20231101151518.json +82 -0
  48. package/.history/package_20231101154501.json +82 -0
  49. package/.history/package_20231101155811.json +82 -0
  50. package/.history/package_20231101160235.json +82 -0
  51. package/.history/package_20231101160406.json +82 -0
  52. package/.history/package_20231101161325.json +82 -0
  53. package/.history/package_20231101161333.json +82 -0
  54. package/.history/package_20231102123623.json +82 -0
  55. package/.history/package_20231102125741.json +82 -0
  56. package/.history/package_20231102130857.json +82 -0
  57. package/.history/package_20231102132227.json +82 -0
  58. package/.history/package_20231102142340.json +82 -0
  59. package/.history/package_20231102143256.json +82 -0
  60. package/.history/package_20231105153539.json +82 -0
  61. package/.history/package_20231105154332.json +82 -0
  62. package/.history/package_20231105171201.json +82 -0
  63. package/.history/package_20231106123849.json +82 -0
  64. package/.history/package_20231107170638.json +82 -0
  65. package/.history/package_20231109103647.json +82 -0
  66. package/.history/package_20231109103911.json +82 -0
  67. package/.history/package_20231109105426.json +82 -0
  68. package/.history/package_20231109132014.json +82 -0
  69. package/.history/package_20231109132115.json +82 -0
  70. package/.history/package_20231114100517.json +82 -0
  71. package/.history/package_20231114100859.json +82 -0
  72. package/.history/package_20231114101553.json +82 -0
  73. package/.history/package_20231114102545.json +82 -0
  74. package/.history/package_20231114111208.json +83 -0
  75. package/.history/package_20231114111515.json +83 -0
  76. package/.history/package_20231114112931.json +83 -0
  77. package/.history/package_20231114113014.json +83 -0
  78. package/.history/package_20231114113155.json +83 -0
  79. package/.history/package_20231114124318.json +83 -0
  80. package/.history/package_20231114125107.json +83 -0
  81. package/.history/package_20231114125510.json +83 -0
  82. package/.history/package_20231114132634.json +83 -0
  83. package/.history/package_20231116165815.json +83 -0
  84. package/.history/package_20231116165916.json +83 -0
  85. package/.history/package_20231119113637.json +83 -0
  86. package/.history/package_20231120100907.json +83 -0
  87. package/.history/package_20231121151523.json +77 -0
  88. package/.history/package_20231121155513.json +77 -0
  89. package/.history/package_20231121162434.json +77 -0
  90. package/.history/package_20231122100718.json +77 -0
  91. package/.history/package_20231128125149.json +82 -0
  92. package/.history/package_20231128125208.json +82 -0
  93. package/dist/stories/components/Benchmark.js +28 -28
  94. package/dist/stories/components/Button.js +55 -41
  95. package/dist/stories/components/CodeEditor.js +40 -0
  96. package/dist/stories/components/CodeEditor.style.js +12 -0
  97. package/dist/stories/components/CommonFunctions.js +16 -19
  98. package/dist/stories/components/KpiFilter.js +46 -42
  99. package/dist/stories/components/Modal.js +19 -0
  100. package/dist/stories/components/Modal.style.js +17 -0
  101. package/dist/stories/components/ModalTotalBenchmark.js +190 -0
  102. package/dist/stories/components/ModalTotalCost.js +142 -0
  103. package/dist/stories/components/NoDataFoundMessage.js +5 -3
  104. package/dist/stories/components/OneColumnContainer.js +37 -27
  105. package/dist/stories/components/PerformanceAnalytics.js +43 -67
  106. package/dist/stories/components/PerformanceAnalyticsLegend.js +14 -10
  107. package/dist/stories/components/PerformanceAnalyticsOneColumn.js +60 -65
  108. package/dist/stories/components/PerformanceAnalyticsTotals.js +20 -18
  109. package/dist/stories/components/SegmentedButton.js +35 -26
  110. package/dist/stories/components/TitleDescription.js +45 -21
  111. package/dist/stories/components/TotalBenchmark.js +24 -18
  112. package/dist/stories/components/TotalBenchmarkAreachart.js +56 -51
  113. package/dist/stories/components/TotalBenchmarkArrows.js +38 -24
  114. package/dist/stories/components/TotalBenchmarkBarchart.js +40 -26
  115. package/dist/stories/utils/ComponentFactory.js +34 -0
  116. package/package.json +7 -4
@@ -1,34 +1,26 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = exports.TotalBenchmark = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
10
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
11
10
  var _react = _interopRequireWildcard(require("react"));
12
11
  var _NoDataFoundMessage = require("./NoDataFoundMessage");
13
12
  var _CommonFunctions = require("./CommonFunctions");
14
13
  var _Benchmark = require("./Benchmark");
15
14
  var _TotalBenchmark = require("./TotalBenchmark.style");
16
- var _excluded = ["data", "dotCut", "width", "height", "addingBenchmark", "textcolor", "noDataText"];
17
15
  /* TotalBenchmark */
18
- var TotalBenchmark = exports.TotalBenchmark = function TotalBenchmark(_ref) {
19
- var data = _ref.data,
20
- _ref$dotCut = _ref.dotCut,
21
- dotCut = _ref$dotCut === void 0 ? true : _ref$dotCut,
22
- _ref$width = _ref.width,
23
- width = _ref$width === void 0 ? '260px' : _ref$width,
24
- _ref$height = _ref.height,
25
- height = _ref$height === void 0 ? '350px' : _ref$height,
26
- addingBenchmark = _ref.addingBenchmark,
27
- _ref$textcolor = _ref.textcolor,
28
- textcolor = _ref$textcolor === void 0 ? '#212121' : _ref$textcolor,
29
- _ref$noDataText = _ref.noDataText,
30
- noDataText = _ref$noDataText === void 0 ? '' : _ref$noDataText,
31
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
16
+ var TotalBenchmark = exports.TotalBenchmark = function TotalBenchmark(props) {
17
+ var data = props.data,
18
+ dotCut = props.dotCut,
19
+ addingBenchmark = props.addingBenchmark,
20
+ width = props.width,
21
+ height = props.height,
22
+ textcolor = props.textcolor,
23
+ noDataText = props.noDataText;
32
24
  var DEFAULT_ROOT_FONT = 16;
33
25
  var DEFAULT_COMPONENT_WIDTH = 250;
34
26
  var _useState = (0, _react.useState)(DEFAULT_ROOT_FONT.toString().concat('', 'px')),
@@ -92,4 +84,18 @@ var TotalBenchmark = exports.TotalBenchmark = function TotalBenchmark(_ref) {
92
84
  noDataText: noDataText
93
85
  })));
94
86
  };
95
- var _default = exports.default = TotalBenchmark;
87
+ var _default = exports.default = TotalBenchmark;
88
+ TotalBenchmark.defaultProps = {
89
+ data: {
90
+ title: 'Redemptions',
91
+ value: 60000,
92
+ totalValue: 20000,
93
+ benchmarkValue: 1000
94
+ },
95
+ dotCut: true,
96
+ width: '260px',
97
+ height: '350px',
98
+ addingBenchmark: true,
99
+ textcolor: '#212121',
100
+ noDataText: ''
101
+ };
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = exports.TotalBenchmarkAreachart = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
10
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
11
10
  var _react = _interopRequireWildcard(require("react"));
12
11
  var _recharts = require("recharts");
13
12
  var _ArrowUpIcon = require("./icons/ArrowUpIcon");
@@ -16,46 +15,29 @@ var _NoDataFoundMessage = require("./NoDataFoundMessage");
16
15
  var _Benchmark = require("./Benchmark");
17
16
  var _TotalBenchmarkAreachart = require("./TotalBenchmarkAreachart.style");
18
17
  var _CommonFunctions = require("./CommonFunctions");
19
- var _excluded = ["title", "value", "arrowSign", "addingBenchmark", "benchmarkTotalValue", "benchmarkValue", "areaChartData", "width", "height", "textcolor", "areaChart1Color", "areaChart2Color", "xselectedColor", "fillChart1Color", "fillChart2Color", "startOffset", "endOffset", "opacity", "value1Title", "value2Title", "noDataText"];
20
18
  /* TotalBenchmarkAreachart */
21
- var TotalBenchmarkAreachart = exports.TotalBenchmarkAreachart = function TotalBenchmarkAreachart(_ref) {
22
- var title = _ref.title,
23
- value = _ref.value,
24
- _ref$arrowSign = _ref.arrowSign,
25
- arrowSign = _ref$arrowSign === void 0 ? 'up' : _ref$arrowSign,
26
- addingBenchmark = _ref.addingBenchmark,
27
- benchmarkTotalValue = _ref.benchmarkTotalValue,
28
- benchmarkValue = _ref.benchmarkValue,
29
- areaChartData = _ref.areaChartData,
30
- _ref$width = _ref.width,
31
- width = _ref$width === void 0 ? '250px' : _ref$width,
32
- _ref$height = _ref.height,
33
- height = _ref$height === void 0 ? '280px' : _ref$height,
34
- _ref$textcolor = _ref.textcolor,
35
- textcolor = _ref$textcolor === void 0 ? '#212121' : _ref$textcolor,
36
- _ref$areaChart1Color = _ref.areaChart1Color,
37
- areaChart1Color = _ref$areaChart1Color === void 0 ? '#BD9EFF' : _ref$areaChart1Color,
38
- _ref$areaChart2Color = _ref.areaChart2Color,
39
- areaChart2Color = _ref$areaChart2Color === void 0 ? '#96B4FF' : _ref$areaChart2Color,
40
- _ref$xselectedColor = _ref.xselectedColor,
41
- xselectedColor = _ref$xselectedColor === void 0 ? '#42977A' : _ref$xselectedColor,
42
- _ref$fillChart1Color = _ref.fillChart1Color,
43
- fillChart1Color = _ref$fillChart1Color === void 0 ? 'rgba(34, 158, 56, 0.20)' : _ref$fillChart1Color,
44
- _ref$fillChart2Color = _ref.fillChart2Color,
45
- fillChart2Color = _ref$fillChart2Color === void 0 ? 'rgba(255, 84, 84, 0.2)' : _ref$fillChart2Color,
46
- _ref$startOffset = _ref.startOffset,
47
- startOffset = _ref$startOffset === void 0 ? '17.04%' : _ref$startOffset,
48
- _ref$endOffset = _ref.endOffset,
49
- endOffset = _ref$endOffset === void 0 ? '17.04%' : _ref$endOffset,
50
- _ref$opacity = _ref.opacity,
51
- opacity = _ref$opacity === void 0 ? '191' : _ref$opacity,
52
- _ref$value1Title = _ref.value1Title,
53
- value1Title = _ref$value1Title === void 0 ? 'Actual Sales' : _ref$value1Title,
54
- _ref$value2Title = _ref.value2Title,
55
- value2Title = _ref$value2Title === void 0 ? 'Baseline Sales' : _ref$value2Title,
56
- _ref$noDataText = _ref.noDataText,
57
- noDataText = _ref$noDataText === void 0 ? '' : _ref$noDataText,
58
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
19
+ var TotalBenchmarkAreachart = exports.TotalBenchmarkAreachart = function TotalBenchmarkAreachart(props) {
20
+ var title = props.title,
21
+ value = props.value,
22
+ arrowSign = props.arrowSign,
23
+ addingBenchmark = props.addingBenchmark,
24
+ benchmarkTotalValue = props.benchmarkTotalValue,
25
+ benchmarkValue = props.benchmarkValue,
26
+ areaChartData = props.areaChartData,
27
+ width = props.width,
28
+ height = props.height,
29
+ textcolor = props.textcolor,
30
+ areaChart1Color = props.areaChart1Color,
31
+ areaChart2Color = props.areaChart2Color,
32
+ xselectedColor = props.xselectedColor,
33
+ fillChart1Color = props.fillChart1Color,
34
+ fillChart2Color = props.fillChart2Color,
35
+ startOffset = props.startOffset,
36
+ endOffset = props.endOffset,
37
+ opacity = props.opacity,
38
+ value1Title = props.value1Title,
39
+ value2Title = props.value2Title,
40
+ noDataText = props.noDataText;
59
41
  var DEFAULT_ROOT_FONT = 16;
60
42
  var DEFAULT_COMPONENT_WIDTH = 250;
61
43
  var DEFAULT_COMPONENT_HEIGHT = 280;
@@ -113,11 +95,11 @@ var TotalBenchmarkAreachart = exports.TotalBenchmarkAreachart = function TotalBe
113
95
  height: 25 * getSizeFactor()
114
96
  }));
115
97
  };
116
- var CustomTick = function CustomTick(_ref2) {
117
- var x = _ref2.x,
118
- y = _ref2.y,
119
- stroke = _ref2.stroke,
120
- payload = _ref2.payload;
98
+ var CustomTick = function CustomTick(_ref) {
99
+ var x = _ref.x,
100
+ y = _ref.y,
101
+ stroke = _ref.stroke,
102
+ payload = _ref.payload;
121
103
  return /*#__PURE__*/_react.default.createElement("g", {
122
104
  transform: "translate(".concat(x, ",").concat(y, ")")
123
105
  }, activeLabel === payload.value && /*#__PURE__*/_react.default.createElement("rect", {
@@ -136,10 +118,10 @@ var TotalBenchmarkAreachart = exports.TotalBenchmarkAreachart = function TotalBe
136
118
  fontSize: "14px"
137
119
  }, payload.value));
138
120
  };
139
- var CustomTooltip = function CustomTooltip(_ref3) {
140
- var active = _ref3.active,
141
- payload = _ref3.payload,
142
- label = _ref3.label;
121
+ var CustomTooltip = function CustomTooltip(_ref2) {
122
+ var active = _ref2.active,
123
+ payload = _ref2.payload,
124
+ label = _ref2.label;
143
125
  if (active && payload && payload.length) {
144
126
  setActiveLabel(label);
145
127
  return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TooltipDiv, null, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TooltipTitle, null, "".concat(label)), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TooltipLabel, null, "".concat(value1Title, " ").concat((0, _CommonFunctions.getFormattedValue)(payload[0].value)).concat((0, _CommonFunctions.getFormattedUnits)(payload[0].value))), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TooltipLabel, null, "".concat(value2Title, " ").concat((0, _CommonFunctions.getFormattedValue)(payload[1].value)).concat((0, _CommonFunctions.getFormattedUnits)(payload[1].value))));
@@ -254,4 +236,27 @@ var TotalBenchmarkAreachart = exports.TotalBenchmarkAreachart = function TotalBe
254
236
  noDataText: noDataText
255
237
  }));
256
238
  };
257
- var _default = exports.default = TotalBenchmarkAreachart;
239
+ var _default = exports.default = TotalBenchmarkAreachart;
240
+ TotalBenchmarkAreachart.defaultProps = {
241
+ title: 'String',
242
+ value: 300,
243
+ arrowSign: '$',
244
+ addingBenchmark: true,
245
+ benchmarkTotalValue: '',
246
+ benchmarkValue: null,
247
+ areaChartData: '',
248
+ width: '250px',
249
+ height: '280px',
250
+ textcolor: '#212121',
251
+ areaChart1Color: '#BD9EFF',
252
+ areaChart2Color: '#96B4FF',
253
+ xselectedColor: '#42977A',
254
+ fillChart1Color: 'rgba(34, 158, 56, 0.20)',
255
+ fillChart2Color: 'rgba(255, 84, 84, 0.2)',
256
+ startOffset: '17.04%',
257
+ endOffset: '17.04%',
258
+ opacity: '191',
259
+ value1Title: 'Actual Sales',
260
+ value2Title: 'Baseline Sales',
261
+ noDataText: ''
262
+ };
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = exports.TotalBenchmarkArrows = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
10
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
11
10
  var _react = _interopRequireWildcard(require("react"));
12
11
  var _ArrowUpIcon = require("./icons/ArrowUpIcon");
13
12
  var _ArrowDownIcon = require("./icons/ArrowDownIcon");
@@ -15,28 +14,20 @@ var _NoDataFoundMessage = require("./NoDataFoundMessage");
15
14
  var _CommonFunctions = require("./CommonFunctions");
16
15
  var _Benchmark = require("./Benchmark");
17
16
  var _TotalBenchmarkArrows = require("./TotalBenchmarkArrows.style");
18
- var _excluded = ["title", "value", "addingBenchmark", "benchmarkTotalValue", "benchmarkValue", "detailsTitle", "detailsData", "dotCut", "width", "height", "textcolor", "noDataText"];
19
17
  /* TotalBenchmarkArrows */
20
- var TotalBenchmarkArrows = exports.TotalBenchmarkArrows = function TotalBenchmarkArrows(_ref) {
21
- var title = _ref.title,
22
- value = _ref.value,
23
- addingBenchmark = _ref.addingBenchmark,
24
- benchmarkTotalValue = _ref.benchmarkTotalValue,
25
- benchmarkValue = _ref.benchmarkValue,
26
- _ref$detailsTitle = _ref.detailsTitle,
27
- detailsTitle = _ref$detailsTitle === void 0 ? '' : _ref$detailsTitle,
28
- detailsData = _ref.detailsData,
29
- _ref$dotCut = _ref.dotCut,
30
- dotCut = _ref$dotCut === void 0 ? true : _ref$dotCut,
31
- _ref$width = _ref.width,
32
- width = _ref$width === void 0 ? '250px' : _ref$width,
33
- _ref$height = _ref.height,
34
- height = _ref$height === void 0 ? '280px' : _ref$height,
35
- _ref$textcolor = _ref.textcolor,
36
- textcolor = _ref$textcolor === void 0 ? '#212121' : _ref$textcolor,
37
- _ref$noDataText = _ref.noDataText,
38
- noDataText = _ref$noDataText === void 0 ? '' : _ref$noDataText,
39
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
18
+ var TotalBenchmarkArrows = exports.TotalBenchmarkArrows = function TotalBenchmarkArrows(props) {
19
+ var title = props.title,
20
+ value = props.value,
21
+ addingBenchmark = props.addingBenchmark,
22
+ benchmarkTotalValue = props.benchmarkTotalValue,
23
+ benchmarkValue = props.benchmarkValue,
24
+ detailsTitle = props.detailsTitle,
25
+ detailsData = props.detailsData,
26
+ dotCut = props.dotCut,
27
+ width = props.width,
28
+ height = props.height,
29
+ textcolor = props.textcolor,
30
+ noDataText = props.noDataText;
40
31
  var DEFAULT_ROOT_FONT = 16;
41
32
  var DEFAULT_COMPONENT_WIDTH = 250;
42
33
  var DEFAULT_COMPONENT_HEIGHT = 280;
@@ -137,4 +128,27 @@ var TotalBenchmarkArrows = exports.TotalBenchmarkArrows = function TotalBenchmar
137
128
  noDataText: noDataText
138
129
  }));
139
130
  };
140
- var _default = exports.default = TotalBenchmarkArrows;
131
+ var _default = exports.default = TotalBenchmarkArrows;
132
+ TotalBenchmarkArrows.defaultProps = {
133
+ title: 'Title',
134
+ value: 100,
135
+ addingBenchmark: 200,
136
+ benchmarkTotalValue: 300,
137
+ benchmarkValue: 400,
138
+ detailsTitle: '',
139
+ detailsData: [{
140
+ title: 'Basket (Units) Change',
141
+ value: null
142
+ }, {
143
+ title: 'Basket ($) Change',
144
+ value: 30
145
+ }, {
146
+ title: 'Visits Change',
147
+ value: 30
148
+ }],
149
+ dotCut: true,
150
+ width: '250px',
151
+ height: '280px',
152
+ textcolor: '#212121',
153
+ noDataText: ''
154
+ };
@@ -1,44 +1,35 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = exports.TotalBenchmarkBarchart = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
10
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
11
10
  var _react = _interopRequireWildcard(require("react"));
12
11
  var _recharts = require("recharts");
13
12
  var _NoDataFoundMessage = require("./NoDataFoundMessage");
14
13
  var _CommonFunctions = require("./CommonFunctions");
15
14
  var _Benchmark = require("./Benchmark");
16
15
  var _TotalBenchmarkBarchart = require("./TotalBenchmarkBarchart.style");
17
- var _excluded = ["title", "value", "addingBenchmark", "benchmarkTotalValue", "benchmarkValue", "currency", "currencyType", "barChartData", "dotCut", "width", "height", "textcolor", "noDataText"];
18
16
  /* TotalBenchmarkBarchart */
19
- var TotalBenchmarkBarchart = exports.TotalBenchmarkBarchart = function TotalBenchmarkBarchart(_ref) {
17
+ var TotalBenchmarkBarchart = exports.TotalBenchmarkBarchart = function TotalBenchmarkBarchart(props) {
20
18
  var _getFormattedBarChart, _getFormattedBarChart2;
21
- var title = _ref.title,
22
- value = _ref.value,
23
- addingBenchmark = _ref.addingBenchmark,
24
- benchmarkTotalValue = _ref.benchmarkTotalValue,
25
- benchmarkValue = _ref.benchmarkValue,
26
- _ref$currency = _ref.currency,
27
- currency = _ref$currency === void 0 ? true : _ref$currency,
28
- _ref$currencyType = _ref.currencyType,
29
- currencyType = _ref$currencyType === void 0 ? 'USD' : _ref$currencyType,
30
- barChartData = _ref.barChartData,
31
- _ref$dotCut = _ref.dotCut,
32
- dotCut = _ref$dotCut === void 0 ? true : _ref$dotCut,
33
- _ref$width = _ref.width,
34
- width = _ref$width === void 0 ? '250px' : _ref$width,
35
- _ref$height = _ref.height,
36
- height = _ref$height === void 0 ? '280px' : _ref$height,
37
- _ref$textcolor = _ref.textcolor,
38
- textcolor = _ref$textcolor === void 0 ? '#212121' : _ref$textcolor,
39
- _ref$noDataText = _ref.noDataText,
40
- noDataText = _ref$noDataText === void 0 ? '' : _ref$noDataText,
41
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
19
+ var title = props.title,
20
+ value = props.value,
21
+ addingBenchmark = props.addingBenchmark,
22
+ benchmarkTotalValue = props.benchmarkTotalValue,
23
+ benchmarkValue = props.benchmarkValue,
24
+ currency = props.currency,
25
+ currencyType = props.currencyType,
26
+ barChartData = props.barChartData,
27
+ _props$dotCut = props.dotCut,
28
+ dotCut = _props$dotCut === void 0 ? true : _props$dotCut,
29
+ width = props.width,
30
+ height = props.height,
31
+ textcolor = props.textcolor,
32
+ noDataText = props.noDataText;
42
33
  var DEFAULT_ROOT_FONT = 16;
43
34
  var DEFAULT_COMPONENT_WIDTH = 250;
44
35
  var DEFAULT_COMPONENT_HEIGHT = 280;
@@ -209,4 +200,27 @@ var TotalBenchmarkBarchart = exports.TotalBenchmarkBarchart = function TotalBenc
209
200
  noDataText: noDataText
210
201
  }));
211
202
  };
212
- var _default = exports.default = TotalBenchmarkBarchart;
203
+ var _default = exports.default = TotalBenchmarkBarchart;
204
+ TotalBenchmarkBarchart.defaultProps = {
205
+ title: 'Title',
206
+ value: 100,
207
+ addingBenchmark: 200,
208
+ benchmarkTotalValue: 300,
209
+ benchmarkValue: 400,
210
+ currency: true,
211
+ currencyType: 'USD',
212
+ barChartData: [{
213
+ title: 'New Redeemers',
214
+ value: 256200,
215
+ color: '#85A1D2'
216
+ }, {
217
+ title: 'Existing Redeemers',
218
+ value: 700000,
219
+ color: '#9AE6FF'
220
+ }],
221
+ dotCut: true,
222
+ width: '250px',
223
+ height: '280px',
224
+ textcolor: '#212121',
225
+ noDataText: ''
226
+ };
@@ -0,0 +1,34 @@
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 _TotalDoughnutChart = _interopRequireDefault(require("../components/TotalDoughnutChart"));
9
+ var Factory = function Factory(_ref) {
10
+ var componentName = _ref.componentName;
11
+ switch (componentName) {
12
+ case 'TotalDoughnutChart':
13
+ return _TotalDoughnutChart.default;
14
+
15
+ // case 'TotalDoughnutChart':
16
+ // return TotalDoughnutChart,
17
+
18
+ // case 'TotalDoughnutChart':
19
+ // return TotalDoughnutChart,
20
+
21
+ // case 'TotalDoughnutChart':
22
+ // return TotalDoughnutChart,
23
+
24
+ // case 'TotalDoughnutChart':
25
+ // return TotalDoughnutChart;
26
+
27
+ // case 'TotalDoughnutChart':
28
+ // return TotalDoughnutChart;
29
+
30
+ default:
31
+ return _TotalDoughnutChart.default;
32
+ }
33
+ };
34
+ var _default = exports.default = Factory;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.346",
3
+ "version": "1.0.347",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -14,13 +14,11 @@
14
14
  "author": "SAG",
15
15
  "license": "ISC",
16
16
  "devDependencies": {
17
- "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
18
17
  "@babel/cli": "^7.23.0",
18
+ "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
19
19
  "@babel/preset-env": "^7.23.2",
20
20
  "@babel/preset-react": "^7.22.15",
21
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
22
  "@storybook/addon-designs": "^7.0.5",
25
23
  "@storybook/addon-essentials": "^7.4.6",
26
24
  "@storybook/addon-interactions": "^7.4.6",
@@ -33,6 +31,8 @@
33
31
  "@storybook/react-webpack5": "^7.4.6",
34
32
  "@storybook/testing-library": "^0.2.2",
35
33
  "@storybook/theming": "^7.5.3",
34
+ "babel-plugin-react-css-modules": "^5.2.6",
35
+ "babel-preset-react-app": "^10.0.1",
36
36
  "cross-env": "^7.0.3",
37
37
  "css-loader": "^6.8.1",
38
38
  "eslint": "^8.53.0",
@@ -42,6 +42,7 @@
42
42
  "eslint-plugin-react": "^7.33.2",
43
43
  "eslint-plugin-react-hooks": "^4.6.0",
44
44
  "react-dom": "^18.2.0",
45
+ "react-scripts": "^5.0.1",
45
46
  "sass": "^1.69.5",
46
47
  "sass-loader": "^13.3.2",
47
48
  "style-loader": "^3.3.3"
@@ -56,7 +57,9 @@
56
57
  "dayjs": "^1.11.10",
57
58
  "prop-types": "^15.8.1",
58
59
  "react": "^18.2.0",
60
+ "react-ace": "^10.1.0",
59
61
  "react-css-modules": "^4.7.11",
62
+ "react-hook-form": "^7.46.2",
60
63
  "react-loading-skeleton": "^3.3.1",
61
64
  "recharts": "^2.9.2",
62
65
  "storybook": "^7.4.6",