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