@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.
Files changed (195) hide show
  1. package/LICENSE.md +8 -7
  2. package/browser/esm/{DDQtExVGSoCzAf6-.mjs → B-Q1-7RgSnA75J32.mjs} +506 -502
  3. package/browser/esm/{Cl3jq6y4Idilod82.mjs → BI6NwRrdLCbPdz6f.mjs} +3 -3
  4. package/browser/esm/{Blo0Hwg2ojXt99Dl.mjs → BWNQcQyx8wt6huOq.mjs} +2 -2
  5. package/browser/esm/{Do8TQqQvnFXRlFu-.mjs → BY_-BTa5h6HnnZ1W.mjs} +3 -3
  6. package/browser/esm/{D4ZCoKyNCJvDQAkx.mjs → BlkstmZEklk6Y1QD.mjs} +23 -22
  7. package/browser/esm/{DpaqR081c-Q7WemN.mjs → BuKA3E-Ev8Dp5W2I.mjs} +2 -2
  8. package/browser/esm/{Bbrhl946_QbCz5WS.mjs → Byp_bvP9G-tN6hcz.mjs} +588 -587
  9. package/browser/esm/{CMSeF5rGzeuMUydM.mjs → C0o6WpBojS7XhV5m.mjs} +3 -3
  10. package/browser/esm/CAjITJT3eLst9Rhi.mjs +686 -0
  11. package/browser/esm/{CZ_ZPliIkoh8BViV.mjs → CFywn1iiD35nNNUP.mjs} +10 -10
  12. package/browser/esm/{DJNLo8Rd_5UQP0U5.mjs → CHByUyHFA3ESf7DX.mjs} +2 -2
  13. package/browser/esm/CLT3qGy_brDIwbYd.mjs +2017 -0
  14. package/browser/esm/{Blo0jHze0bQxnKh4.mjs → CVV4xqwD8gIjYj1E.mjs} +78 -78
  15. package/browser/esm/{FHp0QfwZMIfP0Sry.mjs → CWkaF7gYWCkW7vDA.mjs} +2 -2
  16. package/browser/esm/{CNM5d4p0Y7In0rTf.mjs → DCs7bk-yx0UhCvQ4.mjs} +3 -3
  17. package/browser/esm/{BsGN0Tk0jVc2n0hy.mjs → DDNerAeet8uDYKhf.mjs} +3 -3
  18. package/browser/esm/{D6OqcO9IWPaY211T.mjs → DGUOlgm1_WFmf_xO.mjs} +2 -2
  19. package/browser/esm/{Dp4OIVjjAVhpD815.mjs → DJTEQZiR9IFTuN_4.mjs} +3 -3
  20. package/browser/esm/{KgTozk3nvOZzEG27.mjs → DJrnSjYjFxJvpQiH.mjs} +2 -2
  21. package/browser/esm/{D0KMmRjGOQUs7Ls-.mjs → DTXsi--x2wgqgwtf.mjs} +3 -3
  22. package/browser/esm/{CPUobTehcKZllBDS.mjs → DUB6Oj_aiV3f8s5_.mjs} +51 -49
  23. package/browser/esm/{Bw66vzKThXKvXvPI.mjs → DW3kFc5t4Wnh5E9S.mjs} +2 -2
  24. package/browser/esm/{BzG0p8RdGDWHttVr.mjs → DkmqFp_-iUIy_l3D.mjs} +4 -4
  25. package/browser/esm/{zjEXdQiQruTkUyf5.mjs → Dlk1kRgkiBIpUxd9.mjs} +22 -22
  26. package/browser/esm/{tm7XJ-Zd_04xWKG6.mjs → DnMFW_oKYQxRjP1l.mjs} +2 -2
  27. package/browser/esm/{DA4S5eqog20pG7b2.mjs → DrmOaEx6CQ91zBsP.mjs} +29 -29
  28. package/browser/esm/{D8PxKK6OrmancpLT.mjs → DsWDvmky7CgzX_7W.mjs} +3 -3
  29. package/browser/esm/{DMbcmIZ-G2fbWn8v.mjs → Dx_dZ7jrw5Hxeoot.mjs} +2 -2
  30. package/browser/esm/{BN1MW1nuBndrzryn.mjs → Dy0TAi9WafVT8eke.mjs} +3 -3
  31. package/browser/esm/{L7SKr6r1tmMwFx6Q.mjs → JmmPE8Vsj85wdV8H.mjs} +2 -2
  32. package/browser/esm/{CIab4UYcHQQKTHeD.mjs → O970I8lbI7okqG7N.mjs} +404 -404
  33. package/browser/esm/{DwH4H_p6gTAcpQ17.mjs → WR3-xqcK1gF3ewAR.mjs} +4 -4
  34. package/browser/esm/XHhDDWrJiZJgWxPM.mjs +165 -0
  35. package/browser/esm/{KsfZhE6ocmYobGjY.mjs → YwDdO4YwcIE4OB0D.mjs} +2 -2
  36. package/browser/esm/aYpwVCDSwMUuz147.mjs +527 -0
  37. package/browser/esm/{BGPT-k25jo0UhtT5.mjs → gQzj95vSMXdKhpWf.mjs} +29032 -24101
  38. package/browser/esm/index.mjs +886 -578
  39. package/browser/esm/{CxhXbk-5XhaK8UNs.mjs → jotvQFBWO2jXAhWx.mjs} +2 -2
  40. package/browser/esm/{CWyzk_3eDCR9bKq6.mjs → mufbL88lyIKJEWyP.mjs} +1528 -1433
  41. package/browser/esm/{BVsG6Vpvb1ZzpURJ.mjs → qNv1x-Ny9TPbvZzj.mjs} +2 -2
  42. package/browser/esm/{XrasOsWQ-64jwMn1.mjs → taTjDyUIIxq2eClH.mjs} +4 -4
  43. package/browser/esm/{CqzKBrmmV-fWRoK7.mjs → yudASWe8CWXYcGt3.mjs} +22 -22
  44. package/licenses/dependencies.txt +69 -69
  45. package/node/esm/{CjwmkzMtjj6OMJbO.mjs → -q1xF3_2jmk3QHIY.mjs} +487 -483
  46. package/node/esm/{DDIiQZTdeY4vdK8_.mjs → 7ZwdVIsOdcziHpMD.mjs} +189 -189
  47. package/node/esm/{C7h7SvhWNwQ9TfGh.mjs → B6BQYUDRxbRnzca4.mjs} +4 -4
  48. package/node/esm/{DjsOfZn5vYpB7L6U.mjs → B8MYgBe4XICBSROW.mjs} +52 -50
  49. package/node/esm/{B8KEX44VZTFTTKb3.mjs → BBUVvO9Ma1RzbKux.mjs} +3 -3
  50. package/node/esm/{D9RwzPR5s2mWrbCQ.mjs → BQko-9y6mf2oQK7u.mjs} +2 -2
  51. package/node/esm/{BNiG1ISiMjs-G2mE.mjs → BSlFO0_8UZ38gfeE.mjs} +22 -22
  52. package/node/esm/{DUft-qpAS4MMANwG.mjs → Bgy7uWJVGwkN7AlD.mjs} +3 -3
  53. package/node/esm/{DyIASfKKPuNl5Xx-.mjs → BhosJbKOPgbJSZMY.mjs} +2 -2
  54. package/node/esm/BoLecFnIxhYKGor-.mjs +2040 -0
  55. package/node/esm/{WBHD7ECKG6HZ5UpY.mjs → BwyoLlHutolJw7OW.mjs} +2 -2
  56. package/node/esm/{Dh8o-woVpmUL50BD.mjs → CDgUHRW6vSASfqNr.mjs} +2 -2
  57. package/node/esm/{BZ0IRjh2hYuI86xW.mjs → CHS84ZGEoH6aeHsZ.mjs} +31 -30
  58. package/node/esm/{BRnNpoS8VpkAhdVk.mjs → CIlH2fSEpdYBZwUA.mjs} +2 -2
  59. package/node/esm/{BlzPuXtKvF3Qfr0p.mjs → CIxb44vA81H9lRip.mjs} +2 -2
  60. package/node/esm/{Cx9nQSsuyqhayyBS.mjs → Cb1-r2RCxcJZB6fM.mjs} +32675 -27215
  61. package/node/esm/{DKdFasYVvjAitASZ.mjs → CjCqcGyCYGkaMQI9.mjs} +2 -2
  62. package/node/esm/{D7ia4o3y5Wvl__9Y.mjs → ClJJC8tBpgsqHwdn.mjs} +2 -2
  63. package/node/esm/{C-JEySqMuKdpcKe0.mjs → Cle-_21jebWv_-D4.mjs} +3 -3
  64. package/node/esm/{j8DqCwPgfIPICFtf.mjs → D51xu0rubo34Ppeg.mjs} +1005 -1004
  65. package/node/esm/{Ddd1y3TP0kqnnSs7.mjs → DCSJKgcCQzOV-dMJ.mjs} +3 -3
  66. package/node/esm/{ZtF9EuipL7Z9Iwfs.mjs → DCaLNIs-_4Y6hJ8S.mjs} +2 -2
  67. package/node/esm/DTkV7IK2_ODMJAP5.mjs +115 -0
  68. package/node/esm/DfbVTAhNutxM74E8.mjs +169 -0
  69. package/node/esm/{DVejVdSBXzAFQbqo.mjs → DfrxGbxxowFmm3SF.mjs} +2 -2
  70. package/node/esm/{DW3u4bBJIUaHZ6m-.mjs → DgsBYF3xbjgx9Mzp.mjs} +2 -2
  71. package/node/esm/{CHBlLTJaoPUVxA2J.mjs → DxnBYzOueAKEqaQT.mjs} +22 -22
  72. package/node/esm/M3jahkTgfUxGyeZv.mjs +530 -0
  73. package/node/esm/{-afI0SRg_vgXtea7.mjs → NnrDjio_xwTBs05n.mjs} +3 -3
  74. package/node/esm/{BqvqbFsPQB0gEvwF.mjs → OCrS6pBT6lGRu82d.mjs} +1762 -1674
  75. package/node/esm/XhDjStxKy-dd3WKa.mjs +199 -0
  76. package/node/esm/{D9zb5xVRehABdbXL.mjs → Yo7_havHbr9VL8R4.mjs} +2 -2
  77. package/node/esm/{MtRwC1PMkOEb1Nty.mjs → btVWSwUwMjM0J5fS.mjs} +3 -3
  78. package/node/esm/{DQqXPS05dvF0F-gh.mjs → cRz94rkuvDrA8mr9.mjs} +2 -2
  79. package/node/esm/{BfXLtDqsXXYeZ6LX.mjs → fwfAgq8qIADcHmY4.mjs} +78 -78
  80. package/node/esm/index.mjs +913 -598
  81. package/node/esm/{OnkJkCGFDjamqIUQ.mjs → jqBKdf9DG54xqpaw.mjs} +3 -3
  82. package/node/esm/{C6b4rM62pIWIywlM.mjs → nxxwAZZF8NsdErJW.mjs} +2 -2
  83. package/node/esm/{B07QPde9GloqsW8e.mjs → oGGVbqahqfK45-Uz.mjs} +4 -4
  84. package/node/esm/{BlHlBRvKGt-4CS0A.mjs → zh6vcRzFqdV1aYh5.mjs} +2 -2
  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
