sag_components 2.0.0-beta2 → 2.0.0-beta4

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/dist/index.js CHANGED
@@ -39532,7 +39532,7 @@ generateCategoricalChart({
39532
39532
  /**
39533
39533
  * @fileOverview Bar Chart
39534
39534
  */
39535
- var BarChart = generateCategoricalChart({
39535
+ var BarChart$1 = generateCategoricalChart({
39536
39536
  chartName: 'BarChart',
39537
39537
  GraphicalChild: Bar,
39538
39538
  defaultTooltipEventType: 'axis',
@@ -43172,7 +43172,7 @@ const scrollableStyles$a = `
43172
43172
  border-radius: 5px;
43173
43173
  }
43174
43174
  `;
43175
- const ControlsContainer$8 = dt.div`
43175
+ const ControlsContainer$9 = dt.div`
43176
43176
  position: relative;
43177
43177
  font-family: "Poppins", sans-serif;
43178
43178
  font-style: normal;
@@ -43191,7 +43191,7 @@ const ControlsContainer$8 = dt.div`
43191
43191
  box-sizing: border-box;
43192
43192
  }
43193
43193
  `;
43194
- const Controls$5 = dt.div`
43194
+ const Controls$6 = dt.div`
43195
43195
  display: flex;
43196
43196
  flex-direction: column;
43197
43197
  width: 100%;
@@ -43222,7 +43222,7 @@ const TitleAndValueContainer$4 = dt.div`
43222
43222
  flex-direction: column;
43223
43223
  padding: 0 20px;
43224
43224
  `;
43225
- const Title$9 = dt.h4`
43225
+ const Title$a = dt.h4`
43226
43226
  font-weight: 400;
43227
43227
  font-size: 18px;
43228
43228
  margin: 0 0 8px;
@@ -43302,7 +43302,7 @@ const LegendFormattedValue$1 = dt.span`
43302
43302
  white-space: nowrap;
43303
43303
  `;
43304
43304
 
43305
- const ControlsContainer$7 = dt.div`
43305
+ const ControlsContainer$8 = dt.div`
43306
43306
  display: flex;
43307
43307
  position: relative;
43308
43308
  margin: 0px 0 0px;
@@ -43315,7 +43315,7 @@ const ControlsContainer$7 = dt.div`
43315
43315
  //border: 1px solid red;
43316
43316
  align-items: center;
43317
43317
  `;
43318
- const Controls$4 = dt.div`
43318
+ const Controls$5 = dt.div`
43319
43319
  position: relative;
43320
43320
  border-radius: 100px;
43321
43321
  width: ${props => props.width.toString().concat('', 'px')};
@@ -43563,7 +43563,7 @@ const Benchmark = props => {
43563
43563
  return width * (benchmarkValue / totalValue);
43564
43564
  };
43565
43565
  const getTooltipText = () => /*#__PURE__*/React__default["default"].createElement("h4", null, tooltipLabel, tooltipLabel ? ': ' : '', getFormattedValue(benchmarkValue)?.toString(), getFormattedUnits(benchmarkValue)?.toString());
43566
- return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$7, {
43566
+ return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$8, {
43567
43567
  id: "ControlsContainer",
43568
43568
  height: height,
43569
43569
  width: width
@@ -43571,7 +43571,7 @@ const Benchmark = props => {
43571
43571
  id: "Tooltip",
43572
43572
  content: getTooltipText(),
43573
43573
  direction: tooltipDirection
43574
- }, /*#__PURE__*/React__default["default"].createElement(Controls$4, {
43574
+ }, /*#__PURE__*/React__default["default"].createElement(Controls$5, {
43575
43575
  id: "ControlsBenchmark",
43576
43576
  height: height,
43577
43577
  width: width
@@ -43688,7 +43688,7 @@ const PieChart = props => {
43688
43688
  }
43689
43689
  return null;
43690
43690
  };
43691
- return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$8, {
43691
+ return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$9, {
43692
43692
  className: className,
43693
43693
  height: height,
43694
43694
  width: width,
@@ -43696,13 +43696,13 @@ const PieChart = props => {
43696
43696
  }, legendData.length === 0 || legendData.every(item => item.value === undefined || item.value === null) ? /*#__PURE__*/React__default["default"].createElement(NoDataFoundMessage, {
43697
43697
  className: "NoDataFoundMessage",
43698
43698
  noDataText: noDataText
43699
- }) : /*#__PURE__*/React__default["default"].createElement(Controls$5, {
43699
+ }) : /*#__PURE__*/React__default["default"].createElement(Controls$6, {
43700
43700
  className: "Controls",
43701
43701
  height: height,
43702
43702
  width: width
43703
43703
  }, !hideTitleAndValue && /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$4, {
43704
43704
  className: "TitleAndValueContainer"
43705
- }, /*#__PURE__*/React__default["default"].createElement(Title$9, {
43705
+ }, /*#__PURE__*/React__default["default"].createElement(Title$a, {
43706
43706
  className: "Title"
43707
43707
  }, title), /*#__PURE__*/React__default["default"].createElement(CurrencySignAndFormattedValueContainer$2, {
43708
43708
  className: "CurrencySignAndFormattedValueContainer"
@@ -44658,7 +44658,7 @@ EventDetailsCard.defaultProps = {
44658
44658
  disableViewDetailsButton: false
44659
44659
  };
44660
44660
 
44661
- const LinnerContainer = dt.div`
44661
+ const LinnerContainer$1 = dt.div`
44662
44662
  font-family: "Poppins", sans-serif;
44663
44663
  display: flex;
44664
44664
  justify-content: space-between;
@@ -44675,11 +44675,11 @@ const DataBoxWrap = dt.div`
44675
44675
  width: ${props => props.width};
44676
44676
  height: 100%;
44677
44677
  `;
44678
- const DataBox = dt.div`
44678
+ const DataBox$1 = dt.div`
44679
44679
  color: #212121;
44680
44680
  font-weight: 400;
44681
44681
  `;
44682
- const DataBoxTitle = dt.span`
44682
+ const DataBoxTitle$1 = dt.span`
44683
44683
  font-size: 18px;
44684
44684
  font-weight: 500;
44685
44685
  `;
@@ -44729,7 +44729,7 @@ const LinnerDataBox = props => {
44729
44729
  className,
44730
44730
  customDataFormat
44731
44731
  } = props;
44732
- return /*#__PURE__*/React__default["default"].createElement(LinnerContainer, {
44732
+ return /*#__PURE__*/React__default["default"].createElement(LinnerContainer$1, {
44733
44733
  className: className,
44734
44734
  backgroundColor: backgroundColor,
44735
44735
  width: width || "100%",
@@ -44738,7 +44738,7 @@ const LinnerDataBox = props => {
44738
44738
  }, data.map((item, index) => /*#__PURE__*/React__default["default"].createElement(DataBoxWrap, {
44739
44739
  key: `${item.title}`,
44740
44740
  width: `${100 / data.length}%`
44741
- }, /*#__PURE__*/React__default["default"].createElement(DataBox, null, item.title && /*#__PURE__*/React__default["default"].createElement(DataBoxTitle, {
44741
+ }, /*#__PURE__*/React__default["default"].createElement(DataBox$1, null, item.title && /*#__PURE__*/React__default["default"].createElement(DataBoxTitle$1, {
44742
44742
  className: "DataBoxTitle"
44743
44743
  }, item.title), /*#__PURE__*/React__default["default"].createElement(DataBoxContent, null, item.value !== null && item.value !== undefined && !isNaN(item.value) && item.value !== "null" && item.value !== "undefined" ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, item.sign && /*#__PURE__*/React__default["default"].createElement(DataBoxContentSign, null, item.sign), customDataFormat ? /*#__PURE__*/React__default["default"].createElement(DataBoxContentValue, {
44744
44744
  className: "DataBoxValue"
@@ -45149,7 +45149,7 @@ const SagIconButtonWrapper = dt.button`
45149
45149
  box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);
45150
45150
  }
45151
45151
  `;
45152
- const SpanText = dt.span`
45152
+ const SpanText$1 = dt.span`
45153
45153
  `;
45154
45154
 
45155
45155
  const SagIconButton = props => {
@@ -45245,7 +45245,7 @@ const SagIconButton = props => {
45245
45245
  onClick: event => {
45246
45246
  onClickHandler(event);
45247
45247
  }
45248
- }, getIcon(iconName), buttonText && /*#__PURE__*/React__default["default"].createElement(SpanText, null, buttonText));
45248
+ }, getIcon(iconName), buttonText && /*#__PURE__*/React__default["default"].createElement(SpanText$1, null, buttonText));
45249
45249
  };
45250
45250
  SagIconButton.propTypes = {
45251
45251
  className: PropTypes.string,
@@ -52821,7 +52821,7 @@ MonthPicker.defaultProps = {
52821
52821
  selectedValue: ''
52822
52822
  };
52823
52823
 
52824
- const ControlsContainer$6 = dt.div`
52824
+ const ControlsContainer$7 = dt.div`
52825
52825
  display: flex;
52826
52826
  flex-direction: column;
52827
52827
  justify-content: space-between;
@@ -53441,7 +53441,7 @@ const FilterPanel = props => {
53441
53441
  }
53442
53442
  return content;
53443
53443
  };
53444
- return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$6, {
53444
+ return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$7, {
53445
53445
  className: className,
53446
53446
  height: height,
53447
53447
  width: width,
@@ -53474,9 +53474,20 @@ FilterPanel.propTypes = {
53474
53474
  availableMonths: PropTypes.arrayOf(PropTypes.string),
53475
53475
  availableYears: PropTypes.arrayOf(PropTypes.string),
53476
53476
  fieldsData: PropTypes.arrayOf(PropTypes.shape({
53477
+ disabled: PropTypes.bool,
53478
+ required: PropTypes.bool,
53479
+ inputType: PropTypes.string,
53480
+ placeHolder: PropTypes.string,
53481
+ xIconShow: PropTypes.bool,
53482
+ label: PropTypes.string,
53483
+ labelEmptyValue: PropTypes.string,
53477
53484
  name: PropTypes.string,
53478
53485
  value: PropTypes.number,
53479
- color: PropTypes.string
53486
+ color: PropTypes.string,
53487
+ dropdownOptions: PropTypes.arrayOf(PropTypes.shape({
53488
+ value: PropTypes.string,
53489
+ label: PropTypes.string
53490
+ }))
53480
53491
  })),
53481
53492
  width: PropTypes.string,
53482
53493
  height: PropTypes.string,
@@ -67109,7 +67120,7 @@ const scrollableStyles$3 = `
67109
67120
  border-radius: 5px;
67110
67121
  }
67111
67122
  `;
67112
- const ControlsContainer$5 = dt.div`
67123
+ const ControlsContainer$6 = dt.div`
67113
67124
  position: relative;
67114
67125
  font-family: "Poppins", sans-serif;
67115
67126
  font-style: normal;
@@ -67128,7 +67139,7 @@ const ControlsContainer$5 = dt.div`
67128
67139
  box-sizing: border-box;
67129
67140
  }
67130
67141
  `;
67131
- const Controls$3 = dt.div`
67142
+ const Controls$4 = dt.div`
67132
67143
  display: flex;
67133
67144
  flex-direction: column;
67134
67145
  width: 100%;
@@ -67139,7 +67150,7 @@ const TitleAndValueContainer$3 = dt.div`
67139
67150
  display: flex;
67140
67151
  flex-direction: column;
67141
67152
  `;
67142
- const Title$8 = dt.h4`
67153
+ const Title$9 = dt.h4`
67143
67154
  font-weight: 400;
67144
67155
  font-size: 20px;
67145
67156
  margin: 0;
@@ -67191,18 +67202,18 @@ const FormattedValue$2 = props => {
67191
67202
  textcolor,
67192
67203
  isPercent
67193
67204
  } = props;
67194
- return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$5, {
67205
+ return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$6, {
67195
67206
  className: className || 'FormattedValue_ControlsContainer',
67196
67207
  height: height,
67197
67208
  width: width,
67198
67209
  textcolor: textcolor
67199
- }, /*#__PURE__*/React__default["default"].createElement(Controls$3, {
67210
+ }, /*#__PURE__*/React__default["default"].createElement(Controls$4, {
67200
67211
  className: "Controls",
67201
67212
  height: height,
67202
67213
  width: width
67203
67214
  }, /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$3, {
67204
67215
  className: "TitleAndValueContainer"
67205
- }, title ? /*#__PURE__*/React__default["default"].createElement(Title$8, {
67216
+ }, title ? /*#__PURE__*/React__default["default"].createElement(Title$9, {
67206
67217
  className: "Title",
67207
67218
  width: width
67208
67219
  }, title) : '', showTopValue && /*#__PURE__*/React__default["default"].createElement(CurrencySignAndFormattedValueContainer$1, {
@@ -67214,7 +67225,7 @@ const FormattedValue$2 = props => {
67214
67225
  className: "CurrencySignOrPercent"
67215
67226
  }, currencySign ? getCurrencySign(currencyType, value) : ''), dotCut ? getFormattedValue(value && Math.abs(value) > 0 && value % 1 !== 0 ? value?.toFixed(2) : value) : getNumberWithCommas(value), dotCut ? getFormattedUnits(value) : '', /*#__PURE__*/React__default["default"].createElement(CurrencySignOrPercent, {
67216
67227
  className: "CurrencySignOrPercent"
67217
- }, isPercent ? '%' : ''))), subtitle ? /*#__PURE__*/React__default["default"].createElement(Title$8, {
67228
+ }, isPercent ? '%' : ''))), subtitle ? /*#__PURE__*/React__default["default"].createElement(Title$9, {
67218
67229
  className: "Title",
67219
67230
  width: width
67220
67231
  }, subtitle) : '')));
@@ -67248,7 +67259,7 @@ FormattedValue$2.defaultProps = {
67248
67259
  isPercent: false
67249
67260
  };
67250
67261
 
67251
- const ControlsContainer$4 = dt.div`
67262
+ const ControlsContainer$5 = dt.div`
67252
67263
  position: relative;
67253
67264
  font-family: "Poppins", sans-serif;
67254
67265
  color: #212121;
@@ -67256,27 +67267,27 @@ const ControlsContainer$4 = dt.div`
67256
67267
  height: ${props => props.height};
67257
67268
  min-width: 250px;
67258
67269
  `;
67259
- const Controls$2 = dt.div`
67270
+ const Controls$3 = dt.div`
67260
67271
  height: 100%;
67261
67272
  width: 100%;
67262
67273
  background: white;
67263
67274
  display: flex;
67264
67275
  flex-direction: column;
67265
67276
  `;
67266
- const TooltipDiv$1 = dt.div`
67277
+ const TooltipDiv$2 = dt.div`
67267
67278
  border-radius: 5px;
67268
67279
  padding: 8px 12px;
67269
67280
  background: white;
67270
67281
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);
67271
67282
  margin: 0;
67272
67283
  `;
67273
- const TooltipLabel$1 = dt.div`
67284
+ const TooltipLabel$2 = dt.div`
67274
67285
  color: #212121;
67275
67286
  font-size: 14px;
67276
67287
  font-weight: 400;
67277
67288
  width: fit-content;
67278
67289
  `;
67279
- const TooltipTitle = dt.div`
67290
+ const TooltipTitle$1 = dt.div`
67280
67291
  color: #212121;
67281
67292
  font-size: 14px;
67282
67293
  font-weight: 600;
@@ -67284,7 +67295,7 @@ const TooltipTitle = dt.div`
67284
67295
  const TitleAndValueContainer$2 = dt.div`
67285
67296
  padding: 0 1rem;
67286
67297
  `;
67287
- const Title$7 = dt.h5`
67298
+ const Title$8 = dt.h5`
67288
67299
  font-weight: 500;
67289
67300
  font-size: 18px;
67290
67301
  line-height: 20px;
@@ -67371,7 +67382,7 @@ const LegendLineIcon = ({
67371
67382
  fill: color
67372
67383
  }));
67373
67384
 
67374
- const ControlsContainer$3 = dt.div`
67385
+ const ControlsContainer$4 = dt.div`
67375
67386
  position: relative;
67376
67387
  font-family: "Poppins", sans-serif;
67377
67388
  font-size: ${props => props.rootFont};
@@ -67383,7 +67394,7 @@ const ControlsContainer$3 = dt.div`
67383
67394
  box-sizing: border-box;
67384
67395
  }
67385
67396
  `;
67386
- const Controls$1 = dt.div`
67397
+ const Controls$2 = dt.div`
67387
67398
  display: flex;
67388
67399
  gap: 20px;
67389
67400
  flex-direction: column;
@@ -67407,7 +67418,7 @@ const TitleAndIconContainer = dt.div`
67407
67418
  display: flex;
67408
67419
  align-items: center;
67409
67420
  `;
67410
- const Title$6 = dt.h4`
67421
+ const Title$7 = dt.h4`
67411
67422
  font-weight: 400;
67412
67423
  font-size: 14px;
67413
67424
  line-height: 27px;
@@ -67428,9 +67439,9 @@ const LegendColorRectangle$1 = dt.div`
67428
67439
  `;
67429
67440
 
67430
67441
  /* eslint-disable no-nested-ternary */
67431
- const ICON_TYPE_SQUARE$1 = 'Square';
67432
- const ICON_TYPE_LEGEND_UNION_ICON$1 = 'LegendUnionIcon';
67433
- const ICON_TYPE_LEGEND_LINE_ICON$1 = 'LegendLineIcon';
67442
+ const ICON_TYPE_SQUARE$2 = 'Square';
67443
+ const ICON_TYPE_LEGEND_UNION_ICON$2 = 'LegendUnionIcon';
67444
+ const ICON_TYPE_LEGEND_LINE_ICON$2 = 'LegendLineIcon';
67434
67445
  const PerformanceAnalyticsLegend = props => {
67435
67446
  const {
67436
67447
  className,
@@ -67438,26 +67449,26 @@ const PerformanceAnalyticsLegend = props => {
67438
67449
  width,
67439
67450
  height
67440
67451
  } = props;
67441
- return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$3, {
67452
+ return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$4, {
67442
67453
  className: className,
67443
67454
  height: height,
67444
67455
  width: width
67445
- }, legendData?.length > 0 ? /*#__PURE__*/React__default["default"].createElement(Controls$1, {
67456
+ }, legendData?.length > 0 ? /*#__PURE__*/React__default["default"].createElement(Controls$2, {
67446
67457
  height: height,
67447
67458
  width: width
67448
67459
  }, /*#__PURE__*/React__default["default"].createElement(LegendDataContainer, {
67449
67460
  id: "LegendDataContainer"
67450
67461
  }, legendData?.map((item, i) => /*#__PURE__*/React__default["default"].createElement(TitleAndIconContainer, {
67451
67462
  key: `${item.title + i}`
67452
- }, item.iconType === ICON_TYPE_SQUARE$1 ? /*#__PURE__*/React__default["default"].createElement(LegendColorRectangle$1, {
67463
+ }, item.iconType === ICON_TYPE_SQUARE$2 ? /*#__PURE__*/React__default["default"].createElement(LegendColorRectangle$1, {
67453
67464
  color: item.iconColor
67454
- }) : item.iconType === ICON_TYPE_LEGEND_UNION_ICON$1 ? /*#__PURE__*/React__default["default"].createElement(LegendUnionIcon, {
67465
+ }) : item.iconType === ICON_TYPE_LEGEND_UNION_ICON$2 ? /*#__PURE__*/React__default["default"].createElement(LegendUnionIcon, {
67455
67466
  width: 30,
67456
67467
  height: 30,
67457
67468
  color: item.iconColor
67458
- }) : item.iconType === ICON_TYPE_LEGEND_LINE_ICON$1 ? /*#__PURE__*/React__default["default"].createElement(LegendLineIcon, {
67469
+ }) : item.iconType === ICON_TYPE_LEGEND_LINE_ICON$2 ? /*#__PURE__*/React__default["default"].createElement(LegendLineIcon, {
67459
67470
  color: item.iconColor
67460
- }) : '', /*#__PURE__*/React__default["default"].createElement(Title$6, {
67471
+ }) : '', /*#__PURE__*/React__default["default"].createElement(Title$7, {
67461
67472
  id: "Title",
67462
67473
  width: width
67463
67474
  }, item.title))))) : '');
@@ -67468,7 +67479,7 @@ PerformanceAnalyticsLegend.propTypes = {
67468
67479
  height: PropTypes.string,
67469
67480
  legendData: PropTypes.arrayOf(PropTypes.shape({
67470
67481
  title: PropTypes.string.isRequired,
67471
- iconType: PropTypes.oneOf([ICON_TYPE_SQUARE$1, ICON_TYPE_LEGEND_UNION_ICON$1, ICON_TYPE_LEGEND_LINE_ICON$1]).isRequired,
67482
+ iconType: PropTypes.oneOf([ICON_TYPE_SQUARE$2, ICON_TYPE_LEGEND_UNION_ICON$2, ICON_TYPE_LEGEND_LINE_ICON$2]).isRequired,
67472
67483
  iconColor: PropTypes.string.isRequired
67473
67484
  }))
67474
67485
  };
@@ -67478,15 +67489,15 @@ PerformanceAnalyticsLegend.defaultProps = {
67478
67489
  height: '',
67479
67490
  legendData: [{
67480
67491
  title: '',
67481
- iconType: ICON_TYPE_SQUARE$1,
67492
+ iconType: ICON_TYPE_SQUARE$2,
67482
67493
  iconColor: '#1F7677'
67483
67494
  }]
67484
67495
  };
67485
67496
 
67486
67497
  /* eslint-disable no-nested-ternary */
67487
- const ICON_TYPE_SQUARE = 'Square';
67488
- const ICON_TYPE_LEGEND_UNION_ICON = 'LegendUnionIcon';
67489
- const ICON_TYPE_LEGEND_LINE_ICON = 'LegendLineIcon';
67498
+ const ICON_TYPE_SQUARE$1 = 'Square';
67499
+ const ICON_TYPE_LEGEND_UNION_ICON$1 = 'LegendUnionIcon';
67500
+ const ICON_TYPE_LEGEND_LINE_ICON$1 = 'LegendLineIcon';
67490
67501
  const BarChartsByWeeks = props => {
67491
67502
  const {
67492
67503
  className,
@@ -67575,9 +67586,9 @@ const BarChartsByWeeks = props => {
67575
67586
  let currentTooltipSecondValue = 0;
67576
67587
  if (payload[0].payload?.value) currentTooltipValue = payload[0].payload?.value;
67577
67588
  if (payload[0].payload?.secondValue) currentTooltipSecondValue = payload[0].payload?.secondValue;
67578
- return /*#__PURE__*/React__default["default"].createElement(TooltipDiv$1, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle, null, `${isTitleOriganal ? '' : 'Week: '}${week}`), /*#__PURE__*/React__default["default"].createElement(TooltipLabel$1, null, `${tooltipTitle}
67589
+ return /*#__PURE__*/React__default["default"].createElement(TooltipDiv$2, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle$1, null, `${isTitleOriganal ? '' : 'Week: '}${week}`), /*#__PURE__*/React__default["default"].createElement(TooltipLabel$2, null, `${tooltipTitle}
67579
67590
  ${displayFormattedValue(currentTooltipValue)}
67580
- `), currentTooltipSecondValue ? /*#__PURE__*/React__default["default"].createElement(TooltipLabel$1, null, `${tooltipSecondTitle}
67591
+ `), currentTooltipSecondValue ? /*#__PURE__*/React__default["default"].createElement(TooltipLabel$2, null, `${tooltipSecondTitle}
67581
67592
  ${displayFormattedValue(currentTooltipSecondValue)}
67582
67593
  `) : '');
67583
67594
  };
@@ -67625,14 +67636,14 @@ const BarChartsByWeeks = props => {
67625
67636
  }
67626
67637
  return `${newHeight}px`;
67627
67638
  };
67628
- return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$4, {
67639
+ return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$5, {
67629
67640
  className: className,
67630
67641
  height: height,
67631
67642
  width: width,
67632
67643
  ref: controlsContainerRef
67633
- }, /*#__PURE__*/React__default["default"].createElement(Controls$2, {
67644
+ }, /*#__PURE__*/React__default["default"].createElement(Controls$3, {
67634
67645
  height: getControlsHeight()
67635
- }, showTitle && /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$2, null, /*#__PURE__*/React__default["default"].createElement(Title$7, null, title), /*#__PURE__*/React__default["default"].createElement(FormattedValue$2, {
67646
+ }, showTitle && /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$2, null, /*#__PURE__*/React__default["default"].createElement(Title$8, null, title), /*#__PURE__*/React__default["default"].createElement(FormattedValue$2, {
67636
67647
  title: headerValueTopTitle,
67637
67648
  subtitle: headerValueBottomTitle,
67638
67649
  showTopValue: showHeaderTopValue,
@@ -67643,7 +67654,7 @@ const BarChartsByWeeks = props => {
67643
67654
  })), /*#__PURE__*/React__default["default"].createElement(ResponsiveContainer, {
67644
67655
  width: "100%",
67645
67656
  height: "100%"
67646
- }, /*#__PURE__*/React__default["default"].createElement(BarChart, {
67657
+ }, /*#__PURE__*/React__default["default"].createElement(BarChart$1, {
67647
67658
  width: width,
67648
67659
  height: height,
67649
67660
  data: formmatedData,
@@ -67727,7 +67738,7 @@ BarChartsByWeeks.propTypes = {
67727
67738
  showLegend: PropTypes.bool,
67728
67739
  legendData: PropTypes.arrayOf(PropTypes.shape({
67729
67740
  title: PropTypes.string.isRequired,
67730
- iconType: PropTypes.oneOf([ICON_TYPE_SQUARE, ICON_TYPE_LEGEND_UNION_ICON, ICON_TYPE_LEGEND_LINE_ICON]).isRequired,
67741
+ iconType: PropTypes.oneOf([ICON_TYPE_SQUARE$1, ICON_TYPE_LEGEND_UNION_ICON$1, ICON_TYPE_LEGEND_LINE_ICON$1]).isRequired,
67731
67742
  iconColor: PropTypes.string.isRequired
67732
67743
  })),
67733
67744
  showTwoBars: PropTypes.bool,
@@ -67791,11 +67802,11 @@ BarChartsByWeeks.defaultProps = {
67791
67802
  isTitleOriganal: false,
67792
67803
  legendData: [{
67793
67804
  title: 'Sales',
67794
- iconType: ICON_TYPE_SQUARE,
67805
+ iconType: ICON_TYPE_SQUARE$1,
67795
67806
  iconColor: '#90CE9C'
67796
67807
  }, {
67797
67808
  title: 'Category Average',
67798
- iconType: ICON_TYPE_LEGEND_LINE_ICON,
67809
+ iconType: ICON_TYPE_LEGEND_LINE_ICON$1,
67799
67810
  iconColor: '#C906FD'
67800
67811
  }],
67801
67812
  showTwoBars: false,
@@ -67820,7 +67831,7 @@ const scrollableStyles$2 = `
67820
67831
  border-radius: 5px;
67821
67832
  }
67822
67833
  `;
67823
- const ControlsContainer$2 = dt.div`
67834
+ const ControlsContainer$3 = dt.div`
67824
67835
  position: relative;
67825
67836
  font-family: "Poppins", sans-serif;
67826
67837
  font-style: normal;
@@ -67839,7 +67850,7 @@ const ControlsContainer$2 = dt.div`
67839
67850
  box-sizing: border-box;
67840
67851
  }
67841
67852
  `;
67842
- const Controls = dt.div`
67853
+ const Controls$1 = dt.div`
67843
67854
  display: flex;
67844
67855
  flex-direction: column;
67845
67856
  width: 100%;
@@ -67847,7 +67858,7 @@ const Controls = dt.div`
67847
67858
  background: white;
67848
67859
  border-radius: 12px;
67849
67860
  `;
67850
- const TooltipDiv = dt.div`
67861
+ const TooltipDiv$1 = dt.div`
67851
67862
  display: flex;
67852
67863
  background: white;
67853
67864
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);
@@ -67855,7 +67866,7 @@ const TooltipDiv = dt.div`
67855
67866
  padding: 6px 10px;
67856
67867
  margin: 0;
67857
67868
  `;
67858
- const TooltipLabel = dt.p`
67869
+ const TooltipLabel$1 = dt.p`
67859
67870
  color: #212121;
67860
67871
  font-family: "Poppins", sans-serif;
67861
67872
  font-size: 12px;
@@ -67870,7 +67881,7 @@ const TitleAndValueContainer$1 = dt.div`
67870
67881
  flex-direction: column;
67871
67882
  padding: 0 20px;
67872
67883
  `;
67873
- const Title$5 = dt.h4`
67884
+ const Title$6 = dt.h4`
67874
67885
  font-weight: 500;
67875
67886
  font-size: 1rem;
67876
67887
  margin: 0;
@@ -68049,7 +68060,7 @@ const TotalDoughnutChart = props => {
68049
68060
  fontWeight: itemsBoldedValues ? '700' : '400'
68050
68061
  }
68051
68062
  }, ' (', `${Math.round(row.value / value * 100)}%)`), isPercent && row.value && `${row.value.toFixed(1)}%`);
68052
- return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$2, {
68063
+ return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$3, {
68053
68064
  className: className,
68054
68065
  height: height,
68055
68066
  width: width,
@@ -68057,13 +68068,13 @@ const TotalDoughnutChart = props => {
68057
68068
  }, legendData.length === 0 || legendData.every(item => item.value === undefined || item.value === null) ? /*#__PURE__*/React__default["default"].createElement(NoDataFoundMessage, {
68058
68069
  className: "NoDataFoundMessage",
68059
68070
  noDataText: noDataText
68060
- }) : /*#__PURE__*/React__default["default"].createElement(Controls, {
68071
+ }) : /*#__PURE__*/React__default["default"].createElement(Controls$1, {
68061
68072
  className: "Controls",
68062
68073
  height: height,
68063
68074
  width: width
68064
68075
  }, !hideTitleAndValue && /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$1, {
68065
68076
  className: "TitleAndValueContainer"
68066
- }, /*#__PURE__*/React__default["default"].createElement(Title$5, {
68077
+ }, /*#__PURE__*/React__default["default"].createElement(Title$6, {
68067
68078
  className: "Title"
68068
68079
  }, title), /*#__PURE__*/React__default["default"].createElement(CurrencySignAndFormattedValueContainer, {
68069
68080
  className: "CurrencySignAndFormattedValueContainer"
@@ -68158,7 +68169,7 @@ function CustomTooltip(_ref) {
68158
68169
  if (active && payload && payload.length) {
68159
68170
  // eslint-disable-next-line no-nested-ternary
68160
68171
  const percent = value && value !== 0 && !isPercent ? (payload[0].value / value * 100).toFixed(1) : value && isPercent ? payload[0].value.toFixed(1) : 0;
68161
- return /*#__PURE__*/React__default["default"].createElement(TooltipDiv, null, /*#__PURE__*/React__default["default"].createElement(TooltipLabel, null, `${payload[0].name} ${percent}%`));
68172
+ return /*#__PURE__*/React__default["default"].createElement(TooltipDiv$1, null, /*#__PURE__*/React__default["default"].createElement(TooltipLabel$1, null, `${payload[0].name} ${percent}%`));
68162
68173
  }
68163
68174
  }
68164
68175
  CustomTooltip.propTypes = {
@@ -68307,7 +68318,7 @@ Tooltip.defaultProps = {
68307
68318
  content: ''
68308
68319
  };
68309
68320
 
68310
- const ControlsContainer$1 = dt.div`
68321
+ const ControlsContainer$2 = dt.div`
68311
68322
  font-family: "Poppins", sans-serif;
68312
68323
  background-color: white;
68313
68324
  color: ${props => props.textColor};
@@ -68370,7 +68381,7 @@ const TotalValue = dt.div`
68370
68381
  font-size: 20px;
68371
68382
  }
68372
68383
  `;
68373
- const Title$4 = dt.h4`
68384
+ const Title$5 = dt.h4`
68374
68385
  font-size: 18px;
68375
68386
  font-weight: 400;
68376
68387
  line-height: 1;
@@ -68517,7 +68528,7 @@ const TotalHorizontalCharts = props => {
68517
68528
  }
68518
68529
  return null;
68519
68530
  };
68520
- return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$1, {
68531
+ return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$2, {
68521
68532
  ref: wrapper,
68522
68533
  height: height,
68523
68534
  width: width,
@@ -68527,14 +68538,14 @@ const TotalHorizontalCharts = props => {
68527
68538
  }, chartsData?.length > 0 ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, !hideTitle || !hideTotalValue ? /*#__PURE__*/React__default["default"].createElement(CardHeader, {
68528
68539
  ref: topHeader,
68529
68540
  className: "CardHeader"
68530
- }, !hideTitle ? /*#__PURE__*/React__default["default"].createElement(Title$4, null, title) : '', !hideTotalValue ? /*#__PURE__*/React__default["default"].createElement(TotalValue, {
68541
+ }, !hideTitle ? /*#__PURE__*/React__default["default"].createElement(Title$5, null, title) : '', !hideTotalValue ? /*#__PURE__*/React__default["default"].createElement(TotalValue, {
68531
68542
  className: "TotalValue"
68532
68543
  }, currencySign && /*#__PURE__*/React__default["default"].createElement(CurrencySign, {
68533
68544
  className: "CurrencySign"
68534
68545
  }, getCurrencySign(currencyType, value)), dotCut ? getFormattedValue(value && Math.abs(value) > 0 && value % 1 !== 0 ? value?.toFixed(2) : value) : getNumberWithCommas(value), dotCut ? getFormattedUnits(value) : '') : '') : '', /*#__PURE__*/React__default["default"].createElement(ResponsiveContainer, {
68535
68546
  width: "100%",
68536
68547
  height: calculateChartHeight()
68537
- }, /*#__PURE__*/React__default["default"].createElement(BarChart, {
68548
+ }, /*#__PURE__*/React__default["default"].createElement(BarChart$1, {
68538
68549
  layout: "vertical",
68539
68550
  data: chartsData,
68540
68551
  margin: {
@@ -68636,7 +68647,7 @@ TotalHorizontalCharts.defaultProps = {
68636
68647
  hideTitle: false
68637
68648
  };
68638
68649
 
68639
- const ControlsContainer = dt.div`
68650
+ const ControlsContainer$1 = dt.div`
68640
68651
  // position: relative;
68641
68652
  display: flex;
68642
68653
  flex-direction: column;
@@ -68667,7 +68678,7 @@ const ItemContainer = dt.div`
68667
68678
  flex-direction: column;
68668
68679
  flex-wrap: wrap;
68669
68680
  `;
68670
- const Title$3 = dt.h4`
68681
+ const Title$4 = dt.h4`
68671
68682
  font-size: 18px;
68672
68683
  font-weight: 500;
68673
68684
  margin: 0;
@@ -68775,7 +68786,7 @@ const SalesAndROI = props => {
68775
68786
  }, /*#__PURE__*/React__default["default"].createElement(TextBeforeAndAfterValue, {
68776
68787
  id: "TextBeforeAndAfterValue"
68777
68788
  }, getTextBefore(dataItem)), dotCut ? getFormattedValue(dataItem.value && Math.abs(dataItem.value) > 0 && dataItem.value % 1 !== 0 ? dataItem.value?.toFixed(2) : dataItem.value) : getNumberWithCommas(dataItem.value), dotCut ? getFormattedUnits(dataItem.value) : '', /*#__PURE__*/React__default["default"].createElement(TextBeforeAndAfterValue, null, dataItem.textAfter)));
68778
- return /*#__PURE__*/React__default["default"].createElement(ControlsContainer, {
68789
+ return /*#__PURE__*/React__default["default"].createElement(ControlsContainer$1, {
68779
68790
  id: "ControlsContainer",
68780
68791
  height: height,
68781
68792
  width: width,
@@ -68783,7 +68794,7 @@ const SalesAndROI = props => {
68783
68794
  showBorderShadow: showBorderShadow
68784
68795
  }, /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer, {
68785
68796
  id: "TitleAndValueContainer"
68786
- }, /*#__PURE__*/React__default["default"].createElement(Title$3, {
68797
+ }, /*#__PURE__*/React__default["default"].createElement(Title$4, {
68787
68798
  id: "Title"
68788
68799
  }, title), showBanner && /*#__PURE__*/React__default["default"].createElement(OutBanner, {
68789
68800
  id: "OutBanner",
@@ -68882,7 +68893,7 @@ const TitleContainer$1 = dt.div`
68882
68893
  margin: 0;
68883
68894
  border-bottom: 1px solid #b1b1b1;
68884
68895
  `;
68885
- const Title$2 = dt.p`
68896
+ const Title$3 = dt.p`
68886
68897
  font-weight: 400;
68887
68898
  font-size: 24px;
68888
68899
  margin: 0;
@@ -69102,7 +69113,7 @@ const PopupCharts = props => {
69102
69113
  height: height,
69103
69114
  width: width,
69104
69115
  onClick: e => e.stopPropagation()
69105
- }, /*#__PURE__*/React__default["default"].createElement(TitleContainer$1, null, /*#__PURE__*/React__default["default"].createElement(Title$2, null, title), /*#__PURE__*/React__default["default"].createElement(CloseXIconContainer, {
69116
+ }, /*#__PURE__*/React__default["default"].createElement(TitleContainer$1, null, /*#__PURE__*/React__default["default"].createElement(Title$3, null, title), /*#__PURE__*/React__default["default"].createElement(CloseXIconContainer, {
69106
69117
  onClick: e => closePopupCharts(e)
69107
69118
  }, /*#__PURE__*/React__default["default"].createElement(CloseXIcon, null))), /*#__PURE__*/React__default["default"].createElement(ChartsContainer, {
69108
69119
  id: "ChartsContainer",
@@ -69200,7 +69211,7 @@ const TopToggleListMainContainer = dt.div`
69200
69211
  padding: 0 24px;
69201
69212
  width: ${props => props.width};
69202
69213
  `;
69203
- const Title$1 = dt.h4`
69214
+ const Title$2 = dt.h4`
69204
69215
  font-size: 14px;
69205
69216
  font-weight: 600;
69206
69217
  margin: 20px 0 12px;
@@ -69230,7 +69241,7 @@ const TopToggleList = props => {
69230
69241
  } = props;
69231
69242
  return /*#__PURE__*/React__default["default"].createElement(TopToggleListMainContainer, {
69232
69243
  width: width
69233
- }, /*#__PURE__*/React__default["default"].createElement(Title$1, null, title), /*#__PURE__*/React__default["default"].createElement(ListContainer, {
69244
+ }, /*#__PURE__*/React__default["default"].createElement(Title$2, null, title), /*#__PURE__*/React__default["default"].createElement(ListContainer, {
69234
69245
  height: height
69235
69246
  }, list.map(item => /*#__PURE__*/React__default["default"].createElement(ListItem, {
69236
69247
  key: item.value
@@ -80685,7 +80696,7 @@ const TitleContainer = dt.div`
80685
80696
  justify-content: flex-start;
80686
80697
  margin: 0 0 10px 0;
80687
80698
  `;
80688
- const Title = dt.h3`
80699
+ const Title$1 = dt.h3`
80689
80700
  user-select: none;
80690
80701
  text-align: left;
80691
80702
  margin: 0;
@@ -80960,7 +80971,7 @@ const Heatmap = props => {
80960
80971
  className: "HeatmapWrapper"
80961
80972
  }, /*#__PURE__*/React__default["default"].createElement(TitleContainer, {
80962
80973
  className: "TitleContainer"
80963
- }, /*#__PURE__*/React__default["default"].createElement(Title, {
80974
+ }, /*#__PURE__*/React__default["default"].createElement(Title$1, {
80964
80975
  className: "Title"
80965
80976
  }, title)), refreshRequired && renderBars(), !refreshRequired && renderBars(), renderLegend()));
80966
80977
  };
@@ -80975,15 +80986,711 @@ Heatmap.propTypes = {
80975
80986
  barHeight: PropTypes.string.isRequired
80976
80987
  };
80977
80988
 
80989
+ const ButtonWrapper = dt.div`
80990
+ width: fit-content;
80991
+ text-align: center;
80992
+ `;
80993
+ const IconButtonContainer = dt.a`
80994
+ font-size: 14px;
80995
+ font-weight: 400;
80996
+ display: flex;
80997
+ gap: 10px;
80998
+ align-items: center;
80999
+ justify-content: center;
81000
+ padding: 12px 20px;
81001
+ text-decoration: none;
81002
+ color: ${props => props.color};
81003
+ border-radius: ${props => props.borderRadius};
81004
+ border: 1px solid ${props => props.borderColor.toString()};
81005
+ background: ${props => props.backgroundColor.toString()};
81006
+ position: relative;
81007
+ transition: all .3s;
81008
+ ${props => props.inProgress && lt`
81009
+ pointer-events: none;
81010
+ &:after {
81011
+ content: 'In progress';
81012
+ display: flex;
81013
+ align-items: center;
81014
+ justify-content: center;
81015
+ text-wrap: nowrap;
81016
+ position: absolute;
81017
+ background: linear-gradient(
81018
+ to right,
81019
+ #5FCC70 ${props.progress}%,
81020
+ #B1B1B1 ${props.progress + 1}%,
81021
+ #B1B1B1 100%
81022
+ );
81023
+ width: 100%;
81024
+ height: 100%;
81025
+ border-radius: ${props => props.borderRadius};
81026
+ border-width: 0;
81027
+ z-index: 9;
81028
+ }
81029
+ `}
81030
+ &:hover, &:focus {
81031
+ cursor: pointer;
81032
+ box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);
81033
+ }
81034
+ `;
81035
+ const SpanText = dt.span`
81036
+ `;
81037
+ const CancelClick = dt.span`
81038
+ display: inherit;
81039
+ font-family: "Lato", sans-serif;;
81040
+ font-size: 14px;
81041
+ color: #568202;
81042
+ cursor: pointer;
81043
+ margin-top: 5px;
81044
+ `;
81045
+
81046
+ /* IconButton */
81047
+ const IconButton = props => {
81048
+ const {
81049
+ // downloadStatus,
81050
+ // fileName,
81051
+ fileLink,
81052
+ showProcess,
81053
+ contentColor,
81054
+ buttonText,
81055
+ backgroundColor,
81056
+ borderColor,
81057
+ borderRadius,
81058
+ iconName,
81059
+ iconWidth,
81060
+ iconHeight,
81061
+ disabled,
81062
+ onClick,
81063
+ onCancelClick
81064
+ } = props;
81065
+ const [progress, setProgress] = React.useState(0);
81066
+ let interval;
81067
+ const incrementProgress = () => {
81068
+ if (showProcess && progress <= 90) {
81069
+ interval = setInterval(() => {
81070
+ setProgress(prevProgress => {
81071
+ const newProgress = prevProgress + 2;
81072
+ if (newProgress >= 90) {
81073
+ clearInterval(interval);
81074
+ }
81075
+ return newProgress;
81076
+ });
81077
+ }, 500);
81078
+ } else {
81079
+ setProgress(0);
81080
+ clearInterval(interval);
81081
+ }
81082
+ };
81083
+ React.useEffect(() => {
81084
+ incrementProgress();
81085
+ }, [showProcess]);
81086
+ const getIcon = icon => {
81087
+ switch (icon) {
81088
+ case 'download':
81089
+ return /*#__PURE__*/React__default["default"].createElement(DownloadIcon, {
81090
+ height: iconHeight,
81091
+ width: iconWidth,
81092
+ color: contentColor
81093
+ });
81094
+ case 'document':
81095
+ return /*#__PURE__*/React__default["default"].createElement(DocumentIcon, {
81096
+ height: iconHeight,
81097
+ width: iconWidth,
81098
+ color: contentColor
81099
+ });
81100
+ case 'fly':
81101
+ return /*#__PURE__*/React__default["default"].createElement(FlyIcon, {
81102
+ height: iconHeight,
81103
+ width: iconWidth,
81104
+ color: contentColor
81105
+ });
81106
+ case 'bell':
81107
+ return /*#__PURE__*/React__default["default"].createElement(BellIcon, {
81108
+ height: iconHeight,
81109
+ width: iconWidth,
81110
+ color: contentColor
81111
+ });
81112
+ case 'maintenance':
81113
+ return /*#__PURE__*/React__default["default"].createElement(MaintenanceIcon, {
81114
+ height: iconHeight,
81115
+ width: iconWidth,
81116
+ color: contentColor
81117
+ });
81118
+ case 'exit':
81119
+ return /*#__PURE__*/React__default["default"].createElement(ExitIcon, {
81120
+ height: iconHeight,
81121
+ width: iconWidth,
81122
+ color: contentColor
81123
+ });
81124
+ case 'eye':
81125
+ return /*#__PURE__*/React__default["default"].createElement(EyeIcon, {
81126
+ height: iconHeight,
81127
+ width: iconWidth,
81128
+ color: contentColor
81129
+ });
81130
+ default:
81131
+ return '';
81132
+ }
81133
+ };
81134
+ const onClickHandler = event => {
81135
+ onClick(event);
81136
+ };
81137
+ const onCancelClickHandler = event => {
81138
+ onCancelClick(event);
81139
+ };
81140
+ return /*#__PURE__*/React__default["default"].createElement(ButtonWrapper, {
81141
+ id: "ButtonWrapper"
81142
+ }, /*#__PURE__*/React__default["default"].createElement(IconButtonContainer, {
81143
+ download: true,
81144
+ href: fileLink,
81145
+ backgroundColor: disabled ? '#E3E4E5' : backgroundColor,
81146
+ borderColor: disabled ? '#B1B1B1' : borderColor,
81147
+ borderRadius: borderRadius,
81148
+ color: disabled ? '#B1B1B1' : contentColor,
81149
+ inProgress: showProcess,
81150
+ progress: progress,
81151
+ onClick: event => {
81152
+ onClickHandler(event);
81153
+ }
81154
+ }, getIcon(iconName), buttonText !== '' && buttonText !== undefined && /*#__PURE__*/React__default["default"].createElement(SpanText, null, buttonText)), showProcess && /*#__PURE__*/React__default["default"].createElement(CancelClick, {
81155
+ onClick: event => onCancelClickHandler(event)
81156
+ }, "Click here to cancel"));
81157
+ };
81158
+ IconButton.propTypes = {
81159
+ // downloadStatus: PropTypes.string,
81160
+ // fileName: PropTypes.string,
81161
+ fileLink: PropTypes.string,
81162
+ showProcess: PropTypes.bool,
81163
+ buttonText: PropTypes.string,
81164
+ iconName: PropTypes.string,
81165
+ contentColor: PropTypes.string,
81166
+ backgroundColor: PropTypes.string,
81167
+ borderColor: PropTypes.string,
81168
+ borderRadius: PropTypes.string,
81169
+ iconHeight: PropTypes.number,
81170
+ iconWidth: PropTypes.number,
81171
+ disabled: PropTypes.bool,
81172
+ onClick: PropTypes.func,
81173
+ onCancelClick: PropTypes.func
81174
+ };
81175
+ IconButton.defaultProps = {
81176
+ // downloadStatus: '',
81177
+ // fileName: '',
81178
+ fileLink: '',
81179
+ showProcess: false,
81180
+ buttonText: '',
81181
+ iconName: 'eye',
81182
+ contentColor: '#212121',
81183
+ backgroundColor: '#FFFFFF',
81184
+ borderColor: '#B1B1B1',
81185
+ borderRadius: '12px',
81186
+ iconHeight: 18,
81187
+ iconWidth: 18,
81188
+ disabled: false,
81189
+ onClick: () => {},
81190
+ onCancelClick: () => {}
81191
+ };
81192
+
81193
+ const LinnerContainer = dt.div`
81194
+ font-family: "Poppins", sans-serif;
81195
+ display: grid;
81196
+ gap: 48px 0;
81197
+ grid-template-columns: repeat(5, 1fr);
81198
+ grid-template-rows: auto auto;
81199
+ width: ${props => props.width};
81200
+ height: ${props => props.height};
81201
+ background-color: ${props => props.backgroundColor};
81202
+ padding: 50px 20px 20px;
81203
+ box-sizing: border-box;
81204
+ `;
81205
+ const DataBox = dt.div`
81206
+ height: 100%;
81207
+ padding: 0 40px;
81208
+ border-left: 1px solid #d0d0d0;
81209
+ &:nth-child(1),
81210
+ &:nth-child(6) {
81211
+ border-left: none;
81212
+ padding-left: 0;
81213
+ }
81214
+ &:nth-child(5),
81215
+ &:nth-child(10) {
81216
+ padding-right: 0;
81217
+ }
81218
+ `;
81219
+ const CellItem = dt.div`
81220
+ display: flex;
81221
+ align-items: center;
81222
+ `;
81223
+ const DataBoxTitle = dt.span`
81224
+ font-size: 18px;
81225
+ display: block;
81226
+ margin: 0 0 12px;
81227
+ `;
81228
+ const BigValue = dt.span`
81229
+ font-size: 40px;
81230
+ font-weight: 500;
81231
+ margin-right: 5px;
81232
+ `;
81233
+ const CellItemValueSign = dt.span`
81234
+ font-size: 16px;
81235
+ font-weight: 400;
81236
+ `;
81237
+ const ValueChange = dt.span`
81238
+ font-size: 16px;
81239
+ font-weight: 400;
81240
+ `;
81241
+ const CellItemNoValue = dt.span`
81242
+ font-size: 40px;
81243
+ font-weight: 500;
81244
+ `;
81245
+ const PercentageChange = dt.div`
81246
+ display: flex;
81247
+ align-items: center;
81248
+ font-size: 16px;
81249
+ color: ${props => props.color};
81250
+ `;
81251
+
81252
+ const ArrowUpIcon = _ref => {
81253
+ let {
81254
+ clicked,
81255
+ width = '8',
81256
+ height = '9'
81257
+ } = _ref;
81258
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
81259
+ width: width,
81260
+ height: height,
81261
+ viewBox: "0 0 8 9",
81262
+ fill: "none",
81263
+ xmlns: "http://www.w3.org/2000/svg"
81264
+ }, /*#__PURE__*/React__default["default"].createElement("path", {
81265
+ d: "M4.47065 0.188348C4.21033 -0.0627825 3.78758 -0.0627825 3.52727 0.188348L0.195236 3.40281C-0.0650787 3.65394 -0.0650787 4.06178 0.195236 4.31291C0.455551 4.56404 0.878303 4.56404 1.13862 4.31291L3.33359 2.19337V8.35711C3.33359 8.71271 3.63139 9 4 9C4.36861 9 4.66641 8.71271 4.66641 8.35711V2.19337L6.86138 4.3109C7.1217 4.56203 7.54445 4.56203 7.80476 4.3109C8.06508 4.05977 8.06508 3.65193 7.80476 3.4008L4.47273 0.186338L4.47065 0.188348Z",
81266
+ fill: "#5FCC70"
81267
+ }));
81268
+ };
81269
+
81270
+ const ArrowDownIcon = _ref => {
81271
+ let {
81272
+ clicked,
81273
+ width = '8',
81274
+ height = '9'
81275
+ } = _ref;
81276
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
81277
+ width: width,
81278
+ height: height,
81279
+ viewBox: "0 0 8 9",
81280
+ fill: "none",
81281
+ xmlns: "http://www.w3.org/2000/svg"
81282
+ }, /*#__PURE__*/React__default["default"].createElement("path", {
81283
+ d: "M3.52935 8.81165C3.78967 9.06278 4.21242 9.06278 4.47273 8.81165L7.80476 5.59719C8.06508 5.34606 8.06508 4.93822 7.80476 4.68709C7.54445 4.43596 7.1217 4.43596 6.86138 4.68709L4.66641 6.80663L4.66641 0.642893C4.66641 0.287292 4.36861 -4.08657e-07 4 -4.40881e-07C3.63139 -4.73106e-07 3.33359 0.287292 3.33359 0.642893L3.33359 6.80663L1.13862 4.6891C0.878303 4.43797 0.455551 4.43797 0.195236 4.6891C-0.0650787 4.94023 -0.0650787 5.34807 0.195236 5.5992L3.52727 8.81366L3.52935 8.81165Z",
81284
+ fill: "#F00021"
81285
+ }));
81286
+ };
81287
+
81288
+ /* eslint-disable no-restricted-globals */
81289
+ const DoublePanelDataRow = props => {
81290
+ const {
81291
+ width,
81292
+ height,
81293
+ data,
81294
+ backgroundColor,
81295
+ className,
81296
+ customDataFormat,
81297
+ showPercentChange
81298
+ } = props;
81299
+ const getArrowSign = arrowSign => {
81300
+ if (!arrowSign) {
81301
+ return '-';
81302
+ }
81303
+ if (arrowSign === 'up') {
81304
+ return /*#__PURE__*/React__default["default"].createElement(PercentageChange, {
81305
+ color: "#5FCC70",
81306
+ value: 34 // TODO: when ready, replace with actual value
81307
+ }, /*#__PURE__*/React__default["default"].createElement(ArrowUpIcon, {
81308
+ width: 12,
81309
+ height: 12
81310
+ }), ' ', "(+34K)");
81311
+ }
81312
+ return /*#__PURE__*/React__default["default"].createElement(PercentageChange, {
81313
+ color: "#D23630",
81314
+ value: 66 // TODO: when ready, replace with actual value
81315
+ }, /*#__PURE__*/React__default["default"].createElement(ArrowDownIcon, {
81316
+ width: 12,
81317
+ height: 12
81318
+ }), ' ', "(-12K)");
81319
+ };
81320
+ return /*#__PURE__*/React__default["default"].createElement(LinnerContainer, {
81321
+ className: className,
81322
+ backgroundColor: backgroundColor,
81323
+ width: width,
81324
+ height: height,
81325
+ customDataFormat: customDataFormat
81326
+ }, data.map(item => /*#__PURE__*/React__default["default"].createElement(DataBox, {
81327
+ className: "data-box-item"
81328
+ }, item.title && /*#__PURE__*/React__default["default"].createElement(DataBoxTitle, {
81329
+ className: "DataBoxTitle"
81330
+ }, item.title), /*#__PURE__*/React__default["default"].createElement(CellItem, null, item.value !== null && item.value !== undefined && !isNaN(item.value) && item.value !== 'null' && item.value !== 'undefined' ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, item.sign && /*#__PURE__*/React__default["default"].createElement(CellItemValueSign, null, item.sign), customDataFormat ? /*#__PURE__*/React__default["default"].createElement(BigValue, {
81331
+ className: "DataBoxValue"
81332
+ }, ''.concat(formattedValue(item.value), getFormattedUnits(item.value)), item.isPercent && /*#__PURE__*/React__default["default"].createElement(CellItemValueSign, null, "%")) : /*#__PURE__*/React__default["default"].createElement(BigValue, null, ''.concat(getFormattedValue(item.value), getFormattedUnits(item.value)), item.isPercent && /*#__PURE__*/React__default["default"].createElement(CellItemValueSign, null, "%")), showPercentChange && getArrowSign(item.value >= 0 ? 'up' : 'down')) : /*#__PURE__*/React__default["default"].createElement(CellItemNoValue, null, "N/A")), /*#__PURE__*/React__default["default"].createElement(ValueChange, null))));
81333
+ };
81334
+ DoublePanelDataRow.propTypes = {
81335
+ className: PropTypes.string,
81336
+ width: PropTypes.string,
81337
+ height: PropTypes.string,
81338
+ data: PropTypes.arrayOf(PropTypes.shape({
81339
+ title: PropTypes.string,
81340
+ value: PropTypes.number,
81341
+ sign: PropTypes.string
81342
+ })),
81343
+ backgroundColor: PropTypes.string,
81344
+ customDataFormat: PropTypes.bool,
81345
+ showPercentChange: PropTypes.bool
81346
+ };
81347
+ DoublePanelDataRow.defaultProps = {
81348
+ className: '',
81349
+ width: '100%',
81350
+ height: 'auto',
81351
+ data: [],
81352
+ backgroundColor: '#FFFFFF',
81353
+ customDataFormat: false,
81354
+ showPercentChange: false
81355
+ };
81356
+
81357
+ const ControlsContainer = dt.div`
81358
+ position: relative;
81359
+ font-family: "Poppins", sans-serif;
81360
+ color: #212121;
81361
+ width: ${props => props.width};
81362
+ height: ${props => props.height};
81363
+ min-width: 250px;
81364
+ `;
81365
+ const Controls = dt.div`
81366
+ height: 100%;
81367
+ width: 100%;
81368
+ background: white;
81369
+ display: flex;
81370
+ flex-direction: column;
81371
+ `;
81372
+ const TooltipDiv = dt.div`
81373
+ border-radius: 5px;
81374
+ padding: 8px 12px;
81375
+ background: white;
81376
+ box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);
81377
+ margin: 0;
81378
+ `;
81379
+ const TooltipLabel = dt.div`
81380
+ color: #212121;
81381
+ font-size: 14px;
81382
+ font-weight: 400;
81383
+ width: fit-content;
81384
+ `;
81385
+ const TooltipTitle = dt.div`
81386
+ color: #212121;
81387
+ font-size: 14px;
81388
+ font-weight: 600;
81389
+ `;
81390
+ const Title = dt.h5`
81391
+ font-weight: 500;
81392
+ font-size: 18px;
81393
+ line-height: 20px;
81394
+ margin: 0 0 30px;
81395
+ @media (max-width: 1536px) {
81396
+ font-size: 16px;
81397
+ margin: 0 0 20px;
81398
+ }
81399
+ @media (max-width: 1366px) {
81400
+ font-size: 14px;
81401
+ }
81402
+ `;
81403
+ const LabelBoldText = dt.tspan`
81404
+ font-size: 0.7em;
81405
+ `;
81406
+ const LabelText = dt.tspan`
81407
+ font-size: 0.6em;
81408
+ `;
81409
+
81410
+ /* eslint-disable react/prop-types */
81411
+ const ICON_TYPE_SQUARE = 'Square';
81412
+ const ICON_TYPE_LEGEND_UNION_ICON = 'LegendUnionIcon';
81413
+ const ICON_TYPE_LEGEND_LINE_ICON = 'LegendLineIcon';
81414
+
81415
+ /* BarCharts */
81416
+ const BarChart = props => {
81417
+ const {
81418
+ className,
81419
+ title,
81420
+ barChartData,
81421
+ barSize,
81422
+ barFontSizeValue,
81423
+ isDollar,
81424
+ width,
81425
+ height,
81426
+ barChartColor,
81427
+ currentBarColor,
81428
+ showLegend,
81429
+ legendData,
81430
+ showDollarSign,
81431
+ showReferenceLine,
81432
+ referenceLinePoint,
81433
+ referenceLineColor,
81434
+ referenceLineDashed,
81435
+ showCurrentCampaignStyle,
81436
+ isPercent
81437
+ } = props;
81438
+ const controlsContainerRef = React.useRef();
81439
+ const areAllDatesEmpty = () => {
81440
+ if (!barChartData || barChartData?.length === 0) return true;
81441
+ return barChartData?.every(item => !item.date);
81442
+ };
81443
+ const displayFormattedValue = function (value) {
81444
+ let showFullNumber = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
81445
+ if (value === undefined || value === null) return '';
81446
+ let formattedValue = '';
81447
+ if (isPercent) {
81448
+ formattedValue = ''.concat(value.toFixed(1), '%');
81449
+ } else if (isDollar) {
81450
+ formattedValue = ''.concat(showDollarSign ? '$' : '', !showFullNumber ? getFormattedValue(value) : getNumberWithCommas(Number.isInteger(value) ? value : value.toFixed(1)), !showFullNumber ? getFormattedUnits(value) : '');
81451
+ } else {
81452
+ formattedValue = ''.concat(!showFullNumber ? getFormattedValue(value) : getNumberWithCommas(Number.isInteger(value) ? value : value.toFixed(1)), !showFullNumber ? getFormattedUnits(value) : '');
81453
+ }
81454
+ return formattedValue;
81455
+ };
81456
+
81457
+ // eslint-disable-next-line react/no-unstable-nested-components
81458
+ const CustomTooltip = tooltipData => {
81459
+ const {
81460
+ active,
81461
+ payload,
81462
+ label
81463
+ } = tooltipData;
81464
+ if (!active || !payload || payload?.length === 0) return null;
81465
+ let currentTooltipValue = 0;
81466
+ if (payload[0].payload?.value) currentTooltipValue = payload[0].payload?.value;
81467
+ return /*#__PURE__*/React__default["default"].createElement(TooltipDiv, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle, null, `${label}`), /*#__PURE__*/React__default["default"].createElement(TooltipLabel, null, `${displayFormattedValue(currentTooltipValue, !!showCurrentCampaignStyle)}`));
81468
+ };
81469
+ const CustomizedTickBarChart = props => {
81470
+ const {
81471
+ x,
81472
+ y,
81473
+ payload
81474
+ } = props;
81475
+ if (barChartData && barChartData.length > 0 && payload) {
81476
+ const retailerData = barChartData.filter(item => item.title === payload.value);
81477
+ if (retailerData && retailerData.length > 0) {
81478
+ return /*#__PURE__*/React__default["default"].createElement("g", {
81479
+ transform: `translate(${x},${y})`
81480
+ }, showCurrentCampaignStyle && retailerData[0].isCurrent && /*#__PURE__*/React__default["default"].createElement("rect", {
81481
+ x: -56 // Adjust this to position the background properly
81482
+ ,
81483
+ y: 5 // Adjust this for vertical alignment with your text
81484
+ ,
81485
+ width: 112 // Adjust width based on the text length
81486
+ ,
81487
+ height: 22 // Adjust height based on font size
81488
+ ,
81489
+ fill: currentBarColor || '#90CE9C',
81490
+ rx: 12
81491
+ }), /*#__PURE__*/React__default["default"].createElement("text", {
81492
+ x: 0,
81493
+ y: 0,
81494
+ dy: 16,
81495
+ fill: "#212121"
81496
+ }, /*#__PURE__*/React__default["default"].createElement(LabelBoldText, {
81497
+ textAnchor: "middle",
81498
+ x: 0,
81499
+ dy: showCurrentCampaignStyle ? 20 : 50,
81500
+ fontSize: showCurrentCampaignStyle ? 12 : 16,
81501
+ fontWeight: showCurrentCampaignStyle ? 500 : 600,
81502
+ fill: showCurrentCampaignStyle && !retailerData[0].isCurrent ? '#8B8989' : '#212121'
81503
+ }, (() => {
81504
+ if (showCurrentCampaignStyle) {
81505
+ if (retailerData[0].isCurrent) {
81506
+ if (payload?.value?.length > 6) {
81507
+ return `${payload.value.slice(0, 6)}...-Current`;
81508
+ }
81509
+ return `${payload.value}-Current`;
81510
+ }
81511
+ if (payload?.value?.length > 10) {
81512
+ return `${payload.value.slice(0, 10)}...`;
81513
+ }
81514
+ return `${payload.value}`;
81515
+ }
81516
+ return payload?.value;
81517
+ })()), /*#__PURE__*/React__default["default"].createElement(LabelText, {
81518
+ textAnchor: "middle",
81519
+ x: "0",
81520
+ dy: "30",
81521
+ fontSize: 14,
81522
+ fontWeight: 400
81523
+ }, retailerData[0].date)));
81524
+ }
81525
+ return null;
81526
+ }
81527
+ return null;
81528
+ };
81529
+ const CustomizedLabel = props => {
81530
+ const {
81531
+ x,
81532
+ y,
81533
+ stroke,
81534
+ value
81535
+ } = props;
81536
+ return /*#__PURE__*/React__default["default"].createElement("text", {
81537
+ x: x + 30,
81538
+ y: y,
81539
+ dy: -8,
81540
+ fill: showCurrentCampaignStyle ? '#8B8989' : stroke,
81541
+ fontSize: barFontSizeValue,
81542
+ textAnchor: "middle"
81543
+ }, displayFormattedValue(value));
81544
+ };
81545
+ return /*#__PURE__*/React__default["default"].createElement(ControlsContainer, {
81546
+ className: className,
81547
+ height: height,
81548
+ width: width,
81549
+ ref: controlsContainerRef
81550
+ }, /*#__PURE__*/React__default["default"].createElement(Controls, null, /*#__PURE__*/React__default["default"].createElement(Title, null, title), /*#__PURE__*/React__default["default"].createElement(ResponsiveContainer, {
81551
+ width: "100%",
81552
+ height: 400
81553
+ }, /*#__PURE__*/React__default["default"].createElement(BarChart$1, {
81554
+ width: width,
81555
+ height: height,
81556
+ data: barChartData,
81557
+ margin: {
81558
+ top: 20,
81559
+ right: 0,
81560
+ bottom: 0,
81561
+ left: -5
81562
+ }
81563
+ }, showCurrentCampaignStyle && /*#__PURE__*/React__default["default"].createElement(CartesianGrid, {
81564
+ strokeDasharray: "3 3",
81565
+ vertical: false
81566
+ }), showCurrentCampaignStyle && /*#__PURE__*/React__default["default"].createElement(YAxis, {
81567
+ tickCount: 10,
81568
+ interval: "preserveEnd",
81569
+ domain: [0, 'auto'],
81570
+ tick: {
81571
+ fill: '#8B8989'
81572
+ },
81573
+ axisLine: false,
81574
+ fontWeight: 400,
81575
+ fontSize: "12px",
81576
+ tickLine: false,
81577
+ tickFormatter: value => `${displayFormattedValue(value)}`
81578
+ }), showReferenceLine && /*#__PURE__*/React__default["default"].createElement(ReferenceLine, {
81579
+ y: referenceLinePoint,
81580
+ stroke: referenceLineColor,
81581
+ strokeDasharray: referenceLineDashed
81582
+ }), /*#__PURE__*/React__default["default"].createElement(XAxis, {
81583
+ dataKey: "title",
81584
+ tick: CustomizedTickBarChart,
81585
+ tickLine: false,
81586
+ height: areAllDatesEmpty() ? 50 : 120,
81587
+ stroke: "#D0D0D0",
81588
+ domain: [0, 'auto'],
81589
+ interval: 0
81590
+ }), /*#__PURE__*/React__default["default"].createElement(Brush, {
81591
+ dataKey: "name",
81592
+ height: 30,
81593
+ stroke: "#8884d8"
81594
+ }), /*#__PURE__*/React__default["default"].createElement(Tooltip$2, {
81595
+ content: /*#__PURE__*/React__default["default"].createElement(CustomTooltip, null)
81596
+ }), /*#__PURE__*/React__default["default"].createElement(Tooltip$2, null), /*#__PURE__*/React__default["default"].createElement(Bar, {
81597
+ dataKey: "value",
81598
+ fill: barChartColor,
81599
+ minPointSize: 5,
81600
+ barSize: barSize ?? 60,
81601
+ radius: [5, 5, 0, 0]
81602
+ }, /*#__PURE__*/React__default["default"].createElement(LabelList, {
81603
+ dataKey: "value",
81604
+ content: CustomizedLabel
81605
+ })))), showLegend && /*#__PURE__*/React__default["default"].createElement(PerformanceAnalyticsLegend, {
81606
+ legendData: legendData
81607
+ })));
81608
+ };
81609
+ BarChart.propTypes = {
81610
+ title: PropTypes.string,
81611
+ barChartData: PropTypes.arrayOf(PropTypes.shape({
81612
+ title: PropTypes.string,
81613
+ date: PropTypes.string,
81614
+ value: PropTypes.number
81615
+ })),
81616
+ width: PropTypes.string,
81617
+ height: PropTypes.string,
81618
+ barSize: PropTypes.number,
81619
+ barFontSizeValue: PropTypes.string,
81620
+ barChartColor: PropTypes.string,
81621
+ showDollarSign: PropTypes.bool,
81622
+ isDollar: PropTypes.bool,
81623
+ showLegend: PropTypes.bool,
81624
+ legendData: PropTypes.arrayOf(PropTypes.shape({
81625
+ title: PropTypes.string.isRequired,
81626
+ iconType: PropTypes.oneOf([ICON_TYPE_SQUARE, ICON_TYPE_LEGEND_UNION_ICON, ICON_TYPE_LEGEND_LINE_ICON]).isRequired,
81627
+ iconColor: PropTypes.string.isRequired
81628
+ })),
81629
+ showReferenceLine: PropTypes.bool,
81630
+ referenceLinePoint: PropTypes.number,
81631
+ referenceLineColor: PropTypes.string,
81632
+ referenceLineDashed: PropTypes.string,
81633
+ showCurrentCampaignStyle: PropTypes.bool,
81634
+ currentBarColor: PropTypes.string,
81635
+ isPercent: PropTypes.bool
81636
+ };
81637
+ BarChart.defaultProps = {
81638
+ title: 'String',
81639
+ barChartData: [{
81640
+ title: 'Food Lion',
81641
+ date: '15.01.24-31.01.24',
81642
+ value: 542366
81643
+ }, {
81644
+ title: 'Hannaford',
81645
+ date: '15.01.24-31.01.24',
81646
+ value: 699511
81647
+ }, {
81648
+ title: 'The Giant Company',
81649
+ date: '15.01.24-31.01.24',
81650
+ value: 403092
81651
+ }, {
81652
+ title: 'Giant Food',
81653
+ date: '15.01.24-31.01.24',
81654
+ value: 396184
81655
+ }, {
81656
+ title: 'Stop&Shop',
81657
+ date: '15.01.24-31.01.24',
81658
+ value: 415317
81659
+ }],
81660
+ width: '100%',
81661
+ height: '100%',
81662
+ barSize: 60,
81663
+ barFontSizeValue: '0.6em',
81664
+ barChartColor: '#BD9EFF',
81665
+ showDollarSign: true,
81666
+ isDollar: true,
81667
+ showLegend: true,
81668
+ legendData: [{
81669
+ title: 'Incremental Sales',
81670
+ iconType: ICON_TYPE_SQUARE,
81671
+ iconColor: '#BD9EFF'
81672
+ }],
81673
+ showReferenceLine: false,
81674
+ referenceLinePoint: 0,
81675
+ referenceLineColor: '#212121',
81676
+ referenceLineDashed: '5',
81677
+ showCurrentCampaignStyle: false,
81678
+ currentBarColor: '#90CE9C',
81679
+ isPercent: false
81680
+ };
81681
+
80978
81682
  exports.BannerEventBoxList = BannerEventBoxList;
81683
+ exports.BarChart = BarChart;
80979
81684
  exports.BarChartsByWeeks = BarChartsByWeeks;
80980
81685
  exports.Button = Button;
80981
81686
  exports.CollapseHeader = CollapseHeader;
80982
81687
  exports.DialogOverlay = DialogOverlay;
81688
+ exports.DoublePanelDataRow = DoublePanelDataRow;
80983
81689
  exports.EventDetailsCard = EventDetailsCard;
80984
81690
  exports.EventList = EventList;
80985
81691
  exports.FilterPanel = FilterPanel;
80986
81692
  exports.Heatmap = Heatmap;
81693
+ exports.IconButton = IconButton;
80987
81694
  exports.LinnerDataBox = LinnerDataBox;
80988
81695
  exports.MarketShareDescription = MarketShareDescription;
80989
81696
  exports.OneColumnContainer = OneColumnContainer;