@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.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,10 +2992,10 @@ 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
3001
  padding: "9px ".concat(MX, "px 54px"),
@@ -2794,32 +3022,33 @@ var PageFooter = function PageFooter(_ref13) {
2794
3022
  };
2795
3023
 
2796
3024
  // ─── Main component ───────────────────────────────────────────────────────────
2797
- var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
2798
- 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;
2799
- var _ref14$name = _ref14.name,
2800
- name = _ref14$name === void 0 ? "" : _ref14$name,
2801
- _ref14$apiData = _ref14.apiData,
2802
- apiData = _ref14$apiData === void 0 ? {} : _ref14$apiData,
2803
- _ref14$dateName = _ref14.dateName,
2804
- dateName = _ref14$dateName === void 0 ? "Last Period" : _ref14$dateName,
2805
- _ref14$numberOfDays = _ref14.numberOfDays,
2806
- numberOfDays = _ref14$numberOfDays === void 0 ? 30 : _ref14$numberOfDays,
2807
- _ref14$activeFilters = _ref14.activeFilters,
2808
- 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;
2809
3037
  var now = new Date();
2810
3038
  var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
2811
3039
  var windowLabel = "".concat(numberOfDays, "-day window");
2812
- var estOptions = {
2813
- timeZone: "America/New_York"
3040
+ var gmtOptions = {
3041
+ timeZone: "UTC"
2814
3042
  };
2815
3043
  var generatedLabel = now.toLocaleDateString("en-US", _objectSpread2({
2816
3044
  month: "short",
2817
3045
  day: "numeric",
2818
3046
  year: "numeric"
2819
- }, estOptions)) + " - " + now.toLocaleTimeString("en-US", _objectSpread2({
3047
+ }, gmtOptions)) + BULLET + now.toLocaleTimeString("en-US", _objectSpread2({
2820
3048
  hour: "2-digit",
2821
- minute: "2-digit"
2822
- }, estOptions)) + " EST";
3049
+ minute: "2-digit",
3050
+ hour12: false
3051
+ }, gmtOptions)) + " GMT";
2823
3052
  var dateLabel = dateName;
2824
3053
  var _normalizeFiltersText = function normalizeFiltersText(filtersInput) {
2825
3054
  if (typeof filtersInput === "string") {
@@ -2857,9 +3086,34 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
2857
3086
  return "";
2858
3087
  };
2859
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);
2860
3115
  var report = buildReportData(apiData, dateName);
2861
- var hero = report.hero,
2862
- metrics = report.metrics,
3116
+ var metrics = report.metrics,
2863
3117
  mainChart = report.mainChart,
2864
3118
  growth = report.growth,
2865
3119
  totalDonors = report.totalDonors,
@@ -2966,13 +3220,16 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
2966
3220
  label: "Email",
2967
3221
  color: C.cyan
2968
3222
  }];
2969
- var revenueTrendText = mainChart.trend || "";
2970
- var revenueTrendColor = getTrendColor(revenueTrendText, {
2971
- up: "#054835ff",
2972
- down: "#EF4444"
2973
- });
2974
- var revenueTrendBadgeBg = revenueTrendColor === "#EF4444" ? "#fee2e2" : "#8df3be9a";
2975
- 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)));
2976
3233
  var headerProps = {
2977
3234
  dateLabel: dateLabel,
2978
3235
  generatedLabel: generatedLabel,
@@ -2995,189 +3252,187 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
2995
3252
  background: THEME.pageBg,
2996
3253
  display: "flex",
2997
3254
  flexDirection: "column",
2998
- fontFamily: "'Helvetica Neue', Helvetica, Arial, sans-serif",
3255
+ fontFamily: "'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif",
2999
3256
  boxSizing: "border-box"
3000
3257
  },
