handsontable 0.0.0-next-3d099da-20231208 → 0.0.0-next-16c18c1-20231212
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/calculator/index.js +11 -6
- package/3rdparty/walkontable/src/calculator/index.mjs +5 -3
- package/3rdparty/walkontable/src/calculator/renderAllColumns.js +50 -0
- package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +46 -0
- package/3rdparty/walkontable/src/calculator/renderAllRows.js +50 -0
- package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +46 -0
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +3 -124
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +4 -126
- package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +4 -5
- package/3rdparty/walkontable/src/cell/coords.js +2 -2
- package/3rdparty/walkontable/src/cell/coords.mjs +2 -2
- package/3rdparty/walkontable/src/cell/range.js +2 -2
- package/3rdparty/walkontable/src/cell/range.mjs +2 -2
- package/3rdparty/walkontable/src/core/_base.js +2 -14
- package/3rdparty/walkontable/src/core/_base.mjs +2 -14
- package/3rdparty/walkontable/src/core/clone.js +2 -2
- package/3rdparty/walkontable/src/core/clone.mjs +2 -2
- package/3rdparty/walkontable/src/core/core.js +0 -2
- package/3rdparty/walkontable/src/core/core.mjs +0 -2
- package/3rdparty/walkontable/src/facade/core.js +0 -9
- package/3rdparty/walkontable/src/facade/core.mjs +0 -9
- package/3rdparty/walkontable/src/filter/column.js +2 -2
- package/3rdparty/walkontable/src/filter/column.mjs +2 -2
- package/3rdparty/walkontable/src/filter/row.js +2 -2
- package/3rdparty/walkontable/src/filter/row.mjs +2 -2
- package/3rdparty/walkontable/src/index.js +3 -4
- package/3rdparty/walkontable/src/index.mjs +1 -2
- package/3rdparty/walkontable/src/overlay/_base.js +2 -2
- package/3rdparty/walkontable/src/overlay/_base.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
- package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/top.js +2 -2
- package/3rdparty/walkontable/src/overlay/top.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +2 -2
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +2 -2
- package/3rdparty/walkontable/src/overlays.js +2 -5
- package/3rdparty/walkontable/src/overlays.mjs +2 -6
- package/3rdparty/walkontable/src/renderer/_base.js +2 -2
- package/3rdparty/walkontable/src/renderer/_base.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/cells.js +2 -2
- package/3rdparty/walkontable/src/renderer/cells.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/colGroup.js +10 -0
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +10 -0
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +2 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/rows.js +6 -5
- package/3rdparty/walkontable/src/renderer/rows.mjs +6 -5
- package/3rdparty/walkontable/src/renderer/table.js +2 -2
- package/3rdparty/walkontable/src/renderer/table.mjs +2 -2
- package/3rdparty/walkontable/src/scroll.js +2 -2
- package/3rdparty/walkontable/src/scroll.mjs +2 -2
- package/3rdparty/walkontable/src/selection/manager.js +0 -1
- package/3rdparty/walkontable/src/selection/manager.mjs +0 -1
- package/3rdparty/walkontable/src/settings.js +5 -2
- package/3rdparty/walkontable/src/settings.mjs +4 -2
- package/3rdparty/walkontable/src/table.js +2 -3
- package/3rdparty/walkontable/src/table.mjs +2 -3
- package/3rdparty/walkontable/src/utils/column.js +29 -14
- package/3rdparty/walkontable/src/utils/column.mjs +29 -14
- package/3rdparty/walkontable/src/utils/columnStretching.js +219 -0
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +215 -0
- package/3rdparty/walkontable/src/utils/nodesPool.js +2 -2
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/view.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +2 -2
- package/3rdparty/walkontable/src/utils/row.js +2 -2
- package/3rdparty/walkontable/src/utils/row.mjs +2 -2
- package/3rdparty/walkontable/src/viewport.js +22 -17
- package/3rdparty/walkontable/src/viewport.mjs +23 -18
- package/base.js +4 -2
- package/base.mjs +2 -2
- package/core/focusCatcher/index.js +44 -6
- package/core/focusCatcher/index.mjs +44 -6
- package/core.js +0 -11
- package/core.mjs +0 -11
- package/dataMap/dataMap.js +3 -2
- package/dataMap/dataMap.mjs +2 -2
- package/dataMap/dataSource.js +2 -2
- package/dataMap/dataSource.mjs +2 -2
- package/dataMap/metaManager/lazyFactoryMap.js +2 -2
- package/dataMap/metaManager/lazyFactoryMap.mjs +2 -2
- package/dataMap/metaManager/metaLayers/cellMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -2
- package/dataMap/metaManager/metaLayers/columnMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +2 -2
- package/dataMap/metaManager/metaLayers/globalMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +2 -2
- package/dataMap/metaManager/metaLayers/tableMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +2 -2
- package/dataMap/metaManager/metaSchema.js +28 -2
- package/dataMap/metaManager/metaSchema.mjs +28 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.js +2 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +2 -2
- package/dataMap/metaManager/mods/extendMetaProperties.js +14 -2
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +14 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +3 -3
- package/dist/handsontable.full.js +3991 -5589
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +66 -71
- package/dist/handsontable.js +3070 -4317
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +35 -39
- package/editorManager.js +5 -6
- package/editorManager.mjs +5 -6
- package/editors/autocompleteEditor/autocompleteEditor.js +2 -4
- package/editors/autocompleteEditor/autocompleteEditor.mjs +2 -4
- package/editors/baseEditor/baseEditor.js +2 -2
- package/editors/baseEditor/baseEditor.mjs +2 -2
- package/editors/dateEditor/dateEditor.d.ts +1 -1
- package/editors/dateEditor/dateEditor.js +6 -3
- package/editors/dateEditor/dateEditor.mjs +6 -3
- package/editors/handsontableEditor/handsontableEditor.js +0 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +0 -1
- package/editors/textEditor/textEditor.js +2 -6
- package/editors/textEditor/textEditor.mjs +2 -6
- package/eventManager.js +2 -2
- package/eventManager.mjs +2 -2
- package/helpers/browser.js +5 -2
- package/helpers/browser.mjs +5 -2
- package/helpers/feature.js +10 -0
- package/helpers/feature.mjs +9 -0
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +3 -4
- package/pluginHooks.d.ts +6 -29
- package/pluginHooks.js +67 -125
- package/pluginHooks.mjs +64 -124
- package/plugins/autoColumnSize/autoColumnSize.js +2 -2
- package/plugins/autoColumnSize/autoColumnSize.mjs +2 -2
- package/plugins/autoRowSize/autoRowSize.js +2 -2
- package/plugins/autoRowSize/autoRowSize.mjs +2 -2
- package/plugins/autofill/autofill.js +2 -2
- package/plugins/autofill/autofill.mjs +2 -2
- package/plugins/base/base.js +2 -2
- package/plugins/base/base.mjs +2 -2
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +2 -2
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +2 -2
- package/plugins/collapsibleColumns/collapsibleColumns.js +2 -2
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +2 -2
- package/plugins/columnSorting/columnSorting.js +2 -2
- package/plugins/columnSorting/columnSorting.mjs +2 -2
- package/plugins/columnSorting/columnStatesManager.js +2 -2
- package/plugins/columnSorting/columnStatesManager.mjs +2 -2
- package/plugins/columnSummary/columnSummary.js +2 -2
- package/plugins/columnSummary/columnSummary.mjs +2 -2
- package/plugins/columnSummary/endpoints.js +2 -2
- package/plugins/columnSummary/endpoints.mjs +2 -2
- package/plugins/comments/commentEditor.js +2 -2
- package/plugins/comments/commentEditor.mjs +2 -2
- package/plugins/comments/comments.js +2 -2
- package/plugins/comments/comments.mjs +2 -2
- package/plugins/comments/displaySwitch.js +2 -2
- package/plugins/comments/displaySwitch.mjs +2 -2
- package/plugins/contextMenu/commandExecutor.js +2 -2
- package/plugins/contextMenu/commandExecutor.mjs +2 -2
- package/plugins/contextMenu/contextMenu.js +2 -2
- package/plugins/contextMenu/contextMenu.mjs +2 -2
- package/plugins/contextMenu/itemsFactory.js +2 -2
- package/plugins/contextMenu/itemsFactory.mjs +2 -2
- package/plugins/contextMenu/menu/cursor.js +2 -2
- package/plugins/contextMenu/menu/cursor.mjs +2 -2
- package/plugins/contextMenu/menu/menu.js +2 -2
- package/plugins/contextMenu/menu/menu.mjs +2 -2
- package/plugins/copyPaste/clipboardData.js +18 -0
- package/plugins/copyPaste/clipboardData.mjs +14 -0
- package/plugins/copyPaste/copyPaste.js +131 -53
- package/plugins/copyPaste/copyPaste.mjs +134 -56
- package/plugins/copyPaste/copyableRanges.js +43 -7
- package/plugins/copyPaste/copyableRanges.mjs +42 -7
- package/plugins/copyPaste/pasteEvent.mjs +1 -1
- package/plugins/customBorders/customBorders.js +2 -7
- package/plugins/customBorders/customBorders.mjs +2 -7
- package/plugins/customBorders/utils.js +0 -1
- package/plugins/customBorders/utils.mjs +0 -1
- package/plugins/dragToScroll/dragToScroll.js +2 -2
- package/plugins/dragToScroll/dragToScroll.mjs +2 -2
- package/plugins/dropdownMenu/dropdownMenu.js +2 -2
- package/plugins/dropdownMenu/dropdownMenu.mjs +2 -2
- package/plugins/exportFile/dataProvider.js +2 -2
- package/plugins/exportFile/dataProvider.mjs +2 -2
- package/plugins/exportFile/types/_base.js +2 -2
- package/plugins/exportFile/types/_base.mjs +2 -2
- package/plugins/filters/component/_base.js +2 -2
- package/plugins/filters/component/_base.mjs +2 -2
- package/plugins/filters/component/actionBar.js +2 -2
- package/plugins/filters/component/actionBar.mjs +2 -2
- package/plugins/filters/component/condition.js +2 -2
- package/plugins/filters/component/condition.mjs +2 -2
- package/plugins/filters/component/operators.js +2 -2
- package/plugins/filters/component/operators.mjs +2 -2
- package/plugins/filters/component/value.js +2 -2
- package/plugins/filters/component/value.mjs +2 -2
- package/plugins/filters/conditionCollection.js +2 -2
- package/plugins/filters/conditionCollection.mjs +2 -2
- package/plugins/filters/conditionUpdateObserver.js +2 -2
- package/plugins/filters/conditionUpdateObserver.mjs +2 -2
- package/plugins/filters/dataFilter.js +2 -2
- package/plugins/filters/dataFilter.mjs +2 -2
- package/plugins/filters/filters.js +2 -2
- package/plugins/filters/filters.mjs +2 -2
- package/plugins/filters/ui/_base.js +2 -2
- package/plugins/filters/ui/_base.mjs +2 -2
- package/plugins/filters/ui/radioInput.js +1 -1
- package/plugins/filters/ui/radioInput.mjs +1 -1
- package/plugins/formulas/formulas.js +2 -4
- package/plugins/formulas/formulas.mjs +2 -4
- package/plugins/formulas/indexSyncer/axisSyncer.js +0 -1
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -1
- package/plugins/manualColumnMove/ui/_base.js +2 -2
- package/plugins/manualColumnMove/ui/_base.mjs +2 -2
- package/plugins/manualColumnResize/manualColumnResize.js +0 -1
- package/plugins/manualColumnResize/manualColumnResize.mjs +0 -1
- package/plugins/manualRowMove/ui/_base.js +2 -2
- package/plugins/manualRowMove/ui/_base.mjs +2 -2
- package/plugins/mergeCells/calculations/autofill.js +2 -2
- package/plugins/mergeCells/calculations/autofill.mjs +2 -2
- package/plugins/mergeCells/calculations/selection.js +2 -2
- package/plugins/mergeCells/calculations/selection.mjs +2 -2
- package/plugins/mergeCells/cellCoords.js +2 -2
- package/plugins/mergeCells/cellCoords.mjs +2 -2
- package/plugins/mergeCells/cellsCollection.js +2 -2
- package/plugins/mergeCells/cellsCollection.mjs +2 -2
- package/plugins/mergeCells/mergeCells.js +3 -129
- package/plugins/mergeCells/mergeCells.mjs +3 -129
- package/plugins/multiColumnSorting/multiColumnSorting.js +2 -2
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -2
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +2 -2
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +2 -2
- package/plugins/nestedHeaders/nestedHeaders.js +43 -89
- package/plugins/nestedHeaders/nestedHeaders.mjs +44 -90
- package/plugins/nestedHeaders/stateManager/headersTree.js +0 -1
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +0 -1
- package/plugins/nestedHeaders/utils/ghostTable.js +2 -2
- package/plugins/nestedHeaders/utils/ghostTable.mjs +2 -2
- package/plugins/nestedRows/data/dataManager.js +2 -2
- package/plugins/nestedRows/data/dataManager.mjs +2 -2
- package/plugins/nestedRows/nestedRows.js +2 -2
- package/plugins/nestedRows/nestedRows.mjs +2 -2
- package/plugins/nestedRows/ui/_base.js +2 -2
- package/plugins/nestedRows/ui/_base.mjs +2 -2
- package/plugins/nestedRows/ui/contextMenu.js +2 -2
- package/plugins/nestedRows/ui/contextMenu.mjs +2 -2
- package/plugins/nestedRows/utils/rowMoveController.js +2 -2
- package/plugins/nestedRows/utils/rowMoveController.mjs +2 -2
- package/plugins/persistentState/persistentState.js +2 -2
- package/plugins/persistentState/persistentState.mjs +2 -2
- package/plugins/persistentState/storage.js +2 -2
- package/plugins/persistentState/storage.mjs +2 -2
- package/plugins/search/search.js +2 -2
- package/plugins/search/search.mjs +2 -2
- package/plugins/touchScroll/touchScroll.js +2 -2
- package/plugins/touchScroll/touchScroll.mjs +2 -2
- package/plugins/trimRows/trimRows.js +2 -2
- package/plugins/trimRows/trimRows.mjs +2 -2
- package/plugins/undoRedo/undoRedo.js +0 -2
- package/plugins/undoRedo/undoRedo.mjs +0 -2
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +0 -1
- package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +0 -1
- package/renderers/checkboxRenderer/checkboxRenderer.js +0 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +0 -2
- package/selection/highlight/highlight.js +2 -3
- package/selection/highlight/highlight.mjs +2 -3
- package/selection/highlight/visualSelection.js +2 -2
- package/selection/highlight/visualSelection.mjs +2 -2
- package/selection/index.js +1 -3
- package/selection/index.mjs +2 -2
- package/selection/range.js +2 -2
- package/selection/range.mjs +2 -2
- package/selection/selection.js +2 -2
- package/selection/selection.mjs +2 -2
- package/selection/utils.js +0 -34
- package/selection/utils.mjs +0 -33
- package/settings.d.ts +2 -1
- package/tableView.js +3 -4
- package/tableView.mjs +3 -4
- package/translations/indexMapper.js +4 -3
- package/translations/indexMapper.mjs +2 -2
- package/translations/mapCollections/aggregatedCollection.js +2 -2
- package/translations/mapCollections/aggregatedCollection.mjs +2 -2
- package/translations/mapCollections/mapCollection.js +2 -2
- package/translations/mapCollections/mapCollection.mjs +2 -2
- package/translations/maps/indexMap.js +2 -2
- package/translations/maps/indexMap.mjs +2 -2
- package/translations/maps/linkedPhysicalIndexToValueMap.js +2 -2
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +2 -2
- package/utils/dataStructures/linkedList.js +2 -2
- package/utils/dataStructures/linkedList.mjs +2 -2
- package/utils/dataStructures/tree.js +2 -2
- package/utils/dataStructures/tree.mjs +2 -2
- package/utils/ghostTable.js +2 -2
- package/utils/ghostTable.mjs +2 -2
- package/utils/interval.js +2 -2
- package/utils/interval.mjs +2 -2
- package/utils/parseTable.js +84 -538
- package/utils/parseTable.mjs +83 -534
- package/utils/samplesGenerator.js +2 -2
- package/utils/samplesGenerator.mjs +2 -2
- package/validators/timeValidator/timeValidator.js +0 -1
- package/validators/timeValidator/timeValidator.mjs +0 -1
- package/plugins/copyPaste/clipboardData/clipboardData.js +0 -588
- package/plugins/copyPaste/clipboardData/clipboardData.mjs +0 -584
- package/plugins/copyPaste/clipboardData/copyClipboardData.js +0 -69
- package/plugins/copyPaste/clipboardData/copyClipboardData.mjs +0 -65
- package/plugins/copyPaste/clipboardData/index.js +0 -9
- package/plugins/copyPaste/clipboardData/index.mjs +0 -4
- package/plugins/copyPaste/clipboardData/pasteClipboardData.js +0 -81
- package/plugins/copyPaste/clipboardData/pasteClipboardData.mjs +0 -77
@@ -12,12 +12,11 @@ var _selection = require("../../selection");
|
|
12
12
|
var _base = require("../base");
|
13
13
|
var _stateManager2 = _interopRequireDefault(require("./stateManager"));
|
14
14
|
var _ghostTable = _interopRequireDefault(require("./utils/ghostTable"));
|
15
|
-
var _array = require("../../helpers/array");
|
16
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
16
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
18
17
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
19
|
-
function _toPropertyKey(
|
20
|
-
function _toPrimitive(
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
19
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
21
20
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
22
21
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
23
22
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
@@ -102,7 +101,6 @@ class NestedHeaders extends _base.BasePlugin {
|
|
102
101
|
/**
|
103
102
|
* Updates the plugin state after new dataset load.
|
104
103
|
*
|
105
|
-
* @private
|
106
104
|
* @param {Array[]} sourceData Array of arrays or array of objects containing data.
|
107
105
|
* @param {boolean} initialLoad Flag that determines whether the data has been loaded
|
108
106
|
* during the initialization.
|
@@ -110,14 +108,11 @@ class NestedHeaders extends _base.BasePlugin {
|
|
110
108
|
_classPrivateMethodInitSpec(this, _onAfterLoadData);
|
111
109
|
/**
|
112
110
|
* Updates the plugin state after HoT initialization.
|
113
|
-
*
|
114
|
-
* @private
|
115
111
|
*/
|
116
112
|
_classPrivateMethodInitSpec(this, _onInit);
|
117
113
|
/**
|
118
114
|
* `modifyFocusedElement` hook callback.
|
119
115
|
*
|
120
|
-
* @private
|
121
116
|
* @param {number} row Row index.
|
122
117
|
* @param {number} column Column index.
|
123
118
|
* @returns {HTMLTableCellElement} The `TH` element to be focused.
|
@@ -127,7 +122,6 @@ class NestedHeaders extends _base.BasePlugin {
|
|
127
122
|
* Listens the `modifyColumnHeaderValue` hook that overwrites the column headers values based on
|
128
123
|
* the internal state and settings of the plugin.
|
129
124
|
*
|
130
|
-
* @private
|
131
125
|
* @param {string} value The column header value.
|
132
126
|
* @param {number} visualColumnIndex The visual column index.
|
133
127
|
* @param {number} headerLevel The index of header level. The header level accepts positive (0 to N)
|
@@ -140,7 +134,6 @@ class NestedHeaders extends _base.BasePlugin {
|
|
140
134
|
/**
|
141
135
|
* `modifyColWidth` hook callback - returns width from cache, when is greater than incoming from hook.
|
142
136
|
*
|
143
|
-
* @private
|
144
137
|
* @param {number} width Width from hook.
|
145
138
|
* @param {number} column Visual index of an column.
|
146
139
|
* @returns {number}
|
@@ -149,14 +142,12 @@ class NestedHeaders extends _base.BasePlugin {
|
|
149
142
|
/**
|
150
143
|
* Make the renderer render the first nested column in its entirety.
|
151
144
|
*
|
152
|
-
* @private
|
153
145
|
* @param {object} calc Viewport column calculator.
|
154
146
|
*/
|
155
147
|
_classPrivateMethodInitSpec(this, _onAfterViewportColumnCalculatorOverride);
|
156
148
|
/**
|
157
149
|
* `afterGetColumnHeader` hook callback - prepares the header structure.
|
158
150
|
*
|
159
|
-
* @private
|
160
151
|
* @param {Array} renderersArray Array of renderers.
|
161
152
|
*/
|
162
153
|
_classPrivateMethodInitSpec(this, _onAfterGetColumnHeaderRenderers);
|
@@ -164,7 +155,6 @@ class NestedHeaders extends _base.BasePlugin {
|
|
164
155
|
* The hook observes the column selection from the Selection API and modifies the column range to
|
165
156
|
* ensure that the whole nested column will be covered.
|
166
157
|
*
|
167
|
-
* @private
|
168
158
|
* @param {CellCoords} from The coords object where the selection starts.
|
169
159
|
* @param {CellCoords} to The coords object where the selection ends.
|
170
160
|
*/
|
@@ -172,27 +162,21 @@ class NestedHeaders extends _base.BasePlugin {
|
|
172
162
|
/**
|
173
163
|
* `modifyTransformStart` hook is called every time the keyboard navigation is used.
|
174
164
|
*
|
175
|
-
* @private
|
176
165
|
* @param {object} delta The transformation delta.
|
177
166
|
*/
|
178
167
|
_classPrivateMethodInitSpec(this, _onModifyTransformStart);
|
179
168
|
/**
|
180
169
|
* The hook checks and ensures that the focus position that depends on the selected columns
|
181
170
|
* range is always positioned within the range.
|
182
|
-
*
|
183
|
-
* @private
|
184
171
|
*/
|
185
172
|
_classPrivateMethodInitSpec(this, _onBeforeSelectionHighlightSet);
|
186
173
|
/**
|
187
174
|
* Switches internal flag about selection progress to `false`.
|
188
|
-
*
|
189
|
-
* @private
|
190
175
|
*/
|
191
176
|
_classPrivateMethodInitSpec(this, _onBeforeOnCellMouseUp);
|
192
177
|
/**
|
193
178
|
* Makes the header-selection properly select the nested headers.
|
194
179
|
*
|
195
|
-
* @private
|
196
180
|
* @param {MouseEvent} event Mouse event.
|
197
181
|
* @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
|
198
182
|
* @param {HTMLElement} TD The cell element.
|
@@ -203,7 +187,6 @@ class NestedHeaders extends _base.BasePlugin {
|
|
203
187
|
/**
|
204
188
|
* Allows to control how the column selection based on the coordinates and the nested headers is made.
|
205
189
|
*
|
206
|
-
* @private
|
207
190
|
* @param {MouseEvent} event Mouse event.
|
208
191
|
* @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
|
209
192
|
*/
|
@@ -211,7 +194,6 @@ class NestedHeaders extends _base.BasePlugin {
|
|
211
194
|
/**
|
212
195
|
* Allows blocking the column selection that is controlled by the core Selection module.
|
213
196
|
*
|
214
|
-
* @private
|
215
197
|
* @param {MouseEvent} event Mouse event.
|
216
198
|
* @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
|
217
199
|
* @param {CellCoords} TD The table cell or header element.
|
@@ -225,23 +207,16 @@ class NestedHeaders extends _base.BasePlugin {
|
|
225
207
|
* of the column.
|
226
208
|
*
|
227
209
|
* @private
|
228
|
-
* @param {
|
229
|
-
* @param {
|
230
|
-
*
|
231
|
-
* @param {
|
232
|
-
*
|
233
|
-
* @param {Function} clipboardData.setCellAt Change headers or cells in the copied/pasted dataset.
|
234
|
-
* @param {Function} clipboardData.getCellAt Get headers or cells from the copied/pasted dataset.
|
235
|
-
* @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
|
236
|
-
* @param {Function} clipboardData.getMetaInfo Gets grid settings for copied data.
|
237
|
-
* @param {Function} clipboardData.setMetaInfo Sets grid settings for copied data.
|
238
|
-
* @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
|
210
|
+
* @param {Array[]} data An array of arrays which contains data to copied.
|
211
|
+
* @param {object[]} copyableRanges An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
|
212
|
+
* which will copied.
|
213
|
+
* @param {{ columnHeadersCount: number }} copiedHeadersCount An object with keys that holds information with
|
214
|
+
* the number of copied headers.
|
239
215
|
*/
|
240
216
|
_classPrivateMethodInitSpec(this, _onBeforeCopy);
|
241
217
|
/**
|
242
218
|
* Allows to control which header DOM element will be used to highlight.
|
243
219
|
*
|
244
|
-
* @private
|
245
220
|
* @param {number} visualColumn A visual column index of the highlighted row header.
|
246
221
|
* @param {number} headerLevel A row header level that is currently highlighted.
|
247
222
|
* @param {object} highlightMeta An object with meta data that describes the highlight state.
|
@@ -253,7 +228,6 @@ class NestedHeaders extends _base.BasePlugin {
|
|
253
228
|
* is scrolled to the correct column for the nested header the most left and the most right visual column
|
254
229
|
* indexes are used.
|
255
230
|
*
|
256
|
-
* @private
|
257
231
|
* @param {number} visualColumn A visual column index to which the viewport will be scrolled.
|
258
232
|
* @returns {number}
|
259
233
|
*/
|
@@ -261,8 +235,6 @@ class NestedHeaders extends _base.BasePlugin {
|
|
261
235
|
/**
|
262
236
|
* Updates the selection focus highlight position to point to the nested header root element (TH)
|
263
237
|
* even when the logical coordinates point in-between the header.
|
264
|
-
*
|
265
|
-
* @private
|
266
238
|
*/
|
267
239
|
_classPrivateMethodInitSpec(this, _updateFocusHighlightPosition);
|
268
240
|
/**
|
@@ -754,60 +726,42 @@ function _onBeforeHighlightingColumnHeader2(visualColumn, headerLevel, highlight
|
|
754
726
|
}
|
755
727
|
return visualColumn;
|
756
728
|
}
|
757
|
-
function _onBeforeCopy2(
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
const
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
});
|
790
|
-
} else {
|
791
|
-
headersForLevel.push(label);
|
729
|
+
function _onBeforeCopy2(data, copyableRanges, _ref2) {
|
730
|
+
let {
|
731
|
+
columnHeadersCount
|
732
|
+
} = _ref2;
|
733
|
+
if (columnHeadersCount === 0) {
|
734
|
+
return;
|
735
|
+
}
|
736
|
+
for (let rangeIndex = 0; rangeIndex < copyableRanges.length; rangeIndex++) {
|
737
|
+
const {
|
738
|
+
startRow,
|
739
|
+
startCol,
|
740
|
+
endRow,
|
741
|
+
endCol
|
742
|
+
} = copyableRanges[rangeIndex];
|
743
|
+
const rowsCount = endRow - startRow + 1;
|
744
|
+
const columnsCount = startCol - endCol + 1;
|
745
|
+
|
746
|
+
// do not process dataset ranges and column headers where only one column is copied
|
747
|
+
if (startRow >= 0 || columnsCount === 1) {
|
748
|
+
break;
|
749
|
+
}
|
750
|
+
for (let column = startCol; column <= endCol; column++) {
|
751
|
+
for (let row = startRow; row <= endRow; row++) {
|
752
|
+
var _classPrivateFieldGet4;
|
753
|
+
const zeroBasedColumnHeaderLevel = rowsCount + row;
|
754
|
+
const zeroBasedColumnIndex = column - startCol;
|
755
|
+
if (zeroBasedColumnIndex === 0) {
|
756
|
+
continue; // eslint-disable-line no-continue
|
757
|
+
}
|
758
|
+
const isRoot = (_classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(row, column)) === null || _classPrivateFieldGet4 === void 0 ? void 0 : _classPrivateFieldGet4.isRoot;
|
759
|
+
if (isRoot === false) {
|
760
|
+
data[zeroBasedColumnHeaderLevel][zeroBasedColumnIndex] = '';
|
792
761
|
}
|
793
|
-
} else if (isPlaceholder === false) {
|
794
|
-
const {
|
795
|
-
label,
|
796
|
-
origColspan: colspan,
|
797
|
-
columnIndex
|
798
|
-
} = headerTreeNodeData;
|
799
|
-
const columnFromStart = column - columnIndex;
|
800
|
-
const reducedColspan = Math.min(colspan - columnFromStart, columnsToEnd);
|
801
|
-
headersForLevel.push(reducedColspan > 1 ? {
|
802
|
-
label,
|
803
|
-
colspan: reducedColspan
|
804
|
-
} : label);
|
805
762
|
}
|
806
|
-
}
|
807
|
-
|
808
|
-
});
|
809
|
-
clipboardData.setMetaInfo('colHeaders', null);
|
810
|
-
clipboardData.setMetaInfo('nestedHeaders', nestedHeaders);
|
763
|
+
}
|
764
|
+
}
|
811
765
|
}
|
812
766
|
function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
|
813
767
|
const headerNodeData = this._getHeaderTreeNodeDataByCoords(coords);
|
@@ -1010,10 +964,10 @@ function _onModifyColWidth2(width, column) {
|
|
1010
964
|
return width > cachedWidth ? width : cachedWidth;
|
1011
965
|
}
|
1012
966
|
function _onModifyColumnHeaderValue2(value, visualColumnIndex, headerLevel) {
|
1013
|
-
var
|
967
|
+
var _classPrivateFieldGet5;
|
1014
968
|
const {
|
1015
969
|
label
|
1016
|
-
} = (
|
970
|
+
} = (_classPrivateFieldGet5 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet5 !== void 0 ? _classPrivateFieldGet5 : {
|
1017
971
|
label: ''
|
1018
972
|
};
|
1019
973
|
return label;
|
@@ -2,8 +2,8 @@ import "core-js/modules/es.array.push.js";
|
|
2
2
|
import "core-js/modules/es.error.cause.js";
|
3
3
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
4
4
|
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; }
|
5
|
-
function _toPropertyKey(
|
6
|
-
function _toPrimitive(
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
7
7
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
8
8
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
9
9
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
@@ -17,11 +17,10 @@ import { isNumeric, clamp } from "../../helpers/number.mjs";
|
|
17
17
|
import { toSingleLine } from "../../helpers/templateLiteralTag.mjs";
|
18
18
|
import { isLeftClick, isRightClick } from "../../helpers/dom/event.mjs";
|
19
19
|
import { warn } from "../../helpers/console.mjs";
|
20
|
-
import { ACTIVE_HEADER_TYPE, HEADER_TYPE
|
20
|
+
import { ACTIVE_HEADER_TYPE, HEADER_TYPE } from "../../selection/index.mjs";
|
21
21
|
import { BasePlugin } from "../base/index.mjs";
|
22
22
|
import StateManager from "./stateManager/index.mjs";
|
23
23
|
import GhostTable from "./utils/ghostTable.mjs";
|
24
|
-
import { arrayEach } from "../../helpers/array.mjs";
|
25
24
|
export const PLUGIN_KEY = 'nestedHeaders';
|
26
25
|
export const PLUGIN_PRIORITY = 280;
|
27
26
|
|
@@ -98,7 +97,6 @@ export class NestedHeaders extends BasePlugin {
|
|
98
97
|
/**
|
99
98
|
* Updates the plugin state after new dataset load.
|
100
99
|
*
|
101
|
-
* @private
|
102
100
|
* @param {Array[]} sourceData Array of arrays or array of objects containing data.
|
103
101
|
* @param {boolean} initialLoad Flag that determines whether the data has been loaded
|
104
102
|
* during the initialization.
|
@@ -106,14 +104,11 @@ export class NestedHeaders extends BasePlugin {
|
|
106
104
|
_classPrivateMethodInitSpec(this, _onAfterLoadData);
|
107
105
|
/**
|
108
106
|
* Updates the plugin state after HoT initialization.
|
109
|
-
*
|
110
|
-
* @private
|
111
107
|
*/
|
112
108
|
_classPrivateMethodInitSpec(this, _onInit);
|
113
109
|
/**
|
114
110
|
* `modifyFocusedElement` hook callback.
|
115
111
|
*
|
116
|
-
* @private
|
117
112
|
* @param {number} row Row index.
|
118
113
|
* @param {number} column Column index.
|
119
114
|
* @returns {HTMLTableCellElement} The `TH` element to be focused.
|
@@ -123,7 +118,6 @@ export class NestedHeaders extends BasePlugin {
|
|
123
118
|
* Listens the `modifyColumnHeaderValue` hook that overwrites the column headers values based on
|
124
119
|
* the internal state and settings of the plugin.
|
125
120
|
*
|
126
|
-
* @private
|
127
121
|
* @param {string} value The column header value.
|
128
122
|
* @param {number} visualColumnIndex The visual column index.
|
129
123
|
* @param {number} headerLevel The index of header level. The header level accepts positive (0 to N)
|
@@ -136,7 +130,6 @@ export class NestedHeaders extends BasePlugin {
|
|
136
130
|
/**
|
137
131
|
* `modifyColWidth` hook callback - returns width from cache, when is greater than incoming from hook.
|
138
132
|
*
|
139
|
-
* @private
|
140
133
|
* @param {number} width Width from hook.
|
141
134
|
* @param {number} column Visual index of an column.
|
142
135
|
* @returns {number}
|
@@ -145,14 +138,12 @@ export class NestedHeaders extends BasePlugin {
|
|
145
138
|
/**
|
146
139
|
* Make the renderer render the first nested column in its entirety.
|
147
140
|
*
|
148
|
-
* @private
|
149
141
|
* @param {object} calc Viewport column calculator.
|
150
142
|
*/
|
151
143
|
_classPrivateMethodInitSpec(this, _onAfterViewportColumnCalculatorOverride);
|
152
144
|
/**
|
153
145
|
* `afterGetColumnHeader` hook callback - prepares the header structure.
|
154
146
|
*
|
155
|
-
* @private
|
156
147
|
* @param {Array} renderersArray Array of renderers.
|
157
148
|
*/
|
158
149
|
_classPrivateMethodInitSpec(this, _onAfterGetColumnHeaderRenderers);
|
@@ -160,7 +151,6 @@ export class NestedHeaders extends BasePlugin {
|
|
160
151
|
* The hook observes the column selection from the Selection API and modifies the column range to
|
161
152
|
* ensure that the whole nested column will be covered.
|
162
153
|
*
|
163
|
-
* @private
|
164
154
|
* @param {CellCoords} from The coords object where the selection starts.
|
165
155
|
* @param {CellCoords} to The coords object where the selection ends.
|
166
156
|
*/
|
@@ -168,27 +158,21 @@ export class NestedHeaders extends BasePlugin {
|
|
168
158
|
/**
|
169
159
|
* `modifyTransformStart` hook is called every time the keyboard navigation is used.
|
170
160
|
*
|
171
|
-
* @private
|
172
161
|
* @param {object} delta The transformation delta.
|
173
162
|
*/
|
174
163
|
_classPrivateMethodInitSpec(this, _onModifyTransformStart);
|
175
164
|
/**
|
176
165
|
* The hook checks and ensures that the focus position that depends on the selected columns
|
177
166
|
* range is always positioned within the range.
|
178
|
-
*
|
179
|
-
* @private
|
180
167
|
*/
|
181
168
|
_classPrivateMethodInitSpec(this, _onBeforeSelectionHighlightSet);
|
182
169
|
/**
|
183
170
|
* Switches internal flag about selection progress to `false`.
|
184
|
-
*
|
185
|
-
* @private
|
186
171
|
*/
|
187
172
|
_classPrivateMethodInitSpec(this, _onBeforeOnCellMouseUp);
|
188
173
|
/**
|
189
174
|
* Makes the header-selection properly select the nested headers.
|
190
175
|
*
|
191
|
-
* @private
|
192
176
|
* @param {MouseEvent} event Mouse event.
|
193
177
|
* @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
|
194
178
|
* @param {HTMLElement} TD The cell element.
|
@@ -199,7 +183,6 @@ export class NestedHeaders extends BasePlugin {
|
|
199
183
|
/**
|
200
184
|
* Allows to control how the column selection based on the coordinates and the nested headers is made.
|
201
185
|
*
|
202
|
-
* @private
|
203
186
|
* @param {MouseEvent} event Mouse event.
|
204
187
|
* @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
|
205
188
|
*/
|
@@ -207,7 +190,6 @@ export class NestedHeaders extends BasePlugin {
|
|
207
190
|
/**
|
208
191
|
* Allows blocking the column selection that is controlled by the core Selection module.
|
209
192
|
*
|
210
|
-
* @private
|
211
193
|
* @param {MouseEvent} event Mouse event.
|
212
194
|
* @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
|
213
195
|
* @param {CellCoords} TD The table cell or header element.
|
@@ -221,23 +203,16 @@ export class NestedHeaders extends BasePlugin {
|
|
221
203
|
* of the column.
|
222
204
|
*
|
223
205
|
* @private
|
224
|
-
* @param {
|
225
|
-
* @param {
|
226
|
-
*
|
227
|
-
* @param {
|
228
|
-
*
|
229
|
-
* @param {Function} clipboardData.setCellAt Change headers or cells in the copied/pasted dataset.
|
230
|
-
* @param {Function} clipboardData.getCellAt Get headers or cells from the copied/pasted dataset.
|
231
|
-
* @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
|
232
|
-
* @param {Function} clipboardData.getMetaInfo Gets grid settings for copied data.
|
233
|
-
* @param {Function} clipboardData.setMetaInfo Sets grid settings for copied data.
|
234
|
-
* @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
|
206
|
+
* @param {Array[]} data An array of arrays which contains data to copied.
|
207
|
+
* @param {object[]} copyableRanges An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
|
208
|
+
* which will copied.
|
209
|
+
* @param {{ columnHeadersCount: number }} copiedHeadersCount An object with keys that holds information with
|
210
|
+
* the number of copied headers.
|
235
211
|
*/
|
236
212
|
_classPrivateMethodInitSpec(this, _onBeforeCopy);
|
237
213
|
/**
|
238
214
|
* Allows to control which header DOM element will be used to highlight.
|
239
215
|
*
|
240
|
-
* @private
|
241
216
|
* @param {number} visualColumn A visual column index of the highlighted row header.
|
242
217
|
* @param {number} headerLevel A row header level that is currently highlighted.
|
243
218
|
* @param {object} highlightMeta An object with meta data that describes the highlight state.
|
@@ -249,7 +224,6 @@ export class NestedHeaders extends BasePlugin {
|
|
249
224
|
* is scrolled to the correct column for the nested header the most left and the most right visual column
|
250
225
|
* indexes are used.
|
251
226
|
*
|
252
|
-
* @private
|
253
227
|
* @param {number} visualColumn A visual column index to which the viewport will be scrolled.
|
254
228
|
* @returns {number}
|
255
229
|
*/
|
@@ -257,8 +231,6 @@ export class NestedHeaders extends BasePlugin {
|
|
257
231
|
/**
|
258
232
|
* Updates the selection focus highlight position to point to the nested header root element (TH)
|
259
233
|
* even when the logical coordinates point in-between the header.
|
260
|
-
*
|
261
|
-
* @private
|
262
234
|
*/
|
263
235
|
_classPrivateMethodInitSpec(this, _updateFocusHighlightPosition);
|
264
236
|
/**
|
@@ -749,60 +721,42 @@ function _onBeforeHighlightingColumnHeader2(visualColumn, headerLevel, highlight
|
|
749
721
|
}
|
750
722
|
return visualColumn;
|
751
723
|
}
|
752
|
-
function _onBeforeCopy2(
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
const
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
});
|
785
|
-
} else {
|
786
|
-
headersForLevel.push(label);
|
724
|
+
function _onBeforeCopy2(data, copyableRanges, _ref2) {
|
725
|
+
let {
|
726
|
+
columnHeadersCount
|
727
|
+
} = _ref2;
|
728
|
+
if (columnHeadersCount === 0) {
|
729
|
+
return;
|
730
|
+
}
|
731
|
+
for (let rangeIndex = 0; rangeIndex < copyableRanges.length; rangeIndex++) {
|
732
|
+
const {
|
733
|
+
startRow,
|
734
|
+
startCol,
|
735
|
+
endRow,
|
736
|
+
endCol
|
737
|
+
} = copyableRanges[rangeIndex];
|
738
|
+
const rowsCount = endRow - startRow + 1;
|
739
|
+
const columnsCount = startCol - endCol + 1;
|
740
|
+
|
741
|
+
// do not process dataset ranges and column headers where only one column is copied
|
742
|
+
if (startRow >= 0 || columnsCount === 1) {
|
743
|
+
break;
|
744
|
+
}
|
745
|
+
for (let column = startCol; column <= endCol; column++) {
|
746
|
+
for (let row = startRow; row <= endRow; row++) {
|
747
|
+
var _classPrivateFieldGet4;
|
748
|
+
const zeroBasedColumnHeaderLevel = rowsCount + row;
|
749
|
+
const zeroBasedColumnIndex = column - startCol;
|
750
|
+
if (zeroBasedColumnIndex === 0) {
|
751
|
+
continue; // eslint-disable-line no-continue
|
752
|
+
}
|
753
|
+
const isRoot = (_classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(row, column)) === null || _classPrivateFieldGet4 === void 0 ? void 0 : _classPrivateFieldGet4.isRoot;
|
754
|
+
if (isRoot === false) {
|
755
|
+
data[zeroBasedColumnHeaderLevel][zeroBasedColumnIndex] = '';
|
787
756
|
}
|
788
|
-
} else if (isPlaceholder === false) {
|
789
|
-
const {
|
790
|
-
label,
|
791
|
-
origColspan: colspan,
|
792
|
-
columnIndex
|
793
|
-
} = headerTreeNodeData;
|
794
|
-
const columnFromStart = column - columnIndex;
|
795
|
-
const reducedColspan = Math.min(colspan - columnFromStart, columnsToEnd);
|
796
|
-
headersForLevel.push(reducedColspan > 1 ? {
|
797
|
-
label,
|
798
|
-
colspan: reducedColspan
|
799
|
-
} : label);
|
800
757
|
}
|
801
|
-
}
|
802
|
-
|
803
|
-
});
|
804
|
-
clipboardData.setMetaInfo('colHeaders', null);
|
805
|
-
clipboardData.setMetaInfo('nestedHeaders', nestedHeaders);
|
758
|
+
}
|
759
|
+
}
|
806
760
|
}
|
807
761
|
function _onBeforeOnCellMouseDown2(event, coords, TD, controller) {
|
808
762
|
const headerNodeData = this._getHeaderTreeNodeDataByCoords(coords);
|
@@ -1005,10 +959,10 @@ function _onModifyColWidth2(width, column) {
|
|
1005
959
|
return width > cachedWidth ? width : cachedWidth;
|
1006
960
|
}
|
1007
961
|
function _onModifyColumnHeaderValue2(value, visualColumnIndex, headerLevel) {
|
1008
|
-
var
|
962
|
+
var _classPrivateFieldGet5;
|
1009
963
|
const {
|
1010
964
|
label
|
1011
|
-
} = (
|
965
|
+
} = (_classPrivateFieldGet5 = _classPrivateFieldGet(this, _stateManager).getHeaderTreeNodeData(headerLevel, visualColumnIndex)) !== null && _classPrivateFieldGet5 !== void 0 ? _classPrivateFieldGet5 : {
|
1012
966
|
label: ''
|
1013
967
|
};
|
1014
968
|
return label;
|
@@ -4,8 +4,8 @@ exports.__esModule = true;
|
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
5
|
var _element = require("../../../helpers/dom/element");
|
6
6
|
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; }
|
7
|
-
function _toPropertyKey(
|
8
|
-
function _toPrimitive(
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
8
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
9
9
|
/**
|
10
10
|
* The class generates the nested headers structure in the DOM and reads the column width for
|
11
11
|
* each column. The hierarchy is built only for visible, non-hidden columns. Each time the
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
|
-
function _toPropertyKey(
|
4
|
-
function _toPrimitive(
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
4
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
5
5
|
import { fastInnerHTML } from "../../../helpers/dom/element.mjs";
|
6
6
|
/**
|
7
7
|
* The class generates the nested headers structure in the DOM and reads the column width for
|
@@ -7,8 +7,8 @@ var _number = require("../../../helpers/number");
|
|
7
7
|
var _object = require("../../../helpers/object");
|
8
8
|
var _array = require("../../../helpers/array");
|
9
9
|
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; }
|
10
|
-
function _toPropertyKey(
|
11
|
-
function _toPrimitive(
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
11
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
12
12
|
/**
|
13
13
|
* Class responsible for making data operations.
|
14
14
|
*
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import "core-js/modules/es.array.push.js";
|
2
2
|
import "core-js/modules/es.error.cause.js";
|
3
3
|
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; }
|
4
|
-
function _toPropertyKey(
|
5
|
-
function _toPrimitive(
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
6
6
|
import { rangeEach } from "../../../helpers/number.mjs";
|
7
7
|
import { objectEach } from "../../../helpers/object.mjs";
|
8
8
|
import { arrayEach } from "../../../helpers/array.mjs";
|
@@ -17,8 +17,8 @@ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclarati
|
|
17
17
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
18
18
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
19
19
|
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; }
|
20
|
-
function _toPropertyKey(
|
21
|
-
function _toPrimitive(
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
21
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
22
22
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
23
23
|
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
24
24
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|