handsontable 0.0.0-next-02c94b0-20240416 → 0.0.0-next-c99a89d-20240418

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 (55) hide show
  1. package/3rdparty/walkontable/src/overlay/_base.js +24 -20
  2. package/3rdparty/walkontable/src/overlay/_base.mjs +24 -20
  3. package/3rdparty/walkontable/src/overlay/bottom.js +3 -6
  4. package/3rdparty/walkontable/src/overlay/bottom.mjs +3 -6
  5. package/3rdparty/walkontable/src/overlay/inlineStart.js +3 -6
  6. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +3 -6
  7. package/3rdparty/walkontable/src/overlay/top.js +3 -6
  8. package/3rdparty/walkontable/src/overlay/top.mjs +3 -6
  9. package/3rdparty/walkontable/src/overlays.js +46 -24
  10. package/3rdparty/walkontable/src/overlays.mjs +46 -24
  11. package/3rdparty/walkontable/src/table.js +10 -11
  12. package/3rdparty/walkontable/src/table.mjs +10 -11
  13. package/base.js +2 -2
  14. package/base.mjs +2 -2
  15. package/dataMap/metaManager/mods/extendMetaProperties.js +37 -31
  16. package/dataMap/metaManager/mods/extendMetaProperties.mjs +37 -31
  17. package/dist/handsontable.css +2 -2
  18. package/dist/handsontable.full.css +2 -2
  19. package/dist/handsontable.full.js +149 -129
  20. package/dist/handsontable.full.min.css +2 -2
  21. package/dist/handsontable.full.min.js +8 -8
  22. package/dist/handsontable.js +149 -129
  23. package/dist/handsontable.min.css +2 -2
  24. package/dist/handsontable.min.js +8 -8
  25. package/helpers/mixed.js +1 -1
  26. package/helpers/mixed.mjs +1 -1
  27. package/package.json +1 -1
  28. package/plugins/autoRowSize/autoRowSize.js +2 -2
  29. package/plugins/autoRowSize/autoRowSize.mjs +2 -2
  30. package/plugins/collapsibleColumns/collapsibleColumns.js +1 -1
  31. package/plugins/collapsibleColumns/collapsibleColumns.mjs +1 -1
  32. package/plugins/filters/filters.js +1 -1
  33. package/plugins/filters/filters.mjs +1 -1
  34. package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +1 -1
  35. package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +1 -1
  36. package/plugins/hiddenColumns/contextMenuItem/showColumn.js +1 -1
  37. package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +1 -1
  38. package/plugins/hiddenRows/contextMenuItem/hideRow.js +1 -1
  39. package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +1 -1
  40. package/plugins/hiddenRows/contextMenuItem/showRow.js +1 -1
  41. package/plugins/hiddenRows/contextMenuItem/showRow.mjs +1 -1
  42. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
  43. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
  44. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
  45. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
  46. package/plugins/manualColumnMove/manualColumnMove.js +1 -1
  47. package/plugins/manualColumnMove/manualColumnMove.mjs +1 -1
  48. package/plugins/manualColumnResize/manualColumnResize.js +2 -2
  49. package/plugins/manualColumnResize/manualColumnResize.mjs +2 -2
  50. package/plugins/manualRowMove/manualRowMove.js +1 -1
  51. package/plugins/manualRowMove/manualRowMove.mjs +1 -1
  52. package/plugins/manualRowResize/manualRowResize.js +2 -2
  53. package/plugins/manualRowResize/manualRowResize.mjs +2 -2
  54. package/tableView.js +1 -4
  55. package/tableView.mjs +1 -4
