@ammarkhalidfarooq/dashboard-package 0.6.4 → 0.6.5

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
@@ -876,7 +876,9 @@ var Dashboard = function Dashboard(_ref) {
876
876
  _ref$dateName = _ref.dateName,
877
877
  dateName = _ref$dateName === void 0 ? "Last Period" : _ref$dateName,
878
878
  _ref$exportTrigger = _ref.exportTrigger,
879
- exportTrigger = _ref$exportTrigger === void 0 ? 0 : _ref$exportTrigger;
879
+ exportTrigger = _ref$exportTrigger === void 0 ? 0 : _ref$exportTrigger,
880
+ _ref$apiLoading = _ref.apiLoading,
881
+ apiLoading = _ref$apiLoading === void 0 ? false : _ref$apiLoading;
880
882
  return /*#__PURE__*/jsxRuntime.jsx(material.ThemeProvider, {
881
883
  theme: theme,
882
884
  children: /*#__PURE__*/jsxRuntime.jsx(React.Suspense, {
@@ -891,7 +893,8 @@ var Dashboard = function Dashboard(_ref) {
891
893
  apiData: apiData,
892
894
  activeSection: overviewType,
893
895
  dateName: dateName,
894
- exportTrigger: exportTrigger
896
+ exportTrigger: exportTrigger,
897
+ apiLoading: apiLoading
895
898
  })
896
899
  })
897
900
  });
@@ -4225,7 +4228,7 @@ var CARD_SX = {
4225
4228
  maxHeight: 280
4226
4229
  };
4227
4230
  var GRID_GAP = "6px";
4228
- var fourColGridSx = function fourColGridSx(exportMode) {
4231
+ var fourColGridSx$1 = function fourColGridSx(exportMode) {
4229
4232
  return {
4230
4233
  display: "grid",
4231
4234
  gridTemplateColumns: exportMode ? "repeat(4, 1fr)" : {
@@ -4460,19 +4463,19 @@ var OverallDetailsGrid = function OverallDetailsGrid(_ref) {
4460
4463
  children: campaignsRow
4461
4464
  });
4462
4465
  if (section === "middle") return /*#__PURE__*/jsxRuntime.jsx(material.Box, {
4463
- sx: fourColGridSx(exportMode),
4466
+ sx: fourColGridSx$1(exportMode),
4464
4467
  children: middleCards
4465
4468
  });
4466
4469
  if (section === "bottom") return /*#__PURE__*/jsxRuntime.jsx(material.Box, {
4467
- sx: fourColGridSx(exportMode),
4470
+ sx: fourColGridSx$1(exportMode),
4468
4471
  children: bottomCards
4469
4472
  });
4470
4473
  return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
4471
4474
  children: [campaignsRow, /*#__PURE__*/jsxRuntime.jsx(material.Box, {
4472
- sx: fourColGridSx(exportMode),
4475
+ sx: fourColGridSx$1(exportMode),
4473
4476
  children: middleCards
4474
4477
  }), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
4475
- sx: fourColGridSx(exportMode),
4478
+ sx: fourColGridSx$1(exportMode),
4476
4479
  children: bottomCards
4477
4480
  })]
4478
4481
  });
