@sheetxl/react 0.8.0-beta.1 → 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/1-LEUre9ZLG0OYYB.mjs +197 -0
- package/browser/esm/94dxo1A-z8lgiiGw.mjs +128 -0
- package/browser/esm/B26QVfjer2oY2ewK.mjs +32 -0
- package/browser/esm/B93LSmhnvkxNXTq-.mjs +42 -0
- package/browser/esm/BQYS2Yf-EAV_tBLr.mjs +20 -0
- package/{node/esm/DAE_NG8D9uT50zUH.mjs → browser/esm/BegvsXeRs7e-9t8k.mjs} +3 -4
- package/browser/esm/Bl2BFCQ00fotauKB.mjs +36 -0
- package/browser/esm/Bos4Rkp8UTF7QXUB.mjs +31 -0
- package/browser/esm/C1pc9F4Rt2C5FKUo.mjs +45 -0
- package/browser/esm/CPnnESfZz2jjJd82.mjs +134 -0
- package/browser/esm/CRi6DQ3UXmPEv-w_.mjs +729 -0
- package/browser/esm/ClAtIfYbsUPA073B.mjs +2706 -0
- package/browser/esm/CzRIbc-Lk__VMLKM.mjs +60 -0
- package/browser/esm/D2u6THGErqw64KQI.mjs +63 -0
- package/browser/esm/DMdsMPT0fWBbTkNn.mjs +67 -0
- package/browser/esm/DS66lAIM-9M-YoZQ.mjs +315 -0
- package/browser/esm/DgL7Dy-Lqcr1TvW6.mjs +23528 -0
- package/browser/esm/Dnh1kpz3v1JKtRD_.mjs +79 -0
- package/browser/esm/cQ6xdPFkEcuDlNTN.mjs +75 -0
- package/browser/esm/chart.mjs +40 -0
- package/browser/esm/control.mjs +216 -0
- package/browser/esm/group.mjs +123 -0
- package/browser/esm/index.mjs +15460 -8762
- package/browser/esm/note.mjs +112 -0
- package/browser/esm/picture.mjs +86 -0
- package/browser/esm/shape.mjs +7 -0
- package/browser/esm/slicer.mjs +276 -0
- package/browser/esm/ugfE7YeZALQURDKF.mjs +241 -0
- package/licenses/dependencies.txt +319 -600
- package/node/esm/6zApGj9DozhFy-bx.mjs +35 -0
- package/node/esm/BMVK5plvmBOAIlxP.mjs +80 -0
- package/node/esm/BaRfst1euuhquupX.mjs +66 -0
- package/node/esm/Be9c1GwQkPo8Piuh.mjs +134 -0
- package/node/esm/BiaDWnN3tT7neoRL.mjs +68 -0
- package/node/esm/BlxXufqBBg1PtsXd.mjs +8 -0
- package/node/esm/C_SNx7TlFEcwbYjx.mjs +2706 -0
- package/node/esm/DJPgbB1X22YmhbaR.mjs +242 -0
- package/node/esm/DTMTIrYIK1eZswsM.mjs +37 -0
- package/node/esm/D_pCpfdQowV_4Aje.mjs +198 -0
- package/node/esm/DgGEHydEjD7nfsDB.mjs +76 -0
- package/node/esm/Dj5FM7_-YWhCtCCt.mjs +45 -0
- package/node/esm/DxQZmb-j4NLUO9Af.mjs +63 -0
- package/node/esm/JiQGhLkoL8CJpVvA.mjs +20 -0
- package/node/esm/b-XRVRI1fYQQMkTC.mjs +1664 -0
- package/node/esm/chart.mjs +40 -0
- package/node/esm/control.mjs +216 -0
- package/node/esm/gpD-9LDW92phhoma.mjs +32 -0
- package/node/esm/group.mjs +123 -0
- package/node/esm/index.mjs +15830 -8966
- package/node/esm/note.mjs +113 -0
- package/node/esm/picture.mjs +86 -0
- package/node/esm/shape.mjs +735 -0
- package/node/esm/sigD1UFqvPlWUw_9.mjs +128 -0
- package/node/esm/slicer.mjs +278 -0
- package/node/esm/umljAT66yb3_rURh.mjs +320 -0
- package/package.json +55 -14
- package/resources/contents.json +24 -0
- package/resources/locales/contents.json +56 -0
- package/resources/locales/de/chart.cmd.json +82 -0
- package/resources/locales/de/movable.cmd.json +154 -0
- package/resources/locales/de/picture.cmd.json +31 -0
- package/resources/locales/de/selection.cmd.json +8 -0
- package/resources/locales/de/shape.cmd.json +17 -0
- package/resources/locales/de/sheet.cmd.json +339 -21
- package/resources/locales/de/slicer.cmd.json +17 -0
- package/resources/locales/de/table.cmd.json +9 -1
- package/resources/locales/de/ui.msg.json +321 -3
- package/resources/locales/de/workbook.cmd.json +15 -6
- package/resources/locales/en/chart.cmd.json +82 -0
- package/resources/locales/en/movable.cmd.json +154 -0
- package/resources/locales/en/picture.cmd.json +31 -0
- package/resources/locales/en/selection.cmd.json +8 -0
- package/resources/locales/en/shape.cmd.json +17 -0
- package/resources/locales/en/sheet.cmd.json +353 -22
- package/resources/locales/en/slicer.cmd.json +17 -0
- package/resources/locales/en/table.cmd.json +9 -1
- package/resources/locales/en/ui.msg.json +321 -3
- package/resources/locales/en/workbook.cmd.json +16 -7
- package/types/chart.d.ts +2 -0
- package/types/control.d.ts +2 -0
- package/types/group.d.ts +2 -0
- package/types/note.d.ts +2 -0
- package/types/picture.d.ts +2 -0
- package/types/shape.d.ts +2 -0
- package/types/slicer.d.ts +2 -0
- package/types/src/annotation/RangeAnnotations.d.ts +119 -0
- package/types/src/annotation/index.d.ts +2 -0
- package/types/src/autoFill/AutoFillPresets.d.ts +14 -0
- package/types/src/autoFill/FillMenu.d.ts +36 -0
- package/types/src/autoFill/FillSeries.d.ts +38 -0
- package/types/src/autoFill/index.d.ts +4 -0
- package/types/src/border/StaticBorderRenderer.d.ts +19 -2
- package/types/src/border/useBorders.d.ts +81 -8
- package/types/src/cell/CornerTriangle.d.ts +6 -0
- package/types/src/cell/FormulaCellRenderer.d.ts +6 -3
- package/types/src/cell/OutlineButton.d.ts +123 -0
- package/types/src/cell/SheetCellRenderer.d.ts +2 -2
- package/types/src/cell/SheetHeaderRenderer.d.ts +5 -0
- package/types/src/cell/StaticCellRenderer.d.ts +57 -0
- package/types/src/cell/index.d.ts +2 -0
- package/types/src/cell/useFormulaViewAnchor.d.ts +3 -3
- 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 -1
- 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/checklist/ValueChecklist.d.ts +112 -0
- package/types/src/checklist/index.d.ts +2 -0
- package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
- package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
- package/types/src/commands/ContextualToolbar.d.ts +19 -0
- package/types/src/commands/createTransactionalMiddleware.d.ts +4 -1
- package/types/src/commands/index.d.ts +1 -0
- package/types/src/comment/CommentCardRequest.d.ts +94 -0
- package/types/src/comment/CommentUtils.d.ts +43 -0
- package/types/src/comment/NoteEditor.d.ts +20 -0
- package/types/src/comment/index.d.ts +5 -0
- package/types/src/comment/useCommentThread.d.ts +37 -0
- package/types/src/comment/useSheetComments.d.ts +28 -0
- package/types/src/{sheet → conditionalFormat}/ConditionalFormatPresets.d.ts +6 -6
- package/types/src/conditionalFormat/index.d.ts +1 -0
- package/types/src/context/WorksheetContext.d.ts +18 -0
- package/types/src/context/index.d.ts +1 -1
- package/types/src/control/FormControlRenderers.d.ts +22 -0
- package/types/src/editor/EditorCommands.d.ts +3 -3
- package/types/src/editor/FunctionPreviewPanel.d.ts +15 -1
- package/types/src/editor/NamedItemLabel.d.ts +29 -0
- package/types/src/editor/NamedItemsPanel.d.ts +13 -2
- package/types/src/editor/SheetCellEditorLayer.d.ts +5 -9
- package/types/src/editor/SheetCellEditorStartLayer.d.ts +61 -0
- package/types/src/editor/SheetCellInput.d.ts +26 -2
- package/types/src/editor/SheetEditable.d.ts +14 -8
- 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/formulaCaret.d.ts +39 -10
- package/types/src/editor/formulaEval.d.ts +9 -5
- package/types/src/editor/formulaLint.d.ts +36 -0
- package/types/src/editor/formulaPresentation.d.ts +7 -0
- package/types/src/editor/formulaText.d.ts +17 -5
- package/types/src/editor/functionArgs.d.ts +20 -0
- package/types/src/editor/index.d.ts +5 -1
- package/types/src/editor/pickedReference.d.ts +76 -0
- package/types/src/editor/useEditRejectedNotice.d.ts +32 -0
- package/types/src/editor/useFormulaHints.d.ts +95 -5
- package/types/src/editor/useFormulaInput.d.ts +30 -4
- package/types/src/editor/useReferenceMode.d.ts +12 -0
- package/types/src/editor/validationAlert.d.ts +24 -0
- package/types/src/externalLink/ExternalLinksPaneArgs.d.ts +23 -0
- package/types/src/externalLink/index.d.ts +2 -0
- package/types/src/form/FormulaInput.d.ts +18 -2
- package/types/src/form/FormulaInputParts.d.ts +10 -1
- package/types/src/form/useEditCommit.d.ts +23 -3
- package/types/src/form/useInputField.d.ts +2 -3
- package/types/src/frame/CommandContext.d.ts +189 -7
- package/types/src/group/GroupEditor.d.ts +25 -0
- package/types/src/index.d.ts +14 -2
- package/types/src/io/WorkbookIO.d.ts +2 -0
- package/types/src/layer/BorderLayer.d.ts +2 -2
- package/types/src/layer/CellErrorLayer.d.ts +26 -9
- 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 +43 -0
- package/types/src/layer/CommentsLayer.d.ts +35 -0
- package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
- package/types/src/layer/ConditionalIcons.d.ts +4 -4
- package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
- package/types/src/layer/ContextMenuLayer.d.ts +2 -2
- package/types/src/layer/FreezeDragLines.d.ts +17 -0
- package/types/src/layer/GridFreezeLayer.d.ts +11 -0
- package/types/src/layer/HeaderFreezeLayer.d.ts +12 -0
- package/types/src/layer/HeaderResizerLayer.d.ts +2 -1
- package/types/src/layer/HyperlinkLayer.d.ts +109 -0
- package/types/src/layer/MovableKindScope.d.ts +17 -0
- package/types/src/layer/ProtectionLayer.d.ts +52 -0
- package/types/src/layer/RangeAnnotationLayer.d.ts +71 -0
- package/types/src/layer/ResizeIndicator.d.ts +11 -10
- package/types/src/layer/ResizeTooltip.d.ts +13 -0
- 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/SheetHeaderCellLayer.d.ts +10 -1
- 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 +40 -0
- 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 +6 -5
- package/types/src/layer/TableToolbar.d.ts +42 -0
- package/types/src/layer/ValidationDropdownLayer.d.ts +17 -7
- package/types/src/layer/ValidationIndicatorLayer.d.ts +11 -5
- package/types/src/layer/ValidationPromptLayer.d.ts +65 -0
- package/types/src/layer/_tableColor.d.ts +4 -0
- package/types/src/layer/cellTip.d.ts +13 -0
- package/types/src/layer/freezeDragState.d.ts +21 -0
- package/types/src/layer/index.d.ts +14 -1
- package/types/src/layer/resizeIndicatorState.d.ts +3 -1
- package/types/src/layer/useFreezeDrag.d.ts +22 -0
- 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 +37 -37
- package/types/src/layer/useVisibleTables.d.ts +2 -2
- package/types/src/layer/validationMark.d.ts +63 -0
- 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 +8 -8
- package/types/src/listener/useRangeSnapshot.d.ts +35 -0
- package/types/src/listener/useTable.d.ts +26 -0
- package/types/src/movable/ConnectionSites.d.ts +18 -0
- package/types/src/movable/DefaultMovable.d.ts +8 -0
- package/types/src/movable/IMovableArea.d.ts +56 -0
- package/types/src/movable/MovableAdornment.d.ts +26 -0
- package/types/src/movable/MovableCommandGroups.d.ts +40 -0
- package/types/src/movable/MovableCommands.d.ts +8 -3
- package/types/src/movable/MovableControl.d.ts +78 -0
- package/types/src/movable/MovableEdit.d.ts +22 -0
- package/types/src/movable/MovableFrame.d.ts +16 -13
- package/types/src/movable/MovableLayer.d.ts +25 -7
- package/types/src/movable/MovableRenderers.d.ts +210 -0
- package/types/src/movable/PlaceholderFrames.d.ts +11 -0
- package/types/src/movable/RotateHandle.d.ts +37 -0
- package/types/src/movable/TextBox.d.ts +34 -0
- package/types/src/movable/connect.d.ts +16 -0
- package/types/src/movable/framePlacement.d.ts +72 -0
- package/types/src/movable/geometry.d.ts +61 -0
- package/types/src/movable/index.d.ts +11 -0
- package/types/src/movable/pressTarget.d.ts +20 -0
- package/types/src/picker/PickerPanel.d.ts +52 -0
- package/types/src/picker/cellPickerOpen.d.ts +6 -0
- package/types/src/picker/index.d.ts +4 -0
- package/types/src/picker/useCellPicker.d.ts +95 -0
- package/types/src/picture/PictureCommands.d.ts +12 -0
- package/types/src/picture/PictureKind.d.ts +7 -0
- package/types/src/picture/index.d.ts +0 -1
- package/types/src/protection/ProtectionPaneArgs.d.ts +31 -0
- package/types/src/protection/index.d.ts +3 -0
- package/types/src/protection/unlockProtectedRanges.d.ts +23 -0
- package/types/src/richText/RichTextEditor.d.ts +41 -0
- package/types/src/richText/index.d.ts +2 -0
- package/types/src/selection/SelectionCommands.d.ts +2 -2
- package/types/src/selection/SheetSelectionLayer.d.ts +16 -12
- package/types/src/shape/ConnectorControl.d.ts +46 -0
- package/types/src/shape/ShapeCommands.d.ts +11 -0
- package/types/src/shape/ShapeControl.d.ts +8 -0
- package/types/src/shape/ShapeEditor.d.ts +15 -2
- package/types/src/shape/ShapeGallery.d.ts +31 -0
- package/types/src/shape/ShapeHandles.d.ts +28 -0
- package/types/src/shape/ShapeKind.d.ts +7 -0
- package/types/src/shape/ShapeSVG.d.ts +22 -0
- package/types/src/shape/ShapeText.d.ts +17 -0
- package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
- package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
- package/types/src/shape/index.d.ts +3 -1
- package/types/src/shape/shapeFrame.d.ts +50 -0
- package/types/src/shape/shapeStyle.d.ts +82 -0
- package/types/src/sheet/ISheetHeaderElement.d.ts +1 -1
- package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +107 -77
- package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +11 -6
- package/types/src/sheet/SheetCommands.d.ts +22 -7
- package/types/src/sheet/SheetKindIcon.d.ts +14 -0
- package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
- package/types/src/sheet/SheetPanels.d.ts +11 -0
- package/types/src/sheet/SheetScrollbar.d.ts +4 -13
- 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 +10 -0
- package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
- package/types/src/sheet/circularReferences.d.ts +12 -4
- package/types/src/sheet/index.d.ts +6 -3
- package/types/src/sheet/useCycleHighlight.d.ts +21 -0
- package/types/src/slicer/SlicerCommands.d.ts +10 -0
- package/types/src/slicer/SlicerEditor.d.ts +8 -2
- package/types/src/slicer/SlicerKind.d.ts +7 -0
- package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
- package/types/src/slicer/index.d.ts +2 -1
- package/types/src/slicer/slicerStyles.d.ts +32 -0
- package/types/src/tabStrip/SheetTab.d.ts +1 -1
- package/types/src/tabStrip/TabStrip.d.ts +7 -0
- package/types/src/table/TableCommands.d.ts +2 -2
- package/types/src/taskPane/ITaskPane.d.ts +12 -1
- package/types/src/taskPane/MovablePane.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/theme/ThemeState.d.ts +14 -1
- package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
- package/types/src/theme/useGridColorScheme.d.ts +2 -2
- package/types/src/theme/useSystemColors.d.ts +2 -2
- package/types/src/workbook/DefaultMovableRenderers.d.ts +20 -0
- package/types/src/workbook/DefaultRenderers.d.ts +3 -2
- package/types/src/workbook/IWorkbookElement.d.ts +51 -5
- package/types/src/workbook/WorkbookCommands.d.ts +2 -4
- package/types/src/workbook/WorkbookStrip.d.ts +9 -0
- package/types/src/workbook/_followOrigin.d.ts +9 -0
- package/types/src/workbook/useWorkbookFormat.d.ts +3 -3
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
- package/browser/cjs/index.cjs +0 -35
- package/browser/esm/SJMJzBwlXTJ9QIO5.mjs +0 -6286
- 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/editor/useProtectedEditNotice.d.ts +0 -14
- package/types/src/layer/validationList.d.ts +0 -84
- package/types/src/list/SheetValueList.d.ts +0 -93
- package/types/src/list/index.d.ts +0 -2
- package/types/src/movable/MoveableBundle.d.ts +0 -4
- package/types/src/sheet/SheetElement.d.ts +0 -15
|
@@ -0,0 +1,79 @@
|
|
|
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, useMemo as r, useRef as i } from "react";
|
|
9
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
10
|
+
var o = "data-run", s = (e) => typeof e == "string" ? e ? [{ text: e }] : [] : e.runs ?? [], c = (e) => {
|
|
11
|
+
if (e.nodeType === 3) return e.nodeValue ?? "";
|
|
12
|
+
if (e.nodeType !== 1) return "";
|
|
13
|
+
if (e.localName === "br") return "\n";
|
|
14
|
+
let t = "", n = e.childNodes;
|
|
15
|
+
for (let e = 0; e < n.length; e++) t += c(n[e]);
|
|
16
|
+
return t;
|
|
17
|
+
}, l = n(t((t, n) => {
|
|
18
|
+
let { value: l, onChange: u, onDone: d, readOnly: f = !1, runStyle: p, style: m, onKeyDown: h, onBlur: g, ..._ } = t, v = i(null), y = r(() => s(l), [l]), b = r(() => JSON.stringify(l), [l]), x = () => {
|
|
19
|
+
let e = v.current;
|
|
20
|
+
if (!e || f) return;
|
|
21
|
+
let t = ((e, t) => {
|
|
22
|
+
let n = [], r = e.childNodes;
|
|
23
|
+
for (let e = 0; e < r.length; e++) {
|
|
24
|
+
let i = r[e], a = c(i);
|
|
25
|
+
if (!a) continue;
|
|
26
|
+
let s = i.nodeType === 1 ? i.getAttribute(o) : null;
|
|
27
|
+
if (s !== null) {
|
|
28
|
+
let e = t[parseInt(s, 10)]?.font;
|
|
29
|
+
n.push(e ? {
|
|
30
|
+
text: a,
|
|
31
|
+
font: e
|
|
32
|
+
} : { text: a });
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
let l = n[n.length - 1];
|
|
36
|
+
l ? l.text += a : n.push({ text: a });
|
|
37
|
+
}
|
|
38
|
+
return n.every((e) => !e.font) ? n.map((e) => e.text).join("") : { runs: n };
|
|
39
|
+
})(e, y);
|
|
40
|
+
JSON.stringify(s(t)) !== JSON.stringify(y) && u?.(t);
|
|
41
|
+
}, S = (e) => {
|
|
42
|
+
e.stopPropagation();
|
|
43
|
+
}, C = e([v, n]);
|
|
44
|
+
return a("div", {
|
|
45
|
+
ref: C,
|
|
46
|
+
contentEditable: !f && "plaintext-only",
|
|
47
|
+
suppressContentEditableWarning: !0,
|
|
48
|
+
spellCheck: !1,
|
|
49
|
+
..._,
|
|
50
|
+
style: {
|
|
51
|
+
width: "100%",
|
|
52
|
+
minHeight: "100%",
|
|
53
|
+
boxSizing: "border-box",
|
|
54
|
+
outline: "none",
|
|
55
|
+
whiteSpace: "pre-wrap",
|
|
56
|
+
overflowWrap: "break-word",
|
|
57
|
+
userSelect: "text",
|
|
58
|
+
cursor: f ? void 0 : "text",
|
|
59
|
+
...m
|
|
60
|
+
},
|
|
61
|
+
onKeyDown: (e) => {
|
|
62
|
+
h?.(e), f || (e.stopPropagation(), e.key === "Escape" && (e.preventDefault(), e.currentTarget.blur(), d?.()));
|
|
63
|
+
},
|
|
64
|
+
onKeyUp: f ? void 0 : S,
|
|
65
|
+
onCopy: f ? void 0 : S,
|
|
66
|
+
onCut: f ? void 0 : S,
|
|
67
|
+
onPaste: f ? void 0 : S,
|
|
68
|
+
onBlur: (e) => {
|
|
69
|
+
x(), g?.(e);
|
|
70
|
+
},
|
|
71
|
+
children: y.map((e, t) => a("span", {
|
|
72
|
+
[o]: t,
|
|
73
|
+
style: e.font ? p?.(e.font) : void 0,
|
|
74
|
+
children: e.text
|
|
75
|
+
}, t))
|
|
76
|
+
}, b);
|
|
77
|
+
}));
|
|
78
|
+
l.displayName = "RichTextEditor";
|
|
79
|
+
export { l as t };
|
|
@@ -0,0 +1,75 @@
|
|
|
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 { PictureEditor as e } from "./picture.mjs";
|
|
8
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
9
|
+
import { DOMUtils as n, messageKey as r, t as i } from "@sheetxl/utils";
|
|
10
|
+
import { NotifierType as a } from "@sheetxl/utils-react";
|
|
11
|
+
var o = {
|
|
12
|
+
renderer: (n) => {
|
|
13
|
+
let r = n.movable.getContent();
|
|
14
|
+
return t(e, {
|
|
15
|
+
loadingPanel: t("div", { style: {
|
|
16
|
+
position: "absolute",
|
|
17
|
+
width: "100%",
|
|
18
|
+
height: "100%"
|
|
19
|
+
} }),
|
|
20
|
+
picture: r,
|
|
21
|
+
description: r.getDescription() ?? r.getName?.() ?? void 0,
|
|
22
|
+
...n
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
commands: (e, t) => {
|
|
26
|
+
let { sheet: o, movable: s, notifier: c } = t, l = s.getContent(), u = async (e) => {
|
|
27
|
+
let t = await (async (e) => {
|
|
28
|
+
let t = await Promise.resolve(c?.showBusy?.(i(r("op.setPictureResource"))) ?? null);
|
|
29
|
+
try {
|
|
30
|
+
let t = o.getResources().add(e);
|
|
31
|
+
return await t.toBuffer(), t;
|
|
32
|
+
} catch (e) {
|
|
33
|
+
let t = e;
|
|
34
|
+
if (typeof t != "string") {
|
|
35
|
+
console.warn(e);
|
|
36
|
+
let n = typeof e?.cause == "string" ? e.cause : "", r = typeof e?.message == "string" ? e.message : "";
|
|
37
|
+
n && (r = r ? `${r} (${n})` : n), t = i("error.insertImage.unresolved", { detail: r });
|
|
38
|
+
}
|
|
39
|
+
return c?.showMessage?.(t, { type: a.Error }), null;
|
|
40
|
+
} finally {
|
|
41
|
+
t?.();
|
|
42
|
+
}
|
|
43
|
+
})(e);
|
|
44
|
+
t && l.setResource(t);
|
|
45
|
+
};
|
|
46
|
+
e.updateCommand("changePictureFromFile", {
|
|
47
|
+
tags: ["noTransaction", "noRepeat"],
|
|
48
|
+
callback: async (e) => {
|
|
49
|
+
let t = null, r = null;
|
|
50
|
+
typeof e == "string" ? r = e : t = e ?? null, (t || (t = await n.openFileDialog(r ?? "image/*"), t)) && await u({ source: { file: await Promise.resolve(t) } });
|
|
51
|
+
}
|
|
52
|
+
}), e.updateCommand("changePictureFromURL", {
|
|
53
|
+
tags: ["noTransaction", "noRepeat"],
|
|
54
|
+
callback: async (e) => {
|
|
55
|
+
if (!e) {
|
|
56
|
+
let t = await c?.showInput?.({
|
|
57
|
+
title: i("dialog.changePicture.title"),
|
|
58
|
+
description: i("dialog.changePicture.description"),
|
|
59
|
+
inputLabel: i("dialog.insertImage.inputLabel"),
|
|
60
|
+
initialValue: "https://picsum.photos/360",
|
|
61
|
+
propsInput: { style: { minWidth: "440px" } },
|
|
62
|
+
options: [{
|
|
63
|
+
id: "Change",
|
|
64
|
+
label: () => i("dialog.change")
|
|
65
|
+
}]
|
|
66
|
+
});
|
|
67
|
+
if (!t || t.option !== "Change") return;
|
|
68
|
+
e = t.input;
|
|
69
|
+
}
|
|
70
|
+
e && await u({ source: { fetch: e } });
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
export { o as PictureKind };
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { n as t, t as n } from "./ugfE7YeZALQURDKF.mjs";
|
|
9
|
+
import { forwardRef as r, memo as i, useCallback as a, useLayoutEffect as o, useRef as s } from "react";
|
|
10
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
11
|
+
import { useImperativeElement as l } from "@sheetxl/utils-react";
|
|
12
|
+
var u = i(r((t, r) => {
|
|
13
|
+
let { children: i, disabled: u, style: d, chart: f, zoom: p = 1, isDragging: m, movable: h, onHide: g, onShow: _, onDragZone: v, adornmentHost: y, flip: b, gesture: x, ...S } = t, C = l(r, () => ({ isChartEditor: () => !0 }), []), w = s(null), T = e([C, w]), E = h?.getRange()?.getWorksheet()?.getView()?.getChartElementSelection() ?? null;
|
|
14
|
+
o(() => {
|
|
15
|
+
v?.((e) => {
|
|
16
|
+
let t = "touches" in e ? e.touches[0] : e;
|
|
17
|
+
if (!t) return !0;
|
|
18
|
+
let n = w.current?.getElementAt(t.clientX, t.clientY) ?? null;
|
|
19
|
+
return !n || n.getElementType() === "chartArea";
|
|
20
|
+
});
|
|
21
|
+
}, [v]);
|
|
22
|
+
let D = a((e) => {
|
|
23
|
+
!u && e.element && e.element.getElementType() !== "chartArea" && (e.event.stopPropagation(), h && !h.isSelected() && h.select());
|
|
24
|
+
}, [h, u]);
|
|
25
|
+
if (!f.isDeleted()) return c(n, {
|
|
26
|
+
...S,
|
|
27
|
+
chart: f,
|
|
28
|
+
zoom: p,
|
|
29
|
+
selection: u ? null : E,
|
|
30
|
+
onElementPress: D,
|
|
31
|
+
style: {
|
|
32
|
+
...d,
|
|
33
|
+
filter: u ? "blur(1px)" : void 0,
|
|
34
|
+
boxShadow: m ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0
|
|
35
|
+
},
|
|
36
|
+
ref: T
|
|
37
|
+
});
|
|
38
|
+
}));
|
|
39
|
+
u.displayName = "ChartEditor";
|
|
40
|
+
export { u as ChartEditor, n as ChartElement, t as nextSelected };
|
|
@@ -0,0 +1,216 @@
|
|
|
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 "./C1pc9F4Rt2C5FKUo.mjs";
|
|
8
|
+
import { memo as t, useEffect as n, useReducer as r, useRef as i } from "react";
|
|
9
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
10
|
+
var s = (e) => {
|
|
11
|
+
let t = e.getFont();
|
|
12
|
+
if (!t) return {};
|
|
13
|
+
let n = {};
|
|
14
|
+
return t.name && (n.fontFamily = t.name), t.size !== void 0 && (n.fontSize = `${t.size}pt`), t.bold && (n.fontWeight = "bold"), t.italic && (n.fontStyle = "italic"), t.color && (n.color = t.color), n;
|
|
15
|
+
}, c = {
|
|
16
|
+
pointerEvents: "none",
|
|
17
|
+
width: "100%",
|
|
18
|
+
height: "100%",
|
|
19
|
+
boxSizing: "border-box",
|
|
20
|
+
margin: 0
|
|
21
|
+
}, l = {
|
|
22
|
+
...c,
|
|
23
|
+
display: "flex",
|
|
24
|
+
alignItems: "center",
|
|
25
|
+
gap: "0.35em",
|
|
26
|
+
padding: "0 2px",
|
|
27
|
+
overflow: "hidden",
|
|
28
|
+
whiteSpace: "nowrap"
|
|
29
|
+
}, u = (i, o) => {
|
|
30
|
+
let s = t((t) => {
|
|
31
|
+
let { children: o, disabled: s, style: l, movable: u, zoom: d = 1, isDragging: f, onHide: p, onShow: m, onDragZone: h, adornmentHost: g, flip: _, ...v } = t, y = u.getContent(), [, b] = r((e) => e + 1, 0);
|
|
32
|
+
e(y, { onAnyChange() {
|
|
33
|
+
b();
|
|
34
|
+
} });
|
|
35
|
+
let x = y, S = y, C = x.getLinkedCell?.() ?? null;
|
|
36
|
+
n(() => {
|
|
37
|
+
if (C) return x.getLinkedRange?.()?.addListener(() => b(), { ignoreAddressChanges: !0 });
|
|
38
|
+
}, [y, C]);
|
|
39
|
+
let w = S.getListFillRange?.() ?? null;
|
|
40
|
+
if (n(() => {
|
|
41
|
+
if (w) return S.getListSourceRange?.()?.addListener(() => b(), { ignoreAddressChanges: !0 });
|
|
42
|
+
}, [y, w]), y.isDeleted()) return null;
|
|
43
|
+
let T = u.getBounds();
|
|
44
|
+
return a("div", {
|
|
45
|
+
className: "form-control-renderer",
|
|
46
|
+
...v,
|
|
47
|
+
style: {
|
|
48
|
+
width: "100%",
|
|
49
|
+
height: "100%",
|
|
50
|
+
zoom: d,
|
|
51
|
+
position: "relative",
|
|
52
|
+
boxShadow: f ? "1px 1px 2px var(--sxl-color-shadow, rgba(0,0,0,.15))" : void 0,
|
|
53
|
+
overflow: "hidden",
|
|
54
|
+
...l
|
|
55
|
+
},
|
|
56
|
+
children: a("div", {
|
|
57
|
+
inert: !0,
|
|
58
|
+
style: c,
|
|
59
|
+
children: a(i, {
|
|
60
|
+
control: y,
|
|
61
|
+
width: T?.width ?? 0,
|
|
62
|
+
height: T?.height ?? 0
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
return s.displayName = o, s;
|
|
68
|
+
}, d = u(({ control: e }) => a("button", {
|
|
69
|
+
type: "button",
|
|
70
|
+
tabIndex: -1,
|
|
71
|
+
style: {
|
|
72
|
+
...c,
|
|
73
|
+
...s(e)
|
|
74
|
+
},
|
|
75
|
+
children: e.getCaption() ?? ""
|
|
76
|
+
}), "ButtonRenderer"), f = u(({ control: e }) => {
|
|
77
|
+
let t = i(null), r = e.isMixed();
|
|
78
|
+
return n(() => {
|
|
79
|
+
t.current && (t.current.indeterminate = r);
|
|
80
|
+
}, [r]), o("label", {
|
|
81
|
+
style: {
|
|
82
|
+
...l,
|
|
83
|
+
...s(e)
|
|
84
|
+
},
|
|
85
|
+
children: [a("input", {
|
|
86
|
+
ref: t,
|
|
87
|
+
type: "checkbox",
|
|
88
|
+
checked: e.isChecked(),
|
|
89
|
+
readOnly: !0
|
|
90
|
+
}), a("span", { children: e.getCaption() ?? "" })]
|
|
91
|
+
});
|
|
92
|
+
}, "CheckBoxRenderer"), p = u(({ control: e }) => o("label", {
|
|
93
|
+
style: {
|
|
94
|
+
...l,
|
|
95
|
+
...s(e)
|
|
96
|
+
},
|
|
97
|
+
children: [a("input", {
|
|
98
|
+
type: "radio",
|
|
99
|
+
checked: e.isChecked(),
|
|
100
|
+
readOnly: !0
|
|
101
|
+
}), a("span", { children: e.getCaption() ?? "" })]
|
|
102
|
+
}), "OptionButtonRenderer"), m = u(({ control: e }) => {
|
|
103
|
+
let t = e.isHorizontal();
|
|
104
|
+
return a("input", {
|
|
105
|
+
type: "range",
|
|
106
|
+
tabIndex: -1,
|
|
107
|
+
readOnly: !0,
|
|
108
|
+
min: e.getMin() ?? 0,
|
|
109
|
+
max: e.getMax() ?? 100,
|
|
110
|
+
step: e.getIncrement() ?? 1,
|
|
111
|
+
value: e.getValue() ?? e.getMin() ?? 0,
|
|
112
|
+
style: {
|
|
113
|
+
...c,
|
|
114
|
+
writingMode: t ? void 0 : "vertical-lr"
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}, "ScrollBarRenderer"), h = (e) => {
|
|
118
|
+
let t = {
|
|
119
|
+
up: "2,7 5,4 8,7",
|
|
120
|
+
down: "2,3 5,6 8,3",
|
|
121
|
+
left: "7,2 4,5 7,8",
|
|
122
|
+
right: "3,2 6,5 3,8"
|
|
123
|
+
}[e.direction];
|
|
124
|
+
return a("svg", {
|
|
125
|
+
viewBox: "0 0 10 10",
|
|
126
|
+
style: {
|
|
127
|
+
width: "100%",
|
|
128
|
+
height: "100%",
|
|
129
|
+
maxWidth: 10,
|
|
130
|
+
maxHeight: 10
|
|
131
|
+
},
|
|
132
|
+
children: a("polyline", {
|
|
133
|
+
points: t,
|
|
134
|
+
fill: "none",
|
|
135
|
+
stroke: "currentColor",
|
|
136
|
+
strokeWidth: 1.5
|
|
137
|
+
})
|
|
138
|
+
});
|
|
139
|
+
}, g = {
|
|
140
|
+
flex: "1 1 0",
|
|
141
|
+
minWidth: 0,
|
|
142
|
+
minHeight: 0,
|
|
143
|
+
margin: 0,
|
|
144
|
+
padding: 0,
|
|
145
|
+
display: "flex",
|
|
146
|
+
alignItems: "center",
|
|
147
|
+
justifyContent: "center"
|
|
148
|
+
}, _ = u(({ width: e, height: t }) => {
|
|
149
|
+
let n = ((e, t, n) => e > 0 && t > 0 ? e > t : n)(e, t, !1);
|
|
150
|
+
return o("div", {
|
|
151
|
+
style: {
|
|
152
|
+
...c,
|
|
153
|
+
display: "flex",
|
|
154
|
+
flexDirection: n ? "row" : "column"
|
|
155
|
+
},
|
|
156
|
+
children: [a("button", {
|
|
157
|
+
type: "button",
|
|
158
|
+
tabIndex: -1,
|
|
159
|
+
style: g,
|
|
160
|
+
children: a(h, { direction: n ? "left" : "up" })
|
|
161
|
+
}), a("button", {
|
|
162
|
+
type: "button",
|
|
163
|
+
tabIndex: -1,
|
|
164
|
+
style: g,
|
|
165
|
+
children: a(h, { direction: n ? "right" : "down" })
|
|
166
|
+
})]
|
|
167
|
+
});
|
|
168
|
+
}, "SpinnerRenderer"), v = (e) => e.getListItems().map((e, t) => a("option", {
|
|
169
|
+
value: t,
|
|
170
|
+
children: e
|
|
171
|
+
}, t)), y = u(({ control: e }) => o("select", {
|
|
172
|
+
tabIndex: -1,
|
|
173
|
+
value: e.getSelectedIndex() ?? -1,
|
|
174
|
+
style: c,
|
|
175
|
+
onChange: () => {},
|
|
176
|
+
children: [e.getSelectedIndex() === null ? a("option", { value: -1 }) : null, v(e)]
|
|
177
|
+
}), "DropDownRenderer"), b = u(({ control: e }) => a("select", {
|
|
178
|
+
tabIndex: -1,
|
|
179
|
+
size: Math.max(2, e.getListItems().length),
|
|
180
|
+
value: e.getSelectedIndex() ?? void 0,
|
|
181
|
+
style: c,
|
|
182
|
+
onChange: () => {},
|
|
183
|
+
children: v(e)
|
|
184
|
+
}), "ListBoxRenderer"), x = u(({ control: e }) => a("fieldset", {
|
|
185
|
+
style: {
|
|
186
|
+
...c,
|
|
187
|
+
padding: 0,
|
|
188
|
+
...s(e)
|
|
189
|
+
},
|
|
190
|
+
children: a("legend", {
|
|
191
|
+
style: {
|
|
192
|
+
marginLeft: "6px",
|
|
193
|
+
padding: "0 2px"
|
|
194
|
+
},
|
|
195
|
+
children: e.getCaption() ?? ""
|
|
196
|
+
})
|
|
197
|
+
}), "GroupBoxRenderer"), S = u(({ control: e }) => a("span", {
|
|
198
|
+
style: {
|
|
199
|
+
...l,
|
|
200
|
+
...s(e)
|
|
201
|
+
},
|
|
202
|
+
children: e.getCaption() ?? ""
|
|
203
|
+
}), "LabelRenderer"), C = u(({ control: e }) => a("div", {
|
|
204
|
+
style: {
|
|
205
|
+
...c,
|
|
206
|
+
border: "var(--sxl-color-neutral, grey) solid 1px",
|
|
207
|
+
backgroundColor: "var(--sxl-color-base-100, white)",
|
|
208
|
+
display: "flex",
|
|
209
|
+
alignItems: "center",
|
|
210
|
+
justifyContent: "center",
|
|
211
|
+
overflow: "hidden",
|
|
212
|
+
whiteSpace: "nowrap"
|
|
213
|
+
},
|
|
214
|
+
children: e.getName?.() ?? e.getTypeDescription()
|
|
215
|
+
}), "UnmodeledControlRenderer");
|
|
216
|
+
export { d as ButtonRenderer, f as CheckBoxRenderer, y as DropDownRenderer, x as GroupBoxRenderer, S as LabelRenderer, b as ListBoxRenderer, p as OptionButtonRenderer, m as ScrollBarRenderer, _ as SpinnerRenderer, C as UnmodeledControlRenderer };
|
|
@@ -0,0 +1,123 @@
|
|
|
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 "./C1pc9F4Rt2C5FKUo.mjs";
|
|
8
|
+
import { h as t, i as n, p as r } from "./DS66lAIM-9M-YoZQ.mjs";
|
|
9
|
+
import { forwardRef as i, memo as a, useContext as o, useEffect as s, useReducer as c } from "react";
|
|
10
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
|
+
import { useSurfaceState as d } from "@sheetxl/grid-react";
|
|
12
|
+
var f = a(i((i, a) => {
|
|
13
|
+
let { children: f, disabled: p, style: m, container: h, movable: g, zoom: _ = 1, isDragging: v, onHide: y, onShow: b, onDragZone: x, adornmentHost: S, flip: C, gesture: w, ...T } = i, [, E] = c((e) => e + 1, 0);
|
|
14
|
+
e(g ?? null, {
|
|
15
|
+
onBoundsChange: E,
|
|
16
|
+
onSelectionChange: E,
|
|
17
|
+
onAnyChange: E
|
|
18
|
+
});
|
|
19
|
+
let D = g?.getMovables() ?? null;
|
|
20
|
+
e(D, { onCollectionChange: E });
|
|
21
|
+
let [O] = d("movable-drag", null), k = o(r), A = D?.getItems({ ignoreHidden: !0 }) ?? [];
|
|
22
|
+
s(() => {
|
|
23
|
+
let e = A.map((e) => e.addListeners({
|
|
24
|
+
onBoundsChange: E,
|
|
25
|
+
onAnyChange: E,
|
|
26
|
+
onSelectionChange: E
|
|
27
|
+
}));
|
|
28
|
+
return () => {
|
|
29
|
+
for (let t of e) t();
|
|
30
|
+
};
|
|
31
|
+
}, [A.map((e) => e.getId()).join("|")]);
|
|
32
|
+
let j = g?.getBounds();
|
|
33
|
+
if (h.isDeleted() || !g || !j) return null;
|
|
34
|
+
let M = m?.pointerEvents === "none", N = !M && !p && g.isSelected(), P = O?.[g.getId()] ?? null, F = P?.bounds ?? j, I = g.getFlip(), L = C ?? P?.flip ?? I, R = (j.width > 0 ? F.width / j.width : 1) * (L.horizontal === I.horizontal ? 1 : -1), z = (j.height > 0 ? F.height / j.height : 1) * (L.vertical === I.vertical ? 1 : -1), B = g.getRotation() || 0, V = [
|
|
35
|
+
`translate(${F.width * _ / 2}px, ${F.height * _ / 2}px)`,
|
|
36
|
+
R !== 1 || z !== 1 ? `scale(${R}, ${z})` : "",
|
|
37
|
+
B ? `rotate(${-B}deg)` : "",
|
|
38
|
+
`translate(${-(j.x + j.width / 2) * _}px, ${-(j.y + j.height / 2) * _}px)`
|
|
39
|
+
].filter(Boolean).join(" ");
|
|
40
|
+
return u("div", {
|
|
41
|
+
className: "group-editor",
|
|
42
|
+
...T,
|
|
43
|
+
ref: a,
|
|
44
|
+
style: {
|
|
45
|
+
width: "100%",
|
|
46
|
+
height: "100%",
|
|
47
|
+
position: "relative",
|
|
48
|
+
overflow: "visible",
|
|
49
|
+
...m,
|
|
50
|
+
pointerEvents: "none"
|
|
51
|
+
},
|
|
52
|
+
children: [l("div", {
|
|
53
|
+
className: "group-canvas",
|
|
54
|
+
style: {
|
|
55
|
+
position: "absolute",
|
|
56
|
+
left: 0,
|
|
57
|
+
top: 0,
|
|
58
|
+
transformOrigin: "0 0",
|
|
59
|
+
transform: V,
|
|
60
|
+
pointerEvents: "none"
|
|
61
|
+
},
|
|
62
|
+
children: A.map((e) => {
|
|
63
|
+
let r = n(e.getContent().getType()), i = O?.[e.getId()] ?? null, a = i?.bounds ?? e.getBounds();
|
|
64
|
+
if (!a || !r) return null;
|
|
65
|
+
let o = i?.rotation ?? (e.getRotation() || 0);
|
|
66
|
+
return l("div", {
|
|
67
|
+
className: "group-member",
|
|
68
|
+
[t]: e.getId(),
|
|
69
|
+
style: {
|
|
70
|
+
position: "absolute",
|
|
71
|
+
left: a.x * _,
|
|
72
|
+
top: a.y * _,
|
|
73
|
+
width: a.width * _,
|
|
74
|
+
height: a.height * _,
|
|
75
|
+
transform: o ? `rotate(${o}deg)` : void 0,
|
|
76
|
+
transformOrigin: "center",
|
|
77
|
+
opacity: i ? .7 : void 0,
|
|
78
|
+
pointerEvents: "none"
|
|
79
|
+
},
|
|
80
|
+
children: l(r, {
|
|
81
|
+
movable: e,
|
|
82
|
+
zoom: _,
|
|
83
|
+
flip: i?.flip ?? e.getFlip(),
|
|
84
|
+
disabled: p,
|
|
85
|
+
isDragging: v || !!i,
|
|
86
|
+
adornmentHost: k.get(e) ?? null,
|
|
87
|
+
style: {
|
|
88
|
+
position: "relative",
|
|
89
|
+
left: 0,
|
|
90
|
+
top: 0,
|
|
91
|
+
width: "100%",
|
|
92
|
+
height: "100%",
|
|
93
|
+
pointerEvents: M ? "none" : "auto"
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
}, e.getId());
|
|
97
|
+
})
|
|
98
|
+
}), N ? l("svg", {
|
|
99
|
+
className: "group-edge",
|
|
100
|
+
width: "100%",
|
|
101
|
+
height: "100%",
|
|
102
|
+
style: {
|
|
103
|
+
position: "absolute",
|
|
104
|
+
left: 0,
|
|
105
|
+
top: 0,
|
|
106
|
+
overflow: "visible",
|
|
107
|
+
pointerEvents: "none"
|
|
108
|
+
},
|
|
109
|
+
children: l("rect", {
|
|
110
|
+
x: 0,
|
|
111
|
+
y: 0,
|
|
112
|
+
width: "100%",
|
|
113
|
+
height: "100%",
|
|
114
|
+
fill: "none",
|
|
115
|
+
stroke: "transparent",
|
|
116
|
+
pointerEvents: "stroke",
|
|
117
|
+
style: { strokeWidth: "var(--sxl-handle-hit, 11px)" }
|
|
118
|
+
})
|
|
119
|
+
}) : null]
|
|
120
|
+
});
|
|
121
|
+
}));
|
|
122
|
+
f.displayName = "GroupEditor";
|
|
123
|
+
export { f as GroupEditor };
|