@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,38 +1,38 @@
|
|
|
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 r, useEffect as i, useReducer as a, useRef as o } from "react";
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { LazyModules as
|
|
11
|
-
import { ReactUtils as f } from "@sheetxl/utils-react";
|
|
7
|
+
import { t as e } from "./CfvYfq6ALVqkCsdg.mjs";
|
|
8
|
+
import { createContext as t, memo as n, useCallback as r, useEffect as i, useReducer as a, useRef as o, useState as s } from "react";
|
|
9
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
|
+
import { LazyModules as d, defineLazyModule as f } from "@sheetxl/utils";
|
|
12
11
|
import { useGridPane as p } from "@sheetxl/grid-react";
|
|
13
|
-
|
|
12
|
+
import { ReactUtils as m, usePendingRender as h } 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
|
-
let r = n?.bounds ?? e.getBounds(), i = r ? t.toPaneBounds(r) :
|
|
18
|
+
}), _ = (e, t, n) => {
|
|
19
|
+
let r = n?.bounds ?? e.getBounds(), i = r ? t.toPaneBounds(r) : g, a = m.getDevicePixelRatio();
|
|
20
20
|
return {
|
|
21
|
-
left:
|
|
22
|
-
top:
|
|
21
|
+
left: m.snapDeviceEdge(i.x, a),
|
|
22
|
+
top: m.snapDeviceEdge(i.y, a),
|
|
23
23
|
width: i.width,
|
|
24
24
|
height: i.height,
|
|
25
25
|
rotation: n?.rotation ?? (e.getRotation() || 0),
|
|
26
26
|
flip: n?.flip ?? e.getFlip()
|
|
27
27
|
};
|
|
28
|
-
},
|
|
28
|
+
}, v = "data-movable-id", y = (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
|
+
}, b = (e, t, n) => {
|
|
33
33
|
let r = [], i = t;
|
|
34
34
|
for (; i && i !== n;) {
|
|
35
|
-
let e = i.getAttribute?.(
|
|
35
|
+
let e = i.getAttribute?.(v);
|
|
36
36
|
e && r.unshift(e), i = i.parentElement;
|
|
37
37
|
}
|
|
38
38
|
if (r.length === 0) return e;
|
|
@@ -45,21 +45,21 @@ var m = Object.freeze({
|
|
|
45
45
|
let o = a.length - 1;
|
|
46
46
|
for (let e = o; e >= 0; e--) if (a[e].isSelected()) return a[Math.min(e + 1, o)];
|
|
47
47
|
let s = e.getRange().getWorksheet().getView().getMovableSelection().getContainer();
|
|
48
|
-
return s &&
|
|
49
|
-
},
|
|
48
|
+
return s && y(s) === e ? a[Math.min(x(s) + 1, o)] : e;
|
|
49
|
+
}, x = (e) => {
|
|
50
50
|
let t = 0;
|
|
51
51
|
for (let n = e.getParent(); n; n = n.getParent()) t++;
|
|
52
52
|
return t;
|
|
53
|
-
},
|
|
54
|
-
let s = p(), [,
|
|
53
|
+
}, S = t(/* @__PURE__ */ new Map()), C = n(({ movable: t, preview: n, onHost: i, children: o }) => {
|
|
54
|
+
let s = p(), [, c] = a((e) => e + 1, 0);
|
|
55
55
|
e(t, {
|
|
56
|
-
onBoundsChange: () =>
|
|
57
|
-
onAnyChange: () =>
|
|
56
|
+
onBoundsChange: () => c(),
|
|
57
|
+
onAnyChange: () => c()
|
|
58
58
|
});
|
|
59
59
|
let u = r((e) => {
|
|
60
60
|
i(t, e);
|
|
61
|
-
}, [t, i]), d =
|
|
62
|
-
return
|
|
61
|
+
}, [t, i]), d = _(t, s, n);
|
|
62
|
+
return l("div", {
|
|
63
63
|
className: "movable-adornment",
|
|
64
64
|
ref: u,
|
|
65
65
|
style: {
|
|
@@ -76,8 +76,8 @@ var m = Object.freeze({
|
|
|
76
76
|
children: o
|
|
77
77
|
});
|
|
78
78
|
});
|
|
79
|
-
|
|
80
|
-
var
|
|
79
|
+
C.displayName = "MovableAdornment";
|
|
80
|
+
var w = {
|
|
81
81
|
nw: [-1, -1],
|
|
82
82
|
n: [0, -1],
|
|
83
83
|
ne: [1, -1],
|
|
@@ -86,19 +86,19 @@ var S = {
|
|
|
86
86
|
sw: [-1, 1],
|
|
87
87
|
s: [0, 1],
|
|
88
88
|
se: [1, 1]
|
|
89
|
-
},
|
|
89
|
+
}, T = [
|
|
90
90
|
"ew-resize",
|
|
91
91
|
"nwse-resize",
|
|
92
92
|
"ns-resize",
|
|
93
93
|
"nesw-resize"
|
|
94
|
-
],
|
|
94
|
+
], E = (e, t) => {
|
|
95
95
|
let n = 180 * Math.atan2(e[1], e[0]) / Math.PI + t;
|
|
96
|
-
return
|
|
97
|
-
},
|
|
98
|
-
let { directions: t, rotation: n, isDragging: i = !1, onResizeStart: a, onResize: s, onResizeEnd:
|
|
96
|
+
return T[(Math.round(n / 45) % 4 + 4) % 4];
|
|
97
|
+
}, D = n((e) => {
|
|
98
|
+
let { directions: t, rotation: n, isDragging: i = !1, onResizeStart: a, onResize: s, onResizeEnd: c, onResizeCancel: d, context: f = !1, onMoveStart: p, children: m } = e, h = o(null), g = r((e) => {
|
|
99
99
|
if (e.button !== 0) return;
|
|
100
100
|
e.stopPropagation(), e.preventDefault();
|
|
101
|
-
let t =
|
|
101
|
+
let t = w[e.currentTarget.dataset.direction ?? ""];
|
|
102
102
|
t && a() && (h.current = {
|
|
103
103
|
pointerId: e.pointerId,
|
|
104
104
|
direction: t,
|
|
@@ -112,14 +112,14 @@ var S = {
|
|
|
112
112
|
t && t.pointerId === e.pointerId && (e.stopPropagation(), s(t.direction, [e.clientX - t.press.x, e.clientY - t.press.y], e.shiftKey));
|
|
113
113
|
}, [s]), v = r((e) => {
|
|
114
114
|
let t = h.current;
|
|
115
|
-
t && t.pointerId === e.pointerId && (e.stopPropagation(), h.current = null,
|
|
116
|
-
}, [
|
|
115
|
+
t && t.pointerId === e.pointerId && (e.stopPropagation(), h.current = null, c());
|
|
116
|
+
}, [c]), y = r((e) => {
|
|
117
117
|
let t = h.current;
|
|
118
118
|
t && t.pointerId === e.pointerId && (h.current = null, d());
|
|
119
119
|
}, [d]), b = r((e) => {
|
|
120
120
|
e.button === 0 && (e.stopPropagation(), e.preventDefault(), p?.(e.nativeEvent));
|
|
121
121
|
}, [p]);
|
|
122
|
-
return
|
|
122
|
+
return u("div", {
|
|
123
123
|
className: [
|
|
124
124
|
"movable-control",
|
|
125
125
|
i ? "dragging" : null,
|
|
@@ -127,16 +127,16 @@ var S = {
|
|
|
127
127
|
].filter(Boolean).join(" "),
|
|
128
128
|
children: [
|
|
129
129
|
m,
|
|
130
|
-
|
|
130
|
+
l("div", { className: "movable-control-outline" }),
|
|
131
131
|
t.map((e) => {
|
|
132
|
-
let t =
|
|
133
|
-
return t ?
|
|
132
|
+
let t = w[e];
|
|
133
|
+
return t ? l("div", {
|
|
134
134
|
className: "movable-control-handle",
|
|
135
135
|
"data-direction": e,
|
|
136
136
|
style: {
|
|
137
137
|
left: 50 * (t[0] + 1) + "%",
|
|
138
138
|
top: 50 * (t[1] + 1) + "%",
|
|
139
|
-
cursor:
|
|
139
|
+
cursor: E(t, n)
|
|
140
140
|
},
|
|
141
141
|
onPointerDown: g,
|
|
142
142
|
onPointerMove: _,
|
|
@@ -144,86 +144,94 @@ var S = {
|
|
|
144
144
|
onPointerCancel: y
|
|
145
145
|
}, e) : null;
|
|
146
146
|
}),
|
|
147
|
-
p ?
|
|
147
|
+
p ? l("div", {
|
|
148
148
|
className: "movable-move-handle",
|
|
149
149
|
onPointerDown: b,
|
|
150
|
-
children:
|
|
150
|
+
children: l("svg", {
|
|
151
151
|
viewBox: "0 0 24 24",
|
|
152
152
|
"aria-hidden": "true",
|
|
153
|
-
children:
|
|
153
|
+
children: l("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" })
|
|
154
154
|
})
|
|
155
155
|
}) : null
|
|
156
156
|
]
|
|
157
157
|
});
|
|
158
158
|
});
|
|
159
|
-
|
|
160
|
-
var
|
|
161
|
-
for (let e of [...
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
e("picture", () => import("./
|
|
159
|
+
D.displayName = "MovableControl";
|
|
160
|
+
var O = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Set(), M = () => {
|
|
161
|
+
for (let e of [...j]) e();
|
|
162
|
+
}, N = !1, P = () => {
|
|
163
|
+
N || (N = !0, function(e) {
|
|
164
|
+
e("picture", () => import("./ByBGwdqhc_l75i5G.mjs"), { select: (e) => e.PictureKind }), e("chart", () => import("./MIDbAwdzknMaoTU5.mjs"), { select: (e) => e.ChartKind }), e("slicer", () => import("./ao9zR4H88b7AmZEV.mjs"), { select: (e) => e.SlicerKind }), e("shape", () => import("./Dd8deQ2CDMdrhzF1.mjs"), {
|
|
165
165
|
select: (e) => e.ShapeKind,
|
|
166
166
|
selectionShadow: !1
|
|
167
|
-
}), e("group", () => import("./group.mjs"), { select: ({ GroupEditor: e }) => (t) =>
|
|
167
|
+
}), e("group", () => import("./group.mjs"), { select: ({ GroupEditor: e }) => (t) => l(e, {
|
|
168
168
|
...t,
|
|
169
169
|
container: t.movable.getContent()
|
|
170
170
|
}) }), e("note", () => import("./note.mjs"), { select: ({ NoteEditor: e }) => (t) => {
|
|
171
171
|
let { onContextMenuCapture: n, ...r } = t;
|
|
172
|
-
return
|
|
172
|
+
return l(e, {
|
|
173
173
|
...r,
|
|
174
174
|
note: t.movable.getContent()
|
|
175
175
|
});
|
|
176
|
-
} }), e("error", () => import("./
|
|
176
|
+
} }), e("error", () => import("./u3A8I4A7GKIOLOOb.mjs").then((e) => e.t), { select: ({ ErrorContentFrame: e }) => (t) => l(e, { ...t }) });
|
|
177
177
|
let t = (t, n) => {
|
|
178
178
|
e(t, () => import("./control.mjs"), { select: n });
|
|
179
179
|
};
|
|
180
180
|
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);
|
|
181
|
-
}(
|
|
182
|
-
},
|
|
183
|
-
let { movable: t, fallback: n, children: r } = e, [, o] = a((e) => e + 1, 0),
|
|
184
|
-
return i(() => {
|
|
185
|
-
if (
|
|
181
|
+
}(Y));
|
|
182
|
+
}, F = (e) => (P(), k.get(e) ?? O.get(e)), I = (e) => {
|
|
183
|
+
let { movable: t, fallback: n, children: r } = e, [, o] = a((e) => e + 1, 0), s = t.isContentLoaded();
|
|
184
|
+
return h(!s), i(() => {
|
|
185
|
+
if (s) return;
|
|
186
186
|
let e = !0;
|
|
187
187
|
return t.whenContentLoaded().then(() => {
|
|
188
188
|
e && o();
|
|
189
189
|
}), () => {
|
|
190
190
|
e = !1;
|
|
191
191
|
};
|
|
192
|
-
}, [t,
|
|
193
|
-
},
|
|
192
|
+
}, [t, s]), l(c, { children: s ? r : n });
|
|
193
|
+
}, L = (e) => {
|
|
194
194
|
let [, t] = a((e) => e + 1, 0), n = e.module;
|
|
195
195
|
return i(() => {
|
|
196
196
|
if (n) return;
|
|
197
|
-
let r = !0, i =
|
|
197
|
+
let r = !0, i = W(() => {
|
|
198
198
|
r && e.module && t();
|
|
199
199
|
});
|
|
200
200
|
return e.loadModule().catch(() => {}), () => {
|
|
201
201
|
r = !1, i();
|
|
202
202
|
};
|
|
203
203
|
}, [e, n]), n;
|
|
204
|
-
},
|
|
205
|
-
let t =
|
|
206
|
-
if (
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
204
|
+
}, R = (e) => {
|
|
205
|
+
let t = L(e.kind), [n, r] = s(!1);
|
|
206
|
+
if (i(() => {
|
|
207
|
+
if (t) return;
|
|
208
|
+
let n = !0;
|
|
209
|
+
return e.kind.loadModule().catch(() => {
|
|
210
|
+
n && r(!0);
|
|
211
|
+
}), () => {
|
|
212
|
+
n = !1;
|
|
213
|
+
};
|
|
214
|
+
}, [e.kind, t]), h(!t && !n), !t) return l(c, { children: e.fallback });
|
|
215
|
+
let a = t.renderer;
|
|
216
|
+
return l(a, { ...e.props });
|
|
217
|
+
}, z = (e, t, n, r) => {
|
|
218
|
+
let i = f(e, t, {
|
|
211
219
|
select: (e) => {
|
|
212
220
|
let t = n?.select ? n.select(e) : e, r = typeof (i = t) == "object" && i !== null && "renderer" in i ? t : { renderer: t };
|
|
213
221
|
var i;
|
|
214
|
-
return
|
|
222
|
+
return c.module = r, c.control = r.control, c.loaded = !0, M(), r;
|
|
215
223
|
},
|
|
216
224
|
prefetch: !1 !== n?.prefetch && (r ?? !0)
|
|
217
|
-
}), a = null, o = n?.fallback ?? null, s = (e) =>
|
|
225
|
+
}), a = null, o = n?.fallback ?? null, s = (e) => l(I, {
|
|
218
226
|
movable: e.movable,
|
|
219
227
|
fallback: o,
|
|
220
|
-
children:
|
|
221
|
-
kind:
|
|
228
|
+
children: l(R, {
|
|
229
|
+
kind: c,
|
|
222
230
|
fallback: o,
|
|
223
231
|
props: e
|
|
224
232
|
})
|
|
225
|
-
}),
|
|
226
|
-
Renderer: n?.hitArea === "content" ? s : (e) =>
|
|
233
|
+
}), c = {
|
|
234
|
+
Renderer: n?.hitArea === "content" ? s : (e) => l("div", {
|
|
227
235
|
className: "movable-content",
|
|
228
236
|
style: e.style,
|
|
229
237
|
children: s(e)
|
|
@@ -231,8 +239,8 @@ var E = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), O = /* @__PURE
|
|
|
231
239
|
loaded: !1,
|
|
232
240
|
control: void 0,
|
|
233
241
|
LazyControl: (e) => {
|
|
234
|
-
let t =
|
|
235
|
-
return
|
|
242
|
+
let t = L(c)?.control ?? D;
|
|
243
|
+
return l(t, { ...e });
|
|
236
244
|
},
|
|
237
245
|
ownShadow: !1 === n?.selectionShadow,
|
|
238
246
|
loadModule: () => (a ??= i.load().then((e) => (a = null, e), (t) => {
|
|
@@ -241,32 +249,32 @@ var E = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), O = /* @__PURE
|
|
|
241
249
|
module: void 0,
|
|
242
250
|
lazyModule: i
|
|
243
251
|
};
|
|
244
|
-
return
|
|
252
|
+
return c;
|
|
245
253
|
};
|
|
246
|
-
function
|
|
247
|
-
|
|
248
|
-
let r =
|
|
249
|
-
return
|
|
250
|
-
|
|
254
|
+
function B(e, t, n) {
|
|
255
|
+
P();
|
|
256
|
+
let r = z(`movable-renderer:${e}`, t, n);
|
|
257
|
+
return k.set(e, r), M(), () => {
|
|
258
|
+
k.get(e) === r && (k.delete(e), d.remove(r.lazyModule), M());
|
|
251
259
|
};
|
|
252
260
|
}
|
|
253
|
-
function
|
|
261
|
+
function V(e, t) {
|
|
254
262
|
let n = null, r = {
|
|
255
263
|
load: () => (n ??= t().then((t) => {
|
|
256
|
-
r.pane = t,
|
|
264
|
+
r.pane = t, A.get(e) === r && M();
|
|
257
265
|
}, (e) => {
|
|
258
266
|
throw n = null, e;
|
|
259
267
|
}), n),
|
|
260
268
|
pane: void 0
|
|
261
269
|
};
|
|
262
|
-
return
|
|
263
|
-
|
|
270
|
+
return A.set(e, r), M(), () => {
|
|
271
|
+
A.get(e) === r && (A.delete(e), M());
|
|
264
272
|
};
|
|
265
273
|
}
|
|
266
|
-
function
|
|
267
|
-
let t =
|
|
274
|
+
function H(e) {
|
|
275
|
+
let t = F(e);
|
|
268
276
|
if (!t?.module) return;
|
|
269
|
-
let n =
|
|
277
|
+
let n = A.get(e);
|
|
270
278
|
n && !n.pane && n.load().catch(() => {});
|
|
271
279
|
let { control: r, commands: i, toolbar: a, pane: o } = t.module;
|
|
272
280
|
return {
|
|
@@ -277,39 +285,39 @@ function B(e) {
|
|
|
277
285
|
pane: n ? n.pane : o
|
|
278
286
|
};
|
|
279
287
|
}
|
|
280
|
-
async function
|
|
281
|
-
let t =
|
|
288
|
+
async function U(e) {
|
|
289
|
+
let t = F(e);
|
|
282
290
|
if (t) {
|
|
283
291
|
try {
|
|
284
|
-
await t.loadModule(), await
|
|
292
|
+
await t.loadModule(), await A.get(e)?.load();
|
|
285
293
|
} catch {
|
|
286
294
|
return;
|
|
287
295
|
}
|
|
288
|
-
return
|
|
296
|
+
return H(e);
|
|
289
297
|
}
|
|
290
298
|
}
|
|
291
|
-
function
|
|
292
|
-
return
|
|
293
|
-
|
|
299
|
+
function W(e) {
|
|
300
|
+
return j.add(e), () => {
|
|
301
|
+
j.delete(e);
|
|
294
302
|
};
|
|
295
303
|
}
|
|
296
|
-
function
|
|
297
|
-
return !
|
|
304
|
+
function G(e) {
|
|
305
|
+
return !F(e)?.ownShadow;
|
|
298
306
|
}
|
|
299
|
-
function
|
|
300
|
-
let t =
|
|
307
|
+
function K(e) {
|
|
308
|
+
let t = F(e);
|
|
301
309
|
if (t) return t.loaded ? t.control : t.LazyControl;
|
|
302
310
|
}
|
|
303
|
-
function
|
|
304
|
-
return
|
|
311
|
+
function q(e) {
|
|
312
|
+
return F(e)?.Renderer;
|
|
305
313
|
}
|
|
306
|
-
function
|
|
307
|
-
return
|
|
314
|
+
function J() {
|
|
315
|
+
return P(), [.../* @__PURE__ */ new Set([...O.keys(), ...k.keys()])];
|
|
308
316
|
}
|
|
309
|
-
function
|
|
310
|
-
|
|
317
|
+
function Y(e, t, n) {
|
|
318
|
+
O.set(e, z(`movable-renderer:built-in:${e}`, t, {
|
|
311
319
|
hitArea: "content",
|
|
312
320
|
...n
|
|
313
|
-
}, () => !
|
|
321
|
+
}, () => !k.has(e)));
|
|
314
322
|
}
|
|
315
|
-
export { _,
|
|
323
|
+
export { y as _, J as a, V as c, D as d, E as f, b as g, v as h, q as i, B as l, C as m, K as n, G as o, S as p, H as r, Y as s, W as t, U as u, _ as 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.
|