@ammarkhalidfarooq/dashboard-package 0.6.63 → 0.6.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1327,6 +1327,287 @@ var MetricCard$1 = function MetricCard(_ref) {
1327
1327
  });
1328
1328
  };
1329
1329
 
1330
+ var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
1331
+ var sx = _ref.sx,
1332
+ donationTypeData = _ref.donationTypeData,
1333
+ _ref$exportMode = _ref.exportMode,
1334
+ exportMode = _ref$exportMode === void 0 ? false : _ref$exportMode,
1335
+ _ref$subtitle = _ref.subtitle,
1336
+ subtitle = _ref$subtitle === void 0 ? "Donation type" : _ref$subtitle,
1337
+ chartHeight = _ref.chartHeight;
1338
+ var recurringColor = "rgb(99, 99, 230)";
1339
+ var oneTimeColor = "#10B981";
1340
+ var colors = [recurringColor, oneTimeColor, "#06B6D4", "#F59E0B", "#EF4444"];
1341
+ var categories = [];
1342
+ var series = [];
1343
+ var summaries = [];
1344
+ var title = "Donation Type";
1345
+ var isDistributed = false;
1346
+ if (donationTypeData && donationTypeData.data && Array.isArray(donationTypeData.data)) {
1347
+ // Time series recurring vs one-time format
1348
+ categories = donationTypeData.data.map(function (item) {
1349
+ return item.label || "";
1350
+ });
1351
+ series = [{
1352
+ name: "Recurring",
1353
+ data: donationTypeData.data.map(function (item) {
1354
+ return item.recurring || 0;
1355
+ })
1356
+ }, {
1357
+ name: "One-time",
1358
+ data: donationTypeData.data.map(function (item) {
1359
+ return item.oneTime || 0;
1360
+ })
1361
+ }];
1362
+ summaries = [{
1363
+ label: "Recurring",
1364
+ total: donationTypeData.totalRecurringDonations || 0,
1365
+ color: recurringColor
1366
+ }, {
1367
+ label: "One-time",
1368
+ total: donationTypeData.totalOneTimeDonations || 0,
1369
+ color: oneTimeColor
1370
+ }];
1371
+ title = "Recurring vs One-time";
1372
+ isDistributed = false;
1373
+ } else if (Array.isArray(donationTypeData) && donationTypeData.length > 0 && donationTypeData[0].totalAmount !== undefined) {
1374
+ // New array format
1375
+ categories = donationTypeData.map(function (item) {
1376
+ return item.type || "";
1377
+ });
1378
+ series = [{
1379
+ name: "Amount",
1380
+ data: donationTypeData.map(function (item) {
1381
+ return item.totalAmount || 0;
1382
+ })
1383
+ }];
1384
+ summaries = donationTypeData.map(function (item, index) {
1385
+ return {
1386
+ label: item.type || "",
1387
+ total: item.totalAmount || 0,
1388
+ color: colors[index % colors.length]
1389
+ };
1390
+ });
1391
+ isDistributed = true;
1392
+ if (donationTypeData.length === 2) {
1393
+ title = "".concat(donationTypeData[0].type, " vs ").concat(donationTypeData[1].type);
1394
+ }
1395
+ } else {
1396
+ var _dataObj$summary, _dataObj$summary2, _dataObj$summary3, _dataObj$summary4;
1397
+ // Object format, empty array, or missing data
1398
+ var dataObj = donationTypeData && _typeof(donationTypeData) === "object" && !Array.isArray(donationTypeData) ? donationTypeData : {};
1399
+ categories = dataObj.categories || [];
1400
+ var rawSeries = dataObj.series || [];
1401
+ if (rawSeries.length && categories.length) {
1402
+ series = rawSeries;
1403
+ } else {
1404
+ series = [{
1405
+ name: "Recurring",
1406
+ data: []
1407
+ }, {
1408
+ name: "One-time",
1409
+ data: []
1410
+ }];
1411
+ }
1412
+ summaries = [{
1413
+ label: (dataObj === null || dataObj === void 0 || (_dataObj$summary = dataObj.summary) === null || _dataObj$summary === void 0 || (_dataObj$summary = _dataObj$summary.recurring) === null || _dataObj$summary === void 0 ? void 0 : _dataObj$summary.label) || "Recurring",
1414
+ total: (dataObj === null || dataObj === void 0 || (_dataObj$summary2 = dataObj.summary) === null || _dataObj$summary2 === void 0 || (_dataObj$summary2 = _dataObj$summary2.recurring) === null || _dataObj$summary2 === void 0 ? void 0 : _dataObj$summary2.total) || 0,
1415
+ color: recurringColor
1416
+ }, {
1417
+ label: (dataObj === null || dataObj === void 0 || (_dataObj$summary3 = dataObj.summary) === null || _dataObj$summary3 === void 0 || (_dataObj$summary3 = _dataObj$summary3.oneTime) === null || _dataObj$summary3 === void 0 ? void 0 : _dataObj$summary3.label) || "One-time",
1418
+ total: (dataObj === null || dataObj === void 0 || (_dataObj$summary4 = dataObj.summary) === null || _dataObj$summary4 === void 0 || (_dataObj$summary4 = _dataObj$summary4.oneTime) === null || _dataObj$summary4 === void 0 ? void 0 : _dataObj$summary4.total) || 0,
1419
+ color: oneTimeColor
1420
+ }];
1421
+ title = "Recurring vs one-time";
1422
+ isDistributed = false;
1423
+ }
1424
+ var resolvedChartHeight = chartHeight !== null && chartHeight !== void 0 ? chartHeight : exportMode ? 110 : 170;
1425
+ var chartOptions = {
1426
+ chart: {
1427
+ type: "bar",
1428
+ toolbar: {
1429
+ show: false
1430
+ },
1431
+ zoom: {
1432
+ enabled: false
1433
+ },
1434
+ fontFamily: "Inter, sans-serif"
1435
+ },
1436
+ plotOptions: {
1437
+ bar: {
1438
+ horizontal: false,
1439
+ columnWidth: exportMode ? "68%" : "75%",
1440
+ borderRadius: exportMode ? 3 : 4,
1441
+ distributed: isDistributed,
1442
+ dataLabels: {
1443
+ position: "top"
1444
+ }
1445
+ }
1446
+ },
1447
+ dataLabels: {
1448
+ enabled: true,
1449
+ formatter: function formatter(val) {
1450
+ return "$".concat(formatNumber(val));
1451
+ },
1452
+ offsetY: exportMode ? -16 : -20,
1453
+ style: {
1454
+ fontSize: exportMode ? "7px" : "9px",
1455
+ fontWeight: 600,
1456
+ colors: ["#000"]
1457
+ }
1458
+ },
1459
+ stroke: {
1460
+ show: true,
1461
+ width: 2,
1462
+ colors: ["transparent"]
1463
+ },
1464
+ xaxis: {
1465
+ categories: categories,
1466
+ axisBorder: {
1467
+ show: false
1468
+ },
1469
+ axisTicks: {
1470
+ show: false
1471
+ },
1472
+ labels: {
1473
+ style: {
1474
+ colors: "rgba(0, 0, 0, 0.4)",
1475
+ fontSize: exportMode ? "8px" : "11px"
1476
+ }
1477
+ }
1478
+ },
1479
+ yaxis: {
1480
+ min: 0,
1481
+ tickAmount: exportMode ? 3 : 4,
1482
+ labels: {
1483
+ formatter: function formatter(val) {
1484
+ return "$".concat(formatNumber(val));
1485
+ },
1486
+ style: {
1487
+ colors: "rgba(0, 0, 0, 0.4)",
1488
+ fontSize: exportMode ? "8px" : "10px"
1489
+ }
1490
+ }
1491
+ },
1492
+ fill: {
1493
+ opacity: 1
1494
+ },
1495
+ colors: colors,
1496
+ grid: {
1497
+ borderColor: "#f1f1f1",
1498
+ strokeDashArray: 4,
1499
+ padding: {
1500
+ left: 0,
1501
+ right: 0
1502
+ },
1503
+ yaxis: {
1504
+ lines: {
1505
+ show: true
1506
+ }
1507
+ }
1508
+ },
1509
+ legend: {
1510
+ show: false
1511
+ },
1512
+ tooltip: {
1513
+ y: {
1514
+ formatter: function formatter(val) {
1515
+ return "$".concat(formatNumber(val));
1516
+ }
1517
+ }
1518
+ }
1519
+ };
1520
+ return /*#__PURE__*/jsxs(Card, {
1521
+ sx: _objectSpread2({
1522
+ bgcolor: "#fff",
1523
+ borderRadius: exportMode ? 2 : 4,
1524
+ border: exportMode ? "1px solid #DDE3EA" : "1px solid #f0f0f0",
1525
+ boxShadow: exportMode ? "0 1px 0 rgba(15,23,42,0.03)" : "0 4px 24px rgba(0,0,0,0.06)",
1526
+ p: exportMode ? 1.5 : 3,
1527
+ height: exportMode ? "100%" : "auto",
1528
+ boxSizing: "border-box"
1529
+ }, sx),
1530
+ children: [/*#__PURE__*/jsxs(Box, {
1531
+ sx: {
1532
+ display: "flex",
1533
+ flexDirection: "column"
1534
+ },
1535
+ children: [/*#__PURE__*/jsxs(Box, {
1536
+ sx: {
1537
+ textAlign: "left"
1538
+ },
1539
+ children: [/*#__PURE__*/jsx(Typography, {
1540
+ sx: {
1541
+ fontWeight: 700,
1542
+ fontSize: exportMode ? "12px" : "18px",
1543
+ color: "#000",
1544
+ lineHeight: 1.15
1545
+ },
1546
+ children: title
1547
+ }), /*#__PURE__*/jsx(Typography, {
1548
+ sx: {
1549
+ fontSize: exportMode ? "9.5px" : "13px",
1550
+ color: exportMode ? "#94A3B8" : "rgba(0, 0, 0, 0.4)",
1551
+ lineHeight: 1.15
1552
+ },
1553
+ children: subtitle
1554
+ })]
1555
+ }), /*#__PURE__*/jsx(Box, {
1556
+ sx: {
1557
+ display: "flex",
1558
+ gap: exportMode ? 1 : 1.5,
1559
+ mt: exportMode ? 0.75 : 0.5,
1560
+ flexWrap: "wrap"
1561
+ },
1562
+ children: summaries.map(function (item, index) {
1563
+ return /*#__PURE__*/jsxs(Box, {
1564
+ sx: {
1565
+ display: "flex",
1566
+ alignItems: "center",
1567
+ gap: 0.5
1568
+ },
1569
+ children: [/*#__PURE__*/jsx(Box, {
1570
+ sx: {
1571
+ width: exportMode ? 6 : 8,
1572
+ height: exportMode ? 6 : 8,
1573
+ bgcolor: item.color,
1574
+ borderRadius: "50%"
1575
+ }
1576
+ }), /*#__PURE__*/jsx(Typography, {
1577
+ sx: {
1578
+ fontSize: exportMode ? "9.5px" : "13px",
1579
+ color: exportMode ? "#374151" : "rgba(0, 0, 0, 0.5)",
1580
+ fontWeight: 500
1581
+ },
1582
+ children: item.label
1583
+ }), /*#__PURE__*/jsxs(Typography, {
1584
+ sx: {
1585
+ fontSize: exportMode ? "9.5px" : "13px",
1586
+ fontWeight: exportMode ? 700 : 600,
1587
+ color: "#000"
1588
+ },
1589
+ children: ["$", formatNumber(item.total || 0)]
1590
+ })]
1591
+ }, item.label || index);
1592
+ })
1593
+ })]
1594
+ }), /*#__PURE__*/jsx(Box, {
1595
+ sx: {
1596
+ height: resolvedChartHeight,
1597
+ width: exportMode ? "calc(100% + 24px)" : "calc(100% + 48px)",
1598
+ ml: exportMode ? -1.5 : -3,
1599
+ mr: exportMode ? -1.5 : -3
1600
+ },
1601
+ children: /*#__PURE__*/jsx(ReactApexChart, {
1602
+ options: chartOptions,
1603
+ series: series,
1604
+ type: "bar",
1605
+ height: "100%"
1606
+ })
1607
+ })]
1608
+ });
1609
+ };
1610
+
1330
1611
  var PURPLE = "#6363E6";
