@slotted/react 0.1.0-beta.30 → 0.1.0-beta.32
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/{chart-CbOswR3s.js → chart-BXwHG9tX.js} +339 -339
- package/dist/chart.js +1 -1
- package/dist/dashboard-grid-YMoSW5C1.js +1178 -0
- package/dist/dashboard-grid.js +1 -1
- package/dist/docs/alert.json +1 -1
- package/dist/docs/alert.md +1 -1
- package/dist/docs/app-shell.json +1 -1
- package/dist/docs/app-shell.md +1 -1
- package/dist/docs/card.json +1 -0
- package/dist/docs/card.md +1 -1
- package/dist/docs/cascader.json +1 -0
- package/dist/docs/cascader.md +1 -1
- package/dist/docs/chart.examples.md +21 -1
- package/dist/docs/chart.json +36 -2
- package/dist/docs/chart.md +7 -3
- package/dist/docs/collapsible.json +1 -0
- package/dist/docs/collapsible.md +1 -1
- package/dist/docs/combobox.json +1 -0
- package/dist/docs/combobox.md +1 -1
- package/dist/docs/dashboard-grid.json +21 -0
- package/dist/docs/dashboard-grid.md +3 -0
- package/dist/docs/dialog.json +2 -0
- package/dist/docs/dialog.md +1 -1
- package/dist/docs/drawer.json +1 -0
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/entity-picker.json +1 -0
- package/dist/docs/entity-picker.md +1 -1
- package/dist/docs/form.json +1 -1
- package/dist/docs/form.md +1 -1
- package/dist/docs/import-export-center.json +1 -0
- package/dist/docs/import-export-center.md +1 -1
- package/dist/docs/index.md +1 -1
- package/dist/docs/list.examples.md +721 -0
- package/dist/docs/list.json +120 -32
- package/dist/docs/list.md +58 -140
- package/dist/docs/menu.json +1 -0
- package/dist/docs/menu.md +1 -1
- package/dist/docs/multi-select.json +1 -0
- package/dist/docs/multi-select.md +1 -1
- package/dist/docs/navigation-menu.json +1 -0
- package/dist/docs/navigation-menu.md +1 -1
- package/dist/docs/notification-center.json +1 -0
- package/dist/docs/notification-center.md +1 -1
- package/dist/docs/page-header.json +1 -1
- package/dist/docs/page-header.md +1 -1
- package/dist/docs/popover.json +1 -0
- package/dist/docs/popover.md +1 -1
- package/dist/docs/result-state.json +1 -0
- package/dist/docs/result-state.md +1 -1
- package/dist/docs/section.json +1 -1
- package/dist/docs/section.md +1 -1
- package/dist/docs/select.json +1 -0
- package/dist/docs/select.md +1 -1
- package/dist/docs/skills/compose-screen/SKILL.md +5 -0
- package/dist/docs/skills/review-screen/SKILL.md +23 -22
- package/dist/docs/table.json +7 -0
- package/dist/docs/table.md +1 -0
- package/dist/docs/toast.json +1 -0
- package/dist/docs/toast.md +1 -1
- package/dist/docs/tokens.md +8 -0
- package/dist/docs/tour.json +1 -0
- package/dist/docs/tour.md +1 -1
- package/dist/{import-export-center-Do0zrdSV.js → import-export-center-CV11dYvN.js} +1 -1
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +4 -4
- package/dist/styles/action-bar.css +1 -1
- package/dist/styles/action-sheet.css +1 -1
- package/dist/styles/alert.css +1 -1
- package/dist/styles/app-shell.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/cascader.css +1 -1
- package/dist/styles/chart.css +1 -1
- package/dist/styles/code-block.css +1 -1
- package/dist/styles/collapsible.css +1 -1
- package/dist/styles/color-picker.css +2 -2
- package/dist/styles/column-manager.css +3 -3
- package/dist/styles/combobox.css +1 -1
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/context-menu.css +1 -1
- package/dist/styles/dashboard-grid.css +6 -4
- package/dist/styles/data-grid.css +5 -5
- package/dist/styles/data-list.css +2 -2
- package/dist/styles/detail-panel.css +2 -2
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/entity-picker.css +2 -2
- package/dist/styles/event-calendar.css +3 -3
- package/dist/styles/filter-bar.css +5 -5
- package/dist/styles/form.css +1 -1
- package/dist/styles/hover-card.css +1 -1
- package/dist/styles/import-export-center.css +6 -6
- package/dist/styles/index.css +27 -27
- package/dist/styles/markdown.css +2 -2
- package/dist/styles/media-viewer.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/menubar.css +1 -1
- package/dist/styles/message.css +1 -1
- package/dist/styles/multi-select.css +1 -1
- package/dist/styles/navigation-menu.css +1 -1
- package/dist/styles/notification-center.css +1 -1
- package/dist/styles/page-header.css +1 -1
- package/dist/styles/popover.css +1 -1
- package/dist/styles/result-state.css +1 -1
- package/dist/styles/saved-views.css +2 -2
- package/dist/styles/scroll-area.css +1 -1
- package/dist/styles/section.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-navigation.css +2 -2
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/table.css +3 -3
- package/dist/styles/toast.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/top-navigation.css +2 -2
- package/dist/styles/tour.css +1 -1
- package/dist/styles/upload.css +1 -1
- package/dist/styles/wizard.css +2 -2
- package/dist/styles.css +1 -1
- package/dist/{table-Bm-PAtCn.js → table-CAhIaFxs.js} +259 -258
- package/dist/table.js +1 -1
- package/dist/types/chart/chart.d.ts +2 -1
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-grid.types.d.ts +5 -0
- package/dist/types/dashboard-grid/dashboard-grid.types.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-widget-help.d.ts +12 -0
- package/dist/types/dashboard-grid/dashboard-widget-help.d.ts.map +1 -0
- package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
- package/dist/types/dialog/dialog.types.d.ts +6 -2
- package/dist/types/dialog/dialog.types.d.ts.map +1 -1
- package/dist/types/drawer/drawer.types.d.ts +6 -2
- package/dist/types/drawer/drawer.types.d.ts.map +1 -1
- package/dist/types/table/table-parts.d.ts +1 -1
- package/dist/types/table/table-parts.d.ts.map +1 -1
- package/dist/types/table/table.types.d.ts +6 -0
- package/dist/types/table/table.types.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/dashboard-grid-De6al1Mj.js +0 -1149
|
@@ -11,12 +11,12 @@ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
|
11
11
|
import { collapseState as se } from "@slotted/core/overflow";
|
|
12
12
|
import { chartMessages as ce } from "@slotted/core/i18n";
|
|
13
13
|
import { getLiveAnnouncer as le } from "@slotted/core/live-announcer";
|
|
14
|
-
import { FULL_ZOOM as _, TOOLTIP_DOCK_WIDTH as ue, cachedChartTheme as de, categoryIndex as fe, chartKeyAction as pe, chartTable as me, chartToCsv as he, createChartModel as ge, createLatestAnnouncer as _e, defaultTrigger as ve, describeChart as ye, describePoint as be, describeZoom as xe, firstPoint as Se, isDrawn as Ce, isFullZoom as we, observeChartTheme as Te, placeLayer as Ee, placeTooltip as De,
|
|
15
|
-
import { mountChartEngine as
|
|
14
|
+
import { FULL_ZOOM as _, TOOLTIP_DOCK_WIDTH as ue, cachedChartTheme as de, categoryIndex as fe, chartKeyAction as pe, chartTable as me, chartToCsv as he, createChartModel as ge, createLatestAnnouncer as _e, defaultTrigger as ve, describeChart as ye, describePoint as be, describeZoom as xe, firstPoint as Se, isDrawn as Ce, isFullZoom as we, observeChartTheme as Te, placeLayer as Ee, placeTooltip as De, pointText as Oe, readChartTheme as ke, sameTheme as Ae, seriesOf as v, toggleHidden as je, tooltipContext as Me, trackModality as Ne } from "@slotted/core/chart";
|
|
15
|
+
import { mountChartEngine as Pe, preloadChartEngine as Fe } from "@slotted/core/chart-echarts";
|
|
16
16
|
//#region src/chart/chart-defaults.tsx
|
|
17
|
-
var
|
|
17
|
+
var y = l({});
|
|
18
18
|
function Ie() {
|
|
19
|
-
return ne(
|
|
19
|
+
return ne(y);
|
|
20
20
|
}
|
|
21
21
|
function Le({ children: e, ...t }) {
|
|
22
22
|
let n = Ie(), r = { ...n };
|
|
@@ -24,7 +24,7 @@ function Le({ children: e, ...t }) {
|
|
|
24
24
|
return r.tooltip = {
|
|
25
25
|
...n.tooltip,
|
|
26
26
|
...t.tooltip
|
|
27
|
-
}, /* @__PURE__ */ h(
|
|
27
|
+
}, /* @__PURE__ */ h(y.Provider, {
|
|
28
28
|
value: r,
|
|
29
29
|
children: e
|
|
30
30
|
});
|
|
@@ -32,18 +32,18 @@ function Le({ children: e, ...t }) {
|
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/chart/chart.tsx
|
|
34
34
|
var Re = Object.freeze([]), ze = (e, t) => e === t || e !== null && t !== null && e.series === t.series && e.key === t.key, Be = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Ve = (e, t) => e.start === t.start && e.end === t.end, He = (e) => typeof e == "object" && !!e && Object.getPrototypeOf(e) === Object.prototype;
|
|
35
|
-
function
|
|
35
|
+
function b(e, t) {
|
|
36
36
|
if (Object.is(e, t)) return !0;
|
|
37
|
-
if (Array.isArray(e)) return Array.isArray(t) && e.length === t.length && e.every((e, n) =>
|
|
37
|
+
if (Array.isArray(e)) return Array.isArray(t) && e.length === t.length && e.every((e, n) => b(e, t[n]));
|
|
38
38
|
if (!He(e) || !He(t)) return !1;
|
|
39
39
|
let n = Object.keys(e);
|
|
40
|
-
return n.length === Object.keys(t).length && n.every((n) => Object.hasOwn(t, n) &&
|
|
40
|
+
return n.length === Object.keys(t).length && n.every((n) => Object.hasOwn(t, n) && b(e[n], t[n]));
|
|
41
41
|
}
|
|
42
42
|
function Ue(e) {
|
|
43
43
|
let t = f(e);
|
|
44
|
-
return
|
|
44
|
+
return b(t.current, e) || (t.current = e), t.current;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function x(e, t, n, r) {
|
|
47
47
|
let [i, a] = p(t), o = e === void 0 ? i : e, s = f({
|
|
48
48
|
controlled: e,
|
|
49
49
|
value: o,
|
|
@@ -130,11 +130,11 @@ function Ye(e, t = !0) {
|
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function S() {
|
|
134
134
|
let e = f(null), t = f(null);
|
|
135
135
|
return d(() => {
|
|
136
136
|
if (!e.current) return;
|
|
137
|
-
let n =
|
|
137
|
+
let n = Ne(e.current);
|
|
138
138
|
return t.current = n, () => n.destroy();
|
|
139
139
|
}, []), [e, () => t.current?.read() ?? "programmatic"];
|
|
140
140
|
}
|
|
@@ -179,7 +179,7 @@ function Ze({ context: e, model: t, totalLabel: n, indicator: r }) {
|
|
|
179
179
|
e.total ? /* @__PURE__ */ g("div", {
|
|
180
180
|
"data-part": "tooltip-total",
|
|
181
181
|
"data-part-tooltip-total": "",
|
|
182
|
-
children: [/* @__PURE__ */ h("span", { children: n }), /* @__PURE__ */ h("span", {
|
|
182
|
+
children: [/* @__PURE__ */ h("span", { children: n ?? e.total.label }), /* @__PURE__ */ h("span", {
|
|
183
183
|
"data-part": "tooltip-value",
|
|
184
184
|
"data-part-tooltip-value": "",
|
|
185
185
|
children: e.total.formatted
|
|
@@ -187,45 +187,45 @@ function Ze({ context: e, model: t, totalLabel: n, indicator: r }) {
|
|
|
187
187
|
}) : null
|
|
188
188
|
] });
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
let { data: l, series: ne, x: Ee, y:
|
|
192
|
-
size:
|
|
193
|
-
variant:
|
|
194
|
-
palette:
|
|
195
|
-
toolbar:
|
|
196
|
-
renderer:
|
|
197
|
-
grid:
|
|
198
|
-
legendOverflow:
|
|
199
|
-
animate:
|
|
190
|
+
function C(c) {
|
|
191
|
+
let { data: l, series: ne, x: Ee, y: Ne, orientation: Fe, stackMode: y, annotations: Le, recordKey: He, locale: b, title: S, description: C, help: w, actions: it, messages: at, size: ot, variant: st, palette: ct, toolbar: lt, grid: ut, texture: dt, renderer: ft, sampling: pt, animate: mt, legend: ht, legendInteractive: gt, legendValues: _t, legendOverflow: vt, trigger: yt, tooltip: bt, zoomable: xt, selectable: St, loading: Ct, error: wt, onRetry: Tt, hidden: Et, defaultHidden: Dt, onHiddenChange: Ot, activePoint: kt, defaultActivePoint: At, onActivePointChange: jt, selection: Mt, defaultSelection: Nt, onSelectionChange: Pt, zoom: Ft, defaultZoom: It, onZoomChange: Lt, tableOpen: Rt, defaultTableOpen: zt, onTableOpenChange: Bt, fullscreen: Vt, defaultFullscreen: Ht, onFullscreenChange: Ut, renderTooltip: Wt, renderLegendItem: Gt, renderCenter: Kt, renderEmpty: qt, renderError: Jt, render: Yt, extendOption: Xt, handleRef: Zt, ref: Qt, ...$t } = c, T = Ie(), E = re(), D = t(ce, at), en = e(), O = {
|
|
192
|
+
size: ot ?? T.size ?? "md",
|
|
193
|
+
variant: st ?? T.variant ?? "plain",
|
|
194
|
+
palette: ct ?? T.palette ?? "categorical",
|
|
195
|
+
toolbar: lt ?? T.toolbar ?? "visible",
|
|
196
|
+
renderer: ft ?? T.renderer ?? "auto",
|
|
197
|
+
grid: ut ?? T.grid,
|
|
198
|
+
legendOverflow: vt ?? T.legendOverflow ?? "collapse",
|
|
199
|
+
animate: mt ?? T.animate ?? !0,
|
|
200
200
|
tooltip: {
|
|
201
|
-
...
|
|
202
|
-
...
|
|
201
|
+
...T.tooltip,
|
|
202
|
+
...bt
|
|
203
203
|
}
|
|
204
|
-
}, [
|
|
204
|
+
}, [tn, nn] = x(Et, Dt ?? Re, Ot, Be), [k, A] = x(kt, At ?? null, jt, ze), [j, rn] = x(Mt, Nt ?? null, Pt, ze), [M, N] = x(Ft, It ?? _, Lt, Ve), [P, an] = x(Rt, zt ?? !1, Bt, Object.is), [F, on] = x(Vt, Ht ?? !1, Ut, Object.is), sn = Ue(ne), cn = Ue(Ee), ln = Ue(Ne), un = Ue(Le), I = oe(() => ({
|
|
205
205
|
data: l,
|
|
206
|
-
series:
|
|
207
|
-
x:
|
|
208
|
-
y:
|
|
209
|
-
orientation:
|
|
210
|
-
stackMode:
|
|
211
|
-
annotations:
|
|
206
|
+
series: sn,
|
|
207
|
+
x: cn,
|
|
208
|
+
y: ln,
|
|
209
|
+
orientation: Fe,
|
|
210
|
+
stackMode: y,
|
|
211
|
+
annotations: un,
|
|
212
212
|
recordKey: He,
|
|
213
|
-
locale:
|
|
213
|
+
locale: b ?? en
|
|
214
214
|
}), [
|
|
215
215
|
l,
|
|
216
|
-
an,
|
|
217
|
-
on,
|
|
218
216
|
sn,
|
|
219
|
-
Pe,
|
|
220
|
-
Fe,
|
|
221
217
|
cn,
|
|
222
|
-
|
|
218
|
+
ln,
|
|
219
|
+
Fe,
|
|
223
220
|
y,
|
|
224
|
-
|
|
225
|
-
|
|
221
|
+
un,
|
|
222
|
+
He,
|
|
223
|
+
b,
|
|
224
|
+
en
|
|
225
|
+
]), dn = oe(() => {
|
|
226
226
|
try {
|
|
227
227
|
return {
|
|
228
|
-
model: ge(
|
|
228
|
+
model: ge(I, { hidden: tn }),
|
|
229
229
|
failure: null
|
|
230
230
|
};
|
|
231
231
|
} catch (e) {
|
|
@@ -234,11 +234,11 @@ function S(c) {
|
|
|
234
234
|
failure: e
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
}, [
|
|
237
|
+
}, [I, tn]), L = dn.model, [fn, pn] = p(null), R = !!wt || dn.failure !== null || fn !== null, z = !!Ct, B = !(!L || z || R || L.empty), V = !(!L || z || R || L.empty === "no-data"), H = L ? yt ?? ve(L) : "none", U = f(null), W = f(null), mn = f(null), hn = f(null), gn = f(null), G = f(null), [_n, vn] = p(null), [K, yn] = p(We), bn = oe(() => _e((e) => le().announce(e)), []), xn = (e) => le().announce(e);
|
|
238
238
|
d(() => {
|
|
239
|
-
let e =
|
|
239
|
+
let e = W.current;
|
|
240
240
|
if (!e) return;
|
|
241
|
-
let t = e.ownerDocument.defaultView, n = (e) =>
|
|
241
|
+
let t = e.ownerDocument.defaultView, n = (e) => vn((t) => Ae(t, e) ? t : e), r = () => n(ke(e)), i = de(e), a = 0;
|
|
242
242
|
i ? n(i) : t && (a = t.requestAnimationFrame(() => {
|
|
243
243
|
a = 0, r();
|
|
244
244
|
}));
|
|
@@ -247,68 +247,68 @@ function S(c) {
|
|
|
247
247
|
o(), a && t?.cancelAnimationFrame(a);
|
|
248
248
|
};
|
|
249
249
|
}, [
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
O.palette,
|
|
251
|
+
O.variant,
|
|
252
|
+
F
|
|
253
253
|
]);
|
|
254
|
-
let
|
|
254
|
+
let q = f({
|
|
255
255
|
onPointer: () => {},
|
|
256
256
|
onPress: () => {},
|
|
257
257
|
onZoom: () => {},
|
|
258
258
|
onRender: () => {}
|
|
259
259
|
});
|
|
260
260
|
d(() => {
|
|
261
|
-
let e =
|
|
261
|
+
let e = mn.current;
|
|
262
262
|
if (!e) return;
|
|
263
|
-
let t =
|
|
264
|
-
onPointer: (e, t) =>
|
|
265
|
-
onPress: (e, t) =>
|
|
266
|
-
onZoom: (e, t) =>
|
|
267
|
-
onRender: () =>
|
|
268
|
-
onError: (e) =>
|
|
263
|
+
let t = Pe(e, {
|
|
264
|
+
onPointer: (e, t) => q.current.onPointer(e, t),
|
|
265
|
+
onPress: (e, t) => q.current.onPress(e, t),
|
|
266
|
+
onZoom: (e, t) => q.current.onZoom(e, t),
|
|
267
|
+
onRender: () => q.current.onRender(),
|
|
268
|
+
onError: (e) => pn(e)
|
|
269
269
|
});
|
|
270
|
-
return
|
|
271
|
-
t.dispose(),
|
|
270
|
+
return G.current = t, () => {
|
|
271
|
+
t.dispose(), G.current = null;
|
|
272
272
|
};
|
|
273
273
|
}, []), d(() => {
|
|
274
|
-
|
|
275
|
-
model:
|
|
276
|
-
theme:
|
|
277
|
-
selection:
|
|
278
|
-
zoom:
|
|
279
|
-
zoomable: !!
|
|
280
|
-
grid:
|
|
281
|
-
texture: !!
|
|
282
|
-
renderer:
|
|
283
|
-
sampling:
|
|
284
|
-
trigger:
|
|
285
|
-
animate:
|
|
286
|
-
extendOption:
|
|
274
|
+
G.current && _n && L && B && G.current.update({
|
|
275
|
+
model: L,
|
|
276
|
+
theme: _n,
|
|
277
|
+
selection: j,
|
|
278
|
+
zoom: M,
|
|
279
|
+
zoomable: !!xt,
|
|
280
|
+
grid: O.grid,
|
|
281
|
+
texture: !!dt,
|
|
282
|
+
renderer: O.renderer,
|
|
283
|
+
sampling: pt,
|
|
284
|
+
trigger: H,
|
|
285
|
+
animate: O.animate,
|
|
286
|
+
extendOption: Xt
|
|
287
287
|
});
|
|
288
288
|
}, [
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
289
|
+
L,
|
|
290
|
+
_n,
|
|
291
|
+
B,
|
|
292
|
+
j,
|
|
292
293
|
M,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
Jt
|
|
294
|
+
xt,
|
|
295
|
+
O.grid,
|
|
296
|
+
dt,
|
|
297
|
+
O.renderer,
|
|
298
|
+
pt,
|
|
299
|
+
H,
|
|
300
|
+
O.animate,
|
|
301
|
+
Xt
|
|
302
302
|
]);
|
|
303
|
-
let
|
|
304
|
-
let e =
|
|
305
|
-
if (!e || !t || !
|
|
306
|
-
|
|
303
|
+
let Sn = () => {
|
|
304
|
+
let e = G.current, t = W.current;
|
|
305
|
+
if (!e || !t || !L || !B || P) {
|
|
306
|
+
yn(We);
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
309
309
|
let n = [];
|
|
310
|
-
if (
|
|
311
|
-
let t = v(
|
|
310
|
+
if (j && Ce(L, j) && L.shape === "cartesian") {
|
|
311
|
+
let t = v(L, j.series), r = e.locate(j);
|
|
312
312
|
t && t.kind !== "bar" && r && n.push({
|
|
313
313
|
key: `selected-${t.id}`,
|
|
314
314
|
color: t.color,
|
|
@@ -317,10 +317,10 @@ function S(c) {
|
|
|
317
317
|
current: !1
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
|
-
|
|
321
|
-
let r =
|
|
322
|
-
if (!
|
|
323
|
-
|
|
320
|
+
L.shape === "pie" && e.emphasize(k && Ce(L, k) ? k.key : null);
|
|
321
|
+
let r = k && Ce(L, k) ? e.locate(k) : null;
|
|
322
|
+
if (!k || !r) {
|
|
323
|
+
yn({
|
|
324
324
|
crosshair: null,
|
|
325
325
|
markers: n,
|
|
326
326
|
tooltip: null,
|
|
@@ -328,32 +328,33 @@ function S(c) {
|
|
|
328
328
|
});
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
|
-
let i =
|
|
331
|
+
let i = L.series.some((e) => e.visible && e.kind === "bar"), a = L.shape === "cartesian" && H === "axis" ? {
|
|
332
332
|
...r,
|
|
333
|
-
isBand: i &&
|
|
333
|
+
isBand: i && L.xType === "category"
|
|
334
334
|
} : null;
|
|
335
|
-
if (
|
|
336
|
-
let t = fe(
|
|
335
|
+
if (L.shape === "cartesian") {
|
|
336
|
+
let t = fe(L, k.key), r = H === "axis" ? L.series.filter((e) => e.visible && e.kind !== "bar" && e.values[t] !== null) : [v(L, k.series)].filter((e) => !!(e && e.kind !== "bar"));
|
|
337
337
|
for (let t of r) {
|
|
338
338
|
let r = e.locate({
|
|
339
339
|
series: t.id,
|
|
340
|
-
key:
|
|
340
|
+
key: k.key
|
|
341
341
|
});
|
|
342
342
|
r && n.push({
|
|
343
343
|
key: t.id,
|
|
344
344
|
color: t.color,
|
|
345
345
|
at: r,
|
|
346
346
|
selected: !1,
|
|
347
|
-
current: t.id ===
|
|
347
|
+
current: t.id === k.series
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
let o =
|
|
352
|
-
trigger:
|
|
353
|
-
sort:
|
|
354
|
-
total:
|
|
351
|
+
let o = H === "none" ? null : Me(L, k, {
|
|
352
|
+
trigger: H,
|
|
353
|
+
sort: O.tooltip.sort,
|
|
354
|
+
total: O.tooltip.total,
|
|
355
|
+
totalLabel: D("total")
|
|
355
356
|
});
|
|
356
|
-
|
|
357
|
+
yn({
|
|
357
358
|
crosshair: a,
|
|
358
359
|
markers: n,
|
|
359
360
|
tooltip: o,
|
|
@@ -361,26 +362,26 @@ function S(c) {
|
|
|
361
362
|
});
|
|
362
363
|
};
|
|
363
364
|
ae(() => {
|
|
364
|
-
|
|
365
|
+
Sn();
|
|
365
366
|
}, [
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
367
|
+
k,
|
|
368
|
+
j,
|
|
369
|
+
L,
|
|
370
|
+
B,
|
|
371
|
+
P,
|
|
372
|
+
H
|
|
372
373
|
]);
|
|
373
|
-
let
|
|
374
|
+
let J = f(!1);
|
|
374
375
|
ae(() => {
|
|
375
|
-
let e =
|
|
376
|
+
let e = hn.current, t = W.current;
|
|
376
377
|
if (!e || !t) return;
|
|
377
|
-
if (!
|
|
378
|
-
|
|
378
|
+
if (!K.tooltip || !k) {
|
|
379
|
+
J.current = !1;
|
|
379
380
|
return;
|
|
380
381
|
}
|
|
381
|
-
let n =
|
|
382
|
+
let n = G.current?.locate(k);
|
|
382
383
|
if (!n) return;
|
|
383
|
-
|
|
384
|
+
J.current || (e.style.transition = "none");
|
|
384
385
|
let r = De({
|
|
385
386
|
anchor: {
|
|
386
387
|
x: n.x,
|
|
@@ -394,105 +395,105 @@ function S(c) {
|
|
|
394
395
|
width: t.clientWidth,
|
|
395
396
|
height: t.clientHeight
|
|
396
397
|
},
|
|
397
|
-
dir:
|
|
398
|
+
dir: U.current && getComputedStyle(U.current).direction === "rtl" ? "rtl" : "ltr"
|
|
398
399
|
});
|
|
399
|
-
e.style.setProperty("--slotted-chart-x", `${r.x}px`), e.style.setProperty("--slotted-chart-y", `${r.y}px`),
|
|
400
|
-
}, [
|
|
400
|
+
e.style.setProperty("--slotted-chart-x", `${r.x}px`), e.style.setProperty("--slotted-chart-y", `${r.y}px`), J.current || requestAnimationFrame(() => e.style.transition = ""), J.current = !0;
|
|
401
|
+
}, [K, k]), q.current = {
|
|
401
402
|
onPointer: (e, t) => {
|
|
402
|
-
e ?
|
|
403
|
+
e ? A(e, "pointer", t) : document.activeElement !== W.current && A(null, "pointer", t);
|
|
403
404
|
},
|
|
404
405
|
onPress: (e, t) => {
|
|
405
|
-
|
|
406
|
+
St && e && rn(ze(j, e) ? null : e, "pointer", t);
|
|
406
407
|
},
|
|
407
|
-
onZoom: (e, t) =>
|
|
408
|
-
onRender: () =>
|
|
408
|
+
onZoom: (e, t) => N(e, "pointer", t),
|
|
409
|
+
onRender: () => Sn()
|
|
409
410
|
};
|
|
410
|
-
let
|
|
411
|
-
if (!
|
|
412
|
-
let t = pe(
|
|
413
|
-
active:
|
|
414
|
-
selection:
|
|
415
|
-
zoom:
|
|
416
|
-
zoomable: !!
|
|
417
|
-
selectable: !!
|
|
411
|
+
let Cn = (e) => {
|
|
412
|
+
if (!L || !B || P) return;
|
|
413
|
+
let t = pe(L, {
|
|
414
|
+
active: k,
|
|
415
|
+
selection: j,
|
|
416
|
+
zoom: M,
|
|
417
|
+
zoomable: !!xt,
|
|
418
|
+
selectable: !!St
|
|
418
419
|
}, e.key);
|
|
419
420
|
if (t !== null) {
|
|
420
421
|
e.preventDefault();
|
|
421
|
-
for (let n of t) n.type === "active" ? (
|
|
422
|
+
for (let n of t) n.type === "active" ? (A(n.point, n.reason, e.nativeEvent), n.point ? bn.say(be(L, n.point, j, D)) : bn.cancel()) : n.type === "select" ? (rn(n.point, "keyboard", e.nativeEvent), n.point && bn.say(be(L, n.point, n.point, D))) : (N(n.zoom, n.reason, e.nativeEvent), xn(xe(L, n.zoom, D)));
|
|
422
423
|
}
|
|
423
|
-
},
|
|
424
|
-
if (!
|
|
425
|
-
let t = Se(
|
|
426
|
-
t && (
|
|
427
|
-
},
|
|
428
|
-
let n = !
|
|
429
|
-
|
|
430
|
-
let r =
|
|
431
|
-
r && (n &&
|
|
424
|
+
}, wn = te((e) => e === null ? void 0 : s(e).destroy, []), Tn = (e) => {
|
|
425
|
+
if (!L || !B || P || k || !Ge(e.currentTarget)) return;
|
|
426
|
+
let t = Se(L);
|
|
427
|
+
t && (A(t, "keyboard", e.nativeEvent), bn.say(be(L, t, j, D)));
|
|
428
|
+
}, En = (e, t) => {
|
|
429
|
+
let n = !F;
|
|
430
|
+
on(n, e, t);
|
|
431
|
+
let r = U.current;
|
|
432
|
+
r && (n && Vt === void 0 && document.fullscreenEnabled && e !== "programmatic" && r.requestFullscreen?.().catch(() => {}), !n && document.fullscreenElement === r && document.exitFullscreen().catch(() => {}));
|
|
432
433
|
};
|
|
433
434
|
d(() => {
|
|
434
|
-
let e =
|
|
435
|
+
let e = U.current;
|
|
435
436
|
if (!e) return;
|
|
436
437
|
let t = !1, n = () => {
|
|
437
|
-
document.fullscreenElement === e ? t = !0 : t && (t = !1,
|
|
438
|
+
document.fullscreenElement === e ? t = !0 : t && (t = !1, Dn.current(!1, "escape"));
|
|
438
439
|
};
|
|
439
440
|
return document.addEventListener("fullscreenchange", n), () => document.removeEventListener("fullscreenchange", n);
|
|
440
441
|
}, []);
|
|
441
|
-
let
|
|
442
|
-
|
|
443
|
-
let e =
|
|
444
|
-
!
|
|
445
|
-
}, [
|
|
446
|
-
let
|
|
447
|
-
|
|
448
|
-
}, [Y,
|
|
449
|
-
let e =
|
|
450
|
-
if (!e || !
|
|
451
|
-
if (
|
|
452
|
-
|
|
442
|
+
let Dn = f(on);
|
|
443
|
+
Dn.current = on, d(() => {
|
|
444
|
+
let e = U.current;
|
|
445
|
+
!F && e && document.fullscreenElement === e && document.exitFullscreen().catch(() => {});
|
|
446
|
+
}, [F]);
|
|
447
|
+
let On = (e) => {
|
|
448
|
+
$t.onKeyDown?.(e), !e.defaultPrevented && e.key === "Escape" && F && (e.preventDefault(), En("escape", e.nativeEvent));
|
|
449
|
+
}, [Y, kn] = p([]), An = f(/* @__PURE__ */ new Map()), [jn, Mn] = p(null), Nn = gt ?? !0, X = L?.legend ?? [], Pn = () => {
|
|
450
|
+
let e = gn.current;
|
|
451
|
+
if (!e || !L) return;
|
|
452
|
+
if (O.legendOverflow === "wrap") {
|
|
453
|
+
kn((e) => e.length ? [] : e);
|
|
453
454
|
return;
|
|
454
455
|
}
|
|
455
456
|
let t = [...e.querySelectorAll(":scope > [data-part=\"legend-item\"]")];
|
|
456
|
-
for (let e of t) e.hidden ||
|
|
457
|
+
for (let e of t) e.hidden || An.current.set(e.dataset.key ?? "", e.getBoundingClientRect().width);
|
|
457
458
|
let n = Number.parseFloat(getComputedStyle(e).columnGap) || 0, r = e.querySelector(":scope > [data-part=\"legend-more\"]"), i = r && !r.hidden ? r.getBoundingClientRect().width : 40, a = se({
|
|
458
459
|
units: X.map((e) => ({
|
|
459
|
-
size:
|
|
460
|
+
size: An.current.get(e.key) ?? 0,
|
|
460
461
|
collapsible: !0
|
|
461
462
|
})),
|
|
462
463
|
available: e.clientWidth,
|
|
463
464
|
gap: n,
|
|
464
465
|
triggerSize: i
|
|
465
466
|
});
|
|
466
|
-
|
|
467
|
+
kn((e) => e.length === a.collapsed.length && e.every((e, t) => e === a.collapsed[t]) ? e : a.collapsed);
|
|
467
468
|
};
|
|
468
469
|
ae(() => {
|
|
469
|
-
|
|
470
|
+
Pn();
|
|
470
471
|
}, [
|
|
471
472
|
X,
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
473
|
+
O.legendOverflow,
|
|
474
|
+
_t,
|
|
475
|
+
k
|
|
475
476
|
]), d(() => {
|
|
476
|
-
let e =
|
|
477
|
+
let e = gn.current;
|
|
477
478
|
if (!e || typeof ResizeObserver > "u") return;
|
|
478
|
-
let t = new ResizeObserver(() =>
|
|
479
|
+
let t = new ResizeObserver(() => Fn.current());
|
|
479
480
|
return t.observe(e), () => t.disconnect();
|
|
480
481
|
}, []);
|
|
481
|
-
let
|
|
482
|
-
|
|
483
|
-
let
|
|
484
|
-
let i = X.map((e) => e.key), a =
|
|
485
|
-
|
|
486
|
-
}, Z =
|
|
487
|
-
if (!
|
|
488
|
-
let t =
|
|
482
|
+
let Fn = f(Pn);
|
|
483
|
+
Fn.current = Pn;
|
|
484
|
+
let In = (e, t, n, r) => {
|
|
485
|
+
let i = X.map((e) => e.key), a = je(i, tn, e.key, t);
|
|
486
|
+
Mn(e.key), nn(a, n, r), xn(D(a.includes(e.key) ? "hidden" : "shown", { series: e.label }));
|
|
487
|
+
}, Z = k && L && Ce(L, k) ? k.key : null, Ln = (e) => {
|
|
488
|
+
if (!L) return "";
|
|
489
|
+
let t = L.shape === "pie" ? L.series[0] : v(L, e.key);
|
|
489
490
|
if (!t) return "";
|
|
490
|
-
let n =
|
|
491
|
-
return
|
|
492
|
-
},
|
|
493
|
-
let r =
|
|
491
|
+
let n = L.shape === "pie" ? fe(L, e.key) : Z ? fe(L, Z) : Ke(t.values);
|
|
492
|
+
return n >= 0 ? Oe(t, n) : "";
|
|
493
|
+
}, Rn = Ye("start"), zn = X.filter((e, t) => !Y.includes(t)).map((e) => e.key), Bn = jn && zn.includes(jn) ? jn : zn[0] ?? null, Vn = (e, t, n) => {
|
|
494
|
+
let r = L?.shape === "pie" ? L.series[0] : L ? v(L, e.key) : void 0, i = L?.shape === "pie" ? e.key === Z : k?.series === e.key && Z !== null, o = !n && Y.includes(t), s = /* @__PURE__ */ g(m, { children: [
|
|
494
495
|
/* @__PURE__ */ h("span", {
|
|
495
|
-
"data-kind": e.kind === "area" || e.kind === "bar" || e.kind === "pie" ? "bar" : e.kind,
|
|
496
|
+
"data-kind": e.kind === "area" || e.kind === "bar" || e.kind === "pie" || e.kind === "range" ? "bar" : e.kind,
|
|
496
497
|
"data-part": "legend-marker",
|
|
497
498
|
"data-part-legend-marker": "",
|
|
498
499
|
...r && r.stroke !== "solid" ? { "data-stroke": r.stroke } : {}
|
|
@@ -503,10 +504,10 @@ function S(c) {
|
|
|
503
504
|
title: e.label,
|
|
504
505
|
children: e.label
|
|
505
506
|
}),
|
|
506
|
-
|
|
507
|
+
_t ? /* @__PURE__ */ h("span", {
|
|
507
508
|
"data-part": "legend-value",
|
|
508
509
|
"data-part-legend-value": "",
|
|
509
|
-
children:
|
|
510
|
+
children: Ln(e)
|
|
510
511
|
}) : null
|
|
511
512
|
] }), c = {
|
|
512
513
|
"data-part": "legend-item",
|
|
@@ -515,149 +516,149 @@ function S(c) {
|
|
|
515
516
|
...qe(e.color),
|
|
516
517
|
...i ? { "data-current": "" } : {},
|
|
517
518
|
hidden: o,
|
|
518
|
-
onPointerEnter: () => e.visible &&
|
|
519
|
-
onPointerLeave: () =>
|
|
520
|
-
}, l =
|
|
519
|
+
onPointerEnter: () => e.visible && G.current?.emphasize(e.key),
|
|
520
|
+
onPointerLeave: () => G.current?.emphasize(null)
|
|
521
|
+
}, l = Nn ? /* @__PURE__ */ u(Qe, {
|
|
521
522
|
...c,
|
|
522
523
|
entry: e,
|
|
523
|
-
focused: n ||
|
|
524
|
+
focused: n || Bn === e.key,
|
|
524
525
|
key: `${n ? "layer" : "row"}-${e.key}`,
|
|
525
|
-
onActivate: (t, n, r) =>
|
|
526
|
+
onActivate: (t, n, r) => In(e, t, n, r),
|
|
526
527
|
onFocusEntry: () => {
|
|
527
|
-
n ||
|
|
528
|
+
n || Mn(e.key), e.visible && G.current?.emphasize(e.key);
|
|
528
529
|
},
|
|
529
|
-
onBlurEntry: () =>
|
|
530
|
+
onBlurEntry: () => G.current?.emphasize(null)
|
|
530
531
|
}, s) : /* @__PURE__ */ u("span", {
|
|
531
532
|
...c,
|
|
532
533
|
key: `${n ? "layer" : "row"}-${e.key}`,
|
|
533
534
|
role: "listitem"
|
|
534
535
|
}, s);
|
|
535
|
-
return
|
|
536
|
-
},
|
|
536
|
+
return Gt ? /* @__PURE__ */ h(ee, { children: Gt(e, c, l) }, `${n ? "layer" : "row"}-${e.key}`) : l;
|
|
537
|
+
}, Hn = (e) => {
|
|
537
538
|
let t = e.target;
|
|
538
539
|
if (t.closest("[data-part=\"menu\"]")) return;
|
|
539
540
|
let n = [...e.currentTarget.querySelectorAll(":scope > button:not([hidden])")], r = n.indexOf(t);
|
|
540
541
|
if (r === -1) return;
|
|
541
|
-
let i =
|
|
542
|
-
a && (o = n[(r + a + n.length) % n.length]), e.key === "Home" && (o = n[0]), e.key === "End" && (o = n[n.length - 1]), o && (e.preventDefault(),
|
|
543
|
-
}, Q = Ye("end"),
|
|
542
|
+
let i = U.current ? getComputedStyle(U.current).direction === "rtl" : !1, a = e.key === "ArrowRight" ? i ? -1 : 1 : e.key === "ArrowLeft" ? i ? 1 : -1 : 0, o;
|
|
543
|
+
a && (o = n[(r + a + n.length) % n.length]), e.key === "Home" && (o = n[0]), e.key === "End" && (o = n[n.length - 1]), o && (e.preventDefault(), Mn(o.dataset.key ?? "__more"), o.focus());
|
|
544
|
+
}, Q = Ye("end"), Un = Ye("start", !1), Wn = (e, t) => {
|
|
544
545
|
let n = document.createElement("a");
|
|
545
546
|
n.href = t, n.download = e, document.body.append(n), n.click(), n.remove();
|
|
546
|
-
},
|
|
547
|
-
ie(
|
|
548
|
-
focus: () =>
|
|
549
|
-
resetZoom: () =>
|
|
550
|
-
toDataURL: () =>
|
|
551
|
-
toCsv: () =>
|
|
547
|
+
}, Gn = typeof S == "string" ? S : "chart";
|
|
548
|
+
ie(Zt, () => ({
|
|
549
|
+
focus: () => W.current?.focus(),
|
|
550
|
+
resetZoom: () => N(_, "programmatic"),
|
|
551
|
+
toDataURL: () => G.current?.toDataURL() ?? null,
|
|
552
|
+
toCsv: () => L ? he(L, D) : ""
|
|
552
553
|
}), [
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
554
|
+
L,
|
|
555
|
+
D,
|
|
556
|
+
N
|
|
556
557
|
]);
|
|
557
|
-
let
|
|
558
|
-
|
|
559
|
-
},
|
|
558
|
+
let Kn = z ? D("loading") : R ? D("error") : L ? ye(L, D) : "", qn = `${E}-title`, Jn = `${E}-description`, Yn = `${E}-summary`, Xn = I.series.some((e) => e.kind === "pie") ? "pie" : I.series.every((e) => e.kind === "line" || e.kind === "area" || e.kind === "range") ? "line" : "bar", $ = P && V && L ? me(L, D) : null, Zn = () => {
|
|
559
|
+
pn(null), Tt?.();
|
|
560
|
+
}, Qn = S !== void 0 || C !== void 0 || it !== void 0 || O.toolbar !== "none" ? /* @__PURE__ */ g("figcaption", {
|
|
560
561
|
"data-part": "header",
|
|
561
562
|
"data-part-header": "",
|
|
562
563
|
children: [
|
|
563
|
-
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("div", { children: [
|
|
564
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("div", { children: [S === void 0 ? null : /* @__PURE__ */ h("span", {
|
|
564
565
|
"data-part": "title",
|
|
565
566
|
"data-part-title": "",
|
|
566
|
-
id:
|
|
567
|
-
children:
|
|
567
|
+
id: qn,
|
|
568
|
+
children: S
|
|
568
569
|
}), w === void 0 ? null : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
|
|
569
|
-
...o(
|
|
570
|
-
"aria-controls": `${
|
|
571
|
-
"aria-label":
|
|
570
|
+
...o(Un.controlProps, "part", "help"),
|
|
571
|
+
"aria-controls": `${E}-help`,
|
|
572
|
+
"aria-label": D("help"),
|
|
572
573
|
type: "button",
|
|
573
574
|
children: /* @__PURE__ */ h(r, { children: /* @__PURE__ */ h(n, { name: "circle-info" }) })
|
|
574
575
|
}), /* @__PURE__ */ h("div", {
|
|
575
|
-
...o(
|
|
576
|
-
id: `${
|
|
576
|
+
...o(Un.layerProps, "part", "help-content"),
|
|
577
|
+
id: `${E}-help`,
|
|
577
578
|
role: "note",
|
|
578
579
|
children: w
|
|
579
|
-
})] })] }),
|
|
580
|
+
})] })] }), C === void 0 ? null : /* @__PURE__ */ h("span", {
|
|
580
581
|
"data-part": "description",
|
|
581
582
|
"data-part-description": "",
|
|
582
|
-
id:
|
|
583
|
-
children:
|
|
583
|
+
id: Jn,
|
|
584
|
+
children: C
|
|
584
585
|
})] }),
|
|
585
|
-
|
|
586
|
+
it === void 0 ? null : /* @__PURE__ */ h("div", {
|
|
586
587
|
"data-part": "actions",
|
|
587
588
|
"data-part-actions": "",
|
|
588
|
-
children:
|
|
589
|
+
children: it
|
|
589
590
|
}),
|
|
590
|
-
|
|
591
|
-
"aria-hidden": !
|
|
592
|
-
"aria-label":
|
|
591
|
+
O.toolbar === "none" ? null : /* @__PURE__ */ g("div", {
|
|
592
|
+
"aria-hidden": !V || void 0,
|
|
593
|
+
"aria-label": V ? D("toolbar") : void 0,
|
|
593
594
|
"data-part": "toolbar",
|
|
594
595
|
"data-part-toolbar": "",
|
|
595
|
-
"data-waiting":
|
|
596
|
-
inert: !
|
|
597
|
-
role:
|
|
596
|
+
"data-waiting": V ? void 0 : "",
|
|
597
|
+
inert: !V,
|
|
598
|
+
role: V ? "toolbar" : void 0,
|
|
598
599
|
children: [
|
|
599
|
-
|
|
600
|
-
label:
|
|
600
|
+
L && xt && !we(M) && L.shape === "cartesian" ? /* @__PURE__ */ h($e, {
|
|
601
|
+
label: D("resetZoom"),
|
|
601
602
|
onPress: (e, t) => {
|
|
602
|
-
|
|
603
|
+
N(_, "clear", t), xn(xe(L, _, D)), W.current?.focus();
|
|
603
604
|
},
|
|
604
605
|
glyph: "rotate-ccw",
|
|
605
606
|
part: "zoom-reset"
|
|
606
607
|
}) : null,
|
|
607
608
|
/* @__PURE__ */ h($e, {
|
|
608
|
-
label:
|
|
609
|
-
onPress: (e, t) =>
|
|
609
|
+
label: D("tableView"),
|
|
610
|
+
onPress: (e, t) => an(!P, e, t),
|
|
610
611
|
glyph: "file-spreadsheet",
|
|
611
612
|
part: "view-toggle",
|
|
612
|
-
pressed:
|
|
613
|
+
pressed: P
|
|
613
614
|
}),
|
|
614
615
|
/* @__PURE__ */ h($e, {
|
|
615
|
-
label:
|
|
616
|
-
glyph:
|
|
617
|
-
onPress: (e, t) =>
|
|
616
|
+
label: D(F ? "exitFullscreen" : "fullscreen"),
|
|
617
|
+
glyph: F ? "minimize" : "maximize",
|
|
618
|
+
onPress: (e, t) => En(e, t),
|
|
618
619
|
part: "fullscreen-toggle"
|
|
619
620
|
}),
|
|
620
621
|
/* @__PURE__ */ h("button", {
|
|
621
622
|
...o(Q.controlProps, "part", "menu-trigger"),
|
|
622
623
|
"aria-haspopup": "menu",
|
|
623
|
-
"aria-label":
|
|
624
|
-
title:
|
|
624
|
+
"aria-label": D("more"),
|
|
625
|
+
title: D("more"),
|
|
625
626
|
type: "button",
|
|
626
627
|
children: /* @__PURE__ */ h(r, { children: /* @__PURE__ */ h(n, { name: "ellipsis" }) })
|
|
627
628
|
}),
|
|
628
629
|
/* @__PURE__ */ g("div", {
|
|
629
630
|
...o(Q.layerProps, "part", "menu"),
|
|
630
|
-
"aria-label":
|
|
631
|
+
"aria-label": D("more"),
|
|
631
632
|
role: "menu",
|
|
632
633
|
children: [
|
|
633
|
-
/* @__PURE__ */ h(
|
|
634
|
+
/* @__PURE__ */ h(et, {
|
|
634
635
|
action: "view",
|
|
635
|
-
label:
|
|
636
|
+
label: D("tableView"),
|
|
636
637
|
onPress: (e, t) => {
|
|
637
|
-
Q.close(),
|
|
638
|
+
Q.close(), an(!P, e, t);
|
|
638
639
|
}
|
|
639
640
|
}),
|
|
640
|
-
/* @__PURE__ */ h(
|
|
641
|
+
/* @__PURE__ */ h(et, {
|
|
641
642
|
action: "fullscreen",
|
|
642
|
-
label:
|
|
643
|
+
label: D(F ? "exitFullscreen" : "fullscreen"),
|
|
643
644
|
onPress: (e, t) => {
|
|
644
|
-
Q.close(),
|
|
645
|
+
Q.close(), En(e, t);
|
|
645
646
|
}
|
|
646
647
|
}),
|
|
647
|
-
/* @__PURE__ */ h(
|
|
648
|
+
/* @__PURE__ */ h(et, {
|
|
648
649
|
action: "csv",
|
|
649
|
-
label:
|
|
650
|
+
label: D("downloadCsv"),
|
|
650
651
|
onPress: () => {
|
|
651
|
-
Q.close(),
|
|
652
|
+
Q.close(), L && Wn(`${Gn}.csv`, `data:text/csv;charset=utf-8,${encodeURIComponent(he(L, D))}`);
|
|
652
653
|
}
|
|
653
654
|
}),
|
|
654
|
-
/* @__PURE__ */ h(
|
|
655
|
+
/* @__PURE__ */ h(et, {
|
|
655
656
|
action: "image",
|
|
656
|
-
label:
|
|
657
|
+
label: D("downloadImage"),
|
|
657
658
|
onPress: () => {
|
|
658
659
|
Q.close();
|
|
659
|
-
let e =
|
|
660
|
-
e &&
|
|
660
|
+
let e = G.current?.toDataURL();
|
|
661
|
+
e && Wn(`${Gn}.${e.startsWith("data:image/svg") ? "svg" : "png"}`, e);
|
|
661
662
|
}
|
|
662
663
|
})
|
|
663
664
|
]
|
|
@@ -665,94 +666,94 @@ function S(c) {
|
|
|
665
666
|
]
|
|
666
667
|
})
|
|
667
668
|
]
|
|
668
|
-
}) : null,
|
|
669
|
-
"aria-label":
|
|
669
|
+
}) : null, $n = ht === !1 ? null : /* @__PURE__ */ h("div", {
|
|
670
|
+
"aria-label": z && (!L || L.shape === "pie") ? void 0 : D("legend"),
|
|
670
671
|
"data-part": "legend",
|
|
671
672
|
"data-part-legend": "",
|
|
672
|
-
onKeyDown:
|
|
673
|
-
ref:
|
|
674
|
-
role:
|
|
675
|
-
children:
|
|
676
|
-
/* @__PURE__ */ h(
|
|
677
|
-
/* @__PURE__ */ h(
|
|
678
|
-
/* @__PURE__ */ h(
|
|
673
|
+
onKeyDown: Hn,
|
|
674
|
+
ref: gn,
|
|
675
|
+
role: z && (!L || L.shape === "pie") ? void 0 : Nn ? "toolbar" : "list",
|
|
676
|
+
children: z && (!L || L.shape === "pie") ? /* @__PURE__ */ g(m, { children: [
|
|
677
|
+
/* @__PURE__ */ h(tt, {}),
|
|
678
|
+
/* @__PURE__ */ h(tt, {}),
|
|
679
|
+
/* @__PURE__ */ h(tt, {})
|
|
679
680
|
] }) : /* @__PURE__ */ g(m, { children: [
|
|
680
|
-
X.map((e, t) =>
|
|
681
|
+
X.map((e, t) => Vn(e, t, !1)),
|
|
681
682
|
/* @__PURE__ */ h("button", {
|
|
682
|
-
...o(
|
|
683
|
+
...o(Rn.controlProps, "part", "legend-more"),
|
|
683
684
|
"aria-haspopup": "true",
|
|
684
|
-
"aria-label":
|
|
685
|
+
"aria-label": D("legendMore", { series: new Intl.ListFormat(b ?? en, { type: "unit" }).format(Y.map((e) => X[e]?.label ?? "")) }),
|
|
685
686
|
hidden: Y.length === 0,
|
|
686
|
-
tabIndex:
|
|
687
|
+
tabIndex: Bn === null ? 0 : -1,
|
|
687
688
|
type: "button",
|
|
688
|
-
children:
|
|
689
|
+
children: D("moreSeries", { count: Y.length })
|
|
689
690
|
}),
|
|
690
691
|
/* @__PURE__ */ h("div", {
|
|
691
|
-
...o(
|
|
692
|
-
"aria-label":
|
|
692
|
+
...o(Rn.layerProps, "part", "menu"),
|
|
693
|
+
"aria-label": D("legend"),
|
|
693
694
|
role: "group",
|
|
694
695
|
children: Y.map((e) => {
|
|
695
696
|
let t = X[e];
|
|
696
|
-
return t ?
|
|
697
|
+
return t ? Vn(t, e, !0) : null;
|
|
697
698
|
})
|
|
698
699
|
})
|
|
699
700
|
] })
|
|
700
|
-
}),
|
|
701
|
-
|
|
701
|
+
}), er = i({
|
|
702
|
+
...$t,
|
|
702
703
|
"data-ui": "chart",
|
|
703
704
|
"data-part": "root",
|
|
704
|
-
"data-size":
|
|
705
|
-
"data-variant":
|
|
706
|
-
"data-palette":
|
|
707
|
-
"data-toolbar":
|
|
708
|
-
"data-legend-overflow":
|
|
709
|
-
...
|
|
710
|
-
...
|
|
711
|
-
onKeyDown:
|
|
705
|
+
"data-size": O.size,
|
|
706
|
+
"data-variant": O.variant,
|
|
707
|
+
"data-palette": O.palette,
|
|
708
|
+
"data-toolbar": O.toolbar,
|
|
709
|
+
"data-legend-overflow": O.legendOverflow,
|
|
710
|
+
...z ? { "data-loading": "" } : {},
|
|
711
|
+
...F ? { "data-fullscreen": "" } : {},
|
|
712
|
+
onKeyDown: On,
|
|
712
713
|
ref: (e) => {
|
|
713
|
-
|
|
714
|
+
U.current = e, Xe(Qt, e);
|
|
714
715
|
},
|
|
715
716
|
children: /* @__PURE__ */ g(m, { children: [
|
|
716
|
-
Zn,
|
|
717
717
|
Qn,
|
|
718
|
+
$n,
|
|
718
719
|
/* @__PURE__ */ g("div", {
|
|
719
|
-
"aria-busy":
|
|
720
|
-
"aria-describedby":
|
|
721
|
-
"aria-label":
|
|
722
|
-
"aria-labelledby":
|
|
723
|
-
"aria-roledescription":
|
|
720
|
+
"aria-busy": z || void 0,
|
|
721
|
+
"aria-describedby": C === void 0 ? Yn : `${Jn} ${Yn}`,
|
|
722
|
+
"aria-label": S === void 0 ? $t["aria-label"] ?? D("roledescription") : void 0,
|
|
723
|
+
"aria-labelledby": S === void 0 ? void 0 : qn,
|
|
724
|
+
"aria-roledescription": D("roledescription"),
|
|
724
725
|
"data-part": "plot",
|
|
725
726
|
"data-part-plot": "",
|
|
726
|
-
onBlur: (e) =>
|
|
727
|
-
onFocus:
|
|
728
|
-
onKeyDown:
|
|
729
|
-
ref:
|
|
727
|
+
onBlur: (e) => A(null, "blur", e.nativeEvent),
|
|
728
|
+
onFocus: Tn,
|
|
729
|
+
onKeyDown: Cn,
|
|
730
|
+
ref: W,
|
|
730
731
|
role: "group",
|
|
731
732
|
tabIndex: 0,
|
|
732
733
|
children: [
|
|
733
734
|
/* @__PURE__ */ h("div", {
|
|
734
735
|
"data-part": "crosshair",
|
|
735
736
|
"data-part-crosshair": "",
|
|
736
|
-
hidden: !
|
|
737
|
-
...
|
|
738
|
-
"data-orientation":
|
|
739
|
-
style:
|
|
740
|
-
"--slotted-chart-x":
|
|
741
|
-
"--slotted-chart-y":
|
|
742
|
-
"--slotted-chart-band-start":
|
|
743
|
-
"--slotted-chart-band-size":
|
|
744
|
-
"--slotted-chart-frame-start":
|
|
745
|
-
"--slotted-chart-frame-size":
|
|
737
|
+
hidden: !K.crosshair,
|
|
738
|
+
...K.crosshair?.isBand ? { "data-band": "" } : {},
|
|
739
|
+
"data-orientation": L?.orientation ?? "vertical",
|
|
740
|
+
style: K.crosshair ? Je({
|
|
741
|
+
"--slotted-chart-x": K.crosshair.x,
|
|
742
|
+
"--slotted-chart-y": K.crosshair.y,
|
|
743
|
+
"--slotted-chart-band-start": K.crosshair.band.start,
|
|
744
|
+
"--slotted-chart-band-size": K.crosshair.band.size,
|
|
745
|
+
"--slotted-chart-frame-start": K.crosshair.frame.start,
|
|
746
|
+
"--slotted-chart-frame-size": K.crosshair.frame.size
|
|
746
747
|
}) : void 0
|
|
747
748
|
}),
|
|
748
749
|
/* @__PURE__ */ h("div", {
|
|
749
750
|
"aria-hidden": "true",
|
|
750
751
|
"data-part": "canvas",
|
|
751
752
|
"data-part-canvas": "",
|
|
752
|
-
hidden: !
|
|
753
|
-
ref:
|
|
753
|
+
hidden: !B,
|
|
754
|
+
ref: mn
|
|
754
755
|
}),
|
|
755
|
-
|
|
756
|
+
K.markers.map((e) => /* @__PURE__ */ h("div", {
|
|
756
757
|
"aria-hidden": "true",
|
|
757
758
|
"data-part": "marker",
|
|
758
759
|
"data-part-marker": "",
|
|
@@ -768,49 +769,48 @@ function S(c) {
|
|
|
768
769
|
"aria-hidden": "true",
|
|
769
770
|
"data-part": "tooltip",
|
|
770
771
|
"data-part-tooltip": "",
|
|
771
|
-
ref:
|
|
772
|
-
...
|
|
773
|
-
...
|
|
774
|
-
children:
|
|
775
|
-
context:
|
|
776
|
-
indicator:
|
|
777
|
-
model:
|
|
778
|
-
totalLabel: O("total")
|
|
772
|
+
ref: hn,
|
|
773
|
+
...K.tooltip ? { "data-open": "" } : {},
|
|
774
|
+
...K.docked ? { "data-docked": "" } : {},
|
|
775
|
+
children: K.tooltip && L ? Wt?.(K.tooltip, L) ?? /* @__PURE__ */ h(Ze, {
|
|
776
|
+
context: K.tooltip,
|
|
777
|
+
indicator: O.tooltip.indicator,
|
|
778
|
+
model: L
|
|
779
779
|
}) : null
|
|
780
780
|
}),
|
|
781
|
-
|
|
781
|
+
B && L?.shape === "pie" && (L.series[0]?.innerRadius ?? 0) > 0 ? /* @__PURE__ */ h("div", {
|
|
782
782
|
"aria-hidden": "true",
|
|
783
783
|
"data-part": "center",
|
|
784
784
|
"data-part-center": "",
|
|
785
|
-
children:
|
|
785
|
+
children: Kt?.(L) ?? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
|
|
786
786
|
"data-part": "center-value",
|
|
787
787
|
"data-part-center-value": "",
|
|
788
|
-
children:
|
|
788
|
+
children: L.series[0].format(L.total)
|
|
789
789
|
}), /* @__PURE__ */ h("span", {
|
|
790
790
|
"data-part": "center-label",
|
|
791
791
|
"data-part-center-label": "",
|
|
792
|
-
children:
|
|
792
|
+
children: D("total")
|
|
793
793
|
})] })
|
|
794
794
|
}) : null,
|
|
795
795
|
$ ? /* @__PURE__ */ h("div", {
|
|
796
|
-
"aria-labelledby":
|
|
796
|
+
"aria-labelledby": S === void 0 ? void 0 : qn,
|
|
797
797
|
"data-part": "table-region",
|
|
798
798
|
"data-part-table-region": "",
|
|
799
|
-
ref:
|
|
799
|
+
ref: wn,
|
|
800
800
|
role: "region",
|
|
801
801
|
tabIndex: 0,
|
|
802
802
|
children: /* @__PURE__ */ g("table", {
|
|
803
803
|
"data-part": "table",
|
|
804
804
|
"data-part-table": "",
|
|
805
805
|
children: [
|
|
806
|
-
/* @__PURE__ */ h("caption", { children: $.omitted ? typeof
|
|
807
|
-
title:
|
|
806
|
+
/* @__PURE__ */ h("caption", { children: $.omitted ? typeof S == "string" ? D("truncatedCaption", {
|
|
807
|
+
title: S,
|
|
808
808
|
shown: $.rows.length,
|
|
809
809
|
count: $.rows.length + $.omitted
|
|
810
|
-
}) :
|
|
810
|
+
}) : D("truncated", {
|
|
811
811
|
shown: $.rows.length,
|
|
812
812
|
count: $.rows.length + $.omitted
|
|
813
|
-
}) : typeof
|
|
813
|
+
}) : typeof S == "string" ? S : null }),
|
|
814
814
|
/* @__PURE__ */ h("thead", { children: /* @__PURE__ */ h("tr", { children: $.columns.map((e, t) => /* @__PURE__ */ u("th", {
|
|
815
815
|
...t > 0 ? { "data-numeric": "" } : {},
|
|
816
816
|
key: e.key,
|
|
@@ -829,41 +829,41 @@ function S(c) {
|
|
|
829
829
|
]
|
|
830
830
|
})
|
|
831
831
|
}) : null,
|
|
832
|
-
|
|
833
|
-
!
|
|
832
|
+
z ? /* @__PURE__ */ h(nt, { kind: Xn }) : null,
|
|
833
|
+
!z && R ? /* @__PURE__ */ h("div", {
|
|
834
834
|
"data-part": "error",
|
|
835
835
|
"data-part-error": "",
|
|
836
|
-
children:
|
|
837
|
-
action:
|
|
838
|
-
onAction:
|
|
836
|
+
children: Jt?.() ?? /* @__PURE__ */ h(rt, {
|
|
837
|
+
action: Tt || fn ? D("retry") : void 0,
|
|
838
|
+
onAction: Zn,
|
|
839
839
|
status: "error",
|
|
840
|
-
text:
|
|
840
|
+
text: D("error")
|
|
841
841
|
})
|
|
842
842
|
}) : null,
|
|
843
|
-
!
|
|
843
|
+
!z && !R && L?.empty ? /* @__PURE__ */ h("div", {
|
|
844
844
|
"data-part": "empty",
|
|
845
845
|
"data-part-empty": "",
|
|
846
|
-
children:
|
|
847
|
-
action:
|
|
848
|
-
onAction: (e) =>
|
|
849
|
-
status:
|
|
850
|
-
text:
|
|
846
|
+
children: qt?.(L.empty) ?? /* @__PURE__ */ h(rt, {
|
|
847
|
+
action: L.empty === "all-hidden" ? D("showAll") : void 0,
|
|
848
|
+
onAction: (e) => nn(Re, "pointer", e),
|
|
849
|
+
status: L.empty === "all-hidden" ? "no-results" : "empty",
|
|
850
|
+
text: L.empty === "all-hidden" ? D("allHidden") : D("noData")
|
|
851
851
|
})
|
|
852
852
|
}) : null,
|
|
853
853
|
/* @__PURE__ */ h("p", {
|
|
854
854
|
"data-part": "summary",
|
|
855
855
|
"data-part-summary": "",
|
|
856
|
-
id:
|
|
857
|
-
children:
|
|
856
|
+
id: Yn,
|
|
857
|
+
children: Kn
|
|
858
858
|
})
|
|
859
859
|
]
|
|
860
860
|
})
|
|
861
861
|
] })
|
|
862
862
|
});
|
|
863
|
-
return
|
|
863
|
+
return Yt ? Yt(er) : /* @__PURE__ */ h("figure", { ...er });
|
|
864
864
|
}
|
|
865
865
|
function Qe({ children: e, entry: t, focused: n, onActivate: r, onFocusEntry: i, onBlurEntry: a, ...o }) {
|
|
866
|
-
let [s, c] =
|
|
866
|
+
let [s, c] = S();
|
|
867
867
|
return /* @__PURE__ */ h("button", {
|
|
868
868
|
...o,
|
|
869
869
|
"aria-pressed": t.visible,
|
|
@@ -881,7 +881,7 @@ function Qe({ children: e, entry: t, focused: n, onActivate: r, onFocusEntry: i,
|
|
|
881
881
|
});
|
|
882
882
|
}
|
|
883
883
|
function $e({ glyph: e, label: t, onPress: i, part: o, pressed: s }) {
|
|
884
|
-
let [c, ee] =
|
|
884
|
+
let [c, ee] = S();
|
|
885
885
|
return /* @__PURE__ */ h("button", {
|
|
886
886
|
"aria-label": t,
|
|
887
887
|
...s === void 0 ? {} : {
|
|
@@ -897,8 +897,8 @@ function $e({ glyph: e, label: t, onPress: i, part: o, pressed: s }) {
|
|
|
897
897
|
children: /* @__PURE__ */ h(r, { children: /* @__PURE__ */ h(n, { name: e }) })
|
|
898
898
|
});
|
|
899
899
|
}
|
|
900
|
-
function
|
|
901
|
-
let [r, i] =
|
|
900
|
+
function et({ action: e, label: t, onPress: n }) {
|
|
901
|
+
let [r, i] = S();
|
|
902
902
|
return /* @__PURE__ */ h("button", {
|
|
903
903
|
"data-action": e,
|
|
904
904
|
"data-part": "menu-item",
|
|
@@ -923,10 +923,10 @@ function w({ shape: e = "block" }) {
|
|
|
923
923
|
"data-ui-skeleton": ""
|
|
924
924
|
});
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function tt() {
|
|
927
927
|
return /* @__PURE__ */ h(w, {});
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function nt({ kind: e }) {
|
|
930
930
|
let t = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ h(w, {}, t));
|
|
931
931
|
return /* @__PURE__ */ h("div", {
|
|
932
932
|
"aria-hidden": "true",
|
|
@@ -957,7 +957,7 @@ function tt({ kind: e }) {
|
|
|
957
957
|
})
|
|
958
958
|
});
|
|
959
959
|
}
|
|
960
|
-
function
|
|
960
|
+
function rt({ action: e, onAction: t, status: n, text: r }) {
|
|
961
961
|
return /* @__PURE__ */ g("section", {
|
|
962
962
|
"data-align": "center",
|
|
963
963
|
"data-live": "polite",
|
|
@@ -1007,4 +1007,4 @@ function nt({ action: e, onAction: t, status: n, text: r }) {
|
|
|
1007
1007
|
});
|
|
1008
1008
|
}
|
|
1009
1009
|
//#endregion
|
|
1010
|
-
export { Ie as a, Le as i,
|
|
1010
|
+
export { Ie as a, Le as i, C as n, Ze as r, Fe as t };
|