@sheetxl/sdk 0.7.28-beta.4 → 0.8.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/browser/esm/{DBIu6NUHIcxOOBQp.mjs → BEAY9XgKNx-bakXW.mjs} +2 -2
- package/browser/esm/BbSmt62FpFIpoVzu.mjs +392 -0
- package/browser/esm/BcHmrKHwMMOlzc9_.mjs +357 -0
- package/browser/esm/BgcZ-CoTbMfmyDJL.mjs +412 -0
- package/browser/esm/Bk7xxbdDpa7-sIwd.mjs +7 -0
- package/browser/esm/BqskM7wA8oPfFQue.mjs +20 -0
- package/browser/esm/Btg43M1Bf-ENDreu.mjs +540 -0
- package/browser/esm/BzLfNyc6OOShIErH.mjs +598 -0
- package/browser/esm/C9B0djuUarfNdoj0.mjs +466 -0
- package/browser/esm/{CHSahmMFYNB0Ajkf.mjs → CSx9ed1JOs7K5BXO.mjs} +2 -2
- package/browser/esm/CYyv6uGjo10ig5FP.mjs +142 -0
- package/browser/esm/CZ5oa92wZEAXebgk.mjs +622 -0
- package/browser/esm/CdLZWVcH8cncBUPJ.mjs +849 -0
- package/browser/esm/Cgd5BnM3hg9RyUel.mjs +171 -0
- package/browser/esm/CjsUGJEQSbGjnH6R.mjs +1001 -0
- package/browser/esm/ClB5ix51roQOpZEr.mjs +7402 -0
- package/browser/esm/{CKk58ZLcrllMzfou.mjs → Cqr3knDsBvoVZ6MN.mjs} +179 -202
- package/browser/esm/D4uVlrG0xEFctsSM.mjs +905 -0
- package/browser/esm/DOMHmhYzPcLVcpAW.mjs +7 -0
- package/browser/esm/DUvUK61b2_4pf4tG.mjs +484 -0
- package/browser/esm/De175LygU7ot4nQm.mjs +441 -0
- package/browser/esm/DhKkrCVASZ6Isvz6.mjs +527 -0
- package/browser/esm/Di58Ji1n--3Mgc_2.mjs +607 -0
- package/browser/esm/Dtoyt8q5RyGAlxCp.mjs +1141 -0
- package/browser/esm/Y79I7Sm8kjaYexhf.mjs +167 -0
- package/browser/esm/index.mjs +1472 -1023
- package/browser/esm/o8MFgcVXns987D6_.mjs +400 -0
- package/browser/esm/zqJOaweiXE9D8RY1.mjs +66681 -0
- package/licenses/dependencies.txt +209 -209
- package/node/esm/B6D7sSetrcOWLsKj.mjs +1135 -0
- package/node/esm/B9ljpEIZg6wOTzRE.mjs +142 -0
- package/node/esm/BH1v-E4Ro3bR7Znw.mjs +962 -0
- package/node/esm/BN9j8V9gCExMjVtJ.mjs +540 -0
- package/node/esm/{DUYP6faJJHCaW1Xf.mjs → Bh4dv6tMjXX3X4nI.mjs} +1 -1
- package/node/esm/Bqd62L8KFgdS0Vou.mjs +7 -0
- package/node/esm/Bsx9uijd4X_SKV3L.mjs +360 -0
- package/node/esm/BtuY37FumvLE7EBo.mjs +629 -0
- package/node/esm/C6ZXsNyLXI6zA63X.mjs +402 -0
- package/node/esm/CCouEwT37f08qO3V.mjs +7 -0
- package/node/esm/CD9wbvufChVYYkrI.mjs +451 -0
- package/node/esm/CImNvdz1iP-lUlro.mjs +610 -0
- package/node/esm/CT0CN82y0_Qgoryk.mjs +7568 -0
- package/node/esm/CUQi5ZtMO02nhG0W.mjs +596 -0
- package/node/esm/CUUoseJmFsCf82bb.mjs +28 -0
- package/node/esm/CnSQ7MTXAUAyBOoS.mjs +911 -0
- package/node/esm/D7MfcID2Wf6l6VpC.mjs +171 -0
- package/node/esm/DCplLG93GfTs1vNw.mjs +1860 -0
- package/node/esm/DHUADiCmxNQS1ARz.mjs +417 -0
- package/node/esm/DMD12JUh7HJw2-jl.mjs +638 -0
- package/node/esm/DdFgXl-Ux2cMBTs_.mjs +15 -0
- package/node/esm/DefYISWfdZJFx57m.mjs +255 -0
- package/node/esm/Ds0d8zXzmgOu3MGx.mjs +403 -0
- package/node/esm/MiU4rDOiocmJ-9Ry.mjs +1783 -0
- package/node/esm/index.mjs +49153 -36824
- package/package.json +15 -16
- package/resources/contents.json +64 -0
- package/resources/fonts/arial-bold-italic.metrics.json +139 -0
- package/resources/fonts/arial-bold.metrics.json +139 -0
- package/resources/fonts/arial-italic.metrics.json +139 -0
- package/resources/fonts/arial-regular.metrics.json +139 -0
- package/resources/fonts/calibri-bold-italic.metrics.json +137 -0
- package/resources/fonts/calibri-bold.metrics.json +137 -0
- package/resources/fonts/calibri-italic.metrics.json +137 -0
- package/resources/fonts/calibri-regular.metrics.json +137 -0
- package/resources/fonts/cambria-bold-italic.metrics.json +66 -0
- package/resources/fonts/cambria-bold.metrics.json +66 -0
- package/resources/fonts/cambria-italic.metrics.json +66 -0
- package/resources/fonts/cambria-regular.metrics.json +66 -0
- package/resources/fonts/contents.json +126 -0
- package/resources/fonts/courier-new-bold-italic.metrics.json +143 -0
- package/resources/fonts/courier-new-bold.metrics.json +143 -0
- package/resources/fonts/courier-new-italic.metrics.json +143 -0
- package/resources/fonts/courier-new-regular.metrics.json +143 -0
- package/resources/fonts/times-new-roman-bold-italic.metrics.json +141 -0
- package/resources/fonts/times-new-roman-bold.metrics.json +141 -0
- package/resources/fonts/times-new-roman-italic.metrics.json +143 -0
- package/resources/fonts/times-new-roman-regular.metrics.json +141 -0
- package/resources/locales/de/model.msg.json +112 -12
- package/resources/locales/en/model.msg.json +119 -13
- package/types/scripting-api.json +8048 -0
- package/types/scripting-enums.json +277 -106
- package/types/scripting.d.ts +18126 -7971
- package/types/src/anchored/AbstractAnchored.d.ts +18 -8
- package/types/src/anchored/AnchoredMap.d.ts +2 -0
- package/types/src/anchored/IAnchoredMap.d.ts +52 -4
- package/types/src/autoFill/AutoFill.d.ts +316 -32
- package/types/src/autoFill/IAutoFill.d.ts +232 -15
- package/types/src/border/{IBorder.d.ts → IBorders.d.ts} +42 -41
- package/types/src/border/index.d.ts +1 -1
- package/types/src/calculation/Calculation.d.ts +759 -49
- package/types/src/calculation/ExternalBookBindings.d.ts +118 -0
- package/types/src/calculation/FormulaText.d.ts +82 -0
- package/types/src/calculation/ICalculation.d.ts +318 -81
- package/types/src/calculation/INamedFormulasCollection.d.ts +5 -8
- package/types/src/calculation/NamedFormulaCollection.d.ts +139 -107
- package/types/src/calculation/NamedLambdaFunction.d.ts +28 -0
- package/types/src/calculation/TokenType.d.ts +9 -0
- package/types/src/calculation/Types.d.ts +83 -2
- package/types/src/calculation/_CloneBoundary.d.ts +80 -0
- package/types/src/calculation/_TableRename.d.ts +13 -0
- package/types/src/calculation/compiler/ASTTypes.d.ts +71 -0
- package/types/src/calculation/compiler/CompilerUtils.d.ts +135 -44
- package/types/src/calculation/compiler/FormulaCompiler.d.ts +29 -4
- package/types/src/calculation/compiler/FormulaParser.d.ts +1 -2
- package/types/src/calculation/compiler/LiteTransform.d.ts +17 -0
- package/types/src/calculation/compiler/ParserUtils.d.ts +26 -1
- package/types/src/calculation/compiler/SRParser.d.ts +2 -1
- package/types/src/calculation/compiler/Types.d.ts +79 -9
- package/types/src/calculation/executor/CalcExecutor.d.ts +422 -34
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +43 -2
- package/types/src/calculation/executor/CircularReference.d.ts +2 -0
- package/types/src/calculation/formula/Formula.d.ts +58 -21
- package/types/src/calculation/formula/FormulaBlock.d.ts +125 -23
- package/types/src/calculation/formula/FormulaRecordView.d.ts +79 -0
- package/types/src/calculation/formula/FunctionValues.d.ts +10 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +261 -67
- package/types/src/calculation/formula/LambdaValue.d.ts +46 -23
- package/types/src/calculation/formula/LazyValue.d.ts +96 -0
- package/types/src/calculation/formula/TokenUtils.d.ts +25 -1
- package/types/src/calculation/formula/index.d.ts +1 -0
- package/types/src/calculation/functions/FunctionDeclarations.d.ts +31 -0
- package/types/src/calculation/functions/Operators.d.ts +8 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +15 -2
- package/types/src/calculation/grid/CalcGrid.d.ts +407 -158
- package/types/src/calculation/grid/CalcGridBackend.d.ts +493 -0
- package/types/src/calculation/grid/CalcGridProxy.d.ts +133 -0
- package/types/src/calculation/grid/CalcGridUtils.d.ts +62 -12
- package/types/src/calculation/grid/FormulaEntry.d.ts +129 -0
- package/types/src/calculation/grid/FormulaHost.d.ts +239 -0
- package/types/src/calculation/grid/ICalcGrid.d.ts +499 -141
- package/types/src/calculation/grid/_CalcRequest.d.ts +289 -0
- package/types/src/calculation/grid/index.d.ts +4 -0
- package/types/src/calculation/index.d.ts +2 -0
- package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +6 -2
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +339 -11
- package/types/src/calculation/spatial/SpillEntry.d.ts +20 -5
- package/types/src/calculation/spatial/TouchedWindows.d.ts +86 -0
- package/types/src/calculation/spatial/index.d.ts +1 -0
- package/types/src/calculation/state/CalcInputs.d.ts +41 -0
- package/types/src/calculation/state/CalcNode.d.ts +160 -29
- package/types/src/calculation/state/CalcScope.d.ts +37 -0
- package/types/src/calculation/state/CalcState.d.ts +22 -1
- package/types/src/calculation/state/CalculationContext.d.ts +53 -4
- package/types/src/calculation/state/IContextContainer.d.ts +159 -26
- package/types/src/calculation/state/_PendingOverlayGrid.d.ts +163 -0
- package/types/src/calculation/state/_ReadObservedGrid.d.ts +74 -8
- package/types/src/calculation/state/index.d.ts +1 -0
- package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +80 -0
- package/types/src/calculation/symbol/ISymbolRegistry.d.ts +23 -0
- package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts +16 -2
- package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +63 -3
- package/types/src/calculation/symbol/SymbolRegistry.d.ts +20 -0
- package/types/src/calculation/symbol/index.d.ts +3 -2
- package/types/src/cell/ICell.d.ts +104 -29
- package/types/src/cell/ICellHeader.d.ts +24 -2
- package/types/src/cell/ICellProtection.d.ts +50 -10
- package/types/src/cellRange/ICellRange.d.ts +458 -97
- package/types/src/cellRange/ICellRanges.d.ts +23 -21
- package/types/src/chart/Chart.d.ts +41 -13
- package/types/src/chart/ChartCollection.d.ts +26 -0
- package/types/src/chart/IChart.d.ts +166 -12
- package/types/src/chart/IChartCollection.d.ts +25 -0
- package/types/src/chart/_ChartXml.d.ts +70 -0
- package/types/src/chart/index.d.ts +1 -3
- package/types/src/collections/ArraysGrid.d.ts +1 -1
- package/types/src/collections/IGrid.d.ts +1 -1
- package/types/src/collections/ISparseGrid.d.ts +9 -0
- package/types/src/collections/ISpatialMap.d.ts +59 -21
- package/types/src/collections/ImmutableList.d.ts +28 -0
- package/types/src/collections/MixedTypedArrayList.d.ts +168 -108
- package/types/src/collections/OverlappingRangeIterator.d.ts +13 -17
- package/types/src/collections/RepeatingList.d.ts +7 -0
- package/types/src/collections/ScalarGrid.d.ts +50 -0
- package/types/src/collections/SparseGrid.d.ts +1 -1
- package/types/src/collections/SpatialMap.d.ts +13 -21
- package/types/src/collections/Tuple.d.ts +128 -16
- package/types/src/collections/_GridUtils.d.ts +19 -6
- package/types/src/collections/_RangeSweep.d.ts +97 -0
- package/types/src/collections/_SpatialUtils.d.ts +20 -2
- package/types/src/collections/index.d.ts +1 -0
- package/types/src/color/_BuiltInIndexDefs.d.ts +6 -0
- package/types/src/comment/Comment.d.ts +223 -0
- package/types/src/comment/CommentCollection.d.ts +40 -0
- package/types/src/comment/IComment.d.ts +340 -50
- package/types/src/comment/ICommentCollection.d.ts +90 -0
- package/types/src/comment/NoteMovable.d.ts +26 -0
- package/types/src/comment/_CommentUtils.d.ts +50 -0
- package/types/src/comment/_NoteBox.d.ts +50 -0
- package/types/src/comment/index.d.ts +1 -0
- package/types/src/condition/AnchoredConditional.d.ts +82 -17
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +42 -12
- package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/AndOperator.d.ts +3 -1
- package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +4 -0
- package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +4 -1
- package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +5 -6
- package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/IconOperator.d.ts +4 -0
- package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +22 -5
- package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/NotOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/OrOperator.d.ts +3 -1
- package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +6 -0
- package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +21 -6
- package/types/src/condition/BuiltinSelectors/DateSelector.d.ts +4 -5
- package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +20 -0
- package/types/src/condition/BuiltinSelectors/TextLengthSelector.d.ts +7 -5
- package/types/src/condition/BuiltinSelectors/TimeSelector.d.ts +3 -5
- package/types/src/condition/BuiltinSelectors/WholeSelector.d.ts +3 -5
- package/types/src/condition/BuiltinSelectors/index.d.ts +12 -6
- package/types/src/condition/Condition.d.ts +19 -1
- package/types/src/condition/ICondition.d.ts +293 -73
- package/types/src/condition/_ConditionFormula.d.ts +152 -0
- package/types/src/condition/_ConditionUtils.d.ts +167 -13
- package/types/src/conditionalFormat/ConditionalEntry.d.ts +3 -3
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +25 -14
- package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +19 -8
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +12 -10
- package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +2 -0
- package/types/src/dataValidation/DataValidation.d.ts +69 -3
- package/types/src/dataValidation/DataValidationCollection.d.ts +20 -9
- package/types/src/dataValidation/IDataValidation.d.ts +149 -30
- package/types/src/dataValidation/IDataValidationCollection.d.ts +10 -2
- package/types/src/date/DateUtils.d.ts +20 -0
- package/types/src/date/_DateUtils.d.ts +91 -7
- package/types/src/externalBook/ExternalBookCollection.d.ts +145 -12
- package/types/src/externalBook/ExternalBookName.d.ts +96 -0
- package/types/src/externalBook/IExternalBook.d.ts +170 -18
- package/types/src/externalBook/IExternalBookCollection.d.ts +79 -7
- package/types/src/externalBook/index.d.ts +1 -0
- package/types/src/{lib/file → file}/file.browser.d.ts +22 -8
- package/types/src/{lib/file → file}/file.node.d.ts +7 -2
- package/types/src/fill/IEffect.d.ts +5 -5
- package/types/src/fill/IFill.d.ts +123 -78
- package/types/src/fill/IStroke.d.ts +190 -64
- package/types/src/fill/RectAlignment.d.ts +20 -0
- package/types/src/fill/_Fills.d.ts +187 -0
- package/types/src/fill/_Stroke.d.ts +89 -0
- package/types/src/fill/index.d.ts +1 -0
- package/types/src/filter/IFilter.d.ts +188 -5
- package/types/src/font/AdvanceBuilder.d.ts +25 -0
- package/types/src/font/AdvanceTable.d.ts +114 -0
- package/types/src/font/FontCollection.d.ts +57 -0
- package/types/src/font/IFont.d.ts +17 -0
- package/types/src/font/IFontCollection.d.ts +120 -22
- package/types/src/font/TableFileAdvanceBuilder.d.ts +27 -0
- package/types/src/font/_BuiltinFontTables.d.ts +10 -0
- package/types/src/font/index.d.ts +4 -1
- package/types/src/group/Group.d.ts +136 -0
- package/types/src/group/GroupMovableCollection.d.ts +37 -0
- package/types/src/group/IGroup.d.ts +129 -0
- package/types/src/group/index.d.ts +2 -0
- package/types/src/history/IHistory.d.ts +3 -2
- package/types/src/hyperlink/IHyperlink.d.ts +13 -0
- package/types/src/hyperlink/_Hyperlink.d.ts +5 -1
- package/types/src/i18n/LanguagePack.d.ts +12 -4
- package/types/src/index.d.ts +5 -0
- package/types/src/io/AbstractBackingStore.d.ts +24 -1
- package/types/src/io/ArrayBackingStore.d.ts +1 -1
- package/types/src/io/EmbeddedPart.d.ts +20 -0
- package/types/src/io/IEmbeddedPart.d.ts +63 -0
- package/types/src/io/IWorkbookIO.d.ts +185 -18
- package/types/src/io/WorkbookIO.d.ts +9 -0
- package/types/src/io/WorkbookOrigin.d.ts +20 -11
- package/types/src/io/WorkbookOriginProvider.d.ts +46 -0
- package/types/src/io/_XmlFragment.d.ts +49 -0
- package/types/src/io/index.d.ts +1 -0
- package/types/src/license/LicenseDetails.d.ts +1 -0
- package/types/src/license/LicenseManager.d.ts +4 -1
- package/types/src/license/Types.d.ts +38 -0
- package/types/src/license/_Utils.d.ts +22 -0
- package/types/src/license/details.d.ts +24 -0
- package/types/src/license/license-key.d.ts +49 -2
- package/types/src/license/runtime.browser.d.ts +41 -0
- package/types/src/{lib/utils/utils.node.d.ts → license/runtime.node.d.ts} +9 -12
- package/types/src/listener/IListener.d.ts +12 -7
- package/types/src/listener/ListenerEmitter.d.ts +46 -5
- package/types/src/model/AbstractModel.d.ts +14 -5
- package/types/src/movable/AbstractMovableContent.d.ts +182 -0
- package/types/src/movable/CustomElement.d.ts +4 -5
- package/types/src/movable/ErrorContent.d.ts +49 -0
- package/types/src/movable/FormControl.d.ts +285 -0
- package/types/src/movable/GroupMember.d.ts +87 -0
- package/types/src/movable/ICustomElement.d.ts +7 -2
- package/types/src/movable/IErrorContent.d.ts +23 -0
- package/types/src/movable/IFormControl.d.ts +455 -0
- package/types/src/movable/IMovable.d.ts +378 -46
- package/types/src/movable/IMovableCollection.d.ts +63 -3
- package/types/src/movable/Movable.d.ts +149 -49
- package/types/src/movable/MovableCollection.d.ts +15 -8
- package/types/src/movable/MovableContentRegistry.d.ts +113 -0
- package/types/src/movable/_BuiltInContents.d.ts +14 -0
- package/types/src/movable/_ContentFactory.d.ts +35 -0
- package/types/src/movable/_DrawnBounds.d.ts +37 -0
- package/types/src/movable/_InsertableCollection.d.ts +28 -0
- package/types/src/movable/_MovableUtils.d.ts +5 -0
- package/types/src/movable/_PendingContent.d.ts +25 -0
- package/types/src/movable/_PlacementUtils.d.ts +55 -0
- package/types/src/movable/_RotatedFrame.d.ts +20 -0
- package/types/src/movable/index.d.ts +7 -1
- package/types/src/named/AbstractNamed.d.ts +1 -1
- package/types/src/named/INamed.d.ts +4 -1
- package/types/src/named/INamedCollection.d.ts +26 -0
- package/types/src/named/NamedCollection.d.ts +16 -15
- package/types/src/numFmt/BuiltInFormats.d.ts +20 -7
- package/types/src/numFmt/IFormatEngine.d.ts +2 -0
- package/types/src/numFmt/NumfmtFormatEngine.d.ts +2 -0
- package/types/src/numFmt/_FormatCell.d.ts +11 -2
- package/types/src/numFmt/_NumFmtUtils.d.ts +0 -1
- package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +6 -0
- package/types/src/outline/IOutline.d.ts +186 -0
- package/types/src/outline/Outline.d.ts +157 -0
- package/types/src/outline/index.d.ts +2 -0
- package/types/src/person/IPerson.d.ts +99 -0
- package/types/src/person/IPersonCollection.d.ts +51 -0
- package/types/src/person/Person.d.ts +32 -0
- package/types/src/person/PersonCollection.d.ts +49 -0
- package/types/src/person/index.d.ts +4 -0
- package/types/src/picture/IPicture.d.ts +33 -3
- package/types/src/picture/Picture.d.ts +33 -13
- package/types/src/pivot/IPivotTable.d.ts +72 -0
- package/types/src/pivot/IPivotTableCollection.d.ts +25 -0
- package/types/src/pivot/PivotCache.d.ts +34 -0
- package/types/src/pivot/PivotTable.d.ts +61 -0
- package/types/src/pivot/PivotTableCollection.d.ts +25 -0
- package/types/src/pivot/_PivotXml.d.ts +24 -0
- package/types/src/pivot/index.d.ts +6 -0
- package/types/src/primitives/CompositeRangeStats.d.ts +2 -0
- package/types/src/primitives/Criteria.d.ts +1 -1
- package/types/src/primitives/Grouping.d.ts +65 -0
- package/types/src/primitives/LambdaBrand.d.ts +26 -0
- package/types/src/primitives/PrimitiveUtils.d.ts +60 -21
- package/types/src/primitives/Range.d.ts +136 -26
- package/types/src/primitives/RangeStats.d.ts +30 -2
- package/types/src/primitives/ReferenceRange.d.ts +44 -0
- package/types/src/primitives/Runtime.d.ts +15 -2
- package/types/src/primitives/environment.browser.d.ts +9 -0
- package/types/src/primitives/environment.node.d.ts +10 -0
- package/types/src/primitives/stats/AggregateStats.d.ts +49 -15
- package/types/src/primitives/stats/Cancellation.d.ts +13 -0
- package/types/src/primitives/stats/FrequencyStats.d.ts +10 -1
- package/types/src/primitives/stats/LookupIndex.d.ts +46 -0
- package/types/src/primitives/stats/Ranked.d.ts +1 -1
- package/types/src/primitives/stats/SortedNumbers.d.ts +4 -2
- package/types/src/primitives/stats/index.d.ts +1 -0
- package/types/src/print/IPrint.d.ts +0 -22
- package/types/src/protectedRange/IProtectedRange.d.ts +4 -0
- package/types/src/protectedRange/IProtectedRangeCollection.d.ts +2 -0
- package/types/src/protectedRange/ProtectedRange.d.ts +1 -4
- package/types/src/protectedRange/ProtectedRangeCollection.d.ts +19 -8
- package/types/src/protection/DefaultProtection.d.ts +12 -1
- package/types/src/protection/IProtection.d.ts +36 -2
- package/types/src/reference/ReferenceUtils.d.ts +80 -0
- package/types/src/reference/index.d.ts +2 -0
- package/types/src/resource/IResource.d.ts +21 -1
- package/types/src/resource/IResourceCollection.d.ts +9 -1
- package/types/src/resource/ResourceCollection.d.ts +6 -6
- package/types/src/scripting/FunctionArguments.d.ts +22 -0
- package/types/src/scripting/FunctionCollection.d.ts +49 -15
- package/types/src/scripting/IFunctionCollection.d.ts +62 -32
- package/types/src/scripting/IModule.d.ts +25 -0
- package/types/src/scripting/IModuleCollection.d.ts +17 -0
- package/types/src/scripting/IScript.d.ts +28 -26
- package/types/src/scripting/Module.d.ts +34 -6
- package/types/src/scripting/ModuleCollection.d.ts +17 -12
- package/types/src/scripting/Runtime.d.ts +15 -0
- package/types/src/scripting/Scripts.d.ts +3 -7
- package/types/src/scripting/TypedFunction.d.ts +200 -4
- package/types/src/scripting/_FunctionIndex.d.ts +8 -3
- package/types/src/scripting/_ModuleUtils.d.ts +11 -1
- package/types/src/scripting/_ScriptUtils.d.ts +3 -0
- package/types/src/scripting/declarations.browser.d.ts +10 -0
- package/types/src/scripting/declarations.d.ts +49 -0
- package/types/src/scripting/declarations.node.d.ts +9 -0
- package/types/src/scripting/index.d.ts +3 -0
- package/types/src/selection/IMovableSelection.d.ts +148 -0
- package/types/src/selection/IRangeSelection.d.ts +9 -4
- package/types/src/selection/MovableSelection.d.ts +48 -0
- package/types/src/selection/RangeSelection.d.ts +15 -0
- package/types/src/selection/index.d.ts +1 -0
- package/types/src/shape/GeometryPreset.d.ts +197 -0
- package/types/src/shape/IGeometry.d.ts +380 -0
- package/types/src/shape/IShape.d.ts +341 -194
- package/types/src/shape/IShapeStyle.d.ts +135 -0
- package/types/src/shape/Shape.d.ts +107 -21
- package/types/src/shape/ShapeStyleUtils.d.ts +54 -0
- package/types/src/shape/_ConnectorFrame.d.ts +32 -0
- package/types/src/shape/_ConnectorRoute.d.ts +33 -0
- package/types/src/shape/_Connectors.d.ts +108 -0
- package/types/src/shape/_Geometry.d.ts +14 -0
- package/types/src/shape/_GeometryLoader.d.ts +21 -0
- package/types/src/shape/_ShapeStyle.d.ts +70 -0
- package/types/src/shape/_builtIn/_BuiltInChunks.d.ts +10 -0
- package/types/src/shape/_builtIn/_BuiltInDef.d.ts +9 -0
- package/types/src/shape/_builtIn/arrows.d.ts +6 -0
- package/types/src/shape/_builtIn/basic.d.ts +6 -0
- package/types/src/shape/_builtIn/callouts.d.ts +6 -0
- package/types/src/shape/_builtIn/flowchart.d.ts +6 -0
- package/types/src/shape/_builtIn/lines.d.ts +6 -0
- package/types/src/shape/_builtIn/math.d.ts +6 -0
- package/types/src/shape/_builtIn/other.d.ts +6 -0
- package/types/src/shape/_builtIn/rectangles.d.ts +6 -0
- package/types/src/shape/_builtIn/starsBanners.d.ts +6 -0
- package/types/src/shape/geometry/_strokeEnds.d.ts +7 -0
- package/types/src/shape/geometry/format.d.ts +3 -0
- package/types/src/shape/geometry/geometry.d.ts +85 -0
- package/types/src/shape/geometry/guides.d.ts +54 -0
- package/types/src/shape/geometry/handles.d.ts +14 -0
- package/types/src/shape/geometry/index.d.ts +7 -0
- package/types/src/shape/geometry/lineEnds.d.ts +54 -0
- package/types/src/shape/geometry/paths.d.ts +35 -0
- package/types/src/shape/geometry/segments.d.ts +114 -0
- package/types/src/shape/index.d.ts +3 -0
- package/types/src/sheet/CellRegion.d.ts +6 -0
- package/types/src/sheet/ICellContainerOptions.d.ts +50 -0
- package/types/src/sheet/ISheet.d.ts +197 -50
- package/types/src/sheet/ISheetCollection.d.ts +2 -5
- package/types/src/sheet/NamedCellRange.d.ts +16 -7
- package/types/src/sheet/NamedRange.d.ts +8 -0
- package/types/src/sheet/Sheet.d.ts +923 -138
- package/types/src/sheet/SheetCell.d.ts +92 -32
- package/types/src/sheet/SheetCollection.d.ts +19 -8
- package/types/src/sheet/SheetRange.d.ts +92 -17
- package/types/src/sheet/SheetRanges.d.ts +22 -9
- package/types/src/sheet/_CellBuffer.d.ts +214 -0
- package/types/src/sheet/_HeldFormula.d.ts +69 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +7 -7
- package/types/src/sheet/_ListenerAnchor.d.ts +104 -0
- package/types/src/sheet/_RangeStateSweep.d.ts +16 -0
- package/types/src/sheet/_ScalarListFactory.d.ts +61 -0
- package/types/src/sheet/_SheetAutoFillUtils.d.ts +74 -0
- package/types/src/sheet/_SheetAutoFitUtils.d.ts +28 -0
- package/types/src/sheet/_SheetEvents.d.ts +43 -0
- package/types/src/sheet/_SheetFilterUtils.d.ts +49 -1
- package/types/src/sheet/_SheetIntents.d.ts +296 -0
- package/types/src/sheet/_SheetMutations.d.ts +182 -62
- package/types/src/sheet/_SheetStateReader.d.ts +19 -13
- package/types/src/sheet/_SheetStateTypes.d.ts +83 -78
- package/types/src/sheet/_SheetUtils.d.ts +39 -22
- package/types/src/sheet/_WatchAnchor.d.ts +93 -0
- package/types/src/sheet/spatial/HeldFormulaEntry.d.ts +36 -0
- package/types/src/sheet/spatial/index.d.ts +1 -0
- package/types/src/sheet/style/SheetCellStyle.d.ts +209 -304
- package/types/src/sheet/style/SheetDirectStyle.d.ts +30 -19
- package/types/src/sheet/style/SheetNamedStyle.d.ts +17 -17
- package/types/src/sheet/style/SheetTableStyle.d.ts +5 -5
- package/types/src/sheet/style/_Resolvers.d.ts +14 -8
- package/types/src/sheet/style/_StyleUtils.d.ts +38 -8
- package/types/src/sheetHeader/ISheetHeader.d.ts +94 -53
- package/types/src/sheetHeader/SheetCellHeader.d.ts +4 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +42 -22
- package/types/src/sheetHeader/_HeaderMetrics.d.ts +37 -0
- package/types/src/sheetHeader/_HeaderUtils.d.ts +5 -3
- package/types/src/sheetProtection/ISheetProtection.d.ts +41 -7
- package/types/src/sheetProtection/SheetProtection.d.ts +12 -0
- package/types/src/sheetView/ISheetView.d.ts +69 -15
- package/types/src/sheetView/SheetView.d.ts +20 -11
- package/types/src/slicer/ISlicer.d.ts +304 -17
- package/types/src/slicer/ISlicerStyle.d.ts +109 -0
- package/types/src/slicer/Slicer.d.ts +128 -13
- package/types/src/slicer/SlicerStyle.d.ts +25 -0
- package/types/src/slicer/_BuiltInSlicerStyles.d.ts +13 -0
- package/types/src/slicer/_SlicerUtils.d.ts +30 -0
- package/types/src/slicer/index.d.ts +1 -0
- package/types/src/sort/ISort.d.ts +4 -2
- package/types/src/string/IStringCollection.d.ts +5 -0
- package/types/src/string/StringCollection.d.ts +6 -6
- package/types/src/style/{IStyle.d.ts → ICellStyle.d.ts} +72 -52
- package/types/src/style/INamedStyleCollection.d.ts +72 -0
- package/types/src/style/ISlicerStyleCollection.d.ts +77 -0
- package/types/src/style/IStyleCollection.d.ts +91 -60
- package/types/src/style/ITableStyleCollection.d.ts +89 -0
- package/types/src/style/NamedStyleCollection.d.ts +39 -0
- package/types/src/style/SlicerStyleCollection.d.ts +46 -0
- package/types/src/style/StyleCollection.d.ts +81 -26
- package/types/src/style/TableStyleCollection.d.ts +49 -0
- package/types/src/style/_BuiltInStyleDefs.d.ts +6 -6
- package/types/src/style/_BuiltInStyleNames.d.ts +2 -2
- package/types/src/style/index.d.ts +7 -1
- package/types/src/table/AnchoredTable.d.ts +701 -72
- package/types/src/table/AutoTable.d.ts +7 -5
- package/types/src/table/ITable.d.ts +261 -34
- package/types/src/table/ITableCollection.d.ts +12 -0
- package/types/src/table/ITableStyle.d.ts +37 -37
- package/types/src/table/TableCollection.d.ts +19 -8
- package/types/src/table/_FilterField.d.ts +19 -6
- package/types/src/table/_NamedTable.d.ts +17 -1
- package/types/src/table/_NamedTableSource.d.ts +1 -0
- package/types/src/table/_SortField.d.ts +2 -0
- package/types/src/table/_TableColumn.d.ts +13 -2
- package/types/src/table/_TableMessages.d.ts +1 -0
- package/types/src/table/_TableUtils.d.ts +40 -0
- package/types/src/text/Bullet.d.ts +4 -0
- package/types/src/text/IText.d.ts +182 -0
- package/types/src/text/ITextFrame.d.ts +110 -1
- package/types/src/text/TextBoxAlignment.d.ts +25 -16
- package/types/src/text/TextFrame.d.ts +4 -0
- package/types/src/text/TextLine.d.ts +4 -0
- package/types/src/text/TextParagraph.d.ts +4 -0
- package/types/src/text/TextRotation.d.ts +3 -3
- package/types/src/text/TextRun.d.ts +9 -0
- package/types/src/text/TextStacked.d.ts +83 -0
- package/types/src/text/index.d.ts +1 -0
- package/types/src/text/richtext/IRichText.d.ts +36 -0
- package/types/src/text/richtext/IStyledFont.d.ts +18 -18
- package/types/src/text/richtext/index.d.ts +1 -0
- package/types/src/theme/ITheme.d.ts +45 -4
- package/types/src/theme/IThemeCollection.d.ts +2 -0
- package/types/src/theme/ThemeCollection.d.ts +11 -7
- package/types/src/theme/_OfficeFormatScheme.d.ts +3 -0
- package/types/src/transaction/ITransaction.d.ts +258 -45
- package/types/src/transaction/Transaction.d.ts +101 -11
- package/types/src/transaction/TransactionUndoManager.d.ts +4 -1
- package/types/src/type/AbstractCollection.d.ts +101 -0
- package/types/src/type/ICollection.d.ts +117 -0
- package/types/src/type/ITypes.d.ts +9 -7
- package/types/src/type/index.d.ts +1 -0
- package/types/src/utils/_CSSUtils.d.ts +3 -3
- package/types/src/wasm/_sdkWasm.d.ts +7 -0
- package/types/src/wasm/index.d.ts +2 -0
- package/types/src/wasm/sdkWasm.d.ts +29 -0
- package/types/src/workbook/IWorkbook.d.ts +180 -40
- package/types/src/workbook/Workbook.d.ts +123 -10
- package/types/src/workbook/_WorkbookIntents.d.ts +36 -0
- package/types/src/workbookProtection/IWorkbookProtection.d.ts +7 -0
- package/types/src/workbookProtection/WorkbookProtection.d.ts +3 -0
- package/types/src/workbookView/IWorkbookView.d.ts +12 -0
- package/types/src/workbookView/WorkbookView.d.ts +5 -0
- package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
- package/browser/cjs/BF14ZEAnaqxXroSj.cjs +0 -1
- package/browser/cjs/BXtvdT1Z-MsB_o5F.cjs +0 -1
- package/browser/cjs/Bc4JjVVZfFo3R4He.cjs +0 -33
- package/browser/cjs/CD2RXdnfqSYNc6gX.cjs +0 -57
- package/browser/cjs/DcLpXGexEtOxi-dD.cjs +0 -1
- package/browser/cjs/Dv3x6zut1ZRUt3IF.cjs +0 -10
- package/browser/cjs/index.cjs +0 -3
- package/browser/esm/0Mj5WKM362q6CECb.mjs +0 -824
- package/browser/esm/CPTtL2f6_4iblmFM.mjs +0 -4436
- package/browser/esm/CoA-sUxjiIUIpTUF.mjs +0 -109
- package/browser/esm/Dy4Sdpju1T2icURu.mjs +0 -50854
- package/node/esm/BtGxbEbBm79YvF_k.mjs +0 -843
- package/node/esm/DqgWsVXROpSgKq6c.mjs +0 -114
- package/types/src/cellRange/_GraphNode.d.ts +0 -38
- package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +0 -12
- package/types/src/dataValidation/_Utils.d.ts +0 -10
- package/types/src/lib/utils/_Utils.d.ts +0 -20
- package/types/src/lib/utils/utils.browser.d.ts +0 -33
- package/types/src/movable/IGroup.d.ts +0 -30
- package/types/src/movable/IMovableSelection.d.ts +0 -49
- package/types/src/sheet/listener/RangesListener.d.ts +0 -32
- package/types/src/sheet/listener/RangesListenerEntry.d.ts +0 -19
- package/types/src/sheet/listener/index.d.ts +0 -3
- /package/types/src/{lib/utils → license}/banner.d.ts +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The clone boundary: a test mode that treats the model/engine crossing as if it were a wire
|
|
3
|
+
* (DESIGN-CALC-SERVICE §11, goal G1, plan step 6).
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Every request into a grid and every {@link ICalcGrid.Results} out of one passes through here.
|
|
7
|
+
* With the mode `off` - always, outside a test - it is an identity call and costs nothing.
|
|
8
|
+
*
|
|
9
|
+
* Two things it finds, and they are different:
|
|
10
|
+
*
|
|
11
|
+
* - What a walk can see: a function, a class instance, a value `structuredClone` refuses or
|
|
12
|
+
* silently downgrades. Each is recorded as a {@link Violation} with the PATH it sat at, which
|
|
13
|
+
* is the point: a payload that degrades silently fails somewhere else entirely, and the path
|
|
14
|
+
* is what names the field to convert.
|
|
15
|
+
* - What only running can see: a reference the two sides SHARE. A walk cannot tell a run array
|
|
16
|
+
* the sheet also holds from one minted for the message; a clone does, because the sides stop
|
|
17
|
+
* agreeing. That is what `clone` mode is for, and why `audit` alone is not the exit criterion.
|
|
18
|
+
*
|
|
19
|
+
* Not a boundary for READS. `getValues`, `getFormulas`, `getSnapshot` and the graph walks answer
|
|
20
|
+
* synchronously out of engine objects; making them push or await is §11's list, not this one.
|
|
21
|
+
* This covers what is already message-shaped.
|
|
22
|
+
*
|
|
23
|
+
* @internal Test-mode only. Deliberately not exported from the barrel.
|
|
24
|
+
*/
|
|
25
|
+
export declare namespace CloneBoundary {
|
|
26
|
+
/**
|
|
27
|
+
* `off` is the default and the only mode outside a test.
|
|
28
|
+
*
|
|
29
|
+
* `audit` records what would not survive the crossing and passes the ORIGINAL through, so a
|
|
30
|
+
* suite stays green and the run produces the list. `clone` substitutes the
|
|
31
|
+
* `structuredClone` - the real wire - and is the exit criterion for "ready for a worker".
|
|
32
|
+
*/
|
|
33
|
+
type Mode = 'off' | 'audit' | 'clone';
|
|
34
|
+
/** What a value at a path does to a `structuredClone`. */
|
|
35
|
+
type ViolationKind =
|
|
36
|
+
/** A function or a symbol: `structuredClone` throws. */
|
|
37
|
+
'function'
|
|
38
|
+
/** A class instance: cloned as a plain object, its methods gone, and nothing says so. */
|
|
39
|
+
| 'live'
|
|
40
|
+
/** An `Error` subclass: clones to a bare `Error` - the subclass and its own fields are lost. */
|
|
41
|
+
| 'downgraded';
|
|
42
|
+
interface Violation {
|
|
43
|
+
/** Which crossing: `'request:setInputs'`, `'results:onCalculated'`, ... */
|
|
44
|
+
where: string;
|
|
45
|
+
/** Where in the payload, with array indices collapsed: `results.formulaInserts[].value`. */
|
|
46
|
+
path: string;
|
|
47
|
+
kind: ViolationKind;
|
|
48
|
+
/** The constructor name, or `'function'` / `'symbol'`. */
|
|
49
|
+
type: string;
|
|
50
|
+
}
|
|
51
|
+
/** Thrown by `clone` mode when the payload cannot be cloned at all. */
|
|
52
|
+
class BoundaryError extends Error {
|
|
53
|
+
readonly violations: readonly Violation[];
|
|
54
|
+
constructor(where: string, violations: readonly Violation[], cause: unknown);
|
|
55
|
+
}
|
|
56
|
+
/** Sets the mode. Anything but a known mode (including `undefined`) is `off`. */
|
|
57
|
+
const setMode: (mode: string | null | undefined) => void;
|
|
58
|
+
const getMode: () => Mode;
|
|
59
|
+
/**
|
|
60
|
+
* Called once per DISTINCT violation (a payload of 50000 cells reports its field once), so a
|
|
61
|
+
* host can write the run's list somewhere a test runner does not swallow.
|
|
62
|
+
*/
|
|
63
|
+
const setListener: (listener: ((violation: Violation) => void) | null) => void;
|
|
64
|
+
/** Every distinct violation seen since the mode was set. */
|
|
65
|
+
const getViolations: () => readonly Violation[];
|
|
66
|
+
const clearViolations: () => void;
|
|
67
|
+
/**
|
|
68
|
+
* A request on its way to a grid.
|
|
69
|
+
*
|
|
70
|
+
* @param where The request's `type`, for the report.
|
|
71
|
+
*/
|
|
72
|
+
const request: <T>(request: T, where: string) => T;
|
|
73
|
+
/**
|
|
74
|
+
* An {@link ICalcGrid.Results} on its way back: a resolution, or a record the engine pushed.
|
|
75
|
+
*
|
|
76
|
+
* @param where Which of the two, for the report.
|
|
77
|
+
*/
|
|
78
|
+
const results: <T>(results: T, where: string) => T;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=_CloneBoundary.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IRange } from '@sheetxl/primitives';
|
|
2
|
+
import { ICalculation } from './ICalculation';
|
|
3
|
+
/**
|
|
4
|
+
* Re-points every structured reference that names the table `from` at the table `to`. A
|
|
5
|
+
* reference with no table name is left alone: it names the table it is written in.
|
|
6
|
+
*/
|
|
7
|
+
export declare function renameTableTransform(from: string, to: string): ICalculation.FormulaTransform;
|
|
8
|
+
/**
|
|
9
|
+
* `text`, parsed at `at`, with its references to the table `from` re-pointed at `to`, or the text
|
|
10
|
+
* itself when it names no such table or does not parse.
|
|
11
|
+
*/
|
|
12
|
+
export declare function renameTableInText(text: string, at: IRange.CellCoords, from: string, to: string): string;
|
|
13
|
+
//# sourceMappingURL=_TableRename.d.ts.map
|
|
@@ -43,6 +43,38 @@ export interface ASTNode<T extends TokenType = TokenType, V = any> {
|
|
|
43
43
|
* @see {@link ICalculation.FormulaToken.evalIndex}
|
|
44
44
|
*/
|
|
45
45
|
evalIndex?: number;
|
|
46
|
+
/**
|
|
47
|
+
* Compile-time: the implicit-intersection MODE this call is evaluated in — `true` VALUE mode
|
|
48
|
+
* (a multi-cell reference at a single-value slot intersects with the formula cell), `false`
|
|
49
|
+
* ARRAY mode (it reads its first cell). Set on `Function` and `Call` nodes by
|
|
50
|
+
* `CompilerUtils.annotateImplicitIntersect` (DESIGN-IMPLICIT-INTERSECTION §2).
|
|
51
|
+
*/
|
|
52
|
+
implicitIntersect?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Compile-time: under a first-cell DEMAND (a block whose every cell is its own 1x1 array-entered
|
|
55
|
+
* extent — a conditional-format body), only element `[0,0]` of this node's result is ever read,
|
|
56
|
+
* so a lift or an operator here builds that one element. Set on every node reachable from the
|
|
57
|
+
* root through elementwise positions by `CompilerUtils.annotateFirstCell`
|
|
58
|
+
* (DESIGN-LIFT-AND-DEMAND §2); inert unless the block evaluating the formula demands it.
|
|
59
|
+
*/
|
|
60
|
+
firstCell?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Compile-time: this `+`/`-` is the root of a formula body — the formula's own root or a
|
|
63
|
+
* `LAMBDA`'s body — so a cancelling result snaps to 0 (`Operators.RootInfix`). Set by
|
|
64
|
+
* `CompilerUtils.compileAST`.
|
|
65
|
+
*/
|
|
66
|
+
snapsCancellation?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* The ROOT only: the formula came from a LEGACY cell, so `annotateImplicitIntersect` gives its
|
|
69
|
+
* WHOLE tree value mode instead of deriving a mode per node. Carried in from the reader's
|
|
70
|
+
* transform (`ICalculation.FormulaNode.legacyIntersect`); never persisted.
|
|
71
|
+
*/
|
|
72
|
+
legacyIntersect?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Compile-time memo: whether this expression is statically array-valued (a range, an array
|
|
75
|
+
* literal, an array-returning call, an operator over one). Read by the mode annotation.
|
|
76
|
+
*/
|
|
77
|
+
arrayValued?: boolean;
|
|
46
78
|
/**
|
|
47
79
|
* For live editing. We may need to add original start/end offsets to align?
|
|
48
80
|
*
|
|
@@ -91,6 +123,13 @@ export interface ASTNode<T extends TokenType = TokenType, V = any> {
|
|
|
91
123
|
* converts the sentinel to blank.
|
|
92
124
|
*/
|
|
93
125
|
rawFrameRead?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Set by the binder pass on an `IF`/`IFERROR`/`IFNA` call whose answer can reach `ISOMITTED`
|
|
128
|
+
* — its direct argument, a `LET` binding's value, or such a call's own argument. The call
|
|
129
|
+
* passes an EMPTY argument on as the OMITTED sentinel (`ISOMITTED(IF(TRUE,))` is TRUE), where
|
|
130
|
+
* an unstamped call reads it as blank.
|
|
131
|
+
*/
|
|
132
|
+
passOmitted?: boolean;
|
|
94
133
|
/**
|
|
95
134
|
* Set by the compiler on a `named` node INSIDE a `LAMBDA` body: resolved at apply time, not in
|
|
96
135
|
* the eager reference pass.
|
|
@@ -102,6 +141,38 @@ export interface ASTNode<T extends TokenType = TokenType, V = any> {
|
|
|
102
141
|
* accepted cost — design §3.4); only the eager VALUE resolution is skipped.
|
|
103
142
|
*/
|
|
104
143
|
deferredResolve?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Set by the compiler on an argument node that binds to a `Lazy` parameter: the ENGINE hands the
|
|
146
|
+
* body a handle over this subtree instead of its value.
|
|
147
|
+
*
|
|
148
|
+
* @remarks
|
|
149
|
+
* The subtree is absent from the eager execution list (the same carve-out a `LAMBDA` body gets)
|
|
150
|
+
* and is evaluated only if the call's answer turns out to be the handle. An `Empty` argument is
|
|
151
|
+
* never marked — an omitted comma is a value the caller supplied, and it marshals as one.
|
|
152
|
+
*/
|
|
153
|
+
lazyArg?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Set by the compiler on every node WITHIN a lazy argument's subtree, the root included. What
|
|
156
|
+
* the execution-list carve-out reads.
|
|
157
|
+
*/
|
|
158
|
+
inLazy?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Set by the compiler on a call node that has at least one {@link lazyArg} — so the hot argument
|
|
161
|
+
* loop pays one boolean for a feature almost no call uses.
|
|
162
|
+
*/
|
|
163
|
+
hasLazyArgs?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Set by the compiler on the ROOT of a deferred subtree — a `LAMBDA` body or a {@link lazyArg} —
|
|
166
|
+
* to the post-order execution list of that subtree, the root included: the same shape as
|
|
167
|
+
* `CompiledFormula.executions`, for the piece of the formula the eager pass leaves out.
|
|
168
|
+
*
|
|
169
|
+
* @remarks
|
|
170
|
+
* A nested root's nodes are on the nested list, not this one (its root node is here, and
|
|
171
|
+
* evaluating it closes over or defers what is underneath). A bound name executes wherever it
|
|
172
|
+
* sits; an unbound name (`deferredResolve`) is on the list too, since the eager reference pass
|
|
173
|
+
* skips it and resolving it is what the deferral is for.
|
|
174
|
+
*/
|
|
175
|
+
deferred?: ASTNode[];
|
|
105
176
|
/**
|
|
106
177
|
* If ast had an error.
|
|
107
178
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormulaError, IFunction, IRuntime } from '@sheetxl/primitives';
|
|
2
2
|
import { ICalculation } from '../ICalculation';
|
|
3
|
-
import { ISymbolRegistry } from '../symbol';
|
|
3
|
+
import { ISymbolRegistry, SheetCtx } from '../symbol';
|
|
4
4
|
import { TokenType } from '../TokenType';
|
|
5
5
|
import { CompiledFormula, ParseError } from './Types';
|
|
6
6
|
import { ASTNode } from './ASTTypes';
|
|
@@ -62,6 +62,30 @@ export declare function normalizeStructuredRefs(ast: ASTNode): ASTNode;
|
|
|
62
62
|
* @returns A new AST (structurally shared where unchanged).
|
|
63
63
|
*/
|
|
64
64
|
export declare function rewriteThisRowToAt(ast: ASTNode): ASTNode;
|
|
65
|
+
/**
|
|
66
|
+
* Collapses a table reference with EMPTY brackets to the bare table name: `Table1[]` → `Table1`.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* Both are the data body. Excel accepts either on entry and shows the bare name; on disk it writes
|
|
70
|
+
* `Table1[]`, which is io-xlsx's spelling. Commit-path only, the boundary {@link rewriteThisRowToAt}
|
|
71
|
+
* observes. A reference with no table name (`[]`) and an unterminated one are left alone.
|
|
72
|
+
*
|
|
73
|
+
* @returns A new AST (structurally shared where unchanged).
|
|
74
|
+
*/
|
|
75
|
+
export declare function collapseEmptyStructuredRefs(ast: ASTNode): ASTNode;
|
|
76
|
+
/**
|
|
77
|
+
* Gives an unqualified structured reference (`[@Qty]`, `[#All]`) its table name: `Table1[@Qty]`.
|
|
78
|
+
*
|
|
79
|
+
* @remarks
|
|
80
|
+
* Linking already bound it to the table at the formula's cell; this drops the typed image that kept
|
|
81
|
+
* the name out of the text. Every reference is stored qualified, as Excel writes it. Which ones show
|
|
82
|
+
* without the name is decided at display time, from where the formula sits.
|
|
83
|
+
*
|
|
84
|
+
* Commit-path only, the boundary {@link rewriteThisRowToAt} observes: an editor keeps what was typed.
|
|
85
|
+
*
|
|
86
|
+
* @returns A new AST (structurally shared where unchanged).
|
|
87
|
+
*/
|
|
88
|
+
export declare function qualifyStructuredRefs(ast: ASTNode): ASTNode;
|
|
65
89
|
/**
|
|
66
90
|
* Sorts the items inside every `TableReference` into Excel's canonical order — section specifiers
|
|
67
91
|
* in band order (`#All` | `#Headers`, `#Data`, `#Totals`), then the column selector.
|
|
@@ -81,6 +105,55 @@ export declare function rewriteThisRowToAt(ast: ASTNode): ASTNode;
|
|
|
81
105
|
* @returns A new AST (structurally shared where unchanged).
|
|
82
106
|
*/
|
|
83
107
|
export declare function reorderStructuredRefItems(ast: ASTNode): ASTNode;
|
|
108
|
+
/**
|
|
109
|
+
* Annotates every call node with its implicit-intersection MODE (DESIGN-IMPLICIT-INTERSECTION §2,
|
|
110
|
+
* measured on Excel 16.0 by `probe-ii-propagation{,2,3}.ps1`): `true` is VALUE mode, where a
|
|
111
|
+
* multi-cell reference at a single-value slot intersects with the formula cell; `false` is ARRAY
|
|
112
|
+
* mode, where it reads its first cell. The mode is INHERITED — a call evaluates its arguments in
|
|
113
|
+
* the mode it was given — and set at four places only:
|
|
114
|
+
*
|
|
115
|
+
* - the root: array mode when the root expression is statically array-valued (`=LINEST(..)`,
|
|
116
|
+
* `=TRANSPOSE(..)`, `=A1:A3+0`), value mode when it is scalar (`=SUM(..)`, `=INDEX(..,1,1)`);
|
|
117
|
+
* - an operand of an operator, or the argument at a lifting scalar slot, when that operand is
|
|
118
|
+
* array-valued (the lift needs the whole array);
|
|
119
|
+
* - a `LAMBDA` body, always;
|
|
120
|
+
* - an array-entered block, at evaluation (`CalculationContext.isImplicitIntersect`).
|
|
121
|
+
*
|
|
122
|
+
* A LEGACY (pre-dynamic-array) formula skips all four: its WHOLE tree is value mode, which is the
|
|
123
|
+
* era's own regime (DESIGN-IMPLICIT-INTERSECTION §2, `probe-ii-propagation3.ps1` §I —
|
|
124
|
+
* `=SUM(LINEST(y,x,ref)+0)` intersects in a legacy cell where the operator would otherwise give
|
|
125
|
+
* the call array mode). It changes the answer for the LINEST family's logical slots ALONE: every
|
|
126
|
+
* other legacy site Excel spells with an `@`, which the reader's transform has already inserted,
|
|
127
|
+
* and the two slots that take no `@` either read their first cell in both eras (`N`, `T`) or
|
|
128
|
+
* intersect in both (`AGGREGATE`'s `k`).
|
|
129
|
+
*
|
|
130
|
+
* "Array-valued" is static: a range or array literal, a call whose declared return is an array or
|
|
131
|
+
* a reference, an operator over one, a pass-through (`IF`, `IFERROR`, …) over one, `INDEX` with a
|
|
132
|
+
* zero, empty or array index, a name or a lambda application (unknown, so array — what Excel does
|
|
133
|
+
* at the root). The two runtime refinements Excel makes (`INDEX` on a CELL holding 0, and a
|
|
134
|
+
* defined name taking the mode of its reference site) are not modelled here.
|
|
135
|
+
*/
|
|
136
|
+
export declare function annotateImplicitIntersect(root: ASTNode, getFunction: ((name: string) => IFunction | null) | null | undefined, legacy?: boolean): void;
|
|
137
|
+
/**
|
|
138
|
+
* Annotates the nodes whose result is read only at element `[0,0]` when the formula is evaluated
|
|
139
|
+
* under a first-cell demand (DESIGN-LIFT-AND-DEMAND §2, PLAN-CF-BODY-DEMAND step 3): the body of a
|
|
140
|
+
* block whose every cell is its own 1x1 array-entered extent, which is how Excel evaluates a
|
|
141
|
+
* conditional-format formula.
|
|
142
|
+
*
|
|
143
|
+
* @remarks
|
|
144
|
+
* The demand starts at the root and is INHERITED through elementwise positions only — an operator
|
|
145
|
+
* that is not a reference operator, a one-element paren, a lifting scalar slot, an `any` slot
|
|
146
|
+
* (`IF`/`IFS`/`SWITCH`/`CHOOSE` arms, which size and sample in the lift), a `LET` body. At each of
|
|
147
|
+
* those `[0,0]` of the output depends only on `[0,0]` of each operand, and `(0,0)` is never a pad,
|
|
148
|
+
* so computing one element is computing `[0,0]`. It stops (`false`) at every other position: a
|
|
149
|
+
* range, array, reference-only, lambda or flattened slot takes its argument whole (`SUM` still sees
|
|
150
|
+
* the array), and so do a reference operator, `@`, a name, a lambda body and a `LET` binding (a
|
|
151
|
+
* binding may be read under an aggregate).
|
|
152
|
+
*
|
|
153
|
+
* Idempotent and a property of the tree alone, so a compiled formula shared by several blocks
|
|
154
|
+
* carries it harmlessly: nothing reads it unless the block evaluating the formula demands it.
|
|
155
|
+
*/
|
|
156
|
+
export declare function annotateFirstCell(root: ASTNode, getFunction: ((name: string) => IFunction | null) | null | undefined): void;
|
|
84
157
|
export declare function compileAST(runtime: IRuntime, symbols: ISymbolRegistry | undefined, original: ASTNode, preserveExpression?: boolean, error?: ParseError | null, getFunction?: ((name: string) => IFunction | null) | null): CompiledFormula;
|
|
85
158
|
/**
|
|
86
159
|
* Convert a chevrotain error into a {@link FormulaError.Parse}.
|
|
@@ -279,35 +352,52 @@ export declare const findInvalidCallee: (root: ASTNode, getFunction: ((name: str
|
|
|
279
352
|
*/
|
|
280
353
|
export declare function rewriteUnknownFunctionCalls(root: ASTNode, getFunction: ((name: string) => IFunction | null) | null): ASTNode;
|
|
281
354
|
/**
|
|
282
|
-
*
|
|
283
|
-
*
|
|
355
|
+
* `bound` with `name` added last — an inner declaration replaces an outer one spelled the same
|
|
356
|
+
* (case-insensitively). Builds {@link ICalculation.FormulaTokenContext.bound}.
|
|
357
|
+
*/
|
|
358
|
+
export declare function appendBound(bound: readonly ICalculation.BoundName[] | undefined, entry: ICalculation.BoundName): readonly ICalculation.BoundName[];
|
|
359
|
+
/**
|
|
360
|
+
* The declarations of a literal `LAMBDA(…)` node, as {@link ICalculation.BoundName.params}, or
|
|
361
|
+
* `undefined` for any other node.
|
|
362
|
+
*/
|
|
363
|
+
export declare function lambdaParamsOf(node: ASTNode | undefined): ICalculation.BoundName['params'];
|
|
364
|
+
export declare function bindScopes(root: ASTNode, getFunction?: ((name: string) => IFunction | null) | null): ASTNode;
|
|
365
|
+
/**
|
|
366
|
+
* Re-reads every REFERENCE token in the formula as a NAME, when any `LET`/`LAMBDA` declaration
|
|
367
|
+
* position is a cell reference.
|
|
284
368
|
*
|
|
285
|
-
* @param root The parsed AST
|
|
369
|
+
* @param root The parsed AST.
|
|
286
370
|
* @param getFunction Resolves a function name to its declaration; see {@link _binderKind}.
|
|
287
|
-
* @returns A new root,
|
|
371
|
+
* @returns A new root, the SAME root when no declaration is reference-shaped, or a MESSAGE when
|
|
372
|
+
* the formula has to be refused at entry.
|
|
288
373
|
*
|
|
289
374
|
* @remarks
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
*
|
|
375
|
+
* `LET(A1,7,A1)` is 7 in Excel, and the consequence is far wider than the name that caused it:
|
|
376
|
+
* ONE reference-shaped declaration anywhere in a formula stops EVERY A1-style token in that
|
|
377
|
+
* formula from reading as a cell. It is not a scope rule and not a shadow — the switch covers the
|
|
378
|
+
* whole formula text, measured in every direction (probe-let-ref-names.ps1):
|
|
379
|
+
*
|
|
380
|
+
* | formula | Excel |
|
|
381
|
+
* | --- | --- |
|
|
382
|
+
* | `LET(BA1,7,BA1)` | 7 — the declaration resolves |
|
|
383
|
+
* | `LET(BA1,7,BA2)` | `#NAME?` — a token bound nowhere no longer names a cell |
|
|
384
|
+
* | `LET(BA1,BA2,BA1)` | `#NAME?` — the declaration's OWN value expression is included |
|
|
385
|
+
* | `BA2+LET(BA1,7,BA1)` | `#NAME?` — so is text BEFORE the `LET`, outside it |
|
|
386
|
+
* | `LET(BA1,7,BA1)+LET(q,1,q+BA2)` | `#NAME?` — and an unrelated SIBLING scope |
|
|
387
|
+
* | `LET(BA1,7,BA2,9,BA1+BA2)` | 16 — two declarations, both resolving |
|
|
388
|
+
* | `LET(BA1,7,BA2,9,SUM(BA1:BA2))` | `#VALUE!` — `7:9`, the range OPERATOR over two values |
|
|
389
|
+
*
|
|
390
|
+
* Excel refuses to create a defined name that looks like a cell reference, so a re-read token can
|
|
391
|
+
* only resolve to a `LET`/`LAMBDA` declaration; everything else is `#NAME?`, which is what the
|
|
392
|
+
* ordinary resolver answers once the node is a name. That is why this pass has no resolution of
|
|
393
|
+
* its own — it changes what the tokens ARE and lets `bindScopes` and the resolver do the rest.
|
|
394
|
+
*
|
|
395
|
+
* The one entry refusal is `$`: a name cannot contain one, so under the switch any `$` in an
|
|
396
|
+
* A1-style token makes the formula untypeable — in a declaration or in a use, on one axis or both
|
|
397
|
+
* (`LET(BA1,7,BA1+$BA$2)`, `LET(BA1,7,BA1+BA$2)`, `LET($BA$1,7,$BA$1)`;
|
|
398
|
+
* probe-let-ref-names2.ps1 §B).
|
|
309
399
|
*/
|
|
310
|
-
export declare
|
|
400
|
+
export declare const retypeReferenceBinders: (root: ASTNode, getFunction?: ((name: string) => IFunction | null) | null) => ASTNode | string;
|
|
311
401
|
/**
|
|
312
402
|
* Finds a malformed `LET`/`LAMBDA` scope — a shape Excel refuses at ENTRY.
|
|
313
403
|
*
|
|
@@ -318,29 +408,30 @@ export declare function bindScopes(root: ASTNode, getFunction?: ((name: string)
|
|
|
318
408
|
* @remarks
|
|
319
409
|
* Same channel and same reason as {@link findArityViolation}: Excel decides these before the
|
|
320
410
|
* formula can exist, so we do too — a refused shape is a parse error, not a cell that evaluates to
|
|
321
|
-
* something.
|
|
322
|
-
* (`
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
* Duplicates compare case-INSENSITIVELY (Excel keys them in a `stringCompareCI` map), the same
|
|
328
|
-
* normalization a name comparison gets everywhere else.
|
|
411
|
+
* something. Excel refuses a duplicate, invalid or missing binder per declaration, and a `LET`
|
|
412
|
+
* with too few arguments — at least `max(3, n + 1 + n % 2)` for `n` arguments, the `n % 2` term
|
|
413
|
+
* being exactly the even-argument-count refusal.
|
|
414
|
+
*
|
|
415
|
+
* Duplicates compare case-INSENSITIVELY, the same normalization a name comparison gets everywhere
|
|
416
|
+
* else.
|
|
329
417
|
*/
|
|
330
418
|
export declare const findBinderViolation: (root: ASTNode, getFunction: ((name: string) => IFunction | null) | null) => string | null;
|
|
419
|
+
export declare function linkSymbols(ast: ASTNode, symbols: ISymbolRegistry, scope?: string | null, sheetCtx?: SheetCtx, home?: {
|
|
420
|
+
rowIndex: number;
|
|
421
|
+
colIndex: number;
|
|
422
|
+
} | null): ASTNode;
|
|
331
423
|
/**
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
* @returns The updated AST with linked symbols.
|
|
424
|
+
* The first structured reference Excel refuses at entry, after {@link linkSymbols}: an unqualified one
|
|
425
|
+
* (`[@Qty]`) whose formula is not in a table or whose table has no such column, and a qualified one
|
|
426
|
+
* naming a table that does not exist (`Nope[Qty]`) or a column its table does not have
|
|
427
|
+
* (`Table1[Nope]`).
|
|
428
|
+
*
|
|
429
|
+
* @remarks
|
|
430
|
+
* A bare name (`=Nope`) is not a structured reference and is not refused: it is `#NAME?`.
|
|
431
|
+
*
|
|
432
|
+
* @returns A message, or `null` when every structured reference names its table's columns.
|
|
342
433
|
*/
|
|
343
|
-
export declare function
|
|
434
|
+
export declare function findUnboundTableReference(ast: ASTNode, symbols?: ISymbolRegistry): string | null;
|
|
344
435
|
/**
|
|
345
436
|
* Returns a new AST with every relative Cell node's coordinates shifted by (rowDelta, colDelta),
|
|
346
437
|
* wrapping out-of-bounds results within [0, max) (Excel behavioral).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IFunction, IRuntime } from '@sheetxl/primitives';
|
|
2
|
-
import { ISymbolRegistry } from '../symbol';
|
|
2
|
+
import { ISymbolRegistry, SheetCtx } from '../symbol';
|
|
3
3
|
import { ICalculation } from '../ICalculation';
|
|
4
4
|
import { IFormulaCompiler, CompiledFormula } from './Types';
|
|
5
5
|
import { FormulaParseOptions } from './FormulaParser';
|
|
@@ -37,13 +37,16 @@ export declare class FormulaCompiler implements IFormulaCompiler {
|
|
|
37
37
|
private readonly _editing;
|
|
38
38
|
constructor(options?: FormulaCompilerOptions);
|
|
39
39
|
/** @inheritdoc IFormulaCompiler.compile */
|
|
40
|
-
compile(runtime: IRuntime, rowIndex: number, colIndex: number, expression: string, symbols?: ISymbolRegistry, getFunction?: ((name: string) => IFunction | null) | null, scope?: string | null,
|
|
40
|
+
compile(runtime: IRuntime, rowIndex: number, colIndex: number, expression: string, symbols?: ISymbolRegistry, getFunction?: ((name: string) => IFunction | null) | null, scope?: string | null, legacyIntersect?: boolean, sheetCtx?: SheetCtx): CompiledFormula;
|
|
41
41
|
/** @inheritdoc IFormulaCompiler.autoCorrect */
|
|
42
42
|
autoCorrect(expression: string): string | null;
|
|
43
43
|
/**
|
|
44
44
|
* The zero-recovery parse-failure result: a compiled formula whose only token is the raw expression
|
|
45
45
|
* as `unparsed`, evaluating to the parse error. Nothing is lost (the text round-trips), nothing is
|
|
46
46
|
* spent — this is the calc profile's entire failure path, and editing's last resort.
|
|
47
|
+
*
|
|
48
|
+
* `partialTable` (editing only): an expression that is nothing but a structured reference being
|
|
49
|
+
* typed (`[@Co`) still gets its table tokens — no prefix parses, so recovery never reaches it.
|
|
47
50
|
*/
|
|
48
51
|
private _compileUnparsed;
|
|
49
52
|
/**
|
|
@@ -61,9 +64,31 @@ export declare class FormulaCompiler implements IFormulaCompiler {
|
|
|
61
64
|
* Append the un-parseable `tail` to `tokens` as `unparsed` token(s): stamp the enclosing function
|
|
62
65
|
* context (from the last token that has one) so a caret in the tail still resolves to the right
|
|
63
66
|
* function + argument, and split off a trailing identifier run (`[A-Za-z_][A-Za-z0-9_]*` at a token
|
|
64
|
-
* boundary, not glued to a preceding digit like `12abc`) as its own `
|
|
65
|
-
* name being typed can still drive
|
|
67
|
+
* boundary, not glued to a preceding digit like `12abc`) as its own `named` token — what it would
|
|
68
|
+
* parse as once the rest of the formula does — so a partial name being typed can still drive
|
|
69
|
+
* autocomplete.
|
|
70
|
+
*
|
|
71
|
+
* A tail ending inside a structured reference's brackets (`Sales[Co`) becomes that reference's
|
|
72
|
+
* tokens instead — see {@link appendPartialStructuredReference}.
|
|
66
73
|
*/
|
|
67
74
|
private _appendUnparsedTail;
|
|
68
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Append a structured reference still being typed at the end of `tail` — `Sales[`, `Sales[Co`,
|
|
78
|
+
* `Sales[#Da`, `Sales[[#This Row],[Co`, `[@Co` — as the tokens it will be once it closes, in the shape
|
|
79
|
+
* `generateFormulaTokens` gives a complete one: a `tableReference` for the name, `paren` tokens for every
|
|
80
|
+
* bracket, and a `tableColumn` / `tableSpecifier` per part whose value is an
|
|
81
|
+
* {@link ICalculation.TablePartRef} naming the table (`''` when unqualified).
|
|
82
|
+
*
|
|
83
|
+
* The unfinished part is marked `partial` with what may finish it, and a part not yet started — right
|
|
84
|
+
* after the `[` or `@` that opened it — is an empty token, so an editor completes from the tokens alone.
|
|
85
|
+
*
|
|
86
|
+
* The name may already sit in `tokens` as the `named` token the parsed prefix ended with; it is
|
|
87
|
+
* re-typed in place. Anything in `tail` before the reference is one `unparsed` token.
|
|
88
|
+
*
|
|
89
|
+
* @returns `false`, with `tokens` untouched, when the tail does not end inside a structured reference.
|
|
90
|
+
*/
|
|
91
|
+
export declare function appendPartialStructuredReference(tokens: ICalculation.FormulaToken[], tail: string, context: ICalculation.FormulaTokenContext | undefined,
|
|
92
|
+
/** The display name of the table at the formula's cell, which an unqualified reference names. */
|
|
93
|
+
homeTable?: () => string | undefined): boolean;
|
|
69
94
|
//# sourceMappingURL=FormulaCompiler.d.ts.map
|
|
@@ -4,7 +4,6 @@ import { ASTNode, ParseResult } from './ASTTypes';
|
|
|
4
4
|
import { FormulaLexer, FormulaLexerOptions } from './FormulaLexer';
|
|
5
5
|
import { CompilerLocale } from './CompilerLocale';
|
|
6
6
|
import { SRParser } from './SRParser';
|
|
7
|
-
import { ICalculation } from '../ICalculation';
|
|
8
7
|
declare module 'chevrotain' {
|
|
9
8
|
interface EmbeddedActionsParser {
|
|
10
9
|
getLexerPosition(): number;
|
|
@@ -80,7 +79,7 @@ export declare class FormulaParser extends EmbeddedActionsParser {
|
|
|
80
79
|
* none, so `=_xlfn.SUM(A1)` typed is an unknown name, as in Excel. Runs where the hardcoded
|
|
81
80
|
* legacy visit used to run — no extra parse.
|
|
82
81
|
*/
|
|
83
|
-
parse(rowIndex: number, colIndex: number, expression: string
|
|
82
|
+
parse(rowIndex: number, colIndex: number, expression: string): ParseResult;
|
|
84
83
|
/**
|
|
85
84
|
* Parses a flat sequence of infix-operator / operand pairs, then folds them into a
|
|
86
85
|
* left-associative AST using the precedence table in `ParserUtils.binaryOperatorsPrecedence`.
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { ICalculation } from '../ICalculation';
|
|
2
2
|
import { ISymbolRegistry } from '../symbol';
|
|
3
3
|
import { ASTNode } from './ASTTypes';
|
|
4
|
+
/**
|
|
5
|
+
* The public node view of an internal AST — what {@link ICalculation.IFormula.getNode} answers.
|
|
6
|
+
*
|
|
7
|
+
* @param root The internal AST root.
|
|
8
|
+
* @param symbols The registry the AST was linked against.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toFormulaNode(root: ASTNode, symbols: ISymbolRegistry | null | undefined): ICalculation.FormulaNode;
|
|
4
11
|
/**
|
|
5
12
|
* Applies a public {@link ICalculation.FormulaTransform} to an internal AST.
|
|
6
13
|
*
|
|
@@ -12,4 +19,14 @@ import { ASTNode } from './ASTTypes';
|
|
|
12
19
|
* that identity to skip recompilation.
|
|
13
20
|
*/
|
|
14
21
|
export declare function applyTransformToAST(root: ASTNode, transform: ICalculation.FormulaTransform, symbols?: ISymbolRegistry | null): ASTNode;
|
|
22
|
+
/**
|
|
23
|
+
* Walks a lite tree with a transform, post-order, and returns the transformed root: the SAME
|
|
24
|
+
* object when nothing changed.
|
|
25
|
+
*/
|
|
26
|
+
export declare function transformFormulaNode(root: ICalculation.FormulaNode, transform: ICalculation.FormulaTransform): ICalculation.FormulaNode;
|
|
27
|
+
/**
|
|
28
|
+
* Rebuilds an AST from a lite tree: nodes a transform left alone come back as the AST nodes they
|
|
29
|
+
* were made from, replacements are built fresh.
|
|
30
|
+
*/
|
|
31
|
+
export declare function fromFormulaNode(root: ICalculation.FormulaNode): ASTNode;
|
|
15
32
|
//# sourceMappingURL=LiteTransform.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormulaError, IRange } from '@sheetxl/primitives';
|
|
2
|
+
import { ICalculation } from '../ICalculation';
|
|
2
3
|
import { CompilerLocale } from './CompilerLocale';
|
|
3
4
|
import { ASTNode, ASTVisitor, CellNode, FunctionNode } from './ASTTypes';
|
|
4
5
|
/**
|
|
@@ -49,6 +50,21 @@ export declare function createTableReference(value: string, inputs: any[]): ASTN
|
|
|
49
50
|
* word → canonical. Display re-imaging (`tokensToString`) re-localizes for a localized target.
|
|
50
51
|
*/
|
|
51
52
|
export declare function createTableSpecifier(image: string, locale?: CompilerLocale): ASTNode;
|
|
53
|
+
/**
|
|
54
|
+
* A column name as a structured reference spells it: a `'` before each `[`, `]`, `#` and `'`,
|
|
55
|
+
* which is Excel's escape inside a column specifier. Without it a name holding a bracket cannot be
|
|
56
|
+
* referenced at all — the bracket would close the reference.
|
|
57
|
+
*/
|
|
58
|
+
export declare function escapeColumnName(name: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* The column name a specifier spells — the inverse of {@link escapeColumnName}.
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* A `'` before anything else is a literal `'`, not a dangling escape: `#` and `'` were referenced
|
|
64
|
+
* unescaped long before the escape was read, and text written then still has to name the same
|
|
65
|
+
* column (`[Q#1]` and `[Q'#1]` are both `Q#1`).
|
|
66
|
+
*/
|
|
67
|
+
export declare function unescapeColumnName(image: string): string;
|
|
52
68
|
export declare function createTableColumn(image: string): ASTNode;
|
|
53
69
|
export declare function createInfix(operator: string, left: ASTNode, right: ASTNode, isReference?: boolean): ASTNode;
|
|
54
70
|
export declare function createPostfix(operator: string, input: ASTNode | null | undefined, isReference?: boolean): ASTNode;
|
|
@@ -108,11 +124,20 @@ export declare function createRefError(image?: string, locale?: CompilerLocale,
|
|
|
108
124
|
export declare function createNameError(): ASTNode;
|
|
109
125
|
/**
|
|
110
126
|
* The plain error behind an `error` node/token value, whichever shape it is: an error REFERENCE
|
|
111
|
-
* carries an {@link
|
|
127
|
+
* carries an {@link ErrorReference} (qualifier and all), an error LITERAL the bare
|
|
112
128
|
* {@link FormulaError}. Evaluation and precedent resolution want the error itself either way — an
|
|
113
129
|
* `ErrorRef` never escapes the reference layer into a cell value.
|
|
114
130
|
*/
|
|
115
131
|
export declare function errorOfValue(value: unknown): FormulaError.Known;
|
|
132
|
+
/**
|
|
133
|
+
* An `error` node's value as its TOKEN carries it: the error's canonical label for a literal, an
|
|
134
|
+
* {@link ICalculation.ErrorRef} for a reference. Plain data either way.
|
|
135
|
+
*/
|
|
136
|
+
export declare function errorTokenValue(value: unknown): string | ICalculation.ErrorRef | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* The error an `error` TOKEN names, from the label it carries ({@link errorTokenValue}).
|
|
139
|
+
*/
|
|
140
|
+
export declare function errorOfTokenValue(value: unknown): FormulaError.Known | undefined;
|
|
116
141
|
/**
|
|
117
142
|
* Does an error token's `text` already carry its sheet qualifier (`Data!#REF!`)?
|
|
118
143
|
*
|
|
@@ -29,9 +29,10 @@ export declare class SRParser extends EmbeddedActionsParser {
|
|
|
29
29
|
/**
|
|
30
30
|
* Parses a complete structured reference and returns a ParseResult.
|
|
31
31
|
*
|
|
32
|
-
* Accepts the full token image in
|
|
32
|
+
* Accepts the full token image in any of three forms:
|
|
33
33
|
* '[Column1]' — no table name (BracketedString token)
|
|
34
34
|
* 'Table1[#Headers,[Col1]]' — with table name (TableReference token)
|
|
35
|
+
* '[1]!Table1[Col1]' — with an EXTERNAL book prefix, which belongs to the table NAME
|
|
35
36
|
*/
|
|
36
37
|
parse(rowIndex: number, colIndex: number, expression: string): ParseResult;
|
|
37
38
|
}
|