@@ -4785,7 +4788,9 @@ var NewOverview = function NewOverview(_ref) {
4785
4788
  _ref$dateName = _ref.dateName,
4786
4789
  dateName = _ref$dateName === void 0 ? "Last Period" : _ref$dateName,
4787
4790
  _ref$exportTrigger = _ref.exportTrigger,
4788
- exportTrigger = _ref$exportTrigger === void 0 ? 0 : _ref$exportTrigger;
4791
+ exportTrigger = _ref$exportTrigger === void 0 ? 0 : _ref$exportTrigger,
4792
+ _ref$apiLoading = _ref.apiLoading,
4793
+ apiLoading = _ref$apiLoading === void 0 ? false : _ref$apiLoading;
4789
4794
  var initialMetric = "Revenue";
4790
4795
  var revenueData = (apiData === null || apiData === void 0 ? void 0 : apiData.revenueData) || [3000, 4500, 4200, 5800, 5200, 7100, 8500, 9200, 5000];
4791
4796
  var donationsData = (apiData === null || apiData === void 0 ? void 0 : apiData.donationsData) || [15, 22, 18, 30, 25, 35, 42, 45, 28];
@@ -4948,7 +4953,7 @@ var NewOverview = function NewOverview(_ref) {
4948
4953
  var primaryCharts = [{
4949
4954
  label: "Total Raised",
4950
4955
  value: totalRevData.length > 0 ? "$".concat(totalRevTotal.toLocaleString()) : typeof (apiData === null || apiData === void 0 ? void 0 : apiData.totalRevenue) === "string" ? apiData.totalRevenue : "$9,200.00",
4951
- subValue: "Total Donations: ".concat((apiData === null || apiData === void 0 ? void 0 : apiData.totalDonations) || 215),
4956
+ subValue: "Total Donations: ".concat((apiData === null || apiData === void 0 ? void 0 : apiData.totalDonations) || 0),
4952
4957
  data: totalRevValues,
4953
4958
  categories: totalRevCategories,
4954
4959
  showSelector: true
@@ -5053,20 +5058,24 @@ var NewOverview = function NewOverview(_ref) {
5053
5058
  secondaryCharts: secondaryCharts,
5054
5059
  tertiaryCharts: tertiaryCharts,
5055
5060
  quaternaryCharts: quaternaryCharts,
5056
- dateName: dateName
5061
+ dateName: dateName,
5062
+ apiLoading: apiLoading
5057
5063
  }), activeSection === "Paid" && /*#__PURE__*/jsxRuntime.jsx(PaidSection$2, {
5058
- apiData: apiData
5064
+ apiData: apiData,
5065
+ apiLoading: apiLoading
5059
5066
  }), activeSection === "Organic" && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
5060
5067
  sx: {},
5061
5068
  children: /*#__PURE__*/jsxRuntime.jsx(OrganicSection$2, {
5062
5069
  apiData: apiData,
5063
- dateName: dateName
5070
+ dateName: dateName,
5071
+ apiLoading: apiLoading
5064
5072
  })
5065
5073
  }), activeSection === "Email" && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
5066
5074
  sx: {},
5067
5075
  children: /*#__PURE__*/jsxRuntime.jsx(EmailSection$2, {
5068
5076
  apiData: apiData,
5069
- dateName: dateName
5077
+ dateName: dateName,
5078
+ apiLoading: apiLoading
5070
5079
  })
5071
5080
  })]
5072
5081
  }), showExportLayout && /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -14520,6 +14529,605 @@ var html2canvas_esm = /*#__PURE__*/Object.freeze({
14520
14529
  default: html2canvas
14521
14530
  });
14522
14531
 
