@ammarkhalidfarooq/dashboard-package 0.6.63 → 0.6.65
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 +357 -168
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +357 -168
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1399,6 +1399,57 @@ var parseDonationTypeTotals = function parseDonationTypeTotals(donationTypeData)
|
|
|
1399
1399
|
};
|
|
1400
1400
|
};
|
|
1401
1401
|
|
|
1402
|
+
/** Weekly chart points + totals for recurring vs one-time (PDF + report). */
|
|
1403
|
+
var parseDonationTypeChartData = function parseDonationTypeChartData(donationTypeData) {
|
|
1404
|
+
var empty = {
|
|
1405
|
+
categories: [],
|
|
1406
|
+
recurring: [],
|
|
1407
|
+
oneTime: [],
|
|
1408
|
+
recurringTotal: 0,
|
|
1409
|
+
oneTimeTotal: 0
|
|
1410
|
+
};
|
|
1411
|
+
if (donationTypeData !== null && donationTypeData !== void 0 && donationTypeData.data && Array.isArray(donationTypeData.data)) {
|
|
1412
|
+
var _donationTypeData$tot3, _donationTypeData$tot4;
|
|
1413
|
+
return {
|
|
1414
|
+
categories: donationTypeData.data.map(function (item) {
|
|
1415
|
+
return item.label || "";
|
|
1416
|
+
}),
|
|
1417
|
+
recurring: donationTypeData.data.map(function (item) {
|
|
1418
|
+
return Number(item.recurring || 0);
|
|
1419
|
+
}),
|
|
1420
|
+
oneTime: donationTypeData.data.map(function (item) {
|
|
1421
|
+
return Number(item.oneTime || 0);
|
|
1422
|
+
}),
|
|
1423
|
+
recurringTotal: Number((_donationTypeData$tot3 = donationTypeData.totalRecurringDonations) !== null && _donationTypeData$tot3 !== void 0 ? _donationTypeData$tot3 : 0),
|
|
1424
|
+
oneTimeTotal: Number((_donationTypeData$tot4 = donationTypeData.totalOneTimeDonations) !== null && _donationTypeData$tot4 !== void 0 ? _donationTypeData$tot4 : 0)
|
|
1425
|
+
};
|
|
1426
|
+
}
|
|
1427
|
+
if (Array.isArray(donationTypeData) && donationTypeData.length > 0 && donationTypeData[0].totalAmount !== undefined) {
|
|
1428
|
+
var totals = parseDonationTypeTotals(donationTypeData);
|
|
1429
|
+
return _objectSpread2(_objectSpread2({}, empty), totals);
|
|
1430
|
+
}
|
|
1431
|
+
if (Array.isArray(donationTypeData) && donationTypeData.length > 0 && (donationTypeData[0].recurring !== undefined || donationTypeData[0].oneTime !== undefined || donationTypeData[0].recurringAmount !== undefined || donationTypeData[0].oneTimeAmount !== undefined)) {
|
|
1432
|
+
return {
|
|
1433
|
+
categories: donationTypeData.map(function (item) {
|
|
1434
|
+
return item.label || item.date || "";
|
|
1435
|
+
}),
|
|
1436
|
+
recurring: donationTypeData.map(function (item) {
|
|
1437
|
+
return Number(item.recurring || item.recurringAmount || 0);
|
|
1438
|
+
}),
|
|
1439
|
+
oneTime: donationTypeData.map(function (item) {
|
|
1440
|
+
return Number(item.oneTime || item.oneTimeAmount || 0);
|
|
1441
|
+
}),
|
|
1442
|
+
recurringTotal: donationTypeData.reduce(function (sum, item) {
|
|
1443
|
+
return sum + Number(item.recurring || item.recurringAmount || 0);
|
|
1444
|
+
}, 0),
|
|
1445
|
+
oneTimeTotal: donationTypeData.reduce(function (sum, item) {
|
|
1446
|
+
return sum + Number(item.oneTime || item.oneTimeAmount || 0);
|
|
1447
|
+
}, 0)
|
|
1448
|
+
};
|
|
1449
|
+
}
|
|
1450
|
+
return _objectSpread2(_objectSpread2({}, empty), parseDonationTypeTotals(donationTypeData));
|
|
1451
|
+
};
|
|
1452
|
+
|
|
1402
1453
|
/** Mirrors PaidDonorGeographyCard row mapping from donorGeography. */
|
|
1403
1454
|
var parseDonorGeographyList = function parseDonorGeographyList(donorGeographyData) {
|
|
1404
1455
|
var rawCountries = Array.isArray(donorGeographyData) ? donorGeographyData : (donorGeographyData === null || donorGeographyData === void 0 ? void 0 : donorGeographyData.countries) || (donorGeographyData === null || donorGeographyData === void 0 ? void 0 : donorGeographyData.data) || [];
|
|
@@ -1664,6 +1715,12 @@ var kpiPct = function kpiPct(v) {
|
|
|
1664
1715
|
var kpiRoas = function kpiRoas(v) {
|
|
1665
1716
|
return "".concat(formatNumber(Number(v !== null && v !== void 0 ? v : 0).toFixed(2)), "\xD7");
|
|
1666
1717
|
};
|
|
1718
|
+
var d$Compact = function d$Compact(v) {
|
|
1719
|
+
var n = Number(v !== null && v !== void 0 ? v : 0);
|
|
1720
|
+
if (n >= 1000000) return "$".concat((n / 1000000).toFixed(1), "M");
|
|
1721
|
+
if (n >= 1000) return "$".concat((n / 1000).toFixed(1), "K");
|
|
1722
|
+
return d$(n);
|
|
1723
|
+
};
|
|
1667
1724
|
var pct = function pct(v) {
|
|
1668
1725
|
var dp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
1669
1726
|
return "".concat(Number(v !== null && v !== void 0 ? v : 0).toFixed(dp), "%");
|
|
@@ -2045,15 +2102,216 @@ var ProgressBar = function ProgressBar(_ref8) {
|
|
|
2045
2102
|
})]
|
|
2046
2103
|
});
|
|
2047
2104
|
};
|
|
2048
|
-
var
|
|
2049
|
-
var
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
_ref9$
|
|
2054
|
-
|
|
2055
|
-
_ref9$
|
|
2056
|
-
|
|
2105
|
+
var DonationTypeBarSvg = function DonationTypeBarSvg(_ref9) {
|
|
2106
|
+
var _ref9$categories = _ref9.categories,
|
|
2107
|
+
categories = _ref9$categories === void 0 ? [] : _ref9$categories,
|
|
2108
|
+
_ref9$recurring = _ref9.recurring,
|
|
2109
|
+
recurring = _ref9$recurring === void 0 ? [] : _ref9$recurring,
|
|
2110
|
+
_ref9$oneTime = _ref9.oneTime,
|
|
2111
|
+
oneTime = _ref9$oneTime === void 0 ? [] : _ref9$oneTime,
|
|
2112
|
+
_ref9$recurringColor = _ref9.recurringColor,
|
|
2113
|
+
recurringColor = _ref9$recurringColor === void 0 ? "#6366F1" : _ref9$recurringColor,
|
|
2114
|
+
_ref9$oneTimeColor = _ref9.oneTimeColor,
|
|
2115
|
+
oneTimeColor = _ref9$oneTimeColor === void 0 ? "#10B981" : _ref9$oneTimeColor;
|
|
2116
|
+
var width = 158;
|
|
2117
|
+
var height = 96;
|
|
2118
|
+
var padL = 30;
|
|
2119
|
+
var padR = 2;
|
|
2120
|
+
var padT = 14;
|
|
2121
|
+
var padB = 18;
|
|
2122
|
+
var chartW = width - padL - padR;
|
|
2123
|
+
var chartH = height - padT - padB;
|
|
2124
|
+
var allVals = [].concat(_toConsumableArray(recurring), _toConsumableArray(oneTime));
|
|
2125
|
+
var maxVal = Math.max.apply(Math, _toConsumableArray(allVals).concat([0])) || 1;
|
|
2126
|
+
var n = categories.length;
|
|
2127
|
+
var yTicks = [0, maxVal / 2, maxVal];
|
|
2128
|
+
if (!n) {
|
|
2129
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
2130
|
+
width: "100%",
|
|
2131
|
+
height: height,
|
|
2132
|
+
viewBox: "0 0 ".concat(width, " ").concat(height),
|
|
2133
|
+
style: {
|
|
2134
|
+
display: "block"
|
|
2135
|
+
},
|
|
2136
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("line", {
|
|
2137
|
+
x1: padL,
|
|
2138
|
+
y1: padT + chartH,
|
|
2139
|
+
x2: width - padR,
|
|
2140
|
+
y2: padT + chartH,
|
|
2141
|
+
stroke: "#f1f1f1"
|
|
2142
|
+
}), /*#__PURE__*/jsxRuntime.jsx("text", {
|
|
2143
|
+
x: padL - 4,
|
|
2144
|
+
y: padT + chartH + 3,
|
|
2145
|
+
textAnchor: "end",
|
|
2146
|
+
fontSize: 7,
|
|
2147
|
+
fill: "rgba(0,0,0,0.4)",
|
|
2148
|
+
children: "$0"
|
|
2149
|
+
})]
|
|
2150
|
+
});
|
|
2151
|
+
}
|
|
2152
|
+
var groupW = chartW / n;
|
|
2153
|
+
var barW = Math.min(groupW * 0.3, 12);
|
|
2154
|
+
var baseY = padT + chartH;
|
|
2155
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
2156
|
+
width: "100%",
|
|
2157
|
+
height: height,
|
|
2158
|
+
viewBox: "0 0 ".concat(width, " ").concat(height),
|
|
2159
|
+
style: {
|
|
2160
|
+
display: "block"
|
|
2161
|
+
},
|
|
2162
|
+
children: [yTicks.map(function (tick, i) {
|
|
2163
|
+
var y = padT + chartH - tick / maxVal * chartH;
|
|
2164
|
+
return /*#__PURE__*/jsxRuntime.jsxs("g", {
|
|
2165
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("line", {
|
|
2166
|
+
x1: padL,
|
|
2167
|
+
y1: y,
|
|
2168
|
+
x2: width - padR,
|
|
2169
|
+
y2: y,
|
|
2170
|
+
stroke: "#f1f1f1",
|
|
2171
|
+
strokeDasharray: "4"
|
|
2172
|
+
}), /*#__PURE__*/jsxRuntime.jsx("text", {
|
|
2173
|
+
x: padL - 4,
|
|
2174
|
+
y: y + 3,
|
|
2175
|
+
textAnchor: "end",
|
|
2176
|
+
fontSize: 7,
|
|
2177
|
+
fill: "rgba(0,0,0,0.4)",
|
|
2178
|
+
children: d$Compact(tick)
|
|
2179
|
+
})]
|
|
2180
|
+
}, "y-".concat(i));
|
|
2181
|
+
}), categories.map(function (cat, i) {
|
|
2182
|
+
var groupX = padL + i * groupW + groupW / 2;
|
|
2183
|
+
var rVal = recurring[i] || 0;
|
|
2184
|
+
var oVal = oneTime[i] || 0;
|
|
2185
|
+
var rH = rVal / maxVal * chartH;
|
|
2186
|
+
var oH = oVal / maxVal * chartH;
|
|
2187
|
+
var rX = groupX - barW - 1;
|
|
2188
|
+
var oX = groupX + 1;
|
|
2189
|
+
return /*#__PURE__*/jsxRuntime.jsxs("g", {
|
|
2190
|
+
children: [rVal > 0 && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2191
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
2192
|
+
x: rX,
|
|
2193
|
+
y: baseY - rH,
|
|
2194
|
+
width: barW,
|
|
2195
|
+
height: Math.max(rH, 1),
|
|
2196
|
+
fill: recurringColor,
|
|
2197
|
+
rx: 2
|
|
2198
|
+
}), /*#__PURE__*/jsxRuntime.jsx("text", {
|
|
2199
|
+
x: rX + barW / 2,
|
|
2200
|
+
y: baseY - rH - 3,
|
|
2201
|
+
textAnchor: "middle",
|
|
2202
|
+
fontSize: 6.5,
|
|
2203
|
+
fontWeight: 600,
|
|
2204
|
+
fill: "#111827",
|
|
2205
|
+
children: d$Compact(rVal)
|
|
2206
|
+
})]
|
|
2207
|
+
}), oVal > 0 && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2208
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
2209
|
+
x: oX,
|
|
2210
|
+
y: baseY - oH,
|
|
2211
|
+
width: barW,
|
|
2212
|
+
height: Math.max(oH, 1),
|
|
2213
|
+
fill: oneTimeColor,
|
|
2214
|
+
rx: 2
|
|
2215
|
+
}), /*#__PURE__*/jsxRuntime.jsx("text", {
|
|
2216
|
+
x: oX + barW / 2,
|
|
2217
|
+
y: baseY - oH - 3,
|
|
2218
|
+
textAnchor: "middle",
|
|
2219
|
+
fontSize: 6.5,
|
|
2220
|
+
fontWeight: 600,
|
|
2221
|
+
fill: "#111827",
|
|
2222
|
+
children: d$Compact(oVal)
|
|
2223
|
+
})]
|
|
2224
|
+
}), /*#__PURE__*/jsxRuntime.jsx("text", {
|
|
2225
|
+
x: groupX,
|
|
2226
|
+
y: height - 4,
|
|
2227
|
+
textAnchor: "middle",
|
|
2228
|
+
fontSize: 7.5,
|
|
2229
|
+
fill: "rgba(0,0,0,0.4)",
|
|
2230
|
+
children: cat
|
|
2231
|
+
})]
|
|
2232
|
+
}, "bar-".concat(i));
|
|
2233
|
+
})]
|
|
2234
|
+
});
|
|
2235
|
+
};
|
|
2236
|
+
var DonationTypePanel = function DonationTypePanel(_ref0) {
|
|
2237
|
+
var donationTypeData = _ref0.donationTypeData,
|
|
2238
|
+
_ref0$recurringColor = _ref0.recurringColor,
|
|
2239
|
+
recurringColor = _ref0$recurringColor === void 0 ? "#6366F1" : _ref0$recurringColor,
|
|
2240
|
+
_ref0$oneTimeColor = _ref0.oneTimeColor,
|
|
2241
|
+
oneTimeColor = _ref0$oneTimeColor === void 0 ? "#10B981" : _ref0$oneTimeColor;
|
|
2242
|
+
var _parseDonationTypeCha = parseDonationTypeChartData(donationTypeData),
|
|
2243
|
+
categories = _parseDonationTypeCha.categories,
|
|
2244
|
+
recurring = _parseDonationTypeCha.recurring,
|
|
2245
|
+
oneTime = _parseDonationTypeCha.oneTime,
|
|
2246
|
+
recurringTotal = _parseDonationTypeCha.recurringTotal,
|
|
2247
|
+
oneTimeTotal = _parseDonationTypeCha.oneTimeTotal;
|
|
2248
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Panel, {
|
|
2249
|
+
title: "Recurring vs one-time",
|
|
2250
|
+
subtitle: "Donation type \xB7 weekly",
|
|
2251
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2252
|
+
style: {
|
|
2253
|
+
display: "flex",
|
|
2254
|
+
flexWrap: "wrap",
|
|
2255
|
+
gap: "6px 10px",
|
|
2256
|
+
marginBottom: 4
|
|
2257
|
+
},
|
|
2258
|
+
children: [{
|
|
2259
|
+
label: "Recurring",
|
|
2260
|
+
total: recurringTotal,
|
|
2261
|
+
color: recurringColor
|
|
2262
|
+
}, {
|
|
2263
|
+
label: "One-time",
|
|
2264
|
+
total: oneTimeTotal,
|
|
2265
|
+
color: oneTimeColor
|
|
2266
|
+
}].map(function (item) {
|
|
2267
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2268
|
+
style: {
|
|
2269
|
+
display: "flex",
|
|
2270
|
+
alignItems: "center",
|
|
2271
|
+
gap: 4
|
|
2272
|
+
},
|
|
2273
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2274
|
+
style: {
|
|
2275
|
+
width: 6,
|
|
2276
|
+
height: 6,
|
|
2277
|
+
borderRadius: "50%",
|
|
2278
|
+
background: item.color,
|
|
2279
|
+
flexShrink: 0
|
|
2280
|
+
}
|
|
2281
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2282
|
+
style: {
|
|
2283
|
+
fontSize: 9.5,
|
|
2284
|
+
color: "#374151"
|
|
2285
|
+
},
|
|
2286
|
+
children: item.label
|
|
2287
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2288
|
+
style: {
|
|
2289
|
+
fontSize: 9.5,
|
|
2290
|
+
fontWeight: 700,
|
|
2291
|
+
color: "#111827"
|
|
2292
|
+
},
|
|
2293
|
+
children: d$(item.total)
|
|
2294
|
+
})]
|
|
2295
|
+
}, item.label);
|
|
2296
|
+
})
|
|
2297
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DonationTypeBarSvg, {
|
|
2298
|
+
categories: categories,
|
|
2299
|
+
recurring: recurring,
|
|
2300
|
+
oneTime: oneTime,
|
|
2301
|
+
recurringColor: recurringColor,
|
|
2302
|
+
oneTimeColor: oneTimeColor
|
|
2303
|
+
})]
|
|
2304
|
+
});
|
|
2305
|
+
};
|
|
2306
|
+
var KpiCard = function KpiCard(_ref1) {
|
|
2307
|
+
var title = _ref1.title,
|
|
2308
|
+
value = _ref1.value,
|
|
2309
|
+
trend = _ref1.trend,
|
|
2310
|
+
detail = _ref1.detail,
|
|
2311
|
+
_ref1$variant = _ref1.variant,
|
|
2312
|
+
variant = _ref1$variant === void 0 ? "secondary" : _ref1$variant,
|
|
2313
|
+
_ref1$trendPositiveWh = _ref1.trendPositiveWhenNegative,
|
|
2314
|
+
trendPositiveWhenNegative = _ref1$trendPositiveWh === void 0 ? false : _ref1$trendPositiveWh;
|
|
2057
2315
|
var displayTrend = withTrendArrow(trend);
|
|
2058
2316
|
var isPrimary = variant === "primary";
|
|
2059
2317
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -2104,10 +2362,10 @@ var KpiCard = function KpiCard(_ref9) {
|
|
|
2104
2362
|
})]
|
|
2105
2363
|
});
|
|
2106
2364
|
};
|
|
2107
|
-
var StatPair = function StatPair(
|
|
2108
|
-
var label =
|
|
2109
|
-
val =
|
|
2110
|
-
trend =
|
|
2365
|
+
var StatPair = function StatPair(_ref10) {
|
|
2366
|
+
var label = _ref10.label,
|
|
2367
|
+
val = _ref10.val,
|
|
2368
|
+
trend = _ref10.trend;
|
|
2111
2369
|
var displayTrend = withTrendArrow(trend);
|
|
2112
2370
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2113
2371
|
style: {
|
|
@@ -2144,12 +2402,12 @@ var StatPair = function StatPair(_ref0) {
|
|
|
2144
2402
|
})]
|
|
2145
2403
|
});
|
|
2146
2404
|
};
|
|
2147
|
-
var PageHeader = function PageHeader(
|
|
2148
|
-
var dateLabel =
|
|
2149
|
-
generatedLabel =
|
|
2150
|
-
activeFilters =
|
|
2151
|
-
page =
|
|
2152
|
-
windowLabel =
|
|
2405
|
+
var PageHeader = function PageHeader(_ref11) {
|
|
2406
|
+
var dateLabel = _ref11.dateLabel,
|
|
2407
|
+
generatedLabel = _ref11.generatedLabel,
|
|
2408
|
+
activeFilters = _ref11.activeFilters,
|
|
2409
|
+
page = _ref11.page,
|
|
2410
|
+
windowLabel = _ref11.windowLabel;
|
|
2153
2411
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2154
2412
|
style: {
|
|
2155
2413
|
padding: "22px ".concat(MX, "px 12px"),
|
|
@@ -2255,9 +2513,9 @@ var PageHeader = function PageHeader(_ref1) {
|
|
|
2255
2513
|
})]
|
|
2256
2514
|
});
|
|
2257
2515
|
};
|
|
2258
|
-
var PageFooter = function PageFooter(
|
|
2259
|
-
var generatedLabel =
|
|
2260
|
-
page =
|
|
2516
|
+
var PageFooter = function PageFooter(_ref12) {
|
|
2517
|
+
var generatedLabel = _ref12.generatedLabel,
|
|
2518
|
+
page = _ref12.page;
|
|
2261
2519
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2262
2520
|
style: {
|
|
2263
2521
|
padding: "7px ".concat(MX, "px"),
|
|
@@ -2277,16 +2535,16 @@ var PageFooter = function PageFooter(_ref10) {
|
|
|
2277
2535
|
};
|
|
2278
2536
|
|
|
2279
2537
|
// ─── Main component ───────────────────────────────────────────────────────────
|
|
2280
|
-
var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (
|
|
2281
|
-
var _apiData$overviewStat, _overview$totalRevenu, _overview$netRevenue, _overview$overallAVGD, _overview$conversionR, _apiData$totalVisits, _refundsRaw$refundRat, _refundsRaw$chargebac, _apiData$trafficSourc2, _metricByTitle$NetRa, _metricByTitle$Total, _metricByTitle$Total2, _metricByTitle$Total3, _metricByTitle$AvgDo, _metricByTitle$AvgDo2, _apiData$medianGift, _apiData$topDecileGif, _apiData$roasCard, _metricByTitle$ROAS, _apiData$roasCardPrev, _metricByTitle$ROAS2, _apiData$adSpend, _apiData$attributedRe, _metricByTitle$Conver, _metricByTitle$Conver2, _metricByTitle$Refund, _metricByTitle$Refund2, _refundsRaw$refundCou, _metricByTitle$Refund3, _mainChart$stacked,
|
|
2282
|
-
var
|
|
2283
|
-
apiData =
|
|
2284
|
-
|
|
2285
|
-
dateName =
|
|
2286
|
-
|
|
2287
|
-
numberOfDays =
|
|
2288
|
-
|
|
2289
|
-
activeFilters =
|
|
2538
|
+
var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref13, ref) {
|
|
2539
|
+
var _apiData$overviewStat, _overview$totalRevenu, _overview$netRevenue, _overview$overallAVGD, _overview$conversionR, _apiData$totalVisits, _refundsRaw$refundRat, _refundsRaw$chargebac, _apiData$trafficSourc2, _metricByTitle$NetRa, _metricByTitle$Total, _metricByTitle$Total2, _metricByTitle$Total3, _metricByTitle$AvgDo, _metricByTitle$AvgDo2, _apiData$medianGift, _apiData$topDecileGif, _apiData$roasCard, _metricByTitle$ROAS, _apiData$roasCardPrev, _metricByTitle$ROAS2, _apiData$adSpend, _apiData$attributedRe, _metricByTitle$Conver, _metricByTitle$Conver2, _metricByTitle$Refund, _metricByTitle$Refund2, _refundsRaw$refundCou, _metricByTitle$Refund3, _mainChart$stacked, _ref16, _refundsRaw$refundRat2, _ob$growthPercentage, _ob$peakDay, _refCard$growthPercen;
|
|
2540
|
+
var _ref13$apiData = _ref13.apiData,
|
|
2541
|
+
apiData = _ref13$apiData === void 0 ? {} : _ref13$apiData,
|
|
2542
|
+
_ref13$dateName = _ref13.dateName,
|
|
2543
|
+
dateName = _ref13$dateName === void 0 ? "Last Period" : _ref13$dateName,
|
|
2544
|
+
_ref13$numberOfDays = _ref13.numberOfDays,
|
|
2545
|
+
numberOfDays = _ref13$numberOfDays === void 0 ? 30 : _ref13$numberOfDays,
|
|
2546
|
+
_ref13$activeFilters = _ref13.activeFilters,
|
|
2547
|
+
activeFilters = _ref13$activeFilters === void 0 ? [] : _ref13$activeFilters;
|
|
2290
2548
|
var now = new Date();
|
|
2291
2549
|
var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
|
|
2292
2550
|
var windowLabel = "".concat(numberOfDays, "-day window");
|
|
@@ -2360,9 +2618,6 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
|
|
|
2360
2618
|
retPct = donorMix.retPct,
|
|
2361
2619
|
mixAvgGift = donorMix.avgGift,
|
|
2362
2620
|
donorMixPrev = donorMix.donorMixPrev;
|
|
2363
|
-
var _report$donationTypeT = report.donationTypeTotals,
|
|
2364
|
-
recurringTotal = _report$donationTypeT.recurringTotal,
|
|
2365
|
-
oneTimeTotal = _report$donationTypeT.oneTimeTotal;
|
|
2366
2621
|
var geoList = report.donorGeographyList;
|
|
2367
2622
|
var trafficItems = function (_apiData$trafficSourc) {
|
|
2368
2623
|
var items = Array.isArray(apiData === null || apiData === void 0 || (_apiData$trafficSourc = apiData.trafficSourceData) === null || _apiData$trafficSourc === void 0 ? void 0 : _apiData$trafficSourc.data) ? apiData.trafficSourceData.data : [];
|
|
@@ -2598,10 +2853,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
|
|
|
2598
2853
|
gap: 14,
|
|
2599
2854
|
marginBottom: 6
|
|
2600
2855
|
},
|
|
2601
|
-
children: [["Email", C.cyan], ["Organic", C.emerald], ["Paid Ads", C.indigo]].map(function (
|
|
2602
|
-
var
|
|
2603
|
-
name =
|
|
2604
|
-
color =
|
|
2856
|
+
children: [["Email", C.cyan], ["Organic", C.emerald], ["Paid Ads", C.indigo]].map(function (_ref14) {
|
|
2857
|
+
var _ref15 = _slicedToArray(_ref14, 2),
|
|
2858
|
+
name = _ref15[0],
|
|
2859
|
+
color = _ref15[1];
|
|
2605
2860
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2606
2861
|
style: {
|
|
2607
2862
|
display: "flex",
|
|
@@ -2777,7 +3032,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
|
|
|
2777
3032
|
style: {
|
|
2778
3033
|
fontSize: 9
|
|
2779
3034
|
},
|
|
2780
|
-
children: "".concat(Number((
|
|
3035
|
+
children: "".concat(Number((_ref16 = donorMixPrev !== null && donorMixPrev !== void 0 ? donorMixPrev : growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) !== null && _ref16 !== void 0 ? _ref16 : 0).toFixed(2), "% vs pp")
|
|
2781
3036
|
})
|
|
2782
3037
|
})]
|
|
2783
3038
|
})]
|
|
@@ -2789,95 +3044,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
|
|
|
2789
3044
|
gridTemplateColumns: "repeat(4, 1fr)",
|
|
2790
3045
|
gap: 8
|
|
2791
3046
|
},
|
|
2792
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
var tot = recurringTotal + oneTimeTotal || 1;
|
|
2797
|
-
var rPct = recurringTotal / tot * 100;
|
|
2798
|
-
var oPct = oneTimeTotal / tot * 100;
|
|
2799
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2800
|
-
style: {
|
|
2801
|
-
display: "flex",
|
|
2802
|
-
flexDirection: "column",
|
|
2803
|
-
gap: 9,
|
|
2804
|
-
marginTop: 4
|
|
2805
|
-
},
|
|
2806
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2807
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2808
|
-
style: {
|
|
2809
|
-
display: "flex",
|
|
2810
|
-
justifyContent: "space-between",
|
|
2811
|
-
marginBottom: 3
|
|
2812
|
-
},
|
|
2813
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2814
|
-
style: {
|
|
2815
|
-
fontSize: 9.5,
|
|
2816
|
-
color: "#374151"
|
|
2817
|
-
},
|
|
2818
|
-
children: "Recurring"
|
|
2819
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2820
|
-
style: {
|
|
2821
|
-
fontSize: 9.5,
|
|
2822
|
-
fontWeight: 700,
|
|
2823
|
-
color: "#111827"
|
|
2824
|
-
},
|
|
2825
|
-
children: d$(recurringTotal)
|
|
2826
|
-
})]
|
|
2827
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2828
|
-
style: {
|
|
2829
|
-
height: 9,
|
|
2830
|
-
background: "#EEF2FF",
|
|
2831
|
-
borderRadius: 3
|
|
2832
|
-
},
|
|
2833
|
-
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2834
|
-
style: {
|
|
2835
|
-
width: "".concat(rPct, "%"),
|
|
2836
|
-
height: "100%",
|
|
2837
|
-
background: C.indigo,
|
|
2838
|
-
borderRadius: 3
|
|
2839
|
-
}
|
|
2840
|
-
})
|
|
2841
|
-
})]
|
|
2842
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2843
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2844
|
-
style: {
|
|
2845
|
-
display: "flex",
|
|
2846
|
-
justifyContent: "space-between",
|
|
2847
|
-
marginBottom: 3
|
|
2848
|
-
},
|
|
2849
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2850
|
-
style: {
|
|
2851
|
-
fontSize: 9.5,
|
|
2852
|
-
color: "#374151"
|
|
2853
|
-
},
|
|
2854
|
-
children: "One-time"
|
|
2855
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2856
|
-
style: {
|
|
2857
|
-
fontSize: 9.5,
|
|
2858
|
-
fontWeight: 700,
|
|
2859
|
-
color: "#111827"
|
|
2860
|
-
},
|
|
2861
|
-
children: d$(oneTimeTotal)
|
|
2862
|
-
})]
|
|
2863
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2864
|
-
style: {
|
|
2865
|
-
height: 9,
|
|
2866
|
-
background: "#EEF2FF",
|
|
2867
|
-
borderRadius: 3
|
|
2868
|
-
},
|
|
2869
|
-
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2870
|
-
style: {
|
|
2871
|
-
width: "".concat(oPct, "%"),
|
|
2872
|
-
height: "100%",
|
|
2873
|
-
background: "#C7D2FE",
|
|
2874
|
-
borderRadius: 3
|
|
2875
|
-
}
|
|
2876
|
-
})
|
|
2877
|
-
})]
|
|
2878
|
-
})]
|
|
2879
|
-
});
|
|
2880
|
-
}()
|
|
3047
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DonationTypePanel, {
|
|
3048
|
+
donationTypeData: report.donationTypeData,
|
|
3049
|
+
recurringColor: C.indigo,
|
|
3050
|
+
oneTimeColor: C.emerald
|
|
2881
3051
|
}), /*#__PURE__*/jsxRuntime.jsx(Panel, {
|
|
2882
3052
|
title: "Donor geography",
|
|
2883
3053
|
subtitle: "Top countries \xB7 ".concat(formatNumber(totalDonors), " total"),
|
|
@@ -3033,10 +3203,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
|
|
|
3033
3203
|
display: "flex",
|
|
3034
3204
|
gap: 12
|
|
3035
3205
|
},
|
|
3036
|
-
children: [["Avg/day", d$((ob === null || ob === void 0 ? void 0 : ob.averagePerDay) || 0)], ["Peak day", d$((ob === null || ob === void 0 || (_ob$peakDay = ob.peakDay) === null || _ob$peakDay === void 0 ? void 0 : _ob$peakDay.amount) || 0)], ["Orders", formatNumber((ob === null || ob === void 0 ? void 0 : ob.totalOrders) || 0)]].map(function (
|
|
3037
|
-
var
|
|
3038
|
-
l =
|
|
3039
|
-
v =
|
|
3206
|
+
children: [["Avg/day", d$((ob === null || ob === void 0 ? void 0 : ob.averagePerDay) || 0)], ["Peak day", d$((ob === null || ob === void 0 || (_ob$peakDay = ob.peakDay) === null || _ob$peakDay === void 0 ? void 0 : _ob$peakDay.amount) || 0)], ["Orders", formatNumber((ob === null || ob === void 0 ? void 0 : ob.totalOrders) || 0)]].map(function (_ref17) {
|
|
3207
|
+
var _ref18 = _slicedToArray(_ref17, 2),
|
|
3208
|
+
l = _ref18[0],
|
|
3209
|
+
v = _ref18[1];
|
|
3040
3210
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3041
3211
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3042
3212
|
style: {
|
|
@@ -3163,10 +3333,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
|
|
|
3163
3333
|
display: "flex",
|
|
3164
3334
|
gap: 12
|
|
3165
3335
|
},
|
|
3166
|
-
children: [["Referrers", formatNumber((refCard === null || refCard === void 0 ? void 0 : refCard.totalReferrers) || 0)], ["Avg gift", d$((refCard === null || refCard === void 0 ? void 0 : refCard.averageGift) || 0)], ["Conv. rate", pct((refCard === null || refCard === void 0 ? void 0 : refCard.conversionRate) || 0, 1)]].map(function (
|
|
3167
|
-
var
|
|
3168
|
-
l =
|
|
3169
|
-
v =
|
|
3336
|
+
children: [["Referrers", formatNumber((refCard === null || refCard === void 0 ? void 0 : refCard.totalReferrers) || 0)], ["Avg gift", d$((refCard === null || refCard === void 0 ? void 0 : refCard.averageGift) || 0)], ["Conv. rate", pct((refCard === null || refCard === void 0 ? void 0 : refCard.conversionRate) || 0, 1)]].map(function (_ref19) {
|
|
3337
|
+
var _ref20 = _slicedToArray(_ref19, 2),
|
|
3338
|
+
l = _ref20[0],
|
|
3339
|
+
v = _ref20[1];
|
|
3170
3340
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3171
3341
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3172
3342
|
style: {
|
|
@@ -4784,7 +4954,12 @@ var MetricDonutCard = function MetricDonutCard(_ref2) {
|
|
|
4784
4954
|
|
|
4785
4955
|
var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
|
|
4786
4956
|
var sx = _ref.sx,
|
|
4787
|
-
donationTypeData = _ref.donationTypeData
|
|
4957
|
+
donationTypeData = _ref.donationTypeData,
|
|
4958
|
+
_ref$exportMode = _ref.exportMode,
|
|
4959
|
+
exportMode = _ref$exportMode === void 0 ? false : _ref$exportMode,
|
|
4960
|
+
_ref$subtitle = _ref.subtitle,
|
|
4961
|
+
subtitle = _ref$subtitle === void 0 ? "Donation type" : _ref$subtitle,
|
|
4962
|
+
chartHeight = _ref.chartHeight;
|
|
4788
4963
|
var recurringColor = "rgb(99, 99, 230)";
|
|
4789
4964
|
var oneTimeColor = "#10B981";
|
|
4790
4965
|
var colors = [recurringColor, oneTimeColor, "#06B6D4", "#F59E0B", "#EF4444"];
|
|
@@ -4844,10 +5019,21 @@ var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
|
|
|
4844
5019
|
}
|
|
4845
5020
|
} else {
|
|
4846
5021
|
var _dataObj$summary, _dataObj$summary2, _dataObj$summary3, _dataObj$summary4;
|
|
4847
|
-
// Object format or
|
|
4848
|
-
var dataObj = donationTypeData
|
|
5022
|
+
// Object format, empty array, or missing data
|
|
5023
|
+
var dataObj = donationTypeData && _typeof(donationTypeData) === "object" && !Array.isArray(donationTypeData) ? donationTypeData : {};
|
|
4849
5024
|
categories = dataObj.categories || [];
|
|
4850
|
-
|
|
5025
|
+
var rawSeries = dataObj.series || [];
|
|
5026
|
+
if (rawSeries.length && categories.length) {
|
|
5027
|
+
series = rawSeries;
|
|
5028
|
+
} else {
|
|
5029
|
+
series = [{
|
|
5030
|
+
name: "Recurring",
|
|
5031
|
+
data: []
|
|
5032
|
+
}, {
|
|
5033
|
+
name: "One-time",
|
|
5034
|
+
data: []
|
|
5035
|
+
}];
|
|
5036
|
+
}
|
|
4851
5037
|
summaries = [{
|
|
4852
5038
|
label: (dataObj === null || dataObj === void 0 || (_dataObj$summary = dataObj.summary) === null || _dataObj$summary === void 0 || (_dataObj$summary = _dataObj$summary.recurring) === null || _dataObj$summary === void 0 ? void 0 : _dataObj$summary.label) || "Recurring",
|
|
4853
5039
|
total: (dataObj === null || dataObj === void 0 || (_dataObj$summary2 = dataObj.summary) === null || _dataObj$summary2 === void 0 || (_dataObj$summary2 = _dataObj$summary2.recurring) === null || _dataObj$summary2 === void 0 ? void 0 : _dataObj$summary2.total) || 0,
|
|
@@ -4860,6 +5046,7 @@ var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
|
|
|
4860
5046
|
title = "Recurring vs one-time";
|
|
4861
5047
|
isDistributed = false;
|
|
4862
5048
|
}
|
|
5049
|
+
var resolvedChartHeight = chartHeight !== null && chartHeight !== void 0 ? chartHeight : exportMode ? 110 : 170;
|
|
4863
5050
|
var chartOptions = {
|
|
4864
5051
|
chart: {
|
|
4865
5052
|
type: "bar",
|
|
@@ -4874,8 +5061,8 @@ var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
|
|
|
4874
5061
|
plotOptions: {
|
|
4875
5062
|
bar: {
|
|
4876
5063
|
horizontal: false,
|
|
4877
|
-
columnWidth: "75%",
|
|
4878
|
-
borderRadius: 4,
|
|
5064
|
+
columnWidth: exportMode ? "68%" : "75%",
|
|
5065
|
+
borderRadius: exportMode ? 3 : 4,
|
|
4879
5066
|
distributed: isDistributed,
|
|
4880
5067
|
dataLabels: {
|
|
4881
5068
|
position: "top"
|
|
@@ -4887,9 +5074,9 @@ var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
|
|
|
4887
5074
|
formatter: function formatter(val) {
|
|
4888
5075
|
return "$".concat(formatNumber(val));
|
|
4889
5076
|
},
|
|
4890
|
-
offsetY: -20,
|
|
5077
|
+
offsetY: exportMode ? -16 : -20,
|
|
4891
5078
|
style: {
|
|
4892
|
-
fontSize: "9px",
|
|
5079
|
+
fontSize: exportMode ? "7px" : "9px",
|
|
4893
5080
|
fontWeight: 600,
|
|
4894
5081
|
colors: ["#000"]
|
|
4895
5082
|
}
|
|
@@ -4910,20 +5097,20 @@ var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
|
|
|
4910
5097
|
labels: {
|
|
4911
5098
|
style: {
|
|
4912
5099
|
colors: "rgba(0, 0, 0, 0.4)",
|
|
4913
|
-
fontSize: "11px"
|
|
5100
|
+
fontSize: exportMode ? "8px" : "11px"
|
|
4914
5101
|
}
|
|
4915
5102
|
}
|
|
4916
5103
|
},
|
|
4917
5104
|
yaxis: {
|
|
4918
5105
|
min: 0,
|
|
4919
|
-
tickAmount: 4,
|
|
5106
|
+
tickAmount: exportMode ? 3 : 4,
|
|
4920
5107
|
labels: {
|
|
4921
5108
|
formatter: function formatter(val) {
|
|
4922
5109
|
return "$".concat(formatNumber(val));
|
|
4923
5110
|
},
|
|
4924
5111
|
style: {
|
|
4925
5112
|
colors: "rgba(0, 0, 0, 0.4)",
|
|
4926
|
-
fontSize: "10px"
|
|
5113
|
+
fontSize: exportMode ? "8px" : "10px"
|
|
4927
5114
|
}
|
|
4928
5115
|
}
|
|
4929
5116
|
},
|
|
@@ -4958,10 +5145,12 @@ var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
|
|
|
4958
5145
|
return /*#__PURE__*/jsxRuntime.jsxs(material.Card, {
|
|
4959
5146
|
sx: _objectSpread2({
|
|
4960
5147
|
bgcolor: "#fff",
|
|
4961
|
-
borderRadius: 4,
|
|
4962
|
-
border: "1px solid #f0f0f0",
|
|
4963
|
-
boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
|
|
4964
|
-
p: 3
|
|
5148
|
+
borderRadius: exportMode ? 2 : 4,
|
|
5149
|
+
border: exportMode ? "1px solid #DDE3EA" : "1px solid #f0f0f0",
|
|
5150
|
+
boxShadow: exportMode ? "0 1px 0 rgba(15,23,42,0.03)" : "0 4px 24px rgba(0,0,0,0.06)",
|
|
5151
|
+
p: exportMode ? 1.5 : 3,
|
|
5152
|
+
height: exportMode ? "100%" : "auto",
|
|
5153
|
+
boxSizing: "border-box"
|
|
4965
5154
|
}, sx),
|
|
4966
5155
|
children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
4967
5156
|
sx: {
|
|
@@ -4975,24 +5164,24 @@ var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
|
|
|
4975
5164
|
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
4976
5165
|
sx: {
|
|
4977
5166
|
fontWeight: 700,
|
|
4978
|
-
fontSize: "18px",
|
|
5167
|
+
fontSize: exportMode ? "12px" : "18px",
|
|
4979
5168
|
color: "#000",
|
|
4980
5169
|
lineHeight: 1.15
|
|
4981
5170
|
},
|
|
4982
5171
|
children: title
|
|
4983
5172
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
4984
5173
|
sx: {
|
|
4985
|
-
fontSize: "13px",
|
|
4986
|
-
color: "rgba(0, 0, 0, 0.4)",
|
|
5174
|
+
fontSize: exportMode ? "9.5px" : "13px",
|
|
5175
|
+
color: exportMode ? "#94A3B8" : "rgba(0, 0, 0, 0.4)",
|
|
4987
5176
|
lineHeight: 1.15
|
|
4988
5177
|
},
|
|
4989
|
-
children:
|
|
5178
|
+
children: subtitle
|
|
4990
5179
|
})]
|
|
4991
5180
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
4992
5181
|
sx: {
|
|
4993
5182
|
display: "flex",
|
|
4994
|
-
gap: 1.5,
|
|
4995
|
-
mt: 0.5,
|
|
5183
|
+
gap: exportMode ? 1 : 1.5,
|
|
5184
|
+
mt: exportMode ? 0.75 : 0.5,
|
|
4996
5185
|
flexWrap: "wrap"
|
|
4997
5186
|
},
|
|
4998
5187
|
children: summaries.map(function (item, index) {
|
|
@@ -5004,22 +5193,22 @@ var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
|
|
|
5004
5193
|
},
|
|
5005
5194
|
children: [/*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
5006
5195
|
sx: {
|
|
5007
|
-
width: 8,
|
|
5008
|
-
height: 8,
|
|
5196
|
+
width: exportMode ? 6 : 8,
|
|
5197
|
+
height: exportMode ? 6 : 8,
|
|
5009
5198
|
bgcolor: item.color,
|
|
5010
5199
|
borderRadius: "50%"
|
|
5011
5200
|
}
|
|
5012
5201
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
5013
5202
|
sx: {
|
|
5014
|
-
fontSize: "13px",
|
|
5015
|
-
color: "rgba(0, 0, 0, 0.5)",
|
|
5203
|
+
fontSize: exportMode ? "9.5px" : "13px",
|
|
5204
|
+
color: exportMode ? "#374151" : "rgba(0, 0, 0, 0.5)",
|
|
5016
5205
|
fontWeight: 500
|
|
5017
5206
|
},
|
|
5018
5207
|
children: item.label
|
|
5019
5208
|
}), /*#__PURE__*/jsxRuntime.jsxs(material.Typography, {
|
|
5020
5209
|
sx: {
|
|
5021
|
-
fontSize: "13px",
|
|
5022
|
-
fontWeight: 600,
|
|
5210
|
+
fontSize: exportMode ? "9.5px" : "13px",
|
|
5211
|
+
fontWeight: exportMode ? 700 : 600,
|
|
5023
5212
|
color: "#000"
|
|
5024
5213
|
},
|
|
5025
5214
|
children: ["$", formatNumber(item.total || 0)]
|
|
@@ -5029,10 +5218,10 @@ var DonationTypeBarChart = function DonationTypeBarChart(_ref) {
|
|
|
5029
5218
|
})]
|
|
5030
5219
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
5031
5220
|
sx: {
|
|
5032
|
-
height:
|
|
5033
|
-
width: "calc(100% + 48px)",
|
|
5034
|
-
ml: -3,
|
|
5035
|
-
mr: -3
|
|
5221
|
+
height: resolvedChartHeight,
|
|
5222
|
+
width: exportMode ? "calc(100% + 24px)" : "calc(100% + 48px)",
|
|
5223
|
+
ml: exportMode ? -1.5 : -3,
|
|
5224
|
+
mr: exportMode ? -1.5 : -3
|
|
5036
5225
|
},
|
|
5037
5226
|
children: /*#__PURE__*/jsxRuntime.jsx(ReactApexChart, {
|
|
5038
5227
|
options: chartOptions,
|