handsontable 0.0.0-next-5b14d3c-20241107 → 0.0.0-next-6129043-20241108

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 (99) hide show
  1. package/3rdparty/walkontable/src/calculator/index.js +1 -2
  2. package/3rdparty/walkontable/src/calculator/index.mjs +2 -2
  3. package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
  4. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +3 -3
  5. package/3rdparty/walkontable/src/core/_base.js +3 -0
  6. package/3rdparty/walkontable/src/core/_base.mjs +3 -0
  7. package/3rdparty/walkontable/src/core/clone.js +1 -0
  8. package/3rdparty/walkontable/src/core/clone.mjs +1 -0
  9. package/3rdparty/walkontable/src/core/core.js +2 -0
  10. package/3rdparty/walkontable/src/core/core.mjs +2 -0
  11. package/3rdparty/walkontable/src/facade/core.js +3 -0
  12. package/3rdparty/walkontable/src/facade/core.mjs +3 -0
  13. package/3rdparty/walkontable/src/index.js +0 -1
  14. package/3rdparty/walkontable/src/index.mjs +2 -2
  15. package/3rdparty/walkontable/src/overlay/_base.js +3 -1
  16. package/3rdparty/walkontable/src/overlay/_base.mjs +3 -1
  17. package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
  18. package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
  19. package/3rdparty/walkontable/src/overlay/top.js +1 -1
  20. package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
  21. package/3rdparty/walkontable/src/renderer/index.js +4 -2
  22. package/3rdparty/walkontable/src/renderer/index.mjs +4 -2
  23. package/3rdparty/walkontable/src/renderer/table.js +12 -3
  24. package/3rdparty/walkontable/src/renderer/table.mjs +12 -3
  25. package/3rdparty/walkontable/src/settings.js +0 -2
  26. package/3rdparty/walkontable/src/settings.mjs +0 -2
  27. package/3rdparty/walkontable/src/table.js +15 -9
  28. package/3rdparty/walkontable/src/table.mjs +15 -9
  29. package/3rdparty/walkontable/src/types.js +1 -0
  30. package/3rdparty/walkontable/src/types.mjs +1 -0
  31. package/3rdparty/walkontable/src/utils/column.js +1 -1
  32. package/3rdparty/walkontable/src/utils/column.mjs +1 -1
  33. package/3rdparty/walkontable/src/utils/stylesHandler.js +271 -0
  34. package/3rdparty/walkontable/src/utils/stylesHandler.mjs +267 -0
  35. package/3rdparty/walkontable/src/viewport.js +1 -0
  36. package/3rdparty/walkontable/src/viewport.mjs +1 -0
  37. package/base.js +2 -2
  38. package/base.mjs +2 -2
  39. package/core.d.ts +2 -0
  40. package/core.js +46 -0
  41. package/core.mjs +46 -0
  42. package/dataMap/metaManager/metaSchema.js +23 -3
  43. package/dataMap/metaManager/metaSchema.mjs +23 -3
  44. package/dist/handsontable.css +17 -9
  45. package/dist/handsontable.full.css +249 -240
  46. package/dist/handsontable.full.js +4119 -3840
  47. package/dist/handsontable.full.min.css +11 -9
  48. package/dist/handsontable.full.min.js +26 -26
  49. package/dist/handsontable.js +3826 -3541
  50. package/dist/handsontable.min.css +5 -4
  51. package/dist/handsontable.min.js +24 -24
  52. package/editors/autocompleteEditor/autocompleteEditor.js +1 -1
  53. package/editors/autocompleteEditor/autocompleteEditor.mjs +1 -1
  54. package/editors/baseEditor/baseEditor.js +1 -1
  55. package/editors/baseEditor/baseEditor.mjs +1 -1
  56. package/editors/dateEditor/dateEditor.js +2 -0
  57. package/editors/dateEditor/dateEditor.mjs +2 -0
  58. package/editors/handsontableEditor/handsontableEditor.js +2 -1
  59. package/editors/handsontableEditor/handsontableEditor.mjs +2 -1
  60. package/editors/selectEditor/selectEditor.js +20 -9
  61. package/editors/selectEditor/selectEditor.mjs +20 -9
  62. package/editors/textEditor/textEditor.js +4 -11
  63. package/editors/textEditor/textEditor.mjs +4 -11
  64. package/helpers/dom/element.js +31 -0
  65. package/helpers/dom/element.mjs +30 -0
  66. package/helpers/mixed.js +2 -2
  67. package/helpers/mixed.mjs +2 -2
  68. package/helpers/themes.js +17 -0
  69. package/helpers/themes.mjs +13 -0
  70. package/package.json +10 -3
  71. package/plugins/comments/commentEditor.js +9 -0
  72. package/plugins/comments/commentEditor.mjs +9 -0
  73. package/plugins/comments/comments.js +8 -0
  74. package/plugins/comments/comments.mjs +8 -0
  75. package/plugins/contextMenu/menu/menu.js +3 -4
  76. package/plugins/contextMenu/menu/menu.mjs +3 -4
  77. package/plugins/manualRowMove/manualRowMove.js +1 -1
  78. package/plugins/manualRowMove/manualRowMove.mjs +1 -1
  79. package/plugins/manualRowResize/manualRowResize.js +1 -2
  80. package/plugins/manualRowResize/manualRowResize.mjs +2 -3
  81. package/plugins/mergeCells/mergeCells.js +1 -1
  82. package/plugins/mergeCells/mergeCells.mjs +1 -1
  83. package/plugins/nestedRows/ui/headers.js +7 -1
  84. package/plugins/nestedRows/ui/headers.mjs +7 -1
  85. package/plugins/stretchColumns/calculator.js +2 -1
  86. package/plugins/stretchColumns/calculator.mjs +3 -2
  87. package/settings.d.ts +1 -0
  88. package/styles/handsontable.css +2053 -0
  89. package/styles/handsontable.min.css +30 -0
  90. package/styles/ht-theme-horizon.css +571 -0
  91. package/styles/ht-theme-horizon.min.css +30 -0
  92. package/styles/ht-theme-main.css +575 -0
  93. package/styles/ht-theme-main.min.css +30 -0
  94. package/tableView.js +46 -0
  95. package/tableView.mjs +47 -1
  96. package/utils/autoResize.js +4 -1
  97. package/utils/autoResize.mjs +4 -1
  98. package/utils/ghostTable.js +5 -3
  99. package/utils/ghostTable.mjs +5 -3
