@graphysdk/react-renderer 1.9.0-beta.1790263076123 → 1.9.0-beta.1790336418293
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.d.ts +8 -2
- package/dist/editable.mjs +414 -414
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +136 -8
- package/dist/index.mjs +443 -381
- package/dist/{use-target-boundary-4MJrqeJ9.js → use-target-boundary-CfGtWLxx.js} +1467 -1439
- package/dist/use-target-boundary-CfPZiZ0A.cjs +2 -0
- package/package.json +4 -4
- package/dist/use-target-boundary-CfIbCLSH.cjs +0 -2
package/dist/editable.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as ct,
|
|
1
|
+
import { $ as ct, A as dt, Bt as jo, C as Yo, Ct as de, D as Jo, Dt as j, E as Ce, Et as Ge, F as Qo, G as $, Gt as ei, H as ti, I as k, It as ni, J as V, Jt as ri, K as ai, Kt as oi, Lt as Pr, O as ii, Ot as li, P as si, Q as Zt, Qt as Ne, S as ci, St as di, U as ui, W as X, Wt as hi, X as jt, Xt as Ir, Y as Yt, Z as Er, Zt as Jt, _ as Or, a as pi, at as mi, b as gi, bt as vi, ct as re, d as fi, en as bi, et as yi, f as Si, fn as F, g as Qt, gt as Ci, h as xi, ht as E, i as W, it as wi, k as Mr, kt as Ai, l as Nr, m as Rr, mt as Ti, n as ki, nt as Li, on as Dr, ot as wn, p as Pi, pt as Ii, q as An, qt as Ei, r as ue, rn as Oi, s as Mi, sn as Q, st as Ni, t as Ri, tn as Di, tt as _r, u as _i, un as _, ut as en, v as Le, vt as Pe, w as zi, x as zr, xt as Fi, y as Bi, z as Hi } from "./use-target-boundary-CfGtWLxx.js";
|
|
2
2
|
import { n as pe, t as Fr } from "./theme.contract.css-AyXDNf0F.js";
|
|
3
|
-
import { ARROW_DEFAULTS as Gi, ARROW_STICKER_DECLARATIONS as Vi, ARROW_STROKE_WIDTHS_PX as Tt, AddAnnotationCommand as fe, AddHighlightCommand as $i, BORDER_RADIUS_TOKENS as Tn, COMBO_TYPES as kn, CONSTANT_VARIABLES as
|
|
4
|
-
import { createContext as Ve, memo as ta, useCallback as ae, useContext as ze, useEffect as z, useId as
|
|
3
|
+
import { ARROW_DEFAULTS as Gi, ARROW_STICKER_DECLARATIONS as Vi, ARROW_STROKE_WIDTHS_PX as Tt, AddAnnotationCommand as fe, AddHighlightCommand as $i, BORDER_RADIUS_TOKENS as Tn, COMBO_TYPES as kn, CONSTANT_VARIABLES as Wi, DASH_PRESETS as Ui, DEFAULT_BAR_CORNER_RADIUS as Ki, DEFAULT_GEOM_COLOR as qi, DEFAULT_POINT_SIZE_PX as Xi, DEFAULT_STROKE_WIDTH_PX as Zi, DIFFERENCE_ARROW_DEFAULTS as Br, DIFFERENCE_ARROW_SIZE_DECLARATIONS as Ln, InternalError as ji, MAX_BAR_WIDTH_FRACTION as Yi, MIN_BAR_WIDTH_FRACTION as Ji, MoveAnnotationCommand as Qi, RESTING_HOVER_STATE as tn, RemoveAnnotationCommand as _e, RemoveHighlightCommand as el, SHAPE_DEFAULTS as tl, SetAxisLabelCommand as nl, SetAxisPositionCommand as rl, SetAxisTickModeCommand as al, SetAxisTicksVisibilityCommand as ol, SetAxisVisibilityCommand as il, SetBarCornerRadiusCommand as ll, SetBarWidthCommand as sl, SetChartTypeCommand as Hr, SetContentCaptionCommand as Gr, SetContentSourceCommand as cl, SetContentSubtitleCommand as Vr, SetContentTitleCommand as $r, SetDataLabelsFormatCommand as dl, SetDifferenceArrowStyleCommand as ul, SetGridLineStyleCommand as hl, SetGridLineWidthCommand as pl, SetGridVisibilityCommand as ml, SetHeadlineCompareWithCommand as gl, SetHeadlinePositionCommand as vl, SetHeadlineShowCommand as Pn, SetHeadlineSizeCommand as fl, SetHighlightDimStyleCommand as bl, SetLayerYScaleTypeCommand as yl, SetLegendAlignCommand as Sl, SetLegendDisplayCommand as Cl, SetLegendPositionCommand as xl, SetLineCurveCommand as wl, SetLineMissingValuesCommand as Al, SetLineWidthCommand as In, SetMappingCommand as Tl, SetNumberFormatAbbreviationCommand as kl, SetNumberFormatDecimalsCommand as En, SetPointSizeCommand as Ll, SetPolarInnerRadiusCommand as Pl, SetPolarStartAngleCommand as Il, SetRuleLabelCommand as El, SetRuleValueCommand as Ol, SetScaleDomainCommand as kt, SetScaleReverseCommand as Ml, SetScaleTransformCommand as Nl, SetStatLineCommand as Rl, SetStyleRuleCommand as Ae, TEXT_ANNOTATION_DEFAULTS as Dl, TEXT_ANNOTATION_FADE_ALPHA as _l, ToggleCategoryLabelsCommand as zl, ToggleContentVisibilityCommand as ut, ToggleDataLabelsCommand as Fl, ToggleGoalLineCommand as Bl, ToggleLineFillCommand as Hl, ToggleLinePointsCommand as Gl, ToggleStackTotalsCommand as Vl, UpdateAnnotationCommand as ie, alignUnitFractions as $l, areAnchorsEqual as Wr, areEditTargetsEqual as Wl, areEndpointsComparable as Ul, buildEditMenuTriggerRegion as Kl, buildLayerStyleAddress as ql, buildObservationPredicate as Xl, buildObservationsTarget as nn, buildObservationsTargetAtValue as Ur, canAnchorDirectLabels as Zl, canBecomeCombo as jl, canBecomeHeatmap as Yl, clampAnnotationTranslation as Jl, computeArrow as Kr, createObservationAnchorBuilder as Ql, createObservationAnchorParser as es, createStyleResolver as ts, createValueFormatter as ns, filterLayersByGeoms as Mt, findAnnotation as rs, findAverageLineLayer as as, findCompanionLayers as qr, findGoalLineLayer as os, findHighlightsAtObservation as is, findKindStyleDeclarations as ls, findLayerByGeom as Xr, findLayerById as ye, findObservationAttachment as ss, findStyleRule as Se, findTrendLineLayer as cs, formatDifferenceLabel as ds, getBoundingRect as Nt, getX as us, getY as hs, hasMultipleGroups as ps, inferDefaultDifferenceArrowEndpoints as ms, inferDifferenceArrowEndpoints as gs, isComboChartType as we, isCompanionLayer as Zr, isObservationAttachmentKind as vs, isPointWithinEditMenuTrigger as rn, isSafeUrl as fs, isZeroAnchoredAxis as bs, measureObservationsBoxes as jr, projectAnchorToPanel as et, readBroadestObservationsScope as ys, readChartType as Yr, readComboLineLayerId as Ss, readCompanionRowsAtScopeKey as Cs, readConstantValue as xs, readGeomColor as ws, readHighlightDimStyle as As, readMainAxis as Ts, readMappableAesthetics as ks, readMappedVariable as Ls, readObservationIndex as Jr, readRowScopeKey as Ps, readRowsAtScopeKey as Is, readScopeXVariable as Es, readVariableName as Qr, resolveArrowAnnotationStyle as an, resolveBarBandFraction as Os, resolveComparisonBasis as Ms, resolveDifferenceArrowAnnotationStyle as Ns, resolveEditOutlineStyle as Rs, resolveObservationPoint as ea, resolveObservationsTarget as On, stepDifferenceArrowEndpoint as Ds, toDashPreset as Rt, toPaintColor as tt, toPanelCursor as ht } from "@graphysdk/viz-engine";
|
|
4
|
+
import { createContext as Ve, memo as ta, useCallback as ae, useContext as ze, useEffect as z, useId as Te, useLayoutEffect as ke, useMemo as I, useRef as ne, useState as ee } from "react";
|
|
5
5
|
import { Fragment as Y, jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
6
6
|
import { motion as _s } from "motion/react";
|
|
7
7
|
import { useShallow as ge } from "zustand/react/shallow";
|
|
@@ -13,8 +13,8 @@ import { Extension as ra } from "@tiptap/core";
|
|
|
13
13
|
import { Bold as Vs } from "@tiptap/extension-bold";
|
|
14
14
|
import { Document as nt } from "@tiptap/extension-document";
|
|
15
15
|
import { HardBreak as $s } from "@tiptap/extension-hard-break";
|
|
16
|
-
import { Heading as
|
|
17
|
-
import { Italic as
|
|
16
|
+
import { Heading as Ws } from "@tiptap/extension-heading";
|
|
17
|
+
import { Italic as Us } from "@tiptap/extension-italic";
|
|
18
18
|
import { Link as Ks } from "@tiptap/extension-link";
|
|
19
19
|
import { Text as qs } from "@tiptap/extension-text";
|
|
20
20
|
import { TextAlign as Xs } from "@tiptap/extension-text-align";
|
|
@@ -2387,7 +2387,7 @@ import './editable.css';var oc = {
|
|
|
2387
2387
|
"en-US": mc,
|
|
2388
2388
|
ar: sc,
|
|
2389
2389
|
"pt-PT": bc
|
|
2390
|
-
}, Sc = [yc,
|
|
2390
|
+
}, Sc = [yc, Ci], Cc = ({ children: e, ...t }) => /* @__PURE__ */ r(Ti, {
|
|
2391
2391
|
dictionaries: Sc,
|
|
2392
2392
|
...t,
|
|
2393
2393
|
children: e
|
|
@@ -2414,13 +2414,13 @@ import './editable.css';var oc = {
|
|
|
2414
2414
|
}), ln = () => [
|
|
2415
2415
|
qs,
|
|
2416
2416
|
Js,
|
|
2417
|
-
|
|
2417
|
+
Ws.configure({ levels: [
|
|
2418
2418
|
1,
|
|
2419
2419
|
2,
|
|
2420
2420
|
3
|
|
2421
2421
|
] }),
|
|
2422
2422
|
Vs,
|
|
2423
|
-
|
|
2423
|
+
Us,
|
|
2424
2424
|
Ys,
|
|
2425
2425
|
Xs.configure({ types: ["heading", "paragraph"] }),
|
|
2426
2426
|
Ks.configure({
|
|
@@ -2474,7 +2474,7 @@ var ua = "d0bl03", Pc = "d0bl04", ha = "d0bl05", Dt = "d0bl06", Ic = "d0bl07", E
|
|
|
2474
2474
|
})]
|
|
2475
2475
|
})
|
|
2476
2476
|
})
|
|
2477
|
-
}), ma = "transparent", _t = Fr.map((e) => pe[e]), $c = Object.fromEntries(Fr.map((e) => [pe[e], e])),
|
|
2477
|
+
}), ma = "transparent", _t = Fr.map((e) => pe[e]), $c = Object.fromEntries(Fr.map((e) => [pe[e], e])), Wc = (e) => _t.some((t) => va(t, e)), Uc = ({ color: e, onChange: t, isOpen: n, onOpenChange: a, children: o, label: i, popupAttributes: l, opacity: s, onOpacityChange: c, hasTransparentOption: u = !1 }) => {
|
|
2478
2478
|
const d = E(), h = qc(), p = u ? [ma, ..._t] : _t, g = (v) => {
|
|
2479
2479
|
t(v), a(!1);
|
|
2480
2480
|
};
|
|
@@ -2558,7 +2558,7 @@ var ua = "d0bl03", Pc = "d0bl04", ha = "d0bl05", Dt = "d0bl06", Ic = "d0bl07", E
|
|
|
2558
2558
|
})]
|
|
2559
2559
|
});
|
|
2560
2560
|
}, Kc = ({ value: e, onChange: t, popupAttributes: n }) => {
|
|
2561
|
-
const a = E(), [o, i] = ee(!1), l =
|
|
2561
|
+
const a = E(), [o, i] = ee(!1), l = ri(e) ? e : "#000000", s = Xc(l);
|
|
2562
2562
|
return /* @__PURE__ */ m(Z.Root, {
|
|
2563
2563
|
open: o,
|
|
2564
2564
|
onOpenChange: i,
|
|
@@ -2628,10 +2628,10 @@ var ua = "d0bl03", Pc = "d0bl04", ha = "d0bl05", Dt = "d0bl06", Ic = "d0bl07", E
|
|
|
2628
2628
|
border: `1px solid ${pe.border100}`
|
|
2629
2629
|
} : {
|
|
2630
2630
|
background: e,
|
|
2631
|
-
border: `1px solid ${
|
|
2631
|
+
border: `1px solid ${oi(e, 0.1)}`
|
|
2632
2632
|
}, Xc = (e) => {
|
|
2633
2633
|
const { themeValues: t } = en();
|
|
2634
|
-
if (
|
|
2634
|
+
if (Ei(e)) return e.toUpperCase();
|
|
2635
2635
|
const n = $c[e];
|
|
2636
2636
|
return n ? t[n].toUpperCase() : "#000000";
|
|
2637
2637
|
}, va = (e, t) => t === null ? !1 : e.toLowerCase() === t.toLowerCase(), Zc = "l9kff0", jc = "l9kff1", Yc = "l9kff2", Jc = "xn24px0", Qc = "xn24px1", ed = "xn24px2", td = ({ children: e, popupAttributes: t }) => /* @__PURE__ */ r(B.Portal, {
|
|
@@ -2672,7 +2672,7 @@ var ua = "d0bl03", Pc = "d0bl04", ha = "d0bl05", Dt = "d0bl06", Ic = "d0bl07", E
|
|
|
2672
2672
|
Group: ad,
|
|
2673
2673
|
Separator: od,
|
|
2674
2674
|
Button: ve.Button,
|
|
2675
|
-
ColorPicker:
|
|
2675
|
+
ColorPicker: Uc,
|
|
2676
2676
|
MenuPopup: td,
|
|
2677
2677
|
MenuItem: nd
|
|
2678
2678
|
}, $e = (e) => /* @__PURE__ */ r(k, {
|
|
@@ -3147,7 +3147,7 @@ var ua = "d0bl03", Pc = "d0bl04", ha = "d0bl05", Dt = "d0bl06", Ic = "d0bl07", E
|
|
|
3147
3147
|
"aria-label": t
|
|
3148
3148
|
})]
|
|
3149
3149
|
}), Fd = 200, sn = ({ content: e, extensions: t, isEditable: n, onUpdate: a, updateDebounceMs: o = Fd }) => {
|
|
3150
|
-
const i = ne(Fn(e)), l = ne(i.current), s =
|
|
3150
|
+
const i = ne(Fn(e)), l = ne(i.current), s = Fi((u) => {
|
|
3151
3151
|
l.current = u, a?.(u);
|
|
3152
3152
|
}, o), c = Qs({
|
|
3153
3153
|
extensions: t,
|
|
@@ -3213,7 +3213,7 @@ var ua = "d0bl03", Pc = "d0bl04", ha = "d0bl05", Dt = "d0bl06", Ic = "d0bl07", E
|
|
|
3213
3213
|
nt,
|
|
3214
3214
|
oa,
|
|
3215
3215
|
...ln(),
|
|
3216
|
-
|
|
3216
|
+
Wd,
|
|
3217
3217
|
on.configure({
|
|
3218
3218
|
showOnlyCurrent: !1,
|
|
3219
3219
|
placeholder: ({ pos: t }) => t === 0 ? e : ""
|
|
@@ -3238,14 +3238,14 @@ var ua = "d0bl03", Pc = "d0bl04", ha = "d0bl05", Dt = "d0bl06", Ic = "d0bl07", E
|
|
|
3238
3238
|
i?.commands.focus("end", { scrollIntoView: !1 });
|
|
3239
3239
|
}, [i]), /* @__PURE__ */ r(ia, {
|
|
3240
3240
|
"aria-label": t("graph.annotations.text.editLabel"),
|
|
3241
|
-
className:
|
|
3241
|
+
className: Pi,
|
|
3242
3242
|
editor: i,
|
|
3243
3243
|
"data-testid": "text-annotation-editor"
|
|
3244
3244
|
});
|
|
3245
3245
|
}, Bn = (e) => {
|
|
3246
3246
|
const t = Ni(e);
|
|
3247
3247
|
return t === void 0 ? {} : { style: `font-family: ${t}` };
|
|
3248
|
-
},
|
|
3248
|
+
}, Wd = ra.create({
|
|
3249
3249
|
name: "annotationTextStyleAttributes",
|
|
3250
3250
|
addGlobalAttributes() {
|
|
3251
3251
|
return [{
|
|
@@ -3266,11 +3266,11 @@ var ua = "d0bl03", Pc = "d0bl04", ha = "d0bl05", Dt = "d0bl06", Ic = "d0bl07", E
|
|
|
3266
3266
|
}
|
|
3267
3267
|
}];
|
|
3268
3268
|
}
|
|
3269
|
-
}),
|
|
3269
|
+
}), Ud = 3, Kd = ({ title: e, isTitleVisible: t, subtitle: n, isSubtitleVisible: a }) => {
|
|
3270
3270
|
const o = [];
|
|
3271
3271
|
return t && o.push({
|
|
3272
3272
|
type: "heading",
|
|
3273
|
-
attrs: { level:
|
|
3273
|
+
attrs: { level: Ud },
|
|
3274
3274
|
content: Xd(e)
|
|
3275
3275
|
}), a && o.push(...Zd(n)), {
|
|
3276
3276
|
type: "doc",
|
|
@@ -3355,7 +3355,7 @@ var ua = "d0bl03", Pc = "d0bl04", ha = "d0bl05", Dt = "d0bl06", Ic = "d0bl07", E
|
|
|
3355
3355
|
"data-testid": "title-editor",
|
|
3356
3356
|
style: {
|
|
3357
3357
|
...Pr(o),
|
|
3358
|
-
...
|
|
3358
|
+
...ni(Jd, i)
|
|
3359
3359
|
},
|
|
3360
3360
|
children: /* @__PURE__ */ r(La, {
|
|
3361
3361
|
editor: c,
|
|
@@ -3501,7 +3501,7 @@ var su = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
3501
3501
|
return g.from < g.to ? g : p;
|
|
3502
3502
|
}, pu = (e) => {
|
|
3503
3503
|
const [t] = e;
|
|
3504
|
-
return t !== void 0 && e.some((n) => !
|
|
3504
|
+
return t !== void 0 && e.some((n) => !Ai(n, t));
|
|
3505
3505
|
}, Ft = (e) => ({
|
|
3506
3506
|
from: e.x,
|
|
3507
3507
|
to: e.x + e.width
|
|
@@ -3510,7 +3510,7 @@ var su = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
3510
3510
|
to: e.y + e.height
|
|
3511
3511
|
}), mu = (e, { frameElement: t, panelRect: n, look: a }) => {
|
|
3512
3512
|
const o = $(), i = Q(), l = _((h) => h.coordSystem), s = ne(/* @__PURE__ */ new Map()), c = e?.target ?? null, u = e?.outline ?? null;
|
|
3513
|
-
|
|
3513
|
+
ke(() => {
|
|
3514
3514
|
if (c === null || u === null) return;
|
|
3515
3515
|
const h = s.current, p = /* @__PURE__ */ new Map(), v = au(u, {
|
|
3516
3516
|
panelRect: n,
|
|
@@ -3546,8 +3546,8 @@ var su = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
3546
3546
|
a
|
|
3547
3547
|
]);
|
|
3548
3548
|
const d = e !== null;
|
|
3549
|
-
|
|
3550
|
-
}, gu = "var(--_10d2ycx0)", vu = "_10d2ycx1", fu = "_10d2ycx2",
|
|
3549
|
+
ke(() => d ? () => o.getState().setSelectedOutline(null) : void 0, [o, d]);
|
|
3550
|
+
}, gu = "var(--_10d2ycx0)", vu = "_10d2ycx1", fu = "_10d2ycx2", Wn = ({ pathData: e, shouldAnimateTransitions: t, source: n, ...a }) => t ? /* @__PURE__ */ r(bu, {
|
|
3551
3551
|
pathData: e,
|
|
3552
3552
|
source: n,
|
|
3553
3553
|
...a
|
|
@@ -3555,7 +3555,7 @@ var su = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
3555
3555
|
d: e,
|
|
3556
3556
|
...a
|
|
3557
3557
|
}), bu = ({ pathData: e, source: t, ...n }) => {
|
|
3558
|
-
const a =
|
|
3558
|
+
const a = bi(e, Di, t);
|
|
3559
3559
|
return /* @__PURE__ */ r(_s.path, {
|
|
3560
3560
|
d: a,
|
|
3561
3561
|
...n
|
|
@@ -3564,13 +3564,13 @@ var su = (e, { coordSystem: t, panelRect: n }) => {
|
|
|
3564
3564
|
[Su]: "",
|
|
3565
3565
|
style: pt({ [yu]: `${e}px` })
|
|
3566
3566
|
});
|
|
3567
|
-
var
|
|
3567
|
+
var Un = (e, t) => {
|
|
3568
3568
|
if (e.kind === "observations" && t.kind === "observations") {
|
|
3569
3569
|
if (e.layerId !== t.layerId || e.scope !== t.scope) return !1;
|
|
3570
3570
|
const n = e.parts[0]?.rows[0];
|
|
3571
3571
|
return n !== void 0 && (t.parts[0]?.rows.includes(n) ?? !1);
|
|
3572
3572
|
}
|
|
3573
|
-
return e.kind === "guide" && t.kind === "guide" ?
|
|
3573
|
+
return e.kind === "guide" && t.kind === "guide" ? Wl(e.target, t.target) : e.kind === "graph" && t.kind === "graph";
|
|
3574
3574
|
}, Cu = (e, t) => {
|
|
3575
3575
|
const n = Math.max(e.width, 8), a = Math.max(e.height, 8), o = Math.max(0, e.x + e.width / 2 - n / 2), i = Math.max(0, e.y + e.height / 2 - a / 2), l = Math.min(t.width, e.x + e.width / 2 + n / 2), s = Math.min(t.height, e.y + e.height / 2 + a / 2);
|
|
3576
3576
|
return {
|
|
@@ -3583,12 +3583,12 @@ var Wn = (e, t) => {
|
|
|
3583
3583
|
const { layers: t, parsingLocale: n } = _(ge((h) => ({
|
|
3584
3584
|
layers: h.layers,
|
|
3585
3585
|
parsingLocale: h.config.parsingLocale
|
|
3586
|
-
}))), a = X((h) => h.editTargetUnderPointer), o = a?.kind === "observations" ? a.observations : null, i = o === null ? void 0 :
|
|
3586
|
+
}))), a = X((h) => h.editTargetUnderPointer), o = a?.kind === "observations" ? a.observations : null, i = o === null ? void 0 : ye(t, o.layerId), l = o?.target.scope ?? null, s = o === null || i === void 0 ? null : Ps(i, o.target.scope, o.observationIndex), c = I(() => i === void 0 || l === null || s === null ? null : Au(t, i, l, s), [
|
|
3587
3587
|
t,
|
|
3588
3588
|
i,
|
|
3589
3589
|
l,
|
|
3590
3590
|
s
|
|
3591
|
-
]), u = I(() => c !== null && e !== null &&
|
|
3591
|
+
]), u = I(() => c !== null && e !== null && Un(c, e), [c, e]), d = o !== null && i !== void 0 && Tu(o, i, n) ? o.observationIndex : null;
|
|
3592
3592
|
return I(() => {
|
|
3593
3593
|
switch (a?.kind) {
|
|
3594
3594
|
case "observations": {
|
|
@@ -3615,7 +3615,7 @@ var Wn = (e, t) => {
|
|
|
3615
3615
|
key: JSON.stringify(a.target),
|
|
3616
3616
|
target: a.target
|
|
3617
3617
|
};
|
|
3618
|
-
return e !== null &&
|
|
3618
|
+
return e !== null && Un(h, e) ? null : h;
|
|
3619
3619
|
}
|
|
3620
3620
|
default:
|
|
3621
3621
|
return null;
|
|
@@ -3633,7 +3633,7 @@ var Wn = (e, t) => {
|
|
|
3633
3633
|
rows: Is(t, n, a)
|
|
3634
3634
|
}];
|
|
3635
3635
|
for (const i of qr(t, e)) {
|
|
3636
|
-
const l =
|
|
3636
|
+
const l = Cs(i, t, n, a);
|
|
3637
3637
|
l.length > 0 && o.push({
|
|
3638
3638
|
layer: i,
|
|
3639
3639
|
rows: l
|
|
@@ -3682,12 +3682,12 @@ var Wn = (e, t) => {
|
|
|
3682
3682
|
});
|
|
3683
3683
|
}
|
|
3684
3684
|
}, Lu = (e) => {
|
|
3685
|
-
const t = `[${
|
|
3685
|
+
const t = `[${ii}="${e.kind}"]`;
|
|
3686
3686
|
return e.kind !== "axis" ? t : `${t}[${Jo}="${e.axis}"]`;
|
|
3687
3687
|
}, Pu = (e) => {
|
|
3688
3688
|
const t = /* @__PURE__ */ new Map();
|
|
3689
3689
|
for (const n of e) {
|
|
3690
|
-
const a =
|
|
3690
|
+
const a = si(n);
|
|
3691
3691
|
a !== null && t.set(a.legendIndex, [...t.get(a.legendIndex) ?? [], n]);
|
|
3692
3692
|
}
|
|
3693
3693
|
return t;
|
|
@@ -3750,7 +3750,7 @@ var Wn = (e, t) => {
|
|
|
3750
3750
|
const t = (n) => Number(e?.getAttribute(n) ?? 0);
|
|
3751
3751
|
return (t("x2") - t("x1")) * (t("y2") - t("y1")) >= 0;
|
|
3752
3752
|
}, Mu = [], Nu = (e, { frameElement: t, frameSize: n, panelRect: a, shouldAnimateTransitions: o }) => {
|
|
3753
|
-
const i = _((f) => f.coordSystem), l =
|
|
3753
|
+
const i = _((f) => f.coordSystem), l = jo(), s = Dr(), c = Du(e.kind === "guide" ? e.target : null, {
|
|
3754
3754
|
frameElement: t,
|
|
3755
3755
|
frameSize: n
|
|
3756
3756
|
}), u = Ru(t, n), d = I(() => ({
|
|
@@ -3797,7 +3797,7 @@ var Wn = (e, t) => {
|
|
|
3797
3797
|
]);
|
|
3798
3798
|
}, Ru = (e, t) => {
|
|
3799
3799
|
const [n, a] = ee(() => Gn(e, t));
|
|
3800
|
-
return
|
|
3800
|
+
return ke(() => {
|
|
3801
3801
|
a((o) => {
|
|
3802
3802
|
const i = Gn(e, {
|
|
3803
3803
|
width: t.width,
|
|
@@ -3839,7 +3839,7 @@ var Wn = (e, t) => {
|
|
|
3839
3839
|
};
|
|
3840
3840
|
}, Du = (e, { frameElement: t, frameSize: n }) => {
|
|
3841
3841
|
const a = _((d) => d.coordSystem.type), o = _(ge((d) => d.guides.legends.drawn.map((h) => h.display))), i = _((d) => e === null ? null : d), [l, s] = ee([]), c = j(e), u = ne(!1);
|
|
3842
|
-
return
|
|
3842
|
+
return ke(() => {
|
|
3843
3843
|
const d = c.current;
|
|
3844
3844
|
if (d === null) return;
|
|
3845
3845
|
const h = () => {
|
|
@@ -3932,7 +3932,7 @@ var Wn = (e, t) => {
|
|
|
3932
3932
|
return null;
|
|
3933
3933
|
}
|
|
3934
3934
|
}, Bu = (e, t, n) => {
|
|
3935
|
-
const a =
|
|
3935
|
+
const a = ye(t, e.layerId);
|
|
3936
3936
|
if (a === void 0) return null;
|
|
3937
3937
|
const o = On({
|
|
3938
3938
|
layer: a,
|
|
@@ -3992,7 +3992,7 @@ var Wn = (e, t) => {
|
|
|
3992
3992
|
}, l.key)]
|
|
3993
3993
|
});
|
|
3994
3994
|
}), qn = ({ part: e, target: t, look: n, frameSize: a, panelRect: o, frameElement: i, shouldAnimateTransitions: l }) => {
|
|
3995
|
-
const s =
|
|
3995
|
+
const s = Te(), c = `${s}-shapes`, u = `${s}-hole`, d = Nu(t, {
|
|
3996
3996
|
frameElement: i,
|
|
3997
3997
|
frameSize: a,
|
|
3998
3998
|
panelRect: o,
|
|
@@ -4054,7 +4054,7 @@ var Wn = (e, t) => {
|
|
|
4054
4054
|
...pt({ [gu]: `${2 * t}px` })
|
|
4055
4055
|
}), Vu = (e, t, n) => {
|
|
4056
4056
|
const a = n.offset + mt(n);
|
|
4057
|
-
return
|
|
4057
|
+
return Jt(Ne({
|
|
4058
4058
|
x: 0,
|
|
4059
4059
|
y: 0,
|
|
4060
4060
|
...e
|
|
@@ -4083,18 +4083,18 @@ var Wn = (e, t) => {
|
|
|
4083
4083
|
return /* @__PURE__ */ r("path", { d: Vu(e.frameSize, a, t) });
|
|
4084
4084
|
}
|
|
4085
4085
|
}, Zn = ta(function({ part: t, borderRadius: n }) {
|
|
4086
|
-
return t.kind === "boxes" ? /* @__PURE__ */ r(
|
|
4086
|
+
return t.kind === "boxes" ? /* @__PURE__ */ r(Uu, {
|
|
4087
4087
|
boxes: t.boxes,
|
|
4088
4088
|
borderRadius: n
|
|
4089
|
-
}) : /* @__PURE__ */ r(
|
|
4089
|
+
}) : /* @__PURE__ */ r(Wu, {
|
|
4090
4090
|
shapes: t.shapes,
|
|
4091
4091
|
layer: t.layer
|
|
4092
4092
|
});
|
|
4093
|
-
}),
|
|
4093
|
+
}), Wu = ({ shapes: e, layer: t }) => e.map((n, a) => {
|
|
4094
4094
|
const o = n.kind === "dots" || n.key === void 0 ? String(a) : `${n.kind}:${n.key}`;
|
|
4095
4095
|
switch (n.kind) {
|
|
4096
4096
|
case "region":
|
|
4097
|
-
return n.pathData === "" ? null : /* @__PURE__ */ r(
|
|
4097
|
+
return n.pathData === "" ? null : /* @__PURE__ */ r(Wn, {
|
|
4098
4098
|
pathData: n.pathData,
|
|
4099
4099
|
fillRule: n.fillRule,
|
|
4100
4100
|
shouldAnimateTransitions: n.shouldAnimateTransitions ?? !1,
|
|
@@ -4102,7 +4102,7 @@ var Wn = (e, t) => {
|
|
|
4102
4102
|
"data-geom": t.geom
|
|
4103
4103
|
}, o);
|
|
4104
4104
|
case "stroke":
|
|
4105
|
-
return n.pathData === "" ? null : /* @__PURE__ */ r(
|
|
4105
|
+
return n.pathData === "" ? null : /* @__PURE__ */ r(Wn, {
|
|
4106
4106
|
pathData: n.pathData,
|
|
4107
4107
|
shouldAnimateTransitions: n.shouldAnimateTransitions ?? !1,
|
|
4108
4108
|
source: t,
|
|
@@ -4111,13 +4111,13 @@ var Wn = (e, t) => {
|
|
|
4111
4111
|
}, o);
|
|
4112
4112
|
case "dots":
|
|
4113
4113
|
return n.centers.length === 0 ? null : /* @__PURE__ */ r("path", {
|
|
4114
|
-
d:
|
|
4114
|
+
d: Oi(n.centers),
|
|
4115
4115
|
"data-geom": t.geom,
|
|
4116
4116
|
...Ht(n.size)
|
|
4117
4117
|
}, o);
|
|
4118
4118
|
}
|
|
4119
|
-
}),
|
|
4120
|
-
const n = e.map((a) =>
|
|
4119
|
+
}), Uu = ({ boxes: e, borderRadius: t }) => {
|
|
4120
|
+
const n = e.map((a) => Jt(a, t)).join("");
|
|
4121
4121
|
return n === "" ? null : /* @__PURE__ */ r("path", {
|
|
4122
4122
|
d: n,
|
|
4123
4123
|
"data-testid": "edit-outline-boxes"
|
|
@@ -4131,7 +4131,7 @@ var Wn = (e, t) => {
|
|
|
4131
4131
|
...Ht(Nr(a, i).strokeWidth)
|
|
4132
4132
|
}, i);
|
|
4133
4133
|
});
|
|
4134
|
-
const o = t.map((i) => i.kind === "box" ?
|
|
4134
|
+
const o = t.map((i) => i.kind === "box" ? Jt(i.rect, n) : "").join("");
|
|
4135
4135
|
return o === "" ? null : /* @__PURE__ */ r("path", { d: o });
|
|
4136
4136
|
}, qu = (e, t) => {
|
|
4137
4137
|
if (e.kind === "box" || e.axis !== t) return "";
|
|
@@ -4154,7 +4154,7 @@ var Wn = (e, t) => {
|
|
|
4154
4154
|
height: n.height,
|
|
4155
4155
|
overflow: "visible",
|
|
4156
4156
|
children: /* @__PURE__ */ r("line", {
|
|
4157
|
-
...
|
|
4157
|
+
...zi(a, i, n),
|
|
4158
4158
|
stroke: t.stroke,
|
|
4159
4159
|
strokeWidth: t.strokeWidth,
|
|
4160
4160
|
strokeDasharray: "4 3",
|
|
@@ -4164,7 +4164,7 @@ var Wn = (e, t) => {
|
|
|
4164
4164
|
});
|
|
4165
4165
|
}, Zu = ({ layer: e, rows: t }) => {
|
|
4166
4166
|
for (const n of t) {
|
|
4167
|
-
const a = e.data.getAt(n), o = a === null ? null :
|
|
4167
|
+
const a = e.data.getAt(n), o = a === null ? null : us(a), i = a === null ? null : hs(a);
|
|
4168
4168
|
if (o !== null && i !== null) return {
|
|
4169
4169
|
x: o,
|
|
4170
4170
|
y: i
|
|
@@ -4201,7 +4201,7 @@ var Wn = (e, t) => {
|
|
|
4201
4201
|
return z(() => {
|
|
4202
4202
|
t(!0);
|
|
4203
4203
|
}, []), e;
|
|
4204
|
-
}, rh = (e) =>
|
|
4204
|
+
}, rh = (e) => li.some((t) => t === e), jn = (e, t, n) => n === 0 ? 0 : e * t / n, ah = {
|
|
4205
4205
|
x: 8,
|
|
4206
4206
|
y: 8
|
|
4207
4207
|
}, oh = {
|
|
@@ -4210,7 +4210,7 @@ var Wn = (e, t) => {
|
|
|
4210
4210
|
fallbackAxisSide: "end"
|
|
4211
4211
|
}, ih = ({ frameElement: e, boundary: t, spans: n, clearance: a = ah, onEscape: o, children: i }) => {
|
|
4212
4212
|
const l = vt(), s = Ra(), [c, u] = ee(null), d = ne(null);
|
|
4213
|
-
|
|
4213
|
+
ke(() => () => {
|
|
4214
4214
|
c?.contains(document.activeElement) && e.focus({ preventScroll: !0 });
|
|
4215
4215
|
}, [c, e]);
|
|
4216
4216
|
const { x: h, y: p, width: g, height: v } = t, f = I(() => ({
|
|
@@ -4338,9 +4338,9 @@ var Wn = (e, t) => {
|
|
|
4338
4338
|
a,
|
|
4339
4339
|
o
|
|
4340
4340
|
]);
|
|
4341
|
-
return
|
|
4341
|
+
return ke(() => {
|
|
4342
4342
|
t.getState().setBoundary(i);
|
|
4343
|
-
}, [t, i]),
|
|
4343
|
+
}, [t, i]), ke(() => () => t.getState().setBoundary(null), [t]), null;
|
|
4344
4344
|
}, Xe = (e, t, n) => ({
|
|
4345
4345
|
from: t + e.from * n,
|
|
4346
4346
|
to: t + e.to * n
|
|
@@ -4472,7 +4472,7 @@ var _a = "efjmb40", za = "efjmb41", Ie = "efjmb42", Ee = "efjmb43", mh = "efjmb4
|
|
|
4472
4472
|
fillOpacity: "0.8"
|
|
4473
4473
|
})
|
|
4474
4474
|
}), Ah = "relative-difference", Th = ({ label: e, layer: t, at: n, onRequestClose: a }) => {
|
|
4475
|
-
const { dispatch: o } = ue(), i = _((c) => c.coordSystem), l = I(() =>
|
|
4475
|
+
const { dispatch: o } = ue(), i = _((c) => c.coordSystem), l = I(() => gs({
|
|
4476
4476
|
layer: t,
|
|
4477
4477
|
at: n,
|
|
4478
4478
|
coordSystem: i
|
|
@@ -4506,7 +4506,7 @@ function kh(e, t) {
|
|
|
4506
4506
|
scope: "series",
|
|
4507
4507
|
labelKey: "pieSlice"
|
|
4508
4508
|
}];
|
|
4509
|
-
const n =
|
|
4509
|
+
const n = ps(t.data, t.mapping);
|
|
4510
4510
|
switch (t.geom) {
|
|
4511
4511
|
case "bar": {
|
|
4512
4512
|
const a = [{
|
|
@@ -4552,7 +4552,7 @@ function kh(e, t) {
|
|
|
4552
4552
|
}
|
|
4553
4553
|
var Lh = (e) => {
|
|
4554
4554
|
const t = Qr(e.mapping.x);
|
|
4555
|
-
return t !== null && t !==
|
|
4555
|
+
return t !== null && t !== Wi.x;
|
|
4556
4556
|
}, Ph = (e) => /* @__PURE__ */ m(k, {
|
|
4557
4557
|
viewBox: "0 0 16 16",
|
|
4558
4558
|
...e,
|
|
@@ -4998,7 +4998,7 @@ var Lh = (e) => {
|
|
|
4998
4998
|
});
|
|
4999
4999
|
}, $h = (e, t) => {
|
|
5000
5000
|
const n = _((o) => o.spec.highlights), a = _((o) => o.config.parsingLocale);
|
|
5001
|
-
return I(() =>
|
|
5001
|
+
return I(() => is({
|
|
5002
5002
|
layer: e,
|
|
5003
5003
|
highlights: n,
|
|
5004
5004
|
observation: t,
|
|
@@ -5032,7 +5032,7 @@ var Lh = (e) => {
|
|
|
5032
5032
|
fillOpacity: "0.8"
|
|
5033
5033
|
})
|
|
5034
5034
|
]
|
|
5035
|
-
}),
|
|
5035
|
+
}), Wh = ({ label: e, at: t, onRequestClose: n }) => {
|
|
5036
5036
|
const { dispatch: a } = ue(), o = () => {
|
|
5037
5037
|
a(new fe({
|
|
5038
5038
|
kind: "pinnedNumber",
|
|
@@ -5094,7 +5094,7 @@ var Lh = (e) => {
|
|
|
5094
5094
|
labelKey: "graph.annotations.baseMenu.removeSticker"
|
|
5095
5095
|
},
|
|
5096
5096
|
image: null
|
|
5097
|
-
},
|
|
5097
|
+
}, Uh = (e) => vs(e.kind) && $a[e.kind] !== null, Kh = ({ attachment: e, onRequestClose: t }) => {
|
|
5098
5098
|
const n = E(), { dispatch: a } = ue(), { icon: o, labelKey: i } = $a[e.kind], l = () => {
|
|
5099
5099
|
a(new _e({ id: e.annotation.id })), t();
|
|
5100
5100
|
};
|
|
@@ -5124,7 +5124,7 @@ var Lh = (e) => {
|
|
|
5124
5124
|
icon: /* @__PURE__ */ r(Va, {}),
|
|
5125
5125
|
children: /* @__PURE__ */ r("div", {
|
|
5126
5126
|
className: qh,
|
|
5127
|
-
children: Object.entries(
|
|
5127
|
+
children: Object.entries(_i).map(([i, l]) => /* @__PURE__ */ r(be.Item, {
|
|
5128
5128
|
className: Xh,
|
|
5129
5129
|
"aria-label": i,
|
|
5130
5130
|
onClick: () => o(i),
|
|
@@ -5167,8 +5167,8 @@ var Lh = (e) => {
|
|
|
5167
5167
|
p,
|
|
5168
5168
|
g,
|
|
5169
5169
|
v
|
|
5170
|
-
]), x =
|
|
5171
|
-
!C && Qh(
|
|
5170
|
+
]), x = ss(c, a, I(() => es(n, u), [n, u])), w = x !== null && Uh(x) ? x : null, y = $h(n, o), T = (C, O) => {
|
|
5171
|
+
!C && Qh(O.reason) && i();
|
|
5172
5172
|
};
|
|
5173
5173
|
return /* @__PURE__ */ r(B.Root, {
|
|
5174
5174
|
open: d,
|
|
@@ -5198,7 +5198,7 @@ var Lh = (e) => {
|
|
|
5198
5198
|
}),
|
|
5199
5199
|
/* @__PURE__ */ r(B.Separator, { className: mh }),
|
|
5200
5200
|
w === null && /* @__PURE__ */ m(Y, { children: [
|
|
5201
|
-
/* @__PURE__ */ r(
|
|
5201
|
+
/* @__PURE__ */ r(Wh, {
|
|
5202
5202
|
label: l("graph.annotations.baseMenu.pinNumber"),
|
|
5203
5203
|
at: a,
|
|
5204
5204
|
onRequestClose: i
|
|
@@ -5234,7 +5234,7 @@ var Lh = (e) => {
|
|
|
5234
5234
|
}) })
|
|
5235
5235
|
})
|
|
5236
5236
|
});
|
|
5237
|
-
}, Qh = (e) => e === "outside-press" || e === "escape-key" || e === "item-press", hn = "l8tsqe0",
|
|
5237
|
+
}, Qh = (e) => e === "outside-press" || e === "escape-key" || e === "item-press", hn = "l8tsqe0", Wa = ["start", "end"], Ua = ({ anchor: e, point: t, delta: n }) => {
|
|
5238
5238
|
const a = {
|
|
5239
5239
|
x: Yn(t.x, n.x),
|
|
5240
5240
|
y: Yn(1 - t.y, n.y)
|
|
@@ -5271,7 +5271,7 @@ var Lh = (e) => {
|
|
|
5271
5271
|
height: Math.abs(o.y - a.y)
|
|
5272
5272
|
};
|
|
5273
5273
|
}, Yn = (e, t) => !Number.isFinite(t) || !Number.isFinite(e) ? 0 : De(t, Math.min(-e, 0), Math.max(1 - e, 0)), n1 = ({ panelRect: e }) => {
|
|
5274
|
-
const t = X((s) => V(s, "arrow-endpoint-drag")), n =
|
|
5274
|
+
const t = X((s) => V(s, "arrow-endpoint-drag")), n = Le(e).arrows, a = Q();
|
|
5275
5275
|
if (t === null) return null;
|
|
5276
5276
|
const o = n.find((s) => s.id === t.annotationId);
|
|
5277
5277
|
if (o === void 0) return null;
|
|
@@ -5298,7 +5298,7 @@ var Lh = (e) => {
|
|
|
5298
5298
|
isAddressable: !1
|
|
5299
5299
|
})
|
|
5300
5300
|
});
|
|
5301
|
-
},
|
|
5301
|
+
}, We = () => {
|
|
5302
5302
|
const e = Qt();
|
|
5303
5303
|
return Vt(e);
|
|
5304
5304
|
}, Vt = (e) => {
|
|
@@ -5449,7 +5449,7 @@ var Lh = (e) => {
|
|
|
5449
5449
|
className: u1,
|
|
5450
5450
|
onClick: n,
|
|
5451
5451
|
children: a
|
|
5452
|
-
}),
|
|
5452
|
+
}), R = {
|
|
5453
5453
|
Root: m1,
|
|
5454
5454
|
Dropdown: g1,
|
|
5455
5455
|
MenuItem: q.MenuItem,
|
|
@@ -5556,20 +5556,20 @@ var k1 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
5556
5556
|
...g,
|
|
5557
5557
|
part: "outline"
|
|
5558
5558
|
}), [g]), f = (S, b) => {
|
|
5559
|
-
const
|
|
5560
|
-
s.dispatch(new
|
|
5559
|
+
const U = Se(c, { select: g })?.declarations ?? {};
|
|
5560
|
+
s.dispatch(new Ae({
|
|
5561
5561
|
list: "overrides",
|
|
5562
5562
|
rule: {
|
|
5563
5563
|
select: g,
|
|
5564
5564
|
declarations: {
|
|
5565
|
-
...
|
|
5565
|
+
...U,
|
|
5566
5566
|
...S
|
|
5567
5567
|
}
|
|
5568
5568
|
}
|
|
5569
5569
|
}), b);
|
|
5570
5570
|
}, x = (S) => {
|
|
5571
|
-
const b =
|
|
5572
|
-
s.dispatch(new
|
|
5571
|
+
const b = Se(c, { select: v })?.declarations ?? {};
|
|
5572
|
+
s.dispatch(new Ae({
|
|
5573
5573
|
list: "overrides",
|
|
5574
5574
|
rule: {
|
|
5575
5575
|
select: v,
|
|
@@ -5589,11 +5589,11 @@ var k1 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
5589
5589
|
})), u.close();
|
|
5590
5590
|
}, T = () => {
|
|
5591
5591
|
s.dispatch(new _e({ id: e.id })), i.focus({ preventScroll: !0 });
|
|
5592
|
-
}, C = (S) => f({ stroke: S }, { transient: !0 }),
|
|
5592
|
+
}, C = (S) => f({ stroke: S }, { transient: !0 }), O = (S) => w({ strokeWidth: S }), L = (S) => y({ startArrowheadStyle: S }), M = (S) => w({ dashArray: Ui.arrow[S] }), D = (S) => y({ endArrowheadStyle: S }), N = () => x(p ? {
|
|
5593
5593
|
strokeWidth: 0,
|
|
5594
5594
|
shadow: "none"
|
|
5595
5595
|
} : Vi);
|
|
5596
|
-
return /* @__PURE__ */ m(
|
|
5596
|
+
return /* @__PURE__ */ m(R.Root, {
|
|
5597
5597
|
anchorBox: t,
|
|
5598
5598
|
panelRect: n,
|
|
5599
5599
|
frameWidth: a,
|
|
@@ -5601,14 +5601,14 @@ var k1 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
5601
5601
|
label: l("graph.annotations.arrowToolbar.label"),
|
|
5602
5602
|
testId: "arrow-toolbar",
|
|
5603
5603
|
children: [
|
|
5604
|
-
/* @__PURE__ */ r(
|
|
5604
|
+
/* @__PURE__ */ r(R.ColorPicker, {
|
|
5605
5605
|
color: d.stroke,
|
|
5606
5606
|
label: l("graph.annotations.arrowToolbar.color"),
|
|
5607
5607
|
onChange: C,
|
|
5608
5608
|
...u.bind("color"),
|
|
5609
|
-
children: /* @__PURE__ */ r(
|
|
5609
|
+
children: /* @__PURE__ */ r(R.Swatch, { color: d.stroke })
|
|
5610
5610
|
}),
|
|
5611
|
-
/* @__PURE__ */ r(
|
|
5611
|
+
/* @__PURE__ */ r(R.Dropdown, {
|
|
5612
5612
|
label: l("graph.annotations.arrowToolbar.thickness.ariaLabel"),
|
|
5613
5613
|
trigger: /* @__PURE__ */ r(Xa, {
|
|
5614
5614
|
size: "sm",
|
|
@@ -5618,10 +5618,10 @@ var k1 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
5618
5618
|
children: /* @__PURE__ */ r(Ze, {
|
|
5619
5619
|
options: A1,
|
|
5620
5620
|
current: d.strokeWidth,
|
|
5621
|
-
onPick:
|
|
5621
|
+
onPick: O
|
|
5622
5622
|
})
|
|
5623
5623
|
}),
|
|
5624
|
-
/* @__PURE__ */ r(
|
|
5624
|
+
/* @__PURE__ */ r(R.Dropdown, {
|
|
5625
5625
|
label: l("graph.annotations.arrowToolbar.startArrowhead"),
|
|
5626
5626
|
trigger: /* @__PURE__ */ r(r1, {
|
|
5627
5627
|
size: "sm",
|
|
@@ -5634,7 +5634,7 @@ var k1 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
5634
5634
|
onPick: L
|
|
5635
5635
|
})
|
|
5636
5636
|
}),
|
|
5637
|
-
/* @__PURE__ */ r(
|
|
5637
|
+
/* @__PURE__ */ r(R.Dropdown, {
|
|
5638
5638
|
label: l("graph.annotations.arrowToolbar.lineStyle.ariaLabel"),
|
|
5639
5639
|
trigger: h?.Icon !== void 0 && /* @__PURE__ */ r(h.Icon, {
|
|
5640
5640
|
size: "sm",
|
|
@@ -5644,10 +5644,10 @@ var k1 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
5644
5644
|
children: /* @__PURE__ */ r(Ze, {
|
|
5645
5645
|
options: Qn,
|
|
5646
5646
|
current: Rt(d.dashArray),
|
|
5647
|
-
onPick:
|
|
5647
|
+
onPick: M
|
|
5648
5648
|
})
|
|
5649
5649
|
}),
|
|
5650
|
-
/* @__PURE__ */ r(
|
|
5650
|
+
/* @__PURE__ */ r(R.Dropdown, {
|
|
5651
5651
|
label: l("graph.annotations.arrowToolbar.endArrowhead"),
|
|
5652
5652
|
trigger: /* @__PURE__ */ r(qa, {
|
|
5653
5653
|
size: "sm",
|
|
@@ -5657,20 +5657,20 @@ var k1 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
5657
5657
|
children: /* @__PURE__ */ r(Ze, {
|
|
5658
5658
|
options: Jn,
|
|
5659
5659
|
current: e.endArrowheadStyle,
|
|
5660
|
-
onPick:
|
|
5660
|
+
onPick: D
|
|
5661
5661
|
})
|
|
5662
5662
|
}),
|
|
5663
|
-
/* @__PURE__ */ r(
|
|
5663
|
+
/* @__PURE__ */ r(R.ToggleButton, {
|
|
5664
5664
|
label: l("graph.annotations.arrowToolbar.sticker"),
|
|
5665
5665
|
isPressed: p,
|
|
5666
|
-
onClick:
|
|
5666
|
+
onClick: N,
|
|
5667
5667
|
children: /* @__PURE__ */ r(a1, {
|
|
5668
5668
|
size: "sm",
|
|
5669
5669
|
title: ""
|
|
5670
5670
|
})
|
|
5671
5671
|
}),
|
|
5672
|
-
/* @__PURE__ */ r(
|
|
5673
|
-
/* @__PURE__ */ r(
|
|
5672
|
+
/* @__PURE__ */ r(R.Separator, {}),
|
|
5673
|
+
/* @__PURE__ */ r(R.IconButton, {
|
|
5674
5674
|
label: l("graph.annotations.arrowToolbar.remove"),
|
|
5675
5675
|
onClick: T,
|
|
5676
5676
|
children: /* @__PURE__ */ r(ft, {
|
|
@@ -5682,7 +5682,7 @@ var k1 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
5682
5682
|
});
|
|
5683
5683
|
}, Ze = ({ options: e, current: t, onPick: n }) => {
|
|
5684
5684
|
const a = E(), o = (i) => () => n(i);
|
|
5685
|
-
return /* @__PURE__ */ r(Y, { children: e.map((i) => /* @__PURE__ */ m(
|
|
5685
|
+
return /* @__PURE__ */ r(Y, { children: e.map((i) => /* @__PURE__ */ m(R.MenuItem, {
|
|
5686
5686
|
isSelected: i.value === t,
|
|
5687
5687
|
onClick: o(i.value),
|
|
5688
5688
|
children: [/* @__PURE__ */ r("span", { children: a(i.key) }), i.Icon !== void 0 && /* @__PURE__ */ r("span", {
|
|
@@ -5700,7 +5700,7 @@ var k1 = ({ arrow: e, arrowBox: t, panelRect: n, frameWidth: a, frameHeight: o,
|
|
|
5700
5700
|
x: e.x * t.width,
|
|
5701
5701
|
y: e.y * t.height
|
|
5702
5702
|
});
|
|
5703
|
-
var I1 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3,
|
|
5703
|
+
var I1 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, Ue = class {
|
|
5704
5704
|
constructor(e) {
|
|
5705
5705
|
this.params = e, this.listeners = new AbortController(), this.pendingEvent = null, this.scheduledFrame = null, this.hasMoved = !1, this.hasPublished = !1, this.handleMove = (t) => {
|
|
5706
5706
|
t.pointerId === this.params.pointerId && (this.pendingEvent = t, this.hasMoved = !0, this.scheduledFrame === null && (this.scheduledFrame = requestAnimationFrame(this.runFrame)));
|
|
@@ -5751,7 +5751,7 @@ var I1 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, We = class {
|
|
|
5751
5751
|
if (a === void 0) return null;
|
|
5752
5752
|
const o = a[n];
|
|
5753
5753
|
return o.anchorType === "panel" ? o : null;
|
|
5754
|
-
}, ja = (e, t) => e === "start" ? { start: t } : { end: t }, E1 = class extends
|
|
5754
|
+
}, ja = (e, t) => e === "start" ? { start: t } : { end: t }, E1 = class extends Ue {
|
|
5755
5755
|
constructor(...e) {
|
|
5756
5756
|
super(...e), this.kind = "arrow-endpoint-drag";
|
|
5757
5757
|
}
|
|
@@ -5765,7 +5765,7 @@ var I1 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, We = class {
|
|
|
5765
5765
|
kind: "arrow-endpoint-drag",
|
|
5766
5766
|
annotationId: t,
|
|
5767
5767
|
endpoint: n,
|
|
5768
|
-
...
|
|
5768
|
+
...Ua({
|
|
5769
5769
|
anchor: c,
|
|
5770
5770
|
point: l[n],
|
|
5771
5771
|
delta: yt(a, e, s)
|
|
@@ -5819,7 +5819,7 @@ var I1 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, We = class {
|
|
|
5819
5819
|
}, M1 = [" ", "Enter"], er = 4, N1 = ({ annotationId: e, arrow: t, panelRect: n }) => {
|
|
5820
5820
|
const { commands: a } = F(), o = $(), i = _((c) => c.spec.annotations), l = j(i), s = j(a.dispatch);
|
|
5821
5821
|
return z(() => () => {
|
|
5822
|
-
for (const c of
|
|
5822
|
+
for (const c of Wa) tr({
|
|
5823
5823
|
editorStore: o,
|
|
5824
5824
|
annotationId: e,
|
|
5825
5825
|
endpoint: c,
|
|
@@ -5863,7 +5863,7 @@ var I1 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, We = class {
|
|
|
5863
5863
|
kind: "arrow-endpoint-drag",
|
|
5864
5864
|
annotationId: e,
|
|
5865
5865
|
endpoint: c,
|
|
5866
|
-
...
|
|
5866
|
+
...Ua({
|
|
5867
5867
|
anchor: h.anchor,
|
|
5868
5868
|
point: h.point,
|
|
5869
5869
|
delta: p
|
|
@@ -5914,7 +5914,7 @@ var I1 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, We = class {
|
|
|
5914
5914
|
return null;
|
|
5915
5915
|
}
|
|
5916
5916
|
}, D1 = (e) => {
|
|
5917
|
-
const t =
|
|
5917
|
+
const t = We(), n = F1(t), a = B1(e.panelRect, t), o = H1(t);
|
|
5918
5918
|
if (n === null || a === null) return null;
|
|
5919
5919
|
const i = o.dragged === null ? a : pn(a, o.dragged);
|
|
5920
5920
|
return /* @__PURE__ */ r(_1, {
|
|
@@ -5945,7 +5945,7 @@ var I1 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, We = class {
|
|
|
5945
5945
|
frameWidth: l.width,
|
|
5946
5946
|
frameHeight: l.height,
|
|
5947
5947
|
frameElement: s
|
|
5948
|
-
}), !o &&
|
|
5948
|
+
}), !o && Wa.filter((h) => e[h].anchorType === "panel").map((h) => /* @__PURE__ */ r(z1, {
|
|
5949
5949
|
endpoint: h,
|
|
5950
5950
|
point: e1(n[h], i),
|
|
5951
5951
|
label: c(`graph.annotations.arrowToolbar.moveEndpoint.${h}`),
|
|
@@ -5970,7 +5970,7 @@ var I1 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, We = class {
|
|
|
5970
5970
|
const t = _((n) => n.spec.annotations.arrows);
|
|
5971
5971
|
return e === null ? null : t.find((n) => n.id === e) ?? null;
|
|
5972
5972
|
}, B1 = (e, t) => {
|
|
5973
|
-
const n =
|
|
5973
|
+
const n = Le(e).arrows;
|
|
5974
5974
|
return t === null ? null : n.find((a) => a.id === t) ?? null;
|
|
5975
5975
|
}, H1 = (e) => X(ge((t) => {
|
|
5976
5976
|
if (e === null) return {
|
|
@@ -5991,8 +5991,8 @@ var I1 = (e, t) => Math.hypot(t.x - e.x, t.y - e.y) >= 3, We = class {
|
|
|
5991
5991
|
strokeLinejoin: "round",
|
|
5992
5992
|
children: [/* @__PURE__ */ r("path", { d: "M4 9h16m-4-4 4 4" }), /* @__PURE__ */ r("path", { d: "M20 15H4m4 4-4-4" })]
|
|
5993
5993
|
})
|
|
5994
|
-
}), V1 = "q7gcrz0", $1 = "q7gcrz1",
|
|
5995
|
-
var
|
|
5994
|
+
}), V1 = "q7gcrz0", $1 = "q7gcrz1", W1 = "q7gcrz2";
|
|
5995
|
+
var U1 = [
|
|
5996
5996
|
"absolute-difference",
|
|
5997
5997
|
"relative-difference",
|
|
5998
5998
|
"proportion"
|
|
@@ -6003,11 +6003,11 @@ var W1 = [
|
|
|
6003
6003
|
}, X1 = (e) => {
|
|
6004
6004
|
const { formattingLocale: t } = F(), n = _((o) => o.config.parsingLocale), a = t ?? n;
|
|
6005
6005
|
return I(() => {
|
|
6006
|
-
const o =
|
|
6007
|
-
return
|
|
6006
|
+
const o = Ul(e.start, e.end);
|
|
6007
|
+
return U1.filter((i) => o || !nr.includes(i) || i === e.label).map((i) => ({
|
|
6008
6008
|
kind: i,
|
|
6009
6009
|
key: q1[i],
|
|
6010
|
-
preview:
|
|
6010
|
+
preview: ds({
|
|
6011
6011
|
locale: a,
|
|
6012
6012
|
kind: i,
|
|
6013
6013
|
startValue: e.start.measurementValue,
|
|
@@ -6039,40 +6039,40 @@ var W1 = [
|
|
|
6039
6039
|
}), [e.id]), v = I(() => ({
|
|
6040
6040
|
...g,
|
|
6041
6041
|
part: "label"
|
|
6042
|
-
}), [g]), f = h.find((b) => b.kind === e.label), x = h.some((b) => b.isPickable && b.kind !== e.label), w = rr.find((b) => Ln[b.id].arrow.strokeWidth === p.strokeWidth), y = (b,
|
|
6042
|
+
}), [g]), f = h.find((b) => b.kind === e.label), x = h.some((b) => b.isPickable && b.kind !== e.label), w = rr.find((b) => Ln[b.id].arrow.strokeWidth === p.strokeWidth), y = (b, U) => {
|
|
6043
6043
|
c.dispatch(new ie({
|
|
6044
6044
|
kind: "differenceArrow",
|
|
6045
6045
|
id: e.id,
|
|
6046
6046
|
patch: b
|
|
6047
|
-
}),
|
|
6047
|
+
}), U);
|
|
6048
6048
|
}, T = (b) => ({
|
|
6049
|
-
...
|
|
6049
|
+
...Se(u, { select: g })?.declarations,
|
|
6050
6050
|
...b
|
|
6051
6051
|
}), C = (b) => ({
|
|
6052
|
-
...
|
|
6052
|
+
...Se(u, { select: v })?.declarations,
|
|
6053
6053
|
...b
|
|
6054
|
-
}),
|
|
6054
|
+
}), O = (b) => {
|
|
6055
6055
|
y(b), d.close();
|
|
6056
6056
|
}, L = () => {
|
|
6057
6057
|
c.dispatch(new _e({ id: e.id })), l.focus({ preventScroll: !0 });
|
|
6058
|
-
},
|
|
6058
|
+
}, M = (b) => c.dispatch(new Ae({
|
|
6059
6059
|
list: "overrides",
|
|
6060
6060
|
rule: {
|
|
6061
6061
|
select: g,
|
|
6062
6062
|
declarations: T({ stroke: b })
|
|
6063
6063
|
}
|
|
6064
|
-
}), { transient: !0 }),
|
|
6064
|
+
}), { transient: !0 }), D = () => y({
|
|
6065
6065
|
start: e.end.anchor,
|
|
6066
6066
|
end: e.start.anchor
|
|
6067
|
-
}),
|
|
6068
|
-
const
|
|
6067
|
+
}), N = (b) => () => O({ label: b }), S = (b) => () => {
|
|
6068
|
+
const U = Ln[b];
|
|
6069
6069
|
c.dispatch(new ul({
|
|
6070
6070
|
annotationId: e.id,
|
|
6071
|
-
arrow: T(
|
|
6072
|
-
label: C(
|
|
6071
|
+
arrow: T(U.arrow),
|
|
6072
|
+
label: C(U.label)
|
|
6073
6073
|
})), d.close();
|
|
6074
6074
|
};
|
|
6075
|
-
return /* @__PURE__ */ m(
|
|
6075
|
+
return /* @__PURE__ */ m(R.Root, {
|
|
6076
6076
|
anchorBox: n,
|
|
6077
6077
|
panelRect: a,
|
|
6078
6078
|
frameWidth: o,
|
|
@@ -6080,15 +6080,15 @@ var W1 = [
|
|
|
6080
6080
|
label: s("graph.annotations.differenceArrowToolbar.label"),
|
|
6081
6081
|
testId: "difference-arrow-toolbar",
|
|
6082
6082
|
children: [
|
|
6083
|
-
/* @__PURE__ */ r(
|
|
6083
|
+
/* @__PURE__ */ r(R.Dropdown, {
|
|
6084
6084
|
label: s("graph.annotations.differenceArrowToolbar.labelKind.ariaLabel"),
|
|
6085
6085
|
trigger: /* @__PURE__ */ r(j1, { option: f }),
|
|
6086
6086
|
isDisabled: !x,
|
|
6087
6087
|
...d.bind("labelKind"),
|
|
6088
|
-
children: h.map((b) => /* @__PURE__ */ m(
|
|
6088
|
+
children: h.map((b) => /* @__PURE__ */ m(R.MenuItem, {
|
|
6089
6089
|
isSelected: b.kind === e.label,
|
|
6090
6090
|
isDisabled: !b.isPickable,
|
|
6091
|
-
onClick:
|
|
6091
|
+
onClick: N(b.kind),
|
|
6092
6092
|
children: [
|
|
6093
6093
|
/* @__PURE__ */ r("span", { children: s(b.key) }),
|
|
6094
6094
|
(b.isSuspect || !b.isPickable) && /* @__PURE__ */ r("span", {
|
|
@@ -6098,40 +6098,40 @@ var W1 = [
|
|
|
6098
6098
|
children: "⚠"
|
|
6099
6099
|
}),
|
|
6100
6100
|
/* @__PURE__ */ r("span", {
|
|
6101
|
-
className:
|
|
6101
|
+
className: W1,
|
|
6102
6102
|
children: b.preview
|
|
6103
6103
|
})
|
|
6104
6104
|
]
|
|
6105
6105
|
}, b.kind))
|
|
6106
6106
|
}),
|
|
6107
|
-
/* @__PURE__ */ r(
|
|
6108
|
-
/* @__PURE__ */ r(
|
|
6107
|
+
/* @__PURE__ */ r(R.Separator, {}),
|
|
6108
|
+
/* @__PURE__ */ r(R.ColorPicker, {
|
|
6109
6109
|
color: t,
|
|
6110
6110
|
label: s("graph.annotations.differenceArrowToolbar.color"),
|
|
6111
|
-
onChange:
|
|
6111
|
+
onChange: M,
|
|
6112
6112
|
...d.bind("color"),
|
|
6113
|
-
children: /* @__PURE__ */ r(
|
|
6113
|
+
children: /* @__PURE__ */ r(R.Swatch, { color: t })
|
|
6114
6114
|
}),
|
|
6115
|
-
/* @__PURE__ */ r(
|
|
6115
|
+
/* @__PURE__ */ r(R.Dropdown, {
|
|
6116
6116
|
label: s("graph.annotations.differenceArrowToolbar.size.ariaLabel"),
|
|
6117
6117
|
trigger: w === void 0 ? "" : s(w.key),
|
|
6118
6118
|
...d.bind("size"),
|
|
6119
|
-
children: rr.map((b) => /* @__PURE__ */ r(
|
|
6119
|
+
children: rr.map((b) => /* @__PURE__ */ r(R.MenuItem, {
|
|
6120
6120
|
isSelected: b.id === w?.id,
|
|
6121
6121
|
onClick: S(b.id),
|
|
6122
6122
|
children: s(b.key)
|
|
6123
6123
|
}, b.id))
|
|
6124
6124
|
}),
|
|
6125
|
-
/* @__PURE__ */ r(
|
|
6126
|
-
/* @__PURE__ */ r(
|
|
6125
|
+
/* @__PURE__ */ r(R.Separator, {}),
|
|
6126
|
+
/* @__PURE__ */ r(R.IconButton, {
|
|
6127
6127
|
label: s("graph.annotations.differenceArrowToolbar.swap"),
|
|
6128
|
-
onClick:
|
|
6128
|
+
onClick: D,
|
|
6129
6129
|
children: /* @__PURE__ */ r(G1, {
|
|
6130
6130
|
size: "sm",
|
|
6131
6131
|
title: ""
|
|
6132
6132
|
})
|
|
6133
6133
|
}),
|
|
6134
|
-
/* @__PURE__ */ r(
|
|
6134
|
+
/* @__PURE__ */ r(R.IconButton, {
|
|
6135
6135
|
label: s("graph.annotations.differenceArrowToolbar.remove"),
|
|
6136
6136
|
onClick: L,
|
|
6137
6137
|
children: /* @__PURE__ */ r(ft, {
|
|
@@ -6171,17 +6171,17 @@ var Y1 = "ydgo3h0", J1 = "ydgo3h1", Q1 = "ydgo3h2", ep = ({ clientPoint: e, pane
|
|
|
6171
6171
|
coordSystem: i,
|
|
6172
6172
|
align: c
|
|
6173
6173
|
});
|
|
6174
|
-
return p === null ||
|
|
6174
|
+
return p === null || Wr(p.anchor, s) ? null : p;
|
|
6175
6175
|
}, tp = (e, t) => ({
|
|
6176
6176
|
x: Math.max(0, Math.min(e.x, t.width)),
|
|
6177
6177
|
y: Math.max(0, Math.min(e.y, t.height))
|
|
6178
6178
|
}), Ya = (e) => e === "start" ? "end" : "start", Ja = ({ dispatch: e, arrow: t, endpoint: n, anchor: a }) => {
|
|
6179
|
-
|
|
6179
|
+
Wr(a, t[n].anchor) || e(new ie({
|
|
6180
6180
|
kind: "differenceArrow",
|
|
6181
6181
|
id: t.id,
|
|
6182
6182
|
patch: { [n]: a }
|
|
6183
6183
|
}));
|
|
6184
|
-
}, np = class extends
|
|
6184
|
+
}, np = class extends Ue {
|
|
6185
6185
|
constructor(...e) {
|
|
6186
6186
|
super(...e), this.kind = "difference-arrow-endpoint-drag";
|
|
6187
6187
|
}
|
|
@@ -6266,7 +6266,7 @@ var Y1 = "ydgo3h0", J1 = "ydgo3h1", Q1 = "ydgo3h2", ep = ({ clientPoint: e, pane
|
|
|
6266
6266
|
const { commands: t, anchorResolver: n } = F(), a = $(), { layers: o, coordSystem: i, mainAxis: l } = _(ge((c) => ({
|
|
6267
6267
|
layers: c.layers,
|
|
6268
6268
|
coordSystem: c.coordSystem,
|
|
6269
|
-
mainAxis: c.coordSystem
|
|
6269
|
+
mainAxis: Ts(c.coordSystem)
|
|
6270
6270
|
}))), s = e.id;
|
|
6271
6271
|
return z(() => () => {
|
|
6272
6272
|
const c = a.getState();
|
|
@@ -6347,13 +6347,13 @@ var Y1 = "ydgo3h0", J1 = "ydgo3h1", Q1 = "ydgo3h2", ep = ({ clientPoint: e, pane
|
|
|
6347
6347
|
})
|
|
6348
6348
|
})?.point ?? null;
|
|
6349
6349
|
}, sp = (e) => {
|
|
6350
|
-
const t =
|
|
6350
|
+
const t = We();
|
|
6351
6351
|
return t === null ? null : /* @__PURE__ */ r(cp, {
|
|
6352
6352
|
annotationId: t,
|
|
6353
6353
|
...e
|
|
6354
6354
|
});
|
|
6355
6355
|
}, cp = ({ annotationId: e, ...t }) => {
|
|
6356
|
-
const n =
|
|
6356
|
+
const n = ti(), a = I(() => n.find((o) => o.id === e), [n, e]);
|
|
6357
6357
|
return a === void 0 ? null : /* @__PURE__ */ r(dp, {
|
|
6358
6358
|
committedArrow: a.committedArrow,
|
|
6359
6359
|
color: a.color,
|
|
@@ -6392,7 +6392,7 @@ var Y1 = "ydgo3h0", J1 = "ydgo3h1", Q1 = "ydgo3h2", ep = ({ clientPoint: e, pane
|
|
|
6392
6392
|
top: s.y + o.y - 2,
|
|
6393
6393
|
width: o.width + 4,
|
|
6394
6394
|
height: o.height + 4,
|
|
6395
|
-
borderRadius:
|
|
6395
|
+
borderRadius: Ii(n, 2)
|
|
6396
6396
|
}
|
|
6397
6397
|
}),
|
|
6398
6398
|
/* @__PURE__ */ r(ar, {
|
|
@@ -6485,7 +6485,7 @@ var Qa = ({ width: e, height: t }) => ({
|
|
|
6485
6485
|
};
|
|
6486
6486
|
}, to = (e, t) => e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height, no = (e) => e === "top-left" || e === "bottom-left", ro = (e) => e === "top-left" || e === "top-right", ao = (e, t, n, a) => {
|
|
6487
6487
|
const o = e.textAnnotations.find((i) => i.id === t);
|
|
6488
|
-
return o === void 0 ? null : ci(
|
|
6488
|
+
return o === void 0 ? null : ci(fi(o, n), a);
|
|
6489
6489
|
};
|
|
6490
6490
|
var pp = {
|
|
6491
6491
|
hovered: "_1ee8fau1 _1ee8fau0",
|
|
@@ -6494,7 +6494,7 @@ var pp = {
|
|
|
6494
6494
|
hovered: "_1ee8fau4 _1ee8fau3",
|
|
6495
6495
|
selected: "_1ee8fau5 _1ee8fau3"
|
|
6496
6496
|
}, gp = ({ panelRect: e }) => {
|
|
6497
|
-
const t =
|
|
6497
|
+
const t = Le(e), n = _r(), a = Q(), o = We(), i = X((f) => V(f, "move-drag")), l = X((f) => V(f, "shape-resize-drag")), s = X((f) => V(f, "arrow-endpoint-drag")), c = X((f) => V(f, "text-resize-drag")), u = X(ai), d = I(() => ({
|
|
6498
6498
|
panel: {
|
|
6499
6499
|
width: e.width,
|
|
6500
6500
|
height: e.height
|
|
@@ -6513,7 +6513,7 @@ var pp = {
|
|
|
6513
6513
|
}
|
|
6514
6514
|
if (s?.annotationId === f.id) {
|
|
6515
6515
|
const x = t.arrows.find((w) => w.id === f.id);
|
|
6516
|
-
return x === void 0 ? f.geometry :
|
|
6516
|
+
return x === void 0 ? f.geometry : gi(pn(x, s), d.panel) ?? f.geometry;
|
|
6517
6517
|
}
|
|
6518
6518
|
return c?.annotationId === f.id ? ao(t, f.id, c, d) ?? f.geometry : f.geometry;
|
|
6519
6519
|
}, v = (f) => {
|
|
@@ -6575,7 +6575,7 @@ var pp = {
|
|
|
6575
6575
|
top: n.y + e.y
|
|
6576
6576
|
}
|
|
6577
6577
|
}), vp = ({ panelRect: e }) => {
|
|
6578
|
-
const t = X((o) => V(o, "move-drag")), n =
|
|
6578
|
+
const t = X((o) => V(o, "move-drag")), n = Le(e);
|
|
6579
6579
|
if (t === null) return null;
|
|
6580
6580
|
const a = Za(t.translation, e);
|
|
6581
6581
|
return /* @__PURE__ */ r("svg", {
|
|
@@ -6592,8 +6592,8 @@ var pp = {
|
|
|
6592
6592
|
children: yp(n, t.annotationId, e)
|
|
6593
6593
|
});
|
|
6594
6594
|
}, fp = ({ annotation: e, panel: t }) => {
|
|
6595
|
-
const n =
|
|
6596
|
-
return /* @__PURE__ */ r(
|
|
6595
|
+
const n = yi(e.id);
|
|
6596
|
+
return /* @__PURE__ */ r(Si, {
|
|
6597
6597
|
annotation: e,
|
|
6598
6598
|
panel: t,
|
|
6599
6599
|
style: Q().annotation.text(e.id).resolve(),
|
|
@@ -6641,12 +6641,12 @@ var pp = {
|
|
|
6641
6641
|
shape: e,
|
|
6642
6642
|
style: Q().annotation.shape(e.id).resolve(),
|
|
6643
6643
|
panel: t
|
|
6644
|
-
}), xp = ({ image: e, panelSize: t }) => /* @__PURE__ */ r(
|
|
6644
|
+
}), xp = ({ image: e, panelSize: t }) => /* @__PURE__ */ r(xi, {
|
|
6645
6645
|
image: e,
|
|
6646
6646
|
panel: t,
|
|
6647
6647
|
style: Q().annotation.image(e.id).resolve()
|
|
6648
6648
|
}), wp = ({ panelRect: e }) => {
|
|
6649
|
-
const t = X((i) => V(i, "shape-resize-drag")), n =
|
|
6649
|
+
const t = X((i) => V(i, "shape-resize-drag")), n = Le(e).shapes, a = Q();
|
|
6650
6650
|
if (t === null) return null;
|
|
6651
6651
|
const o = n.find((i) => i.id === t.annotationId);
|
|
6652
6652
|
return o === void 0 ? null : /* @__PURE__ */ r("svg", {
|
|
@@ -6692,7 +6692,7 @@ var pp = {
|
|
|
6692
6692
|
"aria-hidden": "true",
|
|
6693
6693
|
className: Ap[a]
|
|
6694
6694
|
})
|
|
6695
|
-
}),
|
|
6695
|
+
}), Wt = [
|
|
6696
6696
|
{
|
|
6697
6697
|
width: 0,
|
|
6698
6698
|
key: "graph.annotations.shapeToolbar.border.none"
|
|
@@ -6709,14 +6709,14 @@ var pp = {
|
|
|
6709
6709
|
width: 16,
|
|
6710
6710
|
key: "graph.annotations.shapeToolbar.border.thick"
|
|
6711
6711
|
}
|
|
6712
|
-
], kp = (e) => [...
|
|
6712
|
+
], kp = (e) => [...Wt].reverse().find((t) => t.width <= e) ?? Wt[0], Lp = ({ shape: e, shapeBox: t, panelRect: n, frameWidth: a, frameHeight: o, frameElement: i }) => {
|
|
6713
6713
|
const l = E(), { commands: s } = F(), c = _((y) => y.spec.styles.overrides), u = bt(), d = Q().annotation.shape(e.id).resolve(), h = kp(d.strokeWidth), p = I(() => ({
|
|
6714
6714
|
target: "annotation",
|
|
6715
6715
|
kind: "shape",
|
|
6716
6716
|
annotation: e.id
|
|
6717
6717
|
}), [e.id]), g = (y, T) => {
|
|
6718
|
-
const C =
|
|
6719
|
-
s.dispatch(new
|
|
6718
|
+
const C = Se(c, { select: p })?.declarations ?? {};
|
|
6719
|
+
s.dispatch(new Ae({
|
|
6720
6720
|
list: "overrides",
|
|
6721
6721
|
rule: {
|
|
6722
6722
|
select: p,
|
|
@@ -6731,7 +6731,7 @@ var pp = {
|
|
|
6731
6731
|
}, f = (y) => g({ fill: y }, { transient: !0 }), x = (y) => g({ fillAlpha: y }, { transient: !0 }), w = (y) => () => {
|
|
6732
6732
|
g({ strokeWidth: y }), u.close();
|
|
6733
6733
|
};
|
|
6734
|
-
return /* @__PURE__ */ m(
|
|
6734
|
+
return /* @__PURE__ */ m(R.Root, {
|
|
6735
6735
|
anchorBox: t,
|
|
6736
6736
|
panelRect: n,
|
|
6737
6737
|
frameWidth: a,
|
|
@@ -6739,33 +6739,33 @@ var pp = {
|
|
|
6739
6739
|
label: l("graph.annotations.shapeToolbar.label"),
|
|
6740
6740
|
testId: "shape-toolbar",
|
|
6741
6741
|
children: [
|
|
6742
|
-
/* @__PURE__ */ r(
|
|
6742
|
+
/* @__PURE__ */ r(R.ColorPicker, {
|
|
6743
6743
|
color: tt(d.fill),
|
|
6744
6744
|
label: l("graph.annotations.shapeToolbar.color"),
|
|
6745
6745
|
onChange: f,
|
|
6746
6746
|
opacity: d.fillAlpha,
|
|
6747
6747
|
onOpacityChange: x,
|
|
6748
6748
|
...u.bind("color"),
|
|
6749
|
-
children: /* @__PURE__ */ r(
|
|
6749
|
+
children: /* @__PURE__ */ r(R.Swatch, {
|
|
6750
6750
|
color: tt(d.fill),
|
|
6751
6751
|
opacity: d.fillAlpha
|
|
6752
6752
|
})
|
|
6753
6753
|
}),
|
|
6754
|
-
/* @__PURE__ */ r(
|
|
6754
|
+
/* @__PURE__ */ r(R.Dropdown, {
|
|
6755
6755
|
label: l("graph.annotations.shapeToolbar.border.ariaLabel"),
|
|
6756
6756
|
trigger: /* @__PURE__ */ r(Xa, {
|
|
6757
6757
|
size: "sm",
|
|
6758
6758
|
title: ""
|
|
6759
6759
|
}),
|
|
6760
6760
|
...u.bind("border"),
|
|
6761
|
-
children:
|
|
6761
|
+
children: Wt.map((y) => /* @__PURE__ */ r(R.MenuItem, {
|
|
6762
6762
|
isSelected: y.width === h?.width,
|
|
6763
6763
|
onClick: w(y.width),
|
|
6764
6764
|
children: l(y.key)
|
|
6765
6765
|
}, y.width))
|
|
6766
6766
|
}),
|
|
6767
|
-
/* @__PURE__ */ r(
|
|
6768
|
-
/* @__PURE__ */ r(
|
|
6767
|
+
/* @__PURE__ */ r(R.Separator, {}),
|
|
6768
|
+
/* @__PURE__ */ r(R.IconButton, {
|
|
6769
6769
|
label: l("graph.annotations.shapeToolbar.remove"),
|
|
6770
6770
|
onClick: v,
|
|
6771
6771
|
children: /* @__PURE__ */ r(ft, {
|
|
@@ -6801,7 +6801,7 @@ var pp = {
|
|
|
6801
6801
|
}, ot = (e, t) => {
|
|
6802
6802
|
const n = e.shapes.find((a) => a.id === t);
|
|
6803
6803
|
return n === void 0 || n.region.anchorType !== "panel" ? null : n.region;
|
|
6804
|
-
}, Pp = class extends
|
|
6804
|
+
}, Pp = class extends Ue {
|
|
6805
6805
|
constructor(...e) {
|
|
6806
6806
|
super(...e), this.kind = "shape-resize-drag";
|
|
6807
6807
|
}
|
|
@@ -6931,7 +6931,7 @@ var pp = {
|
|
|
6931
6931
|
"top-right": "diagonalUp",
|
|
6932
6932
|
"bottom-left": "diagonalUp"
|
|
6933
6933
|
}, Rp = (e) => {
|
|
6934
|
-
const t =
|
|
6934
|
+
const t = We(), n = _p(t), a = zp(t);
|
|
6935
6935
|
if (n === null) return null;
|
|
6936
6936
|
const o = a.resizedRegion ?? (n.region.anchorType === "panel" ? n.region : null);
|
|
6937
6937
|
return o === null ? null : /* @__PURE__ */ r(Dp, {
|
|
@@ -7002,10 +7002,10 @@ var pp = {
|
|
|
7002
7002
|
})]
|
|
7003
7003
|
});
|
|
7004
7004
|
var it = "textStyle", so = /* @__PURE__ */ new Set(["paragraph", "heading"]), Bp = (e) => {
|
|
7005
|
-
const t = co(e), n =
|
|
7005
|
+
const t = co(e), n = Up(e);
|
|
7006
7006
|
return {
|
|
7007
7007
|
color: Ye(t.map((a) => Kp(Et(a)?.color))),
|
|
7008
|
-
font: Ye(t.map((a) =>
|
|
7008
|
+
font: Ye(t.map((a) => Wp(Et(a)))),
|
|
7009
7009
|
fontSize: Ye(t.map((a) => qp(Et(a)?.fontSize))),
|
|
7010
7010
|
alignment: Ye(n.map((a) => Xp(a.attrs?.textAlign)))
|
|
7011
7011
|
};
|
|
@@ -7030,7 +7030,7 @@ var it = "textStyle", so = /* @__PURE__ */ new Set(["paragraph", "heading"]), Bp
|
|
|
7030
7030
|
...e,
|
|
7031
7031
|
marks: a === void 0 ? [...n, o] : n.map((i) => i === a ? o : i)
|
|
7032
7032
|
};
|
|
7033
|
-
}, Et = (e) => e.marks?.find((t) => t.type === it)?.attrs,
|
|
7033
|
+
}, Et = (e) => e.marks?.find((t) => t.type === it)?.attrs, Wp = (e) => wn(e?.font) ?? wn(e?.fontFamily), co = (e) => vn(e, (t) => t.type === "text"), Up = (e) => vn(e, (t) => so.has(t.type ?? "")), vn = (e, t) => [...t(e) ? [e] : [], ...(e.content ?? []).flatMap((n) => vn(n, t))], Ye = (e) => {
|
|
7034
7034
|
const [t, ...n] = e;
|
|
7035
7035
|
return t === void 0 ? null : n.every((a) => a === t) ? t : null;
|
|
7036
7036
|
}, Kp = (e) => typeof e == "string" && e.length > 0 ? e : void 0, qp = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0, Xp = (e) => e === "left" || e === "center" || e === "right" ? e : void 0;
|
|
@@ -7058,7 +7058,7 @@ var uo = [
|
|
|
7058
7058
|
].map(({ id: e, key: t }) => ({
|
|
7059
7059
|
id: e,
|
|
7060
7060
|
key: t,
|
|
7061
|
-
fontFamily:
|
|
7061
|
+
fontFamily: mi[e] ?? e
|
|
7062
7062
|
})), Zp = (e) => uo.find((t) => t.id === (e ?? "modern")) ?? null;
|
|
7063
7063
|
var ho = [
|
|
7064
7064
|
{
|
|
@@ -7099,9 +7099,9 @@ var ho = [
|
|
|
7099
7099
|
target: "annotation",
|
|
7100
7100
|
kind: "text",
|
|
7101
7101
|
annotation: e.id
|
|
7102
|
-
}), [e.id]), w = (b,
|
|
7103
|
-
const te =
|
|
7104
|
-
s.dispatch(new
|
|
7102
|
+
}), [e.id]), w = (b, U) => {
|
|
7103
|
+
const te = Se(c, { select: x })?.declarations ?? {};
|
|
7104
|
+
s.dispatch(new Ae({
|
|
7105
7105
|
list: "overrides",
|
|
7106
7106
|
rule: {
|
|
7107
7107
|
select: x,
|
|
@@ -7110,28 +7110,28 @@ var ho = [
|
|
|
7110
7110
|
...b
|
|
7111
7111
|
}
|
|
7112
7112
|
}
|
|
7113
|
-
}),
|
|
7114
|
-
}, y = (b,
|
|
7113
|
+
}), U);
|
|
7114
|
+
}, y = (b, U) => {
|
|
7115
7115
|
s.dispatch(new ie({
|
|
7116
7116
|
kind: "text",
|
|
7117
7117
|
id: e.id,
|
|
7118
7118
|
patch: b
|
|
7119
|
-
}),
|
|
7120
|
-
}, T = () => u.getState().caret?.editor?.getJSON() ?? e.content, C = (b,
|
|
7119
|
+
}), U);
|
|
7120
|
+
}, T = () => u.getState().caret?.editor?.getJSON() ?? e.content, C = (b, U) => {
|
|
7121
7121
|
const te = T(), he = u.getState().caret?.editor ?? null;
|
|
7122
7122
|
if (he !== null && !Gp(te)) {
|
|
7123
7123
|
he.chain().focus().setMark(it, b).run();
|
|
7124
7124
|
return;
|
|
7125
7125
|
}
|
|
7126
|
-
y({ content: Hp(te, b) },
|
|
7127
|
-
},
|
|
7126
|
+
y({ content: Hp(te, b) }, U);
|
|
7127
|
+
}, O = () => {
|
|
7128
7128
|
s.dispatch(new _e({ id: e.id })), i.focus({ preventScroll: !0 });
|
|
7129
|
-
}, L = (b) => w(e2(b), { transient: !0 }),
|
|
7129
|
+
}, L = (b) => w(e2(b), { transient: !0 }), M = (b) => C({ color: b }, { transient: !0 }), D = (b) => () => {
|
|
7130
7130
|
C({ font: b }), d.close();
|
|
7131
|
-
},
|
|
7131
|
+
}, N = (b) => () => {
|
|
7132
7132
|
C({ fontSize: b }), d.close();
|
|
7133
7133
|
}, S = (b) => y({ content: Vp(T(), b) });
|
|
7134
|
-
return /* @__PURE__ */ m(
|
|
7134
|
+
return /* @__PURE__ */ m(R.Root, {
|
|
7135
7135
|
anchorBox: t,
|
|
7136
7136
|
panelRect: n,
|
|
7137
7137
|
frameWidth: a,
|
|
@@ -7139,18 +7139,18 @@ var ho = [
|
|
|
7139
7139
|
label: l("graph.annotations.textToolbar.label"),
|
|
7140
7140
|
testId: "text-toolbar",
|
|
7141
7141
|
children: [
|
|
7142
|
-
/* @__PURE__ */ r(
|
|
7142
|
+
/* @__PURE__ */ r(R.ColorPicker, {
|
|
7143
7143
|
color: tt(h.fill),
|
|
7144
7144
|
label: l("graph.annotations.textToolbar.background"),
|
|
7145
7145
|
hasTransparentOption: !0,
|
|
7146
7146
|
onChange: L,
|
|
7147
7147
|
...d.bind("background"),
|
|
7148
|
-
children: /* @__PURE__ */ r(
|
|
7148
|
+
children: /* @__PURE__ */ r(R.Swatch, { color: h.fill === "transparent" ? da : tt(h.fill) })
|
|
7149
7149
|
}),
|
|
7150
|
-
/* @__PURE__ */ r(
|
|
7150
|
+
/* @__PURE__ */ r(R.ColorPicker, {
|
|
7151
7151
|
color: f,
|
|
7152
7152
|
label: l("graph.annotations.textToolbar.color"),
|
|
7153
|
-
onChange:
|
|
7153
|
+
onChange: M,
|
|
7154
7154
|
...d.bind("color"),
|
|
7155
7155
|
children: /* @__PURE__ */ r(Fp, {
|
|
7156
7156
|
size: "sm",
|
|
@@ -7158,44 +7158,44 @@ var ho = [
|
|
|
7158
7158
|
title: ""
|
|
7159
7159
|
})
|
|
7160
7160
|
}),
|
|
7161
|
-
/* @__PURE__ */ r(
|
|
7161
|
+
/* @__PURE__ */ r(R.Dropdown, {
|
|
7162
7162
|
label: l("graph.annotations.textToolbar.font.ariaLabel"),
|
|
7163
7163
|
trigger: /* @__PURE__ */ r("span", {
|
|
7164
7164
|
style: { fontFamily: g?.fontFamily },
|
|
7165
7165
|
children: "Aa"
|
|
7166
7166
|
}),
|
|
7167
7167
|
...d.bind("font"),
|
|
7168
|
-
children: uo.map((b) => /* @__PURE__ */ r(
|
|
7168
|
+
children: uo.map((b) => /* @__PURE__ */ r(R.MenuItem, {
|
|
7169
7169
|
isSelected: b.id === g?.id,
|
|
7170
|
-
onClick:
|
|
7170
|
+
onClick: D(b.id),
|
|
7171
7171
|
children: /* @__PURE__ */ r("span", {
|
|
7172
7172
|
style: { fontFamily: b.fontFamily },
|
|
7173
7173
|
children: l(b.key)
|
|
7174
7174
|
})
|
|
7175
7175
|
}, b.id))
|
|
7176
7176
|
}),
|
|
7177
|
-
/* @__PURE__ */ r(
|
|
7177
|
+
/* @__PURE__ */ r(R.Dropdown, {
|
|
7178
7178
|
label: l("graph.annotations.textToolbar.fontSize.ariaLabel"),
|
|
7179
7179
|
trigger: v === null ? "" : l(v.key),
|
|
7180
7180
|
...d.bind("fontSize"),
|
|
7181
|
-
children: ho.map((b) => /* @__PURE__ */ r(
|
|
7181
|
+
children: ho.map((b) => /* @__PURE__ */ r(R.MenuItem, {
|
|
7182
7182
|
isSelected: b.size === v?.size,
|
|
7183
|
-
onClick:
|
|
7183
|
+
onClick: N(b.size),
|
|
7184
7184
|
children: /* @__PURE__ */ r("span", {
|
|
7185
7185
|
style: { fontSize: Yp(b.size) },
|
|
7186
7186
|
children: l(b.key)
|
|
7187
7187
|
})
|
|
7188
7188
|
}, b.size))
|
|
7189
7189
|
}),
|
|
7190
|
-
/* @__PURE__ */ r(
|
|
7190
|
+
/* @__PURE__ */ r(R.Separator, {}),
|
|
7191
7191
|
/* @__PURE__ */ r(t2, {
|
|
7192
7192
|
current: p.alignment ?? "center",
|
|
7193
7193
|
onPick: S
|
|
7194
7194
|
}),
|
|
7195
|
-
/* @__PURE__ */ r(
|
|
7196
|
-
/* @__PURE__ */ r(
|
|
7195
|
+
/* @__PURE__ */ r(R.Separator, {}),
|
|
7196
|
+
/* @__PURE__ */ r(R.IconButton, {
|
|
7197
7197
|
label: l("graph.annotations.textToolbar.remove"),
|
|
7198
|
-
onClick:
|
|
7198
|
+
onClick: O,
|
|
7199
7199
|
children: /* @__PURE__ */ r(ft, {
|
|
7200
7200
|
size: "sm",
|
|
7201
7201
|
title: ""
|
|
@@ -7205,10 +7205,10 @@ var ho = [
|
|
|
7205
7205
|
});
|
|
7206
7206
|
}, e2 = (e) => e === "transparent" ? { fill: ma } : {
|
|
7207
7207
|
fill: e,
|
|
7208
|
-
fillAlpha:
|
|
7208
|
+
fillAlpha: Wc(e) ? _l : 1
|
|
7209
7209
|
}, t2 = ({ current: e, onPick: t }) => {
|
|
7210
7210
|
const n = E(), a = (o) => () => t(o);
|
|
7211
|
-
return /* @__PURE__ */ r(Y, { children: Jp.map((o) => /* @__PURE__ */ r(
|
|
7211
|
+
return /* @__PURE__ */ r(Y, { children: Jp.map((o) => /* @__PURE__ */ r(R.ToggleButton, {
|
|
7212
7212
|
label: n(`graph.annotations.textToolbar.align.${o.alignment}`),
|
|
7213
7213
|
isPressed: o.alignment === e,
|
|
7214
7214
|
onClick: a(o.alignment),
|
|
@@ -7249,12 +7249,12 @@ var po = ({ width: e }) => oe(60, e), r2 = (e, t) => ({
|
|
|
7249
7249
|
width: n.width,
|
|
7250
7250
|
align: n.align
|
|
7251
7251
|
};
|
|
7252
|
-
}, o2 = class extends
|
|
7252
|
+
}, o2 = class extends Ue {
|
|
7253
7253
|
constructor(...e) {
|
|
7254
7254
|
super(...e), this.kind = "text-resize-drag";
|
|
7255
7255
|
}
|
|
7256
7256
|
readOwn(e) {
|
|
7257
|
-
return
|
|
7257
|
+
return Yt(V(e, "text-resize-drag"), this.params.annotationId);
|
|
7258
7258
|
}
|
|
7259
7259
|
resolvePreview(e) {
|
|
7260
7260
|
const { annotationId: t, edge: n, press: a, readInputs: o } = this.params, { annotations: i, panelRect: l } = o(), s = lt(i, t);
|
|
@@ -7314,7 +7314,7 @@ var po = ({ width: e }) => oe(60, e), r2 = (e, t) => ({
|
|
|
7314
7314
|
};
|
|
7315
7315
|
};
|
|
7316
7316
|
return lo({
|
|
7317
|
-
readHeld: () =>
|
|
7317
|
+
readHeld: () => Yt(V(a.getState(), "text-resize-drag"), e),
|
|
7318
7318
|
claim: (l) => i(l, 0),
|
|
7319
7319
|
step: (l, s, c) => {
|
|
7320
7320
|
const u = c2(c, t);
|
|
@@ -7343,7 +7343,7 @@ var po = ({ width: e }) => oe(60, e), r2 = (e, t) => ({
|
|
|
7343
7343
|
return null;
|
|
7344
7344
|
}
|
|
7345
7345
|
}, d2 = (e) => {
|
|
7346
|
-
const t =
|
|
7346
|
+
const t = We(), n = h2(t), a = p2(t), o = X((l) => l.caret?.annotationId === t), i = m2(e.panelRect, t, a.resized);
|
|
7347
7347
|
return n === null || i === null ? null : /* @__PURE__ */ r(u2, {
|
|
7348
7348
|
annotation: n,
|
|
7349
7349
|
textBox: i,
|
|
@@ -7397,10 +7397,10 @@ var po = ({ width: e }) => oe(60, e), r2 = (e, t) => ({
|
|
|
7397
7397
|
resized: null,
|
|
7398
7398
|
isMoved: !1
|
|
7399
7399
|
} : {
|
|
7400
|
-
resized:
|
|
7400
|
+
resized: Yt(V(t, "text-resize-drag"), e),
|
|
7401
7401
|
isMoved: ct(V(t, "move-drag"), e) !== null
|
|
7402
7402
|
})), m2 = (e, t, n) => {
|
|
7403
|
-
const a =
|
|
7403
|
+
const a = Le(e), o = _r(), i = Q(), l = I(() => ({
|
|
7404
7404
|
panel: {
|
|
7405
7405
|
width: e.width,
|
|
7406
7406
|
height: e.height
|
|
@@ -7518,7 +7518,7 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7518
7518
|
const n = t.legends[e.part.legendIndex], a = n?.items[e.part.itemIndex];
|
|
7519
7519
|
if (n === void 0 || a === void 0) return null;
|
|
7520
7520
|
const o = I2(n, a.layerId, t.layers);
|
|
7521
|
-
return o === null ? null :
|
|
7521
|
+
return o === null ? null : Ur({
|
|
7522
7522
|
layer: o.layer,
|
|
7523
7523
|
scope: "series",
|
|
7524
7524
|
variable: o.variable,
|
|
@@ -7560,7 +7560,7 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7560
7560
|
if (!o.interactive) continue;
|
|
7561
7561
|
const i = Es(o.mapping);
|
|
7562
7562
|
if (i === null) continue;
|
|
7563
|
-
const l =
|
|
7563
|
+
const l = Ur({
|
|
7564
7564
|
layer: o,
|
|
7565
7565
|
scope: "x-value",
|
|
7566
7566
|
variable: i,
|
|
@@ -7576,9 +7576,9 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7576
7576
|
}, N2 = /* @__PURE__ */ new Set(["discrete", "datetime"]), R2 = ({ hover: e, layers: t, scales: n, parsingLocale: a }) => {
|
|
7577
7577
|
const { primary: o, intersection: i } = e;
|
|
7578
7578
|
if (o === null) return null;
|
|
7579
|
-
const l =
|
|
7579
|
+
const l = ye(t, o.layerId);
|
|
7580
7580
|
if (l === void 0) return null;
|
|
7581
|
-
const s = Jr(o), c = i?.intersects !== !1, u =
|
|
7581
|
+
const s = Jr(o), c = i?.intersects !== !1, u = ys(l), d = c || !_2(n) ? [u] : ["x-value", u];
|
|
7582
7582
|
for (const h of d) {
|
|
7583
7583
|
const p = nn({
|
|
7584
7584
|
layer: l,
|
|
@@ -7596,7 +7596,7 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7596
7596
|
return null;
|
|
7597
7597
|
}, D2 = (e, t, n) => {
|
|
7598
7598
|
if (!e.isOnObservation || e.target.scope !== "series") return null;
|
|
7599
|
-
const a =
|
|
7599
|
+
const a = ye(t, e.layerId);
|
|
7600
7600
|
return a === void 0 ? null : nn({
|
|
7601
7601
|
layer: a,
|
|
7602
7602
|
observationIndex: e.observationIndex,
|
|
@@ -7646,7 +7646,7 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7646
7646
|
y: e.clientY - t.top
|
|
7647
7647
|
};
|
|
7648
7648
|
return n.engine.query(ht(a, t), n.tolerance, t);
|
|
7649
|
-
}, H2 = class extends
|
|
7649
|
+
}, H2 = class extends Ue {
|
|
7650
7650
|
constructor(...e) {
|
|
7651
7651
|
super(...e), this.kind = "move-drag";
|
|
7652
7652
|
}
|
|
@@ -7654,9 +7654,9 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7654
7654
|
return ct(V(e, "move-drag"), this.params.annotationId);
|
|
7655
7655
|
}
|
|
7656
7656
|
resolvePreview(e) {
|
|
7657
|
-
const { annotationId: t, press: n, readInputs: a } = this.params, { annotations: o, panelRect: i } = a(), l =
|
|
7657
|
+
const { annotationId: t, press: n, readInputs: a } = this.params, { annotations: o, panelRect: i } = a(), l = rs(o, t);
|
|
7658
7658
|
if (l === null) return null;
|
|
7659
|
-
const s =
|
|
7659
|
+
const s = Jl(l, yt(n, e, i));
|
|
7660
7660
|
return s === null ? null : {
|
|
7661
7661
|
kind: "move-drag",
|
|
7662
7662
|
annotationId: t,
|
|
@@ -7701,7 +7701,7 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7701
7701
|
kind: "select-observations",
|
|
7702
7702
|
target: e
|
|
7703
7703
|
}, $2 = (e, t, n, a, o) => {
|
|
7704
|
-
const { commands: i, selectionStore: l, store: s } = F(), c = $(), u = _((x) => x.spec.annotations), d =
|
|
7704
|
+
const { commands: i, selectionStore: l, store: s } = F(), c = $(), u = _((x) => x.spec.annotations), d = Pe[Ce()], h = j(d.graphPress), p = j({
|
|
7705
7705
|
annotations: u,
|
|
7706
7706
|
panelRect: n
|
|
7707
7707
|
}), g = j(t), v = j(o), f = ne(null);
|
|
@@ -7712,20 +7712,20 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7712
7712
|
clientY: L.clientY
|
|
7713
7713
|
}, a()).targetAtPoint, w = (L) => {
|
|
7714
7714
|
if (!(L.target instanceof Element)) return !1;
|
|
7715
|
-
const
|
|
7716
|
-
return
|
|
7717
|
-
}, y = (L,
|
|
7718
|
-
if (f.current !== null || !
|
|
7715
|
+
const M = L.target.closest(Mr);
|
|
7716
|
+
return M !== null && e.contains(M) && dt([L.target], e) === null;
|
|
7717
|
+
}, y = (L, M) => {
|
|
7718
|
+
if (f.current !== null || !Bi(p.current.annotations, M.id)) return;
|
|
7719
7719
|
try {
|
|
7720
7720
|
e.setPointerCapture(L.pointerId);
|
|
7721
7721
|
} catch {
|
|
7722
7722
|
return;
|
|
7723
7723
|
}
|
|
7724
7724
|
L.preventDefault();
|
|
7725
|
-
const
|
|
7725
|
+
const D = new H2({
|
|
7726
7726
|
handle: e,
|
|
7727
7727
|
pointerId: L.pointerId,
|
|
7728
|
-
annotationId:
|
|
7728
|
+
annotationId: M.id,
|
|
7729
7729
|
press: {
|
|
7730
7730
|
x: L.clientX,
|
|
7731
7731
|
y: L.clientY
|
|
@@ -7737,48 +7737,48 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7737
7737
|
f.current = null;
|
|
7738
7738
|
}
|
|
7739
7739
|
});
|
|
7740
|
-
f.current =
|
|
7741
|
-
}, T = (L,
|
|
7742
|
-
const
|
|
7743
|
-
switch (
|
|
7740
|
+
f.current = D, D.start();
|
|
7741
|
+
}, T = (L, M) => {
|
|
7742
|
+
const D = l.getState();
|
|
7743
|
+
switch (M.kind) {
|
|
7744
7744
|
case "select-annotation":
|
|
7745
|
-
|
|
7745
|
+
D.setSelection([M.target]), y(L, M.target);
|
|
7746
7746
|
return;
|
|
7747
7747
|
case "select-observations":
|
|
7748
7748
|
case "select-band":
|
|
7749
7749
|
case "select-guide":
|
|
7750
7750
|
case "select-graph":
|
|
7751
|
-
|
|
7751
|
+
D.setSelection([M.target]);
|
|
7752
7752
|
return;
|
|
7753
7753
|
case "clear":
|
|
7754
|
-
|
|
7754
|
+
D.clearSelection();
|
|
7755
7755
|
return;
|
|
7756
7756
|
default:
|
|
7757
|
-
throw new ji({ message: `No press outcome for: ${JSON.stringify(
|
|
7757
|
+
throw new ji({ message: `No press outcome for: ${JSON.stringify(M)}` });
|
|
7758
7758
|
}
|
|
7759
7759
|
}, C = (L) => {
|
|
7760
7760
|
if (L.button !== 0 || Gt(L.target) || Oa(L, g.current, c.getState().menuTrigger) || w(L)) return;
|
|
7761
|
-
const
|
|
7761
|
+
const M = G2(x(L), {
|
|
7762
7762
|
canSelectGraph: h.current,
|
|
7763
7763
|
isWithinFrame: L.target instanceof Node && e.contains(L.target),
|
|
7764
7764
|
caretAnnotationId: c.getState().caret?.annotationId ?? null
|
|
7765
7765
|
});
|
|
7766
|
-
|
|
7767
|
-
},
|
|
7766
|
+
M.kind !== "keep-caret" && (c.getState().setCaret(null), T(L, M));
|
|
7767
|
+
}, O = (L) => {
|
|
7768
7768
|
if (Gt(L.target) || w(L)) return;
|
|
7769
|
-
const
|
|
7770
|
-
switch (
|
|
7769
|
+
const M = x(L), { layers: D, guides: N, config: S } = s.getState().scene, b = l.getState(), U = c.getState();
|
|
7770
|
+
switch (M?.kind) {
|
|
7771
7771
|
case "observations": {
|
|
7772
|
-
const { observations: te } =
|
|
7772
|
+
const { observations: te } = M, he = D2(te, D, S.parsingLocale);
|
|
7773
7773
|
if (he === null) return;
|
|
7774
7774
|
b.setSelection([he]);
|
|
7775
7775
|
return;
|
|
7776
7776
|
}
|
|
7777
7777
|
case "axis":
|
|
7778
7778
|
case "legend": {
|
|
7779
|
-
const te = P2(
|
|
7780
|
-
layers:
|
|
7781
|
-
legends:
|
|
7779
|
+
const te = P2(M, {
|
|
7780
|
+
layers: D,
|
|
7781
|
+
legends: N.legends.drawn,
|
|
7782
7782
|
formattedAxes: v.current,
|
|
7783
7783
|
parsingLocale: S.parsingLocale
|
|
7784
7784
|
});
|
|
@@ -7787,9 +7787,9 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7787
7787
|
return;
|
|
7788
7788
|
}
|
|
7789
7789
|
case "annotation": {
|
|
7790
|
-
const { target: te } =
|
|
7790
|
+
const { target: te } = M;
|
|
7791
7791
|
if (!p.current.annotations.textAnnotations.some((he) => he.id === te.id)) return;
|
|
7792
|
-
b.setSelection([te]),
|
|
7792
|
+
b.setSelection([te]), U.setCaret(te.id);
|
|
7793
7793
|
return;
|
|
7794
7794
|
}
|
|
7795
7795
|
case "grid":
|
|
@@ -7798,8 +7798,8 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7798
7798
|
return;
|
|
7799
7799
|
}
|
|
7800
7800
|
};
|
|
7801
|
-
return document.addEventListener("pointerdown", C), document.addEventListener("dblclick",
|
|
7802
|
-
document.removeEventListener("pointerdown", C), document.removeEventListener("dblclick",
|
|
7801
|
+
return document.addEventListener("pointerdown", C), document.addEventListener("dblclick", O), () => {
|
|
7802
|
+
document.removeEventListener("pointerdown", C), document.removeEventListener("dblclick", O);
|
|
7803
7803
|
};
|
|
7804
7804
|
}, [
|
|
7805
7805
|
e,
|
|
@@ -7813,8 +7813,8 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7813
7813
|
h,
|
|
7814
7814
|
a
|
|
7815
7815
|
]);
|
|
7816
|
-
},
|
|
7817
|
-
const { selectionStore: t, commands: n, chartId: a } = F(), o = $(), i = j(_((d) => d.spec.annotations.textAnnotations)), { annotations: l } =
|
|
7816
|
+
}, W2 = (e) => {
|
|
7817
|
+
const { selectionStore: t, commands: n, chartId: a } = F(), o = $(), i = j(_((d) => d.spec.annotations.textAnnotations)), { annotations: l } = Pe[Ce()], s = ae((d) => {
|
|
7818
7818
|
const { selection: h } = t.getState(), p = l ? Vt(h) : null;
|
|
7819
7819
|
p !== null && (d.preventDefault(), n.dispatch(new _e({ id: p })), e.focus({ preventScroll: !0 }));
|
|
7820
7820
|
}, [
|
|
@@ -7852,7 +7852,7 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7852
7852
|
z(() => {
|
|
7853
7853
|
const d = (h) => {
|
|
7854
7854
|
if (!He(h.target, e, a) || Ea(h.target)) return;
|
|
7855
|
-
const p =
|
|
7855
|
+
const p = U2(h.target), g = o.getState().caret !== null && !Qe(h.target, a);
|
|
7856
7856
|
if (!(p && !g))
|
|
7857
7857
|
switch (h.key) {
|
|
7858
7858
|
case "Escape":
|
|
@@ -7875,8 +7875,8 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7875
7875
|
a,
|
|
7876
7876
|
o
|
|
7877
7877
|
]);
|
|
7878
|
-
},
|
|
7879
|
-
const n = $(), { store: a } = F(), { engine: o, overlayRef: i } = Ge(), l = j(t), { annotations: s, observationsPress: c, guidePress: u, tolerance: d } =
|
|
7878
|
+
}, U2 = (e) => e instanceof HTMLElement && (e.isContentEditable || e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement), K2 = (e, t) => {
|
|
7879
|
+
const n = $(), { store: a } = F(), { engine: o, overlayRef: i } = Ge(), l = j(t), { annotations: s, observationsPress: c, guidePress: u, tolerance: d } = Pe[Ce()];
|
|
7880
7880
|
return ae(() => ({
|
|
7881
7881
|
frameElement: e,
|
|
7882
7882
|
captureRect: i.current,
|
|
@@ -7901,7 +7901,7 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7901
7901
|
a
|
|
7902
7902
|
]);
|
|
7903
7903
|
}, q2 = () => {
|
|
7904
|
-
const e =
|
|
7904
|
+
const e = Pe[Ce()].observationMenu, t = wi((l) => e ? l.hover.primary : null), { layers: n, coordSystem: a } = _(ge((l) => ({
|
|
7905
7905
|
layers: l.layers,
|
|
7906
7906
|
coordSystem: l.coordSystem
|
|
7907
7907
|
}))), { anchorResolver: o } = F(), i = Dr();
|
|
@@ -7915,10 +7915,10 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7915
7915
|
purpose: "pin"
|
|
7916
7916
|
});
|
|
7917
7917
|
if (s === null) return null;
|
|
7918
|
-
const c =
|
|
7918
|
+
const c = Ql(l)(t.observation);
|
|
7919
7919
|
return c === null ? null : {
|
|
7920
7920
|
position: s,
|
|
7921
|
-
color:
|
|
7921
|
+
color: ws({ geom: i }, l, t.observation) ?? qi,
|
|
7922
7922
|
layer: l,
|
|
7923
7923
|
at: c,
|
|
7924
7924
|
observation: t.observation
|
|
@@ -7981,30 +7981,30 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
7981
7981
|
u
|
|
7982
7982
|
]);
|
|
7983
7983
|
}, Y2 = (e, t, n) => {
|
|
7984
|
-
const a = $(), { store: o } = F(), { store: i } = Ge(), l = j(t), s =
|
|
7984
|
+
const a = $(), { store: o } = F(), { store: i } = Ge(), l = j(t), s = Pe[Ce()].observationsPress;
|
|
7985
7985
|
z(() => (i.getState().setQueryOwnedByEditor(s), () => i.getState().setQueryOwnedByEditor(!1)), [i, s]), z(() => {
|
|
7986
7986
|
let c = null, u = null, d = !1;
|
|
7987
7987
|
const h = (C) => {
|
|
7988
7988
|
if (!s) return;
|
|
7989
|
-
const
|
|
7990
|
-
|
|
7989
|
+
const O = i.getState();
|
|
7990
|
+
O.isPointerSuspended || C === null && O.hover.primary === null || O.setHoverState(C ?? tn);
|
|
7991
7991
|
}, p = () => {
|
|
7992
7992
|
if (c = null, u === null) return;
|
|
7993
7993
|
const C = a.getState();
|
|
7994
7994
|
if (Je(C.standingInteraction)) {
|
|
7995
|
-
const
|
|
7995
|
+
const M = C.menuTrigger !== null && rn({
|
|
7996
7996
|
x: u.clientX - l.current.x,
|
|
7997
7997
|
y: u.clientY - l.current.y
|
|
7998
|
-
}, C.menuTrigger),
|
|
7999
|
-
|
|
7998
|
+
}, C.menuTrigger), D = C.editTargetUnderPointer;
|
|
7999
|
+
M ? C.setEditTargetUnderPointer({ kind: "menu-trigger" }) : D?.kind === "menu-trigger" && C.setEditTargetUnderPointer(null);
|
|
8000
8000
|
return;
|
|
8001
8001
|
}
|
|
8002
8002
|
d && (d = !1, u = {
|
|
8003
8003
|
...u,
|
|
8004
8004
|
target: J2(u)
|
|
8005
8005
|
});
|
|
8006
|
-
const { targetAtPoint:
|
|
8007
|
-
C.setEditTargetUnderPointer(
|
|
8006
|
+
const { targetAtPoint: O, hover: L } = fo(u, n());
|
|
8007
|
+
C.setEditTargetUnderPointer(O), h(L);
|
|
8008
8008
|
}, g = () => {
|
|
8009
8009
|
c === null && (c = requestAnimationFrame(p));
|
|
8010
8010
|
}, v = () => {
|
|
@@ -8019,10 +8019,10 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
8019
8019
|
}, d = !1, g();
|
|
8020
8020
|
}, w = () => {
|
|
8021
8021
|
u = null, c !== null && (cancelAnimationFrame(c), c = null), f();
|
|
8022
|
-
}, y = a.subscribe((C,
|
|
8023
|
-
Je(
|
|
8024
|
-
}), T = o.subscribe((C,
|
|
8025
|
-
C.scene !==
|
|
8022
|
+
}, y = a.subscribe((C, O) => {
|
|
8023
|
+
Je(O.standingInteraction) && !Je(C.standingInteraction) && v();
|
|
8024
|
+
}), T = o.subscribe((C, O) => {
|
|
8025
|
+
C.scene !== O.scene && (Je(a.getState().standingInteraction) || v());
|
|
8026
8026
|
});
|
|
8027
8027
|
return e.addEventListener("pointermove", x), e.addEventListener("pointerleave", w), () => {
|
|
8028
8028
|
c !== null && cancelAnimationFrame(c), y(), T(), e.removeEventListener("pointermove", x), e.removeEventListener("pointerleave", w), f();
|
|
@@ -8050,8 +8050,8 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
8050
8050
|
return !1;
|
|
8051
8051
|
}
|
|
8052
8052
|
}, ur = "editor", hr = [], Q2 = (e, t, n, a, o) => {
|
|
8053
|
-
const i = bo(), { store: l } = Ge(), s = Qt().length > 0, c =
|
|
8054
|
-
Y2(e, t, p), $2(e, t, n, p, o), j2(i, t, n), L2(e),
|
|
8053
|
+
const i = bo(), { store: l } = Ge(), s = Qt().length > 0, c = Pe[Ce()].holdsHoverWhileSelected, u = X((v) => v.menuTrigger), d = i.kind === "menu", h = I(() => u === null ? hr : [Kl(u)], [u]), p = K2(e, t);
|
|
8054
|
+
Y2(e, t, p), $2(e, t, n, p, o), j2(i, t, n), L2(e), W2(e), T2(e, a), z(() => (l.getState().publishPointerRegions(ur, h), () => l.getState().publishPointerRegions(ur, hr)), [l, h]);
|
|
8055
8055
|
const g = d || s && c;
|
|
8056
8056
|
z(() => (l.getState().setPointerSuspended(g), () => l.getState().setPointerSuspended(!1)), [l, g]), z(() => {
|
|
8057
8057
|
if (!s || !c) return;
|
|
@@ -8063,7 +8063,7 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
8063
8063
|
c
|
|
8064
8064
|
]);
|
|
8065
8065
|
}, em = ({ frameElement: e, panelRect: t, formattedAxes: n, shouldAnimateTransitions: a }) => {
|
|
8066
|
-
const { measureRef: o, screenRect: i } =
|
|
8066
|
+
const { measureRef: o, screenRect: i } = vi(), { selectionStore: l } = F(), s = $(), c = X((h) => h.caret?.annotationId ?? null), u = Ce(), d = ne(u);
|
|
8067
8067
|
return z(() => (o(e), () => o(null)), [o, e]), z(() => () => {
|
|
8068
8068
|
const h = s.getState();
|
|
8069
8069
|
h.releaseInteraction("menu"), h.setCaret(null);
|
|
@@ -8087,7 +8087,7 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
8087
8087
|
shouldAnimateTransitions: a
|
|
8088
8088
|
})] });
|
|
8089
8089
|
}, tm = ({ annotationId: e, panelRect: t }) => {
|
|
8090
|
-
const n = $(), { textAnnotations: a } =
|
|
8090
|
+
const n = $(), { textAnnotations: a } = Le(t);
|
|
8091
8091
|
return z(() => {
|
|
8092
8092
|
a.some(({ id: o }) => o === e) || n.getState().setCaret(null);
|
|
8093
8093
|
}, [
|
|
@@ -8114,7 +8114,7 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
8114
8114
|
shouldAnimateTransitions: o
|
|
8115
8115
|
});
|
|
8116
8116
|
}, rm = ({ frameElement: e, frameRect: t, panelOrigin: n, panelRect: a, boxRef: o, shouldAnimateTransitions: i }) => {
|
|
8117
|
-
const l = vt(), s = bo(), { annotations: c, editOutline: u, overlayMenu: d } =
|
|
8117
|
+
const l = vt(), s = bo(), { annotations: c, editOutline: u, overlayMenu: d } = Pe[Ce()], h = I(() => ({
|
|
8118
8118
|
width: t.width,
|
|
8119
8119
|
height: t.height
|
|
8120
8120
|
}), [t.width, t.height]);
|
|
@@ -8125,7 +8125,7 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
8125
8125
|
shouldAnimateTransitions: i
|
|
8126
8126
|
}), /* @__PURE__ */ r(ph, { frameRect: t })] }), /* @__PURE__ */ r(di, {
|
|
8127
8127
|
rect: t,
|
|
8128
|
-
zIndex:
|
|
8128
|
+
zIndex: ei.editorOverlay,
|
|
8129
8129
|
container: l,
|
|
8130
8130
|
"data-testid": "editor-overlay",
|
|
8131
8131
|
boxRef: o,
|
|
@@ -8170,8 +8170,8 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
8170
8170
|
] })
|
|
8171
8171
|
})] });
|
|
8172
8172
|
}, D5 = ({ slots: e, mode: t, ...n }) => /* @__PURE__ */ r(Cc, {
|
|
8173
|
-
locale:
|
|
8174
|
-
children: /* @__PURE__ */ r(ui, { children: /* @__PURE__ */ r(
|
|
8173
|
+
locale: Li(),
|
|
8174
|
+
children: /* @__PURE__ */ r(ui, { children: /* @__PURE__ */ r(Hi, {
|
|
8175
8175
|
editors: tu,
|
|
8176
8176
|
children: /* @__PURE__ */ r(Mi, {
|
|
8177
8177
|
slots: I(() => ({
|
|
@@ -8195,8 +8195,8 @@ var b2 = "_1tyillx1", y2 = {
|
|
|
8195
8195
|
value: a,
|
|
8196
8196
|
children: n
|
|
8197
8197
|
});
|
|
8198
|
-
},
|
|
8199
|
-
const o = ze(yo), i =
|
|
8198
|
+
}, xe = ({ id: e, ariaLabel: t, ariaLabelledBy: n }, a = !0) => {
|
|
8199
|
+
const o = ze(yo), i = Te(), [l] = ee(() => a ? o?.claimControlId(i) ?? !1 : !1), s = e ?? (l ? o?.controlId : void 0), c = n ?? (t === void 0 ? o?.labelId : void 0);
|
|
8200
8200
|
return {
|
|
8201
8201
|
...s !== void 0 && { id: s },
|
|
8202
8202
|
...t !== void 0 && { "aria-label": t },
|
|
@@ -8207,7 +8207,7 @@ var am = {
|
|
|
8207
8207
|
default: "woi4bh4 woi4bh3",
|
|
8208
8208
|
tile: "woi4bh5 woi4bh3"
|
|
8209
8209
|
}, om = ({ label: e, icon: t, onClick: n, variant: a = "default", isDisabled: o, ariaLabel: i, ariaLabelledBy: l, id: s }) => {
|
|
8210
|
-
const c =
|
|
8210
|
+
const c = xe({
|
|
8211
8211
|
id: s,
|
|
8212
8212
|
ariaLabel: i,
|
|
8213
8213
|
ariaLabelledBy: l
|
|
@@ -8235,7 +8235,7 @@ var am = {
|
|
|
8235
8235
|
return /* @__PURE__ */ r("div", {
|
|
8236
8236
|
onKeyDown: (i) => {
|
|
8237
8237
|
if (t?.(i), !a || i.defaultPrevented) return;
|
|
8238
|
-
const l =
|
|
8238
|
+
const l = ki(i.nativeEvent);
|
|
8239
8239
|
l && (i.preventDefault(), l === "undo" ? a.undo() : a.redo());
|
|
8240
8240
|
},
|
|
8241
8241
|
...n,
|
|
@@ -8272,7 +8272,7 @@ var am = {
|
|
|
8272
8272
|
};
|
|
8273
8273
|
}, im = "eh8dvc0", lm = "eh8dvc1 uz3g760", sm = "eh8dvc2 uz3g761";
|
|
8274
8274
|
var cm = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, placeholder: l, prefix: s, suffix: c, isDisabled: u, hasError: d, ariaLabel: h, ariaLabelledBy: p, id: g }) => {
|
|
8275
|
-
const v =
|
|
8275
|
+
const v = xe({
|
|
8276
8276
|
id: g,
|
|
8277
8277
|
ariaLabel: h,
|
|
8278
8278
|
ariaLabelledBy: p
|
|
@@ -8320,7 +8320,7 @@ var cm = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, placeho
|
|
|
8320
8320
|
6: "_1b7s5f6"
|
|
8321
8321
|
}, um = "_1b7s5f7";
|
|
8322
8322
|
var hm = 6, pm = ({ options: e, value: t, onChange: n, onCommit: a, columns: o, itemLayout: i = "tile", isDisabled: l, ariaLabel: s, ariaLabelledBy: c, id: u }) => {
|
|
8323
|
-
const d =
|
|
8323
|
+
const d = xe({
|
|
8324
8324
|
id: u,
|
|
8325
8325
|
ariaLabel: s,
|
|
8326
8326
|
ariaLabelledBy: c
|
|
@@ -8362,7 +8362,7 @@ var hm = 6, pm = ({ options: e, value: t, onChange: n, onCommit: a, columns: o,
|
|
|
8362
8362
|
}
|
|
8363
8363
|
}, gm = "_1g5x15w0 uz3g760", vm = "_1g5x15w1", fm = "_1g5x15w2", pr = "_1g5x15w3", bm = "_1g5x15w4", ym = "_1g5x15w5", Sm = "_1g5x15w6", Cm = "_1g5x15w7";
|
|
8364
8364
|
var xm = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: s, id: c }) => {
|
|
8365
|
-
const u =
|
|
8365
|
+
const u = xe({
|
|
8366
8366
|
id: c,
|
|
8367
8367
|
ariaLabel: l,
|
|
8368
8368
|
ariaLabelledBy: s
|
|
@@ -8422,7 +8422,7 @@ var xm = ({ options: e, value: t, onChange: n, placeholder: a, isDisabled: o, ha
|
|
|
8422
8422
|
children: n
|
|
8423
8423
|
}) : Am(e, t), Am = (e, t) => e.find((n) => n.value === t)?.label ?? t, Tm = "vod76w0", km = "vod76w1", Lm = "vod76w2", Pm = "vod76w3", Im = "vod76w4", Em = "vod76w5";
|
|
8424
8424
|
var Om = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix: l, formatValue: s, isDisabled: c, ariaLabel: u, ariaLabelledBy: d }) => {
|
|
8425
|
-
const h =
|
|
8425
|
+
const h = xe({
|
|
8426
8426
|
ariaLabel: u,
|
|
8427
8427
|
ariaLabelledBy: d
|
|
8428
8428
|
}, !1), p = Mm(e, l, s), { commitUnlessHeldKey: g, gestureHandlers: v } = St(n);
|
|
@@ -8456,7 +8456,7 @@ var Om = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
|
|
|
8456
8456
|
})]
|
|
8457
8457
|
});
|
|
8458
8458
|
}, Mm = (e, t, n) => n !== void 0 ? n(e) : t !== void 0 ? `${e}${t}` : null, Nm = "_1hyrlw60", Rm = "_1hyrlw61", Dm = ({ isChecked: e, onChange: t, isDisabled: n, ariaLabel: a, ariaLabelledBy: o, id: i }) => {
|
|
8459
|
-
const l =
|
|
8459
|
+
const l = xe({
|
|
8460
8460
|
id: i,
|
|
8461
8461
|
ariaLabel: a,
|
|
8462
8462
|
ariaLabelledBy: o
|
|
@@ -8470,7 +8470,7 @@ var Om = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
|
|
|
8470
8470
|
children: /* @__PURE__ */ r(Nn.Thumb, { className: Rm })
|
|
8471
8471
|
});
|
|
8472
8472
|
}, _m = "uz3g761", zm = "tpcnun0 uz3g760", Fm = ({ value: e, onChange: t, onCommit: n, placeholder: a, isDisabled: o, hasError: i, ariaLabel: l, ariaLabelledBy: s, id: c }) => {
|
|
8473
|
-
const u =
|
|
8473
|
+
const u = xe({
|
|
8474
8474
|
id: c,
|
|
8475
8475
|
ariaLabel: l,
|
|
8476
8476
|
ariaLabelledBy: s
|
|
@@ -8491,7 +8491,7 @@ var Om = ({ value: e, onChange: t, onCommit: n, min: a, max: o, step: i, suffix:
|
|
|
8491
8491
|
});
|
|
8492
8492
|
}, Bm = "cnu9yl0", Hm = "cnu9yl1";
|
|
8493
8493
|
var Gm = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inline", isDisabled: i, ariaLabel: l, ariaLabelledBy: s, id: c }) => {
|
|
8494
|
-
const u =
|
|
8494
|
+
const u = xe({
|
|
8495
8495
|
id: c,
|
|
8496
8496
|
ariaLabel: l,
|
|
8497
8497
|
ariaLabelledBy: s
|
|
@@ -8537,12 +8537,12 @@ var Gm = ({ options: e, value: t, onChange: n, onCommit: a, itemLayout: o = "inl
|
|
|
8537
8537
|
value: n,
|
|
8538
8538
|
children: t
|
|
8539
8539
|
});
|
|
8540
|
-
}, G = () => ze(To),
|
|
8541
|
-
className: Um,
|
|
8542
|
-
children: e
|
|
8543
|
-
}), Wm = "_139ohwv0", J = ({ children: e }) => /* @__PURE__ */ r("div", {
|
|
8540
|
+
}, G = () => ze(To), Wm = "_12lhx9e0", ko = ({ children: e }) => /* @__PURE__ */ r("div", {
|
|
8544
8541
|
className: Wm,
|
|
8545
8542
|
children: e
|
|
8543
|
+
}), Um = "_139ohwv0", J = ({ children: e }) => /* @__PURE__ */ r("div", {
|
|
8544
|
+
className: Um,
|
|
8545
|
+
children: e
|
|
8546
8546
|
}), Lo = Ve(null), Km = Lo.Provider, qm = () => {
|
|
8547
8547
|
const e = ze(Lo);
|
|
8548
8548
|
if (!e) throw new Error("A section must be rendered inside <EditorPanel.Root>.");
|
|
@@ -8557,7 +8557,7 @@ function Ym(e) {
|
|
|
8557
8557
|
return t.includes("_1ii3bsb0") || t.includes("_1ii3bsb1");
|
|
8558
8558
|
}
|
|
8559
8559
|
var Jm = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = void 0, className: o }) => {
|
|
8560
|
-
const i =
|
|
8560
|
+
const i = pi(e), { themeClass: l, inlineVarsStyle: s } = en(), [c, u] = ee(() => a ? [a] : []), d = I(() => ({
|
|
8561
8561
|
expandSection: (h) => u([h]),
|
|
8562
8562
|
collapseAllSections: () => u([])
|
|
8563
8563
|
}), []);
|
|
@@ -8588,7 +8588,7 @@ var Jm = ({ handle: e, children: t, controls: n, defaultExpandedSection: a = voi
|
|
|
8588
8588
|
plain: "pr583x4 pr583x3",
|
|
8589
8589
|
withIcon: "pr583x5 pr583x3"
|
|
8590
8590
|
}, A = ({ label: e, layout: t = "grid", icon: n, children: a }) => {
|
|
8591
|
-
const o =
|
|
8591
|
+
const o = Te(), i = Te();
|
|
8592
8592
|
return e === void 0 ? /* @__PURE__ */ r("div", {
|
|
8593
8593
|
className: mr[t],
|
|
8594
8594
|
children: /* @__PURE__ */ r("div", {
|
|
@@ -8655,7 +8655,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
8655
8655
|
]
|
|
8656
8656
|
}), /* @__PURE__ */ r("div", { children: i })]
|
|
8657
8657
|
}), og = ({ title: e, accessory: t, children: n }) => {
|
|
8658
|
-
const a =
|
|
8658
|
+
const a = Te(), o = Te();
|
|
8659
8659
|
return /* @__PURE__ */ r("div", {
|
|
8660
8660
|
className: bn,
|
|
8661
8661
|
children: /* @__PURE__ */ m("div", {
|
|
@@ -8746,14 +8746,14 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
8746
8746
|
x: "editor.axesPanel.mainAxisSection.xAxis",
|
|
8747
8747
|
y: "editor.axesPanel.mainAxisSection.yAxis"
|
|
8748
8748
|
}, vr = ({ axis: e, title: t, layout: n = "collapsible", preview: a }) => {
|
|
8749
|
-
const o = H(), i =
|
|
8749
|
+
const o = H(), i = W(o), l = E(), { NumberField: s, Switch: c, TextField: u, ToggleGroup: d } = G();
|
|
8750
8750
|
if (!i) return null;
|
|
8751
8751
|
const h = i.coordSystem.type === "polar" ? i.coordSystem.axisMapping[e].geometry : "linear", p = i.config.axes[e], g = i.scales[e], v = g?.spec, f = v?.scaleType === "continuous" ? v : void 0;
|
|
8752
8752
|
if (h === "circular" || h === "radial" && f === void 0) return null;
|
|
8753
|
-
const x = v !== void 0 && "reverse" in v ? v : void 0, w = v?.scaleType === "continuous" || v?.scaleType === "datetime", y = f !== void 0 &&
|
|
8753
|
+
const x = v !== void 0 && "reverse" in v ? v : void 0, w = v?.scaleType === "continuous" || v?.scaleType === "datetime", y = f !== void 0 && bs(i, e), T = f?.transform === "log", C = f?.domainMax ?? null, O = ug(f), L = (P, le) => P.map((Ke) => ({
|
|
8754
8754
|
value: Ke,
|
|
8755
8755
|
label: le(Ke)
|
|
8756
|
-
})),
|
|
8756
|
+
})), M = i.guides.axes.find((P) => P.scaleAestheticKey === e)?.position, D = sg[M === "bottom" || M === "top" || M === void 0 && e === "x" ? "horizontal" : "vertical"], N = e === "y" ? Ss(i.spec) : null, S = N === null ? void 0 : ye(i.spec.layers, N), b = i.guides.legends.drawn.some((P) => D.some((le) => le === P.position)), U = D.map((P) => ({
|
|
8757
8757
|
value: P,
|
|
8758
8758
|
label: l(cg[P])
|
|
8759
8759
|
})), te = L(["auto", "edges"], (P) => l(P === "edges" ? "editor.axesPanel.labelMode.edges" : "editor.axesPanel.labelMode.auto")), he = L(["linear", "log"], (P) => l(P === "log" ? "editor.axesPanel.scale.log" : "editor.axesPanel.scale.auto")), Ro = L([
|
|
@@ -8795,9 +8795,9 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
8795
8795
|
scaledAesthetic: e,
|
|
8796
8796
|
...P
|
|
8797
8797
|
}), { transient: !0 });
|
|
8798
|
-
}, Uo = (P) => {
|
|
8799
|
-
P !== null && xn({ domainMin: P });
|
|
8800
8798
|
}, Wo = (P) => {
|
|
8799
|
+
P !== null && xn({ domainMin: P });
|
|
8800
|
+
}, Uo = (P) => {
|
|
8801
8801
|
P !== null && xn({ domainMax: P });
|
|
8802
8802
|
}, Ko = (P) => {
|
|
8803
8803
|
const le = P === "auto" ? null : P === "zero" ? 0 : fr(g?.domain, "start");
|
|
@@ -8817,7 +8817,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
8817
8817
|
yScaleType: P === "double" ? "secondary" : "primary"
|
|
8818
8818
|
}));
|
|
8819
8819
|
}, Zo = (P) => {
|
|
8820
|
-
const le =
|
|
8820
|
+
const le = D.find((Ke) => Ke === P);
|
|
8821
8821
|
le && o.commands.dispatch(new rl({
|
|
8822
8822
|
axis: e,
|
|
8823
8823
|
position: le
|
|
@@ -8868,8 +8868,8 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
8868
8868
|
f && h === "linear" && !b && /* @__PURE__ */ r(A, {
|
|
8869
8869
|
label: l("editor.axesPanel.controls.position"),
|
|
8870
8870
|
children: /* @__PURE__ */ r(d, {
|
|
8871
|
-
value:
|
|
8872
|
-
options:
|
|
8871
|
+
value: M ?? p.position,
|
|
8872
|
+
options: U,
|
|
8873
8873
|
onChange: Zo
|
|
8874
8874
|
})
|
|
8875
8875
|
}),
|
|
@@ -8893,15 +8893,15 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
8893
8893
|
!y && /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r(A, {
|
|
8894
8894
|
label: l("editor.axesPanel.controls.startFrom"),
|
|
8895
8895
|
children: /* @__PURE__ */ r(d, {
|
|
8896
|
-
value:
|
|
8896
|
+
value: O,
|
|
8897
8897
|
options: Ro,
|
|
8898
8898
|
onChange: Ko
|
|
8899
8899
|
})
|
|
8900
|
-
}),
|
|
8900
|
+
}), O !== "auto" && /* @__PURE__ */ r(A, {
|
|
8901
8901
|
label: l("editor.axesPanel.controls.value"),
|
|
8902
8902
|
children: /* @__PURE__ */ r(s, {
|
|
8903
8903
|
value: f.domainMin ?? null,
|
|
8904
|
-
onChange:
|
|
8904
|
+
onChange: Wo,
|
|
8905
8905
|
onCommit: o.commands.commit
|
|
8906
8906
|
})
|
|
8907
8907
|
})] }),
|
|
@@ -8917,7 +8917,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
8917
8917
|
label: l("editor.axesPanel.controls.value"),
|
|
8918
8918
|
children: /* @__PURE__ */ r(s, {
|
|
8919
8919
|
value: C,
|
|
8920
|
-
onChange:
|
|
8920
|
+
onChange: Uo,
|
|
8921
8921
|
onCommit: o.commands.commit
|
|
8922
8922
|
})
|
|
8923
8923
|
})
|
|
@@ -8942,7 +8942,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
8942
8942
|
})
|
|
8943
8943
|
});
|
|
8944
8944
|
}, hg = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
8945
|
-
const a = H(), o =
|
|
8945
|
+
const a = H(), o = W(a), i = E(), { Switch: l } = G();
|
|
8946
8946
|
if (!o) return null;
|
|
8947
8947
|
const s = o.config.content, c = (d) => {
|
|
8948
8948
|
a.commands.dispatch(new ut({
|
|
@@ -8968,7 +8968,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
8968
8968
|
})] })
|
|
8969
8969
|
});
|
|
8970
8970
|
}, br = /^[a-z][a-z\d+.-]*:/i, pg = {}, mg = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
8971
|
-
const a = H(), o =
|
|
8971
|
+
const a = H(), o = W(a), i = E(), { Switch: l } = G();
|
|
8972
8972
|
if (!o) return null;
|
|
8973
8973
|
const s = o.config.content, c = (u) => {
|
|
8974
8974
|
a.commands.dispatch(new ut({
|
|
@@ -9011,7 +9011,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9011
9011
|
value: e.url ?? "",
|
|
9012
9012
|
onChange: l,
|
|
9013
9013
|
onCommit: i,
|
|
9014
|
-
hasError: br.test(e.url ?? "") && !
|
|
9014
|
+
hasError: br.test(e.url ?? "") && !fs(e.url)
|
|
9015
9015
|
})
|
|
9016
9016
|
}), /* @__PURE__ */ r(A, {
|
|
9017
9017
|
label: n("editor.elementsPanel.sourceSection.name"),
|
|
@@ -9022,7 +9022,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9022
9022
|
})
|
|
9023
9023
|
})] });
|
|
9024
9024
|
}, vg = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
9025
|
-
const a = H(), o =
|
|
9025
|
+
const a = H(), o = W(a), i = E(), { Switch: l } = G();
|
|
9026
9026
|
if (!o) return null;
|
|
9027
9027
|
const s = o.config.content, c = (d) => {
|
|
9028
9028
|
a.commands.dispatch(new ut({
|
|
@@ -9048,13 +9048,13 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9048
9048
|
})] })
|
|
9049
9049
|
});
|
|
9050
9050
|
}, Ct = (e) => {
|
|
9051
|
-
const { colorScheme: t } = en(), n = I(() =>
|
|
9051
|
+
const { colorScheme: t } = en(), n = I(() => ts({ colorScheme: t }), [t]);
|
|
9052
9052
|
return I(() => e === null ? null : n.readers(e), [e, n]);
|
|
9053
9053
|
}, Cn = (e, t, n) => {
|
|
9054
9054
|
const a = Ct(e);
|
|
9055
9055
|
return I(() => {
|
|
9056
9056
|
if (a === null || e === null || t === null) return null;
|
|
9057
|
-
const o =
|
|
9057
|
+
const o = ye(e.layers, t);
|
|
9058
9058
|
return o === void 0 ? null : a.geom[n](o);
|
|
9059
9059
|
}, [
|
|
9060
9060
|
a,
|
|
@@ -9062,7 +9062,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9062
9062
|
t,
|
|
9063
9063
|
n
|
|
9064
9064
|
]);
|
|
9065
|
-
},
|
|
9065
|
+
}, Ut = [
|
|
9066
9066
|
0.8,
|
|
9067
9067
|
1,
|
|
9068
9068
|
1.2,
|
|
@@ -9073,17 +9073,17 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9073
9073
|
2.5,
|
|
9074
9074
|
3,
|
|
9075
9075
|
4
|
|
9076
|
-
], fg =
|
|
9077
|
-
const a = H(), o =
|
|
9076
|
+
], fg = Ut.length / 2, bg = { select: { target: "graph" } }, yg = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
9077
|
+
const a = H(), o = W(a), i = E(), { RadioGrid: l } = G(), s = Ct(o);
|
|
9078
9078
|
if (!o || !s) return null;
|
|
9079
|
-
const c = s.graph().get("textScale"), u = (p) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${p}` }), d =
|
|
9079
|
+
const c = s.graph().get("textScale"), u = (p) => i("editor.elementsPanel.textSizeSection.scaleFormat", { value: `${p}` }), d = Ut.map((p) => ({
|
|
9080
9080
|
value: `${p}`,
|
|
9081
9081
|
label: u(p)
|
|
9082
9082
|
})), h = (p) => {
|
|
9083
|
-
const g =
|
|
9083
|
+
const g = Ut.find((f) => `${f}` === p);
|
|
9084
9084
|
if (g === void 0) return;
|
|
9085
|
-
const v =
|
|
9086
|
-
a.commands.dispatch(new
|
|
9085
|
+
const v = Se(o.spec.styles.overrides, bg)?.declarations ?? {};
|
|
9086
|
+
a.commands.dispatch(new Ae({
|
|
9087
9087
|
list: "overrides",
|
|
9088
9088
|
rule: {
|
|
9089
9089
|
select: { target: "graph" },
|
|
@@ -9107,7 +9107,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9107
9107
|
})
|
|
9108
9108
|
});
|
|
9109
9109
|
}, Sg = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
9110
|
-
const a = H(), o =
|
|
9110
|
+
const a = H(), o = W(a), i = E(), { Switch: l } = G();
|
|
9111
9111
|
if (!o) return null;
|
|
9112
9112
|
const s = o.config.content, c = (d) => {
|
|
9113
9113
|
a.commands.dispatch(new ut({
|
|
@@ -9145,14 +9145,14 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9145
9145
|
...t,
|
|
9146
9146
|
children: e ?? /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r(vr, { axis: "x" }), /* @__PURE__ */ r(vr, { axis: "y" })] })
|
|
9147
9147
|
}), xt = (e) => `${e}px`, Eo = (e) => `${Math.round(e * 100)}%`, Cg = (e) => `${e}°`, xg = 24, wg = { select: { target: "graph" } }, yr = ["dim", "desaturate"], F5 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
9148
|
-
const a = H(), o =
|
|
9148
|
+
const a = H(), o = W(a), i = E(), { Slider: l, ToggleGroup: s } = G(), c = Ct(o);
|
|
9149
9149
|
if (!o || !c) return null;
|
|
9150
|
-
const u = c.graph().get("cornerRadius"), d =
|
|
9150
|
+
const u = c.graph().get("cornerRadius"), d = As(o.spec), h = yr.map((v) => ({
|
|
9151
9151
|
value: v,
|
|
9152
9152
|
label: i(v === "dim" ? "editor.highlighting.highlightStyle.tint" : "editor.highlighting.highlightStyle.gray")
|
|
9153
9153
|
})), p = (v) => {
|
|
9154
|
-
const f =
|
|
9155
|
-
a.commands.dispatch(new
|
|
9154
|
+
const f = Se(o.spec.styles.overrides, wg)?.declarations ?? {};
|
|
9155
|
+
a.commands.dispatch(new Ae({
|
|
9156
9156
|
list: "overrides",
|
|
9157
9157
|
rule: {
|
|
9158
9158
|
select: { target: "graph" },
|
|
@@ -9191,7 +9191,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9191
9191
|
})] })
|
|
9192
9192
|
});
|
|
9193
9193
|
}, Ag = 0.05, B5 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
9194
|
-
const a = H(), o =
|
|
9194
|
+
const a = H(), o = W(a), i = E(), { Slider: l, ToggleGroup: s } = G(), c = o ? Xr(o.spec.layers, "bar") : void 0, u = Cn(o, c?.id ?? null, "bar");
|
|
9195
9195
|
if (!o || !c || o.coordSystem.type === "polar" && o.coordSystem.bandAxis === null) return null;
|
|
9196
9196
|
const d = (f) => {
|
|
9197
9197
|
a.commands.dispatch(new sl({
|
|
@@ -9234,7 +9234,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9234
9234
|
})] })
|
|
9235
9235
|
});
|
|
9236
9236
|
}, wt = ({ children: e }) => {
|
|
9237
|
-
const t =
|
|
9237
|
+
const t = Te();
|
|
9238
9238
|
return /* @__PURE__ */ m(Y, { children: [/* @__PURE__ */ r("g", {
|
|
9239
9239
|
filter: `url(#${t})`,
|
|
9240
9240
|
children: e
|
|
@@ -9319,7 +9319,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9319
9319
|
x: 0.6,
|
|
9320
9320
|
y: 0.4
|
|
9321
9321
|
}, Dg = "relative-difference", H5 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
9322
|
-
const a = H(), o =
|
|
9322
|
+
const a = H(), o = W(a), i = E(), { Button: l } = G();
|
|
9323
9323
|
if (!o) return null;
|
|
9324
9324
|
const s = () => {
|
|
9325
9325
|
a.commands.dispatch(new fe({
|
|
@@ -9362,7 +9362,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9362
9362
|
}
|
|
9363
9363
|
}));
|
|
9364
9364
|
}, d = () => {
|
|
9365
|
-
const p =
|
|
9365
|
+
const p = ms(o);
|
|
9366
9366
|
p !== null && a.commands.dispatch(new fe({
|
|
9367
9367
|
kind: "differenceArrow",
|
|
9368
9368
|
annotation: {
|
|
@@ -9413,10 +9413,10 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9413
9413
|
}]
|
|
9414
9414
|
}]
|
|
9415
9415
|
}), G5 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
9416
|
-
const a = H(), o =
|
|
9416
|
+
const a = H(), o = W(a), i = E(), { ToggleGroup: l } = G();
|
|
9417
9417
|
if (!o) return null;
|
|
9418
9418
|
const s = Yr(o.spec);
|
|
9419
|
-
if (s === null || !
|
|
9419
|
+
if (s === null || !we(s)) return null;
|
|
9420
9420
|
const c = kn.map((d) => ({
|
|
9421
9421
|
value: d,
|
|
9422
9422
|
label: i(`editor.graphPanel.comboSection.types.${d}`)
|
|
@@ -9439,9 +9439,9 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9439
9439
|
})
|
|
9440
9440
|
});
|
|
9441
9441
|
}, zg = 0.1, Fg = 20, V5 = ({ title: e, preview: t }) => {
|
|
9442
|
-
const n = H(), a =
|
|
9442
|
+
const n = H(), a = W(n), o = E(), { NumberField: i, TextField: l } = G();
|
|
9443
9443
|
if (!a || a.coordSystem.type === "polar") return null;
|
|
9444
|
-
const s =
|
|
9444
|
+
const s = os(a.spec.layers), c = e ?? o("editor.annotationsPanel.goalSection.title"), u = xs(s?.mapping.y), d = typeof u == "number" ? u : null, h = (v) => {
|
|
9445
9445
|
const f = new Bl({
|
|
9446
9446
|
showGoalLine: v,
|
|
9447
9447
|
value: Bg(a),
|
|
@@ -9496,36 +9496,36 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9496
9496
|
const i = Math.min(Fg, Math.max(0, 1 - Math.floor(Math.log10(o))));
|
|
9497
9497
|
return Number((n + o * zg).toFixed(i));
|
|
9498
9498
|
}, $5 = ({ layerId: e, title: t, layout: n = "collapsible", preview: a }) => {
|
|
9499
|
-
const o = H(), i =
|
|
9499
|
+
const o = H(), i = W(o), l = E(), { Switch: s } = G();
|
|
9500
9500
|
if (!i) return null;
|
|
9501
|
-
const c = e === void 0 ? i.spec.layers[0] :
|
|
9501
|
+
const c = e === void 0 ? i.spec.layers[0] : ye(i.spec.layers, e);
|
|
9502
9502
|
if (!c) return null;
|
|
9503
|
-
const { showDataLabels: u, format: d, showStackTotals: h, showCategoryLabels: p } = c.dataLabels, g = i.coordSystem.type
|
|
9504
|
-
if (!
|
|
9505
|
-
const
|
|
9506
|
-
const
|
|
9503
|
+
const { showDataLabels: u, format: d, showStackTotals: h, showCategoryLabels: p } = c.dataLabels, g = i.coordSystem.type, v = g === "polar", f = c.geom === "bar", x = f && !v && c.position === "stack", w = f && (!v || u), y = ye(i.layers, c.id), T = y !== void 0 && o.canFormatDataLabelsAsPercentages(y, g);
|
|
9504
|
+
if (!o.canPlaceDataLabels(c.geom, g)) return null;
|
|
9505
|
+
const C = (D) => {
|
|
9506
|
+
const N = new Fl({
|
|
9507
9507
|
layerId: c.id,
|
|
9508
|
-
showDataLabels:
|
|
9508
|
+
showDataLabels: D
|
|
9509
9509
|
});
|
|
9510
|
-
o.commands.dispatch(
|
|
9511
|
-
},
|
|
9512
|
-
const
|
|
9510
|
+
o.commands.dispatch(N);
|
|
9511
|
+
}, O = (D) => {
|
|
9512
|
+
const N = new dl({
|
|
9513
9513
|
layerId: c.id,
|
|
9514
|
-
format:
|
|
9514
|
+
format: D ? "percentage" : "absolute"
|
|
9515
9515
|
});
|
|
9516
|
-
o.commands.dispatch(
|
|
9517
|
-
},
|
|
9518
|
-
const
|
|
9516
|
+
o.commands.dispatch(N);
|
|
9517
|
+
}, L = (D) => {
|
|
9518
|
+
const N = new Vl({
|
|
9519
9519
|
layerId: c.id,
|
|
9520
|
-
showStackTotals:
|
|
9520
|
+
showStackTotals: D
|
|
9521
9521
|
});
|
|
9522
|
-
o.commands.dispatch(
|
|
9523
|
-
},
|
|
9524
|
-
const
|
|
9522
|
+
o.commands.dispatch(N);
|
|
9523
|
+
}, M = (D) => {
|
|
9524
|
+
const N = new zl({
|
|
9525
9525
|
layerId: c.id,
|
|
9526
|
-
showCategoryLabels:
|
|
9526
|
+
showCategoryLabels: D
|
|
9527
9527
|
});
|
|
9528
|
-
o.commands.dispatch(
|
|
9528
|
+
o.commands.dispatch(N);
|
|
9529
9529
|
};
|
|
9530
9530
|
return /* @__PURE__ */ r(K, {
|
|
9531
9531
|
title: t ?? l("editor.graphPanel.graphOptionsSection.title"),
|
|
@@ -9536,28 +9536,28 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9536
9536
|
label: l("editor.graphPanel.graphOptions.dataLabels"),
|
|
9537
9537
|
children: /* @__PURE__ */ r(s, {
|
|
9538
9538
|
isChecked: u,
|
|
9539
|
-
onChange:
|
|
9539
|
+
onChange: C
|
|
9540
9540
|
})
|
|
9541
9541
|
}),
|
|
9542
|
-
u &&
|
|
9542
|
+
u && T && /* @__PURE__ */ r(A, {
|
|
9543
9543
|
label: l("editor.graphPanel.graphOptions.showPercentages"),
|
|
9544
9544
|
children: /* @__PURE__ */ r(s, {
|
|
9545
9545
|
isChecked: d === "percentage",
|
|
9546
|
-
onChange:
|
|
9546
|
+
onChange: O
|
|
9547
9547
|
})
|
|
9548
9548
|
}),
|
|
9549
9549
|
x && /* @__PURE__ */ r(A, {
|
|
9550
9550
|
label: l("editor.graphPanel.graphOptions.stackTotals"),
|
|
9551
9551
|
children: /* @__PURE__ */ r(s, {
|
|
9552
9552
|
isChecked: h,
|
|
9553
|
-
onChange:
|
|
9553
|
+
onChange: L
|
|
9554
9554
|
})
|
|
9555
9555
|
}),
|
|
9556
9556
|
w && /* @__PURE__ */ r(A, {
|
|
9557
9557
|
label: l("editor.graphPanel.graphOptions.categoryLabels"),
|
|
9558
9558
|
children: /* @__PURE__ */ r(s, {
|
|
9559
9559
|
isChecked: p,
|
|
9560
|
-
onChange:
|
|
9560
|
+
onChange: M
|
|
9561
9561
|
})
|
|
9562
9562
|
})
|
|
9563
9563
|
] })
|
|
@@ -9646,7 +9646,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9646
9646
|
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"
|
|
9647
9647
|
})]
|
|
9648
9648
|
})
|
|
9649
|
-
}),
|
|
9649
|
+
}), Wg = (e) => /* @__PURE__ */ m(k, {
|
|
9650
9650
|
viewBox: "0 0 16 16",
|
|
9651
9651
|
...e,
|
|
9652
9652
|
children: [
|
|
@@ -9685,7 +9685,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
9685
9685
|
rx: ".533"
|
|
9686
9686
|
})
|
|
9687
9687
|
]
|
|
9688
|
-
}),
|
|
9688
|
+
}), Ug = (e) => /* @__PURE__ */ m(k, {
|
|
9689
9689
|
viewBox: "0 0 16 16",
|
|
9690
9690
|
...e,
|
|
9691
9691
|
children: [/* @__PURE__ */ r("path", {
|
|
@@ -10149,7 +10149,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10149
10149
|
}), a0 = 0.55, o0 = 0.15, Kt = [
|
|
10150
10150
|
{
|
|
10151
10151
|
name: "column",
|
|
10152
|
-
icon:
|
|
10152
|
+
icon: Wg,
|
|
10153
10153
|
summary: {
|
|
10154
10154
|
coordType: "cartesian",
|
|
10155
10155
|
geom: "bar",
|
|
@@ -10167,7 +10167,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10167
10167
|
},
|
|
10168
10168
|
{
|
|
10169
10169
|
name: "columnStackedFill",
|
|
10170
|
-
icon:
|
|
10170
|
+
icon: Ug,
|
|
10171
10171
|
summary: {
|
|
10172
10172
|
coordType: "cartesian",
|
|
10173
10173
|
geom: "bar",
|
|
@@ -10324,19 +10324,19 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10324
10324
|
}
|
|
10325
10325
|
], i0 = 0.05, l0 = (e) => e === null ? null : Kt.find((t) => c0(t.summary, e)) ?? null, s0 = (e, t) => {
|
|
10326
10326
|
const { summary: n } = e;
|
|
10327
|
-
return t === null ||
|
|
10327
|
+
return t === null || we(n) ? n : n.position === "dodge" && Oo(t) ? {
|
|
10328
10328
|
...n,
|
|
10329
10329
|
position: "identity"
|
|
10330
10330
|
} : n.coordType !== "polar" || !st(n.innerRadius) || t.coordType !== "polar" || !st(t.innerRadius) ? n : {
|
|
10331
10331
|
...n,
|
|
10332
10332
|
innerRadius: t.innerRadius
|
|
10333
10333
|
};
|
|
10334
|
-
}, Oo = (e) => !
|
|
10335
|
-
if (
|
|
10334
|
+
}, Oo = (e) => !we(e) && e.geom === "bar" && e.position === "identity", c0 = (e, t) => {
|
|
10335
|
+
if (we(e) || we(t)) return we(e) && we(t);
|
|
10336
10336
|
const n = e.position === t.position || e.position === "dodge" && Oo(t);
|
|
10337
10337
|
return e.coordType !== t.coordType || e.geom !== t.geom || !n ? !1 : e.coordType !== "polar" || t.coordType !== "polar" ? !0 : e.theta === t.theta && st(e.innerRadius) === st(t.innerRadius);
|
|
10338
|
-
}, st = (e) => e >= i0, d0 = 3,
|
|
10339
|
-
const a = H(), o =
|
|
10338
|
+
}, st = (e) => e >= i0, d0 = 3, W5 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10339
|
+
const a = H(), o = W(a), i = E(), { RadioGrid: l } = G(), s = I(() => Kt.map(({ name: h, icon: p }) => ({
|
|
10340
10340
|
value: h,
|
|
10341
10341
|
label: i(`editor.graphTypes.${h}`),
|
|
10342
10342
|
icon: /* @__PURE__ */ r(p, { size: "md" }),
|
|
@@ -10363,8 +10363,8 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10363
10363
|
"solid",
|
|
10364
10364
|
"dashed",
|
|
10365
10365
|
"dotted"
|
|
10366
|
-
], u0 = 8, h0 = 0,
|
|
10367
|
-
const a = H(), o =
|
|
10366
|
+
], u0 = 8, h0 = 0, U5 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10367
|
+
const a = H(), o = W(a), i = E(), { Slider: l, Switch: s, ToggleGroup: c } = G(), u = Ct(o);
|
|
10368
10368
|
if (!o || !u) return null;
|
|
10369
10369
|
const d = o.guides.axes.filter(p0);
|
|
10370
10370
|
if (d.length === 0) return null;
|
|
@@ -10428,7 +10428,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10428
10428
|
"medium",
|
|
10429
10429
|
"large"
|
|
10430
10430
|
], K5 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10431
|
-
const a = H(), o =
|
|
10431
|
+
const a = H(), o = W(a), i = E(), { Switch: l, ToggleGroup: s } = G();
|
|
10432
10432
|
if (!o) return null;
|
|
10433
10433
|
const c = o.config.headline, u = c.show !== "none", d = o.coordSystem, h = d.type === "polar", p = d.type === "polar" && d.innerRadius > 0, g = o.layers.some((S) => S.summary.grandTotal !== void 0);
|
|
10434
10434
|
if (h && !g) return null;
|
|
@@ -10447,18 +10447,18 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10447
10447
|
}, {
|
|
10448
10448
|
value: "center",
|
|
10449
10449
|
label: i("editor.graphPanel.headlineNumberSection.position.center")
|
|
10450
|
-
}],
|
|
10450
|
+
}], O = (S) => {
|
|
10451
10451
|
a.commands.dispatch(new Pn({ show: S ? g0 : "none" }));
|
|
10452
10452
|
}, L = (S) => {
|
|
10453
|
-
const b = v.find((
|
|
10453
|
+
const b = v.find((U) => U === S);
|
|
10454
10454
|
b && a.commands.dispatch(new Pn({ show: b }));
|
|
10455
|
-
},
|
|
10456
|
-
const b = Cr.find((
|
|
10455
|
+
}, M = (S) => {
|
|
10456
|
+
const b = Cr.find((U) => U === S);
|
|
10457
10457
|
b && a.commands.dispatch(new gl({ compareWith: b }));
|
|
10458
|
-
}, R = (S) => {
|
|
10459
|
-
const b = xr.find((W) => W === S);
|
|
10460
|
-
b && a.commands.dispatch(new fl({ size: b }));
|
|
10461
10458
|
}, D = (S) => {
|
|
10459
|
+
const b = xr.find((U) => U === S);
|
|
10460
|
+
b && a.commands.dispatch(new fl({ size: b }));
|
|
10461
|
+
}, N = (S) => {
|
|
10462
10462
|
a.commands.dispatch(new vl({ position: S === "center" ? "center" : "above" }));
|
|
10463
10463
|
};
|
|
10464
10464
|
return /* @__PURE__ */ r(K, {
|
|
@@ -10469,7 +10469,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10469
10469
|
label: i("editor.graphPanel.headlineNumberSection.toggle"),
|
|
10470
10470
|
children: /* @__PURE__ */ r(l, {
|
|
10471
10471
|
isChecked: u,
|
|
10472
|
-
onChange:
|
|
10472
|
+
onChange: O
|
|
10473
10473
|
})
|
|
10474
10474
|
}), u && /* @__PURE__ */ m(Y, { children: [
|
|
10475
10475
|
w.length > 1 && /* @__PURE__ */ r(A, {
|
|
@@ -10487,7 +10487,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10487
10487
|
children: /* @__PURE__ */ r(s, {
|
|
10488
10488
|
value: Ms(c.compareWith),
|
|
10489
10489
|
options: y,
|
|
10490
|
-
onChange:
|
|
10490
|
+
onChange: M
|
|
10491
10491
|
})
|
|
10492
10492
|
}),
|
|
10493
10493
|
/* @__PURE__ */ r(A, {
|
|
@@ -10495,7 +10495,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10495
10495
|
children: /* @__PURE__ */ r(s, {
|
|
10496
10496
|
value: c.size,
|
|
10497
10497
|
options: T,
|
|
10498
|
-
onChange:
|
|
10498
|
+
onChange: D
|
|
10499
10499
|
})
|
|
10500
10500
|
}),
|
|
10501
10501
|
p && /* @__PURE__ */ r(A, {
|
|
@@ -10503,7 +10503,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10503
10503
|
children: /* @__PURE__ */ r(s, {
|
|
10504
10504
|
value: c.position,
|
|
10505
10505
|
options: C,
|
|
10506
|
-
onChange:
|
|
10506
|
+
onChange: N
|
|
10507
10507
|
})
|
|
10508
10508
|
})
|
|
10509
10509
|
] })] })
|
|
@@ -10527,7 +10527,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10527
10527
|
"pill",
|
|
10528
10528
|
"direct"
|
|
10529
10529
|
], q5 = ({ positions: e, title: t, layout: n = "collapsible", preview: a }) => {
|
|
10530
|
-
const o = H(), i =
|
|
10530
|
+
const o = H(), i = W(o), l = E(), { ToggleGroup: s } = G();
|
|
10531
10531
|
if (!i) return null;
|
|
10532
10532
|
const c = i.config.legend.position, u = e ?? Ot, d = i.guides.legends.drawn[0], h = Zl({
|
|
10533
10533
|
legendPosition: i.guides.legends.position,
|
|
@@ -10535,29 +10535,29 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10535
10535
|
layers: i.layers
|
|
10536
10536
|
}), p = i.guides.headline?.kind === "perGroup", g = i.guides.colorGroups.length > 0;
|
|
10537
10537
|
if (c === "auto" && d === void 0 && !h && (p || !g)) return null;
|
|
10538
|
-
const v = d?.position ?? "none", f = c === "auto" ? v : c, x = Ot.filter((
|
|
10539
|
-
value:
|
|
10540
|
-
label: l(`editor.graphPanel.legendSection.${
|
|
10541
|
-
})), w = (
|
|
10542
|
-
const S = Ot.find((b) => b ===
|
|
10538
|
+
const v = d?.position ?? "none", f = c === "auto" ? v : c, x = Ot.filter((N) => N === f || u.includes(N)).map((N) => ({
|
|
10539
|
+
value: N,
|
|
10540
|
+
label: l(`editor.graphPanel.legendSection.${N}`)
|
|
10541
|
+
})), w = (N) => {
|
|
10542
|
+
const S = Ot.find((b) => b === N);
|
|
10543
10543
|
S && o.commands.dispatch(new xl({ position: S }));
|
|
10544
|
-
}, y = (
|
|
10545
|
-
const S = wr.find((b) => b ===
|
|
10544
|
+
}, y = (N) => {
|
|
10545
|
+
const S = wr.find((b) => b === N);
|
|
10546
10546
|
S && o.commands.dispatch(new Sl({ align: S }));
|
|
10547
|
-
}, T = (
|
|
10548
|
-
const S = Ar.find((b) => b ===
|
|
10547
|
+
}, T = (N) => {
|
|
10548
|
+
const S = Ar.find((b) => b === N);
|
|
10549
10549
|
S && o.commands.dispatch(new Cl({ display: S }));
|
|
10550
|
-
}, C = wr.map((
|
|
10551
|
-
value:
|
|
10552
|
-
label: l(`editor.graphPanel.legendSection.align.${
|
|
10553
|
-
})),
|
|
10554
|
-
value:
|
|
10555
|
-
label: l(`editor.graphPanel.legendSection.display.${
|
|
10556
|
-
})), L = t ?? l("editor.graphPanel.legendSection.title"),
|
|
10550
|
+
}, C = wr.map((N) => ({
|
|
10551
|
+
value: N,
|
|
10552
|
+
label: l(`editor.graphPanel.legendSection.align.${N}`)
|
|
10553
|
+
})), O = Ar.map((N) => ({
|
|
10554
|
+
value: N,
|
|
10555
|
+
label: l(`editor.graphPanel.legendSection.display.${N}`)
|
|
10556
|
+
})), L = t ?? l("editor.graphPanel.legendSection.title"), M = x.find((N) => N.value === f)?.label, D = d !== void 0;
|
|
10557
10557
|
return /* @__PURE__ */ r(K, {
|
|
10558
10558
|
title: L,
|
|
10559
10559
|
layout: n,
|
|
10560
|
-
preview: a ??
|
|
10560
|
+
preview: a ?? M,
|
|
10561
10561
|
children: /* @__PURE__ */ m(J, { children: [
|
|
10562
10562
|
/* @__PURE__ */ r(A, {
|
|
10563
10563
|
label: l("editor.axesPanel.controls.position"),
|
|
@@ -10568,7 +10568,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10568
10568
|
onChange: w
|
|
10569
10569
|
})
|
|
10570
10570
|
}),
|
|
10571
|
-
|
|
10571
|
+
D && /* @__PURE__ */ r(A, {
|
|
10572
10572
|
label: l("editor.graphPanel.legendSection.alignLabel"),
|
|
10573
10573
|
layout: "stack",
|
|
10574
10574
|
children: /* @__PURE__ */ r(s, {
|
|
@@ -10582,14 +10582,14 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10582
10582
|
layout: "stack",
|
|
10583
10583
|
children: /* @__PURE__ */ r(s, {
|
|
10584
10584
|
value: i.config.legend.display,
|
|
10585
|
-
options:
|
|
10585
|
+
options: O,
|
|
10586
10586
|
onChange: T
|
|
10587
10587
|
})
|
|
10588
10588
|
})
|
|
10589
10589
|
] })
|
|
10590
10590
|
});
|
|
10591
10591
|
}, b0 = 1, y0 = 20, S0 = 0.5, No = ({ layerId: e }) => {
|
|
10592
|
-
const t = H(), n =
|
|
10592
|
+
const t = H(), n = W(t), { Slider: a } = G(), o = Cn(n, e, "point");
|
|
10593
10593
|
if (!n) return null;
|
|
10594
10594
|
const i = (l) => {
|
|
10595
10595
|
const s = new Ll({
|
|
@@ -10612,7 +10612,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10612
10612
|
"zero",
|
|
10613
10613
|
"connect"
|
|
10614
10614
|
], X5 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10615
|
-
const a = H(), o =
|
|
10615
|
+
const a = H(), o = W(a), i = E(), { Select: l, Slider: s, Switch: c, ToggleGroup: u } = G(), d = o?.spec.layers ?? [], h = Xr(d, "line", "area"), p = Cn(o, h?.id ?? null, "line");
|
|
10616
10616
|
if (!o || !h) return null;
|
|
10617
10617
|
const g = o.coordSystem.type === "polar", v = L0(i, h), f = k0(h, d), x = Tr(o.spec, h.geom, "strokeWidth", h.id), w = typeof x == "number", y = h.geom === "line" ? h : void 0, T = [{
|
|
10618
10618
|
value: "auto",
|
|
@@ -10625,7 +10625,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10625
10625
|
layerId: h.id,
|
|
10626
10626
|
showPoints: S
|
|
10627
10627
|
}));
|
|
10628
|
-
},
|
|
10628
|
+
}, O = (S) => {
|
|
10629
10629
|
y && a.commands.dispatch(new Hl({
|
|
10630
10630
|
layerId: y.id,
|
|
10631
10631
|
showFill: S
|
|
@@ -10635,18 +10635,18 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10635
10635
|
layerId: h.id,
|
|
10636
10636
|
curve: S ? "smooth" : "linear"
|
|
10637
10637
|
}));
|
|
10638
|
-
},
|
|
10638
|
+
}, M = (S) => {
|
|
10639
10639
|
const b = p?.get("strokeWidth") ?? Zi;
|
|
10640
10640
|
a.commands.dispatch(new In({
|
|
10641
10641
|
layerId: h.id,
|
|
10642
10642
|
lineWidth: S === "custom" ? b : null
|
|
10643
10643
|
}));
|
|
10644
|
-
},
|
|
10644
|
+
}, D = (S) => {
|
|
10645
10645
|
a.commands.dispatch(new In({
|
|
10646
10646
|
layerId: h.id,
|
|
10647
10647
|
lineWidth: S
|
|
10648
10648
|
}), { transient: !0 });
|
|
10649
|
-
},
|
|
10649
|
+
}, N = (S) => {
|
|
10650
10650
|
const b = T0(S);
|
|
10651
10651
|
b && a.commands.dispatch(new Al({
|
|
10652
10652
|
layerId: h.id,
|
|
@@ -10673,7 +10673,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10673
10673
|
label: i("editor.graphPanel.graphOptions.lineFill"),
|
|
10674
10674
|
children: /* @__PURE__ */ r(c, {
|
|
10675
10675
|
isChecked: Tr(o.spec, "line", "fillAlpha", y.id) !== void 0,
|
|
10676
|
-
onChange:
|
|
10676
|
+
onChange: O
|
|
10677
10677
|
})
|
|
10678
10678
|
}),
|
|
10679
10679
|
!g && /* @__PURE__ */ r(A, {
|
|
@@ -10688,7 +10688,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10688
10688
|
children: /* @__PURE__ */ r(u, {
|
|
10689
10689
|
value: w ? "custom" : "auto",
|
|
10690
10690
|
options: T,
|
|
10691
|
-
onChange:
|
|
10691
|
+
onChange: M
|
|
10692
10692
|
})
|
|
10693
10693
|
}),
|
|
10694
10694
|
w && /* @__PURE__ */ r(A, {
|
|
@@ -10699,7 +10699,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10699
10699
|
max: x0,
|
|
10700
10700
|
step: w0,
|
|
10701
10701
|
formatValue: xt,
|
|
10702
|
-
onChange:
|
|
10702
|
+
onChange: D,
|
|
10703
10703
|
onCommit: a.commands.commit
|
|
10704
10704
|
})
|
|
10705
10705
|
}),
|
|
@@ -10708,12 +10708,12 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10708
10708
|
children: /* @__PURE__ */ r(l, {
|
|
10709
10709
|
value: h.params.missingValues,
|
|
10710
10710
|
options: v,
|
|
10711
|
-
onChange:
|
|
10711
|
+
onChange: N
|
|
10712
10712
|
})
|
|
10713
10713
|
})
|
|
10714
10714
|
] })
|
|
10715
10715
|
});
|
|
10716
|
-
}, T0 = (e) => A0.find((t) => t === e), Tr = (e, t, n, a) =>
|
|
10716
|
+
}, T0 = (e) => A0.find((t) => t === e), Tr = (e, t, n, a) => ls(e.styles.overrides, ql(t, a))?.[n], k0 = (e, t) => Mt(t, "point").find((n) => Zr(n, [e])), L0 = (e, t) => {
|
|
10717
10717
|
const n = [{
|
|
10718
10718
|
value: "gap",
|
|
10719
10719
|
label: e("editor.graphPanel.treatEmptyValues.leaveGap.label")
|
|
@@ -10738,7 +10738,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10738
10738
|
size: "editor.graphPanel.mappingSection.size",
|
|
10739
10739
|
label: "editor.graphPanel.mappingSection.label"
|
|
10740
10740
|
}, Z5 = ({ title: e, layout: t = "collapsible" }) => {
|
|
10741
|
-
const n = H(), a =
|
|
10741
|
+
const n = H(), a = W(n), o = E(), { Select: i } = G(), l = o("editor.graphPanel.mappingSection.none"), s = a?.spec, c = I(() => s === void 0 ? [] : ks(s, P0).map(({ aesthetic: u, variables: d, isRequired: h }) => {
|
|
10742
10742
|
const p = Ls(s.mapping, u);
|
|
10743
10743
|
return {
|
|
10744
10744
|
aesthetic: u,
|
|
@@ -10794,7 +10794,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10794
10794
|
labelKey: "billions"
|
|
10795
10795
|
}
|
|
10796
10796
|
], D0 = ["auto", "none"], j5 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10797
|
-
const a = H(), o =
|
|
10797
|
+
const a = H(), o = W(a), i = E(), { NumberField: l, ToggleGroup: s } = G();
|
|
10798
10798
|
if (!o) return null;
|
|
10799
10799
|
const { abbreviation: c, decimals: u } = o.config.numberFormat, d = _0(c) !== void 0, h = u !== "auto", p = (T) => T.map((C) => ({
|
|
10800
10800
|
value: C,
|
|
@@ -10805,10 +10805,10 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10805
10805
|
})), v = (T) => {
|
|
10806
10806
|
a.commands.dispatch(new kl({ abbreviation: T }));
|
|
10807
10807
|
}, f = (T) => {
|
|
10808
|
-
const C = D0.find((
|
|
10808
|
+
const C = D0.find((O) => O === T);
|
|
10809
10809
|
v(C ?? O0);
|
|
10810
10810
|
}, x = (T) => {
|
|
10811
|
-
const C = Xt.find((
|
|
10811
|
+
const C = Xt.find((O) => O.value === T);
|
|
10812
10812
|
C && v(C.value);
|
|
10813
10813
|
}, w = (T) => {
|
|
10814
10814
|
a.commands.dispatch(new En({ decimals: T === "custom" ? M0 : "auto" }));
|
|
@@ -10861,7 +10861,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10861
10861
|
] })
|
|
10862
10862
|
});
|
|
10863
10863
|
}, _0 = (e) => Xt.find((t) => t.value === e), Y5 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10864
|
-
const a =
|
|
10864
|
+
const a = W(H()), o = E();
|
|
10865
10865
|
if (!a) return null;
|
|
10866
10866
|
const i = z0(a.spec.layers);
|
|
10867
10867
|
return i ? /* @__PURE__ */ r(K, {
|
|
@@ -10877,7 +10877,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10877
10877
|
const t = Mt(e, "line", "area");
|
|
10878
10878
|
return Mt(e, "point").find((n) => !Zr(n, t));
|
|
10879
10879
|
}, F0 = 0.9, B0 = 360, H0 = 0.05, G0 = 15, J5 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10880
|
-
const a = H(), o =
|
|
10880
|
+
const a = H(), o = W(a), i = E(), { Slider: l } = G();
|
|
10881
10881
|
if (!o || o.spec.coords.coordType !== "polar") return null;
|
|
10882
10882
|
const { innerRadius: s, startAngle: c } = o.spec.coords.params, u = (h) => {
|
|
10883
10883
|
a.commands.dispatch(new Pl({ innerRadius: h }), { transient: !0 });
|
|
@@ -10965,7 +10965,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10965
10965
|
}
|
|
10966
10966
|
};
|
|
10967
10967
|
const { parsingLocale: t, numberFormat: n } = e.config, a = e.guides.colorGroups.map((o) => {
|
|
10968
|
-
const i =
|
|
10968
|
+
const i = ns({
|
|
10969
10969
|
valueFormat: o.valueFormat,
|
|
10970
10970
|
locale: t,
|
|
10971
10971
|
numberFormat: n
|
|
@@ -10990,26 +10990,26 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
10990
10990
|
"logarithmic",
|
|
10991
10991
|
"power",
|
|
10992
10992
|
"loess"
|
|
10993
|
-
],
|
|
10994
|
-
const a = H(), o =
|
|
10993
|
+
], W0 = "linear", Q5 = ({ title: e, layout: t = "collapsible", preview: n }) => {
|
|
10994
|
+
const a = H(), o = W(a), i = E(), { Select: l, Switch: s } = G(), { options: c, findValue: u } = $0(o);
|
|
10995
10995
|
if (!o || o.coordSystem.type === "polar") return null;
|
|
10996
|
-
const d =
|
|
10996
|
+
const d = cs(o.spec.layers), h = as(o.spec.layers), p = d?.stat.type === "smooth" ? d.stat.method : W0, g = U0(h), v = Lr.map((C) => ({
|
|
10997
10997
|
value: C,
|
|
10998
10998
|
label: i(`editor.annotationsPanel.trendType.options.${C}`)
|
|
10999
|
-
})), f = (C,
|
|
11000
|
-
const L = d ?? h,
|
|
10999
|
+
})), f = (C, O = {}) => {
|
|
11000
|
+
const L = d ?? h, M = new Rl({
|
|
11001
11001
|
line: C,
|
|
11002
|
-
...
|
|
11002
|
+
...O,
|
|
11003
11003
|
...L !== void 0 && { layerId: L.id },
|
|
11004
11004
|
label: i("editor.annotationsPanel.trendsAndAveragesSection.average")
|
|
11005
11005
|
});
|
|
11006
|
-
a.commands.dispatch(
|
|
11006
|
+
a.commands.dispatch(M);
|
|
11007
11007
|
}, x = (C) => f(C ? "trend" : "none", { method: p }), w = (C) => f(C ? "average" : "none", { group: g ?? u(c[0]?.value ?? "") }), y = (C) => {
|
|
11008
|
-
const
|
|
11009
|
-
|
|
11008
|
+
const O = Lr.find((L) => L === C);
|
|
11009
|
+
O !== void 0 && f("trend", { method: O });
|
|
11010
11010
|
}, T = (C) => {
|
|
11011
|
-
const
|
|
11012
|
-
|
|
11011
|
+
const O = C === null ? void 0 : u(C);
|
|
11012
|
+
O !== void 0 && f("average", { group: O });
|
|
11013
11013
|
};
|
|
11014
11014
|
return /* @__PURE__ */ r(K, {
|
|
11015
11015
|
title: e ?? i("editor.annotationsPanel.trendsAndAveragesSection.title"),
|
|
@@ -11053,7 +11053,7 @@ var ag = "_40zvwv8", K = ({ title: e, layout: t = "fixed", preview: n, accessory
|
|
|
11053
11053
|
})
|
|
11054
11054
|
] })
|
|
11055
11055
|
});
|
|
11056
|
-
},
|
|
11056
|
+
}, U0 = (e) => {
|
|
11057
11057
|
const t = e?.transforms.find((n) => n.transformType === "filter")?.options.value;
|
|
11058
11058
|
return t instanceof Date ? t.getTime() : t;
|
|
11059
11059
|
};
|
|
@@ -11071,8 +11071,8 @@ export {
|
|
|
11071
11071
|
_5 as ElementsPanel,
|
|
11072
11072
|
V5 as GoalSection,
|
|
11073
11073
|
$5 as GraphOptionsSection,
|
|
11074
|
-
|
|
11075
|
-
|
|
11074
|
+
W5 as GraphTypeSection,
|
|
11075
|
+
U5 as GridSection,
|
|
11076
11076
|
K5 as HeadlineSection,
|
|
11077
11077
|
Cc as IntlProvider,
|
|
11078
11078
|
q5 as LegendSection,
|