@ammarkhalidfarooq/dashboard-package 0.6.128 → 0.6.130

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.es.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import React, { Suspense, lazy, useState, useRef, useEffect, useMemo } from 'react';
2
- import { Box, Button, Menu, MenuItem, useTheme, useMediaQuery, Grid, Card, CardContent, Typography, IconButton, ThemeProvider, CircularProgress, Avatar, LinearProgress, Stack, TableContainer, Table, TableHead, TableRow, TableCell, TableBody, Skeleton } from '@mui/material';
3
- import { MoreHoriz, TrendingDown, TrendingUp, MoreVert, Check, InfoOutlined, Settings, PeopleAltOutlined, RequestQuoteOutlined, PaidOutlined, Adjust, PersonOutlined, IndeterminateCheckBoxOutlined, FavoriteOutlined, SearchOutlined, HighlightOff, Email } from '@mui/icons-material';
2
+ import { Box, Button, Menu, MenuItem, useTheme, useMediaQuery, Grid, Card, CardContent, Typography, IconButton, ThemeProvider, CircularProgress, LinearProgress, Stack, Avatar, TableContainer, Table, TableHead, TableRow, TableCell, TableBody, Skeleton } from '@mui/material';
3
+ import { MoreHoriz, TrendingDown, TrendingUp, MoreVert, Check, InfoOutlined, Settings, PeopleAltOutlined, RequestQuoteOutlined, PaidOutlined, PersonOutlined, IndeterminateCheckBoxOutlined, FavoriteOutlined, SearchOutlined, HighlightOff, Email } from '@mui/icons-material';
4
4
  import { createTheme } from '@mui/material/styles';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
6
  import Grid$1 from '@mui/material/Grid';
7
7
  import Box$1 from '@mui/material/Box';
8
8
  import Typography$1 from '@mui/material/Typography';
9
9
  import ReactApexChart from 'react-apexcharts';
10
+ import { SiSnapchat, SiYoutube, SiTiktok, SiGoogleads, SiMeta } from 'react-icons/si';
10
11
 
