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/dataMap/dataMap.js
CHANGED
@@ -9,6 +9,9 @@ var _object = require("../helpers/object");
|
|
9
9
|
var _array = require("../helpers/array");
|
10
10
|
var _number = require("../helpers/number");
|
11
11
|
var _mixed = require("../helpers/mixed");
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
14
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
12
15
|
/*
|
13
16
|
This class contains open-source contributions covered by the MIT license.
|
14
17
|
|
@@ -55,56 +58,62 @@ class DataMap {
|
|
55
58
|
}
|
56
59
|
|
57
60
|
/**
|
58
|
-
*
|
61
|
+
* Instance of {@link Handsontable}.
|
62
|
+
*
|
63
|
+
* @private
|
64
|
+
* @type {Handsontable}
|
65
|
+
*/
|
66
|
+
|
67
|
+
/**
|
68
|
+
* @param {object} hotInstance Instance of Handsontable.
|
59
69
|
* @param {Array} data Array of arrays or array of objects containing data.
|
60
70
|
* @param {MetaManager} metaManager The meta manager instance.
|
61
71
|
*/
|
62
|
-
constructor(
|
63
|
-
|
64
|
-
* Instance of {@link Handsontable}.
|
65
|
-
*
|
66
|
-
* @private
|
67
|
-
* @type {Handsontable}
|
68
|
-
*/
|
69
|
-
this.instance = instance;
|
72
|
+
constructor(hotInstance, data, metaManager) {
|
73
|
+
_defineProperty(this, "hot", void 0);
|
70
74
|
/**
|
71
75
|
* Instance of {@link MetaManager}.
|
72
76
|
*
|
73
77
|
* @private
|
74
78
|
* @type {MetaManager}
|
75
79
|
*/
|
76
|
-
this
|
80
|
+
_defineProperty(this, "metaManager", void 0);
|
77
81
|
/**
|
78
82
|
* Instance of {@link TableMeta}.
|
79
83
|
*
|
80
84
|
* @private
|
81
85
|
* @type {TableMeta}
|
82
86
|
*/
|
83
|
-
this
|
87
|
+
_defineProperty(this, "tableMeta", void 0);
|
84
88
|
/**
|
85
89
|
* Reference to the original dataset.
|
86
90
|
*
|
87
91
|
* @type {*}
|
88
92
|
*/
|
89
|
-
this
|
93
|
+
_defineProperty(this, "dataSource", void 0);
|
90
94
|
/**
|
91
95
|
* Generated schema based on the first row from the source data.
|
92
96
|
*
|
93
97
|
* @type {object}
|
94
98
|
*/
|
95
|
-
this
|
99
|
+
_defineProperty(this, "duckSchema", void 0);
|
96
100
|
/**
|
97
101
|
* Cached array of properties to columns.
|
98
102
|
*
|
99
103
|
* @type {Array}
|
100
104
|
*/
|
101
|
-
this
|
105
|
+
_defineProperty(this, "colToPropCache", void 0);
|
102
106
|
/**
|
103
107
|
* Cached map of properties to columns.
|
104
108
|
*
|
105
109
|
* @type {Map}
|
106
110
|
*/
|
107
|
-
this
|
111
|
+
_defineProperty(this, "propToColCache", void 0);
|
112
|
+
this.hot = hotInstance;
|
113
|
+
this.metaManager = metaManager;
|
114
|
+
this.tableMeta = metaManager.getTableMeta();
|
115
|
+
this.dataSource = data;
|
116
|
+
this.duckSchema = this.createDuckSchema();
|
108
117
|
this.createMap();
|
109
118
|
}
|
110
119
|
|
@@ -200,7 +209,7 @@ class DataMap {
|
|
200
209
|
if (Number.isInteger(column) === false) {
|
201
210
|
return column;
|
202
211
|
}
|
203
|
-
const physicalColumn = this.
|
212
|
+
const physicalColumn = this.hot.toPhysicalColumn(column);
|
204
213
|
|
205
214
|
// Out of range, not visible column index.
|
206
215
|
if (physicalColumn === null) {
|
@@ -223,11 +232,11 @@ class DataMap {
|
|
223
232
|
propToCol(prop) {
|
224
233
|
const cachedPhysicalIndex = this.propToColCache.get(prop);
|
225
234
|
if ((0, _mixed.isDefined)(cachedPhysicalIndex)) {
|
226
|
-
return this.
|
235
|
+
return this.hot.toVisualColumn(cachedPhysicalIndex);
|
227
236
|
}
|
228
237
|
|
229
238
|
// Property may be a physical column index.
|
230
|
-
const visualColumn = this.
|
239
|
+
const visualColumn = this.hot.toVisualColumn(prop);
|
231
240
|
if (visualColumn === null) {
|
232
241
|
return prop;
|
233
242
|
}
|
@@ -283,17 +292,17 @@ class DataMap {
|
|
283
292
|
source,
|
284
293
|
mode = 'above'
|
285
294
|
} = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
286
|
-
const sourceRowsCount = this.
|
295
|
+
const sourceRowsCount = this.hot.countSourceRows();
|
287
296
|
let physicalRowIndex = sourceRowsCount;
|
288
297
|
let numberOfCreatedRows = 0;
|
289
298
|
let rowIndex = index;
|
290
299
|
if (typeof rowIndex !== 'number' || rowIndex >= sourceRowsCount) {
|
291
300
|
rowIndex = sourceRowsCount;
|
292
301
|
}
|
293
|
-
if (rowIndex < this.
|
294
|
-
physicalRowIndex = this.
|
302
|
+
if (rowIndex < this.hot.countRows()) {
|
303
|
+
physicalRowIndex = this.hot.toPhysicalRow(rowIndex);
|
295
304
|
}
|
296
|
-
const continueProcess = this.
|
305
|
+
const continueProcess = this.hot.runHooks('beforeCreateRow', rowIndex, amount, source);
|
297
306
|
if (continueProcess === false || physicalRowIndex === null) {
|
298
307
|
return {
|
299
308
|
delta: 0
|
@@ -304,7 +313,7 @@ class DataMap {
|
|
304
313
|
const rowsToAdd = [];
|
305
314
|
while (numberOfCreatedRows < amount && sourceRowsCount + numberOfCreatedRows < maxRows) {
|
306
315
|
let row = null;
|
307
|
-
if (this.
|
316
|
+
if (this.hot.dataType === 'array') {
|
308
317
|
if (this.tableMeta.dataSchema) {
|
309
318
|
// Clone template array
|
310
319
|
row = (0, _object.deepClone)(this.getSchema());
|
@@ -313,7 +322,7 @@ class DataMap {
|
|
313
322
|
/* eslint-disable no-loop-func */
|
314
323
|
(0, _number.rangeEach)(columnCount - 1, () => row.push(null));
|
315
324
|
}
|
316
|
-
} else if (this.
|
325
|
+
} else if (this.hot.dataType === 'function') {
|
317
326
|
row = this.tableMeta.dataSchema(rowIndex + numberOfCreatedRows);
|
318
327
|
} else {
|
319
328
|
row = {};
|
@@ -322,20 +331,20 @@ class DataMap {
|
|
322
331
|
rowsToAdd.push(row);
|
323
332
|
numberOfCreatedRows += 1;
|
324
333
|
}
|
325
|
-
this.
|
334
|
+
this.hot.rowIndexMapper.insertIndexes(rowIndex, numberOfCreatedRows);
|
326
335
|
if (mode === 'below') {
|
327
336
|
physicalRowIndex = Math.min(physicalRowIndex + 1, sourceRowsCount);
|
328
337
|
}
|
329
338
|
this.spliceData(physicalRowIndex, 0, rowsToAdd);
|
330
|
-
const newVisualRowIndex = this.
|
339
|
+
const newVisualRowIndex = this.hot.toVisualRow(physicalRowIndex);
|
331
340
|
|
332
341
|
// In case the created rows are the only ones in the table, the column index mappers need to be rebuilt based on
|
333
342
|
// the number of columns created in the row or the schema.
|
334
|
-
if (this.
|
335
|
-
this.
|
343
|
+
if (this.hot.countSourceRows() === rowsToAdd.length) {
|
344
|
+
this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount());
|
336
345
|
}
|
337
346
|
if (numberOfCreatedRows > 0) {
|
338
|
-
if (index ===
|
347
|
+
if (index === undefined || index === null) {
|
339
348
|
// Creates the meta rows at the end of the rows collection without shifting the cells
|
340
349
|
// that were defined out of the range of the dataset.
|
341
350
|
this.metaManager.createRow(null, numberOfCreatedRows);
|
@@ -343,8 +352,8 @@ class DataMap {
|
|
343
352
|
this.metaManager.createRow(physicalRowIndex, amount);
|
344
353
|
}
|
345
354
|
}
|
346
|
-
this.
|
347
|
-
this.
|
355
|
+
this.hot.runHooks('afterCreateRow', newVisualRowIndex, numberOfCreatedRows, source);
|
356
|
+
this.hot.forceFullRender = true; // used when data was changed
|
348
357
|
|
349
358
|
return {
|
350
359
|
delta: numberOfCreatedRows,
|
@@ -370,28 +379,28 @@ class DataMap {
|
|
370
379
|
source,
|
371
380
|
mode = 'start'
|
372
381
|
} = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
373
|
-
if (!this.
|
382
|
+
if (!this.hot.isColumnModificationAllowed()) {
|
374
383
|
throw new Error('Cannot create new column. When data source in an object, ' + 'you can only have as much columns as defined in first data row, data schema or in the \'columns\' setting.' + 'If you want to be able to add new columns, you have to use array datasource.');
|
375
384
|
}
|
376
385
|
const dataSource = this.dataSource;
|
377
386
|
const maxCols = this.tableMeta.maxCols;
|
378
|
-
const countSourceCols = this.
|
387
|
+
const countSourceCols = this.hot.countSourceCols();
|
379
388
|
let columnIndex = index;
|
380
389
|
if (typeof columnIndex !== 'number' || columnIndex >= countSourceCols) {
|
381
390
|
columnIndex = countSourceCols;
|
382
391
|
}
|
383
|
-
const continueProcess = this.
|
392
|
+
const continueProcess = this.hot.runHooks('beforeCreateCol', columnIndex, amount, source);
|
384
393
|
if (continueProcess === false) {
|
385
394
|
return {
|
386
395
|
delta: 0
|
387
396
|
};
|
388
397
|
}
|
389
398
|
let physicalColumnIndex = countSourceCols;
|
390
|
-
if (columnIndex < this.
|
391
|
-
physicalColumnIndex = this.
|
399
|
+
if (columnIndex < this.hot.countCols()) {
|
400
|
+
physicalColumnIndex = this.hot.toPhysicalColumn(columnIndex);
|
392
401
|
}
|
393
|
-
const numberOfSourceRows = this.
|
394
|
-
let nrOfColumns = this.
|
402
|
+
const numberOfSourceRows = this.hot.countSourceRows();
|
403
|
+
let nrOfColumns = this.hot.countCols();
|
395
404
|
let numberOfCreatedCols = 0;
|
396
405
|
let currentIndex = physicalColumnIndex;
|
397
406
|
if (mode === 'end') {
|
@@ -419,9 +428,9 @@ class DataMap {
|
|
419
428
|
currentIndex += 1;
|
420
429
|
nrOfColumns += 1;
|
421
430
|
}
|
422
|
-
this.
|
431
|
+
this.hot.columnIndexMapper.insertIndexes(columnIndex, numberOfCreatedCols);
|
423
432
|
if (numberOfCreatedCols > 0) {
|
424
|
-
if (index ===
|
433
|
+
if (index === undefined || index === null) {
|
425
434
|
// Creates the meta columns at the end of the columns collection without shifting the cells
|
426
435
|
// that were defined out of the range of the dataset.
|
427
436
|
this.metaManager.createColumn(null, numberOfCreatedCols);
|
@@ -429,9 +438,9 @@ class DataMap {
|
|
429
438
|
this.metaManager.createColumn(startPhysicalIndex, amount);
|
430
439
|
}
|
431
440
|
}
|
432
|
-
const newVisualColumnIndex = this.
|
433
|
-
this.
|
434
|
-
this.
|
441
|
+
const newVisualColumnIndex = this.hot.toVisualColumn(startPhysicalIndex);
|
442
|
+
this.hot.runHooks('afterCreateCol', newVisualColumnIndex, numberOfCreatedCols, source);
|
443
|
+
this.hot.forceFullRender = true; // used when data was changed
|
435
444
|
|
436
445
|
this.refreshDuckSchema();
|
437
446
|
return {
|
@@ -455,11 +464,11 @@ class DataMap {
|
|
455
464
|
let source = arguments.length > 2 ? arguments[2] : undefined;
|
456
465
|
let rowIndex = Number.isInteger(index) ? index : -amount; // -amount = taking indexes from the end.
|
457
466
|
const removedPhysicalIndexes = this.visualRowsToPhysical(rowIndex, amount);
|
458
|
-
const sourceRowsLength = this.
|
467
|
+
const sourceRowsLength = this.hot.countSourceRows();
|
459
468
|
rowIndex = (sourceRowsLength + rowIndex) % sourceRowsLength;
|
460
469
|
|
461
470
|
// It handle also callback from the `NestedRows` plugin. Removing parent node has effect in removing children nodes.
|
462
|
-
const actionWasNotCancelled = this.
|
471
|
+
const actionWasNotCancelled = this.hot.runHooks('beforeRemoveRow', rowIndex, removedPhysicalIndexes.length, removedPhysicalIndexes, source);
|
463
472
|
if (actionWasNotCancelled === false) {
|
464
473
|
return false;
|
465
474
|
}
|
@@ -469,21 +478,21 @@ class DataMap {
|
|
469
478
|
this.filterData(rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes);
|
470
479
|
|
471
480
|
// TODO: Function `removeRow` should validate fully, probably above.
|
472
|
-
if (rowIndex < this.
|
473
|
-
this.
|
481
|
+
if (rowIndex < this.hot.countRows()) {
|
482
|
+
this.hot.rowIndexMapper.removeIndexes(removedPhysicalIndexes);
|
474
483
|
const customDefinedColumns = (0, _mixed.isDefined)(this.tableMeta.columns) || (0, _mixed.isDefined)(this.tableMeta.dataSchema);
|
475
484
|
|
476
485
|
// All rows have been removed. There shouldn't be any columns.
|
477
|
-
if (this.
|
478
|
-
this.
|
486
|
+
if (this.hot.rowIndexMapper.getNotTrimmedIndexesLength() === 0 && customDefinedColumns === false) {
|
487
|
+
this.hot.columnIndexMapper.setIndexesSequence([]);
|
479
488
|
}
|
480
489
|
}
|
481
490
|
const descendingPhysicalRows = removedPhysicalIndexes.slice(0).sort((a, b) => b - a);
|
482
491
|
descendingPhysicalRows.forEach(rowPhysicalIndex => {
|
483
492
|
this.metaManager.removeRow(rowPhysicalIndex, 1);
|
484
493
|
});
|
485
|
-
this.
|
486
|
-
this.
|
494
|
+
this.hot.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);
|
495
|
+
this.hot.forceFullRender = true; // used when data was changed
|
487
496
|
|
488
497
|
return true;
|
489
498
|
}
|
@@ -501,14 +510,14 @@ class DataMap {
|
|
501
510
|
removeCol(index) {
|
502
511
|
let amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
503
512
|
let source = arguments.length > 2 ? arguments[2] : undefined;
|
504
|
-
if (this.
|
513
|
+
if (this.hot.dataType === 'object' || this.tableMeta.columns) {
|
505
514
|
throw new Error('cannot remove column with object data source or columns option specified');
|
506
515
|
}
|
507
516
|
let columnIndex = typeof index !== 'number' ? -amount : index;
|
508
|
-
columnIndex = (this.
|
517
|
+
columnIndex = (this.hot.countCols() + columnIndex) % this.hot.countCols();
|
509
518
|
const removedPhysicalIndexes = this.visualColumnsToPhysical(columnIndex, amount);
|
510
519
|
const descendingPhysicalColumns = removedPhysicalIndexes.slice(0).sort((a, b) => b - a);
|
511
|
-
const actionWasNotCancelled = this.
|
520
|
+
const actionWasNotCancelled = this.hot.runHooks('beforeRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);
|
512
521
|
if (actionWasNotCancelled === false) {
|
513
522
|
return false;
|
514
523
|
}
|
@@ -521,14 +530,14 @@ class DataMap {
|
|
521
530
|
}
|
522
531
|
}
|
523
532
|
if (isTableUniform) {
|
524
|
-
for (let r = 0, rlen = this.
|
533
|
+
for (let r = 0, rlen = this.hot.countSourceRows(); r < rlen; r++) {
|
525
534
|
data[r].splice(removedPhysicalIndexes[0], amount);
|
526
535
|
if (r === 0) {
|
527
536
|
this.metaManager.removeColumn(removedPhysicalIndexes[0], amount);
|
528
537
|
}
|
529
538
|
}
|
530
539
|
} else {
|
531
|
-
for (let r = 0, rlen = this.
|
540
|
+
for (let r = 0, rlen = this.hot.countSourceRows(); r < rlen; r++) {
|
532
541
|
for (let c = 0; c < removedColumnsCount; c++) {
|
533
542
|
data[r].splice(descendingPhysicalColumns[c], 1);
|
534
543
|
if (r === 0) {
|
@@ -539,16 +548,16 @@ class DataMap {
|
|
539
548
|
}
|
540
549
|
|
541
550
|
// TODO: Function `removeCol` should validate fully, probably above.
|
542
|
-
if (columnIndex < this.
|
543
|
-
this.
|
551
|
+
if (columnIndex < this.hot.countCols()) {
|
552
|
+
this.hot.columnIndexMapper.removeIndexes(removedPhysicalIndexes);
|
544
553
|
|
545
554
|
// All columns have been removed. There shouldn't be any rows.
|
546
|
-
if (this.
|
547
|
-
this.
|
555
|
+
if (this.hot.columnIndexMapper.getNotTrimmedIndexesLength() === 0) {
|
556
|
+
this.hot.rowIndexMapper.setIndexesSequence([]);
|
548
557
|
}
|
549
558
|
}
|
550
|
-
this.
|
551
|
-
this.
|
559
|
+
this.hot.runHooks('afterRemoveCol', columnIndex, amount, removedPhysicalIndexes, source);
|
560
|
+
this.hot.forceFullRender = true; // used when data was changed
|
552
561
|
this.refreshDuckSchema();
|
553
562
|
return true;
|
554
563
|
}
|
@@ -563,7 +572,7 @@ class DataMap {
|
|
563
572
|
* @returns {Array} Returns removed portion of columns.
|
564
573
|
*/
|
565
574
|
spliceCol(col, index, amount) {
|
566
|
-
const colData = this.
|
575
|
+
const colData = this.hot.getDataAtCol(col);
|
567
576
|
const removed = colData.slice(index, index + amount);
|
568
577
|
const after = colData.slice(index + amount);
|
569
578
|
for (var _len = arguments.length, elements = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
@@ -576,7 +585,7 @@ class DataMap {
|
|
576
585
|
i += 1;
|
577
586
|
}
|
578
587
|
(0, _array.to2dArray)(elements);
|
579
|
-
this.
|
588
|
+
this.hot.populateFromArray(index, col, elements, null, null, 'spliceCol');
|
580
589
|
return removed;
|
581
590
|
}
|
582
591
|
|
@@ -590,7 +599,7 @@ class DataMap {
|
|
590
599
|
* @returns {Array} Returns removed portion of rows.
|
591
600
|
*/
|
592
601
|
spliceRow(row, index, amount) {
|
593
|
-
const rowData = this.
|
602
|
+
const rowData = this.hot.getSourceDataAtRow(row);
|
594
603
|
const removed = rowData.slice(index, index + amount);
|
595
604
|
const after = rowData.slice(index + amount);
|
596
605
|
for (var _len2 = arguments.length, elements = new Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) {
|
@@ -602,7 +611,7 @@ class DataMap {
|
|
602
611
|
elements.push(null); // add null in place of removed elements
|
603
612
|
i += 1;
|
604
613
|
}
|
605
|
-
this.
|
614
|
+
this.hot.populateFromArray(row, index, [elements], null, null, 'spliceRow');
|
606
615
|
return removed;
|
607
616
|
}
|
608
617
|
|
@@ -614,7 +623,7 @@ class DataMap {
|
|
614
623
|
* @param {Array<object>} elements Row elements to be added.
|
615
624
|
*/
|
616
625
|
spliceData(index, deleteCount, elements) {
|
617
|
-
const continueSplicing = this.
|
626
|
+
const continueSplicing = this.hot.runHooks('beforeDataSplice', index, deleteCount, elements);
|
618
627
|
if (continueSplicing !== false) {
|
619
628
|
const newData = [...this.dataSource.slice(0, index), ...elements, ...this.dataSource.slice(index)];
|
620
629
|
|
@@ -636,7 +645,7 @@ class DataMap {
|
|
636
645
|
*/
|
637
646
|
filterData(index, amount, physicalRows) {
|
638
647
|
// Custom data filtering (run as a consequence of calling the below hook) provide an array containing new data.
|
639
|
-
let data = this.
|
648
|
+
let data = this.hot.runHooks('filterData', index, amount, physicalRows);
|
640
649
|
|
641
650
|
// Hooks by default returns first argument (when there is no callback changing execution result).
|
642
651
|
if (Array.isArray(data) === false) {
|
@@ -654,10 +663,10 @@ class DataMap {
|
|
654
663
|
* @returns {*}
|
655
664
|
*/
|
656
665
|
get(row, prop) {
|
657
|
-
const physicalRow = this.
|
666
|
+
const physicalRow = this.hot.toPhysicalRow(row);
|
658
667
|
let dataRow = this.dataSource[physicalRow];
|
659
668
|
// TODO: To remove, use 'modifyData' hook instead (see below)
|
660
|
-
const modifiedRowData = this.
|
669
|
+
const modifiedRowData = this.hot.runHooks('modifyRowData', physicalRow);
|
661
670
|
dataRow = isNaN(modifiedRowData) ? modifiedRowData : dataRow;
|
662
671
|
//
|
663
672
|
|
@@ -682,9 +691,9 @@ class DataMap {
|
|
682
691
|
} else if (typeof prop === 'function') {
|
683
692
|
value = prop(this.dataSource.slice(physicalRow, physicalRow + 1)[0]);
|
684
693
|
}
|
685
|
-
if (this.
|
694
|
+
if (this.hot.hasHook('modifyData')) {
|
686
695
|
const valueHolder = (0, _object.createObjectPropListener)(value);
|
687
|
-
this.
|
696
|
+
this.hot.runHooks('modifyData', physicalRow, this.propToCol(prop), valueHolder, 'get');
|
688
697
|
if (valueHolder.isTouched()) {
|
689
698
|
value = valueHolder.value;
|
690
699
|
}
|
@@ -700,7 +709,7 @@ class DataMap {
|
|
700
709
|
* @returns {string}
|
701
710
|
*/
|
702
711
|
getCopyable(row, prop) {
|
703
|
-
if (this.
|
712
|
+
if (this.hot.getCellMeta(row, this.propToCol(prop)).copyable) {
|
704
713
|
return this.get(row, prop);
|
705
714
|
}
|
706
715
|
return '';
|
@@ -714,17 +723,17 @@ class DataMap {
|
|
714
723
|
* @param {string} value The value to set.
|
715
724
|
*/
|
716
725
|
set(row, prop, value) {
|
717
|
-
const physicalRow = this.
|
726
|
+
const physicalRow = this.hot.toPhysicalRow(row);
|
718
727
|
let newValue = value;
|
719
728
|
let dataRow = this.dataSource[physicalRow];
|
720
729
|
// TODO: To remove, use 'modifyData' hook instead (see below)
|
721
|
-
const modifiedRowData = this.
|
730
|
+
const modifiedRowData = this.hot.runHooks('modifyRowData', physicalRow);
|
722
731
|
dataRow = isNaN(modifiedRowData) ? modifiedRowData : dataRow;
|
723
732
|
//
|
724
733
|
|
725
|
-
if (this.
|
734
|
+
if (this.hot.hasHook('modifyData')) {
|
726
735
|
const valueHolder = (0, _object.createObjectPropListener)(newValue);
|
727
|
-
this.
|
736
|
+
this.hot.runHooks('modifyData', physicalRow, this.propToCol(prop), valueHolder, 'set');
|
728
737
|
if (valueHolder.isTouched()) {
|
729
738
|
newValue = valueHolder.value;
|
730
739
|
}
|
@@ -762,13 +771,13 @@ class DataMap {
|
|
762
771
|
* @returns {number}
|
763
772
|
*/
|
764
773
|
visualRowsToPhysical(index, amount) {
|
765
|
-
const totalRows = this.
|
774
|
+
const totalRows = this.hot.countSourceRows();
|
766
775
|
const logicRows = [];
|
767
776
|
let physicRow = (totalRows + index) % totalRows;
|
768
777
|
let rowsToRemove = amount;
|
769
778
|
let row;
|
770
779
|
while (physicRow < totalRows && rowsToRemove) {
|
771
|
-
row = this.
|
780
|
+
row = this.hot.toPhysicalRow(physicRow);
|
772
781
|
logicRows.push(row);
|
773
782
|
rowsToRemove -= 1;
|
774
783
|
physicRow += 1;
|
@@ -783,12 +792,12 @@ class DataMap {
|
|
783
792
|
* @returns {Array}
|
784
793
|
*/
|
785
794
|
visualColumnsToPhysical(index, amount) {
|
786
|
-
const totalCols = this.
|
795
|
+
const totalCols = this.hot.countCols();
|
787
796
|
const visualCols = [];
|
788
797
|
let physicalCol = (totalCols + index) % totalCols;
|
789
798
|
let colsToRemove = amount;
|
790
799
|
while (physicalCol < totalCols && colsToRemove) {
|
791
|
-
const col = this.
|
800
|
+
const col = this.hot.toPhysicalColumn(physicalCol);
|
792
801
|
visualCols.push(col);
|
793
802
|
colsToRemove -= 1;
|
794
803
|
physicalCol += 1;
|
@@ -800,8 +809,8 @@ class DataMap {
|
|
800
809
|
* Clears the data array.
|
801
810
|
*/
|
802
811
|
clear() {
|
803
|
-
for (let r = 0; r < this.
|
804
|
-
for (let c = 0; c < this.
|
812
|
+
for (let r = 0; r < this.hot.countSourceRows(); r++) {
|
813
|
+
for (let c = 0; c < this.hot.countCols(); c++) {
|
805
814
|
this.set(r, this.colToProp(c), '');
|
806
815
|
}
|
807
816
|
}
|
@@ -820,7 +829,7 @@ class DataMap {
|
|
820
829
|
} else {
|
821
830
|
maxRows = maxRowsFromSettings || Infinity;
|
822
831
|
}
|
823
|
-
const length = this.
|
832
|
+
const length = this.hot.rowIndexMapper.getNotTrimmedIndexesLength();
|
824
833
|
return Math.min(length, maxRows);
|
825
834
|
}
|
826
835
|
|
@@ -835,10 +844,10 @@ class DataMap {
|
|
835
844
|
col: 0
|
836
845
|
};
|
837
846
|
const end = {
|
838
|
-
row: Math.max(this.
|
839
|
-
col: Math.max(this.
|
847
|
+
row: Math.max(this.hot.countRows() - 1, 0),
|
848
|
+
col: Math.max(this.hot.countCols() - 1, 0)
|
840
849
|
};
|
841
|
-
if (start.row - end.row === 0 && !this.
|
850
|
+
if (start.row - end.row === 0 && !this.hot.countSourceRows()) {
|
842
851
|
return [];
|
843
852
|
}
|
844
853
|
return this.getRange(start, end, DataMap.DESTINATION_RENDERER);
|
@@ -877,7 +886,7 @@ class DataMap {
|
|
877
886
|
for (r = Math.min(start.row, end.row); r <= rlen; r++) {
|
878
887
|
row = [];
|
879
888
|
// We just store indexes for rows without headers.
|
880
|
-
const physicalRow = r >= 0 ? this.
|
889
|
+
const physicalRow = r >= 0 ? this.hot.toPhysicalRow(r) : r;
|
881
890
|
for (c = Math.min(start.col, end.col); c <= clen; c++) {
|
882
891
|
if (physicalRow === null) {
|
883
892
|
break;
|
@@ -917,13 +926,13 @@ class DataMap {
|
|
917
926
|
* Destroy instance.
|
918
927
|
*/
|
919
928
|
destroy() {
|
920
|
-
this.
|
929
|
+
this.hot = null;
|
921
930
|
this.metaManager = null;
|
922
931
|
this.dataSource = null;
|
923
932
|
this.duckSchema = null;
|
924
933
|
this.colToPropCache.length = 0;
|
925
934
|
this.propToColCache.clear();
|
926
|
-
this.propToColCache =
|
935
|
+
this.propToColCache = undefined;
|
927
936
|
}
|
928
937
|
}
|
929
938
|
var _default = DataMap;
|