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
@@ -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
|
const STATE_INITIALIZED = 0;
|
6
6
|
const STATE_BUILT = 1;
|
7
7
|
const STATE_APPENDED = 2;
|
@@ -5,8 +5,8 @@ require("core-js/modules/es.error.cause.js");
|
|
5
5
|
var _object = require("../../../helpers/object");
|
6
6
|
var _array = require("../../../helpers/array");
|
7
7
|
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; }
|
8
|
-
function _toPropertyKey(
|
9
|
-
function _toPrimitive(
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
9
|
+
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); }
|
10
10
|
/**
|
11
11
|
* Class responsible for all of the Autofill-related operations on merged cells.
|
12
12
|
*
|
@@ -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 { extend } from "../../../helpers/object.mjs";
|
6
6
|
import { arrayEach } from "../../../helpers/array.mjs";
|
7
7
|
/**
|
@@ -4,8 +4,8 @@ exports.__esModule = true;
|
|
4
4
|
require("core-js/modules/es.array.push.js");
|
5
5
|
require("core-js/modules/es.error.cause.js");
|
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
|
* Class responsible for all of the Selection-related operations on merged cells.
|
11
11
|
*
|
@@ -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
|
/**
|
7
7
|
* Class responsible for all of the Selection-related operations on merged cells.
|
8
8
|
*
|
@@ -4,8 +4,8 @@ exports.__esModule = true;
|
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
5
|
var _templateLiteralTag = require("../../helpers/templateLiteralTag");
|
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 `MergedCellCoords` class represents a single merged cell.
|
11
11
|
*
|
@@ -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 { toSingleLine } from "../../helpers/templateLiteralTag.mjs";
|
6
6
|
/**
|
7
7
|
* The `MergedCellCoords` class represents a single merged cell.
|
@@ -11,8 +11,8 @@ var _utils = require("./utils");
|
|
11
11
|
var _templateLiteralTag = require("../../helpers/templateLiteralTag");
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
13
|
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; }
|
14
|
-
function _toPropertyKey(
|
15
|
-
function _toPrimitive(
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
15
|
+
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); }
|
16
16
|
/**
|
17
17
|
* Defines a container object for the merged cells.
|
18
18
|
*
|
@@ -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 MergedCellCoords from "./cellCoords.mjs";
|
7
7
|
import { rangeEach, rangeEachReverse } from "../../helpers/number.mjs";
|
8
8
|
import { warn } from "../../helpers/console.mjs";
|
@@ -17,14 +17,13 @@ var _number = require("../../helpers/number");
|
|
17
17
|
var _utils = require("./utils");
|
18
18
|
var _element = require("../../helpers/dom/element");
|
19
19
|
var _browser = require("../../helpers/browser");
|
20
|
-
var _mixed = require("../../helpers/mixed");
|
21
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
22
21
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
23
22
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
24
23
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
25
24
|
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; }
|
26
|
-
function _toPropertyKey(
|
27
|
-
function _toPrimitive(
|
25
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
26
|
+
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); }
|
28
27
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
29
28
|
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
30
29
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
@@ -99,26 +98,9 @@ var _onBeforeDrawAreaBorders = /*#__PURE__*/new WeakSet();
|
|
99
98
|
var _onAfterModifyTransformStart = /*#__PURE__*/new WeakSet();
|
100
99
|
var _onAfterDrawSelection = /*#__PURE__*/new WeakSet();
|
101
100
|
var _onBeforeRemoveCellClassNames = /*#__PURE__*/new WeakSet();
|
102
|
-
var _onBeforePaste = /*#__PURE__*/new WeakSet();
|
103
101
|
class MergeCells extends _base.BasePlugin {
|
104
102
|
constructor() {
|
105
103
|
super(...arguments);
|
106
|
-
/**
|
107
|
-
* `beforePaste` hook callback. Used for manipulating with area of paste (by changing selection) and unmerging cells.
|
108
|
-
*
|
109
|
-
* @private
|
110
|
-
* @param {object} clipboardData Information about copy action which is going to happen.
|
111
|
-
* @param {Function} clipboardData.removeRow Remove row from the copied dataset.
|
112
|
-
* @param {Function} clipboardData.removeColumn Remove column from the copied dataset.
|
113
|
-
* @param {Function} clipboardData.insertAtRow Insert values at row index.
|
114
|
-
* @param {Function} clipboardData.insertAtColumn Insert values at column index.
|
115
|
-
* @param {Function} clipboardData.setCellAt Change headers or cells in the copied dataset.
|
116
|
-
* @param {Function} clipboardData.getCellAt Get headers or cells from the copied dataset.
|
117
|
-
* @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
|
118
|
-
* @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
|
119
|
-
* @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
|
120
|
-
*/
|
121
|
-
_classPrivateMethodInitSpec(this, _onBeforePaste);
|
122
104
|
/**
|
123
105
|
* `beforeRemoveCellClassNames` hook callback. Used to remove additional class name from all cells in the table.
|
124
106
|
*
|
@@ -482,12 +464,6 @@ class MergeCells extends _base.BasePlugin {
|
|
482
464
|
return false;
|
483
465
|
}
|
484
466
|
});
|
485
|
-
this.addHook('beforePaste', function () {
|
486
|
-
for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {
|
487
|
-
args[_key24] = arguments[_key24];
|
488
|
-
}
|
489
|
-
return _classPrivateMethodGet(_this, _onBeforePaste, _onBeforePaste2).call(_this, ...args);
|
490
|
-
});
|
491
467
|
this.registerShortcuts();
|
492
468
|
super.enablePlugin();
|
493
469
|
}
|
@@ -773,15 +749,13 @@ class MergeCells extends _base.BasePlugin {
|
|
773
749
|
* @private
|
774
750
|
* @param {CellRange} cellRange Selection cell range.
|
775
751
|
* @param {boolean} [auto=false] `true` if called automatically by the plugin.
|
776
|
-
* @param {boolean} [unmergePartials=false] If set to `true`, all the merged cells overlapping the range will be unmerged.
|
777
752
|
*
|
778
753
|
* @fires Hooks#beforeUnmergeCells
|
779
754
|
* @fires Hooks#afterUnmergeCells
|
780
755
|
*/
|
781
756
|
unmergeRange(cellRange) {
|
782
757
|
let auto = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
783
|
-
|
784
|
-
const mergedCells = this.mergedCellsCollection.getWithinRange(cellRange, unmergePartials);
|
758
|
+
const mergedCells = this.mergedCellsCollection.getWithinRange(cellRange);
|
785
759
|
if (!mergedCells) {
|
786
760
|
return;
|
787
761
|
}
|
@@ -936,7 +910,6 @@ class MergeCells extends _base.BasePlugin {
|
|
936
910
|
}
|
937
911
|
}
|
938
912
|
}
|
939
|
-
|
940
913
|
/**
|
941
914
|
* Modify viewport start when needed. We extend viewport when merged cells aren't fully visible.
|
942
915
|
*
|
@@ -1031,67 +1004,6 @@ class MergeCells extends _base.BasePlugin {
|
|
1031
1004
|
const renderableColumn = parentColumn >= 0 ? columnMapper.getRenderableFromVisualIndex(firstNonHiddenColumn) : parentColumn;
|
1032
1005
|
return [renderableRow, renderableColumn];
|
1033
1006
|
}
|
1034
|
-
/**
|
1035
|
-
* Creates cell range.
|
1036
|
-
*
|
1037
|
-
* @private
|
1038
|
-
* @param {number} startRow Visual start row index for the range.
|
1039
|
-
* @param {number} startColumn Visual start column index for the range.
|
1040
|
-
* @param {number} numberOfRows Number of rows within the range.
|
1041
|
-
* @param {number} numberOfColumns Number of columns within the range.
|
1042
|
-
* @returns {CellRange}
|
1043
|
-
*/
|
1044
|
-
getCellRange(startRow, startColumn, numberOfRows, numberOfColumns) {
|
1045
|
-
const rangeStart = this.hot._createCellCoords(startRow, startColumn);
|
1046
|
-
const rangeEnd = this.hot._createCellCoords(startRow + numberOfRows - 1, startColumn + numberOfColumns - 1);
|
1047
|
-
return this.hot._createCellRange(rangeStart, rangeStart, rangeEnd);
|
1048
|
-
}
|
1049
|
-
|
1050
|
-
/**
|
1051
|
-
* Adjusting selection to select complete area of previously merged cells.
|
1052
|
-
*
|
1053
|
-
* @private
|
1054
|
-
* @param {Array|boolean} listOfUnmergedCells Array of found merged cells of `false` if none were found.
|
1055
|
-
* @param {CellRange} unmergedRange Range for unmerged cells.
|
1056
|
-
*/
|
1057
|
-
adjustSelectionAfterPasting(listOfUnmergedCells, unmergedRange) {
|
1058
|
-
if (listOfUnmergedCells === false) {
|
1059
|
-
return;
|
1060
|
-
}
|
1061
|
-
listOfUnmergedCells.forEach(mergedCell => {
|
1062
|
-
const {
|
1063
|
-
row,
|
1064
|
-
col,
|
1065
|
-
rowspan,
|
1066
|
-
colspan
|
1067
|
-
} = mergedCell;
|
1068
|
-
const mergeRange = this.getCellRange(row, col, rowspan, colspan);
|
1069
|
-
unmergedRange.expandByRange(mergeRange);
|
1070
|
-
});
|
1071
|
-
this.hot.addHookOnce('afterPaste', () => {
|
1072
|
-
this.hot.selectCell(unmergedRange.from.row, unmergedRange.from.col, unmergedRange.to.row, unmergedRange.to.col);
|
1073
|
-
});
|
1074
|
-
}
|
1075
|
-
|
1076
|
-
/**
|
1077
|
-
* Checks if unmerge should be performed.
|
1078
|
-
*
|
1079
|
-
* @private
|
1080
|
-
* @param {Array<object>} mergedCells List of merged cells.
|
1081
|
-
* @param {number} pastedRows Number of pasted data rows.
|
1082
|
-
* @param {number} pastedColumns Number of pasted data columns.
|
1083
|
-
* @returns {boolean}
|
1084
|
-
*/
|
1085
|
-
shouldUnmerge(mergedCells, pastedRows, pastedColumns) {
|
1086
|
-
const isCopiedWithMergedCell = (0, _mixed.isDefined)(mergedCells);
|
1087
|
-
const copiedOnlyMergedCell = isCopiedWithMergedCell && mergedCells.length === 1 && mergedCells[0].rowspan === pastedRows && mergedCells[0].colspan === pastedColumns;
|
1088
|
-
const selectedRangeLast = this.hot.getSelectedRangeLast();
|
1089
|
-
const pastingToMergedCell = this.mergedCellsCollection.getByRange(selectedRangeLast) !== false;
|
1090
|
-
if (pastedRows === 1 && pastedColumns === 1 && pastingToMergedCell === true) {
|
1091
|
-
return false;
|
1092
|
-
}
|
1093
|
-
return copiedOnlyMergedCell === false || pastingToMergedCell === false;
|
1094
|
-
}
|
1095
1007
|
}
|
1096
1008
|
exports.MergeCells = MergeCells;
|
1097
1009
|
function _onAfterInit2() {
|
@@ -1130,7 +1042,6 @@ function _onModifyTransformStart2(delta) {
|
|
1130
1042
|
if (!mergeRange.includes(_classPrivateFieldGet(this, _lastDesiredCoords))) {
|
1131
1043
|
_classPrivateFieldSet(this, _lastDesiredCoords, this.hot._createCellCoords(null, null)); // reset outdated version of lastDesiredCoords
|
1132
1044
|
}
|
1133
|
-
|
1134
1045
|
newDelta.row = _classPrivateFieldGet(this, _lastDesiredCoords).row ? _classPrivateFieldGet(this, _lastDesiredCoords).row - currentPosition.row : newDelta.row;
|
1135
1046
|
newDelta.col = _classPrivateFieldGet(this, _lastDesiredCoords).col ? _classPrivateFieldGet(this, _lastDesiredCoords).col - currentPosition.col : newDelta.col;
|
1136
1047
|
if (delta.row > 0) {
|
@@ -1379,41 +1290,4 @@ function _onAfterDrawSelection2(currentRow, currentColumn, cornersOfSelection, l
|
|
1379
1290
|
}
|
1380
1291
|
function _onBeforeRemoveCellClassNames2() {
|
1381
1292
|
return this.selectionCalculations.getSelectedMergedCellClassNameToRemove();
|
1382
|
-
}
|
1383
|
-
function _onBeforePaste2(clipboardData) {
|
1384
|
-
const selectedRangeLast = this.hot.getSelectedRangeLast();
|
1385
|
-
const data = clipboardData.getData();
|
1386
|
-
const pastedRows = data.length;
|
1387
|
-
const pastedColumns = data[0].length;
|
1388
|
-
const {
|
1389
|
-
row: selectionFromRow,
|
1390
|
-
col: selectionFromColumn
|
1391
|
-
} = selectedRangeLast.from;
|
1392
|
-
const selectedRows = selectedRangeLast.getHeight();
|
1393
|
-
const selectedColumns = selectedRangeLast.getWidth();
|
1394
|
-
if (this.shouldUnmerge(clipboardData.getMetaInfo().mergeCells, pastedRows, pastedColumns) === false) {
|
1395
|
-
return;
|
1396
|
-
}
|
1397
|
-
const pasteRange = this.getCellRange(selectionFromRow, selectionFromColumn, pastedRows, pastedColumns);
|
1398
|
-
const populationRange = this.getCellRange(selectionFromRow, selectionFromColumn, Math.max(pastedRows, selectedRows), Math.max(pastedColumns, selectedColumns));
|
1399
|
-
let rangeToUnmerge = pasteRange;
|
1400
|
-
const mergedCellsWithinPopulation = this.mergedCellsCollection.getWithinRange(populationRange, true);
|
1401
|
-
|
1402
|
-
// Nothing to unmerge.
|
1403
|
-
if (mergedCellsWithinPopulation.length === 0) {
|
1404
|
-
return;
|
1405
|
-
}
|
1406
|
-
if (mergedCellsWithinPopulation.length === 1) {
|
1407
|
-
rangeToUnmerge = populationRange;
|
1408
|
-
}
|
1409
|
-
|
1410
|
-
// Checking merged cells on unmerge range right before performing the unmerge.
|
1411
|
-
const listOfUnmergedCells = this.mergedCellsCollection.getWithinRange(rangeToUnmerge, true);
|
1412
|
-
this.unmergeRange(rangeToUnmerge, false, true);
|
1413
|
-
|
1414
|
-
// Changing selection (place where the data is populated) only for greater range (at least two merged cells).
|
1415
|
-
if (rangeToUnmerge === pasteRange) {
|
1416
|
-
this.hot.selectCell(selectionFromRow, selectionFromColumn, pasteRange.endRow, pasteRange.endCol);
|
1417
|
-
}
|
1418
|
-
this.adjustSelectionAfterPasting(listOfUnmergedCells, rangeToUnmerge);
|
1419
1293
|
}
|
@@ -4,8 +4,8 @@ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclarati
|
|
4
4
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
5
5
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
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
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
10
10
|
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
11
11
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
@@ -26,7 +26,6 @@ import { rangeEach } from "../../helpers/number.mjs";
|
|
26
26
|
import { applySpanProperties } from "./utils.mjs";
|
27
27
|
import { getStyle } from "../../helpers/dom/element.mjs";
|
28
28
|
import { isChrome } from "../../helpers/browser.mjs";
|
29
|
-
import { isDefined } from "../../helpers/mixed.mjs";
|
30
29
|
Hooks.getSingleton().register('beforeMergeCells');
|
31
30
|
Hooks.getSingleton().register('afterMergeCells');
|
32
31
|
Hooks.getSingleton().register('beforeUnmergeCells');
|
@@ -95,26 +94,9 @@ var _onBeforeDrawAreaBorders = /*#__PURE__*/new WeakSet();
|
|
95
94
|
var _onAfterModifyTransformStart = /*#__PURE__*/new WeakSet();
|
96
95
|
var _onAfterDrawSelection = /*#__PURE__*/new WeakSet();
|
97
96
|
var _onBeforeRemoveCellClassNames = /*#__PURE__*/new WeakSet();
|
98
|
-
var _onBeforePaste = /*#__PURE__*/new WeakSet();
|
99
97
|
export class MergeCells extends BasePlugin {
|
100
98
|
constructor() {
|
101
99
|
super(...arguments);
|
102
|
-
/**
|
103
|
-
* `beforePaste` hook callback. Used for manipulating with area of paste (by changing selection) and unmerging cells.
|
104
|
-
*
|
105
|
-
* @private
|
106
|
-
* @param {object} clipboardData Information about copy action which is going to happen.
|
107
|
-
* @param {Function} clipboardData.removeRow Remove row from the copied dataset.
|
108
|
-
* @param {Function} clipboardData.removeColumn Remove column from the copied dataset.
|
109
|
-
* @param {Function} clipboardData.insertAtRow Insert values at row index.
|
110
|
-
* @param {Function} clipboardData.insertAtColumn Insert values at column index.
|
111
|
-
* @param {Function} clipboardData.setCellAt Change headers or cells in the copied dataset.
|
112
|
-
* @param {Function} clipboardData.getCellAt Get headers or cells from the copied dataset.
|
113
|
-
* @param {Function} clipboardData.getData Gets copied data stored as array of arrays.
|
114
|
-
* @param {Function} clipboardData.getMetaInfo Gets meta information for the copied data.
|
115
|
-
* @param {Function} clipboardData.getRanges Returns ranges related to copied part of Handsontable.
|
116
|
-
*/
|
117
|
-
_classPrivateMethodInitSpec(this, _onBeforePaste);
|
118
100
|
/**
|
119
101
|
* `beforeRemoveCellClassNames` hook callback. Used to remove additional class name from all cells in the table.
|
120
102
|
*
|
@@ -478,12 +460,6 @@ export class MergeCells extends BasePlugin {
|
|
478
460
|
return false;
|
479
461
|
}
|
480
462
|
});
|
481
|
-
this.addHook('beforePaste', function () {
|
482
|
-
for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {
|
483
|
-
args[_key24] = arguments[_key24];
|
484
|
-
}
|
485
|
-
return _classPrivateMethodGet(_this, _onBeforePaste, _onBeforePaste2).call(_this, ...args);
|
486
|
-
});
|
487
463
|
this.registerShortcuts();
|
488
464
|
super.enablePlugin();
|
489
465
|
}
|
@@ -769,15 +745,13 @@ export class MergeCells extends BasePlugin {
|
|
769
745
|
* @private
|
770
746
|
* @param {CellRange} cellRange Selection cell range.
|
771
747
|
* @param {boolean} [auto=false] `true` if called automatically by the plugin.
|
772
|
-
* @param {boolean} [unmergePartials=false] If set to `true`, all the merged cells overlapping the range will be unmerged.
|
773
748
|
*
|
774
749
|
* @fires Hooks#beforeUnmergeCells
|
775
750
|
* @fires Hooks#afterUnmergeCells
|
776
751
|
*/
|
777
752
|
unmergeRange(cellRange) {
|
778
753
|
let auto = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
779
|
-
|
780
|
-
const mergedCells = this.mergedCellsCollection.getWithinRange(cellRange, unmergePartials);
|
754
|
+
const mergedCells = this.mergedCellsCollection.getWithinRange(cellRange);
|
781
755
|
if (!mergedCells) {
|
782
756
|
return;
|
783
757
|
}
|
@@ -932,7 +906,6 @@ export class MergeCells extends BasePlugin {
|
|
932
906
|
}
|
933
907
|
}
|
934
908
|
}
|
935
|
-
|
936
909
|
/**
|
937
910
|
* Modify viewport start when needed. We extend viewport when merged cells aren't fully visible.
|
938
911
|
*
|
@@ -1027,67 +1000,6 @@ export class MergeCells extends BasePlugin {
|
|
1027
1000
|
const renderableColumn = parentColumn >= 0 ? columnMapper.getRenderableFromVisualIndex(firstNonHiddenColumn) : parentColumn;
|
1028
1001
|
return [renderableRow, renderableColumn];
|
1029
1002
|
}
|
1030
|
-
/**
|
1031
|
-
* Creates cell range.
|
1032
|
-
*
|
1033
|
-
* @private
|
1034
|
-
* @param {number} startRow Visual start row index for the range.
|
1035
|
-
* @param {number} startColumn Visual start column index for the range.
|
1036
|
-
* @param {number} numberOfRows Number of rows within the range.
|
1037
|
-
* @param {number} numberOfColumns Number of columns within the range.
|
1038
|
-
* @returns {CellRange}
|
1039
|
-
*/
|
1040
|
-
getCellRange(startRow, startColumn, numberOfRows, numberOfColumns) {
|
1041
|
-
const rangeStart = this.hot._createCellCoords(startRow, startColumn);
|
1042
|
-
const rangeEnd = this.hot._createCellCoords(startRow + numberOfRows - 1, startColumn + numberOfColumns - 1);
|
1043
|
-
return this.hot._createCellRange(rangeStart, rangeStart, rangeEnd);
|
1044
|
-
}
|
1045
|
-
|
1046
|
-
/**
|
1047
|
-
* Adjusting selection to select complete area of previously merged cells.
|
1048
|
-
*
|
1049
|
-
* @private
|
1050
|
-
* @param {Array|boolean} listOfUnmergedCells Array of found merged cells of `false` if none were found.
|
1051
|
-
* @param {CellRange} unmergedRange Range for unmerged cells.
|
1052
|
-
*/
|
1053
|
-
adjustSelectionAfterPasting(listOfUnmergedCells, unmergedRange) {
|
1054
|
-
if (listOfUnmergedCells === false) {
|
1055
|
-
return;
|
1056
|
-
}
|
1057
|
-
listOfUnmergedCells.forEach(mergedCell => {
|
1058
|
-
const {
|
1059
|
-
row,
|
1060
|
-
col,
|
1061
|
-
rowspan,
|
1062
|
-
colspan
|
1063
|
-
} = mergedCell;
|
1064
|
-
const mergeRange = this.getCellRange(row, col, rowspan, colspan);
|
1065
|
-
unmergedRange.expandByRange(mergeRange);
|
1066
|
-
});
|
1067
|
-
this.hot.addHookOnce('afterPaste', () => {
|
1068
|
-
this.hot.selectCell(unmergedRange.from.row, unmergedRange.from.col, unmergedRange.to.row, unmergedRange.to.col);
|
1069
|
-
});
|
1070
|
-
}
|
1071
|
-
|
1072
|
-
/**
|
1073
|
-
* Checks if unmerge should be performed.
|
1074
|
-
*
|
1075
|
-
* @private
|
1076
|
-
* @param {Array<object>} mergedCells List of merged cells.
|
1077
|
-
* @param {number} pastedRows Number of pasted data rows.
|
1078
|
-
* @param {number} pastedColumns Number of pasted data columns.
|
1079
|
-
* @returns {boolean}
|
1080
|
-
*/
|
1081
|
-
shouldUnmerge(mergedCells, pastedRows, pastedColumns) {
|
1082
|
-
const isCopiedWithMergedCell = isDefined(mergedCells);
|
1083
|
-
const copiedOnlyMergedCell = isCopiedWithMergedCell && mergedCells.length === 1 && mergedCells[0].rowspan === pastedRows && mergedCells[0].colspan === pastedColumns;
|
1084
|
-
const selectedRangeLast = this.hot.getSelectedRangeLast();
|
1085
|
-
const pastingToMergedCell = this.mergedCellsCollection.getByRange(selectedRangeLast) !== false;
|
1086
|
-
if (pastedRows === 1 && pastedColumns === 1 && pastingToMergedCell === true) {
|
1087
|
-
return false;
|
1088
|
-
}
|
1089
|
-
return copiedOnlyMergedCell === false || pastingToMergedCell === false;
|
1090
|
-
}
|
1091
1003
|
}
|
1092
1004
|
function _onAfterInit2() {
|
1093
1005
|
this.generateFromSettings(this.hot.getSettings()[PLUGIN_KEY]);
|
@@ -1125,7 +1037,6 @@ function _onModifyTransformStart2(delta) {
|
|
1125
1037
|
if (!mergeRange.includes(_classPrivateFieldGet(this, _lastDesiredCoords))) {
|
1126
1038
|
_classPrivateFieldSet(this, _lastDesiredCoords, this.hot._createCellCoords(null, null)); // reset outdated version of lastDesiredCoords
|
1127
1039
|
}
|
1128
|
-
|
1129
1040
|
newDelta.row = _classPrivateFieldGet(this, _lastDesiredCoords).row ? _classPrivateFieldGet(this, _lastDesiredCoords).row - currentPosition.row : newDelta.row;
|
1130
1041
|
newDelta.col = _classPrivateFieldGet(this, _lastDesiredCoords).col ? _classPrivateFieldGet(this, _lastDesiredCoords).col - currentPosition.col : newDelta.col;
|
1131
1042
|
if (delta.row > 0) {
|
@@ -1374,41 +1285,4 @@ function _onAfterDrawSelection2(currentRow, currentColumn, cornersOfSelection, l
|
|
1374
1285
|
}
|
1375
1286
|
function _onBeforeRemoveCellClassNames2() {
|
1376
1287
|
return this.selectionCalculations.getSelectedMergedCellClassNameToRemove();
|
1377
|
-
}
|
1378
|
-
function _onBeforePaste2(clipboardData) {
|
1379
|
-
const selectedRangeLast = this.hot.getSelectedRangeLast();
|
1380
|
-
const data = clipboardData.getData();
|
1381
|
-
const pastedRows = data.length;
|
1382
|
-
const pastedColumns = data[0].length;
|
1383
|
-
const {
|
1384
|
-
row: selectionFromRow,
|
1385
|
-
col: selectionFromColumn
|
1386
|
-
} = selectedRangeLast.from;
|
1387
|
-
const selectedRows = selectedRangeLast.getHeight();
|
1388
|
-
const selectedColumns = selectedRangeLast.getWidth();
|
1389
|
-
if (this.shouldUnmerge(clipboardData.getMetaInfo().mergeCells, pastedRows, pastedColumns) === false) {
|
1390
|
-
return;
|
1391
|
-
}
|
1392
|
-
const pasteRange = this.getCellRange(selectionFromRow, selectionFromColumn, pastedRows, pastedColumns);
|
1393
|
-
const populationRange = this.getCellRange(selectionFromRow, selectionFromColumn, Math.max(pastedRows, selectedRows), Math.max(pastedColumns, selectedColumns));
|
1394
|
-
let rangeToUnmerge = pasteRange;
|
1395
|
-
const mergedCellsWithinPopulation = this.mergedCellsCollection.getWithinRange(populationRange, true);
|
1396
|
-
|
1397
|
-
// Nothing to unmerge.
|
1398
|
-
if (mergedCellsWithinPopulation.length === 0) {
|
1399
|
-
return;
|
1400
|
-
}
|
1401
|
-
if (mergedCellsWithinPopulation.length === 1) {
|
1402
|
-
rangeToUnmerge = populationRange;
|
1403
|
-
}
|
1404
|
-
|
1405
|
-
// Checking merged cells on unmerge range right before performing the unmerge.
|
1406
|
-
const listOfUnmergedCells = this.mergedCellsCollection.getWithinRange(rangeToUnmerge, true);
|
1407
|
-
this.unmergeRange(rangeToUnmerge, false, true);
|
1408
|
-
|
1409
|
-
// Changing selection (place where the data is populated) only for greater range (at least two merged cells).
|
1410
|
-
if (rangeToUnmerge === pasteRange) {
|
1411
|
-
this.hot.selectCell(selectionFromRow, selectionFromColumn, pasteRange.endRow, pasteRange.endCol);
|
1412
|
-
}
|
1413
|
-
this.adjustSelectionAfterPasting(listOfUnmergedCells, rangeToUnmerge);
|
1414
1288
|
}
|
@@ -10,8 +10,8 @@ var _rootComparator = require("./rootComparator");
|
|
10
10
|
var _utils2 = require("./utils");
|
11
11
|
var _domHelpers = require("./domHelpers");
|
12
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(
|
14
|
-
function _toPrimitive(
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
14
|
+
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); }
|
15
15
|
const PLUGIN_KEY = exports.PLUGIN_KEY = 'multiColumnSorting';
|
16
16
|
const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 170;
|
17
17
|
const CONFLICTED_PLUGIN_KEY = 'columnSorting';
|
@@ -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 { APPEND_COLUMN_CONFIG_STRATEGY, ColumnSorting } from "../columnSorting/index.mjs";
|
6
6
|
import { registerRootComparator } from "../columnSorting/sortService/index.mjs";
|
7
7
|
import { wasHeaderClickedProperly } from "../columnSorting/utils.mjs";
|
@@ -7,8 +7,8 @@ var _element = require("../../helpers/dom/element");
|
|
7
7
|
var _browser = require("../../helpers/browser");
|
8
8
|
var _base = require("../base");
|
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
|
const PLUGIN_KEY = exports.PLUGIN_KEY = 'multipleSelectionHandles';
|
13
13
|
const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 160;
|
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 { hasClass } from "../../helpers/dom/element.mjs";
|
7
7
|
import { isMobileBrowser } from "../../helpers/browser.mjs";
|
8
8
|
import { BasePlugin } from "../base/index.mjs";
|