@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
|
@@ -308,6 +308,23 @@ export interface ICalcGrid {
|
|
|
308
308
|
* @param options See {@link ICalcGrid.RequestOptions}.
|
|
309
309
|
*/
|
|
310
310
|
setFiltered(filtered: boolean, options?: ICalcGrid.RequestOptions): void;
|
|
311
|
+
/**
|
|
312
|
+
* Sets the pivot tables on the grid, as the values each shows: what `GETPIVOTDATA` reads
|
|
313
|
+
* (`IFormulaContext.getPivotAt`). Recorded and told as {@link setFiltered} is; every formula
|
|
314
|
+
* that calls `GETPIVOTDATA` recalculates.
|
|
315
|
+
*
|
|
316
|
+
* @remarks
|
|
317
|
+
* The whole set each time, its tables where they sit now: told again when one is added,
|
|
318
|
+
* moved, refreshed or deleted. Held for a start to seed from; never written by a save, the
|
|
319
|
+
* owner computes them from its tables.
|
|
320
|
+
*
|
|
321
|
+
* A table with a {@link ICalcGrid.PivotJSON.block} is placed by the engine as a spill, or
|
|
322
|
+
* `#SPILL!` at its anchor; the cells it places and removes come back as an input's do.
|
|
323
|
+
*
|
|
324
|
+
* @param pivots The tables; empty for none.
|
|
325
|
+
* @param options See {@link ICalcGrid.RequestOptions}.
|
|
326
|
+
*/
|
|
327
|
+
setPivots(pivots: readonly ICalcGrid.PivotJSON[], options?: ICalcGrid.RequestOptions): Promise<ICalcGrid.Results>;
|
|
311
328
|
seed(json: ICalcGrid.JSON, options?: ICalcGrid.SeedOptions): Promise<ICalcGrid.Results>;
|
|
312
329
|
/**
|
|
313
330
|
* Returns a JSON representation of the calcGrid.
|
|
@@ -798,12 +815,83 @@ export declare namespace ICalcGrid {
|
|
|
798
815
|
* Whether the grid's owner is filtered ({@link ICalcGrid.setFiltered}); absent for not.
|
|
799
816
|
*/
|
|
800
817
|
filtered?: boolean;
|
|
818
|
+
/**
|
|
819
|
+
* The pivot tables on the grid ({@link ICalcGrid.setPivots}), read by a seed; a save does not
|
|
820
|
+
* write them.
|
|
821
|
+
*/
|
|
822
|
+
pivots?: readonly PivotJSON[];
|
|
801
823
|
/**
|
|
802
824
|
* The grid's size ({@link ICalcGrid.resize}), read by a seed; absent to keep the one it has. A
|
|
803
825
|
* save does not write it: the owner keeps its own.
|
|
804
826
|
*/
|
|
805
827
|
entireCoords?: IRange.Coords;
|
|
806
828
|
}
|
|
829
|
+
/**
|
|
830
|
+
* A pivot table as the values it shows ({@link ICalcGrid.setPivots}): the data behind
|
|
831
|
+
* `IFormulaContext.PivotView`.
|
|
832
|
+
*/
|
|
833
|
+
interface PivotJSON {
|
|
834
|
+
/** The cells the table covers, its page fields included. */
|
|
835
|
+
range: IRange.Coords;
|
|
836
|
+
dataFields: {
|
|
837
|
+
name: string;
|
|
838
|
+
sourceName: string;
|
|
839
|
+
}[];
|
|
840
|
+
/** The fields on rows, columns and pages, in that order. */
|
|
841
|
+
fields: PivotFieldJSON[];
|
|
842
|
+
/**
|
|
843
|
+
* Each value the table shows: per data field, then per field on rows and columns in
|
|
844
|
+
* {@link fields}' order, the item's index, or `-1` for the total over the field; then the
|
|
845
|
+
* value. Absent, the table does not show it.
|
|
846
|
+
*/
|
|
847
|
+
values: [key: string, value: Scalar][];
|
|
848
|
+
/**
|
|
849
|
+
* Where the table is laid out: its cells, which are the sheet's stored values, are held over
|
|
850
|
+
* {@link range} as an extent anchored at {@link PivotBlockJSON.anchor}, which refuses a shift
|
|
851
|
+
* that would move part of it. Absent, the table is not laid out.
|
|
852
|
+
*/
|
|
853
|
+
block?: PivotBlockJSON;
|
|
854
|
+
/**
|
|
855
|
+
* `false` for a table that is there but whose values are not computed (not modeled, or not
|
|
856
|
+
* laid out): {@link range} is its location, and its data fields, fields and values are empty.
|
|
857
|
+
* Absent, the values are the table's.
|
|
858
|
+
*/
|
|
859
|
+
computed?: false;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Where a laid-out {@link PivotJSON | pivot table} sits.
|
|
863
|
+
*/
|
|
864
|
+
interface PivotBlockJSON {
|
|
865
|
+
/** The location's top-left: where `#SPILL!` shows. Inside the range, below any page fields. */
|
|
866
|
+
anchor: {
|
|
867
|
+
row: number;
|
|
868
|
+
column: number;
|
|
869
|
+
};
|
|
870
|
+
/**
|
|
871
|
+
* The table shows `#SPILL!` at its anchor, stored there by the sheet, and covers that cell
|
|
872
|
+
* alone: it holds no extent.
|
|
873
|
+
*/
|
|
874
|
+
blocked?: true;
|
|
875
|
+
/**
|
|
876
|
+
* The key in {@link PivotJSON.values} of the first cell of the data area. While the table
|
|
877
|
+
* shows `#SPILL!` it is collapsed to its anchor, where that cell sits: a query naming it reads
|
|
878
|
+
* `#SPILL!`, any other none. Absent, the table has no data area.
|
|
879
|
+
*/
|
|
880
|
+
first?: string;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* A field of a {@link PivotJSON}.
|
|
884
|
+
*/
|
|
885
|
+
interface PivotFieldJSON {
|
|
886
|
+
name: string;
|
|
887
|
+
items: {
|
|
888
|
+
value: Scalar;
|
|
889
|
+
text: string;
|
|
890
|
+
name?: string;
|
|
891
|
+
}[];
|
|
892
|
+
/** On the page axis: the item shown, by index into `items`; `-1` for all of them. */
|
|
893
|
+
page?: number;
|
|
894
|
+
}
|
|
807
895
|
/**
|
|
808
896
|
* Options for {@link ICalcGrid.seed}.
|
|
809
897
|
*/
|
|
@@ -40,6 +40,15 @@ export type CalcRequest =
|
|
|
40
40
|
type: 'filtered';
|
|
41
41
|
filtered: boolean;
|
|
42
42
|
options?: ICalcGrid.RequestOptions;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The pivot tables on the grid changed: the whole set as it is now. What `GETPIVOTDATA` reads;
|
|
46
|
+
* the formulas that call it are recalculated.
|
|
47
|
+
*/
|
|
48
|
+
| {
|
|
49
|
+
type: 'pivots';
|
|
50
|
+
pivots: readonly ICalcGrid.PivotJSON[];
|
|
51
|
+
options?: ICalcGrid.RequestOptions;
|
|
43
52
|
} | {
|
|
44
53
|
type: 'seed';
|
|
45
54
|
json: ICalcGrid.JSON;
|
|
@@ -395,6 +395,8 @@ export declare class FormulaSpatialValue implements IFormulaBlock, ISpatialMap.I
|
|
|
395
395
|
getReferencedSymbolIds(): string[];
|
|
396
396
|
/** {@inheritDoc IFormulaBlock.hasTotals} */
|
|
397
397
|
hasTotals(): boolean;
|
|
398
|
+
/** {@inheritDoc IFormulaBlock.hasPivotData} */
|
|
399
|
+
hasPivotData(): boolean;
|
|
398
400
|
/** {@inheritDoc IFormulaBlock.hasDataTable} */
|
|
399
401
|
hasDataTable(): boolean;
|
|
400
402
|
/** {@inheritDoc IFormulaBlock.hasVolatile} */
|
|
@@ -11,16 +11,30 @@ import { AsyncValue } from '../../primitives/AsyncValue';
|
|
|
11
11
|
* from a collision detected during a calculation cycle.
|
|
12
12
|
* * `fixed` - an array-entered (Ctrl+Shift+Enter) block, whose extent is authoritative rather than
|
|
13
13
|
* derived. Degenerate 1x1 fixed entries are legal and meaningful.
|
|
14
|
+
*
|
|
15
|
+
* The anchor - the cell that owns the extent, and where a blocked spill shows `#SPILL!` - is the
|
|
16
|
+
* extent's top-left unless an offset says otherwise. It is kept as an offset from the top-left, so
|
|
17
|
+
* it moves with the extent.
|
|
14
18
|
*/
|
|
15
19
|
export declare class SpillEntry {
|
|
16
20
|
private _c;
|
|
17
21
|
private _k;
|
|
18
22
|
private _cycleId;
|
|
23
|
+
/** The anchor's rows and columns below and right of the top-left; `null` for the top-left. */
|
|
24
|
+
private _a;
|
|
19
25
|
private _h;
|
|
20
26
|
private _b;
|
|
21
|
-
constructor(coords: IRange.Coords, cycleId: number, kind?: ITypes.FormulaArrayKind, holder?: AsyncValue | null, blocked?: IRange.Coords | null);
|
|
27
|
+
constructor(coords: IRange.Coords, cycleId: number, kind?: ITypes.FormulaArrayKind, anchorOffset?: SpillEntry.AnchorOffset | null, holder?: AsyncValue | null, blocked?: IRange.Coords | null);
|
|
22
28
|
/** The anchor's holder, for a spill laid out by an evaluation that deferred; `null` otherwise. */
|
|
23
29
|
getHolder(): AsyncValue | null;
|
|
30
|
+
/** The cell that owns the extent: its top-left unless the entry was made with an offset. */
|
|
31
|
+
getAnchor(): SpillEntry.Anchor;
|
|
32
|
+
/** The anchor's offset from the extent's top-left; `null` when the anchor is the top-left. */
|
|
33
|
+
getAnchorOffset(): SpillEntry.AnchorOffset | null;
|
|
34
|
+
/** {@inheritDoc SpillEntry.gapOf} */
|
|
35
|
+
getGap(): IRange.Coords | null;
|
|
36
|
+
/** Whether the cell at `row`, `column` is the anchor. */
|
|
37
|
+
isAnchor(row: number, column: number): boolean;
|
|
24
38
|
getCycleId(): number;
|
|
25
39
|
/** {@inheritDoc ITypes.FormulaArrayKind} */
|
|
26
40
|
getKind(): ITypes.FormulaArrayKind;
|
|
@@ -39,9 +53,10 @@ export declare class SpillEntry {
|
|
|
39
53
|
*/
|
|
40
54
|
setError(error: boolean, cycleId: number, keepExtent?: boolean): ISpatialMap.Entry<this>;
|
|
41
55
|
/**
|
|
42
|
-
* Refuses a shift that would change part of a fixed block - Excel's "You can't
|
|
43
|
-
* an array." A block the shift lands entirely before
|
|
44
|
-
* swallows the whole block deletes it; anything that
|
|
56
|
+
* Refuses a shift that would change part of a fixed block or a pivot table - Excel's "You can't
|
|
57
|
+
* change part of an array." and its pivot table refusal. A block the shift lands entirely before
|
|
58
|
+
* or after translates whole; a delete that swallows the whole block deletes it; anything that
|
|
59
|
+
* would split, trim, or grow it throws.
|
|
45
60
|
*
|
|
46
61
|
* @param intersect The inserted or deleted range, in pre-shift coordinates.
|
|
47
62
|
* @param isColumn `true` for a column shift (left/right), `false` for a row shift (up/down).
|
|
@@ -51,6 +66,9 @@ export declare class SpillEntry {
|
|
|
51
66
|
* Called from {@link getShifted}, and hoisted ahead of the maps' shift by the callers that lift
|
|
52
67
|
* intersecting spills before shifting (`markFixedSpills`), which would otherwise never hand a
|
|
53
68
|
* partially covered block to this node.
|
|
69
|
+
*
|
|
70
|
+
* A pivot table's extent holds its page fields and the blank row under them, so a shift through
|
|
71
|
+
* those is refused too (`pivot-probes/probe-pivot-extent.ps1`). A blocked one is its anchor alone.
|
|
54
72
|
*/
|
|
55
73
|
checkShift(intersect: IRange.Coords, isColumn: boolean, isInsert: boolean): void;
|
|
56
74
|
/**
|
|
@@ -64,6 +82,39 @@ export declare class SpillEntry {
|
|
|
64
82
|
/** {@inheritDoc ISpatialMap.IUpdatableValue.getSplit} */
|
|
65
83
|
getSplit(coords: [IRange.Coords, IRange.Coords], _axis: IRange.Axis): [this, this] | undefined;
|
|
66
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* The spills over `range` a cell answers for: a pivot table's extent is the table's, not an
|
|
87
|
+
* array's, so a cell inside it reports no spill (`ICell.getSpill`), as Excel's `HasSpill` is
|
|
88
|
+
* `False` there. Range-state reads take their spills from here; the engine, the shift and write
|
|
89
|
+
* checks and saving read the spill map.
|
|
90
|
+
*/
|
|
91
|
+
export declare const searchCellSpills: (spills: ISpatialMap<SpillEntry>, range: IRange.Coords) => ISpatialMap.Entry<SpillEntry>[];
|
|
92
|
+
export declare namespace SpillEntry {
|
|
93
|
+
/** A cell, absolute. */
|
|
94
|
+
interface Anchor {
|
|
95
|
+
row: number;
|
|
96
|
+
column: number;
|
|
97
|
+
}
|
|
98
|
+
/** How far the anchor sits below and right of the extent's top-left. */
|
|
99
|
+
interface AnchorOffset {
|
|
100
|
+
rows: number;
|
|
101
|
+
columns: number;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The row of an extent that is not the spill's: a pivot table's blank row between its page
|
|
105
|
+
* fields and its location, the row above the anchor. `null` for every other spill.
|
|
106
|
+
*
|
|
107
|
+
* @remarks
|
|
108
|
+
* Excel keeps a value written there, through a refresh, and the table is not in its way
|
|
109
|
+
* (`pivot-probes/probe-pivot-edit.ps1`); a structural edit through it is still refused, so the
|
|
110
|
+
* extent keeps it and only the spill's cells leave it out ({@link cellsOf}).
|
|
111
|
+
*/
|
|
112
|
+
const gapOf: (coords: IRange.Coords, kind: ITypes.FormulaArrayKind, anchorOffset: AnchorOffset | null) => IRange.Coords | null;
|
|
113
|
+
/** The cells of an extent without its `gap` ({@link gapOf}): the extent, or the rows above and below the gap. */
|
|
114
|
+
const cellsOf: (coords: IRange.Coords, gap: IRange.Coords | null) => IRange.Coords[];
|
|
115
|
+
/** Whether `range` lies wholly in `gap`. */
|
|
116
|
+
const isInGap: (range: IRange.Coords, gap: IRange.Coords | null) => boolean;
|
|
117
|
+
}
|
|
67
118
|
/**
|
|
68
119
|
* The holder of the spill anchored at (`row`, `col`), or `null` when no spill is anchored there
|
|
69
120
|
* or its evaluation did not defer. A blocked spill's entry is anchored too.
|
|
@@ -33,10 +33,13 @@ export interface CalcNodeExt {
|
|
|
33
33
|
*/
|
|
34
34
|
spillDependents: ISpatialMap.Entry<PrecedentSpatialValue>[];
|
|
35
35
|
/**
|
|
36
|
-
* The
|
|
37
|
-
*
|
|
38
|
-
*
|
|
36
|
+
* The spill extent {@link spillDependents} was searched over. Its top-left is the node's own
|
|
37
|
+
* position unless the formula spills from above or left of its cell
|
|
38
|
+
* (`IFormulaBlock.getSpillOrigin`). `-1` whenever that list is empty — a node that does not
|
|
39
|
+
* spill, and equally one whose body nothing reads.
|
|
39
40
|
*/
|
|
41
|
+
spillRowStart: number;
|
|
42
|
+
spillColStart: number;
|
|
40
43
|
spillRowEnd: number;
|
|
41
44
|
spillColEnd: number;
|
|
42
45
|
/**
|
|
@@ -184,8 +184,10 @@ export declare class CalculationContext implements IFormulaContext {
|
|
|
184
184
|
parseAsNumber(textOrNumber: Scalar | undefined, options?: IFormulaContext.ParseNumberOptions): number | undefined;
|
|
185
185
|
/** @inheritdoc IFormulaContext.createCriteria */
|
|
186
186
|
createCriteria(criteria: Scalar, options?: IFormulaContext.CriteriaOptions): IFormulaContext.CriteriaEvaluator;
|
|
187
|
-
/** @inheritdoc IFormulaContext.
|
|
188
|
-
|
|
187
|
+
/** @inheritdoc IFormulaContext.createPivot */
|
|
188
|
+
createPivot(rows: IRange | null, columns: IRange | null, options?: IFormulaContext.PivotOptions): IFormulaContext.Pivot;
|
|
189
|
+
/** @inheritdoc IFormulaContext.getPivotAt */
|
|
190
|
+
getPivotAt(reference: IReferenceRange): IFormulaContext.PivotView | null;
|
|
189
191
|
/**
|
|
190
192
|
* A one-column array of `size` rows holding `values[i]` at `rows[i]` and blank elsewhere —
|
|
191
193
|
* written directly, so a mostly-blank column costs its values, not its size.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IFormulaContext } from '@sheetxl/primitives';
|
|
2
|
+
import { ICalcGrid } from '../grid/ICalcGrid';
|
|
3
|
+
/**
|
|
4
|
+
* The key of a value in {@link ICalcGrid.PivotJSON.values}: the data field, then per field on rows
|
|
5
|
+
* and columns the item's index, `-1` for the total over the field.
|
|
6
|
+
*/
|
|
7
|
+
export declare const pivotValueKey: (dataField: number, items: readonly number[]) => string;
|
|
8
|
+
/**
|
|
9
|
+
* How a reference meets a pivot table:
|
|
10
|
+
* - `placed`: on the laid-out table;
|
|
11
|
+
* - `blocked`: on the anchor of a table showing `#SPILL!` there;
|
|
12
|
+
* - `wanted`: on a cell a blocked table wants and does not hold, which is no table's.
|
|
13
|
+
*/
|
|
14
|
+
export type PivotViewMode = 'placed' | 'blocked' | 'wanted';
|
|
15
|
+
/**
|
|
16
|
+
* The view of a pivot's data, made once per data and mode.
|
|
17
|
+
*
|
|
18
|
+
* @param mode How the reference meets the table: a blocked table answers `#SPILL!` for its first
|
|
19
|
+
* data cell at its anchor and `#REF!` elsewhere (`pivot-probes/probe-pivot-getpivotdata-spill.ps1`).
|
|
20
|
+
*/
|
|
21
|
+
export declare const pivotViewOf: (json: ICalcGrid.PivotJSON, mode?: PivotViewMode) => IFormulaContext.PivotView;
|
|
22
|
+
//# sourceMappingURL=_PivotView.d.ts.map
|
|
@@ -3,9 +3,7 @@ import { Size, Rectangle, Bounds } from '@sheetxl/utils';
|
|
|
3
3
|
import { ITypes } from '../type';
|
|
4
4
|
import { ITextFrame, TextRotation, TextStacked, IRichText } from '../text';
|
|
5
5
|
import { NumberFormat } from '../numFmt';
|
|
6
|
-
import {
|
|
7
|
-
import { IDataValidation } from '../dataValidation';
|
|
8
|
-
import { IConditionalFormat } from '../conditionalFormat';
|
|
6
|
+
import { IConditionalFormat } from '../conditionalFormat/IConditionalFormat';
|
|
9
7
|
import { ICellControl } from '../cellControl';
|
|
10
8
|
import { IHyperlink } from '../hyperlink';
|
|
11
9
|
import { IComment } from '../comment';
|
|
@@ -342,20 +340,6 @@ export interface ICell {
|
|
|
342
340
|
* values, as 'general' is resolved to left or right based on the cell's content type.
|
|
343
341
|
*/
|
|
344
342
|
getRenderHorizontalAlignment(): ITextFrame.HorizontalAlignment;
|
|
345
|
-
/**
|
|
346
|
-
* Return an {@link ITable.IColumn} if the cell is the the first row of an ITable range.
|
|
347
|
-
*/
|
|
348
|
-
getColumn(): ITable.IColumn | null;
|
|
349
|
-
/**
|
|
350
|
-
* Returns the cell's primary data validation: the highest-priority one that covers it, or `null`
|
|
351
|
-
* when none does.
|
|
352
|
-
*
|
|
353
|
-
* @remarks
|
|
354
|
-
* Validations may overlap, and every one that covers the cell applies; see
|
|
355
|
-
* {@link ICellRange.getDataValidations} for all of them. The primary one is also the one Excel
|
|
356
|
-
* honors when it opens a file whose validations overlap.
|
|
357
|
-
*/
|
|
358
|
-
getDataValidation(): IDataValidation | null;
|
|
359
343
|
/**
|
|
360
344
|
* Returns what the cell's conditional formatting DRAWS in it — an in-cell bar, an icon, or
|
|
361
345
|
* neither.
|
|
@@ -383,10 +367,6 @@ export interface ICell {
|
|
|
383
367
|
* checkbox cell holding `2` has a control and draws `2`.
|
|
384
368
|
*/
|
|
385
369
|
getControl(): ICellControl | null;
|
|
386
|
-
/**
|
|
387
|
-
* If the cell is in a table this will return it.
|
|
388
|
-
*/
|
|
389
|
-
getTable(): ITable | null;
|
|
390
370
|
/**
|
|
391
371
|
* Returns `true` if the cell contains a value.
|
|
392
372
|
*
|
|
@@ -15,6 +15,7 @@ import { IWorksheet } from '../sheet';
|
|
|
15
15
|
import { ICell } from '../cell';
|
|
16
16
|
import { IComment, ICommentCollection } from '../comment';
|
|
17
17
|
import { ITable, ITableCollection } from '../table';
|
|
18
|
+
import { IPivotTable } from '../pivot';
|
|
18
19
|
import { IMovable, IMovableCollection } from '../movable';
|
|
19
20
|
import { IDataValidation, IDataValidationCollection } from '../dataValidation';
|
|
20
21
|
import { IConditionalFormat, IConditionalFormatCollection } from '../conditionalFormat';
|
|
@@ -131,14 +132,16 @@ export interface ICellRange {
|
|
|
131
132
|
*/
|
|
132
133
|
setControl(control: ICellControl.JSON | null, options?: ITransaction.OperationOptions): this;
|
|
133
134
|
/**
|
|
134
|
-
* Returns the {@link IDataValidation}s that overlap the range.
|
|
135
|
+
* Returns the {@link IDataValidation}s that overlap the range, in priority order.
|
|
135
136
|
*
|
|
136
137
|
* @param options The filters of {@link IDataValidationCollection.getItems} without `address` —
|
|
137
138
|
* this range is the address.
|
|
138
139
|
*
|
|
139
140
|
* @remarks
|
|
140
141
|
* **Plural, unlike Excel.** A cell carries at most one validation there, so Excel's range accessor
|
|
141
|
-
* is singular; here a range may overlap any number of independently anchored validations.
|
|
142
|
+
* is singular; here a range may overlap any number of independently anchored validations. Every
|
|
143
|
+
* one that covers a cell applies to it. For a single cell the first is its primary validation,
|
|
144
|
+
* the one Excel honors when it opens a file whose validations overlap.
|
|
142
145
|
*
|
|
143
146
|
* See {@link getConditionalFormats} for the overlap and one-entry-per-item rules, which are the
|
|
144
147
|
* same for every ranged item lookup.
|
|
@@ -166,6 +169,14 @@ export interface ICellRange {
|
|
|
166
169
|
* `fullyContained` to ask only for tables the range wholly encloses.
|
|
167
170
|
*/
|
|
168
171
|
getTables(options?: ICellRange.GetItemsOptions<ITableCollection.GetItemsOptions>): ITable[];
|
|
172
|
+
/**
|
|
173
|
+
* Returns the {@link IPivotTable}s with a cell in the range, in the order the sheet lists them.
|
|
174
|
+
*
|
|
175
|
+
* @remarks
|
|
176
|
+
* A table's cells are its location and its page fields, not the blank row between them, as
|
|
177
|
+
* Excel's `Range.PivotTable` answers. A table showing `#SPILL!` holds its anchor alone.
|
|
178
|
+
*/
|
|
179
|
+
getPivotTables(): IPivotTable[];
|
|
169
180
|
/**
|
|
170
181
|
* Returns the {@link IMovable}s anchored over the range.
|
|
171
182
|
*
|
|
@@ -2819,6 +2830,11 @@ export declare namespace ICellRange {
|
|
|
2819
2830
|
readonly Table: "table";
|
|
2820
2831
|
/** Auto-table membership. */
|
|
2821
2832
|
readonly AutoTable: "autoTable";
|
|
2833
|
+
/**
|
|
2834
|
+
* Cells a pivot table is laid out over, the page fields above it included. A blocked table
|
|
2835
|
+
* covers none; {@link ICellRange.getPivotTables} names the tables over a range.
|
|
2836
|
+
*/
|
|
2837
|
+
readonly Pivot: "pivot";
|
|
2822
2838
|
/** Has a hyperlink. Regions group by what the link says, so the same link set twice is one region. */
|
|
2823
2839
|
readonly Hyperlink: "hyperlink";
|
|
2824
2840
|
/**
|
|
@@ -3,8 +3,9 @@ import { IList, IListLike } from './IList';
|
|
|
3
3
|
* An immutable run of mixed scalar values in ONE `ArrayBuffer` or `SharedArrayBuffer`.
|
|
4
4
|
*
|
|
5
5
|
* Numbers, booleans and blanks are stored natively; strings, errors and rich values as `int32`
|
|
6
|
-
* ids that a {@link MixedTypedArrayList.Codec} resolves. The buffer
|
|
7
|
-
* receives its {@link MixedTypedArrayList.Handle} (and has the
|
|
6
|
+
* ids that a {@link MixedTypedArrayList.Codec} resolves. The buffer, or one region of it, is the
|
|
7
|
+
* whole list: another thread that receives its {@link MixedTypedArrayList.Handle} (and has the
|
|
8
|
+
* same codec) reads it without a copy.
|
|
8
9
|
*
|
|
9
10
|
* @remarks
|
|
10
11
|
* Layout, for `length` values at `width` 4 or 8 bytes:
|
|
@@ -29,6 +30,8 @@ export declare class MixedTypedArrayList<T = any> implements IList<T> {
|
|
|
29
30
|
private readonly _dt;
|
|
30
31
|
private readonly _m;
|
|
31
32
|
private readonly _buf;
|
|
33
|
+
/** Where the list starts in `_buf`. */
|
|
34
|
+
private readonly _o;
|
|
32
35
|
private readonly _vi;
|
|
33
36
|
private readonly _vf;
|
|
34
37
|
private readonly _t;
|
|
@@ -73,6 +76,11 @@ export declare class MixedTypedArrayList<T = any> implements IList<T> {
|
|
|
73
76
|
fromArray(arr: T[]): IListLike<T>;
|
|
74
77
|
/** The bytes a value occupies: `4` or `8`. */
|
|
75
78
|
get width(): number;
|
|
79
|
+
/**
|
|
80
|
+
* What resolves the list's string ids and error codes; `null` when it has none. Two lists with
|
|
81
|
+
* the same codec mean the same thing by the same id.
|
|
82
|
+
*/
|
|
83
|
+
get codec(): MixedTypedArrayList.Codec<T> | null;
|
|
76
84
|
/** Whether the buffer is a `SharedArrayBuffer`. */
|
|
77
85
|
get isShared(): boolean;
|
|
78
86
|
/**
|
|
@@ -162,6 +170,12 @@ export declare namespace MixedTypedArrayList {
|
|
|
162
170
|
*/
|
|
163
171
|
interface Handle {
|
|
164
172
|
buffer: ArrayBufferLike;
|
|
173
|
+
/**
|
|
174
|
+
* Where the list starts in `buffer`: a list allocated inside a larger memory (a WebAssembly
|
|
175
|
+
* memory, say) is a region of it. A multiple of 8 when the width is 8.
|
|
176
|
+
* @defaultValue 0
|
|
177
|
+
*/
|
|
178
|
+
byteOffset?: number;
|
|
165
179
|
length: number;
|
|
166
180
|
width: 4 | 8;
|
|
167
181
|
/** The one type, when `hasTypes` is `false`. */
|
|
@@ -44,6 +44,16 @@ export declare abstract class AbstractOperator<P> implements ICondition.IOperato
|
|
|
44
44
|
protected _isMissingOperand(param: Scalar | ICalculation.IFormula | undefined): boolean;
|
|
45
45
|
protected _validateOperand(param: Scalar | ICalculation.IFormula | undefined, lhsSelector: ICondition.ISelector | null | undefined, allowEmptyText?: boolean): string | null;
|
|
46
46
|
protected _createComparePredicate(param: Scalar | ICalculation.IFormula | undefined, ctx: ICondition.IContext, compare: (value: number, operand: number) => boolean): Promise<ICondition.Predicate | null>;
|
|
47
|
+
/**
|
|
48
|
+
* A comparison of the text a cell shows (the Display selector) with a text operand, as Excel's
|
|
49
|
+
* filters compare a caption: the calc engine's text order (`ScalarCollation`, as `="a"<"b"`), and
|
|
50
|
+
* a `*`, `?` or `~` in the operand a wildcard, so a text it matches compares equal
|
|
51
|
+
* (`pivot-probes/probe-filter-text-compare.ps1`: `> "?"` keeps no one-character caption). A
|
|
52
|
+
* formula operand is compared as the plain comparison compares it.
|
|
53
|
+
*
|
|
54
|
+
* @param test Whether the text passes, from its order against the operand: negative, zero or positive.
|
|
55
|
+
*/
|
|
56
|
+
protected _createDisplayComparePredicate(param: Scalar | ICalculation.IFormula | undefined, ctx: ICondition.IContext, test: (order: number) => boolean, compare: (value: number, operand: number) => boolean): MaybePromise<ICondition.Predicate | null>;
|
|
47
57
|
/**
|
|
48
58
|
* An operand as a rule's text reads it: a date or time serial as the date or time it is,
|
|
49
59
|
* under a selector that reads one (`34995` is `10/23/1995` under Date); anything else as it is.
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { MaybePromise } from '@sheetxl/utils';
|
|
1
2
|
import { ICondition } from '../ICondition';
|
|
2
3
|
import { AbstractOperator } from './AbstractOperator';
|
|
3
4
|
export declare class GreaterThanEqualToOperator extends AbstractOperator<number | string> implements ICondition.IOperator<number | string> {
|
|
4
5
|
constructor();
|
|
5
6
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
7
|
createPredicate(param: number | string, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
8
|
+
/** Read through the Display selector: the shown text, in text order (`_createDisplayComparePredicate`). */
|
|
9
|
+
createDisplayPredicate(param: number | string, ctx: ICondition.IContext): MaybePromise<ICondition.Predicate | null>;
|
|
7
10
|
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
11
|
validateParam(param: number | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
9
12
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { MaybePromise } from '@sheetxl/utils';
|
|
1
2
|
import { ICondition } from '../ICondition';
|
|
2
3
|
import { AbstractOperator } from './AbstractOperator';
|
|
3
4
|
export declare class GreaterThanOperator extends AbstractOperator<number | string> implements ICondition.IOperator<number | string> {
|
|
4
5
|
constructor();
|
|
5
6
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
7
|
createPredicate(param: number | string, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
8
|
+
/** Read through the Display selector: the shown text, in text order (`_createDisplayComparePredicate`). */
|
|
9
|
+
createDisplayPredicate(param: number | string, ctx: ICondition.IContext): MaybePromise<ICondition.Predicate | null>;
|
|
7
10
|
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
11
|
validateParam(param: number | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
9
12
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { MaybePromise } from '@sheetxl/utils';
|
|
1
2
|
import { ICondition } from '../ICondition';
|
|
2
3
|
import { AbstractOperator } from './AbstractOperator';
|
|
3
4
|
export declare class LessThanEqualToOperator extends AbstractOperator<number | string> implements ICondition.IOperator<number | string> {
|
|
4
5
|
constructor();
|
|
5
6
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
7
|
createPredicate(param: number | string, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
8
|
+
/** Read through the Display selector: the shown text, in text order (`_createDisplayComparePredicate`). */
|
|
9
|
+
createDisplayPredicate(param: number | string, ctx: ICondition.IContext): MaybePromise<ICondition.Predicate | null>;
|
|
7
10
|
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
11
|
validateParam(param: number | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
9
12
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { MaybePromise } from '@sheetxl/utils';
|
|
1
2
|
import { ICondition } from '../ICondition';
|
|
2
3
|
import { AbstractOperator } from './AbstractOperator';
|
|
3
4
|
export declare class LessThanOperator extends AbstractOperator<number | string> implements ICondition.IOperator<number | string> {
|
|
4
5
|
constructor();
|
|
5
6
|
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
7
|
createPredicate(param: number | string, ctx: ICondition.IContext): Promise<ICondition.Predicate | null>;
|
|
8
|
+
/** Read through the Display selector: the shown text, in text order (`_createDisplayComparePredicate`). */
|
|
9
|
+
createDisplayPredicate(param: number | string, ctx: ICondition.IContext): MaybePromise<ICondition.Predicate | null>;
|
|
7
10
|
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
11
|
validateParam(param: number | string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
9
12
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICondition } from '../ICondition';
|
|
2
|
+
import { AbstractOperator } from './AbstractOperator';
|
|
3
|
+
export declare class MatchesOperator extends AbstractOperator<string> implements ICondition.IOperator<string> {
|
|
4
|
+
constructor();
|
|
5
|
+
/** {@inheritDoc ICondition.IOperator.createPredicate} */
|
|
6
|
+
createPredicate(param: string, ctx: ICondition.IContext): ICondition.Predicate;
|
|
7
|
+
/** {@inheritDoc ICondition.IOperator.validateParam} */
|
|
8
|
+
validateParam(param: string, lhsSelector?: ICondition.ISelector | null): string | null;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=MatchesOperator.d.ts.map
|
|
@@ -10,6 +10,8 @@ export declare class TimePeriodOperator extends AbstractOperator<ICondition.Time
|
|
|
10
10
|
/** {@inheritDoc ICondition.IOperator.toString} */
|
|
11
11
|
toString(param?: ICondition.TimePeriodOption, lhsSelector?: ICondition.ISelector): string | undefined;
|
|
12
12
|
private _computeRange;
|
|
13
|
+
/** The months (0-11) a period that names a quarter (Q1-Q4) or a month (M1-M12) covers, in any year; else `null`. */
|
|
14
|
+
private _monthsOf;
|
|
13
15
|
private _quarterRange;
|
|
14
16
|
}
|
|
15
17
|
//# sourceMappingURL=TimePeriodOperator.d.ts.map
|
|
@@ -21,6 +21,7 @@ import { ValidUrlOperator } from './ValidUrlOperator';
|
|
|
21
21
|
import { StartsWithOperator } from './StartsWithOperator';
|
|
22
22
|
import { EndsWithOperator } from './EndsWithOperator';
|
|
23
23
|
import { ContainsOperator } from './ContainsOperator';
|
|
24
|
+
import { MatchesOperator } from './MatchesOperator';
|
|
24
25
|
import { TimePeriodOperator } from './TimePeriodOperator';
|
|
25
26
|
import { TopNOperator } from './TopNOperator';
|
|
26
27
|
import { AndOperator } from './AndOperator';
|
|
@@ -48,6 +49,7 @@ export declare const BuiltInOperators: {
|
|
|
48
49
|
TextStartsWith: StartsWithOperator;
|
|
49
50
|
TextEndsWith: EndsWithOperator;
|
|
50
51
|
TextContains: ContainsOperator;
|
|
52
|
+
TextMatches: MatchesOperator;
|
|
51
53
|
TextEmail: ValidEmailOperator;
|
|
52
54
|
TextIsUrl: ValidUrlOperator;
|
|
53
55
|
TimePeriod: TimePeriodOperator;
|
|
@@ -73,6 +73,7 @@ export declare namespace Condition {
|
|
|
73
73
|
TextStartsWith: import("./BuiltInOperators/StartsWithOperator").StartsWithOperator;
|
|
74
74
|
TextEndsWith: import("./BuiltInOperators/EndsWithOperator").EndsWithOperator;
|
|
75
75
|
TextContains: import("./BuiltInOperators/ContainsOperator").ContainsOperator;
|
|
76
|
+
TextMatches: import("./BuiltInOperators/MatchesOperator").MatchesOperator;
|
|
76
77
|
TextEmail: import("./BuiltInOperators/ValidEmailOperator").ValidEmailOperator;
|
|
77
78
|
TextIsUrl: import("./BuiltInOperators/ValidUrlOperator").ValidUrlOperator;
|
|
78
79
|
TimePeriod: import("./BuiltInOperators/TimePeriodOperator").TimePeriodOperator;
|
|
@@ -298,6 +298,12 @@ export declare namespace ICondition {
|
|
|
298
298
|
* Checks any text value is greater than or equal to.
|
|
299
299
|
*/
|
|
300
300
|
readonly TextContains: "textContains";
|
|
301
|
+
/**
|
|
302
|
+
* Checks any text value matches a pattern, the whole text and ignoring case: `*` is any run of
|
|
303
|
+
* characters, `?` any one, and `~` makes the next `*`, `?` or `~` itself. Excel's filter
|
|
304
|
+
* `equal` with a wildcard (`a?ple`, `N*th`).
|
|
305
|
+
*/
|
|
306
|
+
readonly TextMatches: "textMatches";
|
|
301
307
|
/**
|
|
302
308
|
* Evaluates a formula expression.
|
|
303
309
|
*
|
|
@@ -608,8 +614,17 @@ export declare namespace ICondition {
|
|
|
608
614
|
limit?: number;
|
|
609
615
|
/**
|
|
610
616
|
* Flag indicating whether or not to filter by percent value. A `false` value filters by number of items.
|
|
617
|
+
*
|
|
618
|
+
* @remarks
|
|
619
|
+
* With {@link sum}, the percent of the values' total rather than of their count.
|
|
611
620
|
*/
|
|
612
621
|
percent?: boolean;
|
|
622
|
+
/**
|
|
623
|
+
* Whether {@link limit} bounds the values' sum rather than their count: values are taken from
|
|
624
|
+
* the top (or the bottom) until their running sum reaches the limit, the one that reaches it
|
|
625
|
+
* included. A pivot table's Top 10 by Sum, and by Percent with {@link percent}.
|
|
626
|
+
*/
|
|
627
|
+
sum?: boolean;
|
|
613
628
|
/**
|
|
614
629
|
* Flag indicating whether or not to filter by top order. A `false` value filters by bottom order.
|
|
615
630
|
*/
|
|
@@ -152,6 +152,11 @@ export declare class UnresolvedCondition<P = any> implements ICondition<P> {
|
|
|
152
152
|
* of an exception that costs the caller the entire rule.
|
|
153
153
|
*/
|
|
154
154
|
export declare function fromJSON<P = any>(json: ICondition.JSON<P> | null | undefined): ICondition<P> | null;
|
|
155
|
+
/**
|
|
156
|
+
* The predicate of `condition`'s operator: under the Display selector, an ordering comparison's
|
|
157
|
+
* text one ({@link DisplayComparable}), else the operator's own. `null` for an inert condition.
|
|
158
|
+
*/
|
|
159
|
+
export declare function createConditionPredicate(condition: ICondition, ctx: ICondition.IContext): MaybePromise<ICondition.Predicate | null>;
|
|
155
160
|
export declare function readThroughSelector(transformer: ICondition.Transformer<any, any> | null | undefined, value: Scalar, ctx: ICondition.IContext): Scalar | typeof ICondition.NotApplicable;
|
|
156
161
|
/**
|
|
157
162
|
* The condition's answer for the BLANK cells of a range, asked per cell — lazily, by the caller,
|
|
@@ -207,6 +212,15 @@ export interface EvalConditionAtOptions {
|
|
|
207
212
|
* registered with the engine or kept on the condition.
|
|
208
213
|
*/
|
|
209
214
|
export declare function evalConditionAt(condition: ICondition, value: Scalar, cell: IRange.CellCoords, options: EvalConditionAtOptions): Promise<boolean>;
|
|
215
|
+
/** The runtime's today, as a whole serial: what a relative period is evaluated on when it has no anchor. */
|
|
216
|
+
export declare function todaySerialOf(runtime: IRuntime): number;
|
|
217
|
+
/**
|
|
218
|
+
* `condition` with its `anchorDate` set to `today` when it is a relative period, as an apply
|
|
219
|
+
* evaluates it again: Excel holds the window a filter's period was last evaluated over, and writes
|
|
220
|
+
* it, until the filter is applied again (`probe-filter-dynamic-later-day.ps1`). A period named in
|
|
221
|
+
* every year (`Q1`, `M10`) has no anchor. `condition` itself when nothing changes.
|
|
222
|
+
*/
|
|
223
|
+
export declare function anchorTimePeriod<T extends ICondition.Input>(condition: T, today: number): T;
|
|
210
224
|
/**
|
|
211
225
|
* Iterates through all values executing a single condition (`conditions[0]`) and calling the
|
|
212
226
|
* appropriate callbacks. Used by Data Validation and Conditional Formatting.
|
|
@@ -188,7 +188,8 @@ interface State extends AnchoredConditional.State {
|
|
|
188
188
|
style: ICellStyle.Properties | null;
|
|
189
189
|
scale: IConditionalFormat.Scale | null;
|
|
190
190
|
stopIfTrue: boolean;
|
|
191
|
-
|
|
191
|
+
/** See {@link IConditionalFormat.JSON.pivotKey}. */
|
|
192
|
+
pivotKey: number | null;
|
|
192
193
|
/** Opaque third-party payload. Carried, never interpreted. */
|
|
193
194
|
ext: Record<string, unknown> | null;
|
|
194
195
|
}
|
|
@@ -498,11 +498,12 @@ export declare namespace IConditionalFormat {
|
|
|
498
498
|
*/
|
|
499
499
|
interface JSON extends Properties {
|
|
500
500
|
/**
|
|
501
|
-
*
|
|
501
|
+
* Present when the rule belongs to a pivot table: the number the table names it by, which is
|
|
502
|
+
* the priority the rule had in the file it was read from.
|
|
502
503
|
*
|
|
503
|
-
* @
|
|
504
|
+
* @internal
|
|
504
505
|
*/
|
|
505
|
-
|
|
506
|
+
pivotKey?: number;
|
|
506
507
|
/**
|
|
507
508
|
* Payload from a rule this build does not understand.
|
|
508
509
|
*
|