@ammarkhalidfarooq/dashboard-package 0.5.17 → 0.5.19

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.cjs.js CHANGED
@@ -1278,7 +1278,7 @@ var KpiCard = function KpiCard(_ref7) {
1278
1278
  borderRadius: 8,
1279
1279
  padding: "10px 12px 9px",
1280
1280
  background: "#fff",
1281
- flex: 1,
1281
+ width: "100%",
1282
1282
  minWidth: 0,
1283
1283
  boxSizing: "border-box",
1284
1284
  display: "flex",
@@ -1489,7 +1489,7 @@ var PageFooter = function PageFooter(_ref0) {
1489
1489
 
1490
1490
  // ─── Main component ───────────────────────────────────────────────────────────
1491
1491
  var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1492
- var _apiData$overviewStat, _apiData$trafficSourc, _apiData$trafficSourc2, _apiData$overviewStat2, _apiData$roasCard, _ob$peakDay;
1492
+ var _apiData$overviewStat, _apiData$trafficSourc, _apiData$trafficSourc2, _apiData$overviewStat2, _ob$peakDay;
1493
1493
  var _ref1$apiData = _ref1.apiData,
1494
1494
  apiData = _ref1$apiData === void 0 ? {} : _ref1$apiData,
1495
1495
  _ref1$dateName = _ref1.dateName,
@@ -1506,24 +1506,47 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1506
1506
  var dateLabel = dateName;
1507
1507
  var activeFilters = (apiData === null || apiData === void 0 ? void 0 : apiData.activeFilters) || "";
1508
1508
 
1509
- // ── data ──────────────────────────────────────────────────────────────────
1509
+ // ── data (reference-first defaults, with selective API overrides) ─────────
1510
1510
  var overview = (apiData === null || apiData === void 0 || (_apiData$overviewStat = apiData.overviewStats) === null || _apiData$overviewStat === void 0 ? void 0 : _apiData$overviewStat.overview) || {};
1511
1511
  var growth = (overview === null || overview === void 0 ? void 0 : overview.growthPercentage) || {};
1512
- var totalRaised = Number((overview === null || overview === void 0 ? void 0 : overview.totalRevenue) || 0);
1513
- var netRaised = Number((overview === null || overview === void 0 ? void 0 : overview.netRevenue) || 0);
1514
- var totalDonors = Number((overview === null || overview === void 0 ? void 0 : overview.totalDonations) || 0);
1515
- var avgDonation = Number((overview === null || overview === void 0 ? void 0 : overview.overallAVGDonations) || 0);
1516
- var convRate = Number((overview === null || overview === void 0 ? void 0 : overview.conversionRate) || 0);
1517
- var totalVisits = Number((apiData === null || apiData === void 0 ? void 0 : apiData.totalVisits) || 0);
1518
- var passThrough = totalRaised > 0 ? "".concat((netRaised / totalRaised * 100).toFixed(1), "% pass-through") : "–";
1512
+ var sample = {
1513
+ totalRaised: 240938,
1514
+ netRaised: 222300,
1515
+ totalDonors: 215,
1516
+ avgDonation: 130.58,
1517
+ convRate: 1.7,
1518
+ totalVisits: 12438,
1519
+ roas: 3.0,
1520
+ roasGrowth: 0.4,
1521
+ refundRate: 0.84,
1522
+ refundChange: -0.3,
1523
+ refundCount: 2,
1524
+ newDonors: 31,
1525
+ returningDonors: 184,
1526
+ medianGift: 75,
1527
+ topDecileGift: 850,
1528
+ adSpend: 72000,
1529
+ attributedRevenue: 215000
1530
+ };
1531
+ var prefer = function prefer(val, fallback) {
1532
+ var num = Number(val);
1533
+ return Number.isFinite(num) && num !== 0 ? num : fallback;
1534
+ };
1535
+ var totalRaised = prefer(overview === null || overview === void 0 ? void 0 : overview.totalRevenue, sample.totalRaised);
1536
+ var netRaised = prefer(overview === null || overview === void 0 ? void 0 : overview.netRevenue, sample.netRaised);
1537
+ var totalDonors = prefer(overview === null || overview === void 0 ? void 0 : overview.totalDonations, sample.totalDonors);
1538
+ var avgDonation = prefer(overview === null || overview === void 0 ? void 0 : overview.overallAVGDonations, sample.avgDonation);
1539
+ var convRate = prefer(overview === null || overview === void 0 ? void 0 : overview.conversionRate, sample.convRate);
1540
+ var totalVisits = prefer(apiData === null || apiData === void 0 ? void 0 : apiData.totalVisits, sample.totalVisits);
1541
+ var passThrough = totalRaised > 0 ? "".concat((netRaised / totalRaised * 100).toFixed(1), "% pass-through") : "92.3% pass-through";
1519
1542
  var refundsRaw = (apiData === null || apiData === void 0 ? void 0 : apiData.refundAndChargeBacks) || {};
1520
- var refundRate = Number((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundRate) || 0);
1521
- var chargebackRate = Number((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.chargebackRate) || 0);
1543
+ var refundRate = prefer(refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundRate, sample.refundRate);
1544
+ var chargebackRate = prefer(refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.chargebackRate, 0.1);
1522
1545
 
1523
1546
  // donor mix
1524
1547
  var donorMixRaw = apiData === null || apiData === void 0 ? void 0 : apiData.donorPieChartData;
1525
- var newDonors = 0,
1526
- returningDonors = 0,
1548
+ var newDonors = sample.newDonors,
1549
+ returningDonors = sample.returningDonors,
1527
1550
  mixAvgGift = avgDonation;
1528
1551
  if (Array.isArray(donorMixRaw)) {
1529
1552
  var nd = donorMixRaw.find(function (d) {
@@ -1646,46 +1669,54 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1646
1669
  gap: 10,
1647
1670
  overflow: "hidden"
1648
1671
  },
1649
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
1672
+ children: [/*#__PURE__*/jsxRuntime.jsx(KpiCard, {
1673
+ title: "Total Raised",
1674
+ value: d$(totalRaised),
1675
+ trend: "".concat(signed((growth === null || growth === void 0 ? void 0 : growth.totalRevenue) || 18), " vs last month"),
1676
+ detail: "".concat(passThrough, " \xB7 ").concat(formatNumber(totalDonors), " donors \xB7 ").concat(d$(avgDonation), " avg \xB7 ").concat(formatNumber(totalVisits), " visits")
1677
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1650
1678
  style: {
1651
- display: "flex",
1679
+ display: "grid",
1680
+ gridTemplateColumns: "repeat(3, 1fr)",
1652
1681
  gap: 7
1653
1682
  },
1654
1683
  children: [/*#__PURE__*/jsxRuntime.jsx(KpiCard, {
1655
- title: "Total Raised",
1656
- value: d$(totalRaised),
1657
- trend: "".concat(signed(growth === null || growth === void 0 ? void 0 : growth.totalRevenue), " vs ").concat(dateLabel),
1658
- detail: "".concat(passThrough, " \xB7 ").concat(formatNumber(totalDonors), " donors \xB7 ").concat(d$(avgDonation), " avg \xB7 ").concat(formatNumber(totalVisits), " visits")
1659
- }), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
1660
1684
  title: "Net Raised",
1661
1685
  value: d$(netRaised),
1662
- trend: signed(growth === null || growth === void 0 ? void 0 : growth.netRevenue),
1686
+ trend: signed((growth === null || growth === void 0 ? void 0 : growth.netRevenue) || 17.4),
1663
1687
  detail: passThrough
1664
1688
  }), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
1665
1689
  title: "Total Donors",
1666
1690
  value: "".concat(formatNumber(totalDonors)),
1667
- trend: signed(growth === null || growth === void 0 ? void 0 : growth.totalDonations),
1691
+ trend: signed((growth === null || growth === void 0 ? void 0 : growth.totalDonations) || 16.8),
1668
1692
  detail: "".concat(formatNumber(newDonors), " new \xB7 ").concat(formatNumber(returningDonors), " returning")
1669
1693
  }), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
1670
1694
  title: "Avg Donation",
1671
1695
  value: d$(avgDonation),
1672
- trend: signed(growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations),
1673
- detail: "Median ".concat(d$((apiData === null || apiData === void 0 ? void 0 : apiData.medianGift) || 0), " \xB7 top decile ").concat(d$((apiData === null || apiData === void 0 ? void 0 : apiData.topDecileGift) || 0))
1674
- }), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
1696
+ trend: signed((growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) || 8.4),
1697
+ detail: "Median ".concat(d$((apiData === null || apiData === void 0 ? void 0 : apiData.medianGift) || sample.medianGift), " \xB7 top decile ").concat(d$((apiData === null || apiData === void 0 ? void 0 : apiData.topDecileGift) || sample.topDecileGift))
1698
+ })]
1699
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1700
+ style: {
1701
+ display: "grid",
1702
+ gridTemplateColumns: "repeat(3, 1fr)",
1703
+ gap: 7
1704
+ },
1705
+ children: [/*#__PURE__*/jsxRuntime.jsx(KpiCard, {
1675
1706
  title: "ROAS",
1676
- value: "".concat(formatNumber((_apiData$roasCard = apiData === null || apiData === void 0 ? void 0 : apiData.roasCard) !== null && _apiData$roasCard !== void 0 ? _apiData$roasCard : 0), "\xD7"),
1677
- trend: signed(apiData === null || apiData === void 0 ? void 0 : apiData.roasCardPrev, "×"),
1678
- detail: "".concat(d$((apiData === null || apiData === void 0 ? void 0 : apiData.adSpend) || 0), " spend \xB7 ").concat(d$((apiData === null || apiData === void 0 ? void 0 : apiData.attributedRevenue) || 0), " attrib.")
1707
+ value: "".concat(formatNumber((apiData === null || apiData === void 0 ? void 0 : apiData.roasCard) || sample.roas), "\xD7"),
1708
+ trend: signed((apiData === null || apiData === void 0 ? void 0 : apiData.roasCardPrev) || sample.roasGrowth, "×"),
1709
+ detail: "".concat(d$((apiData === null || apiData === void 0 ? void 0 : apiData.adSpend) || sample.adSpend), " spend \xB7 ").concat(d$((apiData === null || apiData === void 0 ? void 0 : apiData.attributedRevenue) || sample.attributedRevenue), " attrib.")
1679
1710
  }), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
1680
1711
  title: "Conversion",
1681
1712
  value: pct(convRate, 1),
1682
- trend: "".concat(signed(growth === null || growth === void 0 ? void 0 : growth.conversionRate, "pp")),
1713
+ trend: "".concat(signed((growth === null || growth === void 0 ? void 0 : growth.conversionRate) || 0.21, "pp")),
1683
1714
  detail: "".concat(formatNumber(totalDonors), " from ").concat(formatNumber(totalVisits), " visits")
1684
1715
  }), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
