@ammarkhalidfarooq/dashboard-package 0.6.65 → 0.6.67

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
@@ -2652,7 +2652,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref13, ref) {
2652
2652
  data: []
2653
2653
  }];
2654
2654
  var revCats = mainChart.categories || [];
2655
- var campaigns = ((apiData === null || apiData === void 0 ? void 0 : apiData.activeCampaigns) || []).length ? apiData.activeCampaigns : [{
2655
+ ((apiData === null || apiData === void 0 ? void 0 : apiData.activeCampaigns) || []).length ? apiData.activeCampaigns : [{
2656
2656
  title: "Orphan sponsorship — Yemen",
2657
2657
  collectedAmount: 78400,
2658
2658
  usdTargetAmount: 100000,
@@ -2688,9 +2688,6 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref13, ref) {
2688
2688
  averageDonation: 1940,
2689
2689
  status: "Active"
2690
2690
  }];
2691
- var campaignStatusByIndex = campaigns.map(function (c) {
2692
- return c.status || "Active";
2693
- });
2694
2691
  var ob = (apiData === null || apiData === void 0 ? void 0 : apiData.orderBumpDetails) || {};
2695
2692
  var obData = ((ob === null || ob === void 0 ? void 0 : ob.chart) || []).map(function (i) {
2696
2693
  return Number(i.revenue || 0);
@@ -2932,12 +2929,12 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref13, ref) {
2932
2929
  title: "Active campaigns",
2933
2930
  subtitle: "Live fundraisers ranked by velocity",
2934
2931
  children: /*#__PURE__*/jsxRuntime.jsx(MiniTable, {
2935
- head: ["CAMPAIGN", "RAISED", "PROGRESS", "DONORS", "AVG GIFT", "STATUS"],
2936
- colAlign: ["left", "right", "left", "right", "right", "right"],
2932
+ head: ["CAMPAIGN", "RAISED", "PROGRESS", "DONORS", "AVG GIFT"],
2933
+ colAlign: ["left", "right", "left", "right", "right"],
2937
2934
  rows: activeCampaigns.map(function (c, i) {
2938
2935
  return [c.name, c.val1, /*#__PURE__*/jsxRuntime.jsx(ProgressBar, {
2939
2936
  value: c.progress
2940
- }, "campaign-progress-".concat(i)), c.val3, c.val4, campaignStatusByIndex[i] || "Active"];
2937
+ }, "campaign-progress-".concat(i)), c.val3, c.val4];
2941
2938
  })
2942
2939
  })
2943
2940
  }), /*#__PURE__*/jsxRuntime.jsx(Panel, {
@@ -2946,8 +2943,8 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref13, ref) {
2946
2943
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
2947
2944
  style: {
2948
2945
  display: "flex",
2949
- alignItems: "center",
2950
- gap: 10
2946
+ flexDirection: "column",
2947
+ alignItems: "center"
2951
2948
  },
2952
2949
  children: [/*#__PURE__*/jsxRuntime.jsx(Donut, {
2953
2950
  segments: [{
@@ -2957,82 +2954,114 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref13, ref) {
2957
2954
  value: returningDonors,
2958
2955
  color: C.emerald
2959
2956
  }],
2960
- size: 82,
2957
+ size: 88,
2961
2958
  centerVal: "".concat(formatNumber(totalMix)),
2962
2959
  centerLabel: "donors"
2963
2960
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
2964
2961
  style: {
2965
- flex: 1
2962
+ width: "100%",
2963
+ marginTop: 6
2966
2964
  },
2967
2965
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
2968
2966
  style: {
2969
2967
  display: "flex",
2968
+ justifyContent: "space-between",
2970
2969
  alignItems: "center",
2971
- gap: 6,
2972
2970
  marginBottom: 5
2973
2971
  },
2974
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
2972
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
2975
2973
  style: {
2976
- width: 8,
2977
- height: 8,
2978
- borderRadius: "50%",
2979
- background: C.indigo,
2980
- flexShrink: 0
2981
- }
2974
+ display: "flex",
2975
+ alignItems: "center",
2976
+ gap: 5
2977
+ },
2978
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
2979
+ style: {
2980
+ width: 8,
2981
+ height: 8,
2982
+ borderRadius: 2,
2983
+ background: C.indigo,
2984
+ flexShrink: 0
2985
+ }
2986
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
2987
+ style: {
2988
+ fontSize: 9.5,
2989
+ color: "#6B7280"
2990
+ },
2991
+ children: "New donors"
2992
+ })]
2982
2993
  }), /*#__PURE__*/jsxRuntime.jsxs("span", {
2983
2994
  style: {
2984
2995
  fontSize: 9.5,
2985
- color: "#374151"
2996
+ fontWeight: 700,
2997
+ color: "#111827"
2986
2998
  },
2987
- children: ["New donors ", formatNumber(newDonors), " \xB7 ", newPct, "%"]
2999
+ children: [formatNumber(newDonors), " \xB7 ", newPct, "%"]
2988
3000
  })]
