handsontable 12.3.1 → 12.3.2-next-e75de58-20230322

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. package/3rdparty/walkontable/src/calculator/viewportColumns.js +31 -9
  2. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +31 -9
  3. package/3rdparty/walkontable/src/calculator/viewportRows.js +21 -6
  4. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +21 -6
  5. package/3rdparty/walkontable/src/core/_base.js +19 -20
  6. package/3rdparty/walkontable/src/core/_base.mjs +19 -20
  7. package/3rdparty/walkontable/src/scroll.js +14 -3
  8. package/3rdparty/walkontable/src/scroll.mjs +14 -3
  9. package/3rdparty/walkontable/src/table.js +4 -2
  10. package/3rdparty/walkontable/src/table.mjs +4 -2
  11. package/3rdparty/walkontable/src/types.js +1 -0
  12. package/3rdparty/walkontable/src/types.mjs +1 -0
  13. package/3rdparty/walkontable/src/viewport.js +11 -14
  14. package/3rdparty/walkontable/src/viewport.mjs +11 -14
  15. package/CHANGELOG.md +1156 -494
  16. package/base.js +2 -2
  17. package/base.mjs +2 -2
  18. package/core.js +32 -21
  19. package/core.mjs +32 -21
  20. package/dataMap/metaManager/metaSchema.js +9 -9
  21. package/dataMap/metaManager/metaSchema.mjs +9 -9
  22. package/dist/handsontable.css +2 -2
  23. package/dist/handsontable.full.css +2 -2
  24. package/dist/handsontable.full.js +4631 -3987
  25. package/dist/handsontable.full.min.css +8 -8
  26. package/dist/handsontable.full.min.js +241 -227
  27. package/dist/handsontable.js +2753 -2435
  28. package/dist/handsontable.min.css +7 -7
  29. package/dist/handsontable.min.js +3 -3
  30. package/dist/languages/all.js +1 -1
  31. package/dist/languages/all.min.js +1 -1
  32. package/dist/languages/zh-CN.js +1 -1
  33. package/dist/languages/zh-CN.min.js +1 -1
  34. package/editors/autocompleteEditor/autocompleteEditor.js +8 -9
  35. package/editors/autocompleteEditor/autocompleteEditor.mjs +8 -9
  36. package/helpers/mixed.js +2 -2
  37. package/helpers/mixed.mjs +2 -2
  38. package/i18n/languages/zh-CN.js +1 -1
  39. package/i18n/languages/zh-CN.mjs +3 -3
  40. package/languages/all.js +1 -1
  41. package/languages/index.js +1 -1
  42. package/languages/zh-CN.js +1 -1
  43. package/languages/zh-CN.mjs +3 -3
  44. package/package.json +12 -13
  45. package/plugins/base/base.js +9 -10
  46. package/plugins/base/base.mjs +9 -10
  47. package/plugins/collapsibleColumns/collapsibleColumns.js +24 -7
  48. package/plugins/collapsibleColumns/collapsibleColumns.mjs +24 -7
  49. package/plugins/copyPaste/copyPaste.js +92 -16
  50. package/plugins/copyPaste/copyPaste.mjs +92 -16
  51. package/plugins/copyPaste/copyableRanges.js +14 -8
  52. package/plugins/copyPaste/copyableRanges.mjs +14 -8
  53. package/plugins/customBorders/customBorders.js +6 -7
  54. package/plugins/customBorders/customBorders.mjs +6 -7
  55. package/plugins/filters/filters.js +0 -8
  56. package/plugins/filters/filters.mjs +0 -8
  57. package/plugins/formulas/formulas.js +34 -7
  58. package/plugins/formulas/formulas.mjs +34 -7
  59. package/plugins/hiddenColumns/hiddenColumns.js +12 -7
  60. package/plugins/hiddenColumns/hiddenColumns.mjs +12 -7
  61. package/plugins/hiddenRows/hiddenRows.js +12 -7
  62. package/plugins/hiddenRows/hiddenRows.mjs +12 -7
  63. package/plugins/nestedHeaders/nestedHeaders.js +26 -7
  64. package/plugins/nestedHeaders/nestedHeaders.mjs +26 -7
  65. package/plugins/nestedHeaders/stateManager/index.js +18 -0
  66. package/plugins/nestedHeaders/stateManager/index.mjs +18 -0
  67. package/plugins/nestedHeaders/stateManager/sourceSettings.js +19 -0
  68. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +19 -0
  69. package/translations/changesObservable/observer.js +7 -0
  70. package/translations/changesObservable/observer.mjs +7 -0
  71. package/translations/maps/linkedPhysicalIndexToValueMap.js +6 -0
  72. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +6 -0
