@sheetxl/sdk 0.7.28-beta.4 → 0.8.0-beta.10
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/esm/{DBIu6NUHIcxOOBQp.mjs → BEAY9XgKNx-bakXW.mjs} +2 -2
- package/browser/esm/BbSmt62FpFIpoVzu.mjs +392 -0
- package/browser/esm/BcHmrKHwMMOlzc9_.mjs +357 -0
- package/browser/esm/BgcZ-CoTbMfmyDJL.mjs +412 -0
- package/browser/esm/Bk7xxbdDpa7-sIwd.mjs +7 -0
- package/browser/esm/BqskM7wA8oPfFQue.mjs +20 -0
- package/browser/esm/Btg43M1Bf-ENDreu.mjs +540 -0
- package/browser/esm/BzLfNyc6OOShIErH.mjs +598 -0
- package/browser/esm/C9B0djuUarfNdoj0.mjs +466 -0
- package/browser/esm/{CHSahmMFYNB0Ajkf.mjs → CSx9ed1JOs7K5BXO.mjs} +2 -2
- package/browser/esm/CYyv6uGjo10ig5FP.mjs +142 -0
- package/browser/esm/CZ5oa92wZEAXebgk.mjs +622 -0
- package/browser/esm/CdLZWVcH8cncBUPJ.mjs +849 -0
- package/browser/esm/Cgd5BnM3hg9RyUel.mjs +171 -0
- package/browser/esm/CjsUGJEQSbGjnH6R.mjs +1001 -0
- package/browser/esm/ClB5ix51roQOpZEr.mjs +7402 -0
- package/browser/esm/{CKk58ZLcrllMzfou.mjs → Cqr3knDsBvoVZ6MN.mjs} +179 -202
- package/browser/esm/D4uVlrG0xEFctsSM.mjs +905 -0
- package/browser/esm/DOMHmhYzPcLVcpAW.mjs +7 -0
- package/browser/esm/DUvUK61b2_4pf4tG.mjs +484 -0
- package/browser/esm/De175LygU7ot4nQm.mjs +441 -0
- package/browser/esm/DhKkrCVASZ6Isvz6.mjs +527 -0
- package/browser/esm/Di58Ji1n--3Mgc_2.mjs +607 -0
- package/browser/esm/Dtoyt8q5RyGAlxCp.mjs +1141 -0
- package/browser/esm/Y79I7Sm8kjaYexhf.mjs +167 -0
- package/browser/esm/index.mjs +1472 -1023
- package/browser/esm/o8MFgcVXns987D6_.mjs +400 -0
- package/browser/esm/zqJOaweiXE9D8RY1.mjs +66681 -0
- package/licenses/dependencies.txt +209 -209
- package/node/esm/B6D7sSetrcOWLsKj.mjs +1135 -0
- package/node/esm/B9ljpEIZg6wOTzRE.mjs +142 -0
- package/node/esm/BH1v-E4Ro3bR7Znw.mjs +962 -0
- package/node/esm/BN9j8V9gCExMjVtJ.mjs +540 -0
- package/node/esm/{DUYP6faJJHCaW1Xf.mjs → Bh4dv6tMjXX3X4nI.mjs} +1 -1
- package/node/esm/Bqd62L8KFgdS0Vou.mjs +7 -0
- package/node/esm/Bsx9uijd4X_SKV3L.mjs +360 -0
- package/node/esm/BtuY37FumvLE7EBo.mjs +629 -0
- package/node/esm/C6ZXsNyLXI6zA63X.mjs +402 -0
- package/node/esm/CCouEwT37f08qO3V.mjs +7 -0
- package/node/esm/CD9wbvufChVYYkrI.mjs +451 -0
- package/node/esm/CImNvdz1iP-lUlro.mjs +610 -0
- package/node/esm/CT0CN82y0_Qgoryk.mjs +7568 -0
- package/node/esm/CUQi5ZtMO02nhG0W.mjs +596 -0
- package/node/esm/CUUoseJmFsCf82bb.mjs +28 -0
- package/node/esm/CnSQ7MTXAUAyBOoS.mjs +911 -0
- package/node/esm/D7MfcID2Wf6l6VpC.mjs +171 -0
- package/node/esm/DCplLG93GfTs1vNw.mjs +1860 -0
- package/node/esm/DHUADiCmxNQS1ARz.mjs +417 -0
- package/node/esm/DMD12JUh7HJw2-jl.mjs +638 -0
- package/node/esm/DdFgXl-Ux2cMBTs_.mjs +15 -0
- package/node/esm/DefYISWfdZJFx57m.mjs +255 -0
- package/node/esm/Ds0d8zXzmgOu3MGx.mjs +403 -0
- package/node/esm/MiU4rDOiocmJ-9Ry.mjs +1783 -0
- package/node/esm/index.mjs +49153 -36824
- package/package.json +15 -16
- package/resources/contents.json +64 -0
- package/resources/fonts/arial-bold-italic.metrics.json +139 -0
- package/resources/fonts/arial-bold.metrics.json +139 -0
- package/resources/fonts/arial-italic.metrics.json +139 -0
- package/resources/fonts/arial-regular.metrics.json +139 -0
- package/resources/fonts/calibri-bold-italic.metrics.json +137 -0
- package/resources/fonts/calibri-bold.metrics.json +137 -0
- package/resources/fonts/calibri-italic.metrics.json +137 -0
- package/resources/fonts/calibri-regular.metrics.json +137 -0
- package/resources/fonts/cambria-bold-italic.metrics.json +66 -0
- package/resources/fonts/cambria-bold.metrics.json +66 -0
- package/resources/fonts/cambria-italic.metrics.json +66 -0
- package/resources/fonts/cambria-regular.metrics.json +66 -0
- package/resources/fonts/contents.json +126 -0
- package/resources/fonts/courier-new-bold-italic.metrics.json +143 -0
- package/resources/fonts/courier-new-bold.metrics.json +143 -0
- package/resources/fonts/courier-new-italic.metrics.json +143 -0
- package/resources/fonts/courier-new-regular.metrics.json +143 -0
- package/resources/fonts/times-new-roman-bold-italic.metrics.json +141 -0
- package/resources/fonts/times-new-roman-bold.metrics.json +141 -0
- package/resources/fonts/times-new-roman-italic.metrics.json +143 -0
- package/resources/fonts/times-new-roman-regular.metrics.json +141 -0
- package/resources/locales/de/model.msg.json +112 -12
- package/resources/locales/en/model.msg.json +119 -13
- package/types/scripting-api.json +8048 -0
- package/types/scripting-enums.json +277 -106
- package/types/scripting.d.ts +18126 -7971
- 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} +42 -41
- package/types/src/border/index.d.ts +1 -1
- package/types/src/calculation/Calculation.d.ts +759 -49
- package/types/src/calculation/ExternalBookBindings.d.ts +118 -0
- package/types/src/calculation/FormulaText.d.ts +82 -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/_TableRename.d.ts +13 -0
- package/types/src/calculation/compiler/ASTTypes.d.ts +71 -0
- package/types/src/calculation/compiler/CompilerUtils.d.ts +135 -44
- 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 +422 -34
- 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 +125 -23
- package/types/src/calculation/formula/FormulaRecordView.d.ts +79 -0
- package/types/src/calculation/formula/FunctionValues.d.ts +10 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +261 -67
- package/types/src/calculation/formula/LambdaValue.d.ts +46 -23
- 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/Operators.d.ts +8 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +15 -2
- package/types/src/calculation/grid/CalcGrid.d.ts +407 -158
- package/types/src/calculation/grid/CalcGridBackend.d.ts +493 -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 +239 -0
- package/types/src/calculation/grid/ICalcGrid.d.ts +499 -141
- package/types/src/calculation/grid/_CalcRequest.d.ts +289 -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 +160 -29
- 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 +53 -4
- package/types/src/calculation/state/IContextContainer.d.ts +159 -26
- 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 +104 -29
- package/types/src/cell/ICellHeader.d.ts +24 -2
- package/types/src/cell/ICellProtection.d.ts +50 -10
- package/types/src/cellRange/ICellRange.d.ts +458 -97
- package/types/src/cellRange/ICellRanges.d.ts +23 -21
- package/types/src/chart/Chart.d.ts +41 -13
- package/types/src/chart/ChartCollection.d.ts +26 -0
- package/types/src/chart/IChart.d.ts +166 -12
- 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/color/_BuiltInIndexDefs.d.ts +6 -0
- package/types/src/comment/Comment.d.ts +223 -0
- package/types/src/comment/CommentCollection.d.ts +40 -0
- package/types/src/comment/IComment.d.ts +340 -50
- package/types/src/comment/ICommentCollection.d.ts +90 -0
- package/types/src/comment/NoteMovable.d.ts +26 -0
- package/types/src/comment/_CommentUtils.d.ts +50 -0
- package/types/src/comment/_NoteBox.d.ts +50 -0
- package/types/src/comment/index.d.ts +1 -0
- package/types/src/condition/AnchoredConditional.d.ts +82 -17
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +42 -12
- package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/AndOperator.d.ts +3 -1
- package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +4 -0
- package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +4 -1
- package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +5 -6
- package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/IconOperator.d.ts +4 -0
- package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +22 -5
- package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/NotOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/OrOperator.d.ts +3 -1
- package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +6 -0
- package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +21 -6
- package/types/src/condition/BuiltinSelectors/DateSelector.d.ts +4 -5
- package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +20 -0
- package/types/src/condition/BuiltinSelectors/TextLengthSelector.d.ts +7 -5
- package/types/src/condition/BuiltinSelectors/TimeSelector.d.ts +3 -5
- package/types/src/condition/BuiltinSelectors/WholeSelector.d.ts +3 -5
- package/types/src/condition/BuiltinSelectors/index.d.ts +12 -6
- package/types/src/condition/Condition.d.ts +19 -1
- package/types/src/condition/ICondition.d.ts +293 -73
- package/types/src/condition/_ConditionFormula.d.ts +152 -0
- package/types/src/condition/_ConditionUtils.d.ts +167 -13
- package/types/src/conditionalFormat/ConditionalEntry.d.ts +3 -3
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +25 -14
- package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +19 -8
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +12 -10
- package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +2 -0
- package/types/src/dataValidation/DataValidation.d.ts +69 -3
- package/types/src/dataValidation/DataValidationCollection.d.ts +20 -9
- package/types/src/dataValidation/IDataValidation.d.ts +149 -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/{lib/file → file}/file.browser.d.ts +22 -8
- package/types/src/{lib/file → file}/file.node.d.ts +7 -2
- package/types/src/fill/IEffect.d.ts +5 -5
- package/types/src/fill/IFill.d.ts +123 -78
- package/types/src/fill/IStroke.d.ts +190 -64
- package/types/src/fill/RectAlignment.d.ts +20 -0
- package/types/src/fill/_Fills.d.ts +187 -0
- package/types/src/fill/_Stroke.d.ts +89 -0
- package/types/src/fill/index.d.ts +1 -0
- package/types/src/filter/IFilter.d.ts +188 -5
- package/types/src/font/AdvanceBuilder.d.ts +25 -0
- package/types/src/font/AdvanceTable.d.ts +114 -0
- package/types/src/font/FontCollection.d.ts +57 -0
- package/types/src/font/IFont.d.ts +17 -0
- package/types/src/font/IFontCollection.d.ts +120 -22
- package/types/src/font/TableFileAdvanceBuilder.d.ts +27 -0
- package/types/src/font/_BuiltinFontTables.d.ts +10 -0
- package/types/src/font/index.d.ts +4 -1
- package/types/src/group/Group.d.ts +136 -0
- package/types/src/group/GroupMovableCollection.d.ts +37 -0
- package/types/src/group/IGroup.d.ts +129 -0
- package/types/src/group/index.d.ts +2 -0
- package/types/src/history/IHistory.d.ts +3 -2
- package/types/src/hyperlink/IHyperlink.d.ts +13 -0
- package/types/src/hyperlink/_Hyperlink.d.ts +5 -1
- package/types/src/i18n/LanguagePack.d.ts +12 -4
- package/types/src/index.d.ts +5 -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/license/LicenseDetails.d.ts +1 -0
- package/types/src/license/LicenseManager.d.ts +4 -1
- package/types/src/license/Types.d.ts +38 -0
- package/types/src/license/_Utils.d.ts +22 -0
- package/types/src/license/details.d.ts +24 -0
- package/types/src/license/license-key.d.ts +49 -2
- package/types/src/license/runtime.browser.d.ts +41 -0
- package/types/src/{lib/utils/utils.node.d.ts → license/runtime.node.d.ts} +9 -12
- 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/AbstractMovableContent.d.ts +182 -0
- package/types/src/movable/CustomElement.d.ts +4 -5
- package/types/src/movable/ErrorContent.d.ts +49 -0
- package/types/src/movable/FormControl.d.ts +285 -0
- package/types/src/movable/GroupMember.d.ts +87 -0
- package/types/src/movable/ICustomElement.d.ts +7 -2
- package/types/src/movable/IErrorContent.d.ts +23 -0
- package/types/src/movable/IFormControl.d.ts +455 -0
- package/types/src/movable/IMovable.d.ts +378 -46
- package/types/src/movable/IMovableCollection.d.ts +63 -3
- package/types/src/movable/Movable.d.ts +149 -49
- package/types/src/movable/MovableCollection.d.ts +15 -8
- package/types/src/movable/MovableContentRegistry.d.ts +113 -0
- package/types/src/movable/_BuiltInContents.d.ts +14 -0
- package/types/src/movable/_ContentFactory.d.ts +35 -0
- package/types/src/movable/_DrawnBounds.d.ts +37 -0
- package/types/src/movable/_InsertableCollection.d.ts +28 -0
- package/types/src/movable/_MovableUtils.d.ts +5 -0
- package/types/src/movable/_PendingContent.d.ts +25 -0
- package/types/src/movable/_PlacementUtils.d.ts +55 -0
- package/types/src/movable/_RotatedFrame.d.ts +20 -0
- package/types/src/movable/index.d.ts +7 -1
- 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 +20 -7
- package/types/src/numFmt/IFormatEngine.d.ts +2 -0
- package/types/src/numFmt/NumfmtFormatEngine.d.ts +2 -0
- package/types/src/numFmt/_FormatCell.d.ts +11 -2
- package/types/src/numFmt/_NumFmtUtils.d.ts +0 -1
- package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +6 -0
- package/types/src/outline/IOutline.d.ts +186 -0
- package/types/src/outline/Outline.d.ts +157 -0
- package/types/src/outline/index.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 +4 -0
- package/types/src/picture/IPicture.d.ts +33 -3
- package/types/src/picture/Picture.d.ts +33 -13
- package/types/src/pivot/IPivotTable.d.ts +72 -0
- package/types/src/pivot/IPivotTableCollection.d.ts +25 -0
- package/types/src/pivot/PivotCache.d.ts +34 -0
- package/types/src/pivot/PivotTable.d.ts +61 -0
- package/types/src/pivot/PivotTableCollection.d.ts +25 -0
- package/types/src/pivot/_PivotXml.d.ts +24 -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/Grouping.d.ts +65 -0
- package/types/src/primitives/LambdaBrand.d.ts +26 -0
- package/types/src/primitives/PrimitiveUtils.d.ts +60 -21
- package/types/src/primitives/Range.d.ts +136 -26
- package/types/src/primitives/RangeStats.d.ts +30 -2
- package/types/src/primitives/ReferenceRange.d.ts +44 -0
- package/types/src/primitives/Runtime.d.ts +15 -2
- package/types/src/primitives/environment.browser.d.ts +9 -0
- package/types/src/primitives/environment.node.d.ts +10 -0
- package/types/src/primitives/stats/AggregateStats.d.ts +49 -15
- package/types/src/primitives/stats/Cancellation.d.ts +13 -0
- package/types/src/primitives/stats/FrequencyStats.d.ts +10 -1
- package/types/src/primitives/stats/LookupIndex.d.ts +46 -0
- package/types/src/primitives/stats/Ranked.d.ts +1 -1
- package/types/src/primitives/stats/SortedNumbers.d.ts +4 -2
- 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/FunctionArguments.d.ts +22 -0
- package/types/src/scripting/FunctionCollection.d.ts +49 -15
- package/types/src/scripting/IFunctionCollection.d.ts +62 -32
- 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 +28 -26
- 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 +3 -7
- package/types/src/scripting/TypedFunction.d.ts +200 -4
- package/types/src/scripting/_FunctionIndex.d.ts +8 -3
- 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/IMovableSelection.d.ts +148 -0
- package/types/src/selection/IRangeSelection.d.ts +9 -4
- package/types/src/selection/MovableSelection.d.ts +48 -0
- package/types/src/selection/RangeSelection.d.ts +15 -0
- package/types/src/selection/index.d.ts +1 -0
- package/types/src/shape/GeometryPreset.d.ts +197 -0
- package/types/src/shape/IGeometry.d.ts +380 -0
- package/types/src/shape/IShape.d.ts +341 -194
- package/types/src/shape/IShapeStyle.d.ts +135 -0
- package/types/src/shape/Shape.d.ts +107 -21
- package/types/src/shape/ShapeStyleUtils.d.ts +54 -0
- package/types/src/shape/_ConnectorFrame.d.ts +32 -0
- package/types/src/shape/_ConnectorRoute.d.ts +33 -0
- package/types/src/shape/_Connectors.d.ts +108 -0
- package/types/src/shape/_Geometry.d.ts +14 -0
- package/types/src/shape/_GeometryLoader.d.ts +21 -0
- package/types/src/shape/_ShapeStyle.d.ts +70 -0
- package/types/src/shape/_builtIn/_BuiltInChunks.d.ts +10 -0
- package/types/src/shape/_builtIn/_BuiltInDef.d.ts +9 -0
- package/types/src/shape/_builtIn/arrows.d.ts +6 -0
- package/types/src/shape/_builtIn/basic.d.ts +6 -0
- package/types/src/shape/_builtIn/callouts.d.ts +6 -0
- package/types/src/shape/_builtIn/flowchart.d.ts +6 -0
- package/types/src/shape/_builtIn/lines.d.ts +6 -0
- package/types/src/shape/_builtIn/math.d.ts +6 -0
- package/types/src/shape/_builtIn/other.d.ts +6 -0
- package/types/src/shape/_builtIn/rectangles.d.ts +6 -0
- package/types/src/shape/_builtIn/starsBanners.d.ts +6 -0
- package/types/src/shape/geometry/_strokeEnds.d.ts +7 -0
- package/types/src/shape/geometry/format.d.ts +3 -0
- package/types/src/shape/geometry/geometry.d.ts +85 -0
- package/types/src/shape/geometry/guides.d.ts +54 -0
- package/types/src/shape/geometry/handles.d.ts +14 -0
- package/types/src/shape/geometry/index.d.ts +7 -0
- package/types/src/shape/geometry/lineEnds.d.ts +54 -0
- package/types/src/shape/geometry/paths.d.ts +35 -0
- package/types/src/shape/geometry/segments.d.ts +114 -0
- package/types/src/shape/index.d.ts +3 -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 +197 -50
- package/types/src/sheet/ISheetCollection.d.ts +2 -5
- package/types/src/sheet/NamedCellRange.d.ts +16 -7
- package/types/src/sheet/NamedRange.d.ts +8 -0
- package/types/src/sheet/Sheet.d.ts +923 -138
- package/types/src/sheet/SheetCell.d.ts +92 -32
- package/types/src/sheet/SheetCollection.d.ts +19 -8
- package/types/src/sheet/SheetRange.d.ts +92 -17
- package/types/src/sheet/SheetRanges.d.ts +22 -9
- package/types/src/sheet/_CellBuffer.d.ts +214 -0
- package/types/src/sheet/_HeldFormula.d.ts +69 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +7 -7
- 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 +28 -0
- package/types/src/sheet/_SheetEvents.d.ts +43 -0
- package/types/src/sheet/_SheetFilterUtils.d.ts +49 -1
- package/types/src/sheet/_SheetIntents.d.ts +296 -0
- package/types/src/sheet/_SheetMutations.d.ts +182 -62
- package/types/src/sheet/_SheetStateReader.d.ts +19 -13
- package/types/src/sheet/_SheetStateTypes.d.ts +83 -78
- package/types/src/sheet/_SheetUtils.d.ts +39 -22
- 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 +209 -304
- package/types/src/sheet/style/SheetDirectStyle.d.ts +30 -19
- package/types/src/sheet/style/SheetNamedStyle.d.ts +17 -17
- package/types/src/sheet/style/SheetTableStyle.d.ts +5 -5
- package/types/src/sheet/style/_Resolvers.d.ts +14 -8
- package/types/src/sheet/style/_StyleUtils.d.ts +38 -8
- package/types/src/sheetHeader/ISheetHeader.d.ts +94 -53
- package/types/src/sheetHeader/SheetCellHeader.d.ts +4 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +42 -22
- package/types/src/sheetHeader/_HeaderMetrics.d.ts +37 -0
- package/types/src/sheetHeader/_HeaderUtils.d.ts +5 -3
- 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 +69 -15
- package/types/src/sheetView/SheetView.d.ts +20 -11
- package/types/src/slicer/ISlicer.d.ts +304 -17
- package/types/src/slicer/ISlicerStyle.d.ts +109 -0
- package/types/src/slicer/Slicer.d.ts +128 -13
- package/types/src/slicer/SlicerStyle.d.ts +25 -0
- package/types/src/slicer/_BuiltInSlicerStyles.d.ts +13 -0
- package/types/src/slicer/_SlicerUtils.d.ts +30 -0
- package/types/src/slicer/index.d.ts +1 -0
- package/types/src/sort/ISort.d.ts +4 -2
- package/types/src/string/IStringCollection.d.ts +5 -0
- package/types/src/string/StringCollection.d.ts +6 -6
- package/types/src/style/{IStyle.d.ts → ICellStyle.d.ts} +72 -52
- package/types/src/style/INamedStyleCollection.d.ts +72 -0
- package/types/src/style/ISlicerStyleCollection.d.ts +77 -0
- package/types/src/style/IStyleCollection.d.ts +91 -60
- package/types/src/style/ITableStyleCollection.d.ts +89 -0
- package/types/src/style/NamedStyleCollection.d.ts +39 -0
- package/types/src/style/SlicerStyleCollection.d.ts +46 -0
- package/types/src/style/StyleCollection.d.ts +81 -26
- package/types/src/style/TableStyleCollection.d.ts +49 -0
- package/types/src/style/_BuiltInStyleDefs.d.ts +6 -6
- package/types/src/style/_BuiltInStyleNames.d.ts +2 -2
- package/types/src/style/index.d.ts +7 -1
- package/types/src/table/AnchoredTable.d.ts +701 -72
- package/types/src/table/AutoTable.d.ts +7 -5
- package/types/src/table/ITable.d.ts +261 -34
- package/types/src/table/ITableCollection.d.ts +12 -0
- package/types/src/table/ITableStyle.d.ts +37 -37
- package/types/src/table/TableCollection.d.ts +19 -8
- package/types/src/table/_FilterField.d.ts +19 -6
- 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/IText.d.ts +182 -0
- package/types/src/text/ITextFrame.d.ts +110 -1
- package/types/src/text/TextBoxAlignment.d.ts +25 -16
- 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/TextRotation.d.ts +3 -3
- 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/text/richtext/IRichText.d.ts +36 -0
- package/types/src/text/richtext/IStyledFont.d.ts +18 -18
- package/types/src/text/richtext/index.d.ts +1 -0
- package/types/src/theme/ITheme.d.ts +45 -4
- package/types/src/theme/IThemeCollection.d.ts +2 -0
- package/types/src/theme/ThemeCollection.d.ts +11 -7
- package/types/src/theme/_OfficeFormatScheme.d.ts +3 -0
- package/types/src/transaction/ITransaction.d.ts +258 -45
- package/types/src/transaction/Transaction.d.ts +101 -11
- package/types/src/transaction/TransactionUndoManager.d.ts +4 -1
- 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/wasm/_sdkWasm.d.ts +7 -0
- package/types/src/wasm/index.d.ts +2 -0
- package/types/src/wasm/sdkWasm.d.ts +29 -0
- package/types/src/workbook/IWorkbook.d.ts +180 -40
- package/types/src/workbook/Workbook.d.ts +123 -10
- 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/B7_pDFYCVzt-3hUs.cjs +0 -1
- package/browser/cjs/BF14ZEAnaqxXroSj.cjs +0 -1
- package/browser/cjs/BXtvdT1Z-MsB_o5F.cjs +0 -1
- package/browser/cjs/Bc4JjVVZfFo3R4He.cjs +0 -33
- package/browser/cjs/CD2RXdnfqSYNc6gX.cjs +0 -57
- package/browser/cjs/DcLpXGexEtOxi-dD.cjs +0 -1
- package/browser/cjs/Dv3x6zut1ZRUt3IF.cjs +0 -10
- package/browser/cjs/index.cjs +0 -3
- package/browser/esm/0Mj5WKM362q6CECb.mjs +0 -824
- package/browser/esm/CPTtL2f6_4iblmFM.mjs +0 -4436
- package/browser/esm/CoA-sUxjiIUIpTUF.mjs +0 -109
- package/browser/esm/Dy4Sdpju1T2icURu.mjs +0 -50854
- package/node/esm/BtGxbEbBm79YvF_k.mjs +0 -843
- package/node/esm/DqgWsVXROpSgKq6c.mjs +0 -114
- package/types/src/cellRange/_GraphNode.d.ts +0 -38
- package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +0 -12
- package/types/src/dataValidation/_Utils.d.ts +0 -10
- package/types/src/lib/utils/_Utils.d.ts +0 -20
- package/types/src/lib/utils/utils.browser.d.ts +0 -33
- package/types/src/movable/IGroup.d.ts +0 -30
- package/types/src/movable/IMovableSelection.d.ts +0 -49
- 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
- /package/types/src/{lib/utils → license}/banner.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IRange, Scalar, InteropScalar, IRangeStats, IRuntime } from '@sheetxl/primitives';
|
|
2
|
-
import { CoordUtils, Size, Bounds } from '@sheetxl/utils';
|
|
2
|
+
import { CoordUtils, Size, Bounds, Point } from '@sheetxl/utils';
|
|
3
3
|
import { ITypes, ICollection, IProperties } from '../type';
|
|
4
4
|
import { IWorkbook } from '../workbook';
|
|
5
5
|
import { IListener } from '../listener';
|
|
@@ -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,54 @@ 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 { Movable } from '../movable/Movable';
|
|
26
|
+
import { AbstractMovableContent } from '../movable/AbstractMovableContent';
|
|
27
|
+
import { IChartCollection } from '../chart';
|
|
22
28
|
import { IPicture } from '../picture';
|
|
29
|
+
import { InsertableCollection } from '../movable/_InsertableCollection';
|
|
30
|
+
import { IPivotTable, IPivotTableCollection } from '../pivot';
|
|
23
31
|
import { ICell } from '../cell';
|
|
24
32
|
import { ICellRange, ICellRegions, ICellRanges } from '../cellRange';
|
|
25
|
-
import {
|
|
33
|
+
import { ICellStyle, IStyleCollection } from '../style';
|
|
26
34
|
import { IRangeSelection } from '../selection';
|
|
27
35
|
import { IConditionalFormat, IConditionalFormatCollection } from '../conditionalFormat';
|
|
28
36
|
import { IProtectedRange, IProtectedRangeCollection } from '../protectedRange';
|
|
29
|
-
import { Tuple,
|
|
37
|
+
import { Tuple, ISpatialMap, ISpatialQuery } from '../collections';
|
|
30
38
|
import { ListenerEmitter } from '../listener/ListenerEmitter';
|
|
31
|
-
import { RangeStats } from '../primitives';
|
|
32
39
|
import { ICondition } from '../condition';
|
|
33
40
|
import { ConditionalFormat } from '../conditionalFormat/ConditionalFormat';
|
|
34
41
|
import { IDataValidationCollection, IDataValidation } from '../dataValidation';
|
|
35
42
|
import { DataValidation } from '../dataValidation/DataValidation';
|
|
36
43
|
import { ProtectedRange } from '../protectedRange/ProtectedRange';
|
|
44
|
+
import { Comment } from '../comment/Comment';
|
|
45
|
+
import { NoteMovable } from '../comment/NoteMovable';
|
|
46
|
+
import { NoteLayout } from '../comment/_NoteBox';
|
|
37
47
|
import { ISheetProtection } from '../sheetProtection';
|
|
48
|
+
import { IOutline } from '../outline';
|
|
38
49
|
import { ISheetHeader } from '../sheetHeader';
|
|
39
50
|
import { ISheetView } from '../sheetView';
|
|
40
51
|
import { ISheet } from './ISheet';
|
|
52
|
+
import { ScalarListFactory } from './_ScalarListFactory';
|
|
53
|
+
import { ListenerAnchor } from './_ListenerAnchor';
|
|
54
|
+
import { WatchAnchor } from './_WatchAnchor';
|
|
55
|
+
import { EventCategory, SheetEvents } from './_SheetEvents';
|
|
41
56
|
import { SheetHeader } from '../sheetHeader/SheetHeader';
|
|
42
57
|
import { SheetDirectStyle } from './style/SheetDirectStyle';
|
|
43
58
|
import { IUsedRangeSpatialMap } from './style/UsedRangeSpatialMap';
|
|
44
|
-
import { RangeState, CellState, State, MovableEntry,
|
|
59
|
+
import { RangeState, CellState, State, MovableEntry, MovableIndex, InternalTupleUpdate } from './_SheetStateTypes';
|
|
60
|
+
import { CellBuffer } from './_CellBuffer';
|
|
45
61
|
import { SheetReadContext, GetTypedRangeOptions, OverFlowsAndStops } from './_SheetStateReader';
|
|
46
|
-
import { AutoFillProjection, AutoFillPreviewCache } from './
|
|
62
|
+
import { AutoFillProjection, AutoFillPreviewCache } from './_SheetAutoFillUtils';
|
|
47
63
|
import { ProtectionCheck } from './_SheetCoords';
|
|
48
|
-
import { RangesListener, RangesListenerEntry } from './listener';
|
|
49
64
|
import { SheetProtection } from '../sheetProtection/SheetProtection';
|
|
65
|
+
import { Outline } from '../outline/Outline';
|
|
50
66
|
import { SheetCellOptions } from './SheetCell';
|
|
51
67
|
import { ICalculation } from '../calculation';
|
|
52
68
|
import { ICalcGrid } from '../calculation/grid';
|
|
69
|
+
import * as _SheetFilterUtils from './_SheetFilterUtils';
|
|
53
70
|
/**
|
|
54
71
|
* Implementation of {@link ISheet}.
|
|
55
72
|
*/
|
|
@@ -73,6 +90,28 @@ export type SheetMutationContext = ReturnType<Sheet['_buildMutationCtx']>;
|
|
|
73
90
|
* @internal
|
|
74
91
|
*/
|
|
75
92
|
export type SheetCoordContext = ReturnType<Sheet['_buildCoordCtx']>;
|
|
93
|
+
/**
|
|
94
|
+
* What an operation hands {@link Sheet._commitWithDirectives} beyond its selection and options.
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
export interface CommitDirectives {
|
|
98
|
+
/** Where an undo lands, when it is not the selection. See `Sheet._recordSelection`. */
|
|
99
|
+
undo?: Partial<IRangeSelection.Coords> | null;
|
|
100
|
+
/** The axis the selection is scrolled along. */
|
|
101
|
+
axis?: IRange.Axis;
|
|
102
|
+
/** Handed to the commit. */
|
|
103
|
+
commit?: ITransaction.StoreOperationOptions;
|
|
104
|
+
}
|
|
105
|
+
/** 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. */
|
|
106
|
+
interface LegacyDrawing {
|
|
107
|
+
xml: string;
|
|
108
|
+
images?: LegacyDrawingImage[];
|
|
109
|
+
}
|
|
110
|
+
interface LegacyDrawingImage {
|
|
111
|
+
/** The id {@link LegacyDrawing.xml} references this image by. */
|
|
112
|
+
id: string;
|
|
113
|
+
resource: IResource;
|
|
114
|
+
}
|
|
76
115
|
export declare class Sheet implements ISheet {
|
|
77
116
|
protected _options: ISheet.ConstructorOptions;
|
|
78
117
|
protected _id: string;
|
|
@@ -81,19 +120,50 @@ export declare class Sheet implements ISheet {
|
|
|
81
120
|
protected _transactions: ITransaction.IStore;
|
|
82
121
|
protected _ownTransactions: boolean;
|
|
83
122
|
protected _transactionsRemoveListener: IListener.Remove;
|
|
84
|
-
protected
|
|
123
|
+
protected _transactionsCloseRemoveListener: IListener.Remove;
|
|
124
|
+
/** The view's selection when the open root began. See {@link _onRootTransactionClose}. */
|
|
125
|
+
protected _selectionAtCommitStart: IRangeSelection.Coords | null;
|
|
126
|
+
/**
|
|
127
|
+
* The movables each closed root selects once it lands, by id. Kept per commit: other roots can
|
|
128
|
+
* close before an earlier one lands. See {@link _onRootTransactionClose}.
|
|
129
|
+
*/
|
|
130
|
+
protected _movableSelectionAtCommitEnd: Map<ITransaction.ICommit, readonly string[]>;
|
|
85
131
|
protected _emitter: ListenerEmitter<ISheet, ISheet.IListeners>;
|
|
86
132
|
protected _initializing: boolean;
|
|
87
133
|
protected _starting: Promise<void> | null;
|
|
88
134
|
protected _strings: IStringCollection;
|
|
135
|
+
/** Makes the lists cell values are stored as, over `_strings`. */
|
|
136
|
+
protected _lists: ScalarListFactory;
|
|
89
137
|
protected _ownStrings: boolean;
|
|
90
138
|
protected _styles: IStyleCollection;
|
|
91
139
|
protected _ownStyles: boolean;
|
|
92
140
|
protected _stylesRemoveListener: IListener.Remove;
|
|
141
|
+
protected _languageRemoveListener?: IListener.Remove;
|
|
142
|
+
protected _regionalRemoveListener?: IListener.Remove;
|
|
93
143
|
protected _stylesListener: IStyleCollection.IListeners;
|
|
94
|
-
protected _normalStyleRanged: IProperties.ICellRanged<
|
|
144
|
+
protected _normalStyleRanged: IProperties.ICellRanged<ICellStyle.Properties>;
|
|
95
145
|
protected _resources: IResourceCollection;
|
|
96
146
|
protected _ownResources: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* The sheet's own legacy drawing and the header/footer's, held as read until the shapes in them
|
|
149
|
+
* have models of their own. Not sheet state: nothing edits them, so they neither transact nor
|
|
150
|
+
* notify.
|
|
151
|
+
*/
|
|
152
|
+
protected _legacyDrawing: LegacyDrawing | null;
|
|
153
|
+
protected _legacyDrawingHF: LegacyDrawing | null;
|
|
154
|
+
/** The sheet's pivot tables, held as read for the same reason. */
|
|
155
|
+
protected _pivotTableCollection: IPivotTableCollection;
|
|
156
|
+
/**
|
|
157
|
+
* Anchored items whose delete this sheet announced itself.
|
|
158
|
+
*
|
|
159
|
+
* @remarks
|
|
160
|
+
* An item's `onDelete` reaches the sheet after the operation lands, and the sheet re-announces
|
|
161
|
+
* it as the collection's change — that is how a delete driven by a row or column removal is
|
|
162
|
+
* announced at all. An item deleted through its own `delete()` comes back to the sheet's
|
|
163
|
+
* `deleteFromContainer`, which announces inside the operation; it records the item here so the
|
|
164
|
+
* later `onDelete` is not a second announcement of the same delete.
|
|
165
|
+
*/
|
|
166
|
+
protected _announcedDeletes: WeakSet<IAnchored>;
|
|
97
167
|
protected _names: INamedCollection;
|
|
98
168
|
/** Lazy sheet-anchored view over {@link _names} — see {@link getNames}. */
|
|
99
169
|
protected _namesScoped: INamedCollection | null;
|
|
@@ -106,16 +176,22 @@ export declare class Sheet implements ISheet {
|
|
|
106
176
|
protected _calculationScoped: ICalculation;
|
|
107
177
|
protected _workbook: IWorkbook | null;
|
|
108
178
|
protected _cacheTableColumnHeaders: TableColumnHeaders;
|
|
109
|
-
protected _rangeStats: RangeStats;
|
|
110
179
|
protected _tables: ITableCollection;
|
|
111
180
|
protected _conditionals: IConditionalFormatCollection;
|
|
112
181
|
protected _dataValidations: IDataValidationCollection;
|
|
113
182
|
protected _protectedRanges: IProtectedRangeCollection;
|
|
183
|
+
protected _comments: ICommentCollection;
|
|
114
184
|
protected _movables: IMovableCollection;
|
|
185
|
+
protected _charts: IChartCollection;
|
|
115
186
|
protected _emitterMovables: ListenerEmitter<IMovableCollection, ICollection.IListeners>;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
187
|
+
/**
|
|
188
|
+
* The callbacks for the reference nodes in `State.listeners`, keyed by node id.
|
|
189
|
+
*
|
|
190
|
+
* @remarks
|
|
191
|
+
* On the instance, never in state: a listener is an observer, not part of the document. An entry
|
|
192
|
+
* in the map with no callback here belongs to a snapshot this sheet no longer serves and is inert.
|
|
193
|
+
*/
|
|
194
|
+
protected _listenerNodes: Map<number, ListenerNodeEntry>;
|
|
119
195
|
protected _lastCellDecoded: {
|
|
120
196
|
address: ICell.Address | null;
|
|
121
197
|
coords: IRange.CellCoords | null;
|
|
@@ -156,6 +232,18 @@ export declare class Sheet implements ISheet {
|
|
|
156
232
|
protected _protectionListener: IProtection.IListeners;
|
|
157
233
|
protected _protectionRemoveListener: IListener.Remove;
|
|
158
234
|
protected _tabColor: IColor | null;
|
|
235
|
+
/** VBA binding identity; carried from the file, never minted. See {@link ISheet.getCodeName}. */
|
|
236
|
+
protected _codeName: string | null;
|
|
237
|
+
protected _outline: Outline;
|
|
238
|
+
protected _conditionalFormatCalculation: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Modules this sheet owns — see {@link getModules}.
|
|
241
|
+
*
|
|
242
|
+
* Built with the sheet rather than on first ask, because building one opens a transaction and
|
|
243
|
+
* `getModules()` is a READ: a lazy build would fold an initialization commit into whatever
|
|
244
|
+
* unrelated commit happened to be the tip, every time a report walked the sheets.
|
|
245
|
+
*/
|
|
246
|
+
protected _modules: ModuleCollection;
|
|
159
247
|
protected _runtime: IRuntime;
|
|
160
248
|
protected _isDate1904: boolean;
|
|
161
249
|
protected _colHeaders: SheetHeader;
|
|
@@ -169,9 +257,19 @@ export declare class Sheet implements ISheet {
|
|
|
169
257
|
protected _rowHeadersRemoveListener: IListener.Remove | null;
|
|
170
258
|
protected _rowHeadersHiddenRemoveListener: IListener.Remove | null;
|
|
171
259
|
protected _isAdjustHeaders: boolean;
|
|
260
|
+
/** Built by the movables moved in the shift under way, and taken by it when it writes. */
|
|
261
|
+
protected _shiftedMovableModels: Map<IMovable, ISpatialMap.Entry<MovableEntry>> | null;
|
|
262
|
+
/** The same for the note boxes, which shift as their own index. */
|
|
263
|
+
protected _shiftedNoteModels: Map<IMovable, ISpatialMap.Entry<MovableEntry>> | null;
|
|
264
|
+
/** The placed movables' index and the note boxes' index, as the entry builder addresses them. */
|
|
265
|
+
protected _placedIndex: MovableIndex;
|
|
266
|
+
protected _noteIndex: MovableIndex;
|
|
267
|
+
/** What every comment on this sheet places its note's box through. */
|
|
268
|
+
protected _noteBoxes: Comment.Boxes;
|
|
172
269
|
protected _emptyCell: ICell;
|
|
173
270
|
protected _cellOptions: SheetCellOptions;
|
|
174
271
|
protected _closed: boolean;
|
|
272
|
+
protected _cellBuffer: CellBuffer | null;
|
|
175
273
|
protected _defaultColWidthCache: number | null;
|
|
176
274
|
protected _defaultRowHeightCache: number | null;
|
|
177
275
|
protected _defaultFontBoundsCache: Readonly<Size> | null;
|
|
@@ -189,9 +287,10 @@ export declare class Sheet implements ISheet {
|
|
|
189
287
|
_getInternal(): {
|
|
190
288
|
getSheet: () => ISheet;
|
|
191
289
|
getState: () => Readonly<State>;
|
|
290
|
+
getCalcGrid: () => ICalcGrid;
|
|
192
291
|
isDataColumn: () => boolean;
|
|
193
292
|
createRange: (coords: Readonly<IRange.FixableCoords> | string, getOptions?: ICellRange.GetRangeOptions, readOnly?: string | null) => ICellRange;
|
|
194
|
-
isContentful: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => boolean;
|
|
293
|
+
isContentful: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean) => boolean;
|
|
195
294
|
cellToCoords: (address: ICell.Address) => IRange.CellCoords;
|
|
196
295
|
rangeToCoords: (address: ICellRange.Address, protectionCheck?: ProtectionCheck | null, lookupNames?: boolean) => IRange.Coords;
|
|
197
296
|
rangesToCoords: (address: ICellRanges.Address, protectionCheck?: ProtectionCheck | null | undefined, lookupNames?: boolean, requireSameSheet?: boolean, allowOutOfBounds?: boolean) => IRange.Coords[];
|
|
@@ -201,36 +300,47 @@ export declare class Sheet implements ISheet {
|
|
|
201
300
|
cellIterator: (options: CellState.IteratorOptions) => IterableIterator<ICellRange.Entry, ICellRange.Entry, IRange.CellCoords>;
|
|
202
301
|
getVisible: (coords: readonly IRange.Coords[], options?: ICellRange.GetVisibleOptions) => readonly IRange.Coords[];
|
|
203
302
|
getUsedCoords: (options?: ICellRange.GetRangeOptions) => IRange.Coords | null;
|
|
204
|
-
updateTuples: (boundedTuples: Tuple.
|
|
303
|
+
updateTuples: (boundedTuples: Tuple.Region<ICell.Update> | null, options?: ICellRange.UpdateCellsOptions, coordValidator?: CoordUtils.CoordValidator | null | undefined, internalOptions?: InternalTupleUpdate | null) => void;
|
|
205
304
|
merge: (ranges: readonly IRange.Coords[], options?: IRange.AxisSelection | ICellRange.MergeOptions | null) => void;
|
|
206
305
|
unmerge: (ranges: readonly IRange.Coords[], options?: ITransaction.OperationOptions) => void;
|
|
207
306
|
getMerges: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => IRange.Coords[];
|
|
208
307
|
insertFrom: (ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions) => Promise<IRange.Coords>;
|
|
308
|
+
canInsertFrom: (ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions) => boolean;
|
|
209
309
|
insertCells: (ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.InsertOptions, coordValidator?: CoordUtils.CoordValidator) => void;
|
|
210
310
|
deleteCells: (ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.DeleteOptions) => void;
|
|
211
|
-
getStyle: (ranges: IRange.Coords[], anchor?: IRangeSelection.Coords, updateStyles?: (update:
|
|
212
|
-
updateStyles: (ranges: readonly ISpatialMap.Entry<
|
|
311
|
+
getStyle: (ranges: IRange.Coords[], anchor?: IRangeSelection.Coords, updateStyles?: (update: ICellStyle.Update, options?: ICellStyle.UpdateOptions) => void) => ICellStyle;
|
|
312
|
+
updateStyles: (ranges: readonly ISpatialMap.Entry<ICellStyle.Update>[], defaultUpdate?: ICellStyle.Update, options?: ICellStyle.UpdateOptions, calcedNumberFormat?: boolean) => void;
|
|
213
313
|
getSnapshot: (coordsFrom: readonly IRange.Coords[], optionsMark?: ICellRange.CopyOptions, getTransactionId?: () => string) => ICellRange.ISnapshot;
|
|
214
314
|
getRangeStats: (coords: readonly IRange.Coords[], iteratorOptions?: ICellRange.GetStatsOptions) => IRangeStats;
|
|
215
315
|
getDefaultShiftAxis: (coords?: IRange.Coords) => IRange.Axis;
|
|
216
316
|
getDefaultSortCriteria: (rangeCoords: IRange.Coords, axis?: IRange.Axis, cell?: ICell.Address) => ISort.DefaultSortCriteria;
|
|
317
|
+
getDefaultAutoFillCriteria: (rangeCoords: IRange.Coords, direction?: IRange.Direction, destination?: IRange.Coords) => IAutoFill.DefaultCriteria | null;
|
|
217
318
|
find: (ranges: readonly IRange.Coords[], options: string | ICellRange.FindOptions) => Iterator<ICell>;
|
|
218
319
|
copyFrom: (destination: IRange.Coords, source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions) => Promise<IRange.Coords>;
|
|
219
|
-
contentCounts: (ranges: readonly IRange.Coords[], types: ICell.Content[] | undefined, ignoreHidden?: boolean | IRange.Axis) => Partial<Record<ICell.Content, number>>;
|
|
220
|
-
featureCounts: (ranges: readonly IRange.Coords[], features?: ICellRange.Feature | readonly ICellRange.Feature[], ignoreHidden?: boolean | IRange.Axis) => ICellRange.Counts;
|
|
320
|
+
contentCounts: (ranges: readonly IRange.Coords[], types: ICell.Content[] | undefined, ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean) => Partial<Record<ICell.Content, number>>;
|
|
321
|
+
featureCounts: (ranges: readonly IRange.Coords[], features?: ICellRange.Feature | readonly ICellRange.Feature[], ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean) => ICellRange.Counts;
|
|
221
322
|
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,
|
|
323
|
+
dependencyRanges: (coords: IRange.Coords, kind: "precedents" | "dependents", direct: boolean) => Promise<ICellRanges | null>;
|
|
324
|
+
clear: (ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean, cutFrom?: IRange.Coords | null) => void;
|
|
224
325
|
calculate: (ranges: ICellRanges.Coords, options?: ICalculation.CalculateOptions) => void;
|
|
225
326
|
autoSelect: (options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => Promise<IRange.Coords[]>;
|
|
327
|
+
beginCommit: (options?: ITransaction.StoreOperationOptions | string) => ITransaction;
|
|
328
|
+
recordSelection: (trans: ITransaction, selection: Partial<IRangeSelection.Coords>, options?: Pick<ICellRange.OperationOptions, "autoSelect" | "autoSelectRestore"> | null, undo?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => void;
|
|
329
|
+
commitWithDirectives: (trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives) => void;
|
|
226
330
|
autoFit: (ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions) => void;
|
|
227
|
-
|
|
228
|
-
|
|
331
|
+
getBestFit: (range: IRange.Coords, options?: ICellRange.BestFitOptions) => Size;
|
|
332
|
+
invalidateRendering: () => void;
|
|
333
|
+
addListenerNode: (ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions) => IListener.Remove;
|
|
334
|
+
addWatch: (coords: IRange.Coords, formula: ICalculation.IFormula | string, handlers: WatchAnchor.Handlers, origin?: IRange.CellCoords, options?: ICellRange.WatchOptions) => IListener.Remove;
|
|
229
335
|
surroundingRegion: (range: IRange.Coords, options?: ICellRange.GetSurroundingOptions) => IRange.Coords;
|
|
336
|
+
getTraverseRegion: (cell: IRange.CellCoords, axis: IRange.Axis, reverse: boolean) => IRange.Coords | null;
|
|
230
337
|
sort: (coords: Readonly<IRange.Coords>, options?: boolean | ISort.Options[] | (ISort.RangeOptions & ITransaction.OperationOptions)) => IRange.Coords;
|
|
231
338
|
filter: (coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions, options?: ITransaction.OperationOptions) => Promise<IRange.Coords>;
|
|
339
|
+
evalFilter: (coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions | null | undefined) => Promise<_SheetFilterUtils.FilterRuns>;
|
|
340
|
+
applyFilterRuns: (runs: _SheetFilterUtils.FilterRuns, options?: ITransaction.OperationOptions) => void;
|
|
341
|
+
filteredTables: () => ITable[];
|
|
232
342
|
setHyperlinks: (ranges: readonly ISpatialMap.Entry<IHyperlink.Update>[], defaultUpdate?: IHyperlink.Update, options?: ITransaction.OperationOptions) => void;
|
|
233
|
-
setComments: (ranges: readonly ISpatialMap.Entry<IComment.
|
|
343
|
+
setComments: (ranges: readonly ISpatialMap.Entry<IComment.Update>[], comments?: IComment.Update | IComment.JSON, options?: ITransaction.OperationOptions) => void;
|
|
234
344
|
getBoundsAtCoords: (coords: IRange.Coords) => Bounds;
|
|
235
345
|
extendRange: (direction: IRange.Direction, cell: IRange.CellCoords) => Readonly<IRange.Coords>;
|
|
236
346
|
createTupleBuilder: <T>(transpose?: boolean) => Tuple.IBuilder<T>;
|
|
@@ -247,30 +357,22 @@ export declare class Sheet implements ISheet {
|
|
|
247
357
|
* @internal
|
|
248
358
|
*/
|
|
249
359
|
protected _getReadCtx(): SheetReadContext;
|
|
250
|
-
/** @internal Reconciled error-VALUE view; see {@link _getErrorSpatialReconciled}. */
|
|
251
|
-
protected _errorReconciled: {
|
|
252
|
-
grid: ISparseGrid<Scalar> | null;
|
|
253
|
-
epoch: number;
|
|
254
|
-
spatial: ISpatialMap<boolean>;
|
|
255
|
-
} | null;
|
|
256
|
-
/**
|
|
257
|
-
* @internal Bumped whenever `cellValuesGrid` is mutated IN PLACE (calc realize, re-load) —
|
|
258
|
-
* grid identity alone catches every other mutation (they clone).
|
|
259
|
-
*/
|
|
260
|
-
protected _errorEpoch: number;
|
|
261
360
|
/**
|
|
262
|
-
* The
|
|
361
|
+
* The sheet's grid: the synchronous half of the calculation service for this sheet
|
|
362
|
+
* (DESIGN-CALC-SERVICE §13.23, §13.24), holding everything a cell contains - the formulas, the
|
|
363
|
+
* values and the indexes over them - and forwarding every verb to its backend.
|
|
263
364
|
*
|
|
264
365
|
* @remarks
|
|
265
|
-
* `
|
|
266
|
-
*
|
|
267
|
-
* (
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
* reduces to returning it.
|
|
366
|
+
* A plain field, NOT part of `State` (§13.24 a): one grid serves every version of the sheet, so
|
|
367
|
+
* a versioned slot would answer with the CURRENT maps from a historic record - which the sheet
|
|
368
|
+
* reads (`_resolveInheritedFormats`, the snapshot sheets). What the grid HOLDS versions, in its
|
|
369
|
+
* own record; its reads take the transaction to answer for. Opened by `_fromJSON`, so it is
|
|
370
|
+
* absent until then; a snapshot sheet is handed the source's grid by `_clone`.
|
|
271
371
|
* @internal
|
|
272
372
|
*/
|
|
273
|
-
protected
|
|
373
|
+
protected _calcGrid: ICalcGrid;
|
|
374
|
+
/** `false` for a snapshot sheet, which holds its source's grid and must not close it. */
|
|
375
|
+
protected _ownsCalcGrid: boolean;
|
|
274
376
|
/** @internal Cached mutation-engine context. See {@link SheetMutationContext}. */
|
|
275
377
|
protected _mutationCtx: ReturnType<Sheet['_buildMutationCtx']> | null;
|
|
276
378
|
/** @internal Access the mutation context (cached). See {@link SheetMutationContext}. */
|
|
@@ -288,21 +390,23 @@ export declare class Sheet implements ISheet {
|
|
|
288
390
|
readonly columnHeadersShiftCallback: SheetHeader.ShiftCallback | null;
|
|
289
391
|
getEntireCoords: () => IRange.Coords;
|
|
290
392
|
getView: () => ISheetView;
|
|
291
|
-
beginCommit: (options?: ITransaction.StoreOperationOptions
|
|
393
|
+
beginCommit: (options?: ITransaction.StoreOperationOptions | string) => ITransaction;
|
|
292
394
|
updateState: (updateState?: Partial<State>, options?: ITransaction.OperationOptions | string) => State;
|
|
293
395
|
getState: () => Readonly<State>;
|
|
294
396
|
stateFor: (trans: ITransaction) => State;
|
|
397
|
+
readonly calcGrid: ICalcGrid;
|
|
295
398
|
/** Invalidate the cached used-range read (a mutation may change the used bounds). */
|
|
296
399
|
invalidateUsedCoords: () => void;
|
|
297
400
|
validateCoords: (coords: IRange.Coords, oobMessage?: string, allowOutOfBounds?: boolean) => void;
|
|
298
401
|
protectionCheck: (check?: ProtectionCheck | null, coords?: Readonly<IRange.Coords> | readonly IRange.Coords[] | null, action?: string | null) => void;
|
|
299
402
|
getDefaultShiftAxis: (coords?: IRange.Coords) => IRange.Axis;
|
|
300
|
-
processListenerShift: (rangesListenerMap: Map<number, ICellRangesListenerEntry>, beforeAfterMap: Map<number, BeforeAfterRange>, beforeStates: Map<number, ICellRangesListenerEntry>, options: ISpatialMap.ShiftDetails<ICellRangeListenerEntry>) => ISpatialMap.Entry<ICellRangeListenerEntry>[] | void;
|
|
301
403
|
processLayoutChange: () => void;
|
|
404
|
+
/** The movables' by-model index as a shift left it, or `null` if the shift moved none. */
|
|
405
|
+
takeShiftedMovableModels: () => Map<IMovable, ISpatialMap.Entry<MovableEntry>> | null;
|
|
406
|
+
/** The same for the note boxes' index. */
|
|
407
|
+
takeShiftedNoteModels: () => Map<IMovable, ISpatialMap.Entry<MovableEntry>> | null;
|
|
302
408
|
markColumnHeaderTableNames: () => void;
|
|
303
|
-
|
|
304
|
-
/** Read-clone-write the `_rangeStats` cache against a new values grid. */
|
|
305
|
-
cloneRangeStats: (grid: ISparseGrid<Scalar>) => void;
|
|
409
|
+
commitWithDirectives: (trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives) => void;
|
|
306
410
|
readonly styles: IStyleCollection;
|
|
307
411
|
getRangedEntries: <T, E = T>(spatial: ISpatialQuery, ranges: readonly IRange.Coords[], options?: GetTypedRangeOptions<T, E>, spatialSort?: boolean) => T[];
|
|
308
412
|
createSparseBuilder: (options?: ICellRange.SparseBuilderOptions, sheetRange?: ICellRange | null, internal?: InternalTupleUpdate) => ICellRange.SparseBuilder;
|
|
@@ -312,27 +416,37 @@ export declare class Sheet implements ISheet {
|
|
|
312
416
|
content: IUsedRangeSpatialMap<SheetDirectStyle>;
|
|
313
417
|
}) => IUsedRangeSpatialMap<SheetDirectStyle>;
|
|
314
418
|
autoFit: (ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions) => void;
|
|
419
|
+
recordAutoFormat: (trans: ITransaction) => void;
|
|
420
|
+
recordSkipProtectionCheck: (trans: ITransaction) => void;
|
|
421
|
+
recordFreezePanes: (trans: ITransaction, before: IRange.CellCoords, after: IRange.CellCoords) => void;
|
|
422
|
+
recordSelection: (trans: ITransaction, selection: Partial<IRangeSelection.Coords>, options?: Pick<ICellRange.OperationOptions, "autoSelect" | "autoSelectRestore"> | null, undo?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => void;
|
|
315
423
|
notify: (key: keyof ISheet.IListeners) => void | Promise<any>;
|
|
316
424
|
getRange: (address?: ICellRange.Address, options?: ICellRange.GetRangeOptions) => ICellRange;
|
|
317
425
|
getSelection: () => IRangeSelection;
|
|
318
426
|
getMerges: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => IRange.Coords[];
|
|
319
427
|
indexMerges: (mergeInserts: IRange.Coords[] | null, mergeRemoves?: IRange.Coords[] | null) => void;
|
|
320
|
-
validateOrRemoveOverlaps: (rangeCoords: IRange.Coords, type: string, table?: ITable | null, removeIfContains?: boolean) => void;
|
|
428
|
+
validateOrRemoveOverlaps: (rangeCoords: IRange.Coords, type: string, table?: ITable | null, removeIfContains?: boolean, absorbAutoTable?: boolean) => void;
|
|
321
429
|
autoSelect: (options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => Promise<IRange.Coords[]>;
|
|
322
430
|
readonly isDataColumn: boolean;
|
|
323
431
|
readonly strings: IStringCollection;
|
|
432
|
+
readonly lists: ScalarListFactory;
|
|
324
433
|
readonly cellOptions: SheetCellOptions;
|
|
325
434
|
readonly runtime: IRuntime;
|
|
326
435
|
getProtection: () => ISheetProtection;
|
|
327
436
|
hasRangedEntries: (key: keyof State, range: IRange.Coords) => boolean;
|
|
328
437
|
rangeStateIterator: (options: RangeState.IteratorOptions) => RangeState.Iterator;
|
|
329
|
-
|
|
438
|
+
recordChange: (trans: ITransaction, category: EventCategory, ranges: readonly IRange.Coords[] | null | undefined) => void;
|
|
439
|
+
loadComments: (map: IAnchoredMap<IComment, IComment.JSON>, refs: IRange.JSONReference<IComment.JSON>[]) => IAnchoredMap<IComment, IComment.JSON>;
|
|
440
|
+
newCommentJSON: (modifiers: IComment.Modifiers) => IComment.JSON;
|
|
441
|
+
notifyCommentsChange: () => void;
|
|
442
|
+
recordFormulasEntered: (trans: ITransaction, ranges: readonly IRange.Coords[] | null | undefined) => void;
|
|
330
443
|
getTables: () => ITableCollection;
|
|
331
444
|
getAutoTable: () => ITable | null;
|
|
332
445
|
cellIterator: (options: CellState.IteratorOptions) => IterableIterator<ICellRange.Entry, ICellRange.Entry, IRange.CellCoords>;
|
|
446
|
+
cellStateIterator: (options?: CellState.IteratorOptions) => CellState.Iterator;
|
|
333
447
|
rangeToCoords: (address: ICellRange.Address, protectionCheck?: ProtectionCheck | null, lookupNames?: boolean) => IRange.Coords;
|
|
334
448
|
getCell: (address?: ICell.Address) => ICell;
|
|
335
|
-
createCell: (update: ICell.Update, coords?: IRange.CellCoords | null) => ICell;
|
|
449
|
+
createCell: (update: ICell.Update, coords?: IRange.CellCoords | null, options?: ICell.CreateCellOptions) => ICell;
|
|
336
450
|
getAutoFillPreviewCache: () => AutoFillPreviewCache | null;
|
|
337
451
|
setAutoFillPreviewCache: (cache: AutoFillPreviewCache) => void;
|
|
338
452
|
};
|
|
@@ -351,9 +465,10 @@ export declare class Sheet implements ISheet {
|
|
|
351
465
|
readonly internal: {
|
|
352
466
|
getSheet: () => ISheet;
|
|
353
467
|
getState: () => Readonly<State>;
|
|
468
|
+
getCalcGrid: () => ICalcGrid;
|
|
354
469
|
isDataColumn: () => boolean;
|
|
355
470
|
createRange: (coords: Readonly<IRange.FixableCoords> | string, getOptions?: ICellRange.GetRangeOptions, readOnly?: string | null) => ICellRange;
|
|
356
|
-
isContentful: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => boolean;
|
|
471
|
+
isContentful: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean) => boolean;
|
|
357
472
|
cellToCoords: (address: ICell.Address) => IRange.CellCoords;
|
|
358
473
|
rangeToCoords: (address: ICellRange.Address, protectionCheck?: ProtectionCheck | null, lookupNames?: boolean) => IRange.Coords;
|
|
359
474
|
rangesToCoords: (address: ICellRanges.Address, protectionCheck?: ProtectionCheck | null | undefined, lookupNames?: boolean, requireSameSheet?: boolean, allowOutOfBounds?: boolean) => IRange.Coords[];
|
|
@@ -363,36 +478,47 @@ export declare class Sheet implements ISheet {
|
|
|
363
478
|
cellIterator: (options: CellState.IteratorOptions) => IterableIterator<ICellRange.Entry, ICellRange.Entry, IRange.CellCoords>;
|
|
364
479
|
getVisible: (coords: readonly IRange.Coords[], options?: ICellRange.GetVisibleOptions) => readonly IRange.Coords[];
|
|
365
480
|
getUsedCoords: (options?: ICellRange.GetRangeOptions) => IRange.Coords | null;
|
|
366
|
-
updateTuples: (boundedTuples: Tuple.
|
|
481
|
+
updateTuples: (boundedTuples: Tuple.Region<ICell.Update> | null, options?: ICellRange.UpdateCellsOptions, coordValidator?: CoordUtils.CoordValidator | null | undefined, internalOptions?: InternalTupleUpdate | null) => void;
|
|
367
482
|
merge: (ranges: readonly IRange.Coords[], options?: IRange.AxisSelection | ICellRange.MergeOptions | null) => void;
|
|
368
483
|
unmerge: (ranges: readonly IRange.Coords[], options?: ITransaction.OperationOptions) => void;
|
|
369
484
|
getMerges: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => IRange.Coords[];
|
|
370
485
|
insertFrom: (ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions) => Promise<IRange.Coords>;
|
|
486
|
+
canInsertFrom: (ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions) => boolean;
|
|
371
487
|
insertCells: (ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.InsertOptions, coordValidator?: CoordUtils.CoordValidator) => void;
|
|
372
488
|
deleteCells: (ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.DeleteOptions) => void;
|
|
373
|
-
getStyle: (ranges: IRange.Coords[], anchor?: IRangeSelection.Coords, updateStyles?: (update:
|
|
374
|
-
updateStyles: (ranges: readonly ISpatialMap.Entry<
|
|
489
|
+
getStyle: (ranges: IRange.Coords[], anchor?: IRangeSelection.Coords, updateStyles?: (update: ICellStyle.Update, options?: ICellStyle.UpdateOptions) => void) => ICellStyle;
|
|
490
|
+
updateStyles: (ranges: readonly ISpatialMap.Entry<ICellStyle.Update>[], defaultUpdate?: ICellStyle.Update, options?: ICellStyle.UpdateOptions, calcedNumberFormat?: boolean) => void;
|
|
375
491
|
getSnapshot: (coordsFrom: readonly IRange.Coords[], optionsMark?: ICellRange.CopyOptions, getTransactionId?: () => string) => ICellRange.ISnapshot;
|
|
376
492
|
getRangeStats: (coords: readonly IRange.Coords[], iteratorOptions?: ICellRange.GetStatsOptions) => IRangeStats;
|
|
377
493
|
getDefaultShiftAxis: (coords?: IRange.Coords) => IRange.Axis;
|
|
378
494
|
getDefaultSortCriteria: (rangeCoords: IRange.Coords, axis?: IRange.Axis, cell?: ICell.Address) => ISort.DefaultSortCriteria;
|
|
495
|
+
getDefaultAutoFillCriteria: (rangeCoords: IRange.Coords, direction?: IRange.Direction, destination?: IRange.Coords) => IAutoFill.DefaultCriteria | null;
|
|
379
496
|
find: (ranges: readonly IRange.Coords[], options: string | ICellRange.FindOptions) => Iterator<ICell>;
|
|
380
497
|
copyFrom: (destination: IRange.Coords, source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions) => Promise<IRange.Coords>;
|
|
381
|
-
contentCounts: (ranges: readonly IRange.Coords[], types: ICell.Content[] | undefined, ignoreHidden?: boolean | IRange.Axis) => Partial<Record<ICell.Content, number>>;
|
|
382
|
-
featureCounts: (ranges: readonly IRange.Coords[], features?: ICellRange.Feature | readonly ICellRange.Feature[], ignoreHidden?: boolean | IRange.Axis) => ICellRange.Counts;
|
|
498
|
+
contentCounts: (ranges: readonly IRange.Coords[], types: ICell.Content[] | undefined, ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean) => Partial<Record<ICell.Content, number>>;
|
|
499
|
+
featureCounts: (ranges: readonly IRange.Coords[], features?: ICellRange.Feature | readonly ICellRange.Feature[], ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean) => ICellRange.Counts;
|
|
383
500
|
featureRegions: (bounds: IRange.Coords, requested: readonly ICellRange.Feature[], options?: ICellRange.GetRegionsOptions) => IRange.Coords[];
|
|
384
|
-
dependencyRanges: (coords: IRange.Coords, kind: "precedents" | "dependents", direct: boolean) => ICellRanges | null
|
|
385
|
-
clear: (ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean,
|
|
501
|
+
dependencyRanges: (coords: IRange.Coords, kind: "precedents" | "dependents", direct: boolean) => Promise<ICellRanges | null>;
|
|
502
|
+
clear: (ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean, cutFrom?: IRange.Coords | null) => void;
|
|
386
503
|
calculate: (ranges: ICellRanges.Coords, options?: ICalculation.CalculateOptions) => void;
|
|
387
504
|
autoSelect: (options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => Promise<IRange.Coords[]>;
|
|
505
|
+
beginCommit: (options?: ITransaction.StoreOperationOptions | string) => ITransaction;
|
|
506
|
+
recordSelection: (trans: ITransaction, selection: Partial<IRangeSelection.Coords>, options?: Pick<ICellRange.OperationOptions, "autoSelect" | "autoSelectRestore"> | null, undo?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => void;
|
|
507
|
+
commitWithDirectives: (trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives) => void;
|
|
388
508
|
autoFit: (ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions) => void;
|
|
389
|
-
|
|
390
|
-
|
|
509
|
+
getBestFit: (range: IRange.Coords, options?: ICellRange.BestFitOptions) => Size;
|
|
510
|
+
invalidateRendering: () => void;
|
|
511
|
+
addListenerNode: (ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions) => IListener.Remove;
|
|
512
|
+
addWatch: (coords: IRange.Coords, formula: ICalculation.IFormula | string, handlers: WatchAnchor.Handlers, origin?: IRange.CellCoords, options?: ICellRange.WatchOptions) => IListener.Remove;
|
|
391
513
|
surroundingRegion: (range: IRange.Coords, options?: ICellRange.GetSurroundingOptions) => IRange.Coords;
|
|
514
|
+
getTraverseRegion: (cell: IRange.CellCoords, axis: IRange.Axis, reverse: boolean) => IRange.Coords | null;
|
|
392
515
|
sort: (coords: Readonly<IRange.Coords>, options?: boolean | ISort.Options[] | (ISort.RangeOptions & ITransaction.OperationOptions)) => IRange.Coords;
|
|
393
516
|
filter: (coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions, options?: ITransaction.OperationOptions) => Promise<IRange.Coords>;
|
|
517
|
+
evalFilter: (coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions | null | undefined) => Promise<_SheetFilterUtils.FilterRuns>;
|
|
518
|
+
applyFilterRuns: (runs: _SheetFilterUtils.FilterRuns, options?: ITransaction.OperationOptions) => void;
|
|
519
|
+
filteredTables: () => ITable[];
|
|
394
520
|
setHyperlinks: (ranges: readonly ISpatialMap.Entry<IHyperlink.Update>[], defaultUpdate?: IHyperlink.Update, options?: ITransaction.OperationOptions) => void;
|
|
395
|
-
setComments: (ranges: readonly ISpatialMap.Entry<IComment.
|
|
521
|
+
setComments: (ranges: readonly ISpatialMap.Entry<IComment.Update>[], comments?: IComment.Update | IComment.JSON, options?: ITransaction.OperationOptions) => void;
|
|
396
522
|
getBoundsAtCoords: (coords: IRange.Coords) => Bounds;
|
|
397
523
|
extendRange: (direction: IRange.Direction, cell: IRange.CellCoords) => Readonly<IRange.Coords>;
|
|
398
524
|
createTupleBuilder: <T>(transpose?: boolean) => Tuple.IBuilder<T>;
|
|
@@ -466,7 +592,7 @@ export declare class Sheet implements ISheet {
|
|
|
466
592
|
* @param searchTypes If value is in record it will be search, boolean flag is used for fullyEnclosed.
|
|
467
593
|
* @internal
|
|
468
594
|
*/
|
|
469
|
-
protected _collectRanges(queryCoords: IRange.Coords, rangesByType?: ISpatialMap.Entry<RangeState.Intersection>[], searchTypes?: boolean | RangeState.SearchTypes | null, state?: State, injectReferences?: IRange.JSONReference<any>[][]): void;
|
|
595
|
+
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;
|
|
470
596
|
/**
|
|
471
597
|
* This wraps the stateIterator with a ICell.IteratorContext.
|
|
472
598
|
* // TODO - **PERFORMANCE** We are creating a new CellState on very call
|
|
@@ -513,8 +639,23 @@ export declare class Sheet implements ISheet {
|
|
|
513
639
|
content: IUsedRangeSpatialMap<SheetDirectStyle>;
|
|
514
640
|
}): IUsedRangeSpatialMap<SheetDirectStyle>;
|
|
515
641
|
/** @internal Logic lives in `_SheetMutations.updateStyles`. */
|
|
516
|
-
protected _updateStyles(ranges: readonly ISpatialMap.Entry<
|
|
517
|
-
options?:
|
|
642
|
+
protected _updateStyles(ranges: readonly ISpatialMap.Entry<ICellStyle.Update>[], defaultUpdate?: ICellStyle.Update, // we do this because updateTuples may update each
|
|
643
|
+
options?: ICellStyle.UpdateOptions, calcedNumberFormat?: boolean): void;
|
|
644
|
+
/**
|
|
645
|
+
* Holds a style set on one cell in the buffer the cell writes of an open transaction are held in
|
|
646
|
+
* ({@link CellBuffer.holdStyle}).
|
|
647
|
+
*
|
|
648
|
+
* @returns `false` if it is to be written as it comes.
|
|
649
|
+
* @internal
|
|
650
|
+
*/
|
|
651
|
+
protected _holdStyle(range: ISpatialMap.Entry<ICellStyle.Update>, defaultUpdate?: ICellStyle.Update, options?: ICellStyle.UpdateOptions): boolean;
|
|
652
|
+
/**
|
|
653
|
+
* Whether a style update written to one cell changes that cell alone; a caller's callback is not
|
|
654
|
+
* known to. (The style typed input implies is not asked: it is a number format, a quote prefix or
|
|
655
|
+
* a wrap.)
|
|
656
|
+
* @internal
|
|
657
|
+
*/
|
|
658
|
+
protected _isLocalStyle(state: Readonly<State>, rowIndex: number, colIndex: number, update: ICellStyle.Update): boolean;
|
|
518
659
|
/** @internal */
|
|
519
660
|
protected _createSparseBuilder(options?: ICellRange.SparseBuilderOptions, sheetRange?: ICellRange | null, internal?: InternalTupleUpdate): ICellRange.SparseBuilder;
|
|
520
661
|
/**
|
|
@@ -522,11 +663,20 @@ export declare class Sheet implements ISheet {
|
|
|
522
663
|
* Logic lives in `_SheetMutations.updateTuples`.
|
|
523
664
|
* @internal
|
|
524
665
|
*/
|
|
525
|
-
protected _updateTuples(boundedTuples: Tuple.
|
|
666
|
+
protected _updateTuples(boundedTuples: Tuple.Region<ICell.Update> | null, options?: ICellRange.UpdateCellsOptions, coordValidator?: CoordUtils.CoordValidator | null | undefined, internalOptions?: InternalTupleUpdate | null): void;
|
|
667
|
+
/**
|
|
668
|
+
* The buffer single-cell writes made inside an open transaction are held in ({@link CellBuffer}).
|
|
669
|
+
* @internal
|
|
670
|
+
*/
|
|
671
|
+
protected _getCellBuffer(): CellBuffer;
|
|
526
672
|
/** @internal */
|
|
527
673
|
protected _sort(coords: Readonly<IRange.Coords>, options?: boolean | ISort.Options[] | ISort.RangeOptions & ITransaction.OperationOptions): IRange.Coords;
|
|
528
674
|
/** @internal */
|
|
529
675
|
protected _filter(coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions, options?: ITransaction.OperationOptions): Promise<IRange.Coords>;
|
|
676
|
+
/** @internal The read-only half of {@link _filter}: settles the runs without writing. */
|
|
677
|
+
protected _evalFilter(coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions | null | undefined): Promise<_SheetFilterUtils.FilterRuns>;
|
|
678
|
+
/** @internal The write half of {@link _filter}: inside the caller's open transaction. */
|
|
679
|
+
protected _applyFilterRuns(runs: _SheetFilterUtils.FilterRuns, options?: ITransaction.OperationOptions): void;
|
|
530
680
|
/** @internal Logic lives in `_SheetMutations.autoFill`. */
|
|
531
681
|
protected _autoFill(template: IRange.Coords, destination: IRange.Coords, options?: ICellRange.AutoFillOptions): boolean | AutoFillProjection;
|
|
532
682
|
/** @internal Logic lives in `_SheetMutations.autoFillRange`. */
|
|
@@ -536,8 +686,67 @@ export declare class Sheet implements ISheet {
|
|
|
536
686
|
/** @internal Logic lives in `_SheetMutations.setHyperlinks`. */
|
|
537
687
|
protected _setHyperlinks(ranges: readonly ISpatialMap.Entry<IHyperlink.Update>[], defaultUpdate?: IHyperlink.Update, // we do this because updateTuples may update each
|
|
538
688
|
options?: ITransaction.OperationOptions): void;
|
|
539
|
-
/**
|
|
689
|
+
/**
|
|
690
|
+
* The request options for a grid call made under `transaction`: the snapshot it names and the
|
|
691
|
+
* savepoint its maps are cloned under.
|
|
692
|
+
* @internal
|
|
693
|
+
*/
|
|
694
|
+
protected _requestFor(transaction: ITransaction | null): ICalcGrid.RequestOptions;
|
|
695
|
+
/**
|
|
696
|
+
* The formats the entered cells of the blocks inherit, as of a commit.
|
|
697
|
+
*
|
|
698
|
+
* Excel's entry rule: a formula typed into a General cell takes the number format of the first
|
|
699
|
+
* cell it reads that has one - `=A1+B1` shows currency when `A1` does. Which cells, and in what
|
|
700
|
+
* order, the engine reports with the results ({@link ICalcGrid.Results.formatInserts}); which
|
|
701
|
+
* formats they carry is read from the ENTERING commit's snapshot, so a pass that comes late -
|
|
702
|
+
* after an engine start, or an F9 under manual calculation - sees the inputs as they were when
|
|
703
|
+
* the formula was entered, whatever was formatted since. Never through a name.
|
|
704
|
+
*
|
|
705
|
+
* @remarks
|
|
706
|
+
* Range-shaped, not per cell. A relative reference names a different cell from each cell of
|
|
707
|
+
* its block, so the cells a block reads through it are a rectangle the block's size offset by
|
|
708
|
+
* the reference; the styled entries found there are shifted back onto the block. A fixed axis
|
|
709
|
+
* reads one row or column for the whole block. A reference stands for its top-left cell.
|
|
710
|
+
* References are written from the last to the first, so the first reference that formats a
|
|
711
|
+
* cell is the one that stands - "the first that is not General", per cell.
|
|
712
|
+
* @internal
|
|
713
|
+
*/
|
|
714
|
+
protected _resolveInheritedFormats(commitId: string, blocks: readonly EnteredBlock[], entered: readonly IRange.Coords[]): ISpatialMap.Entry<ICellStyle.Update>[];
|
|
715
|
+
/**
|
|
716
|
+
* Land a record the engine pushed - a pass's results, a seed's - in the sheet's snapshots.
|
|
717
|
+
*
|
|
718
|
+
* @remarks
|
|
719
|
+
* The record names the snapshot it answers for (`commitId`). Everything it says about cells -
|
|
720
|
+
* the formulas, the values, the spills, the errors, the pending and circular marks - has been
|
|
721
|
+
* landed in the grid's own snapshots by the time this runs, and a record naming a snapshot off
|
|
722
|
+
* the live history never reaches here at all. What is left is the sheet's: what is PROMOTED -
|
|
723
|
+
* number formats, sizes - amended into the commit that entered the formulas, and the
|
|
724
|
+
* notifications, which realize has to make by hand.
|
|
725
|
+
* @internal
|
|
726
|
+
*/
|
|
540
727
|
protected _realizeCalcedValues(results: ICalcGrid.Results): void;
|
|
728
|
+
/**
|
|
729
|
+
* Land the promoted half of a pass's results - number formats and sizes - in the commit that
|
|
730
|
+
* entered the formulas they belong to.
|
|
731
|
+
*
|
|
732
|
+
* @remarks
|
|
733
|
+
* Excel's rule: entering a formula formats and fits it; recalculating it does not. So the set is
|
|
734
|
+
* the formulas the target commit entered on this sheet, clipped to what this pass realized; the
|
|
735
|
+
* directives are the target's own (`autoFormat`, `autoFit`); and once resolved the sheet is
|
|
736
|
+
* marked on the target ({@link IntentCalcResolved}), so a later pass for the same commit - a
|
|
737
|
+
* dependent on another sheet, an explicit recalculation, the pass a redo triggers - leaves what
|
|
738
|
+
* is now in the snapshot alone. The mark is written with the sheet's record so that it lands
|
|
739
|
+
* even when nothing was promoted; an amend with no writes is elided. It is written only by a
|
|
740
|
+
* pass that realized the entered cells: an engine starting up runs a pass that realizes
|
|
741
|
+
* nothing before the one that carries the results.
|
|
742
|
+
*
|
|
743
|
+
* The number format is the engine's pick per cell ({@link ICalcGrid.Results.formatInserts}):
|
|
744
|
+
* the references the formula inherits one from, resolved here against the entering commit's
|
|
745
|
+
* snapshot ({@link _resolveInheritedFormats}), or else the format its functions supplied.
|
|
746
|
+
*
|
|
747
|
+
* @internal
|
|
748
|
+
*/
|
|
749
|
+
protected _promoteCalcResults(target: ITransaction.ICommit, results: ICalcGrid.Results): void;
|
|
541
750
|
/** {@inheritDoc ISheet.calculate} */
|
|
542
751
|
calculate(full?: boolean): Promise<ICalculation.Status>;
|
|
543
752
|
/** @internal */
|
|
@@ -546,10 +755,10 @@ export declare class Sheet implements ISheet {
|
|
|
546
755
|
protected _calculateFull(): void;
|
|
547
756
|
/** @internal */
|
|
548
757
|
/** @internal Logic lives in `_SheetMutations.setComments`. */
|
|
549
|
-
protected _setComments(ranges: readonly ISpatialMap.Entry<IComment.
|
|
758
|
+
protected _setComments(ranges: readonly ISpatialMap.Entry<IComment.Update>[], comments?: IComment.Update | IComment.JSON, // `undefined` = each entry carries its own (updateTuples)
|
|
550
759
|
options?: ITransaction.OperationOptions): void;
|
|
551
760
|
/** @internal Logic lives in `_SheetMutations.clear`. */
|
|
552
|
-
protected _clear(ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean,
|
|
761
|
+
protected _clear(ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean, cutFrom?: IRange.Coords | null): void;
|
|
553
762
|
/** @internal Logic lives in `_SheetMutations.merge`. */
|
|
554
763
|
protected _merge(ranges: readonly IRange.Coords[], options?: IRange.AxisSelection | ICellRange.MergeOptions | null): void;
|
|
555
764
|
/** @internal Logic lives in `_SheetMutations.unmerge`. */
|
|
@@ -572,16 +781,58 @@ export declare class Sheet implements ISheet {
|
|
|
572
781
|
protected _snapShotFromSource(source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions): ICellRange.ISnapshot;
|
|
573
782
|
/** @internal */
|
|
574
783
|
protected _copyFrom(destination: IRange.Coords, source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions): Promise<IRange.Coords>;
|
|
784
|
+
/**
|
|
785
|
+
* Where a {@link _copyFrom} lands, and whether the merges there let it - Excel's rules:
|
|
786
|
+
*
|
|
787
|
+
* - A cut lands the source's own size at the destination's top-left (it can't tile).
|
|
788
|
+
* - A single cell - or one merged cell - copied onto exactly one merged cell fills that merge,
|
|
789
|
+
* bigger or not (the snapshot pastes it values-only). A cut gets no such treatment.
|
|
790
|
+
* - A copy that would cut through a merge is refused, its own source's included.
|
|
791
|
+
* - A cut destroys the merges it lands across instead - but not its OWN merge, which it would have
|
|
792
|
+
* to tear in two; that is refused (Excel silently loses the merge).
|
|
793
|
+
*
|
|
794
|
+
* Runs inside the copy's transaction: the merges a cut destroys roll back with it.
|
|
795
|
+
* @internal
|
|
796
|
+
*/
|
|
797
|
+
protected _resolveCopyDestination(destination: IRange.Coords, snapshot: ICellRange.ISnapshot, options: ICellRange.CopyOptions | undefined, isCut: boolean): IRange.Coords;
|
|
575
798
|
/** {@inheritDoc ISheet.addAutoTable} */
|
|
576
799
|
addAutoTable(address?: ICellRange.Address, options?: ICellRange.AddAutoTableOptions): ITable;
|
|
577
800
|
/** {@inheritDoc ISheet.getAutoTable} */
|
|
578
801
|
getAutoTable(): ITable | null;
|
|
802
|
+
/**
|
|
803
|
+
* The tables on this sheet that hold a filter condition: the AutoTable, then the tables. What
|
|
804
|
+
* makes the sheet "filtered" ({@link ISheetHeader.getFilteredRanges}).
|
|
805
|
+
*/
|
|
806
|
+
private _filteredTables;
|
|
807
|
+
/**
|
|
808
|
+
* Tells the grid whether this sheet is filtered now ({@link _filteredTables}), from
|
|
809
|
+
* inside the operation that may have changed it: a table's condition set or cleared, a table
|
|
810
|
+
* added or deleted. The grid writes only a different answer, so telling it more often than it
|
|
811
|
+
* changes costs a walk of the tables. A restore is not told, as {@link _tellHidden}.
|
|
812
|
+
*/
|
|
813
|
+
protected _tellFiltered(): void;
|
|
579
814
|
/** @internal */
|
|
580
815
|
protected _getDefaultShiftAxis(coords?: IRange.Coords): IRange.Axis;
|
|
581
816
|
/** @internal */
|
|
582
817
|
protected _getTables(address: ICellRanges.Address, ignoreHidden?: boolean, fullyContained?: boolean): ITable[];
|
|
583
818
|
/** @internal */
|
|
819
|
+
protected _getDefaultAutoFillCriteria(rangeCoords: IRange.Coords, direction?: IRange.Direction, destination?: IRange.Coords): IAutoFill.DefaultCriteria | null;
|
|
820
|
+
/** @internal */
|
|
584
821
|
protected _getDefaultSortCriteria(rangeCoords: IRange.Coords, axis?: IRange.Axis, cell?: ICell.Address): ISort.DefaultSortCriteria;
|
|
822
|
+
/**
|
|
823
|
+
* The refusal an {@link ICellRange.insertFrom} would raise, as a localized message - `null` when it
|
|
824
|
+
* would go through. Asked BEFORE anything is committed, both by `_insertFrom` itself (so a refusal
|
|
825
|
+
* leaves nothing to roll back and carries the message that fits the reason) and by the public
|
|
826
|
+
* `canInsertFrom`, which is what lets a drag preview show a drop as refused before it is attempted.
|
|
827
|
+
*
|
|
828
|
+
* @internal
|
|
829
|
+
*/
|
|
830
|
+
protected _getInsertFromRefusal(coordsInsert: IRange.Coords, coordsCut: IRange.Coords, axis: IRange.Axis, isCut: boolean, isSameSheet: boolean): string | null;
|
|
831
|
+
/**
|
|
832
|
+
* {@inheritDoc ICellRange.canInsertFrom}
|
|
833
|
+
* @internal
|
|
834
|
+
*/
|
|
835
|
+
protected _canInsertFrom(ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions): boolean;
|
|
585
836
|
/** @internal */
|
|
586
837
|
protected _insertFrom(ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions): Promise<IRange.Coords>;
|
|
587
838
|
/**
|
|
@@ -608,26 +859,177 @@ export declare class Sheet implements ISheet {
|
|
|
608
859
|
* Implementation lives in `_SheetAutoFitUtils` (same pattern as `_SheetSortUtils.doSort`).
|
|
609
860
|
*/
|
|
610
861
|
protected _autoFit(ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions): void;
|
|
862
|
+
/**
|
|
863
|
+
* The size a range's content needs, without writing it. See {@link ICellRange.getBestFit}.
|
|
864
|
+
*
|
|
865
|
+
* @internal
|
|
866
|
+
*/
|
|
867
|
+
protected _getBestFit(range: IRange.Coords, options?: ICellRange.BestFitOptions): Size;
|
|
611
868
|
/** @internal */
|
|
612
869
|
protected _createRangeEvent(coords: (readonly IRange.FixableCoords[]) | IRange.FixableCoords, options: NotifierOptions, coordsFrom?: (readonly IRange.FixableCoords[]) | IRange.FixableCoords): ICellRange.Event;
|
|
613
870
|
/**
|
|
614
|
-
*
|
|
871
|
+
* Register a reference node for a range listener.
|
|
872
|
+
*
|
|
873
|
+
* @remarks
|
|
874
|
+
* The node is written into the anchored map by an AMEND on the current commit, so registering
|
|
875
|
+
* never becomes an undo step, and every snapshot from this commit forward carries the node at
|
|
876
|
+
* whatever coords it has then. That one write is where the whole contract comes from: undo to a
|
|
877
|
+
* snapshot at or after registration and the node is there, at the coords of that moment; undo to
|
|
878
|
+
* one from BEFORE it and the map simply has no entry, which is what `#N/A` is.
|
|
879
|
+
*
|
|
880
|
+
* The callback never enters state - it is held on the instance, keyed by node id.
|
|
881
|
+
*
|
|
615
882
|
* @internal
|
|
616
883
|
*/
|
|
617
|
-
protected
|
|
618
|
-
visited: Set<string>, options: NotifierOptions): void;
|
|
884
|
+
protected _addListenerNode(ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions): IListener.Remove;
|
|
619
885
|
/**
|
|
620
|
-
*
|
|
886
|
+
* {@link _addListenerNode}, also handing back the node, for a caller that reads its coords.
|
|
621
887
|
* @internal
|
|
622
888
|
*/
|
|
623
|
-
protected
|
|
889
|
+
protected _registerListenerNode(ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions, createNode?: (options: ListenerAnchor.ConstructorOptions) => ListenerAnchor): {
|
|
890
|
+
node: ListenerAnchor;
|
|
891
|
+
remove: IListener.Remove;
|
|
892
|
+
};
|
|
624
893
|
/**
|
|
625
|
-
*
|
|
894
|
+
* Register a watch: an expression kept evaluated over a range.
|
|
895
|
+
*
|
|
896
|
+
* @remarks
|
|
897
|
+
* A watch is a range listener that fires on formula evaluation - see {@link WatchAnchor}. Its
|
|
898
|
+
* location is a node in `State.listeners`, and its body is a formula block in a grid of its own
|
|
899
|
+
* that shadows this sheet, written at the watched coords exactly as if it had been typed there.
|
|
900
|
+
* A watch is allowed to overlap other formulas, which is why the body has a grid of its own: the
|
|
901
|
+
* sheet's formula map holds one formula per cell, and a validation, a conditional format and a
|
|
902
|
+
* real formula can all sit on D1:D3 at once.
|
|
903
|
+
*
|
|
904
|
+
* Registration waits for the engine and never starts it: a watch added while calculation is off
|
|
905
|
+
* 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
|
|
906
|
+
* watch is never an undo step. A snapshot older than the watch has neither, which is `#N/A`.
|
|
907
|
+
* The first delivery is the first pass that evaluates the body.
|
|
908
|
+
*
|
|
909
|
+
* @param coords The range the body is evaluated over.
|
|
910
|
+
* @param formula The expression, authored at `origin`, or a compiled formula anchored at
|
|
911
|
+
* `coords`' top-left.
|
|
912
|
+
* @param handlers `onValues` receives the body's values after every pass that changed them;
|
|
913
|
+
* `onChange` is told that an evaluation happened, without the values.
|
|
914
|
+
* @param origin Where `formula` is authored when it is not `coords`' own top-left: the shared
|
|
915
|
+
* origin of a multi-area watch, from which the body is filled to `coords`.
|
|
916
|
+
* @param options `arrayFirstCell`: every cell of the body is its own 1x1 array-entered formula.
|
|
626
917
|
* @internal
|
|
627
918
|
*/
|
|
628
|
-
protected
|
|
629
|
-
/**
|
|
630
|
-
|
|
919
|
+
protected _addWatch(coords: IRange.Coords, formula: ICalculation.IFormula | string, handlers: WatchAnchor.Handlers, origin?: IRange.CellCoords, options?: ICellRange.WatchOptions): IListener.Remove;
|
|
920
|
+
/**
|
|
921
|
+
* The one amend that creates a watch: its node, its grid and its body.
|
|
922
|
+
*
|
|
923
|
+
* @remarks
|
|
924
|
+
* Everything about the BODY is the node's ({@link WatchAnchor.reconcile},
|
|
925
|
+
* {@link WatchAnchor.deliver}). What is here is what every listener gets from the sheet: the
|
|
926
|
+
* node in the versioned map, the entry that holds its callbacks, and the removal.
|
|
927
|
+
* @internal
|
|
928
|
+
*/
|
|
929
|
+
protected _registerWatch(coords: IRange.Coords, expression: string, authoredAt: IRange.CellCoords, handlers: WatchAnchor.Handlers, arrayFirstCell: boolean): IListener.Remove;
|
|
930
|
+
/**
|
|
931
|
+
* A watch's body is a grid the engine holds once, for every snapshot, so a watch is made and
|
|
932
|
+
* removed against the commit the store is at. Inside an amend of any other commit its node and
|
|
933
|
+
* its grid's maps would land in that snapshot alone: the engine would hold a grid the current
|
|
934
|
+
* snapshot has no record of, and removing it later would leave the engine its body.
|
|
935
|
+
*/
|
|
936
|
+
protected _ensureWatchAtCurrent(action: 'added' | 'removed'): void;
|
|
937
|
+
/**
|
|
938
|
+
* The `addWatch` a content is given: holds a formula that belongs to no cell - a chart's
|
|
939
|
+
* series, a control's linked cell - in the calculation engine, and tells the content each time
|
|
940
|
+
* the engine rewrites it.
|
|
941
|
+
*
|
|
942
|
+
* @remarks
|
|
943
|
+
* One unanchored formula host per call, its body authored at `origin` (the content's anchor
|
|
944
|
+
* top-left unless given), exactly as a defined name's body is held: the engine keeps its
|
|
945
|
+
* references on the cells they name, so an insert or delete rewrites them, a cut carries them, a
|
|
946
|
+
* deleted sheet leaves `#REF!`, and undo puts all of it back. The body demands its first cell
|
|
947
|
+
* only, so holding a reference to a column costs a pass one read, not the column.
|
|
948
|
+
*
|
|
949
|
+
* The callback carries a {@link HeldFormula}, a live view over the host: every read answers the
|
|
950
|
+
* body as the store holds it now. It is delivered once the engine has compiled the body and
|
|
951
|
+
* again after every change to its text - a structural edit, a pass that rewrote it, a restore.
|
|
952
|
+
*
|
|
953
|
+
* Registration waits for the engine's next safe point and then amends the current commit, as a
|
|
954
|
+
* watch's does. An engine that is never started holds nothing, and the content reads its text as
|
|
955
|
+
* set. A formula the engine cannot compile is not held either.
|
|
956
|
+
*
|
|
957
|
+
* A {@link HeldFormula} handed back in - a content restored after a delete re-holding what it
|
|
958
|
+
* had - attaches to the grid the formula lived in when that grid came back with the restore, and
|
|
959
|
+
* is held afresh from the formula's last text otherwise.
|
|
960
|
+
*
|
|
961
|
+
* @param getAnchor The content's anchor top-left, read when the watch registers.
|
|
962
|
+
* @internal
|
|
963
|
+
*/
|
|
964
|
+
_contentAddWatch(getAnchor: () => IRange.CellCoords | null): AbstractMovableContent.AddWatch;
|
|
965
|
+
/**
|
|
966
|
+
* Carry every reference a cut encloses from its source to its destination.
|
|
967
|
+
*
|
|
968
|
+
* @remarks
|
|
969
|
+
* A cut moves cells, and everything that NAMES those cells goes with them - which is what the
|
|
970
|
+
* calc graph does for a formula precedent (`movePrecedents`), and what a range listener's
|
|
971
|
+
* reference and a watch's location must do for the same reason and by the same rule: the cut
|
|
972
|
+
* carries a reference only when it fully encloses it. Cut B2 to D5 and a listener on B2 reads
|
|
973
|
+
* D5; cut a block that merely clips the reference and it stays put, pointing at cells that are
|
|
974
|
+
* now empty.
|
|
975
|
+
*
|
|
976
|
+
* Called from the cut path beside the calc grid's own move, so the two land in one commit and
|
|
977
|
+
* one undo puts both back. A watch's body follows its node from the node's own address event
|
|
978
|
+
* at commit end (see {@link WatchAnchor.reconcile}).
|
|
979
|
+
*
|
|
980
|
+
* @param from The cut's source.
|
|
981
|
+
* @param to Where the cut's source lands.
|
|
982
|
+
* @internal
|
|
983
|
+
*/
|
|
984
|
+
protected _moveReferences(from: IRange.Coords, to: IRange.Coords): void;
|
|
985
|
+
/**
|
|
986
|
+
* Drop a node from the current snapshot.
|
|
987
|
+
*
|
|
988
|
+
* @remarks
|
|
989
|
+
* The same amend as registering. Older snapshots keep the entry; one whose callback is gone from
|
|
990
|
+
* the instance is inert, and is swept the next time this runs.
|
|
991
|
+
*
|
|
992
|
+
* @internal
|
|
993
|
+
*/
|
|
994
|
+
protected _removeListenerNode(node: ListenerAnchor): void;
|
|
995
|
+
/**
|
|
996
|
+
* Deliver to every node whose reference intersects what changed.
|
|
997
|
+
*
|
|
998
|
+
* @remarks
|
|
999
|
+
* A transactional node is told from inside the transaction, before the commit seals, so what it
|
|
1000
|
+
* writes joins that commit; every other node is told once the store has settled. The two are
|
|
1001
|
+
* never told from the same place, so `transactional` selects which half this call is for.
|
|
1002
|
+
*
|
|
1003
|
+
* `ranges` is the commit's change set, so a batch of operations is ONE change to a node: it is
|
|
1004
|
+
* told once, carrying every range of the commit that reached it.
|
|
1005
|
+
*
|
|
1006
|
+
* @internal
|
|
1007
|
+
*/
|
|
1008
|
+
protected _notifyListenerNodes(state: State, ranges: readonly IRange.Coords[] | null, notificationOptions: NotifierOptions, transactional: boolean, renamed?: boolean): void;
|
|
1009
|
+
/**
|
|
1010
|
+
* Deliver to every live node whose reference is no longer where it was.
|
|
1011
|
+
*
|
|
1012
|
+
* @remarks
|
|
1013
|
+
* Nothing is compared against the log, and the direction the store moved does not matter. The
|
|
1014
|
+
* map either holds the node - at whatever coords it has in THIS snapshot - or it does not, and
|
|
1015
|
+
* each case answers itself: a difference from the coords last delivered is an `address` change,
|
|
1016
|
+
* and no entry at all is `#N/A`, a world from before the node was registered.
|
|
1017
|
+
*
|
|
1018
|
+
* `transactional` selects which nodes this call is for (see {@link _notifyListenerNodes}). With
|
|
1019
|
+
* `notificationOptions` `null` the nodes are only re-based - their last-delivered coords are set
|
|
1020
|
+
* to this snapshot's without a delivery. That is a restore seen by a transactional node: it is
|
|
1021
|
+
* never told about one, but the next forward move must be measured from where the restore left
|
|
1022
|
+
* the reference, not from where it was before.
|
|
1023
|
+
*
|
|
1024
|
+
* @internal
|
|
1025
|
+
*/
|
|
1026
|
+
protected _notifyListenerNodeMoves(state: State, transactional: boolean, notificationOptions: NotifierOptions | null): void;
|
|
1027
|
+
/**
|
|
1028
|
+
* One delivery, after the option filters.
|
|
1029
|
+
*
|
|
1030
|
+
* @internal
|
|
1031
|
+
*/
|
|
1032
|
+
protected _deliverToNode(entry: ListenerNodeEntry, trigger: 'data' | 'address' | 'restore', notificationOptions: NotifierOptions, from?: readonly IRange.Coords[]): void;
|
|
631
1033
|
/** @internal */
|
|
632
1034
|
protected _notifyUsedRangeChange(): void;
|
|
633
1035
|
/** @internal */
|
|
@@ -641,29 +1043,37 @@ export declare class Sheet implements ISheet {
|
|
|
641
1043
|
*/
|
|
642
1044
|
protected _notifyConditionalFormatsChange(): void;
|
|
643
1045
|
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
1046
|
+
protected _notifyTablesChange(): void;
|
|
1047
|
+
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
644
1048
|
protected _notifyDataValidationsChange(): void;
|
|
645
1049
|
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
646
1050
|
protected _notifyProtectedRangesChange(): void;
|
|
1051
|
+
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
1052
|
+
protected _notifyCommentsChange(): void;
|
|
1053
|
+
/**
|
|
1054
|
+
* Presents one of the sheet's own events as a collection's `onCollectionChange`, and the
|
|
1055
|
+
* sheet's `onInvalidated` as the collection's, with the collection as the source of both.
|
|
1056
|
+
*
|
|
1057
|
+
* @remarks
|
|
1058
|
+
* The sheet keeps the state and fires the fine-grained event; the collection is a front over
|
|
1059
|
+
* it. Forwarding, rather than a second emitter, is what keeps the two from drifting apart.
|
|
1060
|
+
* @internal
|
|
1061
|
+
*/
|
|
1062
|
+
protected _forwardCollectionListeners(key: 'onTablesChange' | 'onConditionalFormatsChange' | 'onDataValidationsChange' | 'onProtectedRangesChange' | 'onCommentsChange', collection: () => ICollection<any>): (listeners: ICollection.IListeners, options?: IListener.Options) => IListener.Remove;
|
|
647
1063
|
/** {@inheritDoc ISheet.addListeners} */
|
|
648
1064
|
addListeners(listeners: ISheet.IListeners, options?: IListener.Options): IListener.Remove;
|
|
649
1065
|
/** @internal */
|
|
650
|
-
protected _addRangesListeners(ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions): IListener.Remove;
|
|
651
|
-
/** @internal */
|
|
652
|
-
protected _addRangesListeners2(ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options: ICellRange.ListenerOptions | undefined, isRanges: boolean): IListener.Remove;
|
|
653
|
-
/** @internal */
|
|
654
1066
|
protected _getUsedCoords(options?: ICellRange.GetRangeOptions): IRange.Coords | null;
|
|
655
1067
|
/** @internal */
|
|
656
1068
|
protected _getRangeStats(coords: readonly IRange.Coords[], iteratorOptions?: ICellRange.GetStatsOptions): IRangeStats;
|
|
657
1069
|
/** @internal */
|
|
658
|
-
protected _isContentful(ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis): boolean;
|
|
659
|
-
/** @internal */
|
|
660
|
-
protected _getCount(coords: IRange.Coords[], ignoreHidden?: boolean): number;
|
|
1070
|
+
protected _isContentful(ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean): boolean;
|
|
661
1071
|
/**
|
|
662
|
-
* Legacy Content-keyed counting — internal callers only (`clear` preflight
|
|
1072
|
+
* Legacy Content-keyed counting — internal callers only (`clear` preflight).
|
|
663
1073
|
* The public path is `_featureCounts`, keyed by `ICellRange.Feature`.
|
|
664
1074
|
* @internal
|
|
665
1075
|
*/
|
|
666
|
-
protected _contentCounts(ranges: readonly IRange.Coords[], types: ICell.Content[] | undefined, ignoreHidden?: boolean | IRange.Axis): Partial<Record<ICell.Content, number>>;
|
|
1076
|
+
protected _contentCounts(ranges: readonly IRange.Coords[], types: ICell.Content[] | undefined, ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean): Partial<Record<ICell.Content, number>>;
|
|
667
1077
|
/**
|
|
668
1078
|
* Per-feature cell counts — the engine behind `ICellRange.getCounts`.
|
|
669
1079
|
*
|
|
@@ -678,7 +1088,7 @@ export declare class Sheet implements ISheet {
|
|
|
678
1088
|
* by a real, directly indexed feature (`DateFormat`).
|
|
679
1089
|
* @internal
|
|
680
1090
|
*/
|
|
681
|
-
protected _featureCounts(ranges: readonly IRange.Coords[], features?: ICellRange.Feature | readonly ICellRange.Feature[], ignoreHidden?: boolean | IRange.Axis): ICellRange.Counts;
|
|
1091
|
+
protected _featureCounts(ranges: readonly IRange.Coords[], features?: ICellRange.Feature | readonly ICellRange.Feature[], ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean): ICellRange.Counts;
|
|
682
1092
|
/**
|
|
683
1093
|
* Calculation-graph neighbors of a range — the engine behind `ICellRange`'s and `ICell`'s
|
|
684
1094
|
* precedents/dependents family.
|
|
@@ -690,7 +1100,17 @@ export declare class Sheet implements ISheet {
|
|
|
690
1100
|
* removing it would answer a different question than "what does this block read".
|
|
691
1101
|
* @internal
|
|
692
1102
|
*/
|
|
693
|
-
protected _dependencyRanges(coords: IRange.Coords, kind: 'precedents' | 'dependents', direct: boolean): ICellRanges | null
|
|
1103
|
+
protected _dependencyRanges(coords: IRange.Coords, kind: 'precedents' | 'dependents', direct: boolean): Promise<ICellRanges | null>;
|
|
1104
|
+
/**
|
|
1105
|
+
* Name ids -> the range objects that carry them in a graph answer.
|
|
1106
|
+
*
|
|
1107
|
+
* @remarks
|
|
1108
|
+
* The id half of step 3. Liveness and "is this actually a name" were already applied by the
|
|
1109
|
+
* grid; an id that no longer resolves simply drops. Each node is anchored on ITS OWN sheet
|
|
1110
|
+
* (the name's defining cell), which is why the internal is re-resolved per id.
|
|
1111
|
+
* @internal
|
|
1112
|
+
*/
|
|
1113
|
+
private _namedGraphRanges;
|
|
694
1114
|
/**
|
|
695
1115
|
* Calc-currency scopes → range-currency scopes: the boundary the whole scope model rests on.
|
|
696
1116
|
*
|
|
@@ -728,10 +1148,8 @@ export declare class Sheet implements ISheet {
|
|
|
728
1148
|
* requested features are elided. `features` arrives already resolved (`resolveRegionFeatures`).
|
|
729
1149
|
*
|
|
730
1150
|
* Known v1 bounds, recorded in AGENT-PLAN B2: the blank/complement side of the partition is
|
|
731
|
-
* not yielded
|
|
732
|
-
*
|
|
733
|
-
* projection ignores). Every requested feature partitions — there is no unsupported-feature
|
|
734
|
-
* throw left in this function.
|
|
1151
|
+
* not yielded. Every requested feature partitions — there is no unsupported-feature throw left
|
|
1152
|
+
* in this function.
|
|
735
1153
|
* @internal
|
|
736
1154
|
*/
|
|
737
1155
|
protected _featureRegions(bounds: IRange.Coords, requested: readonly ICellRange.Feature[], options?: ICellRange.GetRegionsOptions): IRange.Coords[];
|
|
@@ -743,6 +1161,12 @@ export declare class Sheet implements ISheet {
|
|
|
743
1161
|
protected _find(ranges: readonly IRange.Coords[], options: string | ICellRange.FindOptions): Iterator<ICell>;
|
|
744
1162
|
/** {@inheritDoc ISheet.getRuntime} */
|
|
745
1163
|
getRuntime(): IRuntime;
|
|
1164
|
+
/**
|
|
1165
|
+
* The region a bare-cursor traverse from `cell` wraps within, or `null` for a plain move. A table
|
|
1166
|
+
* under the cursor answers for itself.
|
|
1167
|
+
* @internal
|
|
1168
|
+
*/
|
|
1169
|
+
protected _getTraverseRegion(cell: IRange.CellCoords, axis: IRange.Axis, reverse: boolean): IRange.Coords | null;
|
|
746
1170
|
/** @internal */
|
|
747
1171
|
protected _surroundingRegion(range: IRange.Coords, options?: ICellRange.GetSurroundingOptions): IRange.Coords;
|
|
748
1172
|
/** @internal */
|
|
@@ -772,8 +1196,189 @@ export declare class Sheet implements ISheet {
|
|
|
772
1196
|
scrollTo(coords: Partial<IRange.Coords>, options?: ISheet.ScrollToOptions): Promise<boolean>;
|
|
773
1197
|
/** @internal */
|
|
774
1198
|
protected _resolveSelectOptions(selectOptions: boolean | ICellRange.SelectOptions, axis?: IRange.Axis): ICellRange.SelectOptions | null;
|
|
775
|
-
/**
|
|
776
|
-
|
|
1199
|
+
/**
|
|
1200
|
+
* Record the operation's directives over what it produced, then commit.
|
|
1201
|
+
*
|
|
1202
|
+
* @remarks
|
|
1203
|
+
* `options` is the object the operation was handed, so what it declares through
|
|
1204
|
+
* {@link ICellRange.OperationOptions} is what is honored here: `autoSelect` names where the
|
|
1205
|
+
* operation leaves the user, `autoFit` fits the ranges it produced. Both are read from the one
|
|
1206
|
+
* object, so an operation cannot accept a directive it then ignores.
|
|
1207
|
+
*
|
|
1208
|
+
* @internal
|
|
1209
|
+
*/
|
|
1210
|
+
protected _commitWithDirectives(trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives): void;
|
|
1211
|
+
/**
|
|
1212
|
+
* Declare where the operation leaves the user, and where an undo of it lands when that is not
|
|
1213
|
+
* the same place.
|
|
1214
|
+
*
|
|
1215
|
+
* @param selection Where the operation leaves the user - what it acted on, or what it produced
|
|
1216
|
+
* when that is somewhere else (a paste fitted to its source). Also where a redo lands.
|
|
1217
|
+
* @param options The operation's own options, passed through as they were given: its `autoSelect`
|
|
1218
|
+
* and `autoSelectRestore`.
|
|
1219
|
+
* @param undo Where an undo lands, when it is not `selection`: a cut-drag and an insert-from
|
|
1220
|
+
* undo to the SOURCE, an auto-fill to the TEMPLATE it was dragged from.
|
|
1221
|
+
*
|
|
1222
|
+
* @remarks
|
|
1223
|
+
* A declaration, never an action: every operation declares, whatever it was asked, and whether
|
|
1224
|
+
* the view moves - now, on undo or on redo - is decided once, when the commit closes
|
|
1225
|
+
* ({@link resolveSelection}).
|
|
1226
|
+
*
|
|
1227
|
+
* @internal
|
|
1228
|
+
*/
|
|
1229
|
+
protected _recordSelection(trans: ITransaction, selection: Partial<IRangeSelection.Coords>, options?: Pick<ICellRange.OperationOptions, 'autoSelect' | 'autoSelectRestore'> | null, undo?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis): void;
|
|
1230
|
+
/**
|
|
1231
|
+
* Where an undo or a redo of a commit puts this sheet's view, or `null` when it leaves it
|
|
1232
|
+
* alone. See {@link resolveSelection}.
|
|
1233
|
+
*
|
|
1234
|
+
* @remarks
|
|
1235
|
+
* A sheet can be shown through more than one view, and a view instance is replaced on load and
|
|
1236
|
+
* by {@link setView}, so the match is on {@link ISheetView.getId}.
|
|
1237
|
+
*
|
|
1238
|
+
* @internal
|
|
1239
|
+
*/
|
|
1240
|
+
protected _restoredSelection(intents: Readonly<Record<string, any>> | undefined, isUndo: boolean): {
|
|
1241
|
+
selection: Partial<IRangeSelection.Coords>;
|
|
1242
|
+
options: boolean | ICellRange.SelectOptions;
|
|
1243
|
+
} | null;
|
|
1244
|
+
/**
|
|
1245
|
+
* Record what this operation has to announce when it lands, under one category.
|
|
1246
|
+
*
|
|
1247
|
+
* @remarks
|
|
1248
|
+
* Recorded as the `sheet.events` intent on the ROOT and unioned there, so a batch of operations
|
|
1249
|
+
* announces all of them rather than the last. Keyed by {@link getId}, so a commit that spans
|
|
1250
|
+
* sheets announces each sheet separately. The intent travels on the commit, which is what lets
|
|
1251
|
+
* an undo deliver the same categories the forward commit did.
|
|
1252
|
+
*
|
|
1253
|
+
* Copy-on-write: an amend's accumulator is handed the value on the commit it folds into, and
|
|
1254
|
+
* mutating that would announce the whole of the target commit rather than what the amend
|
|
1255
|
+
* recorded - which is what makes a registration amend silent. The range list is the exception
|
|
1256
|
+
* once this operation has made its own ({@link _appendOwnedRanges}): one write per cell in a
|
|
1257
|
+
* batch would otherwise copy every range recorded so far on each of them.
|
|
1258
|
+
*
|
|
1259
|
+
* @internal
|
|
1260
|
+
*/
|
|
1261
|
+
protected _recordChange(trans: ITransaction, category: EventCategory, ranges: readonly IRange.Coords[] | null | undefined): void;
|
|
1262
|
+
/**
|
|
1263
|
+
* Record the ranges a formula was entered over.
|
|
1264
|
+
*
|
|
1265
|
+
* @remarks
|
|
1266
|
+
* A subset of the `data` category that no event fires for: it is what the calculation's amend
|
|
1267
|
+
* formats and fits once the results exist ({@link _promoteCalcResults}). Unioned and written
|
|
1268
|
+
* copy-on-write for the same reasons as {@link _recordChange}.
|
|
1269
|
+
*
|
|
1270
|
+
* @internal
|
|
1271
|
+
*/
|
|
1272
|
+
protected _recordFormulasEntered(trans: ITransaction, ranges: readonly IRange.Coords[] | null | undefined): void;
|
|
1273
|
+
/**
|
|
1274
|
+
* This sheet's half of what a commit announces.
|
|
1275
|
+
*
|
|
1276
|
+
* @internal
|
|
1277
|
+
*/
|
|
1278
|
+
protected _sheetEvents(intents: Readonly<Record<string, any>> | undefined): SheetEvents | null;
|
|
1279
|
+
/**
|
|
1280
|
+
* Every range this sheet announces from a commit, across the given categories (all of them when
|
|
1281
|
+
* `categories` is omitted).
|
|
1282
|
+
*
|
|
1283
|
+
* @remarks
|
|
1284
|
+
* The union is what a consumer asking "did anything happen in my box" wants, and taking it over
|
|
1285
|
+
* every category is what keeps a category added later from silently ceasing to reach one.
|
|
1286
|
+
*
|
|
1287
|
+
* @internal
|
|
1288
|
+
*/
|
|
1289
|
+
protected _changedRanges(intents: Readonly<Record<string, any>> | undefined, categories?: readonly EventCategory[]): readonly IRange.Coords[] | null;
|
|
1290
|
+
/**
|
|
1291
|
+
* Record ranges to fit when the operation completes.
|
|
1292
|
+
*
|
|
1293
|
+
* @remarks
|
|
1294
|
+
* The fit is a union over the operation: entries for the same sheet and the same options
|
|
1295
|
+
* accumulate ranges, so a batch measures each column once, at the end, against the finished
|
|
1296
|
+
* content. Resolved by {@link _resolveAutoFit} as the operation's last write.
|
|
1297
|
+
*
|
|
1298
|
+
* @internal
|
|
1299
|
+
*/
|
|
1300
|
+
protected _recordAutoFit(trans: ITransaction, ranges: readonly IRange.Coords[], autoFit: boolean | ICellRange.AutoFitOptions): void;
|
|
1301
|
+
/**
|
|
1302
|
+
* Record that the formulas this operation enters take the number format their results carry.
|
|
1303
|
+
*
|
|
1304
|
+
* @remarks
|
|
1305
|
+
* Resolved by the calculation's amend into this commit rather than when the operation
|
|
1306
|
+
* completes: the results do not exist yet. See {@link IntentAutoFormat}.
|
|
1307
|
+
*
|
|
1308
|
+
* @internal
|
|
1309
|
+
*/
|
|
1310
|
+
protected _recordAutoFormat(trans: ITransaction): void;
|
|
1311
|
+
/**
|
|
1312
|
+
* Record that this operation has ruled on its own protection, so the commit-time catch-all
|
|
1313
|
+
* stands down. See {@link IntentSkipProtectionCheck}.
|
|
1314
|
+
*
|
|
1315
|
+
* @internal
|
|
1316
|
+
*/
|
|
1317
|
+
protected _recordSkipProtectionCheck(trans: ITransaction): void;
|
|
1318
|
+
/**
|
|
1319
|
+
* Record that this commit is a load of the sheet: not a user's write, so the protection check
|
|
1320
|
+
* stands down, and not an edit, so nothing it wrote is announced. See {@link IntentInitial}.
|
|
1321
|
+
*
|
|
1322
|
+
* @internal
|
|
1323
|
+
*/
|
|
1324
|
+
protected _recordInitial(trans: ITransaction): void;
|
|
1325
|
+
/**
|
|
1326
|
+
* Record where the freeze panes were and where the operation moved them. See
|
|
1327
|
+
* {@link FreezePanesIntent} for how a batch merges the pair.
|
|
1328
|
+
*
|
|
1329
|
+
* @internal
|
|
1330
|
+
*/
|
|
1331
|
+
protected _recordFreezePanes(trans: ITransaction, before: IRange.CellCoords, after: IRange.CellCoords): void;
|
|
1332
|
+
/**
|
|
1333
|
+
* The movables of this sheet with the given ids, in that order. Ids no longer on the sheet are
|
|
1334
|
+
* skipped: an undo of the insert that created a movable lands on a state without it.
|
|
1335
|
+
*
|
|
1336
|
+
* @internal
|
|
1337
|
+
*/
|
|
1338
|
+
protected _movablesOfIds(ids: readonly string[]): IMovable[];
|
|
1339
|
+
/**
|
|
1340
|
+
* Fold writes into the current commit without a log entry. See `IStore.amend`.
|
|
1341
|
+
* @internal
|
|
1342
|
+
*/
|
|
1343
|
+
protected _amendCurrent<R>(callback: () => R): R;
|
|
1344
|
+
/**
|
|
1345
|
+
* An amend the sheet makes for itself (a listener node, a watch, a promoted calc result) is not
|
|
1346
|
+
* a user's write, so a protected sheet must not refuse it. Only an amend that opens its own
|
|
1347
|
+
* root stands the check down; nested, it joins an operation that answers for itself.
|
|
1348
|
+
* @internal
|
|
1349
|
+
*/
|
|
1350
|
+
protected _amendBookkeeping<R>(commitId: string, callback: (commit: ITransaction.ICommit) => R): R;
|
|
1351
|
+
/**
|
|
1352
|
+
* Fit the ranges the operation asked for, as its last write.
|
|
1353
|
+
*
|
|
1354
|
+
* @remarks
|
|
1355
|
+
* Runs while the root transaction is still open so the sizes belong to the same commit as the
|
|
1356
|
+
* content they measure - one undo puts both back. The intent is left on the record: it is what
|
|
1357
|
+
* a redo fits from.
|
|
1358
|
+
*
|
|
1359
|
+
* @internal
|
|
1360
|
+
*/
|
|
1361
|
+
protected _resolveAutoFit(commit: ITransaction.ICommit): void;
|
|
1362
|
+
/**
|
|
1363
|
+
* Resolve the operation's directives once its root transaction has closed.
|
|
1364
|
+
*
|
|
1365
|
+
* @internal
|
|
1366
|
+
*/
|
|
1367
|
+
protected _onRootTransactionClose(commit: ITransaction.ICommit, isRollback?: boolean, isElided?: boolean, isAmend?: boolean): void;
|
|
1368
|
+
/**
|
|
1369
|
+
* Keep the view's selection somewhere it can be once the sheet has changed: inside the sheet,
|
|
1370
|
+
* and with its active cell on the top-left of the merge it falls in.
|
|
1371
|
+
*
|
|
1372
|
+
* @param isMergesChanged Whether the change merged anything, which is the only way the active
|
|
1373
|
+
* cell comes to sit inside a merge.
|
|
1374
|
+
*
|
|
1375
|
+
* @remarks
|
|
1376
|
+
* A correction of the view, not an operation's selection: it applies whoever made the change,
|
|
1377
|
+
* and is not undone with it.
|
|
1378
|
+
*
|
|
1379
|
+
* @internal
|
|
1380
|
+
*/
|
|
1381
|
+
protected _normalizeSelection(isMergesChanged: boolean): void;
|
|
777
1382
|
/** @internal */
|
|
778
1383
|
protected _autoSelect(options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis): Promise<IRange.Coords[]>;
|
|
779
1384
|
/** {@inheritDoc ISheet.getSelection} */
|
|
@@ -792,10 +1397,32 @@ export declare class Sheet implements ISheet {
|
|
|
792
1397
|
getTabColor(): IColor;
|
|
793
1398
|
/** {@inheritDoc ISheet.setTabColor} */
|
|
794
1399
|
setTabColor(color: IColor | string | null): this;
|
|
1400
|
+
/** {@inheritDoc ISheet.getCodeName} */
|
|
1401
|
+
getCodeName(): string | null;
|
|
1402
|
+
/** {@inheritDoc ISheet.getOutline} */
|
|
1403
|
+
getOutline(): IOutline;
|
|
1404
|
+
/** {@inheritDoc ISheet.isConditionalFormatCalculationEnabled} */
|
|
1405
|
+
isConditionalFormatCalculationEnabled(): boolean;
|
|
1406
|
+
/**
|
|
1407
|
+
* A sheet's scripts are workbook structure, like the workbook's own.
|
|
1408
|
+
* @internal
|
|
1409
|
+
*/
|
|
1410
|
+
protected _isModulesReadOnly(): boolean;
|
|
1411
|
+
/** {@inheritDoc ISheet.getModules} */
|
|
1412
|
+
getModules(): IModuleCollection;
|
|
795
1413
|
/** {@inheritDoc ISheet.getRowHeaders} */
|
|
796
1414
|
getRowHeaders(): ISheetHeader;
|
|
797
1415
|
/** {@inheritDoc ISheet.getColumnHeaders} */
|
|
798
1416
|
getColumnHeaders(): ISheetHeader;
|
|
1417
|
+
/**
|
|
1418
|
+
* The sheet's grid, whatever the calculation hands back (DESIGN-CALC-SERVICE §5): opened from
|
|
1419
|
+
* `json` (§6.6), the file's formulas, array extents and cached values, trusted. What the engine
|
|
1420
|
+
* makes of them arrives through the grid's `onComplete`, before this returns when the engine is
|
|
1421
|
+
* `Running`. The grid holds every cell map, and answers an `Off` save and a start's seed itself.
|
|
1422
|
+
* A snapshot sheet over another sheet's state (a copy) shares the grid: the owner answers, with
|
|
1423
|
+
* the state as it is now.
|
|
1424
|
+
*/
|
|
1425
|
+
protected _openCalcGrid(json: ICalcGrid.JSON | undefined): ICalcGrid;
|
|
799
1426
|
/** {@inheritDoc ISheet.toJSON} */
|
|
800
1427
|
toJSON(options?: ISheet.ToJSONOptions): Promise<ISheet.JSON>;
|
|
801
1428
|
/** {@inheritDoc ISheet.getStyles} */
|
|
@@ -806,8 +1433,53 @@ export declare class Sheet implements ISheet {
|
|
|
806
1433
|
getTransactions(): ITransaction.IStore;
|
|
807
1434
|
/** {@inheritDoc ISheet.getStrings} */
|
|
808
1435
|
getStrings(): IStringCollection;
|
|
809
|
-
/**
|
|
1436
|
+
/**
|
|
1437
|
+
* The sheet's movables: those placed on it, then the boxes of its notes.
|
|
1438
|
+
* @internal
|
|
1439
|
+
*/
|
|
810
1440
|
protected _searchMovables(options?: IMovableCollection.GetItemsOptions): IMovable[];
|
|
1441
|
+
/**
|
|
1442
|
+
* Places a note's box among the sheet's movables. See {@link Comment.Boxes.add}.
|
|
1443
|
+
* @internal
|
|
1444
|
+
*/
|
|
1445
|
+
protected _addNoteBox(comment: Comment, anchor: IMovable.AnchorOffset | null, hidden: boolean): NoteMovable;
|
|
1446
|
+
/**
|
|
1447
|
+
* A movable, or something in it, was placed anew as part of the open operation: every connector
|
|
1448
|
+
* glued to it follows in the same operation (`translated` when it only moved). A target whose
|
|
1449
|
+
* sites have not evaluated yet is followed once they have, folded into the commit then current.
|
|
1450
|
+
*/
|
|
1451
|
+
protected _glueConnectors(movable: IMovable, translated?: boolean): void;
|
|
1452
|
+
/** Whether the movable index read last holds a connector or a group; groups are not looked into. */
|
|
1453
|
+
private _connectorScan;
|
|
1454
|
+
/**
|
|
1455
|
+
* The cells under the movables changed size, after the operation that sized them: every glued
|
|
1456
|
+
* connector whose ends left their sites is put back, folded into that operation. Nothing is
|
|
1457
|
+
* written when every end is in place, as on an undo or redo of that operation.
|
|
1458
|
+
*/
|
|
1459
|
+
protected _glueStrayConnectors(): void;
|
|
1460
|
+
/**
|
|
1461
|
+
* The cell geometry a note's box is placed with.
|
|
1462
|
+
* @internal
|
|
1463
|
+
*/
|
|
1464
|
+
protected _noteLayout(): NoteLayout;
|
|
1465
|
+
/** The farthest any movable of the index paints past its anchor, for each `drawn` version. */
|
|
1466
|
+
private _movableOverhangs;
|
|
1467
|
+
/**
|
|
1468
|
+
* Called when a movable's content has a newer answer for what it paints: the next search reads
|
|
1469
|
+
* it, and listeners are told once per batch of answers.
|
|
1470
|
+
*/
|
|
1471
|
+
private _drawnNotifyQueued;
|
|
1472
|
+
private _onMovableDrawnReady;
|
|
1473
|
+
/**
|
|
1474
|
+
* The farthest any of `models` paints past its anchor, in pixels.
|
|
1475
|
+
* @internal
|
|
1476
|
+
*/
|
|
1477
|
+
protected _maxMovableOverhang(models: Map<IMovable, unknown>): number;
|
|
1478
|
+
/**
|
|
1479
|
+
* The movables of one index that match the filter, in z-order.
|
|
1480
|
+
* @internal
|
|
1481
|
+
*/
|
|
1482
|
+
protected _searchMovableIndex(spatial: ISpatialMap<MovableEntry>, options?: IMovableCollection.GetItemsOptions): IMovable[];
|
|
811
1483
|
/** @internal */
|
|
812
1484
|
/**
|
|
813
1485
|
* @param description A COMPLETE undo description (callers pass a `messageKey`). It used to be a
|
|
@@ -817,12 +1489,42 @@ export declare class Sheet implements ISheet {
|
|
|
817
1489
|
protected _updateSelectedMovables(update: (movable: IMovable) => void, description?: string): void;
|
|
818
1490
|
/** @internal */
|
|
819
1491
|
protected _addMovable(options?: IMovableCollection.AddOptions): Promise<IMovable>;
|
|
1492
|
+
/**
|
|
1493
|
+
* Where a new movable of a known size goes when the caller left its position open: the visible
|
|
1494
|
+
* window's center for `autoPlace: 'viewport'`, else the selection's top-left; then, on the axes the
|
|
1495
|
+
* caller left open, down and right off any movable already in that spot, so repeated inserts
|
|
1496
|
+
* cascade instead of stacking.
|
|
1497
|
+
*
|
|
1498
|
+
* Resolved before the insert transaction opens: the viewport request must reach the live listeners
|
|
1499
|
+
* (not the transactional set) and must not `await` mid-commit (that desyncs the movable from its
|
|
1500
|
+
* resizers). The grid answers `onRequestViewport` with the visible window in absolute px; headless
|
|
1501
|
+
* (no responder) falls back to the selection.
|
|
1502
|
+
*/
|
|
1503
|
+
protected _placeMovable(options: IMovableCollection.AddOptions, bounds: Size & Partial<Point>): Promise<Bounds>;
|
|
1504
|
+
/** Refuses an insert this sheet cannot take. */
|
|
1505
|
+
protected _checkInsertMovable(options?: IMovableCollection.AddOptions): asserts options is IMovableCollection.AddOptions;
|
|
1506
|
+
/**
|
|
1507
|
+
* Inserts a movable whose content kind is already loaded, without waiting: what an operation
|
|
1508
|
+
* that cannot wait, such as a delete that dissolves a group, frees onto the sheet.
|
|
1509
|
+
* @internal
|
|
1510
|
+
*/
|
|
1511
|
+
protected _insertMovable(options: InsertableCollection.InsertOptions): IMovable;
|
|
1512
|
+
/**
|
|
1513
|
+
* Groups movables of this sheet into one (GROUPS-DESIGN §5 Phase B): the group's frame is the
|
|
1514
|
+
* union of the boxes they occupy as rotated, its child space equals its frame, and each member
|
|
1515
|
+
* keeps its frame, rotation and flips; the originals are deleted. One undo step, the selection
|
|
1516
|
+
* recorded for undo and redo.
|
|
1517
|
+
* @internal
|
|
1518
|
+
*/
|
|
1519
|
+
protected _groupMovables(movables: readonly IMovable[], options?: IMovableCollection.GroupOptions): Promise<IMovable>;
|
|
820
1520
|
/** @internal */
|
|
821
1521
|
protected _addMovablePicture(picture: string | IResourceCollection.AddOptions | IResource, options?: IMovableCollection.AddOptions): Promise<IMovable>;
|
|
822
1522
|
/** {@inheritDoc ISheet.setPicture} */
|
|
823
1523
|
setPicture(picture: string | IResource | IResourceCollection.AddOptions | null, options?: ITransaction.OperationOptions): this;
|
|
824
1524
|
/** {@inheritDoc ISheet.getPicture} */
|
|
825
1525
|
getPicture(): IPicture | null;
|
|
1526
|
+
/** {@inheritDoc ISheet.getPivotTables} */
|
|
1527
|
+
getPivotTables(): IPivotTableCollection;
|
|
826
1528
|
/** {@inheritDoc ISheet.getTables} */
|
|
827
1529
|
getTables(): ITableCollection;
|
|
828
1530
|
/** {@inheritDoc ISheet.getDataValidations} */
|
|
@@ -831,12 +1533,30 @@ export declare class Sheet implements ISheet {
|
|
|
831
1533
|
getConditionalFormats(): IConditionalFormatCollection;
|
|
832
1534
|
/** {@inheritDoc ISheet.getProtectedRanges} */
|
|
833
1535
|
getProtectedRanges(): IProtectedRangeCollection;
|
|
1536
|
+
/** {@inheritDoc ISheet.getComments} */
|
|
1537
|
+
getComments(): ICommentCollection;
|
|
834
1538
|
/** @deprecated Use {@link ISheet.getConditionalFormats} */
|
|
835
1539
|
getConditionals(): IConditionalFormatCollection;
|
|
836
1540
|
/** {@inheritDoc ISheet.getMovables} */
|
|
837
1541
|
getMovables(): IMovableCollection;
|
|
1542
|
+
/** {@inheritDoc ISheet.getCharts} */
|
|
1543
|
+
getCharts(): IChartCollection;
|
|
838
1544
|
/** @internal */
|
|
839
|
-
protected _validateOrRemoveOverlaps(rangeCoords: IRange.Coords, type: string, table?: ITable | null, removeIfContains?: boolean): void;
|
|
1545
|
+
protected _validateOrRemoveOverlaps(rangeCoords: IRange.Coords, type: string, table?: ITable | null, removeIfContains?: boolean, absorbAutoTable?: boolean): void;
|
|
1546
|
+
/**
|
|
1547
|
+
* The filter and sort criteria a sheet AutoFilter hands over to a table built in its place.
|
|
1548
|
+
*
|
|
1549
|
+
* @remarks
|
|
1550
|
+
* Read BEFORE `_validateOrRemoveOverlaps` absorbs the AutoFilter and replayed once the table
|
|
1551
|
+
* exists. Excel moves them across only when the table takes EXACTLY the AutoFilter's range —
|
|
1552
|
+
* probed: one extra row or column, or a shifted start, and the new table starts clean. Answers
|
|
1553
|
+
* `null` when there is nothing to carry, which is the common case.
|
|
1554
|
+
* @internal
|
|
1555
|
+
*/
|
|
1556
|
+
protected _getAutoTableCarryOver(rangeCoords: IRange.Coords): {
|
|
1557
|
+
conditions: ICondition.Input[];
|
|
1558
|
+
sorts: ISort.Options[];
|
|
1559
|
+
} | null;
|
|
840
1560
|
/**
|
|
841
1561
|
* Used by the TableCollection wrapper so we resolve ICellRange.Address here
|
|
842
1562
|
* @internal
|
|
@@ -854,7 +1574,12 @@ export declare class Sheet implements ISheet {
|
|
|
854
1574
|
toJSON(): J | null;
|
|
855
1575
|
}, J extends object>(add: ICellRanges.Address | T | null | undefined, options: (IAnchored.AddOptions & J) | undefined, spec: {
|
|
856
1576
|
/** The sheet-state slot the collection lives in. */
|
|
857
|
-
key: 'conditionalFormats' | 'dataValidations' | 'protectedRanges';
|
|
1577
|
+
key: 'conditionalFormats' | 'dataValidations' | 'protectedRanges' | 'comments';
|
|
1578
|
+
/**
|
|
1579
|
+
* The sheet-protection allowances the add needs. Empty when no option allows it, so the add is
|
|
1580
|
+
* refused whenever the sheet is locked.
|
|
1581
|
+
*/
|
|
1582
|
+
allowance: ISheetProtection.PropertyKeys[];
|
|
858
1583
|
isItem: (add: unknown) => add is T;
|
|
859
1584
|
description: string;
|
|
860
1585
|
/** Loads one ref into the map, handing the created model to `capture`. */
|
|
@@ -889,8 +1614,12 @@ export declare class Sheet implements ISheet {
|
|
|
889
1614
|
* @internal
|
|
890
1615
|
*/
|
|
891
1616
|
protected _addProtectedRange(add: ICellRanges.Address | IProtectedRange, options?: IProtectedRangeCollection.AddOptions): IProtectedRange;
|
|
1617
|
+
/**
|
|
1618
|
+
* @internal
|
|
1619
|
+
*/
|
|
1620
|
+
protected _addComment(address: ICellRange.Address, content: IComment.Content, options?: ICommentCollection.AddOptions): IComment;
|
|
892
1621
|
/** {@inheritDoc ISheet.createCell} */
|
|
893
|
-
createCell(update: ICell.Update, coords?: IRange.CellCoords | null): ICell;
|
|
1622
|
+
createCell(update: ICell.Update, coords?: IRange.CellCoords | null, options?: ICell.CreateCellOptions): ICell;
|
|
894
1623
|
/** @internal */
|
|
895
1624
|
protected _getBoundsAtCoords(coords: IRange.Coords): Bounds;
|
|
896
1625
|
/** @internal */
|
|
@@ -916,8 +1645,6 @@ export declare class Sheet implements ISheet {
|
|
|
916
1645
|
protected _getRangedEntries<T, E = T>(spatial: ISpatialQuery, ranges: readonly IRange.Coords[], options?: GetTypedRangeOptions<T, E>, spatialSort?: boolean): T[];
|
|
917
1646
|
/** @internal */
|
|
918
1647
|
protected _processAnchorShift<T extends Anchored.Entry<any>>(options: ISpatialMap.ShiftDetails<T>): ISpatialMap.Entry<T> | null;
|
|
919
|
-
/** @internal */
|
|
920
|
-
protected _processListenerShift(rangesListenerMap: Map<number, ICellRangesListenerEntry>, beforeAfterMap: Map<number, BeforeAfterRange>, beforeStates: Map<number, ICellRangesListenerEntry>, options: ISpatialMap.ShiftDetails<ICellRangeListenerEntry>): ISpatialMap.Entry<ICellRangeListenerEntry>[] | void;
|
|
921
1648
|
/** {@inheritDoc ISheet.delete} */
|
|
922
1649
|
delete(): void;
|
|
923
1650
|
/** {@inheritDoc ITransaction.ITransactional.doBatch} */
|
|
@@ -938,12 +1665,10 @@ export declare class Sheet implements ISheet {
|
|
|
938
1665
|
*/
|
|
939
1666
|
_getStateId(): string;
|
|
940
1667
|
/** @internal */
|
|
941
|
-
protected _beginCommit(options?: ITransaction.StoreOperationOptions
|
|
1668
|
+
protected _beginCommit(options?: ITransaction.StoreOperationOptions | string): ITransaction;
|
|
942
1669
|
/** @internal */
|
|
943
1670
|
protected _updateState(updateState?: Partial<State>, options?: ITransaction.OperationOptions | string): State;
|
|
944
1671
|
/** @internal */
|
|
945
|
-
protected _addEvent(type: keyof CommitEvents, value: any): void;
|
|
946
|
-
/** @internal */
|
|
947
1672
|
protected _getScalar(rowIndex: number, columnIndex: number, asJSDate?: boolean): Scalar | InteropScalar;
|
|
948
1673
|
/**
|
|
949
1674
|
* This is mostly optimized except for scrolling. On scroll y it must requery. We could debounce this.
|
|
@@ -958,7 +1683,16 @@ export declare class Sheet implements ISheet {
|
|
|
958
1683
|
* @internal
|
|
959
1684
|
*/
|
|
960
1685
|
protected _getCellAt(rowIndex: number, colIndex: number): ICell;
|
|
961
|
-
|
|
1686
|
+
/**
|
|
1687
|
+
* The cell as `state` has it, or - for `held` - as the held write to it leaves it.
|
|
1688
|
+
*
|
|
1689
|
+
* @returns `null` if the write has to be made to know: the cell has a formula or a calculation
|
|
1690
|
+
* status the write changes, or a style update that reaches past the cell (see
|
|
1691
|
+
* `intersectionAfterStyleUpdate`).
|
|
1692
|
+
* @internal
|
|
1693
|
+
*/
|
|
1694
|
+
protected _getCellAtState(state: Readonly<State>, transaction: ITransaction | null, rowIndex: number, colIndex: number, held: CellBuffer.HeldCell | null): ICell | null;
|
|
1695
|
+
protected _queryStyle(anchorCoords: IRange.Coords, cellOptions: SheetCellOptions, extent?: IRange.Coords): ICellStyle;
|
|
962
1696
|
/**
|
|
963
1697
|
* @param updateStyles Replaces the write half of the returned style. A style READS from the
|
|
964
1698
|
* anchor cell and WRITES to every range, so a set spanning sheets needs the read to stay here
|
|
@@ -966,9 +1700,20 @@ export declare class Sheet implements ISheet {
|
|
|
966
1700
|
* caller holding the whole set can do. See `SheetRanges.getStyle`.
|
|
967
1701
|
* @internal
|
|
968
1702
|
*/
|
|
969
|
-
protected _getStyle(ranges: IRange.Coords[], anchor?: IRangeSelection.Coords, updateStyles?: (update:
|
|
1703
|
+
protected _getStyle(ranges: IRange.Coords[], anchor?: IRangeSelection.Coords, updateStyles?: (update: ICellStyle.Update, options?: ICellStyle.UpdateOptions) => void): ICellStyle;
|
|
970
1704
|
/** @internal */
|
|
971
1705
|
protected _initHeadersState(jsonColumns?: ISheetHeader.JSON, jsonRows?: ISheetHeader.JSON): void;
|
|
1706
|
+
/**
|
|
1707
|
+
* Tells the grid which rows or columns are hidden now, from inside the operation that changed
|
|
1708
|
+
* them: the formulas that skip hidden cells recalculate under that operation.
|
|
1709
|
+
*
|
|
1710
|
+
* @remarks
|
|
1711
|
+
* A restore is heard here too, with no operation open, and is not told: the grid's record of
|
|
1712
|
+
* the set is restored with the sheet's, and the engine's with its own history
|
|
1713
|
+
* (DESIGN-CALC-SERVICE §7.5). Telling it as well would land the restored set under the snapshot
|
|
1714
|
+
* being left.
|
|
1715
|
+
*/
|
|
1716
|
+
protected _tellHidden(axis: IRange.Axis): void;
|
|
972
1717
|
/**
|
|
973
1718
|
* Drop every read-through cache that a data change can invalidate.
|
|
974
1719
|
*
|
|
@@ -983,6 +1728,19 @@ export declare class Sheet implements ISheet {
|
|
|
983
1728
|
* @internal
|
|
984
1729
|
*/
|
|
985
1730
|
protected _initListenerState(): void;
|
|
1731
|
+
/**
|
|
1732
|
+
* Re-derive everything that is a function of how a cell *paints* rather than of what it holds:
|
|
1733
|
+
* the default font metrics, the layout, and the header sizes fitted to that paint.
|
|
1734
|
+
*
|
|
1735
|
+
* @remarks
|
|
1736
|
+
* The theme is the familiar case. A language or locale switch is the same shape — the cell
|
|
1737
|
+
* paints a different word (`WAHR`, `#WERT!`, `15.03.2023`) for a value that never changed — so
|
|
1738
|
+
* the columns fitted to the old word are stale, and nothing below the sheet is told otherwise.
|
|
1739
|
+
* The fit only grows: a maintenance pass must never take back a width the sheet already had.
|
|
1740
|
+
*
|
|
1741
|
+
* @internal
|
|
1742
|
+
*/
|
|
1743
|
+
protected _invalidateRendering(): void;
|
|
986
1744
|
/** @internal */
|
|
987
1745
|
protected _initViewState(entireCoords: IRange.Coords, json: ISheetView.JSON): void;
|
|
988
1746
|
protected _initCellState(): void;
|
|
@@ -994,8 +1752,22 @@ export declare class Sheet implements ISheet {
|
|
|
994
1752
|
protected _createConditionalFormats(conditionalFormats: IAnchoredMap<IConditionalFormat, IConditionalFormat.JSON>, key: keyof State, refs: IRange.JSONReference<IConditionalFormat.JSON>[], createModel: (options: ConditionalFormat.ConstructorOptions) => IConditionalFormat, addListeners?: (model: IConditionalFormat) => IListener.Remove): IAnchoredMap<IConditionalFormat, IConditionalFormat.JSON>;
|
|
995
1753
|
/** @internal */
|
|
996
1754
|
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>;
|
|
1755
|
+
/**
|
|
1756
|
+
* Loads the pivot tables into their anchored map, each anchored where its part says it sits.
|
|
1757
|
+
* The map moves and deletes them with structural edits; the table itself rules on the edit
|
|
1758
|
+
* (`PivotTable._processContainerShift`).
|
|
1759
|
+
* @internal
|
|
1760
|
+
*/
|
|
1761
|
+
protected _createPivotTables(pivotTables: IAnchoredMap<IPivotTable, IPivotTable.JSON>, key: keyof State, refs: IRange.JSONReference<IPivotTable.JSON>[], fromResourceId?: (resourceId: number) => IResource): IAnchoredMap<IPivotTable, IPivotTable.JSON>;
|
|
1762
|
+
/** @internal */
|
|
1763
|
+
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>;
|
|
1764
|
+
/**
|
|
1765
|
+
* The JSON for a comment authored now: modifiers with an id, an author and a date minted.
|
|
1766
|
+
* @internal
|
|
1767
|
+
*/
|
|
1768
|
+
protected _newCommentJSON(modifiers: IComment.Modifiers): IComment.JSON;
|
|
997
1769
|
/** @internal */
|
|
998
|
-
protected _createMovableEntry(json: IMovable.JSON, zIndex: number, fromResourceId?: (resourceId: number) => IResource): ISpatialMap.Entry<MovableEntry>;
|
|
1770
|
+
protected _createMovableEntry(json: IMovable.JSON, zIndex: number, fromResourceId?: (resourceId: number) => IResource, index?: MovableIndex, contentGiven?: Movable.Content): ISpatialMap.Entry<MovableEntry>;
|
|
999
1771
|
/** @internal */
|
|
1000
1772
|
protected _fromJSON(json: ISheet.JSON | undefined, disableLoadAutoFit?: boolean): void;
|
|
1001
1773
|
/** {@inheritDoc ITransaction.ITransactional.getId} */
|
|
@@ -1024,9 +1796,9 @@ export declare class Sheet implements ISheet {
|
|
|
1024
1796
|
/** {@inheritDoc ISheet.getCalculation} */
|
|
1025
1797
|
getCalculation(): ICalculation;
|
|
1026
1798
|
/** {@inheritDoc ISheet.createFormula} */
|
|
1027
|
-
createFormula(expression: string, coords?: Partial<IRange.CellCoords
|
|
1799
|
+
createFormula(expression: string, coords?: Partial<IRange.CellCoords>, options?: ICalculation.CreateFormulaOptions): ICalculation.IFormula;
|
|
1028
1800
|
/** {@inheritDoc ISheet.evaluate} */
|
|
1029
|
-
evaluate(expression: string, options?: number | ICalculation.EvaluateOptions & Partial<IRange.CellCoords>): Promise<Scalar | IRange>;
|
|
1801
|
+
evaluate(expression: string, options?: number | ICalculation.EvaluateOptions & Partial<IRange.CellCoords> & ICalculation.CreateFormulaOptions): Promise<Scalar | IRange>;
|
|
1030
1802
|
/** {@inheritDoc ISheet.whenCalculationReady} */
|
|
1031
1803
|
whenCalculationReady(): Promise<ICalculation.Status>;
|
|
1032
1804
|
/** {@inheritDoc ISheet.getWorkbook} */
|
|
@@ -1046,12 +1818,26 @@ export declare class Sheet implements ISheet {
|
|
|
1046
1818
|
* @internal
|
|
1047
1819
|
*/
|
|
1048
1820
|
export declare function createCellRangeCounts(counts: Readonly<Record<ICellRange.Feature, number>>): ICellRange.Counts;
|
|
1821
|
+
/**
|
|
1822
|
+
* Used for signalling tupleUpdate was called via private apis.
|
|
1823
|
+
* This allows use to 'avoid side effects' and skip validation checks.
|
|
1824
|
+
* @internal
|
|
1825
|
+
*/
|
|
1049
1826
|
interface NotifierOptions {
|
|
1827
|
+
/**
|
|
1828
|
+
* Which error an invalid source reports - `#REF!` when the cells were deleted, `#N/A` when the
|
|
1829
|
+
* world predates the listener.
|
|
1830
|
+
*
|
|
1831
|
+
* @defaultValue `#REF!`
|
|
1832
|
+
*/
|
|
1833
|
+
invalidError?: string;
|
|
1050
1834
|
isDataChange?: boolean;
|
|
1051
1835
|
getTransactionId: () => string;
|
|
1052
1836
|
isUndo?: boolean;
|
|
1053
1837
|
isRestoreOrRevert?: boolean;
|
|
1054
1838
|
trigger?: string;
|
|
1839
|
+
/** Spell the source with its sheet qualifier (a workbook range), as the listener registered it. */
|
|
1840
|
+
qualified?: boolean;
|
|
1055
1841
|
from?: ICellRanges;
|
|
1056
1842
|
to?: ICellRange;
|
|
1057
1843
|
timeStamp?: number;
|
|
@@ -1065,35 +1851,34 @@ interface TableColumnHeaders {
|
|
|
1065
1851
|
lastRowIndex: number;
|
|
1066
1852
|
lastColIndex: number;
|
|
1067
1853
|
}
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1854
|
+
/**
|
|
1855
|
+
* A live range listener: its node in the versioned map, and the callback the map must never hold.
|
|
1856
|
+
* @internal
|
|
1857
|
+
*/
|
|
1858
|
+
interface ListenerNodeEntry {
|
|
1859
|
+
node: ListenerAnchor;
|
|
1860
|
+
handler: ICellRange.Listener | null;
|
|
1861
|
+
handlerW: WeakRef<ICellRange.Listener> | null;
|
|
1862
|
+
options: ICellRange.ListenerOptions;
|
|
1863
|
+
/** The coords last delivered, so a restore can tell whether the reference moved. */
|
|
1864
|
+
lastCoords: IRange.Coords[] | null;
|
|
1865
|
+
/**
|
|
1866
|
+
* Whether the ranges were registered with a sheet qualifier. A qualified address names its
|
|
1867
|
+
* sheet, so a rename of the sheet changes it: the node is told, and its source is spelled
|
|
1868
|
+
* qualified. A bare address is the anchor's and a rename is nothing to it.
|
|
1869
|
+
*/
|
|
1870
|
+
qualified: boolean;
|
|
1871
|
+
/** Present when the node is a {@link WatchAnchor}: what the watch is told. */
|
|
1872
|
+
watch?: WatchAnchor.Handlers;
|
|
1072
1873
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
ranges?: readonly IRange.FixableCoords[];
|
|
1082
|
-
events?: CommitEvents;
|
|
1083
|
-
formulas?: readonly IRange.FixableCoords[];
|
|
1084
|
-
spills?: readonly IRange.FixableCoords[];
|
|
1085
|
-
/**
|
|
1086
|
-
* Special case for range listeners that monitored a remove.
|
|
1087
|
-
*/
|
|
1088
|
-
merges?: readonly IRange.FixableCoords[];
|
|
1089
|
-
listeners?: Map<number, BeforeAfterRange>;
|
|
1090
|
-
table?: ITable;
|
|
1091
|
-
/** If `true` then don't do protection check. (For example load or range listeners) */
|
|
1092
|
-
skipProtectionCheck?: boolean;
|
|
1093
|
-
/**
|
|
1094
|
-
* We update values (cache, potentially styling, as a result of calculations)
|
|
1095
|
-
*/
|
|
1096
|
-
calculationSideEffect?: boolean;
|
|
1874
|
+
/**
|
|
1875
|
+
* A run of formula cells with the references they inherit a number format from, relative to the
|
|
1876
|
+
* run's top-left ({@link ICalcGrid.Results.formatInserts}) - what `Sheet._resolveInheritedFormats`
|
|
1877
|
+
* resolves.
|
|
1878
|
+
*/
|
|
1879
|
+
interface EnteredBlock {
|
|
1880
|
+
coords: IRange.Coords;
|
|
1881
|
+
references: readonly IRange.FixableCoords[];
|
|
1097
1882
|
}
|
|
1098
1883
|
export {};
|
|
1099
1884
|
//# sourceMappingURL=Sheet.d.ts.map
|