@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { EditorAlignment, VirtualDivProps } from '@sheetxl/grid-react';
|
|
4
4
|
import { SheetEditable } from './SheetEditable';
|
|
5
5
|
/**
|
|
@@ -14,7 +14,7 @@ export interface SheetCellEditorLayerProps extends VirtualDivProps {
|
|
|
14
14
|
*/
|
|
15
15
|
zIndex?: number;
|
|
16
16
|
/** The sheet — its selection drives the input's leave-key nav, its active cell the edit-session commands. */
|
|
17
|
-
sheet:
|
|
17
|
+
sheet: IWorksheet;
|
|
18
18
|
/** The editable (UI model) — anchor + the single current edit. Shared with peers (the formula bar). */
|
|
19
19
|
editable: SheetEditable;
|
|
20
20
|
/**
|
|
@@ -23,15 +23,11 @@ export interface SheetCellEditorLayerProps extends VirtualDivProps {
|
|
|
23
23
|
* no flag.
|
|
24
24
|
*/
|
|
25
25
|
darkMode?: boolean;
|
|
26
|
-
/** Horizontal anchor used when the editor grows past its cell (Excel-style overflow). @defaultValue `'left'` */
|
|
27
|
-
alignment?: EditorAlignment;
|
|
28
26
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* ({@link useProtectedEditNotice}) so all panes form one once-per-visit notice scope.
|
|
32
|
-
* @defaultValue this layer's own {@link useProtectedEditNotice}
|
|
27
|
+
* Horizontal anchor used when the editor grows past its cell (Excel-style overflow). Overrides the
|
|
28
|
+
* default, which follows the edited cell's rendered alignment (formulas always grow to the right).
|
|
33
29
|
*/
|
|
34
|
-
|
|
30
|
+
alignment?: EditorAlignment;
|
|
35
31
|
}
|
|
36
32
|
export declare function SheetCellEditorLayer(props: SheetCellEditorLayerProps): React.ReactElement;
|
|
37
33
|
export declare namespace SheetCellEditorLayer {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
|
+
import { VirtualKeyboardHandler } from '@sheetxl/utils-react';
|
|
4
|
+
import { StartEditOptions } from '@sheetxl/grid-react';
|
|
5
|
+
import { SheetEditable } from './SheetEditable';
|
|
6
|
+
import { EditRejectedNotice } from './useEditRejectedNotice';
|
|
7
|
+
/**
|
|
8
|
+
* Start a ready-mode edit typed into the grid.
|
|
9
|
+
*
|
|
10
|
+
* @param keyboard The virtual keyboard the typing came through (a key typed into the
|
|
11
|
+
* {@link VirtualKeyboardLayer}'s input); omit for typing on the grid itself. In keyboard mode the
|
|
12
|
+
* edit opens in the keyboard's registered editor (a phone's formula bar) rather than the cell, by
|
|
13
|
+
* parking that editor on the new session before anything renders it.
|
|
14
|
+
* @returns Whether the edit started.
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare const startTypedEdit: (editable: SheetEditable, coords: Parameters<SheetEditable["startEdit"]>[0], options: StartEditOptions<string>, keyboard?: VirtualKeyboardHandler) => boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Props for {@link SheetCellEditorStartLayer}.
|
|
20
|
+
*/
|
|
21
|
+
export interface SheetCellEditorStartLayerProps {
|
|
22
|
+
/** The sheet — stamps the double-clicked cell's scope (sheet name) onto the coords it starts on. */
|
|
23
|
+
sheet: IWorksheet;
|
|
24
|
+
/** The editable (UI model) — the same instance the {@link SheetCellEditorLayer} renders. */
|
|
25
|
+
editable: SheetEditable;
|
|
26
|
+
/**
|
|
27
|
+
* Notified when a start-edit attempt is rejected (`startEdit` returned `false` — a non-editable
|
|
28
|
+
* cell). The host that mounts one layer per pane (`WorksheetElement`) passes a SHARED callback
|
|
29
|
+
* ({@link useEditRejectedNotice}) so all panes form one notice scope; it receives the rejected cell.
|
|
30
|
+
* @defaultValue this layer's own {@link useEditRejectedNotice}
|
|
31
|
+
*/
|
|
32
|
+
onEditRejected?: EditRejectedNotice;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The sheet's **ready-mode** edit starters — the `@sheetxl/react` counterpart of grid-react's
|
|
36
|
+
* `EditorStartLayer`: a typed character / `F2` / `Backspace` opens an edit on the anchor, a
|
|
37
|
+
* double-click opens one on the cell under the pointer, and a rejected start raises the Excel-style
|
|
38
|
+
* heads-up (protected sheet, array part, unlock-range prompt).
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* A content-less layer, separate from the {@link SheetCellEditorLayer} that paints the box. The box
|
|
42
|
+
* sits at the **top** of the stack to paint over everything, but a Layer's handlers are its slot's
|
|
43
|
+
* tap — grid-wide ears that fire on every layer's turn, top first — so start handlers on the top
|
|
44
|
+
* layer intercepted keys and double-clicks aimed at a chart or note before that widget's own handlers
|
|
45
|
+
* ran. Starting an edit is the grid *floor's* behavior: `WorksheetElement` mounts this as the first grid
|
|
46
|
+
* child, where it only hears what no widget above consumed.
|
|
47
|
+
*
|
|
48
|
+
* Keys are positionless, so the floor slot alone is not enough: a focused widget that does not consume
|
|
49
|
+
* a printable key (it must let keys through so its own commands can resolve) would still reach this
|
|
50
|
+
* tap. The key start therefore acts only when the key is aimed at the grid surface itself — the
|
|
51
|
+
* surface, or the pane's focus target standing in for it (the {@link VirtualKeyboardLayer}'s input),
|
|
52
|
+
* is the focused element. A double-click has a position; a widget that owns it consumes it.
|
|
53
|
+
*
|
|
54
|
+
* Text that reaches the focus target without a keydown that started an edit (a virtual keyboard can
|
|
55
|
+
* deliver it that way) starts one too, seeded with the text.
|
|
56
|
+
*/
|
|
57
|
+
export declare function SheetCellEditorStartLayer(props: SheetCellEditorStartLayerProps): React.ReactElement;
|
|
58
|
+
export declare namespace SheetCellEditorStartLayer {
|
|
59
|
+
var displayName: string;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=SheetCellEditorStartLayer.d.ts.map
|
|
@@ -29,6 +29,15 @@ export interface SheetCellInputOptions {
|
|
|
29
29
|
*/
|
|
30
30
|
fillNone?: boolean;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Project the cell's **edit string**: the formula (`=…`), else the formatted text, with the leading
|
|
34
|
+
* `'` restored for a quote-prefixed (text-forced) cell.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Exported for the grid editor layer, which needs the same text the input will display to decide which way
|
|
38
|
+
* the box grows (a formula always grows to the right, whatever the cell's alignment).
|
|
39
|
+
*/
|
|
40
|
+
export declare const editStringFromCell: (cell: ICell) => string;
|
|
32
41
|
/**
|
|
33
42
|
* The **ghost formula** for a spilled-INTO cell: the spill anchor's formula, as Excel greys it in the
|
|
34
43
|
* formula bar. `null` for every other cell (including the anchor itself, which owns the formula and so
|
|
@@ -52,8 +61,9 @@ export declare const placeholderFromCell: (cell: ICell | null) => string | null;
|
|
|
52
61
|
*
|
|
53
62
|
* **Placement** is driven by {@link ICell.getTextPlacement} — the *same* SDK geometry the cell
|
|
54
63
|
* renderer uses — so the editor's text sits exactly where the rendered cell's does. Insets define the
|
|
55
|
-
* content box; the
|
|
56
|
-
*
|
|
64
|
+
* content box horizontally; the placement's text block (Excel's baseline rules) bounds it vertically; the
|
|
65
|
+
* cell's line height sets the line rhythm; vertical alignment is flex `justifyContent` within that
|
|
66
|
+
* box. Horizontal overflow + wrap ride the `cellSize`/`onNaturalSize` seam: a
|
|
57
67
|
* wrapped cell measures its own height (clip-proof) and reports width 0 so the layer grows the box
|
|
58
68
|
* *down*; an unwrapped cell reports the shrink-to-content width so the layer grows it *across* columns.
|
|
59
69
|
*/
|
|
@@ -94,6 +104,20 @@ export type SheetCellInputProps = EditorInputProps<() => ICell, string> & {
|
|
|
94
104
|
* a sliver of the next; supplying it makes the two exact.
|
|
95
105
|
*/
|
|
96
106
|
lineHeight?: number;
|
|
107
|
+
/**
|
|
108
|
+
* The virtual keyboard a touch host asks for (`'decimal'` for a number pad). Applied to the
|
|
109
|
+
* textarea; a change takes effect on the next focus on some platforms.
|
|
110
|
+
*/
|
|
111
|
+
inputMode?: React.TextareaHTMLAttributes<HTMLTextAreaElement>['inputMode'];
|
|
112
|
+
/** The action label of the virtual keyboard's Enter key. */
|
|
113
|
+
enterKeyHint?: React.TextareaHTMLAttributes<HTMLTextAreaElement>['enterKeyHint'];
|
|
114
|
+
/**
|
|
115
|
+
* Which side of the caret the function hint opens on. A host at the bottom of the screen (the
|
|
116
|
+
* phone's formula bar) asks for `'above'`, where the room is.
|
|
117
|
+
*
|
|
118
|
+
* @defaultValue 'below'
|
|
119
|
+
*/
|
|
120
|
+
hintPlacement?: 'below' | 'above';
|
|
97
121
|
};
|
|
98
122
|
export declare const createSheetCellInput: (options: SheetCellInputOptions) => React.FC<SheetCellInputProps>;
|
|
99
123
|
//# sourceMappingURL=SheetCellInput.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet, IWorkbook, ICell } from '@sheetxl/sdk';
|
|
2
2
|
import { CreateEdit, IEditable, EditCommitArgs } from '@sheetxl/grid-react';
|
|
3
3
|
import { ReferenceModeHandler } from './useReferenceMode';
|
|
4
4
|
/** The editable shape for a spreadsheet: `clean` is a live cell getter, `dirty` is the working text. */
|
|
@@ -9,25 +9,31 @@ export type SheetEditable = IEditable<() => ICell, string, EditCommitArgs>;
|
|
|
9
9
|
* uses it to cover the cell while editing. The cell-aware input itself paints only the cell's *own*
|
|
10
10
|
* fill; this fallback is the container's job.
|
|
11
11
|
*/
|
|
12
|
-
export declare const resolveCellBackground: (cell: ICell, sheet:
|
|
12
|
+
export declare const resolveCellBackground: (cell: ICell, sheet: IWorksheet, darkMode?: boolean, bodyFill?: string) => string;
|
|
13
13
|
/**
|
|
14
|
-
* An `
|
|
14
|
+
* An `IWorksheet`-backed {@link CreateEdit} for the new {@link DefaultEditable} / {@link EditorLayer}.
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
17
|
* - **clean** is `() => ICell` — a *live* cell getter (not a captured value), so a cell-aware input
|
|
18
18
|
* reads the cell's formula/format/style/fill through to the model even if the handle is replaced.
|
|
19
|
-
* - **commit** writes the dirty string via `range.setValue(text, { autoFit })` — the SDK
|
|
20
|
-
* string to a formula / number / date / text.
|
|
19
|
+
* - **commit** writes the dirty string via `range.setValue(text, { autoFit, autoSelectRestore })` — the SDK
|
|
20
|
+
* coerces the string to a formula / number / date / text. `autoSelectRestore` without `autoSelect`: the
|
|
21
|
+
* write leaves the selection as it is (a block typed into stays selected for Enter to move within),
|
|
22
|
+
* and an undo or a redo of it lands on the cell.
|
|
21
23
|
* - **`null`** ⇒ the cell is not editable (protected / read-only), via {@link ICell.isEditAllowed}.
|
|
22
|
-
* - **scope-aware**: `coords.scope` (a sheet name) picks the sheet to edit, via `workbook.
|
|
24
|
+
* - **scope-aware**: `coords.scope` (a sheet name) picks the sheet to edit, via `workbook.getWorksheet`,
|
|
23
25
|
* falling back to `sheet`. This is what makes a commit write back to the session's *origin* sheet even
|
|
24
26
|
* if a different sheet is currently displayed — `coords` here is the session's own (fixed) coords, not
|
|
25
27
|
* whatever the anchor currently reports.
|
|
26
28
|
*
|
|
27
29
|
* Construct the editable with it: `new DefaultEditable(anchor, createSheetCreateEdit(sheet))` — or use
|
|
28
30
|
* the {@link createEditable} factory, which wires both.
|
|
31
|
+
*
|
|
32
|
+
* A write the model REFUSES (an `ExpectedError` such as "You can't change part of an array") throws
|
|
33
|
+
* out of `commit`, which rejects it; the editable fans the error out to
|
|
34
|
+
* `IEditable.subscribeCommitError`, where the host shows it.
|
|
29
35
|
*/
|
|
30
|
-
export declare const createSheetCreateEdit: (sheet:
|
|
36
|
+
export declare const createSheetCreateEdit: (sheet: IWorksheet, workbook?: IWorkbook | null) => CreateEdit<() => ICell, string, EditCommitArgs>;
|
|
31
37
|
/**
|
|
32
38
|
* Build the production {@link SheetEditable} for a sheet — the {@link DefaultEditable} wired with a
|
|
33
39
|
* workbook-aware active-cell anchor ({@link createEditableAnchor}) and SDK edit strategy
|
|
@@ -49,5 +55,5 @@ export interface CreateEditableOptions {
|
|
|
49
55
|
*/
|
|
50
56
|
referenceMode?: ReferenceModeHandler;
|
|
51
57
|
}
|
|
52
|
-
export declare const createEditable: (sheet:
|
|
58
|
+
export declare const createEditable: (sheet: IWorksheet, options?: CreateEditableOptions) => SheetEditable;
|
|
53
59
|
//# sourceMappingURL=SheetEditable.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet, IWorksheetView } from '@sheetxl/sdk';
|
|
3
3
|
import { LayerProps } from '@sheetxl/grid-react';
|
|
4
4
|
import { SheetSelection } from '../selection';
|
|
5
5
|
/**
|
|
6
6
|
* Draws the current **reference selection** over the grid (Excel-style colored rectangles), highlighting
|
|
7
|
-
* the active reference. A pane layer (mounted per pane by `
|
|
7
|
+
* the active reference. A pane layer (mounted per pane by `WorksheetElement`), it reads the app-wide
|
|
8
8
|
* reference-mode bus ({@link useReferenceMode}) — not any edit session — so it renders whenever a
|
|
9
9
|
* reference selection is present, regardless of what produced it: a formula edit (via `SheetCellInput`)
|
|
10
10
|
* or, later, a selected chart showing its source data with no active input at all.
|
|
@@ -23,14 +23,14 @@ import { SheetSelection } from '../selection';
|
|
|
23
23
|
*/
|
|
24
24
|
export interface SheetReferenceLayerProps extends LayerProps {
|
|
25
25
|
/** The sheet this pane renders — ranges belonging to a different sheet are filtered out of this pane. */
|
|
26
|
-
sheet:
|
|
26
|
+
sheet: IWorksheet;
|
|
27
27
|
/**
|
|
28
28
|
* The sheet view — enables the **formula-view** fallback: while `isShowFormulas()` and no
|
|
29
29
|
* reference-mode state is on the bus, the selection anchor's formula (when it IS a formula)
|
|
30
30
|
* has its references outlined read-only (same palette as the anchor's colored formula text —
|
|
31
31
|
* see {@link useFormulaViewAnchor}). Omit for a host with no formula view.
|
|
32
32
|
*/
|
|
33
|
-
sheetView?:
|
|
33
|
+
sheetView?: IWorksheetView;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Wrap a selection so a range **committed through this pane** is stamped with this pane's sheet.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SheetEditable } from './SheetEditable';
|
|
3
|
+
/**
|
|
4
|
+
* Props for {@link VirtualKeyboardLayer}.
|
|
5
|
+
*/
|
|
6
|
+
export interface VirtualKeyboardLayerProps {
|
|
7
|
+
/**
|
|
8
|
+
* The sheet's editable: an edit in progress is what a rising keyboard is for, and its anchor is the
|
|
9
|
+
* active cell kept in view above the keyboard.
|
|
10
|
+
*/
|
|
11
|
+
editable: SheetEditable;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Keyboard mode for the sheet (see `useVirtualKeyboard`): while a virtual keyboard is up for typing
|
|
15
|
+
* into the sheet, focusing the sheet lands on an invisible input that holds the keyboard, so it stays
|
|
16
|
+
* up as the active cell moves.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* A virtual keyboard belongs to the focused text field, and the grid surface is not one. Each pane's
|
|
20
|
+
* layer hosts an input and registers it as the pane's focus target while in keyboard mode, asking for
|
|
21
|
+
* the keyboard's input mode. Keys typed there reach the {@link SheetCellEditorStartLayer} as keys
|
|
22
|
+
* aimed at the surface do; this layer starts no edits of its own.
|
|
23
|
+
*
|
|
24
|
+
* Per pane:
|
|
25
|
+
* - **A tap on the grid leaves keyboard mode**: the user has gone back to touching cells. With the
|
|
26
|
+
* store's `keepOnTap` it stays, as Excel keeps its keyboard: the tap does not move focus off the input.
|
|
27
|
+
* - **A focus that reaches the surface itself** in keyboard mode is passed on to the input.
|
|
28
|
+
* - **Leaving keyboard mode** with the input focused hands focus to the surface, lowering the keyboard.
|
|
29
|
+
*
|
|
30
|
+
* The primary pane's layer (the center pane, when there is one) also does the sheet's part, once:
|
|
31
|
+
* - **On and off with the keyboard.** A keyboard rising while the sheet is being edited (in the cell or
|
|
32
|
+
* a formula bar) enters keyboard mode; the keyboard going down (the system's back gesture, its own
|
|
33
|
+
* hide key) leaves it.
|
|
34
|
+
* - **Show.** Entering keyboard mode with focus outside any text field (a "show keyboard" button)
|
|
35
|
+
* focuses the pane, raising the keyboard.
|
|
36
|
+
* - **Done.** Taking a way out of the edit from chrome (the status bar's ✓ / ✕, see `exitEditMode`)
|
|
37
|
+
* leaves keyboard mode before the edit ends, so the focus returning to the grid lowers it.
|
|
38
|
+
* - **The active cell stays in view.** When the keyboard takes room from the grid, the active cell is
|
|
39
|
+
* scrolled back into view (unless the store's `disableScrollIntoView`).
|
|
40
|
+
*
|
|
41
|
+
* Mount it directly above the start layer, so a key typed into the input reaches the start layer's
|
|
42
|
+
* floor. It renders nothing where the keyboard store is not enabled (`isEnabled()`: a device with no
|
|
43
|
+
* virtual keyboard).
|
|
44
|
+
*/
|
|
45
|
+
export declare function VirtualKeyboardLayer(props: VirtualKeyboardLayerProps): React.ReactElement | null;
|
|
46
|
+
export declare namespace VirtualKeyboardLayer {
|
|
47
|
+
var displayName: string;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=VirtualKeyboardLayer.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IWorkbook, IWorksheet } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* The worksheet an editor parses formula text against: the selected worksheet, or, while a sheet of
|
|
4
|
+
* another kind is the active tab, the first worksheet. `null` for a workbook with no worksheet.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Only the parse is anchored here. A field that has a home passes it as the coords (`scope`), and a
|
|
8
|
+
* reference that names its sheet names it; what is left is text with no sheet of its own, which a
|
|
9
|
+
* chart sheet cannot be home to.
|
|
10
|
+
*/
|
|
11
|
+
export declare const formulaAnchorSheet: (workbook: IWorkbook | null | undefined) => IWorksheet | null;
|
|
12
|
+
//# sourceMappingURL=formulaAnchor.d.ts.map
|
|
@@ -10,29 +10,47 @@ import { ICalculation } from '@sheetxl/sdk';
|
|
|
10
10
|
export declare const caretOwnerToken: (tokens: readonly ICalculation.FormulaToken[], caret: number, base?: number) => {
|
|
11
11
|
token: ICalculation.FormulaToken;
|
|
12
12
|
start: number;
|
|
13
|
+
index: number;
|
|
13
14
|
} | null;
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
+
* Whether `token` names something the autocomplete list can offer: a function, a workbook name or
|
|
17
|
+
* table, a use of a `LET`/`LAMBDA` parameter, or the unfinished part of a structured reference. A
|
|
18
|
+
* partial identifier being typed is a `named` token too, even at the end of a formula that no longer
|
|
19
|
+
* parses.
|
|
16
20
|
*
|
|
17
|
-
* A
|
|
18
|
-
*
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*
|
|
21
|
+
* A parameter's DECLARATION is not one — it introduces a new name, so there is nothing to complete.
|
|
22
|
+
* Nor is a table part the SDK has not marked `partial`: a finished part is not reopened.
|
|
23
|
+
*/
|
|
24
|
+
export declare const isCompletionToken: (token: ICalculation.FormulaToken) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The span of the name being **completed** at the caret, or `null` when nothing is. Offsets are text offsets
|
|
27
|
+
* past the leading formula prefix (`base`), like {@link caretOwnerToken}'s.
|
|
28
|
+
*
|
|
29
|
+
* A candidate is an {@link isCompletionToken} that is **not already a call** — no `(` token immediately follows
|
|
30
|
+
* a name, and no `[` follows a table name. That second half is the whole point: a name that already has its
|
|
31
|
+
* paren is finished work, and clicking back into it (to read it, to fix an argument) is a navigation gesture,
|
|
32
|
+
* not a request to complete it — re-popping the autocomplete list there covers the very formula you came back
|
|
33
|
+
* to look at. Excel behaves the same way.
|
|
23
34
|
*
|
|
24
35
|
* Typing is unaffected: `=SU` has no trailing paren, so the list still appears as you type, and accepting a
|
|
25
36
|
* row parks the caret INSIDE the parens where the signature preview takes over.
|
|
26
37
|
*
|
|
38
|
+
* What the list is built from comes off the token, as the SDK stated it:
|
|
39
|
+
* - `part` — the unfinished part of a structured reference (`Sales[Co`, or the empty part after `Sales[`):
|
|
40
|
+
* which table, and what may finish it (`TablePartRef.partial`); `nested` when it is an item of a
|
|
41
|
+
* bracketed list (`Sales[[#This Row],[Co`) rather than the reference's only part;
|
|
42
|
+
* - `bound` — otherwise, the `LET` / `LAMBDA` names in scope there (`FormulaTokenContext.bound`).
|
|
43
|
+
*
|
|
27
44
|
* The editor shares this between the list and the signature preview so the two can never both claim the
|
|
28
45
|
* caret — exactly one shows, and suppressing the list here is what lets the preview show the enclosing
|
|
29
46
|
* call's signature instead.
|
|
30
|
-
*
|
|
31
|
-
* `text` is the full editor string and the returned offsets index into it (not into the token stream).
|
|
32
47
|
*/
|
|
33
|
-
export declare const completionSpanAtCaret: (tokens: readonly ICalculation.FormulaToken[], caret: number, base: number
|
|
48
|
+
export declare const completionSpanAtCaret: (tokens: readonly ICalculation.FormulaToken[], caret: number, base: number) => {
|
|
34
49
|
start: number;
|
|
35
50
|
end: number;
|
|
51
|
+
part?: ICalculation.TablePartRef;
|
|
52
|
+
nested?: true;
|
|
53
|
+
bound?: readonly ICalculation.BoundName[];
|
|
36
54
|
} | null;
|
|
37
55
|
/** The function + argument the caret is currently in. */
|
|
38
56
|
export interface FunctionCaretContext {
|
|
@@ -40,7 +58,18 @@ export interface FunctionCaretContext {
|
|
|
40
58
|
name: string;
|
|
41
59
|
/** Zero-based index of the argument the caret is in. */
|
|
42
60
|
argIndex: number;
|
|
61
|
+
/** The `LET` / `LAMBDA` names in scope at the call ({@link ICalculation.FormulaTokenContext.bound}), when any are. */
|
|
62
|
+
bound?: readonly ICalculation.BoundName[];
|
|
43
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Whether the argument the caret is in (`ctx`, from {@link resolveFunctionContext}) holds nothing yet:
|
|
66
|
+
* the caret sits right after the call's `(` or a separator, or in whitespace there, and only a
|
|
67
|
+
* separator, the call's `)` or the end of the text follows.
|
|
68
|
+
*
|
|
69
|
+
* Read off the `empty` token the SDK emits for an argument with no content. That token carries the
|
|
70
|
+
* argument's own context, so an empty argument of a nested call is never taken for this one's.
|
|
71
|
+
*/
|
|
72
|
+
export declare const isEmptyArgumentAt: (tokens: readonly ICalculation.FormulaToken[], caret: number, base: number, ctx: FunctionCaretContext) => boolean;
|
|
44
73
|
/**
|
|
45
74
|
* Resolve which function + argument the caret sits in, from a formula's token stream.
|
|
46
75
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { ICalculation } from '@sheetxl/sdk';
|
|
3
|
+
import { TextSelectionPress } from '@sheetxl/utils-react';
|
|
3
4
|
/** Gap (px) between the top of a hovered segment and the bottom of its eval tip. */
|
|
4
5
|
export declare const EVAL_TIP_GAP = 6;
|
|
5
6
|
/**
|
|
@@ -24,11 +25,14 @@ export interface SelectDrag {
|
|
|
24
25
|
clientX: number;
|
|
25
26
|
clientY: number;
|
|
26
27
|
}) => boolean;
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Call from the input's `pointerdown` — non-primary buttons are ignored. Pass the WHOLE event: the
|
|
30
|
+
* selection drag reads its target and position to place the caret itself (`useTextSelectionDrag`).
|
|
31
|
+
*/
|
|
32
|
+
begin: (e?: TextSelectionPress) => void;
|
|
33
|
+
/** Wire to the input's `dragstart`: a press on the field means "select", never "move the text". */
|
|
34
|
+
onDragStart: (e: {
|
|
35
|
+
preventDefault: () => void;
|
|
32
36
|
}) => void;
|
|
33
37
|
}
|
|
34
38
|
/**
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ICalculation } from '@sheetxl/sdk';
|
|
2
|
+
/** A value as a formula literal: a string quoted (`"` doubled), a number with the locale's decimal. */
|
|
3
|
+
export declare const enumLiteral: (value: number | string, decimal: string) => string;
|
|
4
|
+
/** A LITERAL argument outside the values its parameter is limited to — see {@link findEnumLints}. */
|
|
5
|
+
export interface EnumLint {
|
|
6
|
+
/** The called function, as the argument's tokens state it (`FormulaTokenContext.name`). */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Which argument of the call. */
|
|
9
|
+
argIndex: number;
|
|
10
|
+
/** The literal's token indices — a negative number is the `-` and the number. */
|
|
11
|
+
tokens: readonly number[];
|
|
12
|
+
/** The literal as written (`5`, `-2`, `"xyz"`). */
|
|
13
|
+
text: string;
|
|
14
|
+
/** The text offsets the argument spans, from just past its opener to its closer — where a caret is "in" it. */
|
|
15
|
+
argStart: number;
|
|
16
|
+
argEnd: number;
|
|
17
|
+
/** The values the parameter offers, in declaration order — a `@deprecated` member is left out. */
|
|
18
|
+
values: readonly (number | string)[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The literal arguments in `tokens` that fall outside their parameter's enum (`=MATCH(A1,B:B,5)`).
|
|
22
|
+
*
|
|
23
|
+
* A warning, never an error — nothing here stops a formula being committed — and deliberately
|
|
24
|
+
* narrow, so it is never wrong:
|
|
25
|
+
* - Only a LITERAL is judged: a number (or `-` and a number) or a string, alone in its argument. A
|
|
26
|
+
* reference, an expression or an array is the user's and is never second-guessed.
|
|
27
|
+
* - Only a literal of the enum's own type: `"1"` at a numeric slot may coerce to a member, so it is
|
|
28
|
+
* left alone. Strings compare case-insensitively, as the gate does.
|
|
29
|
+
* - Every enum counts — gated, `ReportType<E>` and `E | Scalar` alike. A gated slot answers `#VALUE!`
|
|
30
|
+
* anyway; at the others an out-of-set literal silently does something (`PMT`'s type `2` reads as 1),
|
|
31
|
+
* which is exactly when a warning helps.
|
|
32
|
+
*
|
|
33
|
+
* Offsets start after the leading formula prefix (`base`), as the other caret helpers' do.
|
|
34
|
+
*/
|
|
35
|
+
export declare const findEnumLints: (calc: ICalculation, tokens: readonly ICalculation.FormulaToken[], base: number) => EnumLint[];
|
|
36
|
+
//# sourceMappingURL=formulaLint.d.ts.map
|
|
@@ -80,6 +80,13 @@ export declare const PAREN_EMPHASIS_SLOT: CSSProperties;
|
|
|
80
80
|
export declare const parenEmphasisGlyph: (hue: string) => CSSProperties;
|
|
81
81
|
/** An unbalanced paren (no partner) — reuses the reference red so it reads as an error. */
|
|
82
82
|
export declare const PAREN_ERROR_COLOR = "var(--sxl-color-error, #d93025)";
|
|
83
|
+
/**
|
|
84
|
+
* A lint WARNING (`findEnumLints`) — amber, not the error red: the formula is legal and commits.
|
|
85
|
+
* The flagged token is underlined with it, and the signature preview's message is set in it.
|
|
86
|
+
*/
|
|
87
|
+
export declare const LINT_WARNING_COLOR = "var(--sxl-color-warning, #b26a00)";
|
|
88
|
+
/** The style that marks a linted token: a wavy underline, leaving its syntax color alone. */
|
|
89
|
+
export declare const LINT_UNDERLINE_STYLE: CSSProperties;
|
|
83
90
|
/** The paren pairing of a token stream — see {@link computeParenMatch}. */
|
|
84
91
|
export interface ParenMatch {
|
|
85
92
|
/** Pairs each `(`/`)` token index with its partner (both directions). */
|
|
@@ -34,14 +34,14 @@ export declare const isFormulaText: (value: string) => boolean;
|
|
|
34
34
|
export declare const formulaPrefixLen: (value: string) => number;
|
|
35
35
|
/**
|
|
36
36
|
* Syntax color for a formula token, or `undefined` to inherit the cell's font color (operators, parens,
|
|
37
|
-
* separators, whitespace). Reference-literal tokens (`
|
|
38
|
-
* that bind them, e.g. `:`) rotate through `PICKER_COLORS` by
|
|
37
|
+
* separators, whitespace). Reference-literal tokens (those carrying a `referenceIndex` — cells AND the
|
|
38
|
+
* range operators that bind them, e.g. `:`) rotate through `PICKER_COLORS` by that index, so co-referenced ranges
|
|
39
39
|
* share a hue — LITERALLY the same color expressions the range picker draws its rectangles with, so text
|
|
40
40
|
* and on-grid rectangle always match, both follow light/dark for free, AND a field OUTSIDE any themed
|
|
41
41
|
* workbook surface (a standalone dialog/panel — no `--sxl-color-series-*` definitions in scope) still
|
|
42
42
|
* colors through the palette's built-in literal fallbacks. (A bare `var()` with no fallback computes to
|
|
43
43
|
* *nothing* there — references silently rendered in the plain text color.) Keying off the SDK's
|
|
44
|
-
* `
|
|
44
|
+
* `referenceIndex` (not a hardcoded type list) keeps the whole span, operators included, one color while a
|
|
45
45
|
* function that merely returns a reference stays function-colored.
|
|
46
46
|
*/
|
|
47
47
|
export declare const tokenColor: (token: ICalculation.FormulaToken) => string | undefined;
|
|
@@ -61,6 +61,18 @@ export declare const referenceSpan: (tokens: readonly ICalculation.FormulaToken[
|
|
|
61
61
|
start: number;
|
|
62
62
|
end: number;
|
|
63
63
|
} | null;
|
|
64
|
+
/**
|
|
65
|
+
* Whether reference `refIndex` is written as a STRUCTURED reference (`Sales[Amount]`, `Sales[@Qty]`,
|
|
66
|
+
* or the bare table name) rather than an address.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* Read off the tokens, because the resolved coords cannot tell: a structured reference resolves to
|
|
70
|
+
* the region it names with every `$` flag set — the absolute form a table-to-range conversion wants,
|
|
71
|
+
* and exactly what a picker must NOT carry over. A structured reference has no `$` form of its own
|
|
72
|
+
* (which is also why F4 does nothing on one), so a pick that moves it off the table starts from the
|
|
73
|
+
* relative default instead of inheriting `$`s the user never wrote.
|
|
74
|
+
*/
|
|
75
|
+
export declare const isStructuredReference: (tokens: readonly ICalculation.FormulaToken[], refIndex: number) => boolean;
|
|
64
76
|
/**
|
|
65
77
|
* F4 — cycle `$` (relative ⇄ absolute) on the reference under the caret, as a PURE text rewrite.
|
|
66
78
|
* Tokenizes `value` (a formula string — `=`/`+`/`-` lead), reads the caret cell token's `refSide`
|
|
@@ -73,8 +85,8 @@ export declare const referenceSpan: (tokens: readonly ICalculation.FormulaToken[
|
|
|
73
85
|
* Shared by the cell editor's caret handle (`SheetCellInput`) and the reference field
|
|
74
86
|
* (`useFormulaInput`'s reference grammar, which runs it per comma-segment) so F4 behaves identically in both.
|
|
75
87
|
*/
|
|
76
|
-
export declare const toggleReferenceInFormula: (calc: ICalculation, value: string, caret: number, home?: Partial<IRange.CellCoords>) => {
|
|
88
|
+
export declare const toggleReferenceInFormula: (calc: ICalculation, value: string, caret: number, home?: Partial<IRange.CellCoords>) => Promise<{
|
|
77
89
|
value: string;
|
|
78
90
|
caret: number;
|
|
79
|
-
} | null
|
|
91
|
+
} | null>;
|
|
80
92
|
//# sourceMappingURL=formulaText.d.ts.map
|
|
@@ -75,6 +75,26 @@ export interface ArgRow {
|
|
|
75
75
|
* shape today (every repeating group is the last parameter).
|
|
76
76
|
*/
|
|
77
77
|
export declare const toArgRows: (params: readonly IFunction.IParameterType[], filled?: readonly string[]) => ArgRow[];
|
|
78
|
+
/** One argument of a call: the function, and the declared parameter the argument fills. */
|
|
79
|
+
export interface FormulaArgument {
|
|
80
|
+
/** The function called. */
|
|
81
|
+
fn: IFunction;
|
|
82
|
+
/** The declared parameter the argument fills — a group's SLOT (see {@link paramAtArg}), not the group. */
|
|
83
|
+
param: IFunction.IParameterType;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The declared parameter that the argument at `argIndex` fills, walking the parameters as a call
|
|
87
|
+
* spells them out: a plain parameter is one position, and a rest parameter or repeating group cycles
|
|
88
|
+
* through its slots from where it starts.
|
|
89
|
+
*
|
|
90
|
+
* @returns `null` for a negative index, or one past the last parameter of a declaration with no rest
|
|
91
|
+
* parameter or group.
|
|
92
|
+
*
|
|
93
|
+
* @remarks
|
|
94
|
+
* A parameter declared AFTER a group (`SWITCH`'s `default`) is never the answer: a position alone
|
|
95
|
+
* cannot say where the repetitions end, so the group keeps it — as the signature does.
|
|
96
|
+
*/
|
|
97
|
+
export declare const paramAtArg: (params: readonly IFunction.IParameterType[], argIndex: number) => IFunction.IParameterType | null;
|
|
78
98
|
/** Options for {@link assembleCall}. */
|
|
79
99
|
export interface AssembleCallOptions {
|
|
80
100
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './SheetEditable';
|
|
2
|
+
export * from './validationAlert';
|
|
2
3
|
export * from './formulaText';
|
|
3
4
|
export * from './formulaEval';
|
|
4
5
|
export * from './useReferenceMode';
|
|
@@ -9,10 +10,13 @@ export * from './FunctionPreviewPanel';
|
|
|
9
10
|
export * from './functionHint';
|
|
10
11
|
export * from './functionArgs';
|
|
11
12
|
export * from './NamedItemsPanel';
|
|
13
|
+
export * from './NamedItemLabel';
|
|
12
14
|
export * from './NamedHintPanel';
|
|
13
15
|
export * from './EditorCommands';
|
|
14
|
-
export * from './
|
|
16
|
+
export * from './useEditRejectedNotice';
|
|
15
17
|
export * from './SheetCellEditorLayer';
|
|
18
|
+
export * from './SheetCellEditorStartLayer';
|
|
19
|
+
export * from './VirtualKeyboardLayer';
|
|
16
20
|
export * from './SheetReferenceLayer';
|
|
17
21
|
export * from './SheetReferenceHeaderLayer';
|
|
18
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { RangeCoords } from '@sheetxl/utils';
|
|
2
|
+
import { ICalculation, ICell, IRange, IWorksheet } from '@sheetxl/sdk';
|
|
3
|
+
/**
|
|
4
|
+
* The text a range picked on the grid writes into a formula edited at `cell` — shared by the cell
|
|
5
|
+
* editor's two picker write-backs (re-scope and insert) so a pick writes the same text however it
|
|
6
|
+
* was made. Precedence is Excel's: a name, then a spill, then an address.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The address text for a picked range, as it must appear **in the formula**.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* Bare (`A1:B2`) when the range lives on the edited cell's OWN sheet — Excel writes same-sheet references
|
|
13
|
+
* unqualified — and sheet-qualified (`Sheet2!A1:B2`) when it does not. The qualification is driven by the
|
|
14
|
+
* range's `scope`, which is the only thing that distinguishes "row 1, col 1 of the sheet I'm editing" from
|
|
15
|
+
* "row 1, col 1 of the sheet I picked on": without it a cross-sheet pick serializes bare and silently
|
|
16
|
+
* re-reads as a reference to the edited sheet. The sheet name is quoted by the SDK (`'My Sheet'!A1`).
|
|
17
|
+
*/
|
|
18
|
+
export declare const scopedAddress: (cell: ICell, coords: IRange.Coords | IRange.FixableCoords, scope?: string | null) => string;
|
|
19
|
+
/**
|
|
20
|
+
* The NAME a picked range exactly is — `Sales`, `Sales[Amount]`, `Sales[[#All],[Amount]]` — or `null`
|
|
21
|
+
* when it is not any named thing.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* Excel writes structured references when you point inside a table, and names for a range that is
|
|
25
|
+
* one; this is that. Asked of the edited cell's SHEET (so only names a formula there can refer to are
|
|
26
|
+
* offered, and unqualified coords read on the right sheet), and always exact — a selection *inside*
|
|
27
|
+
* `Sales` is not `Sales`, so a partial pick still writes an address.
|
|
28
|
+
*
|
|
29
|
+
* Reference-index alignment is safe by construction rather than by a guard: a match has to coincide
|
|
30
|
+
* with the picked range, and the picked range is a single rectangle, so a multi-range name can never
|
|
31
|
+
* match one — the substituted text always holds exactly the one reference the address held.
|
|
32
|
+
*
|
|
33
|
+
* `$` flags are deliberately not carried: a name has no absolute/relative form to preserve, which is
|
|
34
|
+
* also why F4 does nothing on one (matching Excel).
|
|
35
|
+
*/
|
|
36
|
+
export declare const namedReference: (cell: ICell, to: RangeCoords) => string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Whether `range` is exactly a dynamic array's spill, so a pick of it can be written `D2#`.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Not a single cell (a 1×1 spill is its anchor's address), an array-entered block or a blocked spill.
|
|
42
|
+
*
|
|
43
|
+
* @param sheet Any sheet of the workbook — resolves `range.scope` (its own sheet when unscoped).
|
|
44
|
+
*/
|
|
45
|
+
export declare const isSpillExtent: (sheet: IWorksheet, range: RangeCoords) => boolean;
|
|
46
|
+
/**
|
|
47
|
+
* The spill reference (`D2#`) a picked range exactly is, or `null`.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* Only a dynamic array's spill: a legacy array-entered block (`fixed`) and a blocked spill (`error`)
|
|
51
|
+
* have no `#` form. A single cell is never one — a 1×1 spill is just its anchor's address. Exact, like
|
|
52
|
+
* {@link namedReference}: the pick must coincide with the whole extent, so its top-left is the anchor.
|
|
53
|
+
*
|
|
54
|
+
* The extent is computed state, so this matches the last calculation — which is also what the user
|
|
55
|
+
* sees on the grid while picking. {@link expandSpillAnchors} is the reverse.
|
|
56
|
+
*
|
|
57
|
+
* @param flags The `$` style to give the anchor, from its start corner (a re-scope keeps the
|
|
58
|
+
* reference's original style, as it does for an address).
|
|
59
|
+
*/
|
|
60
|
+
export declare const spillReference: (cell: ICell, to: RangeCoords, flags?: IRange.FixableCoords) => string | null;
|
|
61
|
+
/**
|
|
62
|
+
* The highlight ranges of a parsed formula with every spill reference (`C1#`) widened from its anchor
|
|
63
|
+
* to the extent it reads.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* A formula's references report a spill reference as its anchor cell, so without this `C1#` lights up
|
|
67
|
+
* one cell, and a drag of the picked extent (which writes `C1#`) snaps back to it. Any live block
|
|
68
|
+
* widens, array-entered ones included, since `J1#` reads those too; an anchor with no block stays as
|
|
69
|
+
* it is (it evaluates `#REF!`).
|
|
70
|
+
*
|
|
71
|
+
* @param sheet Any sheet of the workbook — resolves each range's scope.
|
|
72
|
+
* @param tokens The formula's tokens; the `#` anchor token carries its reference's `referenceIndex`.
|
|
73
|
+
* @param ranges Index-aligned with `referenceIndex`. Returned as-is when nothing widens.
|
|
74
|
+
*/
|
|
75
|
+
export declare const expandSpillAnchors: (sheet: IWorksheet, tokens: readonly ICalculation.FormulaToken[], ranges: (RangeCoords | null)[]) => (RangeCoords | null)[];
|
|
76
|
+
//# sourceMappingURL=pickedReference.d.ts.map
|