@ammarkhalidfarooq/dashboard-package 0.5.18 → 0.5.19

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
@@ -1834,33 +1834,30 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1834
1834
  gap: 8,
1835
1835
  overflow: "hidden"
1836
1836
  },
1837
- children: [/*#__PURE__*/jsx(Panel, {
1838
- title: "Active campaigns",
1839
- subtitle: "Live fundraisers ranked by velocity",
1840
- action: "View all \u2192",
1841
- children: /*#__PURE__*/jsx(MiniTable, {
1842
- head: ["CAMPAIGN", "RAISED", "PROGRESS", "DONORS", "AVG GIFT", "STATUS"],
1843
- rows: campaigns.length ? campaigns.map(function (c) {
1844
- return [c.title || "Untitled", d$(c.collectedAmount || 0), "".concat(Math.round((c.collectedAmount || 0) / (c.usdTargetAmount || 1) * 100), "%"), "".concat(formatNumber(c.uniqueDonationsCount || 0)), d$(c.avgGift || 0), c.status || "Active"];
1845
- }) : [["-", "$0", "0%", "0", "$0", "-"]]
1846
- })
1847
- }), /*#__PURE__*/jsxs("div", {
1837
+ children: [/*#__PURE__*/jsxs("div", {
1848
1838
  style: {
1849
- display: "flex",
1850
- gap: 8,
1851
- flexShrink: 0
1839
+ display: "grid",
1840
+ gridTemplateColumns: "2.2fr 1fr",
1841
+ gap: 8
1852
1842
  },
1853
1843
  children: [/*#__PURE__*/jsx(Panel, {
1844
+ title: "Active campaigns",
1845
+ subtitle: "Live fundraisers ranked by velocity",
1846
+ action: "View all \u2192",
1847
+ children: /*#__PURE__*/jsx(MiniTable, {
1848
+ head: ["CAMPAIGN", "RAISED", "PROGRESS", "DONORS", "AVG GIFT", "STATUS"],
1849
+ rows: campaigns.length ? campaigns.map(function (c) {
1850
+ return [c.title || "Untitled", d$(c.collectedAmount || 0), "".concat(Math.round((c.collectedAmount || 0) / (c.usdTargetAmount || 1) * 100), "%"), "".concat(formatNumber(c.uniqueDonationsCount || 0)), d$(c.avgGift || 0), c.status || "Active"];
1851
+ }) : [["-", "$0", "0%", "0", "$0", "-"]]
1852
+ })
1853
+ }), /*#__PURE__*/jsx(Panel, {
1854
1854
  title: "Donor mix",
1855
1855
  subtitle: "Acquisition vs retention",
1856
- style: {
1857
- flex: 1
1858
- },
1859
1856
  children: /*#__PURE__*/jsxs("div", {
1860
1857
  style: {
1861
1858
  display: "flex",
1862
1859
  alignItems: "center",
1863
- gap: 14
1860
+ gap: 10
1864
1861
  },
1865
1862
  children: [/*#__PURE__*/jsx(Donut, {
1866
1863
  segments: [{
@@ -1870,7 +1867,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1870
1867
  value: returningDonors,
1871
1868
  color: C.emerald
1872
1869
  }],
1873
- size: 88,
1870
+ size: 82,
1874
1871
  centerVal: "".concat(formatNumber(totalMix)),
1875
1872
  centerLabel: "donors"
1876
1873
  }), /*#__PURE__*/jsxs("div", {
@@ -1886,15 +1883,15 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1886
1883
  },
1887
1884
  children: [/*#__PURE__*/jsx("div", {
1888
1885
  style: {
1889
- width: 9,
1890
- height: 9,
1886
+ width: 8,
1887
+ height: 8,
1891
1888
  borderRadius: "50%",
1892
1889
  background: C.indigo,
1893
1890
  flexShrink: 0
1894
1891
  }
1895
1892
  }), /*#__PURE__*/jsxs("span", {
1896
1893
  style: {
1897
- fontSize: 10,
1894
+ fontSize: 9.5,
1898
1895
  color: "#374151"
1899
1896
  },
1900
1897
  children: ["New donors ", formatNumber(newDonors), " \xB7 ", newPct, "%"]
@@ -1904,28 +1901,28 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1904
1901
  display: "flex",
1905
1902
  alignItems: "center",
1906
1903
  gap: 6,
1907
- marginBottom: 9
1904
+ marginBottom: 7
1908
1905
  },
1909
1906
  children: [/*#__PURE__*/jsx("div", {
1910
1907
  style: {
1911
- width: 9,
1912
- height: 9,
1908
+ width: 8,
1909
+ height: 8,
1913
1910
  borderRadius: "50%",
1914
1911
  background: C.emerald,
1915
1912
  flexShrink: 0
1916
1913
  }
1917
1914
  }), /*#__PURE__*/jsxs("span", {
1918
1915
  style: {
1919
- fontSize: 10,
1916
+ fontSize: 9.5,
1920
1917
  color: "#374151"
1921
1918
  },
1922
1919
  children: ["Returning ", formatNumber(returningDonors), " \xB7 ", retPct, "%"]
1923
1920
  })]
1924
1921
  }), /*#__PURE__*/jsx(Divider, {
1925
- mb: 7
1922
+ mb: 6
1926
1923
  }), /*#__PURE__*/jsx("div", {
1927
1924
  style: {
1928
- fontSize: 15,
1925
+ fontSize: 14,
1929
1926
  fontWeight: 800,
1930
1927
  color: "#111827"
1931
1928
  },
@@ -1942,16 +1939,20 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1942
1939
  color: "#16A34A",
1943
1940
  marginTop: 1
1944
1941
  },
1945
- children: [signed(growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations), " vs ", dateLabel]
1942
+ children: [signed((growth === null || growth === void 0 ? void 0 : growth.overallAVGDonations) || 8.4), " vs last month"]
1946
1943
  })]
1947
1944
  })]
1948
1945
  })
1949
- }), /*#__PURE__*/jsx(Panel, {
1946
+ })]
1947
+ }), /*#__PURE__*/jsxs("div", {
1948
+ style: {
1949
+ display: "grid",
1950
+ gridTemplateColumns: "repeat(4, 1fr)",
1951
+ gap: 8
1952
+ },
1953
+ children: [/*#__PURE__*/jsx(Panel, {
1950
1954
  title: "Recurring vs one-time",
1951
1955
  subtitle: "Donation type \xB7 weekly",
1952
- style: {
1953
- flex: 1
1954
- },
1955
1956
  children: function () {
1956
1957
  var tot = recurringTotal + oneTimeTotal || 1;
1957
1958
  var rPct = recurringTotal / tot * 100;
@@ -1960,7 +1961,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1960
1961
  style: {
1961
1962
  display: "flex",
1962
1963
  flexDirection: "column",
1963
- gap: 10,
1964
+ gap: 9,
1964
1965
  marginTop: 4
1965
1966
  },
1966
1967
  children: [/*#__PURE__*/jsxs("div", {
@@ -1972,13 +1973,13 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1972
1973
  },
1973
1974
  children: [/*#__PURE__*/jsx("span", {
1974
1975
  style: {
1975
- fontSize: 10,
1976
+ fontSize: 9.5,
1976
1977
  color: "#374151"
1977
1978
  },
1978
1979
  children: "Recurring"
1979
1980
  }), /*#__PURE__*/jsx("span", {
1980
1981
  style: {
1981
- fontSize: 10,
1982
+ fontSize: 9.5,
1982
1983
  fontWeight: 700,
1983
1984
  color: "#111827"
1984
1985
  },
@@ -1986,7 +1987,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
1986
1987
  })]
1987
1988
  }), /*#__PURE__*/jsx("div", {
1988
1989
  style: {
1989
- height: 10,
1990
+ height: 9,
1990
1991
  background: "#EEF2FF",
1991
1992
  borderRadius: 3
1992
1993
  },
@@ -2008,13 +2009,13 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2008
2009
  },
2009
2010
  children: [/*#__PURE__*/jsx("span", {
2010
2011
  style: {
2011
- fontSize: 10,
2012
+ fontSize: 9.5,
2012
2013
  color: "#374151"
2013
2014
  },
2014
2015
  children: "One-time"
2015
2016
  }), /*#__PURE__*/jsx("span", {
2016
2017
  style: {
2017
- fontSize: 10,
2018
+ fontSize: 9.5,
2018
2019
  fontWeight: 700,
2019
2020
  color: "#111827"
2020
2021
  },
@@ -2022,7 +2023,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2022
2023
  })]
2023
2024
  }), /*#__PURE__*/jsx("div", {
2024
2025
  style: {
2025
- height: 10,
2026
+ height: 9,
2026
2027
  background: "#EEF2FF",
2027
2028
  borderRadius: 3
2028
2029
  },
@@ -2038,19 +2039,9 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2038
2039
  })]
2039
2040
  });
2040
2041
  }()
2041
- })]
2042
- }), /*#__PURE__*/jsxs("div", {
2043
- style: {
2044
- display: "flex",
2045
- gap: 8,
2046
- flexShrink: 0
2047
- },
2048
- children: [/*#__PURE__*/jsx(Panel, {
2042
+ }), /*#__PURE__*/jsx(Panel, {
2049
2043
  title: "Donor geography",
2050
2044
  subtitle: "Top countries \xB7 ".concat(formatNumber(totalDonors), " total"),
2051
- style: {
2052
- flex: 1
2053
- },
2054
2045
  children: (geoList.length ? geoList.slice(0, 6) : []).map(function (g, i) {
2055
2046
  return /*#__PURE__*/jsxs("div", {
2056
2047
  style: {
@@ -2061,13 +2052,13 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2061
2052
  },
2062
2053
  children: [/*#__PURE__*/jsx("span", {
2063
2054
  style: {
2064
- fontSize: 9.5,
2055
+ fontSize: 9,
2065
2056
  color: "#374151"
2066
2057
  },
2067
2058
  children: g.country || g.name || "-"
2068
2059
  }), /*#__PURE__*/jsxs("span", {
2069
2060
  style: {
2070
- fontSize: 9.5,
2061
+ fontSize: 9,
2071
2062
  color: "#6B7280"
2072
2063
  },
2073
2064
  children: [formatNumber(g.totalDonors || g.donors || 0), " \xB7 ", formatNumber(g.percentage || 0), "%"]
@@ -2077,14 +2068,11 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2077
2068
  }), /*#__PURE__*/jsxs(Panel, {
2078
2069
  title: "Refunds & chargebacks",
2079
2070
  subtitle: "Trust health \xB7 30-day window",
2080
- style: {
2081
- flex: 1
2082
- },
2083
2071
  children: [/*#__PURE__*/jsxs("div", {
2084
2072
  style: {
2085
2073
  display: "flex",
2086
- gap: 18,
2087
- marginBottom: 8
2074
+ gap: 12,
2075
+ marginBottom: 7
2088
2076
  },
2089
2077
  children: [/*#__PURE__*/jsxs("div", {
2090
2078
  children: [/*#__PURE__*/jsx("div", {
@@ -2098,18 +2086,18 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2098
2086
  children: "REFUNDS"
2099
2087
  }), /*#__PURE__*/jsx("div", {
2100
2088
  style: {
2101
- fontSize: 18,
2089
+ fontSize: 15,
2102
2090
  fontWeight: 800,
2103
2091
  color: "#111827"
2104
2092
  },
2105
2093
  children: pct(refundRate, 1)
2106
2094
  }), /*#__PURE__*/jsx("div", {
2107
2095
  style: {
2108
- fontSize: 9.5,
2109
- color: "#16A34A",
2096
+ fontSize: 9,
2097
+ color: "#DC2626",
2110
2098
  fontWeight: 600
2111
2099
  },
2112
- children: signed(refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundRateChange, "pp")
2100
+ children: signed((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundRateChange) || -0.3, "pp")
2113
2101
  })]
2114
2102
  }), /*#__PURE__*/jsxs("div", {
2115
2103
  children: [/*#__PURE__*/jsx("div", {
@@ -2123,47 +2111,48 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2123
2111
  children: "CHARGEBACKS"
2124
2112
  }), /*#__PURE__*/jsx("div", {
2125
2113
  style: {
2126
- fontSize: 18,
2114
+ fontSize: 15,
2127
2115
  fontWeight: 800,
2128
2116
  color: "#111827"
2129
2117
  },
2130
2118
  children: pct(chargebackRate, 1)
2131
2119
  }), /*#__PURE__*/jsx("div", {
2132
2120
  style: {
2133
- fontSize: 9.5,
2121
+ fontSize: 9,
2134
2122
  color: "#9CA3AF"
2135
2123
  },
2136
2124
  children: "stable"
2137
2125
  })]
2138
2126
  })]
2139
2127
  }), /*#__PURE__*/jsx(Divider, {
2140
- mb: 6
2128
+ mb: 5
2141
2129
  }), /*#__PURE__*/jsxs("div", {
2142
2130
  style: {
2143
- fontSize: 8.5,
2131
+ fontSize: 8,
2144
2132
  color: "#6B7280",
2145
- lineHeight: 1.5
2133
+ lineHeight: 1.45
2146
2134
  },
2147
2135
  children: [d$((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.refundAmount) || 0), " refunded \xB7 ", d$((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.disputedAmount) || 0), " disputed \xB7 ", formatNumber((refundsRaw === null || refundsRaw === void 0 ? void 0 : refundsRaw.casesLost) || 0), " cases lost"]
2148
2136
  })]
2149
2137
  }), /*#__PURE__*/jsx(Panel, {
2150
2138
  title: "Traffic source",
2151
2139
  subtitle: "Revenue by channel \xB7 30 days",
2152
- style: {
2153
- flex: 1
2154
- },
2155
2140
  children: /*#__PURE__*/jsx(MiniTable, {
2156
2141
  head: ["SOURCE", "REVENUE", "SHARE"],
2157
2142
  rows: [].concat(_toConsumableArray(trafficItems.map(function (t) {
2158
2143
  return [t.source || t.name || "-", d$(t.revenue || t.raised || 0), "".concat(formatNumber(t.share || t.percentage || 0), "%")];
2159
2144
  })), _toConsumableArray(trafficItems.length ? [["Total", d$(trafficTotal), ""]] : []))
2160
2145
  })
2161
- }), /*#__PURE__*/jsxs(Panel, {
2146
+ })]
2147
+ }), /*#__PURE__*/jsxs("div", {
2148
+ style: {
2149
+ display: "grid",
2150
+ gridTemplateColumns: "repeat(4, 1fr)",
2151
+ gap: 8
2152
+ },
2153
+ children: [/*#__PURE__*/jsxs(Panel, {
2162
2154
  title: "Order Bump",
2163
2155
  subtitle: "Revenue trend \xB7 last 30 days",
2164
- style: {
2165
- flex: 1
2166
- },
2167
2156
  children: [/*#__PURE__*/jsx("div", {
2168
2157
  style: {
2169
2158
  fontSize: 17,
@@ -2178,7 +2167,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2178
2167
  fontWeight: 600,
2179
2168
  marginBottom: 5
2180
2169
  },
2181
- children: [signed(ob === null || ob === void 0 ? void 0 : ob.growthPercentage), " vs ", dateLabel]
2170
+ children: [signed((ob === null || ob === void 0 ? void 0 : ob.growthPercentage) || 8.7), " vs last month"]
2182
2171
  }), /*#__PURE__*/jsx(Sparkline, {
2183
2172
  data: obData.length ? obData : [0, 1],
2184
2173
  color: C.indigo,
@@ -2214,19 +2203,9 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2214
2203
  }, l);
2215
2204
  })
2216
2205
  })]
2217
- })]
2218
- }), /*#__PURE__*/jsxs("div", {
2219
- style: {
2220
- display: "flex",
2221
- gap: 8,
2222
- flexShrink: 0
2223
- },
2224
- children: [/*#__PURE__*/jsx(Panel, {
2206
+ }), /*#__PURE__*/jsx(Panel, {
2225
2207
  title: "Upsell",
2226
2208
  subtitle: "Acceptance & raised",
2227
- style: {
2228
- flex: 1
2229
- },
2230
2209
  children: /*#__PURE__*/jsxs("div", {
2231
2210
  style: {
2232
2211
  display: "flex",
@@ -2262,9 +2241,6 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2262
2241
  }), /*#__PURE__*/jsx(Panel, {
2263
2242
  title: "Downsell",
2264
2243
  subtitle: "Acceptance & raised",
2265
- style: {
2266
- flex: 1
2267
- },
2268
2244
  children: /*#__PURE__*/jsxs("div", {
2269
2245
  style: {
2270
2246
  display: "flex",
@@ -2300,9 +2276,6 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2300
2276
  }), /*#__PURE__*/jsxs(Panel, {
2301
2277
  title: "Referrals",
2302
2278
  subtitle: "Revenue trend \xB7 last 30 days",
2303
- style: {
2304
- flex: 1
2305
- },
2306
2279
  children: [/*#__PURE__*/jsx("div", {
2307
2280
  style: {
2308
2281
  fontSize: 17,
@@ -2317,7 +2290,7 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2317
2290
  fontWeight: 600,
2318
2291
  marginBottom: 5
2319
2292
  },
2320
- children: [signed(refCard === null || refCard === void 0 ? void 0 : refCard.growthPercentage), " vs ", dateLabel]
2293
+ children: [signed((refCard === null || refCard === void 0 ? void 0 : refCard.growthPercentage) || 9.1), " vs last month"]
2321
2294
  }), /*#__PURE__*/jsx(Sparkline, {
2322
2295
  data: refData.length ? refData : [0, 1],
2323
2296
  color: C.emerald,