14532
+ var CARD_BORDER = "1.5px solid #F1F1F5";
14533
+ var PANEL_BORDER = "1px solid #f0f0f0";
14534
+ var PANEL_SHADOW = "0 4px 24px rgba(0,0,0,0.06)";
14535
+ var MetricCardSkeleton = function MetricCardSkeleton() {
14536
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
14537
+ sx: {
14538
+ bgcolor: "#fff",
14539
+ borderRadius: "16px",
14540
+ border: CARD_BORDER,
14541
+ p: {
14542
+ xs: 1.75,
14543
+ md: 2
14544
+ },
14545
+ height: 92,
14546
+ boxShadow: "0 14px 30px rgba(21, 26, 45, 0.06)"
14547
+ },
14548
+ children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
14549
+ sx: {
14550
+ display: "flex",
14551
+ justifyContent: "space-between",
14552
+ mb: 1
14553
+ },
14554
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14555
+ variant: "text",
14556
+ width: "55%",
14557
+ height: 18
14558
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14559
+ variant: "circular",
14560
+ width: 30,
14561
+ height: 30
14562
+ })]
14563
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14564
+ variant: "text",
14565
+ width: "70%",
14566
+ height: 28,
14567
+ sx: {
14568
+ mb: 0.5
14569
+ }
14570
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14571
+ variant: "text",
14572
+ width: "45%",
14573
+ height: 14
14574
+ })]
14575
+ });
14576
+ };
14577
+ var MetricCardsSkeleton = function MetricCardsSkeleton(_ref) {
14578
+ var _ref$count = _ref.count,
14579
+ count = _ref$count === void 0 ? 6 : _ref$count,
14580
+ _ref$gridTemplateColu = _ref.gridTemplateColumns,
14581
+ gridTemplateColumns = _ref$gridTemplateColu === void 0 ? {
14582
+ xs: "1fr 1fr",
14583
+ sm: "1fr 1fr",
14584
+ md: "1fr 1fr 1fr",
14585
+ lg: "repeat(6, 1fr)"
14586
+ } : _ref$gridTemplateColu,
14587
+ _ref$gap = _ref.gap,
14588
+ gap = _ref$gap === void 0 ? "6px" : _ref$gap;
14589
+ return /*#__PURE__*/jsxRuntime.jsx(material.Box, {
14590
+ sx: {
14591
+ display: "grid",
14592
+ gridTemplateColumns: gridTemplateColumns,
14593
+ gap: gap,
14594
+ mb: 0
14595
+ },
14596
+ children: Array.from({
14597
+ length: count
14598
+ }).map(function (_, index) {
14599
+ return /*#__PURE__*/jsxRuntime.jsx(MetricCardSkeleton, {}, index);
14600
+ })
14601
+ });
14602
+ };
14603
+ var ChartCardSkeleton = function ChartCardSkeleton(_ref2) {
14604
+ var _ref2$height = _ref2.height,
14605
+ height = _ref2$height === void 0 ? 380 : _ref2$height;
14606
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
14607
+ sx: {
14608
+ bgcolor: "#fff",
14609
+ borderRadius: 4,
14610
+ border: PANEL_BORDER,
14611
+ boxShadow: PANEL_SHADOW,
14612
+ p: 3,
14613
+ height: height
14614
+ },
14615
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14616
+ variant: "text",
14617
+ width: 180,
14618
+ height: 26,
14619
+ sx: {
14620
+ mb: 0.5
14621
+ }
14622
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14623
+ variant: "text",
14624
+ width: 120,
14625
+ height: 16,
14626
+ sx: {
14627
+ mb: 1
14628
+ }
14629
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14630
+ variant: "text",
14631
+ width: 140,
14632
+ height: 36,
14633
+ sx: {
14634
+ mb: 2
14635
+ }
14636
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14637
+ variant: "rounded",
14638
+ width: "100%",
14639
+ height: height - 120
14640
+ })]
14641
+ });
14642
+ };
14643
+ var PanelCardSkeleton = function PanelCardSkeleton(_ref3) {
14644
+ var _ref3$height = _ref3.height,
14645
+ height = _ref3$height === void 0 ? 280 : _ref3$height,
14646
+ _ref3$sx = _ref3.sx,
14647
+ sx = _ref3$sx === void 0 ? {} : _ref3$sx;
14648
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
14649
+ sx: _objectSpread2({
14650
+ bgcolor: "#fff",
14651
+ borderRadius: 4,
14652
+ border: PANEL_BORDER,
14653
+ boxShadow: PANEL_SHADOW,
14654
+ p: 3,
14655
+ height: height
14656
+ }, sx),
14657
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14658
+ variant: "text",
14659
+ width: "50%",
14660
+ height: 24,
14661
+ sx: {
14662
+ mb: 0.5
14663
+ }
14664
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14665
+ variant: "text",
14666
+ width: "35%",
14667
+ height: 16,
14668
+ sx: {
14669
+ mb: 2.5
14670
+ }
14671
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14672
+ variant: "rounded",
14673
+ width: "100%",
14674
+ height: height - 90
14675
+ })]
14676
+ });
14677
+ };
14678
+ var TableCardSkeleton = function TableCardSkeleton(_ref4) {
14679
+ var _ref4$height = _ref4.height,
14680
+ height = _ref4$height === void 0 ? 430 : _ref4$height,
14681
+ _ref4$rowCount = _ref4.rowCount,
14682
+ rowCount = _ref4$rowCount === void 0 ? 5 : _ref4$rowCount;
14683
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
14684
+ sx: {
14685
+ bgcolor: "#fff",
14686
+ borderRadius: 4,
14687
+ border: PANEL_BORDER,
14688
+ boxShadow: PANEL_SHADOW,
14689
+ p: 3,
14690
+ height: height
14691
+ },
14692
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14693
+ variant: "text",
14694
+ width: "40%",
14695
+ height: 24,
14696
+ sx: {
14697
+ mb: 0.5
14698
+ }
14699
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14700
+ variant: "text",
14701
+ width: "30%",
14702
+ height: 16,
14703
+ sx: {
14704
+ mb: 2.5
14705
+ }
14706
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14707
+ variant: "text",
14708
+ width: "100%",
14709
+ height: 20,
14710
+ sx: {
14711
+ mb: 1.5
14712
+ }
14713
+ }), Array.from({
14714
+ length: rowCount
14715
+ }).map(function (_, index) {
14716
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
14717
+ sx: {
14718
+ display: "flex",
14719
+ gap: 2,
14720
+ mb: 1.5,
14721
+ alignItems: "center"
14722
+ },
14723
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14724
+ variant: "circular",
14725
+ width: 36,
14726
+ height: 36
14727
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14728
+ variant: "text",
14729
+ width: "25%",
14730
+ height: 20
14731
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14732
+ variant: "text",
14733
+ width: "15%",
14734
+ height: 20
14735
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14736
+ variant: "rounded",
14737
+ width: "20%",
14738
+ height: 8,
14739
+ sx: {
14740
+ flex: 1
14741
+ }
14742
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14743
+ variant: "text",
14744
+ width: "10%",
14745
+ height: 20
14746
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14747
+ variant: "text",
14748
+ width: "12%",
14749
+ height: 20
14750
+ })]
14751
+ }, index);
14752
+ })]
14753
+ });
14754
+ };
14755
+ var DonutCardSkeleton = function DonutCardSkeleton(_ref5) {
14756
+ var _ref5$height = _ref5.height,
14757
+ height = _ref5$height === void 0 ? 430 : _ref5$height;
14758
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
14759
+ sx: {
14760
+ bgcolor: "#fff",
14761
+ borderRadius: 4,
14762
+ border: PANEL_BORDER,
14763
+ boxShadow: PANEL_SHADOW,
14764
+ p: 3,
14765
+ height: height,
14766
+ display: "flex",
14767
+ flexDirection: "column"
14768
+ },
14769
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14770
+ variant: "text",
14771
+ width: "45%",
14772
+ height: 24,
14773
+ sx: {
14774
+ mb: 0.5
14775
+ }
14776
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14777
+ variant: "text",
14778
+ width: "35%",
14779
+ height: 16,
14780
+ sx: {
14781
+ mb: 2
14782
+ }
14783
+ }), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
14784
+ sx: {
14785
+ display: "flex",
14786
+ flex: 1,
14787
+ alignItems: "center",
14788
+ justifyContent: "center",
14789
+ gap: 4
14790
+ },
14791
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14792
+ variant: "circular",
14793
+ width: 160,
14794
+ height: 160
14795
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
14796
+ sx: {
14797
+ flex: 1
14798
+ },
14799
+ children: Array.from({
14800
+ length: 4
14801
+ }).map(function (_, index) {
14802
+ return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
14803
+ sx: {
14804
+ display: "flex",
14805
+ alignItems: "center",
14806
+ gap: 1,
14807
+ mb: 1.5
14808
+ },
14809
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14810
+ variant: "circular",
14811
+ width: 10,
14812
+ height: 10
14813
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Skeleton, {
14814
+ variant: "text",
14815
+ width: "60%",
14816
+ height: 18
14817
+ })]
14818
+ }, index);
14819
+ })
14820
+ })]
14821
+ })]
14822
+ });
14823
+ };
14824
+ var fourColGridSx = {
14825
+ display: "grid",
14826
+ gridTemplateColumns: {
14827
+ xs: "1fr",
14828
+ sm: "repeat(2, 1fr)",
14829
+ md: "repeat(2, 1fr)",
14830
+ xl: "repeat(4, 1fr)"
14831
+ },
14832
+ gap: "6px",
14833
+ mt: "6px",
14834
+ alignItems: "stretch"
14835
+ };
14836
+ var OverallSectionSkeleton = function OverallSectionSkeleton() {
14837
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
14838
+ children: [/*#__PURE__*/jsxRuntime.jsx(MetricCardsSkeleton, {
14839
+ count: 6
14840
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
14841
+ container: true,
14842
+ spacing: 3,
14843
+ sx: {
14844
+ mb: 0,
14845
+ mt: "6px"
14846
+ },
14847
+ children: /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
14848
+ item: true,
14849
+ xs: 12,
14850
+ sx: {
14851
+ paddingTop: "0px !important"
14852
+ },
14853
+ children: /*#__PURE__*/jsxRuntime.jsx(ChartCardSkeleton, {
14854
+ height: 400
14855
+ })
14856
+ })
14857
+ }), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
14858
+ sx: {
14859
+ mt: "6px"
14860
+ },
14861
+ children: [/*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
14862
+ container: true,
14863
+ spacing: "6px",
14864
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Grid, {
14865
+ item: true,
14866
+ xs: 12,
14867
+ md: 9,
14868
+ sx: {
14869
+ paddingTop: "0px !important"
14870
+ },
14871
+ children: /*#__PURE__*/jsxRuntime.jsx(TableCardSkeleton, {
14872
+ height: 320,
14873
+ rowCount: 4
14874
+ })
14875
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
14876
+ item: true,
14877
+ xs: 12,
14878
+ md: 3,
14879
+ sx: {
14880
+ paddingTop: "0px !important"
14881
+ },
14882
+ children: /*#__PURE__*/jsxRuntime.jsx(DonutCardSkeleton, {
14883
+ height: 320
14884
+ })
14885
+ })]
14886
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
14887
+ sx: fourColGridSx,
14888
+ children: Array.from({
14889
+ length: 4
14890
+ }).map(function (_, index) {
14891
+ return /*#__PURE__*/jsxRuntime.jsx(PanelCardSkeleton, {
14892
+ height: 280
14893
+ }, index);
14894
+ })
14895
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
14896
+ sx: fourColGridSx,
14897
+ children: Array.from({
14898
+ length: 4
14899
+ }).map(function (_, index) {
14900
+ return /*#__PURE__*/jsxRuntime.jsx(PanelCardSkeleton, {
14901
+ height: 280
14902
+ }, index);
14903
+ })
14904
+ })]
14905
+ })]
14906
+ });
14907
+ };
14908
+ var PaidSectionSkeleton = function PaidSectionSkeleton() {
14909
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
14910
+ children: [/*#__PURE__*/jsxRuntime.jsx(MetricCardsSkeleton, {
14911
+ count: 6,
14912
+ gridTemplateColumns: {
14913
+ xs: "1fr",
14914
+ sm: "1fr 1fr",
14915
+ md: "1fr 1fr 1fr",
14916
+ lg: "repeat(6, 1fr)"
14917
+ },
14918
+ gap: 2
14919
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
14920
+ container: true,
14921
+ spacing: 3,
14922
+ sx: {
14923
+ mt: 2.75
14924
+ },
14925
+ children: /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
14926
+ item: true,
14927
+ xs: 12,
14928
+ sx: {
14929
+ paddingTop: "0px !important"
14930
+ },
14931
+ children: /*#__PURE__*/jsxRuntime.jsx(ChartCardSkeleton, {
14932
+ height: 400
14933
+ })
14934
+ })
14935
+ }), /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
14936
+ container: true,
14937
+ spacing: 3,
14938
+ sx: {
14939
+ mt: 2.25
14940
+ },
14941
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Grid, {
14942
+ item: true,
14943
+ xs: 12,
14944
+ md: 6,
14945
+ sx: {
14946
+ paddingTop: "0px !important",
14947
+ minHeight: 430
14948
+ },
14949
+ children: /*#__PURE__*/jsxRuntime.jsx(TableCardSkeleton, {})
14950
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
14951
+ item: true,
14952
+ xs: 12,
14953
+ md: 6,
14954
+ sx: {
14955
+ paddingTop: "0px !important",
14956
+ minHeight: 430
14957
+ },
14958
+ children: /*#__PURE__*/jsxRuntime.jsx(DonutCardSkeleton, {})
14959
+ })]
14960
+ }), /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
14961
+ container: true,
14962
+ spacing: 3,
14963
+ sx: {
14964
+ mt: 2.25
14965
+ },
14966
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Grid, {
14967
+ item: true,
14968
+ xs: 12,
14969
+ md: 6,
14970
+ sx: {
14971
+ paddingTop: "0px !important"
14972
+ },
14973
+ children: /*#__PURE__*/jsxRuntime.jsx(TableCardSkeleton, {
14974
+ height: 360,
14975
+ rowCount: 4
14976
+ })
14977
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
14978
+ item: true,
14979
+ xs: 12,
14980
+ md: 6,
14981
+ sx: {
14982
+ paddingTop: "0px !important"
14983
+ },
14984
+ children: /*#__PURE__*/jsxRuntime.jsx(PanelCardSkeleton, {
14985
+ height: 360
14986
+ })
14987
+ })]
14988
+ })]
14989
+ });
14990
+ };
14991
+ var OrganicSectionSkeleton = function OrganicSectionSkeleton() {
14992
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
14993
+ children: [/*#__PURE__*/jsxRuntime.jsx(MetricCardsSkeleton, {
14994
+ count: 6
14995
+ }), /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
14996
+ container: true,
14997
+ spacing: 3,
14998
+ sx: {
14999
+ mt: "6px"
15000
+ },
15001
+ children: [/*#__PURE__*/jsxRuntime.jsx(material.Grid, {
15002
+ item: true,
15003
+ xs: 12,
15004
+ sx: {
15005
+ paddingTop: "0px !important"
15006
+ },
15007
+ children: /*#__PURE__*/jsxRuntime.jsx(ChartCardSkeleton, {
15008
+ height: 400
15009
+ })
15010
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
15011
+ item: true,
15012
+ xs: 12,
15013
+ md: 6,
15014
+ sx: {
15015
+ mt: "6px",
15016
+ paddingTop: "0px !important"
15017
+ },
15018
+ children: /*#__PURE__*/jsxRuntime.jsx(TableCardSkeleton, {
15019
+ height: 360,
15020
+ rowCount: 5
15021
+ })
15022
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
15023
+ item: true,
15024
+ xs: 12,
15025
+ md: 6,
15026
+ sx: {
15027
+ mt: "6px",
15028
+ paddingTop: "0px !important"
15029
+ },
15030
+ children: /*#__PURE__*/jsxRuntime.jsx(DonutCardSkeleton, {
15031
+ height: 360
15032
+ })
15033
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
15034
+ item: true,
15035
+ xs: 12,
15036
+ md: 6,
15037
+ sx: {
15038
+ mt: "6px",
15039
+ paddingTop: "0px !important"
15040
+ },
15041
+ children: /*#__PURE__*/jsxRuntime.jsx(TableCardSkeleton, {
15042
+ height: 360,
15043
+ rowCount: 5
15044
+ })
15045
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
15046
+ item: true,
15047
+ xs: 12,
15048
+ md: 6,
15049
+ sx: {
15050
+ mt: "6px",
15051
+ paddingTop: "0px !important"
15052
+ },
15053
+ children: /*#__PURE__*/jsxRuntime.jsx(PanelCardSkeleton, {
15054
+ height: 360
15055
+ })
15056
+ })]
15057
+ })]
15058
+ });
15059
+ };
15060
+ var EmailSectionSkeleton = function EmailSectionSkeleton() {
15061
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
15062
+ children: [/*#__PURE__*/jsxRuntime.jsx(MetricCardsSkeleton, {
15063
+ count: 10,
15064
+ gridTemplateColumns: {
15065
+ xs: "1fr 1fr",
15066
+ sm: "1fr 1fr",
15067
+ md: "1fr 1fr 1fr",
15068
+ lg: "repeat(5, 1fr)"
15069
+ }
15070
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
15071
+ container: true,
15072
+ spacing: 3,
15073
+ sx: {
15074
+ mt: "6px"
15075
+ },
15076
+ children: Array.from({
15077
+ length: 3
15078
+ }).map(function (_, index) {
15079
+ return /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
15080
+ item: true,
15081
+ xs: 12,
15082
+ md: 4,
15083
+ sx: {
15084
+ paddingTop: "0px !important",
15085
+ paddingLeft: index > 0 ? {
15086
+ md: "6px !important"
15087
+ } : undefined,
15088
+ marginTop: index > 0 ? {
15089
+ xs: "6px",
15090
+ md: 0
15091
+ } : undefined
15092
+ },
15093
+ children: /*#__PURE__*/jsxRuntime.jsx(ChartCardSkeleton, {
15094
+ height: 280
15095
+ })
15096
+ }, index);
15097
+ })
15098
+ }), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
15099
+ container: true,
15100
+ spacing: 3,
15101
+ sx: {
15102
+ mt: "6px"
15103
+ },
15104
+ children: Array.from({
15105
+ length: 3
15106
+ }).map(function (_, index) {
15107
+ return /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
15108
+ item: true,
15109
+ xs: 12,
15110
+ md: 4,
15111
+ sx: {
15112
+ paddingTop: "0px !important",
15113
+ paddingLeft: index > 0 ? {
15114
+ md: "6px !important"
15115
+ } : undefined,
15116
+ marginTop: index > 0 ? {
15117
+ xs: "6px",
15118
+ md: 0
15119
+ } : undefined
15120
+ },
15121
+ children: /*#__PURE__*/jsxRuntime.jsx(TableCardSkeleton, {
15122
+ height: 300,
15123
+ rowCount: 4
15124
+ })
15125
+ }, index);
15126
+ })
15127
+ })]
15128
+ });
15129
+ };
15130
+
14523
15131
  var OverallSection = function OverallSection(_ref) {
14524
15132
  var _apiData$overviewStat, _apiData$overviewStat2, _apiData$overviewStat3, _apiData$overviewStat4, _apiData$overviewStat5, _apiData$overviewStat6, _apiData$overviewStat7, _apiData$overviewStat8, _apiData$overviewStat9, _apiData$overviewStat0, _apiData$overviewStat1, _apiData$overviewStat10, _apiData$overviewStat11, _apiData$overviewStat12, _apiData$roasCard, _apiData$roasCardPrev, _apiData$overviewStat13, _apiData$overviewStat14, _apiData$overviewStat15, _apiData$overviewStat16;
14525
15133
  var _ref$apiData = _ref.apiData,
@@ -14528,11 +15136,16 @@ var OverallSection = function OverallSection(_ref) {
14528
15136
  secondaryCharts = _ref.secondaryCharts,
14529
15137
  tertiaryCharts = _ref.tertiaryCharts,
14530
15138
  quaternaryCharts = _ref.quaternaryCharts,
14531
- dateName = _ref.dateName;
15139
+ dateName = _ref.dateName,
15140
+ _ref$apiLoading = _ref.apiLoading,
15141
+ apiLoading = _ref$apiLoading === void 0 ? false : _ref$apiLoading;
14532
15142
  var _useState = React.useState("Total Raised"),
14533
15143
  _useState2 = _slicedToArray(_useState, 2),
14534
15144
  activeMetric = _useState2[0],
14535
15145
  setActiveMetric = _useState2[1];
15146
+ if (apiLoading) {
15147
+ return /*#__PURE__*/jsxRuntime.jsx(OverallSectionSkeleton, {});
15148
+ }
14536
15149
  var donationTypeData = (apiData === null || apiData === void 0 ? void 0 : apiData.recurringBarChartData) || [];
14537
15150
  var donorGeographyData = (apiData === null || apiData === void 0 ? void 0 : apiData.donorGeography) || [];
14538
15151
  var trafficSourceData = (apiData === null || apiData === void 0 ? void 0 : apiData.trafficSourceData) || [];
@@ -15063,11 +15676,16 @@ var OverallSection$1 = /*#__PURE__*/Object.freeze({
15063
15676
  default: OverallSection
15064
15677
  });
15065
15678
 
15066
- var PaidSection = function PaidSection() {
15679
+ var PaidSection = function PaidSection(_ref) {
15680
+ var _ref$apiLoading = _ref.apiLoading,
15681
+ apiLoading = _ref$apiLoading === void 0 ? false : _ref$apiLoading;
15067
15682
  var _useState = React.useState("Total Spent"),
15068
15683
  _useState2 = _slicedToArray(_useState, 2),
15069
15684
  activeMetric = _useState2[0],
15070
15685
  setActiveMetric = _useState2[1];
15686
+ if (apiLoading) {
15687
+ return /*#__PURE__*/jsxRuntime.jsx(PaidSectionSkeleton, {});
15688
+ }
15071
15689
  var categories = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
15072
15690
  var metricInfo = {
15073
15691
  "Total Spent": {
@@ -15398,7 +16016,9 @@ var OrganicSection = function OrganicSection(_ref) {
15398
16016
  var _ref$apiData = _ref.apiData,
15399
16017
  apiData = _ref$apiData === void 0 ? {} : _ref$apiData,
15400
16018
  _ref$dateName = _ref.dateName,
15401
- dateName = _ref$dateName === void 0 ? "Last Period" : _ref$dateName;
16019
+ dateName = _ref$dateName === void 0 ? "Last Period" : _ref$dateName,
16020
+ _ref$apiLoading = _ref.apiLoading,
16021
+ apiLoading = _ref$apiLoading === void 0 ? false : _ref$apiLoading;
15402
16022
  var _useState = React.useState("Organic Users"),
15403
16023
  _useState2 = _slicedToArray(_useState, 2),
15404
16024
  activeMetric = _useState2[0],
@@ -15656,6 +16276,9 @@ var OrganicSection = function OrganicSection(_ref) {
15656
16276
  data: selectedInfo.data,
15657
16277
  categories: chartCategories
15658
16278
  };
16279
+ if (apiLoading) {
16280
+ return /*#__PURE__*/jsxRuntime.jsx(OrganicSectionSkeleton, {});
16281
+ }
15659
16282
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
15660
16283
  children: [/*#__PURE__*/jsxRuntime.jsx(material.Box, {
15661
16284
  sx: {
@@ -16093,7 +16716,9 @@ var EmailSection = function EmailSection(_ref) {
16093
16716
  var _ref$apiData = _ref.apiData,
16094
16717
  apiData = _ref$apiData === void 0 ? {} : _ref$apiData,
16095
16718
  _ref$dateName = _ref.dateName,
16096
- dateName = _ref$dateName === void 0 ? "Last Period" : _ref$dateName;
16719
+ dateName = _ref$dateName === void 0 ? "Last Period" : _ref$dateName,
16720
+ _ref$apiLoading = _ref.apiLoading,
16721
+ apiLoading = _ref$apiLoading === void 0 ? false : _ref$apiLoading;
16097
16722
  var _useState = React.useState("Total raised"),
16098
16723
  _useState2 = _slicedToArray(_useState, 2),
16099
16724
  activeMetric = _useState2[0],
@@ -16336,6 +16961,9 @@ var EmailSection = function EmailSection(_ref) {
16336
16961
  } : {}
16337
16962
  });
16338
16963
  };
16964
+ if (apiLoading) {
16965
+ return /*#__PURE__*/jsxRuntime.jsx(EmailSectionSkeleton, {});
16966
+ }
16339
16967
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
16340
16968
  children: [/*#__PURE__*/jsxRuntime.jsx(material.Box, {
16341
16969
  sx: {