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