@iota-uz/sdk 0.5.3 → 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 (33) 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-CBelm6bC.js → CascadePanel-CdeeYZsY.js} +1 -1
  4. package/dist/lens/{ChartHost-rKcUCBNo.js → ChartHost-DLcWF7pC.js} +2 -2
  5. package/dist/lens/{ChartPanel-BkmCcLe8.js → ChartPanel-DBX4StoU.js} +3 -3
  6. package/dist/lens/{CoveragePanel-DH_8AOhN.js → CoveragePanel-C5Y50Ja8.js} +1 -1
  7. package/dist/lens/{GaugePanel-BaJPz_2z.js → GaugePanel-QdD8-G_m.js} +1 -1
  8. package/dist/lens/{MapPanel-v99HJkGl.js → MapPanel-BYrx4srW.js} +20 -19
  9. package/dist/lens/{MetricFlowPanel-DstlsUQW.js → MetricFlowPanel-LreyGLdP.js} +2 -2
  10. package/dist/lens/{MetricHierarchyPanel-ByD8JzTQ.js → MetricHierarchyPanel-DvIh-llg.js} +2 -2
  11. package/dist/lens/{MetricRelationshipPanel-DrfQ58jw.js → MetricRelationshipPanel-C-aL3I9t.js} +2 -2
  12. package/dist/lens/{PrintReport-xi-iswMR.js → PrintReport-QqzDAR7K.js} +5 -5
  13. package/dist/lens/{TablePanel-Daw6L4Fm.js → TablePanel-DFfsYjWR.js} +1 -1
  14. package/dist/lens/{adapter-Bi3QzfzC.js → adapter-BoXhQplf.js} +4430 -4430
  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/{index-88l253R1.js → index-C3g4ib1H.js} +5 -5
  18. package/dist/lens/{index-Dvts5yK8.js → index-D16WayLn.js} +1 -1
  19. package/dist/lens/index.js +1 -1
  20. package/dist/lens/{install-CCwiOjQ0.js → install-4afWuWQV.js} +1 -1
  21. package/dist/lens/{install-BEBo0o42.js → install-Cw9b8dcU.js} +1 -1
  22. package/dist/lens/{install-CeT1_mBH.js → install-DCnlqrJl.js} +1 -1
  23. package/dist/lens/{install-DIpMnjeK.js → install-DiwRwFDZ.js} +1 -1
  24. package/dist/lens/{metricViews-CH2Cdo0x.js → metricViews-qsMUANFL.js} +1 -1
  25. package/dist/lens/panels/MapPanel.d.ts.map +1 -1
  26. package/dist/lens/{prefetch-C6OyvFGh.js → prefetch-3fl1oLRK.js} +2 -2
  27. package/dist/lens/{prefetchPanels-CdS2yC1c.js → prefetchPanels-DjyNoBKV.js} +1 -1
  28. package/dist/lens/{print-30aTJUkg.js → print-D6eDEk5V.js} +1 -1
  29. package/dist/lens/{scales-DOtg8I4r.js → scales-CuZBfqCM.js} +58 -58
  30. package/dist/sdk-identity.cjs +3 -3
  31. package/dist/sdk-identity.js +3 -3
  32. package/dist/sdk-identity.json +2 -2
  33. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
- export declare const SDK_RELEASE_VERSION = "0.5.3";
2
- export declare const SDK_SOURCE_COMMIT = "db8084f4562986a56203ee5752e99e73ee22586d";
1
+ export declare const SDK_RELEASE_VERSION = "0.5.4";
2
+ export declare const SDK_SOURCE_COMMIT = "9e1151e1f5837b45e34679bb3ab86183787832cc";
3
3
  export declare const SDK_PROTOCOL_VERSION = "1.0.0";
4
4
  export declare const SDK_IDENTITY: Readonly<{
5
- releaseVersion: "0.5.3";
6
- sourceCommit: "db8084f4562986a56203ee5752e99e73ee22586d";
5
+ releaseVersion: "0.5.4";
6
+ sourceCommit: "9e1151e1f5837b45e34679bb3ab86183787832cc";
7
7
  protocolVersion: "1.0.0";
8
8
  }>;
