@rowsncolumns/spreadsheet-state 28.0.66

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 (1541) hide show
  1. package/LICENSE.md +100 -0
  2. package/Readme.md +65 -0
  3. package/dist/cjs/api/border.d.ts +9 -0
  4. package/dist/cjs/api/border.d.ts.map +1 -0
  5. package/dist/cjs/api/border.js +25 -0
  6. package/dist/cjs/api/conditional-format.d.ts +2 -0
  7. package/dist/cjs/api/conditional-format.d.ts.map +1 -0
  8. package/dist/cjs/api/conditional-format.js +5 -0
  9. package/dist/cjs/api/copy-paste.d.ts +20 -0
  10. package/dist/cjs/api/copy-paste.d.ts.map +1 -0
  11. package/dist/cjs/api/copy-paste.js +384 -0
  12. package/dist/cjs/api/data-validation.d.ts +2 -0
  13. package/dist/cjs/api/data-validation.d.ts.map +1 -0
  14. package/dist/cjs/api/data-validation.js +5 -0
  15. package/dist/cjs/api/datatype.d.ts +89 -0
  16. package/dist/cjs/api/datatype.d.ts.map +1 -0
  17. package/dist/cjs/api/datatype.js +671 -0
  18. package/dist/cjs/api/date.d.ts +27 -0
  19. package/dist/cjs/api/date.d.ts.map +1 -0
  20. package/dist/cjs/api/date.js +222 -0
  21. package/dist/cjs/api/decimals.d.ts +10 -0
  22. package/dist/cjs/api/decimals.d.ts.map +1 -0
  23. package/dist/cjs/api/decimals.js +192 -0
  24. package/dist/cjs/api/dependency.d.ts +64 -0
  25. package/dist/cjs/api/dependency.d.ts.map +1 -0
  26. package/dist/cjs/api/dependency.js +279 -0
  27. package/dist/cjs/api/fill.d.ts +88 -0
  28. package/dist/cjs/api/fill.d.ts.map +1 -0
  29. package/dist/cjs/api/fill.js +959 -0
  30. package/dist/cjs/api/filter-range.d.ts +4 -0
  31. package/dist/cjs/api/filter-range.d.ts.map +1 -0
  32. package/dist/cjs/api/filter-range.js +101 -0
  33. package/dist/cjs/api/filter.d.ts +24 -0
  34. package/dist/cjs/api/filter.d.ts.map +1 -0
  35. package/dist/cjs/api/filter.js +66 -0
  36. package/dist/cjs/api/format-caches.d.ts +43 -0
  37. package/dist/cjs/api/format-caches.d.ts.map +1 -0
  38. package/dist/cjs/api/format-caches.js +107 -0
  39. package/dist/cjs/api/formula.d.ts +69 -0
  40. package/dist/cjs/api/formula.d.ts.map +1 -0
  41. package/dist/cjs/api/formula.js +458 -0
  42. package/dist/cjs/api/immer-utils.d.ts +66 -0
  43. package/dist/cjs/api/immer-utils.d.ts.map +1 -0
  44. package/dist/cjs/api/immer-utils.js +1633 -0
  45. package/dist/cjs/api/intl.d.ts +51 -0
  46. package/dist/cjs/api/intl.d.ts.map +1 -0
  47. package/dist/cjs/api/intl.js +261 -0
  48. package/dist/cjs/api/merges.d.ts +7 -0
  49. package/dist/cjs/api/merges.d.ts.map +1 -0
  50. package/dist/cjs/api/merges.js +134 -0
  51. package/dist/cjs/api/outline.d.ts +33 -0
  52. package/dist/cjs/api/outline.d.ts.map +1 -0
  53. package/dist/cjs/api/outline.js +70 -0
  54. package/dist/cjs/api/parse-html.d.ts +15 -0
  55. package/dist/cjs/api/parse-html.d.ts.map +1 -0
  56. package/dist/cjs/api/parse-html.js +1066 -0
  57. package/dist/cjs/api/patches.d.ts +11 -0
  58. package/dist/cjs/api/patches.d.ts.map +1 -0
  59. package/dist/cjs/api/patches.js +218 -0
  60. package/dist/cjs/api/pivot-range.d.ts +8 -0
  61. package/dist/cjs/api/pivot-range.d.ts.map +1 -0
  62. package/dist/cjs/api/pivot-range.js +130 -0
  63. package/dist/cjs/api/range-rule-helpers.d.ts +65 -0
  64. package/dist/cjs/api/range-rule-helpers.d.ts.map +1 -0
  65. package/dist/cjs/api/range-rule-helpers.js +142 -0
  66. package/dist/cjs/api/range.d.ts +19 -0
  67. package/dist/cjs/api/range.d.ts.map +1 -0
  68. package/dist/cjs/api/range.js +183 -0
  69. package/dist/cjs/api/rename-sheet.d.ts +22 -0
  70. package/dist/cjs/api/rename-sheet.d.ts.map +1 -0
  71. package/dist/cjs/api/rename-sheet.js +54 -0
  72. package/dist/cjs/api/selection.d.ts +36 -0
  73. package/dist/cjs/api/selection.d.ts.map +1 -0
  74. package/dist/cjs/api/selection.js +133 -0
  75. package/dist/cjs/api/sort.d.ts +3 -0
  76. package/dist/cjs/api/sort.d.ts.map +1 -0
  77. package/dist/cjs/api/sort.js +33 -0
  78. package/dist/cjs/api/split-text.d.ts +2 -0
  79. package/dist/cjs/api/split-text.d.ts.map +1 -0
  80. package/dist/cjs/api/split-text.js +25 -0
  81. package/dist/cjs/api/structural-formula-update.d.ts +75 -0
  82. package/dist/cjs/api/structural-formula-update.d.ts.map +1 -0
  83. package/dist/cjs/api/structural-formula-update.js +508 -0
  84. package/dist/cjs/api/table.d.ts +39 -0
  85. package/dist/cjs/api/table.d.ts.map +1 -0
  86. package/dist/cjs/api/table.js +337 -0
  87. package/dist/cjs/api/validation.d.ts +12 -0
  88. package/dist/cjs/api/validation.d.ts.map +1 -0
  89. package/dist/cjs/api/validation.js +306 -0
  90. package/dist/cjs/api/xlsx-source.d.ts +22 -0
  91. package/dist/cjs/api/xlsx-source.d.ts.map +1 -0
  92. package/dist/cjs/api/xlsx-source.js +31 -0
  93. package/dist/cjs/atoms/delete-sheet-atom.d.ts +6 -0
  94. package/dist/cjs/atoms/delete-sheet-atom.d.ts.map +1 -0
  95. package/dist/cjs/atoms/delete-sheet-atom.js +4 -0
  96. package/dist/cjs/atoms/dialog-state.atom.d.ts +23 -0
  97. package/dist/cjs/atoms/dialog-state.atom.d.ts.map +1 -0
  98. package/dist/cjs/atoms/dialog-state.atom.js +72 -0
  99. package/dist/cjs/atoms/editing-data-validation-id.atom.d.ts +7 -0
  100. package/dist/cjs/atoms/editing-data-validation-id.atom.d.ts.map +1 -0
  101. package/dist/cjs/atoms/editing-data-validation-id.atom.js +12 -0
  102. package/dist/cjs/atoms/editing-embed.atom.d.ts +8 -0
  103. package/dist/cjs/atoms/editing-embed.atom.d.ts.map +1 -0
  104. package/dist/cjs/atoms/editing-embed.atom.js +5 -0
  105. package/dist/cjs/atoms/editing-table.atom.d.ts +8 -0
  106. package/dist/cjs/atoms/editing-table.atom.d.ts.map +1 -0
  107. package/dist/cjs/atoms/editing-table.atom.js +6 -0
  108. package/dist/cjs/atoms/error-state.atom.d.ts +10 -0
  109. package/dist/cjs/atoms/error-state.atom.d.ts.map +1 -0
  110. package/dist/cjs/atoms/error-state.atom.js +5 -0
  111. package/dist/cjs/atoms/index.d.ts +5 -0
  112. package/dist/cjs/atoms/index.d.ts.map +1 -0
  113. package/dist/cjs/atoms/index.js +4 -0
  114. package/dist/cjs/atoms/insert-image-state.atom.d.ts +6 -0
  115. package/dist/cjs/atoms/insert-image-state.atom.d.ts.map +1 -0
  116. package/dist/cjs/atoms/insert-image-state.atom.js +9 -0
  117. package/dist/cjs/atoms/named-range.atom.d.ts +8 -0
  118. package/dist/cjs/atoms/named-range.atom.d.ts.map +1 -0
  119. package/dist/cjs/atoms/named-range.atom.js +6 -0
  120. package/dist/cjs/atoms/resize-dimension.atom.d.ts +12 -0
  121. package/dist/cjs/atoms/resize-dimension.atom.d.ts.map +1 -0
  122. package/dist/cjs/atoms/resize-dimension.atom.js +5 -0
  123. package/dist/cjs/atoms/sheet-observer.atom.d.ts +16 -0
  124. package/dist/cjs/atoms/sheet-observer.atom.d.ts.map +1 -0
  125. package/dist/cjs/atoms/sheet-observer.atom.js +19 -0
  126. package/dist/cjs/cellxfs-registry.d.ts +37 -0
  127. package/dist/cjs/cellxfs-registry.d.ts.map +1 -0
  128. package/dist/cjs/cellxfs-registry.js +175 -0
  129. package/dist/cjs/commands.d.ts +691 -0
  130. package/dist/cjs/commands.d.ts.map +1 -0
  131. package/dist/cjs/commands.js +1 -0
  132. package/dist/cjs/components/dialogs/delete-sheet-confirmation.d.ts +7 -0
  133. package/dist/cjs/components/dialogs/delete-sheet-confirmation.d.ts.map +1 -0
  134. package/dist/cjs/components/dialogs/delete-sheet-confirmation.js +31 -0
  135. package/dist/cjs/components/dialogs/error-state.d.ts +3 -0
  136. package/dist/cjs/components/dialogs/error-state.d.ts.map +1 -0
  137. package/dist/cjs/components/dialogs/error-state.js +24 -0
  138. package/dist/cjs/components/editors/cell-format-editor.d.ts +26 -0
  139. package/dist/cjs/components/editors/cell-format-editor.d.ts.map +1 -0
  140. package/dist/cjs/components/editors/cell-format-editor.js +671 -0
  141. package/dist/cjs/components/editors/conditional-format-editor.d.ts +43 -0
  142. package/dist/cjs/components/editors/conditional-format-editor.d.ts.map +1 -0
  143. package/dist/cjs/components/editors/conditional-format-editor.js +176 -0
  144. package/dist/cjs/components/editors/conditional-format-rule-editor.d.ts +27 -0
  145. package/dist/cjs/components/editors/conditional-format-rule-editor.d.ts.map +1 -0
  146. package/dist/cjs/components/editors/conditional-format-rule-editor.js +640 -0
  147. package/dist/cjs/components/editors/data-validation-editor.d.ts +27 -0
  148. package/dist/cjs/components/editors/data-validation-editor.d.ts.map +1 -0
  149. package/dist/cjs/components/editors/data-validation-editor.js +163 -0
  150. package/dist/cjs/components/editors/data-validation-rule-editor.d.ts +17 -0
  151. package/dist/cjs/components/editors/data-validation-rule-editor.d.ts.map +1 -0
  152. package/dist/cjs/components/editors/data-validation-rule-editor.js +217 -0
  153. package/dist/cjs/components/editors/embed-editor.d.ts +19 -0
  154. package/dist/cjs/components/editors/embed-editor.d.ts.map +1 -0
  155. package/dist/cjs/components/editors/embed-editor.js +80 -0
  156. package/dist/cjs/components/editors/insert-image-editor.d.ts +20 -0
  157. package/dist/cjs/components/editors/insert-image-editor.d.ts.map +1 -0
  158. package/dist/cjs/components/editors/insert-image-editor.js +78 -0
  159. package/dist/cjs/components/editors/insert-link-editor.d.ts +20 -0
  160. package/dist/cjs/components/editors/insert-link-editor.d.ts.map +1 -0
  161. package/dist/cjs/components/editors/insert-link-editor.js +64 -0
  162. package/dist/cjs/components/editors/named-range-editor.d.ts +13 -0
  163. package/dist/cjs/components/editors/named-range-editor.d.ts.map +1 -0
  164. package/dist/cjs/components/editors/named-range-editor.js +106 -0
  165. package/dist/cjs/components/editors/resize-dimension-editor.d.ts +9 -0
  166. package/dist/cjs/components/editors/resize-dimension-editor.d.ts.map +1 -0
  167. package/dist/cjs/components/editors/resize-dimension-editor.js +62 -0
  168. package/dist/cjs/components/editors/sheet-filter.d.ts +59 -0
  169. package/dist/cjs/components/editors/sheet-filter.d.ts.map +1 -0
  170. package/dist/cjs/components/editors/sheet-filter.js +119 -0
  171. package/dist/cjs/components/editors/table-editor.d.ts +12 -0
  172. package/dist/cjs/components/editors/table-editor.d.ts.map +1 -0
  173. package/dist/cjs/components/editors/table-editor.js +105 -0
  174. package/dist/cjs/components/index.d.ts +13 -0
  175. package/dist/cjs/components/index.d.ts.map +1 -0
  176. package/dist/cjs/components/index.js +12 -0
  177. package/dist/cjs/generated-names.d.ts +51 -0
  178. package/dist/cjs/generated-names.d.ts.map +1 -0
  179. package/dist/cjs/generated-names.js +5 -0
  180. package/dist/cjs/helpers/iterative-calculation.d.ts +4 -0
  181. package/dist/cjs/helpers/iterative-calculation.d.ts.map +1 -0
  182. package/dist/cjs/helpers/iterative-calculation.js +44 -0
  183. package/dist/cjs/helpers/sheet-title.d.ts +5 -0
  184. package/dist/cjs/helpers/sheet-title.d.ts.map +1 -0
  185. package/dist/cjs/helpers/sheet-title.js +11 -0
  186. package/dist/cjs/helpers.d.ts +45 -0
  187. package/dist/cjs/helpers.d.ts.map +1 -0
  188. package/dist/cjs/helpers.js +154 -0
  189. package/dist/cjs/hooks/use-async-datasource.d.ts +57 -0
  190. package/dist/cjs/hooks/use-async-datasource.d.ts.map +1 -0
  191. package/dist/cjs/hooks/use-async-datasource.js +329 -0
  192. package/dist/cjs/hooks/use-calculation-initialize.d.ts +61 -0
  193. package/dist/cjs/hooks/use-calculation-initialize.d.ts.map +1 -0
  194. package/dist/cjs/hooks/use-calculation-initialize.js +800 -0
  195. package/dist/cjs/hooks/use-calculation-process-array.d.ts +20 -0
  196. package/dist/cjs/hooks/use-calculation-process-array.d.ts.map +1 -0
  197. package/dist/cjs/hooks/use-calculation-process-array.js +331 -0
  198. package/dist/cjs/hooks/use-calculation-queue.d.ts +10 -0
  199. package/dist/cjs/hooks/use-calculation-queue.d.ts.map +1 -0
  200. package/dist/cjs/hooks/use-calculation-queue.js +15 -0
  201. package/dist/cjs/hooks/use-calculation-worker.d.ts +37 -0
  202. package/dist/cjs/hooks/use-calculation-worker.d.ts.map +1 -0
  203. package/dist/cjs/hooks/use-calculation-worker.js +1868 -0
  204. package/dist/cjs/hooks/use-calculation.d.ts +173 -0
  205. package/dist/cjs/hooks/use-calculation.d.ts.map +1 -0
  206. package/dist/cjs/hooks/use-calculation.js +2735 -0
  207. package/dist/cjs/hooks/use-can-edit-cellrange.d.ts +31 -0
  208. package/dist/cjs/hooks/use-can-edit-cellrange.d.ts.map +1 -0
  209. package/dist/cjs/hooks/use-can-edit-cellrange.js +86 -0
  210. package/dist/cjs/hooks/use-cellxfs-registry.d.ts +6 -0
  211. package/dist/cjs/hooks/use-cellxfs-registry.d.ts.map +1 -0
  212. package/dist/cjs/hooks/use-cellxfs-registry.js +22 -0
  213. package/dist/cjs/hooks/use-citations.d.ts +19 -0
  214. package/dist/cjs/hooks/use-citations.d.ts.map +1 -0
  215. package/dist/cjs/hooks/use-citations.js +62 -0
  216. package/dist/cjs/hooks/use-comments.d.ts +14 -0
  217. package/dist/cjs/hooks/use-comments.d.ts.map +1 -0
  218. package/dist/cjs/hooks/use-comments.js +49 -0
  219. package/dist/cjs/hooks/use-conditional-formatting-rules.d.ts +22 -0
  220. package/dist/cjs/hooks/use-conditional-formatting-rules.d.ts.map +1 -0
  221. package/dist/cjs/hooks/use-conditional-formatting-rules.js +95 -0
  222. package/dist/cjs/hooks/use-data-validation-rules.d.ts +54 -0
  223. package/dist/cjs/hooks/use-data-validation-rules.d.ts.map +1 -0
  224. package/dist/cjs/hooks/use-data-validation-rules.js +151 -0
  225. package/dist/cjs/hooks/use-deferred-calculation-flush.d.ts +14 -0
  226. package/dist/cjs/hooks/use-deferred-calculation-flush.d.ts.map +1 -0
  227. package/dist/cjs/hooks/use-deferred-calculation-flush.js +81 -0
  228. package/dist/cjs/hooks/use-idle-scheduler.d.ts +5 -0
  229. package/dist/cjs/hooks/use-idle-scheduler.d.ts.map +1 -0
  230. package/dist/cjs/hooks/use-idle-scheduler.js +46 -0
  231. package/dist/cjs/hooks/use-indent.d.ts +23 -0
  232. package/dist/cjs/hooks/use-indent.d.ts.map +1 -0
  233. package/dist/cjs/hooks/use-indent.js +98 -0
  234. package/dist/cjs/hooks/use-named-range.d.ts +7 -0
  235. package/dist/cjs/hooks/use-named-range.d.ts.map +1 -0
  236. package/dist/cjs/hooks/use-named-range.js +70 -0
  237. package/dist/cjs/hooks/use-on-adjust-row-height.d.ts +11 -0
  238. package/dist/cjs/hooks/use-on-adjust-row-height.d.ts.map +1 -0
  239. package/dist/cjs/hooks/use-on-adjust-row-height.js +66 -0
  240. package/dist/cjs/hooks/use-on-autoresize.d.ts +17 -0
  241. package/dist/cjs/hooks/use-on-autoresize.d.ts.map +1 -0
  242. package/dist/cjs/hooks/use-on-autoresize.js +39 -0
  243. package/dist/cjs/hooks/use-on-banded-ranges.d.ts +15 -0
  244. package/dist/cjs/hooks/use-on-banded-ranges.d.ts.map +1 -0
  245. package/dist/cjs/hooks/use-on-banded-ranges.js +38 -0
  246. package/dist/cjs/hooks/use-on-calculation-begin.d.ts +14 -0
  247. package/dist/cjs/hooks/use-on-calculation-begin.d.ts.map +1 -0
  248. package/dist/cjs/hooks/use-on-calculation-begin.js +36 -0
  249. package/dist/cjs/hooks/use-on-calculation-success.d.ts +22 -0
  250. package/dist/cjs/hooks/use-on-calculation-success.d.ts.map +1 -0
  251. package/dist/cjs/hooks/use-on-calculation-success.js +182 -0
  252. package/dist/cjs/hooks/use-on-change-batch-stream.d.ts +7 -0
  253. package/dist/cjs/hooks/use-on-change-batch-stream.d.ts.map +1 -0
  254. package/dist/cjs/hooks/use-on-change-batch-stream.js +59 -0
  255. package/dist/cjs/hooks/use-on-change-batch.d.ts +54 -0
  256. package/dist/cjs/hooks/use-on-change-batch.d.ts.map +1 -0
  257. package/dist/cjs/hooks/use-on-change-batch.js +124 -0
  258. package/dist/cjs/hooks/use-on-change-calculated-column.d.ts +23 -0
  259. package/dist/cjs/hooks/use-on-change-calculated-column.d.ts.map +1 -0
  260. package/dist/cjs/hooks/use-on-change-calculated-column.js +30 -0
  261. package/dist/cjs/hooks/use-on-change-decimals.d.ts +22 -0
  262. package/dist/cjs/hooks/use-on-change-decimals.d.ts.map +1 -0
  263. package/dist/cjs/hooks/use-on-change-decimals.js +47 -0
  264. package/dist/cjs/hooks/use-on-change-formatting.d.ts +44 -0
  265. package/dist/cjs/hooks/use-on-change-formatting.d.ts.map +1 -0
  266. package/dist/cjs/hooks/use-on-change-formatting.js +165 -0
  267. package/dist/cjs/hooks/use-on-change-sheet-tabcolor.d.ts +11 -0
  268. package/dist/cjs/hooks/use-on-change-sheet-tabcolor.d.ts.map +1 -0
  269. package/dist/cjs/hooks/use-on-change-sheet-tabcolor.js +27 -0
  270. package/dist/cjs/hooks/use-on-change-table-column.d.ts +25 -0
  271. package/dist/cjs/hooks/use-on-change-table-column.d.ts.map +1 -0
  272. package/dist/cjs/hooks/use-on-change-table-column.js +53 -0
  273. package/dist/cjs/hooks/use-on-change-theme.d.ts +11 -0
  274. package/dist/cjs/hooks/use-on-change-theme.d.ts.map +1 -0
  275. package/dist/cjs/hooks/use-on-change-theme.js +20 -0
  276. package/dist/cjs/hooks/use-on-change.d.ts +61 -0
  277. package/dist/cjs/hooks/use-on-change.d.ts.map +1 -0
  278. package/dist/cjs/hooks/use-on-change.js +298 -0
  279. package/dist/cjs/hooks/use-on-clear-formatting.d.ts +17 -0
  280. package/dist/cjs/hooks/use-on-clear-formatting.d.ts.map +1 -0
  281. package/dist/cjs/hooks/use-on-clear-formatting.js +46 -0
  282. package/dist/cjs/hooks/use-on-collapse-column-group.d.ts +11 -0
  283. package/dist/cjs/hooks/use-on-collapse-column-group.d.ts.map +1 -0
  284. package/dist/cjs/hooks/use-on-collapse-column-group.js +47 -0
  285. package/dist/cjs/hooks/use-on-collapse-row-group.d.ts +18 -0
  286. package/dist/cjs/hooks/use-on-collapse-row-group.d.ts.map +1 -0
  287. package/dist/cjs/hooks/use-on-collapse-row-group.js +57 -0
  288. package/dist/cjs/hooks/use-on-copy.d.ts +49 -0
  289. package/dist/cjs/hooks/use-on-copy.d.ts.map +1 -0
  290. package/dist/cjs/hooks/use-on-copy.js +325 -0
  291. package/dist/cjs/hooks/use-on-create-named-range.d.ts +13 -0
  292. package/dist/cjs/hooks/use-on-create-named-range.d.ts.map +1 -0
  293. package/dist/cjs/hooks/use-on-create-named-range.js +33 -0
  294. package/dist/cjs/hooks/use-on-create-sheet.d.ts +23 -0
  295. package/dist/cjs/hooks/use-on-create-sheet.d.ts.map +1 -0
  296. package/dist/cjs/hooks/use-on-create-sheet.js +66 -0
  297. package/dist/cjs/hooks/use-on-delete-cells-shift-left.d.ts +28 -0
  298. package/dist/cjs/hooks/use-on-delete-cells-shift-left.d.ts.map +1 -0
  299. package/dist/cjs/hooks/use-on-delete-cells-shift-left.js +66 -0
  300. package/dist/cjs/hooks/use-on-delete-cells-shift-up.d.ts +28 -0
  301. package/dist/cjs/hooks/use-on-delete-cells-shift-up.d.ts.map +1 -0
  302. package/dist/cjs/hooks/use-on-delete-cells-shift-up.js +66 -0
  303. package/dist/cjs/hooks/use-on-delete-column.d.ts +38 -0
  304. package/dist/cjs/hooks/use-on-delete-column.d.ts.map +1 -0
  305. package/dist/cjs/hooks/use-on-delete-column.js +87 -0
  306. package/dist/cjs/hooks/use-on-delete-named-range.d.ts +14 -0
  307. package/dist/cjs/hooks/use-on-delete-named-range.d.ts.map +1 -0
  308. package/dist/cjs/hooks/use-on-delete-named-range.js +23 -0
  309. package/dist/cjs/hooks/use-on-delete-row.d.ts +38 -0
  310. package/dist/cjs/hooks/use-on-delete-row.d.ts.map +1 -0
  311. package/dist/cjs/hooks/use-on-delete-row.js +87 -0
  312. package/dist/cjs/hooks/use-on-delete-sheet.d.ts +16 -0
  313. package/dist/cjs/hooks/use-on-delete-sheet.d.ts.map +1 -0
  314. package/dist/cjs/hooks/use-on-delete-sheet.js +37 -0
  315. package/dist/cjs/hooks/use-on-delete-table-row.d.ts +29 -0
  316. package/dist/cjs/hooks/use-on-delete-table-row.d.ts.map +1 -0
  317. package/dist/cjs/hooks/use-on-delete-table-row.js +56 -0
  318. package/dist/cjs/hooks/use-on-delete.d.ts +33 -0
  319. package/dist/cjs/hooks/use-on-delete.d.ts.map +1 -0
  320. package/dist/cjs/hooks/use-on-delete.js +60 -0
  321. package/dist/cjs/hooks/use-on-drag-n-drop.d.ts +55 -0
  322. package/dist/cjs/hooks/use-on-drag-n-drop.d.ts.map +1 -0
  323. package/dist/cjs/hooks/use-on-drag-n-drop.js +191 -0
  324. package/dist/cjs/hooks/use-on-duplicate-sheet.d.ts +29 -0
  325. package/dist/cjs/hooks/use-on-duplicate-sheet.d.ts.map +1 -0
  326. package/dist/cjs/hooks/use-on-duplicate-sheet.js +65 -0
  327. package/dist/cjs/hooks/use-on-embeds.d.ts +19 -0
  328. package/dist/cjs/hooks/use-on-embeds.d.ts.map +1 -0
  329. package/dist/cjs/hooks/use-on-embeds.js +87 -0
  330. package/dist/cjs/hooks/use-on-expand-column-group.d.ts +11 -0
  331. package/dist/cjs/hooks/use-on-expand-column-group.d.ts.map +1 -0
  332. package/dist/cjs/hooks/use-on-expand-column-group.js +45 -0
  333. package/dist/cjs/hooks/use-on-expand-row-group.d.ts +18 -0
  334. package/dist/cjs/hooks/use-on-expand-row-group.d.ts.map +1 -0
  335. package/dist/cjs/hooks/use-on-expand-row-group.js +52 -0
  336. package/dist/cjs/hooks/use-on-fill-range.d.ts +9 -0
  337. package/dist/cjs/hooks/use-on-fill-range.d.ts.map +1 -0
  338. package/dist/cjs/hooks/use-on-fill-range.js +55 -0
  339. package/dist/cjs/hooks/use-on-fill.d.ts +29 -0
  340. package/dist/cjs/hooks/use-on-fill.d.ts.map +1 -0
  341. package/dist/cjs/hooks/use-on-fill.js +78 -0
  342. package/dist/cjs/hooks/use-on-filter-table.d.ts +76 -0
  343. package/dist/cjs/hooks/use-on-filter-table.d.ts.map +1 -0
  344. package/dist/cjs/hooks/use-on-filter-table.js +429 -0
  345. package/dist/cjs/hooks/use-on-find-replace.d.ts +19 -0
  346. package/dist/cjs/hooks/use-on-find-replace.d.ts.map +1 -0
  347. package/dist/cjs/hooks/use-on-find-replace.js +150 -0
  348. package/dist/cjs/hooks/use-on-freeze.d.ts +13 -0
  349. package/dist/cjs/hooks/use-on-freeze.d.ts.map +1 -0
  350. package/dist/cjs/hooks/use-on-freeze.js +56 -0
  351. package/dist/cjs/hooks/use-on-group-columns.d.ts +11 -0
  352. package/dist/cjs/hooks/use-on-group-columns.d.ts.map +1 -0
  353. package/dist/cjs/hooks/use-on-group-columns.js +49 -0
  354. package/dist/cjs/hooks/use-on-group-rows.d.ts +17 -0
  355. package/dist/cjs/hooks/use-on-group-rows.d.ts.map +1 -0
  356. package/dist/cjs/hooks/use-on-group-rows.js +55 -0
  357. package/dist/cjs/hooks/use-on-hide-column.d.ts +23 -0
  358. package/dist/cjs/hooks/use-on-hide-column.d.ts.map +1 -0
  359. package/dist/cjs/hooks/use-on-hide-column.js +55 -0
  360. package/dist/cjs/hooks/use-on-hide-row.d.ts +32 -0
  361. package/dist/cjs/hooks/use-on-hide-row.d.ts.map +1 -0
  362. package/dist/cjs/hooks/use-on-hide-row.js +58 -0
  363. package/dist/cjs/hooks/use-on-hide-show-sheet.d.ts +18 -0
  364. package/dist/cjs/hooks/use-on-hide-show-sheet.d.ts.map +1 -0
  365. package/dist/cjs/hooks/use-on-hide-show-sheet.js +90 -0
  366. package/dist/cjs/hooks/use-on-import-csv-legacy.d.ts +8 -0
  367. package/dist/cjs/hooks/use-on-import-csv-legacy.d.ts.map +1 -0
  368. package/dist/cjs/hooks/use-on-import-csv-legacy.js +165 -0
  369. package/dist/cjs/hooks/use-on-import-csv.d.ts +28 -0
  370. package/dist/cjs/hooks/use-on-import-csv.d.ts.map +1 -0
  371. package/dist/cjs/hooks/use-on-import-csv.js +332 -0
  372. package/dist/cjs/hooks/use-on-import-excel.d.ts +67 -0
  373. package/dist/cjs/hooks/use-on-import-excel.d.ts.map +1 -0
  374. package/dist/cjs/hooks/use-on-import-excel.js +689 -0
  375. package/dist/cjs/hooks/use-on-insert-autosum.d.ts +9 -0
  376. package/dist/cjs/hooks/use-on-insert-autosum.d.ts.map +1 -0
  377. package/dist/cjs/hooks/use-on-insert-autosum.js +105 -0
  378. package/dist/cjs/hooks/use-on-insert-cells-shift-down.d.ts +28 -0
  379. package/dist/cjs/hooks/use-on-insert-cells-shift-down.d.ts.map +1 -0
  380. package/dist/cjs/hooks/use-on-insert-cells-shift-down.js +66 -0
  381. package/dist/cjs/hooks/use-on-insert-cells-shift-right.d.ts +28 -0
  382. package/dist/cjs/hooks/use-on-insert-cells-shift-right.d.ts.map +1 -0
  383. package/dist/cjs/hooks/use-on-insert-cells-shift-right.js +66 -0
  384. package/dist/cjs/hooks/use-on-insert-checkbox.d.ts +17 -0
  385. package/dist/cjs/hooks/use-on-insert-checkbox.d.ts.map +1 -0
  386. package/dist/cjs/hooks/use-on-insert-checkbox.js +87 -0
  387. package/dist/cjs/hooks/use-on-insert-column.d.ts +40 -0
  388. package/dist/cjs/hooks/use-on-insert-column.d.ts.map +1 -0
  389. package/dist/cjs/hooks/use-on-insert-column.js +93 -0
  390. package/dist/cjs/hooks/use-on-insert-date-time.d.ts +4 -0
  391. package/dist/cjs/hooks/use-on-insert-date-time.d.ts.map +1 -0
  392. package/dist/cjs/hooks/use-on-insert-date-time.js +12 -0
  393. package/dist/cjs/hooks/use-on-insert-date.d.ts +4 -0
  394. package/dist/cjs/hooks/use-on-insert-date.d.ts.map +1 -0
  395. package/dist/cjs/hooks/use-on-insert-date.js +13 -0
  396. package/dist/cjs/hooks/use-on-insert-image.d.ts +24 -0
  397. package/dist/cjs/hooks/use-on-insert-image.d.ts.map +1 -0
  398. package/dist/cjs/hooks/use-on-insert-image.js +145 -0
  399. package/dist/cjs/hooks/use-on-insert-link.d.ts +25 -0
  400. package/dist/cjs/hooks/use-on-insert-link.d.ts.map +1 -0
  401. package/dist/cjs/hooks/use-on-insert-link.js +220 -0
  402. package/dist/cjs/hooks/use-on-insert-note.d.ts +4 -0
  403. package/dist/cjs/hooks/use-on-insert-note.d.ts.map +1 -0
  404. package/dist/cjs/hooks/use-on-insert-note.js +14 -0
  405. package/dist/cjs/hooks/use-on-insert-row.d.ts +38 -0
  406. package/dist/cjs/hooks/use-on-insert-row.d.ts.map +1 -0
  407. package/dist/cjs/hooks/use-on-insert-row.js +106 -0
  408. package/dist/cjs/hooks/use-on-insert-table-row.d.ts +31 -0
  409. package/dist/cjs/hooks/use-on-insert-table-row.d.ts.map +1 -0
  410. package/dist/cjs/hooks/use-on-insert-table-row.js +60 -0
  411. package/dist/cjs/hooks/use-on-insert-time.d.ts +4 -0
  412. package/dist/cjs/hooks/use-on-insert-time.d.ts.map +1 -0
  413. package/dist/cjs/hooks/use-on-insert-time.js +12 -0
  414. package/dist/cjs/hooks/use-on-locale-change.d.ts +35 -0
  415. package/dist/cjs/hooks/use-on-locale-change.d.ts.map +1 -0
  416. package/dist/cjs/hooks/use-on-locale-change.js +314 -0
  417. package/dist/cjs/hooks/use-on-merge-unmerge-cells.d.ts +28 -0
  418. package/dist/cjs/hooks/use-on-merge-unmerge-cells.d.ts.map +1 -0
  419. package/dist/cjs/hooks/use-on-merge-unmerge-cells.js +366 -0
  420. package/dist/cjs/hooks/use-on-move-columns.d.ts +28 -0
  421. package/dist/cjs/hooks/use-on-move-columns.d.ts.map +1 -0
  422. package/dist/cjs/hooks/use-on-move-columns.js +378 -0
  423. package/dist/cjs/hooks/use-on-move-rows.d.ts +30 -0
  424. package/dist/cjs/hooks/use-on-move-rows.d.ts.map +1 -0
  425. package/dist/cjs/hooks/use-on-move-rows.js +293 -0
  426. package/dist/cjs/hooks/use-on-move-selection.d.ts +35 -0
  427. package/dist/cjs/hooks/use-on-move-selection.d.ts.map +1 -0
  428. package/dist/cjs/hooks/use-on-move-selection.js +477 -0
  429. package/dist/cjs/hooks/use-on-move-sheet.d.ts +12 -0
  430. package/dist/cjs/hooks/use-on-move-sheet.d.ts.map +1 -0
  431. package/dist/cjs/hooks/use-on-move-sheet.js +68 -0
  432. package/dist/cjs/hooks/use-on-move-table-columns.d.ts +21 -0
  433. package/dist/cjs/hooks/use-on-move-table-columns.d.ts.map +1 -0
  434. package/dist/cjs/hooks/use-on-move-table-columns.js +249 -0
  435. package/dist/cjs/hooks/use-on-paste.d.ts +79 -0
  436. package/dist/cjs/hooks/use-on-paste.d.ts.map +1 -0
  437. package/dist/cjs/hooks/use-on-paste.js +985 -0
  438. package/dist/cjs/hooks/use-on-protect-range.d.ts +20 -0
  439. package/dist/cjs/hooks/use-on-protect-range.d.ts.map +1 -0
  440. package/dist/cjs/hooks/use-on-protect-range.js +67 -0
  441. package/dist/cjs/hooks/use-on-protect-sheet.d.ts +19 -0
  442. package/dist/cjs/hooks/use-on-protect-sheet.d.ts.map +1 -0
  443. package/dist/cjs/hooks/use-on-protect-sheet.js +65 -0
  444. package/dist/cjs/hooks/use-on-remove-duplicates.d.ts +21 -0
  445. package/dist/cjs/hooks/use-on-remove-duplicates.d.ts.map +1 -0
  446. package/dist/cjs/hooks/use-on-remove-duplicates.js +40 -0
  447. package/dist/cjs/hooks/use-on-rename-sheet.d.ts +21 -0
  448. package/dist/cjs/hooks/use-on-rename-sheet.d.ts.map +1 -0
  449. package/dist/cjs/hooks/use-on-rename-sheet.js +80 -0
  450. package/dist/cjs/hooks/use-on-request-calculate-wrapper.d.ts +30 -0
  451. package/dist/cjs/hooks/use-on-request-calculate-wrapper.d.ts.map +1 -0
  452. package/dist/cjs/hooks/use-on-request-calculate-wrapper.js +90 -0
  453. package/dist/cjs/hooks/use-on-request-conditional-format.d.ts +2 -0
  454. package/dist/cjs/hooks/use-on-request-conditional-format.d.ts.map +1 -0
  455. package/dist/cjs/hooks/use-on-request-conditional-format.js +8 -0
  456. package/dist/cjs/hooks/use-on-request-data-validation.d.ts +7 -0
  457. package/dist/cjs/hooks/use-on-request-data-validation.d.ts.map +1 -0
  458. package/dist/cjs/hooks/use-on-request-data-validation.js +23 -0
  459. package/dist/cjs/hooks/use-on-request-define-named-range.d.ts +8 -0
  460. package/dist/cjs/hooks/use-on-request-define-named-range.d.ts.map +1 -0
  461. package/dist/cjs/hooks/use-on-request-define-named-range.js +19 -0
  462. package/dist/cjs/hooks/use-on-request-delete-sheet.d.ts +2 -0
  463. package/dist/cjs/hooks/use-on-request-delete-sheet.d.ts.map +1 -0
  464. package/dist/cjs/hooks/use-on-request-delete-sheet.js +12 -0
  465. package/dist/cjs/hooks/use-on-request-edit-table.d.ts +3 -0
  466. package/dist/cjs/hooks/use-on-request-edit-table.d.ts.map +1 -0
  467. package/dist/cjs/hooks/use-on-request-edit-table.js +11 -0
  468. package/dist/cjs/hooks/use-on-request-format-cells.d.ts +2 -0
  469. package/dist/cjs/hooks/use-on-request-format-cells.d.ts.map +1 -0
  470. package/dist/cjs/hooks/use-on-request-format-cells.js +8 -0
  471. package/dist/cjs/hooks/use-on-request-insert-image.d.ts +3 -0
  472. package/dist/cjs/hooks/use-on-request-insert-image.d.ts.map +1 -0
  473. package/dist/cjs/hooks/use-on-request-insert-image.js +12 -0
  474. package/dist/cjs/hooks/use-on-request-insert-link.d.ts +5 -0
  475. package/dist/cjs/hooks/use-on-request-insert-link.d.ts.map +1 -0
  476. package/dist/cjs/hooks/use-on-request-insert-link.js +9 -0
  477. package/dist/cjs/hooks/use-on-request-resize.d.ts +3 -0
  478. package/dist/cjs/hooks/use-on-request-resize.d.ts.map +1 -0
  479. package/dist/cjs/hooks/use-on-request-resize.js +13 -0
  480. package/dist/cjs/hooks/use-on-request-update-named-range.d.ts +3 -0
  481. package/dist/cjs/hooks/use-on-request-update-named-range.d.ts.map +1 -0
  482. package/dist/cjs/hooks/use-on-request-update-named-range.js +11 -0
  483. package/dist/cjs/hooks/use-on-resize-table.d.ts +33 -0
  484. package/dist/cjs/hooks/use-on-resize-table.d.ts.map +1 -0
  485. package/dist/cjs/hooks/use-on-resize-table.js +218 -0
  486. package/dist/cjs/hooks/use-on-resize.d.ts +19 -0
  487. package/dist/cjs/hooks/use-on-resize.d.ts.map +1 -0
  488. package/dist/cjs/hooks/use-on-resize.js +55 -0
  489. package/dist/cjs/hooks/use-on-set-outline-depth.d.ts +17 -0
  490. package/dist/cjs/hooks/use-on-set-outline-depth.d.ts.map +1 -0
  491. package/dist/cjs/hooks/use-on-set-outline-depth.js +96 -0
  492. package/dist/cjs/hooks/use-on-show-column.d.ts +16 -0
  493. package/dist/cjs/hooks/use-on-show-column.d.ts.map +1 -0
  494. package/dist/cjs/hooks/use-on-show-column.js +96 -0
  495. package/dist/cjs/hooks/use-on-show-row.d.ts +22 -0
  496. package/dist/cjs/hooks/use-on-show-row.d.ts.map +1 -0
  497. package/dist/cjs/hooks/use-on-show-row.js +99 -0
  498. package/dist/cjs/hooks/use-on-sort-column.d.ts +53 -0
  499. package/dist/cjs/hooks/use-on-sort-column.d.ts.map +1 -0
  500. package/dist/cjs/hooks/use-on-sort-column.js +300 -0
  501. package/dist/cjs/hooks/use-on-sort-range.d.ts +42 -0
  502. package/dist/cjs/hooks/use-on-sort-range.d.ts.map +1 -0
  503. package/dist/cjs/hooks/use-on-sort-range.js +252 -0
  504. package/dist/cjs/hooks/use-on-sort-table.d.ts +59 -0
  505. package/dist/cjs/hooks/use-on-sort-table.d.ts.map +1 -0
  506. package/dist/cjs/hooks/use-on-sort-table.js +345 -0
  507. package/dist/cjs/hooks/use-on-table.d.ts +49 -0
  508. package/dist/cjs/hooks/use-on-table.d.ts.map +1 -0
  509. package/dist/cjs/hooks/use-on-table.js +386 -0
  510. package/dist/cjs/hooks/use-on-trace-dependents-precedents.d.ts +14 -0
  511. package/dist/cjs/hooks/use-on-trace-dependents-precedents.d.ts.map +1 -0
  512. package/dist/cjs/hooks/use-on-trace-dependents-precedents.js +146 -0
  513. package/dist/cjs/hooks/use-on-ungroup-columns.d.ts +11 -0
  514. package/dist/cjs/hooks/use-on-ungroup-columns.d.ts.map +1 -0
  515. package/dist/cjs/hooks/use-on-ungroup-columns.js +57 -0
  516. package/dist/cjs/hooks/use-on-ungroup-rows.d.ts +17 -0
  517. package/dist/cjs/hooks/use-on-ungroup-rows.d.ts.map +1 -0
  518. package/dist/cjs/hooks/use-on-ungroup-rows.js +63 -0
  519. package/dist/cjs/hooks/use-on-update-named-range.d.ts +19 -0
  520. package/dist/cjs/hooks/use-on-update-named-range.d.ts.map +1 -0
  521. package/dist/cjs/hooks/use-on-update-named-range.js +133 -0
  522. package/dist/cjs/hooks/use-on-update-note.d.ts +13 -0
  523. package/dist/cjs/hooks/use-on-update-note.d.ts.map +1 -0
  524. package/dist/cjs/hooks/use-on-update-note.js +21 -0
  525. package/dist/cjs/hooks/use-on-update-sheet.d.ts +10 -0
  526. package/dist/cjs/hooks/use-on-update-sheet.d.ts.map +1 -0
  527. package/dist/cjs/hooks/use-on-update-sheet.js +12 -0
  528. package/dist/cjs/hooks/use-paint-format.d.ts +17 -0
  529. package/dist/cjs/hooks/use-paint-format.d.ts.map +1 -0
  530. package/dist/cjs/hooks/use-paint-format.js +118 -0
  531. package/dist/cjs/hooks/use-search.d.ts +81 -0
  532. package/dist/cjs/hooks/use-search.d.ts.map +1 -0
  533. package/dist/cjs/hooks/use-search.js +261 -0
  534. package/dist/cjs/hooks/use-select-next-prev-sheet.d.ts +11 -0
  535. package/dist/cjs/hooks/use-select-next-prev-sheet.d.ts.map +1 -0
  536. package/dist/cjs/hooks/use-select-next-prev-sheet.js +22 -0
  537. package/dist/cjs/hooks/use-sheet-observer.d.ts +20 -0
  538. package/dist/cjs/hooks/use-sheet-observer.d.ts.map +1 -0
  539. package/dist/cjs/hooks/use-sheet-observer.js +127 -0
  540. package/dist/cjs/hooks/use-sheet-properties.d.ts +105 -0
  541. package/dist/cjs/hooks/use-sheet-properties.d.ts.map +1 -0
  542. package/dist/cjs/hooks/use-sheet-properties.js +1019 -0
  543. package/dist/cjs/hooks/use-sheet-state.d.ts +17 -0
  544. package/dist/cjs/hooks/use-sheet-state.d.ts.map +1 -0
  545. package/dist/cjs/hooks/use-sheet-state.js +84 -0
  546. package/dist/cjs/hooks/use-sheetdata-subscriber.d.ts +10 -0
  547. package/dist/cjs/hooks/use-sheetdata-subscriber.d.ts.map +1 -0
  548. package/dist/cjs/hooks/use-sheetdata-subscriber.js +15 -0
  549. package/dist/cjs/hooks/use-slicers.d.ts +19 -0
  550. package/dist/cjs/hooks/use-slicers.d.ts.map +1 -0
  551. package/dist/cjs/hooks/use-slicers.js +84 -0
  552. package/dist/cjs/hooks/use-split-text-to-columns.d.ts +19 -0
  553. package/dist/cjs/hooks/use-split-text-to-columns.d.ts.map +1 -0
  554. package/dist/cjs/hooks/use-split-text-to-columns.js +32 -0
  555. package/dist/cjs/hooks/use-spreadsheet-state.d.ts +627 -0
  556. package/dist/cjs/hooks/use-spreadsheet-state.d.ts.map +1 -0
  557. package/dist/cjs/hooks/use-spreadsheet-state.js +2038 -0
  558. package/dist/cjs/hooks/use-ss-registry.d.ts +6 -0
  559. package/dist/cjs/hooks/use-ss-registry.d.ts.map +1 -0
  560. package/dist/cjs/hooks/use-ss-registry.js +17 -0
  561. package/dist/cjs/hooks/use-structured-reference.d.ts +8 -0
  562. package/dist/cjs/hooks/use-structured-reference.d.ts.map +1 -0
  563. package/dist/cjs/hooks/use-structured-reference.js +132 -0
  564. package/dist/cjs/hooks/use-undo-redo-actions.d.ts +40 -0
  565. package/dist/cjs/hooks/use-undo-redo-actions.d.ts.map +1 -0
  566. package/dist/cjs/hooks/use-undo-redo-actions.js +209 -0
  567. package/dist/cjs/hooks/use-undo-redo.d.ts +69 -0
  568. package/dist/cjs/hooks/use-undo-redo.d.ts.map +1 -0
  569. package/dist/cjs/hooks/use-undo-redo.js +124 -0
  570. package/dist/cjs/hooks/utils/frozen-sort.d.ts +9 -0
  571. package/dist/cjs/hooks/utils/frozen-sort.d.ts.map +1 -0
  572. package/dist/cjs/hooks/utils/frozen-sort.js +28 -0
  573. package/dist/cjs/hooks/utils/sort-rows.d.ts +32 -0
  574. package/dist/cjs/hooks/utils/sort-rows.d.ts.map +1 -0
  575. package/dist/cjs/hooks/utils/sort-rows.js +113 -0
  576. package/dist/cjs/index.d.ts +38 -0
  577. package/dist/cjs/index.d.ts.map +1 -0
  578. package/dist/cjs/index.js +39 -0
  579. package/dist/cjs/interface/apply-fill.d.ts +6 -0
  580. package/dist/cjs/interface/apply-fill.d.ts.map +1 -0
  581. package/dist/cjs/interface/apply-fill.js +203 -0
  582. package/dist/cjs/interface/auto-resize.d.ts +4 -0
  583. package/dist/cjs/interface/auto-resize.d.ts.map +1 -0
  584. package/dist/cjs/interface/auto-resize.js +63 -0
  585. package/dist/cjs/interface/calculation-interface.d.ts +67 -0
  586. package/dist/cjs/interface/calculation-interface.d.ts.map +1 -0
  587. package/dist/cjs/interface/calculation-interface.js +409 -0
  588. package/dist/cjs/interface/change-batch-stream.d.ts +25 -0
  589. package/dist/cjs/interface/change-batch-stream.d.ts.map +1 -0
  590. package/dist/cjs/interface/change-batch-stream.js +428 -0
  591. package/dist/cjs/interface/change-batch.d.ts +39 -0
  592. package/dist/cjs/interface/change-batch.d.ts.map +1 -0
  593. package/dist/cjs/interface/change-batch.js +329 -0
  594. package/dist/cjs/interface/change-border.d.ts +5 -0
  595. package/dist/cjs/interface/change-border.d.ts.map +1 -0
  596. package/dist/cjs/interface/change-border.js +141 -0
  597. package/dist/cjs/interface/change-calculated-column.d.ts +5 -0
  598. package/dist/cjs/interface/change-calculated-column.d.ts.map +1 -0
  599. package/dist/cjs/interface/change-calculated-column.js +131 -0
  600. package/dist/cjs/interface/change-decimals.d.ts +7 -0
  601. package/dist/cjs/interface/change-decimals.d.ts.map +1 -0
  602. package/dist/cjs/interface/change-decimals.js +82 -0
  603. package/dist/cjs/interface/change-formatting.d.ts +4 -0
  604. package/dist/cjs/interface/change-formatting.d.ts.map +1 -0
  605. package/dist/cjs/interface/change-formatting.js +240 -0
  606. package/dist/cjs/interface/change-sheet-tabcolor.d.ts +4 -0
  607. package/dist/cjs/interface/change-sheet-tabcolor.d.ts.map +1 -0
  608. package/dist/cjs/interface/change-sheet-tabcolor.js +21 -0
  609. package/dist/cjs/interface/change-table-column.d.ts +49 -0
  610. package/dist/cjs/interface/change-table-column.d.ts.map +1 -0
  611. package/dist/cjs/interface/change-table-column.js +267 -0
  612. package/dist/cjs/interface/change-theme.d.ts +4 -0
  613. package/dist/cjs/interface/change-theme.d.ts.map +1 -0
  614. package/dist/cjs/interface/change-theme.js +23 -0
  615. package/dist/cjs/interface/chart-extensions.d.ts +32 -0
  616. package/dist/cjs/interface/chart-extensions.d.ts.map +1 -0
  617. package/dist/cjs/interface/chart-extensions.js +71 -0
  618. package/dist/cjs/interface/citations.d.ts +33 -0
  619. package/dist/cjs/interface/citations.d.ts.map +1 -0
  620. package/dist/cjs/interface/citations.js +142 -0
  621. package/dist/cjs/interface/clear-formatting.d.ts +5 -0
  622. package/dist/cjs/interface/clear-formatting.d.ts.map +1 -0
  623. package/dist/cjs/interface/clear-formatting.js +72 -0
  624. package/dist/cjs/interface/conditional-formatting-rules.d.ts +7 -0
  625. package/dist/cjs/interface/conditional-formatting-rules.d.ts.map +1 -0
  626. package/dist/cjs/interface/conditional-formatting-rules.js +191 -0
  627. package/dist/cjs/interface/create-table.d.ts +5 -0
  628. package/dist/cjs/interface/create-table.d.ts.map +1 -0
  629. package/dist/cjs/interface/create-table.js +96 -0
  630. package/dist/cjs/interface/data-validation-rules.d.ts +25 -0
  631. package/dist/cjs/interface/data-validation-rules.d.ts.map +1 -0
  632. package/dist/cjs/interface/data-validation-rules.js +366 -0
  633. package/dist/cjs/interface/data-validation-utils.d.ts +12 -0
  634. package/dist/cjs/interface/data-validation-utils.d.ts.map +1 -0
  635. package/dist/cjs/interface/data-validation-utils.js +118 -0
  636. package/dist/cjs/interface/delete-cells-shift-left.d.ts +5 -0
  637. package/dist/cjs/interface/delete-cells-shift-left.d.ts.map +1 -0
  638. package/dist/cjs/interface/delete-cells-shift-left.js +160 -0
  639. package/dist/cjs/interface/delete-cells-shift-up.d.ts +5 -0
  640. package/dist/cjs/interface/delete-cells-shift-up.d.ts.map +1 -0
  641. package/dist/cjs/interface/delete-cells-shift-up.js +152 -0
  642. package/dist/cjs/interface/delete-cells.d.ts +6 -0
  643. package/dist/cjs/interface/delete-cells.d.ts.map +1 -0
  644. package/dist/cjs/interface/delete-cells.js +231 -0
  645. package/dist/cjs/interface/delete-column.d.ts +4 -0
  646. package/dist/cjs/interface/delete-column.d.ts.map +1 -0
  647. package/dist/cjs/interface/delete-column.js +306 -0
  648. package/dist/cjs/interface/delete-row.d.ts +4 -0
  649. package/dist/cjs/interface/delete-row.d.ts.map +1 -0
  650. package/dist/cjs/interface/delete-row.js +227 -0
  651. package/dist/cjs/interface/delete-sheet.d.ts +4 -0
  652. package/dist/cjs/interface/delete-sheet.d.ts.map +1 -0
  653. package/dist/cjs/interface/delete-sheet.js +81 -0
  654. package/dist/cjs/interface/delete-table-column.d.ts +4 -0
  655. package/dist/cjs/interface/delete-table-column.d.ts.map +1 -0
  656. package/dist/cjs/interface/delete-table-column.js +349 -0
  657. package/dist/cjs/interface/delete-table-row.d.ts +4 -0
  658. package/dist/cjs/interface/delete-table-row.d.ts.map +1 -0
  659. package/dist/cjs/interface/delete-table-row.js +313 -0
  660. package/dist/cjs/interface/duplicate-sheet.d.ts +4 -0
  661. package/dist/cjs/interface/duplicate-sheet.d.ts.map +1 -0
  662. package/dist/cjs/interface/duplicate-sheet.js +232 -0
  663. package/dist/cjs/interface/embeds.d.ts +9 -0
  664. package/dist/cjs/interface/embeds.d.ts.map +1 -0
  665. package/dist/cjs/interface/embeds.js +121 -0
  666. package/dist/cjs/interface/freeze.d.ts +5 -0
  667. package/dist/cjs/interface/freeze.d.ts.map +1 -0
  668. package/dist/cjs/interface/freeze.js +160 -0
  669. package/dist/cjs/interface/helpers.d.ts +6 -0
  670. package/dist/cjs/interface/helpers.d.ts.map +1 -0
  671. package/dist/cjs/interface/helpers.js +44 -0
  672. package/dist/cjs/interface/hide-column.d.ts +4 -0
  673. package/dist/cjs/interface/hide-column.d.ts.map +1 -0
  674. package/dist/cjs/interface/hide-column.js +68 -0
  675. package/dist/cjs/interface/hide-row.d.ts +4 -0
  676. package/dist/cjs/interface/hide-row.d.ts.map +1 -0
  677. package/dist/cjs/interface/hide-row.js +65 -0
  678. package/dist/cjs/interface/indent.d.ts +7 -0
  679. package/dist/cjs/interface/indent.d.ts.map +1 -0
  680. package/dist/cjs/interface/indent.js +97 -0
  681. package/dist/cjs/interface/insert-cells-shift-down.d.ts +5 -0
  682. package/dist/cjs/interface/insert-cells-shift-down.d.ts.map +1 -0
  683. package/dist/cjs/interface/insert-cells-shift-down.js +154 -0
  684. package/dist/cjs/interface/insert-cells-shift-right.d.ts +5 -0
  685. package/dist/cjs/interface/insert-cells-shift-right.d.ts.map +1 -0
  686. package/dist/cjs/interface/insert-cells-shift-right.js +150 -0
  687. package/dist/cjs/interface/insert-column.d.ts +7 -0
  688. package/dist/cjs/interface/insert-column.d.ts.map +1 -0
  689. package/dist/cjs/interface/insert-column.js +645 -0
  690. package/dist/cjs/interface/insert-note.d.ts +5 -0
  691. package/dist/cjs/interface/insert-note.d.ts.map +1 -0
  692. package/dist/cjs/interface/insert-note.js +27 -0
  693. package/dist/cjs/interface/insert-row.d.ts +4 -0
  694. package/dist/cjs/interface/insert-row.d.ts.map +1 -0
  695. package/dist/cjs/interface/insert-row.js +188 -0
  696. package/dist/cjs/interface/insert-table-row.d.ts +4 -0
  697. package/dist/cjs/interface/insert-table-row.d.ts.map +1 -0
  698. package/dist/cjs/interface/insert-table-row.js +348 -0
  699. package/dist/cjs/interface/interface-cli.d.ts +3 -0
  700. package/dist/cjs/interface/interface-cli.d.ts.map +1 -0
  701. package/dist/cjs/interface/interface-cli.js +76 -0
  702. package/dist/cjs/interface/named-range-operations.d.ts +19 -0
  703. package/dist/cjs/interface/named-range-operations.d.ts.map +1 -0
  704. package/dist/cjs/interface/named-range-operations.js +96 -0
  705. package/dist/cjs/interface/new-sheet.d.ts +4 -0
  706. package/dist/cjs/interface/new-sheet.d.ts.map +1 -0
  707. package/dist/cjs/interface/new-sheet.js +109 -0
  708. package/dist/cjs/interface/pivot-extensions.d.ts +27 -0
  709. package/dist/cjs/interface/pivot-extensions.d.ts.map +1 -0
  710. package/dist/cjs/interface/pivot-extensions.js +62 -0
  711. package/dist/cjs/interface/remove-duplicates.d.ts +11 -0
  712. package/dist/cjs/interface/remove-duplicates.d.ts.map +1 -0
  713. package/dist/cjs/interface/remove-duplicates.js +132 -0
  714. package/dist/cjs/interface/remove-table.d.ts +4 -0
  715. package/dist/cjs/interface/remove-table.d.ts.map +1 -0
  716. package/dist/cjs/interface/remove-table.js +53 -0
  717. package/dist/cjs/interface/resize-utils.d.ts +18 -0
  718. package/dist/cjs/interface/resize-utils.d.ts.map +1 -0
  719. package/dist/cjs/interface/resize-utils.js +60 -0
  720. package/dist/cjs/interface/resize.d.ts +5 -0
  721. package/dist/cjs/interface/resize.d.ts.map +1 -0
  722. package/dist/cjs/interface/resize.js +56 -0
  723. package/dist/cjs/interface/slicers.d.ts +9 -0
  724. package/dist/cjs/interface/slicers.d.ts.map +1 -0
  725. package/dist/cjs/interface/slicers.js +113 -0
  726. package/dist/cjs/interface/split-text.d.ts +5 -0
  727. package/dist/cjs/interface/split-text.d.ts.map +1 -0
  728. package/dist/cjs/interface/split-text.js +120 -0
  729. package/dist/cjs/interface/spreadsheet-interface.d.ts +642 -0
  730. package/dist/cjs/interface/spreadsheet-interface.d.ts.map +1 -0
  731. package/dist/cjs/interface/spreadsheet-interface.js +2787 -0
  732. package/dist/cjs/interface/table-totalrow.d.ts +20 -0
  733. package/dist/cjs/interface/table-totalrow.d.ts.map +1 -0
  734. package/dist/cjs/interface/table-totalrow.js +170 -0
  735. package/dist/cjs/interface/table-utils.d.ts +21 -0
  736. package/dist/cjs/interface/table-utils.d.ts.map +1 -0
  737. package/dist/cjs/interface/table-utils.js +44 -0
  738. package/dist/cjs/interface/update-sheet.d.ts +16 -0
  739. package/dist/cjs/interface/update-sheet.d.ts.map +1 -0
  740. package/dist/cjs/interface/update-sheet.js +63 -0
  741. package/dist/cjs/interface/update-table.d.ts +4 -0
  742. package/dist/cjs/interface/update-table.d.ts.map +1 -0
  743. package/dist/cjs/interface/update-table.js +109 -0
  744. package/dist/cjs/server-utils.d.ts +8 -0
  745. package/dist/cjs/server-utils.d.ts.map +1 -0
  746. package/dist/cjs/server-utils.js +3 -0
  747. package/dist/cjs/server.browser.d.ts +9 -0
  748. package/dist/cjs/server.browser.d.ts.map +1 -0
  749. package/dist/cjs/server.browser.js +5 -0
  750. package/dist/cjs/server.d.ts +9 -0
  751. package/dist/cjs/server.d.ts.map +1 -0
  752. package/dist/cjs/server.js +5 -0
  753. package/dist/cjs/shared-string-registry.d.ts +35 -0
  754. package/dist/cjs/shared-string-registry.d.ts.map +1 -0
  755. package/dist/cjs/shared-string-registry.js +314 -0
  756. package/dist/cjs/sheet-cell.d.ts +310 -0
  757. package/dist/cjs/sheet-cell.d.ts.map +1 -0
  758. package/dist/cjs/sheet-cell.js +1809 -0
  759. package/dist/cjs/test-setup.d.ts +2 -0
  760. package/dist/cjs/test-setup.d.ts.map +1 -0
  761. package/dist/cjs/test-setup.js +3 -0
  762. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -0
  763. package/dist/cjs/types.d.ts +44 -0
  764. package/dist/cjs/types.d.ts.map +1 -0
  765. package/dist/cjs/types.js +33 -0
  766. package/dist/cjs/validation-schema/table.schema.d.ts +6 -0
  767. package/dist/cjs/validation-schema/table.schema.d.ts.map +1 -0
  768. package/dist/cjs/validation-schema/table.schema.js +4 -0
  769. package/dist/cjs/vitest.config.d.ts +3 -0
  770. package/dist/cjs/vitest.config.d.ts.map +1 -0
  771. package/dist/cjs/vitest.config.js +22 -0
  772. package/dist/esm/api/border.d.ts +9 -0
  773. package/dist/esm/api/border.d.ts.map +1 -0
  774. package/dist/esm/api/border.js +25 -0
  775. package/dist/esm/api/conditional-format.d.ts +2 -0
  776. package/dist/esm/api/conditional-format.d.ts.map +1 -0
  777. package/dist/esm/api/conditional-format.js +5 -0
  778. package/dist/esm/api/copy-paste.d.ts +20 -0
  779. package/dist/esm/api/copy-paste.d.ts.map +1 -0
  780. package/dist/esm/api/copy-paste.js +302 -0
  781. package/dist/esm/api/data-validation.d.ts +2 -0
  782. package/dist/esm/api/data-validation.d.ts.map +1 -0
  783. package/dist/esm/api/data-validation.js +5 -0
  784. package/dist/esm/api/datatype.d.ts +89 -0
  785. package/dist/esm/api/datatype.d.ts.map +1 -0
  786. package/dist/esm/api/datatype.js +639 -0
  787. package/dist/esm/api/date.d.ts +27 -0
  788. package/dist/esm/api/date.d.ts.map +1 -0
  789. package/dist/esm/api/date.js +220 -0
  790. package/dist/esm/api/decimals.d.ts +10 -0
  791. package/dist/esm/api/decimals.d.ts.map +1 -0
  792. package/dist/esm/api/decimals.js +181 -0
  793. package/dist/esm/api/dependency.d.ts +64 -0
  794. package/dist/esm/api/dependency.d.ts.map +1 -0
  795. package/dist/esm/api/dependency.js +251 -0
  796. package/dist/esm/api/fill.d.ts +88 -0
  797. package/dist/esm/api/fill.d.ts.map +1 -0
  798. package/dist/esm/api/fill.js +919 -0
  799. package/dist/esm/api/filter-range.d.ts +4 -0
  800. package/dist/esm/api/filter-range.d.ts.map +1 -0
  801. package/dist/esm/api/filter-range.js +100 -0
  802. package/dist/esm/api/filter.d.ts +24 -0
  803. package/dist/esm/api/filter.d.ts.map +1 -0
  804. package/dist/esm/api/filter.js +62 -0
  805. package/dist/esm/api/format-caches.d.ts +43 -0
  806. package/dist/esm/api/format-caches.d.ts.map +1 -0
  807. package/dist/esm/api/format-caches.js +95 -0
  808. package/dist/esm/api/formula.d.ts +69 -0
  809. package/dist/esm/api/formula.d.ts.map +1 -0
  810. package/dist/esm/api/formula.js +422 -0
  811. package/dist/esm/api/immer-utils.d.ts +66 -0
  812. package/dist/esm/api/immer-utils.d.ts.map +1 -0
  813. package/dist/esm/api/immer-utils.js +1552 -0
  814. package/dist/esm/api/intl.d.ts +51 -0
  815. package/dist/esm/api/intl.d.ts.map +1 -0
  816. package/dist/esm/api/intl.js +257 -0
  817. package/dist/esm/api/merges.d.ts +7 -0
  818. package/dist/esm/api/merges.d.ts.map +1 -0
  819. package/dist/esm/api/merges.js +174 -0
  820. package/dist/esm/api/outline.d.ts +33 -0
  821. package/dist/esm/api/outline.d.ts.map +1 -0
  822. package/dist/esm/api/outline.js +56 -0
  823. package/dist/esm/api/parse-html.d.ts +15 -0
  824. package/dist/esm/api/parse-html.d.ts.map +1 -0
  825. package/dist/esm/api/parse-html.js +865 -0
  826. package/dist/esm/api/patches.d.ts +11 -0
  827. package/dist/esm/api/patches.d.ts.map +1 -0
  828. package/dist/esm/api/patches.js +206 -0
  829. package/dist/esm/api/pivot-range.d.ts +8 -0
  830. package/dist/esm/api/pivot-range.d.ts.map +1 -0
  831. package/dist/esm/api/pivot-range.js +93 -0
  832. package/dist/esm/api/range-rule-helpers.d.ts +65 -0
  833. package/dist/esm/api/range-rule-helpers.d.ts.map +1 -0
  834. package/dist/esm/api/range-rule-helpers.js +138 -0
  835. package/dist/esm/api/range.d.ts +19 -0
  836. package/dist/esm/api/range.d.ts.map +1 -0
  837. package/dist/esm/api/range.js +136 -0
  838. package/dist/esm/api/rename-sheet.d.ts +22 -0
  839. package/dist/esm/api/rename-sheet.d.ts.map +1 -0
  840. package/dist/esm/api/rename-sheet.js +41 -0
  841. package/dist/esm/api/selection.d.ts +36 -0
  842. package/dist/esm/api/selection.d.ts.map +1 -0
  843. package/dist/esm/api/selection.js +138 -0
  844. package/dist/esm/api/sort.d.ts +3 -0
  845. package/dist/esm/api/sort.d.ts.map +1 -0
  846. package/dist/esm/api/sort.js +33 -0
  847. package/dist/esm/api/split-text.d.ts +2 -0
  848. package/dist/esm/api/split-text.d.ts.map +1 -0
  849. package/dist/esm/api/split-text.js +24 -0
  850. package/dist/esm/api/structural-formula-update.d.ts +75 -0
  851. package/dist/esm/api/structural-formula-update.d.ts.map +1 -0
  852. package/dist/esm/api/structural-formula-update.js +431 -0
  853. package/dist/esm/api/table.d.ts +39 -0
  854. package/dist/esm/api/table.d.ts.map +1 -0
  855. package/dist/esm/api/table.js +333 -0
  856. package/dist/esm/api/validation.d.ts +12 -0
  857. package/dist/esm/api/validation.d.ts.map +1 -0
  858. package/dist/esm/api/validation.js +297 -0
  859. package/dist/esm/api/xlsx-source.d.ts +22 -0
  860. package/dist/esm/api/xlsx-source.d.ts.map +1 -0
  861. package/dist/esm/api/xlsx-source.js +30 -0
  862. package/dist/esm/atoms/delete-sheet-atom.d.ts +6 -0
  863. package/dist/esm/atoms/delete-sheet-atom.d.ts.map +1 -0
  864. package/dist/esm/atoms/delete-sheet-atom.js +4 -0
  865. package/dist/esm/atoms/dialog-state.atom.d.ts +23 -0
  866. package/dist/esm/atoms/dialog-state.atom.d.ts.map +1 -0
  867. package/dist/esm/atoms/dialog-state.atom.js +34 -0
  868. package/dist/esm/atoms/editing-data-validation-id.atom.d.ts +7 -0
  869. package/dist/esm/atoms/editing-data-validation-id.atom.d.ts.map +1 -0
  870. package/dist/esm/atoms/editing-data-validation-id.atom.js +6 -0
  871. package/dist/esm/atoms/editing-embed.atom.d.ts +8 -0
  872. package/dist/esm/atoms/editing-embed.atom.d.ts.map +1 -0
  873. package/dist/esm/atoms/editing-embed.atom.js +5 -0
  874. package/dist/esm/atoms/editing-table.atom.d.ts +8 -0
  875. package/dist/esm/atoms/editing-table.atom.d.ts.map +1 -0
  876. package/dist/esm/atoms/editing-table.atom.js +6 -0
  877. package/dist/esm/atoms/error-state.atom.d.ts +10 -0
  878. package/dist/esm/atoms/error-state.atom.d.ts.map +1 -0
  879. package/dist/esm/atoms/error-state.atom.js +5 -0
  880. package/dist/esm/atoms/index.d.ts +5 -0
  881. package/dist/esm/atoms/index.d.ts.map +1 -0
  882. package/dist/esm/atoms/index.js +4 -0
  883. package/dist/esm/atoms/insert-image-state.atom.d.ts +6 -0
  884. package/dist/esm/atoms/insert-image-state.atom.d.ts.map +1 -0
  885. package/dist/esm/atoms/insert-image-state.atom.js +5 -0
  886. package/dist/esm/atoms/named-range.atom.d.ts +8 -0
  887. package/dist/esm/atoms/named-range.atom.d.ts.map +1 -0
  888. package/dist/esm/atoms/named-range.atom.js +6 -0
  889. package/dist/esm/atoms/resize-dimension.atom.d.ts +12 -0
  890. package/dist/esm/atoms/resize-dimension.atom.d.ts.map +1 -0
  891. package/dist/esm/atoms/resize-dimension.atom.js +5 -0
  892. package/dist/esm/atoms/sheet-observer.atom.d.ts +16 -0
  893. package/dist/esm/atoms/sheet-observer.atom.d.ts.map +1 -0
  894. package/dist/esm/atoms/sheet-observer.atom.js +16 -0
  895. package/dist/esm/cellxfs-registry.d.ts +37 -0
  896. package/dist/esm/cellxfs-registry.d.ts.map +1 -0
  897. package/dist/esm/cellxfs-registry.js +147 -0
  898. package/dist/esm/commands.d.ts +691 -0
  899. package/dist/esm/commands.d.ts.map +1 -0
  900. package/dist/esm/commands.js +1 -0
  901. package/dist/esm/components/dialogs/delete-sheet-confirmation.d.ts +7 -0
  902. package/dist/esm/components/dialogs/delete-sheet-confirmation.d.ts.map +1 -0
  903. package/dist/esm/components/dialogs/delete-sheet-confirmation.js +29 -0
  904. package/dist/esm/components/dialogs/error-state.d.ts +3 -0
  905. package/dist/esm/components/dialogs/error-state.d.ts.map +1 -0
  906. package/dist/esm/components/dialogs/error-state.js +22 -0
  907. package/dist/esm/components/editors/cell-format-editor.d.ts +26 -0
  908. package/dist/esm/components/editors/cell-format-editor.d.ts.map +1 -0
  909. package/dist/esm/components/editors/cell-format-editor.js +648 -0
  910. package/dist/esm/components/editors/conditional-format-editor.d.ts +43 -0
  911. package/dist/esm/components/editors/conditional-format-editor.d.ts.map +1 -0
  912. package/dist/esm/components/editors/conditional-format-editor.js +172 -0
  913. package/dist/esm/components/editors/conditional-format-rule-editor.d.ts +27 -0
  914. package/dist/esm/components/editors/conditional-format-rule-editor.d.ts.map +1 -0
  915. package/dist/esm/components/editors/conditional-format-rule-editor.js +608 -0
  916. package/dist/esm/components/editors/data-validation-editor.d.ts +27 -0
  917. package/dist/esm/components/editors/data-validation-editor.d.ts.map +1 -0
  918. package/dist/esm/components/editors/data-validation-editor.js +160 -0
  919. package/dist/esm/components/editors/data-validation-rule-editor.d.ts +17 -0
  920. package/dist/esm/components/editors/data-validation-rule-editor.d.ts.map +1 -0
  921. package/dist/esm/components/editors/data-validation-rule-editor.js +194 -0
  922. package/dist/esm/components/editors/embed-editor.d.ts +19 -0
  923. package/dist/esm/components/editors/embed-editor.d.ts.map +1 -0
  924. package/dist/esm/components/editors/embed-editor.js +75 -0
  925. package/dist/esm/components/editors/insert-image-editor.d.ts +20 -0
  926. package/dist/esm/components/editors/insert-image-editor.d.ts.map +1 -0
  927. package/dist/esm/components/editors/insert-image-editor.js +73 -0
  928. package/dist/esm/components/editors/insert-link-editor.d.ts +20 -0
  929. package/dist/esm/components/editors/insert-link-editor.d.ts.map +1 -0
  930. package/dist/esm/components/editors/insert-link-editor.js +60 -0
  931. package/dist/esm/components/editors/named-range-editor.d.ts +13 -0
  932. package/dist/esm/components/editors/named-range-editor.d.ts.map +1 -0
  933. package/dist/esm/components/editors/named-range-editor.js +103 -0
  934. package/dist/esm/components/editors/resize-dimension-editor.d.ts +9 -0
  935. package/dist/esm/components/editors/resize-dimension-editor.d.ts.map +1 -0
  936. package/dist/esm/components/editors/resize-dimension-editor.js +60 -0
  937. package/dist/esm/components/editors/sheet-filter.d.ts +59 -0
  938. package/dist/esm/components/editors/sheet-filter.d.ts.map +1 -0
  939. package/dist/esm/components/editors/sheet-filter.js +88 -0
  940. package/dist/esm/components/editors/table-editor.d.ts +12 -0
  941. package/dist/esm/components/editors/table-editor.d.ts.map +1 -0
  942. package/dist/esm/components/editors/table-editor.js +106 -0
  943. package/dist/esm/components/index.d.ts +13 -0
  944. package/dist/esm/components/index.d.ts.map +1 -0
  945. package/dist/esm/components/index.js +12 -0
  946. package/dist/esm/generated-names.d.ts +51 -0
  947. package/dist/esm/generated-names.d.ts.map +1 -0
  948. package/dist/esm/generated-names.js +5 -0
  949. package/dist/esm/helpers/iterative-calculation.d.ts +4 -0
  950. package/dist/esm/helpers/iterative-calculation.d.ts.map +1 -0
  951. package/dist/esm/helpers/iterative-calculation.js +44 -0
  952. package/dist/esm/helpers/sheet-title.d.ts +5 -0
  953. package/dist/esm/helpers/sheet-title.d.ts.map +1 -0
  954. package/dist/esm/helpers/sheet-title.js +13 -0
  955. package/dist/esm/helpers.d.ts +45 -0
  956. package/dist/esm/helpers.d.ts.map +1 -0
  957. package/dist/esm/helpers.js +143 -0
  958. package/dist/esm/hooks/use-async-datasource.d.ts +57 -0
  959. package/dist/esm/hooks/use-async-datasource.d.ts.map +1 -0
  960. package/dist/esm/hooks/use-async-datasource.js +276 -0
  961. package/dist/esm/hooks/use-calculation-initialize.d.ts +61 -0
  962. package/dist/esm/hooks/use-calculation-initialize.d.ts.map +1 -0
  963. package/dist/esm/hooks/use-calculation-initialize.js +603 -0
  964. package/dist/esm/hooks/use-calculation-process-array.d.ts +20 -0
  965. package/dist/esm/hooks/use-calculation-process-array.d.ts.map +1 -0
  966. package/dist/esm/hooks/use-calculation-process-array.js +279 -0
  967. package/dist/esm/hooks/use-calculation-queue.d.ts +10 -0
  968. package/dist/esm/hooks/use-calculation-queue.d.ts.map +1 -0
  969. package/dist/esm/hooks/use-calculation-queue.js +13 -0
  970. package/dist/esm/hooks/use-calculation-worker.d.ts +37 -0
  971. package/dist/esm/hooks/use-calculation-worker.d.ts.map +1 -0
  972. package/dist/esm/hooks/use-calculation-worker.js +1688 -0
  973. package/dist/esm/hooks/use-calculation.d.ts +173 -0
  974. package/dist/esm/hooks/use-calculation.d.ts.map +1 -0
  975. package/dist/esm/hooks/use-calculation.js +2069 -0
  976. package/dist/esm/hooks/use-can-edit-cellrange.d.ts +31 -0
  977. package/dist/esm/hooks/use-can-edit-cellrange.d.ts.map +1 -0
  978. package/dist/esm/hooks/use-can-edit-cellrange.js +72 -0
  979. package/dist/esm/hooks/use-cellxfs-registry.d.ts +6 -0
  980. package/dist/esm/hooks/use-cellxfs-registry.d.ts.map +1 -0
  981. package/dist/esm/hooks/use-cellxfs-registry.js +22 -0
  982. package/dist/esm/hooks/use-citations.d.ts +19 -0
  983. package/dist/esm/hooks/use-citations.d.ts.map +1 -0
  984. package/dist/esm/hooks/use-citations.js +61 -0
  985. package/dist/esm/hooks/use-comments.d.ts +14 -0
  986. package/dist/esm/hooks/use-comments.d.ts.map +1 -0
  987. package/dist/esm/hooks/use-comments.js +45 -0
  988. package/dist/esm/hooks/use-conditional-formatting-rules.d.ts +22 -0
  989. package/dist/esm/hooks/use-conditional-formatting-rules.d.ts.map +1 -0
  990. package/dist/esm/hooks/use-conditional-formatting-rules.js +81 -0
  991. package/dist/esm/hooks/use-data-validation-rules.d.ts +54 -0
  992. package/dist/esm/hooks/use-data-validation-rules.d.ts.map +1 -0
  993. package/dist/esm/hooks/use-data-validation-rules.js +135 -0
  994. package/dist/esm/hooks/use-deferred-calculation-flush.d.ts +14 -0
  995. package/dist/esm/hooks/use-deferred-calculation-flush.d.ts.map +1 -0
  996. package/dist/esm/hooks/use-deferred-calculation-flush.js +78 -0
  997. package/dist/esm/hooks/use-idle-scheduler.d.ts +5 -0
  998. package/dist/esm/hooks/use-idle-scheduler.d.ts.map +1 -0
  999. package/dist/esm/hooks/use-idle-scheduler.js +46 -0
  1000. package/dist/esm/hooks/use-indent.d.ts +23 -0
  1001. package/dist/esm/hooks/use-indent.d.ts.map +1 -0
  1002. package/dist/esm/hooks/use-indent.js +97 -0
  1003. package/dist/esm/hooks/use-named-range.d.ts +7 -0
  1004. package/dist/esm/hooks/use-named-range.d.ts.map +1 -0
  1005. package/dist/esm/hooks/use-named-range.js +69 -0
  1006. package/dist/esm/hooks/use-on-adjust-row-height.d.ts +11 -0
  1007. package/dist/esm/hooks/use-on-adjust-row-height.d.ts.map +1 -0
  1008. package/dist/esm/hooks/use-on-adjust-row-height.js +63 -0
  1009. package/dist/esm/hooks/use-on-autoresize.d.ts +17 -0
  1010. package/dist/esm/hooks/use-on-autoresize.d.ts.map +1 -0
  1011. package/dist/esm/hooks/use-on-autoresize.js +38 -0
  1012. package/dist/esm/hooks/use-on-banded-ranges.d.ts +15 -0
  1013. package/dist/esm/hooks/use-on-banded-ranges.d.ts.map +1 -0
  1014. package/dist/esm/hooks/use-on-banded-ranges.js +36 -0
  1015. package/dist/esm/hooks/use-on-calculation-begin.d.ts +14 -0
  1016. package/dist/esm/hooks/use-on-calculation-begin.d.ts.map +1 -0
  1017. package/dist/esm/hooks/use-on-calculation-begin.js +22 -0
  1018. package/dist/esm/hooks/use-on-calculation-success.d.ts +22 -0
  1019. package/dist/esm/hooks/use-on-calculation-success.d.ts.map +1 -0
  1020. package/dist/esm/hooks/use-on-calculation-success.js +167 -0
  1021. package/dist/esm/hooks/use-on-change-batch-stream.d.ts +7 -0
  1022. package/dist/esm/hooks/use-on-change-batch-stream.d.ts.map +1 -0
  1023. package/dist/esm/hooks/use-on-change-batch-stream.js +58 -0
  1024. package/dist/esm/hooks/use-on-change-batch.d.ts +54 -0
  1025. package/dist/esm/hooks/use-on-change-batch.d.ts.map +1 -0
  1026. package/dist/esm/hooks/use-on-change-batch.js +111 -0
  1027. package/dist/esm/hooks/use-on-change-calculated-column.d.ts +23 -0
  1028. package/dist/esm/hooks/use-on-change-calculated-column.d.ts.map +1 -0
  1029. package/dist/esm/hooks/use-on-change-calculated-column.js +29 -0
  1030. package/dist/esm/hooks/use-on-change-decimals.d.ts +22 -0
  1031. package/dist/esm/hooks/use-on-change-decimals.d.ts.map +1 -0
  1032. package/dist/esm/hooks/use-on-change-decimals.js +45 -0
  1033. package/dist/esm/hooks/use-on-change-formatting.d.ts +44 -0
  1034. package/dist/esm/hooks/use-on-change-formatting.d.ts.map +1 -0
  1035. package/dist/esm/hooks/use-on-change-formatting.js +158 -0
  1036. package/dist/esm/hooks/use-on-change-sheet-tabcolor.d.ts +11 -0
  1037. package/dist/esm/hooks/use-on-change-sheet-tabcolor.d.ts.map +1 -0
  1038. package/dist/esm/hooks/use-on-change-sheet-tabcolor.js +26 -0
  1039. package/dist/esm/hooks/use-on-change-table-column.d.ts +25 -0
  1040. package/dist/esm/hooks/use-on-change-table-column.d.ts.map +1 -0
  1041. package/dist/esm/hooks/use-on-change-table-column.js +52 -0
  1042. package/dist/esm/hooks/use-on-change-theme.d.ts +11 -0
  1043. package/dist/esm/hooks/use-on-change-theme.d.ts.map +1 -0
  1044. package/dist/esm/hooks/use-on-change-theme.js +11 -0
  1045. package/dist/esm/hooks/use-on-change.d.ts +61 -0
  1046. package/dist/esm/hooks/use-on-change.d.ts.map +1 -0
  1047. package/dist/esm/hooks/use-on-change.js +281 -0
  1048. package/dist/esm/hooks/use-on-clear-formatting.d.ts +17 -0
  1049. package/dist/esm/hooks/use-on-clear-formatting.d.ts.map +1 -0
  1050. package/dist/esm/hooks/use-on-clear-formatting.js +45 -0
  1051. package/dist/esm/hooks/use-on-collapse-column-group.d.ts +11 -0
  1052. package/dist/esm/hooks/use-on-collapse-column-group.d.ts.map +1 -0
  1053. package/dist/esm/hooks/use-on-collapse-column-group.js +44 -0
  1054. package/dist/esm/hooks/use-on-collapse-row-group.d.ts +18 -0
  1055. package/dist/esm/hooks/use-on-collapse-row-group.d.ts.map +1 -0
  1056. package/dist/esm/hooks/use-on-collapse-row-group.js +54 -0
  1057. package/dist/esm/hooks/use-on-copy.d.ts +49 -0
  1058. package/dist/esm/hooks/use-on-copy.d.ts.map +1 -0
  1059. package/dist/esm/hooks/use-on-copy.js +302 -0
  1060. package/dist/esm/hooks/use-on-create-named-range.d.ts +13 -0
  1061. package/dist/esm/hooks/use-on-create-named-range.d.ts.map +1 -0
  1062. package/dist/esm/hooks/use-on-create-named-range.js +32 -0
  1063. package/dist/esm/hooks/use-on-create-sheet.d.ts +23 -0
  1064. package/dist/esm/hooks/use-on-create-sheet.d.ts.map +1 -0
  1065. package/dist/esm/hooks/use-on-create-sheet.js +64 -0
  1066. package/dist/esm/hooks/use-on-delete-cells-shift-left.d.ts +28 -0
  1067. package/dist/esm/hooks/use-on-delete-cells-shift-left.d.ts.map +1 -0
  1068. package/dist/esm/hooks/use-on-delete-cells-shift-left.js +65 -0
  1069. package/dist/esm/hooks/use-on-delete-cells-shift-up.d.ts +28 -0
  1070. package/dist/esm/hooks/use-on-delete-cells-shift-up.d.ts.map +1 -0
  1071. package/dist/esm/hooks/use-on-delete-cells-shift-up.js +65 -0
  1072. package/dist/esm/hooks/use-on-delete-column.d.ts +38 -0
  1073. package/dist/esm/hooks/use-on-delete-column.d.ts.map +1 -0
  1074. package/dist/esm/hooks/use-on-delete-column.js +86 -0
  1075. package/dist/esm/hooks/use-on-delete-named-range.d.ts +14 -0
  1076. package/dist/esm/hooks/use-on-delete-named-range.d.ts.map +1 -0
  1077. package/dist/esm/hooks/use-on-delete-named-range.js +22 -0
  1078. package/dist/esm/hooks/use-on-delete-row.d.ts +38 -0
  1079. package/dist/esm/hooks/use-on-delete-row.d.ts.map +1 -0
  1080. package/dist/esm/hooks/use-on-delete-row.js +86 -0
  1081. package/dist/esm/hooks/use-on-delete-sheet.d.ts +16 -0
  1082. package/dist/esm/hooks/use-on-delete-sheet.d.ts.map +1 -0
  1083. package/dist/esm/hooks/use-on-delete-sheet.js +36 -0
  1084. package/dist/esm/hooks/use-on-delete-table-row.d.ts +29 -0
  1085. package/dist/esm/hooks/use-on-delete-table-row.d.ts.map +1 -0
  1086. package/dist/esm/hooks/use-on-delete-table-row.js +55 -0
  1087. package/dist/esm/hooks/use-on-delete.d.ts +33 -0
  1088. package/dist/esm/hooks/use-on-delete.d.ts.map +1 -0
  1089. package/dist/esm/hooks/use-on-delete.js +58 -0
  1090. package/dist/esm/hooks/use-on-drag-n-drop.d.ts +55 -0
  1091. package/dist/esm/hooks/use-on-drag-n-drop.d.ts.map +1 -0
  1092. package/dist/esm/hooks/use-on-drag-n-drop.js +160 -0
  1093. package/dist/esm/hooks/use-on-duplicate-sheet.d.ts +29 -0
  1094. package/dist/esm/hooks/use-on-duplicate-sheet.d.ts.map +1 -0
  1095. package/dist/esm/hooks/use-on-duplicate-sheet.js +63 -0
  1096. package/dist/esm/hooks/use-on-embeds.d.ts +19 -0
  1097. package/dist/esm/hooks/use-on-embeds.d.ts.map +1 -0
  1098. package/dist/esm/hooks/use-on-embeds.js +86 -0
  1099. package/dist/esm/hooks/use-on-expand-column-group.d.ts +11 -0
  1100. package/dist/esm/hooks/use-on-expand-column-group.d.ts.map +1 -0
  1101. package/dist/esm/hooks/use-on-expand-column-group.js +42 -0
  1102. package/dist/esm/hooks/use-on-expand-row-group.d.ts +18 -0
  1103. package/dist/esm/hooks/use-on-expand-row-group.d.ts.map +1 -0
  1104. package/dist/esm/hooks/use-on-expand-row-group.js +49 -0
  1105. package/dist/esm/hooks/use-on-fill-range.d.ts +9 -0
  1106. package/dist/esm/hooks/use-on-fill-range.d.ts.map +1 -0
  1107. package/dist/esm/hooks/use-on-fill-range.js +79 -0
  1108. package/dist/esm/hooks/use-on-fill.d.ts +29 -0
  1109. package/dist/esm/hooks/use-on-fill.d.ts.map +1 -0
  1110. package/dist/esm/hooks/use-on-fill.js +66 -0
  1111. package/dist/esm/hooks/use-on-filter-table.d.ts +76 -0
  1112. package/dist/esm/hooks/use-on-filter-table.d.ts.map +1 -0
  1113. package/dist/esm/hooks/use-on-filter-table.js +341 -0
  1114. package/dist/esm/hooks/use-on-find-replace.d.ts +19 -0
  1115. package/dist/esm/hooks/use-on-find-replace.d.ts.map +1 -0
  1116. package/dist/esm/hooks/use-on-find-replace.js +115 -0
  1117. package/dist/esm/hooks/use-on-freeze.d.ts +13 -0
  1118. package/dist/esm/hooks/use-on-freeze.d.ts.map +1 -0
  1119. package/dist/esm/hooks/use-on-freeze.js +55 -0
  1120. package/dist/esm/hooks/use-on-group-columns.d.ts +11 -0
  1121. package/dist/esm/hooks/use-on-group-columns.d.ts.map +1 -0
  1122. package/dist/esm/hooks/use-on-group-columns.js +35 -0
  1123. package/dist/esm/hooks/use-on-group-rows.d.ts +17 -0
  1124. package/dist/esm/hooks/use-on-group-rows.d.ts.map +1 -0
  1125. package/dist/esm/hooks/use-on-group-rows.js +41 -0
  1126. package/dist/esm/hooks/use-on-hide-column.d.ts +23 -0
  1127. package/dist/esm/hooks/use-on-hide-column.d.ts.map +1 -0
  1128. package/dist/esm/hooks/use-on-hide-column.js +54 -0
  1129. package/dist/esm/hooks/use-on-hide-row.d.ts +32 -0
  1130. package/dist/esm/hooks/use-on-hide-row.d.ts.map +1 -0
  1131. package/dist/esm/hooks/use-on-hide-row.js +57 -0
  1132. package/dist/esm/hooks/use-on-hide-show-sheet.d.ts +18 -0
  1133. package/dist/esm/hooks/use-on-hide-show-sheet.d.ts.map +1 -0
  1134. package/dist/esm/hooks/use-on-hide-show-sheet.js +88 -0
  1135. package/dist/esm/hooks/use-on-import-csv-legacy.d.ts +8 -0
  1136. package/dist/esm/hooks/use-on-import-csv-legacy.d.ts.map +1 -0
  1137. package/dist/esm/hooks/use-on-import-csv-legacy.js +148 -0
  1138. package/dist/esm/hooks/use-on-import-csv.d.ts +28 -0
  1139. package/dist/esm/hooks/use-on-import-csv.d.ts.map +1 -0
  1140. package/dist/esm/hooks/use-on-import-csv.js +267 -0
  1141. package/dist/esm/hooks/use-on-import-excel.d.ts +67 -0
  1142. package/dist/esm/hooks/use-on-import-excel.d.ts.map +1 -0
  1143. package/dist/esm/hooks/use-on-import-excel.js +595 -0
  1144. package/dist/esm/hooks/use-on-insert-autosum.d.ts +9 -0
  1145. package/dist/esm/hooks/use-on-insert-autosum.d.ts.map +1 -0
  1146. package/dist/esm/hooks/use-on-insert-autosum.js +91 -0
  1147. package/dist/esm/hooks/use-on-insert-cells-shift-down.d.ts +28 -0
  1148. package/dist/esm/hooks/use-on-insert-cells-shift-down.d.ts.map +1 -0
  1149. package/dist/esm/hooks/use-on-insert-cells-shift-down.js +65 -0
  1150. package/dist/esm/hooks/use-on-insert-cells-shift-right.d.ts +28 -0
  1151. package/dist/esm/hooks/use-on-insert-cells-shift-right.d.ts.map +1 -0
  1152. package/dist/esm/hooks/use-on-insert-cells-shift-right.js +65 -0
  1153. package/dist/esm/hooks/use-on-insert-checkbox.d.ts +17 -0
  1154. package/dist/esm/hooks/use-on-insert-checkbox.d.ts.map +1 -0
  1155. package/dist/esm/hooks/use-on-insert-checkbox.js +73 -0
  1156. package/dist/esm/hooks/use-on-insert-column.d.ts +40 -0
  1157. package/dist/esm/hooks/use-on-insert-column.d.ts.map +1 -0
  1158. package/dist/esm/hooks/use-on-insert-column.js +91 -0
  1159. package/dist/esm/hooks/use-on-insert-date-time.d.ts +4 -0
  1160. package/dist/esm/hooks/use-on-insert-date-time.d.ts.map +1 -0
  1161. package/dist/esm/hooks/use-on-insert-date-time.js +11 -0
  1162. package/dist/esm/hooks/use-on-insert-date.d.ts +4 -0
  1163. package/dist/esm/hooks/use-on-insert-date.d.ts.map +1 -0
  1164. package/dist/esm/hooks/use-on-insert-date.js +12 -0
  1165. package/dist/esm/hooks/use-on-insert-image.d.ts +24 -0
  1166. package/dist/esm/hooks/use-on-insert-image.d.ts.map +1 -0
  1167. package/dist/esm/hooks/use-on-insert-image.js +131 -0
  1168. package/dist/esm/hooks/use-on-insert-link.d.ts +25 -0
  1169. package/dist/esm/hooks/use-on-insert-link.d.ts.map +1 -0
  1170. package/dist/esm/hooks/use-on-insert-link.js +193 -0
  1171. package/dist/esm/hooks/use-on-insert-note.d.ts +4 -0
  1172. package/dist/esm/hooks/use-on-insert-note.d.ts.map +1 -0
  1173. package/dist/esm/hooks/use-on-insert-note.js +14 -0
  1174. package/dist/esm/hooks/use-on-insert-row.d.ts +38 -0
  1175. package/dist/esm/hooks/use-on-insert-row.d.ts.map +1 -0
  1176. package/dist/esm/hooks/use-on-insert-row.js +104 -0
  1177. package/dist/esm/hooks/use-on-insert-table-row.d.ts +31 -0
  1178. package/dist/esm/hooks/use-on-insert-table-row.d.ts.map +1 -0
  1179. package/dist/esm/hooks/use-on-insert-table-row.js +59 -0
  1180. package/dist/esm/hooks/use-on-insert-time.d.ts +4 -0
  1181. package/dist/esm/hooks/use-on-insert-time.d.ts.map +1 -0
  1182. package/dist/esm/hooks/use-on-insert-time.js +11 -0
  1183. package/dist/esm/hooks/use-on-locale-change.d.ts +35 -0
  1184. package/dist/esm/hooks/use-on-locale-change.d.ts.map +1 -0
  1185. package/dist/esm/hooks/use-on-locale-change.js +314 -0
  1186. package/dist/esm/hooks/use-on-merge-unmerge-cells.d.ts +28 -0
  1187. package/dist/esm/hooks/use-on-merge-unmerge-cells.d.ts.map +1 -0
  1188. package/dist/esm/hooks/use-on-merge-unmerge-cells.js +310 -0
  1189. package/dist/esm/hooks/use-on-move-columns.d.ts +28 -0
  1190. package/dist/esm/hooks/use-on-move-columns.d.ts.map +1 -0
  1191. package/dist/esm/hooks/use-on-move-columns.js +295 -0
  1192. package/dist/esm/hooks/use-on-move-rows.d.ts +30 -0
  1193. package/dist/esm/hooks/use-on-move-rows.d.ts.map +1 -0
  1194. package/dist/esm/hooks/use-on-move-rows.js +264 -0
  1195. package/dist/esm/hooks/use-on-move-selection.d.ts +35 -0
  1196. package/dist/esm/hooks/use-on-move-selection.d.ts.map +1 -0
  1197. package/dist/esm/hooks/use-on-move-selection.js +383 -0
  1198. package/dist/esm/hooks/use-on-move-sheet.d.ts +12 -0
  1199. package/dist/esm/hooks/use-on-move-sheet.d.ts.map +1 -0
  1200. package/dist/esm/hooks/use-on-move-sheet.js +65 -0
  1201. package/dist/esm/hooks/use-on-move-table-columns.d.ts +21 -0
  1202. package/dist/esm/hooks/use-on-move-table-columns.d.ts.map +1 -0
  1203. package/dist/esm/hooks/use-on-move-table-columns.js +235 -0
  1204. package/dist/esm/hooks/use-on-paste.d.ts +79 -0
  1205. package/dist/esm/hooks/use-on-paste.d.ts.map +1 -0
  1206. package/dist/esm/hooks/use-on-paste.js +868 -0
  1207. package/dist/esm/hooks/use-on-protect-range.d.ts +20 -0
  1208. package/dist/esm/hooks/use-on-protect-range.d.ts.map +1 -0
  1209. package/dist/esm/hooks/use-on-protect-range.js +67 -0
  1210. package/dist/esm/hooks/use-on-protect-sheet.d.ts +19 -0
  1211. package/dist/esm/hooks/use-on-protect-sheet.d.ts.map +1 -0
  1212. package/dist/esm/hooks/use-on-protect-sheet.js +61 -0
  1213. package/dist/esm/hooks/use-on-remove-duplicates.d.ts +21 -0
  1214. package/dist/esm/hooks/use-on-remove-duplicates.d.ts.map +1 -0
  1215. package/dist/esm/hooks/use-on-remove-duplicates.js +39 -0
  1216. package/dist/esm/hooks/use-on-rename-sheet.d.ts +21 -0
  1217. package/dist/esm/hooks/use-on-rename-sheet.d.ts.map +1 -0
  1218. package/dist/esm/hooks/use-on-rename-sheet.js +78 -0
  1219. package/dist/esm/hooks/use-on-request-calculate-wrapper.d.ts +30 -0
  1220. package/dist/esm/hooks/use-on-request-calculate-wrapper.d.ts.map +1 -0
  1221. package/dist/esm/hooks/use-on-request-calculate-wrapper.js +88 -0
  1222. package/dist/esm/hooks/use-on-request-conditional-format.d.ts +2 -0
  1223. package/dist/esm/hooks/use-on-request-conditional-format.d.ts.map +1 -0
  1224. package/dist/esm/hooks/use-on-request-conditional-format.js +8 -0
  1225. package/dist/esm/hooks/use-on-request-data-validation.d.ts +7 -0
  1226. package/dist/esm/hooks/use-on-request-data-validation.d.ts.map +1 -0
  1227. package/dist/esm/hooks/use-on-request-data-validation.js +21 -0
  1228. package/dist/esm/hooks/use-on-request-define-named-range.d.ts +8 -0
  1229. package/dist/esm/hooks/use-on-request-define-named-range.d.ts.map +1 -0
  1230. package/dist/esm/hooks/use-on-request-define-named-range.js +25 -0
  1231. package/dist/esm/hooks/use-on-request-delete-sheet.d.ts +2 -0
  1232. package/dist/esm/hooks/use-on-request-delete-sheet.d.ts.map +1 -0
  1233. package/dist/esm/hooks/use-on-request-delete-sheet.js +11 -0
  1234. package/dist/esm/hooks/use-on-request-edit-table.d.ts +3 -0
  1235. package/dist/esm/hooks/use-on-request-edit-table.d.ts.map +1 -0
  1236. package/dist/esm/hooks/use-on-request-edit-table.js +11 -0
  1237. package/dist/esm/hooks/use-on-request-format-cells.d.ts +2 -0
  1238. package/dist/esm/hooks/use-on-request-format-cells.d.ts.map +1 -0
  1239. package/dist/esm/hooks/use-on-request-format-cells.js +8 -0
  1240. package/dist/esm/hooks/use-on-request-insert-image.d.ts +3 -0
  1241. package/dist/esm/hooks/use-on-request-insert-image.d.ts.map +1 -0
  1242. package/dist/esm/hooks/use-on-request-insert-image.js +12 -0
  1243. package/dist/esm/hooks/use-on-request-insert-link.d.ts +5 -0
  1244. package/dist/esm/hooks/use-on-request-insert-link.d.ts.map +1 -0
  1245. package/dist/esm/hooks/use-on-request-insert-link.js +9 -0
  1246. package/dist/esm/hooks/use-on-request-resize.d.ts +3 -0
  1247. package/dist/esm/hooks/use-on-request-resize.d.ts.map +1 -0
  1248. package/dist/esm/hooks/use-on-request-resize.js +13 -0
  1249. package/dist/esm/hooks/use-on-request-update-named-range.d.ts +3 -0
  1250. package/dist/esm/hooks/use-on-request-update-named-range.d.ts.map +1 -0
  1251. package/dist/esm/hooks/use-on-request-update-named-range.js +11 -0
  1252. package/dist/esm/hooks/use-on-resize-table.d.ts +33 -0
  1253. package/dist/esm/hooks/use-on-resize-table.d.ts.map +1 -0
  1254. package/dist/esm/hooks/use-on-resize-table.js +212 -0
  1255. package/dist/esm/hooks/use-on-resize.d.ts +19 -0
  1256. package/dist/esm/hooks/use-on-resize.d.ts.map +1 -0
  1257. package/dist/esm/hooks/use-on-resize.js +54 -0
  1258. package/dist/esm/hooks/use-on-set-outline-depth.d.ts +17 -0
  1259. package/dist/esm/hooks/use-on-set-outline-depth.d.ts.map +1 -0
  1260. package/dist/esm/hooks/use-on-set-outline-depth.js +93 -0
  1261. package/dist/esm/hooks/use-on-show-column.d.ts +16 -0
  1262. package/dist/esm/hooks/use-on-show-column.d.ts.map +1 -0
  1263. package/dist/esm/hooks/use-on-show-column.js +82 -0
  1264. package/dist/esm/hooks/use-on-show-row.d.ts +22 -0
  1265. package/dist/esm/hooks/use-on-show-row.d.ts.map +1 -0
  1266. package/dist/esm/hooks/use-on-show-row.js +85 -0
  1267. package/dist/esm/hooks/use-on-sort-column.d.ts +53 -0
  1268. package/dist/esm/hooks/use-on-sort-column.d.ts.map +1 -0
  1269. package/dist/esm/hooks/use-on-sort-column.js +268 -0
  1270. package/dist/esm/hooks/use-on-sort-range.d.ts +42 -0
  1271. package/dist/esm/hooks/use-on-sort-range.d.ts.map +1 -0
  1272. package/dist/esm/hooks/use-on-sort-range.js +247 -0
  1273. package/dist/esm/hooks/use-on-sort-table.d.ts +59 -0
  1274. package/dist/esm/hooks/use-on-sort-table.d.ts.map +1 -0
  1275. package/dist/esm/hooks/use-on-sort-table.js +332 -0
  1276. package/dist/esm/hooks/use-on-table.d.ts +49 -0
  1277. package/dist/esm/hooks/use-on-table.d.ts.map +1 -0
  1278. package/dist/esm/hooks/use-on-table.js +384 -0
  1279. package/dist/esm/hooks/use-on-trace-dependents-precedents.d.ts +14 -0
  1280. package/dist/esm/hooks/use-on-trace-dependents-precedents.d.ts.map +1 -0
  1281. package/dist/esm/hooks/use-on-trace-dependents-precedents.js +144 -0
  1282. package/dist/esm/hooks/use-on-ungroup-columns.d.ts +11 -0
  1283. package/dist/esm/hooks/use-on-ungroup-columns.d.ts.map +1 -0
  1284. package/dist/esm/hooks/use-on-ungroup-columns.js +43 -0
  1285. package/dist/esm/hooks/use-on-ungroup-rows.d.ts +17 -0
  1286. package/dist/esm/hooks/use-on-ungroup-rows.d.ts.map +1 -0
  1287. package/dist/esm/hooks/use-on-ungroup-rows.js +49 -0
  1288. package/dist/esm/hooks/use-on-update-named-range.d.ts +19 -0
  1289. package/dist/esm/hooks/use-on-update-named-range.d.ts.map +1 -0
  1290. package/dist/esm/hooks/use-on-update-named-range.js +108 -0
  1291. package/dist/esm/hooks/use-on-update-note.d.ts +13 -0
  1292. package/dist/esm/hooks/use-on-update-note.d.ts.map +1 -0
  1293. package/dist/esm/hooks/use-on-update-note.js +20 -0
  1294. package/dist/esm/hooks/use-on-update-sheet.d.ts +10 -0
  1295. package/dist/esm/hooks/use-on-update-sheet.d.ts.map +1 -0
  1296. package/dist/esm/hooks/use-on-update-sheet.js +11 -0
  1297. package/dist/esm/hooks/use-paint-format.d.ts +17 -0
  1298. package/dist/esm/hooks/use-paint-format.d.ts.map +1 -0
  1299. package/dist/esm/hooks/use-paint-format.js +110 -0
  1300. package/dist/esm/hooks/use-search.d.ts +81 -0
  1301. package/dist/esm/hooks/use-search.d.ts.map +1 -0
  1302. package/dist/esm/hooks/use-search.js +251 -0
  1303. package/dist/esm/hooks/use-select-next-prev-sheet.d.ts +11 -0
  1304. package/dist/esm/hooks/use-select-next-prev-sheet.d.ts.map +1 -0
  1305. package/dist/esm/hooks/use-select-next-prev-sheet.js +21 -0
  1306. package/dist/esm/hooks/use-sheet-observer.d.ts +20 -0
  1307. package/dist/esm/hooks/use-sheet-observer.d.ts.map +1 -0
  1308. package/dist/esm/hooks/use-sheet-observer.js +120 -0
  1309. package/dist/esm/hooks/use-sheet-properties.d.ts +105 -0
  1310. package/dist/esm/hooks/use-sheet-properties.d.ts.map +1 -0
  1311. package/dist/esm/hooks/use-sheet-properties.js +895 -0
  1312. package/dist/esm/hooks/use-sheet-state.d.ts +17 -0
  1313. package/dist/esm/hooks/use-sheet-state.d.ts.map +1 -0
  1314. package/dist/esm/hooks/use-sheet-state.js +102 -0
  1315. package/dist/esm/hooks/use-sheetdata-subscriber.d.ts +10 -0
  1316. package/dist/esm/hooks/use-sheetdata-subscriber.d.ts.map +1 -0
  1317. package/dist/esm/hooks/use-sheetdata-subscriber.js +14 -0
  1318. package/dist/esm/hooks/use-slicers.d.ts +19 -0
  1319. package/dist/esm/hooks/use-slicers.d.ts.map +1 -0
  1320. package/dist/esm/hooks/use-slicers.js +83 -0
  1321. package/dist/esm/hooks/use-split-text-to-columns.d.ts +19 -0
  1322. package/dist/esm/hooks/use-split-text-to-columns.d.ts.map +1 -0
  1323. package/dist/esm/hooks/use-split-text-to-columns.js +30 -0
  1324. package/dist/esm/hooks/use-spreadsheet-state.d.ts +627 -0
  1325. package/dist/esm/hooks/use-spreadsheet-state.d.ts.map +1 -0
  1326. package/dist/esm/hooks/use-spreadsheet-state.js +2010 -0
  1327. package/dist/esm/hooks/use-ss-registry.d.ts +6 -0
  1328. package/dist/esm/hooks/use-ss-registry.d.ts.map +1 -0
  1329. package/dist/esm/hooks/use-ss-registry.js +17 -0
  1330. package/dist/esm/hooks/use-structured-reference.d.ts +8 -0
  1331. package/dist/esm/hooks/use-structured-reference.d.ts.map +1 -0
  1332. package/dist/esm/hooks/use-structured-reference.js +129 -0
  1333. package/dist/esm/hooks/use-undo-redo-actions.d.ts +40 -0
  1334. package/dist/esm/hooks/use-undo-redo-actions.d.ts.map +1 -0
  1335. package/dist/esm/hooks/use-undo-redo-actions.js +166 -0
  1336. package/dist/esm/hooks/use-undo-redo.d.ts +69 -0
  1337. package/dist/esm/hooks/use-undo-redo.d.ts.map +1 -0
  1338. package/dist/esm/hooks/use-undo-redo.js +113 -0
  1339. package/dist/esm/hooks/utils/frozen-sort.d.ts +9 -0
  1340. package/dist/esm/hooks/utils/frozen-sort.d.ts.map +1 -0
  1341. package/dist/esm/hooks/utils/frozen-sort.js +25 -0
  1342. package/dist/esm/hooks/utils/sort-rows.d.ts +32 -0
  1343. package/dist/esm/hooks/utils/sort-rows.d.ts.map +1 -0
  1344. package/dist/esm/hooks/utils/sort-rows.js +102 -0
  1345. package/dist/esm/index.d.ts +38 -0
  1346. package/dist/esm/index.d.ts.map +1 -0
  1347. package/dist/esm/index.js +39 -0
  1348. package/dist/esm/interface/apply-fill.d.ts +6 -0
  1349. package/dist/esm/interface/apply-fill.d.ts.map +1 -0
  1350. package/dist/esm/interface/apply-fill.js +195 -0
  1351. package/dist/esm/interface/auto-resize.d.ts +4 -0
  1352. package/dist/esm/interface/auto-resize.d.ts.map +1 -0
  1353. package/dist/esm/interface/auto-resize.js +50 -0
  1354. package/dist/esm/interface/calculation-interface.d.ts +67 -0
  1355. package/dist/esm/interface/calculation-interface.d.ts.map +1 -0
  1356. package/dist/esm/interface/calculation-interface.js +339 -0
  1357. package/dist/esm/interface/change-batch-stream.d.ts +25 -0
  1358. package/dist/esm/interface/change-batch-stream.d.ts.map +1 -0
  1359. package/dist/esm/interface/change-batch-stream.js +294 -0
  1360. package/dist/esm/interface/change-batch.d.ts +39 -0
  1361. package/dist/esm/interface/change-batch.d.ts.map +1 -0
  1362. package/dist/esm/interface/change-batch.js +282 -0
  1363. package/dist/esm/interface/change-border.d.ts +5 -0
  1364. package/dist/esm/interface/change-border.d.ts.map +1 -0
  1365. package/dist/esm/interface/change-border.js +116 -0
  1366. package/dist/esm/interface/change-calculated-column.d.ts +5 -0
  1367. package/dist/esm/interface/change-calculated-column.d.ts.map +1 -0
  1368. package/dist/esm/interface/change-calculated-column.js +120 -0
  1369. package/dist/esm/interface/change-decimals.d.ts +7 -0
  1370. package/dist/esm/interface/change-decimals.d.ts.map +1 -0
  1371. package/dist/esm/interface/change-decimals.js +58 -0
  1372. package/dist/esm/interface/change-formatting.d.ts +4 -0
  1373. package/dist/esm/interface/change-formatting.d.ts.map +1 -0
  1374. package/dist/esm/interface/change-formatting.js +209 -0
  1375. package/dist/esm/interface/change-sheet-tabcolor.d.ts +4 -0
  1376. package/dist/esm/interface/change-sheet-tabcolor.d.ts.map +1 -0
  1377. package/dist/esm/interface/change-sheet-tabcolor.js +19 -0
  1378. package/dist/esm/interface/change-table-column.d.ts +49 -0
  1379. package/dist/esm/interface/change-table-column.d.ts.map +1 -0
  1380. package/dist/esm/interface/change-table-column.js +247 -0
  1381. package/dist/esm/interface/change-theme.d.ts +4 -0
  1382. package/dist/esm/interface/change-theme.d.ts.map +1 -0
  1383. package/dist/esm/interface/change-theme.js +21 -0
  1384. package/dist/esm/interface/chart-extensions.d.ts +32 -0
  1385. package/dist/esm/interface/chart-extensions.d.ts.map +1 -0
  1386. package/dist/esm/interface/chart-extensions.js +71 -0
  1387. package/dist/esm/interface/citations.d.ts +33 -0
  1388. package/dist/esm/interface/citations.d.ts.map +1 -0
  1389. package/dist/esm/interface/citations.js +123 -0
  1390. package/dist/esm/interface/clear-formatting.d.ts +5 -0
  1391. package/dist/esm/interface/clear-formatting.d.ts.map +1 -0
  1392. package/dist/esm/interface/clear-formatting.js +48 -0
  1393. package/dist/esm/interface/conditional-formatting-rules.d.ts +7 -0
  1394. package/dist/esm/interface/conditional-formatting-rules.d.ts.map +1 -0
  1395. package/dist/esm/interface/conditional-formatting-rules.js +123 -0
  1396. package/dist/esm/interface/create-table.d.ts +5 -0
  1397. package/dist/esm/interface/create-table.d.ts.map +1 -0
  1398. package/dist/esm/interface/create-table.js +105 -0
  1399. package/dist/esm/interface/data-validation-rules.d.ts +25 -0
  1400. package/dist/esm/interface/data-validation-rules.d.ts.map +1 -0
  1401. package/dist/esm/interface/data-validation-rules.js +310 -0
  1402. package/dist/esm/interface/data-validation-utils.d.ts +12 -0
  1403. package/dist/esm/interface/data-validation-utils.d.ts.map +1 -0
  1404. package/dist/esm/interface/data-validation-utils.js +79 -0
  1405. package/dist/esm/interface/delete-cells-shift-left.d.ts +5 -0
  1406. package/dist/esm/interface/delete-cells-shift-left.d.ts.map +1 -0
  1407. package/dist/esm/interface/delete-cells-shift-left.js +146 -0
  1408. package/dist/esm/interface/delete-cells-shift-up.d.ts +5 -0
  1409. package/dist/esm/interface/delete-cells-shift-up.d.ts.map +1 -0
  1410. package/dist/esm/interface/delete-cells-shift-up.js +138 -0
  1411. package/dist/esm/interface/delete-cells.d.ts +6 -0
  1412. package/dist/esm/interface/delete-cells.d.ts.map +1 -0
  1413. package/dist/esm/interface/delete-cells.js +184 -0
  1414. package/dist/esm/interface/delete-column.d.ts +4 -0
  1415. package/dist/esm/interface/delete-column.d.ts.map +1 -0
  1416. package/dist/esm/interface/delete-column.js +254 -0
  1417. package/dist/esm/interface/delete-row.d.ts +4 -0
  1418. package/dist/esm/interface/delete-row.d.ts.map +1 -0
  1419. package/dist/esm/interface/delete-row.js +226 -0
  1420. package/dist/esm/interface/delete-sheet.d.ts +4 -0
  1421. package/dist/esm/interface/delete-sheet.d.ts.map +1 -0
  1422. package/dist/esm/interface/delete-sheet.js +78 -0
  1423. package/dist/esm/interface/delete-table-column.d.ts +4 -0
  1424. package/dist/esm/interface/delete-table-column.d.ts.map +1 -0
  1425. package/dist/esm/interface/delete-table-column.js +274 -0
  1426. package/dist/esm/interface/delete-table-row.d.ts +4 -0
  1427. package/dist/esm/interface/delete-table-row.d.ts.map +1 -0
  1428. package/dist/esm/interface/delete-table-row.js +278 -0
  1429. package/dist/esm/interface/duplicate-sheet.d.ts +4 -0
  1430. package/dist/esm/interface/duplicate-sheet.d.ts.map +1 -0
  1431. package/dist/esm/interface/duplicate-sheet.js +206 -0
  1432. package/dist/esm/interface/embeds.d.ts +9 -0
  1433. package/dist/esm/interface/embeds.d.ts.map +1 -0
  1434. package/dist/esm/interface/embeds.js +115 -0
  1435. package/dist/esm/interface/freeze.d.ts +5 -0
  1436. package/dist/esm/interface/freeze.d.ts.map +1 -0
  1437. package/dist/esm/interface/freeze.js +109 -0
  1438. package/dist/esm/interface/helpers.d.ts +6 -0
  1439. package/dist/esm/interface/helpers.d.ts.map +1 -0
  1440. package/dist/esm/interface/helpers.js +32 -0
  1441. package/dist/esm/interface/hide-column.d.ts +4 -0
  1442. package/dist/esm/interface/hide-column.d.ts.map +1 -0
  1443. package/dist/esm/interface/hide-column.js +59 -0
  1444. package/dist/esm/interface/hide-row.d.ts +4 -0
  1445. package/dist/esm/interface/hide-row.d.ts.map +1 -0
  1446. package/dist/esm/interface/hide-row.js +54 -0
  1447. package/dist/esm/interface/indent.d.ts +7 -0
  1448. package/dist/esm/interface/indent.d.ts.map +1 -0
  1449. package/dist/esm/interface/indent.js +73 -0
  1450. package/dist/esm/interface/insert-cells-shift-down.d.ts +5 -0
  1451. package/dist/esm/interface/insert-cells-shift-down.d.ts.map +1 -0
  1452. package/dist/esm/interface/insert-cells-shift-down.js +143 -0
  1453. package/dist/esm/interface/insert-cells-shift-right.d.ts +5 -0
  1454. package/dist/esm/interface/insert-cells-shift-right.d.ts.map +1 -0
  1455. package/dist/esm/interface/insert-cells-shift-right.js +134 -0
  1456. package/dist/esm/interface/insert-column.d.ts +7 -0
  1457. package/dist/esm/interface/insert-column.d.ts.map +1 -0
  1458. package/dist/esm/interface/insert-column.js +481 -0
  1459. package/dist/esm/interface/insert-note.d.ts +5 -0
  1460. package/dist/esm/interface/insert-note.d.ts.map +1 -0
  1461. package/dist/esm/interface/insert-note.js +23 -0
  1462. package/dist/esm/interface/insert-row.d.ts +4 -0
  1463. package/dist/esm/interface/insert-row.d.ts.map +1 -0
  1464. package/dist/esm/interface/insert-row.js +158 -0
  1465. package/dist/esm/interface/insert-table-row.d.ts +4 -0
  1466. package/dist/esm/interface/insert-table-row.d.ts.map +1 -0
  1467. package/dist/esm/interface/insert-table-row.js +314 -0
  1468. package/dist/esm/interface/interface-cli.d.ts +3 -0
  1469. package/dist/esm/interface/interface-cli.d.ts.map +1 -0
  1470. package/dist/esm/interface/interface-cli.js +62 -0
  1471. package/dist/esm/interface/named-range-operations.d.ts +19 -0
  1472. package/dist/esm/interface/named-range-operations.d.ts.map +1 -0
  1473. package/dist/esm/interface/named-range-operations.js +71 -0
  1474. package/dist/esm/interface/new-sheet.d.ts +4 -0
  1475. package/dist/esm/interface/new-sheet.d.ts.map +1 -0
  1476. package/dist/esm/interface/new-sheet.js +102 -0
  1477. package/dist/esm/interface/pivot-extensions.d.ts +27 -0
  1478. package/dist/esm/interface/pivot-extensions.d.ts.map +1 -0
  1479. package/dist/esm/interface/pivot-extensions.js +60 -0
  1480. package/dist/esm/interface/remove-duplicates.d.ts +11 -0
  1481. package/dist/esm/interface/remove-duplicates.d.ts.map +1 -0
  1482. package/dist/esm/interface/remove-duplicates.js +107 -0
  1483. package/dist/esm/interface/remove-table.d.ts +4 -0
  1484. package/dist/esm/interface/remove-table.d.ts.map +1 -0
  1485. package/dist/esm/interface/remove-table.js +50 -0
  1486. package/dist/esm/interface/resize-utils.d.ts +18 -0
  1487. package/dist/esm/interface/resize-utils.d.ts.map +1 -0
  1488. package/dist/esm/interface/resize-utils.js +34 -0
  1489. package/dist/esm/interface/resize.d.ts +5 -0
  1490. package/dist/esm/interface/resize.d.ts.map +1 -0
  1491. package/dist/esm/interface/resize.js +43 -0
  1492. package/dist/esm/interface/slicers.d.ts +9 -0
  1493. package/dist/esm/interface/slicers.d.ts.map +1 -0
  1494. package/dist/esm/interface/slicers.js +107 -0
  1495. package/dist/esm/interface/split-text.d.ts +5 -0
  1496. package/dist/esm/interface/split-text.d.ts.map +1 -0
  1497. package/dist/esm/interface/split-text.js +94 -0
  1498. package/dist/esm/interface/spreadsheet-interface.d.ts +642 -0
  1499. package/dist/esm/interface/spreadsheet-interface.d.ts.map +1 -0
  1500. package/dist/esm/interface/spreadsheet-interface.js +2442 -0
  1501. package/dist/esm/interface/table-totalrow.d.ts +20 -0
  1502. package/dist/esm/interface/table-totalrow.d.ts.map +1 -0
  1503. package/dist/esm/interface/table-totalrow.js +155 -0
  1504. package/dist/esm/interface/table-utils.d.ts +21 -0
  1505. package/dist/esm/interface/table-utils.d.ts.map +1 -0
  1506. package/dist/esm/interface/table-utils.js +38 -0
  1507. package/dist/esm/interface/update-sheet.d.ts +16 -0
  1508. package/dist/esm/interface/update-sheet.d.ts.map +1 -0
  1509. package/dist/esm/interface/update-sheet.js +64 -0
  1510. package/dist/esm/interface/update-table.d.ts +4 -0
  1511. package/dist/esm/interface/update-table.d.ts.map +1 -0
  1512. package/dist/esm/interface/update-table.js +111 -0
  1513. package/dist/esm/server-utils.d.ts +8 -0
  1514. package/dist/esm/server-utils.d.ts.map +1 -0
  1515. package/dist/esm/server-utils.js +3 -0
  1516. package/dist/esm/server.browser.d.ts +9 -0
  1517. package/dist/esm/server.browser.d.ts.map +1 -0
  1518. package/dist/esm/server.browser.js +5 -0
  1519. package/dist/esm/server.d.ts +9 -0
  1520. package/dist/esm/server.d.ts.map +1 -0
  1521. package/dist/esm/server.js +5 -0
  1522. package/dist/esm/shared-string-registry.d.ts +35 -0
  1523. package/dist/esm/shared-string-registry.d.ts.map +1 -0
  1524. package/dist/esm/shared-string-registry.js +248 -0
  1525. package/dist/esm/sheet-cell.d.ts +310 -0
  1526. package/dist/esm/sheet-cell.d.ts.map +1 -0
  1527. package/dist/esm/sheet-cell.js +1829 -0
  1528. package/dist/esm/test-setup.d.ts +2 -0
  1529. package/dist/esm/test-setup.d.ts.map +1 -0
  1530. package/dist/esm/test-setup.js +3 -0
  1531. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -0
  1532. package/dist/esm/types.d.ts +44 -0
  1533. package/dist/esm/types.d.ts.map +1 -0
  1534. package/dist/esm/types.js +33 -0
  1535. package/dist/esm/validation-schema/table.schema.d.ts +6 -0
  1536. package/dist/esm/validation-schema/table.schema.d.ts.map +1 -0
  1537. package/dist/esm/validation-schema/table.schema.js +4 -0
  1538. package/dist/esm/vitest.config.d.ts +3 -0
  1539. package/dist/esm/vitest.config.d.ts.map +1 -0
  1540. package/dist/esm/vitest.config.js +22 -0
  1541. package/package.json +89 -0
