impaktapps-design 0.2.79 → 0.2.86
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/impaktapps-design.es.js +155 -182
- package/dist/impaktapps-design.es.js.map +1 -0
- package/dist/impaktapps-design.umd.js +14 -13
- package/dist/impaktapps-design.umd.js.map +1 -0
- package/dist/src/component/LineGraph/DrawLineGraph.d.ts +1 -1
- package/dist/src/utils/finalDataProvider.d.ts +1 -4
- package/dist/style.css +1 -1
- package/package.json +4 -1
- package/src/component/BottomAxis.tsx +1 -8
- package/src/component/Legend.tsx +2 -3
- package/src/component/LineGraph/DrawLineGraph.tsx +10 -11
- package/src/component/LineGraph/LineGraph.tsx +2 -18
- package/src/component/PieGraph/DrawPieGraph.tsx +3 -8
- package/src/component/PieGraph/PieGraph.tsx +1 -3
- package/src/component/ProgressBar/ProgressBar.tsx +63 -59
- package/src/component/SpeedoMeter/SpeedoMeter.tsx +9 -39
- package/src/component/Timer/Timer.tsx +13 -16
- package/src/utils/finalDataProvider.ts +20 -38
- package/src/Style/style.css +0 -20
|
@@ -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(
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
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.
|
|
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
|
-
...(
|
|
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: (
|
|
10899
|
-
children: (
|
|
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,32 @@ ParentSize$1.propTypes = {
|
|
|
11389
11384
|
children: PropTypes.func.isRequired
|
|
11390
11385
|
};
|
|
11391
11386
|
const Product1 = [
|
|
11392
|
-
{
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11387
|
+
{
|
|
11388
|
+
"key": "key1",
|
|
11389
|
+
"value": [
|
|
11390
|
+
{ "x": "01:00", "y": 123 },
|
|
11391
|
+
{ "x": "02:00", "y": 118 },
|
|
11392
|
+
{ "x": "03:00", "y": 141 },
|
|
11393
|
+
{ "x": "04:00", "y": 114 },
|
|
11394
|
+
{ "x": "05:00", "y": 108 },
|
|
11395
|
+
{ "x": "06:00", "y": 123 },
|
|
11396
|
+
{ "x": "07:00", "y": 128 },
|
|
11397
|
+
{ "x": "08:00", "y": 134 },
|
|
11398
|
+
{ "x": "09:00", "y": 131 },
|
|
11399
|
+
{ "x": "10:00", "y": 134 },
|
|
11400
|
+
{ "x": "11:00", "y": 118 },
|
|
11401
|
+
{ "x": "11:00", "y": 10 },
|
|
11402
|
+
{ "x": "12:00", "y": 130 },
|
|
11403
|
+
{ "x": "13:00", "y": 133 },
|
|
11404
|
+
{ "x": "14:00", "y": 132 },
|
|
11405
|
+
{ "x": "15:00", "y": 1 },
|
|
11406
|
+
{ "x": "15:00", "y": 137 },
|
|
11407
|
+
{ "x": "16:00", "y": 120 }
|
|
11408
|
+
]
|
|
11409
|
+
}
|
|
11398
11410
|
];
|
|
11399
11411
|
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
|
|
11412
|
+
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
11413
|
switch (type2) {
|
|
11402
11414
|
case "BarGraph":
|
|
11403
11415
|
case "StackBarGraph":
|
|
@@ -11542,7 +11554,7 @@ const finalDataProvider = (type2, value, theme) => {
|
|
|
11542
11554
|
}
|
|
11543
11555
|
},
|
|
11544
11556
|
pieStyle: {
|
|
11545
|
-
colorRange:
|
|
11557
|
+
colorRange: theme.chartColours.pieChartColours,
|
|
11546
11558
|
outerRadius: 120,
|
|
11547
11559
|
innerRadius: 60,
|
|
11548
11560
|
cornerRadius: 2,
|
|
@@ -11554,31 +11566,31 @@ const finalDataProvider = (type2, value, theme) => {
|
|
|
11554
11566
|
case "LineGraph":
|
|
11555
11567
|
return {
|
|
11556
11568
|
main: {
|
|
11557
|
-
data: ((_s = value == null ? void 0 : value.main) == null ? void 0 : _s.data) ||
|
|
11569
|
+
data: ((_s = value == null ? void 0 : value.main) == null ? void 0 : _s.data) || Product1,
|
|
11558
11570
|
header: "Line Graph Dynamic",
|
|
11559
11571
|
bottomLabel: "Name of Employe",
|
|
11560
11572
|
leftLabel: "Value",
|
|
11573
|
+
legendAvailable: true,
|
|
11561
11574
|
gridHidden: true,
|
|
11562
11575
|
numHidden: false,
|
|
11563
11576
|
tooltipDataKey: ["MAMA New Project", "Second", "Third"],
|
|
11564
11577
|
axisLeft: true,
|
|
11565
|
-
legendAvailable: true,
|
|
11566
11578
|
axisBottom: true,
|
|
11567
11579
|
hideLeftAxisLine: false,
|
|
11568
11580
|
hideBottomAxisLine: false,
|
|
11569
11581
|
...value == null ? void 0 : value.main,
|
|
11570
11582
|
legend: {
|
|
11571
11583
|
labelColor: theme.palette.text.primary,
|
|
11572
|
-
legendTitle: "Our Assests",
|
|
11573
11584
|
direction: "row",
|
|
11574
11585
|
align: "right",
|
|
11586
|
+
colorRectWidth: 20,
|
|
11575
11587
|
...(_t5 = value == null ? void 0 : value.main) == null ? void 0 : _t5.legend
|
|
11576
11588
|
}
|
|
11577
11589
|
},
|
|
11578
11590
|
style: {
|
|
11579
11591
|
containerStyle: {
|
|
11580
11592
|
background: theme.palette.secondary.main,
|
|
11581
|
-
width: "
|
|
11593
|
+
width: "90%",
|
|
11582
11594
|
height: "300",
|
|
11583
11595
|
borderRadius: "20px",
|
|
11584
11596
|
padding: "10px 0 2px 0",
|
|
@@ -11595,54 +11607,33 @@ const finalDataProvider = (type2, value, theme) => {
|
|
|
11595
11607
|
color: theme.palette.text.primary,
|
|
11596
11608
|
...(_v = value == null ? void 0 : value.style) == null ? void 0 : _v.headerStyle
|
|
11597
11609
|
},
|
|
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
11610
|
labelStyle: {
|
|
11620
11611
|
labelColor: theme.palette.text.primary,
|
|
11621
11612
|
bottomLabelOffset: 20,
|
|
11622
11613
|
leftLabelOffset: 50,
|
|
11623
11614
|
leftLabelMargin: 80,
|
|
11624
|
-
...(
|
|
11615
|
+
...(_w = value == null ? void 0 : value.style) == null ? void 0 : _w.labelStyle
|
|
11625
11616
|
},
|
|
11626
11617
|
lineStyle: {
|
|
11627
|
-
colorRange:
|
|
11618
|
+
colorRange: theme.chartColours.lineChartColours,
|
|
11628
11619
|
lineAreaColor: "none",
|
|
11629
11620
|
lineAreaOpacity: 0.2,
|
|
11630
|
-
...(
|
|
11621
|
+
...(_x = value == null ? void 0 : value.style) == null ? void 0 : _x.lineStyle
|
|
11631
11622
|
}
|
|
11632
11623
|
}
|
|
11633
11624
|
};
|
|
11634
11625
|
case "HorizontalBarGraph":
|
|
11635
11626
|
return {
|
|
11636
11627
|
main: {
|
|
11637
|
-
data: ((
|
|
11628
|
+
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
11629
|
header: " ",
|
|
11639
11630
|
bottomLabel: "Name of Employe",
|
|
11640
11631
|
leftLabel: "Value",
|
|
11641
11632
|
axisLeft: true,
|
|
11642
11633
|
axisBottom: true,
|
|
11643
11634
|
hideBottomTicks: false,
|
|
11644
|
-
hideLeftTicks: ((
|
|
11645
|
-
hideLeftAxisLine: ((
|
|
11635
|
+
hideLeftTicks: ((_z = value == null ? void 0 : value.main) == null ? void 0 : _z.data) ? true : false,
|
|
11636
|
+
hideLeftAxisLine: ((_A = value == null ? void 0 : value.main) == null ? void 0 : _A.data) ? true : false,
|
|
11646
11637
|
hideBottomAxisLine: false,
|
|
11647
11638
|
bottomAxisWidth: "10px",
|
|
11648
11639
|
...value.main
|
|
@@ -11654,7 +11645,7 @@ const finalDataProvider = (type2, value, theme) => {
|
|
|
11654
11645
|
height: "300",
|
|
11655
11646
|
borderRadius: "20px",
|
|
11656
11647
|
padding: "10px 0 2px 0",
|
|
11657
|
-
...(
|
|
11648
|
+
...(_B = value == null ? void 0 : value.style) == null ? void 0 : _B.containerStyle
|
|
11658
11649
|
},
|
|
11659
11650
|
headerStyle: {
|
|
11660
11651
|
fontWeight: 500,
|
|
@@ -11665,12 +11656,12 @@ const finalDataProvider = (type2, value, theme) => {
|
|
|
11665
11656
|
width: "100%",
|
|
11666
11657
|
fontSize: "18px",
|
|
11667
11658
|
color: theme.palette.text.primary,
|
|
11668
|
-
...(
|
|
11659
|
+
...(_C = value == null ? void 0 : value.style) == null ? void 0 : _C.headerStyle
|
|
11669
11660
|
},
|
|
11670
11661
|
tooltipStyle: {
|
|
11671
11662
|
padding: "6px",
|
|
11672
11663
|
borderRadius: "2px",
|
|
11673
|
-
...(
|
|
11664
|
+
...(_D = value == null ? void 0 : value.style) == null ? void 0 : _D.tooltipStyle
|
|
11674
11665
|
},
|
|
11675
11666
|
labelStyle: {
|
|
11676
11667
|
margin: { top: 10, left: 110, right: 40, bottom: 40 },
|
|
@@ -11681,11 +11672,11 @@ const finalDataProvider = (type2, value, theme) => {
|
|
|
11681
11672
|
tickColor: theme.palette.text.primary,
|
|
11682
11673
|
rightAxisWidth: "0.3px",
|
|
11683
11674
|
fontSize: "10px",
|
|
11684
|
-
...(
|
|
11675
|
+
...(_E = value == null ? void 0 : value.style) == null ? void 0 : _E.labelStyle
|
|
11685
11676
|
},
|
|
11686
11677
|
barStyle: {
|
|
11687
11678
|
color: "#6c5efb",
|
|
11688
|
-
...(
|
|
11679
|
+
...(_F = value == null ? void 0 : value.style) == null ? void 0 : _F.barStyle
|
|
11689
11680
|
}
|
|
11690
11681
|
}
|
|
11691
11682
|
};
|
|
@@ -11729,13 +11720,12 @@ const DrawPieGraph = ({
|
|
|
11729
11720
|
parentWidth,
|
|
11730
11721
|
parentHeight
|
|
11731
11722
|
}) => {
|
|
11732
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p
|
|
11723
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
11733
11724
|
const letters = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data;
|
|
11734
11725
|
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
11726
|
const frequency = (d2) => d2[arr[1]];
|
|
11736
|
-
const labelArray = letters.map((l2) => l2[arr[0]]);
|
|
11737
11727
|
const getLetterFrequencyColor = createOrdinalScale$1({
|
|
11738
|
-
domain:
|
|
11728
|
+
domain: letters.map((l2) => l2[arr[0]]),
|
|
11739
11729
|
range: (_g = (_f = value == null ? void 0 : value.style) == null ? void 0 : _f.pieStyle) == null ? void 0 : _g.colorRange
|
|
11740
11730
|
});
|
|
11741
11731
|
const {
|
|
@@ -11753,18 +11743,16 @@ const DrawPieGraph = ({
|
|
|
11753
11743
|
tooltipData: [datum2[arr[0]], datum2[arr[1]]]
|
|
11754
11744
|
});
|
|
11755
11745
|
};
|
|
11756
|
-
const
|
|
11746
|
+
const innerWidth = parentWidth - 40;
|
|
11757
11747
|
const innerHeight = parentHeight - 40;
|
|
11758
|
-
const centerX =
|
|
11748
|
+
const centerX = innerWidth / 2;
|
|
11759
11749
|
const centerY = innerHeight / 2;
|
|
11760
11750
|
const left2 = centerX + 20;
|
|
11761
11751
|
const top2 = centerY + 20;
|
|
11762
11752
|
const pieSortValues = (a2, b10) => a2 - b10;
|
|
11763
11753
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
11764
11754
|
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
|
|
11755
|
+
value
|
|
11768
11756
|
}), /* @__PURE__ */ jsx("svg", {
|
|
11769
11757
|
width: parentWidth,
|
|
11770
11758
|
height: parentHeight,
|
|
@@ -11776,17 +11764,17 @@ const DrawPieGraph = ({
|
|
|
11776
11764
|
data: letters,
|
|
11777
11765
|
pieSortValues,
|
|
11778
11766
|
pieValue: frequency,
|
|
11779
|
-
outerRadius: (
|
|
11780
|
-
innerRadius: (
|
|
11781
|
-
cornerRadius: (
|
|
11782
|
-
padAngle: (
|
|
11767
|
+
outerRadius: (_j = (_i = value == null ? void 0 : value.style) == null ? void 0 : _i.pieStyle) == null ? void 0 : _j.outerRadius,
|
|
11768
|
+
innerRadius: (_l = (_k = value == null ? void 0 : value.style) == null ? void 0 : _k.pieStyle) == null ? void 0 : _l.innerRadius,
|
|
11769
|
+
cornerRadius: (_n = (_m = value == null ? void 0 : value.style) == null ? void 0 : _m.pieStyle) == null ? void 0 : _n.cornerRadius,
|
|
11770
|
+
padAngle: (_p = (_o = value == null ? void 0 : value.style) == null ? void 0 : _o.pieStyle) == null ? void 0 : _p.padAngle,
|
|
11783
11771
|
children: (pie2) => {
|
|
11784
11772
|
return pie2.arcs.map((arc2, index2) => {
|
|
11785
11773
|
var _a2, _b2, _c2, _d2;
|
|
11786
11774
|
const letter = ((_b2 = (_a2 = value == null ? void 0 : value.style) == null ? void 0 : _a2.pieStyle) == null ? void 0 : _b2.showPieLabel) ? arc2.data[arr[0]] : arc2.data[arr[1]];
|
|
11787
11775
|
const [centriodX, centriodY] = pie2.path.centroid(arc2);
|
|
11788
11776
|
const arcPath = pie2.path(arc2);
|
|
11789
|
-
const arcFill = getLetterFrequencyColor(
|
|
11777
|
+
const arcFill = getLetterFrequencyColor(letter);
|
|
11790
11778
|
return /* @__PURE__ */ jsxs("g", {
|
|
11791
11779
|
onMouseOut: hideTooltip,
|
|
11792
11780
|
onMouseOver: (e3) => handleMouse(e3, arc2.data),
|
|
@@ -11834,11 +11822,9 @@ const PieGraph = ({
|
|
|
11834
11822
|
});
|
|
11835
11823
|
return /* @__PURE__ */ jsxs("div", {
|
|
11836
11824
|
style: pieData.style.containerStyle,
|
|
11837
|
-
children: [((_a = pieData == null ? void 0 : pieData.main) == null ? void 0 : _a.header) && /* @__PURE__ */ jsx(
|
|
11838
|
-
|
|
11839
|
-
|
|
11840
|
-
children: (_b = pieData == null ? void 0 : pieData.main) == null ? void 0 : _b.header
|
|
11841
|
-
})
|
|
11825
|
+
children: [((_a = pieData == null ? void 0 : pieData.main) == null ? void 0 : _a.header) && /* @__PURE__ */ jsx("div", {
|
|
11826
|
+
style: pieData.style.headerStyle,
|
|
11827
|
+
children: (_b = pieData == null ? void 0 : pieData.main) == null ? void 0 : _b.header
|
|
11842
11828
|
}), PieRender]
|
|
11843
11829
|
});
|
|
11844
11830
|
};
|
|
@@ -17268,13 +17254,13 @@ function _objectWithoutPropertiesLoose$7(source, excluded) {
|
|
|
17268
17254
|
}
|
|
17269
17255
|
function BaseGrid(_ref) {
|
|
17270
17256
|
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,
|
|
17257
|
+
var _useContext = useContext(DataContext$1), theme = _useContext.theme, columnsScale = _useContext.xScale, rowsScale = _useContext.yScale, margin2 = _useContext.margin, innerWidth = _useContext.innerWidth, innerHeight = _useContext.innerHeight;
|
|
17272
17258
|
var gridLineStyles = theme == null ? void 0 : theme.gridStyles;
|
|
17273
17259
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
17274
|
-
children: [rows && rowsScale &&
|
|
17260
|
+
children: [rows && rowsScale && innerWidth != null && /* @__PURE__ */ jsx(GridRowsComponent, {
|
|
17275
17261
|
left: margin2 == null ? void 0 : margin2.left,
|
|
17276
17262
|
lineStyle: gridLineStyles,
|
|
17277
|
-
width:
|
|
17263
|
+
width: innerWidth,
|
|
17278
17264
|
scale: rowsScale,
|
|
17279
17265
|
...props
|
|
17280
17266
|
}), columns && columnsScale && innerHeight != null && /* @__PURE__ */ jsx(GridColumnsComponent, {
|
|
@@ -17399,7 +17385,7 @@ function defaultRenderGlyph$1(props) {
|
|
|
17399
17385
|
function TooltipInner(_ref2) {
|
|
17400
17386
|
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
17387
|
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,
|
|
17388
|
+
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
17389
|
var tooltipContext = useContext(TooltipContext$1);
|
|
17404
17390
|
var _useTooltipInPortal = useTooltipInPortal({
|
|
17405
17391
|
debounce: debounce2,
|
|
@@ -17526,12 +17512,12 @@ function TooltipInner(_ref2) {
|
|
|
17526
17512
|
detectBounds: false,
|
|
17527
17513
|
style: TOOLTIP_NO_STYLE,
|
|
17528
17514
|
children: /* @__PURE__ */ jsx("svg", {
|
|
17529
|
-
width:
|
|
17515
|
+
width: innerWidth,
|
|
17530
17516
|
height: "1",
|
|
17531
17517
|
overflow: "visible",
|
|
17532
17518
|
children: /* @__PURE__ */ jsx("line", {
|
|
17533
17519
|
x1: 0,
|
|
17534
|
-
x2:
|
|
17520
|
+
x2: innerWidth,
|
|
17535
17521
|
y1: 0,
|
|
17536
17522
|
y2: 0,
|
|
17537
17523
|
strokeWidth: 1.5,
|
|
@@ -18527,7 +18513,7 @@ function DataProvider(_ref) {
|
|
|
18527
18513
|
var contextTheme = useContext(ThemeContext$2);
|
|
18528
18514
|
var theme = propsTheme || contextTheme;
|
|
18529
18515
|
var _useDimensions = useDimensions(initialDimensions), _useDimensions$ = _useDimensions[0], width2 = _useDimensions$.width, height2 = _useDimensions$.height, margin2 = _useDimensions$.margin, setDimensions = _useDimensions[1];
|
|
18530
|
-
var
|
|
18516
|
+
var innerWidth = Math.max(0, width2 - margin2.left - margin2.right);
|
|
18531
18517
|
var innerHeight = Math.max(0, height2 - margin2.top - margin2.bottom);
|
|
18532
18518
|
var dataRegistry = useDataRegistry();
|
|
18533
18519
|
var _useScales = useScales({
|
|
@@ -18558,14 +18544,14 @@ function DataProvider(_ref) {
|
|
|
18558
18544
|
width: width2,
|
|
18559
18545
|
height: height2,
|
|
18560
18546
|
margin: margin2,
|
|
18561
|
-
innerWidth
|
|
18547
|
+
innerWidth,
|
|
18562
18548
|
innerHeight,
|
|
18563
18549
|
setDimensions,
|
|
18564
18550
|
horizontal,
|
|
18565
18551
|
resizeObserverPolyfill
|
|
18566
18552
|
};
|
|
18567
18553
|
},
|
|
18568
|
-
[colorScale, dataRegistry, height2, horizontal, innerHeight,
|
|
18554
|
+
[colorScale, dataRegistry, height2, horizontal, innerHeight, innerWidth, margin2, setDimensions, theme, width2, xScale, yScale, resizeObserverPolyfill]
|
|
18569
18555
|
);
|
|
18570
18556
|
return /* @__PURE__ */ jsx(DataContext$1.Provider, {
|
|
18571
18557
|
value,
|
|
@@ -19803,24 +19789,22 @@ function AnimatedLineSeries(props) {
|
|
|
19803
19789
|
}));
|
|
19804
19790
|
}
|
|
19805
19791
|
const DrawGraph = ({
|
|
19806
|
-
value
|
|
19807
|
-
parentWidth,
|
|
19808
|
-
parentHeight
|
|
19792
|
+
value
|
|
19809
19793
|
}) => {
|
|
19810
19794
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
19811
19795
|
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]);
|
|
19796
|
+
const arr = value.main.xAxisValue && value.main.yAxisValue ? [value.main.xAxisValue, value.main.yAxisValue] : Object.keys(data[0].value[0]);
|
|
19813
19797
|
const accessors = {
|
|
19814
19798
|
xAccessor: (d2) => d2[arr[0]],
|
|
19815
19799
|
yAccessor: (d2) => d2[arr[1]]
|
|
19816
19800
|
};
|
|
19817
|
-
|
|
19801
|
+
const dataKeyArray = data.map((ele) => ele.key);
|
|
19802
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
19818
19803
|
children: [value.main.legendAvailable && /* @__PURE__ */ jsx(Legend, {
|
|
19819
19804
|
value,
|
|
19820
|
-
|
|
19805
|
+
dataKeyArray
|
|
19821
19806
|
}), /* @__PURE__ */ jsxs(XYChart, {
|
|
19822
|
-
|
|
19823
|
-
height: parentHeight,
|
|
19807
|
+
height: parseInt((_c = (_b = value.style) == null ? void 0 : _b.containerStyle) == null ? void 0 : _c.height),
|
|
19824
19808
|
xScale: {
|
|
19825
19809
|
type: "band"
|
|
19826
19810
|
},
|
|
@@ -19860,12 +19844,12 @@ const DrawGraph = ({
|
|
|
19860
19844
|
labelOffset: ((_q = (_p = value.style) == null ? void 0 : _p.labelStyle) == null ? void 0 : _q.bottomLabelOffset) || 32
|
|
19861
19845
|
}), /* @__PURE__ */ jsx(AnimatedGrid, {
|
|
19862
19846
|
columns: value.main.grid,
|
|
19863
|
-
numTicks: value.main.numHidden ? 0 : ((_r = value.main) == null ? void 0 : _r.data[0].length) - 1
|
|
19847
|
+
numTicks: value.main.numHidden ? 0 : ((_r = value.main) == null ? void 0 : _r.data[0].value.length) - 1
|
|
19864
19848
|
}), (_s = value.main) == null ? void 0 : _s.data.map((elem, i) => {
|
|
19865
19849
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
19866
19850
|
return /* @__PURE__ */ jsx(AnimatedLineSeries, {
|
|
19867
|
-
dataKey:
|
|
19868
|
-
data: elem,
|
|
19851
|
+
dataKey: elem.key,
|
|
19852
|
+
data: elem.value,
|
|
19869
19853
|
fill: (_b2 = (_a2 = value.style) == null ? void 0 : _a2.lineStyle) == null ? void 0 : _b2.lineAreaColor,
|
|
19870
19854
|
fillOpacity: (_d2 = (_c2 = value.style) == null ? void 0 : _c2.lineStyle) == null ? void 0 : _d2.lineAreaOpacity,
|
|
19871
19855
|
floodColor: "green",
|
|
@@ -19902,23 +19886,14 @@ const LineGraph = ({
|
|
|
19902
19886
|
}) => {
|
|
19903
19887
|
var _a, _b, _c, _d;
|
|
19904
19888
|
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
19889
|
return /* @__PURE__ */ jsxs("div", {
|
|
19915
|
-
style:
|
|
19916
|
-
...(_a = lineData == null ? void 0 : lineData.style) == null ? void 0 : _a.containerStyle
|
|
19917
|
-
},
|
|
19890
|
+
style: (_a = lineData == null ? void 0 : lineData.style) == null ? void 0 : _a.containerStyle,
|
|
19918
19891
|
children: [((_b = lineData == null ? void 0 : lineData.main) == null ? void 0 : _b.header) && /* @__PURE__ */ jsx("div", {
|
|
19919
19892
|
style: (_c = lineData == null ? void 0 : lineData.style) == null ? void 0 : _c.headerStyle,
|
|
19920
19893
|
children: (_d = lineData == null ? void 0 : lineData.main) == null ? void 0 : _d.header
|
|
19921
|
-
}),
|
|
19894
|
+
}), /* @__PURE__ */ jsx(DrawGraph, {
|
|
19895
|
+
value: lineData
|
|
19896
|
+
})]
|
|
19922
19897
|
});
|
|
19923
19898
|
};
|
|
19924
19899
|
var DrawHorizontalBarGraph = withTooltip(({
|
|
@@ -20085,7 +20060,7 @@ const ProgressBar = ({
|
|
|
20085
20060
|
value,
|
|
20086
20061
|
theme
|
|
20087
20062
|
}) => {
|
|
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;
|
|
20063
|
+
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
20064
|
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
20065
|
useEffect(() => {
|
|
20091
20066
|
var _a2, _b2, _c2, _d2;
|
|
@@ -20113,7 +20088,7 @@ const ProgressBar = ({
|
|
|
20113
20088
|
children: /* @__PURE__ */ jsx("div", {
|
|
20114
20089
|
className: "progress-bar-fill",
|
|
20115
20090
|
style: {
|
|
20116
|
-
width: `${progress2
|
|
20091
|
+
width: `${progress2}%`,
|
|
20117
20092
|
backgroundColor: ((_g = value == null ? void 0 : value.style) == null ? void 0 : _g.progressBarFillColor) || getColor()[1],
|
|
20118
20093
|
height: "100%",
|
|
20119
20094
|
borderRadius: "10px",
|
|
@@ -20179,7 +20154,7 @@ const ProgressBar = ({
|
|
|
20179
20154
|
children: /* @__PURE__ */ jsx("div", {
|
|
20180
20155
|
className: "progress-bar-fill",
|
|
20181
20156
|
style: {
|
|
20182
|
-
width: `${progress2
|
|
20157
|
+
width: `${progress2}%`,
|
|
20183
20158
|
backgroundColor: getColor()[1],
|
|
20184
20159
|
height: "100%",
|
|
20185
20160
|
borderRadius: "10px",
|
|
@@ -20247,14 +20222,14 @@ const ProgressBar = ({
|
|
|
20247
20222
|
fontSize: "10px",
|
|
20248
20223
|
marginBottom: "10px"
|
|
20249
20224
|
},
|
|
20250
|
-
children: ((_J = value == null ? void 0 : value.main) == null ? void 0 : _J.bottomLabel_3) || "
|
|
20225
|
+
children: ((_J = value == null ? void 0 : value.main) == null ? void 0 : _J.bottomLabel_3) || "Average"
|
|
20251
20226
|
}), /* @__PURE__ */ jsx("div", {
|
|
20252
20227
|
style: {
|
|
20253
20228
|
textAlign: "right",
|
|
20254
20229
|
color: ((_L = (_K = theme == null ? void 0 : theme.palette) == null ? void 0 : _K.text) == null ? void 0 : _L.primary) || "#121926",
|
|
20255
20230
|
fontWeight: 500
|
|
20256
20231
|
},
|
|
20257
|
-
children: (_N = (
|
|
20232
|
+
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
20233
|
})]
|
|
20259
20234
|
})]
|
|
20260
20235
|
})]
|
|
@@ -38828,49 +38803,51 @@ const SpeedoMeter = ({
|
|
|
38828
38803
|
value,
|
|
38829
38804
|
theme
|
|
38830
38805
|
}) => {
|
|
38831
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
38832
|
-
return /* @__PURE__ */
|
|
38806
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t5, _u, _v, _w;
|
|
38807
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
38833
38808
|
style: {
|
|
38834
38809
|
...(_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
38810
|
background: theme.palette.secondary.main
|
|
38845
38811
|
},
|
|
38846
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
38812
|
+
children: [((_b = value == null ? void 0 : value.main) == null ? void 0 : _b.header) && /* @__PURE__ */ jsx("div", {
|
|
38813
|
+
style: {
|
|
38814
|
+
fontWeight: 700,
|
|
38815
|
+
textAlign: "left",
|
|
38816
|
+
fontFamily: "inherit",
|
|
38817
|
+
fontSize: "18px",
|
|
38818
|
+
color: theme.palette.text.primary || "#121926",
|
|
38819
|
+
...(_c = value == null ? void 0 : value.style) == null ? void 0 : _c.headerStyle
|
|
38820
|
+
},
|
|
38821
|
+
children: value.main.header
|
|
38822
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
38847
38823
|
style: {
|
|
38848
38824
|
width: "100%",
|
|
38825
|
+
minWidth: 500,
|
|
38849
38826
|
display: "flex",
|
|
38850
38827
|
justifyContent: "center",
|
|
38851
|
-
|
|
38852
|
-
overflowX: "auto"
|
|
38828
|
+
overflow: "auto"
|
|
38853
38829
|
},
|
|
38854
38830
|
children: /* @__PURE__ */ jsx(ReactSpeedometer, {
|
|
38855
38831
|
forceRender: true,
|
|
38856
|
-
segmentColors: (
|
|
38857
|
-
maxValue: ((
|
|
38858
|
-
width:
|
|
38859
|
-
needleHeightRatio: ((
|
|
38860
|
-
currentValueText: (
|
|
38861
|
-
customSegmentLabels: (
|
|
38862
|
-
ringWidth: ((
|
|
38863
|
-
needleTransitionDuration: ((
|
|
38864
|
-
|
|
38865
|
-
|
|
38866
|
-
|
|
38867
|
-
|
|
38868
|
-
|
|
38869
|
-
|
|
38870
|
-
|
|
38871
|
-
|
|
38832
|
+
segmentColors: (_d = value == null ? void 0 : value.style) == null ? void 0 : _d.segmentColors,
|
|
38833
|
+
maxValue: ((_f = (_e = value == null ? void 0 : value.main) == null ? void 0 : _e.data) == null ? void 0 : _f.maxValue) || 500,
|
|
38834
|
+
width: ((_g = value == null ? void 0 : value.style) == null ? void 0 : _g.width) || 450,
|
|
38835
|
+
needleHeightRatio: ((_h = value == null ? void 0 : value.style) == null ? void 0 : _h.needleHeightRatio) || 0.7,
|
|
38836
|
+
currentValueText: (_i = value == null ? void 0 : value.main) == null ? void 0 : _i.currentValueText,
|
|
38837
|
+
customSegmentLabels: (_j = value == null ? void 0 : value.main) == null ? void 0 : _j.customSegmentLabel,
|
|
38838
|
+
ringWidth: ((_k = value == null ? void 0 : value.style) == null ? void 0 : _k.ringWidth) || 37,
|
|
38839
|
+
needleTransitionDuration: ((_l = value == null ? void 0 : value.style) == null ? void 0 : _l.needleTransitionDuration) || 5333,
|
|
38840
|
+
height: (_m = value == null ? void 0 : value.style) == null ? void 0 : _m.height,
|
|
38841
|
+
needleTransition: ((_n = value == null ? void 0 : value.style) == null ? void 0 : _n.needleTransition) || "easeElastic",
|
|
38842
|
+
value: ((_p = (_o = value == null ? void 0 : value.main) == null ? void 0 : _o.data) == null ? void 0 : _p.value) || 473,
|
|
38843
|
+
needleColor: ((_q = value == null ? void 0 : value.style) == null ? void 0 : _q.needleColor) || "red",
|
|
38844
|
+
minValue: ((_s = (_r = value == null ? void 0 : value.main) == null ? void 0 : _r.data) == null ? void 0 : _s.minValue) || 0,
|
|
38845
|
+
startColor: ((_t5 = value == null ? void 0 : value.style) == null ? void 0 : _t5.startColor) || "red",
|
|
38846
|
+
segments: ((_u = value == null ? void 0 : value.main) == null ? void 0 : _u.segments) || 5,
|
|
38847
|
+
endColor: ((_v = value == null ? void 0 : value.style) == null ? void 0 : _v.endColor) || "green",
|
|
38848
|
+
textColor: ((_w = value == null ? void 0 : value.style) == null ? void 0 : _w.textColor) || "black"
|
|
38872
38849
|
})
|
|
38873
|
-
})
|
|
38850
|
+
})]
|
|
38874
38851
|
});
|
|
38875
38852
|
};
|
|
38876
38853
|
function _extends() {
|
|
@@ -39187,7 +39164,7 @@ function memoize$1(fn) {
|
|
|
39187
39164
|
return cache[arg];
|
|
39188
39165
|
};
|
|
39189
39166
|
}
|
|
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)-.*))$/;
|
|
39167
|
+
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
39168
|
var isPropValid = /* @__PURE__ */ memoize$1(
|
|
39192
39169
|
function(prop) {
|
|
39193
39170
|
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
@@ -43897,9 +43874,9 @@ const CustomTimer = ({
|
|
|
43897
43874
|
const [hour2, setHours] = useState(0);
|
|
43898
43875
|
const [interval2, setInter] = useState();
|
|
43899
43876
|
useEffect(() => {
|
|
43900
|
-
if (
|
|
43877
|
+
if (new Date(data.startDate).getTime() < new Date().getTime() && new Date(data.startDate).getTime() < new Date(data.endDate).getTime()) {
|
|
43901
43878
|
let currentDate = new Date();
|
|
43902
|
-
const Difference_In_Time = new Date(data
|
|
43879
|
+
const Difference_In_Time = new Date(data.endDate).getTime() - currentDate.getTime();
|
|
43903
43880
|
const Difference_In_Days = Difference_In_Time / (1e3 * 3600 * 24);
|
|
43904
43881
|
setDays(Math.floor(Difference_In_Days));
|
|
43905
43882
|
setInter(setInterval(() => {
|
|
@@ -43908,21 +43885,16 @@ const CustomTimer = ({
|
|
|
43908
43885
|
setMin(currdate.getMinutes());
|
|
43909
43886
|
setSec(currdate.getSeconds());
|
|
43910
43887
|
}, 1e3));
|
|
43888
|
+
return () => {
|
|
43889
|
+
clearInterval(interval2);
|
|
43890
|
+
};
|
|
43911
43891
|
} else {
|
|
43912
|
-
clearInterval(interval2);
|
|
43913
43892
|
setDays(0);
|
|
43914
43893
|
setHours(0);
|
|
43915
43894
|
setMin(0);
|
|
43916
43895
|
setSec(0);
|
|
43917
43896
|
}
|
|
43918
|
-
|
|
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]);
|
|
43897
|
+
}, [data]);
|
|
43926
43898
|
const containerStyle = {
|
|
43927
43899
|
display: "flex",
|
|
43928
43900
|
flexDirection: "column",
|
|
@@ -43969,7 +43941,7 @@ const CustomTimer = ({
|
|
|
43969
43941
|
children: [/* @__PURE__ */ jsx(Box$1, {
|
|
43970
43942
|
component: "h1",
|
|
43971
43943
|
style: containerLabelColor,
|
|
43972
|
-
children: new Date().getTime() >= new Date(data == null ? void 0 : data.startDate).getTime() && new Date().getTime() <= new Date(data
|
|
43944
|
+
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
43945
|
}), /* @__PURE__ */ jsxs(Box$1, {
|
|
43974
43946
|
style: {
|
|
43975
43947
|
display: "flex",
|
|
@@ -44021,3 +43993,4 @@ const CustomTimer = ({
|
|
|
44021
43993
|
});
|
|
44022
43994
|
};
|
|
44023
43995
|
export { BarGraph, ImpaktAppsCard as Card, HorizontalBarGraph, LineGraph, PieGraph, ProgressBar, SpeedoMeter, CustomTimer as Timer };
|
|
43996
|
+
//# sourceMappingURL=impaktapps-design.es.js.map
|