@@ -251,7 +251,6 @@ class Table {
251
251
  const rowHeadersCount = rowHeaders.length;
252
252
  const columnHeaders = wtSettings.getSetting('columnHeaders');
253
253
  const columnHeadersCount = columnHeaders.length;
254
- let syncScroll = false;
255
254
  let runFastDraw = fastDraw;
256
255
  if (this.isMaster) {
257
256
  this.holderOffset = (0, _element.offset)(this.holder);
@@ -266,7 +265,7 @@ class Table {
266
265
  }
267
266
  }
268
267
  if (this.isMaster) {
269
- syncScroll = wtOverlays.updateStateOfRendering();
268
+ wtOverlays.beforeDraw();
270
269
  }
271
270
  if (runFastDraw) {
272
271
  if (this.isMaster) {
@@ -307,7 +306,7 @@ class Table {
307
306
  let workspaceWidth;
308
307
  if (this.isMaster) {
309
308
  workspaceWidth = this.dataAccessObject.workspaceWidth;
310
- this.dataAccessObject.wtViewport.containerWidth = null;
309
+ wtViewport.containerWidth = null;
311
310
  this.markOversizedColumnHeaders();
312
311
  }
313
312
  this.adjustColumnHeaderHeights();
@@ -315,10 +314,10 @@ class Table {
315
314
  this.markOversizedRows();
316
315
  }
317
316
  if (this.isMaster) {
318
- this.dataAccessObject.wtViewport.createVisibleCalculators();
319
- this.dataAccessObject.wtViewport.createPartiallyVisibleCalculators();
320
- this.dataAccessObject.wtOverlays.refresh(false);
321
- this.dataAccessObject.wtOverlays.applyToDOM();
317
+ wtViewport.createVisibleCalculators();
318
+ wtViewport.createPartiallyVisibleCalculators();
319
+ wtOverlays.refresh(false);
320
+ wtOverlays.applyToDOM();
322
321
  const hiderWidth = (0, _element.outerWidth)(this.hider);
323
322
  const tableWidth = (0, _element.outerWidth)(this.TABLE);
324
323
  if (hiderWidth !== 0 && tableWidth !== hiderWidth) {
@@ -326,9 +325,9 @@ class Table {
326
325
  this.columnUtils.calculateWidths();
327
326
  this.tableRenderer.renderer.colGroup.render();
328
327
  }
329
- if (workspaceWidth !== this.dataAccessObject.wtViewport.getWorkspaceWidth()) {
328
+ if (workspaceWidth !== wtViewport.getWorkspaceWidth()) {
330
329
  // workspace width changed though to shown/hidden vertical scrollbar. Let's reapply stretching
331
- this.dataAccessObject.wtViewport.containerWidth = null;
330
+ wtViewport.containerWidth = null;
332
331
  this.columnUtils.calculateWidths();
333
332
  this.tableRenderer.renderer.colGroup.render();
334
333
  }
@@ -361,8 +360,8 @@ class Table {
361
360
  } else {
362
361
  this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(runFastDraw);
363
362
  }
364
- if (syncScroll) {
365
- wtOverlays.syncScrollWithMaster();
363
+ if (this.isMaster) {
364
+ wtOverlays.afterDraw();
366
365
  }
367
366
  this.dataAccessObject.drawn = true;
368
367
  return this;
@@ -247,7 +247,6 @@ class Table {
247
247
  const rowHeadersCount = rowHeaders.length;
248
248
  const columnHeaders = wtSettings.getSetting('columnHeaders');
249
249
  const columnHeadersCount = columnHeaders.length;
250
- let syncScroll = false;
251
250
  let runFastDraw = fastDraw;
252
251
  if (this.isMaster) {
253
252
  this.holderOffset = offset(this.holder);
@@ -262,7 +261,7 @@ class Table {
262
261
  }
263
262
  }
264
263
  if (this.isMaster) {
265
- syncScroll = wtOverlays.updateStateOfRendering();
264
+ wtOverlays.beforeDraw();
266
265
  }
267
266
  if (runFastDraw) {
268
267
  if (this.isMaster) {
@@ -303,7 +302,7 @@ class Table {
303
302
  let workspaceWidth;
304
303
  if (this.isMaster) {
305
304
  workspaceWidth = this.dataAccessObject.workspaceWidth;
306
- this.dataAccessObject.wtViewport.containerWidth = null;
305
+ wtViewport.containerWidth = null;
307
306
  this.markOversizedColumnHeaders();
308
307
  }
309
308
  this.adjustColumnHeaderHeights();
@@ -311,10 +310,10 @@ class Table {
311
310
  this.markOversizedRows();
312
311
  }
313
312
  if (this.isMaster) {
314
- this.dataAccessObject.wtViewport.createVisibleCalculators();
315
- this.dataAccessObject.wtViewport.createPartiallyVisibleCalculators();
316
- this.dataAccessObject.wtOverlays.refresh(false);
317
- this.dataAccessObject.wtOverlays.applyToDOM();
313
+ wtViewport.createVisibleCalculators();
314
+ wtViewport.createPartiallyVisibleCalculators();
315
+ wtOverlays.refresh(false);
316
+ wtOverlays.applyToDOM();
318
317
  const hiderWidth = outerWidth(this.hider);
319
318
  const tableWidth = outerWidth(this.TABLE);
320
319
  if (hiderWidth !== 0 && tableWidth !== hiderWidth) {
@@ -322,9 +321,9 @@ class Table {
322
321
  this.columnUtils.calculateWidths();
323
322
  this.tableRenderer.renderer.colGroup.render();
324
323
  }
325
- if (workspaceWidth !== this.dataAccessObject.wtViewport.getWorkspaceWidth()) {
324
+ if (workspaceWidth !== wtViewport.getWorkspaceWidth()) {
326
325
  // workspace width changed though to shown/hidden vertical scrollbar. Let's reapply stretching
327
- this.dataAccessObject.wtViewport.containerWidth = null;
326
+ wtViewport.containerWidth = null;
328
327
  this.columnUtils.calculateWidths();
329
328
  this.tableRenderer.renderer.colGroup.render();
330
329
  }
@@ -357,8 +356,8 @@ class Table {
357
356
  } else {
358
357
  this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(runFastDraw);
359
358
  }
360
- if (syncScroll) {
361
- wtOverlays.syncScrollWithMaster();
359
+ if (this.isMaster) {
360
+ wtOverlays.afterDraw();
362
361
  }
363
362
  this.dataAccessObject.drawn = true;
364
363
  return this;
package/base.js CHANGED
@@ -45,8 +45,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
45
45
  Handsontable.CellCoords = _src.CellCoords;
46
46
  Handsontable.CellRange = _src.CellRange;
47
47
  Handsontable.packageName = 'handsontable';
48
- Handsontable.buildDate = "16/04/2024 08:48:05";
49
- Handsontable.version = "0.0.0-next-02c94b0-20240416";
48
+ Handsontable.buildDate = "18/04/2024 10:59:56";
49
+ Handsontable.version = "0.0.0-next-c99a89d-20240418";
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 = "16/04/2024 08:48:11";
39
- Handsontable.version = "0.0.0-next-02c94b0-20240416";
38
+ Handsontable.buildDate = "18/04/2024 11:00:02";
39
+ Handsontable.version = "0.0.0-next-c99a89d-20240418";
40
40
  Handsontable.languages = {
41
41
  dictionaryKeys,
42
42
  getLanguageDictionary,
@@ -2,9 +2,15 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  require("core-js/modules/es.error.cause.js");
5
+ require("core-js/modules/es.array.push.js");
6
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
7
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
5
8
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
9
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
7
10
  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); }
11
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
12
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
13
+ var _initOnlyCallback = /*#__PURE__*/new WeakMap();
8
14
  /**
9
15
  * @class ExtendMetaPropertiesMod
10
16
  */
@@ -22,11 +28,7 @@ class ExtendMetaPropertiesMod {
22
28
  * @type {Map}
23
29
  */
24
30
  _defineProperty(this, "propDescriptors", new Map([['ariaTags', {
25
- onChange(propName, value, isInitialChange) {
26
- if (!isInitialChange) {
27
- throw new Error(`The \`${propName}\` option can not be updated after the Handsontable instance was initialized.`);
28
- }
29
- }
31
+ initOnly: true
30
32
  }], ['fixedColumnsLeft', {
31
33
  target: 'fixedColumnsStart',
32
34
  onChange(propName) {
@@ -39,48 +41,52 @@ class ExtendMetaPropertiesMod {
39
41
  }
40
42
  }
41
43
  }], ['layoutDirection', {
42
- onChange(propName, value, isInitialChange) {
43
- if (!isInitialChange) {
44
- throw new Error(`The \`${propName}\` option can not be updated after the Handsontable is initialized.`);
45
- }
44
+ initOnly: true
45
+ }], ['renderAllColumns', {
46
+ initOnly: true
47
+ }], ['renderAllRows', {
48
+ initOnly: true
49
+ }]]));
50
+ /**
51
+ * Callback called when the prop is marked as `initOnly`.
52
+ *
53
+ * @param {string} propName The property name.
54
+ * @param {*} value The new value.
55
+ * @param {boolean} isInitialChange Is the change initial.
56
+ */
57
+ _classPrivateFieldInitSpec(this, _initOnlyCallback, (propName, value, isInitialChange) => {
58
+ if (!isInitialChange) {
59
+ throw new Error(`The \`${propName}\` option can not be updated after the Handsontable is initialized.`);
46
60
  }
47
- }]
48
- // Temporary commented out due to the bug in the React wrapper.
49
- // ['renderAllColumns', {
50
- // onChange(propName, value, isInitialChange) {
51
- // if (!isInitialChange) {
52
- // throw new Error(`The \`${propName}\` option can not be updated after the Handsontable is initialized.`);
53
- // }
54
- // }
55
- // }],
56
- // ['renderAllRows', {
57
- // onChange(propName, value, isInitialChange) {
58
- // if (!isInitialChange) {
59
- // throw new Error(`The \`${propName}\` option can not be updated after the Handsontable is initialized.`);
60
- // }
61
- // }
62
- // }],
63
- ]));
61
+ });
64
62
  this.metaManager = metaManager;
65
63
  this.extendMetaProps();
66
64
  }
67
-
68
65
  /**
69
66
  * Extends the meta options based on the object descriptors from the `propDescriptors` list.
70
67
  */
71
68
  extendMetaProps() {
72
69
  this.propDescriptors.forEach((descriptor, alias) => {
73
70
  const {
71
+ initOnly,
74
72
  target,
75
- onChange = () => {}
73
+ onChange
76
74
  } = descriptor;
77
75
  const hasTarget = typeof target === 'string';
78
76
  const targetProp = hasTarget ? target : alias;
79
77
  const origProp = `_${targetProp}`;
80
78
  this.metaManager.globalMeta.meta[origProp] = this.metaManager.globalMeta.meta[targetProp];
81
- this.installPropWatcher(alias, origProp, onChange);
82
- if (hasTarget) {
83
- this.installPropWatcher(target, origProp, onChange);
79
+ if (onChange) {
80
+ this.installPropWatcher(alias, origProp, onChange);
81
+ if (hasTarget) {
82
+ this.installPropWatcher(target, origProp, onChange);
83
+ }
84
+ } else if (initOnly) {
85
+ this.installPropWatcher(alias, origProp, _classPrivateFieldGet(_initOnlyCallback, this));
86
+ if (!this.metaManager.globalMeta.meta._initOnlySettings) {
87
+ this.metaManager.globalMeta.meta._initOnlySettings = [];
88
+ }
89
+ this.metaManager.globalMeta.meta._initOnlySettings.push(alias);
84
90
  }
85
91
  });
86
92
  }
@@ -1,7 +1,13 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
+ import "core-js/modules/es.array.push.js";
3
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
4
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
2
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
7
  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); }
8
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
9
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
10
+ var _initOnlyCallback = /*#__PURE__*/new WeakMap();
5
11
  /**
6
12
  * @class ExtendMetaPropertiesMod
7
13
  */
@@ -19,11 +25,7 @@ export class ExtendMetaPropertiesMod {
19
25
  * @type {Map}
20
26
  */
21
27
  _defineProperty(this, "propDescriptors", new Map([['ariaTags', {
22
- onChange(propName, value, isInitialChange) {
23
- if (!isInitialChange) {
24
- throw new Error(`The \`${propName}\` option can not be updated after the Handsontable instance was initialized.`);
25
- }
26
- }
28
+ initOnly: true
27
29
  }], ['fixedColumnsLeft', {
28
30
  target: 'fixedColumnsStart',
29
31
  onChange(propName) {
@@ -36,48 +38,52 @@ export class ExtendMetaPropertiesMod {
36
38
  }
37
39
  }
38
40
  }], ['layoutDirection', {
39
- onChange(propName, value, isInitialChange) {
40
- if (!isInitialChange) {
41
- throw new Error(`The \`${propName}\` option can not be updated after the Handsontable is initialized.`);
42
- }
41
+ initOnly: true
42
+ }], ['renderAllColumns', {
43
+ initOnly: true
44
+ }], ['renderAllRows', {
45
+ initOnly: true
46
+ }]]));
47
+ /**
48
+ * Callback called when the prop is marked as `initOnly`.
49
+ *
50
+ * @param {string} propName The property name.
51
+ * @param {*} value The new value.
52
+ * @param {boolean} isInitialChange Is the change initial.
53
+ */
54
+ _classPrivateFieldInitSpec(this, _initOnlyCallback, (propName, value, isInitialChange) => {
55
+ if (!isInitialChange) {
56
+ throw new Error(`The \`${propName}\` option can not be updated after the Handsontable is initialized.`);
43
57
  }
44
- }]
45
- // Temporary commented out due to the bug in the React wrapper.
46
- // ['renderAllColumns', {
47
- // onChange(propName, value, isInitialChange) {
48
- // if (!isInitialChange) {
49
- // throw new Error(`The \`${propName}\` option can not be updated after the Handsontable is initialized.`);
50
- // }
51
- // }
52
- // }],
53
- // ['renderAllRows', {
54
- // onChange(propName, value, isInitialChange) {
55
- // if (!isInitialChange) {
56
- // throw new Error(`The \`${propName}\` option can not be updated after the Handsontable is initialized.`);
57
- // }
58
- // }
59
- // }],
60
- ]));
58
+ });
61
59
  this.metaManager = metaManager;
62
60
  this.extendMetaProps();
63
61
  }
64
-
65
62
  /**
66
63
  * Extends the meta options based on the object descriptors from the `propDescriptors` list.
67
64
  */
68
65
  extendMetaProps() {
69
66
  this.propDescriptors.forEach((descriptor, alias) => {
70
67
  const {
68
+ initOnly,
71
69
  target,
72
- onChange = () => {}
70
+ onChange
73
71
  } = descriptor;
74
72
  const hasTarget = typeof target === 'string';
75
73
  const targetProp = hasTarget ? target : alias;
76
74
  const origProp = `_${targetProp}`;
77
75
  this.metaManager.globalMeta.meta[origProp] = this.metaManager.globalMeta.meta[targetProp];
78
- this.installPropWatcher(alias, origProp, onChange);
79
- if (hasTarget) {
80
- this.installPropWatcher(target, origProp, onChange);
76
+ if (onChange) {
77
+ this.installPropWatcher(alias, origProp, onChange);
78
+ if (hasTarget) {
79
+ this.installPropWatcher(target, origProp, onChange);
80
+ }
81
+ } else if (initOnly) {
82
+ this.installPropWatcher(alias, origProp, _classPrivateFieldGet(_initOnlyCallback, this));
83
+ if (!this.metaManager.globalMeta.meta._initOnlySettings) {
84
+ this.metaManager.globalMeta.meta._initOnlySettings = [];
85
+ }
86
+ this.metaManager.globalMeta.meta._initOnlySettings.push(alias);
81
87
  }
82
88
  });
83
89
  }
@@ -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: 0.0.0-next-02c94b0-20240416
29
- * Release date: 16/04/2024 (built at 16/04/2024 08:48:15)
28
+ * Version: 0.0.0-next-c99a89d-20240418
29
+ * Release date: 16/04/2024 (built at 18/04/2024 11:00:07)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles
@@ -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: 0.0.0-next-02c94b0-20240416
29
- * Release date: 16/04/2024 (built at 16/04/2024 08:48:15)
28
+ * Version: 0.0.0-next-c99a89d-20240418
29
+ * Release date: 16/04/2024 (built at 18/04/2024 11:00:07)
30
30
  */
31
31
  /**
32
32
  * Fix for bootstrap styles