handsontable 0.0.0-next-3d099da-20231208 → 0.0.0-next-51d3397-20231211
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/calculator/index.js +11 -6
- package/3rdparty/walkontable/src/calculator/index.mjs +5 -3
- package/3rdparty/walkontable/src/calculator/renderAllColumns.js +50 -0
- package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +46 -0
- package/3rdparty/walkontable/src/calculator/renderAllRows.js +50 -0
- package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +46 -0
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +1 -122
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +2 -124
- package/3rdparty/walkontable/src/calculator/viewportRows.js +1 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +2 -3
- package/3rdparty/walkontable/src/core/_base.js +0 -12
- package/3rdparty/walkontable/src/core/_base.mjs +0 -12
- 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 -9
- package/3rdparty/walkontable/src/facade/core.mjs +0 -9
- package/3rdparty/walkontable/src/index.js +3 -4
- package/3rdparty/walkontable/src/index.mjs +1 -2
- package/3rdparty/walkontable/src/overlays.js +0 -3
- package/3rdparty/walkontable/src/overlays.mjs +0 -4
- package/3rdparty/walkontable/src/renderer/colGroup.js +10 -0
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +10 -0
- package/3rdparty/walkontable/src/renderer/rows.js +4 -3
- package/3rdparty/walkontable/src/renderer/rows.mjs +4 -3
- package/3rdparty/walkontable/src/selection/manager.js +0 -1
- package/3rdparty/walkontable/src/selection/manager.mjs +0 -1
- package/3rdparty/walkontable/src/settings.js +3 -0
- package/3rdparty/walkontable/src/settings.mjs +2 -0
- package/3rdparty/walkontable/src/table.js +0 -1
- package/3rdparty/walkontable/src/table.mjs +0 -1
- package/3rdparty/walkontable/src/utils/column.js +27 -12
- package/3rdparty/walkontable/src/utils/column.mjs +27 -12
- package/3rdparty/walkontable/src/utils/columnStretching.js +219 -0
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +215 -0
- package/3rdparty/walkontable/src/viewport.js +22 -17
- package/3rdparty/walkontable/src/viewport.mjs +23 -18
- package/base.js +4 -2
- package/base.mjs +2 -2
- package/core/focusCatcher/index.js +44 -6
- package/core/focusCatcher/index.mjs +44 -6
- package/core.js +0 -11
- package/core.mjs +0 -11
- package/dataMap/dataMap.js +1 -0
- package/dataMap/metaManager/metaSchema.js +28 -2
- package/dataMap/metaManager/metaSchema.mjs +28 -2
- package/dataMap/metaManager/mods/extendMetaProperties.js +12 -0
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +12 -0
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +3 -3
- package/dist/handsontable.full.js +3979 -5577
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +66 -71
- package/dist/handsontable.js +3058 -4305
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +35 -39
- package/editorManager.js +3 -4
- package/editorManager.mjs +3 -4
- package/editors/autocompleteEditor/autocompleteEditor.js +0 -2
- package/editors/autocompleteEditor/autocompleteEditor.mjs +0 -2
- package/editors/dateEditor/dateEditor.d.ts +1 -1
- package/editors/dateEditor/dateEditor.js +4 -1
- package/editors/dateEditor/dateEditor.mjs +4 -1
- package/editors/handsontableEditor/handsontableEditor.js +0 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +0 -1
- package/editors/textEditor/textEditor.js +0 -4
- package/editors/textEditor/textEditor.mjs +0 -4
- package/helpers/browser.js +5 -2
- package/helpers/browser.mjs +5 -2
- package/helpers/feature.js +10 -0
- package/helpers/feature.mjs +9 -0
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +3 -4
- package/pluginHooks.d.ts +6 -29
- package/pluginHooks.js +65 -123
- package/pluginHooks.mjs +62 -122
- package/plugins/copyPaste/clipboardData.js +18 -0
- package/plugins/copyPaste/clipboardData.mjs +14 -0
- package/plugins/copyPaste/copyPaste.js +129 -51
- package/plugins/copyPaste/copyPaste.mjs +132 -54
- package/plugins/copyPaste/copyableRanges.js +43 -7
- package/plugins/copyPaste/copyableRanges.mjs +42 -7
- package/plugins/copyPaste/pasteEvent.mjs +1 -1
- package/plugins/customBorders/customBorders.js +0 -5
- package/plugins/customBorders/customBorders.mjs +0 -5
- package/plugins/customBorders/utils.js +0 -1
- package/plugins/customBorders/utils.mjs +0 -1
- package/plugins/filters/ui/radioInput.js +1 -1
- package/plugins/filters/ui/radioInput.mjs +1 -1
- package/plugins/formulas/formulas.js +0 -2
- package/plugins/formulas/formulas.mjs +0 -2
- package/plugins/formulas/indexSyncer/axisSyncer.js +0 -1
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -1
- package/plugins/manualColumnResize/manualColumnResize.js +0 -1
- package/plugins/manualColumnResize/manualColumnResize.mjs +0 -1
- package/plugins/mergeCells/mergeCells.js +1 -127
- package/plugins/mergeCells/mergeCells.mjs +1 -127
- package/plugins/nestedHeaders/nestedHeaders.js +41 -87
- package/plugins/nestedHeaders/nestedHeaders.mjs +42 -88
- package/plugins/nestedHeaders/stateManager/headersTree.js +0 -1
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +0 -1
- package/plugins/undoRedo/undoRedo.js +0 -2
- package/plugins/undoRedo/undoRedo.mjs +0 -2
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +0 -1
- package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +0 -1
- package/renderers/checkboxRenderer/checkboxRenderer.js +0 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +0 -2
- package/selection/highlight/highlight.js +0 -1
- package/selection/highlight/highlight.mjs +0 -1
- package/selection/index.js +1 -3
- package/selection/index.mjs +2 -2
- package/selection/utils.js +0 -34
- package/selection/utils.mjs +0 -33
- package/settings.d.ts +2 -1
- package/tableView.js +1 -2
- package/tableView.mjs +1 -2
- package/translations/indexMapper.js +2 -1
- package/utils/parseTable.js +84 -538
- package/utils/parseTable.mjs +83 -534
- package/validators/timeValidator/timeValidator.js +0 -1
- package/validators/timeValidator/timeValidator.mjs +0 -1
- package/plugins/copyPaste/clipboardData/clipboardData.js +0 -588
- package/plugins/copyPaste/clipboardData/clipboardData.mjs +0 -584
- package/plugins/copyPaste/clipboardData/copyClipboardData.js +0 -69
- package/plugins/copyPaste/clipboardData/copyClipboardData.mjs +0 -65
- package/plugins/copyPaste/clipboardData/index.js +0 -9
- package/plugins/copyPaste/clipboardData/index.mjs +0 -4
- package/plugins/copyPaste/clipboardData/pasteClipboardData.js +0 -81
- package/plugins/copyPaste/clipboardData/pasteClipboardData.mjs +0 -77
@@ -230,30 +230,24 @@ export default class CoreAbstract {
|
|
230
230
|
get drawn() {
|
231
231
|
return wot.drawn; // TODO refactoring: consider about injecting `isDrawn` function : ()=>return wot.drawn. (it'll enables remove dao layer)
|
232
232
|
},
|
233
|
-
|
234
233
|
get topOverlay() {
|
235
234
|
return wot.wtOverlays.topOverlay; // TODO refactoring: move outside dao, use IOC
|
236
235
|
},
|
237
|
-
|
238
236
|
get inlineStartOverlay() {
|
239
237
|
return wot.wtOverlays.inlineStartOverlay; // TODO refactoring: move outside dao, use IOC
|
240
238
|
},
|
241
|
-
|
242
239
|
get wtTable() {
|
243
240
|
return wot.wtTable; // TODO refactoring: move outside dao, use IOC
|
244
241
|
},
|
245
|
-
|
246
242
|
get wtViewport() {
|
247
243
|
return wot.wtViewport; // TODO refactoring: move outside dao, use IOC
|
248
244
|
},
|
249
|
-
|
250
245
|
get wtSettings() {
|
251
246
|
return wot.wtSettings;
|
252
247
|
},
|
253
248
|
get rootWindow() {
|
254
249
|
return wot.domBindings.rootWindow; // TODO refactoring: move outside dao
|
255
250
|
},
|
256
|
-
|
257
251
|
// TODO refactoring, consider about using injecting wtSettings into scroll (it'll enables remove dao layer)
|
258
252
|
get totalRows() {
|
259
253
|
return wot.wtSettings.getSetting('totalRows');
|
@@ -289,26 +283,21 @@ export default class CoreAbstract {
|
|
289
283
|
get parentTableOffset() {
|
290
284
|
return wot.cloneSource.wtTable.tableOffset; // TODO rethink: cloneSource exists only in Clone type.
|
291
285
|
},
|
292
|
-
|
293
286
|
get cloneSource() {
|
294
287
|
return wot.cloneSource; // TODO rethink: cloneSource exists only in Clone type.
|
295
288
|
},
|
296
|
-
|
297
289
|
get workspaceWidth() {
|
298
290
|
return wot.wtViewport.getWorkspaceWidth();
|
299
291
|
},
|
300
292
|
get wtViewport() {
|
301
293
|
return wot.wtViewport; // TODO refactoring: move outside dao, use IOC
|
302
294
|
},
|
303
|
-
|
304
295
|
get wtOverlays() {
|
305
296
|
return wot.wtOverlays; // TODO refactoring: move outside dao, use IOC
|
306
297
|
},
|
307
|
-
|
308
298
|
get selectionManager() {
|
309
299
|
return wot.selectionManager; // TODO refactoring: move outside dao, use IOC
|
310
300
|
},
|
311
|
-
|
312
301
|
get drawn() {
|
313
302
|
return wot.drawn;
|
314
303
|
},
|
@@ -319,7 +308,6 @@ export default class CoreAbstract {
|
|
319
308
|
get wtTable() {
|
320
309
|
return wot.wtTable; // TODO refactoring: it provides itself
|
321
310
|
},
|
322
|
-
|
323
311
|
get startColumnRendered() {
|
324
312
|
return wot.wtViewport.columnsRenderCalculator.startColumn;
|
325
313
|
},
|
@@ -85,11 +85,9 @@ class Walkontable extends _base.default {
|
|
85
85
|
get topOverlay() {
|
86
86
|
return wot.wtOverlays.topOverlay; // TODO refactoring: move outside dao, use IOC
|
87
87
|
},
|
88
|
-
|
89
88
|
get inlineStartOverlay() {
|
90
89
|
return wot.wtOverlays.inlineStartOverlay; // TODO refactoring: move outside dao, use IOC
|
91
90
|
},
|
92
|
-
|
93
91
|
get bottomOverlay() {
|
94
92
|
return wot.wtOverlays.bottomOverlay; // TODO refactoring: move outside dao, use IOC
|
95
93
|
}
|
@@ -81,11 +81,9 @@ export default class Walkontable extends CoreAbstract {
|
|
81
81
|
get topOverlay() {
|
82
82
|
return wot.wtOverlays.topOverlay; // TODO refactoring: move outside dao, use IOC
|
83
83
|
},
|
84
|
-
|
85
84
|
get inlineStartOverlay() {
|
86
85
|
return wot.wtOverlays.inlineStartOverlay; // TODO refactoring: move outside dao, use IOC
|
87
86
|
},
|
88
|
-
|
89
87
|
get bottomOverlay() {
|
90
88
|
return wot.wtOverlays.bottomOverlay; // TODO refactoring: move outside dao, use IOC
|
91
89
|
}
|
@@ -41,39 +41,30 @@ class WalkontableFacade {
|
|
41
41
|
get wtSettings() {
|
42
42
|
return this._wot.wtSettings; // todo create facade
|
43
43
|
}
|
44
|
-
|
45
44
|
get cloneSource() {
|
46
45
|
return this._wot.cloneSource; // todo create facade
|
47
46
|
}
|
48
|
-
|
49
47
|
get cloneOverlay() {
|
50
48
|
return this._wot.cloneOverlay; // todo create facade
|
51
49
|
}
|
52
|
-
|
53
50
|
get selectionManager() {
|
54
51
|
return this._wot.selectionManager; // todo create facade
|
55
52
|
}
|
56
|
-
|
57
53
|
get wtViewport() {
|
58
54
|
return this._wot.wtViewport; // todo create facade
|
59
55
|
}
|
60
|
-
|
61
56
|
get wtOverlays() {
|
62
57
|
return this._wot.wtOverlays; // todo create facade
|
63
58
|
}
|
64
|
-
|
65
59
|
get wtTable() {
|
66
60
|
return this._wot.wtTable; // todo create facade
|
67
61
|
}
|
68
|
-
|
69
62
|
get wtEvent() {
|
70
63
|
return this._wot.wtEvent; // todo create facade
|
71
64
|
}
|
72
|
-
|
73
65
|
get wtScroll() {
|
74
66
|
return this._wot.wtScroll; // todo create facade
|
75
67
|
}
|
76
|
-
|
77
68
|
get drawn() {
|
78
69
|
return this._wot.drawn;
|
79
70
|
}
|
@@ -37,39 +37,30 @@ export default class WalkontableFacade {
|
|
37
37
|
get wtSettings() {
|
38
38
|
return this._wot.wtSettings; // todo create facade
|
39
39
|
}
|
40
|
-
|
41
40
|
get cloneSource() {
|
42
41
|
return this._wot.cloneSource; // todo create facade
|
43
42
|
}
|
44
|
-
|
45
43
|
get cloneOverlay() {
|
46
44
|
return this._wot.cloneOverlay; // todo create facade
|
47
45
|
}
|
48
|
-
|
49
46
|
get selectionManager() {
|
50
47
|
return this._wot.selectionManager; // todo create facade
|
51
48
|
}
|
52
|
-
|
53
49
|
get wtViewport() {
|
54
50
|
return this._wot.wtViewport; // todo create facade
|
55
51
|
}
|
56
|
-
|
57
52
|
get wtOverlays() {
|
58
53
|
return this._wot.wtOverlays; // todo create facade
|
59
54
|
}
|
60
|
-
|
61
55
|
get wtTable() {
|
62
56
|
return this._wot.wtTable; // todo create facade
|
63
57
|
}
|
64
|
-
|
65
58
|
get wtEvent() {
|
66
59
|
return this._wot.wtEvent; // todo create facade
|
67
60
|
}
|
68
|
-
|
69
61
|
get wtScroll() {
|
70
62
|
return this._wot.wtScroll; // todo create facade
|
71
63
|
}
|
72
|
-
|
73
64
|
get drawn() {
|
74
65
|
return this._wot.drawn;
|
75
66
|
}
|
@@ -1,10 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
-
var
|
5
|
-
exports.ViewportColumnsCalculator =
|
6
|
-
|
7
|
-
exports.ViewportRowsCalculator = _viewportRows.default;
|
4
|
+
var _calculator = require("./calculator");
|
5
|
+
exports.ViewportColumnsCalculator = _calculator.ViewportColumnsCalculator;
|
6
|
+
exports.ViewportRowsCalculator = _calculator.ViewportRowsCalculator;
|
8
7
|
var _coords = _interopRequireDefault(require("./cell/coords"));
|
9
8
|
exports.CellCoords = _coords.default;
|
10
9
|
var _range = _interopRequireDefault(require("./cell/range"));
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import ViewportColumnsCalculator from "./calculator/
|
2
|
-
import ViewportRowsCalculator from "./calculator/viewportRows.mjs";
|
1
|
+
import { ViewportColumnsCalculator, ViewportRowsCalculator } from "./calculator/index.mjs";
|
3
2
|
import CellCoords from "./cell/coords.mjs";
|
4
3
|
import CellRange from "./cell/range.mjs";
|
5
4
|
import Walkontable from "./facade/core.mjs";
|
@@ -226,7 +226,6 @@ class Overlays {
|
|
226
226
|
if (this.verticalScrolling) {
|
227
227
|
this.inlineStartOverlay.onScroll(); // todo the inlineStartOverlay.onScroll() fires hook. Why is it needed there, not in any another place?
|
228
228
|
}
|
229
|
-
|
230
229
|
if (this.horizontalScrolling) {
|
231
230
|
this.topOverlay.onScroll();
|
232
231
|
}
|
@@ -456,11 +455,9 @@ class Overlays {
|
|
456
455
|
if (this.topOverlay.needFullRender) {
|
457
456
|
this.topOverlay.clone.wtTable.holder.scrollLeft = scrollLeft; // todo rethink, *overlay.setScroll*()
|
458
457
|
}
|
459
|
-
|
460
458
|
if (this.bottomOverlay.needFullRender) {
|
461
459
|
this.bottomOverlay.clone.wtTable.holder.scrollLeft = scrollLeft; // todo rethink, *overlay.setScroll*()
|
462
460
|
}
|
463
|
-
|
464
461
|
if (this.inlineStartOverlay.needFullRender) {
|
465
462
|
this.inlineStartOverlay.clone.wtTable.holder.scrollTop = scrollTop; // todo rethink, *overlay.setScroll*()
|
466
463
|
}
|
@@ -223,7 +223,6 @@ class Overlays {
|
|
223
223
|
if (this.verticalScrolling) {
|
224
224
|
this.inlineStartOverlay.onScroll(); // todo the inlineStartOverlay.onScroll() fires hook. Why is it needed there, not in any another place?
|
225
225
|
}
|
226
|
-
|
227
226
|
if (this.horizontalScrolling) {
|
228
227
|
this.topOverlay.onScroll();
|
229
228
|
}
|
@@ -453,11 +452,9 @@ class Overlays {
|
|
453
452
|
if (this.topOverlay.needFullRender) {
|
454
453
|
this.topOverlay.clone.wtTable.holder.scrollLeft = scrollLeft; // todo rethink, *overlay.setScroll*()
|
455
454
|
}
|
456
|
-
|
457
455
|
if (this.bottomOverlay.needFullRender) {
|
458
456
|
this.bottomOverlay.clone.wtTable.holder.scrollLeft = scrollLeft; // todo rethink, *overlay.setScroll*()
|
459
457
|
}
|
460
|
-
|
461
458
|
if (this.inlineStartOverlay.needFullRender) {
|
462
459
|
this.inlineStartOverlay.clone.wtTable.holder.scrollTop = scrollTop; // todo rethink, *overlay.setScroll*()
|
463
460
|
}
|
@@ -645,5 +642,4 @@ class Overlays {
|
|
645
642
|
});
|
646
643
|
}
|
647
644
|
}
|
648
|
-
|
649
645
|
export default Overlays;
|
@@ -2,8 +2,12 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
var _base = _interopRequireDefault(require("./_base"));
|
5
|
+
var _console = require("./../../../../helpers/console");
|
6
|
+
var _templateLiteralTag = require("./../../../../helpers/templateLiteralTag");
|
5
7
|
var _element = require("./../../../../helpers/dom/element");
|
6
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9
|
+
let performanceWarningAppeared = false;
|
10
|
+
|
7
11
|
/**
|
8
12
|
* Colgroup renderer responsible for managing (inserting, tracking, rendering) COL elements.
|
9
13
|
*
|
@@ -49,6 +53,12 @@ class ColGroupRenderer extends _base.default {
|
|
49
53
|
columnsToRender,
|
50
54
|
rowHeadersCount
|
51
55
|
} = this.table;
|
56
|
+
if (!performanceWarningAppeared && columnsToRender > 1000) {
|
57
|
+
performanceWarningAppeared = true;
|
58
|
+
(0, _console.warn)((0, _templateLiteralTag.toSingleLine)`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
|
59
|
+
Consider limiting the number of rendered columns by specifying the table width and/or\x20
|
60
|
+
turning off the "renderAllColumns" option.`);
|
61
|
+
}
|
52
62
|
|
53
63
|
// Render column nodes for row headers
|
54
64
|
for (let visibleColumnIndex = 0; visibleColumnIndex < rowHeadersCount; visibleColumnIndex++) {
|
@@ -1,5 +1,9 @@
|
|
1
1
|
import BaseRenderer from "./_base.mjs";
|
2
|
+
import { warn } from "./../../../../helpers/console.mjs";
|
3
|
+
import { toSingleLine } from "./../../../../helpers/templateLiteralTag.mjs";
|
2
4
|
import { addClass } from "./../../../../helpers/dom/element.mjs";
|
5
|
+
let performanceWarningAppeared = false;
|
6
|
+
|
3
7
|
/**
|
4
8
|
* Colgroup renderer responsible for managing (inserting, tracking, rendering) COL elements.
|
5
9
|
*
|
@@ -45,6 +49,12 @@ export default class ColGroupRenderer extends BaseRenderer {
|
|
45
49
|
columnsToRender,
|
46
50
|
rowHeadersCount
|
47
51
|
} = this.table;
|
52
|
+
if (!performanceWarningAppeared && columnsToRender > 1000) {
|
53
|
+
performanceWarningAppeared = true;
|
54
|
+
warn(toSingleLine`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
|
55
|
+
Consider limiting the number of rendered columns by specifying the table width and/or\x20
|
56
|
+
turning off the "renderAllColumns" option.`);
|
57
|
+
}
|
48
58
|
|
49
59
|
// Render column nodes for row headers
|
50
60
|
for (let visibleColumnIndex = 0; visibleColumnIndex < rowHeadersCount; visibleColumnIndex++) {
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
|
+
var _base = _interopRequireDefault(require("./_base"));
|
5
6
|
var _console = require("./../../../../helpers/console");
|
6
7
|
var _templateLiteralTag = require("./../../../../helpers/templateLiteralTag");
|
7
8
|
var _orderView = require("./../utils/orderView");
|
8
|
-
var _base = _interopRequireDefault(require("./_base"));
|
9
9
|
var _element = require("../../../../helpers/dom/element");
|
10
10
|
var _a11y = require("../../../../helpers/a11y");
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
@@ -57,8 +57,9 @@ class RowsRenderer extends _base.default {
|
|
57
57
|
} = this.table;
|
58
58
|
if (!performanceWarningAppeared && rowsToRender > 1000) {
|
59
59
|
performanceWarningAppeared = true;
|
60
|
-
(0, _console.warn)((0, _templateLiteralTag.toSingleLine)`Performance tip: Handsontable rendered more than 1000 visible rows
|
61
|
-
the number of rendered rows by specifying the table height and/or
|
60
|
+
(0, _console.warn)((0, _templateLiteralTag.toSingleLine)`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
|
61
|
+
Consider limiting the number of rendered rows by specifying the table height and/or\x20
|
62
|
+
turning off the "renderAllRows" option.`);
|
62
63
|
}
|
63
64
|
if (this.table.isAriaEnabled()) {
|
64
65
|
(0, _element.setAttribute)(this.rootNode, [(0, _a11y.A11Y_ROWGROUP)()]);
|
@@ -2,10 +2,10 @@ import "core-js/modules/es.error.cause.js";
|
|
2
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
3
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
4
4
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
5
|
+
import BaseRenderer from "./_base.mjs";
|
5
6
|
import { warn } from "./../../../../helpers/console.mjs";
|
6
7
|
import { toSingleLine } from "./../../../../helpers/templateLiteralTag.mjs";
|
7
8
|
import { OrderView } from "./../utils/orderView/index.mjs";
|
8
|
-
import BaseRenderer from "./_base.mjs";
|
9
9
|
import { setAttribute } from "../../../../helpers/dom/element.mjs";
|
10
10
|
import { A11Y_ROW, A11Y_ROWGROUP, A11Y_ROWINDEX } from "../../../../helpers/a11y.mjs";
|
11
11
|
let performanceWarningAppeared = false;
|
@@ -53,8 +53,9 @@ export default class RowsRenderer extends BaseRenderer {
|
|
53
53
|
} = this.table;
|
54
54
|
if (!performanceWarningAppeared && rowsToRender > 1000) {
|
55
55
|
performanceWarningAppeared = true;
|
56
|
-
warn(toSingleLine`Performance tip: Handsontable rendered more than 1000 visible rows
|
57
|
-
the number of rendered rows by specifying the table height and/or
|
56
|
+
warn(toSingleLine`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
|
57
|
+
Consider limiting the number of rendered rows by specifying the table height and/or\x20
|
58
|
+
turning off the "renderAllRows" option.`);
|
58
59
|
}
|
59
60
|
if (this.table.isAriaEnabled()) {
|
60
61
|
setAttribute(this.rootNode, [A11Y_ROWGROUP()]);
|
@@ -208,7 +208,6 @@ class SelectionManager {
|
|
208
208
|
borderInstance === null || borderInstance === void 0 || borderInstance.disappear();
|
209
209
|
continue; // eslint-disable-line no-continue
|
210
210
|
}
|
211
|
-
|
212
211
|
if (className) {
|
213
212
|
const elements = _classPrivateFieldGet(this, _scanner).setActiveSelection(selection).scan();
|
214
213
|
elements.forEach(element => {
|
@@ -204,7 +204,6 @@ export class SelectionManager {
|
|
204
204
|
borderInstance === null || borderInstance === void 0 || borderInstance.disappear();
|
205
205
|
continue; // eslint-disable-line no-continue
|
206
206
|
}
|
207
|
-
|
208
207
|
if (className) {
|
209
208
|
const elements = _classPrivateFieldGet(this, _scanner).setActiveSelection(selection).scan();
|
210
209
|
elements.forEach(element => {
|
@@ -36,6 +36,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
36
36
|
* @property {Option} onBeforeStretchingColumnWidth Option `onBeforeStretchingColumnWidth`.
|
37
37
|
* @property {Option} preventOverflow Option `preventOverflow`.
|
38
38
|
* @property {Option} preventWheel Option `preventWheel`.
|
39
|
+
* @property {Option} renderAllColumns Option `renderAllColumns`.
|
39
40
|
* @property {Option} renderAllRows Option `renderAllRows`.
|
40
41
|
* @property {Option} rowHeaders Option `rowHeaders`.
|
41
42
|
* @property {Option} rowHeight Option `,`.
|
@@ -80,6 +81,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
80
81
|
* @template TValue.
|
81
82
|
* @typedef { TValue | Array.<TValue> | (function(...*): TValue) } Option
|
82
83
|
*/
|
84
|
+
|
83
85
|
/**
|
84
86
|
* @class Settings
|
85
87
|
*/
|
@@ -218,6 +220,7 @@ class Settings {
|
|
218
220
|
onBeforeHighlightingColumnHeader: sourceCol => sourceCol,
|
219
221
|
onWindowResize: null,
|
220
222
|
onContainerElementResize: null,
|
223
|
+
renderAllColumns: false,
|
221
224
|
renderAllRows: false,
|
222
225
|
groups: false,
|
223
226
|
rowHeaderWidth: null,
|
@@ -33,6 +33,7 @@ import { objectEach } from "../../../helpers/object.mjs";
|
|
33
33
|
* @property {Option} onBeforeStretchingColumnWidth Option `onBeforeStretchingColumnWidth`.
|
34
34
|
* @property {Option} preventOverflow Option `preventOverflow`.
|
35
35
|
* @property {Option} preventWheel Option `preventWheel`.
|
36
|
+
* @property {Option} renderAllColumns Option `renderAllColumns`.
|
36
37
|
* @property {Option} renderAllRows Option `renderAllRows`.
|
37
38
|
* @property {Option} rowHeaders Option `rowHeaders`.
|
38
39
|
* @property {Option} rowHeight Option `,`.
|
@@ -214,6 +215,7 @@ export default class Settings {
|
|
214
215
|
onBeforeHighlightingColumnHeader: sourceCol => sourceCol,
|
215
216
|
onWindowResize: null,
|
216
217
|
onContainerElementResize: null,
|
218
|
+
renderAllColumns: false,
|
217
219
|
renderAllRows: false,
|
218
220
|
groups: false,
|
219
221
|
rowHeaderWidth: null,
|
@@ -96,7 +96,6 @@ class Table {
|
|
96
96
|
if (this.isMaster) {
|
97
97
|
this.alignOverlaysWithTrimmingContainer(); // todo wow, It calls method from child class (MasterTable).
|
98
98
|
}
|
99
|
-
|
100
99
|
this.fixTableDomTree();
|
101
100
|
this.rowFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
|
102
101
|
this.columnFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
|
@@ -92,7 +92,6 @@ class Table {
|
|
92
92
|
if (this.isMaster) {
|
93
93
|
this.alignOverlaysWithTrimmingContainer(); // todo wow, It calls method from child class (MasterTable).
|
94
94
|
}
|
95
|
-
|
96
95
|
this.fixTableDomTree();
|
97
96
|
this.rowFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
|
98
97
|
this.columnFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
|
@@ -3,6 +3,7 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
5
|
var _element = require("./../../../../helpers/dom/element");
|
6
|
+
var _columnStretching = require("./columnStretching");
|
6
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
7
8
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
8
9
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
@@ -29,8 +30,18 @@ class ColumnUtils {
|
|
29
30
|
* @type {Map<number, number>}
|
30
31
|
*/
|
31
32
|
_defineProperty(this, "headerWidths", new Map());
|
33
|
+
/**
|
34
|
+
* @type {ColumnStretching}
|
35
|
+
*/
|
36
|
+
_defineProperty(this, "stretching", void 0);
|
32
37
|
this.dataAccessObject = dataAccessObject;
|
33
38
|
this.wtSettings = wtSettings;
|
39
|
+
this.stretching = new _columnStretching.ColumnStretching({
|
40
|
+
totalColumns: () => this.wtSettings.getSetting('totalColumns'),
|
41
|
+
stretchMode: () => this.wtSettings.getSetting('stretchH'),
|
42
|
+
stretchingColumnWidthFn: (stretchedWidth, column) => this.wtSettings.getSetting('onBeforeStretchingColumnWidth', stretchedWidth, column),
|
43
|
+
columnWidthFn: sourceCol => this.dataAccessObject.wtTable.getColumnWidth(sourceCol)
|
44
|
+
});
|
34
45
|
}
|
35
46
|
|
36
47
|
/**
|
@@ -50,13 +61,10 @@ class ColumnUtils {
|
|
50
61
|
* @returns {number}
|
51
62
|
*/
|
52
63
|
getStretchedColumnWidth(sourceIndex) {
|
53
|
-
const calculator = this.dataAccessObject.wtViewport.columnsRenderCalculator;
|
54
64
|
let width = this.getWidth(sourceIndex);
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
width = stretchedWidth;
|
59
|
-
}
|
65
|
+
const stretchedWidth = this.stretching.getStretchedColumnWidth(sourceIndex, width);
|
66
|
+
if (stretchedWidth) {
|
67
|
+
width = stretchedWidth;
|
60
68
|
}
|
61
69
|
return width;
|
62
70
|
}
|
@@ -87,12 +95,9 @@ class ColumnUtils {
|
|
87
95
|
}
|
88
96
|
|
89
97
|
/**
|
90
|
-
*
|
98
|
+
* Refreshes the stretching column width by recalculating the widths of the columns.
|
91
99
|
*/
|
92
|
-
|
93
|
-
const {
|
94
|
-
wtSettings
|
95
|
-
} = this;
|
100
|
+
refreshStretching() {
|
96
101
|
const {
|
97
102
|
wtTable,
|
98
103
|
wtViewport,
|
@@ -100,8 +105,18 @@ class ColumnUtils {
|
|
100
105
|
} = this.dataAccessObject;
|
101
106
|
const mainHolder = cloneSource ? cloneSource.wtTable.holder : wtTable.holder;
|
102
107
|
const scrollbarCompensation = mainHolder.offsetHeight < mainHolder.scrollHeight ? (0, _element.getScrollbarWidth)() : 0;
|
108
|
+
this.stretching.refreshStretching(wtViewport.getViewportWidth() - scrollbarCompensation);
|
109
|
+
}
|
110
|
+
|
111
|
+
/**
|
112
|
+
* Calculates column header widths that can be retrieved from the cache.
|
113
|
+
*/
|
114
|
+
calculateWidths() {
|
115
|
+
const {
|
116
|
+
wtSettings
|
117
|
+
} = this;
|
103
118
|
let rowHeaderWidthSetting = wtSettings.getSetting('rowHeaderWidth');
|
104
|
-
|
119
|
+
this.refreshStretching();
|
105
120
|
rowHeaderWidthSetting = wtSettings.getSetting('onModifyRowHeaderWidth', rowHeaderWidthSetting);
|
106
121
|
if (rowHeaderWidthSetting !== null && rowHeaderWidthSetting !== undefined) {
|
107
122
|
const rowHeadersCount = wtSettings.getSetting('rowHeaders').length;
|
@@ -3,6 +3,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
3
3
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
4
4
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
5
5
|
import { getScrollbarWidth } from "./../../../../helpers/dom/element.mjs";
|
6
|
+
import { ColumnStretching } from "./columnStretching.mjs";
|
6
7
|
/**
|
7
8
|
* Column utils class contains all necessary information about sizes of the columns.
|
8
9
|
*
|
@@ -26,8 +27,18 @@ export default class ColumnUtils {
|
|
26
27
|
* @type {Map<number, number>}
|
27
28
|
*/
|
28
29
|
_defineProperty(this, "headerWidths", new Map());
|
30
|
+
/**
|
31
|
+
* @type {ColumnStretching}
|
32
|
+
*/
|
33
|
+
_defineProperty(this, "stretching", void 0);
|
29
34
|
this.dataAccessObject = dataAccessObject;
|
30
35
|
this.wtSettings = wtSettings;
|
36
|
+
this.stretching = new ColumnStretching({
|
37
|
+
totalColumns: () => this.wtSettings.getSetting('totalColumns'),
|
38
|
+
stretchMode: () => this.wtSettings.getSetting('stretchH'),
|
39
|
+
stretchingColumnWidthFn: (stretchedWidth, column) => this.wtSettings.getSetting('onBeforeStretchingColumnWidth', stretchedWidth, column),
|
40
|
+
columnWidthFn: sourceCol => this.dataAccessObject.wtTable.getColumnWidth(sourceCol)
|
41
|
+
});
|
31
42
|
}
|
32
43
|
|
33
44
|
/**
|
@@ -47,13 +58,10 @@ export default class ColumnUtils {
|
|
47
58
|
* @returns {number}
|
48
59
|
*/
|
49
60
|
getStretchedColumnWidth(sourceIndex) {
|
50
|
-
const calculator = this.dataAccessObject.wtViewport.columnsRenderCalculator;
|
51
61
|
let width = this.getWidth(sourceIndex);
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
width = stretchedWidth;
|
56
|
-
}
|
62
|
+
const stretchedWidth = this.stretching.getStretchedColumnWidth(sourceIndex, width);
|
63
|
+
if (stretchedWidth) {
|
64
|
+
width = stretchedWidth;
|
57
65
|
}
|
58
66
|
return width;
|
59
67
|
}
|
@@ -84,12 +92,9 @@ export default class ColumnUtils {
|
|
84
92
|
}
|
85
93
|
|
86
94
|
/**
|
87
|
-
*
|
95
|
+
* Refreshes the stretching column width by recalculating the widths of the columns.
|
88
96
|
*/
|
89
|
-
|
90
|
-
const {
|
91
|
-
wtSettings
|
92
|
-
} = this;
|
97
|
+
refreshStretching() {
|
93
98
|
const {
|
94
99
|
wtTable,
|
95
100
|
wtViewport,
|
@@ -97,8 +102,18 @@ export default class ColumnUtils {
|
|
97
102
|
} = this.dataAccessObject;
|
98
103
|
const mainHolder = cloneSource ? cloneSource.wtTable.holder : wtTable.holder;
|
99
104
|
const scrollbarCompensation = mainHolder.offsetHeight < mainHolder.scrollHeight ? getScrollbarWidth() : 0;
|
105
|
+
this.stretching.refreshStretching(wtViewport.getViewportWidth() - scrollbarCompensation);
|
106
|
+
}
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Calculates column header widths that can be retrieved from the cache.
|
110
|
+
*/
|
111
|
+
calculateWidths() {
|
112
|
+
const {
|
113
|
+
wtSettings
|
114
|
+
} = this;
|
100
115
|
let rowHeaderWidthSetting = wtSettings.getSetting('rowHeaderWidth');
|
101
|
-
|
116
|
+
this.refreshStretching();
|
102
117
|
rowHeaderWidthSetting = wtSettings.getSetting('onModifyRowHeaderWidth', rowHeaderWidthSetting);
|
103
118
|
if (rowHeaderWidthSetting !== null && rowHeaderWidthSetting !== undefined) {
|
104
119
|
const rowHeadersCount = wtSettings.getSetting('rowHeaders').length;
|