1331
1612
  var REPORT_COLORS = {
1332
1613
  purple: PURPLE};
@@ -2358,9 +2639,6 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
2358
2639
  retPct = donorMix.retPct,
2359
2640
  mixAvgGift = donorMix.avgGift,
2360
2641
  donorMixPrev = donorMix.donorMixPrev;
2361
- var _report$donationTypeT = report.donationTypeTotals,
2362
- recurringTotal = _report$donationTypeT.recurringTotal,
2363
- oneTimeTotal = _report$donationTypeT.oneTimeTotal;
2364
2642
  var geoList = report.donorGeographyList;
2365
2643
  var trafficItems = function (_apiData$trafficSourc) {
2366
2644
  var items = Array.isArray(apiData === null || apiData === void 0 || (_apiData$trafficSourc = apiData.trafficSourceData) === null || _apiData$trafficSourc === void 0 ? void 0 : _apiData$trafficSourc.data) ? apiData.trafficSourceData.data : [];
@@ -2779,103 +3057,18 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
2779
3057
  })
2780
3058
  })]
2781
3059
  })]
2782
- })
2783
- })]
2784
- }), /*#__PURE__*/jsxs("div", {
2785
- style: {
2786
- display: "grid",
2787
- gridTemplateColumns: "repeat(4, 1fr)",
2788
- gap: 8
2789
- },
2790
- children: [/*#__PURE__*/jsx(Panel, {
2791
- title: "Recurring vs one-time",
2792
- subtitle: "Donation type \xB7 weekly",
2793
- children: function () {
2794
- var tot = recurringTotal + oneTimeTotal || 1;
2795
- var rPct = recurringTotal / tot * 100;
2796
- var oPct = oneTimeTotal / tot * 100;
2797
- return /*#__PURE__*/jsxs("div", {
2798
- style: {
2799
- display: "flex",
2800
- flexDirection: "column",
2801
- gap: 9,
2802
- marginTop: 4
2803
- },
2804
- children: [/*#__PURE__*/jsxs("div", {
2805
- children: [/*#__PURE__*/jsxs("div", {
2806
- style: {
2807
- display: "flex",
2808
- justifyContent: "space-between",
2809
- marginBottom: 3
2810
- },
2811
- children: [/*#__PURE__*/jsx("span", {
2812
- style: {
2813
- fontSize: 9.5,
2814
- color: "#374151"
2815
- },
2816
- children: "Recurring"
2817
- }), /*#__PURE__*/jsx("span", {
2818
- style: {
2819
- fontSize: 9.5,
2820
- fontWeight: 700,
2821
- color: "#111827"
2822
- },
2823
- children: d$(recurringTotal)
2824
- })]
2825
- }), /*#__PURE__*/jsx("div", {
2826
- style: {
2827
- height: 9,
2828
- background: "#EEF2FF",
2829
- borderRadius: 3
2830
- },
2831
- children: /*#__PURE__*/jsx("div", {
2832
- style: {
2833
- width: "".concat(rPct, "%"),
2834
- height: "100%",
2835
- background: C.indigo,
2836
- borderRadius: 3
2837
- }
2838
- })
2839
- })]
2840
- }), /*#__PURE__*/jsxs("div", {
2841
- children: [/*#__PURE__*/jsxs("div", {
2842
- style: {
2843
- display: "flex",
2844
- justifyContent: "space-between",
2845
- marginBottom: 3
2846
- },
2847
- children: [/*#__PURE__*/jsx("span", {
2848
- style: {
2849
- fontSize: 9.5,
2850
- color: "#374151"
2851
- },
2852
- children: "One-time"
2853
- }), /*#__PURE__*/jsx("span", {
2854
- style: {
2855
- fontSize: 9.5,
2856
- fontWeight: 700,
2857
- color: "#111827"
2858
- },
2859
- children: d$(oneTimeTotal)
2860
- })]
2861
- }), /*#__PURE__*/jsx("div", {
2862
- style: {
2863
- height: 9,
2864
- background: "#EEF2FF",
2865
- borderRadius: 3
2866
- },
2867
- children: /*#__PURE__*/jsx("div", {
2868
- style: {
2869
- width: "".concat(oPct, "%"),
2870
- height: "100%",
2871
- background: "#C7D2FE",
2872
- borderRadius: 3
2873
- }
2874
- })
2875
- })]
2876
- })]
2877
- });
2878
- }()
3060
+ })
3061
+ })]
3062
+ }), /*#__PURE__*/jsxs("div", {
3063
+ style: {
3064
+ display: "grid",
3065
+ gridTemplateColumns: "repeat(4, 1fr)",
3066
+ gap: 8
3067
+ },
3068
+ children: [/*#__PURE__*/jsx(DonationTypeBarChart, {
3069
+ exportMode: true,
3070
+ subtitle: "Donation type \xB7 weekly",
3071
+ donationTypeData: report.donationTypeData
2879
3072
  }), /*#__PURE__*/jsx(Panel, {
2880
3073
  title: "Donor geography",
2881
3074
  subtitle: "Top countries \xB7 ".concat(formatNumber(totalDonors), " total"),
@@ -4780,268 +4973,6 @@ var MetricDonutCard = function MetricDonutCard(_ref2) {
4780
4973
  });
4781
4974
  };
4782
4975
 
4783
- var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
4784
- var sx = _ref.sx,
4785
- donationTypeData = _ref.donationTypeData;
4786
- var recurringColor = "rgb(99, 99, 230)";
4787
- var oneTimeColor = "#10B981";
4788
- var colors = [recurringColor, oneTimeColor, "#06B6D4", "#F59E0B", "#EF4444"];
4789
- var categories = [];
4790
- var series = [];
4791
- var summaries = [];
4792
- var title = "Donation Type";
4793
- var isDistributed = false;
4794
- if (donationTypeData && donationTypeData.data && Array.isArray(donationTypeData.data)) {
4795
- // Time series recurring vs one-time format
4796
- categories = donationTypeData.data.map(function (item) {
4797
- return item.label || "";
4798
- });
4799
- series = [{
4800
- name: "Recurring",
4801
- data: donationTypeData.data.map(function (item) {
4802
- return item.recurring || 0;
4803
- })
4804
- }, {
4805
- name: "One-time",
4806
- data: donationTypeData.data.map(function (item) {
4807
- return item.oneTime || 0;
4808
- })
4809
- }];
4810
- summaries = [{
4811
- label: "Recurring",
4812
- total: donationTypeData.totalRecurringDonations || 0,
4813
- color: recurringColor
4814
- }, {
4815
- label: "One-time",
4816
- total: donationTypeData.totalOneTimeDonations || 0,
4817
- color: oneTimeColor
4818
- }];
4819
- title = "Recurring vs One-time";
4820
- isDistributed = false;
4821
- } else if (Array.isArray(donationTypeData) && donationTypeData.length > 0 && donationTypeData[0].totalAmount !== undefined) {
4822
- // New array format
4823
- categories = donationTypeData.map(function (item) {
4824
- return item.type || "";
4825
- });
4826
- series = [{
4827
- name: "Amount",
4828
- data: donationTypeData.map(function (item) {
4829
- return item.totalAmount || 0;
4830
- })
4831
- }];
4832
- summaries = donationTypeData.map(function (item, index) {
4833
- return {
4834
- label: item.type || "",
4835
- total: item.totalAmount || 0,
4836
- color: colors[index % colors.length]
4837
- };
4838
- });
4839
- isDistributed = true;
4840
- if (donationTypeData.length === 2) {
4841
- title = "".concat(donationTypeData[0].type, " vs ").concat(donationTypeData[1].type);
4842
- }
4843
- } else {
4844
- var _dataObj$summary, _dataObj$summary2, _dataObj$summary3, _dataObj$summary4;
4845
- // Object format or simple series array
4846
- var dataObj = donationTypeData || {};
4847
- categories = dataObj.categories || [];
4848
- series = Array.isArray(donationTypeData) ? donationTypeData : dataObj.series || [];
4849
- summaries = [{
4850
- label: (dataObj === null || dataObj === void 0 || (_dataObj$summary = dataObj.summary) === null || _dataObj$summary === void 0 || (_dataObj$summary = _dataObj$summary.recurring) === null || _dataObj$summary === void 0 ? void 0 : _dataObj$summary.label) || "Recurring",
4851
- total: (dataObj === null || dataObj === void 0 || (_dataObj$summary2 = dataObj.summary) === null || _dataObj$summary2 === void 0 || (_dataObj$summary2 = _dataObj$summary2.recurring) === null || _dataObj$summary2 === void 0 ? void 0 : _dataObj$summary2.total) || 0,
4852
- color: recurringColor
4853
- }, {
4854
- label: (dataObj === null || dataObj === void 0 || (_dataObj$summary3 = dataObj.summary) === null || _dataObj$summary3 === void 0 || (_dataObj$summary3 = _dataObj$summary3.oneTime) === null || _dataObj$summary3 === void 0 ? void 0 : _dataObj$summary3.label) || "One-time",
4855
- total: (dataObj === null || dataObj === void 0 || (_dataObj$summary4 = dataObj.summary) === null || _dataObj$summary4 === void 0 || (_dataObj$summary4 = _dataObj$summary4.oneTime) === null || _dataObj$summary4 === void 0 ? void 0 : _dataObj$summary4.total) || 0,
4856
- color: oneTimeColor
4857
- }];
4858
- title = "Recurring vs one-time";
4859
- isDistributed = false;
4860
- }
4861
- var chartOptions = {
4862
- chart: {
4863
- type: "bar",
4864
- toolbar: {
4865
- show: false
4866
- },
4867
- zoom: {
4868
- enabled: false
4869
- },
4870
- fontFamily: "Inter, sans-serif"
4871
- },
4872
- plotOptions: {
4873
- bar: {
4874
- horizontal: false,
4875
- columnWidth: "75%",
4876
- borderRadius: 4,
4877
- distributed: isDistributed,
4878
- dataLabels: {
4879
- position: "top"
4880
- }
4881
- }
4882
- },
4883
- dataLabels: {
4884
- enabled: true,
4885
- formatter: function formatter(val) {
4886
- return "$".concat(formatNumber(val));
4887
- },
4888
- offsetY: -20,
4889
- style: {
4890
- fontSize: "9px",
4891
- fontWeight: 600,
4892
- colors: ["#000"]
4893
- }
4894
- },
4895
- stroke: {
4896
- show: true,
4897
- width: 2,
4898
- colors: ["transparent"]
4899
- },
4900
- xaxis: {
4901
- categories: categories,
4902
- axisBorder: {
4903
- show: false
4904
- },
4905
- axisTicks: {
4906
- show: false
4907
- },
4908
- labels: {
4909
- style: {
4910
- colors: "rgba(0, 0, 0, 0.4)",
4911
- fontSize: "11px"
4912
- }
4913
- }
4914
- },
4915
- yaxis: {
4916
- min: 0,
4917
- tickAmount: 4,
4918
- labels: {
4919
- formatter: function formatter(val) {
4920
- return "$".concat(formatNumber(val));
4921
- },
4922
- style: {
4923
- colors: "rgba(0, 0, 0, 0.4)",
4924
- fontSize: "10px"
4925
- }
4926
- }
4927
- },
4928
- fill: {
4929
- opacity: 1
4930
- },
4931
- colors: colors,
4932
- grid: {
4933
- borderColor: "#f1f1f1",
4934
- strokeDashArray: 4,
4935
- padding: {
4936
- left: 0,
4937
- right: 0
4938
- },
4939
- yaxis: {
4940
- lines: {
4941
- show: true
4942
- }
4943
- }
4944
- },
4945
- legend: {
4946
- show: false
4947
- },
4948
- tooltip: {
4949
- y: {
4950
- formatter: function formatter(val) {
4951
- return "$".concat(formatNumber(val));
4952
- }
4953
- }
4954
- }
4955
- };
4956
- return /*#__PURE__*/jsxs(Card, {
4957
- sx: _objectSpread2({
4958
- bgcolor: "#fff",
4959
- borderRadius: 4,
4960
- border: "1px solid #f0f0f0",
4961
- boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
4962
- p: 3
4963
- }, sx),
4964
- children: [/*#__PURE__*/jsxs(Box, {
4965
- sx: {
4966
- display: "flex",
4967
- flexDirection: "column"
4968
- },
4969
- children: [/*#__PURE__*/jsxs(Box, {
4970
- sx: {
4971
- textAlign: "left"
4972
- },
4973
- children: [/*#__PURE__*/jsx(Typography, {
4974
- sx: {
4975
- fontWeight: 700,
4976
- fontSize: "18px",
4977
- color: "#000",
4978
- lineHeight: 1.15
4979
- },
4980
- children: title
4981
- }), /*#__PURE__*/jsx(Typography, {
4982
- sx: {
4983
- fontSize: "13px",
4984
- color: "rgba(0, 0, 0, 0.4)",
4985
- lineHeight: 1.15
4986
- },
4987
- children: "Donation type"
4988
- })]
4989
- }), /*#__PURE__*/jsx(Box, {
4990
- sx: {
4991
- display: "flex",
4992
- gap: 1.5,
4993
- mt: 0.5,
4994
- flexWrap: "wrap"
4995
- },
4996
- children: summaries.map(function (item, index) {
4997
- return /*#__PURE__*/jsxs(Box, {
4998
- sx: {
4999
- display: "flex",
5000
- alignItems: "center",
5001
- gap: 0.5
5002
- },
5003
- children: [/*#__PURE__*/jsx(Box, {
5004
- sx: {
5005
- width: 8,
5006
- height: 8,
5007
- bgcolor: item.color,
5008
- borderRadius: "50%"
5009
- }
5010
- }), /*#__PURE__*/jsx(Typography, {
5011
- sx: {
5012
- fontSize: "13px",
5013
- color: "rgba(0, 0, 0, 0.5)",
5014
- fontWeight: 500
5015
- },
5016
- children: item.label
5017
- }), /*#__PURE__*/jsxs(Typography, {
5018
- sx: {
5019
- fontSize: "13px",
5020
- fontWeight: 600,
5021
- color: "#000"
5022
- },
5023
- children: ["$", formatNumber(item.total || 0)]
5024
- })]
5025
- }, item.label || index);
5026
- })
5027
- })]
5028
- }), /*#__PURE__*/jsx(Box, {
5029
- sx: {
5030
- height: 170,
5031
- width: "calc(100% + 48px)",
5032
- ml: -3,
5033
- mr: -3
5034
- },
5035
- children: /*#__PURE__*/jsx(ReactApexChart, {
5036
- options: chartOptions,
5037
- series: series,
5038
- type: "bar",
5039
- height: "100%"
5040
- })
5041
- })]
5042
- });
5043
- };
5044
-
5045
4976
  var CardWrapper = function CardWrapper(_ref) {
5046
4977
  var title = _ref.title,
5047
4978
  subtitle = _ref.subtitle,