@ammarkhalidfarooq/dashboard-package 0.6.45 → 0.6.47
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 +25 -22
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +25 -22
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1576,11 +1576,14 @@ var THEME = {
|
|
|
1576
1576
|
var d$ = function d$(v) {
|
|
1577
1577
|
return "$".concat(formatNumber(Number(v !== null && v !== void 0 ? v : 0)));
|
|
1578
1578
|
};
|
|
1579
|
-
var
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
return
|
|
1579
|
+
var kpi$ = function kpi$(v) {
|
|
1580
|
+
return "$".concat(formatNumber(Number(v !== null && v !== void 0 ? v : 0).toFixed(2)));
|
|
1581
|
+
};
|
|
1582
|
+
var kpiPct = function kpiPct(v) {
|
|
1583
|
+
return "".concat(formatNumber(Number(v !== null && v !== void 0 ? v : 0).toFixed(2)), "%");
|
|
1584
|
+
};
|
|
1585
|
+
var kpiRoas = function kpiRoas(v) {
|
|
1586
|
+
return "".concat(formatNumber(Number(v !== null && v !== void 0 ? v : 0).toFixed(2)), "\xD7");
|
|
1584
1587
|
};
|
|
1585
1588
|
var pct = function pct(v) {
|
|
1586
1589
|
var dp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
@@ -2177,7 +2180,7 @@ var PageFooter = function PageFooter(_ref0) {
|
|
|
2177
2180
|
|
|
2178
2181
|
// ─── Main component ───────────────────────────────────────────────────────────
|
|
2179
2182
|
var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
|
|
2180
|
-
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,
|
|
2183
|
+
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, _ob$peakDay;
|
|
2181
2184
|
var _ref1$apiData = _ref1.apiData,
|
|
2182
2185
|
apiData = _ref1$apiData === void 0 ? {} : _ref1$apiData,
|
|
2183
2186
|
_ref1$dateName = _ref1.dateName,
|
|
@@ -2418,7 +2421,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
|
|
|
2418
2421
|
},
|
|
2419
2422
|
children: [/*#__PURE__*/jsx(KpiCard, {
|
|
2420
2423
|
title: "Total Raised",
|
|
2421
|
-
value:
|
|
2424
|
+
value: kpi$(totalRaised),
|
|
2422
2425
|
trend: hero.trend,
|
|
2423
2426
|
detail: hero.detail,
|
|
2424
2427
|
variant: "primary"
|
|
@@ -2430,7 +2433,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
|
|
|
2430
2433
|
},
|
|
2431
2434
|
children: [/*#__PURE__*/jsx(KpiCard, {
|
|
2432
2435
|
title: "Net Raised",
|
|
2433
|
-
value:
|
|
2436
|
+
value: kpi$(netRaised),
|
|
2434
2437
|
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),
|
|
2435
2438
|
detail: passThrough
|
|
2436
2439
|
}), /*#__PURE__*/jsx(KpiCard, {
|
|
@@ -2440,9 +2443,9 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
|
|
|
2440
2443
|
detail: ((_metricByTitle$Total3 = metricByTitle["Total Donors"]) === null || _metricByTitle$Total3 === void 0 ? void 0 : _metricByTitle$Total3.detail) || "".concat(formatNumber(newDonors), " new \xB7 ").concat(formatNumber(returningDonors), " returning")
|
|
2441
2444
|
}), /*#__PURE__*/jsx(KpiCard, {
|
|
2442
2445
|
title: "Avg Donation",
|
|
2443
|
-
value:
|
|
2444
|
-
trend: ((_metricByTitle$
|
|
2445
|
-
detail: ((_metricByTitle$
|
|
2446
|
+
value: kpi$(avgDonation),
|
|
2447
|
+
trend: ((_metricByTitle$AvgDo = metricByTitle["Avg Donation"]) === null || _metricByTitle$AvgDo === void 0 ? void 0 : _metricByTitle$AvgDo.trend) || signed((growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) || 8.4),
|
|
2448
|
+
detail: ((_metricByTitle$AvgDo2 = metricByTitle["Avg Donation"]) === null || _metricByTitle$AvgDo2 === void 0 ? void 0 : _metricByTitle$AvgDo2.detail) || "Median ".concat(d$((_apiData$medianGift = apiData === null || apiData === void 0 ? void 0 : apiData.medianGift) !== null && _apiData$medianGift !== void 0 ? _apiData$medianGift : 75), " \xB7 top decile ").concat(d$((_apiData$topDecileGif = apiData === null || apiData === void 0 ? void 0 : apiData.topDecileGift) !== null && _apiData$topDecileGif !== void 0 ? _apiData$topDecileGif : 850))
|
|
2446
2449
|
})]
|
|
2447
2450
|
}), /*#__PURE__*/jsxs("div", {
|
|
2448
2451
|
style: {
|
|
@@ -2452,19 +2455,19 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
|
|
|
2452
2455
|
},
|
|
2453
2456
|
children: [/*#__PURE__*/jsx(KpiCard, {
|
|
2454
2457
|
title: "ROAS",
|
|
2455
|
-
value: ((
|
|
2456
|
-
trend: ((_metricByTitle$
|
|
2457
|
-
detail: ((_metricByTitle$
|
|
2458
|
+
value: kpiRoas((_apiData$roasCard = apiData === null || apiData === void 0 ? void 0 : apiData.roasCard) !== null && _apiData$roasCard !== void 0 ? _apiData$roasCard : 3.0),
|
|
2459
|
+
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.4, "×"),
|
|
2460
|
+
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 : 72000), " spend \xB7 ").concat(d$((_apiData$attributedRe = apiData === null || apiData === void 0 ? void 0 : apiData.attributedRevenue) !== null && _apiData$attributedRe !== void 0 ? _apiData$attributedRe : 215000), " attrib.")
|
|
2458
2461
|
}), /*#__PURE__*/jsx(KpiCard, {
|
|
2459
2462
|
title: "Conversion",
|
|
2460
|
-
value: (
|
|
2461
|
-
trend: ((_metricByTitle$
|
|
2462
|
-
detail: ((_metricByTitle$
|
|
2463
|
+
value: kpiPct(convRate),
|
|
2464
|
+
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"),
|
|
2465
|
+
detail: ((_metricByTitle$Conver2 = metricByTitle.Conversion) === null || _metricByTitle$Conver2 === void 0 ? void 0 : _metricByTitle$Conver2.detail) || "".concat(formatNumber(totalDonors), " from ").concat(formatNumber(totalVisits), " visits")
|
|
2463
2466
|
}), /*#__PURE__*/jsx(KpiCard, {
|
|
2464
2467
|
title: "Refund Rate",
|
|
2465
|
-
value:
|
|
2466
|
-
trend: ((_metricByTitle$
|
|
2467
|
-
detail: ((_metricByTitle$
|
|
2468
|
+
value: pct(refundRate, 2),
|
|
2469
|
+
trend: ((_metricByTitle$Refund = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund === void 0 ? void 0 : _metricByTitle$Refund.trend) || signed((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundRateChange) || -0.3, "pp"),
|
|
2470
|
+
detail: ((_metricByTitle$Refund2 = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund2 === void 0 ? void 0 : _metricByTitle$Refund2.detail) || "".concat(formatNumber((_refundsRaw$refundCou = refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundCount) !== null && _refundsRaw$refundCou !== void 0 ? _refundsRaw$refundCou : 2), " refunds this period")
|
|
2468
2471
|
})]
|
|
2469
2472
|
}), /*#__PURE__*/jsxs("div", {
|
|
2470
2473
|
style: {
|
|
@@ -2507,7 +2510,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
|
|
|
2507
2510
|
fontWeight: 800,
|
|
2508
2511
|
color: "#111827"
|
|
2509
2512
|
},
|
|
2510
|
-
children:
|
|
2513
|
+
children: kpi$(totalRaised)
|
|
2511
2514
|
}), /*#__PURE__*/jsx("span", {
|
|
2512
2515
|
style: {
|
|
2513
2516
|
marginLeft: 8,
|
|
@@ -18594,7 +18597,7 @@ var EmailSection = function EmailSection(_ref) {
|
|
|
18594
18597
|
md: 4,
|
|
18595
18598
|
sx: {
|
|
18596
18599
|
paddingTop: "0px !important",
|
|
18597
|
-
paddingLeft: "6px !important",
|
|
18600
|
+
paddingLeft: xs ? "6px !important" : "unset !important",
|
|
18598
18601
|
marginTop: {
|
|
18599
18602
|
xs: "6px",
|
|
18600
18603
|
md: "0px"
|