@@ -5,19 +5,23 @@ import { IListener } from '../listener';
5
5
  import { IModel } from '../model';
6
6
  import { IMovable, IMovableCollection } from '../movable';
7
7
  import { ITable } from '../table';
8
+ import { IPivotTable } from '../pivot';
8
9
  import { IWorksheet } from '../sheet';
9
10
  /**
10
- * A slicer: buttons that filter one column of a table.
11
+ * A slicer: buttons that filter one column of a table, or one field of pivot tables.
11
12
  *
12
13
  * @remarks
13
- * A slicer holds no selection of its own. What it shows as selected is the column's filter
14
- * ({@link ITable.IColumn.getFilter}), so a filter set from the column's menu shows on the slicer,
15
- * and a selection made on the slicer is the column's filter, saved with the table. Two slicers on
16
- * one column always agree.
14
+ * A slicer holds no selection of its own. On a table, what it shows as selected is the column's
15
+ * filter ({@link ITable.IColumn.getFilter}), so a filter set from the column's menu shows on the
16
+ * slicer, and a selection made on the slicer is the column's filter, saved with the table. On pivot
17
+ * tables it is the field's items hidden by hand ({@link IPivotTable.IField.setVisibleItems}), the
18
+ * same on every pivot table it filters; a label or value filter on the field does not show on it.
19
+ * Two slicers on one column or field always agree.
17
20
  *
18
- * The column is named by a structured reference ({@link getSource}), which follows the table and
19
- * the column through a rename. When the column or its table is deleted, the slicer is deleted with
20
- * it, in the same step; an undo brings both back.
21
+ * A table slicer follows its table and column through a rename. When the column or its table is
22
+ * deleted, the slicer is deleted with it, in the same step; an undo brings both back. A pivot slicer
23
+ * stays when its pivot tables are deleted, filtering nothing, and is deleted with its field when a
24
+ * pivot table's source no longer has it.
21
25
  *
22
26
  * Where a slicer sits is its movable's ({@link IMovable.getBounds}); it moves freely of the cells
23
27
  * under it by default.
@@ -31,31 +35,46 @@ import { IWorksheet } from '../sheet';
31
35
  */
