@ammarkhalidfarooq/dashboard-package 0.4.87 → 0.4.88

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
@@ -4811,7 +4811,14 @@ var TopPerformingCampaignsCard = function TopPerformingCampaignsCard() {
4811
4811
  var PaidDonorGeographyCard = function PaidDonorGeographyCard(_ref3) {
4812
4812
  var sx = _ref3.sx,
4813
4813
  donorGeographyData = _ref3.donorGeographyData;
4814
- var data = donorGeographyData || [];
4814
+ var rawCountries = Array.isArray(donorGeographyData) ? donorGeographyData : (donorGeographyData === null || donorGeographyData === void 0 ? void 0 : donorGeographyData.countries) || [];
4815
+ var data = rawCountries.map(function (item) {
4816
+ return {
4817
+ country: item.countryName || item.country || "Unknown",
4818
+ percentage: typeof item.percentage === "number" ? item.percentage : 0,
4819
+ value: item.donations !== undefined ? item.donations : item.value || 0
4820
+ };
4821
+ });
4815
4822
  return /*#__PURE__*/jsxRuntime.jsxs(material.Card, {
4816
4823
  sx: _objectSpread2({
4817
4824
  bgcolor: "#fff",
@@ -5242,7 +5249,7 @@ var OverallSection = function OverallSection(_ref) {
5242
5249
  activeMetric = _useState2[0],
5243
5250
  setActiveMetric = _useState2[1];
5244
5251
  var donationTypeData = (apiData === null || apiData === void 0 ? void 0 : apiData.recurringBarChartData) || [];
5245
- var donorGeographyData = (apiData === null || apiData === void 0 ? void 0 : apiData.donorGeography1) || [];
5252
+ var donorGeographyData = (apiData === null || apiData === void 0 ? void 0 : apiData.donorGeography) || [];
5246
5253
  var trafficSourceData = (apiData === null || apiData === void 0 ? void 0 : apiData.trafficSource1) || [];
5247
5254
  var orderBumpData = (apiData === null || apiData === void 0 ? void 0 : apiData.orderBumpData1) || [];
5248
5255
  var upsellData = (apiData === null || apiData === void 0 ? void 0 : apiData.upsellData1) || [];