@ammarkhalidfarooq/dashboard-package 0.6.39 → 0.6.40

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
@@ -8,6 +8,49 @@ import Box$1 from '@mui/material/Box';
8
8
  import Typography$1 from '@mui/material/Typography';
9
9
  import ReactApexChart from 'react-apexcharts';
10
10
 
11
+ var theme = createTheme({
12
+ cssVariables: true,
13
+ // Enable CSS variables for better SSR support
14
+ typography: {
15
+ fontFamily: ["var(--font-league-spartan)", "var(--font-noto-sans-arabic)",
16
+ // Added as a fallback for Arabic text
17
+ "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica Neue", "Arial", "sans-serif", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"].join(",")
18
+ },
19
+ palette: {
20
+ primary: {
21
+ main: "#6363E6",
22
+ mainLight: "#F7F7FF",
23
+ light: "#FFFFFF",
24
+ gray: "#A1A1A8",
25
+ lightGreen: "#E1FBF2",
26
+ green: "#0CAB72",
27
+ red: "#E61D1D",
28
+ lightRed: "#FFEDED",
29
+ lightGray: "#E9E9EB",
30
+ darkGray: "#606062",
31
+ dark: "#090909"
32
+ },
33
+ text: {
34
+ primary: "#666666"
35
+ },
36
+ secondary: {
37
+ main: "#E0C2FF",
38
+ light: "#F5EBFF",
39
+ // dark: will be calculated from palette.secondary.main,
40
+ contrastText: "#47008F"
41
+ },
42
+ white: {
43
+ main: "#FFFFFF",
44
+ light: "#F8F8F8"
45
+ },
46
+ gradients: {
47
+ primary: "linear-gradient(90deg, #6363E6 0.05%, #59C9F9 99.96%)",
48
+ secondary: "linear-gradient(180deg, #E9E9FF 0%, #C9EEFF 100%)"
49
+ // You can add more gradients if needed
50
+ }
51
+ }
52
+ });
53
+
11
54
  function _arrayLikeToArray(r, a) {
12
55
  (null == a || a > r.length) && (a = r.length);
13
56
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
@@ -254,49 +297,6 @@ function _unsupportedIterableToArray(r, a) {
254
297
  }
255
298
  }
256
299
 
257
- var theme = createTheme({
258
- cssVariables: true,
259
- // Enable CSS variables for better SSR support
260
- typography: {
261
- fontFamily: ["var(--font-league-spartan)", "var(--font-noto-sans-arabic)",
262
- // Added as a fallback for Arabic text
263
- "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica Neue", "Arial", "sans-serif", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"].join(",")
264
- },
265
- palette: {
266
- primary: {
267
- main: "#6363E6",
268
- mainLight: "#F7F7FF",
269
- light: "#FFFFFF",
270
- gray: "#A1A1A8",
271
- lightGreen: "#E1FBF2",
272
- green: "#0CAB72",
273
- red: "#E61D1D",
274
- lightRed: "#FFEDED",
275
- lightGray: "#E9E9EB",
276
- darkGray: "#606062",
277
- dark: "#090909"
278
- },
279
- text: {
280
- primary: "#666666"
281
- },
282
- secondary: {
283
- main: "#E0C2FF",
284
- light: "#F5EBFF",
285
- // dark: will be calculated from palette.secondary.main,
286
- contrastText: "#47008F"
287
- },
288
- white: {
289
- main: "#FFFFFF",
290
- light: "#F8F8F8"
291
- },
292
- gradients: {
293
- primary: "linear-gradient(90deg, #6363E6 0.05%, #59C9F9 99.96%)",
294
- secondary: "linear-gradient(180deg, #E9E9FF 0%, #C9EEFF 100%)"
295
- // You can add more gradients if needed
296
- }
297
- }
298
- });
299
-
300
300
  var MetricSelector = function MetricSelector(_ref) {
301
301
  var metric = _ref.metric,
302
302
  onMetricChange = _ref.onMetricChange,
@@ -932,12 +932,6 @@ var Dashboard = function Dashboard(_ref) {
932
932
  numberOfDays = _ref$numberOfDays === void 0 ? 1 : _ref$numberOfDays,
933
933
  _ref$activeFilters = _ref.activeFilters,
934
934
  activeFilters = _ref$activeFilters === void 0 ? [] : _ref$activeFilters;
935
- console.log("[Dashboard] activeFilters prop:", {
936
- value: activeFilters,
937
- type: _typeof(activeFilters),
938
- isArray: Array.isArray(activeFilters),
939
- length: Array.isArray(activeFilters) ? activeFilters.length : undefined
940
- });
941
935
  return /*#__PURE__*/jsx(ThemeProvider, {
942
936
  theme: theme,
943
937
  children: /*#__PURE__*/jsx(Suspense, {
@@ -2240,13 +2234,6 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref1, ref) {
2240
2234
  return "";
2241
2235
  };
2242
2236
  var formattedActiveFilters = _normalizeFiltersText(activeFilters);
2243
- console.log("[ExportPdfLayout] activeFilters prop received:", {
2244
- value: activeFilters,
2245
- type: _typeof(activeFilters),
2246
- isArray: Array.isArray(activeFilters),
2247
- length: Array.isArray(activeFilters) ? activeFilters.length : undefined
2248
- });
2249
- console.log("[ExportPdfLayout] formattedActiveFilters:", formattedActiveFilters);
2250
2237
  var report = buildReportData(apiData, dateName);
2251
2238
  var hero = report.hero,
2252
2239
  metrics = report.metrics,
@@ -3232,14 +3219,6 @@ var NewOverview = function NewOverview(_ref) {
3232
3219
  exportFiltersSnapshot = _useState8[0],
3233
3220
  setExportFiltersSnapshot = _useState8[1];
3234
3221
  var exportLayoutRef = useRef(null);
3235
- useEffect(function () {
3236
- console.log("[NewOverview] activeFilters prop changed:", {
3237
- value: activeFilters,
3238
- type: _typeof(activeFilters),
3239
- isArray: Array.isArray(activeFilters),
3240
- length: Array.isArray(activeFilters) ? activeFilters.length : undefined
3241
- });
3242
- }, [activeFilters]);
3243
3222
  useEffect(function () {
3244
3223
  if (activeSectionProp) {
3245
3224
  var capitalized = activeSectionProp.charAt(0).toUpperCase() + activeSectionProp.slice(1).toLowerCase();
@@ -3250,25 +3229,10 @@ var NewOverview = function NewOverview(_ref) {
3250
3229
  // Step 1 – mount the off-screen export layout whenever the trigger fires
3251
3230
  useEffect(function () {
3252
3231
  if (exportTrigger > 0) {
3253
- console.log("[NewOverview] exportTrigger received:", exportTrigger);
3254
- console.log("[NewOverview] snapshotting filters for export:", {
3255
- value: activeFilters,
3256
- type: _typeof(activeFilters),
3257
- isArray: Array.isArray(activeFilters),
3258
- length: Array.isArray(activeFilters) ? activeFilters.length : undefined
3259
- });
3260
3232
  setExportFiltersSnapshot(activeFilters);
3261
3233
  setShowExportLayout(true);
3262
3234
  }
3263
3235
  }, [exportTrigger, activeFilters]);
3264
- useEffect(function () {
3265
- console.log("[NewOverview] exportFiltersSnapshot updated:", {
3266
- value: exportFiltersSnapshot,
3267
- type: _typeof(exportFiltersSnapshot),
3268
- isArray: Array.isArray(exportFiltersSnapshot),
3269
- length: Array.isArray(exportFiltersSnapshot) ? exportFiltersSnapshot.length : undefined
3270
- });
3271
- }, [exportFiltersSnapshot]);
3272
3236
 
3273
3237
  // Step 2 – once the layout is in the DOM, capture each page and build the PDF
3274
3238
  useEffect(function () {
@@ -3280,8 +3244,6 @@ var NewOverview = function NewOverview(_ref) {
3280
3244
  while (1) switch (_context.p = _context.n) {
3281
3245
  case 0:
3282
3246
  _context.p = 0;
3283
- console.log("[NewOverview] starting PDF export with snapshot:", exportFiltersSnapshot);
3284
- // Allow SVG layout to paint before capture
3285
3247
  _context.n = 1;
3286
3248
  return new Promise(function (r) {
3287
3249
  return requestAnimationFrame(function () {
@@ -3305,7 +3267,6 @@ var NewOverview = function NewOverview(_ref) {
3305
3267
  _context.n = 4;
3306
3268
  return exportReportPdf(container, "DashboardOverview_report_".concat(safeDate, ".pdf"));
3307
3269
  case 4:
3308
- console.log("[NewOverview] PDF export completed");
3309
3270
  _context.n = 6;
3310
3271
  break;
3311
3272
  case 5: