handsontable 18.0.0 → 18.1.0-rc1

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 (1238) hide show
  1. package/3rdparty/walkontable/src/axisSizing/axisSizeSource.d.mts +1 -0
  2. package/3rdparty/walkontable/src/axisSizing/axisSizeSource.d.ts +55 -0
  3. package/3rdparty/walkontable/src/axisSizing/axisSizeSource.js +15 -0
  4. package/3rdparty/walkontable/src/axisSizing/axisSizeSource.mjs +14 -0
  5. package/3rdparty/walkontable/src/axisSizing/boxModel.d.mts +1 -0
  6. package/3rdparty/walkontable/src/axisSizing/boxModel.d.ts +32 -0
  7. package/3rdparty/walkontable/src/axisSizing/boxModel.js +45 -0
  8. package/3rdparty/walkontable/src/axisSizing/boxModel.mjs +33 -0
  9. package/3rdparty/walkontable/src/axisSizing/columnUtils.d.mts +2 -0
  10. package/3rdparty/walkontable/src/{utils/column.d.ts → axisSizing/columnUtils.d.ts} +12 -10
  11. package/3rdparty/walkontable/src/axisSizing/columnUtils.js +142 -0
  12. package/3rdparty/walkontable/src/axisSizing/columnUtils.mjs +137 -0
  13. package/3rdparty/walkontable/src/axisSizing/defaultSizeSource.d.mts +1 -0
  14. package/3rdparty/walkontable/src/axisSizing/defaultSizeSource.d.ts +58 -0
  15. package/3rdparty/walkontable/src/axisSizing/defaultSizeSource.js +124 -0
  16. package/3rdparty/walkontable/src/axisSizing/defaultSizeSource.mjs +114 -0
  17. package/3rdparty/walkontable/src/axisSizing/oversizedRows.d.mts +1 -0
  18. package/3rdparty/walkontable/src/axisSizing/oversizedRows.d.ts +162 -0
  19. package/3rdparty/walkontable/src/axisSizing/oversizedRows.js +424 -0
  20. package/3rdparty/walkontable/src/axisSizing/oversizedRows.mjs +522 -0
  21. package/3rdparty/walkontable/src/axisSizing/positionCache/index.d.ts +130 -0
  22. package/3rdparty/walkontable/src/axisSizing/positionCache/index.js +251 -0
  23. package/3rdparty/walkontable/src/axisSizing/positionCache/index.mjs +257 -0
  24. package/3rdparty/walkontable/src/axisSizing/positionCache/prefixSumStrategy.d.mts +1 -0
  25. package/3rdparty/walkontable/src/axisSizing/positionCache/prefixSumStrategy.d.ts +51 -0
  26. package/3rdparty/walkontable/src/axisSizing/positionCache/prefixSumStrategy.js +116 -0
  27. package/3rdparty/walkontable/src/axisSizing/positionCache/prefixSumStrategy.mjs +112 -0
  28. package/3rdparty/walkontable/src/axisSizing/positionCache/sparseStrategy.d.mts +1 -0
  29. package/3rdparty/walkontable/src/axisSizing/positionCache/sparseStrategy.d.ts +53 -0
  30. package/3rdparty/walkontable/src/axisSizing/positionCache/sparseStrategy.js +199 -0
  31. package/3rdparty/walkontable/src/axisSizing/positionCache/sparseStrategy.mjs +196 -0
  32. package/3rdparty/walkontable/src/axisSizing/positionCache/strategy.d.mts +1 -0
  33. package/3rdparty/walkontable/src/axisSizing/positionCache/strategy.d.ts +53 -0
  34. package/3rdparty/walkontable/src/axisSizing/positionCache/strategy.js +40 -0
  35. package/3rdparty/walkontable/src/axisSizing/positionCache/strategy.mjs +41 -0
  36. package/3rdparty/walkontable/src/axisSizing/positionCache/uniformStrategy.d.mts +1 -0
  37. package/3rdparty/walkontable/src/axisSizing/positionCache/uniformStrategy.d.ts +47 -0
  38. package/3rdparty/walkontable/src/axisSizing/positionCache/uniformStrategy.js +116 -0
  39. package/3rdparty/walkontable/src/axisSizing/positionCache/uniformStrategy.mjs +110 -0
  40. package/3rdparty/walkontable/src/axisSizing/rowUtils.d.mts +2 -0
  41. package/3rdparty/walkontable/src/{utils/row.d.ts → axisSizing/rowUtils.d.ts} +11 -9
  42. package/3rdparty/walkontable/src/axisSizing/rowUtils.js +106 -0
  43. package/3rdparty/walkontable/src/axisSizing/rowUtils.mjs +101 -0
  44. package/3rdparty/walkontable/src/axisSizing/sizeGetters.d.mts +2 -0
  45. package/3rdparty/walkontable/src/axisSizing/sizeGetters.d.ts +84 -0
  46. package/3rdparty/walkontable/src/axisSizing/sizeGetters.js +102 -0
  47. package/3rdparty/walkontable/src/axisSizing/sizeGetters.mjs +92 -0
  48. package/3rdparty/walkontable/src/calculator/axisCalculation.d.ts +1 -1
  49. package/3rdparty/walkontable/src/calculator/calculationType/renderedColumns.d.ts +10 -0
  50. package/3rdparty/walkontable/src/calculator/calculationType/renderedColumns.js +10 -1
  51. package/3rdparty/walkontable/src/calculator/calculationType/renderedColumns.mjs +10 -1
  52. package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.d.ts +9 -0
  53. package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.js +9 -1
  54. package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.mjs +9 -1
  55. package/3rdparty/walkontable/src/calculator/viewportColumns.d.ts +1 -1
  56. package/3rdparty/walkontable/src/calculator/viewportRows.d.ts +1 -1
  57. package/3rdparty/walkontable/src/cell/coords.js +4 -9
  58. package/3rdparty/walkontable/src/cell/coords.mjs +4 -9
  59. package/3rdparty/walkontable/src/cell/range.d.ts +10 -0
  60. package/3rdparty/walkontable/src/cell/range.js +19 -15
  61. package/3rdparty/walkontable/src/cell/range.mjs +16 -12
  62. package/3rdparty/walkontable/src/core/_base.d.ts +21 -21
  63. package/3rdparty/walkontable/src/core/_base.js +47 -147
  64. package/3rdparty/walkontable/src/core/_base.mjs +17 -147
  65. package/3rdparty/walkontable/src/core/clone.d.ts +4 -14
  66. package/3rdparty/walkontable/src/core/clone.js +40 -5
  67. package/3rdparty/walkontable/src/core/clone.mjs +10 -5
  68. package/3rdparty/walkontable/src/core/core.d.ts +1 -5
  69. package/3rdparty/walkontable/src/core/core.js +41 -47
  70. package/3rdparty/walkontable/src/core/core.mjs +12 -48
  71. package/3rdparty/walkontable/src/domMeasure/geometryReader.d.mts +1 -0
  72. package/3rdparty/walkontable/src/domMeasure/geometryReader.d.ts +172 -0
  73. package/3rdparty/walkontable/src/domMeasure/geometryReader.js +19 -0
  74. package/3rdparty/walkontable/src/domMeasure/geometryReader.mjs +16 -0
  75. package/3rdparty/walkontable/src/domMeasure/liveGeometryReader.d.mts +1 -0
  76. package/3rdparty/walkontable/src/domMeasure/liveGeometryReader.d.ts +134 -0
  77. package/3rdparty/walkontable/src/domMeasure/liveGeometryReader.js +195 -0
  78. package/3rdparty/walkontable/src/domMeasure/liveGeometryReader.mjs +193 -0
  79. package/3rdparty/walkontable/src/event.d.ts +25 -12
  80. package/3rdparty/walkontable/src/event.js +96 -236
  81. package/3rdparty/walkontable/src/event.mjs +95 -236
  82. package/3rdparty/walkontable/src/facade/core.d.ts +6 -6
  83. package/3rdparty/walkontable/src/index.d.ts +1 -1
  84. package/3rdparty/walkontable/src/index.js +10 -21
  85. package/3rdparty/walkontable/src/index.mjs +1 -1
  86. package/3rdparty/walkontable/src/overlay/index.d.ts +6 -6
  87. package/3rdparty/walkontable/src/overlay/index.js +11 -11
  88. package/3rdparty/walkontable/src/overlay/index.mjs +6 -6
  89. package/3rdparty/walkontable/src/overlay/overlays.d.ts +375 -0
  90. package/3rdparty/walkontable/src/overlay/overlays.js +605 -0
  91. package/3rdparty/walkontable/src/overlay/overlays.mjs +594 -0
  92. package/3rdparty/walkontable/src/overlay/{_base.d.ts → regions/_base.d.ts} +65 -16
  93. package/3rdparty/walkontable/src/overlay/{_base.js → regions/_base.js} +155 -50
  94. package/3rdparty/walkontable/src/overlay/{_base.mjs → regions/_base.mjs} +158 -47
  95. package/3rdparty/walkontable/src/overlay/regions/bottomInlineStartCornerOverlay.d.mts +1 -0
  96. package/3rdparty/walkontable/src/overlay/{bottomInlineStartCorner.d.ts → regions/bottomInlineStartCornerOverlay.d.ts} +5 -10
  97. package/3rdparty/walkontable/src/overlay/{bottomInlineStartCorner.js → regions/bottomInlineStartCornerOverlay.js} +18 -20
  98. package/3rdparty/walkontable/src/overlay/{bottomInlineStartCorner.mjs → regions/bottomInlineStartCornerOverlay.mjs} +18 -20
  99. package/3rdparty/walkontable/src/overlay/regions/bottomOverlay.d.mts +1 -0
  100. package/3rdparty/walkontable/src/overlay/{bottom.d.ts → regions/bottomOverlay.d.ts} +16 -11
  101. package/3rdparty/walkontable/src/overlay/{bottom.js → regions/bottomOverlay.js} +111 -66
  102. package/3rdparty/walkontable/src/overlay/{bottom.mjs → regions/bottomOverlay.mjs} +111 -66
  103. package/3rdparty/walkontable/src/overlay/regions/inlineStartOverlay.d.mts +1 -0
  104. package/3rdparty/walkontable/src/overlay/{inlineStart.d.ts → regions/inlineStartOverlay.d.ts} +17 -11
  105. package/3rdparty/walkontable/src/overlay/{inlineStart.js → regions/inlineStartOverlay.js} +120 -67
  106. package/3rdparty/walkontable/src/overlay/{inlineStart.mjs → regions/inlineStartOverlay.mjs} +120 -67
  107. package/3rdparty/walkontable/src/overlay/regions/topInlineStartCornerOverlay.d.mts +1 -0
  108. package/3rdparty/walkontable/src/overlay/{topInlineStartCorner.d.ts → regions/topInlineStartCornerOverlay.d.ts} +5 -10
  109. package/3rdparty/walkontable/src/overlay/{topInlineStartCorner.js → regions/topInlineStartCornerOverlay.js} +13 -16
  110. package/3rdparty/walkontable/src/overlay/{topInlineStartCorner.mjs → regions/topInlineStartCornerOverlay.mjs} +13 -16
  111. package/3rdparty/walkontable/src/overlay/regions/topOverlay.d.mts +1 -0
  112. package/3rdparty/walkontable/src/overlay/{top.d.ts → regions/topOverlay.d.ts} +32 -11
  113. package/3rdparty/walkontable/src/overlay/{top.js → regions/topOverlay.js} +161 -77
  114. package/3rdparty/walkontable/src/overlay/{top.mjs → regions/topOverlay.mjs} +161 -77
  115. package/3rdparty/walkontable/src/overlay/resizeMonitor.d.mts +1 -0
  116. package/3rdparty/walkontable/src/overlay/resizeMonitor.d.ts +49 -0
  117. package/3rdparty/walkontable/src/overlay/resizeMonitor.js +149 -0
  118. package/3rdparty/walkontable/src/overlay/resizeMonitor.mjs +148 -0
  119. package/3rdparty/walkontable/src/overlay/scroll/nativeScrollInput.d.mts +1 -0
  120. package/3rdparty/walkontable/src/overlay/scroll/nativeScrollInput.d.ts +62 -0
  121. package/3rdparty/walkontable/src/overlay/scroll/nativeScrollInput.js +283 -0
  122. package/3rdparty/walkontable/src/overlay/scroll/nativeScrollInput.mjs +288 -0
  123. package/3rdparty/walkontable/src/overlay/scroll/scrollSync.d.mts +1 -0
  124. package/3rdparty/walkontable/src/overlay/scroll/scrollSync.d.ts +176 -0
  125. package/3rdparty/walkontable/src/overlay/scroll/scrollSync.js +542 -0
  126. package/3rdparty/walkontable/src/overlay/scroll/scrollSync.mjs +550 -0
  127. package/3rdparty/walkontable/src/overlay/spreaderSize.d.mts +1 -0
  128. package/3rdparty/walkontable/src/overlay/spreaderSize.d.ts +67 -0
  129. package/3rdparty/walkontable/src/overlay/spreaderSize.js +173 -0
  130. package/3rdparty/walkontable/src/overlay/spreaderSize.mjs +174 -0
  131. package/3rdparty/walkontable/src/{stickyScrollStrategy.d.ts → overlay/strategies/stickyScrollStrategy.d.ts} +33 -21
  132. package/3rdparty/walkontable/src/{stickyScrollStrategy.js → overlay/strategies/stickyScrollStrategy.js} +65 -53
  133. package/3rdparty/walkontable/src/{stickyScrollStrategy.mjs → overlay/strategies/stickyScrollStrategy.mjs} +63 -50
  134. package/3rdparty/walkontable/src/ports.d.mts +1 -0
  135. package/3rdparty/walkontable/src/ports.d.ts +54 -0
  136. package/3rdparty/walkontable/src/ports.js +23 -0
  137. package/3rdparty/walkontable/src/ports.mjs +24 -0
  138. package/3rdparty/walkontable/src/{renderer → render}/_base.d.ts +1 -1
  139. package/3rdparty/walkontable/src/{renderer → render}/cells.js +1 -1
  140. package/3rdparty/walkontable/src/{renderer → render}/cells.mjs +1 -1
  141. package/3rdparty/walkontable/src/{renderer → render}/columnHeaders.d.ts +1 -0
  142. package/3rdparty/walkontable/src/{renderer → render}/columnHeaders.js +41 -1
  143. package/3rdparty/walkontable/src/{renderer → render}/columnHeaders.mjs +42 -2
  144. package/3rdparty/walkontable/src/render/index.d.mts +1 -0
  145. package/3rdparty/walkontable/src/{renderer → render}/index.d.ts +11 -3
  146. package/3rdparty/walkontable/src/{renderer → render}/index.js +13 -3
  147. package/3rdparty/walkontable/src/{renderer → render}/index.mjs +11 -1
  148. package/3rdparty/walkontable/src/{renderer → render}/rows.js +1 -1
  149. package/3rdparty/walkontable/src/{renderer → render}/rows.mjs +1 -1
  150. package/3rdparty/walkontable/src/render/tableRenderer.d.mts +1 -0
  151. package/3rdparty/walkontable/src/{renderer/table.d.ts → render/tableRenderer.d.ts} +12 -2
  152. package/3rdparty/walkontable/src/render/tableRenderer.js +375 -0
  153. package/3rdparty/walkontable/src/{renderer/table.mjs → render/tableRenderer.mjs} +152 -6
  154. package/3rdparty/walkontable/src/{scroll.d.ts → scroll/scroll.d.ts} +27 -10
  155. package/3rdparty/walkontable/src/{scroll.js → scroll/scroll.js} +104 -35
  156. package/3rdparty/walkontable/src/{scroll.mjs → scroll/scroll.mjs} +102 -32
  157. package/3rdparty/walkontable/src/selection/border/border.d.ts +313 -5
  158. package/3rdparty/walkontable/src/selection/border/border.js +861 -51
  159. package/3rdparty/walkontable/src/selection/border/border.mjs +863 -53
  160. package/3rdparty/walkontable/src/selection/border/types.d.ts +30 -0
  161. package/3rdparty/walkontable/src/selection/manager.js +242 -12
  162. package/3rdparty/walkontable/src/selection/manager.mjs +243 -13
  163. package/3rdparty/walkontable/src/selection/scanner.js +5 -12
  164. package/3rdparty/walkontable/src/selection/scanner.mjs +5 -12
  165. package/3rdparty/walkontable/src/settings/accessor.d.mts +2 -0
  166. package/3rdparty/walkontable/src/settings/accessor.d.ts +74 -0
  167. package/3rdparty/walkontable/src/settings/accessor.js +78 -0
  168. package/3rdparty/walkontable/src/settings/accessor.mjs +71 -0
  169. package/3rdparty/walkontable/src/settings/defaults.d.mts +1 -0
  170. package/3rdparty/walkontable/src/{settings.d.ts → settings/defaults.d.ts} +16 -77
  171. package/3rdparty/walkontable/src/settings/defaults.js +146 -0
  172. package/3rdparty/walkontable/src/settings/defaults.mjs +225 -0
  173. package/3rdparty/walkontable/src/settings/index.d.mts +1 -0
  174. package/3rdparty/walkontable/src/settings/index.d.ts +6 -0
  175. package/3rdparty/walkontable/src/settings/index.js +20 -0
  176. package/3rdparty/walkontable/src/settings/index.mjs +5 -0
  177. package/3rdparty/walkontable/src/table/baseTable.d.mts +2 -0
  178. package/3rdparty/walkontable/src/table/baseTable.d.ts +284 -0
  179. package/3rdparty/walkontable/src/table/baseTable.js +290 -0
  180. package/3rdparty/walkontable/src/table/baseTable.mjs +278 -0
  181. package/3rdparty/walkontable/src/table/cellAccess.d.mts +1 -0
  182. package/3rdparty/walkontable/src/table/cellAccess.d.ts +101 -0
  183. package/3rdparty/walkontable/src/table/cellAccess.js +238 -0
  184. package/3rdparty/walkontable/src/table/cellAccess.mjs +229 -0
  185. package/3rdparty/walkontable/src/table/domScaffold.d.mts +1 -0
  186. package/3rdparty/walkontable/src/table/domScaffold.d.ts +37 -0
  187. package/3rdparty/walkontable/src/table/domScaffold.js +145 -0
  188. package/3rdparty/walkontable/src/table/domScaffold.mjs +136 -0
  189. package/3rdparty/walkontable/src/table/drawCycle.d.mts +1 -0
  190. package/3rdparty/walkontable/src/table/drawCycle.d.ts +16 -0
  191. package/3rdparty/walkontable/src/table/drawCycle.js +405 -0
  192. package/3rdparty/walkontable/src/table/drawCycle.mjs +403 -0
  193. package/3rdparty/walkontable/src/table/rangeQuery/renderedRange.d.mts +1 -0
  194. package/3rdparty/walkontable/src/table/rangeQuery/renderedRange.d.ts +38 -0
  195. package/3rdparty/walkontable/src/table/rangeQuery/renderedRange.js +15 -0
  196. package/3rdparty/walkontable/src/table/rangeQuery/renderedRange.mjs +14 -0
  197. package/3rdparty/walkontable/src/table/{mixin → rangeQuery}/stickyColumnsStart.d.ts +1 -1
  198. package/3rdparty/walkontable/src/table/{mixin → rangeQuery}/stickyColumnsStart.js +1 -1
  199. package/3rdparty/walkontable/src/table/{mixin → rangeQuery}/stickyColumnsStart.mjs +1 -1
  200. package/3rdparty/walkontable/src/table/{mixin → rangeQuery}/stickyRowsBottom.d.ts +1 -1
  201. package/3rdparty/walkontable/src/table/{mixin → rangeQuery}/stickyRowsTop.d.ts +1 -1
  202. package/3rdparty/walkontable/src/table/{mixin → rangeQuery}/stickyRowsTop.js +1 -1
  203. package/3rdparty/walkontable/src/table/{mixin → rangeQuery}/stickyRowsTop.mjs +1 -1
  204. package/3rdparty/walkontable/src/table/rangeQuery/viewportPredicates.d.mts +2 -0
  205. package/3rdparty/walkontable/src/table/rangeQuery/viewportPredicates.d.ts +226 -0
  206. package/3rdparty/walkontable/src/table/rangeQuery/viewportPredicates.js +251 -0
  207. package/3rdparty/walkontable/src/table/rangeQuery/viewportPredicates.mjs +241 -0
  208. package/3rdparty/walkontable/src/table/rangeQuery/virtualRange.d.mts +1 -0
  209. package/3rdparty/walkontable/src/table/rangeQuery/virtualRange.d.ts +14 -0
  210. package/3rdparty/walkontable/src/table/rangeQuery/virtualRange.js +196 -0
  211. package/3rdparty/walkontable/src/table/rangeQuery/virtualRange.mjs +179 -0
  212. package/3rdparty/walkontable/src/table/regions/bottomInlineStartCornerTable.d.mts +2 -0
  213. package/3rdparty/walkontable/src/table/regions/bottomInlineStartCornerTable.d.ts +16 -0
  214. package/3rdparty/walkontable/src/table/{bottomInlineStartCorner.js → regions/bottomInlineStartCornerTable.js} +9 -12
  215. package/3rdparty/walkontable/src/table/regions/bottomInlineStartCornerTable.mjs +21 -0
  216. package/3rdparty/walkontable/src/table/regions/bottomTable.d.mts +2 -0
  217. package/3rdparty/walkontable/src/table/regions/bottomTable.d.ts +15 -0
  218. package/3rdparty/walkontable/src/table/regions/bottomTable.js +35 -0
  219. package/3rdparty/walkontable/src/table/regions/bottomTable.mjs +20 -0
  220. package/3rdparty/walkontable/src/table/regions/inlineStartTable.d.mts +2 -0
  221. package/3rdparty/walkontable/src/table/regions/inlineStartTable.d.ts +12 -0
  222. package/3rdparty/walkontable/src/table/regions/inlineStartTable.js +32 -0
  223. package/3rdparty/walkontable/src/table/regions/inlineStartTable.mjs +17 -0
  224. package/3rdparty/walkontable/src/table/regions/masterTable.d.mts +2 -0
  225. package/3rdparty/walkontable/src/table/{master.d.ts → regions/masterTable.d.ts} +4 -13
  226. package/3rdparty/walkontable/src/table/{master.js → regions/masterTable.js} +27 -57
  227. package/3rdparty/walkontable/src/table/{master.mjs → regions/masterTable.mjs} +26 -56
  228. package/3rdparty/walkontable/src/table/regions/topInlineStartCornerTable.d.mts +2 -0
  229. package/3rdparty/walkontable/src/table/regions/topInlineStartCornerTable.d.ts +16 -0
  230. package/3rdparty/walkontable/src/table/{topInlineStartCorner.js → regions/topInlineStartCornerTable.js} +9 -12
  231. package/3rdparty/walkontable/src/table/regions/topInlineStartCornerTable.mjs +21 -0
  232. package/3rdparty/walkontable/src/table/regions/topTable.d.mts +2 -0
  233. package/3rdparty/walkontable/src/table/regions/topTable.d.ts +15 -0
  234. package/3rdparty/walkontable/src/table/regions/topTable.js +35 -0
  235. package/3rdparty/walkontable/src/table/regions/topTable.mjs +20 -0
  236. package/3rdparty/walkontable/src/types.d.ts +7 -69
  237. package/3rdparty/walkontable/src/types.mjs +2 -1
  238. package/3rdparty/walkontable/src/utils/pointerToCoords.d.mts +1 -0
  239. package/3rdparty/walkontable/src/utils/{cellCoords.d.ts → pointerToCoords.d.ts} +24 -0
  240. package/3rdparty/walkontable/src/utils/pointerToCoords.js +181 -0
  241. package/3rdparty/walkontable/src/utils/pointerToCoords.mjs +186 -0
  242. package/3rdparty/walkontable/src/viewport/boxLayout/gatherLayoutInput.d.mts +1 -0
  243. package/3rdparty/walkontable/src/viewport/boxLayout/gatherLayoutInput.d.ts +40 -0
  244. package/3rdparty/walkontable/src/viewport/boxLayout/gatherLayoutInput.js +139 -0
  245. package/3rdparty/walkontable/src/viewport/boxLayout/gatherLayoutInput.mjs +131 -0
  246. package/3rdparty/walkontable/src/viewport/boxLayout/layoutSnapshot.d.mts +1 -0
  247. package/3rdparty/walkontable/src/viewport/boxLayout/layoutSnapshot.d.ts +133 -0
  248. package/3rdparty/walkontable/src/viewport/boxLayout/layoutSnapshot.js +18 -0
  249. package/3rdparty/walkontable/src/viewport/boxLayout/layoutSnapshot.mjs +18 -0
  250. package/3rdparty/walkontable/src/viewport/boxLayout/resolveLayout.d.mts +1 -0
  251. package/3rdparty/walkontable/src/viewport/boxLayout/resolveLayout.d.ts +17 -0
  252. package/3rdparty/walkontable/src/viewport/boxLayout/resolveLayout.js +104 -0
  253. package/3rdparty/walkontable/src/viewport/boxLayout/resolveLayout.mjs +99 -0
  254. package/3rdparty/walkontable/src/viewport/calculatorFactory.d.mts +1 -0
  255. package/3rdparty/walkontable/src/viewport/calculatorFactory.d.ts +84 -0
  256. package/3rdparty/walkontable/src/viewport/calculatorFactory.js +588 -0
  257. package/3rdparty/walkontable/src/viewport/calculatorFactory.mjs +601 -0
  258. package/3rdparty/walkontable/src/viewport/viewport.d.ts +267 -0
  259. package/3rdparty/walkontable/src/viewport/viewport.js +363 -0
  260. package/3rdparty/walkontable/src/viewport/viewport.mjs +355 -0
  261. package/3rdparty/walkontable/src/viewport/workspaceSize.d.mts +1 -0
  262. package/3rdparty/walkontable/src/viewport/workspaceSize.d.ts +59 -0
  263. package/3rdparty/walkontable/src/viewport/workspaceSize.js +284 -0
  264. package/3rdparty/walkontable/src/viewport/workspaceSize.mjs +282 -0
  265. package/3rdparty/walkontable/src/wire.d.mts +1 -0
  266. package/3rdparty/walkontable/src/wire.d.ts +81 -0
  267. package/3rdparty/walkontable/src/wire.js +56 -0
  268. package/3rdparty/walkontable/src/wire.mjs +56 -0
  269. package/LICENSE.txt +1 -1
  270. package/README.md +2 -2
  271. package/base.d.ts +10 -2
  272. package/base.js +2 -2
  273. package/base.mjs +2 -2
  274. package/cellTypes/checkboxType/accessors/valueSetter.d.ts +1 -1
  275. package/cellTypes/checkboxType/accessors/valueSetter.js +3 -1
  276. package/cellTypes/checkboxType/accessors/valueSetter.mjs +3 -1
  277. package/cellTypes/index.d.ts +3 -2
  278. package/cellTypes/index.js +9 -0
  279. package/cellTypes/index.mjs +5 -2
  280. package/cellTypes/intlDatetimeType/index.d.mts +1 -0
  281. package/cellTypes/intlDatetimeType/index.d.ts +1 -0
  282. package/cellTypes/intlDatetimeType/index.js +19 -0
  283. package/cellTypes/intlDatetimeType/index.mjs +1 -0
  284. package/cellTypes/intlDatetimeType/intlDatetimeType.d.mts +1 -0
  285. package/cellTypes/intlDatetimeType/intlDatetimeType.d.ts +16 -0
  286. package/cellTypes/intlDatetimeType/intlDatetimeType.js +31 -0
  287. package/cellTypes/intlDatetimeType/intlDatetimeType.mjs +15 -0
  288. package/cellTypes/multiSelectType/index.d.ts +1 -1
  289. package/cellTypes/multiSelectType/index.js +3 -0
  290. package/cellTypes/multiSelectType/index.mjs +1 -1
  291. package/cellTypes/multiSelectType/multiSelectType.d.ts +1 -0
  292. package/cellTypes/multiSelectType/multiSelectType.js +4 -0
  293. package/cellTypes/multiSelectType/multiSelectType.mjs +1 -0
  294. package/cellTypes/numericType/accessors/valueSetter.js +30 -2
  295. package/cellTypes/numericType/accessors/valueSetter.mjs +31 -3
  296. package/core/coordsMapper/rangeToRenderableMapper.js +5 -12
  297. package/core/coordsMapper/rangeToRenderableMapper.mjs +5 -12
  298. package/core/hooks/bucket.d.ts +40 -6
  299. package/core/hooks/bucket.js +113 -84
  300. package/core/hooks/bucket.mjs +118 -84
  301. package/core/hooks/constants.js +254 -16
  302. package/core/hooks/constants.mjs +254 -16
  303. package/core/hooks/index.js +28 -25
  304. package/core/hooks/index.mjs +28 -25
  305. package/core/layout/constants.d.ts +11 -0
  306. package/core/layout/constants.js +6 -0
  307. package/core/layout/constants.mjs +12 -0
  308. package/core/layout/domSlot.d.ts +3 -1
  309. package/core/layout/domSlot.js +21 -14
  310. package/core/layout/domSlot.mjs +21 -14
  311. package/core/layout/index.d.ts +2 -2
  312. package/core/layout/index.js +6 -0
  313. package/core/layout/index.mjs +2 -2
  314. package/core/layout/layoutManager.d.ts +13 -0
  315. package/core/layout/layoutManager.js +25 -13
  316. package/core/layout/layoutManager.mjs +26 -11
  317. package/core/settings.d.ts +59 -6
  318. package/core/types.d.ts +15 -1
  319. package/core/types.mjs +9 -0
  320. package/core.js +481 -85
  321. package/core.mjs +483 -87
  322. package/dataMap/dataMap.d.ts +3 -13
  323. package/dataMap/dataMap.js +101 -44
  324. package/dataMap/dataMap.mjs +102 -45
  325. package/dataMap/dataSource.js +4 -1
  326. package/dataMap/dataSource.mjs +4 -1
  327. package/dataMap/metaManager/index.d.ts +62 -8
  328. package/dataMap/metaManager/index.js +66 -0
  329. package/dataMap/metaManager/index.mjs +66 -0
  330. package/dataMap/metaManager/lazyFactoryMap.d.ts +68 -43
  331. package/dataMap/metaManager/lazyFactoryMap.js +490 -110
  332. package/dataMap/metaManager/lazyFactoryMap.mjs +504 -111
  333. package/dataMap/metaManager/metaLayers/cellMeta.d.ts +55 -8
  334. package/dataMap/metaManager/metaLayers/cellMeta.js +112 -17
  335. package/dataMap/metaManager/metaLayers/cellMeta.mjs +112 -17
  336. package/dataMap/metaManager/metaLayers/columnMeta.d.ts +2 -1
  337. package/dataMap/metaManager/metaLayers/columnMeta.js +1 -0
  338. package/dataMap/metaManager/metaLayers/columnMeta.mjs +1 -0
  339. package/dataMap/metaManager/metaSchema.js +712 -31
  340. package/dataMap/metaManager/metaSchema.mjs +712 -31
  341. package/dataMap/metaManager/mods/dynamicCellMeta.d.ts +24 -10
  342. package/dataMap/metaManager/mods/dynamicCellMeta.js +245 -28
  343. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +246 -29
  344. package/dataMap/metaManager/mods/extendMetaProperties.js +4 -9
  345. package/dataMap/metaManager/mods/extendMetaProperties.mjs +4 -9
  346. package/dataMap/sourceDataValidator.d.ts +13 -21
  347. package/dataMap/sourceDataValidator.js +39 -29
  348. package/dataMap/sourceDataValidator.mjs +50 -33
  349. package/dist/handsontable.full.js +34553 -9903
  350. package/dist/handsontable.full.min.js +168 -112
  351. package/dist/handsontable.js +31541 -13409
  352. package/dist/handsontable.min.js +172 -116
  353. package/dist/languages/all.js +2 -1
  354. package/dist/languages/all.min.js +1 -1
  355. package/dist/languages/fa-IR.js +2 -1
  356. package/dist/languages/fa-IR.min.js +1 -1
  357. package/dist/themes/classic.js +9 -3
  358. package/dist/themes/classic.min.js +4 -4
  359. package/dist/themes/horizon.js +9 -3
  360. package/dist/themes/horizon.min.js +4 -4
  361. package/dist/themes/main.js +9 -3
  362. package/dist/themes/main.min.js +4 -4
  363. package/dist/themes/static/variables/colors/ant.js +3 -3
  364. package/dist/themes/static/variables/colors/ant.min.js +3 -3
  365. package/dist/themes/static/variables/colors/classic.js +3 -3
  366. package/dist/themes/static/variables/colors/classic.min.js +3 -3
  367. package/dist/themes/static/variables/colors/horizon.js +3 -3
  368. package/dist/themes/static/variables/colors/horizon.min.js +3 -3
  369. package/dist/themes/static/variables/colors/main.js +3 -3
  370. package/dist/themes/static/variables/colors/main.min.js +3 -3
  371. package/dist/themes/static/variables/colors/material.js +3 -3
  372. package/dist/themes/static/variables/colors/material.min.js +3 -3
  373. package/dist/themes/static/variables/colors/shadcn.js +3 -3
  374. package/dist/themes/static/variables/colors/shadcn.min.js +3 -3
  375. package/dist/themes/static/variables/density.js +3 -3
  376. package/dist/themes/static/variables/density.min.js +3 -3
  377. package/dist/themes/static/variables/helpers/iconsMap.js +4 -9
  378. package/dist/themes/static/variables/helpers/iconsMap.min.js +4 -9
  379. package/dist/themes/static/variables/icons/horizon.js +3 -3
  380. package/dist/themes/static/variables/icons/horizon.min.js +3 -3
  381. package/dist/themes/static/variables/icons/main.js +3 -3
  382. package/dist/themes/static/variables/icons/main.min.js +3 -3
  383. package/dist/themes/static/variables/sizing.js +3 -3
  384. package/dist/themes/static/variables/sizing.min.js +3 -3
  385. package/dist/themes/static/variables/tokens/classic.js +9 -3
  386. package/dist/themes/static/variables/tokens/classic.min.js +4 -4
  387. package/dist/themes/static/variables/tokens/horizon.js +9 -3
  388. package/dist/themes/static/variables/tokens/horizon.min.js +4 -4
  389. package/dist/themes/static/variables/tokens/main.js +9 -3
  390. package/dist/themes/static/variables/tokens/main.min.js +4 -4
  391. package/editorManager.js +1 -3
  392. package/editorManager.mjs +1 -3
  393. package/editors/autocompleteEditor/autocompleteEditor.js +48 -22
  394. package/editors/autocompleteEditor/autocompleteEditor.mjs +48 -22
  395. package/editors/baseEditor/baseEditor.d.ts +15 -3
  396. package/editors/baseEditor/baseEditor.js +6 -6
  397. package/editors/baseEditor/baseEditor.mjs +16 -6
  398. package/editors/factory.js +5 -2
  399. package/editors/factory.mjs +5 -2
  400. package/editors/index.d.ts +3 -2
  401. package/editors/index.js +8 -0
  402. package/editors/index.mjs +3 -1
  403. package/editors/intlDatetimeEditor/index.d.mts +1 -0
  404. package/editors/intlDatetimeEditor/index.d.ts +1 -0
  405. package/editors/intlDatetimeEditor/index.js +19 -0
  406. package/editors/intlDatetimeEditor/index.mjs +1 -0
  407. package/editors/intlDatetimeEditor/intlDatetimeEditor.d.mts +1 -0
  408. package/editors/intlDatetimeEditor/intlDatetimeEditor.d.ts +42 -0
  409. package/editors/intlDatetimeEditor/intlDatetimeEditor.js +108 -0
  410. package/editors/intlDatetimeEditor/intlDatetimeEditor.mjs +93 -0
  411. package/editors/multiSelectEditor/controllers/dropdownController.js +5 -12
  412. package/editors/multiSelectEditor/controllers/dropdownController.mjs +5 -12
  413. package/editors/multiSelectEditor/controllers/inputController.js +1 -3
  414. package/editors/multiSelectEditor/controllers/inputController.mjs +1 -3
  415. package/editors/multiSelectEditor/multiSelectEditor.js +16 -21
  416. package/editors/multiSelectEditor/multiSelectEditor.mjs +17 -22
  417. package/editors/passwordEditor/passwordEditor.js +5 -12
  418. package/editors/passwordEditor/passwordEditor.mjs +5 -12
  419. package/editors/registry.js +4 -9
  420. package/editors/registry.mjs +4 -9
  421. package/editors/textEditor/textEditor.js +1 -1
  422. package/editors/textEditor/textEditor.mjs +2 -2
  423. package/eventManager.d.ts +3 -3
  424. package/focusManager/grid.d.ts +28 -0
  425. package/focusManager/grid.js +84 -14
  426. package/focusManager/grid.mjs +80 -15
  427. package/focusManager/scopeManager.js +1 -1
  428. package/focusManager/scopeManager.mjs +2 -2
  429. package/handsontable-non-commercial-license.pdf +0 -0
  430. package/helpers/array.d.ts +25 -0
  431. package/helpers/array.js +41 -4
  432. package/helpers/array.mjs +56 -4
  433. package/helpers/dateTime.d.ts +14 -0
  434. package/helpers/dateTime.js +74 -2
  435. package/helpers/dateTime.mjs +73 -2
  436. package/helpers/dom/cellCoords.js +156 -13
  437. package/helpers/dom/cellCoords.mjs +156 -13
  438. package/helpers/dom/element.d.ts +27 -3
  439. package/helpers/dom/element.js +92 -16
  440. package/helpers/dom/element.mjs +107 -17
  441. package/helpers/dom/event.d.ts +58 -0
  442. package/helpers/dom/event.js +39 -0
  443. package/helpers/dom/event.mjs +63 -0
  444. package/helpers/errors.d.ts +5 -0
  445. package/helpers/errors.js +10 -6
  446. package/helpers/errors.mjs +10 -6
  447. package/helpers/feature.d.ts +19 -0
  448. package/helpers/feature.js +21 -0
  449. package/helpers/feature.mjs +30 -0
  450. package/helpers/function.d.ts +1 -1
  451. package/helpers/function.js +4 -1
  452. package/helpers/function.mjs +4 -1
  453. package/helpers/mixed.d.ts +103 -0
  454. package/helpers/mixed.js +373 -4
  455. package/helpers/mixed.mjs +413 -4
  456. package/helpers/moves.js +2 -1
  457. package/helpers/moves.mjs +2 -1
  458. package/helpers/number.d.ts +22 -0
  459. package/helpers/number.js +49 -0
  460. package/helpers/number.mjs +66 -0
  461. package/i18n/languages/ar-AR.js +8 -19
  462. package/i18n/languages/cs-CZ.js +8 -19
  463. package/i18n/languages/de-CH.js +8 -19
  464. package/i18n/languages/de-DE.js +8 -19
  465. package/i18n/languages/en-US.js +8 -19
  466. package/i18n/languages/es-MX.js +8 -19
  467. package/i18n/languages/fa-IR.d.ts +1 -0
  468. package/i18n/languages/fa-IR.js +9 -19
  469. package/i18n/languages/fa-IR.mjs +1 -0
  470. package/i18n/languages/fr-FR.js +8 -19
  471. package/i18n/languages/hr-HR.js +8 -19
  472. package/i18n/languages/it-IT.js +8 -19
  473. package/i18n/languages/ja-JP.js +8 -19
  474. package/i18n/languages/ko-KR.js +8 -19
  475. package/i18n/languages/lv-LV.js +8 -19
  476. package/i18n/languages/nb-NO.js +8 -19
  477. package/i18n/languages/nl-NL.js +8 -19
  478. package/i18n/languages/pl-PL.js +8 -19
  479. package/i18n/languages/pt-BR.js +8 -19
  480. package/i18n/languages/ru-RU.js +8 -19
  481. package/i18n/languages/sr-SP.js +8 -19
  482. package/i18n/languages/zh-CN.js +8 -19
  483. package/i18n/languages/zh-TW.js +8 -19
  484. package/i18n/registry.js +8 -19
  485. package/index.d.ts +2 -2
  486. package/index.js +8 -19
  487. package/languages/all.js +2 -1
  488. package/languages/fa-IR.js +2 -1
  489. package/languages/fa-IR.mjs +1 -0
  490. package/languages/index.js +2 -1
  491. package/package.json +61 -1
  492. package/plugins/autoColumnSize/autoColumnSize.d.ts +24 -1
  493. package/plugins/autoColumnSize/autoColumnSize.js +506 -94
  494. package/plugins/autoColumnSize/autoColumnSize.mjs +513 -95
  495. package/plugins/autoRowSize/autoRowSize.d.ts +40 -5
  496. package/plugins/autoRowSize/autoRowSize.js +73 -36
  497. package/plugins/autoRowSize/autoRowSize.mjs +103 -41
  498. package/plugins/autofill/autofill.js +35 -24
  499. package/plugins/autofill/autofill.mjs +35 -24
  500. package/plugins/base/base.d.ts +10 -0
  501. package/plugins/base/base.js +5 -12
  502. package/plugins/base/base.mjs +5 -12
  503. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +4 -9
  504. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +4 -9
  505. package/plugins/collapsibleColumns/collapsibleColumns.d.ts +4 -0
  506. package/plugins/collapsibleColumns/collapsibleColumns.js +94 -20
  507. package/plugins/collapsibleColumns/collapsibleColumns.mjs +98 -20
  508. package/plugins/columnSorting/columnSorting.d.ts +31 -2
  509. package/plugins/columnSorting/columnSorting.js +153 -33
  510. package/plugins/columnSorting/columnSorting.mjs +155 -35
  511. package/plugins/columnSorting/columnStatesManager.d.ts +1 -1
  512. package/plugins/columnSorting/columnStatesManager.js +1 -7
  513. package/plugins/columnSorting/columnStatesManager.mjs +1 -7
  514. package/plugins/columnSorting/domHelpers.d.ts +3 -0
  515. package/plugins/columnSorting/domHelpers.js +9 -0
  516. package/plugins/columnSorting/domHelpers.mjs +3 -3
  517. package/plugins/columnSorting/rootComparator.js +21 -16
  518. package/plugins/columnSorting/rootComparator.mjs +21 -16
  519. package/plugins/columnSorting/sortFunction/checkbox.js +7 -5
  520. package/plugins/columnSorting/sortFunction/checkbox.mjs +7 -5
  521. package/plugins/columnSorting/sortFunction/default.js +15 -4
  522. package/plugins/columnSorting/sortFunction/default.mjs +15 -4
  523. package/plugins/columnSorting/sortFunction/intlDatetime.d.mts +1 -0
  524. package/plugins/columnSorting/sortFunction/intlDatetime.d.ts +10 -0
  525. package/plugins/columnSorting/sortFunction/intlDatetime.js +23 -0
  526. package/plugins/columnSorting/sortFunction/intlDatetime.mjs +12 -0
  527. package/plugins/columnSorting/sortService/registry.js +2 -0
  528. package/plugins/columnSorting/sortService/registry.mjs +2 -0
  529. package/plugins/columnSorting/utils.d.ts +8 -0
  530. package/plugins/columnSorting/utils.js +37 -45
  531. package/plugins/columnSorting/utils.mjs +42 -47
  532. package/plugins/columnSummary/columnSummary.js +13 -14
  533. package/plugins/columnSummary/columnSummary.mjs +13 -14
  534. package/plugins/columnSummary/endpoints.d.ts +69 -2
  535. package/plugins/columnSummary/endpoints.js +176 -29
  536. package/plugins/columnSummary/endpoints.mjs +176 -29
  537. package/plugins/comments/commentEditor.js +5 -10
  538. package/plugins/comments/commentEditor.mjs +6 -11
  539. package/plugins/comments/comments.js +5 -12
  540. package/plugins/comments/comments.mjs +5 -12
  541. package/plugins/comments/contextMenuItem/addEditComment.js +8 -19
  542. package/plugins/comments/contextMenuItem/readOnlyComment.js +8 -19
  543. package/plugins/comments/contextMenuItem/removeComment.js +8 -19
  544. package/plugins/comments/editorResizeObserver.js +5 -12
  545. package/plugins/comments/editorResizeObserver.mjs +5 -12
  546. package/plugins/contextMenu/contextMenu.d.ts +12 -1
  547. package/plugins/contextMenu/contextMenu.js +34 -15
  548. package/plugins/contextMenu/contextMenu.mjs +34 -15
  549. package/plugins/contextMenu/index.d.ts +1 -1
  550. package/plugins/contextMenu/menu/menu.d.ts +22 -1
  551. package/plugins/contextMenu/menu/menu.js +216 -15
  552. package/plugins/contextMenu/menu/menu.mjs +217 -16
  553. package/plugins/contextMenu/menu/positioner.js +4 -9
  554. package/plugins/contextMenu/menu/positioner.mjs +4 -9
  555. package/plugins/contextMenu/predefinedItems/alignment.js +22 -33
  556. package/plugins/contextMenu/predefinedItems/alignment.mjs +14 -14
  557. package/plugins/contextMenu/predefinedItems/clearColumn.js +9 -20
  558. package/plugins/contextMenu/predefinedItems/clearColumn.mjs +1 -1
  559. package/plugins/contextMenu/predefinedItems/columnLeft.js +8 -19
  560. package/plugins/contextMenu/predefinedItems/columnRight.js +8 -19
  561. package/plugins/contextMenu/predefinedItems/index.js +8 -19
  562. package/plugins/contextMenu/predefinedItems/readOnly.js +11 -22
  563. package/plugins/contextMenu/predefinedItems/readOnly.mjs +3 -3
  564. package/plugins/contextMenu/predefinedItems/redo.js +8 -19
  565. package/plugins/contextMenu/predefinedItems/removeColumn.js +8 -19
  566. package/plugins/contextMenu/predefinedItems/removeRow.js +8 -19
  567. package/plugins/contextMenu/predefinedItems/rowAbove.js +8 -19
  568. package/plugins/contextMenu/predefinedItems/rowBelow.js +8 -19
  569. package/plugins/contextMenu/predefinedItems/undo.js +8 -19
  570. package/plugins/contextMenu/utils.js +1 -1
  571. package/plugins/contextMenu/utils.mjs +1 -1
  572. package/plugins/copyPaste/contextMenuItem/cut.js +8 -19
  573. package/plugins/copyPaste/copyPaste.js +62 -20
  574. package/plugins/copyPaste/copyPaste.mjs +63 -21
  575. package/plugins/copyPaste/copyableRanges.js +11 -14
  576. package/plugins/copyPaste/copyableRanges.mjs +11 -14
  577. package/plugins/copyPaste/pasteEvent.d.ts +1 -1
  578. package/plugins/customBorders/contextMenuItem/bottom.js +8 -19
  579. package/plugins/customBorders/contextMenuItem/left.js +8 -19
  580. package/plugins/customBorders/contextMenuItem/noBorders.js +8 -19
  581. package/plugins/customBorders/contextMenuItem/right.js +8 -19
  582. package/plugins/customBorders/contextMenuItem/top.js +8 -19
  583. package/plugins/customBorders/customBorders.d.ts +21 -40
  584. package/plugins/customBorders/customBorders.js +1084 -223
  585. package/plugins/customBorders/customBorders.mjs +1078 -206
  586. package/plugins/customBorders/utils.d.ts +71 -0
  587. package/plugins/customBorders/utils.js +63 -0
  588. package/plugins/customBorders/utils.mjs +101 -0
  589. package/plugins/dataProvider/dataProvider.js +35 -38
  590. package/plugins/dataProvider/dataProvider.mjs +27 -19
  591. package/plugins/dataProvider/query/crud.js +1 -1
  592. package/plugins/dataProvider/query/crud.mjs +1 -1
  593. package/plugins/dialog/dialog.js +15 -33
  594. package/plugins/dialog/dialog.mjs +7 -14
  595. package/plugins/dialog/ui.js +5 -12
  596. package/plugins/dialog/ui.mjs +5 -12
  597. package/plugins/dragToScroll/autoScroller.js +4 -9
  598. package/plugins/dragToScroll/autoScroller.mjs +4 -9
  599. package/plugins/dragToScroll/dragToScroll.d.ts +2 -2
  600. package/plugins/dragToScroll/dragToScroll.js +155 -26
  601. package/plugins/dragToScroll/dragToScroll.mjs +156 -27
  602. package/plugins/dragToScroll/scrollTimer.js +4 -9
  603. package/plugins/dragToScroll/scrollTimer.mjs +4 -9
  604. package/plugins/dropdownMenu/dropdownMenu.d.ts +5 -1
  605. package/plugins/dropdownMenu/dropdownMenu.js +50 -15
  606. package/plugins/dropdownMenu/dropdownMenu.mjs +51 -16
  607. package/plugins/dropdownMenu/index.d.ts +1 -0
  608. package/plugins/emptyDataState/emptyDataState.js +15 -33
  609. package/plugins/emptyDataState/emptyDataState.mjs +7 -14
  610. package/plugins/emptyDataState/ui.js +4 -9
  611. package/plugins/emptyDataState/ui.mjs +4 -9
  612. package/plugins/exportFile/dataProvider.js +5 -1
  613. package/plugins/exportFile/dataProvider.mjs +5 -1
  614. package/plugins/exportFile/exportFile.js +13 -31
  615. package/plugins/exportFile/exportFile.mjs +5 -12
  616. package/plugins/exportFile/types/csv.js +1 -3
  617. package/plugins/exportFile/types/csv.mjs +1 -3
  618. package/plugins/exportFile/types/xlsx/cell-style.js +4 -2
  619. package/plugins/exportFile/types/xlsx/cell-style.mjs +4 -2
  620. package/plugins/exportFile/types/xlsx/date-utils.d.ts +15 -0
  621. package/plugins/exportFile/types/xlsx/date-utils.js +31 -0
  622. package/plugins/exportFile/types/xlsx/date-utils.mjs +36 -0
  623. package/plugins/exportFile/types/xlsx.js +10 -3
  624. package/plugins/exportFile/types/xlsx.mjs +11 -4
  625. package/plugins/filters/component/_base.d.ts +1 -2
  626. package/plugins/filters/component/_base.js +1 -2
  627. package/plugins/filters/component/_base.mjs +1 -2
  628. package/plugins/filters/component/actionBar.js +9 -22
  629. package/plugins/filters/component/actionBar.mjs +1 -3
  630. package/plugins/filters/component/condition.d.ts +1 -0
  631. package/plugins/filters/component/condition.js +11 -22
  632. package/plugins/filters/component/condition.mjs +3 -3
  633. package/plugins/filters/component/operators.js +1 -3
  634. package/plugins/filters/component/operators.mjs +1 -3
  635. package/plugins/filters/component/value.d.ts +5 -6
  636. package/plugins/filters/component/value.js +62 -56
  637. package/plugins/filters/component/value.mjs +55 -38
  638. package/plugins/filters/condition/beginsWith.js +8 -19
  639. package/plugins/filters/condition/between.js +8 -19
  640. package/plugins/filters/condition/contains.js +8 -19
  641. package/plugins/filters/condition/date/after.js +10 -20
  642. package/plugins/filters/condition/date/after.mjs +2 -1
  643. package/plugins/filters/condition/date/afterOrEqual.js +10 -20
  644. package/plugins/filters/condition/date/afterOrEqual.mjs +2 -1
  645. package/plugins/filters/condition/date/before.js +10 -20
  646. package/plugins/filters/condition/date/before.mjs +2 -1
  647. package/plugins/filters/condition/date/beforeOrEqual.js +10 -20
  648. package/plugins/filters/condition/date/beforeOrEqual.mjs +2 -1
  649. package/plugins/filters/condition/date/today.js +8 -19
  650. package/plugins/filters/condition/date/tomorrow.js +8 -19
  651. package/plugins/filters/condition/date/yesterday.js +8 -19
  652. package/plugins/filters/condition/empty.js +8 -19
  653. package/plugins/filters/condition/endsWith.js +8 -19
  654. package/plugins/filters/condition/equal.d.ts +7 -0
  655. package/plugins/filters/condition/equal.js +12 -19
  656. package/plugins/filters/condition/equal.mjs +10 -0
  657. package/plugins/filters/condition/greaterThan.js +8 -19
  658. package/plugins/filters/condition/greaterThanOrEqual.js +8 -19
  659. package/plugins/filters/condition/intlDate/after.js +8 -19
  660. package/plugins/filters/condition/intlDate/afterOrEqual.js +8 -19
  661. package/plugins/filters/condition/intlDate/before.js +8 -19
  662. package/plugins/filters/condition/intlDate/beforeOrEqual.js +8 -19
  663. package/plugins/filters/condition/intlDate/between.js +8 -19
  664. package/plugins/filters/condition/intlDate/today.js +8 -19
  665. package/plugins/filters/condition/intlDate/tomorrow.js +8 -19
  666. package/plugins/filters/condition/intlDate/yesterday.js +8 -19
  667. package/plugins/filters/condition/intlDatetime/after.d.mts +1 -0
  668. package/plugins/filters/condition/intlDatetime/after.d.ts +18 -0
  669. package/plugins/filters/condition/intlDatetime/after.js +66 -0
  670. package/plugins/filters/condition/intlDatetime/after.mjs +22 -0
  671. package/plugins/filters/condition/intlDatetime/afterOrEqual.d.mts +1 -0
  672. package/plugins/filters/condition/intlDatetime/afterOrEqual.d.ts +18 -0
  673. package/plugins/filters/condition/intlDatetime/afterOrEqual.js +66 -0
  674. package/plugins/filters/condition/intlDatetime/afterOrEqual.mjs +22 -0
  675. package/plugins/filters/condition/intlDatetime/before.d.mts +1 -0
  676. package/plugins/filters/condition/intlDatetime/before.d.ts +18 -0
  677. package/plugins/filters/condition/intlDatetime/before.js +66 -0
  678. package/plugins/filters/condition/intlDatetime/before.mjs +22 -0
  679. package/plugins/filters/condition/intlDatetime/beforeOrEqual.d.mts +1 -0
  680. package/plugins/filters/condition/intlDatetime/beforeOrEqual.d.ts +18 -0
  681. package/plugins/filters/condition/intlDatetime/beforeOrEqual.js +66 -0
  682. package/plugins/filters/condition/intlDatetime/beforeOrEqual.mjs +22 -0
  683. package/plugins/filters/condition/intlDatetime/between.d.mts +1 -0
  684. package/plugins/filters/condition/intlDatetime/between.d.ts +18 -0
  685. package/plugins/filters/condition/intlDatetime/between.js +67 -0
  686. package/plugins/filters/condition/intlDatetime/between.mjs +23 -0
  687. package/plugins/filters/condition/intlDatetime/today.d.mts +1 -0
  688. package/plugins/filters/condition/intlDatetime/today.d.ts +17 -0
  689. package/plugins/filters/condition/intlDatetime/today.js +65 -0
  690. package/plugins/filters/condition/intlDatetime/today.mjs +20 -0
  691. package/plugins/filters/condition/intlDatetime/tomorrow.d.mts +1 -0
  692. package/plugins/filters/condition/intlDatetime/tomorrow.d.ts +17 -0
  693. package/plugins/filters/condition/intlDatetime/tomorrow.js +66 -0
  694. package/plugins/filters/condition/intlDatetime/tomorrow.mjs +21 -0
  695. package/plugins/filters/condition/intlDatetime/yesterday.d.mts +1 -0
  696. package/plugins/filters/condition/intlDatetime/yesterday.d.ts +17 -0
  697. package/plugins/filters/condition/intlDatetime/yesterday.js +66 -0
  698. package/plugins/filters/condition/intlDatetime/yesterday.mjs +21 -0
  699. package/plugins/filters/condition/intlTime/after.js +8 -19
  700. package/plugins/filters/condition/intlTime/afterOrEqual.js +8 -19
  701. package/plugins/filters/condition/intlTime/before.js +8 -19
  702. package/plugins/filters/condition/intlTime/beforeOrEqual.js +8 -19
  703. package/plugins/filters/condition/intlTime/between.js +8 -19
  704. package/plugins/filters/condition/lessThan.js +8 -19
  705. package/plugins/filters/condition/lessThanOrEqual.js +8 -19
  706. package/plugins/filters/condition/none.js +8 -19
  707. package/plugins/filters/condition/notBetween.js +8 -19
  708. package/plugins/filters/condition/notContains.js +8 -19
  709. package/plugins/filters/condition/notEmpty.js +8 -19
  710. package/plugins/filters/condition/notEqual.js +8 -19
  711. package/plugins/filters/conditionCollection.js +4 -7
  712. package/plugins/filters/conditionCollection.mjs +4 -7
  713. package/plugins/filters/conditionUpdateObserver.d.ts +2 -2
  714. package/plugins/filters/conditionUpdateObserver.js +144 -52
  715. package/plugins/filters/conditionUpdateObserver.mjs +144 -52
  716. package/plugins/filters/constants.d.ts +1 -0
  717. package/plugins/filters/constants.js +31 -0
  718. package/plugins/filters/constants.mjs +28 -0
  719. package/plugins/filters/dataFilter.d.ts +4 -12
  720. package/plugins/filters/dataFilter.js +7 -19
  721. package/plugins/filters/dataFilter.mjs +8 -20
  722. package/plugins/filters/filters.d.ts +33 -9
  723. package/plugins/filters/filters.js +104 -62
  724. package/plugins/filters/filters.mjs +97 -44
  725. package/plugins/filters/logicalOperations/conjunction.js +8 -19
  726. package/plugins/filters/logicalOperations/disjunction.js +8 -19
  727. package/plugins/filters/logicalOperations/disjunctionWithExtraCondition.js +8 -19
  728. package/plugins/filters/sortComparators.d.ts +9 -2
  729. package/plugins/filters/sortComparators.js +34 -1
  730. package/plugins/filters/sortComparators.mjs +38 -3
  731. package/plugins/filters/ui/_base.js +8 -19
  732. package/plugins/filters/ui/input.d.ts +4 -0
  733. package/plugins/filters/ui/input.js +23 -18
  734. package/plugins/filters/ui/input.mjs +23 -18
  735. package/plugins/filters/ui/link.js +4 -9
  736. package/plugins/filters/ui/link.mjs +4 -9
  737. package/plugins/filters/ui/multipleSelect.js +40 -35
  738. package/plugins/filters/ui/multipleSelect.mjs +32 -16
  739. package/plugins/filters/ui/radioInput.js +4 -9
  740. package/plugins/filters/ui/radioInput.mjs +4 -9
  741. package/plugins/filters/ui/select.js +14 -32
  742. package/plugins/filters/ui/select.mjs +6 -13
  743. package/plugins/formulas/engine/register.d.ts +5 -4
  744. package/plugins/formulas/engine/register.js +5 -2
  745. package/plugins/formulas/engine/register.mjs +9 -5
  746. package/plugins/formulas/engine/settings.d.ts +2 -6
  747. package/plugins/formulas/engine/settings.js +29 -4
  748. package/plugins/formulas/engine/settings.mjs +29 -4
  749. package/plugins/formulas/engine/types.d.ts +12 -2
  750. package/plugins/formulas/formulas.d.ts +39 -0
  751. package/plugins/formulas/formulas.js +748 -55
  752. package/plugins/formulas/formulas.mjs +752 -57
  753. package/plugins/formulas/hyperlinkUrl.d.mts +1 -0
  754. package/plugins/formulas/hyperlinkUrl.d.ts +12 -0
  755. package/plugins/formulas/hyperlinkUrl.js +32 -0
  756. package/plugins/formulas/hyperlinkUrl.mjs +32 -0
  757. package/plugins/formulas/indexSyncer/axisSyncer.d.ts +1 -0
  758. package/plugins/formulas/indexSyncer/axisSyncer.js +77 -27
  759. package/plugins/formulas/indexSyncer/axisSyncer.mjs +77 -27
  760. package/plugins/formulas/indexSyncer/index.js +4 -9
  761. package/plugins/formulas/indexSyncer/index.mjs +4 -9
  762. package/plugins/formulas/utils.d.ts +9 -0
  763. package/plugins/formulas/utils.js +21 -0
  764. package/plugins/formulas/utils.mjs +25 -0
  765. package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +8 -19
  766. package/plugins/hiddenColumns/contextMenuItem/showColumn.js +14 -20
  767. package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +6 -1
  768. package/plugins/hiddenColumns/hiddenColumns.js +11 -15
  769. package/plugins/hiddenColumns/hiddenColumns.mjs +11 -15
  770. package/plugins/hiddenRows/contextMenuItem/hideRow.js +8 -19
  771. package/plugins/hiddenRows/contextMenuItem/showRow.js +14 -20
  772. package/plugins/hiddenRows/contextMenuItem/showRow.mjs +6 -1
  773. package/plugins/hiddenRows/hiddenRows.js +11 -15
  774. package/plugins/hiddenRows/hiddenRows.mjs +11 -15
  775. package/plugins/index.d.ts +5 -1
  776. package/plugins/index.js +10 -0
  777. package/plugins/index.mjs +5 -1
  778. package/plugins/loading/loading.js +13 -31
  779. package/plugins/loading/loading.mjs +5 -12
  780. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +8 -19
  781. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +8 -19
  782. package/plugins/manualColumnFreeze/manualColumnFreeze.js +5 -12
  783. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +5 -12
  784. package/plugins/manualColumnMove/manualColumnMove.d.ts +10 -0
  785. package/plugins/manualColumnMove/manualColumnMove.js +128 -33
  786. package/plugins/manualColumnMove/manualColumnMove.mjs +129 -34
  787. package/plugins/manualColumnResize/manualColumnResize.d.ts +12 -1
  788. package/plugins/manualColumnResize/manualColumnResize.js +28 -17
  789. package/plugins/manualColumnResize/manualColumnResize.mjs +28 -17
  790. package/plugins/manualRowMove/manualRowMove.js +5 -12
  791. package/plugins/manualRowMove/manualRowMove.mjs +5 -12
  792. package/plugins/manualRowResize/manualRowResize.d.ts +13 -2
  793. package/plugins/manualRowResize/manualRowResize.js +29 -18
  794. package/plugins/manualRowResize/manualRowResize.mjs +29 -18
  795. package/plugins/mergeCells/cellCoords.d.ts +8 -0
  796. package/plugins/mergeCells/cellCoords.js +15 -9
  797. package/plugins/mergeCells/cellCoords.mjs +15 -9
  798. package/plugins/mergeCells/cellsCollection.d.ts +46 -2
  799. package/plugins/mergeCells/cellsCollection.js +190 -71
  800. package/plugins/mergeCells/cellsCollection.mjs +190 -71
  801. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +8 -19
  802. package/plugins/mergeCells/focusOrder.d.ts +26 -20
  803. package/plugins/mergeCells/focusOrder.js +363 -189
  804. package/plugins/mergeCells/focusOrder.mjs +368 -184
  805. package/plugins/mergeCells/mergeCells.d.ts +13 -8
  806. package/plugins/mergeCells/mergeCells.js +327 -76
  807. package/plugins/mergeCells/mergeCells.mjs +327 -76
  808. package/plugins/moveCells/helpers.d.mts +1 -0
  809. package/plugins/moveCells/helpers.d.ts +21 -0
  810. package/plugins/moveCells/helpers.js +20 -0
  811. package/plugins/moveCells/helpers.mjs +15 -0
  812. package/plugins/moveCells/index.d.mts +1 -0
  813. package/plugins/moveCells/index.d.ts +1 -0
  814. package/plugins/moveCells/index.js +22 -0
  815. package/plugins/moveCells/index.mjs +1 -0
  816. package/plugins/moveCells/moveCells.d.mts +1 -0
  817. package/plugins/moveCells/moveCells.d.ts +80 -0
  818. package/plugins/moveCells/moveCells.js +595 -0
  819. package/plugins/moveCells/moveCells.mjs +580 -0
  820. package/plugins/multiColumnSorting/multiColumnSorting.d.ts +8 -8
  821. package/plugins/multiColumnSorting/multiColumnSorting.js +11 -16
  822. package/plugins/multiColumnSorting/multiColumnSorting.mjs +11 -16
  823. package/plugins/multiColumnSorting/rootComparator.js +26 -19
  824. package/plugins/multiColumnSorting/rootComparator.mjs +26 -19
  825. package/plugins/multipleSelectionHandles/multipleSelectionHandles.d.ts +19 -4
  826. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +266 -58
  827. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +266 -58
  828. package/plugins/nestedHeaders/nestedHeaders.d.ts +10 -1
  829. package/plugins/nestedHeaders/nestedHeaders.js +227 -35
  830. package/plugins/nestedHeaders/nestedHeaders.mjs +227 -35
  831. package/plugins/nestedHeaders/stateManager/columnArrangement.d.mts +1 -0
  832. package/plugins/nestedHeaders/stateManager/columnArrangement.d.ts +37 -0
  833. package/plugins/nestedHeaders/stateManager/columnArrangement.js +35 -0
  834. package/plugins/nestedHeaders/stateManager/columnArrangement.mjs +30 -0
  835. package/plugins/nestedHeaders/stateManager/deriveSettings.d.mts +1 -0
  836. package/plugins/nestedHeaders/stateManager/deriveSettings.d.ts +57 -0
  837. package/plugins/nestedHeaders/stateManager/deriveSettings.js +115 -0
  838. package/plugins/nestedHeaders/stateManager/deriveSettings.mjs +135 -0
  839. package/plugins/nestedHeaders/stateManager/headersTree.d.ts +14 -1
  840. package/plugins/nestedHeaders/stateManager/headersTree.js +4 -9
  841. package/plugins/nestedHeaders/stateManager/headersTree.mjs +4 -9
  842. package/plugins/nestedHeaders/stateManager/index.d.ts +76 -13
  843. package/plugins/nestedHeaders/stateManager/index.js +386 -50
  844. package/plugins/nestedHeaders/stateManager/index.mjs +387 -51
  845. package/plugins/nestedHeaders/stateManager/matrixGenerator.js +3 -2
  846. package/plugins/nestedHeaders/stateManager/matrixGenerator.mjs +3 -2
  847. package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +5 -1
  848. package/plugins/nestedHeaders/stateManager/settingsNormalizer.mjs +5 -1
  849. package/plugins/nestedHeaders/stateManager/sourceSettings.d.ts +23 -6
  850. package/plugins/nestedHeaders/stateManager/sourceSettings.js +24 -13
  851. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +24 -13
  852. package/plugins/nestedHeaders/stateManager/utils.d.ts +17 -1
  853. package/plugins/nestedHeaders/stateManager/utils.js +6 -1
  854. package/plugins/nestedHeaders/stateManager/utils.mjs +6 -1
  855. package/plugins/nestedHeaders/utils/ghostTable.js +1 -3
  856. package/plugins/nestedHeaders/utils/ghostTable.mjs +1 -3
  857. package/plugins/nestedRows/data/dataManager.d.ts +4 -1
  858. package/plugins/nestedRows/data/dataManager.js +10 -4
  859. package/plugins/nestedRows/data/dataManager.mjs +10 -4
  860. package/plugins/nestedRows/nestedRows.d.ts +127 -1
  861. package/plugins/nestedRows/nestedRows.js +332 -17
  862. package/plugins/nestedRows/nestedRows.mjs +332 -17
  863. package/plugins/nestedRows/ui/collapsing.d.ts +58 -0
  864. package/plugins/nestedRows/ui/collapsing.js +234 -40
  865. package/plugins/nestedRows/ui/collapsing.mjs +234 -40
  866. package/plugins/nestedRows/ui/contextMenu.js +12 -28
  867. package/plugins/nestedRows/ui/contextMenu.mjs +4 -9
  868. package/plugins/notification/notification.js +13 -31
  869. package/plugins/notification/notification.mjs +5 -12
  870. package/plugins/notification/ui.js +4 -9
  871. package/plugins/notification/ui.mjs +4 -9
  872. package/plugins/pagination/pagination.js +7 -14
  873. package/plugins/pagination/pagination.mjs +7 -14
  874. package/plugins/pagination/ui.js +13 -31
  875. package/plugins/pagination/ui.mjs +5 -12
  876. package/plugins/search/search.js +27 -11
  877. package/plugins/search/search.mjs +27 -11
  878. package/plugins/selectionHandles/helpers.d.mts +1 -0
  879. package/plugins/selectionHandles/helpers.d.ts +17 -0
  880. package/plugins/selectionHandles/helpers.js +16 -0
  881. package/plugins/selectionHandles/helpers.mjs +11 -0
  882. package/plugins/selectionHandles/index.d.mts +1 -0
  883. package/plugins/selectionHandles/index.d.ts +1 -0
  884. package/plugins/selectionHandles/index.js +22 -0
  885. package/plugins/selectionHandles/index.mjs +1 -0
  886. package/plugins/selectionHandles/selectionHandles.d.mts +1 -0
  887. package/plugins/selectionHandles/selectionHandles.d.ts +52 -0
  888. package/plugins/selectionHandles/selectionHandles.js +335 -0
  889. package/plugins/selectionHandles/selectionHandles.mjs +316 -0
  890. package/plugins/stretchColumns/calculator.js +5 -12
  891. package/plugins/stretchColumns/calculator.mjs +5 -12
  892. package/plugins/stretchColumns/strategies/last.js +4 -9
  893. package/plugins/stretchColumns/strategies/last.mjs +4 -9
  894. package/plugins/stretchColumns/stretchColumns.js +4 -9
  895. package/plugins/stretchColumns/stretchColumns.mjs +4 -9
  896. package/plugins/touchScroll/touchScroll.js +4 -9
  897. package/plugins/touchScroll/touchScroll.mjs +4 -9
  898. package/plugins/trimRows/trimRows.d.ts +1 -1
  899. package/plugins/trimRows/trimRows.js +10 -11
  900. package/plugins/trimRows/trimRows.mjs +10 -11
  901. package/plugins/types.d.ts +4 -0
  902. package/plugins/undoRedo/actions/cellAlignment.js +1 -1
  903. package/plugins/undoRedo/actions/cellAlignment.mjs +1 -1
  904. package/plugins/undoRedo/actions/createColumn.js +4 -1
  905. package/plugins/undoRedo/actions/createColumn.mjs +4 -1
  906. package/plugins/undoRedo/actions/createRow.js +4 -1
  907. package/plugins/undoRedo/actions/createRow.mjs +4 -1
  908. package/plugins/undoRedo/actions/fixedCounts.d.mts +1 -0
  909. package/plugins/undoRedo/actions/fixedCounts.d.ts +36 -0
  910. package/plugins/undoRedo/actions/fixedCounts.js +63 -0
  911. package/plugins/undoRedo/actions/fixedCounts.mjs +62 -0
  912. package/plugins/undoRedo/actions/index.js +2 -0
  913. package/plugins/undoRedo/actions/index.mjs +2 -0
  914. package/plugins/undoRedo/actions/moveCells.d.mts +1 -0
  915. package/plugins/undoRedo/actions/moveCells.d.ts +104 -0
  916. package/plugins/undoRedo/actions/moveCells.js +225 -0
  917. package/plugins/undoRedo/actions/moveCells.mjs +227 -0
  918. package/plugins/undoRedo/actions/removeColumn.d.ts +18 -2
  919. package/plugins/undoRedo/actions/removeColumn.js +11 -4
  920. package/plugins/undoRedo/actions/removeColumn.mjs +12 -5
  921. package/plugins/undoRedo/actions/removeRow.js +2 -57
  922. package/plugins/undoRedo/actions/removeRow.mjs +2 -57
  923. package/plugins/undoRedo/undoRedo.d.ts +26 -0
  924. package/plugins/undoRedo/undoRedo.js +40 -11
  925. package/plugins/undoRedo/undoRedo.mjs +40 -11
  926. package/plugins/undoRedo/utils.d.ts +29 -0
  927. package/plugins/undoRedo/utils.js +55 -3
  928. package/plugins/undoRedo/utils.mjs +59 -0
  929. package/renderSizeProbe.d.mts +1 -0
  930. package/renderSizeProbe.d.ts +60 -0
  931. package/renderSizeProbe.js +161 -0
  932. package/renderSizeProbe.mjs +174 -0
  933. package/renderers/checkboxRenderer/checkboxRenderer.js +9 -4
  934. package/renderers/checkboxRenderer/checkboxRenderer.mjs +9 -4
  935. package/renderers/index.d.ts +3 -2
  936. package/renderers/index.js +8 -0
  937. package/renderers/index.mjs +3 -1
  938. package/renderers/intlDatetimeRenderer/index.d.mts +1 -0
  939. package/renderers/intlDatetimeRenderer/index.d.ts +1 -0
  940. package/renderers/intlDatetimeRenderer/index.js +22 -0
  941. package/renderers/intlDatetimeRenderer/index.mjs +1 -0
  942. package/renderers/intlDatetimeRenderer/intlDatetimeRenderer.d.mts +1 -0
  943. package/renderers/intlDatetimeRenderer/intlDatetimeRenderer.d.ts +26 -0
  944. package/renderers/intlDatetimeRenderer/intlDatetimeRenderer.js +82 -0
  945. package/renderers/intlDatetimeRenderer/intlDatetimeRenderer.mjs +67 -0
  946. package/renderers/multiSelectRenderer/multiSelectRenderer.js +2 -3
  947. package/renderers/multiSelectRenderer/multiSelectRenderer.mjs +2 -3
  948. package/renderers/multiSelectRenderer/utils/utils.d.ts +1 -1
  949. package/renderers/multiSelectRenderer/utils/utils.js +11 -8
  950. package/renderers/multiSelectRenderer/utils/utils.mjs +11 -8
  951. package/renderers/renderCell.d.mts +1 -0
  952. package/renderers/renderCell.d.ts +37 -0
  953. package/renderers/renderCell.js +43 -0
  954. package/renderers/renderCell.mjs +48 -0
  955. package/selection/highlight/highlight.js +1 -3
  956. package/selection/highlight/highlight.mjs +1 -3
  957. package/selection/highlight/types/areaLayered.d.ts +3 -1
  958. package/selection/highlight/types/areaLayered.js +4 -2
  959. package/selection/highlight/types/areaLayered.mjs +6 -2
  960. package/selection/highlight/types/focus.d.ts +3 -1
  961. package/selection/highlight/types/focus.js +3 -2
  962. package/selection/highlight/types/focus.mjs +5 -2
  963. package/selection/mouseEventHandler.js +29 -26
  964. package/selection/mouseEventHandler.mjs +29 -26
  965. package/selection/moveCells.d.mts +1 -0
  966. package/selection/moveCells.d.ts +15 -0
  967. package/selection/moveCells.js +13 -0
  968. package/selection/moveCells.mjs +9 -0
  969. package/selection/selection.d.ts +56 -2
  970. package/selection/selection.js +162 -36
  971. package/selection/selection.mjs +154 -17
  972. package/selection/transformation/_base.js +5 -12
  973. package/selection/transformation/_base.mjs +5 -12
  974. package/selection/types.d.ts +3 -0
  975. package/settings.d.ts +24 -3
  976. package/shortcuts/context.d.ts +4 -0
  977. package/shortcuts/context.js +16 -8
  978. package/shortcuts/context.mjs +20 -8
  979. package/shortcuts/contexts/commands/populateSelectedCellsData.js +1 -1
  980. package/shortcuts/contexts/commands/populateSelectedCellsData.mjs +1 -1
  981. package/styles/handsontable.css +504 -158
  982. package/styles/handsontable.min.css +4 -4
  983. package/styles/handsontableStyles.js +1 -1
  984. package/styles/handsontableStyles.mjs +1 -1
  985. package/styles/ht-icons-horizon.css +1 -10
  986. package/styles/ht-icons-horizon.min.css +4 -4
  987. package/styles/ht-icons-main.css +1 -10
  988. package/styles/ht-icons-main.min.css +4 -4
  989. package/styles/ht-theme-classic-no-icons.css +6 -0
  990. package/styles/ht-theme-classic-no-icons.min.css +4 -4
  991. package/styles/ht-theme-classic.css +7 -10
  992. package/styles/ht-theme-classic.min.css +4 -4
  993. package/styles/ht-theme-horizon-no-icons.css +6 -0
  994. package/styles/ht-theme-horizon-no-icons.min.css +4 -4
  995. package/styles/ht-theme-horizon.css +7 -10
  996. package/styles/ht-theme-horizon.min.css +4 -4
  997. package/styles/ht-theme-main-no-icons.css +6 -0
  998. package/styles/ht-theme-main-no-icons.min.css +4 -4
  999. package/styles/ht-theme-main.css +7 -10
  1000. package/styles/ht-theme-main.min.css +4 -4
  1001. package/tableView.d.ts +17 -4
  1002. package/tableView.js +211 -53
  1003. package/tableView.mjs +212 -54
  1004. package/themes/engine/builder.js +5 -12
  1005. package/themes/engine/builder.mjs +5 -12
  1006. package/themes/engine/index.d.ts +2 -1
  1007. package/themes/engine/index.js +3 -0
  1008. package/themes/engine/index.mjs +1 -1
  1009. package/themes/engine/manager.d.ts +75 -3
  1010. package/themes/engine/manager.js +247 -18
  1011. package/themes/engine/manager.mjs +254 -18
  1012. package/themes/engine/utils/cssVariables.d.ts +18 -1
  1013. package/themes/engine/utils/cssVariables.js +27 -11
  1014. package/themes/engine/utils/cssVariables.mjs +28 -11
  1015. package/themes/engine/utils/validation.js +7 -0
  1016. package/themes/engine/utils/validation.mjs +7 -0
  1017. package/themes/static/variables/helpers/iconsMap.js +1 -6
  1018. package/themes/static/variables/helpers/iconsMap.mjs +1 -6
  1019. package/themes/static/variables/tokens/classic.js +6 -0
  1020. package/themes/static/variables/tokens/classic.mjs +6 -0
  1021. package/themes/static/variables/tokens/horizon.js +6 -0
  1022. package/themes/static/variables/tokens/horizon.mjs +6 -0
  1023. package/themes/static/variables/tokens/main.js +6 -0
  1024. package/themes/static/variables/tokens/main.mjs +6 -0
  1025. package/themes/types.d.ts +1 -1
  1026. package/translations/changesObservable/observable.js +4 -9
  1027. package/translations/changesObservable/observable.mjs +4 -9
  1028. package/translations/changesObservable/observer.js +4 -9
  1029. package/translations/changesObservable/observer.mjs +4 -9
  1030. package/translations/indexMapper.d.ts +14 -9
  1031. package/translations/indexMapper.js +109 -49
  1032. package/translations/indexMapper.mjs +109 -49
  1033. package/translations/mapCollections/aggregatedCollection.js +20 -35
  1034. package/translations/mapCollections/aggregatedCollection.mjs +20 -35
  1035. package/translations/mapCollections/mapCollection.d.ts +10 -4
  1036. package/translations/mapCollections/mapCollection.js +2 -2
  1037. package/translations/mapCollections/mapCollection.mjs +2 -2
  1038. package/translations/maps/booleanMap.d.mts +1 -0
  1039. package/translations/maps/booleanMap.d.ts +86 -0
  1040. package/translations/maps/booleanMap.js +293 -0
  1041. package/translations/maps/booleanMap.mjs +301 -0
  1042. package/translations/maps/hidingMap.d.ts +5 -2
  1043. package/translations/maps/hidingMap.js +8 -3
  1044. package/translations/maps/hidingMap.mjs +8 -3
  1045. package/translations/maps/index.d.ts +5 -2
  1046. package/translations/maps/index.js +7 -3
  1047. package/translations/maps/index.mjs +10 -2
  1048. package/translations/maps/indexMap.d.ts +26 -2
  1049. package/translations/maps/indexMap.js +73 -6
  1050. package/translations/maps/indexMap.mjs +73 -6
  1051. package/translations/maps/indexesSequence.d.ts +53 -2
  1052. package/translations/maps/indexesSequence.js +218 -3
  1053. package/translations/maps/indexesSequence.mjs +226 -3
  1054. package/translations/maps/trimmingMap.d.ts +5 -2
  1055. package/translations/maps/trimmingMap.js +8 -3
  1056. package/translations/maps/trimmingMap.mjs +8 -3
  1057. package/translations/maps/utils/actionsOnIndexes.js +20 -1
  1058. package/translations/maps/utils/actionsOnIndexes.mjs +20 -1
  1059. package/translations/maps/utils/indexesSequence.js +12 -3
  1060. package/translations/maps/utils/indexesSequence.mjs +12 -3
  1061. package/translations/maps/utils/physicallyIndexed.js +12 -1
  1062. package/translations/maps/utils/physicallyIndexed.mjs +12 -1
  1063. package/utils/entitlementLicenseKey/classify.d.mts +1 -0
  1064. package/utils/entitlementLicenseKey/classify.d.ts +34 -0
  1065. package/utils/entitlementLicenseKey/classify.js +97 -0
  1066. package/utils/entitlementLicenseKey/classify.mjs +96 -0
  1067. package/utils/entitlementLicenseKey/constants.d.mts +1 -0
  1068. package/utils/entitlementLicenseKey/constants.d.ts +69 -0
  1069. package/utils/entitlementLicenseKey/constants.js +54 -0
  1070. package/utils/entitlementLicenseKey/constants.mjs +66 -0
  1071. package/utils/entitlementLicenseKey/detectFormat.d.mts +1 -0
  1072. package/utils/entitlementLicenseKey/detectFormat.d.ts +23 -0
  1073. package/utils/entitlementLicenseKey/detectFormat.js +60 -0
  1074. package/utils/entitlementLicenseKey/detectFormat.mjs +60 -0
  1075. package/utils/entitlementLicenseKey/encoding.d.mts +1 -0
  1076. package/utils/entitlementLicenseKey/encoding.d.ts +58 -0
  1077. package/utils/entitlementLicenseKey/encoding.js +161 -0
  1078. package/utils/entitlementLicenseKey/encoding.mjs +172 -0
  1079. package/utils/entitlementLicenseKey/extractKeyData.d.mts +1 -0
  1080. package/utils/entitlementLicenseKey/extractKeyData.d.ts +47 -0
  1081. package/utils/entitlementLicenseKey/extractKeyData.js +213 -0
  1082. package/utils/entitlementLicenseKey/extractKeyData.mjs +232 -0
  1083. package/utils/entitlementLicenseKey/grants.d.mts +1 -0
  1084. package/utils/entitlementLicenseKey/grants.d.ts +54 -0
  1085. package/utils/entitlementLicenseKey/grants.js +68 -0
  1086. package/utils/entitlementLicenseKey/grants.mjs +84 -0
  1087. package/utils/entitlementLicenseKey/index.d.mts +1 -0
  1088. package/utils/entitlementLicenseKey/index.d.ts +8 -0
  1089. package/utils/entitlementLicenseKey/index.js +53 -0
  1090. package/utils/entitlementLicenseKey/index.mjs +6 -0
  1091. package/utils/entitlementLicenseKey/sha512.d.mts +1 -0
  1092. package/utils/entitlementLicenseKey/sha512.d.ts +11 -0
  1093. package/utils/entitlementLicenseKey/sha512.js +328 -0
  1094. package/utils/entitlementLicenseKey/sha512.mjs +327 -0
  1095. package/utils/entitlementLicenseKey/types.d.mts +1 -0
  1096. package/utils/entitlementLicenseKey/types.d.ts +84 -0
  1097. package/utils/entitlementLicenseKey/types.js +8 -0
  1098. package/utils/entitlementLicenseKey/types.mjs +10 -0
  1099. package/utils/ghostTable.d.ts +1 -0
  1100. package/utils/ghostTable.js +58 -11
  1101. package/utils/ghostTable.mjs +58 -11
  1102. package/utils/interval.js +5 -12
  1103. package/utils/interval.mjs +5 -12
  1104. package/utils/licenseBranding/badge.d.mts +1 -0
  1105. package/utils/licenseBranding/badge.d.ts +21 -0
  1106. package/utils/licenseBranding/badge.js +237 -0
  1107. package/utils/licenseBranding/badge.mjs +244 -0
  1108. package/utils/licenseBranding/content.d.mts +1 -0
  1109. package/utils/licenseBranding/content.d.ts +54 -0
  1110. package/utils/licenseBranding/content.js +93 -0
  1111. package/utils/licenseBranding/content.mjs +79 -0
  1112. package/utils/licenseBranding/index.d.mts +1 -0
  1113. package/utils/licenseBranding/index.d.ts +14 -0
  1114. package/utils/licenseBranding/index.js +55 -0
  1115. package/utils/licenseBranding/index.mjs +56 -0
  1116. package/utils/licenseBranding/lockScreen.d.mts +1 -0
  1117. package/utils/licenseBranding/lockScreen.d.ts +23 -0
  1118. package/utils/licenseBranding/lockScreen.js +150 -0
  1119. package/utils/licenseBranding/lockScreen.mjs +159 -0
  1120. package/utils/licenseNotification.d.ts +19 -0
  1121. package/utils/licenseNotification.js +56 -29
  1122. package/utils/licenseNotification.mjs +61 -29
  1123. package/utils/movableMeta.d.mts +1 -0
  1124. package/utils/movableMeta.d.ts +40 -0
  1125. package/utils/movableMeta.js +47 -0
  1126. package/utils/movableMeta.mjs +46 -0
  1127. package/utils/parseTable.js +1 -1
  1128. package/utils/parseTable.mjs +1 -1
  1129. package/utils/samplesGenerator.d.ts +41 -14
  1130. package/utils/samplesGenerator.js +112 -42
  1131. package/utils/samplesGenerator.mjs +112 -42
  1132. package/utils/stylesHandler.d.ts +13 -0
  1133. package/utils/stylesHandler.js +60 -14
  1134. package/utils/stylesHandler.mjs +60 -14
  1135. package/validators/autocompleteValidator/autocompleteValidator.js +3 -0
  1136. package/validators/autocompleteValidator/autocompleteValidator.mjs +3 -0
  1137. package/validators/index.d.ts +3 -2
  1138. package/validators/index.js +8 -0
  1139. package/validators/index.mjs +3 -1
  1140. package/validators/intlDatetimeValidator/index.d.mts +1 -0
  1141. package/validators/intlDatetimeValidator/index.d.ts +1 -0
  1142. package/validators/intlDatetimeValidator/index.js +25 -0
  1143. package/validators/intlDatetimeValidator/index.mjs +1 -0
  1144. package/validators/intlDatetimeValidator/intlDatetimeValidator.d.mts +1 -0
  1145. package/validators/intlDatetimeValidator/intlDatetimeValidator.d.ts +28 -0
  1146. package/validators/intlDatetimeValidator/intlDatetimeValidator.js +49 -0
  1147. package/validators/intlDatetimeValidator/intlDatetimeValidator.mjs +37 -0
  1148. package/3rdparty/walkontable/src/overlay/bottom.d.mts +0 -1
  1149. package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.d.mts +0 -1
  1150. package/3rdparty/walkontable/src/overlay/inlineStart.d.mts +0 -1
  1151. package/3rdparty/walkontable/src/overlay/top.d.mts +0 -1
  1152. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.d.mts +0 -1
  1153. package/3rdparty/walkontable/src/overlays.d.ts +0 -329
  1154. package/3rdparty/walkontable/src/overlays.js +0 -870
  1155. package/3rdparty/walkontable/src/overlays.mjs +0 -860
  1156. package/3rdparty/walkontable/src/renderer/table.d.mts +0 -1
  1157. package/3rdparty/walkontable/src/renderer/table.js +0 -229
  1158. package/3rdparty/walkontable/src/settings.d.mts +0 -2
  1159. package/3rdparty/walkontable/src/settings.js +0 -196
  1160. package/3rdparty/walkontable/src/settings.mjs +0 -263
  1161. package/3rdparty/walkontable/src/table/bottom.d.mts +0 -2
  1162. package/3rdparty/walkontable/src/table/bottom.d.ts +0 -19
  1163. package/3rdparty/walkontable/src/table/bottom.js +0 -38
  1164. package/3rdparty/walkontable/src/table/bottom.mjs +0 -23
  1165. package/3rdparty/walkontable/src/table/bottomInlineStartCorner.d.mts +0 -2
  1166. package/3rdparty/walkontable/src/table/bottomInlineStartCorner.d.ts +0 -20
  1167. package/3rdparty/walkontable/src/table/bottomInlineStartCorner.mjs +0 -24
  1168. package/3rdparty/walkontable/src/table/inlineStart.d.mts +0 -2
  1169. package/3rdparty/walkontable/src/table/inlineStart.d.ts +0 -16
  1170. package/3rdparty/walkontable/src/table/inlineStart.js +0 -35
  1171. package/3rdparty/walkontable/src/table/inlineStart.mjs +0 -20
  1172. package/3rdparty/walkontable/src/table/master.d.mts +0 -2
  1173. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.d.mts +0 -2
  1174. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.d.ts +0 -75
  1175. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -122
  1176. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -112
  1177. package/3rdparty/walkontable/src/table/mixin/calculatedRows.d.mts +0 -2
  1178. package/3rdparty/walkontable/src/table/mixin/calculatedRows.d.ts +0 -75
  1179. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -122
  1180. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -112
  1181. package/3rdparty/walkontable/src/table/top.d.mts +0 -2
  1182. package/3rdparty/walkontable/src/table/top.d.ts +0 -19
  1183. package/3rdparty/walkontable/src/table/top.js +0 -38
  1184. package/3rdparty/walkontable/src/table/top.mjs +0 -23
  1185. package/3rdparty/walkontable/src/table/topInlineStartCorner.d.mts +0 -2
  1186. package/3rdparty/walkontable/src/table/topInlineStartCorner.d.ts +0 -20
  1187. package/3rdparty/walkontable/src/table/topInlineStartCorner.mjs +0 -24
  1188. package/3rdparty/walkontable/src/table.d.mts +0 -2
  1189. package/3rdparty/walkontable/src/table.d.ts +0 -741
  1190. package/3rdparty/walkontable/src/table.js +0 -1120
  1191. package/3rdparty/walkontable/src/table.mjs +0 -1105
  1192. package/3rdparty/walkontable/src/utils/cellCoords.d.mts +0 -1
  1193. package/3rdparty/walkontable/src/utils/cellCoords.js +0 -54
  1194. package/3rdparty/walkontable/src/utils/cellCoords.mjs +0 -54
  1195. package/3rdparty/walkontable/src/utils/column.d.mts +0 -2
  1196. package/3rdparty/walkontable/src/utils/column.js +0 -75
  1197. package/3rdparty/walkontable/src/utils/column.mjs +0 -70
  1198. package/3rdparty/walkontable/src/utils/positionCache.d.mts +0 -1
  1199. package/3rdparty/walkontable/src/utils/positionCache.d.ts +0 -91
  1200. package/3rdparty/walkontable/src/utils/positionCache.js +0 -193
  1201. package/3rdparty/walkontable/src/utils/positionCache.mjs +0 -194
  1202. package/3rdparty/walkontable/src/utils/row.d.mts +0 -2
  1203. package/3rdparty/walkontable/src/utils/row.js +0 -46
  1204. package/3rdparty/walkontable/src/utils/row.mjs +0 -41
  1205. package/3rdparty/walkontable/src/viewport.d.ts +0 -254
  1206. package/3rdparty/walkontable/src/viewport.js +0 -533
  1207. package/3rdparty/walkontable/src/viewport.mjs +0 -523
  1208. /package/3rdparty/walkontable/src/{renderer → axisSizing/positionCache}/index.d.mts +0 -0
  1209. /package/3rdparty/walkontable/src/{overlays.d.mts → overlay/overlays.d.mts} +0 -0
  1210. /package/3rdparty/walkontable/src/overlay/{_base.d.mts → regions/_base.d.mts} +0 -0
  1211. /package/3rdparty/walkontable/src/{stickyScrollStrategy.d.mts → overlay/strategies/stickyScrollStrategy.d.mts} +0 -0
  1212. /package/3rdparty/walkontable/src/{renderer → render}/_base.d.mts +0 -0
  1213. /package/3rdparty/walkontable/src/{renderer → render}/_base.js +0 -0
  1214. /package/3rdparty/walkontable/src/{renderer → render}/_base.mjs +0 -0
  1215. /package/3rdparty/walkontable/src/{renderer → render}/cells.d.mts +0 -0
  1216. /package/3rdparty/walkontable/src/{renderer → render}/cells.d.ts +0 -0
  1217. /package/3rdparty/walkontable/src/{renderer → render}/colGroup.d.mts +0 -0
  1218. /package/3rdparty/walkontable/src/{renderer → render}/colGroup.d.ts +0 -0
  1219. /package/3rdparty/walkontable/src/{renderer → render}/colGroup.js +0 -0
  1220. /package/3rdparty/walkontable/src/{renderer → render}/colGroup.mjs +0 -0
  1221. /package/3rdparty/walkontable/src/{renderer → render}/columnHeaderRows.d.mts +0 -0
  1222. /package/3rdparty/walkontable/src/{renderer → render}/columnHeaderRows.d.ts +0 -0
  1223. /package/3rdparty/walkontable/src/{renderer → render}/columnHeaderRows.js +0 -0
  1224. /package/3rdparty/walkontable/src/{renderer → render}/columnHeaderRows.mjs +0 -0
  1225. /package/3rdparty/walkontable/src/{renderer → render}/columnHeaders.d.mts +0 -0
  1226. /package/3rdparty/walkontable/src/{renderer → render}/rowHeaders.d.mts +0 -0
  1227. /package/3rdparty/walkontable/src/{renderer → render}/rowHeaders.d.ts +0 -0
  1228. /package/3rdparty/walkontable/src/{renderer → render}/rowHeaders.js +0 -0
  1229. /package/3rdparty/walkontable/src/{renderer → render}/rowHeaders.mjs +0 -0
  1230. /package/3rdparty/walkontable/src/{renderer → render}/rows.d.mts +0 -0
  1231. /package/3rdparty/walkontable/src/{renderer → render}/rows.d.ts +0 -0
  1232. /package/3rdparty/walkontable/src/{scroll.d.mts → scroll/scroll.d.mts} +0 -0
  1233. /package/3rdparty/walkontable/src/table/{mixin → rangeQuery}/stickyColumnsStart.d.mts +0 -0
  1234. /package/3rdparty/walkontable/src/table/{mixin → rangeQuery}/stickyRowsBottom.d.mts +0 -0
  1235. /package/3rdparty/walkontable/src/table/{mixin → rangeQuery}/stickyRowsBottom.js +0 -0
  1236. /package/3rdparty/walkontable/src/table/{mixin → rangeQuery}/stickyRowsBottom.mjs +0 -0
  1237. /package/3rdparty/walkontable/src/table/{mixin → rangeQuery}/stickyRowsTop.d.mts +0 -0
  1238. /package/3rdparty/walkontable/src/{viewport.d.mts → viewport/viewport.d.mts} +0 -0
