@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
package/browser/esm/note.mjs
CHANGED
|
@@ -1,86 +1,112 @@
|
|
|
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 { t } from "./
|
|
9
|
-
import { t as n } from "./
|
|
10
|
-
import { Color as r, IColor as i, IFont as a } from "@sheetxl/sdk";
|
|
11
|
-
import { forwardRef as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import { useImperativeElement as
|
|
14
|
-
var
|
|
7
|
+
import { t as e } from "./C1pc9F4Rt2C5FKUo.mjs";
|
|
8
|
+
import { t } from "./D2u6THGErqw64KQI.mjs";
|
|
9
|
+
import { t as n } from "./Dnh1kpz3v1JKtRD_.mjs";
|
|
10
|
+
import { Color as r, IColor as i, IFont as a, IFontStyle as o, IStroke as s } from "@sheetxl/sdk";
|
|
11
|
+
import { forwardRef as c, memo as l, useReducer as u } from "react";
|
|
12
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
13
|
+
import { useImperativeElement as f } from "@sheetxl/utils-react";
|
|
14
|
+
var p = new r(i.Named.InfoBk).toCSS("adaptive"), m = new r(i.Named.InfoText).toCSS("adaptive"), h = (e, t) => {
|
|
15
15
|
if (t) try {
|
|
16
|
-
return e.
|
|
16
|
+
return e.getWorksheet().getStyles().parseColor(t)?.toCSS("adaptive");
|
|
17
17
|
} catch {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, g = (e, t) => {
|
|
21
21
|
let n = t.family;
|
|
22
|
-
if (
|
|
23
|
-
let
|
|
24
|
-
n = (
|
|
22
|
+
if (n === o.ThemeFamily.Heading || n === o.ThemeFamily.Body) {
|
|
23
|
+
let t = e.getWorksheet().getStyles().getTheme().getFontScheme();
|
|
24
|
+
n = (n === o.ThemeFamily.Heading ? t.getMajorFont() : t.getMinorFont()) ?? void 0;
|
|
25
25
|
}
|
|
26
26
|
if (n) return [n, ...t.fallbacks ?? []].map((e) => e.includes(" ") ? `"${e}"` : e).join(", ");
|
|
27
|
-
},
|
|
27
|
+
}, _ = (e) => {
|
|
28
28
|
let t = [], n = e.underline;
|
|
29
|
-
if (n && n !== a.UnderlineStyle.None && t.push("underline"), e.strike && t.push("line-through"), t.length === 0) return;
|
|
29
|
+
if (n && n !== a.UnderlineStyle.None && t.push("underline"), e.strike && e.strike !== a.StrikeStyle.None && t.push("line-through"), t.length === 0) return;
|
|
30
30
|
let r = n === a.UnderlineStyle.Double || n === a.UnderlineStyle.DoubleAccounting;
|
|
31
31
|
return t.join(" ") + (r ? " double" : "");
|
|
32
|
-
},
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
}, v = (e) => {
|
|
33
|
+
let t = {
|
|
34
|
+
borderWidth: "1px",
|
|
35
|
+
borderStyle: "solid",
|
|
36
|
+
borderColor: `var(--sxl-note-border-color, ${m})`,
|
|
37
|
+
backgroundColor: `var(--sxl-note-background-color, ${p})`
|
|
38
|
+
}, n = e.getStyle(), r = n?.toJSON();
|
|
39
|
+
if (!n || !r) return t;
|
|
40
|
+
try {
|
|
41
|
+
if (r.fill && (delete t.backgroundColor, Object.assign(t, n.getFill().toCSS("adaptive"))), r.stroke) {
|
|
42
|
+
let e = n.getStroke();
|
|
43
|
+
if (e.isVisible()) {
|
|
44
|
+
let { borderWidth: n, borderStyle: r, borderColor: i } = e.toCSS("adaptive");
|
|
45
|
+
Object.assign(t, {
|
|
46
|
+
borderWidth: n,
|
|
47
|
+
borderStyle: r,
|
|
48
|
+
borderColor: i
|
|
49
|
+
}), e.getCompound() !== s.Compound.Single && (t.borderStyle = "double");
|
|
50
|
+
} else t.borderStyle = "none";
|
|
51
|
+
}
|
|
52
|
+
} catch {}
|
|
53
|
+
return t;
|
|
54
|
+
}, y = l(c((r, i) => {
|
|
55
|
+
let { children: a, disabled: o, style: s, note: c, movable: l, zoom: p = 1, isDragging: y, onHide: b, onShow: x, onDragZone: S, adornmentHost: C, flip: w, gesture: T, ...E } = r, [, D] = u((e) => e + 1, 0);
|
|
56
|
+
e(c, {
|
|
57
|
+
onContentChange: () => {
|
|
58
|
+
D();
|
|
59
|
+
},
|
|
60
|
+
onAnyChange: () => {
|
|
61
|
+
D();
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
let O = f(i, () => ({ isNoteEditor: () => !0 }), []);
|
|
65
|
+
if (!c.isDeleted() && c.isNote()) return d(t, {
|
|
39
66
|
className: "note-editor",
|
|
40
|
-
...
|
|
41
|
-
ref:
|
|
42
|
-
movable:
|
|
67
|
+
...E,
|
|
68
|
+
ref: O,
|
|
69
|
+
movable: l,
|
|
43
70
|
onContextMenu: (e) => {
|
|
44
71
|
e.stopPropagation();
|
|
45
72
|
},
|
|
46
|
-
onDragZone:
|
|
47
|
-
disabled:
|
|
73
|
+
onDragZone: S,
|
|
74
|
+
disabled: o,
|
|
48
75
|
style: {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
color: `var(--sxl-note-color, ${f})`,
|
|
76
|
+
...v(c),
|
|
77
|
+
color: `var(--sxl-note-color, ${m})`,
|
|
52
78
|
fontFamily: "Tahoma, sans-serif",
|
|
53
79
|
fontSize: "9pt",
|
|
54
|
-
zoom:
|
|
55
|
-
boxShadow:
|
|
56
|
-
...
|
|
80
|
+
zoom: p,
|
|
81
|
+
boxShadow: y ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0,
|
|
82
|
+
...s
|
|
57
83
|
},
|
|
58
84
|
contentStyle: { padding: "0px 1px" },
|
|
59
|
-
children:
|
|
60
|
-
value:
|
|
61
|
-
readOnly:
|
|
85
|
+
children: d(n, {
|
|
86
|
+
value: c.getRichContent() ?? c.getContent(),
|
|
87
|
+
readOnly: o,
|
|
62
88
|
runStyle: (e) => ((e, t) => {
|
|
63
89
|
if (!t) return;
|
|
64
|
-
let n = t.
|
|
90
|
+
let n = !!t.baseline, r = t.size === void 0 ? void 0 : `${t.size}pt`;
|
|
65
91
|
return n && (r = t.size === void 0 ? "smaller" : .66 * t.size + "pt"), {
|
|
66
|
-
fontFamily:
|
|
92
|
+
fontFamily: g(e, t),
|
|
67
93
|
fontSize: r,
|
|
68
94
|
fontWeight: t.weight,
|
|
69
95
|
fontStyle: t.style,
|
|
70
|
-
textDecoration:
|
|
71
|
-
verticalAlign: n ? t.
|
|
96
|
+
textDecoration: _(t),
|
|
97
|
+
verticalAlign: n ? t.baseline > 0 ? "super" : "sub" : void 0,
|
|
72
98
|
letterSpacing: t.letterSpacing === void 0 ? void 0 : `${t.letterSpacing}px`,
|
|
73
|
-
color:
|
|
99
|
+
color: h(e, t.color)
|
|
74
100
|
};
|
|
75
|
-
})(
|
|
101
|
+
})(c, e),
|
|
76
102
|
onChange: (e) => {
|
|
77
|
-
|
|
103
|
+
c.setContent(e);
|
|
78
104
|
},
|
|
79
105
|
onDone: () => {
|
|
80
|
-
|
|
106
|
+
l?.unselect();
|
|
81
107
|
}
|
|
82
108
|
})
|
|
83
109
|
});
|
|
84
110
|
}));
|
|
85
|
-
|
|
86
|
-
export {
|
|
111
|
+
y.displayName = "NoteEditor";
|
|
112
|
+
export { y as NoteEditor };
|
package/browser/esm/picture.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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 "./
|
|
7
|
+
import { t as e } from "./C1pc9F4Rt2C5FKUo.mjs";
|
|
8
8
|
import { forwardRef as t, memo as n, useEffect as r, useMemo as i, useReducer as a, useState as o } from "react";
|
|
9
9
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
10
10
|
import { useImperativeElement as l } from "@sheetxl/utils-react";
|
package/browser/esm/shape.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
export { t as ShapeEditor } from "./
|
|
7
|
+
export { t as ShapeEditor } from "./CRi6DQ3UXmPEv-w_.mjs";
|
package/browser/esm/slicer.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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 { n as t } from "./
|
|
9
|
-
import { i as n, r, t as i } from "./
|
|
7
|
+
import { t as e } from "./C1pc9F4Rt2C5FKUo.mjs";
|
|
8
|
+
import { n as t } from "./BQYS2Yf-EAV_tBLr.mjs";
|
|
9
|
+
import { i as n, r, t as i } from "./DMdsMPT0fWBbTkNn.mjs";
|
|
10
10
|
import { forwardRef as a, memo as o, useCallback as s, useEffect as c, useLayoutEffect as l, useMemo as u, useReducer as ee, useRef as d, useState as f } from "react";
|
|
11
11
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
12
12
|
import { useImperativeElement as h, useNotifier as g, useTranslator as _ } from "@sheetxl/utils-react";
|
|
@@ -48,7 +48,7 @@ var v = () => m("svg", {
|
|
|
48
48
|
fontSize: "11pt"
|
|
49
49
|
};
|
|
50
50
|
}, b = o(a((a, o) => {
|
|
51
|
-
let { children: b, disabled: x, style: ne, slicer: S, movable: C, zoom: w = 1, isDragging: T, onHide: re, onShow: ie, onDragZone: E, adornmentHost: ae, flip: oe, gesture: se, ...D } = a, O = _(), k = g(), A = (t() ?? S.getTable()?.
|
|
51
|
+
let { children: b, disabled: x, style: ne, slicer: S, movable: C, zoom: w = 1, isDragging: T, onHide: re, onShow: ie, onDragZone: E, adornmentHost: ae, flip: oe, gesture: se, ...D } = a, O = _(), k = g(), A = (t() ?? S.getTable()?.getWorksheet() ?? null)?.getStyles() ?? null, [j, M] = ee((e) => e + 1, 0);
|
|
52
52
|
e(S, {
|
|
53
53
|
onAnyChange: M,
|
|
54
54
|
onReferencesChange: M
|
|
@@ -0,0 +1,241 @@
|
|
|
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 { t as e } from "./Bos4Rkp8UTF7QXUB.mjs";
|
|
8
|
+
import { forwardRef as t, memo as n, useCallback as r, useEffect as i, useLayoutEffect as a, useRef as o, useState as s } from "react";
|
|
9
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
|
+
import { CommonUtils as u, defineLazyModule as d } from "@sheetxl/utils";
|
|
11
|
+
import { useImperativeElement as ee, useMeasure as f } from "@sheetxl/utils-react";
|
|
12
|
+
var p = d("chart:paint", () => import("./DgL7Dy-Lqcr1TvW6.mjs")), m = (e, t) => {
|
|
13
|
+
let n = e.getElementType();
|
|
14
|
+
if (n === "point") {
|
|
15
|
+
let n = e.getParent();
|
|
16
|
+
return t === n || t?.getElementType() === "point" && t.getParent() === n ? e : n;
|
|
17
|
+
}
|
|
18
|
+
if (n === "legendEntry") {
|
|
19
|
+
let n = e.getParent();
|
|
20
|
+
return t === n || t?.getElementType() === "legendEntry" ? e : n;
|
|
21
|
+
}
|
|
22
|
+
if (n === "dataLabel") {
|
|
23
|
+
let n = e.getParent()?.getParent(), r = n?.getDataLabels();
|
|
24
|
+
return r ? t === r || t?.getElementType() === "dataLabel" && t.getParent()?.getParent() === n ? e : r : e;
|
|
25
|
+
}
|
|
26
|
+
return e;
|
|
27
|
+
}, h = {
|
|
28
|
+
boxes: [],
|
|
29
|
+
handles: []
|
|
30
|
+
}, g = n(t((t, n) => {
|
|
31
|
+
let { children: d, style: g, chart: _, onChartChange: v, zoom: y = 1, width: b, height: x, selection: S = null, onElementPress: C, onPointerDown: w, ...te } = t, [T, E] = s(() => u.isPromiseLike(_) ? null : _), [D, ne] = s(null), O = o(v);
|
|
32
|
+
O.current = v;
|
|
33
|
+
let k = o(null);
|
|
34
|
+
i(() => {
|
|
35
|
+
let e = !0, t = (e, t) => {
|
|
36
|
+
ne(t), E(e), k.current !== e && (k.current = e, O.current?.(e));
|
|
37
|
+
};
|
|
38
|
+
if (u.isPromiseLike(_)) return _.then((n) => {
|
|
39
|
+
e && t(n, null);
|
|
40
|
+
}, (n) => {
|
|
41
|
+
e && t(null, n);
|
|
42
|
+
}), () => {
|
|
43
|
+
e = !1;
|
|
44
|
+
};
|
|
45
|
+
t(_, null);
|
|
46
|
+
}, [_]);
|
|
47
|
+
let [A, j] = f(), M = typeof b == "number" ? b : j.width, N = typeof x == "number" ? x : j.height, P = M ? Math.round(M / y) : 0, F = N ? Math.round(N / y) : 0, I = o({
|
|
48
|
+
width: P,
|
|
49
|
+
height: F
|
|
50
|
+
});
|
|
51
|
+
I.current = {
|
|
52
|
+
width: P,
|
|
53
|
+
height: F
|
|
54
|
+
};
|
|
55
|
+
let L = r(async () => {
|
|
56
|
+
let e = I.current;
|
|
57
|
+
if (!T || !e.width || !e.height) return null;
|
|
58
|
+
let t = T.getLayout(e);
|
|
59
|
+
return t ? (await p.load()).renderChartToSVG(t) : null;
|
|
60
|
+
}, [T]), R = o(null), z = o(null), B = o(y);
|
|
61
|
+
B.current = y;
|
|
62
|
+
let V = r((e, t) => {
|
|
63
|
+
let n = R.current;
|
|
64
|
+
if (!n) return null;
|
|
65
|
+
let r = n.getBoundingClientRect(), i = B.current || 1;
|
|
66
|
+
return {
|
|
67
|
+
x: (e - r.left) / i,
|
|
68
|
+
y: (t - r.top) / i
|
|
69
|
+
};
|
|
70
|
+
}, []), H = r((e, t) => {
|
|
71
|
+
let n = z.current, r = V(e, t);
|
|
72
|
+
return T && n && r ? T.getElementAt(r, n) : null;
|
|
73
|
+
}, [T, V]), U = ee(n, () => ({
|
|
74
|
+
isChartElement: () => !0,
|
|
75
|
+
getChart: () => T,
|
|
76
|
+
toSVG: L,
|
|
77
|
+
getElementAt: H
|
|
78
|
+
}), [
|
|
79
|
+
T,
|
|
80
|
+
L,
|
|
81
|
+
H
|
|
82
|
+
]), W = e([
|
|
83
|
+
U,
|
|
84
|
+
A,
|
|
85
|
+
R
|
|
86
|
+
]), G = o(null), K = o(null), [q, J] = s(() => p.peek() ?? null), [Y, X] = s(null), [re, ie] = s(0), [Z, ae] = s(h);
|
|
87
|
+
i(() => T?.addListeners({ onLayoutChange: () => ie((e) => e + 1) }), [T]), i(() => {
|
|
88
|
+
if (q) return;
|
|
89
|
+
let e = !0;
|
|
90
|
+
return p.load().then((t) => {
|
|
91
|
+
e && J(t);
|
|
92
|
+
}, (t) => {
|
|
93
|
+
e && X(t);
|
|
94
|
+
}), () => {
|
|
95
|
+
e = !1;
|
|
96
|
+
};
|
|
97
|
+
}, [q]);
|
|
98
|
+
let Q = r(() => {
|
|
99
|
+
let e = z.current;
|
|
100
|
+
ae(T && e && S && !S.isEmpty() ? ((e, t, n) => {
|
|
101
|
+
let r = [], i = [];
|
|
102
|
+
for (let a of n.getItems()) {
|
|
103
|
+
if (a.getChart() !== e) continue;
|
|
104
|
+
let o = a.getElementType();
|
|
105
|
+
if (o === "series" || o === "dataLabels") {
|
|
106
|
+
let n = o === "series" ? a : a.getParent(), i = o === "series" ? n.getPoints() : n.getPoints().map((e) => e.getDataLabel());
|
|
107
|
+
for (let n of i) {
|
|
108
|
+
let i = e.getElementBounds(n, t);
|
|
109
|
+
i && r.push(i);
|
|
110
|
+
}
|
|
111
|
+
if (r.length > 0) continue;
|
|
112
|
+
}
|
|
113
|
+
let s = e.getElementBounds(a, t);
|
|
114
|
+
if (s && (r.push(s), n.getItems().length === 1)) {
|
|
115
|
+
let e = [
|
|
116
|
+
s.x,
|
|
117
|
+
s.x + s.width / 2,
|
|
118
|
+
s.x + s.width
|
|
119
|
+
], t = [
|
|
120
|
+
s.y,
|
|
121
|
+
s.y + s.height / 2,
|
|
122
|
+
s.y + s.height
|
|
123
|
+
];
|
|
124
|
+
for (let n of e) for (let r of t) n === e[1] && r === t[1] || i.push({
|
|
125
|
+
x: n,
|
|
126
|
+
y: r
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
boxes: r,
|
|
132
|
+
handles: i
|
|
133
|
+
};
|
|
134
|
+
})(T, e, S) : h);
|
|
135
|
+
}, [T, S]);
|
|
136
|
+
i(() => S?.addListeners({ onChange: Q }), [S, Q]), a(() => {
|
|
137
|
+
let e = G.current;
|
|
138
|
+
if (!(q && e && T && P && F)) return;
|
|
139
|
+
let t = T.getLayout({
|
|
140
|
+
width: P,
|
|
141
|
+
height: F
|
|
142
|
+
});
|
|
143
|
+
if (z.current = t, !t) return K.current?.dispose(), K.current = null, void Q();
|
|
144
|
+
K.current ? K.current.update(t) : K.current = q.mountChart(e, t), Q();
|
|
145
|
+
}, [
|
|
146
|
+
q,
|
|
147
|
+
T,
|
|
148
|
+
P,
|
|
149
|
+
F,
|
|
150
|
+
re,
|
|
151
|
+
Q
|
|
152
|
+
]), i(() => () => {
|
|
153
|
+
K.current?.dispose(), K.current = null, z.current = null;
|
|
154
|
+
}, [T]);
|
|
155
|
+
let oe = r((e) => {
|
|
156
|
+
if (w?.(e), e.button !== 0 && e.button !== 2) return;
|
|
157
|
+
let t = z.current, n = V(e.clientX, e.clientY);
|
|
158
|
+
if (!T || !t || !n) return;
|
|
159
|
+
let r = T.getElementAt(n, t);
|
|
160
|
+
if (C?.({
|
|
161
|
+
element: r,
|
|
162
|
+
point: n,
|
|
163
|
+
event: e
|
|
164
|
+
}), !S) return;
|
|
165
|
+
if (!r || r.getElementType() === "chartArea") return void S.clear();
|
|
166
|
+
let i = m(r, S.getActive());
|
|
167
|
+
S.isSelected(i) && S.getItems().length === 1 || S.select([i]);
|
|
168
|
+
}, [
|
|
169
|
+
T,
|
|
170
|
+
S,
|
|
171
|
+
C,
|
|
172
|
+
w,
|
|
173
|
+
V
|
|
174
|
+
]);
|
|
175
|
+
if (T?.isDeleted()) return;
|
|
176
|
+
let $ = Y ?? D;
|
|
177
|
+
return l("div", {
|
|
178
|
+
...te,
|
|
179
|
+
onPointerDown: oe,
|
|
180
|
+
style: {
|
|
181
|
+
...b === void 0 ? {} : { width: b },
|
|
182
|
+
...x === void 0 ? {} : { height: x },
|
|
183
|
+
...g,
|
|
184
|
+
overflow: "hidden"
|
|
185
|
+
},
|
|
186
|
+
ref: W,
|
|
187
|
+
children: [
|
|
188
|
+
$ ? c("div", {
|
|
189
|
+
className: "chart-element-error",
|
|
190
|
+
style: {
|
|
191
|
+
padding: "8px",
|
|
192
|
+
fontSize: "12px",
|
|
193
|
+
color: "var(--sxl-color-error, #b00020)"
|
|
194
|
+
},
|
|
195
|
+
children: $.message
|
|
196
|
+
}) : null,
|
|
197
|
+
c("div", {
|
|
198
|
+
className: "chart-element",
|
|
199
|
+
ref: G,
|
|
200
|
+
style: {
|
|
201
|
+
width: P || "100%",
|
|
202
|
+
height: F || "100%",
|
|
203
|
+
zoom: y,
|
|
204
|
+
position: "relative"
|
|
205
|
+
}
|
|
206
|
+
}),
|
|
207
|
+
Z.boxes.length > 0 ? l("div", {
|
|
208
|
+
className: "chart-element-selection",
|
|
209
|
+
style: {
|
|
210
|
+
position: "absolute",
|
|
211
|
+
left: 0,
|
|
212
|
+
top: 0,
|
|
213
|
+
width: P,
|
|
214
|
+
height: F,
|
|
215
|
+
zoom: y,
|
|
216
|
+
pointerEvents: "none"
|
|
217
|
+
},
|
|
218
|
+
children: [Z.boxes.map((e, t) => c("div", { style: {
|
|
219
|
+
position: "absolute",
|
|
220
|
+
left: e.x - 1,
|
|
221
|
+
top: e.y - 1,
|
|
222
|
+
width: Math.max(0, e.width),
|
|
223
|
+
height: Math.max(0, e.height),
|
|
224
|
+
border: "1px solid var(--sxl-color-primary, #1a73e8)",
|
|
225
|
+
boxSizing: "content-box"
|
|
226
|
+
} }, `box-${t}`)), Z.handles.map((e, t) => c("div", { style: {
|
|
227
|
+
position: "absolute",
|
|
228
|
+
left: e.x - 3,
|
|
229
|
+
top: e.y - 3,
|
|
230
|
+
width: 6,
|
|
231
|
+
height: 6,
|
|
232
|
+
background: "var(--sxl-color-background, #fff)",
|
|
233
|
+
border: "1px solid var(--sxl-color-primary, #1a73e8)",
|
|
234
|
+
boxSizing: "border-box"
|
|
235
|
+
} }, `handle-${t}`))]
|
|
236
|
+
}) : null
|
|
237
|
+
]
|
|
238
|
+
});
|
|
239
|
+
}));
|
|
240
|
+
g.displayName = "ChartElement";
|
|
241
|
+
export { m as n, g as t };
|