impaktapps-design 0.2.78 → 0.2.85

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.
@@ -10418,7 +10418,6 @@ function useTooltipInPortal(_temp) {
10418
10418
  TooltipInPortal
10419
10419
  };
10420
10420
  }
10421
- var style$3 = "";
10422
10421
  const BottomAxis = ({
10423
10422
  data,
10424
10423
  yMax,
@@ -10428,38 +10427,32 @@ const BottomAxis = ({
10428
10427
  left: left2
10429
10428
  }) => {
10430
10429
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
10431
- return /* @__PURE__ */ jsx(Fragment, {
10432
- children: /* @__PURE__ */ jsx(AxisBottom$2, {
10433
- numTicks: data == null ? void 0 : data.length,
10434
- top: yMax,
10435
- left: left2,
10436
- labelClassName: "axisBottom",
10437
- tickClassName: "axisBottom",
10438
- axisClassName: "axisBottom",
10439
- hideTicks: (_a = value.main) == null ? void 0 : _a.hideTicks,
10440
- hideAxisLine: (_b = value.main) == null ? void 0 : _b.hideBottomAxisLine,
10441
- strokeWidth: (_d = (_c = value.style) == null ? void 0 : _c.labelStyle) == null ? void 0 : _d.bottomAxisWidth,
10442
- scale: xScale,
10443
- stroke: (_f = (_e = value.style) == null ? void 0 : _e.labelStyle) == null ? void 0 : _f.tickColor,
10444
- labelOffset: (_h = (_g = value.style) == null ? void 0 : _g.labelStyle) == null ? void 0 : _h.bottomLabelOffset,
10445
- label: (_i = value.main) == null ? void 0 : _i.bottomLabel,
10446
- labelProps: {
10447
- fill: (_k = (_j = value.style) == null ? void 0 : _j.labelStyle) == null ? void 0 : _k.labelColor,
10448
- fontSize: (_m = (_l = value.style) == null ? void 0 : _l.labelStyle) == null ? void 0 : _m.fontSize,
10449
- fontWeight: (_o = (_n = value.style) == null ? void 0 : _n.labelStyle) == null ? void 0 : _o.fontWeight,
10450
- fontFamily: (_q = (_p = value.style) == null ? void 0 : _p.labelStyle) == null ? void 0 : _q.fontWeight
10451
- },
10452
- tickStroke: (_s = (_r = value.style) == null ? void 0 : _r.labelStyle) == null ? void 0 : _s.tickColor,
10453
- tickLabelProps: () => {
10454
- var _a2, _b2, _c2, _d2;
10455
- return {
10456
- display: innerWidth < 600 ? "none" : "inline-block",
10457
- fill: (_b2 = (_a2 = value.style) == null ? void 0 : _a2.labelStyle) == null ? void 0 : _b2.tickLabelColor,
10458
- fontSize: ((_d2 = (_c2 = value.style) == null ? void 0 : _c2.labelStyle) == null ? void 0 : _d2.tickFontSize) || 11,
10459
- textAnchor: "middle"
10460
- };
10461
- }
10462
- })
10430
+ return /* @__PURE__ */ jsx(AxisBottom$2, {
10431
+ numTicks: data == null ? void 0 : data.length,
10432
+ top: yMax,
10433
+ left: left2,
10434
+ hideTicks: (_a = value.main) == null ? void 0 : _a.hideTicks,
10435
+ hideAxisLine: (_b = value.main) == null ? void 0 : _b.hideBottomAxisLine,
10436
+ strokeWidth: (_d = (_c = value.style) == null ? void 0 : _c.labelStyle) == null ? void 0 : _d.bottomAxisWidth,
10437
+ scale: xScale,
10438
+ stroke: (_f = (_e = value.style) == null ? void 0 : _e.labelStyle) == null ? void 0 : _f.tickColor,
10439
+ labelOffset: (_h = (_g = value.style) == null ? void 0 : _g.labelStyle) == null ? void 0 : _h.bottomLabelOffset,
10440
+ label: (_i = value.main) == null ? void 0 : _i.bottomLabel,
10441
+ labelProps: {
10442
+ fill: (_k = (_j = value.style) == null ? void 0 : _j.labelStyle) == null ? void 0 : _k.labelColor,
10443
+ fontSize: (_m = (_l = value.style) == null ? void 0 : _l.labelStyle) == null ? void 0 : _m.fontSize,
10444
+ fontWeight: (_o = (_n = value.style) == null ? void 0 : _n.labelStyle) == null ? void 0 : _o.fontWeight,
10445
+ fontFamily: (_q = (_p = value.style) == null ? void 0 : _p.labelStyle) == null ? void 0 : _q.fontWeight
10446
+ },
10447
+ tickStroke: (_s = (_r = value.style) == null ? void 0 : _r.labelStyle) == null ? void 0 : _s.tickColor,
10448
+ tickLabelProps: () => {
10449
+ var _a2, _b2, _c2, _d2;
10450
+ return {
10451
+ fill: (_b2 = (_a2 = value.style) == null ? void 0 : _a2.labelStyle) == null ? void 0 : _b2.tickLabelColor,
10452
+ fontSize: ((_d2 = (_c2 = value.style) == null ? void 0 : _c2.labelStyle) == null ? void 0 : _d2.tickFontSize) || 11,
10453
+ textAnchor: "middle"
10454
+ };
10455
+ }
10463
10456
  });
10464
10457
  };
10465
10458
  const ToolTip = ({
@@ -10880,23 +10873,23 @@ function Legend({
10880
10873
  colorRange,
10881
10874
  dataKeyArray
10882
10875
  }) {
10883
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
10876
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
10884
10877
  const legendGlyphSize = ((_b = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.legend) == null ? void 0 : _b.colorRectWidth) || 15;
10885
10878
  const ordinalColorScale = createOrdinalScale$1({
10886
10879
  domain: dataKeyArray || ((_c = value == null ? void 0 : value.main) == null ? void 0 : _c.tooltipDataKey),
10887
- range: colorRange || ((_e = (_d = value == null ? void 0 : value.style) == null ? void 0 : _d.pieStyle) == null ? void 0 : _e.colorRange)
10880
+ range: colorRange || ((_e = (_d = value == null ? void 0 : value.style) == null ? void 0 : _d.barStyle) == null ? void 0 : _e.colorRange) || ((_g = (_f = value == null ? void 0 : value.style) == null ? void 0 : _f.pieStyle) == null ? void 0 : _g.colorRange) || ((_i = (_h = value == null ? void 0 : value.style) == null ? void 0 : _h.lineStyle) == null ? void 0 : _i.colorRange)
10888
10881
  });
10889
10882
  return /* @__PURE__ */ jsxs("div", {
10890
10883
  className: "legend",
10891
10884
  style: {
10892
10885
  paddingLeft: "40px",
10893
10886
  paddingRight: "40px",
10894
- ...(_g = (_f = value == null ? void 0 : value.style) == null ? void 0 : _f.legendStyle) == null ? void 0 : _g.legend
10887
+ ...(_k = (_j = value == null ? void 0 : value.style) == null ? void 0 : _j.legendStyle) == null ? void 0 : _k.legend
10895
10888
  },
10896
10889
  children: [/* @__PURE__ */ jsx("div", {
10897
10890
  className: "title",
10898
- style: (_i = (_h = value == null ? void 0 : value.style) == null ? void 0 : _h.legendStyle) == null ? void 0 : _i.legendTitle,
10899
- children: (_k = (_j = value == null ? void 0 : value.main) == null ? void 0 : _j.legend) == null ? void 0 : _k.legendTitle
10891
+ style: (_m = (_l = value == null ? void 0 : value.style) == null ? void 0 : _l.legendStyle) == null ? void 0 : _m.legendTitle,
10892
+ children: (_o = (_n = value == null ? void 0 : value.main) == null ? void 0 : _n.legend) == null ? void 0 : _o.legendTitle
10900
10893
  }), /* @__PURE__ */ jsx(Ordinal, {
10901
10894
  scale: ordinalColorScale,
10902
10895
  labelFormat: (label) => `${label.toUpperCase()}`,
@@ -10912,6 +10905,8 @@ function Legend({
10912
10905
  return /* @__PURE__ */ jsxs(LegendItem, {
10913
10906
  margin: "0 5px",
10914
10907
  onClick: (events) => {
10908
+ if (events)
10909
+ alert(`clicked: ${JSON.stringify(label)}`);
10915
10910
  },
10916
10911
  children: [/* @__PURE__ */ jsx("svg", {
10917
10912
  width: legendGlyphSize,
@@ -11389,15 +11384,43 @@ ParentSize$1.propTypes = {
11389
11384
  children: PropTypes.func.isRequired
11390
11385
  };
11391
11386
  const Product1 = [
11392
- { x: "a", y: 100 },
11393
- { x: "b", y: 50 },
11394
- { x: "c", y: 100 },
11395
- { x: "d", y: 80 },
11396
- { x: "f", y: 100 },
11397
- { x: "g", y: 50 }
11387
+ {
11388
+ "key": "HDFC",
11389
+ "value": [
11390
+ {
11391
+ "x": 1,
11392
+ "y": 2
11393
+ },
11394
+ {
11395
+ "x": 2,
11396
+ "y": 2
11397
+ },
11398
+ {
11399
+ "x": 3,
11400
+ "y": 2
11401
+ }
11402
+ ]
11403
+ },
11404
+ {
11405
+ "key": "Kotak",
11406
+ "value": [
11407
+ {
11408
+ "x": 2,
11409
+ "y": 5
11410
+ },
11411
+ {
11412
+ "x": 3,
11413
+ "y": 6
11414
+ },
11415
+ {
11416
+ "x": 3,
11417
+ "y": 5
11418
+ }
11419
+ ]
11420
+ }
11398
11421
  ];
11399
11422
  const finalDataProvider = (type2, value, theme) => {
11400
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t5, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J;
11423
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t5, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
11401
11424
  switch (type2) {
11402
11425
  case "BarGraph":
11403
11426
  case "StackBarGraph":
@@ -11542,7 +11565,7 @@ const finalDataProvider = (type2, value, theme) => {
11542
11565
  }
11543
11566
  },
11544
11567
  pieStyle: {
11545
- colorRange: ["#3f51b5", "rgba(200,0,31,0.9)", "rgba(25,200,205,0.6)", "#3f84b5", "#b5993f", "#fc6f6f"],
11568
+ colorRange: ["#3f51b5", "rgba(200,0,31,0.9)", "rgba(25,200,205,0.6)"],
11546
11569
  outerRadius: 120,
11547
11570
  innerRadius: 60,
11548
11571
  cornerRadius: 2,
@@ -11554,7 +11577,7 @@ const finalDataProvider = (type2, value, theme) => {
11554
11577
  case "LineGraph":
11555
11578
  return {
11556
11579
  main: {
11557
- data: ((_s = value == null ? void 0 : value.main) == null ? void 0 : _s.data) || [Product1],
11580
+ data: ((_s = value == null ? void 0 : value.main) == null ? void 0 : _s.data) || Product1,
11558
11581
  header: "Line Graph Dynamic",
11559
11582
  bottomLabel: "Name of Employe",
11560
11583
  leftLabel: "Value",
@@ -11562,7 +11585,6 @@ const finalDataProvider = (type2, value, theme) => {
11562
11585
  numHidden: false,
11563
11586
  tooltipDataKey: ["MAMA New Project", "Second", "Third"],
11564
11587
  axisLeft: true,
11565
- legendAvailable: true,
11566
11588
  axisBottom: true,
11567
11589
  hideLeftAxisLine: false,
11568
11590
  hideBottomAxisLine: false,
@@ -11572,13 +11594,14 @@ const finalDataProvider = (type2, value, theme) => {
11572
11594
  legendTitle: "Our Assests",
11573
11595
  direction: "row",
11574
11596
  align: "right",
11597
+ colorRectWidth: 20,
11575
11598
  ...(_t5 = value == null ? void 0 : value.main) == null ? void 0 : _t5.legend
11576
11599
  }
11577
11600
  },
11578
11601
  style: {
11579
11602
  containerStyle: {
11580
11603
  background: theme.palette.secondary.main,
11581
- width: "100%",
11604
+ width: "90%",
11582
11605
  height: "300",
11583
11606
  borderRadius: "20px",
11584
11607
  padding: "10px 0 2px 0",
@@ -11595,54 +11618,33 @@ const finalDataProvider = (type2, value, theme) => {
11595
11618
  color: theme.palette.text.primary,
11596
11619
  ...(_v = value == null ? void 0 : value.style) == null ? void 0 : _v.headerStyle
11597
11620
  },
11598
- legendStyle: {
11599
- legend: {
11600
- lineHeight: "0.9em",
11601
- color: theme.palette.text.primary,
11602
- fontSize: "10px",
11603
- fontFamily: "arial",
11604
- padding: "10px 10px",
11605
- float: "left",
11606
- border: "1px solid rgba(255, 255, 255, 0.3)",
11607
- borderRadius: " 8px",
11608
- margin: "5px 5px",
11609
- ...(_x = (_w = value == null ? void 0 : value.style) == null ? void 0 : _w.legendStyle) == null ? void 0 : _x.legend
11610
- },
11611
- legendTitle: {
11612
- fontWeight: 500,
11613
- marginBottom: "5px",
11614
- fontFamily: "roboto",
11615
- fontSize: "10px",
11616
- ...(_z = (_y = value == null ? void 0 : value.style) == null ? void 0 : _y.legendStyle) == null ? void 0 : _z.legendTitle
11617
- }
11618
- },
11619
11621
  labelStyle: {
11620
11622
  labelColor: theme.palette.text.primary,
11621
11623
  bottomLabelOffset: 20,
11622
11624
  leftLabelOffset: 50,
11623
11625
  leftLabelMargin: 80,
11624
- ...(_A = value == null ? void 0 : value.style) == null ? void 0 : _A.labelStyle
11626
+ ...(_w = value == null ? void 0 : value.style) == null ? void 0 : _w.labelStyle
11625
11627
  },
11626
11628
  lineStyle: {
11627
11629
  colorRange: ["#3f51b5", "rgba(200,0,31,0.9)", "rgba(25,200,205,0.6)"],
11628
11630
  lineAreaColor: "none",
11629
11631
  lineAreaOpacity: 0.2,
11630
- ...(_B = value == null ? void 0 : value.style) == null ? void 0 : _B.lineStyle
11632
+ ...(_x = value == null ? void 0 : value.style) == null ? void 0 : _x.lineStyle
11631
11633
  }
11632
11634
  }
11633
11635
  };
11634
11636
  case "HorizontalBarGraph":
11635
11637
  return {
11636
11638
  main: {
11637
- data: ((_C = value == null ? void 0 : value.main) == null ? void 0 : _C.data) || [{ y: "Anant Sharma", x: 60 }, { y: "Pankaj Chauhan", x: 60 }, { y: "satendra Raghav", x: 150 }, { y: "Vivek Pahadi", x: 80 }, { y: "Siddarth verma", x: 100 }],
11639
+ data: ((_y = value == null ? void 0 : value.main) == null ? void 0 : _y.data) || [{ y: "Anant Sharma", x: 60 }, { y: "Pankaj Chauhan", x: 60 }, { y: "satendra Raghav", x: 150 }, { y: "Vivek Pahadi", x: 80 }, { y: "Siddarth verma", x: 100 }],
11638
11640
  header: " ",
11639
11641
  bottomLabel: "Name of Employe",
11640
11642
  leftLabel: "Value",
11641
11643
  axisLeft: true,
11642
11644
  axisBottom: true,
11643
11645
  hideBottomTicks: false,
11644
- hideLeftTicks: ((_D = value == null ? void 0 : value.main) == null ? void 0 : _D.data) ? true : false,
11645
- hideLeftAxisLine: ((_E = value == null ? void 0 : value.main) == null ? void 0 : _E.data) ? true : false,
11646
+ hideLeftTicks: ((_z = value == null ? void 0 : value.main) == null ? void 0 : _z.data) ? true : false,
11647
+ hideLeftAxisLine: ((_A = value == null ? void 0 : value.main) == null ? void 0 : _A.data) ? true : false,
11646
11648
  hideBottomAxisLine: false,
11647
11649
  bottomAxisWidth: "10px",
11648
11650
  ...value.main
@@ -11654,7 +11656,7 @@ const finalDataProvider = (type2, value, theme) => {
11654
11656
  height: "300",
11655
11657
  borderRadius: "20px",
11656
11658
  padding: "10px 0 2px 0",
11657
- ...(_F = value == null ? void 0 : value.style) == null ? void 0 : _F.containerStyle
11659
+ ...(_B = value == null ? void 0 : value.style) == null ? void 0 : _B.containerStyle
11658
11660
  },
11659
11661
  headerStyle: {
11660
11662
  fontWeight: 500,
@@ -11665,12 +11667,12 @@ const finalDataProvider = (type2, value, theme) => {
11665
11667
  width: "100%",
11666
11668
  fontSize: "18px",
11667
11669
  color: theme.palette.text.primary,
11668
- ...(_G = value == null ? void 0 : value.style) == null ? void 0 : _G.headerStyle
11670
+ ...(_C = value == null ? void 0 : value.style) == null ? void 0 : _C.headerStyle
11669
11671
  },
11670
11672
  tooltipStyle: {
11671
11673
  padding: "6px",
11672
11674
  borderRadius: "2px",
11673
- ...(_H = value == null ? void 0 : value.style) == null ? void 0 : _H.tooltipStyle
11675
+ ...(_D = value == null ? void 0 : value.style) == null ? void 0 : _D.tooltipStyle
11674
11676
  },
11675
11677
  labelStyle: {
11676
11678
  margin: { top: 10, left: 110, right: 40, bottom: 40 },
@@ -11681,11 +11683,11 @@ const finalDataProvider = (type2, value, theme) => {
11681
11683
  tickColor: theme.palette.text.primary,
11682
11684
  rightAxisWidth: "0.3px",
11683
11685
  fontSize: "10px",
11684
- ...(_I = value == null ? void 0 : value.style) == null ? void 0 : _I.labelStyle
11686
+ ...(_E = value == null ? void 0 : value.style) == null ? void 0 : _E.labelStyle
11685
11687
  },
11686
11688
  barStyle: {
11687
11689
  color: "#6c5efb",
11688
- ...(_J = value == null ? void 0 : value.style) == null ? void 0 : _J.barStyle
11690
+ ...(_F = value == null ? void 0 : value.style) == null ? void 0 : _F.barStyle
11689
11691
  }
11690
11692
  }
11691
11693
  };
@@ -11729,13 +11731,12 @@ const DrawPieGraph = ({
11729
11731
  parentWidth,
11730
11732
  parentHeight
11731
11733
  }) => {
11732
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
11734
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
11733
11735
  const letters = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data;
11734
11736
  const arr = ((_b = value == null ? void 0 : value.main) == null ? void 0 : _b.xAxisValue) && ((_c = value == null ? void 0 : value.main) == null ? void 0 : _c.yAxisValue) ? [(_d = value == null ? void 0 : value.main) == null ? void 0 : _d.xAxisValue, (_e = value == null ? void 0 : value.main) == null ? void 0 : _e.yAxisValue] : Object.keys(letters[0]);
11735
11737
  const frequency = (d2) => d2[arr[1]];
11736
- const labelArray = letters.map((l2) => l2[arr[0]]);
11737
11738
  const getLetterFrequencyColor = createOrdinalScale$1({
11738
- domain: labelArray,
11739
+ domain: letters.map((l2) => l2[arr[0]]),
11739
11740
  range: (_g = (_f = value == null ? void 0 : value.style) == null ? void 0 : _f.pieStyle) == null ? void 0 : _g.colorRange
11740
11741
  });
11741
11742
  const {
@@ -11753,18 +11754,16 @@ const DrawPieGraph = ({
11753
11754
  tooltipData: [datum2[arr[0]], datum2[arr[1]]]
11754
11755
  });
11755
11756
  };
11756
- const innerWidth2 = parentWidth - 40;
11757
+ const innerWidth = parentWidth - 40;
11757
11758
  const innerHeight = parentHeight - 40;
11758
- const centerX = innerWidth2 / 2;
11759
+ const centerX = innerWidth / 2;
11759
11760
  const centerY = innerHeight / 2;
11760
11761
  const left2 = centerX + 20;
11761
11762
  const top2 = centerY + 20;
11762
11763
  const pieSortValues = (a2, b10) => a2 - b10;
11763
11764
  return /* @__PURE__ */ jsxs(Fragment, {
11764
11765
  children: [((_h = value == null ? void 0 : value.main) == null ? void 0 : _h.legendAvailable) && /* @__PURE__ */ jsx(Legend, {
11765
- value,
11766
- colorRange: (_j = (_i = value == null ? void 0 : value.style) == null ? void 0 : _i.pieStyle) == null ? void 0 : _j.colorRange,
11767
- dataKeyArray: labelArray
11766
+ value
11768
11767
  }), /* @__PURE__ */ jsx("svg", {
11769
11768
  width: parentWidth,
11770
11769
  height: parentHeight,
@@ -11776,10 +11775,10 @@ const DrawPieGraph = ({
11776
11775
  data: letters,
11777
11776
  pieSortValues,
11778
11777
  pieValue: frequency,
11779
- outerRadius: (_l = (_k = value == null ? void 0 : value.style) == null ? void 0 : _k.pieStyle) == null ? void 0 : _l.outerRadius,
11780
- innerRadius: (_n = (_m = value == null ? void 0 : value.style) == null ? void 0 : _m.pieStyle) == null ? void 0 : _n.innerRadius,
11781
- cornerRadius: (_p = (_o = value == null ? void 0 : value.style) == null ? void 0 : _o.pieStyle) == null ? void 0 : _p.cornerRadius,
11782
- padAngle: (_r = (_q = value == null ? void 0 : value.style) == null ? void 0 : _q.pieStyle) == null ? void 0 : _r.padAngle,
11778
+ outerRadius: (_j = (_i = value == null ? void 0 : value.style) == null ? void 0 : _i.pieStyle) == null ? void 0 : _j.outerRadius,
11779
+ innerRadius: (_l = (_k = value == null ? void 0 : value.style) == null ? void 0 : _k.pieStyle) == null ? void 0 : _l.innerRadius,
11780
+ cornerRadius: (_n = (_m = value == null ? void 0 : value.style) == null ? void 0 : _m.pieStyle) == null ? void 0 : _n.cornerRadius,
11781
+ padAngle: (_p = (_o = value == null ? void 0 : value.style) == null ? void 0 : _o.pieStyle) == null ? void 0 : _p.padAngle,
11783
11782
  children: (pie2) => {
11784
11783
  return pie2.arcs.map((arc2, index2) => {
11785
11784
  var _a2, _b2, _c2, _d2;
@@ -11834,11 +11833,9 @@ const PieGraph = ({
11834
11833
  });
11835
11834
  return /* @__PURE__ */ jsxs("div", {
11836
11835
  style: pieData.style.containerStyle,
11837
- children: [((_a = pieData == null ? void 0 : pieData.main) == null ? void 0 : _a.header) && /* @__PURE__ */ jsx(Fragment, {
11838
- children: /* @__PURE__ */ jsx("div", {
11839
- style: pieData.style.headerStyle,
11840
- children: (_b = pieData == null ? void 0 : pieData.main) == null ? void 0 : _b.header
11841
- })
11836
+ children: [((_a = pieData == null ? void 0 : pieData.main) == null ? void 0 : _a.header) && /* @__PURE__ */ jsx("div", {
11837
+ style: pieData.style.headerStyle,
11838
+ children: (_b = pieData == null ? void 0 : pieData.main) == null ? void 0 : _b.header
11842
11839
  }), PieRender]
11843
11840
  });
11844
11841
  };
@@ -17268,13 +17265,13 @@ function _objectWithoutPropertiesLoose$7(source, excluded) {
17268
17265
  }
17269
17266
  function BaseGrid(_ref) {
17270
17267
  var _ref$rows = _ref.rows, rows = _ref$rows === void 0 ? true : _ref$rows, _ref$columns = _ref.columns, columns = _ref$columns === void 0 ? true : _ref$columns, GridRowsComponent = _ref.GridRowsComponent, GridColumnsComponent = _ref.GridColumnsComponent, props = _objectWithoutPropertiesLoose$7(_ref, _excluded$o);
17271
- var _useContext = useContext(DataContext$1), theme = _useContext.theme, columnsScale = _useContext.xScale, rowsScale = _useContext.yScale, margin2 = _useContext.margin, innerWidth2 = _useContext.innerWidth, innerHeight = _useContext.innerHeight;
17268
+ var _useContext = useContext(DataContext$1), theme = _useContext.theme, columnsScale = _useContext.xScale, rowsScale = _useContext.yScale, margin2 = _useContext.margin, innerWidth = _useContext.innerWidth, innerHeight = _useContext.innerHeight;
17272
17269
  var gridLineStyles = theme == null ? void 0 : theme.gridStyles;
17273
17270
  return /* @__PURE__ */ jsxs(Fragment, {
17274
- children: [rows && rowsScale && innerWidth2 != null && /* @__PURE__ */ jsx(GridRowsComponent, {
17271
+ children: [rows && rowsScale && innerWidth != null && /* @__PURE__ */ jsx(GridRowsComponent, {
17275
17272
  left: margin2 == null ? void 0 : margin2.left,
17276
17273
  lineStyle: gridLineStyles,
17277
- width: innerWidth2,
17274
+ width: innerWidth,
17278
17275
  scale: rowsScale,
17279
17276
  ...props
17280
17277
  }), columns && columnsScale && innerHeight != null && /* @__PURE__ */ jsx(GridColumnsComponent, {
@@ -17399,7 +17396,7 @@ function defaultRenderGlyph$1(props) {
17399
17396
  function TooltipInner(_ref2) {
17400
17397
  var _tooltipContext$toolt, _nearestDatum$key, _ref12, _theme$gridStyles$str, _theme$gridStyles2, _theme$htmlLabel3, _ref13, _theme$gridStyles$str2, _theme$gridStyles3, _theme$htmlLabel4, _theme$backgroundColo, _theme$htmlLabel5, _theme$htmlLabel6;
17401
17398
  var debounce2 = _ref2.debounce, detectBounds = _ref2.detectBounds, horizontalCrosshairStyle = _ref2.horizontalCrosshairStyle, glyphStyle = _ref2.glyphStyle, renderTooltip = _ref2.renderTooltip, _ref2$renderGlyph = _ref2.renderGlyph, renderGlyph = _ref2$renderGlyph === void 0 ? defaultRenderGlyph$1 : _ref2$renderGlyph, resizeObserverPolyfillProp = _ref2.resizeObserverPolyfill, _ref2$scroll = _ref2.scroll, scroll = _ref2$scroll === void 0 ? true : _ref2$scroll, _ref2$showDatumGlyph = _ref2.showDatumGlyph, showDatumGlyph = _ref2$showDatumGlyph === void 0 ? false : _ref2$showDatumGlyph, _ref2$showHorizontalC = _ref2.showHorizontalCrosshair, showHorizontalCrosshair = _ref2$showHorizontalC === void 0 ? false : _ref2$showHorizontalC, _ref2$showSeriesGlyph = _ref2.showSeriesGlyphs, showSeriesGlyphs = _ref2$showSeriesGlyph === void 0 ? false : _ref2$showSeriesGlyph, _ref2$showVerticalCro = _ref2.showVerticalCrosshair, showVerticalCrosshair = _ref2$showVerticalCro === void 0 ? false : _ref2$showVerticalCro, _ref2$snapTooltipToDa = _ref2.snapTooltipToDatumX, snapTooltipToDatumX = _ref2$snapTooltipToDa === void 0 ? false : _ref2$snapTooltipToDa, _ref2$snapTooltipToDa2 = _ref2.snapTooltipToDatumY, snapTooltipToDatumY = _ref2$snapTooltipToDa2 === void 0 ? false : _ref2$snapTooltipToDa2, verticalCrosshairStyle = _ref2.verticalCrosshairStyle, zIndex2 = _ref2.zIndex, tooltipProps = _objectWithoutPropertiesLoose$5(_ref2, _excluded$m);
17402
- var _ref3 = useContext(DataContext$1) || {}, colorScale = _ref3.colorScale, theme = _ref3.theme, innerHeight = _ref3.innerHeight, innerWidth2 = _ref3.innerWidth, margin2 = _ref3.margin, xScale = _ref3.xScale, yScale = _ref3.yScale, dataRegistry = _ref3.dataRegistry, resizeObserverPolyfill = _ref3.resizeObserverPolyfill;
17399
+ var _ref3 = useContext(DataContext$1) || {}, colorScale = _ref3.colorScale, theme = _ref3.theme, innerHeight = _ref3.innerHeight, innerWidth = _ref3.innerWidth, margin2 = _ref3.margin, xScale = _ref3.xScale, yScale = _ref3.yScale, dataRegistry = _ref3.dataRegistry, resizeObserverPolyfill = _ref3.resizeObserverPolyfill;
17403
17400
  var tooltipContext = useContext(TooltipContext$1);
17404
17401
  var _useTooltipInPortal = useTooltipInPortal({
17405
17402
  debounce: debounce2,
@@ -17526,12 +17523,12 @@ function TooltipInner(_ref2) {
17526
17523
  detectBounds: false,
17527
17524
  style: TOOLTIP_NO_STYLE,
17528
17525
  children: /* @__PURE__ */ jsx("svg", {
17529
- width: innerWidth2,
17526
+ width: innerWidth,
17530
17527
  height: "1",
17531
17528
  overflow: "visible",
17532
17529
  children: /* @__PURE__ */ jsx("line", {
17533
17530
  x1: 0,
17534
- x2: innerWidth2,
17531
+ x2: innerWidth,
17535
17532
  y1: 0,
17536
17533
  y2: 0,
17537
17534
  strokeWidth: 1.5,
@@ -18527,7 +18524,7 @@ function DataProvider(_ref) {
18527
18524
  var contextTheme = useContext(ThemeContext$2);
18528
18525
  var theme = propsTheme || contextTheme;
18529
18526
  var _useDimensions = useDimensions(initialDimensions), _useDimensions$ = _useDimensions[0], width2 = _useDimensions$.width, height2 = _useDimensions$.height, margin2 = _useDimensions$.margin, setDimensions = _useDimensions[1];
18530
- var innerWidth2 = Math.max(0, width2 - margin2.left - margin2.right);
18527
+ var innerWidth = Math.max(0, width2 - margin2.left - margin2.right);
18531
18528
  var innerHeight = Math.max(0, height2 - margin2.top - margin2.bottom);
18532
18529
  var dataRegistry = useDataRegistry();
18533
18530
  var _useScales = useScales({
@@ -18558,14 +18555,14 @@ function DataProvider(_ref) {
18558
18555
  width: width2,
18559
18556
  height: height2,
18560
18557
  margin: margin2,
18561
- innerWidth: innerWidth2,
18558
+ innerWidth,
18562
18559
  innerHeight,
18563
18560
  setDimensions,
18564
18561
  horizontal,
18565
18562
  resizeObserverPolyfill
18566
18563
  };
18567
18564
  },
18568
- [colorScale, dataRegistry, height2, horizontal, innerHeight, innerWidth2, margin2, setDimensions, theme, width2, xScale, yScale, resizeObserverPolyfill]
18565
+ [colorScale, dataRegistry, height2, horizontal, innerHeight, innerWidth, margin2, setDimensions, theme, width2, xScale, yScale, resizeObserverPolyfill]
18569
18566
  );
18570
18567
  return /* @__PURE__ */ jsx(DataContext$1.Provider, {
18571
18568
  value,
@@ -19803,24 +19800,22 @@ function AnimatedLineSeries(props) {
19803
19800
  }));
19804
19801
  }
19805
19802
  const DrawGraph = ({
19806
- value,
19807
- parentWidth,
19808
- parentHeight
19803
+ value
19809
19804
  }) => {
19810
19805
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
19811
19806
  const data = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data;
19812
- const arr = value.main.xAxisValue && value.main.yAxisValue ? [value.main.xAxisValue, value.main.yAxisValue] : Object.keys(data[0][0]);
19807
+ const arr = value.main.xAxisValue && value.main.yAxisValue ? [value.main.xAxisValue, value.main.yAxisValue] : Object.keys(data[0].value[0]);
19813
19808
  const accessors = {
19814
19809
  xAccessor: (d2) => d2[arr[0]],
19815
19810
  yAccessor: (d2) => d2[arr[1]]
19816
19811
  };
19817
- return /* @__PURE__ */ jsxs("div", {
19812
+ const dataKeyArray = data.map((ele) => ele.key);
19813
+ return /* @__PURE__ */ jsxs(Fragment, {
19818
19814
  children: [value.main.legendAvailable && /* @__PURE__ */ jsx(Legend, {
19819
19815
  value,
19820
- colorRange: (_c = (_b = value == null ? void 0 : value.style) == null ? void 0 : _b.lineStyle) == null ? void 0 : _c.colorRange
19816
+ dataKeyArray
19821
19817
  }), /* @__PURE__ */ jsxs(XYChart, {
19822
- width: parentWidth,
19823
- height: parentHeight,
19818
+ height: parseInt((_c = (_b = value.style) == null ? void 0 : _b.containerStyle) == null ? void 0 : _c.height),
19824
19819
  xScale: {
19825
19820
  type: "band"
19826
19821
  },
@@ -19860,12 +19855,12 @@ const DrawGraph = ({
19860
19855
  labelOffset: ((_q = (_p = value.style) == null ? void 0 : _p.labelStyle) == null ? void 0 : _q.bottomLabelOffset) || 32
19861
19856
  }), /* @__PURE__ */ jsx(AnimatedGrid, {
19862
19857
  columns: value.main.grid,
19863
- numTicks: value.main.numHidden ? 0 : ((_r = value.main) == null ? void 0 : _r.data[0].length) - 1
19858
+ numTicks: value.main.numHidden ? 0 : ((_r = value.main) == null ? void 0 : _r.data[0].value.length) - 1
19864
19859
  }), (_s = value.main) == null ? void 0 : _s.data.map((elem, i) => {
19865
19860
  var _a2, _b2, _c2, _d2, _e2, _f2;
19866
19861
  return /* @__PURE__ */ jsx(AnimatedLineSeries, {
19867
- dataKey: value.main.tooltipDataKey[i],
19868
- data: elem,
19862
+ dataKey: elem.key,
19863
+ data: elem.value,
19869
19864
  fill: (_b2 = (_a2 = value.style) == null ? void 0 : _a2.lineStyle) == null ? void 0 : _b2.lineAreaColor,
19870
19865
  fillOpacity: (_d2 = (_c2 = value.style) == null ? void 0 : _c2.lineStyle) == null ? void 0 : _d2.lineAreaOpacity,
19871
19866
  floodColor: "green",
@@ -19902,23 +19897,14 @@ const LineGraph = ({
19902
19897
  }) => {
19903
19898
  var _a, _b, _c, _d;
19904
19899
  const lineData = finalDataProvider("LineGraph", value, theme);
19905
- let LineRender = /* @__PURE__ */ jsx(ParentSize$1, {
19906
- children: (parent) => /* @__PURE__ */ jsx(DrawGraph, {
19907
- parentWidth: parent.width,
19908
- parentHeight: parseInt(lineData.style.containerStyle.height),
19909
- parentRef: parent.ref,
19910
- resizeParent: parent.resize,
19911
- value: lineData
19912
- })
19913
- });
19914
19900
  return /* @__PURE__ */ jsxs("div", {
19915
- style: {
19916
- ...(_a = lineData == null ? void 0 : lineData.style) == null ? void 0 : _a.containerStyle
19917
- },
19901
+ style: (_a = lineData == null ? void 0 : lineData.style) == null ? void 0 : _a.containerStyle,
19918
19902
  children: [((_b = lineData == null ? void 0 : lineData.main) == null ? void 0 : _b.header) && /* @__PURE__ */ jsx("div", {
19919
19903
  style: (_c = lineData == null ? void 0 : lineData.style) == null ? void 0 : _c.headerStyle,
19920
19904
  children: (_d = lineData == null ? void 0 : lineData.main) == null ? void 0 : _d.header
19921
- }), LineRender]
19905
+ }), /* @__PURE__ */ jsx(DrawGraph, {
19906
+ value: lineData
19907
+ })]
19922
19908
  });
19923
19909
  };
19924
19910
  var DrawHorizontalBarGraph = withTooltip(({
@@ -20085,7 +20071,7 @@ const ProgressBar = ({
20085
20071
  value,
20086
20072
  theme
20087
20073
  }) => {
20088
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t5, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N;
20074
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t5, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S;
20089
20075
  const [progress2, setProgress] = useState(((_b = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data) == null ? void 0 : _b.achieved) / ((_d = (_c = value == null ? void 0 : value.main) == null ? void 0 : _c.data) == null ? void 0 : _d.total) * 100);
20090
20076
  useEffect(() => {
20091
20077
  var _a2, _b2, _c2, _d2;
@@ -20113,7 +20099,7 @@ const ProgressBar = ({
20113
20099
  children: /* @__PURE__ */ jsx("div", {
20114
20100
  className: "progress-bar-fill",
20115
20101
  style: {
20116
- width: `${progress2 < 100 ? progress2 : 100}%`,
20102
+ width: `${progress2}%`,
20117
20103
  backgroundColor: ((_g = value == null ? void 0 : value.style) == null ? void 0 : _g.progressBarFillColor) || getColor()[1],
20118
20104
  height: "100%",
20119
20105
  borderRadius: "10px",
@@ -20179,7 +20165,7 @@ const ProgressBar = ({
20179
20165
  children: /* @__PURE__ */ jsx("div", {
20180
20166
  className: "progress-bar-fill",
20181
20167
  style: {
20182
- width: `${progress2 < 100 ? progress2 : 100}%`,
20168
+ width: `${progress2}%`,
20183
20169
  backgroundColor: getColor()[1],
20184
20170
  height: "100%",
20185
20171
  borderRadius: "10px",
@@ -20247,14 +20233,14 @@ const ProgressBar = ({
20247
20233
  fontSize: "10px",
20248
20234
  marginBottom: "10px"
20249
20235
  },
20250
- children: ((_J = value == null ? void 0 : value.main) == null ? void 0 : _J.bottomLabel_3) || "Remaining"
20236
+ children: ((_J = value == null ? void 0 : value.main) == null ? void 0 : _J.bottomLabel_3) || "Average"
20251
20237
  }), /* @__PURE__ */ jsx("div", {
20252
20238
  style: {
20253
20239
  textAlign: "right",
20254
20240
  color: ((_L = (_K = theme == null ? void 0 : theme.palette) == null ? void 0 : _K.text) == null ? void 0 : _L.primary) || "#121926",
20255
20241
  fontWeight: 500
20256
20242
  },
20257
- children: (_N = (_M = value == null ? void 0 : value.main) == null ? void 0 : _M.data) == null ? void 0 : _N.bottomLabel_3_value
20243
+ children: ((_M = value == null ? void 0 : value.main) == null ? void 0 : _M.daysCount) ? Math.round(((_O = (_N = value == null ? void 0 : value.main) == null ? void 0 : _N.data) == null ? void 0 : _O.achieved) / ((_P = value == null ? void 0 : value.main) == null ? void 0 : _P.daysCount)) + ((_Q = value == null ? void 0 : value.main) == null ? void 0 : _Q.bottomLabel_3_averageLabel) || "/day" : (_S = (_R = value == null ? void 0 : value.main) == null ? void 0 : _R.data) == null ? void 0 : _S.bottomLabel_3_value
20258
20244
  })]
20259
20245
  })]
20260
20246
  })]
@@ -38828,49 +38814,51 @@ const SpeedoMeter = ({
38828
38814
  value,
38829
38815
  theme
38830
38816
  }) => {
38831
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
38832
- return /* @__PURE__ */ jsx("div", {
38817
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t5, _u, _v, _w;
38818
+ return /* @__PURE__ */ jsxs("div", {
38833
38819
  style: {
38834
38820
  ...(_a = value == null ? void 0 : value.style) == null ? void 0 : _a.containerStyle,
38835
- width: "100%",
38836
- display: "flex",
38837
- justifyContent: "center",
38838
- alignItems: "center",
38839
- paddingTop: "50px",
38840
- paddingBottom: "50px",
38841
- marginLeft: "auto",
38842
- marginRight: "auto",
38843
- height: "auto",
38844
38821
  background: theme.palette.secondary.main
38845
38822
  },
38846
- children: /* @__PURE__ */ jsx("div", {
38823
+ children: [((_b = value == null ? void 0 : value.main) == null ? void 0 : _b.header) && /* @__PURE__ */ jsx("div", {
38824
+ style: {
38825
+ fontWeight: 700,
38826
+ textAlign: "left",
38827
+ fontFamily: "inherit",
38828
+ fontSize: "18px",
38829
+ color: theme.palette.text.primary || "#121926",
38830
+ ...(_c = value == null ? void 0 : value.style) == null ? void 0 : _c.headerStyle
38831
+ },
38832
+ children: value.main.header
38833
+ }), /* @__PURE__ */ jsx("div", {
38847
38834
  style: {
38848
38835
  width: "100%",
38836
+ minWidth: 500,
38849
38837
  display: "flex",
38850
38838
  justifyContent: "center",
38851
- alignItems: "center",
38852
- overflowX: "auto"
38839
+ overflow: "auto"
38853
38840
  },
38854
38841
  children: /* @__PURE__ */ jsx(ReactSpeedometer, {
38855
38842
  forceRender: true,
38856
- segmentColors: (_b = value == null ? void 0 : value.style) == null ? void 0 : _b.segmentColors,
38857
- maxValue: ((_d = (_c = value == null ? void 0 : value.main) == null ? void 0 : _c.data) == null ? void 0 : _d.maxValue) || 500,
38858
- width: window.innerWidth > 750 ? 450 : 280,
38859
- needleHeightRatio: ((_e = value == null ? void 0 : value.style) == null ? void 0 : _e.needleHeightRatio) || 0.7,
38860
- currentValueText: ((_f = value == null ? void 0 : value.main) == null ? void 0 : _f.currentValueText) || "Your Score",
38861
- customSegmentLabels: (_g = value == null ? void 0 : value.main) == null ? void 0 : _g.customSegmentLabels,
38862
- ringWidth: ((_h = value == null ? void 0 : value.style) == null ? void 0 : _h.ringWidth) || 37,
38863
- needleTransitionDuration: ((_i = value == null ? void 0 : value.style) == null ? void 0 : _i.needleTransitionDuration) || 5333,
38864
- needleTransition: ((_j = value == null ? void 0 : value.style) == null ? void 0 : _j.needleTransition) || "easeElastic",
38865
- value: ((_l = (_k = value == null ? void 0 : value.main) == null ? void 0 : _k.data) == null ? void 0 : _l.value) || 473,
38866
- needleColor: ((_m = value == null ? void 0 : value.style) == null ? void 0 : _m.needleColor) || "red",
38867
- minValue: ((_o = (_n = value == null ? void 0 : value.main) == null ? void 0 : _n.data) == null ? void 0 : _o.minValue) || 0,
38868
- startColor: ((_p = value == null ? void 0 : value.style) == null ? void 0 : _p.startColor) || "red",
38869
- segments: +((_q = value == null ? void 0 : value.main) == null ? void 0 : _q.segments) || 5,
38870
- endColor: ((_r = value == null ? void 0 : value.style) == null ? void 0 : _r.endColor) || "green",
38871
- textColor: ((_s = value == null ? void 0 : value.style) == null ? void 0 : _s.textColor) || "black"
38843
+ segmentColors: (_d = value == null ? void 0 : value.style) == null ? void 0 : _d.segmentColors,
38844
+ maxValue: ((_f = (_e = value == null ? void 0 : value.main) == null ? void 0 : _e.data) == null ? void 0 : _f.maxValue) || 500,
38845
+ width: ((_g = value == null ? void 0 : value.style) == null ? void 0 : _g.width) || 450,
38846
+ needleHeightRatio: ((_h = value == null ? void 0 : value.style) == null ? void 0 : _h.needleHeightRatio) || 0.7,
38847
+ currentValueText: (_i = value == null ? void 0 : value.main) == null ? void 0 : _i.currentValueText,
38848
+ customSegmentLabels: (_j = value == null ? void 0 : value.main) == null ? void 0 : _j.customSegmentLabel,
38849
+ ringWidth: ((_k = value == null ? void 0 : value.style) == null ? void 0 : _k.ringWidth) || 37,
38850
+ needleTransitionDuration: ((_l = value == null ? void 0 : value.style) == null ? void 0 : _l.needleTransitionDuration) || 5333,
38851
+ height: (_m = value == null ? void 0 : value.style) == null ? void 0 : _m.height,
38852
+ needleTransition: ((_n = value == null ? void 0 : value.style) == null ? void 0 : _n.needleTransition) || "easeElastic",
38853
+ value: ((_p = (_o = value == null ? void 0 : value.main) == null ? void 0 : _o.data) == null ? void 0 : _p.value) || 473,
38854
+ needleColor: ((_q = value == null ? void 0 : value.style) == null ? void 0 : _q.needleColor) || "red",
38855
+ minValue: ((_s = (_r = value == null ? void 0 : value.main) == null ? void 0 : _r.data) == null ? void 0 : _s.minValue) || 0,
38856
+ startColor: ((_t5 = value == null ? void 0 : value.style) == null ? void 0 : _t5.startColor) || "red",
38857
+ segments: ((_u = value == null ? void 0 : value.main) == null ? void 0 : _u.segments) || 5,
38858
+ endColor: ((_v = value == null ? void 0 : value.style) == null ? void 0 : _v.endColor) || "green",
38859
+ textColor: ((_w = value == null ? void 0 : value.style) == null ? void 0 : _w.textColor) || "black"
38872
38860
  })
38873
- })
38861
+ })]
38874
38862
  });
38875
38863
  };
38876
38864
  function _extends() {
@@ -39187,7 +39175,7 @@ function memoize$1(fn) {
39187
39175
  return cache[arg];
39188
39176
  };
39189
39177
  }
39190
- var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
39178
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
39191
39179
  var isPropValid = /* @__PURE__ */ memoize$1(
39192
39180
  function(prop) {
39193
39181
  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
@@ -43897,9 +43885,9 @@ const CustomTimer = ({
43897
43885
  const [hour2, setHours] = useState(0);
43898
43886
  const [interval2, setInter] = useState();
43899
43887
  useEffect(() => {
43900
- if ((data == null ? void 0 : data.startDate) && (data == null ? void 0 : data.endDate) && new Date(data == null ? void 0 : data.startDate).getTime() <= new Date(data == null ? void 0 : data.endDate).getTime() && new Date().getTime() >= new Date(data == null ? void 0 : data.startDate).getTime() && new Date().getTime() <= new Date(data == null ? void 0 : data.endDate).getTime()) {
43888
+ if (new Date(data.startDate).getTime() < new Date().getTime() && new Date(data.startDate).getTime() < new Date(data.endDate).getTime()) {
43901
43889
  let currentDate = new Date();
43902
- const Difference_In_Time = new Date(data == null ? void 0 : data.endDate).getTime() - currentDate.getTime();
43890
+ const Difference_In_Time = new Date(data.endDate).getTime() - currentDate.getTime();
43903
43891
  const Difference_In_Days = Difference_In_Time / (1e3 * 3600 * 24);
43904
43892
  setDays(Math.floor(Difference_In_Days));
43905
43893
  setInter(setInterval(() => {
@@ -43908,21 +43896,16 @@ const CustomTimer = ({
43908
43896
  setMin(currdate.getMinutes());
43909
43897
  setSec(currdate.getSeconds());
43910
43898
  }, 1e3));
43899
+ return () => {
43900
+ clearInterval(interval2);
43901
+ };
43911
43902
  } else {
43912
- clearInterval(interval2);
43913
43903
  setDays(0);
43914
43904
  setHours(0);
43915
43905
  setMin(0);
43916
43906
  setSec(0);
43917
43907
  }
43918
- return () => {
43919
- clearInterval(interval2);
43920
- setDays(0);
43921
- setHours(0);
43922
- setMin(0);
43923
- setSec(0);
43924
- };
43925
- }, [data == null ? void 0 : data.startDate, data == null ? void 0 : data.endDate]);
43908
+ }, [data]);
43926
43909
  const containerStyle = {
43927
43910
  display: "flex",
43928
43911
  flexDirection: "column",
@@ -43969,7 +43952,7 @@ const CustomTimer = ({
43969
43952
  children: [/* @__PURE__ */ jsx(Box$1, {
43970
43953
  component: "h1",
43971
43954
  style: containerLabelColor,
43972
- children: new Date().getTime() >= new Date(data == null ? void 0 : data.startDate).getTime() && new Date().getTime() <= new Date(data == null ? void 0 : data.endDate).getTime() ? "Contest ends in..." : new Date().getTime() < new Date(data == null ? void 0 : data.startDate).getTime() ? "Program Not Started" : "Program Over"
43955
+ children: new Date().getTime() >= new Date(data == null ? void 0 : data.startDate).getTime() && new Date().getTime() <= new Date(data.endDate).getTime() ? "Contest ends in..." : new Date().getTime() < new Date(data.startDate).getTime() ? "Program Not Started Yet" : "Program Over"
43973
43956
  }), /* @__PURE__ */ jsxs(Box$1, {
43974
43957
  style: {
43975
43958
  display: "flex",
@@ -44021,3 +44004,4 @@ const CustomTimer = ({
44021
44004
  });
44022
44005
  };
44023
44006
  export { BarGraph, ImpaktAppsCard as Card, HorizontalBarGraph, LineGraph, PieGraph, ProgressBar, SpeedoMeter, CustomTimer as Timer };
44007
+ //# sourceMappingURL=impaktapps-design.es.js.map