@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
package/browser/esm/slicer.mjs
CHANGED
|
@@ -1,125 +1,126 @@
|
|
|
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 { n as t } from "./
|
|
9
|
-
import { i as n, r, t as i } from "./
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
7
|
+
import { t as e } from "./CfvYfq6ALVqkCsdg.mjs";
|
|
8
|
+
import { n as t } from "./B4K8rf7TAv0SBkbG.mjs";
|
|
9
|
+
import { i as n, r, t as i } from "./x6A47UA3fzV361tO.mjs";
|
|
10
|
+
import { IFont as a } from "@sheetxl/sdk";
|
|
11
|
+
import { forwardRef as o, memo as s, useCallback as c, useEffect as l, useLayoutEffect as u, useMemo as d, useReducer as f, useRef as p, useState as m } from "react";
|
|
12
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
|
+
import { useImperativeElement as _, useNotifier as v, useTranslator as y } from "@sheetxl/utils-react";
|
|
14
|
+
var ee = () => g("svg", {
|
|
14
15
|
viewBox: "0 0 16 16",
|
|
15
16
|
width: 14,
|
|
16
17
|
height: 14,
|
|
17
18
|
"aria-hidden": !0,
|
|
18
|
-
children: [
|
|
19
|
+
children: [h("path", {
|
|
19
20
|
d: "M1.5 2.5h10l-4 5v5l-2 1v-6z",
|
|
20
21
|
fill: "none",
|
|
21
22
|
stroke: "currentColor",
|
|
22
23
|
strokeWidth: 1.2,
|
|
23
24
|
strokeLinejoin: "round"
|
|
24
|
-
}),
|
|
25
|
+
}), h("path", {
|
|
25
26
|
d: "M10.5 10l4 4M14.5 10l-4 4",
|
|
26
27
|
stroke: "currentColor",
|
|
27
28
|
strokeWidth: 1.2
|
|
28
29
|
})]
|
|
29
|
-
}),
|
|
30
|
+
}), b = () => g("svg", {
|
|
30
31
|
viewBox: "0 0 16 16",
|
|
31
32
|
width: 14,
|
|
32
33
|
height: 14,
|
|
33
34
|
"aria-hidden": !0,
|
|
34
|
-
children: [
|
|
35
|
+
children: [h("path", {
|
|
35
36
|
d: "M1.5 3.5l1.5 1.5 2.5-3M1.5 10.5l1.5 1.5 2.5-3",
|
|
36
37
|
fill: "none",
|
|
37
38
|
stroke: "currentColor",
|
|
38
39
|
strokeWidth: 1.2
|
|
39
|
-
}),
|
|
40
|
+
}), h("path", {
|
|
40
41
|
d: "M8 4h7M8 11h7",
|
|
41
42
|
stroke: "currentColor",
|
|
42
43
|
strokeWidth: 1.2
|
|
43
44
|
})]
|
|
44
|
-
}),
|
|
45
|
+
}), x = (e) => {
|
|
45
46
|
let t = e?.getTheme().getFontScheme().getMinorFont();
|
|
46
47
|
return {
|
|
47
|
-
fontFamily: (t
|
|
48
|
+
fontFamily: a.toCSSFontFamily(t ?? "", ["sans-serif"]),
|
|
48
49
|
fontSize: "11pt"
|
|
49
50
|
};
|
|
50
|
-
},
|
|
51
|
-
let { children:
|
|
52
|
-
e(
|
|
53
|
-
onAnyChange:
|
|
54
|
-
onReferencesChange:
|
|
55
|
-
}),
|
|
56
|
-
let [
|
|
57
|
-
|
|
51
|
+
}, S = s(o((a, o) => {
|
|
52
|
+
let { children: s, disabled: S, style: C, slicer: w, movable: T, zoom: E = 1, isDragging: te, onHide: ne, onShow: re, onDragZone: D, adornmentHost: ie, flip: ae, gesture: oe, ...O } = a, k = y(), A = v(), j = (t() ?? w.getTable()?.getWorksheet() ?? null)?.getStyles() ?? null, [M, N] = f((e) => e + 1, 0);
|
|
53
|
+
e(w, {
|
|
54
|
+
onAnyChange: N,
|
|
55
|
+
onReferencesChange: N
|
|
56
|
+
}), l(() => j?.addListeners({ onAnyChange: N }), [j]);
|
|
57
|
+
let [P, F] = m([]);
|
|
58
|
+
l(() => {
|
|
58
59
|
let e = !0;
|
|
59
|
-
if (!
|
|
60
|
-
e &&
|
|
60
|
+
if (!w.isDeleted()) return w.getItems().then((t) => {
|
|
61
|
+
e && F(t);
|
|
61
62
|
}).catch(() => {
|
|
62
|
-
e &&
|
|
63
|
+
e && F([]);
|
|
63
64
|
}), () => {
|
|
64
65
|
e = !1;
|
|
65
66
|
};
|
|
66
|
-
}, [
|
|
67
|
-
let [
|
|
68
|
-
|
|
69
|
-
let e =
|
|
67
|
+
}, [w, M]);
|
|
68
|
+
let [I, L] = m(!1), [R, z] = m(null), B = p(null), V = p(null), H = p(null), [U, W] = m(!1);
|
|
69
|
+
u(() => {
|
|
70
|
+
let e = H.current;
|
|
70
71
|
if (!e) return;
|
|
71
|
-
let t = () =>
|
|
72
|
+
let t = () => W(e.scrollHeight > e.clientHeight);
|
|
72
73
|
if (t(), typeof ResizeObserver > "u") return;
|
|
73
74
|
let n = new ResizeObserver(t);
|
|
74
75
|
return n.observe(e), () => n.disconnect();
|
|
75
76
|
}, [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
]),
|
|
81
|
-
|
|
77
|
+
P,
|
|
78
|
+
w.getRowHeight(),
|
|
79
|
+
w.getColumnCount(),
|
|
80
|
+
w.isShowCaption()
|
|
81
|
+
]), u(() => {
|
|
82
|
+
D?.((e) => {
|
|
82
83
|
let t = e.target;
|
|
83
|
-
return !t || !
|
|
84
|
+
return !t || !H.current?.contains(t) && !t.closest?.("button");
|
|
84
85
|
});
|
|
85
|
-
}, [
|
|
86
|
-
let
|
|
87
|
-
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
let e =
|
|
91
|
-
e > 0 && (
|
|
86
|
+
}, [D]);
|
|
87
|
+
let G = p(!1), K = w.getColumnCount(), q = w.getRowHeight();
|
|
88
|
+
u(() => {
|
|
89
|
+
if (G.current || P.length === 0 || !H.current) return;
|
|
90
|
+
G.current = !0;
|
|
91
|
+
let e = w.toJSON()?.startItem ?? 0;
|
|
92
|
+
e > 0 && (H.current.scrollTop = Math.floor(e / K) * (q + 4));
|
|
92
93
|
}, [
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
P,
|
|
95
|
+
K,
|
|
96
|
+
q
|
|
96
97
|
]);
|
|
97
|
-
let
|
|
98
|
-
|
|
99
|
-
}, [
|
|
100
|
-
if (
|
|
101
|
-
let n =
|
|
98
|
+
let J = c((e) => {
|
|
99
|
+
w.selectItems(e).catch((e) => A.showError(e));
|
|
100
|
+
}, [w, A]), Y = c((e, t) => {
|
|
101
|
+
if (S) return;
|
|
102
|
+
let n = P.map((e) => e.key), r = w.isFilterCleared() ? [] : P.filter((e) => e.isSelected).map((e) => e.key), i = B.current;
|
|
102
103
|
if (t.shiftKey && i !== null && n.includes(i)) {
|
|
103
104
|
let a = n.indexOf(i), o = n.indexOf(e.key), s = n.slice(Math.min(a, o), Math.max(a, o) + 1);
|
|
104
|
-
|
|
105
|
-
} else
|
|
105
|
+
J(t.ctrlKey || t.metaKey ? [.../* @__PURE__ */ new Set([...r, ...s])] : s);
|
|
106
|
+
} else B.current = e.key, t.ctrlKey || t.metaKey || I ? r.length === 0 ? J([e.key]) : r.includes(e.key) ? J(r.filter((t) => t !== e.key)) : J([...r, e.key]) : J([e.key]);
|
|
106
107
|
}, [
|
|
108
|
+
w,
|
|
109
|
+
P,
|
|
110
|
+
I,
|
|
107
111
|
S,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
x,
|
|
111
|
-
q
|
|
112
|
-
]), Y = h(o, () => ({ isSlicerEditor: () => !0 }), []), X = i(S.getStyle(), A), ce = u(() => r(X?.wholeTable, A), [
|
|
112
|
+
J
|
|
113
|
+
]), se = _(o, () => ({ isSlicerEditor: () => !0 }), []), X = i(w.getStyle(), j), ce = d(() => r(X?.wholeTable, j), [
|
|
113
114
|
X,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
]), le =
|
|
115
|
+
j,
|
|
116
|
+
M
|
|
117
|
+
]), le = d(() => r(X?.headerRow, j), [
|
|
117
118
|
X,
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
j,
|
|
120
|
+
M
|
|
120
121
|
]);
|
|
121
|
-
if (
|
|
122
|
-
let Z =
|
|
122
|
+
if (w.isDeleted()) return null;
|
|
123
|
+
let Z = w.isFilterCleared(), Q = w.isShowCaption(), $ = {
|
|
123
124
|
display: "flex",
|
|
124
125
|
alignItems: "center",
|
|
125
126
|
justifyContent: "center",
|
|
@@ -133,14 +134,14 @@ var v = () => m("svg", {
|
|
|
133
134
|
color: "inherit",
|
|
134
135
|
cursor: "pointer"
|
|
135
136
|
};
|
|
136
|
-
return
|
|
137
|
+
return g("div", {
|
|
137
138
|
className: "slicer-editor",
|
|
138
|
-
...
|
|
139
|
-
ref:
|
|
139
|
+
...O,
|
|
140
|
+
ref: se,
|
|
140
141
|
style: {
|
|
141
142
|
width: "100%",
|
|
142
143
|
height: "100%",
|
|
143
|
-
zoom:
|
|
144
|
+
zoom: E,
|
|
144
145
|
boxSizing: "border-box",
|
|
145
146
|
display: "flex",
|
|
146
147
|
flexDirection: "column",
|
|
@@ -148,14 +149,14 @@ var v = () => m("svg", {
|
|
|
148
149
|
position: "relative",
|
|
149
150
|
backgroundColor: "var(--sxl-color-base-100, white)",
|
|
150
151
|
border: "var(--sxl-color-neutral, grey) solid 1px",
|
|
151
|
-
...
|
|
152
|
+
...x(j),
|
|
152
153
|
...ce,
|
|
153
|
-
filter:
|
|
154
|
-
boxShadow:
|
|
155
|
-
...
|
|
154
|
+
filter: S ? "blur(1px)" : void 0,
|
|
155
|
+
boxShadow: te ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0,
|
|
156
|
+
...C
|
|
156
157
|
},
|
|
157
|
-
children: [Q ?
|
|
158
|
-
ref:
|
|
158
|
+
children: [Q ? g("div", {
|
|
159
|
+
ref: V,
|
|
159
160
|
className: "slicer-caption",
|
|
160
161
|
style: {
|
|
161
162
|
display: "flex",
|
|
@@ -167,54 +168,54 @@ var v = () => m("svg", {
|
|
|
167
168
|
...le
|
|
168
169
|
},
|
|
169
170
|
children: [
|
|
170
|
-
|
|
171
|
+
h("span", {
|
|
171
172
|
style: {
|
|
172
173
|
flex: "1 1 auto",
|
|
173
174
|
overflow: "hidden",
|
|
174
175
|
textOverflow: "ellipsis",
|
|
175
176
|
whiteSpace: "nowrap"
|
|
176
177
|
},
|
|
177
|
-
children:
|
|
178
|
+
children: w.getCaption()
|
|
178
179
|
}),
|
|
179
|
-
|
|
180
|
+
h("button", {
|
|
180
181
|
type: "button",
|
|
181
182
|
className: "slicer-multi-select",
|
|
182
183
|
tabIndex: -1,
|
|
183
|
-
title:
|
|
184
|
-
"aria-label":
|
|
185
|
-
"aria-pressed":
|
|
184
|
+
title: k("slicer.multiSelect"),
|
|
185
|
+
"aria-label": k("slicer.multiSelect"),
|
|
186
|
+
"aria-pressed": I,
|
|
186
187
|
style: {
|
|
187
188
|
...$,
|
|
188
|
-
borderColor:
|
|
189
|
-
backgroundColor:
|
|
189
|
+
borderColor: I ? "var(--sxl-color-neutral, grey)" : "transparent",
|
|
190
|
+
backgroundColor: I ? "var(--sxl-color-base-200, #eee)" : void 0
|
|
190
191
|
},
|
|
191
|
-
onClick: () =>
|
|
192
|
-
children:
|
|
192
|
+
onClick: () => L((e) => !e),
|
|
193
|
+
children: h(b, {})
|
|
193
194
|
}),
|
|
194
|
-
|
|
195
|
+
h("button", {
|
|
195
196
|
type: "button",
|
|
196
197
|
className: "slicer-clear",
|
|
197
198
|
tabIndex: -1,
|
|
198
|
-
title:
|
|
199
|
-
"aria-label":
|
|
200
|
-
disabled: Z ||
|
|
199
|
+
title: k("slicer.clearFilter"),
|
|
200
|
+
"aria-label": k("slicer.clearFilter"),
|
|
201
|
+
disabled: Z || S,
|
|
201
202
|
style: {
|
|
202
203
|
...$,
|
|
203
204
|
opacity: Z ? .4 : 1,
|
|
204
205
|
cursor: Z ? "default" : "pointer"
|
|
205
206
|
},
|
|
206
207
|
onClick: () => {
|
|
207
|
-
|
|
208
|
+
w.clearFilters().catch((e) => A.showError(e));
|
|
208
209
|
},
|
|
209
|
-
children:
|
|
210
|
+
children: h(ee, {})
|
|
210
211
|
})
|
|
211
212
|
]
|
|
212
|
-
}) : null,
|
|
213
|
-
ref:
|
|
213
|
+
}) : null, h("div", {
|
|
214
|
+
ref: H,
|
|
214
215
|
className: "slicer-items",
|
|
215
216
|
role: "listbox",
|
|
216
217
|
"aria-multiselectable": !0,
|
|
217
|
-
"aria-label":
|
|
218
|
+
"aria-label": w.getCaption(),
|
|
218
219
|
style: {
|
|
219
220
|
flex: "1 1 auto",
|
|
220
221
|
minHeight: 0,
|
|
@@ -224,17 +225,17 @@ var v = () => m("svg", {
|
|
|
224
225
|
"--scrollbar-width": "8px",
|
|
225
226
|
"--scrollbar-border-width": "1px",
|
|
226
227
|
display: "grid",
|
|
227
|
-
gridTemplateColumns: `repeat(${
|
|
228
|
-
gridAutoRows: `${
|
|
228
|
+
gridTemplateColumns: `repeat(${K}, minmax(0, 1fr))`,
|
|
229
|
+
gridAutoRows: `${q}px`,
|
|
229
230
|
alignContent: "start",
|
|
230
231
|
gap: 4,
|
|
231
232
|
margin: (Q ? 4 : 9) + "px 9px 9px 9px",
|
|
232
|
-
paddingRight:
|
|
233
|
+
paddingRight: U ? 3 : 0
|
|
233
234
|
},
|
|
234
|
-
onPointerLeave: () =>
|
|
235
|
-
children:
|
|
236
|
-
let t = n(e.isSelected, e.hasData,
|
|
237
|
-
return
|
|
235
|
+
onPointerLeave: () => z(null),
|
|
236
|
+
children: P.map((e) => {
|
|
237
|
+
let t = n(e.isSelected, e.hasData, R === e.key);
|
|
238
|
+
return h("div", {
|
|
238
239
|
className: "slicer-item",
|
|
239
240
|
role: "option",
|
|
240
241
|
"aria-selected": e.isSelected,
|
|
@@ -251,16 +252,16 @@ var v = () => m("svg", {
|
|
|
251
252
|
whiteSpace: "nowrap",
|
|
252
253
|
textOverflow: "ellipsis",
|
|
253
254
|
userSelect: "none",
|
|
254
|
-
cursor:
|
|
255
|
+
cursor: S ? void 0 : "pointer",
|
|
255
256
|
border: "1px solid transparent",
|
|
256
|
-
...r(X?.[t],
|
|
257
|
+
...r(X?.[t], j)
|
|
257
258
|
},
|
|
258
|
-
onPointerEnter: () =>
|
|
259
|
+
onPointerEnter: () => z(e.key),
|
|
259
260
|
onPointerDown: (e) => {
|
|
260
|
-
e.button === 0 && (e.stopPropagation(), e.preventDefault(),
|
|
261
|
+
e.button === 0 && (e.stopPropagation(), e.preventDefault(), T && !T.isSelected() && T.select());
|
|
261
262
|
},
|
|
262
|
-
onClick: (t) =>
|
|
263
|
-
children:
|
|
263
|
+
onClick: (t) => Y(e, t),
|
|
264
|
+
children: h("span", {
|
|
264
265
|
style: {
|
|
265
266
|
overflow: "hidden",
|
|
266
267
|
textOverflow: "ellipsis"
|
|
@@ -272,5 +273,5 @@ var v = () => m("svg", {
|
|
|
272
273
|
})]
|
|
273
274
|
});
|
|
274
275
|
}));
|
|
275
|
-
|
|
276
|
-
export {
|
|
276
|
+
S.displayName = "SlicerEditor";
|
|
277
|
+
export { S as SlicerEditor };
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { n as e } from "
|
|
8
|
-
import { t } from "./
|
|
7
|
+
import { n as e } from "./-wQNyCnoJdQUTTfP.mjs";
|
|
8
|
+
import { t } from "./CcewpxckpDrXSiZ-.mjs";
|
|
9
9
|
import { forwardRef as n, memo as r, useEffect as i } from "react";
|
|
10
10
|
import { jsx as a } from "react/jsx-runtime";
|
|
11
11
|
import { useImperativeElement as o, useMeasure as s, useTranslator as c } from "@sheetxl/utils-react";
|
|
@@ -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.
|