handsontable 0.0.0-next-407bbbc-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.
- 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 +271 -0
- package/3rdparty/walkontable/src/utils/stylesHandler.mjs +267 -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.d.ts +2 -0
- package/core.js +46 -0
- package/core.mjs +46 -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 +4125 -3841
- package/dist/handsontable.full.min.css +11 -9
- package/dist/handsontable.full.min.js +26 -26
- package/dist/handsontable.js +3832 -3542
- package/dist/handsontable.min.css +5 -4
- 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 +2 -0
- package/editors/dateEditor/dateEditor.mjs +2 -0
- package/editors/handsontableEditor/handsontableEditor.js +2 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +2 -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/helpers/dom/element.js +31 -0
- package/helpers/dom/element.mjs +30 -0
- 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 +8 -0
- package/plugins/comments/comments.mjs +8 -0
- package/plugins/contextMenu/menu/menu.js +3 -4
- package/plugins/contextMenu/menu/menu.mjs +3 -4
- 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/renderers/checkboxRenderer/checkboxRenderer.js +6 -1
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +6 -1
- 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
@@ -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,
|
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.
|
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.
|
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
|
-
|
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
|
}
|
@@ -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 :
|
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
|
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 :
|
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;
|
@@ -161,7 +161,7 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
|
|
161
161
|
},
|
162
162
|
runOnlyIf: () => {
|
163
163
|
const range = hotInstance.getSelectedRangeLast();
|
164
|
-
return hotInstance.getSettings().enterBeginsEditing && (range === null || range === void 0 ? void 0 : range.
|
164
|
+
return hotInstance.getSettings().enterBeginsEditing && (range === null || range === void 0 ? void 0 : range.highlight.isCell()) && !hotInstance.selection.isMultiple();
|
165
165
|
}
|
166
166
|
}, {
|
167
167
|
keys: [['delete'], ['backspace']],
|
@@ -204,6 +204,11 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
|
|
204
204
|
for (let visualRow = startRow; visualRow <= endRow; visualRow += 1) {
|
205
205
|
for (let visualColumn = startColumn; visualColumn <= endColumn; visualColumn += 1) {
|
206
206
|
const cachedCellProperties = hotInstance.getCellMeta(visualRow, visualColumn);
|
207
|
+
|
208
|
+
/* eslint-disable no-continue */
|
209
|
+
if (cachedCellProperties.hidden) {
|
210
|
+
continue;
|
211
|
+
}
|
207
212
|
const templates = {
|
208
213
|
checkedTemplate: cachedCellProperties.checkedTemplate,
|
209
214
|
uncheckedTemplate: cachedCellProperties.uncheckedTemplate
|
@@ -156,7 +156,7 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
|
|
156
156
|
},
|
157
157
|
runOnlyIf: () => {
|
158
158
|
const range = hotInstance.getSelectedRangeLast();
|
159
|
-
return hotInstance.getSettings().enterBeginsEditing && (range === null || range === void 0 ? void 0 : range.
|
159
|
+
return hotInstance.getSettings().enterBeginsEditing && (range === null || range === void 0 ? void 0 : range.highlight.isCell()) && !hotInstance.selection.isMultiple();
|
160
160
|
}
|
161
161
|
}, {
|
162
162
|
keys: [['delete'], ['backspace']],
|
@@ -199,6 +199,11 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
|
|
199
199
|
for (let visualRow = startRow; visualRow <= endRow; visualRow += 1) {
|
200
200
|
for (let visualColumn = startColumn; visualColumn <= endColumn; visualColumn += 1) {
|
201
201
|
const cachedCellProperties = hotInstance.getCellMeta(visualRow, visualColumn);
|
202
|
+
|
203
|
+
/* eslint-disable no-continue */
|
204
|
+
if (cachedCellProperties.hidden) {
|
205
|
+
continue;
|
206
|
+
}
|
202
207
|
const templates = {
|
203
208
|
checkedTemplate: cachedCellProperties.checkedTemplate,
|
204
209
|
uncheckedTemplate: cachedCellProperties.uncheckedTemplate
|
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;
|