@iota-uz/sdk 0.5.5 → 0.6.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-DWRIo6Xv.js → CascadePanel-jtC2EUUS.js} +1 -1
- package/dist/lens/{ChartHost-BGpwYPlh.js → ChartHost-DTnhnwkn.js} +2 -2
- package/dist/lens/{ChartPanel-Iqw_RITL.js → ChartPanel-_S4IVYdJ.js} +96 -95
- package/dist/lens/{CoveragePanel-Rq6Z7-u8.js → CoveragePanel-5LWQwFMZ.js} +1 -1
- package/dist/lens/DashboardPanels.d.ts.map +1 -1
- package/dist/lens/{GaugePanel-CTDVSO0n.js → GaugePanel-eVYvp3Hk.js} +1 -1
- package/dist/lens/{MapPanel-BJuQS56K.js → MapPanel-CzpZKz1Y.js} +2 -2
- package/dist/lens/{MetricFlowPanel-BF00TCYG.js → MetricFlowPanel-CG2Bj7s6.js} +2 -2
- package/dist/lens/{MetricHierarchyPanel-noemwonU.js → MetricHierarchyPanel-Difdcafn.js} +2 -2
- package/dist/lens/{MetricRelationshipPanel-CaJrg3cO.js → MetricRelationshipPanel-Cq1dFTeY.js} +2 -2
- package/dist/lens/{PrintReport-4Zq5enGI.js → PrintReport-BiUdo8XG.js} +5 -5
- package/dist/lens/{TablePanel-Df87WuQ-.js → TablePanel-_6j7epQg.js} +1 -1
- package/dist/lens/{adapter-rxhzVMx3.js → adapter-DRShqW45.js} +6 -6
- package/dist/lens/contract/schemas.d.ts +1 -0
- package/dist/lens/contract/schemas.d.ts.map +1 -1
- package/dist/lens/contract/types.d.ts +5 -0
- package/dist/lens/contract/types.d.ts.map +1 -1
- package/dist/lens/controls/FilterBar.d.ts +5 -0
- package/dist/lens/controls/FilterBar.d.ts.map +1 -1
- package/dist/lens/{index-qRiVmQtS.js → index-BBtBPnTb.js} +2437 -2409
- package/dist/lens/{index-DF3Hl3Sd.js → index-CmXDbBaF.js} +1 -1
- package/dist/lens/index.js +1 -1
- package/dist/lens/{install-Cap6vjDJ.js → install-ByEamXef.js} +1 -1
- package/dist/lens/{install-Djw5_7yc.js → install-ByIx15ES.js} +1 -1
- package/dist/lens/{install-RMvin9s4.js → install-DIbrzh5h.js} +1 -1
- package/dist/lens/{install-CAkywSEN.js → install-DKwCLbtk.js} +1 -1
- package/dist/lens/{metricViews-BU7nWmUf.js → metricViews-IoSavtwn.js} +1 -1
- package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
- package/dist/lens/panels/PanelFrame.d.ts.map +1 -1
- package/dist/lens/{prefetch-sik_4zL1.js → prefetch-CrMQhAEy.js} +2 -2
- package/dist/lens/{prefetchPanels-BQXqElQ3.js → prefetchPanels-BbWAAYrz.js} +1 -1
- package/dist/lens/{print-z1h5kzIq.js → print-CLo-mTEP.js} +1 -1
- package/dist/lens/{scales-BMdWfL6A.js → scales-CChHRiVq.js} +1 -1
- package/dist/lens/style.css +1 -1
- package/dist/sdk-identity.cjs +3 -3
- package/dist/sdk-identity.js +3 -3
- package/dist/sdk-identity.json +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const SDK_RELEASE_VERSION = "0.5.
|
|
2
|
-
export declare const SDK_SOURCE_COMMIT = "
|
|
1
|
+
export declare const SDK_RELEASE_VERSION = "0.5.6";
|
|
2
|
+
export declare const SDK_SOURCE_COMMIT = "6b7490fb17af61fd3d13d6009578b4a8997d80d0";
|
|
3
3
|
export declare const SDK_PROTOCOL_VERSION = "1.0.0";
|
|
4
4
|
export declare const SDK_IDENTITY: Readonly<{
|
|
5
|
-
releaseVersion: "0.5.
|
|
6
|
-
sourceCommit: "
|
|
5
|
+
releaseVersion: "0.5.6";
|
|
6
|
+
sourceCommit: "6b7490fb17af61fd3d13d6009578b4a8997d80d0";
|
|
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
|
-
export const SDK_SOURCE_COMMIT = '
|
|
2
|
+
export const SDK_RELEASE_VERSION = '0.5.6';
|
|
3
|
+
export const SDK_SOURCE_COMMIT = '6b7490fb17af61fd3d13d6009578b4a8997d80d0';
|
|
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-
|
|
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-BBtBPnTb.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-
|
|
3
|
+
import { u as $ } from "./index-BBtBPnTb.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-
|
|
24
|
+
return (u ? Promise.resolve(u) : import("./index-CmXDbBaF.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,27 +1,27 @@
|
|
|
1
1
|
import { jsxs as R, jsx as l, Fragment as Ee } from "react/jsx-runtime";
|
|
2
2
|
import { useState as ae, useRef as Pe, useCallback as Ae, useEffect as xe, useMemo as T, memo as bt, useLayoutEffect as kt, Fragment as Rt } from "react";
|
|
3
3
|
import { r as Kt, f as Tt } from "./keys-DenV5HsJ.js";
|
|
4
|
-
import { s as Ft, o as ze, c as Et, a as Mt, b as Bt, d as Ht, f as _t } from "./scales-
|
|
5
|
-
import { o as zt, u as Re, a as pt, t as Ot, x as ut, y as mt, l as
|
|
4
|
+
import { s as Ft, o as ze, c as Et, a as Mt, b as Bt, d as Ht, f as _t } from "./scales-CChHRiVq.js";
|
|
5
|
+
import { o as zt, u as Re, a as pt, t as Ot, x as ut, y as mt, l as $t, z as Ut, A as Vt, B as Dt, C as Pt, k as qt, D as jt, E as Wt, F as ht, h as xt, s as St, G as It, H as Qt, I as Zt, g as Gt, J as Jt, K as Yt, P as Xt, W as eo, L as H, M as ft, N as to, O as Oe, Q as oo, R as no, S as ro, T as so } from "./index-BBtBPnTb.js";
|
|
6
6
|
import "@iota-uz/sdk/client-host";
|
|
7
7
|
import { c as io, C as ao } from "./ChartDataEquivalent-BFDdHoQn.js";
|
|
8
|
-
import { C as co } from "./ChartHost-
|
|
8
|
+
import { C as co } from "./ChartHost-DTnhnwkn.js";
|
|
9
9
|
const lo = 0.02, go = so, uo = 4;
|
|
10
10
|
function mo(e) {
|
|
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), F = 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), ce = H(e.encoding.final ? e.format[e.encoding.final] : void 0),
|
|
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), F = 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), ce = H(e.encoding.final ? e.format[e.encoding.final] : void 0), V = ft(e.encoding.value ? e.format[e.encoding.value] : void 0), te = ft(e.encoding.median ? e.format[e.encoding.median] : void 0), _ = T(() => {
|
|
12
12
|
const B = { label: t, value: r, previous: c, lower: a, q1: m, median: y, q3: f, upper: b, id: v, series: F, category: h, cut: u, cutLabel: N, final: ce }, A = /* @__PURE__ */ new Map();
|
|
13
13
|
for (const C of to) {
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const oe = e.encoding[C], K = B[C];
|
|
15
|
+
oe && K && A.set(oe, K);
|
|
16
16
|
}
|
|
17
|
-
return (C,
|
|
17
|
+
return (C, oe) => (A.get(C) ?? n)(oe);
|
|
18
18
|
}, [h, u, N, n, ce, v, t, a, y, e.encoding, c, m, f, F, b, r]), se = T(() => {
|
|
19
19
|
const B = e.encoding.value, A = e.encoding.median;
|
|
20
|
-
return (C,
|
|
21
|
-
}, [
|
|
20
|
+
return (C, oe) => B && C === B ? V(oe) : A && C === A ? te(oe) : _(C, oe);
|
|
21
|
+
}, [te, _, e.encoding.median, e.encoding.value, V]);
|
|
22
22
|
return T(() => ({ format: _, formatAxis: se }), [_, se]);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function $e(e, n, t) {
|
|
25
25
|
var y, f;
|
|
26
26
|
const r = n.encoding.id ? e.columns.findIndex((b) => b.name === n.encoding.id) : -1, c = [n.encoding.category, n.encoding.label].find((b) => !!b && e.columns.some((v) => v.name === b)), a = e.columns.findIndex((b) => b.name === c), m = r >= 0 ? (y = e.rows[t]) == null ? void 0 : y[r] : (f = e.rows[t]) == null ? void 0 : f[a];
|
|
27
27
|
return String(typeof m == "string" || typeof m == "number" || typeof m == "bigint" ? m : t);
|
|
@@ -33,12 +33,12 @@ function vt(e, n, t) {
|
|
|
33
33
|
if (f >= 0) {
|
|
34
34
|
const b = e.rows.findIndex((v, F) => {
|
|
35
35
|
const h = v[f], u = typeof h == "string" || typeof h == "number" || typeof h == "bigint" ? String(h) : "";
|
|
36
|
-
return Kt(u,
|
|
36
|
+
return Kt(u, $e(e, n, F)) === t;
|
|
37
37
|
});
|
|
38
38
|
if (b >= 0) return b;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
const r = e.rows.findIndex((f, b) =>
|
|
41
|
+
const r = e.rows.findIndex((f, b) => $e(e, n, b) === t);
|
|
42
42
|
if (r >= 0) return r;
|
|
43
43
|
const c = n.encoding.category ?? n.encoding.label, a = e.columns.findIndex((f) => f.name === c), m = e.columns.findIndex((f) => f.name === n.encoding.series);
|
|
44
44
|
return a < 0 ? -1 : e.rows.findIndex((f) => Tt(
|
|
@@ -65,7 +65,7 @@ function ho(e, n) {
|
|
|
65
65
|
function fo(e, n, t) {
|
|
66
66
|
var a;
|
|
67
67
|
const r = Nt(e, n);
|
|
68
|
-
if (r < 0) return
|
|
68
|
+
if (r < 0) return $e(e, n, t);
|
|
69
69
|
const c = (a = e.rows[t]) == null ? void 0 : a[r];
|
|
70
70
|
return String(typeof c == "string" || typeof c == "number" || typeof c == "bigint" ? c : t);
|
|
71
71
|
}
|
|
@@ -114,32 +114,32 @@ function yt(e, n, t) {
|
|
|
114
114
|
}
|
|
115
115
|
function Fo({ panel: e, adapter: n }) {
|
|
116
116
|
var Ze, Ge, Je, Ye, Xe, et, tt, ot, nt, rt, st, it, at, ct, lt;
|
|
117
|
-
const t = zt(e.id), r = Re(), { document: c, navigation: a } = pt(), { drillInto: m } = Ot(), { format: y, formatAxis: f } = mo(e), [b, v] = ae(), [F, h] = ae(!1), [u, N] = ae(0), ce = typeof window > "u" ? { regression: !1 } : ut(new URL(window.location.href), e.id), [
|
|
118
|
-
if (
|
|
117
|
+
const t = zt(e.id), r = Re(), { document: c, navigation: a } = pt(), { drillInto: m } = Ot(), { format: y, formatAxis: f } = mo(e), [b, v] = ae(), [F, h] = ae(!1), [u, N] = ae(0), ce = typeof window > "u" ? { regression: !1 } : ut(new URL(window.location.href), e.id), [V, te] = ae(ce.regression), [_, se] = ae(ce.movingAverage), [B, A] = ae(() => /* @__PURE__ */ new Set()), [C, oe] = ae(() => typeof window > "u" ? /* @__PURE__ */ new Set() : mt(new URL(window.location.href), e.id)), K = C, ne = a.panelId === e.id && a.path.length > 0, W = ne ? $t(c, a.path) : e.drillRoot ? c.drill.edges[e.drillRoot] : void 0, Me = W ? W.children.some(({ target: o }) => o) : !!e.drillRoot, re = !!e.drillRoot || !!W, z = Ut(e), le = Pe(), de = Ae((o) => {
|
|
118
|
+
if (re || !z.action || !t.data) return;
|
|
119
119
|
const i = vt(t.data, e, o);
|
|
120
120
|
return z.urlForRow(t.data, i >= 0 ? t.data.rows[i] : void 0);
|
|
121
|
-
}, [t.data,
|
|
121
|
+
}, [t.data, re, z, e]), fe = Ae((o) => {
|
|
122
122
|
var i;
|
|
123
|
-
(i = le.current) == null || i.call(le), le.current = void 0, !(o === null ||
|
|
124
|
-
}, [
|
|
123
|
+
(i = le.current) == null || i.call(le), le.current = void 0, !(o === null || re) && (le.current = z.prefetch(de(o)));
|
|
124
|
+
}, [re, de, z]);
|
|
125
125
|
xe(() => () => {
|
|
126
126
|
var o;
|
|
127
127
|
return (o = le.current) == null ? void 0 : o.call(le);
|
|
128
128
|
}, []);
|
|
129
129
|
const J = T(() => {
|
|
130
130
|
var o;
|
|
131
|
-
return
|
|
131
|
+
return re || ((o = z.action) == null ? void 0 : o.kind) !== "open_drawer" || !t.data ? [] : t.data.rows.length === 0 || t.data.rows.length > 4 ? [] : [...new Set(t.data.rows.flatMap((i) => {
|
|
132
132
|
const d = z.urlForRow(t.data, i);
|
|
133
133
|
return d ? [d] : [];
|
|
134
134
|
}))];
|
|
135
|
-
}, [t.data,
|
|
135
|
+
}, [t.data, re, z]);
|
|
136
136
|
xe(() => {
|
|
137
137
|
if (J.length !== 0)
|
|
138
138
|
return z.prefetchIdle(J);
|
|
139
139
|
}, [J, z]);
|
|
140
|
-
const I =
|
|
140
|
+
const I = Vt(), Y = ((Ze = z.action) == null ? void 0 : Ze.kind) === "cross_filter" || ((Ge = z.action) == null ? void 0 : Ge.kind) === "cube_drill" ? z.action.filter : void 0, be = T(() => {
|
|
141
141
|
if (!(Y != null && Y.dimension)) return;
|
|
142
|
-
const o = I.values[
|
|
142
|
+
const o = I.values[Dt], i = Array.isArray(o) ? o : o ? [o] : [], d = `${Y.dimension}:`, w = new Set(i.filter((k) => k.startsWith(d)).map((k) => k.slice(d.length)));
|
|
143
143
|
return w.size > 0 ? w : void 0;
|
|
144
144
|
}, [Y == null ? void 0 : Y.dimension, I.values]), Ke = T(() => {
|
|
145
145
|
if (!be || !Y || !t.data) return;
|
|
@@ -150,13 +150,13 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
150
150
|
fields: qt(o, o.rows[i]),
|
|
151
151
|
variables: {}
|
|
152
152
|
}), w = ke(d);
|
|
153
|
-
if (w !== "" && be.has(w)) return
|
|
153
|
+
if (w !== "" && be.has(w)) return $e(o, e, i);
|
|
154
154
|
}
|
|
155
155
|
}, [be, Y, t.data, e]), X = e.kind, Te = t.data ? vo(t.data, e) <= 1 && wo(t.data, e) <= 1 : !1, Se = `${a.panelId === e.id ? a.path.join("|") : ""}:${a.perspectiveId ?? ""}`, Ie = Pe(Se);
|
|
156
156
|
xe(() => {
|
|
157
157
|
Ie.current !== Se && (Ie.current = Se, v(void 0));
|
|
158
158
|
}, [Se]);
|
|
159
|
-
const ve = Ae((o) =>
|
|
159
|
+
const ve = Ae((o) => oe(new Set(o)), []);
|
|
160
160
|
xe(() => {
|
|
161
161
|
if (typeof window > "u") return;
|
|
162
162
|
const o = () => ve(mt(new URL(window.location.href), e.id));
|
|
@@ -169,23 +169,23 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
169
169
|
if (typeof window > "u") return;
|
|
170
170
|
const o = () => {
|
|
171
171
|
const i = ut(new URL(window.location.href), e.id);
|
|
172
|
-
|
|
172
|
+
te(i.regression), se(i.movingAverage);
|
|
173
173
|
};
|
|
174
174
|
return window.addEventListener("popstate", o), () => window.removeEventListener("popstate", o);
|
|
175
175
|
}, [e.id]), xe(() => {
|
|
176
176
|
if (typeof window > "u") return;
|
|
177
|
-
const o = new URL(window.location.href), i = Wt(o, e.id, { regression:
|
|
177
|
+
const o = new URL(window.location.href), i = Wt(o, e.id, { regression: V, movingAverage: _ });
|
|
178
178
|
i.search !== o.search && window.history.replaceState(window.history.state, "", i);
|
|
179
|
-
}, [_, e.id,
|
|
180
|
-
const
|
|
179
|
+
}, [_, e.id, V]);
|
|
180
|
+
const D = T(() => {
|
|
181
181
|
var O, me;
|
|
182
182
|
if (!t.data || K.size === 0) return t.data;
|
|
183
183
|
const o = t.data.rows.map((G, ie) => !K.has(fo(t.data, e, ie))), i = t.data.rows.filter((G, ie) => o[ie]), d = (O = t.data.colors) == null ? void 0 : O.filter((G, ie) => o[ie]), w = t.data.columns.findIndex((G) => G.name === e.encoding.value), k = ((me = e.radial) == null ? void 0 : me.mode) === "partition" || w < 0 ? t.data.total : i.reduce((G, ie) => G + (he(ie[w]) ?? 0), 0);
|
|
184
184
|
return { ...t.data, rows: i, total: k, ...d ? { colors: d } : {} };
|
|
185
|
-
}, [t.data, K, e]), E = T(() =>
|
|
186
|
-
const o = wt(
|
|
187
|
-
return o.collapsed ? o : yt(
|
|
188
|
-
})() : { frame:
|
|
185
|
+
}, [t.data, K, e]), E = T(() => D ? (() => {
|
|
186
|
+
const o = wt(D, e);
|
|
187
|
+
return o.collapsed ? o : yt(D, e, r("chart.other", "Other"));
|
|
188
|
+
})() : { frame: D, collapsed: !1 }, [e, r, D]), Fe = E.collapsed && E.frame ? io(E.frame, e, E.frame.rows.length - 1) : void 0, $ = F || !E.collapsed ? D : E.frame, s = $ ? Ft($, e.encoding, e.valueAxis, (Je = e.presentation) == null ? void 0 : Je.valueSpreadThreshold) : !1, L = T(() => {
|
|
189
189
|
if (!t.data || F) return t.data;
|
|
190
190
|
const o = wt(t.data, e);
|
|
191
191
|
return o.collapsed ? o.frame : yt(t.data, e, r("chart.other", "Other")).frame;
|
|
@@ -194,14 +194,14 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
194
194
|
if (!t.data || K.size === 0 || !e.encoding.value || ((i = e.radial) == null ? void 0 : i.mode) === "partition") return;
|
|
195
195
|
const o = t.data.columns.findIndex((d) => d.name === e.encoding.value);
|
|
196
196
|
if (!(o < 0))
|
|
197
|
-
return ((
|
|
198
|
-
}, [t.data, K.size, e.encoding.value, (Ye = e.radial) == null ? void 0 : Ye.mode,
|
|
197
|
+
return ((D == null ? void 0 : D.rows) ?? []).reduce((d, w) => d + (he(w[o]) ?? 0), 0);
|
|
198
|
+
}, [t.data, K.size, e.encoding.value, (Ye = e.radial) == null ? void 0 : Ye.mode, D]), ee = T(() => {
|
|
199
199
|
var i;
|
|
200
200
|
if (!t.data || !e.encoding.value || ((i = e.radial) == null ? void 0 : i.mode) === "partition") return;
|
|
201
201
|
const o = t.data.columns.findIndex((d) => d.name === e.encoding.value);
|
|
202
202
|
if (!(o < 0))
|
|
203
203
|
return t.data.rows.reduce((d, w) => d + (he(w[o]) ?? 0), 0);
|
|
204
|
-
}, [t.data, e.encoding.value, (Xe = e.radial) == null ? void 0 : Xe.mode]), Q = K.size > 0 && ((
|
|
204
|
+
}, [t.data, e.encoding.value, (Xe = e.radial) == null ? void 0 : Xe.mode]), Q = K.size > 0 && ((D == null ? void 0 : D.rows.length) ?? 0) === 0, P = t.data && t.data.rows.length > 0 ? t.data.total ?? (ne || e.kind === "pie" || e.kind === "donut" || e.kind === "radial" ? ee : void 0) ?? e.total : void 0, U = P === void 0 || Q ? null : K.size > 0 ? S ?? null : P, M = ((et = t.data) == null ? void 0 : et.presentation) ?? e.presentation, Z = $ == null ? void 0 : $.colors, pe = Ae((o) => {
|
|
205
205
|
const i = new Set(K);
|
|
206
206
|
i.has(o) ? i.delete(o) : i.add(o), ve(i);
|
|
207
207
|
}, [K, ve]), ue = T(() => {
|
|
@@ -212,7 +212,7 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
212
212
|
};
|
|
213
213
|
}, [W]), ge = T(() => xt(t.data, e), [t.data, e]), we = T(() => {
|
|
214
214
|
var k, O, me;
|
|
215
|
-
const o = St(c.theme, e, { positional: !
|
|
215
|
+
const o = St(c.theme, e, { positional: !ne, labels: ge }), i = ho(t.data, e), d = /* @__PURE__ */ new Map(), w = ((k = t.data) == null ? void 0 : k.columns.findIndex((G) => G.name === e.encoding.series)) ?? -1;
|
|
216
216
|
if (w >= 0)
|
|
217
217
|
for (const [G, ie] of (((O = t.data) == null ? void 0 : O.rows) ?? []).entries()) {
|
|
218
218
|
const _e = ie[w], dt = (me = Z == null ? void 0 : Z[G]) == null ? void 0 : me.trim();
|
|
@@ -222,20 +222,20 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
return i.size === 0 && d.size === 0 ? o : (G, ie) => d.get(G) ?? o(G, i.get(G) ?? ie);
|
|
225
|
-
}, [
|
|
226
|
-
() => It(c.theme, e, { colors: Z, positional: !
|
|
227
|
-
[
|
|
225
|
+
}, [ne, c.theme, t.data, Z, ge, e]), ye = T(
|
|
226
|
+
() => It(c.theme, e, { colors: Z, positional: !ne, labels: ge }),
|
|
227
|
+
[ne, c.theme, Z, ge, e]
|
|
228
228
|
), g = T(() => {
|
|
229
229
|
var i;
|
|
230
230
|
const o = new Set(B);
|
|
231
|
-
|
|
231
|
+
V || o.add(ze.trend);
|
|
232
232
|
for (const { window: d } of ((i = e.temporal) == null ? void 0 : i.movingAverages) ?? [])
|
|
233
233
|
d !== _ && o.add(ze.average(d));
|
|
234
234
|
return o;
|
|
235
|
-
}, [B, _, (tt = e.temporal) == null ? void 0 : tt.movingAverages,
|
|
235
|
+
}, [B, _, (tt = e.temporal) == null ? void 0 : tt.movingAverages, V]), p = Ae((o) => {
|
|
236
236
|
var d, w;
|
|
237
237
|
if (o === ze.trend) {
|
|
238
|
-
|
|
238
|
+
te((k) => !k);
|
|
239
239
|
return;
|
|
240
240
|
}
|
|
241
241
|
const i = (w = (d = e.temporal) == null ? void 0 : d.movingAverages) == null ? void 0 : w.find(({ window: k }) => ze.average(k) === o);
|
|
@@ -251,9 +251,9 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
251
251
|
e.temporal.regression && /* @__PURE__ */ l(
|
|
252
252
|
"button",
|
|
253
253
|
{
|
|
254
|
-
"aria-pressed":
|
|
254
|
+
"aria-pressed": V,
|
|
255
255
|
className: "lens-temporal-toggle",
|
|
256
|
-
onClick: () =>
|
|
256
|
+
onClick: () => te((o) => !o),
|
|
257
257
|
type: "button",
|
|
258
258
|
children: r("chart.regression", "Trend")
|
|
259
259
|
}
|
|
@@ -292,9 +292,9 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
292
292
|
copied: r("explore.copied", "Copied")
|
|
293
293
|
}), [r]), j = T(() => {
|
|
294
294
|
var o, i;
|
|
295
|
-
return
|
|
295
|
+
return $ ? {
|
|
296
296
|
kind: X,
|
|
297
|
-
frame:
|
|
297
|
+
frame: $,
|
|
298
298
|
encoding: e.encoding,
|
|
299
299
|
format: y,
|
|
300
300
|
formatAxis: f,
|
|
@@ -327,7 +327,7 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
327
327
|
valueUnit: Qt(e.encoding.value ? e.format[e.encoding.value] : void 0),
|
|
328
328
|
expandable: ue
|
|
329
329
|
} : void 0;
|
|
330
|
-
}, [q, (it = c.meta) == null ? void 0 : it.locale, c.theme, ue, y, f, Ke, g, X, e.encoding, e.format, e.radial, e.temporal, e.valueAxis, M,
|
|
330
|
+
}, [q, (it = c.meta) == null ? void 0 : it.locale, c.theme, ue, y, f, Ke, g, X, e.encoding, e.format, e.radial, e.temporal, e.valueAxis, M, $, ye, b, we, r]), Ne = T(() => {
|
|
331
331
|
var i, d;
|
|
332
332
|
if (!e.temporal && !e.encoding.previous) return [];
|
|
333
333
|
const o = e.encoding.category ?? e.encoding.label;
|
|
@@ -344,13 +344,13 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
344
344
|
}),
|
|
345
345
|
hidden: g
|
|
346
346
|
});
|
|
347
|
-
}, [q, (at = c.meta) == null ? void 0 : at.locale, y, (ct = t.data) == null ? void 0 : ct.columns, g, e.encoding, e.format, e.temporal]), Be = Yt(),
|
|
347
|
+
}, [q, (at = c.meta) == null ? void 0 : at.locale, y, (ct = t.data) == null ? void 0 : ct.columns, g, e.encoding, e.format, e.temporal]), Be = Yt(), Ue = re ? Be ? !!((W == null ? void 0 : W.children.length) ?? e.drillRoot) : Me : !!z.action, qe = X === "histogram" || X === "boxplot" || X === "heatmap", Ve = Te && !qe, De = Ae((o, i, d) => {
|
|
348
348
|
const w = E.frame ? E.frame.rows.length - 1 : -1;
|
|
349
349
|
if (E.collapsed && !!(o === Fe || E.frame && vt(E.frame, e, o) === w)) {
|
|
350
350
|
h((me) => !me);
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
|
-
if (!
|
|
353
|
+
if (!re) {
|
|
354
354
|
const me = de(o);
|
|
355
355
|
z.activate(me, void 0, { newTab: d == null ? void 0 : d.newTab });
|
|
356
356
|
return;
|
|
@@ -361,13 +361,13 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
361
361
|
}
|
|
362
362
|
const O = ht(W, o);
|
|
363
363
|
W && !(O != null && O.target) || (v(o), m((O == null ? void 0 : O.key) ?? o, e.id));
|
|
364
|
-
}, [E.collapsed, E.frame, Fe, m,
|
|
365
|
-
() => j &&
|
|
366
|
-
[Qe, j,
|
|
364
|
+
}, [E.collapsed, E.frame, Fe, m, re, W, de, Be, e, z]), je = !Ve && (M == null ? void 0 : M.legend) === "below" && !!$, Lt = !Ve && Ne.length > 0 && !!$, Ce = Ue || E.collapsed, At = e.encoding.category ?? e.encoding.label, We = (X === "line" || X === "area") && ($ == null ? void 0 : $.columns.some((o) => o.name === At && o.type === "time")) === !0, He = Ne.find((o) => o.kind === "incomplete" && o.active), Qe = Y ? r("chart.filterHint", "Select to filter the page") : r("chart.drillHint", "Select to explore"), Le = T(
|
|
365
|
+
() => j && Ue ? { ...j, actionHint: Qe } : j,
|
|
366
|
+
[Qe, j, Ue]
|
|
367
367
|
);
|
|
368
|
-
return /* @__PURE__ */ l(Xt, { allowEmptyContent: !qe, panel: e, frame: t, headerActions: x, total:
|
|
368
|
+
return /* @__PURE__ */ l(Xt, { allowEmptyContent: !qe, panel: e, frame: t, headerActions: x, total: U, children: /* @__PURE__ */ R("div", { className: `lens-chart-layout${je ? " lens-chart-layout-legend" : ""}`, children: [
|
|
369
369
|
/* @__PURE__ */ R("div", { className: "lens-chart-area", children: [
|
|
370
|
-
(M == null ? void 0 : M.totalBadge) === "plot" && X !== "donut" && ((lt = e.radial) == null ? void 0 : lt.mode) !== "partition" &&
|
|
370
|
+
(M == null ? void 0 : M.totalBadge) === "plot" && X !== "donut" && ((lt = e.radial) == null ? void 0 : lt.mode) !== "partition" && U !== null && /* @__PURE__ */ l(xo, { panel: e, total: U }),
|
|
371
371
|
(s || He || We || be || F && E.collapsed) && /* @__PURE__ */ R("div", { className: "lens-chart-notes", children: [
|
|
372
372
|
be && /* @__PURE__ */ l("span", { className: "lens-chart-source-note", role: "note", children: r("chart.crossFilterSource", "All categories shown — the filter applies to the other panels") }),
|
|
373
373
|
s && /* @__PURE__ */ R(
|
|
@@ -388,12 +388,12 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
388
388
|
We && /* @__PURE__ */ l("button", { className: "lens-chart-reset-zoom", onClick: () => N((o) => o + 1), type: "button", children: r("chart.resetZoom", "Reset zoom") })
|
|
389
389
|
] })
|
|
390
390
|
] }),
|
|
391
|
-
Q ? /* @__PURE__ */ l(bo, { onShowAll: () => ve(/* @__PURE__ */ new Set()) }) : Le &&
|
|
391
|
+
Q ? /* @__PURE__ */ l(bo, { onShowAll: () => ve(/* @__PURE__ */ new Set()) }) : Le && Ve ? /* @__PURE__ */ l(
|
|
392
392
|
po,
|
|
393
393
|
{
|
|
394
394
|
actionable: Ce,
|
|
395
395
|
frame: Le.frame,
|
|
396
|
-
onSelect: Ce ?
|
|
396
|
+
onSelect: Ce ? De : void 0,
|
|
397
397
|
panel: e
|
|
398
398
|
}
|
|
399
399
|
) : Le && /* @__PURE__ */ R(Ee, { children: [
|
|
@@ -405,7 +405,7 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
405
405
|
frame: Le.frame,
|
|
406
406
|
label: r("chart.data", "Chart data for {name}", { name: e.title }),
|
|
407
407
|
onHover: fe,
|
|
408
|
-
onSelect:
|
|
408
|
+
onSelect: De,
|
|
409
409
|
panel: e,
|
|
410
410
|
translate: r
|
|
411
411
|
}
|
|
@@ -419,7 +419,7 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
419
419
|
label: r("chart.label", "{name} chart", { name: e.title }),
|
|
420
420
|
drillable: Ce,
|
|
421
421
|
onHover: Ce ? fe : void 0,
|
|
422
|
-
onSelect: Ce ?
|
|
422
|
+
onSelect: Ce ? De : void 0,
|
|
423
423
|
resetZoomKey: u
|
|
424
424
|
}
|
|
425
425
|
)
|
|
@@ -435,7 +435,7 @@ function Fo({ panel: e, adapter: n }) {
|
|
|
435
435
|
onToggle: pe,
|
|
436
436
|
panel: e,
|
|
437
437
|
presentation: M,
|
|
438
|
-
total:
|
|
438
|
+
total: U ?? void 0
|
|
439
439
|
}
|
|
440
440
|
)
|
|
441
441
|
] }) });
|
|
@@ -449,20 +449,20 @@ function bo({ onShowAll: e }) {
|
|
|
449
449
|
}
|
|
450
450
|
function po({ actionable: e, frame: n, onSelect: t, panel: r }) {
|
|
451
451
|
var se, B;
|
|
452
|
-
const c = Re(), a = [r.encoding.category, r.encoding.label].find((A) => A !== void 0 && n.columns.some((C) => C.name === A)), m = r.encoding.value, y = n.columns.findIndex((A) => A.name === a), f = n.columns.findIndex((A) => A.name === m), b = H(m ? r.format[m] : void 0), v = f < 0 ? void 0 : n.rows.reduce((A, C) => A + (he(C[f]) ?? 0), 0), F = y < 0 || (se = n.rows[0]) == null ? void 0 : se[y], h = ke(F), u = b(v), N = r.encoding.id ?? a, ce = n.columns.findIndex((A) => A.name === N),
|
|
452
|
+
const c = Re(), a = [r.encoding.category, r.encoding.label].find((A) => A !== void 0 && n.columns.some((C) => C.name === A)), m = r.encoding.value, y = n.columns.findIndex((A) => A.name === a), f = n.columns.findIndex((A) => A.name === m), b = H(m ? r.format[m] : void 0), v = f < 0 ? void 0 : n.rows.reduce((A, C) => A + (he(C[f]) ?? 0), 0), F = y < 0 || (se = n.rows[0]) == null ? void 0 : se[y], h = ke(F), u = b(v), N = r.encoding.id ?? a, ce = n.columns.findIndex((A) => A.name === N), V = ke(ce < 0 || (B = n.rows[0]) == null ? void 0 : B[ce]), te = /* @__PURE__ */ l(Ee, { children: n.rows.length === 0 ? /* @__PURE__ */ l("span", { className: "lens-chart-compact-empty", children: c("panel.empty", "No data") }) : /* @__PURE__ */ R(Ee, { children: [
|
|
453
453
|
h && /* @__PURE__ */ l("span", { className: "lens-chart-compact-label", title: h, children: h }),
|
|
454
454
|
/* @__PURE__ */ l("strong", { className: "lens-chart-compact-value", children: u })
|
|
455
455
|
] }) }), _ = n.rows.length === 0 ? c("panel.empty", "No data") : [h, u].filter(Boolean).join(" / ");
|
|
456
|
-
return e &&
|
|
456
|
+
return e && V && n.rows.length > 0 ? /* @__PURE__ */ l(
|
|
457
457
|
"button",
|
|
458
458
|
{
|
|
459
|
-
"aria-label": `${_}. ${c("chart.openMark", "Open {name}", { name: h ??
|
|
459
|
+
"aria-label": `${_}. ${c("chart.openMark", "Open {name}", { name: h ?? V })}`,
|
|
460
460
|
className: "lens-chart-compact lens-chart-compact-action",
|
|
461
|
-
onClick: () => t == null ? void 0 : t(
|
|
461
|
+
onClick: () => t == null ? void 0 : t(V),
|
|
462
462
|
type: "button",
|
|
463
|
-
children:
|
|
463
|
+
children: te
|
|
464
464
|
}
|
|
465
|
-
) : /* @__PURE__ */ l("div", { "aria-label": _, className: "lens-chart-compact", role: "img", children:
|
|
465
|
+
) : /* @__PURE__ */ l("div", { "aria-label": _, className: "lens-chart-compact", role: "img", children: te });
|
|
466
466
|
}
|
|
467
467
|
function xo({ panel: e, total: n }) {
|
|
468
468
|
const t = Re(), r = H(e.encoding.value ? e.format[e.encoding.value] : void 0);
|
|
@@ -484,11 +484,11 @@ const So = bt(function({
|
|
|
484
484
|
total: m,
|
|
485
485
|
presentation: y
|
|
486
486
|
}) {
|
|
487
|
-
var Fe,
|
|
488
|
-
const { document: f, navigation: b } = pt(), v = Re(), [F, h] = ae(""), u = Pe(null), [N, ce] = ae({ top: !1, bottom: !1 }), [
|
|
487
|
+
var Fe, $;
|
|
488
|
+
const { document: f, navigation: b } = pt(), v = Re(), [F, h] = ae(""), u = Pe(null), [N, ce] = ae({ top: !1, bottom: !1 }), [V, te] = ae(0), [_, se] = ae(!1), B = Nt(t, n), A = B >= 0 ? n.encoding.series : n.encoding.label ?? n.encoding.category, C = n.encoding.value, oe = H(C ? n.format[C] : void 0), K = t.columns.findIndex((s) => s.name === A), ne = t.columns.findIndex((s) => s.name === C), W = H(A ? n.format[A] : void 0), Me = b.panelId === n.id && b.path.length > 0, re = xt(t, n), z = St(f.theme, n, { positional: !Me, labels: re }), le = It(f.theme, n, {
|
|
489
489
|
colors: t.colors,
|
|
490
490
|
positional: !Me,
|
|
491
|
-
labels:
|
|
491
|
+
labels: re
|
|
492
492
|
}), de = n.encoding.id ? t.columns.findIndex((s) => s.name === n.encoding.id) : -1, fe = n.encoding.series ? t.columns.findIndex((s) => s.name === n.encoding.series) : -1, J = ((Fe = n.radial) == null ? void 0 : Fe.mode) === "partition", I = T(() => {
|
|
493
493
|
var we, ye;
|
|
494
494
|
const s = t.rows.map((g, p) => {
|
|
@@ -508,29 +508,29 @@ const So = bt(function({
|
|
|
508
508
|
g.has(x) || (g.add(x), S.push(p));
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
const
|
|
511
|
+
const ee = S.map((g) => L[g]), Q = new Map(S.map((g, p) => [g, p])), P = /* @__PURE__ */ new Map();
|
|
512
512
|
J && s.forEach((g) => {
|
|
513
513
|
P.has(g) || P.set(g, P.size);
|
|
514
514
|
});
|
|
515
|
-
const
|
|
515
|
+
const U = new Map((((we = n.radial) == null ? void 0 : we.rings) ?? []).map((g) => [g.key, g.total])), M = /* @__PURE__ */ new Map();
|
|
516
516
|
for (let g = 0; g < t.rows.length; g += 1) {
|
|
517
|
-
const p = fe >= 0 ? (ye = t.rows[g]) == null ? void 0 : ye[fe] : void 0, x = J && typeof p == "string" ? p : "", q = J ?
|
|
517
|
+
const p = fe >= 0 ? (ye = t.rows[g]) == null ? void 0 : ye[fe] : void 0, x = J && typeof p == "string" ? p : "", q = J ? U.get(x) ?? m : m, j = J ? x : String(q), Ne = M.get(j) ?? { denominator: q, indices: [] };
|
|
518
518
|
Ne.indices.push(g), M.set(j, Ne);
|
|
519
519
|
}
|
|
520
520
|
const Z = /* @__PURE__ */ new Map();
|
|
521
521
|
for (const { denominator: g, indices: p } of M.values()) {
|
|
522
522
|
const x = p.map((q) => {
|
|
523
523
|
var j;
|
|
524
|
-
return
|
|
524
|
+
return ne >= 0 ? he((j = t.rows[q]) == null ? void 0 : j[ne]) : void 0;
|
|
525
525
|
});
|
|
526
526
|
Ht(x, g).forEach((q, j) => Z.set(p[j], q));
|
|
527
527
|
}
|
|
528
528
|
const pe = /* @__PURE__ */ new Map();
|
|
529
529
|
J && s.forEach((g) => pe.set(g, (pe.get(g) ?? 0) + 1));
|
|
530
530
|
const ue = /* @__PURE__ */ new Map();
|
|
531
|
-
|
|
531
|
+
ne >= 0 && t.rows.forEach((g, p) => {
|
|
532
532
|
var j;
|
|
533
|
-
const x = he(g[
|
|
533
|
+
const x = he(g[ne]);
|
|
534
534
|
if (x === void 0) return;
|
|
535
535
|
const q = L[p];
|
|
536
536
|
B >= 0 && C && ((j = n.format[C]) == null ? void 0 : j.kind) !== "percent" ? ue.set(q, (ue.get(q) ?? 0) + x) : ue.set(q, x);
|
|
@@ -540,11 +540,11 @@ const So = bt(function({
|
|
|
540
540
|
var x;
|
|
541
541
|
const p = (x = t.rows[g]) == null ? void 0 : x[fe];
|
|
542
542
|
typeof p == "string" && ge.set(g, p);
|
|
543
|
-
}), { allKeys:
|
|
544
|
-
}, [t, de, K, n.format, (
|
|
543
|
+
}), { allKeys: ee, categoryOrder: P, entries: S, entryKeys: L, entryPositions: Q, ringByIndex: ge, rowKeys: s, rowsPerKey: pe, shares: Z, valueByKey: ue };
|
|
544
|
+
}, [t, de, K, n.format, ($ = n.radial) == null ? void 0 : $.rings, J, fe, B, m, C, ne]), Y = (s, L, S) => {
|
|
545
545
|
var P;
|
|
546
546
|
if (B >= 0) return z(s, S);
|
|
547
|
-
const
|
|
547
|
+
const ee = de >= 0 ? (P = t.rows[L]) == null ? void 0 : P[de] : void 0, Q = typeof ee == "string" && ee.trim() !== "" ? ee : void 0;
|
|
548
548
|
return le(s, I.categoryOrder.get(I.rowKeys[L]) ?? L, Q);
|
|
549
549
|
}, be = (y == null ? void 0 : y.legendValue) === "percent", Ke = (s) => B >= 0 ? "value" : be ? "percent" : J ? I.rowsPerKey.get(I.rowKeys[s]) === 1 ? "percent" : "none" : "value", X = F.trim().toLocaleLowerCase(), Te = X === "" ? I.entries : I.entries.filter((s) => {
|
|
550
550
|
var S;
|
|
@@ -555,18 +555,18 @@ const So = bt(function({
|
|
|
555
555
|
const s = u.current;
|
|
556
556
|
if (!s) return;
|
|
557
557
|
const L = () => {
|
|
558
|
-
const
|
|
558
|
+
const ee = s.scrollTop + s.clientHeight, Q = s.scrollHeight > s.clientHeight + 1;
|
|
559
559
|
if (ce({
|
|
560
560
|
top: Q && s.scrollTop > 1,
|
|
561
|
-
bottom: Q &&
|
|
561
|
+
bottom: Q && ee < s.scrollHeight - 1
|
|
562
562
|
}), !Q) {
|
|
563
|
-
|
|
563
|
+
te(0);
|
|
564
564
|
return;
|
|
565
565
|
}
|
|
566
566
|
const P = s.querySelectorAll(".lens-chart-legend-item");
|
|
567
|
-
let
|
|
568
|
-
for (const M of P) M.offsetTop + M.offsetHeight >
|
|
569
|
-
|
|
567
|
+
let U = 0;
|
|
568
|
+
for (const M of P) M.offsetTop + M.offsetHeight > ee + 1 && (U += 1);
|
|
569
|
+
te(U);
|
|
570
570
|
};
|
|
571
571
|
L(), s.addEventListener("scroll", L, { passive: !0 });
|
|
572
572
|
const S = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(L);
|
|
@@ -577,9 +577,9 @@ const So = bt(function({
|
|
|
577
577
|
const Se = (s) => {
|
|
578
578
|
const L = !r.has(s) && I.allKeys.every((S) => S === s || r.has(S));
|
|
579
579
|
c(L ? /* @__PURE__ */ new Set() : new Set(I.allKeys.filter((S) => S !== s)));
|
|
580
|
-
}, Ie = I.allKeys.length > 0 && I.allKeys.every((s) => r.has(s)), ve = I.allKeys.every((s) => !r.has(s)),
|
|
580
|
+
}, Ie = I.allKeys.length > 0 && I.allKeys.every((s) => r.has(s)), ve = I.allKeys.every((s) => !r.has(s)), D = I.allKeys.length > uo, E = I.entries.length >= go;
|
|
581
581
|
return /* @__PURE__ */ R("div", { className: "lens-chart-legend-shell", style: _ ? { "--lens-chart-legend-max": "none" } : void 0, children: [
|
|
582
|
-
|
|
582
|
+
D && /* @__PURE__ */ R("div", { className: "lens-chart-legend-controls", children: [
|
|
583
583
|
/* @__PURE__ */ l(
|
|
584
584
|
"div",
|
|
585
585
|
{
|
|
@@ -648,9 +648,9 @@ const So = bt(function({
|
|
|
648
648
|
"data-overflow-bottom": N.bottom || void 0,
|
|
649
649
|
"data-overflow-top": N.top || void 0,
|
|
650
650
|
children: [
|
|
651
|
-
/* @__PURE__ */ l("ul", { "aria-label": v("chart.legendControls", "Legend controls"), className: "lens-chart-legend", ref: u, role: "region", tabIndex: N.top || N.bottom ? 0 : void 0, children: Te.map((s, L) => {
|
|
651
|
+
/* @__PURE__ */ l("ul", { "aria-label": v("chart.legendControls", "Legend controls"), className: "lens-chart-legend", "data-testid": `lens-panel-${n.id}-legend`, ref: u, role: "region", tabIndex: N.top || N.bottom ? 0 : void 0, children: Te.map((s, L) => {
|
|
652
652
|
var ge, we, ye, g, p;
|
|
653
|
-
const S = t.rows[s],
|
|
653
|
+
const S = t.rows[s], ee = I.entryPositions.get(s) ?? s, Q = S[K], P = Q == null ? "" : W(Q), U = I.entryKeys[s], M = r.has(U), Z = I.ringByIndex.get(s), pe = L > 0 ? I.ringByIndex.get(Te[L - 1]) : void 0, ue = ((ye = (we = (ge = n.radial) == null ? void 0 : ge.rings) == null ? void 0 : we.find((x) => x.key === Z)) == null ? void 0 : ye.label) ?? Z;
|
|
654
654
|
return /* @__PURE__ */ R(Rt, { children: [
|
|
655
655
|
Z && Z !== pe && /* @__PURE__ */ l("li", { className: "lens-chart-legend-heading", children: ue }),
|
|
656
656
|
/* @__PURE__ */ l("li", { className: "lens-chart-legend-item", children: /* @__PURE__ */ R(
|
|
@@ -658,8 +658,9 @@ const So = bt(function({
|
|
|
658
658
|
{
|
|
659
659
|
"aria-pressed": !M,
|
|
660
660
|
className: `lens-chart-legend-toggle${M ? " lens-chart-legend-hidden" : ""}`,
|
|
661
|
-
|
|
662
|
-
|
|
661
|
+
"data-testid": `lens-panel-${n.id}-legend-series-${ee}`,
|
|
662
|
+
onClick: () => a(U),
|
|
663
|
+
onDoubleClick: () => Se(U),
|
|
663
664
|
title: v("chart.legendToggleHint", "Click to toggle · double-click to isolate"),
|
|
664
665
|
type: "button",
|
|
665
666
|
children: [
|
|
@@ -668,23 +669,23 @@ const So = bt(function({
|
|
|
668
669
|
{
|
|
669
670
|
"aria-hidden": "true",
|
|
670
671
|
className: "lens-chart-legend-mark",
|
|
671
|
-
style: { background: Y(P, s,
|
|
672
|
+
style: { background: Y(P, s, ee) }
|
|
672
673
|
}
|
|
673
674
|
),
|
|
674
675
|
/* @__PURE__ */ l("span", { className: "lens-chart-legend-label", children: P }),
|
|
675
|
-
Ke(s) !== "none" && /* @__PURE__ */ l("span", { className: "lens-chart-legend-value", children: Ke(s) === "percent" ? _t(I.shares.get(s), (g = f.meta) == null ? void 0 : g.locale, C ? (p = n.format[C]) == null ? void 0 : p.decimalSeparator : void 0) :
|
|
676
|
+
Ke(s) !== "none" && /* @__PURE__ */ l("span", { className: "lens-chart-legend-value", children: Ke(s) === "percent" ? _t(I.shares.get(s), (g = f.meta) == null ? void 0 : g.locale, C ? (p = n.format[C]) == null ? void 0 : p.decimalSeparator : void 0) : oe(I.valueByKey.get(U)) }),
|
|
676
677
|
/* @__PURE__ */ l("span", { "aria-hidden": "true", className: "lens-chart-legend-visibility", children: M ? /* @__PURE__ */ l(no, {}) : /* @__PURE__ */ l(ro, {}) })
|
|
677
678
|
]
|
|
678
679
|
}
|
|
679
|
-
) }, `${
|
|
680
|
-
] }, `${
|
|
680
|
+
) }, `${U}-${s}`)
|
|
681
|
+
] }, `${U}-${s}`);
|
|
681
682
|
}) }),
|
|
682
683
|
/* @__PURE__ */ l("span", { "aria-hidden": "true", className: "lens-chart-legend-edge lens-chart-legend-edge-top" }),
|
|
683
684
|
/* @__PURE__ */ l("span", { "aria-hidden": "true", className: "lens-chart-legend-edge lens-chart-legend-edge-bottom" })
|
|
684
685
|
]
|
|
685
686
|
}
|
|
686
687
|
),
|
|
687
|
-
(
|
|
688
|
+
(V > 0 || _) && /* @__PURE__ */ l("button", { className: "lens-chart-legend-overflow", onClick: () => se((s) => !s), type: "button", children: _ ? v("chart.legendCollapse", "Show fewer") : v("chart.legendMore", "{count} more", { count: String(V) }) })
|
|
688
689
|
] });
|
|
689
690
|
}), Io = bt(function({ overlays: n, onToggle: t }) {
|
|
690
691
|
const r = Re(), c = r("chart.legendOverlays", "Chart marks");
|
|
@@ -723,7 +724,7 @@ export {
|
|
|
723
724
|
wt as collapseExpandableTopN,
|
|
724
725
|
yt as collapseMinorDonutSlices,
|
|
725
726
|
Ct as donutRemainderKey,
|
|
726
|
-
|
|
727
|
+
$e as legendKey,
|
|
727
728
|
vt as rowIndexForKey,
|
|
728
729
|
yo as topNGroupField
|
|
729
730
|
};
|
|
@@ -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-
|
|
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-BBtBPnTb.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardPanels.d.ts","sourceRoot":"","sources":["../src/DashboardPanels.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"DashboardPanels.d.ts","sourceRoot":"","sources":["../src/DashboardPanels.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAU,WAAW,EAAE,UAAU,EAAE,SAAS,EAAS,MAAM,YAAY,CAAA;AAGnF,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAMvE,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,YAAY,CAAA;AAOzE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,YAAY,CAAA;CAC3B;AAWD,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,UAAU,EAAE,CAAA;CACpB;AAgCD,wFAAwF;AACxF,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,aAAa,EAAE,CAE/D;AAKD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,MAAM,CAY3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAYpE;AA+eD,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,oBAAoB,2CAgH9E"}
|
|
@@ -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-
|
|
2
|
+
import { o as N, u as F, L as b, P as M } from "./index-BBtBPnTb.js";
|
|
3
3
|
import "@iota-uz/sdk/client-host";
|
|
4
4
|
import "react";
|
|
5
5
|
function y(a) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as M, jsxs as U, Fragment as J } from "react/jsx-runtime";
|
|
2
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-
|
|
3
|
+
import { o as T, a as D, t as G, u as _, L as q, z, P as B } from "./index-BBtBPnTb.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-
|
|
6
|
+
import { C as W } from "./ChartHost-DTnhnwkn.js";
|
|
7
7
|
const F = 5 * 1024 * 1024;
|
|
8
8
|
function H(e, a) {
|
|
9
9
|
var c, r, o, d;
|
|
@@ -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-
|
|
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-BBtBPnTb.js";
|
|
4
4
|
import "@iota-uz/sdk/client-host";
|
|
5
|
-
import { f as K, r as L, d as M, Q } from "./metricViews-
|
|
5
|
+
import { f as K, r as L, d as M, Q } from "./metricViews-IoSavtwn.js";
|
|
6
6
|
function v() {
|
|
7
7
|
const e = h();
|
|
8
8
|
return m(() => ({
|