@@ -35,10 +35,38 @@ function _check_private_redeclaration(obj, privateCollection) {
35
35
  throw new TypeError("Cannot initialize the same private elements twice on an object");
36
36
  }
37
37
  }
38
- function _class_private_method_get(receiver, privateSet, fn) {
39
- if (!privateSet.has(receiver)) {
40
- throw new TypeError("attempted to get private field on non-instance");
38
+ function _class_apply_descriptor_get(receiver, descriptor) {
39
+ if (descriptor.get) return descriptor.get.call(receiver);
40
+ return descriptor.value;
41
+ }
42
+ function _class_apply_descriptor_set(receiver, descriptor, value) {
43
+ if (descriptor.set) descriptor.set.call(receiver, value);
44
+ else {
45
+ if (!descriptor.writable) {
46
+ throw new TypeError("attempted to set read only private field");
47
+ }
48
+ descriptor.value = value;
41
49
  }
50
+ }
51
+ function _class_extract_field_descriptor(receiver, privateMap, action) {
52
+ if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
53
+ return privateMap.get(receiver);
54
+ }
55
+ function _class_private_field_get(receiver, privateMap) {
56
+ var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get");
57
+ return _class_apply_descriptor_get(receiver, descriptor);
58
+ }
59
+ function _class_private_field_init(obj, privateMap, value) {
60
+ _check_private_redeclaration(obj, privateMap);
61
+ privateMap.set(obj, value);
62
+ }
63
+ function _class_private_field_set(receiver, privateMap, value) {
64
+ var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set");
65
+ _class_apply_descriptor_set(receiver, descriptor, value);
66
+ return value;
67
+ }
68
+ function _class_private_method_get(receiver, privateSet, fn) {
69
+ if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
42
70
  return fn;
43
71
  }
44
72
  function _class_private_method_init(obj, privateSet) {
@@ -54,18 +82,12 @@ function _getRequireWildcardCache(nodeInterop) {
54
82
  })(nodeInterop);
55
83
  }
56
84
  function _interop_require_wildcard(obj, nodeInterop) {
57
- if (!nodeInterop && obj && obj.__esModule) {
58
- return obj;
59
- }
60
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
61
- return {
62
- default: obj
63
- };
64
- }
85
+ if (!nodeInterop && obj && obj.__esModule) return obj;
86
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") return {
87
+ default: obj
88
+ };
65
89
  var cache = _getRequireWildcardCache(nodeInterop);
