@bicharts/chart-host 0.6.40 → 0.6.41
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.
|
@@ -1481,88 +1481,88 @@ function Wt(n, s) {
|
|
|
1481
1481
|
return { iso: i, unmatched: M2, matchedRows: h3, totalRows: n.length };
|
|
1482
1482
|
}
|
|
1483
1483
|
|
|
1484
|
-
// ../shape-core/dist/chunk-
|
|
1484
|
+
// ../shape-core/dist/chunk-QKBGASBP.mjs
|
|
1485
1485
|
var import_papaparse = __toESM(require_papaparse_min(), 1);
|
|
1486
1486
|
/*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
1487
|
-
var
|
|
1487
|
+
var Le = { "north-america": "AG AI AW BB BL BM BQ BS BZ CA CR CU CW DM DO GD GL GP GT HN HT JM KN KY LC MF MQ MS MX NI PA PM PR SV SX TC TT US VC VG VI", "south-america": "AR BO BR CL CO EC FK GF GY PE PY SR UY VE", europe: "AD AL AT AX BA BE BG BY CH CY CZ DE DK EE ES FI FO FR GB GG GI GR HR HU IE IM IS IT JE LI LT LU LV MC MD ME MK MT NL NO PL PT RO RS RU SE SI SJ SK SM UA VA", africa: "AO BF BI BJ BW CD CF CG CI CM CV DJ DZ EG EH ER ET GA GH GM GN GQ GW KE KM LR LS LY MA MG ML MR MU MW MZ NA NE NG RE RW SC SD SH SL SN SO SS ST SZ TD TG TN TZ UG YT ZA ZM ZW", asia: "AE AF AM AZ BD BH BN BT CC CN CX GE HK ID IL IN IO IQ IR JO JP KG KH KP KR KW KZ LA LB LK MM MN MO MV MY NP OM PH PK PS QA SA SG SY TH TJ TL TM TR TW UZ VN YE", oceania: "AS AU CK FJ FM GU KI MH MP NC NF NR NU NZ PF PG PN PW SB TK TO TV UM VU WF WS", antarctica: "AQ BV GS HM TF" };
|
|
1488
1488
|
var J3 = (() => {
|
|
1489
1489
|
let t = /* @__PURE__ */ new Map();
|
|
1490
|
-
for (let e of Object.keys(
|
|
1490
|
+
for (let e of Object.keys(Le)) for (let n of Le[e].split(/\s+/)) n && t.set(n, e);
|
|
1491
1491
|
return t;
|
|
1492
1492
|
})();
|
|
1493
|
-
function
|
|
1493
|
+
function ct2(t) {
|
|
1494
1494
|
for (let [e, n] of t) {
|
|
1495
|
-
let
|
|
1496
|
-
|
|
1495
|
+
let i = J3.get(e);
|
|
1496
|
+
i && !J3.has(n) && J3.set(n, i);
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
|
-
|
|
1500
|
-
var
|
|
1501
|
-
var
|
|
1502
|
-
var yt2 = ["latitude", "longitude"];
|
|
1499
|
+
ct2(N);
|
|
1500
|
+
var bt = ["rate", "ratio", "pct", "percent", "percentage", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "z[_-]?score", "average", "avg", "mean", "median", "stddev", "variance", "gpa", "percentile", "quantile", "efficiency", "accuracy", "probability", "multiplier", "coefficient", "correlation", "occupancy", "age", "bmi", "temperature", "density", "pressure", "humidity", "ph", "velocity", "speed", "elevation", "altitude", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps", "temperatuur", "temperatur", "temperatura", "teplota", "lampotila", "homerseklet", "sicaklik", "pression", "presion", "pressao", "pressione", "druck", "tryck", "tlak", "paine", "nyomas", "presiune", "humidite", "humedad", "umidade", "umidita", "feuchtigkeit", "vochtigheid", "kosteus", "vlhkost", "vitesse", "velocidad", "velocidade", "velocita", "geschwindigkeit", "snelheid", "hastighet", "hastighed", "rychlost", "nopeus", "sebesseg", "brzina", "predkosc", "densite", "densidad", "densidade", "densita", "dichte", "dichtheid", "hustota", "tiheys", "gustoca", "moyenne", "mediane", "promedio", "mediana", "gemiddelde", "durchschnitt", "mittelwert", "genomsnitt", "gennemsnit", "gjennomsnitt", "keskiarvo", "atlag", "ortalama", "prosjek", "srednia", "prumer", "priemer", "medie", "taux", "tasa", "taxa", "tasso", "verhaltnis", "verhouding", "aandeel", "anteil", "andel", "osuus", "podil", "udzial", "udio", "pourcentage", "porcentaje", "percentual", "prozent", "procent", "prosentti", "szazalek", "yuzde", "participacion", "participacao", "pondere", "omjer", "arany", "oran", "rata", "leeftijd", "edad", "idade", "wiek", "eletkor", "varsta", "puntuacion", "pontuacao", "punteggio", "betyg", "ocena", "indice", "indeks", "wskaznik", "puan"];
|
|
1501
|
+
var yt2 = ["pct", "percent", "percentage", "rate", "ratio", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "gpa", "percentile", "quantile", "bmi", "density", "pressure", "humidity", "velocity", "efficiency", "occupancy", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps"];
|
|
1503
1502
|
var St2 = ["latitude", "longitude"];
|
|
1503
|
+
var _t = ["latitude", "longitude"];
|
|
1504
1504
|
function j3(t) {
|
|
1505
1505
|
return p(t);
|
|
1506
1506
|
}
|
|
1507
|
-
var
|
|
1508
|
-
function
|
|
1507
|
+
var ge2 = ["somme de", "suma de", "soma de", "summe von", "som van", "somma di", "summa av", "sum av", "sum af", "soucet z", "suma z", "totaal van", "total de", "toplam", "osszeg", "nombre de", "recuento de", "contagem de", "anzahl von", "aantal van", "conteggio di", "antal av", "lukumaara", "pocet z"];
|
|
1508
|
+
function At(t) {
|
|
1509
1509
|
return [...t].sort((e, n) => n.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|");
|
|
1510
1510
|
}
|
|
1511
|
-
var
|
|
1512
|
-
var
|
|
1513
|
-
var
|
|
1514
|
-
var
|
|
1515
|
-
function
|
|
1511
|
+
var We = new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:" + At(ge2) + ")\\s+)", "i");
|
|
1512
|
+
var Ct = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
|
|
1513
|
+
var Mt2 = new RegExp("\\b(" + bt.join("|") + ")\\b|(" + yt2.join("|") + ")$", "i");
|
|
1514
|
+
var xt = new RegExp("\\b(" + St2.join("|") + ")\\b|(" + _t.join("|") + ")$", "i");
|
|
1515
|
+
function Be(t) {
|
|
1516
1516
|
if (!t) return "";
|
|
1517
|
-
let e = String(t), n =
|
|
1517
|
+
let e = String(t), n = We.exec(j3(e));
|
|
1518
1518
|
return (n ? e.slice(n[0].length) : e).trim();
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1521
|
-
return !!t &&
|
|
1520
|
+
function Rt(t) {
|
|
1521
|
+
return !!t && We.test(j3(String(t)));
|
|
1522
1522
|
}
|
|
1523
|
-
var
|
|
1524
|
-
var
|
|
1525
|
-
var
|
|
1526
|
-
var
|
|
1527
|
-
function
|
|
1528
|
-
let e =
|
|
1529
|
-
return e.length === 0 ? "" : e.replace(
|
|
1523
|
+
var Tt = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
|
|
1524
|
+
var Fe = new RegExp("^\\s*(" + [...Tt].sort((t, e) => e.length - t.length).map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
|
|
1525
|
+
var $e = { Sum: ["Sum of "], Avg: ["Average of "], Average: ["Average of "], Count: ["Count of "], CountNonNull: ["Count of "], Min: ["Min of ", "First ", "Earliest "], Max: ["Max of ", "Last ", "Latest "], Median: ["Median of "], StandardDeviation: ["Standard deviation of "], Variance: ["Variance of "] };
|
|
1526
|
+
var Nt = new RegExp("^(" + Object.keys($e).join("|") + ")\\((.+)\\)$");
|
|
1527
|
+
function Et(t) {
|
|
1528
|
+
let e = Be(t);
|
|
1529
|
+
return e.length === 0 ? "" : e.replace(Ct, " ");
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1531
|
+
function Ve(t, e) {
|
|
1532
1532
|
if (!e) return false;
|
|
1533
|
-
let n =
|
|
1534
|
-
return t.test(j3(
|
|
1535
|
-
}
|
|
1536
|
-
function Ve(t) {
|
|
1537
|
-
return Ue(Mt2, t);
|
|
1533
|
+
let n = Be(e);
|
|
1534
|
+
return t.test(j3(Et(e))) || t.test(j3(n)) || t.test(j3(d(n).join(" ")));
|
|
1538
1535
|
}
|
|
1539
|
-
function
|
|
1540
|
-
return
|
|
1536
|
+
function Ke(t) {
|
|
1537
|
+
return Ve(xt, t);
|
|
1541
1538
|
}
|
|
1542
|
-
var Ke = /int|double|decimal|single|float|number|currency|money/i;
|
|
1543
1539
|
function vt(t) {
|
|
1544
|
-
|
|
1545
|
-
return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || t?.isMeasure === true || Ke.test(String(t?.dataType ?? "")) ? "Continuous" : "Categorical";
|
|
1540
|
+
return Ve(Mt2, t) || Ke(t);
|
|
1546
1541
|
}
|
|
1542
|
+
var Ye = /int|double|decimal|single|float|number|currency|money/i;
|
|
1547
1543
|
function It2(t) {
|
|
1548
|
-
|
|
1544
|
+
let e = String(t?.valueNature ?? "").trim().toLowerCase();
|
|
1545
|
+
return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || t?.isMeasure === true || Ye.test(String(t?.dataType ?? "")) ? "Continuous" : "Categorical";
|
|
1546
|
+
}
|
|
1547
|
+
function wt(t) {
|
|
1548
|
+
return t?.isMeasure === true || Ye.test(String(t?.dataType ?? ""));
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1551
|
-
let e = t ?? {}, n =
|
|
1550
|
+
function He(t) {
|
|
1551
|
+
let e = t ?? {}, n = It2(e);
|
|
1552
1552
|
if (n !== "Continuous") return { nature: n, additivity: "unknown", basis: "role", suppressed: false };
|
|
1553
|
-
if (
|
|
1554
|
-
let
|
|
1555
|
-
if (!(
|
|
1556
|
-
if (
|
|
1557
|
-
if (
|
|
1558
|
-
if (
|
|
1553
|
+
if (Ke(e.name)) return { nature: n, additivity: "positional", basis: "name", suppressed: true };
|
|
1554
|
+
let i = String(e.additivity ?? "").trim().toLowerCase();
|
|
1555
|
+
if (!(i === "additive" && Rt(e.name))) {
|
|
1556
|
+
if (i === "additive") return { nature: n, additivity: "additive", basis: "measured", suppressed: false };
|
|
1557
|
+
if (i === "part_of_whole") return { nature: n, additivity: "part_of_whole", basis: "measured", suppressed: false };
|
|
1558
|
+
if (i === "intensive_rate") return { nature: n, additivity: "intensive_rate", basis: "measured", suppressed: false };
|
|
1559
1559
|
}
|
|
1560
|
-
return e.discourageAggregationAcrossGroups === true ? { nature: n, additivity: "intensive_rate", basis: "host-flag", suppressed: false } :
|
|
1560
|
+
return e.discourageAggregationAcrossGroups === true ? { nature: n, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : vt(e.name) ? { nature: n, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: n, additivity: "additive", basis: "default", suppressed: false };
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1563
|
-
let e =
|
|
1562
|
+
function Xe(t) {
|
|
1563
|
+
let e = He(t), n = t ?? {};
|
|
1564
1564
|
if (e.nature === "Categorical") return ["first", "distinctcount", "count"];
|
|
1565
|
-
if (e.nature === "Ordinal") return
|
|
1565
|
+
if (e.nature === "Ordinal") return wt(n) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
|
|
1566
1566
|
switch (e.additivity) {
|
|
1567
1567
|
case "positional":
|
|
1568
1568
|
return ["min", "max", "count", "distinctcount", "first"];
|
|
@@ -1572,21 +1572,21 @@ function He(t) {
|
|
|
1572
1572
|
return ["sum", "average", "median", "min", "max", "count", "distinctcount", "first"];
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1576
|
-
return
|
|
1575
|
+
function Gn(t) {
|
|
1576
|
+
return Xe(t)[0];
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function Bn(t, e) {
|
|
1579
1579
|
if (e !== "sum" && e !== "count") return false;
|
|
1580
1580
|
if (e === "count") return true;
|
|
1581
|
-
let n =
|
|
1581
|
+
let n = He(t);
|
|
1582
1582
|
return n.additivity === "additive" || n.additivity === "part_of_whole" || n.additivity === "unknown";
|
|
1583
1583
|
}
|
|
1584
|
-
var
|
|
1584
|
+
var Ot = new RegExp([String.raw`\bisMeasure\b`, String.raw`\bdataType\b`, String.raw`\bcolumns\s*\[\s*-?\d`, String.raw`\.iloc\s*\[[^\]]*,`, String.raw`\.iat\s*\[`, String.raw`\bselect_dtypes\b`, String.raw`\b_get_numeric_data\b`, String.raw`\bis_numeric_dtype\b`, String.raw`\bfor\s+\w+\s+in\s+(?:list\s*\(\s*)?df\.columns\b`, String.raw`\bdf\.columns\s*\.\s*(?:tolist|to_list|difference|drop)\b`, String.raw`\bdf\.dtypes\b`, String.raw`\bObject\s*\.\s*(?:keys|values|entries)\s*\(\s*(?:rows|data|df)?\s*\[\s*0\s*\]`, String.raw`\b(?:row|rw|r)\s*\[\s*\d+\s*\]`].join("|"));
|
|
1585
1585
|
|
|
1586
1586
|
// ../shape-core/dist/index.mjs
|
|
1587
1587
|
/*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
1588
1588
|
var X3 = 2;
|
|
1589
|
-
var
|
|
1589
|
+
var de = 400;
|
|
1590
1590
|
function Z3(t) {
|
|
1591
1591
|
return !!E(t);
|
|
1592
1592
|
}
|
|
@@ -1595,7 +1595,7 @@ function F3(t) {
|
|
|
1595
1595
|
for (let n of t) {
|
|
1596
1596
|
if (n == null) continue;
|
|
1597
1597
|
let o2 = u(String(n));
|
|
1598
|
-
if (!V(o2) && !e.has(o2) && (e.add(o2), e.size >=
|
|
1598
|
+
if (!V(o2) && !e.has(o2) && (e.add(o2), e.size >= de)) break;
|
|
1599
1599
|
}
|
|
1600
1600
|
return Array.from(e);
|
|
1601
1601
|
}
|
|
@@ -1629,7 +1629,7 @@ function ne2(t) {
|
|
|
1629
1629
|
for (let n of t) {
|
|
1630
1630
|
if (n == null) continue;
|
|
1631
1631
|
let o2 = String(n).trim();
|
|
1632
|
-
if (!V(u(o2)) && !e.has(o2) && (e.add(o2), e.size >=
|
|
1632
|
+
if (!V(u(o2)) && !e.has(o2) && (e.add(o2), e.size >= de)) break;
|
|
1633
1633
|
}
|
|
1634
1634
|
return Array.from(e);
|
|
1635
1635
|
}
|
|
@@ -1643,7 +1643,7 @@ function te(t) {
|
|
|
1643
1643
|
function ce2(t, e) {
|
|
1644
1644
|
return y2(e, rt) ? true : ne2(t).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
|
|
1645
1645
|
}
|
|
1646
|
-
function
|
|
1646
|
+
function In(t, e) {
|
|
1647
1647
|
let n = F3(t);
|
|
1648
1648
|
if (n.length === 0) return 0;
|
|
1649
1649
|
let o2 = 0;
|
|
@@ -1655,12 +1655,12 @@ function J4(t, e) {
|
|
|
1655
1655
|
for (let o2 of F3(t)) e(o2) && n++;
|
|
1656
1656
|
return n;
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function Fn(t, e) {
|
|
1659
1659
|
let n = 0;
|
|
1660
1660
|
for (let o2 of ne2(t)) e(o2) && n++;
|
|
1661
1661
|
return n;
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1663
|
+
function kn(t, e, n, o2, u2) {
|
|
1664
1664
|
let l = [], a2 = [], s = {}, b4 = {}, T2 = new Set(t), C2 = (i) => e.map((c2) => c2[i]);
|
|
1665
1665
|
for (let i of ["city", "country"]) {
|
|
1666
1666
|
let c2 = n?.[i];
|
|
@@ -1687,17 +1687,17 @@ function _n(t, e, n, o2, u2) {
|
|
|
1687
1687
|
for (let c2 of g3) {
|
|
1688
1688
|
let S2 = C2(c2);
|
|
1689
1689
|
if (I4(S2)) continue;
|
|
1690
|
-
let
|
|
1691
|
-
if (
|
|
1692
|
-
let $3 = J4(S2, (
|
|
1693
|
-
$3 < X3 && Me < 1 || (!i ||
|
|
1690
|
+
let v2 = z3(S2);
|
|
1691
|
+
if (v2 < 95) continue;
|
|
1692
|
+
let $3 = J4(S2, (D2) => !!Y(D2)), Me = J4(S2, (D2) => !!Y(D2) && !ue2(D2, o2));
|
|
1693
|
+
$3 < X3 && Me < 1 || (!i || v2 > i.pct) && (i = { name: c2, pct: v2 });
|
|
1694
1694
|
}
|
|
1695
1695
|
i && (s.state = i.name, p2.add(i.name), l.push(`state=${i.name} (${i.pct}% states/provinces)`));
|
|
1696
1696
|
}
|
|
1697
1697
|
if (!s.zip) for (let i of g3) {
|
|
1698
1698
|
if (p2.has(i)) continue;
|
|
1699
1699
|
let c2 = C2(i), S2 = te(c2);
|
|
1700
|
-
if (!(S2 < 95) && ce2(c2, i) && !(
|
|
1700
|
+
if (!(S2 < 95) && ce2(c2, i) && !(Fn(c2, (v2) => Z(v2).length > 0) < X3)) {
|
|
1701
1701
|
s.zip = i, p2.add(i), l.push(`zip=${i} (${S2}% ZIP codes)`);
|
|
1702
1702
|
break;
|
|
1703
1703
|
}
|
|
@@ -1716,8 +1716,8 @@ function _n(t, e, n, o2, u2) {
|
|
|
1716
1716
|
let i = null;
|
|
1717
1717
|
for (let c2 of g3) {
|
|
1718
1718
|
if (p2.has(c2)) continue;
|
|
1719
|
-
let S2 = C2(c2),
|
|
1720
|
-
|
|
1719
|
+
let S2 = C2(c2), v2 = In(S2, o2);
|
|
1720
|
+
v2 < m3 || J4(S2, ($3) => p3($3, o2)) < X3 || (!i || v2 > i.pct) && (i = { name: c2, pct: v2 });
|
|
1721
1721
|
}
|
|
1722
1722
|
i && (s.city = i.name, l.push(`city=${i.name} (${i.pct}% known cities)`));
|
|
1723
1723
|
}
|
|
@@ -1729,11 +1729,11 @@ function _n(t, e, n, o2, u2) {
|
|
|
1729
1729
|
}
|
|
1730
1730
|
var r = (t, ...e) => ({ part: t, langs: Object.freeze(e) });
|
|
1731
1731
|
var re2 = Object.freeze({ jaar: r("year", "nl"), kwartaal: r("quarter", "nl"), maand: r("month", "nl"), dag: r("day", "nl", "sv", "da", "nb"), jahr: r("year", "de"), quartal: r("quarter", "de"), monat: r("month", "de"), tag: r("day", "de"), ann\u00E9e: r("year", "fr"), mois: r("month", "fr"), jour: r("day", "fr"), trimestre: r("quarter", "fr", "es", "pt", "it"), a\u00F1o: r("year", "es"), mes: r("month", "es"), d\u00EDa: r("day", "es"), ano: r("year", "pt"), m\u00EAs: r("month", "pt"), dia: r("day", "pt"), anno: r("year", "it"), mese: r("month", "it"), giorno: r("day", "it"), \u0433\u043E\u0434: r("year", "ru"), \u043C\u0435\u0441\u044F\u0446: r("month", "ru"), \u0440\u0456\u043A: r("year", "uk"), \u043C\u0456\u0441\u044F\u0446\u044C: r("month", "uk"), \u043A\u0432\u0430\u0440\u0442\u0430\u043B: r("quarter", "ru", "uk"), \u0434\u0435\u043D\u044C: r("day", "ru", "uk"), rok: r("year", "pl", "cs", "sk"), kwarta\u0142: r("quarter", "pl"), miesi\u0105c: r("month", "pl"), dzie\u0144: r("day", "pl"), \u010Dtvrtlet\u00ED: r("quarter", "cs"), m\u011Bs\u00EDc: r("month", "cs"), den: r("day", "cs"), \u0161tvr\u0165rok: r("quarter", "sk"), mesiac: r("month", "sk"), de\u0148: r("day", "sk"), \u00E5r: r("year", "sv", "da", "nb"), kvartal: r("quarter", "sv", "da", "nb"), m\u00E5nad: r("month", "sv"), m\u00E5ned: r("month", "da", "nb"), vuosi: r("year", "fi"), vuosinelj\u00E4nnes: r("quarter", "fi"), kuukausi: r("month", "fi"), p\u00E4iv\u00E4: r("day", "fi"), \u00E9v: r("year", "hu"), negyed\u00E9v: r("quarter", "hu"), h\u00F3nap: r("month", "hu"), nap: r("day", "hu"), y\u0131l: r("year", "tr"), \u00E7eyrek: r("quarter", "tr"), ay: r("month", "tr"), g\u00FCn: r("day", "tr"), \u03AD\u03C4\u03BF\u03C2: r("year", "el"), \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF: r("quarter", "el"), \u03BC\u03AE\u03BD\u03B1\u03C2: r("month", "el"), \u03B7\u03BC\u03AD\u03C1\u03B1: r("day", "el"), an: r("year", "ro"), trimestru: r("quarter", "ro"), lun\u0103: r("month", "ro"), zi: r("day", "ro"), godina: r("year", "hr"), tromjese\u010Dje: r("quarter", "hr"), mjesec: r("month", "hr"), dan: r("day", "hr"), \u5E74: r("year", "ja", "zh"), \u56DB\u534A\u671F: r("quarter", "ja"), \u5B63\u5EA6: r("quarter", "zh"), \u6708: r("month", "ja", "zh"), \u65E5: r("day", "ja", "zh"), \uC5F0\uB3C4: r("year", "ko"), \uBD84\uAE30: r("quarter", "ko"), \uC6D4: r("month", "ko"), \uC77C: r("day", "ko"), tahun: r("year", "id"), kuartal: r("quarter", "id"), triwulan: r("quarter", "id"), bulan: r("month", "id"), hari: r("day", "id"), n\u0103m: r("year", "vi"), qu\u00FD: r("quarter", "vi"), th\u00E1ng: r("month", "vi"), ng\u00E0y: r("day", "vi"), \u0E1B\u0E35: r("year", "th"), \u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A: r("quarter", "th"), \u0E40\u0E14\u0E37\u0E2D\u0E19: r("month", "th"), \u0E27\u0E31\u0E19: r("day", "th"), \u0627\u0644\u0633\u0646\u0629: r("year", "ar"), \u0633\u0646\u0629: r("year", "ar"), \u0627\u0644\u0639\u0627\u0645: r("year", "ar"), \u0639\u0627\u0645: r("year", "ar"), \u0627\u0644\u0631\u0628\u0639: r("quarter", "ar"), \u0631\u0628\u0639: r("quarter", "ar"), "\u0631\u0628\u0639 \u0627\u0644\u0633\u0646\u0629": r("quarter", "ar"), \u0627\u0644\u0634\u0647\u0631: r("month", "ar"), \u0634\u0647\u0631: r("month", "ar"), \u0627\u0644\u064A\u0648\u0645: r("day", "ar"), \u064A\u0648\u0645: r("day", "ar"), \u05E9\u05E0\u05D4: r("year", "he"), \u05E8\u05D1\u05E2\u05D5\u05DF: r("quarter", "he"), \u05D7\u05D5\u05D3\u05E9: r("month", "he"), \u05D9\u05D5\u05DD: r("day", "he"), \u0935\u0930\u094D\u0937: r("year", "hi"), \u0938\u093E\u0932: r("year", "hi"), \u0924\u093F\u092E\u093E\u0939\u0940: r("quarter", "hi"), \u092E\u0939\u0940\u0928\u093E: r("month", "hi"), \u092E\u093E\u0939: r("month", "hi"), \u0926\u093F\u0928: r("day", "hi"), \u0633\u0627\u0644: r("year", "fa"), \u0645\u0627\u0647: r("month", "fa"), \u0631\u0648\u0632: r("day", "fa") });
|
|
1732
|
-
var
|
|
1732
|
+
var Gn2 = Object.freeze(Array.from(new Set(Object.values(re2).flatMap((t) => t.langs))));
|
|
1733
1733
|
var me = Object.freeze(["fa", "ar", "he", "th"]);
|
|
1734
|
-
var
|
|
1735
|
-
var
|
|
1736
|
-
var
|
|
1734
|
+
var sr = Object.freeze({ integer: "number", decimal: "number", double: "number", datetime: "date", date: "date", boolean: "boolean", string: "text" });
|
|
1735
|
+
var pr = Object.freeze({ RENDER_START: "render-start", RENDER_OK: "render-ok", RENDER_ERROR: "render-error", VIEW: "view", VIEW_VERDICT: "view-verdict" });
|
|
1736
|
+
var we = 2 ** 31 - 1;
|
|
1737
1737
|
|
|
1738
1738
|
// src/payload.ts
|
|
1739
1739
|
var ROW_IDX_COLUMN = "__rowIdx__";
|
|
@@ -1748,7 +1748,7 @@ function resolvePointChannel(cols, rowObjs, point) {
|
|
|
1748
1748
|
let labelCol;
|
|
1749
1749
|
if (bind) {
|
|
1750
1750
|
const dims = cols.filter((c2) => !c2.isMeasure).map((c2) => c2.name);
|
|
1751
|
-
const res =
|
|
1751
|
+
const res = kn(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
|
|
1752
1752
|
bind = res.bind;
|
|
1753
1753
|
rolesBackfilled = res.backfilled;
|
|
1754
1754
|
rolesRefused = res.refused;
|
|
@@ -2169,8 +2169,8 @@ function createMarkResolver(env) {
|
|
|
2169
2169
|
for (const n of all) {
|
|
2170
2170
|
const tag = (n.tagName || "").toLowerCase();
|
|
2171
2171
|
if (!SHAPE.test(tag)) continue;
|
|
2172
|
-
const
|
|
2173
|
-
if (
|
|
2172
|
+
const pe2 = viewStyle(n);
|
|
2173
|
+
if (pe2 && pe2 !== "none") return true;
|
|
2174
2174
|
}
|
|
2175
2175
|
return false;
|
|
2176
2176
|
};
|
|
@@ -3287,10 +3287,10 @@ function applyLabelContrast(container, opts = {}) {
|
|
|
3287
3287
|
const cellRGBA = toRGBA(cell.fill);
|
|
3288
3288
|
let bgRGB = cellRGBA ? compositeOver([cellRGBA[0], cellRGBA[1], cellRGBA[2], cellRGBA[3] * cell.op], pageRGB) : pageRGB;
|
|
3289
3289
|
if (pill) {
|
|
3290
|
-
const
|
|
3291
|
-
if (
|
|
3292
|
-
bgRGB = compositeOver([
|
|
3293
|
-
pill.el.setAttribute("fill", `rgb(${
|
|
3290
|
+
const pr2 = toRGBA(pill.fill);
|
|
3291
|
+
if (pr2) {
|
|
3292
|
+
bgRGB = compositeOver([pr2[0], pr2[1], pr2[2], 0.9], bgRGB);
|
|
3293
|
+
pill.el.setAttribute("fill", `rgb(${pr2[0]}, ${pr2[1]}, ${pr2[2]})`);
|
|
3294
3294
|
pill.el.setAttribute("fill-opacity", "0.9");
|
|
3295
3295
|
report.pillsBoosted++;
|
|
3296
3296
|
}
|
|
@@ -3569,8 +3569,8 @@ function createChartHost(container, config) {
|
|
|
3569
3569
|
const marks = container.querySelectorAll(`.${MARK_CLASS}[${ROW_IDX_ATTR}], .${LEGEND_MARK_CLASS}[${ROW_IDX_ATTR}]`);
|
|
3570
3570
|
for (const m2 of Array.from(marks)) {
|
|
3571
3571
|
const rows = parseRowIdxs(m2.getAttribute(ROW_IDX_ATTR));
|
|
3572
|
-
const
|
|
3573
|
-
m2.classList?.[
|
|
3572
|
+
const on2 = active && rows.some((r2) => wanted.has(r2));
|
|
3573
|
+
m2.classList?.[on2 ? "add" : "remove"](MARK_SELECTED_CLASS);
|
|
3574
3574
|
}
|
|
3575
3575
|
} catch {
|
|
3576
3576
|
}
|
|
@@ -3863,11 +3863,11 @@ function toSourceRows(rowMap, payloadRowIdxs) {
|
|
|
3863
3863
|
return payloadRowIdxs.map((i) => rowMap[i]).filter((i) => i !== void 0);
|
|
3864
3864
|
}
|
|
3865
3865
|
function toPayloadRows(rowMap, sourceRowIdxs) {
|
|
3866
|
-
const
|
|
3866
|
+
const at3 = /* @__PURE__ */ new Map();
|
|
3867
3867
|
rowMap.forEach((src, k3) => {
|
|
3868
|
-
if (!
|
|
3868
|
+
if (!at3.has(src)) at3.set(src, k3);
|
|
3869
3869
|
});
|
|
3870
|
-
return sourceRowIdxs.map((s) =>
|
|
3870
|
+
return sourceRowIdxs.map((s) => at3.get(s)).filter((k3) => k3 !== void 0);
|
|
3871
3871
|
}
|
|
3872
3872
|
var sameRows = (a2, b4) => {
|
|
3873
3873
|
if (a2.length !== b4.length) return false;
|
|
@@ -4052,10 +4052,10 @@ export {
|
|
|
4052
4052
|
le,
|
|
4053
4053
|
L2 as L,
|
|
4054
4054
|
L3,
|
|
4055
|
-
Ye,
|
|
4056
4055
|
He,
|
|
4057
|
-
|
|
4058
|
-
|
|
4056
|
+
Xe,
|
|
4057
|
+
Gn,
|
|
4058
|
+
Bn,
|
|
4059
4059
|
buildRenderPayload,
|
|
4060
4060
|
stripJsComments,
|
|
4061
4061
|
isInsideControl,
|
package/dist/index.mjs
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
AXIS_PIN_MIN_LABELS,
|
|
21
21
|
AXIS_PIN_TRACK_REACH_PX,
|
|
22
22
|
BACKING_MAJORITY,
|
|
23
|
+
Bn,
|
|
23
24
|
COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT,
|
|
24
25
|
COLOR_SCALE_SELF_CLAMP_PCT_MAX,
|
|
25
26
|
COLOR_SCALE_SELF_CLAMP_PCT_MIN,
|
|
@@ -36,6 +37,7 @@ import {
|
|
|
36
37
|
FLIP_MODE_DEFAULT,
|
|
37
38
|
GEO_POINT_PRECISIONS,
|
|
38
39
|
GLYPH_SAMPLE_N,
|
|
40
|
+
Gn,
|
|
39
41
|
HOST_CONTAINER_CLASS,
|
|
40
42
|
HOST_CONTRACT_VERSION,
|
|
41
43
|
He,
|
|
@@ -53,7 +55,6 @@ import {
|
|
|
53
55
|
MIN_CONTRAST,
|
|
54
56
|
MIN_HIT_BAND_PX,
|
|
55
57
|
MIN_RAMP_FILLS,
|
|
56
|
-
On,
|
|
57
58
|
PAGE_MATCH_TOLERANCE,
|
|
58
59
|
PHANTOM_FRACTION,
|
|
59
60
|
PILL_MIN_ALPHA,
|
|
@@ -69,7 +70,7 @@ import {
|
|
|
69
70
|
VIEW_ONLY_UI_STATE_KEYS,
|
|
70
71
|
WHITE_TEXT_BG_LUM,
|
|
71
72
|
XFILTER_REFRESH_EVENT,
|
|
72
|
-
|
|
73
|
+
Xe,
|
|
73
74
|
applyLabelContrast,
|
|
74
75
|
assembleD3,
|
|
75
76
|
autoRampCanvas,
|
|
@@ -111,7 +112,6 @@ import {
|
|
|
111
112
|
isInvalidSentinelError,
|
|
112
113
|
isPhantomBox,
|
|
113
114
|
isPillBackdropAlpha,
|
|
114
|
-
kn,
|
|
115
115
|
labelBand,
|
|
116
116
|
le,
|
|
117
117
|
loadGeo,
|
|
@@ -140,7 +140,7 @@ import {
|
|
|
140
140
|
unpinScrolledAxis,
|
|
141
141
|
valuePlacementFlag,
|
|
142
142
|
withoutViewOnlyKeys
|
|
143
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-NMEXSUOR.mjs";
|
|
144
144
|
import "./chunk-A2GMXZP7.mjs";
|
|
145
145
|
import "./chunk-GHODWOAL.mjs";
|
|
146
146
|
|
|
@@ -1487,15 +1487,15 @@ function displayText(col, raw, opts) {
|
|
|
1487
1487
|
return String(raw);
|
|
1488
1488
|
}
|
|
1489
1489
|
function isSuppressed(col) {
|
|
1490
|
-
return
|
|
1490
|
+
return He(col).suppressed;
|
|
1491
1491
|
}
|
|
1492
1492
|
function resolveAgg(col, requested, auto) {
|
|
1493
1493
|
const fallback = () => {
|
|
1494
|
-
const d2 =
|
|
1494
|
+
const d2 = Gn(col);
|
|
1495
1495
|
return d2 === "first" ? "count" : d2;
|
|
1496
1496
|
};
|
|
1497
1497
|
if (auto) return fallback();
|
|
1498
|
-
return
|
|
1498
|
+
return Xe(col).indexOf(requested) >= 0 ? requested : fallback();
|
|
1499
1499
|
}
|
|
1500
1500
|
function toNumber(v2) {
|
|
1501
1501
|
if (v2 == null || v2 === "") return null;
|
|
@@ -1598,7 +1598,7 @@ function computeSelectionCard(payload, selectedRowIdxs, opts = {}) {
|
|
|
1598
1598
|
}
|
|
1599
1599
|
const value = reduce(selVals, colAgg, selRaw);
|
|
1600
1600
|
let sharePct = null;
|
|
1601
|
-
if (
|
|
1601
|
+
if (Bn(col, colAgg) && value != null) {
|
|
1602
1602
|
const allVals = [];
|
|
1603
1603
|
const allRaw = [];
|
|
1604
1604
|
for (let r2 = 0; r2 < rows.length; r2++) {
|
package/dist/react.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.41",
|
|
4
4
|
"description": "Run a BIC-generated D3 chart in any web host: compiles the generated render() function, applies the shared option defaults, resolves mark clicks (through tooltip overlays), owns the selection affordance, and translates row indices between cross-filtered charts. The same contract the BIC Power BI visual implements, minus Power BI. React bindings at @bicharts/chart-host/react.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|