@iota-uz/sdk 0.5.1 → 0.5.3
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-CBelm6bC.js +574 -0
- package/dist/lens/{ChartHost-Bl2lxIqU.js → ChartHost-rKcUCBNo.js} +2 -2
- package/dist/lens/{ChartPanel-CTIp_4YE.js → ChartPanel-BkmCcLe8.js} +88 -88
- package/dist/lens/{CoveragePanel-DZZWkjSv.js → CoveragePanel-DH_8AOhN.js} +6 -6
- package/dist/lens/{GaugePanel-BcNdd_Wj.js → GaugePanel-BaJPz_2z.js} +1 -1
- package/dist/lens/{MapPanel-6sI_Ei9L.js → MapPanel-v99HJkGl.js} +2 -2
- package/dist/lens/{MetricFlowPanel-LzqevSPs.js → MetricFlowPanel-DstlsUQW.js} +6 -6
- package/dist/lens/{MetricHierarchyPanel-h6tJqRPg.js → MetricHierarchyPanel-ByD8JzTQ.js} +2 -2
- package/dist/lens/{MetricRelationshipPanel-CgckUvvJ.js → MetricRelationshipPanel-DrfQ58jw.js} +5 -5
- package/dist/lens/{PrintReport-DJv4Rm_U.js → PrintReport-xi-iswMR.js} +5 -5
- package/dist/lens/{TablePanel-Dh6bXlwM.js → TablePanel-Daw6L4Fm.js} +102 -102
- package/dist/lens/{adapter-zBDC8hbZ.js → adapter-Bi3QzfzC.js} +5516 -5510
- package/dist/lens/breakpoints.d.ts +6 -4
- package/dist/lens/breakpoints.d.ts.map +1 -1
- package/dist/lens/charts/echarts/options.d.ts.map +1 -1
- 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 +2 -0
- package/dist/lens/contract/types.d.ts.map +1 -1
- package/dist/lens/controls/FacetFilterMenu.d.ts +2 -3
- package/dist/lens/controls/FacetFilterMenu.d.ts.map +1 -1
- package/dist/lens/controls/PeriodFilterControl.d.ts.map +1 -1
- package/dist/lens/controls/model.d.ts +11 -0
- package/dist/lens/controls/model.d.ts.map +1 -1
- package/dist/lens/icons.d.ts +9 -0
- package/dist/lens/icons.d.ts.map +1 -1
- package/dist/lens/{index-C45DAO6w.js → index-88l253R1.js} +3163 -3091
- package/dist/lens/{index-CspKnSQn.js → index-Dvts5yK8.js} +1 -1
- package/dist/lens/index.js +1 -1
- package/dist/lens/{install-B5oSx3pv.js → install-BEBo0o42.js} +1 -1
- package/dist/lens/{install-DyXK20dR.js → install-CCwiOjQ0.js} +1 -1
- package/dist/lens/{install-3GLgv_LN.js → install-CeT1_mBH.js} +1 -1
- package/dist/lens/{install-DT0AQkUj.js → install-DIpMnjeK.js} +1 -1
- package/dist/lens/{metricViews-QvoFHVdh.js → metricViews-CH2Cdo0x.js} +1 -1
- package/dist/lens/panels/CascadePanel.d.ts +46 -6
- package/dist/lens/panels/CascadePanel.d.ts.map +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/panels/TablePanel.d.ts.map +1 -1
- package/dist/lens/panels/WaterfallPlot.d.ts +7 -1
- package/dist/lens/panels/WaterfallPlot.d.ts.map +1 -1
- package/dist/lens/panels/data.d.ts +8 -4
- package/dist/lens/panels/data.d.ts.map +1 -1
- package/dist/lens/panels/panelFailure.d.ts +39 -0
- package/dist/lens/panels/panelFailure.d.ts.map +1 -0
- package/dist/lens/{prefetch-Dov5CBoH.js → prefetch-C6OyvFGh.js} +2 -2
- package/dist/lens/{prefetchPanels-B7bIY0bM.js → prefetchPanels-CdS2yC1c.js} +3 -3
- package/dist/lens/{print-CwcB0fug.js → print-30aTJUkg.js} +1 -1
- package/dist/lens/runtime/provider.d.ts.map +1 -1
- package/dist/lens/runtime/query.d.ts +16 -2
- package/dist/lens/runtime/query.d.ts.map +1 -1
- package/dist/lens/{scales-DKkoQGtJ.js → scales-DOtg8I4r.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
- package/dist/lens/CascadePanel-DqOZFdR-.js +0 -512
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as k, jsx as l, Fragment as Ee } from "react/jsx-runtime";
|
|
2
|
-
import { useState as re, useRef as $e, useCallback as Ae, useEffect as be, useMemo as K, memo as
|
|
3
|
-
import { r as
|
|
4
|
-
import { s as
|
|
5
|
-
import { o as
|
|
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
|
+
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";
|
|
6
6
|
import "@iota-uz/sdk/client-host";
|
|
7
|
-
import { c as
|
|
8
|
-
import { C as
|
|
9
|
-
const
|
|
10
|
-
function
|
|
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 =
|
|
7
|
+
import { c as no, C as ro } from "./ChartDataEquivalent-BFDdHoQn.js";
|
|
8
|
+
import { C as so } from "./ChartHost-rKcUCBNo.js";
|
|
9
|
+
const io = 0.02, ao = oo, co = 4;
|
|
10
|
+
function lo(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), 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(() => {
|
|
12
12
|
const M = { label: t, value: r, previous: c, lower: a, q1: m, median: y, q3: f, upper: b, id: v, series: T, category: h, cut: u, cutLabel: N, final: se }, A = /* @__PURE__ */ new Map();
|
|
13
|
-
for (const C of
|
|
13
|
+
for (const C of Yt) {
|
|
14
14
|
const X = e.encoding[C], R = M[C];
|
|
15
15
|
X && R && A.set(X, R);
|
|
16
16
|
}
|
|
@@ -26,14 +26,14 @@ function Oe(e, n, t) {
|
|
|
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);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function mt(e, n, t) {
|
|
30
30
|
var y;
|
|
31
31
|
if (((y = n.radial) == null ? void 0 : y.mode) === "partition" && n.encoding.series) {
|
|
32
32
|
const f = e.columns.findIndex((b) => b.name === n.encoding.series);
|
|
33
33
|
if (f >= 0) {
|
|
34
34
|
const b = e.rows.findIndex((v, T) => {
|
|
35
35
|
const h = v[f], u = typeof h == "string" || typeof h == "number" || typeof h == "bigint" ? String(h) : "";
|
|
36
|
-
return
|
|
36
|
+
return At(u, Oe(e, n, T)) === t;
|
|
37
37
|
});
|
|
38
38
|
if (b >= 0) return b;
|
|
39
39
|
}
|
|
@@ -41,15 +41,15 @@ function ut(e, n, t) {
|
|
|
41
41
|
const r = e.rows.findIndex((f, b) => Oe(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
|
-
return a < 0 ? -1 : e.rows.findIndex((f) =>
|
|
44
|
+
return a < 0 ? -1 : e.rows.findIndex((f) => kt(
|
|
45
45
|
ke(f[a]),
|
|
46
46
|
m >= 0 ? ke(f[m]) : ""
|
|
47
47
|
) === t);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function xt(e, n) {
|
|
50
50
|
return n.semantics !== "series" || !n.encoding.series ? -1 : e.columns.findIndex((t) => t.name === n.encoding.series);
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function go(e, n) {
|
|
53
53
|
const t = /* @__PURE__ */ new Map();
|
|
54
54
|
if (!e) return t;
|
|
55
55
|
const r = e.columns.findIndex((c) => c.name === n.encoding.series);
|
|
@@ -62,9 +62,9 @@ function lo(e, n) {
|
|
|
62
62
|
}
|
|
63
63
|
return t;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function uo(e, n, t) {
|
|
66
66
|
var a;
|
|
67
|
-
const r =
|
|
67
|
+
const r = xt(e, n);
|
|
68
68
|
if (r < 0) return Oe(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);
|
|
@@ -79,44 +79,44 @@ function ge(e) {
|
|
|
79
79
|
function ke(e) {
|
|
80
80
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? String(e) : "";
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function mo(e, n) {
|
|
83
83
|
const c = (n.kind === "pie" || n.kind === "donut" || n.kind === "radial" ? [n.encoding.label, n.encoding.category] : [n.encoding.category, n.encoding.label]).reduce((a, m) => a >= 0 || !m ? a : e.columns.findIndex((y) => y.name === m), -1);
|
|
84
84
|
return c < 0 ? 0 : new Set(e.rows.map((a) => a[c]).filter((a) => a != null).map(String)).size;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function ho(e, n) {
|
|
87
87
|
const t = e.columns.findIndex((r) => r.name === n.encoding.series);
|
|
88
88
|
return t < 0 ? 1 : new Set(e.rows.map((r) => r[t]).filter((r) => r != null).map(String)).size;
|
|
89
89
|
}
|
|
90
|
-
const
|
|
91
|
-
function
|
|
90
|
+
const St = "__lens_other__", fo = "__lens_topn_group";
|
|
91
|
+
function ht(e, n) {
|
|
92
92
|
var v, T;
|
|
93
|
-
const t = e.columns.findIndex((h) => h.name ===
|
|
93
|
+
const t = e.columns.findIndex((h) => h.name === fo), r = e.columns.findIndex((h) => h.name === (n.encoding.label ?? n.encoding.category)), c = e.columns.findIndex((h) => h.name === n.encoding.id), a = e.columns.findIndex((h) => h.name === n.encoding.value);
|
|
94
94
|
if (t < 0 || r < 0 || a < 0) return { frame: e, collapsed: !1 };
|
|
95
95
|
const m = e.rows.filter((h) => typeof h[t] == "string" && String(h[t]).trim() !== "");
|
|
96
96
|
if (m.length === 0) return { frame: e, collapsed: !1 };
|
|
97
97
|
const y = e.rows.filter((h) => !m.includes(h)).map((h) => [...h]), f = new Array(e.columns.length).fill(null);
|
|
98
|
-
f[t] = (v = m[0]) == null ? void 0 : v[t], f[r] = (T = m[0]) == null ? void 0 : T[t], c >= 0 && (f[c] =
|
|
98
|
+
f[t] = (v = m[0]) == null ? void 0 : v[t], f[r] = (T = m[0]) == null ? void 0 : T[t], c >= 0 && (f[c] = St), f[a] = m.reduce((h, u) => h + (ge(u[a]) ?? 0), 0), y.push(f);
|
|
99
99
|
const b = e.colors ? [...e.colors.filter((h, u) => !m.includes(e.rows[u])), ze()] : [...y.slice(0, -1).map(() => ""), ze()];
|
|
100
100
|
return { frame: { ...e, rows: y, colors: b }, collapsed: !0 };
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function ft(e, n, t) {
|
|
103
103
|
if (n.kind !== "donut" || e.rows.length < 2) return { frame: e, collapsed: !1 };
|
|
104
104
|
const r = e.columns.findIndex((u) => u.name === (n.encoding.label ?? n.encoding.category)), c = e.columns.findIndex((u) => u.name === n.encoding.id), a = e.columns.findIndex((u) => u.name === n.encoding.value);
|
|
105
105
|
if (r < 0 || a < 0) return { frame: e, collapsed: !1 };
|
|
106
106
|
const m = e.total ?? e.rows.reduce((u, N) => u + (ge(N[a]) ?? 0), 0);
|
|
107
107
|
if (!Number.isFinite(m) || m <= 0) return { frame: e, collapsed: !1 };
|
|
108
|
-
const y = e.rows.map((u, N) => ({ index: N, value: ge(u[a]) ?? 0 })).filter(({ value: u }) => u / m <
|
|
108
|
+
const y = e.rows.map((u, N) => ({ index: N, value: ge(u[a]) ?? 0 })).filter(({ value: u }) => u / m < io);
|
|
109
109
|
if (y.length === 0) return { frame: e, collapsed: !1 };
|
|
110
110
|
const f = new Set(y.map(({ index: u }) => u)), b = e.rows.filter((u, N) => !f.has(N)).map((u) => [...u]), v = new Array(e.columns.length).fill(null);
|
|
111
|
-
v[r] = t, c >= 0 && (v[c] =
|
|
111
|
+
v[r] = t, c >= 0 && (v[c] = St), v[a] = y.reduce((u, N) => u + N.value, 0), b.push(v);
|
|
112
112
|
const T = e.rows.map((u, N) => N).filter((u) => !f.has(u)), h = e.colors ? [...e.colors.filter((u, N) => !f.has(N)), ze()] : [...T.map(() => ""), ze()];
|
|
113
113
|
return { frame: { ...e, rows: b, colors: h }, collapsed: !0 };
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
var Qe, Ze, Ge, Je, Ye, Xe, et, tt, ot, nt, rt, st, it, at;
|
|
117
|
-
const t =
|
|
115
|
+
function Ro({ panel: e, adapter: n }) {
|
|
116
|
+
var Qe, Ze, Ge, Je, Ye, Xe, et, tt, ot, nt, rt, st, it, at, ct;
|
|
117
|
+
const t = Bt(e.id), r = Re(), { document: c, navigation: a } = wt(), { drillInto: m } = Ht(), { format: y, formatAxis: f } = lo(e), [b, v] = re(), [T, h] = re(!1), [u, N] = re(0), se = typeof window > "u" ? { regression: !1 } : lt(new URL(window.location.href), e.id), [V, Y] = re(se.regression), [_, ne] = re(se.movingAverage), [M, A] = re(() => /* @__PURE__ */ new Set()), [C, X] = re(() => typeof window > "u" ? /* @__PURE__ */ new Set() : dt(new URL(window.location.href), e.id)), R = C, ee = a.panelId === e.id && a.path.length > 0, j = ee ? _t(c, a.path) : e.drillRoot ? c.drill.edges[e.drillRoot] : void 0, Me = j ? j.children.some(({ target: o }) => o) : !!e.drillRoot, te = !!e.drillRoot || !!j, z = zt(e), ie = $e(), ae = Ae((o) => {
|
|
118
118
|
if (te || !z.action || !t.data) return;
|
|
119
|
-
const i =
|
|
119
|
+
const i = mt(t.data, e, o);
|
|
120
120
|
return z.urlForRow(t.data, i >= 0 ? t.data.rows[i] : void 0);
|
|
121
121
|
}, [t.data, te, z, e]), ue = Ae((o) => {
|
|
122
122
|
var i;
|
|
@@ -137,58 +137,58 @@ function ko({ panel: e, adapter: n }) {
|
|
|
137
137
|
if (Z.length !== 0)
|
|
138
138
|
return z.prefetchIdle(Z);
|
|
139
139
|
}, [Z, z]);
|
|
140
|
-
const I =
|
|
140
|
+
const I = Ot(), G = ((Qe = z.action) == null ? void 0 : Qe.kind) === "cross_filter" || ((Ze = z.action) == null ? void 0 : Ze.kind) === "cube_drill" ? z.action.filter : void 0, ve = K(() => {
|
|
141
141
|
if (!(G != null && G.dimension)) return;
|
|
142
|
-
const o = I.values[
|
|
142
|
+
const o = I.values[Ut], i = Array.isArray(o) ? o : o ? [o] : [], g = `${G.dimension}:`, w = new Set(i.filter((B) => B.startsWith(g)).map((B) => B.slice(g.length)));
|
|
143
143
|
return w.size > 0 ? w : void 0;
|
|
144
144
|
}, [G == null ? void 0 : G.dimension, I.values]), Ke = K(() => {
|
|
145
145
|
if (!ve || !G || !t.data) return;
|
|
146
146
|
new URL(globalThis.location.href);
|
|
147
147
|
const o = t.data;
|
|
148
148
|
for (let i = 0; i < o.rows.length; i += 1) {
|
|
149
|
-
const g =
|
|
150
|
-
fields:
|
|
149
|
+
const g = Vt(G.value, {
|
|
150
|
+
fields: Dt(o, o.rows[i]),
|
|
151
151
|
variables: {}
|
|
152
152
|
}), w = ke(g);
|
|
153
153
|
if (w !== "" && ve.has(w)) return Oe(o, e, i);
|
|
154
154
|
}
|
|
155
|
-
}, [ve, G, t.data, e]), J = e.kind, Te = t.data ?
|
|
155
|
+
}, [ve, G, t.data, e]), J = e.kind, Te = t.data ? mo(t.data, e) <= 1 && ho(t.data, e) <= 1 : !1, pe = `${a.panelId === e.id ? a.path.join("|") : ""}:${a.perspectiveId ?? ""}`, xe = $e(pe);
|
|
156
156
|
be(() => {
|
|
157
157
|
xe.current !== pe && (xe.current = pe, v(void 0));
|
|
158
158
|
}, [pe]);
|
|
159
159
|
const me = Ae((o) => X(new Set(o)), []);
|
|
160
160
|
be(() => {
|
|
161
161
|
if (typeof window > "u") return;
|
|
162
|
-
const o = () => me(
|
|
162
|
+
const o = () => me(dt(new URL(window.location.href), e.id));
|
|
163
163
|
return window.addEventListener("popstate", o), () => window.removeEventListener("popstate", o);
|
|
164
164
|
}, [e.id, me]), be(() => {
|
|
165
165
|
if (typeof window > "u") return;
|
|
166
|
-
const o = new URL(window.location.href), i =
|
|
166
|
+
const o = new URL(window.location.href), i = $t(o, e.id, R);
|
|
167
167
|
i.search !== o.search && window.history.replaceState(window.history.state, "", i);
|
|
168
168
|
}, [R, e.id]), be(() => {
|
|
169
169
|
if (typeof window > "u") return;
|
|
170
170
|
const o = () => {
|
|
171
|
-
const i =
|
|
171
|
+
const i = lt(new URL(window.location.href), e.id);
|
|
172
172
|
Y(i.regression), ne(i.movingAverage);
|
|
173
173
|
};
|
|
174
174
|
return window.addEventListener("popstate", o), () => window.removeEventListener("popstate", o);
|
|
175
175
|
}, [e.id]), be(() => {
|
|
176
176
|
if (typeof window > "u") return;
|
|
177
|
-
const o = new URL(window.location.href), i =
|
|
177
|
+
const o = new URL(window.location.href), i = Pt(o, e.id, { regression: V, movingAverage: _ });
|
|
178
178
|
i.search !== o.search && window.history.replaceState(window.history.state, "", i);
|
|
179
179
|
}, [_, e.id, V]);
|
|
180
180
|
const D = K(() => {
|
|
181
181
|
var Q, Ce;
|
|
182
182
|
if (!t.data || R.size === 0) return t.data;
|
|
183
|
-
const o = t.data.rows.map((Le, ye) => !R.has(
|
|
183
|
+
const o = t.data.rows.map((Le, ye) => !R.has(uo(t.data, e, ye))), i = t.data.rows.filter((Le, ye) => o[ye]), g = (Q = t.data.colors) == null ? void 0 : Q.filter((Le, ye) => o[ye]), w = t.data.columns.findIndex((Le) => Le.name === e.encoding.value), B = ((Ce = e.radial) == null ? void 0 : Ce.mode) === "partition" || w < 0 ? t.data.total : i.reduce((Le, ye) => Le + (ge(ye[w]) ?? 0), 0);
|
|
184
184
|
return { ...t.data, rows: i, total: B, ...g ? { colors: g } : {} };
|
|
185
185
|
}, [t.data, R, e]), F = K(() => D ? (() => {
|
|
186
|
-
const o =
|
|
187
|
-
return o.collapsed ? o :
|
|
188
|
-
})() : { frame: D, collapsed: !1 }, [e, r, D]), Fe = F.collapsed && F.frame ?
|
|
186
|
+
const o = ht(D, e);
|
|
187
|
+
return o.collapsed ? o : ft(D, e, r("chart.other", "Other"));
|
|
188
|
+
})() : { frame: D, collapsed: !1 }, [e, r, D]), Fe = F.collapsed && F.frame ? no(F.frame, e, F.frame.rows.length - 1) : void 0, O = T || !F.collapsed ? D : F.frame, s = O ? Rt(O, e.encoding, e.valueAxis, (Ge = e.presentation) == null ? void 0 : Ge.valueSpreadThreshold) : !1, L = K(() => {
|
|
189
189
|
if (!t.data || T) return t.data;
|
|
190
|
-
const o =
|
|
191
|
-
return o.collapsed ? o.frame :
|
|
190
|
+
const o = ht(t.data, e);
|
|
191
|
+
return o.collapsed ? o.frame : ft(t.data, e, r("chart.other", "Other")).frame;
|
|
192
192
|
}, [t.data, e, T, r]), S = K(() => {
|
|
193
193
|
var i;
|
|
194
194
|
if (!t.data || R.size === 0 || !e.encoding.value || ((i = e.radial) == null ? void 0 : i.mode) === "partition") return;
|
|
@@ -208,13 +208,13 @@ function ko({ panel: e, adapter: n }) {
|
|
|
208
208
|
if (j)
|
|
209
209
|
return (o) => {
|
|
210
210
|
var i;
|
|
211
|
-
return !!((i =
|
|
211
|
+
return !!((i = gt(j, o)) != null && i.target);
|
|
212
212
|
};
|
|
213
|
-
}, [j]), le = K(() =>
|
|
214
|
-
const o =
|
|
213
|
+
}, [j]), le = K(() => yt(t.data, e), [t.data, e]), he = K(() => {
|
|
214
|
+
const o = bt(c.theme, e, { positional: !ee, labels: le }), i = go(t.data, e);
|
|
215
215
|
return i.size === 0 ? o : (g, w) => o(g, i.get(g) ?? w);
|
|
216
216
|
}, [ee, c.theme, t.data, le, e]), fe = K(
|
|
217
|
-
() =>
|
|
217
|
+
() => pt(c.theme, e, { colors: ce, positional: !ee, labels: le }),
|
|
218
218
|
[ee, c.theme, ce, le, e]
|
|
219
219
|
), d = K(() => {
|
|
220
220
|
var i;
|
|
@@ -289,15 +289,15 @@ function ko({ panel: e, adapter: n }) {
|
|
|
289
289
|
encoding: e.encoding,
|
|
290
290
|
format: y,
|
|
291
291
|
formatAxis: f,
|
|
292
|
-
formatTooltip: (g, w, B) =>
|
|
292
|
+
formatTooltip: (g, w, B) => Qt(w, B, e.format[g], c.meta.locale),
|
|
293
293
|
// The plot abbreviates because a label has to fit beside a mark; the
|
|
294
294
|
// tooltip is where a reader who stopped to point gets the whole number, and
|
|
295
295
|
// the clipboard gets the machine value behind it.
|
|
296
296
|
formatExact: (g, w) => {
|
|
297
297
|
var B;
|
|
298
|
-
return
|
|
298
|
+
return Wt(w, e.format[g], ((B = c.meta) == null ? void 0 : B.locale) ?? "en");
|
|
299
299
|
},
|
|
300
|
-
rawValue: (g, w) =>
|
|
300
|
+
rawValue: (g, w) => jt(w, e.format[g]),
|
|
301
301
|
categoryFormatDefined: !!(e.encoding.category && e.format[e.encoding.category]),
|
|
302
302
|
locale: (o = c.meta) == null ? void 0 : o.locale,
|
|
303
303
|
shareDecimalSeparator: e.encoding.value ? (i = e.format[e.encoding.value]) == null ? void 0 : i.decimalSeparator : void 0,
|
|
@@ -315,19 +315,19 @@ function ko({ panel: e, adapter: n }) {
|
|
|
315
315
|
temporal: e.temporal,
|
|
316
316
|
hiddenOverlays: d,
|
|
317
317
|
valueAxis: e.valueAxis,
|
|
318
|
-
valueUnit:
|
|
318
|
+
valueUnit: qt(e.encoding.value ? e.format[e.encoding.value] : void 0),
|
|
319
319
|
expandable: de
|
|
320
320
|
} : void 0;
|
|
321
321
|
}, [P, (st = c.meta) == null ? void 0 : st.locale, c.theme, de, y, f, Ke, d, J, e.encoding, e.format, e.radial, e.temporal, e.valueAxis, E, O, fe, b, he, r]), Se = K(() => {
|
|
322
322
|
var i, g;
|
|
323
323
|
if (!e.temporal && !e.encoding.previous) return [];
|
|
324
324
|
const o = e.encoding.category ?? e.encoding.label;
|
|
325
|
-
return
|
|
325
|
+
return Kt({
|
|
326
326
|
temporal: e.temporal,
|
|
327
327
|
hasComparison: !!e.encoding.previous,
|
|
328
328
|
labels: P,
|
|
329
329
|
formatValue: (w) => y(e.encoding.value ?? "", w),
|
|
330
|
-
formatCategory:
|
|
330
|
+
formatCategory: Tt({
|
|
331
331
|
format: (w) => y(o ?? "", w),
|
|
332
332
|
isTime: ((i = t.data) == null ? void 0 : i.columns.some((w) => w.name === o && w.type === "time")) === !0,
|
|
333
333
|
hasDeclaredFormat: !!(o && e.format[o]),
|
|
@@ -335,9 +335,9 @@ function ko({ panel: e, adapter: n }) {
|
|
|
335
335
|
}),
|
|
336
336
|
hidden: d
|
|
337
337
|
});
|
|
338
|
-
}, [P, (it = c.meta) == null ? void 0 : it.locale, y, (at = t.data) == null ? void 0 : at.columns, d, e.encoding, e.format, e.temporal]), Be =
|
|
338
|
+
}, [P, (it = c.meta) == null ? void 0 : it.locale, y, (at = t.data) == null ? void 0 : at.columns, d, e.encoding, e.format, e.temporal]), Be = Zt(), Ue = te ? Be ? !!((j == null ? void 0 : j.children.length) ?? e.drillRoot) : Me : !!z.action, Pe = J === "histogram" || J === "boxplot" || J === "heatmap", Ve = Te && !Pe, De = Ae((o, i, g) => {
|
|
339
339
|
const w = F.frame ? F.frame.rows.length - 1 : -1;
|
|
340
|
-
if (F.collapsed && !!(o === Fe || F.frame &&
|
|
340
|
+
if (F.collapsed && !!(o === Fe || F.frame && mt(F.frame, e, o) === w)) {
|
|
341
341
|
h((Ce) => !Ce);
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
@@ -350,15 +350,15 @@ function ko({ panel: e, adapter: n }) {
|
|
|
350
350
|
v(o), Be(o, i);
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
|
-
const Q =
|
|
353
|
+
const Q = gt(j, o);
|
|
354
354
|
j && !(Q != null && Q.target) || (v(o), m((Q == null ? void 0 : Q.key) ?? o, e.id));
|
|
355
|
-
}, [F.collapsed, F.frame, Fe, m, te, j, ae, Be, e, z]), qe = !Ve && (E == null ? void 0 : E.legend) === "below" && !!O,
|
|
355
|
+
}, [F.collapsed, F.frame, Fe, m, te, j, ae, Be, e, z]), qe = !Ve && (E == null ? void 0 : E.legend) === "below" && !!O, It = !Ve && Se.length > 0 && !!O, Ie = Ue || F.collapsed, Nt = e.encoding.category ?? e.encoding.label, je = (J === "line" || J === "area") && (O == null ? void 0 : O.columns.some((o) => o.name === Nt && o.type === "time")) === !0, He = Se.find((o) => o.kind === "incomplete" && o.active), We = G ? r("chart.filterHint", "Select to filter the page") : r("chart.drillHint", "Select to explore"), Ne = K(
|
|
356
356
|
() => q && Ue ? { ...q, actionHint: We } : q,
|
|
357
357
|
[We, q, Ue]
|
|
358
358
|
);
|
|
359
|
-
return /* @__PURE__ */ l(
|
|
359
|
+
return /* @__PURE__ */ l(Gt, { allowEmptyContent: !Pe, panel: e, frame: t, headerActions: x, total: U, children: /* @__PURE__ */ k("div", { className: `lens-chart-layout${qe ? " lens-chart-layout-legend" : ""}`, children: [
|
|
360
360
|
/* @__PURE__ */ k("div", { className: "lens-chart-area", children: [
|
|
361
|
-
(E == null ? void 0 : E.totalBadge) === "plot" && J !== "donut" && U !== null && /* @__PURE__ */ l(
|
|
361
|
+
(E == null ? void 0 : E.totalBadge) === "plot" && J !== "donut" && ((ct = e.radial) == null ? void 0 : ct.mode) !== "partition" && U !== null && /* @__PURE__ */ l(yo, { panel: e, total: U }),
|
|
362
362
|
(s || He || je || ve || T && F.collapsed) && /* @__PURE__ */ k("div", { className: "lens-chart-notes", children: [
|
|
363
363
|
ve && /* @__PURE__ */ l("span", { className: "lens-chart-source-note", role: "note", children: r("chart.crossFilterSource", "All categories shown — the filter applies to the other panels") }),
|
|
364
364
|
s && /* @__PURE__ */ k(
|
|
@@ -368,7 +368,7 @@ function ko({ panel: e, adapter: n }) {
|
|
|
368
368
|
role: "note",
|
|
369
369
|
title: r("chart.logScaleHint", "Values are shown on a logarithmic scale"),
|
|
370
370
|
children: [
|
|
371
|
-
/* @__PURE__ */ l(
|
|
371
|
+
/* @__PURE__ */ l(Jt, { "aria-hidden": "true" }),
|
|
372
372
|
/* @__PURE__ */ l("span", { children: r("chart.logScale", "Logarithmic scale") })
|
|
373
373
|
]
|
|
374
374
|
}
|
|
@@ -379,8 +379,8 @@ function ko({ panel: e, adapter: n }) {
|
|
|
379
379
|
je && /* @__PURE__ */ l("button", { className: "lens-chart-reset-zoom", onClick: () => N((o) => o + 1), type: "button", children: r("chart.resetZoom", "Reset zoom") })
|
|
380
380
|
] })
|
|
381
381
|
] }),
|
|
382
|
-
W ? /* @__PURE__ */ l(
|
|
383
|
-
|
|
382
|
+
W ? /* @__PURE__ */ l(vo, { onShowAll: () => me(/* @__PURE__ */ new Set()) }) : Ne && Ve ? /* @__PURE__ */ l(
|
|
383
|
+
wo,
|
|
384
384
|
{
|
|
385
385
|
actionable: Ie,
|
|
386
386
|
frame: Ne.frame,
|
|
@@ -389,7 +389,7 @@ function ko({ panel: e, adapter: n }) {
|
|
|
389
389
|
}
|
|
390
390
|
) : Ne && /* @__PURE__ */ k(Ee, { children: [
|
|
391
391
|
/* @__PURE__ */ l(
|
|
392
|
-
|
|
392
|
+
ro,
|
|
393
393
|
{
|
|
394
394
|
actionable: Ie,
|
|
395
395
|
format: Ne.format,
|
|
@@ -402,7 +402,7 @@ function ko({ panel: e, adapter: n }) {
|
|
|
402
402
|
}
|
|
403
403
|
),
|
|
404
404
|
/* @__PURE__ */ l(
|
|
405
|
-
|
|
405
|
+
so,
|
|
406
406
|
{
|
|
407
407
|
input: Ne,
|
|
408
408
|
panelId: e.id,
|
|
@@ -415,10 +415,10 @@ function ko({ panel: e, adapter: n }) {
|
|
|
415
415
|
}
|
|
416
416
|
)
|
|
417
417
|
] }),
|
|
418
|
-
|
|
418
|
+
It && /* @__PURE__ */ l(po, { onToggle: p, overlays: Se })
|
|
419
419
|
] }),
|
|
420
420
|
qe && L && /* @__PURE__ */ l(
|
|
421
|
-
|
|
421
|
+
bo,
|
|
422
422
|
{
|
|
423
423
|
frame: L,
|
|
424
424
|
hidden: R,
|
|
@@ -431,14 +431,14 @@ function ko({ panel: e, adapter: n }) {
|
|
|
431
431
|
)
|
|
432
432
|
] }) });
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function vo({ onShowAll: e }) {
|
|
435
435
|
const n = Re();
|
|
436
436
|
return /* @__PURE__ */ k("div", { className: "lens-chart-empty", role: "status", children: [
|
|
437
437
|
/* @__PURE__ */ l("span", { className: "lens-chart-empty-note", children: n("chart.allSeriesHidden", "All series are hidden") }),
|
|
438
438
|
/* @__PURE__ */ l("button", { className: "lens-chart-empty-action", onClick: e, type: "button", children: n("chart.showAllSeries", "Show all series") })
|
|
439
439
|
] });
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function wo({ actionable: e, frame: n, onSelect: t, panel: r }) {
|
|
442
442
|
var ne, M;
|
|
443
443
|
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 + (ge(C[f]) ?? 0), 0), T = y < 0 || (ne = n.rows[0]) == null ? void 0 : ne[y], h = ke(T), u = b(v), N = r.encoding.id ?? a, se = n.columns.findIndex((A) => A.name === N), V = ke(se < 0 || (M = n.rows[0]) == null ? void 0 : M[se]), Y = /* @__PURE__ */ l(Ee, { children: n.rows.length === 0 ? /* @__PURE__ */ l("span", { className: "lens-chart-compact-empty", children: c("panel.empty", "No data") }) : /* @__PURE__ */ k(Ee, { children: [
|
|
444
444
|
h && /* @__PURE__ */ l("span", { className: "lens-chart-compact-label", title: h, children: h }),
|
|
@@ -455,7 +455,7 @@ function vo({ actionable: e, frame: n, onSelect: t, panel: r }) {
|
|
|
455
455
|
}
|
|
456
456
|
) : /* @__PURE__ */ l("div", { "aria-label": _, className: "lens-chart-compact", role: "img", children: Y });
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function yo({ panel: e, total: n }) {
|
|
459
459
|
const t = Re(), r = H(e.encoding.value ? e.format[e.encoding.value] : void 0);
|
|
460
460
|
return /* @__PURE__ */ k("span", { className: "lens-plot-total", children: [
|
|
461
461
|
/* @__PURE__ */ k("span", { className: "lens-panel-total-label", children: [
|
|
@@ -466,7 +466,7 @@ function wo({ panel: e, total: n }) {
|
|
|
466
466
|
r(n)
|
|
467
467
|
] });
|
|
468
468
|
}
|
|
469
|
-
const
|
|
469
|
+
const bo = vt(function({
|
|
470
470
|
panel: n,
|
|
471
471
|
frame: t,
|
|
472
472
|
hidden: r,
|
|
@@ -476,7 +476,7 @@ const yo = ft(function({
|
|
|
476
476
|
presentation: y
|
|
477
477
|
}) {
|
|
478
478
|
var Fe, O;
|
|
479
|
-
const { document: f, navigation: b } =
|
|
479
|
+
const { document: f, navigation: b } = wt(), v = Re(), [T, h] = re(""), u = $e(null), [N, se] = re({ top: !1, bottom: !1 }), [V, Y] = re(0), [_, ne] = re(!1), M = xt(t, n), A = M >= 0 ? n.encoding.series : n.encoding.label ?? n.encoding.category, C = n.encoding.value, X = H(C ? n.format[C] : void 0), R = t.columns.findIndex((s) => s.name === A), ee = t.columns.findIndex((s) => s.name === C), j = H(A ? n.format[A] : void 0), Me = b.panelId === n.id && b.path.length > 0, te = yt(t, n), z = bt(f.theme, n, { positional: !Me, labels: te }), ie = pt(f.theme, n, {
|
|
480
480
|
colors: t.colors,
|
|
481
481
|
positional: !Me,
|
|
482
482
|
labels: te
|
|
@@ -514,7 +514,7 @@ const yo = ft(function({
|
|
|
514
514
|
var q;
|
|
515
515
|
return ee >= 0 ? ge((q = t.rows[P]) == null ? void 0 : q[ee]) : void 0;
|
|
516
516
|
});
|
|
517
|
-
|
|
517
|
+
Et(x, d).forEach((P, q) => ce.set(p[q], P));
|
|
518
518
|
}
|
|
519
519
|
const we = /* @__PURE__ */ new Map();
|
|
520
520
|
Z && s.forEach((d) => we.set(d, (we.get(d) ?? 0) + 1));
|
|
@@ -542,7 +542,7 @@ const yo = ft(function({
|
|
|
542
542
|
const L = (S = t.rows[s]) == null ? void 0 : S[R];
|
|
543
543
|
return ke(L).toLocaleLowerCase().includes(J);
|
|
544
544
|
});
|
|
545
|
-
if (
|
|
545
|
+
if (Ct(() => {
|
|
546
546
|
const s = u.current;
|
|
547
547
|
if (!s) return;
|
|
548
548
|
const L = () => {
|
|
@@ -568,7 +568,7 @@ const yo = ft(function({
|
|
|
568
568
|
const pe = (s) => {
|
|
569
569
|
const L = !r.has(s) && I.allKeys.every((S) => S === s || r.has(S));
|
|
570
570
|
c(L ? /* @__PURE__ */ new Set() : new Set(I.allKeys.filter((S) => S !== s)));
|
|
571
|
-
}, xe = I.allKeys.length > 0 && I.allKeys.every((s) => r.has(s)), me = I.allKeys.every((s) => !r.has(s)), D = I.allKeys.length >
|
|
571
|
+
}, xe = I.allKeys.length > 0 && I.allKeys.every((s) => r.has(s)), me = I.allKeys.every((s) => !r.has(s)), D = I.allKeys.length > co, F = I.entries.length >= ao;
|
|
572
572
|
return /* @__PURE__ */ k("div", { className: "lens-chart-legend-shell", style: _ ? { "--lens-chart-legend-max": "none" } : void 0, children: [
|
|
573
573
|
D && /* @__PURE__ */ k("div", { className: "lens-chart-legend-controls", children: [
|
|
574
574
|
/* @__PURE__ */ l(
|
|
@@ -605,7 +605,7 @@ const yo = ft(function({
|
|
|
605
605
|
onClick: () => c(new Set(I.allKeys.filter((s) => !r.has(s)))),
|
|
606
606
|
title: v("chart.legendInvert", "Invert"),
|
|
607
607
|
type: "button",
|
|
608
|
-
children: /* @__PURE__ */ l(
|
|
608
|
+
children: /* @__PURE__ */ l(Xt, {})
|
|
609
609
|
}
|
|
610
610
|
)
|
|
611
611
|
] }) : /* @__PURE__ */ l(
|
|
@@ -642,7 +642,7 @@ const yo = ft(function({
|
|
|
642
642
|
/* @__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) => {
|
|
643
643
|
var le, he, fe, d, p;
|
|
644
644
|
const S = t.rows[s], oe = I.entryPositions.get(s) ?? s, W = S[R], $ = W == null ? "" : j(W), U = I.entryKeys[s], E = r.has(U), ce = I.ringByIndex.get(s), we = L > 0 ? I.ringByIndex.get(Te[L - 1]) : void 0, de = ((fe = (he = (le = n.radial) == null ? void 0 : le.rings) == null ? void 0 : he.find((x) => x.key === ce)) == null ? void 0 : fe.label) ?? ce;
|
|
645
|
-
return /* @__PURE__ */ k(
|
|
645
|
+
return /* @__PURE__ */ k(Lt, { children: [
|
|
646
646
|
ce && ce !== we && /* @__PURE__ */ l("li", { className: "lens-chart-legend-heading", children: de }),
|
|
647
647
|
/* @__PURE__ */ l("li", { className: "lens-chart-legend-item", children: /* @__PURE__ */ k(
|
|
648
648
|
"button",
|
|
@@ -663,8 +663,8 @@ const yo = ft(function({
|
|
|
663
663
|
}
|
|
664
664
|
),
|
|
665
665
|
/* @__PURE__ */ l("span", { className: "lens-chart-legend-label", children: $ }),
|
|
666
|
-
Ke(s) !== "none" && /* @__PURE__ */ l("span", { className: "lens-chart-legend-value", children: Ke(s) === "percent" ?
|
|
667
|
-
/* @__PURE__ */ l("span", { "aria-hidden": "true", className: "lens-chart-legend-visibility", children: E ? /* @__PURE__ */ l(
|
|
666
|
+
Ke(s) !== "none" && /* @__PURE__ */ l("span", { className: "lens-chart-legend-value", children: Ke(s) === "percent" ? Mt(I.shares.get(s), (d = f.meta) == null ? void 0 : d.locale, C ? (p = n.format[C]) == null ? void 0 : p.decimalSeparator : void 0) : X(I.valueByKey.get(U)) }),
|
|
667
|
+
/* @__PURE__ */ l("span", { "aria-hidden": "true", className: "lens-chart-legend-visibility", children: E ? /* @__PURE__ */ l(eo, {}) : /* @__PURE__ */ l(to, {}) })
|
|
668
668
|
]
|
|
669
669
|
}
|
|
670
670
|
) }, `${U}-${s}`)
|
|
@@ -677,7 +677,7 @@ const yo = ft(function({
|
|
|
677
677
|
),
|
|
678
678
|
(V > 0 || _) && /* @__PURE__ */ l("button", { className: "lens-chart-legend-overflow", onClick: () => ne((s) => !s), type: "button", children: _ ? v("chart.legendCollapse", "Show fewer") : v("chart.legendMore", "{count} more", { count: String(V) }) })
|
|
679
679
|
] });
|
|
680
|
-
}),
|
|
680
|
+
}), po = vt(function({ overlays: n, onToggle: t }) {
|
|
681
681
|
const r = Re(), c = r("chart.legendOverlays", "Chart marks");
|
|
682
682
|
return /* @__PURE__ */ k("ul", { "aria-label": c, className: "lens-chart-legend lens-chart-overlay-legend", children: [
|
|
683
683
|
/* @__PURE__ */ l("li", { className: "lens-chart-legend-heading", children: c }),
|
|
@@ -696,7 +696,7 @@ const yo = ft(function({
|
|
|
696
696
|
"aria-hidden": "true",
|
|
697
697
|
className: "lens-chart-overlay-mark",
|
|
698
698
|
"data-stroke": a.stroke,
|
|
699
|
-
style: { "--lens-overlay-ink": `var(${
|
|
699
|
+
style: { "--lens-overlay-ink": `var(${Ft(a.tone)})` }
|
|
700
700
|
}
|
|
701
701
|
),
|
|
702
702
|
/* @__PURE__ */ l("span", { className: "lens-chart-legend-label", children: a.label }),
|
|
@@ -710,11 +710,11 @@ const yo = ft(function({
|
|
|
710
710
|
] });
|
|
711
711
|
});
|
|
712
712
|
export {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
713
|
+
Ro as ChartPanel,
|
|
714
|
+
ht as collapseExpandableTopN,
|
|
715
|
+
ft as collapseMinorDonutSlices,
|
|
716
|
+
St as donutRemainderKey,
|
|
717
717
|
Oe as legendKey,
|
|
718
|
-
|
|
719
|
-
|
|
718
|
+
mt as rowIndexForKey,
|
|
719
|
+
fo as topNGroupField
|
|
720
720
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as r, jsxs as f, Fragment as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { o as
|
|
1
|
+
import { jsx as r, jsxs as f, Fragment as B } from "react/jsx-runtime";
|
|
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";
|
|
4
4
|
import "@iota-uz/sdk/client-host";
|
|
5
5
|
function z(e) {
|
|
6
6
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
@@ -67,13 +67,13 @@ function D({ activeSegment: e, formatValue: o, onSegmentEnter: g, onSegmentLeave
|
|
|
67
67
|
] });
|
|
68
68
|
}
|
|
69
69
|
function K({ panel: e }) {
|
|
70
|
-
const o =
|
|
70
|
+
const o = M(e.id), g = T(), h = k(e, "value") ?? "value", v = C(e.format[h]), m = C({ kind: "percent", minorUnits: !1, precision: 0 }), { document: t } = $(), { segments: n, total: i } = E(
|
|
71
71
|
() => o.data ? A(e, o.data, j(t.theme, e, { labels: R(o.data, e) })) : { segments: [], total: 0 },
|
|
72
72
|
[t.theme, o.data, e]
|
|
73
73
|
), c = e.headline ?? e.total ?? i, s = n.reduce((a, d) => a + (d.value > 0 ? 1 : 0), 0), u = s > 1 || !!e.target && s > 0, l = H(e), F = l.cardURL(o.data), L = (a) => {
|
|
74
74
|
var d;
|
|
75
75
|
return l.rowScoped ? l.urlForRow(o.data, (d = o.data) == null ? void 0 : d.rows[a]) : void 0;
|
|
76
|
-
}, [b, w] =
|
|
76
|
+
}, [b, w] = I(), y = (a) => w(a), N = (a) => w((d) => d === a ? void 0 : d);
|
|
77
77
|
return /* @__PURE__ */ r(U, { panel: e, frame: o, children: /* @__PURE__ */ r(W, { href: F, label: e.title, onClick: l.onClick(F), children: /* @__PURE__ */ f("div", { className: "lens-coverage", "data-segment-active": b ? "true" : void 0, children: [
|
|
78
78
|
/* @__PURE__ */ f("p", { className: "lens-coverage-headline", children: [
|
|
79
79
|
/* @__PURE__ */ r("span", { className: "lens-coverage-headline-value", children: v(c) }),
|
|
@@ -103,7 +103,7 @@ function K({ panel: e }) {
|
|
|
103
103
|
}
|
|
104
104
|
),
|
|
105
105
|
/* @__PURE__ */ r("ul", { className: "lens-coverage-legend", children: n.map((a, d) => {
|
|
106
|
-
const p = L(d), x = /* @__PURE__ */ f(
|
|
106
|
+
const p = L(d), x = /* @__PURE__ */ f(B, { children: [
|
|
107
107
|
/* @__PURE__ */ r("span", { "aria-hidden": "true", className: "lens-coverage-legend-bullet", style: { background: a.color } }),
|
|
108
108
|
/* @__PURE__ */ r("span", { className: "lens-coverage-legend-label", title: a.label, children: a.label }),
|
|
109
109
|
/* @__PURE__ */ r("span", { className: "lens-coverage-legend-value", children: v(a.value) }),
|
|
@@ -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-88l253R1.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 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-
|
|
3
|
+
import { o as T, a as D, t as G, u as _, L as q, z, P as B } from "./index-88l253R1.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-rKcUCBNo.js";
|
|
7
7
|
const N = 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,
|
|
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";
|
|
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-CH2Cdo0x.js";
|
|
6
6
|
function v() {
|
|
7
7
|
const e = h();
|
|
8
8
|
return m(() => ({
|
|
@@ -14,15 +14,15 @@ function J({ panel: e }) {
|
|
|
14
14
|
const n = C(e.id), l = h(), f = v(), b = P(e, "value") ?? "value", c = x(e.format[b]), y = D(), t = m(
|
|
15
15
|
() => n.data ? q(e, n.data, f) : void 0,
|
|
16
16
|
[n.data, f, e]
|
|
17
|
-
), g = (t == null ? void 0 : t.kind) === "contract-error" ? t.message : void 0, N = g ? { ...n, data: void 0, error: new Error(g) } : n,
|
|
17
|
+
), g = (t == null ? void 0 : t.kind) === "contract-error" ? t.message : void 0, N = g ? { ...n, data: void 0, error: new Error(g) } : n, k = m(() => {
|
|
18
18
|
if (!t) return [];
|
|
19
19
|
const a = (s) => s === "+" ? l("flow.plus", "plus") : s === "−" ? l("flow.minus", "minus") : s === "=" ? l("flow.equals", "equals") : "";
|
|
20
20
|
return K(e, t, c).map((s) => {
|
|
21
|
-
const r = L(s), i = r ? l(r.meta.labelKey, r.meta.fallback) : void 0, u = a(s.operator),
|
|
21
|
+
const r = L(s), i = r ? l(r.meta.labelKey, r.meta.fallback) : void 0, u = a(s.operator), $ = s.showDash ? i ?? l("availability.unavailable", "Unavailable") : s.text, w = !s.showDash && i ? `, ${i}` : "";
|
|
22
22
|
return {
|
|
23
23
|
...s,
|
|
24
24
|
operatorWord: u,
|
|
25
|
-
ariaLabel: `${u ? `${u} ` : ""}${s.stage.label}, ${
|
|
25
|
+
ariaLabel: `${u ? `${u} ` : ""}${s.stage.label}, ${$}${w}`
|
|
26
26
|
};
|
|
27
27
|
});
|
|
28
28
|
}, [c, t, e, l]), p = m(() => {
|
|
@@ -32,7 +32,7 @@ function J({ panel: e }) {
|
|
|
32
32
|
return l("flow.difference", "Difference: {delta}", { delta: c(a) });
|
|
33
33
|
}, [c, t, e, l]);
|
|
34
34
|
return /* @__PURE__ */ d(E, { panel: e, frame: N, allowEmptyContent: !0, children: [
|
|
35
|
-
/* @__PURE__ */ o("ol", { className: "lens-flow", "aria-label": l("flow.stages", "{name} stages", { name: e.title }), children:
|
|
35
|
+
/* @__PURE__ */ o("ol", { className: "lens-flow", "aria-label": l("flow.stages", "{name} stages", { name: e.title }), children: k.map((a, s) => {
|
|
36
36
|
const r = y(a.stage.action), i = /* @__PURE__ */ d(F, { children: [
|
|
37
37
|
/* @__PURE__ */ o("span", { className: "lens-flow-stage-label", children: a.stage.label }),
|
|
38
38
|
/* @__PURE__ */ o("span", { className: "lens-flow-stage-value", children: a.showDash ? "—" : a.text }),
|
|
@@ -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,
|
|
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";
|
|
4
4
|
import "@iota-uz/sdk/client-host";
|
|
5
|
-
import { h as M, r as Q, Q as V } from "./metricViews-
|
|
5
|
+
import { h as M, r as Q, Q as V } from "./metricViews-CH2Cdo0x.js";
|
|
6
6
|
function j() {
|
|
7
7
|
const a = x();
|
|
8
8
|
return d(() => ({
|