@@ -303,13 +303,10 @@ var Viewport = /*#__PURE__*/function () {
303
303
  height = this.getViewportHeight();
304
304
  }
305
305
  var pos = this.dataAccessObject.topScrollPosition - this.dataAccessObject.topParentOffset;
306
- if (pos < 0) {
307
- pos = 0;
308
- }
309
306
  var fixedRowsTop = wtSettings.getSetting('fixedRowsTop');
310
307
  var fixedRowsBottom = wtSettings.getSetting('fixedRowsBottom');
311
308
  var totalRows = wtSettings.getSetting('totalRows');
312
- if (fixedRowsTop) {
309
+ if (fixedRowsTop && pos >= 0) {
313
310
  fixedRowsHeight = this.dataAccessObject.topOverlay.sumCellSizes(0, fixedRowsTop);
314
311
  pos += fixedRowsHeight;
315
312
  height -= fixedRowsHeight;
@@ -354,11 +351,8 @@ var Viewport = /*#__PURE__*/function () {
354
351
  var width = this.getViewportWidth();
355
352
  var pos = Math.abs(this.dataAccessObject.inlineStartScrollPosition) - this.dataAccessObject.inlineStartParentOffset;
356
353
  this.columnHeaderHeight = NaN;
357
- if (pos < 0) {
358
- pos = 0;
359
- }
360
354
  var fixedColumnsStart = wtSettings.getSetting('fixedColumnsStart');
361
- if (fixedColumnsStart) {
355
+ if (fixedColumnsStart && pos >= 0) {
362
356
  var fixedColumnsWidth = this.dataAccessObject.inlineStartOverlay.sumCellSizes(0, fixedColumnsStart);
363
357
  pos += fixedColumnsWidth;
364
358
  width -= fixedColumnsWidth;
@@ -368,7 +362,7 @@ var Viewport = /*#__PURE__*/function () {
368
362
  }
369
363
  return new _calculator.ViewportColumnsCalculator({
370
364
  viewportSize: width,
371
- scrollOffset: Math.abs(pos),
365
+ scrollOffset: pos,
372
366
  totalItems: wtSettings.getSetting('totalColumns'),
373
367
  itemSizeFn: function itemSizeFn(sourceCol) {
374
368
  return wtTable.getColumnWidth(sourceCol);
@@ -378,7 +372,8 @@ var Viewport = /*#__PURE__*/function () {
378
372
  stretchMode: wtSettings.getSetting('stretchH'),
379
373
  stretchingItemWidthFn: function stretchingItemWidthFn(stretchedWidth, column) {
380
374
  return wtSettings.getSetting('onBeforeStretchingColumnWidth', stretchedWidth, column);
381
- }
375
+ },
376
+ inlineStartOffset: this.dataAccessObject.inlineStartParentOffset
382
377
  });
383
378
  }
384
379
 
@@ -438,11 +433,12 @@ var Viewport = /*#__PURE__*/function () {
438
433
  return false;
439
434
  }
440
435
  var startRow = proposedRowsVisibleCalculator.startRow,
441
- endRow = proposedRowsVisibleCalculator.endRow;
436
+ endRow = proposedRowsVisibleCalculator.endRow,
437
+ isVisibleInTrimmingContainer = proposedRowsVisibleCalculator.isVisibleInTrimmingContainer;
442
438
 
443
439
  // if there are no fully visible rows at all, return false
444
440
  if (startRow === null && endRow === null) {
445
- return false;
441
+ return !isVisibleInTrimmingContainer;
446
442
  }
447
443
  var _this$rowsRenderCalcu = this.rowsRenderCalculator,
448
444
  renderedStartRow = _this$rowsRenderCalcu.startRow,
@@ -470,11 +466,12 @@ var Viewport = /*#__PURE__*/function () {
470
466
  return false;
471
467
  }
472
468
  var startColumn = proposedColumnsVisibleCalculator.startColumn,
473
- endColumn = proposedColumnsVisibleCalculator.endColumn;
469
+ endColumn = proposedColumnsVisibleCalculator.endColumn,
470
+ isVisibleInTrimmingContainer = proposedColumnsVisibleCalculator.isVisibleInTrimmingContainer;
474
471
 
475
472
  // if there are no fully visible columns at all, return false
476
473
  if (startColumn === null && endColumn === null) {
477
- return false;
474
+ return !isVisibleInTrimmingContainer;
478
475
  }
479
476
  var _this$columnsRenderCa = this.columnsRenderCalculator,
480
477
  renderedStartColumn = _this$columnsRenderCa.startColumn,
@@ -299,13 +299,10 @@ var Viewport = /*#__PURE__*/function () {
299
299
  height = this.getViewportHeight();
300
300
  }
301
301
  var pos = this.dataAccessObject.topScrollPosition - this.dataAccessObject.topParentOffset;
302
- if (pos < 0) {
303
- pos = 0;
304
- }
305
302
  var fixedRowsTop = wtSettings.getSetting('fixedRowsTop');
306
303
  var fixedRowsBottom = wtSettings.getSetting('fixedRowsBottom');
307
304
  var totalRows = wtSettings.getSetting('totalRows');
308
- if (fixedRowsTop) {
305
+ if (fixedRowsTop && pos >= 0) {
309
306
  fixedRowsHeight = this.dataAccessObject.topOverlay.sumCellSizes(0, fixedRowsTop);
310
307
  pos += fixedRowsHeight;
311
308
  height -= fixedRowsHeight;
@@ -350,11 +347,8 @@ var Viewport = /*#__PURE__*/function () {
350
347
  var width = this.getViewportWidth();
351
348
  var pos = Math.abs(this.dataAccessObject.inlineStartScrollPosition) - this.dataAccessObject.inlineStartParentOffset;
352
349
  this.columnHeaderHeight = NaN;
353
- if (pos < 0) {
354
- pos = 0;
355
- }
356
350
  var fixedColumnsStart = wtSettings.getSetting('fixedColumnsStart');
357
- if (fixedColumnsStart) {
351
+ if (fixedColumnsStart && pos >= 0) {
358
352
  var fixedColumnsWidth = this.dataAccessObject.inlineStartOverlay.sumCellSizes(0, fixedColumnsStart);
359
353
  pos += fixedColumnsWidth;
360
354
  width -= fixedColumnsWidth;
@@ -364,7 +358,7 @@ var Viewport = /*#__PURE__*/function () {
364
358
  }
365
359
  return new ViewportColumnsCalculator({
366
360
  viewportSize: width,
367
- scrollOffset: Math.abs(pos),
361
+ scrollOffset: pos,
368
362
  totalItems: wtSettings.getSetting('totalColumns'),
369
363
  itemSizeFn: function itemSizeFn(sourceCol) {
370
364
  return wtTable.getColumnWidth(sourceCol);
@@ -374,7 +368,8 @@ var Viewport = /*#__PURE__*/function () {
374
368
  stretchMode: wtSettings.getSetting('stretchH'),
375
369
  stretchingItemWidthFn: function stretchingItemWidthFn(stretchedWidth, column) {
376
370
  return wtSettings.getSetting('onBeforeStretchingColumnWidth', stretchedWidth, column);
377
- }
371
+ },
372
+ inlineStartOffset: this.dataAccessObject.inlineStartParentOffset
378
373
  });
379
374
  }
380
375
 
@@ -434,11 +429,12 @@ var Viewport = /*#__PURE__*/function () {
434
429
  return false;
435
430
  }
436
431
  var startRow = proposedRowsVisibleCalculator.startRow,
437
- endRow = proposedRowsVisibleCalculator.endRow;
432
+ endRow = proposedRowsVisibleCalculator.endRow,
433
+ isVisibleInTrimmingContainer = proposedRowsVisibleCalculator.isVisibleInTrimmingContainer;
438
434
 
439
435
  // if there are no fully visible rows at all, return false
440
436
  if (startRow === null && endRow === null) {
441
- return false;
437
+ return !isVisibleInTrimmingContainer;
442
438
  }
443
439
  var _this$rowsRenderCalcu = this.rowsRenderCalculator,
444
440
  renderedStartRow = _this$rowsRenderCalcu.startRow,
@@ -466,11 +462,12 @@ var Viewport = /*#__PURE__*/function () {
466
462
  return false;
467
463
  }
468
464
  var startColumn = proposedColumnsVisibleCalculator.startColumn,
469
- endColumn = proposedColumnsVisibleCalculator.endColumn;
465
+ endColumn = proposedColumnsVisibleCalculator.endColumn,
466
+ isVisibleInTrimmingContainer = proposedColumnsVisibleCalculator.isVisibleInTrimmingContainer;
470
467
 
471
468
  // if there are no fully visible columns at all, return false
472
469
  if (startColumn === null && endColumn === null) {
473
- return false;
470
+ return !isVisibleInTrimmingContainer;
474
471
  }
475
472
  var _this$columnsRenderCa = this.columnsRenderCalculator,
476
473
  renderedStartColumn = _this$columnsRenderCa.startColumn,