handsontable 14.3.0-next-dda3c4b-20240415 → 14.4.0-next-f62dd73-20240521
Sign up to get free protection for your applications and to get access to all the features.
- 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 +1 -1
- package/3rdparty/walkontable/src/core/_base.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/_base.js +24 -20
- package/3rdparty/walkontable/src/overlay/_base.mjs +24 -20
- package/3rdparty/walkontable/src/overlay/bottom.js +3 -6
- package/3rdparty/walkontable/src/overlay/bottom.mjs +3 -6
- package/3rdparty/walkontable/src/overlay/inlineStart.js +22 -19
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +22 -19
- package/3rdparty/walkontable/src/overlay/top.js +13 -12
- package/3rdparty/walkontable/src/overlay/top.mjs +13 -12
- package/3rdparty/walkontable/src/overlays.js +46 -24
- package/3rdparty/walkontable/src/overlays.mjs +46 -24
- package/3rdparty/walkontable/src/selection/manager.js +7 -0
- package/3rdparty/walkontable/src/selection/manager.mjs +7 -0
- package/3rdparty/walkontable/src/selection/scanner.js +7 -0
- package/3rdparty/walkontable/src/selection/scanner.mjs +7 -0
- package/3rdparty/walkontable/src/table.js +10 -11
- package/3rdparty/walkontable/src/table.mjs +10 -11
- package/3rdparty/walkontable/src/utils/columnStretching.js +4 -0
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +4 -0
- package/3rdparty/walkontable/src/viewport.js +18 -10
- package/3rdparty/walkontable/src/viewport.mjs +18 -10
- package/CHANGELOG.md +56 -12
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.d.ts +2 -2
- package/core.js +93 -162
- package/core.mjs +93 -162
- package/dataMap/dataMap.js +10 -4
- package/dataMap/dataMap.mjs +10 -4
- package/dataMap/dataSource.js +16 -3
- package/dataMap/dataSource.mjs +16 -3
- package/dataMap/metaManager/lazyFactoryMap.js +7 -0
- package/dataMap/metaManager/lazyFactoryMap.mjs +7 -0
- package/dataMap/metaManager/metaSchema.js +38 -0
- package/dataMap/metaManager/metaSchema.mjs +38 -0
- package/dataMap/metaManager/mods/dynamicCellMeta.js +7 -0
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +7 -0
- package/dataMap/metaManager/mods/extendMetaProperties.js +44 -31
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +44 -31
- package/dataMap/metaManager/utils.js +7 -0
- package/dataMap/metaManager/utils.mjs +7 -0
- package/dist/handsontable.css +4 -5
- package/dist/handsontable.full.css +4 -5
- package/dist/handsontable.full.js +5878 -4657
- package/dist/handsontable.full.min.css +4 -4
- package/dist/handsontable.full.min.js +59 -59
- package/dist/handsontable.js +5383 -4277
- package/dist/handsontable.min.css +4 -4
- package/dist/handsontable.min.js +20 -20
- package/editorManager.js +0 -67
- package/editorManager.mjs +0 -67
- package/editors/autocompleteEditor/autocompleteEditor.js +6 -4
- package/editors/autocompleteEditor/autocompleteEditor.mjs +6 -4
- package/editors/baseEditor/baseEditor.js +1 -36
- package/editors/baseEditor/baseEditor.mjs +2 -37
- package/editors/dateEditor/dateEditor.js +4 -1
- package/editors/dateEditor/dateEditor.mjs +4 -1
- package/editors/dropdownEditor/dropdownEditor.js +8 -5
- package/editors/dropdownEditor/dropdownEditor.mjs +8 -5
- package/editors/handsontableEditor/handsontableEditor.js +2 -2
- package/editors/handsontableEditor/handsontableEditor.mjs +2 -2
- package/editors/selectEditor/selectEditor.js +1 -9
- package/editors/selectEditor/selectEditor.mjs +1 -9
- package/editors/textEditor/textEditor.js +2 -11
- package/editors/textEditor/textEditor.mjs +2 -11
- package/focusManager.js +3 -5
- package/focusManager.mjs +3 -5
- package/helpers/array.js +7 -0
- package/helpers/array.mjs +7 -0
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/helpers/number.js +12 -2
- package/helpers/number.mjs +12 -2
- package/package.json +3 -3
- package/pluginHooks.d.ts +1 -1
- package/pluginHooks.js +79 -2
- package/pluginHooks.mjs +79 -2
- package/plugins/autoColumnSize/autoColumnSize.js +7 -0
- package/plugins/autoColumnSize/autoColumnSize.mjs +7 -0
- package/plugins/autoRowSize/autoRowSize.js +2 -2
- package/plugins/autoRowSize/autoRowSize.mjs +2 -2
- package/plugins/autofill/autofill.js +1 -1
- package/plugins/autofill/autofill.mjs +1 -1
- package/plugins/base/base.d.ts +1 -1
- package/plugins/base/base.js +6 -2
- package/plugins/base/base.mjs +6 -2
- package/plugins/collapsibleColumns/collapsibleColumns.js +1 -1
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +1 -1
- package/plugins/columnSorting/sortFunction/date.js +2 -46
- package/plugins/columnSorting/sortFunction/date.mjs +2 -45
- package/plugins/columnSorting/sortFunction/time.js +17 -0
- package/plugins/columnSorting/sortFunction/time.mjs +13 -0
- package/plugins/columnSorting/sortService/registry.js +4 -2
- package/plugins/columnSorting/sortService/registry.mjs +3 -1
- package/plugins/columnSorting/utils.js +64 -0
- package/plugins/columnSorting/utils.mjs +62 -0
- package/plugins/columnSummary/columnSummary.js +27 -10
- package/plugins/columnSummary/columnSummary.mjs +27 -10
- package/plugins/columnSummary/endpoints.js +15 -0
- package/plugins/columnSummary/endpoints.mjs +15 -0
- package/plugins/comments/comments.js +2 -8
- package/plugins/comments/comments.mjs +2 -8
- package/plugins/comments/contextMenuItem/addEditComment.js +0 -1
- package/plugins/comments/contextMenuItem/addEditComment.mjs +0 -1
- package/plugins/contextMenu/contextMenu.d.ts +1 -1
- package/plugins/copyPaste/copyPaste.js +9 -2
- package/plugins/copyPaste/copyPaste.mjs +9 -2
- package/plugins/copyPaste/pasteEvent.js +1 -0
- package/plugins/copyPaste/pasteEvent.mjs +1 -0
- package/plugins/filters/filters.js +1 -1
- package/plugins/filters/filters.mjs +1 -1
- package/plugins/filters/ui/multipleSelect.js +22 -14
- package/plugins/filters/ui/multipleSelect.mjs +22 -14
- package/plugins/filters/utils.js +7 -0
- package/plugins/filters/utils.mjs +7 -0
- package/plugins/formulas/formulas.d.ts +10 -0
- package/plugins/formulas/formulas.js +11 -2
- package/plugins/formulas/formulas.mjs +11 -2
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +1 -1
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +1 -1
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +1 -1
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +1 -1
- package/plugins/hiddenColumns/hiddenColumns.js +8 -1
- package/plugins/hiddenColumns/hiddenColumns.mjs +8 -1
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +1 -1
- package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +1 -1
- package/plugins/hiddenRows/contextMenuItem/showRow.js +1 -1
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +1 -1
- package/plugins/hiddenRows/hiddenRows.js +7 -0
- package/plugins/hiddenRows/hiddenRows.mjs +7 -0
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
- package/plugins/manualColumnMove/manualColumnMove.js +1 -1
- package/plugins/manualColumnMove/manualColumnMove.mjs +1 -1
- package/plugins/manualColumnResize/manualColumnResize.js +3 -3
- package/plugins/manualColumnResize/manualColumnResize.mjs +3 -3
- package/plugins/manualRowMove/manualRowMove.js +1 -1
- package/plugins/manualRowMove/manualRowMove.mjs +1 -1
- package/plugins/manualRowResize/manualRowResize.d.ts +1 -0
- package/plugins/manualRowResize/manualRowResize.js +11 -2
- package/plugins/manualRowResize/manualRowResize.mjs +11 -2
- package/plugins/mergeCells/cellsCollection.js +7 -0
- package/plugins/mergeCells/cellsCollection.mjs +7 -0
- package/plugins/mergeCells/mergeCells.js +7 -0
- package/plugins/mergeCells/mergeCells.mjs +7 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.js +7 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +7 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/expand.js +7 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/expand.mjs +7 -0
- package/plugins/nestedRows/nestedRows.js +7 -0
- package/plugins/nestedRows/nestedRows.mjs +7 -0
- package/plugins/trimRows/trimRows.js +7 -0
- package/plugins/trimRows/trimRows.mjs +7 -0
- package/selection/selection.js +163 -4
- package/selection/selection.mjs +163 -4
- package/selection/utils.js +7 -0
- package/selection/utils.mjs +7 -0
- package/settings.d.ts +1 -0
- package/shortcutContexts/commands/editor/closeAndSave.js +2 -3
- package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -3
- package/shortcutContexts/commands/editor/closeAndSaveByArrowKeys.js +27 -0
- package/shortcutContexts/commands/editor/closeAndSaveByArrowKeys.mjs +24 -0
- package/shortcutContexts/commands/editor/closeAndSaveByEnter.js +11 -0
- package/shortcutContexts/commands/editor/closeAndSaveByEnter.mjs +8 -0
- package/shortcutContexts/commands/editor/index.js +3 -1
- package/shortcutContexts/commands/editor/index.mjs +3 -1
- package/shortcutContexts/editor.js +9 -1
- package/shortcutContexts/editor.mjs +9 -1
- package/shortcutContexts/index.js +1 -1
- package/shortcutContexts/index.mjs +1 -1
- package/shortcuts/keyObserver.js +7 -0
- package/shortcuts/keyObserver.mjs +7 -0
- package/shortcuts/utils.js +7 -0
- package/shortcuts/utils.mjs +7 -0
- package/tableView.js +1 -4
- package/tableView.mjs +1 -4
- package/translations/changesObservable/observable.js +7 -0
- package/translations/changesObservable/observable.mjs +7 -0
- package/translations/indexMapper.js +7 -0
- package/translations/indexMapper.mjs +8 -1
- package/utils/dataStructures/uniqueSet.js +7 -0
- package/utils/dataStructures/uniqueSet.mjs +7 -0
- package/utils/ghostTable.js +0 -4
- package/utils/ghostTable.mjs +0 -4
- package/utils/paginator.js +7 -0
- package/utils/paginator.mjs +7 -0
- package/validators/dateValidator/dateValidator.js +1 -3
- package/validators/dateValidator/dateValidator.mjs +1 -3
- package/validators/timeValidator/timeValidator.js +1 -3
- package/validators/timeValidator/timeValidator.mjs +1 -3
@@ -650,7 +650,7 @@ function _onMouseUp() {
|
|
650
650
|
if (movePerformed === true) {
|
651
651
|
this.persistentStateSave();
|
652
652
|
this.hot.render();
|
653
|
-
this.hot.view.adjustElementsSize(
|
653
|
+
this.hot.view.adjustElementsSize();
|
654
654
|
const selectionStart = this.hot.toVisualColumn(firstMovedPhysicalColumn);
|
655
655
|
const selectionEnd = selectionStart + columnsLen - 1;
|
656
656
|
this.hot.selectColumns(selectionStart, selectionEnd);
|
@@ -168,7 +168,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
168
168
|
_classPrivateFieldSet(_columnWidthsMap, this, new _translations.PhysicalIndexToValueMap());
|
169
169
|
_classPrivateFieldGet(_columnWidthsMap, this).addLocalHook('init', () => _assertClassBrand(_ManualColumnResize_brand, this, _onMapInit).call(this));
|
170
170
|
this.hot.columnIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(_columnWidthsMap, this));
|
171
|
-
this.addHook('modifyColWidth', (width, col) => _assertClassBrand(_ManualColumnResize_brand, this, _onModifyColWidth).call(this, width, col));
|
171
|
+
this.addHook('modifyColWidth', (width, col) => _assertClassBrand(_ManualColumnResize_brand, this, _onModifyColWidth).call(this, width, col), 1);
|
172
172
|
this.addHook('beforeStretchingColumnWidth', (stretchedWidth, column) => _assertClassBrand(_ManualColumnResize_brand, this, _onBeforeStretchingColumnWidth).call(this, stretchedWidth, column));
|
173
173
|
this.addHook('beforeColumnResize', (newSize, column, isDoubleClick) => _assertClassBrand(_ManualColumnResize_brand, this, _onBeforeColumnResize).call(this, newSize, column, isDoubleClick));
|
174
174
|
this.bindEvents();
|
@@ -401,7 +401,7 @@ class ManualColumnResize extends _base.BasePlugin {
|
|
401
401
|
const render = () => {
|
402
402
|
this.hot.forceFullRender = true;
|
403
403
|
this.hot.view.render(); // updates all
|
404
|
-
this.hot.view.adjustElementsSize(
|
404
|
+
this.hot.view.adjustElementsSize();
|
405
405
|
};
|
406
406
|
const resize = (column, forceRender) => {
|
407
407
|
const hookNewSize = this.hot.runHooks('beforeColumnResize', _classPrivateFieldGet(_newSize, this), column, true);
|
@@ -566,7 +566,7 @@ function _onMouseUp() {
|
|
566
566
|
const render = () => {
|
567
567
|
this.hot.forceFullRender = true;
|
568
568
|
this.hot.view.render(); // updates all
|
569
|
-
this.hot.view.adjustElementsSize(
|
569
|
+
this.hot.view.adjustElementsSize();
|
570
570
|
};
|
571
571
|
const resize = (column, forceRender) => {
|
572
572
|
this.hot.runHooks('beforeColumnResize', _classPrivateFieldGet(_newSize, this), column, false);
|
@@ -163,7 +163,7 @@ export class ManualColumnResize extends BasePlugin {
|
|
163
163
|
_classPrivateFieldSet(_columnWidthsMap, this, new IndexToValueMap());
|
164
164
|
_classPrivateFieldGet(_columnWidthsMap, this).addLocalHook('init', () => _assertClassBrand(_ManualColumnResize_brand, this, _onMapInit).call(this));
|
165
165
|
this.hot.columnIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(_columnWidthsMap, this));
|
166
|
-
this.addHook('modifyColWidth', (width, col) => _assertClassBrand(_ManualColumnResize_brand, this, _onModifyColWidth).call(this, width, col));
|
166
|
+
this.addHook('modifyColWidth', (width, col) => _assertClassBrand(_ManualColumnResize_brand, this, _onModifyColWidth).call(this, width, col), 1);
|
167
167
|
this.addHook('beforeStretchingColumnWidth', (stretchedWidth, column) => _assertClassBrand(_ManualColumnResize_brand, this, _onBeforeStretchingColumnWidth).call(this, stretchedWidth, column));
|
168
168
|
this.addHook('beforeColumnResize', (newSize, column, isDoubleClick) => _assertClassBrand(_ManualColumnResize_brand, this, _onBeforeColumnResize).call(this, newSize, column, isDoubleClick));
|
169
169
|
this.bindEvents();
|
@@ -396,7 +396,7 @@ export class ManualColumnResize extends BasePlugin {
|
|
396
396
|
const render = () => {
|
397
397
|
this.hot.forceFullRender = true;
|
398
398
|
this.hot.view.render(); // updates all
|
399
|
-
this.hot.view.adjustElementsSize(
|
399
|
+
this.hot.view.adjustElementsSize();
|
400
400
|
};
|
401
401
|
const resize = (column, forceRender) => {
|
402
402
|
const hookNewSize = this.hot.runHooks('beforeColumnResize', _classPrivateFieldGet(_newSize, this), column, true);
|
@@ -560,7 +560,7 @@ function _onMouseUp() {
|
|
560
560
|
const render = () => {
|
561
561
|
this.hot.forceFullRender = true;
|
562
562
|
this.hot.view.render(); // updates all
|
563
|
-
this.hot.view.adjustElementsSize(
|
563
|
+
this.hot.view.adjustElementsSize();
|
564
564
|
};
|
565
565
|
const resize = (column, forceRender) => {
|
566
566
|
this.hot.runHooks('beforeColumnResize', _classPrivateFieldGet(_newSize, this), column, false);
|
@@ -623,7 +623,7 @@ function _onMouseUp() {
|
|
623
623
|
if (movePerformed === true) {
|
624
624
|
this.persistentStateSave();
|
625
625
|
this.hot.render();
|
626
|
-
this.hot.view.adjustElementsSize(
|
626
|
+
this.hot.view.adjustElementsSize();
|
627
627
|
const selectionStart = this.hot.toVisualRow(firstMovedPhysicalRow);
|
628
628
|
const selectionEnd = selectionStart + rowsLen - 1;
|
629
629
|
this.hot.selectRows(selectionStart, selectionEnd);
|
@@ -618,7 +618,7 @@ function _onMouseUp() {
|
|
618
618
|
if (movePerformed === true) {
|
619
619
|
this.persistentStateSave();
|
620
620
|
this.hot.render();
|
621
|
-
this.hot.view.adjustElementsSize(
|
621
|
+
this.hot.view.adjustElementsSize();
|
622
622
|
const selectionStart = this.hot.toVisualRow(firstMovedPhysicalRow);
|
623
623
|
const selectionEnd = selectionStart + rowsLen - 1;
|
624
624
|
this.hot.selectRows(selectionStart, selectionEnd);
|
@@ -232,6 +232,15 @@ class ManualRowResize extends _base.BasePlugin {
|
|
232
232
|
return newHeight;
|
233
233
|
}
|
234
234
|
|
235
|
+
/**
|
236
|
+
* Returns the last desired row height set manually with the resize handle.
|
237
|
+
*
|
238
|
+
* @returns {number} The last desired row height.
|
239
|
+
*/
|
240
|
+
getLastDesiredRowHeight() {
|
241
|
+
return _classPrivateFieldGet(_currentHeight, this);
|
242
|
+
}
|
243
|
+
|
235
244
|
/**
|
236
245
|
* Sets the resize handle position.
|
237
246
|
*
|
@@ -406,7 +415,7 @@ class ManualRowResize extends _base.BasePlugin {
|
|
406
415
|
const render = () => {
|
407
416
|
this.hot.forceFullRender = true;
|
408
417
|
this.hot.view.render(); // updates all
|
409
|
-
this.hot.view.adjustElementsSize(
|
418
|
+
this.hot.view.adjustElementsSize();
|
410
419
|
};
|
411
420
|
const resize = (row, forceRender) => {
|
412
421
|
const hookNewSize = this.hot.runHooks('beforeRowResize', this.getActualRowHeight(row), row, true);
|
@@ -535,7 +544,7 @@ function _onMouseUp() {
|
|
535
544
|
const render = () => {
|
536
545
|
this.hot.forceFullRender = true;
|
537
546
|
this.hot.view.render(); // updates all
|
538
|
-
this.hot.view.adjustElementsSize(
|
547
|
+
this.hot.view.adjustElementsSize();
|
539
548
|
};
|
540
549
|
const runHooks = (row, forceRender) => {
|
541
550
|
this.hot.runHooks('beforeRowResize', this.getActualRowHeight(row), row, false);
|
@@ -227,6 +227,15 @@ export class ManualRowResize extends BasePlugin {
|
|
227
227
|
return newHeight;
|
228
228
|
}
|
229
229
|
|
230
|
+
/**
|
231
|
+
* Returns the last desired row height set manually with the resize handle.
|
232
|
+
*
|
233
|
+
* @returns {number} The last desired row height.
|
234
|
+
*/
|
235
|
+
getLastDesiredRowHeight() {
|
236
|
+
return _classPrivateFieldGet(_currentHeight, this);
|
237
|
+
}
|
238
|
+
|
230
239
|
/**
|
231
240
|
* Sets the resize handle position.
|
232
241
|
*
|
@@ -401,7 +410,7 @@ export class ManualRowResize extends BasePlugin {
|
|
401
410
|
const render = () => {
|
402
411
|
this.hot.forceFullRender = true;
|
403
412
|
this.hot.view.render(); // updates all
|
404
|
-
this.hot.view.adjustElementsSize(
|
413
|
+
this.hot.view.adjustElementsSize();
|
405
414
|
};
|
406
415
|
const resize = (row, forceRender) => {
|
407
416
|
const hookNewSize = this.hot.runHooks('beforeRowResize', this.getActualRowHeight(row), row, true);
|
@@ -529,7 +538,7 @@ function _onMouseUp() {
|
|
529
538
|
const render = () => {
|
530
539
|
this.hot.forceFullRender = true;
|
531
540
|
this.hot.view.render(); // updates all
|
532
|
-
this.hot.view.adjustElementsSize(
|
541
|
+
this.hot.view.adjustElementsSize();
|
533
542
|
};
|
534
543
|
const runHooks = (row, forceRender) => {
|
535
544
|
this.hot.runHooks('beforeRowResize', this.getActualRowHeight(row), row, false);
|
@@ -4,6 +4,13 @@ exports.__esModule = true;
|
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
5
|
require("core-js/modules/es.array.push.js");
|
6
6
|
require("core-js/modules/es.array.unscopables.flat-map.js");
|
7
|
+
require("core-js/modules/esnext.set.difference.v2.js");
|
8
|
+
require("core-js/modules/esnext.set.intersection.v2.js");
|
9
|
+
require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
|
10
|
+
require("core-js/modules/esnext.set.is-subset-of.v2.js");
|
11
|
+
require("core-js/modules/esnext.set.is-superset-of.v2.js");
|
12
|
+
require("core-js/modules/esnext.set.symmetric-difference.v2.js");
|
13
|
+
require("core-js/modules/esnext.set.union.v2.js");
|
7
14
|
var _cellCoords = _interopRequireDefault(require("./cellCoords"));
|
8
15
|
var _number = require("../../helpers/number");
|
9
16
|
var _console = require("../../helpers/console");
|
@@ -1,6 +1,13 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
import "core-js/modules/es.array.push.js";
|
3
3
|
import "core-js/modules/es.array.unscopables.flat-map.js";
|
4
|
+
import "core-js/modules/esnext.set.difference.v2.js";
|
5
|
+
import "core-js/modules/esnext.set.intersection.v2.js";
|
6
|
+
import "core-js/modules/esnext.set.is-disjoint-from.v2.js";
|
7
|
+
import "core-js/modules/esnext.set.is-subset-of.v2.js";
|
8
|
+
import "core-js/modules/esnext.set.is-superset-of.v2.js";
|
9
|
+
import "core-js/modules/esnext.set.symmetric-difference.v2.js";
|
10
|
+
import "core-js/modules/esnext.set.union.v2.js";
|
4
11
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
5
12
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
6
13
|
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,6 +3,13 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
5
|
require("core-js/modules/es.array.push.js");
|
6
|
+
require("core-js/modules/esnext.set.difference.v2.js");
|
7
|
+
require("core-js/modules/esnext.set.intersection.v2.js");
|
8
|
+
require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
|
9
|
+
require("core-js/modules/esnext.set.is-subset-of.v2.js");
|
10
|
+
require("core-js/modules/esnext.set.is-superset-of.v2.js");
|
11
|
+
require("core-js/modules/esnext.set.symmetric-difference.v2.js");
|
12
|
+
require("core-js/modules/esnext.set.union.v2.js");
|
6
13
|
var _base = require("../base");
|
7
14
|
var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
|
8
15
|
var _cellsCollection = _interopRequireDefault(require("./cellsCollection"));
|
@@ -1,5 +1,12 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
import "core-js/modules/es.array.push.js";
|
3
|
+
import "core-js/modules/esnext.set.difference.v2.js";
|
4
|
+
import "core-js/modules/esnext.set.intersection.v2.js";
|
5
|
+
import "core-js/modules/esnext.set.is-disjoint-from.v2.js";
|
6
|
+
import "core-js/modules/esnext.set.is-subset-of.v2.js";
|
7
|
+
import "core-js/modules/esnext.set.is-superset-of.v2.js";
|
8
|
+
import "core-js/modules/esnext.set.symmetric-difference.v2.js";
|
9
|
+
import "core-js/modules/esnext.set.union.v2.js";
|
3
10
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
4
11
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
5
12
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
exports.collapseNode = collapseNode;
|
5
|
+
require("core-js/modules/esnext.set.difference.v2.js");
|
6
|
+
require("core-js/modules/esnext.set.intersection.v2.js");
|
7
|
+
require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
|
8
|
+
require("core-js/modules/esnext.set.is-subset-of.v2.js");
|
9
|
+
require("core-js/modules/esnext.set.is-superset-of.v2.js");
|
10
|
+
require("core-js/modules/esnext.set.symmetric-difference.v2.js");
|
11
|
+
require("core-js/modules/esnext.set.union.v2.js");
|
5
12
|
var _array = require("../../../../helpers/array");
|
6
13
|
var _expand = require("./expand");
|
7
14
|
var _tree = require("./utils/tree");
|
@@ -1,3 +1,10 @@
|
|
1
|
+
import "core-js/modules/esnext.set.difference.v2.js";
|
2
|
+
import "core-js/modules/esnext.set.intersection.v2.js";
|
3
|
+
import "core-js/modules/esnext.set.is-disjoint-from.v2.js";
|
4
|
+
import "core-js/modules/esnext.set.is-subset-of.v2.js";
|
5
|
+
import "core-js/modules/esnext.set.is-superset-of.v2.js";
|
6
|
+
import "core-js/modules/esnext.set.symmetric-difference.v2.js";
|
7
|
+
import "core-js/modules/esnext.set.union.v2.js";
|
1
8
|
import { arrayEach } from "../../../../helpers/array.mjs";
|
2
9
|
import { expandNode } from "./expand.mjs";
|
3
10
|
import { getFirstChildProperty, isNodeReflectsFirstChildColspan, traverseHiddenNodeColumnIndexes } from "./utils/tree.mjs";
|
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
exports.expandNode = expandNode;
|
5
|
+
require("core-js/modules/esnext.set.difference.v2.js");
|
6
|
+
require("core-js/modules/esnext.set.intersection.v2.js");
|
7
|
+
require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
|
8
|
+
require("core-js/modules/esnext.set.is-subset-of.v2.js");
|
9
|
+
require("core-js/modules/esnext.set.is-superset-of.v2.js");
|
10
|
+
require("core-js/modules/esnext.set.symmetric-difference.v2.js");
|
11
|
+
require("core-js/modules/esnext.set.union.v2.js");
|
5
12
|
var _array = require("../../../../helpers/array");
|
6
13
|
var _collapse = require("./collapse");
|
7
14
|
var _tree = require("./utils/tree");
|
@@ -1,3 +1,10 @@
|
|
1
|
+
import "core-js/modules/esnext.set.difference.v2.js";
|
2
|
+
import "core-js/modules/esnext.set.intersection.v2.js";
|
3
|
+
import "core-js/modules/esnext.set.is-disjoint-from.v2.js";
|
4
|
+
import "core-js/modules/esnext.set.is-subset-of.v2.js";
|
5
|
+
import "core-js/modules/esnext.set.is-superset-of.v2.js";
|
6
|
+
import "core-js/modules/esnext.set.symmetric-difference.v2.js";
|
7
|
+
import "core-js/modules/esnext.set.union.v2.js";
|
1
8
|
import { arrayEach } from "../../../../helpers/array.mjs";
|
2
9
|
import { collapseNode } from "./collapse.mjs";
|
3
10
|
import { getFirstChildProperty, isNodeReflectsFirstChildColspan, traverseHiddenNodeColumnIndexes } from "./utils/tree.mjs";
|
@@ -3,6 +3,13 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
5
|
require("core-js/modules/es.array.push.js");
|
6
|
+
require("core-js/modules/esnext.set.difference.v2.js");
|
7
|
+
require("core-js/modules/esnext.set.intersection.v2.js");
|
8
|
+
require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
|
9
|
+
require("core-js/modules/esnext.set.is-subset-of.v2.js");
|
10
|
+
require("core-js/modules/esnext.set.is-superset-of.v2.js");
|
11
|
+
require("core-js/modules/esnext.set.symmetric-difference.v2.js");
|
12
|
+
require("core-js/modules/esnext.set.union.v2.js");
|
6
13
|
var _base = require("../base");
|
7
14
|
var _dataManager = _interopRequireDefault(require("./data/dataManager"));
|
8
15
|
var _collapsing = _interopRequireDefault(require("./ui/collapsing"));
|
@@ -1,5 +1,12 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
import "core-js/modules/es.array.push.js";
|
3
|
+
import "core-js/modules/esnext.set.difference.v2.js";
|
4
|
+
import "core-js/modules/esnext.set.intersection.v2.js";
|
5
|
+
import "core-js/modules/esnext.set.is-disjoint-from.v2.js";
|
6
|
+
import "core-js/modules/esnext.set.is-subset-of.v2.js";
|
7
|
+
import "core-js/modules/esnext.set.is-superset-of.v2.js";
|
8
|
+
import "core-js/modules/esnext.set.symmetric-difference.v2.js";
|
9
|
+
import "core-js/modules/esnext.set.union.v2.js";
|
3
10
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
4
11
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
5
12
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
@@ -3,6 +3,13 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
5
|
require("core-js/modules/es.array.push.js");
|
6
|
+
require("core-js/modules/esnext.set.difference.v2.js");
|
7
|
+
require("core-js/modules/esnext.set.intersection.v2.js");
|
8
|
+
require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
|
9
|
+
require("core-js/modules/esnext.set.is-subset-of.v2.js");
|
10
|
+
require("core-js/modules/esnext.set.is-superset-of.v2.js");
|
11
|
+
require("core-js/modules/esnext.set.symmetric-difference.v2.js");
|
12
|
+
require("core-js/modules/esnext.set.union.v2.js");
|
6
13
|
var _base = require("../base");
|
7
14
|
var _translations = require("../../translations");
|
8
15
|
var _array = require("../../helpers/array");
|
@@ -1,5 +1,12 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
import "core-js/modules/es.array.push.js";
|
3
|
+
import "core-js/modules/esnext.set.difference.v2.js";
|
4
|
+
import "core-js/modules/esnext.set.intersection.v2.js";
|
5
|
+
import "core-js/modules/esnext.set.is-disjoint-from.v2.js";
|
6
|
+
import "core-js/modules/esnext.set.is-subset-of.v2.js";
|
7
|
+
import "core-js/modules/esnext.set.is-superset-of.v2.js";
|
8
|
+
import "core-js/modules/esnext.set.symmetric-difference.v2.js";
|
9
|
+
import "core-js/modules/esnext.set.union.v2.js";
|
3
10
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
4
11
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
5
12
|
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; }
|
package/selection/selection.js
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
|
+
require("core-js/modules/es.array.push.js");
|
6
|
+
require("core-js/modules/esnext.set.difference.v2.js");
|
7
|
+
require("core-js/modules/esnext.set.intersection.v2.js");
|
8
|
+
require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
|
9
|
+
require("core-js/modules/esnext.set.is-subset-of.v2.js");
|
10
|
+
require("core-js/modules/esnext.set.is-superset-of.v2.js");
|
11
|
+
require("core-js/modules/esnext.set.symmetric-difference.v2.js");
|
12
|
+
require("core-js/modules/esnext.set.union.v2.js");
|
5
13
|
var _highlight = _interopRequireWildcard(require("./highlight/highlight"));
|
6
14
|
var _range = _interopRequireDefault(require("./range"));
|
7
15
|
var _object = require("./../helpers/object");
|
@@ -420,7 +428,23 @@ class Selection {
|
|
420
428
|
}
|
421
429
|
this.runLocalHooks('beforeHighlightSet');
|
422
430
|
this.setRangeFocus(this.selectedRange.current().highlight);
|
423
|
-
|
431
|
+
this.applyAndCommit();
|
432
|
+
const isLastLayer = _classPrivateFieldGet(_expectedLayersCount, this) === -1 || this.selectedRange.size() === _classPrivateFieldGet(_expectedLayersCount, this);
|
433
|
+
this.runLocalHooks('afterSetRangeEnd', coords, isLastLayer);
|
434
|
+
}
|
435
|
+
|
436
|
+
/**
|
437
|
+
* Applies and commits the selection to all layers (using the Walkontable Selection API) based on the selection (CellRanges)
|
438
|
+
* collected in the `selectedRange` module.
|
439
|
+
*
|
440
|
+
* @param {CellRange} [cellRange] The cell range to apply. If not provided, the current selection is used.
|
441
|
+
* @param {number} [layerLevel] The layer level to apply. If not provided, the current layer level is used.
|
442
|
+
*/
|
443
|
+
applyAndCommit() {
|
444
|
+
let cellRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectedRange.current();
|
445
|
+
let layerLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLayerLevel();
|
446
|
+
const countRows = this.tableProps.countRows();
|
447
|
+
const countCols = this.tableProps.countCols();
|
424
448
|
|
425
449
|
// If the next layer level is lower than previous then clear all area and header highlights. This is the
|
426
450
|
// indication that the new selection is performing.
|
@@ -502,8 +526,6 @@ class Selection {
|
|
502
526
|
activeCornerHeaderHighlight.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(), -this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1, -1)).commit();
|
503
527
|
}
|
504
528
|
}
|
505
|
-
const isLastLayer = _classPrivateFieldGet(_expectedLayersCount, this) === -1 || this.selectedRange.size() === _classPrivateFieldGet(_expectedLayersCount, this);
|
506
|
-
this.runLocalHooks('afterSetRangeEnd', coords, isLastLayer);
|
507
529
|
}
|
508
530
|
|
509
531
|
/**
|
@@ -600,6 +622,104 @@ class Selection {
|
|
600
622
|
this.setRangeFocus(focusCoords.normalize());
|
601
623
|
}
|
602
624
|
|
625
|
+
/**
|
626
|
+
* Transforms the last selection layer down or up by the index count.
|
627
|
+
*
|
628
|
+
* @param {number} visualRowIndex Visual row index from which the selection will be shifted.
|
629
|
+
* @param {number} amount The number of rows to shift the selection.
|
630
|
+
*/
|
631
|
+
shiftRows(visualRowIndex, amount) {
|
632
|
+
if (!this.isSelected()) {
|
633
|
+
return;
|
634
|
+
}
|
635
|
+
const range = this.selectedRange.current();
|
636
|
+
if (this.isSelectedByCorner()) {
|
637
|
+
this.selectAll(true, true, {
|
638
|
+
disableHeadersHighlight: true
|
639
|
+
});
|
640
|
+
} else if (this.isSelectedByColumnHeader() || range.getOuterTopStartCorner().row >= visualRowIndex) {
|
641
|
+
const {
|
642
|
+
from,
|
643
|
+
to,
|
644
|
+
highlight
|
645
|
+
} = range;
|
646
|
+
const countRows = this.tableProps.countRows();
|
647
|
+
const isSelectedByRowHeader = this.isSelectedByRowHeader();
|
648
|
+
const isSelectedByColumnHeader = this.isSelectedByColumnHeader();
|
649
|
+
const minRow = isSelectedByColumnHeader ? -1 : 0;
|
650
|
+
const coordsStartAmount = isSelectedByColumnHeader ? 0 : amount;
|
651
|
+
|
652
|
+
// Remove from the stack the last added selection as that selection below will be
|
653
|
+
// replaced by new transformed selection.
|
654
|
+
this.getSelectedRange().pop();
|
655
|
+
const coordsStart = this.tableProps.createCellCoords((0, _number.clamp)(from.row + coordsStartAmount, minRow, countRows - 1), from.col);
|
656
|
+
const coordsEnd = this.tableProps.createCellCoords((0, _number.clamp)(to.row + amount, minRow, countRows - 1), to.col);
|
657
|
+
this.markSource('shift');
|
658
|
+
if (highlight.row >= visualRowIndex) {
|
659
|
+
this.setRangeStartOnly(coordsStart, true, this.tableProps.createCellCoords((0, _number.clamp)(highlight.row + amount, 0, countRows - 1), highlight.col));
|
660
|
+
} else {
|
661
|
+
this.setRangeStartOnly(coordsStart, true);
|
662
|
+
}
|
663
|
+
if (isSelectedByRowHeader) {
|
664
|
+
this.selectedByRowHeader.add(this.getLayerLevel());
|
665
|
+
}
|
666
|
+
if (isSelectedByColumnHeader) {
|
667
|
+
this.selectedByColumnHeader.add(this.getLayerLevel());
|
668
|
+
}
|
669
|
+
this.setRangeEnd(coordsEnd);
|
670
|
+
this.markEndSource();
|
671
|
+
}
|
672
|
+
}
|
673
|
+
|
674
|
+
/**
|
675
|
+
* Transforms the last selection layer left or right by the index count.
|
676
|
+
*
|
677
|
+
* @param {number} visualColumnIndex Visual column index from which the selection will be shifted.
|
678
|
+
* @param {number} amount The number of columns to shift the selection.
|
679
|
+
*/
|
680
|
+
shiftColumns(visualColumnIndex, amount) {
|
681
|
+
if (!this.isSelected()) {
|
682
|
+
return;
|
683
|
+
}
|
684
|
+
const range = this.selectedRange.current();
|
685
|
+
if (this.isSelectedByCorner()) {
|
686
|
+
this.selectAll(true, true, {
|
687
|
+
disableHeadersHighlight: true
|
688
|
+
});
|
689
|
+
} else if (this.isSelectedByRowHeader() || range.getOuterTopStartCorner().col >= visualColumnIndex) {
|
690
|
+
const {
|
691
|
+
from,
|
692
|
+
to,
|
693
|
+
highlight
|
694
|
+
} = range;
|
695
|
+
const countCols = this.tableProps.countCols();
|
696
|
+
const isSelectedByRowHeader = this.isSelectedByRowHeader();
|
697
|
+
const isSelectedByColumnHeader = this.isSelectedByColumnHeader();
|
698
|
+
const minColumn = isSelectedByRowHeader ? -1 : 0;
|
699
|
+
const coordsStartAmount = isSelectedByRowHeader ? 0 : amount;
|
700
|
+
|
701
|
+
// Remove from the stack the last added selection as that selection below will be
|
702
|
+
// replaced by new transformed selection.
|
703
|
+
this.getSelectedRange().pop();
|
704
|
+
const coordsStart = this.tableProps.createCellCoords(from.row, (0, _number.clamp)(from.col + coordsStartAmount, minColumn, countCols - 1));
|
705
|
+
const coordsEnd = this.tableProps.createCellCoords(to.row, (0, _number.clamp)(to.col + amount, minColumn, countCols - 1));
|
706
|
+
this.markSource('shift');
|
707
|
+
if (highlight.col >= visualColumnIndex) {
|
708
|
+
this.setRangeStartOnly(coordsStart, true, this.tableProps.createCellCoords(highlight.row, (0, _number.clamp)(highlight.col + amount, 0, countCols - 1)));
|
709
|
+
} else {
|
710
|
+
this.setRangeStartOnly(coordsStart, true);
|
711
|
+
}
|
712
|
+
if (isSelectedByRowHeader) {
|
713
|
+
this.selectedByRowHeader.add(this.getLayerLevel());
|
714
|
+
}
|
715
|
+
if (isSelectedByColumnHeader) {
|
716
|
+
this.selectedByColumnHeader.add(this.getLayerLevel());
|
717
|
+
}
|
718
|
+
this.setRangeEnd(coordsEnd);
|
719
|
+
this.markEndSource();
|
720
|
+
}
|
721
|
+
}
|
722
|
+
|
603
723
|
/**
|
604
724
|
* Returns currently used layer level.
|
605
725
|
*
|
@@ -1032,9 +1152,48 @@ class Selection {
|
|
1032
1152
|
}
|
1033
1153
|
|
1034
1154
|
/**
|
1035
|
-
*
|
1155
|
+
* Refreshes the whole selection by clearing, reapplying and committing the renderable selection (Walkontable Selection API)
|
1156
|
+
* by using already added visual ranges.
|
1036
1157
|
*/
|
1037
1158
|
refresh() {
|
1159
|
+
if (!this.isSelected()) {
|
1160
|
+
return;
|
1161
|
+
}
|
1162
|
+
const countRows = this.tableProps.countRows();
|
1163
|
+
const countColumns = this.tableProps.countCols();
|
1164
|
+
if (countRows === 0 || countColumns === 0) {
|
1165
|
+
this.deselect();
|
1166
|
+
return;
|
1167
|
+
}
|
1168
|
+
const range = this.selectedRange.peekByIndex(this.selectedRange.size() - 1);
|
1169
|
+
const {
|
1170
|
+
from,
|
1171
|
+
to,
|
1172
|
+
highlight
|
1173
|
+
} = range;
|
1174
|
+
this.clear();
|
1175
|
+
highlight.assign({
|
1176
|
+
row: (0, _number.clamp)(highlight.row, -Infinity, countRows - 1),
|
1177
|
+
col: (0, _number.clamp)(highlight.col, -Infinity, countColumns - 1)
|
1178
|
+
});
|
1179
|
+
from.assign({
|
1180
|
+
row: (0, _number.clamp)(from.row, -Infinity, countRows - 1),
|
1181
|
+
col: (0, _number.clamp)(from.col, -Infinity, countColumns - 1)
|
1182
|
+
});
|
1183
|
+
to.assign({
|
1184
|
+
row: (0, _number.clamp)(to.row, 0, countRows - 1),
|
1185
|
+
col: (0, _number.clamp)(to.col, 0, countColumns - 1)
|
1186
|
+
});
|
1187
|
+
this.selectedRange.ranges.push(range);
|
1188
|
+
this.highlight.getFocus().add(highlight).commit().syncWith(range);
|
1189
|
+
this.applyAndCommit(range);
|
1190
|
+
}
|
1191
|
+
|
1192
|
+
/**
|
1193
|
+
* Refreshes the whole selection by recommitting (recalculating visual indexes to renderable ones) the renderable selection
|
1194
|
+
* that was already added.
|
1195
|
+
*/
|
1196
|
+
commit() {
|
1038
1197
|
const customSelections = this.highlight.getCustomSelections();
|
1039
1198
|
customSelections.forEach(customSelection => {
|
1040
1199
|
customSelection.commit();
|