@graphysdk/react-renderer 1.8.1-beta.1786366143449 → 1.8.1-beta.1786389092271
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/editable.cjs +1 -1
- package/dist/editable.css +1 -1
- package/dist/editable.d.ts +14 -8
- package/dist/editable.mjs +1438 -1253
- package/dist/history-chords-BIU47Fn4.cjs +1 -0
- package/dist/{history-chords-C4ubfbkC.js → history-chords-Zvti7FbB.js} +8 -8
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/history-chords-B9Z337V_.cjs +0 -1
package/dist/editable.mjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { g as
|
|
3
|
-
import { AddAnnotationCommand as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { useShallow as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
import
|
|
9
|
-
import { assignInlineVars as
|
|
10
|
-
import { Menu as
|
|
11
|
-
import { Menu as
|
|
12
|
-
import { Accordion as
|
|
13
|
-
import { NumberField as
|
|
14
|
-
import { Radio as
|
|
15
|
-
import { RadioGroup as
|
|
16
|
-
import { Select as
|
|
17
|
-
import { Slider as
|
|
18
|
-
import { Switch as
|
|
19
|
-
import { Input as
|
|
20
|
-
import './editable.css';var
|
|
21
|
-
const { chartId: t } =
|
|
22
|
-
return i === null ? null : /* @__PURE__ */ m(
|
|
1
|
+
import { B as De, D as ue, E as Ot, F as Nt, I as kt, L as He, M as Vs, N as A, Q as Mt, S as ee, V as de, Z as Et, b as T, c as Rt, d as q, et as _t, f as ve, h as xn, i as Dt, k as ze, l as Ht, m as zt, n as R, o as Tn, p as Ne, r as Vt, rt as U, s as Ft, t as Bt, tt as G, u as fe, v as Kt, x as X, y as we } from "./history-chords-Zvti7FbB.js";
|
|
2
|
+
import { g as Gt } from "./font-values-CPxYeqns.js";
|
|
3
|
+
import { ARROW_DEFAULTS as Ut, AddAnnotationCommand as j, AddHighlightCommand as Wt, BORDER_RADIUS_TOKENS as je, CONSTANT_VARIABLES as qt, DEFAULT_BAR_BORDER_RADIUS as Zt, DEFAULT_POINT_SIZE as $t, DEFAULT_STROKE_WIDTH as Xt, DIFFERENCE_ARROW_DEFAULTS as Pn, MAX_BAR_WIDTH as jt, MIN_BAR_WIDTH as Yt, RESTING_HOVER_STATE as In, RemoveAnnotationCommand as Ve, RemoveHighlightCommand as Qt, SHAPE_DEFAULTS as Jt, SetAppearanceCornerRadiusCommand as er, SetAppearanceTextScaleCommand as nr, SetAxisLabelCommand as tr, SetAxisPositionCommand as rr, SetAxisTickModeCommand as ar, SetAxisTicksVisibilityCommand as or, SetAxisVisibilityCommand as ir, SetBarBorderRadiusCommand as lr, SetBarWidthCommand as sr, SetChartTypeCommand as cr, SetContentCaptionCommand as dr, SetContentSourceCommand as hr, SetContentSubtitleCommand as ur, SetContentTitleCommand as mr, SetDataLabelsFormatCommand as pr, SetGridLineStyleCommand as gr, SetGridLineWidthCommand as vr, SetGridVisibilityCommand as fr, SetHeadlineCompareWithCommand as Cr, SetHeadlinePositionCommand as br, SetHeadlineShowCommand as Ye, SetHeadlineSizeCommand as yr, SetHighlightDimStyleCommand as Sr, SetLegendAlignCommand as wr, SetLegendDisplayCommand as xr, SetLegendPositionCommand as Tr, SetLineInterpolationCommand as Pr, SetLineMissingValuesCommand as Ir, SetLineWidthCommand as Qe, SetNumberFormatAbbreviationCommand as Ar, SetNumberFormatDecimalsCommand as Je, SetPointSizeCommand as Lr, SetPolarInnerRadiusCommand as Or, SetPolarStartAngleCommand as Nr, SetScaleDomainCommand as ge, SetScaleReverseCommand as kr, SetScaleTransformCommand as Mr, SetScaleZeroCommand as en, TEXT_ANNOTATION_DEFAULTS as Er, ToggleCategoryLabelsCommand as Rr, ToggleContentVisibilityCommand as xe, ToggleDataLabelsCommand as _r, ToggleLineFillCommand as Dr, ToggleLinePointsVisibilityCommand as Hr, ToggleStackTotalsCommand as zr, UpdateAnnotationCommand as An, areAnchorsEqual as Ln, areEndpointsComparable as Vr, buildEditMenuTriggerRegion as Fr, buildLayerStyleAddress as Br, buildObservationAnchor as Kr, buildObservationPredicate as Gr, canAnchorDirectLabels as Ur, canPlaceDataLabels as Wr, createObservationAnchorParser as qr, createStyleResolver as Zr, extractVariableName as $r, filterLayersByGeoms as ke, findHighlightsAtObservation as Xr, findLayerByGeom as On, findObservationAttachment as jr, findStyleRule as Yr, formatDifferenceLabel as Qr, getColor as Jr, hasMultipleGroups as ea, inferDefaultDifferenceArrowEndpoints as na, inferDifferenceArrowEndpoints as ta, isCompanionLayer as Nn, isObservationAttachmentKind as ra, isPointWithinEditMenuTrigger as kn, isSafeUrl as aa, projectAnchorToPanel as oa, readChartType as ia, readHighlightDimStyle as la, resolveComparisonBasis as sa, resolveObservationPoint as Me, stepDifferenceArrowEndpoint as ca, toPanelCursor as Fe } from "@graphysdk/viz-engine";
|
|
4
|
+
import { createContext as me, useCallback as Ce, useContext as ie, useEffect as V, useId as ae, useMemo as E, useRef as be, useState as Z } from "react";
|
|
5
|
+
import { Fragment as K, jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
6
|
+
import { useShallow as Be } from "zustand/react/shallow";
|
|
7
|
+
import { createPortal as da } from "react-dom";
|
|
8
|
+
import oe from "clsx";
|
|
9
|
+
import { assignInlineVars as Mn } from "@vanilla-extract/dynamic";
|
|
10
|
+
import { Menu as D } from "@base-ui/react/menu";
|
|
11
|
+
import { Menu as Y } from "@base-ui/react";
|
|
12
|
+
import { Accordion as ce } from "@base-ui/react/accordion";
|
|
13
|
+
import { NumberField as nn } from "@base-ui/react/number-field";
|
|
14
|
+
import { Radio as En } from "@base-ui/react/radio";
|
|
15
|
+
import { RadioGroup as Rn } from "@base-ui/react/radio-group";
|
|
16
|
+
import { Select as W } from "@base-ui/react/select";
|
|
17
|
+
import { Slider as le } from "@base-ui/react/slider";
|
|
18
|
+
import { Switch as tn } from "@base-ui/react/switch";
|
|
19
|
+
import { Input as ha } from "@base-ui/react/input";
|
|
20
|
+
import './editable.css';var ua = "data-graphy-chart-chrome", ma = "data-graphy-chart-menu", _n = { [ma]: "" }, ye = (e) => ({ [ua]: e }), Dn = (e, t) => e instanceof Element && e.closest(`[data-graphy-chart-chrome="${CSS.escape(t)}"]`) !== null, pa = (e) => e instanceof Element && e.closest("[data-graphy-chart-menu]") !== null, ga = (e) => e instanceof Element && e.closest("[data-graphy-chart-chrome]") !== null, he = (e, t, i) => e instanceof Node && (t.contains(e) || Dn(e, i)), va = "cml7ha0", Hn = me(null), fa = ({ children: e }) => {
|
|
21
|
+
const { chartId: t } = U(), [i] = Z(He), [a, o] = Z(null);
|
|
22
|
+
return i === null ? null : /* @__PURE__ */ m(K, { children: [da(/* @__PURE__ */ n("div", {
|
|
23
23
|
ref: o,
|
|
24
|
-
className:
|
|
25
|
-
...
|
|
26
|
-
}), i), /* @__PURE__ */ n(
|
|
27
|
-
value:
|
|
24
|
+
className: va,
|
|
25
|
+
...ye(t)
|
|
26
|
+
}), i), /* @__PURE__ */ n(Hn.Provider, {
|
|
27
|
+
value: a,
|
|
28
28
|
children: e
|
|
29
29
|
})] });
|
|
30
|
-
},
|
|
30
|
+
}, Ke = () => ie(Hn), zn = (e) => /* @__PURE__ */ m(T, {
|
|
31
31
|
viewBox: "0 0 16 16",
|
|
32
32
|
...e,
|
|
33
33
|
children: [
|
|
@@ -53,91 +53,91 @@ import './editable.css';var oa = "data-graphy-chart-chrome", ia = "data-graphy-c
|
|
|
53
53
|
})
|
|
54
54
|
]
|
|
55
55
|
});
|
|
56
|
-
var
|
|
56
|
+
var Vn = "efjmb40", Fn = "efjmb41", ne = "efjmb42", te = "efjmb43", Ca = "efjmb44", ba = "efjmb45", ya = /* @__PURE__ */ new Set([
|
|
57
57
|
"item-press",
|
|
58
58
|
"escape-key",
|
|
59
59
|
"outside-press",
|
|
60
60
|
"close-press",
|
|
61
61
|
"sibling-open",
|
|
62
62
|
"trigger-press"
|
|
63
|
-
]),
|
|
64
|
-
const o =
|
|
65
|
-
s ? (l(!0), i?.()) :
|
|
63
|
+
]), Ge = ({ label: e, icon: t, onOpened: i, children: a }) => {
|
|
64
|
+
const o = Ke(), [r, l] = Z(!1), c = (s, u) => {
|
|
65
|
+
s ? (l(!0), i?.()) : ya.has(u.reason) && l(!1);
|
|
66
66
|
};
|
|
67
|
-
return /* @__PURE__ */ m(
|
|
68
|
-
open:
|
|
67
|
+
return /* @__PURE__ */ m(Y.SubmenuRoot, {
|
|
68
|
+
open: r,
|
|
69
69
|
onOpenChange: c,
|
|
70
|
-
children: [/* @__PURE__ */ n(
|
|
70
|
+
children: [/* @__PURE__ */ n(Sa, {
|
|
71
71
|
label: e,
|
|
72
72
|
icon: t
|
|
73
|
-
}), /* @__PURE__ */ n(
|
|
73
|
+
}), /* @__PURE__ */ n(Y.Portal, {
|
|
74
74
|
container: o,
|
|
75
|
-
children: /* @__PURE__ */ n(
|
|
75
|
+
children: /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(Y.Positioner, {
|
|
76
76
|
side: "right",
|
|
77
77
|
align: "start",
|
|
78
78
|
sideOffset: 4,
|
|
79
|
-
className:
|
|
80
|
-
...
|
|
81
|
-
children: /* @__PURE__ */ n(
|
|
82
|
-
className:
|
|
83
|
-
children:
|
|
79
|
+
className: Vn,
|
|
80
|
+
..._n,
|
|
81
|
+
children: /* @__PURE__ */ n(Y.Popup, {
|
|
82
|
+
className: Fn,
|
|
83
|
+
children: a
|
|
84
84
|
})
|
|
85
85
|
}) })
|
|
86
86
|
})]
|
|
87
87
|
});
|
|
88
|
-
},
|
|
89
|
-
className:
|
|
88
|
+
}, Sa = ({ label: e, icon: t }) => /* @__PURE__ */ m(Y.SubmenuTrigger, {
|
|
89
|
+
className: ne,
|
|
90
90
|
openOnHover: !1,
|
|
91
91
|
children: [
|
|
92
92
|
t,
|
|
93
93
|
/* @__PURE__ */ n("span", {
|
|
94
|
-
className:
|
|
94
|
+
className: te,
|
|
95
95
|
children: e
|
|
96
96
|
}),
|
|
97
97
|
/* @__PURE__ */ n("span", {
|
|
98
|
-
className:
|
|
99
|
-
children: /* @__PURE__ */ n(
|
|
98
|
+
className: ba,
|
|
99
|
+
children: /* @__PURE__ */ n(we, { size: "sm" })
|
|
100
100
|
})
|
|
101
101
|
]
|
|
102
|
-
}),
|
|
103
|
-
const
|
|
104
|
-
u.length !== 0 && (s(new
|
|
102
|
+
}), wa = "_1qe7q450", xa = "_1qe7q451", Ta = "_1qe7q452", Pa = ({ label: e, placeholder: t, addLabel: i, at: a, onRequestClose: o }) => {
|
|
103
|
+
const r = be(null), [l, c] = Z(""), { dispatch: s } = ee(), u = l.trim(), d = () => {
|
|
104
|
+
u.length !== 0 && (s(new j({
|
|
105
105
|
kind: "comment",
|
|
106
106
|
annotation: {
|
|
107
|
-
at:
|
|
108
|
-
content:
|
|
107
|
+
at: a,
|
|
108
|
+
content: Ia(u)
|
|
109
109
|
}
|
|
110
110
|
})), o());
|
|
111
111
|
};
|
|
112
|
-
return /* @__PURE__ */ n(
|
|
112
|
+
return /* @__PURE__ */ n(Ge, {
|
|
113
113
|
label: e,
|
|
114
|
-
icon: /* @__PURE__ */ n(
|
|
114
|
+
icon: /* @__PURE__ */ n(zn, {}),
|
|
115
115
|
onOpened: () => {
|
|
116
|
-
requestAnimationFrame(() =>
|
|
116
|
+
requestAnimationFrame(() => r.current?.focus());
|
|
117
117
|
},
|
|
118
118
|
children: /* @__PURE__ */ m("div", {
|
|
119
|
-
className:
|
|
119
|
+
className: wa,
|
|
120
120
|
children: [/* @__PURE__ */ n("input", {
|
|
121
|
-
ref:
|
|
122
|
-
className:
|
|
121
|
+
ref: r,
|
|
122
|
+
className: xa,
|
|
123
123
|
value: l,
|
|
124
124
|
placeholder: t,
|
|
125
|
-
onChange: (
|
|
126
|
-
c(
|
|
125
|
+
onChange: (v) => {
|
|
126
|
+
c(v.target.value);
|
|
127
127
|
},
|
|
128
|
-
onKeyDown: (
|
|
129
|
-
|
|
128
|
+
onKeyDown: (v) => {
|
|
129
|
+
v.key === "Enter" && (v.preventDefault(), d()), v.key !== "Escape" && v.stopPropagation();
|
|
130
130
|
}
|
|
131
131
|
}), /* @__PURE__ */ n("button", {
|
|
132
132
|
type: "button",
|
|
133
|
-
className:
|
|
133
|
+
className: Ta,
|
|
134
134
|
disabled: u.length === 0,
|
|
135
135
|
onClick: d,
|
|
136
136
|
children: i
|
|
137
137
|
})]
|
|
138
138
|
})
|
|
139
139
|
});
|
|
140
|
-
},
|
|
140
|
+
}, Ia = (e) => ({
|
|
141
141
|
type: "doc",
|
|
142
142
|
content: [{
|
|
143
143
|
type: "paragraph",
|
|
@@ -146,7 +146,7 @@ var Dn = "efjmb40", zn = "efjmb41", ee = "efjmb42", ne = "efjmb43", ha = "efjmb4
|
|
|
146
146
|
text: e
|
|
147
147
|
}]
|
|
148
148
|
}]
|
|
149
|
-
}),
|
|
149
|
+
}), Aa = (e) => /* @__PURE__ */ n(T, {
|
|
150
150
|
viewBox: "0 0 15 14",
|
|
151
151
|
...e,
|
|
152
152
|
children: /* @__PURE__ */ n("path", {
|
|
@@ -154,89 +154,89 @@ var Dn = "efjmb40", zn = "efjmb41", ee = "efjmb42", ne = "efjmb43", ha = "efjmb4
|
|
|
154
154
|
fill: "currentColor",
|
|
155
155
|
fillOpacity: "0.8"
|
|
156
156
|
})
|
|
157
|
-
}),
|
|
158
|
-
const { dispatch: o } =
|
|
157
|
+
}), La = "relative-difference", Oa = ({ label: e, layer: t, at: i, onRequestClose: a }) => {
|
|
158
|
+
const { dispatch: o } = ee(), r = G((s) => s.coordSystem), l = E(() => ta({
|
|
159
159
|
layer: t,
|
|
160
160
|
at: i,
|
|
161
|
-
coordSystem:
|
|
161
|
+
coordSystem: r
|
|
162
162
|
}), [
|
|
163
163
|
t,
|
|
164
164
|
i,
|
|
165
|
-
|
|
165
|
+
r
|
|
166
166
|
]);
|
|
167
167
|
if (l === null) return null;
|
|
168
168
|
const c = () => {
|
|
169
|
-
o(new
|
|
169
|
+
o(new j({
|
|
170
170
|
kind: "differenceArrow",
|
|
171
171
|
annotation: {
|
|
172
|
-
...
|
|
172
|
+
...Pn,
|
|
173
173
|
...l,
|
|
174
|
-
label:
|
|
174
|
+
label: La
|
|
175
175
|
}
|
|
176
|
-
})),
|
|
176
|
+
})), a();
|
|
177
177
|
};
|
|
178
|
-
return /* @__PURE__ */ m(
|
|
179
|
-
className:
|
|
178
|
+
return /* @__PURE__ */ m(D.Item, {
|
|
179
|
+
className: ne,
|
|
180
180
|
onClick: c,
|
|
181
|
-
children: [/* @__PURE__ */ n(
|
|
182
|
-
className:
|
|
181
|
+
children: [/* @__PURE__ */ n(Aa, {}), /* @__PURE__ */ n("span", {
|
|
182
|
+
className: te,
|
|
183
183
|
children: e
|
|
184
184
|
})]
|
|
185
185
|
});
|
|
186
186
|
};
|
|
187
|
-
function
|
|
188
|
-
if (e.type === "polar" && !
|
|
187
|
+
function Na(e, t) {
|
|
188
|
+
if (e.type === "polar" && !ka(t)) return [{
|
|
189
189
|
scope: "series",
|
|
190
190
|
labelKey: "pieSlice"
|
|
191
191
|
}];
|
|
192
|
-
const i =
|
|
192
|
+
const i = ea(t.data, t.mapping);
|
|
193
193
|
switch (t.geom) {
|
|
194
194
|
case "bar": {
|
|
195
|
-
const
|
|
195
|
+
const a = [{
|
|
196
196
|
scope: "data-point",
|
|
197
197
|
labelKey: "bar"
|
|
198
198
|
}];
|
|
199
199
|
if (i) {
|
|
200
200
|
const o = t.position === "stack" || t.position === "fill";
|
|
201
|
-
|
|
201
|
+
a.push({
|
|
202
202
|
scope: "x-value",
|
|
203
203
|
labelKey: o ? "barStack" : "barGroup"
|
|
204
|
-
}),
|
|
204
|
+
}), a.push({
|
|
205
205
|
scope: "series",
|
|
206
206
|
labelKey: "barSeries"
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
-
return
|
|
209
|
+
return a;
|
|
210
210
|
}
|
|
211
211
|
case "line":
|
|
212
212
|
case "area": {
|
|
213
|
-
const
|
|
213
|
+
const a = [{
|
|
214
214
|
scope: "data-point",
|
|
215
215
|
labelKey: "linePoint"
|
|
216
216
|
}];
|
|
217
|
-
return i &&
|
|
217
|
+
return i && a.push({
|
|
218
218
|
scope: "series",
|
|
219
219
|
labelKey: "lineSeries"
|
|
220
|
-
}),
|
|
220
|
+
}), a;
|
|
221
221
|
}
|
|
222
222
|
case "point": {
|
|
223
|
-
const
|
|
223
|
+
const a = [{
|
|
224
224
|
scope: "data-point",
|
|
225
225
|
labelKey: "scatterPoint"
|
|
226
226
|
}];
|
|
227
|
-
return i &&
|
|
227
|
+
return i && a.push({
|
|
228
228
|
scope: "series",
|
|
229
229
|
labelKey: "scatterSeries"
|
|
230
|
-
}),
|
|
230
|
+
}), a;
|
|
231
231
|
}
|
|
232
232
|
default:
|
|
233
233
|
return [];
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
var
|
|
237
|
-
const t =
|
|
238
|
-
return t !== null && t !==
|
|
239
|
-
},
|
|
236
|
+
var ka = (e) => {
|
|
237
|
+
const t = $r(e.mapping.x);
|
|
238
|
+
return t !== null && t !== qt.x;
|
|
239
|
+
}, Ma = (e) => /* @__PURE__ */ m(T, {
|
|
240
240
|
viewBox: "0 0 16 16",
|
|
241
241
|
...e,
|
|
242
242
|
children: [
|
|
@@ -275,7 +275,7 @@ var Pa = (e) => {
|
|
|
275
275
|
rx: ".533"
|
|
276
276
|
})
|
|
277
277
|
]
|
|
278
|
-
}),
|
|
278
|
+
}), Ea = (e) => /* @__PURE__ */ m(T, {
|
|
279
279
|
viewBox: "0 0 16 16",
|
|
280
280
|
...e,
|
|
281
281
|
children: [
|
|
@@ -314,7 +314,7 @@ var Pa = (e) => {
|
|
|
314
314
|
rx: ".533"
|
|
315
315
|
})
|
|
316
316
|
]
|
|
317
|
-
}),
|
|
317
|
+
}), Ra = (e) => /* @__PURE__ */ m(T, {
|
|
318
318
|
viewBox: "0 0 16 16",
|
|
319
319
|
...e,
|
|
320
320
|
children: [
|
|
@@ -353,7 +353,7 @@ var Pa = (e) => {
|
|
|
353
353
|
rx: ".533"
|
|
354
354
|
})
|
|
355
355
|
]
|
|
356
|
-
}),
|
|
356
|
+
}), _a = (e) => /* @__PURE__ */ m(T, {
|
|
357
357
|
viewBox: "0 0 16 16",
|
|
358
358
|
...e,
|
|
359
359
|
children: [
|
|
@@ -373,7 +373,7 @@ var Pa = (e) => {
|
|
|
373
373
|
d: "M11.733 10.074H16v5.408a.52.52 0 0 1-.518.518h-3.23a.52.52 0 0 1-.519-.518zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
|
|
374
374
|
})
|
|
375
375
|
]
|
|
376
|
-
}),
|
|
376
|
+
}), Da = (e) => /* @__PURE__ */ m(T, {
|
|
377
377
|
viewBox: "0 0 16 16",
|
|
378
378
|
...e,
|
|
379
379
|
children: [
|
|
@@ -407,7 +407,7 @@ var Pa = (e) => {
|
|
|
407
407
|
d: "M5.29 6.62a1.3 1.3 0 0 1-.424-.075 1 1 0 0 1-.373-.244 1.2 1.2 0 0 1-.262-.45 2.1 2.1 0 0 1-.096-.699q0-.389.082-.693.083-.304.238-.514a1.05 1.05 0 0 1 .374-.322q.22-.11.492-.11.285 0 .505.112a.973.973 0 0 1 .526.744h-.54a.5.5 0 0 0-.17-.277.5.5 0 0 0-.321-.105.54.54 0 0 0-.485.273q-.168.273-.17.75h.021a.8.8 0 0 1 .188-.223.92.92 0 0 1 .569-.195.91.91 0 0 1 .813.477q.125.222.123.509 0 .297-.136.536a1 1 0 0 1-.383.372 1.15 1.15 0 0 1-.571.134m-.003-.443a.54.54 0 0 0 .288-.078.57.57 0 0 0 .2-.211.6.6 0 0 0 .073-.299.6.6 0 0 0-.07-.294.54.54 0 0 0-.484-.285.55.55 0 0 0-.403.173.596.596 0 0 0 .108.914.53.53 0 0 0 .288.08M6.88 6.579v-.396l1.05-1.03q.15-.15.25-.27a1 1 0 0 0 .151-.229.6.6 0 0 0 .05-.236.432.432 0 0 0-.244-.405.6.6 0 0 0-.258-.056q-.15 0-.261.062a.43.43 0 0 0-.175.173.56.56 0 0 0-.06.267H6.86q0-.288.132-.5a.9.9 0 0 1 .362-.33q.231-.117.532-.117.303 0 .534.114.23.114.358.312a.8.8 0 0 1 .128.452.9.9 0 0 1-.065.334q-.065.164-.229.363-.162.2-.456.483l-.522.53v.021h1.318v.458zM10.57 6.62a1.3 1.3 0 0 1-.423-.075 1 1 0 0 1-.373-.244 1.2 1.2 0 0 1-.263-.45 2.1 2.1 0 0 1-.096-.699q0-.389.083-.693t.238-.514a1.05 1.05 0 0 1 .374-.322q.219-.11.492-.11.285 0 .505.112a.973.973 0 0 1 .526.744h-.54a.5.5 0 0 0-.17-.277.5.5 0 0 0-.322-.105.54.54 0 0 0-.484.273q-.168.273-.17.75h.02a.8.8 0 0 1 .188-.223.92.92 0 0 1 .569-.195.91.91 0 0 1 .814.477q.125.222.123.509 0 .297-.136.536a1 1 0 0 1-.383.372 1.15 1.15 0 0 1-.572.134m-.002-.443a.54.54 0 0 0 .288-.078.57.57 0 0 0 .2-.211.6.6 0 0 0 .073-.299.6.6 0 0 0-.071-.294.54.54 0 0 0-.483-.285.54.54 0 0 0-.403.173.597.597 0 0 0 .107.914.53.53 0 0 0 .289.08"
|
|
408
408
|
})
|
|
409
409
|
]
|
|
410
|
-
}),
|
|
410
|
+
}), Ha = (e) => /* @__PURE__ */ m(T, {
|
|
411
411
|
viewBox: "0 0 16 16",
|
|
412
412
|
...e,
|
|
413
413
|
children: [
|
|
@@ -448,7 +448,7 @@ var Pa = (e) => {
|
|
|
448
448
|
fillOpacity: "0.8"
|
|
449
449
|
})
|
|
450
450
|
]
|
|
451
|
-
}),
|
|
451
|
+
}), za = (e) => /* @__PURE__ */ m(T, {
|
|
452
452
|
viewBox: "0 0 16 16",
|
|
453
453
|
...e,
|
|
454
454
|
children: [
|
|
@@ -470,7 +470,7 @@ var Pa = (e) => {
|
|
|
470
470
|
d: "M15.999 8a8 8 0 0 1-7.588 7.989l-.412.01V8z"
|
|
471
471
|
})
|
|
472
472
|
]
|
|
473
|
-
}),
|
|
473
|
+
}), Va = (e) => /* @__PURE__ */ m(T, {
|
|
474
474
|
viewBox: "0 0 16 16",
|
|
475
475
|
...e,
|
|
476
476
|
children: [
|
|
@@ -531,7 +531,7 @@ var Pa = (e) => {
|
|
|
531
531
|
transform: "matrix(-1 0 0 1 15.933 .533)"
|
|
532
532
|
})
|
|
533
533
|
]
|
|
534
|
-
}),
|
|
534
|
+
}), Fa = (e) => /* @__PURE__ */ m(T, {
|
|
535
535
|
viewBox: "0 0 16 16",
|
|
536
536
|
...e,
|
|
537
537
|
children: [
|
|
@@ -592,20 +592,20 @@ var Pa = (e) => {
|
|
|
592
592
|
transform: "matrix(-1 0 0 1 15.933 .533)"
|
|
593
593
|
})
|
|
594
594
|
]
|
|
595
|
-
}),
|
|
596
|
-
bar:
|
|
597
|
-
barGroup:
|
|
598
|
-
barStack:
|
|
599
|
-
barSeries:
|
|
600
|
-
linePoint:
|
|
601
|
-
lineSeries:
|
|
602
|
-
scatterPoint:
|
|
603
|
-
scatterSeries:
|
|
604
|
-
pieSlice:
|
|
605
|
-
},
|
|
606
|
-
const t =
|
|
595
|
+
}), Ba = {
|
|
596
|
+
bar: Ma,
|
|
597
|
+
barGroup: Ea,
|
|
598
|
+
barStack: _a,
|
|
599
|
+
barSeries: Ra,
|
|
600
|
+
linePoint: Da,
|
|
601
|
+
lineSeries: Ha,
|
|
602
|
+
scatterPoint: Va,
|
|
603
|
+
scatterSeries: Fa,
|
|
604
|
+
pieSlice: za
|
|
605
|
+
}, Bn = ({ labelKey: e }) => {
|
|
606
|
+
const t = Ba[e];
|
|
607
607
|
return /* @__PURE__ */ n(t, {});
|
|
608
|
-
},
|
|
608
|
+
}, Kn = (e) => /* @__PURE__ */ m(T, {
|
|
609
609
|
viewBox: "0 0 16 16",
|
|
610
610
|
...e,
|
|
611
611
|
children: [/* @__PURE__ */ n("path", {
|
|
@@ -618,81 +618,81 @@ var Pa = (e) => {
|
|
|
618
618
|
fill: "currentColor",
|
|
619
619
|
fillOpacity: "0.8"
|
|
620
620
|
})]
|
|
621
|
-
}),
|
|
622
|
-
const
|
|
623
|
-
return /* @__PURE__ */ n(
|
|
621
|
+
}), Ka = ({ label: e, options: t, onSelect: i }) => {
|
|
622
|
+
const a = A();
|
|
623
|
+
return /* @__PURE__ */ n(Ge, {
|
|
624
624
|
label: e,
|
|
625
|
-
icon: /* @__PURE__ */ n(
|
|
626
|
-
children: t.map((o) => /* @__PURE__ */ m(
|
|
627
|
-
className:
|
|
625
|
+
icon: /* @__PURE__ */ n(Kn, {}),
|
|
626
|
+
children: t.map((o) => /* @__PURE__ */ m(Y.Item, {
|
|
627
|
+
className: ne,
|
|
628
628
|
onClick: () => i(o.scope),
|
|
629
|
-
children: [/* @__PURE__ */ n(
|
|
630
|
-
className:
|
|
631
|
-
children:
|
|
629
|
+
children: [/* @__PURE__ */ n(Bn, { labelKey: o.labelKey }), /* @__PURE__ */ n("span", {
|
|
630
|
+
className: te,
|
|
631
|
+
children: a(`graph.annotations.highlights.labels.${o.labelKey}`)
|
|
632
632
|
})]
|
|
633
633
|
}, o.scope))
|
|
634
634
|
});
|
|
635
|
-
},
|
|
636
|
-
const
|
|
637
|
-
const p = new Set(
|
|
638
|
-
return u.filter((
|
|
639
|
-
}, [u,
|
|
635
|
+
}, Ga = ({ label: e, layer: t, observation: i, highlights: a, onRequestClose: o }) => {
|
|
636
|
+
const r = A(), { dispatch: l } = ee(), c = G((p) => p.coordSystem), s = E(() => Gr(t, i), [t, i]), u = E(() => Na(c, t), [c, t]), d = E(() => {
|
|
637
|
+
const p = new Set(a.map((v) => v.scope));
|
|
638
|
+
return u.filter((v) => !p.has(v.scope));
|
|
639
|
+
}, [u, a]), [h] = d;
|
|
640
640
|
if (s === null || h === void 0) return null;
|
|
641
|
-
const
|
|
642
|
-
l(new
|
|
641
|
+
const g = (p) => {
|
|
642
|
+
l(new Wt({
|
|
643
643
|
predicate: s,
|
|
644
644
|
scope: p,
|
|
645
645
|
layerId: t.id
|
|
646
646
|
})), o();
|
|
647
647
|
};
|
|
648
648
|
if (d.length === 1) {
|
|
649
|
-
const p = u.length === 1 ? e :
|
|
650
|
-
return /* @__PURE__ */ m(
|
|
651
|
-
className:
|
|
652
|
-
onClick: () =>
|
|
653
|
-
children: [/* @__PURE__ */ n(
|
|
654
|
-
className:
|
|
649
|
+
const p = u.length === 1 ? e : r("graph.annotations.baseMenu.highlightWithLabel", { label: r(`graph.annotations.highlights.labels.${h.labelKey}`) });
|
|
650
|
+
return /* @__PURE__ */ m(Y.Item, {
|
|
651
|
+
className: ne,
|
|
652
|
+
onClick: () => g(h.scope),
|
|
653
|
+
children: [/* @__PURE__ */ n(Bn, { labelKey: h.labelKey }), /* @__PURE__ */ n("span", {
|
|
654
|
+
className: te,
|
|
655
655
|
children: p
|
|
656
656
|
})]
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
-
return /* @__PURE__ */ n(
|
|
659
|
+
return /* @__PURE__ */ n(Ka, {
|
|
660
660
|
label: e,
|
|
661
661
|
options: d,
|
|
662
|
-
onSelect:
|
|
662
|
+
onSelect: g
|
|
663
663
|
});
|
|
664
|
-
},
|
|
665
|
-
className:
|
|
664
|
+
}, Ua = "_1aafi1g0", Wa = "_1aafi1g1", Gn = ({ children: e }) => /* @__PURE__ */ m("span", {
|
|
665
|
+
className: Ua,
|
|
666
666
|
"aria-hidden": "true",
|
|
667
|
-
children: [e, /* @__PURE__ */ n("span", { className:
|
|
668
|
-
}),
|
|
669
|
-
const { dispatch:
|
|
667
|
+
children: [e, /* @__PURE__ */ n("span", { className: Wa })]
|
|
668
|
+
}), qa = ({ label: e, highlights: t, onRequestClose: i }) => {
|
|
669
|
+
const { dispatch: a } = ee(), o = t.at(-1);
|
|
670
670
|
if (o === void 0) return null;
|
|
671
|
-
const
|
|
672
|
-
|
|
671
|
+
const r = () => {
|
|
672
|
+
a(new Qt({ id: o.id })), i();
|
|
673
673
|
};
|
|
674
|
-
return /* @__PURE__ */ m(
|
|
675
|
-
className:
|
|
676
|
-
onClick:
|
|
677
|
-
children: [/* @__PURE__ */ n(
|
|
678
|
-
className:
|
|
674
|
+
return /* @__PURE__ */ m(D.Item, {
|
|
675
|
+
className: ne,
|
|
676
|
+
onClick: r,
|
|
677
|
+
children: [/* @__PURE__ */ n(Gn, { children: /* @__PURE__ */ n(Kn, {}) }), /* @__PURE__ */ n("span", {
|
|
678
|
+
className: te,
|
|
679
679
|
children: e
|
|
680
680
|
})]
|
|
681
681
|
});
|
|
682
|
-
},
|
|
683
|
-
const i =
|
|
684
|
-
return
|
|
682
|
+
}, Za = (e, t) => {
|
|
683
|
+
const i = G((o) => o.spec.highlights), a = G((o) => o.config.parsingLocale);
|
|
684
|
+
return E(() => Xr({
|
|
685
685
|
layer: e,
|
|
686
686
|
highlights: i,
|
|
687
687
|
observation: t,
|
|
688
|
-
parsingLocale:
|
|
688
|
+
parsingLocale: a
|
|
689
689
|
}), [
|
|
690
690
|
e,
|
|
691
691
|
i,
|
|
692
692
|
t,
|
|
693
|
-
|
|
693
|
+
a
|
|
694
694
|
]);
|
|
695
|
-
},
|
|
695
|
+
}, Un = (e) => /* @__PURE__ */ m(T, {
|
|
696
696
|
viewBox: "0 0 16 16",
|
|
697
697
|
...e,
|
|
698
698
|
children: [
|
|
@@ -715,22 +715,22 @@ var Pa = (e) => {
|
|
|
715
715
|
fillOpacity: "0.8"
|
|
716
716
|
})
|
|
717
717
|
]
|
|
718
|
-
}),
|
|
719
|
-
const { dispatch:
|
|
720
|
-
|
|
718
|
+
}), $a = ({ label: e, at: t, onRequestClose: i }) => {
|
|
719
|
+
const { dispatch: a } = ee(), o = () => {
|
|
720
|
+
a(new j({
|
|
721
721
|
kind: "pinnedNumber",
|
|
722
722
|
annotation: { at: t }
|
|
723
723
|
})), i();
|
|
724
724
|
};
|
|
725
|
-
return /* @__PURE__ */ m(
|
|
726
|
-
className:
|
|
725
|
+
return /* @__PURE__ */ m(D.Item, {
|
|
726
|
+
className: ne,
|
|
727
727
|
onClick: o,
|
|
728
|
-
children: [/* @__PURE__ */ n(
|
|
729
|
-
className:
|
|
728
|
+
children: [/* @__PURE__ */ n(Un, {}), /* @__PURE__ */ n("span", {
|
|
729
|
+
className: te,
|
|
730
730
|
children: e
|
|
731
731
|
})]
|
|
732
732
|
});
|
|
733
|
-
},
|
|
733
|
+
}, Wn = (e) => /* @__PURE__ */ m(T, {
|
|
734
734
|
viewBox: "0 0 16 16",
|
|
735
735
|
...e,
|
|
736
736
|
children: [
|
|
@@ -763,142 +763,142 @@ var Pa = (e) => {
|
|
|
763
763
|
fillOpacity: "0.8"
|
|
764
764
|
})
|
|
765
765
|
]
|
|
766
|
-
}),
|
|
766
|
+
}), qn = {
|
|
767
767
|
pinnedNumber: {
|
|
768
|
-
icon:
|
|
768
|
+
icon: Un,
|
|
769
769
|
labelKey: "graph.annotations.baseMenu.unpinNumber"
|
|
770
770
|
},
|
|
771
771
|
comment: {
|
|
772
|
-
icon:
|
|
772
|
+
icon: zn,
|
|
773
773
|
labelKey: "graph.annotations.baseMenu.removeAnnotation"
|
|
774
774
|
},
|
|
775
775
|
sticker: {
|
|
776
|
-
icon:
|
|
776
|
+
icon: Wn,
|
|
777
777
|
labelKey: "graph.annotations.baseMenu.removeSticker"
|
|
778
778
|
},
|
|
779
779
|
image: null
|
|
780
|
-
},
|
|
781
|
-
const i = A(), { dispatch:
|
|
782
|
-
|
|
780
|
+
}, Xa = (e) => ra(e.kind) && qn[e.kind] !== null, ja = ({ attachment: e, onRequestClose: t }) => {
|
|
781
|
+
const i = A(), { dispatch: a } = ee(), { icon: o, labelKey: r } = qn[e.kind], l = () => {
|
|
782
|
+
a(new Ve({ id: e.annotation.id })), t();
|
|
783
783
|
};
|
|
784
|
-
return /* @__PURE__ */ m(
|
|
785
|
-
className:
|
|
784
|
+
return /* @__PURE__ */ m(D.Item, {
|
|
785
|
+
className: ne,
|
|
786
786
|
onClick: l,
|
|
787
|
-
children: [/* @__PURE__ */ n(
|
|
788
|
-
className:
|
|
789
|
-
children: i(
|
|
787
|
+
children: [/* @__PURE__ */ n(Gn, { children: /* @__PURE__ */ n(o, {}) }), /* @__PURE__ */ n("span", {
|
|
788
|
+
className: te,
|
|
789
|
+
children: i(r)
|
|
790
790
|
})]
|
|
791
791
|
});
|
|
792
|
-
},
|
|
793
|
-
const { dispatch:
|
|
794
|
-
|
|
792
|
+
}, Ya = "ceeojg0", Qa = "ceeojg1", Ja = "ceeojg2", eo = ({ label: e, at: t, onRequestClose: i }) => {
|
|
793
|
+
const { dispatch: a } = ee(), o = (r) => {
|
|
794
|
+
a(new j({
|
|
795
795
|
kind: "sticker",
|
|
796
796
|
annotation: {
|
|
797
797
|
at: {
|
|
798
798
|
anchorType: "observation",
|
|
799
799
|
...t
|
|
800
800
|
},
|
|
801
|
-
sticker:
|
|
801
|
+
sticker: r
|
|
802
802
|
}
|
|
803
803
|
})), i();
|
|
804
804
|
};
|
|
805
|
-
return /* @__PURE__ */ n(
|
|
805
|
+
return /* @__PURE__ */ n(Ge, {
|
|
806
806
|
label: e,
|
|
807
|
-
icon: /* @__PURE__ */ n(
|
|
807
|
+
icon: /* @__PURE__ */ n(Wn, {}),
|
|
808
808
|
children: /* @__PURE__ */ n("div", {
|
|
809
|
-
className:
|
|
810
|
-
children: Object.entries(
|
|
811
|
-
className:
|
|
812
|
-
"aria-label":
|
|
813
|
-
onClick: () => o(
|
|
809
|
+
className: Ya,
|
|
810
|
+
children: Object.entries(Ft).map(([r, l]) => /* @__PURE__ */ n(Y.Item, {
|
|
811
|
+
className: Qa,
|
|
812
|
+
"aria-label": r,
|
|
813
|
+
onClick: () => o(r),
|
|
814
814
|
children: /* @__PURE__ */ n("img", {
|
|
815
|
-
className:
|
|
815
|
+
className: Ja,
|
|
816
816
|
src: l.src,
|
|
817
|
-
alt:
|
|
817
|
+
alt: r
|
|
818
818
|
})
|
|
819
|
-
},
|
|
819
|
+
}, r))
|
|
820
820
|
})
|
|
821
821
|
});
|
|
822
|
-
},
|
|
823
|
-
const i = q(),
|
|
824
|
-
if (e.kind !== "menu" ||
|
|
822
|
+
}, no = ({ interaction: e, panelOrigin: t }) => {
|
|
823
|
+
const i = q(), a = fe((r) => r.menuTrigger);
|
|
824
|
+
if (e.kind !== "menu" || a === null) return null;
|
|
825
825
|
const o = () => {
|
|
826
826
|
i.getState().releaseInteraction("menu");
|
|
827
827
|
};
|
|
828
|
-
return /* @__PURE__ */ n(
|
|
828
|
+
return /* @__PURE__ */ n(to, {
|
|
829
829
|
trigger: {
|
|
830
|
-
x: t.x +
|
|
831
|
-
y: t.y +
|
|
832
|
-
radius:
|
|
830
|
+
x: t.x + a.center.x,
|
|
831
|
+
y: t.y + a.center.y,
|
|
832
|
+
radius: a.radius
|
|
833
833
|
},
|
|
834
834
|
layer: e.anchor.layer,
|
|
835
835
|
at: e.anchor.at,
|
|
836
836
|
observation: e.anchor.observation,
|
|
837
837
|
onClose: o
|
|
838
838
|
});
|
|
839
|
-
},
|
|
840
|
-
const
|
|
839
|
+
}, to = ({ trigger: e, layer: t, at: i, observation: a, onClose: o }) => {
|
|
840
|
+
const r = A(), l = Ke(), c = G((f) => f.spec.annotations), s = G((f) => f.config.parsingLocale), u = ao(), { x: d, y: h, radius: g } = e, p = E(() => ro(d, h, g), [
|
|
841
841
|
d,
|
|
842
842
|
h,
|
|
843
|
-
|
|
844
|
-
]),
|
|
845
|
-
!f &&
|
|
843
|
+
g
|
|
844
|
+
]), v = jr(c, i, E(() => qr(t, s), [t, s])), S = v !== null && Xa(v) ? v : null, P = Za(t, a), y = (f, x) => {
|
|
845
|
+
!f && oo(x.reason) && o();
|
|
846
846
|
};
|
|
847
|
-
return /* @__PURE__ */ n(
|
|
847
|
+
return /* @__PURE__ */ n(D.Root, {
|
|
848
848
|
open: u,
|
|
849
849
|
modal: !1,
|
|
850
850
|
onOpenChange: y,
|
|
851
|
-
children: /* @__PURE__ */ n(
|
|
851
|
+
children: /* @__PURE__ */ n(D.Portal, {
|
|
852
852
|
container: l,
|
|
853
|
-
children: /* @__PURE__ */ n(
|
|
853
|
+
children: /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(D.Positioner, {
|
|
854
854
|
anchor: p,
|
|
855
855
|
side: "right",
|
|
856
856
|
align: "start",
|
|
857
857
|
sideOffset: 8,
|
|
858
|
-
className:
|
|
859
|
-
...
|
|
860
|
-
children: /* @__PURE__ */ m(
|
|
861
|
-
className:
|
|
858
|
+
className: Vn,
|
|
859
|
+
..._n,
|
|
860
|
+
children: /* @__PURE__ */ m(D.Popup, {
|
|
861
|
+
className: Fn,
|
|
862
862
|
"data-testid": "observation-menu",
|
|
863
863
|
children: [
|
|
864
|
-
S !== null && /* @__PURE__ */ n(
|
|
864
|
+
S !== null && /* @__PURE__ */ n(ja, {
|
|
865
865
|
attachment: S,
|
|
866
866
|
onRequestClose: o
|
|
867
867
|
}),
|
|
868
|
-
/* @__PURE__ */ n(
|
|
869
|
-
label:
|
|
868
|
+
/* @__PURE__ */ n(qa, {
|
|
869
|
+
label: r("graph.annotations.baseMenu.removeHighlight"),
|
|
870
870
|
highlights: P,
|
|
871
871
|
onRequestClose: o
|
|
872
872
|
}),
|
|
873
|
-
/* @__PURE__ */ n(
|
|
874
|
-
S === null && /* @__PURE__ */ m(
|
|
875
|
-
/* @__PURE__ */ n(
|
|
876
|
-
label:
|
|
873
|
+
/* @__PURE__ */ n(D.Separator, { className: Ca }),
|
|
874
|
+
S === null && /* @__PURE__ */ m(K, { children: [
|
|
875
|
+
/* @__PURE__ */ n($a, {
|
|
876
|
+
label: r("graph.annotations.baseMenu.pinNumber"),
|
|
877
877
|
at: i,
|
|
878
878
|
onRequestClose: o
|
|
879
879
|
}),
|
|
880
|
-
/* @__PURE__ */ n(
|
|
881
|
-
label:
|
|
882
|
-
placeholder:
|
|
883
|
-
addLabel:
|
|
880
|
+
/* @__PURE__ */ n(Pa, {
|
|
881
|
+
label: r("graph.annotations.baseMenu.annotate"),
|
|
882
|
+
placeholder: r("graph.annotations.textMenu.placeholder"),
|
|
883
|
+
addLabel: r("graph.annotations.textMenu.addButton"),
|
|
884
884
|
at: i,
|
|
885
885
|
onRequestClose: o
|
|
886
886
|
}),
|
|
887
|
-
/* @__PURE__ */ n(
|
|
888
|
-
label:
|
|
887
|
+
/* @__PURE__ */ n(eo, {
|
|
888
|
+
label: r("graph.annotations.baseMenu.addSticker"),
|
|
889
889
|
at: i,
|
|
890
890
|
onRequestClose: o
|
|
891
891
|
})
|
|
892
892
|
] }),
|
|
893
|
-
t.highlight !== null && /* @__PURE__ */ n(
|
|
894
|
-
label:
|
|
893
|
+
t.highlight !== null && /* @__PURE__ */ n(Ga, {
|
|
894
|
+
label: r("graph.annotations.baseMenu.highlight"),
|
|
895
895
|
layer: t,
|
|
896
|
-
observation:
|
|
896
|
+
observation: a,
|
|
897
897
|
highlights: P,
|
|
898
898
|
onRequestClose: o
|
|
899
899
|
}),
|
|
900
|
-
/* @__PURE__ */ n(
|
|
901
|
-
label:
|
|
900
|
+
/* @__PURE__ */ n(Oa, {
|
|
901
|
+
label: r("graph.annotations.baseMenu.differenceArrow"),
|
|
902
902
|
layer: t,
|
|
903
903
|
at: i,
|
|
904
904
|
onRequestClose: o
|
|
@@ -908,19 +908,19 @@ var Pa = (e) => {
|
|
|
908
908
|
}) })
|
|
909
909
|
})
|
|
910
910
|
});
|
|
911
|
-
},
|
|
912
|
-
const [e, t] =
|
|
911
|
+
}, ro = (e, t, i) => ({ getBoundingClientRect: () => new DOMRect(e - i, t - i, i * 2, i * 2) }), ao = () => {
|
|
912
|
+
const [e, t] = Z(!1);
|
|
913
913
|
return V(() => {
|
|
914
914
|
t(!0);
|
|
915
915
|
}, []), e;
|
|
916
|
-
},
|
|
917
|
-
const e =
|
|
918
|
-
return
|
|
919
|
-
},
|
|
916
|
+
}, oo = (e) => e === "outside-press" || e === "escape-key" || e === "item-press", io = () => {
|
|
917
|
+
const e = Tn();
|
|
918
|
+
return Zn(e);
|
|
919
|
+
}, Zn = (e) => {
|
|
920
920
|
if (e.length !== 1) return null;
|
|
921
921
|
const [t] = e;
|
|
922
922
|
return t?.kind === "annotation" ? t.id : null;
|
|
923
|
-
},
|
|
923
|
+
}, lo = (e) => /* @__PURE__ */ n(T, {
|
|
924
924
|
...e,
|
|
925
925
|
children: /* @__PURE__ */ m("g", {
|
|
926
926
|
stroke: "currentColor",
|
|
@@ -929,7 +929,7 @@ var Pa = (e) => {
|
|
|
929
929
|
strokeLinejoin: "round",
|
|
930
930
|
children: [/* @__PURE__ */ n("path", { d: "M4 9h16m-4-4 4 4" }), /* @__PURE__ */ n("path", { d: "M20 15H4m4 4-4-4" })]
|
|
931
931
|
})
|
|
932
|
-
}),
|
|
932
|
+
}), so = (e) => /* @__PURE__ */ n(T, {
|
|
933
933
|
...e,
|
|
934
934
|
children: /* @__PURE__ */ m("g", {
|
|
935
935
|
stroke: "currentColor",
|
|
@@ -943,43 +943,43 @@ var Pa = (e) => {
|
|
|
943
943
|
/* @__PURE__ */ n("path", { d: "M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" })
|
|
944
944
|
]
|
|
945
945
|
})
|
|
946
|
-
}),
|
|
947
|
-
var
|
|
948
|
-
var
|
|
946
|
+
}), co = { kind: "chrome-popup" }, ho = "var(--q7gcrz0)", uo = "var(--q7gcrz1)", mo = "q7gcrz2", po = "q7gcrz3";
|
|
947
|
+
var go = "q7gcrz5", vo = "q7gcrz6", fo = "q7gcrz7", Co = "q7gcrz8", $n = "q7gcrz9", bo = "q7gcrza";
|
|
948
|
+
var rn = "q7gcrzd q7gcrzc", Xn = "q7gcrze q7gcrzc", yo = [
|
|
949
949
|
"absolute-difference",
|
|
950
950
|
"relative-difference",
|
|
951
951
|
"proportion"
|
|
952
|
-
],
|
|
952
|
+
], an = ["absolute-difference", "relative-difference"], So = ["relative-difference", "proportion"], wo = {
|
|
953
953
|
"absolute-difference": "graph.annotations.differenceArrowToolbar.labelKind.absoluteDifference",
|
|
954
954
|
"relative-difference": "graph.annotations.differenceArrowToolbar.labelKind.relativeDifference",
|
|
955
955
|
proportion: "graph.annotations.differenceArrowToolbar.labelKind.proportion"
|
|
956
|
-
},
|
|
957
|
-
const { formattingLocale: t } =
|
|
958
|
-
return
|
|
959
|
-
const o =
|
|
960
|
-
return
|
|
961
|
-
kind:
|
|
962
|
-
nameKey:
|
|
963
|
-
preview:
|
|
964
|
-
locale:
|
|
965
|
-
kind:
|
|
956
|
+
}, xo = (e) => {
|
|
957
|
+
const { formattingLocale: t } = U(), i = G((o) => o.config.parsingLocale), a = t ?? i;
|
|
958
|
+
return E(() => {
|
|
959
|
+
const o = Vr(e.start, e.end);
|
|
960
|
+
return yo.filter((r) => o || !an.includes(r) || r === e.label).map((r) => ({
|
|
961
|
+
kind: r,
|
|
962
|
+
nameKey: wo[r],
|
|
963
|
+
preview: Qr({
|
|
964
|
+
locale: a,
|
|
965
|
+
kind: r,
|
|
966
966
|
startValue: e.start.measurementValue,
|
|
967
967
|
endValue: e.end.measurementValue,
|
|
968
968
|
valueFormat: e.start.valueFormat
|
|
969
969
|
}),
|
|
970
|
-
isPickable: o || !
|
|
971
|
-
isSuspect:
|
|
970
|
+
isPickable: o || !an.includes(r),
|
|
971
|
+
isSuspect: So.includes(r) && e.start.measurementValue === 0
|
|
972
972
|
}));
|
|
973
|
-
}, [e,
|
|
974
|
-
},
|
|
975
|
-
const o = t.y + e.y,
|
|
973
|
+
}, [e, a]);
|
|
974
|
+
}, se = 8, To = ({ labelBox: e, panelRect: t, frameWidth: i, frameHeight: a }) => {
|
|
975
|
+
const o = t.y + e.y, r = o + e.height, l = o - 8 - 36, c = r + 8, s = Po(se, l >= se ? l : c, a - se - 36), u = se;
|
|
976
976
|
return {
|
|
977
977
|
top: s,
|
|
978
978
|
left: u,
|
|
979
|
-
available: Math.max(0, i -
|
|
979
|
+
available: Math.max(0, i - se * 2),
|
|
980
980
|
centre: t.x + e.x + e.width / 2 - u
|
|
981
981
|
};
|
|
982
|
-
},
|
|
982
|
+
}, Po = (e, t, i) => Math.max(e, Math.min(t, i)), Le = [
|
|
983
983
|
{
|
|
984
984
|
id: "small",
|
|
985
985
|
nameKey: "graph.annotations.differenceArrowToolbar.size.small"
|
|
@@ -992,14 +992,14 @@ var nn = "q7gcrzd q7gcrzc", qn = "q7gcrze q7gcrzc", mo = [
|
|
|
992
992
|
id: "large",
|
|
993
993
|
nameKey: "graph.annotations.differenceArrowToolbar.size.large"
|
|
994
994
|
}
|
|
995
|
-
],
|
|
996
|
-
const l = A(), { chartId: c, commands: s } =
|
|
995
|
+
], Io = ({ arrow: e, labelBox: t, panelRect: i, frameWidth: a, frameHeight: o, frameElement: r }) => {
|
|
996
|
+
const l = A(), { chartId: c, commands: s } = U(), u = q(), [d, h] = Z(null), g = xo(e), p = To({
|
|
997
997
|
labelBox: t,
|
|
998
998
|
panelRect: i,
|
|
999
|
-
frameWidth:
|
|
999
|
+
frameWidth: a,
|
|
1000
1000
|
frameHeight: o
|
|
1001
|
-
}),
|
|
1002
|
-
s.dispatch(new
|
|
1001
|
+
}), v = (y, f) => {
|
|
1002
|
+
s.dispatch(new An({
|
|
1003
1003
|
kind: "differenceArrow",
|
|
1004
1004
|
id: e.id,
|
|
1005
1005
|
patch: y
|
|
@@ -1007,78 +1007,78 @@ var nn = "q7gcrzd q7gcrzc", qn = "q7gcrze q7gcrzc", mo = [
|
|
|
1007
1007
|
};
|
|
1008
1008
|
V(() => () => s.seal(), [s]), V(() => {
|
|
1009
1009
|
const { claimInteraction: y, releaseInteraction: f } = u.getState();
|
|
1010
|
-
return d === null ? f("chrome-popup") : y(
|
|
1010
|
+
return d === null ? f("chrome-popup") : y(co), () => f("chrome-popup");
|
|
1011
1011
|
}, [u, d]);
|
|
1012
1012
|
const S = (y) => {
|
|
1013
1013
|
h(y ? "color" : null), y || s.seal();
|
|
1014
1014
|
}, P = () => {
|
|
1015
|
-
s.dispatch(new
|
|
1015
|
+
s.dispatch(new Ve({ id: e.id })), r.focus({ preventScroll: !0 });
|
|
1016
1016
|
};
|
|
1017
1017
|
return /* @__PURE__ */ n("div", {
|
|
1018
|
-
className:
|
|
1018
|
+
className: mo,
|
|
1019
1019
|
style: {
|
|
1020
1020
|
top: p.top,
|
|
1021
1021
|
left: p.left,
|
|
1022
1022
|
width: p.available
|
|
1023
1023
|
},
|
|
1024
|
-
children: /* @__PURE__ */ m(
|
|
1024
|
+
children: /* @__PURE__ */ m(X.Root, {
|
|
1025
1025
|
"aria-label": l("graph.annotations.differenceArrowToolbar.label"),
|
|
1026
|
-
className:
|
|
1026
|
+
className: po,
|
|
1027
1027
|
"data-testid": "difference-arrow-toolbar",
|
|
1028
|
-
...
|
|
1029
|
-
style:
|
|
1030
|
-
[
|
|
1031
|
-
[
|
|
1028
|
+
...ye(c),
|
|
1029
|
+
style: Mn({
|
|
1030
|
+
[ho]: `${p.centre}px`,
|
|
1031
|
+
[uo]: `${p.available}px`
|
|
1032
1032
|
}),
|
|
1033
1033
|
children: [
|
|
1034
|
-
/* @__PURE__ */ n(
|
|
1035
|
-
options:
|
|
1034
|
+
/* @__PURE__ */ n(Ao, {
|
|
1035
|
+
options: g,
|
|
1036
1036
|
current: e.label,
|
|
1037
1037
|
isOpen: d === "labelKind",
|
|
1038
1038
|
onOpenChange: (y) => h(y ? "labelKind" : null),
|
|
1039
1039
|
onPick: (y) => {
|
|
1040
|
-
|
|
1040
|
+
v({ label: y }), h(null);
|
|
1041
1041
|
}
|
|
1042
1042
|
}),
|
|
1043
|
-
/* @__PURE__ */ n(
|
|
1044
|
-
/* @__PURE__ */ n(
|
|
1043
|
+
/* @__PURE__ */ n(X.Separator, {}),
|
|
1044
|
+
/* @__PURE__ */ n(X.ColorPicker, {
|
|
1045
1045
|
color: e.color,
|
|
1046
1046
|
label: l("graph.annotations.differenceArrowToolbar.color"),
|
|
1047
|
-
onChange: (y) =>
|
|
1047
|
+
onChange: (y) => v({ color: y }, { transient: !0 }),
|
|
1048
1048
|
isOpen: d === "color",
|
|
1049
1049
|
onOpenChange: S,
|
|
1050
|
-
popupAttributes:
|
|
1050
|
+
popupAttributes: ye(c),
|
|
1051
1051
|
children: /* @__PURE__ */ n("span", {
|
|
1052
|
-
className:
|
|
1052
|
+
className: vo,
|
|
1053
1053
|
style: { background: e.color ?? "transparent" }
|
|
1054
1054
|
})
|
|
1055
1055
|
}),
|
|
1056
|
-
/* @__PURE__ */ n(
|
|
1056
|
+
/* @__PURE__ */ n(Lo, {
|
|
1057
1057
|
current: e.size,
|
|
1058
1058
|
isOpen: d === "size",
|
|
1059
1059
|
onOpenChange: (y) => h(y ? "size" : null),
|
|
1060
1060
|
onPick: (y) => {
|
|
1061
|
-
|
|
1061
|
+
v({ size: y }), h(null);
|
|
1062
1062
|
}
|
|
1063
1063
|
}),
|
|
1064
|
-
/* @__PURE__ */ n(
|
|
1065
|
-
/* @__PURE__ */ n(
|
|
1064
|
+
/* @__PURE__ */ n(X.Separator, {}),
|
|
1065
|
+
/* @__PURE__ */ n(X.Button, {
|
|
1066
1066
|
"aria-label": l("graph.annotations.differenceArrowToolbar.swap"),
|
|
1067
|
-
className:
|
|
1068
|
-
onClick: () =>
|
|
1067
|
+
className: rn,
|
|
1068
|
+
onClick: () => v({
|
|
1069
1069
|
start: e.end.anchor,
|
|
1070
1070
|
end: e.start.anchor
|
|
1071
1071
|
}),
|
|
1072
|
-
children: /* @__PURE__ */ n(
|
|
1072
|
+
children: /* @__PURE__ */ n(lo, {
|
|
1073
1073
|
size: "sm",
|
|
1074
1074
|
title: ""
|
|
1075
1075
|
})
|
|
1076
1076
|
}),
|
|
1077
|
-
/* @__PURE__ */ n(
|
|
1077
|
+
/* @__PURE__ */ n(X.Button, {
|
|
1078
1078
|
"aria-label": l("graph.annotations.differenceArrowToolbar.remove"),
|
|
1079
|
-
className:
|
|
1079
|
+
className: rn,
|
|
1080
1080
|
onClick: P,
|
|
1081
|
-
children: /* @__PURE__ */ n(
|
|
1081
|
+
children: /* @__PURE__ */ n(so, {
|
|
1082
1082
|
size: "sm",
|
|
1083
1083
|
title: ""
|
|
1084
1084
|
})
|
|
@@ -1086,22 +1086,22 @@ var nn = "q7gcrzd q7gcrzc", qn = "q7gcrze q7gcrzc", mo = [
|
|
|
1086
1086
|
]
|
|
1087
1087
|
})
|
|
1088
1088
|
});
|
|
1089
|
-
},
|
|
1090
|
-
const
|
|
1091
|
-
return /* @__PURE__ */ m(
|
|
1089
|
+
}, Ao = ({ options: e, current: t, isOpen: i, onOpenChange: a, onPick: o }) => {
|
|
1090
|
+
const r = A(), l = e.find((s) => s.kind === t), c = e.some((s) => s.isPickable && s.kind !== t);
|
|
1091
|
+
return /* @__PURE__ */ m(D.Root, {
|
|
1092
1092
|
open: i,
|
|
1093
1093
|
modal: !1,
|
|
1094
|
-
onOpenChange:
|
|
1095
|
-
children: [/* @__PURE__ */ m(
|
|
1096
|
-
render: /* @__PURE__ */ n(
|
|
1097
|
-
"aria-label":
|
|
1098
|
-
className:
|
|
1094
|
+
onOpenChange: a,
|
|
1095
|
+
children: [/* @__PURE__ */ m(D.Trigger, {
|
|
1096
|
+
render: /* @__PURE__ */ n(X.Button, {}),
|
|
1097
|
+
"aria-label": r("graph.annotations.differenceArrowToolbar.labelKind.ariaLabel"),
|
|
1098
|
+
className: Xn,
|
|
1099
1099
|
disabled: !c,
|
|
1100
1100
|
onMouseDown: (s) => s.preventDefault(),
|
|
1101
1101
|
children: [
|
|
1102
1102
|
/* @__PURE__ */ n("span", {
|
|
1103
|
-
className:
|
|
1104
|
-
children: l === void 0 ? "" :
|
|
1103
|
+
className: go,
|
|
1104
|
+
children: l === void 0 ? "" : r(l.nameKey)
|
|
1105
1105
|
}),
|
|
1106
1106
|
l !== void 0 && /* @__PURE__ */ m("span", {
|
|
1107
1107
|
className: "q7gcrz4",
|
|
@@ -1111,91 +1111,91 @@ var nn = "q7gcrzd q7gcrzc", qn = "q7gcrze q7gcrzc", mo = [
|
|
|
1111
1111
|
")"
|
|
1112
1112
|
]
|
|
1113
1113
|
}),
|
|
1114
|
-
/* @__PURE__ */ n(
|
|
1114
|
+
/* @__PURE__ */ n(we, { size: "sm" })
|
|
1115
1115
|
]
|
|
1116
|
-
}), /* @__PURE__ */ n(
|
|
1117
|
-
className:
|
|
1116
|
+
}), /* @__PURE__ */ n(jn, { children: e.map((s) => /* @__PURE__ */ m(D.Item, {
|
|
1117
|
+
className: $n,
|
|
1118
1118
|
"data-selected": s.kind === t,
|
|
1119
1119
|
disabled: !s.isPickable,
|
|
1120
1120
|
onClick: () => o(s.kind),
|
|
1121
1121
|
children: [
|
|
1122
|
-
/* @__PURE__ */ n("span", { children:
|
|
1122
|
+
/* @__PURE__ */ n("span", { children: r(s.nameKey) }),
|
|
1123
1123
|
(s.isSuspect || !s.isPickable) && /* @__PURE__ */ n("span", {
|
|
1124
|
-
"aria-label":
|
|
1124
|
+
"aria-label": r(s.isPickable ? "graph.annotations.differenceArrowToolbar.labelKind.suspectValue" : "graph.annotations.differenceArrowToolbar.labelKind.incomparableEnds"),
|
|
1125
1125
|
className: "q7gcrzb",
|
|
1126
1126
|
role: "img",
|
|
1127
1127
|
children: "⚠"
|
|
1128
1128
|
}),
|
|
1129
1129
|
/* @__PURE__ */ n("span", {
|
|
1130
|
-
className:
|
|
1130
|
+
className: bo,
|
|
1131
1131
|
children: s.preview
|
|
1132
1132
|
})
|
|
1133
1133
|
]
|
|
1134
1134
|
}, s.kind)) })]
|
|
1135
1135
|
});
|
|
1136
|
-
},
|
|
1137
|
-
const o = A(),
|
|
1138
|
-
return /* @__PURE__ */ m(
|
|
1136
|
+
}, Lo = ({ current: e, isOpen: t, onOpenChange: i, onPick: a }) => {
|
|
1137
|
+
const o = A(), r = Le.find((l) => l.id === e) ?? Le[0];
|
|
1138
|
+
return /* @__PURE__ */ m(D.Root, {
|
|
1139
1139
|
open: t,
|
|
1140
1140
|
modal: !1,
|
|
1141
1141
|
onOpenChange: i,
|
|
1142
|
-
children: [/* @__PURE__ */ m(
|
|
1143
|
-
render: /* @__PURE__ */ n(
|
|
1142
|
+
children: [/* @__PURE__ */ m(D.Trigger, {
|
|
1143
|
+
render: /* @__PURE__ */ n(X.Button, {}),
|
|
1144
1144
|
"aria-label": o("graph.annotations.differenceArrowToolbar.size.ariaLabel"),
|
|
1145
|
-
className:
|
|
1145
|
+
className: Xn,
|
|
1146
1146
|
onMouseDown: (l) => l.preventDefault(),
|
|
1147
|
-
children: [/* @__PURE__ */ n("span", { children:
|
|
1148
|
-
}), /* @__PURE__ */ n(
|
|
1149
|
-
className:
|
|
1147
|
+
children: [/* @__PURE__ */ n("span", { children: r === void 0 ? "" : o(r.nameKey) }), /* @__PURE__ */ n(we, { size: "sm" })]
|
|
1148
|
+
}), /* @__PURE__ */ n(jn, { children: Le.map((l) => /* @__PURE__ */ n(D.Item, {
|
|
1149
|
+
className: $n,
|
|
1150
1150
|
"data-selected": l.id === e,
|
|
1151
|
-
onClick: () =>
|
|
1151
|
+
onClick: () => a(l.id),
|
|
1152
1152
|
children: o(l.nameKey)
|
|
1153
1153
|
}, l.id)) })]
|
|
1154
1154
|
});
|
|
1155
|
-
},
|
|
1156
|
-
const { chartId: t } =
|
|
1157
|
-
return /* @__PURE__ */ n(
|
|
1158
|
-
container:
|
|
1159
|
-
children: /* @__PURE__ */ n(
|
|
1155
|
+
}, jn = ({ children: e }) => {
|
|
1156
|
+
const { chartId: t } = U();
|
|
1157
|
+
return /* @__PURE__ */ n(D.Portal, {
|
|
1158
|
+
container: He(),
|
|
1159
|
+
children: /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(D.Positioner, {
|
|
1160
1160
|
side: "bottom",
|
|
1161
1161
|
align: "start",
|
|
1162
1162
|
sideOffset: 6,
|
|
1163
|
-
className:
|
|
1164
|
-
children: /* @__PURE__ */ n(
|
|
1165
|
-
className:
|
|
1163
|
+
className: fo,
|
|
1164
|
+
children: /* @__PURE__ */ n(D.Popup, {
|
|
1165
|
+
className: Co,
|
|
1166
1166
|
onMouseDown: (i) => i.preventDefault(),
|
|
1167
|
-
...
|
|
1167
|
+
...ye(t),
|
|
1168
1168
|
children: e
|
|
1169
1169
|
})
|
|
1170
1170
|
}) })
|
|
1171
1171
|
});
|
|
1172
1172
|
};
|
|
1173
|
-
var
|
|
1174
|
-
|
|
1173
|
+
var Oo = "ydgo3h0", No = "ydgo3h1", ko = "ydgo3h2", Yn = (e) => e === "start" ? "end" : "start", Qn = ({ dispatch: e, arrow: t, endpoint: i, anchor: a }) => {
|
|
1174
|
+
Ln(a, t[i].anchor) || e(new An({
|
|
1175
1175
|
kind: "differenceArrow",
|
|
1176
1176
|
id: t.id,
|
|
1177
|
-
patch: { [i]:
|
|
1177
|
+
patch: { [i]: a }
|
|
1178
1178
|
}));
|
|
1179
|
-
},
|
|
1180
|
-
const u =
|
|
1179
|
+
}, Mo = ({ clientPoint: e, panelOrigin: t, panelRect: i, engine: a, layers: o, coordSystem: r, resolver: l, fixedAnchor: c, align: s }) => {
|
|
1180
|
+
const u = Eo({
|
|
1181
1181
|
x: e.x - t.x,
|
|
1182
1182
|
y: e.y - t.y
|
|
1183
|
-
}, i), { primary: d } =
|
|
1183
|
+
}, i), { primary: d } = a.query(Fe(u, i));
|
|
1184
1184
|
if (d === null) return null;
|
|
1185
1185
|
const h = o.find((p) => p.id === d.layerId);
|
|
1186
1186
|
if (h === void 0) return null;
|
|
1187
|
-
const
|
|
1187
|
+
const g = Me({
|
|
1188
1188
|
resolver: l,
|
|
1189
1189
|
layer: h,
|
|
1190
1190
|
observation: d.observation,
|
|
1191
|
-
coordSystem:
|
|
1191
|
+
coordSystem: r,
|
|
1192
1192
|
align: s
|
|
1193
1193
|
});
|
|
1194
|
-
return
|
|
1195
|
-
},
|
|
1194
|
+
return g === null || Ln(g.anchor, c) ? null : g;
|
|
1195
|
+
}, Eo = (e, t) => ({
|
|
1196
1196
|
x: Math.max(0, Math.min(e.x, t.width)),
|
|
1197
1197
|
y: Math.max(0, Math.min(e.y, t.height))
|
|
1198
|
-
}),
|
|
1198
|
+
}), Ro = class {
|
|
1199
1199
|
constructor(e) {
|
|
1200
1200
|
this.params = e, this.listeners = new AbortController(), this.pendingEvent = null, this.scheduledFrame = null, this.hasMoved = !1, this.hasPublished = !1, this.handleMove = (t) => {
|
|
1201
1201
|
t.pointerId === this.params.pointerId && (this.pendingEvent = t, this.hasMoved = !0, this.scheduledFrame === null && (this.scheduledFrame = requestAnimationFrame(this.runFrame)));
|
|
@@ -1207,21 +1207,21 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1207
1207
|
this.scheduledFrame = null;
|
|
1208
1208
|
const t = this.pendingEvent;
|
|
1209
1209
|
if (this.pendingEvent = null, t === null) return;
|
|
1210
|
-
const { editorStore: i, engine:
|
|
1211
|
-
if (this.hasPublished &&
|
|
1212
|
-
const p =
|
|
1210
|
+
const { editorStore: i, engine: a, anchorResolver: o, endpoint: r, readInputs: l } = this.params, { arrow: c, panelOrigin: s, panelRect: u, layers: d, coordSystem: h } = l(), g = i.getState();
|
|
1211
|
+
if (this.hasPublished && Ne(ve(g, "endpoint-drag"), c.id, r) === null) return;
|
|
1212
|
+
const p = Mo({
|
|
1213
1213
|
clientPoint: {
|
|
1214
1214
|
x: t.clientX,
|
|
1215
1215
|
y: t.clientY
|
|
1216
1216
|
},
|
|
1217
1217
|
panelOrigin: s,
|
|
1218
1218
|
panelRect: u,
|
|
1219
|
-
engine:
|
|
1219
|
+
engine: a,
|
|
1220
1220
|
layers: d,
|
|
1221
1221
|
coordSystem: h,
|
|
1222
1222
|
resolver: o,
|
|
1223
|
-
fixedAnchor: c[
|
|
1224
|
-
align: c[
|
|
1223
|
+
fixedAnchor: c[Yn(r)].anchor,
|
|
1224
|
+
align: c[r].anchor.align
|
|
1225
1225
|
});
|
|
1226
1226
|
p !== null && this.publish(p);
|
|
1227
1227
|
};
|
|
@@ -1232,37 +1232,37 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1232
1232
|
}
|
|
1233
1233
|
finish(e) {
|
|
1234
1234
|
this.params.onSettled(), this.listeners.abort(), this.cancelFrame(), e && this.hasMoved && this.runFrame(), this.pendingEvent = null;
|
|
1235
|
-
const { editorStore: t, endpoint: i, readInputs:
|
|
1236
|
-
c !== null && (l.releaseInteraction("endpoint-drag"), e &&
|
|
1235
|
+
const { editorStore: t, endpoint: i, readInputs: a, dispatch: o } = this.params, { arrow: r } = a(), l = t.getState(), c = Ne(ve(l, "endpoint-drag"), r.id, i);
|
|
1236
|
+
c !== null && (l.releaseInteraction("endpoint-drag"), e && Qn({
|
|
1237
1237
|
dispatch: o,
|
|
1238
|
-
arrow:
|
|
1238
|
+
arrow: r,
|
|
1239
1239
|
endpoint: i,
|
|
1240
1240
|
anchor: c.point.anchor
|
|
1241
1241
|
}));
|
|
1242
1242
|
}
|
|
1243
1243
|
publish(e) {
|
|
1244
|
-
const { editorStore: t, readInputs: i, endpoint:
|
|
1244
|
+
const { editorStore: t, readInputs: i, endpoint: a } = this.params;
|
|
1245
1245
|
t.getState().claimInteraction({
|
|
1246
1246
|
kind: "endpoint-drag",
|
|
1247
1247
|
annotationId: i().arrow.id,
|
|
1248
|
-
endpoint:
|
|
1248
|
+
endpoint: a,
|
|
1249
1249
|
point: e
|
|
1250
1250
|
}), this.hasPublished = !0;
|
|
1251
1251
|
}
|
|
1252
1252
|
cancelFrame() {
|
|
1253
1253
|
this.scheduledFrame !== null && (cancelAnimationFrame(this.scheduledFrame), this.scheduledFrame = null);
|
|
1254
1254
|
}
|
|
1255
|
-
},
|
|
1256
|
-
const { commands:
|
|
1255
|
+
}, _o = ({ arrow: e, panelOrigin: t, panelRect: i }) => {
|
|
1256
|
+
const { commands: a, anchorResolver: o } = U(), { engine: r } = De(), l = q(), c = de({
|
|
1257
1257
|
arrow: e,
|
|
1258
1258
|
panelOrigin: t,
|
|
1259
1259
|
panelRect: i,
|
|
1260
|
-
...
|
|
1260
|
+
...G(Be((u) => ({
|
|
1261
1261
|
layers: u.layers,
|
|
1262
1262
|
coordSystem: u.coordSystem
|
|
1263
1263
|
})))
|
|
1264
|
-
}), s =
|
|
1265
|
-
return V(() => () => s.current?.finish(!1), []),
|
|
1264
|
+
}), s = be(null);
|
|
1265
|
+
return V(() => () => s.current?.finish(!1), []), Ce((u) => ({
|
|
1266
1266
|
onClick: (d) => d.stopPropagation(),
|
|
1267
1267
|
onPointerDown: (d) => {
|
|
1268
1268
|
if (d.button !== 0 || s.current !== null) return;
|
|
@@ -1272,15 +1272,15 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1272
1272
|
return;
|
|
1273
1273
|
}
|
|
1274
1274
|
d.currentTarget.focus({ preventScroll: !0 }), d.preventDefault();
|
|
1275
|
-
const h = new
|
|
1275
|
+
const h = new Ro({
|
|
1276
1276
|
handle: d.currentTarget,
|
|
1277
1277
|
pointerId: d.pointerId,
|
|
1278
1278
|
endpoint: u,
|
|
1279
1279
|
readInputs: () => c.current,
|
|
1280
1280
|
editorStore: l,
|
|
1281
|
-
engine:
|
|
1281
|
+
engine: r,
|
|
1282
1282
|
anchorResolver: o,
|
|
1283
|
-
dispatch:
|
|
1283
|
+
dispatch: a.dispatch,
|
|
1284
1284
|
onSettled: () => {
|
|
1285
1285
|
s.current = null;
|
|
1286
1286
|
}
|
|
@@ -1290,23 +1290,23 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1290
1290
|
}), [
|
|
1291
1291
|
c,
|
|
1292
1292
|
l,
|
|
1293
|
-
|
|
1293
|
+
r,
|
|
1294
1294
|
o,
|
|
1295
|
-
|
|
1295
|
+
a
|
|
1296
1296
|
]);
|
|
1297
|
-
},
|
|
1298
|
-
const { commands: t, anchorResolver: i } =
|
|
1297
|
+
}, Do = [" ", "Enter"], Ho = ({ arrow: e }) => {
|
|
1298
|
+
const { commands: t, anchorResolver: i } = U(), a = q(), { layers: o, coordSystem: r, mainAxis: l } = G(Be((s) => ({
|
|
1299
1299
|
layers: s.layers,
|
|
1300
1300
|
coordSystem: s.coordSystem,
|
|
1301
1301
|
mainAxis: s.coordSystem.type === "cartesian" ? s.coordSystem.mainAxis : "x"
|
|
1302
1302
|
}))), c = e.id;
|
|
1303
1303
|
return V(() => () => {
|
|
1304
|
-
const s =
|
|
1305
|
-
|
|
1306
|
-
}, [
|
|
1304
|
+
const s = a.getState();
|
|
1305
|
+
ve(s, "endpoint-drag")?.annotationId === c && s.releaseInteraction("endpoint-drag");
|
|
1306
|
+
}, [a, c]), Ce((s) => ({ onKeyDown: (u) => {
|
|
1307
1307
|
if (u.altKey || u.ctrlKey || u.metaKey || u.shiftKey) return;
|
|
1308
|
-
const d =
|
|
1309
|
-
if (
|
|
1308
|
+
const d = a.getState(), h = Ne(ve(d, "endpoint-drag"), e.id, s);
|
|
1309
|
+
if (Do.includes(u.key)) {
|
|
1310
1310
|
if (u.preventDefault(), u.repeat) return;
|
|
1311
1311
|
if (h === null) return d.claimInteraction({
|
|
1312
1312
|
kind: "endpoint-drag",
|
|
@@ -1314,7 +1314,7 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1314
1314
|
endpoint: s,
|
|
1315
1315
|
point: e[s]
|
|
1316
1316
|
});
|
|
1317
|
-
d.releaseInteraction("endpoint-drag"),
|
|
1317
|
+
d.releaseInteraction("endpoint-drag"), Qn({
|
|
1318
1318
|
dispatch: t.dispatch,
|
|
1319
1319
|
arrow: e,
|
|
1320
1320
|
endpoint: s,
|
|
@@ -1323,16 +1323,16 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1323
1323
|
return;
|
|
1324
1324
|
}
|
|
1325
1325
|
if (h === null) return;
|
|
1326
|
-
const
|
|
1327
|
-
if (
|
|
1326
|
+
const g = zo(u.key, l);
|
|
1327
|
+
if (g === null) return;
|
|
1328
1328
|
u.preventDefault();
|
|
1329
|
-
const p =
|
|
1329
|
+
const p = Vo({
|
|
1330
1330
|
arrow: e,
|
|
1331
1331
|
endpoint: s,
|
|
1332
1332
|
from: h.point.anchor,
|
|
1333
|
-
move:
|
|
1333
|
+
move: g,
|
|
1334
1334
|
layers: o,
|
|
1335
|
-
coordSystem:
|
|
1335
|
+
coordSystem: r,
|
|
1336
1336
|
resolver: i
|
|
1337
1337
|
});
|
|
1338
1338
|
p !== null && d.claimInteraction({
|
|
@@ -1343,106 +1343,106 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1343
1343
|
});
|
|
1344
1344
|
} }), [
|
|
1345
1345
|
e,
|
|
1346
|
-
|
|
1346
|
+
a,
|
|
1347
1347
|
t,
|
|
1348
1348
|
i,
|
|
1349
1349
|
o,
|
|
1350
|
-
|
|
1350
|
+
r,
|
|
1351
1351
|
l
|
|
1352
1352
|
]);
|
|
1353
|
-
},
|
|
1353
|
+
}, zo = (e, t) => {
|
|
1354
1354
|
const i = e === "ArrowUp" || e === "ArrowDown";
|
|
1355
1355
|
return !i && !(e === "ArrowLeft" || e === "ArrowRight") ? null : {
|
|
1356
1356
|
axis: t === "x" === i ? "cross" : "main",
|
|
1357
1357
|
step: e === "ArrowDown" || e === "ArrowRight" ? 1 : -1
|
|
1358
1358
|
};
|
|
1359
|
-
},
|
|
1359
|
+
}, Vo = ({ arrow: e, endpoint: t, from: i, move: a, layers: o, coordSystem: r, resolver: l }) => {
|
|
1360
1360
|
const c = o.find((u) => u.id === i.layerId);
|
|
1361
1361
|
if (c === void 0) return null;
|
|
1362
|
-
const s =
|
|
1362
|
+
const s = ca({
|
|
1363
1363
|
layer: c,
|
|
1364
1364
|
from: i,
|
|
1365
|
-
partner: e[
|
|
1366
|
-
axis:
|
|
1367
|
-
step:
|
|
1368
|
-
canLandOn: (u) =>
|
|
1365
|
+
partner: e[Yn(t)].anchor,
|
|
1366
|
+
axis: a.axis,
|
|
1367
|
+
step: a.step,
|
|
1368
|
+
canLandOn: (u) => Me({
|
|
1369
1369
|
resolver: l,
|
|
1370
1370
|
layer: c,
|
|
1371
1371
|
observation: u,
|
|
1372
|
-
coordSystem:
|
|
1372
|
+
coordSystem: r,
|
|
1373
1373
|
align: e[t].anchor.align
|
|
1374
1374
|
}) !== null
|
|
1375
1375
|
});
|
|
1376
|
-
return s === null ? null :
|
|
1376
|
+
return s === null ? null : Me({
|
|
1377
1377
|
resolver: l,
|
|
1378
1378
|
layer: c,
|
|
1379
1379
|
observation: s.observation,
|
|
1380
|
-
coordSystem:
|
|
1380
|
+
coordSystem: r,
|
|
1381
1381
|
align: e[t].anchor.align
|
|
1382
1382
|
});
|
|
1383
|
-
},
|
|
1384
|
-
const t =
|
|
1385
|
-
return t === null ? null : /* @__PURE__ */ n(
|
|
1383
|
+
}, Fo = (e) => {
|
|
1384
|
+
const t = io();
|
|
1385
|
+
return t === null ? null : /* @__PURE__ */ n(Bo, {
|
|
1386
1386
|
annotationId: t,
|
|
1387
1387
|
...e
|
|
1388
1388
|
});
|
|
1389
|
-
},
|
|
1390
|
-
const i =
|
|
1391
|
-
return
|
|
1392
|
-
committedArrow:
|
|
1393
|
-
committedLabelBox:
|
|
1394
|
-
labelBox:
|
|
1395
|
-
start:
|
|
1396
|
-
end:
|
|
1397
|
-
isDragged:
|
|
1389
|
+
}, Bo = ({ annotationId: e, ...t }) => {
|
|
1390
|
+
const i = Rt(), a = E(() => i.find((o) => o.id === e), [i, e]);
|
|
1391
|
+
return a === void 0 ? null : /* @__PURE__ */ n(Ko, {
|
|
1392
|
+
committedArrow: a.committedArrow,
|
|
1393
|
+
committedLabelBox: a.committedLabelBox,
|
|
1394
|
+
labelBox: a.labelBox,
|
|
1395
|
+
start: a.start,
|
|
1396
|
+
end: a.end,
|
|
1397
|
+
isDragged: a.isDragged,
|
|
1398
1398
|
...t
|
|
1399
1399
|
});
|
|
1400
|
-
},
|
|
1401
|
-
const d =
|
|
1400
|
+
}, Ko = ({ committedArrow: e, committedLabelBox: t, labelBox: i, start: a, end: o, panelRect: r, panelOrigin: l, frameRect: c, frameElement: s, isDragged: u }) => {
|
|
1401
|
+
const d = _o({
|
|
1402
1402
|
arrow: e,
|
|
1403
1403
|
panelOrigin: l,
|
|
1404
|
-
panelRect:
|
|
1405
|
-
}), h =
|
|
1404
|
+
panelRect: r
|
|
1405
|
+
}), h = Ho({ arrow: e });
|
|
1406
1406
|
return /* @__PURE__ */ m("div", {
|
|
1407
1407
|
"data-testid": "difference-arrow-selection",
|
|
1408
1408
|
children: [
|
|
1409
|
-
!u && /* @__PURE__ */ n(
|
|
1409
|
+
!u && /* @__PURE__ */ n(Io, {
|
|
1410
1410
|
arrow: e,
|
|
1411
1411
|
labelBox: t,
|
|
1412
|
-
panelRect:
|
|
1412
|
+
panelRect: r,
|
|
1413
1413
|
frameWidth: c.width,
|
|
1414
1414
|
frameHeight: c.height,
|
|
1415
1415
|
frameElement: s
|
|
1416
1416
|
}),
|
|
1417
1417
|
/* @__PURE__ */ n("div", {
|
|
1418
1418
|
"aria-hidden": "true",
|
|
1419
|
-
className:
|
|
1419
|
+
className: ko,
|
|
1420
1420
|
"data-testid": "difference-arrow-selection-label",
|
|
1421
1421
|
style: {
|
|
1422
|
-
left:
|
|
1423
|
-
top:
|
|
1422
|
+
left: r.x + i.x - 2,
|
|
1423
|
+
top: r.y + i.y - 2,
|
|
1424
1424
|
width: i.width + 4,
|
|
1425
1425
|
height: i.height + 4
|
|
1426
1426
|
}
|
|
1427
1427
|
}),
|
|
1428
|
-
/* @__PURE__ */ n(
|
|
1428
|
+
/* @__PURE__ */ n(on, {
|
|
1429
1429
|
endpoint: "start",
|
|
1430
|
-
point:
|
|
1431
|
-
panelRect:
|
|
1430
|
+
point: a,
|
|
1431
|
+
panelRect: r,
|
|
1432
1432
|
dragHandlers: d("start"),
|
|
1433
1433
|
keyboardHandlers: h("start")
|
|
1434
1434
|
}),
|
|
1435
|
-
/* @__PURE__ */ n(
|
|
1435
|
+
/* @__PURE__ */ n(on, {
|
|
1436
1436
|
endpoint: "end",
|
|
1437
1437
|
point: o,
|
|
1438
|
-
panelRect:
|
|
1438
|
+
panelRect: r,
|
|
1439
1439
|
dragHandlers: d("end"),
|
|
1440
1440
|
keyboardHandlers: h("end")
|
|
1441
1441
|
})
|
|
1442
1442
|
]
|
|
1443
1443
|
});
|
|
1444
|
-
},
|
|
1445
|
-
className:
|
|
1444
|
+
}, on = ({ endpoint: e, point: t, panelRect: i, dragHandlers: a, keyboardHandlers: o }) => /* @__PURE__ */ n("div", {
|
|
1445
|
+
className: Oo,
|
|
1446
1446
|
"data-testid": "difference-arrow-selection-handle",
|
|
1447
1447
|
"data-endpoint": e,
|
|
1448
1448
|
role: "button",
|
|
@@ -1451,13 +1451,13 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1451
1451
|
top: i.y + t.y
|
|
1452
1452
|
},
|
|
1453
1453
|
tabIndex: 0,
|
|
1454
|
-
...
|
|
1454
|
+
...a,
|
|
1455
1455
|
...o,
|
|
1456
1456
|
children: /* @__PURE__ */ n("span", {
|
|
1457
1457
|
"aria-hidden": "true",
|
|
1458
|
-
className:
|
|
1458
|
+
className: No
|
|
1459
1459
|
})
|
|
1460
|
-
}),
|
|
1460
|
+
}), Go = (e) => /* @__PURE__ */ n(T, {
|
|
1461
1461
|
...e,
|
|
1462
1462
|
children: /* @__PURE__ */ m("g", {
|
|
1463
1463
|
stroke: "currentColor",
|
|
@@ -1466,103 +1466,103 @@ var wo = "ydgo3h0", xo = "ydgo3h1", Po = "ydgo3h2", Zn = (e) => e === "start" ?
|
|
|
1466
1466
|
strokeLinejoin: "round",
|
|
1467
1467
|
children: [/* @__PURE__ */ n("path", { d: "M12 5v14" }), /* @__PURE__ */ n("path", { d: "M5 12h14" })]
|
|
1468
1468
|
})
|
|
1469
|
-
}),
|
|
1469
|
+
}), Uo = "var(--_1tyillx0)", Wo = {
|
|
1470
1470
|
rest: 0.5,
|
|
1471
1471
|
hovered: 0.75,
|
|
1472
1472
|
open: 1
|
|
1473
1473
|
};
|
|
1474
|
-
var
|
|
1474
|
+
var qo = "_1tyillx1", Zo = {
|
|
1475
1475
|
rest: "_1tyillx2",
|
|
1476
1476
|
hovered: "_1tyillx3",
|
|
1477
1477
|
open: "_1tyillx4"
|
|
1478
|
-
},
|
|
1478
|
+
}, $o = "_1tyillx5", Xo = {
|
|
1479
1479
|
closed: "_1tyillx6",
|
|
1480
1480
|
open: "_1tyillx7"
|
|
1481
|
-
},
|
|
1482
|
-
const i = q(),
|
|
1481
|
+
}, jo = ({ interaction: e, panelRect: t }) => {
|
|
1482
|
+
const i = q(), a = G((c) => c.coordSystem), o = e.kind === "trigger" || e.kind === "menu" ? e.anchor : null, r = Yo(e), l = E(() => {
|
|
1483
1483
|
if (o === null) return null;
|
|
1484
|
-
const c =
|
|
1484
|
+
const c = oa(o.position, t, a);
|
|
1485
1485
|
return {
|
|
1486
1486
|
center: c,
|
|
1487
|
-
radius: 19 *
|
|
1487
|
+
radius: 19 * Wo[r],
|
|
1488
1488
|
target: {
|
|
1489
1489
|
kind: "observation",
|
|
1490
|
-
cursor:
|
|
1490
|
+
cursor: Fe(c, t)
|
|
1491
1491
|
}
|
|
1492
1492
|
};
|
|
1493
1493
|
}, [
|
|
1494
1494
|
o,
|
|
1495
1495
|
t,
|
|
1496
|
-
|
|
1497
|
-
|
|
1496
|
+
a,
|
|
1497
|
+
r
|
|
1498
1498
|
]);
|
|
1499
1499
|
return V(() => {
|
|
1500
1500
|
i.getState().setMenuTrigger(l);
|
|
1501
1501
|
}, [i, l]), V(() => () => i.getState().setMenuTrigger(null), [i]), o === null || l === null ? null : /* @__PURE__ */ n("div", {
|
|
1502
1502
|
"aria-hidden": "true",
|
|
1503
1503
|
"data-testid": "observation-menu-trigger",
|
|
1504
|
-
"data-state":
|
|
1505
|
-
className:
|
|
1504
|
+
"data-state": r,
|
|
1505
|
+
className: oe(qo, Zo[r]),
|
|
1506
1506
|
style: {
|
|
1507
1507
|
left: t.x + l.center.x,
|
|
1508
1508
|
top: t.y + l.center.y,
|
|
1509
|
-
...
|
|
1509
|
+
...Mn({ [Uo]: o.color ?? Gt.border50 })
|
|
1510
1510
|
},
|
|
1511
1511
|
children: /* @__PURE__ */ n("span", {
|
|
1512
|
-
className:
|
|
1513
|
-
children: /* @__PURE__ */ n(
|
|
1512
|
+
className: oe($o, Xo[r === "open" ? "open" : "closed"]),
|
|
1513
|
+
children: /* @__PURE__ */ n(Go, { size: "lg" })
|
|
1514
1514
|
})
|
|
1515
1515
|
});
|
|
1516
|
-
},
|
|
1517
|
-
const { chartId: i } =
|
|
1516
|
+
}, Yo = (e) => e.kind === "menu" ? "open" : e.kind === "trigger" && e.isEngaged ? "hovered" : "rest", Qo = 'button:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])', Jo = (e, t) => {
|
|
1517
|
+
const { chartId: i } = U(), a = q();
|
|
1518
1518
|
V(() => {
|
|
1519
1519
|
if (t === null) return;
|
|
1520
|
-
const o = (
|
|
1521
|
-
if (
|
|
1522
|
-
const l = [...t.querySelectorAll(
|
|
1520
|
+
const o = (r) => {
|
|
1521
|
+
if (r.key !== "Tab" || r.defaultPrevented || !he(r.target, e, i) || a.getState().standingInteraction?.kind === "chrome-popup") return;
|
|
1522
|
+
const l = [...t.querySelectorAll(Qo)];
|
|
1523
1523
|
if (l.length === 0) return;
|
|
1524
|
-
|
|
1524
|
+
r.preventDefault();
|
|
1525
1525
|
const c = l.findIndex((s) => s === document.activeElement);
|
|
1526
|
-
l[c === -1 ?
|
|
1526
|
+
l[c === -1 ? r.shiftKey ? l.length - 1 : 0 : (c + (r.shiftKey ? -1 : 1) + l.length) % l.length]?.focus();
|
|
1527
1527
|
};
|
|
1528
1528
|
return document.addEventListener("keydown", o), () => document.removeEventListener("keydown", o);
|
|
1529
1529
|
}, [
|
|
1530
1530
|
e,
|
|
1531
1531
|
t,
|
|
1532
1532
|
i,
|
|
1533
|
-
|
|
1533
|
+
a
|
|
1534
1534
|
]);
|
|
1535
|
-
},
|
|
1536
|
-
const { selectionStore: t, chartId: i } =
|
|
1535
|
+
}, ei = (e) => {
|
|
1536
|
+
const { selectionStore: t, chartId: i } = U();
|
|
1537
1537
|
V(() => {
|
|
1538
|
-
let
|
|
1538
|
+
let a = null;
|
|
1539
1539
|
const o = () => {
|
|
1540
1540
|
e.focus({ preventScroll: !0 });
|
|
1541
|
-
},
|
|
1541
|
+
}, r = (c) => {
|
|
1542
1542
|
const { selection: s, clearSelection: u } = t.getState();
|
|
1543
|
-
s.length !== 0 && (
|
|
1543
|
+
s.length !== 0 && (he(c.target, e, i) || u());
|
|
1544
1544
|
}, l = (c) => {
|
|
1545
|
-
t.getState().selection.length !== 0 &&
|
|
1546
|
-
|
|
1545
|
+
t.getState().selection.length !== 0 && he(c.target, e, i) && c.relatedTarget === null && (a !== null && cancelAnimationFrame(a), a = requestAnimationFrame(() => {
|
|
1546
|
+
a = null, document.hasFocus() && (he(document.activeElement, e, i) || t.getState().clearSelection());
|
|
1547
1547
|
}));
|
|
1548
1548
|
};
|
|
1549
|
-
return e.addEventListener("pointerdown", o), document.addEventListener("focusin",
|
|
1550
|
-
|
|
1549
|
+
return e.addEventListener("pointerdown", o), document.addEventListener("focusin", r), document.addEventListener("focusout", l), () => {
|
|
1550
|
+
a !== null && cancelAnimationFrame(a), e.removeEventListener("pointerdown", o), document.removeEventListener("focusin", r), document.removeEventListener("focusout", l);
|
|
1551
1551
|
};
|
|
1552
1552
|
}, [
|
|
1553
1553
|
e,
|
|
1554
1554
|
t,
|
|
1555
1555
|
i
|
|
1556
1556
|
]);
|
|
1557
|
-
},
|
|
1558
|
-
const { selectionStore: t, commands: i, chartId:
|
|
1559
|
-
const { selection: s } = t.getState(), u =
|
|
1560
|
-
u !== null && (c.preventDefault(), i.dispatch(new
|
|
1557
|
+
}, ni = (e) => {
|
|
1558
|
+
const { selectionStore: t, commands: i, chartId: a } = U(), o = q(), r = Ce((c) => {
|
|
1559
|
+
const { selection: s } = t.getState(), u = Zn(s);
|
|
1560
|
+
u !== null && (c.preventDefault(), i.dispatch(new Ve({ id: u })), e.focus({ preventScroll: !0 }));
|
|
1561
1561
|
}, [
|
|
1562
1562
|
e,
|
|
1563
1563
|
i,
|
|
1564
1564
|
t
|
|
1565
|
-
]), l =
|
|
1565
|
+
]), l = Ce((c) => {
|
|
1566
1566
|
const s = o.getState();
|
|
1567
1567
|
switch (s.standingInteraction?.kind) {
|
|
1568
1568
|
case "endpoint-drag":
|
|
@@ -1574,7 +1574,7 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1574
1574
|
s.releaseInteraction("menu");
|
|
1575
1575
|
return;
|
|
1576
1576
|
default:
|
|
1577
|
-
if (
|
|
1577
|
+
if (Dn(c.target, a)) {
|
|
1578
1578
|
e.focus({ preventScroll: !0 });
|
|
1579
1579
|
return;
|
|
1580
1580
|
}
|
|
@@ -1585,17 +1585,17 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1585
1585
|
o,
|
|
1586
1586
|
t,
|
|
1587
1587
|
e,
|
|
1588
|
-
|
|
1588
|
+
a
|
|
1589
1589
|
]);
|
|
1590
1590
|
V(() => {
|
|
1591
1591
|
const c = (s) => {
|
|
1592
|
-
if (
|
|
1592
|
+
if (he(s.target, e, a) && !ti(s.target) && !pa(s.target))
|
|
1593
1593
|
switch (s.key) {
|
|
1594
1594
|
case "Escape":
|
|
1595
1595
|
return l(s);
|
|
1596
1596
|
case "Delete":
|
|
1597
1597
|
case "Backspace":
|
|
1598
|
-
return
|
|
1598
|
+
return r(s);
|
|
1599
1599
|
default:
|
|
1600
1600
|
return;
|
|
1601
1601
|
}
|
|
@@ -1603,49 +1603,49 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1603
1603
|
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
1604
1604
|
}, [
|
|
1605
1605
|
e,
|
|
1606
|
-
|
|
1606
|
+
r,
|
|
1607
1607
|
l,
|
|
1608
|
-
|
|
1608
|
+
a
|
|
1609
1609
|
]);
|
|
1610
|
-
},
|
|
1610
|
+
}, ti = (e) => e instanceof HTMLElement && (e.isContentEditable || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), ri = `[${xn}]`, Jn = (e, t, i) => {
|
|
1611
1611
|
if (typeof document.elementsFromPoint != "function") return null;
|
|
1612
|
-
const
|
|
1613
|
-
return
|
|
1614
|
-
},
|
|
1612
|
+
const a = document.elementsFromPoint(e, t);
|
|
1613
|
+
return ai(a, i);
|
|
1614
|
+
}, ai = (e, t) => {
|
|
1615
1615
|
for (const i of e) {
|
|
1616
|
-
const
|
|
1617
|
-
if (
|
|
1618
|
-
const o =
|
|
1616
|
+
const a = i.closest(ri);
|
|
1617
|
+
if (a === null || !t.contains(a)) continue;
|
|
1618
|
+
const o = oi(a);
|
|
1619
1619
|
if (o !== null) return o;
|
|
1620
1620
|
}
|
|
1621
1621
|
return null;
|
|
1622
|
-
},
|
|
1623
|
-
const t = e.getAttribute(
|
|
1622
|
+
}, oi = (e) => {
|
|
1623
|
+
const t = e.getAttribute(xn);
|
|
1624
1624
|
if (t !== "annotation") return null;
|
|
1625
|
-
const i = e.getAttribute(
|
|
1625
|
+
const i = e.getAttribute(zt);
|
|
1626
1626
|
return i === null || i === "" ? null : {
|
|
1627
1627
|
kind: t,
|
|
1628
1628
|
id: i
|
|
1629
1629
|
};
|
|
1630
|
-
},
|
|
1631
|
-
const e =
|
|
1630
|
+
}, ii = () => {
|
|
1631
|
+
const e = Ot((o) => o.hover.primary), { layers: t, coordSystem: i } = G(Be((o) => ({
|
|
1632
1632
|
layers: o.layers,
|
|
1633
1633
|
coordSystem: o.coordSystem
|
|
1634
|
-
}))), { anchorResolver:
|
|
1635
|
-
return
|
|
1634
|
+
}))), { anchorResolver: a } = U();
|
|
1635
|
+
return E(() => {
|
|
1636
1636
|
if (e === null) return null;
|
|
1637
1637
|
const o = t.find((c) => c.id === e.layerId);
|
|
1638
1638
|
if (o === void 0) return null;
|
|
1639
|
-
const
|
|
1639
|
+
const r = a.resolve(o.geom, e.observation, {
|
|
1640
1640
|
coordSystem: i,
|
|
1641
1641
|
position: o.position,
|
|
1642
1642
|
purpose: "pin"
|
|
1643
1643
|
});
|
|
1644
|
-
if (
|
|
1645
|
-
const l =
|
|
1644
|
+
if (r === null) return null;
|
|
1645
|
+
const l = Kr(o, e.observation);
|
|
1646
1646
|
return l === null ? null : {
|
|
1647
|
-
position:
|
|
1648
|
-
color:
|
|
1647
|
+
position: r,
|
|
1648
|
+
color: Jr(e.observation),
|
|
1649
1649
|
layer: o,
|
|
1650
1650
|
at: l,
|
|
1651
1651
|
observation: e.observation
|
|
@@ -1654,11 +1654,11 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1654
1654
|
e,
|
|
1655
1655
|
t,
|
|
1656
1656
|
i,
|
|
1657
|
-
|
|
1657
|
+
a
|
|
1658
1658
|
]);
|
|
1659
|
-
},
|
|
1660
|
-
const e =
|
|
1661
|
-
return
|
|
1659
|
+
}, li = { kind: "idle" }, et = () => {
|
|
1660
|
+
const e = fe((a) => a.standingInteraction), t = fe((a) => a.chromeUnderPointer), i = ii();
|
|
1661
|
+
return E(() => e !== null ? e : i === null ? li : {
|
|
1662
1662
|
kind: "trigger",
|
|
1663
1663
|
anchor: i,
|
|
1664
1664
|
isEngaged: t === "menu-trigger"
|
|
@@ -1667,32 +1667,32 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1667
1667
|
i,
|
|
1668
1668
|
t
|
|
1669
1669
|
]);
|
|
1670
|
-
},
|
|
1671
|
-
const i = q(),
|
|
1670
|
+
}, si = (e, t) => {
|
|
1671
|
+
const i = q(), a = de(t);
|
|
1672
1672
|
V(() => {
|
|
1673
|
-
let o = null,
|
|
1673
|
+
let o = null, r = null;
|
|
1674
1674
|
const l = (h) => {
|
|
1675
|
-
const { menuTrigger:
|
|
1676
|
-
return
|
|
1675
|
+
const { menuTrigger: g } = i.getState();
|
|
1676
|
+
return g === null ? null : kn(h, g) ? "menu-trigger" : null;
|
|
1677
1677
|
}, c = () => {
|
|
1678
1678
|
o = null;
|
|
1679
|
-
const h =
|
|
1680
|
-
if (
|
|
1681
|
-
const
|
|
1679
|
+
const h = r;
|
|
1680
|
+
if (r = null, h === null) return;
|
|
1681
|
+
const g = a.current, p = i.getState();
|
|
1682
1682
|
p.setChromeUnderPointer(l({
|
|
1683
|
-
x: h.x -
|
|
1684
|
-
y: h.y -
|
|
1685
|
-
})), p.standingInteraction?.kind !== "menu" && p.setEditTargetUnderPointer(
|
|
1683
|
+
x: h.x - g.x,
|
|
1684
|
+
y: h.y - g.y
|
|
1685
|
+
})), p.standingInteraction?.kind !== "menu" && p.setEditTargetUnderPointer(Jn(h.x, h.y, e));
|
|
1686
1686
|
}, s = () => {
|
|
1687
1687
|
const h = i.getState();
|
|
1688
1688
|
h.setChromeUnderPointer(null), h.setEditTargetUnderPointer(null);
|
|
1689
1689
|
}, u = (h) => {
|
|
1690
|
-
|
|
1690
|
+
r = {
|
|
1691
1691
|
x: h.clientX,
|
|
1692
1692
|
y: h.clientY
|
|
1693
1693
|
}, o === null && (o = requestAnimationFrame(c));
|
|
1694
1694
|
}, d = () => {
|
|
1695
|
-
|
|
1695
|
+
r = null, o !== null && (cancelAnimationFrame(o), o = null), s();
|
|
1696
1696
|
};
|
|
1697
1697
|
return e.addEventListener("pointermove", u), e.addEventListener("pointerleave", d), () => {
|
|
1698
1698
|
o !== null && cancelAnimationFrame(o), e.removeEventListener("pointermove", u), e.removeEventListener("pointerleave", d), s();
|
|
@@ -1700,59 +1700,59 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1700
1700
|
}, [
|
|
1701
1701
|
e,
|
|
1702
1702
|
i,
|
|
1703
|
-
|
|
1703
|
+
a
|
|
1704
1704
|
]);
|
|
1705
|
-
},
|
|
1706
|
-
const o =
|
|
1707
|
-
|
|
1708
|
-
|
|
1705
|
+
}, ln = "editor", sn = [], ci = (e, t, i, a) => {
|
|
1706
|
+
const o = et(), { store: r } = De(), l = Tn().length > 0, c = fe((d) => d.menuTrigger), s = o.kind === "menu", u = E(() => c === null ? sn : [Fr(c)], [c]);
|
|
1707
|
+
si(e, t), di(o, e, t, i), ei(e), ni(e), Jo(e, a), V(() => (r.getState().publishPointerRegions(ln, u), () => r.getState().publishPointerRegions(ln, sn)), [r, u]), V(() => (r.getState().setPointerSuspended(s || l), () => r.getState().setPointerSuspended(!1)), [
|
|
1708
|
+
r,
|
|
1709
1709
|
s,
|
|
1710
1710
|
l
|
|
1711
1711
|
]), V(() => {
|
|
1712
1712
|
if (!l) return;
|
|
1713
|
-
const d =
|
|
1714
|
-
d.setHoverState(
|
|
1715
|
-
}, [
|
|
1716
|
-
},
|
|
1717
|
-
const o = q(), { selectionStore:
|
|
1713
|
+
const d = r.getState();
|
|
1714
|
+
d.setHoverState(In), d.setTooltipAnchor(null);
|
|
1715
|
+
}, [r, l]);
|
|
1716
|
+
}, di = (e, t, i, a) => {
|
|
1717
|
+
const o = q(), { selectionStore: r } = U(), { store: l, engine: c } = De(), s = de(e), u = de(i), d = de(a);
|
|
1718
1718
|
V(() => {
|
|
1719
1719
|
const h = (y) => {
|
|
1720
1720
|
const { menuTrigger: f } = o.getState();
|
|
1721
|
-
return f === null ? !1 :
|
|
1722
|
-
},
|
|
1723
|
-
if (h(y) ||
|
|
1724
|
-
const f = d.current, x =
|
|
1725
|
-
l.getState().setHoverState(
|
|
1721
|
+
return f === null ? !1 : kn(cn(y, u.current), f);
|
|
1722
|
+
}, g = (y) => {
|
|
1723
|
+
if (h(y) || r.getState().selection.length > 0) return;
|
|
1724
|
+
const f = d.current, x = cn(y, u.current), I = hi(x, f) ? c.query(Fe(x, f)) : In;
|
|
1725
|
+
l.getState().setHoverState(I);
|
|
1726
1726
|
};
|
|
1727
1727
|
let p = !1;
|
|
1728
|
-
const
|
|
1728
|
+
const v = () => {
|
|
1729
1729
|
p = s.current.kind === "menu";
|
|
1730
1730
|
}, S = (y) => {
|
|
1731
|
-
const f =
|
|
1731
|
+
const f = Jn(y.clientX, y.clientY, t), x = r.getState();
|
|
1732
1732
|
if (f === null) {
|
|
1733
1733
|
x.clearSelection();
|
|
1734
1734
|
return;
|
|
1735
1735
|
}
|
|
1736
1736
|
x.setSelection([f]);
|
|
1737
1737
|
}, P = (y) => {
|
|
1738
|
-
if (
|
|
1739
|
-
const { claimInteraction: f, releaseInteraction: x } = o.getState(),
|
|
1740
|
-
if (!
|
|
1741
|
-
x("menu"),
|
|
1738
|
+
if (ga(y.target)) return;
|
|
1739
|
+
const { claimInteraction: f, releaseInteraction: x } = o.getState(), I = h(y);
|
|
1740
|
+
if (!I || p) {
|
|
1741
|
+
x("menu"), I || S(y), p && g(y);
|
|
1742
1742
|
return;
|
|
1743
1743
|
}
|
|
1744
|
-
const
|
|
1745
|
-
|
|
1744
|
+
const H = s.current;
|
|
1745
|
+
H.kind === "trigger" && f({
|
|
1746
1746
|
kind: "menu",
|
|
1747
|
-
anchor:
|
|
1747
|
+
anchor: H.anchor
|
|
1748
1748
|
});
|
|
1749
1749
|
};
|
|
1750
|
-
return document.addEventListener("pointerdown",
|
|
1751
|
-
document.removeEventListener("pointerdown",
|
|
1750
|
+
return document.addEventListener("pointerdown", v, !0), document.addEventListener("click", P), () => {
|
|
1751
|
+
document.removeEventListener("pointerdown", v, !0), document.removeEventListener("click", P);
|
|
1752
1752
|
};
|
|
1753
1753
|
}, [
|
|
1754
1754
|
o,
|
|
1755
|
-
|
|
1755
|
+
r,
|
|
1756
1756
|
t,
|
|
1757
1757
|
s,
|
|
1758
1758
|
l,
|
|
@@ -1760,18 +1760,18 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1760
1760
|
u,
|
|
1761
1761
|
d
|
|
1762
1762
|
]);
|
|
1763
|
-
},
|
|
1763
|
+
}, cn = (e, t) => ({
|
|
1764
1764
|
x: e.clientX - t.x,
|
|
1765
1765
|
y: e.clientY - t.y
|
|
1766
|
-
}),
|
|
1767
|
-
const { measureRef: i, screenRect:
|
|
1768
|
-
return V(() => (i(e), () => i(null)), [i, e]), V(() => () => o.getState().releaseInteraction("menu"), [o]),
|
|
1766
|
+
}), hi = (e, t) => e.x >= 0 && e.x <= t.width && e.y >= 0 && e.y <= t.height, ui = ({ frameElement: e, panelRect: t }) => {
|
|
1767
|
+
const { measureRef: i, screenRect: a } = Nt(), o = q();
|
|
1768
|
+
return V(() => (i(e), () => i(null)), [i, e]), V(() => () => o.getState().releaseInteraction("menu"), [o]), a === null ? null : /* @__PURE__ */ n(fa, { children: /* @__PURE__ */ n(mi, {
|
|
1769
1769
|
frameElement: e,
|
|
1770
|
-
frameRect:
|
|
1770
|
+
frameRect: a,
|
|
1771
1771
|
panelRect: t
|
|
1772
1772
|
}) });
|
|
1773
|
-
},
|
|
1774
|
-
const
|
|
1773
|
+
}, mi = ({ frameElement: e, frameRect: t, panelRect: i }) => {
|
|
1774
|
+
const a = E(() => ({
|
|
1775
1775
|
x: t.left + i.x,
|
|
1776
1776
|
y: t.top + i.y
|
|
1777
1777
|
}), [
|
|
@@ -1779,78 +1779,78 @@ var Vo = "_1tyillx1", Fo = {
|
|
|
1779
1779
|
t.top,
|
|
1780
1780
|
i.x,
|
|
1781
1781
|
i.y
|
|
1782
|
-
]), [o,
|
|
1783
|
-
return
|
|
1782
|
+
]), [o, r] = Z(null);
|
|
1783
|
+
return ci(e, a, i, o), /* @__PURE__ */ n(pi, {
|
|
1784
1784
|
frameElement: e,
|
|
1785
1785
|
frameRect: t,
|
|
1786
|
-
panelOrigin:
|
|
1786
|
+
panelOrigin: a,
|
|
1787
1787
|
panelRect: i,
|
|
1788
|
-
boxRef:
|
|
1788
|
+
boxRef: r
|
|
1789
1789
|
});
|
|
1790
|
-
},
|
|
1791
|
-
const
|
|
1792
|
-
return /* @__PURE__ */ n(
|
|
1790
|
+
}, pi = ({ frameElement: e, frameRect: t, panelOrigin: i, panelRect: a, boxRef: o }) => {
|
|
1791
|
+
const r = Ke(), l = et();
|
|
1792
|
+
return /* @__PURE__ */ n(kt, {
|
|
1793
1793
|
rect: t,
|
|
1794
|
-
zIndex:
|
|
1795
|
-
container:
|
|
1794
|
+
zIndex: Mt.editorOverlay,
|
|
1795
|
+
container: r,
|
|
1796
1796
|
"data-testid": "editor-overlay",
|
|
1797
1797
|
boxRef: o,
|
|
1798
|
-
children: /* @__PURE__ */ m(
|
|
1799
|
-
/* @__PURE__ */ n(
|
|
1800
|
-
panelRect:
|
|
1798
|
+
children: /* @__PURE__ */ m(ue, { children: [
|
|
1799
|
+
/* @__PURE__ */ n(Fo, {
|
|
1800
|
+
panelRect: a,
|
|
1801
1801
|
panelOrigin: i,
|
|
1802
1802
|
frameRect: t,
|
|
1803
1803
|
frameElement: e
|
|
1804
1804
|
}),
|
|
1805
|
-
/* @__PURE__ */ n(
|
|
1805
|
+
/* @__PURE__ */ n(jo, {
|
|
1806
1806
|
interaction: l,
|
|
1807
|
-
panelRect:
|
|
1807
|
+
panelRect: a
|
|
1808
1808
|
}),
|
|
1809
|
-
/* @__PURE__ */ n(
|
|
1809
|
+
/* @__PURE__ */ n(no, {
|
|
1810
1810
|
interaction: l,
|
|
1811
1811
|
panelOrigin: i
|
|
1812
1812
|
})
|
|
1813
1813
|
] })
|
|
1814
1814
|
});
|
|
1815
|
-
},
|
|
1816
|
-
slots:
|
|
1817
|
-
EditorSurface:
|
|
1815
|
+
}, oc = ({ slots: e, ...t }) => /* @__PURE__ */ n(Ht, { children: /* @__PURE__ */ n(Dt, {
|
|
1816
|
+
slots: E(() => ({
|
|
1817
|
+
EditorSurface: ui,
|
|
1818
1818
|
...e
|
|
1819
1819
|
}), [e]),
|
|
1820
1820
|
...t
|
|
1821
|
-
}) }),
|
|
1822
|
-
const
|
|
1821
|
+
}) }), nt = me(null), tt = ({ labelId: e, controlId: t, children: i }) => {
|
|
1822
|
+
const a = E(() => {
|
|
1823
1823
|
let o = null;
|
|
1824
1824
|
return {
|
|
1825
1825
|
labelId: e,
|
|
1826
1826
|
controlId: t,
|
|
1827
|
-
claimControlId: (
|
|
1827
|
+
claimControlId: (r) => (o ??= r, o === r)
|
|
1828
1828
|
};
|
|
1829
1829
|
}, [e, t]);
|
|
1830
|
-
return /* @__PURE__ */ n(
|
|
1831
|
-
value:
|
|
1830
|
+
return /* @__PURE__ */ n(nt.Provider, {
|
|
1831
|
+
value: a,
|
|
1832
1832
|
children: i
|
|
1833
1833
|
});
|
|
1834
|
-
},
|
|
1835
|
-
const o =
|
|
1834
|
+
}, Q = ({ id: e, ariaLabel: t, ariaLabelledBy: i }, a = !0) => {
|
|
1835
|
+
const o = ie(nt), r = ae(), [l] = Z(() => a ? o?.claimControlId(r) ?? !1 : !1), c = e ?? (l ? o?.controlId : void 0), s = i ?? (t === void 0 ? o?.labelId : void 0);
|
|
1836
1836
|
return {
|
|
1837
1837
|
...c !== void 0 && { id: c },
|
|
1838
1838
|
...t !== void 0 && { "aria-label": t },
|
|
1839
1839
|
...s !== void 0 && { "aria-labelledby": s }
|
|
1840
1840
|
};
|
|
1841
1841
|
};
|
|
1842
|
-
var
|
|
1842
|
+
var gi = {
|
|
1843
1843
|
default: "woi4bh4 woi4bh3",
|
|
1844
1844
|
tile: "woi4bh5 woi4bh3"
|
|
1845
|
-
},
|
|
1846
|
-
const s =
|
|
1845
|
+
}, vi = ({ label: e, icon: t, onClick: i, variant: a = "default", isDisabled: o, ariaLabel: r, ariaLabelledBy: l, id: c }) => {
|
|
1846
|
+
const s = Q({
|
|
1847
1847
|
id: c,
|
|
1848
|
-
ariaLabel:
|
|
1848
|
+
ariaLabel: r,
|
|
1849
1849
|
ariaLabelledBy: l
|
|
1850
|
-
}), u =
|
|
1850
|
+
}), u = a === "tile";
|
|
1851
1851
|
return /* @__PURE__ */ m("button", {
|
|
1852
1852
|
type: "button",
|
|
1853
|
-
className:
|
|
1853
|
+
className: gi[a],
|
|
1854
1854
|
disabled: o,
|
|
1855
1855
|
onClick: i,
|
|
1856
1856
|
...s,
|
|
@@ -1862,23 +1862,23 @@ var si = {
|
|
|
1862
1862
|
children: e
|
|
1863
1863
|
})]
|
|
1864
1864
|
});
|
|
1865
|
-
},
|
|
1866
|
-
const e =
|
|
1865
|
+
}, Ue = me(null), N = () => {
|
|
1866
|
+
const e = ie(Ue);
|
|
1867
1867
|
if (!e) throw new Error("An editing section must sit inside an <EditorPanel.Root> bound to a graph — pass it a `handle`, or render the panel inside a <GraphProvider>.");
|
|
1868
1868
|
return e;
|
|
1869
|
-
},
|
|
1870
|
-
const
|
|
1869
|
+
}, rt = ({ children: e, onKeyDown: t, ...i }) => {
|
|
1870
|
+
const a = ie(Ue);
|
|
1871
1871
|
return /* @__PURE__ */ n("div", {
|
|
1872
|
-
onKeyDown: (
|
|
1873
|
-
if (t?.(
|
|
1874
|
-
const l =
|
|
1875
|
-
l && (
|
|
1872
|
+
onKeyDown: (r) => {
|
|
1873
|
+
if (t?.(r), !a || r.defaultPrevented) return;
|
|
1874
|
+
const l = Bt(r.nativeEvent);
|
|
1875
|
+
l && (r.preventDefault(), l === "undo" ? a.undo() : a.redo());
|
|
1876
1876
|
},
|
|
1877
1877
|
...i,
|
|
1878
1878
|
children: e
|
|
1879
1879
|
});
|
|
1880
|
-
},
|
|
1881
|
-
const t =
|
|
1880
|
+
}, at = "keyboard", Te = (e) => {
|
|
1881
|
+
const t = be(!1), i = be(!1), a = () => {
|
|
1882
1882
|
t.current = !1, i.current && (i.current = !1, e?.());
|
|
1883
1883
|
};
|
|
1884
1884
|
return {
|
|
@@ -1900,32 +1900,32 @@ var si = {
|
|
|
1900
1900
|
onKeyDown: () => {
|
|
1901
1901
|
t.current = !0;
|
|
1902
1902
|
},
|
|
1903
|
-
onKeyUp:
|
|
1903
|
+
onKeyUp: a,
|
|
1904
1904
|
onBlur: (o) => {
|
|
1905
|
-
o.relatedTarget instanceof Node && o.currentTarget.contains(o.relatedTarget) ||
|
|
1905
|
+
o.relatedTarget instanceof Node && o.currentTarget.contains(o.relatedTarget) || a();
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
1908
|
};
|
|
1909
|
-
},
|
|
1910
|
-
var
|
|
1911
|
-
const p =
|
|
1912
|
-
id:
|
|
1909
|
+
}, fi = "eh8dvc0", Ci = "eh8dvc1 uz3g760", bi = "eh8dvc2 uz3g761";
|
|
1910
|
+
var yi = ({ value: e, onChange: t, onCommit: i, min: a, max: o, step: r, prefix: l, suffix: c, isDisabled: s, hasError: u, ariaLabel: d, ariaLabelledBy: h, id: g }) => {
|
|
1911
|
+
const p = Q({
|
|
1912
|
+
id: g,
|
|
1913
1913
|
ariaLabel: d,
|
|
1914
1914
|
ariaLabelledBy: h
|
|
1915
|
-
}), { commitUnlessHeldKey:
|
|
1916
|
-
return /* @__PURE__ */ n(
|
|
1917
|
-
className:
|
|
1915
|
+
}), { commitUnlessHeldKey: v, gestureHandlers: S } = Te(i);
|
|
1916
|
+
return /* @__PURE__ */ n(nn.Root, {
|
|
1917
|
+
className: fi,
|
|
1918
1918
|
value: e,
|
|
1919
1919
|
onValueChange: (P) => t(P),
|
|
1920
1920
|
onValueCommitted: (P, y) => {
|
|
1921
|
-
|
|
1921
|
+
v(y.reason === at);
|
|
1922
1922
|
},
|
|
1923
|
-
min:
|
|
1923
|
+
min: a,
|
|
1924
1924
|
max: o,
|
|
1925
|
-
step:
|
|
1925
|
+
step: r,
|
|
1926
1926
|
disabled: s,
|
|
1927
|
-
children: /* @__PURE__ */ m(
|
|
1928
|
-
className:
|
|
1927
|
+
children: /* @__PURE__ */ m(rt, {
|
|
1928
|
+
className: Ci,
|
|
1929
1929
|
"data-error": u === !0,
|
|
1930
1930
|
"data-disabled": s === !0 ? "" : void 0,
|
|
1931
1931
|
children: [
|
|
@@ -1933,8 +1933,8 @@ var mi = ({ value: e, onChange: t, onCommit: i, min: r, max: o, step: a, prefix:
|
|
|
1933
1933
|
className: "eh8dvc3",
|
|
1934
1934
|
children: l
|
|
1935
1935
|
}),
|
|
1936
|
-
/* @__PURE__ */ n(
|
|
1937
|
-
className:
|
|
1936
|
+
/* @__PURE__ */ n(nn.Input, {
|
|
1937
|
+
className: bi,
|
|
1938
1938
|
...S,
|
|
1939
1939
|
"aria-invalid": u === !0 ? !0 : void 0,
|
|
1940
1940
|
...p
|
|
@@ -1946,63 +1946,63 @@ var mi = ({ value: e, onChange: t, onCommit: i, min: r, max: o, step: a, prefix:
|
|
|
1946
1946
|
]
|
|
1947
1947
|
})
|
|
1948
1948
|
});
|
|
1949
|
-
},
|
|
1949
|
+
}, Si = "_1b7s5f0", re = {
|
|
1950
1950
|
1: "_1b7s5f1",
|
|
1951
1951
|
2: "_1b7s5f2",
|
|
1952
1952
|
3: "_1b7s5f3",
|
|
1953
1953
|
4: "_1b7s5f4",
|
|
1954
1954
|
5: "_1b7s5f5",
|
|
1955
1955
|
6: "_1b7s5f6"
|
|
1956
|
-
},
|
|
1957
|
-
var
|
|
1958
|
-
const d =
|
|
1956
|
+
}, wi = "_1b7s5f7";
|
|
1957
|
+
var xi = 6, Ti = ({ options: e, value: t, onChange: i, onCommit: a, columns: o, itemLayout: r = "tile", isDisabled: l, ariaLabel: c, ariaLabelledBy: s, id: u }) => {
|
|
1958
|
+
const d = Q({
|
|
1959
1959
|
id: u,
|
|
1960
1960
|
ariaLabel: c,
|
|
1961
1961
|
ariaLabelledBy: s
|
|
1962
|
-
}), h =
|
|
1963
|
-
return /* @__PURE__ */ n(
|
|
1964
|
-
className:
|
|
1962
|
+
}), h = r === "swatch", { commitAfterChange: g, gestureHandlers: p } = Te(a);
|
|
1963
|
+
return /* @__PURE__ */ n(Rn, {
|
|
1964
|
+
className: oe(Si, Pi(o ?? e.length)),
|
|
1965
1965
|
value: t,
|
|
1966
|
-
onValueChange: (
|
|
1967
|
-
i(
|
|
1966
|
+
onValueChange: (v) => {
|
|
1967
|
+
i(v), g();
|
|
1968
1968
|
},
|
|
1969
1969
|
...p,
|
|
1970
1970
|
disabled: l,
|
|
1971
1971
|
...d,
|
|
1972
|
-
children: e.map((
|
|
1973
|
-
value:
|
|
1974
|
-
disabled:
|
|
1975
|
-
className:
|
|
1976
|
-
"aria-label": h ?
|
|
1977
|
-
children: [
|
|
1972
|
+
children: e.map((v) => /* @__PURE__ */ m(En.Root, {
|
|
1973
|
+
value: v.value,
|
|
1974
|
+
disabled: v.isDisabled,
|
|
1975
|
+
className: oe(wi, h && "_1b7s5f8"),
|
|
1976
|
+
"aria-label": h ? v.label : void 0,
|
|
1977
|
+
children: [v.icon, !h && /* @__PURE__ */ n("span", {
|
|
1978
1978
|
className: "_1b7s5f9",
|
|
1979
|
-
children:
|
|
1979
|
+
children: v.label
|
|
1980
1980
|
})]
|
|
1981
|
-
},
|
|
1981
|
+
}, v.value))
|
|
1982
1982
|
});
|
|
1983
|
-
},
|
|
1984
|
-
switch (Math.min(Math.max(Math.round(e), 1),
|
|
1983
|
+
}, Pi = (e) => {
|
|
1984
|
+
switch (Math.min(Math.max(Math.round(e), 1), xi)) {
|
|
1985
1985
|
case 1:
|
|
1986
|
-
return
|
|
1986
|
+
return re[1];
|
|
1987
1987
|
case 2:
|
|
1988
|
-
return
|
|
1988
|
+
return re[2];
|
|
1989
1989
|
case 3:
|
|
1990
|
-
return
|
|
1990
|
+
return re[3];
|
|
1991
1991
|
case 4:
|
|
1992
|
-
return
|
|
1992
|
+
return re[4];
|
|
1993
1993
|
case 5:
|
|
1994
|
-
return
|
|
1994
|
+
return re[5];
|
|
1995
1995
|
default:
|
|
1996
|
-
return
|
|
1996
|
+
return re[6];
|
|
1997
1997
|
}
|
|
1998
|
-
},
|
|
1999
|
-
var
|
|
2000
|
-
const u =
|
|
1998
|
+
}, Ii = "_1g5x15w0 uz3g760", Ai = "_1g5x15w1", Li = "_1g5x15w2", dn = "_1g5x15w3", Oi = "_1g5x15w4", Ni = "_1g5x15w5", ki = "_1g5x15w6", Mi = "_1g5x15w7";
|
|
1999
|
+
var Ei = ({ options: e, value: t, onChange: i, placeholder: a, isDisabled: o, hasError: r, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
|
|
2000
|
+
const u = Q({
|
|
2001
2001
|
id: s,
|
|
2002
2002
|
ariaLabel: l,
|
|
2003
2003
|
ariaLabelledBy: c
|
|
2004
2004
|
});
|
|
2005
|
-
return /* @__PURE__ */ m(
|
|
2005
|
+
return /* @__PURE__ */ m(W.Root, {
|
|
2006
2006
|
value: t,
|
|
2007
2007
|
onValueChange: (d) => d !== null && i(d),
|
|
2008
2008
|
disabled: o,
|
|
@@ -2010,41 +2010,41 @@ var Ti = ({ options: e, value: t, onChange: i, placeholder: r, isDisabled: o, ha
|
|
|
2010
2010
|
value: d.value,
|
|
2011
2011
|
label: d.label
|
|
2012
2012
|
})),
|
|
2013
|
-
children: [/* @__PURE__ */ m(
|
|
2014
|
-
className:
|
|
2015
|
-
"data-error":
|
|
2013
|
+
children: [/* @__PURE__ */ m(W.Trigger, {
|
|
2014
|
+
className: Ii,
|
|
2015
|
+
"data-error": r === !0,
|
|
2016
2016
|
...u,
|
|
2017
|
-
children: [/* @__PURE__ */ n(
|
|
2018
|
-
className:
|
|
2019
|
-
children: (d) =>
|
|
2020
|
-
}), /* @__PURE__ */ n(
|
|
2021
|
-
className:
|
|
2022
|
-
children: /* @__PURE__ */ n(
|
|
2017
|
+
children: [/* @__PURE__ */ n(W.Value, {
|
|
2018
|
+
className: Ai,
|
|
2019
|
+
children: (d) => Ri(e, d, a)
|
|
2020
|
+
}), /* @__PURE__ */ n(W.Icon, {
|
|
2021
|
+
className: dn,
|
|
2022
|
+
children: /* @__PURE__ */ n(we, { size: "sm" })
|
|
2023
2023
|
})]
|
|
2024
|
-
}), /* @__PURE__ */ n(
|
|
2025
|
-
container:
|
|
2026
|
-
children: /* @__PURE__ */ n(
|
|
2027
|
-
className:
|
|
2024
|
+
}), /* @__PURE__ */ n(W.Portal, {
|
|
2025
|
+
container: He(),
|
|
2026
|
+
children: /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(W.Positioner, {
|
|
2027
|
+
className: Oi,
|
|
2028
2028
|
sideOffset: 4,
|
|
2029
2029
|
alignItemWithTrigger: !1,
|
|
2030
|
-
children: /* @__PURE__ */ n(
|
|
2031
|
-
className:
|
|
2032
|
-
children: e.map((d) => /* @__PURE__ */ m(
|
|
2030
|
+
children: /* @__PURE__ */ n(W.Popup, {
|
|
2031
|
+
className: Ni,
|
|
2032
|
+
children: e.map((d) => /* @__PURE__ */ m(W.Item, {
|
|
2033
2033
|
value: d.value,
|
|
2034
2034
|
disabled: d.isDisabled,
|
|
2035
|
-
className:
|
|
2035
|
+
className: ki,
|
|
2036
2036
|
children: [
|
|
2037
2037
|
d.icon,
|
|
2038
2038
|
/* @__PURE__ */ m("span", {
|
|
2039
|
-
className:
|
|
2040
|
-
children: [/* @__PURE__ */ n(
|
|
2039
|
+
className: Mi,
|
|
2040
|
+
children: [/* @__PURE__ */ n(W.ItemText, { children: d.label }), d.description !== void 0 && /* @__PURE__ */ n("span", {
|
|
2041
2041
|
className: "_1g5x15w8",
|
|
2042
2042
|
children: d.description
|
|
2043
2043
|
})]
|
|
2044
2044
|
}),
|
|
2045
|
-
/* @__PURE__ */ n(
|
|
2046
|
-
className:
|
|
2047
|
-
children: /* @__PURE__ */ n(
|
|
2045
|
+
/* @__PURE__ */ n(W.ItemIndicator, {
|
|
2046
|
+
className: dn,
|
|
2047
|
+
children: /* @__PURE__ */ n(Kt, { size: "sm" })
|
|
2048
2048
|
})
|
|
2049
2049
|
]
|
|
2050
2050
|
}, d.value))
|
|
@@ -2052,159 +2052,159 @@ var Ti = ({ options: e, value: t, onChange: i, placeholder: r, isDisabled: o, ha
|
|
|
2052
2052
|
}) })
|
|
2053
2053
|
})]
|
|
2054
2054
|
});
|
|
2055
|
-
},
|
|
2056
|
-
className:
|
|
2055
|
+
}, Ri = (e, t, i) => t === null ? /* @__PURE__ */ n("span", {
|
|
2056
|
+
className: Li,
|
|
2057
2057
|
children: i
|
|
2058
|
-
}) :
|
|
2059
|
-
var
|
|
2060
|
-
const h =
|
|
2058
|
+
}) : _i(e, t), _i = (e, t) => e.find((i) => i.value === t)?.label ?? t, Di = "vod76w0", Hi = "vod76w1", zi = "vod76w2", Vi = "vod76w3", Fi = "vod76w4", Bi = "vod76w5";
|
|
2059
|
+
var Ki = ({ value: e, onChange: t, onCommit: i, min: a, max: o, step: r, suffix: l, formatValue: c, isDisabled: s, ariaLabel: u, ariaLabelledBy: d }) => {
|
|
2060
|
+
const h = Q({
|
|
2061
2061
|
ariaLabel: u,
|
|
2062
2062
|
ariaLabelledBy: d
|
|
2063
|
-
}, !1),
|
|
2063
|
+
}, !1), g = Gi(e, l, c), { commitUnlessHeldKey: p, gestureHandlers: v } = Te(i);
|
|
2064
2064
|
return /* @__PURE__ */ m("div", {
|
|
2065
|
-
className:
|
|
2066
|
-
children: [/* @__PURE__ */ n(
|
|
2067
|
-
className:
|
|
2065
|
+
className: Di,
|
|
2066
|
+
children: [/* @__PURE__ */ n(le.Root, {
|
|
2067
|
+
className: Hi,
|
|
2068
2068
|
value: e,
|
|
2069
2069
|
onValueChange: (S) => t(S),
|
|
2070
2070
|
onValueCommitted: (S, P) => {
|
|
2071
|
-
p(P.reason ===
|
|
2071
|
+
p(P.reason === at);
|
|
2072
2072
|
},
|
|
2073
|
-
min:
|
|
2073
|
+
min: a,
|
|
2074
2074
|
max: o,
|
|
2075
|
-
step:
|
|
2075
|
+
step: r,
|
|
2076
2076
|
disabled: s,
|
|
2077
|
-
children: /* @__PURE__ */ n(
|
|
2078
|
-
className:
|
|
2079
|
-
children: /* @__PURE__ */ m(
|
|
2080
|
-
className:
|
|
2081
|
-
children: [/* @__PURE__ */ n(
|
|
2082
|
-
className:
|
|
2083
|
-
...
|
|
2077
|
+
children: /* @__PURE__ */ n(le.Control, {
|
|
2078
|
+
className: zi,
|
|
2079
|
+
children: /* @__PURE__ */ m(le.Track, {
|
|
2080
|
+
className: Vi,
|
|
2081
|
+
children: [/* @__PURE__ */ n(le.Indicator, { className: Fi }), /* @__PURE__ */ n(le.Thumb, {
|
|
2082
|
+
className: Bi,
|
|
2083
|
+
...v,
|
|
2084
2084
|
...h
|
|
2085
2085
|
})]
|
|
2086
2086
|
})
|
|
2087
2087
|
})
|
|
2088
|
-
}),
|
|
2088
|
+
}), g !== null && /* @__PURE__ */ n("span", {
|
|
2089
2089
|
className: "vod76w6",
|
|
2090
|
-
children:
|
|
2090
|
+
children: g
|
|
2091
2091
|
})]
|
|
2092
2092
|
});
|
|
2093
|
-
},
|
|
2094
|
-
const l =
|
|
2095
|
-
id:
|
|
2096
|
-
ariaLabel:
|
|
2093
|
+
}, Gi = (e, t, i) => i !== void 0 ? i(e) : t !== void 0 ? `${e}${t}` : null, Ui = "_1hyrlw60", Wi = "_1hyrlw61", qi = ({ isChecked: e, onChange: t, isDisabled: i, ariaLabel: a, ariaLabelledBy: o, id: r }) => {
|
|
2094
|
+
const l = Q({
|
|
2095
|
+
id: r,
|
|
2096
|
+
ariaLabel: a,
|
|
2097
2097
|
ariaLabelledBy: o
|
|
2098
2098
|
});
|
|
2099
|
-
return /* @__PURE__ */ n(
|
|
2099
|
+
return /* @__PURE__ */ n(tn.Root, {
|
|
2100
2100
|
checked: e,
|
|
2101
2101
|
onCheckedChange: (c) => t(c),
|
|
2102
2102
|
disabled: i,
|
|
2103
|
-
className:
|
|
2103
|
+
className: Ui,
|
|
2104
2104
|
...l,
|
|
2105
|
-
children: /* @__PURE__ */ n(
|
|
2105
|
+
children: /* @__PURE__ */ n(tn.Thumb, { className: Wi })
|
|
2106
2106
|
});
|
|
2107
|
-
},
|
|
2108
|
-
const u =
|
|
2107
|
+
}, Zi = "uz3g761", $i = "tpcnun0 uz3g760", Xi = ({ value: e, onChange: t, onCommit: i, placeholder: a, isDisabled: o, hasError: r, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
|
|
2108
|
+
const u = Q({
|
|
2109
2109
|
id: s,
|
|
2110
2110
|
ariaLabel: l,
|
|
2111
2111
|
ariaLabelledBy: c
|
|
2112
2112
|
});
|
|
2113
|
-
return /* @__PURE__ */ n(
|
|
2114
|
-
className:
|
|
2115
|
-
"data-error":
|
|
2116
|
-
children: /* @__PURE__ */ n(
|
|
2117
|
-
className:
|
|
2113
|
+
return /* @__PURE__ */ n(rt, {
|
|
2114
|
+
className: $i,
|
|
2115
|
+
"data-error": r === !0,
|
|
2116
|
+
children: /* @__PURE__ */ n(ha, {
|
|
2117
|
+
className: Zi,
|
|
2118
2118
|
value: e,
|
|
2119
2119
|
onValueChange: (d) => t(d),
|
|
2120
2120
|
onBlur: i,
|
|
2121
|
-
placeholder:
|
|
2121
|
+
placeholder: a,
|
|
2122
2122
|
disabled: o,
|
|
2123
|
-
"aria-invalid":
|
|
2123
|
+
"aria-invalid": r === !0 ? !0 : void 0,
|
|
2124
2124
|
...u
|
|
2125
2125
|
})
|
|
2126
2126
|
});
|
|
2127
|
-
},
|
|
2128
|
-
var
|
|
2129
|
-
const u =
|
|
2127
|
+
}, ji = "cnu9yl0", Yi = "cnu9yl1";
|
|
2128
|
+
var Qi = ({ options: e, value: t, onChange: i, onCommit: a, itemLayout: o = "inline", isDisabled: r, ariaLabel: l, ariaLabelledBy: c, id: s }) => {
|
|
2129
|
+
const u = Q({
|
|
2130
2130
|
id: s,
|
|
2131
2131
|
ariaLabel: l,
|
|
2132
2132
|
ariaLabelledBy: c
|
|
2133
|
-
}), d = o === "stacked", { commitAfterChange: h, gestureHandlers:
|
|
2134
|
-
return /* @__PURE__ */ n(
|
|
2135
|
-
className:
|
|
2133
|
+
}), d = o === "stacked", { commitAfterChange: h, gestureHandlers: g } = Te(a);
|
|
2134
|
+
return /* @__PURE__ */ n(Rn, {
|
|
2135
|
+
className: ji,
|
|
2136
2136
|
value: t,
|
|
2137
2137
|
onValueChange: (p) => {
|
|
2138
2138
|
i(p), h();
|
|
2139
2139
|
},
|
|
2140
|
-
...
|
|
2141
|
-
disabled:
|
|
2140
|
+
...g,
|
|
2141
|
+
disabled: r,
|
|
2142
2142
|
...u,
|
|
2143
|
-
children: e.map((p) => /* @__PURE__ */ m(
|
|
2143
|
+
children: e.map((p) => /* @__PURE__ */ m(En.Root, {
|
|
2144
2144
|
value: p.value,
|
|
2145
2145
|
disabled: p.isDisabled,
|
|
2146
|
-
className:
|
|
2147
|
-
"aria-label":
|
|
2148
|
-
children: [p.icon,
|
|
2146
|
+
className: oe(Yi, d && "cnu9yl2"),
|
|
2147
|
+
"aria-label": Ji(p, d),
|
|
2148
|
+
children: [p.icon, ot(p, d) && /* @__PURE__ */ n("span", {
|
|
2149
2149
|
className: "cnu9yl3",
|
|
2150
2150
|
children: p.label
|
|
2151
2151
|
})]
|
|
2152
2152
|
}, p.value))
|
|
2153
2153
|
});
|
|
2154
|
-
},
|
|
2155
|
-
if (!
|
|
2154
|
+
}, ot = (e, t) => e.icon === void 0 || t, Ji = (e, t) => {
|
|
2155
|
+
if (!ot(e, t))
|
|
2156
2156
|
return e.label;
|
|
2157
|
-
},
|
|
2158
|
-
ToggleGroup:
|
|
2159
|
-
Switch:
|
|
2160
|
-
Slider:
|
|
2161
|
-
RadioGrid:
|
|
2162
|
-
Button:
|
|
2163
|
-
TextField:
|
|
2164
|
-
NumberField:
|
|
2165
|
-
Select:
|
|
2166
|
-
},
|
|
2167
|
-
const i =
|
|
2168
|
-
...
|
|
2157
|
+
}, it = {
|
|
2158
|
+
ToggleGroup: Qi,
|
|
2159
|
+
Switch: qi,
|
|
2160
|
+
Slider: Ki,
|
|
2161
|
+
RadioGrid: Ti,
|
|
2162
|
+
Button: vi,
|
|
2163
|
+
TextField: Xi,
|
|
2164
|
+
NumberField: yi,
|
|
2165
|
+
Select: Ei
|
|
2166
|
+
}, lt = me(it), el = ({ controls: e, children: t }) => {
|
|
2167
|
+
const i = E(() => ({
|
|
2168
|
+
...it,
|
|
2169
2169
|
...e
|
|
2170
2170
|
}), [e]);
|
|
2171
|
-
return /* @__PURE__ */ n(
|
|
2171
|
+
return /* @__PURE__ */ n(lt.Provider, {
|
|
2172
2172
|
value: i,
|
|
2173
2173
|
children: t
|
|
2174
2174
|
});
|
|
2175
|
-
},
|
|
2176
|
-
className:
|
|
2175
|
+
}, k = () => ie(lt), nl = "_12lhx9e0", st = ({ children: e }) => /* @__PURE__ */ n("div", {
|
|
2176
|
+
className: nl,
|
|
2177
2177
|
children: e
|
|
2178
|
-
}),
|
|
2179
|
-
className:
|
|
2178
|
+
}), tl = "_139ohwv0", F = ({ children: e }) => /* @__PURE__ */ n("div", {
|
|
2179
|
+
className: tl,
|
|
2180
2180
|
children: e
|
|
2181
|
-
}),
|
|
2182
|
-
const e =
|
|
2181
|
+
}), ct = me(null), rl = ct.Provider, al = () => {
|
|
2182
|
+
const e = ie(ct);
|
|
2183
2183
|
if (!e) throw new Error("A section must be rendered inside <EditorPanel.Root>.");
|
|
2184
2184
|
return e;
|
|
2185
|
-
},
|
|
2185
|
+
}, ol = "_1jlczkt0", il = "data-graphy-editor-panel", ll = {
|
|
2186
2186
|
List: F,
|
|
2187
|
-
Grid:
|
|
2187
|
+
Grid: st
|
|
2188
2188
|
};
|
|
2189
|
-
function
|
|
2189
|
+
function sl(e) {
|
|
2190
2190
|
if (e === void 0) return !1;
|
|
2191
2191
|
const t = e.split(/\s+/);
|
|
2192
2192
|
return t.includes("_1ii3bsb0") || t.includes("_1ii3bsb1");
|
|
2193
2193
|
}
|
|
2194
|
-
var
|
|
2195
|
-
const
|
|
2194
|
+
var cl = ({ handle: e, children: t, controls: i, defaultExpandedSection: a = void 0, className: o }) => {
|
|
2195
|
+
const r = Vt(e), { themeClass: l, inlineVarsStyle: c } = ze(), [s, u] = Z(() => a ? [a] : []), d = E(() => ({
|
|
2196
2196
|
expandSection: (h) => u([h]),
|
|
2197
2197
|
collapseAllSections: () => u([])
|
|
2198
2198
|
}), []);
|
|
2199
|
-
return /* @__PURE__ */ n(
|
|
2200
|
-
value:
|
|
2201
|
-
children: /* @__PURE__ */ n(
|
|
2199
|
+
return /* @__PURE__ */ n(Ue.Provider, {
|
|
2200
|
+
value: r,
|
|
2201
|
+
children: /* @__PURE__ */ n(el, {
|
|
2202
2202
|
controls: i,
|
|
2203
|
-
children: /* @__PURE__ */ n(
|
|
2203
|
+
children: /* @__PURE__ */ n(rl, {
|
|
2204
2204
|
value: d,
|
|
2205
|
-
children: /* @__PURE__ */ n(
|
|
2206
|
-
[
|
|
2207
|
-
className:
|
|
2205
|
+
children: /* @__PURE__ */ n(ce.Root, {
|
|
2206
|
+
[il]: "",
|
|
2207
|
+
className: oe(ol, o, { [l]: !sl(o) }),
|
|
2208
2208
|
style: c,
|
|
2209
2209
|
value: s,
|
|
2210
2210
|
onValueChange: (h) => u(h),
|
|
@@ -2213,37 +2213,37 @@ var rl = ({ handle: e, children: t, controls: i, defaultExpandedSection: r = voi
|
|
|
2213
2213
|
})
|
|
2214
2214
|
})
|
|
2215
2215
|
});
|
|
2216
|
-
},
|
|
2217
|
-
Root:
|
|
2218
|
-
Controls:
|
|
2219
|
-
},
|
|
2216
|
+
}, dt = {
|
|
2217
|
+
Root: cl,
|
|
2218
|
+
Controls: ll
|
|
2219
|
+
}, hn = {
|
|
2220
2220
|
stack: "pr583x0",
|
|
2221
2221
|
grid: "pr583x1"
|
|
2222
|
-
},
|
|
2223
|
-
const
|
|
2222
|
+
}, un = "pr583x2", dl = "pr583x3", C = ({ label: e, layout: t = "grid", children: i }) => {
|
|
2223
|
+
const a = ae(), o = ae();
|
|
2224
2224
|
return e === void 0 ? /* @__PURE__ */ n("div", {
|
|
2225
|
-
className:
|
|
2225
|
+
className: hn[t],
|
|
2226
2226
|
children: /* @__PURE__ */ n("div", {
|
|
2227
|
-
className:
|
|
2227
|
+
className: un,
|
|
2228
2228
|
children: i
|
|
2229
2229
|
})
|
|
2230
2230
|
}) : /* @__PURE__ */ m("div", {
|
|
2231
|
-
className:
|
|
2231
|
+
className: hn[t],
|
|
2232
2232
|
children: [/* @__PURE__ */ n("label", {
|
|
2233
|
-
id:
|
|
2233
|
+
id: a,
|
|
2234
2234
|
htmlFor: o,
|
|
2235
|
-
className:
|
|
2235
|
+
className: dl,
|
|
2236
2236
|
children: e
|
|
2237
2237
|
}), /* @__PURE__ */ n("div", {
|
|
2238
|
-
className:
|
|
2239
|
-
children: /* @__PURE__ */ n(
|
|
2240
|
-
labelId:
|
|
2238
|
+
className: un,
|
|
2239
|
+
children: /* @__PURE__ */ n(tt, {
|
|
2240
|
+
labelId: a,
|
|
2241
2241
|
controlId: o,
|
|
2242
2242
|
children: i
|
|
2243
2243
|
})
|
|
2244
2244
|
})]
|
|
2245
2245
|
});
|
|
2246
|
-
},
|
|
2246
|
+
}, hl = (e) => /* @__PURE__ */ n(T, {
|
|
2247
2247
|
...e,
|
|
2248
2248
|
children: /* @__PURE__ */ n("g", {
|
|
2249
2249
|
stroke: "currentColor",
|
|
@@ -2252,54 +2252,54 @@ var rl = ({ handle: e, children: t, controls: i, defaultExpandedSection: r = voi
|
|
|
2252
2252
|
strokeLinejoin: "round",
|
|
2253
2253
|
children: /* @__PURE__ */ n("path", { d: "m9 6 6 6-6 6" })
|
|
2254
2254
|
})
|
|
2255
|
-
}),
|
|
2256
|
-
var
|
|
2257
|
-
var
|
|
2255
|
+
}), We = "_40zvwv0", qe = "_40zvwv1", ul = "_40zvwv2", ht = "_40zvwv3", ml = "_40zvwv4 _40zvwv3";
|
|
2256
|
+
var pl = "_40zvwv6";
|
|
2257
|
+
var gl = "_40zvwv8", _ = ({ title: e, layout: t = "fixed", preview: i, accessory: a, onOpenChange: o, children: r }) => t === "collapsible" ? /* @__PURE__ */ n(fl, {
|
|
2258
2258
|
title: e,
|
|
2259
2259
|
preview: i,
|
|
2260
|
-
accessory:
|
|
2260
|
+
accessory: a,
|
|
2261
2261
|
onOpenChange: o,
|
|
2262
|
-
children:
|
|
2263
|
-
}) : t === "inline" && i === void 0 ? /* @__PURE__ */ n(
|
|
2262
|
+
children: r
|
|
2263
|
+
}) : t === "inline" && i === void 0 ? /* @__PURE__ */ n(vl, {
|
|
2264
2264
|
title: e,
|
|
2265
|
-
accessory:
|
|
2266
|
-
children:
|
|
2265
|
+
accessory: a,
|
|
2266
|
+
children: r
|
|
2267
2267
|
}) : /* @__PURE__ */ m("div", {
|
|
2268
|
-
className:
|
|
2268
|
+
className: We,
|
|
2269
2269
|
children: [/* @__PURE__ */ m("div", {
|
|
2270
|
-
className:
|
|
2270
|
+
className: qe,
|
|
2271
2271
|
children: [
|
|
2272
2272
|
/* @__PURE__ */ n("span", {
|
|
2273
|
-
className:
|
|
2273
|
+
className: ht,
|
|
2274
2274
|
children: e
|
|
2275
2275
|
}),
|
|
2276
2276
|
i !== void 0 && /* @__PURE__ */ n("span", {
|
|
2277
2277
|
className: "_40zvwv5",
|
|
2278
2278
|
children: i
|
|
2279
2279
|
}),
|
|
2280
|
-
|
|
2280
|
+
a !== void 0 && /* @__PURE__ */ n("span", {
|
|
2281
2281
|
className: "_40zvwv7",
|
|
2282
|
-
children:
|
|
2282
|
+
children: a
|
|
2283
2283
|
})
|
|
2284
2284
|
]
|
|
2285
|
-
}), /* @__PURE__ */ n("div", { children:
|
|
2286
|
-
}),
|
|
2287
|
-
const
|
|
2285
|
+
}), /* @__PURE__ */ n("div", { children: r })]
|
|
2286
|
+
}), vl = ({ title: e, accessory: t, children: i }) => {
|
|
2287
|
+
const a = ae(), o = ae();
|
|
2288
2288
|
return /* @__PURE__ */ n("div", {
|
|
2289
|
-
className:
|
|
2289
|
+
className: We,
|
|
2290
2290
|
children: /* @__PURE__ */ m("div", {
|
|
2291
|
-
className:
|
|
2291
|
+
className: qe,
|
|
2292
2292
|
children: [
|
|
2293
2293
|
/* @__PURE__ */ n("label", {
|
|
2294
|
-
id:
|
|
2294
|
+
id: a,
|
|
2295
2295
|
htmlFor: o,
|
|
2296
|
-
className:
|
|
2296
|
+
className: ml,
|
|
2297
2297
|
children: e
|
|
2298
2298
|
}),
|
|
2299
2299
|
/* @__PURE__ */ n("span", {
|
|
2300
|
-
className:
|
|
2301
|
-
children: /* @__PURE__ */ n(
|
|
2302
|
-
labelId:
|
|
2300
|
+
className: pl,
|
|
2301
|
+
children: /* @__PURE__ */ n(tt, {
|
|
2302
|
+
labelId: a,
|
|
2303
2303
|
controlId: o,
|
|
2304
2304
|
children: i
|
|
2305
2305
|
})
|
|
@@ -2311,22 +2311,22 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2311
2311
|
]
|
|
2312
2312
|
})
|
|
2313
2313
|
});
|
|
2314
|
-
},
|
|
2315
|
-
const
|
|
2316
|
-
return /* @__PURE__ */ m(
|
|
2314
|
+
}, fl = ({ title: e, preview: t, accessory: i, onOpenChange: a, children: o }) => {
|
|
2315
|
+
const r = A();
|
|
2316
|
+
return /* @__PURE__ */ m(ce.Item, {
|
|
2317
2317
|
value: e,
|
|
2318
|
-
className:
|
|
2319
|
-
onOpenChange:
|
|
2320
|
-
children: [/* @__PURE__ */ m(
|
|
2321
|
-
className:
|
|
2318
|
+
className: We,
|
|
2319
|
+
onOpenChange: a,
|
|
2320
|
+
children: [/* @__PURE__ */ m(ce.Header, {
|
|
2321
|
+
className: qe,
|
|
2322
2322
|
render: /* @__PURE__ */ n("div", {}),
|
|
2323
2323
|
children: [
|
|
2324
|
-
/* @__PURE__ */ n(
|
|
2325
|
-
className:
|
|
2326
|
-
"aria-label":
|
|
2324
|
+
/* @__PURE__ */ n(ce.Trigger, {
|
|
2325
|
+
className: ul,
|
|
2326
|
+
"aria-label": r("editor.accessibility.toggleSection", { title: e })
|
|
2327
2327
|
}),
|
|
2328
2328
|
/* @__PURE__ */ n("span", {
|
|
2329
|
-
className:
|
|
2329
|
+
className: ht,
|
|
2330
2330
|
children: e
|
|
2331
2331
|
}),
|
|
2332
2332
|
t !== void 0 && /* @__PURE__ */ n("span", {
|
|
@@ -2338,290 +2338,290 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2338
2338
|
children: i
|
|
2339
2339
|
}),
|
|
2340
2340
|
/* @__PURE__ */ n("span", {
|
|
2341
|
-
className:
|
|
2342
|
-
children: /* @__PURE__ */ n(
|
|
2341
|
+
className: gl,
|
|
2342
|
+
children: /* @__PURE__ */ n(hl, { size: "sm" })
|
|
2343
2343
|
})
|
|
2344
2344
|
]
|
|
2345
|
-
}), /* @__PURE__ */ n(
|
|
2345
|
+
}), /* @__PURE__ */ n(ce.Panel, { children: /* @__PURE__ */ n("div", { children: o }) })]
|
|
2346
2346
|
});
|
|
2347
|
-
},
|
|
2348
|
-
const { expandSection: l, collapseAllSections: c } =
|
|
2349
|
-
return /* @__PURE__ */ n(
|
|
2347
|
+
}, ic = ({ title: e, isChecked: t, onToggle: i, isDisabled: a, preview: o, children: r }) => {
|
|
2348
|
+
const { expandSection: l, collapseAllSections: c } = al(), { Switch: s } = k();
|
|
2349
|
+
return /* @__PURE__ */ n(_, {
|
|
2350
2350
|
title: e,
|
|
2351
2351
|
layout: "collapsible",
|
|
2352
2352
|
preview: o,
|
|
2353
2353
|
onOpenChange: (h) => {
|
|
2354
|
-
h && !t &&
|
|
2354
|
+
h && !t && a !== !0 && i(!0);
|
|
2355
2355
|
},
|
|
2356
2356
|
accessory: /* @__PURE__ */ n(s, {
|
|
2357
2357
|
isChecked: t,
|
|
2358
2358
|
onChange: (h) => {
|
|
2359
2359
|
i(h), h ? l(e) : c();
|
|
2360
2360
|
},
|
|
2361
|
-
isDisabled:
|
|
2361
|
+
isDisabled: a,
|
|
2362
2362
|
ariaLabel: e
|
|
2363
2363
|
}),
|
|
2364
|
-
children:
|
|
2364
|
+
children: r
|
|
2365
2365
|
});
|
|
2366
|
-
},
|
|
2366
|
+
}, Cl = {
|
|
2367
2367
|
horizontal: ["bottom", "top"],
|
|
2368
2368
|
vertical: ["left", "right"]
|
|
2369
|
-
},
|
|
2369
|
+
}, bl = {
|
|
2370
2370
|
left: "editor.axesPanel.position.left",
|
|
2371
2371
|
right: "editor.axesPanel.position.right",
|
|
2372
2372
|
top: "editor.axesPanel.position.top",
|
|
2373
2373
|
bottom: "editor.axesPanel.position.bottom"
|
|
2374
|
-
},
|
|
2374
|
+
}, yl = {
|
|
2375
2375
|
x: "editor.axesPanel.mainAxisSection.xAxis",
|
|
2376
2376
|
y: "editor.axesPanel.mainAxisSection.yAxis"
|
|
2377
|
-
},
|
|
2378
|
-
const o =
|
|
2379
|
-
if (!
|
|
2380
|
-
const h =
|
|
2377
|
+
}, mn = ({ axis: e, title: t, layout: i = "collapsible", preview: a }) => {
|
|
2378
|
+
const o = N(), r = R(o), l = A(), { NumberField: c, Switch: s, TextField: u, ToggleGroup: d } = k();
|
|
2379
|
+
if (!r) return null;
|
|
2380
|
+
const h = r.coordSystem.type === "polar" ? r.coordSystem.axisMapping[e].geometry : "linear", g = r.config.axes[e], p = r.scales[e], v = p?.spec, S = v?.scaleType === "continuous" ? v : void 0;
|
|
2381
2381
|
if (h === "circular" || h === "radial" && S === void 0) return null;
|
|
2382
|
-
const P =
|
|
2383
|
-
value:
|
|
2384
|
-
label:
|
|
2385
|
-
})),
|
|
2382
|
+
const P = v !== void 0 && "reverse" in v ? v : void 0, y = v?.scaleType === "continuous" || v?.scaleType === "datetime", f = e === "y" && S !== void 0 && r.layers.some((b) => b.yScaleType === "primary" && b.geom === "bar"), x = S?.transform === "log", I = S?.domainMax ?? null, H = Sl(S), B = (b, $) => b.map((pe) => ({
|
|
2383
|
+
value: pe,
|
|
2384
|
+
label: $(pe)
|
|
2385
|
+
})), M = r.guides.axes.find((b) => b.scaleAestheticKey === e)?.position, z = Cl[M === "bottom" || M === "top" || M === void 0 && e === "x" ? "horizontal" : "vertical"], L = r.guides.legends.drawn.some((b) => z.some(($) => $ === b.position)), w = z.map((b) => ({
|
|
2386
2386
|
value: b,
|
|
2387
|
-
label: l(
|
|
2388
|
-
})), O = B(["auto", "edges"], (b) => l(b === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")),
|
|
2387
|
+
label: l(bl[b])
|
|
2388
|
+
})), O = B(["auto", "edges"], (b) => l(b === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), J = B(["linear", "log"], (b) => l(b === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), gt = B([
|
|
2389
2389
|
"auto",
|
|
2390
2390
|
"zero",
|
|
2391
2391
|
"custom"
|
|
2392
|
-
], (b) => l(b === "zero" ? "editor.axesPanel.startFrom.zero" : b === "custom" ? "editor.axesPanel.startFrom.custom" : "editor.axesPanel.startFrom.auto")),
|
|
2393
|
-
o.commands.dispatch(new
|
|
2392
|
+
], (b) => l(b === "zero" ? "editor.axesPanel.startFrom.zero" : b === "custom" ? "editor.axesPanel.startFrom.custom" : "editor.axesPanel.startFrom.auto")), vt = B(["auto", "custom"], (b) => l(b === "custom" ? "editor.axesPanel.endAt.custom" : "editor.axesPanel.endAt.auto")), ft = B(["no", "yes"], (b) => l(b === "yes" ? "editor.axesPanel.yesNo.yes" : "editor.axesPanel.yesNo.no")), Ct = (b) => {
|
|
2393
|
+
o.commands.dispatch(new ir({
|
|
2394
2394
|
axis: e,
|
|
2395
2395
|
isVisible: b
|
|
2396
2396
|
}));
|
|
2397
|
-
},
|
|
2398
|
-
o.commands.dispatch(new
|
|
2397
|
+
}, bt = (b) => {
|
|
2398
|
+
o.commands.dispatch(new tr({
|
|
2399
2399
|
axis: e,
|
|
2400
2400
|
label: b === "" ? null : b
|
|
2401
2401
|
}), { transient: !0 });
|
|
2402
|
-
},
|
|
2403
|
-
o.commands.dispatch(new
|
|
2402
|
+
}, yt = (b) => {
|
|
2403
|
+
o.commands.dispatch(new or({
|
|
2404
2404
|
axis: e,
|
|
2405
2405
|
isVisible: b
|
|
2406
2406
|
}));
|
|
2407
|
-
},
|
|
2408
|
-
o.commands.dispatch(new
|
|
2407
|
+
}, St = (b) => {
|
|
2408
|
+
o.commands.dispatch(new ar({
|
|
2409
2409
|
axis: e,
|
|
2410
2410
|
tickMode: b === "edges" ? "edges" : "auto"
|
|
2411
2411
|
}));
|
|
2412
|
-
},
|
|
2413
|
-
o.commands.dispatch(new
|
|
2412
|
+
}, wt = (b) => {
|
|
2413
|
+
o.commands.dispatch(new kr({
|
|
2414
2414
|
scaledAesthetic: e,
|
|
2415
2415
|
reverse: b === "yes"
|
|
2416
2416
|
}));
|
|
2417
|
-
},
|
|
2418
|
-
o.commands.dispatch(new
|
|
2417
|
+
}, xt = (b) => {
|
|
2418
|
+
o.commands.dispatch(new Mr({
|
|
2419
2419
|
scaledAesthetic: e,
|
|
2420
2420
|
transform: b === "log" ? "log" : "linear"
|
|
2421
2421
|
}));
|
|
2422
|
-
},
|
|
2423
|
-
o.commands.dispatch(new
|
|
2422
|
+
}, Xe = (b) => {
|
|
2423
|
+
o.commands.dispatch(new ge({
|
|
2424
2424
|
scaledAesthetic: e,
|
|
2425
2425
|
...b
|
|
2426
2426
|
}), { transient: !0 });
|
|
2427
|
-
},
|
|
2428
|
-
b !== null &&
|
|
2429
|
-
},
|
|
2430
|
-
b !== null &&
|
|
2431
|
-
},
|
|
2427
|
+
}, Tt = (b) => {
|
|
2428
|
+
b !== null && Xe({ domainMin: b });
|
|
2429
|
+
}, Pt = (b) => {
|
|
2430
|
+
b !== null && Xe({ domainMax: b });
|
|
2431
|
+
}, It = (b) => {
|
|
2432
2432
|
if (S) {
|
|
2433
2433
|
if (b === "custom") {
|
|
2434
|
-
S.zero && o.commands.dispatch(new
|
|
2434
|
+
S.zero && o.commands.dispatch(new en({
|
|
2435
2435
|
scaledAesthetic: e,
|
|
2436
2436
|
zero: !1
|
|
2437
|
-
})), o.commands.dispatch(new
|
|
2437
|
+
})), o.commands.dispatch(new ge({
|
|
2438
2438
|
scaledAesthetic: e,
|
|
2439
|
-
domainMin:
|
|
2439
|
+
domainMin: pn(p?.domain, "start")
|
|
2440
2440
|
}));
|
|
2441
2441
|
return;
|
|
2442
2442
|
}
|
|
2443
|
-
S.domainMin !== null && o.commands.dispatch(new
|
|
2443
|
+
S.domainMin !== null && o.commands.dispatch(new ge({
|
|
2444
2444
|
scaledAesthetic: e,
|
|
2445
2445
|
domainMin: null
|
|
2446
|
-
})), o.commands.dispatch(new
|
|
2446
|
+
})), o.commands.dispatch(new en({
|
|
2447
2447
|
scaledAesthetic: e,
|
|
2448
2448
|
zero: b === "zero"
|
|
2449
2449
|
}));
|
|
2450
2450
|
}
|
|
2451
|
-
},
|
|
2452
|
-
const
|
|
2453
|
-
o.commands.dispatch(new
|
|
2451
|
+
}, At = (b) => {
|
|
2452
|
+
const $ = b === "custom" ? pn(p?.domain, "end") : null;
|
|
2453
|
+
o.commands.dispatch(new ge({
|
|
2454
2454
|
scaledAesthetic: e,
|
|
2455
|
-
domainMax:
|
|
2455
|
+
domainMax: $
|
|
2456
2456
|
}));
|
|
2457
|
-
},
|
|
2458
|
-
const
|
|
2459
|
-
|
|
2457
|
+
}, Lt = (b) => {
|
|
2458
|
+
const $ = z.find((pe) => pe === b);
|
|
2459
|
+
$ && o.commands.dispatch(new rr({
|
|
2460
2460
|
axis: e,
|
|
2461
|
-
position:
|
|
2461
|
+
position: $
|
|
2462
2462
|
}));
|
|
2463
2463
|
};
|
|
2464
|
-
return /* @__PURE__ */ n(
|
|
2465
|
-
title: t ?? l(
|
|
2464
|
+
return /* @__PURE__ */ n(_, {
|
|
2465
|
+
title: t ?? l(yl[e]),
|
|
2466
2466
|
layout: i,
|
|
2467
|
-
preview:
|
|
2467
|
+
preview: a,
|
|
2468
2468
|
children: /* @__PURE__ */ m(F, { children: [
|
|
2469
2469
|
/* @__PURE__ */ n(C, {
|
|
2470
2470
|
label: l("editor.axesPanel.controls.visible"),
|
|
2471
2471
|
children: /* @__PURE__ */ n(s, {
|
|
2472
|
-
isChecked:
|
|
2473
|
-
onChange:
|
|
2472
|
+
isChecked: g.isVisible,
|
|
2473
|
+
onChange: Ct
|
|
2474
2474
|
})
|
|
2475
2475
|
}),
|
|
2476
|
-
h === "linear" && /* @__PURE__ */ m(
|
|
2476
|
+
h === "linear" && /* @__PURE__ */ m(K, { children: [/* @__PURE__ */ n(C, {
|
|
2477
2477
|
label: l("editor.axesPanel.controls.title"),
|
|
2478
2478
|
children: /* @__PURE__ */ n(u, {
|
|
2479
|
-
value:
|
|
2480
|
-
onChange:
|
|
2479
|
+
value: g.label ?? "",
|
|
2480
|
+
onChange: bt,
|
|
2481
2481
|
onCommit: o.commands.seal
|
|
2482
2482
|
})
|
|
2483
2483
|
}), /* @__PURE__ */ n(C, {
|
|
2484
2484
|
label: l("editor.axesPanel.controls.ticks"),
|
|
2485
2485
|
children: /* @__PURE__ */ n(s, {
|
|
2486
|
-
isChecked:
|
|
2487
|
-
onChange:
|
|
2486
|
+
isChecked: g.ticks.isVisible,
|
|
2487
|
+
onChange: yt
|
|
2488
2488
|
})
|
|
2489
2489
|
})] }),
|
|
2490
2490
|
y && /* @__PURE__ */ n(C, {
|
|
2491
2491
|
label: l("editor.axesPanel.controls.labels"),
|
|
2492
2492
|
children: /* @__PURE__ */ n(d, {
|
|
2493
|
-
value:
|
|
2493
|
+
value: g.ticks.mode,
|
|
2494
2494
|
options: O,
|
|
2495
|
-
onChange:
|
|
2495
|
+
onChange: St
|
|
2496
2496
|
})
|
|
2497
2497
|
}),
|
|
2498
2498
|
S && h === "linear" && !L && /* @__PURE__ */ n(C, {
|
|
2499
2499
|
label: l("editor.axesPanel.controls.position"),
|
|
2500
2500
|
children: /* @__PURE__ */ n(d, {
|
|
2501
|
-
value:
|
|
2501
|
+
value: M ?? g.position,
|
|
2502
2502
|
options: w,
|
|
2503
|
-
onChange:
|
|
2503
|
+
onChange: Lt
|
|
2504
2504
|
})
|
|
2505
2505
|
}),
|
|
2506
2506
|
P !== void 0 && /* @__PURE__ */ n(C, {
|
|
2507
2507
|
label: l("editor.axesPanel.controls.reverse"),
|
|
2508
2508
|
children: /* @__PURE__ */ n(d, {
|
|
2509
2509
|
value: P.reverse === !0 ? "yes" : "no",
|
|
2510
|
-
options:
|
|
2511
|
-
onChange:
|
|
2510
|
+
options: ft,
|
|
2511
|
+
onChange: wt
|
|
2512
2512
|
})
|
|
2513
2513
|
}),
|
|
2514
2514
|
S && !f && /* @__PURE__ */ n(C, {
|
|
2515
2515
|
label: l("editor.axesPanel.controls.scale"),
|
|
2516
2516
|
children: /* @__PURE__ */ n(d, {
|
|
2517
2517
|
value: x ? "log" : "linear",
|
|
2518
|
-
options:
|
|
2519
|
-
onChange:
|
|
2518
|
+
options: J,
|
|
2519
|
+
onChange: xt
|
|
2520
2520
|
})
|
|
2521
2521
|
}),
|
|
2522
|
-
S && !x && /* @__PURE__ */ m(
|
|
2523
|
-
!f && /* @__PURE__ */ m(
|
|
2522
|
+
S && !x && /* @__PURE__ */ m(K, { children: [
|
|
2523
|
+
!f && /* @__PURE__ */ m(K, { children: [/* @__PURE__ */ n(C, {
|
|
2524
2524
|
label: l("editor.axesPanel.controls.startFrom"),
|
|
2525
2525
|
children: /* @__PURE__ */ n(d, {
|
|
2526
|
-
value:
|
|
2527
|
-
options:
|
|
2528
|
-
onChange:
|
|
2526
|
+
value: H,
|
|
2527
|
+
options: gt,
|
|
2528
|
+
onChange: It
|
|
2529
2529
|
})
|
|
2530
|
-
}),
|
|
2530
|
+
}), H === "custom" && /* @__PURE__ */ n(C, {
|
|
2531
2531
|
label: l("editor.axesPanel.controls.value"),
|
|
2532
2532
|
children: /* @__PURE__ */ n(c, {
|
|
2533
2533
|
value: S.domainMin ?? null,
|
|
2534
|
-
onChange:
|
|
2534
|
+
onChange: Tt,
|
|
2535
2535
|
onCommit: o.commands.seal
|
|
2536
2536
|
})
|
|
2537
2537
|
})] }),
|
|
2538
2538
|
/* @__PURE__ */ n(C, {
|
|
2539
2539
|
label: l("editor.axesPanel.controls.endAt"),
|
|
2540
2540
|
children: /* @__PURE__ */ n(d, {
|
|
2541
|
-
value:
|
|
2542
|
-
options:
|
|
2543
|
-
onChange:
|
|
2541
|
+
value: I === null ? "auto" : "custom",
|
|
2542
|
+
options: vt,
|
|
2543
|
+
onChange: At
|
|
2544
2544
|
})
|
|
2545
2545
|
}),
|
|
2546
|
-
|
|
2546
|
+
I !== null && /* @__PURE__ */ n(C, {
|
|
2547
2547
|
label: l("editor.axesPanel.controls.value"),
|
|
2548
2548
|
children: /* @__PURE__ */ n(c, {
|
|
2549
|
-
value:
|
|
2550
|
-
onChange:
|
|
2549
|
+
value: I,
|
|
2550
|
+
onChange: Pt,
|
|
2551
2551
|
onCommit: o.commands.seal
|
|
2552
2552
|
})
|
|
2553
2553
|
})
|
|
2554
2554
|
] })
|
|
2555
2555
|
] })
|
|
2556
2556
|
});
|
|
2557
|
-
},
|
|
2557
|
+
}, Sl = (e) => e === void 0 ? "auto" : e.domainMin !== null && e.domainMin !== void 0 ? "custom" : e.zero === !0 ? "zero" : "auto", pn = (e, t) => {
|
|
2558
2558
|
const i = t === "start" ? e?.[0] : e?.[e.length - 1];
|
|
2559
2559
|
return typeof i == "number" ? i : 0;
|
|
2560
|
-
},
|
|
2561
|
-
const i =
|
|
2560
|
+
}, Ze = ({ value: e, onChange: t }) => {
|
|
2561
|
+
const i = N(), a = A(), { TextField: o } = k(), r = e !== null && typeof e != "string", l = (c) => t(c === "" ? null : c);
|
|
2562
2562
|
return /* @__PURE__ */ n(C, {
|
|
2563
|
-
label:
|
|
2563
|
+
label: a("editor.elementsPanel.contentValue"),
|
|
2564
2564
|
children: /* @__PURE__ */ n(o, {
|
|
2565
2565
|
value: typeof e == "string" ? e : "",
|
|
2566
2566
|
onChange: l,
|
|
2567
2567
|
onCommit: i.commands.seal,
|
|
2568
|
-
isDisabled:
|
|
2568
|
+
isDisabled: r
|
|
2569
2569
|
})
|
|
2570
2570
|
});
|
|
2571
|
-
},
|
|
2572
|
-
const
|
|
2571
|
+
}, wl = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2572
|
+
const a = N(), o = R(a), r = A(), { Switch: l } = k();
|
|
2573
2573
|
if (!o) return null;
|
|
2574
2574
|
const c = o.config.content, s = (d) => {
|
|
2575
|
-
|
|
2575
|
+
a.commands.dispatch(new xe({
|
|
2576
2576
|
slot: "caption",
|
|
2577
2577
|
isVisible: d
|
|
2578
2578
|
}));
|
|
2579
2579
|
}, u = (d) => {
|
|
2580
|
-
|
|
2580
|
+
a.commands.dispatch(new dr({ caption: d }), { transient: !0 });
|
|
2581
2581
|
};
|
|
2582
|
-
return /* @__PURE__ */ n(
|
|
2583
|
-
title: e ??
|
|
2582
|
+
return /* @__PURE__ */ n(_, {
|
|
2583
|
+
title: e ?? r("editor.elementsPanel.footerSection.caption"),
|
|
2584
2584
|
layout: t,
|
|
2585
2585
|
preview: i,
|
|
2586
2586
|
children: /* @__PURE__ */ m(F, { children: [/* @__PURE__ */ n(C, {
|
|
2587
|
-
label:
|
|
2587
|
+
label: r("editor.elementsPanel.contentVisible"),
|
|
2588
2588
|
children: /* @__PURE__ */ n(l, {
|
|
2589
2589
|
isChecked: c.isCaptionVisible,
|
|
2590
2590
|
onChange: s
|
|
2591
2591
|
})
|
|
2592
|
-
}), /* @__PURE__ */ n(
|
|
2592
|
+
}), /* @__PURE__ */ n(Ze, {
|
|
2593
2593
|
value: c.caption,
|
|
2594
2594
|
onChange: u
|
|
2595
2595
|
})] })
|
|
2596
2596
|
});
|
|
2597
|
-
},
|
|
2598
|
-
const
|
|
2597
|
+
}, gn = /^[a-z][a-z\d+.-]*:/i, xl = {}, Tl = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2598
|
+
const a = N(), o = R(a), r = A(), { Switch: l } = k();
|
|
2599
2599
|
if (!o) return null;
|
|
2600
2600
|
const c = o.config.content, s = (u) => {
|
|
2601
|
-
|
|
2601
|
+
a.commands.dispatch(new xe({
|
|
2602
2602
|
slot: "source",
|
|
2603
2603
|
isVisible: u
|
|
2604
2604
|
}));
|
|
2605
2605
|
};
|
|
2606
|
-
return /* @__PURE__ */ n(
|
|
2607
|
-
title: e ??
|
|
2606
|
+
return /* @__PURE__ */ n(_, {
|
|
2607
|
+
title: e ?? r("editor.elementsPanel.sourceSection.title"),
|
|
2608
2608
|
layout: t,
|
|
2609
2609
|
preview: i,
|
|
2610
2610
|
children: /* @__PURE__ */ m(F, { children: [/* @__PURE__ */ n(C, {
|
|
2611
|
-
label:
|
|
2611
|
+
label: r("editor.elementsPanel.contentVisible"),
|
|
2612
2612
|
children: /* @__PURE__ */ n(l, {
|
|
2613
2613
|
isChecked: c.isSourceVisible,
|
|
2614
2614
|
onChange: s
|
|
2615
2615
|
})
|
|
2616
|
-
}), /* @__PURE__ */ n(
|
|
2616
|
+
}), /* @__PURE__ */ n(Pl, { source: c.source ?? xl })] })
|
|
2617
2617
|
});
|
|
2618
|
-
},
|
|
2619
|
-
const t =
|
|
2618
|
+
}, Pl = ({ source: e }) => {
|
|
2619
|
+
const t = N(), i = A(), { TextField: a } = k(), o = (s) => {
|
|
2620
2620
|
const u = (s.label ?? "") !== "" || (s.url ?? "") !== "";
|
|
2621
|
-
t.commands.dispatch(new
|
|
2622
|
-
},
|
|
2621
|
+
t.commands.dispatch(new hr({ source: u ? s : null }), { transient: !0 });
|
|
2622
|
+
}, r = () => {
|
|
2623
2623
|
const s = e.url ?? "";
|
|
2624
|
-
s !== "" && !
|
|
2624
|
+
s !== "" && !gn.test(s) && o({
|
|
2625
2625
|
...e,
|
|
2626
2626
|
url: `https://${s}`
|
|
2627
2627
|
}), t.commands.seal();
|
|
@@ -2632,49 +2632,49 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2632
2632
|
...e,
|
|
2633
2633
|
label: s
|
|
2634
2634
|
});
|
|
2635
|
-
return /* @__PURE__ */ m(
|
|
2635
|
+
return /* @__PURE__ */ m(K, { children: [/* @__PURE__ */ n(C, {
|
|
2636
2636
|
label: i("editor.elementsPanel.sourceSection.url"),
|
|
2637
|
-
children: /* @__PURE__ */ n(
|
|
2637
|
+
children: /* @__PURE__ */ n(a, {
|
|
2638
2638
|
value: e.url ?? "",
|
|
2639
2639
|
onChange: l,
|
|
2640
|
-
onCommit:
|
|
2641
|
-
hasError:
|
|
2640
|
+
onCommit: r,
|
|
2641
|
+
hasError: gn.test(e.url ?? "") && !aa(e.url)
|
|
2642
2642
|
})
|
|
2643
2643
|
}), /* @__PURE__ */ n(C, {
|
|
2644
2644
|
label: i("editor.elementsPanel.sourceSection.name"),
|
|
2645
|
-
children: /* @__PURE__ */ n(
|
|
2645
|
+
children: /* @__PURE__ */ n(a, {
|
|
2646
2646
|
value: e.label ?? "",
|
|
2647
2647
|
onChange: c,
|
|
2648
2648
|
onCommit: t.commands.seal
|
|
2649
2649
|
})
|
|
2650
2650
|
})] });
|
|
2651
|
-
},
|
|
2652
|
-
const
|
|
2651
|
+
}, Il = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2652
|
+
const a = N(), o = R(a), r = A(), { Switch: l } = k();
|
|
2653
2653
|
if (!o) return null;
|
|
2654
2654
|
const c = o.config.content, s = (d) => {
|
|
2655
|
-
|
|
2655
|
+
a.commands.dispatch(new xe({
|
|
2656
2656
|
slot: "subtitle",
|
|
2657
2657
|
isVisible: d
|
|
2658
2658
|
}));
|
|
2659
2659
|
}, u = (d) => {
|
|
2660
|
-
|
|
2660
|
+
a.commands.dispatch(new ur({ subtitle: d }), { transient: !0 });
|
|
2661
2661
|
};
|
|
2662
|
-
return /* @__PURE__ */ n(
|
|
2663
|
-
title: e ??
|
|
2662
|
+
return /* @__PURE__ */ n(_, {
|
|
2663
|
+
title: e ?? r("editor.elementsPanel.headerSection.subtitle"),
|
|
2664
2664
|
layout: t,
|
|
2665
2665
|
preview: i,
|
|
2666
2666
|
children: /* @__PURE__ */ m(F, { children: [/* @__PURE__ */ n(C, {
|
|
2667
|
-
label:
|
|
2667
|
+
label: r("editor.elementsPanel.contentVisible"),
|
|
2668
2668
|
children: /* @__PURE__ */ n(l, {
|
|
2669
2669
|
isChecked: c.isSubtitleVisible,
|
|
2670
2670
|
onChange: s
|
|
2671
2671
|
})
|
|
2672
|
-
}), /* @__PURE__ */ n(
|
|
2672
|
+
}), /* @__PURE__ */ n(Ze, {
|
|
2673
2673
|
value: c.subtitle,
|
|
2674
2674
|
onChange: u
|
|
2675
2675
|
})] })
|
|
2676
2676
|
});
|
|
2677
|
-
},
|
|
2677
|
+
}, Ee = [
|
|
2678
2678
|
0.8,
|
|
2679
2679
|
1,
|
|
2680
2680
|
1.2,
|
|
@@ -2685,191 +2685,375 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2685
2685
|
2.5,
|
|
2686
2686
|
3,
|
|
2687
2687
|
4
|
|
2688
|
-
],
|
|
2689
|
-
const
|
|
2688
|
+
], Al = Ee.length / 2, Ll = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2689
|
+
const a = N(), o = R(a), r = A(), { RadioGrid: l } = k();
|
|
2690
2690
|
if (!o) return null;
|
|
2691
|
-
const { textScale: c } = o.config.appearance, s = (h) =>
|
|
2691
|
+
const { textScale: c } = o.config.appearance, s = (h) => r("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${h}` }), u = Ee.map((h) => ({
|
|
2692
2692
|
value: `${h}`,
|
|
2693
2693
|
label: s(h)
|
|
2694
2694
|
})), d = (h) => {
|
|
2695
|
-
const
|
|
2696
|
-
|
|
2695
|
+
const g = Ee.find((p) => `${p}` === h);
|
|
2696
|
+
g !== void 0 && a.commands.dispatch(new nr({ textScale: g }));
|
|
2697
2697
|
};
|
|
2698
|
-
return /* @__PURE__ */ n(
|
|
2699
|
-
title: e ??
|
|
2698
|
+
return /* @__PURE__ */ n(_, {
|
|
2699
|
+
title: e ?? r("editor.elementsPanel.textSizeSection.title"),
|
|
2700
2700
|
layout: t,
|
|
2701
2701
|
preview: i ?? s(c),
|
|
2702
2702
|
children: /* @__PURE__ */ n(l, {
|
|
2703
2703
|
value: `${c}`,
|
|
2704
2704
|
options: u,
|
|
2705
|
-
columns:
|
|
2705
|
+
columns: Al,
|
|
2706
2706
|
onChange: d,
|
|
2707
|
-
ariaLabel:
|
|
2707
|
+
ariaLabel: r("editor.elementsPanel.textSizeSection.title")
|
|
2708
2708
|
})
|
|
2709
2709
|
});
|
|
2710
|
-
},
|
|
2711
|
-
const
|
|
2710
|
+
}, Ol = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2711
|
+
const a = N(), o = R(a), r = A(), { Switch: l } = k();
|
|
2712
2712
|
if (!o) return null;
|
|
2713
2713
|
const c = o.config.content, s = (d) => {
|
|
2714
|
-
|
|
2714
|
+
a.commands.dispatch(new xe({
|
|
2715
2715
|
slot: "title",
|
|
2716
2716
|
isVisible: d
|
|
2717
2717
|
}));
|
|
2718
2718
|
}, u = (d) => {
|
|
2719
|
-
|
|
2719
|
+
a.commands.dispatch(new mr({ title: d }), { transient: !0 });
|
|
2720
2720
|
};
|
|
2721
|
-
return /* @__PURE__ */ n(
|
|
2722
|
-
title: e ??
|
|
2721
|
+
return /* @__PURE__ */ n(_, {
|
|
2722
|
+
title: e ?? r("editor.elementsPanel.headerSection.toggleTitle"),
|
|
2723
2723
|
layout: t,
|
|
2724
2724
|
preview: i,
|
|
2725
2725
|
children: /* @__PURE__ */ m(F, { children: [/* @__PURE__ */ n(C, {
|
|
2726
|
-
label:
|
|
2726
|
+
label: r("editor.elementsPanel.contentVisible"),
|
|
2727
2727
|
children: /* @__PURE__ */ n(l, {
|
|
2728
2728
|
isChecked: c.isTitleVisible,
|
|
2729
2729
|
onChange: s
|
|
2730
2730
|
})
|
|
2731
|
-
}), /* @__PURE__ */ n(
|
|
2731
|
+
}), /* @__PURE__ */ n(Ze, {
|
|
2732
2732
|
value: c.title,
|
|
2733
2733
|
onChange: u
|
|
2734
2734
|
})] })
|
|
2735
2735
|
});
|
|
2736
|
-
},
|
|
2736
|
+
}, lc = ({ children: e, ...t }) => /* @__PURE__ */ n(dt.Root, {
|
|
2737
2737
|
...t,
|
|
2738
|
-
children: e ?? /* @__PURE__ */ m(
|
|
2739
|
-
/* @__PURE__ */ n(
|
|
2740
|
-
/* @__PURE__ */ n(
|
|
2741
|
-
/* @__PURE__ */ n(
|
|
2742
|
-
/* @__PURE__ */ n(
|
|
2743
|
-
/* @__PURE__ */ n(
|
|
2738
|
+
children: e ?? /* @__PURE__ */ m(K, { children: [
|
|
2739
|
+
/* @__PURE__ */ n(Ol, {}),
|
|
2740
|
+
/* @__PURE__ */ n(Il, {}),
|
|
2741
|
+
/* @__PURE__ */ n(wl, {}),
|
|
2742
|
+
/* @__PURE__ */ n(Tl, {}),
|
|
2743
|
+
/* @__PURE__ */ n(Ll, {})
|
|
2744
2744
|
] })
|
|
2745
|
-
}),
|
|
2745
|
+
}), sc = ({ children: e, ...t }) => /* @__PURE__ */ n(dt.Root, {
|
|
2746
2746
|
...t,
|
|
2747
|
-
children: e ?? /* @__PURE__ */ m(
|
|
2748
|
-
}),
|
|
2749
|
-
const
|
|
2747
|
+
children: e ?? /* @__PURE__ */ m(K, { children: [/* @__PURE__ */ n(mn, { axis: "x" }), /* @__PURE__ */ n(mn, { axis: "y" })] })
|
|
2748
|
+
}), Pe = (e) => `${e}px`, ut = (e) => `${Math.round(e * 100)}%`, Nl = (e) => `${e}°`, kl = 24, vn = ["dim", "desaturate"], cc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2749
|
+
const a = N(), o = R(a), r = A(), { Slider: l, ToggleGroup: c } = k();
|
|
2750
2750
|
if (!o) return null;
|
|
2751
|
-
const { cornerRadius: s } = o.config.appearance, u =
|
|
2751
|
+
const { cornerRadius: s } = o.config.appearance, u = la(o.spec), d = vn.map((p) => ({
|
|
2752
2752
|
value: p,
|
|
2753
|
-
label:
|
|
2753
|
+
label: r(p === "dim" ? "editor.highlighting.highlightStyle.tint" : "editor.highlighting.highlightStyle.grey")
|
|
2754
2754
|
})), h = (p) => {
|
|
2755
|
-
|
|
2756
|
-
},
|
|
2757
|
-
const
|
|
2758
|
-
|
|
2755
|
+
a.commands.dispatch(new er({ cornerRadius: p }), { transient: !0 });
|
|
2756
|
+
}, g = (p) => {
|
|
2757
|
+
const v = vn.find((S) => S === p);
|
|
2758
|
+
v && a.commands.dispatch(new Sr({ dimStyle: v }));
|
|
2759
2759
|
};
|
|
2760
|
-
return /* @__PURE__ */ n(
|
|
2761
|
-
title: e ??
|
|
2760
|
+
return /* @__PURE__ */ n(_, {
|
|
2761
|
+
title: e ?? r("editor.colorPanel.appearanceSection.title"),
|
|
2762
2762
|
layout: t,
|
|
2763
2763
|
preview: i,
|
|
2764
2764
|
children: /* @__PURE__ */ m(F, { children: [/* @__PURE__ */ n(C, {
|
|
2765
|
-
label:
|
|
2765
|
+
label: r("editor.colorPanel.borderSection.cornerRadius"),
|
|
2766
2766
|
children: /* @__PURE__ */ n(l, {
|
|
2767
2767
|
value: s,
|
|
2768
2768
|
min: 0,
|
|
2769
|
-
max:
|
|
2769
|
+
max: kl,
|
|
2770
2770
|
step: 1,
|
|
2771
|
-
formatValue:
|
|
2771
|
+
formatValue: Pe,
|
|
2772
2772
|
onChange: h,
|
|
2773
|
-
onCommit:
|
|
2773
|
+
onCommit: a.commands.seal
|
|
2774
2774
|
})
|
|
2775
2775
|
}), /* @__PURE__ */ n(C, {
|
|
2776
|
-
label:
|
|
2776
|
+
label: r("editor.colorPanel.appearanceSection.highlightStyle"),
|
|
2777
2777
|
children: /* @__PURE__ */ n(c, {
|
|
2778
2778
|
value: u,
|
|
2779
2779
|
options: d,
|
|
2780
|
-
onChange:
|
|
2780
|
+
onChange: g
|
|
2781
2781
|
})
|
|
2782
2782
|
})] })
|
|
2783
2783
|
});
|
|
2784
|
-
},
|
|
2785
|
-
const { colorScheme: i } =
|
|
2786
|
-
return
|
|
2787
|
-
const
|
|
2788
|
-
return
|
|
2784
|
+
}, $e = (e, t) => {
|
|
2785
|
+
const { colorScheme: i } = ze();
|
|
2786
|
+
return E(() => {
|
|
2787
|
+
const a = e?.layers.find((o) => o.id === t);
|
|
2788
|
+
return a === void 0 ? null : Zr({ colorScheme: i }).geomReaders(a);
|
|
2789
2789
|
}, [
|
|
2790
2790
|
e,
|
|
2791
2791
|
t,
|
|
2792
2792
|
i
|
|
2793
2793
|
]);
|
|
2794
|
-
},
|
|
2795
|
-
const
|
|
2794
|
+
}, Ml = 0.05, dc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2795
|
+
const a = N(), o = R(a), r = A(), { Slider: l, ToggleGroup: c } = k(), s = o ? On(o.spec.layers, "bar") : void 0, u = $e(o, s?.id ?? null);
|
|
2796
2796
|
if (!o || !s || o.coordSystem.type === "polar" && o.coordSystem.bandAxis === null) return null;
|
|
2797
2797
|
const d = (p) => {
|
|
2798
|
-
|
|
2798
|
+
a.commands.dispatch(new sr({
|
|
2799
2799
|
layerId: s.id,
|
|
2800
2800
|
width: p
|
|
2801
2801
|
}), { transient: !0 });
|
|
2802
2802
|
}, h = (p) => {
|
|
2803
|
-
const
|
|
2804
|
-
|
|
2803
|
+
const v = je.find((S) => S === p);
|
|
2804
|
+
v && a.commands.dispatch(new lr({
|
|
2805
2805
|
layerId: s.id,
|
|
2806
|
-
borderRadius:
|
|
2806
|
+
borderRadius: v
|
|
2807
2807
|
}));
|
|
2808
|
-
},
|
|
2808
|
+
}, g = je.map((p) => ({
|
|
2809
2809
|
value: p,
|
|
2810
|
-
label:
|
|
2810
|
+
label: r(`editor.graphPanel.barSection.roundingOptions.${p}`)
|
|
2811
2811
|
}));
|
|
2812
|
-
return /* @__PURE__ */ n(
|
|
2813
|
-
title: e ??
|
|
2812
|
+
return /* @__PURE__ */ n(_, {
|
|
2813
|
+
title: e ?? r("editor.graphPanel.barSection.title"),
|
|
2814
2814
|
layout: t,
|
|
2815
2815
|
preview: i,
|
|
2816
2816
|
children: /* @__PURE__ */ m(F, { children: [/* @__PURE__ */ n(C, {
|
|
2817
|
-
label:
|
|
2817
|
+
label: r("editor.graphPanel.barSection.thickness"),
|
|
2818
2818
|
children: /* @__PURE__ */ n(l, {
|
|
2819
2819
|
value: s.params.width,
|
|
2820
|
-
min:
|
|
2821
|
-
max:
|
|
2822
|
-
step:
|
|
2823
|
-
formatValue:
|
|
2820
|
+
min: Yt,
|
|
2821
|
+
max: jt,
|
|
2822
|
+
step: Ml,
|
|
2823
|
+
formatValue: ut,
|
|
2824
2824
|
onChange: d,
|
|
2825
|
-
onCommit:
|
|
2825
|
+
onCommit: a.commands.seal
|
|
2826
2826
|
})
|
|
2827
2827
|
}), /* @__PURE__ */ n(C, {
|
|
2828
|
-
label:
|
|
2828
|
+
label: r("editor.graphPanel.barSection.rounding"),
|
|
2829
2829
|
layout: "stack",
|
|
2830
2830
|
children: /* @__PURE__ */ n(c, {
|
|
2831
|
-
value: u?.get("borderRadius") ??
|
|
2832
|
-
options:
|
|
2831
|
+
value: u?.get("borderRadius") ?? Zt,
|
|
2832
|
+
options: g,
|
|
2833
2833
|
onChange: h
|
|
2834
2834
|
})
|
|
2835
2835
|
})] })
|
|
2836
2836
|
});
|
|
2837
|
-
},
|
|
2838
|
-
const
|
|
2839
|
-
|
|
2840
|
-
|
|
2837
|
+
}, Ie = ({ children: e }) => {
|
|
2838
|
+
const t = ae();
|
|
2839
|
+
return /* @__PURE__ */ m(K, { children: [/* @__PURE__ */ n("g", {
|
|
2840
|
+
filter: `url(#${t})`,
|
|
2841
|
+
children: e
|
|
2842
|
+
}), /* @__PURE__ */ n("defs", { children: /* @__PURE__ */ m("filter", {
|
|
2843
|
+
id: t,
|
|
2844
|
+
x: "-20%",
|
|
2845
|
+
y: "-20%",
|
|
2846
|
+
width: "140%",
|
|
2847
|
+
height: "140%",
|
|
2848
|
+
children: [/* @__PURE__ */ n("feDropShadow", {
|
|
2849
|
+
dx: "0",
|
|
2850
|
+
dy: "0",
|
|
2851
|
+
stdDeviation: "0.586",
|
|
2852
|
+
floodColor: "#0F0F18",
|
|
2853
|
+
floodOpacity: "0.12"
|
|
2854
|
+
}), /* @__PURE__ */ n("feDropShadow", {
|
|
2855
|
+
dx: "0",
|
|
2856
|
+
dy: "1.172",
|
|
2857
|
+
stdDeviation: "0.586",
|
|
2858
|
+
floodColor: "#0E0E34",
|
|
2859
|
+
floodOpacity: "0.16"
|
|
2860
|
+
})]
|
|
2861
|
+
}) })] });
|
|
2862
|
+
}, Ae = "qdaoth0", El = (e) => /* @__PURE__ */ m(T, {
|
|
2863
|
+
viewBox: "0 0 31 33",
|
|
2864
|
+
...e,
|
|
2865
|
+
children: [/* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("path", {
|
|
2866
|
+
className: Ae,
|
|
2867
|
+
fillRule: "evenodd",
|
|
2868
|
+
clipRule: "evenodd",
|
|
2869
|
+
d: "M25.7417 6.23664C25.7417 6.09417 25.7076 5.95967 25.6471 5.84086C25.5633 5.67624 25.4288 5.54173 25.2641 5.4579C25.1453 5.39739 25.0108 5.36328 24.8684 5.36328H12.0591C11.5767 5.36328 11.1857 5.7543 11.1857 6.23664C11.1857 6.71899 11.5767 7.11 12.0591 7.11H22.7599L5.61908 24.2508C5.27801 24.5919 5.27801 25.1448 5.61908 25.4859C5.96015 25.827 6.51313 25.827 6.8542 25.4859L23.995 8.34513V19.0459C23.995 19.5283 24.386 19.9193 24.8684 19.9193C25.3507 19.9193 25.7417 19.5283 25.7417 19.0459V6.23664ZM20.995 15.5878V19.0459C20.995 21.1851 22.7292 22.9193 24.8684 22.9193C27.0076 22.9193 28.7417 21.1851 28.7417 19.0459V6.23664C28.7417 4.09744 27.0076 2.36328 24.8684 2.36328H12.0591C9.91985 2.36328 8.18569 4.09744 8.18569 6.23664C8.18569 8.37584 9.91985 10.11 12.0591 10.11H15.5172L3.49777 22.1295C1.98512 23.6421 1.98513 26.0946 3.49776 27.6072C5.0104 29.1199 7.46288 29.1199 8.97552 27.6072L20.995 15.5878Z"
|
|
2870
|
+
}) }), /* @__PURE__ */ n("path", {
|
|
2871
|
+
fill: "currentColor",
|
|
2872
|
+
d: "M12.0591 7.11C11.5767 7.11 11.1857 6.71899 11.1857 6.23664C11.1857 5.7543 11.5767 5.36328 12.0591 5.36328H24.8684C25.3507 5.36328 25.7417 5.7543 25.7417 6.23664V19.0459C25.7417 19.5283 25.3507 19.9193 24.8684 19.9193C24.386 19.9193 23.995 19.5283 23.995 19.0459V8.34512L6.8542 25.4859C6.51313 25.827 5.96015 25.827 5.61908 25.4859C5.27801 25.1448 5.27801 24.5919 5.61908 24.2508L22.7599 7.11H12.0591Z"
|
|
2873
|
+
})]
|
|
2874
|
+
}), Rl = (e) => /* @__PURE__ */ n(T, {
|
|
2875
|
+
viewBox: "0 0 32 32",
|
|
2876
|
+
...e,
|
|
2877
|
+
children: /* @__PURE__ */ m(Ie, { children: [/* @__PURE__ */ n("path", {
|
|
2878
|
+
className: Ae,
|
|
2879
|
+
d: "M11 21H21V11H11V21ZM29 23C29 26.3137 26.3137 29 23 29H9C5.68629 29 3 26.3137 3 23V9C3 5.68629 5.68629 3 9 3H23C26.3137 3 29 5.68629 29 9V23Z"
|
|
2880
|
+
}), /* @__PURE__ */ n("path", {
|
|
2881
|
+
fill: "currentColor",
|
|
2882
|
+
d: "M24.25 9C24.25 8.30964 23.6904 7.75 23 7.75H9C8.30964 7.75 7.75 8.30964 7.75 9V23C7.75 23.6904 8.30964 24.25 9 24.25H23C23.6904 24.25 24.25 23.6904 24.25 23V9ZM25.75 23C25.75 24.5188 24.5188 25.75 23 25.75H9C7.48122 25.75 6.25 24.5188 6.25 23V9C6.25 7.48122 7.48122 6.25 9 6.25H23C24.5188 6.25 25.75 7.48122 25.75 9V23Z"
|
|
2883
|
+
})] })
|
|
2884
|
+
}), _l = (e) => /* @__PURE__ */ m(T, {
|
|
2885
|
+
viewBox: "0 0 32 33",
|
|
2886
|
+
...e,
|
|
2887
|
+
children: [/* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("path", {
|
|
2888
|
+
className: Ae,
|
|
2889
|
+
fillRule: "evenodd",
|
|
2890
|
+
clipRule: "evenodd",
|
|
2891
|
+
d: "M4.89961 14.7968C3.08522 13.5116 1.89961 11.3966 1.89961 9.00039C1.89961 5.07917 5.07839 1.90039 8.99961 1.90039C10.7798 1.90039 12.4069 2.55553 13.6531 3.63785C14.3179 3.17306 15.1269 2.90039 15.9996 2.90039L22.9996 2.90039C25.264 2.90039 27.0996 4.73602 27.0996 7.00039L27.0996 9.7243C27.5717 9.92414 28.014 10.2165 28.3987 10.6013C29.9999 12.2024 29.9999 14.7984 28.3987 16.3995L27.9182 16.8801C29.2628 18.172 30.0996 19.9885 30.0996 22.0004C30.0996 25.9216 26.9208 29.1004 22.9996 29.1004C21.2195 29.1004 19.5923 28.4453 18.3461 27.3629C17.6813 27.8277 16.8723 28.1004 15.9996 28.1004L8.99961 28.1004C6.73524 28.1004 4.89961 26.2648 4.89961 24.0004L4.89961 14.7968Z"
|
|
2892
|
+
}) }), /* @__PURE__ */ n("path", {
|
|
2893
|
+
fill: "currentColor",
|
|
2894
|
+
fillRule: "evenodd",
|
|
2895
|
+
clipRule: "evenodd",
|
|
2896
|
+
d: "M25.25 22C25.25 20.7574 24.2426 19.75 23 19.75C21.7574 19.75 20.75 20.7574 20.75 22C20.75 23.2426 21.7574 24.25 23 24.25C24.2426 24.25 25.25 23.2426 25.25 22ZM23 18.25C25.0711 18.25 26.75 19.9289 26.75 22C26.75 24.0711 25.0711 25.75 23 25.75C20.9289 25.75 19.25 24.0711 19.25 22C19.25 19.9289 20.9289 18.25 23 18.25ZM11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25C10.2426 11.25 11.25 10.2426 11.25 9ZM9.75 12.675C11.4617 12.3275 12.75 10.8142 12.75 9C12.75 6.92893 11.0711 5.25 9 5.25C6.92893 5.25 5.25 6.92893 5.25 9C5.25 10.8142 6.53832 12.3275 8.25 12.675L8.25 24C8.25 24.4142 8.58579 24.75 9 24.75L16 24.75C16.4142 24.75 16.75 24.4142 16.75 24L16.75 7.75L22.25 7.75L22.25 14.1893L21.0303 12.9697C20.7374 12.6768 20.2626 12.6768 19.9697 12.9697C19.6768 13.2626 19.6768 13.7374 19.9697 14.0303L22.4697 16.5303C22.7626 16.8232 23.2374 16.8232 23.5303 16.5303L26.0303 14.0303C26.3232 13.7374 26.3232 13.2626 26.0303 12.9697C25.7374 12.6768 25.2626 12.6768 24.9697 12.9697L23.75 14.1893L23.75 7C23.75 6.58579 23.4142 6.25 23 6.25L16 6.25C15.5858 6.25 15.25 6.58579 15.25 7L15.25 23.25L9.75 23.25L9.75 12.675Z"
|
|
2897
|
+
})]
|
|
2898
|
+
}), Dl = (e) => /* @__PURE__ */ m(T, {
|
|
2899
|
+
viewBox: "0 0 32 33",
|
|
2900
|
+
...e,
|
|
2901
|
+
children: [/* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("path", {
|
|
2902
|
+
className: Ae,
|
|
2903
|
+
d: "M20.7271 2C21.4372 2 21.7114 2.00463 22.0841 2.03504C22.8228 2.0954 23.4839 2.25122 24.1592 2.59527C25.1865 3.1188 26.0219 3.9541 26.5458 4.98208C26.8896 5.65706 27.0454 6.31812 27.1057 7.05672C27.1301 7.35469 27.1379 7.58979 27.14 8.03558L27.1408 9.10155C27.1408 11.2114 25.4304 12.922 23.3205 12.922C21.4083 12.922 19.8243 11.5172 19.5441 9.68336L19.538 9.64H18.39V21.687L20.0392 21.6877C22.149 21.6877 23.8595 23.398 23.8595 25.508C23.8595 27.6178 22.149 29.3283 20.0392 29.3283H9.10159C6.99169 29.3283 5.28127 27.6178 5.28127 25.508C5.28127 23.398 6.99172 21.6877 9.10159 21.6877L10.75 21.687V9.64H9.601L9.59661 9.68334C9.32609 11.4539 7.84018 12.8246 6.01692 12.917L5.82032 12.922C3.71035 12.922 2 11.2114 2 9.10155V8.41371C2 7.70349 2.00463 7.42929 2.03504 7.05674C2.09538 6.31803 2.25122 5.65681 2.59521 4.98173C3.11877 3.95419 3.95418 3.11876 4.98174 2.5952C5.65683 2.25122 6.31798 2.09539 7.057 2.03501C7.42935 2.00463 7.70354 2 8.41371 2H20.7271Z"
|
|
2904
|
+
}) }), /* @__PURE__ */ n("path", {
|
|
2905
|
+
fill: "currentColor",
|
|
2906
|
+
d: "M8.41371 5H20.7271C21.1595 5 21.5325 5 21.8398 5.02507C22.1641 5.05157 22.4867 5.11007 22.7971 5.26822C23.2601 5.50416 23.6366 5.88064 23.8726 6.3437C24.0307 6.65409 24.0892 6.97666 24.1157 7.30097C24.1408 7.60823 24.1408 7.98127 24.1408 8.41369V9.10155C24.1408 9.55465 23.7735 9.92195 23.3205 9.92195C22.8674 9.92195 22.5001 9.55465 22.5001 9.10155V8.44533C22.5001 7.97237 22.4995 7.66699 22.4805 7.43457C22.4623 7.21172 22.4314 7.12909 22.4107 7.08853C22.3321 6.93418 22.2066 6.80869 22.0522 6.73004C22.0117 6.70938 21.9291 6.67847 21.7062 6.66026C21.4738 6.64127 21.1684 6.64063 20.6954 6.64063H15.3907V24.6877H20.0392C20.4922 24.6877 20.8595 25.0549 20.8595 25.508C20.8595 25.961 20.4922 26.3283 20.0392 26.3283H9.10159C8.64854 26.3283 8.28127 25.961 8.28127 25.508C8.28127 25.0549 8.64854 24.6877 9.10159 24.6877H13.7501V6.64063H8.44533C7.97238 6.64063 7.66699 6.64127 7.43457 6.66026C7.21172 6.67847 7.1291 6.70938 7.08854 6.73004C6.93418 6.80869 6.80869 6.93418 6.73004 7.08853C6.70938 7.12909 6.67847 7.21172 6.66026 7.43457C6.64127 7.66699 6.64063 7.97237 6.64063 8.44533V9.10155C6.64063 9.55465 6.27337 9.92195 5.82032 9.92195C5.36727 9.92195 5 9.55465 5 9.10155V8.41371C5 7.98128 5 7.60823 5.02508 7.30097C5.05157 6.97666 5.11007 6.65409 5.26823 6.3437C5.50417 5.88064 5.88064 5.50416 6.3437 5.26822C6.65409 5.11007 6.97666 5.05157 7.30097 5.02507C7.60824 5 7.98129 5 8.41371 5Z"
|
|
2907
|
+
})]
|
|
2908
|
+
}), Hl = {
|
|
2909
|
+
x: 0.5,
|
|
2910
|
+
y: 0.5
|
|
2911
|
+
}, zl = 0.2, Vl = {
|
|
2912
|
+
x: 0.375,
|
|
2913
|
+
y: 0.25,
|
|
2914
|
+
width: 0.25,
|
|
2915
|
+
height: 0.5
|
|
2916
|
+
}, Fl = {
|
|
2917
|
+
fillColor: null,
|
|
2918
|
+
fillOpacity: 0.25,
|
|
2919
|
+
strokeWidth: 0,
|
|
2920
|
+
zOrder: "background"
|
|
2921
|
+
}, Bl = {
|
|
2922
|
+
x: 0.4,
|
|
2923
|
+
y: 0.6
|
|
2924
|
+
}, Kl = {
|
|
2925
|
+
x: 0.6,
|
|
2926
|
+
y: 0.4
|
|
2927
|
+
}, Gl = "relative-difference", hc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
2928
|
+
const a = N(), o = R(a), r = A(), { Button: l } = k();
|
|
2929
|
+
if (!o) return null;
|
|
2930
|
+
const c = () => {
|
|
2931
|
+
a.commands.dispatch(new j({
|
|
2932
|
+
kind: "text",
|
|
2933
|
+
annotation: {
|
|
2934
|
+
...Er,
|
|
2935
|
+
content: Ul(r("editor.annotatePanel.callOutSection.text")),
|
|
2936
|
+
at: {
|
|
2937
|
+
anchorType: "panel",
|
|
2938
|
+
...Hl
|
|
2939
|
+
},
|
|
2940
|
+
width: zl
|
|
2941
|
+
}
|
|
2942
|
+
}));
|
|
2943
|
+
}, s = () => {
|
|
2944
|
+
a.commands.dispatch(new j({
|
|
2945
|
+
kind: "arrow",
|
|
2946
|
+
annotation: {
|
|
2947
|
+
...Ut,
|
|
2948
|
+
start: {
|
|
2949
|
+
anchorType: "panel",
|
|
2950
|
+
...Bl
|
|
2951
|
+
},
|
|
2952
|
+
end: {
|
|
2953
|
+
anchorType: "panel",
|
|
2954
|
+
...Kl
|
|
2955
|
+
}
|
|
2956
|
+
}
|
|
2957
|
+
}));
|
|
2958
|
+
}, u = () => {
|
|
2959
|
+
a.commands.dispatch(new j({
|
|
2960
|
+
kind: "shape",
|
|
2961
|
+
annotation: {
|
|
2962
|
+
...Jt,
|
|
2963
|
+
...Fl,
|
|
2964
|
+
region: {
|
|
2965
|
+
anchorType: "panel",
|
|
2966
|
+
...Vl
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
}));
|
|
2970
|
+
}, d = () => {
|
|
2971
|
+
const g = na(o);
|
|
2972
|
+
g !== null && a.commands.dispatch(new j({
|
|
2973
|
+
kind: "differenceArrow",
|
|
2974
|
+
annotation: {
|
|
2975
|
+
...Pn,
|
|
2976
|
+
...g,
|
|
2977
|
+
label: Gl
|
|
2978
|
+
}
|
|
2979
|
+
}));
|
|
2980
|
+
}, h = o.coordSystem.type === "cartesian";
|
|
2981
|
+
return /* @__PURE__ */ n(_, {
|
|
2982
|
+
title: e ?? r("editor.annotatePanel.callOutSection.title"),
|
|
2983
|
+
layout: t,
|
|
2984
|
+
preview: i,
|
|
2985
|
+
children: /* @__PURE__ */ m(st, { children: [
|
|
2986
|
+
/* @__PURE__ */ n(l, {
|
|
2987
|
+
variant: "tile",
|
|
2988
|
+
icon: /* @__PURE__ */ n(Dl, { size: "xl" }),
|
|
2989
|
+
label: r("editor.annotatePanel.callOutSection.text"),
|
|
2990
|
+
onClick: c
|
|
2991
|
+
}),
|
|
2992
|
+
/* @__PURE__ */ n(l, {
|
|
2993
|
+
variant: "tile",
|
|
2994
|
+
icon: /* @__PURE__ */ n(El, { size: "xl" }),
|
|
2995
|
+
label: r("editor.annotatePanel.callOutSection.arrow"),
|
|
2996
|
+
onClick: s
|
|
2997
|
+
}),
|
|
2998
|
+
/* @__PURE__ */ n(l, {
|
|
2999
|
+
variant: "tile",
|
|
3000
|
+
icon: /* @__PURE__ */ n(Rl, { size: "xl" }),
|
|
3001
|
+
label: r("editor.annotatePanel.callOutSection.box"),
|
|
3002
|
+
onClick: u
|
|
3003
|
+
}),
|
|
3004
|
+
h && /* @__PURE__ */ n(l, {
|
|
3005
|
+
variant: "tile",
|
|
3006
|
+
icon: /* @__PURE__ */ n(_l, { size: "xl" }),
|
|
3007
|
+
label: r("editor.annotatePanel.callOutSection.difference"),
|
|
3008
|
+
onClick: d
|
|
3009
|
+
})
|
|
3010
|
+
] })
|
|
3011
|
+
});
|
|
3012
|
+
}, Ul = (e) => ({
|
|
3013
|
+
type: "doc",
|
|
3014
|
+
content: [{
|
|
3015
|
+
type: "paragraph",
|
|
3016
|
+
content: [{
|
|
3017
|
+
type: "text",
|
|
3018
|
+
text: e
|
|
3019
|
+
}]
|
|
3020
|
+
}]
|
|
3021
|
+
}), uc = ({ layerId: e, title: t, layout: i = "collapsible", preview: a }) => {
|
|
3022
|
+
const o = N(), r = R(o), l = A(), { Switch: c } = k();
|
|
3023
|
+
if (!r) return null;
|
|
3024
|
+
const s = e === void 0 ? r.spec.layers[0] : r.spec.layers.find((M) => M.id === e);
|
|
2841
3025
|
if (!s) return null;
|
|
2842
|
-
const { showDataLabels: u, format: d, showStackTotals: h, showCategoryLabels:
|
|
2843
|
-
if (!
|
|
2844
|
-
const x = (
|
|
2845
|
-
const
|
|
3026
|
+
const { showDataLabels: u, format: d, showStackTotals: h, showCategoryLabels: g } = s.dataLabels, p = r.coordSystem.type === "polar", v = s.geom === "bar", S = s.position === "stack" || s.position === "fill", P = v && !p && s.position === "stack", y = v && (!p || u), f = v || s.geom === "area" && S;
|
|
3027
|
+
if (!Wr(s.geom, r.coordSystem.type)) return null;
|
|
3028
|
+
const x = (M) => {
|
|
3029
|
+
const z = new _r({
|
|
2846
3030
|
layerId: s.id,
|
|
2847
|
-
showDataLabels:
|
|
3031
|
+
showDataLabels: M
|
|
2848
3032
|
});
|
|
2849
|
-
o.commands.dispatch(
|
|
2850
|
-
},
|
|
2851
|
-
const
|
|
3033
|
+
o.commands.dispatch(z);
|
|
3034
|
+
}, I = (M) => {
|
|
3035
|
+
const z = new pr({
|
|
2852
3036
|
layerId: s.id,
|
|
2853
|
-
format:
|
|
3037
|
+
format: M ? "percentage" : "absolute"
|
|
2854
3038
|
});
|
|
2855
|
-
o.commands.dispatch(
|
|
2856
|
-
},
|
|
2857
|
-
const
|
|
3039
|
+
o.commands.dispatch(z);
|
|
3040
|
+
}, H = (M) => {
|
|
3041
|
+
const z = new zr({
|
|
2858
3042
|
layerId: s.id,
|
|
2859
|
-
showStackTotals:
|
|
3043
|
+
showStackTotals: M
|
|
2860
3044
|
});
|
|
2861
|
-
o.commands.dispatch(
|
|
2862
|
-
}, B = (
|
|
2863
|
-
const
|
|
3045
|
+
o.commands.dispatch(z);
|
|
3046
|
+
}, B = (M) => {
|
|
3047
|
+
const z = new Rr({
|
|
2864
3048
|
layerId: s.id,
|
|
2865
|
-
showCategoryLabels:
|
|
3049
|
+
showCategoryLabels: M
|
|
2866
3050
|
});
|
|
2867
|
-
o.commands.dispatch(
|
|
3051
|
+
o.commands.dispatch(z);
|
|
2868
3052
|
};
|
|
2869
|
-
return /* @__PURE__ */ n(
|
|
3053
|
+
return /* @__PURE__ */ n(_, {
|
|
2870
3054
|
title: t ?? l("editor.graphPanel.graphOptionsSection.title"),
|
|
2871
3055
|
layout: i,
|
|
2872
|
-
preview:
|
|
3056
|
+
preview: a,
|
|
2873
3057
|
children: /* @__PURE__ */ m(F, { children: [
|
|
2874
3058
|
/* @__PURE__ */ n(C, {
|
|
2875
3059
|
label: l("editor.graphPanel.graphOptions.dataLabels"),
|
|
@@ -2882,26 +3066,26 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2882
3066
|
label: l("editor.graphPanel.graphOptions.showPercentages"),
|
|
2883
3067
|
children: /* @__PURE__ */ n(c, {
|
|
2884
3068
|
isChecked: d === "percentage",
|
|
2885
|
-
onChange:
|
|
3069
|
+
onChange: I
|
|
2886
3070
|
})
|
|
2887
3071
|
}),
|
|
2888
3072
|
P && /* @__PURE__ */ n(C, {
|
|
2889
3073
|
label: l("editor.graphPanel.graphOptions.stackTotals"),
|
|
2890
3074
|
children: /* @__PURE__ */ n(c, {
|
|
2891
3075
|
isChecked: h,
|
|
2892
|
-
onChange:
|
|
3076
|
+
onChange: H
|
|
2893
3077
|
})
|
|
2894
3078
|
}),
|
|
2895
3079
|
y && /* @__PURE__ */ n(C, {
|
|
2896
3080
|
label: l("editor.graphPanel.graphOptions.categoryLabels"),
|
|
2897
3081
|
children: /* @__PURE__ */ n(c, {
|
|
2898
|
-
isChecked:
|
|
3082
|
+
isChecked: g,
|
|
2899
3083
|
onChange: B
|
|
2900
3084
|
})
|
|
2901
3085
|
})
|
|
2902
3086
|
] })
|
|
2903
3087
|
});
|
|
2904
|
-
},
|
|
3088
|
+
}, Wl = (e) => /* @__PURE__ */ m(T, {
|
|
2905
3089
|
viewBox: "0 0 16 16",
|
|
2906
3090
|
...e,
|
|
2907
3091
|
children: [/* @__PURE__ */ n("path", {
|
|
@@ -2913,7 +3097,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2913
3097
|
fillOpacity: "0.3",
|
|
2914
3098
|
d: "M5.744 5.565 0 11.826V8l5.744-6.957 4.718 2.087L16 0v6.957l-5.538 4z"
|
|
2915
3099
|
})]
|
|
2916
|
-
}),
|
|
3100
|
+
}), ql = (e) => /* @__PURE__ */ n(T, {
|
|
2917
3101
|
viewBox: "0 0 16 16",
|
|
2918
3102
|
...e,
|
|
2919
3103
|
children: /* @__PURE__ */ m("g", {
|
|
@@ -2955,7 +3139,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2955
3139
|
})
|
|
2956
3140
|
]
|
|
2957
3141
|
})
|
|
2958
|
-
}),
|
|
3142
|
+
}), Zl = (e) => /* @__PURE__ */ n(T, {
|
|
2959
3143
|
viewBox: "0 0 16 16",
|
|
2960
3144
|
...e,
|
|
2961
3145
|
children: /* @__PURE__ */ m("g", {
|
|
@@ -2970,7 +3154,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2970
3154
|
d: "M0 12.445h4.267V.52A.52.52 0 0 0 3.748 0H.518A.52.52 0 0 0 0 .519zM5.867 7.111h4.266V.52A.52.52 0 0 0 9.615 0h-3.23a.52.52 0 0 0-.518.519zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
|
|
2971
3155
|
})]
|
|
2972
3156
|
})
|
|
2973
|
-
}),
|
|
3157
|
+
}), $l = (e) => /* @__PURE__ */ n(T, {
|
|
2974
3158
|
viewBox: "0 0 16 16",
|
|
2975
3159
|
...e,
|
|
2976
3160
|
children: /* @__PURE__ */ m("g", {
|
|
@@ -2985,7 +3169,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
2985
3169
|
d: "M0 7.037c0-.286.232-.518.519-.518h3.23c.286 0 .518.232.518.518v5.408H0zM5.867 7.111h4.266V4.074a.52.52 0 0 0-.518-.518h-3.23a.52.52 0 0 0-.518.518zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
|
|
2986
3170
|
})]
|
|
2987
3171
|
})
|
|
2988
|
-
}),
|
|
3172
|
+
}), Xl = (e) => /* @__PURE__ */ m(T, {
|
|
2989
3173
|
viewBox: "0 0 16 16",
|
|
2990
3174
|
...e,
|
|
2991
3175
|
children: [
|
|
@@ -3024,7 +3208,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3024
3208
|
rx: ".533"
|
|
3025
3209
|
})
|
|
3026
3210
|
]
|
|
3027
|
-
}),
|
|
3211
|
+
}), jl = (e) => /* @__PURE__ */ m(T, {
|
|
3028
3212
|
viewBox: "0 0 16 16",
|
|
3029
3213
|
...e,
|
|
3030
3214
|
children: [/* @__PURE__ */ n("path", {
|
|
@@ -3036,7 +3220,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3036
3220
|
fillOpacity: "0.3",
|
|
3037
3221
|
d: "M0 12.445h4.267V.52A.52.52 0 0 0 3.748 0H.518A.52.52 0 0 0 0 .519zM5.867 7.111h4.266V.52A.52.52 0 0 0 9.615 0h-3.23a.52.52 0 0 0-.518.519zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
|
|
3038
3222
|
})]
|
|
3039
|
-
}),
|
|
3223
|
+
}), Yl = (e) => /* @__PURE__ */ m(T, {
|
|
3040
3224
|
viewBox: "0 0 16 16",
|
|
3041
3225
|
...e,
|
|
3042
3226
|
children: [/* @__PURE__ */ n("path", {
|
|
@@ -3048,7 +3232,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3048
3232
|
fillOpacity: "0.3",
|
|
3049
3233
|
d: "M0 7.037c0-.286.232-.518.519-.518h3.23c.286 0 .518.232.518.518v5.408H0zM5.867 7.111h4.266V4.074a.52.52 0 0 0-.518-.518h-3.23a.52.52 0 0 0-.518.518zM11.733 9.481H16V.52A.52.52 0 0 0 15.482 0h-3.23a.52.52 0 0 0-.519.519z"
|
|
3050
3234
|
})]
|
|
3051
|
-
}),
|
|
3235
|
+
}), Ql = (e) => /* @__PURE__ */ n(T, {
|
|
3052
3236
|
viewBox: "0 0 16 16",
|
|
3053
3237
|
...e,
|
|
3054
3238
|
children: /* @__PURE__ */ m("g", {
|
|
@@ -3083,7 +3267,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3083
3267
|
})
|
|
3084
3268
|
]
|
|
3085
3269
|
})
|
|
3086
|
-
}),
|
|
3270
|
+
}), Jl = (e) => /* @__PURE__ */ n(T, {
|
|
3087
3271
|
viewBox: "0 0 16 16",
|
|
3088
3272
|
...e,
|
|
3089
3273
|
children: /* @__PURE__ */ m("g", {
|
|
@@ -3160,7 +3344,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3160
3344
|
]
|
|
3161
3345
|
})]
|
|
3162
3346
|
})
|
|
3163
|
-
}),
|
|
3347
|
+
}), es = (e) => /* @__PURE__ */ m(T, {
|
|
3164
3348
|
viewBox: "0 0 16 16",
|
|
3165
3349
|
...e,
|
|
3166
3350
|
children: [
|
|
@@ -3182,7 +3366,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3182
3366
|
d: "M15.999 8a8 8 0 0 1-7.588 7.989l-.412.01V8z"
|
|
3183
3367
|
})
|
|
3184
3368
|
]
|
|
3185
|
-
}),
|
|
3369
|
+
}), ns = (e) => /* @__PURE__ */ n(T, {
|
|
3186
3370
|
viewBox: "0 0 16 16",
|
|
3187
3371
|
...e,
|
|
3188
3372
|
children: /* @__PURE__ */ m("g", {
|
|
@@ -3226,10 +3410,10 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3226
3410
|
})
|
|
3227
3411
|
]
|
|
3228
3412
|
})
|
|
3229
|
-
}),
|
|
3413
|
+
}), ts = 0.55, Re = [
|
|
3230
3414
|
{
|
|
3231
3415
|
name: "column",
|
|
3232
|
-
icon:
|
|
3416
|
+
icon: Xl,
|
|
3233
3417
|
summary: {
|
|
3234
3418
|
coordType: "cartesian",
|
|
3235
3419
|
geom: "bar",
|
|
@@ -3238,7 +3422,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3238
3422
|
},
|
|
3239
3423
|
{
|
|
3240
3424
|
name: "columnStacked",
|
|
3241
|
-
icon:
|
|
3425
|
+
icon: Yl,
|
|
3242
3426
|
summary: {
|
|
3243
3427
|
coordType: "cartesian",
|
|
3244
3428
|
geom: "bar",
|
|
@@ -3247,7 +3431,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3247
3431
|
},
|
|
3248
3432
|
{
|
|
3249
3433
|
name: "columnStackedFill",
|
|
3250
|
-
icon:
|
|
3434
|
+
icon: jl,
|
|
3251
3435
|
summary: {
|
|
3252
3436
|
coordType: "cartesian",
|
|
3253
3437
|
geom: "bar",
|
|
@@ -3256,7 +3440,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3256
3440
|
},
|
|
3257
3441
|
{
|
|
3258
3442
|
name: "bar",
|
|
3259
|
-
icon:
|
|
3443
|
+
icon: ql,
|
|
3260
3444
|
summary: {
|
|
3261
3445
|
coordType: "flip",
|
|
3262
3446
|
geom: "bar",
|
|
@@ -3265,7 +3449,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3265
3449
|
},
|
|
3266
3450
|
{
|
|
3267
3451
|
name: "barStacked",
|
|
3268
|
-
icon:
|
|
3452
|
+
icon: $l,
|
|
3269
3453
|
summary: {
|
|
3270
3454
|
coordType: "flip",
|
|
3271
3455
|
geom: "bar",
|
|
@@ -3274,7 +3458,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3274
3458
|
},
|
|
3275
3459
|
{
|
|
3276
3460
|
name: "barStackedFill",
|
|
3277
|
-
icon:
|
|
3461
|
+
icon: Zl,
|
|
3278
3462
|
summary: {
|
|
3279
3463
|
coordType: "flip",
|
|
3280
3464
|
geom: "bar",
|
|
@@ -3283,7 +3467,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3283
3467
|
},
|
|
3284
3468
|
{
|
|
3285
3469
|
name: "line",
|
|
3286
|
-
icon:
|
|
3470
|
+
icon: Jl,
|
|
3287
3471
|
summary: {
|
|
3288
3472
|
coordType: "cartesian",
|
|
3289
3473
|
geom: "line",
|
|
@@ -3292,7 +3476,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3292
3476
|
},
|
|
3293
3477
|
{
|
|
3294
3478
|
name: "areaStacked",
|
|
3295
|
-
icon:
|
|
3479
|
+
icon: Wl,
|
|
3296
3480
|
summary: {
|
|
3297
3481
|
coordType: "cartesian",
|
|
3298
3482
|
geom: "area",
|
|
@@ -3301,7 +3485,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3301
3485
|
},
|
|
3302
3486
|
{
|
|
3303
3487
|
name: "scatter",
|
|
3304
|
-
icon:
|
|
3488
|
+
icon: ns,
|
|
3305
3489
|
summary: {
|
|
3306
3490
|
coordType: "cartesian",
|
|
3307
3491
|
geom: "point",
|
|
@@ -3310,7 +3494,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3310
3494
|
},
|
|
3311
3495
|
{
|
|
3312
3496
|
name: "pie",
|
|
3313
|
-
icon:
|
|
3497
|
+
icon: es,
|
|
3314
3498
|
summary: {
|
|
3315
3499
|
coordType: "polar",
|
|
3316
3500
|
geom: "bar",
|
|
@@ -3321,159 +3505,159 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3321
3505
|
},
|
|
3322
3506
|
{
|
|
3323
3507
|
name: "donut",
|
|
3324
|
-
icon:
|
|
3508
|
+
icon: Ql,
|
|
3325
3509
|
summary: {
|
|
3326
3510
|
coordType: "polar",
|
|
3327
3511
|
geom: "bar",
|
|
3328
3512
|
position: "fill",
|
|
3329
3513
|
theta: "y",
|
|
3330
|
-
innerRadius:
|
|
3514
|
+
innerRadius: ts
|
|
3331
3515
|
}
|
|
3332
3516
|
}
|
|
3333
|
-
],
|
|
3517
|
+
], rs = 0.05, as = (e) => e === null ? null : Re.find((t) => is(t.summary, e)) ?? null, os = (e, t) => {
|
|
3334
3518
|
const { summary: i } = e;
|
|
3335
|
-
return i.coordType !== "polar" || !
|
|
3519
|
+
return i.coordType !== "polar" || !Se(i.innerRadius) || t === null || t.coordType !== "polar" || !Se(t.innerRadius) ? i : {
|
|
3336
3520
|
...i,
|
|
3337
3521
|
innerRadius: t.innerRadius
|
|
3338
3522
|
};
|
|
3339
|
-
},
|
|
3340
|
-
const
|
|
3523
|
+
}, is = (e, t) => e.coordType !== t.coordType || e.geom !== t.geom || e.position !== t.position ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && Se(e.innerRadius) === Se(t.innerRadius), Se = (e) => e >= rs, ls = 3, mc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3524
|
+
const a = N(), o = R(a), r = A(), { RadioGrid: l } = k(), c = E(() => Re.map(({ name: h, icon: g }) => ({
|
|
3341
3525
|
value: h,
|
|
3342
|
-
label:
|
|
3343
|
-
icon: /* @__PURE__ */ n(
|
|
3344
|
-
})), [
|
|
3526
|
+
label: r(`editor.graphTypes.${h}`),
|
|
3527
|
+
icon: /* @__PURE__ */ n(g, { size: "md" })
|
|
3528
|
+
})), [r]);
|
|
3345
3529
|
if (!o) return null;
|
|
3346
|
-
const s =
|
|
3347
|
-
const
|
|
3348
|
-
|
|
3530
|
+
const s = ia(o.spec), u = as(s), d = (h) => {
|
|
3531
|
+
const g = Re.find((p) => p.name === h);
|
|
3532
|
+
g && a.commands.dispatch(new cr(os(g, s)));
|
|
3349
3533
|
};
|
|
3350
|
-
return /* @__PURE__ */ n(
|
|
3351
|
-
title: e ??
|
|
3534
|
+
return /* @__PURE__ */ n(_, {
|
|
3535
|
+
title: e ?? r("editor.graphPanel.graphTypeSection.title"),
|
|
3352
3536
|
layout: t,
|
|
3353
|
-
preview: i ??
|
|
3537
|
+
preview: i ?? r(u === null ? "editor.graphTypes.combo" : `editor.graphTypes.${u.name}`),
|
|
3354
3538
|
children: /* @__PURE__ */ n(l, {
|
|
3355
3539
|
value: u?.name ?? "",
|
|
3356
3540
|
options: c,
|
|
3357
|
-
columns:
|
|
3541
|
+
columns: ls,
|
|
3358
3542
|
onChange: d,
|
|
3359
|
-
ariaLabel:
|
|
3543
|
+
ariaLabel: r("editor.graphPanel.graphTypeSection.title")
|
|
3360
3544
|
})
|
|
3361
3545
|
});
|
|
3362
|
-
},
|
|
3546
|
+
}, fn = [
|
|
3363
3547
|
"solid",
|
|
3364
3548
|
"dashed",
|
|
3365
3549
|
"dotted"
|
|
3366
|
-
],
|
|
3367
|
-
const
|
|
3550
|
+
], ss = Number.parseFloat(_t.gridLineWidth), cs = 8, ds = 0, pc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3551
|
+
const a = N(), o = R(a), r = A(), { Slider: l, Switch: c, ToggleGroup: s } = k(), { themeValues: u } = ze();
|
|
3368
3552
|
if (!o) return null;
|
|
3369
|
-
const d = o.guides.axes.filter(
|
|
3553
|
+
const d = o.guides.axes.filter(hs);
|
|
3370
3554
|
if (d.length === 0) return null;
|
|
3371
|
-
const h = o.coordSystem.type !== "polar",
|
|
3555
|
+
const h = o.coordSystem.type !== "polar", g = d.some((f) => f.gridVisible), p = o.config.axes.y.grid, v = fn.map((f) => ({
|
|
3372
3556
|
value: f,
|
|
3373
|
-
label:
|
|
3557
|
+
label: r(`editor.graphPanel.gridSection.lineStyles.${f}`)
|
|
3374
3558
|
})), S = (f) => (x) => {
|
|
3375
|
-
|
|
3559
|
+
a.commands.dispatch(new fr({
|
|
3376
3560
|
axis: f,
|
|
3377
3561
|
isVisible: x
|
|
3378
3562
|
}));
|
|
3379
3563
|
}, P = (f) => {
|
|
3380
|
-
const x =
|
|
3381
|
-
x &&
|
|
3564
|
+
const x = fn.find((I) => I === f);
|
|
3565
|
+
x && a.commands.dispatch(new gr({
|
|
3382
3566
|
axis: "both",
|
|
3383
3567
|
lineStyle: x
|
|
3384
3568
|
}));
|
|
3385
3569
|
}, y = (f) => {
|
|
3386
|
-
|
|
3570
|
+
a.commands.dispatch(new vr({
|
|
3387
3571
|
axis: "both",
|
|
3388
3572
|
lineWidth: f
|
|
3389
3573
|
}), { transient: !0 });
|
|
3390
3574
|
};
|
|
3391
|
-
return /* @__PURE__ */ n(
|
|
3392
|
-
title: e ??
|
|
3575
|
+
return /* @__PURE__ */ n(_, {
|
|
3576
|
+
title: e ?? r("editor.graphPanel.gridSection.title"),
|
|
3393
3577
|
layout: t,
|
|
3394
3578
|
preview: i,
|
|
3395
3579
|
children: /* @__PURE__ */ m(F, { children: [d.map((f) => /* @__PURE__ */ n(C, {
|
|
3396
|
-
label:
|
|
3580
|
+
label: r(us(f)),
|
|
3397
3581
|
children: /* @__PURE__ */ n(c, {
|
|
3398
3582
|
isChecked: f.gridVisible,
|
|
3399
3583
|
onChange: S(f.scaleAestheticKey)
|
|
3400
3584
|
})
|
|
3401
|
-
}, f.scaleAestheticKey)), h &&
|
|
3402
|
-
label:
|
|
3585
|
+
}, f.scaleAestheticKey)), h && g && /* @__PURE__ */ m(K, { children: [/* @__PURE__ */ n(C, {
|
|
3586
|
+
label: r("editor.graphPanel.gridSection.gridStyle"),
|
|
3403
3587
|
children: /* @__PURE__ */ n(s, {
|
|
3404
3588
|
value: p.lineStyle,
|
|
3405
|
-
options:
|
|
3589
|
+
options: v,
|
|
3406
3590
|
onChange: P
|
|
3407
3591
|
})
|
|
3408
3592
|
}), /* @__PURE__ */ n(C, {
|
|
3409
|
-
label:
|
|
3593
|
+
label: r("editor.graphPanel.gridSection.gridThickness"),
|
|
3410
3594
|
children: /* @__PURE__ */ n(l, {
|
|
3411
|
-
value: p.lineWidth ??
|
|
3412
|
-
min:
|
|
3413
|
-
max:
|
|
3595
|
+
value: p.lineWidth ?? Et(u.gridLineWidth, ss),
|
|
3596
|
+
min: ds,
|
|
3597
|
+
max: cs,
|
|
3414
3598
|
step: 0.5,
|
|
3415
|
-
formatValue:
|
|
3599
|
+
formatValue: Pe,
|
|
3416
3600
|
onChange: y,
|
|
3417
|
-
onCommit:
|
|
3601
|
+
onCommit: a.commands.seal
|
|
3418
3602
|
})
|
|
3419
3603
|
})] })] })
|
|
3420
3604
|
});
|
|
3421
|
-
},
|
|
3605
|
+
}, hs = (e) => e.scaleAestheticKey === "x" || e.scaleAestheticKey === "y", us = (e) => e.geometry === "radial" ? "editor.graphPanel.gridSection.rings" : e.geometry === "circular" ? "editor.graphPanel.gridSection.spokes" : e.scaleAestheticKey === "x" ? "editor.graphPanel.gridSection.verticalGridLines" : "editor.graphPanel.gridSection.horizontalGridLines", ms = "total", mt = [
|
|
3422
3606
|
"total",
|
|
3423
3607
|
"average",
|
|
3424
3608
|
"current"
|
|
3425
|
-
],
|
|
3609
|
+
], ps = ["total"], Cn = ["previous", "first"], bn = [
|
|
3426
3610
|
"auto",
|
|
3427
3611
|
"small",
|
|
3428
3612
|
"medium",
|
|
3429
3613
|
"large"
|
|
3430
|
-
],
|
|
3431
|
-
const
|
|
3614
|
+
], gc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3615
|
+
const a = N(), o = R(a), r = A(), { Switch: l, ToggleGroup: c } = k();
|
|
3432
3616
|
if (!o) return null;
|
|
3433
|
-
const s = o.config.headline, u = s.show !== "none", d = o.coordSystem, h = d.type === "polar",
|
|
3617
|
+
const s = o.config.headline, u = s.show !== "none", d = o.coordSystem, h = d.type === "polar", g = d.type === "polar" && d.innerRadius > 0, p = o.layers.some((w) => w.summary.grandTotal !== void 0);
|
|
3434
3618
|
if (h && !p) return null;
|
|
3435
|
-
const
|
|
3619
|
+
const v = h ? ps : mt, S = o.guides.headline, P = S?.kind === "perGroup" && S.items.some((w) => w.comparison !== null), y = v.map((w) => ({
|
|
3436
3620
|
value: w,
|
|
3437
|
-
label:
|
|
3438
|
-
})), f =
|
|
3621
|
+
label: r(`editor.graphPanel.headlineNumberSection.metrics.${w}`)
|
|
3622
|
+
})), f = Cn.map((w) => ({
|
|
3439
3623
|
value: w,
|
|
3440
|
-
label:
|
|
3441
|
-
})), x =
|
|
3624
|
+
label: r(`editor.graphPanel.headlineNumberSection.comparison.${w}`)
|
|
3625
|
+
})), x = bn.map((w) => ({
|
|
3442
3626
|
value: w,
|
|
3443
|
-
label:
|
|
3444
|
-
})),
|
|
3627
|
+
label: r(w === "auto" ? "editor.graphPanel.numberFormat.options.auto" : `editor.graphPanel.headlineNumberSize.sizes.${w}`)
|
|
3628
|
+
})), I = [{
|
|
3445
3629
|
value: "above",
|
|
3446
|
-
label:
|
|
3630
|
+
label: r("editor.graphPanel.headlineNumberSection.position.above")
|
|
3447
3631
|
}, {
|
|
3448
3632
|
value: "center",
|
|
3449
|
-
label:
|
|
3450
|
-
}],
|
|
3451
|
-
|
|
3633
|
+
label: r("editor.graphPanel.headlineNumberSection.position.center")
|
|
3634
|
+
}], H = (w) => {
|
|
3635
|
+
a.commands.dispatch(new Ye({ show: w ? ms : "none" }));
|
|
3452
3636
|
}, B = (w) => {
|
|
3453
|
-
const O =
|
|
3454
|
-
O &&
|
|
3455
|
-
},
|
|
3456
|
-
const O =
|
|
3457
|
-
O &&
|
|
3458
|
-
},
|
|
3459
|
-
const O =
|
|
3460
|
-
O &&
|
|
3637
|
+
const O = v.find((J) => J === w);
|
|
3638
|
+
O && a.commands.dispatch(new Ye({ show: O }));
|
|
3639
|
+
}, M = (w) => {
|
|
3640
|
+
const O = Cn.find((J) => J === w);
|
|
3641
|
+
O && a.commands.dispatch(new Cr({ compareWith: O }));
|
|
3642
|
+
}, z = (w) => {
|
|
3643
|
+
const O = bn.find((J) => J === w);
|
|
3644
|
+
O && a.commands.dispatch(new yr({ size: O }));
|
|
3461
3645
|
}, L = (w) => {
|
|
3462
|
-
|
|
3646
|
+
a.commands.dispatch(new br({ position: w === "center" ? "center" : "above" }));
|
|
3463
3647
|
};
|
|
3464
|
-
return /* @__PURE__ */ n(
|
|
3465
|
-
title: e ??
|
|
3648
|
+
return /* @__PURE__ */ n(_, {
|
|
3649
|
+
title: e ?? r("editor.graphPanel.headlineNumberSection.title"),
|
|
3466
3650
|
layout: t,
|
|
3467
|
-
preview: i ??
|
|
3651
|
+
preview: i ?? gs(r, s.show),
|
|
3468
3652
|
children: /* @__PURE__ */ m(F, { children: [/* @__PURE__ */ n(C, {
|
|
3469
|
-
label:
|
|
3653
|
+
label: r("editor.graphPanel.headlineNumberSection.toggle"),
|
|
3470
3654
|
children: /* @__PURE__ */ n(l, {
|
|
3471
3655
|
isChecked: u,
|
|
3472
|
-
onChange:
|
|
3656
|
+
onChange: H
|
|
3473
3657
|
})
|
|
3474
|
-
}), u && /* @__PURE__ */ m(
|
|
3658
|
+
}), u && /* @__PURE__ */ m(K, { children: [
|
|
3475
3659
|
y.length > 1 && /* @__PURE__ */ n(C, {
|
|
3476
|
-
label:
|
|
3660
|
+
label: r("editor.graphPanel.headlineNumberSection.metricLabel"),
|
|
3477
3661
|
layout: "stack",
|
|
3478
3662
|
children: /* @__PURE__ */ n(c, {
|
|
3479
3663
|
value: s.show,
|
|
@@ -3482,82 +3666,82 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3482
3666
|
})
|
|
3483
3667
|
}),
|
|
3484
3668
|
P && /* @__PURE__ */ n(C, {
|
|
3485
|
-
label:
|
|
3669
|
+
label: r("editor.graphPanel.headlineNumberSection.compareWithLabel"),
|
|
3486
3670
|
layout: "stack",
|
|
3487
3671
|
children: /* @__PURE__ */ n(c, {
|
|
3488
|
-
value:
|
|
3672
|
+
value: sa(s.compareWith),
|
|
3489
3673
|
options: f,
|
|
3490
|
-
onChange:
|
|
3674
|
+
onChange: M
|
|
3491
3675
|
})
|
|
3492
3676
|
}),
|
|
3493
3677
|
/* @__PURE__ */ n(C, {
|
|
3494
|
-
label:
|
|
3678
|
+
label: r("editor.graphPanel.headlineNumberSize.sizeLabel"),
|
|
3495
3679
|
children: /* @__PURE__ */ n(c, {
|
|
3496
3680
|
value: s.size,
|
|
3497
3681
|
options: x,
|
|
3498
|
-
onChange:
|
|
3682
|
+
onChange: z
|
|
3499
3683
|
})
|
|
3500
3684
|
}),
|
|
3501
|
-
|
|
3502
|
-
label:
|
|
3685
|
+
g && /* @__PURE__ */ n(C, {
|
|
3686
|
+
label: r("editor.axesPanel.controls.position"),
|
|
3503
3687
|
children: /* @__PURE__ */ n(c, {
|
|
3504
3688
|
value: s.position,
|
|
3505
|
-
options:
|
|
3689
|
+
options: I,
|
|
3506
3690
|
onChange: L
|
|
3507
3691
|
})
|
|
3508
3692
|
})
|
|
3509
3693
|
] })] })
|
|
3510
3694
|
});
|
|
3511
|
-
},
|
|
3512
|
-
const i =
|
|
3695
|
+
}, gs = (e, t) => {
|
|
3696
|
+
const i = mt.find((a) => a === t);
|
|
3513
3697
|
return i && e(`editor.graphPanel.headlineNumberSection.metrics.${i}`);
|
|
3514
|
-
},
|
|
3698
|
+
}, Oe = [
|
|
3515
3699
|
"top",
|
|
3516
3700
|
"bottom",
|
|
3517
3701
|
"left",
|
|
3518
3702
|
"right",
|
|
3519
3703
|
"none"
|
|
3520
|
-
],
|
|
3704
|
+
], yn = [
|
|
3521
3705
|
"auto",
|
|
3522
3706
|
"start",
|
|
3523
3707
|
"center",
|
|
3524
3708
|
"end"
|
|
3525
|
-
],
|
|
3709
|
+
], Sn = [
|
|
3526
3710
|
"auto",
|
|
3527
3711
|
"pill",
|
|
3528
3712
|
"direct"
|
|
3529
|
-
],
|
|
3530
|
-
const o =
|
|
3531
|
-
if (!
|
|
3532
|
-
const s =
|
|
3533
|
-
legendPosition:
|
|
3534
|
-
coordSystem:
|
|
3535
|
-
layers:
|
|
3536
|
-
}),
|
|
3537
|
-
if (s === "auto" && d === void 0 && !h && (
|
|
3538
|
-
const
|
|
3713
|
+
], vc = ({ positions: e, title: t, layout: i = "collapsible", preview: a }) => {
|
|
3714
|
+
const o = N(), r = R(o), l = A(), { ToggleGroup: c } = k();
|
|
3715
|
+
if (!r) return null;
|
|
3716
|
+
const s = r.config.legend.position, u = e ?? Oe, d = r.guides.legends.drawn[0], h = Ur({
|
|
3717
|
+
legendPosition: r.guides.legends.position,
|
|
3718
|
+
coordSystem: r.coordSystem,
|
|
3719
|
+
layers: r.layers
|
|
3720
|
+
}), g = r.guides.headline?.kind === "perGroup", p = r.guides.colorGroups.length > 0;
|
|
3721
|
+
if (s === "auto" && d === void 0 && !h && (g || !p)) return null;
|
|
3722
|
+
const v = d?.position ?? "none", S = s === "auto" ? v : s, P = Oe.filter((L) => L === S || u.includes(L)).map((L) => ({
|
|
3539
3723
|
value: L,
|
|
3540
3724
|
label: l(`editor.graphPanel.legendSection.${L}`)
|
|
3541
3725
|
})), y = (L) => {
|
|
3542
|
-
const w =
|
|
3543
|
-
w && o.commands.dispatch(new
|
|
3726
|
+
const w = Oe.find((O) => O === L);
|
|
3727
|
+
w && o.commands.dispatch(new Tr({ position: w }));
|
|
3544
3728
|
}, f = (L) => {
|
|
3545
|
-
const w =
|
|
3546
|
-
w && o.commands.dispatch(new
|
|
3729
|
+
const w = yn.find((O) => O === L);
|
|
3730
|
+
w && o.commands.dispatch(new wr({ align: w }));
|
|
3547
3731
|
}, x = (L) => {
|
|
3548
|
-
const w =
|
|
3549
|
-
w && o.commands.dispatch(new
|
|
3550
|
-
},
|
|
3732
|
+
const w = Sn.find((O) => O === L);
|
|
3733
|
+
w && o.commands.dispatch(new xr({ display: w }));
|
|
3734
|
+
}, I = yn.map((L) => ({
|
|
3551
3735
|
value: L,
|
|
3552
3736
|
label: l(`editor.graphPanel.legendSection.align.${L}`)
|
|
3553
|
-
})),
|
|
3737
|
+
})), H = Sn.map((L) => ({
|
|
3554
3738
|
value: L,
|
|
3555
3739
|
label: l(`editor.graphPanel.legendSection.display.${L}`)
|
|
3556
|
-
})), B = t ?? l("editor.graphPanel.legendSection.title"),
|
|
3557
|
-
return /* @__PURE__ */ n(
|
|
3740
|
+
})), B = t ?? l("editor.graphPanel.legendSection.title"), M = P.find((L) => L.value === S)?.label, z = d !== void 0;
|
|
3741
|
+
return /* @__PURE__ */ n(_, {
|
|
3558
3742
|
title: B,
|
|
3559
3743
|
layout: i,
|
|
3560
|
-
preview:
|
|
3744
|
+
preview: a ?? M,
|
|
3561
3745
|
children: /* @__PURE__ */ m(F, { children: [
|
|
3562
3746
|
/* @__PURE__ */ n(C, {
|
|
3563
3747
|
label: l("editor.axesPanel.controls.position"),
|
|
@@ -3568,12 +3752,12 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3568
3752
|
onChange: y
|
|
3569
3753
|
})
|
|
3570
3754
|
}),
|
|
3571
|
-
|
|
3755
|
+
z && /* @__PURE__ */ n(C, {
|
|
3572
3756
|
label: l("editor.graphPanel.legendSection.alignLabel"),
|
|
3573
3757
|
layout: "stack",
|
|
3574
3758
|
children: /* @__PURE__ */ n(c, {
|
|
3575
|
-
value:
|
|
3576
|
-
options:
|
|
3759
|
+
value: r.config.legend.align,
|
|
3760
|
+
options: I,
|
|
3577
3761
|
onChange: f
|
|
3578
3762
|
})
|
|
3579
3763
|
}),
|
|
@@ -3581,139 +3765,139 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3581
3765
|
label: l("editor.graphPanel.legendSection.displayLabel"),
|
|
3582
3766
|
layout: "stack",
|
|
3583
3767
|
children: /* @__PURE__ */ n(c, {
|
|
3584
|
-
value:
|
|
3585
|
-
options:
|
|
3768
|
+
value: r.config.legend.display,
|
|
3769
|
+
options: H,
|
|
3586
3770
|
onChange: x
|
|
3587
3771
|
})
|
|
3588
3772
|
})
|
|
3589
3773
|
] })
|
|
3590
3774
|
});
|
|
3591
|
-
},
|
|
3592
|
-
const t =
|
|
3775
|
+
}, vs = 1, fs = 20, Cs = 0.5, pt = ({ layerId: e }) => {
|
|
3776
|
+
const t = N(), i = R(t), { Slider: a } = k(), o = $e(i, e);
|
|
3593
3777
|
if (!i) return null;
|
|
3594
|
-
const
|
|
3595
|
-
const c = new
|
|
3778
|
+
const r = (l) => {
|
|
3779
|
+
const c = new Lr({
|
|
3596
3780
|
layerId: e,
|
|
3597
3781
|
size: l
|
|
3598
3782
|
});
|
|
3599
3783
|
t.commands.dispatch(c, { transient: !0 });
|
|
3600
3784
|
};
|
|
3601
|
-
return /* @__PURE__ */ n(
|
|
3602
|
-
value: o?.get("size") ??
|
|
3603
|
-
min:
|
|
3604
|
-
max:
|
|
3605
|
-
step:
|
|
3606
|
-
formatValue:
|
|
3607
|
-
onChange:
|
|
3785
|
+
return /* @__PURE__ */ n(a, {
|
|
3786
|
+
value: o?.get("size") ?? $t,
|
|
3787
|
+
min: vs,
|
|
3788
|
+
max: fs,
|
|
3789
|
+
step: Cs,
|
|
3790
|
+
formatValue: Pe,
|
|
3791
|
+
onChange: r,
|
|
3608
3792
|
onCommit: t.commands.seal
|
|
3609
3793
|
});
|
|
3610
|
-
},
|
|
3794
|
+
}, bs = 1, ys = 10, Ss = 0.1, ws = [
|
|
3611
3795
|
"gap",
|
|
3612
3796
|
"zero",
|
|
3613
3797
|
"connect"
|
|
3614
|
-
],
|
|
3615
|
-
const
|
|
3798
|
+
], fc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3799
|
+
const a = N(), o = R(a), r = A(), { Select: l, Slider: c, Switch: s, ToggleGroup: u } = k(), d = o?.spec.layers ?? [], h = On(d, "line", "area"), g = $e(o, h?.id ?? null);
|
|
3616
3800
|
if (!o || !h) return null;
|
|
3617
|
-
const p = o.coordSystem.type === "polar",
|
|
3801
|
+
const p = o.coordSystem.type === "polar", v = Ps(r, h), S = Ts(h, d), P = wn(o.spec, h.geom, "strokeWidth", h.id), y = typeof P == "number", f = h.geom === "line" ? h : void 0, x = [{
|
|
3618
3802
|
value: "auto",
|
|
3619
|
-
label:
|
|
3803
|
+
label: r("editor.graphPanel.numberFormat.options.auto")
|
|
3620
3804
|
}, {
|
|
3621
3805
|
value: "custom",
|
|
3622
|
-
label:
|
|
3623
|
-
}],
|
|
3624
|
-
|
|
3806
|
+
label: r("editor.graphPanel.numberFormat.options.custom")
|
|
3807
|
+
}], I = (w) => {
|
|
3808
|
+
a.commands.dispatch(new Hr({
|
|
3625
3809
|
layerId: h.id,
|
|
3626
3810
|
showPoints: w
|
|
3627
3811
|
}));
|
|
3628
|
-
},
|
|
3629
|
-
f &&
|
|
3812
|
+
}, H = (w) => {
|
|
3813
|
+
f && a.commands.dispatch(new Dr({
|
|
3630
3814
|
layerId: f.id,
|
|
3631
3815
|
showFill: w
|
|
3632
3816
|
}));
|
|
3633
3817
|
}, B = (w) => {
|
|
3634
|
-
|
|
3818
|
+
a.commands.dispatch(new Pr({
|
|
3635
3819
|
layerId: h.id,
|
|
3636
3820
|
interpolate: w ? "catmull-rom" : "linear"
|
|
3637
3821
|
}));
|
|
3638
|
-
},
|
|
3639
|
-
const O =
|
|
3640
|
-
|
|
3822
|
+
}, M = (w) => {
|
|
3823
|
+
const O = g?.get("strokeWidth") ?? Xt;
|
|
3824
|
+
a.commands.dispatch(new Qe({
|
|
3641
3825
|
layerId: h.id,
|
|
3642
3826
|
lineWidth: w === "custom" ? O : null
|
|
3643
3827
|
}));
|
|
3644
|
-
},
|
|
3645
|
-
|
|
3828
|
+
}, z = (w) => {
|
|
3829
|
+
a.commands.dispatch(new Qe({
|
|
3646
3830
|
layerId: h.id,
|
|
3647
3831
|
lineWidth: w
|
|
3648
3832
|
}), { transient: !0 });
|
|
3649
3833
|
}, L = (w) => {
|
|
3650
|
-
const O =
|
|
3651
|
-
O &&
|
|
3834
|
+
const O = xs(w);
|
|
3835
|
+
O && a.commands.dispatch(new Ir({
|
|
3652
3836
|
layerId: h.id,
|
|
3653
3837
|
missingValues: O
|
|
3654
3838
|
}));
|
|
3655
3839
|
};
|
|
3656
|
-
return /* @__PURE__ */ n(
|
|
3657
|
-
title: e ??
|
|
3840
|
+
return /* @__PURE__ */ n(_, {
|
|
3841
|
+
title: e ?? r("editor.fineTunePanel.lineStyleSection.title"),
|
|
3658
3842
|
layout: t,
|
|
3659
3843
|
preview: i,
|
|
3660
3844
|
children: /* @__PURE__ */ m(F, { children: [
|
|
3661
3845
|
/* @__PURE__ */ n(C, {
|
|
3662
|
-
label:
|
|
3846
|
+
label: r("editor.graphPanel.graphOptions.showPoints"),
|
|
3663
3847
|
children: /* @__PURE__ */ n(s, {
|
|
3664
3848
|
isChecked: S !== void 0,
|
|
3665
|
-
onChange:
|
|
3849
|
+
onChange: I
|
|
3666
3850
|
})
|
|
3667
3851
|
}),
|
|
3668
3852
|
S && /* @__PURE__ */ n(C, {
|
|
3669
|
-
label:
|
|
3670
|
-
children: /* @__PURE__ */ n(
|
|
3853
|
+
label: r("editor.graphPanel.pointSize.label"),
|
|
3854
|
+
children: /* @__PURE__ */ n(pt, { layerId: S.id })
|
|
3671
3855
|
}),
|
|
3672
3856
|
f && !p && /* @__PURE__ */ n(C, {
|
|
3673
|
-
label:
|
|
3857
|
+
label: r("editor.graphPanel.graphOptions.lineFill"),
|
|
3674
3858
|
children: /* @__PURE__ */ n(s, {
|
|
3675
|
-
isChecked:
|
|
3676
|
-
onChange:
|
|
3859
|
+
isChecked: wn(o.spec, "line", "fillAlpha", f.id) !== void 0,
|
|
3860
|
+
onChange: H
|
|
3677
3861
|
})
|
|
3678
3862
|
}),
|
|
3679
3863
|
!p && /* @__PURE__ */ n(C, {
|
|
3680
|
-
label:
|
|
3864
|
+
label: r("editor.graphPanel.graphOptions.smoothLines"),
|
|
3681
3865
|
children: /* @__PURE__ */ n(s, {
|
|
3682
3866
|
isChecked: h.params.interpolate === "catmull-rom",
|
|
3683
3867
|
onChange: B
|
|
3684
3868
|
})
|
|
3685
3869
|
}),
|
|
3686
3870
|
/* @__PURE__ */ n(C, {
|
|
3687
|
-
label:
|
|
3871
|
+
label: r("editor.graphPanel.lineThickness.label"),
|
|
3688
3872
|
children: /* @__PURE__ */ n(u, {
|
|
3689
3873
|
value: y ? "custom" : "auto",
|
|
3690
3874
|
options: x,
|
|
3691
|
-
onChange:
|
|
3875
|
+
onChange: M
|
|
3692
3876
|
})
|
|
3693
3877
|
}),
|
|
3694
3878
|
y && /* @__PURE__ */ n(C, {
|
|
3695
|
-
label:
|
|
3879
|
+
label: r("editor.graphPanel.numberFormat.valueLabel"),
|
|
3696
3880
|
children: /* @__PURE__ */ n(c, {
|
|
3697
3881
|
value: P,
|
|
3698
|
-
min:
|
|
3699
|
-
max:
|
|
3700
|
-
step:
|
|
3701
|
-
formatValue:
|
|
3702
|
-
onChange:
|
|
3703
|
-
onCommit:
|
|
3882
|
+
min: bs,
|
|
3883
|
+
max: ys,
|
|
3884
|
+
step: Ss,
|
|
3885
|
+
formatValue: Pe,
|
|
3886
|
+
onChange: z,
|
|
3887
|
+
onCommit: a.commands.seal
|
|
3704
3888
|
})
|
|
3705
3889
|
}),
|
|
3706
|
-
!p &&
|
|
3707
|
-
label:
|
|
3890
|
+
!p && v.length > 1 && /* @__PURE__ */ n(C, {
|
|
3891
|
+
label: r("editor.fineTunePanel.detailSection.missingValues"),
|
|
3708
3892
|
children: /* @__PURE__ */ n(l, {
|
|
3709
3893
|
value: h.params.missingValues,
|
|
3710
|
-
options:
|
|
3894
|
+
options: v,
|
|
3711
3895
|
onChange: L
|
|
3712
3896
|
})
|
|
3713
3897
|
})
|
|
3714
3898
|
] })
|
|
3715
3899
|
});
|
|
3716
|
-
},
|
|
3900
|
+
}, xs = (e) => ws.find((t) => t === e), wn = (e, t, i, a) => Yr(e.styles.overrides, Br(t, a))?.declarations?.[i], Ts = (e, t) => ke(t, "point").find((i) => Nn(i, [e])), Ps = (e, t) => {
|
|
3717
3901
|
const i = [{
|
|
3718
3902
|
value: "gap",
|
|
3719
3903
|
label: e("editor.graphPanel.treatEmptyValues.leaveGap.label")
|
|
@@ -3724,8 +3908,8 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3724
3908
|
return t.position !== "stack" && t.position !== "fill" && i.push({
|
|
3725
3909
|
value: "connect",
|
|
3726
3910
|
label: e("editor.graphPanel.treatEmptyValues.connectGaps.label")
|
|
3727
|
-
}), t.geom === "area" ? i.filter((
|
|
3728
|
-
},
|
|
3911
|
+
}), t.geom === "area" ? i.filter((a) => a.value !== "gap") : i;
|
|
3912
|
+
}, Is = "k", As = 2, Ls = 0, Os = 5, _e = [
|
|
3729
3913
|
{
|
|
3730
3914
|
value: "k",
|
|
3731
3915
|
labelKey: "thousands"
|
|
@@ -3738,38 +3922,38 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3738
3922
|
value: "b",
|
|
3739
3923
|
labelKey: "billions"
|
|
3740
3924
|
}
|
|
3741
|
-
],
|
|
3742
|
-
const
|
|
3925
|
+
], Ns = ["auto", "none"], Cc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3926
|
+
const a = N(), o = R(a), r = A(), { NumberField: l, ToggleGroup: c } = k();
|
|
3743
3927
|
if (!o) return null;
|
|
3744
|
-
const { abbreviation: s, decimals: u } = o.config.numberFormat, d =
|
|
3745
|
-
value:
|
|
3746
|
-
label:
|
|
3747
|
-
})), p =
|
|
3928
|
+
const { abbreviation: s, decimals: u } = o.config.numberFormat, d = ks(s) !== void 0, h = u !== "auto", g = (x) => x.map((I) => ({
|
|
3929
|
+
value: I,
|
|
3930
|
+
label: r(`editor.graphPanel.numberFormat.options.${I}`)
|
|
3931
|
+
})), p = _e.map(({ value: x, labelKey: I }) => ({
|
|
3748
3932
|
value: x,
|
|
3749
|
-
label:
|
|
3750
|
-
})),
|
|
3751
|
-
|
|
3933
|
+
label: r(`common.abbreviations.${I}`)
|
|
3934
|
+
})), v = (x) => {
|
|
3935
|
+
a.commands.dispatch(new Ar({ abbreviation: x }));
|
|
3752
3936
|
}, S = (x) => {
|
|
3753
|
-
const
|
|
3754
|
-
|
|
3937
|
+
const I = Ns.find((H) => H === x);
|
|
3938
|
+
v(I ?? Is);
|
|
3755
3939
|
}, P = (x) => {
|
|
3756
|
-
const
|
|
3757
|
-
|
|
3940
|
+
const I = _e.find((H) => H.value === x);
|
|
3941
|
+
I && v(I.value);
|
|
3758
3942
|
}, y = (x) => {
|
|
3759
|
-
|
|
3943
|
+
a.commands.dispatch(new Je({ decimals: x === "custom" ? As : "auto" }));
|
|
3760
3944
|
}, f = (x) => {
|
|
3761
|
-
x !== null &&
|
|
3945
|
+
x !== null && a.commands.dispatch(new Je({ decimals: x }), { transient: !0 });
|
|
3762
3946
|
};
|
|
3763
|
-
return /* @__PURE__ */ n(
|
|
3764
|
-
title: e ??
|
|
3947
|
+
return /* @__PURE__ */ n(_, {
|
|
3948
|
+
title: e ?? r("editor.graphPanel.numberFormatSection.title"),
|
|
3765
3949
|
layout: t,
|
|
3766
3950
|
preview: i,
|
|
3767
3951
|
children: /* @__PURE__ */ m(F, { children: [
|
|
3768
3952
|
/* @__PURE__ */ n(C, {
|
|
3769
|
-
label:
|
|
3953
|
+
label: r("editor.graphPanel.numberFormat.abbreviationLabel"),
|
|
3770
3954
|
children: /* @__PURE__ */ n(c, {
|
|
3771
3955
|
value: d ? "custom" : s,
|
|
3772
|
-
options:
|
|
3956
|
+
options: g([
|
|
3773
3957
|
"auto",
|
|
3774
3958
|
"none",
|
|
3775
3959
|
"custom"
|
|
@@ -3778,7 +3962,7 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3778
3962
|
})
|
|
3779
3963
|
}),
|
|
3780
3964
|
d && /* @__PURE__ */ n(C, {
|
|
3781
|
-
label:
|
|
3965
|
+
label: r("editor.graphPanel.numberFormat.valueLabel"),
|
|
3782
3966
|
children: /* @__PURE__ */ n(c, {
|
|
3783
3967
|
value: s,
|
|
3784
3968
|
options: p,
|
|
@@ -3786,114 +3970,115 @@ var cl = "_40zvwv8", D = ({ title: e, layout: t = "fixed", preview: i, accessory
|
|
|
3786
3970
|
})
|
|
3787
3971
|
}),
|
|
3788
3972
|
/* @__PURE__ */ n(C, {
|
|
3789
|
-
label:
|
|
3973
|
+
label: r("editor.graphPanel.numberFormat.decimalPlacesLabel"),
|
|
3790
3974
|
children: /* @__PURE__ */ n(c, {
|
|
3791
3975
|
value: h ? "custom" : "auto",
|
|
3792
|
-
options:
|
|
3976
|
+
options: g(["auto", "custom"]),
|
|
3793
3977
|
onChange: y
|
|
3794
3978
|
})
|
|
3795
3979
|
}),
|
|
3796
3980
|
h && /* @__PURE__ */ n(C, {
|
|
3797
|
-
label:
|
|
3981
|
+
label: r("editor.graphPanel.numberFormat.valueLabel"),
|
|
3798
3982
|
children: /* @__PURE__ */ n(l, {
|
|
3799
3983
|
value: u,
|
|
3800
|
-
min:
|
|
3801
|
-
max:
|
|
3984
|
+
min: Ls,
|
|
3985
|
+
max: Os,
|
|
3802
3986
|
onChange: f,
|
|
3803
|
-
onCommit:
|
|
3987
|
+
onCommit: a.commands.seal
|
|
3804
3988
|
})
|
|
3805
3989
|
})
|
|
3806
3990
|
] })
|
|
3807
3991
|
});
|
|
3808
|
-
},
|
|
3809
|
-
const
|
|
3810
|
-
if (!
|
|
3811
|
-
const
|
|
3812
|
-
return
|
|
3992
|
+
}, ks = (e) => _e.find((t) => t.value === e), bc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
3993
|
+
const a = R(N()), o = A();
|
|
3994
|
+
if (!a) return null;
|
|
3995
|
+
const r = Ms(a.spec.layers);
|
|
3996
|
+
return r ? /* @__PURE__ */ n(_, {
|
|
3813
3997
|
title: e ?? o("editor.graphPanel.pointSize.label"),
|
|
3814
3998
|
layout: t,
|
|
3815
3999
|
preview: i,
|
|
3816
4000
|
children: /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(C, {
|
|
3817
4001
|
label: o("editor.graphPanel.numberFormat.valueLabel"),
|
|
3818
|
-
children: /* @__PURE__ */ n(
|
|
4002
|
+
children: /* @__PURE__ */ n(pt, { layerId: r.id })
|
|
3819
4003
|
}) })
|
|
3820
4004
|
}) : null;
|
|
3821
|
-
},
|
|
3822
|
-
const t =
|
|
3823
|
-
return
|
|
3824
|
-
},
|
|
3825
|
-
const
|
|
4005
|
+
}, Ms = (e) => {
|
|
4006
|
+
const t = ke(e, "line", "area");
|
|
4007
|
+
return ke(e, "point").find((i) => !Nn(i, t));
|
|
4008
|
+
}, Es = 0.9, Rs = 360, _s = 0.05, Ds = 15, yc = ({ title: e, layout: t = "collapsible", preview: i }) => {
|
|
4009
|
+
const a = N(), o = R(a), r = A(), { Slider: l } = k();
|
|
3826
4010
|
if (!o || o.spec.coords.coordType !== "polar") return null;
|
|
3827
4011
|
const { innerRadius: c, startAngle: s } = o.spec.coords.params, u = (h) => {
|
|
3828
|
-
|
|
4012
|
+
a.commands.dispatch(new Or({ innerRadius: h }), { transient: !0 });
|
|
3829
4013
|
}, d = (h) => {
|
|
3830
|
-
|
|
4014
|
+
a.commands.dispatch(new Nr({ startAngle: h }), { transient: !0 });
|
|
3831
4015
|
};
|
|
3832
|
-
return /* @__PURE__ */ n(
|
|
3833
|
-
title: e ??
|
|
4016
|
+
return /* @__PURE__ */ n(_, {
|
|
4017
|
+
title: e ?? r("editor.graphPanel.polarSection.title"),
|
|
3834
4018
|
layout: t,
|
|
3835
4019
|
preview: i,
|
|
3836
4020
|
children: /* @__PURE__ */ m(F, { children: [/* @__PURE__ */ n(C, {
|
|
3837
|
-
label:
|
|
4021
|
+
label: r("editor.graphPanel.polarSection.innerRadius"),
|
|
3838
4022
|
children: /* @__PURE__ */ n(l, {
|
|
3839
4023
|
value: c,
|
|
3840
4024
|
min: 0,
|
|
3841
|
-
max:
|
|
3842
|
-
step:
|
|
3843
|
-
formatValue:
|
|
4025
|
+
max: Es,
|
|
4026
|
+
step: _s,
|
|
4027
|
+
formatValue: ut,
|
|
3844
4028
|
onChange: u,
|
|
3845
|
-
onCommit:
|
|
4029
|
+
onCommit: a.commands.seal
|
|
3846
4030
|
})
|
|
3847
4031
|
}), /* @__PURE__ */ n(C, {
|
|
3848
|
-
label:
|
|
4032
|
+
label: r("editor.graphPanel.polarSection.startAngle"),
|
|
3849
4033
|
children: /* @__PURE__ */ n(l, {
|
|
3850
4034
|
value: s,
|
|
3851
4035
|
min: 0,
|
|
3852
|
-
max:
|
|
3853
|
-
step:
|
|
3854
|
-
formatValue:
|
|
4036
|
+
max: Rs - 1,
|
|
4037
|
+
step: Ds,
|
|
4038
|
+
formatValue: Nl,
|
|
3855
4039
|
onChange: d,
|
|
3856
|
-
onCommit:
|
|
4040
|
+
onCommit: a.commands.seal
|
|
3857
4041
|
})
|
|
3858
4042
|
})] })
|
|
3859
4043
|
});
|
|
3860
4044
|
};
|
|
3861
4045
|
export {
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
4046
|
+
cc as AppearanceSection,
|
|
4047
|
+
sc as AxesPanel,
|
|
4048
|
+
mn as AxisSection,
|
|
4049
|
+
dc as BarSection,
|
|
4050
|
+
vi as Button,
|
|
4051
|
+
hc as CalloutsSection,
|
|
4052
|
+
wl as CaptionSection,
|
|
4053
|
+
oc as EditableGraphRenderer,
|
|
4054
|
+
dt as EditorPanel,
|
|
4055
|
+
lc as ElementsPanel,
|
|
4056
|
+
uc as GraphOptionsSection,
|
|
4057
|
+
mc as GraphTypeSection,
|
|
4058
|
+
pc as GridSection,
|
|
4059
|
+
gc as HeadlineSection,
|
|
4060
|
+
Vs as IntlProvider,
|
|
4061
|
+
vc as LegendSection,
|
|
4062
|
+
fc as LineSection,
|
|
4063
|
+
yi as NumberField,
|
|
4064
|
+
Cc as NumberFormatSection,
|
|
4065
|
+
il as PANEL_ROOT_ATTRIBUTE,
|
|
4066
|
+
bc as PointSection,
|
|
4067
|
+
yc as PolarSection,
|
|
4068
|
+
Ti as RadioGrid,
|
|
3884
4069
|
C as Row,
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
4070
|
+
_ as Section,
|
|
4071
|
+
Ei as Select,
|
|
4072
|
+
Ki as Slider,
|
|
4073
|
+
Tl as SourceSection,
|
|
4074
|
+
Il as SubtitleSection,
|
|
4075
|
+
qi as Switch,
|
|
4076
|
+
Xi as TextField,
|
|
4077
|
+
Ll as TextSizeSection,
|
|
4078
|
+
Ol as TitleSection,
|
|
4079
|
+
Qi as ToggleGroup,
|
|
4080
|
+
ic as ToggledSection,
|
|
4081
|
+
k as useControls,
|
|
4082
|
+
al as usePanelExpansion,
|
|
4083
|
+
N as usePanelGraph
|
|
3899
4084
|
};
|