@ammarkhalidfarooq/dashboard-package 0.6.91 → 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 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: "#F8FAFC",
1752
+ pageBg: "#F9FAFB",
1753
1753
  panelBg: "#FFFFFF",
1754
- panelBorder: "#DDE3EA",
1755
- kpiBgPrimary: "#EEF2FF",
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: "#94A3B8",
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(formatNumber(Number(v !== null && v !== void 0 ? v : 0).toFixed(2)), "\xD7");
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 KpiCard = function KpiCard(_ref11) {
2601
- var title = _ref11.title,
2602
- value = _ref11.value,
2603
- trend = _ref11.trend,
2604
- detail = _ref11.detail,
2605
- _ref11$variant = _ref11.variant,
2606
- variant = _ref11$variant === void 0 ? "secondary" : _ref11$variant,
2607
- _ref11$trendPositiveW = _ref11.trendPositiveWhenNegative,
2608
- trendPositiveWhenNegative = _ref11$trendPositiveW === void 0 ? false : _ref11$trendPositiveW;
2609
- var displayTrend = withTrendArrow(trend);
2610
- var isPrimary = variant === "primary";
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
- flexDirection: "column",
2622
- gap: 2
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("div", {
2706
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
2625
2707
  style: {
2626
2708
  fontSize: 8,
2627
2709
  fontWeight: 700,
2628
- letterSpacing: "0.7px",
2629
- color: "#64748B"
2710
+ letterSpacing: "0.8px",
2711
+ color: THEME.muted,
2712
+ textTransform: "uppercase",
2713
+ flexShrink: 0
2630
2714
  },
2631
- children: title
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: 17,
2635
- fontWeight: 800,
2841
+ fontSize: 20,
2842
+ fontWeight: 700,
2636
2843
  color: THEME.text,
2637
2844
  lineHeight: 1.1,
2638
- marginTop: 2
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
- lineHeight: 1.4
2852
+ marginTop: 5,
2853
+ lineHeight: 1.35
2653
2854
  },
2654
2855
  children: detail
2655
2856
  })]
2656
2857
  });
2657
2858
  };
2658
- var PageHeader = function PageHeader(_ref12) {
2659
- var dateLabel = _ref12.dateLabel,
2660
- generatedLabel = _ref12.generatedLabel,
2661
- activeFilters = _ref12.activeFilters,
2662
- page = _ref12.page,
2663
- windowLabel = _ref12.windowLabel;
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,55 +2994,63 @@ var PageHeader = function PageHeader(_ref12) {
2766
2994
  })]
2767
2995
  });
2768
2996
  };
2769
- var PageFooter = function PageFooter(_ref13) {
2770
- var generatedBy = _ref13.generatedBy,
2771
- generatedLabel = _ref13.generatedLabel,
2772
- page = _ref13.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
- padding: "7px ".concat(MX, "px"),
3003
+ padding: "9px ".concat(MX, "px 54px"),
2776
3004
  borderTop: "1px solid #DEE5EF",
2777
3005
  background: "#FFFFFF",
2778
3006
  marginTop: "auto",
2779
3007
  flexShrink: 0
2780
3008
  },
2781
- children: /*#__PURE__*/jsxRuntime.jsxs("span", {
3009
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", {
2782
3010
  style: {
3011
+ display: "flex",
3012
+ justifyContent: "space-between",
3013
+ alignItems: "center",
2783
3014
  fontSize: 8,
2784
3015
  color: THEME.muted
2785
3016
  },
2786
- children: ["Confidential - Generated by ", generatedBy, " - ", generatedLabel, " \xA0\xA0 Page ", page, " of 2 - madinah.com"]
3017
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
3018
+ children: ["Confidential - Generated by ", generatedBy, " - ", generatedLabel]
3019
+ }), /*#__PURE__*/jsxRuntime.jsxs("span", {
3020
+ children: ["Page ", page, " of 2 - madinah.com"]
3021
+ })]
2787
3022
  })
2788
3023
  });
2789
3024
  };
2790
3025
 
2791
3026
  // ─── Main component ───────────────────────────────────────────────────────────