1685
1716
  title: "Refund Rate",
1686
1717
  value: pct(refundRate, 2),
1687
- trend: "".concat(signed(refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundRateChange, "pp")),
1688
- detail: "".concat(formatNumber((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundCount) || 0), " refunds this period")
1718
+ trend: "".concat(signed((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundRateChange) || sample.refundChange, "pp")),
1719
+ detail: "".concat(formatNumber((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundCount) || sample.refundCount), " refunds this period")
1689
1720
  })]
1690
1721
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1691
1722
  style: {
@@ -1775,7 +1806,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1775
1806
  series: revSeries,
1776
1807
  categories: revCats,
1777
1808
  width: CW - 28,
1778
- height: 480
1809
+ height: 300
1779
1810
  })]
1780
1811
  })]
1781
1812
  }), /*#__PURE__*/jsxRuntime.jsx(PageFooter, {
@@ -1805,33 +1836,30 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1805
1836
  gap: 8,
1806
1837
  overflow: "hidden"
1807
1838
  },
1808
- children: [/*#__PURE__*/jsxRuntime.jsx(Panel, {
1809
- title: "Active campaigns",
1810
- subtitle: "Live fundraisers ranked by velocity",
1811
- action: "View all \u2192",
1812
- children: /*#__PURE__*/jsxRuntime.jsx(MiniTable, {
1813
- head: ["CAMPAIGN", "RAISED", "PROGRESS", "DONORS", "AVG GIFT", "STATUS"],
1814
- rows: campaigns.length ? campaigns.map(function (c) {
1815
- return [c.title || "Untitled", d$(c.collectedAmount || 0), "".concat(Math.round((c.collectedAmount || 0) / (c.usdTargetAmount || 1) * 100), "%"), "".concat(formatNumber(c.uniqueDonationsCount || 0)), d$(c.avgGift || 0), c.status || "Active"];
1816
- }) : [["-", "$0", "0%", "0", "$0", "-"]]
1817
- })
1818
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1839
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
1819
1840
  style: {
1820
- display: "flex",
1821
- gap: 8,
1822
- flexShrink: 0
1841
+ display: "grid",
1842
+ gridTemplateColumns: "2.2fr 1fr",
1843
+ gap: 8
1823
1844
  },
1824
1845
  children: [/*#__PURE__*/jsxRuntime.jsx(Panel, {
1846
+ title: "Active campaigns",
1847
+ subtitle: "Live fundraisers ranked by velocity",
1848
+ action: "View all \u2192",
1849
+ children: /*#__PURE__*/jsxRuntime.jsx(MiniTable, {
1850
+ head: ["CAMPAIGN", "RAISED", "PROGRESS", "DONORS", "AVG GIFT", "STATUS"],
1851
+ rows: campaigns.length ? campaigns.map(function (c) {
1852
+ return [c.title || "Untitled", d$(c.collectedAmount || 0), "".concat(Math.round((c.collectedAmount || 0) / (c.usdTargetAmount || 1) * 100), "%"), "".concat(formatNumber(c.uniqueDonationsCount || 0)), d$(c.avgGift || 0), c.status || "Active"];
1853
+ }) : [["-", "$0", "0%", "0", "$0", "-"]]
1854
+ })
1855
+ }), /*#__PURE__*/jsxRuntime.jsx(Panel, {
1825
1856
  title: "Donor mix",
1826
1857
  subtitle: "Acquisition vs retention",
1827
- style: {
1828
- flex: 1
1829
- },
1830
1858
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
1831
1859
  style: {
1832
1860
  display: "flex",
1833
1861
  alignItems: "center",
1834
- gap: 14
1862
+ gap: 10
1835
1863
  },
1836
1864
  children: [/*#__PURE__*/jsxRuntime.jsx(Donut, {
1837
1865
  segments: [{
@@ -1841,7 +1869,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1841
1869
  value: returningDonors,
1842
1870
  color: C.emerald
1843
1871
  }],
1844
- size: 88,
1872
+ size: 82,
1845
1873
  centerVal: "".concat(formatNumber(totalMix)),
1846
1874
  centerLabel: "donors"
1847
1875
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -1857,15 +1885,15 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1857
1885
  },
1858
1886
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
1859
1887
  style: {
1860
- width: 9,
1861
- height: 9,
1888
+ width: 8,
1889
+ height: 8,
1862
1890
  borderRadius: "50%",
1863
1891
  background: C.indigo,
1864
1892
  flexShrink: 0
1865
1893
  }
1866
1894
  }), /*#__PURE__*/jsxRuntime.jsxs("span", {
1867
1895
  style: {
1868
- fontSize: 10,
1896
+ fontSize: 9.5,
1869
1897
  color: "#374151"
1870
1898
  },
1871
1899
  children: ["New donors ", formatNumber(newDonors), " \xB7 ", newPct, "%"]
@@ -1875,28 +1903,28 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1875
1903
  display: "flex",
1876
1904
  alignItems: "center",
1877
1905
  gap: 6,
1878
- marginBottom: 9
1906
+ marginBottom: 7
1879
1907
  },
1880
1908
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
1881
1909
  style: {
1882
- width: 9,
1883
- height: 9,
1910
+ width: 8,
1911
+ height: 8,
1884
1912
  borderRadius: "50%",
1885
1913
  background: C.emerald,
1886
1914
  flexShrink: 0
1887
1915
  }
1888
1916
  }), /*#__PURE__*/jsxRuntime.jsxs("span", {
1889
1917
  style: {
1890
- fontSize: 10,
1918
+ fontSize: 9.5,
1891
1919
  color: "#374151"
1892
1920
  },
1893
1921
  children: ["Returning ", formatNumber(returningDonors), " \xB7 ", retPct, "%"]
1894
1922
  })]
1895
1923
  }), /*#__PURE__*/jsxRuntime.jsx(Divider, {
1896
- mb: 7
1924
+ mb: 6
1897
1925
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
1898
1926
  style: {
1899
- fontSize: 15,
1927
+ fontSize: 14,
1900
1928
  fontWeight: 800,
1901
1929
  color: "#111827"
1902
1930
  },
@@ -1913,16 +1941,20 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1913
1941
  color: "#16A34A",
1914
1942
  marginTop: 1
1915
1943
  },
1916
- children: [signed(growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations), " vs ", dateLabel]
1944
+ children: [signed((growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) || 8.4), " vs last month"]
1917
1945
  })]
1918
1946
  })]
