impaktapps-design 0.2.992-alpha.99 → 0.2.993

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.
@@ -9708,7 +9708,7 @@ function DrawBarGraph({
9708
9708
  margin: margin2 = defaultMargin$1,
9709
9709
  value
9710
9710
  }) {
9711
- 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;
9711
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
9712
9712
  const data = (_a = value.main) == null ? void 0 : _a.data;
9713
9713
  const keys2 = Object.keys(data[0]).filter((d2) => d2 !== value.main.xAxisValue);
9714
9714
  const [hoveredBar, setHoveredBar] = useState({
@@ -9737,7 +9737,7 @@ function DrawBarGraph({
9737
9737
  });
9738
9738
  const colorScale = createOrdinalScale$1({
9739
9739
  domain: keys2,
9740
- range: [((_e = (_d = (_c = value.style) == null ? void 0 : _c.barStyle) == null ? void 0 : _d.color) == null ? void 0 : _e.firstBarColor) || "#aeeef8", ((_h = (_g = (_f = value.style) == null ? void 0 : _f.barStyle) == null ? void 0 : _g.color) == null ? void 0 : _h.secondBarColor) || "#e5fd3d", ((_k = (_j = (_i = value.style) == null ? void 0 : _i.barStyle) == null ? void 0 : _j.color) == null ? void 0 : _k.thirdBarColor) || "#9caff6"]
9740
+ range: value.style.barStyle.colorRange
9741
9741
  });
9742
9742
  const xMax = width2 - margin2.left - margin2.right;
9743
9743
  const yMax = height2 - margin2.top - margin2.bottom;
@@ -9819,16 +9819,16 @@ function DrawBarGraph({
9819
9819
  style: {
9820
9820
  display: hoveredBar.date ? "block" : "none"
9821
9821
  },
9822
- x: value.main.type === "StackBarGraph" ? ((_l = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _l.bars[hoveredBar.city].x) - (Math.min((_m = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _m.bars[0].width, 15) - ((_n = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _n.bars[0].width)) / 2 : ((_o = hoveredBar.date) == null ? void 0 : _o.x0) - (Math.min((_p = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _p.bars[0].width, 15) - ((_q = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _q.bars[0].width)) || 0,
9823
- width: value.main.type !== "StackBarGraph" ? calcWidthofBar(hoveredBar == null ? void 0 : hoveredBar.date) : Math.min((_r = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _r.bars[0].width, 15),
9822
+ x: value.main.type === "StackBarGraph" ? ((_c = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _c.bars[hoveredBar.city].x) - (Math.min((_d = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _d.bars[0].width, 15) - ((_e = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _e.bars[0].width)) / 2 : ((_f = hoveredBar.date) == null ? void 0 : _f.x0) - (Math.min((_g = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _g.bars[0].width, 15) - ((_h = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _h.bars[0].width)) || 0,
9823
+ width: value.main.type !== "StackBarGraph" ? calcWidthofBar(hoveredBar == null ? void 0 : hoveredBar.date) : Math.min((_i = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _i.bars[0].width, 15),
9824
9824
  height: yMax,
9825
- fill: (_t5 = (_s = value.style) == null ? void 0 : _s.barStyle) == null ? void 0 : _t5.hoverBackgroundColor,
9825
+ fill: (_k = (_j = value.style) == null ? void 0 : _j.barStyle) == null ? void 0 : _k.hoverBackgroundColor,
9826
9826
  opacity: 1
9827
9827
  }), /* @__PURE__ */ jsx(LeftAxis, {
9828
9828
  value,
9829
9829
  yScale: tempScale,
9830
9830
  parentWidth: width2
9831
- }), ((_u = value == null ? void 0 : value.main) == null ? void 0 : _u.type) === "StackBarGraph" ? /* @__PURE__ */ jsx(BarStack, {
9831
+ }), ((_l = value == null ? void 0 : value.main) == null ? void 0 : _l.type) === "StackBarGraph" ? /* @__PURE__ */ jsx(BarStack, {
9832
9832
  data,
9833
9833
  keys: keys2,
9834
9834
  x: getDate,
@@ -9883,9 +9883,9 @@ function DrawBarGraph({
9883
9883
  xScale: dateScale,
9884
9884
  parentWidth: width2
9885
9885
  })]
9886
- }), ((_v = value == null ? void 0 : value.main) == null ? void 0 : _v.legendAvailable) && keys2.length > 1 && /* @__PURE__ */ jsx(Legend, {
9886
+ }), ((_m = value == null ? void 0 : value.main) == null ? void 0 : _m.legendAvailable) && keys2.length > 1 && /* @__PURE__ */ jsx(Legend, {
9887
9887
  dataKeyArray: keys2,
9888
- colorRange: [((_y = (_x = (_w = value.style) == null ? void 0 : _w.barStyle) == null ? void 0 : _x.color) == null ? void 0 : _y.firstBarColor) || "#aeeef8", ((_B = (_A = (_z = value.style) == null ? void 0 : _z.barStyle) == null ? void 0 : _A.color) == null ? void 0 : _B.secondBarColor) || "#e5fd3d", ((_E = (_D = (_C = value.style) == null ? void 0 : _C.barStyle) == null ? void 0 : _D.color) == null ? void 0 : _E.thirdBarColor) || "#9caff6"],
9888
+ colorRange: value.style.barStyle.colorRange,
9889
9889
  value
9890
9890
  }), tooltipOpen && /* @__PURE__ */ jsx(ToolTip, {
9891
9891
  value,
@@ -10141,51 +10141,23 @@ ParentSize$1.propTypes = {
10141
10141
  children: PropTypes.func.isRequired
10142
10142
  };
10143
10143
  const Product1 = [
10144
- {
10145
- "key": "key1",
10146
- "value": [
10147
- { "x": "01:00", "y": 123 },
10148
- { "x": "02:00", "y": 118 },
10149
- { "x": "03:00", "y": 141 },
10150
- { "x": "04:00", "y": 114 },
10151
- { "x": "05:00", "y": 108 },
10152
- { "x": "06:00", "y": 123 },
10153
- { "x": "07:00", "y": 128 },
10154
- { "x": "08:00", "y": 134 },
10155
- { "x": "09:00", "y": 131 }
10156
- ]
10157
- },
10158
- {
10159
- "key": "key2",
10160
- "value": [
10161
- { "x": "01:00", "y": 83 },
10162
- { "x": "02:00", "y": 108 },
10163
- { "x": "03:00", "y": 171 },
10164
- { "x": "04:00", "y": 94 },
10165
- { "x": "05:00", "y": 98 },
10166
- { "x": "06:00", "y": 153 },
10167
- { "x": "07:00", "y": 128 },
10168
- { "x": "08:00", "y": 144 },
10169
- { "x": "09:00", "y": 101 }
10170
- ]
10171
- }
10144
+ { label: "B1", Budget: 5, Payout: 1 },
10145
+ { label: "B2", Budget: 5, Payout: 2 },
10146
+ { label: "B3", Budget: 8, Payout: 3 },
10147
+ { label: "B4", Budget: 6, Payout: 4 },
10148
+ { label: "B5", Budget: 7, Payout: 2 },
10149
+ { label: "B6", Budget: 10, Payout: 5 }
10172
10150
  ];
10173
10151
  const finalDataProvider = (type2, value, theme) => {
10174
- 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;
10152
+ 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;
10175
10153
  switch (type2) {
10176
10154
  case "BarGraph":
10177
10155
  case "StackBarGraph":
10178
10156
  case "HorizontalBarGraph":
10157
+ case "HorizontalStackBarGraph":
10179
10158
  return {
10180
10159
  main: {
10181
- data: ((_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data) || [
10182
- { "label": "B1", "Budget": 5, "Payout": 1 },
10183
- { "label": "B2", "Budget": 5, "Payout": 2 },
10184
- { "label": "B3", "Budget": 8, "Payout": 3 },
10185
- { "label": "B4", "Budget": 6, "Payout": 4 },
10186
- { "label": "B5", "Budget": 7, "Payout": 2 },
10187
- { "label": "B6", "Budget": 10, "Payout": 5 }
10188
- ],
10160
+ data: ((_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data) || Product1,
10189
10161
  header: "Bar Graph",
10190
10162
  bottomLabel: "Name of Employe",
10191
10163
  numTicks: 6,
@@ -10244,22 +10216,27 @@ const finalDataProvider = (type2, value, theme) => {
10244
10216
  ...(_f = value == null ? void 0 : value.style) == null ? void 0 : _f.labelStyle
10245
10217
  },
10246
10218
  barStyle: {
10247
- color: {
10248
- firstBarColor: theme.myTheme.palette.primary.main,
10249
- secondBarColor: theme.myTheme.palette.primary.dark
10250
- },
10219
+ colorRange: ((_g = theme == null ? void 0 : theme.chartColours) == null ? void 0 : _g.barChartColours) || [
10220
+ "#3f51b5",
10221
+ "rgba(200,0,31,0.9)",
10222
+ "rgba(25,200,205,0.6)"
10223
+ ],
10251
10224
  mediumValueColor: "rgba(63, 81, 181, 0.85)",
10252
10225
  highValueColor: "rgba(63, 81, 181, 0.85)",
10253
10226
  lowValueColor: "rgba(63, 81, 181, 0.85)",
10254
10227
  hoverBackgroundColor: `${theme.myTheme.palette.secondary.main}`,
10255
- ...(_g = value == null ? void 0 : value.style) == null ? void 0 : _g.barStyle
10228
+ ...(_h = value == null ? void 0 : value.style) == null ? void 0 : _h.barStyle
10256
10229
  }
10257
10230
  }
10258
10231
  };
10259
10232
  case "PieGraph":
10260
10233
  return {
10261
10234
  main: {
10262
- data: ((_h = value == null ? void 0 : value.main) == null ? void 0 : _h.data) && value.main.data.length > 0 ? (_i = value == null ? void 0 : value.main) == null ? void 0 : _i.data : [{ label: "Kotak", value: 500 }, { label: "SBI", value: 700 }, { label: "HDFC", value: 900 }],
10235
+ data: ((_i = value == null ? void 0 : value.main) == null ? void 0 : _i.data) && value.main.data.length > 0 ? (_j = value == null ? void 0 : value.main) == null ? void 0 : _j.data : [
10236
+ { label: "Kotak", value: 500 },
10237
+ { label: "SBI", value: 700 },
10238
+ { label: "HDFC", value: 900 }
10239
+ ],
10263
10240
  header: "Pie Graph",
10264
10241
  bottomLabel: "Name of Employe",
10265
10242
  leftLabel: "Value",
@@ -10267,12 +10244,13 @@ const finalDataProvider = (type2, value, theme) => {
10267
10244
  axisLeft: true,
10268
10245
  axisBottom: true,
10269
10246
  legendAvailable: true,
10247
+ xAxisValue: "label",
10270
10248
  ...value == null ? void 0 : value.main,
10271
10249
  legend: {
10272
10250
  labelColor: theme.myTheme.palette.text.primary,
10273
10251
  direction: "column",
10274
10252
  align: "left",
10275
- ...(_j = value == null ? void 0 : value.main) == null ? void 0 : _j.legend
10253
+ ...(_k = value == null ? void 0 : value.main) == null ? void 0 : _k.legend
10276
10254
  }
10277
10255
  },
10278
10256
  style: {
@@ -10282,7 +10260,7 @@ const finalDataProvider = (type2, value, theme) => {
10282
10260
  height: "310",
10283
10261
  borderRadius: "20px",
10284
10262
  padding: "10px 0 2px 0",
10285
- ...(_k = value == null ? void 0 : value.style) == null ? void 0 : _k.containerStyle
10263
+ ...(_l = value == null ? void 0 : value.style) == null ? void 0 : _l.containerStyle
10286
10264
  },
10287
10265
  headerStyle: {
10288
10266
  fontWeight: 500,
@@ -10293,7 +10271,7 @@ const finalDataProvider = (type2, value, theme) => {
10293
10271
  width: "100%",
10294
10272
  fontSize: "18px",
10295
10273
  color: theme.myTheme.palette.text.primary,
10296
- ...(_l = value == null ? void 0 : value.style) == null ? void 0 : _l.headerStyle
10274
+ ...(_m = value == null ? void 0 : value.style) == null ? void 0 : _m.headerStyle
10297
10275
  },
10298
10276
  tooltipStyle: {
10299
10277
  width: "100%",
@@ -10301,14 +10279,14 @@ const finalDataProvider = (type2, value, theme) => {
10301
10279
  height: 20,
10302
10280
  backgroundColor: "lightgrey",
10303
10281
  color: "black",
10304
- ...(_m = value == null ? void 0 : value.style) == null ? void 0 : _m.tooltipStyle
10282
+ ...(_n = value == null ? void 0 : value.style) == null ? void 0 : _n.tooltipStyle
10305
10283
  },
10306
10284
  labelStyle: {
10307
10285
  labelColor: theme.myTheme.palette.text.primary,
10308
10286
  labelOffset: 45,
10309
10287
  leftLabelMargin: "70",
10310
10288
  topLabelMargin: "-40",
10311
- ...(_n = value == null ? void 0 : value.style) == null ? void 0 : _n.labelStyle
10289
+ ...(_o = value == null ? void 0 : value.style) == null ? void 0 : _o.labelStyle
10312
10290
  },
10313
10291
  legendStyle: {
10314
10292
  legend: {
@@ -10321,7 +10299,7 @@ const finalDataProvider = (type2, value, theme) => {
10321
10299
  border: "1px solid rgba(255, 255, 255, 0.3)",
10322
10300
  borderRadius: " 8px",
10323
10301
  margin: "5px 5px",
10324
- ...(_p = (_o = value == null ? void 0 : value.style) == null ? void 0 : _o.legendStyle) == null ? void 0 : _p.legend
10302
+ ...(_q = (_p = value == null ? void 0 : value.style) == null ? void 0 : _p.legendStyle) == null ? void 0 : _q.legend
10325
10303
  },
10326
10304
  legendVertical: {
10327
10305
  paddingBottom: "8px",
@@ -10334,23 +10312,27 @@ const finalDataProvider = (type2, value, theme) => {
10334
10312
  marginBottom: "5px",
10335
10313
  fontFamily: "roboto",
10336
10314
  fontSize: "10px",
10337
- ...(_r = (_q = value == null ? void 0 : value.style) == null ? void 0 : _q.legendStyle) == null ? void 0 : _r.legendTitle
10315
+ ...(_s = (_r = value == null ? void 0 : value.style) == null ? void 0 : _r.legendStyle) == null ? void 0 : _s.legendTitle
10338
10316
  }
10339
10317
  },
10340
10318
  pieStyle: {
10341
- colorRange: ((_s = theme == null ? void 0 : theme.chartColours) == null ? void 0 : _s.pieChartColours) || ["#3f51b5", "rgba(200,0,31,0.9)", "rgba(25,200,205,0.6)"],
10319
+ colorRange: ((_t5 = theme == null ? void 0 : theme.chartColours) == null ? void 0 : _t5.pieChartColours) || [
10320
+ "#3f51b5",
10321
+ "rgba(200,0,31,0.9)",
10322
+ "rgba(25,200,205,0.6)"
10323
+ ],
10342
10324
  outerRadius: 120,
10343
10325
  innerRadius: 63,
10344
10326
  cornerRadius: 2,
10345
10327
  padAngle: 6e-3,
10346
- ...(_t5 = value == null ? void 0 : value.style) == null ? void 0 : _t5.pieStyle
10328
+ ...(_u = value == null ? void 0 : value.style) == null ? void 0 : _u.pieStyle
10347
10329
  }
10348
10330
  }
10349
10331
  };
10350
10332
  case "LineGraph":
10351
10333
  return {
10352
10334
  main: {
10353
- data: ((_v = (_u = value == null ? void 0 : value.main) == null ? void 0 : _u.data) == null ? void 0 : _v.length) > 0 ? (_w = value == null ? void 0 : value.main) == null ? void 0 : _w.data : Product1,
10335
+ data: ((_w = (_v = value == null ? void 0 : value.main) == null ? void 0 : _v.data) == null ? void 0 : _w.length) > 0 ? (_x = value == null ? void 0 : value.main) == null ? void 0 : _x.data : Product1,
10354
10336
  header: "Line Graph Dynamic",
10355
10337
  bottomLabel: "Name of Employe",
10356
10338
  leftLabel: "Value",
@@ -10362,13 +10344,14 @@ const finalDataProvider = (type2, value, theme) => {
10362
10344
  axisBottom: true,
10363
10345
  hideLeftAxisLine: false,
10364
10346
  hideBottomAxisLine: false,
10347
+ xAxisValue: "label",
10365
10348
  ...value == null ? void 0 : value.main,
10366
10349
  legend: {
10367
10350
  labelColor: theme.myTheme.palette.text.primary,
10368
10351
  direction: "row",
10369
10352
  align: "right",
10370
10353
  colorRectWidth: 20,
10371
- ...(_x = value == null ? void 0 : value.main) == null ? void 0 : _x.legend
10354
+ ...(_y = value == null ? void 0 : value.main) == null ? void 0 : _y.legend
10372
10355
  }
10373
10356
  },
10374
10357
  style: {
@@ -10378,7 +10361,7 @@ const finalDataProvider = (type2, value, theme) => {
10378
10361
  height: "300",
10379
10362
  borderRadius: "20px",
10380
10363
  padding: "10px 0 2px 0",
10381
- ...(_y = value == null ? void 0 : value.style) == null ? void 0 : _y.containerStyle
10364
+ ...(_z = value == null ? void 0 : value.style) == null ? void 0 : _z.containerStyle
10382
10365
  },
10383
10366
  headerStyle: {
10384
10367
  fontWeight: 500,
@@ -10389,81 +10372,24 @@ const finalDataProvider = (type2, value, theme) => {
10389
10372
  width: "100%",
10390
10373
  fontSize: "18px",
10391
10374
  color: theme.myTheme.palette.text.primary,
10392
- ...(_z = value == null ? void 0 : value.style) == null ? void 0 : _z.headerStyle
10375
+ ...(_A = value == null ? void 0 : value.style) == null ? void 0 : _A.headerStyle
10393
10376
  },
10394
10377
  labelStyle: {
10395
10378
  labelColor: theme.myTheme.palette.text.primary,
10396
10379
  fontSize: "12px",
10397
10380
  bottomLabelOffset: 25,
10398
10381
  leftLabelOffset: 25,
10399
- ...(_A = value == null ? void 0 : value.style) == null ? void 0 : _A.labelStyle
10382
+ ...(_B = value == null ? void 0 : value.style) == null ? void 0 : _B.labelStyle
10400
10383
  },
10401
10384
  lineStyle: {
10402
- colorRange: ((_B = theme == null ? void 0 : theme.chartColours) == null ? void 0 : _B.lineChartColours) || ["#3f51b5", "rgba(200,0,31,0.9)", "rgba(25,200,205,0.6)"],
10385
+ colorRange: ((_C = theme == null ? void 0 : theme.chartColours) == null ? void 0 : _C.lineChartColours) || [
10386
+ "#3f51b5",
10387
+ "rgba(200,0,31,0.9)",
10388
+ "rgba(25,200,205,0.6)"
10389
+ ],
10403
10390
  lineAreaColor: "none",
10404
10391
  lineAreaOpacity: 0.2,
10405
- ...(_C = value == null ? void 0 : value.style) == null ? void 0 : _C.lineStyle
10406
- }
10407
- }
10408
- };
10409
- case "HorizontalBarGraph":
10410
- return {
10411
- main: {
10412
- data: ((_D = value == null ? void 0 : value.main) == null ? void 0 : _D.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 }],
10413
- header: " ",
10414
- bottomLabel: "Name of Employee",
10415
- numTicks: 6,
10416
- leftLabel: "Value",
10417
- axisLeft: true,
10418
- axisBottom: true,
10419
- hideBottomTicks: false,
10420
- hideLeftTicks: ((_E = value == null ? void 0 : value.main) == null ? void 0 : _E.data) ? ((_F = value.main) == null ? void 0 : _F.hideLeftTicks) !== void 0 ? (_G = value.main) == null ? void 0 : _G.hideLeftTicks : true : false,
10421
- hideLeftAxisLine: ((_H = value == null ? void 0 : value.main) == null ? void 0 : _H.data) ? true : false,
10422
- hideBottomAxisLine: false,
10423
- bottomAxisWidth: "10px",
10424
- xAxisValue: "label",
10425
- ...value.main
10426
- },
10427
- style: {
10428
- containerStyle: {
10429
- background: theme.myTheme.palette.background.default,
10430
- width: "90%",
10431
- height: "300",
10432
- borderRadius: "20px",
10433
- padding: "10px 0 2px 0",
10434
- ...(_I = value == null ? void 0 : value.style) == null ? void 0 : _I.containerStyle
10435
- },
10436
- headerStyle: {
10437
- fontWeight: 500,
10438
- textAlign: "left",
10439
- fontFamily: "inherit",
10440
- marginBottom: "20px",
10441
- padding: "15px 0 1px 20px",
10442
- width: "100%",
10443
- fontSize: "18px",
10444
- color: theme.myTheme.palette.text.primary,
10445
- ...(_J = value == null ? void 0 : value.style) == null ? void 0 : _J.headerStyle
10446
- },
10447
- tooltipStyle: {
10448
- padding: "6px",
10449
- borderRadius: "2px",
10450
- ...(_K = value == null ? void 0 : value.style) == null ? void 0 : _K.tooltipStyle
10451
- },
10452
- labelStyle: {
10453
- margin: { top: 10, left: 180, right: 40, bottom: 40 },
10454
- tickLabelColor: theme.myTheme.palette.text.primary,
10455
- leftLabelOffset: 140,
10456
- bottomLabelOffset: 5,
10457
- tickFontSize: "10px",
10458
- tickColor: theme.myTheme.palette.text.primary,
10459
- rightAxisWidth: "0.3px",
10460
- fontSize: "12px",
10461
- ...(_L = value == null ? void 0 : value.style) == null ? void 0 : _L.labelStyle
10462
- },
10463
- barStyle: {
10464
- color: theme.myTheme.palette.primary.main,
10465
- hoverBackgroundColor: `${theme.myTheme.palette.secondary.main}`,
10466
- ...(_M = value == null ? void 0 : value.style) == null ? void 0 : _M.barStyle
10392
+ ...(_D = value == null ? void 0 : value.style) == null ? void 0 : _D.lineStyle
10467
10393
  }
10468
10394
  }
10469
10395
  };
@@ -10520,7 +10446,7 @@ const DrawPieGraph = ({
10520
10446
  const letters = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data;
10521
10447
  const keys2 = Object.keys(letters[0]);
10522
10448
  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] : keys2;
10523
- const labelKeyIndex = keys2.indexOf("label");
10449
+ const labelKeyIndex = keys2.indexOf(value.main.xAxisValue);
10524
10450
  const valueKeyIndex = labelKeyIndex === 0 ? 1 : 0;
10525
10451
  const frequency = (d2) => d2[arr[valueKeyIndex]];
10526
10452
  const getLetterFrequencyColor = createOrdinalScale$1({
@@ -10530,7 +10456,7 @@ const DrawPieGraph = ({
10530
10456
  const getColor = (letter) => {
10531
10457
  return getLetterFrequencyColor(letter);
10532
10458
  };
10533
- const dataKeyArray = letters.map((data) => data.label);
10459
+ const dataKeyArray = letters.map((data) => data[value.main.xAxisValue]);
10534
10460
  const {
10535
10461
  tooltipData,
10536
10462
  tooltipLeft,
@@ -10599,7 +10525,7 @@ const DrawPieGraph = ({
10599
10525
  data
10600
10526
  }) => {
10601
10527
  var _a2, _b2, _c2, _d2;
10602
- const size = active2 && active2.label == data.label ? (_b2 = (_a2 = value == null ? void 0 : value.style) == null ? void 0 : _a2.pieStyle) == null ? void 0 : _b2.outerRadius : ((_d2 = (_c2 = value == null ? void 0 : value.style) == null ? void 0 : _c2.pieStyle) == null ? void 0 : _d2.outerRadius) - 3;
10528
+ const size = active2 && active2[value.main.xAxisValue] == data[value.main.xAxisValue] ? (_b2 = (_a2 = value == null ? void 0 : value.style) == null ? void 0 : _a2.pieStyle) == null ? void 0 : _b2.outerRadius : ((_d2 = (_c2 = value == null ? void 0 : value.style) == null ? void 0 : _c2.pieStyle) == null ? void 0 : _d2.outerRadius) - 3;
10603
10529
  return size;
10604
10530
  },
10605
10531
  innerRadius: (_m = (_l = value == null ? void 0 : value.style) == null ? void 0 : _l.pieStyle) == null ? void 0 : _m.innerRadius,
@@ -13068,27 +12994,17 @@ const DrawGraph = ({
13068
12994
  events = false,
13069
12995
  value
13070
12996
  }) => {
13071
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
13072
- (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data;
12997
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
13073
12998
  const margin2 = defaultMargin;
13074
12999
  useTooltip();
13075
- const data = (_b = value == null ? void 0 : value.main) == null ? void 0 : _b.data;
13076
- const arr = value.main.xAxisValue && value.main.yAxisValue ? [value.main.xAxisValue, value.main.yAxisValue] : Object.keys(data[0].value[0]);
13077
- const accessors = {
13078
- xAccessor: (d2) => d2[arr[0]],
13079
- yAccessor: (d2) => d2[arr[1]]
13080
- };
13081
- const dataKeyArray = data.map((ele) => ele.key);
13082
- const xValues = Array.from(new Set(data.flatMap((d2) => d2.value.map((v2) => v2.x))));
13000
+ const data = (_a = value == null ? void 0 : value.main) == null ? void 0 : _a.data;
13001
+ const arr = Object.keys(data[0]).filter((d2) => d2 !== value.main.xAxisValue);
13002
+ const xValues = data.map((d2) => d2[value.main.xAxisValue]);
13083
13003
  const xScale = createBandScale({
13084
13004
  domain: xValues
13085
13005
  });
13086
13006
  const yScale = createLinearScale({
13087
- domain: [0, Math.max(...data.flatMap((d2) => d2.value.map((v2) => v2.y)))]
13088
- });
13089
- createOrdinalScale$1({
13090
- domain: dataKeyArray,
13091
- range: (_d = (_c = value.style) == null ? void 0 : _c.lineStyle) == null ? void 0 : _d.colorRange
13007
+ domain: [0, Math.max(...data.flatMap((d2) => arr.map((key) => d2[key])))]
13092
13008
  });
13093
13009
  const xMax = width2 - margin2.left - margin2.right;
13094
13010
  const yMax = height2 - margin2.top - margin2.bottom;
@@ -13097,7 +13013,7 @@ const DrawGraph = ({
13097
13013
  return /* @__PURE__ */ jsxs(Fragment, {
13098
13014
  children: [value.main.legendAvailable && /* @__PURE__ */ jsx(Legend, {
13099
13015
  value,
13100
- dataKeyArray
13016
+ dataKeyArray: arr
13101
13017
  }), /* @__PURE__ */ jsxs(XYChart, {
13102
13018
  width: width2,
13103
13019
  height: height2,
@@ -13113,10 +13029,10 @@ const DrawGraph = ({
13113
13029
  orientation: "left",
13114
13030
  hideAxisLine: value.main.hideLeftAxisLine,
13115
13031
  label: value.main.leftLabel,
13116
- labelOffset: ((_f = (_e = value.style) == null ? void 0 : _e.labelStyle) == null ? void 0 : _f.leftLabelOffset) || 25,
13032
+ labelOffset: ((_c = (_b = value.style) == null ? void 0 : _b.labelStyle) == null ? void 0 : _c.leftLabelOffset) || 25,
13117
13033
  labelProps: {
13118
- fill: ((_h = (_g = value.style) == null ? void 0 : _g.labelStyle) == null ? void 0 : _h.labelColor) || "black",
13119
- fontSize: ((_j = (_i = value.style) == null ? void 0 : _i.labelStyle) == null ? void 0 : _j.fontSize) || "12px",
13034
+ fill: ((_e = (_d = value.style) == null ? void 0 : _d.labelStyle) == null ? void 0 : _e.labelColor) || "black",
13035
+ fontSize: ((_g = (_f = value.style) == null ? void 0 : _f.labelStyle) == null ? void 0 : _g.fontSize) || "12px",
13120
13036
  fontWeight: "normal"
13121
13037
  },
13122
13038
  tickLabelProps: (e3) => {
@@ -13133,8 +13049,8 @@ const DrawGraph = ({
13133
13049
  hideAxisLine: value.main.hideBottomAxisLine,
13134
13050
  label: value.main.bottomLabel,
13135
13051
  labelProps: {
13136
- fill: ((_l = (_k = value.style) == null ? void 0 : _k.labelStyle) == null ? void 0 : _l.labelColor) || "black",
13137
- fontSize: ((_n = (_m = value.style) == null ? void 0 : _m.labelStyle) == null ? void 0 : _n.fontSize) || "12px",
13052
+ fill: ((_i = (_h = value.style) == null ? void 0 : _h.labelStyle) == null ? void 0 : _i.labelColor) || "black",
13053
+ fontSize: ((_k = (_j = value.style) == null ? void 0 : _j.labelStyle) == null ? void 0 : _k.fontSize) || "12px",
13138
13054
  fontWeight: "normal"
13139
13055
  },
13140
13056
  tickLabelProps: (e3) => {
@@ -13146,7 +13062,7 @@ const DrawGraph = ({
13146
13062
  };
13147
13063
  },
13148
13064
  tickStroke: "black",
13149
- labelOffset: ((_p = (_o = value.style) == null ? void 0 : _o.labelStyle) == null ? void 0 : _p.bottomLabelOffset) || 25
13065
+ labelOffset: ((_m = (_l = value.style) == null ? void 0 : _l.labelStyle) == null ? void 0 : _m.bottomLabelOffset) || 25
13150
13066
  }), /* @__PURE__ */ jsx(Grid, {
13151
13067
  stroke: "black",
13152
13068
  lineStyle: {
@@ -13154,21 +13070,22 @@ const DrawGraph = ({
13154
13070
  },
13155
13071
  strokeDasharray: "8 3",
13156
13072
  strokeWidth: 0.3
13157
- }), (_r = (_q = value.main) == null ? void 0 : _q.data) == null ? void 0 : _r.map((elem, i) => {
13073
+ }), arr == null ? void 0 : arr.map((elem, i) => {
13158
13074
  var _a2, _b2, _c2, _d2, _e2, _f2;
13159
13075
  return /* @__PURE__ */ jsxs(Fragment, {
13160
13076
  children: [/* @__PURE__ */ jsx(LineSeries, {
13161
- dataKey: elem.key,
13162
- data: elem.value,
13077
+ dataKey: elem,
13078
+ data,
13163
13079
  fill: (_b2 = (_a2 = value.style) == null ? void 0 : _a2.lineStyle) == null ? void 0 : _b2.lineAreaColor,
13164
13080
  fillOpacity: (_d2 = (_c2 = value.style) == null ? void 0 : _c2.lineStyle) == null ? void 0 : _d2.lineAreaOpacity,
13165
13081
  floodColor: "green",
13166
13082
  floodOpacity: 1,
13167
13083
  stroke: (_f2 = (_e2 = value.style) == null ? void 0 : _e2.lineStyle) == null ? void 0 : _f2.colorRange[i],
13168
- ...accessors
13169
- }), elem.value.map((datum2, index2) => /* @__PURE__ */ jsx("circle", {
13170
- cx: xScale(accessors.xAccessor(datum2)) + xScale.bandwidth() / 2,
13171
- cy: yScale(accessors.yAccessor(datum2)),
13084
+ xAccessor: (d2) => d2[value.main.xAxisValue],
13085
+ yAccessor: (d2) => d2[elem]
13086
+ }), data.map((datum2, index2) => /* @__PURE__ */ jsx("circle", {
13087
+ cx: xScale(datum2[value.main.xAxisValue]) + xScale.bandwidth() / 2,
13088
+ cy: yScale(datum2[elem]),
13172
13089
  r: 3,
13173
13090
  fill: "white",
13174
13091
  stroke: "black",
@@ -13218,7 +13135,7 @@ const DrawGraph = ({
13218
13135
  fontWeight: "normal",
13219
13136
  color: "black"
13220
13137
  },
13221
- children: tooltipData2.datumByKey[d2].datum.y
13138
+ children: tooltipData2.datumByKey[d2].datum[d2]
13222
13139
  })]
13223
13140
  });
13224
13141
  });
@@ -13259,7 +13176,7 @@ var DrawHorizontalBarGraph = ({
13259
13176
  margin: margin2,
13260
13177
  barValue
13261
13178
  }) => {
13262
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t5;
13179
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
13263
13180
  const [hoveredBar, setHoveredBar] = useState({
13264
13181
  date: null,
13265
13182
  city: null
@@ -13290,7 +13207,7 @@ var DrawHorizontalBarGraph = ({
13290
13207
  });
13291
13208
  const colorScale = createOrdinalScale$1({
13292
13209
  domain: keys2,
13293
- range: [((_e = (_d = (_c = barValue.style) == null ? void 0 : _c.barStyle) == null ? void 0 : _d.color) == null ? void 0 : _e.firstBarColor) || "#aeeef8", ((_h = (_g = (_f = barValue.style) == null ? void 0 : _f.barStyle) == null ? void 0 : _g.color) == null ? void 0 : _h.secondBarColor) || "#e5fd3d", ((_k = (_j = (_i = barValue.style) == null ? void 0 : _i.barStyle) == null ? void 0 : _j.color) == null ? void 0 : _k.thirdBarColor) || "#9caff6"]
13210
+ range: barValue.style.barStyle.colorRange
13294
13211
  });
13295
13212
  temperatureScale.rangeRound([0, xMax]);
13296
13213
  dateScale.rangeRound([yMax, 0]);
@@ -13370,10 +13287,10 @@ var DrawHorizontalBarGraph = ({
13370
13287
  style: {
13371
13288
  display: hoveredBar.date ? "block" : "none"
13372
13289
  },
13373
- y: barValue.main.type === "HorizontalStackBarGraph" ? ((_l = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _l.bars[hoveredBar.city].y) - (Math.min((_m = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _m.bars[0].height, 15) - ((_n = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _n.bars[0].height)) / 2 : ((_o = hoveredBar.date) == null ? void 0 : _o.y0) - (Math.min((_p = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _p.bars[0].height, 15) - ((_q = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _q.bars[0].height)) || 0,
13290
+ y: barValue.main.type === "HorizontalStackBarGraph" ? ((_c = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _c.bars[hoveredBar.city].y) - (Math.min((_d = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _d.bars[0].height, 15) - ((_e = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _e.bars[0].height)) / 2 : ((_f = hoveredBar.date) == null ? void 0 : _f.y0) - (Math.min((_g = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _g.bars[0].height, 15) - ((_h = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _h.bars[0].height)) || 0,
13374
13291
  width: xMax,
13375
- height: barValue.main.type !== "HorizontalStackBarGraph" ? calcWidthofBar(hoveredBar == null ? void 0 : hoveredBar.date) : Math.min((_r = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _r.bars[0].height, 15),
13376
- fill: (_t5 = (_s = barValue.style) == null ? void 0 : _s.barStyle) == null ? void 0 : _t5.hoverBackgroundColor,
13292
+ height: barValue.main.type !== "HorizontalStackBarGraph" ? calcWidthofBar(hoveredBar == null ? void 0 : hoveredBar.date) : Math.min((_i = hoveredBar == null ? void 0 : hoveredBar.date) == null ? void 0 : _i.bars[0].height, 15),
13293
+ fill: (_k = (_j = barValue.style) == null ? void 0 : _j.barStyle) == null ? void 0 : _k.hoverBackgroundColor,
13377
13294
  opacity: 1
13378
13295
  }), barValue.main.type === "HorizontalStackBarGraph" ? /* @__PURE__ */ jsx(BarStackHorizontal, {
13379
13296
  data,
@@ -13435,6 +13352,10 @@ var DrawHorizontalBarGraph = ({
13435
13352
  parentWidth: width2
13436
13353
  })]
13437
13354
  })]
13355
+ }), ((_l = barValue == null ? void 0 : barValue.main) == null ? void 0 : _l.legendAvailable) && keys2.length > 1 && /* @__PURE__ */ jsx(Legend, {
13356
+ dataKeyArray: keys2,
13357
+ colorRange: barValue.style.barStyle.colorRange,
13358
+ value: barValue
13438
13359
  }), tooltipOpen && tooltipData && /* @__PURE__ */ jsx(ToolTip, {
13439
13360
  value: barValue,
13440
13361
  theme,
@@ -21126,14 +21047,14 @@ const ProgressBar = ({
21126
21047
  value,
21127
21048
  theme
21128
21049
  }) => {
21129
- 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;
21050
+ 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, _T, _U, _V, _W, _X, _Y, _Z, __;
21130
21051
  const [progress, 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);
21131
21052
  useEffect(() => {
21132
21053
  var _a2, _b2, _c2, _d2;
21133
21054
  setProgress(((_b2 = (_a2 = value == null ? void 0 : value.main) == null ? void 0 : _a2.data) == null ? void 0 : _b2.achieved) / ((_d2 = (_c2 = value == null ? void 0 : value.main) == null ? void 0 : _c2.data) == null ? void 0 : _d2.total) * 100);
21134
21055
  }, [value.main.data]);
21135
21056
  const getColor = () => {
21136
- return [`${theme.palette.grey[300]}`, `${theme.palette.primary.dark}`];
21057
+ return [`${theme.myTheme.palette.grey[300]}`, `${theme.myTheme.palette.primary.dark}`];
21137
21058
  };
21138
21059
  const StyledTooltip = styled$1(({
21139
21060
  className,
@@ -21143,63 +21064,62 @@ const ProgressBar = ({
21143
21064
  classes: {
21144
21065
  popper: className
21145
21066
  }
21146
- }))(({
21147
- theme: theme2
21148
- }) => ({
21067
+ }))(({}) => ({
21149
21068
  [`& .${tooltipClasses$1.tooltip}`]: {
21150
21069
  "& .MuiTooltip-arrow": {
21151
- color: theme2.palette.grey[300]
21070
+ color: theme.myTheme.palette.secondary.main
21152
21071
  },
21153
- backgroundColor: theme2.palette.grey[300],
21154
- color: theme2.palette.text.primary,
21072
+ backgroundColor: theme.myTheme.palette.secondary.main,
21073
+ color: theme.myTheme.palette.text.primary,
21155
21074
  fontSize: 11,
21156
- boxShadow: `1px 2px ${theme2.palette.grey[400]}`
21075
+ boxShadow: `1px 2px ${theme.myTheme.palette.secondary.dark}`
21157
21076
  }
21158
21077
  }));
21159
21078
  if ((_e = value == null ? void 0 : value.main) == null ? void 0 : _e.developOnlyProgresBar) {
21160
- return /* @__PURE__ */ jsx("div", {
21161
- style: {
21162
- width: "100%",
21163
- height: "6px",
21164
- margin: "auto",
21165
- borderRadius: "10px",
21166
- marginBottom: "15px",
21167
- position: "relative"
21168
- },
21169
- children: /* @__PURE__ */ jsx("div", {
21170
- style: {
21171
- width: "-webkit-fill-available",
21172
- height: "12px",
21173
- margin: "auto",
21079
+ return /* @__PURE__ */ jsx(StyledTooltip, {
21080
+ arrow: true,
21081
+ title: /* @__PURE__ */ jsxs(Fragment, {
21082
+ children: [/* @__PURE__ */ jsxs("div", {
21083
+ style: {
21084
+ fontWeight: "normal",
21085
+ textAlign: "center"
21086
+ },
21087
+ children: [" ", "Target Achieved", " "]
21088
+ }), /* @__PURE__ */ jsxs("div", {
21089
+ style: {
21090
+ fontWeight: "bold",
21091
+ textAlign: "center"
21092
+ },
21093
+ children: [" ", (_g = (_f = value == null ? void 0 : value.main) == null ? void 0 : _f.data) == null ? void 0 : _g.achieved]
21094
+ })]
21095
+ }),
21096
+ placement: "top-end",
21097
+ theme,
21098
+ children: /* @__PURE__ */ jsx(Box$1, {
21099
+ className: "progress-bar-fill",
21100
+ sx: {
21101
+ width: progress > 100 ? "100%" : `${progress}%`,
21102
+ backgroundColor: getColor()[1],
21103
+ height: "100%",
21174
21104
  borderRadius: "10px",
21175
- backgroundColor: getColor()[0],
21176
21105
  marginBottom: "0px",
21177
- position: "absolute",
21178
- top: "10px",
21179
- left: "12.5px"
21106
+ transition: "width 0.5 ease-out",
21107
+ position: "relative",
21108
+ border: "1px solid transparent",
21109
+ "&:hover": {
21110
+ border: "1px solid black"
21111
+ }
21180
21112
  },
21181
21113
  children: /* @__PURE__ */ jsx("div", {
21182
- className: "progress-bar-fill",
21183
21114
  style: {
21184
- width: progress > 100 ? "100%" : `${progress}%`,
21185
- backgroundColor: getColor()[1],
21186
- height: "100%",
21187
- borderRadius: "10px",
21188
- marginBottom: "0px",
21189
- transition: "width 0.5 ease-out",
21190
- position: "relative"
21191
- },
21192
- children: /* @__PURE__ */ jsx("div", {
21193
- style: {
21194
- borderRadius: "50%",
21195
- width: "7px",
21196
- height: "7px",
21197
- backgroundColor: `${theme.palette.common.white}`,
21198
- position: "absolute",
21199
- top: "2.5px",
21200
- right: `2px`
21201
- }
21202
- })
21115
+ borderRadius: "50%",
21116
+ width: "7px",
21117
+ height: "7px",
21118
+ backgroundColor: `${theme.myTheme.palette.common.white}`,
21119
+ position: "absolute",
21120
+ top: "2px",
21121
+ right: `2px`
21122
+ }
21203
21123
  })
21204
21124
  })
21205
21125
  });
@@ -21207,8 +21127,8 @@ const ProgressBar = ({
21207
21127
  return /* @__PURE__ */ jsxs("div", {
21208
21128
  className: "container",
21209
21129
  style: {
21210
- backgroundColor: (_f = theme == null ? void 0 : theme.palette) == null ? void 0 : _f.background.main,
21211
- color: (_h = (_g = theme == null ? void 0 : theme.palette) == null ? void 0 : _g.text) == null ? void 0 : _h.primary,
21130
+ backgroundColor: (_i = (_h = theme.myTheme) == null ? void 0 : _h.palette) == null ? void 0 : _i.background.main,
21131
+ color: (_l = (_k = (_j = theme.myTheme) == null ? void 0 : _j.palette) == null ? void 0 : _k.text) == null ? void 0 : _l.primary,
21212
21132
  width: "auto",
21213
21133
  height: "auto",
21214
21134
  margin: "auto"
@@ -21227,9 +21147,9 @@ const ProgressBar = ({
21227
21147
  textAlign: "left",
21228
21148
  fontFamily: "inherit",
21229
21149
  fontSize: "16px",
21230
- color: ((_j = (_i = theme == null ? void 0 : theme.palette) == null ? void 0 : _i.text) == null ? void 0 : _j.secondary) || "#121926"
21150
+ color: ((_o = (_n = (_m = theme.myTheme) == null ? void 0 : _m.palette) == null ? void 0 : _n.text) == null ? void 0 : _o.secondary) || "#121926"
21231
21151
  },
21232
- children: (_k = value == null ? void 0 : value.main) == null ? void 0 : _k.heading
21152
+ children: (_p = value == null ? void 0 : value.main) == null ? void 0 : _p.heading
21233
21153
  }), /* @__PURE__ */ jsxs("div", {
21234
21154
  style: {
21235
21155
  padding: "25px 0px 0px 55px",
@@ -21237,7 +21157,7 @@ const ProgressBar = ({
21237
21157
  textAlign: "left",
21238
21158
  fontFamily: "inherit",
21239
21159
  fontSize: "16px",
21240
- color: ((_m = (_l = theme == null ? void 0 : theme.palette) == null ? void 0 : _l.text) == null ? void 0 : _m.primary) || "black"
21160
+ color: ((_s = (_r = (_q = theme.myTheme) == null ? void 0 : _q.palette) == null ? void 0 : _r.text) == null ? void 0 : _s.primary) || "black"
21241
21161
  },
21242
21162
  children: [progress.toFixed(2), "%"]
21243
21163
  })]
@@ -21270,21 +21190,22 @@ const ProgressBar = ({
21270
21190
  children: /* @__PURE__ */ jsx(StyledTooltip, {
21271
21191
  arrow: true,
21272
21192
  title: /* @__PURE__ */ jsxs(Fragment, {
21273
- children: [/* @__PURE__ */ jsx("div", {
21193
+ children: [/* @__PURE__ */ jsxs("div", {
21274
21194
  style: {
21275
21195
  fontWeight: "normal",
21276
21196
  textAlign: "center"
21277
21197
  },
21278
- children: " Target Achieved "
21198
+ children: [" ", "Target Achieved", " "]
21279
21199
  }), /* @__PURE__ */ jsxs("div", {
21280
21200
  style: {
21281
21201
  fontWeight: "bold",
21282
21202
  textAlign: "center"
21283
21203
  },
21284
- children: [" ", (_o = (_n = value == null ? void 0 : value.main) == null ? void 0 : _n.data) == null ? void 0 : _o.achieved]
21204
+ children: [" ", (_u = (_t5 = value == null ? void 0 : value.main) == null ? void 0 : _t5.data) == null ? void 0 : _u.achieved]
21285
21205
  })]
21286
21206
  }),
21287
21207
  placement: "top-end",
21208
+ theme,
21288
21209
  children: /* @__PURE__ */ jsx(Box$1, {
21289
21210
  className: "progress-bar-fill",
21290
21211
  sx: {
@@ -21305,7 +21226,7 @@ const ProgressBar = ({
21305
21226
  borderRadius: "50%",
21306
21227
  width: "7px",
21307
21228
  height: "7px",
21308
- backgroundColor: `${theme.palette.common.white}`,
21229
+ backgroundColor: `${theme.myTheme.palette.common.white}`,
21309
21230
  position: "absolute",
21310
21231
  top: "2px",
21311
21232
  right: `2px`
@@ -21318,7 +21239,7 @@ const ProgressBar = ({
21318
21239
  borderRadius: "50%",
21319
21240
  width: "30px",
21320
21241
  height: "30px",
21321
- backgroundColor: `${theme.palette.grey[300]}`,
21242
+ backgroundColor: `${theme.myTheme.palette.grey[300]}`,
21322
21243
  position: "absolute",
21323
21244
  top: "0px"
21324
21245
  }
@@ -21326,7 +21247,7 @@ const ProgressBar = ({
21326
21247
  }), /* @__PURE__ */ jsxs("div", {
21327
21248
  style: {
21328
21249
  display: "flex",
21329
- color: (_q = (_p = theme == null ? void 0 : theme.palette) == null ? void 0 : _p.text) == null ? void 0 : _q.primary,
21250
+ color: (_x = (_w = (_v = theme.myTheme) == null ? void 0 : _v.palette) == null ? void 0 : _w.text) == null ? void 0 : _x.primary,
21330
21251
  paddingLeft: "25px",
21331
21252
  width: "98%",
21332
21253
  margin: "auto"
@@ -21339,15 +21260,15 @@ const ProgressBar = ({
21339
21260
  style: {
21340
21261
  textAlign: "left",
21341
21262
  fontSize: "14px",
21342
- color: (_r = theme == null ? void 0 : theme.palette) == null ? void 0 : _r.grey[600]
21263
+ color: (_z = (_y = theme.myTheme) == null ? void 0 : _y.palette) == null ? void 0 : _z.grey[600]
21343
21264
  },
21344
- children: ((_s = value == null ? void 0 : value.main) == null ? void 0 : _s.bottomLabel_1) || "Target"
21265
+ children: ((_A = value == null ? void 0 : value.main) == null ? void 0 : _A.bottomLabel_1) || "Target"
21345
21266
  }), /* @__PURE__ */ jsx("div", {
21346
21267
  style: {
21347
- color: (_t5 = theme == null ? void 0 : theme.palette) == null ? void 0 : _t5.grey[600],
21268
+ color: (_C = (_B = theme.myTheme) == null ? void 0 : _B.palette) == null ? void 0 : _C.grey[600],
21348
21269
  textAlign: "left"
21349
21270
  },
21350
- children: ((_v = (_u = value == null ? void 0 : value.main) == null ? void 0 : _u.data) == null ? void 0 : _v.total) || ((_x = (_w = value == null ? void 0 : value.main) == null ? void 0 : _w.data) == null ? void 0 : _x.bottomLabel_1_value)
21271
+ children: ((_E = (_D = value == null ? void 0 : value.main) == null ? void 0 : _D.data) == null ? void 0 : _E.total) || ((_G = (_F = value == null ? void 0 : value.main) == null ? void 0 : _F.data) == null ? void 0 : _G.bottomLabel_1_value)
21351
21272
  })]
21352
21273
  }), /* @__PURE__ */ jsxs("div", {
21353
21274
  style: {
@@ -21357,15 +21278,15 @@ const ProgressBar = ({
21357
21278
  style: {
21358
21279
  textAlign: "center",
21359
21280
  fontSize: "14px",
21360
- color: (_y = theme == null ? void 0 : theme.palette) == null ? void 0 : _y.grey[600]
21281
+ color: (_I = (_H = theme.myTheme) == null ? void 0 : _H.palette) == null ? void 0 : _I.grey[600]
21361
21282
  },
21362
- children: ((_z = value == null ? void 0 : value.main) == null ? void 0 : _z.bottomLabel_2) || "Achieved"
21283
+ children: ((_J = value == null ? void 0 : value.main) == null ? void 0 : _J.bottomLabel_2) || "Achieved"
21363
21284
  }), /* @__PURE__ */ jsx("div", {
21364
21285
  style: {
21365
21286
  textAlign: "center",
21366
- color: (_A = theme == null ? void 0 : theme.palette) == null ? void 0 : _A.grey[600]
21287
+ color: (_L = (_K = theme.myTheme) == null ? void 0 : _K.palette) == null ? void 0 : _L.grey[600]
21367
21288
  },
21368
- children: ((_C = (_B = value == null ? void 0 : value.main) == null ? void 0 : _B.data) == null ? void 0 : _C.achieved) || ((_E = (_D = value == null ? void 0 : value.main) == null ? void 0 : _D.data) == null ? void 0 : _E.bottomLabel_2_value)
21289
+ children: ((_N = (_M = value == null ? void 0 : value.main) == null ? void 0 : _M.data) == null ? void 0 : _N.achieved) || ((_P = (_O = value == null ? void 0 : value.main) == null ? void 0 : _O.data) == null ? void 0 : _P.bottomLabel_2_value)
21369
21290
  })]
21370
21291
  }), /* @__PURE__ */ jsxs("div", {
21371
21292
  style: {
@@ -21375,15 +21296,15 @@ const ProgressBar = ({
21375
21296
  style: {
21376
21297
  textAlign: "right",
21377
21298
  fontSize: "14px",
21378
- color: (_F = theme == null ? void 0 : theme.palette) == null ? void 0 : _F.grey[600]
21299
+ color: (_R = (_Q = theme.myTheme) == null ? void 0 : _Q.palette) == null ? void 0 : _R.grey[600]
21379
21300
  },
21380
- children: ((_G = value == null ? void 0 : value.main) == null ? void 0 : _G.bottomLabel_3) || "Average"
21301
+ children: ((_S = value == null ? void 0 : value.main) == null ? void 0 : _S.bottomLabel_3) || "Remaining"
21381
21302
  }), /* @__PURE__ */ jsx("div", {
21382
21303
  style: {
21383
21304
  textAlign: "right",
21384
- color: (_H = theme == null ? void 0 : theme.palette) == null ? void 0 : _H.grey[600]
21305
+ color: (_U = (_T = theme.myTheme) == null ? void 0 : _T.palette) == null ? void 0 : _U.grey[600]
21385
21306
  },
21386
- children: Math.max(0, ((_J = (_I = value == null ? void 0 : value.main) == null ? void 0 : _I.data) == null ? void 0 : _J.remaining) || ((_L = (_K = value == null ? void 0 : value.main) == null ? void 0 : _K.data) == null ? void 0 : _L.total) - ((_N = (_M = value == null ? void 0 : value.main) == null ? void 0 : _M.data) == null ? void 0 : _N.achieved))
21307
+ children: Math.max(0, ((_W = (_V = value == null ? void 0 : value.main) == null ? void 0 : _V.data) == null ? void 0 : _W.remaining) || ((_Y = (_X = value == null ? void 0 : value.main) == null ? void 0 : _X.data) == null ? void 0 : _Y.total) - ((__ = (_Z = value == null ? void 0 : value.main) == null ? void 0 : _Z.data) == null ? void 0 : __.achieved))
21387
21308
  })]
21388
21309
  })]
21389
21310
  })]