2792
- var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
2793
- 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$AvgDo, _growth$overallAVGDon, _metricByTitle$AvgDo2, _apiData$roasCard, _metricByTitle$ROAS, _apiData$roasCardPrev, _metricByTitle$ROAS2, _apiData$adSpend, _apiData$attributedRe, _metricByTitle$Conver, _metricByTitle$Conver2, _metricByTitle$Refund, _metricByTitle$Refund2, _metricByTitle$Refund3, _mainChart$stacked, _ob$growthPercentage, _ob$peakDay, _up$acceptanceGrowth, _up$raisedGrowth, _dn$acceptanceGrowth, _dn$raisedGrowth, _refCard$growthPercen;
2794
- var _ref14$name = _ref14.name,
2795
- name = _ref14$name === void 0 ? "" : _ref14$name,
2796
- _ref14$apiData = _ref14.apiData,
2797
- apiData = _ref14$apiData === void 0 ? {} : _ref14$apiData,
2798
- _ref14$dateName = _ref14.dateName,
2799
- dateName = _ref14$dateName === void 0 ? "Last Period" : _ref14$dateName,
2800
- _ref14$numberOfDays = _ref14.numberOfDays,
2801
- numberOfDays = _ref14$numberOfDays === void 0 ? 30 : _ref14$numberOfDays,
2802
- _ref14$activeFilters = _ref14.activeFilters,
2803
- activeFilters = _ref14$activeFilters === void 0 ? [] : _ref14$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;
2804
3039
  var now = new Date();
2805
3040
  var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
2806
3041
  var windowLabel = "".concat(numberOfDays, "-day window");
2807
- var estOptions = {
2808
- timeZone: "America/New_York"
3042
+ var gmtOptions = {
3043
+ timeZone: "UTC"
2809
3044
  };
2810
3045
  var generatedLabel = now.toLocaleDateString("en-US", _objectSpread2({
2811
3046
  month: "short",
2812
3047
  day: "numeric",
2813
3048
  year: "numeric"
2814
- }, estOptions)) + " - " + now.toLocaleTimeString("en-US", _objectSpread2({
3049
+ }, gmtOptions)) + BULLET + now.toLocaleTimeString("en-US", _objectSpread2({
2815
3050
  hour: "2-digit",
2816
- minute: "2-digit"
2817
- }, estOptions)) + " EST";
3051
+ minute: "2-digit",
3052
+ hour12: false
3053
+ }, gmtOptions)) + " GMT";
2818
3054
  var dateLabel = dateName;
2819
3055
  var _normalizeFiltersText = function normalizeFiltersText(filtersInput) {
2820
3056
  if (typeof filtersInput === "string") {
@@ -2852,9 +3088,34 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
2852
3088
  return "";
2853
3089
  };
2854
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);
2855
3117
  var report = buildReportData(apiData, dateName);
2856
- var hero = report.hero,
2857
- metrics = report.metrics,
3118
+ var metrics = report.metrics,
2858
3119
  mainChart = report.mainChart,
2859
3120
  growth = report.growth,
2860
3121
  totalDonors = report.totalDonors,
@@ -2961,13 +3222,16 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
2961
3222
  label: "Email",
2962
3223
  color: C.cyan
2963
3224
  }];
2964
- var revenueTrendText = mainChart.trend || "";
2965
- var revenueTrendColor = getTrendColor(revenueTrendText, {
2966
- up: "#054835ff",
2967
- down: "#EF4444"
2968
- });
2969
- var revenueTrendBadgeBg = revenueTrendColor === "#EF4444" ? "#fee2e2" : "#8df3be9a";
2970
- var revenueTrendArrow = getTrendArrow(revenueTrendText);
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)));
2971
3235
  var headerProps = {
2972
3236
  dateLabel: dateLabel,
2973
3237
  generatedLabel: generatedLabel,
@@ -2990,189 +3254,187 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
2990
3254
  background: THEME.pageBg,
2991
3255
  display: "flex",
2992
3256
  flexDirection: "column",
2993
- fontFamily: "'Helvetica Neue', Helvetica, Arial, sans-serif",
3257
+ fontFamily: "'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif",
2994
3258
  boxSizing: "border-box"
2995
3259
  },