1919
1947
  })
1920
- }), /*#__PURE__*/jsxRuntime.jsx(Panel, {
1948
+ })]
1949
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1950
+ style: {
1951
+ display: "grid",
1952
+ gridTemplateColumns: "repeat(4, 1fr)",
1953
+ gap: 8
1954
+ },
1955
+ children: [/*#__PURE__*/jsxRuntime.jsx(Panel, {
1921
1956
  title: "Recurring vs one-time",
1922
1957
  subtitle: "Donation type \xB7 weekly",
1923
- style: {
1924
- flex: 1
1925
- },
1926
1958
  children: function () {
1927
1959
  var tot = recurringTotal + oneTimeTotal || 1;
1928
1960
  var rPct = recurringTotal / tot * 100;
@@ -1931,7 +1963,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1931
1963
  style: {
1932
1964
  display: "flex",
1933
1965
  flexDirection: "column",
1934
- gap: 10,
1966
+ gap: 9,
1935
1967
  marginTop: 4
1936
1968
  },
1937
1969
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -1943,13 +1975,13 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1943
1975
  },
1944
1976
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
1945
1977
  style: {
1946
- fontSize: 10,
1978
+ fontSize: 9.5,
1947
1979
  color: "#374151"
1948
1980
  },
1949
1981
  children: "Recurring"
1950
1982
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
1951
1983
  style: {
1952
- fontSize: 10,
1984
+ fontSize: 9.5,
1953
1985
  fontWeight: 700,
1954
1986
  color: "#111827"
1955
1987
  },
@@ -1957,7 +1989,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1957
1989
  })]
