@ammarkhalidfarooq/dashboard-package 0.4.53 → 0.4.55

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
@@ -563,7 +563,10 @@ var RenderChartCard = function RenderChartCard(_ref) {
563
563
  },
564
564
  children: item.hideControls ? item.series && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
565
565
  sx: {
566
- display: "flex",
566
+ display: {
567
+ xs: "none",
568
+ sm: "flex"
569
+ },
567
570
  gap: 2,
568
571
  alignItems: "center"
569
572
  },
@@ -625,12 +628,12 @@ var RenderChartCard = function RenderChartCard(_ref) {
625
628
  })]
626
629
  })
627
630
  })]
628
- }), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
631
+ }), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
629
632
  sx: {
630
633
  flexGrow: 1,
631
634
  minHeight: isPrimary ? "250px" : "200px"
632
635
  },
633
- children: /*#__PURE__*/jsxRuntime.jsx(RevenueChart, {
636
+ children: [/*#__PURE__*/jsxRuntime.jsx(RevenueChart, {
634
637
  id: "".concat(item.label, "-").concat(index),
635
638
  metric: item.label.includes("Rate") || item.label.includes("Performance") || item.label.includes("source") || item.label === "URL" ? "Percent" : item.stacked ? item.label.includes("Traffic") ? "Visitors" : "Donors" : metric,
636
639
  data: item.data,
@@ -641,7 +644,51 @@ var RenderChartCard = function RenderChartCard(_ref) {
641
644
  type: type || item.type || "area",
642
645
  colors: item.colors,
643
646
  showLegend: !item.hideControls
644
- })
647
+ }), item.hideControls && item.series && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
648
+ sx: {
649
+ display: {
650
+ xs: "flex",
651
+ sm: "none"
652
+ },
653
+ justifyContent: "center",
654
+ gap: 2,
655
+ flexWrap: "wrap",
656
+ mt: 1.5
657
+ },
658
+ children: [{
659
+ label: "Paid Ads",
660
+ color: "#6366F1"
661
+ }, {
662
+ label: "Organic",
663
+ color: "#10B981"
664
+ }, {
665
+ label: "Email",
666
+ color: "#06B6D4"
667
+ }].map(function (leg) {
668
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
669
+ sx: {
670
+ display: "flex",
671
+ alignItems: "center",
672
+ gap: 0.5
673
+ },
674
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Box, {
675
+ sx: {
676
+ width: 8,
677
+ height: 8,
678
+ borderRadius: "50%",
679
+ bgcolor: leg.color
680
+ }
681
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
682
+ sx: {
683
+ fontSize: "11px",
684
+ color: "rgba(0,0,0,0.6)",
685
+ fontWeight: 500
686
+ },
687
+ children: leg.label
688
+ })]
689
+ }, leg.label);
690
+ })
691
+ })]
645
692
  }), item.footer && /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
646
693
  sx: {
647
694
  display: "flex",
@@ -5655,163 +5702,72 @@ var OverallSection = function OverallSection(_ref) {
5655
5702
  }
5656
5703
  })
5657
5704
  })]
5658
- }), /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
5659
- container: true,
5660
- spacing: 3,
5705
+ }), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
5661
5706
  sx: {
5707
+ display: "grid",
5708
+ gridTemplateColumns: "repeat(auto-fit, minmax(280px, 1fr))",
5709
+ gap: 3,
5662
5710
  mt: 2.25,
5663
5711
  alignItems: "stretch"
5664
5712
  },
