handsontable 0.0.0-next-e2116ad-20250117 → 0.0.0-next-542a54e-20250121

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.

Potentially problematic release.


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

Files changed (43) hide show
  1. package/3rdparty/walkontable/src/core/_base.js +0 -19
  2. package/3rdparty/walkontable/src/core/_base.mjs +0 -19
  3. package/3rdparty/walkontable/src/overlay/_base.js +8 -44
  4. package/3rdparty/walkontable/src/overlay/_base.mjs +8 -44
  5. package/3rdparty/walkontable/src/overlay/bottom.js +1 -0
  6. package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -0
  7. package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.js +1 -0
  8. package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.mjs +1 -0
  9. package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -0
  10. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +1 -0
  11. package/3rdparty/walkontable/src/overlay/top.js +1 -0
  12. package/3rdparty/walkontable/src/overlay/top.mjs +1 -0
  13. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +1 -0
  14. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +1 -0
  15. package/3rdparty/walkontable/src/overlays.js +45 -355
  16. package/3rdparty/walkontable/src/overlays.mjs +45 -355
  17. package/3rdparty/walkontable/src/table.js +99 -94
  18. package/3rdparty/walkontable/src/table.mjs +99 -94
  19. package/base.js +2 -2
  20. package/base.mjs +2 -2
  21. package/dist/handsontable.css +4 -20
  22. package/dist/handsontable.full.css +4 -20
  23. package/dist/handsontable.full.js +166 -522
  24. package/dist/handsontable.full.min.css +3 -3
  25. package/dist/handsontable.full.min.js +108 -108
  26. package/dist/handsontable.js +166 -522
  27. package/dist/handsontable.min.css +3 -3
  28. package/dist/handsontable.min.js +15 -15
  29. package/editors/baseEditor/baseEditor.js +1 -2
  30. package/editors/baseEditor/baseEditor.mjs +1 -2
  31. package/helpers/mixed.js +1 -1
  32. package/helpers/mixed.mjs +1 -1
  33. package/package.json +1 -1
  34. package/plugins/dragToScroll/dragToScroll.js +1 -1
  35. package/plugins/dragToScroll/dragToScroll.mjs +1 -1
  36. package/styles/handsontable.css +2 -7
  37. package/styles/handsontable.min.css +3 -3
  38. package/styles/ht-theme-horizon.css +2 -2
  39. package/styles/ht-theme-horizon.min.css +2 -2
  40. package/styles/ht-theme-main.css +2 -2
  41. package/styles/ht-theme-main.min.css +2 -2
  42. package/tableView.js +2 -2
  43. package/tableView.mjs +2 -2
@@ -5,6 +5,7 @@ require("core-js/modules/es.error.cause.js");
5
5
  require("core-js/modules/es.array.push.js");
6
6
  require("core-js/modules/esnext.iterator.constructor.js");
7
7
  require("core-js/modules/esnext.iterator.for-each.js");
8
+ require("core-js/modules/esnext.iterator.map.js");
8
9
  var _element = require("../../../helpers/dom/element");
9
10
  var _function = require("../../../helpers/function");
10
11
  var _column = _interopRequireDefault(require("./filter/column"));
@@ -21,7 +22,6 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
21
22
  /**
22
23
  * @todo These mixes are never added to the class Table, however their members are used here.
23
24
  * @todo Continue: Potentially it works only, because some of these mixes are added to every inherited class.
24
- * @todo Refactoring, move code from `if(this.isMaster)` into MasterTable, and others like that.
25
25
  * @mixes stickyColumnsStart
26
26
  * @mixes stickyRowsBottom
27
27
  * @mixes stickyRowsTop
@@ -78,7 +78,6 @@ class Table {
78
78
  *
79
79
  * @type {boolean}
80
80
  */
81
- this.isMaster = name === 'master';
82
81
  this.name = name;
83
82
  this.dataAccessObject = dataAccessObject;
84
83
  this.facadeGetter = facadeGetter;
