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,65 +0,0 @@
|
|
1
|
-
import "core-js/modules/es.error.cause.js";
|
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(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
4
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
5
|
-
import { META_HEAD, ClipboardData } from "./clipboardData.mjs";
|
6
|
-
import { transformRangeLikeToIndexes } from "../../../selection/index.mjs";
|
7
|
-
import { getDataByCoords, getHTMLByCoords } from "../../../utils/parseTable.mjs";
|
8
|
-
/**
|
9
|
-
* Creates an object containing information about copy/cut action.
|
10
|
-
*
|
11
|
-
* @private
|
12
|
-
*/
|
13
|
-
export class CopyClipboardData extends ClipboardData {
|
14
|
-
/**
|
15
|
-
* @param {Core} instance Handsontable instance (used only while copying data).
|
16
|
-
* @param {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>} copyableRanges Cell
|
17
|
-
* ranges related to instance of Handsontable (used only while copying data).
|
18
|
-
*/
|
19
|
-
constructor(instance, copyableRanges) {
|
20
|
-
super();
|
21
|
-
/**
|
22
|
-
* Sanitized data of "text/html" type inside the clipboard.
|
23
|
-
*
|
24
|
-
* @private
|
25
|
-
* @type {string}
|
26
|
-
*/
|
27
|
-
_defineProperty(this, "html", void 0);
|
28
|
-
/**
|
29
|
-
* Copied data stored as array of arrays.
|
30
|
-
*
|
31
|
-
* @private
|
32
|
-
* @type {string[][]}
|
33
|
-
*/
|
34
|
-
_defineProperty(this, "data", void 0);
|
35
|
-
/**
|
36
|
-
* Copied cell ranges related to instance of Handsontable.
|
37
|
-
*
|
38
|
-
* @private
|
39
|
-
* @type {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>}
|
40
|
-
*/
|
41
|
-
_defineProperty(this, "copyableRanges", void 0);
|
42
|
-
const {
|
43
|
-
rows,
|
44
|
-
columns
|
45
|
-
} = transformRangeLikeToIndexes(copyableRanges);
|
46
|
-
this.html = [META_HEAD, getHTMLByCoords(instance, {
|
47
|
-
rows,
|
48
|
-
columns
|
49
|
-
})].join('');
|
50
|
-
this.data = getDataByCoords(instance, {
|
51
|
-
rows,
|
52
|
-
columns
|
53
|
-
});
|
54
|
-
this.copyableRanges = copyableRanges;
|
55
|
-
}
|
56
|
-
|
57
|
-
/**
|
58
|
-
* Gets ranges related to copied part of Handsontable.
|
59
|
-
*
|
60
|
-
* @returns {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>}
|
61
|
-
*/
|
62
|
-
getRanges() {
|
63
|
-
return this.copyableRanges;
|
64
|
-
}
|
65
|
-
}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
exports.__esModule = true;
|
4
|
-
var _copyClipboardData = require("./copyClipboardData");
|
5
|
-
exports.CopyClipboardData = _copyClipboardData.CopyClipboardData;
|
6
|
-
var _pasteClipboardData = require("./pasteClipboardData");
|
7
|
-
exports.PasteClipboardData = _pasteClipboardData.PasteClipboardData;
|
8
|
-
var _clipboardData = require("./clipboardData");
|
9
|
-
exports.META_HEAD = _clipboardData.META_HEAD;
|
@@ -1,81 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
exports.__esModule = true;
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
5
|
-
var _clipboardData = require("./clipboardData");
|
6
|
-
var _parseTable = require("../../../utils/parseTable");
|
7
|
-
var _SheetClip = require("../../../3rdparty/SheetClip");
|
8
|
-
var _mixed = require("../../../helpers/mixed");
|
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(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
11
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
12
|
-
/**
|
13
|
-
* Creates an object containing information about paste action.
|
14
|
-
*
|
15
|
-
* @private
|
16
|
-
*/
|
17
|
-
class PasteClipboardData extends _clipboardData.ClipboardData {
|
18
|
-
/**
|
19
|
-
* @param {string} data Data of "text/plain" type inside the clipboard.
|
20
|
-
* @param {string} html Sanitized data of "text/html" type inside the clipboard.
|
21
|
-
*/
|
22
|
-
constructor(data, html) {
|
23
|
-
super();
|
24
|
-
/**
|
25
|
-
* Sanitized data of "text/html" type inside the clipboard.
|
26
|
-
*
|
27
|
-
* @private
|
28
|
-
* @type {string}
|
29
|
-
*/
|
30
|
-
_defineProperty(this, "html", void 0);
|
31
|
-
/**
|
32
|
-
* Copied data stored as array of arrays.
|
33
|
-
*
|
34
|
-
* @private
|
35
|
-
* @type {string[][]}
|
36
|
-
*/
|
37
|
-
_defineProperty(this, "data", void 0);
|
38
|
-
this.html = html;
|
39
|
-
if (this.isSerializedTable()) {
|
40
|
-
this.data = (0, _parseTable.getDataWithHeadersByConfig)(this.getMetaInfo());
|
41
|
-
} else {
|
42
|
-
this.data = (0, _SheetClip.parse)(data);
|
43
|
-
}
|
44
|
-
}
|
45
|
-
|
46
|
-
/**
|
47
|
-
* Checks whether pasted data is an array.
|
48
|
-
*
|
49
|
-
* @private
|
50
|
-
* @returns {boolean}
|
51
|
-
*/
|
52
|
-
isSerializedTable() {
|
53
|
-
return (0, _mixed.isDefined)(this.html) && /(<table)|(<TABLE)/g.test(this.html);
|
54
|
-
}
|
55
|
-
|
56
|
-
/**
|
57
|
-
* Checks whether pasted data is a Handsontable.
|
58
|
-
*
|
59
|
-
* @private
|
60
|
-
* @returns {boolean}
|
61
|
-
*/
|
62
|
-
isSerializedHandsontable() {
|
63
|
-
return this.isSerializedTable() && /<meta (.*?)content="Handsontable"/.test(this.html);
|
64
|
-
}
|
65
|
-
|
66
|
-
/**
|
67
|
-
* Gets type of the copied data.
|
68
|
-
*
|
69
|
-
* @returns {'table' | 'handsontable' | 'unrecognizable'}
|
70
|
-
*/
|
71
|
-
getType() {
|
72
|
-
if (this.isSerializedHandsontable()) {
|
73
|
-
return 'handsontable';
|
74
|
-
}
|
75
|
-
if (this.isSerializedTable()) {
|
76
|
-
return 'table';
|
77
|
-
}
|
78
|
-
return 'unrecognizable';
|
79
|
-
}
|
80
|
-
}
|
81
|
-
exports.PasteClipboardData = PasteClipboardData;
|
@@ -1,77 +0,0 @@
|
|
1
|
-
import "core-js/modules/es.error.cause.js";
|
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(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
4
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
5
|
-
import { ClipboardData } from "./clipboardData.mjs";
|
6
|
-
import { getDataWithHeadersByConfig } from "../../../utils/parseTable.mjs";
|
7
|
-
import { parse } from "../../../3rdparty/SheetClip/index.mjs";
|
8
|
-
import { isDefined } from "../../../helpers/mixed.mjs";
|
9
|
-
/**
|
10
|
-
* Creates an object containing information about paste action.
|
11
|
-
*
|
12
|
-
* @private
|
13
|
-
*/
|
14
|
-
export class PasteClipboardData extends ClipboardData {
|
15
|
-
/**
|
16
|
-
* @param {string} data Data of "text/plain" type inside the clipboard.
|
17
|
-
* @param {string} html Sanitized data of "text/html" type inside the clipboard.
|
18
|
-
*/
|
19
|
-
constructor(data, html) {
|
20
|
-
super();
|
21
|
-
/**
|
22
|
-
* Sanitized data of "text/html" type inside the clipboard.
|
23
|
-
*
|
24
|
-
* @private
|
25
|
-
* @type {string}
|
26
|
-
*/
|
27
|
-
_defineProperty(this, "html", void 0);
|
28
|
-
/**
|
29
|
-
* Copied data stored as array of arrays.
|
30
|
-
*
|
31
|
-
* @private
|
32
|
-
* @type {string[][]}
|
33
|
-
*/
|
34
|
-
_defineProperty(this, "data", void 0);
|
35
|
-
this.html = html;
|
36
|
-
if (this.isSerializedTable()) {
|
37
|
-
this.data = getDataWithHeadersByConfig(this.getMetaInfo());
|
38
|
-
} else {
|
39
|
-
this.data = parse(data);
|
40
|
-
}
|
41
|
-
}
|
42
|
-
|
43
|
-
/**
|
44
|
-
* Checks whether pasted data is an array.
|
45
|
-
*
|
46
|
-
* @private
|
47
|
-
* @returns {boolean}
|
48
|
-
*/
|
49
|
-
isSerializedTable() {
|
50
|
-
return isDefined(this.html) && /(<table)|(<TABLE)/g.test(this.html);
|
51
|
-
}
|
52
|
-
|
53
|
-
/**
|
54
|
-
* Checks whether pasted data is a Handsontable.
|
55
|
-
*
|
56
|
-
* @private
|
57
|
-
* @returns {boolean}
|
58
|
-
*/
|
59
|
-
isSerializedHandsontable() {
|
60
|
-
return this.isSerializedTable() && /<meta (.*?)content="Handsontable"/.test(this.html);
|
61
|
-
}
|
62
|
-
|
63
|
-
/**
|
64
|
-
* Gets type of the copied data.
|
65
|
-
*
|
66
|
-
* @returns {'table' | 'handsontable' | 'unrecognizable'}
|
67
|
-
*/
|
68
|
-
getType() {
|
69
|
-
if (this.isSerializedHandsontable()) {
|
70
|
-
return 'handsontable';
|
71
|
-
}
|
72
|
-
if (this.isSerializedTable()) {
|
73
|
-
return 'table';
|
74
|
-
}
|
75
|
-
return 'unrecognizable';
|
76
|
-
}
|
77
|
-
}
|