@ammarkhalidfarooq/dashboard-package 0.4.45 → 0.4.47
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 +126 -165
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +126 -165
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -698,99 +698,6 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
698
698
|
});
|
|
699
699
|
};
|
|
700
700
|
|
|
701
|
-
var DisplayCard = function DisplayCard(_ref) {
|
|
702
|
-
var title = _ref.title,
|
|
703
|
-
value = _ref.value,
|
|
704
|
-
subValue = _ref.subValue,
|
|
705
|
-
Icon = _ref.icon,
|
|
706
|
-
onClick = _ref.onClick,
|
|
707
|
-
_ref$sx = _ref.sx,
|
|
708
|
-
sx = _ref$sx === void 0 ? {} : _ref$sx,
|
|
709
|
-
_ref$isActive = _ref.isActive,
|
|
710
|
-
isActive = _ref$isActive === void 0 ? false : _ref$isActive;
|
|
711
|
-
return /*#__PURE__*/jsxs(Box, {
|
|
712
|
-
onClick: onClick,
|
|
713
|
-
sx: _objectSpread2({
|
|
714
|
-
height: "100px",
|
|
715
|
-
borderRadius: "24px",
|
|
716
|
-
display: "flex",
|
|
717
|
-
justifyContent: "space-between",
|
|
718
|
-
alignItems: "center",
|
|
719
|
-
boxShadow: "rgba(0, 0, 0, 0.06) 0px 4px 15px 0px",
|
|
720
|
-
// boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
|
|
721
|
-
// padding: "16px 16px 16px 18px",
|
|
722
|
-
py: "10px",
|
|
723
|
-
px: "16px",
|
|
724
|
-
cursor: "pointer",
|
|
725
|
-
bgcolor: "#fff",
|
|
726
|
-
border: isActive ? "1px solid rgb(99, 99, 230)" : "none",
|
|
727
|
-
// border: "2px solid #f0f0f0",
|
|
728
|
-
transition: "all 0.3s ease"
|
|
729
|
-
}, sx),
|
|
730
|
-
children: [/*#__PURE__*/jsxs(Box, {
|
|
731
|
-
sx: {
|
|
732
|
-
display: "flex",
|
|
733
|
-
flexDirection: "column",
|
|
734
|
-
gap: 0.5
|
|
735
|
-
},
|
|
736
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
737
|
-
sx: {
|
|
738
|
-
fontWeight: "400",
|
|
739
|
-
color: isActive ? "#c1c1f5" : "#a1a1a8",
|
|
740
|
-
fontSize: "14px",
|
|
741
|
-
lineHeight: "16px",
|
|
742
|
-
textAlign: "left"
|
|
743
|
-
},
|
|
744
|
-
children: title
|
|
745
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
746
|
-
sx: {
|
|
747
|
-
lineHeight: "1.2",
|
|
748
|
-
textAlign: "left",
|
|
749
|
-
color: isActive ? "#6363e6" : "#000",
|
|
750
|
-
fontSize: "20px",
|
|
751
|
-
fontWeight: "700",
|
|
752
|
-
mb: 0.5
|
|
753
|
-
},
|
|
754
|
-
children: statusValue(value)
|
|
755
|
-
}), subValue && /*#__PURE__*/jsxs(Typography, {
|
|
756
|
-
sx: {
|
|
757
|
-
fontSize: "11px",
|
|
758
|
-
color: typeof subValue === "string" && (subValue.includes("%") || subValue.includes("new") || subValue.includes("x")) && !subValue.includes("/") && !subValue.includes("pass-through") ? "#22C55E" : "rgba(0, 0, 0, 0.4)",
|
|
759
|
-
fontWeight: "500",
|
|
760
|
-
display: "flex",
|
|
761
|
-
alignItems: "center",
|
|
762
|
-
gap: 0.5
|
|
763
|
-
},
|
|
764
|
-
children: [typeof subValue === "string" && (subValue.includes("%") || subValue.includes("new") || subValue.includes("x")) && !subValue.includes("/") && !subValue.includes("pass-through") && /*#__PURE__*/jsx("span", {
|
|
765
|
-
style: {
|
|
766
|
-
fontSize: "14px"
|
|
767
|
-
},
|
|
768
|
-
children: "\u25B2"
|
|
769
|
-
}), subValue]
|
|
770
|
-
})]
|
|
771
|
-
}), Icon && /*#__PURE__*/jsx(Box, {
|
|
772
|
-
sx: {
|
|
773
|
-
width: "44px",
|
|
774
|
-
height: "44px",
|
|
775
|
-
borderRadius: "50%",
|
|
776
|
-
backgroundColor: "#f7f7ff",
|
|
777
|
-
display: "flex",
|
|
778
|
-
alignItems: "center",
|
|
779
|
-
justifyContent: "center",
|
|
780
|
-
color: "rgb(99, 99, 230)"
|
|
781
|
-
},
|
|
782
|
-
children: /*#__PURE__*/jsx(Icon, {
|
|
783
|
-
sx: {
|
|
784
|
-
fontSize: "20px"
|
|
785
|
-
}
|
|
786
|
-
})
|
|
787
|
-
})]
|
|
788
|
-
});
|
|
789
|
-
};
|
|
790
|
-
var statusValue = function statusValue(value) {
|
|
791
|
-
return _typeof(value) === "object" && value !== null ? value.value !== undefined ? value.value : JSON.stringify(value) : value;
|
|
792
|
-
};
|
|
793
|
-
|
|
794
701
|
var OverallSection$2 = /*#__PURE__*/lazy(function () {
|
|
795
702
|
return Promise.resolve().then(function () { return OverallSection$1; });
|
|
796
703
|
});
|
|
@@ -6292,6 +6199,41 @@ var OrganicSection = function OrganicSection(_ref) {
|
|
|
6292
6199
|
error: false
|
|
6293
6200
|
}
|
|
6294
6201
|
};
|
|
6202
|
+
var renderCard = function renderCard(title) {
|
|
6203
|
+
return /*#__PURE__*/jsx(MetricCard
|
|
6204
|
+
// key={title}
|
|
6205
|
+
, {
|
|
6206
|
+
title: title,
|
|
6207
|
+
value: metricInfo[title].money ? metricInfo[title].value : metricInfo[title].value,
|
|
6208
|
+
caption: metricInfo[title].subValue,
|
|
6209
|
+
icon: metricInfo[title].icon,
|
|
6210
|
+
error: metricInfo[title].error,
|
|
6211
|
+
active: activeMetric === title,
|
|
6212
|
+
onClick: function onClick() {
|
|
6213
|
+
return setActiveMetric(title);
|
|
6214
|
+
},
|
|
6215
|
+
sx: metricInfo[title].error ? {
|
|
6216
|
+
border: "2px solid #ef4444",
|
|
6217
|
+
bgcolor: "#fffafa"
|
|
6218
|
+
} : {}
|
|
6219
|
+
})
|
|
6220
|
+
// <DisplayCard
|
|
6221
|
+
// key={title}
|
|
6222
|
+
// title={title}
|
|
6223
|
+
// value={metricInfo[title].value}
|
|
6224
|
+
// subValue={metricInfo[title].subValue}
|
|
6225
|
+
// icon={metricInfo[title].icon}
|
|
6226
|
+
// onClick={() => setActiveMetric(title)}
|
|
6227
|
+
// isActive={activeMetric === title}
|
|
6228
|
+
// sx={{
|
|
6229
|
+
// // border:
|
|
6230
|
+
// // activeMetric === title
|
|
6231
|
+
// // ? "2px solid rgb(99, 99, 230)"
|
|
6232
|
+
// // : "2px solid #f0f0f0",
|
|
6233
|
+
// }}
|
|
6234
|
+
// />
|
|
6235
|
+
;
|
|
6236
|
+
};
|
|
6295
6237
|
var selectedInfo = metricInfo[activeMetric];
|
|
6296
6238
|
var mainChart = {
|
|
6297
6239
|
label: activeMetric,
|
|
@@ -6303,47 +6245,17 @@ var OrganicSection = function OrganicSection(_ref) {
|
|
|
6303
6245
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
6304
6246
|
children: [/*#__PURE__*/jsx(Box, {
|
|
6305
6247
|
sx: {
|
|
6306
|
-
display: "
|
|
6248
|
+
display: "grid",
|
|
6249
|
+
gridTemplateColumns: {
|
|
6250
|
+
xs: "1fr",
|
|
6251
|
+
sm: "1fr 1fr",
|
|
6252
|
+
md: "1fr 1fr 1fr",
|
|
6253
|
+
lg: "repeat(6, 1fr)"
|
|
6254
|
+
},
|
|
6307
6255
|
gap: 2,
|
|
6308
|
-
mb:
|
|
6309
|
-
flexWrap: "wrap"
|
|
6256
|
+
mb: 1
|
|
6310
6257
|
},
|
|
6311
|
-
children: Object.keys(metricInfo).map(
|
|
6312
|
-
return /*#__PURE__*/jsx(MetricCard
|
|
6313
|
-
// key={title}
|
|
6314
|
-
, {
|
|
6315
|
-
title: title,
|
|
6316
|
-
value: metricInfo[title].money ? metricInfo[title].value : metricInfo[title].value,
|
|
6317
|
-
caption: metricInfo[title].subValue,
|
|
6318
|
-
icon: metricInfo[title].icon,
|
|
6319
|
-
error: metricInfo[title].error,
|
|
6320
|
-
active: activeMetric === title,
|
|
6321
|
-
onClick: function onClick() {
|
|
6322
|
-
return setActiveMetric(title);
|
|
6323
|
-
},
|
|
6324
|
-
sx: metricInfo[title].error ? {
|
|
6325
|
-
border: "2px solid #ef4444",
|
|
6326
|
-
bgcolor: "#fffafa"
|
|
6327
|
-
} : {}
|
|
6328
|
-
})
|
|
6329
|
-
// <DisplayCard
|
|
6330
|
-
// key={title}
|
|
6331
|
-
// title={title}
|
|
6332
|
-
// value={metricInfo[title].value}
|
|
6333
|
-
// subValue={metricInfo[title].subValue}
|
|
6334
|
-
// icon={metricInfo[title].icon}
|
|
6335
|
-
// onClick={() => setActiveMetric(title)}
|
|
6336
|
-
// isActive={activeMetric === title}
|
|
6337
|
-
// sx={{
|
|
6338
|
-
// flex: 1,
|
|
6339
|
-
// // border:
|
|
6340
|
-
// // activeMetric === title
|
|
6341
|
-
// // ? "2px solid rgb(99, 99, 230)"
|
|
6342
|
-
// // : "2px solid #f0f0f0",
|
|
6343
|
-
// }}
|
|
6344
|
-
// />
|
|
6345
|
-
;
|
|
6346
|
-
})
|
|
6258
|
+
children: Object.keys(metricInfo).map(renderCard)
|
|
6347
6259
|
}), /*#__PURE__*/jsxs(Grid, {
|
|
6348
6260
|
container: true,
|
|
6349
6261
|
spacing: 3,
|
|
@@ -6620,77 +6532,126 @@ var EmailTrendCard = function EmailTrendCard(_ref) {
|
|
|
6620
6532
|
var EmailSection = function EmailSection() {
|
|
6621
6533
|
var metricInfo = {
|
|
6622
6534
|
"Total raised": {
|
|
6623
|
-
value: "$
|
|
6535
|
+
value: "$".concat(formatNumber(48920)),
|
|
6624
6536
|
subValue: "12% vs last month",
|
|
6625
|
-
icon: PaidOutlined,
|
|
6626
|
-
data: [3200, 4100, 2800, 5600, 4200, 6100, 7500]
|
|
6537
|
+
icon: /*#__PURE__*/jsx(PaidOutlined, {}),
|
|
6538
|
+
data: [3200, 4100, 2800, 5600, 4200, 6100, 7500],
|
|
6539
|
+
money: true,
|
|
6540
|
+
error: false,
|
|
6541
|
+
warning: false
|
|
6627
6542
|
},
|
|
6628
6543
|
Donations: {
|
|
6629
6544
|
value: "62",
|
|
6630
6545
|
subValue: "12% vs last month",
|
|
6631
|
-
icon: FavoriteOutlined,
|
|
6632
|
-
data: [4, 8, 5, 12, 10, 11, 12]
|
|
6546
|
+
icon: /*#__PURE__*/jsx(FavoriteOutlined, {}),
|
|
6547
|
+
data: [4, 8, 5, 12, 10, 11, 12],
|
|
6548
|
+
money: false,
|
|
6549
|
+
error: false,
|
|
6550
|
+
warning: false
|
|
6633
6551
|
},
|
|
6634
6552
|
"Conversion rate": {
|
|
6635
6553
|
value: "3.2%",
|
|
6636
6554
|
subValue: "12% vs last month",
|
|
6637
|
-
icon: Adjust,
|
|
6638
|
-
data: [2.8, 3.1, 2.9, 3.4, 3.2, 3.1, 3.2]
|
|
6555
|
+
icon: /*#__PURE__*/jsx(Adjust, {}),
|
|
6556
|
+
data: [2.8, 3.1, 2.9, 3.4, 3.2, 3.1, 3.2],
|
|
6557
|
+
money: false,
|
|
6558
|
+
error: false,
|
|
6559
|
+
warning: false
|
|
6639
6560
|
},
|
|
6640
6561
|
CTR: {
|
|
6641
6562
|
value: "8.1%",
|
|
6642
6563
|
subValue: "12% vs last month",
|
|
6643
|
-
icon: NotInterested,
|
|
6644
|
-
data: [7.2, 8.4, 7.8, 8.9, 8.1, 8.0, 8.1]
|
|
6564
|
+
icon: /*#__PURE__*/jsx(NotInterested, {}),
|
|
6565
|
+
data: [7.2, 8.4, 7.8, 8.9, 8.1, 8.0, 8.1],
|
|
6566
|
+
money: false,
|
|
6567
|
+
error: false,
|
|
6568
|
+
warning: false
|
|
6645
6569
|
},
|
|
6646
6570
|
"Revenue per email": {
|
|
6647
|
-
value: "$2.45
|
|
6571
|
+
value: "$".concat(formatNumber(2.45)),
|
|
6648
6572
|
subValue: "12% vs last month",
|
|
6649
|
-
icon: IndeterminateCheckBoxOutlined,
|
|
6650
|
-
data: [2.1, 2.5, 2.3, 2.8, 2.4, 2.4, 2.45]
|
|
6573
|
+
icon: /*#__PURE__*/jsx(IndeterminateCheckBoxOutlined, {}),
|
|
6574
|
+
data: [2.1, 2.5, 2.3, 2.8, 2.4, 2.4, 2.45],
|
|
6575
|
+
money: true,
|
|
6576
|
+
error: false,
|
|
6577
|
+
warning: false
|
|
6651
6578
|
},
|
|
6652
6579
|
"Open rate": {
|
|
6653
6580
|
value: "42.3%",
|
|
6654
6581
|
subValue: "12% vs last month",
|
|
6655
|
-
icon: Email,
|
|
6656
|
-
data: [38, 44, 40, 46, 42, 41, 42.3]
|
|
6582
|
+
icon: /*#__PURE__*/jsx(Email, {}),
|
|
6583
|
+
data: [38, 44, 40, 46, 42, 41, 42.3],
|
|
6584
|
+
money: false,
|
|
6585
|
+
error: false,
|
|
6586
|
+
warning: false
|
|
6657
6587
|
},
|
|
6658
6588
|
Clicks: {
|
|
6659
6589
|
value: "1,612",
|
|
6660
6590
|
subValue: "12% vs last month",
|
|
6661
|
-
icon: NearMe,
|
|
6662
|
-
data: [210, 240, 220, 280, 250, 245, 245]
|
|
6591
|
+
icon: /*#__PURE__*/jsx(NearMe, {}),
|
|
6592
|
+
data: [210, 240, 220, 280, 250, 245, 245],
|
|
6593
|
+
money: false,
|
|
6594
|
+
error: false,
|
|
6595
|
+
warning: false
|
|
6663
6596
|
},
|
|
6664
6597
|
"Unique Clicks": {
|
|
6665
|
-
value: "
|
|
6598
|
+
value: "".concat(formatNumber(1148)),
|
|
6666
6599
|
subValue: "12% vs last month",
|
|
6667
|
-
icon: NearMe,
|
|
6668
|
-
data: [150, 180, 160, 210, 190, 185, 185]
|
|
6600
|
+
icon: /*#__PURE__*/jsx(NearMe, {}),
|
|
6601
|
+
data: [150, 180, 160, 210, 190, 185, 185],
|
|
6602
|
+
money: false,
|
|
6603
|
+
error: false,
|
|
6604
|
+
warning: false
|
|
6669
6605
|
},
|
|
6670
6606
|
"Bounce rate": {
|
|
6671
6607
|
value: "1.8%",
|
|
6672
6608
|
subValue: "12% vs last month",
|
|
6673
|
-
icon: HighlightOff,
|
|
6674
|
-
data: [2.1, 1.9, 1.8, 1.7, 1.8, 1.8, 1.8]
|
|
6609
|
+
icon: /*#__PURE__*/jsx(HighlightOff, {}),
|
|
6610
|
+
data: [2.1, 1.9, 1.8, 1.7, 1.8, 1.8, 1.8],
|
|
6611
|
+
money: false,
|
|
6612
|
+
error: false,
|
|
6613
|
+
warning: false
|
|
6675
6614
|
},
|
|
6676
6615
|
"Revenue per Click": {
|
|
6677
|
-
value: "$30.35
|
|
6616
|
+
value: "$".concat(formatNumber(30.35)),
|
|
6678
6617
|
subValue: "12% vs last month",
|
|
6679
|
-
icon: HighlightOff,
|
|
6680
|
-
data: [28, 32, 29, 34, 30, 30, 30.35]
|
|
6618
|
+
icon: /*#__PURE__*/jsx(HighlightOff, {}),
|
|
6619
|
+
data: [28, 32, 29, 34, 30, 30, 30.35],
|
|
6620
|
+
money: true,
|
|
6621
|
+
error: false,
|
|
6622
|
+
warning: false
|
|
6681
6623
|
}
|
|
6682
6624
|
};
|
|
6683
6625
|
var renderCard = function renderCard(title) {
|
|
6684
|
-
return /*#__PURE__*/jsx(
|
|
6626
|
+
return /*#__PURE__*/jsx(MetricCard
|
|
6627
|
+
// key={title}
|
|
6628
|
+
, {
|
|
6685
6629
|
title: title,
|
|
6686
|
-
value: metricInfo[title].value,
|
|
6687
|
-
|
|
6688
|
-
icon: metricInfo[title].icon
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6630
|
+
value: metricInfo[title].money ? metricInfo[title].value : metricInfo[title].value,
|
|
6631
|
+
caption: metricInfo[title].subValue,
|
|
6632
|
+
icon: metricInfo[title].icon,
|
|
6633
|
+
error: metricInfo[title].error,
|
|
6634
|
+
active: activeMetric === title,
|
|
6635
|
+
onClick: function onClick() {
|
|
6636
|
+
return setActiveMetric(title);
|
|
6637
|
+
},
|
|
6638
|
+
sx: metricInfo[title].error ? {
|
|
6639
|
+
border: "2px solid #ef4444",
|
|
6640
|
+
bgcolor: "#fffafa"
|
|
6641
|
+
} : {}
|
|
6642
|
+
})
|
|
6643
|
+
// <DisplayCard
|
|
6644
|
+
// key={title}
|
|
6645
|
+
// title={title}
|
|
6646
|
+
// value={metricInfo[title].value}
|
|
6647
|
+
// subValue={metricInfo[title].subValue}
|
|
6648
|
+
// icon={metricInfo[title].icon}
|
|
6649
|
+
// // onClick={() => setActiveMetric(title)}
|
|
6650
|
+
// // isActive={activeMetric === title}
|
|
6651
|
+
// sx={{
|
|
6652
|
+
// }}
|
|
6653
|
+
// />
|
|
6654
|
+
;
|
|
6694
6655
|
};
|
|
6695
6656
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
6696
6657
|
children: [/*#__PURE__*/jsx(Box, {
|