@sheetxl/react 0.8.0-beta.10 → 0.8.0-beta.11
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/{CYoUd5KIl7W3AsxH.mjs → 1-LEUre9ZLG0OYYB.mjs} +24 -23
- package/browser/esm/94dxo1A-z8lgiiGw.mjs +128 -0
- package/browser/esm/{BwRduT8FTrk5n72r.mjs → B26QVfjer2oY2ewK.mjs} +1 -1
- package/browser/esm/B93LSmhnvkxNXTq-.mjs +42 -0
- package/browser/esm/{BZcQ-KYwS62Ut45c.mjs → BQYS2Yf-EAV_tBLr.mjs} +1 -1
- package/browser/esm/BegvsXeRs7e-9t8k.mjs +8 -0
- package/browser/esm/Bl2BFCQ00fotauKB.mjs +36 -0
- package/browser/esm/{Cfe0kofqVKGxLqO6.mjs → Bos4Rkp8UTF7QXUB.mjs} +1 -1
- package/browser/esm/{Dd-ZybXAgoq9pgGv.mjs → C1pc9F4Rt2C5FKUo.mjs} +1 -1
- package/browser/esm/{C6urN77szrYwODXF.mjs → CPnnESfZz2jjJd82.mjs} +1 -1
- package/browser/esm/CRi6DQ3UXmPEv-w_.mjs +729 -0
- package/browser/esm/{BuvXl14hs-1CvjeA.mjs → ClAtIfYbsUPA073B.mjs} +1 -1
- package/browser/esm/CzRIbc-Lk__VMLKM.mjs +60 -0
- package/browser/esm/{DyU9UInRnfkPYYlR.mjs → D2u6THGErqw64KQI.mjs} +1 -1
- package/browser/esm/{cYjYjqEsyd63x8t4.mjs → DMdsMPT0fWBbTkNn.mjs} +1 -1
- package/browser/esm/{Bow9CzRJrYxak2i5.mjs → DS66lAIM-9M-YoZQ.mjs} +5 -8
- package/browser/esm/DgL7Dy-Lqcr1TvW6.mjs +23528 -0
- package/browser/esm/{DjiBz4H74I6nPUY6.mjs → Dnh1kpz3v1JKtRD_.mjs} +2 -2
- package/browser/esm/{Sp6PJavGKpF8SJzA.mjs → cQ6xdPFkEcuDlNTN.mjs} +1 -1
- package/browser/esm/chart.mjs +32 -52
- package/browser/esm/control.mjs +2 -2
- package/browser/esm/group.mjs +3 -3
- package/browser/esm/index.mjs +6590 -4824
- package/browser/esm/note.mjs +73 -47
- package/browser/esm/picture.mjs +2 -2
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +5 -5
- package/browser/esm/ugfE7YeZALQURDKF.mjs +241 -0
- package/licenses/dependencies.txt +313 -1
- package/node/esm/6zApGj9DozhFy-bx.mjs +35 -0
- package/node/esm/{DPN0n6MGYQ9vZ2KO.mjs → BMVK5plvmBOAIlxP.mjs} +1 -1
- package/node/esm/{Dxbm6ryIDCEi26RO.mjs → BaRfst1euuhquupX.mjs} +1 -1
- package/node/esm/{BJ7ZZm63j5O6cvrB.mjs → Be9c1GwQkPo8Piuh.mjs} +1 -1
- package/node/esm/{DhSq680c5tgMFFbj.mjs → BiaDWnN3tT7neoRL.mjs} +1 -1
- package/node/esm/BlxXufqBBg1PtsXd.mjs +8 -0
- package/node/esm/{CM5BT7h-hMtST2bE.mjs → C_SNx7TlFEcwbYjx.mjs} +1 -1
- package/node/esm/DJPgbB1X22YmhbaR.mjs +242 -0
- package/node/esm/DTMTIrYIK1eZswsM.mjs +37 -0
- package/node/esm/{Buw-VKYJy3y5dbaJ.mjs → D_pCpfdQowV_4Aje.mjs} +23 -22
- package/node/esm/{DYosMUJKp-3MSO4q.mjs → DgGEHydEjD7nfsDB.mjs} +1 -1
- package/node/esm/{CFFlJxNwgyInjEnh.mjs → Dj5FM7_-YWhCtCCt.mjs} +1 -1
- package/node/esm/{GkmuxU7OwRZtm2Rf.mjs → DxQZmb-j4NLUO9Af.mjs} +1 -1
- package/node/esm/{BfRn5S5V4X8xIAEa.mjs → JiQGhLkoL8CJpVvA.mjs} +1 -1
- package/node/esm/b-XRVRI1fYQQMkTC.mjs +1664 -0
- package/node/esm/chart.mjs +32 -52
- package/node/esm/control.mjs +2 -2
- package/node/esm/{C_ANM4feA1xV-pri.mjs → gpD-9LDW92phhoma.mjs} +1 -1
- package/node/esm/group.mjs +3 -3
- package/node/esm/index.mjs +9005 -7225
- package/node/esm/note.mjs +86 -60
- package/node/esm/picture.mjs +2 -2
- package/node/esm/shape.mjs +292 -340
- package/node/esm/sigD1UFqvPlWUw_9.mjs +128 -0
- package/node/esm/slicer.mjs +15 -15
- package/node/esm/{D3YXHeOyFp00Xk3m.mjs → umljAT66yb3_rURh.mjs} +53 -56
- package/package.json +8 -6
- package/resources/contents.json +6 -0
- package/resources/locales/contents.json +14 -0
- package/resources/locales/de/chart.cmd.json +82 -0
- package/resources/locales/de/sheet.cmd.json +11 -0
- package/resources/locales/de/table.cmd.json +1 -1
- package/resources/locales/de/ui.msg.json +12 -0
- package/resources/locales/de/workbook.cmd.json +5 -0
- package/resources/locales/en/chart.cmd.json +82 -0
- package/resources/locales/en/sheet.cmd.json +11 -0
- package/resources/locales/en/table.cmd.json +1 -1
- package/resources/locales/en/ui.msg.json +12 -0
- package/resources/locales/en/workbook.cmd.json +5 -0
- package/types/src/autoFill/FillMenu.d.ts +2 -2
- package/types/src/autoFill/FillSeries.d.ts +2 -2
- package/types/src/border/StaticBorderRenderer.d.ts +18 -1
- package/types/src/border/useBorders.d.ts +74 -1
- package/types/src/cell/FormulaCellRenderer.d.ts +5 -2
- package/types/src/cell/useFormulaViewAnchor.d.ts +2 -2
- package/types/src/chart/ChartCommands.d.ts +15 -0
- package/types/src/chart/ChartEditor.d.ts +10 -2
- package/types/src/chart/ChartElement.d.ts +111 -0
- package/types/src/chart/ChartKind.d.ts +7 -0
- package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
- package/types/src/chart/index.d.ts +2 -0
- package/types/src/chart/paint/_fills.d.ts +24 -0
- package/types/src/chart/paint/_graphics.d.ts +46 -0
- package/types/src/chart/paint/echarts.d.ts +30 -0
- package/types/src/chart/paint/index.d.ts +12 -0
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +132 -0
- package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
- package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
- package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
- package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
- package/types/src/chart/paint/kinds/_builtIns.d.ts +12 -0
- package/types/src/chart/paint/toEChartsOption.d.ts +31 -0
- package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
- package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
- package/types/src/comment/CommentCardRequest.d.ts +9 -9
- package/types/src/comment/useSheetComments.d.ts +2 -2
- package/types/src/context/WorksheetContext.d.ts +18 -0
- package/types/src/context/index.d.ts +1 -1
- package/types/src/editor/EditorCommands.d.ts +3 -3
- package/types/src/editor/SheetCellEditorLayer.d.ts +2 -2
- package/types/src/editor/SheetCellEditorStartLayer.d.ts +22 -5
- package/types/src/editor/SheetEditable.d.ts +6 -6
- package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
- package/types/src/editor/VirtualKeyboardLayer.d.ts +49 -0
- package/types/src/editor/formulaAnchor.d.ts +12 -0
- package/types/src/editor/index.d.ts +1 -0
- package/types/src/editor/pickedReference.d.ts +3 -3
- package/types/src/editor/useEditRejectedNotice.d.ts +3 -3
- package/types/src/editor/useFormulaHints.d.ts +2 -2
- package/types/src/editor/validationAlert.d.ts +3 -3
- package/types/src/frame/CommandContext.d.ts +7 -7
- package/types/src/index.d.ts +2 -0
- package/types/src/layer/BorderLayer.d.ts +2 -2
- package/types/src/layer/CellErrorLayer.d.ts +2 -2
- package/types/src/layer/CellFillLayer.d.ts +2 -2
- package/types/src/layer/CellInsertLayer.d.ts +71 -0
- package/types/src/layer/CircularIndicatorLayer.d.ts +2 -2
- package/types/src/layer/CommentCardLayer.d.ts +2 -2
- package/types/src/layer/CommentsLayer.d.ts +2 -2
- package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
- package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
- package/types/src/layer/ContextMenuLayer.d.ts +2 -2
- package/types/src/layer/GridFreezeLayer.d.ts +2 -2
- package/types/src/layer/HyperlinkLayer.d.ts +3 -3
- package/types/src/layer/MovableKindScope.d.ts +2 -2
- package/types/src/layer/ProtectionLayer.d.ts +3 -3
- package/types/src/layer/RangeAnnotationLayer.d.ts +2 -2
- package/types/src/layer/ResizeIndicator.d.ts +2 -2
- package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
- package/types/src/layer/SheetCellLayer.d.ts +4 -4
- package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
- package/types/src/layer/SheetGridLineLayer.d.ts +11 -13
- package/types/src/layer/SheetLayers.d.ts +115 -0
- package/types/src/layer/SheetMovableLayer.d.ts +2 -2
- package/types/src/layer/SheetOutlineLayer.d.ts +2 -2
- package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
- package/types/src/layer/SpillLayer.d.ts +2 -2
- package/types/src/layer/TableLayer.d.ts +2 -2
- package/types/src/layer/TableToolbar.d.ts +3 -3
- package/types/src/layer/ValidationDropdownLayer.d.ts +2 -2
- package/types/src/layer/ValidationIndicatorLayer.d.ts +2 -2
- package/types/src/layer/ValidationPromptLayer.d.ts +5 -4
- package/types/src/layer/_tableColor.d.ts +2 -2
- package/types/src/layer/index.d.ts +2 -0
- package/types/src/layer/useFreezeDrag.d.ts +2 -2
- package/types/src/layer/useNormalBorderLines.d.ts +15 -0
- package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
- package/types/src/layer/useSheetVisibleCells.d.ts +2 -2
- package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
- package/types/src/layer/useTableHeaderCells.d.ts +2 -2
- package/types/src/layer/useValidationPicker.d.ts +2 -2
- package/types/src/layer/useVisibleTables.d.ts +2 -2
- package/types/src/layer/validationMark.d.ts +3 -3
- package/types/src/listener/index.d.ts +5 -0
- package/types/src/listener/useCell.d.ts +29 -0
- package/types/src/listener/useCellRange.d.ts +23 -0
- package/types/src/listener/useCellValue.d.ts +26 -0
- package/types/src/listener/useModelListener.d.ts +4 -4
- package/types/src/listener/useRangeSnapshot.d.ts +35 -0
- package/types/src/listener/useTable.d.ts +26 -0
- package/types/src/movable/DefaultMovable.d.ts +8 -0
- package/types/src/movable/MovableCommands.d.ts +2 -2
- package/types/src/movable/MovableRenderers.d.ts +3 -3
- package/types/src/movable/index.d.ts +1 -0
- package/types/src/picker/cellPickerOpen.d.ts +3 -3
- package/types/src/picker/useCellPicker.d.ts +2 -2
- package/types/src/richText/RichTextEditor.d.ts +2 -2
- package/types/src/selection/SelectionCommands.d.ts +2 -2
- package/types/src/selection/SheetSelectionLayer.d.ts +2 -2
- package/types/src/sheet/ISheetHeaderElement.d.ts +1 -1
- package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +46 -13
- package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +2 -2
- package/types/src/sheet/SheetCommands.d.ts +2 -2
- package/types/src/sheet/SheetKindIcon.d.ts +14 -0
- package/types/src/sheet/SheetOutlineElement.d.ts +4 -4
- package/types/src/sheet/SheetPanels.d.ts +11 -0
- package/types/src/sheet/SheetScrollbar.d.ts +3 -3
- package/types/src/sheet/TopLeftCorner.d.ts +2 -2
- package/types/src/sheet/WorksheetElement.d.ts +12 -0
- package/types/src/sheet/_freezeAt.d.ts +2 -2
- package/types/src/sheet/circularReferences.d.ts +3 -3
- package/types/src/sheet/index.d.ts +5 -2
- package/types/src/sheet/useCycleHighlight.d.ts +2 -2
- package/types/src/tabStrip/SheetTab.d.ts +1 -1
- package/types/src/table/TableCommands.d.ts +2 -2
- package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
- package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
- package/types/src/theme/useGridColorScheme.d.ts +1 -1
- package/types/src/theme/useSystemColors.d.ts +2 -2
- package/types/src/workbook/DefaultRenderers.d.ts +3 -2
- package/types/src/workbook/IWorkbookElement.d.ts +27 -5
- package/browser/esm/BHjeSMaycUkS5dVL.mjs +0 -66
- package/browser/esm/CYMRbtPIr6SklGpp.mjs +0 -775
- package/browser/esm/CiRN-woJZWYOgTn4.mjs +0 -36
- package/browser/esm/J8cPagZBeXz86Lnd.mjs +0 -777
- package/node/esm/BpwE3HqTnrLLzE3C.mjs +0 -775
- package/node/esm/CV3bT3Hql74GcHoU.mjs +0 -37
- package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-template.json.d.ts +0 -9
- package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-template.json.d.ts +0 -9
- package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-template.json.d.ts +0 -9
- package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-template.json.d.ts +0 -9
- package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
- package/types/src/chart/templates/pie-template.json.d.ts +0 -9
- package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
- package/types/src/context/SheetContext.d.ts +0 -18
- package/types/src/sheet/SheetElement.d.ts +0 -15
|
@@ -1,13 +1,14 @@
|
|
|
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.11
|
|
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 { d as t } from "./
|
|
9
|
-
import { n
|
|
10
|
-
import {
|
|
7
|
+
import { t as e } from "./C1pc9F4Rt2C5FKUo.mjs";
|
|
8
|
+
import { d as t } from "./DS66lAIM-9M-YoZQ.mjs";
|
|
9
|
+
import { t as n } from "./BegvsXeRs7e-9t8k.mjs";
|
|
10
|
+
import { n as r } from "./Bl2BFCQ00fotauKB.mjs";
|
|
11
|
+
import { t as i } from "./CRi6DQ3UXmPEv-w_.mjs";
|
|
11
12
|
import { memo as a, useCallback as o, useReducer as s, useRef as c } from "react";
|
|
12
13
|
import { jsx as l } from "react/jsx-runtime";
|
|
13
14
|
import { messageKey as u } from "@sheetxl/utils";
|
|
@@ -26,7 +27,7 @@ var p = (e, t) => {
|
|
|
26
27
|
let { x: r, y: i, width: a, height: o } = e.bounds, s = -(e.rotation || 0) * Math.PI / 180, c = t.x - (r + a / 2), l = t.y - (i + o / 2), u = c * Math.cos(s) - l * Math.sin(s), d = c * Math.sin(s) + l * Math.cos(s);
|
|
27
28
|
return Math.abs(u) <= a / 2 + n && Math.abs(d) <= o / 2 + n;
|
|
28
29
|
}, g = a((t) => {
|
|
29
|
-
let { movable:
|
|
30
|
+
let { movable: r, flip: i, isDragging: a = !1, gesture: g } = t, _ = d(), v = f(n, null), [, y] = s((e) => e + 1, 0), b = r.getContent();
|
|
30
31
|
e(b, { onAnyChange: y });
|
|
31
32
|
let x = b.getConnectorFormat(), S = c(null), C = o((e) => {
|
|
32
33
|
let t = _?.getPanePointFromPointer(e.clientX, e.clientY);
|
|
@@ -44,12 +45,12 @@ var p = (e, t) => {
|
|
|
44
45
|
}, [_]), w = o((e) => {
|
|
45
46
|
if (e.button !== 0) return;
|
|
46
47
|
e.stopPropagation(), e.preventDefault();
|
|
47
|
-
let t = e.currentTarget.dataset.end,
|
|
48
|
-
if (!
|
|
48
|
+
let t = e.currentTarget.dataset.end, n = m(r);
|
|
49
|
+
if (!n || !_) return;
|
|
49
50
|
let i = {
|
|
50
51
|
pointerId: e.pointerId,
|
|
51
52
|
end: t,
|
|
52
|
-
placement:
|
|
53
|
+
placement: n,
|
|
53
54
|
candidates: [],
|
|
54
55
|
hit: null
|
|
55
56
|
};
|
|
@@ -59,7 +60,7 @@ var p = (e, t) => {
|
|
|
59
60
|
let r = i.hit, a = t === "start" ? n.getStartConnectedMovable() : n.getEndConnectedMovable(), o = t === "start" ? n.getStartConnectionSite() : n.getEndConnectionSite();
|
|
60
61
|
(r ? a !== r.target || o !== r.index : a !== null) && (r ? t === "start" ? n.startConnect(r.target, r.index) : n.endConnect(r.target, r.index) : t === "start" ? n.startDisconnect() : n.endDisconnect());
|
|
61
62
|
}) && (i.candidates = ((e) => {
|
|
62
|
-
let t = e.getRange().
|
|
63
|
+
let t = e.getRange().getWorksheet(), n = /* @__PURE__ */ new Set([e]);
|
|
63
64
|
for (let t = e.getParent(); t; t = t.getParent()) n.add(t);
|
|
64
65
|
let r = [];
|
|
65
66
|
for (let e of t.getMovables().getItems({ deep: !0 })) {
|
|
@@ -71,13 +72,13 @@ var p = (e, t) => {
|
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
74
|
return r;
|
|
74
|
-
})(
|
|
75
|
-
connector:
|
|
75
|
+
})(r), S.current = i, e.currentTarget.setPointerCapture(e.pointerId), v({
|
|
76
|
+
connector: r.getId(),
|
|
76
77
|
target: null,
|
|
77
78
|
index: null
|
|
78
79
|
}));
|
|
79
80
|
}, [
|
|
80
|
-
|
|
81
|
+
r,
|
|
81
82
|
_,
|
|
82
83
|
g,
|
|
83
84
|
v
|
|
@@ -85,8 +86,8 @@ var p = (e, t) => {
|
|
|
85
86
|
let t = S.current;
|
|
86
87
|
if (!t || t.pointerId !== e.pointerId) return;
|
|
87
88
|
e.stopPropagation();
|
|
88
|
-
let
|
|
89
|
-
if (!
|
|
89
|
+
let n = C(e);
|
|
90
|
+
if (!n) return;
|
|
90
91
|
let i = ((e, t, n) => {
|
|
91
92
|
let r = 8 / n, i = 10 / n, a = null, o = 1 / 0;
|
|
92
93
|
for (let { movable: n, placement: s } of t) {
|
|
@@ -104,9 +105,9 @@ var p = (e, t) => {
|
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
107
|
return a;
|
|
107
|
-
})(
|
|
108
|
+
})(n, t.candidates, _?.getZoom() || 1);
|
|
108
109
|
t.hit = i;
|
|
109
|
-
let a =
|
|
110
|
+
let a = r.getContent().getConnectorFormat(), o = a?.getEndPoints(t.placement);
|
|
110
111
|
if (!a || !o) return;
|
|
111
112
|
let s = o[t.end === "start" ? "end" : "start"];
|
|
112
113
|
o[t.end] = i ? {
|
|
@@ -120,10 +121,10 @@ var p = (e, t) => {
|
|
|
120
121
|
x: e.x + l * s,
|
|
121
122
|
y: e.y + l * c
|
|
122
123
|
};
|
|
123
|
-
})(s,
|
|
124
|
+
})(s, n) : n;
|
|
124
125
|
let c = a.placeEnds(o.start, o.end);
|
|
125
126
|
v({
|
|
126
|
-
connector:
|
|
127
|
+
connector: r.getId(),
|
|
127
128
|
target: i ? i.target.getId() : null,
|
|
128
129
|
index: i ? i.index : null
|
|
129
130
|
}), g.preview({
|
|
@@ -137,7 +138,7 @@ var p = (e, t) => {
|
|
|
137
138
|
}, [
|
|
138
139
|
C,
|
|
139
140
|
_,
|
|
140
|
-
|
|
141
|
+
r,
|
|
141
142
|
g,
|
|
142
143
|
v
|
|
143
144
|
]), E = o((e) => {
|
|
@@ -180,9 +181,9 @@ var v = {
|
|
|
180
181
|
}),
|
|
181
182
|
control: _,
|
|
182
183
|
commands: (e, t) => {
|
|
183
|
-
let { sheet:
|
|
184
|
-
e.use(
|
|
185
|
-
transaction:
|
|
184
|
+
let { sheet: n, movable: i, notifier: a } = t, o = i.getContent();
|
|
185
|
+
e.use(r({
|
|
186
|
+
transaction: n,
|
|
186
187
|
notifier: a
|
|
187
188
|
})), e.updateCommand("changeShape", {
|
|
188
189
|
disabledReasons: o.getConnectorFormat() ? [u("reason.connectorShape")] : [],
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
|
|
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 { n as e } from "./Bl2BFCQ00fotauKB.mjs";
|
|
8
|
+
import { ChartEditor as t } from "./chart.mjs";
|
|
9
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
10
|
+
import { messageKey as r, t as i } from "@sheetxl/utils";
|
|
11
|
+
var a = /* @__PURE__ */ new Set([
|
|
12
|
+
"waterfall",
|
|
13
|
+
"histogram",
|
|
14
|
+
"pareto",
|
|
15
|
+
"boxwhisker",
|
|
16
|
+
"treemap",
|
|
17
|
+
"sunburst",
|
|
18
|
+
"funnel",
|
|
19
|
+
"regionMap"
|
|
20
|
+
]), o = [
|
|
21
|
+
{
|
|
22
|
+
key: "chartTitleToggle",
|
|
23
|
+
state: (e) => e.getTitle().getVisible(),
|
|
24
|
+
show: ["chartTitleAboveChart"],
|
|
25
|
+
hide: ["chartTitleNone"]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
key: "chartLegendToggle",
|
|
29
|
+
state: (e) => e.getLegend().getVisible(),
|
|
30
|
+
show: ["legendRight"],
|
|
31
|
+
hide: ["legendNone"]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
key: "chartDataLabelsToggle",
|
|
35
|
+
state: (e) => e.getDataLabels().getVisible(),
|
|
36
|
+
show: ["dataLabelShow"],
|
|
37
|
+
hide: ["dataLabelNone"]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: "chartDataTableToggle",
|
|
41
|
+
state: (e) => e.getDataTable().getVisible(),
|
|
42
|
+
show: ["dataTableShow"],
|
|
43
|
+
hide: ["dataTableNone"]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: "chartGridlinesToggle",
|
|
47
|
+
state: (e) => e.getAxes().getValueAxis()?.getMajorGridlines().getVisible() ?? !1,
|
|
48
|
+
show: ["primaryValueGridLinesMajor"],
|
|
49
|
+
hide: ["primaryValueGridLinesNone"]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: "chartAxisTitlesToggle",
|
|
53
|
+
state: (e) => e.getAxes().getItems().some((e) => e.getAxisGroup() === "primary" && e.getTitle().getVisible()),
|
|
54
|
+
show: ["primaryCategoryAxisTitleAdjacentToAxis", "primaryValueAxisTitleRotated"],
|
|
55
|
+
hide: ["primaryCategoryAxisTitleNone", "primaryValueAxisTitleNone"]
|
|
56
|
+
}
|
|
57
|
+
], s = {
|
|
58
|
+
renderer: (e) => n(t, {
|
|
59
|
+
...e,
|
|
60
|
+
chart: e.movable.getContent()
|
|
61
|
+
}),
|
|
62
|
+
commands: (t, n) => {
|
|
63
|
+
let { sheet: s, movable: c, notifier: l } = n, u = c.getContent();
|
|
64
|
+
t.use(e({
|
|
65
|
+
transaction: s,
|
|
66
|
+
notifier: l
|
|
67
|
+
}));
|
|
68
|
+
let d = () => ({ chart: () => u }), f = () => u.isReadOnly() ? [r("reason.sheetProtected")] : [], p = () => {
|
|
69
|
+
let e = u.isReadOnly() ? [r("reason.sheetProtected")] : a.has(u.getChartType()) ? [r("reason.chartTypeNotEditable")] : [];
|
|
70
|
+
t.updateCommand("chartChangeType", {
|
|
71
|
+
callback: (e) => {
|
|
72
|
+
let t = typeof e == "string" ? e : e?.type;
|
|
73
|
+
t && u.setChartType(t);
|
|
74
|
+
},
|
|
75
|
+
state: u.getChartType(),
|
|
76
|
+
context: d,
|
|
77
|
+
disabledReasons: e
|
|
78
|
+
}), t.updateCommand("chartSwitchRowColumn", {
|
|
79
|
+
callback: () => {
|
|
80
|
+
u.setSeriesBy(u.getSeriesBy() === "rows" ? "columns" : "rows");
|
|
81
|
+
},
|
|
82
|
+
state: u.getSeriesBy(),
|
|
83
|
+
context: d,
|
|
84
|
+
disabledReasons: e
|
|
85
|
+
}), t.updateCommand("chartSelectData", {
|
|
86
|
+
tags: ["noTransaction", "noRepeat"],
|
|
87
|
+
callback: async (e) => {
|
|
88
|
+
if (!e) {
|
|
89
|
+
let t = await l?.showInput?.({
|
|
90
|
+
title: i("dialog.chartSelectData.title"),
|
|
91
|
+
description: i("dialog.chartSelectData.description"),
|
|
92
|
+
inputLabel: i("dialog.chartSelectData.inputLabel"),
|
|
93
|
+
initialValue: u.getSeries()[0]?.getValuesRange()?.getAddress() ?? "",
|
|
94
|
+
options: [{
|
|
95
|
+
id: "Select",
|
|
96
|
+
label: () => i("dialog.select")
|
|
97
|
+
}]
|
|
98
|
+
});
|
|
99
|
+
if (!t || t.option !== "Select" || !t.input) return;
|
|
100
|
+
e = t.input;
|
|
101
|
+
}
|
|
102
|
+
u.setData(e);
|
|
103
|
+
},
|
|
104
|
+
context: d,
|
|
105
|
+
disabledReasons: e
|
|
106
|
+
}), t.updateCommand("chartAddElement", {
|
|
107
|
+
callback: (e) => {
|
|
108
|
+
e && u.setElement(e);
|
|
109
|
+
},
|
|
110
|
+
context: d,
|
|
111
|
+
disabledReasons: e
|
|
112
|
+
});
|
|
113
|
+
for (let n of o) {
|
|
114
|
+
let r = n.state(u);
|
|
115
|
+
t.updateCommand(n.key, {
|
|
116
|
+
callback: () => {
|
|
117
|
+
for (let e of r ? n.hide : n.show) u.setElement(e);
|
|
118
|
+
},
|
|
119
|
+
state: r,
|
|
120
|
+
context: d,
|
|
121
|
+
disabledReasons: n.key === "chartTitleToggle" || n.key === "chartLegendToggle" ? f() : e
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
return p(), u.addListeners({ onAnyChange: p });
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
export { s as ChartKind };
|
|
@@ -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.11
|
|
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,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
|
|
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
|
+
var e, t = Object.defineProperty, n = (e, n) => {
|
|
8
|
+
let r = {};
|
|
9
|
+
for (var i in e) t(r, i, {
|
|
10
|
+
get: e[i],
|
|
11
|
+
enumerable: !0
|
|
12
|
+
});
|
|
13
|
+
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
14
|
+
}, r = /* @__PURE__ */ new Map(), i = !1;
|
|
15
|
+
function a(e) {
|
|
16
|
+
for (let t of e.types) r.set(t, e);
|
|
17
|
+
return () => {
|
|
18
|
+
for (let t of e.types) r.get(t) === e && r.delete(t);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
(function(e) {
|
|
22
|
+
function t(e) {
|
|
23
|
+
return e.type === "custom" ? `custom:${e.kind}` : e.type;
|
|
24
|
+
}
|
|
25
|
+
e.register = function(e) {
|
|
26
|
+
return a(e);
|
|
27
|
+
}, e.get = function(e) {
|
|
28
|
+
return r.get(e);
|
|
29
|
+
}, e.has = function(e) {
|
|
30
|
+
return r.has(e);
|
|
31
|
+
}, e.getTypes = function() {
|
|
32
|
+
return [...r.keys()];
|
|
33
|
+
}, e.typeOf = t, e.of = function(e) {
|
|
34
|
+
return r.get(t(e));
|
|
35
|
+
}, e.registerBuiltIns = function(e) {
|
|
36
|
+
i || (i = !0, e((e) => a({
|
|
37
|
+
...e,
|
|
38
|
+
types: e.types.filter((e) => !r.has(e))
|
|
39
|
+
})));
|
|
40
|
+
};
|
|
41
|
+
})(e ||= {});
|
|
42
|
+
export { n, e 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.11
|
|
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,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
|
|
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
|
+
var e = "movable-connect";
|
|
8
|
+
export { e as t };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.11
|
|
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
|
+
var e = "command", t = (e, t) => !!e && (e.getTags?.() ?? []).includes(t);
|
|
8
|
+
function n(n) {
|
|
9
|
+
let { transaction: r, notifier: i, manager: a } = n, o = n.isRepeatable ?? ((e) => !t(e, "noRepeat")), s = Promise.resolve();
|
|
10
|
+
return (n) => (c, l) => {
|
|
11
|
+
if (t(l, "noTransaction")) return n(c, l);
|
|
12
|
+
let u = s.then(async () => {
|
|
13
|
+
let t = l?.getLabel?.() ?? void 0, s = l?.getKey?.(), u = i ? await Promise.resolve(i.showBusy(t ?? "Working…")) : null;
|
|
14
|
+
try {
|
|
15
|
+
let i;
|
|
16
|
+
return await r.doBatch(async () => {
|
|
17
|
+
i = await n(c, l);
|
|
18
|
+
}, {
|
|
19
|
+
description: t,
|
|
20
|
+
meta: s ? { [e]: s } : void 0
|
|
21
|
+
}), a && l && o(l) && a.setRepeatableOperation({
|
|
22
|
+
description: t ?? "last action",
|
|
23
|
+
repeat: () => {
|
|
24
|
+
l.execute(c);
|
|
25
|
+
}
|
|
26
|
+
}), i;
|
|
27
|
+
} catch (e) {
|
|
28
|
+
e && i?.showError?.(e);
|
|
29
|
+
} finally {
|
|
30
|
+
u?.();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return s = u.then(() => {}, () => {}), u;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export { n, e 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.11
|
|
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.11
|
|
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.11
|
|
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.
|