@ammarkhalidfarooq/dashboard-package 0.3.19 → 0.3.21
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 +36 -30
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +36 -30
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2298,7 +2298,7 @@ var NewOverview = function NewOverview(_ref) {
|
|
|
2298
2298
|
return item.date;
|
|
2299
2299
|
}) : categories;
|
|
2300
2300
|
var primaryCharts = [{
|
|
2301
|
-
label: "Total
|
|
2301
|
+
label: "Total Raised",
|
|
2302
2302
|
value: totalRevData.length > 0 ? "$".concat(totalRevTotal.toLocaleString()) : typeof (apiData === null || apiData === void 0 ? void 0 : apiData.totalRevenue) === "string" ? apiData.totalRevenue : "$9,200.00",
|
|
2303
2303
|
subValue: "Total Donations: ".concat((apiData === null || apiData === void 0 ? void 0 : apiData.totalDonations) || 215),
|
|
2304
2304
|
data: totalRevValues,
|
|
@@ -4796,7 +4796,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
4796
4796
|
"Total Raised": {
|
|
4797
4797
|
value: "$".concat(formatNumber(apiData === null || apiData === void 0 ? void 0 : apiData.totalRaisedCard)) || "$240.9K",
|
|
4798
4798
|
subValue: "".concat(Number((_apiData$totalRaisedP = apiData === null || apiData === void 0 ? void 0 : apiData.totalRaisedPrev) !== null && _apiData$totalRaisedP !== void 0 ? _apiData$totalRaisedP : 0).toFixed(2), "% vs ").concat(dateName || "last month"),
|
|
4799
|
-
label: "Total
|
|
4799
|
+
label: "Total Raised",
|
|
4800
4800
|
icon: PaidOutlined
|
|
4801
4801
|
},
|
|
4802
4802
|
"Net Raised": {
|
|
@@ -4854,33 +4854,38 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
4854
4854
|
var mainChart = extendedCharts.find(function (c) {
|
|
4855
4855
|
return c.label === selectedInfo.label;
|
|
4856
4856
|
}) || primaryCharts[0];
|
|
4857
|
-
if (activeMetric === "Total Raised"
|
|
4858
|
-
var
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4857
|
+
if (activeMetric === "Total Raised") {
|
|
4858
|
+
var hasStackedData = (apiData === null || apiData === void 0 ? void 0 : apiData.paidAds) || (apiData === null || apiData === void 0 ? void 0 : apiData.email) || (apiData === null || apiData === void 0 ? void 0 : apiData.organic);
|
|
4859
|
+
if (hasStackedData) {
|
|
4860
|
+
var categories = ((apiData === null || apiData === void 0 ? void 0 : apiData.organic) || (apiData === null || apiData === void 0 ? void 0 : apiData.paidAds) || (apiData === null || apiData === void 0 ? void 0 : apiData.email) || []).map(function (item) {
|
|
4861
|
+
return item.date;
|
|
4862
|
+
});
|
|
4863
|
+
var series = [{
|
|
4864
|
+
name: "Paid Ads",
|
|
4865
|
+
data: ((apiData === null || apiData === void 0 ? void 0 : apiData.paidAds) || []).map(function (item) {
|
|
4866
|
+
return item.value;
|
|
4867
|
+
})
|
|
4868
|
+
}, {
|
|
4869
|
+
name: "Organic",
|
|
4870
|
+
data: ((apiData === null || apiData === void 0 ? void 0 : apiData.organic) || []).map(function (item) {
|
|
4871
|
+
return item.value;
|
|
4872
|
+
})
|
|
4873
|
+
}, {
|
|
4874
|
+
name: "Email",
|
|
4875
|
+
data: ((apiData === null || apiData === void 0 ? void 0 : apiData.email) || []).map(function (item) {
|
|
4876
|
+
return item.value;
|
|
4877
|
+
})
|
|
4878
|
+
}];
|
|
4879
|
+
mainChart = _objectSpread2(_objectSpread2({}, mainChart), {}, {
|
|
4880
|
+
label: "Total revenue trend",
|
|
4881
|
+
data: undefined,
|
|
4882
|
+
// Clear single data property to force series usage
|
|
4883
|
+
series: series,
|
|
4884
|
+
categories: categories,
|
|
4885
|
+
stacked: true,
|
|
4886
|
+
colors: ["#6366F1", "#10B981", "#06B6D4"]
|
|
4887
|
+
});
|
|
4888
|
+
}
|
|
4884
4889
|
}
|
|
4885
4890
|
mainChart = _objectSpread2(_objectSpread2({}, mainChart), {}, {
|
|
4886
4891
|
label: mainChart.label || activeMetric,
|
|
@@ -4907,7 +4912,8 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
4907
4912
|
index: 0,
|
|
4908
4913
|
md: 12,
|
|
4909
4914
|
isPremium: true,
|
|
4910
|
-
isPrimary: true
|
|
4915
|
+
isPrimary: true,
|
|
4916
|
+
metric: activeMetric.includes("Raised") || activeMetric.includes("donation") ? "Revenue" : "Donors"
|
|
4911
4917
|
})
|
|
4912
4918
|
}), /*#__PURE__*/jsxs(Grid, {
|
|
4913
4919
|
container: true,
|