5665
- children: [/*#__PURE__*/jsxRuntime.jsx(material.Grid, {
5666
- item: true,
5667
- xs: 12,
5668
- sm: 6,
5669
- lg: 4,
5713
+ children: [/*#__PURE__*/jsxRuntime.jsx(DonationTypeBarChart, {
5670
5714
  sx: {
5671
- minWidth: 0
5715
+ minHeight: 400
5672
5716
  },
5673
- children: /*#__PURE__*/jsxRuntime.jsx(DonationTypeBarChart, {
5674
- sx: {
5675
- minHeight: 400
5676
- },
5677
- donationTypeData: donationTypeData
5678
- })
5679
- }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
5680
- item: true,
5681
- xs: 12,
5682
- sm: 6,
5683
- lg: 4,
5717
+ donationTypeData: donationTypeData
5718
+ }), /*#__PURE__*/jsxRuntime.jsx(PaidDonorGeographyCard, {
5684
5719
  sx: {
5685
- minWidth: 0
5720
+ minHeight: 400
5686
5721
  },
5687
- children: /*#__PURE__*/jsxRuntime.jsx(PaidDonorGeographyCard, {
5688
- sx: {
5689
- minHeight: 400
5690
- },
5691
- donorGeographyData: donorGeographyData
5692
- })
5693
- }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
5694
- item: true,
5695
- xs: 12,
5696
- sm: 6,
5697
- lg: 4,
5722
+ donorGeographyData: donorGeographyData
5723
+ }), /*#__PURE__*/jsxRuntime.jsx(RefundsChargebacksCard, {
5698
5724
  sx: {
5699
- minWidth: 0
5700
- },
5701
- children: /*#__PURE__*/jsxRuntime.jsx(RefundsChargebacksCard, {
5702
- sx: {
5703
- minHeight: 400
5704
- }
5705
- })
5706
- }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
5707
- item: true,
5708
- xs: 12,
5709
- sm: 6,
5710
- lg: 4,
5711
- sx: {
5712
- minWidth: 0,
5713
- // only show 4-per-row on very wide screens
5714
- "@media (min-width:2200px)": {
5715
- maxWidth: "25%",
5716
- flexBasis: "25%"
5717
- }
5718
- },
5719
- children: /*#__PURE__*/jsxRuntime.jsx(TrafficSourceCard, {
5720
- sx: {
5721
- minHeight: 400
5722
- },
5723
- trafficSourceData: trafficSourceData
5724
- })
5725
- })]
5726
- }), /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
5727
- container: true,
5728
- spacing: 3,
5729
- sx: {
5730
- mt: {
5731
- xs: 3,
5732
- md: 2.25
5733
- },
5734
- alignItems: "stretch"
5735
- },
5736
- children: [/*#__PURE__*/jsxRuntime.jsx(material.Grid, {
5737
- item: true,
5738
- xs: 12,
5739
- sm: 6,
5740
- lg: 4,
5741
- sx: {
5742
- minWidth: 0
5743
- },
5744
- children: /*#__PURE__*/jsxRuntime.jsx(MetricSparklineCard, {
5745
- title: "Order Bump",
5746
- subtitle: "Revenue trend \xB7 last 30 days",
5747
- value: "$".concat(formatNumber((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.totalValue) || 0)),
5748
- trend: "\u25B2 ".concat(orderBumpData === null || orderBumpData === void 0 || (_orderBumpData$prevTr = orderBumpData.prevTrend) === null || _orderBumpData$prevTr === void 0 ? void 0 : _orderBumpData$prevTr.toFixed(1), "% vs last month"),
5749
- chartData: orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.orderBumpMetrics,
5750
- footerMetrics: orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.footerMetrics
5751
- })
5752
- }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
5753
- item: true,
5754
- xs: 12,
5755
- sm: 6,
5756
- lg: 4,
5757
- sx: {
5758
- minWidth: 0
5759
- },
5760
- children: /*#__PURE__*/jsxRuntime.jsx(MetricDonutCard, {
5761
- title: "Upsell",
5762
- subtitle: "Acceptance & raised",
5763
- acceptanceRate: (upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceRate) || 0,
5764
- acceptanceVal: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceVal) || 0), "%"),
5765
- acceptanceTrend: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceTrend) || 0), "%"),
5766
- raisedVal: "$".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedVal) || 0)),
5767
- raisedTrend: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedTrend) || 0), "%")
5768
- })
5769
- }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
5770
- item: true,
5771
- xs: 12,
5772
- sm: 6,
5773
- lg: 4,
5774
- sx: {
5775
- minWidth: 0
5776
- },
5777
- children: /*#__PURE__*/jsxRuntime.jsx(MetricDonutCard, {
5778
- title: "Downsell",
5779
- subtitle: "Acceptance & raised",
5780
- acceptanceRate: (downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceRate) || 0,
5781
- acceptanceVal: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceVal) || 0), "%"),
5782
- acceptanceTrend: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceTrend) || 0), "%"),
5783
- raisedVal: "$".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raisedVal) || 0)),
5784
- raisedTrend: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raisedTrend) || 0), "%")
5785
- })
5786
- }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
5787
- item: true,
5788
- xs: 12,
5789
- sm: 6,
5790
- lg: 4,
5725
+ minHeight: 400
5726
+ }
5727
+ }), /*#__PURE__*/jsxRuntime.jsx(TrafficSourceCard, {
5791
5728
  sx: {
5792
- minWidth: 0,
5793
- "@media (min-width:2200px)": {
5794
- maxWidth: "25%",
5795
- flexBasis: "25%"
5796
- }
5729
+ minHeight: 400
5797
5730
  },
5798
- children: /*#__PURE__*/jsxRuntime.jsx(MetricSparklineCard, {
5799
- title: "Referrals",
5800
- subtitle: "Revenue trend \xB7 last 30 days",
5801
- value: "$22.7K",
5802
- trend: "\u25B2 9.1% vs last month",
5803
- chartData: [1500, 1700, 1600, 2200, 1900, 2400, 2270],
5804
- footerMetrics: [{
5805
- label: "Referrers",
5806
- value: "38"
5807
- }, {
5808
- label: "Avg gift",
5809
- value: "$598"
5810
- }, {
5811
- label: "Conv. rate",
5812
- value: "27.5%"
5813
- }]
5814
- })
5731
+ trafficSourceData: trafficSourceData
5732
+ }), /*#__PURE__*/jsxRuntime.jsx(MetricSparklineCard, {
5733
+ title: "Order Bump",
5734
+ subtitle: "Revenue trend \xB7 last 30 days",
5735
+ value: "$".concat(formatNumber((orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.totalValue) || 0)),
5736
+ trend: "\u25B2 ".concat(orderBumpData === null || orderBumpData === void 0 || (_orderBumpData$prevTr = orderBumpData.prevTrend) === null || _orderBumpData$prevTr === void 0 ? void 0 : _orderBumpData$prevTr.toFixed(1), "% vs last month"),
5737
+ chartData: orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.orderBumpMetrics,
5738
+ footerMetrics: orderBumpData === null || orderBumpData === void 0 ? void 0 : orderBumpData.footerMetrics
5739
+ }), /*#__PURE__*/jsxRuntime.jsx(MetricDonutCard, {
5740
+ title: "Upsell",
5741
+ subtitle: "Acceptance & raised",
5742
+ acceptanceRate: (upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceRate) || 0,
5743
+ acceptanceVal: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceVal) || 0), "%"),
5744
+ acceptanceTrend: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.acceptanceTrend) || 0), "%"),
5745
+ raisedVal: "$".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedVal) || 0)),
5746
+ raisedTrend: "".concat(formatNumber((upsellData === null || upsellData === void 0 ? void 0 : upsellData.raisedTrend) || 0), "%")
5747
+ }), /*#__PURE__*/jsxRuntime.jsx(MetricDonutCard, {
5748
+ title: "Downsell",
5749
+ subtitle: "Acceptance & raised",
5750
+ acceptanceRate: (downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceRate) || 0,
5751
+ acceptanceVal: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceVal) || 0), "%"),
5752
+ acceptanceTrend: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.acceptanceTrend) || 0), "%"),
5753
+ raisedVal: "$".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raisedVal) || 0)),
5754
+ raisedTrend: "".concat(formatNumber((downsellData === null || downsellData === void 0 ? void 0 : downsellData.raisedTrend) || 0), "%")
5755
+ }), /*#__PURE__*/jsxRuntime.jsx(MetricSparklineCard, {
5756
+ title: "Referrals",
5757
+ subtitle: "Revenue trend \xB7 last 30 days",
5758
+ value: "$22.7K",
5759
+ trend: "\u25B2 9.1% vs last month",
5760
+ chartData: [1500, 1700, 1600, 2200, 1900, 2400, 2270],
5761
+ footerMetrics: [{
5762
+ label: "Referrers",
5763
+ value: "38"
5764
+ }, {
5765
+ label: "Avg gift",
5766
+ value: "$598"
5767
+ }, {
5768
+ label: "Conv. rate",
5769
+ value: "27.5%"
5770
+ }]
5815
5771
  })]
5816
5772
  })]
5817
5773
  });