@ammarkhalidfarooq/dashboard-package 0.6.70 → 0.6.71
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 +87 -57
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +87 -57
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2844,6 +2844,23 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
2844
2844
|
emerald: "#10B981",
|
|
2845
2845
|
cyan: "#06B6D4"
|
|
2846
2846
|
};
|
|
2847
|
+
var revenueLegend = [{
|
|
2848
|
+
label: "Paid Ads",
|
|
2849
|
+
color: C.indigo
|
|
2850
|
+
}, {
|
|
2851
|
+
label: "Organic",
|
|
2852
|
+
color: C.emerald
|
|
2853
|
+
}, {
|
|
2854
|
+
label: "Email",
|
|
2855
|
+
color: C.cyan
|
|
2856
|
+
}];
|
|
2857
|
+
var revenueTrendText = mainChart.trend || "";
|
|
2858
|
+
var revenueTrendColor = getTrendColor(revenueTrendText, {
|
|
2859
|
+
up: "#054835ff",
|
|
2860
|
+
down: "#EF4444"
|
|
2861
|
+
});
|
|
2862
|
+
var revenueTrendBadgeBg = revenueTrendColor === "#EF4444" ? "#fee2e2" : "#8df3be9a";
|
|
2863
|
+
var revenueTrendArrow = getTrendArrow(revenueTrendText);
|
|
2847
2864
|
var headerProps = {
|
|
2848
2865
|
dateLabel: dateLabel,
|
|
2849
2866
|
generatedLabel: generatedLabel,
|
|
@@ -2943,77 +2960,90 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
2943
2960
|
display: "flex",
|
|
2944
2961
|
justifyContent: "space-between",
|
|
2945
2962
|
alignItems: "flex-start",
|
|
2946
|
-
marginBottom:
|
|
2963
|
+
marginBottom: 8
|
|
2947
2964
|
},
|
|
2948
2965
|
children: [/*#__PURE__*/jsxs("div", {
|
|
2949
2966
|
children: [/*#__PURE__*/jsx("div", {
|
|
2950
2967
|
style: {
|
|
2951
2968
|
fontSize: 13,
|
|
2952
2969
|
fontWeight: 700,
|
|
2953
|
-
color: "#111827"
|
|
2970
|
+
color: "#111827",
|
|
2971
|
+
lineHeight: 1.15
|
|
2954
2972
|
},
|
|
2955
2973
|
children: "Total revenue trend"
|
|
2956
2974
|
}), /*#__PURE__*/jsxs("div", {
|
|
2957
2975
|
style: {
|
|
2958
2976
|
fontSize: 9.5,
|
|
2959
|
-
color: "
|
|
2960
|
-
marginTop:
|
|
2977
|
+
color: "rgba(0, 0, 0, 0.4)",
|
|
2978
|
+
marginTop: 2,
|
|
2979
|
+
lineHeight: 1.15
|
|
2961
2980
|
},
|
|
2962
2981
|
children: ["Last ", daysLabel, " \xB7 daily aggregation"]
|
|
2963
|
-
})
|
|
2964
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
2965
|
-
style: {
|
|
2966
|
-
textAlign: "right"
|
|
2967
|
-
},
|
|
2968
|
-
children: [/*#__PURE__*/jsx("span", {
|
|
2969
|
-
style: {
|
|
2970
|
-
fontSize: 15,
|
|
2971
|
-
fontWeight: 800,
|
|
2972
|
-
color: "#111827"
|
|
2973
|
-
},
|
|
2974
|
-
children: kpi$(totalRaised)
|
|
2975
|
-
}), /*#__PURE__*/jsx("span", {
|
|
2976
|
-
style: {
|
|
2977
|
-
marginLeft: 8,
|
|
2978
|
-
fontSize: 10.5
|
|
2979
|
-
},
|
|
2980
|
-
children: /*#__PURE__*/jsx(TrendText, {
|
|
2981
|
-
children: mainChart.trend
|
|
2982
|
-
})
|
|
2983
|
-
})]
|
|
2984
|
-
})]
|
|
2985
|
-
}), /*#__PURE__*/jsx("div", {
|
|
2986
|
-
style: {
|
|
2987
|
-
display: "flex",
|
|
2988
|
-
gap: 14,
|
|
2989
|
-
marginBottom: 6
|
|
2990
|
-
},
|
|
2991
|
-
children: [["Email", C.cyan], ["Organic", C.emerald], ["Paid Ads", C.indigo]].map(function (_ref15) {
|
|
2992
|
-
var _ref16 = _slicedToArray(_ref15, 2),
|
|
2993
|
-
name = _ref16[0],
|
|
2994
|
-
color = _ref16[1];
|
|
2995
|
-
return /*#__PURE__*/jsxs("div", {
|
|
2982
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
2996
2983
|
style: {
|
|
2997
2984
|
display: "flex",
|
|
2998
2985
|
alignItems: "center",
|
|
2999
|
-
gap:
|
|
2986
|
+
gap: 6,
|
|
2987
|
+
marginTop: 8
|
|
3000
2988
|
},
|
|
3001
|
-
children: [/*#__PURE__*/jsx("
|
|
2989
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
3002
2990
|
style: {
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
}), /*#__PURE__*/
|
|
2991
|
+
fontSize: 22,
|
|
2992
|
+
fontWeight: 700,
|
|
2993
|
+
color: "#111827"
|
|
2994
|
+
},
|
|
2995
|
+
children: kpi$(totalRaised)
|
|
2996
|
+
}), revenueTrendText && /*#__PURE__*/jsxs("span", {
|
|
3009
2997
|
style: {
|
|
2998
|
+
display: "inline-flex",
|
|
2999
|
+
alignItems: "center",
|
|
3000
|
+
gap: 3,
|
|
3001
|
+
background: revenueTrendBadgeBg,
|
|
3002
|
+
color: revenueTrendColor,
|
|
3003
|
+
padding: "2px 8px",
|
|
3004
|
+
borderRadius: 100,
|
|
3010
3005
|
fontSize: 9.5,
|
|
3011
|
-
|
|
3006
|
+
fontWeight: 600
|
|
3012
3007
|
},
|
|
3013
|
-
children:
|
|
3008
|
+
children: [revenueTrendArrow && /*#__PURE__*/jsx("span", {
|
|
3009
|
+
children: revenueTrendArrow
|
|
3010
|
+
}), revenueTrendText]
|
|
3014
3011
|
})]
|
|
3015
|
-
}
|
|
3016
|
-
})
|
|
3012
|
+
})]
|
|
3013
|
+
}), revSeries.length > 0 && /*#__PURE__*/jsx("div", {
|
|
3014
|
+
style: {
|
|
3015
|
+
display: "flex",
|
|
3016
|
+
gap: 10,
|
|
3017
|
+
alignItems: "center",
|
|
3018
|
+
flexShrink: 0,
|
|
3019
|
+
paddingTop: 2
|
|
3020
|
+
},
|
|
3021
|
+
children: revenueLegend.map(function (leg) {
|
|
3022
|
+
return /*#__PURE__*/jsxs("div", {
|
|
3023
|
+
style: {
|
|
3024
|
+
display: "flex",
|
|
3025
|
+
alignItems: "center",
|
|
3026
|
+
gap: 4
|
|
3027
|
+
},
|
|
3028
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
3029
|
+
style: {
|
|
3030
|
+
width: 8,
|
|
3031
|
+
height: 8,
|
|
3032
|
+
borderRadius: "50%",
|
|
3033
|
+
background: leg.color,
|
|
3034
|
+
flexShrink: 0
|
|
3035
|
+
}
|
|
3036
|
+
}), /*#__PURE__*/jsx("span", {
|
|
3037
|
+
style: {
|
|
3038
|
+
fontSize: 9.5,
|
|
3039
|
+
color: "rgba(0, 0, 0, 0.6)",
|
|
3040
|
+
fontWeight: 500
|
|
3041
|
+
},
|
|
3042
|
+
children: leg.label
|
|
3043
|
+
})]
|
|
3044
|
+
}, leg.label);
|
|
3045
|
+
})
|
|
3046
|
+
})]
|
|
3017
3047
|
}), /*#__PURE__*/jsx("div", {
|
|
3018
3048
|
style: {
|
|
3019
3049
|
width: "100%",
|
|
@@ -3348,10 +3378,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
3348
3378
|
display: "flex",
|
|
3349
3379
|
gap: 12
|
|
3350
3380
|
},
|
|
3351
|
-
children: [["Avg/day", d$((ob === null || ob === void 0 ? void 0 : ob.averagePerDay) || 0)], ["Peak day", d$((ob === null || ob === void 0 || (_ob$peakDay = ob.peakDay) === null || _ob$peakDay === void 0 ? void 0 : _ob$peakDay.amount) || 0)], ["Orders", formatNumber((ob === null || ob === void 0 ? void 0 : ob.totalOrders) || 0)]].map(function (
|
|
3352
|
-
var
|
|
3353
|
-
l =
|
|
3354
|
-
v =
|
|
3381
|
+
children: [["Avg/day", d$((ob === null || ob === void 0 ? void 0 : ob.averagePerDay) || 0)], ["Peak day", d$((ob === null || ob === void 0 || (_ob$peakDay = ob.peakDay) === null || _ob$peakDay === void 0 ? void 0 : _ob$peakDay.amount) || 0)], ["Orders", formatNumber((ob === null || ob === void 0 ? void 0 : ob.totalOrders) || 0)]].map(function (_ref15) {
|
|
3382
|
+
var _ref16 = _slicedToArray(_ref15, 2),
|
|
3383
|
+
l = _ref16[0],
|
|
3384
|
+
v = _ref16[1];
|
|
3355
3385
|
return /*#__PURE__*/jsxs("div", {
|
|
3356
3386
|
children: [/*#__PURE__*/jsx("div", {
|
|
3357
3387
|
style: {
|
|
@@ -3424,10 +3454,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
3424
3454
|
display: "flex",
|
|
3425
3455
|
gap: 12
|
|
3426
3456
|
},
|
|
3427
|
-
children: [["Referrers", formatNumber((refCard === null || refCard === void 0 ? void 0 : refCard.totalReferrers) || 0)], ["Avg gift", d$((refCard === null || refCard === void 0 ? void 0 : refCard.averageGift) || 0)], ["Conv. rate", pct((refCard === null || refCard === void 0 ? void 0 : refCard.conversionRate) || 0, 1)]].map(function (
|
|
3428
|
-
var
|
|
3429
|
-
l =
|
|
3430
|
-
v =
|
|
3457
|
+
children: [["Referrers", formatNumber((refCard === null || refCard === void 0 ? void 0 : refCard.totalReferrers) || 0)], ["Avg gift", d$((refCard === null || refCard === void 0 ? void 0 : refCard.averageGift) || 0)], ["Conv. rate", pct((refCard === null || refCard === void 0 ? void 0 : refCard.conversionRate) || 0, 1)]].map(function (_ref17) {
|
|
3458
|
+
var _ref18 = _slicedToArray(_ref17, 2),
|
|
3459
|
+
l = _ref18[0],
|
|
3460
|
+
v = _ref18[1];
|
|
3431
3461
|
return /*#__PURE__*/jsxs("div", {
|
|
3432
3462
|
children: [/*#__PURE__*/jsx("div", {
|
|
3433
3463
|
style: {
|