@@ -0,0 +1,2787 @@
1
+ import { __assign, __awaiter, __generator, __read, __spreadArray, __values } from "tslib";
2
+ import { tokenize as defaultTokenizer } from "@rowsncolumns/calculator";
3
+ import { isCellCoordinate, isCellNode, isCellRangeNode, isStaticNode, } from "@rowsncolumns/dag";
4
+ import { FormulaError } from "@rowsncolumns/fast-formula-parser";
5
+ import { defaultSpreadsheetTheme, } from "@rowsncolumns/spreadsheet";
6
+ import { addressToCell, canUseDOM, cellToAddress, DEFAULT_ACTIVE_CELL, DEFAULT_COLUMN_COUNT, DEFAULT_COLUMN_WIDTH, DEFAULT_ROW_COUNT, DEFAULT_ROW_HEIGHT, generateSelectionsFromFormula, getCellEffectiveFormat, getCellEffectiveValue, getCellFormattedValue, getCellUserEnteredFormat, getCellUserEnteredValue, getColumnIndexFromColumnName, getExtendedValueBool, getExtendedValueError, getExtendedValueFormula, getExtendedValueNumber, getExtendedValueString, isAreasEqual, isCellWithinBounds, isNil, iterateCellsInRange, pointToPixel, } from "@rowsncolumns/utils";
7
+ import { enableMapSet, enablePatches, produceWithPatches } from "immer";
8
+ import { buildConditionalFormatExpression } from "../api/conditional-format";
9
+ import { isConditionalFormatFormulaRule } from "../api/conditional-format";
10
+ import { buildDataValidationExpression } from "../api/data-validation";
11
+ import { isDataValidationFormulaRule } from "../api/data-validation";
12
+ import { getAutoFillValues } from "../api/fill";
13
+ import { formulaToRelativeReference } from "../api/formula";
14
+ import { createSheetDraft, deriveCellFromPrecedents } from "../api/immer-utils";
15
+ import { defaultCellCoords, isStyleReference, SheetCell } from "../sheet-cell";
16
+ import { CellXfsRegistry } from "../cellxfs-registry";
17
+ import { SharedStringRegistry } from "../shared-string-registry";
18
+ import { getSharedStringRuns, getSharedStringText } from "../types";
19
+ import { applyFill } from "./apply-fill";
20
+ import { autoResize } from "./auto-resize";
21
+ import { CalculationInterface } from "./calculation-interface";
22
+ import { changeBatch } from "./change-batch";
23
+ import { changeBatchStream } from "./change-batch-stream";
24
+ import { changeBorder } from "./change-border";
25
+ import { changeCalculatedColumn } from "./change-calculated-column";
26
+ import { changeDecimals } from "./change-decimals";
27
+ import { changeFormatting } from "./change-formatting";
28
+ import { changeSheetTabcolor } from "./change-sheet-tabcolor";
29
+ import { changeTableColumn } from "./change-table-column";
30
+ import { changeTheme } from "./change-theme";
31
+ import { isChartsAvailable, safeCreateChart, safeDeleteChart, safeMoveChart, safeResizeChart, safeUpdateChart, } from "./chart-extensions";
32
+ import { createBatchCitations, createCitation, deleteCitation, removeCitationFromCell, updateCitation, } from "./citations";
33
+ import { clearFormatting } from "./clear-formatting";
34
+ import { createConditionalFormattingRule, deleteConditionalFormattingRule, previewConditionalFormattingRule, updateConditionalFormattingRule, } from "./conditional-formatting-rules";
35
+ import { createTable } from "./create-table";
36
+ import { createDataValidationRule, deleteDataValidationRule, deleteDataValidationRules, updateDataValidationRule, } from "./data-validation-rules";
37
+ import { deleteCells } from "./delete-cells";
38
+ import { deleteCellsShiftLeft } from "./delete-cells-shift-left";
39
+ import { deleteCellsShiftUp } from "./delete-cells-shift-up";
40
+ import { deleteColumn } from "./delete-column";
41
+ import { deleteRow } from "./delete-row";
42
+ import { deleteSheet } from "./delete-sheet";
43
+ import { deleteTableColumn } from "./delete-table-column";
44
+ import { deleteTableRow } from "./delete-table-row";
45
+ import { duplicateSheet } from "./duplicate-sheet";
46
+ import { createEmbed, deleteEmbed, moveEmbed, resizeEmbed, updateEmbed, } from "./embeds";
47
+ import { freezeColumn, freezeRow } from "./freeze";
48
+ import { hideColumns } from "./hide-column";
49
+ import { hideRows } from "./hide-row";
50
+ import { decreaseIndent, increaseIndent } from "./indent";
51
+ import { insertColumn, insertTableColumn } from "./insert-column";
52
+ import { insertNote } from "./insert-note";
53
+ import { insertRow } from "./insert-row";
54
+ import { insertTableRow } from "./insert-table-row";
55
+ import { createNamedRange, deleteNamedRange } from "./named-range-operations";
56
+ import { createNewSheet } from "./new-sheet";
57
+ import { safeCreatePivotTable, safeDeletePivotTable } from "./pivot-extensions";
58
+ import { removeTable } from "./remove-table";
59
+ import { removeDuplicates } from "./remove-duplicates";
60
+ import { resize } from "./resize";
61
+ import { updateSheet } from "./update-sheet";
62
+ import { updateTable } from "./update-table";
63
+ // Enable patches
64
+ enablePatches();
65
+ enableMapSet();
66
+ // lib/canvas-adapter.ts
67
+ var canvasLib = null;
68
+ export var createCanvas = function (width, height) {
69
+ if (canUseDOM) {
70
+ // Browser environment (Storybook)
71
+ var canvas = document.createElement("canvas");
72
+ canvas.width = width;
73
+ canvas.height = height;
74
+ return canvas;
75
+ }
76
+ else {
77
+ // Node environment
78
+ if (!canvasLib) {
79
+ try {
80
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
81
+ canvasLib = require("canvas");
82
+ }
83
+ catch (e) {
84
+ // Fallback: return a minimal mock canvas for SSR/build compatibility
85
+ console.warn("canvas not available, using mock canvas");
86
+ return {
87
+ width: width,
88
+ height: height,
89
+ getContext: function () { return ({
90
+ font: "",
91
+ measureText: function () { return ({ width: 0 }); },
92
+ }); },
93
+ };
94
+ }
95
+ }
96
+ return canvasLib.createCanvas(width, height);
97
+ }
98
+ };
99
+ /**
100
+ * Backend auto-sizer for measuring text dimensions in Node.js
101
+ */
102
+ var BackendAutoSizer = /** @class */ (function () {
103
+ function BackendAutoSizer() {
104
+ this.canvas = createCanvas(0, 0);
105
+ this.ctx = this.canvas.getContext("2d");
106
+ this.currentFontSize = 12;
107
+ }
108
+ BackendAutoSizer.prototype.setFont = function (_a) {
109
+ var _b = _a.fontFamily, fontFamily = _b === void 0 ? "Arial" : _b, _c = _a.fontSize, fontSize = _c === void 0 ? 12 : _c, _d = _a.fontWeight, fontWeight = _d === void 0 ? "" : _d, _e = _a.fontStyle, fontStyle = _e === void 0 ? "" : _e, _f = _a.scale, scale = _f === void 0 ? 1 : _f;
110
+ this.currentFontSize = fontSize * scale;
111
+ var font = "".concat(fontStyle, " ").concat(fontWeight, " ").concat(this.currentFontSize, "px ").concat(fontFamily)
112
+ .trim()
113
+ .replace(/\s+/g, " ");
114
+ this.ctx.font = font;
115
+ };
116
+ BackendAutoSizer.prototype.reset = function () {
117
+ this.setFont({});
118
+ };
119
+ BackendAutoSizer.prototype.measureText = function (text, shouldWrap, maxWidth) {
120
+ var e_1, _a;
121
+ if (shouldWrap === void 0) { shouldWrap = false; }
122
+ if (!text)
123
+ return null;
124
+ var metrics = this.ctx.measureText(text);
125
+ var width = metrics.width;
126
+ var height = this.currentFontSize * 1.2; // Line height approximation
127
+ if (shouldWrap && maxWidth && width > maxWidth) {
128
+ // Simple word wrapping calculation
129
+ var words = text.split(" ");
130
+ var lines = 1;
131
+ var currentLineWidth = 0;
132
+ try {
133
+ for (var words_1 = __values(words), words_1_1 = words_1.next(); !words_1_1.done; words_1_1 = words_1.next()) {
134
+ var word = words_1_1.value;
135
+ var wordWidth = this.ctx.measureText(word + " ").width;
136
+ if (currentLineWidth + wordWidth > maxWidth) {
137
+ lines++;
138
+ currentLineWidth = wordWidth;
139
+ }
140
+ else {
141
+ currentLineWidth += wordWidth;
142
+ }
143
+ }
144
+ }
145
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
146
+ finally {
147
+ try {
148
+ if (words_1_1 && !words_1_1.done && (_a = words_1.return)) _a.call(words_1);
149
+ }
150
+ finally { if (e_1) throw e_1.error; }
151
+ }
152
+ height = this.currentFontSize * 1.2 * lines;
153
+ width = maxWidth;
154
+ }
155
+ return { width: width, height: height };
156
+ };
157
+ return BackendAutoSizer;
158
+ }());
159
+ // Generic state change function
160
+ var stateChangeFunction = function (getter, setter) {
161
+ return function (action) {
162
+ if (typeof action === "function") {
163
+ // If action is a function, call it with current state
164
+ setter(action(getter()));
165
+ }
166
+ else {
167
+ // If action is a value, set it directly
168
+ setter(action);
169
+ }
170
+ };
171
+ };
172
+ /**
173
+ * Spreadsheet Interface for SSR
174
+ *
175
+ * const spreadsheet = new Spreadsheet()
176
+ */
177
+ var Spreadsheet = /** @class */ (function () {
178
+ function Spreadsheet(options) {
179
+ var _this = this;
180
+ this._sheets = [];
181
+ this._sheetData = {};
182
+ this._tables = [];
183
+ this._charts = [];
184
+ this._embeds = [];
185
+ this._pivotTables = [];
186
+ this._citations = [];
187
+ this._namedRanges = [];
188
+ this._dataValidations = [];
189
+ this._conditionalFormats = [];
190
+ this._locale = "en";
191
+ this._patches = [];
192
+ this._cellXfs = new Map();
193
+ this._activeSheetId = 1;
194
+ this._autoSizer = new BackendAutoSizer();
195
+ this.scale = 1;
196
+ this.skipDag = false;
197
+ this.cellHorizontalSpacing = 5;
198
+ this.cellVerticalSpacing = 5;
199
+ this.resizeStrategy = "full";
200
+ this.minRowDimension = DEFAULT_ROW_HEIGHT;
201
+ this.minColumnDimension = DEFAULT_COLUMN_WIDTH;
202
+ this._sharedStrings = new Map();
203
+ this.onChangeSheets = stateChangeFunction(function () { return _this.sheets; }, // Getter function
204
+ function (value) { return (_this.sheets = value); });
205
+ this.onChangeSheetData = stateChangeFunction(function () { return _this.sheetData; }, function (value) { return (_this.sheetData = value); });
206
+ this.onChangeTables = stateChangeFunction(function () { return _this.tables; }, function (value) { return (_this.tables = value); });
207
+ this.onChangeCharts = stateChangeFunction(function () { return _this.charts; }, function (value) { return (_this.charts = value); });
208
+ this.onChangeEmbeds = stateChangeFunction(function () { return _this.embeds; }, function (value) { return (_this.embeds = value); });
209
+ this.onChangeNamedRanges = stateChangeFunction(function () { return _this.namedRanges; }, function (value) { return (_this.namedRanges = value); });
210
+ this.onChangeSharedStrings = stateChangeFunction(function () { return _this.sharedStrings; }, function (value) { return (_this.sharedStrings = value); });
211
+ this.onChangeDataValidations = stateChangeFunction(function () { return _this.dataValidations; }, function (value) { return (_this.dataValidations = value); });
212
+ this.onChangeConditionalFormats = stateChangeFunction(function () { return _this.conditionalFormats; }, function (value) { return (_this.conditionalFormats = value); });
213
+ this.onChangeCellXfs = stateChangeFunction(function () { return _this.cellXfs; }, function (value) {
214
+ _this.cellXfs = value;
215
+ });
216
+ this.onChangeActiveSheet = stateChangeFunction(function () { return _this.activeSheetId; }, function (value) { return (_this.activeSheetId = value); });
217
+ this.onChangePivotTables = stateChangeFunction(function () { return _this.pivotTables; }, // Getter function
218
+ function (value) { return (_this.pivotTables = value); });
219
+ this.onChangeCitations = stateChangeFunction(function () { return _this.citations; }, function (value) { return (_this.citations = value); });
220
+ this.createHistory = function () { return function (patches) {
221
+ _this._patches.push(patches);
222
+ }; };
223
+ this.enqueueCalculation = function (_operation) { };
224
+ this.enqueueGraphOperation = function (_operation) { };
225
+ this.enqueueStructureChange = function (_change) { };
226
+ this.onRequestCalculate = function () { return __awaiter(_this, void 0, void 0, function () {
227
+ return __generator(this, function (_a) {
228
+ return [2 /*return*/, []];
229
+ });
230
+ }); };
231
+ this.getActiveCell = function () { return defaultCellCoords; };
232
+ this.getSelections = function () { return []; };
233
+ this.getDependents = function (source, includeSource) {
234
+ return _this._calculationInterface.getDependents(source).filter(function (node) {
235
+ if (isStaticNode(node)) {
236
+ return true;
237
+ }
238
+ if (!includeSource && isCellRangeNode(node)) {
239
+ return !isAreasEqual(node.position, source);
240
+ }
241
+ if (!includeSource && isCellCoordinate(source) && isCellNode(node)) {
242
+ var cellNode = node;
243
+ return (cellNode.position.rowIndex !== source.rowIndex ||
244
+ cellNode.position.columnIndex !== source.columnIndex);
245
+ }
246
+ return true;
247
+ });
248
+ };
249
+ this.onChangeSelections = function () { return []; };
250
+ this.getContentfulRangeAroundCell = function (sheetId, startCell) {
251
+ return {
252
+ startRowIndex: startCell.rowIndex,
253
+ endRowIndex: startCell.rowIndex,
254
+ startColumnIndex: startCell.columnIndex,
255
+ endColumnIndex: startCell.columnIndex,
256
+ };
257
+ };
258
+ this.onChangeActiveCell = function () { return []; };
259
+ this.getEffectiveValue = function (sheetId, rowIndex, columnIndex, _property) {
260
+ var _a, _b, _c, _d, _e, _f;
261
+ var cellData = (_d = (_c = (_b = (_a = _this.sheetData) === null || _a === void 0 ? void 0 : _a[sheetId]) === null || _b === void 0 ? void 0 : _b[rowIndex]) === null || _c === void 0 ? void 0 : _c.values) === null || _d === void 0 ? void 0 : _d[columnIndex];
262
+ // Check for shared strings
263
+ var sharedStringValue = _this.getSharedStringValue(cellData);
264
+ if (sharedStringValue !== undefined) {
265
+ return sharedStringValue;
266
+ }
267
+ var effectiveValue = getCellEffectiveValue(cellData);
268
+ if (!effectiveValue) {
269
+ return undefined;
270
+ }
271
+ return ((_f = (_e = getExtendedValueBool(effectiveValue)) !== null && _e !== void 0 ? _e : getExtendedValueNumber(effectiveValue)) !== null && _f !== void 0 ? _f : getExtendedValueString(effectiveValue));
272
+ };
273
+ this.getEffectiveValueForCalculation = function (sheetId, rowIndex, columnIndex, property) {
274
+ var _a, _b, _c, _d, _e, _f;
275
+ var cellData = _this.getCellData(sheetId, rowIndex, columnIndex);
276
+ if (property) {
277
+ return (_a = _this._getEffectiveStructuredValue) === null || _a === void 0 ? void 0 : _a.call(_this, (_b = getCellEffectiveValue(cellData)) === null || _b === void 0 ? void 0 : _b.structuredValue, property);
278
+ }
279
+ var effectiveValue = getCellEffectiveValue(cellData);
280
+ var errorValue = getExtendedValueError(effectiveValue);
281
+ if (errorValue) {
282
+ return new FormulaError(errorValue.name, errorValue.message);
283
+ }
284
+ var hyperlink = _this.getHyperlinkText(_this.getHyperLink(sheetId, rowIndex, columnIndex));
285
+ return ((_f = (_d = (_c = hyperlink !== null && hyperlink !== void 0 ? hyperlink : _this.getEffectiveValue(sheetId, rowIndex, columnIndex)) !== null && _c !== void 0 ? _c : hyperlink) !== null && _d !== void 0 ? _d : (_e = _this._getEffectiveStructuredValue) === null || _e === void 0 ? void 0 : _e.call(_this, effectiveValue === null || effectiveValue === void 0 ? void 0 : effectiveValue.structuredValue)) !== null && _f !== void 0 ? _f : effectiveValue === null || effectiveValue === void 0 ? void 0 : effectiveValue.structuredValue);
286
+ };
287
+ this.getUserEnteredValue = function (sheetId, rowIndex, columnIndex) {
288
+ var cellData = _this.getCellData(sheetId, rowIndex, columnIndex);
289
+ var sharedStringValue = _this.getSharedStringValue(cellData);
290
+ if (sharedStringValue !== undefined) {
291
+ return { sv: sharedStringValue };
292
+ }
293
+ return getCellUserEnteredValue(cellData);
294
+ };
295
+ this.getUserEnteredStringValue = function (sheetId, rowIndex, columnIndex) {
296
+ var formulaValue = _this.getFormulaValue(sheetId, rowIndex, columnIndex);
297
+ if (formulaValue) {
298
+ return formulaValue;
299
+ }
300
+ var userEnteredValue = _this.getUserEnteredValue(sheetId, rowIndex, columnIndex);
301
+ var stringValue = getExtendedValueString(userEnteredValue);
302
+ if (stringValue) {
303
+ return stringValue;
304
+ }
305
+ return undefined;
306
+ };
307
+ this.getFormulaValue = function (sheetId, rowIndex, columnIndex) {
308
+ var userEnteredValue = _this.getUserEnteredValue(sheetId, rowIndex, columnIndex);
309
+ return getExtendedValueFormula(userEnteredValue);
310
+ };
311
+ this.getFormattedValue = function (sheetId, rowIndex, columnIndex) {
312
+ var cellData = _this.getCellData(sheetId, rowIndex, columnIndex);
313
+ var sharedStringValue = _this.getSharedStringValue(cellData);
314
+ if (sharedStringValue !== undefined) {
315
+ return sharedStringValue;
316
+ }
317
+ return getCellFormattedValue(cellData);
318
+ };
319
+ this.getSheetId = function (sheetName, options) {
320
+ var _a;
321
+ var fallbackToActiveSheet = (_a = options === null || options === void 0 ? void 0 : options.fallbackToActiveSheet) !== null && _a !== void 0 ? _a : true;
322
+ var sheet = _this.sheets.find(function (sheet) { return sheet.title === sheetName; });
323
+ if (sheet) {
324
+ return sheet.sheetId;
325
+ }
326
+ return fallbackToActiveSheet ? _this.activeSheetId : undefined;
327
+ };
328
+ this.getSheetIdOrActive = function (sheetName) {
329
+ var _a;
330
+ return ((_a = _this.getSheetId(sheetName, { fallbackToActiveSheet: true })) !== null && _a !== void 0 ? _a : _this.activeSheetId);
331
+ };
332
+ this.getSheetName = function (sheetId) {
333
+ var _a;
334
+ return (_a = _this.getSheet(sheetId)) === null || _a === void 0 ? void 0 : _a.name;
335
+ };
336
+ this.getDataValidationById = function (id) {
337
+ var _a;
338
+ return (_a = _this.dataValidations) === null || _a === void 0 ? void 0 : _a.find(function (rule) { return rule.id === id; });
339
+ };
340
+ this.getConditionalFormatFormula = function (sheetId, rowIndex, columnIndex, conditionalFormatId) {
341
+ var e_2, _a;
342
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
343
+ var rule = (_b = _this.conditionalFormats) === null || _b === void 0 ? void 0 : _b.find(function (candidate) { return candidate.id === conditionalFormatId; });
344
+ if (!rule) {
345
+ return undefined;
346
+ }
347
+ var formulaValue = isConditionalFormatFormulaRule(rule)
348
+ ? buildConditionalFormatExpression(rule, (_j = cellToAddress({
349
+ rowIndex: (_e = (_d = (_c = rule === null || rule === void 0 ? void 0 : rule.ranges) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.startRowIndex) !== null && _e !== void 0 ? _e : 1,
350
+ columnIndex: (_h = (_g = (_f = rule === null || rule === void 0 ? void 0 : rule.ranges) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.startColumnIndex) !== null && _h !== void 0 ? _h : 1,
351
+ }, false, false)) !== null && _j !== void 0 ? _j : "A1", _this.locale)
352
+ : undefined;
353
+ if (!formulaValue || !rule.ranges.length) {
354
+ return formulaValue;
355
+ }
356
+ var masterCell = {
357
+ rowIndex: rule.ranges[0].startRowIndex,
358
+ columnIndex: rule.ranges[0].startColumnIndex,
359
+ };
360
+ var activeSheetName = (_k = _this.getSheetName(sheetId)) !== null && _k !== void 0 ? _k : "";
361
+ try {
362
+ for (var _m = __values(rule.ranges), _o = _m.next(); !_o.done; _o = _m.next()) {
363
+ var range = _o.value;
364
+ if (sheetId === range.sheetId &&
365
+ isCellWithinBounds({ rowIndex: rowIndex, columnIndex: columnIndex }, range)) {
366
+ return ((_l = formulaToRelativeReference(formulaValue, masterCell, { rowIndex: rowIndex, columnIndex: columnIndex }, activeSheetName, {
367
+ ignoreCircular: true,
368
+ preserveAbsolutes: true,
369
+ ignoreReferenceError: true,
370
+ })) !== null && _l !== void 0 ? _l : "");
371
+ }
372
+ }
373
+ }
374
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
375
+ finally {
376
+ try {
377
+ if (_o && !_o.done && (_a = _m.return)) _a.call(_m);
378
+ }
379
+ finally { if (e_2) throw e_2.error; }
380
+ }
381
+ };
382
+ this.getDataValidationFormula = function (sheetId, rowIndex, columnIndex) {
383
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
384
+ var cellData = _this.getCellData(sheetId, rowIndex, columnIndex);
385
+ var dataValidation = cellData === null || cellData === void 0 ? void 0 : cellData.dataValidation;
386
+ if (typeof dataValidation === "string" ||
387
+ typeof dataValidation === "number") {
388
+ dataValidation = _this.getDataValidationById(dataValidation);
389
+ }
390
+ var record = dataValidation;
391
+ var formulaValue = isDataValidationFormulaRule(record)
392
+ ? buildDataValidationExpression(record, (_g = cellToAddress({
393
+ rowIndex: (_c = (_b = (_a = record === null || record === void 0 ? void 0 : record.ranges) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.startRowIndex) !== null && _c !== void 0 ? _c : 1,
394
+ columnIndex: (_f = (_e = (_d = record === null || record === void 0 ? void 0 : record.ranges) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.startColumnIndex) !== null && _f !== void 0 ? _f : 1,
395
+ }, false, false)) !== null && _g !== void 0 ? _g : "A1", _this.locale)
396
+ : undefined;
397
+ if (formulaValue && ((_h = record === null || record === void 0 ? void 0 : record.ranges) === null || _h === void 0 ? void 0 : _h.length)) {
398
+ var masterCell = {
399
+ rowIndex: record.ranges[0].startRowIndex,
400
+ columnIndex: record.ranges[0].startColumnIndex,
401
+ };
402
+ var activeSheetName = (_j = _this.getSheetName(sheetId)) !== null && _j !== void 0 ? _j : "";
403
+ return ((_k = formulaToRelativeReference(formulaValue, masterCell, { rowIndex: rowIndex, columnIndex: columnIndex }, activeSheetName, {
404
+ ignoreCircular: true,
405
+ preserveAbsolutes: true,
406
+ ignoreReferenceError: true,
407
+ })) !== null && _k !== void 0 ? _k : "");
408
+ }
409
+ return formulaValue;
410
+ };
411
+ this.getFinalUserEnteredValue = function (position) {
412
+ var conditionalFormatId = position.conditionalFormatId, dataValidationId = position.dataValidationId;
413
+ if (!isNil(conditionalFormatId)) {
414
+ return _this.getConditionalFormatFormula(position.sheetId, position.rowIndex, position.columnIndex, conditionalFormatId);
415
+ }
416
+ if (!isNil(dataValidationId)) {
417
+ return _this.getDataValidationFormula(position.sheetId, position.rowIndex, position.columnIndex);
418
+ }
419
+ return _this.getFormulaValue(position.sheetId, position.rowIndex, position.columnIndex);
420
+ };
421
+ this.getPrecedents = function (source, includeSource) {
422
+ return _this._calculationInterface.getPrecedents(source).filter(function (node) {
423
+ if (isStaticNode(node)) {
424
+ return true;
425
+ }
426
+ if (!includeSource &&
427
+ isCellCoordinate(node.position) &&
428
+ isCellCoordinate(source)) {
429
+ return (node.position.rowIndex !== source.rowIndex ||
430
+ node.position.columnIndex !== source.columnIndex);
431
+ }
432
+ if (includeSource &&
433
+ !isCellCoordinate(node.position) &&
434
+ !isCellCoordinate(source)) {
435
+ return !isAreasEqual(node.position, source);
436
+ }
437
+ return true;
438
+ });
439
+ };
440
+ this.collectFormulaOperations = function () {
441
+ var e_3, _a, e_4, _b;
442
+ var _c, _d, _e, _f;
443
+ var operations = [];
444
+ var sheetCell = new SheetCell();
445
+ for (var sheetIdKey in _this.sheetData) {
446
+ var sheetId = Number(sheetIdKey);
447
+ try {
448
+ for (var _g = (e_3 = void 0, __values((_d = (_c = _this.sheetData[sheetId]) === null || _c === void 0 ? void 0 : _c.entries()) !== null && _d !== void 0 ? _d : [])), _h = _g.next(); !_h.done; _h = _g.next()) {
449
+ var _j = __read(_h.value, 2), rowIndex = _j[0], value = _j[1];
450
+ try {
451
+ for (var _k = (e_4 = void 0, __values((_f = (_e = value === null || value === void 0 ? void 0 : value.values) === null || _e === void 0 ? void 0 : _e.entries()) !== null && _f !== void 0 ? _f : [])), _l = _k.next(); !_l.done; _l = _k.next()) {
452
+ var _m = __read(_l.value, 2), columnIndex = _m[0], cellData = _m[1];
453
+ if (!cellData) {
454
+ continue;
455
+ }
456
+ sheetCell.assign(sheetId, { rowIndex: rowIndex, columnIndex: columnIndex }, cellData);
457
+ if (sheetCell.formula) {
458
+ operations.push({
459
+ type: "add",
460
+ position: { sheetId: sheetId, rowIndex: rowIndex, columnIndex: columnIndex },
461
+ value: sheetCell.formula,
462
+ });
463
+ }
464
+ }
465
+ }
466
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
467
+ finally {
468
+ try {
469
+ if (_l && !_l.done && (_b = _k.return)) _b.call(_k);
470
+ }
471
+ finally { if (e_4) throw e_4.error; }
472
+ }
473
+ }
474
+ }
475
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
476
+ finally {
477
+ try {
478
+ if (_h && !_h.done && (_a = _g.return)) _a.call(_g);
479
+ }
480
+ finally { if (e_3) throw e_3.error; }
481
+ }
482
+ }
483
+ return operations;
484
+ };
485
+ this.getEffectiveValuesFromRange = function (address) {
486
+ var _a = __read(address.split("!"), 2), sheetToken = _a[0], rangeToken = _a[1];
487
+ var hasExplicitSheet = Boolean(rangeToken);
488
+ var sheetName = hasExplicitSheet ? sheetToken : undefined;
489
+ var sheetId = sheetName ? _this.getSheetId(sheetName) : _this.activeSheetId;
490
+ var rangeAddress = hasExplicitSheet ? rangeToken : sheetToken;
491
+ if (!sheetId || !rangeAddress) {
492
+ return [];
493
+ }
494
+ var sheet = _this.getSheet(sheetId);
495
+ var _b = __read(rangeAddress.split(":"), 2), startRef = _b[0], endRef = _b[1];
496
+ var startCell = addressToCell(startRef, {
497
+ position: "start",
498
+ rowCount: sheet.rowCount,
499
+ columnCount: sheet.columnCount,
500
+ });
501
+ var endCell = addressToCell(endRef !== null && endRef !== void 0 ? endRef : startRef, {
502
+ position: "end",
503
+ rowCount: sheet.rowCount,
504
+ columnCount: sheet.columnCount,
505
+ });
506
+ if (!startCell || !endCell) {
507
+ return [];
508
+ }
509
+ var values = [];
510
+ for (var row = startCell.rowIndex; row <= endCell.rowIndex; row += 1) {
511
+ for (var col = startCell.columnIndex; col <= endCell.columnIndex; col += 1) {
512
+ var value = _this.getEffectiveValue(sheetId, row, col);
513
+ values.push({
514
+ userEnteredValue: value == null ? "" : String(value),
515
+ });
516
+ }
517
+ }
518
+ return values;
519
+ };
520
+ this.applyCalculationResults = function (results) {
521
+ var _a;
522
+ var sheetCell = new SheetCell();
523
+ var saveHistory = _this.createHistory();
524
+ var cellXfsRegisry = _this.cellXfsRegistry;
525
+ (_a = _this.onChangeSheetData) === null || _a === void 0 ? void 0 : _a.call(_this, function (prevSheetData) {
526
+ var _a = __read(produceWithPatches(prevSheetData, function (draft) {
527
+ var e_5, _a;
528
+ var _b;
529
+ try {
530
+ for (var results_1 = __values(results), results_1_1 = results_1.next(); !results_1_1.done; results_1_1 = results_1.next()) {
531
+ var _c = __read(results_1_1.value, 3), position = _c[0], result = _c[1], formatting = _c[2];
532
+ var rowIndex = position.rowIndex, columnIndex = position.columnIndex, sheetId = position.sheetId, conditionalFormatId = position.conditionalFormatId, dataValidationId = position.dataValidationId;
533
+ var currentSheet = createSheetDraft(draft, sheetId, rowIndex);
534
+ var cellData = (_b = currentSheet[rowIndex].values) === null || _b === void 0 ? void 0 : _b[columnIndex];
535
+ sheetCell.assign(sheetId, { rowIndex: rowIndex, columnIndex: columnIndex }, cellData, {
536
+ getRangeValues: _this.getEffectiveValuesFromRange,
537
+ locale: _this.locale,
538
+ cellXfsRegistry: cellXfsRegisry,
539
+ getDataValidationById: _this.getDataValidationById,
540
+ });
541
+ sheetCell.hideLoading();
542
+ if (!isNil(conditionalFormatId)) {
543
+ sheetCell.setConditionalFormatResult(conditionalFormatId, result);
544
+ }
545
+ else if (!isNil(dataValidationId)) {
546
+ sheetCell.setDataValidationResult(result);
547
+ }
548
+ else {
549
+ var preserveStringLiteral = typeof result === "string";
550
+ sheetCell.setEffectiveValue(result, false, preserveStringLiteral);
551
+ // Calculator-supplied formatting (e.g. spilled FILTER results)
552
+ // is persisted as user-entered so the renderer respects it
553
+ // without walking precedents. Effective number format from
554
+ // precedents is derived at render time and not written here.
555
+ if (formatting) {
556
+ for (var type in formatting) {
557
+ sheetCell.setUserEnteredFormat(type, formatting[type]);
558
+ }
559
+ }
560
+ var derivedCell = deriveCellFromPrecedents(sheetCell.formula, _this.getPrecedents(position), draft, sheetId, _this.locale, _this.cellXfsRegistry);
561
+ if (derivedCell) {
562
+ sheetCell.processDerivedCell(derivedCell);
563
+ }
564
+ }
565
+ currentSheet[rowIndex].values[columnIndex] =
566
+ sheetCell.getCellData();
567
+ cellXfsRegisry === null || cellXfsRegisry === void 0 ? void 0 : cellXfsRegisry.registerCellXfs(sheetCell);
568
+ }
569
+ }
570
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
571
+ finally {
572
+ try {
573
+ if (results_1_1 && !results_1_1.done && (_a = results_1.return)) _a.call(results_1);
574
+ }
575
+ finally { if (e_5) throw e_5.error; }
576
+ }
577
+ }), 3), nextState = _a[0], patches = _a[1], inversePatches = _a[2];
578
+ saveHistory({
579
+ sheetData: { patches: patches, inversePatches: inversePatches },
580
+ disableRecalc: true,
581
+ });
582
+ return nextState;
583
+ });
584
+ cellXfsRegisry === null || cellXfsRegisry === void 0 ? void 0 : cellXfsRegisry.getPatches(saveHistory);
585
+ };
586
+ /**
587
+ * Get dimension of a single cell
588
+ * Similar to use-sizer.ts getCellDimensions
589
+ */
590
+ this.getCellDimensions = function (sheetId, rowIndex, columnIndex, axis, options) {
591
+ var _a, _b;
592
+ if (axis === void 0) { axis = "y"; }
593
+ var _c = options !== null && options !== void 0 ? options : {}, textOverride = _c.textOverride, textFormatOverride = _c.textFormatOverride, shouldWrapOverride = _c.shouldWrapOverride;
594
+ var text = textOverride !== null && textOverride !== void 0 ? textOverride : _this.getFormattedValue(sheetId, rowIndex, columnIndex);
595
+ if (!text)
596
+ return { width: 0, height: 0 };
597
+ var textFormat = textFormatOverride !== null && textFormatOverride !== void 0 ? textFormatOverride : _this.getCellTextFormat(sheetId, rowIndex, columnIndex);
598
+ // Rich-text runs carry their own font sizes; the tallest run sets the
599
+ // line box (Excel scales a row to the largest glyph in a mixed line).
600
+ // Headless heuristic, mirroring the Rust engine's refit: the whole cell
601
+ // measures under the tallest font rather than per-segment metrics.
602
+ var runs = textFormatOverride == null
603
+ ? _this.getCellTextFormatRuns(sheetId, rowIndex, columnIndex)
604
+ : undefined;
605
+ var maxRunFontSize = runs === null || runs === void 0 ? void 0 : runs.reduce(function (acc, run) { var _a, _b; return "format" in run ? Math.max(acc, (_b = (_a = run.format) === null || _a === void 0 ? void 0 : _a.fontSize) !== null && _b !== void 0 ? _b : 0) : acc; }, 0);
606
+ var fitFontSize = Math.max((_a = textFormat.fontSize) !== null && _a !== void 0 ? _a : 10, maxRunFontSize !== null && maxRunFontSize !== void 0 ? maxRunFontSize : 0);
607
+ // Reset and set font
608
+ _this._autoSizer.reset();
609
+ var textFontSize = pointToPixel(fitFontSize);
610
+ _this._autoSizer.setFont({
611
+ fontFamily: (_b = textFormat === null || textFormat === void 0 ? void 0 : textFormat.fontFamily) !== null && _b !== void 0 ? _b : "Arial",
612
+ fontSize: textFontSize,
613
+ fontWeight: (textFormat === null || textFormat === void 0 ? void 0 : textFormat.bold) ? "bold" : "",
614
+ fontStyle: (textFormat === null || textFormat === void 0 ? void 0 : textFormat.italic) ? "italic" : "",
615
+ scale: _this.scale,
616
+ });
617
+ var shouldWrap = shouldWrapOverride !== null && shouldWrapOverride !== void 0 ? shouldWrapOverride : _this.shouldWrapCell(sheetId, rowIndex, columnIndex);
618
+ var columnWidth = _this.getStoredColumnWidth(sheetId, columnIndex);
619
+ var metrics = _this._autoSizer.measureText(text, shouldWrap, columnWidth - _this.cellHorizontalSpacing);
620
+ if (!metrics)
621
+ return { width: 0, height: 0 };
622
+ return {
623
+ width: Math.ceil(metrics.width) + _this.cellHorizontalSpacing,
624
+ height: Math.ceil(metrics.height) + _this.cellVerticalSpacing,
625
+ };
626
+ };
627
+ /**
628
+ * Check if a cell is merged
629
+ * @param sheetId
630
+ * @param rowIndex
631
+ * @param columnIndex
632
+ * @returns
633
+ */
634
+ this.isMergedCell = function (sheetId, rowIndex, columnIndex) {
635
+ var _a;
636
+ var sheet = _this.sheets.find(function (sheet) { return sheet.sheetId === sheetId; });
637
+ if (sheet) {
638
+ return (_a = sheet.merges) === null || _a === void 0 ? void 0 : _a.some(function (range) {
639
+ return isCellWithinBounds({ rowIndex: rowIndex, columnIndex: columnIndex }, range);
640
+ });
641
+ }
642
+ return false;
643
+ };
644
+ /**
645
+ * Calculate row height based on cell content
646
+ * Same logic as use-sizer.ts getRowHeight
647
+ */
648
+ this.getRowHeight = function (sheetId, rowIndex, shouldExclude) {
649
+ var sheet = _this.getSheet(sheetId);
650
+ var columnCount = sheet.columnCount;
651
+ var visibleColumns = _this.resizeStrategy === "full" ? columnCount : 20;
652
+ var maxHeight = 0;
653
+ // Calculate for frozen columns
654
+ for (var i = 1; i <= sheet.frozenColumns; i++) {
655
+ if (_this.isHiddenColumn(sheetId, i)) {
656
+ continue;
657
+ }
658
+ var height = _this.getCellDimensions(sheetId, rowIndex, i, "x").height;
659
+ if (height > maxHeight)
660
+ maxHeight = height;
661
+ }
662
+ // Loop through visible columns
663
+ var start = _this.resizeStrategy === "full" ? Math.max(sheet.frozenColumns, 1) : 0;
664
+ while (start < visibleColumns) {
665
+ if (_this.isHiddenColumn(sheetId, start) || (shouldExclude === null || shouldExclude === void 0 ? void 0 : shouldExclude(start))) {
666
+ start++;
667
+ continue;
668
+ }
669
+ var height = _this.getCellDimensions(sheetId, rowIndex, start, "x").height;
670
+ if (height > maxHeight)
671
+ maxHeight = height;
672
+ start++;
673
+ }
674
+ return Math.max(_this.minRowDimension * _this.scale, maxHeight) / _this.scale;
675
+ };
676
+ /**
677
+ * Calculate column width based on cell content
678
+ * Same logic as use-sizer.ts getColumnWidth
679
+ */
680
+ this.getColumnWidth = function (sheetId, columnIndex, options) {
681
+ var sheet = _this.getSheet(sheetId);
682
+ var rowCount = sheet.rowCount;
683
+ var _a = options !== null && options !== void 0 ? options : {}, rowStartIndexRegion = _a.rowStartIndexRegion, rowStopIndexRegion = _a.rowStopIndexRegion, fallbackToDefaultIfEmpty = _a.fallbackToDefaultIfEmpty;
684
+ var visibleRows = (rowStopIndexRegion !== null && rowStopIndexRegion !== void 0 ? rowStopIndexRegion : _this.resizeStrategy === "full") ? rowCount : 20;
685
+ var maxWidth = 0;
686
+ // Calculate for frozen rows: Frozen rows are always on the screen
687
+ for (var i = 1; i < sheet.frozenRows; i++) {
688
+ if (_this.isHiddenRow(sheetId, i)) {
689
+ continue;
690
+ }
691
+ var width = _this.getCellDimensions(sheetId, i, columnIndex).width;
692
+ if (width > maxWidth)
693
+ maxWidth = width;
694
+ }
695
+ // Loop through all visible rows
696
+ var start = (rowStartIndexRegion !== null && rowStartIndexRegion !== void 0 ? rowStartIndexRegion : _this.resizeStrategy === "full")
697
+ ? sheet.frozenRows
698
+ : 0;
699
+ while (start < visibleRows) {
700
+ if (_this.isHiddenRow(sheetId, start)) {
701
+ start++;
702
+ continue;
703
+ }
704
+ var width = _this.getCellDimensions(sheetId, start, columnIndex, "y").width;
705
+ if (width > maxWidth)
706
+ maxWidth = width;
707
+ start++;
708
+ }
709
+ // This column is empty
710
+ if (maxWidth === 0) {
711
+ if (fallbackToDefaultIfEmpty) {
712
+ return DEFAULT_COLUMN_WIDTH;
713
+ }
714
+ return _this.getStoredColumnWidth(sheetId, columnIndex);
715
+ }
716
+ return (Math.max(_this.minColumnDimension * _this.scale, maxWidth) / _this.scale);
717
+ };
718
+ /**
719
+ * Get selection from a named range variable
720
+ * @param variableName
721
+ * @returns
722
+ */
723
+ this.getSelectionFromNamedRange = function (variableName) {
724
+ var _a;
725
+ var namedRange = (_a = _this.namedRanges) === null || _a === void 0 ? void 0 : _a.find(function (range) {
726
+ return range.name.localeCompare(variableName, undefined, {
727
+ sensitivity: "accent",
728
+ }) === 0;
729
+ });
730
+ // Only return selection for names with ranges
731
+ if (namedRange === null || namedRange === void 0 ? void 0 : namedRange.range) {
732
+ var sheet = _this.getSheet(namedRange.range.sheetId);
733
+ return {
734
+ range: namedRange.range,
735
+ sheetName: sheet.name,
736
+ };
737
+ }
738
+ // Get static or formula value
739
+ var result = namedRange === null || namedRange === void 0 ? void 0 : namedRange.value;
740
+ if (!isNil(result)) {
741
+ return result;
742
+ }
743
+ return undefined;
744
+ };
745
+ /**
746
+ * Get selections from table reference
747
+ * @param sheetId
748
+ * @param cell
749
+ * @param tableName
750
+ * @param columnNames
751
+ * @param thisRow
752
+ * @param specialItem
753
+ * @returns
754
+ */
755
+ this.getSelectionFromTable = function (sheetId, cell, tableName, columnNames, thisRow, specialItem) {
756
+ var _a, _b, _c;
757
+ // If there is no tablename, we need to find table based
758
+ // on cell
759
+ var table = (_a = _this.tables) === null || _a === void 0 ? void 0 : _a.find(function (table) {
760
+ if (tableName) {
761
+ return table.title === tableName;
762
+ }
763
+ return cell
764
+ ? isCellWithinBounds(cell, table.range) && table.sheetId === sheetId
765
+ : true;
766
+ });
767
+ // Current row
768
+ var rowIndex = (cell !== null && cell !== void 0 ? cell : DEFAULT_ACTIVE_CELL).rowIndex;
769
+ if (table) {
770
+ var range = table.range;
771
+ var headerRow = (_b = table.headerRow) !== null && _b !== void 0 ? _b : true;
772
+ var totalRow = (_c = table.totalRow) !== null && _c !== void 0 ? _c : false;
773
+ var headerRowOffset = headerRow ? 1 : 0;
774
+ var totalRowOffset = totalRow ? 1 : 0;
775
+ var sheet = _this.getSheet(table.sheetId);
776
+ var sheetName = sheet.name;
777
+ var _d = __read(columnNames !== null && columnNames !== void 0 ? columnNames : [], 2), from = _d[0], to = _d[1];
778
+ var startColIndex = getColumnIndexFromColumnName(table, from);
779
+ var endColIndex = getColumnIndexFromColumnName(table, to);
780
+ var startColumnIndex = isNil(startColIndex)
781
+ ? range.startColumnIndex
782
+ : startColIndex;
783
+ var endColumnIndex = isNil(endColIndex) && isNil(startColIndex)
784
+ ? range.endColumnIndex
785
+ : isNil(endColIndex)
786
+ ? startColumnIndex
787
+ : endColIndex;
788
+ // Headers only
789
+ if (specialItem === "#Headers") {
790
+ return {
791
+ range: __assign(__assign({}, range), { startColumnIndex: startColumnIndex, endColumnIndex: endColumnIndex, startRowIndex: range.startRowIndex, endRowIndex: range.startRowIndex }),
792
+ sheetName: sheetName,
793
+ };
794
+ }
795
+ // All
796
+ if (specialItem === "#All") {
797
+ return {
798
+ range: __assign(__assign({}, range), { startColumnIndex: startColumnIndex, endColumnIndex: endColumnIndex }),
799
+ sheetName: sheetName,
800
+ };
801
+ }
802
+ // All
803
+ if (specialItem === "#Data") {
804
+ return {
805
+ range: __assign(__assign({}, range), { startColumnIndex: startColumnIndex, endColumnIndex: endColumnIndex, startRowIndex: range.startRowIndex + headerRowOffset, endRowIndex: range.endRowIndex - totalRowOffset }),
806
+ sheetName: sheetName,
807
+ };
808
+ }
809
+ if (!from && !to) {
810
+ return {
811
+ range: {
812
+ startRowIndex: thisRow
813
+ ? rowIndex
814
+ : range.startRowIndex + headerRowOffset,
815
+ endRowIndex: thisRow
816
+ ? rowIndex
817
+ : range.endRowIndex - totalRowOffset,
818
+ startColumnIndex: startColumnIndex,
819
+ endColumnIndex: endColumnIndex,
820
+ },
821
+ sheetName: sheetName,
822
+ };
823
+ }
824
+ // If column is not found, lets not select anything
825
+ if (startColIndex === -1 || isNil(startColIndex)) {
826
+ return undefined;
827
+ }
828
+ // Check if thisrow is active and current cell is in bounds
829
+ if (thisRow &&
830
+ (rowIndex < range.startRowIndex || rowIndex > range.endRowIndex)) {
831
+ return undefined;
832
+ }
833
+ return {
834
+ range: __assign(__assign({}, range), { startRowIndex: thisRow
835
+ ? rowIndex
836
+ : range.startRowIndex + headerRowOffset, endRowIndex: thisRow ? rowIndex : range.endRowIndex - totalRowOffset, startColumnIndex: startColumnIndex, endColumnIndex: endColumnIndex }),
837
+ sheetName: sheet.name,
838
+ };
839
+ }
840
+ };
841
+ /**
842
+ * Tokenize a string in the back-end
843
+ * @param value
844
+ * @param sheetId
845
+ * @param activeCell
846
+ * @returns
847
+ */
848
+ this.tokenize = function (value, sheetId, activeCell) {
849
+ var e_6, _a;
850
+ var _b, _c, _d;
851
+ var tokens = (_b = defaultTokenizer === null || defaultTokenizer === void 0 ? void 0 : defaultTokenizer(value)) !== null && _b !== void 0 ? _b : [];
852
+ var index = -1;
853
+ try {
854
+ for (var tokens_1 = __values(tokens), tokens_1_1 = tokens_1.next(); !tokens_1_1.done; tokens_1_1 = tokens_1.next()) {
855
+ var token = tokens_1_1.value;
856
+ if (token.selection) {
857
+ token["index"] = ++index;
858
+ }
859
+ if (token.isNamedRange) {
860
+ if ((_c = _this.getSelectionFromNamedRange) === null || _c === void 0 ? void 0 : _c.call(_this, token.image)) {
861
+ token["index"] = ++index;
862
+ }
863
+ else {
864
+ delete token["index"];
865
+ }
866
+ }
867
+ if (token.structured) {
868
+ if ((_d = _this.getSelectionFromTable) === null || _d === void 0 ? void 0 : _d.call(_this, sheetId, activeCell, token.tableName, token.columnNames, token.thisRow, token.specialItem)) {
869
+ token["index"] = ++index;
870
+ }
871
+ else {
872
+ delete token["index"];
873
+ }
874
+ }
875
+ }
876
+ }
877
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
878
+ finally {
879
+ try {
880
+ if (tokens_1_1 && !tokens_1_1.done && (_a = tokens_1.return)) _a.call(tokens_1);
881
+ }
882
+ finally { if (e_6) throw e_6.error; }
883
+ }
884
+ return tokens;
885
+ };
886
+ /**
887
+ * Get selections from a formula
888
+ * @param value
889
+ * @param sheetId
890
+ * @param activeCell
891
+ * @returns
892
+ */
893
+ this.getSelectionFromFormula = function (value, sheetId, activeCell) {
894
+ var sheet = _this.getSheet(sheetId);
895
+ return generateSelectionsFromFormula(value, sheetId, sheet.name, activeCell, sheet.rowCount, sheet.columnCount, function (formulaValue) {
896
+ return _this.tokenize(formulaValue, sheetId, activeCell);
897
+ }, function (id, cell, tableName, columnNames, thisRow, specialItem) {
898
+ return _this.getSelectionFromTable(id, cell, tableName, columnNames, thisRow, specialItem);
899
+ }, _this.getSelectionFromNamedRange);
900
+ };
901
+ this.getGridValuesForPivot = function (range) {
902
+ var _a;
903
+ var headers = [];
904
+ var rows = [];
905
+ for (var rowIndex = range.startRowIndex; rowIndex <= range.endRowIndex; rowIndex++) {
906
+ var row = [];
907
+ var isHeader = rowIndex === range.startRowIndex;
908
+ for (var columnIndex = range.startColumnIndex; columnIndex <= range.endColumnIndex; columnIndex++) {
909
+ row.push((_a = _this.getEffectiveValue(range.sheetId, rowIndex, columnIndex)) !== null && _a !== void 0 ? _a : "");
910
+ }
911
+ if (isHeader) {
912
+ headers = row;
913
+ }
914
+ else {
915
+ rows.push(row);
916
+ }
917
+ }
918
+ return {
919
+ headers: headers,
920
+ rows: rows,
921
+ };
922
+ };
923
+ this._getEffectiveStructuredValue = options === null || options === void 0 ? void 0 : options.getEffectiveStructuredValue;
924
+ this._calculationInterface = new CalculationInterface({
925
+ locale: this.locale,
926
+ createWorker: options === null || options === void 0 ? void 0 : options.createCalculationWorker,
927
+ iterativeCalculation: options === null || options === void 0 ? void 0 : options.iterativeCalculation,
928
+ clientOnlyFunctionPattern: options === null || options === void 0 ? void 0 : options.clientOnlyFunctionPattern,
929
+ getSheetName: this.getSheetName,
930
+ getSheetId: function (sheetName) {
931
+ return _this.getSheetId(sheetName, { fallbackToActiveSheet: false });
932
+ },
933
+ getSheets: function () { return _this.sheets; },
934
+ getTables: function () { return _this.tables; },
935
+ getNamedRanges: function () { return _this.namedRanges; },
936
+ getFinalUserEnteredValue: this.getFinalUserEnteredValue,
937
+ getEffectiveValue: this.getEffectiveValueForCalculation,
938
+ getEffectiveStructuredValue: options === null || options === void 0 ? void 0 : options.getEffectiveStructuredValue,
939
+ onResults: this.applyCalculationResults,
940
+ });
941
+ this.enqueueCalculation = function (operation) {
942
+ _this._calculationInterface.enqueueCalculation(operation);
943
+ };
944
+ this.enqueueGraphOperation = function (operation) {
945
+ _this._calculationInterface.enqueueGraphOperation(operation);
946
+ };
947
+ this.enqueueStructureChange = function (change) {
948
+ _this._calculationInterface.enqueueStructureChange(change);
949
+ };
950
+ }
951
+ Spreadsheet.prototype.rebuildGraph = function () {
952
+ if (this.skipDag) {
953
+ return;
954
+ }
955
+ this._calculationInterface.rebuildGraph(this.collectFormulaOperations());
956
+ this.addConditionalFormattingToGraph();
957
+ this.addDataValidationsToGraph();
958
+ };
959
+ /**
960
+ * Add conditional formatting rules to the dependency graph.
961
+ * @param sheetId - Optional sheet ID to restrict to a specific sheet
962
+ */
963
+ Spreadsheet.prototype.addConditionalFormattingToGraph = function (sheetId) {
964
+ var e_7, _a, e_8, _b, e_9, _c;
965
+ var _d;
966
+ var restrictToSheet = typeof sheetId === "number";
967
+ try {
968
+ for (var _e = __values((_d = this.conditionalFormats) !== null && _d !== void 0 ? _d : []), _f = _e.next(); !_f.done; _f = _e.next()) {
969
+ var rule = _f.value;
970
+ if (rule.enabled === false) {
971
+ continue;
972
+ }
973
+ if (isConditionalFormatFormulaRule(rule)) {
974
+ try {
975
+ for (var _g = (e_8 = void 0, __values(rule.ranges)), _h = _g.next(); !_h.done; _h = _g.next()) {
976
+ var range = _h.value;
977
+ if (restrictToSheet && range.sheetId !== sheetId) {
978
+ continue;
979
+ }
980
+ try {
981
+ for (var _j = (e_9 = void 0, __values(iterateCellsInRange(range))), _k = _j.next(); !_k.done; _k = _j.next()) {
982
+ var _l = __read(_k.value, 2), rowIndex = _l[0], columnIndex = _l[1];
983
+ this.enqueueGraphOperation({
984
+ position: {
985
+ rowIndex: rowIndex,
986
+ columnIndex: columnIndex,
987
+ sheetId: range.sheetId,
988
+ conditionalFormatId: rule.id,
989
+ },
990
+ type: "add",
991
+ });
992
+ }
993
+ }
994
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
995
+ finally {
996
+ try {
997
+ if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
998
+ }
999
+ finally { if (e_9) throw e_9.error; }
1000
+ }
1001
+ }
1002
+ }
1003
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
1004
+ finally {
1005
+ try {
1006
+ if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
1007
+ }
1008
+ finally { if (e_8) throw e_8.error; }
1009
+ }
1010
+ }
1011
+ }
1012
+ }
1013
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
1014
+ finally {
1015
+ try {
1016
+ if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
1017
+ }
1018
+ finally { if (e_7) throw e_7.error; }
1019
+ }
1020
+ };
1021
+ /**
1022
+ * Add data validation rules to the dependency graph.
1023
+ * @param sheetId - Optional sheet ID to restrict to a specific sheet
1024
+ */
1025
+ Spreadsheet.prototype.addDataValidationsToGraph = function (sheetId) {
1026
+ var e_10, _a, e_11, _b, e_12, _c;
1027
+ var _d;
1028
+ var restrictToSheet = typeof sheetId === "number";
1029
+ try {
1030
+ for (var _e = __values((_d = this.dataValidations) !== null && _d !== void 0 ? _d : []), _f = _e.next(); !_f.done; _f = _e.next()) {
1031
+ var rule = _f.value;
1032
+ if (isDataValidationFormulaRule(rule)) {
1033
+ try {
1034
+ for (var _g = (e_11 = void 0, __values(rule.ranges)), _h = _g.next(); !_h.done; _h = _g.next()) {
1035
+ var range = _h.value;
1036
+ if (restrictToSheet && range.sheetId !== sheetId) {
1037
+ continue;
1038
+ }
1039
+ try {
1040
+ for (var _j = (e_12 = void 0, __values(iterateCellsInRange(range))), _k = _j.next(); !_k.done; _k = _j.next()) {
1041
+ var _l = __read(_k.value, 2), rowIndex = _l[0], columnIndex = _l[1];
1042
+ this.enqueueGraphOperation({
1043
+ position: {
1044
+ rowIndex: rowIndex,
1045
+ columnIndex: columnIndex,
1046
+ sheetId: range.sheetId,
1047
+ dataValidationId: rule.id,
1048
+ },
1049
+ type: "add",
1050
+ });
1051
+ }
1052
+ }
1053
+ catch (e_12_1) { e_12 = { error: e_12_1 }; }
1054
+ finally {
1055
+ try {
1056
+ if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
1057
+ }
1058
+ finally { if (e_12) throw e_12.error; }
1059
+ }
1060
+ }
1061
+ }
1062
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
1063
+ finally {
1064
+ try {
1065
+ if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
1066
+ }
1067
+ finally { if (e_11) throw e_11.error; }
1068
+ }
1069
+ }
1070
+ }
1071
+ }
1072
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
1073
+ finally {
1074
+ try {
1075
+ if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
1076
+ }
1077
+ finally { if (e_10) throw e_10.error; }
1078
+ }
1079
+ };
1080
+ Object.defineProperty(Spreadsheet.prototype, "sharedStrings", {
1081
+ get: function () {
1082
+ return this._sharedStrings;
1083
+ },
1084
+ set: function (value) {
1085
+ this._sharedStrings = value;
1086
+ },
1087
+ enumerable: false,
1088
+ configurable: true
1089
+ });
1090
+ Object.defineProperty(Spreadsheet.prototype, "activeSheetId", {
1091
+ get: function () {
1092
+ return this._activeSheetId;
1093
+ },
1094
+ set: function (value) {
1095
+ this._activeSheetId = value;
1096
+ },
1097
+ enumerable: false,
1098
+ configurable: true
1099
+ });
1100
+ Object.defineProperty(Spreadsheet.prototype, "sheets", {
1101
+ get: function () {
1102
+ return this._sheets;
1103
+ },
1104
+ set: function (value) {
1105
+ this._sheets = value;
1106
+ this._calculationInterface.markMetadataDirty();
1107
+ },
1108
+ enumerable: false,
1109
+ configurable: true
1110
+ });
1111
+ Object.defineProperty(Spreadsheet.prototype, "charts", {
1112
+ get: function () {
1113
+ return this._charts;
1114
+ },
1115
+ set: function (value) {
1116
+ this._charts = value;
1117
+ },
1118
+ enumerable: false,
1119
+ configurable: true
1120
+ });
1121
+ Object.defineProperty(Spreadsheet.prototype, "embeds", {
1122
+ get: function () {
1123
+ return this._embeds;
1124
+ },
1125
+ set: function (value) {
1126
+ this._embeds = value;
1127
+ },
1128
+ enumerable: false,
1129
+ configurable: true
1130
+ });
1131
+ Object.defineProperty(Spreadsheet.prototype, "pivotTables", {
1132
+ get: function () {
1133
+ return this._pivotTables;
1134
+ },
1135
+ set: function (value) {
1136
+ this._pivotTables = value;
1137
+ },
1138
+ enumerable: false,
1139
+ configurable: true
1140
+ });
1141
+ Object.defineProperty(Spreadsheet.prototype, "citations", {
1142
+ get: function () {
1143
+ return this._citations;
1144
+ },
1145
+ set: function (value) {
1146
+ this._citations = value;
1147
+ },
1148
+ enumerable: false,
1149
+ configurable: true
1150
+ });
1151
+ Object.defineProperty(Spreadsheet.prototype, "namedRanges", {
1152
+ get: function () {
1153
+ return this._namedRanges;
1154
+ },
1155
+ set: function (value) {
1156
+ this._namedRanges = value;
1157
+ this._calculationInterface.markMetadataDirty();
1158
+ },
1159
+ enumerable: false,
1160
+ configurable: true
1161
+ });
1162
+ Object.defineProperty(Spreadsheet.prototype, "dataValidations", {
1163
+ get: function () {
1164
+ return this._dataValidations;
1165
+ },
1166
+ set: function (value) {
1167
+ this._dataValidations = value;
1168
+ },
1169
+ enumerable: false,
1170
+ configurable: true
1171
+ });
1172
+ Object.defineProperty(Spreadsheet.prototype, "conditionalFormats", {
1173
+ get: function () {
1174
+ return this._conditionalFormats;
1175
+ },
1176
+ set: function (value) {
1177
+ this._conditionalFormats = value;
1178
+ },
1179
+ enumerable: false,
1180
+ configurable: true
1181
+ });
1182
+ Object.defineProperty(Spreadsheet.prototype, "sheetData", {
1183
+ get: function () {
1184
+ return this._sheetData;
1185
+ },
1186
+ set: function (sheetData) {
1187
+ this._sheetData = sheetData;
1188
+ },
1189
+ enumerable: false,
1190
+ configurable: true
1191
+ });
1192
+ Object.defineProperty(Spreadsheet.prototype, "tables", {
1193
+ get: function () {
1194
+ return this._tables;
1195
+ },
1196
+ set: function (value) {
1197
+ this._tables = value;
1198
+ this._calculationInterface.markMetadataDirty();
1199
+ },
1200
+ enumerable: false,
1201
+ configurable: true
1202
+ });
1203
+ Object.defineProperty(Spreadsheet.prototype, "locale", {
1204
+ get: function () {
1205
+ return this._locale;
1206
+ },
1207
+ set: function (value) {
1208
+ this._locale = value;
1209
+ this._calculationInterface.markMetadataDirty();
1210
+ },
1211
+ enumerable: false,
1212
+ configurable: true
1213
+ });
1214
+ Object.defineProperty(Spreadsheet.prototype, "cellXfs", {
1215
+ get: function () {
1216
+ return this._cellXfs;
1217
+ },
1218
+ set: function (value) {
1219
+ this._cellXfs = value;
1220
+ },
1221
+ enumerable: false,
1222
+ configurable: true
1223
+ });
1224
+ Object.defineProperty(Spreadsheet.prototype, "patches", {
1225
+ get: function () {
1226
+ return this._patches;
1227
+ },
1228
+ set: function (value) {
1229
+ this._patches = value;
1230
+ },
1231
+ enumerable: false,
1232
+ configurable: true
1233
+ });
1234
+ Spreadsheet.prototype.clearPatches = function () {
1235
+ this._patches = [];
1236
+ };
1237
+ Object.defineProperty(Spreadsheet.prototype, "cellXfsRegistry", {
1238
+ get: function () {
1239
+ return new CellXfsRegistry(this.cellXfs, this.onChangeCellXfs);
1240
+ },
1241
+ enumerable: false,
1242
+ configurable: true
1243
+ });
1244
+ Object.defineProperty(Spreadsheet.prototype, "sharedStringRegistry", {
1245
+ get: function () {
1246
+ return new SharedStringRegistry(this.sharedStrings, this.onChangeSharedStrings);
1247
+ },
1248
+ enumerable: false,
1249
+ configurable: true
1250
+ });
1251
+ Spreadsheet.prototype.getSharedStringValue = function (cellData) {
1252
+ if ((cellData === null || cellData === void 0 ? void 0 : cellData.ss) == null) {
1253
+ return undefined;
1254
+ }
1255
+ var value = this.sharedStrings.get(String(cellData.ss));
1256
+ if (value == null) {
1257
+ return undefined;
1258
+ }
1259
+ // Entries may be plain strings OR rich `{text, runs}` objects — mirror the
1260
+ // hooks' getSharedStringValue, which resolves the rich form's text.
1261
+ return getSharedStringText(value);
1262
+ };
1263
+ Spreadsheet.prototype.getHyperLink = function (sheetId, rowIndex, columnIndex) {
1264
+ var _a;
1265
+ return (_a = this.getCellData(sheetId, rowIndex, columnIndex)) === null || _a === void 0 ? void 0 : _a.hyperlink;
1266
+ };
1267
+ Spreadsheet.prototype.getHyperlinkText = function (hyperlink) {
1268
+ if (!hyperlink) {
1269
+ return undefined;
1270
+ }
1271
+ if (typeof hyperlink === "string") {
1272
+ return hyperlink;
1273
+ }
1274
+ if (hyperlink.kind === "external") {
1275
+ return hyperlink.url;
1276
+ }
1277
+ return hyperlink.location;
1278
+ };
1279
+ Spreadsheet.prototype.getCellData = function (sheetId, rowIndex, columnIndex) {
1280
+ var _a, _b, _c, _d;
1281
+ return (_d = (_c = (_b = (_a = this.sheetData) === null || _a === void 0 ? void 0 : _a[sheetId]) === null || _b === void 0 ? void 0 : _b[rowIndex]) === null || _c === void 0 ? void 0 : _c.values) === null || _d === void 0 ? void 0 : _d[columnIndex];
1282
+ };
1283
+ /**
1284
+ * Get sheet
1285
+ * @param sheetId
1286
+ * @returns
1287
+ */
1288
+ Spreadsheet.prototype.getSheet = function (sheetId) {
1289
+ var sheet = this.sheets.find(function (sheet) { return sheet.sheetId === sheetId; });
1290
+ return new SheetInterface(sheet);
1291
+ };
1292
+ Spreadsheet.prototype.flushCalculations = function () {
1293
+ return __awaiter(this, void 0, void 0, function () {
1294
+ return __generator(this, function (_a) {
1295
+ switch (_a.label) {
1296
+ case 0: return [4 /*yield*/, this._calculationInterface.flush()];
1297
+ case 1:
1298
+ _a.sent();
1299
+ return [2 /*return*/];
1300
+ }
1301
+ });
1302
+ });
1303
+ };
1304
+ Spreadsheet.prototype.calculateAll = function () {
1305
+ return __awaiter(this, void 0, void 0, function () {
1306
+ var operations;
1307
+ return __generator(this, function (_a) {
1308
+ operations = this.collectFormulaOperations();
1309
+ if (!operations.length) {
1310
+ return [2 /*return*/, []];
1311
+ }
1312
+ return [2 /*return*/, this._calculationInterface.calculate(operations)];
1313
+ });
1314
+ });
1315
+ };
1316
+ Spreadsheet.prototype.calculatePending = function () {
1317
+ return __awaiter(this, void 0, void 0, function () {
1318
+ return __generator(this, function (_a) {
1319
+ return [2 /*return*/, this._calculationInterface.flushWithResults()];
1320
+ });
1321
+ });
1322
+ };
1323
+ /**
1324
+ * Get text format for a cell (for auto-sizing)
1325
+ */
1326
+ /**
1327
+ * Rich-text runs for a cell, read off the SharedStrings entry the cell
1328
+ * points at via `ss` (same source as the hooks' `getTextFormatRuns`).
1329
+ */
1330
+ Spreadsheet.prototype.getCellTextFormatRuns = function (sheetId, rowIndex, columnIndex) {
1331
+ var cellData = this.getCellData(sheetId, rowIndex, columnIndex);
1332
+ if ((cellData === null || cellData === void 0 ? void 0 : cellData.ss) == null)
1333
+ return undefined;
1334
+ return getSharedStringRuns(this.sharedStrings.get(String(cellData.ss)));
1335
+ };
1336
+ Spreadsheet.prototype.getCellTextFormat = function (sheetId, rowIndex, columnIndex) {
1337
+ var _a, _b, _c, _d, _e, _f;
1338
+ var cellData = this.getCellData(sheetId, rowIndex, columnIndex);
1339
+ // `ef` is no longer persisted on cellData. Read `uf` first, fall back to
1340
+ // legacy `ef` for older saved data.
1341
+ var effectiveFormat = (_a = getCellUserEnteredFormat(cellData)) !== null && _a !== void 0 ? _a : getCellEffectiveFormat(cellData);
1342
+ // Registry
1343
+ if (isStyleReference(effectiveFormat)) {
1344
+ effectiveFormat = this.cellXfsRegistry.getCellXfsFromStyleId((_b = effectiveFormat.sid) !== null && _b !== void 0 ? _b : effectiveFormat.styleId);
1345
+ }
1346
+ return {
1347
+ bold: (_c = effectiveFormat === null || effectiveFormat === void 0 ? void 0 : effectiveFormat.textFormat) === null || _c === void 0 ? void 0 : _c.bold,
1348
+ fontSize: (_d = effectiveFormat === null || effectiveFormat === void 0 ? void 0 : effectiveFormat.textFormat) === null || _d === void 0 ? void 0 : _d.fontSize,
1349
+ fontFamily: (_e = effectiveFormat === null || effectiveFormat === void 0 ? void 0 : effectiveFormat.textFormat) === null || _e === void 0 ? void 0 : _e.fontFamily,
1350
+ italic: (_f = effectiveFormat === null || effectiveFormat === void 0 ? void 0 : effectiveFormat.textFormat) === null || _f === void 0 ? void 0 : _f.italic,
1351
+ shouldWrap: (effectiveFormat === null || effectiveFormat === void 0 ? void 0 : effectiveFormat.wrapStrategy) === "wrap",
1352
+ };
1353
+ };
1354
+ Spreadsheet.prototype.shouldWrapCell = function (sheetId, rowIndex, columnIndex) {
1355
+ var cellFormat = this.getCellTextFormat(sheetId, rowIndex, columnIndex);
1356
+ return cellFormat === null || cellFormat === void 0 ? void 0 : cellFormat.shouldWrap;
1357
+ };
1358
+ /**
1359
+ * Get column width from sheet metadata (stored width)
1360
+ */
1361
+ Spreadsheet.prototype.getStoredColumnWidth = function (sheetId, columnIndex) {
1362
+ var _a, _b, _c;
1363
+ var sheet = this.sheets.find(function (s) { return s.sheetId === sheetId; });
1364
+ return (_c = (_b = (_a = sheet === null || sheet === void 0 ? void 0 : sheet.columnMetadata) === null || _a === void 0 ? void 0 : _a[columnIndex]) === null || _b === void 0 ? void 0 : _b.size) !== null && _c !== void 0 ? _c : DEFAULT_COLUMN_WIDTH;
1365
+ };
1366
+ /**
1367
+ * Check if a column is hidden
1368
+ */
1369
+ Spreadsheet.prototype.isHiddenColumn = function (sheetId, columnIndex) {
1370
+ var _a, _b, _c;
1371
+ var sheet = this.sheets.find(function (s) { return s.sheetId === sheetId; });
1372
+ var metadata = (_a = sheet === null || sheet === void 0 ? void 0 : sheet.columnMetadata) === null || _a === void 0 ? void 0 : _a[columnIndex];
1373
+ return (_c = (_b = metadata === null || metadata === void 0 ? void 0 : metadata.hiddenByUser) !== null && _b !== void 0 ? _b : metadata === null || metadata === void 0 ? void 0 : metadata.hiddenByFilter) !== null && _c !== void 0 ? _c : false;
1374
+ };
1375
+ /**
1376
+ * Check if a row is hidden
1377
+ */
1378
+ Spreadsheet.prototype.isHiddenRow = function (sheetId, rowIndex) {
1379
+ var _a, _b, _c;
1380
+ var sheet = this.sheets.find(function (s) { return s.sheetId === sheetId; });
1381
+ var metadata = (_a = sheet === null || sheet === void 0 ? void 0 : sheet.rowMetadata) === null || _a === void 0 ? void 0 : _a[rowIndex];
1382
+ return (_c = (_b = metadata === null || metadata === void 0 ? void 0 : metadata.hiddenByUser) !== null && _b !== void 0 ? _b : metadata === null || metadata === void 0 ? void 0 : metadata.hiddenByFilter) !== null && _c !== void 0 ? _c : false;
1383
+ };
1384
+ /**
1385
+ * Generate RFC patches that can be used to
1386
+ * update yJS doc
1387
+ * @returns
1388
+ */
1389
+ Spreadsheet.prototype.generateStatePatches = function () {
1390
+ return __awaiter(this, void 0, void 0, function () {
1391
+ var spreadsheetPatches, promises;
1392
+ var _this = this;
1393
+ return __generator(this, function (_a) {
1394
+ switch (_a.label) {
1395
+ case 0:
1396
+ spreadsheetPatches = [];
1397
+ promises = [];
1398
+ // Sheet data
1399
+ promises.push(new Promise(function (resolve) {
1400
+ var _a;
1401
+ (_a = _this.onChangeSheetData) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
1402
+ var _a = __read(produceWithPatches({}, function () {
1403
+ return prev;
1404
+ }), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
1405
+ spreadsheetPatches.push([
1406
+ {
1407
+ sheetData: { patches: patches, inversePatches: inversePatches },
1408
+ },
1409
+ ]);
1410
+ resolve();
1411
+ return prev;
1412
+ });
1413
+ }));
1414
+ // onChangeSheets
1415
+ promises.push(new Promise(function (resolve) {
1416
+ var _a;
1417
+ (_a = _this.onChangeSheets) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
1418
+ var _a = __read(produceWithPatches([], function () {
1419
+ return prev;
1420
+ }), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
1421
+ spreadsheetPatches.push([
1422
+ {
1423
+ sheets: { patches: patches, inversePatches: inversePatches },
1424
+ },
1425
+ ]);
1426
+ resolve();
1427
+ return prev;
1428
+ });
1429
+ }));
1430
+ // onChangeTables
1431
+ promises.push(new Promise(function (resolve) {
1432
+ var _a;
1433
+ (_a = _this.onChangeTables) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
1434
+ var _a = __read(produceWithPatches([], function () {
1435
+ return prev;
1436
+ }), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
1437
+ spreadsheetPatches.push([
1438
+ {
1439
+ tables: { patches: patches, inversePatches: inversePatches },
1440
+ },
1441
+ ]);
1442
+ resolve();
1443
+ return prev;
1444
+ });
1445
+ }));
1446
+ // onChangeCharts
1447
+ promises.push(new Promise(function (resolve) {
1448
+ var _a;
1449
+ (_a = _this.onChangeCharts) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
1450
+ var _a = __read(produceWithPatches([], function () {
1451
+ return prev;
1452
+ }), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
1453
+ spreadsheetPatches.push([
1454
+ {
1455
+ charts: { patches: patches, inversePatches: inversePatches },
1456
+ },
1457
+ ]);
1458
+ resolve();
1459
+ return prev;
1460
+ });
1461
+ }));
1462
+ // onChangeEmbeds
1463
+ promises.push(new Promise(function (resolve) {
1464
+ var _a;
1465
+ (_a = _this.onChangeEmbeds) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
1466
+ var _a = __read(produceWithPatches([], function () {
1467
+ return prev;
1468
+ }), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
1469
+ spreadsheetPatches.push([
1470
+ {
1471
+ embeds: { patches: patches, inversePatches: inversePatches },
1472
+ },
1473
+ ]);
1474
+ resolve();
1475
+ return prev;
1476
+ });
1477
+ }));
1478
+ // onChangeNamedRanges
1479
+ promises.push(new Promise(function (resolve) {
1480
+ var _a;
1481
+ (_a = _this.onChangeNamedRanges) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
1482
+ var _a = __read(produceWithPatches([], function () {
1483
+ return prev;
1484
+ }), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
1485
+ spreadsheetPatches.push([
1486
+ {
1487
+ namedRanges: { patches: patches, inversePatches: inversePatches },
1488
+ },
1489
+ ]);
1490
+ resolve();
1491
+ return prev;
1492
+ });
1493
+ }));
1494
+ // onChangeSharedStrings
1495
+ promises.push(new Promise(function (resolve) {
1496
+ var _a;
1497
+ (_a = _this.onChangeSharedStrings) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
1498
+ // Always use Map for shared strings
1499
+ var base = new Map();
1500
+ var _a = __read(produceWithPatches(base, function () {
1501
+ return prev;
1502
+ }), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
1503
+ spreadsheetPatches.push([
1504
+ {
1505
+ sharedStrings: { patches: patches, inversePatches: inversePatches },
1506
+ },
1507
+ ]);
1508
+ resolve();
1509
+ return prev;
1510
+ });
1511
+ }));
1512
+ // onChangeDataValidations
1513
+ promises.push(new Promise(function (resolve) {
1514
+ var _a;
1515
+ (_a = _this.onChangeDataValidations) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
1516
+ var _a = __read(produceWithPatches([], function () {
1517
+ return prev;
1518
+ }), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
1519
+ spreadsheetPatches.push([
1520
+ {
1521
+ dataValidations: { patches: patches, inversePatches: inversePatches },
1522
+ },
1523
+ ]);
1524
+ resolve();
1525
+ return prev;
1526
+ });
1527
+ }));
1528
+ // onChangeConditionalFormats
1529
+ promises.push(new Promise(function (resolve) {
1530
+ var _a;
1531
+ (_a = _this.onChangeConditionalFormats) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
1532
+ var _a = __read(produceWithPatches([], function () {
1533
+ return prev;
1534
+ }), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
1535
+ spreadsheetPatches.push([
1536
+ {
1537
+ conditionalFormats: { patches: patches, inversePatches: inversePatches },
1538
+ },
1539
+ ]);
1540
+ resolve();
1541
+ return prev;
1542
+ });
1543
+ }));
1544
+ // onChangeCellXfs
1545
+ promises.push(new Promise(function (resolve) {
1546
+ var _a;
1547
+ (_a = _this.onChangeCellXfs) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
1548
+ var _a = __read(produceWithPatches([], function () {
1549
+ return prev;
1550
+ }), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
1551
+ spreadsheetPatches.push([
1552
+ {
1553
+ cellXfs: { patches: patches, inversePatches: inversePatches },
1554
+ },
1555
+ ]);
1556
+ resolve();
1557
+ return prev;
1558
+ });
1559
+ }));
1560
+ // onChangeCitations
1561
+ promises.push(new Promise(function (resolve) {
1562
+ var _a;
1563
+ (_a = _this.onChangeCitations) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
1564
+ var _a = __read(produceWithPatches([], function () {
1565
+ return prev;
1566
+ }), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
1567
+ spreadsheetPatches.push([
1568
+ {
1569
+ citations: { patches: patches, inversePatches: inversePatches },
1570
+ },
1571
+ ]);
1572
+ resolve();
1573
+ return prev;
1574
+ });
1575
+ }));
1576
+ // Wait for all callbacks to complete
1577
+ return [4 /*yield*/, Promise.all(promises)];
1578
+ case 1:
1579
+ // Wait for all callbacks to complete
1580
+ _a.sent();
1581
+ return [2 /*return*/, spreadsheetPatches];
1582
+ }
1583
+ });
1584
+ });
1585
+ };
1586
+ /**
1587
+ * Get patches as tuples for applyPatchesToYDoc
1588
+ * @param type - The operation type ('redo' or 'undo')
1589
+ * @returns Array of tuples in the format expected by applyPatchesToYDoc
1590
+ */
1591
+ Spreadsheet.prototype.getPatchTuples = function (type) {
1592
+ if (type === void 0) { type = "redo"; }
1593
+ return this._patches.map(function (patch) { return [patch, type]; });
1594
+ };
1595
+ /**
1596
+ * Insert note in a cell
1597
+ * @param args
1598
+ */
1599
+ Spreadsheet.prototype.insertNote = function () {
1600
+ var args = [];
1601
+ for (var _i = 0; _i < arguments.length; _i++) {
1602
+ args[_i] = arguments[_i];
1603
+ }
1604
+ insertNote({
1605
+ createHistory: this.createHistory,
1606
+ locale: this.locale,
1607
+ onChangeSheetData: this.onChangeSheetData,
1608
+ }).apply(void 0, __spreadArray([], __read(args), false));
1609
+ };
1610
+ /**
1611
+ * Inserts table row
1612
+ * @param tableView
1613
+ * @param relativeRowIndex
1614
+ * @param rowData
1615
+ */
1616
+ Spreadsheet.prototype.insertTableRow = function (tableView, relativeRowIndex, rowData) {
1617
+ var sheet = this.getSheet(tableView.sheetId);
1618
+ insertTableRow({
1619
+ onChangeSheets: this.onChangeSheets,
1620
+ onChangeSheetData: this.onChangeSheetData,
1621
+ onChangeTables: this.onChangeTables,
1622
+ onChangeDataValidations: this.onChangeDataValidations,
1623
+ onChangeConditionalFormats: this.onChangeConditionalFormats,
1624
+ createHistory: this.createHistory,
1625
+ enqueueCalculation: this.enqueueCalculation,
1626
+ enqueueGraphOperation: this.enqueueGraphOperation,
1627
+ enqueueStructureChange: this.enqueueStructureChange,
1628
+ getActiveCell: this.getActiveCell,
1629
+ getDependents: this.getDependents,
1630
+ getSheetName: this.getSheetName,
1631
+ rowCount: sheet.rowCount,
1632
+ columnCount: sheet.columnCount,
1633
+ })(tableView, relativeRowIndex, rowData);
1634
+ };
1635
+ /**
1636
+ * Inserts a row
1637
+ * @param sheetId
1638
+ * @param referenceRowIndex
1639
+ * @param numRows
1640
+ */
1641
+ Spreadsheet.prototype.insertRow = function (sheetId, referenceRowIndex, numRows) {
1642
+ var _this = this;
1643
+ if (numRows === void 0) { numRows = 1; }
1644
+ var sheet = this.getSheet(sheetId);
1645
+ insertRow({
1646
+ onChangeSheets: this.onChangeSheets,
1647
+ onChangeSheetData: this.onChangeSheetData,
1648
+ onChangeTables: this.onChangeTables,
1649
+ onChangeDataValidations: this.onChangeDataValidations,
1650
+ onChangeConditionalFormats: this.onChangeConditionalFormats,
1651
+ createHistory: this.createHistory,
1652
+ enqueueCalculation: this.enqueueCalculation,
1653
+ enqueueGraphOperation: this.enqueueGraphOperation,
1654
+ enqueueStructureChange: this.enqueueStructureChange,
1655
+ getActiveCell: this.getActiveCell,
1656
+ getSelections: this.getSelections,
1657
+ getDependents: this.getDependents,
1658
+ getGraphNodes: function () { return _this._calculationInterface.getNodes(); },
1659
+ getGraphNodesInSheet: function (sheetId) {
1660
+ return _this._calculationInterface.getNodesInSheet(sheetId);
1661
+ },
1662
+ getSheetName: this.getSheetName,
1663
+ rowCount: sheet.rowCount,
1664
+ columnCount: sheet.columnCount,
1665
+ })(sheetId, referenceRowIndex, numRows);
1666
+ };
1667
+ /**
1668
+ * Inserts a column
1669
+ * @param sheetId
1670
+ * @param referenceColumnIndex
1671
+ * @param numColumns
1672
+ */
1673
+ Spreadsheet.prototype.insertColumn = function (sheetId, referenceColumnIndex, numColumns) {
1674
+ var _this = this;
1675
+ if (numColumns === void 0) { numColumns = 1; }
1676
+ var sheet = this.getSheet(sheetId);
1677
+ insertColumn({
1678
+ onChangeSheets: this.onChangeSheets,
1679
+ onChangeSheetData: this.onChangeSheetData,
1680
+ onChangeTables: this.onChangeTables,
1681
+ onChangeDataValidations: this.onChangeDataValidations,
1682
+ onChangeConditionalFormats: this.onChangeConditionalFormats,
1683
+ createHistory: this.createHistory,
1684
+ enqueueCalculation: this.enqueueCalculation,
1685
+ enqueueGraphOperation: this.enqueueGraphOperation,
1686
+ enqueueStructureChange: this.enqueueStructureChange,
1687
+ getDependents: this.getDependents,
1688
+ getGraphNodes: function () { return _this._calculationInterface.getNodes(); },
1689
+ getGraphNodesInSheet: function (sheetId) {
1690
+ return _this._calculationInterface.getNodesInSheet(sheetId);
1691
+ },
1692
+ getSelections: this.getSelections,
1693
+ getActiveCell: this.getActiveCell,
1694
+ getSheetName: this.getSheetName,
1695
+ rowCount: sheet.rowCount,
1696
+ columnCount: sheet.columnCount,
1697
+ tables: this.tables,
1698
+ })(sheetId, referenceColumnIndex, numColumns);
1699
+ };
1700
+ /**
1701
+ * Deletes columns
1702
+ * @param sheetId
1703
+ * @param columnIndexes
1704
+ */
1705
+ Spreadsheet.prototype.deleteColumn = function (sheetId, columnIndexes) {
1706
+ var _this = this;
1707
+ var sheet = this.getSheet(sheetId);
1708
+ deleteColumn({
1709
+ onChangeSheets: this.onChangeSheets,
1710
+ onChangeSheetData: this.onChangeSheetData,
1711
+ onChangeTables: this.onChangeTables,
1712
+ onChangeDataValidations: this.onChangeDataValidations,
1713
+ onChangeConditionalFormats: this.onChangeConditionalFormats,
1714
+ createHistory: this.createHistory,
1715
+ enqueueCalculation: this.enqueueCalculation,
1716
+ enqueueGraphOperation: this.enqueueGraphOperation,
1717
+ enqueueStructureChange: this.enqueueStructureChange,
1718
+ getDependents: this.getDependents,
1719
+ getGraphNodes: function () { return _this._calculationInterface.getNodes(); },
1720
+ getGraphNodesInSheet: function (sheetId) {
1721
+ return _this._calculationInterface.getNodesInSheet(sheetId);
1722
+ },
1723
+ getActiveCell: this.getActiveCell,
1724
+ getSelections: this.getSelections,
1725
+ getSheetName: this.getSheetName,
1726
+ rowCount: sheet.rowCount,
1727
+ columnCount: sheet.columnCount,
1728
+ locale: this.locale,
1729
+ onChangeActiveCell: this.onChangeActiveSheet,
1730
+ onChangeSelections: this.onChangeSelections,
1731
+ onChangeCitations: this.onChangeCitations,
1732
+ })(sheetId, columnIndexes);
1733
+ };
1734
+ /**
1735
+ * Update a range of cells
1736
+ * @param sheetId
1737
+ * @param ranges
1738
+ * @param values
1739
+ */
1740
+ Spreadsheet.prototype.changeBatch = function (sheetId, ranges, values, formatting, citations, changeBatchOptions) {
1741
+ var _this = this;
1742
+ var ssRegistry = this.sharedStringRegistry;
1743
+ var cellXfsRegistry = this.cellXfsRegistry;
1744
+ return changeBatch({
1745
+ createHistory: this.createHistory,
1746
+ enqueueCalculation: this.enqueueCalculation,
1747
+ onChangeSheetData: this.onChangeSheetData,
1748
+ onChangeSheets: this.onChangeSheets,
1749
+ tables: this.tables,
1750
+ onChangeTables: this.onChangeTables,
1751
+ locale: this.locale,
1752
+ getUserEnteredValue: this.getUserEnteredStringValue,
1753
+ cellXfsRegistry: cellXfsRegistry,
1754
+ getFormattedValue: this.getFormattedValue,
1755
+ getCellDimensions: this.getCellDimensions,
1756
+ getRowHeight: this.getRowHeight,
1757
+ enqueueGraphOperation: this.enqueueGraphOperation,
1758
+ getDependents: this.getDependents,
1759
+ getSheetName: this.getSheetName,
1760
+ isMergedCell: this.isMergedCell,
1761
+ getDataValidationById: this.getDataValidationById,
1762
+ sharedStringRegistry: ssRegistry,
1763
+ getEffectiveValuesFromRange: this.getEffectiveValuesFromRange,
1764
+ onChangeCitations: this.onChangeCitations,
1765
+ onChangeTableColumn: function () {
1766
+ var args = [];
1767
+ for (var _i = 0; _i < arguments.length; _i++) {
1768
+ args[_i] = arguments[_i];
1769
+ }
1770
+ return changeTableColumn({
1771
+ locale: _this.locale,
1772
+ sharedStringRegistry: ssRegistry,
1773
+ cellXfsRegistry: cellXfsRegistry,
1774
+ createHistory: _this.createHistory,
1775
+ enqueueCalculation: _this.enqueueCalculation,
1776
+ enqueueGraphOperation: _this.enqueueCalculation,
1777
+ getDependents: _this.getDependents,
1778
+ onChangeSheetData: _this.onChangeSheetData,
1779
+ onChangeTables: _this.onChangeTables,
1780
+ }).apply(void 0, __spreadArray([], __read(args), false));
1781
+ },
1782
+ onChangeCalculatedColumn: function () {
1783
+ var args = [];
1784
+ for (var _i = 0; _i < arguments.length; _i++) {
1785
+ args[_i] = arguments[_i];
1786
+ }
1787
+ return changeCalculatedColumn({
1788
+ locale: _this.locale,
1789
+ sharedStringRegistry: ssRegistry,
1790
+ cellXfsRegistry: cellXfsRegistry,
1791
+ createHistory: _this.createHistory,
1792
+ enqueueCalculation: _this.enqueueCalculation,
1793
+ onChangeTables: _this.onChangeTables,
1794
+ getSheetName: _this.getSheetName,
1795
+ getUserEnteredValue: _this.getUserEnteredStringValue,
1796
+ onChangeSheetData: _this.onChangeSheetData,
1797
+ }).apply(void 0, __spreadArray([], __read(args), false));
1798
+ },
1799
+ })(sheetId, ranges, values, formatting, citations, changeBatchOptions);
1800
+ };
1801
+ /**
1802
+ * Stream cell updates into a range
1803
+ * @param sheetId
1804
+ * @param range
1805
+ * @param stream
1806
+ */
1807
+ Spreadsheet.prototype.changeBatchStream = function (sheetId, range, stream) {
1808
+ return __awaiter(this, void 0, void 0, function () {
1809
+ return __generator(this, function (_a) {
1810
+ return [2 /*return*/, changeBatchStream({
1811
+ onChangeSheetData: this.onChangeSheetData,
1812
+ enqueueCalculation: this.enqueueCalculation,
1813
+ locale: this.locale,
1814
+ getDataValidationById: this.getDataValidationById,
1815
+ getEffectiveValuesFromRange: this.getEffectiveValuesFromRange,
1816
+ })(sheetId, range, stream)];
1817
+ });
1818
+ });
1819
+ };
1820
+ /**
1821
+ * Change cell formatting
1822
+ * @param args
1823
+ */
1824
+ Spreadsheet.prototype.changeFormatting = function () {
1825
+ var args = [];
1826
+ for (var _i = 0; _i < arguments.length; _i++) {
1827
+ args[_i] = arguments[_i];
1828
+ }
1829
+ changeFormatting({
1830
+ getFormattedValue: this.getFormattedValue,
1831
+ createHistory: this.createHistory,
1832
+ enqueueCalculation: this.enqueueCalculation,
1833
+ onChangeSheetData: this.onChangeSheetData,
1834
+ onChangeSheets: this.onChangeSheets,
1835
+ locale: this.locale,
1836
+ cellXfsRegistry: this.cellXfsRegistry,
1837
+ getCellDimensions: this.getCellDimensions,
1838
+ getRowHeight: this.getRowHeight,
1839
+ }).apply(void 0, __spreadArray([], __read(args), false));
1840
+ };
1841
+ /**
1842
+ * Change cell border
1843
+ * @param sheetId
1844
+ * @param activeCell
1845
+ * @param selections
1846
+ * @param location
1847
+ * @param color
1848
+ * @param style
1849
+ */
1850
+ Spreadsheet.prototype.changeBorder = function (sheetId, activeCell, selections, location, color, style) {
1851
+ if (style === void 0) { style = "solid"; }
1852
+ changeBorder({
1853
+ getFormattedValue: this.getFormattedValue,
1854
+ createHistory: this.createHistory,
1855
+ enqueueCalculation: this.enqueueCalculation,
1856
+ onChangeSheetData: this.onChangeSheetData,
1857
+ onChangeSheets: this.onChangeSheets,
1858
+ locale: this.locale,
1859
+ cellXfsRegistry: this.cellXfsRegistry,
1860
+ })(sheetId, activeCell, selections, location, color, style);
1861
+ };
1862
+ /**
1863
+ * Create a new table spec
1864
+ * @param sheetId
1865
+ * @param activeCell
1866
+ * @param selections
1867
+ * @param tableSpec
1868
+ * @param theme
1869
+ * @param bandedRange
1870
+ */
1871
+ Spreadsheet.prototype.createTable = function (sheetId, activeCell, selections, tableSpec, theme, bandedRange) {
1872
+ var sheet = this.getSheet(sheetId);
1873
+ return createTable({
1874
+ locale: this.locale,
1875
+ rowCount: sheet.rowCount,
1876
+ columnCount: sheet.columnCount,
1877
+ createHistory: this.createHistory,
1878
+ enqueueCalculation: this.enqueueCalculation,
1879
+ enqueueGraphOperation: this.enqueueGraphOperation,
1880
+ getDependents: this.getDependents,
1881
+ onChangeSheetData: this.onChangeSheetData,
1882
+ onChangeSheets: this.onChangeSheets,
1883
+ onChangeTables: this.onChangeTables,
1884
+ onRequestCalculate: this.onRequestCalculate,
1885
+ getEffectiveValue: this.getEffectiveValue,
1886
+ getFormattedValue: this.getFormattedValue,
1887
+ getContentfulRangeAroundCell: this.getContentfulRangeAroundCell,
1888
+ getSheetName: this.getSheetName,
1889
+ theme: defaultSpreadsheetTheme,
1890
+ })(sheetId, activeCell, selections, tableSpec, theme, bandedRange);
1891
+ };
1892
+ /**
1893
+ * Updates an existing table spec
1894
+ * @param sheetId
1895
+ * @param updatedTable
1896
+ * @param previousTable
1897
+ */
1898
+ Spreadsheet.prototype.updateTable = function (sheetId, tableId, updatedTable) {
1899
+ return updateTable({
1900
+ locale: this.locale,
1901
+ tables: this.tables,
1902
+ createHistory: this.createHistory,
1903
+ enqueueCalculation: this.enqueueCalculation,
1904
+ getDependents: this.getDependents,
1905
+ onChangeSheetData: this.onChangeSheetData,
1906
+ onChangeTables: this.onChangeTables,
1907
+ getFormattedValue: this.getFormattedValue,
1908
+ })(sheetId, tableId, updatedTable);
1909
+ };
1910
+ /**
1911
+ * Removes an existing table view
1912
+ * @param tableView
1913
+ */
1914
+ Spreadsheet.prototype.removeTable = function (tableView) {
1915
+ removeTable({
1916
+ createHistory: this.createHistory,
1917
+ enqueueCalculation: this.enqueueCalculation,
1918
+ getDependents: this.getDependents,
1919
+ onChangeSheets: this.onChangeSheets,
1920
+ onChangeTables: this.onChangeTables,
1921
+ })(tableView);
1922
+ };
1923
+ /**
1924
+ * Insert a column into a table
1925
+ * @param tableView
1926
+ * @param dimensionIndex
1927
+ * @param direction
1928
+ */
1929
+ Spreadsheet.prototype.insertTableColumn = function (tableView, dimensionIndex, direction) {
1930
+ var sheet = this.getSheet(tableView.sheetId);
1931
+ insertTableColumn({
1932
+ tables: this.tables,
1933
+ columnCount: sheet.columnCount,
1934
+ rowCount: sheet.rowCount,
1935
+ locale: this.locale,
1936
+ createHistory: this.createHistory,
1937
+ onChangeTables: this.onChangeTables,
1938
+ onChangeSheets: this.onChangeSheets,
1939
+ onChangeSheetData: this.onChangeSheetData,
1940
+ enqueueCalculation: this.enqueueCalculation,
1941
+ enqueueGraphOperation: this.enqueueGraphOperation,
1942
+ enqueueStructureChange: this.enqueueStructureChange,
1943
+ getDependents: this.getDependents,
1944
+ getSheetName: this.getSheetName,
1945
+ })(tableView, dimensionIndex, direction);
1946
+ };
1947
+ /**
1948
+ * Delete a column from a table
1949
+ * @param tableView
1950
+ * @param dimensionIndex
1951
+ */
1952
+ Spreadsheet.prototype.deleteTableColumn = function (tableView, dimensionIndex) {
1953
+ var sheet = this.getSheet(tableView.sheetId);
1954
+ deleteTableColumn({
1955
+ columnCount: sheet.columnCount,
1956
+ rowCount: sheet.rowCount,
1957
+ locale: this.locale,
1958
+ getSheetName: this.getSheetName,
1959
+ createHistory: this.createHistory,
1960
+ onChangeTables: this.onChangeTables,
1961
+ onChangeSheets: this.onChangeSheets,
1962
+ onChangeSheetData: this.onChangeSheetData,
1963
+ enqueueCalculation: this.enqueueCalculation,
1964
+ enqueueGraphOperation: this.enqueueGraphOperation,
1965
+ enqueueStructureChange: this.enqueueStructureChange,
1966
+ getDependents: this.getDependents,
1967
+ })(tableView, dimensionIndex);
1968
+ };
1969
+ /**
1970
+ * Delete rows
1971
+ * @param sheetId
1972
+ * @param rowIndexes
1973
+ */
1974
+ Spreadsheet.prototype.deleteRow = function (sheetId, rowIndexes) {
1975
+ var _this = this;
1976
+ var sheet = this.getSheet(sheetId);
1977
+ deleteRow({
1978
+ rowCount: sheet.rowCount,
1979
+ columnCount: sheet.columnCount,
1980
+ locale: this.locale,
1981
+ getActiveCell: this.getActiveCell,
1982
+ getSelections: this.getSelections,
1983
+ getDependents: this.getDependents,
1984
+ getGraphNodes: function () { return _this._calculationInterface.getNodes(); },
1985
+ getGraphNodesInSheet: function (sheetId) {
1986
+ return _this._calculationInterface.getNodesInSheet(sheetId);
1987
+ },
1988
+ getSheetName: this.getSheetName,
1989
+ createHistory: this.createHistory,
1990
+ enqueueGraphOperation: this.enqueueGraphOperation,
1991
+ enqueueCalculation: this.enqueueCalculation,
1992
+ enqueueStructureChange: this.enqueueStructureChange,
1993
+ onChangeSheetData: this.onChangeSheetData,
1994
+ onChangeSheets: this.onChangeSheets,
1995
+ onChangeTables: this.onChangeTables,
1996
+ onChangeDataValidations: this.onChangeDataValidations,
1997
+ onChangeConditionalFormats: this.onChangeConditionalFormats,
1998
+ onChangeActiveCell: this.onChangeActiveSheet,
1999
+ onChangeSelections: this.onChangeSelections,
2000
+ })(sheetId, rowIndexes);
2001
+ };
2002
+ /**
2003
+ * Delete selected cells and shift left
2004
+ */
2005
+ Spreadsheet.prototype.deleteCellsShiftLeft = function (sheetId, activeCell, selections) {
2006
+ var sheet = this.getSheet(sheetId);
2007
+ deleteCellsShiftLeft({
2008
+ rowCount: sheet.rowCount,
2009
+ columnCount: sheet.columnCount,
2010
+ locale: this.locale,
2011
+ getDependents: this.getDependents,
2012
+ getActiveCell: this.getActiveCell,
2013
+ getSelections: this.getSelections,
2014
+ createHistory: this.createHistory,
2015
+ enqueueGraphOperation: this.enqueueGraphOperation,
2016
+ enqueueCalculation: this.enqueueCalculation,
2017
+ enqueueStructureChange: this.enqueueStructureChange,
2018
+ onChangeSheetData: this.onChangeSheetData,
2019
+ onChangeSheets: this.onChangeSheets,
2020
+ })(sheetId, activeCell, selections);
2021
+ };
2022
+ /**
2023
+ * Delete selected cells and shift up
2024
+ */
2025
+ Spreadsheet.prototype.deleteCellsShiftUp = function (sheetId, activeCell, selections) {
2026
+ var sheet = this.getSheet(sheetId);
2027
+ deleteCellsShiftUp({
2028
+ rowCount: sheet.rowCount,
2029
+ columnCount: sheet.columnCount,
2030
+ locale: this.locale,
2031
+ getDependents: this.getDependents,
2032
+ getActiveCell: this.getActiveCell,
2033
+ getSelections: this.getSelections,
2034
+ createHistory: this.createHistory,
2035
+ enqueueGraphOperation: this.enqueueGraphOperation,
2036
+ enqueueCalculation: this.enqueueCalculation,
2037
+ enqueueStructureChange: this.enqueueStructureChange,
2038
+ onChangeSheetData: this.onChangeSheetData,
2039
+ onChangeSheets: this.onChangeSheets,
2040
+ })(sheetId, activeCell, selections);
2041
+ };
2042
+ /** Freeze a row index */
2043
+ Spreadsheet.prototype.freezeRow = function (sheetId, rowIndex) {
2044
+ freezeRow({
2045
+ createHistory: this.createHistory,
2046
+ onChangeSheets: this.onChangeSheets,
2047
+ onChangeCharts: this.onChangeCharts,
2048
+ onChangeEmbeds: this.onChangeEmbeds,
2049
+ })(sheetId, rowIndex);
2050
+ };
2051
+ /** Freeze a column index */
2052
+ Spreadsheet.prototype.freezeColumn = function (sheetId, columnIndex) {
2053
+ freezeColumn({
2054
+ createHistory: this.createHistory,
2055
+ onChangeSheets: this.onChangeSheets,
2056
+ onChangeCharts: this.onChangeCharts,
2057
+ onChangeEmbeds: this.onChangeEmbeds,
2058
+ })(sheetId, columnIndex);
2059
+ };
2060
+ /** Hide columns */
2061
+ Spreadsheet.prototype.hideColumns = function (sheetId, columnIndexes) {
2062
+ var sheet = this.getSheet(sheetId);
2063
+ hideColumns({
2064
+ createHistory: this.createHistory,
2065
+ getActiveCell: this.getActiveCell,
2066
+ getSelections: this.getSelections,
2067
+ onChangeActiveCell: this.onChangeActiveCell,
2068
+ onChangeSelections: this.onChangeSelections,
2069
+ onChangeSheets: this.onChangeSheets,
2070
+ rowCount: sheet.rowCount,
2071
+ columnCount: sheet.columnCount,
2072
+ getNextFocusableCell: undefined,
2073
+ })(sheetId, columnIndexes);
2074
+ };
2075
+ /** Hide rows */
2076
+ Spreadsheet.prototype.hideRows = function (sheetId, rowIndexes) {
2077
+ var sheet = this.getSheet(sheetId);
2078
+ hideRows({
2079
+ createHistory: this.createHistory,
2080
+ getActiveCell: this.getActiveCell,
2081
+ getSelections: this.getSelections,
2082
+ onChangeActiveCell: this.onChangeActiveCell,
2083
+ onChangeSelections: this.onChangeSelections,
2084
+ onChangeSheets: this.onChangeSheets,
2085
+ columnCount: sheet.columnCount,
2086
+ rowCount: sheet.rowCount,
2087
+ getNextFocusableCell: undefined,
2088
+ })(sheetId, rowIndexes);
2089
+ };
2090
+ /**
2091
+ * Apply fill operation programmatically
2092
+ */
2093
+ Spreadsheet.prototype.applyFill = function (sheetId, activeCell, fillSelection, selections, fillableSelections, fillType) {
2094
+ return __awaiter(this, void 0, void 0, function () {
2095
+ var getCellData, ssRegistry;
2096
+ var _this = this;
2097
+ return __generator(this, function (_a) {
2098
+ switch (_a.label) {
2099
+ case 0:
2100
+ getCellData = function (sId, r, c) { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = _this._sheetData) === null || _a === void 0 ? void 0 : _a[sId]) === null || _b === void 0 ? void 0 : _b[r]) === null || _c === void 0 ? void 0 : _c.values) === null || _d === void 0 ? void 0 : _d[c]; };
2101
+ ssRegistry = this.sharedStringRegistry;
2102
+ return [4 /*yield*/, applyFill({
2103
+ locale: this.locale,
2104
+ cellXfsRegistry: this.cellXfsRegistry,
2105
+ // Fallback safe getters
2106
+ getCellData: getCellData,
2107
+ getEffectiveValue: this.getEffectiveValue,
2108
+ getFormattedValue: this.getFormattedValue,
2109
+ getAutoFillValues: getAutoFillValues,
2110
+ enqueueCalculation: this.enqueueCalculation,
2111
+ onChangeSheetData: this.onChangeSheetData,
2112
+ createHistory: this.createHistory,
2113
+ getSheetName: this.getSheetName,
2114
+ sharedStringRegistry: ssRegistry,
2115
+ })(sheetId, activeCell, fillSelection, selections, fillableSelections, fillType)];
2116
+ case 1:
2117
+ _a.sent();
2118
+ return [2 /*return*/];
2119
+ }
2120
+ });
2121
+ });
2122
+ };
2123
+ Spreadsheet.prototype.createNewSheet = function (sheetSpec) {
2124
+ return createNewSheet({
2125
+ sheetId: this.activeSheetId,
2126
+ createHistory: this.createHistory,
2127
+ onChangeActiveSheet: this.onChangeActiveSheet,
2128
+ onChangeSheets: this.onChangeSheets,
2129
+ sheets: this.sheets,
2130
+ })(sheetSpec);
2131
+ };
2132
+ Spreadsheet.prototype.updateSheet = function (sheetId, sheetSpec) {
2133
+ var _this = this;
2134
+ return updateSheet({
2135
+ sheets: this.sheets,
2136
+ locale: this.locale,
2137
+ createHistory: this.createHistory,
2138
+ onChangeSheets: this.onChangeSheets,
2139
+ onChangeSheetData: this.onChangeSheetData,
2140
+ getGraphNodes: function () { return _this._calculationInterface.getNodes(); },
2141
+ // Use raw getPrecedents without filtering to correctly handle cross-sheet references
2142
+ getPrecedents: function (source) {
2143
+ return _this._calculationInterface.getPrecedents(source);
2144
+ },
2145
+ })(sheetId, sheetSpec);
2146
+ };
2147
+ /**
2148
+ * Delete a sheet
2149
+ * @param sheetId
2150
+ */
2151
+ Spreadsheet.prototype.deleteSheet = function (sheetId) {
2152
+ deleteSheet({
2153
+ sheets: this.sheets,
2154
+ onChangeSheetData: this.onChangeSheetData,
2155
+ onChangeActiveSheet: function () { },
2156
+ onChangeSheets: this.onChangeSheets,
2157
+ createHistory: this.createHistory,
2158
+ enqueueGraphOperation: this.enqueueGraphOperation,
2159
+ })(sheetId);
2160
+ };
2161
+ /**
2162
+ * Create conditional formatting rule
2163
+ * @param rule
2164
+ */
2165
+ Spreadsheet.prototype.createConditionalFormattingRule = function (rule) {
2166
+ createConditionalFormattingRule({
2167
+ enqueueCalculation: this.enqueueCalculation,
2168
+ createHistory: this.createHistory,
2169
+ onChangeConditionalFormats: this.onChangeConditionalFormats,
2170
+ })(rule);
2171
+ };
2172
+ /**
2173
+ * Update conditional formatting rule
2174
+ * @param updatedRule
2175
+ * @param previousRule
2176
+ */
2177
+ Spreadsheet.prototype.updateConditionalFormattingRule = function (updatedRule, previousRule) {
2178
+ updateConditionalFormattingRule({
2179
+ enqueueCalculation: this.enqueueCalculation,
2180
+ createHistory: this.createHistory,
2181
+ onChangeConditionalFormats: this.onChangeConditionalFormats,
2182
+ })(updatedRule, previousRule);
2183
+ };
2184
+ /**
2185
+ * Delete conditional formatting rule
2186
+ * @param rule
2187
+ */
2188
+ Spreadsheet.prototype.deleteConditionalFormattingRule = function (rule) {
2189
+ deleteConditionalFormattingRule({
2190
+ enqueueCalculation: this.enqueueCalculation,
2191
+ createHistory: this.createHistory,
2192
+ onChangeConditionalFormats: this.onChangeConditionalFormats,
2193
+ })(rule);
2194
+ };
2195
+ /**
2196
+ * Preview conditional formatting rule
2197
+ * @param rule
2198
+ */
2199
+ Spreadsheet.prototype.previewConditionalFormattingRule = function (rule) {
2200
+ previewConditionalFormattingRule({
2201
+ enqueueCalculation: this.enqueueCalculation,
2202
+ createHistory: this.createHistory,
2203
+ onChangeConditionalFormats: this.onChangeConditionalFormats,
2204
+ })(rule);
2205
+ };
2206
+ /**
2207
+ * Create data validation rule
2208
+ * @param rule
2209
+ */
2210
+ Spreadsheet.prototype.createDataValidationRule = function (rule) {
2211
+ createDataValidationRule({
2212
+ locale: this.locale,
2213
+ onChangeSheetData: this.onChangeSheetData,
2214
+ onChangeDataValidations: this.onChangeDataValidations,
2215
+ createHistory: this.createHistory,
2216
+ enqueueCalculation: this.enqueueCalculation,
2217
+ getSheetName: this.getSheetName,
2218
+ cellXfsRegistry: this.cellXfsRegistry,
2219
+ sharedStringRegistry: this.sharedStringRegistry,
2220
+ })(rule);
2221
+ };
2222
+ /**
2223
+ * Update data validation rule
2224
+ * @param rule
2225
+ * @param previousRule
2226
+ */
2227
+ Spreadsheet.prototype.updateDataValidationRule = function (rule, previousRule) {
2228
+ updateDataValidationRule({
2229
+ locale: this.locale,
2230
+ onChangeSheetData: this.onChangeSheetData,
2231
+ onChangeDataValidations: this.onChangeDataValidations,
2232
+ createHistory: this.createHistory,
2233
+ enqueueCalculation: this.enqueueCalculation,
2234
+ getSheetName: this.getSheetName,
2235
+ cellXfsRegistry: this.cellXfsRegistry,
2236
+ sharedStringRegistry: this.sharedStringRegistry,
2237
+ })(rule, previousRule);
2238
+ };
2239
+ /**
2240
+ * Delete data validation rule
2241
+ * @param rule
2242
+ */
2243
+ Spreadsheet.prototype.deleteDataValidationRule = function (rule) {
2244
+ deleteDataValidationRule({
2245
+ locale: this.locale,
2246
+ onChangeSheetData: this.onChangeSheetData,
2247
+ onChangeDataValidations: this.onChangeDataValidations,
2248
+ createHistory: this.createHistory,
2249
+ enqueueCalculation: this.enqueueCalculation,
2250
+ getSheetName: this.getSheetName,
2251
+ cellXfsRegistry: this.cellXfsRegistry,
2252
+ sharedStringRegistry: this.sharedStringRegistry,
2253
+ })(rule);
2254
+ };
2255
+ /**
2256
+ * Delete all data validation rules
2257
+ * @param rules
2258
+ */
2259
+ Spreadsheet.prototype.deleteDataValidationRules = function (rules) {
2260
+ deleteDataValidationRules({
2261
+ locale: this.locale,
2262
+ onChangeSheetData: this.onChangeSheetData,
2263
+ onChangeDataValidations: this.onChangeDataValidations,
2264
+ createHistory: this.createHistory,
2265
+ enqueueCalculation: this.enqueueCalculation,
2266
+ getSheetName: this.getSheetName,
2267
+ cellXfsRegistry: this.cellXfsRegistry,
2268
+ sharedStringRegistry: this.sharedStringRegistry,
2269
+ })(rules);
2270
+ };
2271
+ /**
2272
+ * Change cell decimals
2273
+ * @param sheetId
2274
+ * @param activeCell
2275
+ * @param selections
2276
+ * @param type
2277
+ */
2278
+ Spreadsheet.prototype.changeDecimals = function (sheetId, activeCell, selections, type) {
2279
+ changeDecimals({
2280
+ locale: this.locale,
2281
+ onChangeSheetData: this.onChangeSheetData,
2282
+ createHistory: this.createHistory,
2283
+ enqueueCalculation: this.enqueueCalculation,
2284
+ cellXfsRegistry: this.cellXfsRegistry,
2285
+ })(sheetId, activeCell, selections, type);
2286
+ };
2287
+ /**
2288
+ * Change sheet tab color
2289
+ * @param sheetId
2290
+ * @param color
2291
+ */
2292
+ Spreadsheet.prototype.changeSheetTabcolor = function (sheetId, color) {
2293
+ changeSheetTabcolor({
2294
+ onChangeSheets: this.onChangeSheets,
2295
+ createHistory: this.createHistory,
2296
+ })(sheetId, color);
2297
+ };
2298
+ /**
2299
+ * Change theme
2300
+ * @param theme
2301
+ */
2302
+ Spreadsheet.prototype.changeTheme = function (theme) {
2303
+ changeTheme({
2304
+ createHistory: this.createHistory,
2305
+ onChangeTheme: function () { },
2306
+ })(theme);
2307
+ };
2308
+ /**
2309
+ * Clear formatting
2310
+ * @param sheetId
2311
+ * @param activeCell
2312
+ * @param selections
2313
+ */
2314
+ Spreadsheet.prototype.clearFormatting = function (sheetId, activeCell, selections) {
2315
+ clearFormatting({
2316
+ locale: this.locale,
2317
+ onChangeSheetData: this.onChangeSheetData,
2318
+ createHistory: this.createHistory,
2319
+ cellXfsRegistry: this.cellXfsRegistry,
2320
+ })(sheetId, activeCell, selections);
2321
+ };
2322
+ /**
2323
+ * Remove duplicate rows
2324
+ * @param sheetId
2325
+ * @param activeCell
2326
+ * @param selections
2327
+ */
2328
+ Spreadsheet.prototype.removeDuplicates = function (sheetId, activeCell, selections) {
2329
+ return removeDuplicates({
2330
+ locale: this.locale,
2331
+ getFormattedValue: this.getFormattedValue,
2332
+ onChangeSheetData: this.onChangeSheetData,
2333
+ enqueueCalculation: this.enqueueCalculation,
2334
+ createHistory: this.createHistory,
2335
+ })(sheetId, activeCell, selections);
2336
+ };
2337
+ /**
2338
+ * Increase indent
2339
+ * @param sheetId
2340
+ * @param activeCell
2341
+ * @param selections
2342
+ */
2343
+ Spreadsheet.prototype.increaseIndent = function (sheetId, activeCell, selections) {
2344
+ increaseIndent({
2345
+ locale: this.locale,
2346
+ enqueueCalculation: this.enqueueCalculation,
2347
+ onChangeSheetData: this.onChangeSheetData,
2348
+ createHistory: this.createHistory,
2349
+ cellXfsRegistry: this.cellXfsRegistry,
2350
+ })(sheetId, activeCell, selections);
2351
+ };
2352
+ /**
2353
+ * Decrease indent
2354
+ * @param sheetId
2355
+ * @param activeCell
2356
+ * @param selections
2357
+ */
2358
+ Spreadsheet.prototype.decreaseIndent = function (sheetId, activeCell, selections) {
2359
+ decreaseIndent({
2360
+ locale: this.locale,
2361
+ enqueueCalculation: this.enqueueCalculation,
2362
+ onChangeSheetData: this.onChangeSheetData,
2363
+ createHistory: this.createHistory,
2364
+ cellXfsRegistry: this.cellXfsRegistry,
2365
+ })(sheetId, activeCell, selections);
2366
+ };
2367
+ /**
2368
+ * Create named range
2369
+ * @param sheetId
2370
+ * @param namedRange
2371
+ */
2372
+ Spreadsheet.prototype.createNamedRange = function (sheetId, namedRange) {
2373
+ createNamedRange({
2374
+ enqueueCalculation: this.enqueueCalculation,
2375
+ createHistory: this.createHistory,
2376
+ onChangeNamedRanges: this.onChangeNamedRanges,
2377
+ })(sheetId, namedRange);
2378
+ };
2379
+ /**
2380
+ * Delete named range
2381
+ * @param id
2382
+ */
2383
+ Spreadsheet.prototype.deleteNamedRange = function (id) {
2384
+ deleteNamedRange({
2385
+ getDependents: this.getDependents,
2386
+ enqueueCalculation: this.enqueueCalculation,
2387
+ createHistory: this.createHistory,
2388
+ onChangeNamedRanges: this.onChangeNamedRanges,
2389
+ })(id);
2390
+ };
2391
+ /**
2392
+ * Delete cells
2393
+ * @param sheetId
2394
+ * @param activeCell
2395
+ * @param selections
2396
+ * @param clearType - "contents" (default), "formats", or "all"
2397
+ */
2398
+ Spreadsheet.prototype.deleteCells = function (sheetId, activeCell, selections, clearType) {
2399
+ if (clearType === void 0) { clearType = "contents"; }
2400
+ var sheet = this.getSheet(sheetId);
2401
+ deleteCells({
2402
+ locale: this.locale,
2403
+ rowCount: sheet.rowCount,
2404
+ cellXfsRegistry: this.cellXfsRegistry,
2405
+ getDependents: this.getDependents,
2406
+ getDataRowCount: function () { return sheet.rowCount; },
2407
+ onChangeSheetData: this.onChangeSheetData,
2408
+ onChangeSheets: this.onChangeSheets,
2409
+ onChangeTables: this.onChangeTables,
2410
+ onChangeActiveCell: function () { },
2411
+ enqueueCalculation: this.enqueueCalculation,
2412
+ createHistory: this.createHistory,
2413
+ isArrayFormula: function () { return false; },
2414
+ getRowHeight: this.getRowHeight,
2415
+ })(sheetId, activeCell, selections, clearType);
2416
+ };
2417
+ /**
2418
+ * Delete table row
2419
+ * @param tableView
2420
+ * @param rowIndexes
2421
+ */
2422
+ Spreadsheet.prototype.deleteTableRow = function (tableView, rowIndexes) {
2423
+ var sheet = this.getSheet(tableView.sheetId);
2424
+ deleteTableRow({
2425
+ rowCount: sheet.rowCount,
2426
+ columnCount: sheet.columnCount,
2427
+ locale: this.locale,
2428
+ getDependents: this.getDependents,
2429
+ getSheetName: this.getSheetName,
2430
+ createHistory: this.createHistory,
2431
+ enqueueGraphOperation: this.enqueueGraphOperation,
2432
+ enqueueCalculation: this.enqueueCalculation,
2433
+ enqueueStructureChange: this.enqueueStructureChange,
2434
+ onChangeSheetData: this.onChangeSheetData,
2435
+ onChangeSheets: this.onChangeSheets,
2436
+ onChangeTables: this.onChangeTables,
2437
+ onChangeDataValidations: this.onChangeDataValidations,
2438
+ onChangeConditionalFormats: this.onChangeConditionalFormats,
2439
+ })(tableView, rowIndexes);
2440
+ };
2441
+ /**
2442
+ * Duplicate sheet
2443
+ * @param sheetId
2444
+ */
2445
+ Spreadsheet.prototype.duplicateSheet = function (sheetId, newSheetId) {
2446
+ return duplicateSheet({
2447
+ locale: this.locale,
2448
+ maxSheetCount: 100,
2449
+ sheets: this.sheets,
2450
+ onChangeSheetData: this.onChangeSheetData,
2451
+ onChangeSheets: this.onChangeSheets,
2452
+ onChangeTables: this.onChangeTables,
2453
+ onChangeCharts: this.onChangeCharts,
2454
+ onChangeEmbeds: this.onChangeEmbeds,
2455
+ onChangeConditionalFormats: this.onChangeConditionalFormats,
2456
+ onChangeDataValidations: this.onChangeDataValidations,
2457
+ onChangeActiveSheet: function () { },
2458
+ enqueueGraphOperation: this.enqueueGraphOperation,
2459
+ createHistory: this.createHistory,
2460
+ })(sheetId, newSheetId);
2461
+ };
2462
+ /**
2463
+ * Create embed
2464
+ * @param embedId
2465
+ */
2466
+ Spreadsheet.prototype.createEmbed = function (spec) {
2467
+ createEmbed({
2468
+ onChangeEmbeds: this.onChangeEmbeds,
2469
+ createHistory: this.createHistory,
2470
+ })(spec);
2471
+ };
2472
+ /**
2473
+ * Delete embed
2474
+ * @param embedId
2475
+ */
2476
+ Spreadsheet.prototype.deleteEmbed = function (embedId) {
2477
+ deleteEmbed({
2478
+ onChangeEmbeds: this.onChangeEmbeds,
2479
+ createHistory: this.createHistory,
2480
+ })(embedId);
2481
+ };
2482
+ /**
2483
+ * Update embed
2484
+ * @param embed
2485
+ */
2486
+ Spreadsheet.prototype.updateEmbed = function (embed) {
2487
+ updateEmbed({
2488
+ onChangeEmbeds: this.onChangeEmbeds,
2489
+ createHistory: this.createHistory,
2490
+ })(embed);
2491
+ };
2492
+ /**
2493
+ * Move embed
2494
+ * @param embedId
2495
+ * @param sheetId
2496
+ * @param anchorCell
2497
+ * @param offsetXPixels
2498
+ * @param offsetYPixels
2499
+ */
2500
+ Spreadsheet.prototype.moveEmbed = function (embedId, sheetId, anchorCell, offsetXPixels, offsetYPixels) {
2501
+ moveEmbed({
2502
+ onChangeEmbeds: this.onChangeEmbeds,
2503
+ createHistory: this.createHistory,
2504
+ })(embedId, sheetId, anchorCell, offsetXPixels, offsetYPixels);
2505
+ };
2506
+ /**
2507
+ * Resize embed
2508
+ * @param embedId
2509
+ * @param sheetId
2510
+ * @param anchorCell
2511
+ * @param offsetXPixels
2512
+ * @param offsetYPixels
2513
+ * @param width
2514
+ * @param height
2515
+ */
2516
+ Spreadsheet.prototype.resizeEmbed = function (embedId, sheetId, anchorCell, offsetXPixels, offsetYPixels, width, height) {
2517
+ resizeEmbed({
2518
+ onChangeEmbeds: this.onChangeEmbeds,
2519
+ createHistory: this.createHistory,
2520
+ })(embedId, sheetId, anchorCell, offsetXPixels, offsetYPixels, width, height);
2521
+ };
2522
+ /**
2523
+ * Check if chart operations are available
2524
+ * @returns true if @rowsncolumns/charts package is installed
2525
+ */
2526
+ Spreadsheet.prototype.isChartsAvailable = function () {
2527
+ return isChartsAvailable();
2528
+ };
2529
+ /**
2530
+ * Create a chart
2531
+ * @param sheetId
2532
+ * @param activeCell
2533
+ * @param selections
2534
+ * @param chartSpec
2535
+ */
2536
+ Spreadsheet.prototype.createChart = function (sheetId, activeCell, selections, chartSpec) {
2537
+ safeCreateChart({
2538
+ onChangeCharts: this.onChangeCharts,
2539
+ getFormattedValue: this.getFormattedValue,
2540
+ getEffectiveValue: this.getEffectiveValue,
2541
+ createHistory: this.createHistory,
2542
+ })(sheetId, activeCell, selections, chartSpec);
2543
+ };
2544
+ /**
2545
+ * Delete a chart
2546
+ * @param chartId
2547
+ */
2548
+ Spreadsheet.prototype.deleteChart = function (chartId) {
2549
+ safeDeleteChart({
2550
+ onChangeCharts: this.onChangeCharts,
2551
+ createHistory: this.createHistory,
2552
+ })(chartId);
2553
+ };
2554
+ /**
2555
+ * Move a chart
2556
+ * @param chartId
2557
+ * @param anchorCell
2558
+ * @param offsetXPixels
2559
+ * @param offsetYPixels
2560
+ */
2561
+ Spreadsheet.prototype.moveChart = function (chartId, anchorCell, offsetXPixels, offsetYPixels) {
2562
+ safeMoveChart({
2563
+ onChangeCharts: this.onChangeCharts,
2564
+ createHistory: this.createHistory,
2565
+ })(chartId, anchorCell, offsetXPixels, offsetYPixels);
2566
+ };
2567
+ /**
2568
+ * Resize a chart
2569
+ * @param chartId
2570
+ * @param anchorCell
2571
+ * @param offsetXPixels
2572
+ * @param offsetYPixels
2573
+ * @param width
2574
+ * @param height
2575
+ */
2576
+ Spreadsheet.prototype.resizeChart = function (chartId, anchorCell, offsetXPixels, offsetYPixels, width, height) {
2577
+ safeResizeChart({
2578
+ onChangeCharts: this.onChangeCharts,
2579
+ createHistory: this.createHistory,
2580
+ })(chartId, anchorCell, offsetXPixels, offsetYPixels, width, height);
2581
+ };
2582
+ /**
2583
+ * Update a chart
2584
+ * @param chart
2585
+ */
2586
+ Spreadsheet.prototype.updateChart = function (chart) {
2587
+ safeUpdateChart({
2588
+ onChangeCharts: this.onChangeCharts,
2589
+ createHistory: this.createHistory,
2590
+ })(chart);
2591
+ };
2592
+ /**
2593
+ * Auto fit rows or columns
2594
+ * @param sheetId
2595
+ * @param indexes
2596
+ * @param axis
2597
+ * @returns
2598
+ */
2599
+ Spreadsheet.prototype.autoResize = function (sheetId, indexes, axis) {
2600
+ return autoResize({
2601
+ createHistory: this.createHistory,
2602
+ onChangeSheets: this.onChangeSheets,
2603
+ getColumnWidth: this.getColumnWidth,
2604
+ getRowHeight: this.getRowHeight,
2605
+ getActiveCell: this.getActiveCell,
2606
+ })(sheetId, indexes, axis);
2607
+ };
2608
+ /**
2609
+ * Resize row or column
2610
+ * @param sheetId
2611
+ * @param indexes
2612
+ * @param dimension
2613
+ * @param axis
2614
+ * @returns
2615
+ */
2616
+ Spreadsheet.prototype.resize = function (sheetId, indexes, dimension, axis) {
2617
+ return resize({
2618
+ createHistory: this.createHistory,
2619
+ onChangeSheets: this.onChangeSheets,
2620
+ getRowHeight: this.getRowHeight,
2621
+ getActiveCell: this.getActiveCell,
2622
+ getCellDimensions: this.getCellDimensions,
2623
+ isMergedCell: this.isMergedCell,
2624
+ })(sheetId, indexes, dimension, axis);
2625
+ };
2626
+ Spreadsheet.prototype.deletePivotTable = function (pivotId, database) {
2627
+ return __awaiter(this, void 0, void 0, function () {
2628
+ return __generator(this, function (_a) {
2629
+ return [2 /*return*/, safeDeletePivotTable({
2630
+ activeCell: this.getActiveCell(),
2631
+ enqueueCalculation: this.enqueueCalculation,
2632
+ onChangeActiveCell: this.onChangeActiveSheet,
2633
+ pivotTables: this.pivotTables,
2634
+ sheetId: this.activeSheetId,
2635
+ cellXfsRegistry: this.cellXfsRegistry,
2636
+ database: database,
2637
+ locale: this.locale,
2638
+ onChangeSheetData: this.onChangeSheetData,
2639
+ onChangeSheets: this.onChangeSheets,
2640
+ // onCreateNewSheet:,
2641
+ createHistory: this.createHistory,
2642
+ onChangePivotTables: this.onChangePivotTables,
2643
+ getColumnWidth: this.getColumnWidth,
2644
+ })(pivotId)];
2645
+ });
2646
+ });
2647
+ };
2648
+ Spreadsheet.prototype.createPivotTable = function (pivotTable, createNewSheet, database) {
2649
+ return __awaiter(this, void 0, void 0, function () {
2650
+ return __generator(this, function (_a) {
2651
+ switch (_a.label) {
2652
+ case 0: return [4 /*yield*/, safeCreatePivotTable({
2653
+ activeCell: this.getActiveCell(),
2654
+ enqueueCalculation: this.enqueueCalculation,
2655
+ onChangeActiveCell: this.onChangeActiveSheet,
2656
+ pivotTables: this.pivotTables,
2657
+ sheetId: this.activeSheetId,
2658
+ cellXfsRegistry: this.cellXfsRegistry,
2659
+ database: database,
2660
+ locale: this.locale,
2661
+ onChangeSheetData: this.onChangeSheetData,
2662
+ onChangeSheets: this.onChangeSheets,
2663
+ // onCreateNewSheet:,
2664
+ createHistory: this.createHistory,
2665
+ onChangePivotTables: this.onChangePivotTables,
2666
+ getGridValues: this.getGridValuesForPivot,
2667
+ getColumnWidth: this.getColumnWidth,
2668
+ })(pivotTable, createNewSheet)];
2669
+ case 1:
2670
+ _a.sent();
2671
+ return [2 /*return*/];
2672
+ }
2673
+ });
2674
+ });
2675
+ };
2676
+ /**
2677
+ * Create a new citation and attach it to a cell
2678
+ * @param sheetId
2679
+ * @param rowIndex
2680
+ * @param columnIndex
2681
+ * @param citation
2682
+ */
2683
+ Spreadsheet.prototype.createCitation = function (sheetId, rowIndex, columnIndex, citation) {
2684
+ createCitation({
2685
+ locale: this.locale,
2686
+ onChangeSheetData: this.onChangeSheetData,
2687
+ onChangeCitations: this.onChangeCitations,
2688
+ createHistory: this.createHistory,
2689
+ })(sheetId, rowIndex, columnIndex, citation);
2690
+ };
2691
+ /**
2692
+ * Create multiple citations in a batch (adds to citations array only)
2693
+ * @param cellCitations
2694
+ */
2695
+ Spreadsheet.prototype.createBatchCitations = function (citations) {
2696
+ createBatchCitations({
2697
+ onChangeCitations: this.onChangeCitations,
2698
+ createHistory: this.createHistory,
2699
+ })(citations);
2700
+ };
2701
+ /**
2702
+ * Update an existing citation
2703
+ * @param citationId
2704
+ * @param updates
2705
+ */
2706
+ Spreadsheet.prototype.updateCitation = function (citationId, updates) {
2707
+ updateCitation({
2708
+ onChangeCitations: this.onChangeCitations,
2709
+ createHistory: this.createHistory,
2710
+ })(citationId, updates);
2711
+ };
2712
+ /**
2713
+ * Remove a citation reference from a cell
2714
+ * @param sheetId
2715
+ * @param rowIndex
2716
+ * @param columnIndex
2717
+ */
2718
+ Spreadsheet.prototype.removeCitationFromCell = function (sheetId, rowIndex, columnIndex) {
2719
+ removeCitationFromCell({
2720
+ locale: this.locale,
2721
+ onChangeSheetData: this.onChangeSheetData,
2722
+ createHistory: this.createHistory,
2723
+ })(sheetId, rowIndex, columnIndex);
2724
+ };
2725
+ /**
2726
+ * Delete a citation completely (removes from citations array)
2727
+ * Note: Cells with this citationId will still have the reference
2728
+ * @param citationId
2729
+ */
2730
+ Spreadsheet.prototype.deleteCitation = function (citationId) {
2731
+ deleteCitation({
2732
+ onChangeCitations: this.onChangeCitations,
2733
+ createHistory: this.createHistory,
2734
+ })(citationId);
2735
+ };
2736
+ return Spreadsheet;
2737
+ }());
2738
+ export { Spreadsheet };
2739
+ /**
2740
+ * Simple sheet interface for some getters
2741
+ */
2742
+ var SheetInterface = /** @class */ (function () {
2743
+ function SheetInterface(sheet) {
2744
+ this.sheet = sheet;
2745
+ }
2746
+ Object.defineProperty(SheetInterface.prototype, "name", {
2747
+ get: function () {
2748
+ var _a;
2749
+ return (_a = this.sheet) === null || _a === void 0 ? void 0 : _a.title;
2750
+ },
2751
+ enumerable: false,
2752
+ configurable: true
2753
+ });
2754
+ Object.defineProperty(SheetInterface.prototype, "rowCount", {
2755
+ get: function () {
2756
+ var _a, _b;
2757
+ return (_b = (_a = this.sheet) === null || _a === void 0 ? void 0 : _a.rowCount) !== null && _b !== void 0 ? _b : DEFAULT_ROW_COUNT;
2758
+ },
2759
+ enumerable: false,
2760
+ configurable: true
2761
+ });
2762
+ Object.defineProperty(SheetInterface.prototype, "columnCount", {
2763
+ get: function () {
2764
+ var _a, _b;
2765
+ return (_b = (_a = this.sheet) === null || _a === void 0 ? void 0 : _a.columnCount) !== null && _b !== void 0 ? _b : DEFAULT_COLUMN_COUNT;
2766
+ },
2767
+ enumerable: false,
2768
+ configurable: true
2769
+ });
2770
+ Object.defineProperty(SheetInterface.prototype, "frozenColumns", {
2771
+ get: function () {
2772
+ var _a, _b;
2773
+ return (_b = (_a = this.sheet) === null || _a === void 0 ? void 0 : _a.frozenColumnCount) !== null && _b !== void 0 ? _b : 0;
2774
+ },
2775
+ enumerable: false,
2776
+ configurable: true
2777
+ });
2778
+ Object.defineProperty(SheetInterface.prototype, "frozenRows", {
2779
+ get: function () {
2780
+ var _a, _b;
2781
+ return (_b = (_a = this.sheet) === null || _a === void 0 ? void 0 : _a.frozenRowCount) !== null && _b !== void 0 ? _b : 0;
2782
+ },
2783
+ enumerable: false,
2784
+ configurable: true
2785
+ });
2786
+ return SheetInterface;
2787
+ }());