handsontable 14.0.0-next-c22ab6f-20231030 → 14.0.0-next-f88c253-20231106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/base.js +2 -2
  2. package/base.mjs +2 -2
  3. package/dist/handsontable.css +8 -2
  4. package/dist/handsontable.full.css +8 -2
  5. package/dist/handsontable.full.js +2084 -3359
  6. package/dist/handsontable.full.min.css +3 -3
  7. package/dist/handsontable.full.min.js +59 -66
  8. package/dist/handsontable.js +2086 -3361
  9. package/dist/handsontable.min.css +3 -3
  10. package/dist/handsontable.min.js +16 -23
  11. package/helpers/mixed.js +2 -2
  12. package/helpers/mixed.mjs +2 -2
  13. package/package.json +1 -1
  14. package/pluginHooks.d.ts +6 -28
  15. package/pluginHooks.js +63 -117
  16. package/pluginHooks.mjs +63 -117
  17. package/plugins/copyPaste/clipboardData.js +18 -0
  18. package/plugins/copyPaste/clipboardData.mjs +14 -0
  19. package/plugins/copyPaste/copyPaste.js +92 -38
  20. package/plugins/copyPaste/copyPaste.mjs +94 -40
  21. package/plugins/copyPaste/pasteEvent.js +14 -0
  22. package/plugins/copyPaste/pasteEvent.mjs +9 -0
  23. package/plugins/mergeCells/mergeCells.js +14 -0
  24. package/plugins/mergeCells/mergeCells.mjs +14 -0
  25. package/plugins/nestedHeaders/nestedHeaders.js +22 -21
  26. package/plugins/nestedHeaders/nestedHeaders.mjs +22 -21
  27. package/utils/parseTable.js +83 -527
  28. package/utils/parseTable.mjs +82 -523
  29. package/plugins/copyPaste/clipboardData/clipboardData.js +0 -516
  30. package/plugins/copyPaste/clipboardData/clipboardData.mjs +0 -512
  31. package/plugins/copyPaste/clipboardData/copyClipboardData.js +0 -69
  32. package/plugins/copyPaste/clipboardData/copyClipboardData.mjs +0 -65
  33. package/plugins/copyPaste/clipboardData/index.js +0 -9
  34. package/plugins/copyPaste/clipboardData/index.mjs +0 -4
  35. package/plugins/copyPaste/clipboardData/pasteClipboardData.js +0 -81
  36. package/plugins/copyPaste/clipboardData/pasteClipboardData.mjs +0 -77
@@ -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
- }