@sheetxl/sdk 0.8.0-beta.15 → 0.8.0-beta.16
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/LICENSE.md +8 -7
- package/browser/esm/4MbBwfmW2hDXk9_w.mjs +165 -0
- package/browser/esm/{zjEXdQiQruTkUyf5.mjs → 9YWdxmSjzLN4j_ts.mjs} +22 -22
- package/browser/esm/B6BdiHigbUdbZp3J.mjs +686 -0
- package/browser/esm/{D8PxKK6OrmancpLT.mjs → BF_QwkZ_hs2rFoTT.mjs} +3 -3
- package/browser/esm/{Do8TQqQvnFXRlFu-.mjs → BMo2_9Ul36IwRm3S.mjs} +3 -3
- package/browser/esm/{DDQtExVGSoCzAf6-.mjs → BWY1qiidTUBVPJoD.mjs} +506 -502
- package/browser/esm/{DA4S5eqog20pG7b2.mjs → Bf80epSsm_RyAOb9.mjs} +29 -29
- package/browser/esm/{FHp0QfwZMIfP0Sry.mjs → BfoE6Dn_GQCIkQD3.mjs} +2 -2
- package/browser/esm/{D4ZCoKyNCJvDQAkx.mjs → BlMYYQZP-QM-iBHz.mjs} +23 -22
- package/browser/esm/{CWyzk_3eDCR9bKq6.mjs → BqT-ASHP0NVSUUnY.mjs} +1528 -1433
- package/browser/esm/{DwH4H_p6gTAcpQ17.mjs → BtNuoQIrrHw_jnbJ.mjs} +4 -4
- package/browser/esm/BxFzcCYhvo9NXFjC.mjs +527 -0
- package/browser/esm/{BsGN0Tk0jVc2n0hy.mjs → BxYuRTSF9ykc-Tpz.mjs} +3 -3
- package/browser/esm/{KgTozk3nvOZzEG27.mjs → C2PvZwqK-uvsugVS.mjs} +2 -2
- package/browser/esm/C3JOjQwdG9kAig7i.mjs +2017 -0
- package/browser/esm/{Blo0Hwg2ojXt99Dl.mjs → C5x0EzqElYGTiTQc.mjs} +2 -2
- package/browser/esm/{Bbrhl946_QbCz5WS.mjs → CMChv-fCFh68VQQt.mjs} +588 -587
- package/browser/esm/{Cl3jq6y4Idilod82.mjs → CRbQATfI0yZxe1kX.mjs} +3 -3
- package/browser/esm/{CxhXbk-5XhaK8UNs.mjs → CUu3zeHqcwMRYiov.mjs} +2 -2
- package/browser/esm/{CNM5d4p0Y7In0rTf.mjs → C_jLGkFemj55_BP3.mjs} +3 -3
- package/browser/esm/{BGPT-k25jo0UhtT5.mjs → CkZoDPUCK5jMUaeJ.mjs} +26901 -22016
- package/browser/esm/{DMbcmIZ-G2fbWn8v.mjs → D-iHJ3q4nwOLcn1D.mjs} +2 -2
- package/browser/esm/{KsfZhE6ocmYobGjY.mjs → D807piM0VSokWz-L.mjs} +2 -2
- package/browser/esm/{BVsG6Vpvb1ZzpURJ.mjs → DW3oQ39IF0bsc_lm.mjs} +2 -2
- package/browser/esm/{BzG0p8RdGDWHttVr.mjs → DcB52JPBPmkc3l1m.mjs} +4 -4
- package/browser/esm/{CZ_ZPliIkoh8BViV.mjs → DlVnybrgwZWxWN3_.mjs} +10 -10
- package/browser/esm/{CqzKBrmmV-fWRoK7.mjs → DvVhatd0J1ch3OCO.mjs} +22 -22
- package/browser/esm/{tm7XJ-Zd_04xWKG6.mjs → Dx9Fya60meMpuHqm.mjs} +2 -2
- package/browser/esm/{Blo0jHze0bQxnKh4.mjs → HV0FkJ6k3Ils318J.mjs} +78 -78
- package/browser/esm/{DJNLo8Rd_5UQP0U5.mjs → JV9Szh5qTssjxJoE.mjs} +2 -2
- package/browser/esm/{D0KMmRjGOQUs7Ls-.mjs → KpuD1kEcWB7cT0VM.mjs} +3 -3
- package/browser/esm/{Bw66vzKThXKvXvPI.mjs → U4FL-QeC0bRUhTEo.mjs} +2 -2
- package/browser/esm/{Dp4OIVjjAVhpD815.mjs → WLlpmgLN5OVLoLrC.mjs} +3 -3
- package/browser/esm/{D6OqcO9IWPaY211T.mjs → WR146UAqrsUsL39e.mjs} +2 -2
- package/browser/esm/{CPUobTehcKZllBDS.mjs → WcHfawW2lkTHtWUd.mjs} +51 -49
- package/browser/esm/{XrasOsWQ-64jwMn1.mjs → Zp5-cTJ0Llb6EfGi.mjs} +4 -4
- package/browser/esm/{CMSeF5rGzeuMUydM.mjs → ad9PX897hYE4Srkc.mjs} +3 -3
- package/browser/esm/{CIab4UYcHQQKTHeD.mjs → d_t-7d5BD1AdHg3u.mjs} +404 -404
- package/browser/esm/{L7SKr6r1tmMwFx6Q.mjs → dwGdnbV-CykjNrlm.mjs} +2 -2
- package/browser/esm/{DpaqR081c-Q7WemN.mjs → e69NcYnKMLnAmqyA.mjs} +2 -2
- package/browser/esm/index.mjs +886 -578
- package/browser/esm/{BN1MW1nuBndrzryn.mjs → r-o0UCm7KtluNmyK.mjs} +3 -3
- package/licenses/dependencies.txt +69 -69
- package/node/esm/{DjsOfZn5vYpB7L6U.mjs → 446KYBjJQa8g-8Gg.mjs} +52 -50
- package/node/esm/{BlHlBRvKGt-4CS0A.mjs → 5OfKfTRX2_y2NwpU.mjs} +2 -2
- package/node/esm/{BRnNpoS8VpkAhdVk.mjs → A3PEHO1HJvkHfb5n.mjs} +2 -2
- package/node/esm/{ZtF9EuipL7Z9Iwfs.mjs → B4WUGzJBkQu7BXRm.mjs} +2 -2
- package/node/esm/{DKdFasYVvjAitASZ.mjs → BH8J6vKSO5zI_TWo.mjs} +2 -2
- package/node/esm/BLmdKnkLwkb3wWe6.mjs +2040 -0
- package/node/esm/{D9RwzPR5s2mWrbCQ.mjs → BZSxu_ZqX8-Uczzn.mjs} +2 -2
- package/node/esm/{-afI0SRg_vgXtea7.mjs → BfPBiAgVmWhuFgFP.mjs} +3 -3
- package/node/esm/{OnkJkCGFDjamqIUQ.mjs → Bknw7zWZhl2-w1pi.mjs} +3 -3
- package/node/esm/{BNiG1ISiMjs-G2mE.mjs → BvIPsPiHhMclZ1kH.mjs} +22 -22
- package/node/esm/{B07QPde9GloqsW8e.mjs → By2TFKOjA1HekZap.mjs} +4 -4
- package/node/esm/{D9zb5xVRehABdbXL.mjs → BywIhvYkWk2o7MSW.mjs} +2 -2
- package/node/esm/{BZ0IRjh2hYuI86xW.mjs → C3zyhnMwQ2hRQBz7.mjs} +31 -30
- package/node/esm/{DVejVdSBXzAFQbqo.mjs → C884edhUf9yMqpPp.mjs} +2 -2
- package/node/esm/{DDIiQZTdeY4vdK8_.mjs → CDHY-0OyQ9348Brb.mjs} +189 -189
- package/node/esm/{BlzPuXtKvF3Qfr0p.mjs → CERNLhFrAwtu_p-q.mjs} +2 -2
- package/node/esm/{BfXLtDqsXXYeZ6LX.mjs → CFkX_Cn6avQqQiVC.mjs} +78 -78
- package/node/esm/CJDV8P3hI8lu--3Z.mjs +530 -0
- package/node/esm/{C6b4rM62pIWIywlM.mjs → CKwiipdPJGzAiPjg.mjs} +2 -2
- package/node/esm/{DUft-qpAS4MMANwG.mjs → CLtUMJfKsy4SevWE.mjs} +3 -3
- package/node/esm/{Cx9nQSsuyqhayyBS.mjs → CVPieTgKCwkL21nD.mjs} +32752 -27295
- package/node/esm/{DW3u4bBJIUaHZ6m-.mjs → C_fYuynP2a_70WdL.mjs} +2 -2
- package/node/esm/{C-JEySqMuKdpcKe0.mjs → CgdNA3B_GFG_yJiN.mjs} +3 -3
- package/node/esm/Cs3ibv6YHCDwLRlk.mjs +115 -0
- package/node/esm/{CjwmkzMtjj6OMJbO.mjs → Cxak8i2NidZ4Uv6v.mjs} +487 -483
- package/node/esm/{MtRwC1PMkOEb1Nty.mjs → D88A3UpCyGRjcX3U.mjs} +3 -3
- package/node/esm/{B8KEX44VZTFTTKb3.mjs → DBIUe2BC9xU7qMHR.mjs} +3 -3
- package/node/esm/{C7h7SvhWNwQ9TfGh.mjs → DELfV5HQZo1mInBd.mjs} +4 -4
- package/node/esm/{WBHD7ECKG6HZ5UpY.mjs → DOt3t-13tsnM7Fj6.mjs} +2 -2
- package/node/esm/{BqvqbFsPQB0gEvwF.mjs → DfWc3nW_Z_qqc_Wf.mjs} +1762 -1674
- package/node/esm/DgnwKbUEyQN5_gWT.mjs +169 -0
- package/node/esm/{D7ia4o3y5Wvl__9Y.mjs → Dhv9JymnXqcF54oo.mjs} +2 -2
- package/node/esm/{CHBlLTJaoPUVxA2J.mjs → DvtyKKzOnoOM80NB.mjs} +22 -22
- package/node/esm/{Dh8o-woVpmUL50BD.mjs → KDGrIa9R5XzWfjM2.mjs} +2 -2
- package/node/esm/{DyIASfKKPuNl5Xx-.mjs → RTwm9ge1KoPdlBNt.mjs} +2 -2
- package/node/esm/{DQqXPS05dvF0F-gh.mjs → _RIAmJI98l6bIFfZ.mjs} +2 -2
- package/node/esm/{j8DqCwPgfIPICFtf.mjs → bIGdvfpnijWeCac6.mjs} +1005 -1004
- package/node/esm/index.mjs +913 -598
- package/node/esm/kaiXmn0AA5WDsLPo.mjs +199 -0
- package/node/esm/{Ddd1y3TP0kqnnSs7.mjs → mTIhoz1gEcaEm7s1.mjs} +3 -3
- package/package.json +7 -7
- package/resources/locales/de/model.msg.json +82 -1
- package/resources/locales/en/model.msg.json +80 -1
- package/types/scripting-api.json +9967 -9497
- package/types/scripting-enums.json +27 -0
- package/types/scripting.d.ts +2282 -166
- package/types/src/.generated/wasm/sdk.d.ts +332 -0
- package/types/src/calculation/Calculation.d.ts +8 -0
- package/types/src/calculation/ICalculation.d.ts +51 -0
- package/types/src/calculation/compiler/Types.d.ts +5 -0
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +1 -1
- package/types/src/calculation/formula/FormulaBlock.d.ts +2 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +18 -0
- package/types/src/calculation/grid/CalcGrid.d.ts +5 -1
- package/types/src/calculation/grid/CalcGridBackend.d.ts +36 -1
- package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -0
- package/types/src/calculation/grid/CalcGridUtils.d.ts +4 -2
- package/types/src/calculation/grid/FormulaHost.d.ts +3 -1
- package/types/src/calculation/grid/ICalcGrid.d.ts +88 -0
- package/types/src/calculation/grid/_CalcRequest.d.ts +9 -0
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +2 -0
- package/types/src/calculation/spatial/SpillEntry.d.ts +55 -4
- package/types/src/calculation/state/CalcNode.d.ts +6 -3
- package/types/src/calculation/state/CalculationContext.d.ts +4 -2
- package/types/src/calculation/state/_PivotView.d.ts +22 -0
- package/types/src/cell/ICell.d.ts +1 -21
- package/types/src/cellRange/ICellRange.d.ts +18 -2
- package/types/src/collections/MixedTypedArrayList.d.ts +16 -2
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +10 -0
- package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +3 -0
- package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +3 -0
- package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +3 -0
- package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +3 -0
- package/types/src/condition/BuiltInOperators/MatchesOperator.d.ts +10 -0
- package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/index.d.ts +2 -0
- package/types/src/condition/Condition.d.ts +1 -0
- package/types/src/condition/ICondition.d.ts +15 -0
- package/types/src/condition/_ConditionUtils.d.ts +14 -0
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +2 -1
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +4 -3
- package/types/src/license/LicenseDetails.d.ts +27 -0
- package/types/src/license/LicenseManager.d.ts +24 -7
- package/types/src/license/_Utils.d.ts +34 -3
- package/types/src/license/index.d.ts +1 -0
- package/types/src/license/runtime.browser.d.ts +32 -4
- package/types/src/license/runtime.node.d.ts +8 -5
- package/types/src/license/summary.d.ts +18 -0
- package/types/src/pivot/IPivotTable.d.ts +1549 -13
- package/types/src/pivot/IPivotTableCollection.d.ts +70 -4
- package/types/src/pivot/PivotCache.d.ts +95 -11
- package/types/src/pivot/PivotDataField.d.ts +73 -0
- package/types/src/pivot/PivotField.d.ts +142 -0
- package/types/src/pivot/PivotTable.d.ts +548 -14
- package/types/src/pivot/PivotTableCollection.d.ts +18 -3
- package/types/src/pivot/_PivotAreas.d.ts +48 -0
- package/types/src/pivot/_PivotControls.d.ts +140 -0
- package/types/src/pivot/_PivotEngine.d.ts +9 -0
- package/types/src/pivot/_PivotGroups.d.ts +25 -0
- package/types/src/pivot/_PivotItems.d.ts +167 -0
- package/types/src/pivot/_PivotStructure.d.ts +237 -0
- package/types/src/pivot/_PivotStylePreview.d.ts +21 -0
- package/types/src/pivot/_PivotUtils.d.ts +37 -0
- package/types/src/pivot/engine/PivotAdd.d.ts +37 -0
- package/types/src/pivot/engine/PivotData.d.ts +65 -0
- package/types/src/pivot/engine/PivotEdit.d.ts +45 -0
- package/types/src/pivot/engine/PivotFilters.d.ts +50 -0
- package/types/src/pivot/engine/PivotFormulas.d.ts +72 -0
- package/types/src/pivot/engine/PivotLayout.d.ts +133 -0
- package/types/src/pivot/engine/PivotMove.d.ts +24 -0
- package/types/src/pivot/engine/PivotRefresh.d.ts +87 -0
- package/types/src/pivot/engine/PivotSort.d.ts +26 -0
- package/types/src/pivot/engine/PivotViewBuilder.d.ts +22 -0
- package/types/src/pivot/engine/index.d.ts +15 -0
- package/types/src/pivot/index.d.ts +4 -0
- package/types/src/pivot/kernel/KernelPivot.d.ts +63 -0
- package/types/src/pivot/kernel/_KernelLeaves.d.ts +100 -0
- package/types/src/pivot/kernel/_PivotAxisTree.d.ts +71 -0
- package/types/src/primitives/Range.d.ts +12 -1
- package/types/src/sheet/IWorksheet.d.ts +35 -0
- package/types/src/sheet/SheetCell.d.ts +21 -14
- package/types/src/sheet/SheetRange.d.ts +3 -0
- package/types/src/sheet/Worksheet.d.ts +175 -7
- package/types/src/sheet/_PivotFootprint.d.ts +42 -0
- package/types/src/sheet/_SheetAutoFitUtils.d.ts +12 -1
- package/types/src/sheet/_SheetMutations.d.ts +47 -0
- package/types/src/sheet/_SheetStateTypes.d.ts +11 -0
- package/types/src/sheet/style/SheetCellStyle.d.ts +6 -0
- package/types/src/sheet/style/SheetPivotStyle.d.ts +83 -0
- package/types/src/sheet/style/_IndentUnit.d.ts +14 -0
- package/types/src/sheetHeader/SheetCellHeader.d.ts +1 -1
- package/types/src/slicer/ISlicer.d.ts +114 -34
- package/types/src/slicer/ITimeline.d.ts +61 -0
- package/types/src/slicer/Slicer.d.ts +76 -3
- package/types/src/slicer/_PivotSlicer.d.ts +51 -0
- package/types/src/slicer/index.d.ts +1 -0
- package/types/src/table/AnchoredTable.d.ts +11 -1
- package/types/src/table/ITable.d.ts +5 -6
- package/types/src/table/ITableStyle.d.ts +50 -34
- package/types/src/table/_BuiltInPivotStyles.d.ts +8 -0
- package/types/src/table/_BuiltInTableStyles.d.ts +0 -1
- package/types/src/type/ITypes.d.ts +5 -1
- package/types/src/workbook/IWorkbook.d.ts +8 -2
- package/types/src/workbook/Workbook.d.ts +72 -6
- package/browser/esm/BrHplg4RuI5jOmmr.mjs +0 -357
- package/browser/esm/eImPONkfn5DstmS8.mjs +0 -184
- package/node/esm/03AYPvCda2x9EOlY.mjs +0 -360
- package/node/esm/BmVQRGAijOHzgHmz.mjs +0 -199
- package/node/esm/Dk4KLs5GoRRuD8J4.mjs +0 -115
- package/types/src/pivot/_PivotXml.d.ts +0 -24
- package/types/src/primitives/Grouping.d.ts +0 -65
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { IFormulaContext, IFunction, IRange, Scalar } from '@sheetxl/primitives';
|
|
2
|
+
import { MemberColumnFactory } from './_PivotAxisTree';
|
|
3
|
+
/**
|
|
4
|
+
* Records grouped by rows and by columns, by the Rust pivot kernel (`crates/sheetxl-pivot`) in the
|
|
5
|
+
* sdk's WebAssembly: one pass numbers every prefix of each axis and every crossing of the two, and
|
|
6
|
+
* each built-in aggregate asked for is one more pass over a value leaf.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* ### Not public API
|
|
10
|
+
*
|
|
11
|
+
* Reached as `IFormulaContext.createPivot`; a started engine has the WebAssembly. The keys become
|
|
12
|
+
* item ids on the host, by `UNIQUE`'s rule ({@link Items}), and a value column is written once
|
|
13
|
+
* into a leaf in the WebAssembly's memory. Members, for a function the kernel does not compute,
|
|
14
|
+
* come from a pass that keeps each crossing's records, run the first time one is asked for.
|
|
15
|
+
*/
|
|
16
|
+
export declare class KernelPivot implements IFormulaContext.Pivot {
|
|
17
|
+
private readonly _wasm;
|
|
18
|
+
private readonly _request;
|
|
19
|
+
private readonly _result;
|
|
20
|
+
private readonly _createColumn;
|
|
21
|
+
private readonly _recordCount;
|
|
22
|
+
/** The records, kept or not: every key and value column is this tall. */
|
|
23
|
+
private readonly _n;
|
|
24
|
+
private readonly _rows;
|
|
25
|
+
private readonly _columns;
|
|
26
|
+
/** Per column group, each row group's crossing with it; `Unset` where no record is in both. */
|
|
27
|
+
private readonly _cellsByColumn;
|
|
28
|
+
private readonly _errors;
|
|
29
|
+
private readonly _values;
|
|
30
|
+
private _leafCount;
|
|
31
|
+
/** The pass that kept each crossing's records, once members were asked for. */
|
|
32
|
+
private _withRecords;
|
|
33
|
+
/**
|
|
34
|
+
* The kernel's pivot of the keys.
|
|
35
|
+
*
|
|
36
|
+
* @throws `#VALUE!` when the kernel refuses them: more than {@link MaxFields} key columns on an
|
|
37
|
+
* axis, or more records, groups or crossings than it holds.
|
|
38
|
+
*/
|
|
39
|
+
static create(rows: IRange | null, columns: IRange | null, createColumn: MemberColumnFactory, options?: IFormulaContext.PivotOptions): KernelPivot;
|
|
40
|
+
private static _addFields;
|
|
41
|
+
private static _fillFields;
|
|
42
|
+
private constructor();
|
|
43
|
+
/** @inheritdoc IFormulaContext.Pivot.getRecordCount */
|
|
44
|
+
getRecordCount(): number;
|
|
45
|
+
/** @inheritdoc IFormulaContext.Pivot.getRows */
|
|
46
|
+
getRows(): IFormulaContext.PivotAxis;
|
|
47
|
+
/** @inheritdoc IFormulaContext.Pivot.getColumns */
|
|
48
|
+
getColumns(): IFormulaContext.PivotAxis;
|
|
49
|
+
/** @inheritdoc IFormulaContext.Pivot.getMembers */
|
|
50
|
+
getMembers(values: IRange, row?: IFormulaContext.PivotGroup, column?: IFormulaContext.PivotGroup): IRange | null;
|
|
51
|
+
/** @inheritdoc IFormulaContext.Pivot.getAggregate */
|
|
52
|
+
getAggregate(values: IRange, fn: IFunction, row?: IFormulaContext.PivotGroup, column?: IFormulaContext.PivotGroup): Scalar | null | undefined;
|
|
53
|
+
/** The crossing of a row group and a column group, `Unset` where no record is in both. */
|
|
54
|
+
private _cell;
|
|
55
|
+
private _buffer;
|
|
56
|
+
private _addValues;
|
|
57
|
+
/**
|
|
58
|
+
* One pass for one reducer: per crossing its result. The kernel numbers the crossings the same
|
|
59
|
+
* way on every pass over the same keys, so they index the first pass's.
|
|
60
|
+
*/
|
|
61
|
+
private _run;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=KernelPivot.d.ts.map
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { FormulaError, IRange, Scalar } from '@sheetxl/primitives';
|
|
2
|
+
import { MixedTypedArrayList } from '../../collections/MixedTypedArrayList';
|
|
3
|
+
import { SdkWasmExports } from '../../wasm/sdkWasm';
|
|
4
|
+
export type Request = InstanceType<SdkWasmExports['PivotRequest']>;
|
|
5
|
+
export declare const Type: {
|
|
6
|
+
readonly Blank: 0;
|
|
7
|
+
readonly False: 1;
|
|
8
|
+
readonly True: 2;
|
|
9
|
+
readonly Int32: 3;
|
|
10
|
+
readonly Float64: 4;
|
|
11
|
+
readonly String: 5;
|
|
12
|
+
readonly Error: 6;
|
|
13
|
+
readonly Rich: 7;
|
|
14
|
+
};
|
|
15
|
+
/** Every type a value leaf may hold: width 8 and a type byte per value. */
|
|
16
|
+
export declare const AllTypes = 127;
|
|
17
|
+
export declare const Unset = 4294967295;
|
|
18
|
+
/** The words of one node in the binding's flattened tree: parent, item, depth, first record, records. */
|
|
19
|
+
export declare const NodeStride = 5;
|
|
20
|
+
/** The kernel's reducer (its index in `Reducer::ALL`) for each built-in it computes. */
|
|
21
|
+
export declare const ReducerOf: Readonly<Record<string, number>>;
|
|
22
|
+
/** The variances read a column of numbers only: their sdk functions coerce a logical or text member. */
|
|
23
|
+
export declare const FirstVariance = 7;
|
|
24
|
+
/** The error code a division by zero is stored as: the first entry of every error table. */
|
|
25
|
+
export declare const Div0Code = 0;
|
|
26
|
+
/**
|
|
27
|
+
* Item ids for one key field, by the rule {@link defaultFrequencyKey} keys a group by (`UNIQUE`'s):
|
|
28
|
+
* equal ids, equal keys. Id 0 is the blank, so an unwritten id reads as one.
|
|
29
|
+
*/
|
|
30
|
+
export declare class Items {
|
|
31
|
+
private _next;
|
|
32
|
+
private readonly _numbers;
|
|
33
|
+
private readonly _keys;
|
|
34
|
+
/** Per codec, a string id's item, so a pool string is folded once, not once per record. */
|
|
35
|
+
private readonly _strings;
|
|
36
|
+
/** Each id's value, as first met; id 0 is the blank. */
|
|
37
|
+
readonly values: Scalar[];
|
|
38
|
+
of(value: Scalar | undefined): number;
|
|
39
|
+
/** Writes the ids of a range's values into `ids`, one per record. */
|
|
40
|
+
fill(range: IRange, ids: Uint32Array): void;
|
|
41
|
+
private _number;
|
|
42
|
+
private _run;
|
|
43
|
+
}
|
|
44
|
+
/** The errors a value leaf stores by code; code 0 is `#DIV/0!`. */
|
|
45
|
+
export declare class Errors {
|
|
46
|
+
readonly table: FormulaError.Known[];
|
|
47
|
+
private readonly _codes;
|
|
48
|
+
codeOf(error: FormulaError.Known): number;
|
|
49
|
+
}
|
|
50
|
+
/** A value column in the request: its leaf, what it holds, and the results asked of it so far. */
|
|
51
|
+
export interface ValueColumn {
|
|
52
|
+
readonly leaf: number;
|
|
53
|
+
/** No member is text or a logical. */
|
|
54
|
+
readonly numeric: boolean;
|
|
55
|
+
/** Per reducer, per group, then the grand total last. */
|
|
56
|
+
readonly results: (Scalar[] | undefined)[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The views a value leaf of every type is written through: width 8, so an `int32` is the low word
|
|
60
|
+
* of its slot.
|
|
61
|
+
*/
|
|
62
|
+
export interface LeafViews {
|
|
63
|
+
readonly doubles: Float64Array;
|
|
64
|
+
readonly ints: Int32Array;
|
|
65
|
+
readonly types: Uint8Array;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Writes a range's values into a value leaf, or answers `false` at the first one a leaf cannot
|
|
69
|
+
* hold (a rich value, a lambda).
|
|
70
|
+
*/
|
|
71
|
+
export declare const writeValues: (range: IRange, views: LeafViews, errors: Errors) => {
|
|
72
|
+
ok: boolean;
|
|
73
|
+
numeric: boolean;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Writes one value into a value leaf at record `r`, clearing `written.ok` for a value a leaf
|
|
77
|
+
* cannot hold (a rich value, a lambda) and `written.numeric` for text or a logical.
|
|
78
|
+
*/
|
|
79
|
+
export declare const writeValue: (views: LeafViews, r: number, value: Scalar | undefined, errors: Errors, written: {
|
|
80
|
+
ok: boolean;
|
|
81
|
+
numeric: boolean;
|
|
82
|
+
}) => void;
|
|
83
|
+
/**
|
|
84
|
+
* The handle of a leaf the kernel allocated: its layout follows from its length and type mask, as
|
|
85
|
+
* `MixedTypedArrayList` lays one out.
|
|
86
|
+
*/
|
|
87
|
+
export declare const handleOf: (buffer: ArrayBufferLike, byteOffset: number, length: number, typeMask: number) => MixedTypedArrayList.Handle;
|
|
88
|
+
/** A result leaf the kernel returned: where it is and what it holds. */
|
|
89
|
+
export interface ResultLeaf {
|
|
90
|
+
ptr(): number;
|
|
91
|
+
length(): number;
|
|
92
|
+
type_mask(): number;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* A reader of a result leaf, read in place in the WebAssembly's memory: valid until the leaf is
|
|
96
|
+
* freed or the memory grows. A number past the double range is `#NUM!`, as any function's
|
|
97
|
+
* non-finite result is.
|
|
98
|
+
*/
|
|
99
|
+
export declare const readLeaf: (buffer: ArrayBufferLike, leaf: ResultLeaf, errors: Errors) => (index: number) => Scalar;
|
|
100
|
+
//# sourceMappingURL=_KernelLeaves.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { IFormulaContext, IRange, Scalar } from '@sheetxl/primitives';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the column a group's members come back in: `size` rows, with `values[i]` at `rows[i]`
|
|
4
|
+
* and every other row blank.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export type MemberColumnFactory = (size: number, rows: ArrayLike<number>, values: ArrayLike<Scalar>, count: number) => IRange;
|
|
8
|
+
/**
|
|
9
|
+
* One axis of a pivot, from the arrays its builder filled: per group its parent, level, first
|
|
10
|
+
* record and size. Group objects are made on first ask; keys are read from the key columns then.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare class PivotAxisTree implements IFormulaContext.PivotAxis {
|
|
14
|
+
private readonly _keys;
|
|
15
|
+
private readonly _parents;
|
|
16
|
+
private readonly _levels;
|
|
17
|
+
private readonly _firsts;
|
|
18
|
+
private readonly _sizes;
|
|
19
|
+
private readonly _groups;
|
|
20
|
+
private _children;
|
|
21
|
+
private readonly _keyRows;
|
|
22
|
+
constructor(keys: IRange | null, parents: ArrayLike<number>, levels: ArrayLike<number>, firsts: ArrayLike<number>, sizes: ArrayLike<number>);
|
|
23
|
+
/** @inheritdoc IFormulaContext.PivotAxis.getRoot */
|
|
24
|
+
getRoot(): IFormulaContext.PivotGroup;
|
|
25
|
+
/** @inheritdoc IFormulaContext.PivotAxis.getGroupCount */
|
|
26
|
+
getGroupCount(): number;
|
|
27
|
+
/** The group numbered `id`, the root being `0`. */
|
|
28
|
+
group(id: number): PivotTreeGroup;
|
|
29
|
+
levelOf(id: number): number;
|
|
30
|
+
parentOf(id: number): PivotTreeGroup | null;
|
|
31
|
+
childrenOf(id: number): readonly PivotTreeGroup[];
|
|
32
|
+
keysOf(id: number): readonly Scalar[];
|
|
33
|
+
sizeOf(id: number): number;
|
|
34
|
+
firstRecordOf(id: number): number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A group of a {@link PivotAxisTree}, by its number.
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
export declare class PivotTreeGroup implements IFormulaContext.PivotGroup {
|
|
41
|
+
private readonly _tree;
|
|
42
|
+
/** The group's number on its axis, the root being `0`. */
|
|
43
|
+
readonly id: number;
|
|
44
|
+
constructor(_tree: PivotAxisTree,
|
|
45
|
+
/** The group's number on its axis, the root being `0`. */
|
|
46
|
+
id: number);
|
|
47
|
+
/** @inheritdoc IFormulaContext.PivotGroup.getLevel */
|
|
48
|
+
getLevel(): number;
|
|
49
|
+
/** @inheritdoc IFormulaContext.PivotGroup.getParent */
|
|
50
|
+
getParent(): IFormulaContext.PivotGroup | null;
|
|
51
|
+
/** @inheritdoc IFormulaContext.PivotGroup.getChildren */
|
|
52
|
+
getChildren(): readonly IFormulaContext.PivotGroup[];
|
|
53
|
+
/** @inheritdoc IFormulaContext.PivotGroup.getKeys */
|
|
54
|
+
getKeys(): readonly Scalar[];
|
|
55
|
+
/** @inheritdoc IFormulaContext.PivotGroup.getSize */
|
|
56
|
+
getSize(): number;
|
|
57
|
+
/** @inheritdoc IFormulaContext.PivotGroup.getFirstRecord */
|
|
58
|
+
getFirstRecord(): number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The number of a group passed to a pivot: `0`, the root, when omitted.
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
export declare const groupId: (group: IFormulaContext.PivotGroup | undefined) => number;
|
|
65
|
+
/**
|
|
66
|
+
* The members of `values` at `records`, one row per record, as {@link MemberColumnFactory}
|
|
67
|
+
* builds a column: only the non-blank ones are written.
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
export declare const membersAt: (values: IRange, records: ArrayLike<number>, createColumn: MemberColumnFactory) => IRange;
|
|
71
|
+
//# sourceMappingURL=_PivotAxisTree.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IRange, FormulaError, ScalarType, MaybeError, Scalar, IRangeStats, IRuntime } from '@sheetxl/primitives';
|
|
2
|
-
import { Tuple, IGrid, ISparseGrid, ISpatialMap } from '../collections';
|
|
2
|
+
import { Tuple, IGrid, ISparseGrid, ISpatialMap, IListLike } from '../collections';
|
|
3
3
|
export declare class Range<T extends Scalar = Scalar> implements IRange<T> {
|
|
4
4
|
protected _runtime: IRuntime;
|
|
5
5
|
protected _values: ISparseGrid<Scalar>;
|
|
@@ -66,6 +66,17 @@ export declare class Range<T extends Scalar = Scalar> implements IRange<T> {
|
|
|
66
66
|
* @internal
|
|
67
67
|
*/
|
|
68
68
|
_materializeEmpty(): this;
|
|
69
|
+
/**
|
|
70
|
+
* Visits a one-column range's stored values leaf by leaf, for a reader that loops typed leaves
|
|
71
|
+
* rather than entries: `visit(row, list, from, to)` covers the range's rows `row` to
|
|
72
|
+
* `row + to - from` with `list.at(from)` to `list.at(to)`, where `list` is never an
|
|
73
|
+
* `ImmutableList` (its leaves are visited instead). A row no leaf covers is blank.
|
|
74
|
+
*
|
|
75
|
+
* @returns `false`, having visited nothing, when the range is not one column of a column-major
|
|
76
|
+
* grid or reads with skips; read its entries instead.
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
_visitColumnRuns(visit: (row: number, list: IListLike<Scalar>, from: number, to: number) => void): boolean;
|
|
69
80
|
/** @inheritdoc IRange.filter */
|
|
70
81
|
filter<TS extends Scalar = T>(callbackFn: (value: TS, coords: IRange.CellCoords, range: IRange<T>) => boolean, options?: IRange.IteratorOptions): this;
|
|
71
82
|
/** @inheritdoc IRange.firstError */
|
|
@@ -28,6 +28,7 @@ import { IModule, IModuleCollection } from '../scripting';
|
|
|
28
28
|
import { IChartCollection } from '../chart';
|
|
29
29
|
import { INamedCollection } from '../named';
|
|
30
30
|
import { ICalculation } from '../calculation';
|
|
31
|
+
import { IFontCollection } from '../font';
|
|
31
32
|
import { IWorksheetView } from '../sheetView';
|
|
32
33
|
import { ISheetHeader } from '../sheetHeader';
|
|
33
34
|
import { IWorksheetProtection } from '../sheetProtection';
|
|
@@ -578,6 +579,14 @@ export interface IWorksheet extends ISheet, ITransaction.ITransactional, IListen
|
|
|
578
579
|
* own sheet).
|
|
579
580
|
*/
|
|
580
581
|
getCalculation(): ICalculation;
|
|
582
|
+
/**
|
|
583
|
+
* Returns the {@link IFontCollection} the sheet measures text with.
|
|
584
|
+
*
|
|
585
|
+
* @remarks
|
|
586
|
+
* Fonts are shared: every sheet, with or without a workbook, returns the same collection, so a
|
|
587
|
+
* face loaded for one is loaded for all.
|
|
588
|
+
*/
|
|
589
|
+
getFonts(): IFontCollection;
|
|
581
590
|
/**
|
|
582
591
|
* Recalculates THIS sheet — Excel's "Calculate Sheet" (Shift+F9) / `Worksheet.Calculate`.
|
|
583
592
|
*
|
|
@@ -614,6 +623,25 @@ export interface IWorksheet extends ISheet, ITransaction.ITransactional, IListen
|
|
|
614
623
|
* it has not been started.
|
|
615
624
|
*/
|
|
616
625
|
whenCalculationReady(): Promise<ICalculation.Status>;
|
|
626
|
+
/**
|
|
627
|
+
* Returns when every font the sheet measures with has loaded and every autofit that was taken
|
|
628
|
+
* with a stand-in meanwhile has been taken again.
|
|
629
|
+
*
|
|
630
|
+
* @remarks
|
|
631
|
+
* Measuring never waits: a style naming a face not yet loaded measures with a related or
|
|
632
|
+
* built-in one and the lookup starts the load, the way a browser paints with a fallback until
|
|
633
|
+
* a web font arrives. This is the point after which sizes are final. Fonts are shared, so this
|
|
634
|
+
* also waits for faces other sheets and workbooks started loading; a load that fails leaves its
|
|
635
|
+
* stand-in and still settles.
|
|
636
|
+
*
|
|
637
|
+
* The same point as {@link IWorkbook.whenFontsReady}; a sheet without a workbook has it here.
|
|
638
|
+
*/
|
|
639
|
+
whenFontsReady(): Promise<void>;
|
|
640
|
+
/**
|
|
641
|
+
* Returns when the sheet is settled: {@link whenCalculationReady} and {@link whenFontsReady}
|
|
642
|
+
* both hold.
|
|
643
|
+
*/
|
|
644
|
+
whenReady(): Promise<void>;
|
|
617
645
|
/**
|
|
618
646
|
* Returns the {@link IWorkbook} for the sheet.
|
|
619
647
|
*
|
|
@@ -952,6 +980,13 @@ export declare namespace IWorksheet {
|
|
|
952
980
|
* Called when any table are added or removed.
|
|
953
981
|
*/
|
|
954
982
|
onTablesChange?(source: IWorksheet): void;
|
|
983
|
+
/**
|
|
984
|
+
* Called when a pivot table changes: its style, its layout, or where it sits.
|
|
985
|
+
*
|
|
986
|
+
* @remarks
|
|
987
|
+
* Always accompanied by the coarse {@link onStyleChange}.
|
|
988
|
+
*/
|
|
989
|
+
onPivotTablesChange?(source: IWorksheet): void;
|
|
955
990
|
/**
|
|
956
991
|
* Called when any data validation is added, removed, re-anchored, or re-evaluates its results.
|
|
957
992
|
*
|
|
@@ -5,8 +5,6 @@ import { IProperties, ITypes } from '../type';
|
|
|
5
5
|
import { NumberFormat } from '../numFmt';
|
|
6
6
|
import { ITextFrame, IRichText } from '../text';
|
|
7
7
|
import { IRichDataKind } from '../richData/IRichDataKind';
|
|
8
|
-
import { ITable } from '../table';
|
|
9
|
-
import { IDataValidation } from '../dataValidation';
|
|
10
8
|
import { IHyperlink } from '../hyperlink';
|
|
11
9
|
import { ICalculation } from '../calculation';
|
|
12
10
|
import { IComment } from '../comment';
|
|
@@ -22,6 +20,7 @@ import { CellStyleUpdater } from './style/SheetCellStyle';
|
|
|
22
20
|
import { ICalcGrid } from '../calculation/grid';
|
|
23
21
|
import { IConditionalFormat } from '../conditionalFormat';
|
|
24
22
|
import { ICellControl } from '../cellControl/ICellControl';
|
|
23
|
+
import { PivotLabelInset } from '../pivot/_PivotControls';
|
|
25
24
|
/**
|
|
26
25
|
* CellModifiers with all functions removed and all properties set and a type.
|
|
27
26
|
*/
|
|
@@ -67,12 +66,19 @@ isParsingCustom?: boolean, destination?: IRange.CellCoords | null, quotePrefixOn
|
|
|
67
66
|
*/
|
|
68
67
|
export declare function csConditionalDecorations(conditionals: IConditionalFormat | IConditionalFormat[] | null | undefined, rowIndex: number, colIndex: number, value: Scalar, getStyle: () => ICellStyle): Readonly<IConditionalFormat.Decorations>;
|
|
69
68
|
export declare const csIconGutter: (style: ICellStyle) => number;
|
|
69
|
+
/**
|
|
70
|
+
* What a pivot label's leading inset adds to the one its style gives it: the label is set in by its
|
|
71
|
+
* table ({@link pivotLabelLayoutOf}), not by the indent in its format, so this replaces that indent
|
|
72
|
+
* with the table's level and box. Read the same way by {@link SheetCell.getInsets}, autoFit and the
|
|
73
|
+
* overflow walk.
|
|
74
|
+
*/
|
|
75
|
+
export declare const csPivotLead: (type: ScalarType, style: ICellStyle, label: PivotLabelInset) => number;
|
|
70
76
|
export declare function csOverflowable(type: ScalarType, style: ICellStyle, prev?: boolean, next?: boolean): boolean;
|
|
71
77
|
/**
|
|
72
78
|
* Updates the overflow calc and returns a range if overflowed
|
|
73
79
|
* @internal
|
|
74
80
|
*/
|
|
75
|
-
export declare function calcTextOverflow(rowIndex: number, colIndex: number, type: ScalarType, style: ICellStyle, value: Scalar, prev: IRange.CellCoords | null, next: IRange.CellCoords | null, continuousCoords: IRange.Coords | null, cellOptions: SheetCellOptions): ICell.HorizontalOverflow | null;
|
|
81
|
+
export declare function calcTextOverflow(rowIndex: number, colIndex: number, type: ScalarType, style: ICellStyle, value: Scalar, prev: IRange.CellCoords | null, next: IRange.CellCoords | null, continuousCoords: IRange.Coords | null, cellOptions: SheetCellOptions, leading?: number): ICell.HorizontalOverflow | null;
|
|
76
82
|
/** Guaranteed to never return null */
|
|
77
83
|
export declare function csStyle(value: Scalar, range: IRange.Coords | null, intersection: RangeState.Intersection | null, options: SheetCellOptions, direct: boolean,
|
|
78
84
|
/**
|
|
@@ -193,7 +199,6 @@ export declare class SheetCell implements ICell {
|
|
|
193
199
|
protected _v: Scalar;
|
|
194
200
|
protected _d: Date | null | undefined;
|
|
195
201
|
protected _dfmt: string | null;
|
|
196
|
-
protected _column: ITable.IColumn | null | undefined;
|
|
197
202
|
protected _cd: Readonly<IConditionalFormat.Decorations> | undefined;
|
|
198
203
|
protected _s: ICellStyle | undefined;
|
|
199
204
|
protected _sd: ICellStyle | undefined;
|
|
@@ -229,12 +234,6 @@ export declare class SheetCell implements ICell {
|
|
|
229
234
|
* @internal
|
|
230
235
|
*/
|
|
231
236
|
_openAddress(address: string, options: ITypes.SelectOptions | null, target?: string, features?: string): Promise<boolean>;
|
|
232
|
-
/** {@inheritDoc ICell.getColumn} */
|
|
233
|
-
getColumn(): ITable.IColumn | null;
|
|
234
|
-
/** {@inheritDoc ICell.getTable} */
|
|
235
|
-
getTable(): ITable | null;
|
|
236
|
-
/** {@inheritDoc ICell.getDataValidation} */
|
|
237
|
-
getDataValidation(): IDataValidation | null;
|
|
238
237
|
/** {@inheritDoc ICell.getConditionalDecorations} */
|
|
239
238
|
getConditionalDecorations(): Readonly<IConditionalFormat.Decorations>;
|
|
240
239
|
/** {@inheritDoc ICell.getControl} */
|
|
@@ -260,14 +259,22 @@ export declare class SheetCell implements ICell {
|
|
|
260
259
|
/** {@inheritDoc ICell.getInsets} */
|
|
261
260
|
getInsets(): Rectangle;
|
|
262
261
|
/**
|
|
263
|
-
* The leading-edge width this cell's icon-set decoration reserves,
|
|
262
|
+
* The leading-edge width this cell's icon-set decoration reserves, and what its pivot table's
|
|
263
|
+
* level and expand/collapse box add; `0` for a cell with neither.
|
|
264
264
|
*
|
|
265
265
|
* @remarks
|
|
266
|
-
* See {@link csIconGutter} for what the reservation is made of. Every
|
|
267
|
-
* insets, best-fit, the editor's caret — reads it from here,
|
|
268
|
-
*
|
|
266
|
+
* See {@link csIconGutter} and {@link csPivotLead} for what the reservation is made of. Every
|
|
267
|
+
* measurement of the cell — insets, best-fit, overflow, the editor's caret — reads it from here,
|
|
268
|
+
* so they cannot disagree with the icon layer or the pivot layer, which place their marks from
|
|
269
|
+
* the same style numbers. A pivot label keeps the box's gutter whether or not it has a box, as
|
|
270
|
+
* Excel lines up a level's labels.
|
|
269
271
|
*/
|
|
270
272
|
protected _iconGutter(): number;
|
|
273
|
+
/**
|
|
274
|
+
* How this cell is set in as a label of the pivot table placed over it: its level's indent and
|
|
275
|
+
* whether it keeps a box's gutter; `null` for a cell that is not one.
|
|
276
|
+
*/
|
|
277
|
+
protected _pivotLabel(): PivotLabelInset | null;
|
|
271
278
|
/** {@inheritDoc ICell.getTextFrame} */
|
|
272
279
|
getTextFrame(showFormula?: boolean): ITextFrame | null;
|
|
273
280
|
/** {@inheritDoc ICell.getTextPlacement} */
|
|
@@ -7,6 +7,7 @@ import { ICellRange, ICellRegions, ICellRanges, ICellHeaderRange } from '../cell
|
|
|
7
7
|
import { IComment, ICommentCollection } from '../comment';
|
|
8
8
|
import { ICellStyle } from '../style';
|
|
9
9
|
import { ITable, ITableCollection } from '../table';
|
|
10
|
+
import { IPivotTable } from '../pivot';
|
|
10
11
|
import { IMovable, IMovableCollection } from '../movable';
|
|
11
12
|
import { IHyperlink } from '../hyperlink';
|
|
12
13
|
import { IRichText } from '../text';
|
|
@@ -353,6 +354,8 @@ export declare class SheetRange implements ICellRange {
|
|
|
353
354
|
getComments(options?: ICellRange.GetItemsOptions<ICommentCollection.GetItemsOptions>): IComment[];
|
|
354
355
|
/** {@inheritDoc ICellRange.getTables} */
|
|
355
356
|
getTables(options?: ICellRange.GetItemsOptions<ITableCollection.GetItemsOptions>): ITable[];
|
|
357
|
+
/** {@inheritDoc ICellRange.getPivotTables} */
|
|
358
|
+
getPivotTables(): IPivotTable[];
|
|
356
359
|
/** {@inheritDoc ICellRange.getMovables} */
|
|
357
360
|
getMovables(options?: ICellRange.GetItemsOptions<IMovableCollection.GetItemsOptions>): IMovable[];
|
|
358
361
|
/** {@inheritDoc ICellRange.getSnapshot} */
|