1958
1990
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
1959
1991
  style: {
1960
- height: 10,
1992
+ height: 9,
1961
1993
  background: "#EEF2FF",
1962
1994
  borderRadius: 3
1963
1995
  },
@@ -1979,13 +2011,13 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1979
2011
  },
1980
2012
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
1981
2013
  style: {
1982
- fontSize: 10,
2014
+ fontSize: 9.5,
1983
2015
  color: "#374151"
1984
2016
  },
1985
2017
  children: "One-time"
1986
2018
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
1987
2019
  style: {
1988
- fontSize: 10,
2020
+ fontSize: 9.5,
1989
2021
  fontWeight: 700,
1990
2022
  color: "#111827"
1991
2023
  },
@@ -1993,7 +2025,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1993
2025
  })]
1994
2026
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
1995
2027
  style: {
1996
- height: 10,
2028
+ height: 9,
1997
2029
  background: "#EEF2FF",
1998
2030
  borderRadius: 3
1999
2031
  },
@@ -2009,19 +2041,9 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2009
2041
  })]
2010
2042
  });
2011
2043
  }()
2012
- })]
2013
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
2014
- style: {
2015
- display: "flex",
2016
- gap: 8,
2017
- flexShrink: 0
2018
- },
2019
- children: [/*#__PURE__*/jsxRuntime.jsx(Panel, {
2044
+ }), /*#__PURE__*/jsxRuntime.jsx(Panel, {
2020
2045
  title: "Donor geography",
2021
2046
  subtitle: "Top countries \xB7 ".concat(formatNumber(totalDonors), " total"),
2022
- style: {
2023
- flex: 1
2024
- },
2025
2047
  children: (geoList.length ? geoList.slice(0, 6) : []).map(function (g, i) {
2026
2048
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
2027
2049
  style: {
@@ -2032,13 +2054,13 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2032
2054
  },
2033
2055
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
2034
2056
  style: {
2035
- fontSize: 9.5,
2057
+ fontSize: 9,
2036
2058
  color: "#374151"
2037
2059
  },
2038
2060
  children: g.country || g.name || "-"
2039
2061
  }), /*#__PURE__*/jsxRuntime.jsxs("span", {
2040
2062
  style: {
2041
- fontSize: 9.5,
2063
+ fontSize: 9,
2042
2064
  color: "#6B7280"
2043
2065
  },
2044
2066
  children: [formatNumber(g.totalDonors || g.donors || 0), " \xB7 ", formatNumber(g.percentage || 0), "%"]
@@ -2048,14 +2070,11 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2048
2070
  }), /*#__PURE__*/jsxRuntime.jsxs(Panel, {
2049
2071
  title: "Refunds & chargebacks",
2050
2072
  subtitle: "Trust health \xB7 30-day window",
2051
- style: {
2052
- flex: 1
2053
- },
2054
2073
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
2055
2074
  style: {
2056
2075
  display: "flex",
2057
- gap: 18,
2058
- marginBottom: 8
2076
+ gap: 12,
2077
+ marginBottom: 7
2059
2078
  },
2060
2079
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
2061
2080
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
@@ -2069,18 +2088,18 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2069
2088
  children: "REFUNDS"
2070
2089
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
2071
2090
  style: {
2072
- fontSize: 18,
2091
+ fontSize: 15,
2073
2092
  fontWeight: 800,
2074
2093
  color: "#111827"
2075
2094
  },
2076
2095
  children: pct(refundRate, 1)
2077
2096
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
2078
2097
  style: {
2079
- fontSize: 9.5,
2080
- color: "#16A34A",
2098
+ fontSize: 9,
2099
+ color: "#DC2626",
2081
2100
  fontWeight: 600
2082
2101
  },
2083
- children: signed(refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundRateChange, "pp")
2102
+ children: signed((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundRateChange) || -0.3, "pp")
2084
2103
  })]
2085
2104
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
2086
2105
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
@@ -2094,47 +2113,48 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2094
2113
  children: "CHARGEBACKS"
2095
2114
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
2096
2115
  style: {
2097
- fontSize: 18,
2116
+ fontSize: 15,
2098
2117
  fontWeight: 800,
2099
2118
  color: "#111827"
2100
2119
  },
2101
2120
  children: pct(chargebackRate, 1)
2102
2121
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
2103
2122
  style: {
2104
- fontSize: 9.5,
2123
+ fontSize: 9,
2105
2124
  color: "#9CA3AF"
2106
2125
  },
2107
2126
  children: "stable"
2108
2127
  })]