11
12
  var theme = createTheme({
12
13
  cssVariables: true,
@@ -1019,482 +1020,281 @@ var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
1019
1020
  title = _ref$title === void 0 ? "Active campaigns" : _ref$title,
1020
1021
  _ref$subtitle = _ref.subtitle,
1021
1022
  subtitle = _ref$subtitle === void 0 ? "Live fundraisers ranked by velocity" : _ref$subtitle,
1023
+ actionLabel = _ref.actionLabel,
1022
1024
  _ref$columns = _ref.columns,
1023
- columns = _ref$columns === void 0 ? ["Campaign", "Raised", "Progress", "Donors", "Avg gift"] : _ref$columns,
1025
+ columns = _ref$columns === void 0 ? ["Campaign", "Raised", "Progress", "Donors", "Avg Gift"] : _ref$columns,
1024
1026
  _ref$rows = _ref.rows,
1025
1027
  rows = _ref$rows === void 0 ? [] : _ref$rows,
1026
1028
  _ref$gridTemplateColu = _ref.gridTemplateColumns,
1027
- gridTemplateColumns = _ref$gridTemplateColu === void 0 ? "3fr 1fr 1.5fr 0.8fr 1fr" : _ref$gridTemplateColu;
1028
- var theme = useTheme();
1029
- var isMobile = useMediaQuery(theme.breakpoints.down("sm"));
1030
- var isTablet = useMediaQuery(theme.breakpoints.between("sm", "md"));
1031
-
1032
- /* ─── Desktop / Tablet: Grid Table ─── */
1033
- if (!isMobile) {
1034
- return /*#__PURE__*/jsxs(Box, {
1035
- sx: {
1036
- bgcolor: "#fff",
1037
- borderRadius: 4,
1038
- border: "1px solid #f0f0f0",
1039
- boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
1040
- p: 3
1041
- },
1029
+ gridTemplateColumns = _ref$gridTemplateColu === void 0 ? "3fr 1fr 1.5fr 0.8fr 1fr " : _ref$gridTemplateColu,
1030
+ height = _ref.height,
1031
+ _ref$compact = _ref.compact,
1032
+ compact = _ref$compact === void 0 ? false : _ref$compact,
1033
+ _ref$sx = _ref.sx,
1034
+ sx = _ref$sx === void 0 ? {} : _ref$sx,
1035
+ _ref$headerSx = _ref.headerSx,
1036
+ headerSx = _ref$headerSx === void 0 ? {} : _ref$headerSx,
1037
+ _ref$tableSx = _ref.tableSx,
1038
+ tableSx = _ref$tableSx === void 0 ? {} : _ref$tableSx;
1039
+ return /*#__PURE__*/jsxs(Box, {
1040
+ sx: _objectSpread2({
1041
+ bgcolor: "#fff",
1042
+ borderRadius: compact ? 3 : 4,
1043
+ border: "1px solid #f0f0f0",
1044
+ boxShadow: compact ? "0 2px 12px rgba(0,0,0,0.05)" : "0 4px 24px rgba(0,0,0,0.06)",
1045
+ p: compact ? 1.5 : 3,
1046
+ height: height
1047
+ }, sx),
1048
+ children: [/*#__PURE__*/jsxs(Box, {
1049
+ sx: _objectSpread2({
1050
+ display: "flex",
1051
+ justifyContent: "space-between",
1052
+ alignItems: "flex-start",
1053
+ mb: compact ? 1.25 : 3
1054
+ }, headerSx),
1042
1055
  children: [/*#__PURE__*/jsxs(Box, {
1043
- sx: {
1044
- mb: 3
1045
- },
1046
1056
  children: [/*#__PURE__*/jsx(Typography, {
1047
1057
  sx: {
1048
1058
  fontWeight: 700,
1049
- fontSize: "18px",
1050
- color: "#000"
1059
+ fontSize: compact ? "14px" : "18px",
1060
+ color: "#000",
1061
+ textAlign: "left",
1062
+ lineHeight: 1.15
1051
1063
  },
1052
1064
  children: title
1053
1065
  }), /*#__PURE__*/jsx(Typography, {
1054
1066
  sx: {
1055
- fontSize: "13px",
1056
- color: "rgba(0,0,0,0.4)",
1057
- mt: 0.2
1067
+ fontSize: compact ? "10px" : "13px",
1068
+ color: "rgba(0, 0, 0, 0.4)",
1069
+ textAlign: "left",
1070
+ lineHeight: 1.15
1058
1071
  },
1059
1072
  children: subtitle
1060
1073
  })]
1061
- }), /*#__PURE__*/jsx(Box, {
1074
+ }), actionLabel && /*#__PURE__*/jsx(Typography, {
1075
+ sx: {
1076
+ fontSize: compact ? "10px" : "13px",
1077
+ fontWeight: 600,
1078
+ color: "rgb(99, 99, 230)",
1079
+ cursor: "pointer"
1080
+ },
1081
+ children: actionLabel
1082
+ })]
1083
+ }), /*#__PURE__*/jsx(Box, {
1084
+ sx: _objectSpread2({
1085
+ overflowX: compact ? "hidden" : "auto"
1086
+ }, tableSx),
1087
+ children: /*#__PURE__*/jsxs(Box, {
1062
1088
  sx: {
1063
- overflowX: "auto"
1089
+ minWidth: compact ? 0 : "600px"
1064
1090
  },
1065
- children: /*#__PURE__*/jsxs(Box, {
1091
+ children: [/*#__PURE__*/jsx(Box, {
1066
1092
  sx: {
1067
- minWidth: "600px"
1093
+ display: "grid",
1094
+ gridTemplateColumns: gridTemplateColumns,
1095
+ gap: compact ? 1 : 2,
1096
+ pb: compact ? 1 : 2.5,
1097
+ borderBottom: "1px solid #f0f0f0"
1068
1098
  },
1069
- children: [/*#__PURE__*/jsx(Box, {
1070
- sx: {
1071
- display: "grid",
1072
- gridTemplateColumns: gridTemplateColumns,
1073
- gap: 2,
1074
- pb: 2.5,
1075
- borderBottom: "1px solid #f0f0f0"
1076
- },
1077
- children: columns.map(function (header, colIdx) {
1078
- return /*#__PURE__*/jsx(Typography, {
1079
- sx: {
1080
- fontSize: "12px",
1081
- color: "rgba(0,0,0,0.4)",
1082
- fontWeight: 500,
1083
- whiteSpace: "nowrap",
1084
- textAlign: colIdx === 0 ? "left" : "center"
1085
- },
1086
- children: header
1087
- }, header);
1088
- })
1089
- }), /*#__PURE__*/jsx(Box, {
1090
- sx: {
1091
- mt: 1
1092
- },
1093
- children: rows.map(function (row, idx) {
1094
- var isDisabled = row.comingSoon;
1095
- return /*#__PURE__*/jsxs(Box, {
1099
+ children: columns.map(function (header) {
1100
+ return /*#__PURE__*/jsx(Typography, {
1101
+ sx: {
1102
+ fontSize: compact ? "9px" : "12px",
1103
+ color: "rgba(0, 0, 0, 0.4)",
1104
+ fontWeight: 500,
1105
+ textAlign: "left"
1106
+ },
1107
+ children: header
1108
+ }, header);
1109
+ })
1110
+ }), /*#__PURE__*/jsx(Box, {
1111
+ sx: {
1112
+ mt: 1
1113
+ },
1114
+ children: rows.map(function (row, idx) {
1115
+ var _row$progress;
1116
+ return /*#__PURE__*/jsxs(Box, {
1117
+ sx: {
1118
+ display: "grid",
1119
+ gridTemplateColumns: gridTemplateColumns,
1120
+ gap: compact ? 1 : 2,
1121
+ py: compact ? 0.5 : 1.2,
1122
+ alignItems: "center",
1123
+ borderBottom: idx === rows.length - 1 ? "none" : "1px solid #f5f5f5"
1124
+ },
1125
+ children: [/*#__PURE__*/jsxs(Box, {
1096
1126
  sx: {
1097
- display: "grid",
1098
- gridTemplateColumns: gridTemplateColumns,
1099
- gap: 2,
1100
- py: 1.2,
1127
+ display: "flex",
1101
1128
  alignItems: "center",
1102
- borderBottom: idx === rows.length - 1 ? "none" : "1px solid #f5f5f5",
1103
- opacity: isDisabled ? 0.55 : 1,
1104
- transition: "opacity 0.2s ease"
1129
+ gap: 1.5
1105
1130
  },
1106
- children: [/*#__PURE__*/jsxs(Box, {
1131
+ children: [(row.icon || row.id) && /*#__PURE__*/jsx(Box, {
1107
1132
  sx: {
1133
+ width: compact ? 22 : 32,
1134
+ height: compact ? 22 : 32,
1135
+ borderRadius: "50%",
1136
+ bgcolor: "#fff",
1137
+ border: "2px solid ".concat(row.avatarBorder || row.avatarBg || "#E5E7EB"),
1108
1138
  display: "flex",
1109
1139
  alignItems: "center",
1110
- gap: 1.5,
1111
- minWidth: 0
1140
+ justifyContent: "center",
1141
+ flexShrink: 0,
1142
+ boxSizing: "border-box",
1143
+ filter: row.comingSoon ? "grayscale(1)" : "none",
1144
+ opacity: row.comingSoon ? 0.55 : 1
1112
1145
  },
1113
- children: [row.id && /*#__PURE__*/jsx(Avatar, {
1146
+ children: row.icon ? /*#__PURE__*/jsx(row.icon, {
1147
+ size: compact ? 12 : 16,
1148
+ color: row.iconColor || row.avatarBorder || row.avatarBg
1149
+ }) : /*#__PURE__*/jsx(Typography, {
1114
1150
  sx: {
1115
- width: 28,
1116
- height: 28,
1117
- fontSize: "10px",
1151
+ fontSize: compact ? "8px" : "10px",
1118
1152
  fontWeight: 700,
1119
- bgcolor: row.avatarBg || "#F3F4F6",
1120
- color: row.avatarColor || "#fff",
1121
- flexShrink: 0
1153
+ color: row.avatarColor || "#111"
1122
1154
  },
1123
1155
  children: row.id
1124
- }), /*#__PURE__*/jsxs(Box, {
1125
- sx: {
1126
- display: "flex",
1127
- alignItems: "center",
1128
- gap: 0.8,
1129
- flexWrap: "nowrap",
1130
- minWidth: 0
1131
- },
1132
- children: [/*#__PURE__*/jsx(Typography, {
1133
- sx: {
1134
- fontSize: "12px",
1135
- fontWeight: 700,
1136
- color: "#000",
1137
- whiteSpace: "nowrap"
1138
- },
1139
- children: row.name
1140
- }), isDisabled && /*#__PURE__*/jsx(Box, {
1141
- sx: {
1142
- display: "inline-flex",
1143
- alignItems: "center",
1144
- px: 0.8,
1145
- py: 0.2,
1146
- borderRadius: "100px",
1147
- bgcolor: "#F3F4F6",
1148
- border: "1px solid #E5E7EB",
1149
- flexShrink: 0,
1150
- whiteSpace: "nowrap"
1151
- },
1152
- children: /*#__PURE__*/jsx(Typography, {
1153
- sx: {
1154
- fontSize: "8px",
1155
- fontWeight: 700,
1156
- color: "#6B7280",
1157
- letterSpacing: "0.3px",
1158
- textTransform: "uppercase",
1159
- whiteSpace: "nowrap"
1160
- },
1161
- children: "Coming Soon"
1162
- })
1163
- })]
1164
- })]
1156
+ })
1165
1157
  }), /*#__PURE__*/jsx(Typography, {
1166
1158
  sx: {
1167
- fontSize: "13px",
1168
- fontWeight: 600,
1169
- color: isDisabled ? "#9CA3AF" : "#000",
1170
- whiteSpace: "nowrap",
1171
- textAlign: "center"
1159
+ fontSize: compact ? "10px" : "12px",
1160
+ fontWeight: 700,
1161
+ color: row.comingSoon ? "#9CA3AF" : "#000"
1172
1162
  },
1173
- children: row.val1
1174
- }), row.type === "progress" ? /*#__PURE__*/jsxs(Box, {
1163
+ children: row.name
1164
+ })]
1165
+ }), /*#__PURE__*/jsx(Typography, {
1166
+ sx: {
1167
+ fontSize: compact ? "10px" : "13px",
1168
+ fontWeight: 600,
1169
+ color: row.comingSoon ? "#9CA3AF" : "#000",
1170
+ textAlign: "left"
1171
+ },
1172
+ children: row.val1
1173
+ }), row.type === "progress" ? /*#__PURE__*/jsxs(Box, {
1174
+ sx: {
1175
+ display: "flex",
1176
+ alignItems: "center",
1177
+ gap: 1.5
1178
+ },
1179
+ children: [/*#__PURE__*/jsx(Box, {
1175
1180
  sx: {
1176
- display: "flex",
1177
- alignItems: "center",
1178
- gap: 1.5,
1179
- justifyContent: "center"
1181
+ flexGrow: 1
1180
1182
  },
1181
- children: [/*#__PURE__*/jsx(Box, {
1183
+ children: /*#__PURE__*/jsx(LinearProgress, {
1184
+ variant: "determinate",
1185
+ value: Math.min(100, Math.max(0, (_row$progress = row.progress) !== null && _row$progress !== void 0 ? _row$progress : 0)),
1182
1186
  sx: {
1183
- flexGrow: 1,
1184
- maxWidth: "80px"
1185
- },
1186
- children: /*#__PURE__*/jsx(LinearProgress, {
1187
- variant: "determinate",
1188
- value: row.progress,
1189
- sx: {
1190
- height: 8,
1187
+ height: compact ? 6 : 8,
1188
+ borderRadius: 4,
1189
+ bgcolor: "#F3F4F6",
1190
+ "& .MuiLinearProgress-bar": {
1191
1191
  borderRadius: 4,
1192
- bgcolor: "#F3F4F6",
1193
- "& .MuiLinearProgress-bar": {
1194
- borderRadius: 4,
1195
- bgcolor: row.progressColor || "rgb(99,99,230)"
1196
- }
1192
+ bgcolor: row.progressColor || "rgb(99, 99, 230)"
1197
1193
  }
1198
- })
1199
- }), /*#__PURE__*/jsxs(Typography, {
1200
- sx: {
1201
- fontSize: "11px",
1202
- color: "rgba(0,0,0,0.4)",
1203
- minWidth: "30px",
1204
- textAlign: "center"
1205
- },
1206
- children: [row.progress, "%"]
1207
- })]
1208
- }) : /*#__PURE__*/jsx(Typography, {
1209
- sx: {
1210
- fontSize: "13px",
1211
- fontWeight: 600,
1212
- color: isDisabled ? "#9CA3AF" : "#000",
1213
- whiteSpace: "nowrap",
1214
- textAlign: "center"
1215
- },
1216
- children: row.val2
1217
- }), /*#__PURE__*/jsx(Typography, {
1194
+ }
1195
+ })
1196
+ }), /*#__PURE__*/jsxs(Typography, {
1218
1197
  sx: {
1219
- fontSize: "13px",
1220
- fontWeight: row.highlightVal3 ? 700 : 500,
1221
- color: isDisabled ? "#9CA3AF" : row.highlightVal3 ? row.val3Color || "#22C55E" : "#000",
1222
- whiteSpace: "nowrap",
1223
- textAlign: "center"
1198
+ fontSize: compact ? "9px" : "11px",
1199
+ color: "rgba(0, 0, 0, 0.4)",
1200
+ minWidth: "30px"
1224
1201
  },
1225
- children: row.val3
1226
- }), /*#__PURE__*/jsx(Typography, {
1202
+ children: [row.progress, "%"]
1203
+ })]
1204
+ }) : /*#__PURE__*/jsx(Typography, {
1205
+ sx: {
1206
+ fontSize: "13px",
1207
+ fontWeight: 600,
1208
+ color: row.comingSoon ? "#9CA3AF" : "#000",
1209
+ textAlign: "left"
1210
+ },
1211
+ children: row.val2
1212
+ }), /*#__PURE__*/jsx(Typography, {
1213
+ sx: {
1214
+ fontSize: compact ? "10px" : "13px",
1215
+ fontWeight: row.highlightVal3 ? 700 : 500,
1216
+ color: row.comingSoon ? "#9CA3AF" : row.highlightVal3 ? row.val3Color || "#22C55E" : "#000",
1217
+ textAlign: "left"
1218
+ },
1219
+ children: row.val3
1220
+ }), /*#__PURE__*/jsx(Typography, {
1221
+ sx: {
1222
+ fontSize: "13px",
1223
+ fontWeight: 500,
1224
+ color: row.comingSoon ? "#9CA3AF" : "#000",
1225
+ textAlign: "left"
1226
+ },
1227
+ children: row.val4
1228
+ }), columns.length > 5 && /*#__PURE__*/jsx(Box, {
1229
+ children: row.comingSoon ? /*#__PURE__*/jsx(Box, {
1227
1230
  sx: {
1228
- fontSize: "13px",
1229
- fontWeight: 500,
1230
- color: isDisabled ? "#9CA3AF" : "#000",
1231
- whiteSpace: "nowrap",
1232
- textAlign: "center"
1231
+ display: "inline-block",
1232
+ px: compact ? 1 : 1.5,
1233
+ py: compact ? 0.25 : 0.5,
1234
+ borderRadius: "100px",
1235
+ bgcolor: "#F3F4F6",
1236
+ color: "#9CA3AF",
1237
+ fontSize: compact ? "9px" : "11px",
1238
+ fontWeight: 700,
1239
+ textAlign: "center",
1240
+ whiteSpace: "nowrap"
1233
1241
  },
1234
- children: row.val4
1235
- }), columns.length > 5 && /*#__PURE__*/jsx(Box, {
1242
+ children: "Coming Soon"
1243
+ }) : row.type === "trend" ? /*#__PURE__*/jsx(Box, {
1236
1244
  sx: {
1237
1245
  display: "flex",
1238
- justifyContent: "center"
1246
+ alignItems: "center",
1247
+ gap: 0.5
1239
1248
  },
1240
- children: row.type === "trend" ? /*#__PURE__*/jsxs(Box, {
1241
- sx: {
1242
- display: "flex",
1243
- alignItems: "center",
1244
- gap: 0.5
1245
- },
1249
+ children: row.trendType === "up" ? /*#__PURE__*/jsxs(Fragment, {
1246
1250
  children: [/*#__PURE__*/jsx(Typography, {
1247
1251
  sx: {
1248
1252
  fontSize: "14px",
1249
- color: row.trendType === "up" ? "#22C55E" : "#EF4444"
1253
+ color: "#22C55E"
1250
1254
  },
1251
- children: row.trendType === "up" ? "▲" : "▼"
1255
+ children: "\u25B2"
1252
1256
  }), /*#__PURE__*/jsx(Typography, {
1253
1257
  sx: {
1254
1258
  fontSize: "12px",
1255
- color: row.trendType === "up" ? "#22C55E" : "#EF4444",
1256
- fontWeight: 700,
1257
- whiteSpace: "nowrap"
1259
+ color: "#22C55E",
1260
+ fontWeight: 700
1258
1261
  },
1259
- children: isTablet ? row.trendType === "up" ? "Up" : "Down" : row.trendLabel
1262
+ children: row.trendLabel
1263
+ })]
1264
+ }) : /*#__PURE__*/jsxs(Fragment, {
1265
+ children: [/*#__PURE__*/jsx(Typography, {
1266
+ sx: {
1267
+ fontSize: "14px",
1268
+ color: "#EF4444"
1269
+ },
1270
+ children: "\u25BC"
1271
+ }), /*#__PURE__*/jsx(Typography, {
1272
+ sx: {
1273
+ fontSize: "12px",
1274
+ color: "#EF4444",
1275
+ fontWeight: 700
1276
+ },
1277
+ children: row.trendLabel
1260
1278
  })]
1261
- }) : row.type === "comingSoon" ? /*#__PURE__*/jsx(Typography, {
1262
- sx: {
1263
- fontSize: "12px",
1264
- color: "#9CA3AF",
1265
- fontWeight: 500,
1266
- textAlign: "center"
1267
- },
1268
- children: "\u2014"
1269
- }) : /*#__PURE__*/jsx(Box, {
1270
- sx: {
1271
- display: "inline-block",
1272
- px: 1.5,
1273
- py: 0.5,
1274
- borderRadius: "100px",
1275
- bgcolor: row.statusBg,
1276
- color: row.statusColor,
1277
- fontSize: "11px",
1278
- fontWeight: 700
1279
- },
1280
- children: row.status
1281
1279
  })
1282
- })]
1283
- }, idx);
1284
- })
1285
- })]
1286
- })
1287
- })]
1288
- });
1289
- }
1290
-
1291
- /* ─── Mobile: Stacked Card Layout ─── */
1292
- return /*#__PURE__*/jsxs(Box, {
1293
- sx: {
1294
- bgcolor: "#fff",
1295
- borderRadius: 4,
1296
- border: "1px solid #f0f0f0",
1297
- boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
1298
- p: 2
1299
- },
1300
- children: [/*#__PURE__*/jsxs(Box, {
1301
- sx: {
1302
- mb: 2
1303
- },
1304
- children: [/*#__PURE__*/jsx(Typography, {
1305
- sx: {
1306
- fontWeight: 700,
1307
- fontSize: "16px",
1308
- color: "#000"
1309
- },
1310
- children: title
1311
- }), /*#__PURE__*/jsx(Typography, {
1312
- sx: {
1313
- fontSize: "11px",
1314
- color: "rgba(0,0,0,0.4)",
1315
- mt: 0.2
1316
- },
1317
- children: subtitle
1318
- })]
1319
- }), /*#__PURE__*/jsx(Box, {
1320
- sx: {
1321
- display: "flex",
1322
- flexDirection: "column",
1323
- gap: 1.5
1324
- },
1325
- children: rows.map(function (row, idx) {
1326
- var isDisabled = row.comingSoon;
1327
- return /*#__PURE__*/jsxs(Box, {
1328
- sx: {
1329
- p: 2,
1330
- borderRadius: 3,
1331
- border: isDisabled ? "1px dashed #E5E7EB" : "1px solid #F3F4F6",
1332
- bgcolor: isDisabled ? "#FAFAFA" : "#fff",
1333
- opacity: isDisabled ? 0.7 : 1,
1334
- transition: "opacity 0.2s ease"
1335
- },
1336
- children: [/*#__PURE__*/jsxs(Box, {
1337
- sx: {
1338
- display: "flex",
1339
- alignItems: "center",
1340
- gap: 1.5,
1341
- mb: isDisabled ? 0 : 1.5
1342
- },
1343
- children: [row.id && /*#__PURE__*/jsx(Avatar, {
1344
- sx: {
1345
- width: 32,
1346
- height: 32,
1347
- fontSize: "11px",
1348
- fontWeight: 700,
1349
- bgcolor: row.avatarBg || "#F3F4F6",
1350
- color: row.avatarColor || "#fff",
1351
- flexShrink: 0
1352
- },
1353
- children: row.id
1354
- }), /*#__PURE__*/jsxs(Box, {
1355
- sx: {
1356
- display: "flex",
1357
- alignItems: "center",
1358
- gap: 1,
1359
- flex: 1,
1360
- flexWrap: "nowrap"
1361
- },
1362
- children: [/*#__PURE__*/jsx(Typography, {
1363
- sx: {
1364
- fontSize: "14px",
1365
- fontWeight: 700,
1366
- color: "#000"
1367
- },
1368
- children: row.name
1369
- }), isDisabled && /*#__PURE__*/jsx(Box, {
1370
- sx: {
1371
- display: "inline-flex",
1372
- alignItems: "center",
1373
- px: 1,
1374
- py: 0.3,
1375
- borderRadius: "100px",
1376
- bgcolor: "#F3F4F6",
1377
- border: "1px solid #E5E7EB",
1378
- flexShrink: 0
1379
- },
1380
- children: /*#__PURE__*/jsx(Typography, {
1280
+ }) : /*#__PURE__*/jsx(Box, {
1381
1281
  sx: {
1382
- fontSize: "8px",
1282
+ display: "inline-block",
1283
+ px: compact ? 1 : 1.5,
1284
+ py: compact ? 0.25 : 0.5,
1285
+ borderRadius: "100px",
1286
+ bgcolor: row.statusBg,
1287
+ color: row.statusColor,
1288
+ fontSize: compact ? "9px" : "11px",
1383
1289
  fontWeight: 700,
1384
- color: "#6B7280",
1385
- letterSpacing: "0.3px",
1386
- textTransform: "uppercase"
1290
+ textAlign: "center"
1387
1291
  },
1388
- children: "Coming Soon"
1292
+ children: row.status
1389
1293
  })
1390
1294
  })]
1391
- }), row.type === "trend" && /*#__PURE__*/jsxs(Box, {
1392
- sx: {
1393
- display: "flex",
1394
- alignItems: "center",
1395
- gap: 0.3,
1396
- flexShrink: 0
1397
- },
1398
- children: [/*#__PURE__*/jsx(Typography, {
1399
- sx: {
1400
- fontSize: "12px",
1401
- color: row.trendType === "up" ? "#22C55E" : "#EF4444"
1402
- },
1403
- children: row.trendType === "up" ? "▲" : "▼"
1404
- }), /*#__PURE__*/jsx(Typography, {
1405
- sx: {
1406
- fontSize: "11px",
1407
- color: row.trendType === "up" ? "#22C55E" : "#EF4444",
1408
- fontWeight: 700
1409
- },
1410
- children: row.trendType === "up" ? "Up" : "Down"
1411
- })]
1412
- })]
1413
- }), !isDisabled && /*#__PURE__*/jsxs(Box, {
1414
- sx: {
1415
- display: "grid",
1416
- gridTemplateColumns: "1fr 1fr 1fr 1fr",
1417
- gap: 1
1418
- },
1419
- children: [/*#__PURE__*/jsxs(Box, {
1420
- children: [/*#__PURE__*/jsx(Typography, {
1421
- sx: {
1422
- fontSize: "9px",
1423
- color: "#9CA3AF",
1424
- fontWeight: 600,
1425
- textTransform: "uppercase",
1426
- letterSpacing: "0.3px"
1427
- },
1428
- children: "Spend"
1429
- }), /*#__PURE__*/jsx(Typography, {
1430
- sx: {
1431
- fontSize: "13px",
1432
- fontWeight: 700,
1433
- color: "#000",
1434
- mt: 0.3
1435
- },
1436
- children: row.val1
1437
- })]
1438
- }), /*#__PURE__*/jsxs(Box, {
1439
- children: [/*#__PURE__*/jsx(Typography, {
1440
- sx: {
1441
- fontSize: "9px",
1442
- color: "#9CA3AF",
1443
- fontWeight: 600,
1444
- textTransform: "uppercase",
1445
- letterSpacing: "0.3px"
1446
- },
1447
- children: "Revenue"
1448
- }), /*#__PURE__*/jsx(Typography, {
1449
- sx: {
1450
- fontSize: "13px",
1451
- fontWeight: 700,
1452
- color: "#000",
1453
- mt: 0.3
1454
- },
1455
- children: row.val2
1456
- })]
1457
- }), /*#__PURE__*/jsxs(Box, {
1458
- children: [/*#__PURE__*/jsx(Typography, {
1459
- sx: {
1460
- fontSize: "9px",
1461
- color: "#9CA3AF",
1462
- fontWeight: 600,
1463
- textTransform: "uppercase",
1464
- letterSpacing: "0.3px"
1465
- },
1466
- children: "ROAS"
1467
- }), /*#__PURE__*/jsx(Typography, {
1468
- sx: {
1469
- fontSize: "13px",
1470
- fontWeight: 700,
1471
- color: row.val3Color || "#22C55E",
1472
- mt: 0.3
1473
- },
1474
- children: row.val3
1475
- })]
1476
- }), /*#__PURE__*/jsxs(Box, {
1477
- children: [/*#__PURE__*/jsx(Typography, {
1478
- sx: {
1479
- fontSize: "9px",
1480
- color: "#9CA3AF",
1481
- fontWeight: 600,
1482
- textTransform: "uppercase",
1483
- letterSpacing: "0.3px"
1484
- },
1485
- children: "CPA"
1486
- }), /*#__PURE__*/jsx(Typography, {
1487
- sx: {
1488
- fontSize: "13px",
1489
- fontWeight: 700,
1490
- color: "#000",
1491
- mt: 0.3
1492
- },
1493
- children: row.val4
1494
- })]
1495
- })]
1496
- })]
1497
- }, idx);
1295
+ }, idx);
1296
+ })
1297
+ })]
1498
1298
  })
1499
1299
  })]
1500
1300
  });
@@ -1588,99 +1388,6 @@ var MetricCard$1 = function MetricCard(_ref) {
1588
1388
  });
1589
1389
  };
1590
1390
 
1591
- var DisplayCard = function DisplayCard(_ref) {
1592
- var title = _ref.title,
1593
- value = _ref.value,
1594
- subValue = _ref.subValue,
1595
- Icon = _ref.icon,
1596
- onClick = _ref.onClick,
1597
- _ref$sx = _ref.sx,
1598
- sx = _ref$sx === void 0 ? {} : _ref$sx,
1599
- _ref$isActive = _ref.isActive,
1600
- isActive = _ref$isActive === void 0 ? false : _ref$isActive;
1601
- return /*#__PURE__*/jsxs(Box, {
1602
- onClick: onClick,
1603
- sx: _objectSpread2({
1604
- height: "100px",
1605
- borderRadius: "24px",
1606
- display: "flex",
1607
- justifyContent: "space-between",
1608
- alignItems: "center",
1609
- boxShadow: "rgba(0, 0, 0, 0.06) 0px 4px 15px 0px",
1610
- // boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
1611
- // padding: "16px 16px 16px 18px",
1612
- py: "10px",
1613
- px: "16px",
1614
- cursor: "pointer",
1615
- bgcolor: "#fff",
1616
- border: isActive ? "1px solid rgb(99, 99, 230)" : "none",
1617
- // border: "2px solid #f0f0f0",
1618
- transition: "all 0.3s ease"
1619
- }, sx),
1620
- children: [/*#__PURE__*/jsxs(Box, {
1621
- sx: {
1622
- display: "flex",
1623
- flexDirection: "column",
1624
- gap: 0.5
1625
- },
1626
- children: [/*#__PURE__*/jsx(Typography, {
1627
- sx: {
1628
- fontWeight: "400",
1629
- color: isActive ? "#c1c1f5" : "#a1a1a8",
1630
- fontSize: "14px",
1631
- lineHeight: "16px",
1632
- textAlign: "left"
1633
- },
1634
- children: title
1635
- }), /*#__PURE__*/jsx(Typography, {
1636
- sx: {
1637
- lineHeight: "1.2",
1638
- textAlign: "left",
1639
- color: isActive ? "#6363e6" : "#000",
1640
- fontSize: "20px",
1641
- fontWeight: "700",
1642
- mb: 0.5
1643
- },
1644
- children: statusValue(value)
1645
- }), subValue && /*#__PURE__*/jsxs(Typography, {
1646
- sx: {
1647
- fontSize: "11px",
1648
- color: typeof subValue === "string" && (subValue.includes("%") || subValue.includes("new") || subValue.includes("x")) && !subValue.includes("/") && !subValue.includes("pass-through") ? "#22C55E" : "rgba(0, 0, 0, 0.4)",
1649
- fontWeight: "500",
1650
- display: "flex",
1651
- alignItems: "center",
1652
- gap: 0.5
1653
- },
1654
- children: [typeof subValue === "string" && (subValue.includes("%") || subValue.includes("new") || subValue.includes("x")) && !subValue.includes("/") && !subValue.includes("pass-through") && /*#__PURE__*/jsx("span", {
1655
- style: {
1656
- fontSize: "14px"
1657
- },
1658
- children: "\u25B2"
1659
- }), subValue]
1660
- })]
1661
- }), Icon && /*#__PURE__*/jsx(Box, {
1662
- sx: {
1663
- width: "44px",
1664
- height: "44px",
1665
- borderRadius: "50%",
1666
- backgroundColor: "#f7f7ff",
1667
- display: "flex",
1668
- alignItems: "center",
1669
- justifyContent: "center",
1670
- color: "rgb(99, 99, 230)"
1671
- },
1672
- children: /*#__PURE__*/jsx(Icon, {
1673
- sx: {
1674
- fontSize: "20px"
1675
- }
1676
- })
1677
- })]
1678
- });
1679
- };
1680
- var statusValue = function statusValue(value) {
1681
- return _typeof(value) === "object" && value !== null ? value.value !== undefined ? value.value : JSON.stringify(value) : value;
1682
- };
1683
-
1684
1391
  var PURPLE = "#6363E6";
1685
1392
  var REPORT_COLORS = {
1686
1393
  purple: PURPLE};
@@ -2030,7 +1737,7 @@ var buildReportData = function buildReportData() {
2030
1737
 
2031
1738
  var W = 794;
2032
1739
  var MIN_H = 1123;
2033
- var MX = 32; // horizontal margin
1740
+ var MX = 40; // horizontal margin
2034
1741
  var THEME = {
2035
1742
  pageBg: "#F9FAFB",
2036
1743
  panelBorder: "#E5E7EB",
@@ -2041,7 +1748,7 @@ var THEME = {
2041
1748
  trendUpBg: "#D1FAE5",
2042
1749
  trendUpText: "#059669"
2043
1750
  };
2044
- var BULLET = " - ";
1751
+ var BULLET = " · ";
2045
1752
 
2046
1753
  // ─── Number helpers ───────────────────────────────────────────────────────────
2047
1754
  var d$ = function d$(v) {
@@ -2332,15 +2039,14 @@ var PageOneHeader = function PageOneHeader(_ref13) {
2332
2039
  alignItems: "flex-start"
2333
2040
  },
2334
2041
  children: [/*#__PURE__*/jsxs("div", {
2335
- children: [/*#__PURE__*/jsx("div", {
2042
+ children: [/*#__PURE__*/jsx("img", {
2043
+ src: "/assets/images/Madinahl_logo.png",
2044
+ alt: "Madinah",
2336
2045
  style: {
2337
- fontSize: 22,
2338
- fontWeight: 700,
2339
- color: THEME.brand,
2340
- letterSpacing: "-0.3px",
2341
- lineHeight: 1.1
2342
- },
2343
- children: "Madinah"
2046
+ height: 30,
2047
+ width: "auto",
2048
+ display: "block"
2049
+ }
2344
2050
  }), /*#__PURE__*/jsx("div", {
2345
2051
  style: {
2346
2052
  fontSize: 9,
@@ -2834,6 +2540,7 @@ var P2DonorMixCard = function P2DonorMixCard(_ref21) {
2834
2540
  count: returningDonors,
2835
2541
  pct: retPct
2836
2542
  }].map(function (item, i) {
2543
+ var _item$count;
2837
2544
  return /*#__PURE__*/jsxs("div", {
2838
2545
  style: {
2839
2546
  display: "flex",
@@ -2868,7 +2575,7 @@ var P2DonorMixCard = function P2DonorMixCard(_ref21) {
2868
2575
  fontWeight: 700,
2869
2576
  color: THEME.text
2870
2577
  },
2871
- children: [formatNumber(item.count), BULLET, item.pct, "%"]
2578
+ children: [Number((_item$count = item.count) !== null && _item$count !== void 0 ? _item$count : 0).toLocaleString("en-US"), BULLET, item.pct, "%"]
2872
2579
  })]
2873
2580
  }, item.label);
2874
2581
  }), /*#__PURE__*/jsx(Divider, {
@@ -3755,6 +3462,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref34, ref) {
3755
3462
  width: W,
3756
3463
  minHeight: MIN_H,
3757
3464
  background: THEME.pageBg,
3465
+ border: "1px solid #111827",
3758
3466
  display: "flex",
3759
3467
  flexDirection: "column",
3760
3468
  fontFamily: "'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif",
@@ -3947,6 +3655,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref34, ref) {
3947
3655
  width: W,
3948
3656
  minHeight: MIN_H,
3949
3657
  background: THEME.pageBg,
3658
+ border: "1px solid #111827",
3950
3659
  display: "flex",
3951
3660
  flexDirection: "column",
3952
3661
  fontFamily: "'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif",
@@ -4914,6 +4623,8 @@ var DonorMixCard = function DonorMixCard(_ref) {
4914
4623
  border: "1px solid #f0f0f0",
4915
4624
  boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
4916
4625
  p: compact ? 1.5 : 3,
4626
+ // height: "100%",
4627
+ // width: "100%",
4917
4628
  display: "flex",
4918
4629
  flexDirection: "column"
4919
4630
  }, sx),
@@ -4943,6 +4654,7 @@ var DonorMixCard = function DonorMixCard(_ref) {
4943
4654
  sx: {
4944
4655
  position: "relative",
4945
4656
  height: compact ? "110px" : "180px",
4657
+ // mb: 1,
4946
4658
  display: "flex",
4947
4659
  justifyContent: "center"
4948
4660
  },
@@ -4953,16 +4665,14 @@ var DonorMixCard = function DonorMixCard(_ref) {
4953
4665
  width: compact ? "140" : "210"
4954
4666
  })
4955
4667
  }), /*#__PURE__*/jsxs(Box, {
4668
+ sx: {},
4956
4669
  children: [items.map(function (item, idx) {
4957
- var isComingSoon = item.comingSoon;
4958
4670
  return /*#__PURE__*/jsxs(Box, {
4959
4671
  sx: {
4960
4672
  display: "flex",
4961
4673
  justifyContent: "space-between",
4962
4674
  alignItems: "center",
4963
- mb: idx === items.length - 1 ? showBottomSummary ? compact ? 0.5 : 0 : 0 : compact ? 0.5 : 0,
4964
- opacity: isComingSoon ? 0.55 : 1,
4965
- transition: "opacity 0.2s ease"
4675
+ mb: idx === items.length - 1 ? showBottomSummary ? compact ? 0.5 : 0 : 0 : compact ? 0.5 : 0
4966
4676
  },
4967
4677
  children: [/*#__PURE__*/jsxs(Box, {
4968
4678
  sx: {
@@ -4974,38 +4684,31 @@ var DonorMixCard = function DonorMixCard(_ref) {
4974
4684
  sx: {
4975
4685
  width: 10,
4976
4686
  height: 10,
4977
- bgcolor: item.color,
4687
+ bgcolor: item.comingSoon ? "#D1D5DB" : item.color,
4978
4688
  borderRadius: "2px"
4979
4689
  }
4980
4690
  }), /*#__PURE__*/jsx(Typography, {
4981
4691
  sx: {
4982
4692
  fontSize: compact ? "10px" : "13px",
4983
4693
  fontWeight: 500,
4984
- color: isComingSoon ? "#9CA3AF" : "rgba(0, 0, 0, 0.4)"
4694
+ color: item.comingSoon ? "#9CA3AF" : "rgba(0, 0, 0, 0.4)"
4985
4695
  },
4986
4696
  children: item.label
4987
4697
  })]
4988
- }), isComingSoon ? /*#__PURE__*/jsx(Box, {
4698
+ }), item.comingSoon ? /*#__PURE__*/jsx(Box, {
4989
4699
  sx: {
4990
4700
  display: "inline-flex",
4991
4701
  alignItems: "center",
4992
4702
  px: 1,
4993
- py: 0.3,
4703
+ py: 0.2,
4994
4704
  borderRadius: "100px",
4995
4705
  bgcolor: "#F3F4F6",
4996
- border: "1px solid #E5E7EB"
4706
+ color: "#9CA3AF",
4707
+ fontSize: "10px",
4708
+ fontWeight: 700,
4709
+ whiteSpace: "nowrap"
4997
4710
  },
4998
- children: /*#__PURE__*/jsx(Typography, {
4999
- sx: {
5000
- fontSize: "9px",
5001
- fontWeight: 700,
5002
- color: "#6B7280",
5003
- letterSpacing: "0.3px",
5004
- textTransform: "uppercase",
5005
- lineHeight: 1
5006
- },
5007
- children: "Coming Soon"
5008
- })
4711
+ children: "Coming Soon"
5009
4712
  }) : /*#__PURE__*/jsx(Typography, {
5010
4713
  sx: {
5011
4714
  fontSize: compact ? "10px" : "13px",
@@ -5017,6 +4720,9 @@ var DonorMixCard = function DonorMixCard(_ref) {
5017
4720
  }, idx);
5018
4721
  }), showBottomSummary && /*#__PURE__*/jsxs(Box, {
5019
4722
  sx: {
4723
+ // display: "flex",
4724
+ // justifyContent: "space-between",
4725
+ // alignItems: "center",
5020
4726
  pt: compact ? 1 : 2,
5021
4727
  borderTop: "1px solid #f0f0f0",
5022
4728
  textAlign: "left"
@@ -6792,7 +6498,7 @@ var TopCampaignsConvRateCard = function TopCampaignsConvRateCard(_ref7) {
6792
6498
  })]
6793
6499
  });
6794
6500
  };
6795
- var getCampaignInitials$1 = function getCampaignInitials() {
6501
+ var getCampaignInitials$2 = function getCampaignInitials() {
6796
6502
  var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
6797
6503
  var words = name.match(/[A-Za-z]+/g) || [];
6798
6504
  if (words.length >= 2) {
@@ -6915,7 +6621,7 @@ var TopPerformingCampaignsCard = function TopPerformingCampaignsCard(_ref8) {
6915
6621
  fontSize: "10px",
6916
6622
  fontWeight: 700
6917
6623
  },
6918
- children: item.id || getCampaignInitials$1(item.name)
6624
+ children: item.id || getCampaignInitials$2(item.name)
6919
6625
  }), /*#__PURE__*/jsx(Typography, {
6920
6626
  sx: {
6921
6627
  fontSize: "13px",
@@ -17791,6 +17497,89 @@ var OverallSectionSkeleton = function OverallSectionSkeleton() {
17791
17497
  })]
17792
17498
  });
17793
17499
  };
17500
+ var PaidSectionSkeleton = function PaidSectionSkeleton() {
17501
+ return /*#__PURE__*/jsxs(Fragment, {
17502
+ children: [/*#__PURE__*/jsx(MetricCardsSkeleton, {
17503
+ count: 6,
17504
+ gridTemplateColumns: {
17505
+ xs: "1fr",
17506
+ sm: "1fr 1fr",
17507
+ md: "1fr 1fr 1fr",
17508
+ lg: "repeat(6, 1fr)"
17509
+ },
17510
+ gap: 2
17511
+ }), /*#__PURE__*/jsx(Grid, {
17512
+ container: true,
17513
+ spacing: 3,
17514
+ sx: {
17515
+ mt: 2.75
17516
+ },
17517
+ children: /*#__PURE__*/jsx(Grid, {
17518
+ item: true,
17519
+ xs: 12,
17520
+ sx: {
17521
+ paddingTop: "0px !important"
17522
+ },
17523
+ children: /*#__PURE__*/jsx(ChartCardSkeleton, {
17524
+ height: 400
17525
+ })
17526
+ })
17527
+ }), /*#__PURE__*/jsxs(Grid, {
17528
+ container: true,
17529
+ spacing: 3,
17530
+ sx: {
17531
+ mt: 2.25
17532
+ },
17533
+ children: [/*#__PURE__*/jsx(Grid, {
17534
+ item: true,
17535
+ xs: 12,
17536
+ md: 6,
17537
+ sx: {
17538
+ paddingTop: "0px !important",
17539
+ minHeight: 430
17540
+ },
17541
+ children: /*#__PURE__*/jsx(TableCardSkeleton, {})
17542
+ }), /*#__PURE__*/jsx(Grid, {
17543
+ item: true,
17544
+ xs: 12,
17545
+ md: 6,
17546
+ sx: {
17547
+ paddingTop: "0px !important",
17548
+ minHeight: 430
17549
+ },
17550
+ children: /*#__PURE__*/jsx(DonutCardSkeleton, {})
17551
+ })]
17552
+ }), /*#__PURE__*/jsxs(Grid, {
17553
+ container: true,
17554
+ spacing: 3,
17555
+ sx: {
17556
+ mt: 2.25
17557
+ },
17558
+ children: [/*#__PURE__*/jsx(Grid, {
17559
+ item: true,
17560
+ xs: 12,
17561
+ md: 6,
17562
+ sx: {
17563
+ paddingTop: "0px !important"
17564
+ },
17565
+ children: /*#__PURE__*/jsx(TableCardSkeleton, {
17566
+ height: 360,
17567
+ rowCount: 4
17568
+ })
17569
+ }), /*#__PURE__*/jsx(Grid, {
17570
+ item: true,
17571
+ xs: 12,
17572
+ md: 6,
17573
+ sx: {
17574
+ paddingTop: "0px !important"
17575
+ },
17576
+ children: /*#__PURE__*/jsx(PanelCardSkeleton, {
17577
+ height: 360
17578
+ })
17579
+ })]
17580
+ })]
17581
+ });
17582
+ };
17794
17583
  var OrganicSectionSkeleton = function OrganicSectionSkeleton() {
17795
17584
  return /*#__PURE__*/jsxs(Fragment, {
17796
17585
  children: [/*#__PURE__*/jsx(MetricCardsSkeleton, {
@@ -17931,7 +17720,7 @@ var EmailSectionSkeleton = function EmailSectionSkeleton() {
17931
17720
  });
17932
17721
  };
17933
17722
 
17934
- var formatKpi$2 = function formatKpi(value) {
17723
+ var formatKpi$3 = function formatKpi(value) {
17935
17724
  return Number(value !== null && value !== void 0 ? value : 0).toLocaleString("en-US", {
17936
17725
  minimumFractionDigits: 2,
17937
17726
  maximumFractionDigits: 2
@@ -18009,7 +17798,7 @@ var OverallSection = function OverallSection(_ref) {
18009
17798
  };
18010
17799
  var metricInfo = {
18011
17800
  "Total Raised": {
18012
- value: "$".concat(formatKpi$2((_apiData$overviewStat = apiData === null || apiData === void 0 || (_apiData$overviewStat2 = apiData.overviewStats) === null || _apiData$overviewStat2 === void 0 || (_apiData$overviewStat2 = _apiData$overviewStat2.overview) === null || _apiData$overviewStat2 === void 0 ? void 0 : _apiData$overviewStat2.totalRevenue) !== null && _apiData$overviewStat !== void 0 ? _apiData$overviewStat : 0)) || "$0",
17801
+ value: "$".concat(formatKpi$3((_apiData$overviewStat = apiData === null || apiData === void 0 || (_apiData$overviewStat2 = apiData.overviewStats) === null || _apiData$overviewStat2 === void 0 || (_apiData$overviewStat2 = _apiData$overviewStat2.overview) === null || _apiData$overviewStat2 === void 0 ? void 0 : _apiData$overviewStat2.totalRevenue) !== null && _apiData$overviewStat !== void 0 ? _apiData$overviewStat : 0)) || "$0",
18013
17802
  subValue: "".concat(Number((_apiData$overviewStat3 = apiData === null || apiData === void 0 || (_apiData$overviewStat4 = apiData.overviewStats) === null || _apiData$overviewStat4 === void 0 || (_apiData$overviewStat4 = _apiData$overviewStat4.overview) === null || _apiData$overviewStat4 === void 0 || (_apiData$overviewStat4 = _apiData$overviewStat4.growthPercentage) === null || _apiData$overviewStat4 === void 0 ? void 0 : _apiData$overviewStat4.totalRevenue) !== null && _apiData$overviewStat3 !== void 0 ? _apiData$overviewStat3 : 0).toFixed(2), "% vs pp"),
18014
17803
  label: "Total Raised",
18015
17804
  icon: /*#__PURE__*/jsx(PaidOutlined, {}),
@@ -18018,7 +17807,7 @@ var OverallSection = function OverallSection(_ref) {
18018
17807
  warning: false
18019
17808
  },
18020
17809
  "Net Raised": {
18021
- value: "$".concat(formatKpi$2((_apiData$overviewStat5 = apiData === null || apiData === void 0 || (_apiData$overviewStat6 = apiData.overviewStats) === null || _apiData$overviewStat6 === void 0 || (_apiData$overviewStat6 = _apiData$overviewStat6.overview) === null || _apiData$overviewStat6 === void 0 ? void 0 : _apiData$overviewStat6.netRevenue) !== null && _apiData$overviewStat5 !== void 0 ? _apiData$overviewStat5 : 0)),
17810
+ value: "$".concat(formatKpi$3((_apiData$overviewStat5 = apiData === null || apiData === void 0 || (_apiData$overviewStat6 = apiData.overviewStats) === null || _apiData$overviewStat6 === void 0 || (_apiData$overviewStat6 = _apiData$overviewStat6.overview) === null || _apiData$overviewStat6 === void 0 ? void 0 : _apiData$overviewStat6.netRevenue) !== null && _apiData$overviewStat5 !== void 0 ? _apiData$overviewStat5 : 0)),
18022
17811
  subValue: "".concat(Number((_apiData$overviewStat7 = apiData === null || apiData === void 0 || (_apiData$overviewStat8 = apiData.overviewStats) === null || _apiData$overviewStat8 === void 0 || (_apiData$overviewStat8 = _apiData$overviewStat8.overview.growthPercentage) === null || _apiData$overviewStat8 === void 0 ? void 0 : _apiData$overviewStat8.netRevenue) !== null && _apiData$overviewStat7 !== void 0 ? _apiData$overviewStat7 : 0).toFixed(2), "% vs pp\n "),
18023
17812
  label: "Net Raised",
18024
17813
  icon: /*#__PURE__*/jsx(RequestQuoteOutlined, {}),
@@ -18027,7 +17816,7 @@ var OverallSection = function OverallSection(_ref) {
18027
17816
  warning: false
18028
17817
  },
18029
17818
  "Total Donors": {
18030
- value: formatKpi$2((_apiData$overviewStat9 = 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.totalDonations) !== null && _apiData$overviewStat9 !== void 0 ? _apiData$overviewStat9 : 0),
17819
+ value: formatKpi$3((_apiData$overviewStat9 = 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.totalDonations) !== null && _apiData$overviewStat9 !== void 0 ? _apiData$overviewStat9 : 0),
18031
17820
  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.totalDonations) !== null && _apiData$overviewStat1 !== void 0 ? _apiData$overviewStat1 : 0).toFixed(2), "%") || "0 new",
18032
17821
  label: "Total Donors",
18033
17822
  icon: /*#__PURE__*/jsx(PeopleAltOutlined, {}),
@@ -18036,7 +17825,7 @@ var OverallSection = function OverallSection(_ref) {
18036
17825
  warning: false
18037
17826
  },
18038
17827
  "Avg Donation": {
18039
- value: "$".concat(formatKpi$2((_apiData$overviewStat11 = apiData === null || apiData === void 0 || (_apiData$overviewStat12 = apiData.overviewStats) === null || _apiData$overviewStat12 === void 0 || (_apiData$overviewStat12 = _apiData$overviewStat12.overview) === null || _apiData$overviewStat12 === void 0 ? void 0 : _apiData$overviewStat12.overallAVGDonations) !== null && _apiData$overviewStat11 !== void 0 ? _apiData$overviewStat11 : 0)),
17828
+ value: "$".concat(formatKpi$3((_apiData$overviewStat11 = apiData === null || apiData === void 0 || (_apiData$overviewStat12 = apiData.overviewStats) === null || _apiData$overviewStat12 === void 0 || (_apiData$overviewStat12 = _apiData$overviewStat12.overview) === null || _apiData$overviewStat12 === void 0 ? void 0 : _apiData$overviewStat12.overallAVGDonations) !== null && _apiData$overviewStat11 !== void 0 ? _apiData$overviewStat11 : 0)),
18040
17829
  subValue: "".concat(Number((_apiData$overviewStat13 = apiData === null || apiData === void 0 || (_apiData$overviewStat14 = apiData.overviewStats) === null || _apiData$overviewStat14 === void 0 || (_apiData$overviewStat14 = _apiData$overviewStat14.overview.growthPercentage) === null || _apiData$overviewStat14 === void 0 ? void 0 : _apiData$overviewStat14.overallAVGDonations) !== null && _apiData$overviewStat13 !== void 0 ? _apiData$overviewStat13 : 0).toFixed(2), "% vs pp\n "),
18041
17830
  label: "Average Donation Amount",
18042
17831
  icon: /*#__PURE__*/jsx(AverageDonationIcon, {}),
@@ -18045,7 +17834,7 @@ var OverallSection = function OverallSection(_ref) {
18045
17834
  warning: false
18046
17835
  },
18047
17836
  "ROAS": {
18048
- value: "".concat(formatKpi$2((_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 ? void 0 : _apiData$overviewStat16.roas) !== null && _apiData$overviewStat15 !== void 0 ? _apiData$overviewStat15 : 0), "x"),
17837
+ value: "".concat(formatKpi$3((_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 ? void 0 : _apiData$overviewStat16.roas) !== null && _apiData$overviewStat15 !== void 0 ? _apiData$overviewStat15 : 0), "x"),
18049
17838
  subValue: "".concat(Number((_apiData$overviewStat17 = apiData === null || apiData === void 0 || (_apiData$overviewStat18 = apiData.overviewStats) === null || _apiData$overviewStat18 === void 0 || (_apiData$overviewStat18 = _apiData$overviewStat18.overview) === null || _apiData$overviewStat18 === void 0 || (_apiData$overviewStat18 = _apiData$overviewStat18.growthPercentage) === null || _apiData$overviewStat18 === void 0 ? void 0 : _apiData$overviewStat18.roas) !== null && _apiData$overviewStat17 !== void 0 ? _apiData$overviewStat17 : 0).toFixed(2), "x vs pp"),
18050
17839
  label: "ROAS",
18051
17840
  icon: /*#__PURE__*/jsx(TrendingUp, {}),
@@ -18054,7 +17843,7 @@ var OverallSection = function OverallSection(_ref) {
18054
17843
  warning: false
18055
17844
  },
18056
17845
  "Conversion": {
18057
- value: "".concat(formatKpi$2((_apiData$overviewStat19 = apiData === null || apiData === void 0 || (_apiData$overviewStat20 = apiData.overviewStats) === null || _apiData$overviewStat20 === void 0 || (_apiData$overviewStat20 = _apiData$overviewStat20.overview) === null || _apiData$overviewStat20 === void 0 ? void 0 : _apiData$overviewStat20.conversionRate) !== null && _apiData$overviewStat19 !== void 0 ? _apiData$overviewStat19 : 0), "%"),
17846
+ value: "".concat(formatKpi$3((_apiData$overviewStat19 = apiData === null || apiData === void 0 || (_apiData$overviewStat20 = apiData.overviewStats) === null || _apiData$overviewStat20 === void 0 || (_apiData$overviewStat20 = _apiData$overviewStat20.overview) === null || _apiData$overviewStat20 === void 0 ? void 0 : _apiData$overviewStat20.conversionRate) !== null && _apiData$overviewStat19 !== void 0 ? _apiData$overviewStat19 : 0), "%"),
18058
17847
  subValue: "".concat(((_apiData$overviewStat21 = apiData === null || apiData === void 0 || (_apiData$overviewStat22 = apiData.overviewStats) === null || _apiData$overviewStat22 === void 0 || (_apiData$overviewStat22 = _apiData$overviewStat22.overview) === null || _apiData$overviewStat22 === void 0 || (_apiData$overviewStat22 = _apiData$overviewStat22.growthPercentage) === null || _apiData$overviewStat22 === void 0 ? void 0 : _apiData$overviewStat22.conversionRate) !== null && _apiData$overviewStat21 !== void 0 ? _apiData$overviewStat21 : 0).toFixed(2), "%") || "0%",
18059
17848
  label: "Conversion Rate",
18060
17849
  icon: /*#__PURE__*/jsx(ConversionRateIcon, {}),
@@ -18440,93 +18229,473 @@ var OverallSection$1 = /*#__PURE__*/Object.freeze({
18440
18229
  default: OverallSection
18441
18230
  });
18442
18231
 
18443
- var PaidSection = function PaidSection() {
18232
+ var formatKpi$2 = function formatKpi(value) {
18233
+ return Number(value !== null && value !== void 0 ? value : 0).toLocaleString("en-US", {
18234
+ minimumFractionDigits: 2,
18235
+ maximumFractionDigits: 2
18236
+ });
18237
+ };
18238
+ var CHANNEL_STYLES = {
18239
+ "Meta Ads": {
18240
+ id: "M",
18241
+ icon: SiMeta,
18242
+ avatarBg: "#1877F2",
18243
+ avatarBorder: "#1877F2",
18244
+ color: "#1877F2",
18245
+ comingSoon: false
18246
+ },
18247
+ "Google Ads": {
18248
+ id: "G",
18249
+ icon: SiGoogleads,
18250
+ avatarBg: "#4285F4",
18251
+ avatarBorder: "#4285F4",
18252
+ color: "#4285F4",
18253
+ comingSoon: true
18254
+ },
18255
+ "TikTok Ads": {
18256
+ id: "T",
18257
+ icon: SiTiktok,
18258
+ avatarBg: "#000000",
18259
+ avatarBorder: "#000000",
18260
+ color: "#000000",
18261
+ comingSoon: true
18262
+ },
18263
+ YouTube: {
18264
+ id: "Y",
18265
+ icon: SiYoutube,
18266
+ avatarBg: "#FF0000",
18267
+ avatarBorder: "#FF0000",
18268
+ color: "#FF0000",
18269
+ comingSoon: true
18270
+ },
18271
+ Snapchat: {
18272
+ id: "S",
18273
+ icon: SiSnapchat,
18274
+ avatarBg: "#FFFC00",
18275
+ avatarBorder: "#FFFC00",
18276
+ iconColor: "#8A6D00",
18277
+ color: "#FFFC00",
18278
+ comingSoon: true
18279
+ }
18280
+ };
18281
+ var formatGrowth$2 = function formatGrowth(value) {
18282
+ return "".concat(Number(value !== null && value !== void 0 ? value : 0).toFixed(2), "% vs pp");
18283
+ };
18284
+ var mapTimeSeries$2 = function mapTimeSeries(series) {
18285
+ if (!Array.isArray(series) || series.length === 0) {
18286
+ return {
18287
+ categories: [],
18288
+ data: []
18289
+ };
18290
+ }
18291
+ return {
18292
+ categories: series.map(function (item) {
18293
+ return item.date;
18294
+ }),
18295
+ data: series.map(function (item) {
18296
+ var _item$value;
18297
+ return (_item$value = item.value) !== null && _item$value !== void 0 ? _item$value : 0;
18298
+ })
18299
+ };
18300
+ };
18301
+ var getChannelStyle = function getChannelStyle() {
18302
+ var channel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
18303
+ return CHANNEL_STYLES[channel] || {
18304
+ id: channel.slice(0, 1).toUpperCase() || "?",
18305
+ avatarBg: "#F3F4F6",
18306
+ color: "#6366F1",
18307
+ comingSoon: true
18308
+ };
18309
+ };
18310
+ var mapChannelTrend = function mapChannelTrend(trend) {
18311
+ var normalized = (trend || "stable").toLowerCase();
18312
+ if (normalized === "down" || normalized === "declining") {
18313
+ return {
18314
+ type: "trend",
18315
+ trendType: "down",
18316
+ trendLabel: "Declining"
18317
+ };
18318
+ }
18319
+ if (normalized === "up" || normalized === "improving") {
18320
+ return {
18321
+ type: "trend",
18322
+ trendType: "up",
18323
+ trendLabel: "Improving"
18324
+ };
18325
+ }
18326
+ return {
18327
+ type: "status",
18328
+ status: "Stable",
18329
+ statusBg: "#F3F4F6",
18330
+ statusColor: "#6B7280"
18331
+ };
18332
+ };
18333
+ var getRoasColor = function getRoasColor(roas) {
18334
+ return Number(roas !== null && roas !== void 0 ? roas : 0) >= 2.5 ? "#22C55E" : "#EF4444";
18335
+ };
18336
+ var getCampaignInitials$1 = function getCampaignInitials() {
18337
+ var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
18338
+ var words = name.trim().split(/\s+/).filter(Boolean);
18339
+ if (words.length >= 2) {
18340
+ return (words[0][0] + words[1][0]).toUpperCase();
18341
+ }
18342
+ return name.slice(0, 2).toUpperCase() || "—";
18343
+ };
18344
+ var buildEmptySpendAllocation = function buildEmptySpendAllocation() {
18345
+ var channels = Object.keys(CHANNEL_STYLES);
18346
+ return {
18347
+ series: channels.map(function () {
18348
+ return 0;
18349
+ }),
18350
+ labels: channels,
18351
+ colors: channels.map(function (channel) {
18352
+ return CHANNEL_STYLES[channel].color;
18353
+ }),
18354
+ centerLabel: "total spend",
18355
+ centerValue: "$".concat(formatNumber(0)),
18356
+ subtitle: "Where $".concat(formatNumber(0), " went"),
18357
+ items: channels.map(function (channel) {
18358
+ return {
18359
+ label: channel,
18360
+ val: "0.0%",
18361
+ color: CHANNEL_STYLES[channel].color,
18362
+ comingSoon: CHANNEL_STYLES[channel].comingSoon
18363
+ };
18364
+ })
18365
+ };
18366
+ };
18367
+ var PaidSection = function PaidSection(_ref) {
18368
+ var _ref2, _rawOverview$totalSpe, _ref3, _rawOverview$totalRev, _ref4, _rawOverview$roas, _ref5, _rawOverview$costPerD, _rawOverview$conversi, _ref6, _rawOverview$averageD, _ref7, _rawOverview$totalDon, _ref8, _rawOverview$growthPe, _rawOverview$growthPe2, _ref9, _rawOverview$growthPe3, _rawOverview$growthPe4, _ref0, _rawOverview$growthPe5, _rawOverview$growthPe6, _rawOverview$growthPe7, _rawOverview$growthPe8, _rawOverview$growthPe9, _rawOverview$growthPe0, _rawOverview$growthPe1, _rawOverview$growthPe10, _apiData$spendVsReven, _apiData$spendVsReven2, _selectedInfo$categor, _spendAllocation$subt, _spendAllocation$seri, _spendAllocation$labe, _spendAllocation$colo, _spendAllocation$cent, _spendAllocation$cent2, _spendAllocation$item;
18369
+ var _ref$apiData = _ref.apiData,
18370
+ apiData = _ref$apiData === void 0 ? {} : _ref$apiData;
18371
+ _ref.dateName;
18372
+ var _ref$apiLoading = _ref.apiLoading,
18373
+ apiLoading = _ref$apiLoading === void 0 ? false : _ref$apiLoading,
18374
+ _ref$numberOfDays = _ref.numberOfDays,
18375
+ numberOfDays = _ref$numberOfDays === void 0 ? 30 : _ref$numberOfDays;
18444
18376
  var _useState = useState("Total Spent"),
18445
18377
  _useState2 = _slicedToArray(_useState, 2),
18446
18378
  activeMetric = _useState2[0],
18447
18379
  setActiveMetric = _useState2[1];
18448
- var categories = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
18449
- var metricInfo = {
18450
- "Total Spent": {
18451
- value: "$80,313",
18452
- subValue: "12% vs last month",
18453
- chartLabel: "Daily Spend",
18454
- data: [800, 950, 700, 1100, 900, 1200, 1300],
18455
- icon: IndeterminateCheckBoxOutlined
18456
- },
18457
- "Revinue Raised": {
18458
- value: "$240,398",
18459
- subValue: "12% vs last month",
18460
- chartLabel: "Daily Revenue",
18461
- data: [3200, 4100, 2800, 5600, 4200, 6100, 7500],
18462
- icon: PaidOutlined
18463
- },
18464
- ROAS: {
18465
- value: "3.0",
18466
- subValue: "12% vs last month",
18467
- chartLabel: "ROAS Trend",
18468
- data: [2.5, 3.1, 2.8, 4.2, 3.8, 4.5, 5.2],
18469
- icon: TrendingUp
18470
- },
18471
- "Cost per donor": {
18472
- value: "$373",
18473
- subValue: "12% vs last month",
18474
- chartLabel: "CPA Trend",
18475
- data: [350, 380, 360, 410, 390, 370, 373],
18476
- icon: PersonOutlined
18477
- },
18478
- "Conversion rate": {
18479
- value: "3.1%",
18480
- subValue: "12% vs last month",
18481
- chartLabel: "Conversion Rate",
18482
- data: [2.8, 3.0, 2.9, 3.4, 3.2, 3.1, 3.1],
18483
- icon: Adjust
18484
- },
18485
- "Avg donation": {
18486
- value: "$130.58",
18487
- subValue: "12% vs last month",
18488
- chartLabel: "Average Donation",
18489
- data: [120, 135, 125, 140, 130, 128, 130.58],
18490
- icon: PaidOutlined
18380
+ var rawOverview = (apiData === null || apiData === void 0 ? void 0 : apiData.overview) || {};
18381
+ var metaSummary = (apiData === null || apiData === void 0 ? void 0 : apiData.metaSummary) || {};
18382
+ var overview = {
18383
+ totalSpent: (_ref2 = (_rawOverview$totalSpe = rawOverview.totalSpent) !== null && _rawOverview$totalSpe !== void 0 ? _rawOverview$totalSpe : metaSummary.metaSpend) !== null && _ref2 !== void 0 ? _ref2 : 0,
18384
+ totalRevenue: (_ref3 = (_rawOverview$totalRev = rawOverview.totalRevenue) !== null && _rawOverview$totalRev !== void 0 ? _rawOverview$totalRev : metaSummary.attributedAmount) !== null && _ref3 !== void 0 ? _ref3 : 0,
18385
+ roas: (_ref4 = (_rawOverview$roas = rawOverview.roas) !== null && _rawOverview$roas !== void 0 ? _rawOverview$roas : metaSummary.roas) !== null && _ref4 !== void 0 ? _ref4 : 0,
18386
+ costPerDonor: (_ref5 = (_rawOverview$costPerD = rawOverview.costPerDonor) !== null && _rawOverview$costPerD !== void 0 ? _rawOverview$costPerD : metaSummary.cpa) !== null && _ref5 !== void 0 ? _ref5 : 0,
18387
+ conversionRate: (_rawOverview$conversi = rawOverview.conversionRate) !== null && _rawOverview$conversi !== void 0 ? _rawOverview$conversi : 0,
18388
+ averageDonation: (_ref6 = (_rawOverview$averageD = rawOverview.averageDonation) !== null && _rawOverview$averageD !== void 0 ? _rawOverview$averageD : metaSummary.averageGift) !== null && _ref6 !== void 0 ? _ref6 : 0,
18389
+ totalDonations: (_ref7 = (_rawOverview$totalDon = rawOverview.totalDonations) !== null && _rawOverview$totalDon !== void 0 ? _rawOverview$totalDon : metaSummary.donationsCount) !== null && _ref7 !== void 0 ? _ref7 : 0
18390
+ };
18391
+ var growth = {
18392
+ totalSpent: (_ref8 = (_rawOverview$growthPe = (_rawOverview$growthPe2 = rawOverview.growthPercentage) === null || _rawOverview$growthPe2 === void 0 ? void 0 : _rawOverview$growthPe2.totalSpent) !== null && _rawOverview$growthPe !== void 0 ? _rawOverview$growthPe : metaSummary.metaSpendChangePercent) !== null && _ref8 !== void 0 ? _ref8 : 0,
18393
+ totalRevenue: (_ref9 = (_rawOverview$growthPe3 = (_rawOverview$growthPe4 = rawOverview.growthPercentage) === null || _rawOverview$growthPe4 === void 0 ? void 0 : _rawOverview$growthPe4.totalRevenue) !== null && _rawOverview$growthPe3 !== void 0 ? _rawOverview$growthPe3 : metaSummary.attributedChangePercent) !== null && _ref9 !== void 0 ? _ref9 : 0,
18394
+ roas: (_ref0 = (_rawOverview$growthPe5 = (_rawOverview$growthPe6 = rawOverview.growthPercentage) === null || _rawOverview$growthPe6 === void 0 ? void 0 : _rawOverview$growthPe6.roas) !== null && _rawOverview$growthPe5 !== void 0 ? _rawOverview$growthPe5 : metaSummary.roasChange) !== null && _ref0 !== void 0 ? _ref0 : 0,
18395
+ costPerDonor: (_rawOverview$growthPe7 = (_rawOverview$growthPe8 = rawOverview.growthPercentage) === null || _rawOverview$growthPe8 === void 0 ? void 0 : _rawOverview$growthPe8.costPerDonor) !== null && _rawOverview$growthPe7 !== void 0 ? _rawOverview$growthPe7 : 0,
18396
+ conversionRate: (_rawOverview$growthPe9 = (_rawOverview$growthPe0 = rawOverview.growthPercentage) === null || _rawOverview$growthPe0 === void 0 ? void 0 : _rawOverview$growthPe0.conversionRate) !== null && _rawOverview$growthPe9 !== void 0 ? _rawOverview$growthPe9 : 0,
18397
+ averageDonation: (_rawOverview$growthPe1 = (_rawOverview$growthPe10 = rawOverview.growthPercentage) === null || _rawOverview$growthPe10 === void 0 ? void 0 : _rawOverview$growthPe10.averageDonation) !== null && _rawOverview$growthPe1 !== void 0 ? _rawOverview$growthPe1 : 0
18398
+ };
18399
+ var hasPaidOverview = Boolean(apiData === null || apiData === void 0 ? void 0 : apiData.overview);
18400
+ var spendSeries = mapTimeSeries$2(apiData === null || apiData === void 0 || (_apiData$spendVsReven = apiData.spendVsRevenue) === null || _apiData$spendVsReven === void 0 ? void 0 : _apiData$spendVsReven.spend);
18401
+ var revenueSeries = mapTimeSeries$2(apiData === null || apiData === void 0 || (_apiData$spendVsReven2 = apiData.spendVsRevenue) === null || _apiData$spendVsReven2 === void 0 ? void 0 : _apiData$spendVsReven2.revenue);
18402
+ var roasChartData = useMemo(function () {
18403
+ if (spendSeries.data.length === 0 || revenueSeries.data.length === 0) {
18404
+ return [];
18491
18405
  }
18406
+ var length = Math.min(spendSeries.data.length, revenueSeries.data.length);
18407
+ return Array.from({
18408
+ length: length
18409
+ }, function (_, index) {
18410
+ var _spendSeries$data$ind, _revenueSeries$data$i;
18411
+ var spend = (_spendSeries$data$ind = spendSeries.data[index]) !== null && _spendSeries$data$ind !== void 0 ? _spendSeries$data$ind : 0;
18412
+ var revenue = (_revenueSeries$data$i = revenueSeries.data[index]) !== null && _revenueSeries$data$i !== void 0 ? _revenueSeries$data$i : 0;
18413
+ return spend > 0 ? revenue / spend : 0;
18414
+ });
18415
+ }, [spendSeries.data, revenueSeries.data]);
18416
+ var fallbackCategories = spendSeries.categories.length ? spendSeries.categories : revenueSeries.categories.length ? revenueSeries.categories : ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
18417
+ var flatSeries = function flatSeries(value) {
18418
+ return fallbackCategories.length > 0 ? fallbackCategories.map(function () {
18419
+ return Number(value !== null && value !== void 0 ? value : 0);
18420
+ }) : [Number(value !== null && value !== void 0 ? value : 0)];
18492
18421
  };
18422
+ var metricInfo = useMemo(function () {
18423
+ if (!hasPaidOverview) {
18424
+ return {
18425
+ "Total Spent": {
18426
+ value: "$".concat(formatKpi$2(0)),
18427
+ subValue: formatGrowth$2(0),
18428
+ data: flatSeries(0),
18429
+ categories: fallbackCategories,
18430
+ icon: /*#__PURE__*/jsx(IndeterminateCheckBoxOutlined, {}),
18431
+ money: true,
18432
+ error: false,
18433
+ warning: false
18434
+ },
18435
+ "Revenue Raised": {
18436
+ value: "$".concat(formatKpi$2(0)),
18437
+ subValue: formatGrowth$2(0),
18438
+ data: flatSeries(0),
18439
+ categories: fallbackCategories,
18440
+ icon: /*#__PURE__*/jsx(PaidOutlined, {}),
18441
+ money: true,
18442
+ error: false,
18443
+ warning: false
18444
+ },
18445
+ ROAS: {
18446
+ value: "".concat(formatKpi$2(0), "x"),
18447
+ subValue: formatGrowth$2(0),
18448
+ data: flatSeries(0),
18449
+ categories: fallbackCategories,
18450
+ icon: /*#__PURE__*/jsx(TrendingUp, {}),
18451
+ money: false,
18452
+ error: false,
18453
+ warning: false
18454
+ },
18455
+ "Cost Per Donor": {
18456
+ value: "$".concat(formatKpi$2(0)),
18457
+ subValue: formatGrowth$2(0),
18458
+ data: flatSeries(0),
18459
+ categories: fallbackCategories,
18460
+ icon: /*#__PURE__*/jsx(PersonOutlined, {}),
18461
+ money: true,
18462
+ error: false,
18463
+ warning: false
18464
+ },
18465
+ "Conversion Rate": {
18466
+ value: "".concat(formatKpi$2(0), "%"),
18467
+ subValue: formatGrowth$2(0),
18468
+ data: flatSeries(0),
18469
+ categories: fallbackCategories,
18470
+ icon: /*#__PURE__*/jsx(ConversionRateIcon, {}),
18471
+ money: false,
18472
+ error: false,
18473
+ warning: false
18474
+ },
18475
+ "Avg Donation": {
18476
+ value: "$".concat(formatKpi$2(0)),
18477
+ subValue: formatGrowth$2(0),
18478
+ data: flatSeries(0),
18479
+ categories: fallbackCategories,
18480
+ icon: /*#__PURE__*/jsx(AverageDonationIcon, {}),
18481
+ money: true,
18482
+ error: false,
18483
+ warning: false
18484
+ }
18485
+ };
18486
+ }
18487
+ var chartCategories = spendSeries.categories.length > 0 ? spendSeries.categories : revenueSeries.categories.length > 0 ? revenueSeries.categories : fallbackCategories;
18488
+ return {
18489
+ "Total Spent": {
18490
+ value: "$".concat(formatKpi$2(overview.totalSpent)),
18491
+ subValue: formatGrowth$2(growth.totalSpent),
18492
+ data: spendSeries.data.length > 0 ? spendSeries.data : flatSeries(0),
18493
+ categories: chartCategories,
18494
+ icon: /*#__PURE__*/jsx(IndeterminateCheckBoxOutlined, {}),
18495
+ money: true,
18496
+ error: false,
18497
+ warning: false
18498
+ },
18499
+ "Revenue Raised": {
18500
+ value: "$".concat(formatKpi$2(overview.totalRevenue)),
18501
+ subValue: formatGrowth$2(growth.totalRevenue),
18502
+ data: revenueSeries.data.length > 0 ? revenueSeries.data : flatSeries(0),
18503
+ categories: chartCategories,
18504
+ icon: /*#__PURE__*/jsx(PaidOutlined, {}),
18505
+ money: true,
18506
+ error: false,
18507
+ warning: false
18508
+ },
18509
+ ROAS: {
18510
+ value: "".concat(formatKpi$2(overview.roas), "x"),
18511
+ subValue: formatGrowth$2(growth.roas),
18512
+ data: roasChartData.length > 0 ? roasChartData : flatSeries(0),
18513
+ categories: chartCategories,
18514
+ icon: /*#__PURE__*/jsx(TrendingUp, {}),
18515
+ money: false,
18516
+ error: false,
18517
+ warning: false
18518
+ },
18519
+ "Cost Per Donor": {
18520
+ value: "$".concat(formatKpi$2(overview.costPerDonor)),
18521
+ subValue: formatGrowth$2(growth.costPerDonor),
18522
+ data: flatSeries(overview.costPerDonor),
18523
+ categories: chartCategories,
18524
+ icon: /*#__PURE__*/jsx(PersonOutlined, {}),
18525
+ money: true,
18526
+ error: false,
18527
+ warning: false
18528
+ },
18529
+ "Conversion Rate": {
18530
+ value: "".concat(formatKpi$2(overview.conversionRate), "%"),
18531
+ subValue: formatGrowth$2(growth.conversionRate),
18532
+ data: flatSeries(overview.conversionRate),
18533
+ categories: chartCategories,
18534
+ icon: /*#__PURE__*/jsx(ConversionRateIcon, {}),
18535
+ money: false,
18536
+ error: false,
18537
+ warning: false
18538
+ },
18539
+ "Avg Donation": {
18540
+ value: "$".concat(formatKpi$2(overview.averageDonation)),
18541
+ subValue: formatGrowth$2(growth.averageDonation),
18542
+ data: flatSeries(overview.averageDonation),
18543
+ categories: chartCategories,
18544
+ icon: /*#__PURE__*/jsx(AverageDonationIcon, {}),
18545
+ money: true,
18546
+ error: false,
18547
+ warning: false
18548
+ }
18549
+ };
18550
+ }, [fallbackCategories, growth, hasPaidOverview, overview, revenueSeries, roasChartData, spendSeries]);
18551
+ var channelRows = useMemo(function () {
18552
+ var channels = apiData === null || apiData === void 0 ? void 0 : apiData.channelPerformance;
18553
+ if (!hasPaidOverview) return [];
18554
+ if (!Array.isArray(channels) || channels.length === 0) return [];
18555
+ return channels.map(function (item) {
18556
+ var _item$roas, _item$spend, _item$revenue, _item$cpa;
18557
+ var style = getChannelStyle(item.channel);
18558
+ var roas = Number((_item$roas = item.roas) !== null && _item$roas !== void 0 ? _item$roas : 0);
18559
+ return _objectSpread2({
18560
+ id: style.id,
18561
+ icon: style.icon,
18562
+ avatarBg: style.avatarBg,
18563
+ avatarBorder: style.avatarBorder,
18564
+ iconColor: style.iconColor || style.avatarBorder,
18565
+ comingSoon: style.comingSoon,
18566
+ name: item.channel,
18567
+ val1: "$".concat(formatNumber((_item$spend = item.spend) !== null && _item$spend !== void 0 ? _item$spend : 0)),
18568
+ val2: "$".concat(formatNumber((_item$revenue = item.revenue) !== null && _item$revenue !== void 0 ? _item$revenue : 0)),
18569
+ val3: "".concat(roas.toFixed(1), "x"),
18570
+ val4: "$".concat(formatNumber((_item$cpa = item.cpa) !== null && _item$cpa !== void 0 ? _item$cpa : 0)),
18571
+ highlightVal3: true,
18572
+ val3Color: getRoasColor(roas)
18573
+ }, mapChannelTrend(item.trend));
18574
+ });
18575
+ }, [apiData === null || apiData === void 0 ? void 0 : apiData.channelPerformance, hasPaidOverview]);
18576
+ var spendAllocation = useMemo(function () {
18577
+ var _allocation$totalSpen, _allocation$totalSpen2;
18578
+ var allocation = apiData === null || apiData === void 0 ? void 0 : apiData.spendAllocation;
18579
+ if (!hasPaidOverview) return [];
18580
+ if (!allocation || !Array.isArray(allocation.data) || allocation.data.length === 0) {
18581
+ return buildEmptySpendAllocation();
18582
+ }
18583
+ var items = allocation.data.map(function (item) {
18584
+ var _item$percentage, _item$spend2, _item$percentage2;
18585
+ var style = getChannelStyle(item.channel);
18586
+ return {
18587
+ label: item.channel,
18588
+ val: "".concat(Number((_item$percentage = item.percentage) !== null && _item$percentage !== void 0 ? _item$percentage : 0).toFixed(1), "%"),
18589
+ color: style.color,
18590
+ spend: (_item$spend2 = item.spend) !== null && _item$spend2 !== void 0 ? _item$spend2 : 0,
18591
+ percentage: (_item$percentage2 = item.percentage) !== null && _item$percentage2 !== void 0 ? _item$percentage2 : 0,
18592
+ comingSoon: style.comingSoon
18593
+ };
18594
+ });
18595
+ return {
18596
+ series: items.map(function (item) {
18597
+ return item.percentage;
18598
+ }),
18599
+ labels: items.map(function (item) {
18600
+ return item.label;
18601
+ }),
18602
+ colors: items.map(function (item) {
18603
+ return item.color;
18604
+ }),
18605
+ centerLabel: "total spend",
18606
+ centerValue: "$".concat(formatNumber((_allocation$totalSpen = allocation.totalSpend) !== null && _allocation$totalSpen !== void 0 ? _allocation$totalSpen : 0)),
18607
+ subtitle: "Where $".concat(formatNumber((_allocation$totalSpen2 = allocation.totalSpend) !== null && _allocation$totalSpen2 !== void 0 ? _allocation$totalSpen2 : 0), " went"),
18608
+ items: items.map(function (_ref1) {
18609
+ var label = _ref1.label,
18610
+ val = _ref1.val,
18611
+ color = _ref1.color,
18612
+ comingSoon = _ref1.comingSoon;
18613
+ return {
18614
+ label: label,
18615
+ val: val,
18616
+ color: color,
18617
+ comingSoon: comingSoon
18618
+ };
18619
+ })
18620
+ };
18621
+ }, [apiData === null || apiData === void 0 ? void 0 : apiData.spendAllocation, hasPaidOverview]);
18622
+ var topCampaignsData = useMemo(function () {
18623
+ var campaigns = apiData === null || apiData === void 0 ? void 0 : apiData.topCampaigns;
18624
+ if (!hasPaidOverview) return [];
18625
+ if (!Array.isArray(campaigns)) return [];
18626
+ if (campaigns.length === 0) return [];
18627
+ return campaigns.map(function (item) {
18628
+ var _item$spend3, _item$revenue2, _item$roas2;
18629
+ var name = item.campaignName || item.campaign || item.name || "Unknown";
18630
+ return {
18631
+ id: getCampaignInitials$1(name),
18632
+ name: name,
18633
+ spend: "$".concat(formatNumber((_item$spend3 = item.spend) !== null && _item$spend3 !== void 0 ? _item$spend3 : 0)),
18634
+ revenue: "$".concat(formatNumber((_item$revenue2 = item.revenue) !== null && _item$revenue2 !== void 0 ? _item$revenue2 : 0)),
18635
+ roas: "".concat(Number((_item$roas2 = item.roas) !== null && _item$roas2 !== void 0 ? _item$roas2 : 0).toFixed(1), "x")
18636
+ };
18637
+ });
18638
+ }, [apiData === null || apiData === void 0 ? void 0 : apiData.topCampaigns, hasPaidOverview]);
18639
+ var donorGeographyData = useMemo(function () {
18640
+ var geography = apiData === null || apiData === void 0 ? void 0 : apiData.donorGeography;
18641
+ if (!hasPaidOverview) return [];
18642
+ var rawCountries = Array.isArray(geography) ? geography : (geography === null || geography === void 0 ? void 0 : geography.countries) || (geography === null || geography === void 0 ? void 0 : geography.data) || [];
18643
+ return Array.isArray(rawCountries) ? rawCountries : [];
18644
+ }, [apiData === null || apiData === void 0 ? void 0 : apiData.donorGeography, hasPaidOverview]);
18493
18645
  var renderCard = function renderCard(title) {
18494
- return /*#__PURE__*/jsx(DisplayCard, {
18646
+ return /*#__PURE__*/jsx(MetricCard$1, {
18495
18647
  title: title,
18496
18648
  value: metricInfo[title].value,
18497
- subValue: metricInfo[title].subValue,
18649
+ caption: metricInfo[title].subValue,
18498
18650
  icon: metricInfo[title].icon,
18651
+ error: metricInfo[title].error,
18652
+ active: activeMetric === title,
18499
18653
  onClick: function onClick() {
18500
18654
  return setActiveMetric(title);
18501
18655
  },
18502
- isActive: activeMetric === title,
18503
- sx: {
18504
- flex: 1
18656
+ sx: metricInfo[title].error ? {
18657
+ border: "2px solid #ef4444",
18658
+ bgcolor: "#fffafa",
18659
+ cursor: "pointer"
18660
+ } : {
18661
+ cursor: "pointer"
18505
18662
  }
18506
- }, title);
18663
+ });
18507
18664
  };
18508
- var selectedInfo = metricInfo[activeMetric];
18665
+ var selectedInfo = metricInfo[activeMetric] || metricInfo["Total Spent"];
18666
+ var emptySpendAllocation = buildEmptySpendAllocation();
18667
+ var chartCategories = ((_selectedInfo$categor = selectedInfo.categories) === null || _selectedInfo$categor === void 0 ? void 0 : _selectedInfo$categor.length) > 0 ? selectedInfo.categories : fallbackCategories;
18509
18668
  var mainChart = {
18510
18669
  label: activeMetric,
18511
18670
  value: selectedInfo.value,
18512
18671
  trend: selectedInfo.subValue,
18513
18672
  data: selectedInfo.data,
18514
- categories: categories
18673
+ categories: chartCategories,
18674
+ hideControls: true,
18675
+ isAmount: selectedInfo.money
18515
18676
  };
18677
+ if (apiLoading) {
18678
+ return /*#__PURE__*/jsx(PaidSectionSkeleton, {});
18679
+ }
18516
18680
  return /*#__PURE__*/jsxs(Fragment, {
18517
18681
  children: [/*#__PURE__*/jsx(Box, {
18518
18682
  sx: {
18519
- display: "flex",
18520
- gap: 2,
18521
- mb: 1,
18522
- flexWrap: "wrap"
18683
+ display: "grid",
18684
+ gridTemplateColumns: {
18685
+ xs: "1fr",
18686
+ sm: "1fr 1fr",
18687
+ md: "1fr 1fr 1fr",
18688
+ lg: "repeat(6, 1fr)"
18689
+ },
18690
+ gap: "6px",
18691
+ mb: 0
18523
18692
  },
18524
18693
  children: Object.keys(metricInfo).map(renderCard)
18525
18694
  }), /*#__PURE__*/jsx(Grid, {
18526
18695
  container: true,
18527
18696
  spacing: 3,
18528
18697
  sx: {
18529
- mt: 1
18698
+ mt: "12px"
18530
18699
  },
18531
18700
  children: /*#__PURE__*/jsx(RenderChartCard, {
18532
18701
  item: mainChart,
@@ -18534,125 +18703,61 @@ var PaidSection = function PaidSection() {
18534
18703
  md: 12,
18535
18704
  type: "area",
18536
18705
  isPrimary: true,
18537
- isPremium: true
18706
+ isPremium: true,
18707
+ numberOfDays: numberOfDays,
18708
+ metric: activeMetric === "Conversion Rate" ? "Percent" : activeMetric === "ROAS" ? "ROAS" : selectedInfo.money ? "Revenue" : "Donors"
18538
18709
  })
18539
18710
  }), /*#__PURE__*/jsxs(Grid, {
18540
18711
  container: true,
18541
18712
  spacing: 3,
18542
18713
  sx: {
18543
- mt: 3
18714
+ mt: "6px"
18544
18715
  },
18545
18716
  children: [/*#__PURE__*/jsx(Grid, {
18546
18717
  item: true,
18547
18718
  xs: 12,
18548
18719
  md: 6,
18720
+ sx: {
18721
+ paddingTop: "0px !important",
18722
+ minHeight: "430px"
18723
+ },
18549
18724
  children: /*#__PURE__*/jsx(ActiveCampaignsCard, {
18550
- title: "Channel performance",
18725
+ title: "Channel Performance",
18551
18726
  subtitle: "Ad platforms ranked by ROAS",
18552
- columns: ["channel", "spend", "revenue", "ROAS", "CPA", "trend"],
18727
+ columns: ["Channel", "Ppend", "Revenue", "ROAS", "CPA", "Trend"],
18553
18728
  gridTemplateColumns: "2.2fr 1fr 1fr 0.8fr 0.8fr 1.2fr",
18554
- rows: [{
18555
- id: "M",
18556
- avatarBg: "#4267B2",
18557
- avatarColor: "#fff",
18558
- name: "Meta Ads",
18559
- val1: "$32,800",
18560
- val2: "$112,400",
18561
- val3: "3.4x",
18562
- val4: "$340",
18563
- type: "trend",
18564
- trendType: "up",
18565
- trendLabel: "Improving",
18566
- highlightVal3: true,
18567
- val3Color: "#22C55E",
18568
- comingSoon: false
18569
- }, {
18570
- id: "G",
18571
- avatarBg: "#C4C4C4",
18572
- avatarColor: "#fff",
18573
- name: "Google Ads",
18574
- val1: "—",
18575
- val2: "—",
18576
- val3: "—",
18577
- val4: "—",
18578
- type: "comingSoon",
18579
- comingSoon: true
18580
- }, {
18581
- id: "T",
18582
- avatarBg: "#C4C4C4",
18583
- avatarColor: "#fff",
18584
- name: "TikTok Ads",
18585
- val1: "—",
18586
- val2: "—",
18587
- val3: "—",
18588
- val4: "—",
18589
- type: "comingSoon",
18590
- comingSoon: true
18591
- }, {
18592
- id: "Y",
18593
- avatarBg: "#C4C4C4",
18594
- avatarColor: "#fff",
18595
- name: "YouTube",
18596
- val1: "—",
18597
- val2: "—",
18598
- val3: "—",
18599
- val4: "—",
18600
- type: "comingSoon",
18601
- comingSoon: true
18602
- }, {
18603
- id: "S",
18604
- avatarBg: "#C4C4C4",
18605
- avatarColor: "#fff",
18606
- name: "Snapchat",
18607
- val1: "—",
18608
- val2: "—",
18609
- val3: "—",
18610
- val4: "—",
18611
- type: "comingSoon",
18612
- comingSoon: true
18613
- }]
18729
+ height: "100%",
18730
+ rows: channelRows !== null && channelRows !== void 0 ? channelRows : []
18614
18731
  })
18615
18732
  }), /*#__PURE__*/jsx(Grid, {
18616
18733
  item: true,
18617
18734
  xs: 12,
18618
18735
  md: 6,
18736
+ sx: {
18737
+ paddingTop: "0px !important",
18738
+ minHeight: "430px",
18739
+ paddingLeft: {
18740
+ xs: "24px !important",
18741
+ md: "6px !important"
18742
+ },
18743
+ marginTop: {
18744
+ xs: "6px",
18745
+ md: "0px"
18746
+ }
18747
+ },
18619
18748
  children: /*#__PURE__*/jsx(DonorMixCard, {
18620
- title: "Spend allocation",
18621
- subtitle: "Where $80.3K went this month",
18622
- series: [100],
18623
- labels: ["Meta Ads"],
18624
- colors: ["#4267B2"],
18625
- centerLabel: "total spend",
18626
- centerValue: "$80.3K",
18627
- items: [{
18628
- label: "Meta Ads",
18629
- val: "100%",
18630
- color: "#4267B2",
18631
- comingSoon: false
18632
- }, {
18633
- label: "Google Ads",
18634
- val: "Coming Soon",
18635
- color: "#C4C4C4",
18636
- comingSoon: true
18637
- }, {
18638
- label: "TikTok",
18639
- val: "Coming Soon",
18640
- color: "#C4C4C4",
18641
- comingSoon: true
18642
- }, {
18643
- label: "YouTube",
18644
- val: "Coming Soon",
18645
- color: "#C4C4C4",
18646
- comingSoon: true
18647
- }, {
18648
- label: "Snapchat",
18649
- val: "Coming Soon",
18650
- color: "#C4C4C4",
18651
- comingSoon: true
18652
- }],
18749
+ title: "Spend Allocation",
18750
+ subtitle: (_spendAllocation$subt = spendAllocation === null || spendAllocation === void 0 ? void 0 : spendAllocation.subtitle) !== null && _spendAllocation$subt !== void 0 ? _spendAllocation$subt : emptySpendAllocation.subtitle,
18751
+ series: (_spendAllocation$seri = spendAllocation === null || spendAllocation === void 0 ? void 0 : spendAllocation.series) !== null && _spendAllocation$seri !== void 0 ? _spendAllocation$seri : emptySpendAllocation.series,
18752
+ labels: (_spendAllocation$labe = spendAllocation === null || spendAllocation === void 0 ? void 0 : spendAllocation.labels) !== null && _spendAllocation$labe !== void 0 ? _spendAllocation$labe : emptySpendAllocation.labels,
18753
+ colors: (_spendAllocation$colo = spendAllocation === null || spendAllocation === void 0 ? void 0 : spendAllocation.colors) !== null && _spendAllocation$colo !== void 0 ? _spendAllocation$colo : emptySpendAllocation.colors,
18754
+ centerLabel: (_spendAllocation$cent = spendAllocation === null || spendAllocation === void 0 ? void 0 : spendAllocation.centerLabel) !== null && _spendAllocation$cent !== void 0 ? _spendAllocation$cent : "total spend",
18755
+ centerValue: (_spendAllocation$cent2 = spendAllocation === null || spendAllocation === void 0 ? void 0 : spendAllocation.centerValue) !== null && _spendAllocation$cent2 !== void 0 ? _spendAllocation$cent2 : emptySpendAllocation.centerValue,
18756
+ items: (_spendAllocation$item = spendAllocation === null || spendAllocation === void 0 ? void 0 : spendAllocation.items) !== null && _spendAllocation$item !== void 0 ? _spendAllocation$item : emptySpendAllocation.items,
18653
18757
  showBottomSummary: false,
18654
18758
  sx: {
18655
- pb: 3.5
18759
+ pb: 3.5,
18760
+ height: "100%"
18656
18761
  }
18657
18762
  })
18658
18763
  })]
@@ -18660,18 +18765,44 @@ var PaidSection = function PaidSection() {
18660
18765
  container: true,
18661
18766
  spacing: 3,
18662
18767
  sx: {
18663
- mt: 3
18768
+ mt: "6px",
18769
+ alignItems: "stretch"
18664
18770
  },
18665
18771
  children: [/*#__PURE__*/jsx(Grid, {
18666
18772
  item: true,
18667
18773
  xs: 12,
18668
18774
  md: 6,
18669
- children: /*#__PURE__*/jsx(TopPerformingCampaignsCard, {})
18775
+ sx: {
18776
+ paddingTop: "0px !important",
18777
+ display: "flex"
18778
+ },
18779
+ children: /*#__PURE__*/jsx(Box, {
18780
+ sx: {
18781
+ width: "100%"
18782
+ },
18783
+ children: /*#__PURE__*/jsx(TopPerformingCampaignsCard, {
18784
+ data: topCampaignsData !== null && topCampaignsData !== void 0 ? topCampaignsData : []
18785
+ })
18786
+ })
18670
18787
  }), /*#__PURE__*/jsx(Grid, {
18671
18788
  item: true,
18672
18789
  xs: 12,
18673
18790
  md: 6,
18674
- children: /*#__PURE__*/jsx(PaidDonorGeographyCard, {})
18791
+ sx: {
18792
+ paddingTop: "0px !important",
18793
+ paddingLeft: {
18794
+ xs: "24px !important",
18795
+ md: "6px !important"
18796
+ },
18797
+ marginTop: {
18798
+ xs: "6px",
18799
+ md: "0px"
18800
+ },
18801
+ display: "flex"
18802
+ },
18803
+ children: /*#__PURE__*/jsx(PaidDonorGeographyCard, {
18804
+ donorGeographyData: donorGeographyData
18805
+ })
18675
18806
  })]
18676
18807
  })]
18677
18808
  });