3001
- children: [/*#__PURE__*/jsx(PageHeader, _objectSpread2(_objectSpread2({}, headerProps), {}, {
3002
- page: 1
3003
- })), /*#__PURE__*/jsxs("div", {
3258
+ children: [/*#__PURE__*/jsx(PageOneHeader, {
3259
+ dateLabel: dateLabel,
3260
+ generatedLabel: generatedLabel,
3261
+ windowLabel: windowLabel
3262
+ }), /*#__PURE__*/jsxs("div", {
3004
3263
  style: {
3005
3264
  flex: 1,
3006
- padding: "12px ".concat(MX, "px 10px"),
3265
+ padding: "0 ".concat(MX, "px 0"),
3007
3266
  display: "flex",
3008
- flexDirection: "column",
3009
- gap: 10
3267
+ flexDirection: "column"
3010
3268
  },
3011
- children: [/*#__PURE__*/jsx(KpiCard, {
3012
- title: "Total Raised",
3013
- value: kpi$(totalRaised),
3014
- trend: hero.trend,
3015
- detail: hero.detail,
3016
- variant: "primary"
3269
+ children: [/*#__PURE__*/jsx(ActiveFiltersBar, {
3270
+ pills: filterPills
3017
3271
  }), /*#__PURE__*/jsxs("div", {
3018
3272
  style: {
3019
- display: "grid",
3020
- gridTemplateColumns: "repeat(3, 1fr)",
3021
- gap: 7
3022
- },
3023
- children: [/*#__PURE__*/jsx(KpiCard, {
3024
- title: "Net Raised",
3025
- value: kpi$(netRaised),
3026
- 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),
3027
- detail: passThrough
3028
- }), /*#__PURE__*/jsx(KpiCard, {
3029
- title: "Total Donors",
3030
- value: ((_metricByTitle$Total = metricByTitle["Total Donors"]) === null || _metricByTitle$Total === void 0 ? void 0 : _metricByTitle$Total.value) || "".concat(formatNumber(totalDonors)),
3031
- 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),
3032
- detail: ((_metricByTitle$Total3 = metricByTitle["Total Donors"]) === null || _metricByTitle$Total3 === void 0 ? void 0 : _metricByTitle$Total3.detail) || "".concat(formatNumber(newDonors), " new - ").concat(formatNumber(returningDonors), " returning")
3033
- }), /*#__PURE__*/jsx(KpiCard, {
3034
- title: "Avg Donation",
3035
- value: kpi$(avgDonation),
3036
- 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),
3037
- detail: ((_metricByTitle$AvgDo2 = metricByTitle["Avg Donation"]) === null || _metricByTitle$AvgDo2 === void 0 ? void 0 : _metricByTitle$AvgDo2.detail) || avgDonationDetail.detail
3038
- })]
3039
- }), /*#__PURE__*/jsxs("div", {
3040
- style: {
3041
- display: "grid",
3042
- gridTemplateColumns: "repeat(3, 1fr)",
3043
- gap: 7
3044
- },
3045
- children: [/*#__PURE__*/jsx(KpiCard, {
3046
- title: "ROAS",
3047
- value: kpiRoas((_apiData$roasCard = apiData === null || apiData === void 0 ? void 0 : apiData.roasCard) !== null && _apiData$roasCard !== void 0 ? _apiData$roasCard : 0),
3048
- 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, "×"),
3049
- 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.")
3050
- }), /*#__PURE__*/jsx(KpiCard, {
3051
- title: "Conversion",
3052
- value: kpiPct(convRate),
3053
- 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"),
3054
- detail: ((_metricByTitle$Conver2 = metricByTitle.Conversion) === null || _metricByTitle$Conver2 === void 0 ? void 0 : _metricByTitle$Conver2.detail) || "".concat(formatNumber(totalDonors), " from ").concat(formatNumber(totalVisits), " visits")
3055
- }), /*#__PURE__*/jsx(KpiCard, {
3056
- title: "Refund Rate",
3057
- value: pct(refundRate, 2),
3058
- trend: ((_metricByTitle$Refund = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund === void 0 ? void 0 : _metricByTitle$Refund.trend) || signed(growthPercentage),
3059
- detail: ((_metricByTitle$Refund2 = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund2 === void 0 ? void 0 : _metricByTitle$Refund2.detail) || "".concat(formatNumber(totalRefunds), " refunds this period"),
3060
- trendPositiveWhenNegative: (_metricByTitle$Refund3 = metricByTitle["Refund Rate"]) === null || _metricByTitle$Refund3 === void 0 ? void 0 : _metricByTitle$Refund3.trendPositiveWhenNegative
3061
- })]
3062
- }), /*#__PURE__*/jsxs("div", {
3063
- style: {
3064
- border: "1px solid #E5E7EB",
3065
- borderRadius: 8,
3066
- background: "#fff",
3067
- padding: "12px 14px 10px",
3273
+ display: "flex",
3274
+ flexDirection: "column",
3275
+ gap: 10,
3276
+ marginTop: 14,
3068
3277
  flex: 1
3069
3278
  },
3070
- children: [/*#__PURE__*/jsxs("div", {
3279
+ children: [/*#__PURE__*/jsx(HeroRaisedCard, {
3280
+ value: kpi$(totalRaised),
3281
+ trend: heroTrendText,
3282
+ detail: heroDetailText
3283
+ }), /*#__PURE__*/jsxs("div", {
3071
3284
  style: {
3072
- display: "flex",
3073
- justifyContent: "space-between",
3074
- alignItems: "flex-start",
3075
- 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
3076
3335
  },
3077
3336
  children: [/*#__PURE__*/jsxs("div", {
3078
- children: [/*#__PURE__*/jsx("div", {
3079
- style: {
3080
- fontSize: 13,
3081
- fontWeight: 700,
3082
- color: "#111827",
3083
- lineHeight: 1.15
3084
- },
3085
- children: "Total revenue trend"
3086
- }), /*#__PURE__*/jsxs("div", {
3087
- style: {
3088
- fontSize: 9.5,
3089
- color: "rgba(0, 0, 0, 0.4)",
3090
- marginTop: 2,
3091
- lineHeight: 1.15
3092
- },
3093
- children: ["Last ", daysLabel, " - daily aggregation"]
3094
- }), /*#__PURE__*/jsxs("div", {
3095
- style: {
3096
- display: "flex",
3097
- alignItems: "center",
3098
- gap: 6,
3099
- marginTop: 8
3100
- },
3101
- 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", {
3102
3345
  style: {
3103
- fontSize: 22,
3346
+ fontSize: 13,
3104
3347
  fontWeight: 700,
3105
- color: "#111827"
3348
+ color: THEME.text,
3349
+ lineHeight: 1.15
3106
3350
  },
3107
- children: kpi$(totalRaised)
3108
- }), revenueTrendText && /*#__PURE__*/jsxs("span", {
3351
+ children: "Total revenue trend"
3352
+ }), /*#__PURE__*/jsxs("div", {
3109
3353
  style: {
3110
- display: "inline-flex",
3111
- alignItems: "center",
3112
- gap: 3,
3113
- background: revenueTrendBadgeBg,
3114
- color: revenueTrendColor,
3115
- padding: "2px 8px",
3116
- borderRadius: 100,
3117
- fontSize: 9.5,
3118
- fontWeight: 600
3354
+ fontSize: 9,
3355
+ color: THEME.muted,
3356
+ marginTop: 3,
3357
+ lineHeight: 1.15
3119
3358
  },
3120
- children: [revenueTrendArrow && /*#__PURE__*/jsx("span", {
3121
- children: revenueTrendArrow
3122
- }), revenueTrendText]
3123
- })]
3124
- })]
3125
- }), revSeries.length > 0 && /*#__PURE__*/jsx("div", {
3126
- style: {
3127
- display: "flex",
3128
- gap: 10,
3129
- alignItems: "center",
3130
- flexShrink: 0,
3131
- paddingTop: 2
3132
- },
3133
- children: revenueLegend.map(function (leg) {
3134
- return /*#__PURE__*/jsxs("div", {
3359
+ children: ["Last ", daysLabel, BULLET, "daily aggregation"]
3360
+ }), /*#__PURE__*/jsxs("div", {
3135
3361
  style: {
3136
3362
  display: "flex",
3137
3363
  alignItems: "center",
3138
- gap: 4
3364
+ gap: 8,
3365
+ marginTop: 10
3139
3366
  },
3140
- children: [/*#__PURE__*/jsx("div", {
3367
+ children: [/*#__PURE__*/jsx("span", {
3141
3368
  style: {
3142
- width: 8,
3143
- height: 8,
3144
- borderRadius: "50%",
3145
- background: leg.color,
3146
- flexShrink: 0
3147
- }
3148
- }), /*#__PURE__*/jsx("span", {
3149
- style: {
3150
- fontSize: 9.5,
3151
- color: "rgba(0, 0, 0, 0.6)",
3152
- fontWeight: 500
3369
+ fontSize: 22,
3370
+ fontWeight: 700,
3371
+ color: THEME.text,
3372
+ letterSpacing: "-0.3px"
3153
3373
  },
3154
- children: leg.label
3374
+ children: kpi$(totalRaised)
3375
+ }), revenueTrendText && /*#__PURE__*/jsx(TrendPill$1, {
3376
+ positive: isTrendPositive(revenueTrendText),
3377
+ children: revenueTrendText
3155
3378
  })]
3156
- }, 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
3157
3429
  })
3158
3430
  })]
3159
- }), /*#__PURE__*/jsx("div", {
3160
- style: {
3161
- width: "100%",
3162
- minHeight: 300
3163
- },
3164
- children: /*#__PURE__*/jsx(RevenueChart, {
3165
- id: "pdf-total-revenue-trend",
3166
- metric: "Revenue",
3167
- series: revSeries,
3168
- categories: revCats,
3169
- height: 300,
3170
- stacked: (_mainChart$stacked = mainChart.stacked) !== null && _mainChart$stacked !== void 0 ? _mainChart$stacked : true,
3171
- type: "area",
3172
- colors: mainChart.colors || ["#6366F1", "#10B981", "#06B6D4"],
3173
- showLegend: false
3174
- })
3175
3431
  })]
3176
3432
  })]
3177
- }), /*#__PURE__*/jsx(PageFooter, {
3178
- generatedBy: name,
3179
- generatedLabel: generatedLabel,
3180
- page: 1
3433
+ }), /*#__PURE__*/jsx(PageOneFooter, {
3434
+ generatedBy: name || "Ahmad Hassan",
3435
+ generatedLabel: generatedLabel
3181
3436
  })]
3182
3437
  }), /*#__PURE__*/jsxs("div", {
3183
3438
  "data-export-page": "2",
@@ -3495,10 +3750,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
3495
3750
  display: "flex",
3496
3751
  gap: 12
3497
3752
  },
3498
- 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) {
3499
- var _ref16 = _slicedToArray(_ref15, 2),
3500
- l = _ref16[0],
3501
- 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];
3502
3757
  return /*#__PURE__*/jsxs("div", {
3503
3758
  children: [/*#__PURE__*/jsx("div", {
3504
3759
  style: {
@@ -3571,10 +3826,10 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
3571
3826
  display: "flex",
3572
3827
  gap: 12
3573
3828
  },
3574
- 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) {
3575
- var _ref18 = _slicedToArray(_ref17, 2),
3576
- l = _ref18[0],
3577
- 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];
3578
3833
  return /*#__PURE__*/jsxs("div", {
3579
3834
  children: [/*#__PURE__*/jsx("div", {
3580
3835
  style: {