@ammarkhalidfarooq/dashboard-package 0.6.6 → 0.6.8

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
@@ -4267,9 +4267,8 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
4267
4267
  _ref$referralData = _ref.referralData,
4268
4268
  referralData = _ref$referralData === void 0 ? {} : _ref$referralData,
4269
4269
  _ref$refundsChargebac = _ref.refundsChargebacksData,
4270
- refundsChargebacksData = _ref$refundsChargebac === void 0 ? [] : _ref$refundsChargebac,
4271
- _ref$dateName = _ref.dateName,
4272
- dateName = _ref$dateName === void 0 ? "Last Period" : _ref$dateName;
4270
+ refundsChargebacksData = _ref$refundsChargebac === void 0 ? [] : _ref$refundsChargebac;
4271
+ _ref.dateName;
4273
4272
  var _donorMix$newDonors = donorMix.newDonors,
4274
4273
  newDonors = _donorMix$newDonors === void 0 ? 0 : _donorMix$newDonors,
4275
4274
  _donorMix$returningDo = donorMix.returningDonors,
@@ -4314,7 +4313,7 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
4314
4313
  color: "#10B981"
4315
4314
  }],
4316
4315
  bottomSummaryValue: "$".concat(avgGift),
4317
- bottomSummaryTrend: "".concat(donorMixPrev, "% vs ").concat(dateName || "last month"),
4316
+ bottomSummaryTrend: "".concat(donorMixPrev, "% vs previous period"),
4318
4317
  sx: {
4319
4318
  width: "100%"
4320
4319
  }
@@ -4368,7 +4367,7 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
4368
4367
  color: "#10B981"
4369
4368
  }],
4370
4369
  bottomSummaryValue: "$".concat(avgGift),
4371
- bottomSummaryTrend: "".concat(donorMixPrev, "% vs ").concat(dateName || "last month"),
4370
+ bottomSummaryTrend: "".concat(donorMixPrev, "% vs previous period"),
4372
4371
  sx: {
4373
4372
  width: "100%"
4374
4373
  }
@@ -4396,7 +4395,7 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
4396
4395
  title: "Order Bump",
4397
4396
  subtitle: "Revenue trend \xB7 last 30 days",
4398
4397
  value: "$".concat(formatNumber((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.totalRevenue) || 0)),