@@ -10,8 +10,7 @@ import { BasePlugin } from "../base/index.mjs";
10
10
  import { addClass, closest, hasClass, removeClass, outerWidth, isDetached } from "../../helpers/dom/element.mjs";
11
11
  import { arrayEach } from "../../helpers/array.mjs";
12
12
  import { rangeEach } from "../../helpers/number.mjs";
13
- import { PhysicalIndexToValueMap as IndexToValueMap } from "../../translations/index.mjs";
14
- import { DEFAULT_ROW_HEIGHT } from "../../3rdparty/walkontable/src/index.mjs"; // Developer note! Whenever you make a change in this file, make an analogous change in manualColumnResize.js
13
+ import { PhysicalIndexToValueMap as IndexToValueMap } from "../../translations/index.mjs"; // Developer note! Whenever you make a change in this file, make an analogous change in manualColumnResize.js
15
14
  export const PLUGIN_KEY = 'manualRowResize';
16
15
  export const PLUGIN_PRIORITY = 30;
17
16
  const PERSISTENT_STATE_KEY = 'manualRowHeights';
@@ -222,7 +221,7 @@ export class ManualRowResize extends BasePlugin {
222
221
  */
223
222
  setManualSize(row, height) {
224
223
  const physicalRow = this.hot.toPhysicalRow(row);
225
- const newHeight = Math.max(height, DEFAULT_ROW_HEIGHT);
224
+ const newHeight = Math.max(height, this.hot.view.getDefaultRowHeight());
226
225
  _classPrivateFieldGet(_rowHeightsMap, this).setValueAtIndex(physicalRow, newHeight);
227
226
  return newHeight;
228
227
  }
@@ -1491,7 +1491,7 @@ function _onModifyRowHeightByOverlayName(height, row, overlayType) {
1491
1491
  * @returns {number}
1492
1492
  */
1493
1493
  function _sumCellsHeights(row, rowspan) {
1494
- const defaultHeight = this.hot.view._wt.wtSettings.getSettingPure('defaultRowHeight');
1494
+ const defaultHeight = this.hot.view.getDefaultRowHeight();
1495
1495
  const autoRowSizePlugin = this.hot.getPlugin('autoRowSize');
1496
1496
  let height = 0;
1497
1497
  for (let i = row; i < row + rowspan; i++) {
@@ -1486,7 +1486,7 @@ function _onModifyRowHeightByOverlayName(height, row, overlayType) {
1486
1486
  * @returns {number}
1487
1487
  */
1488
1488
  function _sumCellsHeights(row, rowspan) {
1489
- const defaultHeight = this.hot.view._wt.wtSettings.getSettingPure('defaultRowHeight');
1489
+ const defaultHeight = this.hot.view.getDefaultRowHeight();
1490
1490
  const autoRowSizePlugin = this.hot.getPlugin('autoRowSize');
1491
1491
  let height = 0;
1492
1492
  for (let i = row; i < row + rowspan; i++) {
@@ -125,7 +125,13 @@ class HeadersUI extends _base.default {
125
125
  if (!deepestLevelIndex) {
126
126
  deepestLevelIndex = this.dataManager.cache.levelCount;
127
127
  }
128
- this.rowHeaderWidthCache = Math.max(50, 11 + 10 * deepestLevelIndex + 25);
128
+ const stylesHandler = this.hot.view.getStylesHandler();
129
+ let completeVerticalPadding = 11;
130
+ if (!stylesHandler.isClassicTheme()) {
131
+ const verticalPadding = stylesHandler.getCSSVariableValue('cell-horizontal-padding');
132
+ completeVerticalPadding = verticalPadding * 2;
133
+ }
134
+ this.rowHeaderWidthCache = Math.max(50, completeVerticalPadding + 10 * deepestLevelIndex + 25);
129
135
  this.hot.render();
130
136
  }
131
137
  }
@@ -121,7 +121,13 @@ class HeadersUI extends BaseUI {
121
121
  if (!deepestLevelIndex) {
122
122
  deepestLevelIndex = this.dataManager.cache.levelCount;
123
123
  }
124
- this.rowHeaderWidthCache = Math.max(50, 11 + 10 * deepestLevelIndex + 25);
124
+ const stylesHandler = this.hot.view.getStylesHandler();
125
+ let completeVerticalPadding = 11;
126
+ if (!stylesHandler.isClassicTheme()) {
127
+ const verticalPadding = stylesHandler.getCSSVariableValue('cell-horizontal-padding');
128
+ completeVerticalPadding = verticalPadding * 2;
129
+ }
130
+ this.rowHeaderWidthCache = Math.max(50, completeVerticalPadding + 10 * deepestLevelIndex + 25);
125
131
  this.hot.render();
126
132
  }
127
133
  }
@@ -125,11 +125,12 @@ function _willVerticalScrollAppear() {
125
125
  }
126
126
  const viewportHeight = view.getViewportHeight();
127
127
  const totalRows = _classPrivateFieldGet(_hot, this).countRows();
128
+ const defaultRowHeight = view.getStylesHandler().getDefaultRowHeight();
128
129
  let totalHeight = 0;
129
130
  let hasVerticalScroll = false;
130
131
  for (let row = 0; row < totalRows; row++) {
131
132
  var _classPrivateFieldGet2;
132
- totalHeight += ((_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getRowHeight(row)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : _src.DEFAULT_ROW_HEIGHT) + (row === 0 ? 1 : 0);
133
+ totalHeight += ((_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getRowHeight(row)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : defaultRowHeight) + (row === 0 ? 1 : 0);
133
134
  if (totalHeight > viewportHeight) {
134
135
  hasVerticalScroll = true;
135
136
  break;
@@ -5,7 +5,7 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
5
5
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
6
6
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
7
7
  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"); }
8
- import { DEFAULT_COLUMN_WIDTH, DEFAULT_ROW_HEIGHT } from "../../3rdparty/walkontable/src/index.mjs";
8
+ import { DEFAULT_COLUMN_WIDTH } from "../../3rdparty/walkontable/src/index.mjs";
9
9
  import { getScrollbarWidth } from "../../helpers/dom/element.mjs";
10
10
  import { StretchAllStrategy } from "./strategies/all.mjs";
11
11
  import { StretchLastStrategy } from "./strategies/last.mjs";
@@ -121,11 +121,12 @@ function _willVerticalScrollAppear() {
121
121
  }
122
122
  const viewportHeight = view.getViewportHeight();
123
123
  const totalRows = _classPrivateFieldGet(_hot, this).countRows();
124
+ const defaultRowHeight = view.getStylesHandler().getDefaultRowHeight();
124
125
  let totalHeight = 0;
125
126
  let hasVerticalScroll = false;
126
127
  for (let row = 0; row < totalRows; row++) {
127
128
  var _classPrivateFieldGet2;
128
- totalHeight += ((_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getRowHeight(row)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : DEFAULT_ROW_HEIGHT) + (row === 0 ? 1 : 0);
129
+ totalHeight += ((_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getRowHeight(row)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : defaultRowHeight) + (row === 0 ? 1 : 0);
129
130
  if (totalHeight > viewportHeight) {
130
131
  hasVerticalScroll = true;
131
132
  break;
package/settings.d.ts CHANGED
@@ -214,6 +214,7 @@ export interface GridSettings extends Events {
214
214
  strict?: boolean;
215
215
  tableClassName?: string | string[];
216
216
  tabMoves?: CellCoords | SimpleCellCoords | ((event: KeyboardEvent) => CellCoords | SimpleCellCoords);
217
+ themeName?: string;
217
218
  title?: string;
218
219
  trimDropdown?: boolean;
219
220
  trimRows?: TrimRowsSettings;