@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,6 +1,7 @@
|
|
|
1
1
|
import { IRange } from '@sheetxl/primitives';
|
|
2
2
|
import { ITypes } from '../../type';
|
|
3
|
-
import { ISpatialMap } from '../../collections';
|
|
3
|
+
import { ISpatialMap, ISpatialQuery } from '../../collections';
|
|
4
|
+
import { AsyncValue } from '../../primitives/AsyncValue';
|
|
4
5
|
/**
|
|
5
6
|
* Spill Entries are used to track the extent an array formula occupies.
|
|
6
7
|
*
|
|
@@ -15,7 +16,15 @@ export declare class SpillEntry {
|
|
|
15
16
|
private _c;
|
|
16
17
|
private _k;
|
|
17
18
|
private _cycleId;
|
|
18
|
-
|
|
19
|
+
private _h;
|
|
20
|
+
/**
|
|
21
|
+
* @param holder The anchor's holder when the evaluation that laid the spill out deferred
|
|
22
|
+
* (DESIGN-ASYNC §4.4): the anchor cell holds the first element, so the entry carries what a
|
|
23
|
+
* scalar cell holds in its value, and moves and versions with the spill the same way.
|
|
24
|
+
*/
|
|
25
|
+
constructor(coords: IRange.Coords, cycleId: number, kind?: ITypes.FormulaArrayKind, holder?: AsyncValue | null);
|
|
26
|
+
/** The anchor's holder, for a spill laid out by an evaluation that deferred; `null` otherwise. */
|
|
27
|
+
getHolder(): AsyncValue | null;
|
|
19
28
|
getCycleId(): number;
|
|
20
29
|
/** {@inheritDoc ITypes.FormulaArrayKind} */
|
|
21
30
|
getKind(): ITypes.FormulaArrayKind;
|
|
@@ -52,4 +61,9 @@ export declare class SpillEntry {
|
|
|
52
61
|
/** {@inheritDoc ISpatialMap.IUpdatableValue.getSplit} */
|
|
53
62
|
getSplit(coords: [IRange.Coords, IRange.Coords], _axis: IRange.Axis): [this, this] | undefined;
|
|
54
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* The holder of the spill anchored at (`row`, `col`), or `null` when no spill is anchored there
|
|
66
|
+
* or its evaluation did not defer. A blocked spill's entry is anchored too.
|
|
67
|
+
*/
|
|
68
|
+
export declare const spillHolderAt: (spills: ISpatialQuery<SpillEntry> | null | undefined, row: number, col: number) => AsyncValue | null;
|
|
55
69
|
//# sourceMappingURL=SpillEntry.d.ts.map
|
|
@@ -51,7 +51,6 @@ export interface CalcNodeExt {
|
|
|
51
51
|
* and by `setInputs` with a `arrayFixed`; translated with the node when its block moves.
|
|
52
52
|
*/
|
|
53
53
|
fixedRef: IRange.Coords | null;
|
|
54
|
-
pendingPromise: Promise<any> | null;
|
|
55
54
|
/**
|
|
56
55
|
* The demand evaluation's result — finalized for the cell, or a pending promise — which
|
|
57
56
|
* `doEvaluate` consumes in place of an `evaluateAt` of its own. Cleared once consumed.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CalcNode } from './CalcNode';
|
|
2
|
+
import { DeferredCall } from './DeferredCalls';
|
|
2
3
|
/**
|
|
3
4
|
* A reused data structure passed to CalculationContext.
|
|
4
5
|
*
|
|
@@ -43,14 +44,23 @@ export interface CalcScope {
|
|
|
43
44
|
firstCell: boolean;
|
|
44
45
|
/**
|
|
45
46
|
* Set when the evaluation read something that is PER CELL rather than a property of its inputs
|
|
46
|
-
* — a random draw (`IFormulaContext.getRandom`),
|
|
47
|
-
* `
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
47
|
+
* — a random draw (`IFormulaContext.getRandom`), another cell's formula or sheet
|
|
48
|
+
* (`getFormulaAt`, `getSheetIndex`), or a reference it computed (a dynamic precedent) — so its
|
|
49
|
+
* answer cannot stand in for another cell's even when the two cells' inputs are identical.
|
|
50
|
+
* Cleared by whoever evaluates a cell as the representative of a block's blank region and read
|
|
51
|
+
* at its finalize (PLAN-WATCHES-BLANK-AWARE §4); a cell evaluated on its own behalf never
|
|
52
|
+
* reads it.
|
|
52
53
|
*/
|
|
53
54
|
perCellRead: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Set when the evaluation read its own POSITION — `getRow`, `getColumn`, its own address, a
|
|
57
|
+
* reference's `getCoords`. Per cell like {@link perCellRead}, but a position is the one per-cell
|
|
58
|
+
* input whose effect the representative can rule out: when every position read sits under a
|
|
59
|
+
* boolean test the result does not depend on (`AND(ISODD(ROW()),$A1<>"")` over a blank `A`),
|
|
60
|
+
* the answer is still shared (`IFormulaBlock.getPositionVariants`). Cleared and read alongside
|
|
61
|
+
* {@link perCellRead}.
|
|
62
|
+
*/
|
|
63
|
+
positionRead: boolean;
|
|
54
64
|
/**
|
|
55
65
|
* How many draws (`IFormulaContext.getRandom`) this evaluation has taken, from `0`.
|
|
56
66
|
*
|
|
@@ -61,6 +71,34 @@ export interface CalcScope {
|
|
|
61
71
|
* before. Ignored when no seed is set.
|
|
62
72
|
*/
|
|
63
73
|
drawIndex: number;
|
|
74
|
+
/**
|
|
75
|
+
* How many `IFormulaContext.defer` calls the backend has taken, ever.
|
|
76
|
+
*
|
|
77
|
+
* @remarks
|
|
78
|
+
* Never reset. A dispatch, or the executor around an evaluation, reads it before and compares
|
|
79
|
+
* after: a change means a body deferred inside, however deeply nested. Nothing else on the
|
|
80
|
+
* synchronous path reads it.
|
|
81
|
+
*/
|
|
82
|
+
deferCount: number;
|
|
83
|
+
/**
|
|
84
|
+
* How many calls the evaluation in progress has deferred: the next call's ordinal, which is how
|
|
85
|
+
* a later evaluation of the same cell finds it. Back to `0` once the evaluation's calls are
|
|
86
|
+
* taken, which only an evaluation that deferred needs.
|
|
87
|
+
*/
|
|
88
|
+
deferOrdinal: number;
|
|
89
|
+
/**
|
|
90
|
+
* Whether the formula's ROOT call deferred in the evaluation in progress. With one call in all,
|
|
91
|
+
* the cell's value is that call's answer and a settle needs no re-evaluation. Cleared with
|
|
92
|
+
* {@link deferOrdinal}.
|
|
93
|
+
*/
|
|
94
|
+
deferRoot: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* The call the last `defer` was served — the site's call standing for its payload — or `null`
|
|
97
|
+
* when that `defer` made a new one. The dispatch around the deferring body takes it and, when
|
|
98
|
+
* the call has a latest, answers that in place of the body's return. Cleared with
|
|
99
|
+
* {@link deferOrdinal}.
|
|
100
|
+
*/
|
|
101
|
+
deferServed: DeferredCall | null;
|
|
64
102
|
/**
|
|
65
103
|
* Stable nameIds currently on the resolution stack — the cycle guard for named
|
|
66
104
|
* formulas. A plain name re-entering itself (`X = X + 1`) is a circular reference.
|
|
@@ -23,16 +23,22 @@ export declare const CalcState: {
|
|
|
23
23
|
readonly Removed: number;
|
|
24
24
|
/** The node is in the pending spatial (the user has been given a pending status). */
|
|
25
25
|
readonly Pending: number;
|
|
26
|
-
/** A precedent evaluated to a pending value this pass, so the node keeps its cached value. */
|
|
27
|
-
readonly PendingPrecedents: number;
|
|
28
|
-
/** The node's promise resolved; the result waits in `cachedValue` for the next pass. */
|
|
29
|
-
readonly PendingResolved: number;
|
|
30
26
|
/**
|
|
31
27
|
* The topological sort could not order the node this pass — it is in a reference cycle, or
|
|
32
28
|
* downstream of one — so it was (or will be) evaluated by demand and `doEvaluate` takes its
|
|
33
29
|
* `demandValue` in place of an `evaluateAt`.
|
|
34
30
|
*/
|
|
35
31
|
readonly Circular: number;
|
|
32
|
+
/**
|
|
33
|
+
* The node's last evaluation found it volatile: the formula names a volatile function
|
|
34
|
+
* (`IFormulaContext.markVolatile`, which the compiled `hasVolatile` spends), it read cells its
|
|
35
|
+
* text does not name (a dynamic precedent of kind `Reference`: `OFFSET`, `INDIRECT`), or it is
|
|
36
|
+
* a member of an iterated cycle. Cleared when an evaluation of the node starts, so it answers
|
|
37
|
+
* for the last one; persists across passes that skip the node. What `isVolatileAt` reports —
|
|
38
|
+
* the executor's volatile SET is the pass's own worklist, rebuilt every pass, and is not read
|
|
39
|
+
* for the answer.
|
|
40
|
+
*/
|
|
41
|
+
readonly Volatile: number;
|
|
36
42
|
/**
|
|
37
43
|
* A `Waiting` node — or a finished member of a cycle that is still open — the evaluation in
|
|
38
44
|
* progress has read under iterative calculation: it is in
|
|
@@ -72,6 +78,32 @@ export declare const CalcState: {
|
|
|
72
78
|
* never needed for a right answer.
|
|
73
79
|
*/
|
|
74
80
|
readonly Queued: number;
|
|
81
|
+
/**
|
|
82
|
+
* A precedent is pending with a value this pass: the node evaluates from that value, as any
|
|
83
|
+
* dependent does, and is pending with it.
|
|
84
|
+
*/
|
|
85
|
+
readonly WaitingPrecedents: number;
|
|
86
|
+
/**
|
|
87
|
+
* The node is {@link Pending} with a value its dependents calculate from — it holds a call that
|
|
88
|
+
* has not answered, or was calculated from such a value — rather than holding them. Decided by
|
|
89
|
+
* each evaluation, so outside {@link PassMask}.
|
|
90
|
+
*/
|
|
91
|
+
readonly PendingValue: number;
|
|
92
|
+
/**
|
|
93
|
+
* The node's one call answered with a shape its cell cannot take without the layout machinery
|
|
94
|
+
* — a range, or the cell is a spill anchor — and a settle seeded it (DESIGN-ASYNC §4.5): the
|
|
95
|
+
* settle pass takes the holder's latest in place of running the body and lays it out as any
|
|
96
|
+
* range result. Any other pass clears it and evaluates, since the node may be dirty for its own
|
|
97
|
+
* reasons. Outside {@link PassMask}: set between passes.
|
|
98
|
+
*/
|
|
99
|
+
readonly ServeLatest: number;
|
|
100
|
+
/**
|
|
101
|
+
* The evaluation recorded a call of the cell's own that has not answered: the cell is working,
|
|
102
|
+
* not merely waiting on a precedent. Decided by each evaluation, so outside {@link PassMask}.
|
|
103
|
+
*/
|
|
104
|
+
readonly OwnCall: number;
|
|
105
|
+
/** What the status index was last told, while {@link Pending}: working (set) or waiting (clear). */
|
|
106
|
+
readonly SentWorking: number;
|
|
75
107
|
/** What the mark phase resets: everything a single pass decides. `Skip` and the shown role survive. */
|
|
76
108
|
readonly PassMask: number;
|
|
77
109
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { IRange, ScalarType, FormulaError, Scalar, IReferenceRange, IFunction, IFormulaContext, IFunctionArguments, IRuntime } from '@sheetxl/primitives';
|
|
1
|
+
import { IRange, ScalarType, FormulaError, Scalar, IReferenceRange, IFunction, IFormulaContext, IFunctionArguments, IRuntime, IRichData } from '@sheetxl/primitives';
|
|
2
2
|
import { FunctionProvider } from '@sheetxl/scripting';
|
|
3
3
|
import { ITransaction } from '../../transaction';
|
|
4
4
|
import { IFunctionCollection } from '../../scripting';
|
|
5
5
|
import { Tuple } from '../../collections';
|
|
6
6
|
import { IContextContainer } from './IContextContainer';
|
|
7
7
|
import { CalcScope } from './CalcScope';
|
|
8
|
+
import { WhatIfTable } from '../executor/_WhatIf';
|
|
8
9
|
import { ReadHook } from './_ReadObservedGrid';
|
|
9
10
|
export declare class CalculationContext implements IFormulaContext {
|
|
10
11
|
protected _instanceScope: any;
|
|
@@ -37,8 +38,8 @@ export declare class CalculationContext implements IFormulaContext {
|
|
|
37
38
|
*/
|
|
38
39
|
protected _dynamicRead: ReadHook | null;
|
|
39
40
|
/**
|
|
40
|
-
* Marks the evaluation in progress as having read
|
|
41
|
-
*
|
|
41
|
+
* Marks the evaluation in progress as having read its position, so its answer stands in for
|
|
42
|
+
* another cell's only where the position cannot matter (`CalcScope.positionRead`). One closure for the
|
|
42
43
|
* context's lifetime: every reference it builds is handed this for its `getCoords`, and the
|
|
43
44
|
* context's own position accessors call it directly.
|
|
44
45
|
*/
|
|
@@ -60,6 +61,22 @@ export declare class CalculationContext implements IFormulaContext {
|
|
|
60
61
|
* hook is armed. See {@link _dynamicRead}.
|
|
61
62
|
*/
|
|
62
63
|
_setDynamicReadHook(hook: ReadHook | null): void;
|
|
64
|
+
/**
|
|
65
|
+
* @hidden
|
|
66
|
+
* Disarms both read hooks and returns what they were, for {@link _restoreReadHooks}: a what-if
|
|
67
|
+
* evaluation reads plainly in the middle of a node that is itself observed.
|
|
68
|
+
*/
|
|
69
|
+
_takeReadHooks(): [ReadHook | null, ReadHook | null];
|
|
70
|
+
/** @hidden Re-arms the hooks {@link _takeReadHooks} returned. */
|
|
71
|
+
_restoreReadHooks(hooks: [ReadHook | null, ReadHook | null]): void;
|
|
72
|
+
/**
|
|
73
|
+
* @hidden
|
|
74
|
+
* The grid id of the cell being evaluated and of an input reference, for `TABLE`: `null` for a
|
|
75
|
+
* reference whose sheet does not resolve.
|
|
76
|
+
*/
|
|
77
|
+
_gridIdOfReference(coords: Readonly<IRange.Coords> | null): string | null;
|
|
78
|
+
/** @hidden The what-if results of a data table, for the `TABLE` node being evaluated. */
|
|
79
|
+
_evaluateWhatIf(table: WhatIfTable): Scalar[][] | null;
|
|
63
80
|
/**
|
|
64
81
|
* @hidden
|
|
65
82
|
*
|
|
@@ -81,6 +98,12 @@ export declare class CalculationContext implements IFormulaContext {
|
|
|
81
98
|
_createScoped(sheet: string): CalculationContext | null;
|
|
82
99
|
/** @inheritdoc IFormulaContext.getFunction */
|
|
83
100
|
getFunction(name: string): IFunction | null;
|
|
101
|
+
/**
|
|
102
|
+
* @hidden
|
|
103
|
+
* The function registry's stamp: a function {@link getFunction} returned stays the answer for its
|
|
104
|
+
* name while this is unchanged.
|
|
105
|
+
*/
|
|
106
|
+
_getFunctionStamp(): number;
|
|
84
107
|
/** @inheritdoc IFormulaContext.getNumberFormat */
|
|
85
108
|
getNumberFormat(formatText: string, value: Scalar): string | null;
|
|
86
109
|
/** @inheritdoc IFormulaContext.getEntireCoords */
|
|
@@ -89,6 +112,8 @@ export declare class CalculationContext implements IFormulaContext {
|
|
|
89
112
|
getFormulaAt(row: number, column: number, sheetName?: string): string | null;
|
|
90
113
|
/** @inheritdoc IFormulaContext.markVolatile */
|
|
91
114
|
markVolatile(): void;
|
|
115
|
+
/** @inheritdoc IFormulaContext.defer */
|
|
116
|
+
defer(executor: IFormulaContext.DeferExecutor, payload?: unknown): unknown;
|
|
92
117
|
/** @inheritdoc IFormulaContext.formatResults */
|
|
93
118
|
formatResults(numFmt: string): void;
|
|
94
119
|
/** @inheritdoc IFormulaContext.filterHidden */
|
|
@@ -205,6 +230,8 @@ export declare class CalculationContext implements IFormulaContext {
|
|
|
205
230
|
toText(value: Scalar | undefined): string;
|
|
206
231
|
/** @inheritdoc IFormulaContext.getRuntime */
|
|
207
232
|
getRuntime(): IRuntime;
|
|
233
|
+
/** @inheritdoc IFormulaContext.createRichData */
|
|
234
|
+
createRichData(type: string, data?: any): IRichData;
|
|
208
235
|
/** @inheritdoc IFormulaContext.getArgs */
|
|
209
236
|
getArgs(): IFunctionArguments;
|
|
210
237
|
get [Symbol.toStringTag](): string;
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { IFormulaContext, IRange, IRichData, Scalar } from '@sheetxl/primitives';
|
|
2
|
+
import { ISpatialMap } from '../../collections';
|
|
3
|
+
import { AsyncValue } from '../../primitives/AsyncValue';
|
|
4
|
+
import { CalcNode } from './CalcNode';
|
|
5
|
+
import { CalcScope } from './CalcScope';
|
|
6
|
+
/**
|
|
7
|
+
* Where a call stands: still wanted and unanswered, answered, failed, or closed.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CallState: {
|
|
10
|
+
readonly Open: 0;
|
|
11
|
+
readonly Settled: 1;
|
|
12
|
+
readonly Rejected: 2;
|
|
13
|
+
readonly Closed: 3;
|
|
14
|
+
};
|
|
15
|
+
export type CallState = typeof CallState[keyof typeof CallState];
|
|
16
|
+
/**
|
|
17
|
+
* One `IFormulaContext.defer` at one site of one cell's formula (DESIGN-ASYNC §4.4): what the
|
|
18
|
+
* executor is handed, and what a later evaluation of the cell finds again by its ordinal.
|
|
19
|
+
*/
|
|
20
|
+
export declare class DeferredCall implements IFormulaContext.DeferredCall {
|
|
21
|
+
readonly id: number;
|
|
22
|
+
readonly executor: IFormulaContext.DeferExecutor;
|
|
23
|
+
readonly payload: unknown;
|
|
24
|
+
/** Which function made the call (its declaration), or `null` for one with none. */
|
|
25
|
+
readonly site: object | null;
|
|
26
|
+
/**
|
|
27
|
+
* The node whose evaluation made, last served, or now holds the call (DESIGN-ASYNC §4.5 settle
|
|
28
|
+
* step 1); `null` for an evaluation with no cell. A re-mint of the cell's node takes it over.
|
|
29
|
+
*/
|
|
30
|
+
owner: CalcNode | null;
|
|
31
|
+
state: CallState;
|
|
32
|
+
/** The most recent result; `undefined` until one arrives. */
|
|
33
|
+
latest: unknown;
|
|
34
|
+
protected _onCancel: (() => void)[] | null;
|
|
35
|
+
/** The port (DESIGN-ASYNC §4.9): told each time the latest moves. */
|
|
36
|
+
protected _onMoved: ((call: DeferredCall) => void) | null;
|
|
37
|
+
/** Told of the call's final answer: the manager, which holds the call only until then. */
|
|
38
|
+
protected _onFinal: ((call: DeferredCall) => void) | null;
|
|
39
|
+
/** Makes a result cell-ready (see {@link DeferredCalls.Normalize}). */
|
|
40
|
+
protected _normalize: DeferredCalls.Normalize;
|
|
41
|
+
constructor(id: number, executor: IFormulaContext.DeferExecutor, payload: unknown, site: object | null, owner: CalcNode | null, onMoved?: ((call: DeferredCall) => void) | null, onFinal?: ((call: DeferredCall) => void) | null, normalize?: DeferredCalls.Normalize);
|
|
42
|
+
/** @inheritdoc IFormulaContext.DeferredCall.resolve */
|
|
43
|
+
resolve(value: unknown): void;
|
|
44
|
+
/** @inheritdoc IFormulaContext.DeferredCall.reject */
|
|
45
|
+
reject(error: unknown): void;
|
|
46
|
+
/** @inheritdoc IFormulaContext.DeferredCall.onCancel */
|
|
47
|
+
onCancel(fn: () => void): void;
|
|
48
|
+
/** @inheritdoc IFormulaContext.DeferredCall.cancelled */
|
|
49
|
+
get cancelled(): boolean;
|
|
50
|
+
/** Whether the call has not answered yet: it is running, and a recalculation leaves it be. */
|
|
51
|
+
isOpen(): boolean;
|
|
52
|
+
/** Closes the call; `onCancel` runs when it had not finished. */
|
|
53
|
+
close(): void;
|
|
54
|
+
protected _moved(): void;
|
|
55
|
+
protected _final(): void;
|
|
56
|
+
}
|
|
57
|
+
/** The default settle window (DESIGN-ASYNC §4.8): at most one settle pass per window. */
|
|
58
|
+
export declare const DefaultSettleWindow = 100;
|
|
59
|
+
/** What an evaluation that deferred leaves for the cell: its calls, and whether the root is the only one. */
|
|
60
|
+
export interface DeferredEvaluation {
|
|
61
|
+
readonly calls: readonly DeferredCall[];
|
|
62
|
+
/** The formula's root is its only call: the cell's value is that call's answer. */
|
|
63
|
+
readonly direct: boolean;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The holder at a cell, if any: the engine grid's value there, or the entry of the spill anchored
|
|
67
|
+
* there when the cell is an anchor (the anchor cell itself holds the first element).
|
|
68
|
+
*/
|
|
69
|
+
export type HeldAt = (gridId: string, row: number, column: number) => AsyncValue<DeferredCall> | null;
|
|
70
|
+
/**
|
|
71
|
+
* The calls a calculation backend has made, the batch the evaluation in progress is collecting,
|
|
72
|
+
* and the state each executor keeps (DESIGN-ASYNC §4.3, §4.4).
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* One per backend. Nothing here is touched by an evaluation that does not defer: the dispatch
|
|
76
|
+
* notices a deferral through {@link CalcScope.deferCount}, and only then asks this.
|
|
77
|
+
*/
|
|
78
|
+
export declare class DeferredCalls {
|
|
79
|
+
protected _scope: CalcScope;
|
|
80
|
+
protected _heldAt: HeldAt;
|
|
81
|
+
protected _getRandom: () => number;
|
|
82
|
+
protected _nextId: number;
|
|
83
|
+
/** The calls that have not given their final answer, by id. A holder names any other by pointer. */
|
|
84
|
+
protected _calls: Map<number, DeferredCall>;
|
|
85
|
+
protected _onFinal: (call: DeferredCall) => void;
|
|
86
|
+
/** Whether a holder has ever been written: until then no read needs to look for one. */
|
|
87
|
+
protected _holders: boolean;
|
|
88
|
+
/** The calls of the evaluation in progress, by ordinal, and which of them it made. */
|
|
89
|
+
protected _current: DeferredCall[];
|
|
90
|
+
protected _made: DeferredCall[];
|
|
91
|
+
/** The calls made since the last {@link flush}, by executor: each executor's batch. */
|
|
92
|
+
protected _batch: Map<IFormulaContext.DeferExecutor, DeferredCall[]>;
|
|
93
|
+
/** What each executor keeps between batches (`IBatchContext.getState`). */
|
|
94
|
+
protected _states: Map<IFormulaContext.DeferExecutor, unknown>;
|
|
95
|
+
protected _batchContext: IFormulaContext.IBatchContext;
|
|
96
|
+
protected _setCurrent: (executor: IFormulaContext.DeferExecutor | null) => void;
|
|
97
|
+
/**
|
|
98
|
+
* The port (DESIGN-ASYNC §4.9): the calls whose latest moved since the last settle pass took
|
|
99
|
+
* them. A set, so a bursting feed is one entry however often it posts: the latest is on the call.
|
|
100
|
+
*/
|
|
101
|
+
protected _moved: Set<DeferredCall>;
|
|
102
|
+
protected _onMoved: (call: DeferredCall) => void;
|
|
103
|
+
/** The settle pass, run on its own task at most once per window (DESIGN-ASYNC §4.8). */
|
|
104
|
+
protected _onSettle: (() => void) | null;
|
|
105
|
+
protected _settleWindow: number;
|
|
106
|
+
protected _settleTimer: ReturnType<typeof setTimeout> | null;
|
|
107
|
+
protected _settledAt: number;
|
|
108
|
+
/** The grids a settle told the model about without a write: the next pass vends their records. */
|
|
109
|
+
protected _repaintGrids: Set<string>;
|
|
110
|
+
/** The cells a settle marked for re-evaluation, scoped: the next pass's seeds, beside its own. */
|
|
111
|
+
protected _settleDirty: ISpatialMap.Entry[];
|
|
112
|
+
protected _normalize: DeferredCalls.Normalize;
|
|
113
|
+
/**
|
|
114
|
+
* Every site is served its call (a settle pass, or an evaluation waiting on its answers);
|
|
115
|
+
* otherwise only a running call is, and a stopped one is called again (DESIGN-ASYNC §4.5).
|
|
116
|
+
*/
|
|
117
|
+
protected _serving: boolean;
|
|
118
|
+
/** The batch the next {@link flush} hands out fetches past the workbook's cache (`CalculateOptions.external`). */
|
|
119
|
+
protected _external: boolean;
|
|
120
|
+
/** {@link _batchContext}, with a `fetch` that goes to the source. */
|
|
121
|
+
protected _reloadContext: IFormulaContext.IBatchContext;
|
|
122
|
+
/**
|
|
123
|
+
* The last answer the site's call gave for the same question, read by `IFormulaContext.defer`
|
|
124
|
+
* right after {@link defer}: `undefined` when there was none.
|
|
125
|
+
*/
|
|
126
|
+
previous: unknown;
|
|
127
|
+
/** The {@link whenChanged} waits in progress: woken by a final answer, a settle pass starting, a cancel. */
|
|
128
|
+
protected _waiters: Set<() => void>;
|
|
129
|
+
/**
|
|
130
|
+
* Told when the counts may have changed, at the moments they become visible: calls handed out,
|
|
131
|
+
* a settle pass starting, a cancel, a close. Never per answer: a million answers are one settle.
|
|
132
|
+
*/
|
|
133
|
+
protected _onCountsChange: (() => void) | null;
|
|
134
|
+
constructor(scope: CalcScope, heldAt: HeldAt, getRandom: () => number, onSettle?: (() => void) | null, settleWindow?: number, normalize?: DeferredCalls.Normalize, services?: DeferredCalls.Services, onCountsChange?: (() => void) | null);
|
|
135
|
+
/** How many calls have not answered. `0` lets a pass skip every pending-input check. */
|
|
136
|
+
getOpenCount(): number;
|
|
137
|
+
/** The held calls whose owner is a cell of `gridId`. */
|
|
138
|
+
getCallsOf(gridId: string): DeferredCall[];
|
|
139
|
+
/** Whether an answer that landed has yet to be applied: its settle pass is still to run. */
|
|
140
|
+
hasSettleWork(): boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Resolves at the next change a wait for answers cares about — a call's final answer, a settle
|
|
143
|
+
* pass starting, a cancel — or after `timeout` ms, whichever is first.
|
|
144
|
+
*/
|
|
145
|
+
whenChanged(timeout: number): Promise<void>;
|
|
146
|
+
protected _wake(): void;
|
|
147
|
+
/**
|
|
148
|
+
* Closes every held call whose owner `cover` covers (`ICalculation.cancelAsync`): `onCancel`
|
|
149
|
+
* runs, and a later answer is dropped. A cancelled call stays in its holders: its cell is served
|
|
150
|
+
* what it shows now, and asks again only on an external calculation.
|
|
151
|
+
*
|
|
152
|
+
* @param cover `true` for every call, a grid id for one grid's, scoped coords for a range's.
|
|
153
|
+
* @returns The calls closed, for the caller to re-evaluate their owners.
|
|
154
|
+
*/
|
|
155
|
+
cancel(cover: true | string | IRange.Coords): DeferredCall[];
|
|
156
|
+
/** Closes `calls`: those still owed an answer run `onCancel`, and a later answer is dropped. */
|
|
157
|
+
closeCalls(calls: Iterable<DeferredCall>): void;
|
|
158
|
+
/** Whether any grid of this backend may hold an {@link AsyncValue}: what gates every unwrap. */
|
|
159
|
+
hasHolders(): boolean;
|
|
160
|
+
/** The open call with `id`; `undefined` once it has given its final answer, or for one unknown. */
|
|
161
|
+
getCall(id: number): DeferredCall | undefined;
|
|
162
|
+
/** Drains the port: every call whose latest moved since the last drain. */
|
|
163
|
+
takeMoved(): DeferredCall[];
|
|
164
|
+
/** Records that a settle told the model about a cell of `gridId` without a write. */
|
|
165
|
+
noteRepaint(gridId: string): void;
|
|
166
|
+
/** Marks `cells` (scoped) for the next pass to collect: a settled composite owner, or a dependent of a direct one. */
|
|
167
|
+
addSettleDirty(cells: readonly ISpatialMap.Entry[]): void;
|
|
168
|
+
/** The cells settles marked since the last pass; empties them. */
|
|
169
|
+
takeSettleDirty(): ISpatialMap.Entry[];
|
|
170
|
+
/** The grids with a repaint since the last pass, for the pass to vend; empties them. */
|
|
171
|
+
takeRepaintGrids(): string[];
|
|
172
|
+
/**
|
|
173
|
+
* Asks for a settle pass: at once on the leading edge, else when the window since the last one
|
|
174
|
+
* ends. Always a fresh task, so an executor settling synchronously cannot re-enter the pass that
|
|
175
|
+
* ran it.
|
|
176
|
+
*/
|
|
177
|
+
protected _requestSettle(): void;
|
|
178
|
+
/**
|
|
179
|
+
* The cell's value for an evaluation that deferred; for one that spilled, what its spill entry
|
|
180
|
+
* carries. From here on reads must look for holders.
|
|
181
|
+
*/
|
|
182
|
+
newHolder(value: Scalar | IRange, evaluation: DeferredEvaluation): AsyncValue<DeferredCall>;
|
|
183
|
+
/**
|
|
184
|
+
* Takes one `defer` from the evaluation in progress: the call this site made last time when the
|
|
185
|
+
* same function made it with an equal payload and it still stands, or a new one for the batch.
|
|
186
|
+
* It stands while it runs: a recalculation leaves it be. Once it has
|
|
187
|
+
* stopped, a recalculation calls the function again; only an answer landing ({@link setServing})
|
|
188
|
+
* serves a stopped call. Same function, not same executor: an inline executor is a new closure
|
|
189
|
+
* every evaluation, and is still served.
|
|
190
|
+
*
|
|
191
|
+
* @param site Which function is deferring (its declaration); `null` compares executors instead. The site's last call is the one the
|
|
192
|
+
* holder in its cell names at this ordinal, so a version of the grid brought back by an undo,
|
|
193
|
+
* or a cell moved by a shift, is answered by the call it was given.
|
|
194
|
+
* @param volatile The function declares itself volatile: it asks again on every evaluation,
|
|
195
|
+
* payload equal or not, as `RAND()` re-rolls (DESIGN-ASYNC §4.7).
|
|
196
|
+
* @returns The call the site was served, for the dispatch around the body to answer its latest
|
|
197
|
+
* in place of the body's return; `null` for a new call.
|
|
198
|
+
*/
|
|
199
|
+
defer(executor: IFormulaContext.DeferExecutor, payload: unknown, site?: object | null, volatile?: boolean): DeferredCall | null;
|
|
200
|
+
/**
|
|
201
|
+
* Ends the deferring evaluation in progress: its calls, by ordinal. Resets the scope's
|
|
202
|
+
* per-evaluation fields.
|
|
203
|
+
*/
|
|
204
|
+
endEvaluation(): DeferredEvaluation;
|
|
205
|
+
/**
|
|
206
|
+
* Ends an evaluation that will not stand — a probe of whether an answer can be shared — without
|
|
207
|
+
* keeping its calls: what it made never reaches an executor.
|
|
208
|
+
*/
|
|
209
|
+
abandonEvaluation(): void;
|
|
210
|
+
/**
|
|
211
|
+
* Runs every executor once with the calls the batch collected for it (DESIGN-ASYNC §4.3). Each
|
|
212
|
+
* in its own try: a throw, or a promise that rejects, fails the calls it has not settled and no
|
|
213
|
+
* other executor's.
|
|
214
|
+
*/
|
|
215
|
+
flush(): void;
|
|
216
|
+
/** Closes every open call and drops every batch and state: the backend is going away. */
|
|
217
|
+
close(): void;
|
|
218
|
+
/**
|
|
219
|
+
* Whether every site is served its call until the next {@link flush}: a settle pass, whose
|
|
220
|
+
* re-evaluations are answers landing, or an evaluation waiting on its own calls.
|
|
221
|
+
*/
|
|
222
|
+
setServing(serving: boolean): void;
|
|
223
|
+
/**
|
|
224
|
+
* Whether the batch the next {@link flush} hands out fetches past the workbook's cache, to the
|
|
225
|
+
* source (`CalculateOptions.external`, `cache: 'reload'`).
|
|
226
|
+
*/
|
|
227
|
+
setExternal(external: boolean): void;
|
|
228
|
+
protected _coversCell(cover: true | string | IRange.Coords, gridId: string | null, row: number, column: number): boolean;
|
|
229
|
+
protected _batchFor(executor: IFormulaContext.DeferExecutor): DeferredCall[];
|
|
230
|
+
/**
|
|
231
|
+
* The call this site of the evaluation in progress made last time: what its cell's holder names,
|
|
232
|
+
* or, for a formula held in no cell (a temporary one), the holder its node keeps.
|
|
233
|
+
*/
|
|
234
|
+
protected _siteCall(ordinal: number): DeferredCall | undefined;
|
|
235
|
+
}
|
|
236
|
+
export declare namespace DeferredCalls {
|
|
237
|
+
/**
|
|
238
|
+
* Makes a result cell-ready as it arrives, so a holder always reads as something a cell can
|
|
239
|
+
* hold: an author's array (`[[1],[2]]`, DESIGN-ASYNC §7.3) becomes a range, and a one-cell
|
|
240
|
+
* range its scalar. The backend supplies it; a scalar or a multi-cell range passes as is.
|
|
241
|
+
*/
|
|
242
|
+
type Normalize = (value: unknown) => unknown;
|
|
243
|
+
/** What the backend lends an executor through its batch context; each omitted, a default. */
|
|
244
|
+
interface Services {
|
|
245
|
+
/** Makes rich values for the backend's workbook. Omitted, made outside any workbook. */
|
|
246
|
+
createRichData?: (type: string, data?: any) => IRichData;
|
|
247
|
+
/** Adds resources to the backend's workbook. Omitted, made outside any workbook. */
|
|
248
|
+
addResource?: (buffer: ArrayBuffer, options?: {
|
|
249
|
+
fetchedFrom?: string;
|
|
250
|
+
}) => object;
|
|
251
|
+
/** The workbook's fetch. Omitted, the global `fetch`. */
|
|
252
|
+
fetch?: (input: string, init?: RequestInit) => Promise<Response>;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Whether two payloads are the same question (DESIGN-ASYNC §4.3): `Object.is`, or for two plain
|
|
257
|
+
* objects or arrays, `Object.is` over their own enumerable values one level deep.
|
|
258
|
+
*/
|
|
259
|
+
export declare const samePayload: (a: unknown, b: unknown) => boolean;
|
|
260
|
+
//# sourceMappingURL=DeferredCalls.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Scalar, IRange, IRuntime, IFormulaContext } from '@sheetxl/primitives';
|
|
2
2
|
import { ISparseGrid, ISpatialMap, ISpatialMap3D, ISpatialQuery } from '../../collections';
|
|
3
|
+
import { IRichDataKind } from '../../richData';
|
|
3
4
|
import { ISymbolRegistry } from '../symbol';
|
|
4
5
|
import { IFormulaBlock, FormulaImager } from '../formula';
|
|
5
6
|
import { PrecedentSpatialValue, PrecedentKind, FormulaSpatialValue } from '../spatial';
|
|
@@ -9,6 +10,8 @@ import { ICalculation } from '../ICalculation';
|
|
|
9
10
|
import { NamedNodeInfo } from '../Types';
|
|
10
11
|
import { CalcNode } from './CalcNode';
|
|
11
12
|
import { CalcScope } from './CalcScope';
|
|
13
|
+
import { DeferredCalls } from './DeferredCalls';
|
|
14
|
+
import { WhatIfTable } from '../executor/_WhatIf';
|
|
12
15
|
/**
|
|
13
16
|
* Interface to allow grids to interact with calculation container.
|
|
14
17
|
*/
|
|
@@ -56,8 +59,24 @@ export interface IContextContainer {
|
|
|
56
59
|
getSheetSpanIds?: (scopeId: string) => string[] | null;
|
|
57
60
|
/** Every sheet's grid id in tab order, hidden sheets included. */
|
|
58
61
|
getSheetIds?: () => readonly string[];
|
|
62
|
+
/**
|
|
63
|
+
* Whether a sheet in the tab order has no grid: a chart, macro or dialog sheet. Such a sheet counts
|
|
64
|
+
* in a span's members and gives no values; it cannot be a span's endpoint.
|
|
65
|
+
*/
|
|
66
|
+
isGridless?: (sheetId: string) => boolean;
|
|
59
67
|
getScope(): CalcScope;
|
|
68
|
+
/**
|
|
69
|
+
* The calls the container's evaluations deferred (`IFormulaContext.defer`), with each
|
|
70
|
+
* executor's batch. Absent, or `null`, where nothing can answer later: a deferring function's
|
|
71
|
+
* return value is then its answer.
|
|
72
|
+
*/
|
|
73
|
+
getDeferred?(): DeferredCalls | null;
|
|
60
74
|
getRuntime(): IRuntime;
|
|
75
|
+
/**
|
|
76
|
+
* What rich values a formula makes are made for: the workbook's resources and strings.
|
|
77
|
+
* Absent, they are made outside any workbook.
|
|
78
|
+
*/
|
|
79
|
+
getRichDataContext?(): IRichDataKind.Context;
|
|
61
80
|
/**
|
|
62
81
|
* Returns the current datetime in milliseconds.
|
|
63
82
|
*/
|
|
@@ -162,6 +181,13 @@ export interface IContextContainer {
|
|
|
162
181
|
* objects, copy-on-write per request.
|
|
163
182
|
*/
|
|
164
183
|
setGridMaps(gridId: string, maps: object): void;
|
|
184
|
+
/**
|
|
185
|
+
* The clone key the requests of the batch being applied share (`ISpatialMap.clone`'s), while a
|
|
186
|
+
* held batch or a collecting batch of grids applies; `null` otherwise. The batch is one engine
|
|
187
|
+
* operation, so a map one of its requests cloned is the one the next writes into, rather than a
|
|
188
|
+
* copy per request.
|
|
189
|
+
*/
|
|
190
|
+
getHeldCloneKey?(): string | null;
|
|
165
191
|
/**
|
|
166
192
|
* The model has restored itself to `commitId` (an undo, a redo): restore the engine's history
|
|
167
193
|
* to it, once, and answer the regions of `gridId` that changed between the two snapshots. A
|
|
@@ -322,6 +348,12 @@ export interface IContextContainer {
|
|
|
322
348
|
* recover which is which from the coords.
|
|
323
349
|
*/
|
|
324
350
|
addDynamicPrecedent(calcNode: CalcNode, range: IRange.Coords | undefined, kind: PrecedentKind): void;
|
|
351
|
+
/**
|
|
352
|
+
* The results of a what-if data table, for the `TABLE` node being evaluated (the scope's node):
|
|
353
|
+
* its affected cells re-evaluated under each substitution, nothing written
|
|
354
|
+
* (DESIGN-DATA-TABLES §4.3). Only during a pass.
|
|
355
|
+
*/
|
|
356
|
+
evaluateWhatIf(table: WhatIfTable): Scalar[][];
|
|
325
357
|
/**
|
|
326
358
|
* Queues an action to run at the engine's next safe point, and schedules that point.
|
|
327
359
|
*
|
|
@@ -160,4 +160,10 @@ export declare class PendingOverlayGrid implements ISparseGrid<Scalar>, Referenc
|
|
|
160
160
|
protected _commitAll(): void;
|
|
161
161
|
get [Symbol.toStringTag](): string;
|
|
162
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Whether `grid` reads an error inside the rectangle, by walking it. Shared with `WhatIfLayer`.
|
|
165
|
+
*
|
|
166
|
+
* @internal
|
|
167
|
+
*/
|
|
168
|
+
export declare function _scanHasError(grid: ISparseGrid<Scalar>, coords: IRange.Coords): boolean;
|
|
163
169
|
//# sourceMappingURL=_PendingOverlayGrid.d.ts.map
|