@sheetxl/react 0.8.0-beta.10 → 0.8.0-beta.12
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/B4mT3G7GHwgDYFGP.mjs +128 -0
- package/browser/esm/{BwRduT8FTrk5n72r.mjs → BDlpRkuBok0Uu4Hn.mjs} +1 -1
- package/browser/esm/BR-AiOwuQlYh5-tr.mjs +730 -0
- package/browser/esm/{BuvXl14hs-1CvjeA.mjs → BapujiblfiXDlu67.mjs} +1 -1
- package/browser/esm/{DyU9UInRnfkPYYlR.mjs → CSFORKZ8zrVL_Y0w.mjs} +1 -1
- package/browser/esm/CUekkfE6uwwsdQpc.mjs +36 -0
- package/browser/esm/C_LUq-BnguetvGZz.mjs +23561 -0
- package/browser/esm/{BZcQ-KYwS62Ut45c.mjs → Ck1LbcsdSfKNi6xq.mjs} +1 -1
- package/browser/esm/{CYoUd5KIl7W3AsxH.mjs → Cslk_qRdBSuJIi1O.mjs} +24 -23
- package/browser/esm/CtGhA0kS2MCfEsHN.mjs +262 -0
- package/browser/esm/D22NJmTiky4NL8tM.mjs +8 -0
- package/browser/esm/D2GydDzPuvIjdpok.mjs +42 -0
- package/browser/esm/DGG1auUKsjFbAazu.mjs +60 -0
- package/browser/esm/{Cfe0kofqVKGxLqO6.mjs → DN3lqq95KY0K6f1x.mjs} +1 -1
- package/browser/esm/{DjiBz4H74I6nPUY6.mjs → D_usN3pWuCJU2GN-.mjs} +2 -2
- package/browser/esm/{Sp6PJavGKpF8SJzA.mjs → DhYQRc8L2kALmFNz.mjs} +1 -1
- package/browser/esm/{Bow9CzRJrYxak2i5.mjs → DxEczXCHTerDemDP.mjs} +113 -108
- package/browser/esm/{Dd-ZybXAgoq9pgGv.mjs → LBQDhVhz7S7i6a8i.mjs} +1 -1
- package/browser/esm/{C6urN77szrYwODXF.mjs → ZoS0cpNEBcv6p-Z1.mjs} +1 -1
- package/browser/esm/{cYjYjqEsyd63x8t4.mjs → _6Sb6ElRcZftxMNh.mjs} +1 -1
- package/browser/esm/chart.mjs +33 -52
- package/browser/esm/control.mjs +2 -2
- package/browser/esm/group.mjs +3 -3
- package/browser/esm/index.mjs +8074 -5647
- package/browser/esm/note.mjs +73 -47
- package/browser/esm/picture.mjs +41 -41
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +5 -5
- package/licenses/dependencies.txt +313 -1
- package/node/esm/{Dxbm6ryIDCEi26RO.mjs → Apcuz4_QtBHt7G47.mjs} +1 -1
- package/node/esm/Bi2Jwc0zpweaNzKc.mjs +1697 -0
- package/node/esm/{Buw-VKYJy3y5dbaJ.mjs → C0KLMCRb3sbd5Q20.mjs} +23 -22
- package/node/esm/CH1DVfFhjdd_3pw1.mjs +128 -0
- package/node/esm/{BJ7ZZm63j5O6cvrB.mjs → CNOLkUDURBElaaIf.mjs} +1 -1
- package/node/esm/{DhSq680c5tgMFFbj.mjs → CalVk3o4-kX79s3v.mjs} +1 -1
- package/node/esm/{DYosMUJKp-3MSO4q.mjs → Cp1DuCae46eQKzWy.mjs} +1 -1
- package/node/esm/CzN6c6KyxVmNvayz.mjs +8 -0
- package/node/esm/DKqdv5JubgVaq-g9.mjs +35 -0
- package/node/esm/DWkPWuf5ZrLRMixG.mjs +328 -0
- package/node/esm/{BfRn5S5V4X8xIAEa.mjs → DXiNwr6ZnXBe7TlG.mjs} +1 -1
- package/node/esm/DayGI0Bt57FDNbVF.mjs +37 -0
- package/node/esm/{CM5BT7h-hMtST2bE.mjs → DyetXBW7vFLJWB22.mjs} +1 -1
- package/node/esm/{CFFlJxNwgyInjEnh.mjs → MWges5ywL3aEdChp.mjs} +1 -1
- package/node/esm/{DPN0n6MGYQ9vZ2KO.mjs → T5lfCrudsUnOTxEn.mjs} +1 -1
- package/node/esm/YB_qExw23Ci4nMYy.mjs +263 -0
- package/node/esm/{GkmuxU7OwRZtm2Rf.mjs → bRD1KCpSpAYTEs50.mjs} +1 -1
- package/node/esm/chart.mjs +32 -51
- package/node/esm/control.mjs +2 -2
- package/node/esm/group.mjs +3 -3
- package/node/esm/{C_ANM4feA1xV-pri.mjs → iL9jKJcnED6oi0B4.mjs} +1 -1
- package/node/esm/index.mjs +10998 -8556
- package/node/esm/note.mjs +86 -60
- package/node/esm/picture.mjs +41 -41
- package/node/esm/shape.mjs +285 -332
- package/node/esm/slicer.mjs +15 -15
- 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 +32 -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 +11 -0
- package/resources/locales/en/chart.cmd.json +82 -0
- package/resources/locales/en/sheet.cmd.json +32 -0
- package/resources/locales/en/table.cmd.json +1 -1
- package/resources/locales/en/ui.msg.json +14 -0
- package/resources/locales/en/workbook.cmd.json +11 -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 +76 -3
- 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} +10 -7
- 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 +3 -3
- package/types/src/cell/useInsertableCellControls.d.ts +25 -0
- package/types/src/chart/ChartCommands.d.ts +15 -0
- package/types/src/chart/ChartEditor.d.ts +12 -2
- package/types/src/chart/ChartElement.d.ts +122 -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/_mode.d.ts +6 -0
- package/types/src/chart/paint/echarts.d.ts +33 -0
- package/types/src/chart/paint/index.d.ts +12 -0
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +140 -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 +42 -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/editableLabel/EditableLabel.d.ts +3 -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/SheetReferenceHeaderLayer.d.ts +1 -1
- 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 +3 -3
- 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 +5 -4
- package/types/src/layer/CellFillLayer.d.ts +2 -2
- package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
- 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/HeaderSelectionLayer.d.ts +4 -4
- package/types/src/layer/HyperlinkLayer.d.ts +11 -8
- package/types/src/layer/MovableKindScope.d.ts +2 -2
- package/types/src/layer/ProtectionLayer.d.ts +4 -5
- 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 +15 -8
- 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 +4 -3
- package/types/src/layer/SheetOutlineLayer.d.ts +3 -3
- 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 +3 -3
- package/types/src/layer/TableToolbar.d.ts +4 -4
- 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 +21 -8
- package/types/src/layer/_tableColor.d.ts +2 -2
- package/types/src/layer/index.d.ts +3 -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/useRangeListener.d.ts +13 -7
- 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/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/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 +3 -3
- package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +64 -32
- package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +5 -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 +6 -6
- 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/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/table/TableCommands.d.ts +2 -2
- package/types/src/taskPane/CellControlPane.d.ts +17 -0
- package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
- package/types/src/taskPane/index.d.ts +1 -0
- package/types/src/taskPane/useTaskPane.d.ts +6 -3
- 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 +5 -4
- package/types/src/workbook/IWorkbookElement.d.ts +76 -22
- package/types/src/workbook/WorkbookStrip.d.ts +5 -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/node/esm/D3YXHeOyFp00Xk3m.mjs +0 -323
- 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,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
|
|
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", t = "command", a = (e, t) => !!e && (e.getTags?.() ?? []).includes(t);
|
|
8
|
-
function n(e) {
|
|
9
|
-
const { transaction: n, notifier: o, manager: r } = e, s = e.isRepeatable ?? ((e) => !a(e, "noRepeat"));
|
|
10
|
-
let i = Promise.resolve();
|
|
11
|
-
return (e) => (c, l) => {
|
|
12
|
-
if (a(l, "noTransaction")) return e(c, l);
|
|
13
|
-
const u = i.then(async () => {
|
|
14
|
-
const a = l?.getLabel?.() ?? void 0, i = l?.getKey?.(), u = o ? await Promise.resolve(o.showBusy(a ?? "Working…")) : null;
|
|
15
|
-
try {
|
|
16
|
-
let o;
|
|
17
|
-
return await n.doBatch(async () => {
|
|
18
|
-
o = await e(c, l);
|
|
19
|
-
}, {
|
|
20
|
-
description: a,
|
|
21
|
-
meta: i ? { [t]: i } : void 0
|
|
22
|
-
}), r && l && s(l) && r.setRepeatableOperation({
|
|
23
|
-
description: a ?? "last action",
|
|
24
|
-
repeat: () => {
|
|
25
|
-
l.execute(c);
|
|
26
|
-
}
|
|
27
|
-
}), o;
|
|
28
|
-
} catch (e) {
|
|
29
|
-
e && o?.showError?.(e);
|
|
30
|
-
} finally {
|
|
31
|
-
u?.();
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
return i = u.then(() => {}, () => {}), u;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export { n, e as r, t };
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.10
|
|
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 "./CFFlJxNwgyInjEnh.mjs";
|
|
8
|
-
import { createContext as t, memo as n, useCallback as o, useEffect as r, useReducer as a, useRef as l } from "react";
|
|
9
|
-
import { Fragment as i, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
10
|
-
import { LazyModules as d, defineLazyModule as u } from "@sheetxl/utils";
|
|
11
|
-
import { ReactUtils as p } from "@sheetxl/utils-react";
|
|
12
|
-
import { useGridPane as m } from "@sheetxl/grid-react";
|
|
13
|
-
var h = Object.freeze({
|
|
14
|
-
x: 0,
|
|
15
|
-
y: 0,
|
|
16
|
-
width: 0,
|
|
17
|
-
height: 0
|
|
18
|
-
}), f = (e, t, n) => {
|
|
19
|
-
const o = n?.bounds ?? e.getBounds(), r = o ? t.toPaneBounds(o) : h, a = p.getDevicePixelRatio();
|
|
20
|
-
return {
|
|
21
|
-
left: p.snapDeviceEdge(r.x, a),
|
|
22
|
-
top: p.snapDeviceEdge(r.y, a),
|
|
23
|
-
width: r.width,
|
|
24
|
-
height: r.height,
|
|
25
|
-
rotation: n?.rotation ?? (e.getRotation() || 0),
|
|
26
|
-
flip: n?.flip ?? e.getFlip()
|
|
27
|
-
};
|
|
28
|
-
}, g = "data-movable-id", v = (e) => {
|
|
29
|
-
let t = e;
|
|
30
|
-
for (let e = t.getParent(); e; e = t.getParent()) t = e;
|
|
31
|
-
return t;
|
|
32
|
-
}, b = (e, t, n) => {
|
|
33
|
-
const o = [];
|
|
34
|
-
let r = t;
|
|
35
|
-
for (; r && r !== n;) {
|
|
36
|
-
const e = r.getAttribute?.(g);
|
|
37
|
-
e && o.unshift(e), r = r.parentElement;
|
|
38
|
-
}
|
|
39
|
-
if (0 === o.length) return e;
|
|
40
|
-
const a = [e];
|
|
41
|
-
for (const e of o) {
|
|
42
|
-
const t = a[a.length - 1].getMovables()?.getItems().find((t) => t.getId() === e);
|
|
43
|
-
if (!t) break;
|
|
44
|
-
a.push(t);
|
|
45
|
-
}
|
|
46
|
-
const l = a.length - 1;
|
|
47
|
-
for (let e = l; e >= 0; e--) if (a[e].isSelected()) return a[Math.min(e + 1, l)];
|
|
48
|
-
const i = e.getRange().getSheet().getView().getMovableSelection().getContainer();
|
|
49
|
-
return i && v(i) === e ? a[Math.min(w(i) + 1, l)] : e;
|
|
50
|
-
}, w = (e) => {
|
|
51
|
-
let t = 0;
|
|
52
|
-
for (let n = e.getParent(); n; n = n.getParent()) t++;
|
|
53
|
-
return t;
|
|
54
|
-
}, C = t(/* @__PURE__ */ new Map()), x = n(({ movable: t, preview: n, onHost: r, children: l }) => {
|
|
55
|
-
const i = m(), [, c] = a((e) => e + 1, 0);
|
|
56
|
-
e(t, {
|
|
57
|
-
onBoundsChange: () => c(),
|
|
58
|
-
onAnyChange: () => c()
|
|
59
|
-
});
|
|
60
|
-
const d = o((e) => {
|
|
61
|
-
r(t, e);
|
|
62
|
-
}, [t, r]), u = f(t, i, n);
|
|
63
|
-
return s("div", {
|
|
64
|
-
className: "movable-adornment",
|
|
65
|
-
ref: d,
|
|
66
|
-
style: {
|
|
67
|
-
position: "absolute",
|
|
68
|
-
left: u.left,
|
|
69
|
-
top: u.top,
|
|
70
|
-
width: u.width,
|
|
71
|
-
height: u.height,
|
|
72
|
-
transform: u.rotation ? `rotate(${u.rotation}deg)` : void 0,
|
|
73
|
-
transformOrigin: "center",
|
|
74
|
-
zIndex: 3001,
|
|
75
|
-
pointerEvents: "none"
|
|
76
|
-
},
|
|
77
|
-
children: l
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
x.displayName = "MovableAdornment";
|
|
81
|
-
var y = {
|
|
82
|
-
nw: [-1, -1],
|
|
83
|
-
n: [0, -1],
|
|
84
|
-
ne: [1, -1],
|
|
85
|
-
w: [-1, 0],
|
|
86
|
-
e: [1, 0],
|
|
87
|
-
sw: [-1, 1],
|
|
88
|
-
s: [0, 1],
|
|
89
|
-
se: [1, 1]
|
|
90
|
-
}, M = [
|
|
91
|
-
"ew-resize",
|
|
92
|
-
"nwse-resize",
|
|
93
|
-
"ns-resize",
|
|
94
|
-
"nesw-resize"
|
|
95
|
-
], R = (e, t) => {
|
|
96
|
-
const n = 180 * Math.atan2(e[1], e[0]) / Math.PI + t;
|
|
97
|
-
return M[(Math.round(n / 45) % 4 + 4) % 4];
|
|
98
|
-
}, z = n((e) => {
|
|
99
|
-
const { directions: t, rotation: n, isDragging: r = !1, onResizeStart: a, onResize: i, onResizeEnd: d, onResizeCancel: u, context: p = !1, onMoveStart: m, children: h } = e, f = l(null), g = o((e) => {
|
|
100
|
-
if (0 !== e.button) return;
|
|
101
|
-
e.stopPropagation(), e.preventDefault();
|
|
102
|
-
const t = y[e.currentTarget.dataset.direction ?? ""];
|
|
103
|
-
t && a() && (f.current = {
|
|
104
|
-
pointerId: e.pointerId,
|
|
105
|
-
direction: t,
|
|
106
|
-
press: {
|
|
107
|
-
x: e.clientX,
|
|
108
|
-
y: e.clientY
|
|
109
|
-
}
|
|
110
|
-
}, e.currentTarget.setPointerCapture(e.pointerId));
|
|
111
|
-
}, [a]), v = o((e) => {
|
|
112
|
-
const t = f.current;
|
|
113
|
-
t && t.pointerId === e.pointerId && (e.stopPropagation(), i(t.direction, [e.clientX - t.press.x, e.clientY - t.press.y], e.shiftKey));
|
|
114
|
-
}, [i]), b = o((e) => {
|
|
115
|
-
const t = f.current;
|
|
116
|
-
t && t.pointerId === e.pointerId && (e.stopPropagation(), f.current = null, d());
|
|
117
|
-
}, [d]), w = o((e) => {
|
|
118
|
-
const t = f.current;
|
|
119
|
-
t && t.pointerId === e.pointerId && (f.current = null, u());
|
|
120
|
-
}, [u]), C = o((e) => {
|
|
121
|
-
0 === e.button && (e.stopPropagation(), e.preventDefault(), m?.(e.nativeEvent));
|
|
122
|
-
}, [m]);
|
|
123
|
-
return c("div", {
|
|
124
|
-
className: [
|
|
125
|
-
"movable-control",
|
|
126
|
-
r ? "dragging" : null,
|
|
127
|
-
p ? "context" : null
|
|
128
|
-
].filter(Boolean).join(" "),
|
|
129
|
-
children: [
|
|
130
|
-
h,
|
|
131
|
-
s("div", { className: "movable-control-outline" }),
|
|
132
|
-
t.map((e) => {
|
|
133
|
-
const t = y[e];
|
|
134
|
-
return t ? s("div", {
|
|
135
|
-
className: "movable-control-handle",
|
|
136
|
-
"data-direction": e,
|
|
137
|
-
style: {
|
|
138
|
-
left: 50 * (t[0] + 1) + "%",
|
|
139
|
-
top: 50 * (t[1] + 1) + "%",
|
|
140
|
-
cursor: R(t, n)
|
|
141
|
-
},
|
|
142
|
-
onPointerDown: g,
|
|
143
|
-
onPointerMove: v,
|
|
144
|
-
onPointerUp: b,
|
|
145
|
-
onPointerCancel: w
|
|
146
|
-
}, e) : null;
|
|
147
|
-
}),
|
|
148
|
-
m ? s("div", {
|
|
149
|
-
className: "movable-move-handle",
|
|
150
|
-
onPointerDown: C,
|
|
151
|
-
children: s("svg", {
|
|
152
|
-
viewBox: "0 0 24 24",
|
|
153
|
-
"aria-hidden": "true",
|
|
154
|
-
children: s("path", { d: "M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z" })
|
|
155
|
-
})
|
|
156
|
-
}) : null
|
|
157
|
-
]
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
z.displayName = "MovableControl";
|
|
161
|
-
var P = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Set(), k = () => {
|
|
162
|
-
for (const e of [...j]) e();
|
|
163
|
-
}, I = !1, D = () => {
|
|
164
|
-
I || (I = !0, function(e) {
|
|
165
|
-
e("picture", () => import("./DYosMUJKp-3MSO4q.mjs"), { select: (e) => e.PictureKind }), e("chart", () => import("./chart.mjs"), { select: ({ ChartEditor: e }) => (t) => s(e, {
|
|
166
|
-
...t,
|
|
167
|
-
chart: t.movable.getContent()
|
|
168
|
-
}) }), e("slicer", () => import("./C_ANM4feA1xV-pri.mjs"), { select: (e) => e.SlicerKind }), e("shape", () => import("./Buw-VKYJy3y5dbaJ.mjs"), {
|
|
169
|
-
select: (e) => e.ShapeKind,
|
|
170
|
-
selectionShadow: !1
|
|
171
|
-
}), e("group", () => import("./group.mjs"), { select: ({ GroupEditor: e }) => (t) => s(e, {
|
|
172
|
-
...t,
|
|
173
|
-
container: t.movable.getContent()
|
|
174
|
-
}) }), e("note", () => import("./note.mjs"), { select: ({ NoteEditor: e }) => (t) => {
|
|
175
|
-
const { onContextMenuCapture: n, ...o } = t;
|
|
176
|
-
return s(e, {
|
|
177
|
-
...o,
|
|
178
|
-
note: t.movable.getContent()
|
|
179
|
-
});
|
|
180
|
-
} }), e("error", () => import("./Dxbm6ryIDCEi26RO.mjs").then((e) => e.t), { select: ({ ErrorContentFrame: e }) => (t) => s(e, { ...t }) });
|
|
181
|
-
const t = (t, n) => {
|
|
182
|
-
e(t, () => import("./control.mjs"), { select: n });
|
|
183
|
-
};
|
|
184
|
-
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);
|
|
185
|
-
}(Y));
|
|
186
|
-
}, E = (e) => (D(), B.get(e) ?? P.get(e)), N = (e) => {
|
|
187
|
-
const { movable: t, fallback: n, children: o } = e, [, l] = a((e) => e + 1, 0), c = t.isContentLoaded();
|
|
188
|
-
return r(() => {
|
|
189
|
-
if (c) return;
|
|
190
|
-
let e = !0;
|
|
191
|
-
return t.whenContentLoaded().then(() => {
|
|
192
|
-
e && l();
|
|
193
|
-
}), () => {
|
|
194
|
-
e = !1;
|
|
195
|
-
};
|
|
196
|
-
}, [t, c]), s(i, { children: c ? o : n });
|
|
197
|
-
}, L = (e) => {
|
|
198
|
-
const [, t] = a((e) => e + 1, 0), n = e.module;
|
|
199
|
-
return r(() => {
|
|
200
|
-
if (n) return;
|
|
201
|
-
let o = !0;
|
|
202
|
-
const r = O(() => {
|
|
203
|
-
o && e.module && t();
|
|
204
|
-
});
|
|
205
|
-
return e.loadModule().catch(() => {}), () => {
|
|
206
|
-
o = !1, r();
|
|
207
|
-
};
|
|
208
|
-
}, [e, n]), n;
|
|
209
|
-
}, A = (e) => {
|
|
210
|
-
const t = L(e.kind);
|
|
211
|
-
if (!t) return s(i, { children: e.fallback });
|
|
212
|
-
const n = t.renderer;
|
|
213
|
-
return s(n, { ...e.props });
|
|
214
|
-
}, K = (e, t, n, o) => {
|
|
215
|
-
const r = u(e, t, {
|
|
216
|
-
select: (e) => {
|
|
217
|
-
const t = n?.select ? n.select(e) : e, o = "object" == typeof (r = t) && null !== r && "renderer" in r ? t : { renderer: t };
|
|
218
|
-
var r;
|
|
219
|
-
return c.module = o, c.control = o.control, c.loaded = !0, k(), o;
|
|
220
|
-
},
|
|
221
|
-
prefetch: !1 !== n?.prefetch && (o ?? !0)
|
|
222
|
-
});
|
|
223
|
-
let a = null;
|
|
224
|
-
const l = n?.fallback ?? null, i = (e) => s(N, {
|
|
225
|
-
movable: e.movable,
|
|
226
|
-
fallback: l,
|
|
227
|
-
children: s(A, {
|
|
228
|
-
kind: c,
|
|
229
|
-
fallback: l,
|
|
230
|
-
props: e
|
|
231
|
-
})
|
|
232
|
-
}), c = {
|
|
233
|
-
Renderer: "content" === n?.hitArea ? i : (e) => s("div", {
|
|
234
|
-
className: "movable-content",
|
|
235
|
-
style: e.style,
|
|
236
|
-
children: i(e)
|
|
237
|
-
}),
|
|
238
|
-
loaded: !1,
|
|
239
|
-
control: void 0,
|
|
240
|
-
LazyControl: (e) => {
|
|
241
|
-
const t = L(c)?.control ?? z;
|
|
242
|
-
return s(t, { ...e });
|
|
243
|
-
},
|
|
244
|
-
ownShadow: !1 === n?.selectionShadow,
|
|
245
|
-
loadModule: () => (a ??= r.load().then((e) => (a = null, e), (t) => {
|
|
246
|
-
throw a = null, console.warn(`The renderer '${e}' could not be loaded; its movables are drawn as the fallback.`, t), t;
|
|
247
|
-
}), a),
|
|
248
|
-
module: void 0,
|
|
249
|
-
lazyModule: r
|
|
250
|
-
};
|
|
251
|
-
return c;
|
|
252
|
-
};
|
|
253
|
-
function U(e, t, n) {
|
|
254
|
-
D();
|
|
255
|
-
const o = K(`movable-renderer:${e}`, t, n);
|
|
256
|
-
return B.set(e, o), k(), () => {
|
|
257
|
-
B.get(e) === o && (B.delete(e), d.remove(o.lazyModule), k());
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
function $(e, t) {
|
|
261
|
-
let n = null;
|
|
262
|
-
const o = {
|
|
263
|
-
load: () => (n ??= t().then((t) => {
|
|
264
|
-
o.pane = t, S.get(e) === o && k();
|
|
265
|
-
}, (e) => {
|
|
266
|
-
throw n = null, e;
|
|
267
|
-
}), n),
|
|
268
|
-
pane: void 0
|
|
269
|
-
};
|
|
270
|
-
return S.set(e, o), k(), () => {
|
|
271
|
-
S.get(e) === o && (S.delete(e), k());
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
function F(e) {
|
|
275
|
-
const t = E(e);
|
|
276
|
-
if (!t?.module) return;
|
|
277
|
-
const n = S.get(e);
|
|
278
|
-
n && !n.pane && n.load().catch(() => {});
|
|
279
|
-
const { control: o, commands: r, toolbar: a, pane: l } = t.module;
|
|
280
|
-
return {
|
|
281
|
-
type: e,
|
|
282
|
-
control: o,
|
|
283
|
-
commands: r,
|
|
284
|
-
toolbar: a,
|
|
285
|
-
pane: n ? n.pane : l
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
async function H(e) {
|
|
289
|
-
const t = E(e);
|
|
290
|
-
if (t) {
|
|
291
|
-
try {
|
|
292
|
-
await t.loadModule(), await S.get(e)?.load();
|
|
293
|
-
} catch {
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
return F(e);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
function O(e) {
|
|
300
|
-
return j.add(e), () => {
|
|
301
|
-
j.delete(e);
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
function T(e) {
|
|
305
|
-
return !E(e)?.ownShadow;
|
|
306
|
-
}
|
|
307
|
-
function V(e) {
|
|
308
|
-
const t = E(e);
|
|
309
|
-
if (t) return t.loaded ? t.control : t.LazyControl;
|
|
310
|
-
}
|
|
311
|
-
function G(e) {
|
|
312
|
-
return E(e)?.Renderer;
|
|
313
|
-
}
|
|
314
|
-
function X() {
|
|
315
|
-
return D(), [.../* @__PURE__ */ new Set([...P.keys(), ...B.keys()])];
|
|
316
|
-
}
|
|
317
|
-
function Y(e, t, n) {
|
|
318
|
-
P.set(e, K(`movable-renderer:built-in:${e}`, t, {
|
|
319
|
-
hitArea: "content",
|
|
320
|
-
...n
|
|
321
|
-
}, () => !B.has(e)));
|
|
322
|
-
}
|
|
323
|
-
export { v as _, X as a, $ as c, z as d, R as f, b as g, g as h, G as i, U as l, x as m, V as n, T as o, C as p, F as r, Y as s, O as t, H as u, f as v };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import { ISheet } from '@sheetxl/sdk';
|
|
3
|
-
export type SheetProviderProps = {
|
|
4
|
-
sheet: ISheet | null;
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Provides a sheet to descendants.
|
|
9
|
-
*
|
|
10
|
-
* Notes:
|
|
11
|
-
* - Prefer passing the sheet object as a stable reference from the host.
|
|
12
|
-
*/
|
|
13
|
-
export declare function SheetProvider(props: SheetProviderProps): React.JSX.Element;
|
|
14
|
-
/**
|
|
15
|
-
* Hook consumers call to access the current sheet.
|
|
16
|
-
*/
|
|
17
|
-
export declare function useSheet(): ISheet | null;
|
|
18
|
-
//# sourceMappingURL=SheetContext.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { ISheetElement, SheetElementProps } from './ISheetElement';
|
|
3
|
-
/**
|
|
4
|
-
* @see ISheet
|
|
5
|
-
*
|
|
6
|
-
* UI representation for ISheet.
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* The grid-facing body of {@link SheetElement} — **consumes** the ambient `sheet` command scope (provided by
|
|
11
|
-
* the outer {@link SheetElement} wrapper) to build the grid resolver + per-pane layer scopes. Split from the
|
|
12
|
-
* public component because a component can't consume in its body the scope it provides in its own JSX.
|
|
13
|
-
*/
|
|
14
|
-
export declare const SheetElement: React.NamedExoticComponent<Omit<SheetElementProps, "ref"> & React.RefAttributes<ISheetElement>>;
|
|
15
|
-
//# sourceMappingURL=SheetElement.d.ts.map
|