32
36
  export interface ISlicer extends IModel, IMovable.IContent {
33
37
  /**
34
- * Returns the column the slicer filters, as a structured reference: `Sales[Region]`.
38
+ * Returns the name of what the slicer filters: the column's, or the pivot field's in its source.
35
39
  *
36
40
  * @remarks
37
- * Follows a rename of the table or the column.
41
+ * A table slicer's follows a rename of the column.
38
42
  */
39
- getSource(): string;
43
+ getSourceName(): string;
40
44
  /**
41
- * Returns the table the slicer filters, or `null` if it names none.
45
+ * Returns what the slicer filters: the table, or the first pivot table; `null` if there is none.
46
+ *
47
+ * @see {@link getPivotTables} for every pivot table a pivot slicer filters.
42
48
  */
43
- getTable(): ITable | null;
49
+ getTable(): ITable | IPivotTable | null;
44
50
  /**
45
- * Returns the column the slicer filters, or `null` if it names none.
51
+ * Returns the column the slicer filters, or `null` for a pivot slicer or one naming no column.
46
52
  */
47
53
  getColumn(): ITable.IColumn | null;
54
+ /**
55
+ * Returns the pivot tables the slicer filters; empty for a table slicer, or once they are deleted.
56
+ */
57
+ getPivotTables(): readonly IPivotTable[];
58
+ /**
59
+ * Returns the field a pivot slicer filters, as its first pivot table has it; `null` for a table
60
+ * slicer, or when there is no pivot table.
61
+ *
62
+ * @remarks
63
+ * Each pivot table has its own field. Select through the slicer, which changes every one of them.
64
+ */
65
+ getPivotField(): IPivotTable.IField | null;
48
66
  /**
49
67
  * Returns the text shown in the slicer's header.
50
68
  *
51
69
  * @remarks
52
- * The column's name unless a caption has been set, and then it follows a rename of the column.
70
+ * {@link getSourceName} unless a caption has been set. A slicer added on a pivot field with a
71
+ * caption of its own starts with that caption, and keeps it when the field's changes.
53
72
  */
54
73
  getCaption(): string;
55
74
  /**
56
75
  * Sets the text shown in the slicer's header.
57
76
  *
58
- * @param caption The caption, or `null` to show the column's name.
77
+ * @param caption The caption, or `null` to show {@link getSourceName}.
59
78
  */
60
79
  setCaption(caption: string | null, options?: ITransaction.OperationOptions): this;
61
80
  /**
@@ -90,6 +109,8 @@ export interface ISlicer extends IModel, IMovable.IContent {
90
109
  getSortOrder(): ISlicer.SortOrder;
91
110
  /**
92
111
  * Sets the order the items are listed in.
112
+ *
113
+ * @throws ExpectedError For `'dataSource'` on a pivot slicer, which Excel does not offer.
93
114
  */
94
115
  setSortOrder(sortOrder: ISlicer.SortOrder, options?: ITransaction.OperationOptions): this;
95
116
  /**
@@ -125,15 +146,18 @@ export interface ISlicer extends IModel, IMovable.IContent {
125
146
  */
126
147
  setLockedPosition(locked: boolean, options?: ITransaction.OperationOptions): this;
127
148
  /**
128
- * Returns `true` when the column has no filter: every item is selected.
149
+ * Returns `true` when every item is selected: the column has no filter, or the field hides no item.
129
150
  */
130
151
  isFilterCleared(): boolean;
131
152
  /**
132
- * Returns the items: the column's distinct values as it shows them, in the slicer's order.
153
+ * Returns the items: the column's distinct values as it shows them, or the field's items, in the
154
+ * slicer's order.
133
155
  *
134
156
  * @remarks
135
157
  * Every row of the column is read, hidden or not. An item has data when at least one row
136
- * holding it passes the other columns' filters. Blanks are one item, keyed `''`, listed last.
158
+ * holding it passes the other columns' filters; on pivot tables, when a source row holding it
159
+ * passes the items the first pivot table's other fields hide, and an item the source no longer
160
+ * holds has none. Blanks are one item, keyed `''`, listed last in ascending order.
137
161
  */
138
162
  getItems(): Promise<readonly ISlicer.Item[]>;
139
163
  /**
@@ -141,17 +165,18 @@ export interface ISlicer extends IModel, IMovable.IContent {
141
165
  */
142
166
  getItem(key: string): Promise<ISlicer.Item | null>;
143
167
  /**
144
- * Selects the items with `keys` and no others, by filtering the column.
168
+ * Selects the items with `keys` and no others, by filtering the column or by hiding the field's
169
+ * other items on every pivot table, as one step that can be undone.
145
170
  *
146
171
  * @param keys The items' keys. `null`, an empty list or every item clears the filter.
147
172
  *
148
173
  * @remarks
149
174
  * The other columns' filters stay. On a date column the selection is saved as the dates
150
- * themselves, not their text.
175
+ * themselves, not their text. A pivot field's label, date and value filters stay.
151
176
  */
152
177
  selectItems(keys: readonly string[] | null, options?: ITransaction.OperationOptions): Promise<this>;
153
178
  /**
154
- * Clears the column's filter, selecting every item.
179
+ * Clears the column's filter, or shows every item of the field, selecting every item.
155
180
  */
156
181
  clearFilters(options?: ITransaction.OperationOptions): Promise<this>;
157
182
  /**
@@ -201,21 +226,21 @@ export declare namespace ISlicer {
201
226
  */
202
227
  interface Item {
203
228
  /**
204
- * The item's identity: the text the column shows for it, `''` for the blank item. What
205
- * {@link ISlicer.selectItems} takes.
229
+ * The item's identity: the text the column shows for it, or the pivot item's caption; `''` for
230
+ * the blank item. What {@link ISlicer.selectItems} takes.
206
231
  */
207
232
  key: string;
208
233
  /** The text shown on the button. */
209
234
  name: string;
210
- /** The value of the first cell showing the item; `null` for the blank item. */
235
+ /** The value of the first cell showing the item, or the pivot item's; `null` for the blank item. */
211
236
  value: Scalar;
212
- /** Whether at least one row holding the item passes the other columns' filters. */
237
+ /** Whether at least one row holding the item passes the other columns' or fields' filters. */
213
238
  hasData: boolean;
214
- /** Whether the column's filter selects the item. */
239
+ /** Whether the column's filter selects the item, or the field shows it. */
215
240
  isSelected: boolean;
216
241
  }
217
242
  /**
218
- * Options for {@link ITable.addSlicer}.
243
+ * Options for {@link ITable.addSlicer} and {@link IPivotTable.addSlicer}.
219
244
  */
220
245
  interface AddOptions extends IMovableCollection.AddOptions<ISlicer.JSON> {
221
246
  /**
@@ -224,7 +249,11 @@ export declare namespace ISlicer {
224
249
  * @defaultValue The table's sheet.
225
250
  */
226
251
  sheet?: IWorksheet;
227
- /** {@inheritDoc ISlicer.JSON.caption} */
252
+ /**
253
+ * The header text.
254
+ *
255
+ * @defaultValue The column's name, or the pivot field's caption.
256
+ */
228
257
  caption?: string;
229
258
  /**
230
259
  * The slicer style's name.
@@ -240,11 +269,12 @@ export declare namespace ISlicer {
240
269
  */
241
270
  interface Events extends IMovable.ContentEvents {
242
271
  /**
243
- * Called when the column's filter changes, by this slicer or anything else.
272
+ * Called when the column's filter or the field's hidden items change, by this slicer or anything
273
+ * else.
244
274
  */
245
275
  onSelectionChange?(source: ISlicer): void;
246
276
  /**
247
- * Called when the column's values change, so the items may have.
277
+ * Called when the column's values or the pivot tables change, so the items may have.
248
278
  */
249
279
  onItemsChange?(source: ISlicer): void;
250
280
  }
@@ -255,11 +285,11 @@ export declare namespace ISlicer {
255
285
  */
256
286
  interface JSON {
257
287
  /**
258
- * The column, as a structured reference: `Sales[Region]`.
288
+ * The column, as a structured reference: `Sales[Region]`. Absent for a slicer on a pivot table.
259
289
  */
260
- source: string;
290
+ source?: string;
261
291
  /**
262
- * The header text. Absent, the column's name.
292
+ * The header text. Absent, the column's or the pivot field's name.
263
293
  */
264
294
  caption?: string;
265
295
  /**
@@ -320,6 +350,56 @@ export declare namespace ISlicer {
320
350
  * The id the file gave the slicer.
321
351
  */
322
352
  uid?: string;
353
+ /**
354
+ * What a slicer on pivot tables filters.
355
+ *
356
+ * @internal
357
+ */
358
+ pivot?: ISlicer.PivotJSON;
359
+ }
360
+ /**
361
+ * A slicer on pivot tables: the field and the pivot tables it filters. A slicer on worksheet pivot
362
+ * tables takes its items and their states from the field; a data-model slicer's and a timeline's
363
+ * are carried as read.
364
+ *
365
+ * @internal
366
+ */
367
+ interface PivotJSON {
368
+ /** The field the slicer filters, by its name in the cache: `Region`, or `[Table1].[Region]` for a data model. */
369
+ sourceName: string;
370
+ /** The pivot tables the slicer filters, by sheet and name. Empty once they are deleted. */
371
+ tables: {
372
+ sheet: string;
373
+ name: string;
374
+ }[];
375
+ /**
376
+ * The workbook pivot cache the slicer's items index: its first pivot table's, kept once they are
377
+ * deleted. Absent for a data-model slicer.
378
+ */
379
+ cacheId?: number;
380
+ /**
381
+ * Present for a slicer or timeline on worksheet pivot tables the model holds, whose items and
382
+ * selection, or state, are the field's: what a slicer cache's `tabular` says beyond the slicer's
383
+ * sort order and cross filter.
384
+ */
385
+ tabular?: {
386
+ /** Whether items the source no longer holds are left out. */
387
+ hideMissing?: true;
388
+ };
389
+ /**
390
+ * The cache's children after its pivot tables, verbatim: for a {@link tabular} slicer what
391
+ * follows `<data>`, for a {@link tabular} timeline what follows `<state>`, else all of them.
392
+ */
393
+ body: string;
394
+ /**
395
+ * Present for a timeline, which Excel keeps as a slicer whose items are dates: the timeline's
396
+ * attributes beyond its name, cache and caption (level, scroll position, style, ...) and its
397
+ * children, as read. Its cache's `body` is then the `<state>` and what follows.
398
+ */
399
+ timeline?: {
400
+ attributes: Record<string, string>;
401
+ body: string;
402
+ };
323
403
  }
324
404
  }
325
405
  //# sourceMappingURL=ISlicer.d.ts.map
@@ -0,0 +1,61 @@
1
+ import { ITransaction } from '../transaction';
2
+ import { ISlicer } from './ISlicer';
3
+ /**
4
+ * A timeline: a slicer on a date field of pivot tables, whose selection is a range of dates.
5
+ *
6
+ * @remarks
7
+ * A timeline holds no selection of its own. What it selects is the field's date filter, the same on
8
+ * every pivot table it filters, so a date filter set on the field shows on the timeline, and a range
9
+ * set on the timeline is the field's date filter. While a timeline is on the field, that filter
10
+ * filters the tables whether or not the field is on an axis.
11
+ *
12
+ * It has no items: {@link ISlicer.getItems} answers none, and {@link ISlicer.clearFilters} clears the
13
+ * range.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const content = movable.getContent<ISlicer>();
18
+ * if ((content as ITimeline).isITimeline) {
19
+ * await (content as ITimeline).setDateRange({ start: 45689, end: 45747 });
20
+ * }
21
+ * ```
22
+ */
23
+ export interface ITimeline extends ISlicer {
24
+ /**
25
+ * Returns the dates selected, or `null` when every date is, or the field's date filter is not a
26
+ * range of dates.
27
+ */
28
+ getDateRange(): ITimeline.DateRange | null;
29
+ /**
30
+ * Selects a range of dates on every pivot table, as one step that can be undone.
31
+ *
32
+ * @param range The dates, or `null` to select every date.
33
+ *
34
+ * @remarks
35
+ * The range replaces the field's label or date filter; its value filter and the items it hides
36
+ * stay.
37
+ */
38
+ setDateRange(range: ITimeline.DateRange | null, options?: ITransaction.OperationOptions): Promise<this>;
39
+ /** For runtime type checking. */
40
+ readonly isITimeline: true;
41
+ }
42
+ /**
43
+ * {@inheritDoc ITimeline}
44
+ *
45
+ * @see
46
+ * ### **Interface**
47
+ *
48
+ * {@link ITimeline}
49
+ */
50
+ export declare namespace ITimeline {
51
+ /**
52
+ * A range of whole days, as date serial numbers.
53
+ */
54
+ interface DateRange {
55
+ /** The first day selected. */
56
+ start: number;
57
+ /** The last day selected. */
58
+ end: number;
59
+ }
60
+ }
61
+ //# sourceMappingURL=ITimeline.d.ts.map
@@ -2,9 +2,12 @@ import { ITransaction } from '../transaction';
2
2
  import { IResource } from '../resource';
3
3
  import { IListener } from '../listener';
4
4
  import { ITable } from '../table';
5
+ import { IPivotTable } from '../pivot';
5
6
  import { IAnchored } from '../anchored';
6
7
  import { AbstractMovableContent } from '../movable/AbstractMovableContent';
7
8
  import { ISlicer } from './ISlicer';
9
+ import { ITimeline } from './ITimeline';
10
+ import { PivotSlicerItem } from './_PivotSlicer';
8
11
  interface State extends AbstractMovableContent.State {
9
12
  data?: ISlicer.JSON;
10
13
  }
@@ -25,6 +28,13 @@ export declare class Slicer extends AbstractMovableContent<State, ISlicer.JSON,
25
28
  * may be an internal spelling, never a name.
26
29
  */
27
30
  private _columnName;
31
+ /**
32
+ * A pivot slicer's pivot tables, once looked up: deleted ones included, so an undo of the delete
33
+ * connects the slicer again. `null` until the workbook can be asked.
34
+ */
35
+ private _pivotTables;
36
+ /** The listeners on a pivot slicer's pivot tables, while someone listens to the slicer. */
37
+ private _pivotBinding;
28
38
  constructor(options: Slicer.ConstructorOptions);
29
39
  /** {@inheritDoc IModel.getType} */
30
40
  getType(): string;
@@ -32,12 +42,21 @@ export declare class Slicer extends AbstractMovableContent<State, ISlicer.JSON,
32
42
  getTypeDescription(): string;
33
43
  /** {@inheritDoc IMovable.IContent.getDefaultAnchorType} */
34
44
  getDefaultAnchorType(): IAnchored.Type;
35
- /** {@inheritDoc ISlicer.getSource} */
36
- getSource(): string;
45
+ /** {@inheritDoc ISlicer.getSourceName} */
46
+ getSourceName(): string;
37
47
  /** {@inheritDoc ISlicer.getTable} */
38
- getTable(): ITable | null;
48
+ getTable(): ITable | IPivotTable | null;
39
49
  /** {@inheritDoc ISlicer.getColumn} */
40
50
  getColumn(): ITable.IColumn | null;
51
+ /** {@inheritDoc ISlicer.getPivotTables} */
52
+ getPivotTables(): readonly IPivotTable[];
53
+ /** {@inheritDoc ISlicer.getPivotField} */
54
+ getPivotField(): IPivotTable.IField | null;
55
+ /**
56
+ * The column as a structured reference, `Sales[Region]`, following a rename; `''` for a pivot slicer.
57
+ * @internal
58
+ */
59
+ _getSource(): string;
41
60
  /** {@inheritDoc IMovable.IContent.setName} */
42
61
  setName(name: string): this;
43
62
  /** {@inheritDoc ISlicer.getCaption} */
@@ -90,6 +109,27 @@ export declare class Slicer extends AbstractMovableContent<State, ISlicer.JSON,
90
109
  toJSON(_toResourceId?: (resource: IResource) => number | null): ISlicer.JSON | null;
91
110
  /** {@inheritDoc ISlicer.isISlicer} */
92
111
  get isISlicer(): true;
112
+ /** {@inheritDoc ITimeline.isITimeline} */
113
+ get isITimeline(): boolean;
114
+ /** {@inheritDoc ITimeline.getDateRange} */
115
+ getDateRange(): ITimeline.DateRange | null;
116
+ /** {@inheritDoc ITimeline.setDateRange} */
117
+ setDateRange(range: ITimeline.DateRange | null, options?: ITransaction.OperationOptions): Promise<this>;
118
+ /**
119
+ * A timeline's state, as its cache writes it: the pivot cache it names, the range its first pivot
120
+ * table's date filter selects, whether that table has any label or date filter on the field, and
121
+ * the earliest and latest dates of the field. With its pivot tables deleted, the cache it kept and
122
+ * no filter. `null` for a slicer, or a timeline whose state is carried as read.
123
+ * @internal
124
+ */
125
+ _getTimelineState(): {
126
+ cacheId: number;
127
+ range: ITimeline.DateRange | null;
128
+ filtered: boolean;
129
+ dates: ITimeline.DateRange | null;
130
+ } | null;
131
+ /** A timeline's first pivot table and the field it filters there; `null` when there is none. */
132
+ private _timelineField;
93
133
  get [Symbol.toStringTag](): string;
94
134
  toString(): string;
95
135
  /**
@@ -98,6 +138,39 @@ export declare class Slicer extends AbstractMovableContent<State, ISlicer.JSON,
98
138
  * @internal
99
139
  */
100
140
  _attach(): void;
141
+ /**
142
+ * The live pivot tables a slicer on pivot tables filters, or `null` when it filters a table
143
+ * column or its workbook cannot be asked yet. A deleted pivot table is left out: the slicer
144
+ * stays, filtering nothing, as Excel keeps it.
145
+ * @internal
146
+ */
147
+ _getPivotTables(): IPivotTable[] | null;
148
+ /**
149
+ * Finds the pivot tables the slicer names, by sheet and name, and holds them from here on: what
150
+ * the workbook asks of each pivot slicer once its sheets are loaded, so a sheet renamed later is
151
+ * followed. One that names nothing is left out.
152
+ *
153
+ * @param find The pivot table named `name` on the sheet named `sheet`, or `null`.
154
+ * @internal
155
+ */
156
+ _holdPivotTables(find: (sheet: string, name: string) => IPivotTable | null): void;
157
+ /**
158
+ * A pivot slicer's items, every one in the slicer's order, read from its first pivot table, and the
159
+ * workbook pivot cache they index: what the file's `<data>` lists, each item once
160
+ * (`pivot-probes/probe-pivot-slicer-edits.ps1`, F03, F04, F05). With its pivot tables deleted, the
161
+ * cache it kept, every item selected. `null` for a table slicer, a data-model slicer or a timeline,
162
+ * or when the cache is not there.
163
+ * @internal
164
+ */
165
+ _getPivotItems(): {
166
+ cacheId: number;
167
+ items: readonly PivotSlicerItem[];
168
+ } | null;
169
+ /** Shows the field's cache items `shown`, or every one, on each pivot table, as one step. */
170
+ private _showPivotItems;
171
+ /** Listens to the pivot tables: any change of one may change the items or the selection. */
172
+ private _bindPivot;
173
+ private _unbindPivot;
101
174
  private _data;
102
175
  private _getWorkbook;
103
176
  /** The table and column the source names now, or `null` when it names no column of a live table. */
@@ -0,0 +1,51 @@
1
+ import { LocaleProfile } from '@sheetxl/primitives';
2
+ import { IWorkbook } from '../workbook';
3
+ import { IPivotTable } from '../pivot';
4
+ import { PivotDefinition } from '../pivot/_PivotItems';
5
+ import { ISlicer } from './ISlicer';
6
+ import { ITimeline } from './ITimeline';
7
+ /** One item of a pivot slicer, with the cache item it is. */
8
+ export interface PivotSlicerItem extends ISlicer.Item {
9
+ /** The item's index in the cache field: what the file's `<i x>` and the table's items name it by. */
10
+ id: number;
11
+ /** Whether the source no longer holds the item. */
12
+ missing: boolean;
13
+ }
14
+ /** What a pivot slicer reads of a pivot table that the public interface does not give. */
15
+ export interface SlicerPivotTable extends IPivotTable {
16
+ _getModel(): (PivotDefinition & Pick<IPivotTable.JSON, 'filters'>) | null;
17
+ _getCache(): IPivotTable.CacheJSON | null;
18
+ _showSlicerItems(field: number, shown: ReadonlySet<number> | null): Promise<void>;
19
+ _setDateRange(field: number, name: string, range: ITimeline.DateRange | null): Promise<void>;
20
+ }
21
+ /** The field a pivot slicer filters in `cache`, by its name there; `-1` when the cache has none. */
22
+ export declare const slicerFieldOf: (cache: IPivotTable.CacheJSON | null, sourceName: string) => number;
23
+ /**
24
+ * Every item of a pivot slicer's field, in the slicer's order: its cache items, sorted by value with
25
+ * the blank as the greatest (`pivot-probes/probe-pivot-slicer-caption.ps1`, C03, C04, C07), a grouping's
26
+ * groups in their order, and under `showItemsWithDataAtTop` those with data first.
27
+ *
28
+ * Selected is shown on `table`, so an item the table does not list (one the source gained) is. An
29
+ * item has data when a source row holding it passes the items `table`'s other fields hide; one the
30
+ * source no longer holds has none (`probe-pivot-slicer-edits.ps1`, E02).
31
+ */
32
+ export declare const pivotSlicerItemsOf: (table: PivotDefinition, cache: IPivotTable.CacheJSON, field: number, sortOrder: ISlicer.SortOrder, crossFilter: ISlicer.CrossFilter, profile: LocaleProfile) => PivotSlicerItem[];
33
+ /**
34
+ * The dates a field's date filter keeps, when it is a range of whole days: `afterEqualTo` and
35
+ * `beforeEqualTo` on the date, as a timeline writes it and Excel's `dateBetween` reads
36
+ * (`pivot-probes/probe-pivot-timeline-edits.ps1`, T02). `null` for no filter or any other.
37
+ */
38
+ export declare const dateRangeOf: (table: Pick<IPivotTable.JSON, "filters">, field: number) => ITimeline.DateRange | null;
39
+ /**
40
+ * `table` with a field's label or date filter replaced by the range of dates, or removed for `null`:
41
+ * what a timeline's selection writes to each table it filters, named for the field and on whole
42
+ * days, as Excel writes it (T02, T10). The field's value filter and hidden items stay.
43
+ */
44
+ export declare const withDateRange: <T extends Pick<IPivotTable.JSON, "filters">>(table: T, field: number, name: string, range: ITimeline.DateRange | null) => T;
45
+ /** The earliest and latest dates among a cache field's items, or `null` when it holds none. */
46
+ export declare const dateBoundsOf: (cache: IPivotTable.CacheJSON, field: number) => ITimeline.DateRange | null;
47
+ /**
48
+ * Every pivot slicer of the workbook that filters `table`, hidden sheets included.
49
+ */
50
+ export declare const pivotSlicersOf: (workbook: IWorkbook, table: IPivotTable) => ISlicer[];
51
+ //# sourceMappingURL=_PivotSlicer.d.ts.map
@@ -1,3 +1,4 @@
1
1
  export * from './ISlicer';
2
2
  export * from './ISlicerStyle';
3
+ export * from './ITimeline';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -377,7 +377,7 @@ export declare class AnchoredTable extends AbstractAnchored<State, ITable.Events
377
377
  /** {@inheritDoc ITable.getRangedStyle} */
378
378
  getRangedStyle(): IProperties.ICellRanged<ICellStyle.Properties>;
379
379
  /** {@inheritDoc ITable.getStyleAt} */
380
- getStyleAt(coords: IRange.CellCoords): ICellStyle;
380
+ getStyleAt(row: number, column: number): ICellStyle;
381
381
  /** {@inheritDoc ITable.isShowTotals} */
382
382
  isShowTotals(): boolean;
383
383
  /** {@inheritDoc ITable.setShowTotals} */
@@ -477,6 +477,16 @@ export declare class AnchoredTable extends AbstractAnchored<State, ITable.Events
477
477
  * nothing to reapply for one that has none.
478
478
  */
479
479
  private _filterLevels;
480
+ /**
481
+ * `conditions` as an apply evaluates them: each relative period anchored to the runtime's today
482
+ * ({@link anchorTimePeriod}). `conditions` itself when none changes.
483
+ */
484
+ private _anchoredToday;
485
+ /**
486
+ * The runs of a reapply, and the levels to write with them when a relative period's anchor moved
487
+ * to today (`null` when none did, so only the rows change).
488
+ */
489
+ private _evalReapply;
480
490
  /** {@inheritDoc ITable.applyFilters} */
481
491
  applyFilters(options?: ITransaction.OperationOptions): Promise<this>;
482
492
  /** {@inheritDoc ITable.deleteFilters} */
@@ -661,15 +661,14 @@ export interface ITable extends IAnchored {
661
661
  */
662
662
  getRangedStyle(): IProperties.ICellRanged<ICellStyle.Properties>;
663
663
  /**
664
- * Returns a cell style for the given coords.
665
- * @param coords The absolute coords.
664
+ * Returns the style the table gives the cell at a sheet position.
665
+ * @param row The row on the sheet.
666
+ * @param column The column on the sheet.
666
667
  *
667
668
  * @remarks
668
- * This will return a CellStyle rendered with the table styling but not any other styling.
669
- *
670
- * * This is used by the preview.
669
+ * The table's styling only, not the cell's own formats or any other layer.
671
670
  */
672
- getStyleAt(coords: IRange.CellCoords): ICellStyle;
671
+ getStyleAt(row: number, column: number): ICellStyle;
673
672
  /**
674
673
  * Specifies if totals are being shown for the table.
675
674
  */
@@ -55,6 +55,29 @@ export declare namespace ITableStyle {
55
55
  readonly LastTotalCell: "lastTotalCell";
56
56
  };
57
57
  type ElementType = typeof ElementType[keyof typeof ElementType];
58
+ /**
59
+ * The elements only a pivot table style has, beside the {@link ElementType}s a pivot table also
60
+ * uses (all but `lastHeaderCell`, `firstTotalCell` and `lastTotalCell`). On a pivot table,
61
+ * `totalRow` is the grand total row and `lastColumn` the grand total column.
62
+ */
63
+ const PivotElementType: {
64
+ readonly FirstSubtotalColumn: "firstSubtotalColumn";
65
+ readonly SecondSubtotalColumn: "secondSubtotalColumn";
66
+ readonly ThirdSubtotalColumn: "thirdSubtotalColumn";
67
+ readonly FirstSubtotalRow: "firstSubtotalRow";
68
+ readonly SecondSubtotalRow: "secondSubtotalRow";
69
+ readonly ThirdSubtotalRow: "thirdSubtotalRow";
70
+ readonly BlankRow: "blankRow";
71
+ readonly FirstColumnSubheading: "firstColumnSubheading";
72
+ readonly SecondColumnSubheading: "secondColumnSubheading";
73
+ readonly ThirdColumnSubheading: "thirdColumnSubheading";
74
+ readonly FirstRowSubheading: "firstRowSubheading";
75
+ readonly SecondRowSubheading: "secondRowSubheading";
76
+ readonly ThirdRowSubheading: "thirdRowSubheading";
77
+ readonly PageFieldLabels: "pageFieldLabels";
78
+ readonly PageFieldValues: "pageFieldValues";
79
+ };
80
+ type PivotElementType = typeof PivotElementType[keyof typeof PivotElementType];
58
81
  /**
59
82
  * Extends {@link ICellStyle.Properties} to include a size.
60
83
  *
@@ -92,6 +115,11 @@ export declare namespace ITableStyle {
92
115
  * * Last Header Cell
93
116
  * * First Total Cell
94
117
  * * Last Total Cell
118
+ *
119
+ * A pivot table style also has the {@link PivotElementType} elements, and is applied in its own
120
+ * order: whole table, page field labels and values, column then row stripes, first column,
121
+ * header row, first header cell, subtotal columns, blank row, subtotal rows, column
122
+ * subheadings, row subheadings, grand total column (`lastColumn`), grand total row (`totalRow`).
95
123
  */
96
124
  interface Properties {
97
125
  /**
@@ -168,6 +196,28 @@ export declare namespace ITableStyle {
168
196
  * both the total and last column must be selected.
169
197
  */
170
198
  lastTotalCell?: ICellStyle.Properties;
199
+ /** A pivot table's first, second and third level of subtotal columns. */
200
+ firstSubtotalColumn?: ICellStyle.Properties;
201
+ secondSubtotalColumn?: ICellStyle.Properties;
202
+ thirdSubtotalColumn?: ICellStyle.Properties;
203
+ /** A pivot table's first, second and third level of subtotal rows. */
204
+ firstSubtotalRow?: ICellStyle.Properties;
205
+ secondSubtotalRow?: ICellStyle.Properties;
206
+ thirdSubtotalRow?: ICellStyle.Properties;
207
+ /** A pivot table's blank row after an item. */
208
+ blankRow?: ICellStyle.Properties;
209
+ /** A pivot table's column labels at the first, second and third level. */
210
+ firstColumnSubheading?: ICellStyle.Properties;
211
+ secondColumnSubheading?: ICellStyle.Properties;
212
+ thirdColumnSubheading?: ICellStyle.Properties;
213
+ /** A pivot table's items with items under them, at the first, second and third level. */
214
+ firstRowSubheading?: ICellStyle.Properties;
215
+ secondRowSubheading?: ICellStyle.Properties;
216
+ thirdRowSubheading?: ICellStyle.Properties;
217
+ /** A pivot table's page field captions. */
218
+ pageFieldLabels?: ICellStyle.Properties;
219
+ /** A pivot table's page field items. */
220
+ pageFieldValues?: ICellStyle.Properties;
171
221
  }
172
222
  type ResolvableProperties = IProperties.ResolvableProperties<ITableStyle.Properties>;
173
223
  interface JSON extends ITableStyle.Properties {
@@ -180,40 +230,6 @@ export declare namespace ITableStyle {
180
230
  defaultPivotStyle?: string;
181
231
  styles?: Record<string, ITableStyle.JSON>;
182
232
  }
183
- /**
184
- * Properties for a pivot table style.
185
- *
186
- * @remarks
187
- * **NOT IMPLEMENTED**
188
- */
189
- interface PivotProperties {
190
- name?: string;
191
- wholeTable?: ICellStyle.Properties;
192
- firstColumnStripe?: ITableStyle.SizeBasedProperties;
193
- secondColumnStripe?: ITableStyle.SizeBasedProperties;
194
- firstRowStripe?: ITableStyle.SizeBasedProperties;
195
- secondRowStripe?: ITableStyle.SizeBasedProperties;
196
- firstColumn?: ICellStyle.Properties;
197
- headerRow?: ICellStyle.Properties;
198
- firstHeaderCell?: ICellStyle.Properties;
199
- pageFieldLabels?: ICellStyle.Properties;
200
- pageFieldValues?: ICellStyle.Properties;
201
- subtotalColumn1?: ICellStyle.Properties;
202
- subtotalColumn2?: ICellStyle.Properties;
203
- subtotalColumn3?: ICellStyle.Properties;
204
- blankRow?: ICellStyle.Properties;
205
- subtotalRow1?: ICellStyle.Properties;
206
- subtotalRow2?: ICellStyle.Properties;
207
- subtotalRow3?: ICellStyle.Properties;
208
- columnSubheading1?: ICellStyle.Properties;
209
- columnSubheading2?: ICellStyle.Properties;
210
- columnSubheading3?: ICellStyle.Properties;
211
- rowSubheading1?: ICellStyle.Properties;
212
- rowSubheading2?: ICellStyle.Properties;
213
- rowSubheading3?: ICellStyle.Properties;
214
- grandTotalColumn?: ICellStyle.Properties;
215
- grandTotalRow?: ICellStyle.Properties;
216
- }
217
233
  }
218
234
  /**
219
235
  * Represents a style applied to tables, with methods for retrieving style