handsontable 19.0.0-rc8 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/3rdparty/walkontable/src/overlay/scrollbarProxies.js +3 -1
  2. package/3rdparty/walkontable/src/overlay/scrollbarProxies.mjs +3 -1
  3. package/CHANGELOG.md +5 -4
  4. package/README.md +11 -4
  5. package/base.js +2 -2
  6. package/base.mjs +2 -2
  7. package/core/hooks/constants.d.ts +2 -0
  8. package/core/hooks/constants.js +15 -6
  9. package/core/hooks/constants.mjs +15 -6
  10. package/core/license.js +2 -2
  11. package/core/license.mjs +2 -2
  12. package/core/types.d.ts +1 -0
  13. package/core.js +51 -4
  14. package/core.mjs +51 -4
  15. package/dataMap/metaManager/metaSchema.js +1 -0
  16. package/dataMap/metaManager/metaSchema.mjs +1 -0
  17. package/dist/handsontable.full.js +299 -121
  18. package/dist/handsontable.full.min.js +24 -24
  19. package/dist/handsontable.js +299 -121
  20. package/dist/handsontable.min.js +24 -24
  21. package/dist/handsontable.settings-schema.js +23 -13
  22. package/dist/handsontable.settings-schema.min.js +2 -2
  23. package/dist/manifest.json +1 -71
  24. package/dist/themes/classic.js +2 -2
  25. package/dist/themes/classic.min.js +2 -2
  26. package/dist/themes/horizon.js +2 -2
  27. package/dist/themes/horizon.min.js +2 -2
  28. package/dist/themes/main.js +2 -2
  29. package/dist/themes/main.min.js +2 -2
  30. package/dist/themes/static/variables/colors/ant.js +2 -2
  31. package/dist/themes/static/variables/colors/ant.min.js +2 -2
  32. package/dist/themes/static/variables/colors/classic.js +2 -2
  33. package/dist/themes/static/variables/colors/classic.min.js +2 -2
  34. package/dist/themes/static/variables/colors/horizon.js +2 -2
  35. package/dist/themes/static/variables/colors/horizon.min.js +2 -2
  36. package/dist/themes/static/variables/colors/main.js +2 -2
  37. package/dist/themes/static/variables/colors/main.min.js +2 -2
  38. package/dist/themes/static/variables/colors/material.js +2 -2
  39. package/dist/themes/static/variables/colors/material.min.js +2 -2
  40. package/dist/themes/static/variables/colors/shadcn.js +2 -2
  41. package/dist/themes/static/variables/colors/shadcn.min.js +2 -2
  42. package/dist/themes/static/variables/density.js +2 -2
  43. package/dist/themes/static/variables/density.min.js +2 -2
  44. package/dist/themes/static/variables/helpers/iconStyles.js +2 -2
  45. package/dist/themes/static/variables/helpers/iconStyles.min.js +2 -2
  46. package/dist/themes/static/variables/helpers/iconsMap.js +2 -2
  47. package/dist/themes/static/variables/helpers/iconsMap.min.js +2 -2
  48. package/dist/themes/static/variables/icons/horizon.js +2 -2
  49. package/dist/themes/static/variables/icons/horizon.min.js +2 -2
  50. package/dist/themes/static/variables/icons/main.js +2 -2
  51. package/dist/themes/static/variables/icons/main.min.js +2 -2
  52. package/dist/themes/static/variables/sizing.js +2 -2
  53. package/dist/themes/static/variables/sizing.min.js +2 -2
  54. package/dist/themes/static/variables/tokens/classic.js +2 -2
  55. package/dist/themes/static/variables/tokens/classic.min.js +2 -2
  56. package/dist/themes/static/variables/tokens/horizon.js +2 -2
  57. package/dist/themes/static/variables/tokens/horizon.min.js +2 -2
  58. package/dist/themes/static/variables/tokens/main.js +2 -2
  59. package/dist/themes/static/variables/tokens/main.min.js +2 -2
  60. package/helpers/mixed.js +5 -5
  61. package/helpers/mixed.mjs +5 -5
  62. package/package.json +1 -1
  63. package/plugins/asyncValues/feature.generated.js +0 -1
  64. package/plugins/asyncValues/feature.generated.mjs +0 -1
  65. package/plugins/autoColumnSize/autoColumnSize.js +3 -3
  66. package/plugins/autoColumnSize/autoColumnSize.mjs +3 -3
  67. package/plugins/autoColumnSize/feature.generated.js +0 -1
  68. package/plugins/autoColumnSize/feature.generated.mjs +0 -1
  69. package/plugins/autoLink/feature.generated.js +0 -1
  70. package/plugins/autoLink/feature.generated.mjs +0 -1
  71. package/plugins/autoRowHeaderSize/feature.generated.js +0 -1
  72. package/plugins/autoRowHeaderSize/feature.generated.mjs +0 -1
  73. package/plugins/autoRowSize/autoRowSize.js +5 -5
  74. package/plugins/autoRowSize/autoRowSize.mjs +5 -5
  75. package/plugins/autoRowSize/feature.generated.js +0 -1
  76. package/plugins/autoRowSize/feature.generated.mjs +0 -1
  77. package/plugins/autofill/feature.generated.js +0 -1
  78. package/plugins/autofill/feature.generated.mjs +0 -1
  79. package/plugins/base/base.d.ts +8 -1
  80. package/plugins/bindRowsWithHeaders/feature.generated.js +0 -1
  81. package/plugins/bindRowsWithHeaders/feature.generated.mjs +0 -1
  82. package/plugins/checkboxHeader/feature.generated.js +0 -1
  83. package/plugins/checkboxHeader/feature.generated.mjs +0 -1
  84. package/plugins/collapsibleColumns/feature.generated.js +0 -1
  85. package/plugins/collapsibleColumns/feature.generated.mjs +0 -1
  86. package/plugins/columnSorting/feature.generated.js +0 -1
  87. package/plugins/columnSorting/feature.generated.mjs +0 -1
  88. package/plugins/columnSummary/feature.generated.js +0 -1
  89. package/plugins/columnSummary/feature.generated.mjs +0 -1
  90. package/plugins/comments/feature.generated.js +0 -1
  91. package/plugins/comments/feature.generated.mjs +0 -1
  92. package/plugins/contextMenu/feature.generated.js +0 -1
  93. package/plugins/contextMenu/feature.generated.mjs +0 -1
  94. package/plugins/copyPaste/feature.generated.js +0 -1
  95. package/plugins/copyPaste/feature.generated.mjs +0 -1
  96. package/plugins/customBorders/feature.generated.js +0 -1
  97. package/plugins/customBorders/feature.generated.mjs +0 -1
  98. package/plugins/dataProvider/feature.generated.js +0 -1
  99. package/plugins/dataProvider/feature.generated.mjs +0 -1
  100. package/plugins/dialog/feature.generated.js +0 -1
  101. package/plugins/dialog/feature.generated.mjs +0 -1
  102. package/plugins/dragToScroll/feature.generated.js +0 -1
  103. package/plugins/dragToScroll/feature.generated.mjs +0 -1
  104. package/plugins/dropdownMenu/feature.generated.js +0 -1
  105. package/plugins/dropdownMenu/feature.generated.mjs +0 -1
  106. package/plugins/emptyDataState/feature.generated.js +0 -1
  107. package/plugins/emptyDataState/feature.generated.mjs +0 -1
  108. package/plugins/exportFile/feature.generated.js +0 -1
  109. package/plugins/exportFile/feature.generated.mjs +0 -1
  110. package/plugins/filters/feature.generated.js +0 -1
  111. package/plugins/filters/feature.generated.mjs +0 -1
  112. package/plugins/formulaBuilder/feature.generated.js +0 -1
  113. package/plugins/formulaBuilder/feature.generated.mjs +0 -1
  114. package/plugins/formulas/feature.generated.js +0 -1
  115. package/plugins/formulas/feature.generated.mjs +0 -1
  116. package/plugins/formulas/formulas.js +4 -4
  117. package/plugins/formulas/formulas.mjs +4 -4
  118. package/plugins/freezeBar/feature.generated.js +0 -1
  119. package/plugins/freezeBar/feature.generated.mjs +0 -1
  120. package/plugins/hiddenColumns/feature.generated.js +0 -1
  121. package/plugins/hiddenColumns/feature.generated.mjs +0 -1
  122. package/plugins/hiddenRows/feature.generated.js +0 -1
  123. package/plugins/hiddenRows/feature.generated.mjs +0 -1
  124. package/plugins/importFile/feature.generated.js +0 -1
  125. package/plugins/importFile/feature.generated.mjs +0 -1
  126. package/plugins/loading/feature.generated.js +0 -1
  127. package/plugins/loading/feature.generated.mjs +0 -1
  128. package/plugins/manualColumnFreeze/feature.generated.js +0 -1
  129. package/plugins/manualColumnFreeze/feature.generated.mjs +0 -1
  130. package/plugins/manualColumnMove/feature.generated.js +0 -1
  131. package/plugins/manualColumnMove/feature.generated.mjs +0 -1
  132. package/plugins/manualColumnResize/feature.generated.js +0 -1
  133. package/plugins/manualColumnResize/feature.generated.mjs +0 -1
  134. package/plugins/manualRowMove/feature.generated.js +0 -1
  135. package/plugins/manualRowMove/feature.generated.mjs +0 -1
  136. package/plugins/manualRowResize/feature.generated.js +0 -1
  137. package/plugins/manualRowResize/feature.generated.mjs +0 -1
  138. package/plugins/mergeCells/feature.generated.js +0 -1
  139. package/plugins/mergeCells/feature.generated.mjs +0 -1
  140. package/plugins/mergeCells/mergeCells.js +159 -16
  141. package/plugins/mergeCells/mergeCells.mjs +159 -16
  142. package/plugins/moveCells/feature.generated.js +0 -1
  143. package/plugins/moveCells/feature.generated.mjs +0 -1
  144. package/plugins/multiColumnSorting/feature.generated.js +0 -1
  145. package/plugins/multiColumnSorting/feature.generated.mjs +0 -1
  146. package/plugins/nestedHeaders/feature.generated.js +0 -1
  147. package/plugins/nestedHeaders/feature.generated.mjs +0 -1
  148. package/plugins/nestedRows/feature.generated.js +0 -1
  149. package/plugins/nestedRows/feature.generated.mjs +0 -1
  150. package/plugins/notification/feature.generated.js +0 -1
  151. package/plugins/notification/feature.generated.mjs +0 -1
  152. package/plugins/pagination/feature.generated.js +0 -1
  153. package/plugins/pagination/feature.generated.mjs +0 -1
  154. package/plugins/pagination/pagination.js +17 -4
  155. package/plugins/pagination/pagination.mjs +17 -4
  156. package/plugins/rowSelection/feature.generated.js +0 -1
  157. package/plugins/rowSelection/feature.generated.mjs +0 -1
  158. package/plugins/search/feature.generated.js +0 -1
  159. package/plugins/search/feature.generated.mjs +0 -1
  160. package/plugins/selectionHandles/feature.generated.js +0 -1
  161. package/plugins/selectionHandles/feature.generated.mjs +0 -1
  162. package/plugins/sheetsBar/feature.generated.js +0 -1
  163. package/plugins/sheetsBar/feature.generated.mjs +0 -1
  164. package/plugins/stretchColumns/feature.generated.js +0 -1
  165. package/plugins/stretchColumns/feature.generated.mjs +0 -1
  166. package/plugins/trimRows/feature.generated.js +0 -1
  167. package/plugins/trimRows/feature.generated.mjs +0 -1
  168. package/plugins/undoRedo/feature.generated.js +0 -1
  169. package/plugins/undoRedo/feature.generated.mjs +0 -1
  170. package/plugins/undoRedo/restore.js +20 -8
  171. package/plugins/undoRedo/restore.mjs +20 -8
  172. package/plugins/undoRedo/snapshot/gridState.d.ts +5 -1
  173. package/plugins/undoRedo/snapshot/gridState.js +5 -2
  174. package/plugins/undoRedo/snapshot/gridState.mjs +5 -2
  175. package/plugins/viewState/feature.generated.js +0 -1
  176. package/plugins/viewState/feature.generated.mjs +0 -1
  177. package/styles/handsontable.css +2 -2
  178. package/styles/handsontable.min.css +2 -2
  179. package/styles/handsontableStyles.d.ts +1 -1
  180. package/styles/handsontableStyles.js +1 -1
  181. package/styles/handsontableStyles.mjs +1 -1
  182. package/styles/ht-icons-horizon.min.css +2 -2
  183. package/styles/ht-icons-main.min.css +2 -2
  184. package/styles/ht-theme-classic-no-icons.min.css +2 -2
  185. package/styles/ht-theme-classic.min.css +2 -2
  186. package/styles/ht-theme-horizon-no-icons.min.css +2 -2
  187. package/styles/ht-theme-horizon.min.css +2 -2
  188. package/styles/ht-theme-main-no-icons.min.css +2 -2
  189. package/styles/ht-theme-main.min.css +2 -2
  190. package/utils/licenseBranding/index.js +5 -4
  191. package/utils/licenseBranding/index.mjs +5 -4
  192. package/utils/licenseNotification.js +2 -2
  193. package/utils/licenseNotification.mjs +2 -2
  194. package/utils/xlsxEngine/licenseCapabilities.generated.js +0 -4
  195. package/utils/xlsxEngine/licenseCapabilities.generated.mjs +0 -4
