@ammarkhalidfarooq/dashboard-package 0.6.121 → 0.6.123

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
@@ -1,5 +1,5 @@
1
1
  import React, { Suspense, lazy, useState, useRef, useEffect, useMemo } from 'react';
2
- import { Box, Button, Menu, MenuItem, Grid, Card, CardContent, Typography, IconButton, ThemeProvider, CircularProgress, Avatar, LinearProgress, Stack, TableContainer, Table, TableHead, TableRow, TableCell, TableBody, Skeleton } from '@mui/material';
2
+ import { Box, Button, Menu, MenuItem, useTheme as useTheme$1, useMediaQuery, Grid, Card, CardContent, Typography, IconButton, ThemeProvider, CircularProgress, Avatar, LinearProgress, Stack, TableContainer, Table, TableHead, TableRow, TableCell, TableBody, Skeleton } from '@mui/material';
3
3
  import { MoreHoriz, TrendingDown, TrendingUp, MoreVert, Check, InfoOutlined, Settings, PeopleAltOutlined, RequestQuoteOutlined, PaidOutlined, PersonOutlined, IndeterminateCheckBoxOutlined, FavoriteOutlined, SearchOutlined, HighlightOff, Email } from '@mui/icons-material';
4
4
  import { createTheme, useTheme } from '@mui/material/styles';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -462,7 +462,9 @@ var RevenueChart = function RevenueChart(_ref) {
462
462
  _ref$showLegend = _ref.showLegend,
463
463
  showLegend = _ref$showLegend === void 0 ? true : _ref$showLegend,
464
464
  _ref$isAmount = _ref.isAmount,
465
- isAmount = _ref$isAmount === void 0 ? false : _ref$isAmount;
465
+ isAmount = _ref$isAmount === void 0 ? false : _ref$isAmount,
466
+ _ref$xAxisTickAmount = _ref.xAxisTickAmount,
467
+ xAxisTickAmount = _ref$xAxisTickAmount === void 0 ? 5 : _ref$xAxisTickAmount;
466
468
  var theme = useTheme();
467
469
  var isRadial = type === 'donut' || type === 'pie';
468
470
  var isCurrency = isAmount || (metric === null || metric === void 0 ? void 0 : metric.toLowerCase()) === 'revenue';
@@ -559,7 +561,7 @@ var RevenueChart = function RevenueChart(_ref) {
559
561
  axisTicks: {
560
562
  show: false
561
563
  },
562
- tickAmount: 5,
564
+ tickAmount: xAxisTickAmount,
563
565
  labels: {
564
566
  rotate: 0,
565
567
  rotateAlways: false,
@@ -657,6 +659,8 @@ var RenderChartCard = function RenderChartCard(_ref) {
657
659
  cardSx = _ref$cardSx === void 0 ? {} : _ref$cardSx,
658
660
  _ref$contentSx = _ref.contentSx,
659
661
  contentSx = _ref$contentSx === void 0 ? {} : _ref$contentSx;
662
+ var theme = useTheme$1();
663
+ var isMobile = useMediaQuery(theme.breakpoints.down("sm"));
660
664
  var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
661
665
  var trendText = item.trend || "18%";
662
666
  var trendColor = getTrendColor(trendText, {
@@ -884,7 +888,8 @@ var RenderChartCard = function RenderChartCard(_ref) {
884
888
  stacked: item.stacked,
885
889
  type: type || item.type || "area",
886
890
  colors: item.colors,
887
- showLegend: !item.hideControls
891
+ showLegend: !item.hideControls,
892
+ xAxisTickAmount: isMobile ? 3 : 5
888
893
  }), item.hideControls && item.series && /*#__PURE__*/jsx(Box, {
889
894
  sx: {
890
895
  display: {
@@ -19599,9 +19604,9 @@ var EmailSection = function EmailSection(_ref) {
19599
19604
  _ref$numberOfDays = _ref.numberOfDays,
19600
19605
  numberOfDays = _ref$numberOfDays === void 0 ? 30 : _ref$numberOfDays;
19601
19606
  var _useState = useState("Total Raised"),
19602
- _useState2 = _slicedToArray(_useState, 2),
19603
- activeMetric = _useState2[0],
19604
- setActiveMetric = _useState2[1];
19607
+ _useState2 = _slicedToArray(_useState, 2);
19608
+ _useState2[0];
19609
+ _useState2[1];
19605
19610
  var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
19606
19611
  var overview = (apiData === null || apiData === void 0 ? void 0 : apiData.overview) || {};
19607
19612
  var overviewGrowth = (overview === null || overview === void 0 ? void 0 : overview.growthPercentage) || {};
@@ -19830,11 +19835,10 @@ var EmailSection = function EmailSection(_ref) {
19830
19835
  value: metricInfo[title].value,
19831
19836
  caption: metricInfo[title].subValue,
19832
19837
  icon: metricInfo[title].icon,
19833
- error: metricInfo[title].error,
19834
- active: activeMetric === title,
19835
- onClick: function onClick() {
19836
- return setActiveMetric(title);
19837
- },
19838
+ error: metricInfo[title].error
19839
+ // active={activeMetric === title}
19840
+ // onClick={() => setActiveMetric(title)}
19841
+ ,
19838
19842
  sx: metricInfo[title].error ? {
19839
19843
  border: "2px solid #ef4444",
19840
19844
  bgcolor: "#fffafa"