@@ -95,9 +94,7 @@ class Table {
95
94
  this.hider = this.createHider(this.spreader);
96
95
  this.holder = this.createHolder(this.hider);
97
96
  this.wtRootElement = this.holder.parentNode;
98
- if (this.isMaster) {
99
- this.alignOverlaysWithTrimmingContainer(); // todo wow, It calls method from child class (MasterTable).
100
- }
97
+ this.alignOverlaysWithTrimmingContainer(); // todo wow, It calls method from child class (MasterTable).
101
98
  this.fixTableDomTree();
102
99
  this.rowFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
103
100
  this.columnFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
@@ -117,7 +114,31 @@ class Table {
117
114
  TBODY: this.TBODY,
118
115
  rowUtils: this.rowUtils,
119
116
  columnUtils: this.columnUtils,
120
- cellRenderer: this.wtSettings.getSettingPure('cellRenderer'),
117
+ cellRenderer: (row, column, TD) => {
118
+ const fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');
119
+ const fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
120
+ this.wtSettings.getSettingPure('cellRenderer')(row, column, TD);
121
+ if (column < fixedColumnsStart) {
122
+ const left = this.dataAccessObject.wtViewport.getRowHeaderWidth() + this.dataAccessObject.wtOverlays.inlineStartOverlay.sumCellSizes(0, column);
123
+ TD.style.position = 'sticky';
124
+ TD.style.left = `${left}px`;
125
+ if (row < fixedRowsTop) {
126
+ TD.style.zIndex = '9';
127
+ } else {
128
+ TD.style.zIndex = '5';
129
+ }
130
+ }
131
+ if (row < fixedRowsTop) {
132
+ const top = this.dataAccessObject.wtViewport.getColumnHeaderHeight() + this.dataAccessObject.wtOverlays.topOverlay.sumCellSizes(0, row);
133
+ TD.style.position = 'sticky';
134
+ TD.style.top = `${top}px`;
135
+ if (column < fixedColumnsStart) {
136
+ TD.style.zIndex = '10';
137
+ } else {
138
+ TD.style.zIndex = '6';
139
+ }
140
+ }
141
+ },
121
142
  stylesHandler: this.dataAccessObject.stylesHandler
122
143
  });
123
144
  }
@@ -217,12 +238,10 @@ class Table {
217
238
  // if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it
218
239
  parent.insertBefore(holder, hider);
219
240
  }
220
- if (this.isMaster) {
221
- holder.parentNode.className += 'ht_master handsontable';
222
- holder.parentNode.setAttribute('dir', this.wtSettings.getSettingPure('rtlMode') ? 'rtl' : 'ltr');
223
- if (this.wtSettings.getSetting('ariaTags')) {
224
- (0, _element.setAttribute)(holder.parentNode, [(0, _a11y.A11Y_PRESENTATION)()]);
225
- }
241
+ holder.parentNode.className += 'ht_master handsontable';
242
+ holder.parentNode.setAttribute('dir', this.wtSettings.getSettingPure('rtlMode') ? 'rtl' : 'ltr');
243
+ if (this.wtSettings.getSetting('ariaTags')) {
244
+ (0, _element.setAttribute)(holder.parentNode, [(0, _a11y.A11Y_PRESENTATION)()]);
226
245
  }
227
246
  holder.appendChild(hider);
228
247
  }
@@ -250,100 +269,89 @@ class Table {
250
269
  } = this.dataAccessObject;
251
270
  const totalRows = wtSettings.getSetting('totalRows');
252
271
  const totalColumns = wtSettings.getSetting('totalColumns');
253
- const rowHeaders = wtSettings.getSetting('rowHeaders');
272
+ const rowHeaders = wtSettings.getSetting('rowHeaders').map(origRowRenderer => {
273
+ return (row, TH, column) => {
274
+ const fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
275
+ const fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');
276
+ if (row < fixedRowsTop) {
277
+ let top = 0;
278
+ if (row >= 0) {
279
+ top = this.dataAccessObject.wtViewport.getColumnHeaderHeight() + this.dataAccessObject.wtOverlays.topOverlay.sumCellSizes(0, row);
280
+ }
281
+ TH.style.top = `${top}px`;
282
+ if (column < fixedColumnsStart) {
283
+ TH.style.zIndex = '20';
284
+ } else {
285
+ TH.style.zIndex = '10';
286
+ }
287
+ } else {
288
+ TH.style.top = '0px';
289
+ TH.style.zIndex = '3';
290
+ }
291
+ origRowRenderer(row, TH, column);
292
+ TH.style.position = 'sticky';
293
+ TH.style.left = '0px';
294
+ };
295
+ });
254
296
  const rowHeadersCount = rowHeaders.length;