@@ -6,7 +6,6 @@ export const LICENSE = Object.freeze({
6
6
  name: 'Nested rows',
7
7
  gate: 'enable',
8
8
  tiers: Object.freeze([
9
- 'standard',
10
9
  'professional'
11
10
  ])
12
11
  });
@@ -14,7 +14,6 @@ const LICENSE = Object.freeze({
14
14
  name: 'Notifications',
15
15
  gate: 'enable',
16
16
  tiers: Object.freeze([
17
- 'standard',
18
17
  'professional'
19
18
  ])
20
19
  });
@@ -6,7 +6,6 @@ export const LICENSE = Object.freeze({
6
6
  name: 'Notifications',
7
7
  gate: 'enable',
8
8
  tiers: Object.freeze([
9
- 'standard',
10
9
  'professional'
11
10
  ])
12
11
  });
@@ -14,7 +14,6 @@ const LICENSE = Object.freeze({
14
14
  name: 'Pagination',
15
15
  gate: 'enable',
16
16
  tiers: Object.freeze([
17
- 'standard',
18
17
  'professional'
19
18
  ])
20
19
  });
@@ -6,7 +6,6 @@ export const LICENSE = Object.freeze({
6
6
  name: 'Pagination',
7
7
  gate: 'enable',
8
8
  tiers: Object.freeze([
9
- 'standard',
10
9
  'professional'
11
10
  ])
12
11
  });
