@ammarkhalidfarooq/dashboard-package 0.6.126 → 0.6.127
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.map +1 -1
- package/dist/RenderChartCard.es.js.map +1 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +6 -6
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -434,13 +434,13 @@ function formatCurrency(value) {
|
|
|
434
434
|
}
|
|
435
435
|
function formatNumber(num) {
|
|
436
436
|
if (num >= 1000000000) {
|
|
437
|
-
return (num / 1000000000).toFixed(
|
|
437
|
+
return (num / 1000000000).toFixed(2).replace(/\.00$/, "") + "B";
|
|
438
438
|
}
|
|
439
439
|
if (num >= 1000000) {
|
|
440
|
-
return (num / 1000000).toFixed(
|
|
440
|
+
return (num / 1000000).toFixed(2).replace(/\.00$/, "") + "M";
|
|
441
441
|
}
|
|
442
442
|
if (num >= 1000) {
|
|
443
|
-
return (num / 1000).toFixed(
|
|
443
|
+
return (num / 1000).toFixed(2).replace(/\.00$/, "") + "K";
|
|
444
444
|
}
|
|
445
445
|
return (num !== null && num !== void 0 ? num : 0).toString();
|
|
446
446
|
}
|
|
@@ -1745,8 +1745,8 @@ var kpiRoas = function kpiRoas(v) {
|
|
|
1745
1745
|
};
|
|
1746
1746
|
var d$Compact = function d$Compact(v) {
|
|
1747
1747
|
var n = Number(v !== null && v !== void 0 ? v : 0);
|
|
1748
|
-
if (n >= 1000000) return "$".concat((n / 1000000).toFixed(
|
|
1749
|
-
if (n >= 1000) return "$".concat((n / 1000).toFixed(
|
|
1748
|
+
if (n >= 1000000) return "$".concat((n / 1000000).toFixed(2), "M");
|
|
1749
|
+
if (n >= 1000) return "$".concat((n / 1000).toFixed(2), "K");
|
|
1750
1750
|
return d$(n);
|
|
1751
1751
|
};
|
|
1752
1752
|
var pct = function pct(v) {
|
|
@@ -6921,7 +6921,7 @@ var RefundsChargebacksCard = function RefundsChargebacksCard(_ref) {
|
|
|
6921
6921
|
}];
|
|
6922
6922
|
var fmt = function fmt(n) {
|
|
6923
6923
|
var _n$toFixed;
|
|
6924
|
-
return n >= 1000 ? "".concat((n / 1000).toFixed(
|
|
6924
|
+
return n >= 1000 ? "".concat((n / 1000).toFixed(2), "k") : parseFloat((_n$toFixed = n === null || n === void 0 ? void 0 : n.toFixed(2)) !== null && _n$toFixed !== void 0 ? _n$toFixed : 0).toString();
|
|
6925
6925
|
};
|
|
6926
6926
|
var growthColor = growthPercentage > 0 ? "#EF4444" : growthPercentage < 0 ? "#22C55E" : "rgba(0,0,0,0.4)";
|
|
6927
6927
|
var growthLabel = growthPercentage > 0 ? "\u25B2 ".concat(growthPercentage.toFixed(1), "%") : growthPercentage < 0 ? "\u25BC ".concat(Math.abs(growthPercentage).toFixed(1), "%") : "stable";
|