4399
- trend: "".concat((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.growthPercentage) >= 0 ? "▲" : "▼", " ").concat(Math.abs((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.growthPercentage) || 0).toFixed(1), "% vs last month"),
4398
+ trend: "".concat((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.growthPercentage) >= 0 ? "▲" : "▼", " ").concat(Math.abs((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.growthPercentage) || 0).toFixed(1), "% vs previous period"),
4400
4399
  chartData: (orderBumpData === null || orderBumpData === void 0 || (_orderBumpData$chart = orderBumpData.chart) === null || _orderBumpData$chart === void 0 ? void 0 : _orderBumpData$chart.map(function (item) {
4401
4400
  return {
4402
4401
  label: item.label,
@@ -4438,7 +4437,7 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
4438
4437
  title: "Referrals",
4439
4438
  subtitle: "Revenue trend \xB7 last 30 days",
4440
4439
  value: "$".concat(formatNumber((referralData === null || referralData === void 0 ? void 0 : referralData.totalRevenue) || 0)),
4441
- trend: "\u25B2 ".concat((referralData === null || referralData === void 0 ? void 0 : referralData.growthPercentage) || 0, "% vs last month"),
4440
+ trend: "\u25B2 ".concat((referralData === null || referralData === void 0 ? void 0 : referralData.growthPercentage) || 0, "% vs previous period"),
4442
4441
  chartData: (referralData === null || referralData === void 0 || (_referralData$chartDa = referralData.chartData) === null || _referralData$chartDa === void 0 ? void 0 : _referralData$chartDa.map(function (item) {
4443
4442
  return {
4444
4443
  label: item.date,
@@ -15195,7 +15194,7 @@ var OverallSection = function OverallSection(_ref) {
15195
15194
  var metricInfo = {
15196
15195
  "Total Raised": {
15197
15196
  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)) || "$0",
15198
- subValue: "".concat(Number((_apiData$overviewStat2 = apiData === null || apiData === void 0 || (_apiData$overviewStat3 = apiData.overviewStats) === null || _apiData$overviewStat3 === void 0 || (_apiData$overviewStat3 = _apiData$overviewStat3.overview) === null || _apiData$overviewStat3 === void 0 || (_apiData$overviewStat3 = _apiData$overviewStat3.growthPercentage) === null || _apiData$overviewStat3 === void 0 ? void 0 : _apiData$overviewStat3.totalRevenue) !== null && _apiData$overviewStat2 !== void 0 ? _apiData$overviewStat2 : 0).toFixed(2), "% vs ").concat(dateName || "last month"),
15197
+ subValue: "".concat(Number((_apiData$overviewStat2 = apiData === null || apiData === void 0 || (_apiData$overviewStat3 = apiData.overviewStats) === null || _apiData$overviewStat3 === void 0 || (_apiData$overviewStat3 = _apiData$overviewStat3.overview) === null || _apiData$overviewStat3 === void 0 || (_apiData$overviewStat3 = _apiData$overviewStat3.growthPercentage) === null || _apiData$overviewStat3 === void 0 ? void 0 : _apiData$overviewStat3.totalRevenue) !== null && _apiData$overviewStat2 !== void 0 ? _apiData$overviewStat2 : 0).toFixed(2), "% vs previous period"),
15199
15198
  label: "Total Raised",
15200
15199
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.PaidOutlined, {}),
15201
15200
  money: true,
@@ -15204,7 +15203,7 @@ var OverallSection = function OverallSection(_ref) {
15204
15203
  },
15205
15204
  "Net Raised": {
15206
15205
  value: "$".concat(formatNumber(((_apiData$overviewStat4 = apiData === null || apiData === void 0 || (_apiData$overviewStat5 = apiData.overviewStats) === null || _apiData$overviewStat5 === void 0 || (_apiData$overviewStat5 = _apiData$overviewStat5.overview) === null || _apiData$overviewStat5 === void 0 ? void 0 : _apiData$overviewStat5.netRevenue) !== null && _apiData$overviewStat4 !== void 0 ? _apiData$overviewStat4 : 0).toFixed(2))),
15207
- subValue: "".concat(Number((_apiData$overviewStat6 = apiData === null || apiData === void 0 || (_apiData$overviewStat7 = apiData.overviewStats) === null || _apiData$overviewStat7 === void 0 || (_apiData$overviewStat7 = _apiData$overviewStat7.overview.growthPercentage) === null || _apiData$overviewStat7 === void 0 ? void 0 : _apiData$overviewStat7.netRevenue) !== null && _apiData$overviewStat6 !== void 0 ? _apiData$overviewStat6 : 0).toFixed(2), "% vs ").concat(dateName !== null && dateName !== void 0 ? dateName : "previous period"),
15206
+ subValue: "".concat(Number((_apiData$overviewStat6 = apiData === null || apiData === void 0 || (_apiData$overviewStat7 = apiData.overviewStats) === null || _apiData$overviewStat7 === void 0 || (_apiData$overviewStat7 = _apiData$overviewStat7.overview.growthPercentage) === null || _apiData$overviewStat7 === void 0 ? void 0 : _apiData$overviewStat7.netRevenue) !== null && _apiData$overviewStat6 !== void 0 ? _apiData$overviewStat6 : 0).toFixed(2), "% vs previous period\n "),
15208
15207
  label: "Net Raised",
15209
15208
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.FavoriteOutlined, {}),
15210
15209
  money: true,
@@ -15222,7 +15221,7 @@ var OverallSection = function OverallSection(_ref) {
15222
15221
  },
15223
15222
  "Avg donation": {
15224
15223
  value: "$".concat(formatNumber(((_apiData$overviewStat1 = apiData === null || apiData === void 0 || (_apiData$overviewStat10 = apiData.overviewStats) === null || _apiData$overviewStat10 === void 0 || (_apiData$overviewStat10 = _apiData$overviewStat10.overview) === null || _apiData$overviewStat10 === void 0 ? void 0 : _apiData$overviewStat10.overallAVGDonations) !== null && _apiData$overviewStat1 !== void 0 ? _apiData$overviewStat1 : 0).toFixed(2))),
15225
- subValue: "".concat(Number((_apiData$overviewStat11 = apiData === null || apiData === void 0 || (_apiData$overviewStat12 = apiData.overviewStats) === null || _apiData$overviewStat12 === void 0 || (_apiData$overviewStat12 = _apiData$overviewStat12.overview.growthPercentage) === null || _apiData$overviewStat12 === void 0 ? void 0 : _apiData$overviewStat12.overallAVGDonations) !== null && _apiData$overviewStat11 !== void 0 ? _apiData$overviewStat11 : 0).toFixed(2), "% vs ").concat(dateName !== null && dateName !== void 0 ? dateName : "last month"),
15224
+ subValue: "".concat(Number((_apiData$overviewStat11 = apiData === null || apiData === void 0 || (_apiData$overviewStat12 = apiData.overviewStats) === null || _apiData$overviewStat12 === void 0 || (_apiData$overviewStat12 = _apiData$overviewStat12.overview.growthPercentage) === null || _apiData$overviewStat12 === void 0 ? void 0 : _apiData$overviewStat12.overallAVGDonations) !== null && _apiData$overviewStat11 !== void 0 ? _apiData$overviewStat11 : 0).toFixed(2), "% vs previous period\n "),
15226
15225
  label: "Average Donation Amount",
15227
15226
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.PaidOutlined, {}),
15228
15227
  money: true,
@@ -15231,7 +15230,7 @@ var OverallSection = function OverallSection(_ref) {
15231
15230
  },
15232
15231
  "ROAS": {
15233
15232
  value: "".concat(formatNumber(((_apiData$roasCard = apiData === null || apiData === void 0 ? void 0 : apiData.roasCard) !== null && _apiData$roasCard !== void 0 ? _apiData$roasCard : 0).toFixed(2)), "x"),
15234
- subValue: "".concat(Number((_apiData$roasCardPrev = apiData === null || apiData === void 0 ? void 0 : apiData.roasCardPrev) !== null && _apiData$roasCardPrev !== void 0 ? _apiData$roasCardPrev : 0).toFixed(2), "x vs ").concat(dateName !== null && dateName !== void 0 ? dateName : "last month"),
15233
+ subValue: "".concat(Number((_apiData$roasCardPrev = apiData === null || apiData === void 0 ? void 0 : apiData.roasCardPrev) !== null && _apiData$roasCardPrev !== void 0 ? _apiData$roasCardPrev : 0).toFixed(2), "x vs previous period"),
15235
15234
  label: "ROAS",
15236
15235
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.TrendingUp, {}),
15237
15236
  money: false,
@@ -15992,7 +15991,7 @@ var PaidSection$1 = /*#__PURE__*/Object.freeze({
15992
15991
  });
15993
15992
 
15994
15993
  var formatGrowth$1 = function formatGrowth(value, dateName) {
15995
- return "".concat(Number(value !== null && value !== void 0 ? value : 0).toFixed(2), "% vs ").concat(dateName || "previous period");
15994
+ return "".concat(Number(value !== null && value !== void 0 ? value : 0).toFixed(2), "% vs previous period");
15996
15995
  };
15997
15996
  var mapTimeSeries$1 = function mapTimeSeries(series) {
15998
15997
  if (!Array.isArray(series) || series.length === 0) {
@@ -16033,7 +16032,7 @@ var OrganicSection = function OrganicSection(_ref) {
16033
16032
  var avgDonationSeries = mapTimeSeries$1(apiData === null || apiData === void 0 ? void 0 : apiData.avgDonations);
16034
16033
  var fallbackCategories = organicUsersSeries.categories.length ? organicUsersSeries.categories : ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
16035
16034
  var growthCaption = function growthCaption(key) {
16036
- return formatGrowth$1(growth[key], dateName);
16035
+ return formatGrowth$1(growth[key]);
16037
16036
  };
16038
16037
  var metricInfo = React.useMemo(function () {
16039
16038
  var _overview$totalRevenu2, _overview$overallAVGD2, _overview$organicUser, _apiData$topOrganicKe, _overview$totalDonati, _overview$conversionR, _overview$totalRevenu3, _overview$overallAVGD3;
@@ -16041,7 +16040,7 @@ var OrganicSection = function OrganicSection(_ref) {
16041
16040
  return {
16042
16041
  "Organic Users": {
16043
16042
  value: "".concat(formatNumber(8420)),
16044
- subValue: "18% vs last month",
16043
+ subValue: "18% vs previous period",
16045
16044
  data: [3200, 4100, 2800, 5600, 4200, 6100, 7500],
16046
16045
  categories: fallbackCategories,
16047
16046
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.PeopleAltOutlined, {}),
@@ -16061,7 +16060,7 @@ var OrganicSection = function OrganicSection(_ref) {
16061
16060
  },
16062
16061
  Donations: {
16063
16062
  value: "".concat(formatNumber(420)),
16064
- subValue: "18% vs last month",
16063
+ subValue: "18% vs previous period",
16065
16064
  data: [15, 22, 18, 30, 25, 35, 42],
16066
16065
  categories: fallbackCategories,
16067
16066
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.FavoriteOutlined, {}),
@@ -16071,7 +16070,7 @@ var OrganicSection = function OrganicSection(_ref) {
16071
16070
  },
16072
16071
  "Conversion Rate": {
16073
16072
  value: "3.1%",
16074
- subValue: "8.4% vs last month",
16073
+ subValue: "8.4% vs previous period",
16075
16074
  data: [2.5, 2.7, 2.6, 3.1, 3.0, 2.9, 3.1],
16076
16075
  categories: fallbackCategories,
16077
16076
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.Adjust, {}),
@@ -16081,7 +16080,7 @@ var OrganicSection = function OrganicSection(_ref) {
16081
16080
  },
16082
16081
  "Revenue raised": {
16083
16082
  value: "$".concat(formatNumber(240398)),
16084
- subValue: "0.4x vs last month",
16083
+ subValue: "0.4x vs previous period",
16085
16084
  data: [2.5, 3.1, 2.8, 4.2, 3.8, 4.5, 5.2],
16086
16085
  categories: fallbackCategories,
16087
16086
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.PaidOutlined, {}),
@@ -16091,7 +16090,7 @@ var OrganicSection = function OrganicSection(_ref) {
16091
16090
  },
16092
16091
  "Avg donation": {
16093
16092
  value: "$".concat(formatNumber(130.58)),
16094
- subValue: "18% vs last month",
16093
+ subValue: "18% vs previous period",
16095
16094
  data: [110, 125, 120, 135, 130, 128, 130.58],
16096
16095
  categories: fallbackCategories,
16097
16096
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.PaidOutlined, {}),
@@ -16671,7 +16670,7 @@ var EmailTrendCard = function EmailTrendCard(_ref) {
16671
16670
  };
16672
16671
 
16673
16672
  var formatGrowth = function formatGrowth(value, dateName) {
16674
- return "".concat(Number(value !== null && value !== void 0 ? value : 0).toFixed(2), "% vs ").concat(dateName || "previous period");
16673
+ return "".concat(Number(value !== null && value !== void 0 ? value : 0).toFixed(2), "% vs previous period");
16675
16674
  };
16676
16675
  var mapTimeSeries = function mapTimeSeries(series) {
16677
16676
  if (!Array.isArray(series) || series.length === 0) {
@@ -16734,7 +16733,7 @@ var EmailSection = function EmailSection(_ref) {
16734
16733
  var bounceRateTrend = mapTimeSeries(apiData === null || apiData === void 0 ? void 0 : apiData.bounceRateTrend);
16735
16734
  var growthCaption = function growthCaption(key) {
16736
16735
  var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : overviewGrowth;
16737
- return formatGrowth(source[key], dateName);
16736
+ return formatGrowth(source[key]);
16738
16737
  };
16739
16738
  var metricInfo = React.useMemo(function () {
16740
16739
  var _overview$totalRevenu, _overview$totalDonati, _overview$conversionR, _overview$ctr, _overview$revenuePerE, _deliverability$openR, _deliverability$total, _deliverability$uniqu, _deliverability$bounc, _deliverability$reven;
@@ -16742,7 +16741,7 @@ var EmailSection = function EmailSection(_ref) {
16742
16741
  return {
16743
16742
  "Total raised": {
16744
16743
  value: "$".concat(formatNumber(48920)),
16745
- subValue: "12% vs last month",
16744
+ subValue: "12% vs previous period",
16746
16745
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.PaidOutlined, {}),
16747
16746
  money: true,
16748
16747
  error: false,
@@ -16750,7 +16749,7 @@ var EmailSection = function EmailSection(_ref) {
16750
16749
  },
16751
16750
  Donations: {
16752
16751
  value: "62",
16753
- subValue: "12% vs last month",
16752
+ subValue: "12% vs previous period",
16754
16753
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.FavoriteOutlined, {}),
16755
16754
  money: false,
16756
16755
  error: false,
@@ -16758,7 +16757,7 @@ var EmailSection = function EmailSection(_ref) {
16758
16757
  },
16759
16758
  "Conversion rate": {
16760
16759
  value: "3.2%",
16761
- subValue: "12% vs last month",
16760
+ subValue: "12% vs previous period",
16762
16761
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.Adjust, {}),
16763
16762
  money: false,
16764
16763
  error: false,
@@ -16766,7 +16765,7 @@ var EmailSection = function EmailSection(_ref) {
16766
16765
  },
16767
16766
  CTR: {
16768
16767
  value: "8.1%",
16769
- subValue: "12% vs last month",
16768
+ subValue: "12% vs previous period",
16770
16769
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.NotInterested, {}),
16771
16770
  money: false,
16772
16771
  error: false,
@@ -16774,7 +16773,7 @@ var EmailSection = function EmailSection(_ref) {
16774
16773
  },
16775
16774
  "Revenue per email": {
16776
16775
  value: "$".concat(formatNumber(2.45)),
16777
- subValue: "12% vs last month",
16776
+ subValue: "12% vs previous period",
16778
16777
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.IndeterminateCheckBoxOutlined, {}),
16779
16778
  money: true,
16780
16779
  error: false,
@@ -16782,7 +16781,7 @@ var EmailSection = function EmailSection(_ref) {
16782
16781
  },
16783
16782
  "Open rate": {
16784
16783
  value: "42.3%",
16785
- subValue: "12% vs last month",
16784
+ subValue: "12% vs previous period",
16786
16785
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.Email, {}),
16787
16786
  money: false,
16788
16787
  error: false,
@@ -16790,7 +16789,7 @@ var EmailSection = function EmailSection(_ref) {
16790
16789
  },
16791
16790
  Clicks: {
16792
16791
  value: "1,612",
16793
- subValue: "12% vs last month",
16792
+ subValue: "12% vs previous period",
16794
16793
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.NearMe, {}),
16795
16794
  money: false,
16796
16795
  error: false,
@@ -16798,7 +16797,7 @@ var EmailSection = function EmailSection(_ref) {
16798
16797
  },
16799
16798
  "Unique Clicks": {
16800
16799
  value: formatNumber(1148),
16801
- subValue: "12% vs last month",
16800
+ subValue: "12% vs previous period",
16802
16801
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.NearMe, {}),
16803
16802
  money: false,
16804
16803
  error: false,
@@ -16806,7 +16805,7 @@ var EmailSection = function EmailSection(_ref) {
16806
16805
  },
16807
16806
  "Bounce rate": {
16808
16807
  value: "1.8%",
16809
- subValue: "12% vs last month",
16808
+ subValue: "12% vs previous period",
16810
16809
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.HighlightOff, {}),
16811
16810
  money: false,
16812
16811
  error: false,
@@ -16814,7 +16813,7 @@ var EmailSection = function EmailSection(_ref) {
16814
16813
  },
16815
16814
  "Revenue per Click": {
16816
16815
  value: "$".concat(formatNumber(30.35)),
16817
- subValue: "12% vs last month",
16816
+ subValue: "12% vs previous period",
16818
16817
  icon: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.HighlightOff, {}),
16819
16818
  money: true,
16820
16819
  error: false,