@ammarkhalidfarooq/dashboard-package 0.6.59 → 0.6.60

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
@@ -1356,6 +1356,59 @@ var trendPillSx = function trendPillSx(value) {
1356
1356
  whiteSpace: "nowrap"
1357
1357
  };
1358
1358
  };
1359
+
1360
+ /** Mirrors DonationTypeBarChart summary totals from recurringBarChartData. */
1361
+ var parseDonationTypeTotals = function parseDonationTypeTotals(donationTypeData) {
1362
+ var _dataObj$summary$recu, _dataObj$summary, _dataObj$summary$oneT, _dataObj$summary2;
1363
+ if (donationTypeData !== null && donationTypeData !== void 0 && donationTypeData.data && Array.isArray(donationTypeData.data)) {
1364
+ var _donationTypeData$tot, _donationTypeData$tot2;
1365
+ return {
1366
+ recurringTotal: Number((_donationTypeData$tot = donationTypeData.totalRecurringDonations) !== null && _donationTypeData$tot !== void 0 ? _donationTypeData$tot : 0),
1367
+ oneTimeTotal: Number((_donationTypeData$tot2 = donationTypeData.totalOneTimeDonations) !== null && _donationTypeData$tot2 !== void 0 ? _donationTypeData$tot2 : 0)
1368
+ };
1369
+ }
1370
+ if (Array.isArray(donationTypeData) && donationTypeData.length > 0 && donationTypeData[0].totalAmount !== undefined) {
1371
+ var _recurring$totalAmoun, _oneTime$totalAmount;
1372
+ var recurring = donationTypeData.find(function (item) {
1373
+ return /recurring/i.test(item.type || "");
1374
+ }) || {};
1375
+ var oneTime = donationTypeData.find(function (item) {
1376
+ return /one.?time/i.test(item.type || "");
1377
+ }) || {};
1378
+ return {
1379
+ recurringTotal: Number((_recurring$totalAmoun = recurring.totalAmount) !== null && _recurring$totalAmoun !== void 0 ? _recurring$totalAmoun : 0),
1380
+ oneTimeTotal: Number((_oneTime$totalAmount = oneTime.totalAmount) !== null && _oneTime$totalAmount !== void 0 ? _oneTime$totalAmount : 0)
1381
+ };
1382
+ }
1383
+ if (Array.isArray(donationTypeData) && donationTypeData.length > 0 && (donationTypeData[0].recurring !== undefined || donationTypeData[0].oneTime !== undefined || donationTypeData[0].recurringAmount !== undefined || donationTypeData[0].oneTimeAmount !== undefined)) {
1384
+ return {
1385
+ recurringTotal: donationTypeData.reduce(function (sum, item) {
1386
+ return sum + Number(item.recurring || item.recurringAmount || 0);
1387
+ }, 0),
1388
+ oneTimeTotal: donationTypeData.reduce(function (sum, item) {
1389
+ return sum + Number(item.oneTime || item.oneTimeAmount || 0);
1390
+ }, 0)
1391
+ };
1392
+ }
1393
+ var dataObj = donationTypeData && _typeof(donationTypeData) === "object" ? donationTypeData : {};
1394
+ return {
1395
+ recurringTotal: Number((_dataObj$summary$recu = 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.total) !== null && _dataObj$summary$recu !== void 0 ? _dataObj$summary$recu : 0),
1396
+ oneTimeTotal: Number((_dataObj$summary$oneT = dataObj === null || dataObj === void 0 || (_dataObj$summary2 = dataObj.summary) === null || _dataObj$summary2 === void 0 || (_dataObj$summary2 = _dataObj$summary2.oneTime) === null || _dataObj$summary2 === void 0 ? void 0 : _dataObj$summary2.total) !== null && _dataObj$summary$oneT !== void 0 ? _dataObj$summary$oneT : 0)
1397
+ };
1398
+ };
1399
+
1400
+ /** Mirrors PaidDonorGeographyCard row mapping from donorGeography. */
1401
+ var parseDonorGeographyList = function parseDonorGeographyList(donorGeographyData) {
1402
+ var rawCountries = Array.isArray(donorGeographyData) ? donorGeographyData : (donorGeographyData === null || donorGeographyData === void 0 ? void 0 : donorGeographyData.countries) || (donorGeographyData === null || donorGeographyData === void 0 ? void 0 : donorGeographyData.data) || [];
1403
+ return rawCountries.map(function (item) {
1404
+ var _item$percentage, _ref, _ref2, _item$value;
1405
+ return {
1406
+ country: item.countryName || item.country || item.name || "Unknown",
1407
+ percentage: typeof item.percentage === "number" ? item.percentage : Number((_item$percentage = item.percentage) !== null && _item$percentage !== void 0 ? _item$percentage : 0),
1408
+ value: item.donations !== undefined ? item.donations : (_ref = (_ref2 = (_item$value = item.value) !== null && _item$value !== void 0 ? _item$value : item.totalDonors) !== null && _ref2 !== void 0 ? _ref2 : item.donors) !== null && _ref !== void 0 ? _ref : 0
1409
+ };
1410
+ });
1411
+ };
1359
1412
  var getActiveFilterChips = function getActiveFilterChips(apiData) {
1360
1413
  if (Array.isArray(apiData === null || apiData === void 0 ? void 0 : apiData.activeFilterChips) && apiData.activeFilterChips.length) {
1361
1414
  return apiData.activeFilterChips;
@@ -1567,7 +1620,9 @@ var buildReportData = function buildReportData() {
1567
1620
  },
1568
1621
  activeCampaigns: activeCampaigns,
1569
1622
  donationTypeData: (apiData === null || apiData === void 0 ? void 0 : apiData.recurringBarChartData) || [],
1623
+ donationTypeTotals: parseDonationTypeTotals(apiData === null || apiData === void 0 ? void 0 : apiData.recurringBarChartData),
1570
1624
  donorGeographyData: (apiData === null || apiData === void 0 ? void 0 : apiData.donorGeography) || [],
1625
+ donorGeographyList: parseDonorGeographyList(apiData === null || apiData === void 0 ? void 0 : apiData.donorGeography),
1571
1626
  trafficSourceData: (apiData === null || apiData === void 0 ? void 0 : apiData.trafficSourceData) || [],
1572
1627
  orderBumpData: (apiData === null || apiData === void 0 ? void 0 : apiData.orderBumpDetails) || [],
1573
1628
  upsellData: (apiData === null || apiData === void 0 ? void 0 : apiData.upSellDetails) || {},
@@ -1971,7 +2026,9 @@ var MiniTable = function MiniTable(_ref8) {
1971
2026
  var _ref8$head = _ref8.head,
1972
2027
  head = _ref8$head === void 0 ? [] : _ref8$head,
1973
2028
  _ref8$rows = _ref8.rows,
1974
- rows = _ref8$rows === void 0 ? [] : _ref8$rows;
2029
+ rows = _ref8$rows === void 0 ? [] : _ref8$rows,
2030
+ _ref8$colAlign = _ref8.colAlign,
2031
+ colAlign = _ref8$colAlign === void 0 ? [] : _ref8$colAlign;
1975
2032
  return /*#__PURE__*/jsxs("table", {
1976
2033
  style: {
1977
2034
  width: "100%",
@@ -1989,7 +2046,7 @@ var MiniTable = function MiniTable(_ref8) {
1989
2046
  return /*#__PURE__*/jsx("th", {
1990
2047
  style: {
1991
2048
  padding: "4px 6px",
1992
- textAlign: i === 0 ? "left" : "right",
2049
+ textAlign: colAlign[i] || (i === 0 ? "left" : "right"),
1993
2050
  fontWeight: 700,
1994
2051
  fontSize: 8.5,
1995
2052
  letterSpacing: "0.3px",
@@ -2010,9 +2067,10 @@ var MiniTable = function MiniTable(_ref8) {
2010
2067
  return /*#__PURE__*/jsx("td", {
2011
2068
  style: {
2012
2069
  padding: "4px 6px",
2013
- textAlign: ci === 0 ? "left" : "right",
2070
+ textAlign: colAlign[ci] || (ci === 0 ? "left" : "right"),
2014
2071
  color: "#334155",
2015
- borderBottom: ri < rows.length - 1 ? "1px solid #EEF2F7" : "none"
2072
+ borderBottom: ri < rows.length - 1 ? "1px solid #EEF2F7" : "none",
2073
+ verticalAlign: "middle"
2016
2074
  },
2017
2075
  children: cell
2018
2076
  }, ci);
@@ -2022,15 +2080,62 @@ var MiniTable = function MiniTable(_ref8) {
2022
2080
  })]
2023
2081
  });
2024
2082
  };
2025
- var KpiCard = function KpiCard(_ref9) {
2026
- var title = _ref9.title,
2027
- value = _ref9.value,
2028
- trend = _ref9.trend,
2029
- detail = _ref9.detail,
2030
- _ref9$variant = _ref9.variant,
2031
- variant = _ref9$variant === void 0 ? "secondary" : _ref9$variant,
2032
- _ref9$trendPositiveWh = _ref9.trendPositiveWhenNegative,
2033
- trendPositiveWhenNegative = _ref9$trendPositiveWh === void 0 ? false : _ref9$trendPositiveWh;
2083
+ var ProgressBar = function ProgressBar(_ref9) {
2084
+ var value = _ref9.value,
2085
+ _ref9$color = _ref9.color,
2086
+ color = _ref9$color === void 0 ? "rgb(99, 99, 230)" : _ref9$color,
2087
+ _ref9$height = _ref9.height,
2088
+ height = _ref9$height === void 0 ? 6 : _ref9$height;
2089
+ var pct = Math.min(100, Math.max(0, Number(value !== null && value !== void 0 ? value : 0)));
2090
+ return /*#__PURE__*/jsxs("div", {
2091
+ style: {
2092
+ display: "flex",
2093
+ alignItems: "center",
2094
+ gap: 6,
2095
+ width: "100%"
2096
+ },
2097
+ children: [/*#__PURE__*/jsx("div", {
2098
+ style: {
2099
+ flex: 1,
2100
+ minWidth: 0
2101
+ },
2102
+ children: /*#__PURE__*/jsx("div", {
2103
+ style: {
2104
+ height: height,
2105
+ background: "#F3F4F6",
2106
+ borderRadius: 4,
2107
+ overflow: "hidden"
2108
+ },
2109
+ children: /*#__PURE__*/jsx("div", {
2110
+ style: {
2111
+ width: "".concat(pct, "%"),
2112
+ height: "100%",
2113
+ background: color,
2114
+ borderRadius: 4
2115
+ }
2116
+ })
2117
+ })
2118
+ }), /*#__PURE__*/jsxs("span", {
2119
+ style: {
2120
+ fontSize: 9,
2121
+ color: "rgba(0, 0, 0, 0.4)",
2122
+ minWidth: 26,
2123
+ flexShrink: 0,
2124
+ textAlign: "right"
2125
+ },
2126
+ children: [pct, "%"]
2127
+ })]
2128
+ });
2129
+ };
2130
+ var KpiCard = function KpiCard(_ref0) {
2131
+ var title = _ref0.title,
2132
+ value = _ref0.value,
2133
+ trend = _ref0.trend,
2134
+ detail = _ref0.detail,
2135
+ _ref0$variant = _ref0.variant,
2136
+ variant = _ref0$variant === void 0 ? "secondary" : _ref0$variant,
2137
+ _ref0$trendPositiveWh = _ref0.trendPositiveWhenNegative,
2138
+ trendPositiveWhenNegative = _ref0$trendPositiveWh === void 0 ? false : _ref0$trendPositiveWh;
2034
2139
  var displayTrend = withTrendArrow(trend);
2035
2140
  var isPrimary = variant === "primary";
2036
2141
  return /*#__PURE__*/jsxs("div", {
@@ -2081,10 +2186,10 @@ var KpiCard = function KpiCard(_ref9) {
2081
2186
  })]
2082
2187
  });
2083
2188
  };
2084
- var StatPair = function StatPair(_ref0) {
2085
- var label = _ref0.label,
2086
- val = _ref0.val,
2087
- trend = _ref0.trend;
2189
+ var StatPair = function StatPair(_ref1) {
2190
+ var label = _ref1.label,
2191
+ val = _ref1.val,
2192
+ trend = _ref1.trend;
2088
2193
  var displayTrend = withTrendArrow(trend);
2089
2194
  return /*#__PURE__*/jsxs("div", {
2090
2195
  style: {
@@ -2121,12 +2226,12 @@ var StatPair = function StatPair(_ref0) {
2121
2226
  })]
2122
2227
  });
2123
2228
  };
2124
- var PageHeader = function PageHeader(_ref1) {
2125
- var dateLabel = _ref1.dateLabel,
2126
- generatedLabel = _ref1.generatedLabel,
2127
- activeFilters = _ref1.activeFilters,
2128
- page = _ref1.page,
2129
- windowLabel = _ref1.windowLabel;
2229
+ var PageHeader = function PageHeader(_ref10) {
2230
+ var dateLabel = _ref10.dateLabel,
2231
+ generatedLabel = _ref10.generatedLabel,
2232
+ activeFilters = _ref10.activeFilters,
2233
+ page = _ref10.page,
2234
+ windowLabel = _ref10.windowLabel;
2130
2235
  return /*#__PURE__*/jsxs("div", {
2131
2236
  style: {
2132
2237
  padding: "22px ".concat(MX, "px 12px"),
@@ -2232,9 +2337,9 @@ var PageHeader = function PageHeader(_ref1) {
2232
2337
  })]
2233
2338
  });
2234
2339
  };
2235
- var PageFooter = function PageFooter(_ref10) {
2236
- var generatedLabel = _ref10.generatedLabel,
2237
- page = _ref10.page;
2340
+ var PageFooter = function PageFooter(_ref11) {
2341
+ var generatedLabel = _ref11.generatedLabel,
2342
+ page = _ref11.page;
2238
2343
  return /*#__PURE__*/jsx("div", {
2239
2344
  style: {
2240
2345
  padding: "7px ".concat(MX, "px"),
@@ -2254,16 +2359,16 @@ var PageFooter = function PageFooter(_ref10) {
2254
2359
  };
2255
2360
 
2256
2361
  // ─── Main component ───────────────────────────────────────────────────────────
2257
- var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
2258
- var _apiData$overviewStat, _overview$totalRevenu, _overview$netRevenue, _overview$overallAVGD, _overview$conversionR, _apiData$totalVisits, _refundsRaw$refundRat, _refundsRaw$chargebac, _apiData$trafficSourc2, _metricByTitle$NetRa, _metricByTitle$Total, _metricByTitle$Total2, _metricByTitle$Total3, _metricByTitle$AvgDo, _metricByTitle$AvgDo2, _apiData$medianGift, _apiData$topDecileGif, _apiData$roasCard, _metricByTitle$ROAS, _apiData$roasCardPrev, _metricByTitle$ROAS2, _apiData$adSpend, _apiData$attributedRe, _metricByTitle$Conver, _metricByTitle$Conver2, _metricByTitle$Refund, _metricByTitle$Refund2, _refundsRaw$refundCou, _metricByTitle$Refund3, _ref14, _refundsRaw$refundRat2, _ob$growthPercentage, _ob$peakDay, _refCard$growthPercen;
2259
- var _ref11$apiData = _ref11.apiData,
2260
- apiData = _ref11$apiData === void 0 ? {} : _ref11$apiData,
2261
- _ref11$dateName = _ref11.dateName,
2262
- dateName = _ref11$dateName === void 0 ? "Last Period" : _ref11$dateName,
2263
- _ref11$numberOfDays = _ref11.numberOfDays,
2264
- numberOfDays = _ref11$numberOfDays === void 0 ? 30 : _ref11$numberOfDays,
2265
- _ref11$activeFilters = _ref11.activeFilters,
2266
- activeFilters = _ref11$activeFilters === void 0 ? [] : _ref11$activeFilters;
2362
+ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref12, ref) {
2363
+ var _apiData$overviewStat, _overview$totalRevenu, _overview$netRevenue, _overview$overallAVGD, _overview$conversionR, _apiData$totalVisits, _refundsRaw$refundRat, _refundsRaw$chargebac, _apiData$trafficSourc2, _metricByTitle$NetRa, _metricByTitle$Total, _metricByTitle$Total2, _metricByTitle$Total3, _metricByTitle$AvgDo, _metricByTitle$AvgDo2, _apiData$medianGift, _apiData$topDecileGif, _apiData$roasCard, _metricByTitle$ROAS, _apiData$roasCardPrev, _metricByTitle$ROAS2, _apiData$adSpend, _apiData$attributedRe, _metricByTitle$Conver, _metricByTitle$Conver2, _metricByTitle$Refund, _metricByTitle$Refund2, _refundsRaw$refundCou, _metricByTitle$Refund3, _ref15, _refundsRaw$refundRat2, _ob$growthPercentage, _ob$peakDay, _refCard$growthPercen;
2364
+ var _ref12$apiData = _ref12.apiData,
2365
+ apiData = _ref12$apiData === void 0 ? {} : _ref12$apiData,
2366
+ _ref12$dateName = _ref12.dateName,
2367
+ dateName = _ref12$dateName === void 0 ? "Last Period" : _ref12$dateName,
2368
+ _ref12$numberOfDays = _ref12.numberOfDays,
2369
+ numberOfDays = _ref12$numberOfDays === void 0 ? 30 : _ref12$numberOfDays,
2370
+ _ref12$activeFilters = _ref12.activeFilters,
2371
+ activeFilters = _ref12$activeFilters === void 0 ? [] : _ref12$activeFilters;
2267
2372
  var now = new Date();
2268
2373
  var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
2269
2374
  var windowLabel = "".concat(numberOfDays, "-day window");
@@ -2318,7 +2423,8 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
2318
2423
  mainChart = report.mainChart,
2319
2424
  growth = report.growth,
2320
2425
  totalDonors = report.totalDonors,
2321
- donorMix = report.donorMix;
2426
+ donorMix = report.donorMix,
2427
+ activeCampaigns = report.activeCampaigns;
2322
2428
  var overview = (apiData === null || apiData === void 0 || (_apiData$overviewStat = apiData.overviewStats) === null || _apiData$overviewStat === void 0 ? void 0 : _apiData$overviewStat.overview) || {};
2323
2429
  var totalRaised = Number((_overview$totalRevenu = overview === null || overview === void 0 ? void 0 : overview.totalRevenue) !== null && _overview$totalRevenu !== void 0 ? _overview$totalRevenu : 240938);
2324
2430
  var netRaised = Number((_overview$netRevenue = overview === null || overview === void 0 ? void 0 : overview.netRevenue) !== null && _overview$netRevenue !== void 0 ? _overview$netRevenue : 222300);
@@ -2336,43 +2442,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
2336
2442
  retPct = donorMix.retPct,
2337
2443
  mixAvgGift = donorMix.avgGift,
2338
2444
  donorMixPrev = donorMix.donorMixPrev;
2339
- var recData = Array.isArray(apiData === null || apiData === void 0 ? void 0 : apiData.recurringBarChartData) ? apiData.recurringBarChartData : [];
2340
- var recurringTotal = recData.length ? recData.reduce(function (s, i) {
2341
- return s + Number(i.recurring || i.recurringAmount || 0);
2342
- }, 0) : 54937;
2343
- var oneTimeTotal = recData.length ? recData.reduce(function (s, i) {
2344
- return s + Number(i.oneTime || i.oneTimeAmount || 0);
2345
- }, 0) : 188001;
2346
- var geoRaw = apiData === null || apiData === void 0 ? void 0 : apiData.donorGeography;
2347
- var geoList = function () {
2348
- var raw = Array.isArray(geoRaw) ? geoRaw : Array.isArray(geoRaw === null || geoRaw === void 0 ? void 0 : geoRaw.data) ? geoRaw.data : [];
2349
- if (raw.length) return raw;
2350
- return [{
2351
- country: "United States",
2352
- totalDonors: 78,
2353
- percentage: 36
2354
- }, {
2355
- country: "United Kingdom",
2356
- totalDonors: 42,
2357
- percentage: 20
2358
- }, {
2359
- country: "Canada",
2360
- totalDonors: 28,
2361
- percentage: 13
2362
- }, {
2363
- country: "UAE",
2364
- totalDonors: 24,
2365
- percentage: 11
2366
- }, {
2367
- country: "Saudi Arabia",
2368
- totalDonors: 19,
2369
- percentage: 9
2370
- }, {
2371
- country: "Other",
2372
- totalDonors: 24,
2373
- percentage: 11
2374
- }];
2375
- }();
2445
+ var _report$donationTypeT = report.donationTypeTotals,
2446
+ recurringTotal = _report$donationTypeT.recurringTotal,
2447
+ oneTimeTotal = _report$donationTypeT.oneTimeTotal;
2448
+ var geoList = report.donorGeographyList;
2376
2449
  var trafficItems = function (_apiData$trafficSourc) {
2377
2450
  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 : [];
2378
2451
  if (items.length) return items;
@@ -2442,6 +2515,9 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
2442
2515
  averageDonation: 1940,
2443
2516
  status: "Active"
2444
2517
  }];
2518
+ var campaignStatusByIndex = campaigns.map(function (c) {
2519
+ return c.status || "Active";
2520
+ });
2445
2521
  var ob = (apiData === null || apiData === void 0 ? void 0 : apiData.orderBumpDetails) || {};
2446
2522
  var obData = ((ob === null || ob === void 0 ? void 0 : ob.chart) || []).map(function (i) {
2447
2523
  return Number(i.revenue || 0);
@@ -2604,10 +2680,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
2604
2680
  gap: 14,
2605
2681
  marginBottom: 6
2606
2682
  },
2607
- children: [["Email", C.cyan], ["Organic", C.emerald], ["Paid Ads", C.indigo]].map(function (_ref12) {
2608
- var _ref13 = _slicedToArray(_ref12, 2),
2609
- name = _ref13[0],
2610
- color = _ref13[1];
2683
+ children: [["Email", C.cyan], ["Organic", C.emerald], ["Paid Ads", C.indigo]].map(function (_ref13) {
2684
+ var _ref14 = _slicedToArray(_ref13, 2),
2685
+ name = _ref14[0],
2686
+ color = _ref14[1];
2611
2687
  return /*#__PURE__*/jsxs("div", {
2612
2688
  style: {
2613
2689
  display: "flex",
@@ -2671,11 +2747,13 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
2671
2747
  children: [/*#__PURE__*/jsx(Panel, {
2672
2748
  title: "Active campaigns",
2673
2749
  subtitle: "Live fundraisers ranked by velocity",
2674
- action: "View all \u2192",
2675
2750
  children: /*#__PURE__*/jsx(MiniTable, {
2676
2751
  head: ["CAMPAIGN", "RAISED", "PROGRESS", "DONORS", "AVG GIFT", "STATUS"],
2677
- rows: campaigns.map(function (c) {
2678
- 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 || c.averageDonation || 0), c.status || "Active"];
2752
+ colAlign: ["left", "right", "left", "right", "right", "right"],
2753
+ rows: activeCampaigns.map(function (c, i) {
2754
+ return [c.name, c.val1, /*#__PURE__*/jsx(ProgressBar, {
2755
+ value: c.progress
2756
+ }, "campaign-progress-".concat(i)), c.val3, c.val4, campaignStatusByIndex[i] || "Active"];
2679
2757
  })
2680
2758
  })
2681
2759
  }), /*#__PURE__*/jsx(Panel, {
@@ -2770,7 +2848,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
2770
2848
  style: {
2771
2849
  fontSize: 9
2772
2850
  },
2773
- children: "".concat(Number((_ref14 = donorMixPrev !== null && donorMixPrev !== void 0 ? donorMixPrev : growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) !== null && _ref14 !== void 0 ? _ref14 : 0).toFixed(2), "% vs pp")
2851
+ children: "".concat(Number((_ref15 = donorMixPrev !== null && donorMixPrev !== void 0 ? donorMixPrev : growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) !== null && _ref15 !== void 0 ? _ref15 : 0).toFixed(2), "% vs pp")
2774
2852
  })
2775
2853
  })]
2776
2854
  })]
@@ -2887,13 +2965,13 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
2887
2965
  fontSize: 9,
2888
2966
  color: "#374151"
2889
2967
  },
2890
- children: g.country || g.name || "-"
2968
+ children: g.country
2891
2969
  }), /*#__PURE__*/jsxs("span", {
2892
2970
  style: {
2893
2971
  fontSize: 9,
2894
2972
  color: "#6B7280"
2895
2973
  },
2896
- children: [formatNumber(g.totalDonors || g.donors || 0), " \xB7 ", formatNumber(g.percentage || 0), "%"]
2974
+ children: [formatNumber(g.value), " \xB7 ", formatNumber(g.percentage), "%"]
2897
2975
  })]
2898
2976
  }, i);
2899
2977
  })
@@ -3026,10 +3104,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
3026
3104
  display: "flex",
3027
3105
  gap: 12
3028
3106
  },
3029
- children: [["Avg/day", d$((ob === null || ob === void 0 ? void 0 : ob.averagePerDay) || 0)], ["Peak day", d$((ob === null || ob === void 0 || (_ob$peakDay = ob.peakDay) === null || _ob$peakDay === void 0 ? void 0 : _ob$peakDay.amount) || 0)], ["Orders", formatNumber((ob === null || ob === void 0 ? void 0 : ob.totalOrders) || 0)]].map(function (_ref15) {
3030
- var _ref16 = _slicedToArray(_ref15, 2),
3031
- l = _ref16[0],
3032
- v = _ref16[1];
3107
+ children: [["Avg/day", d$((ob === null || ob === void 0 ? void 0 : ob.averagePerDay) || 0)], ["Peak day", d$((ob === null || ob === void 0 || (_ob$peakDay = ob.peakDay) === null || _ob$peakDay === void 0 ? void 0 : _ob$peakDay.amount) || 0)], ["Orders", formatNumber((ob === null || ob === void 0 ? void 0 : ob.totalOrders) || 0)]].map(function (_ref16) {
3108
+ var _ref17 = _slicedToArray(_ref16, 2),
3109
+ l = _ref17[0],
3110
+ v = _ref17[1];
3033
3111
  return /*#__PURE__*/jsxs("div", {
3034
3112
  children: [/*#__PURE__*/jsx("div", {
3035
3113
  style: {
@@ -3156,10 +3234,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
3156
3234
  display: "flex",
3157
3235
  gap: 12
3158
3236
  },
3159
- children: [["Referrers", formatNumber((refCard === null || refCard === void 0 ? void 0 : refCard.totalReferrers) || 0)], ["Avg gift", d$((refCard === null || refCard === void 0 ? void 0 : refCard.averageGift) || 0)], ["Conv. rate", pct((refCard === null || refCard === void 0 ? void 0 : refCard.conversionRate) || 0, 1)]].map(function (_ref17) {
3160
- var _ref18 = _slicedToArray(_ref17, 2),
3161
- l = _ref18[0],
3162
- v = _ref18[1];
3237
+ children: [["Referrers", formatNumber((refCard === null || refCard === void 0 ? void 0 : refCard.totalReferrers) || 0)], ["Avg gift", d$((refCard === null || refCard === void 0 ? void 0 : refCard.averageGift) || 0)], ["Conv. rate", pct((refCard === null || refCard === void 0 ? void 0 : refCard.conversionRate) || 0, 1)]].map(function (_ref18) {
3238
+ var _ref19 = _slicedToArray(_ref18, 2),
3239
+ l = _ref19[0],
3240
+ v = _ref19[1];
3163
3241
  return /*#__PURE__*/jsxs("div", {
3164
3242
  children: [/*#__PURE__*/jsx("div", {
3165
3243
  style: {