@ammarkhalidfarooq/dashboard-package 0.6.113 → 0.6.115
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 +104 -408
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +105 -409
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -9,7 +9,6 @@ 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 CloseIcon = require('@mui/icons-material/Close');
|
|
13
12
|
|
|
14
13
|
var theme = styles.createTheme({
|
|
15
14
|
cssVariables: true,
|
|
@@ -6608,65 +6607,100 @@ var PaidDonorGeographyCard = function PaidDonorGeographyCard(_ref9) {
|
|
|
6608
6607
|
value: item.donations !== undefined ? item.donations : item.value || 0
|
|
6609
6608
|
};
|
|
6610
6609
|
});
|
|
6611
|
-
return /*#__PURE__*/jsxRuntime.
|
|
6612
|
-
title: "Paid Donor Geography",
|
|
6613
|
-
subtitle: "Where ad-acquired donors come from",
|
|
6610
|
+
return /*#__PURE__*/jsxRuntime.jsxs(material.Card, {
|
|
6614
6611
|
sx: _objectSpread2({
|
|
6615
|
-
|
|
6612
|
+
bgcolor: "#fff",
|
|
6613
|
+
borderRadius: 4,
|
|
6614
|
+
border: "1px solid #f0f0f0",
|
|
6615
|
+
boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
|
|
6616
|
+
p: 3,
|
|
6617
|
+
width: "100%",
|
|
6618
|
+
display: "flex",
|
|
6619
|
+
flexDirection: "column",
|
|
6620
|
+
boxSizing: "border-box"
|
|
6616
6621
|
}, sx),
|
|
6617
|
-
children:
|
|
6622
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
6623
|
+
sx: {
|
|
6624
|
+
marginBottom: "12px"
|
|
6625
|
+
},
|
|
6626
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
6627
|
+
sx: {
|
|
6628
|
+
fontWeight: 700,
|
|
6629
|
+
fontSize: "18px",
|
|
6630
|
+
color: "#000",
|
|
6631
|
+
textAlign: "left",
|
|
6632
|
+
lineHeight: 1.15
|
|
6633
|
+
},
|
|
6634
|
+
children: "Paid Donor Geography"
|
|
6635
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
6636
|
+
sx: {
|
|
6637
|
+
fontSize: "13px",
|
|
6638
|
+
color: "rgba(0, 0, 0, 0.4)",
|
|
6639
|
+
textAlign: "left",
|
|
6640
|
+
lineHeight: 1.15
|
|
6641
|
+
},
|
|
6642
|
+
children: "Where ad-acquired donors come from"
|
|
6643
|
+
})]
|
|
6644
|
+
}), data.length === 0 ? /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
6618
6645
|
sx: {
|
|
6619
6646
|
fontSize: "13px",
|
|
6620
6647
|
color: "rgba(0, 0, 0, 0.4)",
|
|
6621
6648
|
py: 2
|
|
6622
6649
|
},
|
|
6623
6650
|
children: "No geography data for this period"
|
|
6624
|
-
}) :
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
6633
|
-
sx: {
|
|
6634
|
-
fontSize: "13px",
|
|
6635
|
-
fontWeight: 500,
|
|
6636
|
-
color: "rgba(0, 0, 0, 0.4)",
|
|
6637
|
-
minWidth: "100px",
|
|
6638
|
-
textAlign: "left"
|
|
6639
|
-
},
|
|
6640
|
-
children: item.country
|
|
6641
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
6651
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
6652
|
+
sx: {
|
|
6653
|
+
display: "flex",
|
|
6654
|
+
flexDirection: "column",
|
|
6655
|
+
gap: 1
|
|
6656
|
+
},
|
|
6657
|
+
children: data.map(function (item, index) {
|
|
6658
|
+
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
6642
6659
|
sx: {
|
|
6643
|
-
|
|
6660
|
+
display: "flex",
|
|
6661
|
+
alignItems: "center",
|
|
6662
|
+
gap: 2,
|
|
6663
|
+
py: 0.7
|
|
6644
6664
|
},
|
|
6645
|
-
children: /*#__PURE__*/jsxRuntime.jsx(material.
|
|
6646
|
-
variant: "determinate",
|
|
6647
|
-
value: item.percentage,
|
|
6665
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
6648
6666
|
sx: {
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6667
|
+
fontSize: "13px",
|
|
6668
|
+
fontWeight: 500,
|
|
6669
|
+
color: "rgba(0, 0, 0, 0.4)",
|
|
6670
|
+
minWidth: "100px",
|
|
6671
|
+
textAlign: "left"
|
|
6672
|
+
},
|
|
6673
|
+
children: item.country
|
|
6674
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
6675
|
+
sx: {
|
|
6676
|
+
flexGrow: 1
|
|
6677
|
+
},
|
|
6678
|
+
children: /*#__PURE__*/jsxRuntime.jsx(material.LinearProgress, {
|
|
6679
|
+
variant: "determinate",
|
|
6680
|
+
value: item.percentage,
|
|
6681
|
+
sx: {
|
|
6682
|
+
height: 8,
|
|
6653
6683
|
borderRadius: 4,
|
|
6654
|
-
bgcolor: "#
|
|
6684
|
+
bgcolor: "#F3F4F6",
|
|
6685
|
+
"& .MuiLinearProgress-bar": {
|
|
6686
|
+
borderRadius: 4,
|
|
6687
|
+
bgcolor: "#6366F1"
|
|
6688
|
+
}
|
|
6655
6689
|
}
|
|
6656
|
-
}
|
|
6657
|
-
})
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
})
|
|
6668
|
-
}
|
|
6669
|
-
})
|
|
6690
|
+
})
|
|
6691
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Typography, {
|
|
6692
|
+
sx: {
|
|
6693
|
+
fontSize: "13px",
|
|
6694
|
+
fontWeight: 700,
|
|
6695
|
+
color: "#111",
|
|
6696
|
+
minWidth: "60px",
|
|
6697
|
+
textAlign: "right"
|
|
6698
|
+
},
|
|
6699
|
+
children: [item.value, " - ", item.percentage, "%"]
|
|
6700
|
+
})]
|
|
6701
|
+
}, index);
|
|
6702
|
+
})
|
|
6703
|
+
})]
|
|
6670
6704
|
});
|
|
6671
6705
|
};
|
|
6672
6706
|
|
|
@@ -7056,316 +7090,6 @@ var RefundsChargebacksCard = function RefundsChargebacksCard(_ref) {
|
|
|
7056
7090
|
});
|
|
7057
7091
|
};
|
|
7058
7092
|
|
|
7059
|
-
var BORDER$1 = "1px solid #e0e0e0";
|
|
7060
|
-
var ROWS_PER_PAGE = 10;
|
|
7061
|
-
var headerCellSx$1 = {
|
|
7062
|
-
fontWeight: 700,
|
|
7063
|
-
fontSize: "0.78rem",
|
|
7064
|
-
color: "#111",
|
|
7065
|
-
bgcolor: "#f3f3f3",
|
|
7066
|
-
borderBottom: BORDER$1,
|
|
7067
|
-
borderRight: BORDER$1,
|
|
7068
|
-
py: "12px",
|
|
7069
|
-
px: "16px",
|
|
7070
|
-
lineHeight: 1.4,
|
|
7071
|
-
textAlign: "left",
|
|
7072
|
-
"&:last-child": {
|
|
7073
|
-
borderRight: 0
|
|
7074
|
-
}
|
|
7075
|
-
};
|
|
7076
|
-
var cellSx$1 = {
|
|
7077
|
-
fontSize: "0.85rem",
|
|
7078
|
-
color: "#333",
|
|
7079
|
-
borderBottom: BORDER$1,
|
|
7080
|
-
borderRight: BORDER$1,
|
|
7081
|
-
py: "12px",
|
|
7082
|
-
px: "16px",
|
|
7083
|
-
verticalAlign: "middle",
|
|
7084
|
-
textAlign: "left",
|
|
7085
|
-
"&:last-child": {
|
|
7086
|
-
borderRight: 0
|
|
7087
|
-
}
|
|
7088
|
-
};
|
|
7089
|
-
var MOCK_ROWS = [{
|
|
7090
|
-
date: "Jun 1, 2026",
|
|
7091
|
-
campaignName: "Ramadan 2024 - Global Feed",
|
|
7092
|
-
donorType: "New Donor",
|
|
7093
|
-
raised: "$4,520.00"
|
|
7094
|
-
}, {
|
|
7095
|
-
date: "Jun 2, 2026",
|
|
7096
|
-
campaignName: "Water for Life - East Africa",
|
|
7097
|
-
donorType: "Returning",
|
|
7098
|
-
raised: "$1,280.00"
|
|
7099
|
-
}, {
|
|
7100
|
-
date: "Jun 3, 2026",
|
|
7101
|
-
campaignName: "Orphan Care - Palestine",
|
|
7102
|
-
donorType: "New Donor",
|
|
7103
|
-
raised: "$2,850.00"
|
|
7104
|
-
}, {
|
|
7105
|
-
date: "Jun 4, 2026",
|
|
7106
|
-
campaignName: "Emergency Relief - Yemen",
|
|
7107
|
-
donorType: "Returning",
|
|
7108
|
-
raised: "$1,540.00"
|
|
7109
|
-
}, {
|
|
7110
|
-
date: "Jun 5, 2026",
|
|
7111
|
-
campaignName: "Education Fund - Syria",
|
|
7112
|
-
donorType: "New Donor",
|
|
7113
|
-
raised: "$980.00"
|
|
7114
|
-
}, {
|
|
7115
|
-
date: "Jun 6, 2026",
|
|
7116
|
-
campaignName: "Medical Aid - Gaza",
|
|
7117
|
-
donorType: "Returning",
|
|
7118
|
-
raised: "$3,120.00"
|
|
7119
|
-
}, {
|
|
7120
|
-
date: "Jun 7, 2026",
|
|
7121
|
-
campaignName: "Food Security - Sudan",
|
|
7122
|
-
donorType: "New Donor",
|
|
7123
|
-
raised: "$760.00"
|
|
7124
|
-
}, {
|
|
7125
|
-
date: "Jun 8, 2026",
|
|
7126
|
-
campaignName: "Winter Relief - Afghanistan",
|
|
7127
|
-
donorType: "Returning",
|
|
7128
|
-
raised: "$2,140.00"
|
|
7129
|
-
}, {
|
|
7130
|
-
date: "Jun 9, 2026",
|
|
7131
|
-
campaignName: "Clean Water - Bangladesh",
|
|
7132
|
-
donorType: "New Donor",
|
|
7133
|
-
raised: "$890.00"
|
|
7134
|
-
}, {
|
|
7135
|
-
date: "Jun 10, 2026",
|
|
7136
|
-
campaignName: "Shelter Fund - Lebanon",
|
|
7137
|
-
donorType: "Returning",
|
|
7138
|
-
raised: "$1,675.00"
|
|
7139
|
-
}, {
|
|
7140
|
-
date: "Jun 11, 2026",
|
|
7141
|
-
campaignName: "Qurbani 2026 - Global",
|
|
7142
|
-
donorType: "New Donor",
|
|
7143
|
-
raised: "$5,230.00"
|
|
7144
|
-
}, {
|
|
7145
|
-
date: "Jun 12, 2026",
|
|
7146
|
-
campaignName: "Maternal Health - Somalia",
|
|
7147
|
-
donorType: "Returning",
|
|
7148
|
-
raised: "$1,120.00"
|
|
7149
|
-
}, {
|
|
7150
|
-
date: "Jun 13, 2026",
|
|
7151
|
-
campaignName: "School Supplies - Pakistan",
|
|
7152
|
-
donorType: "New Donor",
|
|
7153
|
-
raised: "$640.00"
|
|
7154
|
-
}, {
|
|
7155
|
-
date: "Jun 14, 2026",
|
|
7156
|
-
campaignName: "Disaster Response - Turkey",
|
|
7157
|
-
donorType: "Returning",
|
|
7158
|
-
raised: "$3,890.00"
|
|
7159
|
-
}, {
|
|
7160
|
-
date: "Jun 15, 2026",
|
|
7161
|
-
campaignName: "Zakat Distribution - UK",
|
|
7162
|
-
donorType: "New Donor",
|
|
7163
|
-
raised: "$2,450.00"
|
|
7164
|
-
}, {
|
|
7165
|
-
date: "Jun 16, 2026",
|
|
7166
|
-
campaignName: "Eye Care - Morocco",
|
|
7167
|
-
donorType: "Returning",
|
|
7168
|
-
raised: "$780.00"
|
|
7169
|
-
}, {
|
|
7170
|
-
date: "Jun 17, 2026",
|
|
7171
|
-
campaignName: "Livelihood Support - Iraq",
|
|
7172
|
-
donorType: "New Donor",
|
|
7173
|
-
raised: "$1,960.00"
|
|
7174
|
-
}, {
|
|
7175
|
-
date: "Jun 18, 2026",
|
|
7176
|
-
campaignName: "Ramadan Iftar - Jordan",
|
|
7177
|
-
donorType: "Returning",
|
|
7178
|
-
raised: "$2,310.00"
|
|
7179
|
-
}, {
|
|
7180
|
-
date: "Jun 19, 2026",
|
|
7181
|
-
campaignName: "Children's Fund - Nigeria",
|
|
7182
|
-
donorType: "New Donor",
|
|
7183
|
-
raised: "$1,430.00"
|
|
7184
|
-
}, {
|
|
7185
|
-
date: "Jun 20, 2026",
|
|
7186
|
-
campaignName: "Housing Rebuild - Libya",
|
|
7187
|
-
donorType: "Returning",
|
|
7188
|
-
raised: "$3,050.00"
|
|
7189
|
-
}];
|
|
7190
|
-
var OverallDetailModal = function OverallDetailModal(_ref) {
|
|
7191
|
-
var open = _ref.open,
|
|
7192
|
-
title = _ref.title,
|
|
7193
|
-
onClose = _ref.onClose;
|
|
7194
|
-
var _useState = React.useState(1),
|
|
7195
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
7196
|
-
page = _useState2[0],
|
|
7197
|
-
setPage = _useState2[1];
|
|
7198
|
-
var totalPages = Math.ceil(MOCK_ROWS.length / ROWS_PER_PAGE);
|
|
7199
|
-
React.useEffect(function () {
|
|
7200
|
-
if (open) {
|
|
7201
|
-
setPage(1);
|
|
7202
|
-
}
|
|
7203
|
-
}, [open, title]);
|
|
7204
|
-
var paginatedRows = MOCK_ROWS.slice((page - 1) * ROWS_PER_PAGE, page * ROWS_PER_PAGE);
|
|
7205
|
-
return /*#__PURE__*/jsxRuntime.jsxs(material.Dialog, {
|
|
7206
|
-
open: open,
|
|
7207
|
-
onClose: onClose,
|
|
7208
|
-
maxWidth: "md",
|
|
7209
|
-
fullWidth: true,
|
|
7210
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(material.DialogTitle, {
|
|
7211
|
-
sx: {
|
|
7212
|
-
display: "flex",
|
|
7213
|
-
alignItems: "center",
|
|
7214
|
-
justifyContent: "space-between",
|
|
7215
|
-
pr: 1,
|
|
7216
|
-
pb: 1
|
|
7217
|
-
},
|
|
7218
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
7219
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
7220
|
-
sx: {
|
|
7221
|
-
fontWeight: 700,
|
|
7222
|
-
fontSize: "18px",
|
|
7223
|
-
color: "#000"
|
|
7224
|
-
},
|
|
7225
|
-
children: title
|
|
7226
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
7227
|
-
sx: {
|
|
7228
|
-
fontSize: "13px",
|
|
7229
|
-
color: "rgba(0, 0, 0, 0.45)",
|
|
7230
|
-
mt: 0.25
|
|
7231
|
-
},
|
|
7232
|
-
children: "Campaign breakdown"
|
|
7233
|
-
})]
|
|
7234
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.IconButton, {
|
|
7235
|
-
"aria-label": "Close",
|
|
7236
|
-
onClick: onClose,
|
|
7237
|
-
size: "small",
|
|
7238
|
-
children: /*#__PURE__*/jsxRuntime.jsx(CloseIcon, {})
|
|
7239
|
-
})]
|
|
7240
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.DialogContent, {
|
|
7241
|
-
sx: {
|
|
7242
|
-
pt: 0
|
|
7243
|
-
},
|
|
7244
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
7245
|
-
sx: {
|
|
7246
|
-
border: BORDER$1,
|
|
7247
|
-
borderRadius: "12px",
|
|
7248
|
-
overflow: "hidden"
|
|
7249
|
-
},
|
|
7250
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(material.TableContainer, {
|
|
7251
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(material.Table, {
|
|
7252
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(material.TableHead, {
|
|
7253
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(material.TableRow, {
|
|
7254
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(material.TableCell, {
|
|
7255
|
-
sx: headerCellSx$1,
|
|
7256
|
-
children: "Date"
|
|
7257
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.TableCell, {
|
|
7258
|
-
sx: headerCellSx$1,
|
|
7259
|
-
children: "Campaign Name"
|
|
7260
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.TableCell, {
|
|
7261
|
-
sx: headerCellSx$1,
|
|
7262
|
-
children: "Donor Type"
|
|
7263
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.TableCell, {
|
|
7264
|
-
sx: _objectSpread2(_objectSpread2({}, headerCellSx$1), {}, {
|
|
7265
|
-
textAlign: "right"
|
|
7266
|
-
}),
|
|
7267
|
-
children: "Raised"
|
|
7268
|
-
})]
|
|
7269
|
-
})
|
|
7270
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.TableBody, {
|
|
7271
|
-
children: paginatedRows.map(function (row) {
|
|
7272
|
-
return /*#__PURE__*/jsxRuntime.jsxs(material.TableRow, {
|
|
7273
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(material.TableCell, {
|
|
7274
|
-
sx: cellSx$1,
|
|
7275
|
-
children: row.date
|
|
7276
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.TableCell, {
|
|
7277
|
-
sx: cellSx$1,
|
|
7278
|
-
children: row.campaignName
|
|
7279
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.TableCell, {
|
|
7280
|
-
sx: cellSx$1,
|
|
7281
|
-
children: row.donorType
|
|
7282
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.TableCell, {
|
|
7283
|
-
sx: _objectSpread2(_objectSpread2({}, cellSx$1), {}, {
|
|
7284
|
-
textAlign: "right",
|
|
7285
|
-
fontWeight: 600
|
|
7286
|
-
}),
|
|
7287
|
-
children: row.raised
|
|
7288
|
-
})]
|
|
7289
|
-
}, "".concat(row.date, "-").concat(row.campaignName));
|
|
7290
|
-
})
|
|
7291
|
-
})]
|
|
7292
|
-
})
|
|
7293
|
-
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
7294
|
-
sx: {
|
|
7295
|
-
display: "flex",
|
|
7296
|
-
alignItems: "center",
|
|
7297
|
-
justifyContent: "space-between",
|
|
7298
|
-
px: 2,
|
|
7299
|
-
py: 1.5,
|
|
7300
|
-
borderTop: BORDER$1
|
|
7301
|
-
},
|
|
7302
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
7303
|
-
sx: {
|
|
7304
|
-
display: "flex",
|
|
7305
|
-
gap: 0.5
|
|
7306
|
-
},
|
|
7307
|
-
children: [Array.from({
|
|
7308
|
-
length: totalPages
|
|
7309
|
-
}, function (_, index) {
|
|
7310
|
-
return index + 1;
|
|
7311
|
-
}).map(function (pageNumber) {
|
|
7312
|
-
return /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
7313
|
-
onClick: function onClick() {
|
|
7314
|
-
return setPage(pageNumber);
|
|
7315
|
-
},
|
|
7316
|
-
sx: {
|
|
7317
|
-
width: 32,
|
|
7318
|
-
height: 32,
|
|
7319
|
-
display: "flex",
|
|
7320
|
-
alignItems: "center",
|
|
7321
|
-
justifyContent: "center",
|
|
7322
|
-
borderRadius: "6px",
|
|
7323
|
-
cursor: "pointer",
|
|
7324
|
-
fontSize: "13px",
|
|
7325
|
-
fontWeight: page === pageNumber ? 700 : 400,
|
|
7326
|
-
bgcolor: page === pageNumber ? "primary.main" : "transparent",
|
|
7327
|
-
color: page === pageNumber ? "#fff" : "#333",
|
|
7328
|
-
border: page === pageNumber ? "none" : "1px solid ".concat(BORDER$1),
|
|
7329
|
-
"&:hover": {
|
|
7330
|
-
bgcolor: page === pageNumber ? "primary.main" : "#f5f5f5"
|
|
7331
|
-
}
|
|
7332
|
-
},
|
|
7333
|
-
children: pageNumber
|
|
7334
|
-
}, pageNumber);
|
|
7335
|
-
}), page < totalPages && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
7336
|
-
onClick: function onClick() {
|
|
7337
|
-
return setPage(function (current) {
|
|
7338
|
-
return Math.min(current + 1, totalPages);
|
|
7339
|
-
});
|
|
7340
|
-
},
|
|
7341
|
-
sx: {
|
|
7342
|
-
px: 1.5,
|
|
7343
|
-
height: 32,
|
|
7344
|
-
display: "flex",
|
|
7345
|
-
alignItems: "center",
|
|
7346
|
-
gap: 0.5,
|
|
7347
|
-
borderRadius: "6px",
|
|
7348
|
-
cursor: "pointer",
|
|
7349
|
-
fontSize: "13px",
|
|
7350
|
-
color: "#333",
|
|
7351
|
-
border: "1px solid ".concat(BORDER$1),
|
|
7352
|
-
"&:hover": {
|
|
7353
|
-
bgcolor: "#f5f5f5"
|
|
7354
|
-
}
|
|
7355
|
-
},
|
|
7356
|
-
children: "Next \u203A"
|
|
7357
|
-
})]
|
|
7358
|
-
}), /*#__PURE__*/jsxRuntime.jsxs(material.Typography, {
|
|
7359
|
-
variant: "caption",
|
|
7360
|
-
color: "text.secondary",
|
|
7361
|
-
children: [MOCK_ROWS.length, " records"]
|
|
7362
|
-
})]
|
|
7363
|
-
})]
|
|
7364
|
-
})
|
|
7365
|
-
})]
|
|
7366
|
-
});
|
|
7367
|
-
};
|
|
7368
|
-
|
|
7369
7093
|
var CARD_SX = {
|
|
7370
7094
|
maxHeight: 280
|
|
7371
7095
|
};
|
|
@@ -7413,30 +7137,7 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
|
|
|
7413
7137
|
_ref.dateName;
|
|
7414
7138
|
var _ref$numberOfDays = _ref.numberOfDays,
|
|
7415
7139
|
numberOfDays = _ref$numberOfDays === void 0 ? 30 : _ref$numberOfDays;
|
|
7416
|
-
var _useState = React.useState(null),
|
|
7417
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
7418
|
-
modalTitle = _useState2[0],
|
|
7419
|
-
setModalTitle = _useState2[1];
|
|
7420
7140
|
var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
|
|
7421
|
-
var openDetailModal = function openDetailModal(title) {
|
|
7422
|
-
if (!exportMode) {
|
|
7423
|
-
setModalTitle(title);
|
|
7424
|
-
}
|
|
7425
|
-
};
|
|
7426
|
-
var closeDetailModal = function closeDetailModal() {
|
|
7427
|
-
return setModalTitle(null);
|
|
7428
|
-
};
|
|
7429
|
-
var withCardClick = function withCardClick(title, card) {
|
|
7430
|
-
return exportMode ? card : /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
7431
|
-
onClick: function onClick() {
|
|
7432
|
-
return openDetailModal(title);
|
|
7433
|
-
},
|
|
7434
|
-
sx: {
|
|
7435
|
-
display: "contents"
|
|
7436
|
-
},
|
|
7437
|
-
children: card
|
|
7438
|
-
});
|
|
7439
|
-
};
|
|
7440
7141
|
var _donorMix$newDonors = donorMix.newDonors,
|
|
7441
7142
|
newDonors = _donorMix$newDonors === void 0 ? 0 : _donorMix$newDonors,
|
|
7442
7143
|
_donorMix$returningDo = donorMix.returningDonors,
|
|
@@ -7499,12 +7200,12 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
|
|
|
7499
7200
|
sx: {
|
|
7500
7201
|
paddingTop: "0px !important"
|
|
7501
7202
|
},
|
|
7502
|
-
children:
|
|
7203
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ActiveCampaignsCard, {
|
|
7503
7204
|
title: "Active Campaigns",
|
|
7504
7205
|
subtitle: "Live fundraisers ranked by velocity",
|
|
7505
7206
|
columns: ["Campaign", "Raised", "Progress", "Donors", "Avg gift"],
|
|
7506
7207
|
rows: activeCampaignsRows
|
|
7507
|
-
})
|
|
7208
|
+
})
|
|
7508
7209
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
|
|
7509
7210
|
item: true,
|
|
7510
7211
|
xs: 12,
|
|
@@ -7517,7 +7218,7 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
|
|
|
7517
7218
|
md: 0
|
|
7518
7219
|
}
|
|
7519
7220
|
},
|
|
7520
|
-
children:
|
|
7221
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DonorMixCard, {
|
|
7521
7222
|
title: "Donor Mix",
|
|
7522
7223
|
subtitle: "Acquisition vs retention",
|
|
7523
7224
|
series: [newDonors, returningDonors],
|
|
@@ -7539,29 +7240,29 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
|
|
|
7539
7240
|
sx: {
|
|
7540
7241
|
width: "100%"
|
|
7541
7242
|
}
|
|
7542
|
-
})
|
|
7243
|
+
})
|
|
7543
7244
|
})]
|
|
7544
7245
|
});
|
|
7545
7246
|
var middleCards = /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7546
|
-
children: [
|
|
7247
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DonationTypeBarChart, {
|
|
7547
7248
|
sx: CARD_SX,
|
|
7548
7249
|
donationTypeData: donationTypeData
|
|
7549
|
-
})
|
|
7250
|
+
}), /*#__PURE__*/jsxRuntime.jsx(PaidDonorGeographyCard, {
|
|
7550
7251
|
sx: CARD_SX,
|
|
7551
7252
|
donorGeographyData: donorGeographyData
|
|
7552
|
-
})
|
|
7253
|
+
}), /*#__PURE__*/jsxRuntime.jsx(RefundsChargebacksCard, {
|
|
7553
7254
|
sx: CARD_SX,
|
|
7554
7255
|
refundsChargebacksData: refundsChargebacksData,
|
|
7555
7256
|
numberOfDays: numberOfDays
|
|
7556
|
-
})
|
|
7257
|
+
}), /*#__PURE__*/jsxRuntime.jsx(TrafficSourceCard, {
|
|
7557
7258
|
sx: CARD_SX,
|
|
7558
7259
|
trafficSourceData: (trafficSourceData === null || trafficSourceData === void 0 ? void 0 : trafficSourceData.data) || [],
|
|
7559
7260
|
total: "$".concat(formatNumber((trafficSourceData === null || trafficSourceData === void 0 ? void 0 : trafficSourceData.totalRevenue) || 0)),
|
|
7560
7261
|
numberOfDays: numberOfDays
|
|
7561
|
-
})
|
|
7262
|
+
})]
|
|
7562
7263
|
});
|
|
7563
7264
|
var bottomCards = /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7564
|
-
children: [
|
|
7265
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(MetricSparklineCard, {
|
|
7565
7266
|
title: "Order Bump",
|
|
7566
7267
|
subtitle: "Revenue trend - last ".concat(daysLabel),
|
|
7567
7268
|
value: "$".concat(formatNumber((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.totalRevenue) || 0)),
|
|
@@ -7586,7 +7287,7 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
|
|
|
7586
7287
|
}],
|
|
7587
7288
|
sx: CARD_SX,
|
|
7588
7289
|
bottomSection: true
|
|
7589
|
-
})
|
|
7290
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MetricDonutCard, {
|
|
7590
7291
|
title: "Upsell",
|
|
7591
7292
|
subtitle: "Acceptance & raised",
|
|
7592
7293
|
acceptanceRate: (upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceRate) || 0,
|
|
@@ -7595,7 +7296,7 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
|
|
|
7595
7296
|
raisedVal: "$".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raised) || 0)),
|
|
7596
7297
|
raisedTrend: "".concat((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedGrowth) >= 0 ? "▲" : "▼", " ").concat(Math.abs((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedGrowth) || 0).toFixed(1), "%"),
|
|
7597
7298
|
sx: CARD_SX
|
|
7598
|
-
})
|
|
7299
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MetricDonutCard, {
|
|
7599
7300
|
title: "Downsell",
|
|
7600
7301
|
subtitle: "Acceptance & raised",
|
|
7601
7302
|
acceptanceRate: (downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceRate) || 0,
|
|
@@ -7604,7 +7305,7 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
|
|
|
7604
7305
|
raisedVal: "$".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raised) || 0)),
|
|
7605
7306
|
raisedTrend: "".concat((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raisedGrowth) >= 0 ? "▲" : "▼", " ").concat(Math.abs((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raisedGrowth) || 0).toFixed(1), "%"),
|
|
7606
7307
|
sx: CARD_SX
|
|
7607
|
-
})
|
|
7308
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MetricSparklineCard, {
|
|
7608
7309
|
title: "Referrals",
|
|
7609
7310
|
subtitle: "Revenue trend - last ".concat(daysLabel),
|
|
7610
7311
|
value: "$".concat(formatNumber((referralData === null || referralData === void 0 ? void 0 : referralData.totalRevenue) || 0)),
|
|
@@ -7628,32 +7329,27 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
|
|
|
7628
7329
|
}],
|
|
7629
7330
|
sx: CARD_SX,
|
|
7630
7331
|
bottomSection: true
|
|
7631
|
-
})
|
|
7632
|
-
});
|
|
7633
|
-
var detailModal = /*#__PURE__*/jsxRuntime.jsx(OverallDetailModal, {
|
|
7634
|
-
open: Boolean(modalTitle),
|
|
7635
|
-
title: modalTitle || "",
|
|
7636
|
-
onClose: closeDetailModal
|
|
7332
|
+
})]
|
|
7637
7333
|
});
|
|
7638
7334
|
if (section === "campaigns") {
|
|
7639
|
-
return /*#__PURE__*/jsxRuntime.
|
|
7640
|
-
children:
|
|
7335
|
+
return /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
7336
|
+
children: campaignsRow
|
|
7641
7337
|
});
|
|
7642
7338
|
}
|
|
7643
7339
|
if (section === "middle") {
|
|
7644
|
-
return /*#__PURE__*/jsxRuntime.
|
|
7645
|
-
children:
|
|
7340
|
+
return /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
7341
|
+
children: /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
7646
7342
|
sx: fourColGridSx$1(exportMode),
|
|
7647
7343
|
children: middleCards
|
|
7648
|
-
})
|
|
7344
|
+
})
|
|
7649
7345
|
});
|
|
7650
7346
|
}
|
|
7651
7347
|
if (section === "bottom") {
|
|
7652
|
-
return /*#__PURE__*/jsxRuntime.
|
|
7653
|
-
children:
|
|
7348
|
+
return /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
7349
|
+
children: /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
7654
7350
|
sx: fourColGridSx$1(exportMode),
|
|
7655
7351
|
children: bottomCards
|
|
7656
|
-
})
|
|
7352
|
+
})
|
|
7657
7353
|
});
|
|
7658
7354
|
}
|
|
7659
7355
|
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
@@ -7663,7 +7359,7 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
|
|
|
7663
7359
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
7664
7360
|
sx: fourColGridSx$1(exportMode),
|
|
7665
7361
|
children: bottomCards
|
|
7666
|
-
})
|
|
7362
|
+
})]
|
|
7667
7363
|
});
|
|
7668
7364
|
};
|
|
7669
7365
|
|