@ammarkhalidfarooq/dashboard-package 0.6.68 → 0.6.69
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 +8 -28
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +8 -28
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1486,8 +1486,8 @@ var buildReportData = function buildReportData() {
|
|
|
1486
1486
|
var totalVisits = Number((_apiData$totalVisits = apiData === null || apiData === void 0 ? void 0 : apiData.totalVisits) !== null && _apiData$totalVisits !== void 0 ? _apiData$totalVisits : 12438);
|
|
1487
1487
|
var passThrough = totalRaised > 0 ? "".concat((netRaised / totalRaised * 100).toFixed(1), "% pass-through") : "92.3% pass-through";
|
|
1488
1488
|
var donorMixRaw = apiData === null || apiData === void 0 ? void 0 : apiData.donorPieChartData;
|
|
1489
|
-
var newDonors =
|
|
1490
|
-
var returningDonors =
|
|
1489
|
+
var newDonors = 0;
|
|
1490
|
+
var returningDonors = 0;
|
|
1491
1491
|
if (Array.isArray(donorMixRaw)) {
|
|
1492
1492
|
var nd = donorMixRaw.find(function (d) {
|
|
1493
1493
|
return /new/i.test(d.type);
|
|
@@ -1503,9 +1503,9 @@ var buildReportData = function buildReportData() {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
var avgGift = Number(((_overview$overallAVGD2 = overview === null || overview === void 0 ? void 0 : overview.overallAVGDonations) !== null && _overview$overallAVGD2 !== void 0 ? _overview$overallAVGD2 : 0).toFixed(2));
|
|
1505
1505
|
var donorMixPrev = Number(((_growth$overallAVGDon = growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) !== null && _growth$overallAVGDon !== void 0 ? _growth$overallAVGDon : 0).toFixed(2));
|
|
1506
|
-
var totalMix = newDonors + returningDonors
|
|
1507
|
-
var newPct = Math.round(newDonors / totalMix * 100);
|
|
1508
|
-
var retPct = 100 - newPct;
|
|
1506
|
+
var totalMix = newDonors + returningDonors;
|
|
1507
|
+
var newPct = totalMix > 0 ? Math.round(newDonors / totalMix * 100) : 0;
|
|
1508
|
+
var retPct = totalMix > 0 ? 100 - newPct : 0;
|
|
1509
1509
|
var hero = {
|
|
1510
1510
|
value: "$".concat(formatNumber(totalRaised)),
|
|
1511
1511
|
trend: "".concat(formatTrend((_growth$totalRevenue = growth === null || growth === void 0 ? void 0 : growth.totalRevenue) !== null && _growth$totalRevenue !== void 0 ? _growth$totalRevenue : 18), " vs ").concat(dateName || "last month"),
|
|
@@ -2629,7 +2629,7 @@ var PageFooter = function PageFooter(_ref12) {
|
|
|
2629
2629
|
|
|
2630
2630
|
// ─── Main component ───────────────────────────────────────────────────────────
|
|
2631
2631
|
var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref13, ref) {
|
|
2632
|
-
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, _mainChart$stacked, _refundsRaw$refundRat2, _ob$growthPercentage, _ob$peakDay, _up$acceptanceGrowth, _up$raisedGrowth, _dn$acceptanceGrowth, _dn$raisedGrowth, _refCard$growthPercen;
|
|
2632
|
+
var _apiData$overviewStat, _overview$totalRevenu, _overview$netRevenue, _overview$overallAVGD, _overview$conversionR, _apiData$totalVisits, _refundsRaw$refundRat, _refundsRaw$chargebac, _apiData$trafficSourc, _apiData$trafficSourc2, _apiData$trafficSourc3, _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, _mainChart$stacked, _refundsRaw$refundRat2, _ob$growthPercentage, _ob$peakDay, _up$acceptanceGrowth, _up$raisedGrowth, _dn$acceptanceGrowth, _dn$raisedGrowth, _refCard$growthPercen;
|
|
2633
2633
|
var _ref13$apiData = _ref13.apiData,
|
|
2634
2634
|
apiData = _ref13$apiData === void 0 ? {} : _ref13$apiData,
|
|
2635
2635
|
_ref13$dateName = _ref13.dateName,
|
|
@@ -2712,28 +2712,8 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref13, ref) {
|
|
|
2712
2712
|
mixAvgGift = donorMix.avgGift,
|
|
2713
2713
|
donorMixPrev = donorMix.donorMixPrev;
|
|
2714
2714
|
var geoList = report.donorGeographyList;
|
|
2715
|
-
var trafficItems =
|
|
2716
|
-
|
|
2717
|
-
if (items.length) return items;
|
|
2718
|
-
return [{
|
|
2719
|
-
source: "Paid Ads",
|
|
2720
|
-
revenue: 98400,
|
|
2721
|
-
share: 41
|
|
2722
|
-
}, {
|
|
2723
|
-
source: "Organic",
|
|
2724
|
-
revenue: 62100,
|
|
2725
|
-
share: 26
|
|
2726
|
-
}, {
|
|
2727
|
-
source: "Email",
|
|
2728
|
-
revenue: 38600,
|
|
2729
|
-
share: 16
|
|
2730
|
-
}, {
|
|
2731
|
-
source: "Direct",
|
|
2732
|
-
revenue: 15500,
|
|
2733
|
-
share: 6
|
|
2734
|
-
}];
|
|
2735
|
-
}();
|
|
2736
|
-
var trafficTotal = Number((apiData === null || apiData === void 0 || (_apiData$trafficSourc2 = apiData.trafficSourceData) === null || _apiData$trafficSourc2 === void 0 ? void 0 : _apiData$trafficSourc2.totalRevenue) || 240900);
|
|
2715
|
+
var trafficItems = Array.isArray(apiData === null || apiData === void 0 || (_apiData$trafficSourc = apiData.trafficSourceData) === null || _apiData$trafficSourc === void 0 ? void 0 : _apiData$trafficSourc.data) ? apiData.trafficSourceData.data : [];
|
|
2716
|
+
var trafficTotal = Number((_apiData$trafficSourc2 = apiData === null || apiData === void 0 || (_apiData$trafficSourc3 = apiData.trafficSourceData) === null || _apiData$trafficSourc3 === void 0 ? void 0 : _apiData$trafficSourc3.totalRevenue) !== null && _apiData$trafficSourc2 !== void 0 ? _apiData$trafficSourc2 : 0);
|
|
2737
2717
|
var revSeries = (mainChart.series || []).length ? mainChart.series : [{
|
|
2738
2718
|
name: "Paid Ads",
|
|
2739
2719
|
data: []
|