@ammarkhalidfarooq/dashboard-package 0.6.1 → 0.6.3
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 +64 -1
- 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 +125 -0
- package/dist/MetricCard.cjs.js.map +1 -0
- package/dist/MetricCard.es.js +123 -0
- package/dist/MetricCard.es.js.map +1 -0
- 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 +113 -93
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +114 -95
- package/dist/index.es.js.map +1 -1
- package/package.json +5 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Suspense, lazy, useMemo, useState, useRef, useEffect } from 'react';
|
|
2
|
-
import { Box, Button, Menu, MenuItem, Grid, Card, CardContent, Typography, IconButton, ThemeProvider, CircularProgress, Avatar, LinearProgress, TableContainer, Table, TableHead, TableRow, TableCell, TableBody
|
|
2
|
+
import { Box, Button, Menu, MenuItem, Grid, Card, CardContent, Typography, IconButton, ThemeProvider, CircularProgress, Avatar, LinearProgress, Stack, TableContainer, Table, TableHead, TableRow, TableCell, TableBody } from '@mui/material';
|
|
3
3
|
import { MoreHoriz, TrendingUp, MoreVert, Check, InfoOutlined, Settings, Adjust, PaidOutlined, PeopleAltOutlined, FavoriteOutlined, PersonOutlined, IndeterminateCheckBoxOutlined, SearchOutlined, HighlightOff, NearMe, Email, NotInterested } from '@mui/icons-material';
|
|
4
4
|
import { createTheme, useTheme } from '@mui/material/styles';
|
|
5
5
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -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"
|
|
@@ -1148,6 +1159,80 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
|
|
|
1148
1159
|
});
|
|
1149
1160
|
};
|
|
1150
1161
|
|
|
1162
|
+
var MetricCard$1 = function MetricCard(_ref) {
|
|
1163
|
+
var title = _ref.title,
|
|
1164
|
+
value = _ref.value,
|
|
1165
|
+
caption = _ref.caption,
|
|
1166
|
+
icon = _ref.icon,
|
|
1167
|
+
active = _ref.active,
|
|
1168
|
+
warning = _ref.warning,
|
|
1169
|
+
error = _ref.error,
|
|
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;
|
|
1181
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
1182
|
+
sx: _objectSpread2({
|
|
1183
|
+
bgcolor: "#fff",
|
|
1184
|
+
border: "1.5px solid ".concat(active ? "#4F46E5" : warning ? "#F3B33D" : error ? "#ef4444" : "#F1F1F5"),
|
|
1185
|
+
borderRadius: "16px",
|
|
1186
|
+
p: {
|
|
1187
|
+
xs: 1.75,
|
|
1188
|
+
md: 2
|
|
1189
|
+
},
|
|
1190
|
+
paddingTop: "10px !important",
|
|
1191
|
+
paddingBottom: "10px !important",
|
|
1192
|
+
height: 92,
|
|
1193
|
+
boxShadow: "0 14px 30px rgba(21, 26, 45, 0.06)"
|
|
1194
|
+
}, sx),
|
|
1195
|
+
onClick: onClick,
|
|
1196
|
+
children: [/*#__PURE__*/jsxs(Stack, {
|
|
1197
|
+
direction: "row",
|
|
1198
|
+
justifyContent: "space-between",
|
|
1199
|
+
alignItems: "center",
|
|
1200
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
1201
|
+
sx: _objectSpread2({
|
|
1202
|
+
color: active ? "#818CF8" : "#999EAA",
|
|
1203
|
+
fontSize: 13,
|
|
1204
|
+
fontWeight: 500,
|
|
1205
|
+
letterSpacing: 0
|
|
1206
|
+
}, titleSx),
|
|
1207
|
+
children: title
|
|
1208
|
+
}), /*#__PURE__*/jsx(Avatar, {
|
|
1209
|
+
sx: _objectSpread2({
|
|
1210
|
+
width: 30,
|
|
1211
|
+
height: 30,
|
|
1212
|
+
bgcolor: warning ? "#FFF3CF" : error ? "#fee2e2" : "#EEF2FF",
|
|
1213
|
+
color: warning ? "#B45309" : error ? "#ef4444" : "#4F46E5"
|
|
1214
|
+
}, avatarSx),
|
|
1215
|
+
children: icon
|
|
1216
|
+
})]
|
|
1217
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
1218
|
+
sx: _objectSpread2({
|
|
1219
|
+
fontSize: 22,
|
|
1220
|
+
fontWeight: 700,
|
|
1221
|
+
color: active ? "#4F46E5" : "#050509",
|
|
1222
|
+
lineHeight: 1.15
|
|
1223
|
+
}, valueSx),
|
|
1224
|
+
children: value
|
|
1225
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
1226
|
+
sx: _objectSpread2({
|
|
1227
|
+
fontSize: 12,
|
|
1228
|
+
fontWeight: 500,
|
|
1229
|
+
color: caption !== null && caption !== void 0 && caption.includes("failed") ? "#4F46E5" : error ? "#ef4444" : "#0B8F61"
|
|
1230
|
+
}, captionSx),
|
|
1231
|
+
children: caption
|
|
1232
|
+
})]
|
|
1233
|
+
});
|
|
1234
|
+
};
|
|
1235
|
+
|
|
1151
1236
|
function formatNumber(num) {
|
|
1152
1237
|
if (num >= 1000000000) {
|
|
1153
1238
|
return (num / 1000000000).toFixed(1).replace(/\.0$/, "") + "B";
|
|
@@ -1547,7 +1632,7 @@ var TrendPill = function TrendPill(_ref) {
|
|
|
1547
1632
|
children: value
|
|
1548
1633
|
});
|
|
1549
1634
|
};
|
|
1550
|
-
var MetricCard
|
|
1635
|
+
var MetricCard = function MetricCard(_ref2) {
|
|
1551
1636
|
var title = _ref2.title,
|
|
1552
1637
|
value = _ref2.value,
|
|
1553
1638
|
trend = _ref2.trend,
|
|
@@ -1671,7 +1756,7 @@ var ReportKpiSection = function ReportKpiSection(_ref3) {
|
|
|
1671
1756
|
gap: exportMode ? 1 : 2
|
|
1672
1757
|
},
|
|
1673
1758
|
children: metrics.map(function (m) {
|
|
1674
|
-
return /*#__PURE__*/jsx(MetricCard
|
|
1759
|
+
return /*#__PURE__*/jsx(MetricCard, _objectSpread2(_objectSpread2({}, m), {}, {
|
|
1675
1760
|
exportMode: exportMode
|
|
1676
1761
|
}), m.title);
|
|
1677
1762
|
})
|
|
@@ -14433,72 +14518,6 @@ var html2canvas_esm = /*#__PURE__*/Object.freeze({
|
|
|
14433
14518
|
default: html2canvas
|
|
14434
14519
|
});
|
|
14435
14520
|
|
|
14436
|
-
var MetricCard = function MetricCard(_ref) {
|
|
14437
|
-
var title = _ref.title,
|
|
14438
|
-
value = _ref.value,
|
|
14439
|
-
caption = _ref.caption,
|
|
14440
|
-
icon = _ref.icon,
|
|
14441
|
-
active = _ref.active,
|
|
14442
|
-
warning = _ref.warning,
|
|
14443
|
-
error = _ref.error,
|
|
14444
|
-
onClick = _ref.onClick;
|
|
14445
|
-
return /*#__PURE__*/jsxs(Box, {
|
|
14446
|
-
sx: {
|
|
14447
|
-
bgcolor: "#fff",
|
|
14448
|
-
border: "1.5px solid ".concat(active ? "#4F46E5" : warning ? "#F3B33D" : error ? "#ef4444" : "#F1F1F5"),
|
|
14449
|
-
borderRadius: "16px",
|
|
14450
|
-
p: {
|
|
14451
|
-
xs: 1.75,
|
|
14452
|
-
md: 2
|
|
14453
|
-
},
|
|
14454
|
-
paddingTop: "10px !important",
|
|
14455
|
-
paddingBottom: "10px !important",
|
|
14456
|
-
height: 92,
|
|
14457
|
-
boxShadow: "0 14px 30px rgba(21, 26, 45, 0.06)"
|
|
14458
|
-
},
|
|
14459
|
-
onClick: onClick,
|
|
14460
|
-
children: [/*#__PURE__*/jsxs(Stack, {
|
|
14461
|
-
direction: "row",
|
|
14462
|
-
justifyContent: "space-between",
|
|
14463
|
-
alignItems: "center",
|
|
14464
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
14465
|
-
sx: {
|
|
14466
|
-
color: active ? "#818CF8" : "#999EAA",
|
|
14467
|
-
fontSize: 13,
|
|
14468
|
-
fontWeight: 500,
|
|
14469
|
-
letterSpacing: 0
|
|
14470
|
-
},
|
|
14471
|
-
children: title
|
|
14472
|
-
}), /*#__PURE__*/jsx(Avatar, {
|
|
14473
|
-
sx: {
|
|
14474
|
-
width: 30,
|
|
14475
|
-
height: 30,
|
|
14476
|
-
bgcolor: warning ? "#FFF3CF" : error ? "#fee2e2" : "#EEF2FF",
|
|
14477
|
-
color: warning ? "#B45309" : error ? "#ef4444" : "#4F46E5"
|
|
14478
|
-
},
|
|
14479
|
-
children: icon
|
|
14480
|
-
})]
|
|
14481
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
14482
|
-
sx: {
|
|
14483
|
-
// mt: 0.3,
|
|
14484
|
-
fontSize: 22,
|
|
14485
|
-
fontWeight: 700,
|
|
14486
|
-
color: active ? "#4F46E5" : "#050509",
|
|
14487
|
-
lineHeight: 1.15
|
|
14488
|
-
},
|
|
14489
|
-
children: value
|
|
14490
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
14491
|
-
sx: {
|
|
14492
|
-
// mt: 1.05,
|
|
14493
|
-
fontSize: 12,
|
|
14494
|
-
fontWeight: 500,
|
|
14495
|
-
color: caption.includes("failed") ? "#4F46E5" : error ? "#ef4444" : "#0B8F61"
|
|
14496
|
-
},
|
|
14497
|
-
children: caption
|
|
14498
|
-
})]
|
|
14499
|
-
});
|
|
14500
|
-
};
|
|
14501
|
-
|
|
14502
14521
|
var OverallSection = function OverallSection(_ref) {
|
|
14503
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$roasCard, _apiData$roasCardPrev, _apiData$overviewStat11, _apiData$overviewStat12, _apiData$overviewStat13;
|
|
14504
14523
|
var _ref$apiData = _ref.apiData,
|
|
@@ -14541,7 +14560,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14541
14560
|
})) {
|
|
14542
14561
|
charts.push({
|
|
14543
14562
|
label: "Total Donors",
|
|
14544
|
-
value: (apiData === null || apiData === void 0 ? void 0 : apiData.totalDonors) || "
|
|
14563
|
+
value: (apiData === null || apiData === void 0 ? void 0 : apiData.totalDonors) || "0",
|
|
14545
14564
|
data: (apiData === null || apiData === void 0 ? void 0 : apiData.donationsData) || [15, 22, 18, 30, 25, 35, 42, 45, 28],
|
|
14546
14565
|
categories: categories
|
|
14547
14566
|
});
|
|
@@ -14569,7 +14588,7 @@ 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$overviewStat4 = apiData.overviewStats) === null || _apiData$overviewStat4 === void 0 || (_apiData$overviewStat4 = _apiData$overviewStat4.overview) === null || _apiData$overviewStat4 === void 0 ? void 0 : _apiData$overviewStat4.netRevenue)),
|
|
14591
|
+
value: "$".concat(formatNumber((apiData === null || apiData === void 0 || (_apiData$overviewStat4 = apiData.overviewStats) === null || _apiData$overviewStat4 === void 0 || (_apiData$overviewStat4 = _apiData$overviewStat4.overview) === null || _apiData$overviewStat4 === void 0 ? void 0 : _apiData$overviewStat4.netRevenue).toFixed(2))),
|
|
14573
14592
|
subValue: "".concat(Number((_apiData$overviewStat5 = apiData === null || apiData === void 0 || (_apiData$overviewStat6 = apiData.overviewStats) === null || _apiData$overviewStat6 === void 0 || (_apiData$overviewStat6 = _apiData$overviewStat6.overview.growthPercentage) === null || _apiData$overviewStat6 === void 0 ? void 0 : _apiData$overviewStat6.netRevenue) !== null && _apiData$overviewStat5 !== void 0 ? _apiData$overviewStat5 : 0).toFixed(2), "% vs ").concat(dateName !== null && dateName !== void 0 ? dateName : "previous period"),
|
|
14574
14593
|
label: "Net Raised",
|
|
14575
14594
|
icon: /*#__PURE__*/jsx(FavoriteOutlined, {}),
|
|
@@ -14578,7 +14597,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14578
14597
|
warning: false
|
|
14579
14598
|
},
|
|
14580
14599
|
"Total Donors": {
|
|
14581
|
-
value: (apiData === null || apiData === void 0 || (_apiData$overviewStat7 = apiData.overviewStats) === null || _apiData$overviewStat7 === void 0 || (_apiData$overviewStat7 = _apiData$overviewStat7.overview) === null || _apiData$overviewStat7 === void 0 ? void 0 : _apiData$overviewStat7.totalDonations) || "
|
|
14600
|
+
value: (apiData === null || apiData === void 0 || (_apiData$overviewStat7 = apiData.overviewStats) === null || _apiData$overviewStat7 === void 0 || (_apiData$overviewStat7 = _apiData$overviewStat7.overview) === null || _apiData$overviewStat7 === void 0 ? void 0 : _apiData$overviewStat7.totalDonations) || "0",
|
|
14582
14601
|
subValue: "".concat(Number((_apiData$overviewStat8 = apiData === null || apiData === void 0 || (_apiData$overviewStat9 = apiData.overviewStats) === null || _apiData$overviewStat9 === void 0 || (_apiData$overviewStat9 = _apiData$overviewStat9.overview.growthPercentage) === null || _apiData$overviewStat9 === void 0 ? void 0 : _apiData$overviewStat9.totalDonations) !== null && _apiData$overviewStat8 !== void 0 ? _apiData$overviewStat8 : 0).toFixed(2), "%") || "0 new",
|
|
14583
14602
|
label: "Total Donors",
|
|
14584
14603
|
icon: /*#__PURE__*/jsx(PeopleAltOutlined, {}),
|
|
@@ -14587,7 +14606,7 @@ 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$overviewStat0 = apiData.overviewStats) === null || _apiData$overviewStat0 === void 0 || (_apiData$overviewStat0 = _apiData$overviewStat0.overview) === null || _apiData$overviewStat0 === void 0 ? void 0 : _apiData$overviewStat0.overallAVGDonations)),
|
|
14609
|
+
value: "$".concat(formatNumber((apiData === null || apiData === void 0 || (_apiData$overviewStat0 = apiData.overviewStats) === null || _apiData$overviewStat0 === void 0 || (_apiData$overviewStat0 = _apiData$overviewStat0.overview) === null || _apiData$overviewStat0 === void 0 ? void 0 : _apiData$overviewStat0.overallAVGDonations).toFixed(2))),
|
|
14591
14610
|
subValue: "".concat(Number((_apiData$overviewStat1 = apiData === null || apiData === void 0 || (_apiData$overviewStat10 = apiData.overviewStats) === null || _apiData$overviewStat10 === void 0 || (_apiData$overviewStat10 = _apiData$overviewStat10.overview.growthPercentage) === null || _apiData$overviewStat10 === void 0 ? void 0 : _apiData$overviewStat10.overallAVGDonations) !== null && _apiData$overviewStat1 !== void 0 ? _apiData$overviewStat1 : 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, {}),
|
|
@@ -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,7 +14624,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14605
14624
|
warning: false
|
|
14606
14625
|
},
|
|
14607
14626
|
"Conversion": {
|
|
14608
|
-
value: "".concat(formatNumber(apiData === null || apiData === void 0 || (_apiData$overviewStat11 = apiData.overviewStats) === null || _apiData$overviewStat11 === void 0 || (_apiData$overviewStat11 = _apiData$overviewStat11.overview) === null || _apiData$overviewStat11 === void 0 ? void 0 : _apiData$overviewStat11.conversionRate), "%") || "0.0%",
|
|
14627
|
+
value: "".concat(formatNumber((apiData === null || apiData === void 0 || (_apiData$overviewStat11 = apiData.overviewStats) === null || _apiData$overviewStat11 === void 0 || (_apiData$overviewStat11 = _apiData$overviewStat11.overview) === null || _apiData$overviewStat11 === void 0 ? void 0 : _apiData$overviewStat11.conversionRate).toFixed(2)), "%") || "0.0%",
|
|
14609
14628
|
subValue: "".concat(((_apiData$overviewStat12 = apiData === null || apiData === void 0 || (_apiData$overviewStat13 = apiData.overviewStats) === null || _apiData$overviewStat13 === void 0 || (_apiData$overviewStat13 = _apiData$overviewStat13.overview) === null || _apiData$overviewStat13 === void 0 || (_apiData$overviewStat13 = _apiData$overviewStat13.growthPercentage) === null || _apiData$overviewStat13 === void 0 ? void 0 : _apiData$overviewStat13.conversionRate) !== null && _apiData$overviewStat12 !== void 0 ? _apiData$overviewStat12 : 0).toFixed(2), "%") || "0%",
|
|
14610
14629
|
label: "Conversion Rate",
|
|
14611
14630
|
icon: /*#__PURE__*/jsx(Adjust, {}),
|
|
@@ -14649,7 +14668,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
14649
14668
|
}
|
|
14650
14669
|
console.log("DONOR MIX", donorMix);
|
|
14651
14670
|
var renderCard = function renderCard(title) {
|
|
14652
|
-
return /*#__PURE__*/jsx(MetricCard
|
|
14671
|
+
return /*#__PURE__*/jsx(MetricCard$1
|
|
14653
14672
|
// key={title}
|
|
14654
14673
|
, {
|
|
14655
14674
|
title: title,
|
|
@@ -15111,7 +15130,7 @@ var PaidSection = function PaidSection() {
|
|
|
15111
15130
|
}
|
|
15112
15131
|
};
|
|
15113
15132
|
var renderCard = function renderCard(title) {
|
|
15114
|
-
return /*#__PURE__*/jsx(MetricCard
|
|
15133
|
+
return /*#__PURE__*/jsx(MetricCard$1
|
|
15115
15134
|
// key={title}
|
|
15116
15135
|
, {
|
|
15117
15136
|
title: title,
|
|
@@ -15610,7 +15629,7 @@ var OrganicSection = function OrganicSection(_ref) {
|
|
|
15610
15629
|
};
|
|
15611
15630
|
}, [apiData === null || apiData === void 0 ? void 0 : apiData.sourceBreakdown, hasOrganicOverview]);
|
|
15612
15631
|
var renderCard = function renderCard(title) {
|
|
15613
|
-
return /*#__PURE__*/jsx(MetricCard, {
|
|
15632
|
+
return /*#__PURE__*/jsx(MetricCard$1, {
|
|
15614
15633
|
title: title,
|
|
15615
15634
|
value: metricInfo[title].money ? metricInfo[title].value : metricInfo[title].value,
|
|
15616
15635
|
caption: metricInfo[title].subValue,
|
|
@@ -16299,7 +16318,7 @@ var EmailSection = function EmailSection(_ref) {
|
|
|
16299
16318
|
});
|
|
16300
16319
|
}, [apiData === null || apiData === void 0 ? void 0 : apiData.topCampaignsByConversion, hasEmailOverview]);
|
|
16301
16320
|
var renderCard = function renderCard(title) {
|
|
16302
|
-
return /*#__PURE__*/jsx(MetricCard, {
|
|
16321
|
+
return /*#__PURE__*/jsx(MetricCard$1, {
|
|
16303
16322
|
title: title,
|
|
16304
16323
|
value: metricInfo[title].value,
|
|
16305
16324
|
caption: metricInfo[title].subValue,
|
|
@@ -16482,5 +16501,5 @@ var EmailSection$1 = /*#__PURE__*/Object.freeze({
|
|
|
16482
16501
|
default: EmailSection
|
|
16483
16502
|
});
|
|
16484
16503
|
|
|
16485
|
-
export { AbandonedDonationRecovery, ActiveCampaignsCard, Dashboard, DashboardReport, theme as DashboardTheme, DonorBehavior, MetricSelector, NewOverview, PerformanceSection, RecurringRevenueSection, RenderChartCard, RevenueChart, UTMPerformance, themeColors, themeTypography };
|
|
16504
|
+
export { AbandonedDonationRecovery, ActiveCampaignsCard, Dashboard, DashboardReport, theme as DashboardTheme, DonorBehavior, MetricCard$1 as MetricCard, MetricSelector, NewOverview, PerformanceSection, RecurringRevenueSection, RenderChartCard, RevenueChart, UTMPerformance, themeColors, themeTypography };
|
|
16486
16505
|
//# sourceMappingURL=index.es.js.map
|