@ammarkhalidfarooq/dashboard-package 0.5.36 → 0.5.37

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
@@ -1465,14 +1465,16 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1465
1465
  rows = _ref$rows === void 0 ? [] : _ref$rows,
1466
1466
  _ref$gridTemplateColu = _ref.gridTemplateColumns,
1467
1467
  gridTemplateColumns = _ref$gridTemplateColu === void 0 ? "3fr 1fr 1.5fr 0.8fr 1fr " : _ref$gridTemplateColu,
1468
- height = _ref.height;
1468
+ height = _ref.height,
1469
+ _ref$compact = _ref.compact,
1470
+ compact = _ref$compact === void 0 ? false : _ref$compact;
1469
1471
  return /*#__PURE__*/jsxs(Box, {
1470
1472
  sx: {
1471
1473
  bgcolor: "#fff",
1472
- borderRadius: 4,
1474
+ borderRadius: compact ? 3 : 4,
1473
1475
  border: "1px solid #f0f0f0",
1474
- boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
1475
- p: 3,
1476
+ boxShadow: compact ? "0 2px 12px rgba(0,0,0,0.05)" : "0 4px 24px rgba(0,0,0,0.06)",
1477
+ p: compact ? 1.5 : 3,
1476
1478
  height: height
1477
1479
  // height: "100%",
1478
1480
  },
@@ -1481,20 +1483,20 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1481
1483
  display: "flex",
1482
1484
  justifyContent: "space-between",
1483
1485
  alignItems: "flex-start",
1484
- mb: 3
1486
+ mb: compact ? 1.25 : 3
1485
1487
  },
1486
1488
  children: [/*#__PURE__*/jsxs(Box, {
1487
1489
  children: [/*#__PURE__*/jsx(Typography, {
1488
1490
  sx: {
1489
1491
  fontWeight: 700,
1490
- fontSize: "18px",
1492
+ fontSize: compact ? "14px" : "18px",
1491
1493
  color: "#000",
1492
1494
  textAlign: "left"
1493
1495
  },
1494
1496
  children: title
1495
1497
  }), /*#__PURE__*/jsx(Typography, {
1496
1498
  sx: {
1497
- fontSize: "13px",
1499
+ fontSize: compact ? "10px" : "13px",
1498
1500
  color: "rgba(0, 0, 0, 0.4)",
1499
1501
  mt: 0.2
1500
1502
  },
@@ -1502,7 +1504,7 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1502
1504
  })]
1503
1505
  }), actionLabel && /*#__PURE__*/jsx(Typography, {
1504
1506
  sx: {
1505
- fontSize: "13px",
1507
+ fontSize: compact ? "10px" : "13px",
1506
1508
  fontWeight: 600,
1507
1509
  color: "rgb(99, 99, 230)",
1508
1510
  cursor: "pointer"
@@ -1511,24 +1513,24 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1511
1513
  })]
1512
1514
  }), /*#__PURE__*/jsx(Box, {
1513
1515
  sx: {
1514
- overflowX: "auto"
1516
+ overflowX: compact ? "hidden" : "auto"
1515
1517
  },
1516
1518
  children: /*#__PURE__*/jsxs(Box, {
1517
1519
  sx: {
1518
- minWidth: "600px"
1520
+ minWidth: compact ? 0 : "600px"
1519
1521
  },
1520
1522
  children: [/*#__PURE__*/jsx(Box, {
1521
1523
  sx: {
1522
1524
  display: "grid",
1523
1525
  gridTemplateColumns: gridTemplateColumns,
1524
- gap: 2,
1525
- pb: 2.5,
1526
+ gap: compact ? 1 : 2,
1527
+ pb: compact ? 1 : 2.5,
1526
1528
  borderBottom: "1px solid #f0f0f0"
1527
1529
  },
1528
1530
  children: columns.map(function (header) {
1529
1531
  return /*#__PURE__*/jsx(Typography, {
1530
1532
  sx: {
1531
- fontSize: "12px",
1533
+ fontSize: compact ? "9px" : "12px",
1532
1534
  color: "rgba(0, 0, 0, 0.4)",
1533
1535
  fontWeight: 500,
1534
1536
  textAlign: "left"
@@ -1546,8 +1548,8 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1546
1548
  sx: {
1547
1549
  display: "grid",
1548
1550
  gridTemplateColumns: gridTemplateColumns,
1549
- gap: 2,
1550
- py: 1.2,
1551
+ gap: compact ? 1 : 2,
1552
+ py: compact ? 0.5 : 1.2,
1551
1553
  alignItems: "center",
1552
1554
  borderBottom: idx === rows.length - 1 ? "none" : "1px solid #f5f5f5"
1553
1555
  },
@@ -1559,9 +1561,9 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1559
1561
  },
1560
1562
  children: [row.id && /*#__PURE__*/jsx(Avatar, {
1561
1563
  sx: {
1562
- width: 28,
1563
- height: 28,
1564
- fontSize: "10px",
1564
+ width: compact ? 22 : 28,
1565
+ height: compact ? 22 : 28,
1566
+ fontSize: compact ? "8px" : "10px",
1565
1567
  fontWeight: 700,
1566
1568
  bgcolor: row.avatarBg || "#F3F4F6",
1567
1569
  color: "rgb(99, 99, 230)"
@@ -1580,7 +1582,7 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1580
1582
  })
1581
1583
  }), /*#__PURE__*/jsx(Typography, {
1582
1584
  sx: {
1583
- fontSize: "12px",
1585
+ fontSize: compact ? "10px" : "12px",
1584
1586
  fontWeight: 700,
1585
1587
  color: "#000"
1586
1588
  },
@@ -1588,7 +1590,7 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1588
1590
  })]
1589
1591
  }), /*#__PURE__*/jsx(Typography, {
1590
1592
  sx: {
1591
- fontSize: "13px",
1593
+ fontSize: compact ? "10px" : "13px",
1592
1594
  fontWeight: 600,
1593
1595
  color: "#000",
1594
1596
  textAlign: "left"
@@ -1608,7 +1610,7 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1608
1610
  variant: "determinate",
1609
1611
  value: Math.min(100, Math.max(0, (_row$progress = row.progress) !== null && _row$progress !== void 0 ? _row$progress : 0)),
1610
1612
  sx: {
1611
- height: 8,
1613
+ height: compact ? 6 : 8,
1612
1614
  borderRadius: 4,
1613
1615
  bgcolor: "#F3F4F6",
1614
1616
  "& .MuiLinearProgress-bar": {
@@ -1619,7 +1621,7 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1619
1621
  })
1620
1622
  }), /*#__PURE__*/jsxs(Typography, {
1621
1623
  sx: {
1622
- fontSize: "11px",
1624
+ fontSize: compact ? "9px" : "11px",
1623
1625
  color: "rgba(0, 0, 0, 0.4)",
1624
1626
  minWidth: "30px"
1625
1627
  },
@@ -1635,7 +1637,7 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1635
1637
  children: row.val2
1636
1638
  }), /*#__PURE__*/jsx(Typography, {
1637
1639
  sx: {
1638
- fontSize: "13px",
1640
+ fontSize: compact ? "10px" : "13px",
1639
1641
  fontWeight: row.highlightVal3 ? 700 : 500,
1640
1642
  color: row.highlightVal3 ? row.val3Color || "#22C55E" : "#000",
1641
1643
  textAlign: "left"
@@ -1690,12 +1692,12 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1690
1692
  }) : /*#__PURE__*/jsx(Box, {
1691
1693
  sx: {
1692
1694
  display: "inline-block",
1693
- px: 1.5,
1694
- py: 0.5,
1695
+ px: compact ? 1 : 1.5,
1696
+ py: compact ? 0.25 : 0.5,
1695
1697
  borderRadius: "100px",
1696
1698
  bgcolor: row.statusBg,
1697
1699
  color: row.statusColor,
1698
- fontSize: "11px",
1700
+ fontSize: compact ? "9px" : "11px",
1699
1701
  fontWeight: 700,
1700
1702
  textAlign: "center"
1701
1703
  },
@@ -1741,6 +1743,8 @@ var DonorMixCard = function DonorMixCard(_ref) {
1741
1743
  bottomSummaryValue = _ref$bottomSummaryVal === void 0 ? "$130.58" : _ref$bottomSummaryVal,
1742
1744
  _ref$bottomSummaryTre = _ref.bottomSummaryTrend,
1743
1745
  bottomSummaryTrend = _ref$bottomSummaryTre === void 0 ? "8.4% vs last month" : _ref$bottomSummaryTre,
1746
+ _ref$compact = _ref.compact,
1747
+ compact = _ref$compact === void 0 ? false : _ref$compact,
1744
1748
  _ref$sx = _ref.sx,
1745
1749
  sx = _ref$sx === void 0 ? {} : _ref$sx;
1746
1750
  var chartOptions = {
@@ -1809,7 +1813,7 @@ var DonorMixCard = function DonorMixCard(_ref) {
1809
1813
  borderRadius: 4,
1810
1814
  border: "1px solid #f0f0f0",
1811
1815
  boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
1812
- p: 3,
1816
+ p: compact ? 1.5 : 3,
1813
1817
  // height: "100%",
1814
1818
  // width: "100%",
1815
1819
  display: "flex",
@@ -1820,16 +1824,15 @@ var DonorMixCard = function DonorMixCard(_ref) {
1820
1824
  children: [/*#__PURE__*/jsx(Typography, {
1821
1825
  sx: {
1822
1826
  fontWeight: 700,
1823
- fontSize: "18px",
1827
+ fontSize: compact ? "14px" : "18px",
1824
1828
  color: "#000",
1825
1829
  textAlign: "left"
1826
1830
  },
1827
1831
  children: title
1828
1832
  }), /*#__PURE__*/jsx(Typography, {
1829
1833
  sx: {
1830
- fontSize: "13px",
1834
+ fontSize: compact ? "10px" : "13px",
1831
1835
  color: "rgba(0, 0, 0, 0.4)",
1832
- // mt: 0.2,
1833
1836
  textAlign: "left"
1834
1837
  },
1835
1838
  children: subtitle
@@ -1837,7 +1840,7 @@ var DonorMixCard = function DonorMixCard(_ref) {
1837
1840
  }), /*#__PURE__*/jsx(Box, {
1838
1841
  sx: {
1839
1842
  position: "relative",
1840
- height: "180px",
1843
+ height: compact ? "110px" : "180px",
1841
1844
  // mb: 1,
1842
1845
  display: "flex",
1843
1846
  justifyContent: "center"
@@ -1846,7 +1849,7 @@ var DonorMixCard = function DonorMixCard(_ref) {
1846
1849
  options: chartOptions,
1847
1850
  series: series,
1848
1851
  type: "donut",
1849
- width: "210"
1852
+ width: compact ? "140" : "210"
1850
1853
  })
1851
1854
  }), /*#__PURE__*/jsxs(Box, {
1852
1855
  sx: {},
@@ -1855,7 +1858,7 @@ var DonorMixCard = function DonorMixCard(_ref) {
1855
1858
  sx: {
1856
1859
  display: "flex",
1857
1860
  justifyContent: "space-between",
1858
- mb: idx === items.length - 1 ? showBottomSummary ? 1 : 0 : 1
1861
+ mb: idx === items.length - 1 ? showBottomSummary ? compact ? 0.5 : 1 : 0 : compact ? 0.5 : 1
1859
1862
  },
1860
1863
  children: [/*#__PURE__*/jsxs(Box, {
1861
1864
  sx: {
@@ -1872,7 +1875,7 @@ var DonorMixCard = function DonorMixCard(_ref) {
1872
1875
  }
1873
1876
  }), /*#__PURE__*/jsx(Typography, {
1874
1877
  sx: {
1875
- fontSize: "13px",
1878
+ fontSize: compact ? "10px" : "13px",
1876
1879
  fontWeight: 500,
1877
1880
  color: "rgba(0, 0, 0, 0.4)"
1878
1881
  },
@@ -1880,7 +1883,7 @@ var DonorMixCard = function DonorMixCard(_ref) {
1880
1883
  })]
1881
1884
  }), /*#__PURE__*/jsx(Typography, {
1882
1885
  sx: {
1883
- fontSize: "13px",
1886
+ fontSize: compact ? "10px" : "13px",
1884
1887
  fontWeight: 700,
1885
1888
  color: "#111"
1886
1889
  },
@@ -1892,7 +1895,7 @@ var DonorMixCard = function DonorMixCard(_ref) {
1892
1895
  // display: "flex",
1893
1896
  // justifyContent: "space-between",
1894
1897
  // alignItems: "center",
1895
- pt: 2,
1898
+ pt: compact ? 1 : 2,
1896
1899
  borderTop: "1px solid #f0f0f0",
1897
1900
  textAlign: "left"
1898
1901
  },
@@ -2142,7 +2145,9 @@ var MetricSparklineCard = function MetricSparklineCard(_ref) {
2142
2145
  footerMetrics = _ref$footerMetrics === void 0 ? [] : _ref$footerMetrics,
2143
2146
  sx = _ref.sx,
2144
2147
  _ref$bottomSection = _ref.bottomSection,
2145
- bottomSection = _ref$bottomSection === void 0 ? false : _ref$bottomSection;
2148
+ bottomSection = _ref$bottomSection === void 0 ? false : _ref$bottomSection,
2149
+ _ref$compact = _ref.compact,
2150
+ compact = _ref$compact === void 0 ? false : _ref$compact;
2146
2151
  // Extract values for chart series
2147
2152
  var series = [{
2148
2153
  name: title,
@@ -2216,8 +2221,8 @@ var MetricSparklineCard = function MetricSparklineCard(_ref) {
2216
2221
  };
2217
2222
  return /*#__PURE__*/jsxs(Card, {
2218
2223
  sx: _objectSpread2({
2219
- p: 3,
2220
- borderRadius: 4,
2224
+ p: compact ? 1.25 : 3,
2225
+ borderRadius: compact ? 3 : 4,
2221
2226
  border: "1px solid #f0f0f0",
2222
2227
  boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
2223
2228
  bgcolor: "#fff",
@@ -2231,7 +2236,7 @@ var MetricSparklineCard = function MetricSparklineCard(_ref) {
2231
2236
  children: [/*#__PURE__*/jsx(Typography, {
2232
2237
  sx: {
2233
2238
  fontWeight: 700,
2234
- fontSize: "16px",
2239
+ fontSize: compact ? "13px" : "16px",
2235
2240
  color: "#000",
2236
2241
  textAlign: "left"
2237
2242
  },
@@ -2347,7 +2352,9 @@ var MetricDonutCard = function MetricDonutCard(_ref) {
2347
2352
  raisedTrend = _ref.raisedTrend,
2348
2353
  _ref$chartColors = _ref.chartColors,
2349
2354
  chartColors = _ref$chartColors === void 0 ? ["rgb(99, 99, 230)", "#88bfd290"] : _ref$chartColors,
2350
- sx = _ref.sx;
2355
+ sx = _ref.sx,
2356
+ _ref$compact = _ref.compact,
2357
+ compact = _ref$compact === void 0 ? false : _ref$compact;
2351
2358
  var chartOptions = {
2352
2359
  chart: {
2353
2360
  type: "radialBar",
@@ -2403,8 +2410,8 @@ var MetricDonutCard = function MetricDonutCard(_ref) {
2403
2410
  var series = [acceptanceRate];
2404
2411
  return /*#__PURE__*/jsxs(Card, {
2405
2412
  sx: _objectSpread2({
2406
- p: 3,
2407
- borderRadius: 4,
2413
+ p: compact ? 1.25 : 3,
2414
+ borderRadius: compact ? 3 : 4,
2408
2415
  border: "1px solid #f0f0f0",
2409
2416
  boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
2410
2417
  bgcolor: "#fff",
@@ -2417,7 +2424,7 @@ var MetricDonutCard = function MetricDonutCard(_ref) {
2417
2424
  children: [/*#__PURE__*/jsx(Typography, {
2418
2425
  sx: {
2419
2426
  fontWeight: 700,
2420
- fontSize: "16px",
2427
+ fontSize: compact ? "13px" : "16px",
2421
2428
  color: "#000",
2422
2429
  textAlign: "left"
2423
2430
  },
@@ -2433,9 +2440,9 @@ var MetricDonutCard = function MetricDonutCard(_ref) {
2433
2440
  })]
2434
2441
  }), /*#__PURE__*/jsx(Box, {
2435
2442
  sx: {
2436
- height: 160,
2443
+ height: compact ? 90 : 160,
2437
2444
  position: "relative",
2438
- mt: 1,
2445
+ mt: compact ? 0.5 : 1,
2439
2446
  display: "flex",
2440
2447
  justifyContent: "center"
2441
2448
  },
@@ -4134,14 +4141,16 @@ var RefundsChargebacksCard = function RefundsChargebacksCard(_ref) {
4134
4141
  };
4135
4142
 
4136
4143
  var cardHeight = function cardHeight(exportMode) {
4137
- return exportMode ? 210 : 300;
4144
+ return exportMode ? 158 : 300;
4138
4145
  };
4139
4146
  var ReportDetailsSection = function ReportDetailsSection(_ref) {
4140
4147
  var _orderBumpData$chart, _orderBumpData$peakDa, _referralData$chartDa;
4141
4148
  var reportData = _ref.reportData,
4142
4149
  dateName = _ref.dateName,
4143
4150
  _ref$exportMode = _ref.exportMode,
4144
- exportMode = _ref$exportMode === void 0 ? false : _ref$exportMode;
4151
+ exportMode = _ref$exportMode === void 0 ? false : _ref$exportMode,
4152
+ _ref$section = _ref.section,
4153
+ section = _ref$section === void 0 ? "all" : _ref$section;
4145
4154
  var activeCampaigns = reportData.activeCampaigns,
4146
4155
  donorMix = reportData.donorMix,
4147
4156
  donationTypeData = reportData.donationTypeData,
@@ -4152,164 +4161,407 @@ var ReportDetailsSection = function ReportDetailsSection(_ref) {
4152
4161
  downsellData = reportData.downsellData,
4153
4162
  referralData = reportData.referralData,
4154
4163
  refundsChargebacksData = reportData.refundsChargebacksData;
4164
+ var gridSx = {
4165
+ display: "grid",
4166
+ gridTemplateColumns: exportMode ? "repeat(4, 1fr)" : {
4167
+ xs: "1fr",
4168
+ sm: "1fr 1fr",
4169
+ lg: "repeat(4, 1fr)"
4170
+ },
4171
+ gap: exportMode ? 0.75 : 2
4172
+ };
4173
+ var cardSx = {
4174
+ maxHeight: cardHeight(exportMode),
4175
+ minHeight: exportMode ? cardHeight(exportMode) : undefined
4176
+ };
4177
+ var campaignsRow = /*#__PURE__*/jsxs(Box, {
4178
+ sx: {
4179
+ display: "grid",
4180
+ gridTemplateColumns: exportMode ? "1fr 200px" : {
4181
+ xs: "1fr",
4182
+ lg: "2.25fr 1fr"
4183
+ },
4184
+ gap: exportMode ? 0.75 : 2,
4185
+ mb: exportMode ? 0.75 : 2,
4186
+ alignItems: "stretch"
4187
+ },
4188
+ children: [/*#__PURE__*/jsx(ActiveCampaignsCard, {
4189
+ title: "Active campaigns",
4190
+ subtitle: "Live fundraisers ranked by velocity",
4191
+ actionLabel: exportMode ? undefined : "View all",
4192
+ columns: ["Campaign", "Raised", "Progress", "Donors", "Status"],
4193
+ gridTemplateColumns: "2.2fr 0.9fr 1.3fr 0.6fr 0.8fr",
4194
+ rows: activeCampaigns,
4195
+ compact: exportMode
4196
+ }), /*#__PURE__*/jsx(DonorMixCard, {
4197
+ title: "Donor mix",
4198
+ subtitle: "Acquisition vs retention",
4199
+ series: [donorMix.newDonors, donorMix.returningDonors],
4200
+ labels: ["New donors", "Returning"],
4201
+ colors: ["#10B981", "rgb(99, 99, 230)"],
4202
+ centerLabel: "donors",
4203
+ centerValue: String(donorMix.totalMix),
4204
+ items: [{
4205
+ label: "New donors",
4206
+ val: "".concat(donorMix.newDonors, " \xB7 ").concat(donorMix.newPct, "%"),
4207
+ color: "#10B981"
4208
+ }, {
4209
+ label: "Returning",
4210
+ val: "".concat(donorMix.returningDonors, " \xB7 ").concat(donorMix.retPct, "%"),
4211
+ color: "rgb(99, 99, 230)"
4212
+ }],
4213
+ bottomSummaryValue: "$".concat(formatNumber(donorMix.avgGift)),
4214
+ bottomSummaryTrend: "".concat(donorMix.donorMixPrev, "% vs ").concat(dateName || "last month"),
4215
+ compact: exportMode,
4216
+ sx: {
4217
+ height: "100%"
4218
+ }
4219
+ })]
4220
+ });
4221
+ var middleCards = /*#__PURE__*/jsxs(Box, {
4222
+ sx: gridSx,
4223
+ children: [/*#__PURE__*/jsx(DonationTypeBarChart, {
4224
+ sx: _objectSpread2(_objectSpread2({}, cardSx), exportMode && {
4225
+ p: 1.25,
4226
+ borderRadius: 3
4227
+ }),
4228
+ donationTypeData: donationTypeData
4229
+ }), /*#__PURE__*/jsx(PaidDonorGeographyCard, {
4230
+ sx: _objectSpread2(_objectSpread2({}, cardSx), exportMode && {
4231
+ p: 1.25,
4232
+ borderRadius: 3
4233
+ }),
4234
+ donorGeographyData: donorGeographyData
4235
+ }), /*#__PURE__*/jsx(RefundsChargebacksCard, {
4236
+ sx: _objectSpread2(_objectSpread2({}, cardSx), exportMode && {
4237
+ p: 1.25,
4238
+ borderRadius: 3
4239
+ }),
4240
+ refundsChargebacksData: refundsChargebacksData
4241
+ }), /*#__PURE__*/jsx(TrafficSourceCard, {
4242
+ sx: _objectSpread2(_objectSpread2({}, cardSx), exportMode && {
4243
+ p: 1.25,
4244
+ borderRadius: 3
4245
+ }),
4246
+ trafficSourceData: (trafficSourceData === null || trafficSourceData === void 0 ? void 0 : trafficSourceData.data) || [],
4247
+ total: "$".concat(formatNumber((trafficSourceData === null || trafficSourceData === void 0 ? void 0 : trafficSourceData.totalRevenue) || 0))
4248
+ })]
4249
+ });
4250
+ var bottomCards = /*#__PURE__*/jsxs(Box, {
4251
+ sx: gridSx,
4252
+ children: [/*#__PURE__*/jsx(MetricSparklineCard, {
4253
+ title: "Order Bump",
4254
+ subtitle: "Revenue trend \xB7 last 30 days",
4255
+ value: "$".concat(formatNumber((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.totalRevenue) || 0)),
4256
+ trend: "".concat((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.growthPercentage) >= 0 ? "▲" : "▼", " ").concat(Math.abs((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.growthPercentage) || 0).toFixed(1), "% vs last month"),
4257
+ chartData: (orderBumpData === null || orderBumpData === void 0 || (_orderBumpData$chart = orderBumpData.chart) === null || _orderBumpData$chart === void 0 ? void 0 : _orderBumpData$chart.map(function (item) {
4258
+ return {
4259
+ label: item.label,
4260
+ value: item.revenue
4261
+ };
4262
+ })) || [],
4263
+ footerMetrics: [{
4264
+ label: "Avg/day",
4265
+ value: "$".concat(formatNumber((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.averagePerDay) || 0))
4266
+ }, {
4267
+ label: "Peak day",
4268
+ value: "$".concat(formatNumber((orderBumpData === null || orderBumpData === void 0 || (_orderBumpData$peakDa = orderBumpData.peakDay) === null || _orderBumpData$peakDa === void 0 ? void 0 : _orderBumpData$peakDa.amount) || 0))
4269
+ }, {
4270
+ label: "Orders",
4271
+ value: formatNumber((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.totalOrders) || 0)
4272
+ }],
4273
+ sx: cardSx,
4274
+ bottomSection: true,
4275
+ compact: exportMode
4276
+ }), /*#__PURE__*/jsx(MetricDonutCard, {
4277
+ title: "Upsell",
4278
+ subtitle: "Acceptance & raised",
4279
+ acceptanceRate: (upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceRate) || 0,
4280
+ acceptanceVal: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.totalUpsellsAttached) || 0)),
4281
+ acceptanceTrend: "".concat((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceGrowth) >= 0 ? "▲" : "▼", " ").concat(Math.abs((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceGrowth) || 0).toFixed(1), "%"),
4282
+ raisedVal: "$".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raised) || 0)),
4283
+ raisedTrend: "".concat((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedGrowth) >= 0 ? "▲" : "▼", " ").concat(Math.abs((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedGrowth) || 0).toFixed(1), "%"),
4284
+ sx: cardSx,
4285
+ compact: exportMode
4286
+ }), /*#__PURE__*/jsx(MetricDonutCard, {
4287
+ title: "Downsell",
4288
+ subtitle: "Acceptance & raised",
4289
+ acceptanceRate: (downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceRate) || 0,
4290
+ acceptanceVal: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceRate) || 0), "%"),
4291
+ acceptanceTrend: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceGrowth) || 0), "%"),
4292
+ raisedVal: "$".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raised) || 0)),
4293
+ raisedTrend: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raisedGrowth) || 0), "%"),
4294
+ sx: cardSx,
4295
+ compact: exportMode
4296
+ }), /*#__PURE__*/jsx(MetricSparklineCard, {
4297
+ title: "Referrals",
4298
+ subtitle: "Revenue trend \xB7 last 30 days",
4299
+ value: "$".concat(formatNumber((referralData === null || referralData === void 0 ? void 0 : referralData.totalRevenue) || 0)),
4300
+ trend: "\u25B2 ".concat((referralData === null || referralData === void 0 ? void 0 : referralData.growthPercentage) || 0, "% vs last month"),
4301
+ chartData: (referralData === null || referralData === void 0 || (_referralData$chartDa = referralData.chartData) === null || _referralData$chartDa === void 0 ? void 0 : _referralData$chartDa.map(function (item) {
4302
+ return {
4303
+ label: item.date,
4304
+ value: item.revenue
4305
+ };
4306
+ })) || [],
4307
+ footerMetrics: [{
4308
+ label: "Referrers",
4309
+ value: formatNumber((referralData === null || referralData === void 0 ? void 0 : referralData.totalReferrers) || 0)
4310
+ }, {
4311
+ label: "Avg gift",
4312
+ value: "$".concat(formatNumber((referralData === null || referralData === void 0 ? void 0 : referralData.averageGift) || 0))
4313
+ }, {
4314
+ label: "Conv. rate",
4315
+ value: "".concat(formatNumber((referralData === null || referralData === void 0 ? void 0 : referralData.conversionRate) || 0), "%")
4316
+ }],
4317
+ sx: cardSx,
4318
+ bottomSection: true,
4319
+ compact: exportMode
4320
+ })]
4321
+ });
4322
+ if (section === "top") {
4323
+ return /*#__PURE__*/jsxs(Box, {
4324
+ children: [campaignsRow, middleCards]
4325
+ });
4326
+ }
4327
+ if (section === "bottom") {
4328
+ return /*#__PURE__*/jsx(Box, {
4329
+ children: bottomCards
4330
+ });
4331
+ }
4155
4332
  return /*#__PURE__*/jsxs(Box, {
4156
4333
  sx: {
4157
4334
  mt: exportMode ? 0 : 2
4158
4335
  },
4159
- children: [/*#__PURE__*/jsxs(Grid, {
4160
- container: true,
4161
- spacing: exportMode ? 1 : 2,
4336
+ children: [campaignsRow, middleCards, /*#__PURE__*/jsx(Box, {
4162
4337
  sx: {
4163
- mb: exportMode ? 1 : 2
4338
+ mt: exportMode ? 0.75 : 2
4164
4339
  },
4165
- children: [/*#__PURE__*/jsx(Grid, {
4166
- item: true,
4167
- xs: 12,
4168
- lg: 9,
4169
- children: /*#__PURE__*/jsx(ActiveCampaignsCard, {
4170
- title: "Active campaigns",
4171
- subtitle: "Live fundraisers ranked by velocity",
4172
- actionLabel: "View all",
4173
- columns: ["Campaign", "Raised", "Progress", "Donors", "Status"],
4174
- gridTemplateColumns: "2.5fr 1fr 1.5fr 0.7fr 0.9fr",
4175
- rows: activeCampaigns
4176
- })
4177
- }), /*#__PURE__*/jsx(Grid, {
4178
- item: true,
4179
- xs: 12,
4180
- lg: 3,
4181
- children: /*#__PURE__*/jsx(DonorMixCard, {
4182
- title: "Donor mix",
4183
- subtitle: "Acquisition vs retention",
4184
- series: [donorMix.newDonors, donorMix.returningDonors],
4185
- labels: ["New donors", "Returning"],
4186
- colors: ["#10B981", "rgb(99, 99, 230)"],
4187
- centerLabel: "donors",
4188
- centerValue: String(donorMix.totalMix),
4189
- items: [{
4190
- label: "New donors",
4191
- val: "".concat(donorMix.newDonors, " \xB7 ").concat(donorMix.newPct, "%"),
4192
- color: "#10B981"
4193
- }, {
4194
- label: "Returning",
4195
- val: "".concat(donorMix.returningDonors, " \xB7 ").concat(donorMix.retPct, "%"),
4196
- color: "rgb(99, 99, 230)"
4197
- }],
4198
- bottomSummaryValue: "$".concat(formatNumber(donorMix.avgGift)),
4199
- bottomSummaryTrend: "".concat(donorMix.donorMixPrev, "% vs ").concat(dateName || "last month"),
4200
- sx: {
4201
- height: "100%"
4202
- }
4203
- })
4204
- })]
4205
- }), /*#__PURE__*/jsxs(Box, {
4340
+ children: bottomCards
4341
+ })]
4342
+ });
4343
+ };
4344
+
4345
+ var COLORS$1 = ["#6363E6", "#10B981", "#06B6D4"];
4346
+ var formatYLabel = function formatYLabel(v) {
4347
+ if (v >= 10000) return "$".concat((v / 1000).toFixed(0), "K");
4348
+ if (v >= 1000) return "$".concat((v / 1000).toFixed(1), "K");
4349
+ return "$".concat(v.toFixed(0));
4350
+ };
4351
+ var ReportLineChart = function ReportLineChart(_ref) {
4352
+ var _ref$series = _ref.series,
4353
+ series = _ref$series === void 0 ? [] : _ref$series,
4354
+ _ref$categories = _ref.categories,
4355
+ categories = _ref$categories === void 0 ? [] : _ref$categories,
4356
+ _ref$width = _ref.width,
4357
+ width = _ref$width === void 0 ? 730 : _ref$width,
4358
+ _ref$height = _ref.height,
4359
+ height = _ref$height === void 0 ? 200 : _ref$height;
4360
+ var allVals = series.flatMap(function (s) {
4361
+ return s.data || [];
4362
+ });
4363
+ if (!allVals.length) {
4364
+ return /*#__PURE__*/jsx("div", {
4365
+ style: {
4366
+ height: height,
4367
+ background: "#F8FAFF",
4368
+ borderRadius: 8
4369
+ }
4370
+ });
4371
+ }
4372
+ var PL = 44;
4373
+ var PR = 12;
4374
+ var PT = 10;
4375
+ var PB = 24;
4376
+ var IW = width - PL - PR;
4377
+ var IH = height - PT - PB;
4378
+ var max = Math.max.apply(Math, _toConsumableArray(allVals).concat([0]));
4379
+ var range = max || 1;
4380
+ var xp = function xp(i, n) {
4381
+ return PL + i / Math.max(n - 1, 1) * IW;
4382
+ };
4383
+ var yp = function yp(v) {
4384
+ return PT + IH - v / range * IH;
4385
+ };
4386
+ var yTicks = [0, 0.25, 0.5, 0.75, 1].map(function (t) {
4387
+ return t * range;
4388
+ });
4389
+ var step = Math.max(1, Math.floor(categories.length / 6));
4390
+ var shownCats = categories.filter(function (_, i) {
4391
+ return i % step === 0 || i === categories.length - 1;
4392
+ });
4393
+ return /*#__PURE__*/jsxs("svg", {
4394
+ width: width,
4395
+ height: height,
4396
+ style: {
4397
+ display: "block"
4398
+ },
4399
+ children: [yTicks.map(function (v, i) {
4400
+ var y = yp(v);
4401
+ return /*#__PURE__*/jsxs("g", {
4402
+ children: [/*#__PURE__*/jsx("line", {
4403
+ x1: PL,
4404
+ y1: y,
4405
+ x2: width - PR,
4406
+ y2: y,
4407
+ stroke: "#E5E7EB",
4408
+ strokeWidth: 1
4409
+ }), /*#__PURE__*/jsx("text", {
4410
+ x: PL - 6,
4411
+ y: y + 4,
4412
+ textAnchor: "end",
4413
+ fontSize: 10,
4414
+ fill: "#9CA3AF",
4415
+ children: formatYLabel(v)
4416
+ })]
4417
+ }, i);
4418
+ }), series.map(function (s, si) {
4419
+ var data = s.data || [];
4420
+ if (!data.length) return null;
4421
+ var pathD = data.map(function (v, i) {
4422
+ return "".concat(i === 0 ? "M" : "L").concat(xp(i, data.length).toFixed(1), ",").concat(yp(v).toFixed(1));
4423
+ }).join(" ");
4424
+ return /*#__PURE__*/jsx("path", {
4425
+ d: pathD,
4426
+ fill: "none",
4427
+ stroke: COLORS$1[si % COLORS$1.length],
4428
+ strokeWidth: 2.5,
4429
+ strokeLinecap: "round",
4430
+ strokeLinejoin: "round"
4431
+ }, s.name || si);
4432
+ }), shownCats.map(function (label, i) {
4433
+ var origIdx = categories.indexOf(label);
4434
+ var x = xp(origIdx < 0 ? i * step : origIdx, categories.length);
4435
+ return /*#__PURE__*/jsx("text", {
4436
+ x: x,
4437
+ y: height - 6,
4438
+ textAnchor: "middle",
4439
+ fontSize: 10,
4440
+ fill: "#9CA3AF",
4441
+ children: label
4442
+ }, i);
4443
+ })]
4444
+ });
4445
+ };
4446
+
4447
+ var LEGEND = [{
4448
+ label: "Paid Ads",
4449
+ color: "#6363E6"
4450
+ }, {
4451
+ label: "Organic",
4452
+ color: "#10B981"
4453
+ }, {
4454
+ label: "Email",
4455
+ color: "#06B6D4"
4456
+ }];
4457
+ var ReportExportChartCard = function ReportExportChartCard(_ref) {
4458
+ var item = _ref.item,
4459
+ _ref$chartWidth = _ref.chartWidth,
4460
+ chartWidth = _ref$chartWidth === void 0 ? 730 : _ref$chartWidth;
4461
+ return /*#__PURE__*/jsx(Card, {
4462
+ sx: {
4463
+ width: "100%",
4464
+ boxShadow: "0 2px 12px rgba(0,0,0,0.05)",
4465
+ borderRadius: 3,
4466
+ border: "1px solid #f0f0f0"
4467
+ },
4468
+ children: /*#__PURE__*/jsxs(CardContent, {
4206
4469
  sx: {
4207
- display: "grid",
4208
- gridTemplateColumns: exportMode ? "repeat(4, 1fr)" : {
4209
- xs: "1fr",
4210
- sm: "1fr 1fr",
4211
- lg: "repeat(4, 1fr)"
4212
- },
4213
- gap: exportMode ? 1 : 2
4214
- },
4215
- children: [/*#__PURE__*/jsx(DonationTypeBarChart, {
4216
- sx: {
4217
- maxHeight: cardHeight(exportMode)
4218
- },
4219
- donationTypeData: donationTypeData
4220
- }), /*#__PURE__*/jsx(PaidDonorGeographyCard, {
4221
- sx: {
4222
- maxHeight: cardHeight(exportMode)
4223
- },
4224
- donorGeographyData: donorGeographyData
4225
- }), /*#__PURE__*/jsx(RefundsChargebacksCard, {
4226
- sx: {
4227
- maxHeight: cardHeight(exportMode)
4228
- },
4229
- refundsChargebacksData: refundsChargebacksData
4230
- }), /*#__PURE__*/jsx(TrafficSourceCard, {
4231
- sx: {
4232
- maxHeight: cardHeight(exportMode)
4233
- },
4234
- trafficSourceData: (trafficSourceData === null || trafficSourceData === void 0 ? void 0 : trafficSourceData.data) || [],
4235
- total: "$".concat(formatNumber((trafficSourceData === null || trafficSourceData === void 0 ? void 0 : trafficSourceData.totalRevenue) || 0))
4236
- }), /*#__PURE__*/jsx(MetricSparklineCard, {
4237
- title: "Order Bump",
4238
- subtitle: "Revenue trend \xB7 last 30 days",
4239
- value: "$".concat(formatNumber((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.totalRevenue) || 0)),
4240
- trend: "".concat((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.growthPercentage) >= 0 ? "▲" : "▼", " ").concat(Math.abs((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.growthPercentage) || 0).toFixed(1), "% vs last month"),
4241
- chartData: (orderBumpData === null || orderBumpData === void 0 || (_orderBumpData$chart = orderBumpData.chart) === null || _orderBumpData$chart === void 0 ? void 0 : _orderBumpData$chart.map(function (item) {
4242
- return {
4243
- label: item.label,
4244
- value: item.revenue
4245
- };
4246
- })) || [],
4247
- footerMetrics: [{
4248
- label: "Avg/day",
4249
- value: "$".concat(formatNumber((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.averagePerDay) || 0))
4250
- }, {
4251
- label: "Peak day",
4252
- value: "$".concat(formatNumber((orderBumpData === null || orderBumpData === void 0 || (_orderBumpData$peakDa = orderBumpData.peakDay) === null || _orderBumpData$peakDa === void 0 ? void 0 : _orderBumpData$peakDa.amount) || 0))
4253
- }, {
4254
- label: "Orders",
4255
- value: formatNumber((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.totalOrders) || 0)
4256
- }],
4257
- sx: {
4258
- maxHeight: cardHeight(exportMode)
4259
- },
4260
- bottomSection: true
4261
- }), /*#__PURE__*/jsx(MetricDonutCard, {
4262
- title: "Upsell",
4263
- subtitle: "Acceptance & raised",
4264
- acceptanceRate: (upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceRate) || 0,
4265
- acceptanceVal: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.totalUpsellsAttached) || 0)),
4266
- acceptanceTrend: "".concat((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceGrowth) >= 0 ? "▲" : "▼", " ").concat(Math.abs((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceGrowth) || 0).toFixed(1), "%"),
4267
- raisedVal: "$".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raised) || 0)),
4268
- raisedTrend: "".concat((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedGrowth) >= 0 ? "▲" : "▼", " ").concat(Math.abs((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedGrowth) || 0).toFixed(1), "%"),
4269
- sx: {
4270
- maxHeight: cardHeight(exportMode)
4271
- }
4272
- }), /*#__PURE__*/jsx(MetricDonutCard, {
4273
- title: "Downsell",
4274
- subtitle: "Acceptance & raised",
4275
- acceptanceRate: (downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceRate) || 0,
4276
- acceptanceVal: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceRate) || 0), "%"),
4277
- acceptanceTrend: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceGrowth) || 0), "%"),
4278
- raisedVal: "$".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raised) || 0)),
4279
- raisedTrend: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raisedGrowth) || 0), "%"),
4280
- sx: {
4281
- maxHeight: cardHeight(exportMode)
4470
+ p: 2,
4471
+ "&:last-child": {
4472
+ pb: 2
4282
4473
  }
4283
- }), /*#__PURE__*/jsx(MetricSparklineCard, {
4284
- title: "Referrals",
4285
- subtitle: "Revenue trend \xB7 last 30 days",
4286
- value: "$".concat(formatNumber((referralData === null || referralData === void 0 ? void 0 : referralData.totalRevenue) || 0)),
4287
- trend: "\u25B2 ".concat((referralData === null || referralData === void 0 ? void 0 : referralData.growthPercentage) || 0, "% vs last month"),
4288
- chartData: (referralData === null || referralData === void 0 || (_referralData$chartDa = referralData.chartData) === null || _referralData$chartDa === void 0 ? void 0 : _referralData$chartDa.map(function (item) {
4289
- return {
4290
- label: item.date,
4291
- value: item.revenue
4292
- };
4293
- })) || [],
4294
- footerMetrics: [{
4295
- label: "Referrers",
4296
- value: formatNumber((referralData === null || referralData === void 0 ? void 0 : referralData.totalReferrers) || 0)
4297
- }, {
4298
- label: "Avg gift",
4299
- value: "$".concat(formatNumber((referralData === null || referralData === void 0 ? void 0 : referralData.averageGift) || 0))
4300
- }, {
4301
- label: "Conv. rate",
4302
- value: "".concat(formatNumber((referralData === null || referralData === void 0 ? void 0 : referralData.conversionRate) || 0), "%")
4303
- }],
4474
+ },
4475
+ children: [/*#__PURE__*/jsxs(Box, {
4304
4476
  sx: {
4305
- maxHeight: cardHeight(exportMode)
4477
+ display: "flex",
4478
+ justifyContent: "space-between",
4479
+ alignItems: "flex-start",
4480
+ mb: 1
4306
4481
  },
4307
- bottomSection: true
4482
+ children: [/*#__PURE__*/jsxs(Box, {
4483
+ children: [/*#__PURE__*/jsx(Typography, {
4484
+ sx: {
4485
+ fontWeight: 700,
4486
+ fontSize: 15,
4487
+ color: "#000",
4488
+ mb: 0.25
4489
+ },
4490
+ children: item.label
4491
+ }), /*#__PURE__*/jsx(Typography, {
4492
+ sx: {
4493
+ fontSize: 11,
4494
+ color: "rgba(0,0,0,0.4)",
4495
+ mb: 1
4496
+ },
4497
+ children: item.subtitle || "Last 30 days · daily aggregation"
4498
+ }), /*#__PURE__*/jsxs(Box, {
4499
+ sx: {
4500
+ display: "flex",
4501
+ alignItems: "center",
4502
+ gap: 1
4503
+ },
4504
+ children: [/*#__PURE__*/jsx(Typography, {
4505
+ sx: {
4506
+ fontWeight: 700,
4507
+ fontSize: 22,
4508
+ color: "#000"
4509
+ },
4510
+ children: item.value
4511
+ }), item.trend && /*#__PURE__*/jsxs(Box, {
4512
+ sx: {
4513
+ bgcolor: "#D1FAE5",
4514
+ color: "#047857",
4515
+ px: 1,
4516
+ py: 0.25,
4517
+ borderRadius: "100px",
4518
+ fontSize: 11,
4519
+ fontWeight: 600
4520
+ },
4521
+ children: ["\u25B2 ", item.trend]
4522
+ })]
4523
+ })]
4524
+ }), /*#__PURE__*/jsx(Box, {
4525
+ sx: {
4526
+ display: "flex",
4527
+ gap: 1.5,
4528
+ flexShrink: 0
4529
+ },
4530
+ children: LEGEND.map(function (leg) {
4531
+ return /*#__PURE__*/jsxs(Box, {
4532
+ sx: {
4533
+ display: "flex",
4534
+ alignItems: "center",
4535
+ gap: 0.5
4536
+ },
4537
+ children: [/*#__PURE__*/jsx(Box, {
4538
+ sx: {
4539
+ width: 8,
4540
+ height: 8,
4541
+ borderRadius: "50%",
4542
+ bgcolor: leg.color
4543
+ }
4544
+ }), /*#__PURE__*/jsx(Typography, {
4545
+ sx: {
4546
+ fontSize: 10,
4547
+ color: "rgba(0,0,0,0.55)"
4548
+ },
4549
+ children: leg.label
4550
+ })]
4551
+ }, leg.label);
4552
+ })
4553
+ })]
4554
+ }), /*#__PURE__*/jsx(ReportLineChart, {
4555
+ series: item.series || [],
4556
+ categories: item.categories || [],
4557
+ width: chartWidth,
4558
+ height: 185
4308
4559
  })]
4309
- })]
4560
+ })
4310
4561
  });
4311
4562
  };
4312
4563
 
4564
+ var EXPORT_CHART_W = 730;
4313
4565
  var ReportBody = function ReportBody(_ref) {
4314
4566
  var _ref$apiData = _ref.apiData,
4315
4567
  apiData = _ref$apiData === void 0 ? {} : _ref$apiData,
@@ -4325,15 +4577,18 @@ var ReportBody = function ReportBody(_ref) {
4325
4577
  var activeFilterChips = useMemo(function () {
4326
4578
  return getActiveFilterChips(apiData);
4327
4579
  }, [apiData]);
4328
- var chartBlock = /*#__PURE__*/jsx(Grid, {
4580
+ var chartBlock = exportMode ? /*#__PURE__*/jsx(ReportExportChartCard, {
4581
+ item: reportData.mainChart,
4582
+ chartWidth: EXPORT_CHART_W
4583
+ }) : /*#__PURE__*/jsx(Grid, {
4329
4584
  container: true,
4330
- spacing: exportMode ? 1 : 2,
4585
+ spacing: 2,
4331
4586
  sx: {
4332
4587
  mb: 0
4333
4588
  },
4334
4589
  children: /*#__PURE__*/jsx(RenderChartCard, {
4335
4590
  item: _objectSpread2(_objectSpread2({}, reportData.mainChart), {}, {
4336
- height: exportMode ? 210 : 320
4591
+ height: 320
4337
4592
  }),
4338
4593
  index: 0,
4339
4594
  md: 12,
@@ -4346,8 +4601,8 @@ var ReportBody = function ReportBody(_ref) {
4346
4601
  if (variant === "page1") {
4347
4602
  return /*#__PURE__*/jsxs(Box, {
4348
4603
  sx: {
4349
- px: exportMode ? 2.5 : 0,
4350
- py: exportMode ? 2 : 0
4604
+ px: exportMode ? 2 : 0,
4605
+ py: exportMode ? 1.5 : 0
4351
4606
  },
4352
4607
  children: [/*#__PURE__*/jsx(ReportHeader, {
4353
4608
  dateName: dateName,
@@ -4363,13 +4618,28 @@ var ReportBody = function ReportBody(_ref) {
4363
4618
  if (variant === "page2") {
4364
4619
  return /*#__PURE__*/jsx(Box, {
4365
4620
  sx: {
4366
- px: exportMode ? 2.5 : 0,
4367
- py: exportMode ? 2 : 0
4621
+ px: exportMode ? 2 : 0,
4622
+ py: exportMode ? 1.5 : 0
4368
4623
  },
4369
4624
  children: /*#__PURE__*/jsx(ReportDetailsSection, {
4370
4625
  reportData: reportData,
4371
4626
  dateName: dateName,
4372
- exportMode: exportMode
4627
+ exportMode: exportMode,
4628
+ section: "top"
4629
+ })
4630
+ });
4631
+ }
4632
+ if (variant === "page3") {
4633
+ return /*#__PURE__*/jsx(Box, {
4634
+ sx: {
4635
+ px: exportMode ? 2 : 0,
4636
+ py: exportMode ? 1.5 : 0
4637
+ },
4638
+ children: /*#__PURE__*/jsx(ReportDetailsSection, {
4639
+ reportData: reportData,
4640
+ dateName: dateName,
4641
+ exportMode: exportMode,
4642
+ section: "bottom"
4373
4643
  })
4374
4644
  });
4375
4645
  }
@@ -4382,7 +4652,8 @@ var ReportBody = function ReportBody(_ref) {
4382
4652
  metrics: reportData.metrics
4383
4653
  }), chartBlock, /*#__PURE__*/jsx(ReportDetailsSection, {
4384
4654
  reportData: reportData,
4385
- dateName: dateName
4655
+ dateName: dateName,
4656
+ section: "all"
4386
4657
  })]
4387
4658
  });
4388
4659
  };
@@ -4430,6 +4701,12 @@ var ReportExportLayout = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4430
4701
  children: /*#__PURE__*/jsx(ReportBody, _objectSpread2(_objectSpread2({}, bodyProps), {}, {
4431
4702
  variant: "page2"
4432
4703
  }))
4704
+ }), /*#__PURE__*/jsx("div", {
4705
+ "data-export-page": "3",
4706
+ style: pageStyle,
4707
+ children: /*#__PURE__*/jsx(ReportBody, _objectSpread2(_objectSpread2({}, bodyProps), {}, {
4708
+ variant: "page3"
4709
+ }))
4433
4710
  })]
4434
4711
  })
4435
4712
  });
@@ -4581,7 +4858,7 @@ var NewOverview = function NewOverview(_ref) {
4581
4858
  case 1:
4582
4859
  _context.n = 2;
4583
4860
  return new Promise(function (r) {
4584
- return setTimeout(r, 1200);
4861
+ return setTimeout(r, 600);
4585
4862
  });
4586
4863
  case 2:
4587
4864
  container = exportLayoutRef.current;
@@ -4819,9 +5096,9 @@ var NewOverview = function NewOverview(_ref) {
4819
5096
  position: "fixed",
4820
5097
  top: 0,
4821
5098
  left: 0,
5099
+ transform: "translateX(-10000px)",
4822
5100
  zIndex: -1,
4823
5101
  pointerEvents: "none",
4824
- opacity: 0.01,
4825
5102
  overflow: "hidden"
4826
5103
  },
4827
5104
  children: /*#__PURE__*/jsx(ReportExportLayout, {