@sheetxl/sdk 0.8.0-beta.14 → 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/{ChYgQL-8qIDFmX31.mjs → 9YWdxmSjzLN4j_ts.mjs} +22 -22
  4. package/browser/esm/B6BdiHigbUdbZp3J.mjs +686 -0
  5. package/browser/esm/{CImFKFaYToUH-bSE.mjs → BF_QwkZ_hs2rFoTT.mjs} +3 -3
  6. package/browser/esm/{DBvu0tdSf-5vol4e.mjs → BMo2_9Ul36IwRm3S.mjs} +3 -3
  7. package/browser/esm/{B1aH_qa-czVyEVHd.mjs → BWY1qiidTUBVPJoD.mjs} +506 -502
  8. package/browser/esm/{BSXQAXwZdJKYTO4P.mjs → Bf80epSsm_RyAOb9.mjs} +29 -29
  9. package/browser/esm/{D_XMi4_5iO2rkET5.mjs → BfoE6Dn_GQCIkQD3.mjs} +2 -2
  10. package/browser/esm/{Dhw5XEJYFrkYjdU2.mjs → BlMYYQZP-QM-iBHz.mjs} +23 -22
  11. package/browser/esm/{MuNBN02MyZ558c_K.mjs → BqT-ASHP0NVSUUnY.mjs} +1528 -1433
  12. package/browser/esm/{DnR0xY7_iE3TmMcg.mjs → BtNuoQIrrHw_jnbJ.mjs} +4 -4
  13. package/browser/esm/BxFzcCYhvo9NXFjC.mjs +527 -0
  14. package/browser/esm/{DonQz2Tc3k9lNT8E.mjs → BxYuRTSF9ykc-Tpz.mjs} +3 -3
  15. package/browser/esm/{aRXqxIzjuSLwawMh.mjs → C2PvZwqK-uvsugVS.mjs} +2 -2
  16. package/browser/esm/C3JOjQwdG9kAig7i.mjs +2017 -0
  17. package/browser/esm/{SwLp-iElwDjfcJtv.mjs → C5x0EzqElYGTiTQc.mjs} +2 -2
  18. package/browser/esm/{AXlD9K1gCwPU4gCO.mjs → CMChv-fCFh68VQQt.mjs} +588 -587
  19. package/browser/esm/{BpwULQPKbb4R9Jew.mjs → CRbQATfI0yZxe1kX.mjs} +3 -3
  20. package/browser/esm/{CM_X1zZYzEUPaNJL.mjs → CUu3zeHqcwMRYiov.mjs} +2 -2
  21. package/{node/esm/b3XnssSr9lmvAC2N.mjs → browser/esm/C_jLGkFemj55_BP3.mjs} +3 -3
  22. package/browser/esm/{CtC__ALh4I8PKIln.mjs → CkZoDPUCK5jMUaeJ.mjs} +26955 -22064
  23. package/browser/esm/{DvvqmUQ9Z0NFm1-4.mjs → D-iHJ3q4nwOLcn1D.mjs} +2 -2
  24. package/browser/esm/{qCqzZW74-fhaIG2V.mjs → D807piM0VSokWz-L.mjs} +2 -2
  25. package/browser/esm/{BLYl-afJe_3std8i.mjs → DW3oQ39IF0bsc_lm.mjs} +2 -2
  26. package/browser/esm/{Ln4gsmhqH1LyoANj.mjs → DcB52JPBPmkc3l1m.mjs} +4 -4
  27. package/browser/esm/{DIfAk63CvaOZ3QKi.mjs → DlVnybrgwZWxWN3_.mjs} +10 -10
  28. package/browser/esm/{Dh84MDs-OhdCPCIg.mjs → DvVhatd0J1ch3OCO.mjs} +22 -22
  29. package/browser/esm/{BWoz4kQdA5KKJfl6.mjs → Dx9Fya60meMpuHqm.mjs} +2 -2
  30. package/browser/esm/{r_EZapMBdyS4gUd-.mjs → HV0FkJ6k3Ils318J.mjs} +78 -78
  31. package/browser/esm/{C7hpfT-sX2lyLS-D.mjs → JV9Szh5qTssjxJoE.mjs} +2 -2
  32. package/browser/esm/{CPIWV3Enlh_BF2TY.mjs → KpuD1kEcWB7cT0VM.mjs} +3 -3
  33. package/browser/esm/{3t4S9eda2I6jFad0.mjs → U4FL-QeC0bRUhTEo.mjs} +2 -2
  34. package/browser/esm/{D39XcmtPXVtMN4yF.mjs → WLlpmgLN5OVLoLrC.mjs} +3 -3
  35. package/browser/esm/{Cy8uYCggktF83278.mjs → WR146UAqrsUsL39e.mjs} +2 -2
  36. package/browser/esm/{BPPMKyMn65i1a1mE.mjs → WcHfawW2lkTHtWUd.mjs} +51 -49
  37. package/browser/esm/{Bdcd3QOzsc0aVMjN.mjs → Zp5-cTJ0Llb6EfGi.mjs} +4 -4
  38. package/browser/esm/{oSCy1X5CJ1iYtGDp.mjs → ad9PX897hYE4Srkc.mjs} +3 -3
  39. package/browser/esm/{UMQTbO0zNmBpzW1V.mjs → d_t-7d5BD1AdHg3u.mjs} +404 -404
  40. package/browser/esm/{BVqIknGhQCLUB_7Q.mjs → dwGdnbV-CykjNrlm.mjs} +2 -2
  41. package/browser/esm/{DiXeQjc0WJGLSVEo.mjs → e69NcYnKMLnAmqyA.mjs} +2 -2
  42. package/browser/esm/index.mjs +886 -578
  43. package/browser/esm/{yuF8SbWfjBfrxcq5.mjs → r-o0UCm7KtluNmyK.mjs} +3 -3
  44. package/licenses/dependencies.txt +69 -69
  45. package/node/esm/{BEBt5fo__rvT2q_u.mjs → 446KYBjJQa8g-8Gg.mjs} +52 -50
  46. package/node/esm/{BELc5aQ_pFPgbiso.mjs → 5OfKfTRX2_y2NwpU.mjs} +2 -2
  47. package/node/esm/{C-5JLSNof0FhkuFd.mjs → A3PEHO1HJvkHfb5n.mjs} +2 -2
  48. package/node/esm/{YpOpRyciqQLIY1-G.mjs → B4WUGzJBkQu7BXRm.mjs} +2 -2
  49. package/node/esm/{I-FZojIFWluC6X-j.mjs → BH8J6vKSO5zI_TWo.mjs} +2 -2
  50. package/node/esm/BLmdKnkLwkb3wWe6.mjs +2040 -0
  51. package/node/esm/{BuyAYLI4s33-vmgG.mjs → BZSxu_ZqX8-Uczzn.mjs} +2 -2
  52. package/node/esm/{DiCMnYA2bttmrX3q.mjs → BfPBiAgVmWhuFgFP.mjs} +3 -3
  53. package/node/esm/{BSVttk12GXNfKZ9k.mjs → Bknw7zWZhl2-w1pi.mjs} +3 -3
  54. package/node/esm/{uLrulyR7IXq0SF4j.mjs → BvIPsPiHhMclZ1kH.mjs} +22 -22
  55. package/node/esm/{clgEkmEwfB28nkz2.mjs → By2TFKOjA1HekZap.mjs} +4 -4
  56. package/node/esm/{BXg-D8Rc_iyB8p7X.mjs → BywIhvYkWk2o7MSW.mjs} +2 -2
  57. package/node/esm/{pF2vCOTmrxPAB41Q.mjs → C3zyhnMwQ2hRQBz7.mjs} +31 -30
  58. package/node/esm/{BCjHRVU8tC5lYypg.mjs → C884edhUf9yMqpPp.mjs} +2 -2
  59. package/node/esm/{B6jhx5pHPs2W5GE7.mjs → CDHY-0OyQ9348Brb.mjs} +189 -189
  60. package/node/esm/{xRGObcoaGDnAZFnj.mjs → CERNLhFrAwtu_p-q.mjs} +2 -2
  61. package/node/esm/{DbPUG2DcQ3T_QhcJ.mjs → CFkX_Cn6avQqQiVC.mjs} +78 -78
  62. package/node/esm/CJDV8P3hI8lu--3Z.mjs +530 -0
  63. package/node/esm/{Cyeq1rDslIqF1LKz.mjs → CKwiipdPJGzAiPjg.mjs} +2 -2
  64. package/node/esm/{BLPrFp_jKGYgWPX1.mjs → CLtUMJfKsy4SevWE.mjs} +3 -3
  65. package/node/esm/{DLdXl0O0TXuyqLU4.mjs → CVPieTgKCwkL21nD.mjs} +28573 -23108
  66. package/node/esm/{Dlk2ZYExFgQ0xE2H.mjs → C_fYuynP2a_70WdL.mjs} +2 -2
  67. package/{browser/esm/BEDfJP2tcuRy2Y2E.mjs → node/esm/CgdNA3B_GFG_yJiN.mjs} +3 -3
  68. package/node/esm/Cs3ibv6YHCDwLRlk.mjs +115 -0
  69. package/node/esm/{DeFE8QfuCeGw-mvd.mjs → Cxak8i2NidZ4Uv6v.mjs} +487 -483
  70. package/node/esm/{NA-8urR7T1NCwrgD.mjs → D88A3UpCyGRjcX3U.mjs} +3 -3
  71. package/node/esm/{99miMotf3dOuG5Jk.mjs → DBIUe2BC9xU7qMHR.mjs} +3 -3
  72. package/node/esm/{BEdxa3I4VOiCsvy7.mjs → DELfV5HQZo1mInBd.mjs} +4 -4
  73. package/node/esm/{BfEdeOg4iYXaYTlh.mjs → DOt3t-13tsnM7Fj6.mjs} +2 -2
  74. package/node/esm/{B3hBxzqJ2_hUylNr.mjs → DfWc3nW_Z_qqc_Wf.mjs} +1762 -1674
  75. package/node/esm/DgnwKbUEyQN5_gWT.mjs +169 -0
  76. package/node/esm/{Ccocd9DTvOnlOE9D.mjs → Dhv9JymnXqcF54oo.mjs} +2 -2
  77. package/node/esm/{Lj98EH6coGdKUzuS.mjs → DvtyKKzOnoOM80NB.mjs} +22 -22
  78. package/node/esm/{Crn6dnSQQRCQAnQ-.mjs → KDGrIa9R5XzWfjM2.mjs} +2 -2
  79. package/node/esm/{D30rC6AWaGGf3CaC.mjs → RTwm9ge1KoPdlBNt.mjs} +2 -2
  80. package/node/esm/{CdSTmD2ZvG9NesNR.mjs → _RIAmJI98l6bIFfZ.mjs} +2 -2
  81. package/node/esm/{CI8UIWR01z9QDlzH.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/{B5VmOC0jO9Zbh9Mq.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/D2NFcBM4xsv0JJ1q.mjs +0 -184
  190. package/browser/esm/DnqwX3-2NfGBaXXl.mjs +0 -357
  191. package/node/esm/C3S4hF1vn0NyJPPd.mjs +0 -199
  192. package/node/esm/CPsGyt3vnOdLTShj.mjs +0 -360
  193. package/node/esm/D4Y1WJgjiFEgbWrW.mjs +0 -115
  194. package/types/src/pivot/_PivotXml.d.ts +0 -24
  195. package/types/src/primitives/Grouping.d.ts +0 -65
@@ -0,0 +1,48 @@
1
+ import { ICellStyle } from '../style';
2
+ import { IPivotTable } from './IPivotTable';
3
+ import { PivotStructure } from './_PivotStructure';
4
+ /**
5
+ * Whether `area` covers the cell at `row`, `column` of a laid-out table.
6
+ *
7
+ * @remarks
8
+ * By cell kind, as Excel records them: `all` is every cell, page fields included; `origin` and
9
+ * `topRight` the header cells left and right of the column fields' captions; `button` a field's
10
+ * caption on its axis. A `normal` area takes values (`dataOnly`, the default), labels
11
+ * (`labelOnly`) or both (`dataOnly="0"`). A label is the one whose field is the last selected
12
+ * reference's, under the items every reference names; a value is the crossing of the row line and
13
+ * the column line its references name, an axis no reference names taking every line, and
14
+ * `grandRow`/`grandCol` the grand totals'. A reference by position or relative to the cell, and the
15
+ * `data`, `topEnd` and `none` kinds, cover nothing (not probed).
16
+ *
17
+ * @param row From the top-left cell of the page fields and location.
18
+ */
19
+ export declare const pivotAreaCovers: (structure: PivotStructure, table: IPivotTable.JSON, area: IPivotTable.PivotAreaJSON, row: number, column: number) => boolean;
20
+ /**
21
+ * The areas Excel records for a format set on some cells of a laid-out table: one per kind of
22
+ * cell among them, in the order first met, so each covers those cells and follows them through a
23
+ * relayout (`pivot-probes/probe-pivot-format-areas.ps1`).
24
+ *
25
+ * @remarks
26
+ * Every cell of the location is `all`. Otherwise a caption is its `button`, and the header cells
27
+ * around the captions `origin` and `topRight`. Labels of one field are one area, referencing the
28
+ * items down their path (the outer ones not selected); a value is the crossing of its row and
29
+ * column paths. Where the cells of an area differ in an item, it takes all of the field's items;
30
+ * where their lines differ in depth or one is a grand total, the area names no line of that axis
31
+ * (a row of values runs on into the grand total column). Not probed: whether two of three items
32
+ * widen to all three, and a subtotal's caption (`defaultSubtotal` on its reference).
33
+ *
34
+ * @param cells From the top-left cell of the page fields and location.
35
+ */
36
+ export declare const pivotAreasOf: (structure: PivotStructure, table: IPivotTable.JSON, cells: readonly {
37
+ readonly row: number;
38
+ readonly column: number;
39
+ }[]) => IPivotTable.PivotAreaJSON[];
40
+ /**
41
+ * The style a table's user formats ({@link IPivotTable.JSON.formats}) give the cell at `row`,
42
+ * `column`: each format whose area covers it, merged in order, a later one winning. `null` when none
43
+ * covers it.
44
+ *
45
+ * @param row From the top-left cell of the page fields and location.
46
+ */
47
+ export declare const pivotUserFormatAt: (structure: PivotStructure, table: IPivotTable.JSON, row: number, column: number) => ICellStyle.Properties | null;
48
+ //# sourceMappingURL=_PivotAreas.d.ts.map
@@ -0,0 +1,140 @@
1
+ import { IRange, Scalar } from '@sheetxl/primitives';
2
+ import { ICellStyle } from '../style';
3
+ import { ICell } from '../cell';
4
+ import { IPivotTable } from './IPivotTable';
5
+ import { PivotStructure } from './_PivotStructure';
6
+ /** What the controls read of a table's definition. */
7
+ export type PivotControlsDefinition = Pick<IPivotTable.JSON, 'fields' | 'indent' | 'hiddenDrillIndicators'>;
8
+ /**
9
+ * A control on a cell of a laid-out table, by row and column from the top-left cell of its page
10
+ * fields and location:
11
+ * - `dropdown`: a field button, for the fields it lists (more than one on a compact header);
12
+ * - `toggle`: an item's expand/collapse box; `item` by index into the field's items, `name` its
13
+ * caption where the table has said it.
14
+ */
15
+ export type PivotControl = {
16
+ readonly kind: 'dropdown';
17
+ readonly row: number;
18
+ readonly column: number;
19
+ readonly fields: readonly number[];
20
+ } | {
21
+ readonly kind: 'toggle';
22
+ readonly row: number;
23
+ readonly column: number;
24
+ readonly field: number;
25
+ readonly item: number;
26
+ readonly expanded: boolean;
27
+ readonly name?: string;
28
+ };
29
+ /**
30
+ * How a label cell's text is set in: at its `level`, each level `step` characters of indent in the
31
+ * cells' formats (`indent`, the two multiplied, is what Excel writes there), after a box's gutter
32
+ * or not.
33
+ */
34
+ export interface PivotLabelInset {
35
+ readonly level: number;
36
+ readonly step: number;
37
+ readonly indent: number;
38
+ readonly gutter: boolean;
39
+ }
40
+ /**
41
+ * The field dropdowns of a laid-out table.
42
+ */
43
+ export declare const pivotDropdownsOf: (structure: PivotStructure) => PivotControl[];
44
+ /**
45
+ * The expand/collapse boxes of a laid-out table within `window`, rows and columns from its
46
+ * top-left cell; only the lines in the window are walked.
47
+ */
48
+ export declare const pivotTogglesIn: (definition: PivotControlsDefinition, structure: PivotStructure, window: IRange.Coords) => PivotControl[];
49
+ /**
50
+ * How the label at `row`, `column` from the table's top-left is set in, or `null` for a cell that
51
+ * is not a label or a total's caption.
52
+ */
53
+ export declare const pivotLabelInsetAt: (definition: PivotControlsDefinition, structure: PivotStructure, row: number, column: number) => PivotLabelInset | null;
54
+ /**
55
+ * The indent, in characters, Excel stores set left in the format of a cell from the table's
56
+ * top-left, or `null` for a cell it leaves alone. Measured on Excel's own files: in a table of the
57
+ * compact form, every line of each label column, a tabular field's too, its labels and totals at
58
+ * their level's indent and its blank lines at none; nothing in a table of the outline or tabular
59
+ * form, nor in the header rows. A page field's selected item at none when it is a number, a date
60
+ * among them; a text item and `(All)` are left alone (`probe-pivot-page-item-xf.ps1`).
61
+ *
62
+ * @param value The cell's value, for a page field's item; not given, a selected item counts as a
63
+ * number, as the reader asks it of a saved left alignment.
64
+ * @internal
65
+ */
66
+ export declare const pivotRowLabelIndentAt: (definition: PivotControlsDefinition, structure: PivotStructure, row: number, column: number, value?: Scalar) => number | null;
67
+ /** What a laid-out table's definition writes into its cells' formats ({@link pivotCellFormatsOf}). */
68
+ export interface PivotCellFormats {
69
+ /** How many rows and columns it lays out, from the top-left cell of its page fields and location. */
70
+ readonly rows: number;
71
+ readonly columns: number;
72
+ /** How many rows sit above its location: the page rows and the gap. */
73
+ readonly top: number;
74
+ /** It has no fields: its cells hold nothing, and every one has a format, its box's. */
75
+ readonly empty: boolean;
76
+ /**
77
+ * The number format of the cell (`undefined` for General), the indent it is set left by (`null`
78
+ * when it is not), and the style the table's own formats give it (`null` for none), which wins
79
+ * over the other two: those a user put on the table, or an empty table's box.
80
+ */
81
+ formatAt(row: number, column: number): {
82
+ numberFormat: string | number | undefined;
83
+ labelIndent: number | null;
84
+ user: ICellStyle.Properties | null;
85
+ };
86
+ }
87
+ /**
88
+ * The formats a table's definition explains in its cells, as Excel writes them into each cell's
89
+ * xf: its number formats ({@link pivotNumberFormatAt}), its row labels' alignment
90
+ * ({@link pivotRowLabelIndentAt}), its user formats ({@link pivotUserFormatAt}) and, while it is
91
+ * empty, its box ({@link pivotEmptyBoxAt}). `null` for a table that is not laid out.
92
+ * @internal
93
+ */
94
+ export declare const pivotCellFormatsOf: (table: IPivotTable.JSON, cacheFields?: readonly {
95
+ numberFormat?: string | number;
96
+ }[]) => PivotCellFormats | null;
97
+ /**
98
+ * The field dropdowns and expand/collapse boxes of `table` within `coords`, at sheet cells; empty
99
+ * for a table that is not placed.
100
+ * @internal
101
+ */
102
+ export declare const pivotControlsIn: (table: IPivotTable, coords: IRange.Coords) => PivotControl[];
103
+ /** Where a label's box and text sit, in px at 100% from the cell's left edge. */
104
+ export interface PivotLabelLayout {
105
+ /** The expand/collapse box's left edge and its side; `size` is `0` for a label with no gutter. */
106
+ readonly boxLeft: number;
107
+ readonly boxSize: number;
108
+ /** Where the text starts: the label's whole leading inset. */
109
+ readonly textLeft: number;
110
+ }
111
+ /**
112
+ * How a label of `style` is laid out, as Excel's window draws it
113
+ * (`pivot-probes/probe-pivot-label-geometry.ps1`, under Aptos Narrow 11, Calibri 11 and Arial 16
114
+ * Normal fonts, cells from 8 to 36 pt, 11-04). With `pad` the cell's own leading padding:
115
+ * - the box is a square of the Normal font, not the cell's: 9 px under an 11 pt Normal at every cell
116
+ * size, odd so the `+` and `−` sit on a center pixel;
117
+ * - it starts two pads in and the text one pad after it, `[pad pad][box][pad][text]`;
118
+ * - each level moves both by the table's indent in Normal's indent units ({@link indentUnit}), but
119
+ * never by less than a unit and two of Normal's pads: an indent of 1 steps 13 px under an 11 pt
120
+ * Normal where an indented cell steps 9.
121
+ * A label without a gutter (a total's caption) starts one pad in, at its level's step.
122
+ *
123
+ * The indent moved by is the style's: the level's own (level × the table's indent), or one a user
124
+ * set, which the table holds as a format and which wins. Each of its units is that step over the
125
+ * table's indent below the first level, and Normal's indent unit at it: by hand, 2 on a first-level
126
+ * label is 18 px, 4 on a second-level one 52 px, under an 11 pt Normal and the table's indent 1
127
+ * (`probe-pivot-label-geometry.ps1`, `hand11`, `hand11b`, `hand2`).
128
+ * @internal
129
+ */
130
+ export declare const pivotLabelLayoutOf: (style: ICellStyle, label: PivotLabelInset) => PivotLabelLayout;
131
+ /**
132
+ * The expand/collapse box of a pivot label `cell`, in px at 100% from its left edge; `null` for a
133
+ * cell that keeps no box gutter.
134
+ * @internal
135
+ */
136
+ export declare const pivotBoxOf: (cell: ICell) => {
137
+ left: number;
138
+ size: number;
139
+ } | null;
140
+ //# sourceMappingURL=_PivotControls.d.ts.map
@@ -0,0 +1,9 @@
1
+ /** The lazy pivot code's module (`./engine`). */
2
+ export type PivotEngineModule = typeof import('./engine');
3
+ /**
4
+ * The one loader of the pivot code that is not the opaque model: a workbook that only carries
5
+ * its pivot tables through never loads it.
6
+ * @internal
7
+ */
8
+ export declare const PivotEngine: import('@sheetxl/utils').LazyModule<typeof import("./engine")>;
9
+ //# sourceMappingURL=_PivotEngine.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { Scalar } from '@sheetxl/primitives';
2
+ import { IPivotTable } from './IPivotTable';
3
+ /**
4
+ * Per field, its records' item ids, a grouped field's being its groups.
5
+ *
6
+ * @returns `null` when a record's value cannot fall in its range: a file's, since a refresh ungroups
7
+ * such a field.
8
+ */
9
+ export declare const recordColumnsOf: (cache: IPivotTable.CacheJSON, date1904: boolean) => number[][] | null;
10
+ /**
11
+ * A range grouping after a refresh: its bounds follow the values unless fixed, and its groups are
12
+ * made anew from them.
13
+ *
14
+ * @param values The values the field holds now.
15
+ * @returns The group, or `null` when a value is not a number, which ungroups the field.
16
+ */
17
+ export declare const regroupRange: (group: IPivotTable.CacheFieldGroupJSON, values: readonly Scalar[], date1904: boolean) => IPivotTable.CacheFieldGroupJSON | null;
18
+ /**
19
+ * How the items of a range grouping carry over a refresh: the first and last by place, since their
20
+ * captions name the bounds, the others by caption.
21
+ *
22
+ * @returns Per old item, its new index; -1 when no group has it any more.
23
+ */
24
+ export declare const remapRangeItems: (oldItems: readonly Scalar.JSON[], newItems: readonly Scalar.JSON[]) => number[];
25
+ //# sourceMappingURL=_PivotGroups.d.ts.map
@@ -0,0 +1,167 @@
1
+ import { Scalar } from '@sheetxl/primitives';
2
+ import { Tuple } from '../collections';
3
+ import { IPivotTable } from './IPivotTable';
4
+ /** What the item edits read of a table's definition. */
5
+ export type PivotDefinition = Pick<IPivotTable.JSON, 'fields' | 'rowFields' | 'columnFields' | 'pageFields'>;
6
+ /** A table's definition without what names and places it: what the engine's edits take and give back. */
7
+ export type PivotModel = Omit<IPivotTable.JSON, 'name' | 'cacheId' | 'location' | 'part' | 'partFormats' | 'buttons'>;
8
+ /** The caption Excel shows for the blank item. */
9
+ export declare const BlankText = "(blank)";
10
+ /** Per field, its values from tuples keyed by field index. */
11
+ export declare const cacheColumns: <T>(tuples: Tuple.GridTuple<T> | undefined, count: number) => T[][];
12
+ /** Whether a cache field groups values, so a table lists its groups rather than its cache items. */
13
+ export declare const isGrouping: (field: Pick<IPivotTable.CacheFieldJSON, "group"> | undefined) => boolean;
14
+ /** A field's listed items with the lines of its subtotals last, as the file lists them. */
15
+ export declare const withSubtotalItems: (items: readonly IPivotTable.PivotItemJSON[], subtotals: readonly IPivotTable.PivotSubtotal[] | undefined) => IPivotTable.PivotItemJSON[];
16
+ /** The slots of an axis, outermost first: the fields by index, with `-2` where the values sit. */
17
+ export declare const fieldSlotsOf: (table: Pick<IPivotTable.JSON, "rowFields" | "columnFields" | "pageFields">, axis: IPivotTable.Axis) => readonly number[];
18
+ /** Whether a cache field is a calculated field: its values are a formula's. */
19
+ export declare const isCalculatedField: (field: IPivotTable.CacheFieldJSON | undefined) => boolean;
20
+ /** Whether a table shows what only the calc engine can evaluate: a calculated field or item. */
21
+ export declare const hasFormulas: (table: Pick<IPivotTable.JSON, "dataFields">, fields: readonly IPivotTable.CacheFieldJSON[] | undefined) => boolean;
22
+ /**
23
+ * Whether a table has work to do before it can be laid out, which is async: filters to evaluate, or
24
+ * formulas. What it finds is held on the table and every layout reads it.
25
+ */
26
+ export declare const needsPrepare: (table: Pick<IPivotTable.JSON, "filters" | "dataFields">, fields: readonly IPivotTable.CacheFieldJSON[] | undefined) => boolean;
27
+ /** Per field, the items a table lists for it, by item index: a grouping field's groups, else its cache items. */
28
+ export declare const itemColumnsOf: (cache: IPivotTable.CacheJSON) => Scalar.JSON[][];
29
+ /** The number format of a date among plain numbers, when the field names none: the short date. */
30
+ export declare const DateItemFormat = 14;
31
+ /** What says which of a field's items are dates when others are not. */
32
+ type DateItemsField = Pick<IPivotTable.CacheFieldJSON, 'group'> & {
33
+ readonly dateItems?: readonly number[];
34
+ };
35
+ /** The items of a field that are dates among others: a grouping field's groups, else its cache items. */
36
+ export declare const dateItemsOf: (field: DateItemsField | undefined) => readonly number[] | undefined;
37
+ /** Whether an item of a field holding dates among other kinds is a date. */
38
+ export declare const isDateItem: (field: DateItemsField | undefined, item: number | undefined) => boolean;
39
+ /**
40
+ * The number format a date item shows with when its field names none. A group's item holds its value
41
+ * here, so its time shows (`pivot-probes/probe-pivot-discrete-group-kinds.ps1`, K05).
42
+ */
43
+ export declare const dateItemFormatOf: (field: DateItemsField | undefined, item: number | undefined) => number;
44
+ /** A cache item as a value. */
45
+ export declare const scalarOf: (item: Scalar.JSON | undefined) => Scalar;
46
+ /**
47
+ * What a field holds, from its items ({@link IPivotTable.IField.getDataType}): a calculated field is
48
+ * numbers, and a field whose numbers are dates is dates. Blanks are no kind.
49
+ */
50
+ export declare const dataTypeOf: (field: IPivotTable.CacheFieldJSON | undefined, items: readonly Scalar.JSON[]) => IPivotTable.IField.DataType;
51
+ /** A value as the text it is typed as. */
52
+ export declare const textOf: (value: Scalar) => string;
53
+ /** Whether a filter tests an item itself (a label or date filter) rather than its total of a data field. */
54
+ export declare const isItemFilter: (filter: IPivotTable.PivotFilterJSON) => boolean;
55
+ /** A kind of pivot filter: Excel's label, date, or value (top N among them). */
56
+ export type PivotFilterKind = 'label' | 'date' | 'value';
57
+ /** A filter's kind: a value filter names a data field; a label filter tests the caption (Display-shaped); any other tests the date. */
58
+ export declare const filterKindOf: (filter: IPivotTable.PivotFilterJSON) => PivotFilterKind;
59
+ /**
60
+ * A table with a field's filters of the kinds `drop` picks removed and `added` appended after the
61
+ * table's others, each with an id no other filter has.
62
+ *
63
+ * @returns `table` itself when nothing changes.
64
+ */
65
+ export declare const withFieldFilters: <T extends Pick<IPivotTable.JSON, "filters">>(table: T, field: number, drop: (kind: PivotFilterKind) => boolean, added?: readonly IPivotTable.PivotFilterJSON[]) => T;
66
+ /** Excel matches pivot field and item names without regard to case. */
67
+ export declare const isSameText: (a: string, b: string) => boolean;
68
+ /** A field's caption: its own name, else its cache field's. */
69
+ export declare const fieldCaptionOf: (table: PivotDefinition, cache: IPivotTable.CacheJSON, field: number) => string;
70
+ /** Whether a listed entry is an item of the cache rather than a subtotal or grand-total line. */
71
+ export declare const isCacheItem: (item: IPivotTable.PivotItemJSON) => boolean;
72
+ /** Where a field's subtotal lines start in its listed items, or their end. */
73
+ export declare const firstLineIndex: (items: readonly IPivotTable.PivotItemJSON[]) => number;
74
+ /**
75
+ * What a sort by label compares for a listed item: its caption when it has one, else its value, as
76
+ * Excel sorts a renamed item by its caption (`pivot-probes/probe-pivot-items.ps1`, I05c).
77
+ */
78
+ export declare const sortKeyOf: (item: IPivotTable.PivotItemJSON, values: readonly Scalar.JSON[]) => Scalar;
79
+ /**
80
+ * The captions of a field's items as the table lists them, by index into
81
+ * {@link IPivotTable.PivotFieldJSON.items}; `null` where an entry is not an item.
82
+ */
83
+ export declare const itemCaptionsOf: (table: PivotDefinition, cache: IPivotTable.CacheJSON, field: number) => (string | null)[];
84
+ /** Whether a field's items have details to show or hide: a row or column field. */
85
+ export declare const isExpandable: (table: PivotDefinition, field: number) => boolean;
86
+ /** Whether a field is a row or column field with another field inside it. */
87
+ export declare const hasInnerField: (table: PivotDefinition, field: number) => boolean;
88
+ /**
89
+ * A table with a row or column field's items expanded or collapsed: every item, or the one at
90
+ * `rank`. Excel takes an item of the innermost field (it changes nothing shown), but not the
91
+ * innermost field as a whole (`pivot-probes/probe-pivot-item-api.ps1`).
92
+ *
93
+ * @returns The table as edited, or `table` itself when nothing changes.
94
+ * @throws ExpectedError where Excel refuses it.
95
+ */
96
+ export declare const withExpanded: <T extends PivotDefinition>(table: T, field: number, expanded: boolean, rank?: number) => T;
97
+ /**
98
+ * A table showing only the items at `ranks` of a field, or every item for `null`. On a page field
99
+ * the items shown are its selection: more than one item turns on multiple selection, and the
100
+ * single item chosen is dropped.
101
+ *
102
+ * @returns The table as edited, or `table` itself when nothing changes.
103
+ * @throws ExpectedError when no item would show, as Excel refuses hiding the last one.
104
+ */
105
+ export declare const withVisibleItems: <T extends PivotDefinition>(table: T, field: number, ranks: ReadonlySet<number> | null) => T;
106
+ /**
107
+ * A table showing only the cache items `shown` of a field, or every item for `null`: what a slicer's
108
+ * selection is on each table it filters, the field on an axis or not
109
+ * (`pivot-probes/probe-pivot-slicer-edits.ps1`, E11, E12). A field the table lists no items for lists
110
+ * `listed()` first, as Excel does for a slicer's field (`probe-pivot-slicer-caption.ps1`, C07).
111
+ *
112
+ * @returns The table as edited, or `table` itself when nothing changes.
113
+ */
114
+ export declare const withShownItems: <T extends PivotDefinition>(table: T, field: number, listed: () => IPivotTable.PivotItemJSON[], shown: ReadonlySet<number> | null) => T;
115
+ /**
116
+ * `table` with each field of `fields` that is on no axis and hides an item or has a filter added as
117
+ * a page field showing what it does not hide or filter out: the records a layout and the filters
118
+ * keep. Items hidden and filters on a field off the axes filter nothing (M03, M29) unless a slicer
119
+ * or a timeline on the table filters that field, and then they filter it
120
+ * (`pivot-probes/probe-pivot-slicer-offaxis.ps1`, O01-O04; `probe-pivot-timeline-edits.ps1`, T02,
121
+ * T12). Never a table to show or save: its added page fields have no cells.
122
+ *
123
+ * @param fields The fields the table's slicers and timelines filter.
124
+ * @returns `table` itself when nothing is added.
125
+ */
126
+ export declare const withSlicerPages: <T extends PivotDefinition & Pick<IPivotTable.JSON, "filters">>(table: T, fields: readonly number[] | undefined) => T;
127
+ /**
128
+ * A page field {@link withSlicerPages} adds: it also keeps what the field's label or date filter
129
+ * keeps, which a page field's does not.
130
+ */
131
+ export type SlicerPageJSON = IPivotTable.PageFieldJSON & {
132
+ slicer?: true;
133
+ };
134
+ /**
135
+ * A table whose page field shows the item at `rank`, or every item for `null`: a single
136
+ * selection, so the field's hidden items and multiple selection are cleared.
137
+ *
138
+ * @returns The table as edited, or `table` itself when nothing changes.
139
+ * @throws ExpectedError when the field is not a page field.
140
+ */
141
+ export declare const withCurrentPage: <T extends PivotDefinition>(table: T, field: number, rank: number | null) => T;
142
+ /** How the API names the item before or after each item, as a base item: no item's caption, as Excel's are not. */
143
+ export declare const BaseItemPrevious = "(previous)";
144
+ export declare const BaseItemNext = "(next)";
145
+ /** A data field's number format as a code, or a format's. */
146
+ export declare const formatCodeOfData: (format: string | number | undefined) => string;
147
+ /** A data field's rule as the API reads it; `null` shown as is. */
148
+ export declare const showAsOf: (table: Pick<IPivotTable.JSON, "fields" | "dataFields">, cache: IPivotTable.CacheJSON, data: number) => IPivotTable.IDataField.ShowAs | null;
149
+ /** How a value's caption starts, by the function as OOXML spells it. */
150
+ export declare const CaptionPrefixes: Readonly<Record<string, string>>;
151
+ /**
152
+ * `caption`, numbered from 2 when a field, another data field or the values have it: one namespace, by
153
+ * what they are called now, so a field's old name is free (D01, D03, D21, D24).
154
+ *
155
+ * @param except The data field the caption is for, which does not clash with itself.
156
+ */
157
+ export declare const freeCaption: (table: Pick<IPivotTable.JSON, "fields" | "dataFields" | "valuesCaption">, cache: IPivotTable.CacheJSON, caption: string, except?: number) => string;
158
+ /**
159
+ * The caption a data field takes with the function `fn`: what comes before its first ` of ` takes the
160
+ * function's name, a caption without one becomes the default, and a caption taken is numbered (D04, D05,
161
+ * D20, D21, D30). Its own when `fn` is its function already.
162
+ *
163
+ * @throws ExpectedError for a function that is none.
164
+ */
165
+ export declare const dataCaptionFor: (table: Pick<IPivotTable.JSON, "fields" | "dataFields" | "valuesCaption">, cache: IPivotTable.CacheJSON, data: number, fn: string) => string;
166
+ export {};
167
+ //# sourceMappingURL=_PivotItems.d.ts.map
@@ -0,0 +1,237 @@
1
+ import { IRange, IRuntime } from '@sheetxl/primitives';
2
+ import { ICellStyle } from '../style';
3
+ import { IPivotTable } from './IPivotTable';
4
+ /** A row or column slot: a field of the cache, or where the values sit ({@link ValuesField}). */
5
+ export interface PivotSlot {
6
+ readonly field: number;
7
+ /** Its labels each take a column (outline, tabular) rather than sharing the next field's (compact). */
8
+ readonly ownColumn: boolean;
9
+ /** Tabular: an item's label beside its first child, rather than on a line of its own. */
10
+ readonly tabular: boolean;
11
+ /** Its label is written on every line, the repeated ones too. */
12
+ readonly repeatLabels: boolean;
13
+ }
14
+ /** A line of an axis, as the saved layout spells it with its items written out. */
15
+ export interface PivotLineBand {
16
+ readonly kind: 'item' | 'subtotal' | 'grand' | 'blank';
17
+ /** Its position among the axis's lines, for stripes. */
18
+ readonly index: number;
19
+ /** The item at each slot, outermost first; empty for the grand total. */
20
+ readonly path: readonly number[];
21
+ /** How many leading items it shares with the item line before it, which it does not label. */
22
+ readonly repeat: number;
23
+ /** The data field it names; `null` when it names none. */
24
+ readonly data: number | null;
25
+ }
26
+ /**
27
+ * What a row or a column of a laid-out table is:
28
+ * - `page`: a row of the page fields (rows only);
29
+ * - `gap`: the blank row between the page fields and the location, not the table's (rows only);
30
+ * - `header`: a header row above the data, or a label column left of it, by `index`;
31
+ * - a line of the axis.
32
+ */
33
+ export type PivotBand = {
34
+ readonly kind: 'page';
35
+ readonly index: number;
36
+ } | {
37
+ readonly kind: 'gap';
38
+ } | {
39
+ readonly kind: 'header';
40
+ readonly index: number;
41
+ } | PivotLineBand;
42
+ /** A laid-out table as bands, from the top-left cell of its page fields and location. */
43
+ export interface PivotStructure {
44
+ /** Top to bottom: the page rows and the gap under them, then the location's. */
45
+ readonly rows: readonly PivotBand[];
46
+ /** Left to right across the location: the label columns, then the column lines. */
47
+ readonly columns: readonly PivotBand[];
48
+ /** How many rows sit above the location: the page rows and the gap. */
49
+ readonly top: number;
50
+ readonly rowSlots: readonly PivotSlot[];
51
+ readonly columnSlots: readonly PivotSlot[];
52
+ /** Per row slot, the label column its labels are in. */
53
+ readonly labelColumns: readonly number[];
54
+ /** The first header row of column labels; the header rows above it hold captions. */
55
+ readonly labelRow: number;
56
+ /** How many header rows there are above the data. */
57
+ readonly headerRows: number;
58
+ /** How many label columns there are left of the data. */
59
+ readonly headerColumns: number;
60
+ /** How many data fields the table has. */
61
+ readonly dataCount: number;
62
+ /** The table is in compact form: its header captions are `Row Labels` and `Column Labels`. */
63
+ readonly compact: boolean;
64
+ /** The field captions and their buttons are hidden: their cells are blank. */
65
+ readonly hiddenFieldHeaders: boolean;
66
+ /** Each page field: its field, and its caption cell from the top-left (its item is the next cell). */
67
+ readonly pages: readonly {
68
+ readonly field: number;
69
+ readonly row: number;
70
+ readonly column: number;
71
+ readonly selected: boolean;
72
+ }[];
73
+ /** It has no fields yet ({@link isPivotEmpty}): it holds its cells, and they show nothing. */
74
+ readonly empty?: true;
75
+ }
76
+ /** How many rows and columns a table with no fields holds (`pivot-probes/probe-pivot-add.ps1`, A01). */
77
+ export declare const PivotPlaceholderSize: {
78
+ readonly rows: 18;
79
+ readonly columns: 3;
80
+ };
81
+ /**
82
+ * The borders an empty table draws at a cell of its placeholder ({@link PivotPlaceholderSize}), from
83
+ * its top-left: a grey outline round the box, its inner lines in the window's background. `null`
84
+ * for a table that is not empty, and outside the box. Excel writes them into the cells' formats on
85
+ * every layout that comes out empty, and the next layout clears them
86
+ * (`pivot-probes/probe-pivot-empty-box.ps1`).
87
+ */
88
+ export declare const pivotEmptyBoxAt: (structure: PivotStructure, row: number, column: number) => ICellStyle.Properties | null;
89
+ /** Whether a table has no field placed and no value. */
90
+ export declare const isPivotEmpty: (table: Pick<IPivotTable.JSON, "rowFields" | "columnFields" | "pageFields" | "dataFields">) => boolean;
91
+ /**
92
+ * The elements of a pivot table style, as OOXML names them, in Excel's precedence: a later one
93
+ * wins a property an earlier one also sets. Measured at every crossing of eleven layouts;
94
+ * `lastHeaderCell`, `firstTotalCell` and `lastTotalCell` are a table's only.
95
+ */
96
+ export declare const PivotStyleElements: readonly ["wholeTable", "pageFieldLabels", "pageFieldValues", "firstColumnStripe", "secondColumnStripe", "firstRowStripe", "secondRowStripe", "firstColumn", "headerRow", "firstHeaderCell", "firstSubtotalColumn", "secondSubtotalColumn", "thirdSubtotalColumn", "blankRow", "firstSubtotalRow", "secondSubtotalRow", "thirdSubtotalRow", "firstColumnSubheading", "secondColumnSubheading", "thirdColumnSubheading", "firstRowSubheading", "secondRowSubheading", "thirdRowSubheading", "lastColumn", "totalRow"];
97
+ export type PivotStyleElement = typeof PivotStyleElements[number];
98
+ /**
99
+ * Where a table's parts start once it is laid out, from its row and column fields: the header
100
+ * rows above the data (one, or one per column field and one more for the column captions) and the
101
+ * label columns left of it.
102
+ *
103
+ * @remarks
104
+ * Hidden field headers drop the column captions' row unless the one data field's name sits in it,
105
+ * beside the row labels (`pivot-probes/probe-pivot-field-headers.ps1`, 2026-10-27).
106
+ */
107
+ export declare const headerOf: (table: IPivotTable.JSON) => IPivotTable.PivotHeaderJSON;
108
+ /**
109
+ * The table's bands from its saved layout, or `null` when it has none (never laid out).
110
+ *
111
+ * @remarks
112
+ * The page fields sit above the location, a blank row between, as `buttonsOf` places them.
113
+ */
114
+ export declare const structureOf: (table: IPivotTable.JSON) => PivotStructure | null;
115
+ /**
116
+ * The cells a laid-out table covers from `origin`, the top-left cell of its page fields and location:
117
+ * its rows, and its columns or its page fields' (a caption and an item each), whichever is wider.
118
+ */
119
+ export declare const extentOf: (structure: PivotStructure, origin: IRange.CellCoords) => IRange.Coords;
120
+ /**
121
+ * The cells a laid-out table writes from `origin`, the top-left cell of its page fields and
122
+ * location: the page fields' rows, as wide as the page fields, and the location. The blank row
123
+ * between them, and the cells beside the narrower of the two, are the sheet's.
124
+ */
125
+ export declare const cellsOf: (structure: PivotStructure, origin: IRange.CellCoords) => IRange.Coords[];
126
+ /** Which parts of a pivot table style show, as {@link IPivotTable.PivotStyleJSON} holds them. */
127
+ export type PivotStyleOptions = Pick<IPivotTable.PivotStyleJSON, 'showRowHeaders' | 'showColumnHeaders' | 'showRowStripes' | 'showColumnStripes' | 'showLastColumn'>;
128
+ /** How many lines each stripe covers, from the style's stripe elements (`size`); absent, 1. */
129
+ export interface PivotStripeSizes {
130
+ readonly firstRowStripe?: number;
131
+ readonly secondRowStripe?: number;
132
+ readonly firstColumnStripe?: number;
133
+ readonly secondColumnStripe?: number;
134
+ }
135
+ /** Whether a band is a line of an axis. */
136
+ export declare const isLine: (band: PivotBand | undefined) => band is PivotLineBand;
137
+ /**
138
+ * The style elements that cover a cell, in {@link PivotStyleElements} order, the options applied;
139
+ * empty for a cell that is not the table's.
140
+ *
141
+ * @param row From the top-left cell of the page fields and location.
142
+ */
143
+ export declare const pivotElementsAt: (structure: PivotStructure, row: number, column: number, options: PivotStyleOptions, stripes?: PivotStripeSizes) => PivotStyleElement[];
144
+ /**
145
+ * Which band of `element` a cell is in: two neighbors that both have the element share an inside
146
+ * line only in the same band, and are outlined apart otherwise
147
+ * (`pivot-probes/probe-pivot-style-collapsed.ps1`). A subheading's band is its item, so a collapsed
148
+ * item is outlined from the next; a column item's subtotal is a band of its own. Each subtotal line
149
+ * is one, and a blank line is two, its label columns and its data. Every other element is one band.
150
+ */
151
+ export declare const pivotBandOf: (structure: PivotStructure, row: number, column: number, element: PivotStyleElement) => string;
152
+ /**
153
+ * What a cell of a laid-out table shows:
154
+ * - `pageCaption`, `pageItem`: a page field's caption and its item, `page` its index;
155
+ * - `dataCaption`: a data field's name, where the one data field is named in the header or on
156
+ * the only line of a table with no row fields;
157
+ * - `rowHeader`, `columnHeader`: a compact table's `Row Labels` and `Column Labels`;
158
+ * - `fieldCaption`: a field's caption over its labels, outside compact form (the values' caption
159
+ * where the values are the slot);
160
+ * - `label`: an item's label at `level` of `axis` (the values slot: a data field's name);
161
+ * - `total`: a subtotal's or the grand total's caption;
162
+ * - `value`: a crossing of two lines - a value, a total, or empty.
163
+ */
164
+ export type PivotCell = {
165
+ readonly kind: 'pageCaption' | 'pageItem';
166
+ readonly page: number;
167
+ } | {
168
+ readonly kind: 'dataCaption';
169
+ readonly data: number;
170
+ } | {
171
+ readonly kind: 'rowHeader' | 'columnHeader';
172
+ } | {
173
+ readonly kind: 'fieldCaption';
174
+ readonly axis: 'row' | 'column';
175
+ readonly level: number;
176
+ } | {
177
+ readonly kind: 'label';
178
+ readonly axis: 'row' | 'column';
179
+ readonly level: number;
180
+ readonly line: PivotLineBand;
181
+ } | {
182
+ readonly kind: 'total';
183
+ readonly axis: 'row' | 'column';
184
+ readonly line: PivotLineBand;
185
+ } | {
186
+ readonly kind: 'value';
187
+ readonly row: PivotLineBand;
188
+ readonly column: PivotLineBand;
189
+ };
190
+ /**
191
+ * What the cell at `row`, `column` shows, or `null` for a blank cell or one that is not the table's.
192
+ *
193
+ * @param row From the top-left cell of the page fields and location.
194
+ */
195
+ export declare const pivotCellAt: (structure: PivotStructure, row: number, column: number) => PivotCell | null;
196
+ /** What a cell's number format reads of each cache field. */
197
+ export type PivotCacheFieldFormats = readonly {
198
+ readonly numberFormat?: string | number;
199
+ readonly dateItems?: readonly number[];
200
+ readonly group?: IPivotTable.CacheFieldGroupJSON;
201
+ }[];
202
+ /**
203
+ * The number format Excel gives a cell of the table: a data field's or a pivot field's
204
+ * `numberFormat` (a code, or a built-in's id), or `undefined` for General or a cell that is not
205
+ * the table's.
206
+ *
207
+ * @remarks
208
+ * A value cell, empty or a total, takes its line's data field's; a label its field's, as do a
209
+ * subtotal's caption, a blank line's label cell, a page field's selected item and, from the first
210
+ * field of its axis, the grand total's caption; headers, captions, the values' labels and a page
211
+ * field showing all its items are General. A field's format is its pivot field's, else
212
+ * `cacheFields`'s (its source column's).
213
+ *
214
+ * @param row From the top-left cell of the page fields and location.
215
+ */
216
+ export declare const pivotNumberFormatAt: (structure: PivotStructure, table: IPivotTable.JSON, row: number, column: number, cacheFields?: PivotCacheFieldFormats) => string | number | undefined;
217
+ /**
218
+ * The code a pivot's number format renders with: a built-in id as `runtime`'s locale shows it,
219
+ * a code as it is; absent, General.
220
+ */
221
+ export declare const formatCodeOf: (format: string | number | undefined, runtime: IRuntime) => string;
222
+ /** A rectangle of a table's cells, from the top-left cell of its page fields and location, with a format code. */
223
+ export interface PivotFormatRegion extends IRange.Coords {
224
+ readonly value: string;
225
+ }
226
+ /**
227
+ * The cells of a laid-out table whose number format ({@link pivotNumberFormatAt}) shows a date or
228
+ * a time, as rectangles with the code each renders with; empty when no format the table names is
229
+ * one. Walked by band: the value cells by runs of the lines' data fields, the page, header and
230
+ * label cells one at a time, merged down their column. A number format the user put on the table
231
+ * (`userNumberFormatAt`) wins over the definition's; a table with one is walked cell by cell.
232
+ *
233
+ * @param dateCodeOf The code a format renders with when it shows a date or a time, else `null`.
234
+ * @param userNumberFormatAt The number format the formats a user put on the table give a cell, if any.
235
+ */
236
+ export declare const pivotDateRegionsOf: (structure: PivotStructure, table: IPivotTable.JSON, cacheFields: PivotCacheFieldFormats | undefined, dateCodeOf: (format: string | number) => string | null, userNumberFormatAt?: (row: number, column: number) => string | number | undefined) => PivotFormatRegion[];
237
+ //# sourceMappingURL=_PivotStructure.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { ICellStyle, IStyleCollection } from '../style';
2
+ import { ITableStyle } from '../table';
3
+ import { IPivotTable } from './IPivotTable';
4
+ /** A pivot table style over a small schematic table, cell by cell, for a gallery swatch. */
5
+ export interface PivotStylePreview {
6
+ readonly rows: number;
7
+ readonly columns: number;
8
+ /** The style a cell shows, from the preview's top-left. */
9
+ getStyleAt(row: number, column: number): ICellStyle;
10
+ }
11
+ /**
12
+ * `style` over Excel's gallery swatch, with no sheet and no WebAssembly; `null` is the gallery's
13
+ * None, a table with no style.
14
+ *
15
+ * @param options Which parts of the style show; absent, those Excel gives a new table.
16
+ * @param rows How many rows the swatch has, at least 3; 5 by default, as Excel online's. Excel
17
+ * desktop's has 8.
18
+ * @internal
19
+ */
20
+ export declare const pivotStylePreviewOf: (styles: IStyleCollection, style: ITableStyle | null, options?: IPivotTable.PivotStyleJSON, rows?: number) => PivotStylePreview;
21
+ //# sourceMappingURL=_PivotStylePreview.d.ts.map