@sheetxl/sdk 0.7.28-beta.4 → 0.8.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/browser/cjs/4f5eoQQfV-V7LO2_.cjs +1 -0
- package/browser/cjs/BEnEDC1m546-gzWS.cjs +1 -0
- package/browser/cjs/CwCUa4IzGNGissLL.cjs +1 -0
- package/browser/cjs/Dg3GaW0QWwnlqetX.cjs +1 -0
- package/browser/cjs/KWQPie2u7AP69web.cjs +93 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{DBIu6NUHIcxOOBQp.mjs → BJ9hcZAGY8Tj5_9L.mjs} +1 -1
- package/browser/esm/C8vpA2ZBtZf6w4nq.mjs +394 -0
- package/browser/esm/DDojiE2-oycJ7qGi.mjs +20 -0
- package/browser/esm/DEPT7zmpiMdZ-_qC.mjs +70253 -0
- package/browser/esm/DOvCi3lf49To36WP.mjs +8 -0
- package/browser/esm/{CHSahmMFYNB0Ajkf.mjs → Dq3sc4B_HQHBrT5N.mjs} +2 -2
- package/browser/esm/index.mjs +871 -696
- package/browser/esm/{CKk58ZLcrllMzfou.mjs → trwZArJQQq7K9kL7.mjs} +2 -2
- package/licenses/dependencies.txt +204 -204
- package/node/esm/CGWsQOMWdnDeF4dX.mjs +8 -0
- package/node/esm/{DUYP6faJJHCaW1Xf.mjs → CL9MI-b6D9BmtVXW.mjs} +1 -1
- package/node/esm/CressiwiIhxCVp1v.mjs +28 -0
- package/node/esm/O2cOO3xIynWUgOWe.mjs +403 -0
- package/node/esm/index.mjs +53973 -38584
- package/package.json +6 -7
- package/resources/locales/de/model.msg.json +45 -9
- package/resources/locales/en/model.msg.json +42 -9
- package/types/scripting-api.json +7093 -0
- package/types/scripting-enums.json +54 -4
- package/types/scripting.d.ts +7185 -1079
- package/types/src/anchored/AbstractAnchored.d.ts +18 -8
- package/types/src/anchored/AnchoredMap.d.ts +2 -0
- package/types/src/anchored/IAnchoredMap.d.ts +52 -4
- package/types/src/autoFill/AutoFill.d.ts +316 -32
- package/types/src/autoFill/IAutoFill.d.ts +232 -15
- package/types/src/border/{IBorder.d.ts → IBorders.d.ts} +41 -40
- package/types/src/border/index.d.ts +1 -1
- package/types/src/calculation/Calculation.d.ts +745 -35
- package/types/src/calculation/ExternalBookBindings.d.ts +118 -0
- package/types/src/calculation/FormulaText.d.ts +74 -0
- package/types/src/calculation/ICalculation.d.ts +318 -81
- package/types/src/calculation/INamedFormulasCollection.d.ts +5 -8
- package/types/src/calculation/NamedFormulaCollection.d.ts +139 -107
- package/types/src/calculation/NamedLambdaFunction.d.ts +28 -0
- package/types/src/calculation/TokenType.d.ts +9 -0
- package/types/src/calculation/Types.d.ts +83 -2
- package/types/src/calculation/_CloneBoundary.d.ts +80 -0
- package/types/src/calculation/compiler/ASTTypes.d.ts +58 -0
- package/types/src/calculation/compiler/CompilerUtils.d.ts +134 -12
- package/types/src/calculation/compiler/FormulaCompiler.d.ts +29 -4
- package/types/src/calculation/compiler/FormulaParser.d.ts +1 -2
- package/types/src/calculation/compiler/LiteTransform.d.ts +17 -0
- package/types/src/calculation/compiler/ParserUtils.d.ts +26 -1
- package/types/src/calculation/compiler/SRParser.d.ts +2 -1
- package/types/src/calculation/compiler/Types.d.ts +79 -9
- package/types/src/calculation/executor/CalcExecutor.d.ts +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 +124 -21
- package/types/src/calculation/formula/FormulaRecordView.d.ts +79 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +261 -67
- package/types/src/calculation/formula/LambdaValue.d.ts +15 -16
- package/types/src/calculation/formula/LazyValue.d.ts +96 -0
- package/types/src/calculation/formula/TokenUtils.d.ts +25 -1
- package/types/src/calculation/formula/index.d.ts +1 -0
- package/types/src/calculation/functions/FunctionDeclarations.d.ts +31 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +15 -2
- package/types/src/calculation/grid/CalcGrid.d.ts +384 -158
- package/types/src/calculation/grid/CalcGridBackend.d.ts +450 -0
- package/types/src/calculation/grid/CalcGridProxy.d.ts +133 -0
- package/types/src/calculation/grid/CalcGridUtils.d.ts +62 -12
- package/types/src/calculation/grid/FormulaEntry.d.ts +129 -0
- package/types/src/calculation/grid/FormulaHost.d.ts +236 -0
- package/types/src/calculation/grid/ICalcGrid.d.ts +456 -143
- package/types/src/calculation/grid/_CalcRequest.d.ts +272 -0
- package/types/src/calculation/grid/index.d.ts +4 -0
- package/types/src/calculation/index.d.ts +2 -0
- package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +6 -2
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +339 -11
- package/types/src/calculation/spatial/SpillEntry.d.ts +20 -5
- package/types/src/calculation/spatial/TouchedWindows.d.ts +86 -0
- package/types/src/calculation/spatial/index.d.ts +1 -0
- package/types/src/calculation/state/CalcInputs.d.ts +41 -0
- package/types/src/calculation/state/CalcNode.d.ts +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 +39 -3
- 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 +78 -23
- package/types/src/cell/ICellProtection.d.ts +50 -10
- package/types/src/cellRange/ICellRange.d.ts +368 -90
- package/types/src/cellRange/ICellRanges.d.ts +9 -7
- package/types/src/chart/Chart.d.ts +72 -2
- package/types/src/chart/ChartCollection.d.ts +26 -0
- package/types/src/chart/IChart.d.ts +162 -9
- package/types/src/chart/IChartCollection.d.ts +25 -0
- package/types/src/chart/_ChartXml.d.ts +70 -0
- package/types/src/chart/index.d.ts +1 -3
- package/types/src/collections/ArraysGrid.d.ts +1 -1
- package/types/src/collections/IGrid.d.ts +1 -1
- package/types/src/collections/ISparseGrid.d.ts +9 -0
- package/types/src/collections/ISpatialMap.d.ts +59 -21
- package/types/src/collections/ImmutableList.d.ts +28 -0
- package/types/src/collections/MixedTypedArrayList.d.ts +168 -108
- package/types/src/collections/OverlappingRangeIterator.d.ts +13 -17
- package/types/src/collections/RepeatingList.d.ts +7 -0
- package/types/src/collections/ScalarGrid.d.ts +50 -0
- package/types/src/collections/SparseGrid.d.ts +1 -1
- package/types/src/collections/SpatialMap.d.ts +13 -21
- package/types/src/collections/Tuple.d.ts +128 -16
- package/types/src/collections/_GridUtils.d.ts +19 -6
- package/types/src/collections/_RangeSweep.d.ts +97 -0
- package/types/src/collections/_SpatialUtils.d.ts +20 -2
- package/types/src/collections/index.d.ts +1 -0
- package/types/src/comment/Comment.d.ts +159 -0
- package/types/src/comment/CommentCollection.d.ts +40 -0
- package/types/src/comment/IComment.d.ts +319 -48
- package/types/src/comment/ICommentCollection.d.ts +90 -0
- package/types/src/comment/_CommentUtils.d.ts +28 -0
- package/types/src/comment/index.d.ts +1 -0
- package/types/src/condition/AnchoredConditional.d.ts +76 -17
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +8 -7
- package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +2 -1
- package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +3 -6
- package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +1 -1
- package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +7 -0
- package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +9 -0
- package/types/src/condition/Condition.d.ts +16 -0
- package/types/src/condition/ICondition.d.ts +86 -33
- package/types/src/condition/_ConditionFormula.d.ts +152 -0
- package/types/src/condition/_ConditionUtils.d.ts +73 -10
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +21 -10
- package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +19 -8
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +5 -3
- package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +2 -0
- package/types/src/dataValidation/DataValidation.d.ts +50 -3
- package/types/src/dataValidation/DataValidationCollection.d.ts +20 -9
- package/types/src/dataValidation/IDataValidation.d.ts +119 -30
- package/types/src/dataValidation/IDataValidationCollection.d.ts +10 -2
- package/types/src/date/DateUtils.d.ts +20 -0
- package/types/src/date/_DateUtils.d.ts +91 -7
- package/types/src/externalBook/ExternalBookCollection.d.ts +145 -12
- package/types/src/externalBook/ExternalBookName.d.ts +96 -0
- package/types/src/externalBook/IExternalBook.d.ts +170 -18
- package/types/src/externalBook/IExternalBookCollection.d.ts +79 -7
- package/types/src/externalBook/index.d.ts +1 -0
- package/types/src/fill/IStroke.d.ts +1 -1
- package/types/src/filter/IFilter.d.ts +29 -4
- package/types/src/font/IFont.d.ts +17 -0
- package/types/src/history/IHistory.d.ts +3 -2
- package/types/src/i18n/LanguagePack.d.ts +12 -4
- package/types/src/index.d.ts +3 -0
- package/types/src/io/AbstractBackingStore.d.ts +24 -1
- package/types/src/io/ArrayBackingStore.d.ts +1 -1
- package/types/src/io/EmbeddedPart.d.ts +20 -0
- package/types/src/io/IEmbeddedPart.d.ts +63 -0
- package/types/src/io/IWorkbookIO.d.ts +185 -18
- package/types/src/io/WorkbookIO.d.ts +9 -0
- package/types/src/io/WorkbookOrigin.d.ts +20 -11
- package/types/src/io/WorkbookOriginProvider.d.ts +46 -0
- package/types/src/io/_XmlFragment.d.ts +49 -0
- package/types/src/io/index.d.ts +1 -0
- package/types/src/lib/file/file.browser.d.ts +19 -5
- package/types/src/lib/file/file.node.d.ts +5 -0
- package/types/src/lib/utils/_Utils.d.ts +18 -0
- package/types/src/lib/utils/utils.browser.d.ts +9 -3
- package/types/src/license/license-key.d.ts +27 -0
- package/types/src/listener/IListener.d.ts +12 -7
- package/types/src/listener/ListenerEmitter.d.ts +46 -5
- package/types/src/model/AbstractModel.d.ts +14 -5
- package/types/src/movable/Control.d.ts +57 -0
- package/types/src/movable/IControl.d.ts +84 -0
- package/types/src/movable/IMovable.d.ts +23 -1
- package/types/src/movable/IMovableCollection.d.ts +2 -0
- package/types/src/movable/Movable.d.ts +4 -6
- package/types/src/movable/MovableCollection.d.ts +7 -7
- package/types/src/movable/index.d.ts +4 -0
- package/types/src/named/AbstractNamed.d.ts +1 -1
- package/types/src/named/INamed.d.ts +4 -1
- package/types/src/named/INamedCollection.d.ts +26 -0
- package/types/src/named/NamedCollection.d.ts +16 -15
- package/types/src/numFmt/BuiltInFormats.d.ts +15 -7
- package/types/src/numFmt/IFormatEngine.d.ts +2 -0
- package/types/src/numFmt/NumfmtFormatEngine.d.ts +2 -0
- package/types/src/person/IPerson.d.ts +99 -0
- package/types/src/person/IPersonCollection.d.ts +51 -0
- package/types/src/person/Person.d.ts +32 -0
- package/types/src/person/PersonCollection.d.ts +49 -0
- package/types/src/person/index.d.ts +3 -0
- package/types/src/picture/IPicture.d.ts +2 -0
- package/types/src/picture/Picture.d.ts +2 -0
- package/types/src/pivot/IPivotTable.d.ts +107 -0
- package/types/src/pivot/IPivotTableCollection.d.ts +25 -0
- package/types/src/pivot/PivotTable.d.ts +57 -0
- package/types/src/pivot/PivotTableCollection.d.ts +25 -0
- package/types/src/pivot/index.d.ts +6 -0
- package/types/src/primitives/CompositeRangeStats.d.ts +2 -0
- package/types/src/primitives/Criteria.d.ts +1 -1
- package/types/src/primitives/LambdaBrand.d.ts +21 -0
- package/types/src/primitives/PrimitiveUtils.d.ts +60 -21
- package/types/src/primitives/Range.d.ts +105 -25
- package/types/src/primitives/RangeStats.d.ts +24 -1
- package/types/src/primitives/ReferenceRange.d.ts +42 -0
- package/types/src/primitives/Runtime.d.ts +15 -2
- package/types/src/primitives/stats/FrequencyStats.d.ts +9 -0
- package/types/src/primitives/stats/LookupIndex.d.ts +46 -0
- package/types/src/primitives/stats/SortedNumbers.d.ts +2 -0
- package/types/src/primitives/stats/index.d.ts +1 -0
- package/types/src/print/IPrint.d.ts +0 -22
- package/types/src/protectedRange/IProtectedRange.d.ts +4 -0
- package/types/src/protectedRange/IProtectedRangeCollection.d.ts +2 -0
- package/types/src/protectedRange/ProtectedRange.d.ts +1 -4
- package/types/src/protectedRange/ProtectedRangeCollection.d.ts +19 -8
- package/types/src/protection/DefaultProtection.d.ts +12 -1
- package/types/src/protection/IProtection.d.ts +36 -2
- package/types/src/reference/ReferenceUtils.d.ts +80 -0
- package/types/src/reference/index.d.ts +2 -0
- package/types/src/resource/IResource.d.ts +21 -1
- package/types/src/resource/IResourceCollection.d.ts +9 -1
- package/types/src/resource/ResourceCollection.d.ts +6 -6
- package/types/src/scripting/FunctionArguments.d.ts +22 -0
- package/types/src/scripting/FunctionCollection.d.ts +41 -11
- package/types/src/scripting/IFunctionCollection.d.ts +41 -0
- package/types/src/scripting/IModule.d.ts +25 -0
- package/types/src/scripting/IModuleCollection.d.ts +17 -0
- package/types/src/scripting/IScript.d.ts +18 -0
- package/types/src/scripting/Module.d.ts +34 -6
- package/types/src/scripting/ModuleCollection.d.ts +17 -12
- package/types/src/scripting/Runtime.d.ts +15 -0
- package/types/src/scripting/Scripts.d.ts +2 -0
- package/types/src/scripting/TypedFunction.d.ts +197 -4
- package/types/src/scripting/_FunctionIndex.d.ts +5 -0
- package/types/src/scripting/_ModuleUtils.d.ts +11 -1
- package/types/src/scripting/_ScriptUtils.d.ts +3 -0
- package/types/src/scripting/declarations.browser.d.ts +10 -0
- package/types/src/scripting/declarations.d.ts +49 -0
- package/types/src/scripting/declarations.node.d.ts +9 -0
- package/types/src/scripting/index.d.ts +3 -0
- package/types/src/selection/IRangeSelection.d.ts +9 -4
- package/types/src/selection/RangeSelection.d.ts +2 -0
- package/types/src/shape/IShape.d.ts +41 -3
- package/types/src/shape/Shape.d.ts +10 -0
- package/types/src/shape/_ShapeXml.d.ts +28 -0
- package/types/src/sheet/CellRegion.d.ts +6 -0
- package/types/src/sheet/ICellContainerOptions.d.ts +50 -0
- package/types/src/sheet/ISheet.d.ts +224 -41
- package/types/src/sheet/ISheetCollection.d.ts +2 -5
- package/types/src/sheet/NamedCellRange.d.ts +16 -7
- package/types/src/sheet/Sheet.d.ts +757 -114
- package/types/src/sheet/SheetCell.d.ts +81 -21
- package/types/src/sheet/SheetCollection.d.ts +19 -8
- package/types/src/sheet/SheetRange.d.ts +65 -14
- package/types/src/sheet/SheetRanges.d.ts +4 -6
- package/types/src/sheet/_CellBuffer.d.ts +214 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +5 -5
- package/types/src/sheet/_ListenerAnchor.d.ts +104 -0
- package/types/src/sheet/_RangeStateSweep.d.ts +16 -0
- package/types/src/sheet/_ScalarListFactory.d.ts +61 -0
- package/types/src/sheet/_SheetAutoFillUtils.d.ts +74 -0
- package/types/src/sheet/_SheetAutoFitUtils.d.ts +28 -0
- package/types/src/sheet/_SheetEvents.d.ts +43 -0
- package/types/src/sheet/_SheetFilterUtils.d.ts +32 -1
- package/types/src/sheet/_SheetIntents.d.ts +250 -0
- package/types/src/sheet/_SheetMutations.d.ts +179 -59
- package/types/src/sheet/_SheetStateReader.d.ts +16 -10
- package/types/src/sheet/_SheetStateTypes.d.ts +57 -73
- package/types/src/sheet/_SheetUtils.d.ts +2 -18
- package/types/src/sheet/_WatchAnchor.d.ts +93 -0
- package/types/src/sheet/spatial/HeldFormulaEntry.d.ts +36 -0
- package/types/src/sheet/spatial/index.d.ts +1 -0
- package/types/src/sheet/style/SheetCellStyle.d.ts +91 -64
- package/types/src/sheet/style/SheetDirectStyle.d.ts +16 -5
- package/types/src/sheet/style/_Resolvers.d.ts +5 -3
- package/types/src/sheet/style/_StyleUtils.d.ts +37 -7
- package/types/src/sheetHeader/ISheetHeader.d.ts +2 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +14 -0
- package/types/src/sheetProtection/ISheetProtection.d.ts +41 -7
- package/types/src/sheetProtection/SheetProtection.d.ts +12 -0
- package/types/src/sheetView/ISheetView.d.ts +45 -1
- package/types/src/sheetView/SheetView.d.ts +11 -0
- package/types/src/slicer/ISlicer.d.ts +2 -0
- package/types/src/slicer/Slicer.d.ts +2 -0
- package/types/src/sort/ISort.d.ts +2 -0
- package/types/src/string/IStringCollection.d.ts +5 -0
- package/types/src/string/StringCollection.d.ts +6 -6
- package/types/src/style/INamedStyleCollection.d.ts +72 -0
- package/types/src/style/IStyle.d.ts +30 -10
- package/types/src/style/IStyleCollection.d.ts +63 -42
- package/types/src/style/ITableStyleCollection.d.ts +89 -0
- package/types/src/style/NamedStyleCollection.d.ts +39 -0
- package/types/src/style/StyleCollection.d.ts +41 -5
- package/types/src/style/TableStyleCollection.d.ts +49 -0
- package/types/src/style/_BuiltInStyleDefs.d.ts +3 -3
- package/types/src/style/index.d.ts +4 -0
- package/types/src/table/AnchoredTable.d.ts +644 -68
- package/types/src/table/AutoTable.d.ts +5 -5
- package/types/src/table/ITable.d.ts +228 -30
- package/types/src/table/ITableCollection.d.ts +2 -0
- package/types/src/table/TableCollection.d.ts +19 -8
- package/types/src/table/_FilterField.d.ts +7 -5
- package/types/src/table/_NamedTable.d.ts +17 -1
- package/types/src/table/_NamedTableSource.d.ts +1 -0
- package/types/src/table/_SortField.d.ts +2 -0
- package/types/src/table/_TableColumn.d.ts +13 -2
- package/types/src/table/_TableMessages.d.ts +1 -0
- package/types/src/table/_TableUtils.d.ts +40 -0
- package/types/src/text/Bullet.d.ts +4 -0
- package/types/src/text/ITextFrame.d.ts +25 -1
- package/types/src/text/TextBoxAlignment.d.ts +15 -6
- package/types/src/text/TextFrame.d.ts +4 -0
- package/types/src/text/TextLine.d.ts +4 -0
- package/types/src/text/TextParagraph.d.ts +4 -0
- package/types/src/text/TextRun.d.ts +9 -0
- package/types/src/text/TextStacked.d.ts +83 -0
- package/types/src/text/index.d.ts +1 -0
- package/types/src/theme/ITheme.d.ts +2 -0
- package/types/src/theme/IThemeCollection.d.ts +2 -0
- package/types/src/theme/ThemeCollection.d.ts +8 -7
- package/types/src/transaction/ITransaction.d.ts +238 -36
- package/types/src/transaction/Transaction.d.ts +99 -11
- package/types/src/type/AbstractCollection.d.ts +101 -0
- package/types/src/type/ICollection.d.ts +117 -0
- package/types/src/type/ITypes.d.ts +9 -7
- package/types/src/type/index.d.ts +1 -0
- package/types/src/utils/_CSSUtils.d.ts +3 -3
- package/types/src/workbook/IWorkbook.d.ts +171 -40
- package/types/src/workbook/Workbook.d.ts +103 -7
- package/types/src/workbook/_WorkbookIntents.d.ts +36 -0
- package/types/src/workbookProtection/IWorkbookProtection.d.ts +7 -0
- package/types/src/workbookProtection/WorkbookProtection.d.ts +3 -0
- package/types/src/workbookView/IWorkbookView.d.ts +12 -0
- package/types/src/workbookView/WorkbookView.d.ts +5 -0
- package/browser/cjs/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/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/dataValidation/_Utils.d.ts +0 -10
- package/types/src/sheet/listener/RangesListener.d.ts +0 -32
- package/types/src/sheet/listener/RangesListenerEntry.d.ts +0 -19
- package/types/src/sheet/listener/index.d.ts +0 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FormulaError, IRange, Scalar, InteropScalar, IRangeStats } from '@sheetxl/primitives';
|
|
2
|
-
import { Bounds, ReferenceableClipboard } from '@sheetxl/utils';
|
|
2
|
+
import { Bounds, Size, ReferenceableClipboard } from '@sheetxl/utils';
|
|
3
3
|
import { ITypes } from '../type';
|
|
4
4
|
import { IListener } from '../listener';
|
|
5
5
|
import { ITransaction } from '../transaction';
|
|
6
6
|
import { IHyperlink } from '../hyperlink';
|
|
7
|
-
import { IComment } from '../comment';
|
|
7
|
+
import { IComment, ICommentCollection } from '../comment';
|
|
8
8
|
import { ISort } from '../sort';
|
|
9
9
|
import { ICondition } from '../condition';
|
|
10
10
|
import { IAutoFill } from '../autoFill';
|
|
@@ -15,6 +15,7 @@ import { IMovable, IMovableCollection } from '../movable';
|
|
|
15
15
|
import { IDataValidation, IDataValidationCollection } from '../dataValidation';
|
|
16
16
|
import { IConditionalFormat } from '../conditionalFormat/IConditionalFormat';
|
|
17
17
|
import { IConditionalFormatCollection } from '../conditionalFormat/IConditionalFormatCollection';
|
|
18
|
+
import { IProtectedRange, IProtectedRangeCollection } from '../protectedRange';
|
|
18
19
|
import { ISheet } from '../sheet';
|
|
19
20
|
import { ICell } from '../cell';
|
|
20
21
|
import { ICellRanges } from './ICellRanges';
|
|
@@ -66,6 +67,18 @@ export interface ICellRange {
|
|
|
66
67
|
* * @returns An array of 'IRange.Coords` that contain merges.
|
|
67
68
|
*/
|
|
68
69
|
getMerges(): IRange.Coords[];
|
|
70
|
+
/**
|
|
71
|
+
* Returns the unlocked ranges (Excel's *Allow Edit Ranges*) that overlap the range.
|
|
72
|
+
*
|
|
73
|
+
* @param options The filters of {@link IProtectedRangeCollection.getItems} without `address` —
|
|
74
|
+
* this range is the address.
|
|
75
|
+
*
|
|
76
|
+
* @remarks
|
|
77
|
+
* See {@link getConditionalFormats} for the overlap and one-entry-per-item rules, which are the
|
|
78
|
+
* same for every ranged item lookup. A cell can also be unlocked by its style
|
|
79
|
+
* (`IStyle.getProtection()`); {@link ICell.isEditAllowed} answers for both.
|
|
80
|
+
*/
|
|
81
|
+
getUnlocked(options?: ICellRange.GetItemsOptions<IProtectedRangeCollection.GetItemsOptions>): IProtectedRange[];
|
|
69
82
|
/**
|
|
70
83
|
* Returns the {@link IConditionalFormat}s that overlap the range.
|
|
71
84
|
*
|
|
@@ -96,6 +109,17 @@ export interface ICellRange {
|
|
|
96
109
|
* same for every ranged item lookup.
|
|
97
110
|
*/
|
|
98
111
|
getDataValidations(options?: ICellRange.GetItemsOptions<IDataValidationCollection.GetItemsOptions>): IDataValidation[];
|
|
112
|
+
/**
|
|
113
|
+
* Returns the {@link IComment}s on cells within the range.
|
|
114
|
+
*
|
|
115
|
+
* @param options The filters of {@link ICommentCollection.getItems} without `address` — this
|
|
116
|
+
* range is the address.
|
|
117
|
+
*
|
|
118
|
+
* @remarks
|
|
119
|
+
* The items are the sheet's — a scoped view of `getSheet().getComments()`, not a copy. A
|
|
120
|
+
* comment is on one cell, so each appears once, in reading order.
|
|
121
|
+
*/
|
|
122
|
+
getComments(options?: ICellRange.GetItemsOptions<ICommentCollection.GetItemsOptions>): IComment[];
|
|
99
123
|
/**
|
|
100
124
|
* Returns the {@link ITable}s that overlap the range.
|
|
101
125
|
*
|
|
@@ -173,13 +197,73 @@ export interface ICellRange {
|
|
|
173
197
|
* @remarks
|
|
174
198
|
* When querying the formula this will always be for the top left. However the
|
|
175
199
|
* set values work for the entire range.
|
|
200
|
+
*
|
|
201
|
+
* Returns the formula object, or `null` for a cell without one. For formula text across the
|
|
202
|
+
* whole range use {@link ICellRange.getFormulas}, which reads `''` for cells without a formula.
|
|
176
203
|
*/
|
|
177
204
|
getFormula(address?: ICell.Address): ICalculation.IFormula;
|
|
205
|
+
/**
|
|
206
|
+
* Returns the formula text of every cell in the range.
|
|
207
|
+
*
|
|
208
|
+
* @returns A row-major 2D array in the shape of the range.
|
|
209
|
+
*
|
|
210
|
+
* @remarks
|
|
211
|
+
* - Each formula reads as entered, with its leading `=` (`'=SUM(A1:A3)'`), so the result can be
|
|
212
|
+
* passed straight back to {@link ICellRange.setFormulas}.
|
|
213
|
+
* - A cell without a formula reads as an empty string `''`, not `null`. This differs from
|
|
214
|
+
* {@link ICell.getFormulaText} and {@link ICellRange.getFormula}, which return `null`.
|
|
215
|
+
* - Throws if the range holds more than `10000` cells, like {@link ICellRange.getValues}.
|
|
216
|
+
*
|
|
217
|
+
* @see {@link ICellRange.getFormula}
|
|
218
|
+
*/
|
|
219
|
+
getFormulas(): string[][];
|
|
220
|
+
/**
|
|
221
|
+
* Returns the number format of the top-left cell.
|
|
222
|
+
*
|
|
223
|
+
* @remarks
|
|
224
|
+
* Reads the top-left cell, the same contract as {@link ICellRange.getValue} and
|
|
225
|
+
* {@link ICellRange.getStyle}. A cell without an authored format reads `'General'`.
|
|
226
|
+
*
|
|
227
|
+
* @see {@link IStyle.getNumberFormat}
|
|
228
|
+
*/
|
|
229
|
+
getNumberFormat(): string;
|
|
230
|
+
/**
|
|
231
|
+
* Returns the number format of every cell in the range.
|
|
232
|
+
*
|
|
233
|
+
* @returns A row-major 2D array in the shape of the range.
|
|
234
|
+
*
|
|
235
|
+
* @remarks
|
|
236
|
+
* - A cell without an authored format reads `'General'`.
|
|
237
|
+
* - Throws if the range holds more than `10000` cells, like {@link ICellRange.getValues}.
|
|
238
|
+
*
|
|
239
|
+
* @see {@link IStyle.getNumberFormat}
|
|
240
|
+
*/
|
|
241
|
+
getNumberFormats(): string[][];
|
|
242
|
+
/**
|
|
243
|
+
* Sets one number format on every cell in the range.
|
|
244
|
+
*
|
|
245
|
+
* @param numFmt The format code, or `null` to clear it.
|
|
246
|
+
*
|
|
247
|
+
* @see {@link IStyle.setNumberFormat}
|
|
248
|
+
*/
|
|
249
|
+
setNumberFormat(numFmt: string | null, options?: IStyle.UpdateOptions): this;
|
|
250
|
+
/**
|
|
251
|
+
* Sets the number format of each cell in the range.
|
|
252
|
+
*
|
|
253
|
+
* @param formats Format codes in row-major order.
|
|
254
|
+
*
|
|
255
|
+
* @remarks
|
|
256
|
+
* An array smaller than the range writes only the cells it covers, as {@link ICellRange.setValues} does.
|
|
257
|
+
*
|
|
258
|
+
* @see {@link ICellRange.setNumberFormat}
|
|
259
|
+
*/
|
|
260
|
+
setNumberFormats(formats: readonly string[][], options?: ICellRange.UpdateCellsOptions): this;
|
|
178
261
|
/**
|
|
179
262
|
* Parses a formula expression and returns a *transient* formula object anchored at this range's
|
|
180
263
|
* top-left cell.
|
|
181
264
|
*
|
|
182
265
|
* @param expression The formula expression to parse.
|
|
266
|
+
* @param options Optional parse options; the expression is storage text unless `target` is `'display'`.
|
|
183
267
|
*
|
|
184
268
|
* @remarks
|
|
185
269
|
* The anchored convenience form: equivalent to
|
|
@@ -196,7 +280,7 @@ export interface ICellRange {
|
|
|
196
280
|
* @see {@link ISheet.createFormula}
|
|
197
281
|
* @see {@link ICalculation.createFormula}
|
|
198
282
|
*/
|
|
199
|
-
createFormula(expression: string): ICalculation.IFormula;
|
|
283
|
+
createFormula(expression: string, options?: ICalculation.CreateFormulaOptions): ICalculation.IFormula;
|
|
200
284
|
/**
|
|
201
285
|
* Returns the intersection of the current range and the specified range.
|
|
202
286
|
*
|
|
@@ -486,6 +570,27 @@ export interface ICellRange {
|
|
|
486
570
|
* merges.
|
|
487
571
|
*/
|
|
488
572
|
getDefaultSortCriteria(axis?: IRange.Axis, cell?: ICell.Address): ISort.DefaultSortCriteria | null;
|
|
573
|
+
/**
|
|
574
|
+
* Returns the fill this range implies — which cells it would read, which it would cover, the
|
|
575
|
+
* fill types that can be offered for it, and the one to open on.
|
|
576
|
+
*
|
|
577
|
+
* @param direction Which way the series runs. Defaults to the range's own shape: a single row
|
|
578
|
+
* runs `Right`, anything else runs `Down` — or, with a `destination`, to the way it extends.
|
|
579
|
+
* @param destination Fill the range as it is to here — the fill handle's drag. The template is
|
|
580
|
+
* then the WHOLE range, blanks included, rather than its leading run, and `destination` must
|
|
581
|
+
* extend it on exactly one edge as {@link autoFill} requires.
|
|
582
|
+
* @returns `IAutoFill.DefaultCriteria`, or `null` where there is nowhere to fill: the range is
|
|
583
|
+
* one cell deep along `direction`, or `destination` does not extend it — which is also how a
|
|
584
|
+
* surface learns that a direction is not on offer at all.
|
|
585
|
+
* @throws `Error` If `destination` does not share three edges with the range, or `direction` is
|
|
586
|
+
* not the way it extends.
|
|
587
|
+
*
|
|
588
|
+
* @remarks
|
|
589
|
+
* Useful for displaying options to the ui — a Series dialog, or a fill menu deciding what to
|
|
590
|
+
* grey. Nothing is filled and nothing is committed; see {@link autoFill} to run one, and
|
|
591
|
+
* {@link AutoFill.toFillOptions} for the options a chosen {@link IAutoFill.Preset} amounts to.
|
|
592
|
+
*/
|
|
593
|
+
getDefaultAutoFillCriteria(direction?: IRange.Direction, destination?: ICellRange.Address): IAutoFill.DefaultCriteria | null;
|
|
489
594
|
/**
|
|
490
595
|
* Returns the ranges immediately referenced by the formulas in this range.
|
|
491
596
|
*
|
|
@@ -494,39 +599,39 @@ export interface ICellRange {
|
|
|
494
599
|
* rather than a fan-out — the calculation graph is indexed by range, so the cell form is this
|
|
495
600
|
* one over a 1×1.
|
|
496
601
|
*
|
|
497
|
-
* -
|
|
602
|
+
* - Resolves `null` when there are none; see {@link ICell.getDirectPrecedents} for when it resolves.
|
|
498
603
|
* - **Not filtered against the range itself.** A block containing both a formula and its input
|
|
499
604
|
* lists that input; "what does this block read" and "what does it read from outside" are
|
|
500
605
|
* different questions, and the second is {@link getDifferences} away.
|
|
501
606
|
*/
|
|
502
|
-
getDirectPrecedents(): ICellRanges | null
|
|
607
|
+
getDirectPrecedents(): Promise<ICellRanges | null>;
|
|
503
608
|
/**
|
|
504
609
|
* Returns the cells that directly reference any cell in this range.
|
|
505
610
|
*
|
|
506
611
|
* @remarks
|
|
507
612
|
* The range form of {@link ICell.getDirectDependents} — the immediate consumers of anything
|
|
508
|
-
* this range produces.
|
|
613
|
+
* this range produces. Resolves `null` when there are none.
|
|
509
614
|
*/
|
|
510
|
-
getDirectDependents(): ICellRanges | null
|
|
615
|
+
getDirectDependents(): Promise<ICellRanges | null>;
|
|
511
616
|
/**
|
|
512
617
|
* Returns all ranges contributing to this range's values, through the full calculation chain.
|
|
513
618
|
*
|
|
514
619
|
* @remarks
|
|
515
620
|
* The range form of {@link ICell.getPrecedents}: a recursive walk upstream to the root data
|
|
516
|
-
* sources.
|
|
621
|
+
* sources. Resolves `null` when there are none.
|
|
517
622
|
*
|
|
518
623
|
* **Reach for this before editing.** The precedents of a block are what its values depend on,
|
|
519
624
|
* so they are what a change to it can be wrong about.
|
|
520
625
|
*/
|
|
521
|
-
getPrecedents(): ICellRanges | null
|
|
626
|
+
getPrecedents(): Promise<ICellRanges | null>;
|
|
522
627
|
/**
|
|
523
628
|
* Returns all cells eventually affected by this range, through the full calculation chain.
|
|
524
629
|
*
|
|
525
630
|
* @remarks
|
|
526
631
|
* The range form of {@link ICell.getDependents}: a recursive walk downstream giving the total
|
|
527
|
-
* blast radius of a write here.
|
|
632
|
+
* blast radius of a write here. Resolves `null` when there are none.
|
|
528
633
|
*/
|
|
529
|
-
getDependents(): ICellRanges | null
|
|
634
|
+
getDependents(): Promise<ICellRanges | null>;
|
|
530
635
|
/**
|
|
531
636
|
* Returns the statistics for the range.
|
|
532
637
|
*
|
|
@@ -541,12 +646,6 @@ export interface ICellRange {
|
|
|
541
646
|
* indexes) — they do not overlap.
|
|
542
647
|
*/
|
|
543
648
|
getStats(options?: ICellRange.GetStatsOptions): IRangeStats;
|
|
544
|
-
/**
|
|
545
|
-
* Returns a count for of values.
|
|
546
|
-
*
|
|
547
|
-
* @deprecated Use `getStats`.
|
|
548
|
-
*/
|
|
549
|
-
getCount(): number;
|
|
550
649
|
/**
|
|
551
650
|
* Returns per-feature cell counts for the range.
|
|
552
651
|
*
|
|
@@ -595,13 +694,15 @@ export interface ICellRange {
|
|
|
595
694
|
* feature-bearing side of the partition.
|
|
596
695
|
* - **Nothing is computed until the result is iterated or counted.** The returned
|
|
597
696
|
* {@link ICellRegions} is a lazily backed handle, so building the query costs nothing.
|
|
598
|
-
* -
|
|
599
|
-
*
|
|
600
|
-
*
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
*
|
|
697
|
+
* - **Regions follow the payload, not how it was written.** A solid `A1:D4` is one
|
|
698
|
+
* `Contentful` region, and a number format applied in three strokes (or loaded from a file
|
|
699
|
+
* that stored it in pieces) is one `NumberFormat` region. The same holds for `Fill` and the
|
|
700
|
+
* other content-style features (`Font`, `Alignment`, `Protection`), and each of those splits
|
|
701
|
+
* only on its own part: a bold column inside a uniform number format does not split the
|
|
702
|
+
* `NumberFormat` region. `Borders` is the exception — a border's edges belong to the block
|
|
703
|
+
* it was applied to, so two equal boxes side by side are two regions. Refinement is
|
|
704
|
+
* unaffected — `[Contentful, Fill]` still partitions by fill and still excludes unoccupied
|
|
705
|
+
* cells.
|
|
605
706
|
* - Every {@link Feature} partitions — there is no throwing member left. `DateFormat` splits by
|
|
606
707
|
* format string, the same way `Fill` splits by color; `Error` splits by error value, backed
|
|
607
708
|
* by the reconciled error index. Scalar kinds (`String`/`Number`/`Boolean`) are not in this
|
|
@@ -636,7 +737,7 @@ export interface ICellRange {
|
|
|
636
737
|
* @remarks
|
|
637
738
|
* - `null` values will clear the corresponding cells.
|
|
638
739
|
* - `undefined` values will be ignored, leaving the existing cell values unchanged.
|
|
639
|
-
* - If an array is passed the values will be in row-major order
|
|
740
|
+
* - If an array is passed the values will be in row-major order. An array smaller than the range writes only the cells it covers.
|
|
640
741
|
* - If a single value is passed in it will repeat the entire range.
|
|
641
742
|
*/
|
|
642
743
|
setValues(values: ICellRange.ValuesUpdate, options?: ICellRange.SetValuesOptions): this;
|
|
@@ -668,11 +769,24 @@ export interface ICellRange {
|
|
|
668
769
|
* @returns The current `ICellRange`.
|
|
669
770
|
*
|
|
670
771
|
* @remarks
|
|
671
|
-
* Identical behavior to setValue. Exists for ergonomics
|
|
772
|
+
* Identical behavior to setValue. Exists for ergonomics.
|
|
773
|
+
*
|
|
672
774
|
* @see
|
|
673
775
|
* {@link ICellRange.setValue}
|
|
674
776
|
*/
|
|
675
777
|
setFormula(value: ICellRange.ValuesUpdateOrCallback, options?: ICellRange.SetValuesOptions): this;
|
|
778
|
+
/**
|
|
779
|
+
* Sets the formula of each cell in the range.
|
|
780
|
+
*
|
|
781
|
+
* @param formulas Formula text in row-major order, each with a leading `=`.
|
|
782
|
+
*
|
|
783
|
+
* @remarks
|
|
784
|
+
* The same write as {@link ICellRange.setValues}: text with a leading `=` is entered as a
|
|
785
|
+
* formula, and an array smaller than the range writes only the cells it covers.
|
|
786
|
+
*
|
|
787
|
+
* @see {@link ICellRange.getFormulas}
|
|
788
|
+
*/
|
|
789
|
+
setFormulas(formulas: readonly string[][], options?: ICellRange.SetValuesOptions): this;
|
|
676
790
|
/**
|
|
677
791
|
* Re-evaluates and formulas within the range.
|
|
678
792
|
*
|
|
@@ -721,7 +835,7 @@ export interface ICellRange {
|
|
|
721
835
|
/**
|
|
722
836
|
* Clear the range.
|
|
723
837
|
*
|
|
724
|
-
* @param applyTo The type of content to clear.
|
|
838
|
+
* @param applyTo The type of content to clear. Defaults to all`
|
|
725
839
|
* @returns The current `ICellRange`.
|
|
726
840
|
*/
|
|
727
841
|
clear(applyTo?: ICell.Content, options?: ITransaction.OperationOptions): this;
|
|
@@ -736,15 +850,18 @@ export interface ICellRange {
|
|
|
736
850
|
*/
|
|
737
851
|
setHyperlink(hyperlink: IHyperlink.Update, options?: ITransaction.OperationOptions): this;
|
|
738
852
|
/**
|
|
739
|
-
*
|
|
853
|
+
* Sets or clears the comment on the range's first cell.
|
|
740
854
|
*
|
|
741
|
-
* @param comments Comment
|
|
855
|
+
* @param comments Comment modifiers, a plain string as the content, or `null` to remove.
|
|
742
856
|
* @returns The current `ICellRange`.
|
|
743
857
|
*
|
|
744
858
|
* @remarks
|
|
745
|
-
*
|
|
859
|
+
* A comment is on one cell, so a value goes on the range's top-left cell — updating the comment
|
|
860
|
+
* there if it has one, adding one otherwise — while `null` clears every comment within the
|
|
861
|
+
* range. The comment itself is the richer surface: `getSheet().getComments()` to add, and
|
|
862
|
+
* {@link ICell.getComments} to reach the one on a cell.
|
|
746
863
|
*/
|
|
747
|
-
setComments(comments: IComment.
|
|
864
|
+
setComments(comments: IComment.Update, options?: ITransaction.OperationOptions): this;
|
|
748
865
|
/**
|
|
749
866
|
* Merges all cells within the selection ranges.
|
|
750
867
|
*
|
|
@@ -908,6 +1025,24 @@ export interface ICellRange {
|
|
|
908
1025
|
* * Will return `null` if nothing was inserted or the source doesn't have a range.
|
|
909
1026
|
*/
|
|
910
1027
|
insertFrom(source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions): Promise<this | null>;
|
|
1028
|
+
/**
|
|
1029
|
+
* Whether {@link insertFrom} would go through, asked without performing it.
|
|
1030
|
+
*
|
|
1031
|
+
* @param source The source that would be inserted - the same argument `insertFrom` takes.
|
|
1032
|
+
* @param options The same options `insertFrom` would be given; `axis` and `isCut` both change the
|
|
1033
|
+
* answer, so pass the ones the real call will use.
|
|
1034
|
+
* @returns `false` when `insertFrom` would refuse, `true` otherwise.
|
|
1035
|
+
*
|
|
1036
|
+
* @remarks
|
|
1037
|
+
* A drop can be refused for reasons the caller cannot see: a cut whose gap the insert would only
|
|
1038
|
+
* half close, a merge the shift would tear or land inside of, a table it would split. This answers
|
|
1039
|
+
* the same question `insertFrom` asks itself before it commits, which is what lets an interactive
|
|
1040
|
+
* drag show a drop as refused BEFORE the user commits to it, rather than reporting an error after.
|
|
1041
|
+
*
|
|
1042
|
+
* It reports only what can be known up front. A refusal raised deeper in the operation (protection,
|
|
1043
|
+
* or content pushed off the end of the sheet) still surfaces as a thrown error.
|
|
1044
|
+
*/
|
|
1045
|
+
canInsertFrom(source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions): boolean;
|
|
911
1046
|
/**
|
|
912
1047
|
* Copies (or cuts) data and formatting from a specified source to the current range.
|
|
913
1048
|
*
|
|
@@ -1018,11 +1153,17 @@ export interface ICellRange {
|
|
|
1018
1153
|
* caller did not ask. To watch a formula belonging to a multi-area rule, fill it first — or use
|
|
1019
1154
|
* {@link ICellRanges.addWatch}, which does that for every area.
|
|
1020
1155
|
*
|
|
1021
|
-
*
|
|
1022
|
-
*
|
|
1023
|
-
*
|
|
1156
|
+
* The formula is held by the calculation engine like a formula in a cell: its references follow
|
|
1157
|
+
* row and column inserts and deletes, a reference to deleted cells reads `#REF!`, and undo
|
|
1158
|
+
* restores it. A range the formula discovers at evaluation time (`INDIRECT`, `OFFSET`) is watched
|
|
1159
|
+
* too. A volatile formula (`NOW`, `RAND`) re-evaluates with the engine's pass and does not re-fire
|
|
1160
|
+
* on its own.
|
|
1161
|
+
*
|
|
1162
|
+
* With {@link ICellRange.WatchOptions.arrayFirstCell} each cell is evaluated the way a
|
|
1163
|
+
* conditional-format or data-validation rule evaluates its formula: as an array-entered formula
|
|
1164
|
+
* whose extent is that one cell.
|
|
1024
1165
|
*/
|
|
1025
|
-
addWatch(formula: ICalculation.IFormula | string, callback: ICellRange.WatchCallback): IListener.Remove;
|
|
1166
|
+
addWatch(formula: ICalculation.IFormula | string, callback: ICellRange.WatchCallback, options?: ICellRange.WatchOptions): IListener.Remove;
|
|
1026
1167
|
/**
|
|
1027
1168
|
* Returns an iterator that allows you to iterate over the individual values within the range.
|
|
1028
1169
|
*
|
|
@@ -1102,6 +1243,22 @@ export interface ICellRange {
|
|
|
1102
1243
|
* Returns the absolute bounds for the range.
|
|
1103
1244
|
*/
|
|
1104
1245
|
getBounds(): Bounds;
|
|
1246
|
+
/**
|
|
1247
|
+
* The size this range's content needs — what {@link getBounds} would report if the range had
|
|
1248
|
+
* been {@link autoFit}. A pure query: nothing is measured onto the model and nothing is committed.
|
|
1249
|
+
*
|
|
1250
|
+
* @param options Measurement options. Default `{ axes: IRange.AxisSelection.Both }`.
|
|
1251
|
+
*
|
|
1252
|
+
* @remarks
|
|
1253
|
+
* - The width is the sum of the per-column best fits and the height the sum of the per-row best
|
|
1254
|
+
* fits, so a single-column range answers "how wide must this list be" directly.
|
|
1255
|
+
* - An axis left out of {@link BestFitOptions.axes} reports its current size.
|
|
1256
|
+
* - Only the range's own content is measured, so the answer never depends on cells outside it.
|
|
1257
|
+
* (`autoFit` also scans outside the range, to prove a shrink is safe.)
|
|
1258
|
+
* - Sheet protection is not consulted: reading a size cannot violate it, and a protected sheet
|
|
1259
|
+
* answers the same as an unprotected one.
|
|
1260
|
+
*/
|
|
1261
|
+
getBestFit(options?: ICellRange.BestFitOptions): Size;
|
|
1105
1262
|
/**
|
|
1106
1263
|
* Indicates if the range is readonly only.
|
|
1107
1264
|
*
|
|
@@ -1146,7 +1303,7 @@ export interface ICellRange {
|
|
|
1146
1303
|
* Checks if the ranges is empty, meaning it has no values or formatting.
|
|
1147
1304
|
*
|
|
1148
1305
|
* @remarks
|
|
1149
|
-
* Convenience ```getUsedRange()
|
|
1306
|
+
* Convenience ```getUsedRange() === null```.
|
|
1150
1307
|
*
|
|
1151
1308
|
* @see
|
|
1152
1309
|
* {@link ICellRange.getUsedRange}
|
|
@@ -1306,10 +1463,70 @@ export declare namespace ICellRange {
|
|
|
1306
1463
|
* dropped because the range **is** the address — a second one would be a contradictory scope.
|
|
1307
1464
|
*/
|
|
1308
1465
|
type GetItemsOptions<T> = Omit<T, 'address'>;
|
|
1466
|
+
/**
|
|
1467
|
+
* Options shared by every operation on a range.
|
|
1468
|
+
*
|
|
1469
|
+
* @remarks
|
|
1470
|
+
* `autoSelect` and `autoFit` are *directives*: they name something to do once the operation
|
|
1471
|
+
* completes rather than a change the operation makes. Both are resolved once, for the whole
|
|
1472
|
+
* operation, and neither adds an undo entry of its own - a batch that sets values and fits
|
|
1473
|
+
* the columns is one undo step that puts both back.
|
|
1474
|
+
*/
|
|
1475
|
+
interface OperationOptions extends ITransaction.OperationOptions {
|
|
1476
|
+
/**
|
|
1477
|
+
* Select the affected range once the operation completes.
|
|
1478
|
+
*
|
|
1479
|
+
* @defaultValue `false` - the selection is left alone.
|
|
1480
|
+
*
|
|
1481
|
+
* @remarks
|
|
1482
|
+
* The selection is applied once, after the whole operation - within a batch, the last
|
|
1483
|
+
* operation to ask for one wins. It is applied only if the selection is still where it was
|
|
1484
|
+
* when the operation began: a user who moved while it ran keeps where they went.
|
|
1485
|
+
*
|
|
1486
|
+
* Pass it for an edit the user made. A script that passes neither this nor
|
|
1487
|
+
* {@link autoSelectRestore} never moves the user, whether it runs, is undone or is redone.
|
|
1488
|
+
*/
|
|
1489
|
+
autoSelect?: boolean | ICellRange.SelectOptions;
|
|
1490
|
+
/**
|
|
1491
|
+
* Select the affected range when the operation is undone or redone.
|
|
1492
|
+
*
|
|
1493
|
+
* @defaultValue {@link autoSelect}
|
|
1494
|
+
*
|
|
1495
|
+
* @remarks
|
|
1496
|
+
* An undo lands where the operation began - for most operations the range they affected, for
|
|
1497
|
+
* an auto-fill the template it was dragged from - and a redo where it left the user. Within a
|
|
1498
|
+
* batch an undo lands where the first operation to ask says, a redo where the last one does.
|
|
1499
|
+
*
|
|
1500
|
+
* For an edit made from where the user already is, pass this without {@link autoSelect}: a
|
|
1501
|
+
* value typed into a cell of a selected block leaves the block selected, and undoing it
|
|
1502
|
+
* selects the cell.
|
|
1503
|
+
*/
|
|
1504
|
+
autoSelectRestore?: boolean | ICellRange.SelectOptions;
|
|
1505
|
+
/**
|
|
1506
|
+
* Fit the affected columns and rows to their content once the operation completes.
|
|
1507
|
+
*
|
|
1508
|
+
* @defaultValue `false` - sizes are left alone.
|
|
1509
|
+
*
|
|
1510
|
+
* @remarks
|
|
1511
|
+
* The fit runs once, as the last write of the operation, so it measures the finished
|
|
1512
|
+
* content and its sizes belong to the same undo entry - one undo puts both the content
|
|
1513
|
+
* and the widths back.
|
|
1514
|
+
*
|
|
1515
|
+
* If set to `true` then autoFit will mimic the UI with the following options:
|
|
1516
|
+
```
|
|
1517
|
+
{
|
|
1518
|
+
skipCustomSize: true,
|
|
1519
|
+
expandOnly: true,
|
|
1520
|
+
minContent: true
|
|
1521
|
+
}
|
|
1522
|
+
```
|
|
1523
|
+
*/
|
|
1524
|
+
autoFit?: boolean | ICellRange.AutoFitOptions;
|
|
1525
|
+
}
|
|
1309
1526
|
/**
|
|
1310
1527
|
* Options for adding an auto table to a range.
|
|
1311
1528
|
*/
|
|
1312
|
-
interface AddAutoTableOptions extends
|
|
1529
|
+
interface AddAutoTableOptions extends ICellRange.OperationOptions {
|
|
1313
1530
|
/**
|
|
1314
1531
|
* Include sort options.
|
|
1315
1532
|
*/
|
|
@@ -1326,7 +1543,7 @@ export declare namespace ICellRange {
|
|
|
1326
1543
|
/**
|
|
1327
1544
|
* Options for `ICellRange.delete`.
|
|
1328
1545
|
*/
|
|
1329
|
-
interface InsertOptions extends
|
|
1546
|
+
interface InsertOptions extends ICellRange.OperationOptions {
|
|
1330
1547
|
/**
|
|
1331
1548
|
* The direction in which to shift existing cells.
|
|
1332
1549
|
*
|
|
@@ -1355,7 +1572,7 @@ export declare namespace ICellRange {
|
|
|
1355
1572
|
/**
|
|
1356
1573
|
* Options for `ICellRange.delete`.
|
|
1357
1574
|
*/
|
|
1358
|
-
interface DeleteOptions extends
|
|
1575
|
+
interface DeleteOptions extends ICellRange.OperationOptions {
|
|
1359
1576
|
/**
|
|
1360
1577
|
* The direction in which to shift existing cells.
|
|
1361
1578
|
*
|
|
@@ -1458,8 +1675,9 @@ export declare namespace ICellRange {
|
|
|
1458
1675
|
* @defaultValue false
|
|
1459
1676
|
*
|
|
1460
1677
|
* @remarks
|
|
1461
|
-
* If `true
|
|
1462
|
-
*
|
|
1678
|
+
* If `true`, the region is the contiguous block of content around the range (Excel's
|
|
1679
|
+
* 'Ctrl+Shift+*' current region): tables are not treated as regions of their own, and a range
|
|
1680
|
+
* with no content nearby returns itself rather than the entire sheet.
|
|
1463
1681
|
*/
|
|
1464
1682
|
contentOnly?: boolean;
|
|
1465
1683
|
}
|
|
@@ -1475,7 +1693,7 @@ export declare namespace ICellRange {
|
|
|
1475
1693
|
/**
|
|
1476
1694
|
* Options for {@link ICellRange.ISnapshot.copyTo}.
|
|
1477
1695
|
*/
|
|
1478
|
-
interface CopyOptions extends
|
|
1696
|
+
interface CopyOptions extends ICellRange.OperationOptions, ReferenceableClipboard.CopyOptions {
|
|
1479
1697
|
/**
|
|
1480
1698
|
* When pasting from a smaller range to a larger range copy will repeat or 'wallpaper' the
|
|
1481
1699
|
* source values.
|
|
@@ -1530,7 +1748,7 @@ export declare namespace ICellRange {
|
|
|
1530
1748
|
/**
|
|
1531
1749
|
* Options for {@link ICellRange.setValues}.
|
|
1532
1750
|
*/
|
|
1533
|
-
interface SetValuesOptions extends
|
|
1751
|
+
interface SetValuesOptions extends ICellRange.OperationOptions {
|
|
1534
1752
|
/**
|
|
1535
1753
|
* By default setValue will attempt to parse text values into a native type.
|
|
1536
1754
|
* This can be disabled or customized using the parseText flag.
|
|
@@ -1546,21 +1764,6 @@ export declare namespace ICellRange {
|
|
|
1546
1764
|
* Both {@link SetValuesOptions} and {@link GetValuesOptions} allow for {@link IRange.Axis}s.
|
|
1547
1765
|
*/
|
|
1548
1766
|
axis?: IRange.Axis;
|
|
1549
|
-
/**
|
|
1550
|
-
* Convenience method that calls autoFit after the setValues.
|
|
1551
|
-
* @defaultValue `none` - No autofit.
|
|
1552
|
-
*
|
|
1553
|
-
* @remarks
|
|
1554
|
-
* If set to `true` then autoFit will mimic the UI with the following options:
|
|
1555
|
-
```
|
|
1556
|
-
{
|
|
1557
|
-
skipCustomSize: true,
|
|
1558
|
-
expandOnly: true,
|
|
1559
|
-
minContent: true
|
|
1560
|
-
}
|
|
1561
|
-
```
|
|
1562
|
-
*/
|
|
1563
|
-
autoFit?: boolean | ICellRange.AutoFitOptions;
|
|
1564
1767
|
/**
|
|
1565
1768
|
* Skip the bounds check when setting values.
|
|
1566
1769
|
*
|
|
@@ -1571,6 +1774,43 @@ export declare namespace ICellRange {
|
|
|
1571
1774
|
* size requires processing the entire dataset.
|
|
1572
1775
|
*/
|
|
1573
1776
|
skipBoundsCheck?: boolean;
|
|
1777
|
+
/**
|
|
1778
|
+
* Enter a single formula as an array formula (Excel's Ctrl+Shift+Enter) over the whole range.
|
|
1779
|
+
*
|
|
1780
|
+
* @defaultValue `false`
|
|
1781
|
+
*
|
|
1782
|
+
* @remarks
|
|
1783
|
+
* The range is the block's extent and the formula sits at its top-left; the result is fitted
|
|
1784
|
+
* to the extent rather than spilling from it - a dimension of 1 broadcasts, a longer one is
|
|
1785
|
+
* clipped, a shorter one is padded with `#N/A` - and the block never resizes. Its cells can
|
|
1786
|
+
* only be changed as a whole: overwriting, clearing, or inserting/deleting through part of a
|
|
1787
|
+
* block is refused ("You can't change part of an array"); rewriting it through this option
|
|
1788
|
+
* with the same range replaces it.
|
|
1789
|
+
*
|
|
1790
|
+
* Only meaningful for {@link ICellRange.setFormula} with one formula.
|
|
1791
|
+
*/
|
|
1792
|
+
arrayFixed?: boolean;
|
|
1793
|
+
/**
|
|
1794
|
+
* Give each entered formula the number format of the first cell it reads that has one, or
|
|
1795
|
+
* failing that the format its result carries, once it has been calculated.
|
|
1796
|
+
*
|
|
1797
|
+
* @defaultValue `false` - the cell keeps the format it has.
|
|
1798
|
+
*
|
|
1799
|
+
* @remarks
|
|
1800
|
+
* What typing a formula into a cell does: `=A1*2` shows currency when `A1` does, `=NOW()`
|
|
1801
|
+
* shows a date, `=DATE(2024,1,15)` a short date. A cell the formula reads ranks ahead of a
|
|
1802
|
+
* function's format (`=A1+TODAY()` is currency when `A1` is); references are taken in the
|
|
1803
|
+
* order written, a range stands for its top-left cell, and a reference a function only
|
|
1804
|
+
* points at (`=ROW(A1)`, `=OFFSET(A1,0,0)`) does not count. The format becomes the cell's
|
|
1805
|
+
* own, exactly as if set by hand, so it stays when the formula is replaced by a value and is
|
|
1806
|
+
* part of the same undo entry as the formula. A format the cell already had wins.
|
|
1807
|
+
*
|
|
1808
|
+
* Only the formulas this operation enters are formatted, and only when they are first
|
|
1809
|
+
* compiled and calculated - a later recalculation of the same cell changes nothing, and
|
|
1810
|
+
* neither does formatting a cell it reads. Pair with {@link OperationOptions.autoFit} to also
|
|
1811
|
+
* widen a column the formatted result no longer fits.
|
|
1812
|
+
*/
|
|
1813
|
+
autoFormat?: boolean;
|
|
1574
1814
|
}
|
|
1575
1815
|
/**
|
|
1576
1816
|
* Options for {@link ICellRange.getValues}.
|
|
@@ -1613,9 +1853,9 @@ export declare namespace ICellRange {
|
|
|
1613
1853
|
includeMergeOverflow?: boolean;
|
|
1614
1854
|
}
|
|
1615
1855
|
/**
|
|
1616
|
-
* Options for {@link ICellRange.
|
|
1856
|
+
* Options for {@link ICellRange.getBestFit} — measurement only.
|
|
1617
1857
|
*/
|
|
1618
|
-
interface
|
|
1858
|
+
interface BestFitOptions {
|
|
1619
1859
|
/**
|
|
1620
1860
|
* Best fit using the minimum amount of space required.
|
|
1621
1861
|
*
|
|
@@ -1626,21 +1866,6 @@ export declare namespace ICellRange {
|
|
|
1626
1866
|
* For example allowing numbers to round or use scientific notation.
|
|
1627
1867
|
*/
|
|
1628
1868
|
minContent?: boolean;
|
|
1629
|
-
/**
|
|
1630
|
-
* Restricts autoFit to only grow, never shrink.
|
|
1631
|
-
*
|
|
1632
|
-
* @defaultValue false - adjust in both directions.
|
|
1633
|
-
*
|
|
1634
|
-
* @remarks
|
|
1635
|
-
* This is useful when adjusting fonts and wan the columns to resize but not the rows.
|
|
1636
|
-
*/
|
|
1637
|
-
expandOnly?: boolean | IRange.Axis;
|
|
1638
|
-
/**
|
|
1639
|
-
* If this is set to `true` then any headers that have custom sizes will be ignored.
|
|
1640
|
-
*
|
|
1641
|
-
* @defaultValue false
|
|
1642
|
-
*/
|
|
1643
|
-
skipCustomSize?: boolean;
|
|
1644
1869
|
/**
|
|
1645
1870
|
* The axes to autoFit.
|
|
1646
1871
|
*
|
|
@@ -1662,6 +1887,26 @@ export declare namespace ICellRange {
|
|
|
1662
1887
|
*/
|
|
1663
1888
|
formulaView?: boolean;
|
|
1664
1889
|
}
|
|
1890
|
+
/**
|
|
1891
|
+
* Options for {@link ICellRange.autoFit}.
|
|
1892
|
+
*/
|
|
1893
|
+
interface AutoFitOptions extends BestFitOptions, ITransaction.OperationOptions {
|
|
1894
|
+
/**
|
|
1895
|
+
* Restricts autoFit to only grow, never shrink.
|
|
1896
|
+
*
|
|
1897
|
+
* @defaultValue false - adjust in both directions.
|
|
1898
|
+
*
|
|
1899
|
+
* @remarks
|
|
1900
|
+
* This is useful when adjusting fonts and wan the columns to resize but not the rows.
|
|
1901
|
+
*/
|
|
1902
|
+
expandOnly?: boolean | IRange.Axis;
|
|
1903
|
+
/**
|
|
1904
|
+
* If this is set to `true` then any headers that have custom sizes will be ignored.
|
|
1905
|
+
*
|
|
1906
|
+
* @defaultValue false
|
|
1907
|
+
*/
|
|
1908
|
+
skipCustomSize?: boolean;
|
|
1909
|
+
}
|
|
1665
1910
|
/**
|
|
1666
1911
|
* Options for {@link ICellRanges.getFlattened}.
|
|
1667
1912
|
*/
|
|
@@ -1708,7 +1953,7 @@ export declare namespace ICellRange {
|
|
|
1708
1953
|
/**
|
|
1709
1954
|
* Options for {@link ICellRange.autoFill}.
|
|
1710
1955
|
*/
|
|
1711
|
-
interface AutoFillOptions extends
|
|
1956
|
+
interface AutoFillOptions extends ICellRange.OperationOptions {
|
|
1712
1957
|
/**
|
|
1713
1958
|
* Provide custom fillers.
|
|
1714
1959
|
*
|
|
@@ -1722,11 +1967,21 @@ export declare namespace ICellRange {
|
|
|
1722
1967
|
*/
|
|
1723
1968
|
fillerOptions?: IAutoFill.Options;
|
|
1724
1969
|
/**
|
|
1725
|
-
*
|
|
1970
|
+
* Which part of the cells the fill carries — the same selector {@link CopyOptions.type} takes.
|
|
1971
|
+
*
|
|
1972
|
+
* @defaultValue Everything: values, formulas and formatting.
|
|
1726
1973
|
*
|
|
1727
|
-
* @
|
|
1974
|
+
* @remarks
|
|
1975
|
+
* * {@link ICell.Content.Formats} is Excel's *Fill Formatting Only*: the template's formatting
|
|
1976
|
+
* (styles, number formats, merges, conditional formats and validations) is tiled into the
|
|
1977
|
+
* destination and the values already there are left alone. The `filler` is not consulted.
|
|
1978
|
+
* * {@link ICell.Content.Values} is *Fill Without Formatting*: the series is written and the
|
|
1979
|
+
* destination keeps its own formatting — a date series lands as plain serials in a cell that
|
|
1980
|
+
* has no date format of its own.
|
|
1981
|
+
* * On a shrinking destination the vacated cells lose only the selected part.
|
|
1982
|
+
* * Any other member throws — a fill has no notion of copying just hyperlinks or comments.
|
|
1728
1983
|
*/
|
|
1729
|
-
|
|
1984
|
+
type?: ICell.Content;
|
|
1730
1985
|
/**
|
|
1731
1986
|
* Compute the fill but commit nothing — the returned range is a projection of the result.
|
|
1732
1987
|
*
|
|
@@ -1853,7 +2108,7 @@ export declare namespace ICellRange {
|
|
|
1853
2108
|
/**
|
|
1854
2109
|
* Options for {@link ICellRange.textToColumns}.
|
|
1855
2110
|
*/
|
|
1856
|
-
interface TextToColumnsOptions extends
|
|
2111
|
+
interface TextToColumnsOptions extends ICellRange.OperationOptions {
|
|
1857
2112
|
/**
|
|
1858
2113
|
* The character used to split the text.
|
|
1859
2114
|
*
|
|
@@ -1919,7 +2174,7 @@ export declare namespace ICellRange {
|
|
|
1919
2174
|
/**
|
|
1920
2175
|
* Options for {@link ICellRange.removeDuplicates}.
|
|
1921
2176
|
*/
|
|
1922
|
-
interface RemoveDuplicatesOptions extends
|
|
2177
|
+
interface RemoveDuplicatesOptions extends ICellRange.OperationOptions {
|
|
1923
2178
|
/**
|
|
1924
2179
|
* Indicates if the range has a header row.
|
|
1925
2180
|
*
|
|
@@ -2208,13 +2463,18 @@ export declare namespace ICellRange {
|
|
|
2208
2463
|
/** Direct fill. */
|
|
2209
2464
|
readonly Fill: "fill";
|
|
2210
2465
|
/** Direct borders. */
|
|
2211
|
-
readonly
|
|
2466
|
+
readonly Borders: "borders";
|
|
2212
2467
|
/** Direct number format. Region payloads carry the format string and its category. */
|
|
2213
2468
|
readonly NumberFormat: "numberFormat";
|
|
2214
2469
|
/** Direct alignment. */
|
|
2215
2470
|
readonly Alignment: "alignment";
|
|
2216
2471
|
/** Direct font. */
|
|
2217
2472
|
readonly Font: "font";
|
|
2473
|
+
/**
|
|
2474
|
+
* Direct cell protection format (`IStyle.getProtection()`): always unlocked, show formulas.
|
|
2475
|
+
* A cell with none of its own reads its named style's, then Normal's.
|
|
2476
|
+
*/
|
|
2477
|
+
readonly Protection: "protection";
|
|
2218
2478
|
/** Merged spans. */
|
|
2219
2479
|
readonly Merge: "merge";
|
|
2220
2480
|
/** Table membership. */
|
|
@@ -2225,7 +2485,10 @@ export declare namespace ICellRange {
|
|
|
2225
2485
|
readonly Hyperlink: "hyperlink";
|
|
2226
2486
|
/** Has comments. */
|
|
2227
2487
|
readonly Comments: "comments";
|
|
2228
|
-
/**
|
|
2488
|
+
/**
|
|
2489
|
+
* Unlocked cells — covered by an unlocked range, or with an always-unlocked style. *Can I write
|
|
2490
|
+
* here* is a precondition, not a detail.
|
|
2491
|
+
*/
|
|
2229
2492
|
readonly Unlock: "unlock";
|
|
2230
2493
|
/** Cells under conditional-format rules. */
|
|
2231
2494
|
readonly Conditionals: "conditionals";
|
|
@@ -2505,19 +2768,34 @@ export declare namespace ICellRange {
|
|
|
2505
2768
|
interface WatchCallback {
|
|
2506
2769
|
(values: IRange): void;
|
|
2507
2770
|
}
|
|
2771
|
+
/**
|
|
2772
|
+
* Options for {@link ICellRange.addWatch}.
|
|
2773
|
+
*/
|
|
2774
|
+
interface WatchOptions {
|
|
2775
|
+
/**
|
|
2776
|
+
* Evaluate each cell of the range as an array-entered formula whose extent is that one cell.
|
|
2777
|
+
*
|
|
2778
|
+
* @remarks
|
|
2779
|
+
* This is how a conditional-format or data-validation formula is evaluated. Nothing
|
|
2780
|
+
* implicitly intersects — a range reads as the whole array wherever it appears — and each
|
|
2781
|
+
* cell keeps the top-left value of its own result, the way an array-entered formula fits its
|
|
2782
|
+
* result to its extent. So `$J$1:$J$9="x"` answers `J1="x"` in every cell, while
|
|
2783
|
+
* `SUM(IF($J$1:$J$9="x",1,0))>1` still sums the whole array. A relative range moves with the
|
|
2784
|
+
* cell, so `$J1:$J9="x"` answers each row's own `J` cell.
|
|
2785
|
+
*
|
|
2786
|
+
* By default a cell whose result is an array spills, as a formula filled across the range
|
|
2787
|
+
* would.
|
|
2788
|
+
*
|
|
2789
|
+
* @defaultValue `false`
|
|
2790
|
+
*/
|
|
2791
|
+
arrayFirstCell?: boolean;
|
|
2792
|
+
}
|
|
2508
2793
|
/**
|
|
2509
2794
|
* Options to control which events trigger a listener. By default, all
|
|
2510
2795
|
* event types will trigger the listener. Setting any of these options to
|
|
2511
2796
|
* `true` will *prevent* the listener from being called for that event type.
|
|
2512
2797
|
*/
|
|
2513
2798
|
interface ListenerOptions {
|
|
2514
|
-
/**
|
|
2515
|
-
* The actual range can also change due to insert/removes or delete of a sheet.
|
|
2516
|
-
* Setting absoluteCoords to `true` will ignore shifts in the range.
|
|
2517
|
-
*
|
|
2518
|
-
* @defaultValue false
|
|
2519
|
-
*/
|
|
2520
|
-
ignoreShifts?: boolean;
|
|
2521
2799
|
/**
|
|
2522
2800
|
* If `true`, the listener will *not* be called when the range's
|
|
2523
2801
|
* address changes (due to row/column insert/delete, or moves)
|