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