@iota-uz/sdk 0.5.2 → 0.5.4

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.
Files changed (41) hide show
  1. package/dist/client-host/identity.d.ts +4 -4
  2. package/dist/client-host/identity.js +2 -2
  3. package/dist/lens/{CascadePanel-DnwWRglV.js → CascadePanel-CdeeYZsY.js} +1 -1
  4. package/dist/lens/{ChartHost-DohEf1-L.js → ChartHost-DLcWF7pC.js} +2 -2
  5. package/dist/lens/{ChartPanel-WhiPcjdF.js → ChartPanel-DBX4StoU.js} +88 -88
  6. package/dist/lens/{CoveragePanel-BjmHpQIZ.js → CoveragePanel-C5Y50Ja8.js} +1 -1
  7. package/dist/lens/{GaugePanel-CmQ4ShEf.js → GaugePanel-QdD8-G_m.js} +1 -1
  8. package/dist/lens/{MapPanel-B9q3sceX.js → MapPanel-BYrx4srW.js} +20 -19
  9. package/dist/lens/{MetricFlowPanel-HcjNwmDG.js → MetricFlowPanel-LreyGLdP.js} +2 -2
  10. package/dist/lens/{MetricHierarchyPanel-D6EZ05aK.js → MetricHierarchyPanel-DvIh-llg.js} +2 -2
  11. package/dist/lens/{MetricRelationshipPanel--MlnSeD0.js → MetricRelationshipPanel-C-aL3I9t.js} +2 -2
  12. package/dist/lens/{PrintReport-CFq0u0ZA.js → PrintReport-QqzDAR7K.js} +5 -5
  13. package/dist/lens/{TablePanel-8NER1r6f.js → TablePanel-DFfsYjWR.js} +1 -1
  14. package/dist/lens/{adapter-Bl6H53g9.js → adapter-BoXhQplf.js} +5058 -5054
  15. package/dist/lens/charts/adapter.d.ts +9 -9
  16. package/dist/lens/charts/adapter.d.ts.map +1 -1
  17. package/dist/lens/charts/echarts/options.d.ts.map +1 -1
  18. package/dist/lens/controls/FacetFilterMenu.d.ts +2 -3
  19. package/dist/lens/controls/FacetFilterMenu.d.ts.map +1 -1
  20. package/dist/lens/{index-DGLFNPl4.js → index-C3g4ib1H.js} +2076 -2069
  21. package/dist/lens/{index-CIngYYVZ.js → index-D16WayLn.js} +1 -1
  22. package/dist/lens/index.js +1 -1
  23. package/dist/lens/{install-B6q-zRno.js → install-4afWuWQV.js} +1 -1
  24. package/dist/lens/{install-DNHJghsU.js → install-Cw9b8dcU.js} +1 -1
  25. package/dist/lens/{install-BdsfPB-W.js → install-DCnlqrJl.js} +1 -1
  26. package/dist/lens/{install-BM-Kt5qH.js → install-DiwRwFDZ.js} +1 -1
  27. package/dist/lens/{metricViews-CPJMPqcl.js → metricViews-qsMUANFL.js} +1 -1
  28. package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
  29. package/dist/lens/panels/MapPanel.d.ts.map +1 -1
  30. package/dist/lens/panels/data.d.ts +6 -4
  31. package/dist/lens/panels/data.d.ts.map +1 -1
  32. package/dist/lens/{prefetch-14qoPAtc.js → prefetch-3fl1oLRK.js} +2 -2
  33. package/dist/lens/{prefetchPanels-C_-SP6Zx.js → prefetchPanels-DjyNoBKV.js} +1 -1
  34. package/dist/lens/{print-DRljk_Xa.js → print-D6eDEk5V.js} +1 -1
  35. package/dist/lens/runtime/provider.d.ts.map +1 -1
  36. package/dist/lens/{scales-sHVLUC1f.js → scales-CuZBfqCM.js} +58 -58
  37. package/dist/lens/style.css +1 -1
  38. package/dist/sdk-identity.cjs +3 -3
  39. package/dist/sdk-identity.js +3 -3
  40. package/dist/sdk-identity.json +2 -2
  41. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  import { jsx as M, jsxs as U, Fragment as J } from "react/jsx-runtime";