9
9
  export interface SDKRuntimeIdentity {
@@ -1,6 +1,6 @@
1
1
  import { CLIENT_HOST_PROTOCOL_VERSION } from './protocol';
2
- export const SDK_RELEASE_VERSION = '0.5.3';
3
- export const SDK_SOURCE_COMMIT = 'db8084f4562986a56203ee5752e99e73ee22586d';
2
+ export const SDK_RELEASE_VERSION = '0.5.4';
3
+ export const SDK_SOURCE_COMMIT = '9e1151e1f5837b45e34679bb3ab86183787832cc';
4
4
  export const SDK_PROTOCOL_VERSION = CLIENT_HOST_PROTOCOL_VERSION;
5
5
  export const SDK_IDENTITY = Object.freeze({
6
6
  releaseVersion: SDK_RELEASE_VERSION,
@@ -1,6 +1,6 @@
1
1
  import { jsx as o, jsxs as m, Fragment as Z } from "react/jsx-runtime";
2
2
  import { useState as _, useRef as P, useEffect as W, useCallback as D, useLayoutEffect as J } from "react";
3
- import { u as G, U as Q, V as tt, X as et, Y as at, Z as Y, _ as nt, $ as lt, o as ot, a0 as T, L as A, M as st, a1 as it, I as rt, H as ct, z as dt, P as ut, a2 as F, a3 as H, a4 as ft } from "./index-88l253R1.js";
3
+ import { u as G, U as Q, V as tt, X as et, Y as at, Z as Y, _ as nt, $ as lt, o as ot, a0 as T, L as A, M as st, a1 as it, I as rt, H as ct, z as dt, P as ut, a2 as F, a3 as H, a4 as ft } from "./index-C3g4ib1H.js";
4
4
  import "@iota-uz/sdk/client-host";
5
5
  import { createPortal as ht } from "react-dom";
6
6
  function O({ raw: t }) {
@@ -1,6 +1,6 @@
1
1
  import { jsxs as C, jsx as v } from "react/jsx-runtime";
2
2
  import { useRef as i, useState as H, useCallback as S, useEffect as p } from "react";
3
- import { u as $ } from "./index-88l253R1.js";
3
+ import { u as $ } from "./index-C3g4ib1H.js";
4
4
  import "@iota-uz/sdk/client-host";
5
5
  function U({ input: o, panelId: E, onSelect: N, onHover: R, adapter: u, label: j, drillable: b = !1, resetZoomKey: g = 0 }) {
6
6
  const d = i(null), t = i(), h = i(o), f = i({ onSelect: N, onHover: R }), [m, c] = H(), w = $();
@@ -21,7 +21,7 @@ function U({ input: o, panelId: E, onSelect: N, onHover: R, adapter: u, label: j
21
21
  return (l = (n = f.current).onHover) == null ? void 0 : l.call(n, r);
22
22
  }
23
23
  };
24
- return (u ? Promise.resolve(u) : import("./index-Dvts5yK8.js").then(({ getChartAdapter: r }) => r(h.current.kind))).then((r) => {
24
+ return (u ? Promise.resolve(u) : import("./index-D16WayLn.js").then(({ getChartAdapter: r }) => r(h.current.kind))).then((r) => {
25
25
  if (!(!e || !d.current)) {
26
26
  c(void 0);
27
27
  try {
@@ -1,11 +1,11 @@
1
1
  import { jsxs as k, jsx as l, Fragment as Ee } from "react/jsx-runtime";
2
2
  import { useState as re, useRef as $e, useCallback as Ae, useEffect as be, useMemo as K, memo as vt, useLayoutEffect as Ct, Fragment as Lt } from "react";
3
3
  import { r as At, f as kt } from "./keys-DenV5HsJ.js";
4
- import { s as Rt, o as _e, c as Kt, a as Tt, b as Ft, d as Et, f as Mt } from "./scales-DOtg8I4r.js";
5
- import { o as Bt, u as Re, a as wt, t as Ht, x as lt, y as dt, l as _t, z as zt, A as Ot, B as Ut, C as Vt, k as Dt, D as $t, E as Pt, F as gt, h as yt, s as bt, G as pt, H as qt, I as jt, g as Wt, J as Qt, K as Zt, P as Gt, W as Jt, L as H, M as ut, N as Yt, O as ze, Q as Xt, R as eo, S as to, T as oo } from "./index-88l253R1.js";
4
+ import { s as Rt, o as _e, c as Kt, a as Tt, b as Ft, d as Et, f as Mt } from "./scales-CuZBfqCM.js";
5
+ import { o as Bt, u as Re, a as wt, t as Ht, x as lt, y as dt, l as _t, z as zt, A as Ot, B as Ut, C as Vt, k as Dt, D as $t, E as Pt, F as gt, h as yt, s as bt, G as pt, H as qt, I as jt, g as Wt, J as Qt, K as Zt, P as Gt, W as Jt, L as H, M as ut, N as Yt, O as ze, Q as Xt, R as eo, S as to, T as oo } from "./index-C3g4ib1H.js";
6
6
  import "@iota-uz/sdk/client-host";
7
7
  import { c as no, C as ro } from "./ChartDataEquivalent-BFDdHoQn.js";
8
- import { C as so } from "./ChartHost-rKcUCBNo.js";
8
+ import { C as so } from "./ChartHost-DLcWF7pC.js";
9
9
  const io = 0.02, ao = oo, co = 4;
10
10
  function lo(e) {
11
11
  const n = H(), t = H(e.encoding.label ? e.format[e.encoding.label] : void 0), r = H(e.encoding.value ? e.format[e.encoding.value] : void 0), c = H(e.encoding.previous ? e.format[e.encoding.previous] : void 0), a = H(e.encoding.lower ? e.format[e.encoding.lower] : void 0), m = H(e.encoding.q1 ? e.format[e.encoding.q1] : void 0), y = H(e.encoding.median ? e.format[e.encoding.median] : void 0), f = H(e.encoding.q3 ? e.format[e.encoding.q3] : void 0), b = H(e.encoding.upper ? e.format[e.encoding.upper] : void 0), v = H(e.encoding.id ? e.format[e.encoding.id] : void 0), T = H(e.encoding.series ? e.format[e.encoding.series] : void 0), h = H(e.encoding.category ? e.format[e.encoding.category] : void 0), u = H(e.encoding.cut ? e.format[e.encoding.cut] : void 0), N = H(e.encoding.cutLabel ? e.format[e.encoding.cutLabel] : void 0), se = H(e.encoding.final ? e.format[e.encoding.final] : void 0), V = ut(e.encoding.value ? e.format[e.encoding.value] : void 0), Y = ut(e.encoding.median ? e.format[e.encoding.median] : void 0), _ = K(() => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as r, jsxs as f, Fragment as B } from "react/jsx-runtime";
2
2
  import { useMemo as E, useState as I } from "react";
3
- import { o as M, u as T, a0 as k, L as C, a as $, s as j, h as R, z as H, P as U, a5 as W, a2 as S, a3 as P } from "./index-88l253R1.js";
3
+ import { o as M, u as T, a0 as k, L as C, a as $, s as j, h as R, z as H, P as U, a5 as W, a2 as S, a3 as P } from "./index-C3g4ib1H.js";
4
4
  import "@iota-uz/sdk/client-host";
5
5
  function z(e) {
6
6
  if (typeof e == "number" && Number.isFinite(e)) return e;
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { o as N, u as F, L as b, P as M } from "./index-88l253R1.js";
2
+ import { o as N, u as F, L as b, P as M } from "./index-C3g4ib1H.js";
3
3
  import "@iota-uz/sdk/client-host";
4
4
  import "react";
5
5
  function y(a) {
@@ -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-88l253R1.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-rKcUCBNo.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-88l253R1.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-CH2Cdo0x.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-88l253R1.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-CH2Cdo0x.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-88l253R1.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-CH2Cdo0x.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-CBelm6bC.js";
5
- import { C as ke } from "./ChartHost-rKcUCBNo.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-88l253R1.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-CH2Cdo0x.js";
9
- import { relationshipSentence as Ae } from "./MetricRelationshipPanel-DrfQ58jw.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-88l253R1.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) {