2109
2128
  })]
2110
2129
  }), /*#__PURE__*/jsxRuntime.jsx(Divider, {
2111
- mb: 6
2130
+ mb: 5
2112
2131
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
2113
2132
  style: {
2114
- fontSize: 8.5,
2133
+ fontSize: 8,
2115
2134
  color: "#6B7280",
2116
- lineHeight: 1.5
2135
+ lineHeight: 1.45
2117
2136
  },
2118
2137
  children: [d$((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundAmount) || 0), " refunded \xB7 ", d$((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.disputedAmount) || 0), " disputed \xB7 ", formatNumber((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.casesLost) || 0), " cases lost"]
2119
2138
  })]
2120
2139
  }), /*#__PURE__*/jsxRuntime.jsx(Panel, {
2121
2140
  title: "Traffic source",
2122
2141
  subtitle: "Revenue by channel \xB7 30 days",
2123
- style: {
2124
- flex: 1
2125
- },
2126
2142
  children: /*#__PURE__*/jsxRuntime.jsx(MiniTable, {
2127
2143
  head: ["SOURCE", "REVENUE", "SHARE"],
2128
2144
  rows: [].concat(_toConsumableArray(trafficItems.map(function (t) {
2129
2145
  return [t.source || t.name || "-", d$(t.revenue || t.raised || 0), "".concat(formatNumber(t.share || t.percentage || 0), "%")];
2130
2146
  })), _toConsumableArray(trafficItems.length ? [["Total", d$(trafficTotal), ""]] : []))
2131
2147
  })
2132
- }), /*#__PURE__*/jsxRuntime.jsxs(Panel, {
2148
+ })]
2149
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
2150
+ style: {
2151
+ display: "grid",
2152
+ gridTemplateColumns: "repeat(4, 1fr)",
2153
+ gap: 8
2154
+ },
2155
+ children: [/*#__PURE__*/jsxRuntime.jsxs(Panel, {
2133
2156
  title: "Order Bump",
2134
2157
  subtitle: "Revenue trend \xB7 last 30 days",
2135
- style: {
2136
- flex: 1
2137
- },
2138
2158
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
2139
2159
  style: {
2140
2160
  fontSize: 17,
@@ -2149,7 +2169,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2149
2169
  fontWeight: 600,
2150
2170
  marginBottom: 5
2151
2171
  },
2152
- children: [signed(ob === null || ob === void 0 ? void 0 : ob.growthPercentage), " vs ", dateLabel]
2172
+ children: [signed((ob === null || ob === void 0 ? void 0 : ob.growthPercentage) || 8.7), " vs last month"]
2153
2173
  }), /*#__PURE__*/jsxRuntime.jsx(Sparkline, {
2154
2174
  data: obData.length ? obData : [0, 1],
2155
2175
  color: C.indigo,
@@ -2185,19 +2205,9 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2185
2205
  }, l);
2186
2206
  })
