@sheetxl/sdk 0.8.0-beta.10 → 0.8.0-beta.12
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/{CYyv6uGjo10ig5FP.mjs → -Jx-jNHmtIQQfLvK.mjs} +1 -1
- package/browser/esm/{CdLZWVcH8cncBUPJ.mjs → 2WuhYrIpYmOR5H73.mjs} +110 -261
- package/browser/esm/{Cqr3knDsBvoVZ6MN.mjs → 2mIwPy2D2JUX-9wx.mjs} +2 -2
- package/browser/esm/B3wf5vZCsWfWsDbj.mjs +12 -0
- package/browser/esm/{BzLfNyc6OOShIErH.mjs → BIHrHjRGWVlJglcp.mjs} +2 -2
- package/browser/esm/{C9B0djuUarfNdoj0.mjs → BTFBedJMRWGvZyCE.mjs} +1 -1
- package/browser/esm/{Btg43M1Bf-ENDreu.mjs → BdCJNawfifyPupCP.mjs} +1 -1
- package/browser/esm/{ClB5ix51roQOpZEr.mjs → Bg5Di9GLNAkbqQ1P.mjs} +2877 -2067
- package/browser/esm/BnC4-27Igwb8oDf2.mjs +1552 -0
- package/browser/esm/{DhKkrCVASZ6Isvz6.mjs → Bt8_m94tBdks209L.mjs} +1 -1
- package/browser/esm/{zqJOaweiXE9D8RY1.mjs → BudSIfXBAsTxvu-K.mjs} +31835 -40812
- package/browser/esm/C9u8FUewte5ugUjH.mjs +5132 -0
- package/browser/esm/{Di58Ji1n--3Mgc_2.mjs → CBYMTDzMf1Vh7pkw.mjs} +1 -1
- package/browser/esm/CNdjyofiRu6CYOrr.mjs +12835 -0
- package/browser/esm/{Dtoyt8q5RyGAlxCp.mjs → CRkYR-siY2C994KV.mjs} +1 -1
- package/browser/esm/CTe2qfmIUEad6FJv.mjs +199 -0
- package/browser/esm/CUzYuYTTGsChC_kZ.mjs +8422 -0
- package/browser/esm/CdEO8CEee6lEhabA.mjs +117 -0
- package/browser/esm/CfRqiPDg6RBTg1EN.mjs +367 -0
- package/browser/esm/CndRBvVfQUJIYRRj.mjs +193 -0
- package/browser/esm/{Y79I7Sm8kjaYexhf.mjs → CwOPLXU3-9ZHGyOT.mjs} +1 -1
- package/browser/esm/{CjsUGJEQSbGjnH6R.mjs → Cxjxk0ncRKx80I-w.mjs} +1 -1
- package/browser/esm/D2RZh0O9neOsyLAE.mjs +281 -0
- package/browser/esm/{De175LygU7ot4nQm.mjs → D64dM68B1pKYFzdP.mjs} +2 -2
- package/browser/esm/{o8MFgcVXns987D6_.mjs → D9xNz46kAfXMZzp4.mjs} +6 -6
- package/browser/esm/{BcHmrKHwMMOlzc9_.mjs → DK899HhWX1HINMC1.mjs} +55 -55
- package/browser/esm/DPhGQLNGmDZwODwJ.mjs +395 -0
- package/browser/esm/DVroRnhi-5IDXNgM.mjs +210 -0
- package/browser/esm/{Bk7xxbdDpa7-sIwd.mjs → DZiivy0NmO1Vnyzk.mjs} +2 -2
- package/browser/esm/{CZ5oa92wZEAXebgk.mjs → DgrAuRD2qr2DvFeJ.mjs} +78 -68
- package/browser/esm/{D4uVlrG0xEFctsSM.mjs → DobHLF6VjHr7Xi40.mjs} +285 -67
- package/browser/esm/{CSx9ed1JOs7K5BXO.mjs → DwZCT7DZiiXoTweg.mjs} +2 -2
- package/browser/esm/DwwR3O2sEZApPSTF.mjs +86 -0
- package/browser/esm/Tah7cnFb_HNZdLtj.mjs +128 -0
- package/browser/esm/{BEAY9XgKNx-bakXW.mjs → fXWUMDhZ5yMSO629.mjs} +1 -1
- package/browser/esm/{BqskM7wA8oPfFQue.mjs → hCQJcmIzPDxDEv2q.mjs} +2 -2
- package/browser/esm/index.mjs +1294 -1008
- package/browser/esm/{Cgd5BnM3hg9RyUel.mjs → qO-ujUrgq6H3TQix.mjs} +1 -1
- package/browser/esm/w6Jea0TiclPrYZ2M.mjs +1703 -0
- package/browser/esm/yuhcOYw6SHQ-RCm3.mjs +114 -0
- package/licenses/dependencies.txt +75 -75
- package/node/esm/-TA0MneBDKdGhsib.mjs +8668 -0
- package/node/esm/B-HUPAcqvK0eeeCz.mjs +134 -0
- package/node/esm/BL2iiEoqxDEV2Xrg.mjs +8320 -0
- package/node/esm/{C6ZXsNyLXI6zA63X.mjs → BNXLOEddJ6O9gYws.mjs} +9 -9
- package/node/esm/{BH1v-E4Ro3bR7Znw.mjs → BSvOluusoDM4z_dx.mjs} +151 -302
- package/node/esm/{CD9wbvufChVYYkrI.mjs → BskP3b8vUoIOGLY6.mjs} +2 -2
- package/node/esm/{CnSQ7MTXAUAyBOoS.mjs → Btw4148Ot8ifhNc1.mjs} +285 -64
- package/node/esm/{B6D7sSetrcOWLsKj.mjs → C14-R6tifRh7pc0p.mjs} +1 -1
- package/node/esm/C99zzq8DImQXi4BQ.mjs +133 -0
- package/node/esm/{BtuY37FumvLE7EBo.mjs → CBuEu5Jk-LfaDy-H.mjs} +176 -166
- package/node/esm/{DdFgXl-Ux2cMBTs_.mjs → CG-qBU5BAaVz7e-P.mjs} +1 -1
- package/node/esm/CPI58duc0j0a-HpJ.mjs +115 -0
- package/node/esm/CRt3vXe6YmXzqk3H.mjs +406 -0
- package/node/esm/{CUUoseJmFsCf82bb.mjs → C_aL7CGS1lrNn1Ng.mjs} +1 -1
- package/node/esm/{D7MfcID2Wf6l6VpC.mjs → C_xf5Bz30VqiJjXn.mjs} +1 -1
- package/node/esm/CiIymQN6aJCul62g.mjs +610 -0
- package/node/esm/{B9ljpEIZg6wOTzRE.mjs → Ci_zLYmCD7e-C79O.mjs} +1 -1
- package/node/esm/{Bqd62L8KFgdS0Vou.mjs → CkRYLed8Mmn3giNg.mjs} +2 -2
- package/node/esm/D3ptRKzASqBut1DE.mjs +117 -0
- package/node/esm/{DefYISWfdZJFx57m.mjs → D4ROK9UwDpS6jO3Z.mjs} +1 -1
- package/node/esm/D8hO07ToAibIuniw.mjs +13014 -0
- package/node/esm/{Bh4dv6tMjXX3X4nI.mjs → DUTmDHbFbhLDT4F3.mjs} +1 -1
- package/node/esm/{DCplLG93GfTs1vNw.mjs → DV5CU37aEbFbWFL0.mjs} +1 -1
- package/node/esm/{CUQi5ZtMO02nhG0W.mjs → DdoiuKg9BKubtF1V.mjs} +1 -1
- package/node/esm/DggQ23jKMpwhENfa.mjs +372 -0
- package/node/esm/DhS6yWjrrSNIJMsn.mjs +1033 -0
- package/node/esm/{DMD12JUh7HJw2-jl.mjs → DhTya_mhmN53vskv.mjs} +1 -1
- package/node/esm/Dn1M7YWi25DeeYUb.mjs +210 -0
- package/node/esm/DrCf6ITcBhVOFpRj.mjs +86 -0
- package/node/esm/{BN9j8V9gCExMjVtJ.mjs → DxazKtROyaI51dWl.mjs} +1 -1
- package/node/esm/{MiU4rDOiocmJ-9Ry.mjs → Q_S1g46ZOTrdhTae.mjs} +1 -1
- package/node/esm/Vocy-I9dKzZMr0Ct.mjs +59323 -0
- package/node/esm/ZXPFcsT2zrALCZux.mjs +289 -0
- package/node/esm/eimUGjiIP-b8HiM6.mjs +199 -0
- package/node/esm/icn2nX5Z8e_3mNAv.mjs +12 -0
- package/node/esm/index.mjs +2808 -65678
- package/node/esm/lGJ42sHqg5if2bba.mjs +1770 -0
- package/node/esm/{Bsx9uijd4X_SKV3L.mjs → pYtP7wPyS96NQyXS.mjs} +51 -51
- 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 +93 -9
- package/resources/locales/en/model.msg.json +95 -10
- package/types/scripting-api.json +10809 -8021
- package/types/scripting-enums.json +201 -44
- package/types/scripting.d.ts +17030 -8666
- 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/anomalies/_Anomalies.d.ts +109 -0
- package/types/src/anomalies/_FocusTable.d.ts +11 -0
- package/types/src/anomalies/_FormulaChecks.d.ts +133 -0
- package/types/src/anomalies/_LabelChecks.d.ts +21 -0
- package/types/src/anomalies/_LiteralChecks.d.ts +35 -0
- package/types/src/anomalies/_SeriesChecks.d.ts +13 -0
- package/types/src/border/IBorders.d.ts +16 -0
- package/types/src/calculation/Calculation.d.ts +139 -371
- package/types/src/calculation/ExternalBookBindings.d.ts +2 -3
- 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 +133 -18
- package/types/src/calculation/INamedFormulasCollection.d.ts +4 -0
- package/types/src/calculation/NamedFormulaCollection.d.ts +293 -22
- package/types/src/calculation/_CloneBoundary.d.ts +1 -1
- package/types/src/calculation/_FormulaToolkit.d.ts +9 -0
- package/types/src/calculation/_TableExtent.d.ts +60 -0
- package/types/src/calculation/compiler/ASTTypes.d.ts +6 -2
- 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 +9 -1
- package/types/src/calculation/engine/CalcBackend.d.ts +953 -0
- package/types/src/calculation/engine/index.d.ts +10 -0
- package/types/src/calculation/executor/CalcExecutor.d.ts +94 -24
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +23 -1
- package/types/src/calculation/executor/_WhatIf.d.ts +50 -0
- package/types/src/calculation/formula/Formula.d.ts +9 -0
- package/types/src/calculation/formula/FormulaBlock.d.ts +10 -3
- package/types/src/calculation/formula/IFormulaBlock.d.ts +21 -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/_DataTableFunction.d.ts +14 -0
- 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 +44 -10
- package/types/src/calculation/grid/CalcGridBackend.d.ts +35 -27
- package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -2
- package/types/src/calculation/grid/CalcGridUtils.d.ts +12 -3
- package/types/src/calculation/grid/FormulaHost.d.ts +51 -6
- package/types/src/calculation/grid/ICalcGrid.d.ts +48 -15
- package/types/src/calculation/grid/_CalcRequest.d.ts +28 -6
- package/types/src/calculation/grid/_CellValueRun.d.ts +21 -0
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +29 -2
- package/types/src/calculation/spatial/SpillEntry.d.ts +16 -2
- package/types/src/calculation/state/CalcNode.d.ts +0 -1
- package/types/src/calculation/state/CalcScope.d.ts +44 -6
- package/types/src/calculation/state/CalcState.d.ts +36 -4
- package/types/src/calculation/state/CalculationContext.d.ts +30 -3
- package/types/src/calculation/state/DeferredCalls.d.ts +260 -0
- package/types/src/calculation/state/IContextContainer.d.ts +32 -0
- package/types/src/calculation/state/_PendingOverlayGrid.d.ts +6 -0
- package/types/src/calculation/state/_WhatIfLayer.d.ts +91 -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 +302 -34
- package/types/src/cell/ICellHeader.d.ts +7 -6
- package/types/src/cell/ICellProtection.d.ts +1 -1
- package/types/src/cellControl/CellControl.d.ts +67 -0
- package/types/src/cellControl/CellControlCollection.d.ts +29 -0
- package/types/src/cellControl/CellControlRegistry.d.ts +47 -0
- package/types/src/cellControl/ICellControl.d.ts +99 -0
- package/types/src/cellControl/ICellControlCollection.d.ts +67 -0
- package/types/src/cellControl/index.d.ts +4 -0
- 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 +525 -110
- package/types/src/cellRange/ICellRanges.d.ts +12 -6
- 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 +829 -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 +61 -0
- package/types/src/chart/resolve/_ResolvedChart.d.ts +447 -0
- package/types/src/collections/ISparseGrid.d.ts +11 -2
- package/types/src/collections/MixedTypedArrayList.d.ts +8 -2
- package/types/src/collections/RTree.d.ts +116 -36
- package/types/src/collections/SparseGrid.d.ts +9 -11
- 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 +30 -4
- 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/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 +3 -4
- package/types/src/fetch/Fetcher.d.ts +15 -0
- package/types/src/fetch/IFetcher.d.ts +47 -0
- package/types/src/fetch/_WorkbookFetch.d.ts +43 -0
- package/types/src/fetch/index.d.ts +3 -0
- 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 +24 -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 +17 -1
- package/types/src/hyperlink/_Hyperlink.d.ts +4 -1
- package/types/src/index.d.ts +4 -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 +38 -2
- package/types/src/named/NamedCollection.d.ts +34 -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/AsyncValue.d.ts +58 -0
- 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/resource/IResource.d.ts +9 -0
- package/types/src/resource/IResourceCollection.d.ts +4 -0
- package/types/src/resource/Resource.d.ts +2 -0
- package/types/src/resource/_AddResource.d.ts +13 -0
- package/types/src/richData/CellImage.d.ts +95 -0
- package/types/src/richData/Hyperlink.d.ts +49 -0
- package/types/src/richData/IRichDataCollection.d.ts +76 -0
- package/types/src/richData/IRichDataKind.d.ts +66 -0
- package/types/src/richData/RichArray.d.ts +42 -0
- package/types/src/richData/RichDataCollection.d.ts +23 -0
- package/types/src/richData/RichDataRegistry.d.ts +89 -0
- package/types/src/richData/RichDataValues.d.ts +20 -0
- package/types/src/richData/RichRecord.d.ts +68 -0
- package/types/src/richData/RichText.d.ts +59 -0
- package/types/src/richData/index.d.ts +9 -0
- package/types/src/scripting/FunctionArguments.d.ts +17 -1
- package/types/src/scripting/FunctionCollection.d.ts +8 -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/Scripts.d.ts +10 -0
- package/types/src/scripting/TypedFunction.d.ts +2 -0
- 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/ICellContainerOptions.d.ts +6 -0
- 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 +1521 -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 +40 -27
- package/types/src/sheet/SheetRange.d.ts +50 -13
- package/types/src/sheet/SheetRanges.d.ts +14 -12
- package/types/src/sheet/{Sheet.d.ts → Worksheet.d.ts} +591 -171
- package/types/src/sheet/WorksheetCollection.d.ts +39 -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/_ListenerAnchor.d.ts +7 -1
- package/types/src/sheet/_RangeStateSweep.d.ts +2 -3
- package/types/src/sheet/_ScalarListFactory.d.ts +55 -7
- 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 +11 -9
- 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 +80 -9
- 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 +269 -39
- package/types/src/workbook/Workbook.d.ts +102 -25
- package/types/src/workbook/WorkbookRange.d.ts +2 -2
- package/types/src/workbook/WorkbookRanges.d.ts +3 -3
- 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/CImNvdz1iP-lUlro.mjs +0 -610
- 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
|
@@ -1,12 +1,11 @@
|
|
|
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
|
-
import { INamed } from '../named';
|
|
6
|
+
import { INamed, INamedCollection } from '../named';
|
|
7
7
|
import { ITypes, AbstractCollection } from '../type';
|
|
8
|
-
import {
|
|
9
|
-
import { FormulaHost } from './grid';
|
|
8
|
+
import { FormulaHost, ICalcGrid } from './grid';
|
|
10
9
|
import { Formula, IFormulaBlockView } from './formula';
|
|
11
10
|
import { ICalculation } from './ICalculation';
|
|
12
11
|
import { INamedFormulasCollection } from './INamedFormulasCollection';
|
|
@@ -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,7 +61,22 @@ 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);
|
|
78
|
+
/** Loaded names some write has given a state of their own - see {@link NamedFormula._writeNamedState}. */
|
|
79
|
+
private _written;
|
|
67
80
|
/**
|
|
68
81
|
* Hydrates from `IWorkbook.JSON.names`. A malformed entry is warned and skipped rather than
|
|
69
82
|
* failing the whole load — one bad name must not cost the workbook every other name.
|
|
@@ -75,10 +88,20 @@ export declare class NamedFormulaCollection extends AbstractCollection<ICalculat
|
|
|
75
88
|
* be listed, and still evaluate to `#NAME?`.
|
|
76
89
|
*
|
|
77
90
|
* Not on `INamedFormulasCollection`: hydration belongs to whoever constructs the engine.
|
|
91
|
+
*
|
|
92
|
+
* A loaded name BINDS now and COMPILES on first use (see {@link NamedFormula._materialize}). A
|
|
93
|
+
* legacy file carries thousands of names nothing reads, and compiling one costs a grid of its own
|
|
94
|
+
* in the model's store, which every later commit copies. Until a reader binds the name, or the
|
|
95
|
+
* item is asked something only a compiled body answers, it answers from its state - and a loaded
|
|
96
|
+
* expression is already the file's sheet-qualified form, so the text is what a save writes back
|
|
97
|
+
* either way. A lambda-valued name is the exception: it is reached as a FUNCTION, by name, not
|
|
98
|
+
* through a symbol bind, so nothing would compile it ahead of the call.
|
|
78
99
|
*/
|
|
79
100
|
hydrate(json: INamed.JSON[] | undefined): void;
|
|
80
101
|
/** Set while {@link hydrate} runs, so the read-only refusal in {@link add} stands down. */
|
|
81
102
|
private _hydrating;
|
|
103
|
+
/** The set's map as the running {@link hydrate} made it - see `add`. */
|
|
104
|
+
private _hydratingItems;
|
|
82
105
|
/**
|
|
83
106
|
* Serializes to `IWorkbook.JSON.names` form, sorted by scope+name so output is stable across
|
|
84
107
|
* saves.
|
|
@@ -104,6 +127,73 @@ export declare class NamedFormulaCollection extends AbstractCollection<ICalculat
|
|
|
104
127
|
toJSON(): INamed.JSON[] | null;
|
|
105
128
|
/** {@inheritDoc INamedFormulasCollection.add} */
|
|
106
129
|
add(options: INamedFormulasCollection.AddOptions): ICalculation.INamedFormula;
|
|
130
|
+
/**
|
|
131
|
+
* {@link add}, with the choice of WHEN the name compiles.
|
|
132
|
+
*
|
|
133
|
+
* @param lazy `true` for a loaded name: the item is recorded, indexed and announced, and its body
|
|
134
|
+
* compiles on first use (see {@link hydrate}). A name authored through the API compiles at once -
|
|
135
|
+
* the author expects `getRanges()` after `ready()`, and the wire is what qualifies a bare reference.
|
|
136
|
+
*/
|
|
137
|
+
protected _add(options: INamedFormulasCollection.AddOptions, lazy: boolean): ICalculation.INamedFormula;
|
|
138
|
+
/**
|
|
139
|
+
* Compiles every loaded name whose text mentions the sheet, and has not compiled yet.
|
|
140
|
+
*
|
|
141
|
+
* @internal
|
|
142
|
+
*
|
|
143
|
+
* @remarks
|
|
144
|
+
* A compiled body follows the sheets it reads: a shift of their cells moves its references, and
|
|
145
|
+
* a rename re-images it from the sheet's id. Text follows nothing. So before a change of that kind
|
|
146
|
+
* lands, every name still answering from its text that could be reading the sheet is compiled,
|
|
147
|
+
* and the change reaches a body. A name that mentions no sheet at all - an error, an array
|
|
148
|
+
* constant, a number - is left as it is. The test is a spelling in the text, which is wider than
|
|
149
|
+
* a reference (a sheet called `A` is mentioned by nearly everything): a wide net compiles more
|
|
150
|
+
* than it needs to, a narrow one would leave a name pointing at the wrong cells.
|
|
151
|
+
*/
|
|
152
|
+
_materializeMentioning(sheetName: string): void;
|
|
153
|
+
/**
|
|
154
|
+
* {@inheritDoc NamedCollection.Source.prepareRanges}
|
|
155
|
+
*
|
|
156
|
+
* @remarks
|
|
157
|
+
* Compiles, as one batch, the loaded names among `items` whose `getRanges()` would otherwise
|
|
158
|
+
* compile them one at a time: a name whose text is a literal or a plain address answers from its
|
|
159
|
+
* text and is left alone. Items of another source are not this collection's and are skipped.
|
|
160
|
+
*/
|
|
161
|
+
prepareRanges(items: readonly INamed[]): void;
|
|
162
|
+
/**
|
|
163
|
+
* {@inheritDoc NamedCollection.Source.removeUnused}
|
|
164
|
+
*
|
|
165
|
+
* @remarks
|
|
166
|
+
* A name that has not compiled has no compiled reader - a formula that reads a name binds it - so
|
|
167
|
+
* only the compiled ones are asked of the engine. What the engine cannot see is a reader that has
|
|
168
|
+
* not compiled either: a kept name whose definition spells a candidate keeps it, and whatever that
|
|
169
|
+
* one spells in turn. By spelling, so lenient - a name wrongly kept costs nothing, one wrongly
|
|
170
|
+
* removed breaks the name that read it.
|
|
171
|
+
*
|
|
172
|
+
* A LAMBDA is called, not bound, so it is never removed; nor is a built-in name (`_xlnm.`),
|
|
173
|
+
* which the sheet reads rather than any formula.
|
|
174
|
+
*/
|
|
175
|
+
removeUnused(options: INamedCollection.RemoveUnusedOptions & {
|
|
176
|
+
scope?: string;
|
|
177
|
+
}): Promise<number>;
|
|
178
|
+
/**
|
|
179
|
+
* Deletes `items` as ONE operation: each item's own writes, then a single rewrite of the set.
|
|
180
|
+
* Deleted one at a time, each removal copies the set, and a legacy file's names are thousands.
|
|
181
|
+
*/
|
|
182
|
+
protected _removeMany(items: readonly NamedFormula[]): void;
|
|
183
|
+
/**
|
|
184
|
+
* Compiles the loaded names among `items` that have not compiled, as ONE operation.
|
|
185
|
+
*
|
|
186
|
+
* @remarks
|
|
187
|
+
* Compiled one by one outside an operation, each name opens a commit of its own on the model
|
|
188
|
+
* store, so its grid lands under its own engine commit - and every engine commit copies the
|
|
189
|
+
* engine's registries, which hold an entry per sheet and per compiled name. A loop over the names
|
|
190
|
+
* of a legacy file (ten thousand of them) is then quadratic, in time and in memory held until the
|
|
191
|
+
* loop yields. Under one operation the names share one landing, one engine commit and one clone
|
|
192
|
+
* key, and the engine collects the grids they make into one write ({@link Engine.collectGrids}).
|
|
193
|
+
*
|
|
194
|
+
* @internal
|
|
195
|
+
*/
|
|
196
|
+
_materializeMany(items: readonly NamedFormula[]): void;
|
|
107
197
|
/**
|
|
108
198
|
* A name has just been bound to the region it designates.
|
|
109
199
|
*
|
|
@@ -204,6 +294,14 @@ export declare class NamedFormulaCollection extends AbstractCollection<ICalculat
|
|
|
204
294
|
* Backs both the duplicate check in {@link add} and the collision check on rename.
|
|
205
295
|
*/
|
|
206
296
|
protected _findSameIdentity(name: string, scopeId: string | null): NamedFormula | null;
|
|
297
|
+
/** The items named `upper` (already upper-cased), through {@link _nameIndex}. */
|
|
298
|
+
protected _itemsNamed(upper: string, state: State): readonly NamedFormula[];
|
|
299
|
+
/**
|
|
300
|
+
* A write made here - an item added, renamed or removed - keeps {@link _nameIndex} current
|
|
301
|
+
* rather than costing the next read a rebuild. The set's map is read again, as the write has
|
|
302
|
+
* just replaced it.
|
|
303
|
+
*/
|
|
304
|
+
protected _indexItem(item: NamedFormula, removed: boolean): void;
|
|
207
305
|
/**
|
|
208
306
|
* Resolves a caller's `scope` input to the sheet's stableId.
|
|
209
307
|
*
|
|
@@ -231,6 +329,8 @@ export declare class NamedFormulaCollection extends AbstractCollection<ICalculat
|
|
|
231
329
|
*/
|
|
232
330
|
_addNamesWrittenListener(listeners: IListener.Callbacks<NamedFormulaCollection, NamedFormulaCollection.NamesWrittenEvents>): IListener.Remove;
|
|
233
331
|
protected _notifyNamesWritten(item: NamedFormula, removed: boolean): void;
|
|
332
|
+
/** {@link _notifyNamesWritten} for a batch, told as one. */
|
|
333
|
+
protected _notifyManyWritten(items: readonly NamedFormula[], removed: boolean): void;
|
|
234
334
|
/**
|
|
235
335
|
* Every name as {@link _addNamesWrittenListener} tells one: what a listener starts from.
|
|
236
336
|
* @internal
|
|
@@ -256,7 +356,7 @@ export declare namespace NamedFormulaCollection {
|
|
|
256
356
|
}
|
|
257
357
|
/** See {@link NamedFormulaCollection._addNamesWrittenListener}. */
|
|
258
358
|
interface NamesWrittenEvents {
|
|
259
|
-
onNamesWritten?(source: NamedFormulaCollection, written: NamesWritten): void;
|
|
359
|
+
onNamesWritten?(source: NamedFormulaCollection, written: readonly NamesWritten[]): void;
|
|
260
360
|
}
|
|
261
361
|
interface ConstructorOptions {
|
|
262
362
|
/**
|
|
@@ -269,8 +369,8 @@ export declare namespace NamedFormulaCollection {
|
|
|
269
369
|
*/
|
|
270
370
|
json?: INamed.JSON[];
|
|
271
371
|
transactions?: ITransaction.IStore;
|
|
272
|
-
|
|
273
|
-
|
|
372
|
+
/** What a name tells the engine it compiles into, and reads back from it. */
|
|
373
|
+
engine?: NamedFormulaCollection.Engine;
|
|
274
374
|
ready?: () => Promise<ICalculation.Status>;
|
|
275
375
|
getRange: (address: ICellRange.Address) => ICellRange;
|
|
276
376
|
/** Resolves an address to ranges. Backs {@link ICalculation.INamedFormula.getReferences}. */
|
|
@@ -286,7 +386,7 @@ export declare namespace NamedFormulaCollection {
|
|
|
286
386
|
resolveSheetScope?: (stableId: string) => string | null;
|
|
287
387
|
/**
|
|
288
388
|
* 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.
|
|
389
|
+
* engine's replica has been told. Without it, a scope binds to nothing.
|
|
290
390
|
*/
|
|
291
391
|
bindSheet?: (scope: string) => string | null;
|
|
292
392
|
/** Backs {@link INamed.isReadOnly} on each item. Defaults to not read-only. */
|
|
@@ -310,12 +410,40 @@ export declare namespace NamedFormulaCollection {
|
|
|
310
410
|
*/
|
|
311
411
|
isEngineReady?: () => boolean;
|
|
312
412
|
}
|
|
413
|
+
/**
|
|
414
|
+
* What a name asks of the engine it compiles into. Held from before the engine starts: each call
|
|
415
|
+
* reaches the engine once there is one, and waits for it until then.
|
|
416
|
+
*/
|
|
417
|
+
interface Engine {
|
|
418
|
+
/** The name's resolution moved: the formulas that read it are out of date. */
|
|
419
|
+
invalidateNamed(nameId: string): void;
|
|
420
|
+
/** The name's body changed or went: the formulas that read it compile again. */
|
|
421
|
+
recompileNamed(nameId: string): void;
|
|
422
|
+
/** The root of the name's compiled body, or `null` while it has none. */
|
|
423
|
+
getBodyNode(nameId: string): ICalculation.FormulaNode | null;
|
|
424
|
+
/**
|
|
425
|
+
* The name's precedents or dependents, cells in calc currency and names, as the engine walks
|
|
426
|
+
* them - asked by the name's id, so a name that has not compiled is asked without compiling it.
|
|
427
|
+
* Nothing while the engine is `Off`.
|
|
428
|
+
*/
|
|
429
|
+
getNameGraph(nameId: string, kind: 'precedents' | 'dependents', direct: boolean): Promise<ICalcGrid.GraphNeighbors>;
|
|
430
|
+
/**
|
|
431
|
+
* Runs `batch` with the grids it makes collected into one write of the engine's registry, under
|
|
432
|
+
* one clone key - see `CalcBackend._collectingGrids`. Without it each grid is its own write,
|
|
433
|
+
* each copying the registry: a burst of a thousand compiles costs a thousand copies of a
|
|
434
|
+
* thousand entries, all of them reachable until the burst yields.
|
|
435
|
+
*/
|
|
436
|
+
collectGrids?<R>(batch: () => R): R;
|
|
437
|
+
}
|
|
313
438
|
}
|
|
314
439
|
interface NamedFormulaWireOptions {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
440
|
+
engine: NamedFormulaCollection.Engine;
|
|
441
|
+
/**
|
|
442
|
+
* Makes the host that holds the body - the same one again for the same name, see
|
|
443
|
+
* `NamedFormulaCollection.ConstructorOptions.createHost`. `null` for a name that has no grid (no
|
|
444
|
+
* proxy id was bound for it).
|
|
445
|
+
*/
|
|
446
|
+
createHost: (() => FormulaHost) | null;
|
|
319
447
|
ready: () => Promise<ICalculation.Status>;
|
|
320
448
|
/** Returns the scope's sheet gridId (for reference resolution). Resolved after ready(). */
|
|
321
449
|
getScopeGridId: () => string | null;
|
|
@@ -360,7 +488,10 @@ interface NamedFormulaWireOptions {
|
|
|
360
488
|
* supplied is implemented here against the transaction store the item already holds.
|
|
361
489
|
*/
|
|
362
490
|
declare class NamedFormula extends Formula implements ICalculation.INamedFormula, INamed<string> {
|
|
363
|
-
/**
|
|
491
|
+
/**
|
|
492
|
+
* Transactional state — see the field docs on `_transactions`. A loaded name nothing has written
|
|
493
|
+
* reads what the file said, as does one an undo took back past its first write.
|
|
494
|
+
*/
|
|
364
495
|
private _getNamedState;
|
|
365
496
|
private readonly _id;
|
|
366
497
|
/**
|
|
@@ -368,7 +499,19 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
368
499
|
* mutation is undoable.
|
|
369
500
|
*/
|
|
370
501
|
private readonly _transactions;
|
|
371
|
-
|
|
502
|
+
/**
|
|
503
|
+
* `null` for a loaded name until its first write: every commit copies the store's snapshot, and a
|
|
504
|
+
* legacy file's tens of thousands of names were nearly all of it. See {@link _writeNamedState}.
|
|
505
|
+
*/
|
|
506
|
+
private _stateId;
|
|
507
|
+
/** What a loaded name's file said: its state until written, and again when undone past that write. */
|
|
508
|
+
private readonly _loaded;
|
|
509
|
+
/** Tells the collection a loaded name has a state now, so it hears an undo that removes it. */
|
|
510
|
+
private readonly _noteWritten;
|
|
511
|
+
/** Whether the collection lists this item now — a loaded name's deletion when it has no state. */
|
|
512
|
+
private readonly _isListed;
|
|
513
|
+
/** {@link _loaded}, deleted. */
|
|
514
|
+
private _loadedDeleted;
|
|
372
515
|
private readonly _deleteFromCollection;
|
|
373
516
|
private readonly _wire;
|
|
374
517
|
/** Refuses a rename that would collide with a sibling — see {@link setName}. */
|
|
@@ -387,6 +530,11 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
387
530
|
private readonly _notifyCollection;
|
|
388
531
|
/** The collection's {@link NamedFormulaCollection._addNamesWrittenListener}, for a rename. */
|
|
389
532
|
private readonly _notifyNameWritten;
|
|
533
|
+
/**
|
|
534
|
+
* Made on the first `addListeners`. Every emitter on the shared store is told of every commit, and
|
|
535
|
+
* a legacy file's tens of thousands of names nothing listens to made each commit pay for all of
|
|
536
|
+
* them. Until it exists there is nobody to notify.
|
|
537
|
+
*/
|
|
390
538
|
private _emitter;
|
|
391
539
|
private _transactionsRemoveListener;
|
|
392
540
|
private _closed;
|
|
@@ -402,8 +550,15 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
402
550
|
private _seenBlock;
|
|
403
551
|
private _seenDeleted;
|
|
404
552
|
private _seenExpression;
|
|
405
|
-
/**
|
|
406
|
-
|
|
553
|
+
/**
|
|
554
|
+
* Holds the body; `null` for a name without a grid, and for a loaded name nothing has read yet.
|
|
555
|
+
* See {@link _block} and {@link _materialize}.
|
|
556
|
+
*/
|
|
557
|
+
private _host;
|
|
558
|
+
/** A loaded name, compiled on first use - see `NamedFormulaCollection.hydrate`. */
|
|
559
|
+
private readonly _lazy;
|
|
560
|
+
/** A {@link _materializeLater} is queued and has not run. */
|
|
561
|
+
private _materializeQueued;
|
|
407
562
|
/**
|
|
408
563
|
* The compiled body, read LIVE from this name's host on every access.
|
|
409
564
|
*
|
|
@@ -424,8 +579,48 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
424
579
|
* `undefined` (no grid, or nothing compiled at its origin) is the pre-wire state, which every
|
|
425
580
|
* accessor below already has a fallback for.
|
|
426
581
|
*/
|
|
582
|
+
/** Hears this name's own state: made with the item, or by a loaded name's first write. */
|
|
583
|
+
private _listenToState;
|
|
584
|
+
/**
|
|
585
|
+
* Whether an undo has taken this loaded name back past its first write: it has a state id, and
|
|
586
|
+
* the snapshot the store is at does not hold it.
|
|
587
|
+
* @internal
|
|
588
|
+
*/
|
|
589
|
+
_isStateAbsent(): boolean;
|
|
590
|
+
/**
|
|
591
|
+
* An undo/redo repointed the store.
|
|
592
|
+
* @internal
|
|
593
|
+
*/
|
|
594
|
+
_onRestoreOrRevert(): void;
|
|
595
|
+
/**
|
|
596
|
+
* {@link delete}'s own writes, inside an operation the collection holds — its removal from the
|
|
597
|
+
* set is the caller's, made once for many.
|
|
598
|
+
*
|
|
599
|
+
* @remarks
|
|
600
|
+
* A loaded name nothing has written writes no state: not being listed is its deletion (see
|
|
601
|
+
* {@link _getNamedState}), so deleting a legacy file's thousands of names adds nothing to every
|
|
602
|
+
* later commit's snapshot.
|
|
603
|
+
* @internal
|
|
604
|
+
*/
|
|
605
|
+
_deleteWithin(trans: ITransaction): void;
|
|
606
|
+
/**
|
|
607
|
+
* Adds every identifier this name's definition spells, lowercased, to `into` — nothing for a
|
|
608
|
+
* literal, which reads no name.
|
|
609
|
+
* @internal
|
|
610
|
+
*/
|
|
611
|
+
_addSpelledNames(into: Set<string>): void;
|
|
612
|
+
/**
|
|
613
|
+
* Writes this item's state in `trans`.
|
|
614
|
+
*
|
|
615
|
+
* @remarks
|
|
616
|
+
* A loaded name has no state until this runs: it is made here, inside the write, so the commit
|
|
617
|
+
* before the write has none and an undo past it reads {@link _loaded} again. Whenever the
|
|
618
|
+
* snapshot holds no state - the first write, or one after such an undo - the write carries the
|
|
619
|
+
* whole of it, since an update merges onto what the store holds.
|
|
620
|
+
*/
|
|
621
|
+
private _writeNamedState;
|
|
427
622
|
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);
|
|
623
|
+
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, noteWritten?: () => void, isListed?: () => boolean);
|
|
429
624
|
/**
|
|
430
625
|
* Writes this name's body, which binds it to the region its expression designates once the
|
|
431
626
|
* engine answers.
|
|
@@ -437,6 +632,66 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
437
632
|
* brings describes a set that already contains it. `getRanges()` answers once the engine has.
|
|
438
633
|
*/
|
|
439
634
|
_wireNow(): void;
|
|
635
|
+
/**
|
|
636
|
+
* A loaded name that answers from its text: no host, or one whose grid a restore has left
|
|
637
|
+
* without state (see `CalcGrid._revive`), so no compiled body.
|
|
638
|
+
* @internal
|
|
639
|
+
*/
|
|
640
|
+
_isUnmaterialized(): boolean;
|
|
641
|
+
/**
|
|
642
|
+
* Gives a loaded name what a name authored through the API has from the start: a host, and the
|
|
643
|
+
* body compiled into it. The first use of the name calls this - a reader binding it, or an ask
|
|
644
|
+
* only the compiled body answers (`getRanges`, the graph, `evaluate`, a redefinition). Nothing
|
|
645
|
+
* more than bookkeeping for a name that has it already.
|
|
646
|
+
*
|
|
647
|
+
* @internal
|
|
648
|
+
*
|
|
649
|
+
* @remarks
|
|
650
|
+
* Folded into the current commit: the host writes as `FormulaHost._amendCurrent` does. So an undo
|
|
651
|
+
* past the edit whose reader compiled the name leaves the item without a body in its grid - the
|
|
652
|
+
* unmaterialized state again, with the host object still held - and the next use writes the body
|
|
653
|
+
* once more rather than assuming it is there.
|
|
654
|
+
*/
|
|
655
|
+
_materialize(): void;
|
|
656
|
+
/**
|
|
657
|
+
* {@link _materialize} at the next safe point: for a caller inside the engine's own work (the
|
|
658
|
+
* compile of a formula that mentions this name), where a body cannot be written.
|
|
659
|
+
* @internal
|
|
660
|
+
*/
|
|
661
|
+
_materializeLater(): void;
|
|
662
|
+
/**
|
|
663
|
+
* For a loaded name that has not compiled: its text as a list of sheet-qualified addresses
|
|
664
|
+
* (`Sheet1!$A$1:$B$2`, `'Q1'!$A:$A,'Q2'!$A:$A`), or `null` when the text is anything else.
|
|
665
|
+
*
|
|
666
|
+
* @remarks
|
|
667
|
+
* Read with the address grammar the API's `getRanges(address)` reads - a cell, a range, an entire
|
|
668
|
+
* row or column, a comma list of those - and nothing wider. A text that is a function, a name, an
|
|
669
|
+
* error, an array constant, an intersection or a bare reference does not parse, and only the
|
|
670
|
+
* compiler can say what it designates; the caller compiles then. What does parse is what the
|
|
671
|
+
* compiler would have called reference-only and resolved to these same cells, so the name can
|
|
672
|
+
* answer {@link getRanges} without a grid of its own - the Name Box asks every name what it
|
|
673
|
+
* designates, and a file's thousands of names must not all compile for the question.
|
|
674
|
+
*/
|
|
675
|
+
private _parseAddressText;
|
|
676
|
+
/**
|
|
677
|
+
* For a loaded name that has not compiled: whether its text is a literal - a number, a string, a
|
|
678
|
+
* boolean, an error or an array constant - and so designates no cells whatever the compiler would
|
|
679
|
+
* make of it.
|
|
680
|
+
*
|
|
681
|
+
* @remarks
|
|
682
|
+
* The names a decades-old model carries by the thousand are exactly these (macro-sheet
|
|
683
|
+
* constants, dead `#REF!`s), and a report that asks every name what it covers must not compile
|
|
684
|
+
* them for an answer that is `null` by the shape of the text. Strict on purpose: `#REF!$A$1` or
|
|
685
|
+
* `{1,2}+A1` is not matched and compiles, where the compiler's answer is the only correct one.
|
|
686
|
+
*/
|
|
687
|
+
private _isLiteralText;
|
|
688
|
+
/**
|
|
689
|
+
* Whether `getRanges()` on this name would compile it: a loaded name that has not compiled and
|
|
690
|
+
* whose text is neither a literal nor a plain address list. What a batch compiles ahead of a loop
|
|
691
|
+
* that asks each name in turn ({@link NamedFormulaCollection.prepareRanges}).
|
|
692
|
+
* @internal
|
|
693
|
+
*/
|
|
694
|
+
_compilesForRanges(): boolean;
|
|
440
695
|
/** Records what the readers have been reconciled with — see `_seenBlock`. */
|
|
441
696
|
private _recordSeen;
|
|
442
697
|
/**
|
|
@@ -523,6 +778,8 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
523
778
|
setExpression(expression: string, options?: ITransaction.OperationOptions): this;
|
|
524
779
|
/** {@inheritDoc INamed.getComment} */
|
|
525
780
|
getComment(): string | null;
|
|
781
|
+
/** {@inheritDoc ICalculation.INamedFormula.getFileAttributes} */
|
|
782
|
+
getFileAttributes(): Readonly<INamed.FileAttributes> | null;
|
|
526
783
|
/** {@inheritDoc INamed.setComment} */
|
|
527
784
|
setComment(comment: string | null, options?: ITransaction.OperationOptions): this;
|
|
528
785
|
/** {@inheritDoc INamed.isHidden} */
|
|
@@ -615,8 +872,14 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
615
872
|
* Consumers requery once the engine has started.
|
|
616
873
|
* 3. **Wiring bailed.** `_doWireCore` returns early when the scope sheet cannot be resolved,
|
|
617
874
|
* which leaves the item permanently unwired rather than transiently.
|
|
875
|
+
*
|
|
876
|
+
* A loaded name that has not compiled answers from its text when the text is a plain address
|
|
877
|
+
* list (see {@link _parseAddressText}) or a literal (see {@link _isLiteralText}, case 1 without
|
|
878
|
+
* the compile); any other text compiles it, and the answer is case 2.
|
|
618
879
|
*/
|
|
619
880
|
getRanges(): ICellRanges | null;
|
|
881
|
+
/** {@inheritDoc ICalculation.IFormula.getReferences} */
|
|
882
|
+
getReferences(): ICellRanges | null;
|
|
620
883
|
/** {@inheritDoc ICalculation.INamedFormula.getDirectDependents} */
|
|
621
884
|
getDirectDependents(): Promise<ICellRanges | null>;
|
|
622
885
|
/** {@inheritDoc ICalculation.INamedFormula.getDependents} */
|
|
@@ -639,10 +902,15 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
639
902
|
getPrecedents(): Promise<ICellRanges | null>;
|
|
640
903
|
/**
|
|
641
904
|
* The precedents or dependents of this NAME — cells and names, ONE answer — as the engine walks
|
|
642
|
-
* them
|
|
643
|
-
*
|
|
905
|
+
* them (see `CalcBackend._nameGraphNow` for the walk: the symbol edges names ride on, and the
|
|
906
|
+
* cell graph between them).
|
|
644
907
|
*
|
|
645
908
|
* @remarks
|
|
909
|
+
* Only the precedents read the body, so only they compile it, and a literal has none. The
|
|
910
|
+
* dependents are asked by id and never compile: a formula that reads this name bound it when it
|
|
911
|
+
* compiled, so a name still waiting for its first use has no compiled reader to find — and a
|
|
912
|
+
* report asking every name of a legacy file must not compile thousands of them to learn that.
|
|
913
|
+
*
|
|
646
914
|
* What is left here is the translation out of calc currency: a cell on no addressable sheet
|
|
647
915
|
* drops, and the rest are reduced to regions, not a list of blocks - two formulas naming this
|
|
648
916
|
* name in adjacent cells are one range, and the deep walk can reach one block down two paths.
|
|
@@ -678,7 +946,10 @@ declare class NamedFormula extends Formula implements ICalculation.INamedFormula
|
|
|
678
946
|
_getBodyNode(): ICalculation.FormulaNode | null;
|
|
679
947
|
/** Pre-wire fallback: return empty array before block is compiled. */
|
|
680
948
|
getTokens(evalIndex?: number): readonly ICalculation.FormulaToken[];
|
|
681
|
-
/**
|
|
949
|
+
/**
|
|
950
|
+
* Pre-wire fallback: return false before block is compiled. A loaded name that has not compiled
|
|
951
|
+
* answers as {@link getRanges} does, from its text.
|
|
952
|
+
*/
|
|
682
953
|
isReferenceOnly(): boolean;
|
|
683
954
|
/**
|
|
684
955
|
* Anchored at the virtual grid's origin. `this._coords` is the *defining* cell (the active cell
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
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
|
|
3
|
+
* (DESIGN-CALC-SERVICE §11, goal G1).
|
|
4
4
|
*
|
|
5
5
|
* @remarks
|
|
6
6
|
* Every request into a grid and every {@link ICalcGrid.Results} out of one passes through here.
|
|
@@ -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
|
|
@@ -235,10 +235,14 @@ export interface NamedNode extends ASTNode<typeof TokenType.Named, NamedReferenc
|
|
|
235
235
|
}
|
|
236
236
|
export interface FunctionNode extends ASTNode<typeof TokenType.Function, any> {
|
|
237
237
|
/**
|
|
238
|
-
*
|
|
239
|
-
*
|
|
238
|
+
* The function this call resolved to.
|
|
240
239
|
*/
|
|
241
240
|
cacheFn?: IFunction;
|
|
241
|
+
/**
|
|
242
|
+
* The registry stamp `cacheFn` resolved under, for a custom function; `undefined` for a built-in,
|
|
243
|
+
* which never changes.
|
|
244
|
+
*/
|
|
245
|
+
cacheFnStamp?: number;
|
|
242
246
|
}
|
|
243
247
|
export type ParenNode = ASTNode<typeof TokenType.Paren>;
|
|
244
248
|
/**
|
|
@@ -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;
|
|
@@ -260,6 +260,14 @@ export interface CompiledFormula {
|
|
|
260
260
|
* `_xlfn.`-prefixed one both answer correctly.
|
|
261
261
|
*/
|
|
262
262
|
hasTotals: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* Whether the formula calls `TABLE`, the what-if data table, anywhere in its tree.
|
|
265
|
+
*
|
|
266
|
+
* @remarks
|
|
267
|
+
* What a reactive pass under `AutomaticExceptTables` skips (DESIGN-DATA-TABLES §4.4). Resolved
|
|
268
|
+
* through `getFunction`, like {@link hasTotals}.
|
|
269
|
+
*/
|
|
270
|
+
hasDataTable: boolean;
|
|
263
271
|
/**
|
|
264
272
|
* Whether the formula names a VOLATILE function anywhere in its tree — the cell recalculates on
|
|
265
273
|
* every pass, whether or not that call is ever reached.
|
|
@@ -288,7 +296,7 @@ export interface CompiledFormula {
|
|
|
288
296
|
* expression callee, or a function the registry does not know. `TODAY()` and `NOW()` are
|
|
289
297
|
* accepted: volatile, but one value per pass. So are `RAND()` and every function taking a
|
|
290
298
|
* 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
|
|
299
|
+
* position (or draws) is a per-cell READ (`CalcScope.perCellRead`, `positionRead`) that the pass sees when it
|
|
292
300
|
* evaluates the representative, not a property of the text. The block adds its own gates (a
|
|
293
301
|
* precedent template, not array-entered) and the pass its run-time ones (no dynamic read, no
|
|
294
302
|
* per-cell read, a scalar result); this is only the half that can be known from the text.
|