@ammarkhalidfarooq/dashboard-package 0.4.89 → 0.4.90
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 +8 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +8 -7
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -5273,7 +5273,7 @@ var MetricCard = function MetricCard(_ref) {
|
|
|
5273
5273
|
};
|
|
5274
5274
|
|
|
5275
5275
|
var OverallSection = function OverallSection(_ref) {
|
|
5276
|
-
var _apiData$totalRaisedP, _apiData$
|
|
5276
|
+
var _apiData$overviewStat, _apiData$totalRaisedP, _apiData$overviewStat2, _apiData$netRaisedPre, _apiData$overviewStat3, _apiData$overviewStat4, _apiData$averageDonat, _apiData$roasCard, _apiData$roasCardPrev, _orderBumpData$prevTr;
|
|
5277
5277
|
var _ref$apiData = _ref.apiData,
|
|
5278
5278
|
apiData = _ref$apiData === void 0 ? {} : _ref$apiData,
|
|
5279
5279
|
primaryCharts = _ref.primaryCharts,
|
|
@@ -5332,7 +5332,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
5332
5332
|
};
|
|
5333
5333
|
var metricInfo = {
|
|
5334
5334
|
"Total Raised": {
|
|
5335
|
-
value: "$".concat(formatNumber(apiData === null || apiData === void 0 ? void 0 :
|
|
5335
|
+
value: "$".concat(formatNumber(apiData === null || apiData === void 0 || (_apiData$overviewStat = apiData.overviewStats) === null || _apiData$overviewStat === void 0 || (_apiData$overviewStat = _apiData$overviewStat.overview) === null || _apiData$overviewStat === void 0 ? void 0 : _apiData$overviewStat.totalRevenue)) || "$240.9K",
|
|
5336
5336
|
subValue: "".concat(Number((_apiData$totalRaisedP = apiData === null || apiData === void 0 ? void 0 : apiData.totalRaisedPrev) !== null && _apiData$totalRaisedP !== void 0 ? _apiData$totalRaisedP : 0).toFixed(2), "% vs ").concat(dateName || "last month"),
|
|
5337
5337
|
label: "Total Raised",
|
|
5338
5338
|
icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.PaidOutlined, {}),
|
|
@@ -5341,7 +5341,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
5341
5341
|
warning: false
|
|
5342
5342
|
},
|
|
5343
5343
|
"Net Raised": {
|
|
5344
|
-
value: "$".concat(formatNumber((_apiData$
|
|
5344
|
+
value: "$".concat(formatNumber(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.netRevenue)),
|
|
5345
5345
|
subValue: "".concat(Number((_apiData$netRaisedPre = apiData === null || apiData === void 0 ? void 0 : apiData.netRaisedPrev) !== null && _apiData$netRaisedPre !== void 0 ? _apiData$netRaisedPre : 0).toFixed(2), "% vs ").concat(dateName !== null && dateName !== void 0 ? dateName : "previous period"),
|
|
5346
5346
|
label: "Net Raised",
|
|
5347
5347
|
icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.FavoriteOutlined, {}),
|
|
@@ -5350,7 +5350,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
5350
5350
|
warning: false
|
|
5351
5351
|
},
|
|
5352
5352
|
"Total Donors": {
|
|
5353
|
-
value: (apiData === null || apiData === void 0 ? void 0 :
|
|
5353
|
+
value: (apiData === null || apiData === void 0 || (_apiData$overviewStat3 = apiData.overviewStats) === null || _apiData$overviewStat3 === void 0 || (_apiData$overviewStat3 = _apiData$overviewStat3.overview) === null || _apiData$overviewStat3 === void 0 ? void 0 : _apiData$overviewStat3.totalDonations) || "215",
|
|
5354
5354
|
subValue: "".concat(apiData === null || apiData === void 0 ? void 0 : apiData.totalDonorsPrev, " new") || "31 new",
|
|
5355
5355
|
label: "Total Donors",
|
|
5356
5356
|
icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.PeopleAltOutlined, {}),
|
|
@@ -5359,8 +5359,8 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
5359
5359
|
warning: false
|
|
5360
5360
|
},
|
|
5361
5361
|
"Avg donation": {
|
|
5362
|
-
value: "$".concat(formatNumber((_apiData$
|
|
5363
|
-
subValue: "".concat(Number((_apiData$
|
|
5362
|
+
value: "$".concat(formatNumber(apiData === null || apiData === void 0 || (_apiData$overviewStat4 = apiData.overviewStats) === null || _apiData$overviewStat4 === void 0 || (_apiData$overviewStat4 = _apiData$overviewStat4.overview) === null || _apiData$overviewStat4 === void 0 ? void 0 : _apiData$overviewStat4.overallAVGDonations)),
|
|
5363
|
+
subValue: "".concat(Number((_apiData$averageDonat = apiData === null || apiData === void 0 ? void 0 : apiData.averageDonationsCardPrev) !== null && _apiData$averageDonat !== void 0 ? _apiData$averageDonat : 0).toFixed(2), "% vs ").concat(dateName !== null && dateName !== void 0 ? dateName : "last month"),
|
|
5364
5364
|
label: "Average Donation Amount",
|
|
5365
5365
|
icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.PaidOutlined, {}),
|
|
5366
5366
|
money: true,
|
|
@@ -5461,7 +5461,8 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
5461
5461
|
return c.label === selectedInfo.label;
|
|
5462
5462
|
}) || primaryCharts[0];
|
|
5463
5463
|
if (activeMetric === "Total Raised") {
|
|
5464
|
-
var
|
|
5464
|
+
var _apiData$overviewStat5;
|
|
5465
|
+
var stackedData = apiData === null || apiData === void 0 || (_apiData$overviewStat5 = apiData.overviewStats) === null || _apiData$overviewStat5 === void 0 ? void 0 : _apiData$overviewStat5.totalRaised;
|
|
5465
5466
|
var hasStackedData = (stackedData === null || stackedData === void 0 ? void 0 : stackedData.paidAds) || (stackedData === null || stackedData === void 0 ? void 0 : stackedData.email) || (stackedData === null || stackedData === void 0 ? void 0 : stackedData.organic);
|
|
5466
5467
|
if (hasStackedData) {
|
|
5467
5468
|
var categories = ((stackedData === null || stackedData === void 0 ? void 0 : stackedData.organic) || (stackedData === null || stackedData === void 0 ? void 0 : stackedData.paidAds) || (stackedData === null || stackedData === void 0 ? void 0 : stackedData.email) || []).map(function (item) {
|