@sheetxl/sdk 0.8.0-beta.1 → 0.8.0-beta.2
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/THIRD-PARTY-NOTICES.md +1 -1
- package/browser/cjs/4f5eoQQfV-V7LO2_.cjs +1 -0
- package/browser/cjs/BEnEDC1m546-gzWS.cjs +1 -0
- package/browser/cjs/CwCUa4IzGNGissLL.cjs +1 -0
- package/browser/cjs/{a0Z-SXs_N71CtqYb.cjs → Dg3GaW0QWwnlqetX.cjs} +1 -1
- package/browser/cjs/KWQPie2u7AP69web.cjs +93 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{B0HS42a7lga1k1U_.mjs → BJ9hcZAGY8Tj5_9L.mjs} +1 -1
- package/browser/esm/C8vpA2ZBtZf6w4nq.mjs +394 -0
- package/browser/esm/DDojiE2-oycJ7qGi.mjs +20 -0
- package/browser/esm/DEPT7zmpiMdZ-_qC.mjs +70253 -0
- package/browser/esm/DOvCi3lf49To36WP.mjs +8 -0
- package/browser/esm/{uyWBMSIxMlt8n5Z3.mjs → Dq3sc4B_HQHBrT5N.mjs} +2 -2
- package/browser/esm/index.mjs +871 -696
- package/browser/esm/{DlPMeIyxT9tG_WDk.mjs → trwZArJQQq7K9kL7.mjs} +2 -2
- package/licenses/dependencies.txt +204 -204
- package/node/esm/CGWsQOMWdnDeF4dX.mjs +8 -0
- package/node/esm/{Cku7XiUvw1xrRasi.mjs → CL9MI-b6D9BmtVXW.mjs} +1 -1
- package/node/esm/CressiwiIhxCVp1v.mjs +28 -0
- package/node/esm/O2cOO3xIynWUgOWe.mjs +403 -0
- package/node/esm/index.mjs +52356 -37345
- package/package.json +6 -7
- package/resources/locales/de/model.msg.json +45 -9
- package/resources/locales/en/model.msg.json +42 -9
- package/types/scripting-api.json +7093 -0
- package/types/scripting-enums.json +54 -8
- package/types/scripting.d.ts +7006 -1202
- package/types/src/anchored/AbstractAnchored.d.ts +18 -8
- package/types/src/anchored/AnchoredMap.d.ts +2 -0
- package/types/src/anchored/IAnchoredMap.d.ts +52 -4
- package/types/src/autoFill/AutoFill.d.ts +316 -32
- package/types/src/autoFill/IAutoFill.d.ts +232 -15
- package/types/src/border/{IBorder.d.ts → IBorders.d.ts} +41 -40
- package/types/src/border/index.d.ts +1 -1
- package/types/src/calculation/Calculation.d.ts +740 -35
- package/types/src/calculation/ExternalBookBindings.d.ts +118 -0
- package/types/src/calculation/FormulaText.d.ts +74 -0
- package/types/src/calculation/ICalculation.d.ts +318 -81
- package/types/src/calculation/INamedFormulasCollection.d.ts +5 -8
- package/types/src/calculation/NamedFormulaCollection.d.ts +139 -107
- package/types/src/calculation/NamedLambdaFunction.d.ts +28 -0
- package/types/src/calculation/TokenType.d.ts +9 -0
- package/types/src/calculation/Types.d.ts +83 -2
- package/types/src/calculation/_CloneBoundary.d.ts +80 -0
- package/types/src/calculation/compiler/ASTTypes.d.ts +58 -0
- package/types/src/calculation/compiler/CompilerUtils.d.ts +134 -12
- package/types/src/calculation/compiler/FormulaCompiler.d.ts +29 -4
- package/types/src/calculation/compiler/FormulaParser.d.ts +1 -2
- package/types/src/calculation/compiler/LiteTransform.d.ts +17 -0
- package/types/src/calculation/compiler/ParserUtils.d.ts +26 -1
- package/types/src/calculation/compiler/SRParser.d.ts +2 -1
- package/types/src/calculation/compiler/Types.d.ts +79 -9
- package/types/src/calculation/executor/CalcExecutor.d.ts +312 -33
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +43 -2
- package/types/src/calculation/executor/CircularReference.d.ts +2 -0
- package/types/src/calculation/formula/Formula.d.ts +58 -21
- package/types/src/calculation/formula/FormulaBlock.d.ts +124 -21
- package/types/src/calculation/formula/FormulaRecordView.d.ts +79 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +261 -67
- package/types/src/calculation/formula/LambdaValue.d.ts +15 -16
- package/types/src/calculation/formula/LazyValue.d.ts +96 -0
- package/types/src/calculation/formula/TokenUtils.d.ts +25 -1
- package/types/src/calculation/formula/index.d.ts +1 -0
- package/types/src/calculation/functions/FunctionDeclarations.d.ts +31 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +15 -2
- package/types/src/calculation/grid/CalcGrid.d.ts +384 -158
- package/types/src/calculation/grid/CalcGridBackend.d.ts +450 -0
- package/types/src/calculation/grid/CalcGridProxy.d.ts +133 -0
- package/types/src/calculation/grid/CalcGridUtils.d.ts +62 -12
- package/types/src/calculation/grid/FormulaEntry.d.ts +129 -0
- package/types/src/calculation/grid/FormulaHost.d.ts +236 -0
- package/types/src/calculation/grid/ICalcGrid.d.ts +456 -143
- package/types/src/calculation/grid/_CalcRequest.d.ts +272 -0
- package/types/src/calculation/grid/index.d.ts +4 -0
- package/types/src/calculation/index.d.ts +2 -0
- package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +6 -2
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +339 -11
- package/types/src/calculation/spatial/SpillEntry.d.ts +20 -5
- package/types/src/calculation/spatial/TouchedWindows.d.ts +86 -0
- package/types/src/calculation/spatial/index.d.ts +1 -0
- package/types/src/calculation/state/CalcInputs.d.ts +41 -0
- package/types/src/calculation/state/CalcNode.d.ts +141 -30
- package/types/src/calculation/state/CalcScope.d.ts +37 -0
- package/types/src/calculation/state/CalcState.d.ts +22 -1
- package/types/src/calculation/state/CalculationContext.d.ts +36 -2
- package/types/src/calculation/state/IContextContainer.d.ts +129 -27
- package/types/src/calculation/state/_PendingOverlayGrid.d.ts +163 -0
- package/types/src/calculation/state/_ReadObservedGrid.d.ts +74 -8
- package/types/src/calculation/state/index.d.ts +1 -0
- package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +80 -0
- package/types/src/calculation/symbol/ISymbolRegistry.d.ts +23 -0
- package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts +16 -2
- package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +63 -3
- package/types/src/calculation/symbol/SymbolRegistry.d.ts +20 -0
- package/types/src/calculation/symbol/index.d.ts +3 -2
- package/types/src/cell/ICell.d.ts +78 -23
- package/types/src/cell/ICellProtection.d.ts +50 -10
- package/types/src/cellRange/ICellRange.d.ts +329 -72
- package/types/src/cellRange/ICellRanges.d.ts +9 -7
- package/types/src/chart/Chart.d.ts +72 -2
- package/types/src/chart/ChartCollection.d.ts +26 -0
- package/types/src/chart/IChart.d.ts +162 -9
- package/types/src/chart/IChartCollection.d.ts +25 -0
- package/types/src/chart/_ChartXml.d.ts +70 -0
- package/types/src/chart/index.d.ts +1 -3
- package/types/src/collections/ArraysGrid.d.ts +1 -1
- package/types/src/collections/IGrid.d.ts +1 -1
- package/types/src/collections/ISparseGrid.d.ts +9 -0
- package/types/src/collections/ISpatialMap.d.ts +59 -21
- package/types/src/collections/ImmutableList.d.ts +28 -0
- package/types/src/collections/MixedTypedArrayList.d.ts +168 -108
- package/types/src/collections/OverlappingRangeIterator.d.ts +13 -17
- package/types/src/collections/RepeatingList.d.ts +7 -0
- package/types/src/collections/ScalarGrid.d.ts +50 -0
- package/types/src/collections/SparseGrid.d.ts +1 -1
- package/types/src/collections/SpatialMap.d.ts +13 -21
- package/types/src/collections/Tuple.d.ts +128 -16
- package/types/src/collections/_GridUtils.d.ts +19 -6
- package/types/src/collections/_RangeSweep.d.ts +97 -0
- package/types/src/collections/_SpatialUtils.d.ts +20 -2
- package/types/src/collections/index.d.ts +1 -0
- package/types/src/comment/Comment.d.ts +159 -0
- package/types/src/comment/CommentCollection.d.ts +40 -0
- package/types/src/comment/IComment.d.ts +319 -48
- package/types/src/comment/ICommentCollection.d.ts +90 -0
- package/types/src/comment/_CommentUtils.d.ts +28 -0
- package/types/src/comment/index.d.ts +1 -0
- package/types/src/condition/AnchoredConditional.d.ts +76 -17
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +8 -7
- package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +2 -1
- package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +3 -6
- package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +1 -1
- package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +7 -0
- package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +9 -0
- package/types/src/condition/Condition.d.ts +16 -0
- package/types/src/condition/ICondition.d.ts +86 -33
- package/types/src/condition/_ConditionFormula.d.ts +152 -0
- package/types/src/condition/_ConditionUtils.d.ts +73 -10
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +21 -10
- package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +19 -8
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +5 -3
- package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +2 -0
- package/types/src/dataValidation/DataValidation.d.ts +50 -3
- package/types/src/dataValidation/DataValidationCollection.d.ts +20 -9
- package/types/src/dataValidation/IDataValidation.d.ts +119 -30
- package/types/src/dataValidation/IDataValidationCollection.d.ts +10 -2
- package/types/src/date/DateUtils.d.ts +20 -0
- package/types/src/date/_DateUtils.d.ts +91 -7
- package/types/src/externalBook/ExternalBookCollection.d.ts +145 -12
- package/types/src/externalBook/ExternalBookName.d.ts +96 -0
- package/types/src/externalBook/IExternalBook.d.ts +170 -18
- package/types/src/externalBook/IExternalBookCollection.d.ts +79 -7
- package/types/src/externalBook/index.d.ts +1 -0
- package/types/src/fill/IStroke.d.ts +1 -1
- package/types/src/filter/IFilter.d.ts +29 -4
- package/types/src/font/IFont.d.ts +17 -0
- package/types/src/history/IHistory.d.ts +3 -2
- package/types/src/i18n/LanguagePack.d.ts +12 -4
- package/types/src/index.d.ts +3 -0
- package/types/src/io/AbstractBackingStore.d.ts +24 -1
- package/types/src/io/ArrayBackingStore.d.ts +1 -1
- package/types/src/io/EmbeddedPart.d.ts +20 -0
- package/types/src/io/IEmbeddedPart.d.ts +63 -0
- package/types/src/io/IWorkbookIO.d.ts +185 -18
- package/types/src/io/WorkbookIO.d.ts +9 -0
- package/types/src/io/WorkbookOrigin.d.ts +20 -11
- package/types/src/io/WorkbookOriginProvider.d.ts +46 -0
- package/types/src/io/_XmlFragment.d.ts +49 -0
- package/types/src/io/index.d.ts +1 -0
- package/types/src/lib/file/file.browser.d.ts +19 -5
- package/types/src/lib/file/file.node.d.ts +5 -0
- package/types/src/lib/utils/_Utils.d.ts +11 -0
- package/types/src/lib/utils/utils.browser.d.ts +9 -3
- package/types/src/license/license-key.d.ts +27 -0
- package/types/src/listener/IListener.d.ts +12 -7
- package/types/src/listener/ListenerEmitter.d.ts +46 -5
- package/types/src/model/AbstractModel.d.ts +14 -5
- package/types/src/movable/Control.d.ts +57 -0
- package/types/src/movable/IControl.d.ts +84 -0
- package/types/src/movable/IMovable.d.ts +23 -1
- package/types/src/movable/IMovableCollection.d.ts +2 -0
- package/types/src/movable/Movable.d.ts +4 -6
- package/types/src/movable/MovableCollection.d.ts +7 -7
- package/types/src/movable/index.d.ts +4 -0
- package/types/src/named/AbstractNamed.d.ts +1 -1
- package/types/src/named/INamed.d.ts +4 -1
- package/types/src/named/INamedCollection.d.ts +26 -0
- package/types/src/named/NamedCollection.d.ts +16 -15
- package/types/src/numFmt/BuiltInFormats.d.ts +15 -7
- package/types/src/numFmt/IFormatEngine.d.ts +2 -0
- package/types/src/numFmt/NumfmtFormatEngine.d.ts +2 -0
- package/types/src/person/IPerson.d.ts +99 -0
- package/types/src/person/IPersonCollection.d.ts +51 -0
- package/types/src/person/Person.d.ts +32 -0
- package/types/src/person/PersonCollection.d.ts +49 -0
- package/types/src/person/index.d.ts +3 -0
- package/types/src/picture/IPicture.d.ts +2 -0
- package/types/src/picture/Picture.d.ts +2 -0
- package/types/src/pivot/IPivotTable.d.ts +107 -0
- package/types/src/pivot/IPivotTableCollection.d.ts +25 -0
- package/types/src/pivot/PivotTable.d.ts +57 -0
- package/types/src/pivot/PivotTableCollection.d.ts +25 -0
- package/types/src/pivot/index.d.ts +6 -0
- package/types/src/primitives/CompositeRangeStats.d.ts +2 -0
- package/types/src/primitives/Criteria.d.ts +1 -1
- package/types/src/primitives/LambdaBrand.d.ts +21 -0
- package/types/src/primitives/PrimitiveUtils.d.ts +56 -19
- package/types/src/primitives/Range.d.ts +102 -24
- package/types/src/primitives/RangeStats.d.ts +24 -1
- package/types/src/primitives/ReferenceRange.d.ts +42 -0
- package/types/src/primitives/Runtime.d.ts +15 -2
- package/types/src/primitives/stats/FrequencyStats.d.ts +9 -0
- package/types/src/primitives/stats/LookupIndex.d.ts +46 -0
- package/types/src/primitives/stats/SortedNumbers.d.ts +2 -0
- package/types/src/primitives/stats/index.d.ts +1 -0
- package/types/src/print/IPrint.d.ts +0 -22
- package/types/src/protectedRange/IProtectedRange.d.ts +4 -0
- package/types/src/protectedRange/IProtectedRangeCollection.d.ts +2 -0
- package/types/src/protectedRange/ProtectedRange.d.ts +1 -4
- package/types/src/protectedRange/ProtectedRangeCollection.d.ts +19 -8
- package/types/src/protection/DefaultProtection.d.ts +12 -1
- package/types/src/protection/IProtection.d.ts +36 -2
- package/types/src/reference/ReferenceUtils.d.ts +80 -0
- package/types/src/reference/index.d.ts +2 -0
- package/types/src/resource/IResource.d.ts +21 -1
- package/types/src/resource/IResourceCollection.d.ts +9 -1
- package/types/src/resource/ResourceCollection.d.ts +6 -6
- package/types/src/scripting/FunctionCollection.d.ts +41 -11
- package/types/src/scripting/IFunctionCollection.d.ts +41 -0
- package/types/src/scripting/IModule.d.ts +25 -0
- package/types/src/scripting/IModuleCollection.d.ts +17 -0
- package/types/src/scripting/IScript.d.ts +18 -0
- package/types/src/scripting/Module.d.ts +34 -6
- package/types/src/scripting/ModuleCollection.d.ts +17 -12
- package/types/src/scripting/Runtime.d.ts +15 -0
- package/types/src/scripting/Scripts.d.ts +2 -0
- package/types/src/scripting/TypedFunction.d.ts +151 -18
- package/types/src/scripting/_FunctionIndex.d.ts +5 -0
- package/types/src/scripting/_ModuleUtils.d.ts +11 -1
- package/types/src/scripting/_ScriptUtils.d.ts +3 -0
- package/types/src/scripting/declarations.browser.d.ts +10 -0
- package/types/src/scripting/declarations.d.ts +49 -0
- package/types/src/scripting/declarations.node.d.ts +9 -0
- package/types/src/scripting/index.d.ts +3 -0
- package/types/src/selection/IRangeSelection.d.ts +9 -4
- package/types/src/selection/RangeSelection.d.ts +2 -0
- package/types/src/shape/IShape.d.ts +41 -3
- package/types/src/shape/Shape.d.ts +10 -0
- package/types/src/shape/_ShapeXml.d.ts +28 -0
- package/types/src/sheet/CellRegion.d.ts +6 -0
- package/types/src/sheet/ICellContainerOptions.d.ts +50 -0
- package/types/src/sheet/ISheet.d.ts +224 -41
- package/types/src/sheet/ISheetCollection.d.ts +2 -5
- package/types/src/sheet/NamedCellRange.d.ts +16 -7
- package/types/src/sheet/Sheet.d.ts +749 -114
- package/types/src/sheet/SheetCell.d.ts +81 -21
- package/types/src/sheet/SheetCollection.d.ts +19 -8
- package/types/src/sheet/SheetRange.d.ts +62 -14
- package/types/src/sheet/SheetRanges.d.ts +4 -6
- package/types/src/sheet/_CellBuffer.d.ts +214 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +5 -5
- package/types/src/sheet/_ListenerAnchor.d.ts +104 -0
- package/types/src/sheet/_RangeStateSweep.d.ts +16 -0
- package/types/src/sheet/_ScalarListFactory.d.ts +61 -0
- package/types/src/sheet/_SheetAutoFillUtils.d.ts +74 -0
- package/types/src/sheet/_SheetAutoFitUtils.d.ts +2 -2
- package/types/src/sheet/_SheetEvents.d.ts +43 -0
- package/types/src/sheet/_SheetFilterUtils.d.ts +32 -1
- package/types/src/sheet/_SheetIntents.d.ts +250 -0
- package/types/src/sheet/_SheetMutations.d.ts +179 -59
- package/types/src/sheet/_SheetStateReader.d.ts +16 -10
- package/types/src/sheet/_SheetStateTypes.d.ts +57 -73
- package/types/src/sheet/_SheetUtils.d.ts +2 -18
- package/types/src/sheet/_WatchAnchor.d.ts +93 -0
- package/types/src/sheet/spatial/HeldFormulaEntry.d.ts +36 -0
- package/types/src/sheet/spatial/index.d.ts +1 -0
- package/types/src/sheet/style/SheetCellStyle.d.ts +91 -64
- package/types/src/sheet/style/SheetDirectStyle.d.ts +16 -5
- package/types/src/sheet/style/_Resolvers.d.ts +5 -3
- package/types/src/sheet/style/_StyleUtils.d.ts +37 -7
- package/types/src/sheetHeader/ISheetHeader.d.ts +2 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +14 -0
- package/types/src/sheetProtection/ISheetProtection.d.ts +41 -7
- package/types/src/sheetProtection/SheetProtection.d.ts +12 -0
- package/types/src/sheetView/ISheetView.d.ts +45 -1
- package/types/src/sheetView/SheetView.d.ts +11 -0
- package/types/src/slicer/ISlicer.d.ts +2 -0
- package/types/src/slicer/Slicer.d.ts +2 -0
- package/types/src/sort/ISort.d.ts +2 -0
- package/types/src/string/IStringCollection.d.ts +5 -0
- package/types/src/string/StringCollection.d.ts +6 -6
- package/types/src/style/INamedStyleCollection.d.ts +72 -0
- package/types/src/style/IStyle.d.ts +30 -10
- package/types/src/style/IStyleCollection.d.ts +63 -42
- package/types/src/style/ITableStyleCollection.d.ts +89 -0
- package/types/src/style/NamedStyleCollection.d.ts +39 -0
- package/types/src/style/StyleCollection.d.ts +41 -5
- package/types/src/style/TableStyleCollection.d.ts +49 -0
- package/types/src/style/_BuiltInStyleDefs.d.ts +3 -3
- package/types/src/style/index.d.ts +4 -0
- package/types/src/table/AnchoredTable.d.ts +644 -68
- package/types/src/table/AutoTable.d.ts +5 -5
- package/types/src/table/ITable.d.ts +228 -30
- package/types/src/table/ITableCollection.d.ts +2 -0
- package/types/src/table/TableCollection.d.ts +19 -8
- package/types/src/table/_FilterField.d.ts +7 -5
- package/types/src/table/_NamedTable.d.ts +17 -1
- package/types/src/table/_NamedTableSource.d.ts +1 -0
- package/types/src/table/_SortField.d.ts +2 -0
- package/types/src/table/_TableColumn.d.ts +13 -2
- package/types/src/table/_TableMessages.d.ts +1 -0
- package/types/src/table/_TableUtils.d.ts +40 -0
- package/types/src/text/Bullet.d.ts +4 -0
- package/types/src/text/ITextFrame.d.ts +25 -1
- package/types/src/text/TextBoxAlignment.d.ts +15 -6
- package/types/src/text/TextFrame.d.ts +4 -0
- package/types/src/text/TextLine.d.ts +4 -0
- package/types/src/text/TextParagraph.d.ts +4 -0
- package/types/src/text/TextRun.d.ts +9 -0
- package/types/src/text/TextStacked.d.ts +83 -0
- package/types/src/text/index.d.ts +1 -0
- package/types/src/theme/ITheme.d.ts +2 -0
- package/types/src/theme/IThemeCollection.d.ts +2 -0
- package/types/src/theme/ThemeCollection.d.ts +8 -7
- package/types/src/transaction/ITransaction.d.ts +238 -36
- package/types/src/transaction/Transaction.d.ts +99 -11
- package/types/src/type/AbstractCollection.d.ts +101 -0
- package/types/src/type/ICollection.d.ts +117 -0
- package/types/src/type/ITypes.d.ts +9 -7
- package/types/src/type/index.d.ts +1 -0
- package/types/src/utils/_CSSUtils.d.ts +3 -3
- package/types/src/workbook/IWorkbook.d.ts +171 -40
- package/types/src/workbook/Workbook.d.ts +103 -7
- package/types/src/workbook/_WorkbookIntents.d.ts +36 -0
- package/types/src/workbookProtection/IWorkbookProtection.d.ts +7 -0
- package/types/src/workbookProtection/WorkbookProtection.d.ts +3 -0
- package/types/src/workbookView/IWorkbookView.d.ts +12 -0
- package/types/src/workbookView/WorkbookView.d.ts +5 -0
- package/browser/cjs/BatsV2UUraVDCRXm.cjs +0 -57
- package/browser/cjs/CUz53T65cRGQRgvv.cjs +0 -33
- package/browser/cjs/DU0kYUtdFa3jK-im.cjs +0 -1
- package/browser/cjs/Dv4yIPLV98M5zLHa.cjs +0 -1
- package/browser/esm/6JKSOvc5czaQB2Bj.mjs +0 -109
- package/browser/esm/BtuJ9AGzeURtAsGo.mjs +0 -51241
- package/browser/esm/DGU6sM25u0EWCKl1.mjs +0 -824
- package/browser/esm/f2G3QRgEbvFJcoa2.mjs +0 -4436
- package/node/esm/-pxdn3M3tc6PLHs7.mjs +0 -114
- package/node/esm/0n5bslM9jhO1JnI2.mjs +0 -843
- package/types/src/cellRange/_GraphNode.d.ts +0 -38
- package/types/src/dataValidation/_Utils.d.ts +0 -10
- package/types/src/sheet/listener/RangesListener.d.ts +0 -32
- package/types/src/sheet/listener/RangesListenerEntry.d.ts +0 -19
- package/types/src/sheet/listener/index.d.ts +0 -3
|
@@ -12,6 +12,39 @@ export declare function anchorCompareValues(a: ISpatialMap.Entry<FormulaSpatialV
|
|
|
12
12
|
* @param range The range to compare
|
|
13
13
|
*/
|
|
14
14
|
export declare function isTopLeft(rowIndex: number, colIndex: number, range: IRange.Coords): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Keeps a grid's error index — `errorSpatial`, what `ICalcGrid.hasErrorIn` answers from — in
|
|
17
|
+
* step with a write of `tuples` into its values grid: every written run leaves the index, then
|
|
18
|
+
* each error member written re-enters it (a run of like errors as one entry).
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* EVERY write into a calc grid's values goes through this or {@link indexWrittenRuns} — inputs,
|
|
22
|
+
* load, the calc commit, spills, a moved block — because the index is what a reference's
|
|
23
|
+
* `hasError` trusts instead of scanning; a missed write is a stale answer, which the
|
|
24
|
+
* reference's verification mode (`_setReferenceErrorIndexAssert`) catches in tests. Errors are
|
|
25
|
+
* rare, so the common write pays an emptiness check per run plus a scan of what it wrote.
|
|
26
|
+
*/
|
|
27
|
+
export declare function indexWrittenTuples(errorSpatial: ISpatialMap<string>, tuples: Tuple.GridTuple<Scalar> | null | undefined, isColumn: boolean): void;
|
|
28
|
+
/**
|
|
29
|
+
* The cells of `tuples` that hold an error VALUE, as entries for the model's index of them
|
|
30
|
+
* (`true` = an error value lives here, whichever error it is).
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Read from what was WRITTEN, not from what the caller meant to write: a value the write path
|
|
34
|
+
* normalizes on its way in (a `NaN` becoming `#NUM!`) is an error by the time it reaches the run,
|
|
35
|
+
* and a check made before that normalization misses it. The engine keeps its own index of the
|
|
36
|
+
* same cells per label ({@link indexWrittenTuples}); this one says only that there is one.
|
|
37
|
+
*/
|
|
38
|
+
export declare function errorValueEntries(tuples: Tuple.GridTuple<Scalar> | null | undefined, isColumn: boolean): ISpatialMap.Entry<boolean>[];
|
|
39
|
+
/** The {@link errorValueEntries} of a whole values grid: one scan, for the reconciled view. */
|
|
40
|
+
export declare function errorValueEntriesOf(grid: ISparseGrid<Scalar>): ISpatialMap.Entry<boolean>[];
|
|
41
|
+
/**
|
|
42
|
+
* The {@link indexWrittenTuples} of a region written some other way (a block copied in): the
|
|
43
|
+
* region leaves the index and its runs are re-read for errors.
|
|
44
|
+
*/
|
|
45
|
+
export declare function indexWrittenRuns(errorSpatial: ISpatialMap<string>, grid: ISparseGrid<Scalar>, bounds: IRange.Coords): void;
|
|
46
|
+
/** Removes a cleared region from the error index (a spill's old extent, a deleted range). */
|
|
47
|
+
export declare function clearErrorIndex(errorSpatial: ISpatialMap<string>, coords: IRange.Coords): void;
|
|
15
48
|
/**
|
|
16
49
|
* Updates contentful and invalidates spills.
|
|
17
50
|
*
|
|
@@ -27,20 +60,22 @@ circularSpatial?: ISpatialMap<CircularEntry>): IRange.Coords | null;
|
|
|
27
60
|
* @remarks
|
|
28
61
|
* This is here because of the ILikeLike dependency.
|
|
29
62
|
*/
|
|
30
|
-
export declare function tuplesToA1Map<T = any>(boundedTuples: Tuple.
|
|
63
|
+
export declare function tuplesToA1Map<T = any>(boundedTuples: Tuple.Region<T> | undefined, axis?: IRange.Axis): Map<string, T>;
|
|
31
64
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* can be bulk-loaded into precedentSpatial in one pass.
|
|
65
|
+
* Adds one dynamic precedent to a block-keyed accumulator: the executor's per-cycle pending map, or
|
|
66
|
+
* the map fromJSON hydration builds for saved spill ranges before bulk-loading it into
|
|
67
|
+
* precedentSpatial.
|
|
36
68
|
*
|
|
37
69
|
* @remarks
|
|
38
|
-
*
|
|
39
|
-
* shape the dynamic registry (`IContextContainer.getDynamics`) can
|
|
40
|
-
* a block — an edit, a named recompile — evicts its dynamics through
|
|
41
|
-
* an unregistered entry would leave it behind in precedentSpatial
|
|
42
|
-
* dirty walk still reaches it, collects the dead block's CalcNodes
|
|
43
|
-
* and the value builder then sees one cell pushed twice
|
|
70
|
+
* One entry per (block, kind, grid); another range of the same kind on the same grid grows that
|
|
71
|
+
* entry's bounding box. That is the shape the dynamic registry (`IContextContainer.getDynamics`) can
|
|
72
|
+
* express. Anything that replaces a block — an edit, a named recompile — evicts its dynamics through
|
|
73
|
+
* that map, so a block holding an unregistered entry would leave it behind in precedentSpatial
|
|
74
|
+
* pointing at the dead block. The dirty walk still reaches it, collects the dead block's CalcNodes
|
|
75
|
+
* alongside the live replacement's, and the value builder then sees one cell pushed twice
|
|
76
|
+
* (`OutOfOrderError`).
|
|
77
|
+
*
|
|
78
|
+
* Without a `range` the node's own cell stands in; without a scope the range is on the node's grid.
|
|
44
79
|
*/
|
|
45
80
|
export declare function addDynamicPrecedent(entries: Map<FormulaSpatialValue, ISpatialMap.Entry<PrecedentSpatialValue>[]>, node: CalcNode, range: IRange.Coords | undefined, kind: PrecedentKind): void;
|
|
46
81
|
/**
|
|
@@ -67,12 +102,17 @@ export interface EndpointAbs {
|
|
|
67
102
|
$absRowEnd: boolean;
|
|
68
103
|
}
|
|
69
104
|
/**
|
|
70
|
-
* TODO -
|
|
105
|
+
* TODO - CalcGridBackend.fromJSON has this code
|
|
71
106
|
*/
|
|
72
107
|
export declare function addPrecedents(asEntry: ISpatialMap.Entry<FormulaSpatialValue>, precedentsInsert: ISpatialMap.Entry<PrecedentSpatialValue>[], precedentsRet?: IRange.Coords[] | null): void;
|
|
73
108
|
export interface PrecedentFormulaUpdates {
|
|
74
109
|
precedents: ISpatialMap.Updates<PrecedentSpatialValue>;
|
|
75
110
|
formulas: ISpatialMap.Updates<FormulaSpatialValue>;
|
|
111
|
+
/**
|
|
112
|
+
* The formulas whose DYNAMIC precedent the change dropped. They re-register when they next
|
|
113
|
+
* evaluate, but until then no precedent leads the dirty sweep to them.
|
|
114
|
+
*/
|
|
115
|
+
dynamicDependents?: ISpatialMap.Entry<FormulaSpatialValue>[];
|
|
76
116
|
}
|
|
77
117
|
/**
|
|
78
118
|
* Splits precedents at the insertion boundary.
|
|
@@ -158,6 +198,16 @@ export declare function movePrecedents(precedentSpatial: ISpatialMap3D<Precedent
|
|
|
158
198
|
* TODO - document and/or rationalize with visitDependencyBlock
|
|
159
199
|
*/
|
|
160
200
|
export declare const visitPrecedentBlock: (entryBlock: ISpatialMap.Entry<FormulaSpatialValue>, intersect: IRange.Coords, callbackFn: (calc: CalcNode, rowIndex: number, colIndex: number) => void) => void;
|
|
201
|
+
/**
|
|
202
|
+
* Asks every fixed (array-entered) block the shift touches whether it can move whole
|
|
203
|
+
* (`SpillEntry.checkShift`) and throws `ExpectedError` for the first that cannot.
|
|
204
|
+
*
|
|
205
|
+
* @remarks
|
|
206
|
+
* Hoisted, not moved: the rule is the node's. It is asked here because {@link markFixedSpills}
|
|
207
|
+
* lifts every spill the shift intersects before the map shifts, so a partially covered block would
|
|
208
|
+
* otherwise never reach `SpillEntry.getShifted`. Run before any state is touched.
|
|
209
|
+
*/
|
|
210
|
+
export declare function checkFixedSpillsShift(spillSpatial: ISpatialMap<SpillEntry>, intersect: IRange.Coords, isColumn: boolean, isInsert: boolean): void;
|
|
161
211
|
/**
|
|
162
212
|
* Finds all spills that intersect a range and removes them for operations.
|
|
163
213
|
*
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { IRange, FormulaError } from '@sheetxl/primitives';
|
|
2
|
+
import { ISpatialMap } from '../../collections';
|
|
3
|
+
import { ICalculation } from '../ICalculation';
|
|
4
|
+
import { ReferenceCoords } from '../Types';
|
|
5
|
+
import { IFormulaBlockView } from '../formula';
|
|
6
|
+
/**
|
|
7
|
+
* A formula the sheet holds: the model's text and the engine's view of the compiled block, one
|
|
8
|
+
* entry per run of cells that share a formula.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* The two halves are owned by different sides. `a1` and `ref` are the MODEL's: the canonical A1
|
|
12
|
+
* text anchored at the run's top-left, the shape the JSON persists, present in every engine state.
|
|
13
|
+
* `block` is the ENGINE's: the read view of the compiled block ({@link IFormulaBlockView}), vended
|
|
14
|
+
* when it compiles the entry, `null` until then. A pending entry (`block === null`) is a legal
|
|
15
|
+
* state at any time; a read that finds no block answers from the text, so nothing about a formula
|
|
16
|
+
* read branches on an engine being present.
|
|
17
|
+
*
|
|
18
|
+
* An entry answers as a block over its own text ({@link IFormulaBlockView}). With a block, every
|
|
19
|
+
* read is the block's. Without one, the text is re-anchored to the asked-for cell by the address
|
|
20
|
+
* emitter: the same rule the write path conflates runs on and the xlsx reader loads with, and
|
|
21
|
+
* measured exact against the compiled block on 144,964 distinct real-world formulas. Tokens and
|
|
22
|
+
* the parse error need a block, so a pending entry answers with none.
|
|
23
|
+
*
|
|
24
|
+
* An entry carries its own `ref`: a cell iterator reuses its coords object, and a sort clears the
|
|
25
|
+
* range before writing captured cells back, so a captured entry has to know where it was.
|
|
26
|
+
*/
|
|
27
|
+
export declare class FormulaEntry implements ISpatialMap.IUpdatableValue<FormulaEntry>, IFormulaBlockView {
|
|
28
|
+
/** Canonical A1 text, no leading `=`, anchored at `ref`'s top-left. See {@link imageAtAnchor}. */
|
|
29
|
+
a1: string;
|
|
30
|
+
/** The run this entry covers. */
|
|
31
|
+
readonly ref: IRange.Coords;
|
|
32
|
+
/** The engine's view of the compiled formula, or `null` while the entry is pending. */
|
|
33
|
+
block: IFormulaBlockView | null;
|
|
34
|
+
/** Lazily derived from `a1`: the address emitter's tokens, anchored at `ref`. */
|
|
35
|
+
private _tokens;
|
|
36
|
+
/** Lazily derived from `a1`: the relative (R1C1) form, the key two entries merge on. */
|
|
37
|
+
private _r1c1;
|
|
38
|
+
constructor(a1: string, ref: IRange.Coords, block: IFormulaBlockView | null);
|
|
39
|
+
/** `true` once the engine has vended a block for this entry. */
|
|
40
|
+
isCompiled(): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Adopt the block the engine vended, and the canonical text it images at the anchor.
|
|
43
|
+
*/
|
|
44
|
+
setBlock(block: IFormulaBlockView | null): void;
|
|
45
|
+
/** The block's text at the anchor: what {@link setBlock} would make of `a1`. */
|
|
46
|
+
imageBlock(block: IFormulaBlockView): string;
|
|
47
|
+
/**
|
|
48
|
+
* Images this entry's own text at its anchor, so every cell of the run reads one way before the
|
|
49
|
+
* compile: `sum(a1)*2` entered reads `sum(A1)*2`, as the cells below it already do.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* The spelling of a REFERENCE is geometry, so the emitter owns it. The spelling of a function
|
|
53
|
+
* is the symbol table's - a called LET / LAMBDA variable, a named lambda and a UDF keep their
|
|
54
|
+
* case - so `sum(` is left as typed until the compile answers for it.
|
|
55
|
+
*
|
|
56
|
+
* The tokens and the relative form are not touched: the image differs from the text only in
|
|
57
|
+
* how it spells a reference, which is what both were derived from.
|
|
58
|
+
*/
|
|
59
|
+
imageAtAnchor(): this;
|
|
60
|
+
/** The relative (R1C1) form of the text: two cells hold the same formula when these match. */
|
|
61
|
+
relativeForm(): string;
|
|
62
|
+
private _emitterTokens;
|
|
63
|
+
/**
|
|
64
|
+
* The text imaged at a cell by the address emitter, with no block.
|
|
65
|
+
*
|
|
66
|
+
* @remarks
|
|
67
|
+
* A relative axis driven below the sheet's origin images `#REF!` for the reference, as the
|
|
68
|
+
* compiled block does; the emitter's own resolver does not bound it.
|
|
69
|
+
*/
|
|
70
|
+
private _emitTextAt;
|
|
71
|
+
/** {@inheritDoc IFormulaBlockView.getTextAt} */
|
|
72
|
+
getTextAt(row: number, column: number, r1c1?: boolean, evalIndex?: number, target?: ICalculation.FormulaTarget): string;
|
|
73
|
+
/** {@inheritDoc IFormulaBlockView.getTokensAt} */
|
|
74
|
+
getTokensAt(row: number, column: number, evalIndex?: number): ICalculation.FormulaToken[];
|
|
75
|
+
/** {@inheritDoc IFormulaBlockView.isReferenceOnly} */
|
|
76
|
+
isReferenceOnly(): boolean;
|
|
77
|
+
/** {@inheritDoc IFormulaBlockView.getError} */
|
|
78
|
+
getError(): FormulaError.Parse | null;
|
|
79
|
+
/** {@inheritDoc IFormulaBlockView.getReferencesAt} */
|
|
80
|
+
getReferencesAt(row: number, column: number): ReferenceCoords[];
|
|
81
|
+
/**
|
|
82
|
+
* A piece of this entry over `coords`, its text re-anchored at the piece's top-left.
|
|
83
|
+
*/
|
|
84
|
+
protected _pieceAt(coords: IRange.Coords): FormulaEntry;
|
|
85
|
+
/** {@inheritDoc ISpatialMap.IUpdatableValue.getSplit} */
|
|
86
|
+
getSplit(destination: readonly [IRange.Coords, IRange.Coords], _axis: IRange.Axis, _offset: number): [FormulaEntry, FormulaEntry];
|
|
87
|
+
/**
|
|
88
|
+
* {@inheritDoc ISpatialMap.IUpdatableValue.getMerged}
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* Two runs merge when their relative forms agree: `=A1*2` at B1 and `=A2*2` at B2 are one
|
|
92
|
+
* formula filled down. The merged entry keeps the top-left's text and block.
|
|
93
|
+
*/
|
|
94
|
+
getMerged(other: FormulaEntry, coords: IRange.Coords, _axis: IRange.Axis): FormulaEntry | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* {@inheritDoc ISpatialMap.IUpdatableValue.getShifted}
|
|
97
|
+
*
|
|
98
|
+
* @remarks
|
|
99
|
+
* The entry moves and its block is cleared: the engine re-images the text of a moved formula
|
|
100
|
+
* (references across the shift boundary, `#REF!`) and vends the result. Until then the entry
|
|
101
|
+
* reads as its pre-shift text at its new cell.
|
|
102
|
+
*/
|
|
103
|
+
getShifted(options: ISpatialMap.ShiftDetails<FormulaEntry>): ISpatialMap.Entry<FormulaEntry> | null;
|
|
104
|
+
/**
|
|
105
|
+
* {@inheritDoc ISpatialMap.IUpdatableValue.copyTo}
|
|
106
|
+
*
|
|
107
|
+
* @remarks
|
|
108
|
+
* A copy is a fill: the text is re-anchored at the destination. A cut keeps its text, which is
|
|
109
|
+
* what a cut formula does for every reference outside the cut; a reference into the cut range
|
|
110
|
+
* moves with it, and the engine's vend carries that.
|
|
111
|
+
*/
|
|
112
|
+
copyTo(destination: IRange.Coords, options?: FormulaEntry.CopyOptions): ISpatialMap.Entry<FormulaEntry> | undefined;
|
|
113
|
+
/** {@inheritDoc ISpatialMap.IUpdatableValue.canTile} */
|
|
114
|
+
canTile(_destination: IRange.Coords, _options?: ISpatialMap.CopyOptions): boolean;
|
|
115
|
+
get [Symbol.toStringTag](): string;
|
|
116
|
+
toString(): string;
|
|
117
|
+
}
|
|
118
|
+
export declare namespace FormulaEntry {
|
|
119
|
+
/**
|
|
120
|
+
* Options for {@link FormulaEntry.copyTo}.
|
|
121
|
+
*/
|
|
122
|
+
interface CopyOptions extends ISpatialMap.CopyOptions {
|
|
123
|
+
/**
|
|
124
|
+
* The range a cut is moving from. A cut keeps its text; a copy re-anchors it.
|
|
125
|
+
*/
|
|
126
|
+
cutFrom?: IRange.Coords;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=FormulaEntry.d.ts.map
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { IRange, IFormulaContext, Scalar } from '@sheetxl/primitives';
|
|
2
|
+
import { ISparseGrid } from '../../collections';
|
|
3
|
+
import { ITransaction } from '../../transaction';
|
|
4
|
+
import { IContextContainer } from '../state';
|
|
5
|
+
import { IFormulaBlockView } from '../formula';
|
|
6
|
+
import { ICalcGrid } from './ICalcGrid';
|
|
7
|
+
import { CalcGrid } from './CalcGrid';
|
|
8
|
+
import { FormulaEntry } from './FormulaEntry';
|
|
9
|
+
/**
|
|
10
|
+
* A grid that holds exactly one formula block.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* A named formula, the editor's in-flight formula and a watch each keep a formula in a grid of
|
|
14
|
+
* their own, so that it can live beside the sheets' formulas in the one graph: precedents, dirty
|
|
15
|
+
* marking, the rewrite a structural change does and undo all reach it the way they reach a cell
|
|
16
|
+
* formula. This is the handle those owners hold: a grid as a sheet holds one, that is in no sheet
|
|
17
|
+
* list. It owns the model's grid ({@link ICalcGrid}, versioned in the model's store as a sheet's
|
|
18
|
+
* is), writes the body through its verbs and reads what the engine answers from it; what the
|
|
19
|
+
* engine pushes after a pass arrives through {@link _onComplete}.
|
|
20
|
+
*/
|
|
21
|
+
export declare class FormulaHost {
|
|
22
|
+
protected readonly _id: string;
|
|
23
|
+
protected readonly _grid: CalcGrid;
|
|
24
|
+
protected readonly _transactions: ITransaction.IStore | null;
|
|
25
|
+
protected readonly _container: IContextContainer;
|
|
26
|
+
protected readonly _context: IFormulaContext;
|
|
27
|
+
/**
|
|
28
|
+
* The body as this side knows it: what was last handed to the grid, refined by what the grid
|
|
29
|
+
* answered. Held here so that the owner of a formula never has to read it back out of the grid -
|
|
30
|
+
* the grid may not have answered yet, or may not be there at all.
|
|
31
|
+
*/
|
|
32
|
+
protected _body: FormulaHost.Body | null;
|
|
33
|
+
/** The body's blank region as the last pass left it: see {@link getBlankRegion}. */
|
|
34
|
+
protected _blank: ICalcGrid.BlankRegion | null;
|
|
35
|
+
/**
|
|
36
|
+
* The last body written as authored, until a write of text replaces it: what is sent again when
|
|
37
|
+
* the engine never answered it (written while `Off`, which records nothing). See {@link _restart}.
|
|
38
|
+
*/
|
|
39
|
+
protected _bodyRequest: {
|
|
40
|
+
options: ICalcGrid.BodyOptions;
|
|
41
|
+
onAnswered?: () => void;
|
|
42
|
+
} | null;
|
|
43
|
+
/** The last body written as authored has not been answered: the grid's entry predates it. */
|
|
44
|
+
protected _bodyPending: boolean;
|
|
45
|
+
protected readonly _onDispose: (() => void) | undefined;
|
|
46
|
+
protected readonly _onCalculated: ((results: ICalcGrid.Results) => void) | undefined;
|
|
47
|
+
constructor(options: FormulaHost.ConstructorOptions);
|
|
48
|
+
/** The grid's id. */
|
|
49
|
+
getId(): string;
|
|
50
|
+
/**
|
|
51
|
+
* Write the body.
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* A request: the engine compiles the expression where it was authored, so relative references
|
|
55
|
+
* encode their offsets from there; binds every bare reference to `scopeGridId`, which is what
|
|
56
|
+
* makes a body in a grid of its own read a sheet; and images the result at `coords`' top-left,
|
|
57
|
+
* which re-expresses the offsets from where the body starts (a name stores its body at (0,0); a
|
|
58
|
+
* multi-area watch fills its second area from the first's origin). The body is pending until the
|
|
59
|
+
* engine answers with it.
|
|
60
|
+
*
|
|
61
|
+
* @param onAnswered Told when the engine answers with the body - this write's answer, or the
|
|
62
|
+
* answer to the same write sent again when the engine never answered it.
|
|
63
|
+
* @returns The grid's write.
|
|
64
|
+
*/
|
|
65
|
+
setBody(options: FormulaHost.BodyOptions, onAnswered?: () => void): Promise<ICalcGrid.Results>;
|
|
66
|
+
protected _sendBody(request: {
|
|
67
|
+
options: ICalcGrid.BodyOptions;
|
|
68
|
+
onAnswered?: () => void;
|
|
69
|
+
}): Promise<ICalcGrid.Results>;
|
|
70
|
+
/**
|
|
71
|
+
* Send the body to an engine grid made since it was written - a start's, a rebuild's - from what
|
|
72
|
+
* this side holds: the body as authored while the engine has not answered it, the body as
|
|
73
|
+
* answered otherwise. Nothing is written to the model's grid.
|
|
74
|
+
*
|
|
75
|
+
* @returns The write, or `null` when there is nothing to send.
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
_restart(): Promise<ICalcGrid.Results> | null;
|
|
79
|
+
/**
|
|
80
|
+
* The body as last written and last answered, without asking the grid: where it is, and its
|
|
81
|
+
* text at its own top-left. `null` when nothing is written.
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* A write is reflected at once, as written; the grid's answer - the canonical text, and any
|
|
85
|
+
* rewrite a structural change made since - replaces it when it arrives.
|
|
86
|
+
*/
|
|
87
|
+
getBody(): FormulaHost.Body | null;
|
|
88
|
+
/**
|
|
89
|
+
* What the engine pushed after a pass over the body: a rewrite nobody asked for (a structural
|
|
90
|
+
* change on the sheet the body reads), and the blank region.
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
_onComplete(results: ICalcGrid.Results): void;
|
|
94
|
+
/**
|
|
95
|
+
* Take what the grid reports about the body: the answer to a write, or a rewrite nobody asked
|
|
96
|
+
* for (a structural change on the sheet the body reads).
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
_refine(results: ICalcGrid.Results): void;
|
|
100
|
+
/**
|
|
101
|
+
* Take the body as the grid holds it in the snapshot the store is now at - what a revert
|
|
102
|
+
* answers with, since it changes the grid and reports nothing.
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
_resync(): void;
|
|
106
|
+
/**
|
|
107
|
+
* The body's text as the engine's own bookkeeping rewrites it (a table re-fit): written as a
|
|
108
|
+
* body is, so the model's grid holds the new text before the engine answers.
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
_rewrite(coords: IRange.Coords, text: string): Promise<ICalcGrid.Results>;
|
|
112
|
+
protected _write(coords: IRange.Coords, text: string): Promise<ICalcGrid.Results>;
|
|
113
|
+
/**
|
|
114
|
+
* Replace the body with a literal, keeping the block where it is.
|
|
115
|
+
*
|
|
116
|
+
* @remarks
|
|
117
|
+
* A deleted name keeps its grid with `#NAME?` at its origin so that dependents keep their edge to
|
|
118
|
+
* it; the block is still there, its value is the error.
|
|
119
|
+
*
|
|
120
|
+
* @param text The formula text to write - an error literal, typically.
|
|
121
|
+
*/
|
|
122
|
+
setPlaceholder(text: string): Promise<ICalcGrid.Results>;
|
|
123
|
+
/**
|
|
124
|
+
* Move the body: the block's text, read at its own top-left, written over `coords`.
|
|
125
|
+
*
|
|
126
|
+
* @remarks
|
|
127
|
+
* Read at its OWN top-left, not imaged at the destination: the text there names the cells the
|
|
128
|
+
* body reads today, and writing that text at `coords` keeps it reading them (a cut formula's
|
|
129
|
+
* rule). A relative offset is then re-expressed from the new top-left by the write. The old
|
|
130
|
+
* block is cleared first, since the two may not overlap.
|
|
131
|
+
*
|
|
132
|
+
* @returns The write, or `null` when there is no body.
|
|
133
|
+
*/
|
|
134
|
+
moveBody(coords: IRange.Coords): Promise<ICalcGrid.Results> | null;
|
|
135
|
+
/**
|
|
136
|
+
* Ask for the pass that evaluates the body, once the current flush is over.
|
|
137
|
+
*
|
|
138
|
+
* @remarks
|
|
139
|
+
* Posted, not run: every host that asks during one synchronous flush is evaluated by one pass.
|
|
140
|
+
* A request, recorded whatever the engine's status: an `Off` engine's start runs it.
|
|
141
|
+
*/
|
|
142
|
+
requestPass(): void;
|
|
143
|
+
/**
|
|
144
|
+
* Take the body out, as a cell clear - which is what takes its precedents off the sheets.
|
|
145
|
+
*/
|
|
146
|
+
clear(): Promise<ICalcGrid.Results>;
|
|
147
|
+
/**
|
|
148
|
+
* Where the body is, or `null` when nothing is written.
|
|
149
|
+
*/
|
|
150
|
+
getCoords(): IRange.Coords | null;
|
|
151
|
+
protected _coordsOf(entry: IRange.Coords): IRange.Coords;
|
|
152
|
+
/**
|
|
153
|
+
* The body as the engine answered it, or `null` when nothing is written or the engine has not
|
|
154
|
+
* answered yet.
|
|
155
|
+
*/
|
|
156
|
+
getBlock(): IFormulaBlockView | null;
|
|
157
|
+
/** The model's grid the body lives in. @internal */
|
|
158
|
+
_getCalcGrid(): CalcGrid;
|
|
159
|
+
/**
|
|
160
|
+
* The body as the model's grid holds it, answered or not: its text is the engine's once the
|
|
161
|
+
* engine has answered, and the text as written until then. `null` when nothing is written.
|
|
162
|
+
*/
|
|
163
|
+
getView(): IFormulaBlockView | null;
|
|
164
|
+
/**
|
|
165
|
+
* The value of the body at a cell, coerced to one scalar - a defined name's `evaluate()`: a
|
|
166
|
+
* request, answered once the engine has calculated what it owes.
|
|
167
|
+
* @internal
|
|
168
|
+
*/
|
|
169
|
+
_evaluateScalarAt(row: number, column: number, evalIndex?: number): Promise<Scalar>;
|
|
170
|
+
/** The grid's stored values: what a watch compares between passes. */
|
|
171
|
+
getValueGrid(): ISparseGrid<Scalar>;
|
|
172
|
+
/**
|
|
173
|
+
* The body's blank region: the cells of the body the pass shares one answer for rather than
|
|
174
|
+
* writing, and that answer. `null` when nothing is shared.
|
|
175
|
+
*/
|
|
176
|
+
getBlankRegion(): ICalcGrid.BlankRegion | null;
|
|
177
|
+
/**
|
|
178
|
+
* What a cell of `coords` that the grid does not store reads as: the blank region's shared
|
|
179
|
+
* value when a region is shared and `coords` lie inside the body, `null` otherwise.
|
|
180
|
+
*/
|
|
181
|
+
getBlankValueWithin(coords: IRange.Coords): Scalar;
|
|
182
|
+
/**
|
|
183
|
+
* The body's values, `(0, 0)` at the body's top-left.
|
|
184
|
+
*
|
|
185
|
+
* @remarks
|
|
186
|
+
* A read over the grid's own values, never a copy: whatever the grid stores is what a read sees,
|
|
187
|
+
* and a cell of the body's blank region - which the pass shares one answer for rather than
|
|
188
|
+
* writing - reads that answer as the range's empty value, so the range is dense however little
|
|
189
|
+
* the grid holds. `null` when nothing is written.
|
|
190
|
+
*
|
|
191
|
+
* @param coords Read over these instead of the block's extent - a watch reads over its location,
|
|
192
|
+
* which is the block's extent once the two have been reconciled.
|
|
193
|
+
*/
|
|
194
|
+
getValues(coords?: IRange.Coords): IRange | null;
|
|
195
|
+
/**
|
|
196
|
+
* Take the grid out of the graph: the body first (a clear takes its precedents off the sheets;
|
|
197
|
+
* `delete` alone leaves them, and the next dirty sweep would follow one back to a grid that no
|
|
198
|
+
* longer exists), then the grid.
|
|
199
|
+
*/
|
|
200
|
+
dispose(): void;
|
|
201
|
+
/**
|
|
202
|
+
* A write to the model's grid, inside the operation that makes it; one made while no operation
|
|
203
|
+
* is open - a name wired as the engine comes up - is folded into the commit the store is at,
|
|
204
|
+
* never an undo step of its own.
|
|
205
|
+
*/
|
|
206
|
+
protected _amendCurrent<T>(write: () => T): T;
|
|
207
|
+
protected _getEntry(): (IRange.Coords & {
|
|
208
|
+
value: FormulaEntry;
|
|
209
|
+
}) | null;
|
|
210
|
+
}
|
|
211
|
+
export declare namespace FormulaHost {
|
|
212
|
+
interface ConstructorOptions {
|
|
213
|
+
/** The id of the grid. */
|
|
214
|
+
id: string;
|
|
215
|
+
/** The model's grid the body lives in. */
|
|
216
|
+
grid: CalcGrid;
|
|
217
|
+
/** The store the grid is versioned in: a write made outside an operation amends its current commit. */
|
|
218
|
+
transactions?: ITransaction.IStore | null;
|
|
219
|
+
container: IContextContainer;
|
|
220
|
+
context: IFormulaContext;
|
|
221
|
+
/** Called when the host is disposed, for whoever keeps track of live hosts. */
|
|
222
|
+
onDispose?: () => void;
|
|
223
|
+
/** Told after every pass that wrote the grid. */
|
|
224
|
+
onCalculated?: (results: ICalcGrid.Results) => void;
|
|
225
|
+
}
|
|
226
|
+
/** A body as its host holds it. */
|
|
227
|
+
interface Body {
|
|
228
|
+
/** The block's extent. */
|
|
229
|
+
readonly coords: IRange.Coords;
|
|
230
|
+
/** The block's text at its own top-left, as it is written into the grid. */
|
|
231
|
+
readonly text: string;
|
|
232
|
+
}
|
|
233
|
+
/** See {@link ICalcGrid.BodyOptions}. */
|
|
234
|
+
type BodyOptions = ICalcGrid.BodyOptions;
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=FormulaHost.d.ts.map
|