handsontable 0.0.0-next-4b40c99-20241108 → 0.0.0-next-bb36dee-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.
- package/3rdparty/walkontable/src/calculator/index.js +1 -2
- package/3rdparty/walkontable/src/calculator/index.mjs +2 -2
- package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +3 -3
- package/3rdparty/walkontable/src/core/_base.js +3 -0
- package/3rdparty/walkontable/src/core/_base.mjs +3 -0
- package/3rdparty/walkontable/src/core/clone.js +1 -0
- package/3rdparty/walkontable/src/core/clone.mjs +1 -0
- package/3rdparty/walkontable/src/core/core.js +2 -0
- package/3rdparty/walkontable/src/core/core.mjs +2 -0
- package/3rdparty/walkontable/src/facade/core.js +3 -0
- package/3rdparty/walkontable/src/facade/core.mjs +3 -0
- package/3rdparty/walkontable/src/index.js +0 -1
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +3 -1
- package/3rdparty/walkontable/src/overlay/_base.mjs +3 -1
- package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
- package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/top.js +1 -1
- package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/index.js +4 -2
- package/3rdparty/walkontable/src/renderer/index.mjs +4 -2
- package/3rdparty/walkontable/src/renderer/table.js +12 -3
- package/3rdparty/walkontable/src/renderer/table.mjs +12 -3
- package/3rdparty/walkontable/src/settings.js +0 -2
- package/3rdparty/walkontable/src/settings.mjs +0 -2
- package/3rdparty/walkontable/src/table.js +15 -9
- package/3rdparty/walkontable/src/table.mjs +15 -9
- package/3rdparty/walkontable/src/types.js +1 -0
- package/3rdparty/walkontable/src/types.mjs +1 -0
- package/3rdparty/walkontable/src/utils/column.js +1 -1
- package/3rdparty/walkontable/src/utils/column.mjs +1 -1
- package/3rdparty/walkontable/src/utils/stylesHandler.js +272 -0
- package/3rdparty/walkontable/src/utils/stylesHandler.mjs +268 -0
- package/3rdparty/walkontable/src/viewport.js +1 -0
- package/3rdparty/walkontable/src/viewport.mjs +1 -0
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/hooks/constants.js +8 -0
- package/core/hooks/constants.mjs +8 -0
- package/core/hooks/index.d.ts +1 -0
- package/core.d.ts +2 -0
- package/core.js +47 -0
- package/core.mjs +47 -0
- package/dataMap/metaManager/metaSchema.js +23 -3
- package/dataMap/metaManager/metaSchema.mjs +23 -3
- package/dist/handsontable.css +17 -9
- package/dist/handsontable.full.css +249 -240
- package/dist/handsontable.full.js +4521 -4217
- package/dist/handsontable.full.min.css +11 -9
- package/dist/handsontable.full.min.js +53 -53
- package/dist/handsontable.js +4228 -3918
- package/dist/handsontable.min.css +5 -4
- package/dist/handsontable.min.js +23 -23
- package/editors/autocompleteEditor/autocompleteEditor.js +1 -1
- package/editors/autocompleteEditor/autocompleteEditor.mjs +1 -1
- package/editors/baseEditor/baseEditor.js +1 -1
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/dateEditor/dateEditor.js +7 -0
- package/editors/dateEditor/dateEditor.mjs +8 -1
- package/editors/handsontableEditor/handsontableEditor.js +5 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +5 -1
- package/editors/selectEditor/selectEditor.js +20 -9
- package/editors/selectEditor/selectEditor.mjs +20 -9
- package/editors/textEditor/textEditor.js +4 -11
- package/editors/textEditor/textEditor.mjs +4 -11
- package/focusManager.js +5 -7
- package/focusManager.mjs +5 -7
- package/helpers/dom/element.js +32 -1
- package/helpers/dom/element.mjs +31 -1
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/helpers/themes.js +17 -0
- package/helpers/themes.mjs +13 -0
- package/package.json +10 -3
- package/plugins/comments/commentEditor.js +9 -0
- package/plugins/comments/commentEditor.mjs +9 -0
- package/plugins/comments/comments.js +9 -0
- package/plugins/comments/comments.mjs +10 -1
- package/plugins/contextMenu/contextMenu.d.ts +2 -1
- package/plugins/contextMenu/menu/menu.js +7 -4
- package/plugins/contextMenu/menu/menu.mjs +7 -4
- package/plugins/copyPaste/copyPaste.d.ts +1 -0
- package/plugins/dropdownMenu/dropdownMenu.d.ts +2 -1
- package/plugins/filters/ui/multipleSelect.js +4 -0
- package/plugins/filters/ui/multipleSelect.mjs +4 -0
- package/plugins/manualRowMove/manualRowMove.js +1 -1
- package/plugins/manualRowMove/manualRowMove.mjs +1 -1
- package/plugins/manualRowResize/manualRowResize.js +1 -2
- package/plugins/manualRowResize/manualRowResize.mjs +2 -3
- package/plugins/mergeCells/mergeCells.js +1 -1
- package/plugins/mergeCells/mergeCells.mjs +1 -1
- package/plugins/nestedRows/ui/headers.js +7 -1
- package/plugins/nestedRows/ui/headers.mjs +7 -1
- package/plugins/stretchColumns/calculator.js +2 -1
- package/plugins/stretchColumns/calculator.mjs +3 -2
- package/settings.d.ts +1 -0
- package/styles/handsontable.css +2053 -0
- package/styles/handsontable.min.css +30 -0
- package/styles/ht-theme-horizon.css +571 -0
- package/styles/ht-theme-horizon.min.css +30 -0
- package/styles/ht-theme-main.css +575 -0
- package/styles/ht-theme-main.min.css +30 -0
- package/tableView.js +46 -0
- package/tableView.mjs +47 -1
- package/utils/autoResize.js +4 -1
- package/utils/autoResize.mjs +4 -1
- package/utils/ghostTable.js +5 -3
- package/utils/ghostTable.mjs +5 -3
@@ -234,6 +234,7 @@ class Comments extends _base.BasePlugin {
|
|
234
234
|
this.addHook('afterScroll', () => _assertClassBrand(_Comments_brand, this, _onAfterScroll).call(this));
|
235
235
|
this.addHook('afterBeginEditing', () => this.hide());
|
236
236
|
this.addHook('afterDocumentKeyDown', event => _assertClassBrand(_Comments_brand, this, _onAfterDocumentKeyDown).call(this, event));
|
237
|
+
this.addHook('afterSetTheme', () => _assertClassBrand(_Comments_brand, this, _updateEditorThemeClassName).call(this));
|
237
238
|
_classPrivateFieldGet(_displaySwitch, this).addLocalHook('hide', () => this.hide());
|
238
239
|
_classPrivateFieldGet(_displaySwitch, this).addLocalHook('show', (row, col) => this.showAtCell(row, col));
|
239
240
|
this.registerShortcuts();
|
@@ -788,4 +789,12 @@ function _onAfterScroll() {
|
|
788
789
|
if (!_classPrivateFieldGet(_preventEditorHiding, this)) {
|
789
790
|
this.hide();
|
790
791
|
}
|
792
|
+
}
|
793
|
+
/**
|
794
|
+
* Updates the editor theme class name.
|
795
|
+
*/
|
796
|
+
function _updateEditorThemeClassName() {
|
797
|
+
const editorElement = _classPrivateFieldGet(_editor, this).getEditorElement();
|
798
|
+
(0, _element.removeClass)(editorElement, /ht-theme-.*/g);
|
799
|
+
(0, _element.addClass)(editorElement, this.hot.getCurrentThemeName());
|
791
800
|
}
|
@@ -9,7 +9,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
9
9
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
10
10
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
11
11
|
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"); }
|
12
|
-
import { addClass, closest, isChildOf, hasClass, outerHeight } from "../../helpers/dom/element.mjs";
|
12
|
+
import { addClass, removeClass, closest, isChildOf, hasClass, outerHeight } from "../../helpers/dom/element.mjs";
|
13
13
|
import { stopImmediatePropagation } from "../../helpers/dom/event.mjs";
|
14
14
|
import { deepClone, deepExtend } from "../../helpers/object.mjs";
|
15
15
|
import { BasePlugin } from "../base/index.mjs";
|
@@ -230,6 +230,7 @@ export class Comments extends BasePlugin {
|
|
230
230
|
this.addHook('afterScroll', () => _assertClassBrand(_Comments_brand, this, _onAfterScroll).call(this));
|
231
231
|
this.addHook('afterBeginEditing', () => this.hide());
|
232
232
|
this.addHook('afterDocumentKeyDown', event => _assertClassBrand(_Comments_brand, this, _onAfterDocumentKeyDown).call(this, event));
|
233
|
+
this.addHook('afterSetTheme', () => _assertClassBrand(_Comments_brand, this, _updateEditorThemeClassName).call(this));
|
233
234
|
_classPrivateFieldGet(_displaySwitch, this).addLocalHook('hide', () => this.hide());
|
234
235
|
_classPrivateFieldGet(_displaySwitch, this).addLocalHook('show', (row, col) => this.showAtCell(row, col));
|
235
236
|
this.registerShortcuts();
|
@@ -783,4 +784,12 @@ function _onAfterScroll() {
|
|
783
784
|
if (!_classPrivateFieldGet(_preventEditorHiding, this)) {
|
784
785
|
this.hide();
|
785
786
|
}
|
787
|
+
}
|
788
|
+
/**
|
789
|
+
* Updates the editor theme class name.
|
790
|
+
*/
|
791
|
+
function _updateEditorThemeClassName() {
|
792
|
+
const editorElement = _classPrivateFieldGet(_editor, this).getEditorElement();
|
793
|
+
removeClass(editorElement, /ht-theme-.*/g);
|
794
|
+
addClass(editorElement, this.hot.getCurrentThemeName());
|
786
795
|
}
|
@@ -49,7 +49,8 @@ export interface SubmenuItemConfig extends Omit<MenuItemConfig, "key"> {
|
|
49
49
|
|
50
50
|
export interface DetailedSettings {
|
51
51
|
callback?: (key: string, selection: Selection[], clickEvent: MouseEvent) => void;
|
52
|
-
|
52
|
+
uiContainer?: HTMLElement,
|
53
|
+
items?: PredefinedMenuItemKey[] | MenuConfig;
|
53
54
|
}
|
54
55
|
|
55
56
|
export type Settings = boolean | PredefinedMenuItemKey[] | DetailedSettings;
|
@@ -162,6 +162,10 @@ class Menu {
|
|
162
162
|
return _this.parentMenu.runLocalHooks('afterSelectionChange', ...args);
|
163
163
|
});
|
164
164
|
}
|
165
|
+
this.hot.addHook('afterSetTheme', themeName => {
|
166
|
+
var _this$hotMenu;
|
167
|
+
(_this$hotMenu = this.hotMenu) === null || _this$hotMenu === void 0 || _this$hotMenu.useTheme(themeName);
|
168
|
+
});
|
165
169
|
}
|
166
170
|
|
167
171
|
/**
|
@@ -286,6 +290,7 @@ class Menu {
|
|
286
290
|
disableVisualSelection: 'area',
|
287
291
|
layoutDirection: this.hot.isRtl() ? 'rtl' : 'ltr',
|
288
292
|
ariaTags: false,
|
293
|
+
themeName: this.hot.getCurrentThemeName(),
|
289
294
|
beforeOnCellMouseOver: (event, coords) => {
|
290
295
|
_classPrivateFieldGet(_navigator, this).setCurrentPage(coords.row);
|
291
296
|
},
|
@@ -579,10 +584,8 @@ class Menu {
|
|
579
584
|
const currentRowHeight = itemCell ? (0, _element.outerHeight)(this.hotMenu.getCell(index, 0)) : 0;
|
580
585
|
return accumulator + (value.name === _predefinedItems.SEPARATOR ? 1 : currentRowHeight);
|
581
586
|
}, 0);
|
582
|
-
|
583
|
-
|
584
|
-
holderStyle.width = `${currentHiderWidth + 3}px`;
|
585
|
-
holderStyle.height = `${realHeight + 3}px`;
|
587
|
+
holderStyle.width = `${currentHiderWidth}px`;
|
588
|
+
holderStyle.height = `${realHeight}px`;
|
586
589
|
hiderStyle.height = holderStyle.height;
|
587
590
|
}
|
588
591
|
|
@@ -158,6 +158,10 @@ export class Menu {
|
|
158
158
|
return _this.parentMenu.runLocalHooks('afterSelectionChange', ...args);
|
159
159
|
});
|
160
160
|
}
|
161
|
+
this.hot.addHook('afterSetTheme', themeName => {
|
162
|
+
var _this$hotMenu;
|
163
|
+
(_this$hotMenu = this.hotMenu) === null || _this$hotMenu === void 0 || _this$hotMenu.useTheme(themeName);
|
164
|
+
});
|
161
165
|
}
|
162
166
|
|
163
167
|
/**
|
@@ -282,6 +286,7 @@ export class Menu {
|
|
282
286
|
disableVisualSelection: 'area',
|
283
287
|
layoutDirection: this.hot.isRtl() ? 'rtl' : 'ltr',
|
284
288
|
ariaTags: false,
|
289
|
+
themeName: this.hot.getCurrentThemeName(),
|
285
290
|
beforeOnCellMouseOver: (event, coords) => {
|
286
291
|
_classPrivateFieldGet(_navigator, this).setCurrentPage(coords.row);
|
287
292
|
},
|
@@ -575,10 +580,8 @@ export class Menu {
|
|
575
580
|
const currentRowHeight = itemCell ? outerHeight(this.hotMenu.getCell(index, 0)) : 0;
|
576
581
|
return accumulator + (value.name === SEPARATOR ? 1 : currentRowHeight);
|
577
582
|
}, 0);
|
578
|
-
|
579
|
-
|
580
|
-
holderStyle.width = `${currentHiderWidth + 3}px`;
|
581
|
-
holderStyle.height = `${realHeight + 3}px`;
|
583
|
+
holderStyle.width = `${currentHiderWidth}px`;
|
584
|
+
holderStyle.height = `${realHeight}px`;
|
582
585
|
hiderStyle.height = holderStyle.height;
|
583
586
|
}
|
584
587
|
|
@@ -8,7 +8,8 @@ export interface SeparatorObject {
|
|
8
8
|
|
9
9
|
export interface DetailedSettings {
|
10
10
|
callback?: (key: string, selection: Selection[], clickEvent: MouseEvent) => void;
|
11
|
-
|
11
|
+
uiContainer?: HTMLElement,
|
12
|
+
items?: PredefinedMenuItemKey[] | MenuConfig;
|
12
13
|
}
|
13
14
|
|
14
15
|
export type Settings = boolean | PredefinedMenuItemKey[] | DetailedSettings;
|
@@ -265,9 +265,13 @@ class MultipleSelectUI extends _base.BaseUI {
|
|
265
265
|
row: 1,
|
266
266
|
col: 0
|
267
267
|
},
|
268
|
+
themeName: this.hot.getCurrentThemeName(),
|
268
269
|
layoutDirection: this.hot.isRtl() ? 'rtl' : 'ltr'
|
269
270
|
}));
|
270
271
|
_classPrivateFieldGet(_itemsBox, this).init();
|
272
|
+
this.hot.addHook('afterSetTheme', () => {
|
273
|
+
_classPrivateFieldGet(_itemsBox, this).useTheme(this.hot.getCurrentThemeName());
|
274
|
+
});
|
271
275
|
const shortcutManager = _classPrivateFieldGet(_itemsBox, this).getShortcutManager();
|
272
276
|
const gridContext = shortcutManager.getContext('grid');
|
273
277
|
gridContext.removeShortcutsByKeys(['Tab']);
|
@@ -260,9 +260,13 @@ export class MultipleSelectUI extends BaseUI {
|
|
260
260
|
row: 1,
|
261
261
|
col: 0
|
262
262
|
},
|
263
|
+
themeName: this.hot.getCurrentThemeName(),
|
263
264
|
layoutDirection: this.hot.isRtl() ? 'rtl' : 'ltr'
|
264
265
|
}));
|
265
266
|
_classPrivateFieldGet(_itemsBox, this).init();
|
267
|
+
this.hot.addHook('afterSetTheme', () => {
|
268
|
+
_classPrivateFieldGet(_itemsBox, this).useTheme(this.hot.getCurrentThemeName());
|
269
|
+
});
|
266
270
|
const shortcutManager = _classPrivateFieldGet(_itemsBox, this).getShortcutManager();
|
267
271
|
const gridContext = shortcutManager.getContext('grid');
|
268
272
|
gridContext.removeShortcutsByKeys(['Tab']);
|
@@ -319,7 +319,7 @@ class ManualRowMove extends _base.BasePlugin {
|
|
319
319
|
for (let visualRowIndex = fromRow; visualRowIndex <= toRow; visualRowIndex++) {
|
320
320
|
const renderableIndex = rowMapper.getRenderableFromVisualIndex(visualRowIndex);
|
321
321
|
if (renderableIndex !== null) {
|
322
|
-
rowsHeight += this.hot.view._wt.wtTable.getRowHeight(renderableIndex) ||
|
322
|
+
rowsHeight += this.hot.view._wt.wtTable.getRowHeight(renderableIndex) || this.hot.view.getDefaultRowHeight();
|
323
323
|
}
|
324
324
|
}
|
325
325
|
return rowsHeight;
|
@@ -315,7 +315,7 @@ export class ManualRowMove extends BasePlugin {
|
|
315
315
|
for (let visualRowIndex = fromRow; visualRowIndex <= toRow; visualRowIndex++) {
|
316
316
|
const renderableIndex = rowMapper.getRenderableFromVisualIndex(visualRowIndex);
|
317
317
|
if (renderableIndex !== null) {
|
318
|
-
rowsHeight += this.hot.view._wt.wtTable.getRowHeight(renderableIndex) ||
|
318
|
+
rowsHeight += this.hot.view._wt.wtTable.getRowHeight(renderableIndex) || this.hot.view.getDefaultRowHeight();
|
319
319
|
}
|
320
320
|
}
|
321
321
|
return rowsHeight;
|
@@ -10,7 +10,6 @@ var _element = require("../../helpers/dom/element");
|
|
10
10
|
var _array = require("../../helpers/array");
|
11
11
|
var _number = require("../../helpers/number");
|
12
12
|
var _translations = require("../../translations");
|
13
|
-
var _src = require("../../3rdparty/walkontable/src");
|
14
13
|
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
15
14
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
16
15
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
@@ -229,7 +228,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
229
228
|
*/
|
230
229
|
setManualSize(row, height) {
|
231
230
|
const physicalRow = this.hot.toPhysicalRow(row);
|
232
|
-
const newHeight = Math.max(height,
|
231
|
+
const newHeight = Math.max(height, this.hot.view.getDefaultRowHeight());
|
233
232
|
_classPrivateFieldGet(_rowHeightsMap, this).setValueAtIndex(physicalRow, newHeight);
|
234
233
|
return newHeight;
|
235
234
|
}
|
@@ -12,8 +12,7 @@ import { BasePlugin } from "../base/index.mjs";
|
|
12
12
|
import { addClass, closest, hasClass, removeClass, outerWidth, isDetached } from "../../helpers/dom/element.mjs";
|
13
13
|
import { arrayEach } from "../../helpers/array.mjs";
|
14
14
|
import { rangeEach } from "../../helpers/number.mjs";
|
15
|
-
import { PhysicalIndexToValueMap as IndexToValueMap } from "../../translations/index.mjs";
|
16
|
-
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
|
15
|
+
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
|
17
16
|
export const PLUGIN_KEY = 'manualRowResize';
|
18
17
|
export const PLUGIN_PRIORITY = 30;
|
19
18
|
const PERSISTENT_STATE_KEY = 'manualRowHeights';
|
@@ -224,7 +223,7 @@ export class ManualRowResize extends BasePlugin {
|
|
224
223
|
*/
|
225
224
|
setManualSize(row, height) {
|
226
225
|
const physicalRow = this.hot.toPhysicalRow(row);
|
227
|
-
const newHeight = Math.max(height,
|
226
|
+
const newHeight = Math.max(height, this.hot.view.getDefaultRowHeight());
|
228
227
|
_classPrivateFieldGet(_rowHeightsMap, this).setValueAtIndex(physicalRow, newHeight);
|
229
228
|
return newHeight;
|
230
229
|
}
|
@@ -1496,7 +1496,7 @@ function _onModifyRowHeightByOverlayName(height, row, overlayType) {
|
|
1496
1496
|
* @returns {number}
|
1497
1497
|
*/
|
1498
1498
|
function _sumCellsHeights(row, rowspan) {
|
1499
|
-
const defaultHeight = this.hot.view.
|
1499
|
+
const defaultHeight = this.hot.view.getDefaultRowHeight();
|
1500
1500
|
const autoRowSizePlugin = this.hot.getPlugin('autoRowSize');
|
1501
1501
|
let height = 0;
|
1502
1502
|
for (let i = row; i < row + rowspan; i++) {
|
@@ -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.
|
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++) {
|
@@ -125,7 +125,13 @@ class HeadersUI extends _base.default {
|
|
125
125
|
if (!deepestLevelIndex) {
|
126
126
|
deepestLevelIndex = this.dataManager.cache.levelCount;
|
127
127
|
}
|
128
|
-
|
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
|
-
|
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
|
}
|
@@ -127,11 +127,12 @@ function _willVerticalScrollAppear() {
|
|
127
127
|
}
|
128
128
|
const viewportHeight = view.getViewportHeight();
|
129
129
|
const totalRows = _classPrivateFieldGet(_hot, this).countRows();
|
130
|
+
const defaultRowHeight = view.getStylesHandler().getDefaultRowHeight();
|
130
131
|
let totalHeight = 0;
|
131
132
|
let hasVerticalScroll = false;
|
132
133
|
for (let row = 0; row < totalRows; row++) {
|
133
134
|
var _classPrivateFieldGet2;
|
134
|
-
totalHeight += ((_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getRowHeight(row)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 :
|
135
|
+
totalHeight += ((_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getRowHeight(row)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : defaultRowHeight) + (row === 0 ? 1 : 0);
|
135
136
|
if (totalHeight > viewportHeight) {
|
136
137
|
hasVerticalScroll = true;
|
137
138
|
break;
|
@@ -7,7 +7,7 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
|
|
7
7
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
8
8
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
9
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
|
-
import { DEFAULT_COLUMN_WIDTH
|
10
|
+
import { DEFAULT_COLUMN_WIDTH } from "../../3rdparty/walkontable/src/index.mjs";
|
11
11
|
import { getScrollbarWidth } from "../../helpers/dom/element.mjs";
|
12
12
|
import { StretchAllStrategy } from "./strategies/all.mjs";
|
13
13
|
import { StretchLastStrategy } from "./strategies/last.mjs";
|
@@ -123,11 +123,12 @@ function _willVerticalScrollAppear() {
|
|
123
123
|
}
|
124
124
|
const viewportHeight = view.getViewportHeight();
|
125
125
|
const totalRows = _classPrivateFieldGet(_hot, this).countRows();
|
126
|
+
const defaultRowHeight = view.getStylesHandler().getDefaultRowHeight();
|
126
127
|
let totalHeight = 0;
|
127
128
|
let hasVerticalScroll = false;
|
128
129
|
for (let row = 0; row < totalRows; row++) {
|
129
130
|
var _classPrivateFieldGet2;
|
130
|
-
totalHeight += ((_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getRowHeight(row)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 :
|
131
|
+
totalHeight += ((_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getRowHeight(row)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : defaultRowHeight) + (row === 0 ? 1 : 0);
|
131
132
|
if (totalHeight > viewportHeight) {
|
132
133
|
hasVerticalScroll = true;
|
133
134
|
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;
|