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