@sheetxl/sdk 0.8.0-beta.10 → 0.8.0-beta.11
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/README.md +1 -1
- package/browser/esm/B7aUIvgUjncMMD_i.mjs +394 -0
- package/browser/esm/{Cgd5BnM3hg9RyUel.mjs → BFagR2JeWs74iAG3.mjs} +1 -1
- package/browser/esm/BGOFfpxr2jPIdqmV.mjs +40 -0
- package/browser/esm/{CdLZWVcH8cncBUPJ.mjs → BLoUBId2xZpXAK_H.mjs} +110 -261
- package/browser/esm/BMyDRQ716j79h_bH.mjs +86 -0
- package/browser/esm/{o8MFgcVXns987D6_.mjs → BVDiOXGMc5_FMGfy.mjs} +6 -6
- package/browser/esm/{BzLfNyc6OOShIErH.mjs → BjkCiv5Jz6WYKZeu.mjs} +2 -2
- package/browser/esm/{De175LygU7ot4nQm.mjs → BkBhLS0l6z8sxI6D.mjs} +2 -2
- package/browser/esm/{Y79I7Sm8kjaYexhf.mjs → BnG31I6Oj_HEtSPS.mjs} +1 -1
- package/browser/esm/BoV6zPBnfqCBCqZ7.mjs +7729 -0
- package/browser/esm/{CYyv6uGjo10ig5FP.mjs → BpgskG1Er_lGQ_yS.mjs} +1 -1
- package/browser/esm/{C9B0djuUarfNdoj0.mjs → BtvLTTfSBdAKplVG.mjs} +1 -1
- package/browser/esm/{zqJOaweiXE9D8RY1.mjs → C16ycKja6zG0crV_.mjs} +27687 -38788
- package/browser/esm/C2VbEI_XVAoseAwa.mjs +1552 -0
- package/browser/esm/{Btg43M1Bf-ENDreu.mjs → C4MqfLn9Dm-l3OIk.mjs} +1 -1
- package/browser/esm/C5E6zSGAALWf61n4.mjs +199 -0
- package/browser/esm/{CjsUGJEQSbGjnH6R.mjs → CHU6iu_WGlm7fLET.mjs} +1 -1
- package/browser/esm/{DhKkrCVASZ6Isvz6.mjs → CQYjO777cmAznUzK.mjs} +1 -1
- package/browser/esm/{D4uVlrG0xEFctsSM.mjs → CU3DmJ-YnVVrC1_k.mjs} +285 -67
- package/browser/esm/{ClB5ix51roQOpZEr.mjs → CV5EGEjG5_-CPpP0.mjs} +2877 -2067
- package/browser/esm/{CSx9ed1JOs7K5BXO.mjs → CaB7J-xgfKO2uAkG.mjs} +2 -2
- package/browser/esm/CkxWugaJFjDGZNZ-.mjs +12 -0
- package/browser/esm/{CZ5oa92wZEAXebgk.mjs → ClPfI4lODvCece29.mjs} +32 -22
- package/browser/esm/ClbvFbFzFzXLBKNN.mjs +193 -0
- package/browser/esm/{Cqr3knDsBvoVZ6MN.mjs → Ctjb0SsxV4K4MMqG.mjs} +2 -2
- package/browser/esm/{Bk7xxbdDpa7-sIwd.mjs → D5np__Jb1euAyaLw.mjs} +2 -2
- package/browser/esm/{Di58Ji1n--3Mgc_2.mjs → DEiPS3Dr-s4fPbVZ.mjs} +1 -1
- package/browser/esm/DLLE0FZNsKxbBzRn.mjs +128 -0
- package/browser/esm/{BqskM7wA8oPfFQue.mjs → DWNzqw7DUKwoxjri.mjs} +2 -2
- package/browser/esm/{BEAY9XgKNx-bakXW.mjs → Dlmig06rIo7cInRk.mjs} +1 -1
- package/browser/esm/DvAaxH6z_tGvrRzl.mjs +5132 -0
- package/browser/esm/Dyq_ivuHvlXLwPCl.mjs +12831 -0
- package/browser/esm/{Dtoyt8q5RyGAlxCp.mjs → PcHFjNzQsE54POri.mjs} +1 -1
- package/browser/esm/S2dNNx1a5ydRnARM.mjs +367 -0
- package/browser/esm/f1IoRb7tEb0QmCSt.mjs +110 -0
- package/browser/esm/gssVX_FH1XFN-twD.mjs +210 -0
- package/browser/esm/index.mjs +999 -850
- package/browser/esm/nvU0ClAbf0g94YBK.mjs +1695 -0
- package/browser/esm/{BcHmrKHwMMOlzc9_.mjs → zlLuW405RSguy4Kn.mjs} +34 -34
- package/licenses/dependencies.txt +75 -75
- package/node/esm/{CnSQ7MTXAUAyBOoS.mjs → 2Kihw_-5lVTEnwMa.mjs} +285 -64
- package/node/esm/857CIBgQgGpnqrXk.mjs +199 -0
- package/node/esm/B084DssTcdBheTp_.mjs +7966 -0
- package/node/esm/B21JjOLghRoDOrkx.mjs +134 -0
- package/node/esm/{CImNvdz1iP-lUlro.mjs → BIRq1kT7lLRzns9t.mjs} +181 -181
- package/node/esm/{CD9wbvufChVYYkrI.mjs → BIwObuhTJYf0jpUa.mjs} +2 -2
- package/node/esm/Bbf1Pm9Gk7YpLTvg.mjs +12 -0
- package/node/esm/{B6D7sSetrcOWLsKj.mjs → BqiexuA89caYnAPz.mjs} +1 -1
- package/node/esm/{BH1v-E4Ro3bR7Znw.mjs → BrCKGFRsX_ezFJ4B.mjs} +151 -302
- package/node/esm/CCN5vD410obwdz38.mjs +405 -0
- package/node/esm/{Bh4dv6tMjXX3X4nI.mjs → CDHdgJXH2vS71WMc.mjs} +1 -1
- package/node/esm/{DCplLG93GfTs1vNw.mjs → CGp6VZL-gZa9Uezx.mjs} +1 -1
- package/node/esm/{B9ljpEIZg6wOTzRE.mjs → CNCNJNg890KdgkWh.mjs} +1 -1
- package/node/esm/{Bqd62L8KFgdS0Vou.mjs → CZICGK_ss0HoGHCP.mjs} +2 -2
- package/node/esm/{D7MfcID2Wf6l6VpC.mjs → CZiqiay42tFTrLI4.mjs} +1 -1
- package/node/esm/{Bsx9uijd4X_SKV3L.mjs → CdJHUJSBRHZoryPe.mjs} +41 -41
- package/node/esm/Ct3h15sCus4Tgt6M.mjs +1762 -0
- package/node/esm/CwePQwTILHHjGDkZ.mjs +1033 -0
- package/node/esm/{CUUoseJmFsCf82bb.mjs → CzXT00vrQa1_gvW9.mjs} +1 -1
- package/node/esm/{C6ZXsNyLXI6zA63X.mjs → D1TKBVmoKGAXf37B.mjs} +9 -9
- package/node/esm/{BN9j8V9gCExMjVtJ.mjs → D2KBymQJd1XhpeQD.mjs} +1 -1
- package/node/esm/{MiU4rDOiocmJ-9Ry.mjs → D6e2z7eZpxOJXHc7.mjs} +1 -1
- package/node/esm/{BtuY37FumvLE7EBo.mjs → D8zEN-6ZdDqDvTxM.mjs} +156 -146
- package/node/esm/DNRhGK-8Tr9xcRyc.mjs +8320 -0
- package/node/esm/DOU54VsOjG-m-NyQ.mjs +210 -0
- package/node/esm/DUTskXCXref-IJnI.mjs +133 -0
- package/node/esm/{DMD12JUh7HJw2-jl.mjs → D_t5AUxSm7_icjzq.mjs} +1 -1
- package/node/esm/Db0v7zXNnyjBIjjI.mjs +372 -0
- package/node/esm/{CUQi5ZtMO02nhG0W.mjs → De2IONBxQhz-Qbyh.mjs} +1 -1
- package/node/esm/Df1bL6VFvrqIdSLB.mjs +40 -0
- package/node/esm/DkwIPzKc3UwdUIfM.mjs +86 -0
- package/node/esm/DrTZbfemSLq2mseG.mjs +111 -0
- package/node/esm/OVfaSb506tNSIvbv.mjs +57107 -0
- package/node/esm/{DefYISWfdZJFx57m.mjs → cGwrLA1RCE-WhJ7w.mjs} +1 -1
- package/node/esm/index.mjs +2657 -65664
- package/node/esm/mFiBSM7XgBHV9AY7.mjs +13010 -0
- package/node/esm/{DdFgXl-Ux2cMBTs_.mjs → yavzZOiZW_EjG9lE.mjs} +1 -1
- package/package.json +6 -7
- package/resources/contents.json +120 -0
- package/resources/fonts/arial-bold-italic.hinted.json +125 -0
- package/resources/fonts/arial-bold-italic.metrics.json +13 -13
- package/resources/fonts/arial-bold-italic.rows.json +9 -0
- package/resources/fonts/arial-bold.hinted.json +125 -0
- package/resources/fonts/arial-bold.metrics.json +12 -12
- package/resources/fonts/arial-bold.rows.json +9 -0
- package/resources/fonts/arial-italic.hinted.json +125 -0
- package/resources/fonts/arial-italic.metrics.json +13 -13
- package/resources/fonts/arial-italic.rows.json +9 -0
- package/resources/fonts/arial-regular.hinted.json +125 -0
- package/resources/fonts/arial-regular.metrics.json +12 -12
- package/resources/fonts/arial-regular.rows.json +9 -0
- package/resources/fonts/calibri-bold-italic.hinted.json +122 -0
- package/resources/fonts/calibri-bold-italic.metrics.json +2 -2
- package/resources/fonts/calibri-bold-italic.rows.json +9 -0
- package/resources/fonts/calibri-bold.hinted.json +122 -0
- package/resources/fonts/calibri-bold.metrics.json +1 -1
- package/resources/fonts/calibri-bold.rows.json +9 -0
- package/resources/fonts/calibri-italic.hinted.json +121 -0
- package/resources/fonts/calibri-italic.metrics.json +2 -2
- package/resources/fonts/calibri-italic.rows.json +9 -0
- package/resources/fonts/calibri-regular.hinted.json +121 -0
- package/resources/fonts/calibri-regular.metrics.json +1 -1
- package/resources/fonts/calibri-regular.rows.json +9 -0
- package/resources/fonts/cambria-bold-italic.hinted.json +105 -0
- package/resources/fonts/cambria-bold-italic.metrics.json +26 -26
- package/resources/fonts/cambria-bold-italic.rows.json +9 -0
- package/resources/fonts/cambria-bold.hinted.json +108 -0
- package/resources/fonts/cambria-bold.metrics.json +19 -19
- package/resources/fonts/cambria-bold.rows.json +9 -0
- package/resources/fonts/cambria-italic.hinted.json +102 -0
- package/resources/fonts/cambria-italic.metrics.json +23 -23
- package/resources/fonts/cambria-italic.rows.json +9 -0
- package/resources/fonts/cambria-regular.hinted.json +110 -0
- package/resources/fonts/cambria-regular.metrics.json +18 -18
- package/resources/fonts/cambria-regular.rows.json +9 -0
- package/resources/fonts/contents.json +280 -0
- package/resources/fonts/courier-new-bold-italic.hinted.json +11 -0
- package/resources/fonts/courier-new-bold-italic.metrics.json +12 -12
- package/resources/fonts/courier-new-bold-italic.rows.json +9 -0
- package/resources/fonts/courier-new-bold.hinted.json +11 -0
- package/resources/fonts/courier-new-bold.metrics.json +12 -12
- package/resources/fonts/courier-new-bold.rows.json +9 -0
- package/resources/fonts/courier-new-italic.hinted.json +11 -0
- package/resources/fonts/courier-new-italic.metrics.json +12 -12
- package/resources/fonts/courier-new-italic.rows.json +9 -0
- package/resources/fonts/courier-new-regular.hinted.json +11 -0
- package/resources/fonts/courier-new-regular.metrics.json +12 -12
- package/resources/fonts/courier-new-regular.rows.json +9 -0
- package/resources/fonts/times-new-roman-bold-italic.hinted.json +125 -0
- package/resources/fonts/times-new-roman-bold-italic.metrics.json +15 -15
- package/resources/fonts/times-new-roman-bold-italic.rows.json +9 -0
- package/resources/fonts/times-new-roman-bold.hinted.json +125 -0
- package/resources/fonts/times-new-roman-bold.metrics.json +12 -12
- package/resources/fonts/times-new-roman-bold.rows.json +9 -0
- package/resources/fonts/times-new-roman-italic.hinted.json +125 -0
- package/resources/fonts/times-new-roman-italic.metrics.json +16 -16
- package/resources/fonts/times-new-roman-italic.rows.json +9 -0
- package/resources/fonts/times-new-roman-regular.hinted.json +125 -0
- package/resources/fonts/times-new-roman-regular.metrics.json +16 -16
- package/resources/fonts/times-new-roman-regular.rows.json +9 -0
- package/resources/locales/de/model.msg.json +87 -9
- package/resources/locales/en/model.msg.json +88 -10
- package/types/scripting-api.json +10636 -8021
- package/types/scripting-enums.json +181 -43
- package/types/scripting.d.ts +15886 -8459
- package/types/src/.generated/wasm/fonts.d.ts +161 -0
- package/types/src/.generated/wasm/fonts_bg.inline.d.ts +3 -0
- package/types/src/.generated/wasm/sdk.d.ts +122 -0
- package/types/src/.generated/wasm/sdk_bg.inline.d.ts +3 -0
- package/types/src/address/AddressUtils.d.ts +10 -1
- package/types/src/address/_StructuredAddress.d.ts +58 -0
- package/types/src/border/IBorders.d.ts +16 -0
- package/types/src/calculation/Calculation.d.ts +93 -363
- package/types/src/calculation/FormulaLiterals.d.ts +2 -1
- package/types/src/calculation/FormulaText.d.ts +18 -2
- package/types/src/calculation/ICalculation.d.ts +37 -9
- package/types/src/calculation/INamedFormulasCollection.d.ts +4 -0
- package/types/src/calculation/NamedFormulaCollection.d.ts +190 -15
- package/types/src/calculation/_FormulaToolkit.d.ts +9 -0
- package/types/src/calculation/_TableExtent.d.ts +60 -0
- package/types/src/calculation/compiler/CompilerUtils.d.ts +17 -0
- package/types/src/calculation/compiler/ParserUtils.d.ts +16 -0
- package/types/src/calculation/compiler/Types.d.ts +1 -1
- package/types/src/calculation/engine/CalcBackend.d.ts +855 -0
- package/types/src/calculation/engine/index.d.ts +10 -0
- package/types/src/calculation/executor/CalcExecutor.d.ts +21 -2
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +6 -0
- package/types/src/calculation/formula/Formula.d.ts +9 -0
- package/types/src/calculation/formula/FormulaBlock.d.ts +6 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +16 -0
- package/types/src/calculation/formula/LambdaValue.d.ts +5 -3
- package/types/src/calculation/functions/FunctionDeclarations.d.ts +5 -1
- package/types/src/calculation/functions/expandDeclaration.d.ts +15 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +0 -12
- package/types/src/calculation/grid/CalcGrid.d.ts +40 -4
- package/types/src/calculation/grid/CalcGridBackend.d.ts +30 -0
- package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -0
- package/types/src/calculation/grid/CalcGridUtils.d.ts +8 -1
- package/types/src/calculation/grid/FormulaHost.d.ts +51 -6
- package/types/src/calculation/grid/ICalcGrid.d.ts +35 -6
- package/types/src/calculation/grid/_CalcRequest.d.ts +11 -1
- package/types/src/calculation/grid/_CellValueRun.d.ts +21 -0
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +27 -2
- package/types/src/calculation/state/CalcScope.d.ts +15 -6
- package/types/src/calculation/state/CalcState.d.ts +10 -0
- package/types/src/calculation/state/CalculationContext.d.ts +2 -2
- package/types/src/calculation/state/IContextContainer.d.ts +12 -0
- package/types/src/calculation/toolkit/FormulaLiteralReader.d.ts +4 -0
- package/types/src/calculation/toolkit/FormulaTextParser.d.ts +10 -0
- package/types/src/calculation/toolkit/FunctionDeclarationTable.d.ts +4 -0
- package/types/src/calculation/toolkit/index.d.ts +12 -0
- package/types/src/cell/ICell.d.ts +256 -7
- package/types/src/cell/ICellHeader.d.ts +7 -6
- package/types/src/cell/ICellProtection.d.ts +1 -1
- package/types/src/cellRange/ICellHeaderRange.d.ts +6 -9
- package/types/src/cellRange/ICellHeaderRanges.d.ts +5 -0
- package/types/src/cellRange/ICellRange.d.ts +322 -55
- package/types/src/cellRange/ICellRanges.d.ts +8 -3
- package/types/src/chart/Chart.d.ts +217 -15
- package/types/src/chart/ChartCollection.d.ts +7 -2
- package/types/src/chart/IChart.d.ts +1921 -35
- package/types/src/chart/IChartCollection.d.ts +27 -2
- package/types/src/chart/_ChartParts.d.ts +1066 -0
- package/types/src/chart/_ChartSource.d.ts +47 -0
- package/types/src/chart/createChart.d.ts +26 -0
- package/types/src/chart/index.d.ts +4 -0
- package/types/src/chart/kinds/ChartKind.d.ts +252 -0
- package/types/src/chart/kinds/_Area.d.ts +3 -0
- package/types/src/chart/kinds/_Bar.d.ts +4 -0
- package/types/src/chart/kinds/_BoxWhisker.d.ts +4 -0
- package/types/src/chart/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/kinds/_Funnel.d.ts +4 -0
- package/types/src/chart/kinds/_Hierarchy.d.ts +31 -0
- package/types/src/chart/kinds/_Histogram.d.ts +4 -0
- package/types/src/chart/kinds/_HitKinds.d.ts +23 -0
- package/types/src/chart/kinds/_Line.d.ts +4 -0
- package/types/src/chart/kinds/_OfPie.d.ts +4 -0
- package/types/src/chart/kinds/_Pie.d.ts +4 -0
- package/types/src/chart/kinds/_Placeholder.d.ts +6 -0
- package/types/src/chart/kinds/_Radar.d.ts +4 -0
- package/types/src/chart/kinds/_Scatter.d.ts +8 -0
- package/types/src/chart/kinds/_Sunburst.d.ts +4 -0
- package/types/src/chart/kinds/_Surface.d.ts +4 -0
- package/types/src/chart/kinds/_Treemap.d.ts +4 -0
- package/types/src/chart/kinds/_Waterfall.d.ts +18 -0
- package/types/src/chart/kinds/_builtIns.d.ts +11 -0
- package/types/src/chart/layout/ChartLayout.d.ts +825 -0
- package/types/src/chart/layout/TextMeasurer.d.ts +38 -0
- package/types/src/chart/layout/_HitGeometry.d.ts +50 -0
- package/types/src/chart/layout/_HitTest.d.ts +36 -0
- package/types/src/chart/layout/_Layout.d.ts +25 -0
- package/types/src/chart/layout/_LayoutUtils.d.ts +97 -0
- package/types/src/chart/math/BoxStats.d.ts +35 -0
- package/types/src/chart/math/DateUnitCalcs.d.ts +80 -0
- package/types/src/chart/math/DisplayUnits.d.ts +53 -0
- package/types/src/chart/math/Histogram.d.ts +48 -0
- package/types/src/chart/math/OrdUnitCalcs.d.ts +166 -0
- package/types/src/chart/math/Treemap.d.ts +28 -0
- package/types/src/chart/math/Trendlines.d.ts +71 -0
- package/types/src/chart/math/UnitCalcs.d.ts +98 -0
- package/types/src/chart/model/ChartModel.d.ts +681 -0
- package/types/src/chart/model/_ChartType.d.ts +14 -0
- package/types/src/chart/model/_Edits.d.ts +489 -0
- package/types/src/chart/model/_Grouping.d.ts +83 -0
- package/types/src/chart/model/_Inference.d.ts +52 -0
- package/types/src/chart/model/_ModelFacts.d.ts +112 -0
- package/types/src/chart/model/_NewChart.d.ts +208 -0
- package/types/src/chart/model/_OfPie.d.ts +18 -0
- package/types/src/chart/resolve/_LegacyStyles.d.ts +48 -0
- package/types/src/chart/resolve/_Resolve.d.ts +51 -0
- package/types/src/chart/resolve/_ResolvedChart.d.ts +444 -0
- package/types/src/collections/RTree.d.ts +116 -36
- package/types/src/collections/SparseGrid.d.ts +6 -3
- package/types/src/collections/SpatialMap.d.ts +2 -8
- package/types/src/collections/SpatialMap3D.d.ts +2 -0
- package/types/src/collections/index.d.ts +1 -1
- package/types/src/comment/Comment.d.ts +32 -9
- package/types/src/comment/IComment.d.ts +41 -4
- package/types/src/comment/_NoteBox.d.ts +19 -2
- package/types/src/condition/AnchoredConditional.d.ts +28 -2
- package/types/src/condition/ICondition.d.ts +3 -2
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +9 -3
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +4 -3
- package/types/src/dataTable/DataTable.d.ts +67 -0
- package/types/src/dataTable/DataTableCollection.d.ts +19 -0
- package/types/src/dataTable/IDataTable.d.ts +99 -0
- package/types/src/dataTable/IDataTableCollection.d.ts +18 -0
- package/types/src/dataTable/index.d.ts +6 -0
- package/types/src/dataValidation/DataValidation.d.ts +1 -1
- package/types/src/dataValidation/DataValidationCollection.d.ts +4 -1
- package/types/src/dataValidation/IDataValidation.d.ts +1 -1
- package/types/src/dataValidation/IDataValidationCollection.d.ts +24 -0
- package/types/src/documentProperties/DocumentProperties.d.ts +66 -0
- package/types/src/documentProperties/ICustomProperty.d.ts +69 -0
- package/types/src/documentProperties/IDocumentProperties.d.ts +110 -0
- package/types/src/documentProperties/index.d.ts +3 -0
- package/types/src/externalBook/IExternalBook.d.ts +1 -1
- package/types/src/fill/IFill.d.ts +7 -0
- package/types/src/fill/IFillable.d.ts +47 -0
- package/types/src/fill/IStroke.d.ts +15 -1
- package/types/src/fill/PaintUtils.d.ts +22 -0
- package/types/src/fill/index.d.ts +2 -0
- package/types/src/font/AdvanceBuilder.d.ts +34 -0
- package/types/src/font/AdvanceTable.d.ts +128 -14
- package/types/src/font/CanvasAdvanceBuilder.d.ts +54 -0
- package/types/src/font/FontCapture.d.ts +4 -0
- package/types/src/font/FontCollection.d.ts +53 -2
- package/types/src/font/FontPlatform.d.ts +20 -0
- package/types/src/font/FontUtils.d.ts +5 -0
- package/types/src/font/IFont.d.ts +191 -61
- package/types/src/font/IFontCollection.d.ts +20 -14
- package/types/src/font/IFontStyle.d.ts +207 -0
- package/types/src/font/TableFileAdvanceBuilder.d.ts +9 -0
- package/types/src/font/_FontUtils.d.ts +11 -4
- package/types/src/font/_FontsVersion.d.ts +7 -0
- package/types/src/font/index.d.ts +1 -3
- package/types/src/font/platform.browser.d.ts +15 -0
- package/types/src/font/platform.node.d.ts +5 -0
- package/types/src/group/Group.d.ts +5 -0
- package/types/src/group/GroupMovableCollection.d.ts +4 -0
- package/types/src/history/IHistory.d.ts +19 -2
- package/types/src/hyperlink/IHyperlink.d.ts +7 -1
- package/types/src/index.d.ts +3 -0
- package/types/src/license/LicenseManager.d.ts +21 -0
- package/types/src/license/_Utils.d.ts +18 -1
- package/types/src/license/runtime.browser.d.ts +5 -0
- package/types/src/license/runtime.node.d.ts +10 -0
- package/types/src/listener/IListener.d.ts +14 -2
- package/types/src/listener/ListenerEmitter.d.ts +11 -3
- package/types/src/movable/IMovable.d.ts +28 -15
- package/types/src/movable/IMovableCollection.d.ts +1 -1
- package/types/src/movable/Movable.d.ts +12 -1
- package/types/src/movable/MovableCollection.d.ts +7 -3
- package/types/src/movable/_InsertableCollection.d.ts +16 -5
- package/types/src/named/INamed.d.ts +30 -0
- package/types/src/named/INamedCollection.d.ts +2 -2
- package/types/src/named/NamedCollection.d.ts +16 -4
- package/types/src/numFmt/NumberFormatParser.d.ts +5 -0
- package/types/src/outline/IOutline.d.ts +1 -1
- package/types/src/outline/Outline.d.ts +2 -2
- package/types/src/picture/IPicture.d.ts +98 -1
- package/types/src/picture/Picture.d.ts +15 -7
- package/types/src/pivot/IPivotTable.d.ts +2 -2
- package/types/src/pivot/PivotTable.d.ts +5 -5
- package/types/src/primitives/ReferenceRange.d.ts +2 -2
- package/types/src/print/IPageLayout.d.ts +635 -0
- package/types/src/print/PageLayout.d.ts +258 -0
- package/types/src/print/index.d.ts +1 -1
- package/types/src/protectedRange/IProtectedRange.d.ts +2 -2
- package/types/src/protection/IProtection.d.ts +6 -0
- package/types/src/protection/PasswordHasher.d.ts +13 -0
- package/types/src/richData/IRichDataKind.d.ts +22 -0
- package/types/src/richData/RichDataRegistry.d.ts +57 -0
- package/types/src/richData/RichText.d.ts +59 -0
- package/types/src/richData/index.d.ts +3 -0
- package/types/src/scripting/IModule.d.ts +3 -3
- package/types/src/scripting/IScript.d.ts +2 -2
- package/types/src/scripting/ITypedFunction.d.ts +1 -1
- package/types/src/scripting/declarations.d.ts +3 -0
- package/types/src/selection/ChartElementSelection.d.ts +39 -0
- package/types/src/selection/IChartElementSelection.d.ts +103 -0
- package/types/src/selection/IItemSelection.d.ts +131 -0
- package/types/src/selection/IMovableSelection.d.ts +6 -34
- package/types/src/selection/IRangeSelection.d.ts +4 -4
- package/types/src/selection/ItemSelection.d.ts +49 -0
- package/types/src/selection/MovableSelection.d.ts +11 -30
- package/types/src/selection/RangeSelection.d.ts +4 -4
- package/types/src/selection/index.d.ts +3 -0
- package/types/src/shape/IShape.d.ts +2 -1
- package/types/src/shape/IShapeStyle.d.ts +5 -31
- package/types/src/shape/ITextBoxStyle.d.ts +85 -0
- package/types/src/shape/ShapeStyleUtils.d.ts +13 -1
- package/types/src/shape/_Connectors.d.ts +9 -9
- package/types/src/shape/_ShapeStyle.d.ts +9 -0
- package/types/src/shape/index.d.ts +1 -0
- package/types/src/sheet/CellRegion.d.ts +37 -3
- package/types/src/sheet/IOpaqueSheet.d.ts +46 -0
- package/types/src/sheet/ISheet.d.ts +81 -1078
- package/types/src/sheet/IWorksheet.d.ts +1514 -0
- package/types/src/sheet/{ISheetCollection.d.ts → IWorksheetCollection.d.ts} +37 -12
- package/types/src/sheet/NamedCellRange.d.ts +2 -2
- package/types/src/sheet/NamedRange.d.ts +2 -2
- package/types/src/sheet/OpaqueSheet.d.ts +114 -0
- package/types/src/sheet/SheetCell.d.ts +24 -27
- package/types/src/sheet/SheetRange.d.ts +42 -11
- package/types/src/sheet/SheetRanges.d.ts +12 -10
- package/types/src/sheet/{Sheet.d.ts → Worksheet.d.ts} +510 -144
- package/types/src/sheet/WorksheetCollection.d.ts +39 -0
- package/types/src/sheet/_Anomalies.d.ts +109 -0
- package/types/src/sheet/_AnomalyFormulaChecks.d.ts +125 -0
- package/types/src/sheet/_AnomalyLabelChecks.d.ts +21 -0
- package/types/src/sheet/_CellBuffer.d.ts +11 -1
- package/types/src/sheet/_CopyUtils.d.ts +13 -6
- package/types/src/sheet/_IgnoredErrors.d.ts +46 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +3 -2
- package/types/src/sheet/_Kinds.d.ts +34 -0
- package/types/src/sheet/_Labels.d.ts +38 -0
- package/types/src/sheet/_RangeStateSweep.d.ts +2 -3
- package/types/src/sheet/_ScalarListFactory.d.ts +1 -1
- package/types/src/sheet/_SheetAutoFillUtils.d.ts +3 -3
- package/types/src/sheet/_SheetAutoFitUtils.d.ts +3 -3
- package/types/src/sheet/_SheetChangeEvent.d.ts +72 -0
- package/types/src/sheet/_SheetCoords.d.ts +3 -3
- package/types/src/sheet/_SheetEvents.d.ts +1 -1
- package/types/src/sheet/_SheetFilterUtils.d.ts +6 -6
- package/types/src/sheet/_SheetIntents.d.ts +32 -14
- package/types/src/sheet/_SheetMessages.d.ts +1 -1
- package/types/src/sheet/_SheetMutations.d.ts +7 -8
- package/types/src/sheet/_SheetSortUtils.d.ts +2 -2
- package/types/src/sheet/_SheetStateReader.d.ts +18 -0
- package/types/src/sheet/_SheetStateTypes.d.ts +60 -1
- package/types/src/sheet/_SheetUtils.d.ts +20 -19
- package/types/src/sheet/_WatchAnchor.d.ts +15 -2
- package/types/src/sheet/clipboard/RangeClipboardItems.d.ts +4 -4
- package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts +3 -3
- package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts +3 -3
- package/types/src/sheet/index.d.ts +5 -2
- package/types/src/sheet/style/SheetCellStyle.d.ts +67 -86
- package/types/src/sheet/style/SheetDirectStyle.d.ts +3 -3
- package/types/src/sheet/style/SheetNamedStyle.d.ts +2 -0
- package/types/src/sheet/style/_DigitWidth.d.ts +7 -0
- package/types/src/sheet/style/_Resolvers.d.ts +3 -2
- package/types/src/sheet/style/_StyleUtils.d.ts +7 -43
- package/types/src/sheetHeader/ISheetHeader.d.ts +2 -2
- package/types/src/sheetHeader/SheetCellHeader.d.ts +2 -0
- package/types/src/sheetHeader/SheetCellHeaderRange.d.ts +2 -0
- package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts +2 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +7 -6
- package/types/src/sheetHeader/_HeaderUtils.d.ts +2 -3
- package/types/src/sheetProtection/{ISheetProtection.d.ts → IWorksheetProtection.d.ts} +28 -28
- package/types/src/sheetProtection/WorksheetProtection.d.ts +51 -0
- package/types/src/sheetProtection/index.d.ts +1 -1
- package/types/src/sheetView/{ISheetView.d.ts → IWorksheetView.d.ts} +168 -61
- package/types/src/sheetView/WorksheetView.d.ts +139 -0
- package/types/src/sheetView/_SheetViewUtils.d.ts +5 -3
- package/types/src/sheetView/index.d.ts +1 -1
- package/types/src/slicer/ISlicer.d.ts +2 -2
- package/types/src/sort/ISort.d.ts +35 -5
- package/types/src/style/ICellStyle.d.ts +56 -44
- package/types/src/style/_BuiltInStyleDefs.d.ts +4 -3
- package/types/src/table/AnchoredTable.d.ts +23 -7
- package/types/src/table/AutoTable.d.ts +1 -1
- package/types/src/table/ITable.d.ts +32 -19
- package/types/src/table/_NamedTable.d.ts +3 -3
- package/types/src/table/_NamedTableSource.d.ts +2 -2
- package/types/src/text/IText.d.ts +4 -51
- package/types/src/text/TextEngine.d.ts +34 -0
- package/types/src/text/TextFrame.d.ts +4 -2
- package/types/src/text/TextRun.d.ts +3 -2
- package/types/src/text/TextWrapper.d.ts +32 -26
- package/types/src/text/_TextUtils.d.ts +5 -5
- package/types/src/text/_TextWrapperFallback.d.ts +49 -0
- package/types/src/text/impl/TabStrategy.d.ts +3 -1
- package/types/src/text/richtext/IRichText.d.ts +16 -2
- package/types/src/text/richtext/index.d.ts +0 -1
- package/types/src/theme/ITheme.d.ts +108 -7
- package/types/src/theme/ThemeCollection.d.ts +5 -0
- package/types/src/theme/_OfficeFontScheme.d.ts +8 -0
- package/types/src/transaction/ITransaction.d.ts +20 -1
- package/types/src/transaction/Transaction.d.ts +8 -1
- package/types/src/transaction/_BatchHandle.d.ts +118 -0
- package/types/src/type/AbstractCollection.d.ts +4 -13
- package/types/src/type/ICollection.d.ts +17 -4
- package/types/src/type/IProperties.d.ts +1 -1
- package/types/src/utils/_CSSUtils.d.ts +1 -1
- package/types/src/wasm/_fontsWasm.d.ts +7 -0
- package/types/src/wasm/_sdkWasm.d.ts +1 -1
- package/types/src/wasm/fontsWasm.d.ts +32 -0
- package/types/src/wasm/index.d.ts +1 -0
- package/types/src/wasm/loader.browser.d.ts +9 -0
- package/types/src/wasm/loader.node.d.ts +9 -0
- package/types/src/wasm/sdkWasm.d.ts +6 -3
- package/types/src/workbook/IWorkbook.d.ts +229 -38
- package/types/src/workbook/Workbook.d.ts +77 -22
- package/types/src/workbook/WorkbookRange.d.ts +2 -2
- package/types/src/workbook/WorkbookRanges.d.ts +2 -2
- package/types/src/workbook/_WorkbookIntents.d.ts +2 -2
- package/types/src/workbook/_WorkbookMessages.d.ts +5 -0
- package/types/src/workbookView/IWorkbookView.d.ts +82 -0
- package/types/src/workbookView/WorkbookView.d.ts +21 -0
- package/browser/esm/BbSmt62FpFIpoVzu.mjs +0 -392
- package/browser/esm/BgcZ-CoTbMfmyDJL.mjs +0 -412
- package/browser/esm/DOMHmhYzPcLVcpAW.mjs +0 -7
- package/browser/esm/DUvUK61b2_4pf4tG.mjs +0 -484
- package/node/esm/CCouEwT37f08qO3V.mjs +0 -7
- package/node/esm/CT0CN82y0_Qgoryk.mjs +0 -7568
- package/node/esm/DHUADiCmxNQS1ARz.mjs +0 -417
- package/node/esm/Ds0d8zXzmgOu3MGx.mjs +0 -403
- package/types/src/chart/_ChartXml.d.ts +0 -70
- package/types/src/collections/OverlappingRangeIterator.d.ts +0 -87
- package/types/src/collections/_RangeSweep.d.ts +0 -97
- package/types/src/font/CanvasFontMeasurer.d.ts +0 -25
- package/types/src/font/FontKitFontMeasurer.d.ts +0 -11
- package/types/src/font/SimpleFontMeasurer.d.ts +0 -4
- package/types/src/print/IPrint.d.ts +0 -212
- package/types/src/sheet/SheetCollection.d.ts +0 -29
- package/types/src/sheetProtection/SheetProtection.d.ts +0 -51
- package/types/src/sheetView/SheetView.d.ts +0 -122
- package/types/src/text/richtext/IStyledFont.d.ts +0 -330
|
@@ -5,7 +5,8 @@ import { Scalar } from '@sheetxl/primitives';
|
|
|
5
5
|
*
|
|
6
6
|
* @param text The formula text, without a leading `=`.
|
|
7
7
|
* @returns The literal's value, or `undefined` when the text is anything else — a reference, a
|
|
8
|
-
* function call, an expression, or text that does not lex at all
|
|
8
|
+
* function call, an expression, or text that does not lex at all — or when the parser is not
|
|
9
|
+
* loaded (see `FormulaText.load`).
|
|
9
10
|
*
|
|
10
11
|
* @remarks
|
|
11
12
|
* Backed by the calculation compiler's own lexer and literal actions (canonical locale: `.`
|
|
@@ -10,8 +10,13 @@ import { ICalculation } from './ICalculation';
|
|
|
10
10
|
* symbol or evaluates anything: a sheet name is text, a function name is text, a cell is an
|
|
11
11
|
* offset from the anchor.
|
|
12
12
|
*
|
|
13
|
+
* The parser is loaded on demand. Await {@link load} first: until it resolves, {@link parse}
|
|
14
|
+
* answers `null` and {@link transform} returns the tree it was given, which is what each answers
|
|
15
|
+
* for text it cannot read. A calculation's start loads it too.
|
|
16
|
+
*
|
|
13
17
|
* @example
|
|
14
18
|
* ```ts
|
|
19
|
+
* await FormulaText.load();
|
|
15
20
|
* const root = FormulaText.parse('SUM(A1:A5)', { anchor: { rowIndex: 9, colIndex: 1 } });
|
|
16
21
|
* const spelled = FormulaText.transform(root!, (node) =>
|
|
17
22
|
* node.type === 'function' && node.value === 'SUM' ? { ...node, value: '_xlfn.SUM' } : undefined
|
|
@@ -47,9 +52,16 @@ export declare namespace FormulaText {
|
|
|
47
52
|
/** Image in R1C1 rather than A1. */
|
|
48
53
|
r1c1?: boolean;
|
|
49
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Loads the parser and the printer. Resolves once {@link parse}, {@link transform}, {@link image},
|
|
57
|
+
* `parseFormulaLiteral` and `FunctionDeclarations` can answer; at once if they already can.
|
|
58
|
+
*/
|
|
59
|
+
function load(): Promise<void>;
|
|
60
|
+
/** Whether {@link load} has resolved, so that every function here answers. */
|
|
61
|
+
function isLoaded(): boolean;
|
|
50
62
|
/**
|
|
51
63
|
* Parses canonical formula text (English function names, `,` separators, no leading `=`) into
|
|
52
|
-
* its tree, or `null` when the text does not parse.
|
|
64
|
+
* its tree, or `null` when the text does not parse or the parser is not loaded.
|
|
53
65
|
*
|
|
54
66
|
* @remarks
|
|
55
67
|
* A sheet, table or name is the text that names it; nothing is resolved. See
|
|
@@ -58,7 +70,7 @@ export declare namespace FormulaText {
|
|
|
58
70
|
function parse(text: string, options?: ParseOptions): ICalculation.FormulaNode | null;
|
|
59
71
|
/**
|
|
60
72
|
* Applies a transform to a tree, post-order, and returns the transformed tree: the same object
|
|
61
|
-
* when the transform changed nothing.
|
|
73
|
+
* when the transform changed nothing, or when the parser is not loaded.
|
|
62
74
|
*
|
|
63
75
|
* @see {@link ICalculation.FormulaTransform}
|
|
64
76
|
*/
|
|
@@ -69,6 +81,7 @@ export declare namespace FormulaText {
|
|
|
69
81
|
* @remarks
|
|
70
82
|
* A `[`, `]`, `#` or `'` in the column name is escaped with `'`, which is how a formula names
|
|
71
83
|
* such a column. What a reader uses to name a column it knows only by table and column name.
|
|
84
|
+
* Needs no {@link load}.
|
|
72
85
|
*/
|
|
73
86
|
function structuredReference(tableName: string, columnName: string): string;
|
|
74
87
|
/** Images a tree as text at a cell. */
|
|
@@ -76,6 +89,9 @@ export declare namespace FormulaText {
|
|
|
76
89
|
/**
|
|
77
90
|
* Prepares a tree for imaging at many cells: the tree is rebuilt once, and each call images it
|
|
78
91
|
* at one cell. What a writer uses for the members of a block that share one formula.
|
|
92
|
+
*
|
|
93
|
+
* @throws When the printer is not loaded: a tree comes from {@link parse}, so {@link load} has
|
|
94
|
+
* resolved before there is one to image.
|
|
79
95
|
*/
|
|
80
96
|
function imager(root: ICalculation.FormulaNode, options?: Omit<ImageOptions, 'at'>): (at?: IRange.CellCoords) => string;
|
|
81
97
|
}
|
|
@@ -44,6 +44,8 @@ export interface ICalculation extends IModel {
|
|
|
44
44
|
* * After it, every answer the engine owes has landed: a formula written before it reads as
|
|
45
45
|
* compiled, and its value is current (in automatic mode).
|
|
46
46
|
* * Manual mode does not wait for a recalculation nobody has asked for; call {@link calculate}.
|
|
47
|
+
* * Waits for what consumers derive from the results too ({@link waitUntil}): a conditional
|
|
48
|
+
* format reads as painted after it, including one a read just asked to evaluate.
|
|
47
49
|
* * A streaming or async function's result in flight is not waited for: its cell reads as the
|
|
48
50
|
* current value until the result arrives.
|
|
49
51
|
* * Starts the engine if it is {@link ICalculation.Status.Off}. An engine in
|
|
@@ -52,6 +54,21 @@ export interface ICalculation extends IModel {
|
|
|
52
54
|
* @param options Pass `{ full: true }` to recalculate every grid rather than only the dirty ones.
|
|
53
55
|
*/
|
|
54
56
|
ready(options?: ICalculation.CalculateOptions): Promise<ICalculation.Status>;
|
|
57
|
+
/**
|
|
58
|
+
* Counts `work` that a consumer derives from the engine's results as calculation in flight
|
|
59
|
+
* until it settles: {@link ready} waits for it, and {@link getCalculationState} reads
|
|
60
|
+
* `Calculating` meanwhile.
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* For anything whose answer follows from a pass and lands after it - a conditional format
|
|
64
|
+
* re-judging its cells once the pass delivers its formula's values - so that a reader who
|
|
65
|
+
* waited for `ready()` reads the answer rather than the one before it. Not counted in manual
|
|
66
|
+
* mode, where the pass such work waits for runs only when asked.
|
|
67
|
+
*
|
|
68
|
+
* @param work The derived work. Its failure is the consumer's: it settles the wait either way.
|
|
69
|
+
* @returns `work`.
|
|
70
|
+
*/
|
|
71
|
+
waitUntil<T>(work: Promise<T>): Promise<T>;
|
|
55
72
|
/**
|
|
56
73
|
* Returns the current status of the calculation engine: whether it is running at all.
|
|
57
74
|
*/
|
|
@@ -457,8 +474,13 @@ export declare namespace ICalculation {
|
|
|
457
474
|
* @remarks
|
|
458
475
|
* - Volatile formulas are re-evaluated on every calculation cycle regardless
|
|
459
476
|
* of whether their inputs have changed.
|
|
460
|
-
* -
|
|
461
|
-
*
|
|
477
|
+
* - A property of the formula text first, closed over the names it mentions, so an arm no
|
|
478
|
+
* branch selects still counts (`=IF(TRUE,1,RAND())`) and the answer stands with nothing
|
|
479
|
+
* calculated — a named formula is never evaluated by a pass. A cell is also volatile when
|
|
480
|
+
* its last evaluation read cells its text does not name (`OFFSET`, `INDIRECT`, an `INDEX`
|
|
481
|
+
* on a computed index, a `SUMIF` sum range extended to its criteria range): its inputs can
|
|
482
|
+
* move with its values. And when the engine registered it as it evaluated: a member of an
|
|
483
|
+
* iterated cycle, or a function that marks itself at run time.
|
|
462
484
|
* - Named formulas where `isVolatile()` is true should not be used as
|
|
463
485
|
* navigation targets even if `isReferenceOnly()` returns true, since their
|
|
464
486
|
* resolved range may differ by context.
|
|
@@ -553,6 +575,14 @@ export declare namespace ICalculation {
|
|
|
553
575
|
* The comment, or `null` if none has been set.
|
|
554
576
|
*/
|
|
555
577
|
getComment(): string | null;
|
|
578
|
+
/**
|
|
579
|
+
* What the file said about this name beyond its value — macro bindings, Excel 4.0 and publishing
|
|
580
|
+
* flags — or `null` when it said nothing.
|
|
581
|
+
*
|
|
582
|
+
* @remarks
|
|
583
|
+
* Read-only: carried and written back as read. None of it changes how the name evaluates.
|
|
584
|
+
*/
|
|
585
|
+
getFileAttributes(): Readonly<INamed.FileAttributes> | null;
|
|
556
586
|
/**
|
|
557
587
|
* If `true` the name is not shown in the UI. This does not affect resolution in formulas.
|
|
558
588
|
*/
|
|
@@ -1206,8 +1236,8 @@ export declare namespace ICalculation {
|
|
|
1206
1236
|
*/
|
|
1207
1237
|
readonly Done: "done";
|
|
1208
1238
|
/**
|
|
1209
|
-
* Work is in hand: a pass running or owed,
|
|
1210
|
-
* landed.
|
|
1239
|
+
* Work is in hand: a pass running or owed, answers the engine owes the model that have not
|
|
1240
|
+
* landed, or work a consumer derives from the results ({@link ICalculation.waitUntil}).
|
|
1211
1241
|
*/
|
|
1212
1242
|
readonly Calculating: "calculating";
|
|
1213
1243
|
/**
|
|
@@ -1369,12 +1399,10 @@ export declare namespace ICalculation {
|
|
|
1369
1399
|
*/
|
|
1370
1400
|
concurrentCalc?: boolean;
|
|
1371
1401
|
/**
|
|
1372
|
-
*
|
|
1373
|
-
*
|
|
1374
|
-
* @remarks
|
|
1375
|
-
* If `true`, manual calculations can utilize multiple threads.
|
|
1402
|
+
* How many threads concurrent calculation uses, when the count was set by hand rather than
|
|
1403
|
+
* left to the number of processors. Kept from the file.
|
|
1376
1404
|
*/
|
|
1377
|
-
concurrentManualCount?:
|
|
1405
|
+
concurrentManualCount?: number;
|
|
1378
1406
|
/**
|
|
1379
1407
|
* Specifies whether the workbook forces a full recalculation of all formulas.
|
|
1380
1408
|
*
|
|
@@ -92,6 +92,10 @@ export declare namespace INamedFormulasCollection {
|
|
|
92
92
|
* @defaultValue false
|
|
93
93
|
*/
|
|
94
94
|
hidden?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Kept from a file and written back. See {@link INamed.FileAttributes}.
|
|
97
|
+
*/
|
|
98
|
+
fileAttributes?: INamed.FileAttributes;
|
|
95
99
|
/**
|
|
96
100
|
* If `true`, redefine an existing name in the same scope instead of throwing.
|
|
97
101
|
*
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { IRange, Scalar
|
|
1
|
+
import { IRange, Scalar } from '@sheetxl/primitives';
|
|
2
2
|
import { ITransaction } from '../transaction';
|
|
3
3
|
import { IListener } from '../listener';
|
|
4
4
|
import { ICellRange, ICellRanges } from '../cellRange';
|
|
5
5
|
import { NamedNodeInfo, ReferenceCoords } from './Types';
|
|
6
6
|
import { INamed } from '../named';
|
|
7
7
|
import { ITypes, AbstractCollection } from '../type';
|
|
8
|
-
import { IContextContainer } from './state';
|
|
9
8
|
import { FormulaHost } from './grid';
|
|
10
9
|
import { Formula, IFormulaBlockView } from './formula';
|
|
11
10
|
import { ICalculation } from './ICalculation';
|
|
@@ -38,9 +37,8 @@ export declare class NamedFormulaCollection extends AbstractCollection<ICalculat
|
|
|
38
37
|
* exactly as they were read.
|
|
39
38
|
*/
|
|
40
39
|
private _pendingJSON;
|
|
41
|
-
protected
|
|
40
|
+
protected _engine: NamedFormulaCollection.Engine | null;
|
|
42
41
|
protected _bindSheet: ((scope: string) => string | null) | null;
|
|
43
|
-
protected _context: IFormulaContext | null;
|
|
44
42
|
protected _ready: (() => Promise<ICalculation.Status>) | null;
|
|
45
43
|
protected _getActiveCell: () => IRange.CellCoords | null;
|
|
46
44
|
protected _createHost: ((gridId: string) => FormulaHost) | null;
|
|
@@ -63,6 +61,19 @@ export declare class NamedFormulaCollection extends AbstractCollection<ICalculat
|
|
|
63
61
|
* store, never open, so nothing waits for the operation to land.
|
|
64
62
|
*/
|
|
65
63
|
private _namesEmitter;
|
|
64
|
+
/**
|
|
65
|
+
* The items by their upper-cased name: what {@link getByName} and {@link _findSameIdentity}
|
|
66
|
+
* read instead of scanning the set.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* A derived cache, not state - the set stays keyed by id (see `State`). It answers for one
|
|
70
|
+
* store position: the commit, the operation open on it, and the set's own map. Anything that
|
|
71
|
+
* moves one of those without passing through {@link _indexItem} (a restore, a rollback, a
|
|
72
|
+
* commit closing) rebuilds it on the next read, once over the set; a write made here keeps it
|
|
73
|
+
* current in place, so a load of thousands of names costs each one a map lookup rather than a
|
|
74
|
+
* scan - which, over the names a legacy file carries, was the larger part of opening it.
|
|
75
|
+
*/
|
|
76
|
+
private _nameIndex;
|
|
66
77
|
constructor(options?: NamedFormulaCollection.ConstructorOptions);
|
|
67
78
|
/**
|
|
68
79
|
* Hydrates from `IWorkbook.JSON.names`. A malformed entry is warned and skipped rather than
|
|
@@ -75,10 +86,20 @@ export declare class NamedFormulaCollection extends AbstractCollection<ICalculat
|
|
|
75
86
|
* be listed, and still evaluate to `#NAME?`.
|
|
76
87
|
*
|
|
77
88
|
* Not on `INamedFormulasCollection`: hydration belongs to whoever constructs the engine.
|
|
89
|
+
*
|
|
90
|
+
* A loaded name BINDS now and COMPILES on first use (see {@link NamedFormula._materialize}). A
|
|
91
|
+
* legacy file carries thousands of names nothing reads, and compiling one costs a grid of its own
|
|
92
|
+
* in the model's store, which every later commit copies. Until a reader binds the name, or the
|
|
93
|
+
* item is asked something only a compiled body answers, it answers from its state - and a loaded
|
|
94
|
+
* expression is already the file's sheet-qualified form, so the text is what a save writes back
|
|
95
|
+
* either way. A lambda-valued name is the exception: it is reached as a FUNCTION, by name, not
|
|
96
|
+
* through a symbol bind, so nothing would compile it ahead of the call.
|
|
78
97
|
*/
|
|
79
98
|
hydrate(json: INamed.JSON[] | undefined): void;
|
|
80
99
|
/** Set while {@link hydrate} runs, so the read-only refusal in {@link add} stands down. */
|
|
81
100
|
private _hydrating;
|
|
101
|
+
/** The set's map as the running {@link hydrate} made it - see `add`. */
|
|
102
|
+
private _hydratingItems;
|
|
82
103
|
/**
|
|
83
104
|
* Serializes to `IWorkbook.JSON.names` form, sorted by scope+name so output is stable across
|
|
84
105
|
* saves.
|
|
@@ -104,6 +125,52 @@ export declare class NamedFormulaCollection extends AbstractCollection<ICalculat
|
|
|
104
125
|
toJSON(): INamed.JSON[] | null;
|
|
105
126
|
/** {@inheritDoc INamedFormulasCollection.add} */
|
|
106
127
|
add(options: INamedFormulasCollection.AddOptions): ICalculation.INamedFormula;
|
|
128
|
+
/**
|
|
129
|
+
* {@link add}, with the choice of WHEN the name compiles.
|
|
130
|
+
*
|
|
131
|
+
* @param lazy `true` for a loaded name: the item is recorded, indexed and announced, and its body
|
|
132
|
+
* compiles on first use (see {@link hydrate}). A name authored through the API compiles at once -
|
|
133
|
+
* the author expects `getRanges()` after `ready()`, and the wire is what qualifies a bare reference.
|
|
134
|
+
*/
|
|
135
|
+
protected _add(options: INamedFormulasCollection.AddOptions, lazy: boolean): ICalculation.INamedFormula;
|
|
136
|
+
/**
|
|
137
|
+
* Compiles every loaded name whose text mentions the sheet, and has not compiled yet.
|
|
138
|
+
*
|
|
139
|
+
* @internal
|
|
140
|
+
*
|
|
141
|
+
* @remarks
|
|
142
|
+
* A compiled body follows the sheets it reads: a shift of their cells moves its references, and
|
|
143
|
+
* a rename re-images it from the sheet's id. Text follows nothing. So before a change of that kind
|
|
144
|
+
* lands, every name still answering from its text that could be reading the sheet is compiled,
|
|
145
|
+
* and the change reaches a body. A name that mentions no sheet at all - an error, an array
|
|
146
|
+
* constant, a number - is left as it is. The test is a spelling in the text, which is wider than
|
|
147
|
+
* a reference (a sheet called `A` is mentioned by nearly everything): a wide net compiles more
|
|
148
|
+
* than it needs to, a narrow one would leave a name pointing at the wrong cells.
|
|
149
|
+
*/
|
|
150
|
+
_materializeMentioning(sheetName: string): void;
|
|
151
|
+
/**
|
|
152
|
+
* {@inheritDoc NamedCollection.Source.prepareRanges}
|
|
153
|
+
*
|
|
154
|
+
* @remarks
|
|
155
|
+
* Compiles, as one batch, the loaded names among `items` whose `getRanges()` would otherwise
|
|
156
|
+
* compile them one at a time: a name whose text is a literal or a plain address answers from its
|
|
157
|
+
* text and is left alone. Items of another source are not this collection's and are skipped.
|
|
158
|
+
*/
|
|
159
|
+
prepareRanges(items: readonly INamed[]): void;
|
|
160
|
+
/**
|
|
161
|
+
* Compiles the loaded names among `items` that have not compiled, as ONE operation.
|
|
162
|
+
*
|
|
163
|
+
* @remarks
|
|
164
|
+
* Compiled one by one outside an operation, each name opens a commit of its own on the model
|
|
165
|
+
* store, so its grid lands under its own engine commit - and every engine commit copies the
|
|
166
|
+
* engine's registries, which hold an entry per sheet and per compiled name. A loop over the names
|
|
167
|
+
* of a legacy file (ten thousand of them) is then quadratic, in time and in memory held until the
|
|
168
|
+
* loop yields. Under one operation the names share one landing, one engine commit and one clone
|
|
169
|
+
* key, and the engine collects the grids they make into one write ({@link Engine.collectGrids}).
|
|
170
|
+
*
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
173
|
+
_materializeMany(items: readonly NamedFormula[]): void;
|
|
107
174
|
/**
|
|
108
175
|
* A name has just been bound to the region it designates.
|
|
109
176
|
*
|
|
@@ -204,6 +271,14 @@ export declare class NamedFormulaCollection extends AbstractCollection<ICalculat
|
|
|
204
271
|
* Backs both the duplicate check in {@link add} and the collision check on rename.
|
|
205
272
|
*/
|
|
206
273
|
protected _findSameIdentity(name: string, scopeId: string | null): NamedFormula | null;
|
|
274
|
+
/** The items named `upper` (already upper-cased), through {@link _nameIndex}. */
|
|
275
|
+
protected _itemsNamed(upper: string, state: State): readonly NamedFormula[];
|
|
276
|
+
/**
|
|
277
|
+
* A write made here - an item added, renamed or removed - keeps {@link _nameIndex} current
|
|
278
|
+
* rather than costing the next read a rebuild. The set's map is read again, as the write has
|
|
279
|
+
* just replaced it.
|
|
280
|
+
*/
|
|
281
|
+
protected _indexItem(item: NamedFormula, removed: boolean): void;
|
|
207
282
|
/**
|
|
208
283
|
* Resolves a caller's `scope` input to the sheet's stableId.
|
|
209
284
|
*
|
|
@@ -269,8 +344,8 @@ export declare namespace NamedFormulaCollection {
|
|
|
269
344
|
*/
|
|
270
345
|
json?: INamed.JSON[];
|
|
271
346
|
transactions?: ITransaction.IStore;
|
|
272
|
-
|
|
273
|
-
|
|
347
|
+
/** What a name tells the engine it compiles into, and reads back from it. */
|
|
348
|
+
engine?: NamedFormulaCollection.Engine;
|
|
274
349
|
ready?: () => Promise<ICalculation.Status>;
|
|
275
350
|
getRange: (address: ICellRange.Address) => ICellRange;
|
|
276
351
|
/** Resolves an address to ranges. Backs {@link ICalculation.INamedFormula.getReferences}. */
|
|
@@ -286,7 +361,7 @@ export declare namespace NamedFormulaCollection {
|
|
|
286
361
|
resolveSheetScope?: (stableId: string) => string | null;
|
|
287
362
|
/**
|
|
288
363
|
* A sheet's name or stable id to its stable id, as the model holds its sheets now - not as the
|
|
289
|
-
* engine's replica has been told.
|
|
364
|
+
* engine's replica has been told. Without it, a scope binds to nothing.
|
|
290
365
|
*/
|
|
291
366
|
bindSheet?: (scope: string) => string | null;
|
|
292
367
|
/** Backs {@link INamed.isReadOnly} on each item. Defaults to not read-only. */
|
|
@@ -310,12 +385,34 @@ export declare namespace NamedFormulaCollection {
|
|
|
310
385
|
*/
|
|
311
386
|
isEngineReady?: () => boolean;
|
|
312
387
|
}
|
|
388
|
+
/**
|
|
389
|
+
* What a name asks of the engine it compiles into. Held from before the engine starts: each call
|
|
390
|
+
* reaches the engine once there is one, and waits for it until then.
|
|
391
|
+
*/
|
|
392
|
+
interface Engine {
|
|
393
|
+
/** The name's resolution moved: the formulas that read it are out of date. */
|
|
394
|
+
invalidateNamed(nameId: string): void;
|
|
395
|
+
/** The name's body changed or went: the formulas that read it compile again. */
|
|
396
|
+
recompileNamed(nameId: string): void;
|
|
397
|
+
/** The root of the name's compiled body, or `null` while it has none. */
|
|
398
|
+
getBodyNode(nameId: string): ICalculation.FormulaNode | null;
|
|
399
|
+
/**
|
|
400
|
+
* Runs `batch` with the grids it makes collected into one write of the engine's registry, under
|
|
401
|
+
* one clone key - see `CalcBackend._collectingGrids`. Without it each grid is its own write,
|
|
402
|
+
* each copying the registry: a burst of a thousand compiles costs a thousand copies of a
|
|
403
|
+
* thousand entries, all of them reachable until the burst yields.
|
|
404
|
+
*/
|
|
405
|
+
collectGrids?<R>(batch: () => R): R;
|
|
406
|
+
}
|
|
313
407
|
}
|
|
314
408
|
interface NamedFormulaWireOptions {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
409
|
+
engine: NamedFormulaCollection.Engine;
|
|
410
|
+
/**
|
|
411
|
+
* Makes the host that holds the body - the same one again for the same name, see
|
|
412
|
+
* `NamedFormulaCollection.ConstructorOptions.createHost`. `null` for a name that has no grid (no
|
|
413
|
+
* proxy id was bound for it).
|
|
414
|
+
*/
|
|
415
|
+
createHost: (() => FormulaHost) | null;
|
|
319
416
|
ready: () => Promise<ICalculation.Status>;
|
|
320
417
|
/** Returns the scope's sheet gridId (for reference resolution). Resolved after ready(). */
|
|
321
418
|
getScopeGridId: () => string | null;
|
|
@@ -402,8 +499,15 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
402
499
|
private _seenBlock;
|
|
403
500
|
private _seenDeleted;
|
|
404
501
|
private _seenExpression;
|
|
405
|
-
/**
|
|
406
|
-
|
|
502
|
+
/**
|
|
503
|
+
* Holds the body; `null` for a name without a grid, and for a loaded name nothing has read yet.
|
|
504
|
+
* See {@link _block} and {@link _materialize}.
|
|
505
|
+
*/
|
|
506
|
+
private _host;
|
|
507
|
+
/** A loaded name, compiled on first use - see `NamedFormulaCollection.hydrate`. */
|
|
508
|
+
private readonly _lazy;
|
|
509
|
+
/** A {@link _materializeLater} is queued and has not run. */
|
|
510
|
+
private _materializeQueued;
|
|
407
511
|
/**
|
|
408
512
|
* The compiled body, read LIVE from this name's host on every access.
|
|
409
513
|
*
|
|
@@ -425,7 +529,7 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
425
529
|
* accessor below already has a fallback for.
|
|
426
530
|
*/
|
|
427
531
|
protected get _block(): IFormulaBlockView;
|
|
428
|
-
constructor(coords: IRange.CellCoords | null, options: INamedFormulasCollection.AddOptions, deleteFromCollection: () => void, wire: NamedFormulaWireOptions | null, gridId?: string | null, checkRename?: (nextName: string) => void, transactions?: ITransaction.IStore, isReadOnly?: (() => boolean) | null, resolveSheetScope?: (stableId: string) => string | null, notifyCollection?: () => void, notifyNameWritten?: () => void);
|
|
532
|
+
constructor(coords: IRange.CellCoords | null, options: INamedFormulasCollection.AddOptions, deleteFromCollection: () => void, wire: NamedFormulaWireOptions | null, gridId?: string | null, checkRename?: (nextName: string) => void, transactions?: ITransaction.IStore, isReadOnly?: (() => boolean) | null, resolveSheetScope?: (stableId: string) => string | null, notifyCollection?: () => void, notifyNameWritten?: () => void, lazy?: boolean);
|
|
429
533
|
/**
|
|
430
534
|
* Writes this name's body, which binds it to the region its expression designates once the
|
|
431
535
|
* engine answers.
|
|
@@ -437,6 +541,66 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
437
541
|
* brings describes a set that already contains it. `getRanges()` answers once the engine has.
|
|
438
542
|
*/
|
|
439
543
|
_wireNow(): void;
|
|
544
|
+
/**
|
|
545
|
+
* A loaded name that answers from its text: no host, or one whose grid a restore has left
|
|
546
|
+
* without state (see `CalcGrid._revive`), so no compiled body.
|
|
547
|
+
* @internal
|
|
548
|
+
*/
|
|
549
|
+
_isUnmaterialized(): boolean;
|
|
550
|
+
/**
|
|
551
|
+
* Gives a loaded name what a name authored through the API has from the start: a host, and the
|
|
552
|
+
* body compiled into it. The first use of the name calls this - a reader binding it, or an ask
|
|
553
|
+
* only the compiled body answers (`getRanges`, the graph, `evaluate`, a redefinition). Nothing
|
|
554
|
+
* more than bookkeeping for a name that has it already.
|
|
555
|
+
*
|
|
556
|
+
* @internal
|
|
557
|
+
*
|
|
558
|
+
* @remarks
|
|
559
|
+
* Folded into the current commit: the host writes as `FormulaHost._amendCurrent` does. So an undo
|
|
560
|
+
* past the edit whose reader compiled the name leaves the item without a body in its grid - the
|
|
561
|
+
* unmaterialized state again, with the host object still held - and the next use writes the body
|
|
562
|
+
* once more rather than assuming it is there.
|
|
563
|
+
*/
|
|
564
|
+
_materialize(): void;
|
|
565
|
+
/**
|
|
566
|
+
* {@link _materialize} at the next safe point: for a caller inside the engine's own work (the
|
|
567
|
+
* compile of a formula that mentions this name), where a body cannot be written.
|
|
568
|
+
* @internal
|
|
569
|
+
*/
|
|
570
|
+
_materializeLater(): void;
|
|
571
|
+
/**
|
|
572
|
+
* For a loaded name that has not compiled: its text as a list of sheet-qualified addresses
|
|
573
|
+
* (`Sheet1!$A$1:$B$2`, `'Q1'!$A:$A,'Q2'!$A:$A`), or `null` when the text is anything else.
|
|
574
|
+
*
|
|
575
|
+
* @remarks
|
|
576
|
+
* Read with the address grammar the API's `getRanges(address)` reads - a cell, a range, an entire
|
|
577
|
+
* row or column, a comma list of those - and nothing wider. A text that is a function, a name, an
|
|
578
|
+
* error, an array constant, an intersection or a bare reference does not parse, and only the
|
|
579
|
+
* compiler can say what it designates; the caller compiles then. What does parse is what the
|
|
580
|
+
* compiler would have called reference-only and resolved to these same cells, so the name can
|
|
581
|
+
* answer {@link getRanges} without a grid of its own - the Name Box asks every name what it
|
|
582
|
+
* designates, and a file's thousands of names must not all compile for the question.
|
|
583
|
+
*/
|
|
584
|
+
private _parseAddressText;
|
|
585
|
+
/**
|
|
586
|
+
* For a loaded name that has not compiled: whether its text is a literal - a number, a string, a
|
|
587
|
+
* boolean, an error or an array constant - and so designates no cells whatever the compiler would
|
|
588
|
+
* make of it.
|
|
589
|
+
*
|
|
590
|
+
* @remarks
|
|
591
|
+
* The names a decades-old model carries by the thousand are exactly these (macro-sheet
|
|
592
|
+
* constants, dead `#REF!`s), and a report that asks every name what it covers must not compile
|
|
593
|
+
* them for an answer that is `null` by the shape of the text. Strict on purpose: `#REF!$A$1` or
|
|
594
|
+
* `{1,2}+A1` is not matched and compiles, where the compiler's answer is the only correct one.
|
|
595
|
+
*/
|
|
596
|
+
private _isLiteralText;
|
|
597
|
+
/**
|
|
598
|
+
* Whether `getRanges()` on this name would compile it: a loaded name that has not compiled and
|
|
599
|
+
* whose text is neither a literal nor a plain address list. What a batch compiles ahead of a loop
|
|
600
|
+
* that asks each name in turn ({@link NamedFormulaCollection.prepareRanges}).
|
|
601
|
+
* @internal
|
|
602
|
+
*/
|
|
603
|
+
_compilesForRanges(): boolean;
|
|
440
604
|
/** Records what the readers have been reconciled with — see `_seenBlock`. */
|
|
441
605
|
private _recordSeen;
|
|
442
606
|
/**
|
|
@@ -523,6 +687,8 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
523
687
|
setExpression(expression: string, options?: ITransaction.OperationOptions): this;
|
|
524
688
|
/** {@inheritDoc INamed.getComment} */
|
|
525
689
|
getComment(): string | null;
|
|
690
|
+
/** {@inheritDoc ICalculation.INamedFormula.getFileAttributes} */
|
|
691
|
+
getFileAttributes(): Readonly<INamed.FileAttributes> | null;
|
|
526
692
|
/** {@inheritDoc INamed.setComment} */
|
|
527
693
|
setComment(comment: string | null, options?: ITransaction.OperationOptions): this;
|
|
528
694
|
/** {@inheritDoc INamed.isHidden} */
|
|
@@ -615,8 +781,14 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
615
781
|
* Consumers requery once the engine has started.
|
|
616
782
|
* 3. **Wiring bailed.** `_doWireCore` returns early when the scope sheet cannot be resolved,
|
|
617
783
|
* which leaves the item permanently unwired rather than transiently.
|
|
784
|
+
*
|
|
785
|
+
* A loaded name that has not compiled answers from its text when the text is a plain address
|
|
786
|
+
* list (see {@link _parseAddressText}) or a literal (see {@link _isLiteralText}, case 1 without
|
|
787
|
+
* the compile); any other text compiles it, and the answer is case 2.
|
|
618
788
|
*/
|
|
619
789
|
getRanges(): ICellRanges | null;
|
|
790
|
+
/** {@inheritDoc ICalculation.IFormula.getReferences} */
|
|
791
|
+
getReferences(): ICellRanges | null;
|
|
620
792
|
/** {@inheritDoc ICalculation.INamedFormula.getDirectDependents} */
|
|
621
793
|
getDirectDependents(): Promise<ICellRanges | null>;
|
|
622
794
|
/** {@inheritDoc ICalculation.INamedFormula.getDependents} */
|
|
@@ -678,7 +850,10 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
678
850
|
_getBodyNode(): ICalculation.FormulaNode | null;
|
|
679
851
|
/** Pre-wire fallback: return empty array before block is compiled. */
|
|
680
852
|
getTokens(evalIndex?: number): readonly ICalculation.FormulaToken[];
|
|
681
|
-
/**
|
|
853
|
+
/**
|
|
854
|
+
* Pre-wire fallback: return false before block is compiled. A loaded name that has not compiled
|
|
855
|
+
* answers as {@link getRanges} does, from its text.
|
|
856
|
+
*/
|
|
682
857
|
isReferenceOnly(): boolean;
|
|
683
858
|
/**
|
|
684
859
|
* Anchored at the virtual grid's origin. `this._coords` is the *defining* cell (the active cell
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The formula toolkit's code (`./toolkit`). */
|
|
2
|
+
export type FormulaToolkitModule = typeof import('./toolkit');
|
|
3
|
+
/**
|
|
4
|
+
* The one loader of the formula toolkit, shared by `FormulaText`, `parseFormulaLiteral` and
|
|
5
|
+
* `FunctionDeclarations`: each answers from {@link FormulaToolkit.peek} and gives the answer it
|
|
6
|
+
* gives for text it cannot read until the toolkit is loaded (DESIGN-CALC-SERVICE §13.25).
|
|
7
|
+
*/
|
|
8
|
+
export declare const FormulaToolkit: import('@sheetxl/utils').LazyModule<typeof import("./toolkit")>;
|
|
9
|
+
//# sourceMappingURL=_FormulaToolkit.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { FormulaError, IRange } from '@sheetxl/primitives';
|
|
2
|
+
import { ITable } from '../table';
|
|
3
|
+
import { ASTNode } from './compiler/ASTTypes';
|
|
4
|
+
import { StructuredReference } from './Types';
|
|
5
|
+
/**
|
|
6
|
+
* What a structured reference resolves against: a live table, or a snapshot of one taken before it
|
|
7
|
+
* was removed ({@link snapshotTableExtent}).
|
|
8
|
+
*/
|
|
9
|
+
export interface TableExtent {
|
|
10
|
+
getRange(): {
|
|
11
|
+
getCoords(): IRange.Coords;
|
|
12
|
+
};
|
|
13
|
+
getDataRange(): {
|
|
14
|
+
getCoords(): IRange.Coords;
|
|
15
|
+
};
|
|
16
|
+
getHeaderRowRange(): {
|
|
17
|
+
getCoords(): IRange.Coords;
|
|
18
|
+
};
|
|
19
|
+
getTotalRowRange(): {
|
|
20
|
+
getCoords(): IRange.Coords;
|
|
21
|
+
};
|
|
22
|
+
isShowHeaders(): boolean;
|
|
23
|
+
isShowTotals(): boolean;
|
|
24
|
+
getColumnById(id: string): {
|
|
25
|
+
getIndex(): number;
|
|
26
|
+
} | null;
|
|
27
|
+
getWorksheet(): {
|
|
28
|
+
getId(): string;
|
|
29
|
+
} | null | undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The column a structured reference's column id (`_<tableStableId>:<rawColumnId>`) names in `table`,
|
|
33
|
+
* or `null` when the table no longer has it.
|
|
34
|
+
*/
|
|
35
|
+
export declare function tableColumnOf(table: TableExtent, columnId: string): {
|
|
36
|
+
getIndex(): number;
|
|
37
|
+
} | null;
|
|
38
|
+
/**
|
|
39
|
+
* Whether a column `structuredReference` names is gone from `table`. Excel then writes `#REF!` in
|
|
40
|
+
* place of the whole reference, for an endpoint of a column range as much as for a lone column; a
|
|
41
|
+
* column deleted strictly between the endpoints leaves the reference as it was.
|
|
42
|
+
*/
|
|
43
|
+
export declare function namesDeadColumn(structuredReference: StructuredReference, table: TableExtent): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The cells `structuredReference` designates in `table`, for a formula in `row`.
|
|
46
|
+
*/
|
|
47
|
+
export declare function structuredReferenceCoords(structuredReference: StructuredReference, row: number, table: TableExtent): IRange.FixableCoords | FormulaError.Known;
|
|
48
|
+
/**
|
|
49
|
+
* `table`'s extent as plain data, so its references can still be resolved after it is removed.
|
|
50
|
+
*/
|
|
51
|
+
export declare function snapshotTableExtent(table: ITable): TableExtent;
|
|
52
|
+
/**
|
|
53
|
+
* The absolute address a structured reference designates, as a reference node: `Sheet1!$A$2:$C$4`.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* A this-row reference keeps its row relative (`Sheet1!$A2`), so every cell of a block still reads
|
|
57
|
+
* its own row.
|
|
58
|
+
*/
|
|
59
|
+
export declare function structuredReferenceAddress(reference: StructuredReference, extent: TableExtent): ASTNode;
|
|
60
|
+
//# sourceMappingURL=_TableExtent.d.ts.map
|
|
@@ -154,6 +154,23 @@ export declare function annotateImplicitIntersect(root: ASTNode, getFunction: ((
|
|
|
154
154
|
* carries it harmlessly: nothing reads it unless the block evaluating the formula demands it.
|
|
155
155
|
*/
|
|
156
156
|
export declare function annotateFirstCell(root: ASTNode, getFunction: ((name: string) => IFunction | null) | null | undefined): void;
|
|
157
|
+
/**
|
|
158
|
+
* The formula with every POSITION TEST replaced by `TRUE` and by `FALSE`, in every combination:
|
|
159
|
+
* what a block's blank-region representative is re-evaluated as to show its answer does not
|
|
160
|
+
* depend on which cell is asking (`IFormulaBlock.getPositionVariants`).
|
|
161
|
+
*
|
|
162
|
+
* @remarks
|
|
163
|
+
* A position test is a maximal subtree that reads the position (`ROW()`, `COLUMN()`) and is
|
|
164
|
+
* BOOLEAN at every cell, never an error: a comparison of position arithmetic with a literal
|
|
165
|
+
* (`ROW()>1`, `MOD(ROW(),2)=0`), `ISODD`/`ISEVEN` of it, and `NOT`/`AND`/`OR`/`XOR` of tests. Its
|
|
166
|
+
* value at any cell is `TRUE` or `FALSE`, so when the formula answers alike for every combination,
|
|
167
|
+
* the position cannot change the answer.
|
|
168
|
+
*
|
|
169
|
+
* `null` — nothing to vary — when the formula has no position test, more than
|
|
170
|
+
* {@link MAX_POSITION_TESTS}, a lazy argument (an `IF` arm a variant takes could read what the
|
|
171
|
+
* formula itself never did), or a `LET`/`LAMBDA` binding.
|
|
172
|
+
*/
|
|
173
|
+
export declare function positionVariants(root: ASTNode, getFunction: ((name: string) => IFunction | null) | null | undefined): ASTNode[] | null;
|
|
157
174
|
export declare function compileAST(runtime: IRuntime, symbols: ISymbolRegistry | undefined, original: ASTNode, preserveExpression?: boolean, error?: ParseError | null, getFunction?: ((name: string) => IFunction | null) | null): CompiledFormula;
|
|
158
175
|
/**
|
|
159
176
|
* Convert a chevrotain error into a {@link FormulaError.Parse}.
|
|
@@ -50,6 +50,12 @@ export declare function createTableReference(value: string, inputs: any[]): ASTN
|
|
|
50
50
|
* word → canonical. Display re-imaging (`tokensToString`) re-localizes for a localized target.
|
|
51
51
|
*/
|
|
52
52
|
export declare function createTableSpecifier(image: string, locale?: CompilerLocale): ASTNode;
|
|
53
|
+
/** The canonical specifier words a structured reference accepts — the text inside `[#…]`, minus the `#`. */
|
|
54
|
+
export declare const CANONICAL_SPECIFIER_WORDS: readonly string[];
|
|
55
|
+
/**
|
|
56
|
+
* The section (`StructuredReference.spec`) a structured reference's specifiers designate.
|
|
57
|
+
*/
|
|
58
|
+
export declare function structuredReferenceSpec(all: boolean, headers: boolean, data: boolean, totals: boolean): number;
|
|
53
59
|
/**
|
|
54
60
|
* A column name as a structured reference spells it: a `'` before each `[`, `]`, `#` and `'`,
|
|
55
61
|
* which is Excel's escape inside a column specifier. Without it a name holding a bracket cannot be
|
|
@@ -65,6 +71,16 @@ export declare function escapeColumnName(name: string): string;
|
|
|
65
71
|
* column (`[Q#1]` and `[Q'#1]` are both `Q#1`).
|
|
66
72
|
*/
|
|
67
73
|
export declare function unescapeColumnName(image: string): string;
|
|
74
|
+
/**
|
|
75
|
+
* The table reference starting at `startOffset` — `Table1[Col]`, `[1]!Table1[Col]` — as a one-element
|
|
76
|
+
* match, or `null`. The formula lexer's matcher for the token, and the address parser's.
|
|
77
|
+
*/
|
|
78
|
+
export declare function matchTableReference(text: string, startOffset: number): [string] | null;
|
|
79
|
+
/**
|
|
80
|
+
* The outermost bracketed string starting at `startOffset` — `[Workbook]`, an unqualified `[Col]` —
|
|
81
|
+
* as a one-element match, or `null`.
|
|
82
|
+
*/
|
|
83
|
+
export declare function matchBracketedString(text: string, startOffset: number): [string] | null;
|
|
68
84
|
export declare function createTableColumn(image: string): ASTNode;
|
|
69
85
|
export declare function createInfix(operator: string, left: ASTNode, right: ASTNode, isReference?: boolean): ASTNode;
|
|
70
86
|
export declare function createPostfix(operator: string, input: ASTNode | null | undefined, isReference?: boolean): ASTNode;
|
|
@@ -288,7 +288,7 @@ export interface CompiledFormula {
|
|
|
288
288
|
* expression callee, or a function the registry does not know. `TODAY()` and `NOW()` are
|
|
289
289
|
* accepted: volatile, but one value per pass. So are `RAND()` and every function taking a
|
|
290
290
|
* reference (`ROW()`, `OFFSET`, `FORMULATEXT`, the `SUMIF` family): whether the body reads a
|
|
291
|
-
* position (or draws) is a per-cell READ (`CalcScope.perCellRead`) that the pass sees when it
|
|
291
|
+
* position (or draws) is a per-cell READ (`CalcScope.perCellRead`, `positionRead`) that the pass sees when it
|
|
292
292
|
* evaluates the representative, not a property of the text. The block adds its own gates (a
|
|
293
293
|
* precedent template, not array-entered) and the pass its run-time ones (no dynamic read, no
|
|
294
294
|
* per-cell read, a scalar result); this is only the half that can be known from the text.
|