2
- import { useState as k, useEffect as F, useMemo as $, useCallback as O } from "react";
3
- import { o as T, a as D, t as G, u as _, L as q, z, P as B } from "./index-DGLFNPl4.js";
2
+ import { useState as N, useEffect as k, useMemo as $, useCallback as O } from "react";
3
+ import { o as T, a as D, t as G, u as _, L as q, z, P as B } from "./index-C3g4ib1H.js";
4
4
  import "@iota-uz/sdk/client-host";
5
5
  import { C as K } from "./ChartDataEquivalent-BFDdHoQn.js";
6
- import { C as W } from "./ChartHost-DohEf1-L.js";
7
- const N = 5 * 1024 * 1024;
6
+ import { C as W } from "./ChartHost-DLcWF7pC.js";
7
+ const F = 5 * 1024 * 1024;
8
8
  function H(e, a) {
9
9
  var c, r, o, d;
10
10
  const i = a.trim(), l = i.split(/[-_]/, 1)[0] ?? "";
@@ -58,8 +58,8 @@ async function X(e, a, i = fetch, l) {
58
58
  if (c === r) throw new Error("Map source requires exactly one of inline or URL");
59
59
  if (c) return A(e.inline, a);
60
60
  const o = e.maxBytes ?? 0;
61
- if (!Number.isInteger(o) || o <= 0 || o > N)
62
- throw new Error(`Map source maxBytes must be between 1 and ${N}`);
61
+ if (!Number.isInteger(o) || o <= 0 || o > F)
62
+ throw new Error(`Map source maxBytes must be between 1 and ${F}`);
63
63
  const d = e.url;
64
64
  if (!d.startsWith("/") || d.startsWith("//") || d.includes("\\")) throw new Error("Map source URL must be same-origin");
65
65
  const t = typeof window > "u" ? "http://localhost" : window.location.href, n = new URL(d, t);
@@ -99,31 +99,32 @@ function Y(e, a, i) {
99
99
  }
100
100
  function ne({ panel: e, adapter: a, fetcher: i, frame: l }) {
101
101
  var C;
102
- const c = T(e.id), r = l ?? c, { document: o } = D(), { drillInto: d } = G(), t = _(), n = q(e.encoding.value ? e.format[e.encoding.value] : void 0), s = z(e), [g, v] = k(0), [f, y] = k({ loading: !0 }), u = e.map, P = u ? H(u, ((C = o.meta) == null ? void 0 : C.locale) ?? "") : void 0;
103
- F(() => {
102
+ const c = T(e.id), r = l ?? c, { document: o } = D(), { drillInto: d } = G(), t = _(), n = q(e.encoding.value ? e.format[e.encoding.value] : void 0), s = z(e), [g, v] = N(0), [f, y] = N({ loading: !0 }), u = e.map, P = u ? H(u, ((C = o.meta) == null ? void 0 : C.locale) ?? "") : void 0;
103
+ k(() => {
104
104
  const m = new AbortController();
105
105
  return y({ loading: !0 }), u ? (X(u.source, u.featureProperty, i, m.signal).then((w) => y({ loading: !1, data: w })).catch((w) => {
106
106
  m.signal.aborted || (console.error(`[lens] map ${e.id} geometry failed`, w), y({ loading: !1, error: w instanceof Error ? w : new Error("Map geometry failed") }));
107
107
  }), () => m.abort()) : (y({ loading: !1, error: new Error("Map panel has no map config") }), () => m.abort());
108
108
  }, [g, u, i, P, e.id]);
109
- const h = $(() => f.data && r.data ? Y(e, r.data, f.data) : void 0, [r.data, f.data, e]);
110
- F(() => {
111
- h && console.error(`[lens] map ${e.id} data join failed`, h);
112
- }, [h, e.id]);
113
- const R = $(() => r.isLoading || r.error && !r.data || !r.data || r.data.rows.length === 0 ? r : f.loading ? { ...r, isLoading: !0 } : f.error ?? h ? {
109
+ const p = $(() => f.data && r.data ? Y(e, r.data, f.data) : void 0, [r.data, f.data, e]);
110
+ k(() => {
111
+ p && console.error(`[lens] map ${e.id} data join failed`, p);
112
+ }, [p, e.id]);
113
+ const R = $(() => r.isLoading || r.error && !r.data || !r.data || r.data.rows.length === 0 ? r : f.loading ? { ...r, isLoading: !0 } : f.error ?? p ? {
114
114
  isLoading: !1,
115
115
  isStale: !1,
116
116
  error: new Error(t("chart.error", "Unable to render chart.")),
117
117
  retry: () => v((w) => w + 1)
118
- } : r, [r, f, h, t]), b = $(() => {
119
- if (!r.data || r.data.rows.length === 0 || !f.data || h || !u) return;
120
- const m = (w, p) => n(p);
118
+ } : r, [r, f, p, t]), b = $(() => {
119
+ if (!r.data || r.data.rows.length === 0 || !f.data || p || !u) return;
120
+ const m = (w, h) => n(h);
121
121
  return {
122
122
  kind: "map",
123
123
  frame: r.data,
124
124
  encoding: e.encoding,
125
125
  format: m,
126
126
  formatAxis: m,
127
+ labels: { noData: t("panel.empty", "No data") },
127
128
  theme: o.theme,
128
129
  map: {
129
130
  name: `lens-map:${e.id}`,
@@ -133,14 +134,14 @@ function ne({ panel: e, adapter: a, fetcher: i, frame: l }) {
133
134
  fallbackLabelProperty: u.labelProperty
134
135
  }
135
136
  };
136
- }, [u, o.theme, n, r.data, f.data, h, P, e.encoding, e.id]), L = !!(e.drillRoot || s.action), S = O((m, w, p) => {
137
+ }, [u, o.theme, n, r.data, f.data, p, P, e.encoding, e.id, t]), L = !!(e.drillRoot || s.action), S = O((m, w, h) => {
137
138
  if (e.drillRoot) {
138
139
  d(m, e.id);
139
140
  return;
140
141
  }
141
142
  if (!r.data) return;
142
143
  const I = r.data.columns.findIndex(({ name: x }) => x === e.encoding.id), j = r.data.rows.find((x) => x[I] === m);
143
- s.activate(s.urlForRow(r.data, j), void 0, { newTab: p == null ? void 0 : p.newTab });
144
+ s.activate(s.urlForRow(r.data, j), void 0, { newTab: h == null ? void 0 : h.newTab });
144
145
  }, [d, r.data, s, e.drillRoot, e.encoding.id, e.id]);
145
146
  return /* @__PURE__ */ M(B, { panel: e, frame: R, children: b && /* @__PURE__ */ U(J, { children: [
146
147
  /* @__PURE__ */ M(
@@ -170,7 +171,7 @@ function ne({ panel: e, adapter: a, fetcher: i, frame: l }) {
170
171
  ] }) });
171
172
  }
172
173
  export {
173
- N as MAX_MAP_GEOJSON_BYTES,
174
+ F as MAX_MAP_GEOJSON_BYTES,
174
175
  ne as MapPanel,
175
176
  X as loadMapGeometry,
176
177
  Y as mapJoinError,
@@ -1,8 +1,8 @@
1
1
  import { jsxs as d, jsx as o, Fragment as F } from "react/jsx-runtime";
2
2
  import { useMemo as m } from "react";
3
- import { o as C, u as h, a0 as P, L as x, a6 as D, b as q, P as E } from "./index-DGLFNPl4.js";
3
+ import { o as C, u as h, a0 as P, L as x, a6 as D, b as q, P as E } from "./index-C3g4ib1H.js";
4
4
  import "@iota-uz/sdk/client-host";
5
- import { f as K, r as L, d as M, Q } from "./metricViews-CPJMPqcl.js";
5
+ import { f as K, r as L, d as M, Q } from "./metricViews-qsMUANFL.js";
6
6
  function v() {
7
7
  const e = h();
8
8
  return m(() => ({
@@ -1,8 +1,8 @@
1
1
  import { jsx as l, jsxs as t, Fragment as E } from "react/jsx-runtime";
2
2
  import { useMemo as d } from "react";
3
- import { o as K, u as x, a0 as N, L as g, a6 as A, b as D, P as L } from "./index-DGLFNPl4.js";
3
+ import { o as K, u as x, a0 as N, L as g, a6 as A, b as D, P as L } from "./index-C3g4ib1H.js";
4
4
  import "@iota-uz/sdk/client-host";
5
- import { h as M, r as Q, Q as V } from "./metricViews-CPJMPqcl.js";
5
+ import { h as M, r as Q, Q as V } from "./metricViews-qsMUANFL.js";
6
6
  function j() {
7
7
  const a = x();
8
8
  return d(() => ({
@@ -1,8 +1,8 @@
1
1
  import { jsx as s, jsxs as u, Fragment as A } from "react/jsx-runtime";
2
2
  import { useMemo as E } from "react";
3
- import { o as K, u as P, a0 as R, L as T, a6 as $, b as g, P as z } from "./index-DGLFNPl4.js";
3
+ import { o as K, u as P, a0 as R, L as T, a6 as $, b as g, P as z } from "./index-C3g4ib1H.js";
4
4
  import "@iota-uz/sdk/client-host";
5
- import { a as C, c as L, b as O, e as Q, Q as V } from "./metricViews-CPJMPqcl.js";
5
+ import { a as C, c as L, b as O, e as Q, Q as V } from "./metricViews-qsMUANFL.js";
6
6
  function j() {
7
7
  const a = P();
8
8
  return E(() => ({
@@ -1,12 +1,12 @@
1
1
  import { jsx as s, jsxs as u } from "react/jsx-runtime";
2
2
  import { useMemo as A, createContext as pe, useCallback as G, useContext as he, Fragment as fe } from "react";
3
3
  import { createPortal as ge } from "react-dom";
4
- import { W as be, b as ve, a as ye } from "./CascadePanel-DnwWRglV.js";
5
- import { C as ke } from "./ChartHost-DohEf1-L.js";
6
- import { u as T, r as Ne, f as M, b as we, a as xe, c as Fe, d as te, e as $e, g as ne, s as Se, h as Me } from "./index-DGLFNPl4.js";
4
+ import { W as be, b as ve, a as ye } from "./CascadePanel-CdeeYZsY.js";
5
+ import { C as ke } from "./ChartHost-DLcWF7pC.js";
6
+ import { u as T, r as Ne, f as M, b as we, a as xe, c as Fe, d as te, e as $e, g as ne, s as Se, h as Me } from "./index-C3g4ib1H.js";
7
7
  import "@iota-uz/sdk/client-host";
8
- import { r as B, a as Q, c as Ce, b as De, f as J, d as Te, h as Pe } from "./metricViews-CPJMPqcl.js";
9
- import { relationshipSentence as Ae } from "./MetricRelationshipPanel--MlnSeD0.js";
8
+ import { r as B, a as Q, c as Ce, b as De, f as J, d as Te, h as Pe } from "./metricViews-qsMUANFL.js";
9
+ import { relationshipSentence as Ae } from "./MetricRelationshipPanel-C-aL3I9t.js";
10
10
  function Ke(e, t) {
11
11
  const n = B(e);
12
12
  return n ? t(n.meta.labelKey, n.meta.fallback) : void 0;
@@ -1,6 +1,6 @@
1
1
  import { jsx as n, jsxs as h, Fragment as D } from "react/jsx-runtime";
2
2
  import { useState as G, useRef as ie, useMemo as ee, useEffect as re, useLayoutEffect as ct, createContext as dt, useContext as mt } from "react";
3
- import { o as ht, a as He, ad as ft, u as K, l as bt, ae as ut, P as pt, af as Ve, Q as gt, ag as Ke, ah as de, ai as Xe, aj as et, ak as Nt, Z as _e, al as je, L as oe, d as yt, am as vt } from "./index-DGLFNPl4.js";
3
+ import { o as ht, a as He, ad as ft, u as K, l as bt, ae as ut, P as pt, af as Ve, Q as gt, ag as Ke, ah as de, ai as Xe, aj as et, ak as Nt, Z as _e, al as je, L as oe, d as yt, am as vt } from "./index-C3g4ib1H.js";
4
4
  import "@iota-uz/sdk/client-host";
5
5
  const wt = 5, xt = 7, kt = 21, St = 10, tt = dt(null);
6
6
  function me(e, t) {