@sheetxl/sdk 0.8.0-beta.11 → 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/browser/esm/{BpgskG1Er_lGQ_yS.mjs → -Jx-jNHmtIQQfLvK.mjs} +1 -1
- package/browser/esm/{BLoUBId2xZpXAK_H.mjs → 2WuhYrIpYmOR5H73.mjs} +15 -15
- package/browser/esm/{Ctjb0SsxV4K4MMqG.mjs → 2mIwPy2D2JUX-9wx.mjs} +2 -2
- package/browser/esm/{CkxWugaJFjDGZNZ-.mjs → B3wf5vZCsWfWsDbj.mjs} +1 -1
- package/browser/esm/{BjkCiv5Jz6WYKZeu.mjs → BIHrHjRGWVlJglcp.mjs} +2 -2
- package/browser/esm/{BtvLTTfSBdAKplVG.mjs → BTFBedJMRWGvZyCE.mjs} +1 -1
- package/browser/esm/{C4MqfLn9Dm-l3OIk.mjs → BdCJNawfifyPupCP.mjs} +1 -1
- package/browser/esm/{CV5EGEjG5_-CPpP0.mjs → Bg5Di9GLNAkbqQ1P.mjs} +3 -3
- package/browser/esm/{C2VbEI_XVAoseAwa.mjs → BnC4-27Igwb8oDf2.mjs} +2 -2
- package/browser/esm/{CQYjO777cmAznUzK.mjs → Bt8_m94tBdks209L.mjs} +1 -1
- package/browser/esm/{C16ycKja6zG0crV_.mjs → BudSIfXBAsTxvu-K.mjs} +17836 -15712
- package/browser/esm/{DvAaxH6z_tGvrRzl.mjs → C9u8FUewte5ugUjH.mjs} +686 -686
- package/browser/esm/{DEiPS3Dr-s4fPbVZ.mjs → CBYMTDzMf1Vh7pkw.mjs} +1 -1
- package/browser/esm/{Dyq_ivuHvlXLwPCl.mjs → CNdjyofiRu6CYOrr.mjs} +1106 -1102
- package/browser/esm/{PcHFjNzQsE54POri.mjs → CRkYR-siY2C994KV.mjs} +1 -1
- package/browser/esm/{C5E6zSGAALWf61n4.mjs → CTe2qfmIUEad6FJv.mjs} +2 -2
- package/browser/esm/{BoV6zPBnfqCBCqZ7.mjs → CUzYuYTTGsChC_kZ.mjs} +3841 -3148
- package/browser/esm/CdEO8CEee6lEhabA.mjs +117 -0
- package/browser/esm/{S2dNNx1a5ydRnARM.mjs → CfRqiPDg6RBTg1EN.mjs} +2 -2
- package/browser/esm/{ClbvFbFzFzXLBKNN.mjs → CndRBvVfQUJIYRRj.mjs} +50 -50
- package/browser/esm/{BnG31I6Oj_HEtSPS.mjs → CwOPLXU3-9ZHGyOT.mjs} +1 -1
- package/browser/esm/{CHU6iu_WGlm7fLET.mjs → Cxjxk0ncRKx80I-w.mjs} +1 -1
- package/browser/esm/D2RZh0O9neOsyLAE.mjs +281 -0
- package/browser/esm/{BkBhLS0l6z8sxI6D.mjs → D64dM68B1pKYFzdP.mjs} +2 -2
- package/browser/esm/{BVDiOXGMc5_FMGfy.mjs → D9xNz46kAfXMZzp4.mjs} +2 -2
- package/browser/esm/{zlLuW405RSguy4Kn.mjs → DK899HhWX1HINMC1.mjs} +53 -53
- package/browser/esm/{B7aUIvgUjncMMD_i.mjs → DPhGQLNGmDZwODwJ.mjs} +5 -4
- package/browser/esm/{gssVX_FH1XFN-twD.mjs → DVroRnhi-5IDXNgM.mjs} +1 -1
- package/{node/esm/CZICGK_ss0HoGHCP.mjs → browser/esm/DZiivy0NmO1Vnyzk.mjs} +2 -2
- package/browser/esm/{ClPfI4lODvCece29.mjs → DgrAuRD2qr2DvFeJ.mjs} +61 -61
- package/browser/esm/{CU3DmJ-YnVVrC1_k.mjs → DobHLF6VjHr7Xi40.mjs} +1 -1
- package/browser/esm/{CaB7J-xgfKO2uAkG.mjs → DwZCT7DZiiXoTweg.mjs} +2 -2
- package/browser/esm/{BMyDRQ716j79h_bH.mjs → DwwR3O2sEZApPSTF.mjs} +6 -6
- package/browser/esm/{DLLE0FZNsKxbBzRn.mjs → Tah7cnFb_HNZdLtj.mjs} +45 -45
- package/browser/esm/{Dlmig06rIo7cInRk.mjs → fXWUMDhZ5yMSO629.mjs} +1 -1
- package/browser/esm/{DWNzqw7DUKwoxjri.mjs → hCQJcmIzPDxDEv2q.mjs} +2 -2
- package/browser/esm/index.mjs +679 -542
- package/browser/esm/{BFagR2JeWs74iAG3.mjs → qO-ujUrgq6H3TQix.mjs} +1 -1
- package/browser/esm/w6Jea0TiclPrYZ2M.mjs +1703 -0
- package/browser/esm/yuhcOYw6SHQ-RCm3.mjs +114 -0
- package/node/esm/-TA0MneBDKdGhsib.mjs +8668 -0
- package/node/esm/{B21JjOLghRoDOrkx.mjs → B-HUPAcqvK0eeeCz.mjs} +1 -1
- package/node/esm/{DNRhGK-8Tr9xcRyc.mjs → BL2iiEoqxDEV2Xrg.mjs} +3 -3
- package/node/esm/{D1TKBVmoKGAXf37B.mjs → BNXLOEddJ6O9gYws.mjs} +2 -2
- package/node/esm/{BrCKGFRsX_ezFJ4B.mjs → BSvOluusoDM4z_dx.mjs} +15 -15
- package/node/esm/{BIwObuhTJYf0jpUa.mjs → BskP3b8vUoIOGLY6.mjs} +2 -2
- package/node/esm/{2Kihw_-5lVTEnwMa.mjs → Btw4148Ot8ifhNc1.mjs} +1 -1
- package/node/esm/{BqiexuA89caYnAPz.mjs → C14-R6tifRh7pc0p.mjs} +1 -1
- package/node/esm/{DUTskXCXref-IJnI.mjs → C99zzq8DImQXi4BQ.mjs} +47 -47
- package/node/esm/{D8zEN-6ZdDqDvTxM.mjs → CBuEu5Jk-LfaDy-H.mjs} +61 -61
- package/node/esm/{yavzZOiZW_EjG9lE.mjs → CG-qBU5BAaVz7e-P.mjs} +1 -1
- package/node/esm/CPI58duc0j0a-HpJ.mjs +115 -0
- package/node/esm/{CCN5vD410obwdz38.mjs → CRt3vXe6YmXzqk3H.mjs} +15 -14
- package/node/esm/{CzXT00vrQa1_gvW9.mjs → C_aL7CGS1lrNn1Ng.mjs} +1 -1
- package/node/esm/{CZiqiay42tFTrLI4.mjs → C_xf5Bz30VqiJjXn.mjs} +1 -1
- package/node/esm/{BIRq1kT7lLRzns9t.mjs → CiIymQN6aJCul62g.mjs} +9 -9
- package/node/esm/{CNCNJNg890KdgkWh.mjs → Ci_zLYmCD7e-C79O.mjs} +1 -1
- package/{browser/esm/D5np__Jb1euAyaLw.mjs → node/esm/CkRYLed8Mmn3giNg.mjs} +2 -2
- package/node/esm/D3ptRKzASqBut1DE.mjs +117 -0
- package/node/esm/{cGwrLA1RCE-WhJ7w.mjs → D4ROK9UwDpS6jO3Z.mjs} +1 -1
- package/node/esm/{mFiBSM7XgBHV9AY7.mjs → D8hO07ToAibIuniw.mjs} +1535 -1531
- package/node/esm/{CDHdgJXH2vS71WMc.mjs → DUTmDHbFbhLDT4F3.mjs} +1 -1
- package/node/esm/{CGp6VZL-gZa9Uezx.mjs → DV5CU37aEbFbWFL0.mjs} +1 -1
- package/node/esm/{De2IONBxQhz-Qbyh.mjs → DdoiuKg9BKubtF1V.mjs} +1 -1
- package/node/esm/{Db0v7zXNnyjBIjjI.mjs → DggQ23jKMpwhENfa.mjs} +2 -2
- package/node/esm/{CwePQwTILHHjGDkZ.mjs → DhS6yWjrrSNIJMsn.mjs} +204 -204
- package/node/esm/{D_t5AUxSm7_icjzq.mjs → DhTya_mhmN53vskv.mjs} +1 -1
- package/node/esm/{DOU54VsOjG-m-NyQ.mjs → Dn1M7YWi25DeeYUb.mjs} +1 -1
- package/node/esm/{DkwIPzKc3UwdUIfM.mjs → DrCf6ITcBhVOFpRj.mjs} +6 -6
- package/node/esm/{D2KBymQJd1XhpeQD.mjs → DxazKtROyaI51dWl.mjs} +1 -1
- package/node/esm/{D6e2z7eZpxOJXHc7.mjs → Q_S1g46ZOTrdhTae.mjs} +1 -1
- package/node/esm/{OVfaSb506tNSIvbv.mjs → Vocy-I9dKzZMr0Ct.mjs} +19038 -16822
- package/node/esm/ZXPFcsT2zrALCZux.mjs +289 -0
- package/node/esm/{857CIBgQgGpnqrXk.mjs → eimUGjiIP-b8HiM6.mjs} +55 -55
- package/node/esm/{Bbf1Pm9Gk7YpLTvg.mjs → icn2nX5Z8e_3mNAv.mjs} +1 -1
- package/node/esm/index.mjs +740 -603
- package/node/esm/{Ct3h15sCus4Tgt6M.mjs → lGJ42sHqg5if2bba.mjs} +624 -616
- package/node/esm/{CdJHUJSBRHZoryPe.mjs → pYtP7wPyS96NQyXS.mjs} +59 -59
- package/package.json +6 -6
- package/resources/locales/de/model.msg.json +8 -2
- package/resources/locales/en/model.msg.json +9 -2
- package/types/scripting-api.json +10619 -10446
- package/types/scripting-enums.json +20 -1
- package/types/scripting.d.ts +1233 -296
- package/types/src/{sheet → anomalies}/_Anomalies.d.ts +3 -3
- package/types/src/anomalies/_FocusTable.d.ts +11 -0
- package/types/src/{sheet/_AnomalyFormulaChecks.d.ts → anomalies/_FormulaChecks.d.ts} +10 -2
- package/types/src/{sheet/_AnomalyLabelChecks.d.ts → anomalies/_LabelChecks.d.ts} +1 -1
- package/types/src/anomalies/_LiteralChecks.d.ts +35 -0
- package/types/src/anomalies/_SeriesChecks.d.ts +13 -0
- package/types/src/calculation/Calculation.d.ts +47 -9
- package/types/src/calculation/ExternalBookBindings.d.ts +2 -3
- package/types/src/calculation/ICalculation.d.ts +96 -9
- package/types/src/calculation/NamedFormulaCollection.d.ts +104 -8
- package/types/src/calculation/_CloneBoundary.d.ts +1 -1
- package/types/src/calculation/compiler/ASTTypes.d.ts +6 -2
- package/types/src/calculation/compiler/Types.d.ts +8 -0
- package/types/src/calculation/engine/CalcBackend.d.ts +104 -6
- package/types/src/calculation/executor/CalcExecutor.d.ts +73 -22
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +17 -1
- package/types/src/calculation/executor/_WhatIf.d.ts +50 -0
- package/types/src/calculation/formula/FormulaBlock.d.ts +4 -3
- package/types/src/calculation/formula/IFormulaBlock.d.ts +5 -0
- package/types/src/calculation/functions/_DataTableFunction.d.ts +14 -0
- package/types/src/calculation/grid/CalcGrid.d.ts +4 -6
- package/types/src/calculation/grid/CalcGridBackend.d.ts +5 -27
- package/types/src/calculation/grid/CalcGridProxy.d.ts +0 -2
- package/types/src/calculation/grid/CalcGridUtils.d.ts +4 -2
- package/types/src/calculation/grid/ICalcGrid.d.ts +16 -12
- package/types/src/calculation/grid/_CalcRequest.d.ts +17 -5
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +2 -0
- 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 +29 -0
- package/types/src/calculation/state/CalcState.d.ts +26 -4
- package/types/src/calculation/state/CalculationContext.d.ts +28 -1
- package/types/src/calculation/state/DeferredCalls.d.ts +260 -0
- package/types/src/calculation/state/IContextContainer.d.ts +20 -0
- package/types/src/calculation/state/_PendingOverlayGrid.d.ts +6 -0
- package/types/src/calculation/state/_WhatIfLayer.d.ts +91 -0
- package/types/src/cell/ICell.d.ts +53 -34
- 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/ICellRange.d.ts +207 -59
- package/types/src/cellRange/ICellRanges.d.ts +4 -3
- package/types/src/chart/layout/ChartLayout.d.ts +5 -1
- package/types/src/chart/resolve/_Resolve.d.ts +10 -0
- package/types/src/chart/resolve/_ResolvedChart.d.ts +5 -2
- package/types/src/collections/ISparseGrid.d.ts +11 -2
- package/types/src/collections/MixedTypedArrayList.d.ts +8 -2
- package/types/src/collections/SparseGrid.d.ts +3 -8
- package/types/src/condition/AnchoredConditional.d.ts +2 -2
- 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/PaintUtils.d.ts +3 -1
- package/types/src/hyperlink/IHyperlink.d.ts +10 -0
- package/types/src/hyperlink/_Hyperlink.d.ts +4 -1
- package/types/src/index.d.ts +2 -1
- package/types/src/named/INamedCollection.d.ts +36 -0
- package/types/src/named/NamedCollection.d.ts +18 -0
- package/types/src/primitives/AsyncValue.d.ts +58 -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 +55 -11
- 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 +46 -14
- 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 +5 -5
- package/types/src/richData/index.d.ts +6 -0
- package/types/src/scripting/FunctionArguments.d.ts +17 -1
- package/types/src/scripting/FunctionCollection.d.ts +8 -0
- package/types/src/scripting/Scripts.d.ts +10 -0
- package/types/src/scripting/TypedFunction.d.ts +2 -0
- package/types/src/sheet/ICellContainerOptions.d.ts +6 -0
- package/types/src/sheet/IWorksheet.d.ts +24 -17
- package/types/src/sheet/SheetCell.d.ts +17 -1
- package/types/src/sheet/SheetRange.d.ts +8 -2
- package/types/src/sheet/SheetRanges.d.ts +2 -2
- package/types/src/sheet/Worksheet.d.ts +110 -56
- package/types/src/sheet/_ListenerAnchor.d.ts +7 -1
- package/types/src/sheet/_ScalarListFactory.d.ts +54 -6
- package/types/src/sheet/_SheetMutations.d.ts +4 -1
- package/types/src/sheet/_SheetStateTypes.d.ts +23 -11
- package/types/src/workbook/IWorkbook.d.ts +40 -1
- package/types/src/workbook/Workbook.d.ts +25 -3
- package/types/src/workbook/WorkbookRanges.d.ts +1 -1
- package/browser/esm/BGOFfpxr2jPIdqmV.mjs +0 -40
- package/browser/esm/f1IoRb7tEb0QmCSt.mjs +0 -110
- package/browser/esm/nvU0ClAbf0g94YBK.mjs +0 -1695
- package/node/esm/B084DssTcdBheTp_.mjs +0 -7966
- package/node/esm/Df1bL6VFvrqIdSLB.mjs +0 -40
- package/node/esm/DrTZbfemSLq2mseG.mjs +0 -111
- package/types/src/dataTable/DataTable.d.ts +0 -67
- package/types/src/dataTable/DataTableCollection.d.ts +0 -19
- package/types/src/dataTable/IDataTable.d.ts +0 -99
- package/types/src/dataTable/IDataTableCollection.d.ts +0 -18
- package/types/src/dataTable/index.d.ts +0 -6
|
@@ -12,6 +12,8 @@ export declare class Scripts implements IScript {
|
|
|
12
12
|
private _modules;
|
|
13
13
|
/** In-flight {@link start} run, so concurrent callers share one attempt (and one error). */
|
|
14
14
|
private _startPromise?;
|
|
15
|
+
/** In-flight {@link _load} run, shared the same way. */
|
|
16
|
+
private _loadPromise?;
|
|
15
17
|
protected _emitter: ListenerEmitter<IScript, IScript.IListeners>;
|
|
16
18
|
constructor(options: Scripts.ConstructorOptions);
|
|
17
19
|
protected _initState(): void;
|
|
@@ -49,7 +51,15 @@ export declare class Scripts implements IScript {
|
|
|
49
51
|
searchFunctions(options?: IScript.SearchOptions): Promise<IFunction[]>;
|
|
50
52
|
/** {@inheritDoc IScript.start} */
|
|
51
53
|
start(): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Builds the modules from the file without running anything in them: what the calculation's
|
|
56
|
+
* first pass needs (their formula functions), ahead of {@link start}, which also runs the
|
|
57
|
+
* `autoRun` functions and so belongs after it.
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
_load(): Promise<void>;
|
|
52
61
|
private _doStart;
|
|
62
|
+
private _doLoad;
|
|
53
63
|
/** {@inheritDoc IListener.ISource.addListeners} */
|
|
54
64
|
addListeners(listeners: IScript.IListeners, options?: IListener.Options): IListener.Remove;
|
|
55
65
|
/** {@inheritDoc IScript.isReadOnly} */
|
|
@@ -205,6 +205,8 @@ export declare class TypedFunction implements IFunction {
|
|
|
205
205
|
* parameter is the same thing to a body asking which parameter its argument landed in.
|
|
206
206
|
*/
|
|
207
207
|
protected _va: number;
|
|
208
|
+
/** The declaration's `volatile`, read once: what the call frame carries for `defer`. */
|
|
209
|
+
protected _vol: boolean;
|
|
208
210
|
/** Resolved {@link RepeatPlan} per argument count (`null` = an arity the declaration refuses). */
|
|
209
211
|
protected _gc: Map<number, RepeatPlan | null> | null;
|
|
210
212
|
/** The name's argument ceiling — {@link IFunction.IDeclaration.getMaxArguments}, cached. */
|
|
@@ -3,6 +3,7 @@ import { FunctionProvider } from '@sheetxl/scripting';
|
|
|
3
3
|
import { ITransaction } from '../transaction';
|
|
4
4
|
import { IResourceCollection } from '../resource';
|
|
5
5
|
import { IStringCollection } from '../string';
|
|
6
|
+
import { IRichDataCollection } from '../richData';
|
|
6
7
|
import { ICellRange } from '../cellRange';
|
|
7
8
|
import { INamedCollection } from '../named';
|
|
8
9
|
import { IStyleCollection } from '../style';
|
|
@@ -33,6 +34,11 @@ export interface ICellContainerOptions {
|
|
|
33
34
|
* Option to provide shared strings.
|
|
34
35
|
*/
|
|
35
36
|
strings?: IStringCollection;
|
|
37
|
+
/**
|
|
38
|
+
* Option to provide shared rich values, the store cells hold rich data in by id, as they hold
|
|
39
|
+
* strings in {@link strings}.
|
|
40
|
+
*/
|
|
41
|
+
richData?: IRichDataCollection;
|
|
36
42
|
/**
|
|
37
43
|
* Option to provide a shared StyleCollection. If not provided then a new StyleCollection with default theming will be used.
|
|
38
44
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Scalar, IRange, IRangeStats, IRuntime } from '@sheetxl/primitives';
|
|
1
|
+
import { Scalar, IRange, IRangeStats, IRichType, IRuntime } from '@sheetxl/primitives';
|
|
2
2
|
import { Bounds, Size } from '@sheetxl/utils';
|
|
3
3
|
import { ITypes } from '../type';
|
|
4
4
|
import { ITransaction } from '../transaction';
|
|
@@ -14,15 +14,16 @@ import { ICellRange, ICellRanges, ICellRegions } from '../cellRange';
|
|
|
14
14
|
import { IRangeSelection } from '../selection';
|
|
15
15
|
import { IStyleCollection } from '../style';
|
|
16
16
|
import { IStringCollection } from '../string';
|
|
17
|
+
import { IRichDataCollection } from '../richData';
|
|
17
18
|
import { IResource, IResourceCollection } from '../resource';
|
|
18
19
|
import { IMovable, IMovableCollection } from '../movable';
|
|
19
20
|
import { IPivotTable, IPivotTableCollection } from '../pivot';
|
|
20
|
-
import { IDataTable, IDataTableCollection } from '../dataTable';
|
|
21
21
|
import { IComment, ICommentCollection } from '../comment';
|
|
22
22
|
import { ITable, ITableCollection } from '../table';
|
|
23
23
|
import { IDataValidation, IDataValidationCollection } from '../dataValidation';
|
|
24
24
|
import { IConditionalFormat, IConditionalFormatCollection } from '../conditionalFormat';
|
|
25
25
|
import { IProtectedRange, IProtectedRangeCollection } from '../protectedRange';
|
|
26
|
+
import { ICellControl, ICellControlCollection } from '../cellControl';
|
|
26
27
|
import { IModule, IModuleCollection } from '../scripting';
|
|
27
28
|
import { IChartCollection } from '../chart';
|
|
28
29
|
import { INamedCollection } from '../named';
|
|
@@ -220,6 +221,14 @@ export interface IWorksheet extends ISheet, ITransaction.ITransactional, IListen
|
|
|
220
221
|
* {@link IWorksheetProtection.isLocked} is true.
|
|
221
222
|
*/
|
|
222
223
|
getProtectedRanges(): IProtectedRangeCollection;
|
|
224
|
+
/**
|
|
225
|
+
* Returns the cell controls on this sheet, such as checkboxes.
|
|
226
|
+
*
|
|
227
|
+
* @remarks
|
|
228
|
+
* Every entry, in drawing order. To put a control on cells or read what is there, use
|
|
229
|
+
* {@link ICellRange.setControl} and {@link ICellRange.getControls}.
|
|
230
|
+
*/
|
|
231
|
+
getCellControls(): ICellControlCollection;
|
|
223
232
|
/**
|
|
224
233
|
* Returns the comments and notes on this sheet.
|
|
225
234
|
*
|
|
@@ -677,14 +686,6 @@ export interface IWorksheet extends ISheet, ITransaction.ITransactional, IListen
|
|
|
677
686
|
* workbook's {@link IWorkbook.getPivotTables} walks every sheet's.
|
|
678
687
|
*/
|
|
679
688
|
getPivotTables(): IPivotTableCollection;
|
|
680
|
-
/**
|
|
681
|
-
* Returns the what-if data tables on this sheet, in the order they were read.
|
|
682
|
-
*
|
|
683
|
-
* @remarks
|
|
684
|
-
* Read-only for now: each table is carried as it was read, its results as the file held them.
|
|
685
|
-
* As in Excel, an edit to part of a table's results is refused.
|
|
686
|
-
*/
|
|
687
|
-
getDataTables(): IDataTableCollection;
|
|
688
689
|
/**
|
|
689
690
|
* Set the picture interface for the entire sheet.
|
|
690
691
|
* @param picture The picture interface to set for the sheet, or null to remove it.
|
|
@@ -976,6 +977,13 @@ export declare namespace IWorksheet {
|
|
|
976
977
|
* Always accompanied by the coarse {@link onProtectionChange}.
|
|
977
978
|
*/
|
|
978
979
|
onProtectedRangesChange?(source: IWorksheet): void;
|
|
980
|
+
/**
|
|
981
|
+
* Called when a cell control is added, removed, re-anchored or reordered.
|
|
982
|
+
*
|
|
983
|
+
* @remarks
|
|
984
|
+
* Always accompanied by the coarse {@link onStyleChange}: a control is a format.
|
|
985
|
+
*/
|
|
986
|
+
onCellControlsChange?(source: IWorksheet): void;
|
|
979
987
|
/**
|
|
980
988
|
* Called when a comment is added, removed, edited, resolved, replied to or re-anchored.
|
|
981
989
|
*
|
|
@@ -1340,7 +1348,7 @@ export declare namespace IWorksheet {
|
|
|
1340
1348
|
* JSON representation of an `IWorksheet` used for serialization and deserialization.
|
|
1341
1349
|
*/
|
|
1342
1350
|
interface JSON extends ISheet.JSON {
|
|
1343
|
-
data?: Tuple.GridTuple<
|
|
1351
|
+
data?: Tuple.GridTuple<Scalar.JSON>;
|
|
1344
1352
|
formulas?: IRange.JSONReferenceTuple<string>[];
|
|
1345
1353
|
/**
|
|
1346
1354
|
* The extent occupied by an array formula, and which of the three
|
|
@@ -1377,6 +1385,10 @@ export declare namespace IWorksheet {
|
|
|
1377
1385
|
styles?: IStyleCollection.JSON;
|
|
1378
1386
|
resources?: IResource.JSON[];
|
|
1379
1387
|
strings?: string[];
|
|
1388
|
+
/** The rich values cells name by id (`{ t: 'r', v: id }`), when the sheet owns its own. */
|
|
1389
|
+
richData?: IRichDataCollection.JSON[];
|
|
1390
|
+
/** The kinds {@link richData} names that are not registered in code (a kind read from a file). */
|
|
1391
|
+
richTypes?: IRichType.JSON[];
|
|
1380
1392
|
/**
|
|
1381
1393
|
* Modules owned by this sheet, keyed by module name.
|
|
1382
1394
|
*
|
|
@@ -1418,6 +1430,7 @@ export declare namespace IWorksheet {
|
|
|
1418
1430
|
*/
|
|
1419
1431
|
validationSettings?: IDataValidationCollection.Settings;
|
|
1420
1432
|
protectedRanges?: IRange.JSONReference<IProtectedRange.JSON>[];
|
|
1433
|
+
cellControls?: IRange.JSONReference<ICellControl.JSON>[];
|
|
1421
1434
|
movables?: IMovable.JSON[];
|
|
1422
1435
|
/**
|
|
1423
1436
|
* The sheet's VBA code name. Absent when it has none.
|
|
@@ -1475,12 +1488,6 @@ export declare namespace IWorksheet {
|
|
|
1475
1488
|
* @see {@link IWorksheet.getPivotTables}
|
|
1476
1489
|
*/
|
|
1477
1490
|
pivotTables?: IPivotTable.JSON[];
|
|
1478
|
-
/**
|
|
1479
|
-
* The sheet's what-if data tables.
|
|
1480
|
-
*
|
|
1481
|
-
* @see {@link IWorksheet.getDataTables}
|
|
1482
|
-
*/
|
|
1483
|
-
dataTables?: IDataTable.JSON[];
|
|
1484
1491
|
/**
|
|
1485
1492
|
* The cells where Excel's error checks are ignored (the green triangle's **Ignore Error**):
|
|
1486
1493
|
* each reference's value is the set of checks its cells ignore.
|
|
@@ -4,6 +4,7 @@ import { ITransaction } from '../transaction';
|
|
|
4
4
|
import { IProperties, ITypes } from '../type';
|
|
5
5
|
import { NumberFormat } from '../numFmt';
|
|
6
6
|
import { ITextFrame, IRichText } from '../text';
|
|
7
|
+
import { IRichDataKind } from '../richData/IRichDataKind';
|
|
7
8
|
import { ITable } from '../table';
|
|
8
9
|
import { IDataValidation } from '../dataValidation';
|
|
9
10
|
import { IHyperlink } from '../hyperlink';
|
|
@@ -20,6 +21,7 @@ import { SpillEntry } from '../calculation/spatial';
|
|
|
20
21
|
import { CellStyleUpdater } from './style/SheetCellStyle';
|
|
21
22
|
import { ICalcGrid } from '../calculation/grid';
|
|
22
23
|
import { IConditionalFormat } from '../conditionalFormat';
|
|
24
|
+
import { ICellControl } from '../cellControl/ICellControl';
|
|
23
25
|
/**
|
|
24
26
|
* CellModifiers with all functions removed and all properties set and a type.
|
|
25
27
|
*/
|
|
@@ -53,7 +55,7 @@ interface Cache<K, V> {
|
|
|
53
55
|
* // TODO - remove style dependency and see if we can remove it.
|
|
54
56
|
*/
|
|
55
57
|
export declare function resolveCellModifiers(runtime: IRuntime, update: ICell.Update, optionsFromString?: ICell.ModifiersFromStringOptions | null, resolvedStringCache?: Map<string, ICell.Modifiers> | null, // assumes the same fromStringOptions is used
|
|
56
|
-
isParsingCustom?: boolean, destination?: IRange.CellCoords | null, quotePrefixOnly?: boolean): ResolvedCellModifiers | undefined;
|
|
58
|
+
isParsingCustom?: boolean, destination?: IRange.CellCoords | null, quotePrefixOnly?: boolean, richData?: IRichDataKind.Context | null): ResolvedCellModifiers | undefined;
|
|
57
59
|
/**
|
|
58
60
|
* The decorations (data bar, icon set) a cell's conditional rules draw — the walk behind
|
|
59
61
|
* {@link SheetCell.getConditionalDecorations}, without a cell.
|
|
@@ -229,6 +231,8 @@ export declare class SheetCell implements ICell {
|
|
|
229
231
|
getDataValidation(): IDataValidation | null;
|
|
230
232
|
/** {@inheritDoc ICell.getConditionalDecorations} */
|
|
231
233
|
getConditionalDecorations(): Readonly<IConditionalFormat.Decorations>;
|
|
234
|
+
/** {@inheritDoc ICell.getControl} */
|
|
235
|
+
getControl(): ICellControl | null;
|
|
232
236
|
/** {@inheritDoc ICell.getProtection} */
|
|
233
237
|
getProtection(): ICellProtection;
|
|
234
238
|
/** {@inheritDoc ICell.getTextOverflow} */
|
|
@@ -301,6 +305,12 @@ export declare class SheetCell implements ICell {
|
|
|
301
305
|
getValue(): Scalar;
|
|
302
306
|
/** {@inheritDoc ICell.getType} */
|
|
303
307
|
getType(): ScalarType;
|
|
308
|
+
/**
|
|
309
|
+
* The type the value lays out as: rich data as what it shows ({@link RichDataRegistry.layoutTypeOf}:
|
|
310
|
+
* a hyperlink, a rich text or an entity is text, so it aligns left under General and spills into
|
|
311
|
+
* empty neighbors), everything else as itself.
|
|
312
|
+
*/
|
|
313
|
+
protected _layoutType(): ScalarType;
|
|
304
314
|
/** {@inheritDoc ICell.getInteropValue} */
|
|
305
315
|
getInteropValue(): InteropScalar;
|
|
306
316
|
/** {@inheritDoc ICell.getInteropType} */
|
|
@@ -338,6 +348,12 @@ export declare class SheetCell implements ICell {
|
|
|
338
348
|
getRole(): ICell.Role | null;
|
|
339
349
|
/** {@inheritDoc ICell.getHyperlink} */
|
|
340
350
|
getHyperlink(): IHyperlink | null;
|
|
351
|
+
/**
|
|
352
|
+
* The hyperlink set on the cell, never one its value presents: what a move or a copy carries
|
|
353
|
+
* to another cell (the value carries its own).
|
|
354
|
+
* @internal
|
|
355
|
+
*/
|
|
356
|
+
getStoredHyperlink(): IHyperlink.Properties | null;
|
|
341
357
|
/** {@inheritDoc ICell.getRichText} */
|
|
342
358
|
getRichText(): IRichText.JSON | null;
|
|
343
359
|
/** {@inheritDoc ICell.getErrors} */
|
|
@@ -19,6 +19,8 @@ import { IDataValidation, IDataValidationCollection } from '../dataValidation';
|
|
|
19
19
|
import { IConditionalFormat } from '../conditionalFormat/IConditionalFormat';
|
|
20
20
|
import { IConditionalFormatCollection } from '../conditionalFormat/IConditionalFormatCollection';
|
|
21
21
|
import { IProtectedRange, IProtectedRangeCollection } from '../protectedRange';
|
|
22
|
+
import { ICellControl } from '../cellControl/ICellControl';
|
|
23
|
+
import { ICellControlCollection } from '../cellControl/ICellControlCollection';
|
|
22
24
|
import { IWorksheet } from './IWorksheet';
|
|
23
25
|
import { IWorksheetInternal } from './Worksheet';
|
|
24
26
|
import { WatchAnchor } from './_WatchAnchor';
|
|
@@ -31,8 +33,8 @@ import { AutoFillProjection } from './_SheetAutoFillUtils';
|
|
|
31
33
|
export declare const _NoFeatures: readonly ICellRange.Feature[];
|
|
32
34
|
/**
|
|
33
35
|
* A watch listens for the VALUE landing, not for the transaction that caused it — a recalculation
|
|
34
|
-
* notifies its own ranges once the results are in (`
|
|
35
|
-
* has something new to report.
|
|
36
|
+
* notifies its own ranges once the results are in (a `'data'` event with no commit), which is the
|
|
37
|
+
* moment a watch has something new to report.
|
|
36
38
|
*/
|
|
37
39
|
export interface SheetRangeOptions {
|
|
38
40
|
readOnly?: string;
|
|
@@ -341,6 +343,10 @@ export declare class SheetRange implements ICellRange {
|
|
|
341
343
|
getUnlocked(options?: ICellRange.GetItemsOptions<IProtectedRangeCollection.GetItemsOptions>): IProtectedRange[];
|
|
342
344
|
/** {@inheritDoc ICellRange.getConditionalFormats} */
|
|
343
345
|
getConditionalFormats(options?: ICellRange.GetItemsOptions<IConditionalFormatCollection.GetItemsOptions>): IConditionalFormat[];
|
|
346
|
+
/** {@inheritDoc ICellRange.getControls} */
|
|
347
|
+
getControls(options?: ICellRange.GetItemsOptions<ICellControlCollection.GetItemsOptions>): ICellControl[];
|
|
348
|
+
/** {@inheritDoc ICellRange.setControl} */
|
|
349
|
+
setControl(control: ICellControl.JSON | null, options?: ITransaction.OperationOptions): this;
|
|
344
350
|
/** {@inheritDoc ICellRange.getDataValidations} */
|
|
345
351
|
getDataValidations(options?: ICellRange.GetItemsOptions<IDataValidationCollection.GetItemsOptions>): IDataValidation[];
|
|
346
352
|
/** {@inheritDoc ICellRange.getComments} */
|
|
@@ -98,7 +98,7 @@ export declare class SheetRanges implements ICellRanges {
|
|
|
98
98
|
/** {@inheritDoc ICellRange.calculate} */
|
|
99
99
|
calculate(): this;
|
|
100
100
|
/** {@inheritDoc ICellRanges.addListener} */
|
|
101
|
-
addListener(listener: ICellRange.Listener
|
|
101
|
+
addListener(listener: ICellRange.Listener<ICellRanges>, options?: ICellRange.ListenerOptions): IListener.Remove;
|
|
102
102
|
/** {@inheritDoc ICellRanges.addWatch} */
|
|
103
103
|
addWatch(formula: ICalculation.IFormula | string, callback: ICellRanges.WatchCallback, options?: ICellRange.WatchOptions): IListener.Remove;
|
|
104
104
|
/**
|
|
@@ -155,7 +155,7 @@ export declare class SheetRanges implements ICellRanges {
|
|
|
155
155
|
/** {@inheritDoc ICellRanges.clear} */
|
|
156
156
|
clear(applyTo?: ICell.Content, options?: ITransaction.OperationOptions): this;
|
|
157
157
|
/** {@inheritDoc ICellRanges.setValue} */
|
|
158
|
-
setValue(value: ICellRange.
|
|
158
|
+
setValue(value: ICellRange.InteropScalarUpdate, options?: ICellRange.SetValuesOptions): this;
|
|
159
159
|
/** {@inheritDoc ICellRanges.getStyle} */
|
|
160
160
|
getStyle(): ICellStyle;
|
|
161
161
|
/** {@inheritDoc ICellRanges.merge} */
|
|
@@ -29,15 +29,17 @@ import { IChartCollection } from '../chart';
|
|
|
29
29
|
import { IPicture } from '../picture';
|
|
30
30
|
import { InsertableCollection } from '../movable/_InsertableCollection';
|
|
31
31
|
import { IPivotTable, IPivotTableCollection } from '../pivot';
|
|
32
|
-
import {
|
|
33
|
-
import { AnomalyFindings, AnomalySet, AnomalySource, RoleSource } from './_Anomalies';
|
|
32
|
+
import { AnomalyFindings, AnomalySet, AnomalySource, RoleSource } from '../anomalies/_Anomalies';
|
|
34
33
|
import { CellKind } from './_Kinds';
|
|
34
|
+
import { IRichDataKind } from '../richData/IRichDataKind';
|
|
35
|
+
import { IRichDataCollection } from '../richData/IRichDataCollection';
|
|
35
36
|
import { ICell } from '../cell';
|
|
36
37
|
import { ICellRange, ICellRegions, ICellRanges } from '../cellRange';
|
|
37
38
|
import { ICellStyle, IStyleCollection } from '../style';
|
|
38
39
|
import { IRangeSelection } from '../selection';
|
|
39
40
|
import { IConditionalFormat, IConditionalFormatCollection } from '../conditionalFormat';
|
|
40
41
|
import { IProtectedRange, IProtectedRangeCollection } from '../protectedRange';
|
|
42
|
+
import { ICellControl, ICellControlCollection } from '../cellControl';
|
|
41
43
|
import { Tuple, ISpatialMap, ISpatialQuery } from '../collections';
|
|
42
44
|
import { ListenerEmitter } from '../listener/ListenerEmitter';
|
|
43
45
|
import { ICondition } from '../condition';
|
|
@@ -45,6 +47,7 @@ import { ConditionalFormat } from '../conditionalFormat/ConditionalFormat';
|
|
|
45
47
|
import { IDataValidationCollection, IDataValidation } from '../dataValidation';
|
|
46
48
|
import { DataValidation } from '../dataValidation/DataValidation';
|
|
47
49
|
import { ProtectedRange } from '../protectedRange/ProtectedRange';
|
|
50
|
+
import { CellControl } from '../cellControl/CellControl';
|
|
48
51
|
import { Comment } from '../comment/Comment';
|
|
49
52
|
import { NoteMovable } from '../comment/NoteMovable';
|
|
50
53
|
import { NoteLayout } from '../comment/_NoteBox';
|
|
@@ -153,7 +156,14 @@ export declare class Worksheet implements IWorksheet {
|
|
|
153
156
|
protected _strings: IStringCollection;
|
|
154
157
|
/** Makes the lists cell values are stored as, over `_strings`. */
|
|
155
158
|
protected _lists: ScalarListFactory;
|
|
159
|
+
/** What rich values written to or loaded into this sheet are made for. */
|
|
160
|
+
protected _richData: IRichDataKind.Context;
|
|
161
|
+
/** The resource ids of the file being read; unset outside a read. */
|
|
162
|
+
protected _readingResources: IResourceCollection.IPersistScope<IResource.JSON> | null;
|
|
156
163
|
protected _ownStrings: boolean;
|
|
164
|
+
/** The rich values the sheet's runs hold by id: the workbook's, or the sheet's own. */
|
|
165
|
+
protected _richValues: IRichDataCollection;
|
|
166
|
+
protected _ownRichValues: boolean;
|
|
157
167
|
protected _styles: IStyleCollection;
|
|
158
168
|
protected _ownStyles: boolean;
|
|
159
169
|
protected _stylesRemoveListener: IListener.Remove;
|
|
@@ -187,8 +197,6 @@ export declare class Worksheet implements IWorksheet {
|
|
|
187
197
|
protected _legacyDrawingHF: LegacyDrawing | null;
|
|
188
198
|
/** The sheet's pivot tables, held as read for the same reason. */
|
|
189
199
|
protected _pivotTableCollection: IPivotTableCollection;
|
|
190
|
-
/** The sheet's data tables, carried as read. */
|
|
191
|
-
protected _dataTableCollection: IDataTableCollection;
|
|
192
200
|
/**
|
|
193
201
|
* Anchored items whose delete this sheet announced itself.
|
|
194
202
|
*
|
|
@@ -216,6 +224,7 @@ export declare class Worksheet implements IWorksheet {
|
|
|
216
224
|
protected _conditionals: IConditionalFormatCollection;
|
|
217
225
|
protected _dataValidations: IDataValidationCollection;
|
|
218
226
|
protected _protectedRanges: IProtectedRangeCollection;
|
|
227
|
+
protected _cellControls: ICellControlCollection;
|
|
219
228
|
protected _comments: ICommentCollection;
|
|
220
229
|
protected _movables: IMovableCollection;
|
|
221
230
|
protected _charts: IChartCollection;
|
|
@@ -253,6 +262,12 @@ export declare class Worksheet implements IWorksheet {
|
|
|
253
262
|
coords: IRange.Coords | null;
|
|
254
263
|
range: ICellRange | null;
|
|
255
264
|
};
|
|
265
|
+
/**
|
|
266
|
+
* Set while a cut on a protected sheet moves its cells, which it ruled on before it began (see
|
|
267
|
+
* `_copyFromNow`): the move's own steps (its clears, the rules it re-anchors) do not rule again,
|
|
268
|
+
* since the first of them changes the cells the next would read. Synchronous, like the move.
|
|
269
|
+
*/
|
|
270
|
+
protected _isMoveRuled: boolean;
|
|
256
271
|
protected _lastRangeRead: {
|
|
257
272
|
address: ICellRange.Address | null;
|
|
258
273
|
range: ICellRange | null;
|
|
@@ -374,7 +389,7 @@ export declare class Worksheet implements IWorksheet {
|
|
|
374
389
|
autoFit: (ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions, holdWhileLoading?: boolean) => void;
|
|
375
390
|
getBestFit: (range: IRange.Coords, options?: ICellRange.BestFitOptions) => Size;
|
|
376
391
|
invalidateRendering: (axes?: IRange.AxisSelection | null) => void;
|
|
377
|
-
addListenerNode: (ranges: readonly IRange.Coords[], listener: ICellRange.Listener
|
|
392
|
+
addListenerNode: (ranges: readonly IRange.Coords[], listener: ICellRange.Listener<any>, options?: ICellRange.ListenerOptions, collection?: boolean) => IListener.Remove;
|
|
378
393
|
addWatch: (coords: IRange.Coords, formula: ICalculation.IFormula | string, handlers: WatchAnchor.Handlers, origin?: IRange.CellCoords, options?: WatchAnchor.Options) => IListener.Remove;
|
|
379
394
|
surroundingRegion: (range: IRange.Coords, options?: ICellRange.GetSurroundingOptions) => IRange.Coords;
|
|
380
395
|
getTraverseRegion: (cell: IRange.CellCoords, axis: IRange.Axis, reverse: boolean) => IRange.Coords | null;
|
|
@@ -384,6 +399,7 @@ export declare class Worksheet implements IWorksheet {
|
|
|
384
399
|
applyFilterRuns: (runs: _SheetFilterUtils.FilterRuns, options?: ITransaction.OperationOptions) => void;
|
|
385
400
|
filteredTables: () => ITable[];
|
|
386
401
|
setHyperlinks: (ranges: readonly ISpatialMap.Entry<IHyperlink.Update>[], defaultUpdate?: IHyperlink.Update, options?: ITransaction.OperationOptions) => void;
|
|
402
|
+
setCellControl: (address: ICellRanges.Address, control: ICellControl.JSON | null, options?: ITransaction.OperationOptions) => ICellControl | null;
|
|
387
403
|
setErrorIgnored: (ranges: readonly IRange.Coords[], check: ICell.ErrorCheck, ignored: boolean, options?: ITransaction.OperationOptions) => void;
|
|
388
404
|
setComments: (ranges: readonly ISpatialMap.Entry<IComment.Update>[], comments?: IComment.Update | IComment.JSON, options?: ITransaction.OperationOptions) => void;
|
|
389
405
|
getBoundsAtCoords: (coords: IRange.Coords) => Bounds;
|
|
@@ -535,6 +551,8 @@ export declare class Worksheet implements IWorksheet {
|
|
|
535
551
|
invalidateUsedCoords: () => void;
|
|
536
552
|
validateCoords: (coords: IRange.Coords, oobMessage?: string, allowOutOfBounds?: boolean) => void;
|
|
537
553
|
protectionCheck: (check?: ProtectionCheck | null, coords?: Readonly<IRange.Coords> | readonly IRange.Coords[] | null, action?: string | null) => void;
|
|
554
|
+
assertContentEditable: (ranges: readonly IRange.Coords[], viaRanges?: boolean) => boolean;
|
|
555
|
+
isMoveRuled: () => boolean;
|
|
538
556
|
getDefaultShiftAxis: (coords?: IRange.Coords) => IRange.Axis;
|
|
539
557
|
processLayoutChange: () => void;
|
|
540
558
|
/** The movables' by-model index as a shift left it, or `null` if the shift moved none. */
|
|
@@ -568,6 +586,7 @@ export declare class Worksheet implements IWorksheet {
|
|
|
568
586
|
readonly isDataColumn: boolean;
|
|
569
587
|
readonly strings: IStringCollection;
|
|
570
588
|
readonly lists: ScalarListFactory;
|
|
589
|
+
readonly richData: IRichDataKind.Context;
|
|
571
590
|
readonly cellOptions: SheetCellOptions;
|
|
572
591
|
readonly runtime: IRuntime;
|
|
573
592
|
getProtection: () => IWorksheetProtection;
|
|
@@ -646,7 +665,7 @@ export declare class Worksheet implements IWorksheet {
|
|
|
646
665
|
autoFit: (ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions, holdWhileLoading?: boolean) => void;
|
|
647
666
|
getBestFit: (range: IRange.Coords, options?: ICellRange.BestFitOptions) => Size;
|
|
648
667
|
invalidateRendering: (axes?: IRange.AxisSelection | null) => void;
|
|
649
|
-
addListenerNode: (ranges: readonly IRange.Coords[], listener: ICellRange.Listener
|
|
668
|
+
addListenerNode: (ranges: readonly IRange.Coords[], listener: ICellRange.Listener<any>, options?: ICellRange.ListenerOptions, collection?: boolean) => IListener.Remove;
|
|
650
669
|
addWatch: (coords: IRange.Coords, formula: ICalculation.IFormula | string, handlers: WatchAnchor.Handlers, origin?: IRange.CellCoords, options?: WatchAnchor.Options) => IListener.Remove;
|
|
651
670
|
surroundingRegion: (range: IRange.Coords, options?: ICellRange.GetSurroundingOptions) => IRange.Coords;
|
|
652
671
|
getTraverseRegion: (cell: IRange.CellCoords, axis: IRange.Axis, reverse: boolean) => IRange.Coords | null;
|
|
@@ -656,6 +675,7 @@ export declare class Worksheet implements IWorksheet {
|
|
|
656
675
|
applyFilterRuns: (runs: _SheetFilterUtils.FilterRuns, options?: ITransaction.OperationOptions) => void;
|
|
657
676
|
filteredTables: () => ITable[];
|
|
658
677
|
setHyperlinks: (ranges: readonly ISpatialMap.Entry<IHyperlink.Update>[], defaultUpdate?: IHyperlink.Update, options?: ITransaction.OperationOptions) => void;
|
|
678
|
+
setCellControl: (address: ICellRanges.Address, control: ICellControl.JSON | null, options?: ITransaction.OperationOptions) => ICellControl | null;
|
|
659
679
|
setErrorIgnored: (ranges: readonly IRange.Coords[], check: ICell.ErrorCheck, ignored: boolean, options?: ITransaction.OperationOptions) => void;
|
|
660
680
|
setComments: (ranges: readonly ISpatialMap.Entry<IComment.Update>[], comments?: IComment.Update | IComment.JSON, options?: ITransaction.OperationOptions) => void;
|
|
661
681
|
getBoundsAtCoords: (coords: IRange.Coords) => Bounds;
|
|
@@ -870,7 +890,7 @@ export declare class Worksheet implements IWorksheet {
|
|
|
870
890
|
protected _realizeCalcedValues(results: ICalcGrid.Results): void;
|
|
871
891
|
/**
|
|
872
892
|
* Tell listener nodes what calculation passes realized. A pass belongs to no commit, so the
|
|
873
|
-
* event carries
|
|
893
|
+
* event carries none: a `'data'` change with a `null` commit.
|
|
874
894
|
* @internal
|
|
875
895
|
*/
|
|
876
896
|
protected _notifyPassToListenerNodes(ranges: readonly IRange.Coords[]): void;
|
|
@@ -1077,8 +1097,17 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1077
1097
|
* @internal
|
|
1078
1098
|
*/
|
|
1079
1099
|
protected _getBestFit(range: IRange.Coords, options?: ICellRange.BestFitOptions): Size;
|
|
1080
|
-
/**
|
|
1081
|
-
|
|
1100
|
+
/**
|
|
1101
|
+
* The event one delivery hands a listener.
|
|
1102
|
+
*
|
|
1103
|
+
* @param coords Where the node is now; `null` when this snapshot does not hold it.
|
|
1104
|
+
* @param changed The cells a `'data'` change reached, for {@link ICellRange.Event.getRanges}.
|
|
1105
|
+
* @param previous Where the node was before an `'address'` move, for
|
|
1106
|
+
* {@link ICellRange.Event.getPreviousAddress}.
|
|
1107
|
+
*
|
|
1108
|
+
* @internal
|
|
1109
|
+
*/
|
|
1110
|
+
protected _createRangeEvent(coords: readonly IRange.FixableCoords[] | null, options: RangeEventOptions, changed?: readonly IRange.FixableCoords[], previous?: readonly IRange.FixableCoords[] | null): ICellRange.Event<ICellRange | ICellRanges>;
|
|
1082
1111
|
/**
|
|
1083
1112
|
* Register a reference node for a range listener.
|
|
1084
1113
|
*
|
|
@@ -1093,12 +1122,15 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1093
1122
|
*
|
|
1094
1123
|
* @internal
|
|
1095
1124
|
*/
|
|
1096
|
-
protected _addListenerNode(ranges: readonly IRange.Coords[], listener: ICellRange.Listener
|
|
1125
|
+
protected _addListenerNode(ranges: readonly IRange.Coords[], listener: ICellRange.Listener<any>, options?: ICellRange.ListenerOptions, collection?: boolean): IListener.Remove;
|
|
1097
1126
|
/**
|
|
1098
1127
|
* {@link _addListenerNode}, also handing back the node, for a caller that reads its coords.
|
|
1128
|
+
*
|
|
1129
|
+
* @param collection The listener registered on an `ICellRanges`, and is handed one as its
|
|
1130
|
+
* source; otherwise it registered on one range and is handed a range.
|
|
1099
1131
|
* @internal
|
|
1100
1132
|
*/
|
|
1101
|
-
protected _registerListenerNode(ranges: readonly IRange.Coords[], listener: ICellRange.Listener
|
|
1133
|
+
protected _registerListenerNode(ranges: readonly IRange.Coords[], listener: ICellRange.Listener<any>, options?: ICellRange.ListenerOptions, createNode?: (options: ListenerAnchor.ConstructorOptions) => ListenerAnchor, collection?: boolean): {
|
|
1102
1134
|
node: ListenerAnchor;
|
|
1103
1135
|
remove: IListener.Remove;
|
|
1104
1136
|
};
|
|
@@ -1254,7 +1286,7 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1254
1286
|
*
|
|
1255
1287
|
* @internal
|
|
1256
1288
|
*/
|
|
1257
|
-
protected _deliverToNode(entry: ListenerNodeEntry, trigger:
|
|
1289
|
+
protected _deliverToNode(entry: ListenerNodeEntry, trigger: ICellRange.Event.Trigger, notificationOptions: NotifierOptions, changed?: readonly IRange.Coords[], previous?: readonly IRange.Coords[] | null): void;
|
|
1258
1290
|
/** @internal */
|
|
1259
1291
|
protected _notifyUsedRangeChange(): void;
|
|
1260
1292
|
/** @internal */
|
|
@@ -1297,6 +1329,8 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1297
1329
|
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
1298
1330
|
protected _notifyProtectedRangesChange(): void;
|
|
1299
1331
|
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
1332
|
+
protected _notifyCellControlsChange(): void;
|
|
1333
|
+
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
1300
1334
|
protected _notifyCommentsChange(): void;
|
|
1301
1335
|
/**
|
|
1302
1336
|
* Presents one of the sheet's own events as a collection's `onCollectionChange`, and the
|
|
@@ -1307,7 +1341,7 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1307
1341
|
* it. Forwarding, rather than a second emitter, is what keeps the two from drifting apart.
|
|
1308
1342
|
* @internal
|
|
1309
1343
|
*/
|
|
1310
|
-
protected _forwardCollectionListeners(key: 'onTablesChange' | 'onConditionalFormatsChange' | 'onDataValidationsChange' | 'onProtectedRangesChange' | 'onCommentsChange', collection: () => ICollection<any>): (listeners: ICollection.IListeners, options?: IListener.Options) => IListener.Remove;
|
|
1344
|
+
protected _forwardCollectionListeners(key: 'onTablesChange' | 'onConditionalFormatsChange' | 'onDataValidationsChange' | 'onProtectedRangesChange' | 'onCellControlsChange' | 'onCommentsChange', collection: () => ICollection<any>): (listeners: ICollection.IListeners, options?: IListener.Options) => IListener.Remove;
|
|
1311
1345
|
/** {@inheritDoc IWorksheet.addListeners} */
|
|
1312
1346
|
addListeners(listeners: IWorksheet.IListeners, options?: IListener.Options): IListener.Remove;
|
|
1313
1347
|
/** @internal */
|
|
@@ -1594,6 +1628,19 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1594
1628
|
* @internal
|
|
1595
1629
|
*/
|
|
1596
1630
|
protected _isProtectionRuled(): boolean;
|
|
1631
|
+
/**
|
|
1632
|
+
* Refuse a content write on a locked sheet unless every cell of `ranges` is editable, by
|
|
1633
|
+
* {@link ICell.isEditAllowed}'s rule: an always-unlocked style, or a covering protected range that
|
|
1634
|
+
* is unlocked (a password-gated one only after `unlock`). Answered per stored block over the
|
|
1635
|
+
* blocks {@link ICellRange.getRegions | getRegions(Unlock)} walks, never per cell.
|
|
1636
|
+
*
|
|
1637
|
+
* @param viaRanges Whether an unlocked protected range makes a cell editable. A cut asks for the
|
|
1638
|
+
* cell's own style alone, as Excel does.
|
|
1639
|
+
* @returns Whether the sheet is locked. A locked sheet's caller then writes content only (no
|
|
1640
|
+
* formats) and stands the commit-time catch-all down, since this has ruled.
|
|
1641
|
+
* @internal
|
|
1642
|
+
*/
|
|
1643
|
+
protected _assertContentEditable(ranges: readonly IRange.Coords[], viaRanges?: boolean): boolean;
|
|
1597
1644
|
/**
|
|
1598
1645
|
* Record that this commit is a load of the sheet: not a user's write, so the protection check
|
|
1599
1646
|
* stands down, and not an edit, so nothing it wrote is announced. See {@link IntentInitial}.
|
|
@@ -1854,23 +1901,6 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1854
1901
|
setPicture(picture: string | IResource | IResourceCollection.AddOptions | null, options?: ITransaction.OperationOptions): this;
|
|
1855
1902
|
/** {@inheritDoc IWorksheet.getPicture} */
|
|
1856
1903
|
getPicture(): IPicture | null;
|
|
1857
|
-
/** {@inheritDoc IWorksheet.getDataTables} */
|
|
1858
|
-
getDataTables(): IDataTableCollection;
|
|
1859
|
-
/**
|
|
1860
|
-
* An edit to cell data, here or on any sheet, can change what every data table in the workbook
|
|
1861
|
-
* would calculate, and nothing recalculates their results. Marks each to be recalculated by Excel
|
|
1862
|
-
* when it opens the file ({@link IDataTable.JSON.calculateAlways}).
|
|
1863
|
-
*
|
|
1864
|
-
* TODO - A stand-in until the engine evaluates `TABLE`. A data table is a calculation: each result
|
|
1865
|
-
* is the table's formula evaluated with that cell's row and column values put in the input cells.
|
|
1866
|
-
* The engine should own it like an array block, its dependencies being the formula's plus the
|
|
1867
|
-
* input cells and the row and column values, and recalculate it when one changes. Its results
|
|
1868
|
-
* are then never stale, `calculateAlways` stays as read, and this method and
|
|
1869
|
-
* `DataTable._markStale` go. Until then it marks every table on any data edit, because which
|
|
1870
|
-
* cells the formula depends on is only known to the engine.
|
|
1871
|
-
* @internal
|
|
1872
|
-
*/
|
|
1873
|
-
protected _markDataTablesStale(): void;
|
|
1874
1904
|
/** {@inheritDoc IWorksheet.getPivotTables} */
|
|
1875
1905
|
getPivotTables(): IPivotTableCollection;
|
|
1876
1906
|
/** {@inheritDoc IWorksheet.getTables} */
|
|
@@ -1881,6 +1911,8 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1881
1911
|
getConditionalFormats(): IConditionalFormatCollection;
|
|
1882
1912
|
/** {@inheritDoc IWorksheet.getProtectedRanges} */
|
|
1883
1913
|
getProtectedRanges(): IProtectedRangeCollection;
|
|
1914
|
+
/** {@inheritDoc IWorksheet.getCellControls} */
|
|
1915
|
+
getCellControls(): ICellControlCollection;
|
|
1884
1916
|
/** {@inheritDoc IWorksheet.getComments} */
|
|
1885
1917
|
getComments(): ICommentCollection;
|
|
1886
1918
|
/** @deprecated Use {@link IWorksheet.getConditionalFormats} */
|
|
@@ -1922,7 +1954,7 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1922
1954
|
toJSON(): J | null;
|
|
1923
1955
|
}, J extends object>(add: ICellRanges.Address | T | null | undefined, options: (IAnchored.AddOptions & J) | undefined, spec: {
|
|
1924
1956
|
/** The sheet-state slot the collection lives in. */
|
|
1925
|
-
key: 'conditionalFormats' | 'dataValidations' | 'protectedRanges' | 'comments';
|
|
1957
|
+
key: 'conditionalFormats' | 'dataValidations' | 'protectedRanges' | 'cellControls' | 'comments';
|
|
1926
1958
|
/**
|
|
1927
1959
|
* The sheet-protection allowances the add needs. Empty when no option allows it, so the add is
|
|
1928
1960
|
* refused whenever the sheet is locked.
|
|
@@ -1962,6 +1994,23 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1962
1994
|
* @internal
|
|
1963
1995
|
*/
|
|
1964
1996
|
protected _addProtectedRange(add: ICellRanges.Address | IProtectedRange, options?: IProtectedRangeCollection.AddOptions): IProtectedRange;
|
|
1997
|
+
/**
|
|
1998
|
+
* @internal
|
|
1999
|
+
*/
|
|
2000
|
+
protected _addCellControl(address: ICellRanges.Address, control: ICellControl.JSON, options?: ITransaction.OperationOptions): ICellControl;
|
|
2001
|
+
/**
|
|
2002
|
+
* Makes `control` the control of every cell of `address`, or removes the cells' controls when
|
|
2003
|
+
* it is `null`. The write behind `ICellRange.setControl` and `ICellControlCollection.add`.
|
|
2004
|
+
*
|
|
2005
|
+
* @returns The control placed, or `null` for a removal.
|
|
2006
|
+
*
|
|
2007
|
+
* @remarks
|
|
2008
|
+
* A cell has at most one control, so the cells leave whatever control they had. They join a
|
|
2009
|
+
* control of the same definition when the sheet already has one, so repeated writes do not mint
|
|
2010
|
+
* a control each.
|
|
2011
|
+
* @internal
|
|
2012
|
+
*/
|
|
2013
|
+
protected _setCellControl(address: ICellRanges.Address, control: ICellControl.JSON | null, options?: ITransaction.OperationOptions): ICellControl | null;
|
|
1965
2014
|
/**
|
|
1966
2015
|
* @internal
|
|
1967
2016
|
*/
|
|
@@ -2106,6 +2155,8 @@ export declare class Worksheet implements IWorksheet {
|
|
|
2106
2155
|
protected _createConditionalFormats(conditionalFormats: IAnchoredMap<IConditionalFormat, IConditionalFormat.JSON>, key: keyof State, refs: IRange.JSONReference<IConditionalFormat.JSON>[], createModel: (options: ConditionalFormat.ConstructorOptions) => IConditionalFormat, addListeners?: (model: IConditionalFormat) => IListener.Remove): IAnchoredMap<IConditionalFormat, IConditionalFormat.JSON>;
|
|
2107
2156
|
/** @internal */
|
|
2108
2157
|
protected _createProtectedRanges(protectedRanges: IAnchoredMap<IProtectedRange, IProtectedRange.JSON>, key: keyof State, refs: IRange.JSONReference<IProtectedRange.JSON>[], createModel: (options: ProtectedRange.ConstructorOptions) => IProtectedRange, addListeners?: (model: IProtectedRange) => IListener.Remove): IAnchoredMap<IProtectedRange, IProtectedRange.JSON>;
|
|
2158
|
+
/** @internal */
|
|
2159
|
+
protected _createCellControls(cellControls: IAnchoredMap<ICellControl, ICellControl.JSON>, key: keyof State, refs: IRange.JSONReference<ICellControl.JSON>[], createModel: (options: CellControl.ConstructorOptions) => ICellControl): IAnchoredMap<ICellControl, ICellControl.JSON>;
|
|
2109
2160
|
/**
|
|
2110
2161
|
* Loads the pivot tables into their anchored map, each anchored where its part says it sits.
|
|
2111
2162
|
* The map moves and deletes them with structural edits; the table itself rules on the edit
|
|
@@ -2113,13 +2164,6 @@ export declare class Worksheet implements IWorksheet {
|
|
|
2113
2164
|
* @internal
|
|
2114
2165
|
*/
|
|
2115
2166
|
protected _createPivotTables(pivotTables: IAnchoredMap<IPivotTable, IPivotTable.JSON>, key: keyof State, refs: IRange.JSONReference<IPivotTable.JSON>[], fromResourceId?: (resourceId: number) => IResource): IAnchoredMap<IPivotTable, IPivotTable.JSON>;
|
|
2116
|
-
/**
|
|
2117
|
-
* Loads the data tables into their anchored map, each anchored on its result cells, its input
|
|
2118
|
-
* cells held in the engine. The table rules on structural edits itself
|
|
2119
|
-
* (`DataTable._processContainerShift`).
|
|
2120
|
-
* @internal
|
|
2121
|
-
*/
|
|
2122
|
-
protected _createDataTables(dataTables: IAnchoredMap<IDataTable, IDataTable.JSON>, key: keyof State, refs: IRange.JSONReference<IDataTable.JSON>[]): IAnchoredMap<IDataTable, IDataTable.JSON>;
|
|
2123
2167
|
/** @internal */
|
|
2124
2168
|
protected _createComments(comments: IAnchoredMap<IComment, IComment.JSON>, key: keyof State, refs: IRange.JSONReference<IComment.JSON>[], createModel: (options: Comment.ConstructorOptions) => IComment, addListeners?: (model: IComment) => IListener.Remove): IAnchoredMap<IComment, IComment.JSON>;
|
|
2125
2169
|
/**
|
|
@@ -2184,26 +2228,16 @@ export declare class Worksheet implements IWorksheet {
|
|
|
2184
2228
|
*/
|
|
2185
2229
|
export declare function createCellRangeCounts(counts: Readonly<Record<ICellRange.Feature, number>>): ICellRange.Counts;
|
|
2186
2230
|
/**
|
|
2187
|
-
*
|
|
2188
|
-
*
|
|
2231
|
+
* The change a round of listener deliveries reports; what each delivery adds is
|
|
2232
|
+
* {@link RangeEventOptions}.
|
|
2189
2233
|
* @internal
|
|
2190
2234
|
*/
|
|
2191
2235
|
interface NotifierOptions {
|
|
2192
|
-
/**
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
*
|
|
2196
|
-
* @defaultValue `#REF!`
|
|
2197
|
-
*/
|
|
2198
|
-
invalidError?: string;
|
|
2199
|
-
isDataChange?: boolean;
|
|
2200
|
-
getTransactionId: () => string;
|
|
2236
|
+
/** The commit that made the change; `null` for a calculation pass, which belongs to none. */
|
|
2237
|
+
commit: ITransaction.ICommit | null;
|
|
2238
|
+
/** The change is an undo. */
|
|
2201
2239
|
isUndo?: boolean;
|
|
2202
|
-
|
|
2203
|
-
trigger?: string;
|
|
2204
|
-
/** Spell the source with its sheet qualifier (a workbook range), as the listener registered it. */
|
|
2205
|
-
qualified?: boolean;
|
|
2206
|
-
from?: ICellRanges;
|
|
2240
|
+
/** When the change was made; now, when omitted. */
|
|
2207
2241
|
timeStamp?: number;
|
|
2208
2242
|
}
|
|
2209
2243
|
interface TableColumnHeaders {
|
|
@@ -2219,11 +2253,31 @@ interface TableColumnHeaders {
|
|
|
2219
2253
|
* A live range listener: its node in the versioned map, and the callback the map must never hold.
|
|
2220
2254
|
* @internal
|
|
2221
2255
|
*/
|
|
2256
|
+
/**
|
|
2257
|
+
* What one delivery adds to the change it reports.
|
|
2258
|
+
* @internal
|
|
2259
|
+
*/
|
|
2260
|
+
interface RangeEventOptions extends NotifierOptions {
|
|
2261
|
+
trigger: ICellRange.Event.Trigger;
|
|
2262
|
+
/** Spell the source with its sheet qualifier (a workbook range), as the listener registered it. */
|
|
2263
|
+
qualified?: boolean;
|
|
2264
|
+
/** Hand the source as an `ICellRanges`, as the listener registered on one. */
|
|
2265
|
+
collection?: boolean;
|
|
2266
|
+
/**
|
|
2267
|
+
* Which error an invalid source reports - `#REF!` when the cells were deleted, `#N/A` when the
|
|
2268
|
+
* world predates the listener.
|
|
2269
|
+
*
|
|
2270
|
+
* @defaultValue `#REF!`
|
|
2271
|
+
*/
|
|
2272
|
+
invalidError?: string;
|
|
2273
|
+
}
|
|
2222
2274
|
interface ListenerNodeEntry {
|
|
2223
2275
|
node: ListenerAnchor;
|
|
2224
|
-
handler: ICellRange.Listener | null;
|
|
2225
|
-
handlerW: WeakRef<ICellRange.Listener
|
|
2276
|
+
handler: ICellRange.Listener<any> | null;
|
|
2277
|
+
handlerW: WeakRef<ICellRange.Listener<any>> | null;
|
|
2226
2278
|
options: ICellRange.ListenerOptions;
|
|
2279
|
+
/** Registered on an `ICellRanges`: the source is handed as one. */
|
|
2280
|
+
collection: boolean;
|
|
2227
2281
|
/** The coords last delivered, so a restore can tell whether the reference moved. */
|
|
2228
2282
|
lastCoords: IRange.Coords[] | null;
|
|
2229
2283
|
/**
|