handsontable 0.0.0-next-3d099da-20231208 → 0.0.0-next-51d3397-20231211
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 +1 -122
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +2 -124
- package/3rdparty/walkontable/src/calculator/viewportRows.js +1 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +2 -3
- package/3rdparty/walkontable/src/core/_base.js +0 -12
- package/3rdparty/walkontable/src/core/_base.mjs +0 -12
- 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/index.js +3 -4
- package/3rdparty/walkontable/src/index.mjs +1 -2
- package/3rdparty/walkontable/src/overlays.js +0 -3
- package/3rdparty/walkontable/src/overlays.mjs +0 -4
- package/3rdparty/walkontable/src/renderer/colGroup.js +10 -0
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +10 -0
- package/3rdparty/walkontable/src/renderer/rows.js +4 -3
- package/3rdparty/walkontable/src/renderer/rows.mjs +4 -3
- package/3rdparty/walkontable/src/selection/manager.js +0 -1
- package/3rdparty/walkontable/src/selection/manager.mjs +0 -1
- package/3rdparty/walkontable/src/settings.js +3 -0
- package/3rdparty/walkontable/src/settings.mjs +2 -0
- package/3rdparty/walkontable/src/table.js +0 -1
- package/3rdparty/walkontable/src/table.mjs +0 -1
- package/3rdparty/walkontable/src/utils/column.js +27 -12
- package/3rdparty/walkontable/src/utils/column.mjs +27 -12
- package/3rdparty/walkontable/src/utils/columnStretching.js +219 -0
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +215 -0
- 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 +1 -0
- package/dataMap/metaManager/metaSchema.js +28 -2
- package/dataMap/metaManager/metaSchema.mjs +28 -2
- package/dataMap/metaManager/mods/extendMetaProperties.js +12 -0
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +12 -0
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +3 -3
- package/dist/handsontable.full.js +3979 -5577
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +66 -71
- package/dist/handsontable.js +3058 -4305
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +35 -39
- package/editorManager.js +3 -4
- package/editorManager.mjs +3 -4
- package/editors/autocompleteEditor/autocompleteEditor.js +0 -2
- package/editors/autocompleteEditor/autocompleteEditor.mjs +0 -2
- package/editors/dateEditor/dateEditor.d.ts +1 -1
- package/editors/dateEditor/dateEditor.js +4 -1
- package/editors/dateEditor/dateEditor.mjs +4 -1
- package/editors/handsontableEditor/handsontableEditor.js +0 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +0 -1
- package/editors/textEditor/textEditor.js +0 -4
- package/editors/textEditor/textEditor.mjs +0 -4
- 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 +65 -123
- package/pluginHooks.mjs +62 -122
- package/plugins/copyPaste/clipboardData.js +18 -0
- package/plugins/copyPaste/clipboardData.mjs +14 -0
- package/plugins/copyPaste/copyPaste.js +129 -51
- package/plugins/copyPaste/copyPaste.mjs +132 -54
- 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 +0 -5
- package/plugins/customBorders/customBorders.mjs +0 -5
- package/plugins/customBorders/utils.js +0 -1
- package/plugins/customBorders/utils.mjs +0 -1
- package/plugins/filters/ui/radioInput.js +1 -1
- package/plugins/filters/ui/radioInput.mjs +1 -1
- package/plugins/formulas/formulas.js +0 -2
- package/plugins/formulas/formulas.mjs +0 -2
- package/plugins/formulas/indexSyncer/axisSyncer.js +0 -1
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -1
- package/plugins/manualColumnResize/manualColumnResize.js +0 -1
- package/plugins/manualColumnResize/manualColumnResize.mjs +0 -1
- package/plugins/mergeCells/mergeCells.js +1 -127
- package/plugins/mergeCells/mergeCells.mjs +1 -127
- package/plugins/nestedHeaders/nestedHeaders.js +41 -87
- package/plugins/nestedHeaders/nestedHeaders.mjs +42 -88
- package/plugins/nestedHeaders/stateManager/headersTree.js +0 -1
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +0 -1
- 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 +0 -1
- package/selection/highlight/highlight.mjs +0 -1
- package/selection/index.js +1 -3
- package/selection/index.mjs +2 -2
- package/selection/utils.js +0 -34
- package/selection/utils.mjs +0 -33
- package/settings.d.ts +2 -1
- package/tableView.js +1 -2
- package/tableView.mjs +1 -2
- package/translations/indexMapper.js +2 -1
- package/utils/parseTable.js +84 -538
- package/utils/parseTable.mjs +83 -534
- 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
|
-
}
|