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.mjs CHANGED
@@ -2168,7 +2168,7 @@ var getUniqueYearsForColumn = (data, columns, index) => {
2168
2168
  var supportsNetworkGraph = (data, columns) => {
2169
2169
  var _a2, _b2;
2170
2170
  const logUnsupportedReason = (message) => {
2171
- console.warn(`[supportsNetworkGraph] ${message}`);
2171
+ console.debug(`[supportsNetworkGraph] ${message}`);
2172
2172
  };
2173
2173
  if (!data || data.length < 2) {
2174
2174
  logUnsupportedReason(`Insufficient rows (${(_a2 = data == null ? void 0 : data.length) != null ? _a2 : 0}). Need at least 2 rows.`);
@@ -2298,7 +2298,7 @@ var supportsSankey = (rows, columns) => {
2298
2298
  var _a2, _b2;
2299
2299
  try {
2300
2300
  const logUnsupportedReason = (message) => {
2301
- console.warn(`[supportsSankey] ${message}`);
2301
+ console.debug(`[supportsSankey] ${message}`);
2302
2302
  };
2303
2303
  if (!(rows == null ? void 0 : rows.length) || !(columns == null ? void 0 : columns.length)) {
2304
2304
  logUnsupportedReason(
@@ -12236,8 +12236,8 @@ function formatDecimal_default(x) {
12236
12236
  return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
12237
12237
  }
12238
12238
  function formatDecimalParts(x, p) {
12239
- if (!isFinite(x) || x === 0) return null;
12240
- var i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e"), coefficient = x.slice(0, i);
12239
+ if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null;
12240
+ var i, coefficient = x.slice(0, i);
12241
12241
  return [
12242
12242
  coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
12243
12243
  +x.slice(i + 1)
@@ -12331,7 +12331,7 @@ function formatTrim_default(s) {
12331
12331
  var prefixExponent;
12332
12332
  function formatPrefixAuto_default(x, p) {
12333
12333
  var d = formatDecimalParts(x, p);
12334
- if (!d) return prefixExponent = void 0, x.toPrecision(p);
12334
+ if (!d) return x + "";
12335
12335
  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;
12336
12336
  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];
12337
12337
  }
@@ -12371,13 +12371,13 @@ var map = Array.prototype.map;
12371
12371
  var prefixes = ["y", "z", "a", "f", "p", "n", "\xB5", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
12372
12372
  function locale_default(locale2) {
12373
12373
  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 + "";
12374
- function newFormat(specifier, options) {
12374
+ function newFormat(specifier) {
12375
12375
  specifier = formatSpecifier(specifier);
12376
12376
  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;
12377
12377
  if (type === "n") comma = true, type = "g";
12378
12378
  else if (!formatTypes_default[type]) precision === void 0 && (precision = 12), trim = true, type = "g";
12379
12379
  if (zero || fill === "0" && align === "=") zero = true, fill = "0", align = "=";
12380
- 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 : "");
12380
+ var prefix = symbol2 === "$" ? currencyPrefix : symbol2 === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", suffix = symbol2 === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";
12381
12381
  var formatType = formatTypes_default[type], maybeSuffix = /[defgprs%]/.test(type);
12382
12382
  precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
12383
12383
  function format2(value) {
@@ -12392,7 +12392,7 @@ function locale_default(locale2) {
12392
12392
  if (trim) value = formatTrim_default(value);
12393
12393
  if (valueNegative && +value === 0 && sign !== "+") valueNegative = false;
12394
12394
  valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
12395
- valueSuffix = (type === "s" && !isNaN(value) && prefixExponent !== void 0 ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
12395
+ valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
12396
12396
  if (maybeSuffix) {
12397
12397
  i = -1, n = value.length;
12398
12398
  while (++i < n) {
@@ -12429,9 +12429,9 @@ function locale_default(locale2) {
12429
12429
  return format2;
12430
12430
  }
12431
12431
  function formatPrefix2(specifier, value) {
12432
- 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] });
12432
+ 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];
12433
12433
  return function(value2) {
12434
- return f(k * value2);
12434
+ return f(k * value2) + prefix;
12435
12435
  };
12436
12436
  }
12437
12437
  return {