66
- if (cache && cache.has(obj)) {
67
- return cache.get(obj);
68
- }
90
+ if (cache && cache.has(obj)) return cache.get(obj);
69
91
  var newObj = {
70
92
  __proto__: null
71
93
  };
@@ -73,17 +95,12 @@ function _interop_require_wildcard(obj, nodeInterop) {
73
95
  for(var key in obj){
74
96
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
75
97
  var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
76
- if (desc && (desc.get || desc.set)) {
77
- Object.defineProperty(newObj, key, desc);
78
- } else {
79
- newObj[key] = obj[key];
80
- }
98
+ if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
99
+ else newObj[key] = obj[key];
81
100
  }
82
101
  }
83
102
  newObj.default = obj;
84
- if (cache) {
85
- cache.set(obj, newObj);
86
- }
103
+ if (cache) cache.set(obj, newObj);
87
104
  return newObj;
88
105
  }
89
106
  const PLUGIN_KEY = 'customBorders';
@@ -112,31 +129,373 @@ const PLUGIN_PRIORITY = 90;
112
129
  */ function isCellCoord(value) {
113
130
  return isRecord(value) && typeof value.row === 'number' && typeof value.col === 'number';
114
131
  }
115
- /**
116
- * Type guard returning true when the string is a valid border side name.
117
- *
118
- * @param {string} value The string to test.
119
- * @returns {boolean}
120
- */ function isBorderSide(value) {
121
- return value === 'top' || value === 'bottom' || value === 'start' || value === 'end';
122
- }
123
132
  const SUPPORTED_STYLES = [
124
133
  'dashed',
125
134
  'dotted',
126
135
  'solid'
127
136
  ];
