@sheetxl/react 0.8.0-beta.11 → 0.8.0-beta.13
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/browser/esm/{B93LSmhnvkxNXTq-.mjs → -wQNyCnoJdQUTTfP.mjs} +1 -1
- package/browser/esm/{Bl2BFCQ00fotauKB.mjs → AL94cpxFjPurAMQG.mjs} +1 -1
- package/browser/esm/{BQYS2Yf-EAV_tBLr.mjs → B4K8rf7TAv0SBkbG.mjs} +1 -1
- package/browser/esm/{ClAtIfYbsUPA073B.mjs → BrwfFgqKdMG_-iar.mjs} +1 -1
- package/browser/esm/ByBGwdqhc_l75i5G.mjs +145 -0
- package/browser/esm/{DgL7Dy-Lqcr1TvW6.mjs → C1zqAqKQ6oa4FiTH.mjs} +4851 -4818
- package/browser/esm/C9lQPmVMIlUwXkKr.mjs +303 -0
- package/browser/esm/{Dnh1kpz3v1JKtRD_.mjs → CIrcPI7uOT93ydNn.mjs} +2 -2
- package/browser/esm/{DS66lAIM-9M-YoZQ.mjs → CZsNidKZjsn0lNnA.mjs} +112 -104
- package/browser/esm/{Bos4Rkp8UTF7QXUB.mjs → CcewpxckpDrXSiZ-.mjs} +1 -1
- package/browser/esm/{BegvsXeRs7e-9t8k.mjs → CdDvFP8Fqm8uU7Rw.mjs} +1 -1
- package/browser/esm/{D2u6THGErqw64KQI.mjs → CfewUx0gINn-wXt3.mjs} +1 -1
- package/browser/esm/{C1pc9F4Rt2C5FKUo.mjs → CfvYfq6ALVqkCsdg.mjs} +1 -1
- package/browser/esm/CulxiChz6lj3G9lw.mjs +341 -0
- package/browser/esm/D5Uy22WeT7vUS36Z.mjs +19 -0
- package/browser/esm/{1-LEUre9ZLG0OYYB.mjs → Dd8deQ2CDMdrhzF1.mjs} +6 -6
- package/browser/esm/Dit7p67J_fDF5RDj.mjs +262 -0
- package/browser/esm/{CPnnESfZz2jjJd82.mjs → DzWFl-_dCN-EOkio.mjs} +3 -3
- package/browser/esm/{94dxo1A-z8lgiiGw.mjs → MIDbAwdzknMaoTU5.mjs} +2 -2
- package/browser/esm/{B26QVfjer2oY2ewK.mjs → ao9zR4H88b7AmZEV.mjs} +1 -1
- package/browser/esm/chart.mjs +28 -27
- package/browser/esm/control.mjs +74 -73
- package/browser/esm/group.mjs +3 -3
- package/browser/esm/index.mjs +6195 -5307
- package/browser/esm/note.mjs +5 -5
- package/browser/esm/picture.mjs +2 -81
- package/browser/esm/sXn9faQLuh4P0TZ9.mjs +401 -0
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +112 -111
- package/browser/esm/{CzRIbc-Lk__VMLKM.mjs → u3A8I4A7GKIOLOOb.mjs} +3 -3
- package/browser/esm/{DMdsMPT0fWBbTkNn.mjs → x6A47UA3fzV361tO.mjs} +1 -1
- package/node/esm/{BiaDWnN3tT7neoRL.mjs → A_4Y7EtzCWp1AG3Y.mjs} +1 -1
- package/node/esm/BNwVylzKMErhrx4i.mjs +406 -0
- package/node/esm/BPBUSXc5TVnD15By.mjs +146 -0
- package/node/esm/{DxQZmb-j4NLUO9Af.mjs → BTT6UB5lGvPxcq3F.mjs} +1 -1
- package/node/esm/{JiQGhLkoL8CJpVvA.mjs → BYiAmyF-aOOuMkD1.mjs} +1 -1
- package/node/esm/BqS8o-CmPoCjHDHp.mjs +263 -0
- package/node/esm/{b-XRVRI1fYQQMkTC.mjs → CC_XgLOFPvqmFyZ_.mjs} +525 -492
- package/node/esm/{BaRfst1euuhquupX.mjs → CMGUrHMaBDeCezK5.mjs} +1 -1
- package/node/esm/{umljAT66yb3_rURh.mjs → CP07qkepi21zlB0n.mjs} +118 -110
- package/node/esm/{BlxXufqBBg1PtsXd.mjs → CQJJMfuXl6mbgHdT.mjs} +1 -1
- package/node/esm/{C_SNx7TlFEcwbYjx.mjs → CVDVFhM7OIpaOlyN.mjs} +1 -1
- package/node/esm/{gpD-9LDW92phhoma.mjs → CVMuO9bpR5YK0pPb.mjs} +1 -1
- package/node/esm/{BMVK5plvmBOAIlxP.mjs → CaZG4HD3SmHvD-Tu.mjs} +1 -1
- package/node/esm/{6zApGj9DozhFy-bx.mjs → CuRPfxQCj2jookWL.mjs} +1 -1
- package/node/esm/D8mYmUPUA6i8oFgR.mjs +19 -0
- package/node/esm/{Dj5FM7_-YWhCtCCt.mjs → DAUtyjkW5uSdnTli.mjs} +1 -1
- package/node/esm/{D_pCpfdQowV_4Aje.mjs → DfvJ0Dpn-AP2mGtz.mjs} +5 -5
- package/node/esm/{DTMTIrYIK1eZswsM.mjs → DipZYwHed-W6QMtQ.mjs} +1 -1
- package/node/esm/{Be9c1GwQkPo8Piuh.mjs → NvP_j9pSsDiJ_PyY.mjs} +3 -3
- package/node/esm/chart.mjs +26 -25
- package/node/esm/control.mjs +79 -78
- package/node/esm/{sigD1UFqvPlWUw_9.mjs → eecr5gnC2KqVhOzX.mjs} +2 -2
- package/node/esm/group.mjs +3 -3
- package/node/esm/index.mjs +6594 -5705
- package/node/esm/note.mjs +18 -18
- package/node/esm/picture.mjs +269 -50
- package/node/esm/shape.mjs +185 -578
- package/node/esm/slicer.mjs +51 -50
- package/package.json +7 -7
- package/resources/locales/de/picture.cmd.json +157 -0
- package/resources/locales/de/sheet.cmd.json +45 -2
- package/resources/locales/de/ui.msg.json +3 -0
- package/resources/locales/de/workbook.cmd.json +6 -0
- package/resources/locales/en/picture.cmd.json +157 -0
- package/resources/locales/en/sheet.cmd.json +45 -2
- package/resources/locales/en/ui.msg.json +5 -0
- package/resources/locales/en/workbook.cmd.json +6 -0
- package/types/src/border/useBorders.d.ts +2 -2
- package/types/src/cell/CellCheckboxRenderer.d.ts +20 -0
- package/types/src/cell/CellContent.d.ts +68 -0
- package/types/src/cell/CellControlContext.d.ts +37 -0
- package/types/src/cell/{FormulaCellRenderer.d.ts → CellFormulaRenderer.d.ts} +5 -5
- package/types/src/cell/CellImageRenderer.d.ts +11 -0
- package/types/src/cell/CellRenderers.d.ts +190 -0
- package/types/src/cell/{SheetCellRenderer.d.ts → CellTextRenderer.d.ts} +9 -6
- package/types/src/cell/ColumnButton.d.ts +3 -3
- package/types/src/cell/OutlineButton.d.ts +4 -4
- package/types/src/cell/SheetHeaderRenderer.d.ts +1 -1
- package/types/src/cell/index.d.ts +8 -2
- package/types/src/cell/useFormulaViewAnchor.d.ts +1 -1
- package/types/src/cell/useInsertableCellControls.d.ts +25 -0
- package/types/src/chart/ChartCommands.d.ts +1 -1
- package/types/src/chart/ChartEditor.d.ts +2 -0
- package/types/src/chart/ChartElement.d.ts +14 -3
- package/types/src/chart/paint/_graphics.d.ts +0 -8
- package/types/src/chart/paint/_mode.d.ts +6 -0
- package/types/src/chart/paint/echarts.d.ts +6 -3
- package/types/src/chart/paint/index.d.ts +1 -1
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +9 -1
- package/types/src/chart/paint/kinds/_builtIns.d.ts +0 -9
- package/types/src/chart/paint/toEChartsOption.d.ts +12 -1
- package/types/src/editableLabel/EditableLabel.d.ts +3 -1
- package/types/src/editor/SheetReferenceHeaderLayer.d.ts +1 -1
- package/types/src/editor/useFormulaHints.d.ts +1 -1
- package/types/src/layer/CellErrorLayer.d.ts +3 -2
- package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
- package/types/src/layer/CircularIndicatorLayer.d.ts +1 -1
- package/types/src/layer/HeaderSelectionLayer.d.ts +4 -4
- package/types/src/layer/HyperlinkLayer.d.ts +12 -5
- package/types/src/layer/ProtectionLayer.d.ts +1 -2
- package/types/src/layer/SheetCellLayer.d.ts +11 -4
- package/types/src/layer/SheetMovableLayer.d.ts +2 -1
- package/types/src/layer/SheetOutlineLayer.d.ts +1 -1
- package/types/src/layer/TableLayer.d.ts +1 -1
- package/types/src/layer/TableToolbar.d.ts +1 -1
- package/types/src/layer/ValidationPromptLayer.d.ts +16 -4
- package/types/src/layer/_visibleCellFeatures.d.ts +11 -0
- package/types/src/layer/index.d.ts +1 -0
- package/types/src/layer/useValidationPicker.d.ts +1 -1
- package/types/src/listener/useRangeListener.d.ts +13 -7
- package/types/src/movable/DefaultMovable.d.ts +1 -1
- package/types/src/movable/MovableControl.d.ts +3 -1
- package/types/src/movable/MovableFrame.d.ts +2 -1
- package/types/src/movable/MovableLayer.d.ts +6 -3
- package/types/src/movable/useFramePreview.d.ts +17 -0
- package/types/src/picture/PictureCommands.d.ts +8 -0
- package/types/src/picture/_pictureHyperlink.d.ts +13 -0
- package/types/src/picture/pictureCrop.d.ts +32 -0
- package/types/src/sheet/ISheetHeaderElement.d.ts +2 -2
- package/types/src/sheet/IWorksheetElement.d.ts +21 -22
- package/types/src/sheet/SheetCommandProvider.d.ts +3 -0
- package/types/src/sheet/SheetOutlineElement.d.ts +2 -2
- package/types/src/sheet/SheetPanels.d.ts +2 -2
- package/types/src/sheet/_hyperlinkEdit.d.ts +7 -0
- package/types/src/sheet/circularReferences.d.ts +1 -1
- package/types/src/tabStrip/Sortable.d.ts +5 -5
- package/types/src/tabStrip/TabStrip.d.ts +6 -6
- package/types/src/tabStrip/TabStripItem.d.ts +15 -13
- package/types/src/taskPane/CellControlPane.d.ts +17 -0
- package/types/src/taskPane/index.d.ts +1 -0
- package/types/src/taskPane/useTaskPane.d.ts +6 -3
- package/types/src/theme/buildDocThemeCSS.d.ts +4 -1
- package/types/src/workbook/DefaultRenderers.d.ts +4 -4
- package/types/src/workbook/IWorkbookElement.d.ts +52 -20
- package/types/src/workbook/WorkbookStrip.d.ts +5 -5
- package/browser/esm/CRi6DQ3UXmPEv-w_.mjs +0 -729
- package/browser/esm/cQ6xdPFkEcuDlNTN.mjs +0 -75
- package/browser/esm/ugfE7YeZALQURDKF.mjs +0 -241
- package/node/esm/DJPgbB1X22YmhbaR.mjs +0 -242
- package/node/esm/DgGEHydEjD7nfsDB.mjs +0 -76
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
8
|
-
import { createContext as t, memo as n, useCallback as o, useEffect as r, useReducer as l, useRef as a } from "react";
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { LazyModules as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
var
|
|
7
|
+
import { t as e } from "./DAUtyjkW5uSdnTli.mjs";
|
|
8
|
+
import { createContext as t, memo as n, useCallback as o, useEffect as r, useReducer as l, useRef as a, useState as i } from "react";
|
|
9
|
+
import { Fragment as s, jsx as c, jsxs as d } from "react/jsx-runtime";
|
|
10
|
+
import { LazyModules as u, defineLazyModule as p } from "@sheetxl/utils";
|
|
11
|
+
import { useGridPane as h } from "@sheetxl/grid-react";
|
|
12
|
+
import { ReactUtils as m, usePendingRender as f } from "@sheetxl/utils-react";
|
|
13
|
+
var g = Object.freeze({
|
|
14
14
|
x: 0,
|
|
15
15
|
y: 0,
|
|
16
16
|
width: 0,
|
|
17
17
|
height: 0
|
|
18
|
-
}),
|
|
19
|
-
const o = n?.bounds ?? e.getBounds(), r = o ? t.toPaneBounds(o) :
|
|
18
|
+
}), v = (e, t, n) => {
|
|
19
|
+
const o = n?.bounds ?? e.getBounds(), r = o ? t.toPaneBounds(o) : g, l = m.getDevicePixelRatio();
|
|
20
20
|
return {
|
|
21
|
-
left:
|
|
22
|
-
top:
|
|
21
|
+
left: m.snapDeviceEdge(r.x, l),
|
|
22
|
+
top: m.snapDeviceEdge(r.y, l),
|
|
23
23
|
width: r.width,
|
|
24
24
|
height: r.height,
|
|
25
25
|
rotation: n?.rotation ?? (e.getRotation() || 0),
|
|
26
26
|
flip: n?.flip ?? e.getFlip()
|
|
27
27
|
};
|
|
28
|
-
},
|
|
28
|
+
}, b = "data-movable-id", w = (e) => {
|
|
29
29
|
let t = e;
|
|
30
30
|
for (let e = t.getParent(); e; e = t.getParent()) t = e;
|
|
31
31
|
return t;
|
|
32
|
-
},
|
|
32
|
+
}, M = (e, t, n) => {
|
|
33
33
|
const o = [];
|
|
34
34
|
let r = t;
|
|
35
35
|
for (; r && r !== n;) {
|
|
36
|
-
const e = r.getAttribute?.(
|
|
36
|
+
const e = r.getAttribute?.(b);
|
|
37
37
|
e && o.unshift(e), r = r.parentElement;
|
|
38
38
|
}
|
|
39
39
|
if (0 === o.length) return e;
|
|
@@ -46,21 +46,21 @@ var h = Object.freeze({
|
|
|
46
46
|
const a = l.length - 1;
|
|
47
47
|
for (let e = a; e >= 0; e--) if (l[e].isSelected()) return l[Math.min(e + 1, a)];
|
|
48
48
|
const i = e.getRange().getWorksheet().getView().getMovableSelection().getContainer();
|
|
49
|
-
return i &&
|
|
50
|
-
},
|
|
49
|
+
return i && w(i) === e ? l[Math.min(x(i) + 1, a)] : e;
|
|
50
|
+
}, x = (e) => {
|
|
51
51
|
let t = 0;
|
|
52
52
|
for (let n = e.getParent(); n; n = n.getParent()) t++;
|
|
53
53
|
return t;
|
|
54
|
-
},
|
|
55
|
-
const i =
|
|
54
|
+
}, y = t(/* @__PURE__ */ new Map()), C = n(({ movable: t, preview: n, onHost: r, children: a }) => {
|
|
55
|
+
const i = h(), [, s] = l((e) => e + 1, 0);
|
|
56
56
|
e(t, {
|
|
57
|
-
onBoundsChange: () =>
|
|
58
|
-
onAnyChange: () =>
|
|
57
|
+
onBoundsChange: () => s(),
|
|
58
|
+
onAnyChange: () => s()
|
|
59
59
|
});
|
|
60
60
|
const d = o((e) => {
|
|
61
61
|
r(t, e);
|
|
62
|
-
}, [t, r]), u =
|
|
63
|
-
return
|
|
62
|
+
}, [t, r]), u = v(t, i, n);
|
|
63
|
+
return c("div", {
|
|
64
64
|
className: "movable-adornment",
|
|
65
65
|
ref: d,
|
|
66
66
|
style: {
|
|
@@ -77,8 +77,8 @@ var h = Object.freeze({
|
|
|
77
77
|
children: a
|
|
78
78
|
});
|
|
79
79
|
});
|
|
80
|
-
|
|
81
|
-
var
|
|
80
|
+
C.displayName = "MovableAdornment";
|
|
81
|
+
var R = {
|
|
82
82
|
nw: [-1, -1],
|
|
83
83
|
n: [0, -1],
|
|
84
84
|
ne: [1, -1],
|
|
@@ -87,19 +87,19 @@ var C = {
|
|
|
87
87
|
sw: [-1, 1],
|
|
88
88
|
s: [0, 1],
|
|
89
89
|
se: [1, 1]
|
|
90
|
-
},
|
|
90
|
+
}, z = [
|
|
91
91
|
"ew-resize",
|
|
92
92
|
"nwse-resize",
|
|
93
93
|
"ns-resize",
|
|
94
94
|
"nesw-resize"
|
|
95
|
-
],
|
|
95
|
+
], P = (e, t) => {
|
|
96
96
|
const n = 180 * Math.atan2(e[1], e[0]) / Math.PI + t;
|
|
97
|
-
return
|
|
98
|
-
},
|
|
99
|
-
const { directions: t, rotation: n, isDragging: r = !1, onResizeStart: l, onResize: i, onResizeEnd:
|
|
97
|
+
return z[(Math.round(n / 45) % 4 + 4) % 4];
|
|
98
|
+
}, B = n((e) => {
|
|
99
|
+
const { directions: t, rotation: n, isDragging: r = !1, onResizeStart: l, onResize: i, onResizeEnd: s, onResizeCancel: u, context: p = !1, onMoveStart: h, children: m } = e, f = a(null), g = o((e) => {
|
|
100
100
|
if (0 !== e.button) return;
|
|
101
101
|
e.stopPropagation(), e.preventDefault();
|
|
102
|
-
const t =
|
|
102
|
+
const t = R[e.currentTarget.dataset.direction ?? ""];
|
|
103
103
|
t && l() && (f.current = {
|
|
104
104
|
pointerId: e.pointerId,
|
|
105
105
|
direction: t,
|
|
@@ -113,31 +113,31 @@ var C = {
|
|
|
113
113
|
t && t.pointerId === e.pointerId && (e.stopPropagation(), i(t.direction, [e.clientX - t.press.x, e.clientY - t.press.y], e.shiftKey));
|
|
114
114
|
}, [i]), b = o((e) => {
|
|
115
115
|
const t = f.current;
|
|
116
|
-
t && t.pointerId === e.pointerId && (e.stopPropagation(), f.current = null,
|
|
117
|
-
}, [
|
|
116
|
+
t && t.pointerId === e.pointerId && (e.stopPropagation(), f.current = null, s());
|
|
117
|
+
}, [s]), w = o((e) => {
|
|
118
118
|
const t = f.current;
|
|
119
119
|
t && t.pointerId === e.pointerId && (f.current = null, u());
|
|
120
|
-
}, [u]),
|
|
121
|
-
0 === e.button && (e.stopPropagation(), e.preventDefault(),
|
|
122
|
-
}, [
|
|
123
|
-
return
|
|
120
|
+
}, [u]), M = o((e) => {
|
|
121
|
+
0 === e.button && (e.stopPropagation(), e.preventDefault(), h?.(e.nativeEvent));
|
|
122
|
+
}, [h]);
|
|
123
|
+
return d("div", {
|
|
124
124
|
className: [
|
|
125
125
|
"movable-control",
|
|
126
126
|
r ? "dragging" : null,
|
|
127
127
|
p ? "context" : null
|
|
128
128
|
].filter(Boolean).join(" "),
|
|
129
129
|
children: [
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
m,
|
|
131
|
+
c("div", { className: "movable-control-outline" }),
|
|
132
132
|
t.map((e) => {
|
|
133
|
-
const t =
|
|
134
|
-
return t ?
|
|
133
|
+
const t = R[e];
|
|
134
|
+
return t ? c("div", {
|
|
135
135
|
className: "movable-control-handle",
|
|
136
136
|
"data-direction": e,
|
|
137
137
|
style: {
|
|
138
138
|
left: 50 * (t[0] + 1) + "%",
|
|
139
139
|
top: 50 * (t[1] + 1) + "%",
|
|
140
|
-
cursor:
|
|
140
|
+
cursor: P(t, n)
|
|
141
141
|
},
|
|
142
142
|
onPointerDown: g,
|
|
143
143
|
onPointerMove: v,
|
|
@@ -145,89 +145,97 @@ var C = {
|
|
|
145
145
|
onPointerCancel: w
|
|
146
146
|
}, e) : null;
|
|
147
147
|
}),
|
|
148
|
-
|
|
148
|
+
h ? c("div", {
|
|
149
149
|
className: "movable-move-handle",
|
|
150
|
-
onPointerDown:
|
|
151
|
-
children:
|
|
150
|
+
onPointerDown: M,
|
|
151
|
+
children: c("svg", {
|
|
152
152
|
viewBox: "0 0 24 24",
|
|
153
153
|
"aria-hidden": "true",
|
|
154
|
-
children:
|
|
154
|
+
children: c("path", { d: "M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z" })
|
|
155
155
|
})
|
|
156
156
|
}) : null
|
|
157
157
|
]
|
|
158
158
|
});
|
|
159
159
|
});
|
|
160
|
-
|
|
161
|
-
var
|
|
162
|
-
for (const e of [...
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
e("picture", () => import("./
|
|
160
|
+
B.displayName = "MovableControl";
|
|
161
|
+
var k = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Set(), D = () => {
|
|
162
|
+
for (const e of [...I]) e();
|
|
163
|
+
}, E = !1, N = () => {
|
|
164
|
+
E || (E = !0, function(e) {
|
|
165
|
+
e("picture", () => import("./BPBUSXc5TVnD15By.mjs"), { select: (e) => e.PictureKind }), e("chart", () => import("./eecr5gnC2KqVhOzX.mjs"), { select: (e) => e.ChartKind }), e("slicer", () => import("./CVMuO9bpR5YK0pPb.mjs"), { select: (e) => e.SlicerKind }), e("shape", () => import("./DfvJ0Dpn-AP2mGtz.mjs"), {
|
|
166
166
|
select: (e) => e.ShapeKind,
|
|
167
167
|
selectionShadow: !1
|
|
168
|
-
}), e("group", () => import("./group.mjs"), { select: ({ GroupEditor: e }) => (t) =>
|
|
168
|
+
}), e("group", () => import("./group.mjs"), { select: ({ GroupEditor: e }) => (t) => c(e, {
|
|
169
169
|
...t,
|
|
170
170
|
container: t.movable.getContent()
|
|
171
171
|
}) }), e("note", () => import("./note.mjs"), { select: ({ NoteEditor: e }) => (t) => {
|
|
172
172
|
const { onContextMenuCapture: n, ...o } = t;
|
|
173
|
-
return
|
|
173
|
+
return c(e, {
|
|
174
174
|
...o,
|
|
175
175
|
note: t.movable.getContent()
|
|
176
176
|
});
|
|
177
|
-
} }), e("error", () => import("./
|
|
177
|
+
} }), e("error", () => import("./CMGUrHMaBDeCezK5.mjs").then((e) => e.t), { select: ({ ErrorContentFrame: e }) => (t) => c(e, { ...t }) });
|
|
178
178
|
const t = (t, n) => {
|
|
179
179
|
e(t, () => import("./control.mjs"), { select: n });
|
|
180
180
|
};
|
|
181
181
|
t("button", (e) => e.ButtonRenderer), t("checkBox", (e) => e.CheckBoxRenderer), t("optionButton", (e) => e.OptionButtonRenderer), t("listBox", (e) => e.ListBoxRenderer), t("dropDown", (e) => e.DropDownRenderer), t("scrollBar", (e) => e.ScrollBarRenderer), t("spinner", (e) => e.SpinnerRenderer), t("groupBox", (e) => e.GroupBoxRenderer), t("label", (e) => e.LabelRenderer), t("editBox", (e) => e.UnmodeledControlRenderer), t("dialog", (e) => e.UnmodeledControlRenderer), t("formControl", (e) => e.UnmodeledControlRenderer);
|
|
182
|
-
}(
|
|
183
|
-
},
|
|
184
|
-
const { movable: t, fallback: n, children: o } = e, [, a] = l((e) => e + 1, 0),
|
|
185
|
-
return r(() => {
|
|
186
|
-
if (
|
|
182
|
+
}(_));
|
|
183
|
+
}, L = (e) => (N(), j.get(e) ?? k.get(e)), A = (e) => {
|
|
184
|
+
const { movable: t, fallback: n, children: o } = e, [, a] = l((e) => e + 1, 0), i = t.isContentLoaded();
|
|
185
|
+
return f(!i), r(() => {
|
|
186
|
+
if (i) return;
|
|
187
187
|
let e = !0;
|
|
188
188
|
return t.whenContentLoaded().then(() => {
|
|
189
189
|
e && a();
|
|
190
190
|
}), () => {
|
|
191
191
|
e = !1;
|
|
192
192
|
};
|
|
193
|
-
}, [t,
|
|
194
|
-
},
|
|
193
|
+
}, [t, i]), c(s, { children: i ? o : n });
|
|
194
|
+
}, K = (e) => {
|
|
195
195
|
const [, t] = l((e) => e + 1, 0), n = e.module;
|
|
196
196
|
return r(() => {
|
|
197
197
|
if (n) return;
|
|
198
198
|
let o = !0;
|
|
199
|
-
const r =
|
|
199
|
+
const r = V(() => {
|
|
200
200
|
o && e.module && t();
|
|
201
201
|
});
|
|
202
202
|
return e.loadModule().catch(() => {}), () => {
|
|
203
203
|
o = !1, r();
|
|
204
204
|
};
|
|
205
205
|
}, [e, n]), n;
|
|
206
|
-
},
|
|
207
|
-
const t =
|
|
208
|
-
if (
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
206
|
+
}, U = (e) => {
|
|
207
|
+
const t = K(e.kind), [n, o] = i(!1);
|
|
208
|
+
if (r(() => {
|
|
209
|
+
if (t) return;
|
|
210
|
+
let n = !0;
|
|
211
|
+
return e.kind.loadModule().catch(() => {
|
|
212
|
+
n && o(!0);
|
|
213
|
+
}), () => {
|
|
214
|
+
n = !1;
|
|
215
|
+
};
|
|
216
|
+
}, [e.kind, t]), f(!t && !n), !t) return c(s, { children: e.fallback });
|
|
217
|
+
const l = t.renderer;
|
|
218
|
+
return c(l, { ...e.props });
|
|
219
|
+
}, $ = (e, t, n, o) => {
|
|
220
|
+
const r = p(e, t, {
|
|
213
221
|
select: (e) => {
|
|
214
222
|
const t = n?.select ? n.select(e) : e, o = "object" == typeof (r = t) && null !== r && "renderer" in r ? t : { renderer: t };
|
|
215
223
|
var r;
|
|
216
|
-
return
|
|
224
|
+
return s.module = o, s.control = o.control, s.loaded = !0, D(), o;
|
|
217
225
|
},
|
|
218
226
|
prefetch: !1 !== n?.prefetch && (o ?? !0)
|
|
219
227
|
});
|
|
220
228
|
let l = null;
|
|
221
|
-
const a = n?.fallback ?? null, i = (e) =>
|
|
229
|
+
const a = n?.fallback ?? null, i = (e) => c(A, {
|
|
222
230
|
movable: e.movable,
|
|
223
231
|
fallback: a,
|
|
224
|
-
children:
|
|
225
|
-
kind:
|
|
232
|
+
children: c(U, {
|
|
233
|
+
kind: s,
|
|
226
234
|
fallback: a,
|
|
227
235
|
props: e
|
|
228
236
|
})
|
|
229
|
-
}),
|
|
230
|
-
Renderer: "content" === n?.hitArea ? i : (e) =>
|
|
237
|
+
}), s = {
|
|
238
|
+
Renderer: "content" === n?.hitArea ? i : (e) => c("div", {
|
|
231
239
|
className: "movable-content",
|
|
232
240
|
style: e.style,
|
|
233
241
|
children: i(e)
|
|
@@ -235,8 +243,8 @@ var P = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map(), k = /* @__PURE
|
|
|
235
243
|
loaded: !1,
|
|
236
244
|
control: void 0,
|
|
237
245
|
LazyControl: (e) => {
|
|
238
|
-
const t =
|
|
239
|
-
return
|
|
246
|
+
const t = K(s)?.control ?? B;
|
|
247
|
+
return c(t, { ...e });
|
|
240
248
|
},
|
|
241
249
|
ownShadow: !1 === n?.selectionShadow,
|
|
242
250
|
loadModule: () => (l ??= r.load().then((e) => (l = null, e), (t) => {
|
|
@@ -245,33 +253,33 @@ var P = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map(), k = /* @__PURE
|
|
|
245
253
|
module: void 0,
|
|
246
254
|
lazyModule: r
|
|
247
255
|
};
|
|
248
|
-
return
|
|
256
|
+
return s;
|
|
249
257
|
};
|
|
250
|
-
function
|
|
251
|
-
|
|
252
|
-
const o =
|
|
253
|
-
return
|
|
254
|
-
|
|
258
|
+
function F(e, t, n) {
|
|
259
|
+
N();
|
|
260
|
+
const o = $(`movable-renderer:${e}`, t, n);
|
|
261
|
+
return j.set(e, o), D(), () => {
|
|
262
|
+
j.get(e) === o && (j.delete(e), u.remove(o.lazyModule), D());
|
|
255
263
|
};
|
|
256
264
|
}
|
|
257
|
-
function
|
|
265
|
+
function H(e, t) {
|
|
258
266
|
let n = null;
|
|
259
267
|
const o = {
|
|
260
268
|
load: () => (n ??= t().then((t) => {
|
|
261
|
-
o.pane = t,
|
|
269
|
+
o.pane = t, S.get(e) === o && D();
|
|
262
270
|
}, (e) => {
|
|
263
271
|
throw n = null, e;
|
|
264
272
|
}), n),
|
|
265
273
|
pane: void 0
|
|
266
274
|
};
|
|
267
|
-
return
|
|
268
|
-
|
|
275
|
+
return S.set(e, o), D(), () => {
|
|
276
|
+
S.get(e) === o && (S.delete(e), D());
|
|
269
277
|
};
|
|
270
278
|
}
|
|
271
|
-
function
|
|
272
|
-
const t =
|
|
279
|
+
function O(e) {
|
|
280
|
+
const t = L(e);
|
|
273
281
|
if (!t?.module) return;
|
|
274
|
-
const n =
|
|
282
|
+
const n = S.get(e);
|
|
275
283
|
n && !n.pane && n.load().catch(() => {});
|
|
276
284
|
const { control: o, commands: r, toolbar: l, pane: a } = t.module;
|
|
277
285
|
return {
|
|
@@ -282,39 +290,39 @@ function F(e) {
|
|
|
282
290
|
pane: n ? n.pane : a
|
|
283
291
|
};
|
|
284
292
|
}
|
|
285
|
-
async function
|
|
286
|
-
const t =
|
|
293
|
+
async function T(e) {
|
|
294
|
+
const t = L(e);
|
|
287
295
|
if (t) {
|
|
288
296
|
try {
|
|
289
|
-
await t.loadModule(), await
|
|
297
|
+
await t.loadModule(), await S.get(e)?.load();
|
|
290
298
|
} catch {
|
|
291
299
|
return;
|
|
292
300
|
}
|
|
293
|
-
return
|
|
301
|
+
return O(e);
|
|
294
302
|
}
|
|
295
303
|
}
|
|
296
|
-
function
|
|
297
|
-
return
|
|
298
|
-
|
|
304
|
+
function V(e) {
|
|
305
|
+
return I.add(e), () => {
|
|
306
|
+
I.delete(e);
|
|
299
307
|
};
|
|
300
308
|
}
|
|
301
|
-
function
|
|
302
|
-
return !
|
|
309
|
+
function G(e) {
|
|
310
|
+
return !L(e)?.ownShadow;
|
|
303
311
|
}
|
|
304
|
-
function
|
|
305
|
-
const t =
|
|
312
|
+
function X(e) {
|
|
313
|
+
const t = L(e);
|
|
306
314
|
if (t) return t.loaded ? t.control : t.LazyControl;
|
|
307
315
|
}
|
|
308
|
-
function
|
|
309
|
-
return
|
|
316
|
+
function Y(e) {
|
|
317
|
+
return L(e)?.Renderer;
|
|
310
318
|
}
|
|
311
|
-
function
|
|
312
|
-
return
|
|
319
|
+
function W() {
|
|
320
|
+
return N(), [.../* @__PURE__ */ new Set([...k.keys(), ...j.keys()])];
|
|
313
321
|
}
|
|
314
|
-
function
|
|
315
|
-
|
|
322
|
+
function _(e, t, n) {
|
|
323
|
+
k.set(e, $(`movable-renderer:built-in:${e}`, t, {
|
|
316
324
|
hitArea: "content",
|
|
317
325
|
...n
|
|
318
|
-
}, () => !
|
|
326
|
+
}, () => !j.has(e)));
|
|
319
327
|
}
|
|
320
|
-
export {
|
|
328
|
+
export { w as _, W as a, H as c, B as d, P as f, M as g, b as h, Y as i, F as l, C as m, X as n, G as o, y as p, O as r, _ as s, V as t, T as u, v };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { messageKey as e } from "@sheetxl/utils";
|
|
8
|
+
var i = "hovered-picture-link", s = (i, s, t) => {
|
|
9
|
+
t?.showWindow?.("hyperlink", {
|
|
10
|
+
disabled: i.isReadOnly(),
|
|
11
|
+
initialValue: i.getHyperlink()?.getAddress() ?? null,
|
|
12
|
+
hideDisplayText: !0,
|
|
13
|
+
sheetName: s.getName(),
|
|
14
|
+
onInput: (s) => {
|
|
15
|
+
i.setHyperlink(s?.address ? s.address : null, { description: e("op.setPictureHyperlink") });
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
export { s as n, i as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t } from "./
|
|
8
|
-
import { d as n } from "./
|
|
9
|
-
import { t as e } from "./
|
|
10
|
-
import { n as o } from "./
|
|
7
|
+
import { t } from "./DAUtyjkW5uSdnTli.mjs";
|
|
8
|
+
import { d as n } from "./CP07qkepi21zlB0n.mjs";
|
|
9
|
+
import { t as e } from "./CQJJMfuXl6mbgHdT.mjs";
|
|
10
|
+
import { n as o } from "./DipZYwHed-W6QMtQ.mjs";
|
|
11
11
|
import { ShapeEditor as r } from "./shape.mjs";
|
|
12
12
|
import { memo as a, useCallback as s, useReducer as i, useRef as c } from "react";
|
|
13
13
|
import { jsx as l } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -46,13 +46,13 @@ var p = (i, r) => {
|
|
|
46
46
|
}, g = (e, t) => e ? "percent" in e ? e.percent / 100 * 1.2 : `${e.points}pt` : t, h = (e, t, r) => {
|
|
47
47
|
const n = [];
|
|
48
48
|
t.underline && "none" !== t.underline && n.push("underline"), t.strike && "none" !== t.strike && n.push("line-through");
|
|
49
|
-
const l = t.font?.family
|
|
49
|
+
const l = [t.font?.family, ...t.font?.fallbacks ?? []].filter((e) => !!e);
|
|
50
50
|
return {
|
|
51
51
|
fontSize: "number" == typeof t.size ? `${t.size}pt` : void 0,
|
|
52
52
|
fontWeight: t.weight,
|
|
53
53
|
fontStyle: t.style === i.Style.Italic ? "italic" : void 0,
|
|
54
54
|
textDecoration: n.length ? n.join(" ") : void 0,
|
|
55
|
-
fontFamily: l,
|
|
55
|
+
fontFamily: l.length ? i.toCSSFontFamily(l[0], l.slice(1)) : void 0,
|
|
56
56
|
color: p(e, t.color) ?? r ?? void 0,
|
|
57
57
|
letterSpacing: "number" == typeof t.letterSpacing ? `${t.letterSpacing}pt` : void 0,
|
|
58
58
|
verticalAlign: "number" == typeof t.baseline && 0 !== t.baseline ? `${t.baseline}%` : void 0,
|
package/node/esm/chart.mjs
CHANGED
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import { forwardRef as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import { useImperativeElement as
|
|
11
|
-
import { useMergeRefs as
|
|
12
|
-
var
|
|
13
|
-
const { children:
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
import { i as e, n as t, t as r } from "./BqS8o-CmPoCjHDHp.mjs";
|
|
8
|
+
import { forwardRef as o, memo as n, useCallback as l, useLayoutEffect as i, useRef as s } from "react";
|
|
9
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
10
|
+
import { useImperativeElement as m } from "@sheetxl/utils-react";
|
|
11
|
+
import { useMergeRefs as c } from "react-merge-refs";
|
|
12
|
+
var g = n(o((t, o) => {
|
|
13
|
+
const { children: n, disabled: g, style: h, chart: p, zoom: d = 1, isDragging: u, movable: f, onHide: x, onShow: E, onDragZone: v, adornmentHost: b, flip: y, gesture: S, ...w } = t, A = m(o, () => ({ isChartEditor: () => !0 }), []), C = s(null), D = c([A, C]), j = e(), z = f?.getRange()?.getWorksheet()?.getView()?.getChartElementSelection() ?? null;
|
|
14
|
+
i(() => {
|
|
15
|
+
v?.((e) => {
|
|
16
16
|
const t = "touches" in e ? e.touches[0] : e;
|
|
17
17
|
if (!t) return !0;
|
|
18
|
-
const r =
|
|
18
|
+
const r = C.current?.getElementAt(t.clientX, t.clientY) ?? null;
|
|
19
19
|
return !r || "chartArea" === r.getElementType();
|
|
20
20
|
});
|
|
21
|
-
}, [
|
|
22
|
-
const
|
|
23
|
-
!
|
|
24
|
-
}, [
|
|
25
|
-
if (!p.isDeleted()) return
|
|
21
|
+
}, [v]);
|
|
22
|
+
const H = l((e) => {
|
|
23
|
+
!g && e.element && "chartArea" !== e.element.getElementType() && (e.event.stopPropagation(), f && !f.isSelected() && f.select());
|
|
24
|
+
}, [f, g]);
|
|
25
|
+
if (!p.isDeleted()) return a(r, {
|
|
26
26
|
...w,
|
|
27
27
|
chart: p,
|
|
28
|
-
zoom:
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
zoom: d,
|
|
29
|
+
colorScheme: j,
|
|
30
|
+
selection: g ? null : z,
|
|
31
|
+
onElementPress: H,
|
|
31
32
|
style: {
|
|
32
|
-
...
|
|
33
|
-
filter:
|
|
34
|
-
boxShadow:
|
|
33
|
+
...h,
|
|
34
|
+
filter: g ? "blur(1px)" : void 0,
|
|
35
|
+
boxShadow: u ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0
|
|
35
36
|
},
|
|
36
|
-
ref:
|
|
37
|
+
ref: D
|
|
37
38
|
});
|
|
38
39
|
}));
|
|
39
|
-
|
|
40
|
-
export {
|
|
40
|
+
g.displayName = "ChartEditor";
|
|
41
|
+
export { g as ChartEditor, r as ChartElement, t as nextSelected };
|