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