@ammarkhalidfarooq/dashboard-package 0.6.92 → 0.6.93
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 +502 -247
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +502 -247
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1749,18 +1749,19 @@ var W = 794;
|
|
|
1749
1749
|
var MIN_H = 1123;
|
|
1750
1750
|
var MX = 32; // horizontal margin
|
|
1751
1751
|
var THEME = {
|
|
1752
|
-
pageBg: "#
|
|
1752
|
+
pageBg: "#F9FAFB",
|
|
1753
1753
|
panelBg: "#FFFFFF",
|
|
1754
|
-
panelBorder: "#
|
|
1755
|
-
|
|
1754
|
+
panelBorder: "#E5E7EB",
|
|
1755
|
+
brand: "#6366F1",
|
|
1756
1756
|
kpiBorderPrimary: "#C7D2FE",
|
|
1757
|
-
kpiBgSecondary: "#F8FAFF",
|
|
1758
|
-
kpiBorderSecondary: "#DDE3EA",
|
|
1759
1757
|
tableHeadBg: "#EEF2FF",
|
|
1760
1758
|
tableAltBg: "#F8FAFF",
|
|
1761
|
-
muted: "#
|
|
1762
|
-
text: "#111827"
|
|
1759
|
+
muted: "#9CA3AF",
|
|
1760
|
+
text: "#111827",
|
|
1761
|
+
trendUpBg: "#D1FAE5",
|
|
1762
|
+
trendUpText: "#059669"
|
|
1763
1763
|
};
|
|
1764
|
+
var BULLET = " · ";
|
|
1764
1765
|
|
|
1765
1766
|
// ─── Number helpers ───────────────────────────────────────────────────────────
|
|
1766
1767
|
var d$ = function d$(v) {
|
|
@@ -1773,7 +1774,7 @@ var kpiPct = function kpiPct(v) {
|
|
|
1773
1774
|
return "".concat(formatNumber(Number(v !== null && v !== void 0 ? v : 0).toFixed(2)), "%");
|
|
1774
1775
|
};
|
|
1775
1776
|
var kpiRoas = function kpiRoas(v) {
|
|
1776
|
-
return "".concat(
|
|
1777
|
+
return "".concat(Number(v !== null && v !== void 0 ? v : 0).toFixed(1), "\xD7");
|
|
1777
1778
|
};
|
|
1778
1779
|
var d$Compact = function d$Compact(v) {
|
|
1779
1780
|
var n = Number(v !== null && v !== void 0 ? v : 0);
|
|
@@ -1785,11 +1786,6 @@ var pct = function pct(v) {
|
|
|
1785
1786
|
var dp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
1786
1787
|
return "".concat(Number(v !== null && v !== void 0 ? v : 0).toFixed(dp), "%");
|
|
1787
1788
|
};
|
|
1788
|
-
var signed = function signed(v) {
|
|
1789
|
-
var suffix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "%";
|
|
1790
|
-
var n = Number(v !== null && v !== void 0 ? v : 0);
|
|
1791
|
-
return "".concat(n >= 0 ? "+" : "").concat(n.toFixed(2)).concat(suffix);
|
|
1792
|
-
};
|
|
1793
1789
|
var TREND_UP = "#0B8F61";
|
|
1794
1790
|
var TREND_DOWN = "#ef4444";
|
|
1795
1791
|
var resolveTrendColor = function resolveTrendColor(trendText) {
|
|
@@ -2597,70 +2593,302 @@ var AcceptanceRaisedPanel = function AcceptanceRaisedPanel(_ref10) {
|
|
|
2597
2593
|
})
|
|
2598
2594
|
});
|
|
2599
2595
|
};
|
|
2600
|
-
var
|
|
2601
|
-
var
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2596
|
+
var TrendPill$1 = function TrendPill(_ref12) {
|
|
2597
|
+
var children = _ref12.children,
|
|
2598
|
+
_ref12$positive = _ref12.positive,
|
|
2599
|
+
positive = _ref12$positive === void 0 ? true : _ref12$positive;
|
|
2600
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2601
|
+
style: {
|
|
2602
|
+
display: "inline-flex",
|
|
2603
|
+
alignItems: "center",
|
|
2604
|
+
background: positive ? THEME.trendUpBg : "#FEE2E2",
|
|
2605
|
+
color: positive ? THEME.trendUpText : "#DC2626",
|
|
2606
|
+
padding: "3px 10px",
|
|
2607
|
+
borderRadius: 100,
|
|
2608
|
+
fontSize: 9,
|
|
2609
|
+
fontWeight: 600,
|
|
2610
|
+
whiteSpace: "nowrap",
|
|
2611
|
+
lineHeight: 1.35
|
|
2612
|
+
},
|
|
2613
|
+
children: children
|
|
2614
|
+
});
|
|
2615
|
+
};
|
|
2616
|
+
var isTrendPositive = function isTrendPositive(trendText) {
|
|
2617
|
+
var invert = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
2618
|
+
var n = Number(String(trendText !== null && trendText !== void 0 ? trendText : "").replace(/[^0-9.\-+]/g, ""));
|
|
2619
|
+
if (Number.isNaN(n)) return true;
|
|
2620
|
+
return invert ? n <= 0 : n >= 0;
|
|
2621
|
+
};
|
|
2622
|
+
var PageOneHeader = function PageOneHeader(_ref13) {
|
|
2623
|
+
var dateLabel = _ref13.dateLabel,
|
|
2624
|
+
generatedLabel = _ref13.generatedLabel,
|
|
2625
|
+
windowLabel = _ref13.windowLabel;
|
|
2626
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2627
|
+
style: {
|
|
2628
|
+
padding: "36px ".concat(MX, "px 0"),
|
|
2629
|
+
flexShrink: 0
|
|
2630
|
+
},
|
|
2631
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2632
|
+
style: {
|
|
2633
|
+
display: "flex",
|
|
2634
|
+
justifyContent: "space-between",
|
|
2635
|
+
alignItems: "flex-start"
|
|
2636
|
+
},
|
|
2637
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2638
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2639
|
+
style: {
|
|
2640
|
+
fontSize: 22,
|
|
2641
|
+
fontWeight: 700,
|
|
2642
|
+
color: THEME.brand,
|
|
2643
|
+
letterSpacing: "-0.3px",
|
|
2644
|
+
lineHeight: 1.1
|
|
2645
|
+
},
|
|
2646
|
+
children: "Madinah"
|
|
2647
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2648
|
+
style: {
|
|
2649
|
+
fontSize: 9,
|
|
2650
|
+
fontWeight: 600,
|
|
2651
|
+
letterSpacing: "1.2px",
|
|
2652
|
+
color: THEME.muted,
|
|
2653
|
+
textTransform: "uppercase",
|
|
2654
|
+
marginTop: 3
|
|
2655
|
+
},
|
|
2656
|
+
children: "Performance Report"
|
|
2657
|
+
})]
|
|
2658
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2659
|
+
style: {
|
|
2660
|
+
textAlign: "right"
|
|
2661
|
+
},
|
|
2662
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2663
|
+
style: {
|
|
2664
|
+
fontSize: 11,
|
|
2665
|
+
color: "#6B7280",
|
|
2666
|
+
lineHeight: 1.2
|
|
2667
|
+
},
|
|
2668
|
+
children: "Dashboard overview \u2014 Overall"
|
|
2669
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2670
|
+
style: {
|
|
2671
|
+
fontSize: 18,
|
|
2672
|
+
fontWeight: 700,
|
|
2673
|
+
color: THEME.text,
|
|
2674
|
+
marginTop: 4,
|
|
2675
|
+
lineHeight: 1.15
|
|
2676
|
+
},
|
|
2677
|
+
children: dateLabel
|
|
2678
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2679
|
+
style: {
|
|
2680
|
+
fontSize: 9,
|
|
2681
|
+
color: THEME.muted,
|
|
2682
|
+
marginTop: 3,
|
|
2683
|
+
lineHeight: 1.35
|
|
2684
|
+
},
|
|
2685
|
+
children: [windowLabel, BULLET, "Generated ", generatedLabel]
|
|
2686
|
+
})]
|
|
2687
|
+
})]
|
|
2688
|
+
})
|
|
2689
|
+
});
|
|
2690
|
+
};
|
|
2691
|
+
var ActiveFiltersBar = function ActiveFiltersBar(_ref14) {
|
|
2692
|
+
var _ref14$pills = _ref14.pills,
|
|
2693
|
+
pills = _ref14$pills === void 0 ? [] : _ref14$pills;
|
|
2694
|
+
if (!pills.length) return null;
|
|
2611
2695
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2612
2696
|
style: {
|
|
2613
|
-
border: "1px solid ".concat(isPrimary ? THEME.kpiBorderPrimary : THEME.kpiBorderSecondary),
|
|
2614
|
-
borderRadius: 8,
|
|
2615
|
-
padding: "10px 12px 9px",
|
|
2616
|
-
background: isPrimary ? THEME.kpiBgPrimary : THEME.kpiBgSecondary,
|
|
2617
|
-
width: "100%",
|
|
2618
|
-
minWidth: 0,
|
|
2619
|
-
boxSizing: "border-box",
|
|
2620
2697
|
display: "flex",
|
|
2621
|
-
|
|
2622
|
-
|
|
2698
|
+
alignItems: "center",
|
|
2699
|
+
flexWrap: "wrap",
|
|
2700
|
+
gap: 8,
|
|
2701
|
+
background: "#EEF2FF",
|
|
2702
|
+
borderRadius: 10,
|
|
2703
|
+
padding: "10px 14px",
|
|
2704
|
+
marginTop: 18
|
|
2623
2705
|
},
|
|
2624
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("
|
|
2706
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2625
2707
|
style: {
|
|
2626
2708
|
fontSize: 8,
|
|
2627
2709
|
fontWeight: 700,
|
|
2628
|
-
letterSpacing: "0.
|
|
2629
|
-
color:
|
|
2710
|
+
letterSpacing: "0.8px",
|
|
2711
|
+
color: THEME.muted,
|
|
2712
|
+
textTransform: "uppercase",
|
|
2713
|
+
flexShrink: 0
|
|
2630
2714
|
},
|
|
2631
|
-
children:
|
|
2715
|
+
children: "Active Filters"
|
|
2716
|
+
}), pills.map(function (pill, i) {
|
|
2717
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2718
|
+
style: {
|
|
2719
|
+
display: "inline-flex",
|
|
2720
|
+
alignItems: "center",
|
|
2721
|
+
background: "#FFFFFF",
|
|
2722
|
+
border: "1px solid ".concat(THEME.kpiBorderPrimary),
|
|
2723
|
+
borderRadius: 100,
|
|
2724
|
+
padding: "4px 11px",
|
|
2725
|
+
fontSize: 9,
|
|
2726
|
+
fontWeight: 500,
|
|
2727
|
+
color: THEME.brand,
|
|
2728
|
+
lineHeight: 1.3
|
|
2729
|
+
},
|
|
2730
|
+
children: pill
|
|
2731
|
+
}, i);
|
|
2732
|
+
})]
|
|
2733
|
+
});
|
|
2734
|
+
};
|
|
2735
|
+
var HeroRaisedCard = function HeroRaisedCard(_ref15) {
|
|
2736
|
+
var value = _ref15.value,
|
|
2737
|
+
trend = _ref15.trend,
|
|
2738
|
+
detail = _ref15.detail;
|
|
2739
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2740
|
+
style: {
|
|
2741
|
+
display: "flex",
|
|
2742
|
+
background: "#FFFFFF",
|
|
2743
|
+
border: "1px solid ".concat(THEME.panelBorder),
|
|
2744
|
+
borderRadius: 12,
|
|
2745
|
+
overflow: "hidden",
|
|
2746
|
+
boxSizing: "border-box"
|
|
2747
|
+
},
|
|
2748
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2749
|
+
style: {
|
|
2750
|
+
width: 5,
|
|
2751
|
+
flexShrink: 0,
|
|
2752
|
+
background: THEME.brand
|
|
2753
|
+
}
|
|
2754
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2755
|
+
style: {
|
|
2756
|
+
flex: 1,
|
|
2757
|
+
padding: "16px 18px 14px"
|
|
2758
|
+
},
|
|
2759
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2760
|
+
style: {
|
|
2761
|
+
fontSize: 9,
|
|
2762
|
+
fontWeight: 700,
|
|
2763
|
+
letterSpacing: "0.8px",
|
|
2764
|
+
color: THEME.brand,
|
|
2765
|
+
textTransform: "uppercase"
|
|
2766
|
+
},
|
|
2767
|
+
children: "Total Raised"
|
|
2768
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2769
|
+
style: {
|
|
2770
|
+
display: "flex",
|
|
2771
|
+
alignItems: "center",
|
|
2772
|
+
gap: 10,
|
|
2773
|
+
marginTop: 6,
|
|
2774
|
+
flexWrap: "wrap"
|
|
2775
|
+
},
|
|
2776
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2777
|
+
style: {
|
|
2778
|
+
fontSize: 28,
|
|
2779
|
+
fontWeight: 700,
|
|
2780
|
+
color: THEME.text,
|
|
2781
|
+
lineHeight: 1.05,
|
|
2782
|
+
letterSpacing: "-0.5px"
|
|
2783
|
+
},
|
|
2784
|
+
children: value
|
|
2785
|
+
}), trend && /*#__PURE__*/jsxRuntime.jsx(TrendPill$1, {
|
|
2786
|
+
positive: isTrendPositive(trend),
|
|
2787
|
+
children: trend
|
|
2788
|
+
})]
|
|
2789
|
+
}), detail && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2790
|
+
style: {
|
|
2791
|
+
fontSize: 9,
|
|
2792
|
+
color: THEME.muted,
|
|
2793
|
+
marginTop: 8,
|
|
2794
|
+
lineHeight: 1.4
|
|
2795
|
+
},
|
|
2796
|
+
children: detail
|
|
2797
|
+
})]
|
|
2798
|
+
})]
|
|
2799
|
+
});
|
|
2800
|
+
};
|
|
2801
|
+
var MetricGridCard = function MetricGridCard(_ref16) {
|
|
2802
|
+
var title = _ref16.title,
|
|
2803
|
+
value = _ref16.value,
|
|
2804
|
+
trend = _ref16.trend,
|
|
2805
|
+
detail = _ref16.detail,
|
|
2806
|
+
_ref16$trendPositiveW = _ref16.trendPositiveWhenNegative,
|
|
2807
|
+
trendPositiveWhenNegative = _ref16$trendPositiveW === void 0 ? false : _ref16$trendPositiveW;
|
|
2808
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2809
|
+
style: {
|
|
2810
|
+
position: "relative",
|
|
2811
|
+
background: "#FFFFFF",
|
|
2812
|
+
border: "1px solid ".concat(THEME.panelBorder),
|
|
2813
|
+
borderRadius: 12,
|
|
2814
|
+
padding: "12px 14px 11px",
|
|
2815
|
+
boxSizing: "border-box",
|
|
2816
|
+
minWidth: 0
|
|
2817
|
+
},
|
|
2818
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2819
|
+
style: {
|
|
2820
|
+
display: "flex",
|
|
2821
|
+
justifyContent: "space-between",
|
|
2822
|
+
alignItems: "flex-start",
|
|
2823
|
+
gap: 6
|
|
2824
|
+
},
|
|
2825
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2826
|
+
style: {
|
|
2827
|
+
fontSize: 8,
|
|
2828
|
+
fontWeight: 700,
|
|
2829
|
+
letterSpacing: "0.7px",
|
|
2830
|
+
color: THEME.muted,
|
|
2831
|
+
textTransform: "uppercase",
|
|
2832
|
+
lineHeight: 1.2
|
|
2833
|
+
},
|
|
2834
|
+
children: title
|
|
2835
|
+
}), trend && /*#__PURE__*/jsxRuntime.jsx(TrendPill$1, {
|
|
2836
|
+
positive: isTrendPositive(trend, trendPositiveWhenNegative),
|
|
2837
|
+
children: trend
|
|
2838
|
+
})]
|
|
2632
2839
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2633
2840
|
style: {
|
|
2634
|
-
fontSize:
|
|
2635
|
-
fontWeight:
|
|
2841
|
+
fontSize: 20,
|
|
2842
|
+
fontWeight: 700,
|
|
2636
2843
|
color: THEME.text,
|
|
2637
2844
|
lineHeight: 1.1,
|
|
2638
|
-
marginTop:
|
|
2845
|
+
marginTop: 10
|
|
2639
2846
|
},
|
|
2640
2847
|
children: value
|
|
2641
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2642
|
-
style: {
|
|
2643
|
-
fontSize: 10.5,
|
|
2644
|
-
fontWeight: 600,
|
|
2645
|
-
color: resolveTrendColor(displayTrend, trendPositiveWhenNegative)
|
|
2646
|
-
},
|
|
2647
|
-
children: displayTrend
|
|
2648
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2848
|
+
}), detail && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2649
2849
|
style: {
|
|
2650
2850
|
fontSize: 8.5,
|
|
2651
2851
|
color: THEME.muted,
|
|
2652
|
-
|
|
2852
|
+
marginTop: 5,
|
|
2853
|
+
lineHeight: 1.35
|
|
2653
2854
|
},
|
|
2654
2855
|
children: detail
|
|
2655
2856
|
})]
|
|
2656
2857
|
});
|
|
2657
2858
|
};
|
|
2658
|
-
var
|
|
2659
|
-
var
|
|
2660
|
-
generatedLabel =
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2859
|
+
var PageOneFooter = function PageOneFooter(_ref17) {
|
|
2860
|
+
var generatedBy = _ref17.generatedBy,
|
|
2861
|
+
generatedLabel = _ref17.generatedLabel;
|
|
2862
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2863
|
+
style: {
|
|
2864
|
+
padding: "14px ".concat(MX, "px 28px"),
|
|
2865
|
+
borderTop: "1px solid ".concat(THEME.panelBorder),
|
|
2866
|
+
marginTop: "auto",
|
|
2867
|
+
flexShrink: 0
|
|
2868
|
+
},
|
|
2869
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2870
|
+
style: {
|
|
2871
|
+
display: "flex",
|
|
2872
|
+
justifyContent: "space-between",
|
|
2873
|
+
alignItems: "center",
|
|
2874
|
+
fontSize: 8,
|
|
2875
|
+
color: THEME.muted,
|
|
2876
|
+
lineHeight: 1.4
|
|
2877
|
+
},
|
|
2878
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
2879
|
+
children: ["Confidential", BULLET, "Generated by ", generatedBy, BULLET, generatedLabel]
|
|
2880
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
2881
|
+
children: ["Page 1 of 2", BULLET, "madinah.com"]
|
|
2882
|
+
})]
|
|
2883
|
+
})
|
|
2884
|
+
});
|
|
2885
|
+
};
|
|
2886
|
+
var PageHeader = function PageHeader(_ref18) {
|
|
2887
|
+
var dateLabel = _ref18.dateLabel,
|
|
2888
|
+
generatedLabel = _ref18.generatedLabel,
|
|
2889
|
+
activeFilters = _ref18.activeFilters,
|
|
2890
|
+
page = _ref18.page,
|
|
2891
|
+
windowLabel = _ref18.windowLabel;
|
|
2664
2892
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2665
2893
|
style: {
|
|
2666
2894
|
padding: "22px ".concat(MX, "px 12px"),
|
|
@@ -2766,10 +2994,10 @@ var PageHeader = function PageHeader(_ref12) {
|
|
|
2766
2994
|
})]
|
|
2767
2995
|
});
|
|
2768
2996
|
};
|
|
2769
|
-
var PageFooter = function PageFooter(
|
|
2770
|
-
var generatedBy =
|
|
2771
|
-
generatedLabel =
|
|
2772
|
-
page =
|
|
2997
|
+
var PageFooter = function PageFooter(_ref19) {
|
|
2998
|
+
var generatedBy = _ref19.generatedBy,
|
|
2999
|
+
generatedLabel = _ref19.generatedLabel,
|
|
3000
|
+
page = _ref19.page;
|
|
2773
3001
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2774
3002
|
style: {
|
|
2775
3003
|
padding: "9px ".concat(MX, "px 54px"),
|
|
@@ -2796,32 +3024,33 @@ var PageFooter = function PageFooter(_ref13) {
|
|
|
2796
3024
|
};
|
|
2797
3025
|
|
|
2798
3026
|
// ─── Main component ───────────────────────────────────────────────────────────
|
|
2799
|
-
var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (
|
|
2800
|
-
var _apiData$overviewStat, _overview$totalRevenu, _overview$netRevenue, _overview$overallAVGD, _overview$conversionR, _apiData$totalVisits, _apiData$trafficSourc, _apiData$trafficSourc2, _apiData$trafficSourc3, _metricByTitle$NetRa, _metricByTitle$Total, _metricByTitle$Total2, _metricByTitle$Total3, _metricByTitle$
|
|
2801
|
-
var
|
|
2802
|
-
name =
|
|
2803
|
-
|
|
2804
|
-
apiData =
|
|
2805
|
-
|
|
2806
|
-
dateName =
|
|
2807
|
-
|
|
2808
|
-
numberOfDays =
|
|
2809
|
-
|
|
2810
|
-
activeFilters =
|
|
3027
|
+
var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref20, ref) {
|
|
3028
|
+
var _apiData$overviewStat, _overview$totalRevenu, _overview$netRevenue, _overview$overallAVGD, _overview$conversionR, _apiData$totalVisits, _apiData$trafficSourc, _apiData$trafficSourc2, _apiData$trafficSourc3, _growth$totalRevenue, _metricByTitle$AvgDo, _metricByTitle$NetRa, _growth$netRevenue, _metricByTitle$Total, _metricByTitle$Total2, _growth$totalDonation, _metricByTitle$Total3, _metricByTitle$AvgDo2, _growth$overallAVGDon, _apiData$roasCard, _metricByTitle$ROAS, _apiData$roasCardPrev, _metricByTitle$ROAS2, _apiData$adSpend, _apiData$attributedRe, _metricByTitle$Conver, _growth$conversionRat, _metricByTitle$Conver2, _metricByTitle$Refund, _refunds$growthPercen, _metricByTitle$Refund2, _mainChart$stacked, _ob$growthPercentage, _ob$peakDay, _up$acceptanceGrowth, _up$raisedGrowth, _dn$acceptanceGrowth, _dn$raisedGrowth, _refCard$growthPercen;
|
|
3029
|
+
var _ref20$name = _ref20.name,
|
|
3030
|
+
name = _ref20$name === void 0 ? "" : _ref20$name,
|
|
3031
|
+
_ref20$apiData = _ref20.apiData,
|
|
3032
|
+
apiData = _ref20$apiData === void 0 ? {} : _ref20$apiData,
|
|
3033
|
+
_ref20$dateName = _ref20.dateName,
|
|
3034
|
+
dateName = _ref20$dateName === void 0 ? "Last Period" : _ref20$dateName,
|
|
3035
|
+
_ref20$numberOfDays = _ref20.numberOfDays,
|
|
3036
|
+
numberOfDays = _ref20$numberOfDays === void 0 ? 30 : _ref20$numberOfDays,
|
|
3037
|
+
_ref20$activeFilters = _ref20.activeFilters,
|
|
3038
|
+
activeFilters = _ref20$activeFilters === void 0 ? [] : _ref20$activeFilters;
|
|
2811
3039
|
var now = new Date();
|
|
2812
3040
|
var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
|
|
2813
3041
|
var windowLabel = "".concat(numberOfDays, "-day window");
|
|
2814
|
-
var
|
|
2815
|
-
timeZone: "
|
|
3042
|
+
var gmtOptions = {
|
|
3043
|
+
timeZone: "UTC"
|
|
2816
3044
|
};
|
|
2817
3045
|
var generatedLabel = now.toLocaleDateString("en-US", _objectSpread2({
|
|
2818
3046
|
month: "short",
|
|
2819
3047
|
day: "numeric",
|
|
2820
3048
|
year: "numeric"
|
|
2821
|
-
},
|
|
3049
|
+
}, gmtOptions)) + BULLET + now.toLocaleTimeString("en-US", _objectSpread2({
|
|
2822
3050
|
hour: "2-digit",
|
|
2823
|
-
minute: "2-digit"
|
|
2824
|
-
|
|
3051
|
+
minute: "2-digit",
|
|
3052
|
+
hour12: false
|
|
3053
|
+
}, gmtOptions)) + " GMT";
|
|
2825
3054
|
var dateLabel = dateName;
|
|
2826
3055
|
var _normalizeFiltersText = function normalizeFiltersText(filtersInput) {
|
|
2827
3056
|
if (typeof filtersInput === "string") {
|
|
@@ -2859,9 +3088,34 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
2859
3088
|
return "";
|
|
2860
3089
|
};
|
|
2861
3090
|
var formattedActiveFilters = _normalizeFiltersText(activeFilters);
|
|
3091
|
+
var parseFilterPills = function parseFilterPills(filtersInput) {
|
|
3092
|
+
if (Array.isArray(filtersInput)) {
|
|
3093
|
+
var fromObjects = filtersInput.filter(function (item) {
|
|
3094
|
+
return item && _typeof(item) === "object" && item.value !== undefined && item.value !== null && "".concat(item.value).trim();
|
|
3095
|
+
}).map(function (item) {
|
|
3096
|
+
return "".concat(item.label || item.id || "Filter", ": ").concat(item.value);
|
|
3097
|
+
});
|
|
3098
|
+
if (fromObjects.length) return fromObjects;
|
|
3099
|
+
var fromStrings = filtersInput.map(function (item) {
|
|
3100
|
+
return typeof item === "string" ? item.trim() : "";
|
|
3101
|
+
}).filter(Boolean);
|
|
3102
|
+
if (fromStrings.length) return fromStrings;
|
|
3103
|
+
}
|
|
3104
|
+
if (typeof filtersInput === "string" && filtersInput.trim()) {
|
|
3105
|
+
var str = filtersInput.trim();
|
|
3106
|
+
if (str.includes("·")) return str.split("·").map(function (s) {
|
|
3107
|
+
return s.trim();
|
|
3108
|
+
}).filter(Boolean);
|
|
3109
|
+
if (str.includes("|")) return str.split("|").map(function (s) {
|
|
3110
|
+
return s.trim();
|
|
3111
|
+
}).filter(Boolean);
|
|
3112
|
+
return [str];
|
|
3113
|
+
}
|
|
3114
|
+
return getActiveFilterChips(apiData);
|
|
3115
|
+
};
|
|
3116
|
+
var filterPills = parseFilterPills(activeFilters);
|
|
2862
3117
|
var report = buildReportData(apiData, dateName);
|
|
2863
|
-
var
|
|
2864
|
-
metrics = report.metrics,
|
|
3118
|
+
var metrics = report.metrics,
|
|
2865
3119
|
mainChart = report.mainChart,
|
|
2866
3120
|
growth = report.growth,
|
|
2867
3121
|
totalDonors = report.totalDonors,
|
|
@@ -2968,13 +3222,16 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
2968
3222
|
label: "Email",
|
|
2969
3223
|
color: C.cyan
|
|
2970
3224
|
}];
|
|
2971
|
-
var revenueTrendText =
|
|
2972
|
-
var
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
var
|
|
3225
|
+
var revenueTrendText = "".concat(formatTrend((_growth$totalRevenue = growth === null || growth === void 0 ? void 0 : growth.totalRevenue) !== null && _growth$totalRevenue !== void 0 ? _growth$totalRevenue : 18), " vs last month");
|
|
3226
|
+
var heroTrendText = revenueTrendText;
|
|
3227
|
+
var heroDetailText = [passThrough, "".concat(formatNumber(totalDonors), " donors"), "$".concat(formatNumber(Number(avgDonation).toFixed(2)), " avg"), "".concat(formatNumber(totalVisits), " visits")].join(BULLET);
|
|
3228
|
+
var formatMetricDetail = function formatMetricDetail(detail) {
|
|
3229
|
+
return String(detail !== null && detail !== void 0 ? detail : "").replace(/\s-\s/g, BULLET);
|
|
3230
|
+
};
|
|
3231
|
+
var formatRoasTrend = function formatRoasTrend(trend) {
|
|
3232
|
+
return String(trend !== null && trend !== void 0 ? trend : "").replace(/x$/, "×");
|
|
3233
|
+
};
|
|
3234
|
+
var avgDonationDetailText = formatMetricDetail(((_metricByTitle$AvgDo = metricByTitle["Avg Donation"]) === null || _metricByTitle$AvgDo === void 0 ? void 0 : _metricByTitle$AvgDo.detail) || avgDonationDetail.detail || "Median $".concat(formatNumber(avgDonationDetail.median || 75), " \xB7 top decile $").concat(formatNumber(avgDonationDetail.topDecile || 850)));
|
|
2978
3235
|
var headerProps = {
|
|
2979
3236
|
dateLabel: dateLabel,
|
|
2980
3237
|
generatedLabel: generatedLabel,
|
|
@@ -2997,189 +3254,187 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
2997
3254
|
background: THEME.pageBg,
|
|
2998
3255
|
display: "flex",
|
|
2999
3256
|
flexDirection: "column",
|
|
3000
|
-
fontFamily: "'Helvetica Neue', Helvetica, Arial, sans-serif",
|
|
3257
|
+
fontFamily: "'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif",
|
|
3001
3258
|
boxSizing: "border-box"
|
|
3002
3259
|
},
|
|
3003
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
3004
|
-
|
|
3005
|
-
|
|
3260
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(PageOneHeader, {
|
|
3261
|
+
dateLabel: dateLabel,
|
|
3262
|
+
generatedLabel: generatedLabel,
|
|
3263
|
+
windowLabel: windowLabel
|
|
3264
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3006
3265
|
style: {
|
|
3007
3266
|
flex: 1,
|
|
3008
|
-
padding: "
|
|
3267
|
+
padding: "0 ".concat(MX, "px 0"),
|
|
3009
3268
|
display: "flex",
|
|
3010
|
-
flexDirection: "column"
|
|
3011
|
-
gap: 10
|
|
3269
|
+
flexDirection: "column"
|
|
3012
3270
|
},
|
|
3013
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
3014
|
-
|
|
3015
|
-
value: kpi$(totalRaised),
|
|
3016
|
-
trend: hero.trend,
|
|
3017
|
-
detail: hero.detail,
|
|
3018
|
-
variant: "primary"
|
|
3271
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ActiveFiltersBar, {
|
|
3272
|
+
pills: filterPills
|
|
3019
3273
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3020
3274
|
style: {
|
|
3021
|
-
display: "
|
|
3022
|
-
|
|
3023
|
-
gap:
|
|
3024
|
-
|
|
3025
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(KpiCard, {
|
|
3026
|
-
title: "Net Raised",
|
|
3027
|
-
value: kpi$(netRaised),
|
|
3028
|
-
trend: ((_metricByTitle$NetRa = metricByTitle["Net Raised"]) === null || _metricByTitle$NetRa === void 0 ? void 0 : _metricByTitle$NetRa.trend) || signed((growth === null || growth === void 0 ? void 0 : growth.netRevenue) || 17.4),
|
|
3029
|
-
detail: passThrough
|
|
3030
|
-
}), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
|
|
3031
|
-
title: "Total Donors",
|
|
3032
|
-
value: ((_metricByTitle$Total = metricByTitle["Total Donors"]) === null || _metricByTitle$Total === void 0 ? void 0 : _metricByTitle$Total.value) || "".concat(formatNumber(totalDonors)),
|
|
3033
|
-
trend: ((_metricByTitle$Total2 = metricByTitle["Total Donors"]) === null || _metricByTitle$Total2 === void 0 ? void 0 : _metricByTitle$Total2.trend) || signed((growth === null || growth === void 0 ? void 0 : growth.totalDonations) || 16.8),
|
|
3034
|
-
detail: ((_metricByTitle$Total3 = metricByTitle["Total Donors"]) === null || _metricByTitle$Total3 === void 0 ? void 0 : _metricByTitle$Total3.detail) || "".concat(formatNumber(newDonors), " new - ").concat(formatNumber(returningDonors), " returning")
|
|
3035
|
-
}), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
|
|
3036
|
-
title: "Avg Donation",
|
|
3037
|
-
value: kpi$(avgDonation),
|
|
3038
|
-
trend: ((_metricByTitle$AvgDo = metricByTitle["Avg Donation"]) === null || _metricByTitle$AvgDo === void 0 ? void 0 : _metricByTitle$AvgDo.trend) || signed((_growth$overallAVGDon = growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) !== null && _growth$overallAVGDon !== void 0 ? _growth$overallAVGDon : 0),
|
|
3039
|
-
detail: ((_metricByTitle$AvgDo2 = metricByTitle["Avg Donation"]) === null || _metricByTitle$AvgDo2 === void 0 ? void 0 : _metricByTitle$AvgDo2.detail) || avgDonationDetail.detail
|
|
3040
|
-
})]
|
|
3041
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3042
|
-
style: {
|
|
3043
|
-
display: "grid",
|
|
3044
|
-
gridTemplateColumns: "repeat(3, 1fr)",
|
|
3045
|
-
gap: 7
|
|
3046
|
-
},
|
|
3047
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(KpiCard, {
|
|
3048
|
-
title: "ROAS",
|
|
3049
|
-
value: kpiRoas((_apiData$roasCard = apiData === null || apiData === void 0 ? void 0 : apiData.roasCard) !== null && _apiData$roasCard !== void 0 ? _apiData$roasCard : 0),
|
|
3050
|
-
trend: ((_metricByTitle$ROAS = metricByTitle.ROAS) === null || _metricByTitle$ROAS === void 0 ? void 0 : _metricByTitle$ROAS.trend) || signed((_apiData$roasCardPrev = apiData === null || apiData === void 0 ? void 0 : apiData.roasCardPrev) !== null && _apiData$roasCardPrev !== void 0 ? _apiData$roasCardPrev : 0, "×"),
|
|
3051
|
-
detail: ((_metricByTitle$ROAS2 = metricByTitle.ROAS) === null || _metricByTitle$ROAS2 === void 0 ? void 0 : _metricByTitle$ROAS2.detail) || "".concat(d$((_apiData$adSpend = apiData === null || apiData === void 0 ? void 0 : apiData.adSpend) !== null && _apiData$adSpend !== void 0 ? _apiData$adSpend : 0), " spend - ").concat(d$((_apiData$attributedRe = apiData === null || apiData === void 0 ? void 0 : apiData.attributedRevenue) !== null && _apiData$attributedRe !== void 0 ? _apiData$attributedRe : 0), " attrib.")
|
|
3052
|
-
}), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
|
|
3053
|
-
title: "Conversion",
|
|
3054
|
-
value: kpiPct(convRate),
|
|
3055
|
-
trend: ((_metricByTitle$Conver = metricByTitle.Conversion) === null || _metricByTitle$Conver === void 0 ? void 0 : _metricByTitle$Conver.trend) || signed((growth === null || growth === void 0 ? void 0 : growth.conversionRate) || 0.21, "pp"),
|
|
3056
|
-
detail: ((_metricByTitle$Conver2 = metricByTitle.Conversion) === null || _metricByTitle$Conver2 === void 0 ? void 0 : _metricByTitle$Conver2.detail) || "".concat(formatNumber(totalDonors), " from ").concat(formatNumber(totalVisits), " visits")
|
|
3057
|
-
}), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
|
|
3058
|
-
title: "Refund Rate",
|
|
3059
|
-
value: pct(refundRate, 2),
|
|
3060
|
-
trend: ((_metricByTitle$Refund = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund === void 0 ? void 0 : _metricByTitle$Refund.trend) || signed(growthPercentage),
|
|
3061
|
-
detail: ((_metricByTitle$Refund2 = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund2 === void 0 ? void 0 : _metricByTitle$Refund2.detail) || "".concat(formatNumber(totalRefunds), " refunds this period"),
|
|
3062
|
-
trendPositiveWhenNegative: (_metricByTitle$Refund3 = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund3 === void 0 ? void 0 : _metricByTitle$Refund3.trendPositiveWhenNegative
|
|
3063
|
-
})]
|
|
3064
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3065
|
-
style: {
|
|
3066
|
-
border: "1px solid #E5E7EB",
|
|
3067
|
-
borderRadius: 8,
|
|
3068
|
-
background: "#fff",
|
|
3069
|
-
padding: "12px 14px 10px",
|
|
3275
|
+
display: "flex",
|
|
3276
|
+
flexDirection: "column",
|
|
3277
|
+
gap: 10,
|
|
3278
|
+
marginTop: 14,
|
|
3070
3279
|
flex: 1
|
|
3071
3280
|
},
|
|
3072
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
3281
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(HeroRaisedCard, {
|
|
3282
|
+
value: kpi$(totalRaised),
|
|
3283
|
+
trend: heroTrendText,
|
|
3284
|
+
detail: heroDetailText
|
|
3285
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3073
3286
|
style: {
|
|
3074
|
-
display: "
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3287
|
+
display: "grid",
|
|
3288
|
+
gridTemplateColumns: "repeat(3, 1fr)",
|
|
3289
|
+
gap: 10
|
|
3290
|
+
},
|
|
3291
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(MetricGridCard, {
|
|
3292
|
+
title: "Net Raised",
|
|
3293
|
+
value: d$Compact(netRaised),
|
|
3294
|
+
trend: ((_metricByTitle$NetRa = metricByTitle["Net Raised"]) === null || _metricByTitle$NetRa === void 0 ? void 0 : _metricByTitle$NetRa.trend) || formatTrend((_growth$netRevenue = growth === null || growth === void 0 ? void 0 : growth.netRevenue) !== null && _growth$netRevenue !== void 0 ? _growth$netRevenue : 17.4),
|
|
3295
|
+
detail: passThrough
|
|
3296
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MetricGridCard, {
|
|
3297
|
+
title: "Total Donors",
|
|
3298
|
+
value: ((_metricByTitle$Total = metricByTitle["Total Donors"]) === null || _metricByTitle$Total === void 0 ? void 0 : _metricByTitle$Total.value) || "".concat(formatNumber(totalDonors)),
|
|
3299
|
+
trend: ((_metricByTitle$Total2 = metricByTitle["Total Donors"]) === null || _metricByTitle$Total2 === void 0 ? void 0 : _metricByTitle$Total2.trend) || formatTrend((_growth$totalDonation = growth === null || growth === void 0 ? void 0 : growth.totalDonations) !== null && _growth$totalDonation !== void 0 ? _growth$totalDonation : 16.8),
|
|
3300
|
+
detail: formatMetricDetail(((_metricByTitle$Total3 = metricByTitle["Total Donors"]) === null || _metricByTitle$Total3 === void 0 ? void 0 : _metricByTitle$Total3.detail) || "".concat(formatNumber(newDonors), " new \xB7 ").concat(formatNumber(returningDonors), " returning"))
|
|
3301
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MetricGridCard, {
|
|
3302
|
+
title: "Avg Donation",
|
|
3303
|
+
value: kpi$(avgDonation),
|
|
3304
|
+
trend: ((_metricByTitle$AvgDo2 = metricByTitle["Avg Donation"]) === null || _metricByTitle$AvgDo2 === void 0 ? void 0 : _metricByTitle$AvgDo2.trend) || formatTrend((_growth$overallAVGDon = growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) !== null && _growth$overallAVGDon !== void 0 ? _growth$overallAVGDon : 8.4),
|
|
3305
|
+
detail: avgDonationDetailText
|
|
3306
|
+
})]
|
|
3307
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3308
|
+
style: {
|
|
3309
|
+
display: "grid",
|
|
3310
|
+
gridTemplateColumns: "repeat(3, 1fr)",
|
|
3311
|
+
gap: 10
|
|
3312
|
+
},
|
|
3313
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(MetricGridCard, {
|
|
3314
|
+
title: "ROAS",
|
|
3315
|
+
value: kpiRoas((_apiData$roasCard = apiData === null || apiData === void 0 ? void 0 : apiData.roasCard) !== null && _apiData$roasCard !== void 0 ? _apiData$roasCard : 3),
|
|
3316
|
+
trend: formatRoasTrend(((_metricByTitle$ROAS = metricByTitle.ROAS) === null || _metricByTitle$ROAS === void 0 ? void 0 : _metricByTitle$ROAS.trend) || formatTrend((_apiData$roasCardPrev = apiData === null || apiData === void 0 ? void 0 : apiData.roasCardPrev) !== null && _apiData$roasCardPrev !== void 0 ? _apiData$roasCardPrev : 0.4, "x")),
|
|
3317
|
+
detail: formatMetricDetail(((_metricByTitle$ROAS2 = metricByTitle.ROAS) === null || _metricByTitle$ROAS2 === void 0 ? void 0 : _metricByTitle$ROAS2.detail) || "".concat(d$Compact((_apiData$adSpend = apiData === null || apiData === void 0 ? void 0 : apiData.adSpend) !== null && _apiData$adSpend !== void 0 ? _apiData$adSpend : 72000), " spend \xB7 ").concat(d$Compact((_apiData$attributedRe = apiData === null || apiData === void 0 ? void 0 : apiData.attributedRevenue) !== null && _apiData$attributedRe !== void 0 ? _apiData$attributedRe : 215000), " attrib."))
|
|
3318
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MetricGridCard, {
|
|
3319
|
+
title: "Conversion",
|
|
3320
|
+
value: kpiPct(convRate),
|
|
3321
|
+
trend: ((_metricByTitle$Conver = metricByTitle.Conversion) === null || _metricByTitle$Conver === void 0 ? void 0 : _metricByTitle$Conver.trend) || formatTrend((_growth$conversionRat = growth === null || growth === void 0 ? void 0 : growth.conversionRate) !== null && _growth$conversionRat !== void 0 ? _growth$conversionRat : 0.21, "pp"),
|
|
3322
|
+
detail: formatMetricDetail(((_metricByTitle$Conver2 = metricByTitle.Conversion) === null || _metricByTitle$Conver2 === void 0 ? void 0 : _metricByTitle$Conver2.detail) || "".concat(formatNumber(totalDonors), " from ").concat(formatNumber(totalVisits), " visits"))
|
|
3323
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MetricGridCard, {
|
|
3324
|
+
title: "Refund Rate",
|
|
3325
|
+
value: pct(refundRate, 2),
|
|
3326
|
+
trend: ((_metricByTitle$Refund = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund === void 0 ? void 0 : _metricByTitle$Refund.trend) || formatTrend((_refunds$growthPercen = refunds.growthPercentage) !== null && _refunds$growthPercen !== void 0 ? _refunds$growthPercen : -0.3, "pp"),
|
|
3327
|
+
detail: formatMetricDetail(((_metricByTitle$Refund2 = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund2 === void 0 ? void 0 : _metricByTitle$Refund2.detail) || "".concat(formatNumber(totalRefunds), " refunds this period")),
|
|
3328
|
+
trendPositiveWhenNegative: true
|
|
3329
|
+
})]
|
|
3330
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3331
|
+
style: {
|
|
3332
|
+
border: "1px solid ".concat(THEME.panelBorder),
|
|
3333
|
+
borderRadius: 12,
|
|
3334
|
+
background: "#fff",
|
|
3335
|
+
padding: "14px 16px 12px",
|
|
3336
|
+
flex: 1
|
|
3078
3337
|
},
|
|
3079
3338
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
children: "
|
|
3088
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3089
|
-
style: {
|
|
3090
|
-
fontSize: 9.5,
|
|
3091
|
-
color: "rgba(0, 0, 0, 0.4)",
|
|
3092
|
-
marginTop: 2,
|
|
3093
|
-
lineHeight: 1.15
|
|
3094
|
-
},
|
|
3095
|
-
children: ["Last ", daysLabel, " - daily aggregation"]
|
|
3096
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3097
|
-
style: {
|
|
3098
|
-
display: "flex",
|
|
3099
|
-
alignItems: "center",
|
|
3100
|
-
gap: 6,
|
|
3101
|
-
marginTop: 8
|
|
3102
|
-
},
|
|
3103
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
3339
|
+
style: {
|
|
3340
|
+
display: "flex",
|
|
3341
|
+
justifyContent: "space-between",
|
|
3342
|
+
alignItems: "flex-start",
|
|
3343
|
+
marginBottom: 6
|
|
3344
|
+
},
|
|
3345
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3346
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3104
3347
|
style: {
|
|
3105
|
-
fontSize:
|
|
3348
|
+
fontSize: 13,
|
|
3106
3349
|
fontWeight: 700,
|
|
3107
|
-
color:
|
|
3350
|
+
color: THEME.text,
|
|
3351
|
+
lineHeight: 1.15
|
|
3108
3352
|
},
|
|
3109
|
-
children:
|
|
3110
|
-
}),
|
|
3353
|
+
children: "Total revenue trend"
|
|
3354
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3111
3355
|
style: {
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
color: revenueTrendColor,
|
|
3117
|
-
padding: "2px 8px",
|
|
3118
|
-
borderRadius: 100,
|
|
3119
|
-
fontSize: 9.5,
|
|
3120
|
-
fontWeight: 600
|
|
3356
|
+
fontSize: 9,
|
|
3357
|
+
color: THEME.muted,
|
|
3358
|
+
marginTop: 3,
|
|
3359
|
+
lineHeight: 1.15
|
|
3121
3360
|
},
|
|
3122
|
-
children: [
|
|
3123
|
-
|
|
3124
|
-
}), revenueTrendText]
|
|
3125
|
-
})]
|
|
3126
|
-
})]
|
|
3127
|
-
}), revSeries.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3128
|
-
style: {
|
|
3129
|
-
display: "flex",
|
|
3130
|
-
gap: 10,
|
|
3131
|
-
alignItems: "center",
|
|
3132
|
-
flexShrink: 0,
|
|
3133
|
-
paddingTop: 2
|
|
3134
|
-
},
|
|
3135
|
-
children: revenueLegend.map(function (leg) {
|
|
3136
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3361
|
+
children: ["Last ", daysLabel, BULLET, "daily aggregation"]
|
|
3362
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3137
3363
|
style: {
|
|
3138
3364
|
display: "flex",
|
|
3139
3365
|
alignItems: "center",
|
|
3140
|
-
gap:
|
|
3366
|
+
gap: 8,
|
|
3367
|
+
marginTop: 10
|
|
3141
3368
|
},
|
|
3142
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("
|
|
3369
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
3143
3370
|
style: {
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
flexShrink: 0
|
|
3149
|
-
}
|
|
3150
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
3151
|
-
style: {
|
|
3152
|
-
fontSize: 9.5,
|
|
3153
|
-
color: "rgba(0, 0, 0, 0.6)",
|
|
3154
|
-
fontWeight: 500
|
|
3371
|
+
fontSize: 22,
|
|
3372
|
+
fontWeight: 700,
|
|
3373
|
+
color: THEME.text,
|
|
3374
|
+
letterSpacing: "-0.3px"
|
|
3155
3375
|
},
|
|
3156
|
-
children:
|
|
3376
|
+
children: kpi$(totalRaised)
|
|
3377
|
+
}), revenueTrendText && /*#__PURE__*/jsxRuntime.jsx(TrendPill$1, {
|
|
3378
|
+
positive: isTrendPositive(revenueTrendText),
|
|
3379
|
+
children: revenueTrendText
|
|
3157
3380
|
})]
|
|
3158
|
-
}
|
|
3381
|
+
})]
|
|
3382
|
+
}), revSeries.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3383
|
+
style: {
|
|
3384
|
+
display: "flex",
|
|
3385
|
+
gap: 12,
|
|
3386
|
+
alignItems: "center",
|
|
3387
|
+
flexShrink: 0,
|
|
3388
|
+
paddingTop: 2
|
|
3389
|
+
},
|
|
3390
|
+
children: revenueLegend.map(function (leg) {
|
|
3391
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3392
|
+
style: {
|
|
3393
|
+
display: "flex",
|
|
3394
|
+
alignItems: "center",
|
|
3395
|
+
gap: 5
|
|
3396
|
+
},
|
|
3397
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3398
|
+
style: {
|
|
3399
|
+
width: 7,
|
|
3400
|
+
height: 7,
|
|
3401
|
+
borderRadius: "50%",
|
|
3402
|
+
background: leg.color,
|
|
3403
|
+
flexShrink: 0
|
|
3404
|
+
}
|
|
3405
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
3406
|
+
style: {
|
|
3407
|
+
fontSize: 9,
|
|
3408
|
+
color: "#6B7280",
|
|
3409
|
+
fontWeight: 500
|
|
3410
|
+
},
|
|
3411
|
+
children: leg.label
|
|
3412
|
+
})]
|
|
3413
|
+
}, leg.label);
|
|
3414
|
+
})
|
|
3415
|
+
})]
|
|
3416
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3417
|
+
style: {
|
|
3418
|
+
width: "100%",
|
|
3419
|
+
minHeight: 280
|
|
3420
|
+
},
|
|
3421
|
+
children: /*#__PURE__*/jsxRuntime.jsx(RevenueChart, {
|
|
3422
|
+
id: "pdf-total-revenue-trend",
|
|
3423
|
+
metric: "Revenue",
|
|
3424
|
+
series: revSeries,
|
|
3425
|
+
categories: revCats,
|
|
3426
|
+
height: 280,
|
|
3427
|
+
stacked: (_mainChart$stacked = mainChart.stacked) !== null && _mainChart$stacked !== void 0 ? _mainChart$stacked : true,
|
|
3428
|
+
type: "area",
|
|
3429
|
+
colors: mainChart.colors || ["#6366F1", "#10B981", "#06B6D4"],
|
|
3430
|
+
showLegend: false
|
|
3159
3431
|
})
|
|
3160
3432
|
})]
|
|
3161
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3162
|
-
style: {
|
|
3163
|
-
width: "100%",
|
|
3164
|
-
minHeight: 300
|
|
3165
|
-
},
|
|
3166
|
-
children: /*#__PURE__*/jsxRuntime.jsx(RevenueChart, {
|
|
3167
|
-
id: "pdf-total-revenue-trend",
|
|
3168
|
-
metric: "Revenue",
|
|
3169
|
-
series: revSeries,
|
|
3170
|
-
categories: revCats,
|
|
3171
|
-
height: 300,
|
|
3172
|
-
stacked: (_mainChart$stacked = mainChart.stacked) !== null && _mainChart$stacked !== void 0 ? _mainChart$stacked : true,
|
|
3173
|
-
type: "area",
|
|
3174
|
-
colors: mainChart.colors || ["#6366F1", "#10B981", "#06B6D4"],
|
|
3175
|
-
showLegend: false
|
|
3176
|
-
})
|
|
3177
3433
|
})]
|
|
3178
3434
|
})]
|
|
3179
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
3180
|
-
generatedBy: name,
|
|
3181
|
-
generatedLabel: generatedLabel
|
|
3182
|
-
page: 1
|
|
3435
|
+
}), /*#__PURE__*/jsxRuntime.jsx(PageOneFooter, {
|
|
3436
|
+
generatedBy: name || "Ahmad Hassan",
|
|
3437
|
+
generatedLabel: generatedLabel
|
|
3183
3438
|
})]
|
|
3184
3439
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3185
3440
|
"data-export-page": "2",
|
|
@@ -3497,10 +3752,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
3497
3752
|
display: "flex",
|
|
3498
3753
|
gap: 12
|
|
3499
3754
|
},
|
|
3500
|
-
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 (
|
|
3501
|
-
var
|
|
3502
|
-
l =
|
|
3503
|
-
v =
|
|
3755
|
+
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 (_ref21) {
|
|
3756
|
+
var _ref22 = _slicedToArray(_ref21, 2),
|
|
3757
|
+
l = _ref22[0],
|
|
3758
|
+
v = _ref22[1];
|
|
3504
3759
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3505
3760
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3506
3761
|
style: {
|
|
@@ -3573,10 +3828,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
|
3573
3828
|
display: "flex",
|
|
3574
3829
|
gap: 12
|
|
3575
3830
|
},
|
|
3576
|
-
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 (
|
|
3577
|
-
var
|
|
3578
|
-
l =
|
|
3579
|
-
v =
|
|
3831
|
+
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 (_ref23) {
|
|
3832
|
+
var _ref24 = _slicedToArray(_ref23, 2),
|
|
3833
|
+
l = _ref24[0],
|
|
3834
|
+
v = _ref24[1];
|
|
3580
3835
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3581
3836
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3582
3837
|
style: {
|