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