255
- const columnHeaders = wtSettings.getSetting('columnHeaders');
297
+ const columnHeaders = wtSettings.getSetting('columnHeaders').map(origColumnRenderer => {
298
+ return (column, TH, row) => {
299
+ const fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
300
+ const fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');
301
+ if (column < fixedColumnsStart) {
302
+ let left = 0;
303
+ if (column >= 0) {
304
+ left = this.dataAccessObject.wtViewport.getRowHeaderWidth() + this.dataAccessObject.wtOverlays.inlineStartOverlay.sumCellSizes(0, column);
305
+ }
306
+ TH.style.left = `${left}px`;
307
+ if (row < fixedRowsTop) {
308
+ TH.style.zIndex = '20';
309
+ } else {
310
+ TH.style.zIndex = '10';
311
+ }
312
+ } else {
313
+ TH.style.zIndex = '3';
314
+ TH.style.left = '0px';
315
+ }
316
+ origColumnRenderer(column, TH, row);
317
+ TH.style.position = 'sticky';
318
+ TH.style.top = '0px';
319
+ };
320
+ });
256
321
  const columnHeadersCount = columnHeaders.length;
257
322
  let runFastDraw = fastDraw;
258
- if (this.isMaster) {
259
- wtOverlays.beforeDraw();
260
- this.holderOffset = (0, _element.offset)(this.holder);
261
- runFastDraw = wtViewport.createCalculators(runFastDraw);
262
- if (rowHeadersCount && !wtSettings.getSetting('fixedColumnsStart')) {
263
- const leftScrollPos = wtOverlays.inlineStartOverlay.getScrollPosition();
264
- const previousState = this.correctHeaderWidth;
265
- this.correctHeaderWidth = leftScrollPos !== 0;
266
- if (previousState !== this.correctHeaderWidth) {
267
- runFastDraw = false;
268
- }
269
- }
270
- }
271
- if (runFastDraw) {
272
- if (this.isMaster) {
273
- wtOverlays.refresh(true);
274
- }
275
- } else {
276
- if (this.isMaster) {
277
- this.tableOffset = (0, _element.offset)(this.TABLE);
278
- } else {
279
- this.tableOffset = this.dataAccessObject.parentTableOffset;
280
- }
323
+ wtOverlays.beforeDraw();
324
+ this.holderOffset = (0, _element.offset)(this.holder);
325
+ runFastDraw = wtViewport.createCalculators(runFastDraw);
326
+ if (!runFastDraw) {
327
+ this.tableOffset = (0, _element.offset)(this.TABLE);
281
328
  const startRow = totalRows > 0 ? this.getFirstRenderedRow() : 0;
282
329
  const startColumn = totalColumns > 0 ? this.getFirstRenderedColumn() : 0;
283
330
  this.rowFilter = new _row.default(startRow, totalRows, columnHeadersCount);
284
331
  this.columnFilter = new _column.default(startColumn, totalColumns, rowHeadersCount);
285
332
  let performRedraw = true;
286
-
287
- // Only master table rendering can be skipped
288
- if (this.isMaster) {
289
- this.alignOverlaysWithTrimmingContainer(); // todo It calls method from child class (MasterTable).
290
- const skipRender = {};
291
- this.wtSettings.getSetting('beforeDraw', true, skipRender);
292
- performRedraw = skipRender.skipRender !== true;
293
- }
333
+ this.alignOverlaysWithTrimmingContainer(); // todo It calls method from child class (MasterTable).
334
+ const skipRender = {};
335
+ this.wtSettings.getSetting('beforeDraw', true, skipRender);
336
+ performRedraw = skipRender.skipRender !== true;
294
337
  if (performRedraw) {
295
338
  this.tableRenderer.setHeaderContentRenderers(rowHeaders, columnHeaders);
296
- if (this.is(_overlay.CLONE_BOTTOM) || this.is(_overlay.CLONE_BOTTOM_INLINE_START_CORNER)) {
297
- // do NOT render headers on the bottom or bottom-left corner overlay
298
- this.tableRenderer.setHeaderContentRenderers(rowHeaders, []);
299
- }
300
339
  this.resetOversizedRows();
301
340
  this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(), this.getRenderedColumnsCount()).setFilters(this.rowFilter, this.columnFilter).render();
302
- if (this.isMaster) {
303
- this.markOversizedColumnHeaders();
304
- }
341
+ this.markOversizedColumnHeaders();
305
342
  this.adjustColumnHeaderHeights();
306
- if (this.isMaster || this.is(_overlay.CLONE_BOTTOM)) {
307
- this.markOversizedRows();
343
+ this.markOversizedRows();
344
+ if (!this.wtSettings.getSetting('externalRowCalculator')) {
345
+ wtViewport.createVisibleCalculators();
308
346
  }
309
- if (this.isMaster) {
310
- if (!this.wtSettings.getSetting('externalRowCalculator')) {
311
- wtViewport.createVisibleCalculators();
312
- }
313
- wtOverlays.refresh(false);
314
- wtOverlays.applyToDOM();
315
- this.wtSettings.getSetting('onDraw', true);
316
- } else if (this.is(_overlay.CLONE_BOTTOM)) {
317
- this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize();
318
- }
319
- }
320
- }
321
- let positionChanged = false;
322
- if (this.isMaster) {
323
- positionChanged = wtOverlays.topOverlay.resetFixedPosition();
324
- if (wtOverlays.bottomOverlay.clone) {
325
- positionChanged = wtOverlays.bottomOverlay.resetFixedPosition() || positionChanged;
326
- }
327
- positionChanged = wtOverlays.inlineStartOverlay.resetFixedPosition() || positionChanged;
328
- if (wtOverlays.topInlineStartCornerOverlay) {
329
- wtOverlays.topInlineStartCornerOverlay.resetFixedPosition();
330
- }
331
- if (wtOverlays.bottomInlineStartCornerOverlay && wtOverlays.bottomInlineStartCornerOverlay.clone) {
332
- wtOverlays.bottomInlineStartCornerOverlay.resetFixedPosition();
347
+ wtOverlays.adjustElementsSize();
348
+ // wtOverlays.draw(fastDraw);
349
+
350
+ this.wtSettings.getSetting('onDraw', true);
333
351
  }
334
352
  }
335
- if (positionChanged) {
336
- // It refreshes the cells borders caused by a 1px shift (introduced by overlays which add or
337
- // remove `innerBorderTop` and `innerBorderInlineStart` CSS classes to the DOM element. This happens
338
- // when there is a switch between rendering from 0 to N rows/columns and vice versa).
339
- wtOverlays.refreshAll(); // `refreshAll()` internally already calls `refreshSelections()` method
340
- wtOverlays.adjustElementsSize();
341
- } else {
342
- this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(runFastDraw);
343
- }
344
- if (this.isMaster) {
345
- wtOverlays.afterDraw();
346
- }
353
+ this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(runFastDraw);
354
+ wtOverlays.afterDraw();
347
355
  this.dataAccessObject.drawn = true;
348
356
  return this;
349
357
  }
