@slotted/react 0.1.0-beta.45 → 0.1.0-beta.46
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-C4uPgUW8.js → chart-sewqbbm-.js} +385 -383
- package/dist/chart.js +1 -1
- package/dist/dashboard-grid-CBqqgiKr.js +1238 -0
- package/dist/dashboard-grid.js +1 -1
- package/dist/{detail-panel-Czs05E_D.js → detail-panel-WW2-BwEP.js} +2 -2
- package/dist/detail-panel.js +1 -1
- package/dist/docs/chart.json +15 -1
- package/dist/docs/chart.md +4 -2
- package/dist/docs/dashboard-grid.json +9 -2
- package/dist/docs/dashboard-grid.md +2 -1
- package/dist/docs/field.json +1 -1
- package/dist/docs/field.md +1 -1
- package/dist/docs/guidelines/index.md +1 -1
- package/dist/docs/guidelines/overviews.md +1 -1
- package/dist/docs/guidelines/record-pages.md +3 -3
- package/dist/docs/menu.json +1 -1
- package/dist/docs/menu.md +1 -1
- package/dist/docs/page-header.examples.md +120 -76
- package/dist/docs/page-header.json +57 -5
- package/dist/docs/page-header.md +14 -1
- package/dist/docs/popover.json +1 -1
- package/dist/docs/popover.md +1 -1
- package/dist/docs/select.json +1 -1
- package/dist/docs/select.md +1 -1
- package/dist/docs/stat-card.examples.md +121 -0
- package/dist/docs/stat-card.json +205 -0
- package/dist/docs/stat-card.md +51 -1
- package/dist/index.js +64 -64
- package/dist/page-header-nMgl8RZu.js +395 -0
- package/dist/page-header.js +2 -2
- package/dist/page.js +1 -1
- package/dist/stat-card-Bt92l0qa.js +344 -0
- package/dist/stat-card.js +2 -2
- package/dist/styles/chart.css +1 -1
- package/dist/styles/dashboard-grid.css +1 -1
- package/dist/styles/detail-panel.css +1 -1
- package/dist/styles/index.css +4 -4
- package/dist/styles/page-header.css +1 -1
- package/dist/styles/stat-card.css +7 -1
- package/dist/styles.css +1 -1
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/chart/chart.types.d.ts +8 -0
- package/dist/types/chart/chart.types.d.ts.map +1 -1
- package/dist/types/chart/index.d.ts +1 -1
- package/dist/types/chart/index.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-grid-context.d.ts +6 -0
- package/dist/types/dashboard-grid/dashboard-grid-context.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-grid.d.ts +1 -1
- package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-grid.types.d.ts +8 -0
- package/dist/types/dashboard-grid/dashboard-grid.types.d.ts.map +1 -1
- package/dist/types/dashboard-grid/index.d.ts +1 -1
- package/dist/types/dashboard-grid/index.d.ts.map +1 -1
- package/dist/types/dashboard-grid/use-edit-status.d.ts +8 -0
- package/dist/types/dashboard-grid/use-edit-status.d.ts.map +1 -0
- package/dist/types/page-header/index.d.ts +2 -1
- package/dist/types/page-header/index.d.ts.map +1 -1
- package/dist/types/page-header/page-header-notice.d.ts +10 -0
- package/dist/types/page-header/page-header-notice.d.ts.map +1 -0
- package/dist/types/page-header/page-header.types.d.ts +17 -0
- package/dist/types/page-header/page-header.types.d.ts.map +1 -1
- package/dist/types/select/use-select-sheet.d.ts +2 -2
- package/dist/types/stat-card/delta-run.d.ts +15 -0
- package/dist/types/stat-card/delta-run.d.ts.map +1 -0
- package/dist/types/stat-card/index.d.ts +3 -1
- package/dist/types/stat-card/index.d.ts.map +1 -1
- package/dist/types/stat-card/stat-card-delta.d.ts.map +1 -1
- package/dist/types/stat-card/stat-card-group.d.ts +10 -0
- package/dist/types/stat-card/stat-card-group.d.ts.map +1 -0
- package/dist/types/stat-card/stat-card.types.d.ts +38 -0
- package/dist/types/stat-card/stat-card.types.d.ts.map +1 -1
- package/dist/types/stat-card/stat-delta.d.ts +9 -0
- package/dist/types/stat-card/stat-delta.d.ts.map +1 -0
- package/package.json +6 -6
- package/dist/dashboard-grid-_3H4G0dP.js +0 -1207
- package/dist/page-header-DK896DGD.js +0 -367
- package/dist/stat-card-D6NMjkZM.js +0 -295
- /package/dist/{page-DT8L0iRT.js → use-page-size-class-Cv1DbtKx.js} +0 -0
|
@@ -6,55 +6,55 @@ import { a as i, c as a, d as o, f as s, i as c, l as ee, p as te, r as ne, u as
|
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { keyedProps as ie, selectorKeyProps as ae, withSelectorKey as l } from "@slotted/core/selector-key";
|
|
8
8
|
import { createFocusOrigin as oe } from "@slotted/core/focus";
|
|
9
|
-
import { createControllable as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { Fragment as
|
|
12
|
-
import { collapseState as
|
|
13
|
-
import { chartMessages as
|
|
14
|
-
import { getLiveAnnouncer as
|
|
15
|
-
import { FULL_ZOOM as
|
|
16
|
-
import { mountChartEngine as
|
|
9
|
+
import { createControllable as u } from "@slotted/core/state";
|
|
10
|
+
import { Fragment as se, createContext as d, createElement as f, useCallback as ce, useContext as p, useEffect as m, useId as le, useImperativeHandle as ue, useLayoutEffect as de, useMemo as fe, useRef as h, useState as g } from "react";
|
|
11
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
12
|
+
import { collapseState as pe } from "@slotted/core/overflow";
|
|
13
|
+
import { chartMessages as me } from "@slotted/core/i18n";
|
|
14
|
+
import { getLiveAnnouncer as he } from "@slotted/core/live-announcer";
|
|
15
|
+
import { FULL_ZOOM as b, TOOLTIP_DOCK_WIDTH as ge, cachedChartTheme as _e, categoryIndex as ve, chartKeyAction as ye, chartTable as be, chartToCsv as xe, createChartModel as Se, createLatestAnnouncer as Ce, createRangeDrag as we, defaultTrigger as Te, describeChart as Ee, describePoint as De, describeRange as Oe, describeZoom as ke, firstPoint as Ae, isDrawn as x, isFullZoom as je, observeChartTheme as Me, placeLayer as Ne, placeTooltip as Pe, pointText as Fe, readChartTheme as Ie, sameTheme as Le, seriesOf as S, skeletonAxes as Re, toggleHidden as ze, tooltipContext as Be, trackModality as Ve } from "@slotted/core/chart";
|
|
16
|
+
import { mountChartEngine as He, preloadChartEngine as Ue } from "@slotted/core/chart-echarts";
|
|
17
17
|
//#region src/chart/chart-defaults.tsx
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
return
|
|
18
|
+
var We = d({});
|
|
19
|
+
function Ge() {
|
|
20
|
+
return p(We);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
let n =
|
|
22
|
+
function Ke({ children: e, ...t }) {
|
|
23
|
+
let n = Ge(), r = { ...n };
|
|
24
24
|
for (let [e, n] of Object.entries(t)) n !== void 0 && (r[e] = n);
|
|
25
25
|
return r.tooltip = {
|
|
26
26
|
...n.tooltip,
|
|
27
27
|
...t.tooltip
|
|
28
|
-
}, /* @__PURE__ */
|
|
28
|
+
}, /* @__PURE__ */ v(We.Provider, {
|
|
29
29
|
value: r,
|
|
30
30
|
children: e
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region src/chart/chart-help.tsx
|
|
35
|
-
function
|
|
36
|
-
return /* @__PURE__ */
|
|
35
|
+
function qe({ children: e, label: t, title: i }) {
|
|
36
|
+
return /* @__PURE__ */ y(s, {
|
|
37
37
|
align: "start",
|
|
38
38
|
presentation: "auto",
|
|
39
39
|
side: "bottom",
|
|
40
40
|
size: "sm",
|
|
41
|
-
children: [/* @__PURE__ */
|
|
41
|
+
children: [/* @__PURE__ */ v(o, { render: (e) => /* @__PURE__ */ v("button", {
|
|
42
42
|
...l(e, "part", "help"),
|
|
43
43
|
"aria-label": t,
|
|
44
44
|
type: "button",
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
}) }), /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ v(r, { children: /* @__PURE__ */ v(n, { name: "circle-info" }) })
|
|
46
|
+
}) }), /* @__PURE__ */ v(ee, { children: /* @__PURE__ */ v(Je, {
|
|
47
47
|
label: t,
|
|
48
48
|
title: i,
|
|
49
49
|
children: e
|
|
50
50
|
}) })]
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Je({ children: e, label: t, title: n }) {
|
|
54
54
|
let { sheet: r } = te(), o = r && n !== void 0;
|
|
55
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ y(i, {
|
|
56
56
|
...o ? {} : { "aria-label": t },
|
|
57
|
-
children: [o && /* @__PURE__ */
|
|
57
|
+
children: [o && /* @__PURE__ */ y(a, { children: [/* @__PURE__ */ v(re, { children: n }), /* @__PURE__ */ v(c, {})] }), /* @__PURE__ */ v(ne, { children: /* @__PURE__ */ v("div", {
|
|
58
58
|
"data-part": "help-content",
|
|
59
59
|
"data-part-help-content": "",
|
|
60
60
|
children: e
|
|
@@ -63,20 +63,20 @@ function Ye({ children: e, label: t, title: n }) {
|
|
|
63
63
|
}
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/chart/chart.tsx
|
|
66
|
-
var
|
|
67
|
-
function
|
|
66
|
+
var Ye = Object.freeze([]), Xe = (e, t) => e === t || e !== null && t !== null && e.series === t.series && e.key === t.key, Ze = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Qe = (e, t) => e.start === t.start && e.end === t.end, $e = (e, t) => e === t || e !== null && t !== null && e.from === t.from && e.to === t.to, et = (e) => typeof e == "object" && !!e && Object.getPrototypeOf(e) === Object.prototype;
|
|
67
|
+
function tt(e, t) {
|
|
68
68
|
if (Object.is(e, t)) return !0;
|
|
69
|
-
if (Array.isArray(e)) return Array.isArray(t) && e.length === t.length && e.every((e, n) =>
|
|
70
|
-
if (!
|
|
69
|
+
if (Array.isArray(e)) return Array.isArray(t) && e.length === t.length && e.every((e, n) => tt(e, t[n]));
|
|
70
|
+
if (!et(e) || !et(t)) return !1;
|
|
71
71
|
let n = Object.keys(e);
|
|
72
|
-
return n.length === Object.keys(t).length && n.every((n) => Object.hasOwn(t, n) &&
|
|
72
|
+
return n.length === Object.keys(t).length && n.every((n) => Object.hasOwn(t, n) && tt(e[n], t[n]));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
let t =
|
|
76
|
-
return
|
|
74
|
+
function nt(e) {
|
|
75
|
+
let t = h(e);
|
|
76
|
+
return tt(t.current, e) || (t.current = e), t.current;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
let [i, a] =
|
|
78
|
+
function C(e, t, n, r) {
|
|
79
|
+
let [i, a] = g(t), o = e === void 0 ? i : e, s = h({
|
|
80
80
|
controlled: e,
|
|
81
81
|
value: o,
|
|
82
82
|
onChange: n
|
|
@@ -85,9 +85,9 @@ function S(e, t, n, r) {
|
|
|
85
85
|
controlled: e,
|
|
86
86
|
value: o,
|
|
87
87
|
onChange: n
|
|
88
|
-
}, [o,
|
|
88
|
+
}, [o, ce((e, t, n) => {
|
|
89
89
|
let i = s.current;
|
|
90
|
-
|
|
90
|
+
u({
|
|
91
91
|
controlled: i.controlled,
|
|
92
92
|
initial: i.value,
|
|
93
93
|
equals: r,
|
|
@@ -95,37 +95,37 @@ function S(e, t, n, r) {
|
|
|
95
95
|
}).request(e, t, n) && a(e);
|
|
96
96
|
}, [r])];
|
|
97
97
|
}
|
|
98
|
-
var
|
|
98
|
+
var rt = {
|
|
99
99
|
crosshair: null,
|
|
100
100
|
markers: [],
|
|
101
101
|
tooltip: null,
|
|
102
102
|
docked: !1
|
|
103
103
|
};
|
|
104
|
-
function
|
|
104
|
+
function it(e) {
|
|
105
105
|
try {
|
|
106
106
|
return e.matches(":focus-visible");
|
|
107
107
|
} catch {
|
|
108
108
|
return !1;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function at(e) {
|
|
112
112
|
for (let t = e.length - 1; t >= 0; --t) if (e[t] !== null) return t;
|
|
113
113
|
return -1;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function ot(e) {
|
|
116
116
|
return e.type === "slot" ? { "data-slot": String(e.slot) } : e.type === "tone" ? { "data-tone": e.tone } : { "data-overflow": "" };
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function st(e) {
|
|
119
119
|
return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, `${t}px`]));
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
let t =
|
|
121
|
+
function ct(e) {
|
|
122
|
+
let t = h(null), n = h(null), [r, i] = g(!1), a = (r) => {
|
|
123
123
|
let a = r.newState === "open";
|
|
124
124
|
i(a);
|
|
125
125
|
let o = n.current, s = t.current;
|
|
126
126
|
if (o && s) {
|
|
127
127
|
if (a) {
|
|
128
|
-
let t = o.getBoundingClientRect(), n =
|
|
128
|
+
let t = o.getBoundingClientRect(), n = Ne({
|
|
129
129
|
anchor: s.getBoundingClientRect(),
|
|
130
130
|
size: {
|
|
131
131
|
width: t.width,
|
|
@@ -162,11 +162,11 @@ function lt(e) {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
let e =
|
|
167
|
-
return
|
|
165
|
+
function lt() {
|
|
166
|
+
let e = h(null), t = h(null);
|
|
167
|
+
return m(() => {
|
|
168
168
|
if (!e.current) return;
|
|
169
|
-
let n =
|
|
169
|
+
let n = Ve(e.current);
|
|
170
170
|
return t.current = n, () => n.destroy();
|
|
171
171
|
}, []), [e, () => t.current?.read() ?? "programmatic"];
|
|
172
172
|
}
|
|
@@ -174,44 +174,44 @@ function ut(e, t) {
|
|
|
174
174
|
typeof e == "function" ? e(t) : e && typeof e == "object" && (e.current = t);
|
|
175
175
|
}
|
|
176
176
|
function dt({ context: e, model: t, totalLabel: n, indicator: r }) {
|
|
177
|
-
return /* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
177
|
+
return /* @__PURE__ */ y(_, { children: [
|
|
178
|
+
/* @__PURE__ */ v("div", {
|
|
179
179
|
"data-part": "tooltip-title",
|
|
180
180
|
"data-part-tooltip-title": "",
|
|
181
181
|
children: e.title
|
|
182
182
|
}),
|
|
183
|
-
e.notes.map((e) => /* @__PURE__ */
|
|
183
|
+
e.notes.map((e) => /* @__PURE__ */ v("div", {
|
|
184
184
|
"data-part": "tooltip-note",
|
|
185
185
|
"data-part-tooltip-note": "",
|
|
186
186
|
children: e
|
|
187
187
|
}, e)),
|
|
188
188
|
e.items.map((n) => {
|
|
189
|
-
let i =
|
|
190
|
-
return /* @__PURE__ */
|
|
189
|
+
let i = S(t, n.series), a = r === "line" || n.kind === "line" ? "line" : n.kind === "scatter" ? "scatter" : "bar";
|
|
190
|
+
return /* @__PURE__ */ f("div", {
|
|
191
191
|
"data-part": "tooltip-item",
|
|
192
192
|
"data-part-tooltip-item": "",
|
|
193
193
|
...e.items.length > 1 && n.current ? { "data-current": "" } : {},
|
|
194
|
-
...
|
|
194
|
+
...ot(n.color),
|
|
195
195
|
key: `${n.series}-${n.label}`
|
|
196
|
-
}, r === "none" ? null : /* @__PURE__ */
|
|
196
|
+
}, r === "none" ? null : /* @__PURE__ */ v("span", {
|
|
197
197
|
"data-kind": a,
|
|
198
198
|
"data-part": "tooltip-marker",
|
|
199
199
|
"data-part-tooltip-marker": "",
|
|
200
200
|
...i && i.stroke !== "solid" ? { "data-stroke": i.stroke } : {}
|
|
201
|
-
}), /* @__PURE__ */
|
|
201
|
+
}), /* @__PURE__ */ v("span", {
|
|
202
202
|
"data-part": "tooltip-label",
|
|
203
203
|
"data-part-tooltip-label": "",
|
|
204
204
|
children: n.label
|
|
205
|
-
}), /* @__PURE__ */
|
|
205
|
+
}), /* @__PURE__ */ v("span", {
|
|
206
206
|
"data-part": "tooltip-value",
|
|
207
207
|
"data-part-tooltip-value": "",
|
|
208
208
|
children: n.share ? `${n.share} · ${n.formatted}` : n.formatted
|
|
209
209
|
}));
|
|
210
210
|
}),
|
|
211
|
-
e.total ? /* @__PURE__ */
|
|
211
|
+
e.total ? /* @__PURE__ */ y("div", {
|
|
212
212
|
"data-part": "tooltip-total",
|
|
213
213
|
"data-part-tooltip-total": "",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ v("span", { children: n ?? e.total.label }), /* @__PURE__ */ v("span", {
|
|
215
215
|
"data-part": "tooltip-value",
|
|
216
216
|
"data-part-tooltip-value": "",
|
|
217
217
|
children: e.total.formatted
|
|
@@ -220,44 +220,45 @@ function dt({ context: e, model: t, totalLabel: n, indicator: r }) {
|
|
|
220
220
|
] });
|
|
221
221
|
}
|
|
222
222
|
function ft(i) {
|
|
223
|
-
let { data: a, series: o, x: s, y: c, orientation: ee, stackMode: te, annotations: ne, recordKey: re, locale:
|
|
224
|
-
size:
|
|
225
|
-
variant:
|
|
226
|
-
palette:
|
|
227
|
-
toolbar: tt ??
|
|
228
|
-
renderer:
|
|
229
|
-
grid:
|
|
230
|
-
legendOverflow:
|
|
231
|
-
|
|
223
|
+
let { data: a, series: o, x: s, y: c, orientation: ee, stackMode: te, annotations: ne, recordKey: re, locale: u, title: d, description: p, help: Ne, actions: Ve, actionsPlacement: Ue, messages: We, size: Ke, variant: Je, palette: et, toolbar: tt, grid: lt, texture: ft, renderer: gt, sampling: bt, animate: xt, legend: St, legendInteractive: Ct, legendValues: wt, legendOverflow: Tt, trigger: Et, tooltip: Dt, zoomable: Ot, selectable: kt, rangeSelectable: w, loading: At, error: jt, onRetry: Mt, hidden: Nt, defaultHidden: Pt, onHiddenChange: Ft, activePoint: It, defaultActivePoint: Lt, onActivePointChange: Rt, selection: zt, defaultSelection: Bt, onSelectionChange: Vt, range: Ht, defaultRange: Ut, onRangeChange: Wt, zoom: Gt, defaultZoom: Kt, onZoomChange: qt, tableOpen: Jt, defaultTableOpen: Yt, onTableOpenChange: Xt, fullscreen: Zt, defaultFullscreen: Qt, onFullscreenChange: $t, renderTooltip: en, renderLegendItem: tn, renderCenter: nn, renderEmpty: rn, renderError: an, render: on, extendOption: sn, handleRef: cn, ref: ln, ...un } = i, T = Ge(), dn = le(), E = t(me, We), fn = e(), D = {
|
|
224
|
+
size: Ke ?? T.size ?? "md",
|
|
225
|
+
variant: Je ?? T.variant ?? "plain",
|
|
226
|
+
palette: et ?? T.palette ?? "categorical",
|
|
227
|
+
toolbar: tt ?? T.toolbar ?? "visible",
|
|
228
|
+
renderer: gt ?? T.renderer ?? "auto",
|
|
229
|
+
grid: lt ?? T.grid,
|
|
230
|
+
legendOverflow: Tt ?? T.legendOverflow ?? "collapse",
|
|
231
|
+
actionsPlacement: Ue ?? T.actionsPlacement ?? "inline",
|
|
232
|
+
animate: xt ?? T.animate ?? !0,
|
|
232
233
|
tooltip: {
|
|
233
|
-
...
|
|
234
|
-
...
|
|
234
|
+
...T.tooltip,
|
|
235
|
+
...Dt
|
|
235
236
|
}
|
|
236
|
-
}, [
|
|
237
|
+
}, [pn, mn] = C(Nt, Pt ?? Ye, Ft, Ze), [O, k] = C(It, Lt ?? null, Rt, Xe), [A, hn] = C(zt, Bt ?? null, Vt, Xe), [j, gn] = C(Ht, Ut ?? null, Wt, $e), [M, N] = C(Gt, Kt ?? b, qt, Qe), [P, _n] = C(Jt, Yt ?? !1, Xt, Object.is), [F, vn] = C(Zt, Qt ?? !1, $t, Object.is), yn = nt(o), bn = nt(s), xn = nt(c), Sn = nt(ne), I = fe(() => ({
|
|
237
238
|
data: a,
|
|
238
|
-
series:
|
|
239
|
-
x:
|
|
240
|
-
y:
|
|
239
|
+
series: yn,
|
|
240
|
+
x: bn,
|
|
241
|
+
y: xn,
|
|
241
242
|
orientation: ee,
|
|
242
243
|
stackMode: te,
|
|
243
|
-
annotations:
|
|
244
|
+
annotations: Sn,
|
|
244
245
|
recordKey: re,
|
|
245
|
-
locale:
|
|
246
|
+
locale: u ?? fn
|
|
246
247
|
}), [
|
|
247
248
|
a,
|
|
248
|
-
vn,
|
|
249
249
|
yn,
|
|
250
250
|
bn,
|
|
251
|
+
xn,
|
|
251
252
|
ee,
|
|
252
253
|
te,
|
|
253
|
-
|
|
254
|
+
Sn,
|
|
254
255
|
re,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
]),
|
|
256
|
+
u,
|
|
257
|
+
fn
|
|
258
|
+
]), Cn = fe(() => {
|
|
258
259
|
try {
|
|
259
260
|
return {
|
|
260
|
-
model:
|
|
261
|
+
model: Se(I, { hidden: pn }),
|
|
261
262
|
failure: null
|
|
262
263
|
};
|
|
263
264
|
} catch (e) {
|
|
@@ -266,85 +267,85 @@ function ft(i) {
|
|
|
266
267
|
failure: e
|
|
267
268
|
};
|
|
268
269
|
}
|
|
269
|
-
}, [I,
|
|
270
|
-
|
|
270
|
+
}, [I, pn]), L = Cn.model, [wn, Tn] = g(null), R = !!jt || Cn.failure !== null || wn !== null, z = !!At, B = !(!L || z || R || L.empty), V = !(!L || z || R || L.empty === "no-data"), H = L ? Et ?? Te(L) : "none", U = h(null), W = h(null), En = h(null), Dn = h(null), On = h(null), G = h(null), [kn, An] = g(null), [K, jn] = g(rt), Mn = fe(() => Ce((e) => he().announce(e)), []), Nn = (e) => he().announce(e);
|
|
271
|
+
m(() => {
|
|
271
272
|
let e = W.current;
|
|
272
273
|
if (!e) return;
|
|
273
|
-
let t = e.ownerDocument.defaultView, n = (e) =>
|
|
274
|
+
let t = e.ownerDocument.defaultView, n = (e) => An((t) => Le(t, e) ? t : e), r = () => n(Ie(e)), i = _e(e), a = 0;
|
|
274
275
|
i ? n(i) : t && (a = t.requestAnimationFrame(() => {
|
|
275
276
|
a = 0, r();
|
|
276
277
|
}));
|
|
277
|
-
let o =
|
|
278
|
+
let o = Me(e, r);
|
|
278
279
|
return () => {
|
|
279
280
|
o(), a && t?.cancelAnimationFrame(a);
|
|
280
281
|
};
|
|
281
282
|
}, [
|
|
282
|
-
|
|
283
|
-
|
|
283
|
+
D.palette,
|
|
284
|
+
D.variant,
|
|
284
285
|
F
|
|
285
286
|
]);
|
|
286
|
-
let
|
|
287
|
+
let q = h({
|
|
287
288
|
onPointer: () => {},
|
|
288
289
|
onPress: () => {},
|
|
289
290
|
onZoom: () => {},
|
|
290
291
|
onRender: () => {}
|
|
291
292
|
});
|
|
292
|
-
|
|
293
|
-
let e =
|
|
293
|
+
m(() => {
|
|
294
|
+
let e = En.current;
|
|
294
295
|
if (!e) return;
|
|
295
|
-
let t =
|
|
296
|
-
onPointer: (e, t) =>
|
|
297
|
-
onPress: (e, t) =>
|
|
298
|
-
onZoom: (e, t) =>
|
|
299
|
-
onRender: () =>
|
|
300
|
-
onError: (e) =>
|
|
296
|
+
let t = He(e, {
|
|
297
|
+
onPointer: (e, t) => q.current.onPointer(e, t),
|
|
298
|
+
onPress: (e, t) => q.current.onPress(e, t),
|
|
299
|
+
onZoom: (e, t) => q.current.onZoom(e, t),
|
|
300
|
+
onRender: () => q.current.onRender(),
|
|
301
|
+
onError: (e) => Tn(e)
|
|
301
302
|
});
|
|
302
303
|
return G.current = t, () => {
|
|
303
304
|
t.dispose(), G.current = null;
|
|
304
305
|
};
|
|
305
|
-
}, []),
|
|
306
|
-
G.current &&
|
|
306
|
+
}, []), m(() => {
|
|
307
|
+
G.current && kn && L && B && G.current.update({
|
|
307
308
|
model: L,
|
|
308
|
-
theme:
|
|
309
|
-
selection:
|
|
310
|
-
zoom:
|
|
311
|
-
zoomable: !!
|
|
312
|
-
range:
|
|
313
|
-
rangeSelectable: !!
|
|
314
|
-
grid:
|
|
315
|
-
texture: !!
|
|
316
|
-
renderer:
|
|
317
|
-
sampling:
|
|
309
|
+
theme: kn,
|
|
310
|
+
selection: A,
|
|
311
|
+
zoom: M,
|
|
312
|
+
zoomable: !!Ot,
|
|
313
|
+
range: w ? j : null,
|
|
314
|
+
rangeSelectable: !!w,
|
|
315
|
+
grid: D.grid,
|
|
316
|
+
texture: !!ft,
|
|
317
|
+
renderer: D.renderer,
|
|
318
|
+
sampling: bt,
|
|
318
319
|
trigger: H,
|
|
319
|
-
animate:
|
|
320
|
-
extendOption:
|
|
320
|
+
animate: D.animate,
|
|
321
|
+
extendOption: sn
|
|
321
322
|
});
|
|
322
323
|
}, [
|
|
323
324
|
L,
|
|
324
|
-
|
|
325
|
+
kn,
|
|
325
326
|
B,
|
|
326
|
-
|
|
327
|
-
hn,
|
|
328
|
-
Et,
|
|
327
|
+
A,
|
|
329
328
|
M,
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
C,
|
|
333
|
-
O.renderer,
|
|
329
|
+
Ot,
|
|
330
|
+
j,
|
|
334
331
|
w,
|
|
332
|
+
D.grid,
|
|
333
|
+
ft,
|
|
334
|
+
D.renderer,
|
|
335
|
+
bt,
|
|
335
336
|
H,
|
|
336
|
-
|
|
337
|
-
|
|
337
|
+
D.animate,
|
|
338
|
+
sn
|
|
338
339
|
]);
|
|
339
|
-
let
|
|
340
|
+
let Pn = () => {
|
|
340
341
|
let e = G.current, t = W.current;
|
|
341
342
|
if (!e || !t || !L || !B || P) {
|
|
342
|
-
|
|
343
|
+
jn(rt);
|
|
343
344
|
return;
|
|
344
345
|
}
|
|
345
346
|
let n = [];
|
|
346
|
-
if (
|
|
347
|
-
let t =
|
|
347
|
+
if (A && x(L, A) && L.shape === "cartesian") {
|
|
348
|
+
let t = S(L, A.series), r = e.locate(A);
|
|
348
349
|
t && t.kind !== "bar" && r && n.push({
|
|
349
350
|
key: `selected-${t.id}`,
|
|
350
351
|
color: t.color,
|
|
@@ -353,10 +354,10 @@ function ft(i) {
|
|
|
353
354
|
current: !1
|
|
354
355
|
});
|
|
355
356
|
}
|
|
356
|
-
L.shape === "pie" && e.emphasize(
|
|
357
|
-
let r =
|
|
358
|
-
if (!
|
|
359
|
-
|
|
357
|
+
L.shape === "pie" && e.emphasize(O && x(L, O) ? O.key : null);
|
|
358
|
+
let r = O && x(L, O) ? e.locate(O) : null;
|
|
359
|
+
if (!O || !r) {
|
|
360
|
+
jn({
|
|
360
361
|
crosshair: null,
|
|
361
362
|
markers: n,
|
|
362
363
|
tooltip: null,
|
|
@@ -369,56 +370,56 @@ function ft(i) {
|
|
|
369
370
|
isBand: i && L.xType === "category"
|
|
370
371
|
} : null;
|
|
371
372
|
if (L.shape === "cartesian") {
|
|
372
|
-
let t =
|
|
373
|
+
let t = ve(L, O.key), r = H === "axis" ? L.series.filter((e) => e.visible && e.kind !== "bar" && e.values[t] !== null) : [S(L, O.series)].filter((e) => !!(e && e.kind !== "bar"));
|
|
373
374
|
for (let t of r) {
|
|
374
375
|
let r = e.locate({
|
|
375
376
|
series: t.id,
|
|
376
|
-
key:
|
|
377
|
+
key: O.key
|
|
377
378
|
});
|
|
378
379
|
r && n.push({
|
|
379
380
|
key: t.id,
|
|
380
381
|
color: t.color,
|
|
381
382
|
at: r,
|
|
382
383
|
selected: !1,
|
|
383
|
-
current: t.id ===
|
|
384
|
+
current: t.id === O.series
|
|
384
385
|
});
|
|
385
386
|
}
|
|
386
387
|
}
|
|
387
|
-
let o = H === "none" ? null :
|
|
388
|
+
let o = H === "none" ? null : Be(L, O, {
|
|
388
389
|
trigger: H,
|
|
389
|
-
sort:
|
|
390
|
-
total:
|
|
391
|
-
totalLabel:
|
|
390
|
+
sort: D.tooltip.sort,
|
|
391
|
+
total: D.tooltip.total,
|
|
392
|
+
totalLabel: E("total")
|
|
392
393
|
});
|
|
393
|
-
|
|
394
|
+
jn({
|
|
394
395
|
crosshair: a,
|
|
395
396
|
markers: n,
|
|
396
397
|
tooltip: o,
|
|
397
|
-
docked: t.clientWidth <
|
|
398
|
+
docked: t.clientWidth < ge
|
|
398
399
|
});
|
|
399
400
|
};
|
|
400
|
-
|
|
401
|
-
|
|
401
|
+
de(() => {
|
|
402
|
+
Pn();
|
|
402
403
|
}, [
|
|
403
|
-
|
|
404
|
-
|
|
404
|
+
O,
|
|
405
|
+
A,
|
|
405
406
|
L,
|
|
406
407
|
B,
|
|
407
408
|
P,
|
|
408
409
|
H
|
|
409
410
|
]);
|
|
410
|
-
let
|
|
411
|
-
|
|
412
|
-
let e =
|
|
411
|
+
let J = h(!1);
|
|
412
|
+
de(() => {
|
|
413
|
+
let e = Dn.current, t = W.current;
|
|
413
414
|
if (!e || !t) return;
|
|
414
|
-
if (!K.tooltip || !
|
|
415
|
-
|
|
415
|
+
if (!K.tooltip || !O) {
|
|
416
|
+
J.current = !1;
|
|
416
417
|
return;
|
|
417
418
|
}
|
|
418
|
-
let n = G.current?.locate(
|
|
419
|
+
let n = G.current?.locate(O);
|
|
419
420
|
if (!n) return;
|
|
420
|
-
|
|
421
|
-
let r =
|
|
421
|
+
J.current || (e.style.transition = "none");
|
|
422
|
+
let r = Pe({
|
|
422
423
|
anchor: {
|
|
423
424
|
x: n.x,
|
|
424
425
|
y: n.y
|
|
@@ -433,273 +434,273 @@ function ft(i) {
|
|
|
433
434
|
},
|
|
434
435
|
dir: U.current && getComputedStyle(U.current).direction === "rtl" ? "rtl" : "ltr"
|
|
435
436
|
});
|
|
436
|
-
e.style.setProperty("--slotted-chart-x", `${r.x}px`), e.style.setProperty("--slotted-chart-y", `${r.y}px`),
|
|
437
|
-
}, [K,
|
|
438
|
-
let
|
|
437
|
+
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;
|
|
438
|
+
}, [K, O]);
|
|
439
|
+
let Fn = fe(we, []), In = (e) => {
|
|
439
440
|
let t = e.pointerType === "touch";
|
|
440
|
-
if (!
|
|
441
|
+
if (!w || e.button !== 0 || e.shiftKey || !Fn.press(t)) return;
|
|
441
442
|
let n = e.currentTarget.ownerDocument.defaultView, r = (e) => {
|
|
442
|
-
n?.removeEventListener("pointerup", r), n?.removeEventListener("pointercancel", r), e.type === "pointercancel" ?
|
|
443
|
+
n?.removeEventListener("pointerup", r), n?.removeEventListener("pointercancel", r), e.type === "pointercancel" ? Fn.cancel() : Fn.release() && j && (gn(null, "pointer", e), t && k(null, "pointer", e));
|
|
443
444
|
};
|
|
444
445
|
n?.addEventListener("pointerup", r), n?.addEventListener("pointercancel", r);
|
|
445
446
|
};
|
|
446
|
-
|
|
447
|
+
q.current = {
|
|
447
448
|
onPointer: (e, t) => {
|
|
448
|
-
let n =
|
|
449
|
-
n &&
|
|
449
|
+
let n = w && L ? Fn.point(L, e?.key ?? null) : void 0;
|
|
450
|
+
n && gn(n, "pointer", t), e ? k(e, "pointer", t) : (!W.current || !it(W.current)) && k(null, "pointer", t);
|
|
450
451
|
},
|
|
451
452
|
onPress: (e, t) => {
|
|
452
|
-
|
|
453
|
+
kt && e && hn(Xe(A, e) ? null : e, "pointer", t);
|
|
453
454
|
},
|
|
454
455
|
onZoom: (e, t) => N(e, "pointer", t),
|
|
455
|
-
onRender: () =>
|
|
456
|
+
onRender: () => Pn()
|
|
456
457
|
};
|
|
457
|
-
let
|
|
458
|
+
let Ln = (e) => {
|
|
458
459
|
if (!L || !B || P) return;
|
|
459
|
-
let t =
|
|
460
|
-
active:
|
|
461
|
-
selection:
|
|
462
|
-
zoom:
|
|
463
|
-
zoomable: !!
|
|
464
|
-
selectable: !!
|
|
465
|
-
range:
|
|
466
|
-
rangeSelectable: !!
|
|
460
|
+
let t = ye(L, {
|
|
461
|
+
active: O,
|
|
462
|
+
selection: A,
|
|
463
|
+
zoom: M,
|
|
464
|
+
zoomable: !!Ot,
|
|
465
|
+
selectable: !!kt,
|
|
466
|
+
range: j,
|
|
467
|
+
rangeSelectable: !!w
|
|
467
468
|
}, e.key, e.shiftKey);
|
|
468
469
|
if (t !== null) {
|
|
469
470
|
e.preventDefault();
|
|
470
|
-
for (let n of t) n.type === "active" ? (
|
|
471
|
+
for (let n of t) n.type === "active" ? (k(n.point, n.reason, e.nativeEvent), n.point ? Mn.say(De(L, n.point, A, E)) : Mn.cancel()) : n.type === "select" ? (hn(n.point, "keyboard", e.nativeEvent), n.point && Mn.say(De(L, n.point, n.point, E))) : n.type === "range" ? (gn(n.range, n.reason, e.nativeEvent), Nn(Oe(L, n.range, E))) : (N(n.zoom, n.reason, e.nativeEvent), Nn(ke(L, n.zoom, E)));
|
|
471
472
|
}
|
|
472
|
-
},
|
|
473
|
-
if (!L || !B || P ||
|
|
474
|
-
let t =
|
|
475
|
-
t && (
|
|
476
|
-
},
|
|
473
|
+
}, Rn = ce((e) => e === null ? void 0 : oe(e).destroy, []), zn = (e) => {
|
|
474
|
+
if (!L || !B || P || O || !it(e.currentTarget)) return;
|
|
475
|
+
let t = Ae(L);
|
|
476
|
+
t && (k(t, "keyboard", e.nativeEvent), Mn.say(De(L, t, A, E)));
|
|
477
|
+
}, Bn = (e, t) => {
|
|
477
478
|
let n = !F;
|
|
478
|
-
|
|
479
|
+
vn(n, e, t);
|
|
479
480
|
let r = U.current;
|
|
480
|
-
r && (n &&
|
|
481
|
+
r && (n && Zt === void 0 && document.fullscreenEnabled && e !== "programmatic" && r.requestFullscreen?.().catch(() => {}), !n && document.fullscreenElement === r && document.exitFullscreen().catch(() => {}));
|
|
481
482
|
};
|
|
482
|
-
|
|
483
|
+
m(() => {
|
|
483
484
|
let e = U.current;
|
|
484
485
|
if (!e) return;
|
|
485
486
|
let t = !1, n = () => {
|
|
486
|
-
document.fullscreenElement === e ? t = !0 : t && (t = !1,
|
|
487
|
+
document.fullscreenElement === e ? t = !0 : t && (t = !1, Vn.current(!1, "escape"));
|
|
487
488
|
};
|
|
488
489
|
return document.addEventListener("fullscreenchange", n), () => document.removeEventListener("fullscreenchange", n);
|
|
489
490
|
}, []);
|
|
490
|
-
let
|
|
491
|
-
|
|
491
|
+
let Vn = h(vn);
|
|
492
|
+
Vn.current = vn, m(() => {
|
|
492
493
|
let e = U.current;
|
|
493
494
|
!F && e && document.fullscreenElement === e && document.exitFullscreen().catch(() => {});
|
|
494
495
|
}, [F]);
|
|
495
|
-
let
|
|
496
|
-
|
|
497
|
-
}, [Y,
|
|
498
|
-
let e =
|
|
496
|
+
let Hn = (e) => {
|
|
497
|
+
un.onKeyDown?.(e), !e.defaultPrevented && e.key === "Escape" && F && (e.preventDefault(), Bn("escape", e.nativeEvent));
|
|
498
|
+
}, [Y, Un] = g([]), Wn = h(/* @__PURE__ */ new Map()), [Gn, Kn] = g(null), qn = Ct ?? !0, X = L?.legend ?? [], Jn = () => {
|
|
499
|
+
let e = On.current;
|
|
499
500
|
if (!e || !L) return;
|
|
500
|
-
if (
|
|
501
|
-
|
|
501
|
+
if (D.legendOverflow === "wrap") {
|
|
502
|
+
Un((e) => e.length ? [] : e);
|
|
502
503
|
return;
|
|
503
504
|
}
|
|
504
505
|
let t = [...e.querySelectorAll(":scope > [data-part=\"legend-item\"]")];
|
|
505
|
-
for (let e of t) e.hidden ||
|
|
506
|
-
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 =
|
|
506
|
+
for (let e of t) e.hidden || Wn.current.set(e.dataset.key ?? "", e.getBoundingClientRect().width);
|
|
507
|
+
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 = pe({
|
|
507
508
|
units: X.map((e) => ({
|
|
508
|
-
size:
|
|
509
|
+
size: Wn.current.get(e.key) ?? 0,
|
|
509
510
|
collapsible: !0
|
|
510
511
|
})),
|
|
511
512
|
available: e.clientWidth,
|
|
512
513
|
gap: n,
|
|
513
514
|
triggerSize: i
|
|
514
515
|
});
|
|
515
|
-
|
|
516
|
+
Un((e) => e.length === a.collapsed.length && e.every((e, t) => e === a.collapsed[t]) ? e : a.collapsed);
|
|
516
517
|
};
|
|
517
|
-
|
|
518
|
-
|
|
518
|
+
de(() => {
|
|
519
|
+
Jn();
|
|
519
520
|
}, [
|
|
520
521
|
X,
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
]),
|
|
525
|
-
let e =
|
|
522
|
+
D.legendOverflow,
|
|
523
|
+
wt,
|
|
524
|
+
O
|
|
525
|
+
]), m(() => {
|
|
526
|
+
let e = On.current;
|
|
526
527
|
if (!e || typeof ResizeObserver > "u") return;
|
|
527
|
-
let t = new ResizeObserver(() =>
|
|
528
|
+
let t = new ResizeObserver(() => Yn.current());
|
|
528
529
|
return t.observe(e), () => t.disconnect();
|
|
529
530
|
}, []);
|
|
530
|
-
let
|
|
531
|
-
|
|
532
|
-
let
|
|
533
|
-
let i = X.map((e) => e.key), a =
|
|
534
|
-
|
|
535
|
-
}, Z =
|
|
531
|
+
let Yn = h(Jn);
|
|
532
|
+
Yn.current = Jn;
|
|
533
|
+
let Xn = (e, t, n, r) => {
|
|
534
|
+
let i = X.map((e) => e.key), a = ze(i, pn, e.key, t);
|
|
535
|
+
Kn(e.key), mn(a, n, r), Nn(E(a.includes(e.key) ? "hidden" : "shown", { series: e.label }));
|
|
536
|
+
}, Z = O && L && x(L, O) ? O.key : null, Zn = (e) => {
|
|
536
537
|
if (!L) return "";
|
|
537
|
-
let t = L.shape === "pie" ? L.series[0] :
|
|
538
|
+
let t = L.shape === "pie" ? L.series[0] : S(L, e.key);
|
|
538
539
|
if (!t) return "";
|
|
539
|
-
let n = L.shape === "pie" ?
|
|
540
|
-
return n >= 0 ?
|
|
541
|
-
},
|
|
542
|
-
let r = L?.shape === "pie" ? L.series[0] : L ?
|
|
543
|
-
/* @__PURE__ */
|
|
540
|
+
let n = L.shape === "pie" ? ve(L, e.key) : Z ? ve(L, Z) : at(t.values);
|
|
541
|
+
return n >= 0 ? Fe(t, n) : "";
|
|
542
|
+
}, Qn = ct("start"), $n = X.filter((e, t) => !Y.includes(t)).map((e) => e.key), er = Gn && $n.includes(Gn) ? Gn : $n[0] ?? null, tr = (e, t, n) => {
|
|
543
|
+
let r = L?.shape === "pie" ? L.series[0] : L ? S(L, e.key) : void 0, i = L?.shape === "pie" ? e.key === Z : O?.series === e.key && Z !== null, a = !n && Y.includes(t), o = /* @__PURE__ */ y(_, { children: [
|
|
544
|
+
/* @__PURE__ */ v("span", {
|
|
544
545
|
"data-kind": e.kind === "area" || e.kind === "bar" || e.kind === "pie" || e.kind === "range" ? "bar" : e.kind,
|
|
545
546
|
"data-part": "legend-marker",
|
|
546
547
|
"data-part-legend-marker": "",
|
|
547
548
|
...r && r.stroke !== "solid" ? { "data-stroke": r.stroke } : {}
|
|
548
549
|
}),
|
|
549
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ v("span", {
|
|
550
551
|
"data-part": "legend-label",
|
|
551
552
|
"data-part-legend-label": "",
|
|
552
553
|
title: e.label,
|
|
553
554
|
children: e.label
|
|
554
555
|
}),
|
|
555
|
-
|
|
556
|
+
wt ? /* @__PURE__ */ v("span", {
|
|
556
557
|
"data-part": "legend-value",
|
|
557
558
|
"data-part-legend-value": "",
|
|
558
|
-
children:
|
|
559
|
+
children: Zn(e)
|
|
559
560
|
}) : null
|
|
560
561
|
] }), s = {
|
|
561
562
|
"data-part": "legend-item",
|
|
562
563
|
...ae("part", "legend-item"),
|
|
563
564
|
"data-key": e.key,
|
|
564
|
-
...
|
|
565
|
+
...ot(e.color),
|
|
565
566
|
...i ? { "data-current": "" } : {},
|
|
566
567
|
hidden: a,
|
|
567
568
|
onPointerEnter: () => e.visible && G.current?.emphasize(e.key),
|
|
568
569
|
onPointerLeave: () => G.current?.emphasize(null)
|
|
569
|
-
}, c =
|
|
570
|
+
}, c = qn ? /* @__PURE__ */ f(pt, {
|
|
570
571
|
...s,
|
|
571
572
|
entry: e,
|
|
572
|
-
focused: n ||
|
|
573
|
+
focused: n || er === e.key,
|
|
573
574
|
key: `${n ? "layer" : "row"}-${e.key}`,
|
|
574
|
-
onActivate: (t, n, r) =>
|
|
575
|
+
onActivate: (t, n, r) => Xn(e, t, n, r),
|
|
575
576
|
onFocusEntry: () => {
|
|
576
|
-
n ||
|
|
577
|
+
n || Kn(e.key), e.visible && G.current?.emphasize(e.key);
|
|
577
578
|
},
|
|
578
579
|
onBlurEntry: () => G.current?.emphasize(null)
|
|
579
|
-
}, o) : /* @__PURE__ */
|
|
580
|
+
}, o) : /* @__PURE__ */ f("span", {
|
|
580
581
|
...s,
|
|
581
582
|
key: `${n ? "layer" : "row"}-${e.key}`,
|
|
582
583
|
role: "listitem"
|
|
583
584
|
}, o);
|
|
584
|
-
return
|
|
585
|
-
},
|
|
585
|
+
return tn ? /* @__PURE__ */ v(se, { children: tn(e, s, c) }, `${n ? "layer" : "row"}-${e.key}`) : c;
|
|
586
|
+
}, nr = (e) => {
|
|
586
587
|
let t = e.target;
|
|
587
588
|
if (t.closest("[data-part=\"menu\"]")) return;
|
|
588
589
|
let n = [...e.currentTarget.querySelectorAll(":scope > button:not([hidden])")], r = n.indexOf(t);
|
|
589
590
|
if (r === -1) return;
|
|
590
591
|
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;
|
|
591
|
-
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(),
|
|
592
|
-
}, Q =
|
|
592
|
+
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(), Kn(o.dataset.key ?? "__more"), o.focus());
|
|
593
|
+
}, Q = ct("end"), rr = (e, t) => {
|
|
593
594
|
let n = document.createElement("a");
|
|
594
595
|
n.href = t, n.download = e, document.body.append(n), n.click(), n.remove();
|
|
595
|
-
},
|
|
596
|
-
|
|
596
|
+
}, ir = typeof d == "string" ? d : "chart";
|
|
597
|
+
ue(cn, () => ({
|
|
597
598
|
focus: () => W.current?.focus(),
|
|
598
|
-
resetZoom: () => N(
|
|
599
|
+
resetZoom: () => N(b, "programmatic"),
|
|
599
600
|
toDataURL: () => G.current?.toDataURL() ?? null,
|
|
600
|
-
toCsv: () => L ?
|
|
601
|
+
toCsv: () => L ? xe(L, E) : ""
|
|
601
602
|
}), [
|
|
602
603
|
L,
|
|
603
|
-
|
|
604
|
+
E,
|
|
604
605
|
N
|
|
605
606
|
]);
|
|
606
|
-
let
|
|
607
|
-
|
|
608
|
-
},
|
|
607
|
+
let ar = z ? E("loading") : R ? E("error") : L ? Ee(L, E) : "", or = `${dn}-title`, sr = `${dn}-description`, cr = `${dn}-summary`, lr = 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 ? be(L, E) : null, ur = () => {
|
|
608
|
+
Tn(null), Mt?.();
|
|
609
|
+
}, dr = d !== void 0 || p !== void 0 || Ve !== void 0 || D.toolbar !== "none" ? /* @__PURE__ */ y("figcaption", {
|
|
609
610
|
"data-part": "header",
|
|
610
611
|
"data-part-header": "",
|
|
611
612
|
children: [
|
|
612
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", { children: [d === void 0 ? null : /* @__PURE__ */ v("span", {
|
|
613
614
|
"data-part": "title",
|
|
614
615
|
"data-part-title": "",
|
|
615
|
-
id:
|
|
616
|
-
children:
|
|
617
|
-
}),
|
|
618
|
-
label:
|
|
619
|
-
title:
|
|
620
|
-
children:
|
|
621
|
-
})] }),
|
|
616
|
+
id: or,
|
|
617
|
+
children: d
|
|
618
|
+
}), Ne === void 0 ? null : /* @__PURE__ */ v(qe, {
|
|
619
|
+
label: E("help"),
|
|
620
|
+
title: d,
|
|
621
|
+
children: Ne
|
|
622
|
+
})] }), p === void 0 ? null : /* @__PURE__ */ v("span", {
|
|
622
623
|
"data-part": "description",
|
|
623
624
|
"data-part-description": "",
|
|
624
|
-
id:
|
|
625
|
-
children:
|
|
625
|
+
id: sr,
|
|
626
|
+
children: p
|
|
626
627
|
})] }),
|
|
627
|
-
|
|
628
|
+
Ve === void 0 ? null : /* @__PURE__ */ v("div", {
|
|
628
629
|
"data-part": "actions",
|
|
629
630
|
"data-part-actions": "",
|
|
630
|
-
children:
|
|
631
|
+
children: Ve
|
|
631
632
|
}),
|
|
632
|
-
|
|
633
|
+
D.toolbar === "none" ? null : /* @__PURE__ */ y("div", {
|
|
633
634
|
"aria-hidden": !V || void 0,
|
|
634
|
-
"aria-label": V ?
|
|
635
|
+
"aria-label": V ? E("toolbar") : void 0,
|
|
635
636
|
"data-part": "toolbar",
|
|
636
637
|
"data-part-toolbar": "",
|
|
637
638
|
"data-waiting": V ? void 0 : "",
|
|
638
639
|
inert: !V,
|
|
639
640
|
role: V ? "toolbar" : void 0,
|
|
640
641
|
children: [
|
|
641
|
-
L &&
|
|
642
|
-
label:
|
|
642
|
+
L && Ot && !je(M) && L.shape === "cartesian" ? /* @__PURE__ */ v(mt, {
|
|
643
|
+
label: E("resetZoom"),
|
|
643
644
|
onPress: (e, t) => {
|
|
644
|
-
N(
|
|
645
|
+
N(b, "clear", t), Nn(ke(L, b, E)), W.current?.focus();
|
|
645
646
|
},
|
|
646
647
|
glyph: "rotate-ccw",
|
|
647
648
|
part: "zoom-reset"
|
|
648
649
|
}) : null,
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
label:
|
|
651
|
-
onPress: (e, t) =>
|
|
650
|
+
/* @__PURE__ */ v(mt, {
|
|
651
|
+
label: E("tableView"),
|
|
652
|
+
onPress: (e, t) => _n(!P, e, t),
|
|
652
653
|
glyph: "file-spreadsheet",
|
|
653
654
|
part: "view-toggle",
|
|
654
655
|
pressed: P
|
|
655
656
|
}),
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
label:
|
|
657
|
+
/* @__PURE__ */ v(mt, {
|
|
658
|
+
label: E(F ? "exitFullscreen" : "fullscreen"),
|
|
658
659
|
glyph: F ? "minimize" : "maximize",
|
|
659
|
-
onPress: (e, t) =>
|
|
660
|
+
onPress: (e, t) => Bn(e, t),
|
|
660
661
|
part: "fullscreen-toggle"
|
|
661
662
|
}),
|
|
662
|
-
/* @__PURE__ */
|
|
663
|
+
/* @__PURE__ */ v("button", {
|
|
663
664
|
...l(Q.controlProps, "part", "menu-trigger"),
|
|
664
665
|
"aria-haspopup": "menu",
|
|
665
|
-
"aria-label":
|
|
666
|
-
title:
|
|
666
|
+
"aria-label": E("more"),
|
|
667
|
+
title: E("more"),
|
|
667
668
|
type: "button",
|
|
668
|
-
children: /* @__PURE__ */
|
|
669
|
+
children: /* @__PURE__ */ v(r, { children: /* @__PURE__ */ v(n, { name: "ellipsis" }) })
|
|
669
670
|
}),
|
|
670
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ y("div", {
|
|
671
672
|
...l(Q.layerProps, "part", "menu"),
|
|
672
|
-
"aria-label":
|
|
673
|
+
"aria-label": E("more"),
|
|
673
674
|
role: "menu",
|
|
674
675
|
children: [
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ v(ht, {
|
|
676
677
|
action: "view",
|
|
677
|
-
label:
|
|
678
|
+
label: E("tableView"),
|
|
678
679
|
onPress: (e, t) => {
|
|
679
|
-
Q.close(),
|
|
680
|
+
Q.close(), _n(!P, e, t);
|
|
680
681
|
}
|
|
681
682
|
}),
|
|
682
|
-
/* @__PURE__ */
|
|
683
|
+
/* @__PURE__ */ v(ht, {
|
|
683
684
|
action: "fullscreen",
|
|
684
|
-
label:
|
|
685
|
+
label: E(F ? "exitFullscreen" : "fullscreen"),
|
|
685
686
|
onPress: (e, t) => {
|
|
686
|
-
Q.close(),
|
|
687
|
+
Q.close(), Bn(e, t);
|
|
687
688
|
}
|
|
688
689
|
}),
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ v(ht, {
|
|
690
691
|
action: "csv",
|
|
691
|
-
label:
|
|
692
|
+
label: E("downloadCsv"),
|
|
692
693
|
onPress: () => {
|
|
693
|
-
Q.close(), L &&
|
|
694
|
+
Q.close(), L && rr(`${ir}.csv`, `data:text/csv;charset=utf-8,${encodeURIComponent(xe(L, E))}`);
|
|
694
695
|
}
|
|
695
696
|
}),
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
+
/* @__PURE__ */ v(ht, {
|
|
697
698
|
action: "image",
|
|
698
|
-
label:
|
|
699
|
+
label: E("downloadImage"),
|
|
699
700
|
onPress: () => {
|
|
700
701
|
Q.close();
|
|
701
702
|
let e = G.current?.toDataURL();
|
|
702
|
-
e &&
|
|
703
|
+
e && rr(`${ir}.${e.startsWith("data:image/svg") ? "svg" : "png"}`, e);
|
|
703
704
|
}
|
|
704
705
|
})
|
|
705
706
|
]
|
|
@@ -707,79 +708,80 @@ function ft(i) {
|
|
|
707
708
|
]
|
|
708
709
|
})
|
|
709
710
|
]
|
|
710
|
-
}) : null,
|
|
711
|
-
"aria-label": z && (!L || L.shape === "pie") ? void 0 :
|
|
711
|
+
}) : null, fr = St === !1 ? null : /* @__PURE__ */ v("div", {
|
|
712
|
+
"aria-label": z && (!L || L.shape === "pie") ? void 0 : E("legend"),
|
|
712
713
|
"data-part": "legend",
|
|
713
714
|
"data-part-legend": "",
|
|
714
|
-
onKeyDown:
|
|
715
|
-
ref:
|
|
716
|
-
role: z && (!L || L.shape === "pie") ? void 0 :
|
|
717
|
-
children: z && (!L || L.shape === "pie") ? /* @__PURE__ */
|
|
718
|
-
/* @__PURE__ */
|
|
719
|
-
/* @__PURE__ */
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
] }) : /* @__PURE__ */
|
|
722
|
-
X.map((e, t) =>
|
|
723
|
-
/* @__PURE__ */
|
|
724
|
-
...l(
|
|
715
|
+
onKeyDown: nr,
|
|
716
|
+
ref: On,
|
|
717
|
+
role: z && (!L || L.shape === "pie") ? void 0 : qn ? "toolbar" : "list",
|
|
718
|
+
children: z && (!L || L.shape === "pie") ? /* @__PURE__ */ y(_, { children: [
|
|
719
|
+
/* @__PURE__ */ v(_t, {}),
|
|
720
|
+
/* @__PURE__ */ v(_t, {}),
|
|
721
|
+
/* @__PURE__ */ v(_t, {})
|
|
722
|
+
] }) : /* @__PURE__ */ y(_, { children: [
|
|
723
|
+
X.map((e, t) => tr(e, t, !1)),
|
|
724
|
+
/* @__PURE__ */ v("button", {
|
|
725
|
+
...l(Qn.controlProps, "part", "legend-more"),
|
|
725
726
|
"aria-haspopup": "true",
|
|
726
|
-
"aria-label":
|
|
727
|
+
"aria-label": E("legendMore", { series: new Intl.ListFormat(u ?? fn, { type: "unit" }).format(Y.map((e) => X[e]?.label ?? "")) }),
|
|
727
728
|
hidden: Y.length === 0,
|
|
728
|
-
tabIndex:
|
|
729
|
+
tabIndex: er === null ? 0 : -1,
|
|
729
730
|
type: "button",
|
|
730
|
-
children:
|
|
731
|
+
children: E("moreSeries", { count: Y.length })
|
|
731
732
|
}),
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
...l(
|
|
734
|
-
"aria-label":
|
|
733
|
+
/* @__PURE__ */ v("div", {
|
|
734
|
+
...l(Qn.layerProps, "part", "menu"),
|
|
735
|
+
"aria-label": E("legend"),
|
|
735
736
|
role: "group",
|
|
736
737
|
children: Y.map((e) => {
|
|
737
738
|
let t = X[e];
|
|
738
|
-
return t ?
|
|
739
|
+
return t ? tr(t, e, !0) : null;
|
|
739
740
|
})
|
|
740
741
|
})
|
|
741
742
|
] })
|
|
742
|
-
}),
|
|
743
|
-
...
|
|
743
|
+
}), pr = ie({
|
|
744
|
+
...un,
|
|
744
745
|
"data-ui": "chart",
|
|
745
746
|
"data-part": "root",
|
|
746
|
-
"data-size":
|
|
747
|
-
"data-variant":
|
|
748
|
-
"data-palette":
|
|
749
|
-
"data-toolbar":
|
|
750
|
-
"data-legend-overflow":
|
|
747
|
+
"data-size": D.size,
|
|
748
|
+
"data-variant": D.variant,
|
|
749
|
+
"data-palette": D.palette,
|
|
750
|
+
"data-toolbar": D.toolbar,
|
|
751
|
+
"data-legend-overflow": D.legendOverflow,
|
|
752
|
+
"data-actions-placement": D.actionsPlacement,
|
|
751
753
|
...z ? { "data-loading": "" } : {},
|
|
752
754
|
...F ? { "data-fullscreen": "" } : {},
|
|
753
|
-
onKeyDown:
|
|
755
|
+
onKeyDown: Hn,
|
|
754
756
|
ref: (e) => {
|
|
755
|
-
U.current = e, ut(
|
|
757
|
+
U.current = e, ut(ln, e);
|
|
756
758
|
},
|
|
757
|
-
children: /* @__PURE__ */
|
|
758
|
-
ur,
|
|
759
|
+
children: /* @__PURE__ */ y(_, { children: [
|
|
759
760
|
dr,
|
|
760
|
-
|
|
761
|
+
fr,
|
|
762
|
+
/* @__PURE__ */ y("div", {
|
|
761
763
|
"aria-busy": z || void 0,
|
|
762
|
-
"aria-describedby":
|
|
763
|
-
"aria-label":
|
|
764
|
-
"aria-labelledby":
|
|
765
|
-
"aria-roledescription":
|
|
764
|
+
"aria-describedby": p === void 0 ? cr : `${sr} ${cr}`,
|
|
765
|
+
"aria-label": d === void 0 ? un["aria-label"] ?? E("roledescription") : void 0,
|
|
766
|
+
"aria-labelledby": d === void 0 ? void 0 : or,
|
|
767
|
+
"aria-roledescription": E("roledescription"),
|
|
766
768
|
"data-part": "plot",
|
|
767
769
|
"data-part-plot": "",
|
|
768
|
-
onBlur: (e) =>
|
|
769
|
-
onFocus:
|
|
770
|
-
onKeyDown:
|
|
771
|
-
onPointerDown:
|
|
770
|
+
onBlur: (e) => k(null, "blur", e.nativeEvent),
|
|
771
|
+
onFocus: zn,
|
|
772
|
+
onKeyDown: Ln,
|
|
773
|
+
onPointerDown: In,
|
|
772
774
|
ref: W,
|
|
773
775
|
role: "group",
|
|
774
776
|
tabIndex: 0,
|
|
775
777
|
children: [
|
|
776
|
-
/* @__PURE__ */
|
|
778
|
+
/* @__PURE__ */ v("div", {
|
|
777
779
|
"data-part": "crosshair",
|
|
778
780
|
"data-part-crosshair": "",
|
|
779
781
|
hidden: !K.crosshair,
|
|
780
782
|
...K.crosshair?.isBand ? { "data-band": "" } : {},
|
|
781
783
|
"data-orientation": L?.orientation ?? "vertical",
|
|
782
|
-
style: K.crosshair ?
|
|
784
|
+
style: K.crosshair ? st({
|
|
783
785
|
"--slotted-chart-x": K.crosshair.x,
|
|
784
786
|
"--slotted-chart-y": K.crosshair.y,
|
|
785
787
|
"--slotted-chart-band-start": K.crosshair.band.start,
|
|
@@ -788,128 +790,128 @@ function ft(i) {
|
|
|
788
790
|
"--slotted-chart-frame-size": K.crosshair.frame.size
|
|
789
791
|
}) : void 0
|
|
790
792
|
}),
|
|
791
|
-
/* @__PURE__ */
|
|
793
|
+
/* @__PURE__ */ v("div", {
|
|
792
794
|
"aria-hidden": "true",
|
|
793
795
|
"data-part": "canvas",
|
|
794
796
|
"data-part-canvas": "",
|
|
795
797
|
hidden: !B,
|
|
796
|
-
ref:
|
|
798
|
+
ref: En
|
|
797
799
|
}),
|
|
798
|
-
K.markers.map((e) => /* @__PURE__ */
|
|
800
|
+
K.markers.map((e) => /* @__PURE__ */ v("div", {
|
|
799
801
|
"aria-hidden": "true",
|
|
800
802
|
"data-part": "marker",
|
|
801
803
|
"data-part-marker": "",
|
|
802
|
-
...
|
|
804
|
+
...ot(e.color),
|
|
803
805
|
...e.selected ? { "data-selected": "" } : {},
|
|
804
806
|
...e.current ? { "data-current": "" } : {},
|
|
805
|
-
style:
|
|
807
|
+
style: st({
|
|
806
808
|
"--slotted-chart-x": e.at.x,
|
|
807
809
|
"--slotted-chart-y": e.at.y
|
|
808
810
|
})
|
|
809
811
|
}, e.key)),
|
|
810
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ v("div", {
|
|
811
813
|
"aria-hidden": "true",
|
|
812
814
|
"data-part": "tooltip",
|
|
813
815
|
"data-part-tooltip": "",
|
|
814
|
-
ref:
|
|
816
|
+
ref: Dn,
|
|
815
817
|
...K.tooltip ? { "data-open": "" } : {},
|
|
816
818
|
...K.docked ? { "data-docked": "" } : {},
|
|
817
|
-
children: K.tooltip && L ?
|
|
819
|
+
children: K.tooltip && L ? en?.(K.tooltip, L) ?? /* @__PURE__ */ v(dt, {
|
|
818
820
|
context: K.tooltip,
|
|
819
|
-
indicator:
|
|
821
|
+
indicator: D.tooltip.indicator,
|
|
820
822
|
model: L
|
|
821
823
|
}) : null
|
|
822
824
|
}),
|
|
823
|
-
B && L?.shape === "pie" && (L.series[0]?.innerRadius ?? 0) > 0 ? /* @__PURE__ */
|
|
825
|
+
B && L?.shape === "pie" && (L.series[0]?.innerRadius ?? 0) > 0 ? /* @__PURE__ */ v("div", {
|
|
824
826
|
"aria-hidden": "true",
|
|
825
827
|
"data-part": "center",
|
|
826
828
|
"data-part-center": "",
|
|
827
|
-
children:
|
|
829
|
+
children: nn?.(L) ?? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("span", {
|
|
828
830
|
"data-part": "center-value",
|
|
829
831
|
"data-part-center-value": "",
|
|
830
832
|
children: L.series[0].format(L.total)
|
|
831
|
-
}), /* @__PURE__ */
|
|
833
|
+
}), /* @__PURE__ */ v("span", {
|
|
832
834
|
"data-part": "center-label",
|
|
833
835
|
"data-part-center-label": "",
|
|
834
|
-
children:
|
|
836
|
+
children: E("total")
|
|
835
837
|
})] })
|
|
836
838
|
}) : null,
|
|
837
|
-
$ ? /* @__PURE__ */
|
|
838
|
-
"aria-labelledby":
|
|
839
|
+
$ ? /* @__PURE__ */ v("div", {
|
|
840
|
+
"aria-labelledby": d === void 0 ? void 0 : or,
|
|
839
841
|
"data-part": "table-region",
|
|
840
842
|
"data-part-table-region": "",
|
|
841
|
-
ref:
|
|
843
|
+
ref: Rn,
|
|
842
844
|
role: "region",
|
|
843
845
|
tabIndex: 0,
|
|
844
|
-
children: /* @__PURE__ */
|
|
846
|
+
children: /* @__PURE__ */ y("table", {
|
|
845
847
|
"data-part": "table",
|
|
846
848
|
"data-part-table": "",
|
|
847
849
|
children: [
|
|
848
|
-
/* @__PURE__ */
|
|
849
|
-
title:
|
|
850
|
+
/* @__PURE__ */ v("caption", { children: $.omitted ? typeof d == "string" ? E("truncatedCaption", {
|
|
851
|
+
title: d,
|
|
850
852
|
shown: $.rows.length,
|
|
851
853
|
count: $.rows.length + $.omitted
|
|
852
|
-
}) :
|
|
854
|
+
}) : E("truncated", {
|
|
853
855
|
shown: $.rows.length,
|
|
854
856
|
count: $.rows.length + $.omitted
|
|
855
|
-
}) : typeof
|
|
856
|
-
/* @__PURE__ */
|
|
857
|
+
}) : typeof d == "string" ? d : null }),
|
|
858
|
+
/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ v("tr", { children: $.columns.map((e, t) => /* @__PURE__ */ f("th", {
|
|
857
859
|
...t > 0 ? { "data-numeric": "" } : {},
|
|
858
860
|
key: e.key,
|
|
859
861
|
scope: "col"
|
|
860
862
|
}, e.label)) }) }),
|
|
861
|
-
/* @__PURE__ */
|
|
863
|
+
/* @__PURE__ */ v("tbody", { children: $.rows.map((e) => /* @__PURE__ */ f("tr", {
|
|
862
864
|
...e.key === Z ? { "data-current": "" } : {},
|
|
863
865
|
key: e.key
|
|
864
|
-
}, e.cells.map((e, t) => t === 0 ? /* @__PURE__ */
|
|
866
|
+
}, e.cells.map((e, t) => t === 0 ? /* @__PURE__ */ v("th", {
|
|
865
867
|
scope: "row",
|
|
866
868
|
children: e.text
|
|
867
|
-
}, "category") : /* @__PURE__ */
|
|
869
|
+
}, "category") : /* @__PURE__ */ v("td", {
|
|
868
870
|
"data-numeric": "",
|
|
869
871
|
children: e.text
|
|
870
872
|
}, t)))) })
|
|
871
873
|
]
|
|
872
874
|
})
|
|
873
875
|
}) : null,
|
|
874
|
-
z ? /* @__PURE__ */
|
|
875
|
-
axes:
|
|
876
|
-
kind:
|
|
876
|
+
z ? /* @__PURE__ */ v(vt, {
|
|
877
|
+
axes: Re(I),
|
|
878
|
+
kind: lr
|
|
877
879
|
}) : null,
|
|
878
|
-
!z && R ? /* @__PURE__ */
|
|
880
|
+
!z && R ? /* @__PURE__ */ v("div", {
|
|
879
881
|
"data-part": "error",
|
|
880
882
|
"data-part-error": "",
|
|
881
|
-
children:
|
|
882
|
-
action:
|
|
883
|
-
onAction:
|
|
883
|
+
children: an?.() ?? /* @__PURE__ */ v(yt, {
|
|
884
|
+
action: Mt || wn ? E("retry") : void 0,
|
|
885
|
+
onAction: ur,
|
|
884
886
|
status: "error",
|
|
885
|
-
text:
|
|
887
|
+
text: E("error")
|
|
886
888
|
})
|
|
887
889
|
}) : null,
|
|
888
|
-
!z && !R && L?.empty ? /* @__PURE__ */
|
|
890
|
+
!z && !R && L?.empty ? /* @__PURE__ */ v("div", {
|
|
889
891
|
"data-part": "empty",
|
|
890
892
|
"data-part-empty": "",
|
|
891
|
-
children:
|
|
892
|
-
action: L.empty === "all-hidden" ?
|
|
893
|
-
onAction: (e) =>
|
|
893
|
+
children: rn?.(L.empty) ?? /* @__PURE__ */ v(yt, {
|
|
894
|
+
action: L.empty === "all-hidden" ? E("showAll") : void 0,
|
|
895
|
+
onAction: (e) => mn(Ye, "pointer", e),
|
|
894
896
|
status: L.empty === "all-hidden" ? "no-results" : "empty",
|
|
895
|
-
text: L.empty === "all-hidden" ?
|
|
897
|
+
text: L.empty === "all-hidden" ? E("allHidden") : E("noData")
|
|
896
898
|
})
|
|
897
899
|
}) : null,
|
|
898
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ v("p", {
|
|
899
901
|
"data-part": "summary",
|
|
900
902
|
"data-part-summary": "",
|
|
901
|
-
id:
|
|
902
|
-
children:
|
|
903
|
+
id: cr,
|
|
904
|
+
children: ar
|
|
903
905
|
})
|
|
904
906
|
]
|
|
905
907
|
})
|
|
906
908
|
] })
|
|
907
909
|
});
|
|
908
|
-
return
|
|
910
|
+
return on ? on(pr) : /* @__PURE__ */ v("figure", { ...pr });
|
|
909
911
|
}
|
|
910
912
|
function pt({ children: e, entry: t, focused: n, onActivate: r, onFocusEntry: i, onBlurEntry: a, ...o }) {
|
|
911
|
-
let [s, c] =
|
|
912
|
-
return /* @__PURE__ */
|
|
913
|
+
let [s, c] = lt();
|
|
914
|
+
return /* @__PURE__ */ v("button", {
|
|
913
915
|
...o,
|
|
914
916
|
"aria-pressed": t.visible,
|
|
915
917
|
...t.visible ? { "data-pressed": "" } : {},
|
|
@@ -926,8 +928,8 @@ function pt({ children: e, entry: t, focused: n, onActivate: r, onFocusEntry: i,
|
|
|
926
928
|
});
|
|
927
929
|
}
|
|
928
930
|
function mt({ glyph: e, label: t, onPress: i, part: a, pressed: o }) {
|
|
929
|
-
let [s, c] =
|
|
930
|
-
return /* @__PURE__ */
|
|
931
|
+
let [s, c] = lt();
|
|
932
|
+
return /* @__PURE__ */ v("button", {
|
|
931
933
|
"aria-label": t,
|
|
932
934
|
...o === void 0 ? {} : {
|
|
933
935
|
"aria-pressed": o,
|
|
@@ -939,12 +941,12 @@ function mt({ glyph: e, label: t, onPress: i, part: a, pressed: o }) {
|
|
|
939
941
|
ref: s,
|
|
940
942
|
title: t,
|
|
941
943
|
type: "button",
|
|
942
|
-
children: /* @__PURE__ */
|
|
944
|
+
children: /* @__PURE__ */ v(r, { children: /* @__PURE__ */ v(n, { name: e }) })
|
|
943
945
|
});
|
|
944
946
|
}
|
|
945
947
|
function ht({ action: e, label: t, onPress: n }) {
|
|
946
|
-
let [r, i] =
|
|
947
|
-
return /* @__PURE__ */
|
|
948
|
+
let [r, i] = lt();
|
|
949
|
+
return /* @__PURE__ */ v("button", {
|
|
948
950
|
"data-action": e,
|
|
949
951
|
"data-part": "menu-item",
|
|
950
952
|
"data-part-menu-item": "",
|
|
@@ -955,8 +957,8 @@ function ht({ action: e, label: t, onPress: n }) {
|
|
|
955
957
|
children: t
|
|
956
958
|
});
|
|
957
959
|
}
|
|
958
|
-
function
|
|
959
|
-
return /* @__PURE__ */
|
|
960
|
+
function gt({ shape: e = "block" }) {
|
|
961
|
+
return /* @__PURE__ */ v("span", {
|
|
960
962
|
"aria-hidden": "true",
|
|
961
963
|
"data-animation": "shimmer",
|
|
962
964
|
"data-loading": "",
|
|
@@ -968,33 +970,33 @@ function w({ shape: e = "block" }) {
|
|
|
968
970
|
"data-ui-skeleton": ""
|
|
969
971
|
});
|
|
970
972
|
}
|
|
971
|
-
function
|
|
972
|
-
return /* @__PURE__ */
|
|
973
|
+
function _t() {
|
|
974
|
+
return /* @__PURE__ */ v(gt, {});
|
|
973
975
|
}
|
|
974
|
-
function
|
|
975
|
-
let n = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */
|
|
976
|
-
return /* @__PURE__ */
|
|
976
|
+
function vt({ axes: e, kind: t }) {
|
|
977
|
+
let n = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ v(gt, {}, t));
|
|
978
|
+
return /* @__PURE__ */ v("div", {
|
|
977
979
|
"aria-hidden": "true",
|
|
978
980
|
"data-kind": t,
|
|
979
981
|
"data-part": "skeleton",
|
|
980
982
|
"data-part-skeleton": "",
|
|
981
|
-
children: /* @__PURE__ */
|
|
983
|
+
children: /* @__PURE__ */ v("div", {
|
|
982
984
|
"data-animation": "shimmer",
|
|
983
985
|
"data-loading": "",
|
|
984
986
|
"data-part": "region",
|
|
985
987
|
"data-part-region": "",
|
|
986
988
|
"data-ui": "skeleton",
|
|
987
989
|
"data-ui-skeleton": "",
|
|
988
|
-
children: t === "pie" ? /* @__PURE__ */
|
|
989
|
-
e.column === "none" ? null : /* @__PURE__ */
|
|
990
|
+
children: t === "pie" ? /* @__PURE__ */ v(gt, { shape: "circle" }) : /* @__PURE__ */ y(_, { children: [
|
|
991
|
+
e.column === "none" ? null : /* @__PURE__ */ v("div", {
|
|
990
992
|
"data-skeleton": "y",
|
|
991
993
|
children: e.column === "labels" ? n(5) : null
|
|
992
994
|
}),
|
|
993
|
-
/* @__PURE__ */
|
|
995
|
+
/* @__PURE__ */ v("div", {
|
|
994
996
|
"data-skeleton": "marks",
|
|
995
997
|
children: n(t === "bar" ? 7 : 2)
|
|
996
998
|
}),
|
|
997
|
-
e.row === "none" ? null : /* @__PURE__ */
|
|
999
|
+
e.row === "none" ? null : /* @__PURE__ */ v("div", {
|
|
998
1000
|
"data-skeleton": "x",
|
|
999
1001
|
children: n(6)
|
|
1000
1002
|
})
|
|
@@ -1002,8 +1004,8 @@ function _t({ axes: e, kind: t }) {
|
|
|
1002
1004
|
})
|
|
1003
1005
|
});
|
|
1004
1006
|
}
|
|
1005
|
-
function
|
|
1006
|
-
return /* @__PURE__ */
|
|
1007
|
+
function yt({ action: e, onAction: t, status: n, text: r }) {
|
|
1008
|
+
return /* @__PURE__ */ y("section", {
|
|
1007
1009
|
"data-align": "center",
|
|
1008
1010
|
"data-live": "polite",
|
|
1009
1011
|
"data-part": "root",
|
|
@@ -1013,25 +1015,25 @@ function vt({ action: e, onAction: t, status: n, text: r }) {
|
|
|
1013
1015
|
"data-ui": "result-state",
|
|
1014
1016
|
"data-ui-result-state": "",
|
|
1015
1017
|
children: [
|
|
1016
|
-
/* @__PURE__ */
|
|
1018
|
+
/* @__PURE__ */ v("div", {
|
|
1017
1019
|
"aria-hidden": "true",
|
|
1018
1020
|
"data-part": "media",
|
|
1019
1021
|
"data-part-media": ""
|
|
1020
1022
|
}),
|
|
1021
|
-
/* @__PURE__ */
|
|
1023
|
+
/* @__PURE__ */ v("div", {
|
|
1022
1024
|
"data-part": "content",
|
|
1023
1025
|
"data-part-content": "",
|
|
1024
1026
|
role: "status",
|
|
1025
|
-
children: /* @__PURE__ */
|
|
1027
|
+
children: /* @__PURE__ */ v("div", {
|
|
1026
1028
|
"data-part": "title",
|
|
1027
1029
|
"data-part-title": "",
|
|
1028
1030
|
children: r
|
|
1029
1031
|
})
|
|
1030
1032
|
}),
|
|
1031
|
-
e ? /* @__PURE__ */
|
|
1033
|
+
e ? /* @__PURE__ */ v("div", {
|
|
1032
1034
|
"data-part": "actions",
|
|
1033
1035
|
"data-part-actions": "",
|
|
1034
|
-
children: /* @__PURE__ */
|
|
1036
|
+
children: /* @__PURE__ */ v("button", {
|
|
1035
1037
|
"data-part": "root",
|
|
1036
1038
|
"data-part-root": "",
|
|
1037
1039
|
"data-size": "sm",
|
|
@@ -1041,7 +1043,7 @@ function vt({ action: e, onAction: t, status: n, text: r }) {
|
|
|
1041
1043
|
"data-variant": "outline",
|
|
1042
1044
|
onClick: (e) => t(e.nativeEvent),
|
|
1043
1045
|
type: "button",
|
|
1044
|
-
children: /* @__PURE__ */
|
|
1046
|
+
children: /* @__PURE__ */ v("span", {
|
|
1045
1047
|
"data-part": "label",
|
|
1046
1048
|
"data-part-label": "",
|
|
1047
1049
|
children: e
|
|
@@ -1052,4 +1054,4 @@ function vt({ action: e, onAction: t, status: n, text: r }) {
|
|
|
1052
1054
|
});
|
|
1053
1055
|
}
|
|
1054
1056
|
//#endregion
|
|
1055
|
-
export {
|
|
1057
|
+
export { Ge as a, Ke as i, ft as n, dt as r, Ue as t };
|