@iota-uz/sdk 0.5.1 → 0.5.2
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-DnwWRglV.js +574 -0
- package/dist/lens/{ChartHost-Bl2lxIqU.js → ChartHost-DohEf1-L.js} +2 -2
- package/dist/lens/{ChartPanel-CTIp_4YE.js → ChartPanel-WhiPcjdF.js} +3 -3
- package/dist/lens/{CoveragePanel-DZZWkjSv.js → CoveragePanel-BjmHpQIZ.js} +6 -6
- package/dist/lens/{GaugePanel-BcNdd_Wj.js → GaugePanel-CmQ4ShEf.js} +1 -1
- package/dist/lens/{MapPanel-6sI_Ei9L.js → MapPanel-B9q3sceX.js} +2 -2
- package/dist/lens/{MetricFlowPanel-LzqevSPs.js → MetricFlowPanel-HcjNwmDG.js} +6 -6
- package/dist/lens/{MetricHierarchyPanel-h6tJqRPg.js → MetricHierarchyPanel-D6EZ05aK.js} +2 -2
- package/dist/lens/{MetricRelationshipPanel-CgckUvvJ.js → MetricRelationshipPanel--MlnSeD0.js} +5 -5
- package/dist/lens/{PrintReport-DJv4Rm_U.js → PrintReport-CFq0u0ZA.js} +5 -5
- package/dist/lens/{TablePanel-Dh6bXlwM.js → TablePanel-8NER1r6f.js} +102 -102
- package/dist/lens/{adapter-zBDC8hbZ.js → adapter-Bl6H53g9.js} +5622 -5620
- 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/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-CspKnSQn.js → index-CIngYYVZ.js} +1 -1
- package/dist/lens/{index-C45DAO6w.js → index-DGLFNPl4.js} +3046 -2981
- package/dist/lens/index.js +1 -1
- package/dist/lens/{install-DyXK20dR.js → install-B6q-zRno.js} +1 -1
- package/dist/lens/{install-DT0AQkUj.js → install-BM-Kt5qH.js} +1 -1
- package/dist/lens/{install-3GLgv_LN.js → install-BdsfPB-W.js} +1 -1
- package/dist/lens/{install-B5oSx3pv.js → install-DNHJghsU.js} +1 -1
- package/dist/lens/{metricViews-QvoFHVdh.js → metricViews-CPJMPqcl.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/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 +2 -0
- 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-14qoPAtc.js} +2 -2
- package/dist/lens/{prefetchPanels-B7bIY0bM.js → prefetchPanels-C_-SP6Zx.js} +3 -3
- package/dist/lens/{print-CwcB0fug.js → print-DRljk_Xa.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-sHVLUC1f.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,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.2";
|
|
2
|
+
export declare const SDK_SOURCE_COMMIT = "39704049525a56165da7c43113a9bde69ed3c5a3";
|
|
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.2";
|
|
6
|
+
sourceCommit: "39704049525a56165da7c43113a9bde69ed3c5a3";
|
|
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.2';
|
|
3
|
+
export const SDK_SOURCE_COMMIT = '39704049525a56165da7c43113a9bde69ed3c5a3';
|
|
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,
|
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
import { jsx as o, jsxs as m, Fragment as Z } from "react/jsx-runtime";
|
|
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-DGLFNPl4.js";
|
|
4
|
+
import "@iota-uz/sdk/client-host";
|
|
5
|
+
import { createPortal as ht } from "react-dom";
|
|
6
|
+
function O({ raw: t }) {
|
|
7
|
+
const a = G(), [n, r] = _(!1), u = P();
|
|
8
|
+
W(() => () => {
|
|
9
|
+
u.current && clearTimeout(u.current);
|
|
10
|
+
}, []);
|
|
11
|
+
const s = n ? a("explore.copied", "Copied") : a("explore.copyValue", "Copy value");
|
|
12
|
+
return /* @__PURE__ */ o(
|
|
13
|
+
"button",
|
|
14
|
+
{
|
|
15
|
+
"aria-label": s,
|
|
16
|
+
className: "lens-icon-button lens-tooltip-copy",
|
|
17
|
+
"data-copied": n ? "true" : void 0,
|
|
18
|
+
onClick: (i) => {
|
|
19
|
+
i.stopPropagation(), et(t), r(!0), u.current && clearTimeout(u.current), u.current = setTimeout(() => r(!1), 1500);
|
|
20
|
+
},
|
|
21
|
+
title: s,
|
|
22
|
+
type: "button",
|
|
23
|
+
children: n ? /* @__PURE__ */ o(Q, {}) : /* @__PURE__ */ o(tt, {})
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
const U = 8, R = 8;
|
|
28
|
+
function pt(t, a, n) {
|
|
29
|
+
const r = Math.max(R, n.width - a.width - R), u = Math.min(Math.max(t.left + t.width / 2 - a.width / 2, R), r), s = t.top - a.height - U, i = s >= R;
|
|
30
|
+
return {
|
|
31
|
+
left: Math.round(u),
|
|
32
|
+
top: Math.round(i ? s : t.bottom + U),
|
|
33
|
+
side: i ? "above" : "below"
|
|
34
|
+
};
|
|
35
|
+
}
|
|
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 = P(null), [c, d] = _(), f = D(() => {
|
|
38
|
+
var L, $, I, e;
|
|
39
|
+
const b = (L = t.current) == null ? void 0 : L.getBoundingClientRect(), x = ($ = g.current) == null ? void 0 : $.getBoundingClientRect();
|
|
40
|
+
if (!b || !x) return;
|
|
41
|
+
const y = (e = (I = t.current) == null ? void 0 : I.closest(".lens-waterfall-bar")) == null ? void 0 : e.querySelector("strong"), M = Math.min(b.top, (y == null ? void 0 : y.getBoundingClientRect().top) ?? b.top), k = pt(
|
|
42
|
+
{ left: b.left, width: b.width, top: M, bottom: b.bottom },
|
|
43
|
+
x,
|
|
44
|
+
{ width: globalThis.innerWidth || 1024 }
|
|
45
|
+
);
|
|
46
|
+
d((l) => (l == null ? void 0 : l.left) === k.left && l.top === k.top && l.side === k.side ? l : k);
|
|
47
|
+
}, [t]);
|
|
48
|
+
if (J(() => {
|
|
49
|
+
i && f();
|
|
50
|
+
}, [i, f]), W(() => {
|
|
51
|
+
a || d(void 0);
|
|
52
|
+
}, [a]), W(() => {
|
|
53
|
+
if (i)
|
|
54
|
+
return globalThis.addEventListener("resize", f), globalThis.addEventListener("scroll", f, !0), () => {
|
|
55
|
+
globalThis.removeEventListener("resize", f), globalThis.removeEventListener("scroll", f, !0);
|
|
56
|
+
};
|
|
57
|
+
}, [i, f]), !a || !i) return null;
|
|
58
|
+
const w = n.exactValue ?? n.formattedValue, p = n.exactSplit ?? n.formattedSplit;
|
|
59
|
+
return ht(
|
|
60
|
+
/* @__PURE__ */ m(
|
|
61
|
+
"span",
|
|
62
|
+
{
|
|
63
|
+
className: "lens-waterfall-tip",
|
|
64
|
+
"data-side": (c == null ? void 0 : c.side) ?? "above",
|
|
65
|
+
onMouseEnter: u,
|
|
66
|
+
onMouseLeave: s,
|
|
67
|
+
ref: g,
|
|
68
|
+
role: "tooltip",
|
|
69
|
+
style: {
|
|
70
|
+
left: (c == null ? void 0 : c.left) ?? 0,
|
|
71
|
+
top: (c == null ? void 0 : c.top) ?? 0,
|
|
72
|
+
visibility: c ? "visible" : "hidden"
|
|
73
|
+
},
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ o("span", { "aria-hidden": "true", className: "lens-waterfall-tip-tail" }),
|
|
76
|
+
/* @__PURE__ */ o("span", { className: "lens-waterfall-tip-head", children: n.label }),
|
|
77
|
+
/* @__PURE__ */ m("span", { className: "lens-waterfall-tip-amount", children: [
|
|
78
|
+
/* @__PURE__ */ o("strong", { children: w }),
|
|
79
|
+
n.rawValue !== void 0 && /* @__PURE__ */ o(O, { raw: n.rawValue })
|
|
80
|
+
] }),
|
|
81
|
+
p !== void 0 && /* @__PURE__ */ m(Z, { children: [
|
|
82
|
+
n.splitLabel && /* @__PURE__ */ o("span", { className: "lens-waterfall-tip-label", children: n.splitLabel }),
|
|
83
|
+
/* @__PURE__ */ m("span", { className: "lens-waterfall-tip-amount", "data-split": "true", children: [
|
|
84
|
+
/* @__PURE__ */ o("strong", { children: p }),
|
|
85
|
+
n.rawSplit !== void 0 && /* @__PURE__ */ o(O, { raw: n.rawSplit })
|
|
86
|
+
] })
|
|
87
|
+
] }),
|
|
88
|
+
r && /* @__PURE__ */ o("span", { className: "lens-waterfall-tip-foot", children: r })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
i
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
function vt({ item: t, index: a, count: n, chrome: r, splitCallout: u, actionHint: s, unknownLabel: i }) {
|
|
96
|
+
const [g, c] = _(!1), d = P(null), f = P(null), w = at(f), p = P(), b = () => {
|
|
97
|
+
p.current && clearTimeout(p.current), c(!0);
|
|
98
|
+
}, x = () => {
|
|
99
|
+
p.current && clearTimeout(p.current), p.current = setTimeout(() => c(!1), nt);
|
|
100
|
+
};
|
|
101
|
+
W(() => () => {
|
|
102
|
+
p.current && clearTimeout(p.current);
|
|
103
|
+
}, []);
|
|
104
|
+
const y = a * 2 >= n ? "start" : "end", M = `${t.splitLabel ? `${t.splitLabel} ` : ""}${t.formattedSplit ?? ""}`;
|
|
105
|
+
return /* @__PURE__ */ m(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
className: "lens-waterfall-column",
|
|
109
|
+
onBlur: x,
|
|
110
|
+
onFocus: b,
|
|
111
|
+
onMouseEnter: b,
|
|
112
|
+
onMouseLeave: x,
|
|
113
|
+
...r,
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ m("div", { className: "lens-waterfall-column-plot", children: [
|
|
116
|
+
t.underlayHeight !== void 0 && /* @__PURE__ */ o(
|
|
117
|
+
"span",
|
|
118
|
+
{
|
|
119
|
+
"aria-hidden": "true",
|
|
120
|
+
className: "lens-waterfall-underlay",
|
|
121
|
+
style: {
|
|
122
|
+
top: `${t.top + t.height}%`,
|
|
123
|
+
height: `${t.underlayHeight}%`
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
a < n - 1 && /* @__PURE__ */ o(
|
|
128
|
+
"span",
|
|
129
|
+
{
|
|
130
|
+
className: "lens-waterfall-connector",
|
|
131
|
+
style: { top: `${t.connectorTop}%` }
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
/* @__PURE__ */ m(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
className: "lens-waterfall-bar",
|
|
138
|
+
ref: d,
|
|
139
|
+
"data-checkpoint": t.checkpoint,
|
|
140
|
+
"data-kind": t.kind,
|
|
141
|
+
"data-label-row": a % 2,
|
|
142
|
+
"data-no-movement": t.noMovement,
|
|
143
|
+
"data-terminal": !r || void 0,
|
|
144
|
+
"data-tone": t.tone,
|
|
145
|
+
"data-unknown": t.unknown,
|
|
146
|
+
style: {
|
|
147
|
+
top: `${t.top}%`,
|
|
148
|
+
height: `${t.height}%`
|
|
149
|
+
},
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ m("strong", { children: [
|
|
152
|
+
t.formattedValue,
|
|
153
|
+
t.unknown && i && /* @__PURE__ */ o("span", { className: "lens-sr-only", children: i })
|
|
154
|
+
] }),
|
|
155
|
+
t.splitHeight !== void 0 && /* @__PURE__ */ o(
|
|
156
|
+
"span",
|
|
157
|
+
{
|
|
158
|
+
className: "lens-waterfall-bar-split",
|
|
159
|
+
style: { height: `${t.splitHeight}%` },
|
|
160
|
+
children: u === "hover" ? /* @__PURE__ */ o("span", { className: "lens-sr-only", children: M }) : /* @__PURE__ */ o(
|
|
161
|
+
"span",
|
|
162
|
+
{
|
|
163
|
+
className: "lens-waterfall-split-callout",
|
|
164
|
+
"data-reveal": "always",
|
|
165
|
+
"data-side": y,
|
|
166
|
+
children: M
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
),
|
|
174
|
+
u === "hover" && /* @__PURE__ */ o(
|
|
175
|
+
bt,
|
|
176
|
+
{
|
|
177
|
+
actionHint: r ? s : void 0,
|
|
178
|
+
anchor: d,
|
|
179
|
+
item: t,
|
|
180
|
+
onMouseEnter: b,
|
|
181
|
+
onMouseLeave: x,
|
|
182
|
+
open: g
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
] }),
|
|
186
|
+
/* @__PURE__ */ m("span", { className: "lens-waterfall-label", children: [
|
|
187
|
+
/* @__PURE__ */ o("span", { ref: f, title: w ? t.label : void 0, children: t.label }),
|
|
188
|
+
t.annotation && /* @__PURE__ */ m("small", { className: "lens-waterfall-annotation", children: [
|
|
189
|
+
t.annotation,
|
|
190
|
+
r && /* @__PURE__ */ o(Y, { size: 10 })
|
|
191
|
+
] })
|
|
192
|
+
] })
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
function mt({
|
|
198
|
+
model: t,
|
|
199
|
+
label: a,
|
|
200
|
+
interaction: n,
|
|
201
|
+
role: r = "img",
|
|
202
|
+
splitCallout: u = "hover",
|
|
203
|
+
axisUnit: s,
|
|
204
|
+
actionHint: i,
|
|
205
|
+
unknownLabel: g,
|
|
206
|
+
children: c
|
|
207
|
+
}) {
|
|
208
|
+
return /* @__PURE__ */ m(
|
|
209
|
+
"div",
|
|
210
|
+
{
|
|
211
|
+
"aria-label": a,
|
|
212
|
+
className: "lens-waterfall",
|
|
213
|
+
"data-lens-waterfall": !0,
|
|
214
|
+
role: r,
|
|
215
|
+
style: {
|
|
216
|
+
"--lens-waterfall-count": t.items.length,
|
|
217
|
+
"--lens-waterfall-zero": `${t.zero}%`
|
|
218
|
+
},
|
|
219
|
+
children: [
|
|
220
|
+
/* @__PURE__ */ m("div", { className: "lens-waterfall-chart", children: [
|
|
221
|
+
/* @__PURE__ */ m("div", { className: "lens-waterfall-axis", "aria-hidden": "true", children: [
|
|
222
|
+
s && /* @__PURE__ */ o("span", { className: "lens-waterfall-axis-unit", children: s }),
|
|
223
|
+
t.ticks.map((d) => /* @__PURE__ */ o("span", { style: { top: `${d.top}%` }, children: d.label }, d.value))
|
|
224
|
+
] }),
|
|
225
|
+
/* @__PURE__ */ m("div", { "aria-hidden": "true", className: "lens-waterfall-rules", children: [
|
|
226
|
+
t.ticks.map((d) => /* @__PURE__ */ o(
|
|
227
|
+
"span",
|
|
228
|
+
{
|
|
229
|
+
className: "lens-waterfall-gridline",
|
|
230
|
+
style: { top: `${d.top}%` }
|
|
231
|
+
},
|
|
232
|
+
`grid-${d.value}`
|
|
233
|
+
)),
|
|
234
|
+
/* @__PURE__ */ o("div", { className: "lens-waterfall-zero" })
|
|
235
|
+
] }),
|
|
236
|
+
/* @__PURE__ */ o("div", { className: "lens-waterfall-plot", children: t.items.map((d, f) => /* @__PURE__ */ o(
|
|
237
|
+
vt,
|
|
238
|
+
{
|
|
239
|
+
actionHint: i,
|
|
240
|
+
chrome: n == null ? void 0 : n(d, f),
|
|
241
|
+
count: t.items.length,
|
|
242
|
+
index: f,
|
|
243
|
+
item: d,
|
|
244
|
+
splitCallout: u,
|
|
245
|
+
unknownLabel: g
|
|
246
|
+
},
|
|
247
|
+
`${d.label}-${f}`
|
|
248
|
+
)) })
|
|
249
|
+
] }),
|
|
250
|
+
c
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
const wt = 2;
|
|
256
|
+
function j(t) {
|
|
257
|
+
if (typeof t == "number" && Number.isFinite(t)) return t;
|
|
258
|
+
if (typeof t == "string" && t.trim()) {
|
|
259
|
+
const a = Number(t);
|
|
260
|
+
if (Number.isFinite(a)) return a;
|
|
261
|
+
}
|
|
262
|
+
return 0;
|
|
263
|
+
}
|
|
264
|
+
const B = "—";
|
|
265
|
+
function gt(t) {
|
|
266
|
+
return typeof t == "boolean" ? t : typeof t == "number" ? t !== 0 : typeof t == "string" && t.trim().toLowerCase() === "true";
|
|
267
|
+
}
|
|
268
|
+
const xt = /* @__PURE__ */ new Set([
|
|
269
|
+
"neutral",
|
|
270
|
+
"positive",
|
|
271
|
+
"negative",
|
|
272
|
+
"inflow"
|
|
273
|
+
]);
|
|
274
|
+
function kt(t) {
|
|
275
|
+
return typeof t == "string" && xt.has(t) ? t : void 0;
|
|
276
|
+
}
|
|
277
|
+
function yt(t, a) {
|
|
278
|
+
return t > 0 ? `−${a(t)}` : t < 0 ? `+${a(-t)}` : a(0);
|
|
279
|
+
}
|
|
280
|
+
function Nt(t, a) {
|
|
281
|
+
return t > 0 ? `+${a(t)}` : t < 0 ? `−${a(-t)}` : a(0);
|
|
282
|
+
}
|
|
283
|
+
function Mt(t, a) {
|
|
284
|
+
const n = a(Math.abs(t));
|
|
285
|
+
if (n !== void 0)
|
|
286
|
+
return t === 0 ? n : `${t > 0 ? "+" : "−"}${n}`;
|
|
287
|
+
}
|
|
288
|
+
function q(t, a, n, r) {
|
|
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
|
+
return a.rows.map((h, v) => {
|
|
291
|
+
const E = l(h), V = E !== void 0, C = E ?? 0, z = j(h[y]), S = V && C > 0 ? Math.min(100, C / N * 100) : 0;
|
|
292
|
+
return {
|
|
293
|
+
label: H(h[b], `Stage ${v + 1}`),
|
|
294
|
+
value: C,
|
|
295
|
+
hasValue: V,
|
|
296
|
+
formattedValue: V ? n(C) : B,
|
|
297
|
+
cut: z,
|
|
298
|
+
// A stage whose total is unknown has an unknown movement: the frame's own
|
|
299
|
+
// `cut` for such a row is a placeholder, and printing «0 UZS» beside it
|
|
300
|
+
// would restate the very lie the em dash above it just refused to tell.
|
|
301
|
+
formattedCut: V ? yt(z, r) : B,
|
|
302
|
+
cutLabel: H(h[M], ""),
|
|
303
|
+
final: gt(h[k]),
|
|
304
|
+
annotation: L >= 0 ? H(h[L], "") : "",
|
|
305
|
+
tone: $ >= 0 ? kt(h[$]) : void 0,
|
|
306
|
+
split: I >= 0 ? j(h[I]) : 0,
|
|
307
|
+
splitLabel: e >= 0 ? H(h[e], "") : "",
|
|
308
|
+
width: S > 0 ? Math.max(wt, S) : 0,
|
|
309
|
+
rowIndex: v
|
|
310
|
+
};
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
function Lt(t) {
|
|
314
|
+
if (!Number.isFinite(t) || t <= 0) return 1;
|
|
315
|
+
const a = 10 ** Math.floor(Math.log10(t)), n = t / a;
|
|
316
|
+
return n <= 1 ? a : n <= 2 ? 2 * a : n <= 5 ? 5 * a : 10 * a;
|
|
317
|
+
}
|
|
318
|
+
const It = [1, 1.5, 2, 2.5, 3, 4, 5, 7.5];
|
|
319
|
+
function K(t, a) {
|
|
320
|
+
const n = Math.max(1, a - t), r = Lt(n / 3);
|
|
321
|
+
let u, s = Number.POSITIVE_INFINITY;
|
|
322
|
+
for (let i = 10 ** Math.floor(Math.log10(n / 7)); i <= n; i *= 10)
|
|
323
|
+
for (const g of It) {
|
|
324
|
+
const c = g * i;
|
|
325
|
+
if (!Number.isFinite(c) || c <= 0) continue;
|
|
326
|
+
const d = a > 0 ? Math.ceil(a / c) * c : 0, f = t < 0 ? Math.floor(t / c) * c : 0, w = Math.round((d - f) / c);
|
|
327
|
+
if (w < 2 || w > 7) continue;
|
|
328
|
+
const p = d - f;
|
|
329
|
+
(p < s || p === s && c > (u ?? 0)) && (s = p, u = c);
|
|
330
|
+
}
|
|
331
|
+
return u ?? r;
|
|
332
|
+
}
|
|
333
|
+
function X(t, a, n = a, { formatExact: r = () => {
|
|
334
|
+
}, rawValue: u = () => {
|
|
335
|
+
} } = {}) {
|
|
336
|
+
const s = t[0];
|
|
337
|
+
if (!s) return { items: [], ticks: [], zero: 100 };
|
|
338
|
+
const i = [{
|
|
339
|
+
label: s.label,
|
|
340
|
+
from: 0,
|
|
341
|
+
to: s.hasValue ? s.value : 0,
|
|
342
|
+
value: s.hasValue ? s.value : 0,
|
|
343
|
+
kind: "start",
|
|
344
|
+
tone: s.tone,
|
|
345
|
+
annotation: s.annotation,
|
|
346
|
+
// An opening total is not a movement, so it has no part-of-a-movement to
|
|
347
|
+
// band off. Only the deduction/addition bars carry a split.
|
|
348
|
+
split: 0,
|
|
349
|
+
splitLabel: "",
|
|
350
|
+
unknown: s.hasValue ? void 0 : !0,
|
|
351
|
+
rowIndex: s.rowIndex
|
|
352
|
+
}];
|
|
353
|
+
let g = s.hasValue ? s.value : 0;
|
|
354
|
+
const d = Math.max(...t.map((e) => e.hasValue ? Math.abs(e.value) : 0), 1) * 1e-6;
|
|
355
|
+
for (let e = 1; e < t.length; e += 1) {
|
|
356
|
+
const l = t[e];
|
|
357
|
+
if (!l) continue;
|
|
358
|
+
if (!l.hasValue) {
|
|
359
|
+
i.push({
|
|
360
|
+
label: l.cutLabel || l.label,
|
|
361
|
+
from: g,
|
|
362
|
+
to: g,
|
|
363
|
+
value: 0,
|
|
364
|
+
// A final row keeps the closing branch even with nothing to close, so
|
|
365
|
+
// it holds its declared place, keeps its row (and therefore its drill),
|
|
366
|
+
// and no synthetic closing is appended after it.
|
|
367
|
+
kind: l.final ? "end" : "increase",
|
|
368
|
+
tone: l.tone,
|
|
369
|
+
annotation: l.annotation,
|
|
370
|
+
split: 0,
|
|
371
|
+
splitLabel: "",
|
|
372
|
+
unknown: !0,
|
|
373
|
+
rowIndex: l.rowIndex
|
|
374
|
+
});
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
const N = g, h = l.value, v = h - N;
|
|
378
|
+
if (g = h, l.final && Math.abs(v) < d) {
|
|
379
|
+
i.push({
|
|
380
|
+
label: l.label,
|
|
381
|
+
from: 0,
|
|
382
|
+
to: h,
|
|
383
|
+
value: h,
|
|
384
|
+
kind: "end",
|
|
385
|
+
tone: l.tone,
|
|
386
|
+
annotation: l.annotation,
|
|
387
|
+
split: 0,
|
|
388
|
+
splitLabel: "",
|
|
389
|
+
rowIndex: l.rowIndex
|
|
390
|
+
});
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
i.push({
|
|
394
|
+
label: l.cutLabel || l.label,
|
|
395
|
+
from: N,
|
|
396
|
+
to: h,
|
|
397
|
+
value: v,
|
|
398
|
+
kind: v < 0 ? "decrease" : "increase",
|
|
399
|
+
tone: l.tone,
|
|
400
|
+
annotation: l.annotation,
|
|
401
|
+
split: l.split,
|
|
402
|
+
splitLabel: l.splitLabel,
|
|
403
|
+
rowIndex: l.rowIndex
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
const f = i.at(-1);
|
|
407
|
+
if (t.length > 1 && f && f.kind !== "end" && !f.unknown) {
|
|
408
|
+
const e = t.at(-1);
|
|
409
|
+
e && i.push({
|
|
410
|
+
label: e.label,
|
|
411
|
+
from: 0,
|
|
412
|
+
to: e.value,
|
|
413
|
+
value: e.value,
|
|
414
|
+
kind: "end",
|
|
415
|
+
tone: e.tone,
|
|
416
|
+
annotation: e.annotation,
|
|
417
|
+
split: 0,
|
|
418
|
+
splitLabel: "",
|
|
419
|
+
rowIndex: e.rowIndex
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
let w = 0, p = 0;
|
|
423
|
+
i.forEach((e) => {
|
|
424
|
+
w = Math.min(w, e.from, e.to), p = Math.max(p, e.from, e.to);
|
|
425
|
+
});
|
|
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), z = Math.abs(e.value), S = !v && C > d && C < z - d;
|
|
428
|
+
return {
|
|
429
|
+
label: e.label,
|
|
430
|
+
value: e.value,
|
|
431
|
+
// An unknown column prints the em dash and nothing else: there is no
|
|
432
|
+
// exact form of a figure that does not exist, and no machine value to put
|
|
433
|
+
// on the clipboard, so the tooltip carries neither and shows no copy
|
|
434
|
+
// button rather than offering to copy a zero.
|
|
435
|
+
formattedValue: v ? B : e.kind === "start" || e.kind === "end" ? a(e.value) : Nt(e.value, a),
|
|
436
|
+
exactValue: v ? void 0 : e.kind === "start" || e.kind === "end" ? r(e.value) : Mt(e.value, r),
|
|
437
|
+
rawValue: v ? void 0 : u(e.value),
|
|
438
|
+
top: N,
|
|
439
|
+
height: V,
|
|
440
|
+
// Share of the bar, not of the plot: the band is painted inside the bar,
|
|
441
|
+
// so its percentage resolves against the bar's own box. Scaling by the
|
|
442
|
+
// bar's plot height too shrank every band by that height again — a 24.5%
|
|
443
|
+
// share of a bar 18% tall drew as 4.5% of it.
|
|
444
|
+
splitHeight: S ? 100 * (C / z) : void 0,
|
|
445
|
+
formattedSplit: S ? a(C) : void 0,
|
|
446
|
+
exactSplit: S ? r(C) : void 0,
|
|
447
|
+
rawSplit: S ? u(C) : void 0,
|
|
448
|
+
splitLabel: S ? e.splitLabel : void 0,
|
|
449
|
+
// Only a floating bar leaves a balance under it; the totals stand on zero
|
|
450
|
+
// already. A bar dipping below zero leaves nothing, hence the clamp. An
|
|
451
|
+
// unknown stage draws no invented height at all — it is a gap standing
|
|
452
|
+
// on the running total, not a translucent claim about what fills it.
|
|
453
|
+
underlayHeight: v || e.kind === "start" || e.kind === "end" ? void 0 : Math.max(0, L - h) || void 0,
|
|
454
|
+
connectorTop: k(e.to),
|
|
455
|
+
zero: L,
|
|
456
|
+
kind: e.kind,
|
|
457
|
+
// A total nobody could compute is not an interim total the reader passes
|
|
458
|
+
// through, so it does not take the hollow-column treatment or put the
|
|
459
|
+
// legend that explains it on the panel.
|
|
460
|
+
checkpoint: e.kind === "end" && !v && l < i.length - 1 ? !0 : void 0,
|
|
461
|
+
noMovement: E || void 0,
|
|
462
|
+
unknown: v || void 0,
|
|
463
|
+
tone: e.tone,
|
|
464
|
+
annotation: e.annotation,
|
|
465
|
+
rowIndex: e.rowIndex
|
|
466
|
+
};
|
|
467
|
+
}), I = [];
|
|
468
|
+
for (let e = x; e <= y + b / 10; e += b)
|
|
469
|
+
I.push({ value: e, label: n(e), top: k(e) });
|
|
470
|
+
return { items: $, ticks: I, zero: k(0) };
|
|
471
|
+
}
|
|
472
|
+
function Ct({ panel: t }) {
|
|
473
|
+
var $, I;
|
|
474
|
+
const a = ot(t.id), n = G(), r = T(t, "value") ?? "value", u = T(t, "cut") ?? "cut", s = A(t.format[r]), i = A(t.format[u] ?? t.format[r]), g = st(t.format[r]), c = it(t.format[r]), d = D(
|
|
475
|
+
(e) => rt(e, t.format[r]),
|
|
476
|
+
[t.format, r]
|
|
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) => {
|
|
478
|
+
if (!(e === void 0 || !x.action || !a.data))
|
|
479
|
+
return x.urlForRow(a.data, a.data.rows[e]);
|
|
480
|
+
}, M = (e, l) => {
|
|
481
|
+
const N = y(e);
|
|
482
|
+
if (!N) return;
|
|
483
|
+
const h = (v) => {
|
|
484
|
+
x.activate(N, v.currentTarget);
|
|
485
|
+
};
|
|
486
|
+
return {
|
|
487
|
+
role: "button",
|
|
488
|
+
tabIndex: 0,
|
|
489
|
+
"aria-label": n("cascade.openStage", "Open {name}", { name: l }),
|
|
490
|
+
onClick: h,
|
|
491
|
+
onKeyDown: (v) => {
|
|
492
|
+
v.key !== "Enter" && v.key !== " " || (v.preventDefault(), h(v));
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
}, k = !!x.action && w.some((e) => y(e.rowIndex) !== void 0), L = n("availability.unavailable", "Unavailable");
|
|
496
|
+
return /* @__PURE__ */ o(ut, { panel: t, frame: a, children: ((I = t.presentation) == null ? void 0 : I.bridgeLayout) === "waterfall" ? /* @__PURE__ */ o(
|
|
497
|
+
mt,
|
|
498
|
+
{
|
|
499
|
+
actionHint: n("chart.drillHint", "Select to explore"),
|
|
500
|
+
axisUnit: f,
|
|
501
|
+
interaction: (e) => M(e.rowIndex, e.label),
|
|
502
|
+
label: n("cascade.stages", "{name} stages", { name: t.title }),
|
|
503
|
+
model: p,
|
|
504
|
+
role: k ? "group" : "img",
|
|
505
|
+
unknownLabel: L,
|
|
506
|
+
children: b && /* @__PURE__ */ m("p", { className: "lens-waterfall-key", children: [
|
|
507
|
+
/* @__PURE__ */ o("span", { className: "lens-waterfall-key-item", "data-mark": "checkpoint", children: n("cascade.checkpoint", "Interim total") }),
|
|
508
|
+
/* @__PURE__ */ o("span", { className: "lens-waterfall-key-item", "data-mark": "result", children: n("cascade.result", "Closing total") })
|
|
509
|
+
] })
|
|
510
|
+
}
|
|
511
|
+
) : /* @__PURE__ */ o(
|
|
512
|
+
"div",
|
|
513
|
+
{
|
|
514
|
+
"aria-label": n("cascade.stages", "{name} stages", { name: t.title }),
|
|
515
|
+
className: "lens-cascade",
|
|
516
|
+
role: "list",
|
|
517
|
+
children: w.map((e, l) => {
|
|
518
|
+
const N = M(e.rowIndex, e.label);
|
|
519
|
+
return /* @__PURE__ */ m("div", { className: "lens-cascade-step", role: "listitem", children: [
|
|
520
|
+
l > 0 && e.cutLabel && /* @__PURE__ */ m("div", { className: "lens-cascade-connector", children: [
|
|
521
|
+
/* @__PURE__ */ o("span", { children: e.cutLabel }),
|
|
522
|
+
/* @__PURE__ */ o(
|
|
523
|
+
"strong",
|
|
524
|
+
{
|
|
525
|
+
"data-direction": e.hasValue ? e.cut > 0 ? "down" : e.cut < 0 ? "up" : "flat" : "unknown",
|
|
526
|
+
children: e.formattedCut
|
|
527
|
+
}
|
|
528
|
+
)
|
|
529
|
+
] }),
|
|
530
|
+
/* @__PURE__ */ m(
|
|
531
|
+
"div",
|
|
532
|
+
{
|
|
533
|
+
className: `lens-cascade-stage${e.final ? " lens-cascade-stage-final" : ""}`,
|
|
534
|
+
"data-final": e.final || void 0,
|
|
535
|
+
"data-tone": e.tone,
|
|
536
|
+
"data-unknown": !e.hasValue || void 0,
|
|
537
|
+
...N,
|
|
538
|
+
children: [
|
|
539
|
+
/* @__PURE__ */ m("div", { className: "lens-cascade-stage-label", children: [
|
|
540
|
+
/* @__PURE__ */ m("span", { className: "lens-cascade-stage-title", children: [
|
|
541
|
+
/* @__PURE__ */ o("span", { children: e.label }),
|
|
542
|
+
e.annotation && /* @__PURE__ */ m("small", { className: "lens-cascade-stage-annotation", children: [
|
|
543
|
+
e.annotation,
|
|
544
|
+
N && /* @__PURE__ */ o(Y, { size: 10 })
|
|
545
|
+
] })
|
|
546
|
+
] }),
|
|
547
|
+
/* @__PURE__ */ m("strong", { "data-negative": e.hasValue && e.value < 0 || void 0, children: [
|
|
548
|
+
e.formattedValue,
|
|
549
|
+
!e.hasValue && /* @__PURE__ */ o("span", { className: "lens-sr-only", children: L })
|
|
550
|
+
] })
|
|
551
|
+
] }),
|
|
552
|
+
/* @__PURE__ */ o("div", { className: "lens-cascade-track", "aria-hidden": "true", children: /* @__PURE__ */ o("span", { style: { width: `${e.width}%` } }) })
|
|
553
|
+
]
|
|
554
|
+
}
|
|
555
|
+
)
|
|
556
|
+
] }, `${e.label}-${l}`);
|
|
557
|
+
})
|
|
558
|
+
}
|
|
559
|
+
) });
|
|
560
|
+
}
|
|
561
|
+
const Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
562
|
+
__proto__: null,
|
|
563
|
+
CascadePanel: Ct,
|
|
564
|
+
buildCascadeStages: q,
|
|
565
|
+
buildWaterfallModel: X,
|
|
566
|
+
unknownValueText: B,
|
|
567
|
+
waterfallAxisStep: K
|
|
568
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
569
|
+
export {
|
|
570
|
+
Et as C,
|
|
571
|
+
mt as W,
|
|
572
|
+
q as a,
|
|
573
|
+
X as b
|
|
574
|
+
};
|
|
@@ -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-DGLFNPl4.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-CIngYYVZ.js").then(({ getChartAdapter: r }) => r(h.current.kind))).then((r) => {
|
|
25
25
|
if (!(!e || !d.current)) {
|
|
26
26
|
c(void 0);
|
|
27
27
|
try {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as k, jsx as l, Fragment as Ee } from "react/jsx-runtime";
|
|
2
2
|
import { useState as re, useRef as $e, useCallback as Ae, useEffect as be, useMemo as K, memo as ft, useLayoutEffect as Nt, Fragment as Ct } from "react";
|
|
3
3
|
import { r as Lt, f as At } from "./keys-DenV5HsJ.js";
|
|
4
|
-
import { s as kt, o as _e, c as Rt, a as Kt, b as Tt, d as Ft, f as Et } from "./scales-
|
|
5
|
-
import { o as Mt, u as Re, a as vt, t as Bt, x as ct, y as lt, l as Ht, z as _t, A as zt, B as Ot, C as Ut, k as Vt, D as Dt, E as $t, F as dt, h as wt, s as yt, G as bt, H as Pt, I as qt, g as jt, J as Wt, K as Qt, P as Zt, W as Gt, L as H, M as gt, N as Jt, O as ze, Q as Yt, R as Xt, S as eo, T as to } from "./index-
|
|
4
|
+
import { s as kt, o as _e, c as Rt, a as Kt, b as Tt, d as Ft, f as Et } from "./scales-sHVLUC1f.js";
|
|
5
|
+
import { o as Mt, u as Re, a as vt, t as Bt, x as ct, y as lt, l as Ht, z as _t, A as zt, B as Ot, C as Ut, k as Vt, D as Dt, E as $t, F as dt, h as wt, s as yt, G as bt, H as Pt, I as qt, g as jt, J as Wt, K as Qt, P as Zt, W as Gt, L as H, M as gt, N as Jt, O as ze, Q as Yt, R as Xt, S as eo, T as to } from "./index-DGLFNPl4.js";
|
|
6
6
|
import "@iota-uz/sdk/client-host";
|
|
7
7
|
import { c as oo, C as no } from "./ChartDataEquivalent-BFDdHoQn.js";
|
|
8
|
-
import { C as ro } from "./ChartHost-
|
|
8
|
+
import { C as ro } from "./ChartHost-DohEf1-L.js";
|
|
9
9
|
const so = 0.02, io = to, ao = 4;
|
|
10
10
|
function co(e) {
|
|
11
11
|
const n = H(), t = H(e.encoding.label ? e.format[e.encoding.label] : void 0), r = H(e.encoding.value ? e.format[e.encoding.value] : void 0), c = H(e.encoding.previous ? e.format[e.encoding.previous] : void 0), a = H(e.encoding.lower ? e.format[e.encoding.lower] : void 0), m = H(e.encoding.q1 ? e.format[e.encoding.q1] : void 0), y = H(e.encoding.median ? e.format[e.encoding.median] : void 0), f = H(e.encoding.q3 ? e.format[e.encoding.q3] : void 0), b = H(e.encoding.upper ? e.format[e.encoding.upper] : void 0), v = H(e.encoding.id ? e.format[e.encoding.id] : void 0), T = H(e.encoding.series ? e.format[e.encoding.series] : void 0), h = H(e.encoding.category ? e.format[e.encoding.category] : void 0), u = H(e.encoding.cut ? e.format[e.encoding.cut] : void 0), N = H(e.encoding.cutLabel ? e.format[e.encoding.cutLabel] : void 0), se = H(e.encoding.final ? e.format[e.encoding.final] : void 0), V = gt(e.encoding.value ? e.format[e.encoding.value] : void 0), Y = gt(e.encoding.median ? e.format[e.encoding.median] : void 0), _ = K(() => {
|
|
@@ -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-DGLFNPl4.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-DGLFNPl4.js";
|
|
3
3
|
import "@iota-uz/sdk/client-host";
|
|
4
4
|
import "react";
|
|
5
5
|
function y(a) {
|