autoql-fe-utils 1.11.26 → 1.11.27

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.js CHANGED
@@ -2693,7 +2693,7 @@ var getUniqueYearsForColumn = (data, columns, index) => {
2693
2693
  var supportsNetworkGraph = (data, columns) => {
2694
2694
  var _a2, _b2;
2695
2695
  const logUnsupportedReason = (message) => {
2696
- console.warn(`[supportsNetworkGraph] ${message}`);
2696
+ console.debug(`[supportsNetworkGraph] ${message}`);
2697
2697
  };
2698
2698
  if (!data || data.length < 2) {
2699
2699
  logUnsupportedReason(`Insufficient rows (${(_a2 = data == null ? void 0 : data.length) != null ? _a2 : 0}). Need at least 2 rows.`);
@@ -2823,7 +2823,7 @@ var supportsSankey = (rows, columns) => {
2823
2823
  var _a2, _b2;
2824
2824
  try {
2825
2825
  const logUnsupportedReason = (message) => {
2826
- console.warn(`[supportsSankey] ${message}`);
2826
+ console.debug(`[supportsSankey] ${message}`);
2827
2827
  };
2828
2828
  if (!(rows == null ? void 0 : rows.length) || !(columns == null ? void 0 : columns.length)) {
2829
2829
  logUnsupportedReason(
@@ -12761,8 +12761,8 @@ function formatDecimal_default(x) {
12761
12761
  return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
12762
12762
  }
12763
12763
  function formatDecimalParts(x, p) {
12764
- if (!isFinite(x) || x === 0) return null;
12765
- var i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e"), coefficient = x.slice(0, i);
12764
+ if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null;
12765
+ var i, coefficient = x.slice(0, i);
12766
12766
  return [
12767
12767
  coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
12768
12768
  +x.slice(i + 1)
@@ -12856,7 +12856,7 @@ function formatTrim_default(s) {
12856
12856
  var prefixExponent;
12857
12857
  function formatPrefixAuto_default(x, p) {
12858
12858
  var d = formatDecimalParts(x, p);
12859
- if (!d) return prefixExponent = void 0, x.toPrecision(p);
12859
+ if (!d) return x + "";
12860
12860
  var coefficient = d[0], exponent = d[1], i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, n = coefficient.length;
12861
12861
  return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0];
12862
12862
  }
@@ -12896,13 +12896,13 @@ var map = Array.prototype.map;
12896
12896
  var prefixes = ["y", "z", "a", "f", "p", "n", "\xB5", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
12897
12897
  function locale_default(locale2) {
12898
12898
  var group = locale2.grouping === void 0 || locale2.thousands === void 0 ? identity_default : formatGroup_default(map.call(locale2.grouping, Number), locale2.thousands + ""), currencyPrefix = locale2.currency === void 0 ? "" : locale2.currency[0] + "", currencySuffix = locale2.currency === void 0 ? "" : locale2.currency[1] + "", decimal = locale2.decimal === void 0 ? "." : locale2.decimal + "", numerals = locale2.numerals === void 0 ? identity_default : formatNumerals_default(map.call(locale2.numerals, String)), percent = locale2.percent === void 0 ? "%" : locale2.percent + "", minus = locale2.minus === void 0 ? "\u2212" : locale2.minus + "", nan = locale2.nan === void 0 ? "NaN" : locale2.nan + "";
12899
- function newFormat(specifier, options) {
12899
+ function newFormat(specifier) {
12900
12900
  specifier = formatSpecifier(specifier);
12901
12901
  var fill = specifier.fill, align = specifier.align, sign = specifier.sign, symbol2 = specifier.symbol, zero = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type = specifier.type;
12902
12902
  if (type === "n") comma = true, type = "g";
12903
12903
  else if (!formatTypes_default[type]) precision === void 0 && (precision = 12), trim = true, type = "g";
12904
12904
  if (zero || fill === "0" && align === "=") zero = true, fill = "0", align = "=";
12905
- var prefix = (options && options.prefix !== void 0 ? options.prefix : "") + (symbol2 === "$" ? currencyPrefix : symbol2 === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : ""), suffix = (symbol2 === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "") + (options && options.suffix !== void 0 ? options.suffix : "");
12905
+ var prefix = symbol2 === "$" ? currencyPrefix : symbol2 === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", suffix = symbol2 === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";
12906
12906
  var formatType = formatTypes_default[type], maybeSuffix = /[defgprs%]/.test(type);
12907
12907
  precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
12908
12908
  function format2(value) {
@@ -12917,7 +12917,7 @@ function locale_default(locale2) {
12917
12917
  if (trim) value = formatTrim_default(value);
12918
12918
  if (valueNegative && +value === 0 && sign !== "+") valueNegative = false;
12919
12919
  valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
12920
- valueSuffix = (type === "s" && !isNaN(value) && prefixExponent !== void 0 ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
12920
+ valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
12921
12921
  if (maybeSuffix) {
12922
12922
  i = -1, n = value.length;
12923
12923
  while (++i < n) {
@@ -12954,9 +12954,9 @@ function locale_default(locale2) {
12954
12954
  return format2;
12955
12955
  }
12956
12956
  function formatPrefix2(specifier, value) {
12957
- var e = Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3, k = Math.pow(10, -e), f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier), { suffix: prefixes[8 + e / 3] });
12957
+ var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), e = Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3, k = Math.pow(10, -e), prefix = prefixes[8 + e / 3];
12958
12958
  return function(value2) {
12959
- return f(k * value2);
12959
+ return f(k * value2) + prefix;
12960
12960
  };
12961
12961
  }
12962
12962
  return {