@bicharts/chart-host 0.6.25 → 0.6.26

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.
@@ -1640,7 +1640,7 @@ function W2(e) {
1640
1640
  function Z3(e, n) {
1641
1641
  return y4(n, rt) ? true : $2(e).some((t) => /^\d{5}(-\d{4})?$/.test(t.replace(/\.0+$/, "")));
1642
1642
  }
1643
- function nt2(e, n) {
1643
+ function tt2(e, n) {
1644
1644
  let t = F3(e);
1645
1645
  if (t.length === 0) return 0;
1646
1646
  let o = 0;
@@ -1652,29 +1652,29 @@ function K3(e, n) {
1652
1652
  for (let o of F3(e)) n(o) && t++;
1653
1653
  return t;
1654
1654
  }
1655
- function tt2(e, n) {
1655
+ function rt3(e, n) {
1656
1656
  let t = 0;
1657
1657
  for (let o of $2(e)) n(o) && t++;
1658
1658
  return t;
1659
1659
  }
1660
- function rt3(e, n, t, o, u2) {
1661
- let a4 = [], s = [], i = {}, C2 = {}, R2 = new Set(e), m = (r) => n.map((l) => l[r]);
1660
+ function ot(e, n, t, o, u2) {
1661
+ let a4 = [], s = [], i = {}, C2 = {}, P4 = new Set(e), m = (r) => n.map((l) => l[r]);
1662
1662
  for (let r of ["city", "country"]) {
1663
1663
  let l = t?.[r];
1664
- l && R2.has(l) && (i[r] = l);
1664
+ l && P4.has(l) && (i[r] = l);
1665
1665
  }
1666
- let ie = new Set(u2 ?? e);
1666
+ let se = new Set(u2 ?? e);
1667
1667
  for (let r of ["lat", "lon"]) {
1668
1668
  let l = t?.[r];
1669
- l && ie.has(l) && (i[r] = l);
1669
+ l && se.has(l) && (i[r] = l);
1670
1670
  }
1671
1671
  let h3 = t?.zip;
1672
- if (h3 && R2.has(h3)) {
1672
+ if (h3 && P4.has(h3)) {
1673
1673
  let r = m(h3), l = W2(r);
1674
1674
  l < 95 ? s.push(`zip=${h3} (only ${l}% of values read as ZIPs)`) : Z3(r, h3) ? i.zip = h3 : s.push(`zip=${h3} (all values are 3-4 digits with nothing to say they are postal)`);
1675
1675
  }
1676
1676
  let g3 = t?.state;
1677
- if (g3 && R2.has(g3)) {
1677
+ if (g3 && P4.has(g3)) {
1678
1678
  let r = m(g3), l = F3(r);
1679
1679
  l.length > 0 && l.every((d2) => X3(d2, o)) ? s.push(`state=${g3} (every value is "CA", which is both Canada and California)`) : v3(r) ? (s.push(`state=${g3} (every value is a country, not a state)`), i.country || (i.country = g3)) : k3(r) < 95 ? s.push(`state=${g3} (only ${k3(r)}% of values are states/provinces)`) : i.state = g3;
1680
1680
  }
@@ -1686,39 +1686,39 @@ function rt3(e, n, t, o, u2) {
1686
1686
  if (v3(d2)) continue;
1687
1687
  let p2 = k3(d2);
1688
1688
  if (p2 < 95) continue;
1689
- let _2 = K3(d2, (T3) => !!Y(T3)), ae2 = K3(d2, (T3) => !!Y(T3) && !X3(T3, o));
1690
- _2 < V3 && ae2 < 1 || (!r || p2 > r.pct) && (r = { name: l, pct: p2 });
1689
+ let _2 = K3(d2, (T3) => !!Y(T3)), le = K3(d2, (T3) => !!Y(T3) && !X3(T3, o));
1690
+ _2 < V3 && le < 1 || (!r || p2 > r.pct) && (r = { name: l, pct: p2 });
1691
1691
  }
1692
1692
  r && (i.state = r.name, b4.add(r.name), a4.push(`state=${r.name} (${r.pct}% states/provinces)`));
1693
1693
  }
1694
1694
  if (!i.zip) for (let r of w3) {
1695
1695
  if (b4.has(r)) continue;
1696
1696
  let l = m(r), d2 = W2(l);
1697
- if (!(d2 < 95) && Z3(l, r) && !(tt2(l, (p2) => Z(p2).length > 0) < V3)) {
1697
+ if (!(d2 < 95) && Z3(l, r) && !(rt3(l, (p2) => Z(p2).length > 0) < V3)) {
1698
1698
  i.zip = r, b4.add(r), a4.push(`zip=${r} (${d2}% ZIP codes)`);
1699
1699
  break;
1700
1700
  }
1701
1701
  }
1702
- let x2 = i.country;
1703
- if (!x2 || !v3(m(x2))) {
1702
+ let R2 = i.country;
1703
+ if (!R2 || !v3(m(R2))) {
1704
1704
  let r = null;
1705
1705
  for (let l of w3) {
1706
1706
  if (b4.has(l) || !v3(m(l))) continue;
1707
1707
  let d2 = B3(m(l));
1708
1708
  (!r || d2 > r.pct) && (r = { name: l, pct: d2 });
1709
1709
  }
1710
- r && (x2 && (s.push(`country=${x2} (only ${B3(m(x2))}% of values are country identifiers; using ${r.name} instead)`), C2.country = x2), i.country = r.name, b4.add(r.name), a4.push(`country=${r.name}`));
1710
+ r && (R2 && (s.push(`country=${R2} (only ${B3(m(R2))}% of values are country identifiers; using ${r.name} instead)`), C2.country = R2), i.country = r.name, b4.add(r.name), a4.push(`country=${r.name}`));
1711
1711
  }
1712
1712
  if (!i.city) {
1713
1713
  let r = null;
1714
1714
  for (let l of w3) {
1715
1715
  if (b4.has(l)) continue;
1716
- let d2 = m(l), p2 = nt2(d2, o);
1716
+ let d2 = m(l), p2 = tt2(d2, o);
1717
1717
  p2 < m3 || K3(d2, (_2) => p3(_2, o)) < V3 || (!r || p2 > r.pct) && (r = { name: l, pct: p2 });
1718
1718
  }
1719
1719
  r && (i.city = r.name, a4.push(`city=${r.name} (${r.pct}% known cities)`));
1720
1720
  }
1721
- let H3 = i.country ? m(i.country) : [], E4 = !!i.country && v3(H3), se = E4 ? new Set(H3.map((r) => E(r == null ? null : String(r))).filter(Boolean)).size : 0, U3 = E4 && se >= 2, O3 = !!(i.lat && i.lon) && n.some((r) => {
1721
+ let H3 = i.country ? m(i.country) : [], E4 = !!i.country && v3(H3), ae2 = E4 ? new Set(H3.map((r) => E(r == null ? null : String(r))).filter(Boolean)).size : 0, U3 = E4 && ae2 >= 2, O3 = !!(i.lat && i.lon) && n.some((r) => {
1722
1722
  let l = +String(r[i.lat] ?? "").trim(), d2 = +String(r[i.lon] ?? "").trim();
1723
1723
  return isFinite(l) && isFinite(d2) && l >= -90 && l <= 90 && d2 >= -180 && d2 <= 180 && String(r[i.lat] ?? "").trim() !== "" && String(r[i.lon] ?? "").trim() !== "";
1724
1724
  });
@@ -1737,7 +1737,7 @@ function resolvePointChannel(cols, rowObjs, point) {
1737
1737
  let labelCol;
1738
1738
  if (bind) {
1739
1739
  const dims = cols.filter((c2) => !c2.isMeasure).map((c2) => c2.name);
1740
- const res = rt3(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
1740
+ const res = ot(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
1741
1741
  bind = res.bind;
1742
1742
  rolesBackfilled = res.backfilled;
1743
1743
  rolesRefused = res.refused;
package/dist/index.mjs CHANGED
@@ -140,7 +140,7 @@ import {
140
140
  unpinScrolledAxis,
141
141
  valuePlacementFlag,
142
142
  withoutViewOnlyKeys
143
- } from "./chunk-GOZQBCDW.mjs";
143
+ } from "./chunk-QP5XGEPM.mjs";
144
144
  import "./chunk-A2GMXZP7.mjs";
145
145
  import "./chunk-GHODWOAL.mjs";
146
146
 
package/dist/react.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  loadGeo,
8
8
  syncMemberSelection,
9
9
  toSourceRows
10
- } from "./chunk-GOZQBCDW.mjs";
10
+ } from "./chunk-QP5XGEPM.mjs";
11
11
  import "./chunk-A2GMXZP7.mjs";
12
12
  import "./chunk-GHODWOAL.mjs";
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bicharts/chart-host",
3
- "version": "0.6.25",
3
+ "version": "0.6.26",
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",