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.

Files changed (129) hide show
  1. package/3rdparty/walkontable/src/calculator/index.js +11 -6
  2. package/3rdparty/walkontable/src/calculator/index.mjs +5 -3
  3. package/3rdparty/walkontable/src/calculator/renderAllColumns.js +50 -0
  4. package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +46 -0
  5. package/3rdparty/walkontable/src/calculator/renderAllRows.js +50 -0
  6. package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +46 -0
  7. package/3rdparty/walkontable/src/calculator/viewportColumns.js +1 -122
  8. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +2 -124
  9. package/3rdparty/walkontable/src/calculator/viewportRows.js +1 -1
  10. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +2 -3
  11. package/3rdparty/walkontable/src/core/_base.js +0 -12
  12. package/3rdparty/walkontable/src/core/_base.mjs +0 -12
  13. package/3rdparty/walkontable/src/core/core.js +0 -2
  14. package/3rdparty/walkontable/src/core/core.mjs +0 -2
  15. package/3rdparty/walkontable/src/facade/core.js +0 -9
  16. package/3rdparty/walkontable/src/facade/core.mjs +0 -9
  17. package/3rdparty/walkontable/src/index.js +3 -4
  18. package/3rdparty/walkontable/src/index.mjs +1 -2
  19. package/3rdparty/walkontable/src/overlays.js +0 -3
  20. package/3rdparty/walkontable/src/overlays.mjs +0 -4
  21. package/3rdparty/walkontable/src/renderer/colGroup.js +10 -0
  22. package/3rdparty/walkontable/src/renderer/colGroup.mjs +10 -0
  23. package/3rdparty/walkontable/src/renderer/rows.js +4 -3
  24. package/3rdparty/walkontable/src/renderer/rows.mjs +4 -3
  25. package/3rdparty/walkontable/src/selection/manager.js +0 -1
  26. package/3rdparty/walkontable/src/selection/manager.mjs +0 -1
  27. package/3rdparty/walkontable/src/settings.js +3 -0
  28. package/3rdparty/walkontable/src/settings.mjs +2 -0
  29. package/3rdparty/walkontable/src/table.js +0 -1
  30. package/3rdparty/walkontable/src/table.mjs +0 -1
  31. package/3rdparty/walkontable/src/utils/column.js +27 -12
  32. package/3rdparty/walkontable/src/utils/column.mjs +27 -12
  33. package/3rdparty/walkontable/src/utils/columnStretching.js +219 -0
  34. package/3rdparty/walkontable/src/utils/columnStretching.mjs +215 -0
  35. package/3rdparty/walkontable/src/viewport.js +22 -17
  36. package/3rdparty/walkontable/src/viewport.mjs +23 -18
  37. package/base.js +4 -2
  38. package/base.mjs +2 -2
  39. package/core/focusCatcher/index.js +44 -6
  40. package/core/focusCatcher/index.mjs +44 -6
  41. package/core.js +0 -11
  42. package/core.mjs +0 -11
  43. package/dataMap/dataMap.js +1 -0
  44. package/dataMap/metaManager/metaSchema.js +28 -2
  45. package/dataMap/metaManager/metaSchema.mjs +28 -2
  46. package/dataMap/metaManager/mods/extendMetaProperties.js +12 -0
  47. package/dataMap/metaManager/mods/extendMetaProperties.mjs +12 -0
  48. package/dist/handsontable.css +2 -2
  49. package/dist/handsontable.full.css +3 -3
  50. package/dist/handsontable.full.js +3979 -5577
  51. package/dist/handsontable.full.min.css +3 -3
  52. package/dist/handsontable.full.min.js +66 -71
  53. package/dist/handsontable.js +3058 -4305
  54. package/dist/handsontable.min.css +2 -2
  55. package/dist/handsontable.min.js +35 -39
  56. package/editorManager.js +3 -4
  57. package/editorManager.mjs +3 -4
  58. package/editors/autocompleteEditor/autocompleteEditor.js +0 -2
  59. package/editors/autocompleteEditor/autocompleteEditor.mjs +0 -2
  60. package/editors/dateEditor/dateEditor.d.ts +1 -1
  61. package/editors/dateEditor/dateEditor.js +4 -1
  62. package/editors/dateEditor/dateEditor.mjs +4 -1
  63. package/editors/handsontableEditor/handsontableEditor.js +0 -1
  64. package/editors/handsontableEditor/handsontableEditor.mjs +0 -1
  65. package/editors/textEditor/textEditor.js +0 -4
  66. package/editors/textEditor/textEditor.mjs +0 -4
  67. package/helpers/browser.js +5 -2
  68. package/helpers/browser.mjs +5 -2
  69. package/helpers/feature.js +10 -0
  70. package/helpers/feature.mjs +9 -0
  71. package/helpers/mixed.js +1 -1
  72. package/helpers/mixed.mjs +1 -1
  73. package/package.json +3 -4
  74. package/pluginHooks.d.ts +6 -29
  75. package/pluginHooks.js +65 -123
  76. package/pluginHooks.mjs +62 -122
  77. package/plugins/copyPaste/clipboardData.js +18 -0
  78. package/plugins/copyPaste/clipboardData.mjs +14 -0
  79. package/plugins/copyPaste/copyPaste.js +129 -51
  80. package/plugins/copyPaste/copyPaste.mjs +132 -54
  81. package/plugins/copyPaste/copyableRanges.js +43 -7
  82. package/plugins/copyPaste/copyableRanges.mjs +42 -7
  83. package/plugins/copyPaste/pasteEvent.mjs +1 -1
  84. package/plugins/customBorders/customBorders.js +0 -5
  85. package/plugins/customBorders/customBorders.mjs +0 -5
  86. package/plugins/customBorders/utils.js +0 -1
  87. package/plugins/customBorders/utils.mjs +0 -1
  88. package/plugins/filters/ui/radioInput.js +1 -1
  89. package/plugins/filters/ui/radioInput.mjs +1 -1
  90. package/plugins/formulas/formulas.js +0 -2
  91. package/plugins/formulas/formulas.mjs +0 -2
  92. package/plugins/formulas/indexSyncer/axisSyncer.js +0 -1
  93. package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -1
  94. package/plugins/manualColumnResize/manualColumnResize.js +0 -1
  95. package/plugins/manualColumnResize/manualColumnResize.mjs +0 -1
  96. package/plugins/mergeCells/mergeCells.js +1 -127
  97. package/plugins/mergeCells/mergeCells.mjs +1 -127
  98. package/plugins/nestedHeaders/nestedHeaders.js +41 -87
  99. package/plugins/nestedHeaders/nestedHeaders.mjs +42 -88
  100. package/plugins/nestedHeaders/stateManager/headersTree.js +0 -1
  101. package/plugins/nestedHeaders/stateManager/headersTree.mjs +0 -1
  102. package/plugins/undoRedo/undoRedo.js +0 -2
  103. package/plugins/undoRedo/undoRedo.mjs +0 -2
  104. package/renderers/autocompleteRenderer/autocompleteRenderer.js +0 -1
  105. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +0 -1
  106. package/renderers/checkboxRenderer/checkboxRenderer.js +0 -2
  107. package/renderers/checkboxRenderer/checkboxRenderer.mjs +0 -2
  108. package/selection/highlight/highlight.js +0 -1
  109. package/selection/highlight/highlight.mjs +0 -1
  110. package/selection/index.js +1 -3
  111. package/selection/index.mjs +2 -2
  112. package/selection/utils.js +0 -34
  113. package/selection/utils.mjs +0 -33
  114. package/settings.d.ts +2 -1
  115. package/tableView.js +1 -2
  116. package/tableView.mjs +1 -2
  117. package/translations/indexMapper.js +2 -1
  118. package/utils/parseTable.js +84 -538
  119. package/utils/parseTable.mjs +83 -534
  120. package/validators/timeValidator/timeValidator.js +0 -1
  121. package/validators/timeValidator/timeValidator.mjs +0 -1
  122. package/plugins/copyPaste/clipboardData/clipboardData.js +0 -588
  123. package/plugins/copyPaste/clipboardData/clipboardData.mjs +0 -584
  124. package/plugins/copyPaste/clipboardData/copyClipboardData.js +0 -69
  125. package/plugins/copyPaste/clipboardData/copyClipboardData.mjs +0 -65
  126. package/plugins/copyPaste/clipboardData/index.js +0 -9
  127. package/plugins/copyPaste/clipboardData/index.mjs +0 -4
  128. package/plugins/copyPaste/clipboardData/pasteClipboardData.js +0 -81
  129. 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,4 +0,0 @@
1
- import { CopyClipboardData } from "./copyClipboardData.mjs";
2
- import { PasteClipboardData } from "./pasteClipboardData.mjs";
3
- import { META_HEAD } from "./clipboardData.mjs";
4
- export { CopyClipboardData, PasteClipboardData, 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
- }