handsontable 0.0.0-next-53a190b-20240403 → 0.0.0-next-5a535ed-20240403
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/viewportColumns.js +17 -12
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +17 -12
- package/3rdparty/walkontable/src/calculator/viewportRows.js +15 -10
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +15 -10
- package/3rdparty/walkontable/src/cell/coords.js +17 -12
- package/3rdparty/walkontable/src/cell/coords.mjs +17 -12
- package/3rdparty/walkontable/src/cell/range.d.ts +1 -2
- package/3rdparty/walkontable/src/cell/range.js +28 -40
- package/3rdparty/walkontable/src/cell/range.mjs +28 -40
- package/3rdparty/walkontable/src/core/_base.js +1 -1
- package/3rdparty/walkontable/src/core/_base.mjs +1 -1
- package/3rdparty/walkontable/src/event.js +104 -72
- package/3rdparty/walkontable/src/event.mjs +104 -72
- package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -15
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -16
- package/3rdparty/walkontable/src/overlay/top.js +0 -11
- package/3rdparty/walkontable/src/overlay/top.mjs +1 -12
- package/3rdparty/walkontable/src/overlays.js +4 -46
- package/3rdparty/walkontable/src/overlays.mjs +4 -46
- package/3rdparty/walkontable/src/scroll.js +17 -15
- package/3rdparty/walkontable/src/scroll.mjs +17 -15
- package/3rdparty/walkontable/src/selection/manager.js +69 -48
- package/3rdparty/walkontable/src/selection/manager.mjs +69 -48
- package/3rdparty/walkontable/src/selection/scanner.js +42 -33
- package/3rdparty/walkontable/src/selection/scanner.mjs +42 -33
- package/3rdparty/walkontable/src/utils/columnStretching.js +44 -27
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +44 -27
- package/3rdparty/walkontable/src/utils/orderView/view.js +1 -1
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +1 -1
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/viewportScroll/index.js +1 -4
- package/core/viewportScroll/index.mjs +1 -4
- package/core.d.ts +3 -4
- package/core.js +22 -77
- package/core.mjs +22 -77
- package/dataMap/dataSource.js +1 -1
- package/dataMap/dataSource.mjs +1 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +1 -1
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
- package/dataMap/metaManager/metaSchema.js +1 -1
- package/dataMap/metaManager/metaSchema.mjs +1 -1
- package/dataMap/replaceData.js +1 -1
- package/dataMap/replaceData.mjs +1 -1
- package/dist/handsontable.css +4 -4
- package/dist/handsontable.full.css +4 -4
- package/dist/handsontable.full.js +9121 -9062
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +292 -292
- package/dist/handsontable.js +6573 -6967
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +25 -25
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ar-AR.min.js +1 -1
- package/dist/languages/cs-CZ.min.js +1 -1
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/hr-HR.min.js +1 -1
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.min.js +1 -1
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.min.js +1 -1
- package/editorManager.js +23 -25
- package/editorManager.mjs +23 -25
- package/editors/autocompleteEditor/autocompleteEditor.js +10 -6
- package/editors/autocompleteEditor/autocompleteEditor.mjs +10 -6
- package/editors/selectEditor/selectEditor.js +19 -20
- package/editors/selectEditor/selectEditor.mjs +19 -20
- package/eventManager.js +1 -1
- package/eventManager.mjs +1 -1
- package/focusManager.js +82 -64
- package/focusManager.mjs +82 -64
- package/helpers/dom/element.js +1 -23
- package/helpers/dom/element.mjs +1 -21
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/object.js +2 -2
- package/helpers/object.mjs +2 -2
- package/index.d.ts +0 -10
- package/package.json +2 -7
- package/pluginHooks.d.ts +3 -4
- package/pluginHooks.js +38 -99
- package/pluginHooks.mjs +38 -99
- package/plugins/autoColumnSize/autoColumnSize.js +65 -49
- package/plugins/autoColumnSize/autoColumnSize.mjs +65 -49
- package/plugins/autoRowSize/autoRowSize.js +34 -28
- package/plugins/autoRowSize/autoRowSize.mjs +34 -28
- package/plugins/autofill/autofill.js +38 -30
- package/plugins/autofill/autofill.mjs +38 -30
- package/plugins/base/base.js +17 -12
- package/plugins/base/base.mjs +17 -12
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +5 -5
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +5 -5
- package/plugins/collapsibleColumns/collapsibleColumns.js +50 -59
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +50 -59
- package/plugins/columnSorting/columnSorting.js +45 -49
- package/plugins/columnSorting/columnSorting.mjs +45 -49
- package/plugins/columnSummary/columnSummary.js +26 -22
- package/plugins/columnSummary/columnSummary.mjs +26 -22
- package/plugins/comments/comments.js +158 -116
- package/plugins/comments/comments.mjs +158 -116
- package/plugins/contextMenu/contextMenu.js +26 -20
- package/plugins/contextMenu/contextMenu.mjs +26 -20
- package/plugins/contextMenu/itemsFactory.js +1 -1
- package/plugins/contextMenu/itemsFactory.mjs +1 -1
- package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
- package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
- package/plugins/contextMenu/menu/menu.js +21 -13
- package/plugins/contextMenu/menu/menu.mjs +21 -13
- package/plugins/contextMenu/menu/positioner.js +58 -41
- package/plugins/contextMenu/menu/positioner.mjs +58 -41
- package/plugins/copyPaste/copyPaste.js +157 -116
- package/plugins/copyPaste/copyPaste.mjs +157 -116
- package/plugins/copyPaste/copyableRanges.js +66 -43
- package/plugins/copyPaste/copyableRanges.mjs +66 -43
- package/plugins/customBorders/customBorders.js +13 -11
- package/plugins/customBorders/customBorders.mjs +13 -11
- package/plugins/dragToScroll/dragToScroll.js +6 -6
- package/plugins/dragToScroll/dragToScroll.mjs +6 -6
- package/plugins/dropdownMenu/dropdownMenu.js +106 -80
- package/plugins/dropdownMenu/dropdownMenu.mjs +106 -80
- package/plugins/exportFile/dataProvider.js +1 -1
- package/plugins/exportFile/dataProvider.mjs +1 -1
- package/plugins/filters/component/actionBar.js +9 -9
- package/plugins/filters/component/actionBar.mjs +8 -8
- package/plugins/filters/component/condition.js +15 -13
- package/plugins/filters/component/condition.mjs +15 -13
- package/plugins/filters/component/operators.js +6 -6
- package/plugins/filters/component/operators.mjs +6 -6
- package/plugins/filters/component/value.js +28 -24
- package/plugins/filters/component/value.mjs +28 -24
- package/plugins/filters/conditionUpdateObserver.js +24 -22
- package/plugins/filters/conditionUpdateObserver.mjs +24 -22
- package/plugins/filters/dataFilter.js +1 -1
- package/plugins/filters/dataFilter.mjs +1 -1
- package/plugins/filters/filters.js +95 -81
- package/plugins/filters/filters.mjs +95 -81
- package/plugins/filters/ui/input.js +19 -13
- package/plugins/filters/ui/input.mjs +19 -13
- package/plugins/filters/ui/link.js +13 -8
- package/plugins/filters/ui/link.mjs +13 -8
- package/plugins/filters/ui/multipleSelect.js +112 -85
- package/plugins/filters/ui/multipleSelect.mjs +112 -85
- package/plugins/filters/ui/radioInput.js +20 -12
- package/plugins/filters/ui/radioInput.mjs +20 -12
- package/plugins/filters/ui/select.js +72 -50
- package/plugins/filters/ui/select.mjs +71 -49
- package/plugins/formulas/formulas.js +326 -268
- package/plugins/formulas/formulas.mjs +327 -269
- package/plugins/formulas/indexSyncer/axisSyncer.js +61 -38
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +61 -38
- package/plugins/formulas/indexSyncer/index.js +48 -25
- package/plugins/formulas/indexSyncer/index.mjs +48 -25
- package/plugins/hiddenColumns/hiddenColumns.js +83 -64
- package/plugins/hiddenColumns/hiddenColumns.mjs +83 -64
- package/plugins/hiddenRows/hiddenRows.js +82 -63
- package/plugins/hiddenRows/hiddenRows.mjs +82 -63
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +32 -24
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +33 -25
- package/plugins/manualColumnMove/manualColumnMove.js +170 -126
- package/plugins/manualColumnMove/manualColumnMove.mjs +170 -126
- package/plugins/manualColumnResize/manualColumnResize.js +230 -169
- package/plugins/manualColumnResize/manualColumnResize.mjs +230 -169
- package/plugins/manualRowMove/manualRowMove.js +128 -99
- package/plugins/manualRowMove/manualRowMove.mjs +128 -99
- package/plugins/manualRowResize/manualRowResize.js +209 -150
- package/plugins/manualRowResize/manualRowResize.mjs +209 -150
- package/plugins/mergeCells/calculations/selection.js +71 -2
- package/plugins/mergeCells/calculations/selection.mjs +71 -2
- package/plugins/mergeCells/cellsCollection.js +1 -117
- package/plugins/mergeCells/cellsCollection.mjs +1 -117
- package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -11
- package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +1 -11
- package/plugins/mergeCells/mergeCells.js +397 -499
- package/plugins/mergeCells/mergeCells.mjs +397 -499
- package/plugins/multiColumnSorting/multiColumnSorting.js +2 -8
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -8
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +1 -1
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +1 -1
- package/plugins/nestedHeaders/nestedHeaders.js +253 -205
- package/plugins/nestedHeaders/nestedHeaders.mjs +254 -206
- package/plugins/nestedHeaders/stateManager/headersTree.js +32 -21
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +32 -21
- package/plugins/nestedHeaders/stateManager/index.js +41 -30
- package/plugins/nestedHeaders/stateManager/index.mjs +41 -30
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +30 -19
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +30 -19
- package/plugins/nestedRows/data/dataManager.js +1 -1
- package/plugins/nestedRows/data/dataManager.mjs +1 -1
- package/plugins/nestedRows/nestedRows.js +182 -151
- package/plugins/nestedRows/nestedRows.mjs +183 -152
- package/plugins/nestedRows/ui/contextMenu.js +15 -11
- package/plugins/nestedRows/ui/contextMenu.mjs +14 -10
- package/plugins/nestedRows/utils/rowMoveController.js +1 -1
- package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
- package/plugins/persistentState/storage.js +2 -2
- package/plugins/persistentState/storage.mjs +2 -2
- package/plugins/search/search.js +7 -7
- package/plugins/search/search.mjs +7 -7
- package/plugins/touchScroll/touchScroll.js +19 -15
- package/plugins/touchScroll/touchScroll.mjs +20 -16
- package/plugins/trimRows/trimRows.js +6 -6
- package/plugins/trimRows/trimRows.mjs +6 -6
- package/renderers/checkboxRenderer/checkboxRenderer.js +5 -8
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +5 -8
- package/selection/highlight/highlight.js +14 -14
- package/selection/highlight/highlight.mjs +13 -13
- package/selection/highlight/visualSelection.js +0 -2
- package/selection/highlight/visualSelection.mjs +0 -2
- package/selection/selection.js +67 -225
- package/selection/selection.mjs +66 -224
- package/selection/transformation.js +118 -149
- package/selection/transformation.mjs +118 -149
- package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
- package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
- package/shortcutContexts/commands/editor/open.js +3 -18
- package/shortcutContexts/commands/editor/open.mjs +3 -18
- package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -9
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -9
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -10
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -10
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -6
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -6
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -6
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -6
- package/shortcutContexts/grid.js +3 -9
- package/shortcutContexts/grid.mjs +3 -9
- package/shortcuts/context.js +1 -2
- package/shortcuts/context.mjs +1 -2
- package/tableView.js +78 -52
- package/tableView.mjs +78 -52
- package/translations/changesObservable/observable.js +38 -21
- package/translations/changesObservable/observable.mjs +38 -21
- package/translations/changesObservable/observer.js +12 -7
- package/translations/changesObservable/observer.mjs +11 -6
- package/translations/mapCollections/aggregatedCollection.js +1 -1
- package/translations/mapCollections/aggregatedCollection.mjs +1 -1
- package/translations/maps/indexMap.js +1 -1
- package/translations/maps/indexMap.mjs +1 -1
- package/utils/dataStructures/linkedList.js +1 -6
- package/utils/dataStructures/linkedList.mjs +1 -6
- package/utils/dataStructures/tree.js +1 -1
- package/utils/dataStructures/tree.mjs +1 -1
- package/utils/interval.js +44 -26
- package/utils/interval.mjs +44 -26
- package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
- package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
- package/i18n/languages/ar-AR.d.ts +0 -5
- package/i18n/languages/cs-CZ.d.ts +0 -5
- package/i18n/languages/hr-HR.d.ts +0 -5
- package/i18n/languages/sr-SP.d.ts +0 -5
- package/plugins/mergeCells/focusOrder.js +0 -305
- package/plugins/mergeCells/focusOrder.mjs +0 -300
package/tableView.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
5
4
|
require("core-js/modules/es.array.push.js");
|
5
|
+
require("core-js/modules/es.error.cause.js");
|
6
6
|
var _element = require("./helpers/dom/element");
|
7
7
|
var _eventManager = _interopRequireDefault(require("./eventManager"));
|
8
8
|
var _event = require("./helpers/dom/event");
|
@@ -17,9 +17,12 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
|
|
17
17
|
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; }
|
18
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
19
19
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
20
|
-
function
|
21
|
-
function
|
22
|
-
function
|
20
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
21
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
22
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
23
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
24
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
25
|
+
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; } }
|
23
26
|
/**
|
24
27
|
* @class TableView
|
25
28
|
* @private
|
@@ -31,18 +34,25 @@ var _mouseDown = /*#__PURE__*/new WeakMap();
|
|
31
34
|
var _table = /*#__PURE__*/new WeakMap();
|
32
35
|
var _lastWidth = /*#__PURE__*/new WeakMap();
|
33
36
|
var _lastHeight = /*#__PURE__*/new WeakMap();
|
34
|
-
var
|
37
|
+
var _getAriaColcount = /*#__PURE__*/new WeakSet();
|
38
|
+
var _updateAriaColcount = /*#__PURE__*/new WeakSet();
|
35
39
|
class TableView {
|
36
40
|
/**
|
37
41
|
* @param {Hanstontable} hotInstance Instance of {@link Handsontable}.
|
38
42
|
*/
|
39
43
|
constructor(hotInstance) {
|
44
|
+
/**
|
45
|
+
* Update the `aria-colcount` attribute by the provided value.
|
46
|
+
*
|
47
|
+
* @param {number} delta The number of columns to add or remove to the aria tag.
|
48
|
+
*/
|
49
|
+
_classPrivateMethodInitSpec(this, _updateAriaColcount);
|
40
50
|
/**
|
41
51
|
* Return the value of the `aria-colcount` attribute.
|
42
52
|
*
|
43
53
|
* @returns {number} The value of the `aria-colcount` attribute.
|
44
54
|
*/
|
45
|
-
_classPrivateMethodInitSpec(this,
|
55
|
+
_classPrivateMethodInitSpec(this, _getAriaColcount);
|
46
56
|
/**
|
47
57
|
* Instance of {@link Handsontable}.
|
48
58
|
*
|
@@ -97,14 +107,20 @@ class TableView {
|
|
97
107
|
*
|
98
108
|
* @type {number}
|
99
109
|
*/
|
100
|
-
_classPrivateFieldInitSpec(this, _columnHeadersCount,
|
110
|
+
_classPrivateFieldInitSpec(this, _columnHeadersCount, {
|
111
|
+
writable: true,
|
112
|
+
value: 0
|
113
|
+
});
|
101
114
|
/**
|
102
115
|
* The total number of the row header renderers applied to the table through the
|
103
116
|
* `afterGetRowHeaderRenderers` hook.
|
104
117
|
*
|
105
118
|
* @type {number}
|
106
119
|
*/
|
107
|
-
_classPrivateFieldInitSpec(this, _rowHeadersCount,
|
120
|
+
_classPrivateFieldInitSpec(this, _rowHeadersCount, {
|
121
|
+
writable: true,
|
122
|
+
value: 0
|
123
|
+
});
|
108
124
|
/**
|
109
125
|
* The flag determines if the `adjustElementsSize` method call was made during
|
110
126
|
* the render suspending. If true, the method has to be triggered once after render
|
@@ -119,29 +135,44 @@ class TableView {
|
|
119
135
|
*
|
120
136
|
* @type {boolean}
|
121
137
|
*/
|
122
|
-
_classPrivateFieldInitSpec(this, _selectionMouseDown,
|
138
|
+
_classPrivateFieldInitSpec(this, _selectionMouseDown, {
|
139
|
+
writable: true,
|
140
|
+
value: false
|
141
|
+
});
|
123
142
|
/**
|
124
143
|
* @type {boolean}
|
125
144
|
*/
|
126
|
-
_classPrivateFieldInitSpec(this, _mouseDown,
|
145
|
+
_classPrivateFieldInitSpec(this, _mouseDown, {
|
146
|
+
writable: true,
|
147
|
+
value: void 0
|
148
|
+
});
|
127
149
|
/**
|
128
150
|
* Main <TABLE> element.
|
129
151
|
*
|
130
152
|
* @type {HTMLTableElement}
|
131
153
|
*/
|
132
|
-
_classPrivateFieldInitSpec(this, _table,
|
154
|
+
_classPrivateFieldInitSpec(this, _table, {
|
155
|
+
writable: true,
|
156
|
+
value: void 0
|
157
|
+
});
|
133
158
|
/**
|
134
159
|
* Cached width of the rootElement.
|
135
160
|
*
|
136
161
|
* @type {number}
|
137
162
|
*/
|
138
|
-
_classPrivateFieldInitSpec(this, _lastWidth,
|
163
|
+
_classPrivateFieldInitSpec(this, _lastWidth, {
|
164
|
+
writable: true,
|
165
|
+
value: 0
|
166
|
+
});
|
139
167
|
/**
|
140
168
|
* Cached height of the rootElement.
|
141
169
|
*
|
142
170
|
* @type {number}
|
143
171
|
*/
|
144
|
-
_classPrivateFieldInitSpec(this, _lastHeight,
|
172
|
+
_classPrivateFieldInitSpec(this, _lastHeight, {
|
173
|
+
writable: true,
|
174
|
+
value: 0
|
175
|
+
});
|
145
176
|
this.hot = hotInstance;
|
146
177
|
this.eventManager = new _eventManager.default(this.hot);
|
147
178
|
this.settings = this.hot.getSettings();
|
@@ -250,21 +281,21 @@ class TableView {
|
|
250
281
|
rootElement.setAttribute('data-originalstyle', originalStyle); // needed to retrieve original style in jsFiddle link generator in HT examples. may be removed in future versions
|
251
282
|
}
|
252
283
|
(0, _element.addClass)(rootElement, 'handsontable');
|
253
|
-
_classPrivateFieldSet(
|
254
|
-
(0, _element.addClass)(_classPrivateFieldGet(
|
284
|
+
_classPrivateFieldSet(this, _table, rootDocument.createElement('TABLE'));
|
285
|
+
(0, _element.addClass)(_classPrivateFieldGet(this, _table), 'htCore');
|
255
286
|
if (this.hot.getSettings().tableClassName) {
|
256
|
-
(0, _element.addClass)(_classPrivateFieldGet(
|
287
|
+
(0, _element.addClass)(_classPrivateFieldGet(this, _table), this.hot.getSettings().tableClassName);
|
257
288
|
}
|
258
289
|
if (this.settings.ariaTags) {
|
259
|
-
(0, _element.setAttribute)(_classPrivateFieldGet(
|
290
|
+
(0, _element.setAttribute)(_classPrivateFieldGet(this, _table), [(0, _a11y.A11Y_PRESENTATION)()]);
|
260
291
|
(0, _element.setAttribute)(rootElement, [(0, _a11y.A11Y_TREEGRID)(), (0, _a11y.A11Y_ROWCOUNT)(-1), (0, _a11y.A11Y_COLCOUNT)(this.hot.countCols()), (0, _a11y.A11Y_MULTISELECTABLE)()]);
|
261
292
|
}
|
262
293
|
this.THEAD = rootDocument.createElement('THEAD');
|
263
|
-
_classPrivateFieldGet(
|
294
|
+
_classPrivateFieldGet(this, _table).appendChild(this.THEAD);
|
264
295
|
this.TBODY = rootDocument.createElement('TBODY');
|
265
|
-
_classPrivateFieldGet(
|
266
|
-
this.hot.table = _classPrivateFieldGet(
|
267
|
-
this.hot.container.insertBefore(_classPrivateFieldGet(
|
296
|
+
_classPrivateFieldGet(this, _table).appendChild(this.TBODY);
|
297
|
+
this.hot.table = _classPrivateFieldGet(this, _table);
|
298
|
+
this.hot.container.insertBefore(_classPrivateFieldGet(this, _table), this.hot.container.firstChild);
|
268
299
|
}
|
269
300
|
|
270
301
|
/**
|
@@ -281,7 +312,7 @@ class TableView {
|
|
281
312
|
} = this.hot;
|
282
313
|
const documentElement = rootDocument.documentElement;
|
283
314
|
this.eventManager.addEventListener(rootElement, 'mousedown', event => {
|
284
|
-
_classPrivateFieldSet(
|
315
|
+
_classPrivateFieldSet(this, _selectionMouseDown, true);
|
285
316
|
if (!this.isTextSelectionAllowed(event.target)) {
|
286
317
|
(0, _element.clearTextSelection)(rootWindow);
|
287
318
|
event.preventDefault();
|
@@ -289,10 +320,10 @@ class TableView {
|
|
289
320
|
}
|
290
321
|
});
|
291
322
|
this.eventManager.addEventListener(rootElement, 'mouseup', () => {
|
292
|
-
_classPrivateFieldSet(
|
323
|
+
_classPrivateFieldSet(this, _selectionMouseDown, false);
|
293
324
|
});
|
294
325
|
this.eventManager.addEventListener(rootElement, 'mousemove', event => {
|
295
|
-
if (_classPrivateFieldGet(
|
326
|
+
if (_classPrivateFieldGet(this, _selectionMouseDown) && !this.isTextSelectionAllowed(event.target)) {
|
296
327
|
// Clear selection only when fragmentSelection is enabled, otherwise clearing selection breaks the IME editor.
|
297
328
|
if (this.settings.fragmentSelection) {
|
298
329
|
(0, _element.clearTextSelection)(rootWindow);
|
@@ -310,7 +341,7 @@ class TableView {
|
|
310
341
|
if (selection.isInProgress() && (0, _event.isLeftClick)(event)) {
|
311
342
|
selection.finish();
|
312
343
|
}
|
313
|
-
_classPrivateFieldSet(
|
344
|
+
_classPrivateFieldSet(this, _mouseDown, false);
|
314
345
|
const isOutsideInputElement = (0, _element.isOutsideInput)(rootDocument.activeElement);
|
315
346
|
if ((0, _element.isInput)(rootDocument.activeElement) && !isOutsideInputElement) {
|
316
347
|
return;
|
@@ -322,21 +353,21 @@ class TableView {
|
|
322
353
|
this.eventManager.addEventListener(documentElement, 'contextmenu', event => {
|
323
354
|
if (selection.isInProgress() && (0, _event.isRightClick)(event)) {
|
324
355
|
selection.finish();
|
325
|
-
_classPrivateFieldSet(
|
356
|
+
_classPrivateFieldSet(this, _mouseDown, false);
|
326
357
|
}
|
327
358
|
});
|
328
359
|
this.eventManager.addEventListener(documentElement, 'touchend', () => {
|
329
360
|
if (selection.isInProgress()) {
|
330
361
|
selection.finish();
|
331
362
|
}
|
332
|
-
_classPrivateFieldSet(
|
363
|
+
_classPrivateFieldSet(this, _mouseDown, false);
|
333
364
|
});
|
334
365
|
this.eventManager.addEventListener(documentElement, 'mousedown', event => {
|
335
366
|
const originalTarget = event.target;
|
336
367
|
const eventX = event.x || event.clientX;
|
337
368
|
const eventY = event.y || event.clientY;
|
338
369
|
let next = event.target;
|
339
|
-
if (_classPrivateFieldGet(
|
370
|
+
if (_classPrivateFieldGet(this, _mouseDown) || !rootElement || !this.hot.view) {
|
340
371
|
return; // it must have been started in a cell
|
341
372
|
}
|
342
373
|
|
@@ -382,7 +413,7 @@ class TableView {
|
|
382
413
|
});
|
383
414
|
parentWindow = (0, _element.getParentWindow)(parentWindow);
|
384
415
|
}
|
385
|
-
this.eventManager.addEventListener(_classPrivateFieldGet(
|
416
|
+
this.eventManager.addEventListener(_classPrivateFieldGet(this, _table), 'selectstart', event => {
|
386
417
|
if (this.settings.fragmentSelection || (0, _element.isInput)(event.target)) {
|
387
418
|
return;
|
388
419
|
}
|
@@ -612,7 +643,7 @@ class TableView {
|
|
612
643
|
ariaTags: this.settings.ariaTags,
|
613
644
|
rtlMode: this.hot.isRtl(),
|
614
645
|
externalRowCalculator: this.hot.getPlugin('autoRowSize') && this.hot.getPlugin('autoRowSize').isEnabled(),
|
615
|
-
table: _classPrivateFieldGet(
|
646
|
+
table: _classPrivateFieldGet(this, _table),
|
616
647
|
isDataViewInstance: () => (0, _rootInstance.isRootInstance)(this.hot),
|
617
648
|
preventOverflow: () => this.settings.preventOverflow,
|
618
649
|
preventWheel: () => this.settings.preventWheel,
|
@@ -654,12 +685,12 @@ class TableView {
|
|
654
685
|
});
|
655
686
|
}
|
656
687
|
this.hot.runHooks('afterGetRowHeaderRenderers', headerRenderers);
|
657
|
-
_classPrivateFieldSet(
|
688
|
+
_classPrivateFieldSet(this, _rowHeadersCount, headerRenderers.length);
|
658
689
|
if (this.hot.getSettings().ariaTags) {
|
659
690
|
// Update the aria-colcount attribute.
|
660
691
|
// Only needs to be done once after initialization/data update.
|
661
|
-
if (
|
662
|
-
|
692
|
+
if (_classPrivateMethodGet(this, _getAriaColcount, _getAriaColcount2).call(this) === this.hot.countCols()) {
|
693
|
+
_classPrivateMethodGet(this, _updateAriaColcount, _updateAriaColcount2).call(this, _classPrivateFieldGet(this, _rowHeadersCount));
|
663
694
|
}
|
664
695
|
}
|
665
696
|
return headerRenderers;
|
@@ -675,7 +706,7 @@ class TableView {
|
|
675
706
|
});
|
676
707
|
}
|
677
708
|
this.hot.runHooks('afterGetColumnHeaderRenderers', headerRenderers);
|
678
|
-
_classPrivateFieldSet(
|
709
|
+
_classPrivateFieldSet(this, _columnHeadersCount, headerRenderers.length);
|
679
710
|
return headerRenderers;
|
680
711
|
},
|
681
712
|
columnWidth: renderedColumnIndex => {
|
@@ -731,7 +762,7 @@ class TableView {
|
|
731
762
|
};
|
732
763
|
this.hot.listen();
|
733
764
|
this.activeWt = wt;
|
734
|
-
_classPrivateFieldSet(
|
765
|
+
_classPrivateFieldSet(this, _mouseDown, true);
|
735
766
|
this.hot.runHooks('beforeOnCellMouseDown', event, visualCoords, TD, controller);
|
736
767
|
if ((0, _event.isImmediatePropagationStopped)(event)) {
|
737
768
|
return;
|
@@ -748,7 +779,7 @@ class TableView {
|
|
748
779
|
onCellContextMenu: (event, coords, TD, wt) => {
|
749
780
|
const visualCoords = this.translateFromRenderableToVisualCoords(coords);
|
750
781
|
this.activeWt = wt;
|
751
|
-
_classPrivateFieldSet(
|
782
|
+
_classPrivateFieldSet(this, _mouseDown, false);
|
752
783
|
if (this.hot.selection.isInProgress()) {
|
753
784
|
this.hot.selection.finish();
|
754
785
|
}
|
@@ -781,7 +812,7 @@ class TableView {
|
|
781
812
|
if ((0, _event.isImmediatePropagationStopped)(event)) {
|
782
813
|
return;
|
783
814
|
}
|
784
|
-
if (_classPrivateFieldGet(
|
815
|
+
if (_classPrivateFieldGet(this, _mouseDown)) {
|
785
816
|
(0, _mouseEventHandler.handleMouseEvent)(event, {
|
786
817
|
coords: visualCoords,
|
787
818
|
selection: this.hot.selection,
|
@@ -1038,7 +1069,7 @@ class TableView {
|
|
1038
1069
|
* @returns {boolean}
|
1039
1070
|
*/
|
1040
1071
|
isMouseDown() {
|
1041
|
-
return _classPrivateFieldGet(
|
1072
|
+
return _classPrivateFieldGet(this, _mouseDown);
|
1042
1073
|
}
|
1043
1074
|
|
1044
1075
|
/**
|
@@ -1232,8 +1263,8 @@ class TableView {
|
|
1232
1263
|
* @param {number} height The table height.
|
1233
1264
|
*/
|
1234
1265
|
setLastSize(width, height) {
|
1235
|
-
_classPrivateFieldSet(
|
1236
|
-
_classPrivateFieldSet(
|
1266
|
+
_classPrivateFieldSet(this, _lastWidth, width);
|
1267
|
+
_classPrivateFieldSet(this, _lastHeight, height);
|
1237
1268
|
}
|
1238
1269
|
|
1239
1270
|
/**
|
@@ -1243,8 +1274,8 @@ class TableView {
|
|
1243
1274
|
*/
|
1244
1275
|
getLastSize() {
|
1245
1276
|
return {
|
1246
|
-
width: _classPrivateFieldGet(
|
1247
|
-
height: _classPrivateFieldGet(
|
1277
|
+
width: _classPrivateFieldGet(this, _lastWidth),
|
1278
|
+
height: _classPrivateFieldGet(this, _lastHeight)
|
1248
1279
|
};
|
1249
1280
|
}
|
1250
1281
|
|
@@ -1326,7 +1357,7 @@ class TableView {
|
|
1326
1357
|
* @returns {number}
|
1327
1358
|
*/
|
1328
1359
|
getColumnHeadersCount() {
|
1329
|
-
return _classPrivateFieldGet(
|
1360
|
+
return _classPrivateFieldGet(this, _columnHeadersCount);
|
1330
1361
|
}
|
1331
1362
|
|
1332
1363
|
/**
|
@@ -1335,7 +1366,7 @@ class TableView {
|
|
1335
1366
|
* @returns {number}
|
1336
1367
|
*/
|
1337
1368
|
getRowHeadersCount() {
|
1338
|
-
return _classPrivateFieldGet(
|
1369
|
+
return _classPrivateFieldGet(this, _rowHeadersCount);
|
1339
1370
|
}
|
1340
1371
|
|
1341
1372
|
/**
|
@@ -1387,16 +1418,11 @@ class TableView {
|
|
1387
1418
|
this.eventManager.destroy();
|
1388
1419
|
}
|
1389
1420
|
}
|
1390
|
-
function
|
1421
|
+
function _getAriaColcount2() {
|
1391
1422
|
return parseInt(this.hot.rootElement.getAttribute((0, _a11y.A11Y_COLCOUNT)()[0]), 10);
|
1392
1423
|
}
|
1393
|
-
|
1394
|
-
|
1395
|
-
*
|
1396
|
-
* @param {number} delta The number of columns to add or remove to the aria tag.
|
1397
|
-
*/
|
1398
|
-
function _updateAriaColcount(delta) {
|
1399
|
-
const colCount = _assertClassBrand(_TableView_brand, this, _getAriaColcount).call(this) + delta;
|
1424
|
+
function _updateAriaColcount2(delta) {
|
1425
|
+
const colCount = _classPrivateMethodGet(this, _getAriaColcount, _getAriaColcount2).call(this) + delta;
|
1400
1426
|
(0, _element.setAttribute)(this.hot.rootElement, ...(0, _a11y.A11Y_COLCOUNT)(colCount));
|
1401
1427
|
}
|
1402
1428
|
var _default = exports.default = TableView;
|