handsontable 0.0.0-next-5e7f0fe-20230504 → 0.0.0-next-48677e7-20230509
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/cell/coords.js +40 -13
- package/3rdparty/walkontable/src/cell/coords.mjs +40 -13
- package/3rdparty/walkontable/src/cell/range.js +29 -25
- package/3rdparty/walkontable/src/cell/range.mjs +28 -24
- package/3rdparty/walkontable/src/core/_base.js +9 -3
- package/3rdparty/walkontable/src/core/_base.mjs +9 -3
- package/3rdparty/walkontable/src/core/clone.js +2 -2
- package/3rdparty/walkontable/src/core/clone.mjs +2 -2
- package/3rdparty/walkontable/src/core/core.js +3 -2
- package/3rdparty/walkontable/src/core/core.mjs +3 -2
- package/3rdparty/walkontable/src/event.js +12 -10
- package/3rdparty/walkontable/src/event.mjs +12 -10
- package/3rdparty/walkontable/src/facade/core.js +2 -2
- package/3rdparty/walkontable/src/facade/core.mjs +2 -2
- package/3rdparty/walkontable/src/index.js +10 -2
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +8 -7
- package/3rdparty/walkontable/src/overlay/_base.mjs +8 -7
- package/3rdparty/walkontable/src/overlay/bottom.js +7 -6
- package/3rdparty/walkontable/src/overlay/bottom.mjs +7 -6
- package/3rdparty/walkontable/src/overlay/inlineStart.js +2 -4
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -4
- package/3rdparty/walkontable/src/overlay/top.js +9 -10
- package/3rdparty/walkontable/src/overlay/top.mjs +9 -10
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +12 -10
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +12 -10
- package/3rdparty/walkontable/src/overlays.js +64 -55
- package/3rdparty/walkontable/src/overlays.mjs +64 -55
- package/3rdparty/walkontable/src/renderer/table.js +2 -0
- package/3rdparty/walkontable/src/renderer/table.mjs +2 -0
- package/3rdparty/walkontable/src/scroll.js +23 -20
- package/3rdparty/walkontable/src/scroll.mjs +23 -20
- package/3rdparty/walkontable/src/{border.js → selection/border/border.js} +7 -12
- package/3rdparty/walkontable/src/{border.mjs → selection/border/border.mjs} +7 -12
- package/3rdparty/walkontable/src/selection/border/constants.js +18 -0
- package/3rdparty/walkontable/src/selection/border/constants.mjs +13 -0
- package/3rdparty/walkontable/src/selection/constants.js +63 -0
- package/3rdparty/walkontable/src/selection/constants.mjs +51 -0
- package/3rdparty/walkontable/src/selection/index.js +30 -0
- package/3rdparty/walkontable/src/selection/index.mjs +5 -0
- package/3rdparty/walkontable/src/selection/manager.js +334 -0
- package/3rdparty/walkontable/src/selection/manager.mjs +328 -0
- package/3rdparty/walkontable/src/selection/scanner.js +363 -0
- package/3rdparty/walkontable/src/selection/scanner.mjs +359 -0
- package/3rdparty/walkontable/src/selection/selection.js +133 -0
- package/3rdparty/walkontable/src/selection/selection.mjs +127 -0
- package/3rdparty/walkontable/src/settings.js +15 -13
- package/3rdparty/walkontable/src/settings.mjs +15 -13
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -0
- package/3rdparty/walkontable/src/table.js +33 -101
- package/3rdparty/walkontable/src/table.mjs +34 -102
- package/base.js +4 -2
- package/base.mjs +2 -2
- package/core.d.ts +4 -0
- package/core.js +49 -8
- package/core.mjs +49 -8
- package/dataMap/dataSource.js +5 -5
- package/dataMap/dataSource.mjs +5 -5
- package/dataMap/metaManager/metaSchema.js +7 -0
- package/dataMap/metaManager/metaSchema.mjs +7 -0
- package/dist/handsontable.css +7 -2
- package/dist/handsontable.full.css +7 -2
- package/dist/handsontable.full.js +9409 -9084
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +115 -123
- package/dist/handsontable.js +9497 -9171
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +3 -11
- package/dist/languages/all.js +0 -133
- package/dist/languages/ar-AR.js +0 -7
- package/dist/languages/cs-CZ.js +0 -7
- package/dist/languages/de-CH.js +0 -7
- package/dist/languages/de-DE.js +0 -7
- package/dist/languages/en-US.js +0 -7
- package/dist/languages/es-MX.js +0 -7
- package/dist/languages/fr-FR.js +0 -7
- package/dist/languages/it-IT.js +0 -7
- package/dist/languages/ja-JP.js +0 -7
- package/dist/languages/ko-KR.js +0 -7
- package/dist/languages/lv-LV.js +0 -7
- package/dist/languages/nb-NO.js +0 -7
- package/dist/languages/nl-NL.js +0 -7
- package/dist/languages/pl-PL.js +0 -7
- package/dist/languages/pt-BR.js +0 -7
- package/dist/languages/ru-RU.js +0 -7
- package/dist/languages/sr-SP.js +0 -7
- package/dist/languages/zh-CN.js +0 -7
- package/dist/languages/zh-TW.js +0 -7
- package/editorManager.js +7 -3
- package/editorManager.mjs +7 -3
- package/editors/textEditor/textEditor.js +3 -16
- package/editors/textEditor/textEditor.mjs +4 -17
- package/focusManager.d.ts +12 -0
- package/focusManager.js +249 -0
- package/focusManager.mjs +245 -0
- package/helpers/dom/element.js +11 -0
- package/helpers/dom/element.mjs +10 -0
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/i18n/languages/ar-AR.js +1 -7
- package/i18n/languages/cs-CZ.js +1 -7
- package/i18n/languages/de-CH.js +1 -7
- package/i18n/languages/de-DE.js +1 -7
- package/i18n/languages/en-US.js +1 -7
- package/i18n/languages/es-MX.js +1 -7
- package/i18n/languages/fr-FR.js +1 -7
- package/i18n/languages/it-IT.js +1 -7
- package/i18n/languages/ja-JP.js +1 -7
- package/i18n/languages/ko-KR.js +1 -7
- package/i18n/languages/lv-LV.js +1 -7
- package/i18n/languages/nb-NO.js +1 -7
- package/i18n/languages/nl-NL.js +1 -7
- package/i18n/languages/pl-PL.js +1 -7
- package/i18n/languages/pt-BR.js +1 -7
- package/i18n/languages/ru-RU.js +1 -7
- package/i18n/languages/sr-SP.js +1 -7
- package/i18n/languages/zh-CN.js +1 -7
- package/i18n/languages/zh-TW.js +1 -7
- package/languages/all.js +0 -133
- package/languages/ar-AR.js +0 -7
- package/languages/cs-CZ.js +0 -7
- package/languages/de-CH.js +0 -7
- package/languages/de-DE.js +0 -7
- package/languages/en-US.js +0 -7
- package/languages/es-MX.js +0 -7
- package/languages/fr-FR.js +0 -7
- package/languages/index.js +0 -133
- package/languages/it-IT.js +0 -7
- package/languages/ja-JP.js +0 -7
- package/languages/ko-KR.js +0 -7
- package/languages/lv-LV.js +0 -7
- package/languages/nb-NO.js +0 -7
- package/languages/nl-NL.js +0 -7
- package/languages/pl-PL.js +0 -7
- package/languages/pt-BR.js +0 -7
- package/languages/ru-RU.js +0 -7
- package/languages/sr-SP.js +0 -7
- package/languages/zh-CN.js +0 -7
- package/languages/zh-TW.js +0 -7
- package/package.json +2 -3
- package/pluginHooks.js +7 -17
- package/pluginHooks.mjs +4 -16
- package/plugins/autoRowSize/autoRowSize.js +2 -2
- package/plugins/autoRowSize/autoRowSize.mjs +2 -2
- package/plugins/copyPaste/copyPaste.js +12 -93
- package/plugins/copyPaste/copyPaste.mjs +12 -93
- package/plugins/copyPaste/copyableRanges.js +31 -25
- package/plugins/copyPaste/copyableRanges.mjs +24 -18
- package/plugins/customBorders/customBorders.js +6 -2
- package/plugins/customBorders/customBorders.mjs +7 -3
- package/plugins/filters/filters.js +0 -5
- package/plugins/filters/filters.mjs +0 -5
- package/plugins/formulas/formulas.js +168 -190
- package/plugins/formulas/formulas.mjs +168 -190
- package/plugins/mergeCells/mergeCells.js +0 -16
- package/plugins/mergeCells/mergeCells.mjs +0 -16
- package/plugins/nestedHeaders/nestedHeaders.js +3 -4
- package/plugins/nestedHeaders/nestedHeaders.mjs +3 -4
- package/plugins/nestedHeaders/stateManager/headersTree.js +26 -23
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +23 -20
- package/plugins/nestedHeaders/stateManager/index.js +3 -3
- package/plugins/nestedHeaders/stateManager/matrixGenerator.js +0 -1
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
- package/plugins/nestedHeaders/utils/ghostTable.js +35 -30
- package/plugins/nestedHeaders/utils/ghostTable.mjs +35 -30
- package/plugins/registry.js +1 -3
- package/plugins/undoRedo/undoRedo.js +1 -0
- package/plugins/undoRedo/undoRedo.mjs +1 -0
- package/renderers/baseRenderer/baseRenderer.js +3 -0
- package/renderers/baseRenderer/baseRenderer.mjs +3 -0
- package/selection/highlight/highlight.js +335 -133
- package/selection/highlight/highlight.mjs +325 -129
- package/selection/highlight/types/activeHeader.js +10 -9
- package/selection/highlight/types/activeHeader.mjs +10 -8
- package/selection/highlight/types/area.js +12 -27
- package/selection/highlight/types/area.mjs +16 -30
- package/selection/highlight/types/areaLayered.js +54 -0
- package/selection/highlight/types/areaLayered.mjs +49 -0
- package/selection/highlight/types/column.js +50 -0
- package/selection/highlight/types/column.mjs +45 -0
- package/selection/highlight/types/customSelection.js +7 -10
- package/selection/highlight/types/customSelection.mjs +7 -9
- package/selection/highlight/types/fill.js +5 -8
- package/selection/highlight/types/fill.mjs +5 -7
- package/selection/highlight/types/{cell.js → focus.js} +5 -8
- package/selection/highlight/types/{cell.mjs → focus.mjs} +5 -7
- package/selection/highlight/types/header.js +10 -20
- package/selection/highlight/types/header.mjs +10 -19
- package/selection/highlight/types/{index.js → row.js} +27 -31
- package/selection/highlight/types/{index.mjs → row.mjs} +24 -29
- package/selection/highlight/visualSelection.js +12 -21
- package/selection/highlight/visualSelection.mjs +12 -21
- package/selection/index.js +4 -7
- package/selection/index.mjs +2 -3
- package/selection/selection.js +88 -46
- package/selection/selection.mjs +82 -44
- package/settings.d.ts +1 -0
- package/tableView.js +94 -66
- package/tableView.mjs +94 -66
- package/translations/changesObservable/observable.js +46 -41
- package/translations/changesObservable/observable.mjs +41 -36
- package/translations/changesObservable/observer.js +1 -1
- package/translations/indexMapper.js +0 -21
- package/translations/indexMapper.mjs +0 -21
- package/utils/dataStructures/tree.js +18 -15
- package/utils/dataStructures/tree.mjs +18 -15
- package/utils/parseTable.js +1 -5
- package/utils/parseTable.mjs +1 -5
- package/3rdparty/walkontable/src/selection.js +0 -354
- package/3rdparty/walkontable/src/selection.mjs +0 -348
- package/plugins/copyPaste/focusableElement.js +0 -219
- package/plugins/copyPaste/focusableElement.mjs +0 -213
- package/plugins/formulas/indexSyncer/axisSyncer.js +0 -379
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -374
- package/plugins/formulas/indexSyncer/index.js +0 -225
- package/plugins/formulas/indexSyncer/index.mjs +0 -219
- package/selection/highlight/constants.js +0 -16
- package/selection/highlight/constants.mjs +0 -6
@@ -242,9 +242,6 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
242
242
|
this.addHook('afterDrawSelection', function () {
|
243
243
|
return _this2.onAfterDrawSelection.apply(_this2, arguments);
|
244
244
|
});
|
245
|
-
this.addHook('beforeRemoveCellClassNames', function () {
|
246
|
-
return _this2.onBeforeRemoveCellClassNames.apply(_this2, arguments);
|
247
|
-
});
|
248
245
|
this.addHook('beforeUndoStackChange', function (action, source) {
|
249
246
|
if (source === 'MergeCells') {
|
250
247
|
return false;
|
@@ -1339,19 +1336,6 @@ var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
1339
1336
|
}
|
1340
1337
|
return this.selectionCalculations.getSelectedMergedCellClassName(currentRow, currentColumn, cornersOfSelection, layerLevel);
|
1341
1338
|
}
|
1342
|
-
|
1343
|
-
/**
|
1344
|
-
* `beforeRemoveCellClassNames` hook callback. Used to remove additional class name from all cells in the table.
|
1345
|
-
*
|
1346
|
-
* @private
|
1347
|
-
* @returns {string[]} An `Array` of `String`s. Each of these strings will act like class names to be removed from
|
1348
|
-
* all the cells in the table.
|
1349
|
-
*/
|
1350
|
-
}, {
|
1351
|
-
key: "onBeforeRemoveCellClassNames",
|
1352
|
-
value: function onBeforeRemoveCellClassNames() {
|
1353
|
-
return this.selectionCalculations.getSelectedMergedCellClassNameToRemove();
|
1354
|
-
}
|
1355
1339
|
}], [{
|
1356
1340
|
key: "PLUGIN_KEY",
|
1357
1341
|
get: function get() {
|
@@ -235,9 +235,6 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
235
235
|
this.addHook('afterDrawSelection', function () {
|
236
236
|
return _this2.onAfterDrawSelection.apply(_this2, arguments);
|
237
237
|
});
|
238
|
-
this.addHook('beforeRemoveCellClassNames', function () {
|
239
|
-
return _this2.onBeforeRemoveCellClassNames.apply(_this2, arguments);
|
240
|
-
});
|
241
238
|
this.addHook('beforeUndoStackChange', function (action, source) {
|
242
239
|
if (source === 'MergeCells') {
|
243
240
|
return false;
|
@@ -1332,19 +1329,6 @@ export var MergeCells = /*#__PURE__*/function (_BasePlugin) {
|
|
1332
1329
|
}
|
1333
1330
|
return this.selectionCalculations.getSelectedMergedCellClassName(currentRow, currentColumn, cornersOfSelection, layerLevel);
|
1334
1331
|
}
|
1335
|
-
|
1336
|
-
/**
|
1337
|
-
* `beforeRemoveCellClassNames` hook callback. Used to remove additional class name from all cells in the table.
|
1338
|
-
*
|
1339
|
-
* @private
|
1340
|
-
* @returns {string[]} An `Array` of `String`s. Each of these strings will act like class names to be removed from
|
1341
|
-
* all the cells in the table.
|
1342
|
-
*/
|
1343
|
-
}, {
|
1344
|
-
key: "onBeforeRemoveCellClassNames",
|
1345
|
-
value: function onBeforeRemoveCellClassNames() {
|
1346
|
-
return this.selectionCalculations.getSelectedMergedCellClassNameToRemove();
|
1347
|
-
}
|
1348
1332
|
}], [{
|
1349
1333
|
key: "PLUGIN_KEY",
|
1350
1334
|
get: function get() {
|
@@ -456,8 +456,7 @@ var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {
|
|
456
456
|
if (!headerNodeData) {
|
457
457
|
return visualColumn;
|
458
458
|
}
|
459
|
-
var
|
460
|
-
columnCursor = highlightMeta.columnCursor,
|
459
|
+
var columnCursor = highlightMeta.columnCursor,
|
461
460
|
selectionType = highlightMeta.selectionType,
|
462
461
|
selectionWidth = highlightMeta.selectionWidth;
|
463
462
|
var _classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderSettings(headerLevel, visualColumn),
|
@@ -469,8 +468,8 @@ var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {
|
|
469
468
|
}
|
470
469
|
} else if (selectionType === _selection.ACTIVE_HEADER_TYPE) {
|
471
470
|
if (colspan > selectionWidth - columnCursor || !isRoot) {
|
472
|
-
//
|
473
|
-
|
471
|
+
// Prevents adding any CSS class names to the TH element
|
472
|
+
return null;
|
474
473
|
}
|
475
474
|
}
|
476
475
|
return visualColumn;
|
@@ -449,8 +449,7 @@ export var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {
|
|
449
449
|
if (!headerNodeData) {
|
450
450
|
return visualColumn;
|
451
451
|
}
|
452
|
-
var
|
453
|
-
columnCursor = highlightMeta.columnCursor,
|
452
|
+
var columnCursor = highlightMeta.columnCursor,
|
454
453
|
selectionType = highlightMeta.selectionType,
|
455
454
|
selectionWidth = highlightMeta.selectionWidth;
|
456
455
|
var _classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderSettings(headerLevel, visualColumn),
|
@@ -462,8 +461,8 @@ export var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {
|
|
462
461
|
}
|
463
462
|
} else if (selectionType === ACTIVE_HEADER_TYPE) {
|
464
463
|
if (colspan > selectionWidth - columnCursor || !isRoot) {
|
465
|
-
//
|
466
|
-
|
464
|
+
// Prevents adding any CSS class names to the TH element
|
465
|
+
return null;
|
467
466
|
}
|
468
467
|
}
|
469
468
|
return visualColumn;
|
@@ -48,6 +48,9 @@ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) {
|
|
48
48
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
49
49
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
50
50
|
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
51
|
+
var _rootNodes = /*#__PURE__*/new WeakMap();
|
52
|
+
var _rootsIndex = /*#__PURE__*/new WeakMap();
|
53
|
+
var _sourceSettings = /*#__PURE__*/new WeakMap();
|
51
54
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
52
55
|
/**
|
53
56
|
* @private
|
@@ -84,40 +87,40 @@ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.
|
|
84
87
|
*
|
85
88
|
*/
|
86
89
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
87
|
-
var _rootNodes = /*#__PURE__*/new WeakMap();
|
88
|
-
var _rootsIndex = /*#__PURE__*/new WeakMap();
|
89
|
-
var _sourceSettings = /*#__PURE__*/new WeakMap();
|
90
90
|
var HeadersTree = /*#__PURE__*/function () {
|
91
|
+
/**
|
92
|
+
* The collection of nested headers settings structured into trees. The root trees are stored
|
93
|
+
* under the visual column index.
|
94
|
+
*
|
95
|
+
* @private
|
96
|
+
* @type {Map<number, TreeNode>}
|
97
|
+
*/
|
98
|
+
|
99
|
+
/**
|
100
|
+
* A map that translates the visual column indexes that intersect the range
|
101
|
+
* defined by the header colspan width to the root index.
|
102
|
+
*
|
103
|
+
* @private
|
104
|
+
* @type {Map<number, number>}
|
105
|
+
*/
|
106
|
+
|
107
|
+
/**
|
108
|
+
* The instance of the SourceSettings class.
|
109
|
+
*
|
110
|
+
* @private
|
111
|
+
* @type {SourceSettings}
|
112
|
+
*/
|
113
|
+
|
91
114
|
function HeadersTree(sourceSettings) {
|
92
115
|
_classCallCheck(this, HeadersTree);
|
93
|
-
/**
|
94
|
-
* The collection of nested headers settings structured into trees. The root trees are stored
|
95
|
-
* under the visual column index.
|
96
|
-
*
|
97
|
-
* @private
|
98
|
-
* @type {Map<number, TreeNode>}
|
99
|
-
*/
|
100
116
|
_classPrivateFieldInitSpec(this, _rootNodes, {
|
101
117
|
writable: true,
|
102
118
|
value: new Map()
|
103
119
|
});
|
104
|
-
/**
|
105
|
-
* A map that translates the visual column indexes that intersect the range
|
106
|
-
* defined by the header colspan width to the root index.
|
107
|
-
*
|
108
|
-
* @private
|
109
|
-
* @type {Map<number, number>}
|
110
|
-
*/
|
111
120
|
_classPrivateFieldInitSpec(this, _rootsIndex, {
|
112
121
|
writable: true,
|
113
122
|
value: new Map()
|
114
123
|
});
|
115
|
-
/**
|
116
|
-
* The instance of the SourceSettings class.
|
117
|
-
*
|
118
|
-
* @private
|
119
|
-
* @type {SourceSettings}
|
120
|
-
*/
|
121
124
|
_classPrivateFieldInitSpec(this, _sourceSettings, {
|
122
125
|
writable: true,
|
123
126
|
value: null
|
@@ -83,36 +83,39 @@ var _rootNodes = /*#__PURE__*/new WeakMap();
|
|
83
83
|
var _rootsIndex = /*#__PURE__*/new WeakMap();
|
84
84
|
var _sourceSettings = /*#__PURE__*/new WeakMap();
|
85
85
|
var HeadersTree = /*#__PURE__*/function () {
|
86
|
+
/**
|
87
|
+
* The collection of nested headers settings structured into trees. The root trees are stored
|
88
|
+
* under the visual column index.
|
89
|
+
*
|
90
|
+
* @private
|
91
|
+
* @type {Map<number, TreeNode>}
|
92
|
+
*/
|
93
|
+
|
94
|
+
/**
|
95
|
+
* A map that translates the visual column indexes that intersect the range
|
96
|
+
* defined by the header colspan width to the root index.
|
97
|
+
*
|
98
|
+
* @private
|
99
|
+
* @type {Map<number, number>}
|
100
|
+
*/
|
101
|
+
|
102
|
+
/**
|
103
|
+
* The instance of the SourceSettings class.
|
104
|
+
*
|
105
|
+
* @private
|
106
|
+
* @type {SourceSettings}
|
107
|
+
*/
|
108
|
+
|
86
109
|
function HeadersTree(sourceSettings) {
|
87
110
|
_classCallCheck(this, HeadersTree);
|
88
|
-
/**
|
89
|
-
* The collection of nested headers settings structured into trees. The root trees are stored
|
90
|
-
* under the visual column index.
|
91
|
-
*
|
92
|
-
* @private
|
93
|
-
* @type {Map<number, TreeNode>}
|
94
|
-
*/
|
95
111
|
_classPrivateFieldInitSpec(this, _rootNodes, {
|
96
112
|
writable: true,
|
97
113
|
value: new Map()
|
98
114
|
});
|
99
|
-
/**
|
100
|
-
* A map that translates the visual column indexes that intersect the range
|
101
|
-
* defined by the header colspan width to the root index.
|
102
|
-
*
|
103
|
-
* @private
|
104
|
-
* @type {Map<number, number>}
|
105
|
-
*/
|
106
115
|
_classPrivateFieldInitSpec(this, _rootsIndex, {
|
107
116
|
writable: true,
|
108
117
|
value: new Map()
|
109
118
|
});
|
110
|
-
/**
|
111
|
-
* The instance of the SourceSettings class.
|
112
|
-
*
|
113
|
-
* @private
|
114
|
-
* @type {SourceSettings}
|
115
|
-
*/
|
116
119
|
_classPrivateFieldInitSpec(this, _sourceSettings, {
|
117
120
|
writable: true,
|
118
121
|
value: null
|
@@ -45,6 +45,9 @@ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.
|
|
45
45
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
46
46
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
47
47
|
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
48
|
+
var _sourceSettings = /*#__PURE__*/new WeakMap();
|
49
|
+
var _headersTree = /*#__PURE__*/new WeakMap();
|
50
|
+
var _stateMatrix = /*#__PURE__*/new WeakMap();
|
48
51
|
/**
|
49
52
|
* The state manager is a source of truth for nested headers configuration.
|
50
53
|
* The state generation process is divided into three stages.
|
@@ -73,9 +76,6 @@ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) {
|
|
73
76
|
*
|
74
77
|
* @class StateManager
|
75
78
|
*/
|
76
|
-
var _sourceSettings = /*#__PURE__*/new WeakMap();
|
77
|
-
var _headersTree = /*#__PURE__*/new WeakMap();
|
78
|
-
var _stateMatrix = /*#__PURE__*/new WeakMap();
|
79
79
|
var StateManager = /*#__PURE__*/function () {
|
80
80
|
function StateManager() {
|
81
81
|
_classCallCheck(this, StateManager);
|
@@ -10,7 +10,6 @@ require("core-js/modules/es.string.includes.js");
|
|
10
10
|
var _array = require("../../../helpers/array");
|
11
11
|
var _utils = require("./utils");
|
12
12
|
var _excluded = ["crossHiddenColumns"];
|
13
|
-
/* eslint-disable jsdoc/require-description-complete-sentence */
|
14
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
15
14
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
16
15
|
/**
|
@@ -24,7 +24,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
24
24
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
25
25
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
26
26
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
27
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
27
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
28
28
|
/**
|
29
29
|
* A function that normalizes user-defined settings into one predictable
|
30
30
|
* structure. Currently, the developer can declare nested headers by passing
|
@@ -29,42 +29,47 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
29
29
|
* @private
|
30
30
|
*/
|
31
31
|
var GhostTable = /*#__PURE__*/function () {
|
32
|
+
/**
|
33
|
+
* Reference to the Handsontable instance.
|
34
|
+
*
|
35
|
+
* @private
|
36
|
+
* @type {Handsontable}
|
37
|
+
*/
|
38
|
+
|
39
|
+
/**
|
40
|
+
* The function for retrieving the nested headers settings.
|
41
|
+
*
|
42
|
+
* @private
|
43
|
+
* @type {Function}
|
44
|
+
*/
|
45
|
+
|
46
|
+
/**
|
47
|
+
* The value that holds information about the number of the nested header layers (header rows).
|
48
|
+
*
|
49
|
+
* @private
|
50
|
+
* @type {number}
|
51
|
+
*/
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Temporary element created to get minimal headers widths.
|
55
|
+
*
|
56
|
+
* @private
|
57
|
+
* @type {*}
|
58
|
+
*/
|
59
|
+
|
60
|
+
/**
|
61
|
+
* PhysicalIndexToValueMap to keep and track of the columns' widths.
|
62
|
+
*
|
63
|
+
* @private
|
64
|
+
* @type {PhysicalIndexToValueMap}
|
65
|
+
*/
|
66
|
+
|
32
67
|
function GhostTable(hot, nestedHeaderSettingsGetter) {
|
33
68
|
_classCallCheck(this, GhostTable);
|
34
|
-
/**
|
35
|
-
* Reference to the Handsontable instance.
|
36
|
-
*
|
37
|
-
* @private
|
38
|
-
* @type {Handsontable}
|
39
|
-
*/
|
40
69
|
_defineProperty(this, "hot", void 0);
|
41
|
-
/**
|
42
|
-
* The function for retrieving the nested headers settings.
|
43
|
-
*
|
44
|
-
* @private
|
45
|
-
* @type {Function}
|
46
|
-
*/
|
47
70
|
_defineProperty(this, "nestedHeaderSettingsGetter", void 0);
|
48
|
-
/**
|
49
|
-
* The value that holds information about the number of the nested header layers (header rows).
|
50
|
-
*
|
51
|
-
* @private
|
52
|
-
* @type {number}
|
53
|
-
*/
|
54
71
|
_defineProperty(this, "layersCount", 0);
|
55
|
-
/**
|
56
|
-
* Temporary element created to get minimal headers widths.
|
57
|
-
*
|
58
|
-
* @private
|
59
|
-
* @type {*}
|
60
|
-
*/
|
61
72
|
_defineProperty(this, "container", void 0);
|
62
|
-
/**
|
63
|
-
* PhysicalIndexToValueMap to keep and track of the columns' widths.
|
64
|
-
*
|
65
|
-
* @private
|
66
|
-
* @type {PhysicalIndexToValueMap}
|
67
|
-
*/
|
68
73
|
_defineProperty(this, "widthsMap", void 0);
|
69
74
|
this.hot = hot;
|
70
75
|
this.nestedHeaderSettingsGetter = nestedHeaderSettingsGetter;
|
@@ -25,42 +25,47 @@ import { fastInnerHTML } from "../../../helpers/dom/element.mjs";
|
|
25
25
|
* @private
|
26
26
|
*/
|
27
27
|
var GhostTable = /*#__PURE__*/function () {
|
28
|
+
/**
|
29
|
+
* Reference to the Handsontable instance.
|
30
|
+
*
|
31
|
+
* @private
|
32
|
+
* @type {Handsontable}
|
33
|
+
*/
|
34
|
+
|
35
|
+
/**
|
36
|
+
* The function for retrieving the nested headers settings.
|
37
|
+
*
|
38
|
+
* @private
|
39
|
+
* @type {Function}
|
40
|
+
*/
|
41
|
+
|
42
|
+
/**
|
43
|
+
* The value that holds information about the number of the nested header layers (header rows).
|
44
|
+
*
|
45
|
+
* @private
|
46
|
+
* @type {number}
|
47
|
+
*/
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Temporary element created to get minimal headers widths.
|
51
|
+
*
|
52
|
+
* @private
|
53
|
+
* @type {*}
|
54
|
+
*/
|
55
|
+
|
56
|
+
/**
|
57
|
+
* PhysicalIndexToValueMap to keep and track of the columns' widths.
|
58
|
+
*
|
59
|
+
* @private
|
60
|
+
* @type {PhysicalIndexToValueMap}
|
61
|
+
*/
|
62
|
+
|
28
63
|
function GhostTable(hot, nestedHeaderSettingsGetter) {
|
29
64
|
_classCallCheck(this, GhostTable);
|
30
|
-
/**
|
31
|
-
* Reference to the Handsontable instance.
|
32
|
-
*
|
33
|
-
* @private
|
34
|
-
* @type {Handsontable}
|
35
|
-
*/
|
36
65
|
_defineProperty(this, "hot", void 0);
|
37
|
-
/**
|
38
|
-
* The function for retrieving the nested headers settings.
|
39
|
-
*
|
40
|
-
* @private
|
41
|
-
* @type {Function}
|
42
|
-
*/
|
43
66
|
_defineProperty(this, "nestedHeaderSettingsGetter", void 0);
|
44
|
-
/**
|
45
|
-
* The value that holds information about the number of the nested header layers (header rows).
|
46
|
-
*
|
47
|
-
* @private
|
48
|
-
* @type {number}
|
49
|
-
*/
|
50
67
|
_defineProperty(this, "layersCount", 0);
|
51
|
-
/**
|
52
|
-
* Temporary element created to get minimal headers widths.
|
53
|
-
*
|
54
|
-
* @private
|
55
|
-
* @type {*}
|
56
|
-
*/
|
57
68
|
_defineProperty(this, "container", void 0);
|
58
|
-
/**
|
59
|
-
* PhysicalIndexToValueMap to keep and track of the columns' widths.
|
60
|
-
*
|
61
|
-
* @private
|
62
|
-
* @type {PhysicalIndexToValueMap}
|
63
|
-
*/
|
64
69
|
_defineProperty(this, "widthsMap", void 0);
|
65
70
|
this.hot = hot;
|
66
71
|
this.nestedHeaderSettingsGetter = nestedHeaderSettingsGetter;
|
package/plugins/registry.js
CHANGED
@@ -30,9 +30,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
30
30
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
31
31
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
32
32
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
33
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
34
|
-
* Utility to register plugins and common namespace for keeping the reference to all plugins classes.
|
35
|
-
*/
|
33
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
36
34
|
var ERROR_PLUGIN_REGISTERED = function ERROR_PLUGIN_REGISTERED(pluginName) {
|
37
35
|
return "There is already registered \"".concat(pluginName, "\" plugin.");
|
38
36
|
};
|
@@ -591,6 +591,7 @@ UndoRedo.RemoveColumnAction.prototype.undo = function (instance, undoneCallback)
|
|
591
591
|
});
|
592
592
|
});
|
593
593
|
instance.setSourceDataAtCell(changes, void 0, void 0, 'UndoRedo.undo');
|
594
|
+
instance.columnIndexMapper.insertIndexes(ascendingIndexes[0], ascendingIndexes.length);
|
594
595
|
if (typeof this.headers !== 'undefined') {
|
595
596
|
(0, _array.arrayEach)(sortedHeaders, function (headerData, columnIndex) {
|
596
597
|
instance.getSettings().colHeaders[ascendingIndexes[columnIndex]] = headerData;
|
@@ -585,6 +585,7 @@ UndoRedo.RemoveColumnAction.prototype.undo = function (instance, undoneCallback)
|
|
585
585
|
});
|
586
586
|
});
|
587
587
|
instance.setSourceDataAtCell(changes, void 0, void 0, 'UndoRedo.undo');
|
588
|
+
instance.columnIndexMapper.insertIndexes(ascendingIndexes[0], ascendingIndexes.length);
|
588
589
|
if (typeof this.headers !== 'undefined') {
|
589
590
|
arrayEach(sortedHeaders, function (headerData, columnIndex) {
|
590
591
|
instance.getSettings().colHeaders[ascendingIndexes[columnIndex]] = headerData;
|
@@ -42,5 +42,8 @@ function baseRenderer(instance, TD, row, col, prop, value, cellProperties) {
|
|
42
42
|
}
|
43
43
|
(0, _element.removeClass)(TD, classesToRemove);
|
44
44
|
(0, _element.addClass)(TD, classesToAdd);
|
45
|
+
TD.ariaColIndex = "".concat(col);
|
46
|
+
TD.setAttribute('tabindex', '-1');
|
47
|
+
TD.setAttribute('role', 'gridcell');
|
45
48
|
}
|
46
49
|
baseRenderer.RENDERER_TYPE = RENDERER_TYPE;
|
@@ -35,5 +35,8 @@ export function baseRenderer(instance, TD, row, col, prop, value, cellProperties
|
|
35
35
|
}
|
36
36
|
removeClass(TD, classesToRemove);
|
37
37
|
addClass(TD, classesToAdd);
|
38
|
+
TD.ariaColIndex = "".concat(col);
|
39
|
+
TD.setAttribute('tabindex', '-1');
|
40
|
+
TD.setAttribute('role', 'gridcell');
|
38
41
|
}
|
39
42
|
baseRenderer.RENDERER_TYPE = RENDERER_TYPE;
|