@@ -218,6 +218,9 @@ var /**
218
218
  * Updates the visibility state of the pagination sections based on the current settings.
219
219
  */ _updateSectionsVisibilityState = /*#__PURE__*/ new WeakSet(), /**
220
220
  * Applies the current pagination state to the internal index mapper and updates the UI.
221
+ *
222
+ * @param {boolean} [firesExecutionHooks=true] `false` for the recompute an `'auto'` page size does on each
223
+ * render, which stores the paged rows with no execution hooks fired.
221
224
  */ _computeAndApplyState = /*#__PURE__*/ new WeakSet(), /**
222
225
  * Registers the focus scope for the pagination plugin.
223
226
  */ _registerFocusScope = /*#__PURE__*/ new WeakSet(), /**
@@ -991,7 +994,10 @@ class Pagination extends _base.BasePlugin {
991
994
  return;
992
995
  }
993
996
  _class_private_field_set(this, _internalRenderCall, true);
994
- _class_private_method_get(this, _refreshUI, refreshUI).call(this);
997
+ // Only the recompute is silent. The render that follows runs listeners, and a page change one of them
998
+ // asks for fires the execution hooks.
999
+ _class_private_method_get(this, _computeAndApplyState, computeAndApplyState).call(this, false);
1000
+ this.hot.render();
995
1001
  }), _class_private_field_set(this, _onAfterRender, ()=>{
996
1002
  const holder = this.hot.view._wt.wtTable.holder;
997
1003
  _class_private_field_get(this, _ui1)?.syncEmptyBodyReserve(holder, _class_private_method_get(this, _shouldReserveEmptyBody, shouldReserveEmptyBody).call(this, holder));
@@ -1067,7 +1073,7 @@ function updateSectionsVisibilityState() {
1067
1073
  this.hidePageNavigationSection();
1068
1074
  }
1069
1075
  }
1070
- function computeAndApplyState() {
1076
+ function computeAndApplyState(firesExecutionHooks = true) {
1071
1077
  _class_private_field_set(this, _internalExecutionCall, true);
1072
1078
  _class_private_field_get(this, _pagedRowsMap)?.clear();
1073
1079
  const renderableIndexes = this.hot.rowIndexMapper.getRenderableIndexes();
@@ -1112,9 +1118,16 @@ function computeAndApplyState() {
1112
1118
  }
1113
1119
  }
1114
1120
  if (!externalPagedMode && renderableIndexes.length > 0) {
1115
- this.hot.batchExecution(()=>{
1121
+ const storePagedRows = ()=>{
1116
1122
  renderableIndexes.forEach((index)=>_class_private_field_get(this, _pagedRowsMap)?.setValueAtIndex(index, true));
1117
- }, true);
1123
+ };
1124
+ // The recompute an `'auto'` page size does on each render is bookkeeping, like the sizes the auto-size
1125
+ // plugins store there, so it fires no execution hooks. A page change a caller asks for still does.
1126
+ if (firesExecutionHooks) {
1127
+ this.hot.batchExecution(storePagedRows, true);
1128
+ } else {
1129
+ this.hot._batchExecutionWithoutHooks(storePagedRows, true);
1130
+ }
1118
1131
  } else if (!externalPagedMode) {
1119
1132
  this.hot.rowIndexMapper.updateCache(true);
1120
1133
  }
@@ -197,6 +197,9 @@ var /**
197
197
  * Updates the visibility state of the pagination sections based on the current settings.
198
198
  */ _updateSectionsVisibilityState = /*#__PURE__*/ new WeakSet(), /**
199
199
  * Applies the current pagination state to the internal index mapper and updates the UI.
200
+ *
201
+ * @param {boolean} [firesExecutionHooks=true] `false` for the recompute an `'auto'` page size does on each
202
+ * render, which stores the paged rows with no execution hooks fired.
200
203
  */ _computeAndApplyState = /*#__PURE__*/ new WeakSet(), /**
201
204
  * Registers the focus scope for the pagination plugin.
202
205
  */ _registerFocusScope = /*#__PURE__*/ new WeakSet(), /**
@@ -1042,7 +1045,10 @@ var /**
1042
1045
  return;
1043
1046
  }
1044
1047
  _class_private_field_set(this, _internalRenderCall, true);
1045
- _class_private_method_get(this, _refreshUI, refreshUI).call(this);
1048
+ // Only the recompute is silent. The render that follows runs listeners, and a page change one of them
1049
+ // asks for fires the execution hooks.
1050
+ _class_private_method_get(this, _computeAndApplyState, computeAndApplyState).call(this, false);
1051
+ this.hot.render();
1046
1052
  }), _class_private_field_set(this, _onAfterRender, ()=>{
1047
1053
  const holder = this.hot.view._wt.wtTable.holder;
1048
1054
  _class_private_field_get(this, _ui)?.syncEmptyBodyReserve(holder, _class_private_method_get(this, _shouldReserveEmptyBody, shouldReserveEmptyBody).call(this, holder));
@@ -1118,7 +1124,7 @@ function updateSectionsVisibilityState() {
1118
1124
  this.hidePageNavigationSection();
1119
1125
  }
1120
1126
  }
1121
- function computeAndApplyState() {
1127
+ function computeAndApplyState(firesExecutionHooks = true) {
1122
1128
  _class_private_field_set(this, _internalExecutionCall, true);
1123
1129
  _class_private_field_get(this, _pagedRowsMap)?.clear();
1124
1130
  const renderableIndexes = this.hot.rowIndexMapper.getRenderableIndexes();
@@ -1163,9 +1169,16 @@ function computeAndApplyState() {
1163
1169
  }
1164
1170
  }
1165
1171
  if (!externalPagedMode && renderableIndexes.length > 0) {
1166
- this.hot.batchExecution(()=>{
1172
+ const storePagedRows = ()=>{
1167
1173
  renderableIndexes.forEach((index)=>_class_private_field_get(this, _pagedRowsMap)?.setValueAtIndex(index, true));
1168
- }, true);
1174
+ };
1175
+ // The recompute an `'auto'` page size does on each render is bookkeeping, like the sizes the auto-size
1176
+ // plugins store there, so it fires no execution hooks. A page change a caller asks for still does.
1177
+ if (firesExecutionHooks) {
1178
+ this.hot.batchExecution(storePagedRows, true);
1179
+ } else {
1180
+ this.hot._batchExecutionWithoutHooks(storePagedRows, true);
1181
+ }
1169
1182
  } else if (!externalPagedMode) {
1170
1183
  this.hot.rowIndexMapper.updateCache(true);
1171
1184
  }
@@ -14,7 +14,6 @@ const LICENSE = Object.freeze({
14
14
  name: 'Row selection',
15
15
  gate: 'enable',
16
16
  tiers: Object.freeze([
17
- 'standard',
18
17
  'professional'
19
18
  ])
20
19
  });
@@ -6,7 +6,6 @@ export const LICENSE = Object.freeze({
6
6
  name: 'Row selection',
7
7
  gate: 'enable',
8
8
  tiers: Object.freeze([
9
- 'standard',
10
9
  'professional'
11
10
  ])
12
11
  });
@@ -14,7 +14,6 @@ const LICENSE = Object.freeze({
14
14
  name: 'Search',
15
15
  gate: 'enable',
16
16
  tiers: Object.freeze([
17
- 'standard',
18
17
  'professional'
19
18
  ])
20
19
  });
@@ -6,7 +6,6 @@ export const LICENSE = Object.freeze({
6
6
  name: 'Search',
7
7
  gate: 'enable',
8
8
  tiers: Object.freeze([
9
- 'standard',
10
9
  'professional'
11
10
  ])
12
11
  });
@@ -14,7 +14,6 @@ const LICENSE = Object.freeze({
14
14
  name: 'Selection handles',
15
15
  gate: 'enable',
16
16
  tiers: Object.freeze([
17
- 'standard',
18
17
  'professional'
19
18
  ])
20
19
  });
@@ -6,7 +6,6 @@ export const LICENSE = Object.freeze({
6
6
  name: 'Selection handles',
7
7
  gate: 'enable',
8
8
  tiers: Object.freeze([
9
- 'standard',
10
9
  'professional'
11
10
  ])
12
11
  });
@@ -14,7 +14,6 @@ const LICENSE = Object.freeze({
14
14
  name: 'Sheets bar',
15
15
  gate: 'enable',
16
16
  tiers: Object.freeze([
17
- 'standard',
18
17
  'professional'
19
18
  ])
20
19
  });
@@ -6,7 +6,6 @@ export const LICENSE = Object.freeze({
6
6
  name: 'Sheets bar',
7
7
  gate: 'enable',
8
8
  tiers: Object.freeze([
9
- 'standard',
10
9
  'professional'
11
10
  ])
12
11
  });
@@ -14,7 +14,6 @@ const LICENSE = Object.freeze({
14
14
  name: 'Column stretching',
15
15
  gate: 'enable',
16
16
  tiers: Object.freeze([
17
- 'standard',
18
17
  'professional'
19
18
  ])
20
19
  });
@@ -6,7 +6,6 @@ export const LICENSE = Object.freeze({
6
6
  name: 'Column stretching',
7
7
  gate: 'enable',
8
8
  tiers: Object.freeze([
9
- 'standard',
10
9
  'professional'
11
10
  ])
12
11
  });
@@ -14,7 +14,6 @@ const LICENSE = Object.freeze({
14
14
  name: 'Trim rows',
15
15
  gate: 'enable',
16
16
  tiers: Object.freeze([
17
- 'standard',
18
17
  'professional'
19
18
  ])
20
19
  });
@@ -6,7 +6,6 @@ export const LICENSE = Object.freeze({
6
6
  name: 'Trim rows',
7
7
  gate: 'enable',
8
8
  tiers: Object.freeze([
9
- 'standard',
10
9
  'professional'
11
10
  ])
12
11
  });
@@ -14,7 +14,6 @@ const LICENSE = Object.freeze({
14
14
  name: 'Undo and redo',
15
15
  gate: 'enable',
16
16
  tiers: Object.freeze([
17
- 'standard',
18
17
  'professional'
19
18
  ])
20
19
  });
@@ -6,7 +6,6 @@ export const LICENSE = Object.freeze({
6
6
  name: 'Undo and redo',
7
7
  gate: 'enable',
8
8
  tiers: Object.freeze([
9
- 'standard',
10
9
  'professional'
11
10
  ])
12
11
  });
@@ -153,16 +153,26 @@ const _restoredCells = require("./restoredCells");
153
153
  return kept;
154
154
  }
155
155
  /**
156
- * Puts back the flags `readKeptFlags()` read, moved through the step's row and column changes to the
157
- * grid the restore leaves behind. A row the step inserted is never flagged by them.
156
+ * Returns a function that maps a physical index of the other side of a step to the grid the restore leaves
157
+ * behind, through the step's row and column changes. It answers `null` for a row or column that does not exist
158
+ * there.
158
159
  *
159
- * @param {HotInstance} hot The Handsontable instance.
160
- * @param {KeptFlags[]} kept The flags.
161
160
  * @param {JournalOp[]} journal The step journal.
162
161
  * @param {RestoreDirection} direction The replay direction.
163
- */ function applyKeptFlags(hot, kept, journal, direction) {
162
+ * @returns {Function}
163
+ */ function createRestoredIndexMapper(journal, direction) {
164
164
  // An undo leaves the grid as it was before the step, so every entry is reversed; a redo applies them all.
165
165
  const fromEntry = direction === 'undo' ? journal.length : -1;
166
+ return (physicalIndex, axis)=>(0, _restoredCells.toFinalIndex)(journal, fromEntry, physicalIndex, axis, direction);
167
+ }
168
+ /**
169
+ * Puts back the flags `readKeptFlags()` read, moved through the step's row and column changes to the
170
+ * grid the restore leaves behind. A row the step inserted is never flagged by them.
171
+ *
172
+ * @param {HotInstance} hot The Handsontable instance.
173
+ * @param {KeptFlags[]} kept The flags.
174
+ * @param {Function} toRestoredIndex Maps a physical index to the restored grid (`createRestoredIndexMapper()`).
175
+ */ function applyKeptFlags(hot, kept, toRestoredIndex) {
166
176
  kept.forEach(({ axis, key, name, physicalIndexes, restoredIndexes })=>{
167
177
  const mapper = axis === 'row' ? hot.rowIndexMapper : hot.columnIndexMapper;
168
178
  const map = (key === 'trimming' ? mapper.trimmingMapsCollection : mapper.hidingMapsCollection).get(name);
@@ -172,7 +182,7 @@ const _restoredCells = require("./restoredCells");
172
182
  const length = mapper.getNumberOfIndexes();
173
183
  const values = new Array(length).fill(false);
174
184
  physicalIndexes.forEach((physicalIndex)=>{
175
- const finalIndex = (0, _restoredCells.toFinalIndex)(journal, fromEntry, physicalIndex, axis, direction);
185
+ const finalIndex = toRestoredIndex(physicalIndex, axis);
176
186
  if (finalIndex !== null && finalIndex < length) {
177
187
  values[finalIndex] = true;
178
188
  }
@@ -673,14 +683,16 @@ function restoreStep(hot, tracker, record, direction) {
673
683
  return false;
674
684
  }
675
685
  announceRowChanges(hot, rowChanges, source);
686
+ const toRestoredIndex = createRestoredIndexMapper(record.journal, direction);
676
687
  // Only what the step changed is written back, so a change made outside any step since survives.
677
688
  tracker.restore(target, {
678
689
  changedFrom: other,
679
690
  base: current,
680
691
  forceOrder: reordersForReplay,
681
- direction
692
+ direction,
693
+ toRestoredIndex: reordersForReplay ? toRestoredIndex : undefined
682
694
  });
683
- applyKeptFlags(hot, keptFlags, record.journal, direction);
695
+ applyKeptFlags(hot, keptFlags, toRestoredIndex);
684
696
  // A full render when the batch ends. A step that changed only cell meta asks for none itself, and
685
697
  // the fast draw the batch ends with would keep every cell as it was painted.
686
698
  hot.render();
@@ -135,16 +135,26 @@ import { toFinalIndex } from './restoredCells.mjs';
135
135
  return kept;
136
136
  }
137
137
  /**
138
- * Puts back the flags `readKeptFlags()` read, moved through the step's row and column changes to the
139
- * grid the restore leaves behind. A row the step inserted is never flagged by them.
138
+ * Returns a function that maps a physical index of the other side of a step to the grid the restore leaves
139
+ * behind, through the step's row and column changes. It answers `null` for a row or column that does not exist
140
+ * there.
140
141
  *
141
- * @param {HotInstance} hot The Handsontable instance.
142
- * @param {KeptFlags[]} kept The flags.
143
142
  * @param {JournalOp[]} journal The step journal.
144
143
  * @param {RestoreDirection} direction The replay direction.
145
- */ function applyKeptFlags(hot, kept, journal, direction) {
144
+ * @returns {Function}
145
+ */ function createRestoredIndexMapper(journal, direction) {
146
146
  // An undo leaves the grid as it was before the step, so every entry is reversed; a redo applies them all.
147
147
  const fromEntry = direction === 'undo' ? journal.length : -1;
148
+ return (physicalIndex, axis)=>toFinalIndex(journal, fromEntry, physicalIndex, axis, direction);
149
+ }
150
+ /**
151
+ * Puts back the flags `readKeptFlags()` read, moved through the step's row and column changes to the
152
+ * grid the restore leaves behind. A row the step inserted is never flagged by them.
153
+ *
154
+ * @param {HotInstance} hot The Handsontable instance.
155
+ * @param {KeptFlags[]} kept The flags.
156
+ * @param {Function} toRestoredIndex Maps a physical index to the restored grid (`createRestoredIndexMapper()`).
157
+ */ function applyKeptFlags(hot, kept, toRestoredIndex) {
148
158
  kept.forEach(({ axis, key, name, physicalIndexes, restoredIndexes })=>{
149
159
  const mapper = axis === 'row' ? hot.rowIndexMapper : hot.columnIndexMapper;
150
160
  const map = (key === 'trimming' ? mapper.trimmingMapsCollection : mapper.hidingMapsCollection).get(name);
@@ -154,7 +164,7 @@ import { toFinalIndex } from './restoredCells.mjs';
154
164
  const length = mapper.getNumberOfIndexes();
155
165
  const values = new Array(length).fill(false);
156
166
  physicalIndexes.forEach((physicalIndex)=>{
157
- const finalIndex = toFinalIndex(journal, fromEntry, physicalIndex, axis, direction);
167
+ const finalIndex = toRestoredIndex(physicalIndex, axis);
158
168
  if (finalIndex !== null && finalIndex < length) {
159
169
  values[finalIndex] = true;
160
170
  }
@@ -687,14 +697,16 @@ import { toFinalIndex } from './restoredCells.mjs';
687
697
  return false;
688
698
  }
689
699
  announceRowChanges(hot, rowChanges, source);
700
+ const toRestoredIndex = createRestoredIndexMapper(record.journal, direction);
690
701
  // Only what the step changed is written back, so a change made outside any step since survives.
691
702
  tracker.restore(target, {
692
703
  changedFrom: other,
693
704
  base: current,
694
705
  forceOrder: reordersForReplay,
695
- direction
706
+ direction,
707
+ toRestoredIndex: reordersForReplay ? toRestoredIndex : undefined
696
708
  });
697
- applyKeptFlags(hot, keptFlags, record.journal, direction);
709
+ applyKeptFlags(hot, keptFlags, toRestoredIndex);
698
710
  // A full render when the batch ends. A step that changed only cell meta asks for none itself, and
699
711
  // the fast draw the batch ends with would keep every cell as it was painted.
700
712
  hot.render();
@@ -1,4 +1,5 @@
1
1
  import type { HotInstance } from '../../../core/types';
2
+ import type { PluginRestoreContext } from '../../base';
2
3
  import { type IndexMapperSnapshot } from '../../../translations/indexMapperSnapshot';
3
4
  /**
4
5
  * The table settings an action can change without going through a plugin: `alter()` shifts the
@@ -84,12 +85,15 @@ export declare class GridStateTracker {
84
85
  * @param {boolean} [options.forceOrder=false] Write the row and column order and the trimming maps back
85
86
  * even when the step did not change them – a replay reset them to the physical order.
86
87
  * @param {string} [options.direction] `'undo'` or `'redo'`, handed to the plugins with `changedFrom`.
88
+ * @param {Function} [options.toRestoredIndex] Maps a physical index of `changedFrom` to the restored grid,
89
+ * handed to the plugins with `changedFrom` when `forceOrder` is set.
87
90
  */
88
- restore(snapshot: GridStateSnapshot, { changedFrom, base, forceOrder, direction }?: {
91
+ restore(snapshot: GridStateSnapshot, { changedFrom, base, forceOrder, direction, toRestoredIndex }?: {
89
92
  changedFrom?: GridStateSnapshot;
90
93
  base?: GridStateSnapshot;
91
94
  forceOrder?: boolean;
92
95
  direction?: 'undo' | 'redo';
96
+ toRestoredIndex?: PluginRestoreContext['toRestoredIndex'];
93
97
  }): void;
94
98
  /**
95
99
  * Resets the row and column order to the identity and lifts every trim, so a visual index names
@@ -219,7 +219,9 @@ class GridStateTracker {
219
219
  * @param {boolean} [options.forceOrder=false] Write the row and column order and the trimming maps back
220
220
  * even when the step did not change them – a replay reset them to the physical order.
221
221
  * @param {string} [options.direction] `'undo'` or `'redo'`, handed to the plugins with `changedFrom`.
222
- */ restore(snapshot, { changedFrom, base, forceOrder = false, direction } = {}) {
222
+ * @param {Function} [options.toRestoredIndex] Maps a physical index of `changedFrom` to the restored grid,
223
+ * handed to the plugins with `changedFrom` when `forceOrder` is set.
224
+ */ restore(snapshot, { changedFrom, base, forceOrder = false, direction, toRestoredIndex } = {}) {
223
225
  // Each axis takes the length the data implies, the one `updateData()` fits it to. With no source
224
226
  // rows the data implies no column count (plain arrays count the columns in the first row), while
225
227
  // the grid keeps its columns – the replay left them where the step recorded them.
@@ -242,7 +244,8 @@ class GridStateTracker {
242
244
  plugin.restoreState(state, changedFrom === undefined ? undefined : {
243
245
  other: changedFrom.plugins.get(name),
244
246
  direction,
245
- reordered: forceOrder
247
+ reordered: forceOrder,
248
+ toRestoredIndex
246
249
  });
247
250
  } else if (forceOrder && base?.plugins.has(name)) {
248
251
  // The step left this state alone, but the row and column replay may have moved it (a merge
@@ -211,7 +211,9 @@ var /**
211
211
  * @param {boolean} [options.forceOrder=false] Write the row and column order and the trimming maps back
212
212
  * even when the step did not change them – a replay reset them to the physical order.
213
213
  * @param {string} [options.direction] `'undo'` or `'redo'`, handed to the plugins with `changedFrom`.
214
- */ restore(snapshot, { changedFrom, base, forceOrder = false, direction } = {}) {
214
+ * @param {Function} [options.toRestoredIndex] Maps a physical index of `changedFrom` to the restored grid,
215
+ * handed to the plugins with `changedFrom` when `forceOrder` is set.
216
+ */ restore(snapshot, { changedFrom, base, forceOrder = false, direction, toRestoredIndex } = {}) {
215
217
  // Each axis takes the length the data implies, the one `updateData()` fits it to. With no source
216
218
  // rows the data implies no column count (plain arrays count the columns in the first row), while
217
219
  // the grid keeps its columns – the replay left them where the step recorded them.
@@ -234,7 +236,8 @@ var /**
234
236
  plugin.restoreState(state, changedFrom === undefined ? undefined : {
235
237
  other: changedFrom.plugins.get(name),
236
238
  direction,
237
- reordered: forceOrder
239
+ reordered: forceOrder,
240
+ toRestoredIndex
238
241
  });
239
242
  } else if (forceOrder && base?.plugins.has(name)) {
240
243
  // The step left this state alone, but the row and column replay may have moved it (a merge
@@ -14,7 +14,6 @@ const LICENSE = Object.freeze({
14
14
  name: 'View state',
15
15
  gate: 'call',
16
16
  tiers: Object.freeze([
17
- 'standard',
18
17
  'professional'
19
18
  ])
20
19
  });
@@ -6,7 +6,6 @@ export const LICENSE = Object.freeze({
6
6
  name: 'View state',
7
7
  gate: 'call',
8
8
  tiers: Object.freeze([
9
- 'standard',
10
9
  'professional'
11
10
  ])
12
11
  });
@@ -25,8 +25,8 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 19.0.0-rc8
29
- * Release date: 24/11/2026 (built at 24/11/2026 12:49:48)
28
+ * Version: 19.0.0
29
+ * Release date: 26/11/2026 (built at 26/11/2026 12:22:31)
30
30
  */
31
31
  div:where(.handsontable):not(p):not(p) span:where(.colHeader), div:where(.handsontable):not(p):not(p) span:where(.rowHeader), div:where(.handsontable):not(p):not(p) span:where(.ht-page-size-section__label), div:where(.handsontable):not(p):not(p) span:where(.ht-page-navigation-section__label), div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-arrow), div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-chip), div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-chip-label), div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-chip-remove), div:where(.handsontable):not(p):not(p) span:where(.ht-multi-select-overflow), div:where(.handsontable):not(p):not(p) span:where(.htUISelectCaptionLabel), div:where(.handsontable):not(p):not(p) span:where(.htCheckboxRendererBox), div:where(.handsontable):not(p):not(p) input:where(.htCheckboxRendererInput), div:where(.handsontable):not(p):not(p) span:where(.htCheckboxRendererLabelText), div:where(.handsontable):not(p):not(p) span:where(.ht_nestingLevel_empty), div:where(.handsontable):not(p):not(p) :where(.htUIInput) > input:where([type="text"], [type="date"], [type="datetime-local"], [type="time"], [type="button"]), div:where(.handsontable):not(p):not(p) :where(.htUIRadio) > input:where([type="radio"]), div:where(.handsontable):not(p):not(p) :where(.htItemWrapper) > span:where(.selected, .htMixed) {
32
32
  padding: revert;