@ammarkhalidfarooq/dashboard-package 0.2.4 → 0.2.6
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 +700 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +701 -13
- package/dist/index.es.js.map +1 -1
- package/package.json +61 -61
package/dist/index.cjs.js
CHANGED
|
@@ -573,7 +573,9 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
573
573
|
_ref$categories = _ref.categories,
|
|
574
574
|
categories = _ref$categories === void 0 ? ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep"] : _ref$categories,
|
|
575
575
|
_ref$apiData = _ref.apiData,
|
|
576
|
-
apiData = _ref$apiData === void 0 ? {} : _ref$apiData
|
|
576
|
+
apiData = _ref$apiData === void 0 ? {} : _ref$apiData,
|
|
577
|
+
_ref$performanceData = _ref.performanceData,
|
|
578
|
+
performanceData = _ref$performanceData === void 0 ? {} : _ref$performanceData;
|
|
577
579
|
var _React$useState = React.useState(initialMetric),
|
|
578
580
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
579
581
|
metric = _React$useState2[0];
|
|
@@ -650,7 +652,8 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
650
652
|
children: /*#__PURE__*/jsxRuntime.jsx(material.CircularProgress, {})
|
|
651
653
|
}),
|
|
652
654
|
children: /*#__PURE__*/jsxRuntime.jsx(PerformanceSection$1, {
|
|
653
|
-
apiData: apiData
|
|
655
|
+
apiData: apiData,
|
|
656
|
+
performanceData: performanceData
|
|
654
657
|
})
|
|
655
658
|
}), /*#__PURE__*/jsxRuntime.jsx(React.Suspense, {
|
|
656
659
|
fallback: /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
@@ -744,6 +747,508 @@ var DisplayCard = function DisplayCard(_ref) {
|
|
|
744
747
|
});
|
|
745
748
|
};
|
|
746
749
|
|
|
750
|
+
var CardWrapper = function CardWrapper(_ref) {
|
|
751
|
+
var title = _ref.title,
|
|
752
|
+
children = _ref.children;
|
|
753
|
+
return /*#__PURE__*/jsxRuntime.jsx(material.Card, {
|
|
754
|
+
sx: {
|
|
755
|
+
width: "100%",
|
|
756
|
+
display: "flex",
|
|
757
|
+
flexDirection: "column",
|
|
758
|
+
boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
|
|
759
|
+
borderRadius: 4,
|
|
760
|
+
border: "1px solid #f0f0f0",
|
|
761
|
+
height: "100%"
|
|
762
|
+
},
|
|
763
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(material.CardContent, {
|
|
764
|
+
sx: {
|
|
765
|
+
p: 3
|
|
766
|
+
},
|
|
767
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
768
|
+
variant: "subtitle2",
|
|
769
|
+
sx: {
|
|
770
|
+
color: "#000000ff",
|
|
771
|
+
fontWeight: 600,
|
|
772
|
+
textTransform: "uppercase",
|
|
773
|
+
letterSpacing: "0.5px",
|
|
774
|
+
mb: 3,
|
|
775
|
+
textAlign: "left"
|
|
776
|
+
},
|
|
777
|
+
children: title
|
|
778
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
779
|
+
sx: {
|
|
780
|
+
display: "flex",
|
|
781
|
+
flexDirection: "column",
|
|
782
|
+
gap: 2
|
|
783
|
+
},
|
|
784
|
+
children: children
|
|
785
|
+
})]
|
|
786
|
+
})
|
|
787
|
+
});
|
|
788
|
+
};
|
|
789
|
+
var LandingPagesCard = function LandingPagesCard() {
|
|
790
|
+
var data = [{
|
|
791
|
+
page: "/zakat",
|
|
792
|
+
users: "612 users",
|
|
793
|
+
cvr: "1.3% CVR",
|
|
794
|
+
color: "#2E7D32"
|
|
795
|
+
}, {
|
|
796
|
+
page: "/ramadan",
|
|
797
|
+
users: "488 users",
|
|
798
|
+
cvr: "1.1% CVR",
|
|
799
|
+
color: "#2E7D32"
|
|
800
|
+
}, {
|
|
801
|
+
page: "/donate",
|
|
802
|
+
users: "421 users",
|
|
803
|
+
cvr: "0.7% CVR",
|
|
804
|
+
color: "#ED6C02"
|
|
805
|
+
}, {
|
|
806
|
+
page: "/campaigns",
|
|
807
|
+
users: "380 users",
|
|
808
|
+
cvr: "0.5% CVR",
|
|
809
|
+
color: "#ED6C02"
|
|
810
|
+
}, {
|
|
811
|
+
page: "/sadaqah",
|
|
812
|
+
users: "290 users",
|
|
813
|
+
cvr: "0.9% CVR",
|
|
814
|
+
color: "#2E7D32"
|
|
815
|
+
}];
|
|
816
|
+
return /*#__PURE__*/jsxRuntime.jsx(CardWrapper, {
|
|
817
|
+
title: "Top Landing Pages",
|
|
818
|
+
children: data.map(function (item, index) {
|
|
819
|
+
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
820
|
+
sx: {
|
|
821
|
+
display: "flex",
|
|
822
|
+
justifyContent: "space-between",
|
|
823
|
+
alignItems: "center"
|
|
824
|
+
},
|
|
825
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
826
|
+
variant: "body2",
|
|
827
|
+
sx: {
|
|
828
|
+
fontWeight: 500,
|
|
829
|
+
color: "#333"
|
|
830
|
+
},
|
|
831
|
+
children: item.page
|
|
832
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
833
|
+
sx: {
|
|
834
|
+
display: "flex",
|
|
835
|
+
gap: 2,
|
|
836
|
+
alignItems: "center"
|
|
837
|
+
},
|
|
838
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
839
|
+
variant: "body2",
|
|
840
|
+
sx: {
|
|
841
|
+
color: "#606062",
|
|
842
|
+
fontWeight: 500
|
|
843
|
+
},
|
|
844
|
+
children: item.users
|
|
845
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
846
|
+
variant: "body2",
|
|
847
|
+
sx: {
|
|
848
|
+
color: item.color,
|
|
849
|
+
fontWeight: 600,
|
|
850
|
+
minWidth: "70px",
|
|
851
|
+
textAlign: "right"
|
|
852
|
+
},
|
|
853
|
+
children: item.cvr
|
|
854
|
+
})]
|
|
855
|
+
})]
|
|
856
|
+
}, index);
|
|
857
|
+
})
|
|
858
|
+
});
|
|
859
|
+
};
|
|
860
|
+
var KeywordsCard = function KeywordsCard() {
|
|
861
|
+
var data = [{
|
|
862
|
+
keyword: "zakat calculator",
|
|
863
|
+
volume: "320",
|
|
864
|
+
rank: "#3",
|
|
865
|
+
color: "#E8F5E9",
|
|
866
|
+
textColor: "#2E7D32"
|
|
867
|
+
}, {
|
|
868
|
+
keyword: "donate to ramadan",
|
|
869
|
+
volume: "214",
|
|
870
|
+
rank: "#5",
|
|
871
|
+
color: "#E8F5E9",
|
|
872
|
+
textColor: "#2E7D32"
|
|
873
|
+
}, {
|
|
874
|
+
keyword: "islamic charity uk",
|
|
875
|
+
volume: "198",
|
|
876
|
+
rank: "#11",
|
|
877
|
+
color: "#FFF3E0",
|
|
878
|
+
textColor: "#ED6C02"
|
|
879
|
+
}, {
|
|
880
|
+
keyword: "madinah fundraising",
|
|
881
|
+
volume: "176",
|
|
882
|
+
rank: "#1",
|
|
883
|
+
color: "#E8F5E9",
|
|
884
|
+
textColor: "#2E7D32"
|
|
885
|
+
}, {
|
|
886
|
+
keyword: "online sadaqah",
|
|
887
|
+
volume: "142",
|
|
888
|
+
rank: "#8",
|
|
889
|
+
color: "#FFF3E0",
|
|
890
|
+
textColor: "#ED6C02"
|
|
891
|
+
}];
|
|
892
|
+
return /*#__PURE__*/jsxRuntime.jsx(CardWrapper, {
|
|
893
|
+
title: "Top Keywords",
|
|
894
|
+
children: data.map(function (item, index) {
|
|
895
|
+
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
896
|
+
sx: {
|
|
897
|
+
display: "flex",
|
|
898
|
+
justifyContent: "space-between",
|
|
899
|
+
alignItems: "center"
|
|
900
|
+
},
|
|
901
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
902
|
+
variant: "body2",
|
|
903
|
+
sx: {
|
|
904
|
+
fontWeight: 500,
|
|
905
|
+
color: "#333"
|
|
906
|
+
},
|
|
907
|
+
children: item.keyword
|
|
908
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
909
|
+
sx: {
|
|
910
|
+
display: "flex",
|
|
911
|
+
gap: 2,
|
|
912
|
+
alignItems: "center"
|
|
913
|
+
},
|
|
914
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
915
|
+
variant: "body2",
|
|
916
|
+
sx: {
|
|
917
|
+
color: "#606062",
|
|
918
|
+
fontWeight: 500
|
|
919
|
+
},
|
|
920
|
+
children: item.volume
|
|
921
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
922
|
+
sx: {
|
|
923
|
+
bgcolor: item.color,
|
|
924
|
+
color: item.textColor,
|
|
925
|
+
px: 1,
|
|
926
|
+
py: 0.2,
|
|
927
|
+
borderRadius: 1,
|
|
928
|
+
fontSize: "12px",
|
|
929
|
+
fontWeight: 600,
|
|
930
|
+
minWidth: "30px",
|
|
931
|
+
textAlign: "center"
|
|
932
|
+
},
|
|
933
|
+
children: item.rank
|
|
934
|
+
})]
|
|
935
|
+
})]
|
|
936
|
+
}, index);
|
|
937
|
+
})
|
|
938
|
+
});
|
|
939
|
+
};
|
|
940
|
+
var GeographyCard = function GeographyCard() {
|
|
941
|
+
var data = [{
|
|
942
|
+
code: "GB",
|
|
943
|
+
country: "United Kingdom",
|
|
944
|
+
percentage: 60
|
|
945
|
+
}, {
|
|
946
|
+
code: "US",
|
|
947
|
+
country: "United States",
|
|
948
|
+
percentage: 14
|
|
949
|
+
}, {
|
|
950
|
+
code: "AU",
|
|
951
|
+
country: "Australia",
|
|
952
|
+
percentage: 8
|
|
953
|
+
}, {
|
|
954
|
+
code: "CA",
|
|
955
|
+
country: "Canada",
|
|
956
|
+
percentage: 6
|
|
957
|
+
}, {
|
|
958
|
+
code: "AE",
|
|
959
|
+
country: "UAE",
|
|
960
|
+
percentage: 4
|
|
961
|
+
}];
|
|
962
|
+
return /*#__PURE__*/jsxRuntime.jsx(CardWrapper, {
|
|
963
|
+
title: "Geography Insights",
|
|
964
|
+
children: data.map(function (item, index) {
|
|
965
|
+
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
966
|
+
sx: {
|
|
967
|
+
display: "flex",
|
|
968
|
+
alignItems: "center",
|
|
969
|
+
gap: 2
|
|
970
|
+
},
|
|
971
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
972
|
+
variant: "body2",
|
|
973
|
+
sx: {
|
|
974
|
+
fontWeight: 600,
|
|
975
|
+
color: "#606062",
|
|
976
|
+
minWidth: "25px"
|
|
977
|
+
},
|
|
978
|
+
children: item.code
|
|
979
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
980
|
+
variant: "body2",
|
|
981
|
+
sx: {
|
|
982
|
+
fontWeight: 500,
|
|
983
|
+
color: "#333",
|
|
984
|
+
minWidth: "120px",
|
|
985
|
+
textAlign: "left"
|
|
986
|
+
},
|
|
987
|
+
children: item.country
|
|
988
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
989
|
+
sx: {
|
|
990
|
+
flexGrow: 1,
|
|
991
|
+
mx: 2
|
|
992
|
+
},
|
|
993
|
+
children: /*#__PURE__*/jsxRuntime.jsx(material.LinearProgress, {
|
|
994
|
+
variant: "determinate",
|
|
995
|
+
value: item.percentage,
|
|
996
|
+
sx: {
|
|
997
|
+
height: 6,
|
|
998
|
+
borderRadius: 3,
|
|
999
|
+
bgcolor: "#F0F0F0",
|
|
1000
|
+
"& .MuiLinearProgress-bar": {
|
|
1001
|
+
bgcolor: "#3498DB",
|
|
1002
|
+
borderRadius: 3
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
})
|
|
1006
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Typography, {
|
|
1007
|
+
variant: "body2",
|
|
1008
|
+
sx: {
|
|
1009
|
+
fontWeight: 600,
|
|
1010
|
+
color: "#333",
|
|
1011
|
+
minWidth: "35px",
|
|
1012
|
+
textAlign: "right"
|
|
1013
|
+
},
|
|
1014
|
+
children: [item.percentage, "%"]
|
|
1015
|
+
})]
|
|
1016
|
+
}, index);
|
|
1017
|
+
})
|
|
1018
|
+
});
|
|
1019
|
+
};
|
|
1020
|
+
var TopCampaignsRaisedCard = function TopCampaignsRaisedCard() {
|
|
1021
|
+
var data = [{
|
|
1022
|
+
name: "Ramadan Week 3 Appeal",
|
|
1023
|
+
raised: "$1,210 raised",
|
|
1024
|
+
donors: "18 donors",
|
|
1025
|
+
badge: "4.1% CVR",
|
|
1026
|
+
color: "#E8F5E9",
|
|
1027
|
+
textColor: "#2E7D32"
|
|
1028
|
+
}, {
|
|
1029
|
+
name: "Zakat Due Reminder",
|
|
1030
|
+
raised: "$740 raised",
|
|
1031
|
+
donors: "8 donors",
|
|
1032
|
+
badge: "3.2% CVR",
|
|
1033
|
+
color: "#E8F5E9",
|
|
1034
|
+
textColor: "#2E7D32"
|
|
1035
|
+
}, {
|
|
1036
|
+
name: "Last 10 Nights Giving",
|
|
1037
|
+
raised: "$265 raised",
|
|
1038
|
+
donors: "3 donors",
|
|
1039
|
+
badge: "1.8% CVR",
|
|
1040
|
+
color: "#FFF3E0",
|
|
1041
|
+
textColor: "#ED6C02"
|
|
1042
|
+
}];
|
|
1043
|
+
return /*#__PURE__*/jsxRuntime.jsx(CardWrapper, {
|
|
1044
|
+
title: "Top Campaigns - Total Raised",
|
|
1045
|
+
children: data.map(function (item, index) {
|
|
1046
|
+
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
1047
|
+
sx: {
|
|
1048
|
+
display: "flex",
|
|
1049
|
+
flexDirection: "column",
|
|
1050
|
+
gap: 0.5
|
|
1051
|
+
},
|
|
1052
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
1053
|
+
variant: "body2",
|
|
1054
|
+
sx: {
|
|
1055
|
+
fontWeight: 600,
|
|
1056
|
+
color: "#333",
|
|
1057
|
+
textAlign: "left"
|
|
1058
|
+
},
|
|
1059
|
+
children: item.name
|
|
1060
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
1061
|
+
sx: {
|
|
1062
|
+
display: "flex",
|
|
1063
|
+
alignItems: "center",
|
|
1064
|
+
gap: 1.5
|
|
1065
|
+
},
|
|
1066
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
1067
|
+
variant: "caption",
|
|
1068
|
+
sx: {
|
|
1069
|
+
color: "#606062",
|
|
1070
|
+
fontWeight: 500
|
|
1071
|
+
},
|
|
1072
|
+
children: item.raised
|
|
1073
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
1074
|
+
variant: "caption",
|
|
1075
|
+
sx: {
|
|
1076
|
+
color: "#606062",
|
|
1077
|
+
fontWeight: 500
|
|
1078
|
+
},
|
|
1079
|
+
children: item.donors
|
|
1080
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
1081
|
+
sx: {
|
|
1082
|
+
bgcolor: item.color,
|
|
1083
|
+
color: item.textColor,
|
|
1084
|
+
px: 1,
|
|
1085
|
+
py: 0.2,
|
|
1086
|
+
borderRadius: 1,
|
|
1087
|
+
fontSize: "11px",
|
|
1088
|
+
fontWeight: 600
|
|
1089
|
+
},
|
|
1090
|
+
children: item.badge
|
|
1091
|
+
})]
|
|
1092
|
+
})]
|
|
1093
|
+
}, index);
|
|
1094
|
+
})
|
|
1095
|
+
});
|
|
1096
|
+
};
|
|
1097
|
+
var TopCampaignsCTRCard = function TopCampaignsCTRCard() {
|
|
1098
|
+
var data = [{
|
|
1099
|
+
name: "Ramadan Week 3 Appeal",
|
|
1100
|
+
ctr: "11.2% CTR",
|
|
1101
|
+
clicks: "480 clicks",
|
|
1102
|
+
badge: "34.8% OR",
|
|
1103
|
+
color: "#E8F5E9",
|
|
1104
|
+
textColor: "#2E7D32"
|
|
1105
|
+
}, {
|
|
1106
|
+
name: "Last 10 Nights Giving",
|
|
1107
|
+
ctr: "9.8% CTR",
|
|
1108
|
+
clicks: "410 clicks",
|
|
1109
|
+
badge: "38.1% OR",
|
|
1110
|
+
color: "#E8F5E9",
|
|
1111
|
+
textColor: "#2E7D32"
|
|
1112
|
+
}, {
|
|
1113
|
+
name: "Zakat Due Reminder",
|
|
1114
|
+
ctr: "6.4% CTR",
|
|
1115
|
+
clicks: "314 clicks",
|
|
1116
|
+
badge: "31.4% OR",
|
|
1117
|
+
color: "#FFF3E0",
|
|
1118
|
+
textColor: "#ED6C02"
|
|
1119
|
+
}];
|
|
1120
|
+
return /*#__PURE__*/jsxRuntime.jsx(CardWrapper, {
|
|
1121
|
+
title: "Top Campaigns - CTR",
|
|
1122
|
+
children: data.map(function (item, index) {
|
|
1123
|
+
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
1124
|
+
sx: {
|
|
1125
|
+
display: "flex",
|
|
1126
|
+
flexDirection: "column",
|
|
1127
|
+
gap: 0.5
|
|
1128
|
+
},
|
|
1129
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
1130
|
+
variant: "body2",
|
|
1131
|
+
sx: {
|
|
1132
|
+
fontWeight: 600,
|
|
1133
|
+
color: "#333",
|
|
1134
|
+
textAlign: "left"
|
|
1135
|
+
},
|
|
1136
|
+
children: item.name
|
|
1137
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
1138
|
+
sx: {
|
|
1139
|
+
display: "flex",
|
|
1140
|
+
alignItems: "center",
|
|
1141
|
+
gap: 1.5
|
|
1142
|
+
},
|
|
1143
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
1144
|
+
variant: "caption",
|
|
1145
|
+
sx: {
|
|
1146
|
+
color: "#606062",
|
|
1147
|
+
fontWeight: 500
|
|
1148
|
+
},
|
|
1149
|
+
children: item.ctr
|
|
1150
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
1151
|
+
variant: "caption",
|
|
1152
|
+
sx: {
|
|
1153
|
+
color: "#606062",
|
|
1154
|
+
fontWeight: 500
|
|
1155
|
+
},
|
|
1156
|
+
children: item.clicks
|
|
1157
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
1158
|
+
sx: {
|
|
1159
|
+
bgcolor: item.color,
|
|
1160
|
+
color: item.textColor,
|
|
1161
|
+
px: 1,
|
|
1162
|
+
py: 0.2,
|
|
1163
|
+
borderRadius: 1,
|
|
1164
|
+
fontSize: "11px",
|
|
1165
|
+
fontWeight: 600
|
|
1166
|
+
},
|
|
1167
|
+
children: item.badge
|
|
1168
|
+
})]
|
|
1169
|
+
})]
|
|
1170
|
+
}, index);
|
|
1171
|
+
})
|
|
1172
|
+
});
|
|
1173
|
+
};
|
|
1174
|
+
var TopCampaignsConvRateCard = function TopCampaignsConvRateCard() {
|
|
1175
|
+
var data = [{
|
|
1176
|
+
name: "Ramadan Week 3 Appeal",
|
|
1177
|
+
cvr: "4.1% CVR",
|
|
1178
|
+
raised: "$1,210 raised",
|
|
1179
|
+
badge: "$2.52 RPC",
|
|
1180
|
+
color: "#E8F5E9",
|
|
1181
|
+
textColor: "#2E7D32"
|
|
1182
|
+
}, {
|
|
1183
|
+
name: "Zakat Due Reminder",
|
|
1184
|
+
cvr: "3.2% CVR",
|
|
1185
|
+
raised: "$740 raised",
|
|
1186
|
+
badge: "$2.36 RPC",
|
|
1187
|
+
color: "#E8F5E9",
|
|
1188
|
+
textColor: "#2E7D32"
|
|
1189
|
+
}, {
|
|
1190
|
+
name: "Last 10 Nights Giving",
|
|
1191
|
+
cvr: "1.8% CVR",
|
|
1192
|
+
raised: "$265 raised",
|
|
1193
|
+
badge: "$0.65 RPC",
|
|
1194
|
+
color: "#FFF3E0",
|
|
1195
|
+
textColor: "#ED6C02"
|
|
1196
|
+
}];
|
|
1197
|
+
return /*#__PURE__*/jsxRuntime.jsx(CardWrapper, {
|
|
1198
|
+
title: "Top Campaigns - Conv. Rate",
|
|
1199
|
+
children: data.map(function (item, index) {
|
|
1200
|
+
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
1201
|
+
sx: {
|
|
1202
|
+
display: "flex",
|
|
1203
|
+
flexDirection: "column",
|
|
1204
|
+
gap: 0.5
|
|
1205
|
+
},
|
|
1206
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
1207
|
+
variant: "body2",
|
|
1208
|
+
sx: {
|
|
1209
|
+
fontWeight: 600,
|
|
1210
|
+
color: "#333",
|
|
1211
|
+
textAlign: "left"
|
|
1212
|
+
},
|
|
1213
|
+
children: item.name
|
|
1214
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
1215
|
+
sx: {
|
|
1216
|
+
display: "flex",
|
|
1217
|
+
alignItems: "center",
|
|
1218
|
+
gap: 1.5
|
|
1219
|
+
},
|
|
1220
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
1221
|
+
variant: "caption",
|
|
1222
|
+
sx: {
|
|
1223
|
+
color: "#606062",
|
|
1224
|
+
fontWeight: 500
|
|
1225
|
+
},
|
|
1226
|
+
children: item.cvr
|
|
1227
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
1228
|
+
variant: "caption",
|
|
1229
|
+
sx: {
|
|
1230
|
+
color: "#606062",
|
|
1231
|
+
fontWeight: 500
|
|
1232
|
+
},
|
|
1233
|
+
children: item.raised
|
|
1234
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
1235
|
+
sx: {
|
|
1236
|
+
bgcolor: item.color,
|
|
1237
|
+
color: item.textColor,
|
|
1238
|
+
px: 1,
|
|
1239
|
+
py: 0.2,
|
|
1240
|
+
borderRadius: 1,
|
|
1241
|
+
fontSize: "11px",
|
|
1242
|
+
fontWeight: 600
|
|
1243
|
+
},
|
|
1244
|
+
children: item.badge
|
|
1245
|
+
})]
|
|
1246
|
+
})]
|
|
1247
|
+
}, index);
|
|
1248
|
+
})
|
|
1249
|
+
});
|
|
1250
|
+
};
|
|
1251
|
+
|
|
747
1252
|
var OrganicSection = function OrganicSection(_ref) {
|
|
748
1253
|
var _ref$apiData = _ref.apiData,
|
|
749
1254
|
apiData = _ref$apiData === void 0 ? {} : _ref$apiData;
|
|
@@ -770,9 +1275,9 @@ var OrganicSection = function OrganicSection(_ref) {
|
|
|
770
1275
|
categories: categories
|
|
771
1276
|
};
|
|
772
1277
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
773
|
-
children: ["
|
|
1278
|
+
children: [" ", /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
774
1279
|
sx: {
|
|
775
|
-
display:
|
|
1280
|
+
display: "flex",
|
|
776
1281
|
gap: 2,
|
|
777
1282
|
mb: 5
|
|
778
1283
|
},
|
|
@@ -839,6 +1344,177 @@ var OrganicSection = function OrganicSection(_ref) {
|
|
|
839
1344
|
type: "donut",
|
|
840
1345
|
metric: "Revenue"
|
|
841
1346
|
})]
|
|
1347
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
|
|
1348
|
+
container: true,
|
|
1349
|
+
spacing: 3,
|
|
1350
|
+
sx: {
|
|
1351
|
+
mt: 4
|
|
1352
|
+
},
|
|
1353
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Grid, {
|
|
1354
|
+
item: true,
|
|
1355
|
+
xs: 12,
|
|
1356
|
+
md: 4,
|
|
1357
|
+
children: /*#__PURE__*/jsxRuntime.jsx(LandingPagesCard, {})
|
|
1358
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
|
|
1359
|
+
item: true,
|
|
1360
|
+
xs: 12,
|
|
1361
|
+
md: 4,
|
|
1362
|
+
children: /*#__PURE__*/jsxRuntime.jsx(KeywordsCard, {})
|
|
1363
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
|
|
1364
|
+
item: true,
|
|
1365
|
+
xs: 12,
|
|
1366
|
+
md: 4,
|
|
1367
|
+
children: /*#__PURE__*/jsxRuntime.jsx(GeographyCard, {})
|
|
1368
|
+
})]
|
|
1369
|
+
})]
|
|
1370
|
+
});
|
|
1371
|
+
};
|
|
1372
|
+
|
|
1373
|
+
var EmailSection = function EmailSection() {
|
|
1374
|
+
var categories = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
1375
|
+
var dailyPerformance = {
|
|
1376
|
+
label: "Clicks & Unique Clicks Trend",
|
|
1377
|
+
series: [{
|
|
1378
|
+
name: "Clicks",
|
|
1379
|
+
data: [3200, 4100, 2800, 5600, 4200, 6100, 7500]
|
|
1380
|
+
}, {
|
|
1381
|
+
name: "Unique Clicks",
|
|
1382
|
+
data: [800, 950, 700, 1100, 900, 1200, 1300]
|
|
1383
|
+
}],
|
|
1384
|
+
categories: categories
|
|
1385
|
+
};
|
|
1386
|
+
var spendAllocation = {
|
|
1387
|
+
label: "Bounce Rate Trend",
|
|
1388
|
+
data: [20, 25, 30, 35, 40, 45, 50],
|
|
1389
|
+
categories: categories
|
|
1390
|
+
};
|
|
1391
|
+
var roasTrend = {
|
|
1392
|
+
label: "Open Rate Trend",
|
|
1393
|
+
data: [20, 25, 30, 35, 40, 45, 50],
|
|
1394
|
+
categories: categories
|
|
1395
|
+
};
|
|
1396
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1397
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
1398
|
+
sx: {
|
|
1399
|
+
display: "flex",
|
|
1400
|
+
gap: 2,
|
|
1401
|
+
mb: 2
|
|
1402
|
+
},
|
|
1403
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DisplayCard, {
|
|
1404
|
+
title: "Open Rate",
|
|
1405
|
+
value: "32%",
|
|
1406
|
+
sx: {
|
|
1407
|
+
flex: 1
|
|
1408
|
+
}
|
|
1409
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DisplayCard, {
|
|
1410
|
+
title: "Bounce Rate",
|
|
1411
|
+
value: "1.8%",
|
|
1412
|
+
sx: {
|
|
1413
|
+
flex: 1
|
|
1414
|
+
}
|
|
1415
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DisplayCard, {
|
|
1416
|
+
title: "Clicks",
|
|
1417
|
+
value: "1,204",
|
|
1418
|
+
sx: {
|
|
1419
|
+
flex: 1
|
|
1420
|
+
}
|
|
1421
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DisplayCard, {
|
|
1422
|
+
title: "Unique Clicks",
|
|
1423
|
+
value: "987",
|
|
1424
|
+
sx: {
|
|
1425
|
+
flex: 1
|
|
1426
|
+
}
|
|
1427
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DisplayCard, {
|
|
1428
|
+
title: "CTR",
|
|
1429
|
+
value: "4.8%",
|
|
1430
|
+
sx: {
|
|
1431
|
+
flex: 1
|
|
1432
|
+
}
|
|
1433
|
+
})]
|
|
1434
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
1435
|
+
sx: {
|
|
1436
|
+
display: "flex",
|
|
1437
|
+
gap: 2
|
|
1438
|
+
},
|
|
1439
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DisplayCard, {
|
|
1440
|
+
title: "Donations",
|
|
1441
|
+
value: "29",
|
|
1442
|
+
sx: {
|
|
1443
|
+
flex: 1
|
|
1444
|
+
}
|
|
1445
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DisplayCard, {
|
|
1446
|
+
title: "CONV.Rate",
|
|
1447
|
+
value: "2.9%",
|
|
1448
|
+
sx: {
|
|
1449
|
+
flex: 1
|
|
1450
|
+
}
|
|
1451
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DisplayCard, {
|
|
1452
|
+
title: "RPC",
|
|
1453
|
+
value: "$1.84",
|
|
1454
|
+
sx: {
|
|
1455
|
+
flex: 1
|
|
1456
|
+
}
|
|
1457
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DisplayCard, {
|
|
1458
|
+
title: "TOTAL RAISED (EMAIL)",
|
|
1459
|
+
value: "$2,215",
|
|
1460
|
+
sx: {
|
|
1461
|
+
flex: 1
|
|
1462
|
+
}
|
|
1463
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DisplayCard, {
|
|
1464
|
+
title: "AVG DONATION",
|
|
1465
|
+
value: "$76.4",
|
|
1466
|
+
sx: {
|
|
1467
|
+
flex: 1
|
|
1468
|
+
}
|
|
1469
|
+
})]
|
|
1470
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
|
|
1471
|
+
container: true,
|
|
1472
|
+
spacing: 3,
|
|
1473
|
+
sx: {
|
|
1474
|
+
mt: 4
|
|
1475
|
+
},
|
|
1476
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(RenderChartCard, {
|
|
1477
|
+
item: roasTrend,
|
|
1478
|
+
index: 2,
|
|
1479
|
+
md: 4,
|
|
1480
|
+
type: "area",
|
|
1481
|
+
metric: "ROAS",
|
|
1482
|
+
isPrimary: true
|
|
1483
|
+
}), /*#__PURE__*/jsxRuntime.jsx(RenderChartCard, {
|
|
1484
|
+
item: dailyPerformance,
|
|
1485
|
+
index: 0,
|
|
1486
|
+
md: 4,
|
|
1487
|
+
type: "bar",
|
|
1488
|
+
metric: "Revenue"
|
|
1489
|
+
}), /*#__PURE__*/jsxRuntime.jsx(RenderChartCard, {
|
|
1490
|
+
item: spendAllocation,
|
|
1491
|
+
index: 1,
|
|
1492
|
+
md: 4,
|
|
1493
|
+
type: "area",
|
|
1494
|
+
metric: "Revenue"
|
|
1495
|
+
})]
|
|
1496
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
|
|
1497
|
+
container: true,
|
|
1498
|
+
spacing: 3,
|
|
1499
|
+
sx: {
|
|
1500
|
+
mt: 4
|
|
1501
|
+
},
|
|
1502
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Grid, {
|
|
1503
|
+
item: true,
|
|
1504
|
+
xs: 12,
|
|
1505
|
+
md: 4,
|
|
1506
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TopCampaignsRaisedCard, {})
|
|
1507
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
|
|
1508
|
+
item: true,
|
|
1509
|
+
xs: 12,
|
|
1510
|
+
md: 4,
|
|
1511
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TopCampaignsCTRCard, {})
|
|
1512
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
|
|
1513
|
+
item: true,
|
|
1514
|
+
xs: 12,
|
|
1515
|
+
md: 4,
|
|
1516
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TopCampaignsConvRateCard, {})
|
|
1517
|
+
})]
|
|
842
1518
|
})]
|
|
843
1519
|
});
|
|
844
1520
|
};
|
|
@@ -942,7 +1618,7 @@ var NewOverview = function NewOverview(_ref) {
|
|
|
942
1618
|
}) : categories;
|
|
943
1619
|
var primaryCharts = [{
|
|
944
1620
|
label: "Total Revenue",
|
|
945
|
-
value: totalRevData.length > 0 ? "$".concat(totalRevTotal.toLocaleString()) : typeof (apiData === null || apiData === void 0 ? void 0 : apiData.totalRevenue) ===
|
|
1621
|
+
value: totalRevData.length > 0 ? "$".concat(totalRevTotal.toLocaleString()) : typeof (apiData === null || apiData === void 0 ? void 0 : apiData.totalRevenue) === "string" ? apiData.totalRevenue : "$9,200.00",
|
|
946
1622
|
subValue: "Total Donations: ".concat((apiData === null || apiData === void 0 ? void 0 : apiData.totalDonations) || 215),
|
|
947
1623
|
data: totalRevValues,
|
|
948
1624
|
categories: totalRevCategories,
|
|
@@ -1090,9 +1766,9 @@ var NewOverview = function NewOverview(_ref) {
|
|
|
1090
1766
|
}), /*#__PURE__*/jsxRuntime.jsxs(React.Suspense, {
|
|
1091
1767
|
fallback: /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
1092
1768
|
sx: {
|
|
1093
|
-
display:
|
|
1094
|
-
justifyContent:
|
|
1095
|
-
alignItems:
|
|
1769
|
+
display: "flex",
|
|
1770
|
+
justifyContent: "center",
|
|
1771
|
+
alignItems: "center",
|
|
1096
1772
|
py: 10
|
|
1097
1773
|
},
|
|
1098
1774
|
children: /*#__PURE__*/jsxRuntime.jsx(material.CircularProgress, {
|
|
@@ -1118,7 +1794,7 @@ var NewOverview = function NewOverview(_ref) {
|
|
|
1118
1794
|
sx: {
|
|
1119
1795
|
p: 2
|
|
1120
1796
|
},
|
|
1121
|
-
children:
|
|
1797
|
+
children: /*#__PURE__*/jsxRuntime.jsx(EmailSection, {})
|
|
1122
1798
|
})]
|
|
1123
1799
|
})]
|
|
1124
1800
|
});
|
|
@@ -1131,14 +1807,26 @@ var index$5 = /*#__PURE__*/Object.freeze({
|
|
|
1131
1807
|
|
|
1132
1808
|
var PerformanceSection = function PerformanceSection(_ref) {
|
|
1133
1809
|
_ref.title;
|
|
1810
|
+
var _ref$performanceData = _ref.performanceData,
|
|
1811
|
+
performanceData = _ref$performanceData === void 0 ? {} : _ref$performanceData;
|
|
1134
1812
|
var revenueData = [3000, 4500, 4200, 5800, 5200, 7100, 8500, 9200, 5000];
|
|
1135
1813
|
var visitorsData = [100, 200, 150, 250, 300, 275, 325, 350, 280];
|
|
1136
1814
|
var categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep'];
|
|
1815
|
+
var revPerVisData = Array.isArray(performanceData === null || performanceData === void 0 ? void 0 : performanceData.revenuePerVisitor) ? performanceData.revenuePerVisitor : [];
|
|
1816
|
+
var revPerVisValues = revPerVisData.length > 0 ? revPerVisData.map(function (item) {
|
|
1817
|
+
return item.value;
|
|
1818
|
+
}) : revenueData;
|
|
1819
|
+
var revPerVisCategories = revPerVisData.length > 0 ? revPerVisData.map(function (item) {
|
|
1820
|
+
return item.date;
|
|
1821
|
+
}) : categories;
|
|
1822
|
+
var revPerVisTotal = revPerVisData.length > 0 ? revPerVisValues.reduce(function (sum, val) {
|
|
1823
|
+
return sum + val;
|
|
1824
|
+
}, 0) / revPerVisValues.length : 5.12;
|
|
1137
1825
|
var primaryCharts = [{
|
|
1138
1826
|
label: 'Revenue per Visitor',
|
|
1139
|
-
value: '$5.12',
|
|
1140
|
-
data:
|
|
1141
|
-
categories:
|
|
1827
|
+
value: performanceData !== null && performanceData !== void 0 && performanceData.revenuePerVisitor ? "$".concat(revPerVisTotal.toFixed(2)) : '$5.12',
|
|
1828
|
+
data: revPerVisValues,
|
|
1829
|
+
categories: revPerVisCategories
|
|
1142
1830
|
}, {
|
|
1143
1831
|
label: 'Visitors',
|
|
1144
1832
|
value: '1200',
|