@sheetxl/sdk 0.8.0-beta.15 → 0.8.0-beta.17
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/{DDQtExVGSoCzAf6-.mjs → B-Q1-7RgSnA75J32.mjs} +506 -502
- package/browser/esm/{Cl3jq6y4Idilod82.mjs → BI6NwRrdLCbPdz6f.mjs} +3 -3
- package/browser/esm/{Blo0Hwg2ojXt99Dl.mjs → BWNQcQyx8wt6huOq.mjs} +2 -2
- package/browser/esm/{Do8TQqQvnFXRlFu-.mjs → BY_-BTa5h6HnnZ1W.mjs} +3 -3
- package/browser/esm/{D4ZCoKyNCJvDQAkx.mjs → BlkstmZEklk6Y1QD.mjs} +23 -22
- package/browser/esm/{DpaqR081c-Q7WemN.mjs → BuKA3E-Ev8Dp5W2I.mjs} +2 -2
- package/browser/esm/{Bbrhl946_QbCz5WS.mjs → Byp_bvP9G-tN6hcz.mjs} +588 -587
- package/browser/esm/{CMSeF5rGzeuMUydM.mjs → C0o6WpBojS7XhV5m.mjs} +3 -3
- package/browser/esm/CAjITJT3eLst9Rhi.mjs +686 -0
- package/browser/esm/{CZ_ZPliIkoh8BViV.mjs → CFywn1iiD35nNNUP.mjs} +10 -10
- package/browser/esm/{DJNLo8Rd_5UQP0U5.mjs → CHByUyHFA3ESf7DX.mjs} +2 -2
- package/browser/esm/CLT3qGy_brDIwbYd.mjs +2017 -0
- package/browser/esm/{Blo0jHze0bQxnKh4.mjs → CVV4xqwD8gIjYj1E.mjs} +78 -78
- package/browser/esm/{FHp0QfwZMIfP0Sry.mjs → CWkaF7gYWCkW7vDA.mjs} +2 -2
- package/browser/esm/{CNM5d4p0Y7In0rTf.mjs → DCs7bk-yx0UhCvQ4.mjs} +3 -3
- package/browser/esm/{BsGN0Tk0jVc2n0hy.mjs → DDNerAeet8uDYKhf.mjs} +3 -3
- package/browser/esm/{D6OqcO9IWPaY211T.mjs → DGUOlgm1_WFmf_xO.mjs} +2 -2
- package/browser/esm/{Dp4OIVjjAVhpD815.mjs → DJTEQZiR9IFTuN_4.mjs} +3 -3
- package/browser/esm/{KgTozk3nvOZzEG27.mjs → DJrnSjYjFxJvpQiH.mjs} +2 -2
- package/browser/esm/{D0KMmRjGOQUs7Ls-.mjs → DTXsi--x2wgqgwtf.mjs} +3 -3
- package/browser/esm/{CPUobTehcKZllBDS.mjs → DUB6Oj_aiV3f8s5_.mjs} +51 -49
- package/browser/esm/{Bw66vzKThXKvXvPI.mjs → DW3kFc5t4Wnh5E9S.mjs} +2 -2
- package/browser/esm/{BzG0p8RdGDWHttVr.mjs → DkmqFp_-iUIy_l3D.mjs} +4 -4
- package/browser/esm/{zjEXdQiQruTkUyf5.mjs → Dlk1kRgkiBIpUxd9.mjs} +22 -22
- package/browser/esm/{tm7XJ-Zd_04xWKG6.mjs → DnMFW_oKYQxRjP1l.mjs} +2 -2
- package/browser/esm/{DA4S5eqog20pG7b2.mjs → DrmOaEx6CQ91zBsP.mjs} +29 -29
- package/browser/esm/{D8PxKK6OrmancpLT.mjs → DsWDvmky7CgzX_7W.mjs} +3 -3
- package/browser/esm/{DMbcmIZ-G2fbWn8v.mjs → Dx_dZ7jrw5Hxeoot.mjs} +2 -2
- package/browser/esm/{BN1MW1nuBndrzryn.mjs → Dy0TAi9WafVT8eke.mjs} +3 -3
- package/browser/esm/{L7SKr6r1tmMwFx6Q.mjs → JmmPE8Vsj85wdV8H.mjs} +2 -2
- package/browser/esm/{CIab4UYcHQQKTHeD.mjs → O970I8lbI7okqG7N.mjs} +404 -404
- package/browser/esm/{DwH4H_p6gTAcpQ17.mjs → WR3-xqcK1gF3ewAR.mjs} +4 -4
- package/browser/esm/XHhDDWrJiZJgWxPM.mjs +165 -0
- package/browser/esm/{KsfZhE6ocmYobGjY.mjs → YwDdO4YwcIE4OB0D.mjs} +2 -2
- package/browser/esm/aYpwVCDSwMUuz147.mjs +527 -0
- package/browser/esm/{BGPT-k25jo0UhtT5.mjs → gQzj95vSMXdKhpWf.mjs} +29032 -24101
- package/browser/esm/index.mjs +886 -578
- package/browser/esm/{CxhXbk-5XhaK8UNs.mjs → jotvQFBWO2jXAhWx.mjs} +2 -2
- package/browser/esm/{CWyzk_3eDCR9bKq6.mjs → mufbL88lyIKJEWyP.mjs} +1528 -1433
- package/browser/esm/{BVsG6Vpvb1ZzpURJ.mjs → qNv1x-Ny9TPbvZzj.mjs} +2 -2
- package/browser/esm/{XrasOsWQ-64jwMn1.mjs → taTjDyUIIxq2eClH.mjs} +4 -4
- package/browser/esm/{CqzKBrmmV-fWRoK7.mjs → yudASWe8CWXYcGt3.mjs} +22 -22
- package/licenses/dependencies.txt +69 -69
- package/node/esm/{CjwmkzMtjj6OMJbO.mjs → -q1xF3_2jmk3QHIY.mjs} +487 -483
- package/node/esm/{DDIiQZTdeY4vdK8_.mjs → 7ZwdVIsOdcziHpMD.mjs} +189 -189
- package/node/esm/{C7h7SvhWNwQ9TfGh.mjs → B6BQYUDRxbRnzca4.mjs} +4 -4
- package/node/esm/{DjsOfZn5vYpB7L6U.mjs → B8MYgBe4XICBSROW.mjs} +52 -50
- package/node/esm/{B8KEX44VZTFTTKb3.mjs → BBUVvO9Ma1RzbKux.mjs} +3 -3
- package/node/esm/{D9RwzPR5s2mWrbCQ.mjs → BQko-9y6mf2oQK7u.mjs} +2 -2
- package/node/esm/{BNiG1ISiMjs-G2mE.mjs → BSlFO0_8UZ38gfeE.mjs} +22 -22
- package/node/esm/{DUft-qpAS4MMANwG.mjs → Bgy7uWJVGwkN7AlD.mjs} +3 -3
- package/node/esm/{DyIASfKKPuNl5Xx-.mjs → BhosJbKOPgbJSZMY.mjs} +2 -2
- package/node/esm/BoLecFnIxhYKGor-.mjs +2040 -0
- package/node/esm/{WBHD7ECKG6HZ5UpY.mjs → BwyoLlHutolJw7OW.mjs} +2 -2
- package/node/esm/{Dh8o-woVpmUL50BD.mjs → CDgUHRW6vSASfqNr.mjs} +2 -2
- package/node/esm/{BZ0IRjh2hYuI86xW.mjs → CHS84ZGEoH6aeHsZ.mjs} +31 -30
- package/node/esm/{BRnNpoS8VpkAhdVk.mjs → CIlH2fSEpdYBZwUA.mjs} +2 -2
- package/node/esm/{BlzPuXtKvF3Qfr0p.mjs → CIxb44vA81H9lRip.mjs} +2 -2
- package/node/esm/{Cx9nQSsuyqhayyBS.mjs → Cb1-r2RCxcJZB6fM.mjs} +32675 -27215
- package/node/esm/{DKdFasYVvjAitASZ.mjs → CjCqcGyCYGkaMQI9.mjs} +2 -2
- package/node/esm/{D7ia4o3y5Wvl__9Y.mjs → ClJJC8tBpgsqHwdn.mjs} +2 -2
- package/node/esm/{C-JEySqMuKdpcKe0.mjs → Cle-_21jebWv_-D4.mjs} +3 -3
- package/node/esm/{j8DqCwPgfIPICFtf.mjs → D51xu0rubo34Ppeg.mjs} +1005 -1004
- package/node/esm/{Ddd1y3TP0kqnnSs7.mjs → DCSJKgcCQzOV-dMJ.mjs} +3 -3
- package/node/esm/{ZtF9EuipL7Z9Iwfs.mjs → DCaLNIs-_4Y6hJ8S.mjs} +2 -2
- package/node/esm/DTkV7IK2_ODMJAP5.mjs +115 -0
- package/node/esm/DfbVTAhNutxM74E8.mjs +169 -0
- package/node/esm/{DVejVdSBXzAFQbqo.mjs → DfrxGbxxowFmm3SF.mjs} +2 -2
- package/node/esm/{DW3u4bBJIUaHZ6m-.mjs → DgsBYF3xbjgx9Mzp.mjs} +2 -2
- package/node/esm/{CHBlLTJaoPUVxA2J.mjs → DxnBYzOueAKEqaQT.mjs} +22 -22
- package/node/esm/M3jahkTgfUxGyeZv.mjs +530 -0
- package/node/esm/{-afI0SRg_vgXtea7.mjs → NnrDjio_xwTBs05n.mjs} +3 -3
- package/node/esm/{BqvqbFsPQB0gEvwF.mjs → OCrS6pBT6lGRu82d.mjs} +1762 -1674
- package/node/esm/XhDjStxKy-dd3WKa.mjs +199 -0
- package/node/esm/{D9zb5xVRehABdbXL.mjs → Yo7_havHbr9VL8R4.mjs} +2 -2
- package/node/esm/{MtRwC1PMkOEb1Nty.mjs → btVWSwUwMjM0J5fS.mjs} +3 -3
- package/node/esm/{DQqXPS05dvF0F-gh.mjs → cRz94rkuvDrA8mr9.mjs} +2 -2
- package/node/esm/{BfXLtDqsXXYeZ6LX.mjs → fwfAgq8qIADcHmY4.mjs} +78 -78
- package/node/esm/index.mjs +913 -598
- package/node/esm/{OnkJkCGFDjamqIUQ.mjs → jqBKdf9DG54xqpaw.mjs} +3 -3
- package/node/esm/{C6b4rM62pIWIywlM.mjs → nxxwAZZF8NsdErJW.mjs} +2 -2
- package/node/esm/{B07QPde9GloqsW8e.mjs → oGGVbqahqfK45-Uz.mjs} +4 -4
- package/node/esm/{BlHlBRvKGt-4CS0A.mjs → zh6vcRzFqdV1aYh5.mjs} +2 -2
- 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
|
@@ -6,6 +6,7 @@ import { IListener } from '../listener';
|
|
|
6
6
|
import { IResource, IResourceCollection } from '../resource';
|
|
7
7
|
import { IStringCollection } from '../string';
|
|
8
8
|
import { IProtection } from '../protection';
|
|
9
|
+
import { IFontCollection } from '../font';
|
|
9
10
|
import { IComment, ICommentCollection } from '../comment';
|
|
10
11
|
import { IColor } from '../color';
|
|
11
12
|
import { IHyperlink } from '../hyperlink';
|
|
@@ -29,6 +30,7 @@ import { IChartCollection } from '../chart';
|
|
|
29
30
|
import { IPicture } from '../picture';
|
|
30
31
|
import { InsertableCollection } from '../movable/_InsertableCollection';
|
|
31
32
|
import { IPivotTable, IPivotTableCollection } from '../pivot';
|
|
33
|
+
import { PivotTable } from '../pivot/PivotTable';
|
|
32
34
|
import { AnomalyFindings, AnomalySet, AnomalySource, RoleSource } from '../anomalies/_Anomalies';
|
|
33
35
|
import { CellKind } from './_Kinds';
|
|
34
36
|
import { IRichDataKind } from '../richData/IRichDataKind';
|
|
@@ -77,6 +79,7 @@ import { Outline } from '../outline/Outline';
|
|
|
77
79
|
import { PageLayout } from '../print/PageLayout';
|
|
78
80
|
import { ICalculation } from '../calculation';
|
|
79
81
|
import { ICalcGrid } from '../calculation/grid';
|
|
82
|
+
import { SpillEntry } from '../calculation/spatial';
|
|
80
83
|
import { SheetCellOptions } from './SheetCell';
|
|
81
84
|
import * as _SheetFilterUtils from './_SheetFilterUtils';
|
|
82
85
|
/** The font colors a workbook writes its roles in, and a key that compares by content. */
|
|
@@ -146,8 +149,8 @@ export declare class Worksheet implements IWorksheet {
|
|
|
146
149
|
*/
|
|
147
150
|
protected _movableSelectionAtCommitEnd: Map<ITransaction.ICommit, readonly string[]>;
|
|
148
151
|
/**
|
|
149
|
-
* What calculation passes realized while a root was open, told to listener nodes once it
|
|
150
|
-
* closes. See {@link _realizeCalcedValues}.
|
|
152
|
+
* What calculation passes realized while a root was open, told to listener nodes once it lands,
|
|
153
|
+
* or closes without landing. See {@link _realizeCalcedValues}.
|
|
151
154
|
*/
|
|
152
155
|
protected _heldPassRanges: IRange.Coords[] | null;
|
|
153
156
|
protected _emitter: ListenerEmitter<IWorksheet, IWorksheet.IListeners>;
|
|
@@ -266,6 +269,7 @@ export declare class Worksheet implements IWorksheet {
|
|
|
266
269
|
* Set while a cut on a protected sheet moves its cells, which it ruled on before it began (see
|
|
267
270
|
* `_copyFromNow`): the move's own steps (its clears, the rules it re-anchors) do not rule again,
|
|
268
271
|
* since the first of them changes the cells the next would read. Synchronous, like the move.
|
|
272
|
+
* A pivot table's layout clearing its own cells is ruled the same way ({@link _writePivotCells}).
|
|
269
273
|
*/
|
|
270
274
|
protected _isMoveRuled: boolean;
|
|
271
275
|
protected _lastRangeRead: {
|
|
@@ -327,6 +331,8 @@ export declare class Worksheet implements IWorksheet {
|
|
|
327
331
|
protected _emptyCell: ICell;
|
|
328
332
|
protected _cellOptions: SheetCellOptions;
|
|
329
333
|
protected _closed: boolean;
|
|
334
|
+
/** The grid holds pivot views this sheet told it ({@link _tellPivots}). */
|
|
335
|
+
protected _pivotsTold: boolean;
|
|
330
336
|
protected _cellBuffer: CellBuffer | null;
|
|
331
337
|
protected _defaultColWidthCache: number | null;
|
|
332
338
|
protected _defaultRowHeightCache: number | null;
|
|
@@ -547,6 +553,7 @@ export declare class Worksheet implements IWorksheet {
|
|
|
547
553
|
/** The same for the note boxes' index. */
|
|
548
554
|
takeShiftedNoteModels: () => Map<IMovable, ISpatialMap.Entry<MovableEntry>> | null;
|
|
549
555
|
markColumnHeaderTableNames: () => void;
|
|
556
|
+
tellPivots: () => void;
|
|
550
557
|
commitWithDirectives: (trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives) => void;
|
|
551
558
|
recordAutoFit: (trans: ITransaction, ranges: readonly IRange.Coords[], autoFit: boolean | ICellRange.AutoFitOptions) => void;
|
|
552
559
|
readonly styles: IStyleCollection;
|
|
@@ -786,9 +793,44 @@ export declare class Worksheet implements IWorksheet {
|
|
|
786
793
|
fill: IUsedRangeSpatialMap<SheetDirectStyle>;
|
|
787
794
|
content: IUsedRangeSpatialMap<SheetDirectStyle>;
|
|
788
795
|
}): IUsedRangeSpatialMap<SheetDirectStyle>;
|
|
789
|
-
/**
|
|
796
|
+
/**
|
|
797
|
+
* Logic lives in `_SheetMutations.updateStyles`.
|
|
798
|
+
*
|
|
799
|
+
* @remarks
|
|
800
|
+
* Over a pivot table the write is not the cells' own: it goes to the table
|
|
801
|
+
* ({@link _formatPivotTables}).
|
|
802
|
+
* @internal
|
|
803
|
+
*/
|
|
790
804
|
protected _updateStyles(ranges: readonly ISpatialMap.Entry<ICellStyle.Update>[], defaultUpdate?: ICellStyle.Update, // we do this because updateTuples may update each
|
|
791
805
|
options?: ICellStyle.UpdateOptions, calcedNumberFormat?: boolean): void;
|
|
806
|
+
/**
|
|
807
|
+
* A style written over a placed pivot table's cells is the table's, as Excel takes it: formats
|
|
808
|
+
* over the areas those cells are, which follow their items through a relayout
|
|
809
|
+
* (`PivotTable._formatCells`). Its other cells take it as their own, in the same step. Only a
|
|
810
|
+
* style given as plain properties is a table's; a callback, a cleared property or a value
|
|
811
|
+
* resolved per cell is written as the cells' own.
|
|
812
|
+
*
|
|
813
|
+
* @remarks
|
|
814
|
+
* A pivot cell's style marks a place in the table, not an address: North's label, East's
|
|
815
|
+
* subtotal, Apple's value under East. A relayout draws every cell again from the table, and a
|
|
816
|
+
* format goes wherever its place now is (`pivot-probes/probe-pivot-format-follows.ps1`): North's
|
|
817
|
+
* fill moves up with North when East collapses, and a fill on collapsed East's values moves to
|
|
818
|
+
* the `East Total` line when East expands with its subtotals at the bottom.
|
|
819
|
+
*
|
|
820
|
+
* So the table's formats are its definition's (`<formats>`), and they are the pivot tier of a
|
|
821
|
+
* cell's style ({@link PivotTable._getCellLayer}), where a table's style sits, below the direct
|
|
822
|
+
* one. A direct style inside a laid-out table is only what the table does not account for: what
|
|
823
|
+
* a file saved there and the table cannot explain. A relayout clears it, as Excel's does, since
|
|
824
|
+
* it has no place in the table to follow.
|
|
825
|
+
*
|
|
826
|
+
* Written as the cells' own instead, a format would be cleared by the next relayout, never reach
|
|
827
|
+
* Excel's `<formats>`, and could not undo what the table's style sets: over a table or pivot
|
|
828
|
+
* tier, a direct value matching the Normal style (not bold, 11 pt) is ignored.
|
|
829
|
+
*
|
|
830
|
+
* @returns `false` when no part of the write lands on a table.
|
|
831
|
+
* @internal
|
|
832
|
+
*/
|
|
833
|
+
protected _formatPivotTables(ranges: readonly ISpatialMap.Entry<ICellStyle.Update>[], defaultUpdate: ICellStyle.Update | undefined, options: ICellStyle.UpdateOptions | undefined): boolean;
|
|
792
834
|
/**
|
|
793
835
|
* Holds a style set on one cell in the buffer the cell writes of an open transaction are held in
|
|
794
836
|
* ({@link CellBuffer.holdStyle}).
|
|
@@ -1014,6 +1056,118 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1014
1056
|
* changes costs a walk of the tables. A restore is not told, as {@link _tellHidden}.
|
|
1015
1057
|
*/
|
|
1016
1058
|
protected _tellFiltered(): void;
|
|
1059
|
+
/** The tables a cut is moving, their cells not landed yet ({@link _cutPivots}, {@link _landPivots}). */
|
|
1060
|
+
protected _pivotsInTransit: PivotTable[] | null;
|
|
1061
|
+
/**
|
|
1062
|
+
* The tables a cut moved have their cells where they landed: the guard on them stands again,
|
|
1063
|
+
* and a blocked one is laid out there if it can be.
|
|
1064
|
+
* @internal
|
|
1065
|
+
*/
|
|
1066
|
+
_landPivots(): void;
|
|
1067
|
+
/**
|
|
1068
|
+
* What, but `table`, is in the cells `wanted`, past the cells `own` it holds now: another pivot
|
|
1069
|
+
* table, an array's cells or a value, the first of those found in that order; `null` for nothing.
|
|
1070
|
+
* What is in the way blocks it, as anything in a dynamic array's way does; formats are no
|
|
1071
|
+
* obstacle, and neither is a table's empty cells: Excel lays a pivot table over them
|
|
1072
|
+
* (`pivot-probes/probe-pivot-table-obstacle.ps1`).
|
|
1073
|
+
* @internal
|
|
1074
|
+
*/
|
|
1075
|
+
_pivotObstructionOf(table: IPivotTable, wanted: readonly IRange.Coords[], own: readonly IRange.Coords[]): PivotTable.Obstruction | null;
|
|
1076
|
+
/**
|
|
1077
|
+
* {@link IPivotTableCollection.add}: what can be refused is, before anything changes, and the
|
|
1078
|
+
* cache and the table land in one step with the table's cells.
|
|
1079
|
+
* @internal
|
|
1080
|
+
*/
|
|
1081
|
+
protected _addPivotTable(source: IPivotTableCollection.Source, location: ICellRange.Address, options?: IPivotTableCollection.AddOptions): Promise<IPivotTable>;
|
|
1082
|
+
/**
|
|
1083
|
+
* Refuses a name a pivot table on this sheet cannot take: empty, longer than 255 characters, or
|
|
1084
|
+
* another table's here, without regard to case (`pivot-probes/probe-pivot-table-api.ps1`, N01).
|
|
1085
|
+
* Excel cuts a longer name to 255 silently; this refuses it.
|
|
1086
|
+
*
|
|
1087
|
+
* @param table The table being renamed, whose own name is free to it; `null` for a new one.
|
|
1088
|
+
* @internal
|
|
1089
|
+
*/
|
|
1090
|
+
_assertPivotName(name: string, table: IPivotTable | null): void;
|
|
1091
|
+
/**
|
|
1092
|
+
* The top-left cell of the location a pivot table placed at `location` takes, refused where it
|
|
1093
|
+
* cannot go: on another sheet or in another pivot table. What else is in its cells is for its layout to judge
|
|
1094
|
+
* ({@link PivotTable._refreshFrom}'s `place`). Page fields need their rows and a blank one above the
|
|
1095
|
+
* table, so at the top of a sheet it moves down (A09, M05).
|
|
1096
|
+
*
|
|
1097
|
+
* @param pageCount How many page fields it has, each a row.
|
|
1098
|
+
* @param table The table being moved, whose own cells it may land on; `null` for a new one.
|
|
1099
|
+
* @internal
|
|
1100
|
+
*/
|
|
1101
|
+
_pivotAnchorAt(location: ICellRange.Address, pageCount: number, table: IPivotTable | null): IRange.Coords;
|
|
1102
|
+
/** The name Excel gives a new table: one past the highest number the workbook's tables have (A06, B12). */
|
|
1103
|
+
private _nextPivotName;
|
|
1104
|
+
/**
|
|
1105
|
+
* The order the sheet stores its cells in: what a pivot table's layout is asked to emit, so
|
|
1106
|
+
* {@link _writePivotCells} takes its runs as they are.
|
|
1107
|
+
* @internal
|
|
1108
|
+
*/
|
|
1109
|
+
_getPivotCellOrder(): 'rows' | 'columns';
|
|
1110
|
+
/**
|
|
1111
|
+
* Writes a pivot table's cells as stored values in the caller's batch: the values and direct
|
|
1112
|
+
* styles of `clears` cleared, as Excel's relayout rewrites each cell's format from the table's,
|
|
1113
|
+
* then `cells` written from `origin`, in the sheet's order ({@link _getPivotCellOrder}) and sparse:
|
|
1114
|
+
* each run goes in as it is, shifted, and a blank is not stored. The mutations are called directly: the
|
|
1115
|
+
* table is settling, so its guard stands aside, and no blocked table is laid out mid-write.
|
|
1116
|
+
* Text is stored as text, never parsed. On a protected sheet the layout has ruled
|
|
1117
|
+
* (`pivotTables`), so locked cells do not refuse its writes.
|
|
1118
|
+
* @internal
|
|
1119
|
+
*/
|
|
1120
|
+
_writePivotCells(clears: readonly IRange.Coords[], cells: Tuple.GridTuple<Scalar>, origin: {
|
|
1121
|
+
row: number;
|
|
1122
|
+
column: number;
|
|
1123
|
+
}): void;
|
|
1124
|
+
/**
|
|
1125
|
+
* The blocked pivot tables waiting on any of `ranges`, or `null` for none.
|
|
1126
|
+
*/
|
|
1127
|
+
protected _pivotsWaitingOn(ranges: readonly IRange.Coords[]): PivotTable[] | null;
|
|
1128
|
+
/**
|
|
1129
|
+
* Lays out again, in the caller's batch, each of `tables` whose way is clear now: Excel places a
|
|
1130
|
+
* blocked table as soon as what blocked it is gone (`pivot-probes/probe-pivot-spill.ps1`). On a
|
|
1131
|
+
* protected sheet it does so only where the lock allows pivot tables; otherwise the table stays
|
|
1132
|
+
* blocked (`pivot-probes/probe-pivot-protected.ps1`).
|
|
1133
|
+
*/
|
|
1134
|
+
protected _unblockPivots(tables: readonly PivotTable[]): void;
|
|
1135
|
+
/**
|
|
1136
|
+
* Fits the columns a pivot table covers to its cells alone, as Excel's update does: whatever else
|
|
1137
|
+
* is in those columns is not measured. Part of the layout's step: a fit owed to fonts still
|
|
1138
|
+
* loading runs later undescribed, so it is undone with the layout rather than on its own.
|
|
1139
|
+
* @internal
|
|
1140
|
+
*/
|
|
1141
|
+
_autoFitPivotColumns(extent: IRange.Coords): void;
|
|
1142
|
+
/**
|
|
1143
|
+
* Tells the grid the values this sheet's pivot tables show, where each sits now, for
|
|
1144
|
+
* `GETPIVOTDATA` ({@link ICalcGrid.setPivots}): after the load, and from inside an operation that
|
|
1145
|
+
* added, moved or deleted one. The pivot code is loaded the first time a modeled table asks; until
|
|
1146
|
+
* it is, nothing is told and `GETPIVOTDATA` keeps the value it was saved with. A table whose
|
|
1147
|
+
* values are not computed (not modeled, or not laid out) is told as there, at its location, so
|
|
1148
|
+
* `GETPIVOTDATA` on it keeps its saved value while one on no table is `#REF!`.
|
|
1149
|
+
* @internal
|
|
1150
|
+
*/
|
|
1151
|
+
_tellPivots(): void;
|
|
1152
|
+
/**
|
|
1153
|
+
* The pivot tables of a cut from `source` landing on `landing` (its own size), before its cells
|
|
1154
|
+
* move (`checkCutOfPivot`): one it holds whole moves with it, one it lands on whole is deleted,
|
|
1155
|
+
* part of either is refused, as is a table landing on a table. A moved table is anchored where
|
|
1156
|
+
* it lands at once, so the cut's clear does not take it for a table cleared; once the cells are
|
|
1157
|
+
* across the caller tells the grids ({@link _tellPivots}), which take the cells that moved with
|
|
1158
|
+
* it as its own, as they take a loaded table's.
|
|
1159
|
+
*
|
|
1160
|
+
* @returns Whether any table moved or was deleted.
|
|
1161
|
+
* @throws ExpectedError where Excel refuses the cut, and for a table moved to another sheet.
|
|
1162
|
+
* @internal
|
|
1163
|
+
*/
|
|
1164
|
+
_cutPivots(source: Worksheet, from: IRange.Coords, landing: IRange.Coords): boolean;
|
|
1165
|
+
/**
|
|
1166
|
+
* The spill the grid holds anchored at a cell: an array's, or a pivot table's laid-out cells.
|
|
1167
|
+
* `null` when none is anchored there; a blocked spill is not held (`ICalcGrid.getBlockedSpills`).
|
|
1168
|
+
* @internal
|
|
1169
|
+
*/
|
|
1170
|
+
_getSpillAt(row: number, column: number): SpillEntry | null;
|
|
1017
1171
|
/** @internal */
|
|
1018
1172
|
protected _getDefaultShiftAxis(coords?: IRange.Coords): IRange.Axis;
|
|
1019
1173
|
/** @internal */
|
|
@@ -1073,7 +1227,8 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1073
1227
|
/**
|
|
1074
1228
|
* Runs the fits owed (see {@link _autoFit}): one held runs for the first time as it was asked;
|
|
1075
1229
|
* one that ran against a stand-in runs again, leaving alone a custom size or a hidden row set
|
|
1076
|
-
* since (its first run already cleared what the caller asked to override).
|
|
1230
|
+
* since (its first run already cleared what the caller asked to override). A run again is
|
|
1231
|
+
* undescribed: it corrects the step its first run belongs to, and is undone with that step.
|
|
1077
1232
|
*
|
|
1078
1233
|
* @returns `false` if none were owed.
|
|
1079
1234
|
*/
|
|
@@ -1312,6 +1467,8 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1312
1467
|
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
1313
1468
|
protected _notifyTablesChange(): void;
|
|
1314
1469
|
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
1470
|
+
protected _notifyPivotTablesChange(): void;
|
|
1471
|
+
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
1315
1472
|
protected _notifyDataValidationsChange(): void;
|
|
1316
1473
|
/** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
|
|
1317
1474
|
protected _notifyProtectedRangesChange(): void;
|
|
@@ -1691,6 +1848,12 @@ export declare class Worksheet implements IWorksheet {
|
|
|
1691
1848
|
* @internal
|
|
1692
1849
|
*/
|
|
1693
1850
|
protected _onRootTransactionClose(commit: ITransaction.ICommit, isRollback?: boolean, isElided?: boolean, isAmend?: boolean): void;
|
|
1851
|
+
/**
|
|
1852
|
+
* Tells listener nodes of the passes held while an operation was open ({@link _heldPassRanges}).
|
|
1853
|
+
*
|
|
1854
|
+
* @internal
|
|
1855
|
+
*/
|
|
1856
|
+
protected _releaseHeldPassRanges(): void;
|
|
1694
1857
|
/**
|
|
1695
1858
|
* Keep the view's selection somewhere it can be once the sheet has changed: inside the sheet,
|
|
1696
1859
|
* and with its active cell on the top-left of the merge it falls in.
|
|
@@ -2118,8 +2281,8 @@ export declare class Worksheet implements IWorksheet {
|
|
|
2118
2281
|
protected _createCellControls(cellControls: IAnchoredMap<ICellControl, ICellControl.JSON>, key: keyof State, refs: IRange.JSONReference<ICellControl.JSON>[], createModel: (options: CellControl.ConstructorOptions) => ICellControl): IAnchoredMap<ICellControl, ICellControl.JSON>;
|
|
2119
2282
|
/**
|
|
2120
2283
|
* Loads the pivot tables into their anchored map, each anchored where its part says it sits.
|
|
2121
|
-
* The map moves and deletes them with structural edits; the table
|
|
2122
|
-
* (`
|
|
2284
|
+
* The map moves and deletes them with structural edits; the grid's spill of a table rules on
|
|
2285
|
+
* the edit (`SpillEntry.checkShift`).
|
|
2123
2286
|
* @internal
|
|
2124
2287
|
*/
|
|
2125
2288
|
protected _createPivotTables(pivotTables: IAnchoredMap<IPivotTable, IPivotTable.JSON>, key: keyof State, refs: IRange.JSONReference<IPivotTable.JSON>[], fromResourceId?: (resourceId: number) => IResource): IAnchoredMap<IPivotTable, IPivotTable.JSON>;
|
|
@@ -2157,7 +2320,6 @@ export declare class Worksheet implements IWorksheet {
|
|
|
2157
2320
|
/** {@inheritDoc IWorksheet.getNames} */
|
|
2158
2321
|
getNames(): INamedCollection;
|
|
2159
2322
|
/** {@inheritDoc IWorksheet.getCalculation} */
|
|
2160
|
-
/** {@inheritDoc IWorksheet.getCalculation} */
|
|
2161
2323
|
getCalculation(): ICalculation;
|
|
2162
2324
|
/** {@inheritDoc IWorksheet.createFormula} */
|
|
2163
2325
|
createFormula(expression: string, coords?: Partial<IRange.CellCoords>, options?: ICalculation.CreateFormulaOptions): ICalculation.IFormula;
|
|
@@ -2165,6 +2327,12 @@ export declare class Worksheet implements IWorksheet {
|
|
|
2165
2327
|
evaluate(expression: string, options?: number | ICalculation.EvaluateOptions & Partial<IRange.CellCoords> & ICalculation.CreateFormulaOptions): Promise<Scalar | IRange>;
|
|
2166
2328
|
/** {@inheritDoc IWorksheet.whenCalculationReady} */
|
|
2167
2329
|
whenCalculationReady(): Promise<ICalculation.Status>;
|
|
2330
|
+
/** {@inheritDoc IWorksheet.getFonts} */
|
|
2331
|
+
getFonts(): IFontCollection;
|
|
2332
|
+
/** {@inheritDoc IWorksheet.whenFontsReady} */
|
|
2333
|
+
whenFontsReady(): Promise<void>;
|
|
2334
|
+
/** {@inheritDoc IWorksheet.whenReady} */
|
|
2335
|
+
whenReady(): Promise<void>;
|
|
2168
2336
|
/** {@inheritDoc IWorksheet.getWorkbook} */
|
|
2169
2337
|
getWorkbook(): IWorkbook | null;
|
|
2170
2338
|
get [Symbol.toStringTag](): string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IRange } from '@sheetxl/primitives';
|
|
2
|
+
import { ISpatialMap, ISpatialQuery } from '../collections';
|
|
3
|
+
import { ICellStyle } from '../style';
|
|
4
|
+
import { IPivotTable } from '../pivot';
|
|
5
|
+
import { IAnchoredMap } from '../anchored/IAnchoredMap';
|
|
6
|
+
/** Where a pivot table sits ({@link pivotFootprintOf}). */
|
|
7
|
+
export interface PivotFootprint {
|
|
8
|
+
/** What it covers: its page fields, the blank row under them and its location; the anchor alone while blocked. */
|
|
9
|
+
extent: IRange.Coords;
|
|
10
|
+
/** Its own cells: the page fields' and the location's, without the blank row between, which is the sheet's. */
|
|
11
|
+
cells: IRange.Coords[];
|
|
12
|
+
/** It shows `#SPILL!` at its anchor. */
|
|
13
|
+
isBlocked: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Where `table` sits, from its definition and anchor: laid out, or `#SPILL!` at its anchor. `null`
|
|
17
|
+
* for a table that is not laid out.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare const pivotFootprintOf: (table: IPivotTable) => PivotFootprint | null;
|
|
21
|
+
/**
|
|
22
|
+
* The pivot tables placed over `coords`, each at what it holds, which it is anchored at, for the
|
|
23
|
+
* pivot tier of a cell: its style and its labels' insets. A table that is not placed, blocked
|
|
24
|
+
* among them, has none. Reads no calculation: a table renders as its definition and its cells say.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* The map's search, borrowed as it is: read-only.
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export declare const searchPivotPlacements: (pivotTables: IAnchoredMap<IPivotTable, IPivotTable.JSON>, coords: IRange.Coords) => ISpatialMap.Entry<IPivotTable>[];
|
|
31
|
+
/**
|
|
32
|
+
* The sheet's date and time formats: its direct styles' (`dateFormatSpatial`) and the cells its
|
|
33
|
+
* placed pivot tables give a date or time format, from their definitions and the formats a user put
|
|
34
|
+
* on them. `dateFormats` itself when the sheet has no pivot table. A cell's own number format wins
|
|
35
|
+
* over a table's, date or not (`contentStyles`, the direct content styles): a direct date format
|
|
36
|
+
* is found in `dateFormats`, a direct non-date one masks the table's date there.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export declare const withPivotDateFormats: (dateFormats: ISpatialQuery<string>, pivotTables: IAnchoredMap<IPivotTable, IPivotTable.JSON>, contentStyles: ISpatialQuery<{
|
|
40
|
+
getProperties(): ICellStyle.Properties | null;
|
|
41
|
+
}>) => ISpatialQuery<string>;
|
|
42
|
+
//# sourceMappingURL=_PivotFootprint.d.ts.map
|
|
@@ -2,6 +2,17 @@ import { IRange } from '@sheetxl/primitives';
|
|
|
2
2
|
import { Size } from '@sheetxl/utils';
|
|
3
3
|
import { ICellRange } from '../cellRange';
|
|
4
4
|
import { Worksheet } from './Worksheet';
|
|
5
|
+
/**
|
|
6
|
+
* {@link doAutoFit}'s options, with what only the sheet's own callers ask.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export interface DoAutoFitOptions extends ICellRange.AutoFitOptions {
|
|
10
|
+
/**
|
|
11
|
+
* Measure only the cells in the ranges. Otherwise a fit that shrinks measures the whole of each
|
|
12
|
+
* row or column it fits, as a fit asked for by a user does.
|
|
13
|
+
*/
|
|
14
|
+
within?: boolean;
|
|
15
|
+
}
|
|
5
16
|
/**
|
|
6
17
|
* Automatically adjusts row heights and column widths to fit cell content and styles.
|
|
7
18
|
* - Merges and sorts input ranges for efficient processing.
|
|
@@ -15,7 +26,7 @@ import { Worksheet } from './Worksheet';
|
|
|
15
26
|
* @param options AutoFit options (axis, expandOnly, skipCustomSize, etc).
|
|
16
27
|
* @internal
|
|
17
28
|
*/
|
|
18
|
-
export declare function doAutoFit(sheet: Worksheet, ranges: readonly IRange.Coords[], options?:
|
|
29
|
+
export declare function doAutoFit(sheet: Worksheet, ranges: readonly IRange.Coords[], options?: DoAutoFitOptions): void;
|
|
19
30
|
/**
|
|
20
31
|
* The size `range`'s content needs — what {@link doAutoFit} would commit, reduced to a `Size`
|
|
21
32
|
* instead of written.
|
|
@@ -11,8 +11,55 @@ import { IProperties } from '../type';
|
|
|
11
11
|
import { FormulaEntry } from '../calculation/grid';
|
|
12
12
|
import { CellStateIteratorContext } from './_SheetUtils';
|
|
13
13
|
import { SheetDirectStyle } from './style/SheetDirectStyle';
|
|
14
|
+
import { IAnchoredMap } from '../anchored/IAnchoredMap';
|
|
15
|
+
import { IPivotTable } from '../pivot';
|
|
14
16
|
import { RangeState, InternalTupleUpdate } from './_SheetStateTypes';
|
|
15
17
|
import { SheetMutationContext } from './Worksheet';
|
|
18
|
+
/** What {@link checkCutOfPivot} finds a cut does to the pivot tables. */
|
|
19
|
+
export interface PivotCut {
|
|
20
|
+
/** The tables the cut holds whole, which move with it, each with where it covers now. */
|
|
21
|
+
moves: {
|
|
22
|
+
table: IPivotTable;
|
|
23
|
+
extent: IRange.Coords;
|
|
24
|
+
}[];
|
|
25
|
+
/** The tables it lands on whole, which it deletes. */
|
|
26
|
+
covered: IPivotTable[];
|
|
27
|
+
}
|
|
28
|
+
/** A sheet's pivot tables, for {@link checkCutOfPivot}. */
|
|
29
|
+
export interface PivotCutSide {
|
|
30
|
+
pivotTables: IAnchoredMap<IPivotTable, IPivotTable.JSON>;
|
|
31
|
+
/** The cells cut, or where they land: the same size. */
|
|
32
|
+
coords: IRange.Coords;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Excel's rules for a cut over pivot tables (`pivot-probes/probe-pivot-cut.ps1`): a cut holding
|
|
36
|
+
* a table's whole extent moves the table; one holding part of it, or landing on part of one, is
|
|
37
|
+
* refused; one landing on all of one deletes it. The blank row under the page fields is the
|
|
38
|
+
* sheet's, cut from or into. A table that is not laid out is not judged. Runs before any
|
|
39
|
+
* state is mutated.
|
|
40
|
+
*
|
|
41
|
+
* @param from The cut, on its sheet.
|
|
42
|
+
* @param to Where it lands, on the destination sheet (the same maps as `from` within a sheet).
|
|
43
|
+
*/
|
|
44
|
+
export declare const checkCutOfPivot: (from: PivotCutSide, to: PivotCutSide) => PivotCut;
|
|
45
|
+
/** The part of a style write a pivot table takes: per style, the cells it lands on. */
|
|
46
|
+
export interface PivotStyleWrite {
|
|
47
|
+
table: IPivotTable;
|
|
48
|
+
styles: Map<ICellStyle.Properties, IRange.Coords[]>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A style write over pivot tables' cells, as Excel takes it: the part on a laid-out table's cells
|
|
52
|
+
* (its page fields' and location's; not while it shows `#SPILL!` or lays itself out, nor with
|
|
53
|
+
* preserve formatting off) is the table's, to become its formats; the rest is the cells' own, which
|
|
54
|
+
* the next relayout clears. Only a style given as plain
|
|
55
|
+
* properties ({@link asPlainStyle}) is a table's; any other passes through whole. The write's
|
|
56
|
+
* entries are cut by the tables' cells on a spatial map, where they overlap one another a later
|
|
57
|
+
* one merging over an earlier, as the cells' own write does. `null` when no part is a table's.
|
|
58
|
+
*/
|
|
59
|
+
export declare const splitStylesOverPivots: (pivotTables: IAnchoredMap<IPivotTable, IPivotTable.JSON>, ranges: readonly ISpatialMap.Entry<ICellStyle.Update>[], defaultUpdate: ICellStyle.Update | undefined) => {
|
|
60
|
+
tables: PivotStyleWrite[];
|
|
61
|
+
rest: ISpatialMap.Entry<ICellStyle.Update>[];
|
|
62
|
+
} | null;
|
|
16
63
|
/**
|
|
17
64
|
* The shared insert/delete engine (see SHEET-SPLIT-DESIGN §6e). Shifts every state map (values,
|
|
18
65
|
* spills, styles, merges, hyperlinks, comments, movables, tables, listeners, calc, …) one range at
|
|
@@ -146,6 +146,10 @@ export declare namespace RangeState {
|
|
|
146
146
|
* A table that this cell belongs to.
|
|
147
147
|
*/
|
|
148
148
|
autoTable?: ITable;
|
|
149
|
+
/**
|
|
150
|
+
* The pivot table laid out over this cell, whose style the cell takes.
|
|
151
|
+
*/
|
|
152
|
+
pivot?: IPivotTable;
|
|
149
153
|
/**
|
|
150
154
|
* Conditional styles.
|
|
151
155
|
*
|
|
@@ -281,6 +285,8 @@ export declare namespace RangeState {
|
|
|
281
285
|
readonly DateFormat: "dateFormat";
|
|
282
286
|
readonly Table: "table";
|
|
283
287
|
readonly AutoTable: "autoTable";
|
|
288
|
+
/** A pivot table laid out over the cell: its style is the pivot tier of the cell's style. */
|
|
289
|
+
readonly Pivot: "pivot";
|
|
284
290
|
readonly DataValidations: "dataValidations";
|
|
285
291
|
readonly Merge: "merge";
|
|
286
292
|
readonly Hyperlink: "hyperlink";
|
|
@@ -528,5 +534,10 @@ export interface InternalTupleUpdate {
|
|
|
528
534
|
* from an operation that has ruled on the sheet's protection, so locked cells do not refuse it.
|
|
529
535
|
*/
|
|
530
536
|
isCalculatedFill?: boolean;
|
|
537
|
+
/**
|
|
538
|
+
* A pivot table's own cells, written by its layout, which has ruled on the sheet's protection
|
|
539
|
+
* (`pivotTables`), so locked cells do not refuse it.
|
|
540
|
+
*/
|
|
541
|
+
isPivotLayout?: boolean;
|
|
531
542
|
}
|
|
532
543
|
//# sourceMappingURL=_SheetStateTypes.d.ts.map
|
|
@@ -317,6 +317,12 @@ export declare class SheetCellStyle implements ICellStyle {
|
|
|
317
317
|
hasVisibleStyling(): boolean;
|
|
318
318
|
/** {@inheritDoc ICellStyle.isNormal} */
|
|
319
319
|
isNormal(): boolean;
|
|
320
|
+
/**
|
|
321
|
+
* The Normal style of this style's collection, for what Excel measures in Normal's font rather
|
|
322
|
+
* than the cell's (the indent unit); `null` outside a collection.
|
|
323
|
+
* @internal
|
|
324
|
+
*/
|
|
325
|
+
_getNormal(): ICellStyle | null;
|
|
320
326
|
/**
|
|
321
327
|
* The AUTHORED (explicit) properties of this style: the direct layer values plus the `named`
|
|
322
328
|
* reference. Never includes cascade-resolved values (named/table/conditional results) - those
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { IRange, Scalar } from '@sheetxl/primitives';
|
|
2
|
+
import { IProperties } from '../../type';
|
|
3
|
+
import { IBorders } from '../../border';
|
|
4
|
+
import { ICellStyle, IStyleCollection } from '../../style';
|
|
5
|
+
import { ITableStyle } from '../../table';
|
|
6
|
+
import { PivotStructure, PivotStyleElement, PivotStyleOptions, PivotStripeSizes } from '../../pivot/_PivotStructure';
|
|
7
|
+
/**
|
|
8
|
+
* A pivot table style laid over cells: each cell's style is the style's elements that cover it,
|
|
9
|
+
* merged in the pivot order, a later element winning what an earlier one also sets.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* An element's borders outline each of its bands, with its inside lines between the band's cells,
|
|
13
|
+
* and merge like its other properties: a cell's own line on a side is the last element's that draws
|
|
14
|
+
* one there. A side two cells share is one line, as Excel draws it: of the two cells' own lines, the
|
|
15
|
+
* later element's in the pivot order, whatever its weight or color; so a subheading's thin top shows
|
|
16
|
+
* over the header row's medium bottom, and a subheading's bottom over the whole table's inside line
|
|
17
|
+
* (`pivot-probes/probe-pivot-style-screen.ps1`, the live window; `DisplayFormat` reports the heavier,
|
|
18
|
+
* then the darker, which is not what Excel draws). Two lines of the same element: the heavier, then
|
|
19
|
+
* the darker, unprobed. The row under the page fields, which no element covers, shows the page
|
|
20
|
+
* fields' bottom line.
|
|
21
|
+
*
|
|
22
|
+
* A cell's style is a function of its elements and of each side's line; merged styles are kept
|
|
23
|
+
* by that permutation, so a table resolves to a few distinct styles however large it is.
|
|
24
|
+
*/
|
|
25
|
+
export declare abstract class PivotElementsStyle implements IProperties.ICellRanged<ICellStyle.Properties> {
|
|
26
|
+
protected _styles: IStyleCollection;
|
|
27
|
+
protected _properties: Readonly<ITableStyle.Properties>;
|
|
28
|
+
protected _coords: IRange.Coords;
|
|
29
|
+
protected _permCache: Map<string, Readonly<ICellStyle.Properties> | null>;
|
|
30
|
+
protected _luminances: Map<string, number>;
|
|
31
|
+
/**
|
|
32
|
+
* @param properties The style's resolved properties (`ITableStyle.getProperties`).
|
|
33
|
+
* @param coords The cells it covers.
|
|
34
|
+
*/
|
|
35
|
+
constructor(styles: IStyleCollection, properties: Readonly<ITableStyle.Properties>, coords: IRange.Coords);
|
|
36
|
+
/** {@inheritDoc IProperties.ICellRanged.getCoords} */
|
|
37
|
+
getCoords(): IRange.Coords;
|
|
38
|
+
/** The elements covering a cell, from the top-left, in the pivot order; empty outside. */
|
|
39
|
+
protected abstract _coveringAt(row: number, column: number): PivotStyleElement[];
|
|
40
|
+
/** Which band of `element` a cell is in: two neighbors share an inside line only in the same band. */
|
|
41
|
+
protected abstract _bandOf(row: number, column: number, element: PivotStyleElement): string;
|
|
42
|
+
/** The style's elements covering a cell, from the top-left; those the style leaves unset dropped. */
|
|
43
|
+
protected _elementsAt(row: number, column: number): PivotStyleElement[];
|
|
44
|
+
/**
|
|
45
|
+
* A cell's own line on one side: of `elements` (the cell's, in the pivot order), the last that
|
|
46
|
+
* draws one there - its inside line where `across`, the elements whose band goes on across the
|
|
47
|
+
* side, has it, its outer line where it ends. `null` when none does, or the last says none.
|
|
48
|
+
*/
|
|
49
|
+
protected _ownLine(elements: readonly PivotStyleElement[], across: ReadonlySet<PivotStyleElement>, side: keyof IBorders.Properties, inside: keyof IBorders.Properties): {
|
|
50
|
+
element: PivotStyleElement;
|
|
51
|
+
line: keyof IBorders.Properties;
|
|
52
|
+
} | null;
|
|
53
|
+
/**
|
|
54
|
+
* Of two cells' lines on the side they share, the one Excel draws: the later element's, then the
|
|
55
|
+
* heavier, then the darker.
|
|
56
|
+
*/
|
|
57
|
+
protected _shownLine<T extends {
|
|
58
|
+
element: PivotStyleElement;
|
|
59
|
+
line: keyof IBorders.Properties;
|
|
60
|
+
}>(a: T | null, b: T | null): T | null;
|
|
61
|
+
/** A color's relative luminance (Rec. 709), by its spelling; black when it has none. */
|
|
62
|
+
protected _luminance(color: unknown): number;
|
|
63
|
+
/** {@inheritDoc IProperties.ICellRanged.getPropertiesAt} */
|
|
64
|
+
getPropertiesAt(rowIndex: number, colIndex: number, _value: Scalar): Readonly<ICellStyle.Properties>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A pivot table style laid over a laid-out pivot table: the elements that cover each cell are
|
|
68
|
+
* {@link pivotElementsAt}'s, their bands {@link pivotBandOf}'s. The instance is the table's for one
|
|
69
|
+
* layout, style and style collection ({@link PivotTable._getRangedStyle}).
|
|
70
|
+
*/
|
|
71
|
+
export declare class PivotRangedStyle extends PivotElementsStyle {
|
|
72
|
+
protected _structure: PivotStructure;
|
|
73
|
+
protected _options: PivotStyleOptions;
|
|
74
|
+
protected _stripes: PivotStripeSizes;
|
|
75
|
+
/**
|
|
76
|
+
* @param properties The style's resolved properties (`ITableStyle.getProperties`).
|
|
77
|
+
* @param origin The top-left cell of the table's page fields and location.
|
|
78
|
+
*/
|
|
79
|
+
constructor(styles: IStyleCollection, properties: Readonly<ITableStyle.Properties>, structure: PivotStructure, origin: IRange.CellCoords, options: PivotStyleOptions);
|
|
80
|
+
protected _coveringAt(row: number, column: number): PivotStyleElement[];
|
|
81
|
+
protected _bandOf(row: number, column: number, element: PivotStyleElement): string;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=SheetPivotStyle.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ICellStyle } from '../../style/ICellStyle';
|
|
2
|
+
/**
|
|
3
|
+
* The Normal style `style` resolves against, or `style` itself when it has none.
|
|
4
|
+
*/
|
|
5
|
+
export declare function normalOf(style: ICellStyle): ICellStyle;
|
|
6
|
+
/**
|
|
7
|
+
* The width in px of one indent level: three spaces of the Normal font, each rounded to a whole
|
|
8
|
+
* px, whatever the cell's own font. Measured against Excel
|
|
9
|
+
* (`private-assets/scripts/pivot-probes/probe-pivot-label-geometry.ps1`): 9 px under Calibri 11 and
|
|
10
|
+
* Aptos Narrow 11, 18 px under Arial 16, the same for a cell at 8 pt or 36 pt. Cached per Normal
|
|
11
|
+
* style until a font arrives.
|
|
12
|
+
*/
|
|
13
|
+
export declare function indentUnit(style: ICellStyle): number;
|
|
14
|
+
//# sourceMappingURL=_IndentUnit.d.ts.map
|
|
@@ -28,7 +28,7 @@ export declare class SheetCellHeader implements ICellHeader {
|
|
|
28
28
|
isCustomSize(): boolean;
|
|
29
29
|
/** {@inheritDoc ICellHeader.getSheetHeader} */
|
|
30
30
|
getSheetHeader(): ISheetHeader;
|
|
31
|
-
/** {@inheritDoc
|
|
31
|
+
/** {@inheritDoc ICellHeader.getColumn} */
|
|
32
32
|
getColumn(): ITable.IColumn | null;
|
|
33
33
|
/** {@inheritDoc ICellHeader.asCell} */
|
|
34
34
|
asCell(): ICell;
|