@ammarkhalidfarooq/dashboard-package 0.6.2 → 0.6.4
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/README.md +11 -0
- package/dist/ActiveCampaignsCard.cjs.js +57 -8
- package/dist/ActiveCampaignsCard.cjs.js.map +1 -1
- package/dist/ActiveCampaignsCard.es.js +57 -8
- package/dist/ActiveCampaignsCard.es.js.map +1 -1
- package/dist/MetricCard.cjs.js +66 -14
- package/dist/MetricCard.cjs.js.map +1 -1
- package/dist/MetricCard.es.js +66 -14
- package/dist/MetricCard.es.js.map +1 -1
- package/dist/RenderChartCard.cjs.js +13 -7
- package/dist/RenderChartCard.cjs.js.map +1 -1
- package/dist/RenderChartCard.es.js +13 -7
- package/dist/RenderChartCard.es.js.map +1 -1
- package/dist/index.cjs.js +68 -49
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +68 -49
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -576,31 +576,37 @@ var RenderChartCard = function RenderChartCard(_ref) {
|
|
|
576
576
|
_ref$md = _ref.md,
|
|
577
577
|
md = _ref$md === void 0 ? 4 : _ref$md,
|
|
578
578
|
_ref$type = _ref.type,
|
|
579
|
-
type = _ref$type === void 0 ? "area" : _ref$type
|
|
579
|
+
type = _ref$type === void 0 ? "area" : _ref$type,
|
|
580
|
+
_ref$sx = _ref.sx,
|
|
581
|
+
sx = _ref$sx === void 0 ? {} : _ref$sx,
|
|
582
|
+
_ref$cardSx = _ref.cardSx,
|
|
583
|
+
cardSx = _ref$cardSx === void 0 ? {} : _ref$cardSx,
|
|
584
|
+
_ref$contentSx = _ref.contentSx,
|
|
585
|
+
contentSx = _ref$contentSx === void 0 ? {} : _ref$contentSx;
|
|
580
586
|
return /*#__PURE__*/jsx(Grid, {
|
|
581
587
|
item: true,
|
|
582
588
|
xs: 12,
|
|
583
589
|
md: md,
|
|
584
|
-
sx: {
|
|
590
|
+
sx: _objectSpread2({
|
|
585
591
|
display: "flex",
|
|
586
592
|
paddingTop: "0px !important"
|
|
587
|
-
},
|
|
593
|
+
}, sx),
|
|
588
594
|
children: /*#__PURE__*/jsx(Card, {
|
|
589
|
-
sx: {
|
|
595
|
+
sx: _objectSpread2({
|
|
590
596
|
width: "100%",
|
|
591
597
|
display: "flex",
|
|
592
598
|
flexDirection: "column",
|
|
593
599
|
boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
|
|
594
600
|
borderRadius: 4,
|
|
595
601
|
border: "1px solid #f0f0f0"
|
|
596
|
-
},
|
|
602
|
+
}, cardSx),
|
|
597
603
|
children: /*#__PURE__*/jsxs(CardContent, {
|
|
598
|
-
sx: {
|
|
604
|
+
sx: _objectSpread2({
|
|
599
605
|
p: item.exportMode ? 2 : 3,
|
|
600
606
|
flexGrow: 1,
|
|
601
607
|
display: "flex",
|
|
602
608
|
flexDirection: "column"
|
|
603
|
-
},
|
|
609
|
+
}, contentSx),
|
|
604
610
|
children: [/*#__PURE__*/jsxs(Box, {
|
|
605
611
|
sx: {
|
|
606
612
|
display: "flex",
|
|
@@ -903,24 +909,29 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
|
|
|
903
909
|
gridTemplateColumns = _ref$gridTemplateColu === void 0 ? "3fr 1fr 1.5fr 0.8fr 1fr " : _ref$gridTemplateColu,
|
|
904
910
|
height = _ref.height,
|
|
905
911
|
_ref$compact = _ref.compact,
|
|
906
|
-
compact = _ref$compact === void 0 ? false : _ref$compact
|
|
912
|
+
compact = _ref$compact === void 0 ? false : _ref$compact,
|
|
913
|
+
_ref$sx = _ref.sx,
|
|
914
|
+
sx = _ref$sx === void 0 ? {} : _ref$sx,
|
|
915
|
+
_ref$headerSx = _ref.headerSx,
|
|
916
|
+
headerSx = _ref$headerSx === void 0 ? {} : _ref$headerSx,
|
|
917
|
+
_ref$tableSx = _ref.tableSx,
|
|
918
|
+
tableSx = _ref$tableSx === void 0 ? {} : _ref$tableSx;
|
|
907
919
|
return /*#__PURE__*/jsxs(Box, {
|
|
908
|
-
sx: {
|
|
920
|
+
sx: _objectSpread2({
|
|
909
921
|
bgcolor: "#fff",
|
|
910
922
|
borderRadius: compact ? 3 : 4,
|
|
911
923
|
border: "1px solid #f0f0f0",
|
|
912
924
|
boxShadow: compact ? "0 2px 12px rgba(0,0,0,0.05)" : "0 4px 24px rgba(0,0,0,0.06)",
|
|
913
925
|
p: compact ? 1.5 : 3,
|
|
914
926
|
height: height
|
|
915
|
-
|
|
916
|
-
},
|
|
927
|
+
}, sx),
|
|
917
928
|
children: [/*#__PURE__*/jsxs(Box, {
|
|
918
|
-
sx: {
|
|
929
|
+
sx: _objectSpread2({
|
|
919
930
|
display: "flex",
|
|
920
931
|
justifyContent: "space-between",
|
|
921
932
|
alignItems: "flex-start",
|
|
922
933
|
mb: compact ? 1.25 : 3
|
|
923
|
-
},
|
|
934
|
+
}, headerSx),
|
|
924
935
|
children: [/*#__PURE__*/jsxs(Box, {
|
|
925
936
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
926
937
|
sx: {
|
|
@@ -948,9 +959,9 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
|
|
|
948
959
|
children: actionLabel
|
|
949
960
|
})]
|
|
950
961
|
}), /*#__PURE__*/jsx(Box, {
|
|
951
|
-
sx: {
|
|
962
|
+
sx: _objectSpread2({
|
|
952
963
|
overflowX: compact ? "hidden" : "auto"
|
|
953
|
-
},
|
|
964
|
+
}, tableSx),
|
|
954
965
|
children: /*#__PURE__*/jsxs(Box, {
|
|
955
966
|
sx: {
|
|
956
967
|
minWidth: compact ? 0 : "600px"
|
|
@@ -1156,9 +1167,19 @@ var MetricCard$1 = function MetricCard(_ref) {
|
|
|
1156
1167
|
active = _ref.active,
|
|
1157
1168
|
warning = _ref.warning,
|
|
1158
1169
|
error = _ref.error,
|
|
1159
|
-
onClick = _ref.onClick
|
|
1170
|
+
onClick = _ref.onClick,
|
|
1171
|
+
_ref$sx = _ref.sx,
|
|
1172
|
+
sx = _ref$sx === void 0 ? {} : _ref$sx,
|
|
1173
|
+
_ref$titleSx = _ref.titleSx,
|
|
1174
|
+
titleSx = _ref$titleSx === void 0 ? {} : _ref$titleSx,
|
|
1175
|
+
_ref$valueSx = _ref.valueSx,
|
|
1176
|
+
valueSx = _ref$valueSx === void 0 ? {} : _ref$valueSx,
|
|
1177
|
+
_ref$captionSx = _ref.captionSx,
|
|
1178
|
+
captionSx = _ref$captionSx === void 0 ? {} : _ref$captionSx,
|
|
1179
|
+
_ref$avatarSx = _ref.avatarSx,
|
|
1180
|
+
avatarSx = _ref$avatarSx === void 0 ? {} : _ref$avatarSx;
|
|
1160
1181
|
return /*#__PURE__*/jsxs(Box, {
|
|
1161
|
-
sx: {
|
|
1182
|
+
sx: _objectSpread2({
|
|
1162
1183
|
bgcolor: "#fff",
|
|
1163
1184
|
border: "1.5px solid ".concat(active ? "#4F46E5" : warning ? "#F3B33D" : error ? "#ef4444" : "#F1F1F5"),
|
|
1164
1185
|
borderRadius: "16px",
|
|
@@ -1170,45 +1191,43 @@ var MetricCard$1 = function MetricCard(_ref) {
|
|
|
1170
1191
|
paddingBottom: "10px !important",
|
|
1171
1192
|
height: 92,
|
|
1172
1193
|
boxShadow: "0 14px 30px rgba(21, 26, 45, 0.06)"
|
|
1173
|
-
},
|
|
1194
|
+
}, sx),
|
|
1174
1195
|
onClick: onClick,
|
|
1175
1196
|
children: [/*#__PURE__*/jsxs(Stack, {
|
|
1176
1197
|
direction: "row",
|
|
1177
1198
|
justifyContent: "space-between",
|
|
1178
1199
|
alignItems: "center",
|
|
1179
1200
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
1180
|
-
sx: {
|
|
1201
|
+
sx: _objectSpread2({
|
|
1181
1202
|
color: active ? "#818CF8" : "#999EAA",
|
|
1182
1203
|
fontSize: 13,
|
|
1183
1204
|
fontWeight: 500,
|
|
1184
1205
|
letterSpacing: 0
|
|
1185
|
-
},
|
|
1206
|
+
}, titleSx),
|
|
1186
1207
|
children: title
|
|
1187
1208
|
}), /*#__PURE__*/jsx(Avatar, {
|
|
1188
|
-
sx: {
|
|
1209
|
+
sx: _objectSpread2({
|
|
1189
1210
|
width: 30,
|
|
1190
1211
|
height: 30,
|
|
1191
1212
|
bgcolor: warning ? "#FFF3CF" : error ? "#fee2e2" : "#EEF2FF",
|
|
1192
1213
|
color: warning ? "#B45309" : error ? "#ef4444" : "#4F46E5"
|
|
1193
|
-
},
|
|
1214
|
+
}, avatarSx),
|
|
1194
1215
|
children: icon
|
|
1195
1216
|
})]
|
|
1196
1217
|
}), /*#__PURE__*/jsx(Typography, {
|
|
1197
|
-
sx: {
|
|
1198
|
-
// mt: 0.3,
|
|
1218
|
+
sx: _objectSpread2({
|
|
1199
1219
|
fontSize: 22,
|
|
1200
1220
|
fontWeight: 700,
|
|
1201
1221
|
color: active ? "#4F46E5" : "#050509",
|
|
1202
1222
|
lineHeight: 1.15
|
|
1203
|
-
},
|
|
1223
|
+
}, valueSx),
|
|
1204
1224
|
children: value
|
|
1205
1225
|
}), /*#__PURE__*/jsx(Typography, {
|
|
1206
|
-
sx: {
|
|
1207
|
-
// mt: 1.05,
|
|
1226
|
+
sx: _objectSpread2({
|
|
1208
1227
|
fontSize: 12,
|
|
1209
1228
|
fontWeight: 500,
|
|
1210
|
-
color: caption.includes("failed") ? "#4F46E5" : error ? "#ef4444" : "#0B8F61"
|
|
1211
|
-
},
|
|
1229
|
+
color: caption !== null && caption !== void 0 && caption.includes("failed") ? "#4F46E5" : error ? "#ef4444" : "#0B8F61"
|
|
1230
|
+
}, captionSx),
|
|
1212
1231
|
children: caption
|
|
1213
1232
|
})]
|
|
1214
1233
|
});
|
|
@@ -14500,7 +14519,7 @@ var html2canvas_esm = /*#__PURE__*/Object.freeze({
|
|
|
14500
14519
|
});
|
|
14501
14520
|
|
|
14502
14521
|
var OverallSection = function OverallSection(_ref) {
|
|
14503
|
-
var _apiData$overviewStat, _apiData$overviewStat2, _apiData$overviewStat3, _apiData$overviewStat4, _apiData$overviewStat5, _apiData$overviewStat6, _apiData$overviewStat7, _apiData$overviewStat8, _apiData$overviewStat9, _apiData$overviewStat0, _apiData$overviewStat1, _apiData$overviewStat10, _apiData$roasCard, _apiData$roasCardPrev, _apiData$
|
|
14522
|
+
var _apiData$overviewStat, _apiData$overviewStat2, _apiData$overviewStat3, _apiData$overviewStat4, _apiData$overviewStat5, _apiData$overviewStat6, _apiData$overviewStat7, _apiData$overviewStat8, _apiData$overviewStat9, _apiData$overviewStat0, _apiData$overviewStat1, _apiData$overviewStat10, _apiData$overviewStat11, _apiData$overviewStat12, _apiData$roasCard, _apiData$roasCardPrev, _apiData$overviewStat13, _apiData$overviewStat14, _apiData$overviewStat15, _apiData$overviewStat16;
|
|
14504
14523
|
var _ref$apiData = _ref.apiData,
|
|
14505
14524
|
apiData = _ref$apiData === void 0 ? {} : _ref$apiData,
|
|
14506
14525
|
primaryCharts = _ref.primaryCharts,
|
|
@@ -14569,8 +14588,8 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14569
14588
|
warning: false
|
|
14570
14589
|
},
|
|
14571
14590
|
"Net Raised": {
|
|
14572
|
-
value: "$".concat(formatNumber(apiData === null || apiData === void 0 || (_apiData$
|
|
14573
|
-
subValue: "".concat(Number((_apiData$
|
|
14591
|
+
value: "$".concat(formatNumber(((_apiData$overviewStat4 = apiData === null || apiData === void 0 || (_apiData$overviewStat5 = apiData.overviewStats) === null || _apiData$overviewStat5 === void 0 || (_apiData$overviewStat5 = _apiData$overviewStat5.overview) === null || _apiData$overviewStat5 === void 0 ? void 0 : _apiData$overviewStat5.netRevenue) !== null && _apiData$overviewStat4 !== void 0 ? _apiData$overviewStat4 : 0).toFixed(2))),
|
|
14592
|
+
subValue: "".concat(Number((_apiData$overviewStat6 = apiData === null || apiData === void 0 || (_apiData$overviewStat7 = apiData.overviewStats) === null || _apiData$overviewStat7 === void 0 || (_apiData$overviewStat7 = _apiData$overviewStat7.overview.growthPercentage) === null || _apiData$overviewStat7 === void 0 ? void 0 : _apiData$overviewStat7.netRevenue) !== null && _apiData$overviewStat6 !== void 0 ? _apiData$overviewStat6 : 0).toFixed(2), "% vs ").concat(dateName !== null && dateName !== void 0 ? dateName : "previous period"),
|
|
14574
14593
|
label: "Net Raised",
|
|
14575
14594
|
icon: /*#__PURE__*/jsx(FavoriteOutlined, {}),
|
|
14576
14595
|
money: true,
|
|
@@ -14578,8 +14597,8 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14578
14597
|
warning: false
|
|
14579
14598
|
},
|
|
14580
14599
|
"Total Donors": {
|
|
14581
|
-
value: (apiData === null || apiData === void 0 || (_apiData$
|
|
14582
|
-
subValue: "".concat(Number((_apiData$
|
|
14600
|
+
value: (apiData === null || apiData === void 0 || (_apiData$overviewStat8 = apiData.overviewStats) === null || _apiData$overviewStat8 === void 0 || (_apiData$overviewStat8 = _apiData$overviewStat8.overview) === null || _apiData$overviewStat8 === void 0 ? void 0 : _apiData$overviewStat8.totalDonations) || "0",
|
|
14601
|
+
subValue: "".concat(Number((_apiData$overviewStat9 = apiData === null || apiData === void 0 || (_apiData$overviewStat0 = apiData.overviewStats) === null || _apiData$overviewStat0 === void 0 || (_apiData$overviewStat0 = _apiData$overviewStat0.overview.growthPercentage) === null || _apiData$overviewStat0 === void 0 ? void 0 : _apiData$overviewStat0.totalDonations) !== null && _apiData$overviewStat9 !== void 0 ? _apiData$overviewStat9 : 0).toFixed(2), "%") || "0 new",
|
|
14583
14602
|
label: "Total Donors",
|
|
14584
14603
|
icon: /*#__PURE__*/jsx(PeopleAltOutlined, {}),
|
|
14585
14604
|
money: false,
|
|
@@ -14587,8 +14606,8 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14587
14606
|
warning: false
|
|
14588
14607
|
},
|
|
14589
14608
|
"Avg donation": {
|
|
14590
|
-
value: "$".concat(formatNumber(apiData === null || apiData === void 0 || (_apiData$
|
|
14591
|
-
subValue: "".concat(Number((_apiData$
|
|
14609
|
+
value: "$".concat(formatNumber(((_apiData$overviewStat1 = apiData === null || apiData === void 0 || (_apiData$overviewStat10 = apiData.overviewStats) === null || _apiData$overviewStat10 === void 0 || (_apiData$overviewStat10 = _apiData$overviewStat10.overview) === null || _apiData$overviewStat10 === void 0 ? void 0 : _apiData$overviewStat10.overallAVGDonations) !== null && _apiData$overviewStat1 !== void 0 ? _apiData$overviewStat1 : 0).toFixed(2))),
|
|
14610
|
+
subValue: "".concat(Number((_apiData$overviewStat11 = apiData === null || apiData === void 0 || (_apiData$overviewStat12 = apiData.overviewStats) === null || _apiData$overviewStat12 === void 0 || (_apiData$overviewStat12 = _apiData$overviewStat12.overview.growthPercentage) === null || _apiData$overviewStat12 === void 0 ? void 0 : _apiData$overviewStat12.overallAVGDonations) !== null && _apiData$overviewStat11 !== void 0 ? _apiData$overviewStat11 : 0).toFixed(2), "% vs ").concat(dateName !== null && dateName !== void 0 ? dateName : "last month"),
|
|
14592
14611
|
label: "Average Donation Amount",
|
|
14593
14612
|
icon: /*#__PURE__*/jsx(PaidOutlined, {}),
|
|
14594
14613
|
money: true,
|
|
@@ -14596,7 +14615,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14596
14615
|
warning: false
|
|
14597
14616
|
},
|
|
14598
14617
|
"ROAS": {
|
|
14599
|
-
value: "".concat(formatNumber((_apiData$roasCard = apiData === null || apiData === void 0 ? void 0 : apiData.roasCard) !== null && _apiData$roasCard !== void 0 ? _apiData$roasCard : 0), "x"),
|
|
14618
|
+
value: "".concat(formatNumber(((_apiData$roasCard = apiData === null || apiData === void 0 ? void 0 : apiData.roasCard) !== null && _apiData$roasCard !== void 0 ? _apiData$roasCard : 0).toFixed(2)), "x"),
|
|
14600
14619
|
subValue: "".concat(Number((_apiData$roasCardPrev = apiData === null || apiData === void 0 ? void 0 : apiData.roasCardPrev) !== null && _apiData$roasCardPrev !== void 0 ? _apiData$roasCardPrev : 0).toFixed(2), "x vs ").concat(dateName !== null && dateName !== void 0 ? dateName : "last month"),
|
|
14601
14620
|
label: "ROAS",
|
|
14602
14621
|
icon: /*#__PURE__*/jsx(TrendingUp, {}),
|
|
@@ -14605,8 +14624,8 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14605
14624
|
warning: false
|
|
14606
14625
|
},
|
|
14607
14626
|
"Conversion": {
|
|
14608
|
-
value: "".concat(formatNumber(apiData === null || apiData === void 0 || (_apiData$
|
|
14609
|
-
subValue: "".concat(((_apiData$
|
|
14627
|
+
value: "".concat(formatNumber(((_apiData$overviewStat13 = apiData === null || apiData === void 0 || (_apiData$overviewStat14 = apiData.overviewStats) === null || _apiData$overviewStat14 === void 0 || (_apiData$overviewStat14 = _apiData$overviewStat14.overview) === null || _apiData$overviewStat14 === void 0 ? void 0 : _apiData$overviewStat14.conversionRate) !== null && _apiData$overviewStat13 !== void 0 ? _apiData$overviewStat13 : 0).toFixed(2)), "%"),
|
|
14628
|
+
subValue: "".concat(((_apiData$overviewStat15 = apiData === null || apiData === void 0 || (_apiData$overviewStat16 = apiData.overviewStats) === null || _apiData$overviewStat16 === void 0 || (_apiData$overviewStat16 = _apiData$overviewStat16.overview) === null || _apiData$overviewStat16 === void 0 || (_apiData$overviewStat16 = _apiData$overviewStat16.growthPercentage) === null || _apiData$overviewStat16 === void 0 ? void 0 : _apiData$overviewStat16.conversionRate) !== null && _apiData$overviewStat15 !== void 0 ? _apiData$overviewStat15 : 0).toFixed(2), "%") || "0%",
|
|
14610
14629
|
label: "Conversion Rate",
|
|
14611
14630
|
icon: /*#__PURE__*/jsx(Adjust, {}),
|
|
14612
14631
|
money: false,
|
|
@@ -14689,8 +14708,8 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14689
14708
|
return c.label === selectedInfo.label;
|
|
14690
14709
|
}) || primaryCharts[0];
|
|
14691
14710
|
if (activeMetric === "Total Raised") {
|
|
14692
|
-
var _apiData$
|
|
14693
|
-
var stackedData = apiData === null || apiData === void 0 || (_apiData$
|
|
14711
|
+
var _apiData$overviewStat17;
|
|
14712
|
+
var stackedData = apiData === null || apiData === void 0 || (_apiData$overviewStat17 = apiData.overviewStats) === null || _apiData$overviewStat17 === void 0 ? void 0 : _apiData$overviewStat17.totalRaised;
|
|
14694
14713
|
var hasStackedData = (stackedData === null || stackedData === void 0 ? void 0 : stackedData.paidAds) || (stackedData === null || stackedData === void 0 ? void 0 : stackedData.email) || (stackedData === null || stackedData === void 0 ? void 0 : stackedData.organic);
|
|
14695
14714
|
if (hasStackedData) {
|
|
14696
14715
|
var categories = ((stackedData === null || stackedData === void 0 ? void 0 : stackedData.organic) || (stackedData === null || stackedData === void 0 ? void 0 : stackedData.paidAds) || (stackedData === null || stackedData === void 0 ? void 0 : stackedData.email) || []).map(function (item) {
|
|
@@ -14729,8 +14748,8 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14729
14748
|
}
|
|
14730
14749
|
}
|
|
14731
14750
|
if (activeMetric === "Net Raised") {
|
|
14732
|
-
var _apiData$
|
|
14733
|
-
var netData = apiData === null || apiData === void 0 || (_apiData$
|
|
14751
|
+
var _apiData$overviewStat18;
|
|
14752
|
+
var netData = apiData === null || apiData === void 0 || (_apiData$overviewStat18 = apiData.overviewStats) === null || _apiData$overviewStat18 === void 0 ? void 0 : _apiData$overviewStat18.netRaised;
|
|
14734
14753
|
var _hasStackedData = (netData === null || netData === void 0 ? void 0 : netData.paidAds) || (netData === null || netData === void 0 ? void 0 : netData.email) || (netData === null || netData === void 0 ? void 0 : netData.organic);
|
|
14735
14754
|
if (_hasStackedData) {
|
|
14736
14755
|
var _categories = ((netData === null || netData === void 0 ? void 0 : netData.organic) || (netData === null || netData === void 0 ? void 0 : netData.paidAds) || (netData === null || netData === void 0 ? void 0 : netData.email) || []).map(function (item) {
|
|
@@ -14777,8 +14796,8 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14777
14796
|
}
|
|
14778
14797
|
}
|
|
14779
14798
|
if (activeMetric === "Total Donors") {
|
|
14780
|
-
var _apiData$
|
|
14781
|
-
var donorsData = apiData === null || apiData === void 0 || (_apiData$
|
|
14799
|
+
var _apiData$overviewStat19;
|
|
14800
|
+
var donorsData = apiData === null || apiData === void 0 || (_apiData$overviewStat19 = apiData.overviewStats) === null || _apiData$overviewStat19 === void 0 ? void 0 : _apiData$overviewStat19.totalDonations;
|
|
14782
14801
|
var _hasStackedData2 = (donorsData === null || donorsData === void 0 ? void 0 : donorsData.paidAds) || (donorsData === null || donorsData === void 0 ? void 0 : donorsData.email) || (donorsData === null || donorsData === void 0 ? void 0 : donorsData.organic);
|
|
14783
14802
|
if (_hasStackedData2) {
|
|
14784
14803
|
var _categories2 = ((donorsData === null || donorsData === void 0 ? void 0 : donorsData.organic) || (donorsData === null || donorsData === void 0 ? void 0 : donorsData.paidAds) || (donorsData === null || donorsData === void 0 ? void 0 : donorsData.email) || []).map(function (item) {
|
|
@@ -14872,8 +14891,8 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14872
14891
|
}
|
|
14873
14892
|
}
|
|
14874
14893
|
if (activeMetric === "Conversion") {
|
|
14875
|
-
var _apiData$
|
|
14876
|
-
var conversionData = apiData === null || apiData === void 0 || (_apiData$
|
|
14894
|
+
var _apiData$overviewStat20;
|
|
14895
|
+
var conversionData = apiData === null || apiData === void 0 || (_apiData$overviewStat20 = apiData.overviewStats) === null || _apiData$overviewStat20 === void 0 ? void 0 : _apiData$overviewStat20.conversionRate;
|
|
14877
14896
|
var _hasStackedData4 = (conversionData === null || conversionData === void 0 ? void 0 : conversionData.paidAds) || (conversionData === null || conversionData === void 0 ? void 0 : conversionData.email) || (conversionData === null || conversionData === void 0 ? void 0 : conversionData.organic);
|
|
14878
14897
|
if (_hasStackedData4) {
|
|
14879
14898
|
var _categories4 = ((conversionData === null || conversionData === void 0 ? void 0 : conversionData.organic) || (conversionData === null || conversionData === void 0 ? void 0 : conversionData.paidAds) || (conversionData === null || conversionData === void 0 ? void 0 : conversionData.email) || []).map(function (item) {
|
|
@@ -14920,8 +14939,8 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14920
14939
|
}
|
|
14921
14940
|
}
|
|
14922
14941
|
if (activeMetric === "Avg donation") {
|
|
14923
|
-
var _apiData$
|
|
14924
|
-
var avgData = apiData === null || apiData === void 0 || (_apiData$
|
|
14942
|
+
var _apiData$overviewStat21;
|
|
14943
|
+
var avgData = apiData === null || apiData === void 0 || (_apiData$overviewStat21 = apiData.overviewStats) === null || _apiData$overviewStat21 === void 0 ? void 0 : _apiData$overviewStat21.avgDonations;
|
|
14925
14944
|
var _hasStackedData5 = (avgData === null || avgData === void 0 ? void 0 : avgData.paidAds) || (avgData === null || avgData === void 0 ? void 0 : avgData.email) || (avgData === null || avgData === void 0 ? void 0 : avgData.organic);
|
|
14926
14945
|
if (_hasStackedData5) {
|
|
14927
14946
|
var _categories5 = ((avgData === null || avgData === void 0 ? void 0 : avgData.organic) || (avgData === null || avgData === void 0 ? void 0 : avgData.paidAds) || (avgData === null || avgData === void 0 ? void 0 : avgData.email) || []).map(function (item) {
|