2989
3001
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
2990
3002
  style: {
2991
3003
  display: "flex",
3004
+ justifyContent: "space-between",
2992
3005
  alignItems: "center",
2993
- gap: 6,
2994
- marginBottom: 7
3006
+ marginBottom: 8
2995
3007
  },
2996
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
3008
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
2997
3009
  style: {
2998
- width: 8,
2999
- height: 8,
3000
- borderRadius: "50%",
3001
- background: C.emerald,
3002
- flexShrink: 0
3003
- }
3010
+ display: "flex",
3011
+ alignItems: "center",
3012
+ gap: 5
3013
+ },
3014
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
3015
+ style: {
3016
+ width: 8,
3017
+ height: 8,
3018
+ borderRadius: 2,
3019
+ background: C.emerald,
3020
+ flexShrink: 0
3021
+ }
3022
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
3023
+ style: {
3024
+ fontSize: 9.5,
3025
+ color: "#6B7280"
3026
+ },
3027
+ children: "Returning"
3028
+ })]
3004
3029
  }), /*#__PURE__*/jsxRuntime.jsxs("span", {
3005
3030
  style: {
3006
3031
  fontSize: 9.5,
3007
- color: "#374151"
3032
+ fontWeight: 700,
3033
+ color: "#111827"
3008
3034
  },
3009
- children: ["Returning ", formatNumber(returningDonors), " \xB7 ", retPct, "%"]
3035
+ children: [formatNumber(returningDonors), " \xB7 ", retPct, "%"]
3010
3036
  })]
3011
3037
  }), /*#__PURE__*/jsxRuntime.jsx(Divider, {
3012
3038
  mb: 6
3013
3039
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
3014
3040
  style: {
3015
- fontSize: 14,
3016
- fontWeight: 800,
3017
- color: "#111827"
3041
+ fontSize: 9.5,
3042
+ color: "#9CA3AF",
3043
+ marginBottom: 2
3018
3044
  },
3019
- children: kpi$(mixAvgGift)
3045
+ children: "Avg gift"
3020
3046
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
3021
3047
  style: {
3022
- fontSize: 8.5,
3023
- color: "#9CA3AF"
3048
+ fontSize: 14,
3049
+ fontWeight: 800,
3050
+ color: "#111827",
3051
+ marginBottom: 2
3024
3052
  },
3025
- children: "Avg gift"
3053
+ children: kpi$(mixAvgGift)
3026
3054
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
3027
3055
  style: {
3028
- fontSize: 9,
3029
- marginTop: 1
3056
+ fontSize: 9
3030
3057
  },
3031
3058
  children: /*#__PURE__*/jsxRuntime.jsx(TrendText, {
3032
3059
  style: {
3033
3060
  fontSize: 9
3034
3061
  },
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")
3062
+ children: formatArrowTrend((_ref16 = donorMixPrev !== null && donorMixPrev !== void 0 ? donorMixPrev : growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) !== null && _ref16 !== void 0 ? _ref16 : 0, {
3063
+ label: "vs last month"
3064
+ })
3036
3065
  })
3037
3066
  })]
3038
3067
  })]