@sheetxl/sdk 0.8.0-beta.1 → 0.8.0-beta.11

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 (775) hide show
  1. package/README.md +1 -1
  2. package/THIRD-PARTY-NOTICES.md +1 -1
  3. package/browser/esm/B7aUIvgUjncMMD_i.mjs +394 -0
  4. package/browser/esm/BFagR2JeWs74iAG3.mjs +171 -0
  5. package/browser/esm/BGOFfpxr2jPIdqmV.mjs +40 -0
  6. package/browser/esm/BLoUBId2xZpXAK_H.mjs +698 -0
  7. package/browser/esm/BMyDRQ716j79h_bH.mjs +86 -0
  8. package/browser/esm/BVDiOXGMc5_FMGfy.mjs +400 -0
  9. package/browser/esm/BjkCiv5Jz6WYKZeu.mjs +598 -0
  10. package/browser/esm/BkBhLS0l6z8sxI6D.mjs +441 -0
  11. package/browser/esm/BnG31I6Oj_HEtSPS.mjs +167 -0
  12. package/browser/esm/BoV6zPBnfqCBCqZ7.mjs +7729 -0
  13. package/browser/esm/BpgskG1Er_lGQ_yS.mjs +142 -0
  14. package/browser/esm/BtvLTTfSBdAKplVG.mjs +466 -0
  15. package/browser/esm/C16ycKja6zG0crV_.mjs +55580 -0
  16. package/browser/esm/C2VbEI_XVAoseAwa.mjs +1552 -0
  17. package/browser/esm/C4MqfLn9Dm-l3OIk.mjs +540 -0
  18. package/browser/esm/C5E6zSGAALWf61n4.mjs +199 -0
  19. package/browser/esm/CHU6iu_WGlm7fLET.mjs +1001 -0
  20. package/browser/esm/CQYjO777cmAznUzK.mjs +527 -0
  21. package/browser/esm/CU3DmJ-YnVVrC1_k.mjs +1123 -0
  22. package/browser/esm/CV5EGEjG5_-CPpP0.mjs +8212 -0
  23. package/browser/esm/{uyWBMSIxMlt8n5Z3.mjs → CaB7J-xgfKO2uAkG.mjs} +2 -2
  24. package/browser/esm/CkxWugaJFjDGZNZ-.mjs +12 -0
  25. package/browser/esm/ClPfI4lODvCece29.mjs +632 -0
  26. package/browser/esm/ClbvFbFzFzXLBKNN.mjs +193 -0
  27. package/browser/esm/{DlPMeIyxT9tG_WDk.mjs → Ctjb0SsxV4K4MMqG.mjs} +179 -202
  28. package/browser/esm/D5np__Jb1euAyaLw.mjs +7 -0
  29. package/browser/esm/DEiPS3Dr-s4fPbVZ.mjs +607 -0
  30. package/browser/esm/DLLE0FZNsKxbBzRn.mjs +128 -0
  31. package/browser/esm/DWNzqw7DUKwoxjri.mjs +20 -0
  32. package/browser/esm/{B0HS42a7lga1k1U_.mjs → Dlmig06rIo7cInRk.mjs} +2 -2
  33. package/browser/esm/{f2G3QRgEbvFJcoa2.mjs → DvAaxH6z_tGvrRzl.mjs} +1704 -1008
  34. package/browser/esm/Dyq_ivuHvlXLwPCl.mjs +12831 -0
  35. package/browser/esm/PcHFjNzQsE54POri.mjs +1141 -0
  36. package/browser/esm/S2dNNx1a5ydRnARM.mjs +367 -0
  37. package/browser/esm/f1IoRb7tEb0QmCSt.mjs +110 -0
  38. package/browser/esm/gssVX_FH1XFN-twD.mjs +210 -0
  39. package/browser/esm/index.mjs +1759 -1161
  40. package/browser/esm/nvU0ClAbf0g94YBK.mjs +1695 -0
  41. package/browser/esm/zlLuW405RSguy4Kn.mjs +357 -0
  42. package/licenses/dependencies.txt +141 -141
  43. package/node/esm/2Kihw_-5lVTEnwMa.mjs +1132 -0
  44. package/node/esm/857CIBgQgGpnqrXk.mjs +199 -0
  45. package/node/esm/B084DssTcdBheTp_.mjs +7966 -0
  46. package/node/esm/B21JjOLghRoDOrkx.mjs +134 -0
  47. package/node/esm/BIRq1kT7lLRzns9t.mjs +610 -0
  48. package/node/esm/BIwObuhTJYf0jpUa.mjs +451 -0
  49. package/node/esm/Bbf1Pm9Gk7YpLTvg.mjs +12 -0
  50. package/node/esm/BqiexuA89caYnAPz.mjs +1135 -0
  51. package/node/esm/BrCKGFRsX_ezFJ4B.mjs +811 -0
  52. package/node/esm/CCN5vD410obwdz38.mjs +405 -0
  53. package/node/esm/{Cku7XiUvw1xrRasi.mjs → CDHdgJXH2vS71WMc.mjs} +1 -1
  54. package/node/esm/CGp6VZL-gZa9Uezx.mjs +1860 -0
  55. package/node/esm/CNCNJNg890KdgkWh.mjs +142 -0
  56. package/node/esm/CZICGK_ss0HoGHCP.mjs +7 -0
  57. package/node/esm/CZiqiay42tFTrLI4.mjs +171 -0
  58. package/node/esm/CdJHUJSBRHZoryPe.mjs +360 -0
  59. package/node/esm/Ct3h15sCus4Tgt6M.mjs +1762 -0
  60. package/node/esm/CwePQwTILHHjGDkZ.mjs +1033 -0
  61. package/node/esm/CzXT00vrQa1_gvW9.mjs +28 -0
  62. package/node/esm/D1TKBVmoKGAXf37B.mjs +402 -0
  63. package/node/esm/D2KBymQJd1XhpeQD.mjs +540 -0
  64. package/node/esm/D6e2z7eZpxOJXHc7.mjs +1783 -0
  65. package/node/esm/D8zEN-6ZdDqDvTxM.mjs +639 -0
  66. package/node/esm/DNRhGK-8Tr9xcRyc.mjs +8320 -0
  67. package/node/esm/DOU54VsOjG-m-NyQ.mjs +210 -0
  68. package/node/esm/DUTskXCXref-IJnI.mjs +133 -0
  69. package/node/esm/D_t5AUxSm7_icjzq.mjs +638 -0
  70. package/node/esm/Db0v7zXNnyjBIjjI.mjs +372 -0
  71. package/node/esm/De2IONBxQhz-Qbyh.mjs +596 -0
  72. package/node/esm/Df1bL6VFvrqIdSLB.mjs +40 -0
  73. package/node/esm/DkwIPzKc3UwdUIfM.mjs +86 -0
  74. package/node/esm/DrTZbfemSLq2mseG.mjs +111 -0
  75. package/node/esm/OVfaSb506tNSIvbv.mjs +57107 -0
  76. package/node/esm/cGwrLA1RCE-WhJ7w.mjs +255 -0
  77. package/node/esm/index.mjs +2873 -53929
  78. package/node/esm/mFiBSM7XgBHV9AY7.mjs +13010 -0
  79. package/node/esm/yavzZOiZW_EjG9lE.mjs +15 -0
  80. package/package.json +15 -17
  81. package/resources/contents.json +184 -0
  82. package/resources/fonts/arial-bold-italic.hinted.json +125 -0
  83. package/resources/fonts/arial-bold-italic.metrics.json +139 -0
  84. package/resources/fonts/arial-bold-italic.rows.json +9 -0
  85. package/resources/fonts/arial-bold.hinted.json +125 -0
  86. package/resources/fonts/arial-bold.metrics.json +139 -0
  87. package/resources/fonts/arial-bold.rows.json +9 -0
  88. package/resources/fonts/arial-italic.hinted.json +125 -0
  89. package/resources/fonts/arial-italic.metrics.json +139 -0
  90. package/resources/fonts/arial-italic.rows.json +9 -0
  91. package/resources/fonts/arial-regular.hinted.json +125 -0
  92. package/resources/fonts/arial-regular.metrics.json +139 -0
  93. package/resources/fonts/arial-regular.rows.json +9 -0
  94. package/resources/fonts/calibri-bold-italic.hinted.json +122 -0
  95. package/resources/fonts/calibri-bold-italic.metrics.json +137 -0
  96. package/resources/fonts/calibri-bold-italic.rows.json +9 -0
  97. package/resources/fonts/calibri-bold.hinted.json +122 -0
  98. package/resources/fonts/calibri-bold.metrics.json +137 -0
  99. package/resources/fonts/calibri-bold.rows.json +9 -0
  100. package/resources/fonts/calibri-italic.hinted.json +121 -0
  101. package/resources/fonts/calibri-italic.metrics.json +137 -0
  102. package/resources/fonts/calibri-italic.rows.json +9 -0
  103. package/resources/fonts/calibri-regular.hinted.json +121 -0
  104. package/resources/fonts/calibri-regular.metrics.json +137 -0
  105. package/resources/fonts/calibri-regular.rows.json +9 -0
  106. package/resources/fonts/cambria-bold-italic.hinted.json +105 -0
  107. package/resources/fonts/cambria-bold-italic.metrics.json +66 -0
  108. package/resources/fonts/cambria-bold-italic.rows.json +9 -0
  109. package/resources/fonts/cambria-bold.hinted.json +108 -0
  110. package/resources/fonts/cambria-bold.metrics.json +66 -0
  111. package/resources/fonts/cambria-bold.rows.json +9 -0
  112. package/resources/fonts/cambria-italic.hinted.json +102 -0
  113. package/resources/fonts/cambria-italic.metrics.json +66 -0
  114. package/resources/fonts/cambria-italic.rows.json +9 -0
  115. package/resources/fonts/cambria-regular.hinted.json +110 -0
  116. package/resources/fonts/cambria-regular.metrics.json +66 -0
  117. package/resources/fonts/cambria-regular.rows.json +9 -0
  118. package/resources/fonts/contents.json +406 -0
  119. package/resources/fonts/courier-new-bold-italic.hinted.json +11 -0
  120. package/resources/fonts/courier-new-bold-italic.metrics.json +143 -0
  121. package/resources/fonts/courier-new-bold-italic.rows.json +9 -0
  122. package/resources/fonts/courier-new-bold.hinted.json +11 -0
  123. package/resources/fonts/courier-new-bold.metrics.json +143 -0
  124. package/resources/fonts/courier-new-bold.rows.json +9 -0
  125. package/resources/fonts/courier-new-italic.hinted.json +11 -0
  126. package/resources/fonts/courier-new-italic.metrics.json +143 -0
  127. package/resources/fonts/courier-new-italic.rows.json +9 -0
  128. package/resources/fonts/courier-new-regular.hinted.json +11 -0
  129. package/resources/fonts/courier-new-regular.metrics.json +143 -0
  130. package/resources/fonts/courier-new-regular.rows.json +9 -0
  131. package/resources/fonts/times-new-roman-bold-italic.hinted.json +125 -0
  132. package/resources/fonts/times-new-roman-bold-italic.metrics.json +141 -0
  133. package/resources/fonts/times-new-roman-bold-italic.rows.json +9 -0
  134. package/resources/fonts/times-new-roman-bold.hinted.json +125 -0
  135. package/resources/fonts/times-new-roman-bold.metrics.json +141 -0
  136. package/resources/fonts/times-new-roman-bold.rows.json +9 -0
  137. package/resources/fonts/times-new-roman-italic.hinted.json +125 -0
  138. package/resources/fonts/times-new-roman-italic.metrics.json +143 -0
  139. package/resources/fonts/times-new-roman-italic.rows.json +9 -0
  140. package/resources/fonts/times-new-roman-regular.hinted.json +125 -0
  141. package/resources/fonts/times-new-roman-regular.metrics.json +141 -0
  142. package/resources/fonts/times-new-roman-regular.rows.json +9 -0
  143. package/resources/locales/de/model.msg.json +199 -21
  144. package/resources/locales/en/model.msg.json +207 -23
  145. package/types/scripting-api.json +10663 -0
  146. package/types/scripting-enums.json +435 -130
  147. package/types/scripting.d.ts +33010 -15730
  148. package/types/src/.generated/wasm/fonts.d.ts +161 -0
  149. package/types/src/.generated/wasm/fonts_bg.inline.d.ts +3 -0
  150. package/types/src/.generated/wasm/sdk.d.ts +122 -0
  151. package/types/src/.generated/wasm/sdk_bg.inline.d.ts +3 -0
  152. package/types/src/address/AddressUtils.d.ts +10 -1
  153. package/types/src/address/_StructuredAddress.d.ts +58 -0
  154. package/types/src/anchored/AbstractAnchored.d.ts +18 -8
  155. package/types/src/anchored/AnchoredMap.d.ts +2 -0
  156. package/types/src/anchored/IAnchoredMap.d.ts +52 -4
  157. package/types/src/autoFill/AutoFill.d.ts +316 -32
  158. package/types/src/autoFill/IAutoFill.d.ts +232 -15
  159. package/types/src/border/{IBorder.d.ts → IBorders.d.ts} +58 -41
  160. package/types/src/border/index.d.ts +1 -1
  161. package/types/src/calculation/Calculation.d.ts +584 -149
  162. package/types/src/calculation/ExternalBookBindings.d.ts +118 -0
  163. package/types/src/calculation/FormulaLiterals.d.ts +2 -1
  164. package/types/src/calculation/FormulaText.d.ts +98 -0
  165. package/types/src/calculation/ICalculation.d.ts +353 -88
  166. package/types/src/calculation/INamedFormulasCollection.d.ts +9 -8
  167. package/types/src/calculation/NamedFormulaCollection.d.ts +322 -115
  168. package/types/src/calculation/NamedLambdaFunction.d.ts +28 -0
  169. package/types/src/calculation/TokenType.d.ts +9 -0
  170. package/types/src/calculation/Types.d.ts +83 -2
  171. package/types/src/calculation/_CloneBoundary.d.ts +80 -0
  172. package/types/src/calculation/_FormulaToolkit.d.ts +9 -0
  173. package/types/src/calculation/_TableExtent.d.ts +60 -0
  174. package/types/src/calculation/_TableRename.d.ts +13 -0
  175. package/types/src/calculation/compiler/ASTTypes.d.ts +71 -0
  176. package/types/src/calculation/compiler/CompilerUtils.d.ts +152 -44
  177. package/types/src/calculation/compiler/FormulaCompiler.d.ts +29 -4
  178. package/types/src/calculation/compiler/FormulaParser.d.ts +1 -2
  179. package/types/src/calculation/compiler/LiteTransform.d.ts +17 -0
  180. package/types/src/calculation/compiler/ParserUtils.d.ts +42 -1
  181. package/types/src/calculation/compiler/SRParser.d.ts +2 -1
  182. package/types/src/calculation/compiler/Types.d.ts +79 -9
  183. package/types/src/calculation/engine/CalcBackend.d.ts +855 -0
  184. package/types/src/calculation/engine/index.d.ts +10 -0
  185. package/types/src/calculation/executor/CalcExecutor.d.ts +331 -33
  186. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +49 -2
  187. package/types/src/calculation/executor/CircularReference.d.ts +2 -0
  188. package/types/src/calculation/formula/Formula.d.ts +67 -21
  189. package/types/src/calculation/formula/FormulaBlock.d.ts +131 -23
  190. package/types/src/calculation/formula/FormulaRecordView.d.ts +79 -0
  191. package/types/src/calculation/formula/FunctionValues.d.ts +10 -0
  192. package/types/src/calculation/formula/IFormulaBlock.d.ts +277 -67
  193. package/types/src/calculation/formula/LambdaValue.d.ts +51 -26
  194. package/types/src/calculation/formula/LazyValue.d.ts +96 -0
  195. package/types/src/calculation/formula/TokenUtils.d.ts +25 -1
  196. package/types/src/calculation/formula/index.d.ts +1 -0
  197. package/types/src/calculation/functions/FunctionDeclarations.d.ts +35 -0
  198. package/types/src/calculation/functions/Operators.d.ts +8 -0
  199. package/types/src/calculation/functions/expandDeclaration.d.ts +15 -0
  200. package/types/src/calculation/functions/initializeFunctions.d.ts +3 -2
  201. package/types/src/calculation/grid/CalcGrid.d.ts +443 -158
  202. package/types/src/calculation/grid/CalcGridBackend.d.ts +523 -0
  203. package/types/src/calculation/grid/CalcGridProxy.d.ts +135 -0
  204. package/types/src/calculation/grid/CalcGridUtils.d.ts +69 -12
  205. package/types/src/calculation/grid/FormulaEntry.d.ts +129 -0
  206. package/types/src/calculation/grid/FormulaHost.d.ts +284 -0
  207. package/types/src/calculation/grid/ICalcGrid.d.ts +528 -141
  208. package/types/src/calculation/grid/_CalcRequest.d.ts +299 -0
  209. package/types/src/calculation/grid/_CellValueRun.d.ts +21 -0
  210. package/types/src/calculation/grid/index.d.ts +4 -0
  211. package/types/src/calculation/index.d.ts +2 -0
  212. package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +6 -2
  213. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +364 -11
  214. package/types/src/calculation/spatial/SpillEntry.d.ts +20 -5
  215. package/types/src/calculation/spatial/TouchedWindows.d.ts +86 -0
  216. package/types/src/calculation/spatial/index.d.ts +1 -0
  217. package/types/src/calculation/state/CalcInputs.d.ts +41 -0
  218. package/types/src/calculation/state/CalcNode.d.ts +141 -30
  219. package/types/src/calculation/state/CalcScope.d.ts +46 -0
  220. package/types/src/calculation/state/CalcState.d.ts +32 -1
  221. package/types/src/calculation/state/CalculationContext.d.ts +50 -3
  222. package/types/src/calculation/state/IContextContainer.d.ts +141 -27
  223. package/types/src/calculation/state/_PendingOverlayGrid.d.ts +163 -0
  224. package/types/src/calculation/state/_ReadObservedGrid.d.ts +74 -8
  225. package/types/src/calculation/state/index.d.ts +1 -0
  226. package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +80 -0
  227. package/types/src/calculation/symbol/ISymbolRegistry.d.ts +23 -0
  228. package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts +16 -2
  229. package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +63 -3
  230. package/types/src/calculation/symbol/SymbolRegistry.d.ts +20 -0
  231. package/types/src/calculation/symbol/index.d.ts +3 -2
  232. package/types/src/calculation/toolkit/FormulaLiteralReader.d.ts +4 -0
  233. package/types/src/calculation/toolkit/FormulaTextParser.d.ts +10 -0
  234. package/types/src/calculation/toolkit/FunctionDeclarationTable.d.ts +4 -0
  235. package/types/src/calculation/toolkit/index.d.ts +12 -0
  236. package/types/src/cell/ICell.d.ts +357 -33
  237. package/types/src/cell/ICellHeader.d.ts +31 -8
  238. package/types/src/cell/ICellProtection.d.ts +50 -10
  239. package/types/src/cellRange/ICellHeaderRange.d.ts +6 -9
  240. package/types/src/cellRange/ICellHeaderRanges.d.ts +5 -0
  241. package/types/src/cellRange/ICellRange.d.ts +737 -130
  242. package/types/src/cellRange/ICellRanges.d.ts +31 -24
  243. package/types/src/chart/Chart.d.ts +246 -16
  244. package/types/src/chart/ChartCollection.d.ts +31 -0
  245. package/types/src/chart/IChart.d.ts +2058 -18
  246. package/types/src/chart/IChartCollection.d.ts +50 -0
  247. package/types/src/chart/_ChartParts.d.ts +1066 -0
  248. package/types/src/chart/_ChartSource.d.ts +47 -0
  249. package/types/src/chart/createChart.d.ts +26 -0
  250. package/types/src/chart/index.d.ts +5 -3
  251. package/types/src/chart/kinds/ChartKind.d.ts +252 -0
  252. package/types/src/chart/kinds/_Area.d.ts +3 -0
  253. package/types/src/chart/kinds/_Bar.d.ts +4 -0
  254. package/types/src/chart/kinds/_BoxWhisker.d.ts +4 -0
  255. package/types/src/chart/kinds/_Bubble.d.ts +3 -0
  256. package/types/src/chart/kinds/_Funnel.d.ts +4 -0
  257. package/types/src/chart/kinds/_Hierarchy.d.ts +31 -0
  258. package/types/src/chart/kinds/_Histogram.d.ts +4 -0
  259. package/types/src/chart/kinds/_HitKinds.d.ts +23 -0
  260. package/types/src/chart/kinds/_Line.d.ts +4 -0
  261. package/types/src/chart/kinds/_OfPie.d.ts +4 -0
  262. package/types/src/chart/kinds/_Pie.d.ts +4 -0
  263. package/types/src/chart/kinds/_Placeholder.d.ts +6 -0
  264. package/types/src/chart/kinds/_Radar.d.ts +4 -0
  265. package/types/src/chart/kinds/_Scatter.d.ts +8 -0
  266. package/types/src/chart/kinds/_Sunburst.d.ts +4 -0
  267. package/types/src/chart/kinds/_Surface.d.ts +4 -0
  268. package/types/src/chart/kinds/_Treemap.d.ts +4 -0
  269. package/types/src/chart/kinds/_Waterfall.d.ts +18 -0
  270. package/types/src/chart/kinds/_builtIns.d.ts +11 -0
  271. package/types/src/chart/layout/ChartLayout.d.ts +825 -0
  272. package/types/src/chart/layout/TextMeasurer.d.ts +38 -0
  273. package/types/src/chart/layout/_HitGeometry.d.ts +50 -0
  274. package/types/src/chart/layout/_HitTest.d.ts +36 -0
  275. package/types/src/chart/layout/_Layout.d.ts +25 -0
  276. package/types/src/chart/layout/_LayoutUtils.d.ts +97 -0
  277. package/types/src/chart/math/BoxStats.d.ts +35 -0
  278. package/types/src/chart/math/DateUnitCalcs.d.ts +80 -0
  279. package/types/src/chart/math/DisplayUnits.d.ts +53 -0
  280. package/types/src/chart/math/Histogram.d.ts +48 -0
  281. package/types/src/chart/math/OrdUnitCalcs.d.ts +166 -0
  282. package/types/src/chart/math/Treemap.d.ts +28 -0
  283. package/types/src/chart/math/Trendlines.d.ts +71 -0
  284. package/types/src/chart/math/UnitCalcs.d.ts +98 -0
  285. package/types/src/chart/model/ChartModel.d.ts +681 -0
  286. package/types/src/chart/model/_ChartType.d.ts +14 -0
  287. package/types/src/chart/model/_Edits.d.ts +489 -0
  288. package/types/src/chart/model/_Grouping.d.ts +83 -0
  289. package/types/src/chart/model/_Inference.d.ts +52 -0
  290. package/types/src/chart/model/_ModelFacts.d.ts +112 -0
  291. package/types/src/chart/model/_NewChart.d.ts +208 -0
  292. package/types/src/chart/model/_OfPie.d.ts +18 -0
  293. package/types/src/chart/resolve/_LegacyStyles.d.ts +48 -0
  294. package/types/src/chart/resolve/_Resolve.d.ts +51 -0
  295. package/types/src/chart/resolve/_ResolvedChart.d.ts +444 -0
  296. package/types/src/collections/ArraysGrid.d.ts +1 -1
  297. package/types/src/collections/IGrid.d.ts +1 -1
  298. package/types/src/collections/ISparseGrid.d.ts +9 -0
  299. package/types/src/collections/ISpatialMap.d.ts +59 -21
  300. package/types/src/collections/ImmutableList.d.ts +28 -0
  301. package/types/src/collections/MixedTypedArrayList.d.ts +168 -108
  302. package/types/src/collections/RTree.d.ts +116 -36
  303. package/types/src/collections/RepeatingList.d.ts +7 -0
  304. package/types/src/collections/ScalarGrid.d.ts +50 -0
  305. package/types/src/collections/SparseGrid.d.ts +7 -4
  306. package/types/src/collections/SpatialMap.d.ts +15 -29
  307. package/types/src/collections/SpatialMap3D.d.ts +2 -0
  308. package/types/src/collections/Tuple.d.ts +128 -16
  309. package/types/src/collections/_GridUtils.d.ts +19 -6
  310. package/types/src/collections/_SpatialUtils.d.ts +20 -2
  311. package/types/src/collections/index.d.ts +2 -1
  312. package/types/src/color/_BuiltInIndexDefs.d.ts +6 -0
  313. package/types/src/comment/Comment.d.ts +246 -0
  314. package/types/src/comment/CommentCollection.d.ts +40 -0
  315. package/types/src/comment/IComment.d.ts +377 -50
  316. package/types/src/comment/ICommentCollection.d.ts +90 -0
  317. package/types/src/comment/NoteMovable.d.ts +26 -0
  318. package/types/src/comment/_CommentUtils.d.ts +50 -0
  319. package/types/src/comment/_NoteBox.d.ts +67 -0
  320. package/types/src/comment/index.d.ts +1 -0
  321. package/types/src/condition/AnchoredConditional.d.ts +110 -19
  322. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +42 -12
  323. package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +2 -0
  324. package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +2 -0
  325. package/types/src/condition/BuiltInOperators/AndOperator.d.ts +3 -1
  326. package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +2 -0
  327. package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +2 -0
  328. package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +2 -0
  329. package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +2 -0
  330. package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +4 -0
  331. package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +2 -0
  332. package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +2 -0
  333. package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +4 -1
  334. package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +5 -6
  335. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +2 -0
  336. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +2 -0
  337. package/types/src/condition/BuiltInOperators/IconOperator.d.ts +4 -0
  338. package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +22 -5
  339. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +2 -0
  340. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +2 -0
  341. package/types/src/condition/BuiltInOperators/NotOperator.d.ts +2 -0
  342. package/types/src/condition/BuiltInOperators/OrOperator.d.ts +3 -1
  343. package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +2 -0
  344. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
  345. package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +6 -0
  346. package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +21 -6
  347. package/types/src/condition/BuiltinSelectors/DateSelector.d.ts +4 -5
  348. package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +20 -0
  349. package/types/src/condition/BuiltinSelectors/TextLengthSelector.d.ts +7 -5
  350. package/types/src/condition/BuiltinSelectors/TimeSelector.d.ts +3 -5
  351. package/types/src/condition/BuiltinSelectors/WholeSelector.d.ts +3 -5
  352. package/types/src/condition/BuiltinSelectors/index.d.ts +12 -6
  353. package/types/src/condition/Condition.d.ts +19 -1
  354. package/types/src/condition/ICondition.d.ts +296 -75
  355. package/types/src/condition/_ConditionFormula.d.ts +152 -0
  356. package/types/src/condition/_ConditionUtils.d.ts +167 -13
  357. package/types/src/conditionalFormat/ConditionalEntry.d.ts +3 -3
  358. package/types/src/conditionalFormat/ConditionalFormat.d.ts +34 -17
  359. package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +19 -8
  360. package/types/src/conditionalFormat/IConditionalFormat.d.ts +16 -13
  361. package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +2 -0
  362. package/types/src/dataTable/DataTable.d.ts +67 -0
  363. package/types/src/dataTable/DataTableCollection.d.ts +19 -0
  364. package/types/src/dataTable/IDataTable.d.ts +99 -0
  365. package/types/src/dataTable/IDataTableCollection.d.ts +18 -0
  366. package/types/src/dataTable/index.d.ts +6 -0
  367. package/types/src/dataValidation/DataValidation.d.ts +70 -4
  368. package/types/src/dataValidation/DataValidationCollection.d.ts +23 -9
  369. package/types/src/dataValidation/IDataValidation.d.ts +150 -31
  370. package/types/src/dataValidation/IDataValidationCollection.d.ts +34 -2
  371. package/types/src/date/DateUtils.d.ts +20 -0
  372. package/types/src/date/_DateUtils.d.ts +91 -7
  373. package/types/src/documentProperties/DocumentProperties.d.ts +66 -0
  374. package/types/src/documentProperties/ICustomProperty.d.ts +69 -0
  375. package/types/src/documentProperties/IDocumentProperties.d.ts +110 -0
  376. package/types/src/documentProperties/index.d.ts +3 -0
  377. package/types/src/externalBook/ExternalBookCollection.d.ts +145 -12
  378. package/types/src/externalBook/ExternalBookName.d.ts +96 -0
  379. package/types/src/externalBook/IExternalBook.d.ts +171 -19
  380. package/types/src/externalBook/IExternalBookCollection.d.ts +79 -7
  381. package/types/src/externalBook/index.d.ts +1 -0
  382. package/types/src/{lib/file → file}/file.browser.d.ts +22 -8
  383. package/types/src/{lib/file → file}/file.node.d.ts +7 -2
  384. package/types/src/fill/IEffect.d.ts +5 -5
  385. package/types/src/fill/IFill.d.ts +129 -77
  386. package/types/src/fill/IFillable.d.ts +47 -0
  387. package/types/src/fill/IStroke.d.ts +204 -64
  388. package/types/src/fill/PaintUtils.d.ts +22 -0
  389. package/types/src/fill/RectAlignment.d.ts +20 -0
  390. package/types/src/fill/_Fills.d.ts +187 -0
  391. package/types/src/fill/_Stroke.d.ts +89 -0
  392. package/types/src/fill/index.d.ts +3 -0
  393. package/types/src/filter/IFilter.d.ts +188 -5
  394. package/types/src/font/AdvanceBuilder.d.ts +59 -0
  395. package/types/src/font/AdvanceTable.d.ts +228 -0
  396. package/types/src/font/CanvasAdvanceBuilder.d.ts +54 -0
  397. package/types/src/font/FontCapture.d.ts +4 -0
  398. package/types/src/font/FontCollection.d.ts +108 -0
  399. package/types/src/font/FontPlatform.d.ts +20 -0
  400. package/types/src/font/FontUtils.d.ts +5 -0
  401. package/types/src/font/IFont.d.ts +208 -61
  402. package/types/src/font/IFontCollection.d.ts +126 -22
  403. package/types/src/font/IFontStyle.d.ts +207 -0
  404. package/types/src/font/TableFileAdvanceBuilder.d.ts +36 -0
  405. package/types/src/font/_BuiltinFontTables.d.ts +10 -0
  406. package/types/src/font/_FontUtils.d.ts +11 -4
  407. package/types/src/font/_FontsVersion.d.ts +7 -0
  408. package/types/src/font/index.d.ts +2 -1
  409. package/types/src/font/platform.browser.d.ts +15 -0
  410. package/types/src/font/platform.node.d.ts +5 -0
  411. package/types/src/group/Group.d.ts +141 -0
  412. package/types/src/group/GroupMovableCollection.d.ts +41 -0
  413. package/types/src/group/IGroup.d.ts +129 -0
  414. package/types/src/group/index.d.ts +2 -0
  415. package/types/src/history/IHistory.d.ts +21 -3
  416. package/types/src/hyperlink/IHyperlink.d.ts +20 -1
  417. package/types/src/hyperlink/_Hyperlink.d.ts +5 -1
  418. package/types/src/i18n/LanguagePack.d.ts +12 -4
  419. package/types/src/index.d.ts +8 -0
  420. package/types/src/io/AbstractBackingStore.d.ts +24 -1
  421. package/types/src/io/ArrayBackingStore.d.ts +1 -1
  422. package/types/src/io/EmbeddedPart.d.ts +20 -0
  423. package/types/src/io/IEmbeddedPart.d.ts +63 -0
  424. package/types/src/io/IWorkbookIO.d.ts +185 -18
  425. package/types/src/io/WorkbookIO.d.ts +9 -0
  426. package/types/src/io/WorkbookOrigin.d.ts +20 -11
  427. package/types/src/io/WorkbookOriginProvider.d.ts +46 -0
  428. package/types/src/io/_XmlFragment.d.ts +49 -0
  429. package/types/src/io/index.d.ts +1 -0
  430. package/types/src/license/LicenseDetails.d.ts +1 -0
  431. package/types/src/license/LicenseManager.d.ts +25 -1
  432. package/types/src/license/Types.d.ts +38 -0
  433. package/types/src/license/_Utils.d.ts +39 -0
  434. package/types/src/license/details.d.ts +24 -0
  435. package/types/src/license/license-key.d.ts +49 -2
  436. package/types/src/license/runtime.browser.d.ts +46 -0
  437. package/types/src/{lib/utils/utils.node.d.ts → license/runtime.node.d.ts} +19 -12
  438. package/types/src/listener/IListener.d.ts +23 -6
  439. package/types/src/listener/ListenerEmitter.d.ts +55 -6
  440. package/types/src/model/AbstractModel.d.ts +14 -5
  441. package/types/src/movable/AbstractMovableContent.d.ts +182 -0
  442. package/types/src/movable/CustomElement.d.ts +4 -5
  443. package/types/src/movable/ErrorContent.d.ts +49 -0
  444. package/types/src/movable/FormControl.d.ts +285 -0
  445. package/types/src/movable/GroupMember.d.ts +87 -0
  446. package/types/src/movable/ICustomElement.d.ts +7 -2
  447. package/types/src/movable/IErrorContent.d.ts +23 -0
  448. package/types/src/movable/IFormControl.d.ts +455 -0
  449. package/types/src/movable/IMovable.d.ts +405 -60
  450. package/types/src/movable/IMovableCollection.d.ts +64 -4
  451. package/types/src/movable/Movable.d.ts +161 -50
  452. package/types/src/movable/MovableCollection.d.ts +21 -10
  453. package/types/src/movable/MovableContentRegistry.d.ts +113 -0
  454. package/types/src/movable/_BuiltInContents.d.ts +14 -0
  455. package/types/src/movable/_ContentFactory.d.ts +35 -0
  456. package/types/src/movable/_DrawnBounds.d.ts +37 -0
  457. package/types/src/movable/_InsertableCollection.d.ts +39 -0
  458. package/types/src/movable/_MovableUtils.d.ts +5 -0
  459. package/types/src/movable/_PendingContent.d.ts +25 -0
  460. package/types/src/movable/_PlacementUtils.d.ts +55 -0
  461. package/types/src/movable/_RotatedFrame.d.ts +20 -0
  462. package/types/src/movable/index.d.ts +7 -1
  463. package/types/src/named/AbstractNamed.d.ts +1 -1
  464. package/types/src/named/INamed.d.ts +34 -1
  465. package/types/src/named/INamedCollection.d.ts +28 -2
  466. package/types/src/named/NamedCollection.d.ts +32 -19
  467. package/types/src/numFmt/BuiltInFormats.d.ts +20 -7
  468. package/types/src/numFmt/IFormatEngine.d.ts +2 -0
  469. package/types/src/numFmt/NumberFormatParser.d.ts +5 -0
  470. package/types/src/numFmt/NumfmtFormatEngine.d.ts +2 -0
  471. package/types/src/numFmt/_FormatCell.d.ts +11 -2
  472. package/types/src/numFmt/_NumFmtUtils.d.ts +0 -1
  473. package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +6 -0
  474. package/types/src/outline/IOutline.d.ts +186 -0
  475. package/types/src/outline/Outline.d.ts +157 -0
  476. package/types/src/outline/index.d.ts +2 -0
  477. package/types/src/person/IPerson.d.ts +99 -0
  478. package/types/src/person/IPersonCollection.d.ts +51 -0
  479. package/types/src/person/Person.d.ts +32 -0
  480. package/types/src/person/PersonCollection.d.ts +49 -0
  481. package/types/src/person/index.d.ts +4 -0
  482. package/types/src/picture/IPicture.d.ts +131 -4
  483. package/types/src/picture/Picture.d.ts +42 -14
  484. package/types/src/pivot/IPivotTable.d.ts +72 -0
  485. package/types/src/pivot/IPivotTableCollection.d.ts +25 -0
  486. package/types/src/pivot/PivotCache.d.ts +34 -0
  487. package/types/src/pivot/PivotTable.d.ts +61 -0
  488. package/types/src/pivot/PivotTableCollection.d.ts +25 -0
  489. package/types/src/pivot/_PivotXml.d.ts +24 -0
  490. package/types/src/pivot/index.d.ts +6 -0
  491. package/types/src/primitives/CompositeRangeStats.d.ts +2 -0
  492. package/types/src/primitives/Criteria.d.ts +1 -1
  493. package/types/src/primitives/Grouping.d.ts +65 -0
  494. package/types/src/primitives/LambdaBrand.d.ts +26 -0
  495. package/types/src/primitives/PrimitiveUtils.d.ts +56 -19
  496. package/types/src/primitives/Range.d.ts +133 -25
  497. package/types/src/primitives/RangeStats.d.ts +30 -2
  498. package/types/src/primitives/ReferenceRange.d.ts +44 -0
  499. package/types/src/primitives/Runtime.d.ts +15 -2
  500. package/types/src/primitives/environment.browser.d.ts +9 -0
  501. package/types/src/primitives/environment.node.d.ts +10 -0
  502. package/types/src/primitives/stats/AggregateStats.d.ts +49 -15
  503. package/types/src/primitives/stats/Cancellation.d.ts +13 -0
  504. package/types/src/primitives/stats/FrequencyStats.d.ts +10 -1
  505. package/types/src/primitives/stats/LookupIndex.d.ts +46 -0
  506. package/types/src/primitives/stats/Ranked.d.ts +1 -1
  507. package/types/src/primitives/stats/SortedNumbers.d.ts +4 -2
  508. package/types/src/primitives/stats/index.d.ts +1 -0
  509. package/types/src/print/IPageLayout.d.ts +635 -0
  510. package/types/src/print/PageLayout.d.ts +258 -0
  511. package/types/src/print/index.d.ts +1 -1
  512. package/types/src/protectedRange/IProtectedRange.d.ts +6 -2
  513. package/types/src/protectedRange/IProtectedRangeCollection.d.ts +2 -0
  514. package/types/src/protectedRange/ProtectedRange.d.ts +1 -4
  515. package/types/src/protectedRange/ProtectedRangeCollection.d.ts +19 -8
  516. package/types/src/protection/DefaultProtection.d.ts +12 -1
  517. package/types/src/protection/IProtection.d.ts +42 -2
  518. package/types/src/protection/PasswordHasher.d.ts +13 -0
  519. package/types/src/reference/ReferenceUtils.d.ts +80 -0
  520. package/types/src/reference/index.d.ts +2 -0
  521. package/types/src/resource/IResource.d.ts +21 -1
  522. package/types/src/resource/IResourceCollection.d.ts +9 -1
  523. package/types/src/resource/ResourceCollection.d.ts +6 -6
  524. package/types/src/richData/IRichDataKind.d.ts +22 -0
  525. package/types/src/richData/RichDataRegistry.d.ts +57 -0
  526. package/types/src/richData/RichText.d.ts +59 -0
  527. package/types/src/richData/index.d.ts +3 -0
  528. package/types/src/scripting/FunctionCollection.d.ts +49 -15
  529. package/types/src/scripting/IFunctionCollection.d.ts +62 -32
  530. package/types/src/scripting/IModule.d.ts +25 -0
  531. package/types/src/scripting/IModuleCollection.d.ts +17 -0
  532. package/types/src/scripting/IScript.d.ts +30 -28
  533. package/types/src/scripting/ITypedFunction.d.ts +1 -1
  534. package/types/src/scripting/Module.d.ts +34 -6
  535. package/types/src/scripting/ModuleCollection.d.ts +17 -12
  536. package/types/src/scripting/Runtime.d.ts +15 -0
  537. package/types/src/scripting/Scripts.d.ts +3 -7
  538. package/types/src/scripting/TypedFunction.d.ts +154 -18
  539. package/types/src/scripting/_FunctionIndex.d.ts +8 -3
  540. package/types/src/scripting/_ModuleUtils.d.ts +11 -1
  541. package/types/src/scripting/_ScriptUtils.d.ts +3 -0
  542. package/types/src/scripting/declarations.browser.d.ts +10 -0
  543. package/types/src/scripting/declarations.d.ts +52 -0
  544. package/types/src/scripting/declarations.node.d.ts +9 -0
  545. package/types/src/scripting/index.d.ts +3 -0
  546. package/types/src/selection/ChartElementSelection.d.ts +39 -0
  547. package/types/src/selection/IChartElementSelection.d.ts +103 -0
  548. package/types/src/selection/IItemSelection.d.ts +131 -0
  549. package/types/src/selection/IMovableSelection.d.ts +120 -0
  550. package/types/src/selection/IRangeSelection.d.ts +13 -8
  551. package/types/src/selection/ItemSelection.d.ts +49 -0
  552. package/types/src/selection/MovableSelection.d.ts +29 -0
  553. package/types/src/selection/RangeSelection.d.ts +19 -4
  554. package/types/src/selection/index.d.ts +4 -0
  555. package/types/src/shape/GeometryPreset.d.ts +197 -0
  556. package/types/src/shape/IGeometry.d.ts +380 -0
  557. package/types/src/shape/IShape.d.ts +342 -194
  558. package/types/src/shape/IShapeStyle.d.ts +109 -0
  559. package/types/src/shape/ITextBoxStyle.d.ts +85 -0
  560. package/types/src/shape/Shape.d.ts +107 -21
  561. package/types/src/shape/ShapeStyleUtils.d.ts +66 -0
  562. package/types/src/shape/_ConnectorFrame.d.ts +32 -0
  563. package/types/src/shape/_ConnectorRoute.d.ts +33 -0
  564. package/types/src/shape/_Connectors.d.ts +108 -0
  565. package/types/src/shape/_Geometry.d.ts +14 -0
  566. package/types/src/shape/_GeometryLoader.d.ts +21 -0
  567. package/types/src/shape/_ShapeStyle.d.ts +79 -0
  568. package/types/src/shape/_builtIn/_BuiltInChunks.d.ts +10 -0
  569. package/types/src/shape/_builtIn/_BuiltInDef.d.ts +9 -0
  570. package/types/src/shape/_builtIn/arrows.d.ts +6 -0
  571. package/types/src/shape/_builtIn/basic.d.ts +6 -0
  572. package/types/src/shape/_builtIn/callouts.d.ts +6 -0
  573. package/types/src/shape/_builtIn/flowchart.d.ts +6 -0
  574. package/types/src/shape/_builtIn/lines.d.ts +6 -0
  575. package/types/src/shape/_builtIn/math.d.ts +6 -0
  576. package/types/src/shape/_builtIn/other.d.ts +6 -0
  577. package/types/src/shape/_builtIn/rectangles.d.ts +6 -0
  578. package/types/src/shape/_builtIn/starsBanners.d.ts +6 -0
  579. package/types/src/shape/geometry/_strokeEnds.d.ts +7 -0
  580. package/types/src/shape/geometry/format.d.ts +3 -0
  581. package/types/src/shape/geometry/geometry.d.ts +85 -0
  582. package/types/src/shape/geometry/guides.d.ts +54 -0
  583. package/types/src/shape/geometry/handles.d.ts +14 -0
  584. package/types/src/shape/geometry/index.d.ts +7 -0
  585. package/types/src/shape/geometry/lineEnds.d.ts +54 -0
  586. package/types/src/shape/geometry/paths.d.ts +35 -0
  587. package/types/src/shape/geometry/segments.d.ts +114 -0
  588. package/types/src/shape/index.d.ts +4 -0
  589. package/types/src/sheet/CellRegion.d.ts +43 -3
  590. package/types/src/sheet/ICellContainerOptions.d.ts +50 -0
  591. package/types/src/sheet/IOpaqueSheet.d.ts +46 -0
  592. package/types/src/sheet/ISheet.d.ts +81 -931
  593. package/types/src/sheet/IWorksheet.d.ts +1514 -0
  594. package/types/src/sheet/{ISheetCollection.d.ts → IWorksheetCollection.d.ts} +38 -16
  595. package/types/src/sheet/NamedCellRange.d.ts +17 -8
  596. package/types/src/sheet/NamedRange.d.ts +10 -2
  597. package/types/src/sheet/OpaqueSheet.d.ts +114 -0
  598. package/types/src/sheet/SheetCell.d.ts +96 -39
  599. package/types/src/sheet/SheetRange.d.ts +130 -27
  600. package/types/src/sheet/SheetRanges.d.ts +33 -18
  601. package/types/src/sheet/Worksheet.d.ts +2250 -0
  602. package/types/src/sheet/WorksheetCollection.d.ts +39 -0
  603. package/types/src/sheet/_Anomalies.d.ts +109 -0
  604. package/types/src/sheet/_AnomalyFormulaChecks.d.ts +125 -0
  605. package/types/src/sheet/_AnomalyLabelChecks.d.ts +21 -0
  606. package/types/src/sheet/_CellBuffer.d.ts +224 -0
  607. package/types/src/sheet/_CopyUtils.d.ts +13 -6
  608. package/types/src/sheet/_HeldFormula.d.ts +69 -0
  609. package/types/src/sheet/_IgnoredErrors.d.ts +46 -0
  610. package/types/src/sheet/_InvalidSheetRange.d.ts +10 -9
  611. package/types/src/sheet/_Kinds.d.ts +34 -0
  612. package/types/src/sheet/_Labels.d.ts +38 -0
  613. package/types/src/sheet/_ListenerAnchor.d.ts +104 -0
  614. package/types/src/sheet/_RangeStateSweep.d.ts +15 -0
  615. package/types/src/sheet/_ScalarListFactory.d.ts +61 -0
  616. package/types/src/sheet/_SheetAutoFillUtils.d.ts +74 -0
  617. package/types/src/sheet/_SheetAutoFitUtils.d.ts +5 -5
  618. package/types/src/sheet/_SheetChangeEvent.d.ts +72 -0
  619. package/types/src/sheet/_SheetCoords.d.ts +3 -3
  620. package/types/src/sheet/_SheetEvents.d.ts +43 -0
  621. package/types/src/sheet/_SheetFilterUtils.d.ts +51 -3
  622. package/types/src/sheet/_SheetIntents.d.ts +314 -0
  623. package/types/src/sheet/_SheetMessages.d.ts +1 -1
  624. package/types/src/sheet/_SheetMutations.d.ts +185 -66
  625. package/types/src/sheet/_SheetSortUtils.d.ts +2 -2
  626. package/types/src/sheet/_SheetStateReader.d.ts +35 -11
  627. package/types/src/sheet/_SheetStateTypes.d.ts +143 -79
  628. package/types/src/sheet/_SheetUtils.d.ts +59 -41
  629. package/types/src/sheet/_WatchAnchor.d.ts +106 -0
  630. package/types/src/sheet/clipboard/RangeClipboardItems.d.ts +4 -4
  631. package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts +3 -3
  632. package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts +3 -3
  633. package/types/src/sheet/index.d.ts +5 -2
  634. package/types/src/sheet/spatial/HeldFormulaEntry.d.ts +36 -0
  635. package/types/src/sheet/spatial/index.d.ts +1 -0
  636. package/types/src/sheet/style/SheetCellStyle.d.ts +223 -337
  637. package/types/src/sheet/style/SheetDirectStyle.d.ts +31 -20
  638. package/types/src/sheet/style/SheetNamedStyle.d.ts +19 -17
  639. package/types/src/sheet/style/SheetTableStyle.d.ts +5 -5
  640. package/types/src/sheet/style/_DigitWidth.d.ts +7 -0
  641. package/types/src/sheet/style/_Resolvers.d.ts +17 -10
  642. package/types/src/sheet/style/_StyleUtils.d.ts +34 -40
  643. package/types/src/sheetHeader/ISheetHeader.d.ts +96 -55
  644. package/types/src/sheetHeader/SheetCellHeader.d.ts +6 -0
  645. package/types/src/sheetHeader/SheetCellHeaderRange.d.ts +2 -0
  646. package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts +2 -0
  647. package/types/src/sheetHeader/SheetHeader.d.ts +48 -27
  648. package/types/src/sheetHeader/_HeaderMetrics.d.ts +37 -0
  649. package/types/src/sheetHeader/_HeaderUtils.d.ts +5 -4
  650. package/types/src/sheetProtection/{ISheetProtection.d.ts → IWorksheetProtection.d.ts} +64 -30
  651. package/types/src/sheetProtection/WorksheetProtection.d.ts +51 -0
  652. package/types/src/sheetProtection/index.d.ts +1 -1
  653. package/types/src/sheetView/{ISheetView.d.ts → IWorksheetView.d.ts} +230 -69
  654. package/types/src/sheetView/WorksheetView.d.ts +139 -0
  655. package/types/src/sheetView/_SheetViewUtils.d.ts +5 -3
  656. package/types/src/sheetView/index.d.ts +1 -1
  657. package/types/src/slicer/ISlicer.d.ts +304 -17
  658. package/types/src/slicer/ISlicerStyle.d.ts +109 -0
  659. package/types/src/slicer/Slicer.d.ts +128 -13
  660. package/types/src/slicer/SlicerStyle.d.ts +25 -0
  661. package/types/src/slicer/_BuiltInSlicerStyles.d.ts +13 -0
  662. package/types/src/slicer/_SlicerUtils.d.ts +30 -0
  663. package/types/src/slicer/index.d.ts +1 -0
  664. package/types/src/sort/ISort.d.ts +39 -7
  665. package/types/src/string/IStringCollection.d.ts +5 -0
  666. package/types/src/string/StringCollection.d.ts +6 -6
  667. package/types/src/style/{IStyle.d.ts → ICellStyle.d.ts} +117 -85
  668. package/types/src/style/INamedStyleCollection.d.ts +72 -0
  669. package/types/src/style/ISlicerStyleCollection.d.ts +77 -0
  670. package/types/src/style/IStyleCollection.d.ts +91 -60
  671. package/types/src/style/ITableStyleCollection.d.ts +89 -0
  672. package/types/src/style/NamedStyleCollection.d.ts +39 -0
  673. package/types/src/style/SlicerStyleCollection.d.ts +46 -0
  674. package/types/src/style/StyleCollection.d.ts +81 -26
  675. package/types/src/style/TableStyleCollection.d.ts +49 -0
  676. package/types/src/style/_BuiltInStyleDefs.d.ts +9 -8
  677. package/types/src/style/_BuiltInStyleNames.d.ts +2 -2
  678. package/types/src/style/index.d.ts +7 -1
  679. package/types/src/table/AnchoredTable.d.ts +723 -78
  680. package/types/src/table/AutoTable.d.ts +8 -6
  681. package/types/src/table/ITable.d.ts +289 -49
  682. package/types/src/table/ITableCollection.d.ts +12 -0
  683. package/types/src/table/ITableStyle.d.ts +37 -37
  684. package/types/src/table/TableCollection.d.ts +19 -8
  685. package/types/src/table/_FilterField.d.ts +19 -6
  686. package/types/src/table/_NamedTable.d.ts +20 -4
  687. package/types/src/table/_NamedTableSource.d.ts +3 -2
  688. package/types/src/table/_SortField.d.ts +2 -0
  689. package/types/src/table/_TableColumn.d.ts +13 -2
  690. package/types/src/table/_TableMessages.d.ts +1 -0
  691. package/types/src/table/_TableUtils.d.ts +40 -0
  692. package/types/src/text/Bullet.d.ts +4 -0
  693. package/types/src/text/IText.d.ts +150 -15
  694. package/types/src/text/ITextFrame.d.ts +110 -1
  695. package/types/src/text/TextBoxAlignment.d.ts +25 -16
  696. package/types/src/text/TextEngine.d.ts +34 -0
  697. package/types/src/text/TextFrame.d.ts +8 -2
  698. package/types/src/text/TextLine.d.ts +4 -0
  699. package/types/src/text/TextParagraph.d.ts +4 -0
  700. package/types/src/text/TextRotation.d.ts +3 -3
  701. package/types/src/text/TextRun.d.ts +12 -2
  702. package/types/src/text/TextStacked.d.ts +83 -0
  703. package/types/src/text/TextWrapper.d.ts +32 -26
  704. package/types/src/text/_TextUtils.d.ts +5 -5
  705. package/types/src/text/_TextWrapperFallback.d.ts +49 -0
  706. package/types/src/text/impl/TabStrategy.d.ts +3 -1
  707. package/types/src/text/index.d.ts +1 -0
  708. package/types/src/text/richtext/IRichText.d.ts +50 -0
  709. package/types/src/text/richtext/index.d.ts +1 -1
  710. package/types/src/theme/ITheme.d.ts +153 -11
  711. package/types/src/theme/IThemeCollection.d.ts +2 -0
  712. package/types/src/theme/ThemeCollection.d.ts +16 -7
  713. package/types/src/theme/_OfficeFontScheme.d.ts +8 -0
  714. package/types/src/theme/_OfficeFormatScheme.d.ts +3 -0
  715. package/types/src/transaction/ITransaction.d.ts +277 -45
  716. package/types/src/transaction/Transaction.d.ts +108 -11
  717. package/types/src/transaction/TransactionUndoManager.d.ts +4 -1
  718. package/types/src/transaction/_BatchHandle.d.ts +118 -0
  719. package/types/src/type/AbstractCollection.d.ts +92 -0
  720. package/types/src/type/ICollection.d.ts +131 -1
  721. package/types/src/type/IProperties.d.ts +1 -1
  722. package/types/src/type/ITypes.d.ts +9 -7
  723. package/types/src/type/index.d.ts +1 -0
  724. package/types/src/utils/_CSSUtils.d.ts +4 -4
  725. package/types/src/wasm/_fontsWasm.d.ts +7 -0
  726. package/types/src/wasm/_sdkWasm.d.ts +7 -0
  727. package/types/src/wasm/fontsWasm.d.ts +32 -0
  728. package/types/src/wasm/index.d.ts +3 -0
  729. package/types/src/wasm/loader.browser.d.ts +9 -0
  730. package/types/src/wasm/loader.node.d.ts +9 -0
  731. package/types/src/wasm/sdkWasm.d.ts +32 -0
  732. package/types/src/workbook/IWorkbook.d.ts +404 -73
  733. package/types/src/workbook/Workbook.d.ts +196 -28
  734. package/types/src/workbook/WorkbookRange.d.ts +2 -2
  735. package/types/src/workbook/WorkbookRanges.d.ts +2 -2
  736. package/types/src/workbook/_WorkbookIntents.d.ts +36 -0
  737. package/types/src/workbook/_WorkbookMessages.d.ts +5 -0
  738. package/types/src/workbookProtection/IWorkbookProtection.d.ts +7 -0
  739. package/types/src/workbookProtection/WorkbookProtection.d.ts +3 -0
  740. package/types/src/workbookView/IWorkbookView.d.ts +94 -0
  741. package/types/src/workbookView/WorkbookView.d.ts +26 -0
  742. package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
  743. package/browser/cjs/BatsV2UUraVDCRXm.cjs +0 -57
  744. package/browser/cjs/CUz53T65cRGQRgvv.cjs +0 -33
  745. package/browser/cjs/DU0kYUtdFa3jK-im.cjs +0 -1
  746. package/browser/cjs/Dv3x6zut1ZRUt3IF.cjs +0 -10
  747. package/browser/cjs/Dv4yIPLV98M5zLHa.cjs +0 -1
  748. package/browser/cjs/a0Z-SXs_N71CtqYb.cjs +0 -1
  749. package/browser/cjs/index.cjs +0 -3
  750. package/browser/esm/6JKSOvc5czaQB2Bj.mjs +0 -109
  751. package/browser/esm/BtuJ9AGzeURtAsGo.mjs +0 -51241
  752. package/browser/esm/DGU6sM25u0EWCKl1.mjs +0 -824
  753. package/node/esm/-pxdn3M3tc6PLHs7.mjs +0 -114
  754. package/node/esm/0n5bslM9jhO1JnI2.mjs +0 -843
  755. package/types/src/cellRange/_GraphNode.d.ts +0 -38
  756. package/types/src/collections/OverlappingRangeIterator.d.ts +0 -91
  757. package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +0 -12
  758. package/types/src/dataValidation/_Utils.d.ts +0 -10
  759. package/types/src/font/CanvasFontMeasurer.d.ts +0 -25
  760. package/types/src/font/FontKitFontMeasurer.d.ts +0 -11
  761. package/types/src/font/SimpleFontMeasurer.d.ts +0 -4
  762. package/types/src/lib/utils/_Utils.d.ts +0 -27
  763. package/types/src/lib/utils/utils.browser.d.ts +0 -33
  764. package/types/src/movable/IGroup.d.ts +0 -30
  765. package/types/src/movable/IMovableSelection.d.ts +0 -49
  766. package/types/src/print/IPrint.d.ts +0 -234
  767. package/types/src/sheet/Sheet.d.ts +0 -1107
  768. package/types/src/sheet/SheetCollection.d.ts +0 -18
  769. package/types/src/sheet/listener/RangesListener.d.ts +0 -32
  770. package/types/src/sheet/listener/RangesListenerEntry.d.ts +0 -19
  771. package/types/src/sheet/listener/index.d.ts +0 -3
  772. package/types/src/sheetProtection/SheetProtection.d.ts +0 -39
  773. package/types/src/sheetView/SheetView.d.ts +0 -113
  774. package/types/src/text/richtext/IStyledFont.d.ts +0 -330
  775. /package/types/src/{lib/utils → license}/banner.d.ts +0 -0
