@ammarkhalidfarooq/dashboard-package 0.6.92 → 0.6.94
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 +528 -348
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +528 -348
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1535,7 +1535,7 @@ var getActiveFilterChips = function getActiveFilterChips(apiData) {
|
|
|
1535
1535
|
return s.trim();
|
|
1536
1536
|
}).filter(Boolean);
|
|
1537
1537
|
}
|
|
1538
|
-
return [
|
|
1538
|
+
return [];
|
|
1539
1539
|
};
|
|
1540
1540
|
var buildReportData = function buildReportData() {
|
|
1541
1541
|
var _apiData$overviewStat2, _overview$totalRevenu, _overview$netRevenue, _overview$totalDonati, _overview$overallAVGD, _overview$conversionR, _apiData$totalVisits, _overview$overallAVGD2, _growth$overallAVGDon, _growth$totalRevenue, _growth$netRevenue, _growth$totalDonation, _growth$overallAVGDon2, _apiData$roasCard, _apiData$roasCardPrev, _apiData$adSpend, _apiData$attributedRe, _growth$conversionRat, _apiData$overviewStat3, _growth$totalRevenue2;
|
|
@@ -1545,13 +1545,13 @@ var buildReportData = function buildReportData() {
|
|
|
1545
1545
|
var refundsRaw = (apiData === null || apiData === void 0 ? void 0 : apiData.refundAndChargeBacks) || {};
|
|
1546
1546
|
var refunds = parseRefundsChargebacks(refundsRaw);
|
|
1547
1547
|
var avgDonationDetail = parseAvgDonationDetail(apiData);
|
|
1548
|
-
var totalRaised = Number((_overview$totalRevenu = overview === null || overview === void 0 ? void 0 : overview.totalRevenue) !== null && _overview$totalRevenu !== void 0 ? _overview$totalRevenu :
|
|
1549
|
-
var netRaised = Number((_overview$netRevenue = overview === null || overview === void 0 ? void 0 : overview.netRevenue) !== null && _overview$netRevenue !== void 0 ? _overview$netRevenue :
|
|
1550
|
-
var totalDonors = Number((_overview$totalDonati = overview === null || overview === void 0 ? void 0 : overview.totalDonations) !== null && _overview$totalDonati !== void 0 ? _overview$totalDonati :
|
|
1551
|
-
var avgDonation = Number((_overview$overallAVGD = overview === null || overview === void 0 ? void 0 : overview.overallAVGDonations) !== null && _overview$overallAVGD !== void 0 ? _overview$overallAVGD :
|
|
1552
|
-
var convRate = Number((_overview$conversionR = overview === null || overview === void 0 ? void 0 : overview.conversionRate) !== null && _overview$conversionR !== void 0 ? _overview$conversionR :
|
|
1553
|
-
var totalVisits = Number((_apiData$totalVisits = apiData === null || apiData === void 0 ? void 0 : apiData.totalVisits) !== null && _apiData$totalVisits !== void 0 ? _apiData$totalVisits :
|
|
1554
|
-
var passThrough = totalRaised > 0 ? "".concat((netRaised / totalRaised * 100).toFixed(1), "% pass-through") : "
|
|
1548
|
+
var totalRaised = Number((_overview$totalRevenu = overview === null || overview === void 0 ? void 0 : overview.totalRevenue) !== null && _overview$totalRevenu !== void 0 ? _overview$totalRevenu : 0);
|
|
1549
|
+
var netRaised = Number((_overview$netRevenue = overview === null || overview === void 0 ? void 0 : overview.netRevenue) !== null && _overview$netRevenue !== void 0 ? _overview$netRevenue : 0);
|
|
1550
|
+
var totalDonors = Number((_overview$totalDonati = overview === null || overview === void 0 ? void 0 : overview.totalDonations) !== null && _overview$totalDonati !== void 0 ? _overview$totalDonati : 0);
|
|
1551
|
+
var avgDonation = Number((_overview$overallAVGD = overview === null || overview === void 0 ? void 0 : overview.overallAVGDonations) !== null && _overview$overallAVGD !== void 0 ? _overview$overallAVGD : 0);
|
|
1552
|
+
var convRate = Number((_overview$conversionR = overview === null || overview === void 0 ? void 0 : overview.conversionRate) !== null && _overview$conversionR !== void 0 ? _overview$conversionR : 0);
|
|
1553
|
+
var totalVisits = Number((_apiData$totalVisits = apiData === null || apiData === void 0 ? void 0 : apiData.totalVisits) !== null && _apiData$totalVisits !== void 0 ? _apiData$totalVisits : 0);
|
|
1554
|
+
var passThrough = totalRaised > 0 ? "".concat((netRaised / totalRaised * 100).toFixed(1), "% pass-through") : "0% pass-through";
|
|
1555
1555
|
var donorMixRaw = apiData === null || apiData === void 0 ? void 0 : apiData.donorPieChartData;
|
|
1556
1556
|
var newDonors = 0;
|
|
1557
1557
|
var returningDonors = 0;
|
|
@@ -1575,18 +1575,18 @@ var buildReportData = function buildReportData() {
|
|
|
1575
1575
|
var retPct = totalMix > 0 ? 100 - newPct : 0;
|
|
1576
1576
|
var hero = {
|
|
1577
1577
|
value: "$".concat(formatNumber(totalRaised)),
|
|
1578
|
-
trend: "".concat(formatTrend((_growth$totalRevenue = growth === null || growth === void 0 ? void 0 : growth.totalRevenue) !== null && _growth$totalRevenue !== void 0 ? _growth$totalRevenue :
|
|
1578
|
+
trend: "".concat(formatTrend((_growth$totalRevenue = growth === null || growth === void 0 ? void 0 : growth.totalRevenue) !== null && _growth$totalRevenue !== void 0 ? _growth$totalRevenue : 0), " vs pp"),
|
|
1579
1579
|
detail: "".concat(passThrough, " - ").concat(formatNumber(totalDonors), " donors - $").concat(formatNumber(Number(avgDonation).toFixed(2)), " avg - ").concat(formatNumber(totalVisits), " visits")
|
|
1580
1580
|
};
|
|
1581
1581
|
var metrics = [{
|
|
1582
1582
|
title: "Net Raised",
|
|
1583
1583
|
value: "$".concat(formatNumber(netRaised)),
|
|
1584
|
-
trend: formatTrend((_growth$netRevenue = growth === null || growth === void 0 ? void 0 : growth.netRevenue) !== null && _growth$netRevenue !== void 0 ? _growth$netRevenue :
|
|
1584
|
+
trend: formatTrend((_growth$netRevenue = growth === null || growth === void 0 ? void 0 : growth.netRevenue) !== null && _growth$netRevenue !== void 0 ? _growth$netRevenue : 0),
|
|
1585
1585
|
detail: passThrough
|
|
1586
1586
|
}, {
|
|
1587
1587
|
title: "Total Donors",
|
|
1588
1588
|
value: formatNumber(totalDonors),
|
|
1589
|
-
trend: formatTrend((_growth$totalDonation = growth === null || growth === void 0 ? void 0 : growth.totalDonations) !== null && _growth$totalDonation !== void 0 ? _growth$totalDonation :
|
|
1589
|
+
trend: formatTrend((_growth$totalDonation = growth === null || growth === void 0 ? void 0 : growth.totalDonations) !== null && _growth$totalDonation !== void 0 ? _growth$totalDonation : 0),
|
|
1590
1590
|
detail: "".concat(formatNumber(newDonors), " new - ").concat(formatNumber(returningDonors), " returning")
|
|
1591
1591
|
}, {
|
|
1592
1592
|
title: "Avg Donation",
|
|
@@ -1601,7 +1601,7 @@ var buildReportData = function buildReportData() {
|
|
|
1601
1601
|
}, {
|
|
1602
1602
|
title: "Conversion",
|
|
1603
1603
|
value: "".concat(formatNumber(convRate), "%"),
|
|
1604
|
-
trend: formatTrend((_growth$conversionRat = growth === null || growth === void 0 ? void 0 : growth.conversionRate) !== null && _growth$conversionRat !== void 0 ? _growth$conversionRat : 0
|
|
1604
|
+
trend: formatTrend((_growth$conversionRat = growth === null || growth === void 0 ? void 0 : growth.conversionRate) !== null && _growth$conversionRat !== void 0 ? _growth$conversionRat : 0, "pp"),
|
|
1605
1605
|
detail: "".concat(formatNumber(totalDonors), " from ").concat(formatNumber(totalVisits), " visits")
|
|
1606
1606
|
}, {
|
|
1607
1607
|
title: "Refund Rate",
|
|
@@ -1616,7 +1616,7 @@ var buildReportData = function buildReportData() {
|
|
|
1616
1616
|
label: "Total revenue trend",
|
|
1617
1617
|
subtitle: "Last 30 days - daily aggregation",
|
|
1618
1618
|
value: "$".concat(formatNumber(totalRaised)),
|
|
1619
|
-
trend: "".concat(formatTrend((_growth$totalRevenue2 = growth === null || growth === void 0 ? void 0 : growth.totalRevenue) !== null && _growth$totalRevenue2 !== void 0 ? _growth$totalRevenue2 :
|
|
1619
|
+
trend: "".concat(formatTrend((_growth$totalRevenue2 = growth === null || growth === void 0 ? void 0 : growth.totalRevenue) !== null && _growth$totalRevenue2 !== void 0 ? _growth$totalRevenue2 : 0), " vs pp"),
|
|
1620
1620
|
hideControls: true,
|
|
1621
1621
|
stacked: true,
|
|
1622
1622
|
colors: ["#6366F1", "#10B981", "#06B6D4"],
|
|
@@ -1649,60 +1649,21 @@ var buildReportData = function buildReportData() {
|
|
|
1649
1649
|
categories: categories
|
|
1650
1650
|
});
|
|
1651
1651
|
} else {
|
|
1652
|
-
var _categories = (apiData === null || apiData === void 0 ? void 0 : apiData.categories) || ["Apr 5", "Apr 11", "Apr 17", "Apr 23", "Apr 29", "May 4"];
|
|
1653
|
-
var base = (apiData === null || apiData === void 0 ? void 0 : apiData.revenueData) || [3000, 4500, 5200, 5800, 6200, 7100, 8500, 9200, 9500];
|
|
1654
1652
|
mainChart = _objectSpread2(_objectSpread2({}, mainChart), {}, {
|
|
1655
1653
|
series: [{
|
|
1656
1654
|
name: "Paid Ads",
|
|
1657
|
-
data:
|
|
1658
|
-
return v * 0.55;
|
|
1659
|
-
})
|
|
1655
|
+
data: []
|
|
1660
1656
|
}, {
|
|
1661
1657
|
name: "Organic",
|
|
1662
|
-
data:
|
|
1663
|
-
return v * 0.28;
|
|
1664
|
-
})
|
|
1658
|
+
data: []
|
|
1665
1659
|
}, {
|
|
1666
1660
|
name: "Email",
|
|
1667
|
-
data:
|
|
1668
|
-
return v * 0.17;
|
|
1669
|
-
})
|
|
1661
|
+
data: []
|
|
1670
1662
|
}],
|
|
1671
|
-
categories:
|
|
1663
|
+
categories: (apiData === null || apiData === void 0 ? void 0 : apiData.categories) || []
|
|
1672
1664
|
});
|
|
1673
1665
|
}
|
|
1674
|
-
var
|
|
1675
|
-
title: "Orphan sponsorship — Yemen",
|
|
1676
|
-
collectedAmount: 78400,
|
|
1677
|
-
usdTargetAmount: 100000,
|
|
1678
|
-
uniqueDonationsCount: 82,
|
|
1679
|
-
status: "Active"
|
|
1680
|
-
}, {
|
|
1681
|
-
title: "Emergency food — Gaza",
|
|
1682
|
-
collectedAmount: 62100,
|
|
1683
|
-
usdTargetAmount: 75000,
|
|
1684
|
-
uniqueDonationsCount: 61,
|
|
1685
|
-
status: "Active"
|
|
1686
|
-
}, {
|
|
1687
|
-
title: "Masjid build — Somalia",
|
|
1688
|
-
collectedAmount: 38200,
|
|
1689
|
-
usdTargetAmount: 83000,
|
|
1690
|
-
uniqueDonationsCount: 34,
|
|
1691
|
-
status: "Slow"
|
|
1692
|
-
}, {
|
|
1693
|
-
title: "Water wells — Pakistan",
|
|
1694
|
-
collectedAmount: 29800,
|
|
1695
|
-
usdTargetAmount: 30000,
|
|
1696
|
-
uniqueDonationsCount: 28,
|
|
1697
|
-
status: "Closing"
|
|
1698
|
-
}, {
|
|
1699
|
-
title: "Ramadan packs — Egypt",
|
|
1700
|
-
collectedAmount: 18400,
|
|
1701
|
-
usdTargetAmount: 23500,
|
|
1702
|
-
uniqueDonationsCount: 10,
|
|
1703
|
-
status: "Active"
|
|
1704
|
-
}];
|
|
1705
|
-
var campaignSource = ((apiData === null || apiData === void 0 ? void 0 : apiData.activeCampaigns) || []).length ? apiData.activeCampaigns : sampleCampaigns;
|
|
1666
|
+
var campaignSource = (apiData === null || apiData === void 0 ? void 0 : apiData.activeCampaigns) || [];
|
|
1706
1667
|
var activeCampaigns = campaignSource.map(function (campaign) {
|
|
1707
1668
|
return {
|
|
1708
1669
|
id: campaign.campaignName ? campaign.campaignName.split(" ").filter(Boolean).map(function (w) {
|
|
@@ -1749,18 +1710,19 @@ var W = 794;
|
|
|
1749
1710
|
var MIN_H = 1123;
|
|
1750
1711
|
var MX = 32; // horizontal margin
|
|
1751
1712
|
var THEME = {
|
|
1752
|
-
pageBg: "#
|
|
1713
|
+
pageBg: "#F9FAFB",
|
|
1753
1714
|
panelBg: "#FFFFFF",
|
|
1754
|
-
panelBorder: "#
|
|
1755
|
-
|
|
1715
|
+
panelBorder: "#E5E7EB",
|
|
1716
|
+
brand: "#6366F1",
|
|
1756
1717
|
kpiBorderPrimary: "#C7D2FE",
|
|
1757
|
-
kpiBgSecondary: "#F8FAFF",
|
|
1758
|
-
kpiBorderSecondary: "#DDE3EA",
|
|
1759
1718
|
tableHeadBg: "#EEF2FF",
|
|
1760
1719
|
tableAltBg: "#F8FAFF",
|
|
1761
|
-
muted: "#
|
|
1762
|
-
text: "#111827"
|
|
1720
|
+
muted: "#9CA3AF",
|
|
1721
|
+
text: "#111827",
|
|
1722
|
+
trendUpBg: "#D1FAE5",
|
|
1723
|
+
trendUpText: "#059669"
|
|
1763
1724
|
};
|
|
1725
|
+
var BULLET = " · ";
|
|
1764
1726
|
|
|
1765
1727
|
// ─── Number helpers ───────────────────────────────────────────────────────────
|
|
1766
1728
|
var d$ = function d$(v) {
|
|
@@ -1773,7 +1735,7 @@ var kpiPct = function kpiPct(v) {
|
|
|
1773
1735
|
return "".concat(formatNumber(Number(v !== null && v !== void 0 ? v : 0).toFixed(2)), "%");
|
|
1774
1736
|
};
|
|
1775
1737
|
var kpiRoas = function kpiRoas(v) {
|
|
1776
|
-
return "".concat(
|
|
1738
|
+
return "".concat(Number(v !== null && v !== void 0 ? v : 0).toFixed(1), "\xD7");
|
|
1777
1739
|
};
|
|
1778
1740
|
var d$Compact = function d$Compact(v) {
|
|
1779
1741
|
var n = Number(v !== null && v !== void 0 ? v : 0);
|
|
@@ -1785,11 +1747,6 @@ var pct = function pct(v) {
|
|
|
1785
1747
|
var dp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
1786
1748
|
return "".concat(Number(v !== null && v !== void 0 ? v : 0).toFixed(dp), "%");
|
|
1787
1749
|
};
|
|
1788
|
-
var signed = function signed(v) {
|
|
1789
|
-
var suffix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "%";
|
|
1790
|
-
var n = Number(v !== null && v !== void 0 ? v : 0);
|
|
1791
|
-
return "".concat(n >= 0 ? "+" : "").concat(n.toFixed(2)).concat(suffix);
|
|
1792
|
-
};
|
|
1793
1750
|
var TREND_UP = "#0B8F61";
|
|
1794
1751
|
var TREND_DOWN = "#ef4444";
|
|
1795
1752
|
var resolveTrendColor = function resolveTrendColor(trendText) {
|
|
@@ -2597,70 +2554,302 @@ var AcceptanceRaisedPanel = function AcceptanceRaisedPanel(_ref10) {
|
|
|
2597
2554
|
})
|
|
2598
2555
|
});
|
|
2599
2556
|
};
|
|
2600
|
-
var
|
|
2601
|
-
var
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2557
|
+
var TrendPill$1 = function TrendPill(_ref12) {
|
|
2558
|
+
var children = _ref12.children,
|
|
2559
|
+
_ref12$positive = _ref12.positive,
|
|
2560
|
+
positive = _ref12$positive === void 0 ? true : _ref12$positive;
|
|
2561
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2562
|
+
style: {
|
|
2563
|
+
display: "inline-flex",
|
|
2564
|
+
alignItems: "center",
|
|
2565
|
+
background: positive ? THEME.trendUpBg : "#FEE2E2",
|
|
2566
|
+
color: positive ? THEME.trendUpText : "#DC2626",
|
|
2567
|
+
padding: "3px 10px",
|
|
2568
|
+
borderRadius: 100,
|
|
2569
|
+
fontSize: 9,
|
|
2570
|
+
fontWeight: 600,
|
|
2571
|
+
whiteSpace: "nowrap",
|
|
2572
|
+
lineHeight: 1.35
|
|
2573
|
+
},
|
|
2574
|
+
children: children
|
|
2575
|
+
});
|
|
2576
|
+
};
|
|
2577
|
+
var isTrendPositive = function isTrendPositive(trendText) {
|
|
2578
|
+
var invert = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
2579
|
+
var n = Number(String(trendText !== null && trendText !== void 0 ? trendText : "").replace(/[^0-9.\-+]/g, ""));
|
|
2580
|
+
if (Number.isNaN(n)) return true;
|
|
2581
|
+
return invert ? n <= 0 : n >= 0;
|
|
2582
|
+
};
|
|
2583
|
+
var PageOneHeader = function PageOneHeader(_ref13) {
|
|
2584
|
+
var dateLabel = _ref13.dateLabel,
|
|
2585
|
+
generatedLabel = _ref13.generatedLabel,
|
|
2586
|
+
windowLabel = _ref13.windowLabel;
|
|
2587
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2588
|
+
style: {
|
|
2589
|
+
padding: "36px ".concat(MX, "px 0"),
|
|
2590
|
+
flexShrink: 0
|
|
2591
|
+
},
|
|
2592
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2593
|
+
style: {
|
|
2594
|
+
display: "flex",
|
|
2595
|
+
justifyContent: "space-between",
|
|
2596
|
+
alignItems: "flex-start"
|
|
2597
|
+
},
|
|
2598
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2599
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2600
|
+
style: {
|
|
2601
|
+
fontSize: 22,
|
|
2602
|
+
fontWeight: 700,
|
|
2603
|
+
color: THEME.brand,
|
|
2604
|
+
letterSpacing: "-0.3px",
|
|
2605
|
+
lineHeight: 1.1
|
|
2606
|
+
},
|
|
2607
|
+
children: "Madinah"
|
|
2608
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2609
|
+
style: {
|
|
2610
|
+
fontSize: 9,
|
|
2611
|
+
fontWeight: 600,
|
|
2612
|
+
letterSpacing: "1.2px",
|
|
2613
|
+
color: THEME.muted,
|
|
2614
|
+
textTransform: "uppercase",
|
|
2615
|
+
marginTop: 3
|
|
2616
|
+
},
|
|
2617
|
+
children: "Performance Report"
|
|
2618
|
+
})]
|
|
2619
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2620
|
+
style: {
|
|
2621
|
+
textAlign: "right"
|
|
2622
|
+
},
|
|
2623
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2624
|
+
style: {
|
|
2625
|
+
fontSize: 11,
|
|
2626
|
+
color: "#6B7280",
|
|
2627
|
+
lineHeight: 1.2
|
|
2628
|
+
},
|
|
2629
|
+
children: "Dashboard overview \u2014 Overall"
|
|
2630
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2631
|
+
style: {
|
|
2632
|
+
fontSize: 18,
|
|
2633
|
+
fontWeight: 700,
|
|
2634
|
+
color: THEME.text,
|
|
2635
|
+
marginTop: 4,
|
|
2636
|
+
lineHeight: 1.15
|
|
2637
|
+
},
|
|
2638
|
+
children: dateLabel
|
|
2639
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2640
|
+
style: {
|
|
2641
|
+
fontSize: 9,
|
|
2642
|
+
color: THEME.muted,
|
|
2643
|
+
marginTop: 3,
|
|
2644
|
+
lineHeight: 1.35
|
|
2645
|
+
},
|
|
2646
|
+
children: [windowLabel, BULLET, "Generated ", generatedLabel]
|
|
2647
|
+
})]
|
|
2648
|
+
})]
|
|
2649
|
+
})
|
|
2650
|
+
});
|
|
2651
|
+
};
|
|
2652
|
+
var ActiveFiltersBar = function ActiveFiltersBar(_ref14) {
|
|
2653
|
+
var _ref14$pills = _ref14.pills,
|
|
2654
|
+
pills = _ref14$pills === void 0 ? [] : _ref14$pills;
|
|
2655
|
+
if (!pills.length) return null;
|
|
2611
2656
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2612
2657
|
style: {
|
|
2613
|
-
border: "1px solid ".concat(isPrimary ? THEME.kpiBorderPrimary : THEME.kpiBorderSecondary),
|
|
2614
|
-
borderRadius: 8,
|
|
2615
|
-
padding: "10px 12px 9px",
|
|
2616
|
-
background: isPrimary ? THEME.kpiBgPrimary : THEME.kpiBgSecondary,
|
|
2617
|
-
width: "100%",
|
|
2618
|
-
minWidth: 0,
|
|
2619
|
-
boxSizing: "border-box",
|
|
2620
2658
|
display: "flex",
|
|
2621
|
-
|
|
2622
|
-
|
|
2659
|
+
alignItems: "center",
|
|
2660
|
+
flexWrap: "wrap",
|
|
2661
|
+
gap: 8,
|
|
2662
|
+
background: "#EEF2FF",
|
|
2663
|
+
borderRadius: 10,
|
|
2664
|
+
padding: "10px 14px",
|
|
2665
|
+
marginTop: 18
|
|
2623
2666
|
},
|
|
2624
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("
|
|
2667
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2625
2668
|
style: {
|
|
2626
2669
|
fontSize: 8,
|
|
2627
2670
|
fontWeight: 700,
|
|
2628
|
-
letterSpacing: "0.
|
|
2629
|
-
color:
|
|
2671
|
+
letterSpacing: "0.8px",
|
|
2672
|
+
color: THEME.muted,
|
|
2673
|
+
textTransform: "uppercase",
|
|
2674
|
+
flexShrink: 0
|
|
2630
2675
|
},
|
|
2631
|
-
children:
|
|
2676
|
+
children: "Active Filters"
|
|
2677
|
+
}), pills.map(function (pill, i) {
|
|
2678
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2679
|
+
style: {
|
|
2680
|
+
display: "inline-flex",
|
|
2681
|
+
alignItems: "center",
|
|
2682
|
+
background: "#FFFFFF",
|
|
2683
|
+
border: "1px solid ".concat(THEME.kpiBorderPrimary),
|
|
2684
|
+
borderRadius: 100,
|
|
2685
|
+
padding: "4px 11px",
|
|
2686
|
+
fontSize: 9,
|
|
2687
|
+
fontWeight: 500,
|
|
2688
|
+
color: THEME.brand,
|
|
2689
|
+
lineHeight: 1.3
|
|
2690
|
+
},
|
|
2691
|
+
children: pill
|
|
2692
|
+
}, i);
|
|
2693
|
+
})]
|
|
2694
|
+
});
|
|
2695
|
+
};
|
|
2696
|
+
var HeroRaisedCard = function HeroRaisedCard(_ref15) {
|
|
2697
|
+
var value = _ref15.value,
|
|
2698
|
+
trend = _ref15.trend,
|
|
2699
|
+
detail = _ref15.detail;
|
|
2700
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2701
|
+
style: {
|
|
2702
|
+
display: "flex",
|
|
2703
|
+
background: "#FFFFFF",
|
|
2704
|
+
border: "1px solid ".concat(THEME.panelBorder),
|
|
2705
|
+
borderRadius: 12,
|
|
2706
|
+
overflow: "hidden",
|
|
2707
|
+
boxSizing: "border-box"
|
|
2708
|
+
},
|
|
2709
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2710
|
+
style: {
|
|
2711
|
+
width: 5,
|
|
2712
|
+
flexShrink: 0,
|
|
2713
|
+
background: THEME.brand
|
|
2714
|
+
}
|
|
2715
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2716
|
+
style: {
|
|
2717
|
+
flex: 1,
|
|
2718
|
+
padding: "16px 18px 14px"
|
|
2719
|
+
},
|
|
2720
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2721
|
+
style: {
|
|
2722
|
+
fontSize: 9,
|
|
2723
|
+
fontWeight: 700,
|
|
2724
|
+
letterSpacing: "0.8px",
|
|
2725
|
+
color: THEME.brand,
|
|
2726
|
+
textTransform: "uppercase"
|
|
2727
|
+
},
|
|
2728
|
+
children: "Total Raised"
|
|
2729
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2730
|
+
style: {
|
|
2731
|
+
display: "flex",
|
|
2732
|
+
alignItems: "center",
|
|
2733
|
+
gap: 10,
|
|
2734
|
+
marginTop: 6,
|
|
2735
|
+
flexWrap: "wrap"
|
|
2736
|
+
},
|
|
2737
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2738
|
+
style: {
|
|
2739
|
+
fontSize: 28,
|
|
2740
|
+
fontWeight: 700,
|
|
2741
|
+
color: THEME.text,
|
|
2742
|
+
lineHeight: 1.05,
|
|
2743
|
+
letterSpacing: "-0.5px"
|
|
2744
|
+
},
|
|
2745
|
+
children: value
|
|
2746
|
+
}), trend && /*#__PURE__*/jsxRuntime.jsx(TrendPill$1, {
|
|
2747
|
+
positive: isTrendPositive(trend),
|
|
2748
|
+
children: trend
|
|
2749
|
+
})]
|
|
2750
|
+
}), detail && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2751
|
+
style: {
|
|
2752
|
+
fontSize: 9,
|
|
2753
|
+
color: THEME.muted,
|
|
2754
|
+
marginTop: 8,
|
|
2755
|
+
lineHeight: 1.4
|
|
2756
|
+
},
|
|
2757
|
+
children: detail
|
|
2758
|
+
})]
|
|
2759
|
+
})]
|
|
2760
|
+
});
|
|
2761
|
+
};
|
|
2762
|
+
var MetricGridCard = function MetricGridCard(_ref16) {
|
|
2763
|
+
var title = _ref16.title,
|
|
2764
|
+
value = _ref16.value,
|
|
2765
|
+
trend = _ref16.trend,
|
|
2766
|
+
detail = _ref16.detail,
|
|
2767
|
+
_ref16$trendPositiveW = _ref16.trendPositiveWhenNegative,
|
|
2768
|
+
trendPositiveWhenNegative = _ref16$trendPositiveW === void 0 ? false : _ref16$trendPositiveW;
|
|
2769
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2770
|
+
style: {
|
|
2771
|
+
position: "relative",
|
|
2772
|
+
background: "#FFFFFF",
|
|
2773
|
+
border: "1px solid ".concat(THEME.panelBorder),
|
|
2774
|
+
borderRadius: 12,
|
|
2775
|
+
padding: "12px 14px 11px",
|
|
2776
|
+
boxSizing: "border-box",
|
|
2777
|
+
minWidth: 0
|
|
2778
|
+
},
|
|
2779
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2780
|
+
style: {
|
|
2781
|
+
display: "flex",
|
|
2782
|
+
justifyContent: "space-between",
|
|
2783
|
+
alignItems: "flex-start",
|
|
2784
|
+
gap: 6
|
|
2785
|
+
},
|
|
2786
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2787
|
+
style: {
|
|
2788
|
+
fontSize: 8,
|
|
2789
|
+
fontWeight: 700,
|
|
2790
|
+
letterSpacing: "0.7px",
|
|
2791
|
+
color: THEME.muted,
|
|
2792
|
+
textTransform: "uppercase",
|
|
2793
|
+
lineHeight: 1.2
|
|
2794
|
+
},
|
|
2795
|
+
children: title
|
|
2796
|
+
}), trend && /*#__PURE__*/jsxRuntime.jsx(TrendPill$1, {
|
|
2797
|
+
positive: isTrendPositive(trend, trendPositiveWhenNegative),
|
|
2798
|
+
children: trend
|
|
2799
|
+
})]
|
|
2632
2800
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2633
2801
|
style: {
|
|
2634
|
-
fontSize:
|
|
2635
|
-
fontWeight:
|
|
2802
|
+
fontSize: 20,
|
|
2803
|
+
fontWeight: 700,
|
|
2636
2804
|
color: THEME.text,
|
|
2637
2805
|
lineHeight: 1.1,
|
|
2638
|
-
marginTop:
|
|
2806
|
+
marginTop: 10
|
|
2639
2807
|
},
|
|
2640
2808
|
children: value
|
|
2641
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2642
|
-
style: {
|
|
2643
|
-
fontSize: 10.5,
|
|
2644
|
-
fontWeight: 600,
|
|
2645
|
-
color: resolveTrendColor(displayTrend, trendPositiveWhenNegative)
|
|
2646
|
-
},
|
|
2647
|
-
children: displayTrend
|
|
2648
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2809
|
+
}), detail && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2649
2810
|
style: {
|
|
2650
2811
|
fontSize: 8.5,
|
|
2651
2812
|
color: THEME.muted,
|
|
2652
|
-
|
|
2813
|
+
marginTop: 5,
|
|
2814
|
+
lineHeight: 1.35
|
|
2653
2815
|
},
|
|
2654
2816
|
children: detail
|
|
2655
2817
|
})]
|
|
2656
2818
|
});
|
|
2657
2819
|
};
|
|
2658
|
-
var
|
|
2659
|
-
var
|
|
2660
|
-
generatedLabel =
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2820
|
+
var PageOneFooter = function PageOneFooter(_ref17) {
|
|
2821
|
+
var generatedBy = _ref17.generatedBy,
|
|
2822
|
+
generatedLabel = _ref17.generatedLabel;
|
|
2823
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2824
|
+
style: {
|
|
2825
|
+
padding: "14px ".concat(MX, "px 28px"),
|
|
2826
|
+
borderTop: "1px solid ".concat(THEME.panelBorder),
|
|
2827
|
+
marginTop: "auto",
|
|
2828
|
+
flexShrink: 0
|
|
2829
|
+
},
|
|
2830
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2831
|
+
style: {
|
|
2832
|
+
display: "flex",
|
|
2833
|
+
justifyContent: "space-between",
|
|
2834
|
+
alignItems: "center",
|
|
2835
|
+
fontSize: 8,
|
|
2836
|
+
color: THEME.muted,
|
|
2837
|
+
lineHeight: 1.4
|
|
2838
|
+
},
|
|
2839
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
2840
|
+
children: ["Confidential", BULLET, "Generated by ", generatedBy, BULLET, generatedLabel]
|
|
2841
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
2842
|
+
children: ["Page 1 of 2", BULLET, "madinah.com"]
|
|
2843
|
+
})]
|
|
2844
|
+
})
|
|
2845
|
+
});
|
|
2846
|
+
};
|
|
2847
|
+
var PageHeader = function PageHeader(_ref18) {
|
|
2848
|
+
var dateLabel = _ref18.dateLabel,
|
|
2849
|
+
generatedLabel = _ref18.generatedLabel,
|
|
2850
|
+
activeFilters = _ref18.activeFilters,
|
|
2851
|
+
page = _ref18.page,
|
|
2852
|
+
windowLabel = _ref18.windowLabel;
|
|
2664
2853
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2665
2854
|
style: {
|
|
2666
2855
|
padding: "22px ".concat(MX, "px 12px"),
|
|
@@ -2766,10 +2955,10 @@ var PageHeader = function PageHeader(_ref12) {
|
|
|
2766
2955
|
})]
|
|
2767
2956
|
});
|
|
2768
2957
|
};
|
|
2769
|
-
var PageFooter = function PageFooter(
|
|
2770
|
-
var generatedBy =
|
|
2771
|
-
generatedLabel =
|
|
2772
|
-
page =
|
|
2958
|
+
var PageFooter = function PageFooter(_ref19) {
|
|
2959
|
+
var generatedBy = _ref19.generatedBy,
|
|
2960
|
+
generatedLabel = _ref19.generatedLabel,
|
|
2961
|
+
page = _ref19.page;
|
|
2773
2962
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2774
2963
|
style: {
|
|
2775
2964
|
padding: "9px ".concat(MX, "px 54px"),
|
|
@@ -2796,32 +2985,33 @@ var PageFooter = function PageFooter(_ref13) {
|
|
|
2796
2985
|
};
|
|
2797
2986
|
|
|
2798
2987
|
// ─── Main component ───────────────────────────────────────────────────────────
|
|
2799
|
-
var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (
|
|
2800
|
-
var _apiData$overviewStat, _overview$totalRevenu, _overview$netRevenue, _overview$overallAVGD, _overview$conversionR, _apiData$totalVisits, _apiData$trafficSourc, _apiData$trafficSourc2, _apiData$trafficSourc3, _metricByTitle$NetRa, _metricByTitle$Total, _metricByTitle$Total2, _metricByTitle$Total3, _metricByTitle$
|
|
2801
|
-
var
|
|
2802
|
-
name =
|
|
2803
|
-
|
|
2804
|
-
apiData =
|
|
2805
|
-
|
|
2806
|
-
dateName =
|
|
2807
|
-
|
|
2808
|
-
numberOfDays =
|
|
2809
|
-
|
|
2810
|
-
activeFilters =
|
|
2988
|
+
var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref20, ref) {
|
|
2989
|
+
var _apiData$overviewStat, _overview$totalRevenu, _overview$netRevenue, _overview$overallAVGD, _overview$conversionR, _apiData$totalVisits, _apiData$trafficSourc, _apiData$trafficSourc2, _apiData$trafficSourc3, _growth$totalRevenue, _metricByTitle$AvgDo, _avgDonationDetail$me, _avgDonationDetail$to, _metricByTitle$NetRa, _growth$netRevenue, _metricByTitle$Total, _metricByTitle$Total2, _growth$totalDonation, _metricByTitle$Total3, _metricByTitle$AvgDo2, _growth$overallAVGDon, _apiData$roasCard, _metricByTitle$ROAS, _apiData$roasCardPrev, _metricByTitle$ROAS2, _apiData$adSpend, _apiData$attributedRe, _metricByTitle$Conver, _growth$conversionRat, _metricByTitle$Conver2, _metricByTitle$Refund, _refunds$growthPercen, _metricByTitle$Refund2, _mainChart$stacked, _ob$growthPercentage, _ob$peakDay, _up$acceptanceGrowth, _up$raisedGrowth, _dn$acceptanceGrowth, _dn$raisedGrowth, _refCard$growthPercen;
|
|
2990
|
+
var _ref20$name = _ref20.name,
|
|
2991
|
+
name = _ref20$name === void 0 ? "" : _ref20$name,
|
|
2992
|
+
_ref20$apiData = _ref20.apiData,
|
|
2993
|
+
apiData = _ref20$apiData === void 0 ? {} : _ref20$apiData,
|
|
2994
|
+
_ref20$dateName = _ref20.dateName,
|
|
2995
|
+
dateName = _ref20$dateName === void 0 ? "Last Period" : _ref20$dateName,
|
|
2996
|
+
_ref20$numberOfDays = _ref20.numberOfDays,
|
|
2997
|
+
numberOfDays = _ref20$numberOfDays === void 0 ? 30 : _ref20$numberOfDays,
|
|
2998
|
+
_ref20$activeFilters = _ref20.activeFilters,
|
|
2999
|
+
activeFilters = _ref20$activeFilters === void 0 ? [] : _ref20$activeFilters;
|
|
2811
3000
|
var now = new Date();
|
|
2812
3001
|
var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
|
|
2813
3002
|
var windowLabel = "".concat(numberOfDays, "-day window");
|
|
2814
|
-
var
|
|
2815
|
-
timeZone: "
|
|
3003
|
+
var gmtOptions = {
|
|
3004
|
+
timeZone: "UTC"
|
|
2816
3005
|
};
|
|
2817
3006
|
var generatedLabel = now.toLocaleDateString("en-US", _objectSpread2({
|
|
2818
3007
|
month: "short",
|
|
2819
3008
|
day: "numeric",
|
|
2820
3009
|
year: "numeric"
|
|
2821
|
-
},
|
|
3010
|
+
}, gmtOptions)) + BULLET + now.toLocaleTimeString("en-US", _objectSpread2({
|
|
2822
3011
|
hour: "2-digit",
|
|
2823
|
-
minute: "2-digit"
|
|
2824
|
-
|
|
3012
|
+
minute: "2-digit",
|
|
3013
|
+
hour12: false
|
|
3014
|
+
}, gmtOptions)) + " GMT";
|
|
2825
3015
|
var dateLabel = dateName;
|
|
2826
3016
|
var _normalizeFiltersText = function normalizeFiltersText(filtersInput) {
|
|
2827
3017
|
if (typeof filtersInput === "string") {
|
|
@@ -2859,21 +3049,46 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
2859
3049
|
return "";
|
|
2860
3050
|
};
|
|
2861
3051
|
var formattedActiveFilters = _normalizeFiltersText(activeFilters);
|
|
3052
|
+
var parseFilterPills = function parseFilterPills(filtersInput) {
|
|
3053
|
+
if (Array.isArray(filtersInput)) {
|
|
3054
|
+
var fromObjects = filtersInput.filter(function (item) {
|
|
3055
|
+
return item && _typeof(item) === "object" && item.value !== undefined && item.value !== null && "".concat(item.value).trim();
|
|
3056
|
+
}).map(function (item) {
|
|
3057
|
+
return "".concat(item.label || item.id || "Filter", ": ").concat(item.value);
|
|
3058
|
+
});
|
|
3059
|
+
if (fromObjects.length) return fromObjects;
|
|
3060
|
+
var fromStrings = filtersInput.map(function (item) {
|
|
3061
|
+
return typeof item === "string" ? item.trim() : "";
|
|
3062
|
+
}).filter(Boolean);
|
|
3063
|
+
if (fromStrings.length) return fromStrings;
|
|
3064
|
+
}
|
|
3065
|
+
if (typeof filtersInput === "string" && filtersInput.trim()) {
|
|
3066
|
+
var str = filtersInput.trim();
|
|
3067
|
+
if (str.includes("·")) return str.split("·").map(function (s) {
|
|
3068
|
+
return s.trim();
|
|
3069
|
+
}).filter(Boolean);
|
|
3070
|
+
if (str.includes("|")) return str.split("|").map(function (s) {
|
|
3071
|
+
return s.trim();
|
|
3072
|
+
}).filter(Boolean);
|
|
3073
|
+
return [str];
|
|
3074
|
+
}
|
|
3075
|
+
return [];
|
|
3076
|
+
};
|
|
3077
|
+
var filterPills = parseFilterPills(activeFilters);
|
|
2862
3078
|
var report = buildReportData(apiData, dateName);
|
|
2863
|
-
var
|
|
2864
|
-
metrics = report.metrics,
|
|
3079
|
+
var metrics = report.metrics,
|
|
2865
3080
|
mainChart = report.mainChart,
|
|
2866
3081
|
growth = report.growth,
|
|
2867
3082
|
totalDonors = report.totalDonors,
|
|
2868
3083
|
donorMix = report.donorMix,
|
|
2869
3084
|
activeCampaigns = report.activeCampaigns;
|
|
2870
3085
|
var overview = (apiData === null || apiData === void 0 || (_apiData$overviewStat = apiData.overviewStats) === null || _apiData$overviewStat === void 0 ? void 0 : _apiData$overviewStat.overview) || {};
|
|
2871
|
-
var totalRaised = Number((_overview$totalRevenu = overview === null || overview === void 0 ? void 0 : overview.totalRevenue) !== null && _overview$totalRevenu !== void 0 ? _overview$totalRevenu :
|
|
2872
|
-
var netRaised = Number((_overview$netRevenue = overview === null || overview === void 0 ? void 0 : overview.netRevenue) !== null && _overview$netRevenue !== void 0 ? _overview$netRevenue :
|
|
2873
|
-
var avgDonation = Number((_overview$overallAVGD = overview === null || overview === void 0 ? void 0 : overview.overallAVGDonations) !== null && _overview$overallAVGD !== void 0 ? _overview$overallAVGD :
|
|
2874
|
-
var convRate = Number((_overview$conversionR = overview === null || overview === void 0 ? void 0 : overview.conversionRate) !== null && _overview$conversionR !== void 0 ? _overview$conversionR :
|
|
2875
|
-
var totalVisits = Number((_apiData$totalVisits = apiData === null || apiData === void 0 ? void 0 : apiData.totalVisits) !== null && _apiData$totalVisits !== void 0 ? _apiData$totalVisits :
|
|
2876
|
-
var passThrough = totalRaised > 0 ? "".concat((netRaised / totalRaised * 100).toFixed(1), "% pass-through") : "
|
|
3086
|
+
var totalRaised = Number((_overview$totalRevenu = overview === null || overview === void 0 ? void 0 : overview.totalRevenue) !== null && _overview$totalRevenu !== void 0 ? _overview$totalRevenu : 0);
|
|
3087
|
+
var netRaised = Number((_overview$netRevenue = overview === null || overview === void 0 ? void 0 : overview.netRevenue) !== null && _overview$netRevenue !== void 0 ? _overview$netRevenue : 0);
|
|
3088
|
+
var avgDonation = Number((_overview$overallAVGD = overview === null || overview === void 0 ? void 0 : overview.overallAVGDonations) !== null && _overview$overallAVGD !== void 0 ? _overview$overallAVGD : 0);
|
|
3089
|
+
var convRate = Number((_overview$conversionR = overview === null || overview === void 0 ? void 0 : overview.conversionRate) !== null && _overview$conversionR !== void 0 ? _overview$conversionR : 0);
|
|
3090
|
+
var totalVisits = Number((_apiData$totalVisits = apiData === null || apiData === void 0 ? void 0 : apiData.totalVisits) !== null && _apiData$totalVisits !== void 0 ? _apiData$totalVisits : 0);
|
|
3091
|
+
var passThrough = totalRaised > 0 ? "".concat((netRaised / totalRaised * 100).toFixed(1), "% pass-through") : "0% pass-through";
|
|
2877
3092
|
var avgDonationDetail = parseAvgDonationDetail(apiData);
|
|
2878
3093
|
var refunds = parseRefundsChargebacks(apiData === null || apiData === void 0 ? void 0 : apiData.refundAndChargeBacks);
|
|
2879
3094
|
var refundRate = refunds.refundRate,
|
|
@@ -2893,7 +3108,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
2893
3108
|
var geoList = report.donorGeographyList;
|
|
2894
3109
|
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 : [];
|
|
2895
3110
|
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);
|
|
2896
|
-
var revSeries =
|
|
3111
|
+
var revSeries = mainChart.series || [{
|
|
2897
3112
|
name: "Paid Ads",
|
|
2898
3113
|
data: []
|
|
2899
3114
|
}, {
|
|
@@ -2904,42 +3119,6 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
2904
3119
|
data: []
|
|
2905
3120
|
}];
|
|
2906
3121
|
var revCats = mainChart.categories || [];
|
|
2907
|
-
((apiData === null || apiData === void 0 ? void 0 : apiData.activeCampaigns) || []).length ? apiData.activeCampaigns : [{
|
|
2908
|
-
title: "Orphan sponsorship — Yemen",
|
|
2909
|
-
collectedAmount: 78400,
|
|
2910
|
-
usdTargetAmount: 100000,
|
|
2911
|
-
uniqueDonationsCount: 82,
|
|
2912
|
-
averageDonation: 956,
|
|
2913
|
-
status: "Active"
|
|
2914
|
-
}, {
|
|
2915
|
-
title: "Emergency food — Gaza",
|
|
2916
|
-
collectedAmount: 62100,
|
|
2917
|
-
usdTargetAmount: 75000,
|
|
2918
|
-
uniqueDonationsCount: 61,
|
|
2919
|
-
averageDonation: 1018,
|
|
2920
|
-
status: "Active"
|
|
2921
|
-
}, {
|
|
2922
|
-
title: "Masjid build — Somalia",
|
|
2923
|
-
collectedAmount: 38200,
|
|
2924
|
-
usdTargetAmount: 83000,
|
|
2925
|
-
uniqueDonationsCount: 34,
|
|
2926
|
-
averageDonation: 1124,
|
|
2927
|
-
status: "Slow"
|
|
2928
|
-
}, {
|
|
2929
|
-
title: "Water wells — Pakistan",
|
|
2930
|
-
collectedAmount: 29800,
|
|
2931
|
-
usdTargetAmount: 30000,
|
|
2932
|
-
uniqueDonationsCount: 28,
|
|
2933
|
-
averageDonation: 1064,
|
|
2934
|
-
status: "Closing"
|
|
2935
|
-
}, {
|
|
2936
|
-
title: "Ramadan packs — Egypt",
|
|
2937
|
-
collectedAmount: 18400,
|
|
2938
|
-
usdTargetAmount: 23500,
|
|
2939
|
-
uniqueDonationsCount: 10,
|
|
2940
|
-
averageDonation: 1940,
|
|
2941
|
-
status: "Active"
|
|
2942
|
-
}];
|
|
2943
3122
|
var ob = (apiData === null || apiData === void 0 ? void 0 : apiData.orderBumpDetails) || {};
|
|
2944
3123
|
var obData = ((ob === null || ob === void 0 ? void 0 : ob.chart) || []).map(function (i) {
|
|
2945
3124
|
return Number(i.revenue || 0);
|
|
@@ -2968,13 +3147,16 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
2968
3147
|
label: "Email",
|
|
2969
3148
|
color: C.cyan
|
|
2970
3149
|
}];
|
|
2971
|
-
var revenueTrendText =
|
|
2972
|
-
var
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
var
|
|
3150
|
+
var revenueTrendText = "".concat(formatTrend((_growth$totalRevenue = growth === null || growth === void 0 ? void 0 : growth.totalRevenue) !== null && _growth$totalRevenue !== void 0 ? _growth$totalRevenue : 0), " vs last month");
|
|
3151
|
+
var heroTrendText = revenueTrendText;
|
|
3152
|
+
var heroDetailText = [passThrough, "".concat(formatNumber(totalDonors), " donors"), "$".concat(formatNumber(Number(avgDonation).toFixed(2)), " avg"), "".concat(formatNumber(totalVisits), " visits")].join(BULLET);
|
|
3153
|
+
var formatMetricDetail = function formatMetricDetail(detail) {
|
|
3154
|
+
return String(detail !== null && detail !== void 0 ? detail : "").replace(/\s-\s/g, BULLET);
|
|
3155
|
+
};
|
|
3156
|
+
var formatRoasTrend = function formatRoasTrend(trend) {
|
|
3157
|
+
return String(trend !== null && trend !== void 0 ? trend : "").replace(/x$/, "×");
|
|
3158
|
+
};
|
|
3159
|
+
var avgDonationDetailText = formatMetricDetail(((_metricByTitle$AvgDo = metricByTitle["Avg Donation"]) === null || _metricByTitle$AvgDo === void 0 ? void 0 : _metricByTitle$AvgDo.detail) || avgDonationDetail.detail || "Median $".concat(formatNumber((_avgDonationDetail$me = avgDonationDetail.median) !== null && _avgDonationDetail$me !== void 0 ? _avgDonationDetail$me : 0), " \xB7 top decile $").concat(formatNumber((_avgDonationDetail$to = avgDonationDetail.topDecile) !== null && _avgDonationDetail$to !== void 0 ? _avgDonationDetail$to : 0)));
|
|
2978
3160
|
var headerProps = {
|
|
2979
3161
|
dateLabel: dateLabel,
|
|
2980
3162
|
generatedLabel: generatedLabel,
|
|
@@ -2997,189 +3179,187 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
2997
3179
|
background: THEME.pageBg,
|
|
2998
3180
|
display: "flex",
|
|
2999
3181
|
flexDirection: "column",
|
|
3000
|
-
fontFamily: "'Helvetica Neue', Helvetica, Arial, sans-serif",
|
|
3182
|
+
fontFamily: "'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif",
|
|
3001
3183
|
boxSizing: "border-box"
|
|
3002
3184
|
},
|
|
3003
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
3004
|
-
|
|
3005
|
-
|
|
3185
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(PageOneHeader, {
|
|
3186
|
+
dateLabel: dateLabel,
|
|
3187
|
+
generatedLabel: generatedLabel,
|
|
3188
|
+
windowLabel: windowLabel
|
|
3189
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3006
3190
|
style: {
|
|
3007
3191
|
flex: 1,
|
|
3008
|
-
padding: "
|
|
3192
|
+
padding: "0 ".concat(MX, "px 0"),
|
|
3009
3193
|
display: "flex",
|
|
3010
|
-
flexDirection: "column"
|
|
3011
|
-
gap: 10
|
|
3194
|
+
flexDirection: "column"
|
|
3012
3195
|
},
|
|
3013
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
3014
|
-
|
|
3015
|
-
value: kpi$(totalRaised),
|
|
3016
|
-
trend: hero.trend,
|
|
3017
|
-
detail: hero.detail,
|
|
3018
|
-
variant: "primary"
|
|
3019
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3020
|
-
style: {
|
|
3021
|
-
display: "grid",
|
|
3022
|
-
gridTemplateColumns: "repeat(3, 1fr)",
|
|
3023
|
-
gap: 7
|
|
3024
|
-
},
|
|
3025
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(KpiCard, {
|
|
3026
|
-
title: "Net Raised",
|
|
3027
|
-
value: kpi$(netRaised),
|
|
3028
|
-
trend: ((_metricByTitle$NetRa = metricByTitle["Net Raised"]) === null || _metricByTitle$NetRa === void 0 ? void 0 : _metricByTitle$NetRa.trend) || signed((growth === null || growth === void 0 ? void 0 : growth.netRevenue) || 17.4),
|
|
3029
|
-
detail: passThrough
|
|
3030
|
-
}), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
|
|
3031
|
-
title: "Total Donors",
|
|
3032
|
-
value: ((_metricByTitle$Total = metricByTitle["Total Donors"]) === null || _metricByTitle$Total === void 0 ? void 0 : _metricByTitle$Total.value) || "".concat(formatNumber(totalDonors)),
|
|
3033
|
-
trend: ((_metricByTitle$Total2 = metricByTitle["Total Donors"]) === null || _metricByTitle$Total2 === void 0 ? void 0 : _metricByTitle$Total2.trend) || signed((growth === null || growth === void 0 ? void 0 : growth.totalDonations) || 16.8),
|
|
3034
|
-
detail: ((_metricByTitle$Total3 = metricByTitle["Total Donors"]) === null || _metricByTitle$Total3 === void 0 ? void 0 : _metricByTitle$Total3.detail) || "".concat(formatNumber(newDonors), " new - ").concat(formatNumber(returningDonors), " returning")
|
|
3035
|
-
}), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
|
|
3036
|
-
title: "Avg Donation",
|
|
3037
|
-
value: kpi$(avgDonation),
|
|
3038
|
-
trend: ((_metricByTitle$AvgDo = metricByTitle["Avg Donation"]) === null || _metricByTitle$AvgDo === void 0 ? void 0 : _metricByTitle$AvgDo.trend) || signed((_growth$overallAVGDon = growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) !== null && _growth$overallAVGDon !== void 0 ? _growth$overallAVGDon : 0),
|
|
3039
|
-
detail: ((_metricByTitle$AvgDo2 = metricByTitle["Avg Donation"]) === null || _metricByTitle$AvgDo2 === void 0 ? void 0 : _metricByTitle$AvgDo2.detail) || avgDonationDetail.detail
|
|
3040
|
-
})]
|
|
3196
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ActiveFiltersBar, {
|
|
3197
|
+
pills: filterPills
|
|
3041
3198
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3042
3199
|
style: {
|
|
3043
|
-
display: "
|
|
3044
|
-
|
|
3045
|
-
gap:
|
|
3046
|
-
|
|
3047
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(KpiCard, {
|
|
3048
|
-
title: "ROAS",
|
|
3049
|
-
value: kpiRoas((_apiData$roasCard = apiData === null || apiData === void 0 ? void 0 : apiData.roasCard) !== null && _apiData$roasCard !== void 0 ? _apiData$roasCard : 0),
|
|
3050
|
-
trend: ((_metricByTitle$ROAS = metricByTitle.ROAS) === null || _metricByTitle$ROAS === void 0 ? void 0 : _metricByTitle$ROAS.trend) || signed((_apiData$roasCardPrev = apiData === null || apiData === void 0 ? void 0 : apiData.roasCardPrev) !== null && _apiData$roasCardPrev !== void 0 ? _apiData$roasCardPrev : 0, "×"),
|
|
3051
|
-
detail: ((_metricByTitle$ROAS2 = metricByTitle.ROAS) === null || _metricByTitle$ROAS2 === void 0 ? void 0 : _metricByTitle$ROAS2.detail) || "".concat(d$((_apiData$adSpend = apiData === null || apiData === void 0 ? void 0 : apiData.adSpend) !== null && _apiData$adSpend !== void 0 ? _apiData$adSpend : 0), " spend - ").concat(d$((_apiData$attributedRe = apiData === null || apiData === void 0 ? void 0 : apiData.attributedRevenue) !== null && _apiData$attributedRe !== void 0 ? _apiData$attributedRe : 0), " attrib.")
|
|
3052
|
-
}), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
|
|
3053
|
-
title: "Conversion",
|
|
3054
|
-
value: kpiPct(convRate),
|
|
3055
|
-
trend: ((_metricByTitle$Conver = metricByTitle.Conversion) === null || _metricByTitle$Conver === void 0 ? void 0 : _metricByTitle$Conver.trend) || signed((growth === null || growth === void 0 ? void 0 : growth.conversionRate) || 0.21, "pp"),
|
|
3056
|
-
detail: ((_metricByTitle$Conver2 = metricByTitle.Conversion) === null || _metricByTitle$Conver2 === void 0 ? void 0 : _metricByTitle$Conver2.detail) || "".concat(formatNumber(totalDonors), " from ").concat(formatNumber(totalVisits), " visits")
|
|
3057
|
-
}), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
|
|
3058
|
-
title: "Refund Rate",
|
|
3059
|
-
value: pct(refundRate, 2),
|
|
3060
|
-
trend: ((_metricByTitle$Refund = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund === void 0 ? void 0 : _metricByTitle$Refund.trend) || signed(growthPercentage),
|
|
3061
|
-
detail: ((_metricByTitle$Refund2 = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund2 === void 0 ? void 0 : _metricByTitle$Refund2.detail) || "".concat(formatNumber(totalRefunds), " refunds this period"),
|
|
3062
|
-
trendPositiveWhenNegative: (_metricByTitle$Refund3 = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund3 === void 0 ? void 0 : _metricByTitle$Refund3.trendPositiveWhenNegative
|
|
3063
|
-
})]
|
|
3064
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3065
|
-
style: {
|
|
3066
|
-
border: "1px solid #E5E7EB",
|
|
3067
|
-
borderRadius: 8,
|
|
3068
|
-
background: "#fff",
|
|
3069
|
-
padding: "12px 14px 10px",
|
|
3200
|
+
display: "flex",
|
|
3201
|
+
flexDirection: "column",
|
|
3202
|
+
gap: 10,
|
|
3203
|
+
marginTop: 14,
|
|
3070
3204
|
flex: 1
|
|
3071
3205
|
},
|
|
3072
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
3206
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(HeroRaisedCard, {
|
|
3207
|
+
value: kpi$(totalRaised),
|
|
3208
|
+
trend: heroTrendText,
|
|
3209
|
+
detail: heroDetailText
|
|
3210
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3073
3211
|
style: {
|
|
3074
|
-
display: "
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3212
|
+
display: "grid",
|
|
3213
|
+
gridTemplateColumns: "repeat(3, 1fr)",
|
|
3214
|
+
gap: 10
|
|
3215
|
+
},
|
|
3216
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(MetricGridCard, {
|
|
3217
|
+
title: "Net Raised",
|
|
3218
|
+
value: d$Compact(netRaised),
|
|
3219
|
+
trend: ((_metricByTitle$NetRa = metricByTitle["Net Raised"]) === null || _metricByTitle$NetRa === void 0 ? void 0 : _metricByTitle$NetRa.trend) || formatTrend((_growth$netRevenue = growth === null || growth === void 0 ? void 0 : growth.netRevenue) !== null && _growth$netRevenue !== void 0 ? _growth$netRevenue : 0),
|
|
3220
|
+
detail: passThrough
|
|
3221
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MetricGridCard, {
|
|
3222
|
+
title: "Total Donors",
|
|
3223
|
+
value: ((_metricByTitle$Total = metricByTitle["Total Donors"]) === null || _metricByTitle$Total === void 0 ? void 0 : _metricByTitle$Total.value) || "".concat(formatNumber(totalDonors)),
|
|
3224
|
+
trend: ((_metricByTitle$Total2 = metricByTitle["Total Donors"]) === null || _metricByTitle$Total2 === void 0 ? void 0 : _metricByTitle$Total2.trend) || formatTrend((_growth$totalDonation = growth === null || growth === void 0 ? void 0 : growth.totalDonations) !== null && _growth$totalDonation !== void 0 ? _growth$totalDonation : 0),
|
|
3225
|
+
detail: formatMetricDetail(((_metricByTitle$Total3 = metricByTitle["Total Donors"]) === null || _metricByTitle$Total3 === void 0 ? void 0 : _metricByTitle$Total3.detail) || "".concat(formatNumber(newDonors), " new \xB7 ").concat(formatNumber(returningDonors), " returning"))
|
|
3226
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MetricGridCard, {
|
|
3227
|
+
title: "Avg Donation",
|
|
3228
|
+
value: kpi$(avgDonation),
|
|
3229
|
+
trend: ((_metricByTitle$AvgDo2 = metricByTitle["Avg Donation"]) === null || _metricByTitle$AvgDo2 === void 0 ? void 0 : _metricByTitle$AvgDo2.trend) || formatTrend((_growth$overallAVGDon = growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) !== null && _growth$overallAVGDon !== void 0 ? _growth$overallAVGDon : 0),
|
|
3230
|
+
detail: avgDonationDetailText
|
|
3231
|
+
})]
|
|
3232
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3233
|
+
style: {
|
|
3234
|
+
display: "grid",
|
|
3235
|
+
gridTemplateColumns: "repeat(3, 1fr)",
|
|
3236
|
+
gap: 10
|
|
3237
|
+
},
|
|
3238
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(MetricGridCard, {
|
|
3239
|
+
title: "ROAS",
|
|
3240
|
+
value: kpiRoas((_apiData$roasCard = apiData === null || apiData === void 0 ? void 0 : apiData.roasCard) !== null && _apiData$roasCard !== void 0 ? _apiData$roasCard : 0),
|
|
3241
|
+
trend: formatRoasTrend(((_metricByTitle$ROAS = metricByTitle.ROAS) === null || _metricByTitle$ROAS === void 0 ? void 0 : _metricByTitle$ROAS.trend) || formatTrend((_apiData$roasCardPrev = apiData === null || apiData === void 0 ? void 0 : apiData.roasCardPrev) !== null && _apiData$roasCardPrev !== void 0 ? _apiData$roasCardPrev : 0, "x")),
|
|
3242
|
+
detail: formatMetricDetail(((_metricByTitle$ROAS2 = metricByTitle.ROAS) === null || _metricByTitle$ROAS2 === void 0 ? void 0 : _metricByTitle$ROAS2.detail) || "".concat(d$Compact((_apiData$adSpend = apiData === null || apiData === void 0 ? void 0 : apiData.adSpend) !== null && _apiData$adSpend !== void 0 ? _apiData$adSpend : 0), " spend \xB7 ").concat(d$Compact((_apiData$attributedRe = apiData === null || apiData === void 0 ? void 0 : apiData.attributedRevenue) !== null && _apiData$attributedRe !== void 0 ? _apiData$attributedRe : 0), " attrib."))
|
|
3243
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MetricGridCard, {
|
|
3244
|
+
title: "Conversion",
|
|
3245
|
+
value: kpiPct(convRate),
|
|
3246
|
+
trend: ((_metricByTitle$Conver = metricByTitle.Conversion) === null || _metricByTitle$Conver === void 0 ? void 0 : _metricByTitle$Conver.trend) || formatTrend((_growth$conversionRat = growth === null || growth === void 0 ? void 0 : growth.conversionRate) !== null && _growth$conversionRat !== void 0 ? _growth$conversionRat : 0, "pp"),
|
|
3247
|
+
detail: formatMetricDetail(((_metricByTitle$Conver2 = metricByTitle.Conversion) === null || _metricByTitle$Conver2 === void 0 ? void 0 : _metricByTitle$Conver2.detail) || "".concat(formatNumber(totalDonors), " from ").concat(formatNumber(totalVisits), " visits"))
|
|
3248
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MetricGridCard, {
|
|
3249
|
+
title: "Refund Rate",
|
|
3250
|
+
value: pct(refundRate, 2),
|
|
3251
|
+
trend: ((_metricByTitle$Refund = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund === void 0 ? void 0 : _metricByTitle$Refund.trend) || formatTrend((_refunds$growthPercen = refunds.growthPercentage) !== null && _refunds$growthPercen !== void 0 ? _refunds$growthPercen : 0, "pp"),
|
|
3252
|
+
detail: formatMetricDetail(((_metricByTitle$Refund2 = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund2 === void 0 ? void 0 : _metricByTitle$Refund2.detail) || "".concat(formatNumber(totalRefunds), " refunds this period")),
|
|
3253
|
+
trendPositiveWhenNegative: true
|
|
3254
|
+
})]
|
|
3255
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3256
|
+
style: {
|
|
3257
|
+
border: "1px solid ".concat(THEME.panelBorder),
|
|
3258
|
+
borderRadius: 12,
|
|
3259
|
+
background: "#fff",
|
|
3260
|
+
padding: "14px 16px 12px",
|
|
3261
|
+
flex: 1
|
|
3078
3262
|
},
|
|
3079
3263
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
children: "
|
|
3088
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3089
|
-
style: {
|
|
3090
|
-
fontSize: 9.5,
|
|
3091
|
-
color: "rgba(0, 0, 0, 0.4)",
|
|
3092
|
-
marginTop: 2,
|
|
3093
|
-
lineHeight: 1.15
|
|
3094
|
-
},
|
|
3095
|
-
children: ["Last ", daysLabel, " - daily aggregation"]
|
|
3096
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3097
|
-
style: {
|
|
3098
|
-
display: "flex",
|
|
3099
|
-
alignItems: "center",
|
|
3100
|
-
gap: 6,
|
|
3101
|
-
marginTop: 8
|
|
3102
|
-
},
|
|
3103
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
3264
|
+
style: {
|
|
3265
|
+
display: "flex",
|
|
3266
|
+
justifyContent: "space-between",
|
|
3267
|
+
alignItems: "flex-start",
|
|
3268
|
+
marginBottom: 6
|
|
3269
|
+
},
|
|
3270
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3271
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3104
3272
|
style: {
|
|
3105
|
-
fontSize:
|
|
3273
|
+
fontSize: 13,
|
|
3106
3274
|
fontWeight: 700,
|
|
3107
|
-
color:
|
|
3275
|
+
color: THEME.text,
|
|
3276
|
+
lineHeight: 1.15
|
|
3108
3277
|
},
|
|
3109
|
-
children:
|
|
3110
|
-
}),
|
|
3278
|
+
children: "Total revenue trend"
|
|
3279
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3111
3280
|
style: {
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
color: revenueTrendColor,
|
|
3117
|
-
padding: "2px 8px",
|
|
3118
|
-
borderRadius: 100,
|
|
3119
|
-
fontSize: 9.5,
|
|
3120
|
-
fontWeight: 600
|
|
3281
|
+
fontSize: 9,
|
|
3282
|
+
color: THEME.muted,
|
|
3283
|
+
marginTop: 3,
|
|
3284
|
+
lineHeight: 1.15
|
|
3121
3285
|
},
|
|
3122
|
-
children: [
|
|
3123
|
-
|
|
3124
|
-
}), revenueTrendText]
|
|
3125
|
-
})]
|
|
3126
|
-
})]
|
|
3127
|
-
}), revSeries.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3128
|
-
style: {
|
|
3129
|
-
display: "flex",
|
|
3130
|
-
gap: 10,
|
|
3131
|
-
alignItems: "center",
|
|
3132
|
-
flexShrink: 0,
|
|
3133
|
-
paddingTop: 2
|
|
3134
|
-
},
|
|
3135
|
-
children: revenueLegend.map(function (leg) {
|
|
3136
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3286
|
+
children: ["Last ", daysLabel, BULLET, "daily aggregation"]
|
|
3287
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3137
3288
|
style: {
|
|
3138
3289
|
display: "flex",
|
|
3139
3290
|
alignItems: "center",
|
|
3140
|
-
gap:
|
|
3291
|
+
gap: 8,
|
|
3292
|
+
marginTop: 10
|
|
3141
3293
|
},
|
|
3142
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("
|
|
3294
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
3143
3295
|
style: {
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
flexShrink: 0
|
|
3149
|
-
}
|
|
3150
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
3151
|
-
style: {
|
|
3152
|
-
fontSize: 9.5,
|
|
3153
|
-
color: "rgba(0, 0, 0, 0.6)",
|
|
3154
|
-
fontWeight: 500
|
|
3296
|
+
fontSize: 22,
|
|
3297
|
+
fontWeight: 700,
|
|
3298
|
+
color: THEME.text,
|
|
3299
|
+
letterSpacing: "-0.3px"
|
|
3155
3300
|
},
|
|
3156
|
-
children:
|
|
3301
|
+
children: kpi$(totalRaised)
|
|
3302
|
+
}), revenueTrendText && /*#__PURE__*/jsxRuntime.jsx(TrendPill$1, {
|
|
3303
|
+
positive: isTrendPositive(revenueTrendText),
|
|
3304
|
+
children: revenueTrendText
|
|
3157
3305
|
})]
|
|
3158
|
-
}
|
|
3306
|
+
})]
|
|
3307
|
+
}), revSeries.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3308
|
+
style: {
|
|
3309
|
+
display: "flex",
|
|
3310
|
+
gap: 12,
|
|
3311
|
+
alignItems: "center",
|
|
3312
|
+
flexShrink: 0,
|
|
3313
|
+
paddingTop: 2
|
|
3314
|
+
},
|
|
3315
|
+
children: revenueLegend.map(function (leg) {
|
|
3316
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3317
|
+
style: {
|
|
3318
|
+
display: "flex",
|
|
3319
|
+
alignItems: "center",
|
|
3320
|
+
gap: 5
|
|
3321
|
+
},
|
|
3322
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3323
|
+
style: {
|
|
3324
|
+
width: 7,
|
|
3325
|
+
height: 7,
|
|
3326
|
+
borderRadius: "50%",
|
|
3327
|
+
background: leg.color,
|
|
3328
|
+
flexShrink: 0
|
|
3329
|
+
}
|
|
3330
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
3331
|
+
style: {
|
|
3332
|
+
fontSize: 9,
|
|
3333
|
+
color: "#6B7280",
|
|
3334
|
+
fontWeight: 500
|
|
3335
|
+
},
|
|
3336
|
+
children: leg.label
|
|
3337
|
+
})]
|
|
3338
|
+
}, leg.label);
|
|
3339
|
+
})
|
|
3340
|
+
})]
|
|
3341
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3342
|
+
style: {
|
|
3343
|
+
width: "100%",
|
|
3344
|
+
minHeight: 280
|
|
3345
|
+
},
|
|
3346
|
+
children: /*#__PURE__*/jsxRuntime.jsx(RevenueChart, {
|
|
3347
|
+
id: "pdf-total-revenue-trend",
|
|
3348
|
+
metric: "Revenue",
|
|
3349
|
+
series: revSeries,
|
|
3350
|
+
categories: revCats,
|
|
3351
|
+
height: 280,
|
|
3352
|
+
stacked: (_mainChart$stacked = mainChart.stacked) !== null && _mainChart$stacked !== void 0 ? _mainChart$stacked : true,
|
|
3353
|
+
type: "area",
|
|
3354
|
+
colors: mainChart.colors || ["#6366F1", "#10B981", "#06B6D4"],
|
|
3355
|
+
showLegend: false
|
|
3159
3356
|
})
|
|
3160
3357
|
})]
|
|
3161
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3162
|
-
style: {
|
|
3163
|
-
width: "100%",
|
|
3164
|
-
minHeight: 300
|
|
3165
|
-
},
|
|
3166
|
-
children: /*#__PURE__*/jsxRuntime.jsx(RevenueChart, {
|
|
3167
|
-
id: "pdf-total-revenue-trend",
|
|
3168
|
-
metric: "Revenue",
|
|
3169
|
-
series: revSeries,
|
|
3170
|
-
categories: revCats,
|
|
3171
|
-
height: 300,
|
|
3172
|
-
stacked: (_mainChart$stacked = mainChart.stacked) !== null && _mainChart$stacked !== void 0 ? _mainChart$stacked : true,
|
|
3173
|
-
type: "area",
|
|
3174
|
-
colors: mainChart.colors || ["#6366F1", "#10B981", "#06B6D4"],
|
|
3175
|
-
showLegend: false
|
|
3176
|
-
})
|
|
3177
3358
|
})]
|
|
3178
3359
|
})]
|
|
3179
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
3360
|
+
}), /*#__PURE__*/jsxRuntime.jsx(PageOneFooter, {
|
|
3180
3361
|
generatedBy: name,
|
|
3181
|
-
generatedLabel: generatedLabel
|
|
3182
|
-
page: 1
|
|
3362
|
+
generatedLabel: generatedLabel
|
|
3183
3363
|
})]
|
|
3184
3364
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3185
3365
|
"data-export-page": "2",
|
|
@@ -3485,7 +3665,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
3485
3665
|
})
|
|
3486
3666
|
})
|
|
3487
3667
|
}), /*#__PURE__*/jsxRuntime.jsx(Sparkline, {
|
|
3488
|
-
data: obData.length ? obData : [0,
|
|
3668
|
+
data: obData.length ? obData : [0, 0],
|
|
3489
3669
|
color: C.indigo,
|
|
3490
3670
|
width: 110,
|
|
3491
3671
|
height: 34
|
|
@@ -3497,10 +3677,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
3497
3677
|
display: "flex",
|
|
3498
3678
|
gap: 12
|
|
3499
3679
|
},
|
|
3500
|
-
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 (
|
|
3501
|
-
var
|
|
3502
|
-
l =
|
|
3503
|
-
v =
|
|
3680
|
+
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 (_ref21) {
|
|
3681
|
+
var _ref22 = _slicedToArray(_ref21, 2),
|
|
3682
|
+
l = _ref22[0],
|
|
3683
|
+
v = _ref22[1];
|
|
3504
3684
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3505
3685
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3506
3686
|
style: {
|
|
@@ -3561,7 +3741,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
3561
3741
|
})
|
|
3562
3742
|
})
|
|
3563
3743
|
}), /*#__PURE__*/jsxRuntime.jsx(Sparkline, {
|
|
3564
|
-
data: refData.length ? refData : [0,
|
|
3744
|
+
data: refData.length ? refData : [0, 0],
|
|
3565
3745
|
color: C.emerald,
|
|
3566
3746
|
width: 110,
|
|
3567
3747
|
height: 34
|
|
@@ -3573,10 +3753,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
3573
3753
|
display: "flex",
|
|
3574
3754
|
gap: 12
|
|
3575
3755
|
},
|
|
3576
|
-
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 (
|
|
3577
|
-
var
|
|
3578
|
-
l =
|
|
3579
|
-
v =
|
|
3756
|
+
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 (_ref23) {
|
|
3757
|
+
var _ref24 = _slicedToArray(_ref23, 2),
|
|
3758
|
+
l = _ref24[0],
|
|
3759
|
+
v = _ref24[1];
|
|
3580
3760
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3581
3761
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3582
3762
|
style: {
|