handsontable 14.5.0-next-ede811d-20240717 → 14.5.0-next-cd41430-20240725
Sign up to get free protection for your applications and to get access to all the features.
- package/3rdparty/walkontable/src/calculator/calculationType/fullyVisibleColumns.js +126 -0
- package/3rdparty/walkontable/src/calculator/calculationType/fullyVisibleColumns.mjs +122 -0
- package/3rdparty/walkontable/src/calculator/calculationType/fullyVisibleRows.js +119 -0
- package/3rdparty/walkontable/src/calculator/calculationType/fullyVisibleRows.mjs +115 -0
- package/3rdparty/walkontable/src/calculator/calculationType/partiallyVisibleColumns.js +125 -0
- package/3rdparty/walkontable/src/calculator/calculationType/partiallyVisibleColumns.mjs +121 -0
- package/3rdparty/walkontable/src/calculator/calculationType/partiallyVisibleRows.js +118 -0
- package/3rdparty/walkontable/src/calculator/calculationType/partiallyVisibleRows.mjs +114 -0
- package/3rdparty/walkontable/src/calculator/{renderAllColumns.js → calculationType/renderedAllColumns.js} +32 -9
- package/3rdparty/walkontable/src/calculator/{renderAllColumns.mjs → calculationType/renderedAllColumns.mjs} +31 -8
- package/3rdparty/walkontable/src/calculator/{renderAllRows.js → calculationType/renderedAllRows.js} +32 -9
- package/3rdparty/walkontable/src/calculator/{renderAllRows.mjs → calculationType/renderedAllRows.mjs} +31 -8
- package/3rdparty/walkontable/src/calculator/calculationType/renderedColumns.js +37 -0
- package/3rdparty/walkontable/src/calculator/calculationType/renderedColumns.mjs +33 -0
- package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.js +37 -0
- package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.mjs +33 -0
- package/3rdparty/walkontable/src/calculator/index.js +18 -17
- package/3rdparty/walkontable/src/calculator/index.mjs +11 -6
- package/3rdparty/walkontable/src/calculator/viewportBase.js +92 -0
- package/3rdparty/walkontable/src/calculator/viewportBase.mjs +88 -0
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +51 -145
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +51 -145
- package/3rdparty/walkontable/src/calculator/viewportRows.js +59 -141
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +59 -141
- package/3rdparty/walkontable/src/index.js +2 -0
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/table.js +5 -11
- package/3rdparty/walkontable/src/table.mjs +5 -11
- package/3rdparty/walkontable/src/utils/column.js +2 -1
- package/3rdparty/walkontable/src/utils/column.mjs +2 -1
- package/3rdparty/walkontable/src/utils/columnStretching.js +10 -19
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +10 -19
- package/3rdparty/walkontable/src/viewport.js +35 -46
- package/3rdparty/walkontable/src/viewport.mjs +36 -47
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.js +1 -1
- package/core.mjs +2 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +2494 -1961
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +148 -148
- package/dist/handsontable.js +2495 -1962
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +32 -32
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/plugins/autoColumnSize/autoColumnSize.js +1 -1
- package/plugins/autoColumnSize/autoColumnSize.mjs +2 -2
- package/plugins/manualRowResize/manualRowResize.js +1 -1
- package/plugins/manualRowResize/manualRowResize.mjs +2 -2
- package/3rdparty/walkontable/src/calculator/constants.js +0 -26
- package/3rdparty/walkontable/src/calculator/constants.mjs +0 -23
@@ -1,6 +1,6 @@
|
|
1
1
|
import { getScrollbarWidth, getStyle, offset, outerHeight, outerWidth } from "../../../helpers/dom/element.mjs";
|
2
2
|
import { objectEach } from "../../../helpers/object.mjs";
|
3
|
-
import {
|
3
|
+
import { FullyVisibleColumnsCalculationType, FullyVisibleRowsCalculationType, PartiallyVisibleColumnsCalculationType, PartiallyVisibleRowsCalculationType, RenderedAllColumnsCalculationType, RenderedAllRowsCalculationType, RenderedColumnsCalculationType, RenderedRowsCalculationType, ViewportColumnsCalculator, ViewportRowsCalculator } from "./calculator/index.mjs";
|
4
4
|
/**
|
5
5
|
* @class Viewport
|
6
6
|
*/
|
@@ -28,6 +28,8 @@ class Viewport {
|
|
28
28
|
this.rowHeaderWidth = NaN;
|
29
29
|
this.rowsVisibleCalculator = null;
|
30
30
|
this.columnsVisibleCalculator = null;
|
31
|
+
this.rowsCalculatorTypes = new Map([['rendered', () => this.wtSettings.getSetting('renderAllRows') ? new RenderedAllRowsCalculationType() : new RenderedRowsCalculationType()], ['fullyVisible', () => new FullyVisibleRowsCalculationType()], ['partiallyVisible', () => new PartiallyVisibleRowsCalculationType()]]);
|
32
|
+
this.columnsCalculatorTypes = new Map([['rendered', () => this.wtSettings.getSetting('renderAllColumns') ? new RenderedAllColumnsCalculationType() : new RenderedColumnsCalculationType()], ['fullyVisible', () => new FullyVisibleColumnsCalculationType()], ['partiallyVisible', () => new PartiallyVisibleColumnsCalculationType()]]);
|
31
33
|
this.eventManager = eventManager;
|
32
34
|
this.eventManager.addEventListener(this.domBindings.rootWindow, 'resize', () => {
|
33
35
|
this.clientHeight = this.getWorkspaceHeight();
|
@@ -238,25 +240,20 @@ class Viewport {
|
|
238
240
|
}
|
239
241
|
|
240
242
|
/**
|
241
|
-
* Creates:
|
242
|
-
*
|
243
|
-
*
|
243
|
+
* Creates rows calculators. The type of the calculations can be chosen from the list:
|
244
|
+
* - 'rendered' Calculates rows that should be rendered within the current table's viewport;
|
245
|
+
* - 'fullyVisible' Calculates rows that are fully visible (used mostly for scrolling purposes);
|
246
|
+
* - 'partiallyVisible' Calculates rows that are partially visible (used mostly for scrolling purposes).
|
244
247
|
*
|
245
|
-
* @param {
|
246
|
-
* calculation calculator is created.
|
248
|
+
* @param {'rendered' | 'fullyVisible' | 'partiallyVisible'} calculatorTypes The list of the calculation types.
|
247
249
|
* @returns {ViewportRowsCalculator}
|
248
250
|
*/
|
249
251
|
createRowsCalculator() {
|
250
|
-
let
|
252
|
+
let calculatorTypes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['rendered', 'fullyVisible', 'partiallyVisible'];
|
251
253
|
const {
|
252
254
|
wtSettings,
|
253
255
|
wtTable
|
254
256
|
} = this;
|
255
|
-
if (wtSettings.getSetting('renderAllRows') && calculationType === RENDER_TYPE) {
|
256
|
-
return new RenderAllRowsCalculator({
|
257
|
-
totalRows: wtSettings.getSetting('totalRows')
|
258
|
-
});
|
259
|
-
}
|
260
257
|
let height = this.getViewportHeight();
|
261
258
|
let scrollbarHeight;
|
262
259
|
let fixedRowsHeight;
|
@@ -280,36 +277,31 @@ class Viewport {
|
|
280
277
|
scrollbarHeight = getScrollbarWidth(this.domBindings.rootDocument);
|
281
278
|
}
|
282
279
|
return new ViewportRowsCalculator({
|
280
|
+
calculationTypes: calculatorTypes.map(type => [type, this.rowsCalculatorTypes.get(type)()]),
|
283
281
|
viewportHeight: height,
|
284
282
|
scrollOffset: pos,
|
285
283
|
totalRows: wtSettings.getSetting('totalRows'),
|
286
284
|
rowHeightFn: sourceRow => wtTable.getRowHeight(sourceRow),
|
287
285
|
overrideFn: wtSettings.getSettingPure('viewportRowCalculatorOverride'),
|
288
|
-
calculationType,
|
289
286
|
horizontalScrollbarHeight: scrollbarHeight
|
290
287
|
});
|
291
288
|
}
|
292
289
|
|
293
290
|
/**
|
294
|
-
* Creates:
|
295
|
-
*
|
296
|
-
*
|
291
|
+
* Creates columns calculators. The type of the calculations can be chosen from the list:
|
292
|
+
* - 'rendered' Calculates columns that should be rendered within the current table's viewport;
|
293
|
+
* - 'fullyVisible' Calculates columns that are fully visible (used mostly for scrolling purposes);
|
294
|
+
* - 'partiallyVisible' Calculates columns that are partially visible (used mostly for scrolling purposes).
|
297
295
|
*
|
298
|
-
* @param {
|
299
|
-
* calculation calculator is created.
|
296
|
+
* @param {'rendered' | 'fullyVisible' | 'partiallyVisible'} calculatorTypes The list of the calculation types.
|
300
297
|
* @returns {ViewportColumnsCalculator}
|
301
298
|
*/
|
302
299
|
createColumnsCalculator() {
|
303
|
-
let
|
300
|
+
let calculatorTypes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['rendered', 'fullyVisible', 'partiallyVisible'];
|
304
301
|
const {
|
305
302
|
wtSettings,
|
306
303
|
wtTable
|
307
304
|
} = this;
|
308
|
-
if (wtSettings.getSetting('renderAllColumns') && calculationType === RENDER_TYPE) {
|
309
|
-
return new RenderAllColumnsCalculator({
|
310
|
-
totalColumns: wtSettings.getSetting('totalColumns')
|
311
|
-
});
|
312
|
-
}
|
313
305
|
let width = this.getViewportWidth();
|
314
306
|
let pos = Math.abs(this.dataAccessObject.inlineStartScrollPosition) - this.dataAccessObject.inlineStartParentOffset;
|
315
307
|
this.columnHeaderHeight = NaN;
|
@@ -323,12 +315,12 @@ class Viewport {
|
|
323
315
|
width -= getScrollbarWidth(this.domBindings.rootDocument);
|
324
316
|
}
|
325
317
|
return new ViewportColumnsCalculator({
|
318
|
+
calculationTypes: calculatorTypes.map(type => [type, this.columnsCalculatorTypes.get(type)()]),
|
326
319
|
viewportWidth: width,
|
327
320
|
scrollOffset: pos,
|
328
321
|
totalColumns: wtSettings.getSetting('totalColumns'),
|
329
322
|
columnWidthFn: sourceCol => wtTable.getColumnWidth(sourceCol),
|
330
323
|
overrideFn: wtSettings.getSettingPure('viewportColumnCalculatorOverride'),
|
331
|
-
calculationType,
|
332
324
|
inlineStartOffset: this.dataAccessObject.inlineStartParentOffset
|
333
325
|
});
|
334
326
|
}
|
@@ -341,46 +333,43 @@ class Viewport {
|
|
341
333
|
* If `false` or `undefined`, will perform a full redraw.
|
342
334
|
* @returns {boolean} The fastDraw value, possibly modified.
|
343
335
|
*/
|
344
|
-
|
336
|
+
createCalculators() {
|
345
337
|
let fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
346
338
|
const {
|
347
339
|
wtSettings
|
348
340
|
} = this;
|
341
|
+
const rowsCalculator = this.createRowsCalculator();
|
342
|
+
const columnsCalculator = this.createColumnsCalculator();
|
349
343
|
if (fastDraw && !wtSettings.getSetting('renderAllRows')) {
|
350
|
-
const proposedRowsVisibleCalculator =
|
344
|
+
const proposedRowsVisibleCalculator = rowsCalculator.getResultsFor('fullyVisible');
|
351
345
|
fastDraw = this.areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator);
|
352
346
|
}
|
353
347
|
if (fastDraw && !wtSettings.getSetting('renderAllColumns')) {
|
354
|
-
const proposedColumnsVisibleCalculator =
|
348
|
+
const proposedColumnsVisibleCalculator = columnsCalculator.getResultsFor('fullyVisible');
|
355
349
|
fastDraw = this.areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator);
|
356
350
|
}
|
357
351
|
if (!fastDraw) {
|
358
|
-
this.rowsRenderCalculator =
|
359
|
-
this.columnsRenderCalculator =
|
352
|
+
this.rowsRenderCalculator = rowsCalculator.getResultsFor('rendered');
|
353
|
+
this.columnsRenderCalculator = columnsCalculator.getResultsFor('rendered');
|
360
354
|
}
|
361
|
-
|
362
|
-
|
363
|
-
this.
|
364
|
-
this.
|
355
|
+
this.rowsVisibleCalculator = rowsCalculator.getResultsFor('fullyVisible');
|
356
|
+
this.columnsVisibleCalculator = columnsCalculator.getResultsFor('fullyVisible');
|
357
|
+
this.rowsPartiallyVisibleCalculator = rowsCalculator.getResultsFor('partiallyVisible');
|
358
|
+
this.columnsPartiallyVisibleCalculator = columnsCalculator.getResultsFor('partiallyVisible');
|
365
359
|
return fastDraw;
|
366
360
|
}
|
367
361
|
|
368
362
|
/**
|
369
|
-
* Creates
|
370
|
-
* the actually fully visible rows and columns).
|
363
|
+
* Creates rows and columns calculators (after draw, to determine what are
|
364
|
+
* the actually fully visible and partially visible rows and columns).
|
371
365
|
*/
|
372
366
|
createVisibleCalculators() {
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
* the actually partially visible rows and columns).
|
380
|
-
*/
|
381
|
-
createPartiallyVisibleCalculators() {
|
382
|
-
this.rowsPartiallyVisibleCalculator = this.createRowsCalculator(PARTIALLY_VISIBLE_TYPE);
|
383
|
-
this.columnsPartiallyVisibleCalculator = this.createColumnsCalculator(PARTIALLY_VISIBLE_TYPE);
|
367
|
+
const rowsCalculator = this.createRowsCalculator(['fullyVisible', 'partiallyVisible']);
|
368
|
+
const columnsCalculator = this.createColumnsCalculator(['fullyVisible', 'partiallyVisible']);
|
369
|
+
this.rowsVisibleCalculator = rowsCalculator.getResultsFor('fullyVisible');
|
370
|
+
this.columnsVisibleCalculator = columnsCalculator.getResultsFor('fullyVisible');
|
371
|
+
this.rowsPartiallyVisibleCalculator = rowsCalculator.getResultsFor('partiallyVisible');
|
372
|
+
this.columnsPartiallyVisibleCalculator = columnsCalculator.getResultsFor('partiallyVisible');
|
384
373
|
}
|
385
374
|
|
386
375
|
/**
|
package/base.js
CHANGED
@@ -45,8 +45,8 @@ Handsontable.hooks = _pluginHooks.default.getSingleton();
|
|
45
45
|
Handsontable.CellCoords = _src.CellCoords;
|
46
46
|
Handsontable.CellRange = _src.CellRange;
|
47
47
|
Handsontable.packageName = 'handsontable';
|
48
|
-
Handsontable.buildDate = "
|
49
|
-
Handsontable.version = "14.5.0-next-
|
48
|
+
Handsontable.buildDate = "25/07/2024 11:32:28";
|
49
|
+
Handsontable.version = "14.5.0-next-cd41430-20240725";
|
50
50
|
Handsontable.languages = {
|
51
51
|
dictionaryKeys: _registry.dictionaryKeys,
|
52
52
|
getLanguageDictionary: _registry.getLanguageDictionary,
|
package/base.mjs
CHANGED
@@ -35,8 +35,8 @@ Handsontable.hooks = Hooks.getSingleton();
|
|
35
35
|
Handsontable.CellCoords = CellCoords;
|
36
36
|
Handsontable.CellRange = CellRange;
|
37
37
|
Handsontable.packageName = 'handsontable';
|
38
|
-
Handsontable.buildDate = "
|
39
|
-
Handsontable.version = "14.5.0-next-
|
38
|
+
Handsontable.buildDate = "25/07/2024 11:32:34";
|
39
|
+
Handsontable.version = "14.5.0-next-cd41430-20240725";
|
40
40
|
Handsontable.languages = {
|
41
41
|
dictionaryKeys,
|
42
42
|
getLanguageDictionary,
|
package/core.js
CHANGED
@@ -3501,7 +3501,7 @@ function Core(rootElement, userSettings) {
|
|
3501
3501
|
let width = instance._getColWidthFromSettings(column);
|
3502
3502
|
width = instance.runHooks('modifyColWidth', width, column);
|
3503
3503
|
if (width === undefined) {
|
3504
|
-
width = _src.
|
3504
|
+
width = _src.DEFAULT_COLUMN_WIDTH;
|
3505
3505
|
}
|
3506
3506
|
return width;
|
3507
3507
|
};
|
package/core.mjs
CHANGED
@@ -29,7 +29,7 @@ import DataSource from "./dataMap/dataSource.mjs";
|
|
29
29
|
import { spreadsheetColumnLabel } from "./helpers/data.mjs";
|
30
30
|
import { IndexMapper } from "./translations/index.mjs";
|
31
31
|
import { registerAsRootInstance, hasValidParameter, isRootInstance } from "./utils/rootInstance.mjs";
|
32
|
-
import {
|
32
|
+
import { DEFAULT_COLUMN_WIDTH } from "./3rdparty/walkontable/src/index.mjs";
|
33
33
|
import Hooks from "./pluginHooks.mjs";
|
34
34
|
import { hasLanguageDictionary, getValidLanguageCode, getTranslatedPhrase } from "./i18n/registry.mjs";
|
35
35
|
import { warnUserAboutLanguageRegistration, normalizeLanguageCode } from "./i18n/utils.mjs";
|
@@ -3496,7 +3496,7 @@ export default function Core(rootElement, userSettings) {
|
|
3496
3496
|
let width = instance._getColWidthFromSettings(column);
|
3497
3497
|
width = instance.runHooks('modifyColWidth', width, column);
|
3498
3498
|
if (width === undefined) {
|
3499
|
-
width =
|
3499
|
+
width = DEFAULT_COLUMN_WIDTH;
|
3500
3500
|
}
|
3501
3501
|
return width;
|
3502
3502
|
};
|
package/dist/handsontable.css
CHANGED
@@ -25,8 +25,8 @@
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
27
27
|
*
|
28
|
-
* Version: 14.5.0-next-
|
29
|
-
* Release date: 24/07/2024 (built at
|
28
|
+
* Version: 14.5.0-next-cd41430-20240725
|
29
|
+
* Release date: 24/07/2024 (built at 25/07/2024 11:32:38)
|
30
30
|
*/
|
31
31
|
/**
|
32
32
|
* Fix for bootstrap styles
|
@@ -25,8 +25,8 @@
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
27
27
|
*
|
28
|
-
* Version: 14.5.0-next-
|
29
|
-
* Release date: 24/07/2024 (built at
|
28
|
+
* Version: 14.5.0-next-cd41430-20240725
|
29
|
+
* Release date: 24/07/2024 (built at 25/07/2024 11:32:38)
|
30
30
|
*/
|
31
31
|
/**
|
32
32
|
* Fix for bootstrap styles
|