137
+ /**
138
+ * Default number of border configuration entries applied per background batch when
139
+ * `customBordersProgressive` is enabled. Sized so a batch stays within a frame budget.
140
+ */ const DEFAULT_PROGRESSIVE_CHUNK_SIZE = 5000;
128
141
  var /**
142
+ * Positions of the saved borders in the `savedBorders` array, keyed by the border id.
143
+ * Lets bulk border operations locate an existing border in O(1) instead of scanning the array.
144
+ */ _savedBordersIndex = /*#__PURE__*/ new WeakMap(), /**
145
+ * Cache of the plugin-created custom selections keyed by the border id. Under viewport
146
+ * virtualization this holds only the selections currently in the rendered range.
147
+ */ _customSelectionsCache = /*#__PURE__*/ new WeakMap(), /**
148
+ * Visual-row index of the saved borders: maps a visual row to the borders on that row. Lets the
149
+ * viewport sync collect only the borders inside the rendered range in O(viewport) instead of
150
+ * scanning every saved border each render. Rebuilt lazily from `savedBorders` when marked stale.
151
+ */ _bordersByRow = /*#__PURE__*/ new WeakMap(), /**
152
+ * When `true`, `#bordersByRow` is stale and rebuilt on the next viewport sync. Set whenever the
153
+ * `savedBorders` model changes; keeps the per-frame sync cost bounded by the viewport, not the
154
+ * total border count.
155
+ */ _bordersByRowDirty = /*#__PURE__*/ new WeakMap(), /**
156
+ * During a `createCustomBorders` pass, holds the `row,col` keys already written in this pass, so a
157
+ * cell touched for the first time can skip the existing-meta merge read (there is nothing to merge
158
+ * on a fresh cell - the pass starts after the previous borders' meta is cleared). Only cells hit by
159
+ * an overlapping range are re-read. Outside a config pass this is `null`, so every other code path
160
+ * (e.g. `setBorders`) keeps reading existing meta and merges as before. Cuts a full O(N)
161
+ * `getCellMeta` pass out of applying a large, non-overlapping `customBorders` config.
162
+ *
163
+ * A progressive load keeps the Set alive across its batches (see {@link #inConfigPass} for why
164
+ * that does not leak the skip into the gaps between them).
165
+ */ _configPassTouched = /*#__PURE__*/ new WeakMap(), /**
166
+ * `true` only while `createCustomBorders` is running. A progressive load must keep
167
+ * {@link #configPassTouched} alive across all of its batches, so that ranges overlapping across a
168
+ * batch boundary still merge - but the Set alone cannot gate the first-touch skip, because the
169
+ * batches are separated by timeouts during which application code can call the public API. Without
170
+ * this flag a `setBorders` call landing in such a gap would treat the cell as a first touch, skip
171
+ * the existing-meta read, and silently drop the sides already on that cell.
172
+ */ _inConfigPass = /*#__PURE__*/ new WeakMap(), /**
173
+ * Guards the plugin's own `borders` cell-meta writes so the `afterSetCellMeta` /
174
+ * `afterRemoveCellMeta` listeners react only to external writes (UndoRedo restoring meta, user
175
+ * code calling `setCellMeta` directly). Without it every internal write would re-enter the model
176
+ * upsert it originated from.
177
+ */ _isInternalMetaWrite = /*#__PURE__*/ new WeakMap(), /**
178
+ * Whether a render following external `borders` cell-meta writes is already scheduled. External
179
+ * writes arrive one cell at a time (UndoRedo restores the meta of an undone row/column removal
180
+ * cell by cell), so the render is coalesced into a single pass for the whole synchronous batch
181
+ * instead of one full render per cell.
182
+ */ _isMetaSyncRenderScheduled = /*#__PURE__*/ new WeakMap(), /**
183
+ * Pending border configuration entries for a progressive (background-batched) application, or
184
+ * `null` when no progressive load is in flight. Set when `customBordersProgressive` is enabled.
185
+ */ _progressiveQueue = /*#__PURE__*/ new WeakMap(), /**
186
+ * Index of the next entry in `#progressiveQueue` to apply.
187
+ */ _progressiveIndex = /*#__PURE__*/ new WeakMap(), /**
188
+ * Number of entries applied per progressive batch.
189
+ */ _progressiveChunkSize = /*#__PURE__*/ new WeakMap(), /**
190
+ * Monotonic generation token for the active progressive load. Bumped on start, finish, flush, and
191
+ * cancel; a scheduled batch aborts if its captured token no longer matches, so stale timers become
192
+ * no-ops without needing to track and clear individual timeout handles.
193
+ */ _progressiveToken = /*#__PURE__*/ new WeakMap(), /**
194
+ * Physical row index of each saved border captured before a row move, parallel to `savedBorders`.
195
+ * Used to re-derive each border's visual row after the move reorders the visual index mapping.
196
+ * `null` when no move is in progress.
197
+ */ _rowMoveSnapshot = /*#__PURE__*/ new WeakMap(), /**
198
+ * Physical column index of each saved border captured before a column move, parallel to
199
+ * `savedBorders`. Used to re-derive each border's visual column after the move reorders the
200
+ * visual index mapping. `null` when no move is in progress.
201
+ */ _columnMoveSnapshot = /*#__PURE__*/ new WeakMap(), /**
202
+ * Reads the cell's existing borders for a merge, unless this is the first time the cell is touched
203
+ * within a `createCustomBorders` pass - in which case the cell is known to be border-free (the pass
204
+ * runs after the previous borders' meta is cleared), so the read is skipped and `undefined` is
205
+ * returned. Outside a config pass (`#configPassTouched` is `null`) it always reads, preserving the
206
+ * merge behavior of `setBorders` and other callers. Skipping the first-touch read removes a full
207
+ * O(N) `getCellMeta` pass from applying a large, non-overlapping config.
208
+ *
209
+ * @param {number} row Visual row index.
210
+ * @param {number} column Visual column index.
211
+ * @returns {unknown} The existing `borders` meta value, or `undefined` when the read is skipped.
212
+ */ _readExistingBordersForMerge = /*#__PURE__*/ new WeakSet(), /**
213
+ * Writes or removes the plugin-owned `borders` cell meta with the re-entrancy guard raised, so
214
+ * the external-write listeners ignore it. Pass `null` to remove the meta.
215
+ *
216
+ * Both `setCellMeta` and `removeCellMeta` are vetoable - a `beforeSetCellMeta` /
217
+ * `beforeRemoveCellMeta` listener returning `false` makes them a no-op (an app blocking border
218
+ * edits on locked cells, for example). The write is therefore verified against the resulting meta
219
+ * and reported back, so callers can leave the border model untouched instead of recording a border
220
+ * that has no cell meta behind it. The verification only runs when a matching `before*` listener
221
+ * is registered - without one no veto is possible, and skipping the read keeps the
222
+ * config-application path free of a per-border `getCellMeta` resolution.
223
+ *
224
+ * The removal is verified against the own property, not the resolved value: a `borders` key
225
+ * cascading from the grid or column level survives `removeCellMeta` (which deletes the own key
226
+ * only), so a resolved read would report a veto that never happened. The check covers the
227
+ * cascade; a `borders` key supplied by a `cells` function is written back as an own property and
228
+ * is unsupported - such values are not plugin-owned and never enter the border model.
229
+ *
230
+ * @param {number} row Visual row index.
231
+ * @param {number} column Visual column index.
232
+ * @param {object|null} value The denormalized border object, or `null` to remove.
233
+ * @returns {boolean} `true` when the meta now matches the requested write, `false` when it was vetoed.
234
+ */ _writeBordersMeta = /*#__PURE__*/ new WeakSet(), /**
235
+ * Builds the border object for a single cell of a range configuration. The cell's existing
236
+ * borders are merged first, so a cell touched by several overlapping ranges keeps every side.
237
+ * Each side that lies on a range edge is resolved through {@link resolveRangeBorderSide}, so an
238
+ * empty side inherits the range-level `border` style instead of the default.
239
+ *
240
+ * @param {number} rowIndex Visual row index of the cell.
241
+ * @param {number} colIndex Visual column index of the cell.
242
+ * @param {object} customBorder The range configuration object.
243
+ * @param {object} range The `{ from, to }` range the configuration applies to.
244
+ * @returns {object} The merged border and the number of sides applied to this cell.
245
+ */ _buildRangeCellBorder = /*#__PURE__*/ new WeakSet(), /**
246
+ * Destroys every plugin-owned custom selection and clears the rendered working set. Selections
247
+ * added to `highlight.customSelections` by other code are left untouched - the plugin only owns
248
+ * the entries tracked in its working-set cache. Does not touch the `savedBorders` model.
249
+ */ _destroyAllSelections = /*#__PURE__*/ new WeakSet(), /**
250
+ * Clears the entire border model and its rendered working set: cancels any in-flight progressive
251
+ * load, removes the `borders` meta from every previously bordered cell, empties `savedBorders` and
252
+ * its indexes, and destroys the rendered selections. Shared by `clearBorders()` (clear all) and
253
+ * `changeBorderSettings()` (a fresh array config / `updateSettings` replace). Does not render.
254
+ */ _resetBorderModel = /*#__PURE__*/ new WeakSet(), /**
255
+ * Rebuilds the visual-row index (`#bordersByRow`) from `savedBorders`. Runs at most once per model
256
+ * change (guarded by `#bordersByRowDirty`), never per render, so the per-frame viewport sync stays
257
+ * bounded by the viewport rather than the total border count.
258
+ */ _rebuildBordersByRow = /*#__PURE__*/ new WeakSet(), /**
259
+ * Patches a single border into the visual-row index, replacing any entry the row bucket already
260
+ * holds for the same id (a style edit re-inserts a fresh border object for the same cell). Runs
261
+ * only when the index is current - while it is dirty the next sync rebuilds it from scratch, so
262
+ * patching it would be wasted work.
263
+ *
264
+ * @param {object} border The border to index.
265
+ */ _indexBorderByRow = /*#__PURE__*/ new WeakSet(), /**
266
+ * Drops a single border from the visual-row index. Runs only when the index is current, for the
267
+ * same reason as {@link #indexBorderByRow}.
268
+ *
269
+ * @param {number} row Visual row index the border sits on.
270
+ * @param {string} borderId The id of the border to drop.
271
+ */ _unindexBorderByRow = /*#__PURE__*/ new WeakSet(), /**
272
+ * Synchronizes the rendered custom selections with the current viewport. Creates selections for
273
+ * bordered cells that entered the rendered range and destroys those that left it, so the selection
274
+ * manager only ever iterates and draws O(viewport) borders regardless of how many are configured.
275
+ * Called on every view render (`beforeViewRender`), before the selection borders are drawn.
276
+ */ _syncViewportSelections = /*#__PURE__*/ new WeakSet(), /**
277
+ * Creates and registers a rendered custom selection for a single border, keyed by its id in the
278
+ * working-set cache. The `Border` DOM itself is created lazily by the selection manager when the
279
+ * cell is inside the overlay's rendered range.
280
+ *
281
+ * @param {object} border The border model to render.
282
+ */ _addSelectionForBorder = /*#__PURE__*/ new WeakSet(), /**
283
+ * Rebuilds the id-to-position index of the saved borders after positions have shifted.
284
+ */ _rebuildSavedBordersIndex = /*#__PURE__*/ new WeakSet(), /**
285
+ * Reads and normalizes the `customBordersProgressive` setting.
286
+ *
287
+ * @returns {{ enabled: boolean, chunkSize: number }}
288
+ */ _resolveProgressiveSetting = /*#__PURE__*/ new WeakSet(), /**
289
+ * Starts a progressive (background-batched) application of a border configuration. The first batch
290
+ * is scheduled asynchronously so the initial grid render is not blocked.
291
+ *
292
+ * @param {Array} borders The border configuration entries to apply.
293
+ * @param {number} chunkSize The number of entries to apply per batch.
294
+ */ _startProgressiveApply = /*#__PURE__*/ new WeakSet(), /**
295
+ * Schedules the next progressive batch on a timeout so the browser can paint between batches.
296
+ * `_registerTimeout` auto-clears on `destroy`; the generation token guards against stale runs.
297
+ *
298
+ * @param {number} token The generation token captured when the load started.
299
+ */ _scheduleProgressiveChunk = /*#__PURE__*/ new WeakSet(), /**
300
+ * Applies one progressive batch, renders so the newly in-viewport borders appear, then schedules
301
+ * the next batch or finishes. Aborts if the load was cancelled/superseded (token mismatch).
302
+ *
303
+ * @param {number} token The generation token captured when the load started.
304
+ */ _processProgressiveChunk = /*#__PURE__*/ new WeakSet(), /**
305
+ * Applies all remaining progressive batches synchronously and finishes. Used when the border model
306
+ * must be complete immediately - e.g. before a structural change remaps coordinates.
307
+ */ _flushProgressiveApply = /*#__PURE__*/ new WeakSet(), /**
308
+ * Finalizes a progressive load: clears the queue and pass state, invalidates any pending batch
309
+ * (token bump), and fires `afterCustomBordersUpdate` to signal the borders are complete.
310
+ */ _finishProgressiveApply = /*#__PURE__*/ new WeakSet(), /**
311
+ * Cancels an in-flight progressive load without firing the completion hook (the borders are being
312
+ * discarded/replaced). Invalidates pending batches via the token bump.
313
+ */ _cancelProgressiveApply = /*#__PURE__*/ new WeakSet(), /**
129
314
  * Validate the style settings. If the style value is not supported, the property is removed from the configuration.
130
315
  *
131
316
  * @private
132
317
  * @param {object[]} customBorders The user defined custom border objects array.
133
318
  */ _validateStyleSettings = /*#__PURE__*/ new WeakSet(), /**
319
+ * Re-synchronizes the saved borders and their rendered custom selections after rows or columns
320
+ * are inserted or removed. Each saved border's coordinate on the given axis is passed through
321
+ * `mapIndex`; a result of `-1` means the border's cell no longer exists and the border is dropped,
322
+ * otherwise the border moves to the new coordinate. The cell meta is left untouched - Handsontable
323
+ * already shifts it, and this method only realigns the plugin's own bookkeeping to that meta.
324
+ *
325
+ * @param {string} axis The coordinate axis to shift - `'row'` or `'col'`.
326
+ * @param {Function} mapIndex Maps an old visual index to its new index, or `-1` when removed.
327
+ */ _shiftBorders = /*#__PURE__*/ new WeakSet(), /**
328
+ * Re-synchronizes the saved borders and their rendered custom selections after a row or column
329
+ * move. Each border's new visual index on the given axis is derived from the physical index
330
+ * captured before the move, so the border follows the cell it was applied to.
331
+ *
332
+ * @param {string} axis The coordinate axis to remap - `'row'` or `'col'`.
333
+ * @param {Array} snapshot Physical indexes captured before the move, parallel to `savedBorders`.
334
+ * @param {Function} toVisualIndex Translates a physical index to its current visual index.
335
+ */ _applyMoveSnapshot = /*#__PURE__*/ new WeakSet(), /**
336
+ * Reindexes the model after a structural change has rewritten border coordinates and ids, then
337
+ * drops and re-renders the working set so the viewport sync rebuilds it from the updated model.
338
+ * Tearing the selections down first also avoids transient id collisions (a shifted border's new id
339
+ * can equal another border's not-yet-shifted old id). Shared by `#shiftBorders` and
340
+ * `#applyMoveSnapshot`.
341
+ *
342
+ * @param {boolean} [render=true] If `true`, a render is forced so `#syncViewportSelections`
343
+ * rebuilds the working set. Pass `false` when the caller runs inside an operation that renders on
344
+ * its own afterwards - rendering from within such an operation paints a half-updated grid.
345
+ */ _rebuildWorkingSetFromModel = /*#__PURE__*/ new WeakSet(), /**
346
+ * Destroys the custom selection for the given border id and removes it from the highlight
347
+ * collection and the id cache. Used when a border's cell is removed from the table.
348
+ *
349
+ * @param {string} borderId The id of the border whose selection should be destroyed.
350
+ */ _destroyBorderSelection = /*#__PURE__*/ new WeakSet(), /**
134
351
  * Add border options to context menu.
135
352
  *
136
353
  * @param {object} defaultOptions Context menu items.
137
354
  */ _onAfterContextMenuDefaultOptions = /*#__PURE__*/ new WeakSet(), /**
138
- * `afterInit` hook callback.
139
- */ _onAfterInit = /*#__PURE__*/ new WeakSet();
355
+ * `init` hook callback. Builds the border model without forcing a render: the `init` hook fires
356
+ * right before the core's first render, and a render forced from here would paint the grid
357
+ * before later-priority plugins (e.g. NestedHeaders) run their own `init` setup, leaving
358
+ * corrupted header DOM behind (#11031 regression). The core's first render syncs and draws the
359
+ * master overlay's borders; the freshly-bootstrapped overlay clones need one more selection
360
+ * pass, so that render is scheduled for `afterInit` - still inside the same synchronous init
361
+ * sequence, but after every plugin finished its initialization.
362
+ */ _onAfterInit = /*#__PURE__*/ new WeakSet(), /**
363
+ * `beforeViewRender` hook callback. Synchronizes the rendered custom-border selections with the
364
+ * current viewport so only visible borders are materialized and drawn.
365
+ *
366
+ * The sync runs *before* the draw, not after it. The draw resolves the new rendered range
367
+ * (`createCalculators`) before firing `beforeViewRender`, so the range this reads is already the
368
+ * one about to be painted; the overlay clones then draw their selections, and the master draws
369
+ * its own at the end of the same cycle. Syncing from `afterViewRender` instead would land between
370
+ * those two, so a selection created there reached the master but missed the clones - a border
371
+ * scrolled back into a frozen row or column stayed invisible until an unrelated render.
372
+ */ _onBeforeViewRender = /*#__PURE__*/ new WeakMap(), /**
373
+ * `afterSetCellMeta` hook callback. Follows an external write of the `borders` cell meta (e.g.
374
+ * UndoRedo restoring the meta of an undone row/column removal, or user code calling
375
+ * `setCellMeta` directly) by upserting the matching entry in the border model, so the model and
376
+ * the meta cannot diverge. The plugin's own writes are excluded by the re-entrancy guard.
377
+ *
378
+ * @param {number} row Visual row index.
379
+ * @param {number} column Visual column index.
380
+ * @param {string} key The meta key that was written.
381
+ * @param {*} value The written value.
382
+ */ _onAfterSetCellMeta = /*#__PURE__*/ new WeakMap(), /**
383
+ * Schedules a single render for a batch of external `borders` cell-meta writes.
384
+ *
385
+ * The writes arrive per cell (`setCellMetaObject` fans a restored meta object out into one
386
+ * `setCellMeta` call per key, and UndoRedo replays one entry per removed cell), so rendering
387
+ * from the listener itself would run a full render for every bordered cell of the restored
388
+ * range. The microtask runs after the synchronous write batch but before the browser can paint,
389
+ * so the borders are still rebuilt within the same frame - no intermediate blank state. The
390
+ * microtask is registered through the core, which cancels pending ones on `destroy`.
391
+ */ _scheduleMetaSyncRender = /*#__PURE__*/ new WeakSet(), /**
392
+ * `afterRemoveCellMeta` hook callback. Follows an external removal of the `borders` cell meta by
393
+ * dropping the matching entry from the border model and its rendered selection.
394
+ *
395
+ * @param {number} row Visual row index.
396
+ * @param {number} column Visual column index.
397
+ * @param {string} key The removed meta key.
398
+ */ _onAfterRemoveCellMeta = /*#__PURE__*/ new WeakMap(), /**
399
+ * Applies any in-flight progressive load synchronously, so the border model is complete and its
400
+ * coordinates still describe the grid as the configuration meant them. Every structural change
401
+ * runs this from its `before*` hook: the core shifts the cell meta before firing the matching
402
+ * `after*` hook, so a queue drained from there would write its `borders` meta onto cells the
403
+ * configuration never targeted, leaving the meta and the model permanently out of step. The
404
+ * row/column move handlers flush from their `before*` hooks for the same reason.
405
+ *
406
+ * Auto-inserted rows and columns (`minSpareRows` / `minSpareCols`) append at the end and shift
407
+ * nothing, so they keep the load progressive instead of forcing it to complete.
408
+ *
409
+ * The `before*` hooks are vetoable, and the flush runs before the veto outcome is known - a
410
+ * later listener may still cancel the operation. A vetoed attempt therefore completes the load:
411
+ * nothing shifts, so the flushed model stays correct, but the remaining configuration is applied
412
+ * synchronously in that call. This is a deliberate trade-off - draining from the `after*` side
413
+ * corrupts the meta coordinates (the reason the flush lives here), and an already-applied queue
414
+ * cannot be re-armed.
415
+ *
416
+ * @param {string} [source] Source that triggered the structural change.
417
+ */ _flushBeforeStructuralChange = /*#__PURE__*/ new WeakSet(), /**
418
+ * `beforeCreateRow` hook callback.
419
+ *
420
+ * @param {number} index Visual index of the first row about to be created.
421
+ * @param {number} amount Number of rows about to be created.
422
+ * @param {string} [source] Source that triggered the row creation.
423
+ */ _onBeforeCreateRow = /*#__PURE__*/ new WeakMap(), /**
424
+ * `beforeRemoveRow` hook callback.
425
+ *
426
+ * @param {number} index Visual index of the first row about to be removed.
427
+ * @param {number} amount Number of rows about to be removed.
428
+ * @param {Array} physicalRows Physical indexes of the rows about to be removed.
429
+ * @param {string} [source] Source that triggered the row removal.
430
+ */ _onBeforeRemoveRow = /*#__PURE__*/ new WeakMap(), /**
431
+ * `beforeCreateCol` hook callback.
432
+ *
433
+ * @param {number} index Visual index of the first column about to be created.
434
+ * @param {number} amount Number of columns about to be created.
435
+ * @param {string} [source] Source that triggered the column creation.
436
+ */ _onBeforeCreateCol = /*#__PURE__*/ new WeakMap(), /**
437
+ * `beforeRemoveCol` hook callback.
438
+ *
439
+ * @param {number} index Visual index of the first column about to be removed.
440
+ * @param {number} amount Number of columns about to be removed.
441
+ * @param {Array} physicalColumns Physical indexes of the columns about to be removed.
442
+ * @param {string} [source] Source that triggered the column removal.
443
+ */ _onBeforeRemoveCol = /*#__PURE__*/ new WeakMap(), /**
444
+ * `afterCreateRow` hook callback. Shifts every border at or below the insertion point down.
445
+ *
446
+ * @param {number} index Visual index of the first newly created row.
447
+ * @param {number} amount Number of created rows.
448
+ * @param {string} [source] Source that triggered the row creation.
449
+ */ _onAfterCreateRow = /*#__PURE__*/ new WeakMap(), /**
450
+ * `afterRemoveRow` hook callback. Drops borders on removed rows and shifts the rest up.
451
+ *
452
+ * @param {number} index Visual index of the first removed row.
453
+ * @param {number} amount Number of removed rows.
454
+ */ _onAfterRemoveRow = /*#__PURE__*/ new WeakMap(), /**
455
+ * `afterCreateCol` hook callback. Shifts every border at or after the insertion point right.
456
+ *
457
+ * @param {number} index Visual index of the first newly created column.
458
+ * @param {number} amount Number of created columns.
459
+ * @param {string} [source] Source that triggered the column creation.
460
+ */ _onAfterCreateCol = /*#__PURE__*/ new WeakMap(), /**
461
+ * `afterRemoveCol` hook callback. Drops borders on removed columns and shifts the rest left.
462
+ *
463
+ * @param {number} index Visual index of the first removed column.
464
+ * @param {number} amount Number of removed columns.
465
+ */ _onAfterRemoveCol = /*#__PURE__*/ new WeakMap(), /**
466
+ * `beforeRowMove` hook callback. Snapshots each saved border's physical row so it can be
467
+ * re-derived after the move reorders the visual index mapping.
468
+ *
469
+ * @param {Array} movedRows Visual row indexes being moved.
470
+ * @param {number} finalIndex Target start index for the moved rows.
471
+ * @param {number|undefined} dropIndex Drop index of the move.
472
+ * @param {boolean} movePossible Whether the move is possible.
473
+ */ _onBeforeRowMove = /*#__PURE__*/ new WeakMap(), /**
474
+ * `afterRowMove` hook callback. Re-derives each border's visual row from the pre-move snapshot.
475
+ *
476
+ * @param {Array} movedRows Visual row indexes that were moved.
477
+ * @param {number} finalIndex Target start index for the moved rows.
478
+ * @param {number|undefined} dropIndex Drop index of the move.
479
+ * @param {boolean} movePossible Whether the move was possible.
480
+ * @param {boolean} orderChanged Whether the move changed the row order.
481
+ */ _onAfterRowMove = /*#__PURE__*/ new WeakMap(), /**
482
+ * `beforeColumnMove` hook callback. Snapshots each saved border's physical column so it can be
483
+ * re-derived after the move reorders the visual index mapping.
484
+ *
485
+ * @param {Array} movedColumns Visual column indexes being moved.
486
+ * @param {number} finalIndex Target start index for the moved columns.
487
+ * @param {number|undefined} dropIndex Drop index of the move.
488
+ * @param {boolean} movePossible Whether the move is possible.
489
+ */ _onBeforeColumnMove = /*#__PURE__*/ new WeakMap(), /**
490
+ * `afterColumnMove` hook callback. Re-derives each border's visual column from the pre-move
491
+ * snapshot.
492
+ *
493
+ * @param {Array} movedColumns Visual column indexes that were moved.
494
+ * @param {number} finalIndex Target start index for the moved columns.
495
+ * @param {number|undefined} dropIndex Drop index of the move.
496
+ * @param {boolean} movePossible Whether the move was possible.
497
+ * @param {boolean} orderChanged Whether the move changed the column order.
498
+ */ _onAfterColumnMove = /*#__PURE__*/ new WeakMap();
140
499
  class CustomBorders extends _base.BasePlugin {
141
500
  /**
142
501
  * Returns the plugin key used to identify this plugin in Handsontable settings.
@@ -149,6 +508,17 @@ class CustomBorders extends _base.BasePlugin {
149
508
  return PLUGIN_PRIORITY;
150
509
  }
151
510
  /**
511
+ * Returns the settings keys that trigger the plugin update on `updateSettings()`. Beside the
512
+ * plugin key itself this covers `customBordersProgressive`, which changes how the very same
513
+ * configuration is applied - without it, switching only that option would stay inert until some
514
+ * unrelated `customBorders` update happened to come along.
515
+ */ static get SETTING_KEYS() {
516
+ return [
517
+ PLUGIN_KEY,
518
+ 'customBordersProgressive'
519
+ ];
520
+ }
521
+ /**
152
522
  * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
153
523
  * hook and if it returns `true` then the {@link CustomBorders#enablePlugin} method is called.
154
524
  *
@@ -164,11 +534,27 @@ class CustomBorders extends _base.BasePlugin {
164
534
  }
165
535
  this.addHook('afterContextMenuDefaultOptions', (options)=>_class_private_method_get(this, _onAfterContextMenuDefaultOptions, onAfterContextMenuDefaultOptions).call(this, options));
166
536
  this.addHook('init', ()=>_class_private_method_get(this, _onAfterInit, onAfterInit).call(this));
537
+ this.addHook('beforeCreateRow', _class_private_field_get(this, _onBeforeCreateRow));
538
+ this.addHook('afterCreateRow', _class_private_field_get(this, _onAfterCreateRow));
539
+ this.addHook('beforeRemoveRow', _class_private_field_get(this, _onBeforeRemoveRow));
540
+ this.addHook('afterRemoveRow', _class_private_field_get(this, _onAfterRemoveRow));
541
+ this.addHook('beforeCreateCol', _class_private_field_get(this, _onBeforeCreateCol));
542
+ this.addHook('afterCreateCol', _class_private_field_get(this, _onAfterCreateCol));
543
+ this.addHook('beforeRemoveCol', _class_private_field_get(this, _onBeforeRemoveCol));
544
+ this.addHook('afterRemoveCol', _class_private_field_get(this, _onAfterRemoveCol));
545
+ this.addHook('beforeRowMove', _class_private_field_get(this, _onBeforeRowMove));
546
+ this.addHook('afterRowMove', _class_private_field_get(this, _onAfterRowMove));
547
+ this.addHook('beforeColumnMove', _class_private_field_get(this, _onBeforeColumnMove));
548
+ this.addHook('afterColumnMove', _class_private_field_get(this, _onAfterColumnMove));
549
+ this.addHook('beforeViewRender', _class_private_field_get(this, _onBeforeViewRender));
550
+ this.addHook('afterSetCellMeta', _class_private_field_get(this, _onAfterSetCellMeta));
551
+ this.addHook('afterRemoveCellMeta', _class_private_field_get(this, _onAfterRemoveCellMeta));
167
552
  super.enablePlugin();
168
553
  }
169
554
  /**
170
555
  * Disables the plugin functionality for this Handsontable instance.
171
556
  */ disablePlugin() {
557
+ _class_private_method_get(this, _cancelProgressiveApply, cancelProgressiveApply).call(this);
172
558
  this.hideBorders();
173
559
  super.disablePlugin();
174
560
  }
@@ -201,7 +587,12 @@ class CustomBorders extends _base.BasePlugin {
201
587
  * ```
202
588
  *
203
589
  * @param {Array[]|CellRange[]} selectionRanges Array of selection ranges.
204
- * @param {object} borderObject Object with `top`, `right`, `bottom` and `start` properties.
590
+ * @param {object} borderObject Object with `top`, `bottom`, `start`, and `end` properties.
591
+ * Each side object can include:
592
+ * - `width` (`number`) Border width in pixels (default: `1`).
593
+ * - `color` (`string`) CSS border color value (default: `'#000'`).
594
+ * - `hide` (`boolean`) Hides a border side when set to `true`.
595
+ * Legacy aliases `left` and `right` are also supported and are normalized to `start` and `end`.
205
596
  */ setBorders(selectionRanges, borderObject) {
206
597
  let borderKeys = [
207
598
  'top',
@@ -231,15 +622,11 @@ class CustomBorders extends _base.BasePlugin {
231
622
  });
232
623
  });
233
624
  /*
234
- The line below triggers a re-render of Handsontable. This will be a "fastDraw"
235
- render, because that is the default for the TableView class.
236
-
237
- The re-render is needed for borders on cells that did not have a border before.
238
- The way this call works is that it calls Table.refreshSelections, which calls
239
- Selection.getBorder, which creates a new instance of Border.
240
-
241
- Seems wise to keep this single-direction flow of creating new Borders
242
- */ this.hot.view.render();
625
+ A forced render is used (not a fast `view.render()`) so the `beforeViewRender` hook fires and
626
+ `#syncViewportSelections` materializes the custom selections for the just-changed, in-viewport
627
+ borders before the selection borders are drawn. A fast draw can be skipped when Walkontable
628
+ detects no cell/viewport change, which would leave the new border model unrendered.
629
+ */ this.hot.render();
243
630
  }
244
631
  /**
245
632
  * Get custom borders.
@@ -300,12 +687,8 @@ class CustomBorders extends _base.BasePlugin {
300
687
  if (selectionRanges) {
301
688
  this.setBorders(selectionRanges);
302
689
  } else {
303
- (0, _array.arrayEach)(this.savedBorders, (border)=>{
304
- this.clearBordersFromSelectionSettings(border.id);
305
- this.clearNullCellRange();
306
- this.hot.removeCellMeta(border.row, border.col, 'borders');
307
- });
308
- this.savedBorders.length = 0;
690
+ _class_private_method_get(this, _resetBorderModel, resetBorderModel).call(this);
691
+ this.hot.render();
309
692
  }
310
693
  }
311
694
  /**
@@ -318,16 +701,25 @@ class CustomBorders extends _base.BasePlugin {
318
701
  const hasSavedBorders = this.checkSavedBorders(border);
319
702
  if (!hasSavedBorders) {
320
703
  this.savedBorders.push(border);
704
+ _class_private_field_get(this, _savedBordersIndex).set(border.id, this.savedBorders.length - 1);
321
705
  }
322
- const borderCoords = this.hot._createCellCoords(border.row, border.col);
323
- const visualCellRange = this.hot._createCellRange(borderCoords, borderCoords, borderCoords);
324
- const hasCustomSelections = this.checkCustomSelections(border, visualCellRange, place);
325
- if (!hasCustomSelections) {
326
- this.hot.selection.highlight.addCustomSelection({
327
- border,
328
- visualCellRange
329
- });
330
- }
706
+ // Only the model is updated here; the rendered custom selection is created (or refreshed) by
707
+ // `#syncViewportSelections` on the next view render, and only if the border is inside the
708
+ // rendered range. This is what makes the plugin scale: selections and their border DOM are
709
+ // materialized for the viewport, not for every bordered cell. `place` is accepted for backward
710
+ // compatibility but no longer drives an incremental per-side toggle - the sync rebuilds the
711
+ // visible selection from the (already updated) border model, which carries the final side styles.
712
+ //
713
+ // The row index is patched for this one border rather than invalidated wholesale. Marking it
714
+ // dirty would make the next render rebuild it from the whole of `savedBorders`, so a progressive
715
+ // load - which renders once per batch - would rebuild a growing array once per batch and cost
716
+ // O(borders² / chunkSize) over the load, in the exact path the batching exists to speed up.
717
+ _class_private_method_get(this, _indexBorderByRow, indexBorderByRow).call(this, border);
718
+ // Drop any selection currently rendering this cell so the sync recreates it from the updated
719
+ // border object. The border id is coordinate-based and unchanged by a style edit, so without this
720
+ // the sync would keep the stale selection (it only adds/removes by id). No-op during bulk config
721
+ // load, when nothing is rendered yet.
722
+ _class_private_method_get(this, _destroyBorderSelection, destroyBorderSelection).call(this, border.id);
331
723
  }
332
724
  /**
333
725
  * Prepare borders from setting (single cell).
@@ -345,22 +737,34 @@ class CustomBorders extends _base.BasePlugin {
345
737
  }
346
738
  let border = (0, _utils.createEmptyBorders)(row, column);
347
739
  if (borderDescriptor) {
740
+ // A descriptor means "update these sides": start from the cell's existing borders so the
741
+ // sides it does not mention are kept, then layer the descriptor on top. With no descriptor
742
+ // the border stays all-hidden, which is the "clear this cell" intent handled below.
743
+ const existing = _class_private_method_get(this, _readExistingBordersForMerge, readExistingBordersForMerge).call(this, row, column);
744
+ if (isBorderObject(existing)) {
745
+ border = (0, _utils.normalizeBorder)((0, _object.deepClone)(existing));
746
+ // The merge base describes THIS cell regardless of the bookkeeping fields the stored meta
747
+ // carries - they can be stale when the meta is a detached snapshot (e.g. UndoRedo restoring
748
+ // borders captured at pre-shift coordinates).
749
+ border.row = row;
750
+ border.col = column;
751
+ border.id = (0, _utils.createId)(row, column);
752
+ }
348
753
  border = (0, _utils.extendDefaultBorder)(border, borderDescriptor);
349
- (0, _array.arrayEach)(this.hot.selection.highlight.customSelections, (customSelection)=>{
350
- const { settings } = customSelection;
351
- if (border.id === settings.id) {
352
- Object.assign(settings, borderDescriptor);
353
- const s = settings;
354
- border.id = s.id;
355
- border.top = s.top;
356
- border.bottom = s.bottom;
357
- border.start = s.start;
358
- border.end = s.end;
359
- return false; // breaks forAll
360
- }
361
- });
362
754
  }
363
- this.hot.setCellMeta(row, column, 'borders', (0, _utils.denormalizeBorder)(border));
755
+ // When every side is hidden (e.g. `setBorders(range)` with no style object, used to clear a
756
+ // cell) the border is removed entirely - dropped from the model and its cell meta - rather than
757
+ // stored as an all-hidden object. The rendered selection is reconciled by the viewport sync.
758
+ if (this.countHide(border) === 4) {
759
+ this.removeAllBorders(row, column);
760
+ return;
761
+ }
762
+ // A vetoed meta write must not reach the model - otherwise `getBorders()` would report a border
763
+ // that `getCellMeta().borders` knows nothing about, and clearing the model later would try to
764
+ // remove a meta key that was never written.
765
+ if (!_class_private_method_get(this, _writeBordersMeta, writeBordersMeta).call(this, row, column, (0, _utils.denormalizeBorder)(border))) {
766
+ return;
767
+ }
364
768
  this.insertBorderIntoSettings(border, place);
365
769
  }
366
770
  /**
@@ -374,39 +778,13 @@ class CustomBorders extends _base.BasePlugin {
374
778
  const lastColumnIndex = Math.min(range.to.col, this.hot.countCols() - 1);
375
779
  (0, _number.rangeEach)(range.from.row, lastRowIndex, (rowIndex)=>{
376
780
  (0, _number.rangeEach)(range.from.col, lastColumnIndex, (colIndex)=>{
377
- const border = (0, _utils.createEmptyBorders)(rowIndex, colIndex);
378
- let add = 0;
379
- if (rowIndex === range.from.row) {
380
- if ((0, _object.hasOwnProperty)(customBorder, 'top')) {
381
- add += 1;
382
- border.top = customBorder.top;
383
- }
384
- }
385
- // Please keep in mind that `range.to.row` may be beyond the table boundaries. The border won't be rendered.
386
- if (rowIndex === range.to.row) {
387
- if ((0, _object.hasOwnProperty)(customBorder, 'bottom')) {
388
- add += 1;
389
- border.bottom = customBorder.bottom;
390
- }
391
- }
392
- if (colIndex === range.from.col) {
393
- if ((0, _object.hasOwnProperty)(customBorder, 'start')) {
394
- add += 1;
395
- border.start = customBorder.start;
396
- }
397
- }
398
- // Please keep in mind that `range.to.col` may be beyond the table boundaries. The border won't be rendered.
399
- if (colIndex === range.to.col) {
400
- if ((0, _object.hasOwnProperty)(customBorder, 'end')) {
401
- add += 1;
402
- border.end = customBorder.end;
403
- }
404
- }
405
- if (add > 0) {
406
- this.hot.setCellMeta(rowIndex, colIndex, 'borders', (0, _utils.denormalizeBorder)(border));
781
+ const { border, add } = _class_private_method_get(this, _buildRangeCellBorder, buildRangeCellBorder).call(this, rowIndex, colIndex, customBorder, range);
782
+ // `#buildRangeCellBorder` already merged this cell's existing borders, so overlapping
783
+ // ranges accumulate their sides in the model. The rendered selection is (re)built from the
784
+ // merged model by `#syncViewportSelections` on the next view render. A cell whose meta
785
+ // write is vetoed is skipped entirely, so the model never gets ahead of the meta.
786
+ if (add > 0 && _class_private_method_get(this, _writeBordersMeta, writeBordersMeta).call(this, rowIndex, colIndex, (0, _utils.denormalizeBorder)(border))) {
407
787
  this.insertBorderIntoSettings(border, undefined);
408
- } else {
409
- // TODO sometimes it enters here. Why?
410
788
  }
411
789
  });
412
790
  });
@@ -418,11 +796,18 @@ class CustomBorders extends _base.BasePlugin {
418
796
  * @param {number} row Visual row index.
419
797
  * @param {number} column Visual column index.
420
798
  */ removeAllBorders(row, column) {
799
+ // The meta removal is vetoable, so it runs first: when a `beforeRemoveCellMeta` listener blocks
800
+ // it the cell keeps its `borders` meta, and dropping the border from the model anyway would
801
+ // leave `getBorders()` and `getCellMeta().borders` disagreeing.
802
+ if (!_class_private_method_get(this, _writeBordersMeta, writeBordersMeta).call(this, row, column, null)) {
803
+ return;
804
+ }
421
805
  const borderId = (0, _utils.createId)(row, column);
422
806
  this.spliceBorder(borderId);
423
- this.clearBordersFromSelectionSettings(borderId);
424
- this.clearNullCellRange();
425
- this.hot.removeCellMeta(row, column, 'borders');
807
+ _class_private_method_get(this, _unindexBorderByRow, unindexBorderByRow).call(this, row, borderId);
808
+ // Destroy the rendered selection if this border is currently in the viewport working set; if it
809
+ // is off-screen there is nothing rendered to remove.
810
+ _class_private_method_get(this, _destroyBorderSelection, destroyBorderSelection).call(this, borderId);
426
811
  }
427
812
  /**
428
813
  * Set borders for each cell re. To border position.
@@ -445,20 +830,15 @@ class CustomBorders extends _base.BasePlugin {
445
830
  const hideCount = this.countHide(bordersMeta);
446
831
  if (hideCount === 4) {
447
832
  this.removeAllBorders(row, column);
448
- } else {
449
- const customSelectionsChecker = this.checkCustomSelectionsFromContextMenu(bordersMeta, place, remove);
450
- if (!customSelectionsChecker) {
451
- this.insertBorderIntoSettings(bordersMeta, undefined);
452
- }
453
- this.hot.setCellMeta(row, column, 'borders', (0, _utils.denormalizeBorder)(bordersMeta));
833
+ } else if (_class_private_method_get(this, _writeBordersMeta, writeBordersMeta).call(this, row, column, (0, _utils.denormalizeBorder)(bordersMeta))) {
834
+ this.insertBorderIntoSettings(bordersMeta, undefined);
454
835
  }
455
836
  } else {
456
837
  bordersMeta[place] = (0, _utils.createDefaultCustomBorder)();
457
- const customSelectionsChecker = this.checkCustomSelectionsFromContextMenu(bordersMeta, place, remove);
458
- if (!customSelectionsChecker) {
838
+ // The meta is written first so a vetoed write leaves the model untouched.
839
+ if (_class_private_method_get(this, _writeBordersMeta, writeBordersMeta).call(this, row, column, (0, _utils.denormalizeBorder)(bordersMeta))) {
459
840
  this.insertBorderIntoSettings(bordersMeta, undefined);
460
841
  }
461
- this.hot.setCellMeta(row, column, 'borders', (0, _utils.denormalizeBorder)(bordersMeta));
462
842
  }
463
843
  }
464
844
  /**
@@ -517,6 +897,9 @@ class CustomBorders extends _base.BasePlugin {
517
897
  }
518
898
  }
519
899
  });
900
+ // Border changes above only updated the model; render so `#syncViewportSelections` materializes
901
+ // the visible selections for the changed cells.
902
+ this.hot.render();
520
903
  }
521
904
  /**
522
905
  * Create borders from settings.
@@ -524,14 +907,30 @@ class CustomBorders extends _base.BasePlugin {
524
907
  * @private
525
908
  * @param {Array} customBorders Object with `row` and `col`, `start`, `end`, `top` and `bottom` properties.
526
909
  */ createCustomBorders(customBorders) {
527
- (0, _array.arrayEach)(customBorders, (customBorder)=>{
528
- const normCustomBorder = (0, _utils.normalizeBorder)(customBorder);
529
- if (normCustomBorder.range) {
530
- this.prepareBorderFromCustomAddedRange(normCustomBorder.range, normCustomBorder);
531
- } else {
532
- this.prepareBorderFromCustomAdded(normCustomBorder.row ?? 0, normCustomBorder.col ?? 0, normCustomBorder, undefined);
910
+ // Own the first-touch tracking Set only when one is not already active. A progressive load keeps
911
+ // a single Set across all its batches (so overlapping ranges split across batches still merge
912
+ // correctly); a plain synchronous call owns and clears it here.
913
+ const ownsPass = _class_private_field_get(this, _configPassTouched) === null;
914
+ const wasInConfigPass = _class_private_field_get(this, _inConfigPass);
915
+ if (ownsPass) {
916
+ _class_private_field_set(this, _configPassTouched, new Set());
917
+ }
918
+ _class_private_field_set(this, _inConfigPass, true);
919
+ try {
920
+ (0, _array.arrayEach)(customBorders, (customBorder)=>{
921
+ const normCustomBorder = (0, _utils.normalizeBorder)(customBorder);
922
+ if (normCustomBorder.range) {
923
+ this.prepareBorderFromCustomAddedRange(normCustomBorder.range, normCustomBorder);
924
+ } else {
925
+ this.prepareBorderFromCustomAdded(normCustomBorder.row ?? 0, normCustomBorder.col ?? 0, normCustomBorder, undefined);
926
+ }
927
+ });
928
+ } finally{
929
+ _class_private_field_set(this, _inConfigPass, wasInConfigPass);
930
+ if (ownsPass) {
931
+ _class_private_field_set(this, _configPassTouched, null);
533
932
  }
534
- });
933
+ }
535
934
  }
536
935
  /**
537
936
  * Count hide property in border object.
@@ -557,38 +956,12 @@ class CustomBorders extends _base.BasePlugin {
557
956
  }, 0);
558
957
  }
559
958
  /**
560
- * Clear borders settings from custom selections.
561
- *
562
- * @private
563
- * @param {string} borderId Border id name as string.
564
- */ clearBordersFromSelectionSettings(borderId) {
565
- const index = (0, _array.arrayMap)(this.hot.selection.highlight.customSelections, (customSelection)=>customSelection.settings.id).indexOf(borderId);
566
- if (index > -1) {
567
- this.hot.selection.highlight.customSelections[index].clear();
568
- }
569
- }
570
- /**
571
- * Clear cellRange with null value.
572
- *
573
- * @private
574
- */ clearNullCellRange() {
575
- (0, _array.arrayEach)(this.hot.selection.highlight.customSelections, (customSelection, index)=>{
576
- if (customSelection.cellRange === null) {
577
- customSelection.destroy();
578
- this.hot.selection.highlight.customSelections.splice(index, 1);
579
- return false; // breaks forAll
580
- }
581
- });
582
- }
583
- /**
584
- * Hide custom borders.
959
+ * Hide custom borders. Destroys the rendered working-set selections; the `savedBorders` model is
960
+ * kept so the borders can be re-materialized if the plugin is re-enabled.
585
961
  *
586
962
  * @private
587
963
  */ hideBorders() {
588
- (0, _array.arrayEach)(this.savedBorders, (border)=>{
589
- this.clearBordersFromSelectionSettings(border.id);
590
- this.clearNullCellRange();
591
- });
964
+ _class_private_method_get(this, _destroyAllSelections, destroyAllSelections).call(this);
592
965
  }
593
966
  /**
594
967
  * Splice border from savedBorders.
@@ -596,9 +969,10 @@ class CustomBorders extends _base.BasePlugin {
596
969
  * @private
597
970
  * @param {string} borderId Border id name as string.
598
971
  */ spliceBorder(borderId) {
599
- const index = (0, _array.arrayMap)(this.savedBorders, (border)=>border.id).indexOf(borderId);
972
+ const index = _class_private_field_get(this, _savedBordersIndex).get(borderId) ?? -1;
600
973
  if (index > -1) {
601
974
  this.savedBorders.splice(index, 1);
975
+ _class_private_method_get(this, _rebuildSavedBordersIndex, rebuildSavedBordersIndex).call(this);
602
976
  }
603
977
  }
604
978
  /**
@@ -616,73 +990,11 @@ class CustomBorders extends _base.BasePlugin {
616
990
  this.spliceBorder(border.id);
617
991
  check = true;
618
992
  } else {
619
- (0, _array.arrayEach)(this.savedBorders, (savedBorder, index)=>{
620
- if (border.id === savedBorder.id) {
621
- this.savedBorders[index] = border;
622
- check = true;
623
- return false; // breaks forAll
624
- }
625
- });
626
- }
627
- return check;
628
- }
629
- /**
630
- * Check if an border already exists in the customSelections, and if true call toggleHiddenClass method.
631
- *
632
- * @private
633
- * @param {object} border Object with `row` and `col`, `start`, `end`, `top` and `bottom`, `id` and
634
- * `border` ({Object} with `color`, `width` and `cornerVisible` property) properties.
635
- * @param {string} place Coordinate where add/remove border - `top`, `bottom`, `start`, `end` and `noBorders`.
636
- * @param {boolean} remove True when remove borders, and false when add borders.
637
- *
638
- * @returns {boolean}
639
- */ checkCustomSelectionsFromContextMenu(border, place, remove) {
640
- let check = false;
641
- const customSelections = this.hot.selection.highlight.customSelections;
642
- (0, _array.arrayEach)(customSelections, (customSelection)=>{
643
- if (border.id === customSelection.settings.id) {
644
- const borders = this.hot.view._wt.selectionManager.getBorderInstances(customSelection);
645
- if (isBorderSide(place)) {
646
- (0, _array.arrayEach)(borders, (borderObject)=>{
647
- borderObject.toggleHiddenClass(place, remove ?? false);
648
- });
649
- }
993
+ const index = _class_private_field_get(this, _savedBordersIndex).get(border.id);
994
+ if (index !== undefined) {
995
+ this.savedBorders[index] = border;
650
996
  check = true;
651
- return false; // breaks forAll
652
997
  }
653
- });
654
- return check;
655
- }
656
- /**
657
- * Check if an border already exists in the customSelections, and if true reset cellRange.
658
- *
659
- * @private
660
- * @param {object} border Object with `row` and `col`, `start`, `end`, `top` and `bottom`, `id` and
661
- * `border` ({Object} with `color`, `width` and `cornerVisible` property) properties.
662
- * @param {CellRange} cellRange The selection range to check.
663
- * @param {string} [place] Coordinate where add/remove border - `top`, `bottom`, `start`, `end`.
664
- * @returns {boolean}
665
- */ checkCustomSelections(border, cellRange, place) {
666
- const hideCount = this.countHide(border);
667
- let check = false;
668
- if (hideCount === 4) {
669
- this.removeAllBorders(border.row, border.col);
670
- check = true;
671
- } else {
672
- (0, _array.arrayEach)(this.hot.selection.highlight.customSelections, (customSelection)=>{
673
- if (border.id === customSelection.settings.id) {
674
- customSelection.visualCellRange = cellRange;
675
- customSelection.commit();
676
- if (place && isBorderSide(place)) {
677
- const borders = this.hot.view._wt.selectionManager.getBorderInstances(customSelection);
678
- (0, _array.arrayEach)(borders, (borderObject)=>{
679
- borderObject.changeBorderStyle(place, border);
680
- });
681
- }
682
- check = true;
683
- return false; // breaks forAll
684
- }
685
- });
686
998
  }
687
999
  return check;
688
1000
  }
@@ -690,18 +1002,38 @@ class CustomBorders extends _base.BasePlugin {
690
1002
  * Change borders from settings.
691
1003
  *
692
1004
  * @private
693
- */ changeBorderSettings() {
1005
+ * @param {boolean} [render=true] If `true`, a render is forced after the border model is rebuilt
1006
+ * so `#syncViewportSelections` materializes the visible selections. Pass `false` on the `init`
1007
+ * path: the `init` hook fires before the core's own first render, so that render performs the
1008
+ * sync - and rendering here would paint the grid before later-priority plugins (e.g.
1009
+ * NestedHeaders) finish their `init` setup, leaving corrupted header DOM behind.
1010
+ */ changeBorderSettings(render = true) {
694
1011
  const customBorders = this.hot.getSettings()[PLUGIN_KEY];
695
1012
  if (Array.isArray(customBorders)) {
696
1013
  const bordersClone = (0, _object.deepClone)(customBorders.filter(isRecord));
697
1014
  this.checkSettingsCohesion(bordersClone);
698
- if (!bordersClone.length) {
699
- this.savedBorders = [];
1015
+ // A fresh array config replaces the previous borders (this is also the `updateSettings` path).
1016
+ // Reset the model and clear the previous cells' meta first so `prepareBorderFromCustomAdded`
1017
+ // starts from a clean slate instead of merging the new config onto stale meta.
1018
+ _class_private_method_get(this, _resetBorderModel, resetBorderModel).call(this);
1019
+ const progressive = _class_private_method_get(this, _resolveProgressiveSetting, resolveProgressiveSetting).call(this);
1020
+ if (progressive.enabled && bordersClone.length > 0) {
1021
+ // Apply borders in background batches: render the (border-less) grid now so it is
1022
+ // interactive immediately; batches fill in and `afterCustomBordersUpdate` fires on drain.
1023
+ _class_private_method_get(this, _startProgressiveApply, startProgressiveApply).call(this, bordersClone, progressive.chunkSize);
1024
+ if (render) {
1025
+ this.hot.render();
1026
+ }
1027
+ return;
700
1028
  }
701
1029
  this.createCustomBorders(bordersClone);
702
1030
  } else if (customBorders !== undefined) {
703
1031
  this.createCustomBorders(this.savedBorders);
704
1032
  }
1033
+ if (render) {
1034
+ this.hot.render();
1035
+ }
1036
+ this.hot.runHooks('afterCustomBordersUpdate');
705
1037
  }
706
1038
  /**
707
1039
  * Checks the settings cohesion. The properties such like "left"/"right" are supported only
@@ -723,16 +1055,466 @@ class CustomBorders extends _base.BasePlugin {
723
1055
  /**
724
1056
  * Destroys the plugin instance.
725
1057
  */ destroy() {
1058
+ // Cancel any in-flight progressive load and release the border model / working-set graphs so a
1059
+ // destroyed instance does not retain them for the page lifetime.
1060
+ _class_private_method_get(this, _cancelProgressiveApply, cancelProgressiveApply).call(this);
1061
+ this.savedBorders = [];
1062
+ _class_private_field_get(this, _savedBordersIndex).clear();
1063
+ _class_private_field_get(this, _bordersByRow).clear();
1064
+ _class_private_field_get(this, _customSelectionsCache).clear();
1065
+ _class_private_field_set(this, _rowMoveSnapshot, null);
1066
+ _class_private_field_set(this, _columnMoveSnapshot, null);
726
1067
  super.destroy();
727
1068
  }
728
1069
  constructor(...args){
729
- super(...args), _class_private_method_init(this, _validateStyleSettings), _class_private_method_init(this, _onAfterContextMenuDefaultOptions), _class_private_method_init(this, _onAfterInit), /**
1070
+ super(...args), _class_private_method_init(this, _readExistingBordersForMerge), _class_private_method_init(this, _writeBordersMeta), _class_private_method_init(this, _buildRangeCellBorder), _class_private_method_init(this, _destroyAllSelections), _class_private_method_init(this, _resetBorderModel), _class_private_method_init(this, _rebuildBordersByRow), _class_private_method_init(this, _indexBorderByRow), _class_private_method_init(this, _unindexBorderByRow), _class_private_method_init(this, _syncViewportSelections), _class_private_method_init(this, _addSelectionForBorder), _class_private_method_init(this, _rebuildSavedBordersIndex), _class_private_method_init(this, _resolveProgressiveSetting), _class_private_method_init(this, _startProgressiveApply), _class_private_method_init(this, _scheduleProgressiveChunk), _class_private_method_init(this, _processProgressiveChunk), _class_private_method_init(this, _flushProgressiveApply), _class_private_method_init(this, _finishProgressiveApply), _class_private_method_init(this, _cancelProgressiveApply), _class_private_method_init(this, _validateStyleSettings), _class_private_method_init(this, _shiftBorders), _class_private_method_init(this, _applyMoveSnapshot), _class_private_method_init(this, _rebuildWorkingSetFromModel), _class_private_method_init(this, _destroyBorderSelection), _class_private_method_init(this, _onAfterContextMenuDefaultOptions), _class_private_method_init(this, _onAfterInit), _class_private_method_init(this, _scheduleMetaSyncRender), _class_private_method_init(this, _flushBeforeStructuralChange), _class_private_field_init(this, _savedBordersIndex, {
1071
+ writable: true,
1072
+ value: void 0
1073
+ }), _class_private_field_init(this, _customSelectionsCache, {
1074
+ writable: true,
1075
+ value: void 0
1076
+ }), _class_private_field_init(this, _bordersByRow, {
1077
+ writable: true,
1078
+ value: void 0
1079
+ }), _class_private_field_init(this, _bordersByRowDirty, {
1080
+ writable: true,
1081
+ value: void 0
1082
+ }), _class_private_field_init(this, _configPassTouched, {
1083
+ writable: true,
1084
+ value: void 0
1085
+ }), _class_private_field_init(this, _inConfigPass, {
1086
+ writable: true,
1087
+ value: void 0
1088
+ }), _class_private_field_init(this, _isInternalMetaWrite, {
1089
+ writable: true,
1090
+ value: void 0
1091
+ }), _class_private_field_init(this, _isMetaSyncRenderScheduled, {
1092
+ writable: true,
1093
+ value: void 0
1094
+ }), _class_private_field_init(this, _progressiveQueue, {
1095
+ writable: true,
1096
+ value: void 0
1097
+ }), _class_private_field_init(this, _progressiveIndex, {
1098
+ writable: true,
1099
+ value: void 0
1100
+ }), _class_private_field_init(this, _progressiveChunkSize, {
1101
+ writable: true,
1102
+ value: void 0
1103
+ }), _class_private_field_init(this, _progressiveToken, {
1104
+ writable: true,
1105
+ value: void 0
1106
+ }), _class_private_field_init(this, _rowMoveSnapshot, {
1107
+ writable: true,
1108
+ value: void 0
1109
+ }), _class_private_field_init(this, _columnMoveSnapshot, {
1110
+ writable: true,
1111
+ value: void 0
1112
+ }), _class_private_field_init(this, _onBeforeViewRender, {
1113
+ writable: true,
1114
+ value: void 0
1115
+ }), _class_private_field_init(this, _onAfterSetCellMeta, {
1116
+ writable: true,
1117
+ value: void 0
1118
+ }), _class_private_field_init(this, _onAfterRemoveCellMeta, {
1119
+ writable: true,
1120
+ value: void 0
1121
+ }), _class_private_field_init(this, _onBeforeCreateRow, {
1122
+ writable: true,
1123
+ value: void 0
1124
+ }), _class_private_field_init(this, _onBeforeRemoveRow, {
1125
+ writable: true,
1126
+ value: void 0
1127
+ }), _class_private_field_init(this, _onBeforeCreateCol, {
1128
+ writable: true,
1129
+ value: void 0
1130
+ }), _class_private_field_init(this, _onBeforeRemoveCol, {
1131
+ writable: true,
1132
+ value: void 0
1133
+ }), _class_private_field_init(this, _onAfterCreateRow, {
1134
+ writable: true,
1135
+ value: void 0
1136
+ }), _class_private_field_init(this, _onAfterRemoveRow, {
1137
+ writable: true,
1138
+ value: void 0
1139
+ }), _class_private_field_init(this, _onAfterCreateCol, {
1140
+ writable: true,
1141
+ value: void 0
1142
+ }), _class_private_field_init(this, _onAfterRemoveCol, {
1143
+ writable: true,
1144
+ value: void 0
1145
+ }), _class_private_field_init(this, _onBeforeRowMove, {
1146
+ writable: true,
1147
+ value: void 0
1148
+ }), _class_private_field_init(this, _onAfterRowMove, {
1149
+ writable: true,
1150
+ value: void 0
1151
+ }), _class_private_field_init(this, _onBeforeColumnMove, {
1152
+ writable: true,
1153
+ value: void 0
1154
+ }), _class_private_field_init(this, _onAfterColumnMove, {
1155
+ writable: true,
1156
+ value: void 0
1157
+ }), /**
730
1158
  * Saved borders.
731
1159
  *
732
1160
  * @private
733
1161
  * @type {Array}
734
- */ this.savedBorders = [];
1162
+ */ this.savedBorders = [], _class_private_field_set(this, _savedBordersIndex, new Map()), _class_private_field_set(this, _customSelectionsCache, new Map()), _class_private_field_set(this, _bordersByRow, new Map()), _class_private_field_set(this, _bordersByRowDirty, true), _class_private_field_set(this, _configPassTouched, null), _class_private_field_set(this, _inConfigPass, false), _class_private_field_set(this, _isInternalMetaWrite, false), _class_private_field_set(this, _isMetaSyncRenderScheduled, false), _class_private_field_set(this, _progressiveQueue, null), _class_private_field_set(this, _progressiveIndex, 0), _class_private_field_set(this, _progressiveChunkSize, DEFAULT_PROGRESSIVE_CHUNK_SIZE), _class_private_field_set(this, _progressiveToken, 0), _class_private_field_set(this, _rowMoveSnapshot, null), _class_private_field_set(this, _columnMoveSnapshot, null), _class_private_field_set(this, _onBeforeViewRender, ()=>{
1163
+ _class_private_method_get(this, _syncViewportSelections, syncViewportSelections).call(this);
1164
+ }), _class_private_field_set(this, _onAfterSetCellMeta, (row, column, key, value)=>{
1165
+ if (_class_private_field_get(this, _isInternalMetaWrite) || key !== 'borders' || !isRecord(value)) {
1166
+ return;
1167
+ }
1168
+ // The written value may be a complete plugin-shaped border object (UndoRedo restoring the meta
1169
+ // of an undone removal) or a partial user-authored one (e.g. `{ top: { width: 2 } }` passed to
1170
+ // `setCellMeta` directly), so it must not be required to carry the internal `id`/`row`/`col`
1171
+ // bookkeeping fields. Routing it through `prepareBorderFromCustomAdded` treats it as a border
1172
+ // descriptor for the write's coordinates. The meta key was already replaced by this write (the
1173
+ // previous sides are gone), so the descriptor defines the cell's borders: the canonical
1174
+ // (complete, denormalized) object is written back to the meta, an all-hidden result clears the
1175
+ // cell, and the model entry is upserted - so meta and model cannot diverge.
1176
+ this.prepareBorderFromCustomAdded(row, column, (0, _utils.normalizeBorder)((0, _object.deepClone)(value)), undefined);
1177
+ // `setCellMeta` does not render, and the model update above dropped the cell's previous rendered
1178
+ // selection so the viewport sync can rebuild it. Without a render the old border DOM is gone
1179
+ // and the new one waits for some unrelated render - the cell would appear to lose its border.
1180
+ _class_private_method_get(this, _scheduleMetaSyncRender, scheduleMetaSyncRender).call(this);
1181
+ }), _class_private_field_set(this, _onAfterRemoveCellMeta, (row, column, key)=>{
1182
+ if (_class_private_field_get(this, _isInternalMetaWrite) || key !== 'borders') {
1183
+ return;
1184
+ }
1185
+ const borderId = (0, _utils.createId)(row, column);
1186
+ this.spliceBorder(borderId);
1187
+ _class_private_method_get(this, _unindexBorderByRow, unindexBorderByRow).call(this, row, borderId);
1188
+ _class_private_method_get(this, _destroyBorderSelection, destroyBorderSelection).call(this, borderId);
1189
+ }), _class_private_field_set(this, _onBeforeCreateRow, (index, amount, source)=>{
1190
+ _class_private_method_get(this, _flushBeforeStructuralChange, flushBeforeStructuralChange).call(this, source);
1191
+ }), _class_private_field_set(this, _onBeforeRemoveRow, (index, amount, physicalRows, source)=>{
1192
+ _class_private_method_get(this, _flushBeforeStructuralChange, flushBeforeStructuralChange).call(this, source);
1193
+ }), _class_private_field_set(this, _onBeforeCreateCol, (index, amount, source)=>{
1194
+ _class_private_method_get(this, _flushBeforeStructuralChange, flushBeforeStructuralChange).call(this, source);
1195
+ }), _class_private_field_set(this, _onBeforeRemoveCol, (index, amount, physicalColumns, source)=>{
1196
+ _class_private_method_get(this, _flushBeforeStructuralChange, flushBeforeStructuralChange).call(this, source);
1197
+ }), _class_private_field_set(this, _onAfterCreateRow, (index, amount, source)=>{
1198
+ if (source === 'auto') {
1199
+ return;
1200
+ }
1201
+ _class_private_method_get(this, _shiftBorders, shiftBorders).call(this, 'row', (currentIndex)=>(0, _utils.getShiftedIndexAfterInsert)(currentIndex, index, amount));
1202
+ }), _class_private_field_set(this, _onAfterRemoveRow, (index, amount)=>{
1203
+ _class_private_method_get(this, _shiftBorders, shiftBorders).call(this, 'row', (currentIndex)=>(0, _utils.getShiftedIndexAfterRemove)(currentIndex, index, amount));
1204
+ }), _class_private_field_set(this, _onAfterCreateCol, (index, amount, source)=>{
1205
+ // Auto-inserted columns (e.g. `minSpareCols`) append at the end and, like auto rows, do NOT
1206
+ // shift cell meta in the core (`DataMap#createCol` skips `metaManager.createColumn` for
1207
+ // `source === 'auto'`). Shifting the border model here would then diverge from the meta, so skip
1208
+ // it - mirrors `#onAfterCreateRow`.
1209
+ if (source === 'auto') {
1210
+ return;
1211
+ }
1212
+ _class_private_method_get(this, _shiftBorders, shiftBorders).call(this, 'col', (currentIndex)=>(0, _utils.getShiftedIndexAfterInsert)(currentIndex, index, amount));
1213
+ }), _class_private_field_set(this, _onAfterRemoveCol, (index, amount)=>{
1214
+ _class_private_method_get(this, _shiftBorders, shiftBorders).call(this, 'col', (currentIndex)=>(0, _utils.getShiftedIndexAfterRemove)(currentIndex, index, amount));
1215
+ }), _class_private_field_set(this, _onBeforeRowMove, (movedRows, finalIndex, dropIndex, movePossible)=>{
1216
+ // Snapshot needs the complete model; finish any in-flight progressive load first.
1217
+ _class_private_method_get(this, _flushProgressiveApply, flushProgressiveApply).call(this);
1218
+ _class_private_field_set(this, _rowMoveSnapshot, movePossible ? this.savedBorders.map((border)=>this.hot.toPhysicalRow(border.row)) : null);
1219
+ }), _class_private_field_set(this, _onAfterRowMove, (movedRows, finalIndex, dropIndex, movePossible, orderChanged)=>{
1220
+ const snapshot = _class_private_field_get(this, _rowMoveSnapshot);
1221
+ _class_private_field_set(this, _rowMoveSnapshot, null);
1222
+ if (!snapshot || !orderChanged) {
1223
+ return;
1224
+ }
1225
+ _class_private_method_get(this, _applyMoveSnapshot, applyMoveSnapshot).call(this, 'row', snapshot, (physicalIndex)=>this.hot.toVisualRow(physicalIndex));
1226
+ }), _class_private_field_set(this, _onBeforeColumnMove, (movedColumns, finalIndex, dropIndex, movePossible)=>{
1227
+ // Snapshot needs the complete model; finish any in-flight progressive load first.
1228
+ _class_private_method_get(this, _flushProgressiveApply, flushProgressiveApply).call(this);
1229
+ _class_private_field_set(this, _columnMoveSnapshot, movePossible ? this.savedBorders.map((border)=>this.hot.toPhysicalColumn(border.col)) : null);
1230
+ }), _class_private_field_set(this, _onAfterColumnMove, (movedColumns, finalIndex, dropIndex, movePossible, orderChanged)=>{
1231
+ const snapshot = _class_private_field_get(this, _columnMoveSnapshot);
1232
+ _class_private_field_set(this, _columnMoveSnapshot, null);
1233
+ if (!snapshot || !orderChanged) {
1234
+ return;
1235
+ }
1236
+ _class_private_method_get(this, _applyMoveSnapshot, applyMoveSnapshot).call(this, 'col', snapshot, (physicalIndex)=>this.hot.toVisualColumn(physicalIndex));
1237
+ });
1238
+ }
1239
+ }
1240
+ function readExistingBordersForMerge(row, column) {
1241
+ const seen = _class_private_field_get(this, _configPassTouched);
1242
+ if (seen === null || !_class_private_field_get(this, _inConfigPass)) {
1243
+ return this.hot.getCellMeta(row, column).borders;
1244
+ }
1245
+ const key = `${row},${column}`;
1246
+ const shouldRead = seen.has(key);
1247
+ seen.add(key);
1248
+ return shouldRead ? this.hot.getCellMeta(row, column).borders : undefined;
1249
+ }
1250
+ function writeBordersMeta(row, column, value) {
1251
+ // Sampled before the write: a `runOnce` veto listener removes itself the moment it fires, so
1252
+ // probing afterwards would read `false` for a write that was in fact vetoed.
1253
+ const isVetoable = this.hot.hasHook(value === null ? 'beforeRemoveCellMeta' : 'beforeSetCellMeta');
1254
+ _class_private_field_set(this, _isInternalMetaWrite, true);
1255
+ try {
1256
+ if (value === null) {
1257
+ this.hot.removeCellMeta(row, column, 'borders');
1258
+ } else {
1259
+ this.hot.setCellMeta(row, column, 'borders', value);
1260
+ }
1261
+ } finally{
1262
+ _class_private_field_set(this, _isInternalMetaWrite, false);
1263
+ }
1264
+ if (!isVetoable) {
1265
+ return true;
1266
+ }
1267
+ // Same effective resolution as `getCellMeta`; the cell already holds stored meta after the
1268
+ // write above, so the transient read returns that stored object with its own properties
1269
+ // observable.
1270
+ const written = this.hot.getCellMetaTransient(row, column);
1271
+ return value === null ? !(0, _object.hasOwnProperty)(written, 'borders') : written.borders === value;
1272
+ }
1273
+ function buildRangeCellBorder(rowIndex, colIndex, customBorder, range) {
1274
+ const existing = _class_private_method_get(this, _readExistingBordersForMerge, readExistingBordersForMerge).call(this, rowIndex, colIndex);
1275
+ const border = isBorderObject(existing) ? (0, _utils.normalizeBorder)((0, _object.deepClone)(existing)) : (0, _utils.createEmptyBorders)(rowIndex, colIndex);
1276
+ let add = 0;
1277
+ const applyEdge = (isEdge, sideKey)=>{
1278
+ // `range.to.row`/`range.to.col` may lie beyond the table; those cells are never iterated.
1279
+ if (isEdge && (0, _object.hasOwnProperty)(customBorder, sideKey)) {
1280
+ border[sideKey] = (0, _utils.resolveRangeBorderSide)(customBorder[sideKey], customBorder.border);
1281
+ add += 1;
1282
+ }
1283
+ };
1284
+ applyEdge(rowIndex === range.from.row, 'top');
1285
+ applyEdge(rowIndex === range.to.row, 'bottom');
1286
+ applyEdge(colIndex === range.from.col, 'start');
1287
+ applyEdge(colIndex === range.to.col, 'end');
1288
+ if (isRecord(customBorder.border)) {
1289
+ border.border = customBorder.border;
1290
+ }
1291
+ return {
1292
+ border,
1293
+ add
1294
+ };
1295
+ }
1296
+ function destroyAllSelections() {
1297
+ const { customSelections } = this.hot.selection.highlight;
1298
+ const owned = new Set(_class_private_field_get(this, _customSelectionsCache).values());
1299
+ for(let index = customSelections.length - 1; index >= 0; index--){
1300
+ if (owned.has(customSelections[index])) {
1301
+ customSelections[index].destroy();
1302
+ customSelections.splice(index, 1);
1303
+ }
1304
+ }
1305
+ _class_private_field_get(this, _customSelectionsCache).clear();
1306
+ }
1307
+ function resetBorderModel() {
1308
+ _class_private_method_get(this, _cancelProgressiveApply, cancelProgressiveApply).call(this);
1309
+ // A `beforeRemoveCellMeta` listener can veto the removal. Those cells keep their `borders` meta,
1310
+ // so they keep their model entry too - clearing the model around them would leave `getBorders()`
1311
+ // and `getCellMeta().borders` disagreeing.
1312
+ const kept = [];
1313
+ (0, _array.arrayEach)(this.savedBorders, (border)=>{
1314
+ if (!_class_private_method_get(this, _writeBordersMeta, writeBordersMeta).call(this, border.row, border.col, null)) {
1315
+ kept.push(border);
1316
+ }
1317
+ });
1318
+ this.savedBorders = kept;
1319
+ _class_private_method_get(this, _rebuildSavedBordersIndex, rebuildSavedBordersIndex).call(this);
1320
+ _class_private_field_get(this, _bordersByRow).clear();
1321
+ _class_private_field_set(this, _bordersByRowDirty, true);
1322
+ _class_private_method_get(this, _destroyAllSelections, destroyAllSelections).call(this);
1323
+ }
1324
+ function rebuildBordersByRow() {
1325
+ _class_private_field_get(this, _bordersByRow).clear();
1326
+ (0, _array.arrayEach)(this.savedBorders, (border)=>{
1327
+ const rowBorders = _class_private_field_get(this, _bordersByRow).get(border.row);
1328
+ if (rowBorders) {
1329
+ rowBorders.push(border);
1330
+ } else {
1331
+ _class_private_field_get(this, _bordersByRow).set(border.row, [
1332
+ border
1333
+ ]);
1334
+ }
1335
+ });
1336
+ _class_private_field_set(this, _bordersByRowDirty, false);
1337
+ }
1338
+ function indexBorderByRow(border) {
1339
+ if (_class_private_field_get(this, _bordersByRowDirty)) {
1340
+ return;
1341
+ }
1342
+ // A border removed by `checkSavedBorders` (all four sides hidden) is no longer in the model, so
1343
+ // it must leave the index rather than enter it.
1344
+ if (!_class_private_field_get(this, _savedBordersIndex).has(border.id)) {
1345
+ _class_private_method_get(this, _unindexBorderByRow, unindexBorderByRow).call(this, border.row, border.id);
1346
+ return;
1347
+ }
1348
+ const rowBorders = _class_private_field_get(this, _bordersByRow).get(border.row);
1349
+ if (!rowBorders) {
1350
+ _class_private_field_get(this, _bordersByRow).set(border.row, [
1351
+ border
1352
+ ]);
1353
+ return;
1354
+ }
1355
+ const at = rowBorders.findIndex((indexed)=>indexed.id === border.id);
1356
+ if (at === -1) {
1357
+ rowBorders.push(border);
1358
+ } else {
1359
+ rowBorders[at] = border;
1360
+ }
1361
+ }
1362
+ function unindexBorderByRow(row, borderId) {
1363
+ if (_class_private_field_get(this, _bordersByRowDirty)) {
1364
+ return;
1365
+ }
1366
+ const rowBorders = _class_private_field_get(this, _bordersByRow).get(row);
1367
+ if (!rowBorders) {
1368
+ return;
1369
+ }
1370
+ const at = rowBorders.findIndex((indexed)=>indexed.id === borderId);
1371
+ if (at === -1) {
1372
+ return;
1373
+ }
1374
+ rowBorders.splice(at, 1);
1375
+ if (rowBorders.length === 0) {
1376
+ _class_private_field_get(this, _bordersByRow).delete(row);
1377
+ }
1378
+ }
1379
+ function syncViewportSelections() {
1380
+ if (_class_private_field_get(this, _bordersByRowDirty)) {
1381
+ _class_private_method_get(this, _rebuildBordersByRow, rebuildBordersByRow).call(this);
1382
+ }
1383
+ const view = this.hot.view;
1384
+ const firstRow = view.getFirstRenderedVisibleRow();
1385
+ const lastRow = view.getLastRenderedVisibleRow();
1386
+ const firstColumn = view.getFirstRenderedVisibleColumn();
1387
+ const lastColumn = view.getLastRenderedVisibleColumn();
1388
+ // Nothing rendered (e.g. detached table or headers only) - drop the whole working set.
1389
+ if (firstRow === null || lastRow === null || firstColumn === null || lastColumn === null) {
1390
+ if (_class_private_field_get(this, _customSelectionsCache).size > 0) {
1391
+ _class_private_method_get(this, _destroyAllSelections, destroyAllSelections).call(this);
1392
+ }
1393
+ return;
1394
+ }
1395
+ // Frozen rows/columns are rendered by the overlay clones even when the master rendered range
1396
+ // excludes them, so the working window is the union of the frozen areas and the master range.
1397
+ const settings = this.hot.getSettings();
1398
+ const fixedRowsTop = Number(settings.fixedRowsTop) || 0;
1399
+ const fixedRowsBottom = Number(settings.fixedRowsBottom) || 0;
1400
+ const fixedColumnsStart = Number(settings.fixedColumnsStart) || 0;
1401
+ const totalRows = this.hot.countRows();
1402
+ const totalColumns = this.hot.countCols();
1403
+ const rowRanges = (0, _utils.getViewportUnionRanges)(firstRow, lastRow, fixedRowsTop, fixedRowsBottom, totalRows);
1404
+ const shouldBeVisible = new Set();
1405
+ (0, _array.arrayEach)(rowRanges, ([fromRow, toRow])=>{
1406
+ for(let row = fromRow; row <= toRow; row++){
1407
+ const rowBorders = _class_private_field_get(this, _bordersByRow).get(row);
1408
+ if (!rowBorders) {
1409
+ continue; // eslint-disable-line no-continue
1410
+ }
1411
+ (0, _array.arrayEach)(rowBorders, (border)=>{
1412
+ if ((0, _utils.isIndexInViewportUnion)(border.col, firstColumn, lastColumn, fixedColumnsStart, 0, totalColumns)) {
1413
+ shouldBeVisible.add(border.id);
1414
+ if (!_class_private_field_get(this, _customSelectionsCache).has(border.id)) {
1415
+ _class_private_method_get(this, _addSelectionForBorder, addSelectionForBorder).call(this, border);
1416
+ }
1417
+ }
1418
+ });
1419
+ }
1420
+ });
1421
+ // Remove selections that scrolled out of the rendered range.
1422
+ (0, _array.arrayEach)(Array.from(_class_private_field_get(this, _customSelectionsCache).keys()), (borderId)=>{
1423
+ if (!shouldBeVisible.has(borderId)) {
1424
+ _class_private_method_get(this, _destroyBorderSelection, destroyBorderSelection).call(this, borderId);
1425
+ }
1426
+ });
1427
+ }
1428
+ function addSelectionForBorder(border) {
1429
+ const borderCoords = this.hot._createCellCoords(border.row, border.col);
1430
+ const visualCellRange = this.hot._createCellRange(borderCoords, borderCoords, borderCoords);
1431
+ const { customSelections } = this.hot.selection.highlight;
1432
+ this.hot.selection.highlight.addCustomSelection({
1433
+ border,
1434
+ visualCellRange
1435
+ });
1436
+ _class_private_field_get(this, _customSelectionsCache).set(border.id, customSelections[customSelections.length - 1]);
1437
+ }
1438
+ function rebuildSavedBordersIndex() {
1439
+ _class_private_field_get(this, _savedBordersIndex).clear();
1440
+ (0, _array.arrayEach)(this.savedBorders, (border, index)=>{
1441
+ _class_private_field_get(this, _savedBordersIndex).set(border.id, index);
1442
+ });
1443
+ }
1444
+ function resolveProgressiveSetting() {
1445
+ const setting = this.hot.getSettings().customBordersProgressive;
1446
+ if (setting === true) {
1447
+ return {
1448
+ enabled: true,
1449
+ chunkSize: DEFAULT_PROGRESSIVE_CHUNK_SIZE
1450
+ };
735
1451
  }
1452
+ if (isRecord(setting)) {
1453
+ const size = typeof setting.chunkSize === 'number' && setting.chunkSize > 0 ? Math.floor(setting.chunkSize) : DEFAULT_PROGRESSIVE_CHUNK_SIZE;
1454
+ return {
1455
+ enabled: true,
1456
+ chunkSize: size
1457
+ };
1458
+ }
1459
+ return {
1460
+ enabled: false,
1461
+ chunkSize: DEFAULT_PROGRESSIVE_CHUNK_SIZE
1462
+ };
1463
+ }
1464
+ function startProgressiveApply(borders, chunkSize) {
1465
+ _class_private_field_set(this, _progressiveToken, _class_private_field_get(this, _progressiveToken) + 1);
1466
+ _class_private_field_set(this, _progressiveQueue, borders);
1467
+ _class_private_field_set(this, _progressiveIndex, 0);
1468
+ _class_private_field_set(this, _progressiveChunkSize, chunkSize);
1469
+ // One first-touch tracking Set shared across every batch (overlap-merge correctness).
1470
+ _class_private_field_set(this, _configPassTouched, new Set());
1471
+ _class_private_method_get(this, _scheduleProgressiveChunk, scheduleProgressiveChunk).call(this, _class_private_field_get(this, _progressiveToken));
1472
+ }
1473
+ function scheduleProgressiveChunk(token) {
1474
+ this.hot._registerTimeout(()=>_class_private_method_get(this, _processProgressiveChunk, processProgressiveChunk).call(this, token), 0);
1475
+ }
1476
+ function processProgressiveChunk(token) {
1477
+ if (token !== _class_private_field_get(this, _progressiveToken) || _class_private_field_get(this, _progressiveQueue) === null) {
1478
+ return;
1479
+ }
1480
+ const queue = _class_private_field_get(this, _progressiveQueue);
1481
+ const end = Math.min(_class_private_field_get(this, _progressiveIndex) + _class_private_field_get(this, _progressiveChunkSize), queue.length);
1482
+ this.createCustomBorders(queue.slice(_class_private_field_get(this, _progressiveIndex), end));
1483
+ _class_private_field_set(this, _progressiveIndex, end);
1484
+ this.hot.render();
1485
+ if (_class_private_field_get(this, _progressiveIndex) >= queue.length) {
1486
+ _class_private_method_get(this, _finishProgressiveApply, finishProgressiveApply).call(this);
1487
+ } else {
1488
+ _class_private_method_get(this, _scheduleProgressiveChunk, scheduleProgressiveChunk).call(this, token);
1489
+ }
1490
+ }
1491
+ function flushProgressiveApply() {
1492
+ if (_class_private_field_get(this, _progressiveQueue) === null) {
1493
+ return;
1494
+ }
1495
+ const queue = _class_private_field_get(this, _progressiveQueue);
1496
+ while(_class_private_field_get(this, _progressiveIndex) < queue.length){
1497
+ const end = Math.min(_class_private_field_get(this, _progressiveIndex) + _class_private_field_get(this, _progressiveChunkSize), queue.length);
1498
+ this.createCustomBorders(queue.slice(_class_private_field_get(this, _progressiveIndex), end));
1499
+ _class_private_field_set(this, _progressiveIndex, end);
1500
+ }
1501
+ _class_private_method_get(this, _finishProgressiveApply, finishProgressiveApply).call(this);
1502
+ }
1503
+ function finishProgressiveApply() {
1504
+ _class_private_field_set(this, _progressiveToken, _class_private_field_get(this, _progressiveToken) + 1);
1505
+ _class_private_field_set(this, _progressiveQueue, null);
1506
+ _class_private_field_set(this, _progressiveIndex, 0);
1507
+ _class_private_field_set(this, _configPassTouched, null);
1508
+ this.hot.runHooks('afterCustomBordersUpdate');
1509
+ }
1510
+ function cancelProgressiveApply() {
1511
+ if (_class_private_field_get(this, _progressiveQueue) === null) {
1512
+ return;
1513
+ }
1514
+ _class_private_field_set(this, _progressiveToken, _class_private_field_get(this, _progressiveToken) + 1);
1515
+ _class_private_field_set(this, _progressiveQueue, null);
1516
+ _class_private_field_set(this, _progressiveIndex, 0);
1517
+ _class_private_field_set(this, _configPassTouched, null);
736
1518
  }
737
1519
  function validateStyleSettings(customBorders) {
738
1520
  customBorders.forEach((customBorder)=>{
@@ -754,6 +1536,66 @@ The border style will be ignored.`);
754
1536
  });
755
1537
  });
756
1538
  }
1539
+ function shiftBorders(axis, mapIndex) {
1540
+ // The in-flight progressive load was already flushed from the matching `before*` hook, while the
1541
+ // queue's coordinates still matched the grid. Flushing here instead would be too late: the core
1542
+ // shifts the cell meta before it fires the `after*` hooks, so the flushed entries would write
1543
+ // their `borders` meta onto post-shift cells the configuration never targeted.
1544
+ const survivors = [];
1545
+ (0, _array.arrayEach)(this.savedBorders, (border)=>{
1546
+ const nextIndex = mapIndex(border[axis]);
1547
+ if (nextIndex === -1) {
1548
+ return;
1549
+ }
1550
+ border[axis] = nextIndex;
1551
+ border.id = (0, _utils.createId)(border.row, border.col);
1552
+ survivors.push(border);
1553
+ });
1554
+ this.savedBorders.length = 0;
1555
+ (0, _array.arrayEach)(survivors, (border)=>this.savedBorders.push(border));
1556
+ // No render here: the `afterCreate*`/`afterRemove*` hooks fire from inside `alter()`, before it
1557
+ // finishes rewriting the column/row headers, and `alter()` renders once it is done. Forcing a
1558
+ // render mid-`alter()` paints a header row the closing render then treats as up to date, so the
1559
+ // labels stay bound to their pre-insert columns while the new column is appended at the end -
1560
+ // clicking a header then selects a different column than the one the label sits on (#11031).
1561
+ _class_private_method_get(this, _rebuildWorkingSetFromModel, rebuildWorkingSetFromModel).call(this, false);
1562
+ }
1563
+ function applyMoveSnapshot(axis, snapshot, toVisualIndex) {
1564
+ (0, _array.arrayEach)(this.savedBorders, (border, index)=>{
1565
+ const physicalIndex = snapshot[index];
1566
+ if (typeof physicalIndex !== 'number') {
1567
+ return;
1568
+ }
1569
+ const visualIndex = toVisualIndex(physicalIndex);
1570
+ if (typeof visualIndex !== 'number') {
1571
+ return;
1572
+ }
1573
+ border[axis] = visualIndex;
1574
+ border.id = (0, _utils.createId)(border.row, border.col);
1575
+ });
1576
+ _class_private_method_get(this, _rebuildWorkingSetFromModel, rebuildWorkingSetFromModel).call(this);
1577
+ }
1578
+ function rebuildWorkingSetFromModel(render = true) {
1579
+ _class_private_method_get(this, _rebuildSavedBordersIndex, rebuildSavedBordersIndex).call(this);
1580
+ _class_private_field_set(this, _bordersByRowDirty, true);
1581
+ _class_private_method_get(this, _destroyAllSelections, destroyAllSelections).call(this);
1582
+ if (render) {
1583
+ this.hot.render();
1584
+ }
1585
+ }
1586
+ function destroyBorderSelection(borderId) {
1587
+ const customSelection = _class_private_field_get(this, _customSelectionsCache).get(borderId);
1588
+ if (!customSelection) {
1589
+ return;
1590
+ }
1591
+ const { customSelections } = this.hot.selection.highlight;
1592
+ const index = customSelections.indexOf(customSelection);
1593
+ if (index > -1) {
1594
+ customSelections.splice(index, 1);
1595
+ }
1596
+ customSelection.destroy();
1597
+ _class_private_field_get(this, _customSelectionsCache).delete(borderId);
1598
+ }
757
1599
  function onAfterContextMenuDefaultOptions(rawOptions) {
758
1600
  if (!this.hot.getSettings()[PLUGIN_KEY]) {
759
1601
  return;
@@ -795,5 +1637,24 @@ function onAfterContextMenuDefaultOptions(rawOptions) {
795
1637
  });
796
1638
  }
797
1639
  function onAfterInit() {
798
- this.changeBorderSettings();
1640
+ this.changeBorderSettings(false);
1641
+ if (this.savedBorders.length > 0) {
1642
+ this.hot.addHookOnce('afterInit', ()=>this.hot.render());
1643
+ }
1644
+ }
1645
+ function scheduleMetaSyncRender() {
1646
+ if (_class_private_field_get(this, _isMetaSyncRenderScheduled)) {
1647
+ return;
1648
+ }
1649
+ _class_private_field_set(this, _isMetaSyncRenderScheduled, true);
1650
+ this.hot._registerMicrotask(()=>{
1651
+ _class_private_field_set(this, _isMetaSyncRenderScheduled, false);
1652
+ this.hot.render();
1653
+ });
1654
+ }
1655
+ function flushBeforeStructuralChange(source) {
1656
+ if (source === 'auto') {
1657
+ return;
1658
+ }
1659
+ _class_private_method_get(this, _flushProgressiveApply, flushProgressiveApply).call(this);
799
1660
  }