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