@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
|
@@ -7,10 +7,11 @@ import { ITransaction } from '../transaction';
|
|
|
7
7
|
import { IResource, IResourceCollection } from '../resource';
|
|
8
8
|
import { IStringCollection } from '../string';
|
|
9
9
|
import { IProtection } from '../protection';
|
|
10
|
-
import { IComment } from '../comment';
|
|
10
|
+
import { IComment, ICommentCollection } from '../comment';
|
|
11
11
|
import { IColor } from '../color';
|
|
12
12
|
import { IHyperlink } from '../hyperlink';
|
|
13
13
|
import { ISort } from '../sort';
|
|
14
|
+
import { IAutoFill } from '../autoFill';
|
|
14
15
|
import { IAnchored } from '../anchored';
|
|
15
16
|
import { Anchored } from '../anchored/Anchored';
|
|
16
17
|
import { IAnchoredMap } from '../anchored/IAnchoredMap';
|
|
@@ -18,38 +19,48 @@ import { ITable, ITableCollection } from '../table';
|
|
|
18
19
|
import { NamedTableSource } from '../table/_NamedTableSource';
|
|
19
20
|
import { AnchoredTable } from '../table/AnchoredTable';
|
|
20
21
|
import { INamedCollection } from '../named';
|
|
22
|
+
import { IModuleCollection } from '../scripting';
|
|
23
|
+
import { ModuleCollection } from '../scripting/ModuleCollection';
|
|
21
24
|
import { IMovable, IMovableCollection } from '../movable';
|
|
25
|
+
import { IChartCollection } from '../chart';
|
|
22
26
|
import { IPicture } from '../picture';
|
|
27
|
+
import { Chart } from '../chart/Chart';
|
|
28
|
+
import { IPivotTable, IPivotTableCollection } from '../pivot';
|
|
23
29
|
import { ICell } from '../cell';
|
|
24
30
|
import { ICellRange, ICellRegions, ICellRanges } from '../cellRange';
|
|
25
31
|
import { IStyle, IStyleCollection } from '../style';
|
|
26
32
|
import { IRangeSelection } from '../selection';
|
|
27
33
|
import { IConditionalFormat, IConditionalFormatCollection } from '../conditionalFormat';
|
|
28
34
|
import { IProtectedRange, IProtectedRangeCollection } from '../protectedRange';
|
|
29
|
-
import { Tuple,
|
|
35
|
+
import { Tuple, ISpatialMap, ISpatialQuery } from '../collections';
|
|
30
36
|
import { ListenerEmitter } from '../listener/ListenerEmitter';
|
|
31
|
-
import { RangeStats } from '../primitives';
|
|
32
37
|
import { ICondition } from '../condition';
|
|
33
38
|
import { ConditionalFormat } from '../conditionalFormat/ConditionalFormat';
|
|
34
39
|
import { IDataValidationCollection, IDataValidation } from '../dataValidation';
|
|
35
40
|
import { DataValidation } from '../dataValidation/DataValidation';
|
|
36
41
|
import { ProtectedRange } from '../protectedRange/ProtectedRange';
|
|
42
|
+
import { Comment } from '../comment/Comment';
|
|
37
43
|
import { ISheetProtection } from '../sheetProtection';
|
|
38
44
|
import { ISheetHeader } from '../sheetHeader';
|
|
39
45
|
import { ISheetView } from '../sheetView';
|
|
40
46
|
import { ISheet } from './ISheet';
|
|
47
|
+
import { ScalarListFactory } from './_ScalarListFactory';
|
|
48
|
+
import { ListenerAnchor } from './_ListenerAnchor';
|
|
49
|
+
import { WatchAnchor } from './_WatchAnchor';
|
|
50
|
+
import { EventCategory, SheetEvents } from './_SheetEvents';
|
|
41
51
|
import { SheetHeader } from '../sheetHeader/SheetHeader';
|
|
42
52
|
import { SheetDirectStyle } from './style/SheetDirectStyle';
|
|
43
53
|
import { IUsedRangeSpatialMap } from './style/UsedRangeSpatialMap';
|
|
44
|
-
import { RangeState, CellState, State, MovableEntry,
|
|
54
|
+
import { RangeState, CellState, State, MovableEntry, InternalTupleUpdate } from './_SheetStateTypes';
|
|
55
|
+
import { CellBuffer } from './_CellBuffer';
|
|
45
56
|
import { SheetReadContext, GetTypedRangeOptions, OverFlowsAndStops } from './_SheetStateReader';
|
|
46
|
-
import { AutoFillProjection, AutoFillPreviewCache } from './
|
|
57
|
+
import { AutoFillProjection, AutoFillPreviewCache } from './_SheetAutoFillUtils';
|
|
47
58
|
import { ProtectionCheck } from './_SheetCoords';
|
|
48
|
-
import { RangesListener, RangesListenerEntry } from './listener';
|
|
49
59
|
import { SheetProtection } from '../sheetProtection/SheetProtection';
|
|
50
60
|
import { SheetCellOptions } from './SheetCell';
|
|
51
61
|
import { ICalculation } from '../calculation';
|
|
52
62
|
import { ICalcGrid } from '../calculation/grid';
|
|
63
|
+
import * as _SheetFilterUtils from './_SheetFilterUtils';
|
|
53
64
|
/**
|
|
54
65
|
* Implementation of {@link ISheet}.
|
|
55
66
|
*/
|
|
@@ -73,6 +84,28 @@ export type SheetMutationContext = ReturnType<Sheet['_buildMutationCtx']>;
|
|
|
73
84
|
* @internal
|
|
74
85
|
*/
|
|
75
86
|
export type SheetCoordContext = ReturnType<Sheet['_buildCoordCtx']>;
|
|
87
|
+
/**
|
|
88
|
+
* What an operation hands {@link Sheet._commitWithDirectives} beyond its selection and options.
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
export interface CommitDirectives {
|
|
92
|
+
/** Where an undo lands, when it is not the selection. See `Sheet._recordSelection`. */
|
|
93
|
+
undo?: Partial<IRangeSelection.Coords> | null;
|
|
94
|
+
/** The axis the selection is scrolled along. */
|
|
95
|
+
axis?: IRange.Axis;
|
|
96
|
+
/** Handed to the commit. */
|
|
97
|
+
commit?: ITransaction.StoreOperationOptions;
|
|
98
|
+
}
|
|
99
|
+
/** The sheet's legacy drawing as it holds it: {@link ISheet.LegacyDrawingJSON} with each image resolved to its {@link IResource}, so paste and `.sxl` keep working. */
|
|
100
|
+
interface LegacyDrawing {
|
|
101
|
+
xml: string;
|
|
102
|
+
images?: LegacyDrawingImage[];
|
|
103
|
+
}
|
|
104
|
+
interface LegacyDrawingImage {
|
|
105
|
+
/** The id {@link LegacyDrawing.xml} references this image by. */
|
|
106
|
+
id: string;
|
|
107
|
+
resource: IResource;
|
|
108
|
+
}
|
|
76
109
|
export declare class Sheet implements ISheet {
|
|
77
110
|
protected _options: ISheet.ConstructorOptions;
|
|
78
111
|
protected _id: string;
|
|
@@ -81,19 +114,46 @@ export declare class Sheet implements ISheet {
|
|
|
81
114
|
protected _transactions: ITransaction.IStore;
|
|
82
115
|
protected _ownTransactions: boolean;
|
|
83
116
|
protected _transactionsRemoveListener: IListener.Remove;
|
|
84
|
-
protected
|
|
117
|
+
protected _transactionsCloseRemoveListener: IListener.Remove;
|
|
118
|
+
/** The view's selection when the open root began. See {@link _onRootTransactionClose}. */
|
|
119
|
+
protected _selectionAtCommitStart: IRangeSelection.Coords | null;
|
|
85
120
|
protected _emitter: ListenerEmitter<ISheet, ISheet.IListeners>;
|
|
86
121
|
protected _initializing: boolean;
|
|
87
122
|
protected _starting: Promise<void> | null;
|
|
88
123
|
protected _strings: IStringCollection;
|
|
124
|
+
/** Makes the lists cell values are stored as, over `_strings`. */
|
|
125
|
+
protected _lists: ScalarListFactory;
|
|
89
126
|
protected _ownStrings: boolean;
|
|
90
127
|
protected _styles: IStyleCollection;
|
|
91
128
|
protected _ownStyles: boolean;
|
|
92
129
|
protected _stylesRemoveListener: IListener.Remove;
|
|
130
|
+
protected _languageRemoveListener?: IListener.Remove;
|
|
131
|
+
protected _regionalRemoveListener?: IListener.Remove;
|
|
93
132
|
protected _stylesListener: IStyleCollection.IListeners;
|
|
94
133
|
protected _normalStyleRanged: IProperties.ICellRanged<IStyle.Properties>;
|
|
95
134
|
protected _resources: IResourceCollection;
|
|
96
135
|
protected _ownResources: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* The sheet's own legacy drawing and the header/footer's, held as read until the shapes in them
|
|
138
|
+
* have models of their own. Not sheet state: nothing edits them, so they neither transact nor
|
|
139
|
+
* notify.
|
|
140
|
+
*/
|
|
141
|
+
protected _legacyDrawing: LegacyDrawing | null;
|
|
142
|
+
protected _legacyDrawingHF: LegacyDrawing | null;
|
|
143
|
+
/** The sheet's pivot tables, held as read for the same reason. */
|
|
144
|
+
protected _pivotTables: IPivotTable[];
|
|
145
|
+
protected _pivotTableCollection: IPivotTableCollection;
|
|
146
|
+
/**
|
|
147
|
+
* Anchored items whose delete this sheet announced itself.
|
|
148
|
+
*
|
|
149
|
+
* @remarks
|
|
150
|
+
* An item's `onDelete` reaches the sheet after the operation lands, and the sheet re-announces
|
|
151
|
+
* it as the collection's change — that is how a delete driven by a row or column removal is
|
|
152
|
+
* announced at all. An item deleted through its own `delete()` comes back to the sheet's
|
|
153
|
+
* `deleteFromContainer`, which announces inside the operation; it records the item here so the
|
|
154
|
+
* later `onDelete` is not a second announcement of the same delete.
|
|
155
|
+
*/
|
|
156
|
+
protected _announcedDeletes: WeakSet<IAnchored>;
|
|
97
157
|
protected _names: INamedCollection;
|
|
98
158
|
/** Lazy sheet-anchored view over {@link _names} — see {@link getNames}. */
|
|
99
159
|
protected _namesScoped: INamedCollection | null;
|
|
@@ -106,16 +166,22 @@ export declare class Sheet implements ISheet {
|
|
|
106
166
|
protected _calculationScoped: ICalculation;
|
|
107
167
|
protected _workbook: IWorkbook | null;
|
|
108
168
|
protected _cacheTableColumnHeaders: TableColumnHeaders;
|
|
109
|
-
protected _rangeStats: RangeStats;
|
|
110
169
|
protected _tables: ITableCollection;
|
|
111
170
|
protected _conditionals: IConditionalFormatCollection;
|
|
112
171
|
protected _dataValidations: IDataValidationCollection;
|
|
113
172
|
protected _protectedRanges: IProtectedRangeCollection;
|
|
173
|
+
protected _comments: ICommentCollection;
|
|
114
174
|
protected _movables: IMovableCollection;
|
|
175
|
+
protected _charts: IChartCollection;
|
|
115
176
|
protected _emitterMovables: ListenerEmitter<IMovableCollection, ICollection.IListeners>;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
177
|
+
/**
|
|
178
|
+
* The callbacks for the reference nodes in `State.listeners`, keyed by node id.
|
|
179
|
+
*
|
|
180
|
+
* @remarks
|
|
181
|
+
* On the instance, never in state: a listener is an observer, not part of the document. An entry
|
|
182
|
+
* in the map with no callback here belongs to a snapshot this sheet no longer serves and is inert.
|
|
183
|
+
*/
|
|
184
|
+
protected _listenerNodes: Map<number, ListenerNodeEntry>;
|
|
119
185
|
protected _lastCellDecoded: {
|
|
120
186
|
address: ICell.Address | null;
|
|
121
187
|
coords: IRange.CellCoords | null;
|
|
@@ -156,6 +222,18 @@ export declare class Sheet implements ISheet {
|
|
|
156
222
|
protected _protectionListener: IProtection.IListeners;
|
|
157
223
|
protected _protectionRemoveListener: IListener.Remove;
|
|
158
224
|
protected _tabColor: IColor | null;
|
|
225
|
+
/** VBA binding identity; carried from the file, never minted. See {@link ISheet.getCodeName}. */
|
|
226
|
+
protected _codeName: string | null;
|
|
227
|
+
protected _outlineSettings: Readonly<ISheet.OutlineSettings>;
|
|
228
|
+
protected _conditionalFormatCalculation: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Modules this sheet owns — see {@link getModules}.
|
|
231
|
+
*
|
|
232
|
+
* Built with the sheet rather than on first ask, because building one opens a transaction and
|
|
233
|
+
* `getModules()` is a READ: a lazy build would fold an initialization commit into whatever
|
|
234
|
+
* unrelated commit happened to be the tip, every time a report walked the sheets.
|
|
235
|
+
*/
|
|
236
|
+
protected _modules: ModuleCollection;
|
|
159
237
|
protected _runtime: IRuntime;
|
|
160
238
|
protected _isDate1904: boolean;
|
|
161
239
|
protected _colHeaders: SheetHeader;
|
|
@@ -172,6 +250,7 @@ export declare class Sheet implements ISheet {
|
|
|
172
250
|
protected _emptyCell: ICell;
|
|
173
251
|
protected _cellOptions: SheetCellOptions;
|
|
174
252
|
protected _closed: boolean;
|
|
253
|
+
protected _cellBuffer: CellBuffer | null;
|
|
175
254
|
protected _defaultColWidthCache: number | null;
|
|
176
255
|
protected _defaultRowHeightCache: number | null;
|
|
177
256
|
protected _defaultFontBoundsCache: Readonly<Size> | null;
|
|
@@ -189,6 +268,7 @@ export declare class Sheet implements ISheet {
|
|
|
189
268
|
_getInternal(): {
|
|
190
269
|
getSheet: () => ISheet;
|
|
191
270
|
getState: () => Readonly<State>;
|
|
271
|
+
getCalcGrid: () => ICalcGrid;
|
|
192
272
|
isDataColumn: () => boolean;
|
|
193
273
|
createRange: (coords: Readonly<IRange.FixableCoords> | string, getOptions?: ICellRange.GetRangeOptions, readOnly?: string | null) => ICellRange;
|
|
194
274
|
isContentful: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => boolean;
|
|
@@ -201,11 +281,12 @@ export declare class Sheet implements ISheet {
|
|
|
201
281
|
cellIterator: (options: CellState.IteratorOptions) => IterableIterator<ICellRange.Entry, ICellRange.Entry, IRange.CellCoords>;
|
|
202
282
|
getVisible: (coords: readonly IRange.Coords[], options?: ICellRange.GetVisibleOptions) => readonly IRange.Coords[];
|
|
203
283
|
getUsedCoords: (options?: ICellRange.GetRangeOptions) => IRange.Coords | null;
|
|
204
|
-
updateTuples: (boundedTuples: Tuple.
|
|
284
|
+
updateTuples: (boundedTuples: Tuple.Region<ICell.Update> | null, options?: ICellRange.UpdateCellsOptions, coordValidator?: CoordUtils.CoordValidator | null | undefined, internalOptions?: InternalTupleUpdate | null) => void;
|
|
205
285
|
merge: (ranges: readonly IRange.Coords[], options?: IRange.AxisSelection | ICellRange.MergeOptions | null) => void;
|
|
206
286
|
unmerge: (ranges: readonly IRange.Coords[], options?: ITransaction.OperationOptions) => void;
|
|
207
287
|
getMerges: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => IRange.Coords[];
|
|
208
288
|
insertFrom: (ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions) => Promise<IRange.Coords>;
|
|
289
|
+
canInsertFrom: (ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions) => boolean;
|
|
209
290
|
insertCells: (ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.InsertOptions, coordValidator?: CoordUtils.CoordValidator) => void;
|
|
210
291
|
deleteCells: (ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.DeleteOptions) => void;
|
|
211
292
|
getStyle: (ranges: IRange.Coords[], anchor?: IRangeSelection.Coords, updateStyles?: (update: IStyle.Update, options?: IStyle.UpdateOptions) => void) => IStyle;
|
|
@@ -214,24 +295,32 @@ export declare class Sheet implements ISheet {
|
|
|
214
295
|
getRangeStats: (coords: readonly IRange.Coords[], iteratorOptions?: ICellRange.GetStatsOptions) => IRangeStats;
|
|
215
296
|
getDefaultShiftAxis: (coords?: IRange.Coords) => IRange.Axis;
|
|
216
297
|
getDefaultSortCriteria: (rangeCoords: IRange.Coords, axis?: IRange.Axis, cell?: ICell.Address) => ISort.DefaultSortCriteria;
|
|
298
|
+
getDefaultAutoFillCriteria: (rangeCoords: IRange.Coords, direction?: IRange.Direction, destination?: IRange.Coords) => IAutoFill.DefaultCriteria | null;
|
|
217
299
|
find: (ranges: readonly IRange.Coords[], options: string | ICellRange.FindOptions) => Iterator<ICell>;
|
|
218
300
|
copyFrom: (destination: IRange.Coords, source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions) => Promise<IRange.Coords>;
|
|
219
301
|
contentCounts: (ranges: readonly IRange.Coords[], types: ICell.Content[] | undefined, ignoreHidden?: boolean | IRange.Axis) => Partial<Record<ICell.Content, number>>;
|
|
220
302
|
featureCounts: (ranges: readonly IRange.Coords[], features?: ICellRange.Feature | readonly ICellRange.Feature[], ignoreHidden?: boolean | IRange.Axis) => ICellRange.Counts;
|
|
221
303
|
featureRegions: (bounds: IRange.Coords, requested: readonly ICellRange.Feature[], options?: ICellRange.GetRegionsOptions) => IRange.Coords[];
|
|
222
|
-
dependencyRanges: (coords: IRange.Coords, kind: "precedents" | "dependents", direct: boolean) => ICellRanges | null
|
|
223
|
-
clear: (ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean,
|
|
304
|
+
dependencyRanges: (coords: IRange.Coords, kind: "precedents" | "dependents", direct: boolean) => Promise<ICellRanges | null>;
|
|
305
|
+
clear: (ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean, cutFrom?: IRange.Coords | null) => void;
|
|
224
306
|
calculate: (ranges: ICellRanges.Coords, options?: ICalculation.CalculateOptions) => void;
|
|
225
307
|
autoSelect: (options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => Promise<IRange.Coords[]>;
|
|
308
|
+
beginCommit: (options?: ITransaction.StoreOperationOptions | string) => ITransaction;
|
|
309
|
+
recordSelection: (trans: ITransaction, selection: Partial<IRangeSelection.Coords>, options?: Pick<ICellRange.OperationOptions, "autoSelect" | "autoSelectRestore"> | null, undo?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => void;
|
|
310
|
+
commitWithDirectives: (trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives) => void;
|
|
226
311
|
autoFit: (ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions) => void;
|
|
227
312
|
getBestFit: (range: IRange.Coords, options?: ICellRange.BestFitOptions) => Size;
|
|
228
|
-
|
|
229
|
-
|
|
313
|
+
invalidateRendering: () => void;
|
|
314
|
+
addListenerNode: (ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions) => IListener.Remove;
|
|
315
|
+
addWatch: (coords: IRange.Coords, formula: ICalculation.IFormula | string, handlers: WatchAnchor.Handlers, origin?: IRange.CellCoords, options?: ICellRange.WatchOptions) => IListener.Remove;
|
|
230
316
|
surroundingRegion: (range: IRange.Coords, options?: ICellRange.GetSurroundingOptions) => IRange.Coords;
|
|
317
|
+
getTraverseRegion: (cell: IRange.CellCoords, axis: IRange.Axis, reverse: boolean) => IRange.Coords | null;
|
|
231
318
|
sort: (coords: Readonly<IRange.Coords>, options?: boolean | ISort.Options[] | (ISort.RangeOptions & ITransaction.OperationOptions)) => IRange.Coords;
|
|
232
319
|
filter: (coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions, options?: ITransaction.OperationOptions) => Promise<IRange.Coords>;
|
|
320
|
+
evalFilter: (coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions | null | undefined) => Promise<_SheetFilterUtils.FilterRuns>;
|
|
321
|
+
applyFilterRuns: (runs: _SheetFilterUtils.FilterRuns, options?: ITransaction.OperationOptions) => void;
|
|
233
322
|
setHyperlinks: (ranges: readonly ISpatialMap.Entry<IHyperlink.Update>[], defaultUpdate?: IHyperlink.Update, options?: ITransaction.OperationOptions) => void;
|
|
234
|
-
setComments: (ranges: readonly ISpatialMap.Entry<IComment.
|
|
323
|
+
setComments: (ranges: readonly ISpatialMap.Entry<IComment.Update>[], comments?: IComment.Update | IComment.JSON, options?: ITransaction.OperationOptions) => void;
|
|
235
324
|
getBoundsAtCoords: (coords: IRange.Coords) => Bounds;
|
|
236
325
|
extendRange: (direction: IRange.Direction, cell: IRange.CellCoords) => Readonly<IRange.Coords>;
|
|
237
326
|
createTupleBuilder: <T>(transpose?: boolean) => Tuple.IBuilder<T>;
|
|
@@ -248,30 +337,22 @@ export declare class Sheet implements ISheet {
|
|
|
248
337
|
* @internal
|
|
249
338
|
*/
|
|
250
339
|
protected _getReadCtx(): SheetReadContext;
|
|
251
|
-
/** @internal Reconciled error-VALUE view; see {@link _getErrorSpatialReconciled}. */
|
|
252
|
-
protected _errorReconciled: {
|
|
253
|
-
grid: ISparseGrid<Scalar> | null;
|
|
254
|
-
epoch: number;
|
|
255
|
-
spatial: ISpatialMap<boolean>;
|
|
256
|
-
} | null;
|
|
257
340
|
/**
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
|
|
261
|
-
protected _errorEpoch: number;
|
|
262
|
-
/**
|
|
263
|
-
* The reconciled error-VALUE spatial backing `RangeState.Type.Error` — merge-on-READ.
|
|
341
|
+
* The sheet's grid: the synchronous half of the calculation service for this sheet
|
|
342
|
+
* (DESIGN-CALC-SERVICE §13.23, §13.24), holding everything a cell contains - the formulas, the
|
|
343
|
+
* values and the indexes over them - and forwarding every verb to its backend.
|
|
264
344
|
*
|
|
265
345
|
* @remarks
|
|
266
|
-
* `
|
|
267
|
-
*
|
|
268
|
-
* (
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
* reduces to returning it.
|
|
346
|
+
* A plain field, NOT part of `State` (§13.24 a): one grid serves every version of the sheet, so
|
|
347
|
+
* a versioned slot would answer with the CURRENT maps from a historic record - which the sheet
|
|
348
|
+
* reads (`_resolveInheritedFormats`, the snapshot sheets). What the grid HOLDS versions, in its
|
|
349
|
+
* own record; its reads take the transaction to answer for. Opened by `_fromJSON`, so it is
|
|
350
|
+
* absent until then; a snapshot sheet is handed the source's grid by `_clone`.
|
|
272
351
|
* @internal
|
|
273
352
|
*/
|
|
274
|
-
protected
|
|
353
|
+
protected _calcGrid: ICalcGrid;
|
|
354
|
+
/** `false` for a snapshot sheet, which holds its source's grid and must not close it. */
|
|
355
|
+
protected _ownsCalcGrid: boolean;
|
|
275
356
|
/** @internal Cached mutation-engine context. See {@link SheetMutationContext}. */
|
|
276
357
|
protected _mutationCtx: ReturnType<Sheet['_buildMutationCtx']> | null;
|
|
277
358
|
/** @internal Access the mutation context (cached). See {@link SheetMutationContext}. */
|
|
@@ -289,21 +370,19 @@ export declare class Sheet implements ISheet {
|
|
|
289
370
|
readonly columnHeadersShiftCallback: SheetHeader.ShiftCallback | null;
|
|
290
371
|
getEntireCoords: () => IRange.Coords;
|
|
291
372
|
getView: () => ISheetView;
|
|
292
|
-
beginCommit: (options?: ITransaction.StoreOperationOptions
|
|
373
|
+
beginCommit: (options?: ITransaction.StoreOperationOptions | string) => ITransaction;
|
|
293
374
|
updateState: (updateState?: Partial<State>, options?: ITransaction.OperationOptions | string) => State;
|
|
294
375
|
getState: () => Readonly<State>;
|
|
295
376
|
stateFor: (trans: ITransaction) => State;
|
|
377
|
+
readonly calcGrid: ICalcGrid;
|
|
296
378
|
/** Invalidate the cached used-range read (a mutation may change the used bounds). */
|
|
297
379
|
invalidateUsedCoords: () => void;
|
|
298
380
|
validateCoords: (coords: IRange.Coords, oobMessage?: string, allowOutOfBounds?: boolean) => void;
|
|
299
381
|
protectionCheck: (check?: ProtectionCheck | null, coords?: Readonly<IRange.Coords> | readonly IRange.Coords[] | null, action?: string | null) => void;
|
|
300
382
|
getDefaultShiftAxis: (coords?: IRange.Coords) => IRange.Axis;
|
|
301
|
-
processListenerShift: (rangesListenerMap: Map<number, ICellRangesListenerEntry>, beforeAfterMap: Map<number, BeforeAfterRange>, beforeStates: Map<number, ICellRangesListenerEntry>, options: ISpatialMap.ShiftDetails<ICellRangeListenerEntry>) => ISpatialMap.Entry<ICellRangeListenerEntry>[] | void;
|
|
302
383
|
processLayoutChange: () => void;
|
|
303
384
|
markColumnHeaderTableNames: () => void;
|
|
304
|
-
|
|
305
|
-
/** Read-clone-write the `_rangeStats` cache against a new values grid. */
|
|
306
|
-
cloneRangeStats: (grid: ISparseGrid<Scalar>) => void;
|
|
385
|
+
commitWithDirectives: (trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives) => void;
|
|
307
386
|
readonly styles: IStyleCollection;
|
|
308
387
|
getRangedEntries: <T, E = T>(spatial: ISpatialQuery, ranges: readonly IRange.Coords[], options?: GetTypedRangeOptions<T, E>, spatialSort?: boolean) => T[];
|
|
309
388
|
createSparseBuilder: (options?: ICellRange.SparseBuilderOptions, sheetRange?: ICellRange | null, internal?: InternalTupleUpdate) => ICellRange.SparseBuilder;
|
|
@@ -313,24 +392,34 @@ export declare class Sheet implements ISheet {
|
|
|
313
392
|
content: IUsedRangeSpatialMap<SheetDirectStyle>;
|
|
314
393
|
}) => IUsedRangeSpatialMap<SheetDirectStyle>;
|
|
315
394
|
autoFit: (ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions) => void;
|
|
395
|
+
recordAutoFormat: (trans: ITransaction) => void;
|
|
396
|
+
recordSkipProtectionCheck: (trans: ITransaction) => void;
|
|
397
|
+
recordFreezePanes: (trans: ITransaction, before: IRange.CellCoords, after: IRange.CellCoords) => void;
|
|
398
|
+
recordSelection: (trans: ITransaction, selection: Partial<IRangeSelection.Coords>, options?: Pick<ICellRange.OperationOptions, "autoSelect" | "autoSelectRestore"> | null, undo?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => void;
|
|
316
399
|
notify: (key: keyof ISheet.IListeners) => void | Promise<any>;
|
|
317
400
|
getRange: (address?: ICellRange.Address, options?: ICellRange.GetRangeOptions) => ICellRange;
|
|
318
401
|
getSelection: () => IRangeSelection;
|
|
319
402
|
getMerges: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => IRange.Coords[];
|
|
320
403
|
indexMerges: (mergeInserts: IRange.Coords[] | null, mergeRemoves?: IRange.Coords[] | null) => void;
|
|
321
|
-
validateOrRemoveOverlaps: (rangeCoords: IRange.Coords, type: string, table?: ITable | null, removeIfContains?: boolean) => void;
|
|
404
|
+
validateOrRemoveOverlaps: (rangeCoords: IRange.Coords, type: string, table?: ITable | null, removeIfContains?: boolean, absorbAutoTable?: boolean) => void;
|
|
322
405
|
autoSelect: (options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => Promise<IRange.Coords[]>;
|
|
323
406
|
readonly isDataColumn: boolean;
|
|
324
407
|
readonly strings: IStringCollection;
|
|
408
|
+
readonly lists: ScalarListFactory;
|
|
325
409
|
readonly cellOptions: SheetCellOptions;
|
|
326
410
|
readonly runtime: IRuntime;
|
|
327
411
|
getProtection: () => ISheetProtection;
|
|
328
412
|
hasRangedEntries: (key: keyof State, range: IRange.Coords) => boolean;
|
|
329
413
|
rangeStateIterator: (options: RangeState.IteratorOptions) => RangeState.Iterator;
|
|
330
|
-
|
|
414
|
+
recordChange: (trans: ITransaction, category: EventCategory, ranges: readonly IRange.Coords[] | null | undefined) => void;
|
|
415
|
+
loadComments: (map: IAnchoredMap<IComment, IComment.JSON>, refs: IRange.JSONReference<IComment.JSON>[]) => IAnchoredMap<IComment, IComment.JSON>;
|
|
416
|
+
newCommentJSON: (modifiers: IComment.Modifiers) => IComment.JSON;
|
|
417
|
+
notifyCommentsChange: () => void;
|
|
418
|
+
recordFormulasEntered: (trans: ITransaction, ranges: readonly IRange.Coords[] | null | undefined) => void;
|
|
331
419
|
getTables: () => ITableCollection;
|
|
332
420
|
getAutoTable: () => ITable | null;
|
|
333
421
|
cellIterator: (options: CellState.IteratorOptions) => IterableIterator<ICellRange.Entry, ICellRange.Entry, IRange.CellCoords>;
|
|
422
|
+
cellStateIterator: (options?: CellState.IteratorOptions) => CellState.Iterator;
|
|
334
423
|
rangeToCoords: (address: ICellRange.Address, protectionCheck?: ProtectionCheck | null, lookupNames?: boolean) => IRange.Coords;
|
|
335
424
|
getCell: (address?: ICell.Address) => ICell;
|
|
336
425
|
createCell: (update: ICell.Update, coords?: IRange.CellCoords | null) => ICell;
|
|
@@ -352,6 +441,7 @@ export declare class Sheet implements ISheet {
|
|
|
352
441
|
readonly internal: {
|
|
353
442
|
getSheet: () => ISheet;
|
|
354
443
|
getState: () => Readonly<State>;
|
|
444
|
+
getCalcGrid: () => ICalcGrid;
|
|
355
445
|
isDataColumn: () => boolean;
|
|
356
446
|
createRange: (coords: Readonly<IRange.FixableCoords> | string, getOptions?: ICellRange.GetRangeOptions, readOnly?: string | null) => ICellRange;
|
|
357
447
|
isContentful: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => boolean;
|
|
@@ -364,11 +454,12 @@ export declare class Sheet implements ISheet {
|
|
|
364
454
|
cellIterator: (options: CellState.IteratorOptions) => IterableIterator<ICellRange.Entry, ICellRange.Entry, IRange.CellCoords>;
|
|
365
455
|
getVisible: (coords: readonly IRange.Coords[], options?: ICellRange.GetVisibleOptions) => readonly IRange.Coords[];
|
|
366
456
|
getUsedCoords: (options?: ICellRange.GetRangeOptions) => IRange.Coords | null;
|
|
367
|
-
updateTuples: (boundedTuples: Tuple.
|
|
457
|
+
updateTuples: (boundedTuples: Tuple.Region<ICell.Update> | null, options?: ICellRange.UpdateCellsOptions, coordValidator?: CoordUtils.CoordValidator | null | undefined, internalOptions?: InternalTupleUpdate | null) => void;
|
|
368
458
|
merge: (ranges: readonly IRange.Coords[], options?: IRange.AxisSelection | ICellRange.MergeOptions | null) => void;
|
|
369
459
|
unmerge: (ranges: readonly IRange.Coords[], options?: ITransaction.OperationOptions) => void;
|
|
370
460
|
getMerges: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => IRange.Coords[];
|
|
371
461
|
insertFrom: (ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions) => Promise<IRange.Coords>;
|
|
462
|
+
canInsertFrom: (ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions) => boolean;
|
|
372
463
|
insertCells: (ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.InsertOptions, coordValidator?: CoordUtils.CoordValidator) => void;
|
|
373
464
|
deleteCells: (ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.DeleteOptions) => void;
|
|
374
465
|
getStyle: (ranges: IRange.Coords[], anchor?: IRangeSelection.Coords, updateStyles?: (update: IStyle.Update, options?: IStyle.UpdateOptions) => void) => IStyle;
|
|
@@ -377,24 +468,32 @@ export declare class Sheet implements ISheet {
|
|
|
377
468
|
getRangeStats: (coords: readonly IRange.Coords[], iteratorOptions?: ICellRange.GetStatsOptions) => IRangeStats;
|
|
378
469
|
getDefaultShiftAxis: (coords?: IRange.Coords) => IRange.Axis;
|
|
379
470
|
getDefaultSortCriteria: (rangeCoords: IRange.Coords, axis?: IRange.Axis, cell?: ICell.Address) => ISort.DefaultSortCriteria;
|
|
471
|
+
getDefaultAutoFillCriteria: (rangeCoords: IRange.Coords, direction?: IRange.Direction, destination?: IRange.Coords) => IAutoFill.DefaultCriteria | null;
|
|
380
472
|
find: (ranges: readonly IRange.Coords[], options: string | ICellRange.FindOptions) => Iterator<ICell>;
|
|
381
473
|
copyFrom: (destination: IRange.Coords, source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions) => Promise<IRange.Coords>;
|
|
382
474
|
contentCounts: (ranges: readonly IRange.Coords[], types: ICell.Content[] | undefined, ignoreHidden?: boolean | IRange.Axis) => Partial<Record<ICell.Content, number>>;
|
|
383
475
|
featureCounts: (ranges: readonly IRange.Coords[], features?: ICellRange.Feature | readonly ICellRange.Feature[], ignoreHidden?: boolean | IRange.Axis) => ICellRange.Counts;
|
|
384
476
|
featureRegions: (bounds: IRange.Coords, requested: readonly ICellRange.Feature[], options?: ICellRange.GetRegionsOptions) => IRange.Coords[];
|
|
385
|
-
dependencyRanges: (coords: IRange.Coords, kind: "precedents" | "dependents", direct: boolean) => ICellRanges | null
|
|
386
|
-
clear: (ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean,
|
|
477
|
+
dependencyRanges: (coords: IRange.Coords, kind: "precedents" | "dependents", direct: boolean) => Promise<ICellRanges | null>;
|
|
478
|
+
clear: (ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean, cutFrom?: IRange.Coords | null) => void;
|
|
387
479
|
calculate: (ranges: ICellRanges.Coords, options?: ICalculation.CalculateOptions) => void;
|
|
388
480
|
autoSelect: (options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => Promise<IRange.Coords[]>;
|
|
481
|
+
beginCommit: (options?: ITransaction.StoreOperationOptions | string) => ITransaction;
|
|
482
|
+
recordSelection: (trans: ITransaction, selection: Partial<IRangeSelection.Coords>, options?: Pick<ICellRange.OperationOptions, "autoSelect" | "autoSelectRestore"> | null, undo?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => void;
|
|
483
|
+
commitWithDirectives: (trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives) => void;
|
|
389
484
|
autoFit: (ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions) => void;
|
|
390
485
|
getBestFit: (range: IRange.Coords, options?: ICellRange.BestFitOptions) => Size;
|
|
391
|
-
|
|
392
|
-
|
|
486
|
+
invalidateRendering: () => void;
|
|
487
|
+
addListenerNode: (ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions) => IListener.Remove;
|
|
488
|
+
addWatch: (coords: IRange.Coords, formula: ICalculation.IFormula | string, handlers: WatchAnchor.Handlers, origin?: IRange.CellCoords, options?: ICellRange.WatchOptions) => IListener.Remove;
|
|
393
489
|
surroundingRegion: (range: IRange.Coords, options?: ICellRange.GetSurroundingOptions) => IRange.Coords;
|
|
490
|
+
getTraverseRegion: (cell: IRange.CellCoords, axis: IRange.Axis, reverse: boolean) => IRange.Coords | null;
|
|
394
491
|
sort: (coords: Readonly<IRange.Coords>, options?: boolean | ISort.Options[] | (ISort.RangeOptions & ITransaction.OperationOptions)) => IRange.Coords;
|
|
395
492
|
filter: (coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions, options?: ITransaction.OperationOptions) => Promise<IRange.Coords>;
|
|
493
|
+
evalFilter: (coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions | null | undefined) => Promise<_SheetFilterUtils.FilterRuns>;
|
|
494
|
+
applyFilterRuns: (runs: _SheetFilterUtils.FilterRuns, options?: ITransaction.OperationOptions) => void;
|
|
396
495
|
setHyperlinks: (ranges: readonly ISpatialMap.Entry<IHyperlink.Update>[], defaultUpdate?: IHyperlink.Update, options?: ITransaction.OperationOptions) => void;
|
|
397
|
-
setComments: (ranges: readonly ISpatialMap.Entry<IComment.
|
|
496
|
+
setComments: (ranges: readonly ISpatialMap.Entry<IComment.Update>[], comments?: IComment.Update | IComment.JSON, options?: ITransaction.OperationOptions) => void;
|
|
398
497
|
getBoundsAtCoords: (coords: IRange.Coords) => Bounds;
|
|
399
498
|
extendRange: (direction: IRange.Direction, cell: IRange.CellCoords) => Readonly<IRange.Coords>;
|
|
400
499
|
createTupleBuilder: <T>(transpose?: boolean) => Tuple.IBuilder<T>;
|
|
@@ -468,7 +567,7 @@ export declare class Sheet implements ISheet {
|
|
|
468
567
|
* @param searchTypes If value is in record it will be search, boolean flag is used for fullyEnclosed.
|
|
469
568
|
* @internal
|
|
470
569
|
*/
|
|
471
|
-
protected _collectRanges(queryCoords: IRange.Coords, rangesByType?: ISpatialMap.Entry<RangeState.Intersection>[], searchTypes?: boolean | RangeState.SearchTypes | null, state?: State, injectReferences?: IRange.JSONReference<any>[][]): void;
|
|
570
|
+
protected _collectRanges(queryCoords: IRange.Coords, rangesByType?: ISpatialMap.Entry<RangeState.Intersection>[], searchTypes?: boolean | RangeState.SearchTypes | null, state?: State, injectReferences?: IRange.JSONReference<any>[][], transaction?: ITransaction | null): void;
|
|
472
571
|
/**
|
|
473
572
|
* This wraps the stateIterator with a ICell.IteratorContext.
|
|
474
573
|
* // TODO - **PERFORMANCE** We are creating a new CellState on very call
|
|
@@ -517,6 +616,21 @@ export declare class Sheet implements ISheet {
|
|
|
517
616
|
/** @internal Logic lives in `_SheetMutations.updateStyles`. */
|
|
518
617
|
protected _updateStyles(ranges: readonly ISpatialMap.Entry<IStyle.Update>[], defaultUpdate?: IStyle.Update, // we do this because updateTuples may update each
|
|
519
618
|
options?: IStyle.UpdateOptions, calcedNumberFormat?: boolean): void;
|
|
619
|
+
/**
|
|
620
|
+
* Holds a style set on one cell in the buffer the cell writes of an open transaction are held in
|
|
621
|
+
* ({@link CellBuffer.holdStyle}).
|
|
622
|
+
*
|
|
623
|
+
* @returns `false` if it is to be written as it comes.
|
|
624
|
+
* @internal
|
|
625
|
+
*/
|
|
626
|
+
protected _holdStyle(range: ISpatialMap.Entry<IStyle.Update>, defaultUpdate?: IStyle.Update, options?: IStyle.UpdateOptions): boolean;
|
|
627
|
+
/**
|
|
628
|
+
* Whether a style update written to one cell changes that cell alone; a caller's callback is not
|
|
629
|
+
* known to. (The style typed input implies is not asked: it is a number format, a quote prefix or
|
|
630
|
+
* a wrap.)
|
|
631
|
+
* @internal
|
|
632
|
+
*/
|
|
633
|
+
protected _isLocalStyle(state: Readonly<State>, rowIndex: number, colIndex: number, update: IStyle.Update): boolean;
|
|
520
634
|
/** @internal */
|
|
521
635
|
protected _createSparseBuilder(options?: ICellRange.SparseBuilderOptions, sheetRange?: ICellRange | null, internal?: InternalTupleUpdate): ICellRange.SparseBuilder;
|
|
522
636
|
/**
|
|
@@ -524,11 +638,20 @@ export declare class Sheet implements ISheet {
|
|
|
524
638
|
* Logic lives in `_SheetMutations.updateTuples`.
|
|
525
639
|
* @internal
|
|
526
640
|
*/
|
|
527
|
-
protected _updateTuples(boundedTuples: Tuple.
|
|
641
|
+
protected _updateTuples(boundedTuples: Tuple.Region<ICell.Update> | null, options?: ICellRange.UpdateCellsOptions, coordValidator?: CoordUtils.CoordValidator | null | undefined, internalOptions?: InternalTupleUpdate | null): void;
|
|
642
|
+
/**
|
|
643
|
+
* The buffer single-cell writes made inside an open transaction are held in ({@link CellBuffer}).
|
|
644
|
+
* @internal
|
|
645
|
+
*/
|
|
646
|
+
protected _getCellBuffer(): CellBuffer;
|
|
528
647
|
/** @internal */
|
|
529
648
|
protected _sort(coords: Readonly<IRange.Coords>, options?: boolean | ISort.Options[] | ISort.RangeOptions & ITransaction.OperationOptions): IRange.Coords;
|
|
530
649
|
/** @internal */
|
|
531
650
|
protected _filter(coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions, options?: ITransaction.OperationOptions): Promise<IRange.Coords>;
|
|
651
|
+
/** @internal The read-only half of {@link _filter}: settles the runs without writing. */
|
|
652
|
+
protected _evalFilter(coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions | null | undefined): Promise<_SheetFilterUtils.FilterRuns>;
|
|
653
|
+
/** @internal The write half of {@link _filter}: inside the caller's open transaction. */
|
|
654
|
+
protected _applyFilterRuns(runs: _SheetFilterUtils.FilterRuns, options?: ITransaction.OperationOptions): void;
|
|
532
655
|
/** @internal Logic lives in `_SheetMutations.autoFill`. */
|
|
533
656
|
protected _autoFill(template: IRange.Coords, destination: IRange.Coords, options?: ICellRange.AutoFillOptions): boolean | AutoFillProjection;
|
|
534
657
|
/** @internal Logic lives in `_SheetMutations.autoFillRange`. */
|
|
@@ -538,8 +661,67 @@ export declare class Sheet implements ISheet {
|
|
|
538
661
|
/** @internal Logic lives in `_SheetMutations.setHyperlinks`. */
|
|
539
662
|
protected _setHyperlinks(ranges: readonly ISpatialMap.Entry<IHyperlink.Update>[], defaultUpdate?: IHyperlink.Update, // we do this because updateTuples may update each
|
|
540
663
|
options?: ITransaction.OperationOptions): void;
|
|
541
|
-
/**
|
|
664
|
+
/**
|
|
665
|
+
* The request options for a grid call made under `transaction`: the snapshot it names and the
|
|
666
|
+
* savepoint its maps are cloned under.
|
|
667
|
+
* @internal
|
|
668
|
+
*/
|
|
669
|
+
protected _requestFor(transaction: ITransaction | null): ICalcGrid.RequestOptions;
|
|
670
|
+
/**
|
|
671
|
+
* The formats the entered cells of the blocks inherit, as of a commit.
|
|
672
|
+
*
|
|
673
|
+
* Excel's entry rule: a formula typed into a General cell takes the number format of the first
|
|
674
|
+
* cell it reads that has one - `=A1+B1` shows currency when `A1` does. Which cells, and in what
|
|
675
|
+
* order, the engine reports with the results ({@link ICalcGrid.Results.formatInserts}); which
|
|
676
|
+
* formats they carry is read from the ENTERING commit's snapshot, so a pass that comes late -
|
|
677
|
+
* after an engine start, or an F9 under manual calculation - sees the inputs as they were when
|
|
678
|
+
* the formula was entered, whatever was formatted since. Never through a name.
|
|
679
|
+
*
|
|
680
|
+
* @remarks
|
|
681
|
+
* Range-shaped, not per cell. A relative reference names a different cell from each cell of
|
|
682
|
+
* its block, so the cells a block reads through it are a rectangle the block's size offset by
|
|
683
|
+
* the reference; the styled entries found there are shifted back onto the block. A fixed axis
|
|
684
|
+
* reads one row or column for the whole block. A reference stands for its top-left cell.
|
|
685
|
+
* References are written from the last to the first, so the first reference that formats a
|
|
686
|
+
* cell is the one that stands - "the first that is not General", per cell.
|
|
687
|
+
* @internal
|
|
688
|
+
*/
|
|
689
|
+
protected _resolveInheritedFormats(commitId: string, blocks: readonly EnteredBlock[], entered: readonly IRange.Coords[]): ISpatialMap.Entry<IStyle.Update>[];
|
|
690
|
+
/**
|
|
691
|
+
* Land a record the engine pushed - a pass's results, a seed's - in the sheet's snapshots.
|
|
692
|
+
*
|
|
693
|
+
* @remarks
|
|
694
|
+
* The record names the snapshot it answers for (`commitId`). Everything it says about cells -
|
|
695
|
+
* the formulas, the values, the spills, the errors, the pending and circular marks - has been
|
|
696
|
+
* landed in the grid's own snapshots by the time this runs, and a record naming a snapshot off
|
|
697
|
+
* the live history never reaches here at all. What is left is the sheet's: what is PROMOTED -
|
|
698
|
+
* number formats, sizes - amended into the commit that entered the formulas, and the
|
|
699
|
+
* notifications, which realize has to make by hand.
|
|
700
|
+
* @internal
|
|
701
|
+
*/
|
|
542
702
|
protected _realizeCalcedValues(results: ICalcGrid.Results): void;
|
|
703
|
+
/**
|
|
704
|
+
* Land the promoted half of a pass's results - number formats and sizes - in the commit that
|
|
705
|
+
* entered the formulas they belong to.
|
|
706
|
+
*
|
|
707
|
+
* @remarks
|
|
708
|
+
* Excel's rule: entering a formula formats and fits it; recalculating it does not. So the set is
|
|
709
|
+
* the formulas the target commit entered on this sheet, clipped to what this pass realized; the
|
|
710
|
+
* directives are the target's own (`autoFormat`, `autoFit`); and once resolved the sheet is
|
|
711
|
+
* marked on the target ({@link IntentCalcResolved}), so a later pass for the same commit - a
|
|
712
|
+
* dependent on another sheet, an explicit recalculation, the pass a redo triggers - leaves what
|
|
713
|
+
* is now in the snapshot alone. The mark is written with the sheet's record so that it lands
|
|
714
|
+
* even when nothing was promoted; an amend with no writes is elided. It is written only by a
|
|
715
|
+
* pass that realized the entered cells: an engine starting up runs a pass that realizes
|
|
716
|
+
* nothing before the one that carries the results.
|
|
717
|
+
*
|
|
718
|
+
* The number format is the engine's pick per cell ({@link ICalcGrid.Results.formatInserts}):
|
|
719
|
+
* the references the formula inherits one from, resolved here against the entering commit's
|
|
720
|
+
* snapshot ({@link _resolveInheritedFormats}), or else the format its functions supplied.
|
|
721
|
+
*
|
|
722
|
+
* @internal
|
|
723
|
+
*/
|
|
724
|
+
protected _promoteCalcResults(target: ITransaction.ICommit, results: ICalcGrid.Results): void;
|
|
543
725
|
/** {@inheritDoc ISheet.calculate} */
|
|
544
726
|
calculate(full?: boolean): Promise<ICalculation.Status>;
|
|
545
727
|
/** @internal */
|
|
@@ -548,10 +730,10 @@ export declare class Sheet implements ISheet {
|
|
|
548
730
|
protected _calculateFull(): void;
|
|
549
731
|
/** @internal */
|
|
550
732
|
/** @internal Logic lives in `_SheetMutations.setComments`. */
|
|
551
|
-
protected _setComments(ranges: readonly ISpatialMap.Entry<IComment.
|
|
733
|
+
protected _setComments(ranges: readonly ISpatialMap.Entry<IComment.Update>[], comments?: IComment.Update | IComment.JSON, // `undefined` = each entry carries its own (updateTuples)
|
|
552
734
|
options?: ITransaction.OperationOptions): void;
|
|
553
735
|
/** @internal Logic lives in `_SheetMutations.clear`. */
|
|
554
|
-
protected _clear(ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean,
|
|
736
|
+
protected _clear(ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean, cutFrom?: IRange.Coords | null): void;
|
|
555
737
|
/** @internal Logic lives in `_SheetMutations.merge`. */
|
|
556
738
|
protected _merge(ranges: readonly IRange.Coords[], options?: IRange.AxisSelection | ICellRange.MergeOptions | null): void;
|
|
557
739
|
/** @internal Logic lives in `_SheetMutations.unmerge`. */
|
|
@@ -583,7 +765,23 @@ export declare class Sheet implements ISheet {
|
|
|
583
765
|
/** @internal */
|
|
584
766
|
protected _getTables(address: ICellRanges.Address, ignoreHidden?: boolean, fullyContained?: boolean): ITable[];
|
|
585
767
|
/** @internal */
|
|
768
|
+
protected _getDefaultAutoFillCriteria(rangeCoords: IRange.Coords, direction?: IRange.Direction, destination?: IRange.Coords): IAutoFill.DefaultCriteria | null;
|
|
769
|
+
/** @internal */
|
|
586
770
|
protected _getDefaultSortCriteria(rangeCoords: IRange.Coords, axis?: IRange.Axis, cell?: ICell.Address): ISort.DefaultSortCriteria;
|
|
771
|
+
/**
|
|
772
|
+
* The refusal an {@link ICellRange.insertFrom} would raise, as a localized message - `null` when it
|
|
773
|
+
* would go through. Asked BEFORE anything is committed, both by `_insertFrom` itself (so a refusal
|
|
774
|
+
* leaves nothing to roll back and carries the message that fits the reason) and by the public
|
|
775
|
+
* `canInsertFrom`, which is what lets a drag preview show a drop as refused before it is attempted.
|
|
776
|
+
*
|
|
777
|
+
* @internal
|
|
778
|
+
*/
|
|
779
|
+
protected _getInsertFromRefusal(coordsInsert: IRange.Coords, coordsCut: IRange.Coords, axis: IRange.Axis, isCut: boolean, isSameSheet: boolean): string | null;
|
|
780
|
+
/**
|
|
781
|
+
* {@inheritDoc ICellRange.canInsertFrom}
|
|
782
|
+
* @internal
|
|
783
|
+
*/
|
|
784
|
+
protected _canInsertFrom(ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions): boolean;
|
|
587
785
|
/** @internal */
|
|
588
786
|
protected _insertFrom(ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions): Promise<IRange.Coords>;
|
|
589
787
|
/**
|
|
@@ -619,23 +817,166 @@ export declare class Sheet implements ISheet {
|
|
|
619
817
|
/** @internal */
|
|
620
818
|
protected _createRangeEvent(coords: (readonly IRange.FixableCoords[]) | IRange.FixableCoords, options: NotifierOptions, coordsFrom?: (readonly IRange.FixableCoords[]) | IRange.FixableCoords): ICellRange.Event;
|
|
621
819
|
/**
|
|
622
|
-
*
|
|
820
|
+
* Register a reference node for a range listener.
|
|
821
|
+
*
|
|
822
|
+
* @remarks
|
|
823
|
+
* The node is written into the anchored map by an AMEND on the current commit, so registering
|
|
824
|
+
* never becomes an undo step, and every snapshot from this commit forward carries the node at
|
|
825
|
+
* whatever coords it has then. That one write is where the whole contract comes from: undo to a
|
|
826
|
+
* snapshot at or after registration and the node is there, at the coords of that moment; undo to
|
|
827
|
+
* one from BEFORE it and the map simply has no entry, which is what `#N/A` is.
|
|
828
|
+
*
|
|
829
|
+
* The callback never enters state - it is held on the instance, keyed by node id.
|
|
830
|
+
*
|
|
623
831
|
* @internal
|
|
624
832
|
*/
|
|
625
|
-
protected
|
|
626
|
-
visited: Set<string>, options: NotifierOptions): void;
|
|
833
|
+
protected _addListenerNode(ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions): IListener.Remove;
|
|
627
834
|
/**
|
|
628
|
-
*
|
|
835
|
+
* {@link _addListenerNode}, also handing back the node, for a caller that reads its coords.
|
|
629
836
|
* @internal
|
|
630
837
|
*/
|
|
631
|
-
protected
|
|
838
|
+
protected _registerListenerNode(ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions, createNode?: (options: ListenerAnchor.ConstructorOptions) => ListenerAnchor): {
|
|
839
|
+
node: ListenerAnchor;
|
|
840
|
+
remove: IListener.Remove;
|
|
841
|
+
};
|
|
632
842
|
/**
|
|
633
|
-
*
|
|
843
|
+
* Register a watch: an expression kept evaluated over a range.
|
|
844
|
+
*
|
|
845
|
+
* @remarks
|
|
846
|
+
* A watch is a range listener that fires on formula evaluation - see {@link WatchAnchor}. Its
|
|
847
|
+
* location is a node in `State.listeners`, and its body is a formula block in a grid of its own
|
|
848
|
+
* that shadows this sheet, written at the watched coords exactly as if it had been typed there.
|
|
849
|
+
* A watch is allowed to overlap other formulas, which is why the body has a grid of its own: the
|
|
850
|
+
* sheet's formula map holds one formula per cell, and a validation, a conditional format and a
|
|
851
|
+
* real formula can all sit on D1:D3 at once.
|
|
852
|
+
*
|
|
853
|
+
* Registration waits for the engine and never starts it: a watch added while calculation is off
|
|
854
|
+
* delivers nothing until calculation is started, and registers then. It lands as one amend: the node, the grid and the body join the current commit, so a
|
|
855
|
+
* watch is never an undo step. A snapshot older than the watch has neither, which is `#N/A`.
|
|
856
|
+
* The first delivery is the first pass that evaluates the body.
|
|
857
|
+
*
|
|
858
|
+
* @param coords The range the body is evaluated over.
|
|
859
|
+
* @param formula The expression, authored at `origin`, or a compiled formula anchored at
|
|
860
|
+
* `coords`' top-left.
|
|
861
|
+
* @param handlers `onValues` receives the body's values after every pass that changed them;
|
|
862
|
+
* `onChange` is told that an evaluation happened, without the values.
|
|
863
|
+
* @param origin Where `formula` is authored when it is not `coords`' own top-left: the shared
|
|
864
|
+
* origin of a multi-area watch, from which the body is filled to `coords`.
|
|
865
|
+
* @param options `arrayFirstCell`: every cell of the body is its own 1x1 array-entered formula.
|
|
634
866
|
* @internal
|
|
635
867
|
*/
|
|
636
|
-
protected
|
|
637
|
-
/**
|
|
638
|
-
|
|
868
|
+
protected _addWatch(coords: IRange.Coords, formula: ICalculation.IFormula | string, handlers: WatchAnchor.Handlers, origin?: IRange.CellCoords, options?: ICellRange.WatchOptions): IListener.Remove;
|
|
869
|
+
/**
|
|
870
|
+
* The one amend that creates a watch: its node, its grid and its body.
|
|
871
|
+
*
|
|
872
|
+
* @remarks
|
|
873
|
+
* Everything about the BODY is the node's ({@link WatchAnchor.reconcile},
|
|
874
|
+
* {@link WatchAnchor.deliver}). What is here is what every listener gets from the sheet: the
|
|
875
|
+
* node in the versioned map, the entry that holds its callbacks, and the removal.
|
|
876
|
+
* @internal
|
|
877
|
+
*/
|
|
878
|
+
protected _registerWatch(coords: IRange.Coords, expression: string, authoredAt: IRange.CellCoords, handlers: WatchAnchor.Handlers, arrayFirstCell: boolean): IListener.Remove;
|
|
879
|
+
/**
|
|
880
|
+
* Hold formulas that belong to no cell - a chart's series - in the calculation engine.
|
|
881
|
+
*
|
|
882
|
+
* @remarks
|
|
883
|
+
* Each is the body of a grid of its own, as a defined name's is, so the engine keeps its
|
|
884
|
+
* references on the cells they name: an insert or delete rewrites them, a cut carries them, a
|
|
885
|
+
* deleted sheet leaves `#REF!`, and undo puts all of it back. Every body demands its first cell
|
|
886
|
+
* only, so holding a reference to a column costs a pass one read, not the column.
|
|
887
|
+
*
|
|
888
|
+
* Registration waits for the engine and then amends the current commit, as a watch's does. An
|
|
889
|
+
* engine that is never started holds nothing, and the formulas read as they were handed over.
|
|
890
|
+
*
|
|
891
|
+
* A relative endpoint is an offset from a body that has no position, so it is left as written;
|
|
892
|
+
* chart formulas are absolute in every file Excel saves.
|
|
893
|
+
* @internal
|
|
894
|
+
*/
|
|
895
|
+
protected _holdFormulas(getExpressions: () => readonly string[]): Chart.HeldFormulas;
|
|
896
|
+
/**
|
|
897
|
+
* Carry every reference a cut encloses from its source to its destination.
|
|
898
|
+
*
|
|
899
|
+
* @remarks
|
|
900
|
+
* A cut moves cells, and everything that NAMES those cells goes with them - which is what the
|
|
901
|
+
* calc graph does for a formula precedent (`movePrecedents`), and what a range listener's
|
|
902
|
+
* reference and a watch's location must do for the same reason and by the same rule: the cut
|
|
903
|
+
* carries a reference only when it fully encloses it. Cut B2 to D5 and a listener on B2 reads
|
|
904
|
+
* D5; cut a block that merely clips the reference and it stays put, pointing at cells that are
|
|
905
|
+
* now empty.
|
|
906
|
+
*
|
|
907
|
+
* Called from the cut path beside the calc grid's own move, so the two land in one commit and
|
|
908
|
+
* one undo puts both back. A watch's body follows its node from the node's own address event
|
|
909
|
+
* at commit end (see {@link WatchAnchor.reconcile}).
|
|
910
|
+
*
|
|
911
|
+
* @param from The cut's source.
|
|
912
|
+
* @param to Where the cut's source lands.
|
|
913
|
+
* @internal
|
|
914
|
+
*/
|
|
915
|
+
protected _moveReferences(from: IRange.Coords, to: IRange.Coords): void;
|
|
916
|
+
/**
|
|
917
|
+
* Carries the tables a same-sheet cut moved to where the cut put them, as the same instances.
|
|
918
|
+
*
|
|
919
|
+
* @remarks
|
|
920
|
+
* A table moved this way is never deleted, so a handle to it, its name and the structured
|
|
921
|
+
* references to it all stay as they were, and one undo puts it back. Called after
|
|
922
|
+
* {@link _moveReferences}: the node a table watches its header through travels with the cut
|
|
923
|
+
* there, and the table re-registers what did not travel (the ring outside it) from where it now
|
|
924
|
+
* is. Each table is re-anchored by itself, so a table the cut does not carry is never split.
|
|
925
|
+
*
|
|
926
|
+
* @param tables The tables the cut encloses and moves.
|
|
927
|
+
* @param from The cut's source.
|
|
928
|
+
* @param to Where the cut's source lands.
|
|
929
|
+
* @internal
|
|
930
|
+
*/
|
|
931
|
+
protected _moveTables(tables: readonly ITable[], from: IRange.Coords, to: IRange.Coords): void;
|
|
932
|
+
/**
|
|
933
|
+
* Drop a node from the current snapshot.
|
|
934
|
+
*
|
|
935
|
+
* @remarks
|
|
936
|
+
* The same amend as registering. Older snapshots keep the entry; one whose callback is gone from
|
|
937
|
+
* the instance is inert, and is swept the next time this runs.
|
|
938
|
+
*
|
|
939
|
+
* @internal
|
|
940
|
+
*/
|
|
941
|
+
protected _removeListenerNode(node: ListenerAnchor): void;
|
|
942
|
+
/**
|
|
943
|
+
* Deliver to every node whose reference intersects what changed.
|
|
944
|
+
*
|
|
945
|
+
* @remarks
|
|
946
|
+
* A transactional node is told from inside the transaction, before the commit seals, so what it
|
|
947
|
+
* writes joins that commit; every other node is told once the store has settled. The two are
|
|
948
|
+
* never told from the same place, so `transactional` selects which half this call is for.
|
|
949
|
+
*
|
|
950
|
+
* `ranges` is the commit's change set, so a batch of operations is ONE change to a node: it is
|
|
951
|
+
* told once, carrying every range of the commit that reached it.
|
|
952
|
+
*
|
|
953
|
+
* @internal
|
|
954
|
+
*/
|
|
955
|
+
protected _notifyListenerNodes(state: State, ranges: readonly IRange.Coords[] | null, notificationOptions: NotifierOptions, transactional: boolean): void;
|
|
956
|
+
/**
|
|
957
|
+
* Deliver to every live node whose reference is no longer where it was.
|
|
958
|
+
*
|
|
959
|
+
* @remarks
|
|
960
|
+
* Nothing is compared against the log, and the direction the store moved does not matter. The
|
|
961
|
+
* map either holds the node - at whatever coords it has in THIS snapshot - or it does not, and
|
|
962
|
+
* each case answers itself: a difference from the coords last delivered is an `address` change,
|
|
963
|
+
* and no entry at all is `#N/A`, a world from before the node was registered.
|
|
964
|
+
*
|
|
965
|
+
* `transactional` selects which nodes this call is for (see {@link _notifyListenerNodes}). With
|
|
966
|
+
* `notificationOptions` `null` the nodes are only re-based - their last-delivered coords are set
|
|
967
|
+
* to this snapshot's without a delivery. That is a restore seen by a transactional node: it is
|
|
968
|
+
* never told about one, but the next forward move must be measured from where the restore left
|
|
969
|
+
* the reference, not from where it was before.
|
|
970
|
+
*
|
|
971
|
+
* @internal
|
|
972
|
+
*/
|
|
973
|
+
protected _notifyListenerNodeMoves(state: State, transactional: boolean, notificationOptions: NotifierOptions | null): void;
|
|
974
|
+
/**
|
|
975
|
+
* One delivery, after the option filters.
|
|
976
|
+
*
|
|
977
|
+
* @internal
|
|
978
|
+
*/
|
|
979
|
+
protected _deliverToNode(entry: ListenerNodeEntry, trigger: 'data' | 'address' | 'restore', notificationOptions: NotifierOptions, from?: readonly IRange.Coords[]): void;
|
|
639
980
|
/** @internal */
|
|
640
981
|
protected _notifyUsedRangeChange(): void;
|
|
641
982
|
/** @internal */
|
|
@@ -652,22 +993,28 @@ export declare class Sheet implements ISheet {
|
|
|
652
993
|
protected _notifyDataValidationsChange(): void;
|
|
653
994
|
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
654
995
|
protected _notifyProtectedRangesChange(): void;
|
|
996
|
+
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
997
|
+
protected _notifyCommentsChange(): void;
|
|
998
|
+
/**
|
|
999
|
+
* Presents one of the sheet's own events as a collection's `onCollectionChange`, and the
|
|
1000
|
+
* sheet's `onInvalidated` as the collection's, with the collection as the source of both.
|
|
1001
|
+
*
|
|
1002
|
+
* @remarks
|
|
1003
|
+
* The sheet keeps the state and fires the fine-grained event; the collection is a front over
|
|
1004
|
+
* it. Forwarding, rather than a second emitter, is what keeps the two from drifting apart.
|
|
1005
|
+
* @internal
|
|
1006
|
+
*/
|
|
1007
|
+
protected _forwardCollectionListeners(key: 'onTablesChange' | 'onConditionalFormatsChange' | 'onDataValidationsChange' | 'onProtectedRangesChange' | 'onCommentsChange', collection: () => ICollection<any>): (listeners: ICollection.IListeners, options?: IListener.Options) => IListener.Remove;
|
|
655
1008
|
/** {@inheritDoc ISheet.addListeners} */
|
|
656
1009
|
addListeners(listeners: ISheet.IListeners, options?: IListener.Options): IListener.Remove;
|
|
657
1010
|
/** @internal */
|
|
658
|
-
protected _addRangesListeners(ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions): IListener.Remove;
|
|
659
|
-
/** @internal */
|
|
660
|
-
protected _addRangesListeners2(ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options: ICellRange.ListenerOptions | undefined, isRanges: boolean): IListener.Remove;
|
|
661
|
-
/** @internal */
|
|
662
1011
|
protected _getUsedCoords(options?: ICellRange.GetRangeOptions): IRange.Coords | null;
|
|
663
1012
|
/** @internal */
|
|
664
1013
|
protected _getRangeStats(coords: readonly IRange.Coords[], iteratorOptions?: ICellRange.GetStatsOptions): IRangeStats;
|
|
665
1014
|
/** @internal */
|
|
666
1015
|
protected _isContentful(ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis): boolean;
|
|
667
|
-
/** @internal */
|
|
668
|
-
protected _getCount(coords: IRange.Coords[], ignoreHidden?: boolean): number;
|
|
669
1016
|
/**
|
|
670
|
-
* Legacy Content-keyed counting — internal callers only (`clear` preflight
|
|
1017
|
+
* Legacy Content-keyed counting — internal callers only (`clear` preflight).
|
|
671
1018
|
* The public path is `_featureCounts`, keyed by `ICellRange.Feature`.
|
|
672
1019
|
* @internal
|
|
673
1020
|
*/
|
|
@@ -698,7 +1045,17 @@ export declare class Sheet implements ISheet {
|
|
|
698
1045
|
* removing it would answer a different question than "what does this block read".
|
|
699
1046
|
* @internal
|
|
700
1047
|
*/
|
|
701
|
-
protected _dependencyRanges(coords: IRange.Coords, kind: 'precedents' | 'dependents', direct: boolean): ICellRanges | null
|
|
1048
|
+
protected _dependencyRanges(coords: IRange.Coords, kind: 'precedents' | 'dependents', direct: boolean): Promise<ICellRanges | null>;
|
|
1049
|
+
/**
|
|
1050
|
+
* Name ids -> the range objects that carry them in a graph answer.
|
|
1051
|
+
*
|
|
1052
|
+
* @remarks
|
|
1053
|
+
* The id half of step 3. Liveness and "is this actually a name" were already applied by the
|
|
1054
|
+
* grid; an id that no longer resolves simply drops. Each node is anchored on ITS OWN sheet
|
|
1055
|
+
* (the name's defining cell), which is why the internal is re-resolved per id.
|
|
1056
|
+
* @internal
|
|
1057
|
+
*/
|
|
1058
|
+
private _namedGraphRanges;
|
|
702
1059
|
/**
|
|
703
1060
|
* Calc-currency scopes → range-currency scopes: the boundary the whole scope model rests on.
|
|
704
1061
|
*
|
|
@@ -736,10 +1093,8 @@ export declare class Sheet implements ISheet {
|
|
|
736
1093
|
* requested features are elided. `features` arrives already resolved (`resolveRegionFeatures`).
|
|
737
1094
|
*
|
|
738
1095
|
* Known v1 bounds, recorded in AGENT-PLAN B2: the blank/complement side of the partition is
|
|
739
|
-
* not yielded
|
|
740
|
-
*
|
|
741
|
-
* projection ignores). Every requested feature partitions — there is no unsupported-feature
|
|
742
|
-
* throw left in this function.
|
|
1096
|
+
* not yielded. Every requested feature partitions — there is no unsupported-feature throw left
|
|
1097
|
+
* in this function.
|
|
743
1098
|
* @internal
|
|
744
1099
|
*/
|
|
745
1100
|
protected _featureRegions(bounds: IRange.Coords, requested: readonly ICellRange.Feature[], options?: ICellRange.GetRegionsOptions): IRange.Coords[];
|
|
@@ -751,6 +1106,12 @@ export declare class Sheet implements ISheet {
|
|
|
751
1106
|
protected _find(ranges: readonly IRange.Coords[], options: string | ICellRange.FindOptions): Iterator<ICell>;
|
|
752
1107
|
/** {@inheritDoc ISheet.getRuntime} */
|
|
753
1108
|
getRuntime(): IRuntime;
|
|
1109
|
+
/**
|
|
1110
|
+
* The region a bare-cursor traverse from `cell` wraps within, or `null` for a plain move. A table
|
|
1111
|
+
* under the cursor answers for itself.
|
|
1112
|
+
* @internal
|
|
1113
|
+
*/
|
|
1114
|
+
protected _getTraverseRegion(cell: IRange.CellCoords, axis: IRange.Axis, reverse: boolean): IRange.Coords | null;
|
|
754
1115
|
/** @internal */
|
|
755
1116
|
protected _surroundingRegion(range: IRange.Coords, options?: ICellRange.GetSurroundingOptions): IRange.Coords;
|
|
756
1117
|
/** @internal */
|
|
@@ -780,8 +1141,201 @@ export declare class Sheet implements ISheet {
|
|
|
780
1141
|
scrollTo(coords: Partial<IRange.Coords>, options?: ISheet.ScrollToOptions): Promise<boolean>;
|
|
781
1142
|
/** @internal */
|
|
782
1143
|
protected _resolveSelectOptions(selectOptions: boolean | ICellRange.SelectOptions, axis?: IRange.Axis): ICellRange.SelectOptions | null;
|
|
783
|
-
/**
|
|
784
|
-
|
|
1144
|
+
/**
|
|
1145
|
+
* Record the operation's directives over what it produced, then commit.
|
|
1146
|
+
*
|
|
1147
|
+
* @remarks
|
|
1148
|
+
* `options` is the object the operation was handed, so what it declares through
|
|
1149
|
+
* {@link ICellRange.OperationOptions} is what is honored here: `autoSelect` names where the
|
|
1150
|
+
* operation leaves the user, `autoFit` fits the ranges it produced. Both are read from the one
|
|
1151
|
+
* object, so an operation cannot accept a directive it then ignores.
|
|
1152
|
+
*
|
|
1153
|
+
* @internal
|
|
1154
|
+
*/
|
|
1155
|
+
protected _commitWithDirectives(trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives): void;
|
|
1156
|
+
/**
|
|
1157
|
+
* Declare where the operation leaves the user, and where an undo of it lands when that is not
|
|
1158
|
+
* the same place.
|
|
1159
|
+
*
|
|
1160
|
+
* @param selection Where the operation leaves the user - what it acted on, or what it produced
|
|
1161
|
+
* when that is somewhere else (a paste fitted to its source). Also where a redo lands.
|
|
1162
|
+
* @param options The operation's own options, passed through as they were given: its `autoSelect`
|
|
1163
|
+
* and `autoSelectRestore`.
|
|
1164
|
+
* @param undo Where an undo lands, when it is not `selection`: a cut-drag and an insert-from
|
|
1165
|
+
* undo to the SOURCE, an auto-fill to the TEMPLATE it was dragged from.
|
|
1166
|
+
*
|
|
1167
|
+
* @remarks
|
|
1168
|
+
* A declaration, never an action: every operation declares, whatever it was asked, and whether
|
|
1169
|
+
* the view moves - now, on undo or on redo - is decided once, when the commit closes
|
|
1170
|
+
* ({@link resolveSelection}).
|
|
1171
|
+
*
|
|
1172
|
+
* @internal
|
|
1173
|
+
*/
|
|
1174
|
+
protected _recordSelection(trans: ITransaction, selection: Partial<IRangeSelection.Coords>, options?: Pick<ICellRange.OperationOptions, 'autoSelect' | 'autoSelectRestore'> | null, undo?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis): void;
|
|
1175
|
+
/**
|
|
1176
|
+
* Where an undo or a redo of a commit puts this sheet's view, or `null` when it leaves it
|
|
1177
|
+
* alone. See {@link resolveSelection}.
|
|
1178
|
+
*
|
|
1179
|
+
* @remarks
|
|
1180
|
+
* A sheet can be shown through more than one view, and a view instance is replaced on load and
|
|
1181
|
+
* by {@link setView}, so the match is on {@link ISheetView.getId}.
|
|
1182
|
+
*
|
|
1183
|
+
* @internal
|
|
1184
|
+
*/
|
|
1185
|
+
protected _restoredSelection(intents: Readonly<Record<string, any>> | undefined, isUndo: boolean): {
|
|
1186
|
+
selection: Partial<IRangeSelection.Coords>;
|
|
1187
|
+
options: boolean | ICellRange.SelectOptions;
|
|
1188
|
+
} | null;
|
|
1189
|
+
/**
|
|
1190
|
+
* Record what this operation has to announce when it lands, under one category.
|
|
1191
|
+
*
|
|
1192
|
+
* @remarks
|
|
1193
|
+
* Recorded as the `sheet.events` intent on the ROOT and unioned there, so a batch of operations
|
|
1194
|
+
* announces all of them rather than the last. Keyed by {@link getId}, so a commit that spans
|
|
1195
|
+
* sheets announces each sheet separately. The intent travels on the commit, which is what lets
|
|
1196
|
+
* an undo deliver the same categories the forward commit did.
|
|
1197
|
+
*
|
|
1198
|
+
* Copy-on-write: an amend's accumulator is handed the value on the commit it folds into, and
|
|
1199
|
+
* mutating that would announce the whole of the target commit rather than what the amend
|
|
1200
|
+
* recorded - which is what makes a registration amend silent. The range list is the exception
|
|
1201
|
+
* once this operation has made its own ({@link _appendOwnedRanges}): one write per cell in a
|
|
1202
|
+
* batch would otherwise copy every range recorded so far on each of them.
|
|
1203
|
+
*
|
|
1204
|
+
* @internal
|
|
1205
|
+
*/
|
|
1206
|
+
protected _recordChange(trans: ITransaction, category: EventCategory, ranges: readonly IRange.Coords[] | null | undefined): void;
|
|
1207
|
+
/**
|
|
1208
|
+
* Record the ranges a formula was entered over.
|
|
1209
|
+
*
|
|
1210
|
+
* @remarks
|
|
1211
|
+
* A subset of the `data` category that no event fires for: it is what the calculation's amend
|
|
1212
|
+
* formats and fits once the results exist ({@link _promoteCalcResults}). Unioned and written
|
|
1213
|
+
* copy-on-write for the same reasons as {@link _recordChange}.
|
|
1214
|
+
*
|
|
1215
|
+
* @internal
|
|
1216
|
+
*/
|
|
1217
|
+
protected _recordFormulasEntered(trans: ITransaction, ranges: readonly IRange.Coords[] | null | undefined): void;
|
|
1218
|
+
/**
|
|
1219
|
+
* This sheet's half of what a commit announces.
|
|
1220
|
+
*
|
|
1221
|
+
* @internal
|
|
1222
|
+
*/
|
|
1223
|
+
protected _sheetEvents(intents: Readonly<Record<string, any>> | undefined): SheetEvents | null;
|
|
1224
|
+
/**
|
|
1225
|
+
* Every range this sheet announces from a commit, across the given categories (all of them when
|
|
1226
|
+
* `categories` is omitted).
|
|
1227
|
+
*
|
|
1228
|
+
* @remarks
|
|
1229
|
+
* The union is what a consumer asking "did anything happen in my box" wants, and taking it over
|
|
1230
|
+
* every category is what keeps a category added later from silently ceasing to reach one.
|
|
1231
|
+
*
|
|
1232
|
+
* @internal
|
|
1233
|
+
*/
|
|
1234
|
+
protected _changedRanges(intents: Readonly<Record<string, any>> | undefined, categories?: readonly EventCategory[]): readonly IRange.Coords[] | null;
|
|
1235
|
+
/**
|
|
1236
|
+
* Record ranges to fit when the operation completes.
|
|
1237
|
+
*
|
|
1238
|
+
* @remarks
|
|
1239
|
+
* The fit is a union over the operation: entries for the same sheet and the same options
|
|
1240
|
+
* accumulate ranges, so a batch measures each column once, at the end, against the finished
|
|
1241
|
+
* content. Resolved by {@link _resolveAutoFit} as the operation's last write.
|
|
1242
|
+
*
|
|
1243
|
+
* @internal
|
|
1244
|
+
*/
|
|
1245
|
+
protected _recordAutoFit(trans: ITransaction, ranges: readonly IRange.Coords[], autoFit: boolean | ICellRange.AutoFitOptions): void;
|
|
1246
|
+
/**
|
|
1247
|
+
* Record that the formulas this operation enters take the number format their results carry.
|
|
1248
|
+
*
|
|
1249
|
+
* @remarks
|
|
1250
|
+
* Resolved by the calculation's amend into this commit rather than when the operation
|
|
1251
|
+
* completes: the results do not exist yet. See {@link IntentAutoFormat}.
|
|
1252
|
+
*
|
|
1253
|
+
* @internal
|
|
1254
|
+
*/
|
|
1255
|
+
protected _recordAutoFormat(trans: ITransaction): void;
|
|
1256
|
+
/**
|
|
1257
|
+
* Record that this operation has ruled on its own protection, so the commit-time catch-all
|
|
1258
|
+
* stands down. See {@link IntentSkipProtectionCheck}.
|
|
1259
|
+
*
|
|
1260
|
+
* @internal
|
|
1261
|
+
*/
|
|
1262
|
+
protected _recordSkipProtectionCheck(trans: ITransaction): void;
|
|
1263
|
+
/**
|
|
1264
|
+
* Record that this commit is a load of the sheet: not a user's write, so the protection check
|
|
1265
|
+
* stands down, and not an edit, so nothing it wrote is announced. See {@link IntentInitial}.
|
|
1266
|
+
*
|
|
1267
|
+
* @internal
|
|
1268
|
+
*/
|
|
1269
|
+
protected _recordInitial(trans: ITransaction): void;
|
|
1270
|
+
/**
|
|
1271
|
+
* Record where the freeze panes were and where the operation moved them. See
|
|
1272
|
+
* {@link FreezePanesIntent} for how a batch merges the pair.
|
|
1273
|
+
*
|
|
1274
|
+
* @internal
|
|
1275
|
+
*/
|
|
1276
|
+
protected _recordFreezePanes(trans: ITransaction, before: IRange.CellCoords, after: IRange.CellCoords): void;
|
|
1277
|
+
/**
|
|
1278
|
+
* Record the movable selection an undo (`before`) or a redo (`after`) of this operation lands
|
|
1279
|
+
* on. See {@link MovableSelectionIntent} for how a batch merges the pair.
|
|
1280
|
+
*
|
|
1281
|
+
* @remarks
|
|
1282
|
+
* Records against the operation that is open when no transaction is handed in, which is how
|
|
1283
|
+
* {@link ISheetView.recordMovableSelection} reaches it; with nothing open there is nothing to
|
|
1284
|
+
* record against and this does nothing.
|
|
1285
|
+
*
|
|
1286
|
+
* @internal
|
|
1287
|
+
*/
|
|
1288
|
+
protected _recordMovableSelection(when: 'before' | 'after', movables: readonly IMovable[], trans?: ITransaction): void;
|
|
1289
|
+
/**
|
|
1290
|
+
* The movable selection to restore for an undo or a redo, or `null` when the operation recorded
|
|
1291
|
+
* none, or recorded it against another sheet or another view.
|
|
1292
|
+
*
|
|
1293
|
+
* @internal
|
|
1294
|
+
*/
|
|
1295
|
+
protected _restoredMovableSelection(intents: Readonly<Record<string, any>> | undefined, isUndo: boolean): readonly IMovable[] | null;
|
|
1296
|
+
/**
|
|
1297
|
+
* Fold writes into the current commit without a log entry. See `IStore.amend`.
|
|
1298
|
+
* @internal
|
|
1299
|
+
*/
|
|
1300
|
+
protected _amendCurrent<R>(callback: () => R): R;
|
|
1301
|
+
/**
|
|
1302
|
+
* An amend the sheet makes for itself (a listener node, a watch, a promoted calc result) is not
|
|
1303
|
+
* a user's write, so a protected sheet must not refuse it. Only an amend that opens its own
|
|
1304
|
+
* root stands the check down; nested, it joins an operation that answers for itself.
|
|
1305
|
+
* @internal
|
|
1306
|
+
*/
|
|
1307
|
+
protected _amendBookkeeping<R>(commitId: string, callback: (commit: ITransaction.ICommit) => R): R;
|
|
1308
|
+
/**
|
|
1309
|
+
* Fit the ranges the operation asked for, as its last write.
|
|
1310
|
+
*
|
|
1311
|
+
* @remarks
|
|
1312
|
+
* Runs while the root transaction is still open so the sizes belong to the same commit as the
|
|
1313
|
+
* content they measure - one undo puts both back. The intent is left on the record: it is what
|
|
1314
|
+
* a redo fits from.
|
|
1315
|
+
*
|
|
1316
|
+
* @internal
|
|
1317
|
+
*/
|
|
1318
|
+
protected _resolveAutoFit(commit: ITransaction.ICommit): void;
|
|
1319
|
+
/**
|
|
1320
|
+
* Resolve the operation's directives once its root transaction has closed.
|
|
1321
|
+
*
|
|
1322
|
+
* @internal
|
|
1323
|
+
*/
|
|
1324
|
+
protected _onRootTransactionClose(commit: ITransaction.ICommit): void;
|
|
1325
|
+
/**
|
|
1326
|
+
* Keep the view's selection somewhere it can be once the sheet has changed: inside the sheet,
|
|
1327
|
+
* and with its active cell on the top-left of the merge it falls in.
|
|
1328
|
+
*
|
|
1329
|
+
* @param isMergesChanged Whether the change merged anything, which is the only way the active
|
|
1330
|
+
* cell comes to sit inside a merge.
|
|
1331
|
+
*
|
|
1332
|
+
* @remarks
|
|
1333
|
+
* A correction of the view, not an operation's selection: it applies whoever made the change,
|
|
1334
|
+
* and is not undone with it.
|
|
1335
|
+
*
|
|
1336
|
+
* @internal
|
|
1337
|
+
*/
|
|
1338
|
+
protected _normalizeSelection(isMergesChanged: boolean): void;
|
|
785
1339
|
/** @internal */
|
|
786
1340
|
protected _autoSelect(options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis): Promise<IRange.Coords[]>;
|
|
787
1341
|
/** {@inheritDoc ISheet.getSelection} */
|
|
@@ -800,10 +1354,32 @@ export declare class Sheet implements ISheet {
|
|
|
800
1354
|
getTabColor(): IColor;
|
|
801
1355
|
/** {@inheritDoc ISheet.setTabColor} */
|
|
802
1356
|
setTabColor(color: IColor | string | null): this;
|
|
1357
|
+
/** {@inheritDoc ISheet.getCodeName} */
|
|
1358
|
+
getCodeName(): string | null;
|
|
1359
|
+
/** {@inheritDoc ISheet.getOutlineSettings} */
|
|
1360
|
+
getOutlineSettings(): Readonly<ISheet.OutlineSettings>;
|
|
1361
|
+
/** {@inheritDoc ISheet.isConditionalFormatCalculationEnabled} */
|
|
1362
|
+
isConditionalFormatCalculationEnabled(): boolean;
|
|
1363
|
+
/**
|
|
1364
|
+
* A sheet's scripts are workbook structure, like the workbook's own.
|
|
1365
|
+
* @internal
|
|
1366
|
+
*/
|
|
1367
|
+
protected _isModulesReadOnly(): boolean;
|
|
1368
|
+
/** {@inheritDoc ISheet.getModules} */
|
|
1369
|
+
getModules(): IModuleCollection;
|
|
803
1370
|
/** {@inheritDoc ISheet.getRowHeaders} */
|
|
804
1371
|
getRowHeaders(): ISheetHeader;
|
|
805
1372
|
/** {@inheritDoc ISheet.getColumnHeaders} */
|
|
806
1373
|
getColumnHeaders(): ISheetHeader;
|
|
1374
|
+
/**
|
|
1375
|
+
* The sheet's grid, whatever the calculation hands back (DESIGN-CALC-SERVICE §5): opened from
|
|
1376
|
+
* `json` (§6.6), the file's formulas, array extents and cached values, trusted. What the engine
|
|
1377
|
+
* makes of them arrives through the grid's `onComplete`, before this returns when the engine is
|
|
1378
|
+
* `Running`. The grid holds every cell map, and answers an `Off` save and a start's seed itself.
|
|
1379
|
+
* A snapshot sheet over another sheet's state (a copy) shares the grid: the owner answers, with
|
|
1380
|
+
* the state as it is now.
|
|
1381
|
+
*/
|
|
1382
|
+
protected _openCalcGrid(json: ICalcGrid.JSON | undefined): ICalcGrid;
|
|
807
1383
|
/** {@inheritDoc ISheet.toJSON} */
|
|
808
1384
|
toJSON(options?: ISheet.ToJSONOptions): Promise<ISheet.JSON>;
|
|
809
1385
|
/** {@inheritDoc ISheet.getStyles} */
|
|
@@ -831,6 +1407,8 @@ export declare class Sheet implements ISheet {
|
|
|
831
1407
|
setPicture(picture: string | IResource | IResourceCollection.AddOptions | null, options?: ITransaction.OperationOptions): this;
|
|
832
1408
|
/** {@inheritDoc ISheet.getPicture} */
|
|
833
1409
|
getPicture(): IPicture | null;
|
|
1410
|
+
/** {@inheritDoc ISheet.getPivotTables} */
|
|
1411
|
+
getPivotTables(): IPivotTableCollection;
|
|
834
1412
|
/** {@inheritDoc ISheet.getTables} */
|
|
835
1413
|
getTables(): ITableCollection;
|
|
836
1414
|
/** {@inheritDoc ISheet.getDataValidations} */
|
|
@@ -839,12 +1417,30 @@ export declare class Sheet implements ISheet {
|
|
|
839
1417
|
getConditionalFormats(): IConditionalFormatCollection;
|
|
840
1418
|
/** {@inheritDoc ISheet.getProtectedRanges} */
|
|
841
1419
|
getProtectedRanges(): IProtectedRangeCollection;
|
|
1420
|
+
/** {@inheritDoc ISheet.getComments} */
|
|
1421
|
+
getComments(): ICommentCollection;
|
|
842
1422
|
/** @deprecated Use {@link ISheet.getConditionalFormats} */
|
|
843
1423
|
getConditionals(): IConditionalFormatCollection;
|
|
844
1424
|
/** {@inheritDoc ISheet.getMovables} */
|
|
845
1425
|
getMovables(): IMovableCollection;
|
|
1426
|
+
/** {@inheritDoc ISheet.getCharts} */
|
|
1427
|
+
getCharts(): IChartCollection;
|
|
846
1428
|
/** @internal */
|
|
847
|
-
protected _validateOrRemoveOverlaps(rangeCoords: IRange.Coords, type: string, table?: ITable | null, removeIfContains?: boolean): void;
|
|
1429
|
+
protected _validateOrRemoveOverlaps(rangeCoords: IRange.Coords, type: string, table?: ITable | null, removeIfContains?: boolean, absorbAutoTable?: boolean): void;
|
|
1430
|
+
/**
|
|
1431
|
+
* The filter and sort criteria a sheet AutoFilter hands over to a table built in its place.
|
|
1432
|
+
*
|
|
1433
|
+
* @remarks
|
|
1434
|
+
* Read BEFORE `_validateOrRemoveOverlaps` absorbs the AutoFilter and replayed once the table
|
|
1435
|
+
* exists. Excel moves them across only when the table takes EXACTLY the AutoFilter's range —
|
|
1436
|
+
* probed: one extra row or column, or a shifted start, and the new table starts clean. Answers
|
|
1437
|
+
* `null` when there is nothing to carry, which is the common case.
|
|
1438
|
+
* @internal
|
|
1439
|
+
*/
|
|
1440
|
+
protected _getAutoTableCarryOver(rangeCoords: IRange.Coords): {
|
|
1441
|
+
conditions: ICondition.Input[];
|
|
1442
|
+
sorts: ISort.Options[];
|
|
1443
|
+
} | null;
|
|
848
1444
|
/**
|
|
849
1445
|
* Used by the TableCollection wrapper so we resolve ICellRange.Address here
|
|
850
1446
|
* @internal
|
|
@@ -862,7 +1458,12 @@ export declare class Sheet implements ISheet {
|
|
|
862
1458
|
toJSON(): J | null;
|
|
863
1459
|
}, J extends object>(add: ICellRanges.Address | T | null | undefined, options: (IAnchored.AddOptions & J) | undefined, spec: {
|
|
864
1460
|
/** The sheet-state slot the collection lives in. */
|
|
865
|
-
key: 'conditionalFormats' | 'dataValidations' | 'protectedRanges';
|
|
1461
|
+
key: 'conditionalFormats' | 'dataValidations' | 'protectedRanges' | 'comments';
|
|
1462
|
+
/**
|
|
1463
|
+
* The sheet-protection allowances the add needs. Empty when no option allows it, so the add is
|
|
1464
|
+
* refused whenever the sheet is locked.
|
|
1465
|
+
*/
|
|
1466
|
+
allowance: ISheetProtection.PropertyKeys[];
|
|
866
1467
|
isItem: (add: unknown) => add is T;
|
|
867
1468
|
description: string;
|
|
868
1469
|
/** Loads one ref into the map, handing the created model to `capture`. */
|
|
@@ -897,6 +1498,10 @@ export declare class Sheet implements ISheet {
|
|
|
897
1498
|
* @internal
|
|
898
1499
|
*/
|
|
899
1500
|
protected _addProtectedRange(add: ICellRanges.Address | IProtectedRange, options?: IProtectedRangeCollection.AddOptions): IProtectedRange;
|
|
1501
|
+
/**
|
|
1502
|
+
* @internal
|
|
1503
|
+
*/
|
|
1504
|
+
protected _addComment(address: ICellRange.Address, content: IComment.Content, options?: ICommentCollection.AddOptions): IComment;
|
|
900
1505
|
/** {@inheritDoc ISheet.createCell} */
|
|
901
1506
|
createCell(update: ICell.Update, coords?: IRange.CellCoords | null): ICell;
|
|
902
1507
|
/** @internal */
|
|
@@ -924,8 +1529,6 @@ export declare class Sheet implements ISheet {
|
|
|
924
1529
|
protected _getRangedEntries<T, E = T>(spatial: ISpatialQuery, ranges: readonly IRange.Coords[], options?: GetTypedRangeOptions<T, E>, spatialSort?: boolean): T[];
|
|
925
1530
|
/** @internal */
|
|
926
1531
|
protected _processAnchorShift<T extends Anchored.Entry<any>>(options: ISpatialMap.ShiftDetails<T>): ISpatialMap.Entry<T> | null;
|
|
927
|
-
/** @internal */
|
|
928
|
-
protected _processListenerShift(rangesListenerMap: Map<number, ICellRangesListenerEntry>, beforeAfterMap: Map<number, BeforeAfterRange>, beforeStates: Map<number, ICellRangesListenerEntry>, options: ISpatialMap.ShiftDetails<ICellRangeListenerEntry>): ISpatialMap.Entry<ICellRangeListenerEntry>[] | void;
|
|
929
1532
|
/** {@inheritDoc ISheet.delete} */
|
|
930
1533
|
delete(): void;
|
|
931
1534
|
/** {@inheritDoc ITransaction.ITransactional.doBatch} */
|
|
@@ -946,12 +1549,10 @@ export declare class Sheet implements ISheet {
|
|
|
946
1549
|
*/
|
|
947
1550
|
_getStateId(): string;
|
|
948
1551
|
/** @internal */
|
|
949
|
-
protected _beginCommit(options?: ITransaction.StoreOperationOptions
|
|
1552
|
+
protected _beginCommit(options?: ITransaction.StoreOperationOptions | string): ITransaction;
|
|
950
1553
|
/** @internal */
|
|
951
1554
|
protected _updateState(updateState?: Partial<State>, options?: ITransaction.OperationOptions | string): State;
|
|
952
1555
|
/** @internal */
|
|
953
|
-
protected _addEvent(type: keyof CommitEvents, value: any): void;
|
|
954
|
-
/** @internal */
|
|
955
1556
|
protected _getScalar(rowIndex: number, columnIndex: number, asJSDate?: boolean): Scalar | InteropScalar;
|
|
956
1557
|
/**
|
|
957
1558
|
* This is mostly optimized except for scrolling. On scroll y it must requery. We could debounce this.
|
|
@@ -966,6 +1567,15 @@ export declare class Sheet implements ISheet {
|
|
|
966
1567
|
* @internal
|
|
967
1568
|
*/
|
|
968
1569
|
protected _getCellAt(rowIndex: number, colIndex: number): ICell;
|
|
1570
|
+
/**
|
|
1571
|
+
* The cell as `state` has it, or - for `held` - as the held write to it leaves it.
|
|
1572
|
+
*
|
|
1573
|
+
* @returns `null` if the write has to be made to know: the cell has a formula or a calculation
|
|
1574
|
+
* status the write changes, or a style update that reaches past the cell (see
|
|
1575
|
+
* `intersectionAfterStyleUpdate`).
|
|
1576
|
+
* @internal
|
|
1577
|
+
*/
|
|
1578
|
+
protected _getCellAtState(state: Readonly<State>, transaction: ITransaction | null, rowIndex: number, colIndex: number, held: CellBuffer.HeldCell | null): ICell | null;
|
|
969
1579
|
protected _queryStyle(anchorCoords: IRange.Coords, cellOptions: SheetCellOptions, extent?: IRange.Coords): IStyle;
|
|
970
1580
|
/**
|
|
971
1581
|
* @param updateStyles Replaces the write half of the returned style. A style READS from the
|
|
@@ -991,6 +1601,19 @@ export declare class Sheet implements ISheet {
|
|
|
991
1601
|
* @internal
|
|
992
1602
|
*/
|
|
993
1603
|
protected _initListenerState(): void;
|
|
1604
|
+
/**
|
|
1605
|
+
* Re-derive everything that is a function of how a cell *paints* rather than of what it holds:
|
|
1606
|
+
* the default font metrics, the layout, and the header sizes fitted to that paint.
|
|
1607
|
+
*
|
|
1608
|
+
* @remarks
|
|
1609
|
+
* The theme is the familiar case. A language or locale switch is the same shape — the cell
|
|
1610
|
+
* paints a different word (`WAHR`, `#WERT!`, `15.03.2023`) for a value that never changed — so
|
|
1611
|
+
* the columns fitted to the old word are stale, and nothing below the sheet is told otherwise.
|
|
1612
|
+
* The fit only grows: a maintenance pass must never take back a width the sheet already had.
|
|
1613
|
+
*
|
|
1614
|
+
* @internal
|
|
1615
|
+
*/
|
|
1616
|
+
protected _invalidateRendering(): void;
|
|
994
1617
|
/** @internal */
|
|
995
1618
|
protected _initViewState(entireCoords: IRange.Coords, json: ISheetView.JSON): void;
|
|
996
1619
|
protected _initCellState(): void;
|
|
@@ -1003,6 +1626,13 @@ export declare class Sheet implements ISheet {
|
|
|
1003
1626
|
/** @internal */
|
|
1004
1627
|
protected _createProtectedRanges(protectedRanges: IAnchoredMap<IProtectedRange, IProtectedRange.JSON>, key: keyof State, refs: IRange.JSONReference<IProtectedRange.JSON>[], createModel: (options: ProtectedRange.ConstructorOptions) => IProtectedRange, addListeners?: (model: IProtectedRange) => IListener.Remove): IAnchoredMap<IProtectedRange, IProtectedRange.JSON>;
|
|
1005
1628
|
/** @internal */
|
|
1629
|
+
protected _createComments(comments: IAnchoredMap<IComment, IComment.JSON>, key: keyof State, refs: IRange.JSONReference<IComment.JSON>[], createModel: (options: Comment.ConstructorOptions) => IComment, addListeners?: (model: IComment) => IListener.Remove): IAnchoredMap<IComment, IComment.JSON>;
|
|
1630
|
+
/**
|
|
1631
|
+
* The JSON for a comment authored now: modifiers with an id, an author and a date minted.
|
|
1632
|
+
* @internal
|
|
1633
|
+
*/
|
|
1634
|
+
protected _newCommentJSON(modifiers: IComment.Modifiers): IComment.JSON;
|
|
1635
|
+
/** @internal */
|
|
1006
1636
|
protected _createMovableEntry(json: IMovable.JSON, zIndex: number, fromResourceId?: (resourceId: number) => IResource): ISpatialMap.Entry<MovableEntry>;
|
|
1007
1637
|
/** @internal */
|
|
1008
1638
|
protected _fromJSON(json: ISheet.JSON | undefined, disableLoadAutoFit?: boolean): void;
|
|
@@ -1032,9 +1662,9 @@ export declare class Sheet implements ISheet {
|
|
|
1032
1662
|
/** {@inheritDoc ISheet.getCalculation} */
|
|
1033
1663
|
getCalculation(): ICalculation;
|
|
1034
1664
|
/** {@inheritDoc ISheet.createFormula} */
|
|
1035
|
-
createFormula(expression: string, coords?: Partial<IRange.CellCoords
|
|
1665
|
+
createFormula(expression: string, coords?: Partial<IRange.CellCoords>, options?: ICalculation.CreateFormulaOptions): ICalculation.IFormula;
|
|
1036
1666
|
/** {@inheritDoc ISheet.evaluate} */
|
|
1037
|
-
evaluate(expression: string, options?: number | ICalculation.EvaluateOptions & Partial<IRange.CellCoords>): Promise<Scalar | IRange>;
|
|
1667
|
+
evaluate(expression: string, options?: number | ICalculation.EvaluateOptions & Partial<IRange.CellCoords> & ICalculation.CreateFormulaOptions): Promise<Scalar | IRange>;
|
|
1038
1668
|
/** {@inheritDoc ISheet.whenCalculationReady} */
|
|
1039
1669
|
whenCalculationReady(): Promise<ICalculation.Status>;
|
|
1040
1670
|
/** {@inheritDoc ISheet.getWorkbook} */
|
|
@@ -1054,7 +1684,19 @@ export declare class Sheet implements ISheet {
|
|
|
1054
1684
|
* @internal
|
|
1055
1685
|
*/
|
|
1056
1686
|
export declare function createCellRangeCounts(counts: Readonly<Record<ICellRange.Feature, number>>): ICellRange.Counts;
|
|
1687
|
+
/**
|
|
1688
|
+
* Used for signalling tupleUpdate was called via private apis.
|
|
1689
|
+
* This allows use to 'avoid side effects' and skip validation checks.
|
|
1690
|
+
* @internal
|
|
1691
|
+
*/
|
|
1057
1692
|
interface NotifierOptions {
|
|
1693
|
+
/**
|
|
1694
|
+
* Which error an invalid source reports - `#REF!` when the cells were deleted, `#N/A` when the
|
|
1695
|
+
* world predates the listener.
|
|
1696
|
+
*
|
|
1697
|
+
* @defaultValue `#REF!`
|
|
1698
|
+
*/
|
|
1699
|
+
invalidError?: string;
|
|
1058
1700
|
isDataChange?: boolean;
|
|
1059
1701
|
getTransactionId: () => string;
|
|
1060
1702
|
isUndo?: boolean;
|
|
@@ -1073,35 +1715,28 @@ interface TableColumnHeaders {
|
|
|
1073
1715
|
lastRowIndex: number;
|
|
1074
1716
|
lastColIndex: number;
|
|
1075
1717
|
}
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1718
|
+
/**
|
|
1719
|
+
* A live range listener: its node in the versioned map, and the callback the map must never hold.
|
|
1720
|
+
* @internal
|
|
1721
|
+
*/
|
|
1722
|
+
interface ListenerNodeEntry {
|
|
1723
|
+
node: ListenerAnchor;
|
|
1724
|
+
handler: ICellRange.Listener | null;
|
|
1725
|
+
handlerW: WeakRef<ICellRange.Listener> | null;
|
|
1726
|
+
options: ICellRange.ListenerOptions;
|
|
1727
|
+
/** The coords last delivered, so a restore can tell whether the reference moved. */
|
|
1728
|
+
lastCoords: IRange.Coords[] | null;
|
|
1729
|
+
/** Present when the node is a {@link WatchAnchor}: what the watch is told. */
|
|
1730
|
+
watch?: WatchAnchor.Handlers;
|
|
1080
1731
|
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
ranges?: readonly IRange.FixableCoords[];
|
|
1090
|
-
events?: CommitEvents;
|
|
1091
|
-
formulas?: readonly IRange.FixableCoords[];
|
|
1092
|
-
spills?: readonly IRange.FixableCoords[];
|
|
1093
|
-
/**
|
|
1094
|
-
* Special case for range listeners that monitored a remove.
|
|
1095
|
-
*/
|
|
1096
|
-
merges?: readonly IRange.FixableCoords[];
|
|
1097
|
-
listeners?: Map<number, BeforeAfterRange>;
|
|
1098
|
-
table?: ITable;
|
|
1099
|
-
/** If `true` then don't do protection check. (For example load or range listeners) */
|
|
1100
|
-
skipProtectionCheck?: boolean;
|
|
1101
|
-
/**
|
|
1102
|
-
* We update values (cache, potentially styling, as a result of calculations)
|
|
1103
|
-
*/
|
|
1104
|
-
calculationSideEffect?: boolean;
|
|
1732
|
+
/**
|
|
1733
|
+
* A run of formula cells with the references they inherit a number format from, relative to the
|
|
1734
|
+
* run's top-left ({@link ICalcGrid.Results.formatInserts}) - what `Sheet._resolveInheritedFormats`
|
|
1735
|
+
* resolves.
|
|
1736
|
+
*/
|
|
1737
|
+
interface EnteredBlock {
|
|
1738
|
+
coords: IRange.Coords;
|
|
1739
|
+
references: readonly IRange.FixableCoords[];
|
|
1105
1740
|
}
|
|
1106
1741
|
export {};
|
|
1107
1742
|
//# sourceMappingURL=Sheet.d.ts.map
|