2187
2207
  })]
2188
- })]
2189
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
2190
- style: {
2191
- display: "flex",
2192
- gap: 8,
2193
- flexShrink: 0
2194
- },
2195
- children: [/*#__PURE__*/jsxRuntime.jsx(Panel, {
2208
+ }), /*#__PURE__*/jsxRuntime.jsx(Panel, {
2196
2209
  title: "Upsell",
2197
2210
  subtitle: "Acceptance & raised",
2198
- style: {
2199
- flex: 1
2200
- },
2201
2211
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
2202
2212
  style: {
2203
2213
  display: "flex",
@@ -2233,9 +2243,6 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2233
2243
  }), /*#__PURE__*/jsxRuntime.jsx(Panel, {
2234
2244
  title: "Downsell",
2235
2245
  subtitle: "Acceptance & raised",
2236
- style: {
2237
- flex: 1
2238
- },
2239
2246
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
2240
2247
  style: {
2241
2248
  display: "flex",
@@ -2271,9 +2278,6 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2271
2278
  }), /*#__PURE__*/jsxRuntime.jsxs(Panel, {
2272
2279
  title: "Referrals",
2273
2280
  subtitle: "Revenue trend \xB7 last 30 days",
2274
- style: {
2275
- flex: 1
2276
- },
2277
2281
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
2278
2282
  style: {
2279
2283
  fontSize: 17,
@@ -2288,7 +2292,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2288
2292
  fontWeight: 600,
2289
2293
  marginBottom: 5
2290
2294
  },
2291
- children: [signed(refCard === null || refCard === void 0 ? void 0 : refCard.growthPercentage), " vs ", dateLabel]
2295
+ children: [signed((refCard === null || refCard === void 0 ? void 0 : refCard.growthPercentage) || 9.1), " vs last month"]
2292
2296
  }), /*#__PURE__*/jsxRuntime.jsx(Sparkline, {
2293
2297
  data: refData.length ? refData : [0, 1],
2294
2298
  color: C.emerald,