@ammarkhalidfarooq/dashboard-package 0.6.123 → 0.6.125
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/MetricCard.cjs.js.map +1 -1
- package/dist/MetricCard.es.js.map +1 -1
- package/dist/RenderChartCard.cjs.js +4 -6
- package/dist/RenderChartCard.cjs.js.map +1 -1
- package/dist/RenderChartCard.es.js +6 -8
- package/dist/RenderChartCard.es.js.map +1 -1
- package/dist/index.cjs.js +17 -28
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +20 -31
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.d.js +0 -2
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Suspense, lazy, useState, useRef, useEffect, useMemo } from 'react';
|
|
2
|
-
import { Box, Button, Menu, MenuItem, useTheme
|
|
2
|
+
import { Box, Button, Menu, MenuItem, useTheme, 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
|
-
import { createTheme
|
|
4
|
+
import { createTheme } from '@mui/material/styles';
|
|
5
5
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import Grid$1 from '@mui/material/Grid';
|
|
7
7
|
import Box$1 from '@mui/material/Box';
|
|
@@ -430,19 +430,10 @@ function getTrendArrow(valueOrText) {
|
|
|
430
430
|
return "";
|
|
431
431
|
}
|
|
432
432
|
function formatCurrency(value) {
|
|
433
|
-
return "$".concat(Number(value !== null && value !== void 0 ? value : 0).
|
|
433
|
+
return "$".concat(Number(value !== null && value !== void 0 ? value : 0).toFixed(2));
|
|
434
434
|
}
|
|
435
435
|
function formatNumber(num) {
|
|
436
|
-
|
|
437
|
-
return (num / 1000000000).toFixed(1).replace(/\.0$/, "") + "B";
|
|
438
|
-
}
|
|
439
|
-
if (num >= 1000000) {
|
|
440
|
-
return (num / 1000000).toFixed(1).replace(/\.0$/, "") + "M";
|
|
441
|
-
}
|
|
442
|
-
if (num >= 1000) {
|
|
443
|
-
return (num / 1000).toFixed(1).replace(/\.0$/, "") + "K";
|
|
444
|
-
}
|
|
445
|
-
return (num !== null && num !== void 0 ? num : 0).toString();
|
|
436
|
+
return Number(num !== null && num !== void 0 ? num : 0).toFixed(2);
|
|
446
437
|
}
|
|
447
438
|
|
|
448
439
|
var RevenueChart = function RevenueChart(_ref) {
|
|
@@ -465,7 +456,6 @@ var RevenueChart = function RevenueChart(_ref) {
|
|
|
465
456
|
isAmount = _ref$isAmount === void 0 ? false : _ref$isAmount,
|
|
466
457
|
_ref$xAxisTickAmount = _ref.xAxisTickAmount,
|
|
467
458
|
xAxisTickAmount = _ref$xAxisTickAmount === void 0 ? 5 : _ref$xAxisTickAmount;
|
|
468
|
-
var theme = useTheme();
|
|
469
459
|
var isRadial = type === 'donut' || type === 'pie';
|
|
470
460
|
var isCurrency = isAmount || (metric === null || metric === void 0 ? void 0 : metric.toLowerCase()) === 'revenue';
|
|
471
461
|
var isPercent = (metric === null || metric === void 0 ? void 0 : metric.toLowerCase()) === 'percent';
|
|
@@ -490,7 +480,7 @@ var RevenueChart = function RevenueChart(_ref) {
|
|
|
490
480
|
enabled: false
|
|
491
481
|
}
|
|
492
482
|
},
|
|
493
|
-
colors: colors || [
|
|
483
|
+
colors: colors || ['#4F46E5', '#4B4BC2', '#7E7EE6', '#A3A3F0', '#C8C8FA'],
|
|
494
484
|
tooltip: {
|
|
495
485
|
theme: 'light',
|
|
496
486
|
y: {
|
|
@@ -659,7 +649,7 @@ var RenderChartCard = function RenderChartCard(_ref) {
|
|
|
659
649
|
cardSx = _ref$cardSx === void 0 ? {} : _ref$cardSx,
|
|
660
650
|
_ref$contentSx = _ref.contentSx,
|
|
661
651
|
contentSx = _ref$contentSx === void 0 ? {} : _ref$contentSx;
|
|
662
|
-
var theme = useTheme
|
|
652
|
+
var theme = useTheme();
|
|
663
653
|
var isMobile = useMediaQuery(theme.breakpoints.down("sm"));
|
|
664
654
|
var daysLabel = "".concat(numberOfDays, " day").concat(numberOfDays === 1 ? "" : "s");
|
|
665
655
|
var trendText = item.trend || "18%";
|
|
@@ -816,7 +806,7 @@ var RenderChartCard = function RenderChartCard(_ref) {
|
|
|
816
806
|
},
|
|
817
807
|
children: [{
|
|
818
808
|
label: "Paid Ads",
|
|
819
|
-
color: "#
|
|
809
|
+
color: "#4F46E5"
|
|
820
810
|
}, {
|
|
821
811
|
label: "Organic",
|
|
822
812
|
color: "#10B981"
|
|
@@ -903,7 +893,7 @@ var RenderChartCard = function RenderChartCard(_ref) {
|
|
|
903
893
|
},
|
|
904
894
|
children: [{
|
|
905
895
|
label: "Paid Ads",
|
|
906
|
-
color: "#
|
|
896
|
+
color: "#4F46E5"
|
|
907
897
|
}, {
|
|
908
898
|
label: "Organic",
|
|
909
899
|
color: "#10B981"
|
|
@@ -3757,9 +3747,9 @@ var ExportPdfLayout = /*#__PURE__*/React.forwardRef(function (_ref34, ref) {
|
|
|
3757
3747
|
});
|
|
3758
3748
|
ExportPdfLayout.displayName = "ExportPdfLayout";
|
|
3759
3749
|
|
|
3760
|
-
/**
|
|
3761
|
-
* Captures [data-export-page] elements and saves a multi-page PDF.
|
|
3762
|
-
* Each page uses a custom size matching the captured content so nothing is cropped.
|
|
3750
|
+
/**
|
|
3751
|
+
* Captures [data-export-page] elements and saves a multi-page PDF.
|
|
3752
|
+
* Each page uses a custom size matching the captured content so nothing is cropped.
|
|
3763
3753
|
*/
|
|
3764
3754
|
function exportReportPdf(_x, _x2) {
|
|
3765
3755
|
return _exportReportPdf.apply(this, arguments);
|
|
@@ -6921,8 +6911,7 @@ var RefundsChargebacksCard = function RefundsChargebacksCard(_ref) {
|
|
|
6921
6911
|
data: chargebackSeries
|
|
6922
6912
|
}];
|
|
6923
6913
|
var fmt = function fmt(n) {
|
|
6924
|
-
|
|
6925
|
-
return n >= 1000 ? "".concat((n / 1000).toFixed(1), "k") : parseFloat((_n$toFixed = n === null || n === void 0 ? void 0 : n.toFixed(2)) !== null && _n$toFixed !== void 0 ? _n$toFixed : 0).toString();
|
|
6914
|
+
return Number(n !== null && n !== void 0 ? n : 0).toFixed(2);
|
|
6926
6915
|
};
|
|
6927
6916
|
var growthColor = growthPercentage > 0 ? "#EF4444" : growthPercentage < 0 ? "#22C55E" : "rgba(0,0,0,0.4)";
|
|
6928
6917
|
var growthLabel = growthPercentage > 0 ? "\u25B2 ".concat(growthPercentage.toFixed(1), "%") : growthPercentage < 0 ? "\u25BC ".concat(Math.abs(growthPercentage).toFixed(1), "%") : "stable";
|
|
@@ -8096,7 +8085,7 @@ var UTMPerformance = function UTMPerformance() {
|
|
|
8096
8085
|
tickAmount: 3,
|
|
8097
8086
|
labels: {
|
|
8098
8087
|
formatter: function formatter(v) {
|
|
8099
|
-
return metric === "Revenue" ? "$".concat(
|
|
8088
|
+
return metric === "Revenue" ? "$".concat(Number(v).toFixed(2)) : Number(v).toFixed(2);
|
|
8100
8089
|
},
|
|
8101
8090
|
style: {
|
|
8102
8091
|
fontSize: "11px",
|
|
@@ -17930,7 +17919,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
17930
17919
|
series: series,
|
|
17931
17920
|
categories: categories,
|
|
17932
17921
|
stacked: true,
|
|
17933
|
-
colors: ["#
|
|
17922
|
+
colors: ["#4F46E5", "#10B981", "#06B6D4"],
|
|
17934
17923
|
hideControls: true,
|
|
17935
17924
|
stroke: {
|
|
17936
17925
|
curve: "smooth",
|
|
@@ -17953,7 +17942,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
17953
17942
|
series: _series,
|
|
17954
17943
|
categories: _categories,
|
|
17955
17944
|
stacked: true,
|
|
17956
|
-
colors: ["#
|
|
17945
|
+
colors: ["#4F46E5", "#10B981", "#06B6D4"],
|
|
17957
17946
|
hideControls: true
|
|
17958
17947
|
});
|
|
17959
17948
|
} else if (Array.isArray(netData) && netData.length > 0) {
|
|
@@ -17985,7 +17974,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
17985
17974
|
series: _series2,
|
|
17986
17975
|
categories: _categories2,
|
|
17987
17976
|
stacked: true,
|
|
17988
|
-
colors: ["#
|
|
17977
|
+
colors: ["#4F46E5", "#10B981", "#06B6D4"],
|
|
17989
17978
|
hideControls: true
|
|
17990
17979
|
});
|
|
17991
17980
|
} else if (Array.isArray(donorsData) && donorsData.length > 0) {
|
|
@@ -18017,7 +18006,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
18017
18006
|
series: _series3,
|
|
18018
18007
|
categories: _categories3,
|
|
18019
18008
|
stacked: true,
|
|
18020
|
-
colors: ["#
|
|
18009
|
+
colors: ["#4F46E5", "#10B981", "#06B6D4"],
|
|
18021
18010
|
hideControls: true
|
|
18022
18011
|
});
|
|
18023
18012
|
} else if (Array.isArray(roasData) && roasData.length > 0) {
|
|
@@ -18049,7 +18038,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
18049
18038
|
series: _series4,
|
|
18050
18039
|
categories: _categories4,
|
|
18051
18040
|
stacked: true,
|
|
18052
|
-
colors: ["#
|
|
18041
|
+
colors: ["#4F46E5", "#10B981", "#06B6D4"],
|
|
18053
18042
|
hideControls: true
|
|
18054
18043
|
});
|
|
18055
18044
|
} else if (Array.isArray(conversionData) && conversionData.length > 0) {
|
|
@@ -18081,7 +18070,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
18081
18070
|
series: _series5,
|
|
18082
18071
|
categories: _categories5,
|
|
18083
18072
|
stacked: true,
|
|
18084
|
-
colors: ["#
|
|
18073
|
+
colors: ["#4F46E5", "#10B981", "#06B6D4"],
|
|
18085
18074
|
hideControls: true
|
|
18086
18075
|
});
|
|
18087
18076
|
} else if (Array.isArray(avgData) && avgData.length > 0) {
|
|
@@ -19886,7 +19875,7 @@ var EmailSection = function EmailSection(_ref) {
|
|
|
19886
19875
|
data: hasEmailOverview && openRateTrend.data.length > 0 ? openRateTrend.data : [0]
|
|
19887
19876
|
}],
|
|
19888
19877
|
categories: hasEmailOverview && openRateTrend.categories.length > 0 ? openRateTrend.categories : ["—"],
|
|
19889
|
-
colors: ["
|
|
19878
|
+
colors: ["#4F46E5"],
|
|
19890
19879
|
yAxisMax: computeYAxisMax(openRateTrend.data, 5),
|
|
19891
19880
|
yAxisTickAmount: 3
|
|
19892
19881
|
})
|