@iota-uz/sdk 0.16.0 → 0.17.0
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/client-host/identity.d.ts +4 -4
- package/dist/client-host/identity.js +2 -2
- package/dist/lens/{CascadePanel-jtC2EUUS.js → CascadePanel-Sd2OKQx-.js} +15 -15
- package/dist/lens/{ChartDataEquivalent-BFDdHoQn.js → ChartDataEquivalent-DgCAb4Ov.js} +14 -13
- package/dist/lens/ChartPanel-CiAahY9O.js +709 -0
- package/dist/lens/{CoveragePanel-5LWQwFMZ.js → CoveragePanel-DeeKg8gF.js} +10 -10
- package/dist/lens/{GaugePanel-eVYvp3Hk.js → GaugePanel-8rsf_XHS.js} +8 -8
- package/dist/lens/{MapPanel-CzpZKz1Y.js → MapPanel-Bq0mfVCB.js} +14 -14
- package/dist/lens/{MetricFlowPanel-CG2Bj7s6.js → MetricFlowPanel-ZBJqPFpc.js} +2 -2
- package/dist/lens/{MetricHierarchyPanel-Difdcafn.js → MetricHierarchyPanel-DStGwvVU.js} +2 -2
- package/dist/lens/{MetricRelationshipPanel-Cq1dFTeY.js → MetricRelationshipPanel-D6ItmGCS.js} +2 -2
- package/dist/lens/{PrintReport-BiUdo8XG.js → PrintReport-Dr-6xXVr.js} +413 -397
- package/dist/lens/{TablePanel-_6j7epQg.js → TablePanel-CzLP8gG0.js} +1 -1
- package/dist/lens/{adapter-DRShqW45.js → adapter-BwEwcw2W.js} +4960 -4956
- package/dist/lens/adapter-CgoRd_uP.js +6 -0
- package/dist/lens/charts/adapter.d.ts +1 -0
- package/dist/lens/charts/adapter.d.ts.map +1 -1
- package/dist/lens/charts/echarts/options.d.ts.map +1 -1
- package/dist/lens/charts/keys.d.ts +2 -0
- package/dist/lens/charts/keys.d.ts.map +1 -1
- package/dist/lens/contract/schemas.d.ts.map +1 -1
- package/dist/lens/contract/types.d.ts +1 -0
- package/dist/lens/contract/types.d.ts.map +1 -1
- package/dist/lens/{index-CmXDbBaF.js → index-B6anZ5Pr.js} +1 -1
- package/dist/lens/{index-BBtBPnTb.js → index-R9mnOHaj.js} +684 -667
- package/dist/lens/index.js +1 -1
- package/dist/lens/{install-ByIx15ES.js → install-CsNOaFxV.js} +1 -1
- package/dist/lens/{install-DKwCLbtk.js → install-CumkiUJn.js} +1 -1
- package/dist/lens/{install-ByEamXef.js → install-D5OiGDnd.js} +1 -1
- package/dist/lens/{install-DIbrzh5h.js → install-VEXJv-Wi.js} +1 -1
- package/dist/lens/keys-6_gqLhcv.js +78 -0
- package/dist/lens/{metricViews-IoSavtwn.js → metricViews-De-9pff-.js} +1 -1
- package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
- package/dist/lens/panels/data.d.ts +2 -0
- package/dist/lens/panels/data.d.ts.map +1 -1
- package/dist/lens/{prefetch-CrMQhAEy.js → prefetch-C_qYKOTU.js} +2 -2
- package/dist/lens/{prefetchPanels-BbWAAYrz.js → prefetchPanels-CD4C-A5q.js} +1 -1
- package/dist/lens/print/PrintReport.d.ts.map +1 -1
- package/dist/lens/{print-CLo-mTEP.js → print-Iu804kRb.js} +18 -18
- package/dist/lens/{scales-CChHRiVq.js → scales-CWTA0tSQ.js} +53 -53
- package/dist/sdk-identity.cjs +3 -3
- package/dist/sdk-identity.js +3 -3
- package/dist/sdk-identity.json +2 -2
- package/dist/testing/driver.d.ts +19 -0
- package/dist/testing/driver.js +103 -30
- package/dist/testing/fixtures.d.ts +27 -0
- package/dist/testing/fixtures.js +19 -4
- package/dist/testing/index.d.ts +3 -2
- package/dist/testing/index.js +6 -30
- package/dist/testing/lease.d.ts +11 -0
- package/dist/testing/lease.js +44 -0
- package/package.json +1 -1
- package/dist/lens/ChartHost-DTnhnwkn.js +0 -68
- package/dist/lens/ChartPanel-_S4IVYdJ.js +0 -730
- package/dist/lens/keys-DenV5HsJ.js +0 -12
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const SDK_RELEASE_VERSION = "0.
|
|
2
|
-
export declare const SDK_SOURCE_COMMIT = "
|
|
1
|
+
export declare const SDK_RELEASE_VERSION = "0.17.0";
|
|
2
|
+
export declare const SDK_SOURCE_COMMIT = "c1bde18a356a1ed107526ad885b92a3227f32dd6";
|
|
3
3
|
export declare const SDK_PROTOCOL_VERSION = "1.0.0";
|
|
4
4
|
export declare const SDK_IDENTITY: Readonly<{
|
|
5
|
-
releaseVersion: "0.
|
|
6
|
-
sourceCommit: "
|
|
5
|
+
releaseVersion: "0.17.0";
|
|
6
|
+
sourceCommit: "c1bde18a356a1ed107526ad885b92a3227f32dd6";
|
|
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.
|
|
3
|
-
export const SDK_SOURCE_COMMIT = '
|
|
2
|
+
export const SDK_RELEASE_VERSION = '0.17.0';
|
|
3
|
+
export const SDK_SOURCE_COMMIT = 'c1bde18a356a1ed107526ad885b92a3227f32dd6';
|
|
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,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o, jsxs as m, Fragment as Z } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { u as G, U as Q, V as tt, X as et, Y as at, Z as Y, _ as nt, $ as lt,
|
|
2
|
+
import { useState as B, useRef as z, 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, t as ot, a0 as T, L as _, M as st, a1 as it, I as rt, H as ct, A as dt, P as ut, a2 as F, a3 as H, a4 as ft } from "./index-R9mnOHaj.js";
|
|
4
4
|
import "@iota-uz/sdk/client-host";
|
|
5
5
|
import { createPortal as ht } from "react-dom";
|
|
6
6
|
function O({ raw: t }) {
|
|
7
|
-
const a = G(), [n, r] =
|
|
7
|
+
const a = G(), [n, r] = B(!1), u = z();
|
|
8
8
|
W(() => () => {
|
|
9
9
|
u.current && clearTimeout(u.current);
|
|
10
10
|
}, []);
|
|
@@ -34,7 +34,7 @@ function pt(t, a, n) {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
function bt({ anchor: t, open: a, item: n, actionHint: r, onMouseEnter: u, onMouseLeave: s }) {
|
|
37
|
-
const i = lt(a, t, "lens-waterfall-tip-overlay-root"), g =
|
|
37
|
+
const i = lt(a, t, "lens-waterfall-tip-overlay-root"), g = z(null), [c, d] = B(), f = D(() => {
|
|
38
38
|
var L, $, I, e;
|
|
39
39
|
const b = (L = t.current) == null ? void 0 : L.getBoundingClientRect(), x = ($ = g.current) == null ? void 0 : $.getBoundingClientRect();
|
|
40
40
|
if (!b || !x) return;
|
|
@@ -93,7 +93,7 @@ function bt({ anchor: t, open: a, item: n, actionHint: r, onMouseEnter: u, onMou
|
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
95
|
function vt({ item: t, index: a, count: n, chrome: r, splitCallout: u, actionHint: s, unknownLabel: i }) {
|
|
96
|
-
const [g, c] =
|
|
96
|
+
const [g, c] = B(!1), d = z(null), f = z(null), w = at(f), p = z(), b = () => {
|
|
97
97
|
p.current && clearTimeout(p.current), c(!0);
|
|
98
98
|
}, x = () => {
|
|
99
99
|
p.current && clearTimeout(p.current), p.current = setTimeout(() => c(!1), nt);
|
|
@@ -261,7 +261,7 @@ function j(t) {
|
|
|
261
261
|
}
|
|
262
262
|
return 0;
|
|
263
263
|
}
|
|
264
|
-
const
|
|
264
|
+
const A = "—";
|
|
265
265
|
function gt(t) {
|
|
266
266
|
return typeof t == "boolean" ? t : typeof t == "number" ? t !== 0 : typeof t == "string" && t.trim().toLowerCase() === "true";
|
|
267
267
|
}
|
|
@@ -288,17 +288,17 @@ function Mt(t, a) {
|
|
|
288
288
|
function q(t, a, n, r) {
|
|
289
289
|
const u = T(t, "label") ?? "label", s = T(t, "value") ?? "value", i = T(t, "cut") ?? "cut", g = T(t, "cutLabel") ?? "cutLabel", c = T(t, "final") ?? "final", d = T(t, "annotation"), f = T(t, "tone"), w = T(t, "split"), p = T(t, "splitLabel"), b = F(a, u), x = F(a, s), y = F(a, i), M = F(a, g), k = F(a, c), L = F(a, d), $ = F(a, f), I = F(a, w), e = F(a, p), l = (h) => ft(h[x]), N = Math.max(1, ...a.rows.map((h) => Math.max(0, l(h) ?? 0)));
|
|
290
290
|
return a.rows.map((h, v) => {
|
|
291
|
-
const E = l(h), V = E !== void 0, C = E ?? 0,
|
|
291
|
+
const E = l(h), V = E !== void 0, C = E ?? 0, P = j(h[y]), S = V && C > 0 ? Math.min(100, C / N * 100) : 0;
|
|
292
292
|
return {
|
|
293
293
|
label: H(h[b], `Stage ${v + 1}`),
|
|
294
294
|
value: C,
|
|
295
295
|
hasValue: V,
|
|
296
|
-
formattedValue: V ? n(C) :
|
|
297
|
-
cut:
|
|
296
|
+
formattedValue: V ? n(C) : A,
|
|
297
|
+
cut: P,
|
|
298
298
|
// A stage whose total is unknown has an unknown movement: the frame's own
|
|
299
299
|
// `cut` for such a row is a placeholder, and printing «0 UZS» beside it
|
|
300
300
|
// would restate the very lie the em dash above it just refused to tell.
|
|
301
|
-
formattedCut: V ? yt(
|
|
301
|
+
formattedCut: V ? yt(P, r) : A,
|
|
302
302
|
cutLabel: H(h[M], ""),
|
|
303
303
|
final: gt(h[k]),
|
|
304
304
|
annotation: L >= 0 ? H(h[L], "") : "",
|
|
@@ -424,7 +424,7 @@ function X(t, a, n = a, { formatExact: r = () => {
|
|
|
424
424
|
w = Math.min(w, e.from, e.to), p = Math.max(p, e.from, e.to);
|
|
425
425
|
});
|
|
426
426
|
const b = K(w, p), x = w < 0 ? Math.floor(w / b) * b : 0, y = Math.max(b, Math.ceil(p / b) * b), M = Math.max(1, y - x), k = (e) => Math.max(0, Math.min(100, (y - e) / M * 100)), L = k(0), $ = i.map((e, l) => {
|
|
427
|
-
const N = k(Math.max(e.from, e.to)), h = k(Math.min(e.from, e.to)), v = e.unknown === !0, E = v || e.kind !== "start" && e.kind !== "end" && e.value === 0, V = E ? 0 : Math.max(1.5, h - N), C = Math.abs(e.split),
|
|
427
|
+
const N = k(Math.max(e.from, e.to)), h = k(Math.min(e.from, e.to)), v = e.unknown === !0, E = v || e.kind !== "start" && e.kind !== "end" && e.value === 0, V = E ? 0 : Math.max(1.5, h - N), C = Math.abs(e.split), P = Math.abs(e.value), S = !v && C > d && C < P - d;
|
|
428
428
|
return {
|
|
429
429
|
label: e.label,
|
|
430
430
|
value: e.value,
|
|
@@ -432,7 +432,7 @@ function X(t, a, n = a, { formatExact: r = () => {
|
|
|
432
432
|
// exact form of a figure that does not exist, and no machine value to put
|
|
433
433
|
// on the clipboard, so the tooltip carries neither and shows no copy
|
|
434
434
|
// button rather than offering to copy a zero.
|
|
435
|
-
formattedValue: v ?
|
|
435
|
+
formattedValue: v ? A : e.kind === "start" || e.kind === "end" ? a(e.value) : Nt(e.value, a),
|
|
436
436
|
exactValue: v ? void 0 : e.kind === "start" || e.kind === "end" ? r(e.value) : Mt(e.value, r),
|
|
437
437
|
rawValue: v ? void 0 : u(e.value),
|
|
438
438
|
top: N,
|
|
@@ -441,7 +441,7 @@ function X(t, a, n = a, { formatExact: r = () => {
|
|
|
441
441
|
// so its percentage resolves against the bar's own box. Scaling by the
|
|
442
442
|
// bar's plot height too shrank every band by that height again — a 24.5%
|
|
443
443
|
// share of a bar 18% tall drew as 4.5% of it.
|
|
444
|
-
splitHeight: S ? 100 * (C /
|
|
444
|
+
splitHeight: S ? 100 * (C / P) : void 0,
|
|
445
445
|
formattedSplit: S ? a(C) : void 0,
|
|
446
446
|
exactSplit: S ? r(C) : void 0,
|
|
447
447
|
rawSplit: S ? u(C) : void 0,
|
|
@@ -471,7 +471,7 @@ function X(t, a, n = a, { formatExact: r = () => {
|
|
|
471
471
|
}
|
|
472
472
|
function Ct({ panel: t }) {
|
|
473
473
|
var $, I;
|
|
474
|
-
const a = ot(t.id), n = G(), r = T(t, "value") ?? "value", u = T(t, "cut") ?? "cut", s =
|
|
474
|
+
const a = ot(t.id), n = G(), r = T(t, "value") ?? "value", u = T(t, "cut") ?? "cut", s = _(t.format[r]), i = _(t.format[u] ?? t.format[r]), g = st(t.format[r]), c = it(t.format[r]), d = D(
|
|
475
475
|
(e) => rt(e, t.format[r]),
|
|
476
476
|
[t.format, r]
|
|
477
477
|
), f = ct(t.format[r]), w = a.data ? q(t, a.data, s, i) : [], p = (($ = t.presentation) == null ? void 0 : $.bridgeLayout) === "waterfall" ? X(w, s, g, { formatExact: c, rawValue: d }) : { items: [], ticks: [], zero: 100 }, b = p.items.some((e) => e.checkpoint), x = dt(t), y = (e) => {
|
|
@@ -563,7 +563,7 @@ const Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
563
563
|
CascadePanel: Ct,
|
|
564
564
|
buildCascadeStages: q,
|
|
565
565
|
buildWaterfallModel: X,
|
|
566
|
-
unknownValueText:
|
|
566
|
+
unknownValueText: A,
|
|
567
567
|
waterfallAxisStep: K
|
|
568
568
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
569
569
|
export {
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { r as g
|
|
2
|
+
import { r as g } from "./adapter-CgoRd_uP.js";
|
|
3
|
+
import { f as b } from "./keys-6_gqLhcv.js";
|
|
3
4
|
function y(n) {
|
|
4
5
|
return typeof n == "string" || typeof n == "number" || typeof n == "boolean" || typeof n == "bigint" ? String(n) : "";
|
|
5
6
|
}
|
|
6
|
-
function h(n, i,
|
|
7
|
-
var
|
|
8
|
-
const a = n.rows[
|
|
7
|
+
function h(n, i, o) {
|
|
8
|
+
var s;
|
|
9
|
+
const a = n.rows[o];
|
|
9
10
|
if (!a) return;
|
|
10
11
|
const t = (c) => {
|
|
11
12
|
const e = n.columns.findIndex(({ name: u }) => u === c);
|
|
12
13
|
return e >= 0 ? y(a[e]) : "";
|
|
13
14
|
}, l = t(i.encoding.id), d = t(i.encoding.category) || t(i.encoding.label), r = t(i.encoding.series);
|
|
14
|
-
return ((
|
|
15
|
+
return ((s = i.radial) == null ? void 0 : s.mode) === "partition" ? g(r, l || d) : l || b(d, r);
|
|
15
16
|
}
|
|
16
|
-
function k(n, i,
|
|
17
|
+
function k(n, i, o, a) {
|
|
17
18
|
const t = n.rows[a];
|
|
18
19
|
return t ? [
|
|
19
|
-
{ field: [i.encoding.category, i.encoding.label].find((r) => !!r && n.columns.some(({ name:
|
|
20
|
+
{ field: [i.encoding.category, i.encoding.label].find((r) => !!r && n.columns.some(({ name: s }) => s === r)), formatted: !1 },
|
|
20
21
|
{ field: i.encoding.series, formatted: !1 },
|
|
21
22
|
{ field: i.encoding.value, formatted: !0 }
|
|
22
|
-
].filter((r) => !!r.field).flatMap(({ field: r, formatted:
|
|
23
|
+
].filter((r) => !!r.field).flatMap(({ field: r, formatted: s }) => {
|
|
23
24
|
const c = n.columns.findIndex(({ name: u }) => u === r);
|
|
24
25
|
if (c < 0) return [];
|
|
25
|
-
const e =
|
|
26
|
+
const e = s || i.format[r] ? o(r, t[c]) : y(t[c]);
|
|
26
27
|
return e ? [e] : [];
|
|
27
28
|
}).join(", ") : "";
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
-
return /* @__PURE__ */ f("div", { "aria-label": a, className: "lens-chart-keyboard-actions", role: "list", children:
|
|
31
|
-
const e = h(
|
|
30
|
+
function D({ actionable: n, format: i, frame: o, label: a, onHover: t, onSelect: l, panel: d, translate: r }) {
|
|
31
|
+
return /* @__PURE__ */ f("div", { "aria-label": a, className: "lens-chart-keyboard-actions", role: "list", children: o.rows.map((s, c) => {
|
|
32
|
+
const e = h(o, d, c), u = k(o, d, i, c) || String(e ?? c + 1);
|
|
32
33
|
return /* @__PURE__ */ f("div", { role: "listitem", children: n && e !== void 0 ? /* @__PURE__ */ f(
|
|
33
34
|
"button",
|
|
34
35
|
{
|
|
@@ -47,6 +48,6 @@ function C({ actionable: n, format: i, frame: s, label: a, onHover: t, onSelect:
|
|
|
47
48
|
}) });
|
|
48
49
|
}
|
|
49
50
|
export {
|
|
50
|
-
C,
|
|
51
|
+
D as C,
|
|
51
52
|
h as c
|
|
52
53
|
};
|