@@ -4,34 +4,45 @@ import { IProperties } from '../type';
4
4
  import { IListener } from '../listener';
5
5
  import { ITransaction } from '../transaction';
6
6
  import { ICellRange } from '../cellRange';
7
- import { IStyle, IStyleCollection } from '../style';
7
+ import { ICellStyle, IStyleCollection } from '../style';
8
8
  import { IAnchored } from '../anchored';
9
9
  import { INamedCollection, INamed } from '../named';
10
- import { ISheet } from '../sheet';
10
+ import { IWorksheet } from '../sheet';
11
11
  import { ISort } from '../sort';
12
12
  import { ICondition } from '../condition';
13
13
  import { IFilter } from '../filter';
14
+ import { ISlicer } from '../slicer';
14
15
  import { AbstractAnchored } from '../anchored/AbstractAnchored';
15
16
  import { Anchored } from '../anchored/Anchored';
16
17
  import { ColumnPropertiesState, SortPropertiesState, FilterPropertiesState } from './_TableUtils';
17
18
  import { ITableStyle } from './ITableStyle';
18
19
  import { ITable } from './ITable';
20
+ import * as _Utils from './_TableUtils';
19
21
  /**
20
22
  * Implementation of {@link ITable}.
21
23
  */
22
- export declare class AnchoredTable extends AbstractAnchored<State, CommitView, ITable.Events> implements ITable {
23
- protected _sheet: ISheet | undefined;
24
+ export declare class AnchoredTable extends AbstractAnchored<State, ITable.Events> implements ITable {
25
+ protected _sheet: IWorksheet | undefined;
24
26
  private _styles;
25
27
  private _stylesRemoveListener;
26
28
  private _columnListener;
27
- private _lastTransactionId;
28
29
  private _emptyColumnName;
29
30
  private _emptyColumnNamer;
30
- private _autoExpandRemoveListener;
31
+ private _headerRemoveListener;
32
+ private _headerListenerCoords;
33
+ private _expandRemoveListener;
34
+ private _expandListenerCoords;
35
+ private _heldTotals;
36
+ private _heldCalculated;
31
37
  private _styleCache;
32
38
  private _stylePropsCache;
33
39
  private _processTableUpdate;
40
+ private _symbolsChanged;
41
+ private _filteredChanged;
34
42
  private _setContainerName;
43
+ private _releaseReferences;
44
+ private _refitBodyRows;
45
+ private _fillCalculated;
35
46
  private _names;
36
47
  private _namedItem;
37
48
  private _colHeadersSizeUnlistener;
@@ -44,21 +55,69 @@ export declare class AnchoredTable extends AbstractAnchored<State, CommitView, I
44
55
  private _createColumn;
45
56
  private _createSort;
46
57
  private _createFilter;
58
+ private _columnFacades;
59
+ private _sortFacades;
60
+ private _filterFacades;
61
+ /** What {@link _views} last derived, and the props it derived them from. */
62
+ private _columnViews;
47
63
  constructor(options: AnchoredTable.ConstructorOptions);
48
64
  protected _initializeOptions(options: AnchoredTable.ConstructorOptions): AnchoredTable.ConstructorOptions;
49
- protected initializeColumnCreator(table: ITable, getProps: (id: number | string) => ColumnPropertiesState, updateProps: (id: number | string, update: Partial<ITable.ColumnProperties> | null, options?: string | ITransaction.OperationOptions) => void, deleteColumn: (id: number | string, options?: ITransaction.OperationOptions) => void): (id: number | string) => ITable.IColumn;
65
+ protected initializeColumnCreator(table: ITable, getProps: (id: number | string) => ColumnPropertiesState, updateProps: (id: number | string, update: Partial<ITable.ColumnProperties> | null, options?: string | ITransaction.OperationOptions) => void, deleteColumn: (id: number | string, options?: ITransaction.OperationOptions) => void, getTotals?: (id: number | string) => _Utils.ColumnTotals, getCalculated?: (id: number | string) => string | null): (id: number | string) => ITable.IColumn;
50
66
  protected initializeSortCreator(table: ITable, getProps: (id: number | string) => SortPropertiesState, getColumnProps: (id: number | string) => ColumnPropertiesState): (id: number | string) => ISort;
51
67
  protected initializeFilterCreator(table: ITable, getProps: (id: number | string) => FilterPropertiesState, getColumnProps: (id: number | string) => ColumnPropertiesState): (id: number | string) => IFilter;
68
+ /**
69
+ * The rows the filter levels hide, as sheet row runs, evaluated without the level on column
70
+ * `exceptIndex` (every level when `null`); empty when no level is left. Read-only: the rows
71
+ * are judged by the levels, whatever is hidden now.
72
+ */
73
+ private _hiddenByLevels;
52
74
  protected _initialize(options: AnchoredTable.ConstructorOptions): void;
53
75
  /** {@inheritDoc ITable.getNamed} */
54
76
  getNamed(): INamed | null;
77
+ /**
78
+ * The stored properties of one column, by id, or an empty set when this table has no such
79
+ * column - which is also what a table with no state in this snapshot answers.
80
+ *
81
+ * @remarks
82
+ * The three readers below are what the column, sort and filter facades are built on. Each is
83
+ * asked afresh on every read, so a facade handed out before an undo reads that undo rather than
84
+ * whatever it was holding.
85
+ */
86
+ private _columnPropsOf;
87
+ /**
88
+ * Everything the public getters answer with about the columns, derived from the props.
89
+ *
90
+ * @remarks
91
+ * State holds the props and nothing else, so there is no second copy to keep in step - which is
92
+ * what the old `sortsActive` / `filtersActive` / `mapColumnBy*` fields were, and what made a
93
+ * column rebuild able to leave a level behind pointing at a column that had gone.
94
+ *
95
+ * Rebuilt when the props are a different object, which is every write: they are frozen and
96
+ * replaced, never edited. So this is a cache with one entry and an exact test, not a guess.
97
+ */
98
+ private _views;
99
+ /** The facade for a column, made on first ask. */
100
+ private _columnOf;
101
+ /** {@link _columnOf} for a column's sort. A column that is not sorted still has one. */
102
+ private _sortOf;
103
+ /** {@link _columnOf} for a column's filter. A column that is not filtered still has one. */
104
+ private _filterOf;
105
+ /** {@link _columnPropsOf} for a column's sort, or an empty set when it is not sorted. */
106
+ private _sortPropsOf;
107
+ /** {@link _columnPropsOf} for a column's filter, or an empty set when it is not filtered. */
108
+ private _filterPropsOf;
109
+ /**
110
+ * A table style was added, changed or deleted, or the default changed: the style this table
111
+ * resolves to may differ even though nothing about the table did.
112
+ */
113
+ private _onTableStylesChange;
55
114
  /**
56
115
  * Recompute the derived visible state (`_visibleRange` and the visible flags), which depend on
57
116
  * the sheet's hidden rows/columns.
58
117
  *
59
118
  * @remarks
60
119
  * Callers of the visible getters recompute on read via this method rather than relying on the
61
- * header `onSizesChange` listener alone. That listener fires order-dependently relative to the
120
+ * header `onMetricsChange` listener alone. That listener fires order-dependently relative to the
62
121
  * render: the sheet's transactional layout listener runs (and can drive a cell read) before this
63
122
  * table's non-transactional listener updates the value, so a purely event-driven value can be
64
123
  * read stale mid-transaction. The underlying header lookups are already current at read time, so
@@ -76,6 +135,25 @@ export declare class AnchoredTable extends AbstractAnchored<State, CommitView, I
76
135
  protected _calcVisible(): void;
77
136
  /** {@inheritDoc ITable.getSnapshot} */
78
137
  getSnapshot(options?: ReferenceableClipboard.CopyOptions): ITable.ISnapshot;
138
+ /**
139
+ * This table has just been made by a paste, as a copy of the table `fromName`.
140
+ *
141
+ * @remarks
142
+ * Everything the paste writes is part of making the copy, the cells that came across beside it
143
+ * included: none of it was typed next to a table, so none of it is an auto expansion or a
144
+ * column fill. The whole sheet is recorded as the table's own write for the paste's commit.
145
+ */
146
+ private _adoptPaste;
147
+ /**
148
+ * Re-point the formulas in this table's cells that name the table `fromName` at this table.
149
+ *
150
+ * @remarks
151
+ * For a table pasted as a copy, once its cells are across. A copied formula keeps the table it
152
+ * referenced, as it keeps a defined name; inside a copy of that table the reference was to the
153
+ * table the formula sits in, so Excel re-points it: the copy of `Table1`'s totals row totals
154
+ * `Table2`. A formula outside the copy keeps naming the original.
155
+ */
156
+ private _retargetCopiedFormulas;
79
157
  /** {@inheritDoc ITable.getAnchorType} */
80
158
  getAnchorType(): IAnchored.Type;
81
159
  /** {@inheritDoc ITable.getStyle} */
@@ -87,6 +165,185 @@ export declare class AnchoredTable extends AbstractAnchored<State, CommitView, I
87
165
  addRows(index: number, count?: number, options?: ITransaction.OperationOptions): this;
88
166
  /** {@inheritDoc ITable.deleteRowsAt} */
89
167
  deleteRowsAt(index: number, count?: number, options?: ITransaction.OperationOptions): this;
168
+ /**
169
+ * The one write path for a column's own properties.
170
+ *
171
+ * @remarks
172
+ * A key that is present is a change, whatever its value: an empty label or formula clears it.
173
+ * `null` resets the column to its name. A totals cell holds a label or a formula, never both, so
174
+ * the one being set replaces the other. The cell that shows the change - the header for a name,
175
+ * the totals cell for a label or a formula - is written in the same transaction.
176
+ *
177
+ * While the totals row is on the sheet the totals cell is ALL that is written: the props hold a
178
+ * column's totals only while there is no cell to hold them - see {@link _totalsOf}.
179
+ */
180
+ private _updateColumnProps;
181
+ /**
182
+ * Formula text as the table holds it: every structured reference with its table's name.
183
+ *
184
+ * @remarks
185
+ * A cell stores `SUM([Amount])` as `SUM(Table1[Amount])` when it is committed, and which
186
+ * references show without the name is decided when the text is displayed. Text the table is
187
+ * handed for a column - a totals formula for a row that is not showing, a calculated formula
188
+ * read from a cell the engine has not compiled yet - has been through no commit, so it is
189
+ * given the name here: compiled at the column's first body cell, which is inside the table an
190
+ * unqualified reference names, and imaged from there, which leaves an A1 reference as it is.
191
+ *
192
+ * As typed when it cannot be compiled: no sheet, no engine, or text that does not parse.
193
+ */
194
+ private _qualified;
195
+ /**
196
+ * `text` as a cell in the table's first body row, column `index`, would store it; as given when
197
+ * it cannot be compiled.
198
+ */
199
+ private _storedText;
200
+ /**
201
+ * Whether the totals row is a row of cells: it is shown, and there is a sheet to show it on.
202
+ */
203
+ private _isTotalsOnSheet;
204
+ /**
205
+ * What a column totals: its label or its formula.
206
+ *
207
+ * @remarks
208
+ * While the totals row is on the sheet this is read from the column's totals cell, every time.
209
+ * The cell is where the user edits it and where the engine keeps it right - through a column
210
+ * rename, a table rename, an insert - and a copy held beside it could only fall behind. The props
211
+ * hold a column's totals when there is no cell to: the row is hidden, or there is no sheet.
212
+ * {@link _holdTotalsFromCells} and {@link _showTotalsFromProps} carry them across.
213
+ */
214
+ private _totalsOf;
215
+ /**
216
+ * One column's cell in the totals row.
217
+ *
218
+ * @remarks
219
+ * Asked for cell by cell rather than by walking the row: a range iterator hands out the cell it
220
+ * had BEFORE a clear until the store settles (async mode), and these are read straight after one.
221
+ */
222
+ private _totalsCellAt;
223
+ /**
224
+ * A totals cell as a column's totals. A formula that is the built-in form for this column -
225
+ * `SUBTOTAL(109,[Name])` - reads as its function number, however it got there.
226
+ *
227
+ * @returns `null` for a cell that cannot say: protection hides its formula, and the value it
228
+ * shows instead is not what the column totals.
229
+ */
230
+ private _readTotalsCell;
231
+ /**
232
+ * Make a column's totals cell show `totals`, or empty it when there are none. Only while the
233
+ * totals row is on the sheet.
234
+ */
235
+ private _writeTotalsCellAt;
236
+ /**
237
+ * The totals row is about to leave the sheet: keep what each of its cells holds in that column's
238
+ * props, where {@link _showTotalsFromProps} finds it when the row comes back.
239
+ */
240
+ private _holdTotalsFromCells;
241
+ /**
242
+ * Keep every totals EXPRESSION a live formula while its row is hidden.
243
+ *
244
+ * @remarks
245
+ * Excel's held totals formulas are live (probed, T2): hidden, they follow a column rename, a table
246
+ * rename, a row inserted above and a row added to the table, A1 references included. Text in the
247
+ * props follows none of that. So while the row is hidden each expression is ALSO a watch - a
248
+ * formula the engine holds without a cell, which gets everything a cell formula gets - anchored
249
+ * on the row below the table, where the totals row was and will be again. It moves with that row
250
+ * on an insert, as the table's end does; when the table's end moves without one (a resize, an
251
+ * auto expansion) it is re-anchored with the text it has by then, which is a move and leaves its
252
+ * references where they were. Only the row matters: the text is A1, so it reads the same from
253
+ * any column, and a column shift inside the table is no reason to touch it.
254
+ *
255
+ * The props keep the text the watch was made from. They are what a snapshot can restore and what
256
+ * there is to read until the engine has registered the watch; {@link _readHeldTotal} prefers what
257
+ * the engine has. A function number needs none of this - it is spelled from the column's name
258
+ * when it is shown - and neither does a label.
259
+ *
260
+ * Derived from state, like the listeners, and called wherever they are re-derived.
261
+ */
262
+ private _syncHeldTotals;
263
+ /**
264
+ * A held expression as the model's grid holds it, or `null` when it holds none - not registered
265
+ * yet, or not in this snapshot.
266
+ */
267
+ private _readHeldTotal;
268
+ private _removeHeldTotals;
269
+ /**
270
+ * Keep every calculated column's formula a live formula.
271
+ *
272
+ * @remarks
273
+ * A calculated column remembers its formula apart from its cells - any of them may hold
274
+ * something else, the first included - and Excel's is live (probed, G5 of
275
+ * `probe-table-columnfill-edges.ps1`): it follows a sheet row inserted above the table, a column
276
+ * inserted inside it and a column rename, exceptions or not. It is the problem
277
+ * {@link _syncHeldTotals} solves and the same holder: the text in the column props, and a watch
278
+ * made from it, here on a body cell of the column.
279
+ *
280
+ * The text is always the formula as it reads in the FIRST body row, which is how a file stores
281
+ * it and what {@link _readHeldCalculated} images, wherever in the body the watch has been pushed
282
+ * to. So a watch is only made again when it has left the column's body, or when the props hold
283
+ * a different text.
284
+ */
285
+ private _syncHeldCalculated;
286
+ /**
287
+ * A calculated column's formula as the engine has it now, as it reads in the first body row, or
288
+ * `null` when it holds none - not registered yet, or not in this snapshot.
289
+ */
290
+ private _readHeldCalculated;
291
+ private _removeHeldCalculated;
292
+ /**
293
+ * The formula a column calculates its rows with, without its `=` and as it reads in the first
294
+ * body row, or `null` for a column that is not calculated.
295
+ */
296
+ private _calculatedOf;
297
+ /**
298
+ * A calculated column's formula as it reads in `rowIndex`, or `null` when it cannot be said.
299
+ *
300
+ * @remarks
301
+ * Asked BEFORE the rows it is for are made. Once a shift is part of the commit the engine has
302
+ * not re-imaged anything yet, and the text it hands out is from before the shift at a cell from
303
+ * after it.
304
+ */
305
+ private _calculatedTextAt;
306
+ /**
307
+ * What Excel gives a totals row the FIRST time it is shown, and never again: an aggregate in the
308
+ * last column, chosen by what the column holds. Held in the props, which is where
309
+ * {@link _showTotalsFromProps} is about to look.
310
+ *
311
+ * @remarks
312
+ * Probed (`probe-table-totals-firstshow.ps1`): `109` (sum) when every cell of the body that holds
313
+ * anything holds a number - a formula's result counts, and so does a currency or a percent
314
+ * format - and `103` (count) as soon as one is text, a boolean, an error, or a number shown as a
315
+ * date or a time, and for a column with nothing in it. A row shown a second time is given
316
+ * nothing, even when the aggregate was cleared in between, which is what `totalsRowShown` records.
317
+ * The `Total` label is the first column's from the day the table is made.
318
+ */
319
+ private _holdFirstShowTotals;
320
+ /**
321
+ * The region a bare cursor on this table traverses within, or `null` to leave the move alone.
322
+ *
323
+ * @remarks
324
+ * Tab wraps within the body, so a row of entries runs on to the next row of the table. Tab from
325
+ * the last visible body cell adds a row first, as its own step, and the wrap lands in it - when
326
+ * the table grows down (see {@link ITable.AutoExpand}). Enter is not the table's: it walks off
327
+ * the bottom as it does on the bare sheet.
328
+ *
329
+ * @internal
330
+ */
331
+ _getTraverseRegion(cell: IRange.CellCoords, axis: IRange.Axis, reverse: boolean): IRange.Coords | null;
332
+ /**
333
+ * The totals row has just arrived on the sheet: give each column's totals to its cell, and take
334
+ * them out of the props - from here the cell is the record.
335
+ *
336
+ * @remarks
337
+ * A cell that already holds something is left as it is. The row is blank when it is shown again
338
+ * after being hidden; it may not be when a resize lands it on cells that were already there, and
339
+ * what the user put in a cell is not the table's to replace.
340
+ *
341
+ * The sheet calls this for a table it has just made, once the table is registered: a totals
342
+ * formula names its table, and does not bind while the table cannot be found.
343
+ *
344
+ * @internal
345
+ */
346
+ _showTotalsFromProps(): void;
90
347
  protected _deleteColumn(id: number | string, options?: ITransaction.OperationOptions): void;
91
348
  /** {@inheritDoc ITable.addColumn} */
92
349
  addColumn(index?: number, values?: Scalar[], name?: string, options?: ITransaction.OperationOptions): ITable.IColumn;
@@ -98,13 +355,21 @@ export declare class AnchoredTable extends AbstractAnchored<State, CommitView, I
98
355
  getColumnById(id: string): ITable.IColumn | null;
99
356
  /** {@inheritDoc ITable.getColumns} */
100
357
  getColumnByName(name: string): ITable.IColumn | null;
358
+ /** {@inheritDoc ITable.delete} */
359
+ delete(options?: ITransaction.OperationOptions): void;
360
+ /**
361
+ * @internal
362
+ * Removes the table and leaves its cells as they are. `release` is what its references become;
363
+ * `null` leaves them, for a removal the table outlives (a cut re-adds it).
364
+ */
365
+ _remove(release?: 'error' | 'address' | null): void;
101
366
  /** {@inheritDoc ITable.convertToRange} */
102
367
  convertToRange(maxCells?: number, options?: ITransaction.OperationOptions): ICellRange;
103
368
  /** {@inheritDoc ITable.resizeTo} */
104
369
  resizeTo(rowCount: number, colCount: number, options?: ITransaction.OperationOptions): ICellRange;
105
370
  /** {@inheritDoc ITable.resize} */
106
371
  resize(address: ICellRange.Address, options?: ITransaction.OperationOptions): ICellRange;
107
- protected _resize(address: ICellRange.Address, options?: ITransaction.OperationOptions, description?: string): ICellRange;
372
+ protected _resize(address: ICellRange.Address, options?: ITransaction.OperationOptions, description?: string, skipProtection?: boolean): ICellRange;
108
373
  /** {@inheritDoc ITable.getName} */
109
374
  getName(): string;
110
375
  /** {@inheritDoc ITable.setName} */
@@ -116,10 +381,35 @@ export declare class AnchoredTable extends AbstractAnchored<State, CommitView, I
116
381
  /** {@inheritDoc ITable.select} */
117
382
  select(options?: ICellRange.SelectOptions): Promise<ICellRange>;
118
383
  /** @internal */
119
- protected _processRestoreOrRevert(state: State, view: CommitView, commit: ITransaction.ICommit): void;
384
+ protected _processRestoreOrRevert(state: State, commit: ITransaction.ICommit): void;
385
+ /**
386
+ * Bring the header and expand listeners in line with the anchor this snapshot holds.
387
+ *
388
+ * @remarks
389
+ * A restore lands on whatever references the snapshot's listener map carries, but the callbacks
390
+ * for them live on this instance, and only the ones registered most recently are still here. So
391
+ * the subscription is re-derived from the restored anchor: a listener whose coords are still the
392
+ * header's (or the ring's) is kept, any other is replaced. This is what keeps the subscription
393
+ * attached to the table rather than to the commit that registered it.
394
+ */
395
+ private _syncListenersToAnchor;
396
+ /**
397
+ * Move this table whole to `coords`, as a same-sheet cut does once its cells are across.
398
+ *
399
+ * @remarks
400
+ * The table is never deleted, so a handle to it, its name and the structured references to it
401
+ * all stay as they were, and one undo puts it back. The listener nodes the cut enclosed moved
402
+ * with it; the rest stayed where the table was, so the subscription is brought in line with the
403
+ * new anchor.
404
+ */
405
+ private _moveTo;
120
406
  /** @internal */
121
407
  protected _processAnchorCoords(): void;
122
- /** @internal */
408
+ /**
409
+ * A table is one rectangle and holds its anchor as one, where the base holds the container's list.
410
+ *
411
+ * @internal
412
+ */
123
413
  protected _processAfterContainerShift(before: IRange.Coords[], after: IRange.Coords[]): void;
124
414
  /** {@inheritDoc ITable.getDataRange} */
125
415
  getDataRange(): ICellRange;
@@ -135,9 +425,9 @@ export declare class AnchoredTable extends AbstractAnchored<State, CommitView, I
135
425
  /** {@inheritDoc ITable.updateStyleOptions} */
136
426
  updateStyleOptions(options: ITableStyle.StyleOptions, description?: string): this;
137
427
  /** {@inheritDoc ITable.getRangedStyle} */
138
- getRangedStyle(): IProperties.ICellRanged<IStyle.Properties>;
428
+ getRangedStyle(): IProperties.ICellRanged<ICellStyle.Properties>;
139
429
  /** {@inheritDoc ITable.getStyleAt} */
140
- getStyleAt(coords: IRange.CellCoords): IStyle;
430
+ getStyleAt(coords: IRange.CellCoords): ICellStyle;
141
431
  /** {@inheritDoc ITable.isShowTotals} */
142
432
  isShowTotals(): boolean;
143
433
  /** {@inheritDoc ITable.setShowTotals} */
@@ -162,26 +452,173 @@ export declare class AnchoredTable extends AbstractAnchored<State, CommitView, I
162
452
  isShowBandedRows(): boolean;
163
453
  /** {@inheritDoc ITable.setShowBandedRows} */
164
454
  setShowBandedRows(showBandedRows: boolean, options?: ITransaction.OperationOptions): this;
165
- protected _setupAutoExpand(): void;
166
- /** {@inheritDoc ITable.setDisabledAutoExpand} */
167
- setDisabledAutoExpand(disabledAutoSize: boolean, options?: ITransaction.OperationOptions): this;
168
- /** {@inheritDoc ITable.isDisabledAutoExpand} */
169
- isDisabledAutoExpand(): boolean;
455
+ /**
456
+ * What the auto-expand listener watches: the table grown by one row and one column, clipped to
457
+ * the sheet. `null` when there is nothing to watch.
458
+ *
459
+ * @remarks
460
+ * The extra column is the right strip and the extra row is the bottom strip; content arriving in
461
+ * either grows the table. The cell the two share diagonally belongs to neither.
462
+ */
463
+ private _getExpandListenerCoords;
464
+ private _removeExpandListener;
465
+ /** @internal */
466
+ protected _processExpandListener(): void;
467
+ private _onExpandListenerEvent;
468
+ /**
469
+ * A formula has been entered in the row just below the table: that row becomes the totals row, in
470
+ * the one step of the expansion (Excel: `Table AutoExpansion`).
471
+ *
472
+ * @remarks
473
+ * Probed (`probe-table-autototals.ps1`). What was entered stays where it is and is its column's
474
+ * total from here on. The other columns total nothing - not the `Total` label a table is made
475
+ * with, not the aggregate a first showing gives - unless the table has shown a totals row before,
476
+ * whose totals then come back beside it as they would with the row toggled on.
477
+ */
478
+ private _takeRowBelowAsTotals;
479
+ /**
480
+ * What a commit that wrote into the body means for the columns it wrote to: a formula to fill
481
+ * down the column, a formula to remember, or one to forget.
482
+ *
483
+ * @remarks
484
+ * Probed (`probe-table-columnfill.ps1` and `-edges.ps1`). A formula written to ONE body cell is
485
+ * filled down its column when every other body cell of the column is blank, or when the column
486
+ * is calculated and every other body cell still holds one formula - so editing the formula of
487
+ * a calculated column edits the column, and a column holding an exception, a blank one
488
+ * included, is left alone. Nothing is asked about what the written cell held before. A write of
489
+ * two cells or more never fills, whatever it wrote. The fill is a commit of its own (Excel:
490
+ * `Fill`), recorded after the write it follows, so the first undo takes back the fill and
491
+ * leaves the formula that was typed. Hidden and filtered rows are filled like any other, and
492
+ * the totals row never is.
493
+ *
494
+ * A write that fills nothing can still change what the column remembers, and that is part of
495
+ * the write, not a step of its own: a formula written over the whole body in one write is
496
+ * remembered, and a column left with no formula in it at all remembers none.
497
+ *
498
+ * Everything here is asked of whole rectangles and of formula blocks - a filled column is one
499
+ * block - never cell by cell.
500
+ *
501
+ * @param changed Every range the commit changed, unclipped.
502
+ * @param bodyBefore The body as it was when the commit landed. A row the table has taken since
503
+ * is not one the write could have filled from: a formula written just below a table becomes a
504
+ * row of it and fills nothing.
505
+ */
506
+ private _processBodyWrite;
507
+ /**
508
+ * A table has just been made over cells that were already there: a column whose cells hold one
509
+ * formula is a calculated column from the start.
510
+ *
511
+ * @remarks
512
+ * Probed (`probe-table-columnfill-created.ps1`). Excel looks at the LAST five body rows and no
513
+ * further. The column remembers the formula of its last body cell when at most one of the other
514
+ * four holds anything else - another formula, a constant, a blank. So `aaaaaabbbb` remembers
515
+ * `b`, `baaaa` and `ab` remember `a` and `b`, and `aabbb`, `aaab` and `aaa_` remember nothing.
516
+ * It is not a majority, and nothing above the five rows is ever asked.
517
+ *
518
+ * The sheet calls this for a table it has just made, never for one it loads: a file says which
519
+ * of its columns are calculated, and a column of identical formulas is not one unless it does.
520
+ *
521
+ * @internal
522
+ */
523
+ _detectCalculatedColumns(): void;
524
+ /**
525
+ * Every calculated column's formula as it reads in `rowIndex`, by column index, or `null` when
526
+ * no column is calculated.
527
+ *
528
+ * @remarks
529
+ * For rows about to become rows of the table, and asked BEFORE they are made: once a shift is
530
+ * part of the commit the engine has re-imaged nothing yet, and the text it hands out is from
531
+ * before the shift at a cell from after it. The price is an absolute reference to a cell below
532
+ * an insert, which the new row names as it was before the insert moved it.
533
+ */
534
+ private _calculatedTextsAt;
535
+ /**
536
+ * Give new body rows each calculated column's formula (probed, F4: a row added to the table is
537
+ * given it whatever the column's other cells hold). A column whose new cells already hold
538
+ * something - the write the table expanded for - keeps it.
539
+ *
540
+ * @param texts From {@link _calculatedTextsAt}, for `rowStart`.
541
+ */
542
+ private _writeCalculatedRows;
543
+ /**
544
+ * Fill the formula in `from` down the body of its column, and have the column remember it.
545
+ */
546
+ private _fillColumn;
547
+ /**
548
+ * Write what columns remember as their formula. `null` forgets.
549
+ *
550
+ * @param syncHeld `false` writes the columns alone and leaves the watches as they are: for a
551
+ * write that lands in a snapshot other than the one the store is at.
552
+ */
553
+ private _rememberCalculated;
554
+ /**
555
+ * The anchor a commit grows the table to, or `null` when it grows nothing.
556
+ *
557
+ * @remarks
558
+ * The strip is the one column right of the table, or the one row below it. The table takes it
559
+ * when the commit wrote something there and everything the table would take, OUTSIDE what that
560
+ * commit touched, is blank. Nothing is asked about what the written cells held before: typing
561
+ * over a value that sits beside a table expands it in Excel, and so does writing the same value
562
+ * again. So an update expands and a delete does not, for the same reason a format does not - the
563
+ * cell has to hold something afterwards.
564
+ *
565
+ * A block written across the edge is taken whole. A block that also runs past the table the
566
+ * other way - across its corner - is not beside the table, and takes nothing.
567
+ *
568
+ * @param changed Every range the commit changed, unclipped.
569
+ */
570
+ private _getAutoExpandCoords;
571
+ /** {@inheritDoc ITable.setAutoExpand} */
572
+ setAutoExpand(autoExpand: ITable.AutoExpand, options?: ITransaction.OperationOptions): this;
573
+ /** {@inheritDoc ITable.getAutoExpand} */
574
+ getAutoExpand(): ITable.AutoExpand;
575
+ /** {@inheritDoc ITable.setFormulaBelow} */
576
+ setFormulaBelow(formulaBelow: ITable.FormulaBelow, options?: ITransaction.OperationOptions): this;
577
+ /** {@inheritDoc ITable.getFormulaBelow} */
578
+ getFormulaBelow(): ITable.FormulaBelow;
579
+ /** {@inheritDoc ITable.setDisabledColumnFill} */
580
+ setDisabledColumnFill(disabledColumnFill: boolean, options?: ITransaction.OperationOptions): this;
581
+ /** {@inheritDoc ITable.isDisabledColumnFill} */
582
+ isDisabledColumnFill(): boolean;
583
+ /**
584
+ * The active levels as indexed conditions, in level order — what an apply re-runs.
585
+ *
586
+ * A level can outlive its condition (a column rebuild leaves the filter behind), and there is
587
+ * nothing to reapply for one that has none.
588
+ */
589
+ private _filterLevels;
170
590
  /** {@inheritDoc ITable.applyFilters} */
171
- applyFilters(options?: ITransaction.OperationOptions): this;
591
+ applyFilters(options?: ITransaction.OperationOptions): Promise<this>;
172
592
  /** {@inheritDoc ITable.deleteFilters} */
173
- deleteFilters(options?: ITransaction.OperationOptions): this;
593
+ deleteFilters(options?: ITransaction.OperationOptions): Promise<this>;
174
594
  /** {@inheritDoc ITable.getActiveFilters} */
175
595
  getActiveFilters(): readonly IFilter[];
176
596
  /** {@inheritDoc ITable.getFilterAt} */
177
597
  getFilterAt(index: number): IFilter | null;
178
- protected _updateSorts(sorts: ISort.Options[] | undefined, originalSorts: readonly ISort[], orderedColumnsProps: ColumnPropertiesState[], mapColumnPropsById: Map<string | number, ColumnPropertiesState>): readonly ISort[];
179
- protected _updateFilters(conditions: ICondition.Input[] | undefined, originalFilters: readonly IFilter[], orderedColumnsProps: ColumnPropertiesState[], mapColumnPropsById: Map<string | number, ColumnPropertiesState>): readonly IFilter[];
180
- /** {@inheritDoc ITable.filter} */
598
+ /** {@inheritDoc ITable.addSlicer} */
599
+ addSlicer(column: ITable.IColumn | string, options?: ISlicer.AddOptions): Promise<ISlicer>;
181
600
  /**
182
- * Perform filtering on the table.
601
+ * Replace every sort on the table with `sorts`, in `orderedColumnsProps`.
602
+ *
603
+ * @remarks
604
+ * The props are the only place a sort lives, so setting them IS the change - there is no list of
605
+ * active sorts to keep alongside. Levels are written by input order and made dense by
606
+ * {@link _renumberLevels} when the props are written, which is what covers an entry naming a
607
+ * column that is not there.
608
+ *
609
+ * Entries are replaced rather than edited: the array the caller built shares its entries with the
610
+ * props an undo restores, and writing through one would rewrite history in place.
183
611
  */
184
- filter(conditions?: ICondition.Input | ICondition.RangeOptions, options?: ITransaction.OperationOptions): this;
612
+ protected _updateSorts(sorts: ISort.Options[] | undefined, orderedColumnsProps: ColumnPropertiesState[]): void;
613
+ /**
614
+ * {@link _updateSorts} for the filters.
615
+ *
616
+ * @param persisted The conditions are a load's. One that names an operator this build does not
617
+ * know is kept as it is and filters nothing, where an authored one throws.
618
+ */
619
+ protected _updateFilters(conditions: ICondition.Input[] | undefined, orderedColumnsProps: ColumnPropertiesState[], persisted?: boolean): void;
620
+ /** {@inheritDoc ITable.filter} */
621
+ filter(conditions?: ICondition.Input | ICondition.RangeOptions, options?: ITransaction.OperationOptions): Promise<this>;
185
622
  /** {@inheritDoc ITable.sort} */
186
623
  sort(options?: ISort.RangeOptions & ITransaction.OperationOptions): this;
187
624
  /** {@inheritDoc ITable.applySorts} */
@@ -189,9 +626,9 @@ export declare class AnchoredTable extends AbstractAnchored<State, CommitView, I
189
626
  /** {@inheritDoc ITable.deleteSorts} */
190
627
  deleteSorts(options?: ITransaction.OperationOptions): this;
191
628
  /** {@inheritDoc ITable.applySortsAndFilters} */
192
- applySortsAndFilters(options?: ITransaction.OperationOptions): this;
629
+ applySortsAndFilters(options?: ITransaction.OperationOptions): Promise<this>;
193
630
  /** {@inheritDoc ITable.deleteSortsAndFilters} */
194
- deleteSortsAndFilters(options?: ITransaction.OperationOptions): this;
631
+ deleteSortsAndFilters(options?: ITransaction.OperationOptions): Promise<this>;
195
632
  /** {@inheritDoc ITable.getActiveSorts} */
196
633
  getActiveSorts(): readonly ISort[];
197
634
  /** {@inheritDoc ITable.getSortAt} */
@@ -204,8 +641,32 @@ export declare class AnchoredTable extends AbstractAnchored<State, CommitView, I
204
641
  setHiddenButtons(hidden: boolean): this;
205
642
  /** {@inheritDoc ITable.isHiddenButtons} */
206
643
  isHiddenButtons(): boolean;
207
- /** @internal */
208
- private _applyFilters;
644
+ /** {@inheritDoc ITable.setHiddenDecorations} */
645
+ setHiddenDecorations(hidden: boolean): this;
646
+ /** {@inheritDoc ITable.isHiddenDecorations} */
647
+ isHiddenDecorations(): boolean;
648
+ /**
649
+ * The read-only half of a filter: the runs `conditions` settle over the header and body rows.
650
+ * `null` for a table with no sheet (a preview), which has no rows to hide.
651
+ *
652
+ * @remarks
653
+ * The header row is never evaluated or hidden, and neither is the totals row. `headerRowCount`
654
+ * decides the header, not `isShowHeaders()`: the sheet AutoFilter answers `false` to the band
655
+ * question yet has a header row.
656
+ */
657
+ private _evalFilter;
658
+ /** The write half of a filter: the rows, then the listeners. Inside the caller's transaction. */
659
+ private _applyFilterRuns;
660
+ /** The levels, then the rows ({@link _applyFilterRuns}). Inside the caller's transaction. */
661
+ private _writeFilters;
662
+ /**
663
+ * Take over an absorbed AutoFilter's criteria: the levels alone, never the rows. The table took
664
+ * the AutoFilter's own range, so the rows already sit as its criteria left them.
665
+ * @internal
666
+ */
667
+ _carryFilters(conditions: ICondition.Input[]): void;
668
+ /** A sort made here covers the table body, so the file's sort ranges no longer describe it. */
669
+ private _clearSortExtent;
209
670
  /** @internal */
210
671
  private _applySorts;
211
672
  /** {@inheritDoc ITable.getColumnAt} */
@@ -224,20 +685,18 @@ export declare class AnchoredTable extends AbstractAnchored<State, CommitView, I
224
685
  *
225
686
  * @internal
226
687
  */
227
- protected _updateColumnsState(columnPropsNews: Partial<ColumnPropertiesState>[], options?: string | ITransaction.OperationOptions): ITable.IColumn[];
688
+ protected _updateColumnsState(columnPropsNews: Partial<ColumnPropertiesState>[], options?: string | ITransaction.OperationOptions): readonly ITable.IColumn[];
228
689
  /**
229
- * Re-derives the active filter and sort levels from the column props.
690
+ * The one write path for the column props.
230
691
  *
231
692
  * @remarks
232
- * A level is bound to a column id, but the column props are where a filter or sort actually
233
- * lives. Rebuilding the columns (a delete, a sheet sync) can therefore take a column out from
234
- * under its level, and a level that outlives its column reads back as unfiltered while its rows
235
- * stay hidden. Deriving the levels from the props instead of carrying them alongside keeps the
236
- * two from drifting, and closes the gap in `level` left by whatever was dropped.
693
+ * Levels are made dense here, whatever the caller did to the array - see
694
+ * {@link _renumberLevels}. Everything the getters answer with is derived from what this writes
695
+ * ({@link _views}), so there is nothing else to bring along.
237
696
  *
238
697
  * @internal
239
698
  */
240
- private _rebuildActiveLevels;
699
+ private _writeColumnProps;
241
700
  /** {@inheritDoc ITable.getVisibleRefRangeCoords} */
242
701
  getVisibleRefRangeCoords(): IRange.Coords;
243
702
  /** {@inheritDoc ITable.getVisibleCellCoords} */
@@ -251,57 +710,195 @@ export declare class AnchoredTable extends AbstractAnchored<State, CommitView, I
251
710
  /** {@inheritDoc ITable.isLastColumnVisible} */
252
711
  isLastColumnVisible(): boolean;
253
712
  /**
254
- * Builds columns from state and sheet (if available).
713
+ * Bring the header row and the column names back into step.
255
714
  *
256
715
  * @remarks
257
- * The `converted` is true if the sheet is out of sync from the state.columns.
716
+ * `from: 'table'` writes the names to the header row. `from: 'sheet'` reads the header row into
717
+ * the names, and does nothing when the sheet already shows what the table holds. A header cell the
718
+ * table cannot take as it is - a number, a duplicate, a blank - is named for it, and that name is
719
+ * written back to the cell unless `write` is `false`.
720
+ *
721
+ * The totals row is not synced here: its cells are never mirrored into the columns - see
722
+ * {@link _totalsOf}.
258
723
  *
259
724
  * @internal
260
725
  */
261
- protected _readSyncSheet(ignoreBlanks?: boolean, ignoreTotal?: boolean): {
262
- columns: ITable.ColumnProperties[];
263
- converted: boolean;
264
- } | null;
726
+ protected _syncHeader(options: {
727
+ from: 'sheet' | 'table';
728
+ /** A blank header cell keeps the column's name, rather than being given a default one. */
729
+ keepNameOnBlank?: boolean;
730
+ description?: string;
731
+ /** `false` leaves a converted cell as it is on the sheet, for the caller to write. *default* `true`. */
732
+ write?: boolean;
733
+ }): void;
265
734
  /**
266
- * This takes a list of columns headers and then validates them
267
- * and if there is a sheet it will set the values back into the sheet.
268
- *
269
- * 1. They must be unique. (case insensitive)
270
- * 2. They can't be blank.
271
- * 3. They must be text
272
- *
273
- * @param isRemove If true we are removing so we don't update the sheet.
274
- * @internal
735
+ * Builds columns from state and the header row of the sheet (if available). `converted` is true
736
+ * when a header cell had to be named for the table rather than taken as it is.
737
+ */
738
+ private _readHeader;
739
+ /**
740
+ * Writes the column names to the header row.
275
741
  */
276
- protected _writeSyncSheet(isRemove?: boolean): void;
742
+ private _writeHeader;
277
743
  /** @internal */
278
744
  protected _processDelete(): void;
279
- /** @internal */
280
- protected _processFilterUpdate(): void;
745
+ /**
746
+ * Make a write to this table's own sheet, recorded as the table's - see {@link IntentTableOwnWrites}.
747
+ * The record and the write are one root commit, whether or not the caller has one open.
748
+ */
749
+ private _ownWrite;
750
+ /**
751
+ * The ranges of `changed` that this table did not write itself in the commit `commitId`, which
752
+ * is the root commit a sheet listener's event names.
753
+ */
754
+ private _notOwnWrites;
755
+ /**
756
+ * Asks for the A1 references that spanned the body to be re-fitted to `to` - see
757
+ * {@link AnchoredTable.ConstructorOptions.refitBodyRows}. Whatever part of it runs later runs only
758
+ * while the body is still `to`: an undo, or another edit that moved the table, ends it.
759
+ */
760
+ protected _refitBody(columns: {
761
+ colStart: number;
762
+ colEnd: number;
763
+ }, match: {
764
+ rowStart: number;
765
+ rowEnd: number;
766
+ }, headerRow: number | null, to: {
767
+ rowStart: number;
768
+ rowEnd: number;
769
+ }, afterShift: boolean): void;
281
770
  /** @internal */
282
771
  protected _processContainerShift(options: Anchored.ShiftOptions): IRange.Coords | null | void;
283
- protected _beginCommit(options?: string | ITransaction.OperationOptions): ITransaction;
284
- private _modifyTable;
772
+ /**
773
+ * Write the table's own properties: its name, its description, its style, its flags.
774
+ *
775
+ * @remarks
776
+ * Nothing here reaches the sheet. The bands and the anchor have writers of their own because
777
+ * they do - see {@link _setBands} and {@link _setAnchor}. Which of the three a public setter
778
+ * calls is fixed by the setter, never worked out from the keys it was handed.
779
+ */
780
+ private _setProps;
781
+ /**
782
+ * Show or hide the header row, the totals row, or both.
783
+ *
784
+ * @remarks
785
+ * A band is a row on the sheet, so showing one has to find the space for it and hiding one has
786
+ * to clear it - {@link _ensureHeightForHeaderTotals} does that, and moves the anchor when the
787
+ * table grew or shrank. A totals row takes what its cells hold with it when it goes
788
+ * ({@link _holdTotalsFromCells}) and gives it back to them when it returns
789
+ * ({@link _showTotalsFromProps}), all in this one transaction: Excel's `Toggle Total Row` is a
790
+ * single undo step, label and formulas together.
791
+ *
792
+ * @param headerRowCount `undefined` leaves the header as it is.
793
+ * @param totalsRowCount `undefined` leaves the totals row as it is.
794
+ */
795
+ private _setBands;
796
+ /**
797
+ * Move the table, or change what it covers.
798
+ *
799
+ * @remarks
800
+ * The columns follow the width ({@link _spliceColumnsToAnchor}), and the header row is then read
801
+ * back, so a column the table has just covered is named by the text that was already sitting in
802
+ * its header cell rather than by a generated one.
803
+ */
804
+ private _setAnchor;
805
+ /**
806
+ * Move the totals row to the row a resize ends the table on.
807
+ *
808
+ * @remarks
809
+ * Excel moves the row rather than rewriting it (probed, `probe-table-totals-refit.ps1`): what it
810
+ * passes on the way becomes body - growing over `70, 80` makes them the last two body rows, and
811
+ * shrinking leaves the body rows given up sitting below the totals - and nothing outside the
812
+ * table's columns or below the two rows involved ends up anywhere else.
813
+ *
814
+ * That is a rotation of the totals row past the rows between, done here with the sheet's own
815
+ * shifts - inserts and deletes of the table's columns - so that what names a cell follows it and
816
+ * nothing below the two rows is left anywhere else. A shift carries cells but cannot reorder
817
+ * them, so one side of the rotation has to be written again, and which side depends on what the
818
+ * totals row passes:
819
+ *
820
+ * - **Growing over blank rows**, the usual case, the blank rows are the side given up. Rows are
821
+ * inserted above the totals row, which carries it down whole - its formats, its formulas and
822
+ * every reference to its cells, exactly as Excel has them - and the blank rows it pushed out
823
+ * below are deleted.
824
+ * - **Growing over content, and shrinking**, the rows between are the user's and have to travel,
825
+ * so the totals row is the side written again: a blank row is opened where it is going, its
826
+ * cells are written there - formula, value and the cell's own format - and the row they came
827
+ * from is deleted, which closes the gap. Two divergences follow from writing rather than
828
+ * moving. A reference to a totals CELL from elsewhere (`=C7`) becomes `#REF!` where Excel
829
+ * re-points it; `Table[[#Totals],[Column]]` is unaffected. And, shrinking, an A1 reference
830
+ * into the rows being given up is not pushed down with them (Excel: `SUM(C3:C5)` becomes
831
+ * `SUM(C3:C6)`), because the engine re-images a formula for a shift once it has settled and
832
+ * the text written here is from before; Excel's own result there is a circular reference,
833
+ * the totals cell sitting inside that range.
834
+ *
835
+ * The table steps back above both rows first. A shift inside a table is the table's business
836
+ * ({@link _processContainerShift} would hide a totals row whose row is deleted); one below it is
837
+ * not.
838
+ *
839
+ * @param from The anchor the table has now, totals row included.
840
+ * @param rowEnd The row the totals row is going to.
841
+ */
842
+ private _moveTotalsRow;
843
+ /**
844
+ * Bring the column properties in line with a new width: a column taken in is appended (or
845
+ * prepended) and named, a column given up is dropped.
846
+ *
847
+ * @returns Whether the columns changed.
848
+ */
849
+ private _spliceColumnsToAnchor;
285
850
  /** {@inheritDoc IListener.ISource.addListeners} */
286
851
  addListeners(listeners: ITable.IListeners, options?: IListener.Options): IListener.Remove;
287
852
  /** @internal */
288
- protected _processAfterStateChange(state: State, view: CommitView, commit: ITransaction.ICommit): void;
853
+ protected _processAfterStateChange(state: State, commit: ITransaction.ICommit): void;
289
854
  /** @internal */
290
- protected _processHeaderListener(): void;
855
+ protected _isAnyChangeFromState(): boolean;
856
+ /**
857
+ * The row the header listener watches: the header row, or the first data row when there is no
858
+ * header, so a table without one still syncs its columns from the sheet.
859
+ */
860
+ private _getHeaderListenerCoords;
861
+ private _removeHeaderListener;
291
862
  /** @internal */
292
- protected _processTotalsListener(): void;
863
+ protected _processHeaderListener(): void;
293
864
  get [Symbol.toStringTag](): string;
294
865
  /** {@inheritDoc ICellRanges.toString} */
295
866
  toString(): string;
296
867
  /** {@inheritDoc ITable.toJSON} */
297
868
  toJSON(): ITable.JSON | null;
298
- /** {@inheritDoc ITable.getSheet} */
299
- getSheet(): ISheet | null;
869
+ /** {@inheritDoc ITable.getWorksheet} */
870
+ getWorksheet(): IWorksheet | null;
300
871
  /** @internal */
301
872
  private _createNamed;
302
873
  private _fromJSON;
303
874
  /** {@inheritDoc ITable.close} */
304
875
  close(): void;
876
+ /**
877
+ * A table is deleted when its state says so - and when it has no state at all.
878
+ *
879
+ * @remarks
880
+ * Undoing the commit that created a table (an add, a paste, the re-add of a cut) removes its
881
+ * state but cannot close the instance: a redo brings the state back, and the sheet's table map
882
+ * hands out this same instance again. In between it is a deleted table.
883
+ */
884
+ isDeleted(): boolean;
885
+ /**
886
+ * The state of a table that can be worked on, or `null` for one that is deleted, closed, or has
887
+ * no state in the current snapshot. Callbacks registered on the sheet outlive the table and ask
888
+ * this first.
889
+ */
890
+ private _getLiveState;
891
+ /** {@link _getLiveState}, for a mutator: a table that is gone refuses the write. */
892
+ private _requireLive;
893
+ /**
894
+ * The sheet this table is on, for an operation that reaches cells.
895
+ *
896
+ * @remarks
897
+ * A preview table ({@link Table}) has none: it is a style rendered over coordinates, with no
898
+ * ranges behind it. Its getters answer an invalid range, as an unanchored table's do; anything
899
+ * that would read or write cells says so here rather than failing on a `null` range further in.
900
+ */
901
+ private _requireSheet;
305
902
  /** {@inheritDoc ITable.isITable} */
306
903
  get isITable(): true;
307
904
  }
@@ -313,7 +910,7 @@ export declare namespace AnchoredTable {
313
910
  /**
314
911
  * The sheet the table is anchored to.
315
912
  */
316
- sheet?: ISheet;
913
+ sheet?: IWorksheet;
317
914
  /**
318
915
  * Required if there is no sheet. For example when showing table Preview.
319
916
  */
@@ -330,10 +927,59 @@ export declare namespace AnchoredTable {
330
927
  * If this is true then this will sync header and footers if they are visible on load.
331
928
  */
332
929
  syncSheet?: boolean;
930
+ /**
931
+ * With `syncSheet`: the coords already end with the totals row the JSON asks for, so its cells
932
+ * are the table's totals and no row is added.
933
+ */
934
+ hasTotals?: boolean;
333
935
  processTableUpdate?: () => void;
936
+ /**
937
+ * Called, inside the operation, when the table's name or its columns are set - and once when
938
+ * it is created - for whoever keeps a copy of them (the calculation's replica).
939
+ */
940
+ symbolsChanged?: (table: ITable) => void;
941
+ /**
942
+ * Called, inside the operation, when the table starts or stops holding a filter condition
943
+ * (see {@link IWorksheet.getFilteredRanges}). A change of condition that leaves one held is not
944
+ * a change here.
945
+ */
946
+ filteredChanged?: (table: ITable) => void;
947
+ /**
948
+ * Called before {@link ITable.delete} (`'error'`) or {@link ITable.convertToRange} (`'address'`)
949
+ * removes the table, while it still exists, so the formulas that reference it can be rewritten.
950
+ */
951
+ releaseReferences?: (table: ITable, release: 'error' | 'address') => void;
952
+ /**
953
+ * Called when the body's rows have changed in a way a shift does not carry a reference through:
954
+ * rows taken or given up at its end, or a row inserted at its first row. The A1 references
955
+ * that spanned the body are re-fitted to it - see `Calculation._refitTableRows`.
956
+ *
957
+ * @param columns The table's columns.
958
+ * @param match The rows a reference spans now, if it spanned the body before.
959
+ * @param headerRow The header's row, when a reference from it to `match.rowEnd` counts too.
960
+ * @param to The body's rows now.
961
+ * @param afterShift `match` is where a shift this edit makes WILL put the reference.
962
+ * @param isCurrent Whether the table is still as this change left it; a re-fit that runs later
963
+ * does nothing once it is not.
964
+ */
965
+ refitBodyRows?: (columns: {
966
+ colStart: number;
967
+ colEnd: number;
968
+ }, match: {
969
+ rowStart: number;
970
+ rowEnd: number;
971
+ }, headerRow: number | null, to: {
972
+ rowStart: number;
973
+ rowEnd: number;
974
+ }, afterShift: boolean, isCurrent: () => boolean) => void;
975
+ /**
976
+ * Writes a calculated column's formula into body rows the table has just taken in. Those rows
977
+ * came from an operation that has ruled on the sheet's protection, so a locked cell among them
978
+ * does not refuse it.
979
+ */
980
+ fillCalculated?: (coords: IRange.Coords, formulaText: string) => void;
334
981
  }
335
982
  }
336
- /** @internal */
337
983
  interface State extends AbstractAnchored.State {
338
984
  /** Single rectangle — this type is never anchored to more than one range. */
339
985
  anchorCoords: IRange.Coords;
@@ -341,25 +987,24 @@ interface State extends AbstractAnchored.State {
341
987
  description: string;
342
988
  headerRowCount: number;
343
989
  totalsRowCount: number;
990
+ /** Whether a totals row has EVER been shown. The first show is given defaults; no other is. */
991
+ totalsRowShown: boolean;
344
992
  style: ITableStyle.StyleOptions;
345
- disabledAutoExpand: boolean;
346
- mapColumnById: Map<string | number, ITable.IColumn>;
347
- mapColumnByIndex: Map<number, ITable.IColumn>;
348
- mapColumnByName: Map<string, ITable.IColumn>;
349
- orderedColumns: readonly ITable.IColumn[];
350
- mapColumnPropsById: Map<string | number, ColumnPropertiesState>;
993
+ autoExpand: ITable.AutoExpand;
994
+ formulaBelow: ITable.FormulaBelow;
995
+ disabledColumnFill: boolean;
996
+ /**
997
+ * The columns, and everything about them: their names, their sort and their filter. The only
998
+ * record of any of it - what the getters answer with is derived from this, never stored beside
999
+ * it. See {@link AnchoredTable._views}.
1000
+ */
351
1001
  orderedColumnsProps: readonly ColumnPropertiesState[];
352
- sortsActive: readonly ISort[];
353
- filtersActive: readonly IFilter[];
354
1002
  hiddenButtons: boolean;
355
1003
  mapHiddenButtons: Map<number, boolean>;
356
- headerRemoveListener: IListener.Remove | null;
357
- totalsRemoveListener: IListener.Remove | null;
1004
+ hiddenDecorations?: boolean;
358
1005
  lastColId: number;
359
- shownTotalsRow: boolean;
360
- }
361
- /** @internal */
362
- interface CommitView extends AbstractAnchored.CommitView {
1006
+ /** The file's sort ranges; see {@link ISort.JSON.extent}. Cleared by any sort made here. */
1007
+ sortExtent?: ISort.SortExtent | null;
363
1008
  }
364
1009
  export {};
365
1010
  //# sourceMappingURL=AnchoredTable.d.ts.map