handsontable 0.0.0-next-5e7f0fe-20230504 → 0.0.0-next-48677e7-20230509

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (227) hide show
  1. package/3rdparty/walkontable/src/cell/coords.js +40 -13
  2. package/3rdparty/walkontable/src/cell/coords.mjs +40 -13
  3. package/3rdparty/walkontable/src/cell/range.js +29 -25
  4. package/3rdparty/walkontable/src/cell/range.mjs +28 -24
  5. package/3rdparty/walkontable/src/core/_base.js +9 -3
  6. package/3rdparty/walkontable/src/core/_base.mjs +9 -3
  7. package/3rdparty/walkontable/src/core/clone.js +2 -2
  8. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  9. package/3rdparty/walkontable/src/core/core.js +3 -2
  10. package/3rdparty/walkontable/src/core/core.mjs +3 -2
  11. package/3rdparty/walkontable/src/event.js +12 -10
  12. package/3rdparty/walkontable/src/event.mjs +12 -10
  13. package/3rdparty/walkontable/src/facade/core.js +2 -2
  14. package/3rdparty/walkontable/src/facade/core.mjs +2 -2
  15. package/3rdparty/walkontable/src/index.js +10 -2
  16. package/3rdparty/walkontable/src/index.mjs +2 -2
  17. package/3rdparty/walkontable/src/overlay/_base.js +8 -7
  18. package/3rdparty/walkontable/src/overlay/_base.mjs +8 -7
  19. package/3rdparty/walkontable/src/overlay/bottom.js +7 -6
  20. package/3rdparty/walkontable/src/overlay/bottom.mjs +7 -6
  21. package/3rdparty/walkontable/src/overlay/inlineStart.js +2 -4
  22. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -4
  23. package/3rdparty/walkontable/src/overlay/top.js +9 -10
  24. package/3rdparty/walkontable/src/overlay/top.mjs +9 -10
  25. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +12 -10
  26. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +12 -10
  27. package/3rdparty/walkontable/src/overlays.js +64 -55
  28. package/3rdparty/walkontable/src/overlays.mjs +64 -55
  29. package/3rdparty/walkontable/src/renderer/table.js +2 -0
  30. package/3rdparty/walkontable/src/renderer/table.mjs +2 -0
  31. package/3rdparty/walkontable/src/scroll.js +23 -20
  32. package/3rdparty/walkontable/src/scroll.mjs +23 -20
  33. package/3rdparty/walkontable/src/{border.js → selection/border/border.js} +7 -12
  34. package/3rdparty/walkontable/src/{border.mjs → selection/border/border.mjs} +7 -12
  35. package/3rdparty/walkontable/src/selection/border/constants.js +18 -0
  36. package/3rdparty/walkontable/src/selection/border/constants.mjs +13 -0
  37. package/3rdparty/walkontable/src/selection/constants.js +63 -0
  38. package/3rdparty/walkontable/src/selection/constants.mjs +51 -0
  39. package/3rdparty/walkontable/src/selection/index.js +30 -0
  40. package/3rdparty/walkontable/src/selection/index.mjs +5 -0
  41. package/3rdparty/walkontable/src/selection/manager.js +334 -0
  42. package/3rdparty/walkontable/src/selection/manager.mjs +328 -0
  43. package/3rdparty/walkontable/src/selection/scanner.js +363 -0
  44. package/3rdparty/walkontable/src/selection/scanner.mjs +359 -0
  45. package/3rdparty/walkontable/src/selection/selection.js +133 -0
  46. package/3rdparty/walkontable/src/selection/selection.mjs +127 -0
  47. package/3rdparty/walkontable/src/settings.js +15 -13
  48. package/3rdparty/walkontable/src/settings.mjs +15 -13
  49. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +9 -0
  50. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +9 -0
  51. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +9 -0
  52. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +9 -0
  53. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +9 -0
  54. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +9 -0
  55. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +9 -0
  56. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +9 -0
  57. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -0
  58. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -0
  59. package/3rdparty/walkontable/src/table.js +33 -101
  60. package/3rdparty/walkontable/src/table.mjs +34 -102
  61. package/base.js +4 -2
  62. package/base.mjs +2 -2
  63. package/core.d.ts +4 -0
  64. package/core.js +49 -8
  65. package/core.mjs +49 -8
  66. package/dataMap/dataSource.js +5 -5
  67. package/dataMap/dataSource.mjs +5 -5
  68. package/dataMap/metaManager/metaSchema.js +7 -0
  69. package/dataMap/metaManager/metaSchema.mjs +7 -0
  70. package/dist/handsontable.css +7 -2
  71. package/dist/handsontable.full.css +7 -2
  72. package/dist/handsontable.full.js +9409 -9084
  73. package/dist/handsontable.full.min.css +3 -3
  74. package/dist/handsontable.full.min.js +115 -123
  75. package/dist/handsontable.js +9497 -9171
  76. package/dist/handsontable.min.css +3 -3
  77. package/dist/handsontable.min.js +3 -11
  78. package/dist/languages/all.js +0 -133
  79. package/dist/languages/ar-AR.js +0 -7
  80. package/dist/languages/cs-CZ.js +0 -7
  81. package/dist/languages/de-CH.js +0 -7
  82. package/dist/languages/de-DE.js +0 -7
  83. package/dist/languages/en-US.js +0 -7
  84. package/dist/languages/es-MX.js +0 -7
  85. package/dist/languages/fr-FR.js +0 -7
  86. package/dist/languages/it-IT.js +0 -7
  87. package/dist/languages/ja-JP.js +0 -7
  88. package/dist/languages/ko-KR.js +0 -7
  89. package/dist/languages/lv-LV.js +0 -7
  90. package/dist/languages/nb-NO.js +0 -7
  91. package/dist/languages/nl-NL.js +0 -7
  92. package/dist/languages/pl-PL.js +0 -7
  93. package/dist/languages/pt-BR.js +0 -7
  94. package/dist/languages/ru-RU.js +0 -7
  95. package/dist/languages/sr-SP.js +0 -7
  96. package/dist/languages/zh-CN.js +0 -7
  97. package/dist/languages/zh-TW.js +0 -7
  98. package/editorManager.js +7 -3
  99. package/editorManager.mjs +7 -3
  100. package/editors/textEditor/textEditor.js +3 -16
  101. package/editors/textEditor/textEditor.mjs +4 -17
  102. package/focusManager.d.ts +12 -0
  103. package/focusManager.js +249 -0
  104. package/focusManager.mjs +245 -0
  105. package/helpers/dom/element.js +11 -0
  106. package/helpers/dom/element.mjs +10 -0
  107. package/helpers/mixed.js +1 -1
  108. package/helpers/mixed.mjs +1 -1
  109. package/i18n/languages/ar-AR.js +1 -7
  110. package/i18n/languages/cs-CZ.js +1 -7
  111. package/i18n/languages/de-CH.js +1 -7
  112. package/i18n/languages/de-DE.js +1 -7
  113. package/i18n/languages/en-US.js +1 -7
  114. package/i18n/languages/es-MX.js +1 -7
  115. package/i18n/languages/fr-FR.js +1 -7
  116. package/i18n/languages/it-IT.js +1 -7
  117. package/i18n/languages/ja-JP.js +1 -7
  118. package/i18n/languages/ko-KR.js +1 -7
  119. package/i18n/languages/lv-LV.js +1 -7
  120. package/i18n/languages/nb-NO.js +1 -7
  121. package/i18n/languages/nl-NL.js +1 -7
  122. package/i18n/languages/pl-PL.js +1 -7
  123. package/i18n/languages/pt-BR.js +1 -7
  124. package/i18n/languages/ru-RU.js +1 -7
  125. package/i18n/languages/sr-SP.js +1 -7
  126. package/i18n/languages/zh-CN.js +1 -7
  127. package/i18n/languages/zh-TW.js +1 -7
  128. package/languages/all.js +0 -133
  129. package/languages/ar-AR.js +0 -7
  130. package/languages/cs-CZ.js +0 -7
  131. package/languages/de-CH.js +0 -7
  132. package/languages/de-DE.js +0 -7
  133. package/languages/en-US.js +0 -7
  134. package/languages/es-MX.js +0 -7
  135. package/languages/fr-FR.js +0 -7
  136. package/languages/index.js +0 -133
  137. package/languages/it-IT.js +0 -7
  138. package/languages/ja-JP.js +0 -7
  139. package/languages/ko-KR.js +0 -7
  140. package/languages/lv-LV.js +0 -7
  141. package/languages/nb-NO.js +0 -7
  142. package/languages/nl-NL.js +0 -7
  143. package/languages/pl-PL.js +0 -7
  144. package/languages/pt-BR.js +0 -7
  145. package/languages/ru-RU.js +0 -7
  146. package/languages/sr-SP.js +0 -7
  147. package/languages/zh-CN.js +0 -7
  148. package/languages/zh-TW.js +0 -7
  149. package/package.json +2 -3
  150. package/pluginHooks.js +7 -17
  151. package/pluginHooks.mjs +4 -16
  152. package/plugins/autoRowSize/autoRowSize.js +2 -2
  153. package/plugins/autoRowSize/autoRowSize.mjs +2 -2
  154. package/plugins/copyPaste/copyPaste.js +12 -93
  155. package/plugins/copyPaste/copyPaste.mjs +12 -93
  156. package/plugins/copyPaste/copyableRanges.js +31 -25
  157. package/plugins/copyPaste/copyableRanges.mjs +24 -18
  158. package/plugins/customBorders/customBorders.js +6 -2
  159. package/plugins/customBorders/customBorders.mjs +7 -3
  160. package/plugins/filters/filters.js +0 -5
  161. package/plugins/filters/filters.mjs +0 -5
  162. package/plugins/formulas/formulas.js +168 -190
  163. package/plugins/formulas/formulas.mjs +168 -190
  164. package/plugins/mergeCells/mergeCells.js +0 -16
  165. package/plugins/mergeCells/mergeCells.mjs +0 -16
  166. package/plugins/nestedHeaders/nestedHeaders.js +3 -4
  167. package/plugins/nestedHeaders/nestedHeaders.mjs +3 -4
  168. package/plugins/nestedHeaders/stateManager/headersTree.js +26 -23
  169. package/plugins/nestedHeaders/stateManager/headersTree.mjs +23 -20
  170. package/plugins/nestedHeaders/stateManager/index.js +3 -3
  171. package/plugins/nestedHeaders/stateManager/matrixGenerator.js +0 -1
  172. package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
  173. package/plugins/nestedHeaders/utils/ghostTable.js +35 -30
  174. package/plugins/nestedHeaders/utils/ghostTable.mjs +35 -30
  175. package/plugins/registry.js +1 -3
  176. package/plugins/undoRedo/undoRedo.js +1 -0
  177. package/plugins/undoRedo/undoRedo.mjs +1 -0
  178. package/renderers/baseRenderer/baseRenderer.js +3 -0
  179. package/renderers/baseRenderer/baseRenderer.mjs +3 -0
  180. package/selection/highlight/highlight.js +335 -133
  181. package/selection/highlight/highlight.mjs +325 -129
  182. package/selection/highlight/types/activeHeader.js +10 -9
  183. package/selection/highlight/types/activeHeader.mjs +10 -8
  184. package/selection/highlight/types/area.js +12 -27
  185. package/selection/highlight/types/area.mjs +16 -30
  186. package/selection/highlight/types/areaLayered.js +54 -0
  187. package/selection/highlight/types/areaLayered.mjs +49 -0
  188. package/selection/highlight/types/column.js +50 -0
  189. package/selection/highlight/types/column.mjs +45 -0
  190. package/selection/highlight/types/customSelection.js +7 -10
  191. package/selection/highlight/types/customSelection.mjs +7 -9
  192. package/selection/highlight/types/fill.js +5 -8
  193. package/selection/highlight/types/fill.mjs +5 -7
  194. package/selection/highlight/types/{cell.js → focus.js} +5 -8
  195. package/selection/highlight/types/{cell.mjs → focus.mjs} +5 -7
  196. package/selection/highlight/types/header.js +10 -20
  197. package/selection/highlight/types/header.mjs +10 -19
  198. package/selection/highlight/types/{index.js → row.js} +27 -31
  199. package/selection/highlight/types/{index.mjs → row.mjs} +24 -29
  200. package/selection/highlight/visualSelection.js +12 -21
  201. package/selection/highlight/visualSelection.mjs +12 -21
  202. package/selection/index.js +4 -7
  203. package/selection/index.mjs +2 -3
  204. package/selection/selection.js +88 -46
  205. package/selection/selection.mjs +82 -44
  206. package/settings.d.ts +1 -0
  207. package/tableView.js +94 -66
  208. package/tableView.mjs +94 -66
  209. package/translations/changesObservable/observable.js +46 -41
  210. package/translations/changesObservable/observable.mjs +41 -36
  211. package/translations/changesObservable/observer.js +1 -1
  212. package/translations/indexMapper.js +0 -21
  213. package/translations/indexMapper.mjs +0 -21
  214. package/utils/dataStructures/tree.js +18 -15
  215. package/utils/dataStructures/tree.mjs +18 -15
  216. package/utils/parseTable.js +1 -5
  217. package/utils/parseTable.mjs +1 -5
  218. package/3rdparty/walkontable/src/selection.js +0 -354
  219. package/3rdparty/walkontable/src/selection.mjs +0 -348
  220. package/plugins/copyPaste/focusableElement.js +0 -219
  221. package/plugins/copyPaste/focusableElement.mjs +0 -213
  222. package/plugins/formulas/indexSyncer/axisSyncer.js +0 -379
  223. package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -374
  224. package/plugins/formulas/indexSyncer/index.js +0 -225
  225. package/plugins/formulas/indexSyncer/index.mjs +0 -219
  226. package/selection/highlight/constants.js +0 -16
  227. package/selection/highlight/constants.mjs +0 -6