2996
- children: [/*#__PURE__*/jsxRuntime.jsx(PageHeader, _objectSpread2(_objectSpread2({}, headerProps), {}, {
2997
- page: 1
2998
- })), /*#__PURE__*/jsxRuntime.jsxs("div", {
3260
+ children: [/*#__PURE__*/jsxRuntime.jsx(PageOneHeader, {
3261
+ dateLabel: dateLabel,
3262
+ generatedLabel: generatedLabel,
3263
+ windowLabel: windowLabel
3264
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
2999
3265
  style: {
3000
3266
  flex: 1,
3001
- padding: "12px ".concat(MX, "px 10px"),
3267
+ padding: "0 ".concat(MX, "px 0"),
3002
3268
  display: "flex",
3003
- flexDirection: "column",
3004
- gap: 10
3269
+ flexDirection: "column"
3005
3270
  },
3006
- children: [/*#__PURE__*/jsxRuntime.jsx(KpiCard, {
3007
- title: "Total Raised",
3008
- value: kpi$(totalRaised),
3009
- trend: hero.trend,
3010
- detail: hero.detail,
3011
- variant: "primary"
3271
+ children: [/*#__PURE__*/jsxRuntime.jsx(ActiveFiltersBar, {
3272
+ pills: filterPills
3012
3273
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
3013
3274
  style: {
3014
- display: "grid",
3015
- gridTemplateColumns: "repeat(3, 1fr)",
3016
- gap: 7
3017
- },
3018
- children: [/*#__PURE__*/jsxRuntime.jsx(KpiCard, {
3019
- title: "Net Raised",
3020
- value: kpi$(netRaised),
3021
- 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),
3022
- detail: passThrough
3023
- }), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
3024
- title: "Total Donors",
3025
- value: ((_metricByTitle$Total = metricByTitle["Total Donors"]) === null || _metricByTitle$Total === void 0 ? void 0 : _metricByTitle$Total.value) || "".concat(formatNumber(totalDonors)),
3026
- 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),
3027
- detail: ((_metricByTitle$Total3 = metricByTitle["Total Donors"]) === null || _metricByTitle$Total3 === void 0 ? void 0 : _metricByTitle$Total3.detail) || "".concat(formatNumber(newDonors), " new - ").concat(formatNumber(returningDonors), " returning")
3028
- }), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
3029
- title: "Avg Donation",
3030
- value: kpi$(avgDonation),
3031
- 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),
3032
- detail: ((_metricByTitle$AvgDo2 = metricByTitle["Avg Donation"]) === null || _metricByTitle$AvgDo2 === void 0 ? void 0 : _metricByTitle$AvgDo2.detail) || avgDonationDetail.detail
3033
- })]
3034
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
3035
- style: {
3036
- display: "grid",
3037
- gridTemplateColumns: "repeat(3, 1fr)",
3038
- gap: 7
3039
- },
3040
- children: [/*#__PURE__*/jsxRuntime.jsx(KpiCard, {
3041
- title: "ROAS",
3042
- value: kpiRoas((_apiData$roasCard = apiData === null || apiData === void 0 ? void 0 : apiData.roasCard) !== null && _apiData$roasCard !== void 0 ? _apiData$roasCard : 0),
3043
- 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, "×"),
3044
- 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.")
3045
- }), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
3046
- title: "Conversion",
3047
- value: kpiPct(convRate),
3048
- 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"),
3049
- detail: ((_metricByTitle$Conver2 = metricByTitle.Conversion) === null || _metricByTitle$Conver2 === void 0 ? void 0 : _metricByTitle$Conver2.detail) || "".concat(formatNumber(totalDonors), " from ").concat(formatNumber(totalVisits), " visits")
3050
- }), /*#__PURE__*/jsxRuntime.jsx(KpiCard, {
3051
- title: "Refund Rate",
3052
- value: pct(refundRate, 2),
3053
- trend: ((_metricByTitle$Refund = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund === void 0 ? void 0 : _metricByTitle$Refund.trend) || signed(growthPercentage),
3054
- detail: ((_metricByTitle$Refund2 = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund2 === void 0 ? void 0 : _metricByTitle$Refund2.detail) || "".concat(formatNumber(totalRefunds), " refunds this period"),
3055
- trendPositiveWhenNegative: (_metricByTitle$Refund3 = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund3 === void 0 ? void 0 : _metricByTitle$Refund3.trendPositiveWhenNegative
3056
- })]
3057
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
3058
- style: {
3059
- border: "1px solid #E5E7EB",
3060
- borderRadius: 8,
3061
- background: "#fff",
3062
- padding: "12px 14px 10px",
3275
+ display: "flex",
3276
+ flexDirection: "column",
3277
+ gap: 10,
3278
+ marginTop: 14,
3063
3279
  flex: 1
3064
3280
  },
3065
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
3281
+ children: [/*#__PURE__*/jsxRuntime.jsx(HeroRaisedCard, {
3282
+ value: kpi$(totalRaised),
3283
+ trend: heroTrendText,
3284
+ detail: heroDetailText
3285
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
3066
3286
  style: {
3067
- display: "flex",
3068
- justifyContent: "space-between",
3069
- alignItems: "flex-start",
3070
- marginBottom: 8
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
3071
3337
  },
3072
3338
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
3073
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
3074
- style: {
3075
- fontSize: 13,
3076
- fontWeight: 700,
3077
- color: "#111827",
3078
- lineHeight: 1.15
3079
- },
3080
- children: "Total revenue trend"
3081
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
3082
- style: {
3083
- fontSize: 9.5,
3084
- color: "rgba(0, 0, 0, 0.4)",
3085
- marginTop: 2,
3086
- lineHeight: 1.15
3087
- },
3088
- children: ["Last ", daysLabel, " - daily aggregation"]
3089
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
3090
- style: {
3091
- display: "flex",
3092
- alignItems: "center",
3093
- gap: 6,
3094
- marginTop: 8
3095
- },
3096
- 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", {
3097
3347
  style: {
3098
- fontSize: 22,
3348
+ fontSize: 13,
3099
3349
  fontWeight: 700,
3100
- color: "#111827"
3350
+ color: THEME.text,
3351
+ lineHeight: 1.15
3101
3352
  },
3102
- children: kpi$(totalRaised)
3103
- }), revenueTrendText && /*#__PURE__*/jsxRuntime.jsxs("span", {
3353
+ children: "Total revenue trend"
3354
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
3104
3355
  style: {
3105
- display: "inline-flex",
3106
- alignItems: "center",
3107
- gap: 3,
3108
- background: revenueTrendBadgeBg,
3109
- color: revenueTrendColor,
3110
- padding: "2px 8px",
3111
- borderRadius: 100,
3112
- fontSize: 9.5,
3113
- fontWeight: 600
3356
+ fontSize: 9,
3357
+ color: THEME.muted,
3358
+ marginTop: 3,
3359
+ lineHeight: 1.15
3114
3360
  },
3115
- children: [revenueTrendArrow && /*#__PURE__*/jsxRuntime.jsx("span", {
3116
- children: revenueTrendArrow
3117
- }), revenueTrendText]
3118
- })]
3119
- })]
3120
- }), revSeries.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
3121
- style: {
3122
- display: "flex",
3123
- gap: 10,
3124
- alignItems: "center",
3125
- flexShrink: 0,
3126
- paddingTop: 2
3127
- },
3128
- children: revenueLegend.map(function (leg) {
3129
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
3361
+ children: ["Last ", daysLabel, BULLET, "daily aggregation"]
3362
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
3130
3363
  style: {
3131
3364
  display: "flex",
3132
3365
  alignItems: "center",
3133
- gap: 4
3366
+ gap: 8,
3367
+ marginTop: 10
3134
3368
  },
3135
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
3136
- style: {
3137
- width: 8,
3138
- height: 8,
3139
- borderRadius: "50%",
3140
- background: leg.color,
3141
- flexShrink: 0
3142
- }
3143
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
3369
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
3144
3370
  style: {
3145
- fontSize: 9.5,
3146
- color: "rgba(0, 0, 0, 0.6)",
3147
- fontWeight: 500
3371
+ fontSize: 22,
3372
+ fontWeight: 700,
3373
+ color: THEME.text,
3374
+ letterSpacing: "-0.3px"
3148
3375
  },
3149
- children: leg.label
3376
+ children: kpi$(totalRaised)
3377
+ }), revenueTrendText && /*#__PURE__*/jsxRuntime.jsx(TrendPill$1, {
3378
+ positive: isTrendPositive(revenueTrendText),
3379
+ children: revenueTrendText
3150
3380
  })]
