handsontable 0.0.0-next-b93496c-20241118 → 0.0.0-next-0407ae0-20241118
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 +2 -1
- 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 +0 -3
- package/3rdparty/walkontable/src/core/_base.mjs +0 -3
- package/3rdparty/walkontable/src/core/clone.js +0 -1
- package/3rdparty/walkontable/src/core/clone.mjs +0 -1
- package/3rdparty/walkontable/src/core/core.js +0 -2
- package/3rdparty/walkontable/src/core/core.mjs +0 -2
- package/3rdparty/walkontable/src/facade/core.js +0 -3
- package/3rdparty/walkontable/src/facade/core.mjs +0 -3
- package/3rdparty/walkontable/src/index.js +1 -0
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +1 -3
- package/3rdparty/walkontable/src/overlay/_base.mjs +1 -3
- 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 +2 -4
- package/3rdparty/walkontable/src/renderer/index.mjs +2 -4
- package/3rdparty/walkontable/src/renderer/table.js +3 -12
- package/3rdparty/walkontable/src/renderer/table.mjs +3 -12
- package/3rdparty/walkontable/src/settings.js +2 -0
- package/3rdparty/walkontable/src/settings.mjs +2 -0
- package/3rdparty/walkontable/src/table.js +9 -17
- package/3rdparty/walkontable/src/table.mjs +9 -17
- package/3rdparty/walkontable/src/types.js +0 -1
- package/3rdparty/walkontable/src/types.mjs +0 -1
- package/3rdparty/walkontable/src/utils/column.js +1 -1
- package/3rdparty/walkontable/src/utils/column.mjs +1 -1
- package/3rdparty/walkontable/src/viewport.js +0 -1
- package/3rdparty/walkontable/src/viewport.mjs +0 -1
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/hooks/constants.js +0 -9
- package/core/hooks/constants.mjs +0 -9
- package/core/hooks/index.d.ts +0 -1
- package/core.d.ts +0 -2
- package/core.js +0 -47
- package/core.mjs +0 -47
- package/dataMap/metaManager/metaSchema.js +3 -23
- package/dataMap/metaManager/metaSchema.mjs +3 -23
- package/dist/handsontable.css +9 -17
- package/dist/handsontable.full.css +240 -249
- package/dist/handsontable.full.js +4218 -4552
- package/dist/handsontable.full.min.css +9 -11
- package/dist/handsontable.full.min.js +53 -53
- package/dist/handsontable.js +3919 -4259
- package/dist/handsontable.min.css +4 -5
- package/dist/handsontable.min.js +24 -24
- 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 +0 -9
- package/editors/dateEditor/dateEditor.mjs +1 -10
- package/editors/handsontableEditor/handsontableEditor.js +1 -7
- package/editors/handsontableEditor/handsontableEditor.mjs +1 -7
- package/editors/selectEditor/selectEditor.js +9 -20
- package/editors/selectEditor/selectEditor.mjs +9 -20
- package/editors/textEditor/textEditor.js +11 -4
- package/editors/textEditor/textEditor.mjs +11 -4
- package/helpers/dom/element.js +1 -32
- package/helpers/dom/element.mjs +1 -31
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/package.json +3 -10
- package/plugins/comments/commentEditor.js +0 -9
- package/plugins/comments/commentEditor.mjs +0 -9
- package/plugins/comments/comments.js +0 -14
- package/plugins/comments/comments.mjs +1 -15
- package/plugins/contextMenu/menu/menu.js +4 -9
- package/plugins/contextMenu/menu/menu.mjs +4 -9
- package/plugins/filters/ui/multipleSelect.js +0 -6
- package/plugins/filters/ui/multipleSelect.mjs +0 -6
- package/plugins/manualRowMove/manualRowMove.js +1 -1
- package/plugins/manualRowMove/manualRowMove.mjs +1 -1
- package/plugins/manualRowResize/manualRowResize.js +2 -1
- package/plugins/manualRowResize/manualRowResize.mjs +3 -2
- package/plugins/mergeCells/mergeCells.js +1 -1
- package/plugins/mergeCells/mergeCells.mjs +1 -1
- package/plugins/nestedRows/ui/headers.js +1 -7
- package/plugins/nestedRows/ui/headers.mjs +1 -7
- package/plugins/stretchColumns/calculator.js +1 -2
- package/plugins/stretchColumns/calculator.mjs +2 -3
- package/renderers/checkboxRenderer/checkboxRenderer.js +8 -5
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +8 -5
- package/settings.d.ts +0 -1
- package/tableView.js +0 -46
- package/tableView.mjs +1 -47
- package/utils/autoResize.js +1 -4
- package/utils/autoResize.mjs +1 -4
- package/utils/ghostTable.js +3 -5
- package/utils/ghostTable.mjs +3 -5
- package/3rdparty/walkontable/src/utils/stylesHandler.js +0 -287
- package/3rdparty/walkontable/src/utils/stylesHandler.mjs +0 -283
- package/helpers/themes.js +0 -17
- package/helpers/themes.mjs +0 -13
- package/styles/handsontable.css +0 -2165
- package/styles/handsontable.min.css +0 -30
- package/styles/ht-theme-horizon.css +0 -607
- package/styles/ht-theme-horizon.min.css +0 -30
- package/styles/ht-theme-main.css +0 -613
- package/styles/ht-theme-main.min.css +0 -30
@@ -158,12 +158,6 @@ export class Menu {
|
|
158
158
|
return _this.parentMenu.runLocalHooks('afterSelectionChange', ...args);
|
159
159
|
});
|
160
160
|
}
|
161
|
-
this.hot.addHook('afterSetTheme', (themeName, firstRun) => {
|
162
|
-
if (!firstRun) {
|
163
|
-
var _this$hotMenu;
|
164
|
-
(_this$hotMenu = this.hotMenu) === null || _this$hotMenu === void 0 || _this$hotMenu.useTheme(themeName);
|
165
|
-
}
|
166
|
-
});
|
167
161
|
}
|
168
162
|
|
169
163
|
/**
|
@@ -288,7 +282,6 @@ export class Menu {
|
|
288
282
|
disableVisualSelection: 'area',
|
289
283
|
layoutDirection: this.hot.isRtl() ? 'rtl' : 'ltr',
|
290
284
|
ariaTags: false,
|
291
|
-
themeName: this.hot.getCurrentThemeName(),
|
292
285
|
beforeOnCellMouseOver: (event, coords) => {
|
293
286
|
_classPrivateFieldGet(_navigator, this).setCurrentPage(coords.row);
|
294
287
|
},
|
@@ -582,8 +575,10 @@ export class Menu {
|
|
582
575
|
const currentRowHeight = itemCell ? outerHeight(this.hotMenu.getCell(index, 0)) : 0;
|
583
576
|
return accumulator + (value.name === SEPARATOR ? 1 : currentRowHeight);
|
584
577
|
}, 0);
|
585
|
-
|
586
|
-
|
578
|
+
|
579
|
+
// Additional 3px to menu's size because of additional border around its `table.htCore`.
|
580
|
+
holderStyle.width = `${currentHiderWidth + 3}px`;
|
581
|
+
holderStyle.height = `${realHeight + 3}px`;
|
587
582
|
hiderStyle.height = holderStyle.height;
|
588
583
|
}
|
589
584
|
|
@@ -265,15 +265,9 @@ class MultipleSelectUI extends _base.BaseUI {
|
|
265
265
|
row: 1,
|
266
266
|
col: 0
|
267
267
|
},
|
268
|
-
themeName: this.hot.getCurrentThemeName(),
|
269
268
|
layoutDirection: this.hot.isRtl() ? 'rtl' : 'ltr'
|
270
269
|
}));
|
271
270
|
_classPrivateFieldGet(_itemsBox, this).init();
|
272
|
-
this.hot.addHook('afterSetTheme', (themeName, firstRun) => {
|
273
|
-
if (!firstRun) {
|
274
|
-
_classPrivateFieldGet(_itemsBox, this).useTheme(themeName);
|
275
|
-
}
|
276
|
-
});
|
277
271
|
const shortcutManager = _classPrivateFieldGet(_itemsBox, this).getShortcutManager();
|
278
272
|
const gridContext = shortcutManager.getContext('grid');
|
279
273
|
gridContext.removeShortcutsByKeys(['Tab']);
|
@@ -260,15 +260,9 @@ export class MultipleSelectUI extends BaseUI {
|
|
260
260
|
row: 1,
|
261
261
|
col: 0
|
262
262
|
},
|
263
|
-
themeName: this.hot.getCurrentThemeName(),
|
264
263
|
layoutDirection: this.hot.isRtl() ? 'rtl' : 'ltr'
|
265
264
|
}));
|
266
265
|
_classPrivateFieldGet(_itemsBox, this).init();
|
267
|
-
this.hot.addHook('afterSetTheme', (themeName, firstRun) => {
|
268
|
-
if (!firstRun) {
|
269
|
-
_classPrivateFieldGet(_itemsBox, this).useTheme(themeName);
|
270
|
-
}
|
271
|
-
});
|
272
266
|
const shortcutManager = _classPrivateFieldGet(_itemsBox, this).getShortcutManager();
|
273
267
|
const gridContext = shortcutManager.getContext('grid');
|
274
268
|
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) || 23;
|
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) || 23;
|
319
319
|
}
|
320
320
|
}
|
321
321
|
return rowsHeight;
|
@@ -10,6 +10,7 @@ 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");
|
13
14
|
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
14
15
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
15
16
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
@@ -228,7 +229,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
228
229
|
*/
|
229
230
|
setManualSize(row, height) {
|
230
231
|
const physicalRow = this.hot.toPhysicalRow(row);
|
231
|
-
const newHeight = Math.max(height,
|
232
|
+
const newHeight = Math.max(height, _src.DEFAULT_ROW_HEIGHT);
|
232
233
|
_classPrivateFieldGet(_rowHeightsMap, this).setValueAtIndex(physicalRow, newHeight);
|
233
234
|
return newHeight;
|
234
235
|
}
|
@@ -12,7 +12,8 @@ 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";
|
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
|
16
17
|
export const PLUGIN_KEY = 'manualRowResize';
|
17
18
|
export const PLUGIN_PRIORITY = 30;
|
18
19
|
const PERSISTENT_STATE_KEY = 'manualRowHeights';
|
@@ -223,7 +224,7 @@ export class ManualRowResize extends BasePlugin {
|
|
223
224
|
*/
|
224
225
|
setManualSize(row, height) {
|
225
226
|
const physicalRow = this.hot.toPhysicalRow(row);
|
226
|
-
const newHeight = Math.max(height,
|
227
|
+
const newHeight = Math.max(height, DEFAULT_ROW_HEIGHT);
|
227
228
|
_classPrivateFieldGet(_rowHeightsMap, this).setValueAtIndex(physicalRow, newHeight);
|
228
229
|
return newHeight;
|
229
230
|
}
|
@@ -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._wt.wtSettings.getSettingPure('defaultRowHeight');
|
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._wt.wtSettings.getSettingPure('defaultRowHeight');
|
1495
1495
|
const autoRowSizePlugin = this.hot.getPlugin('autoRowSize');
|
1496
1496
|
let height = 0;
|
1497
1497
|
for (let i = row; i < row + rowspan; i++) {
|
@@ -125,13 +125,7 @@ class HeadersUI extends _base.default {
|
|
125
125
|
if (!deepestLevelIndex) {
|
126
126
|
deepestLevelIndex = this.dataManager.cache.levelCount;
|
127
127
|
}
|
128
|
-
|
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);
|
128
|
+
this.rowHeaderWidthCache = Math.max(50, 11 + 10 * deepestLevelIndex + 25);
|
135
129
|
this.hot.render();
|
136
130
|
}
|
137
131
|
}
|
@@ -121,13 +121,7 @@ class HeadersUI extends BaseUI {
|
|
121
121
|
if (!deepestLevelIndex) {
|
122
122
|
deepestLevelIndex = this.dataManager.cache.levelCount;
|
123
123
|
}
|
124
|
-
|
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);
|
124
|
+
this.rowHeaderWidthCache = Math.max(50, 11 + 10 * deepestLevelIndex + 25);
|
131
125
|
this.hot.render();
|
132
126
|
}
|
133
127
|
}
|
@@ -127,12 +127,11 @@ function _willVerticalScrollAppear() {
|
|
127
127
|
}
|
128
128
|
const viewportHeight = view.getViewportHeight();
|
129
129
|
const totalRows = _classPrivateFieldGet(_hot, this).countRows();
|
130
|
-
const defaultRowHeight = view.getStylesHandler().getDefaultRowHeight();
|
131
130
|
let totalHeight = 0;
|
132
131
|
let hasVerticalScroll = false;
|
133
132
|
for (let row = 0; row < totalRows; row++) {
|
134
133
|
var _classPrivateFieldGet2;
|
135
|
-
totalHeight += ((_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getRowHeight(row)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 :
|
134
|
+
totalHeight += ((_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getRowHeight(row)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : _src.DEFAULT_ROW_HEIGHT) + (row === 0 ? 1 : 0);
|
136
135
|
if (totalHeight > viewportHeight) {
|
137
136
|
hasVerticalScroll = true;
|
138
137
|
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 } from "../../3rdparty/walkontable/src/index.mjs";
|
10
|
+
import { DEFAULT_COLUMN_WIDTH, DEFAULT_ROW_HEIGHT } 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,12 +123,11 @@ function _willVerticalScrollAppear() {
|
|
123
123
|
}
|
124
124
|
const viewportHeight = view.getViewportHeight();
|
125
125
|
const totalRows = _classPrivateFieldGet(_hot, this).countRows();
|
126
|
-
const defaultRowHeight = view.getStylesHandler().getDefaultRowHeight();
|
127
126
|
let totalHeight = 0;
|
128
127
|
let hasVerticalScroll = false;
|
129
128
|
for (let row = 0; row < totalRows; row++) {
|
130
129
|
var _classPrivateFieldGet2;
|
131
|
-
totalHeight += ((_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getRowHeight(row)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 :
|
130
|
+
totalHeight += ((_classPrivateFieldGet2 = _classPrivateFieldGet(_hot, this).getRowHeight(row)) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : DEFAULT_ROW_HEIGHT) + (row === 0 ? 1 : 0);
|
132
131
|
if (totalHeight > viewportHeight) {
|
133
132
|
hasVerticalScroll = true;
|
134
133
|
break;
|
@@ -302,13 +302,16 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
|
|
302
302
|
const bottomRight = selRange[key].getBottomEndCorner();
|
303
303
|
for (let visualRow = topLeft.row; visualRow <= bottomRight.row; visualRow++) {
|
304
304
|
for (let visualColumn = topLeft.col; visualColumn <= bottomRight.col; visualColumn++) {
|
305
|
-
const
|
305
|
+
const cellMeta = hotInstance.getCellMeta(visualRow, visualColumn);
|
306
|
+
|
307
|
+
/* eslint-disable no-continue */
|
308
|
+
if (cellMeta.readOnly) {
|
309
|
+
continue;
|
310
|
+
}
|
306
311
|
const cell = hotInstance.getCell(visualRow, visualColumn);
|
307
|
-
if (cell
|
308
|
-
return true;
|
309
|
-
} else {
|
312
|
+
if (cell instanceof HTMLElement) {
|
310
313
|
const checkboxes = cell.querySelectorAll('input[type=checkbox]');
|
311
|
-
if (checkboxes.length > 0
|
314
|
+
if (checkboxes.length > 0) {
|
312
315
|
return true;
|
313
316
|
}
|
314
317
|
}
|
@@ -297,13 +297,16 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
|
|
297
297
|
const bottomRight = selRange[key].getBottomEndCorner();
|
298
298
|
for (let visualRow = topLeft.row; visualRow <= bottomRight.row; visualRow++) {
|
299
299
|
for (let visualColumn = topLeft.col; visualColumn <= bottomRight.col; visualColumn++) {
|
300
|
-
const
|
300
|
+
const cellMeta = hotInstance.getCellMeta(visualRow, visualColumn);
|
301
|
+
|
302
|
+
/* eslint-disable no-continue */
|
303
|
+
if (cellMeta.readOnly) {
|
304
|
+
continue;
|
305
|
+
}
|
301
306
|
const cell = hotInstance.getCell(visualRow, visualColumn);
|
302
|
-
if (cell
|
303
|
-
return true;
|
304
|
-
} else {
|
307
|
+
if (cell instanceof HTMLElement) {
|
305
308
|
const checkboxes = cell.querySelectorAll('input[type=checkbox]');
|
306
|
-
if (checkboxes.length > 0
|
309
|
+
if (checkboxes.length > 0) {
|
307
310
|
return true;
|
308
311
|
}
|
309
312
|
}
|
package/settings.d.ts
CHANGED
@@ -214,7 +214,6 @@ 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;
|
218
217
|
title?: string;
|
219
218
|
trimDropdown?: boolean;
|
220
219
|
trimRows?: TrimRowsSettings;
|
package/tableView.js
CHANGED
@@ -587,52 +587,6 @@ class TableView {
|
|
587
587
|
return count;
|
588
588
|
}
|
589
589
|
|
590
|
-
/**
|
591
|
-
* Retrieves the styles handler from the Walkontable instance.
|
592
|
-
*
|
593
|
-
* @returns {StylesHandler} The styles handler instance.
|
594
|
-
*/
|
595
|
-
getStylesHandler() {
|
596
|
-
return this._wt.stylesHandler;
|
597
|
-
}
|
598
|
-
|
599
|
-
/**
|
600
|
-
* Returns the default row height.
|
601
|
-
*
|
602
|
-
* This method retrieves the default row height from the Walkontable styles handler.
|
603
|
-
*
|
604
|
-
* @returns {number} The default row height.
|
605
|
-
*/
|
606
|
-
getDefaultRowHeight() {
|
607
|
-
return this._wt.stylesHandler.getDefaultRowHeight();
|
608
|
-
}
|
609
|
-
|
610
|
-
/**
|
611
|
-
* Add a class name to the license information element.
|
612
|
-
*
|
613
|
-
* @param {string} className The class name to add.
|
614
|
-
*/
|
615
|
-
addClassNameToLicenseElement(className) {
|
616
|
-
var _this$hot$rootElement;
|
617
|
-
const licenseInfoElement = (_this$hot$rootElement = this.hot.rootElement.parentNode) === null || _this$hot$rootElement === void 0 ? void 0 : _this$hot$rootElement.querySelector('.hot-display-license-info');
|
618
|
-
if (licenseInfoElement) {
|
619
|
-
(0, _element.addClass)(licenseInfoElement, className);
|
620
|
-
}
|
621
|
-
}
|
622
|
-
|
623
|
-
/**
|
624
|
-
* Remove a class name from the license information element.
|
625
|
-
*
|
626
|
-
* @param {string} className The class name to remove.
|
627
|
-
*/
|
628
|
-
removeClassNameFromLicenseElement(className) {
|
629
|
-
var _this$hot$rootElement2;
|
630
|
-
const licenseInfoElement = (_this$hot$rootElement2 = this.hot.rootElement.parentNode) === null || _this$hot$rootElement2 === void 0 ? void 0 : _this$hot$rootElement2.querySelector('.hot-display-license-info');
|
631
|
-
if (licenseInfoElement) {
|
632
|
-
(0, _element.removeClass)(licenseInfoElement, className);
|
633
|
-
}
|
634
|
-
}
|
635
|
-
|
636
590
|
/**
|
637
591
|
* Checks if at least one cell than belongs to the main table is not covered by the top, left or
|
638
592
|
* bottom overlay.
|
package/tableView.mjs
CHANGED
@@ -9,7 +9,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
9
9
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
10
10
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
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,
|
12
|
+
import { addClass, clearTextSelection, empty, fastInnerHTML, fastInnerText, getScrollbarWidth, hasClass, isChildOf, isInput, isOutsideInput, isVisible, setAttribute, getParentWindow } from "./helpers/dom/element.mjs";
|
13
13
|
import EventManager from "./eventManager.mjs";
|
14
14
|
import { isImmediatePropagationStopped, isRightClick, isLeftClick } from "./helpers/dom/event.mjs";
|
15
15
|
import Walkontable from "./3rdparty/walkontable/src/index.mjs";
|
@@ -583,52 +583,6 @@ class TableView {
|
|
583
583
|
return count;
|
584
584
|
}
|
585
585
|
|
586
|
-
/**
|
587
|
-
* Retrieves the styles handler from the Walkontable instance.
|
588
|
-
*
|
589
|
-
* @returns {StylesHandler} The styles handler instance.
|
590
|
-
*/
|
591
|
-
getStylesHandler() {
|
592
|
-
return this._wt.stylesHandler;
|
593
|
-
}
|
594
|
-
|
595
|
-
/**
|
596
|
-
* Returns the default row height.
|
597
|
-
*
|
598
|
-
* This method retrieves the default row height from the Walkontable styles handler.
|
599
|
-
*
|
600
|
-
* @returns {number} The default row height.
|
601
|
-
*/
|
602
|
-
getDefaultRowHeight() {
|
603
|
-
return this._wt.stylesHandler.getDefaultRowHeight();
|
604
|
-
}
|
605
|
-
|
606
|
-
/**
|
607
|
-
* Add a class name to the license information element.
|
608
|
-
*
|
609
|
-
* @param {string} className The class name to add.
|
610
|
-
*/
|
611
|
-
addClassNameToLicenseElement(className) {
|
612
|
-
var _this$hot$rootElement;
|
613
|
-
const licenseInfoElement = (_this$hot$rootElement = this.hot.rootElement.parentNode) === null || _this$hot$rootElement === void 0 ? void 0 : _this$hot$rootElement.querySelector('.hot-display-license-info');
|
614
|
-
if (licenseInfoElement) {
|
615
|
-
addClass(licenseInfoElement, className);
|
616
|
-
}
|
617
|
-
}
|
618
|
-
|
619
|
-
/**
|
620
|
-
* Remove a class name from the license information element.
|
621
|
-
*
|
622
|
-
* @param {string} className The class name to remove.
|
623
|
-
*/
|
624
|
-
removeClassNameFromLicenseElement(className) {
|
625
|
-
var _this$hot$rootElement2;
|
626
|
-
const licenseInfoElement = (_this$hot$rootElement2 = this.hot.rootElement.parentNode) === null || _this$hot$rootElement2 === void 0 ? void 0 : _this$hot$rootElement2.querySelector('.hot-display-license-info');
|
627
|
-
if (licenseInfoElement) {
|
628
|
-
removeClass(licenseInfoElement, className);
|
629
|
-
}
|
630
|
-
}
|
631
|
-
|
632
586
|
/**
|
633
587
|
* Checks if at least one cell than belongs to the main table is not covered by the top, left or
|
634
588
|
* bottom overlay.
|
package/utils/autoResize.js
CHANGED
@@ -77,7 +77,6 @@ function createInputElementResizer(ownerDocument) {
|
|
77
77
|
* Resizes the element.
|
78
78
|
*/
|
79
79
|
function resize() {
|
80
|
-
var _getComputedStyle, _getComputedStyle2;
|
81
80
|
textHolder.textContent = observedElement.value;
|
82
81
|
// Won't expand the element size for displaying body as for example, `grid`, `inline-grid` or `flex` with
|
83
82
|
// `flex-direction` set as `column`.
|
@@ -86,9 +85,7 @@ function createInputElementResizer(ownerDocument) {
|
|
86
85
|
textContainer.style.fontFamily = getComputedStyle(observedElement).fontFamily;
|
87
86
|
textContainer.style.whiteSpace = 'pre';
|
88
87
|
body.appendChild(textContainer);
|
89
|
-
const
|
90
|
-
const paddingEnd = parseInt(((_getComputedStyle2 = getComputedStyle(observedElement)) === null || _getComputedStyle2 === void 0 ? void 0 : _getComputedStyle2.paddingInlineEnd) || 0, 10);
|
91
|
-
const width = textContainer.clientWidth + 2 + paddingStart + paddingEnd;
|
88
|
+
const width = textContainer.clientWidth + 2;
|
92
89
|
body.removeChild(textContainer);
|
93
90
|
const elementStyle = observedElement.style;
|
94
91
|
elementStyle.height = `${defaults.minHeight}px`;
|
package/utils/autoResize.mjs
CHANGED
@@ -73,7 +73,6 @@ export function createInputElementResizer(ownerDocument) {
|
|
73
73
|
* Resizes the element.
|
74
74
|
*/
|
75
75
|
function resize() {
|
76
|
-
var _getComputedStyle, _getComputedStyle2;
|
77
76
|
textHolder.textContent = observedElement.value;
|
78
77
|
// Won't expand the element size for displaying body as for example, `grid`, `inline-grid` or `flex` with
|
79
78
|
// `flex-direction` set as `column`.
|
@@ -82,9 +81,7 @@ export function createInputElementResizer(ownerDocument) {
|
|
82
81
|
textContainer.style.fontFamily = getComputedStyle(observedElement).fontFamily;
|
83
82
|
textContainer.style.whiteSpace = 'pre';
|
84
83
|
body.appendChild(textContainer);
|
85
|
-
const
|
86
|
-
const paddingEnd = parseInt(((_getComputedStyle2 = getComputedStyle(observedElement)) === null || _getComputedStyle2 === void 0 ? void 0 : _getComputedStyle2.paddingInlineEnd) || 0, 10);
|
87
|
-
const width = textContainer.clientWidth + 2 + paddingStart + paddingEnd;
|
84
|
+
const width = textContainer.clientWidth + 2;
|
88
85
|
body.removeChild(textContainer);
|
89
86
|
const elementStyle = observedElement.style;
|
90
87
|
elementStyle.height = `${defaults.minHeight}px`;
|
package/utils/ghostTable.js
CHANGED
@@ -133,7 +133,7 @@ class GhostTable {
|
|
133
133
|
if (this.getSetting('useHeaders') && this.hot.getColHeader(column) !== null) {
|
134
134
|
// Please keep in mind that the renderable column index equal to the visual columns index for the GhostTable.
|
135
135
|
// We render all columns.
|
136
|
-
this.hot.view.appendColHeader(column, this.table.th
|
136
|
+
this.hot.view.appendColHeader(column, this.table.th);
|
137
137
|
}
|
138
138
|
this.table.tBody.appendChild(this.createCol(column));
|
139
139
|
this.container.container.appendChild(this.table.fragment);
|
@@ -149,8 +149,6 @@ class GhostTable {
|
|
149
149
|
if (!this.injected) {
|
150
150
|
this.injectTable();
|
151
151
|
}
|
152
|
-
const isBorderBoxSizing = this.hot.view.getStylesHandler().areCellsBorderBox();
|
153
|
-
const borderCompensation = isBorderBoxSizing ? 0 : 1;
|
154
152
|
(0, _array.arrayEach)(this.rows, row => {
|
155
153
|
// In cases when the cell's content produces the height with a decimal point, the height
|
156
154
|
// needs to be rounded up to make sure that there will be a space for the cell's content.
|
@@ -159,8 +157,8 @@ class GhostTable {
|
|
159
157
|
height
|
160
158
|
} = row.table.getBoundingClientRect();
|
161
159
|
|
162
|
-
// -1 <- reduce border-top from table
|
163
|
-
callback(row.row, Math.ceil(height) -
|
160
|
+
// -1 <- reduce border-top from table
|
161
|
+
callback(row.row, Math.ceil(height) - 1);
|
164
162
|
});
|
165
163
|
}
|
166
164
|
|
package/utils/ghostTable.mjs
CHANGED
@@ -130,7 +130,7 @@ class GhostTable {
|
|
130
130
|
if (this.getSetting('useHeaders') && this.hot.getColHeader(column) !== null) {
|
131
131
|
// Please keep in mind that the renderable column index equal to the visual columns index for the GhostTable.
|
132
132
|
// We render all columns.
|
133
|
-
this.hot.view.appendColHeader(column, this.table.th
|
133
|
+
this.hot.view.appendColHeader(column, this.table.th);
|
134
134
|
}
|
135
135
|
this.table.tBody.appendChild(this.createCol(column));
|
136
136
|
this.container.container.appendChild(this.table.fragment);
|
@@ -146,8 +146,6 @@ class GhostTable {
|
|
146
146
|
if (!this.injected) {
|
147
147
|
this.injectTable();
|
148
148
|
}
|
149
|
-
const isBorderBoxSizing = this.hot.view.getStylesHandler().areCellsBorderBox();
|
150
|
-
const borderCompensation = isBorderBoxSizing ? 0 : 1;
|
151
149
|
arrayEach(this.rows, row => {
|
152
150
|
// In cases when the cell's content produces the height with a decimal point, the height
|
153
151
|
// needs to be rounded up to make sure that there will be a space for the cell's content.
|
@@ -156,8 +154,8 @@ class GhostTable {
|
|
156
154
|
height
|
157
155
|
} = row.table.getBoundingClientRect();
|
158
156
|
|
159
|
-
// -1 <- reduce border-top from table
|
160
|
-
callback(row.row, Math.ceil(height) -
|
157
|
+
// -1 <- reduce border-top from table
|
158
|
+
callback(row.row, Math.ceil(height) - 1);
|
161
159
|
});
|
162
160
|
}
|
163
161
|
|