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