@sheetxl/sdk 0.8.0-beta.1 → 0.8.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/browser/cjs/4f5eoQQfV-V7LO2_.cjs +1 -0
- package/browser/cjs/BEnEDC1m546-gzWS.cjs +1 -0
- package/browser/cjs/CwCUa4IzGNGissLL.cjs +1 -0
- package/browser/cjs/{a0Z-SXs_N71CtqYb.cjs → Dg3GaW0QWwnlqetX.cjs} +1 -1
- package/browser/cjs/KWQPie2u7AP69web.cjs +93 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{B0HS42a7lga1k1U_.mjs → BJ9hcZAGY8Tj5_9L.mjs} +1 -1
- package/browser/esm/C8vpA2ZBtZf6w4nq.mjs +394 -0
- package/browser/esm/DDojiE2-oycJ7qGi.mjs +20 -0
- package/browser/esm/DEPT7zmpiMdZ-_qC.mjs +70253 -0
- package/browser/esm/DOvCi3lf49To36WP.mjs +8 -0
- package/browser/esm/{uyWBMSIxMlt8n5Z3.mjs → Dq3sc4B_HQHBrT5N.mjs} +2 -2
- package/browser/esm/index.mjs +871 -696
- package/browser/esm/{DlPMeIyxT9tG_WDk.mjs → trwZArJQQq7K9kL7.mjs} +2 -2
- package/licenses/dependencies.txt +204 -204
- package/node/esm/CGWsQOMWdnDeF4dX.mjs +8 -0
- package/node/esm/{Cku7XiUvw1xrRasi.mjs → CL9MI-b6D9BmtVXW.mjs} +1 -1
- package/node/esm/CressiwiIhxCVp1v.mjs +28 -0
- package/node/esm/O2cOO3xIynWUgOWe.mjs +403 -0
- package/node/esm/index.mjs +52356 -37345
- package/package.json +6 -7
- package/resources/locales/de/model.msg.json +45 -9
- package/resources/locales/en/model.msg.json +42 -9
- package/types/scripting-api.json +7093 -0
- package/types/scripting-enums.json +54 -8
- package/types/scripting.d.ts +7006 -1202
- package/types/src/anchored/AbstractAnchored.d.ts +18 -8
- package/types/src/anchored/AnchoredMap.d.ts +2 -0
- package/types/src/anchored/IAnchoredMap.d.ts +52 -4
- package/types/src/autoFill/AutoFill.d.ts +316 -32
- package/types/src/autoFill/IAutoFill.d.ts +232 -15
- package/types/src/border/{IBorder.d.ts → IBorders.d.ts} +41 -40
- package/types/src/border/index.d.ts +1 -1
- package/types/src/calculation/Calculation.d.ts +740 -35
- package/types/src/calculation/ExternalBookBindings.d.ts +118 -0
- package/types/src/calculation/FormulaText.d.ts +74 -0
- package/types/src/calculation/ICalculation.d.ts +318 -81
- package/types/src/calculation/INamedFormulasCollection.d.ts +5 -8
- package/types/src/calculation/NamedFormulaCollection.d.ts +139 -107
- package/types/src/calculation/NamedLambdaFunction.d.ts +28 -0
- package/types/src/calculation/TokenType.d.ts +9 -0
- package/types/src/calculation/Types.d.ts +83 -2
- package/types/src/calculation/_CloneBoundary.d.ts +80 -0
- package/types/src/calculation/compiler/ASTTypes.d.ts +58 -0
- package/types/src/calculation/compiler/CompilerUtils.d.ts +134 -12
- package/types/src/calculation/compiler/FormulaCompiler.d.ts +29 -4
- package/types/src/calculation/compiler/FormulaParser.d.ts +1 -2
- package/types/src/calculation/compiler/LiteTransform.d.ts +17 -0
- package/types/src/calculation/compiler/ParserUtils.d.ts +26 -1
- package/types/src/calculation/compiler/SRParser.d.ts +2 -1
- package/types/src/calculation/compiler/Types.d.ts +79 -9
- package/types/src/calculation/executor/CalcExecutor.d.ts +312 -33
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +43 -2
- package/types/src/calculation/executor/CircularReference.d.ts +2 -0
- package/types/src/calculation/formula/Formula.d.ts +58 -21
- package/types/src/calculation/formula/FormulaBlock.d.ts +124 -21
- package/types/src/calculation/formula/FormulaRecordView.d.ts +79 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +261 -67
- package/types/src/calculation/formula/LambdaValue.d.ts +15 -16
- package/types/src/calculation/formula/LazyValue.d.ts +96 -0
- package/types/src/calculation/formula/TokenUtils.d.ts +25 -1
- package/types/src/calculation/formula/index.d.ts +1 -0
- package/types/src/calculation/functions/FunctionDeclarations.d.ts +31 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +15 -2
- package/types/src/calculation/grid/CalcGrid.d.ts +384 -158
- package/types/src/calculation/grid/CalcGridBackend.d.ts +450 -0
- package/types/src/calculation/grid/CalcGridProxy.d.ts +133 -0
- package/types/src/calculation/grid/CalcGridUtils.d.ts +62 -12
- package/types/src/calculation/grid/FormulaEntry.d.ts +129 -0
- package/types/src/calculation/grid/FormulaHost.d.ts +236 -0
- package/types/src/calculation/grid/ICalcGrid.d.ts +456 -143
- package/types/src/calculation/grid/_CalcRequest.d.ts +272 -0
- package/types/src/calculation/grid/index.d.ts +4 -0
- package/types/src/calculation/index.d.ts +2 -0
- package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +6 -2
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +339 -11
- package/types/src/calculation/spatial/SpillEntry.d.ts +20 -5
- package/types/src/calculation/spatial/TouchedWindows.d.ts +86 -0
- package/types/src/calculation/spatial/index.d.ts +1 -0
- package/types/src/calculation/state/CalcInputs.d.ts +41 -0
- package/types/src/calculation/state/CalcNode.d.ts +141 -30
- package/types/src/calculation/state/CalcScope.d.ts +37 -0
- package/types/src/calculation/state/CalcState.d.ts +22 -1
- package/types/src/calculation/state/CalculationContext.d.ts +36 -2
- package/types/src/calculation/state/IContextContainer.d.ts +129 -27
- package/types/src/calculation/state/_PendingOverlayGrid.d.ts +163 -0
- package/types/src/calculation/state/_ReadObservedGrid.d.ts +74 -8
- package/types/src/calculation/state/index.d.ts +1 -0
- package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +80 -0
- package/types/src/calculation/symbol/ISymbolRegistry.d.ts +23 -0
- package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts +16 -2
- package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +63 -3
- package/types/src/calculation/symbol/SymbolRegistry.d.ts +20 -0
- package/types/src/calculation/symbol/index.d.ts +3 -2
- package/types/src/cell/ICell.d.ts +78 -23
- package/types/src/cell/ICellProtection.d.ts +50 -10
- package/types/src/cellRange/ICellRange.d.ts +329 -72
- package/types/src/cellRange/ICellRanges.d.ts +9 -7
- package/types/src/chart/Chart.d.ts +72 -2
- package/types/src/chart/ChartCollection.d.ts +26 -0
- package/types/src/chart/IChart.d.ts +162 -9
- package/types/src/chart/IChartCollection.d.ts +25 -0
- package/types/src/chart/_ChartXml.d.ts +70 -0
- package/types/src/chart/index.d.ts +1 -3
- package/types/src/collections/ArraysGrid.d.ts +1 -1
- package/types/src/collections/IGrid.d.ts +1 -1
- package/types/src/collections/ISparseGrid.d.ts +9 -0
- package/types/src/collections/ISpatialMap.d.ts +59 -21
- package/types/src/collections/ImmutableList.d.ts +28 -0
- package/types/src/collections/MixedTypedArrayList.d.ts +168 -108
- package/types/src/collections/OverlappingRangeIterator.d.ts +13 -17
- package/types/src/collections/RepeatingList.d.ts +7 -0
- package/types/src/collections/ScalarGrid.d.ts +50 -0
- package/types/src/collections/SparseGrid.d.ts +1 -1
- package/types/src/collections/SpatialMap.d.ts +13 -21
- package/types/src/collections/Tuple.d.ts +128 -16
- package/types/src/collections/_GridUtils.d.ts +19 -6
- package/types/src/collections/_RangeSweep.d.ts +97 -0
- package/types/src/collections/_SpatialUtils.d.ts +20 -2
- package/types/src/collections/index.d.ts +1 -0
- package/types/src/comment/Comment.d.ts +159 -0
- package/types/src/comment/CommentCollection.d.ts +40 -0
- package/types/src/comment/IComment.d.ts +319 -48
- package/types/src/comment/ICommentCollection.d.ts +90 -0
- package/types/src/comment/_CommentUtils.d.ts +28 -0
- package/types/src/comment/index.d.ts +1 -0
- package/types/src/condition/AnchoredConditional.d.ts +76 -17
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +8 -7
- package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +2 -1
- package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +3 -6
- package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +1 -1
- package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +7 -0
- package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +9 -0
- package/types/src/condition/Condition.d.ts +16 -0
- package/types/src/condition/ICondition.d.ts +86 -33
- package/types/src/condition/_ConditionFormula.d.ts +152 -0
- package/types/src/condition/_ConditionUtils.d.ts +73 -10
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +21 -10
- package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +19 -8
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +5 -3
- package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +2 -0
- package/types/src/dataValidation/DataValidation.d.ts +50 -3
- package/types/src/dataValidation/DataValidationCollection.d.ts +20 -9
- package/types/src/dataValidation/IDataValidation.d.ts +119 -30
- package/types/src/dataValidation/IDataValidationCollection.d.ts +10 -2
- package/types/src/date/DateUtils.d.ts +20 -0
- package/types/src/date/_DateUtils.d.ts +91 -7
- package/types/src/externalBook/ExternalBookCollection.d.ts +145 -12
- package/types/src/externalBook/ExternalBookName.d.ts +96 -0
- package/types/src/externalBook/IExternalBook.d.ts +170 -18
- package/types/src/externalBook/IExternalBookCollection.d.ts +79 -7
- package/types/src/externalBook/index.d.ts +1 -0
- package/types/src/fill/IStroke.d.ts +1 -1
- package/types/src/filter/IFilter.d.ts +29 -4
- package/types/src/font/IFont.d.ts +17 -0
- package/types/src/history/IHistory.d.ts +3 -2
- package/types/src/i18n/LanguagePack.d.ts +12 -4
- package/types/src/index.d.ts +3 -0
- package/types/src/io/AbstractBackingStore.d.ts +24 -1
- package/types/src/io/ArrayBackingStore.d.ts +1 -1
- package/types/src/io/EmbeddedPart.d.ts +20 -0
- package/types/src/io/IEmbeddedPart.d.ts +63 -0
- package/types/src/io/IWorkbookIO.d.ts +185 -18
- package/types/src/io/WorkbookIO.d.ts +9 -0
- package/types/src/io/WorkbookOrigin.d.ts +20 -11
- package/types/src/io/WorkbookOriginProvider.d.ts +46 -0
- package/types/src/io/_XmlFragment.d.ts +49 -0
- package/types/src/io/index.d.ts +1 -0
- package/types/src/lib/file/file.browser.d.ts +19 -5
- package/types/src/lib/file/file.node.d.ts +5 -0
- package/types/src/lib/utils/_Utils.d.ts +11 -0
- package/types/src/lib/utils/utils.browser.d.ts +9 -3
- package/types/src/license/license-key.d.ts +27 -0
- package/types/src/listener/IListener.d.ts +12 -7
- package/types/src/listener/ListenerEmitter.d.ts +46 -5
- package/types/src/model/AbstractModel.d.ts +14 -5
- package/types/src/movable/Control.d.ts +57 -0
- package/types/src/movable/IControl.d.ts +84 -0
- package/types/src/movable/IMovable.d.ts +23 -1
- package/types/src/movable/IMovableCollection.d.ts +2 -0
- package/types/src/movable/Movable.d.ts +4 -6
- package/types/src/movable/MovableCollection.d.ts +7 -7
- package/types/src/movable/index.d.ts +4 -0
- package/types/src/named/AbstractNamed.d.ts +1 -1
- package/types/src/named/INamed.d.ts +4 -1
- package/types/src/named/INamedCollection.d.ts +26 -0
- package/types/src/named/NamedCollection.d.ts +16 -15
- package/types/src/numFmt/BuiltInFormats.d.ts +15 -7
- package/types/src/numFmt/IFormatEngine.d.ts +2 -0
- package/types/src/numFmt/NumfmtFormatEngine.d.ts +2 -0
- package/types/src/person/IPerson.d.ts +99 -0
- package/types/src/person/IPersonCollection.d.ts +51 -0
- package/types/src/person/Person.d.ts +32 -0
- package/types/src/person/PersonCollection.d.ts +49 -0
- package/types/src/person/index.d.ts +3 -0
- package/types/src/picture/IPicture.d.ts +2 -0
- package/types/src/picture/Picture.d.ts +2 -0
- package/types/src/pivot/IPivotTable.d.ts +107 -0
- package/types/src/pivot/IPivotTableCollection.d.ts +25 -0
- package/types/src/pivot/PivotTable.d.ts +57 -0
- package/types/src/pivot/PivotTableCollection.d.ts +25 -0
- package/types/src/pivot/index.d.ts +6 -0
- package/types/src/primitives/CompositeRangeStats.d.ts +2 -0
- package/types/src/primitives/Criteria.d.ts +1 -1
- package/types/src/primitives/LambdaBrand.d.ts +21 -0
- package/types/src/primitives/PrimitiveUtils.d.ts +56 -19
- package/types/src/primitives/Range.d.ts +102 -24
- package/types/src/primitives/RangeStats.d.ts +24 -1
- package/types/src/primitives/ReferenceRange.d.ts +42 -0
- package/types/src/primitives/Runtime.d.ts +15 -2
- package/types/src/primitives/stats/FrequencyStats.d.ts +9 -0
- package/types/src/primitives/stats/LookupIndex.d.ts +46 -0
- package/types/src/primitives/stats/SortedNumbers.d.ts +2 -0
- package/types/src/primitives/stats/index.d.ts +1 -0
- package/types/src/print/IPrint.d.ts +0 -22
- package/types/src/protectedRange/IProtectedRange.d.ts +4 -0
- package/types/src/protectedRange/IProtectedRangeCollection.d.ts +2 -0
- package/types/src/protectedRange/ProtectedRange.d.ts +1 -4
- package/types/src/protectedRange/ProtectedRangeCollection.d.ts +19 -8
- package/types/src/protection/DefaultProtection.d.ts +12 -1
- package/types/src/protection/IProtection.d.ts +36 -2
- package/types/src/reference/ReferenceUtils.d.ts +80 -0
- package/types/src/reference/index.d.ts +2 -0
- package/types/src/resource/IResource.d.ts +21 -1
- package/types/src/resource/IResourceCollection.d.ts +9 -1
- package/types/src/resource/ResourceCollection.d.ts +6 -6
- package/types/src/scripting/FunctionCollection.d.ts +41 -11
- package/types/src/scripting/IFunctionCollection.d.ts +41 -0
- package/types/src/scripting/IModule.d.ts +25 -0
- package/types/src/scripting/IModuleCollection.d.ts +17 -0
- package/types/src/scripting/IScript.d.ts +18 -0
- package/types/src/scripting/Module.d.ts +34 -6
- package/types/src/scripting/ModuleCollection.d.ts +17 -12
- package/types/src/scripting/Runtime.d.ts +15 -0
- package/types/src/scripting/Scripts.d.ts +2 -0
- package/types/src/scripting/TypedFunction.d.ts +151 -18
- package/types/src/scripting/_FunctionIndex.d.ts +5 -0
- package/types/src/scripting/_ModuleUtils.d.ts +11 -1
- package/types/src/scripting/_ScriptUtils.d.ts +3 -0
- package/types/src/scripting/declarations.browser.d.ts +10 -0
- package/types/src/scripting/declarations.d.ts +49 -0
- package/types/src/scripting/declarations.node.d.ts +9 -0
- package/types/src/scripting/index.d.ts +3 -0
- package/types/src/selection/IRangeSelection.d.ts +9 -4
- package/types/src/selection/RangeSelection.d.ts +2 -0
- package/types/src/shape/IShape.d.ts +41 -3
- package/types/src/shape/Shape.d.ts +10 -0
- package/types/src/shape/_ShapeXml.d.ts +28 -0
- package/types/src/sheet/CellRegion.d.ts +6 -0
- package/types/src/sheet/ICellContainerOptions.d.ts +50 -0
- package/types/src/sheet/ISheet.d.ts +224 -41
- package/types/src/sheet/ISheetCollection.d.ts +2 -5
- package/types/src/sheet/NamedCellRange.d.ts +16 -7
- package/types/src/sheet/Sheet.d.ts +749 -114
- package/types/src/sheet/SheetCell.d.ts +81 -21
- package/types/src/sheet/SheetCollection.d.ts +19 -8
- package/types/src/sheet/SheetRange.d.ts +62 -14
- package/types/src/sheet/SheetRanges.d.ts +4 -6
- package/types/src/sheet/_CellBuffer.d.ts +214 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +5 -5
- package/types/src/sheet/_ListenerAnchor.d.ts +104 -0
- package/types/src/sheet/_RangeStateSweep.d.ts +16 -0
- package/types/src/sheet/_ScalarListFactory.d.ts +61 -0
- package/types/src/sheet/_SheetAutoFillUtils.d.ts +74 -0
- package/types/src/sheet/_SheetAutoFitUtils.d.ts +2 -2
- package/types/src/sheet/_SheetEvents.d.ts +43 -0
- package/types/src/sheet/_SheetFilterUtils.d.ts +32 -1
- package/types/src/sheet/_SheetIntents.d.ts +250 -0
- package/types/src/sheet/_SheetMutations.d.ts +179 -59
- package/types/src/sheet/_SheetStateReader.d.ts +16 -10
- package/types/src/sheet/_SheetStateTypes.d.ts +57 -73
- package/types/src/sheet/_SheetUtils.d.ts +2 -18
- package/types/src/sheet/_WatchAnchor.d.ts +93 -0
- package/types/src/sheet/spatial/HeldFormulaEntry.d.ts +36 -0
- package/types/src/sheet/spatial/index.d.ts +1 -0
- package/types/src/sheet/style/SheetCellStyle.d.ts +91 -64
- package/types/src/sheet/style/SheetDirectStyle.d.ts +16 -5
- package/types/src/sheet/style/_Resolvers.d.ts +5 -3
- package/types/src/sheet/style/_StyleUtils.d.ts +37 -7
- package/types/src/sheetHeader/ISheetHeader.d.ts +2 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +14 -0
- package/types/src/sheetProtection/ISheetProtection.d.ts +41 -7
- package/types/src/sheetProtection/SheetProtection.d.ts +12 -0
- package/types/src/sheetView/ISheetView.d.ts +45 -1
- package/types/src/sheetView/SheetView.d.ts +11 -0
- package/types/src/slicer/ISlicer.d.ts +2 -0
- package/types/src/slicer/Slicer.d.ts +2 -0
- package/types/src/sort/ISort.d.ts +2 -0
- package/types/src/string/IStringCollection.d.ts +5 -0
- package/types/src/string/StringCollection.d.ts +6 -6
- package/types/src/style/INamedStyleCollection.d.ts +72 -0
- package/types/src/style/IStyle.d.ts +30 -10
- package/types/src/style/IStyleCollection.d.ts +63 -42
- package/types/src/style/ITableStyleCollection.d.ts +89 -0
- package/types/src/style/NamedStyleCollection.d.ts +39 -0
- package/types/src/style/StyleCollection.d.ts +41 -5
- package/types/src/style/TableStyleCollection.d.ts +49 -0
- package/types/src/style/_BuiltInStyleDefs.d.ts +3 -3
- package/types/src/style/index.d.ts +4 -0
- package/types/src/table/AnchoredTable.d.ts +644 -68
- package/types/src/table/AutoTable.d.ts +5 -5
- package/types/src/table/ITable.d.ts +228 -30
- package/types/src/table/ITableCollection.d.ts +2 -0
- package/types/src/table/TableCollection.d.ts +19 -8
- package/types/src/table/_FilterField.d.ts +7 -5
- package/types/src/table/_NamedTable.d.ts +17 -1
- package/types/src/table/_NamedTableSource.d.ts +1 -0
- package/types/src/table/_SortField.d.ts +2 -0
- package/types/src/table/_TableColumn.d.ts +13 -2
- package/types/src/table/_TableMessages.d.ts +1 -0
- package/types/src/table/_TableUtils.d.ts +40 -0
- package/types/src/text/Bullet.d.ts +4 -0
- package/types/src/text/ITextFrame.d.ts +25 -1
- package/types/src/text/TextBoxAlignment.d.ts +15 -6
- package/types/src/text/TextFrame.d.ts +4 -0
- package/types/src/text/TextLine.d.ts +4 -0
- package/types/src/text/TextParagraph.d.ts +4 -0
- package/types/src/text/TextRun.d.ts +9 -0
- package/types/src/text/TextStacked.d.ts +83 -0
- package/types/src/text/index.d.ts +1 -0
- package/types/src/theme/ITheme.d.ts +2 -0
- package/types/src/theme/IThemeCollection.d.ts +2 -0
- package/types/src/theme/ThemeCollection.d.ts +8 -7
- package/types/src/transaction/ITransaction.d.ts +238 -36
- package/types/src/transaction/Transaction.d.ts +99 -11
- package/types/src/type/AbstractCollection.d.ts +101 -0
- package/types/src/type/ICollection.d.ts +117 -0
- package/types/src/type/ITypes.d.ts +9 -7
- package/types/src/type/index.d.ts +1 -0
- package/types/src/utils/_CSSUtils.d.ts +3 -3
- package/types/src/workbook/IWorkbook.d.ts +171 -40
- package/types/src/workbook/Workbook.d.ts +103 -7
- package/types/src/workbook/_WorkbookIntents.d.ts +36 -0
- package/types/src/workbookProtection/IWorkbookProtection.d.ts +7 -0
- package/types/src/workbookProtection/WorkbookProtection.d.ts +3 -0
- package/types/src/workbookView/IWorkbookView.d.ts +12 -0
- package/types/src/workbookView/WorkbookView.d.ts +5 -0
- package/browser/cjs/BatsV2UUraVDCRXm.cjs +0 -57
- package/browser/cjs/CUz53T65cRGQRgvv.cjs +0 -33
- package/browser/cjs/DU0kYUtdFa3jK-im.cjs +0 -1
- package/browser/cjs/Dv4yIPLV98M5zLHa.cjs +0 -1
- package/browser/esm/6JKSOvc5czaQB2Bj.mjs +0 -109
- package/browser/esm/BtuJ9AGzeURtAsGo.mjs +0 -51241
- package/browser/esm/DGU6sM25u0EWCKl1.mjs +0 -824
- package/browser/esm/f2G3QRgEbvFJcoa2.mjs +0 -4436
- package/node/esm/-pxdn3M3tc6PLHs7.mjs +0 -114
- package/node/esm/0n5bslM9jhO1JnI2.mjs +0 -843
- package/types/src/cellRange/_GraphNode.d.ts +0 -38
- package/types/src/dataValidation/_Utils.d.ts +0 -10
- package/types/src/sheet/listener/RangesListener.d.ts +0 -32
- package/types/src/sheet/listener/RangesListenerEntry.d.ts +0 -19
- package/types/src/sheet/listener/index.d.ts +0 -3
|
@@ -11,7 +11,9 @@ import { AbstractBackingStore } from '../../io/AbstractBackingStore';
|
|
|
11
11
|
* per-instance cache **keyed by the origin**, so a save to a bound origin can re-write silently.
|
|
12
12
|
* This is an invisible optimization — a handle cannot be recreated from a string path, so holding
|
|
13
13
|
* the object is the only way to re-save in place. Nothing about it is surfaced through any public
|
|
14
|
-
* type; the origin's `canWrite()` reflects whether a handle is held
|
|
14
|
+
* type; the origin's `canWrite()` reflects whether a handle is held — decided when the source is
|
|
15
|
+
* acquired, since holding the handle is the whole question. Write *permission* is a separate
|
|
16
|
+
* matter the platform only answers by prompting, which happens at save time.
|
|
15
17
|
*/
|
|
16
18
|
export declare class BrowserBackingStore extends AbstractBackingStore {
|
|
17
19
|
private _getWriteFormats;
|
|
@@ -19,14 +21,26 @@ export declare class BrowserBackingStore extends AbstractBackingStore {
|
|
|
19
21
|
protected _defaultStringSourceType: "fetch";
|
|
20
22
|
/** Writable FSA handles keyed by the Origin they back. */
|
|
21
23
|
private _handleCache;
|
|
22
|
-
private _pendingOpenHandle;
|
|
23
24
|
constructor(_getWriteFormats: () => Promise<IWorkbookIO.FormatType[]>, _getReadFormats?: (() => Promise<IWorkbookIO.FormatType[]>) | undefined);
|
|
24
|
-
/**
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* A File System Access handle (from an open picker, or a drop via `getAsFileSystemHandle`) can be
|
|
27
|
+
* written back to, so it reads as a writable source.
|
|
28
|
+
*/
|
|
29
|
+
protected fileFromHandle(source: any): Promise<File | null>;
|
|
26
30
|
/** @inheritdoc */
|
|
27
31
|
protected resolveSource(): Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* Browser sources have no real path — a picked file is identified by its handle — so a file is
|
|
34
|
+
* open when a handle held for an open workbook's origin is the same entry.
|
|
35
|
+
*/
|
|
36
|
+
protected findOpenOrigin(acquired: any): Promise<IWorkbookIO.Origin | null>;
|
|
37
|
+
/**
|
|
38
|
+
* The origin of an open workbook, other than `except`, that saves back through a handle to the
|
|
39
|
+
* same file as `handle`, or `null`.
|
|
40
|
+
*/
|
|
41
|
+
private _findOpenHandle;
|
|
28
42
|
/** @inheritdoc */
|
|
29
|
-
protected onWorkbookRead(workbook: IWorkbook): Promise<void>;
|
|
43
|
+
protected onWorkbookRead(workbook: IWorkbook, source: any): Promise<void>;
|
|
30
44
|
/** @inheritdoc */
|
|
31
45
|
protected filePathToFile(filePath: string): Promise<File>;
|
|
32
46
|
/** @inheritdoc IWorkbookIO.IBackingStore.write */
|
|
@@ -12,6 +12,11 @@ export declare class FSBackingStore extends AbstractBackingStore {
|
|
|
12
12
|
protected filePathToFile(filePath: string): Promise<File>;
|
|
13
13
|
/** @inheritdoc */
|
|
14
14
|
protected _canWriteLocalPath(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Both paths are already resolved to absolute ones (reads and writes resolve them); Windows file
|
|
17
|
+
* names are case-insensitive and take either slash.
|
|
18
|
+
*/
|
|
19
|
+
protected isSamePath(a: string, b: string): boolean;
|
|
15
20
|
/** @inheritdoc IWorkbookIO.IBackingStore.write */
|
|
16
21
|
write(request: IWorkbookIO.WriteRequest): Promise<IWorkbookIO.Origin | null>;
|
|
17
22
|
}
|
|
@@ -12,6 +12,7 @@ export interface NodeFingerprint {
|
|
|
12
12
|
export interface HostDetails {
|
|
13
13
|
cpus?: number;
|
|
14
14
|
memoryGB?: number;
|
|
15
|
+
protocol?: string | null;
|
|
15
16
|
domain?: string | null;
|
|
16
17
|
fingerprint?: NodeFingerprint;
|
|
17
18
|
}
|
|
@@ -23,5 +24,15 @@ export interface HostDetails {
|
|
|
23
24
|
*/
|
|
24
25
|
export declare function isPlaceholderLicenseKey(key: string | null | undefined): boolean;
|
|
25
26
|
export declare function getBuildVersion(): string;
|
|
27
|
+
/** When this build was made, as an ISO 8601 instant, or `''` when unstamped. */
|
|
26
28
|
export declare function getBuildDate(): string;
|
|
29
|
+
/**
|
|
30
|
+
* The build as a person reads it: the stamped version, or `local` plus the local build time.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* A stamped version already names its commit, so the time adds nothing to it. A workspace build
|
|
34
|
+
* has no identity except when it was built, and to the minute, because several rebuilds a day
|
|
35
|
+
* all look alike at date resolution.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getBuildLabel(): string;
|
|
27
38
|
//# sourceMappingURL=_Utils.d.ts.map
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { HostDetails } from './_Utils';
|
|
2
2
|
import { LicenseDetails } from '../../license';
|
|
3
|
+
/**
|
|
4
|
+
* What the license check sees of the page: the scheme it is served over (no colon) and its hostname.
|
|
5
|
+
* `domain` is `null` for the one dev case — loopback over http(s). The scheme is part of that test on
|
|
6
|
+
* purpose: `tauri://localhost` / `capacitor://localhost` are shipped apps that happen to use a loopback
|
|
7
|
+
* host, and are checked like production. Outside a window (a worker, node under test) both are `null`.
|
|
8
|
+
*/
|
|
3
9
|
export declare function getHostDetails(): Promise<HostDetails>;
|
|
4
10
|
/**
|
|
5
|
-
* Only the loopback host is a dev environment. A dev *build* served on any other host
|
|
6
|
-
* a tunnel) is checked exactly like production: license
|
|
7
|
-
* the watermark.
|
|
11
|
+
* Only the loopback host over http(s) is a dev environment. A dev *build* served on any other host
|
|
12
|
+
* (a LAN IP, a tunnel) — or under any other scheme — is checked exactly like production: license
|
|
13
|
+
* origins apply and an evaluation shows the watermark.
|
|
8
14
|
*/
|
|
9
15
|
export declare function isDevEnv(): Promise<boolean>;
|
|
10
16
|
/**
|
|
@@ -19,6 +19,7 @@ export interface LicenseKeyDetails {
|
|
|
19
19
|
type?: string;
|
|
20
20
|
expiration?: string | null;
|
|
21
21
|
developerCount?: number;
|
|
22
|
+
/** Licensed origins, `<protocol>://<host>` each (see `Origin`); a string is comma-separated. */
|
|
22
23
|
domains?: string | string[];
|
|
23
24
|
fingerprint?: string | null;
|
|
24
25
|
cpuCount?: number | null;
|
|
@@ -29,5 +30,31 @@ export declare function rot(text: string, key: number, n?: number): string;
|
|
|
29
30
|
export declare function deobs(str: string): Decoded;
|
|
30
31
|
export declare function encodeLicenseKey(keyDetails: LicenseKeyDetails): LicenseAndKey;
|
|
31
32
|
export declare function validateDomain(domain: string, allowDomain?: boolean): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* A licensed origin, `<protocol>://<host>`.
|
|
35
|
+
*
|
|
36
|
+
* The protocol is the scheme the page is served over — `https` on the web, `vscode-webview` in VS Code
|
|
37
|
+
* desktop, an app's own registered scheme in Electron — and is mandatory: a browser license names
|
|
38
|
+
* the runtime it was sold for, not just a hostname. The host is a domain (matched exactly or as a
|
|
39
|
+
* suffix — `acme.com` covers `app.acme.com`), `*` for any host (runtimes whose host is random, like
|
|
40
|
+
* VS Code's `v--<hash>`), or empty for schemes that carry no host (`file://`).
|
|
41
|
+
*/
|
|
42
|
+
export interface Origin {
|
|
43
|
+
protocol: string;
|
|
44
|
+
host: string;
|
|
45
|
+
}
|
|
46
|
+
/** Splits `<protocol>://<host>`; `null` when the entry has no protocol or a malformed one. */
|
|
47
|
+
export declare function parseOrigin(entry: string): Origin | null;
|
|
48
|
+
/**
|
|
49
|
+
* `true` when `entry` is a well-formed origin. Web hosts (`http`/`https`) must be a subdomain, or an
|
|
50
|
+
* apex when the license carries the `domain` feature (`allowDomain`) — the same rule `validateDomain`
|
|
51
|
+
* applies; any other scheme accepts a DNS-shaped host, `*`, or none.
|
|
52
|
+
*/
|
|
53
|
+
export declare function validateOrigin(entry: string, allowDomain?: boolean): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* `true` when the running page — `protocol` without its colon and `hostname`, as `location` reports
|
|
56
|
+
* them — is covered by `entry`. An entry with no protocol covers nothing.
|
|
57
|
+
*/
|
|
58
|
+
export declare function originMatches(entry: string, protocol: string, hostname: string): boolean;
|
|
32
59
|
export declare function validateFingerprint(fingerprint: string | null): boolean;
|
|
33
60
|
//# sourceMappingURL=license-key.d.ts.map
|
|
@@ -25,19 +25,24 @@ export declare namespace IListener {
|
|
|
25
25
|
*/
|
|
26
26
|
once?: boolean;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Whether the listener takes part in the operation that notifies it.
|
|
29
29
|
*
|
|
30
|
-
* @defaultValue
|
|
30
|
+
* @defaultValue `true` when the listener is added during an operation - a listener added as a
|
|
31
|
+
* consequence of one is part of it - and `false` otherwise.
|
|
31
32
|
*
|
|
32
33
|
* @remarks
|
|
33
|
-
* There are subtle differences between a transactional listener and a non-transactional listener.
|
|
34
|
-
*
|
|
35
34
|
* A transactional listener:
|
|
36
|
-
* *
|
|
37
|
-
*
|
|
35
|
+
* * is told inline, inside the operation, so anything it writes joins that same commit, and
|
|
36
|
+
* is told during an undo or a redo for the same reason;
|
|
37
|
+
* * hears nothing announced outside an operation;
|
|
38
|
+
* * is part of the document: the operation that added it removes it on undo and puts it back
|
|
39
|
+
* on redo.
|
|
38
40
|
*
|
|
39
41
|
* A non-transactional listener:
|
|
40
|
-
|
|
42
|
+
* * is told once per operation, after it has landed, however many times the operation
|
|
43
|
+
* notified, and not at all if the operation is rolled back;
|
|
44
|
+
* * is told at once when there is no operation, and at once during an undo or a redo;
|
|
45
|
+
* * survives an undo, since it is not part of the document.
|
|
41
46
|
*/
|
|
42
47
|
transactional?: boolean;
|
|
43
48
|
}
|
|
@@ -3,16 +3,34 @@ import { IListener } from './IListener';
|
|
|
3
3
|
export interface NotifyOptions<T = any> {
|
|
4
4
|
params?: T | null;
|
|
5
5
|
source?: any;
|
|
6
|
+
/**
|
|
7
|
+
* Collect what the listeners return. A notify that collects is a request, not an
|
|
8
|
+
* announcement, and is delivered at once wherever it is made.
|
|
9
|
+
*/
|
|
6
10
|
async?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Deliver as if made inside (`true`) or outside (`false`) an operation, whatever the store
|
|
13
|
+
* says. `false` is for a signal that is not a change to the document (a dirty flag).
|
|
14
|
+
*/
|
|
7
15
|
transactional?: boolean;
|
|
8
16
|
}
|
|
9
17
|
/**
|
|
10
|
-
* Manages
|
|
18
|
+
* Manages listeners.
|
|
11
19
|
*
|
|
12
20
|
* @remarks
|
|
13
|
-
*
|
|
21
|
+
* `transactional` ({@link IListener.Options}) says whether a listener takes part in the operation
|
|
22
|
+
* that notifies it. Unless the caller says, it is inferred from where the listener was added: one
|
|
23
|
+
* added as a consequence of an operation is part of it.
|
|
14
24
|
*
|
|
15
|
-
* *
|
|
25
|
+
* * A transactional listener is told inline, inside the operation, so what it writes joins that
|
|
26
|
+
* commit; it is told during a restore's dispatch for the same reason. It is versioned with the
|
|
27
|
+
* document - an undo removes the subscription, a redo restores it - and, being part of an
|
|
28
|
+
* operation, it hears nothing announced outside one.
|
|
29
|
+
* * A non-transactional listener is told ONCE, after the operation has landed, with everything
|
|
30
|
+
* the operation announced conflated by callback; a rollback drops it. Outside an operation, and
|
|
31
|
+
* during a restore, it is told at once - a restore has no commit to wait for.
|
|
32
|
+
* * A request (`async`) is delivered at once wherever it is made and returns what the listeners
|
|
33
|
+
* answered. A question is not an announcement, and deferring one would break every `await`.
|
|
16
34
|
*/
|
|
17
35
|
export declare class ListenerEmitter<SOURCE, EVENTS> {
|
|
18
36
|
protected _transactions: ITransaction.IStore;
|
|
@@ -22,10 +40,32 @@ export declare class ListenerEmitter<SOURCE, EVENTS> {
|
|
|
22
40
|
protected _src: SOURCE;
|
|
23
41
|
protected _listeners: EntrySet<SOURCE, EVENTS>;
|
|
24
42
|
protected _pending: Pending<any, SOURCE>[] | null;
|
|
43
|
+
protected _landing: Pending<any, SOURCE>[] | null;
|
|
25
44
|
constructor(src: SOURCE, transactions?: ITransaction.IStore);
|
|
45
|
+
/** DEBUG (temporary): names this emitter in the `__SXL_LOG_EVENTS` trace. Remove with it. */
|
|
46
|
+
protected _label(): string;
|
|
47
|
+
/**
|
|
48
|
+
* `true` while the store is mid-operation: a transaction is open, or a restore is being
|
|
49
|
+
* dispatched. What a listener added now is a consequence of, and what a notify made now belongs
|
|
50
|
+
* to.
|
|
51
|
+
*/
|
|
52
|
+
protected _inOperation(): boolean;
|
|
26
53
|
/** {@inheritDoc IListener.ISource.addListeners} */
|
|
27
54
|
addListeners(listeners: IListener.Callbacks<SOURCE, EVENTS>, options?: IListener.Options): IListener.Remove;
|
|
55
|
+
/**
|
|
56
|
+
* Write the transactional listener set, copy-on-write, as a fold rather than a step.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* The set is document state, so a subscription made by an operation is removed by undoing it
|
|
60
|
+
* and put back by redoing it. A fold rather than a commit because a registration is not a step
|
|
61
|
+
* in the history: it adds no undo entry and announces nothing. Inside an open operation the
|
|
62
|
+
* flag is a no-op on the nested commit and the write simply joins that operation, which is
|
|
63
|
+
* where a listener added as a consequence of it belongs.
|
|
64
|
+
*/
|
|
65
|
+
protected _updateEntries(mutate: (entries: EntrySet<SOURCE, EVENTS>) => void): void;
|
|
28
66
|
protected _doNotify<T = unknown>(listeners: IListener.Callback<SOURCE>[], removes?: IListener.Remove[] | null, options?: NotifyOptions<T>, fired?: Set<IListener.Callback<SOURCE>>): Promise<any>;
|
|
67
|
+
/** The callbacks for `key` in a bucket, gathered first so a removal during delivery is safe. */
|
|
68
|
+
protected _collect(entries: EntrySet<SOURCE, EVENTS> | undefined, key: keyof EVENTS): Collected<SOURCE> | null;
|
|
29
69
|
/**
|
|
30
70
|
* Notify listeners.
|
|
31
71
|
*/
|
|
@@ -37,10 +77,11 @@ interface Entry<SOURCE, EVENTS> {
|
|
|
37
77
|
listeners: IListener.Callbacks<SOURCE, EVENTS>;
|
|
38
78
|
}
|
|
39
79
|
type EntrySet<SOURCE = any, EVENTS = any> = Set<Entry<SOURCE, EVENTS>>;
|
|
40
|
-
interface
|
|
41
|
-
commitId: string;
|
|
80
|
+
interface Collected<SOURCE> {
|
|
42
81
|
listeners: IListener.Callback<SOURCE>[];
|
|
43
82
|
removes: IListener.Remove[] | null;
|
|
83
|
+
}
|
|
84
|
+
interface Pending<T, SOURCE> extends Collected<SOURCE> {
|
|
44
85
|
options?: NotifyOptions<T>;
|
|
45
86
|
}
|
|
46
87
|
export {};
|
|
@@ -5,7 +5,7 @@ import { ListenerEmitter } from '../listener/ListenerEmitter';
|
|
|
5
5
|
/**
|
|
6
6
|
* Abstract implement of `IModel`.
|
|
7
7
|
*/
|
|
8
|
-
export declare abstract class AbstractModel<STATE extends AbstractModel.State = AbstractModel.State, JSON extends any = any,
|
|
8
|
+
export declare abstract class AbstractModel<STATE extends AbstractModel.State = AbstractModel.State, JSON extends any = any, EVENTS extends IModel.Events = IModel.Events> implements IModel {
|
|
9
9
|
protected _emitter: ListenerEmitter<AbstractModel, EVENTS>;
|
|
10
10
|
protected _options: IModel.ConstructorOptions<JSON>;
|
|
11
11
|
protected _transactions: ITransaction.IStore;
|
|
@@ -38,16 +38,27 @@ export declare abstract class AbstractModel<STATE extends AbstractModel.State =
|
|
|
38
38
|
/** @internal */
|
|
39
39
|
protected _getTransactions(): ITransaction.IStore;
|
|
40
40
|
/** @internal */
|
|
41
|
+
/** Write the state as a step in the history. */
|
|
41
42
|
protected _updateState(updateState?: Partial<STATE>, //(prevState: STATE) => STATE,
|
|
42
43
|
options?: ITransaction.StoreOperationOptions, events?: (keyof EVENTS)[]): this;
|
|
44
|
+
/**
|
|
45
|
+
* Write the state as a fold into the commit it starts from, rather than as a step.
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* For a write that is not an edit - this model's own initialization, or bookkeeping derived
|
|
49
|
+
* from a change that already has a commit. It adds no undo entry and is undone with the commit
|
|
50
|
+
* it lands in. See {@link ITransaction.amend}.
|
|
51
|
+
*/
|
|
52
|
+
protected _amendState(updateState?: Partial<STATE>, options?: ITransaction.StoreOperationOptions, events?: (keyof EVENTS)[]): this;
|
|
53
|
+
private _writeState;
|
|
43
54
|
/** @internal */
|
|
44
55
|
protected _getEmitter<SOURCE, E extends EVENTS>(): ListenerEmitter<SOURCE, E>;
|
|
45
56
|
/** @internal */
|
|
46
57
|
protected _processInit(): void;
|
|
47
58
|
/** @internal */
|
|
48
|
-
protected _processAfterStateChange(_state: STATE,
|
|
59
|
+
protected _processAfterStateChange(_state: STATE, _commit: ITransaction.ICommit): void;
|
|
49
60
|
/** @internal */
|
|
50
|
-
protected _processRestoreOrRevert(_state: STATE,
|
|
61
|
+
protected _processRestoreOrRevert(_state: STATE, _commit: ITransaction.ICommit): void;
|
|
51
62
|
delete(options?: ITransaction.OperationOptions): void;
|
|
52
63
|
/** @internal */
|
|
53
64
|
protected _delete(options?: ITransaction.OperationOptions): void;
|
|
@@ -84,7 +95,5 @@ export declare namespace AbstractModel {
|
|
|
84
95
|
interface State extends ITransaction.StateRecord {
|
|
85
96
|
isDeleted: boolean;
|
|
86
97
|
}
|
|
87
|
-
interface CommitView {
|
|
88
|
-
}
|
|
89
98
|
}
|
|
90
99
|
//# sourceMappingURL=AbstractModel.d.ts.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { IResource, IResourceCollection } from '../resource';
|
|
2
|
+
import { IModel, AbstractModel } from '../model';
|
|
3
|
+
import { IEmbeddedPart } from '../io';
|
|
4
|
+
import { IControl } from './IControl';
|
|
5
|
+
interface State extends AbstractModel.State {
|
|
6
|
+
data?: IControl.JSON;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Implementation for {@link IControl}.
|
|
10
|
+
*/
|
|
11
|
+
export declare class Control extends AbstractModel<State, IControl.JSON> implements IControl {
|
|
12
|
+
/**
|
|
13
|
+
* The part describing the control. Held beside {@link State.data} rather than in it because the
|
|
14
|
+
* resources it may carry are model references, not JSON, and have to be re-persisted per save.
|
|
15
|
+
*/
|
|
16
|
+
protected _part: IEmbeddedPart | null;
|
|
17
|
+
constructor(options: Control.ConstructorOptions);
|
|
18
|
+
/** {@inheritDoc IModel.getType} */
|
|
19
|
+
getType(): string;
|
|
20
|
+
/** {@inheritDoc IControl.getShapeId} */
|
|
21
|
+
getShapeId(): number | null;
|
|
22
|
+
/** {@inheritDoc IControl.getXML} */
|
|
23
|
+
getXML(): string | null;
|
|
24
|
+
/** {@inheritDoc Movable.Content.getDescription} */
|
|
25
|
+
getDescription(): string;
|
|
26
|
+
/** {@inheritDoc Movable.Content.toJSON} */
|
|
27
|
+
toJSON(toResourceId?: (resource: IResource) => number | null): IControl.JSON | null;
|
|
28
|
+
/** {@inheritDoc Movable.Content.getTypeDescription} */
|
|
29
|
+
getTypeDescription(): string;
|
|
30
|
+
/** {@inheritDoc IControl.isIControl} */
|
|
31
|
+
get isIControl(): true;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Interfaces for creating `Control` items.
|
|
35
|
+
*
|
|
36
|
+
* @see
|
|
37
|
+
* ### **Interface**
|
|
38
|
+
*
|
|
39
|
+
* {@link Control}
|
|
40
|
+
*/
|
|
41
|
+
export declare namespace Control {
|
|
42
|
+
/**
|
|
43
|
+
* Options for creating a Control.
|
|
44
|
+
*/
|
|
45
|
+
interface ConstructorOptions extends IModel.ConstructorOptions<IControl.JSON> {
|
|
46
|
+
/**
|
|
47
|
+
* Returns an IResource from the resourceId or null if not found.
|
|
48
|
+
*/
|
|
49
|
+
fromResourceId?: (resourceId: number) => IResource;
|
|
50
|
+
/**
|
|
51
|
+
* Useful for load/save/copying.
|
|
52
|
+
*/
|
|
53
|
+
beginPersistResource: () => IResourceCollection.IPersistScope<IResource.JSON>;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=Control.d.ts.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { IListener } from '../listener';
|
|
2
|
+
import { IResource } from '../resource';
|
|
3
|
+
import { IModel } from '../model';
|
|
4
|
+
import { IEmbeddedPart } from '../io';
|
|
5
|
+
/**
|
|
6
|
+
* Interface for working with form controls — a button, a checkbox, a scrollbar placed on a sheet.
|
|
7
|
+
*
|
|
8
|
+
* **PLACEHOLDER** - This is under development and not made public yet.
|
|
9
|
+
*/
|
|
10
|
+
export interface IControl extends IModel {
|
|
11
|
+
/**
|
|
12
|
+
* Returns a description for assistive technologies.
|
|
13
|
+
*/
|
|
14
|
+
getDescription(): string;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the id of the shape that draws this control, or `null` if it has none.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* The shape lives in the sheet's legacy drawing, which is still opaque markup — this is the only
|
|
20
|
+
* link between the two, and it is what lets the shape be kept over the same cells as the control
|
|
21
|
+
* when rows and columns move.
|
|
22
|
+
*/
|
|
23
|
+
getShapeId(): number | null;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the markup of the part describing the control, or `null` if none was captured.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* Read-only, and the one escape hatch for what the control does not model yet: it is the
|
|
29
|
+
* `<formControlPr>` the control was read from — its kind, its linked cell, its macro. It will be
|
|
30
|
+
* removed when the control is modeled.
|
|
31
|
+
*/
|
|
32
|
+
getXML(): string | null;
|
|
33
|
+
toJSON(toResourceId?: (resource: IResource) => number | null): IControl.JSON | null;
|
|
34
|
+
/** For runtime type checking. */
|
|
35
|
+
readonly isIControl: true;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* {@inheritDoc IControl}
|
|
39
|
+
* @see
|
|
40
|
+
* ### **Interface**
|
|
41
|
+
*
|
|
42
|
+
* {@link IControl}
|
|
43
|
+
*/
|
|
44
|
+
export declare namespace IControl {
|
|
45
|
+
interface JSON {
|
|
46
|
+
/**
|
|
47
|
+
* The id of the shape that draws this control.
|
|
48
|
+
*
|
|
49
|
+
* @see {@link IControl.getShapeId}
|
|
50
|
+
*/
|
|
51
|
+
shapeId?: number;
|
|
52
|
+
/**
|
|
53
|
+
* The control's own properties, as they were read.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* Opaque. What they describe — a button's macro, a checkbox's linked cell — has no model yet,
|
|
57
|
+
* so they are held as they were read and written back unchanged. The position is *not* among
|
|
58
|
+
* them: it is the movable's own anchor, and is written from that.
|
|
59
|
+
*/
|
|
60
|
+
props?: Record<string, string>;
|
|
61
|
+
/**
|
|
62
|
+
* Anything else the properties contained, as markup.
|
|
63
|
+
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* Empty for every control this version has seen — a control's properties are attributes and an
|
|
66
|
+
* anchor, and the anchor is the movable's. Kept so a producer that writes more than that does
|
|
67
|
+
* not lose it.
|
|
68
|
+
*/
|
|
69
|
+
xml?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The part describing what kind of control this is and how it behaves.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* A control is drawn by a shape in the sheet's legacy drawing ({@link ISheet.LegacyDrawingJSON})
|
|
75
|
+
* and described by a part of its own; this is that part.
|
|
76
|
+
*/
|
|
77
|
+
part?: IEmbeddedPart.JSON;
|
|
78
|
+
}
|
|
79
|
+
interface Events extends IModel.Events {
|
|
80
|
+
}
|
|
81
|
+
interface IListeners extends IListener.Callbacks<IControl, IControl.Events> {
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=IControl.d.ts.map
|
|
@@ -29,7 +29,29 @@ export interface IMovable extends IAnchored, ITransaction.ITransactional, IHisto
|
|
|
29
29
|
*/
|
|
30
30
|
getRange(options?: ICellRange.GetRangeOptions): ICellRange;
|
|
31
31
|
/**
|
|
32
|
-
* Returns the content of the movable.
|
|
32
|
+
* Returns the content of the movable: what is drawn at this position.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* The content's `getType()` says which interface to read it as:
|
|
36
|
+
*
|
|
37
|
+
* | `getType()` | content |
|
|
38
|
+
* | --- | --- |
|
|
39
|
+
* | `'picture'` | {@link IPicture} |
|
|
40
|
+
* | `'chart'` | {@link IChart} |
|
|
41
|
+
* | `'shape'` | {@link IShape} — text boxes, callouts, connectors and groups |
|
|
42
|
+
* | `'slicer'` | {@link ISlicer} |
|
|
43
|
+
* | `'control'` | {@link IControl} — a form control |
|
|
44
|
+
*
|
|
45
|
+
* Anything else is content that is positioned and saved but not modeled; it answers
|
|
46
|
+
* `getType()` and nothing more.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const content = movable.getContent();
|
|
51
|
+
* if (content.getType() === 'shape') {
|
|
52
|
+
* const text = (content as IShape).getTextFrame()?.getText();
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
33
55
|
*/
|
|
34
56
|
getContent<T extends IModel>(): T;
|
|
35
57
|
/**
|
|
@@ -47,6 +47,8 @@ export interface IMovableCollection extends ICollection<IMovable>, IListener.ISo
|
|
|
47
47
|
* {@link IListener.ISource.addListeners}
|
|
48
48
|
*/
|
|
49
49
|
addListeners(listeners: ICollection.IListeners, options?: IListener.Options): IListener.Remove;
|
|
50
|
+
/** For runtime type checking. */
|
|
51
|
+
readonly isIMovableCollection: true;
|
|
50
52
|
}
|
|
51
53
|
/**
|
|
52
54
|
* {@inheritDoc IMovableCollection}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Bounds, Point, ReferenceableClipboard } from '@sheetxl/utils';
|
|
2
2
|
import { IRange } from '@sheetxl/primitives';
|
|
3
3
|
import { IHistory } from '../history';
|
|
4
|
-
import { IListener } from '../listener';
|
|
5
4
|
import { IResource, IResourceCollection } from '../resource';
|
|
6
5
|
import { ITransaction } from '../transaction';
|
|
7
6
|
import { IAnchored } from '../anchored';
|
|
@@ -9,14 +8,16 @@ import { IModel } from '../model';
|
|
|
9
8
|
import { IMovable } from './IMovable';
|
|
10
9
|
import { AbstractAnchored } from '../anchored/AbstractAnchored';
|
|
11
10
|
import { Anchored } from '../anchored/Anchored';
|
|
12
|
-
export declare class Movable<J extends IMovable.JSON = IMovable.JSON, STATE extends State = State
|
|
11
|
+
export declare class Movable<J extends IMovable.JSON = IMovable.JSON, STATE extends State = State> extends AbstractAnchored<STATE, IMovable.Events> {
|
|
13
12
|
static instanceCounter: number;
|
|
14
13
|
protected _content: Movable.Content;
|
|
14
|
+
/** Detaches the content's delete listener; removed before the content is deleted so the delete does not recurse. */
|
|
15
|
+
private _contentListenerRemove;
|
|
15
16
|
private _optionsMovable;
|
|
16
17
|
constructor(options: Movable.ConstructorOptions<J>);
|
|
17
18
|
/** {@inheritDoc IMovable.getContent} */
|
|
18
19
|
getContent(): Movable.Content;
|
|
19
|
-
protected _processAfterStateChange(state: STATE,
|
|
20
|
+
protected _processAfterStateChange(state: STATE, commit: ITransaction.ICommit): void;
|
|
20
21
|
protected _processZIndex(): void;
|
|
21
22
|
protected _processContainerSelect(_selected: boolean, _first: boolean): IRange.Coords | void;
|
|
22
23
|
/** {@inheritDoc IMovable.isSelected} */
|
|
@@ -213,9 +214,6 @@ interface State extends AbstractAnchored.State {
|
|
|
213
214
|
lockAspectRatio?: boolean | null;
|
|
214
215
|
offsets?: MovableOffsets;
|
|
215
216
|
bounds?: Bounds | null;
|
|
216
|
-
contentListenerRemove: IListener.Remove;
|
|
217
|
-
}
|
|
218
|
-
interface CommitView extends AbstractAnchored.CommitView {
|
|
219
217
|
}
|
|
220
218
|
export {};
|
|
221
219
|
//# sourceMappingURL=Movable.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ICollection } from '../type';
|
|
1
|
+
import { ICollection, AbstractCollection } from '../type';
|
|
2
2
|
import { IListener } from '../listener';
|
|
3
3
|
import { IResource, IResourceCollection } from '../resource';
|
|
4
4
|
import { IMovable } from './IMovable';
|
|
5
5
|
import { IMovableCollection } from './IMovableCollection';
|
|
6
|
-
export declare class MovableCollection implements IMovableCollection {
|
|
6
|
+
export declare class MovableCollection extends AbstractCollection<IMovable, IMovableCollection.GetItemsOptions> implements IMovableCollection {
|
|
7
7
|
private _add;
|
|
8
|
-
private
|
|
8
|
+
private _getItemsDelegate;
|
|
9
9
|
private _getCount;
|
|
10
10
|
private _updateSelected;
|
|
11
11
|
private _addListeners;
|
|
@@ -13,10 +13,8 @@ export declare class MovableCollection implements IMovableCollection {
|
|
|
13
13
|
constructor(add: (options?: IMovableCollection.AddOptions) => Promise<IMovable>, getItems: (options?: IMovableCollection.GetItemsOptions) => IMovable[], getCount: () => number, updateSelected: (update: (movable: IMovable) => void, action?: string) => void, addListeners: (listeners: ICollection.IListeners, options?: IListener.Options) => IListener.Remove, addPicture: (image: string | IResource | IResourceCollection.AddOptions, options?: IMovableCollection.AddOptions) => Promise<IMovable>);
|
|
14
14
|
/** {@inheritDoc IMovableCollection.add} */
|
|
15
15
|
add(options?: IMovableCollection.AddOptions): Promise<IMovable>;
|
|
16
|
-
/** {@inheritDoc
|
|
17
|
-
|
|
18
|
-
/** {@inheritDoc IMovableCollection.getItems} */
|
|
19
|
-
getItems(options?: IMovableCollection.GetItemsOptions): IMovable[];
|
|
16
|
+
/** {@inheritDoc AbstractCollection._getItems} */
|
|
17
|
+
protected _getItems(options?: IMovableCollection.GetItemsOptions): IMovable[];
|
|
20
18
|
/** {@inheritDoc IMovableCollection.getCount} */
|
|
21
19
|
getCount(): number;
|
|
22
20
|
/** {@inheritDoc IMovableCollection.updateSelected} */
|
|
@@ -25,5 +23,7 @@ export declare class MovableCollection implements IMovableCollection {
|
|
|
25
23
|
addListeners(listeners: ICollection.IListeners, options?: IListener.Options): IListener.Remove;
|
|
26
24
|
/** {@inheritDoc IMovableCollection.addPicture */
|
|
27
25
|
addPicture(image: string | IResource | IResourceCollection.AddOptions, options?: IMovableCollection.AddOptions): Promise<IMovable>;
|
|
26
|
+
/** {@inheritDoc IMovableCollection.isIMovableCollection} */
|
|
27
|
+
get isIMovableCollection(): true;
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=MovableCollection.d.ts.map
|
|
@@ -13,7 +13,7 @@ export interface State extends AbstractModel.State {
|
|
|
13
13
|
/**
|
|
14
14
|
* Abstract implementation of `INamed`.
|
|
15
15
|
*/
|
|
16
|
-
export declare abstract class AbstractNamed<T, S extends State,
|
|
16
|
+
export declare abstract class AbstractNamed<T, S extends State, EVENTS extends IModel.Events = INamed.Events> extends AbstractModel<S, INamed.JSON, EVENTS> implements INamed<T> {
|
|
17
17
|
/** {@inheritDoc INamed.select} */
|
|
18
18
|
abstract select(options?: ITypes.SelectOptions): Promise<this>;
|
|
19
19
|
/** {@inheritDoc INamed.getRanges} */
|
|
@@ -67,6 +67,9 @@ export interface INamed<T = any> extends IModel {
|
|
|
67
67
|
* A reference to a *part* of this item that the given coords designate exactly, or `null`.
|
|
68
68
|
*
|
|
69
69
|
* @param coords The coords to match, sheet-qualified (`scope`) and in row-first order.
|
|
70
|
+
* @param home The cell of the formula the reference is for, when there is one. A reference can be
|
|
71
|
+
* written relative to it: `Sales[@Amount]` for a table cell in the formula's own row, and from
|
|
72
|
+
* inside the table `[@Amount]` and `[Amount]`.
|
|
70
73
|
*
|
|
71
74
|
* @remarks
|
|
72
75
|
* * Optional
|
|
@@ -79,7 +82,7 @@ export interface INamed<T = any> extends IModel {
|
|
|
79
82
|
* Implemented by whatever owns the parts (a table), so the collection stays out of the business
|
|
80
83
|
* of knowing what kinds of items have insides.
|
|
81
84
|
*/
|
|
82
|
-
getPartReference?(coords: readonly IRange.Coords[]): string | null;
|
|
85
|
+
getPartReference?(coords: readonly IRange.Coords[], home?: IRange.CellCoords | null): string | null;
|
|
83
86
|
/**
|
|
84
87
|
* If true then the name is not visible.
|
|
85
88
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IRange } from '@sheetxl/primitives';
|
|
1
2
|
import { ICollection } from '../type';
|
|
2
3
|
import { IListener } from '../listener';
|
|
3
4
|
import { ICellRanges } from '../cellRange';
|
|
@@ -152,6 +153,21 @@ export declare namespace INamedCollection {
|
|
|
152
153
|
* single definition, and a listener that re-reads the collection is the intended response.
|
|
153
154
|
*/
|
|
154
155
|
onCollectionChange?(source: INamedCollection): void;
|
|
156
|
+
/**
|
|
157
|
+
* Called when an undo or a redo has moved what this collection presents, and a consumer holding
|
|
158
|
+
* it needs to re-read.
|
|
159
|
+
*
|
|
160
|
+
* @remarks
|
|
161
|
+
* Separate from {@link onCollectionChange} because a restore is not a write, and some listeners
|
|
162
|
+
* treat the two very differently: the calculation engine recalculates on a change, and firing
|
|
163
|
+
* that for a restore would recalculate a second time on top of the one the restore already did.
|
|
164
|
+
* A consumer rendering a LIST wants both, and subscribes to both.
|
|
165
|
+
*
|
|
166
|
+
* A derived name is what makes this necessary. A table's name is read back off the table rather
|
|
167
|
+
* than stored here, so an undo of a rename moves no state of this collection's and a
|
|
168
|
+
* change-only listener hears nothing.
|
|
169
|
+
*/
|
|
170
|
+
onInvalidated?(source: INamedCollection): void;
|
|
155
171
|
/**
|
|
156
172
|
* Transaction items have a close event.
|
|
157
173
|
*/
|
|
@@ -225,6 +241,16 @@ export declare namespace INamedCollection {
|
|
|
225
241
|
* the same region.
|
|
226
242
|
*/
|
|
227
243
|
includeParts?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* The cell of the formula a part reference is for.
|
|
246
|
+
*
|
|
247
|
+
* @remarks
|
|
248
|
+
* Only read with `includeParts`. A table cell in the formula's own row is a this-row reference
|
|
249
|
+
* (`Sales[@Amount]`), and inside the table a single column drops the table name (`[Amount]`,
|
|
250
|
+
* `[@Amount]`). Without it every part is qualified (`Sales[Amount]`) and a row's cells are
|
|
251
|
+
* addresses.
|
|
252
|
+
*/
|
|
253
|
+
home?: IRange.CellCoords | null;
|
|
228
254
|
}
|
|
229
255
|
}
|
|
230
256
|
//# sourceMappingURL=INamedCollection.d.ts.map
|