handsontable 0.0.0-next-7026906-20231107 → 0.0.0-next-7b93b7d-20231107
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/SheetClip/SheetClip.js +2 -2
- package/3rdparty/SheetClip/SheetClip.mjs +2 -2
- package/3rdparty/autoResize/autoResize.js +2 -2
- package/3rdparty/autoResize/autoResize.mjs +2 -2
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +108 -85
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +108 -85
- package/3rdparty/walkontable/src/calculator/viewportRows.js +60 -52
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +60 -52
- package/3rdparty/walkontable/src/core/clone.js +6 -0
- package/3rdparty/walkontable/src/core/clone.mjs +6 -0
- package/3rdparty/walkontable/src/event.js +125 -74
- package/3rdparty/walkontable/src/event.mjs +125 -74
- package/3rdparty/walkontable/src/filter/column.js +16 -0
- package/3rdparty/walkontable/src/filter/column.mjs +16 -0
- package/3rdparty/walkontable/src/filter/row.js +16 -0
- package/3rdparty/walkontable/src/filter/row.mjs +16 -0
- package/3rdparty/walkontable/src/overlay/bottom.js +1 -1
- package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/top.js +1 -1
- package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/_base.js +12 -5
- package/3rdparty/walkontable/src/renderer/_base.mjs +12 -5
- package/3rdparty/walkontable/src/renderer/cells.js +6 -2
- package/3rdparty/walkontable/src/renderer/cells.mjs +6 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +6 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +6 -2
- package/3rdparty/walkontable/src/renderer/rows.js +5 -0
- package/3rdparty/walkontable/src/renderer/rows.mjs +5 -0
- package/3rdparty/walkontable/src/renderer/table.js +24 -17
- package/3rdparty/walkontable/src/renderer/table.mjs +24 -17
- package/3rdparty/walkontable/src/scroll.js +2 -2
- package/3rdparty/walkontable/src/scroll.mjs +2 -2
- package/3rdparty/walkontable/src/selection/border/border.js +1 -1
- package/3rdparty/walkontable/src/selection/border/border.mjs +1 -1
- package/3rdparty/walkontable/src/settings.js +10 -10
- package/3rdparty/walkontable/src/settings.mjs +10 -10
- package/3rdparty/walkontable/src/table.js +3 -3
- package/3rdparty/walkontable/src/table.mjs +3 -3
- package/3rdparty/walkontable/src/utils/column.js +19 -4
- package/3rdparty/walkontable/src/utils/column.mjs +19 -4
- package/3rdparty/walkontable/src/utils/nodesPool.js +5 -0
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +5 -0
- package/3rdparty/walkontable/src/utils/orderView/view.js +13 -6
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +13 -6
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +9 -6
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +9 -6
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +7 -4
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +7 -4
- package/3rdparty/walkontable/src/utils/row.js +14 -2
- package/3rdparty/walkontable/src/utils/row.mjs +14 -2
- package/3rdparty/walkontable/src/viewport.js +9 -9
- package/3rdparty/walkontable/src/viewport.mjs +9 -9
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.js +25 -25
- package/core.mjs +25 -25
- package/dataMap/dataMap.js +99 -90
- package/dataMap/dataMap.mjs +99 -90
- package/dataMap/dataSource.js +14 -8
- package/dataMap/dataSource.mjs +14 -8
- package/dataMap/metaManager/lazyFactoryMap.js +19 -7
- package/dataMap/metaManager/lazyFactoryMap.mjs +19 -7
- package/dataMap/metaManager/metaLayers/cellMeta.js +8 -3
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +8 -3
- package/dataMap/metaManager/metaLayers/columnMeta.js +7 -1
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +7 -1
- package/dataMap/metaManager/metaLayers/globalMeta.js +6 -1
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +6 -1
- package/dataMap/metaManager/metaLayers/tableMeta.js +6 -2
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +6 -2
- package/dataMap/metaManager/metaSchema.js +55 -55
- package/dataMap/metaManager/metaSchema.mjs +55 -55
- package/dataMap/metaManager/mods/dynamicCellMeta.js +7 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +7 -2
- package/dataMap/metaManager/mods/extendMetaProperties.js +8 -4
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +8 -4
- package/dataMap/metaManager/utils.js +2 -2
- package/dataMap/metaManager/utils.mjs +2 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +7244 -6347
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +120 -120
- package/dist/handsontable.js +7243 -6346
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +28 -28
- package/editorManager.js +105 -95
- package/editorManager.mjs +105 -95
- package/editors/autocompleteEditor/autocompleteEditor.js +47 -46
- package/editors/autocompleteEditor/autocompleteEditor.mjs +46 -45
- package/editors/baseEditor/baseEditor.js +23 -26
- package/editors/baseEditor/baseEditor.mjs +23 -26
- package/editors/dateEditor/dateEditor.js +24 -15
- package/editors/dateEditor/dateEditor.mjs +24 -15
- package/editors/dropdownEditor/dropdownEditor.js +1 -1
- package/editors/dropdownEditor/dropdownEditor.mjs +1 -1
- package/editors/handsontableEditor/handsontableEditor.js +4 -4
- package/editors/handsontableEditor/handsontableEditor.mjs +4 -4
- package/editors/textEditor/textEditor.js +23 -17
- package/editors/textEditor/textEditor.mjs +24 -18
- package/eventManager.js +8 -0
- package/eventManager.mjs +8 -0
- package/helpers/array.js +2 -2
- package/helpers/array.mjs +2 -2
- package/helpers/dom/element.js +7 -7
- package/helpers/dom/element.mjs +7 -7
- package/helpers/function.js +1 -1
- package/helpers/function.mjs +1 -1
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/object.js +4 -4
- package/helpers/object.mjs +4 -4
- package/helpers/string.js +1 -1
- package/helpers/string.mjs +1 -1
- package/package.json +1 -1
- package/pluginHooks.d.ts +0 -2
- package/pluginHooks.js +12 -3
- package/pluginHooks.mjs +12 -3
- package/plugins/autoColumnSize/autoColumnSize.js +141 -130
- package/plugins/autoColumnSize/autoColumnSize.mjs +140 -129
- package/plugins/autoRowSize/autoRowSize.js +112 -125
- package/plugins/autoRowSize/autoRowSize.mjs +110 -123
- package/plugins/autofill/autofill.js +97 -102
- package/plugins/autofill/autofill.mjs +96 -101
- package/plugins/base/base.js +57 -22
- package/plugins/base/base.mjs +56 -22
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +29 -24
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +28 -23
- package/plugins/collapsibleColumns/collapsibleColumns.js +104 -107
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +102 -104
- package/plugins/columnSorting/columnSorting.js +105 -98
- package/plugins/columnSorting/columnSorting.mjs +104 -97
- package/plugins/columnSorting/columnStatesManager.js +12 -6
- package/plugins/columnSorting/columnStatesManager.mjs +12 -6
- package/plugins/columnSummary/columnSummary.js +71 -58
- package/plugins/columnSummary/columnSummary.mjs +70 -57
- package/plugins/columnSummary/endpoints.js +20 -14
- package/plugins/columnSummary/endpoints.mjs +20 -14
- package/plugins/comments/commentEditor.js +30 -2
- package/plugins/comments/commentEditor.mjs +30 -2
- package/plugins/comments/comments.js +158 -169
- package/plugins/comments/comments.mjs +157 -168
- package/plugins/comments/displaySwitch.js +7 -3
- package/plugins/comments/displaySwitch.mjs +7 -3
- package/plugins/contextMenu/commandExecutor.js +15 -2
- package/plugins/contextMenu/commandExecutor.mjs +15 -2
- package/plugins/contextMenu/contextMenu.js +91 -101
- package/plugins/contextMenu/contextMenu.mjs +90 -100
- package/plugins/contextMenu/itemsFactory.js +19 -4
- package/plugins/contextMenu/itemsFactory.mjs +19 -4
- package/plugins/contextMenu/menu/cursor.js +36 -0
- package/plugins/contextMenu/menu/cursor.mjs +36 -0
- package/plugins/contextMenu/menu/menu.js +57 -5
- package/plugins/contextMenu/menu/menu.mjs +57 -5
- package/plugins/copyPaste/copyPaste.js +74 -75
- package/plugins/copyPaste/copyPaste.mjs +74 -75
- package/plugins/customBorders/customBorders.js +49 -48
- package/plugins/customBorders/customBorders.mjs +48 -47
- package/plugins/dragToScroll/dragToScroll.js +50 -54
- package/plugins/dragToScroll/dragToScroll.mjs +49 -52
- package/plugins/dropdownMenu/dropdownMenu.js +132 -129
- package/plugins/dropdownMenu/dropdownMenu.mjs +132 -129
- package/plugins/exportFile/dataProvider.js +7 -2
- package/plugins/exportFile/dataProvider.mjs +7 -2
- package/plugins/exportFile/exportFile.js +1 -1
- package/plugins/exportFile/exportFile.mjs +1 -1
- package/plugins/exportFile/types/_base.js +14 -6
- package/plugins/exportFile/types/_base.mjs +14 -6
- package/plugins/filters/component/actionBar.js +9 -0
- package/plugins/filters/component/actionBar.mjs +9 -0
- package/plugins/filters/component/condition.js +13 -0
- package/plugins/filters/component/condition.mjs +13 -0
- package/plugins/filters/component/operators.js +9 -0
- package/plugins/filters/component/operators.mjs +9 -0
- package/plugins/filters/component/value.js +9 -0
- package/plugins/filters/component/value.mjs +9 -0
- package/plugins/filters/conditionCollection.js +9 -4
- package/plugins/filters/conditionCollection.mjs +9 -4
- package/plugins/filters/conditionUpdateObserver.js +53 -42
- package/plugins/filters/conditionUpdateObserver.mjs +53 -42
- package/plugins/filters/dataFilter.js +9 -3
- package/plugins/filters/dataFilter.mjs +9 -3
- package/plugins/filters/filters.js +184 -189
- package/plugins/filters/filters.mjs +182 -187
- package/plugins/filters/ui/_base.js +1 -1
- package/plugins/filters/ui/_base.mjs +1 -1
- package/plugins/filters/utils.js +1 -1
- package/plugins/filters/utils.mjs +1 -1
- package/plugins/formulas/engine/settings.js +1 -1
- package/plugins/formulas/engine/settings.mjs +1 -1
- package/plugins/formulas/formulas.js +684 -602
- package/plugins/formulas/formulas.mjs +682 -600
- package/plugins/hiddenColumns/hiddenColumns.js +174 -169
- package/plugins/hiddenColumns/hiddenColumns.mjs +173 -168
- package/plugins/hiddenRows/hiddenRows.js +170 -165
- package/plugins/hiddenRows/hiddenRows.mjs +169 -164
- 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/manualColumnFreeze/manualColumnFreeze.js +67 -54
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +64 -51
- package/plugins/manualColumnMove/manualColumnMove.js +287 -232
- package/plugins/manualColumnMove/manualColumnMove.mjs +286 -231
- package/plugins/manualColumnMove/ui/_base.js +9 -3
- package/plugins/manualColumnMove/ui/_base.mjs +9 -3
- package/plugins/manualColumnResize/manualColumnResize.js +291 -246
- package/plugins/manualColumnResize/manualColumnResize.mjs +290 -244
- package/plugins/manualRowMove/manualRowMove.js +223 -208
- package/plugins/manualRowMove/manualRowMove.mjs +222 -207
- package/plugins/manualRowMove/ui/_base.js +10 -5
- package/plugins/manualRowMove/ui/_base.mjs +10 -5
- package/plugins/manualRowResize/manualRowResize.js +254 -209
- package/plugins/manualRowResize/manualRowResize.mjs +253 -207
- package/plugins/mergeCells/calculations/autofill.js +9 -3
- package/plugins/mergeCells/calculations/autofill.mjs +9 -3
- package/plugins/mergeCells/calculations/selection.js +10 -4
- package/plugins/mergeCells/calculations/selection.mjs +10 -4
- package/plugins/mergeCells/cellCoords.js +16 -6
- package/plugins/mergeCells/cellCoords.mjs +16 -6
- package/plugins/mergeCells/cellsCollection.js +10 -4
- package/plugins/mergeCells/cellsCollection.mjs +10 -4
- package/plugins/mergeCells/mergeCells.js +582 -502
- package/plugins/mergeCells/mergeCells.mjs +580 -500
- package/plugins/multiColumnSorting/multiColumnSorting.js +13 -10
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +13 -10
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +16 -28
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +16 -27
- package/plugins/nestedHeaders/nestedHeaders.js +542 -499
- package/plugins/nestedHeaders/nestedHeaders.mjs +554 -511
- package/plugins/nestedHeaders/stateManager/index.js +1 -1
- package/plugins/nestedHeaders/stateManager/index.mjs +1 -1
- package/plugins/nestedRows/data/dataManager.js +21 -15
- package/plugins/nestedRows/data/dataManager.mjs +21 -15
- package/plugins/nestedRows/nestedRows.js +326 -278
- package/plugins/nestedRows/nestedRows.mjs +325 -277
- package/plugins/nestedRows/ui/_base.js +7 -1
- package/plugins/nestedRows/ui/_base.mjs +7 -1
- package/plugins/nestedRows/ui/collapsing.js +2 -2
- package/plugins/nestedRows/ui/collapsing.mjs +2 -2
- package/plugins/nestedRows/ui/contextMenu.js +28 -18
- package/plugins/nestedRows/ui/contextMenu.mjs +28 -18
- package/plugins/nestedRows/utils/rowMoveController.js +12 -4
- package/plugins/nestedRows/utils/rowMoveController.mjs +12 -4
- package/plugins/persistentState/persistentState.js +14 -11
- package/plugins/persistentState/persistentState.mjs +14 -11
- package/plugins/persistentState/storage.js +11 -6
- package/plugins/persistentState/storage.mjs +11 -6
- package/plugins/registry.js +2 -2
- package/plugins/registry.mjs +2 -2
- package/plugins/search/search.js +57 -46
- package/plugins/search/search.mjs +56 -45
- package/plugins/touchScroll/touchScroll.js +102 -100
- package/plugins/touchScroll/touchScroll.mjs +100 -98
- package/plugins/trimRows/trimRows.js +33 -28
- package/plugins/trimRows/trimRows.mjs +32 -27
- package/plugins/undoRedo/undoRedo.js +2 -2
- package/plugins/undoRedo/undoRedo.mjs +2 -2
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +11 -11
- package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +11 -11
- package/renderers/baseRenderer/baseRenderer.js +2 -2
- package/renderers/baseRenderer/baseRenderer.mjs +2 -2
- package/renderers/checkboxRenderer/checkboxRenderer.js +23 -23
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +23 -23
- package/renderers/dateRenderer/dateRenderer.js +4 -4
- package/renderers/dateRenderer/dateRenderer.mjs +4 -4
- package/renderers/handsontableRenderer/handsontableRenderer.js +4 -4
- package/renderers/handsontableRenderer/handsontableRenderer.mjs +4 -4
- package/renderers/htmlRenderer/htmlRenderer.js +4 -4
- package/renderers/htmlRenderer/htmlRenderer.mjs +4 -4
- package/renderers/numericRenderer/numericRenderer.js +3 -3
- package/renderers/numericRenderer/numericRenderer.mjs +3 -3
- package/renderers/passwordRenderer/passwordRenderer.js +3 -3
- package/renderers/passwordRenderer/passwordRenderer.mjs +3 -3
- package/renderers/selectRenderer/selectRenderer.js +4 -4
- package/renderers/selectRenderer/selectRenderer.mjs +4 -4
- package/renderers/textRenderer/textRenderer.js +5 -5
- package/renderers/textRenderer/textRenderer.mjs +5 -5
- package/renderers/timeRenderer/timeRenderer.js +3 -3
- package/renderers/timeRenderer/timeRenderer.mjs +3 -3
- package/selection/range.js +12 -2
- package/selection/range.mjs +12 -2
- package/selection/selection.js +3 -3
- package/selection/selection.mjs +3 -3
- package/tableView.js +208 -200
- package/tableView.mjs +208 -200
- package/translations/changesObservable/utils.js +2 -2
- package/translations/changesObservable/utils.mjs +2 -2
- package/translations/indexMapper.js +25 -22
- package/translations/indexMapper.mjs +25 -22
- package/translations/mapCollections/aggregatedCollection.js +8 -2
- package/translations/mapCollections/aggregatedCollection.mjs +8 -2
- package/translations/mapCollections/mapCollection.js +5 -2
- package/translations/mapCollections/mapCollection.mjs +5 -2
- package/translations/maps/indexMap.js +6 -1
- package/translations/maps/indexMap.mjs +6 -1
- package/translations/maps/utils/physicallyIndexed.js +2 -2
- package/translations/maps/utils/physicallyIndexed.mjs +2 -2
- package/utils/dataStructures/linkedList.js +10 -6
- package/utils/dataStructures/linkedList.mjs +10 -6
- package/utils/dataStructures/queue.js +1 -1
- package/utils/dataStructures/queue.mjs +1 -1
- package/utils/dataStructures/stack.js +1 -1
- package/utils/dataStructures/stack.mjs +1 -1
- package/utils/ghostTable.js +2 -2
- package/utils/ghostTable.mjs +2 -2
- package/utils/interval.js +73 -36
- package/utils/interval.mjs +73 -36
- package/utils/parseTable.js +1 -1
- package/utils/parseTable.mjs +1 -1
- package/validators/autocompleteValidator/autocompleteValidator.js +1 -1
- package/validators/autocompleteValidator/autocompleteValidator.mjs +1 -1
- package/validators/dateValidator/dateValidator.js +1 -1
- package/validators/dateValidator/dateValidator.mjs +1 -1
- package/validators/numericValidator/numericValidator.js +1 -1
- package/validators/numericValidator/numericValidator.mjs +1 -1
package/tableView.mjs
CHANGED
@@ -17,26 +17,29 @@ import Walkontable from "./3rdparty/walkontable/src/index.mjs";
|
|
17
17
|
import { handleMouseEvent } from "./selection/mouseEventHandler.mjs";
|
18
18
|
import { isRootInstance } from "./utils/rootInstance.mjs";
|
19
19
|
import { A11Y_COLCOUNT, A11Y_MULTISELECTABLE, A11Y_PRESENTATION, A11Y_ROWCOUNT, A11Y_TREEGRID } from "./helpers/a11y.mjs";
|
20
|
-
const privatePool = new WeakMap();
|
21
|
-
|
22
20
|
/**
|
23
21
|
* @class TableView
|
24
22
|
* @private
|
25
23
|
*/
|
26
24
|
var _columnHeadersCount = /*#__PURE__*/new WeakMap();
|
27
25
|
var _rowHeadersCount = /*#__PURE__*/new WeakMap();
|
26
|
+
var _selectionMouseDown = /*#__PURE__*/new WeakMap();
|
27
|
+
var _mouseDown = /*#__PURE__*/new WeakMap();
|
28
|
+
var _table = /*#__PURE__*/new WeakMap();
|
29
|
+
var _lastWidth = /*#__PURE__*/new WeakMap();
|
30
|
+
var _lastHeight = /*#__PURE__*/new WeakMap();
|
28
31
|
class TableView {
|
29
32
|
/**
|
30
|
-
* @param {Hanstontable}
|
33
|
+
* @param {Hanstontable} hotInstance Instance of {@link Handsontable}.
|
31
34
|
*/
|
32
|
-
constructor(
|
35
|
+
constructor(hotInstance) {
|
33
36
|
/**
|
34
37
|
* Instance of {@link Handsontable}.
|
35
38
|
*
|
36
39
|
* @private
|
37
40
|
* @type {Handsontable}
|
38
41
|
*/
|
39
|
-
_defineProperty(this, "
|
42
|
+
_defineProperty(this, "hot", void 0);
|
40
43
|
/**
|
41
44
|
* Instance of {@link EventManager}.
|
42
45
|
*
|
@@ -75,7 +78,6 @@ class TableView {
|
|
75
78
|
/**
|
76
79
|
* Main Walkontable instance.
|
77
80
|
*
|
78
|
-
* @private
|
79
81
|
* @type {Walkontable}
|
80
82
|
*/
|
81
83
|
_defineProperty(this, "activeWt", void 0);
|
@@ -108,42 +110,52 @@ class TableView {
|
|
108
110
|
* @type {boolean}
|
109
111
|
*/
|
110
112
|
_defineProperty(this, "postponedAdjustElementsSize", false);
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
113
|
+
/**
|
114
|
+
* Defines if the text should be selected during mousemove.
|
115
|
+
*
|
116
|
+
* @type {boolean}
|
117
|
+
*/
|
118
|
+
_classPrivateFieldInitSpec(this, _selectionMouseDown, {
|
119
|
+
writable: true,
|
120
|
+
value: false
|
121
|
+
});
|
122
|
+
/**
|
123
|
+
* @type {boolean}
|
124
|
+
*/
|
125
|
+
_classPrivateFieldInitSpec(this, _mouseDown, {
|
126
|
+
writable: true,
|
127
|
+
value: void 0
|
128
|
+
});
|
129
|
+
/**
|
130
|
+
* Main <TABLE> element.
|
131
|
+
*
|
132
|
+
* @type {HTMLTableElement}
|
133
|
+
*/
|
134
|
+
_classPrivateFieldInitSpec(this, _table, {
|
135
|
+
writable: true,
|
136
|
+
value: void 0
|
137
|
+
});
|
138
|
+
/**
|
139
|
+
* Cached width of the rootElement.
|
140
|
+
*
|
141
|
+
* @type {number}
|
142
|
+
*/
|
143
|
+
_classPrivateFieldInitSpec(this, _lastWidth, {
|
144
|
+
writable: true,
|
145
|
+
value: 0
|
146
|
+
});
|
147
|
+
/**
|
148
|
+
* Cached height of the rootElement.
|
149
|
+
*
|
150
|
+
* @type {number}
|
151
|
+
*/
|
152
|
+
_classPrivateFieldInitSpec(this, _lastHeight, {
|
153
|
+
writable: true,
|
154
|
+
value: 0
|
146
155
|
});
|
156
|
+
this.hot = hotInstance;
|
157
|
+
this.eventManager = new EventManager(this.hot);
|
158
|
+
this.settings = this.hot.getSettings();
|
147
159
|
this.createElements();
|
148
160
|
this.registerEvents();
|
149
161
|
this.initializeWalkontable();
|
@@ -153,16 +165,16 @@ class TableView {
|
|
153
165
|
* Renders WalkontableUI.
|
154
166
|
*/
|
155
167
|
render() {
|
156
|
-
if (!this.
|
157
|
-
this.
|
168
|
+
if (!this.hot.isRenderSuspended()) {
|
169
|
+
this.hot.runHooks('beforeRender', this.hot.forceFullRender);
|
158
170
|
if (this.postponedAdjustElementsSize) {
|
159
171
|
this.postponedAdjustElementsSize = false;
|
160
172
|
this.adjustElementsSize(true);
|
161
173
|
}
|
162
|
-
this._wt.draw(!this.
|
163
|
-
this.
|
164
|
-
this.
|
165
|
-
this.
|
174
|
+
this._wt.draw(!this.hot.forceFullRender);
|
175
|
+
this.hot.runHooks('afterRender', this.hot.forceFullRender);
|
176
|
+
this.hot.forceFullRender = false;
|
177
|
+
this.hot.renderCall = false;
|
166
178
|
}
|
167
179
|
}
|
168
180
|
|
@@ -173,7 +185,7 @@ class TableView {
|
|
173
185
|
*/
|
174
186
|
adjustElementsSize() {
|
175
187
|
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
176
|
-
if (this.
|
188
|
+
if (this.hot.isRenderSuspended()) {
|
177
189
|
this.postponedAdjustElementsSize = true;
|
178
190
|
} else {
|
179
191
|
this._wt.wtOverlays.adjustElementsSize(force);
|
@@ -240,32 +252,31 @@ class TableView {
|
|
240
252
|
* @private
|
241
253
|
*/
|
242
254
|
createElements() {
|
243
|
-
const priv = privatePool.get(this);
|
244
255
|
const {
|
245
256
|
rootElement,
|
246
257
|
rootDocument
|
247
|
-
} = this.
|
258
|
+
} = this.hot;
|
248
259
|
const originalStyle = rootElement.getAttribute('style');
|
249
260
|
if (originalStyle) {
|
250
261
|
rootElement.setAttribute('data-originalstyle', originalStyle); // needed to retrieve original style in jsFiddle link generator in HT examples. may be removed in future versions
|
251
262
|
}
|
252
263
|
|
253
264
|
addClass(rootElement, 'handsontable');
|
254
|
-
|
255
|
-
addClass(
|
256
|
-
if (this.
|
257
|
-
addClass(
|
265
|
+
_classPrivateFieldSet(this, _table, rootDocument.createElement('TABLE'));
|
266
|
+
addClass(_classPrivateFieldGet(this, _table), 'htCore');
|
267
|
+
if (this.hot.getSettings().tableClassName) {
|
268
|
+
addClass(_classPrivateFieldGet(this, _table), this.hot.getSettings().tableClassName);
|
258
269
|
}
|
259
270
|
if (this.settings.ariaTags) {
|
260
|
-
setAttribute(
|
261
|
-
setAttribute(rootElement, [A11Y_TREEGRID(), A11Y_ROWCOUNT(this.
|
271
|
+
setAttribute(_classPrivateFieldGet(this, _table), [A11Y_PRESENTATION()]);
|
272
|
+
setAttribute(rootElement, [A11Y_TREEGRID(), A11Y_ROWCOUNT(this.hot.countRows()), A11Y_COLCOUNT(this.hot.countCols()), A11Y_MULTISELECTABLE()]);
|
262
273
|
}
|
263
274
|
this.THEAD = rootDocument.createElement('THEAD');
|
264
|
-
|
275
|
+
_classPrivateFieldGet(this, _table).appendChild(this.THEAD);
|
265
276
|
this.TBODY = rootDocument.createElement('TBODY');
|
266
|
-
|
267
|
-
this.
|
268
|
-
this.
|
277
|
+
_classPrivateFieldGet(this, _table).appendChild(this.TBODY);
|
278
|
+
this.hot.table = _classPrivateFieldGet(this, _table);
|
279
|
+
this.hot.container.insertBefore(_classPrivateFieldGet(this, _table), this.hot.container.firstChild);
|
269
280
|
}
|
270
281
|
|
271
282
|
/**
|
@@ -274,19 +285,18 @@ class TableView {
|
|
274
285
|
* @private
|
275
286
|
*/
|
276
287
|
registerEvents() {
|
277
|
-
const priv = privatePool.get(this);
|
278
288
|
const {
|
279
289
|
rootElement,
|
280
290
|
rootDocument,
|
281
291
|
selection
|
282
|
-
} = this.
|
292
|
+
} = this.hot;
|
283
293
|
const documentElement = rootDocument.documentElement;
|
284
294
|
this.eventManager.addEventListener(rootElement, 'mousedown', event => {
|
285
|
-
|
295
|
+
_classPrivateFieldSet(this, _selectionMouseDown, true);
|
286
296
|
if (!this.isTextSelectionAllowed(event.target)) {
|
287
297
|
const {
|
288
298
|
rootWindow
|
289
|
-
} = this.
|
299
|
+
} = this.hot;
|
290
300
|
clearTextSelection(rootWindow);
|
291
301
|
event.preventDefault();
|
292
302
|
rootWindow.focus(); // make sure that window that contains HOT is active. Important when HOT is in iframe.
|
@@ -294,13 +304,13 @@ class TableView {
|
|
294
304
|
});
|
295
305
|
|
296
306
|
this.eventManager.addEventListener(rootElement, 'mouseup', () => {
|
297
|
-
|
307
|
+
_classPrivateFieldSet(this, _selectionMouseDown, false);
|
298
308
|
});
|
299
309
|
this.eventManager.addEventListener(rootElement, 'mousemove', event => {
|
300
|
-
if (
|
310
|
+
if (_classPrivateFieldGet(this, _selectionMouseDown) && !this.isTextSelectionAllowed(event.target)) {
|
301
311
|
// Clear selection only when fragmentSelection is enabled, otherwise clearing selection breaks the IME editor.
|
302
312
|
if (this.settings.fragmentSelection) {
|
303
|
-
clearTextSelection(this.
|
313
|
+
clearTextSelection(this.hot.rootWindow);
|
304
314
|
}
|
305
315
|
event.preventDefault();
|
306
316
|
}
|
@@ -315,40 +325,40 @@ class TableView {
|
|
315
325
|
if (selection.isInProgress() && isLeftClick(event)) {
|
316
326
|
selection.finish();
|
317
327
|
}
|
318
|
-
|
328
|
+
_classPrivateFieldSet(this, _mouseDown, false);
|
319
329
|
const isOutsideInputElement = isOutsideInput(rootDocument.activeElement);
|
320
330
|
if (!isOutsideInputElement) {
|
321
331
|
return;
|
322
332
|
}
|
323
333
|
if (isOutsideInputElement || !selection.isSelected() && !selection.isSelectedByAnyHeader() && !rootElement.contains(event.target) && !isRightClick(event)) {
|
324
|
-
this.
|
334
|
+
this.hot.unlisten();
|
325
335
|
}
|
326
336
|
});
|
327
337
|
this.eventManager.addEventListener(documentElement, 'contextmenu', event => {
|
328
338
|
if (selection.isInProgress() && isRightClick(event)) {
|
329
339
|
selection.finish();
|
330
|
-
|
340
|
+
_classPrivateFieldSet(this, _mouseDown, false);
|
331
341
|
}
|
332
342
|
});
|
333
343
|
this.eventManager.addEventListener(documentElement, 'touchend', () => {
|
334
344
|
if (selection.isInProgress()) {
|
335
345
|
selection.finish();
|
336
346
|
}
|
337
|
-
|
347
|
+
_classPrivateFieldSet(this, _mouseDown, false);
|
338
348
|
});
|
339
349
|
this.eventManager.addEventListener(documentElement, 'mousedown', event => {
|
340
350
|
const originalTarget = event.target;
|
341
351
|
const eventX = event.x || event.clientX;
|
342
352
|
const eventY = event.y || event.clientY;
|
343
353
|
let next = event.target;
|
344
|
-
if (
|
354
|
+
if (_classPrivateFieldGet(this, _mouseDown) || !rootElement || !this.hot.view) {
|
345
355
|
return; // it must have been started in a cell
|
346
356
|
}
|
347
357
|
|
348
358
|
// immediate click on "holder" means click on the right side of vertical scrollbar
|
349
359
|
const {
|
350
360
|
holder
|
351
|
-
} = this.
|
361
|
+
} = this.hot.view._wt.wtTable;
|
352
362
|
if (next === holder) {
|
353
363
|
const scrollbarWidth = getScrollbarWidth(rootDocument);
|
354
364
|
if (rootDocument.elementFromPoint(eventX + scrollbarWidth, eventY) !== holder || rootDocument.elementFromPoint(eventX, eventY + scrollbarWidth) !== holder) {
|
@@ -375,12 +385,12 @@ class TableView {
|
|
375
385
|
// function did not return until here, we have an outside click!
|
376
386
|
const outsideClickDeselects = typeof this.settings.outsideClickDeselects === 'function' ? this.settings.outsideClickDeselects(originalTarget) : this.settings.outsideClickDeselects;
|
377
387
|
if (outsideClickDeselects) {
|
378
|
-
this.
|
388
|
+
this.hot.deselectCell();
|
379
389
|
} else {
|
380
|
-
this.
|
390
|
+
this.hot.destroyEditor(false, false);
|
381
391
|
}
|
382
392
|
});
|
383
|
-
this.eventManager.addEventListener(
|
393
|
+
this.eventManager.addEventListener(_classPrivateFieldGet(this, _table), 'selectstart', event => {
|
384
394
|
if (this.settings.fragmentSelection || isInput(event.target)) {
|
385
395
|
return;
|
386
396
|
}
|
@@ -402,7 +412,7 @@ class TableView {
|
|
402
412
|
col
|
403
413
|
} = _ref;
|
404
414
|
// TODO: To consider an idea to reusing the CellCoords instance instead creating new one.
|
405
|
-
return this.
|
415
|
+
return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(row, col));
|
406
416
|
}
|
407
417
|
|
408
418
|
/**
|
@@ -415,8 +425,8 @@ class TableView {
|
|
415
425
|
translateFromRenderableToVisualIndex(renderableRow, renderableColumn) {
|
416
426
|
// TODO: Some helper may be needed.
|
417
427
|
// We perform translation for indexes (without headers).
|
418
|
-
let visualRow = renderableRow >= 0 ? this.
|
419
|
-
let visualColumn = renderableColumn >= 0 ? this.
|
428
|
+
let visualRow = renderableRow >= 0 ? this.hot.rowIndexMapper.getVisualFromRenderableIndex(renderableRow) : renderableRow;
|
429
|
+
let visualColumn = renderableColumn >= 0 ? this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn) : renderableColumn;
|
420
430
|
if (visualRow === null) {
|
421
431
|
visualRow = renderableRow;
|
422
432
|
}
|
@@ -453,7 +463,7 @@ class TableView {
|
|
453
463
|
* @returns {number}
|
454
464
|
*/
|
455
465
|
countRenderableColumns() {
|
456
|
-
return this.countRenderableIndexes(this.
|
466
|
+
return this.countRenderableIndexes(this.hot.columnIndexMapper, this.settings.maxCols);
|
457
467
|
}
|
458
468
|
|
459
469
|
/**
|
@@ -462,7 +472,7 @@ class TableView {
|
|
462
472
|
* @returns {number}
|
463
473
|
*/
|
464
474
|
countRenderableRows() {
|
465
|
-
return this.countRenderableIndexes(this.
|
475
|
+
return this.countRenderableIndexes(this.hot.rowIndexMapper, this.settings.maxRows);
|
466
476
|
}
|
467
477
|
|
468
478
|
/**
|
@@ -474,7 +484,7 @@ class TableView {
|
|
474
484
|
* @returns {number}
|
475
485
|
*/
|
476
486
|
countNotHiddenRowIndexes(visualIndex, incrementBy) {
|
477
|
-
return this.countNotHiddenIndexes(visualIndex, incrementBy, this.
|
487
|
+
return this.countNotHiddenIndexes(visualIndex, incrementBy, this.hot.rowIndexMapper, this.countRenderableRows());
|
478
488
|
}
|
479
489
|
|
480
490
|
/**
|
@@ -486,7 +496,7 @@ class TableView {
|
|
486
496
|
* @returns {number}
|
487
497
|
*/
|
488
498
|
countNotHiddenColumnIndexes(visualIndex, incrementBy) {
|
489
|
-
return this.countNotHiddenIndexes(visualIndex, incrementBy, this.
|
499
|
+
return this.countNotHiddenIndexes(visualIndex, incrementBy, this.hot.columnIndexMapper, this.countRenderableColumns());
|
490
500
|
}
|
491
501
|
|
492
502
|
/**
|
@@ -525,7 +535,7 @@ class TableView {
|
|
525
535
|
* @returns {number}
|
526
536
|
*/
|
527
537
|
countNotHiddenFixedColumnsStart() {
|
528
|
-
const countCols = this.
|
538
|
+
const countCols = this.hot.countCols();
|
529
539
|
const visualFixedColumnsStart = Math.min(parseInt(this.settings.fixedColumnsStart, 10), countCols) - 1;
|
530
540
|
return this.countNotHiddenColumnIndexes(visualFixedColumnsStart, -1);
|
531
541
|
}
|
@@ -537,7 +547,7 @@ class TableView {
|
|
537
547
|
* @returns {number}
|
538
548
|
*/
|
539
549
|
countNotHiddenFixedRowsTop() {
|
540
|
-
const countRows = this.
|
550
|
+
const countRows = this.hot.countRows();
|
541
551
|
const visualFixedRowsTop = Math.min(parseInt(this.settings.fixedRowsTop, 10), countRows) - 1;
|
542
552
|
return this.countNotHiddenRowIndexes(visualFixedRowsTop, -1);
|
543
553
|
}
|
@@ -549,7 +559,7 @@ class TableView {
|
|
549
559
|
* @returns {number}
|
550
560
|
*/
|
551
561
|
countNotHiddenFixedRowsBottom() {
|
552
|
-
const countRows = this.
|
562
|
+
const countRows = this.hot.countRows();
|
553
563
|
const visualFixedRowsBottom = Math.max(countRows - parseInt(this.settings.fixedRowsBottom, 10), 0);
|
554
564
|
return this.countNotHiddenRowIndexes(visualFixedRowsBottom, 1);
|
555
565
|
}
|
@@ -564,7 +574,7 @@ class TableView {
|
|
564
574
|
countRenderableColumnsInRange(columnStart, columnEnd) {
|
565
575
|
let count = 0;
|
566
576
|
for (let column = columnStart; column <= columnEnd; column++) {
|
567
|
-
if (this.
|
577
|
+
if (this.hot.columnIndexMapper.getRenderableFromVisualIndex(column) !== null) {
|
568
578
|
count += 1;
|
569
579
|
}
|
570
580
|
}
|
@@ -581,7 +591,7 @@ class TableView {
|
|
581
591
|
countRenderableRowsInRange(rowStart, rowEnd) {
|
582
592
|
let count = 0;
|
583
593
|
for (let row = rowStart; row <= rowEnd; row++) {
|
584
|
-
if (this.
|
594
|
+
if (this.hot.rowIndexMapper.getRenderableFromVisualIndex(row) !== null) {
|
585
595
|
count += 1;
|
586
596
|
}
|
587
597
|
}
|
@@ -597,7 +607,7 @@ class TableView {
|
|
597
607
|
isMainTableNotFullyCoveredByOverlays() {
|
598
608
|
const fixedAllRows = this.countNotHiddenFixedRowsTop() + this.countNotHiddenFixedRowsBottom();
|
599
609
|
const fixedAllColumns = this.countNotHiddenFixedColumnsStart();
|
600
|
-
return this.
|
610
|
+
return this.hot.countRenderedRows() > fixedAllRows && this.hot.countRenderedCols() > fixedAllColumns;
|
601
611
|
}
|
602
612
|
|
603
613
|
/**
|
@@ -606,18 +616,17 @@ class TableView {
|
|
606
616
|
* @private
|
607
617
|
*/
|
608
618
|
initializeWalkontable() {
|
609
|
-
const priv = privatePool.get(this);
|
610
619
|
const walkontableConfig = {
|
611
620
|
ariaTags: this.settings.ariaTags,
|
612
|
-
rtlMode: this.
|
613
|
-
externalRowCalculator: this.
|
614
|
-
table:
|
615
|
-
isDataViewInstance: () => isRootInstance(this.
|
621
|
+
rtlMode: this.hot.isRtl(),
|
622
|
+
externalRowCalculator: this.hot.getPlugin('autoRowSize') && this.hot.getPlugin('autoRowSize').isEnabled(),
|
623
|
+
table: _classPrivateFieldGet(this, _table),
|
624
|
+
isDataViewInstance: () => isRootInstance(this.hot),
|
616
625
|
preventOverflow: () => this.settings.preventOverflow,
|
617
626
|
preventWheel: () => this.settings.preventWheel,
|
618
627
|
stretchH: () => this.settings.stretchH,
|
619
628
|
data: (renderableRow, renderableColumn) => {
|
620
|
-
return this.
|
629
|
+
return this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(renderableRow, renderableColumn));
|
621
630
|
},
|
622
631
|
totalRows: () => this.countRenderableRows(),
|
623
632
|
totalColumns: () => this.countRenderableColumns(),
|
@@ -643,74 +652,74 @@ class TableView {
|
|
643
652
|
renderAllRows: this.settings.renderAllRows,
|
644
653
|
rowHeaders: () => {
|
645
654
|
const headerRenderers = [];
|
646
|
-
if (this.
|
655
|
+
if (this.hot.hasRowHeaders()) {
|
647
656
|
headerRenderers.push((renderableRowIndex, TH) => {
|
648
657
|
// TODO: Some helper may be needed.
|
649
658
|
// We perform translation for row indexes (without row headers).
|
650
|
-
const visualRowIndex = renderableRowIndex >= 0 ? this.
|
659
|
+
const visualRowIndex = renderableRowIndex >= 0 ? this.hot.rowIndexMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;
|
651
660
|
this.appendRowHeader(visualRowIndex, TH);
|
652
661
|
});
|
653
662
|
}
|
654
|
-
this.
|
663
|
+
this.hot.runHooks('afterGetRowHeaderRenderers', headerRenderers);
|
655
664
|
_classPrivateFieldSet(this, _rowHeadersCount, headerRenderers.length);
|
656
665
|
return headerRenderers;
|
657
666
|
},
|
658
667
|
columnHeaders: () => {
|
659
668
|
const headerRenderers = [];
|
660
|
-
if (this.
|
669
|
+
if (this.hot.hasColHeaders()) {
|
661
670
|
headerRenderers.push((renderedColumnIndex, TH) => {
|
662
671
|
// TODO: Some helper may be needed.
|
663
672
|
// We perform translation for columns indexes (without column headers).
|
664
|
-
const visualColumnsIndex = renderedColumnIndex >= 0 ? this.
|
673
|
+
const visualColumnsIndex = renderedColumnIndex >= 0 ? this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex) : renderedColumnIndex;
|
665
674
|
this.appendColHeader(visualColumnsIndex, TH);
|
666
675
|
});
|
667
676
|
}
|
668
|
-
this.
|
677
|
+
this.hot.runHooks('afterGetColumnHeaderRenderers', headerRenderers);
|
669
678
|
_classPrivateFieldSet(this, _columnHeadersCount, headerRenderers.length);
|
670
679
|
return headerRenderers;
|
671
680
|
},
|
672
681
|
columnWidth: renderedColumnIndex => {
|
673
|
-
const visualIndex = this.
|
682
|
+
const visualIndex = this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
|
674
683
|
|
675
684
|
// It's not a bug that we can't find visual index for some handled by method indexes. The function is called also
|
676
685
|
// for indexes that are not displayed (indexes that are beyond the grid's boundaries), i.e. when `fixedColumnsStart` > `startCols` (wrong config?) or
|
677
686
|
// scrolling and dataset is empty (scroll should handle that?).
|
678
|
-
return this.
|
687
|
+
return this.hot.getColWidth(visualIndex === null ? renderedColumnIndex : visualIndex);
|
679
688
|
},
|
680
689
|
rowHeight: renderedRowIndex => {
|
681
|
-
const visualIndex = this.
|
682
|
-
return this.
|
690
|
+
const visualIndex = this.hot.rowIndexMapper.getVisualFromRenderableIndex(renderedRowIndex);
|
691
|
+
return this.hot.getRowHeight(visualIndex === null ? renderedRowIndex : visualIndex);
|
683
692
|
},
|
684
693
|
cellRenderer: (renderedRowIndex, renderedColumnIndex, TD) => {
|
685
694
|
const [visualRowIndex, visualColumnIndex] = this.translateFromRenderableToVisualIndex(renderedRowIndex, renderedColumnIndex);
|
686
695
|
|
687
696
|
// Coords may be modified. For example, by the `MergeCells` plugin. It should affect cell value and cell meta.
|
688
|
-
const modifiedCellCoords = this.
|
697
|
+
const modifiedCellCoords = this.hot.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex);
|
689
698
|
let visualRowToCheck = visualRowIndex;
|
690
699
|
let visualColumnToCheck = visualColumnIndex;
|
691
700
|
if (Array.isArray(modifiedCellCoords)) {
|
692
701
|
[visualRowToCheck, visualColumnToCheck] = modifiedCellCoords;
|
693
702
|
}
|
694
|
-
const cellProperties = this.
|
695
|
-
const prop = this.
|
696
|
-
let value = this.
|
697
|
-
if (this.
|
698
|
-
value = this.
|
703
|
+
const cellProperties = this.hot.getCellMeta(visualRowToCheck, visualColumnToCheck);
|
704
|
+
const prop = this.hot.colToProp(visualColumnToCheck);
|
705
|
+
let value = this.hot.getDataAtRowProp(visualRowToCheck, prop);
|
706
|
+
if (this.hot.hasHook('beforeValueRender')) {
|
707
|
+
value = this.hot.runHooks('beforeValueRender', value, cellProperties);
|
699
708
|
}
|
700
|
-
this.
|
701
|
-
this.
|
702
|
-
this.
|
709
|
+
this.hot.runHooks('beforeRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
|
710
|
+
this.hot.getCellRenderer(cellProperties)(this.hot, TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
|
711
|
+
this.hot.runHooks('afterRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
|
703
712
|
},
|
704
|
-
selections: this.
|
713
|
+
selections: this.hot.selection.highlight,
|
705
714
|
hideBorderOnMouseDownOver: () => this.settings.fragmentSelection,
|
706
715
|
onWindowResize: () => {
|
707
|
-
if (this.
|
708
|
-
this.
|
716
|
+
if (this.hot && !this.hot.isDestroyed) {
|
717
|
+
this.hot.refreshDimensions();
|
709
718
|
}
|
710
719
|
},
|
711
720
|
onContainerElementResize: () => {
|
712
|
-
if (this.
|
713
|
-
this.
|
721
|
+
if (this.hot && !this.hot.isDestroyed && isVisible(this.hot.rootElement)) {
|
722
|
+
this.hot.refreshDimensions();
|
714
723
|
}
|
715
724
|
},
|
716
725
|
onCellMouseDown: (event, coords, TD, wt) => {
|
@@ -720,44 +729,44 @@ class TableView {
|
|
720
729
|
column: false,
|
721
730
|
cell: false
|
722
731
|
};
|
723
|
-
this.
|
732
|
+
this.hot.listen();
|
724
733
|
this.activeWt = wt;
|
725
|
-
|
726
|
-
this.
|
734
|
+
_classPrivateFieldSet(this, _mouseDown, true);
|
735
|
+
this.hot.runHooks('beforeOnCellMouseDown', event, visualCoords, TD, controller);
|
727
736
|
if (isImmediatePropagationStopped(event)) {
|
728
737
|
return;
|
729
738
|
}
|
730
739
|
handleMouseEvent(event, {
|
731
740
|
coords: visualCoords,
|
732
|
-
selection: this.
|
741
|
+
selection: this.hot.selection,
|
733
742
|
controller,
|
734
|
-
cellCoordsFactory: (row, column) => this.
|
743
|
+
cellCoordsFactory: (row, column) => this.hot._createCellCoords(row, column)
|
735
744
|
});
|
736
|
-
this.
|
745
|
+
this.hot.runHooks('afterOnCellMouseDown', event, visualCoords, TD);
|
737
746
|
this.activeWt = this._wt;
|
738
747
|
},
|
739
748
|
onCellContextMenu: (event, coords, TD, wt) => {
|
740
749
|
const visualCoords = this.translateFromRenderableToVisualCoords(coords);
|
741
750
|
this.activeWt = wt;
|
742
|
-
|
743
|
-
if (this.
|
744
|
-
this.
|
751
|
+
_classPrivateFieldSet(this, _mouseDown, false);
|
752
|
+
if (this.hot.selection.isInProgress()) {
|
753
|
+
this.hot.selection.finish();
|
745
754
|
}
|
746
|
-
this.
|
755
|
+
this.hot.runHooks('beforeOnCellContextMenu', event, visualCoords, TD);
|
747
756
|
if (isImmediatePropagationStopped(event)) {
|
748
757
|
return;
|
749
758
|
}
|
750
|
-
this.
|
759
|
+
this.hot.runHooks('afterOnCellContextMenu', event, visualCoords, TD);
|
751
760
|
this.activeWt = this._wt;
|
752
761
|
},
|
753
762
|
onCellMouseOut: (event, coords, TD, wt) => {
|
754
763
|
const visualCoords = this.translateFromRenderableToVisualCoords(coords);
|
755
764
|
this.activeWt = wt;
|
756
|
-
this.
|
765
|
+
this.hot.runHooks('beforeOnCellMouseOut', event, visualCoords, TD);
|
757
766
|
if (isImmediatePropagationStopped(event)) {
|
758
767
|
return;
|
759
768
|
}
|
760
|
-
this.
|
769
|
+
this.hot.runHooks('afterOnCellMouseOut', event, visualCoords, TD);
|
761
770
|
this.activeWt = this._wt;
|
762
771
|
},
|
763
772
|
onCellMouseOver: (event, coords, TD, wt) => {
|
@@ -768,48 +777,48 @@ class TableView {
|
|
768
777
|
cell: false
|
769
778
|
};
|
770
779
|
this.activeWt = wt;
|
771
|
-
this.
|
780
|
+
this.hot.runHooks('beforeOnCellMouseOver', event, visualCoords, TD, controller);
|
772
781
|
if (isImmediatePropagationStopped(event)) {
|
773
782
|
return;
|
774
783
|
}
|
775
|
-
if (
|
784
|
+
if (_classPrivateFieldGet(this, _mouseDown)) {
|
776
785
|
handleMouseEvent(event, {
|
777
786
|
coords: visualCoords,
|
778
|
-
selection: this.
|
787
|
+
selection: this.hot.selection,
|
779
788
|
controller,
|
780
|
-
cellCoordsFactory: (row, column) => this.
|
789
|
+
cellCoordsFactory: (row, column) => this.hot._createCellCoords(row, column)
|
781
790
|
});
|
782
791
|
}
|
783
|
-
this.
|
792
|
+
this.hot.runHooks('afterOnCellMouseOver', event, visualCoords, TD);
|
784
793
|
this.activeWt = this._wt;
|
785
794
|
},
|
786
795
|
onCellMouseUp: (event, coords, TD, wt) => {
|
787
796
|
const visualCoords = this.translateFromRenderableToVisualCoords(coords);
|
788
797
|
this.activeWt = wt;
|
789
|
-
this.
|
798
|
+
this.hot.runHooks('beforeOnCellMouseUp', event, visualCoords, TD);
|
790
799
|
|
791
800
|
// TODO: The second condition check is a workaround. Callback corresponding the method `updateSettings`
|
792
801
|
// disable plugin and enable it again. Disabling plugin closes the menu. Thus, calling the
|
793
802
|
// `updateSettings` in a body of any callback executed right after some context-menu action
|
794
803
|
// breaks the table (#7231).
|
795
|
-
if (isImmediatePropagationStopped(event) || this.
|
804
|
+
if (isImmediatePropagationStopped(event) || this.hot.isDestroyed) {
|
796
805
|
return;
|
797
806
|
}
|
798
|
-
this.
|
807
|
+
this.hot.runHooks('afterOnCellMouseUp', event, visualCoords, TD);
|
799
808
|
this.activeWt = this._wt;
|
800
809
|
},
|
801
810
|
onCellCornerMouseDown: event => {
|
802
811
|
event.preventDefault();
|
803
|
-
this.
|
812
|
+
this.hot.runHooks('afterOnCellCornerMouseDown', event);
|
804
813
|
},
|
805
814
|
onCellCornerDblClick: event => {
|
806
815
|
event.preventDefault();
|
807
|
-
this.
|
816
|
+
this.hot.runHooks('afterOnCellCornerDblClick', event);
|
808
817
|
},
|
809
818
|
beforeDraw: (force, skipRender) => this.beforeRender(force, skipRender),
|
810
819
|
onDraw: force => this.afterRender(force),
|
811
820
|
onBeforeViewportScrollVertically: renderableRow => {
|
812
|
-
const rowMapper = this.
|
821
|
+
const rowMapper = this.hot.rowIndexMapper;
|
813
822
|
const areColumnHeadersSelected = renderableRow < 0;
|
814
823
|
let visualRow = renderableRow;
|
815
824
|
if (!areColumnHeadersSelected) {
|
@@ -820,15 +829,15 @@ class TableView {
|
|
820
829
|
return renderableRow;
|
821
830
|
}
|
822
831
|
}
|
823
|
-
visualRow = this.
|
824
|
-
this.
|
832
|
+
visualRow = this.hot.runHooks('beforeViewportScrollVertically', visualRow);
|
833
|
+
this.hot.runHooks('beforeViewportScroll');
|
825
834
|
if (!areColumnHeadersSelected) {
|
826
835
|
return rowMapper.getRenderableFromVisualIndex(visualRow);
|
827
836
|
}
|
828
837
|
return visualRow;
|
829
838
|
},
|
830
839
|
onBeforeViewportScrollHorizontally: renderableColumn => {
|
831
|
-
const columnMapper = this.
|
840
|
+
const columnMapper = this.hot.columnIndexMapper;
|
832
841
|
const areRowHeadersSelected = renderableColumn < 0;
|
833
842
|
let visualColumn = renderableColumn;
|
834
843
|
if (!areRowHeadersSelected) {
|
@@ -839,43 +848,43 @@ class TableView {
|
|
839
848
|
return renderableColumn;
|
840
849
|
}
|
841
850
|
}
|
842
|
-
visualColumn = this.
|
843
|
-
this.
|
851
|
+
visualColumn = this.hot.runHooks('beforeViewportScrollHorizontally', visualColumn);
|
852
|
+
this.hot.runHooks('beforeViewportScroll');
|
844
853
|
if (!areRowHeadersSelected) {
|
845
854
|
return columnMapper.getRenderableFromVisualIndex(visualColumn);
|
846
855
|
}
|
847
856
|
return visualColumn;
|
848
857
|
},
|
849
858
|
onScrollVertically: () => {
|
850
|
-
this.
|
851
|
-
this.
|
859
|
+
this.hot.runHooks('afterScrollVertically');
|
860
|
+
this.hot.runHooks('afterScroll');
|
852
861
|
},
|
853
862
|
onScrollHorizontally: () => {
|
854
|
-
this.
|
855
|
-
this.
|
863
|
+
this.hot.runHooks('afterScrollHorizontally');
|
864
|
+
this.hot.runHooks('afterScroll');
|
856
865
|
},
|
857
|
-
onBeforeRemoveCellClassNames: () => this.
|
866
|
+
onBeforeRemoveCellClassNames: () => this.hot.runHooks('beforeRemoveCellClassNames'),
|
858
867
|
onBeforeHighlightingRowHeader: (renderableRow, headerLevel, highlightMeta) => {
|
859
|
-
const rowMapper = this.
|
868
|
+
const rowMapper = this.hot.rowIndexMapper;
|
860
869
|
const areColumnHeadersSelected = renderableRow < 0;
|
861
870
|
let visualRow = renderableRow;
|
862
871
|
if (!areColumnHeadersSelected) {
|
863
872
|
visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);
|
864
873
|
}
|
865
|
-
const newVisualRow = this.
|
874
|
+
const newVisualRow = this.hot.runHooks('beforeHighlightingRowHeader', visualRow, headerLevel, highlightMeta);
|
866
875
|
if (!areColumnHeadersSelected) {
|
867
876
|
return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));
|
868
877
|
}
|
869
878
|
return newVisualRow;
|
870
879
|
},
|
871
880
|
onBeforeHighlightingColumnHeader: (renderableColumn, headerLevel, highlightMeta) => {
|
872
|
-
const columnMapper = this.
|
881
|
+
const columnMapper = this.hot.columnIndexMapper;
|
873
882
|
const areRowHeadersSelected = renderableColumn < 0;
|
874
883
|
let visualColumn = renderableColumn;
|
875
884
|
if (!areRowHeadersSelected) {
|
876
885
|
visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);
|
877
886
|
}
|
878
|
-
const newVisualColumn = this.
|
887
|
+
const newVisualColumn = this.hot.runHooks('beforeHighlightingColumnHeader', visualColumn, headerLevel, highlightMeta);
|
879
888
|
if (!areRowHeadersSelected) {
|
880
889
|
return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));
|
881
890
|
}
|
@@ -884,34 +893,34 @@ class TableView {
|
|
884
893
|
onAfterDrawSelection: (currentRow, currentColumn, layerLevel) => {
|
885
894
|
let cornersOfSelection;
|
886
895
|
const [visualRowIndex, visualColumnIndex] = this.translateFromRenderableToVisualIndex(currentRow, currentColumn);
|
887
|
-
const selectedRange = this.
|
896
|
+
const selectedRange = this.hot.selection.getSelectedRange();
|
888
897
|
const selectionRangeSize = selectedRange.size();
|
889
898
|
if (selectionRangeSize > 0) {
|
890
899
|
const selectionForLayer = selectedRange.peekByIndex(layerLevel !== null && layerLevel !== void 0 ? layerLevel : 0);
|
891
900
|
cornersOfSelection = [selectionForLayer.from.row, selectionForLayer.from.col, selectionForLayer.to.row, selectionForLayer.to.col];
|
892
901
|
}
|
893
|
-
return this.
|
902
|
+
return this.hot.runHooks('afterDrawSelection', visualRowIndex, visualColumnIndex, cornersOfSelection, layerLevel);
|
894
903
|
},
|
895
904
|
onBeforeDrawBorders: (corners, borderClassName) => {
|
896
905
|
const [startRenderableRow, startRenderableColumn, endRenderableRow, endRenderableColumn] = corners;
|
897
|
-
const visualCorners = [this.
|
898
|
-
return this.
|
906
|
+
const visualCorners = [this.hot.rowIndexMapper.getVisualFromRenderableIndex(startRenderableRow), this.hot.columnIndexMapper.getVisualFromRenderableIndex(startRenderableColumn), this.hot.rowIndexMapper.getVisualFromRenderableIndex(endRenderableRow), this.hot.columnIndexMapper.getVisualFromRenderableIndex(endRenderableColumn)];
|
907
|
+
return this.hot.runHooks('beforeDrawBorders', visualCorners, borderClassName);
|
899
908
|
},
|
900
|
-
onBeforeTouchScroll: () => this.
|
901
|
-
onAfterMomentumScroll: () => this.
|
909
|
+
onBeforeTouchScroll: () => this.hot.runHooks('beforeTouchScroll'),
|
910
|
+
onAfterMomentumScroll: () => this.hot.runHooks('afterMomentumScroll'),
|
902
911
|
onBeforeStretchingColumnWidth: (stretchedWidth, renderedColumnIndex) => {
|
903
|
-
const visualColumnIndex = this.
|
904
|
-
return this.
|
912
|
+
const visualColumnIndex = this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
|
913
|
+
return this.hot.runHooks('beforeStretchingColumnWidth', stretchedWidth, visualColumnIndex);
|
905
914
|
},
|
906
|
-
onModifyRowHeaderWidth: rowHeaderWidth => this.
|
915
|
+
onModifyRowHeaderWidth: rowHeaderWidth => this.hot.runHooks('modifyRowHeaderWidth', rowHeaderWidth),
|
907
916
|
onModifyGetCellCoords: (renderableRowIndex, renderableColumnIndex, topmost) => {
|
908
|
-
const rowMapper = this.
|
909
|
-
const columnMapper = this.
|
917
|
+
const rowMapper = this.hot.rowIndexMapper;
|
918
|
+
const columnMapper = this.hot.columnIndexMapper;
|
910
919
|
|
911
920
|
// Callback handle also headers. We shouldn't translate them.
|
912
921
|
const visualColumnIndex = renderableColumnIndex >= 0 ? columnMapper.getVisualFromRenderableIndex(renderableColumnIndex) : renderableColumnIndex;
|
913
922
|
const visualRowIndex = renderableRowIndex >= 0 ? rowMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;
|
914
|
-
const visualIndexes = this.
|
923
|
+
const visualIndexes = this.hot.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex, topmost);
|
915
924
|
if (Array.isArray(visualIndexes)) {
|
916
925
|
const [visualRowFrom, visualColumnFrom, visualRowTo, visualColumnTo] = visualIndexes;
|
917
926
|
|
@@ -937,7 +946,7 @@ class TableView {
|
|
937
946
|
calc.endRow = Math.min(lastRenderedRow + offset, renderableRows - 1);
|
938
947
|
}
|
939
948
|
}
|
940
|
-
this.
|
949
|
+
this.hot.runHooks('afterViewportRowCalculatorOverride', calc);
|
941
950
|
},
|
942
951
|
viewportColumnCalculatorOverride: calc => {
|
943
952
|
let viewportOffset = this.settings.viewportColumnRenderingOffset;
|
@@ -958,15 +967,15 @@ class TableView {
|
|
958
967
|
calc.endColumn = Math.min(lastRenderedColumn + offset, renderableColumns - 1);
|
959
968
|
}
|
960
969
|
}
|
961
|
-
this.
|
970
|
+
this.hot.runHooks('afterViewportColumnCalculatorOverride', calc);
|
962
971
|
},
|
963
972
|
rowHeaderWidth: () => this.settings.rowHeaderWidth,
|
964
973
|
columnHeaderHeight: () => {
|
965
|
-
const columnHeaderHeight = this.
|
974
|
+
const columnHeaderHeight = this.hot.runHooks('modifyColumnHeaderHeight');
|
966
975
|
return this.settings.columnHeaderHeight || columnHeaderHeight;
|
967
976
|
}
|
968
977
|
};
|
969
|
-
this.
|
978
|
+
this.hot.runHooks('beforeInitWalkontable', walkontableConfig);
|
970
979
|
this._wt = new Walkontable(walkontableConfig);
|
971
980
|
this.activeWt = this._wt;
|
972
981
|
const spreader = this._wt.wtTable.spreader;
|
@@ -974,7 +983,7 @@ class TableView {
|
|
974
983
|
const {
|
975
984
|
width,
|
976
985
|
height
|
977
|
-
} = this.
|
986
|
+
} = this.hot.rootElement.getBoundingClientRect();
|
978
987
|
this.setLastSize(width, height);
|
979
988
|
this.eventManager.addEventListener(spreader, 'mousedown', event => {
|
980
989
|
// right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar
|
@@ -988,10 +997,10 @@ class TableView {
|
|
988
997
|
event.stopPropagation();
|
989
998
|
}
|
990
999
|
});
|
991
|
-
this.eventManager.addEventListener(this.
|
1000
|
+
this.eventManager.addEventListener(this.hot.rootDocument.documentElement, 'click', () => {
|
992
1001
|
if (this.settings.observeDOMVisibility) {
|
993
1002
|
if (this._wt.drawInterrupted) {
|
994
|
-
this.
|
1003
|
+
this.hot.forceFullRender = true;
|
995
1004
|
this.render();
|
996
1005
|
}
|
997
1006
|
}
|
@@ -1009,7 +1018,7 @@ class TableView {
|
|
1009
1018
|
if (isInput(el)) {
|
1010
1019
|
return true;
|
1011
1020
|
}
|
1012
|
-
const isChildOfTableBody = isChildOf(el, this.
|
1021
|
+
const isChildOfTableBody = isChildOf(el, this.hot.view._wt.wtTable.spreader);
|
1013
1022
|
if (this.settings.fragmentSelection === true && isChildOfTableBody) {
|
1014
1023
|
return true;
|
1015
1024
|
}
|
@@ -1029,7 +1038,7 @@ class TableView {
|
|
1029
1038
|
* @returns {boolean}
|
1030
1039
|
*/
|
1031
1040
|
isMouseDown() {
|
1032
|
-
return
|
1041
|
+
return _classPrivateFieldGet(this, _mouseDown);
|
1033
1042
|
}
|
1034
1043
|
|
1035
1044
|
/**
|
@@ -1039,8 +1048,8 @@ class TableView {
|
|
1039
1048
|
* @returns {boolean}
|
1040
1049
|
*/
|
1041
1050
|
isSelectedOnlyCell() {
|
1042
|
-
var _this$
|
1043
|
-
return (_this$
|
1051
|
+
var _this$hot$getSelected, _this$hot$getSelected2;
|
1052
|
+
return (_this$hot$getSelected = (_this$hot$getSelected2 = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected2 === void 0 ? void 0 : _this$hot$getSelected2.isSingleCell()) !== null && _this$hot$getSelected !== void 0 ? _this$hot$getSelected : false;
|
1044
1053
|
}
|
1045
1054
|
|
1046
1055
|
/**
|
@@ -1050,7 +1059,7 @@ class TableView {
|
|
1050
1059
|
* @returns {boolean}
|
1051
1060
|
*/
|
1052
1061
|
isCellEdited() {
|
1053
|
-
const activeEditor = this.
|
1062
|
+
const activeEditor = this.hot.getActiveEditor();
|
1054
1063
|
return activeEditor && activeEditor.isOpened();
|
1055
1064
|
}
|
1056
1065
|
|
@@ -1065,8 +1074,8 @@ class TableView {
|
|
1065
1074
|
*/
|
1066
1075
|
beforeRender(force, skipRender) {
|
1067
1076
|
if (force) {
|
1068
|
-
// this.
|
1069
|
-
this.
|
1077
|
+
// this.hot.forceFullRender = did Handsontable request full render?
|
1078
|
+
this.hot.runHooks('beforeViewRender', this.hot.forceFullRender, skipRender);
|
1070
1079
|
}
|
1071
1080
|
}
|
1072
1081
|
|
@@ -1079,8 +1088,8 @@ class TableView {
|
|
1079
1088
|
*/
|
1080
1089
|
afterRender(force) {
|
1081
1090
|
if (force) {
|
1082
|
-
// this.
|
1083
|
-
this.
|
1091
|
+
// this.hot.forceFullRender = did Handsontable request full render?
|
1092
|
+
this.hot.runHooks('afterViewRender', this.hot.forceFullRender);
|
1084
1093
|
}
|
1085
1094
|
}
|
1086
1095
|
|
@@ -1099,12 +1108,12 @@ class TableView {
|
|
1099
1108
|
this.appendRowHeader(visualRowIndex, TH);
|
1100
1109
|
return;
|
1101
1110
|
}
|
1102
|
-
this.updateCellHeader(container.querySelector('.rowHeader'), visualRowIndex, this.
|
1111
|
+
this.updateCellHeader(container.querySelector('.rowHeader'), visualRowIndex, this.hot.getRowHeader);
|
1103
1112
|
} else {
|
1104
1113
|
const {
|
1105
1114
|
rootDocument,
|
1106
1115
|
getRowHeader
|
1107
|
-
} = this.
|
1116
|
+
} = this.hot;
|
1108
1117
|
const div = rootDocument.createElement('div');
|
1109
1118
|
const span = rootDocument.createElement('span');
|
1110
1119
|
div.className = 'relative';
|
@@ -1113,7 +1122,7 @@ class TableView {
|
|
1113
1122
|
div.appendChild(span);
|
1114
1123
|
TH.appendChild(div);
|
1115
1124
|
}
|
1116
|
-
this.
|
1125
|
+
this.hot.runHooks('afterGetRowHeader', visualRowIndex, TH);
|
1117
1126
|
}
|
1118
1127
|
|
1119
1128
|
/**
|
@@ -1127,7 +1136,7 @@ class TableView {
|
|
1127
1136
|
* values counting from 0 to N).
|
1128
1137
|
*/
|
1129
1138
|
appendColHeader(visualColumnIndex, TH) {
|
1130
|
-
let label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.
|
1139
|
+
let label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hot.getColHeader;
|
1131
1140
|
let headerLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
1132
1141
|
if (TH.firstChild) {
|
1133
1142
|
const container = TH.firstChild;
|
@@ -1140,7 +1149,7 @@ class TableView {
|
|
1140
1149
|
} else {
|
1141
1150
|
const {
|
1142
1151
|
rootDocument
|
1143
|
-
} = this.
|
1152
|
+
} = this.hot;
|
1144
1153
|
const div = rootDocument.createElement('div');
|
1145
1154
|
const span = rootDocument.createElement('span');
|
1146
1155
|
div.className = 'relative';
|
@@ -1149,7 +1158,7 @@ class TableView {
|
|
1149
1158
|
div.appendChild(span);
|
1150
1159
|
TH.appendChild(div);
|
1151
1160
|
}
|
1152
|
-
this.
|
1161
|
+
this.hot.runHooks('afterGetColHeader', visualColumnIndex, TH, headerLevel);
|
1153
1162
|
}
|
1154
1163
|
|
1155
1164
|
/**
|
@@ -1219,8 +1228,8 @@ class TableView {
|
|
1219
1228
|
* @param {number} height The table height.
|
1220
1229
|
*/
|
1221
1230
|
setLastSize(width, height) {
|
1222
|
-
|
1223
|
-
|
1231
|
+
_classPrivateFieldSet(this, _lastWidth, width);
|
1232
|
+
_classPrivateFieldSet(this, _lastHeight, height);
|
1224
1233
|
}
|
1225
1234
|
|
1226
1235
|
/**
|
@@ -1229,10 +1238,9 @@ class TableView {
|
|
1229
1238
|
* @returns {object}
|
1230
1239
|
*/
|
1231
1240
|
getLastSize() {
|
1232
|
-
const priv = privatePool.get(this);
|
1233
1241
|
return {
|
1234
|
-
width:
|
1235
|
-
height:
|
1242
|
+
width: _classPrivateFieldGet(this, _lastWidth),
|
1243
|
+
height: _classPrivateFieldGet(this, _lastHeight)
|
1236
1244
|
};
|
1237
1245
|
}
|
1238
1246
|
|
@@ -1242,7 +1250,7 @@ class TableView {
|
|
1242
1250
|
* @returns {number}
|
1243
1251
|
*/
|
1244
1252
|
getFirstFullyVisibleRow() {
|
1245
|
-
return this.
|
1253
|
+
return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleRow());
|
1246
1254
|
}
|
1247
1255
|
|
1248
1256
|
/**
|
@@ -1251,7 +1259,7 @@ class TableView {
|
|
1251
1259
|
* @returns {number}
|
1252
1260
|
*/
|
1253
1261
|
getLastFullyVisibleRow() {
|
1254
|
-
return this.
|
1262
|
+
return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleRow());
|
1255
1263
|
}
|
1256
1264
|
|
1257
1265
|
/**
|
@@ -1260,7 +1268,7 @@ class TableView {
|
|
1260
1268
|
* @returns {number}
|
1261
1269
|
*/
|
1262
1270
|
getFirstFullyVisibleColumn() {
|
1263
|
-
return this.
|
1271
|
+
return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleColumn());
|
1264
1272
|
}
|
1265
1273
|
|
1266
1274
|
/**
|
@@ -1269,7 +1277,7 @@ class TableView {
|
|
1269
1277
|
* @returns {number}
|
1270
1278
|
*/
|
1271
1279
|
getLastFullyVisibleColumn() {
|
1272
|
-
return this.
|
1280
|
+
return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleColumn());
|
1273
1281
|
}
|
1274
1282
|
|
1275
1283
|
/**
|