3151
- }, leg.label);
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
3152
3431
  })
3153
3432
  })]
3154
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
3155
- style: {
3156
- width: "100%",
3157
- minHeight: 300
3158
- },
3159
- children: /*#__PURE__*/jsxRuntime.jsx(RevenueChart, {
3160
- id: "pdf-total-revenue-trend",
3161
- metric: "Revenue",
3162
- series: revSeries,
3163
- categories: revCats,
3164
- height: 300,
3165
- stacked: (_mainChart$stacked = mainChart.stacked) !== null && _mainChart$stacked !== void 0 ? _mainChart$stacked : true,
3166
- type: "area",
3167
- colors: mainChart.colors || ["#6366F1", "#10B981", "#06B6D4"],
3168
- showLegend: false
3169
- })
3170
3433
  })]
3171
3434
  })]
3172
- }), /*#__PURE__*/jsxRuntime.jsx(PageFooter, {
3173
- generatedBy: name,
3174
- generatedLabel: generatedLabel,
3175
- page: 1
3435
+ }), /*#__PURE__*/jsxRuntime.jsx(PageOneFooter, {
3436
+ generatedBy: name || "Ahmad Hassan",
3437
+ generatedLabel: generatedLabel
3176
3438
  })]
3177
3439
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
3178
3440
  "data-export-page": "2",
@@ -3490,10 +3752,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
3490
3752
  display: "flex",
3491
3753
  gap: 12
3492
3754
  },
3493
- 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) {
3494
- var _ref16 = _slicedToArray(_ref15, 2),
3495
- l = _ref16[0],
3496
- v = _ref16[1];
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];
3497
3759
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
3498
3760
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
3499
3761
  style: {
@@ -3566,10 +3828,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
3566
3828
  display: "flex",
3567
3829
  gap: 12
3568
3830
  },
3569
- 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) {
3570
- var _ref18 = _slicedToArray(_ref17, 2),
3571
- l = _ref18[0],
3572
- v = _ref18[1];
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];
3573
3835
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
3574
3836
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
3575
3837
  style: {