@@ -415,9 +423,6 @@ class Table {
415
423
  const {
416
424
  wtViewport
417
425
  } = this.dataAccessObject;
418
- if (!this.isMaster && !this.is(_overlay.CLONE_BOTTOM)) {
419
- return;
420
- }
421
426
  if (!wtSettings.getSetting('externalRowCalculator')) {
422
427
  const rowsToRender = this.getRenderedRowsCount();
423
428
 
@@ -453,7 +458,7 @@ class Table {
453
458
  getCell(coords) {
454
459
  let row = coords.row;
455
460
  let column = coords.col;
456
- const hookResult = this.wtSettings.getSetting('onModifyGetCellCoords', row, column, !this.isMaster, 'render');
461
+ const hookResult = this.wtSettings.getSetting('onModifyGetCellCoords', row, column, false, 'render');
457
462
  if (hookResult && Array.isArray(hookResult)) {
458
463
  [row, column] = hookResult;
459
464
  }
@@ -2,6 +2,7 @@ import "core-js/modules/es.error.cause.js";
2
2
  import "core-js/modules/es.array.push.js";
3
3
  import "core-js/modules/esnext.iterator.constructor.js";
4
4
  import "core-js/modules/esnext.iterator.for-each.js";
5
+ import "core-js/modules/esnext.iterator.map.js";
5
6
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
6
7
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
7
8
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -17,7 +18,6 @@ import { A11Y_PRESENTATION } from "../../../helpers/a11y.mjs";
17
18
  /**
18
19
  * @todo These mixes are never added to the class Table, however their members are used here.
19
20
  * @todo Continue: Potentially it works only, because some of these mixes are added to every inherited class.
20
- * @todo Refactoring, move code from `if(this.isMaster)` into MasterTable, and others like that.
21
21
  * @mixes stickyColumnsStart
22
22
  * @mixes stickyRowsBottom
23
23
  * @mixes stickyRowsTop
@@ -74,7 +74,6 @@ class Table {
74
74
  *
75
75
  * @type {boolean}
76
76
  */
77
- this.isMaster = name === 'master';
78
77
  this.name = name;
79
78
  this.dataAccessObject = dataAccessObject;
80
79
  this.facadeGetter = facadeGetter;
@@ -91,9 +90,7 @@ class Table {
91
90
  this.hider = this.createHider(this.spreader);
92
91
  this.holder = this.createHolder(this.hider);
93
92
  this.wtRootElement = this.holder.parentNode;
94
- if (this.isMaster) {
95
- this.alignOverlaysWithTrimmingContainer(); // todo wow, It calls method from child class (MasterTable).
96
- }
93
+ this.alignOverlaysWithTrimmingContainer(); // todo wow, It calls method from child class (MasterTable).
97
94
  this.fixTableDomTree();
98
95
  this.rowFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
99
96
  this.columnFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
@@ -113,7 +110,31 @@ class Table {
113
110
  TBODY: this.TBODY,
114
111
  rowUtils: this.rowUtils,
115
112
  columnUtils: this.columnUtils,
116
- cellRenderer: this.wtSettings.getSettingPure('cellRenderer'),
113
+ cellRenderer: (row, column, TD) => {
114
+ const fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');
115
+ const fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
116
+ this.wtSettings.getSettingPure('cellRenderer')(row, column, TD);
117
+ if (column < fixedColumnsStart) {
118
+ const left = this.dataAccessObject.wtViewport.getRowHeaderWidth() + this.dataAccessObject.wtOverlays.inlineStartOverlay.sumCellSizes(0, column);
119
+ TD.style.position = 'sticky';
120
+ TD.style.left = `${left}px`;
121
+ if (row < fixedRowsTop) {
122
+ TD.style.zIndex = '9';
123
+ } else {
124
+ TD.style.zIndex = '5';
125
+ }
126
+ }
127
+ if (row < fixedRowsTop) {
128
+ const top = this.dataAccessObject.wtViewport.getColumnHeaderHeight() + this.dataAccessObject.wtOverlays.topOverlay.sumCellSizes(0, row);
129
+ TD.style.position = 'sticky';
130
+ TD.style.top = `${top}px`;
131
+ if (column < fixedColumnsStart) {
132
+ TD.style.zIndex = '10';
133
+ } else {
134
+ TD.style.zIndex = '6';
135
+ }
136
+ }
137
+ },
117
138
  stylesHandler: this.dataAccessObject.stylesHandler
118
139
  });
119
140
  }
@@ -213,12 +234,10 @@ class Table {
213
234
  // if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it
214
235
  parent.insertBefore(holder, hider);
215
236
  }
216
- if (this.isMaster) {
217
- holder.parentNode.className += 'ht_master handsontable';
218
- holder.parentNode.setAttribute('dir', this.wtSettings.getSettingPure('rtlMode') ? 'rtl' : 'ltr');
219
- if (this.wtSettings.getSetting('ariaTags')) {
220
- setAttribute(holder.parentNode, [A11Y_PRESENTATION()]);
221
- }
237
+ holder.parentNode.className += 'ht_master handsontable';
238
+ holder.parentNode.setAttribute('dir', this.wtSettings.getSettingPure('rtlMode') ? 'rtl' : 'ltr');
239
+ if (this.wtSettings.getSetting('ariaTags')) {
240
+ setAttribute(holder.parentNode, [A11Y_PRESENTATION()]);
222
241
  }
223
242
  holder.appendChild(hider);
224
243
  }
@@ -246,100 +265,89 @@ class Table {
246
265
  } = this.dataAccessObject;
247
266
  const totalRows = wtSettings.getSetting('totalRows');
248
267
  const totalColumns = wtSettings.getSetting('totalColumns');
249
- const rowHeaders = wtSettings.getSetting('rowHeaders');
268
+ const rowHeaders = wtSettings.getSetting('rowHeaders').map(origRowRenderer => {
269
+ return (row, TH, column) => {
270
+ const fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
271
+ const fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');
272
+ if (row < fixedRowsTop) {
273
+ let top = 0;
274
+ if (row >= 0) {
275
+ top = this.dataAccessObject.wtViewport.getColumnHeaderHeight() + this.dataAccessObject.wtOverlays.topOverlay.sumCellSizes(0, row);
276
+ }
277
+ TH.style.top = `${top}px`;
278
+ if (column < fixedColumnsStart) {
279
+ TH.style.zIndex = '20';
280
+ } else {
281
+ TH.style.zIndex = '10';
282
+ }
283
+ } else {
284
+ TH.style.top = '0px';
285
+ TH.style.zIndex = '3';
286
+ }
287
+ origRowRenderer(row, TH, column);
288
+ TH.style.position = 'sticky';
289
+ TH.style.left = '0px';
290
+ };
291
+ });
250
292
  const rowHeadersCount = rowHeaders.length;
251
- const columnHeaders = wtSettings.getSetting('columnHeaders');
293
+ const columnHeaders = wtSettings.getSetting('columnHeaders').map(origColumnRenderer => {
294
+ return (column, TH, row) => {
295
+ const fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
296
+ const fixedColumnsStart = this.wtSettings.getSetting('fixedColumnsStart');
297
+ if (column < fixedColumnsStart) {
298
+ let left = 0;
299
+ if (column >= 0) {
300
+ left = this.dataAccessObject.wtViewport.getRowHeaderWidth() + this.dataAccessObject.wtOverlays.inlineStartOverlay.sumCellSizes(0, column);
301
+ }
302
+ TH.style.left = `${left}px`;
303
+ if (row < fixedRowsTop) {
304
+ TH.style.zIndex = '20';
305
+ } else {
306
+ TH.style.zIndex = '10';
307
+ }
308
+ } else {
309
+ TH.style.zIndex = '3';
310
+ TH.style.left = '0px';
311
+ }
312
+ origColumnRenderer(column, TH, row);
313
+ TH.style.position = 'sticky';
314
+ TH.style.top = '0px';
315
+ };
316
+ });
252
317
  const columnHeadersCount = columnHeaders.length;
253
318
  let runFastDraw = fastDraw;
254
- if (this.isMaster) {
255
- wtOverlays.beforeDraw();
256
- this.holderOffset = offset(this.holder);
257
- runFastDraw = wtViewport.createCalculators(runFastDraw);
258
- if (rowHeadersCount && !wtSettings.getSetting('fixedColumnsStart')) {
259
- const leftScrollPos = wtOverlays.inlineStartOverlay.getScrollPosition();
260
- const previousState = this.correctHeaderWidth;
261
- this.correctHeaderWidth = leftScrollPos !== 0;
262
- if (previousState !== this.correctHeaderWidth) {
263
- runFastDraw = false;
264
- }
265
- }
266
- }
267
- if (runFastDraw) {
268
- if (this.isMaster) {
269
- wtOverlays.refresh(true);
270
- }
271
- } else {
272
- if (this.isMaster) {
273
- this.tableOffset = offset(this.TABLE);
274
- } else {
275
- this.tableOffset = this.dataAccessObject.parentTableOffset;
276
- }
319
+ wtOverlays.beforeDraw();
320
+ this.holderOffset = offset(this.holder);
321
+ runFastDraw = wtViewport.createCalculators(runFastDraw);
322
+ if (!runFastDraw) {
323
+ this.tableOffset = offset(this.TABLE);
277
324
  const startRow = totalRows > 0 ? this.getFirstRenderedRow() : 0;
278
325
  const startColumn = totalColumns > 0 ? this.getFirstRenderedColumn() : 0;
279
326
  this.rowFilter = new RowFilter(startRow, totalRows, columnHeadersCount);
280
327
  this.columnFilter = new ColumnFilter(startColumn, totalColumns, rowHeadersCount);
281
328
  let performRedraw = true;
282
-
283
- // Only master table rendering can be skipped
284
- if (this.isMaster) {
285
- this.alignOverlaysWithTrimmingContainer(); // todo It calls method from child class (MasterTable).
286
- const skipRender = {};
287
- this.wtSettings.getSetting('beforeDraw', true, skipRender);
288
- performRedraw = skipRender.skipRender !== true;
289
- }
329
+ this.alignOverlaysWithTrimmingContainer(); // todo It calls method from child class (MasterTable).
330
+ const skipRender = {};
331
+ this.wtSettings.getSetting('beforeDraw', true, skipRender);
332
+ performRedraw = skipRender.skipRender !== true;
290
333
  if (performRedraw) {
291
334
  this.tableRenderer.setHeaderContentRenderers(rowHeaders, columnHeaders);
292
- if (this.is(CLONE_BOTTOM) || this.is(CLONE_BOTTOM_INLINE_START_CORNER)) {
293
- // do NOT render headers on the bottom or bottom-left corner overlay
294
- this.tableRenderer.setHeaderContentRenderers(rowHeaders, []);
295
- }
296
335
  this.resetOversizedRows();
297
336
  this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(), this.getRenderedColumnsCount()).setFilters(this.rowFilter, this.columnFilter).render();
298
- if (this.isMaster) {
299
- this.markOversizedColumnHeaders();
300
- }
337
+ this.markOversizedColumnHeaders();
301
338
  this.adjustColumnHeaderHeights();
302
- if (this.isMaster || this.is(CLONE_BOTTOM)) {
303
- this.markOversizedRows();
339
+ this.markOversizedRows();
340
+ if (!this.wtSettings.getSetting('externalRowCalculator')) {
341
+ wtViewport.createVisibleCalculators();
304
342
  }
305
- if (this.isMaster) {
306
- if (!this.wtSettings.getSetting('externalRowCalculator')) {
307
- wtViewport.createVisibleCalculators();
308
- }
309
- wtOverlays.refresh(false);
310
- wtOverlays.applyToDOM();
311
- this.wtSettings.getSetting('onDraw', true);
312
- } else if (this.is(CLONE_BOTTOM)) {
313
- this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize();
314
- }
315
- }
316
- }
317
- let positionChanged = false;
318
- if (this.isMaster) {
319
- positionChanged = wtOverlays.topOverlay.resetFixedPosition();
320
- if (wtOverlays.bottomOverlay.clone) {
321
- positionChanged = wtOverlays.bottomOverlay.resetFixedPosition() || positionChanged;
322
- }
323
- positionChanged = wtOverlays.inlineStartOverlay.resetFixedPosition() || positionChanged;
324
- if (wtOverlays.topInlineStartCornerOverlay) {
325
- wtOverlays.topInlineStartCornerOverlay.resetFixedPosition();
326
- }
327
- if (wtOverlays.bottomInlineStartCornerOverlay && wtOverlays.bottomInlineStartCornerOverlay.clone) {
328
- wtOverlays.bottomInlineStartCornerOverlay.resetFixedPosition();
343
+ wtOverlays.adjustElementsSize();
344
+ // wtOverlays.draw(fastDraw);
345
+
346
+ this.wtSettings.getSetting('onDraw', true);
329
347
  }
330
348
  }
331
- if (positionChanged) {
332
- // It refreshes the cells borders caused by a 1px shift (introduced by overlays which add or
333
- // remove `innerBorderTop` and `innerBorderInlineStart` CSS classes to the DOM element. This happens
334
- // when there is a switch between rendering from 0 to N rows/columns and vice versa).
335
- wtOverlays.refreshAll(); // `refreshAll()` internally already calls `refreshSelections()` method
336
- wtOverlays.adjustElementsSize();
337
- } else {
338
- this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(runFastDraw);
339
- }
340
- if (this.isMaster) {
341
- wtOverlays.afterDraw();
342
- }
349
+ this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(runFastDraw);
350
+ wtOverlays.afterDraw();
343
351
  this.dataAccessObject.drawn = true;
344
352
  return this;
345
353
  }
@@ -411,9 +419,6 @@ class Table {
411
419
  const {
412
420
  wtViewport
413
421
  } = this.dataAccessObject;
414
- if (!this.isMaster && !this.is(CLONE_BOTTOM)) {
415
- return;
416
- }
417
422
  if (!wtSettings.getSetting('externalRowCalculator')) {
418
423
  const rowsToRender = this.getRenderedRowsCount();
419
424
 
@@ -449,7 +454,7 @@ class Table {
449
454
  getCell(coords) {
450
455
  let row = coords.row;
451
456
  let column = coords.col;
452
- const hookResult = this.wtSettings.getSetting('onModifyGetCellCoords', row, column, !this.isMaster, 'render');
457
+ const hookResult = this.wtSettings.getSetting('onModifyGetCellCoords', row, column, false, 'render');
453
458
  if (hookResult && Array.isArray(hookResult)) {
454
459
  [row, column] = hookResult;
455
460
  }
package/base.js CHANGED
@@ -45,8 +45,8 @@ Handsontable.hooks = _hooks.Hooks.getSingleton();
45
45
  Handsontable.CellCoords = _src.CellCoords;
46
46
  Handsontable.CellRange = _src.CellRange;
47
47
  Handsontable.packageName = 'handsontable';
48
- Handsontable.buildDate = "17/01/2025 11:44:14";
49
- Handsontable.version = "0.0.0-next-e2116ad-20250117";
48
+ Handsontable.buildDate = "21/01/2025 09:00:17";
49
+ Handsontable.version = "0.0.0-next-542a54e-20250121";
50
50
  Handsontable.languages = {
51
51
  dictionaryKeys: _registry.dictionaryKeys,
52
52
  getLanguageDictionary: _registry.getLanguageDictionary,
package/base.mjs CHANGED
@@ -35,8 +35,8 @@ Handsontable.hooks = Hooks.getSingleton();
35
35
  Handsontable.CellCoords = CellCoords;
36
36
  Handsontable.CellRange = CellRange;
37
37
  Handsontable.packageName = 'handsontable';
38
- Handsontable.buildDate = "17/01/2025 11:44:20";
39
- Handsontable.version = "0.0.0-next-e2116ad-20250117";
38
+ Handsontable.buildDate = "21/01/2025 09:00:22";
39
+ Handsontable.version = "0.0.0-next-542a54e-20250121";
40
40
  Handsontable.languages = {
41
41
  dictionaryKeys,
42
42
  getLanguageDictionary,
@@ -25,9 +25,11 @@
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: 0.0.0-next-e2116ad-20250117
29
- * Release date: 16/12/2024 (built at 17/01/2025 11:44:41)
28
+ * Version: 0.0.0-next-542a54e-20250121
29
+ * Release date: 16/12/2024 (built at 21/01/2025 09:00:44)
30
30
  */
31
+ @charset "UTF-8";
32
+
31
33
  /**
32
34
  * Fix for bootstrap styles
33
35
  */
@@ -356,20 +358,12 @@ innerBorderBottom - Property controlled by bottom overlay
356
358
  overflow: auto;
357
359
  }
358
360
 
359
- .handsontable .ht_master table.htCore > thead,
360
- .handsontable .ht_master table.htCore > tbody > tr > th,
361
- .handsontable .ht_clone_inline_start table.htCore > thead {
362
- visibility: hidden;
363
- }
364
-
365
361
  .ht_clone_top .wtHolder,
366
362
  .ht_clone_inline_start .wtHolder,
367
363
  .ht_clone_bottom .wtHolder {
368
364
  overflow: hidden;
369
365
  }
370
366
 
371
- @charset "UTF-8";
372
-
373
367
  .handsontable {
374
368
  position: relative;
375
369
  touch-action: manipulation;
@@ -1165,8 +1159,6 @@ textarea.HandsontableCopyPaste {
1165
1159
  outline: 0 none !important;
1166
1160
  }
1167
1161
 
1168
- @charset "UTF-8";
1169
-
1170
1162
  /*!
1171
1163
  * Handsontable DropdownMenu
1172
1164
  */
@@ -1315,8 +1307,6 @@ textarea.HandsontableCopyPaste {
1315
1307
  overflow: hidden;
1316
1308
  }
1317
1309
 
1318
- @charset "UTF-8";
1319
-
1320
1310
  /*!
1321
1311
  * Handsontable Filters
1322
1312
  */
@@ -1662,8 +1652,6 @@ textarea.HandsontableCopyPaste {
1662
1652
  padding-bottom: 5px;
1663
1653
  }
1664
1654
 
1665
- @charset "UTF-8";
1666
-
1667
1655
  /*
1668
1656
  * Handsontable HiddenColumns
1669
1657
  */
@@ -1722,8 +1710,6 @@ textarea.HandsontableCopyPaste {
1722
1710
  content: "◀"; /* left arrow */
1723
1711
  }
1724
1712
 
1725
- @charset "UTF-8";
1726
-
1727
1713
  /*!
1728
1714
  * Handsontable HiddenRows
1729
1715
  */
@@ -1990,8 +1976,6 @@ textarea.HandsontableCopyPaste {
1990
1976
  display: none;
1991
1977
  }
1992
1978
 
1993
- @charset "UTF-8";
1994
-
1995
1979
  .handsontable th.ht_nestingLevels {
1996
1980
  text-align: left;
1997
1981
  padding-left: 7px;