@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.
Files changed (195) hide show
  1. package/LICENSE.md +8 -7
  2. package/browser/esm/4MbBwfmW2hDXk9_w.mjs +165 -0
  3. package/browser/esm/{zjEXdQiQruTkUyf5.mjs → 9YWdxmSjzLN4j_ts.mjs} +22 -22
  4. package/browser/esm/B6BdiHigbUdbZp3J.mjs +686 -0
  5. package/browser/esm/{D8PxKK6OrmancpLT.mjs → BF_QwkZ_hs2rFoTT.mjs} +3 -3
  6. package/browser/esm/{Do8TQqQvnFXRlFu-.mjs → BMo2_9Ul36IwRm3S.mjs} +3 -3
  7. package/browser/esm/{DDQtExVGSoCzAf6-.mjs → BWY1qiidTUBVPJoD.mjs} +506 -502
  8. package/browser/esm/{DA4S5eqog20pG7b2.mjs → Bf80epSsm_RyAOb9.mjs} +29 -29
  9. package/browser/esm/{FHp0QfwZMIfP0Sry.mjs → BfoE6Dn_GQCIkQD3.mjs} +2 -2
  10. package/browser/esm/{D4ZCoKyNCJvDQAkx.mjs → BlMYYQZP-QM-iBHz.mjs} +23 -22
  11. package/browser/esm/{CWyzk_3eDCR9bKq6.mjs → BqT-ASHP0NVSUUnY.mjs} +1528 -1433
  12. package/browser/esm/{DwH4H_p6gTAcpQ17.mjs → BtNuoQIrrHw_jnbJ.mjs} +4 -4
  13. package/browser/esm/BxFzcCYhvo9NXFjC.mjs +527 -0
  14. package/browser/esm/{BsGN0Tk0jVc2n0hy.mjs → BxYuRTSF9ykc-Tpz.mjs} +3 -3
  15. package/browser/esm/{KgTozk3nvOZzEG27.mjs → C2PvZwqK-uvsugVS.mjs} +2 -2
  16. package/browser/esm/C3JOjQwdG9kAig7i.mjs +2017 -0
  17. package/browser/esm/{Blo0Hwg2ojXt99Dl.mjs → C5x0EzqElYGTiTQc.mjs} +2 -2
  18. package/browser/esm/{Bbrhl946_QbCz5WS.mjs → CMChv-fCFh68VQQt.mjs} +588 -587
  19. package/browser/esm/{Cl3jq6y4Idilod82.mjs → CRbQATfI0yZxe1kX.mjs} +3 -3
  20. package/browser/esm/{CxhXbk-5XhaK8UNs.mjs → CUu3zeHqcwMRYiov.mjs} +2 -2
  21. package/browser/esm/{CNM5d4p0Y7In0rTf.mjs → C_jLGkFemj55_BP3.mjs} +3 -3
  22. package/browser/esm/{BGPT-k25jo0UhtT5.mjs → CkZoDPUCK5jMUaeJ.mjs} +26901 -22016
  23. package/browser/esm/{DMbcmIZ-G2fbWn8v.mjs → D-iHJ3q4nwOLcn1D.mjs} +2 -2
  24. package/browser/esm/{KsfZhE6ocmYobGjY.mjs → D807piM0VSokWz-L.mjs} +2 -2
  25. package/browser/esm/{BVsG6Vpvb1ZzpURJ.mjs → DW3oQ39IF0bsc_lm.mjs} +2 -2
  26. package/browser/esm/{BzG0p8RdGDWHttVr.mjs → DcB52JPBPmkc3l1m.mjs} +4 -4
  27. package/browser/esm/{CZ_ZPliIkoh8BViV.mjs → DlVnybrgwZWxWN3_.mjs} +10 -10
  28. package/browser/esm/{CqzKBrmmV-fWRoK7.mjs → DvVhatd0J1ch3OCO.mjs} +22 -22
  29. package/browser/esm/{tm7XJ-Zd_04xWKG6.mjs → Dx9Fya60meMpuHqm.mjs} +2 -2
  30. package/browser/esm/{Blo0jHze0bQxnKh4.mjs → HV0FkJ6k3Ils318J.mjs} +78 -78
  31. package/browser/esm/{DJNLo8Rd_5UQP0U5.mjs → JV9Szh5qTssjxJoE.mjs} +2 -2
  32. package/browser/esm/{D0KMmRjGOQUs7Ls-.mjs → KpuD1kEcWB7cT0VM.mjs} +3 -3
  33. package/browser/esm/{Bw66vzKThXKvXvPI.mjs → U4FL-QeC0bRUhTEo.mjs} +2 -2
  34. package/browser/esm/{Dp4OIVjjAVhpD815.mjs → WLlpmgLN5OVLoLrC.mjs} +3 -3
  35. package/browser/esm/{D6OqcO9IWPaY211T.mjs → WR146UAqrsUsL39e.mjs} +2 -2
  36. package/browser/esm/{CPUobTehcKZllBDS.mjs → WcHfawW2lkTHtWUd.mjs} +51 -49
  37. package/browser/esm/{XrasOsWQ-64jwMn1.mjs → Zp5-cTJ0Llb6EfGi.mjs} +4 -4
  38. package/browser/esm/{CMSeF5rGzeuMUydM.mjs → ad9PX897hYE4Srkc.mjs} +3 -3
  39. package/browser/esm/{CIab4UYcHQQKTHeD.mjs → d_t-7d5BD1AdHg3u.mjs} +404 -404
  40. package/browser/esm/{L7SKr6r1tmMwFx6Q.mjs → dwGdnbV-CykjNrlm.mjs} +2 -2
  41. package/browser/esm/{DpaqR081c-Q7WemN.mjs → e69NcYnKMLnAmqyA.mjs} +2 -2
  42. package/browser/esm/index.mjs +886 -578
  43. package/browser/esm/{BN1MW1nuBndrzryn.mjs → r-o0UCm7KtluNmyK.mjs} +3 -3
  44. package/licenses/dependencies.txt +69 -69
  45. package/node/esm/{DjsOfZn5vYpB7L6U.mjs → 446KYBjJQa8g-8Gg.mjs} +52 -50
  46. package/node/esm/{BlHlBRvKGt-4CS0A.mjs → 5OfKfTRX2_y2NwpU.mjs} +2 -2
  47. package/node/esm/{BRnNpoS8VpkAhdVk.mjs → A3PEHO1HJvkHfb5n.mjs} +2 -2
  48. package/node/esm/{ZtF9EuipL7Z9Iwfs.mjs → B4WUGzJBkQu7BXRm.mjs} +2 -2
  49. package/node/esm/{DKdFasYVvjAitASZ.mjs → BH8J6vKSO5zI_TWo.mjs} +2 -2
  50. package/node/esm/BLmdKnkLwkb3wWe6.mjs +2040 -0
  51. package/node/esm/{D9RwzPR5s2mWrbCQ.mjs → BZSxu_ZqX8-Uczzn.mjs} +2 -2
  52. package/node/esm/{-afI0SRg_vgXtea7.mjs → BfPBiAgVmWhuFgFP.mjs} +3 -3
  53. package/node/esm/{OnkJkCGFDjamqIUQ.mjs → Bknw7zWZhl2-w1pi.mjs} +3 -3
  54. package/node/esm/{BNiG1ISiMjs-G2mE.mjs → BvIPsPiHhMclZ1kH.mjs} +22 -22
  55. package/node/esm/{B07QPde9GloqsW8e.mjs → By2TFKOjA1HekZap.mjs} +4 -4
  56. package/node/esm/{D9zb5xVRehABdbXL.mjs → BywIhvYkWk2o7MSW.mjs} +2 -2
  57. package/node/esm/{BZ0IRjh2hYuI86xW.mjs → C3zyhnMwQ2hRQBz7.mjs} +31 -30
  58. package/node/esm/{DVejVdSBXzAFQbqo.mjs → C884edhUf9yMqpPp.mjs} +2 -2
  59. package/node/esm/{DDIiQZTdeY4vdK8_.mjs → CDHY-0OyQ9348Brb.mjs} +189 -189
  60. package/node/esm/{BlzPuXtKvF3Qfr0p.mjs → CERNLhFrAwtu_p-q.mjs} +2 -2
  61. package/node/esm/{BfXLtDqsXXYeZ6LX.mjs → CFkX_Cn6avQqQiVC.mjs} +78 -78
  62. package/node/esm/CJDV8P3hI8lu--3Z.mjs +530 -0
  63. package/node/esm/{C6b4rM62pIWIywlM.mjs → CKwiipdPJGzAiPjg.mjs} +2 -2
  64. package/node/esm/{DUft-qpAS4MMANwG.mjs → CLtUMJfKsy4SevWE.mjs} +3 -3
  65. package/node/esm/{Cx9nQSsuyqhayyBS.mjs → CVPieTgKCwkL21nD.mjs} +32752 -27295
  66. package/node/esm/{DW3u4bBJIUaHZ6m-.mjs → C_fYuynP2a_70WdL.mjs} +2 -2
  67. package/node/esm/{C-JEySqMuKdpcKe0.mjs → CgdNA3B_GFG_yJiN.mjs} +3 -3
  68. package/node/esm/Cs3ibv6YHCDwLRlk.mjs +115 -0
  69. package/node/esm/{CjwmkzMtjj6OMJbO.mjs → Cxak8i2NidZ4Uv6v.mjs} +487 -483
  70. package/node/esm/{MtRwC1PMkOEb1Nty.mjs → D88A3UpCyGRjcX3U.mjs} +3 -3
  71. package/node/esm/{B8KEX44VZTFTTKb3.mjs → DBIUe2BC9xU7qMHR.mjs} +3 -3
  72. package/node/esm/{C7h7SvhWNwQ9TfGh.mjs → DELfV5HQZo1mInBd.mjs} +4 -4
  73. package/node/esm/{WBHD7ECKG6HZ5UpY.mjs → DOt3t-13tsnM7Fj6.mjs} +2 -2
  74. package/node/esm/{BqvqbFsPQB0gEvwF.mjs → DfWc3nW_Z_qqc_Wf.mjs} +1762 -1674
  75. package/node/esm/DgnwKbUEyQN5_gWT.mjs +169 -0
  76. package/node/esm/{D7ia4o3y5Wvl__9Y.mjs → Dhv9JymnXqcF54oo.mjs} +2 -2
  77. package/node/esm/{CHBlLTJaoPUVxA2J.mjs → DvtyKKzOnoOM80NB.mjs} +22 -22
  78. package/node/esm/{Dh8o-woVpmUL50BD.mjs → KDGrIa9R5XzWfjM2.mjs} +2 -2
  79. package/node/esm/{DyIASfKKPuNl5Xx-.mjs → RTwm9ge1KoPdlBNt.mjs} +2 -2
  80. package/node/esm/{DQqXPS05dvF0F-gh.mjs → _RIAmJI98l6bIFfZ.mjs} +2 -2
  81. package/node/esm/{j8DqCwPgfIPICFtf.mjs → bIGdvfpnijWeCac6.mjs} +1005 -1004
  82. package/node/esm/index.mjs +913 -598
  83. package/node/esm/kaiXmn0AA5WDsLPo.mjs +199 -0
  84. package/node/esm/{Ddd1y3TP0kqnnSs7.mjs → mTIhoz1gEcaEm7s1.mjs} +3 -3
  85. package/package.json +7 -7
  86. package/resources/locales/de/model.msg.json +82 -1
  87. package/resources/locales/en/model.msg.json +80 -1
  88. package/types/scripting-api.json +9967 -9497
  89. package/types/scripting-enums.json +27 -0
  90. package/types/scripting.d.ts +2282 -166
  91. package/types/src/.generated/wasm/sdk.d.ts +332 -0
  92. package/types/src/calculation/Calculation.d.ts +8 -0
  93. package/types/src/calculation/ICalculation.d.ts +51 -0
  94. package/types/src/calculation/compiler/Types.d.ts +5 -0
  95. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +1 -1
  96. package/types/src/calculation/formula/FormulaBlock.d.ts +2 -0
  97. package/types/src/calculation/formula/IFormulaBlock.d.ts +18 -0
  98. package/types/src/calculation/grid/CalcGrid.d.ts +5 -1
  99. package/types/src/calculation/grid/CalcGridBackend.d.ts +36 -1
  100. package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -0
  101. package/types/src/calculation/grid/CalcGridUtils.d.ts +4 -2
  102. package/types/src/calculation/grid/FormulaHost.d.ts +3 -1
  103. package/types/src/calculation/grid/ICalcGrid.d.ts +88 -0
  104. package/types/src/calculation/grid/_CalcRequest.d.ts +9 -0
  105. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +2 -0
  106. package/types/src/calculation/spatial/SpillEntry.d.ts +55 -4
  107. package/types/src/calculation/state/CalcNode.d.ts +6 -3
  108. package/types/src/calculation/state/CalculationContext.d.ts +4 -2
  109. package/types/src/calculation/state/_PivotView.d.ts +22 -0
  110. package/types/src/cell/ICell.d.ts +1 -21
  111. package/types/src/cellRange/ICellRange.d.ts +18 -2
  112. package/types/src/collections/MixedTypedArrayList.d.ts +16 -2
  113. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +10 -0
  114. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +3 -0
  115. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +3 -0
  116. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +3 -0
  117. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +3 -0
  118. package/types/src/condition/BuiltInOperators/MatchesOperator.d.ts +10 -0
  119. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
  120. package/types/src/condition/BuiltInOperators/index.d.ts +2 -0
  121. package/types/src/condition/Condition.d.ts +1 -0
  122. package/types/src/condition/ICondition.d.ts +15 -0
  123. package/types/src/condition/_ConditionUtils.d.ts +14 -0
  124. package/types/src/conditionalFormat/ConditionalFormat.d.ts +2 -1
  125. package/types/src/conditionalFormat/IConditionalFormat.d.ts +4 -3
  126. package/types/src/license/LicenseDetails.d.ts +27 -0
  127. package/types/src/license/LicenseManager.d.ts +24 -7
  128. package/types/src/license/_Utils.d.ts +34 -3
  129. package/types/src/license/index.d.ts +1 -0
  130. package/types/src/license/runtime.browser.d.ts +32 -4
  131. package/types/src/license/runtime.node.d.ts +8 -5
  132. package/types/src/license/summary.d.ts +18 -0
  133. package/types/src/pivot/IPivotTable.d.ts +1549 -13
  134. package/types/src/pivot/IPivotTableCollection.d.ts +70 -4
  135. package/types/src/pivot/PivotCache.d.ts +95 -11
  136. package/types/src/pivot/PivotDataField.d.ts +73 -0
  137. package/types/src/pivot/PivotField.d.ts +142 -0
  138. package/types/src/pivot/PivotTable.d.ts +548 -14
  139. package/types/src/pivot/PivotTableCollection.d.ts +18 -3
  140. package/types/src/pivot/_PivotAreas.d.ts +48 -0
  141. package/types/src/pivot/_PivotControls.d.ts +140 -0
  142. package/types/src/pivot/_PivotEngine.d.ts +9 -0
  143. package/types/src/pivot/_PivotGroups.d.ts +25 -0
  144. package/types/src/pivot/_PivotItems.d.ts +167 -0
  145. package/types/src/pivot/_PivotStructure.d.ts +237 -0
  146. package/types/src/pivot/_PivotStylePreview.d.ts +21 -0
  147. package/types/src/pivot/_PivotUtils.d.ts +37 -0
  148. package/types/src/pivot/engine/PivotAdd.d.ts +37 -0
  149. package/types/src/pivot/engine/PivotData.d.ts +65 -0
  150. package/types/src/pivot/engine/PivotEdit.d.ts +45 -0
  151. package/types/src/pivot/engine/PivotFilters.d.ts +50 -0
  152. package/types/src/pivot/engine/PivotFormulas.d.ts +72 -0
  153. package/types/src/pivot/engine/PivotLayout.d.ts +133 -0
  154. package/types/src/pivot/engine/PivotMove.d.ts +24 -0
  155. package/types/src/pivot/engine/PivotRefresh.d.ts +87 -0
  156. package/types/src/pivot/engine/PivotSort.d.ts +26 -0
  157. package/types/src/pivot/engine/PivotViewBuilder.d.ts +22 -0
  158. package/types/src/pivot/engine/index.d.ts +15 -0
  159. package/types/src/pivot/index.d.ts +4 -0
  160. package/types/src/pivot/kernel/KernelPivot.d.ts +63 -0
  161. package/types/src/pivot/kernel/_KernelLeaves.d.ts +100 -0
  162. package/types/src/pivot/kernel/_PivotAxisTree.d.ts +71 -0
  163. package/types/src/primitives/Range.d.ts +12 -1
  164. package/types/src/sheet/IWorksheet.d.ts +35 -0
  165. package/types/src/sheet/SheetCell.d.ts +21 -14
  166. package/types/src/sheet/SheetRange.d.ts +3 -0
  167. package/types/src/sheet/Worksheet.d.ts +175 -7
  168. package/types/src/sheet/_PivotFootprint.d.ts +42 -0
  169. package/types/src/sheet/_SheetAutoFitUtils.d.ts +12 -1
  170. package/types/src/sheet/_SheetMutations.d.ts +47 -0
  171. package/types/src/sheet/_SheetStateTypes.d.ts +11 -0
  172. package/types/src/sheet/style/SheetCellStyle.d.ts +6 -0
  173. package/types/src/sheet/style/SheetPivotStyle.d.ts +83 -0
  174. package/types/src/sheet/style/_IndentUnit.d.ts +14 -0
  175. package/types/src/sheetHeader/SheetCellHeader.d.ts +1 -1
  176. package/types/src/slicer/ISlicer.d.ts +114 -34
  177. package/types/src/slicer/ITimeline.d.ts +61 -0
  178. package/types/src/slicer/Slicer.d.ts +76 -3
  179. package/types/src/slicer/_PivotSlicer.d.ts +51 -0
  180. package/types/src/slicer/index.d.ts +1 -0
  181. package/types/src/table/AnchoredTable.d.ts +11 -1
  182. package/types/src/table/ITable.d.ts +5 -6
  183. package/types/src/table/ITableStyle.d.ts +50 -34
  184. package/types/src/table/_BuiltInPivotStyles.d.ts +8 -0
  185. package/types/src/table/_BuiltInTableStyles.d.ts +0 -1
  186. package/types/src/type/ITypes.d.ts +5 -1
  187. package/types/src/workbook/IWorkbook.d.ts +8 -2
  188. package/types/src/workbook/Workbook.d.ts +72 -6
  189. package/browser/esm/BrHplg4RuI5jOmmr.mjs +0 -357
  190. package/browser/esm/eImPONkfn5DstmS8.mjs +0 -184
  191. package/node/esm/03AYPvCda2x9EOlY.mjs +0 -360
  192. package/node/esm/BmVQRGAijOHzgHmz.mjs +0 -199
  193. package/node/esm/Dk4KLs5GoRRuD8J4.mjs +0 -115
  194. package/types/src/pivot/_PivotXml.d.ts +0 -24
  195. 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
- /** @internal Logic lives in `_SheetMutations.updateStyles`. */
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 itself rules on the edit
2122
- * (`PivotTable._processContainerShift`).
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?: ICellRange.AutoFitOptions): void;
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 ICell.getColumn} */
31
+ /** {@inheritDoc ICellHeader.getColumn} */
32
32
  getColumn(): ITable.IColumn | null;
33
33
  /** {@inheritDoc ICellHeader.asCell} */
34
34
  asCell(): ICell;