@@ -242,9 +242,6 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
242
242
  this.addHook('afterDrawSelection', function () {
243
243
  return _this2.onAfterDrawSelection.apply(_this2, arguments);
244
244
  });
245
- this.addHook('beforeRemoveCellClassNames', function () {
246
- return _this2.onBeforeRemoveCellClassNames.apply(_this2, arguments);
247
- });
248
245
  this.addHook('beforeUndoStackChange', function (action, source) {
249
246
  if (source === 'MergeCells') {
250
247
  return false;
@@ -1339,19 +1336,6 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
1339
1336
  }
1340
1337
  return this.selectionCalculations.getSelectedMergedCellClassName(currentRow, currentColumn, cornersOfSelection, layerLevel);
1341
1338
  }
1342
-
1343
- /**
1344
- * `beforeRemoveCellClassNames` hook callback. Used to remove additional class name from all cells in the table.
1345
- *
1346
- * @private
1347
- * @returns {string[]} An `Array` of `String`s. Each of these strings will act like class names to be removed from
1348
- * all the cells in the table.
1349
- */
1350
- }, {
1351
- key: "onBeforeRemoveCellClassNames",
1352
- value: function onBeforeRemoveCellClassNames() {
1353
- return this.selectionCalculations.getSelectedMergedCellClassNameToRemove();
1354
- }
1355
1339
  }], [{
1356
1340
  key: "PLUGIN_KEY",
1357
1341
  get: function get() {
@@ -235,9 +235,6 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
235
235
  this.addHook('afterDrawSelection', function () {
236
236
  return _this2.onAfterDrawSelection.apply(_this2, arguments);
237
237
  });
238
- this.addHook('beforeRemoveCellClassNames', function () {
239
- return _this2.onBeforeRemoveCellClassNames.apply(_this2, arguments);
240
- });
241
238
  this.addHook('beforeUndoStackChange', function (action, source) {
242
239
  if (source === 'MergeCells') {
243
240
  return false;
@@ -1332,19 +1329,6 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
1332
1329
  }
1333
1330
  return this.selectionCalculations.getSelectedMergedCellClassName(currentRow, currentColumn, cornersOfSelection, layerLevel);
1334
1331
  }
1335
-
1336
- /**
1337
- * `beforeRemoveCellClassNames` hook callback. Used to remove additional class name from all cells in the table.
1338
- *
1339
- * @private
1340
- * @returns {string[]} An `Array` of `String`s. Each of these strings will act like class names to be removed from
1341
- * all the cells in the table.
1342
- */
1343
- }, {
1344
- key: "onBeforeRemoveCellClassNames",
1345
- value: function onBeforeRemoveCellClassNames() {
1346
- return this.selectionCalculations.getSelectedMergedCellClassNameToRemove();
1347
- }
1348
1332
  }], [{
1349
1333
  key: "PLUGIN_KEY",
1350
1334
  get: function get() {
@@ -456,8 +456,7 @@ var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {
456
456
  if (!headerNodeData) {
457
457
  return visualColumn;
458
458
  }
459
- var classNames = highlightMeta.classNames,
460
- columnCursor = highlightMeta.columnCursor,
459
+ var columnCursor = highlightMeta.columnCursor,
461
460
  selectionType = highlightMeta.selectionType,
462
461
  selectionWidth = highlightMeta.selectionWidth;
463
462
  var _classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderSettings(headerLevel, visualColumn),
@@ -469,8 +468,8 @@ var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {
469
468
  }
470
469
  } else if (selectionType === _selection.ACTIVE_HEADER_TYPE) {
471
470
  if (colspan > selectionWidth - columnCursor || !isRoot) {
472
- // Reset the class names array so the generated TH element won't be modified.
473
- classNames.length = 0;
471
+ // Prevents adding any CSS class names to the TH element
472
+ return null;
474
473
  }
475
474
  }
476
475
  return visualColumn;
@@ -449,8 +449,7 @@ export var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {
449
449
  if (!headerNodeData) {
450
450
  return visualColumn;
451
451
  }
452
- var classNames = highlightMeta.classNames,
453
- columnCursor = highlightMeta.columnCursor,
452
+ var columnCursor = highlightMeta.columnCursor,
454
453
  selectionType = highlightMeta.selectionType,
455
454
  selectionWidth = highlightMeta.selectionWidth;
456
455
  var _classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderSettings(headerLevel, visualColumn),
@@ -462,8 +461,8 @@ export var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {
462
461
  }
463
462
  } else if (selectionType === ACTIVE_HEADER_TYPE) {
464
463
  if (colspan > selectionWidth - columnCursor || !isRoot) {
465
- // Reset the class names array so the generated TH element won't be modified.
466
- classNames.length = 0;
464
+ // Prevents adding any CSS class names to the TH element
465
+ return null;
467
466
  }
468
467
  }
469
468
  return visualColumn;
@@ -48,6 +48,9 @@ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) {
48
48
  function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
49
49
  function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
50
50
  function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
51
+ var _rootNodes = /*#__PURE__*/new WeakMap();
52
+ var _rootsIndex = /*#__PURE__*/new WeakMap();
53
+ var _sourceSettings = /*#__PURE__*/new WeakMap();
51
54
  /* eslint-disable jsdoc/require-description-complete-sentence */
52
55
  /**
53
56
  * @private
@@ -84,40 +87,40 @@ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.
84
87
  *
85
88
  */
86
89
  /* eslint-enable jsdoc/require-description-complete-sentence */
87
- var _rootNodes = /*#__PURE__*/new WeakMap();
88
- var _rootsIndex = /*#__PURE__*/new WeakMap();
89
- var _sourceSettings = /*#__PURE__*/new WeakMap();
90
90
  var HeadersTree = /*#__PURE__*/function () {
91
+ /**
92
+ * The collection of nested headers settings structured into trees. The root trees are stored
93
+ * under the visual column index.
94
+ *
95
+ * @private
96
+ * @type {Map<number, TreeNode>}
97
+ */
98
+
99
+ /**
100
+ * A map that translates the visual column indexes that intersect the range
101
+ * defined by the header colspan width to the root index.
102
+ *
103
+ * @private
104
+ * @type {Map<number, number>}
105
+ */
106
+
107
+ /**
108
+ * The instance of the SourceSettings class.
109
+ *
110
+ * @private
111
+ * @type {SourceSettings}
112
+ */
113
+
91
114
  function HeadersTree(sourceSettings) {
92
115
  _classCallCheck(this, HeadersTree);
93
- /**
94
- * The collection of nested headers settings structured into trees. The root trees are stored
95
- * under the visual column index.
96
- *
97
- * @private
98
- * @type {Map<number, TreeNode>}
99
- */
100
116
  _classPrivateFieldInitSpec(this, _rootNodes, {
101
117
  writable: true,
102
118
  value: new Map()
103
119
  });
104
- /**
105
- * A map that translates the visual column indexes that intersect the range
106
- * defined by the header colspan width to the root index.
107
- *
108
- * @private
109
- * @type {Map<number, number>}
110
- */
111
120
  _classPrivateFieldInitSpec(this, _rootsIndex, {
112
121
  writable: true,
113
122
  value: new Map()
114
123
  });
115
- /**
116
- * The instance of the SourceSettings class.
117
- *
118
- * @private
119
- * @type {SourceSettings}
120
- */
121
124
  _classPrivateFieldInitSpec(this, _sourceSettings, {
122
125
  writable: true,
123
126
  value: null
@@ -83,36 +83,39 @@ var _rootNodes = /*#__PURE__*/new WeakMap();
83
83
  var _rootsIndex = /*#__PURE__*/new WeakMap();
84
84
  var _sourceSettings = /*#__PURE__*/new WeakMap();
85
85
  var HeadersTree = /*#__PURE__*/function () {
86
+ /**
87
+ * The collection of nested headers settings structured into trees. The root trees are stored
88
+ * under the visual column index.
89
+ *
90
+ * @private
91
+ * @type {Map<number, TreeNode>}
92
+ */
93
+
94
+ /**
95
+ * A map that translates the visual column indexes that intersect the range
96
+ * defined by the header colspan width to the root index.
97
+ *
98
+ * @private
99
+ * @type {Map<number, number>}
100
+ */
101
+
102
+ /**
103
+ * The instance of the SourceSettings class.
104
+ *
105
+ * @private
106
+ * @type {SourceSettings}
107
+ */
108
+
86
109
  function HeadersTree(sourceSettings) {
87
110
  _classCallCheck(this, HeadersTree);
88
- /**
89
- * The collection of nested headers settings structured into trees. The root trees are stored
90
- * under the visual column index.
91
- *
92
- * @private
93
- * @type {Map<number, TreeNode>}
94
- */
95
111
  _classPrivateFieldInitSpec(this, _rootNodes, {
96
112
  writable: true,
97
113
  value: new Map()
98
114
  });
99
- /**
100
- * A map that translates the visual column indexes that intersect the range
101
- * defined by the header colspan width to the root index.
102
- *
103
- * @private
104
- * @type {Map<number, number>}
105
- */
106
115
  _classPrivateFieldInitSpec(this, _rootsIndex, {
107
116
  writable: true,
108
117
  value: new Map()
109
118
  });
110
- /**
111
- * The instance of the SourceSettings class.
112
- *
113
- * @private
114
- * @type {SourceSettings}
115
- */
116
119
  _classPrivateFieldInitSpec(this, _sourceSettings, {
117
120
  writable: true,
118
121
  value: null
@@ -45,6 +45,9 @@ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.
45
45
  function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
46
46
  function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
47
47
  function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
48
+ var _sourceSettings = /*#__PURE__*/new WeakMap();
49
+ var _headersTree = /*#__PURE__*/new WeakMap();
50
+ var _stateMatrix = /*#__PURE__*/new WeakMap();
48
51
  /**
49
52
  * The state manager is a source of truth for nested headers configuration.
50
53
  * The state generation process is divided into three stages.
@@ -73,9 +76,6 @@ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) {
73
76
  *
74
77
  * @class StateManager
75
78
  */
76
- var _sourceSettings = /*#__PURE__*/new WeakMap();
77
- var _headersTree = /*#__PURE__*/new WeakMap();
78
- var _stateMatrix = /*#__PURE__*/new WeakMap();
79
79
  var StateManager = /*#__PURE__*/function () {
80
80
  function StateManager() {
81
81
  _classCallCheck(this, StateManager);
@@ -10,7 +10,6 @@ require("core-js/modules/es.string.includes.js");
10
10
  var _array = require("../../../helpers/array");
11
11
  var _utils = require("./utils");
12
12
  var _excluded = ["crossHiddenColumns"];
13
- /* eslint-disable jsdoc/require-description-complete-sentence */
14
13
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
15
14
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
16
15
  /**
@@ -24,7 +24,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
24
24
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
25
25
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
26
26
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
27
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } /* eslint-disable jsdoc/require-description-complete-sentence */
27
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
28
28
  /**
29
29
  * A function that normalizes user-defined settings into one predictable
30
30
  * structure. Currently, the developer can declare nested headers by passing
@@ -29,42 +29,47 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
29
29
  * @private
30
30
  */
31
31
  var GhostTable = /*#__PURE__*/function () {
32
+ /**
33
+ * Reference to the Handsontable instance.
34
+ *
35
+ * @private
36
+ * @type {Handsontable}
37
+ */
38
+
39
+ /**
40
+ * The function for retrieving the nested headers settings.
41
+ *
42
+ * @private
43
+ * @type {Function}
44
+ */
45
+
46
+ /**
47
+ * The value that holds information about the number of the nested header layers (header rows).
48
+ *
49
+ * @private
50
+ * @type {number}
51
+ */
52
+
53
+ /**
54
+ * Temporary element created to get minimal headers widths.
55
+ *
56
+ * @private
57
+ * @type {*}
58
+ */
59
+
60
+ /**
61
+ * PhysicalIndexToValueMap to keep and track of the columns' widths.
62
+ *
63
+ * @private
64
+ * @type {PhysicalIndexToValueMap}
65
+ */
66
+
32
67
  function GhostTable(hot, nestedHeaderSettingsGetter) {
33
68
  _classCallCheck(this, GhostTable);
34
- /**
35
- * Reference to the Handsontable instance.
36
- *
37
- * @private
38
- * @type {Handsontable}
39
- */
40
69
  _defineProperty(this, "hot", void 0);
41
- /**
42
- * The function for retrieving the nested headers settings.
43
- *
44
- * @private
45
- * @type {Function}
46
- */
47
70
  _defineProperty(this, "nestedHeaderSettingsGetter", void 0);
48
- /**
49
- * The value that holds information about the number of the nested header layers (header rows).
50
- *
51
- * @private
52
- * @type {number}
53
- */
54
71
  _defineProperty(this, "layersCount", 0);
55
- /**
56
- * Temporary element created to get minimal headers widths.
57
- *
58
- * @private
59
- * @type {*}
60
- */
61
72
  _defineProperty(this, "container", void 0);
62
- /**
63
- * PhysicalIndexToValueMap to keep and track of the columns' widths.
64
- *
65
- * @private
66
- * @type {PhysicalIndexToValueMap}
67
- */
68
73
  _defineProperty(this, "widthsMap", void 0);
69
74
  this.hot = hot;
70
75
  this.nestedHeaderSettingsGetter = nestedHeaderSettingsGetter;
@@ -25,42 +25,47 @@ import { fastInnerHTML } from "../../../helpers/dom/element.mjs";
25
25
  * @private
26
26
  */
27
27
  var GhostTable = /*#__PURE__*/function () {
28
+ /**
29
+ * Reference to the Handsontable instance.
30
+ *
31
+ * @private
32
+ * @type {Handsontable}
33
+ */
34
+
35
+ /**
36
+ * The function for retrieving the nested headers settings.
37
+ *
38
+ * @private
39
+ * @type {Function}
40
+ */
41
+
42
+ /**
43
+ * The value that holds information about the number of the nested header layers (header rows).
44
+ *
45
+ * @private
46
+ * @type {number}
47
+ */
48
+
49
+ /**
50
+ * Temporary element created to get minimal headers widths.
51
+ *
52
+ * @private
53
+ * @type {*}
54
+ */
55
+
56
+ /**
57
+ * PhysicalIndexToValueMap to keep and track of the columns' widths.
58
+ *
59
+ * @private
60
+ * @type {PhysicalIndexToValueMap}
61
+ */
62
+
28
63
  function GhostTable(hot, nestedHeaderSettingsGetter) {
29
64
  _classCallCheck(this, GhostTable);
30
- /**
31
- * Reference to the Handsontable instance.
32
- *
33
- * @private
34
- * @type {Handsontable}
35
- */
36
65
  _defineProperty(this, "hot", void 0);
37
- /**
38
- * The function for retrieving the nested headers settings.
39
- *
40
- * @private
41
- * @type {Function}
42
- */
43
66
  _defineProperty(this, "nestedHeaderSettingsGetter", void 0);
44
- /**
45
- * The value that holds information about the number of the nested header layers (header rows).
46
- *
47
- * @private
48
- * @type {number}
49
- */
50
67
  _defineProperty(this, "layersCount", 0);
51
- /**
52
- * Temporary element created to get minimal headers widths.
53
- *
54
- * @private
55
- * @type {*}
56
- */
57
68
  _defineProperty(this, "container", void 0);
58
- /**
59
- * PhysicalIndexToValueMap to keep and track of the columns' widths.
60
- *
61
- * @private
62
- * @type {PhysicalIndexToValueMap}
63
- */
64
69
  _defineProperty(this, "widthsMap", void 0);
65
70
  this.hot = hot;
66
71
  this.nestedHeaderSettingsGetter = nestedHeaderSettingsGetter;
@@ -30,9 +30,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
30
30
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
31
31
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
32
32
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
33
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } /**
34
- * Utility to register plugins and common namespace for keeping the reference to all plugins classes.
35
- */
33
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
36
34
  var ERROR_PLUGIN_REGISTERED = function ERROR_PLUGIN_REGISTERED(pluginName) {
37
35
  return "There is already registered \"".concat(pluginName, "\" plugin.");
38
36
  };
@@ -591,6 +591,7 @@ UndoRedo.RemoveColumnAction.prototype.undo = function (instance, undoneCallback)
591
591
  });
592
592
  });
593
593
  instance.setSourceDataAtCell(changes, void 0, void 0, 'UndoRedo.undo');
594
+ instance.columnIndexMapper.insertIndexes(ascendingIndexes[0], ascendingIndexes.length);
594
595
  if (typeof this.headers !== 'undefined') {
595
596
  (0, _array.arrayEach)(sortedHeaders, function (headerData, columnIndex) {
596
597
  instance.getSettings().colHeaders[ascendingIndexes[columnIndex]] = headerData;
@@ -585,6 +585,7 @@ UndoRedo.RemoveColumnAction.prototype.undo = function (instance, undoneCallback)
585
585
  });
586
586
  });
587
587
  instance.setSourceDataAtCell(changes, void 0, void 0, 'UndoRedo.undo');
588
+ instance.columnIndexMapper.insertIndexes(ascendingIndexes[0], ascendingIndexes.length);
588
589
  if (typeof this.headers !== 'undefined') {
589
590
  arrayEach(sortedHeaders, function (headerData, columnIndex) {
590
591
  instance.getSettings().colHeaders[ascendingIndexes[columnIndex]] = headerData;
@@ -42,5 +42,8 @@ function baseRenderer(instance, TD, row, col, prop, value, cellProperties) {
42
42
  }
43
43
  (0, _element.removeClass)(TD, classesToRemove);
44
44
  (0, _element.addClass)(TD, classesToAdd);
45
+ TD.ariaColIndex = "".concat(col);
46
+ TD.setAttribute('tabindex', '-1');
47
+ TD.setAttribute('role', 'gridcell');
45
48
  }
46
49
  baseRenderer.RENDERER_TYPE = RENDERER_TYPE;
@@ -35,5 +35,8 @@ export function baseRenderer(instance, TD, row, col, prop, value, cellProperties
35
35
  }
36
36
  removeClass(TD, classesToRemove);
37
37
  addClass(TD, classesToAdd);
38
+ TD.ariaColIndex = "".concat(col);
39
+ TD.setAttribute('tabindex', '-1');
40
+ TD.setAttribute('role', 'gridcell');
38
41
  }
39
42
  baseRenderer.RENDERER_TYPE = RENDERER_TYPE;