handsontable 0.0.0-next-b66c79f-20230713 → 0.0.0-next-85c3085-20230713
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/cell/coords.js +37 -22
- package/3rdparty/walkontable/src/cell/coords.mjs +37 -22
- package/3rdparty/walkontable/src/cell/range.js +54 -39
- package/3rdparty/walkontable/src/cell/range.mjs +54 -39
- package/3rdparty/walkontable/src/core/_base.js +33 -31
- package/3rdparty/walkontable/src/core/_base.mjs +33 -31
- package/3rdparty/walkontable/src/core/clone.js +6 -3
- package/3rdparty/walkontable/src/core/clone.mjs +6 -3
- package/3rdparty/walkontable/src/event.js +2 -1
- package/3rdparty/walkontable/src/event.mjs +2 -1
- package/3rdparty/walkontable/src/overlay/_base.js +10 -8
- package/3rdparty/walkontable/src/overlay/_base.mjs +10 -8
- package/3rdparty/walkontable/src/overlay/bottom.js +10 -8
- package/3rdparty/walkontable/src/overlay/bottom.mjs +10 -8
- package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -1
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/top.js +11 -9
- package/3rdparty/walkontable/src/overlay/top.mjs +11 -9
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +16 -13
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +16 -13
- package/3rdparty/walkontable/src/overlays.js +75 -80
- package/3rdparty/walkontable/src/overlays.mjs +75 -80
- package/3rdparty/walkontable/src/scroll.js +27 -24
- package/3rdparty/walkontable/src/scroll.mjs +27 -24
- package/3rdparty/walkontable/src/settings.js +18 -17
- package/3rdparty/walkontable/src/settings.mjs +18 -17
- package/3rdparty/walkontable/src/table.js +42 -37
- package/3rdparty/walkontable/src/table.mjs +42 -37
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.js +8 -8
- package/core.mjs +8 -8
- package/dataMap/metaManager/metaLayers/cellMeta.js +2 -1
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -1
- package/dataMap/metaManager/metaLayers/globalMeta.js +1 -1
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +1 -1
- package/dataMap/metaManager/mods/dynamicCellMeta.js +3 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +3 -2
- package/dataMap/metaManager/utils.js +4 -2
- package/dataMap/metaManager/utils.mjs +4 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +3247 -2847
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +17 -17
- package/dist/handsontable.js +3249 -2849
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +17 -17
- package/editors/autocompleteEditor/autocompleteEditor.js +70 -67
- package/editors/autocompleteEditor/autocompleteEditor.mjs +70 -67
- package/editors/baseEditor/baseEditor.js +1 -1
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/dateEditor/dateEditor.js +2 -1
- package/editors/dateEditor/dateEditor.mjs +2 -1
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/object.js +1 -0
- package/helpers/object.mjs +1 -0
- package/index.js +5 -5
- package/index.mjs +5 -5
- package/package.json +1 -1
- package/plugins/autoColumnSize/autoColumnSize.js +4 -1
- package/plugins/autoColumnSize/autoColumnSize.mjs +4 -1
- package/plugins/collapsibleColumns/collapsibleColumns.js +54 -38
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +54 -38
- package/plugins/columnSorting/columnSorting.js +2 -1
- package/plugins/columnSorting/columnSorting.mjs +2 -1
- package/plugins/columnSorting/columnStatesManager.js +2 -1
- package/plugins/columnSorting/columnStatesManager.mjs +2 -1
- package/plugins/comments/comments.js +2 -2
- package/plugins/comments/comments.mjs +2 -2
- package/plugins/copyPaste/copyPaste.js +6 -4
- package/plugins/copyPaste/copyPaste.mjs +6 -4
- package/plugins/customBorders/customBorders.js +13 -9
- package/plugins/customBorders/customBorders.mjs +13 -9
- package/plugins/customBorders/utils.js +3 -3
- package/plugins/customBorders/utils.mjs +3 -3
- package/plugins/filters/conditionCollection.js +6 -5
- package/plugins/filters/conditionCollection.mjs +6 -5
- package/plugins/filters/filters.js +13 -7
- package/plugins/filters/filters.mjs +13 -7
- package/plugins/formulas/engine/register.js +3 -3
- package/plugins/formulas/engine/register.mjs +3 -3
- package/plugins/formulas/engine/settings.js +6 -3
- package/plugins/formulas/engine/settings.mjs +6 -3
- package/plugins/formulas/formulas.js +151 -143
- package/plugins/formulas/formulas.mjs +151 -143
- package/plugins/formulas/indexSyncer/axisSyncer.js +115 -79
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +115 -79
- package/plugins/formulas/indexSyncer/index.js +100 -64
- package/plugins/formulas/indexSyncer/index.mjs +100 -64
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +2 -2
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +2 -2
- package/plugins/hiddenColumns/hiddenColumns.js +51 -34
- package/plugins/hiddenColumns/hiddenColumns.mjs +51 -34
- package/plugins/hiddenRows/contextMenuItem/showRow.js +2 -2
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +2 -2
- package/plugins/hiddenRows/hiddenRows.js +50 -33
- package/plugins/hiddenRows/hiddenRows.mjs +50 -33
- package/plugins/manualRowResize/manualRowResize.js +2 -1
- package/plugins/manualRowResize/manualRowResize.mjs +2 -1
- package/plugins/mergeCells/mergeCells.js +1 -1
- package/plugins/mergeCells/mergeCells.mjs +1 -1
- package/plugins/nestedHeaders/nestedHeaders.js +88 -67
- package/plugins/nestedHeaders/nestedHeaders.mjs +87 -66
- package/plugins/nestedHeaders/stateManager/headersTree.js +58 -38
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +58 -38
- package/plugins/nestedHeaders/stateManager/index.js +70 -49
- package/plugins/nestedHeaders/stateManager/index.mjs +68 -47
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.js +1 -1
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +1 -1
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +57 -37
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +57 -37
- package/plugins/nestedHeaders/utils/ghostTable.js +39 -35
- package/plugins/nestedHeaders/utils/ghostTable.mjs +39 -35
- package/plugins/nestedRows/data/dataManager.js +4 -2
- package/plugins/nestedRows/data/dataManager.mjs +4 -2
- package/plugins/persistentState/storage.js +1 -0
- package/plugins/persistentState/storage.mjs +1 -0
- package/plugins/undoRedo/undoRedo.js +2 -1
- package/plugins/undoRedo/undoRedo.mjs +2 -1
- package/selection/highlight/visualSelection.js +10 -6
- package/selection/highlight/visualSelection.mjs +10 -6
- package/tableView.js +98 -80
- package/tableView.mjs +98 -80
- package/translations/changesObservable/observable.js +82 -54
- package/translations/changesObservable/observable.mjs +82 -54
- package/translations/changesObservable/observer.js +24 -11
- package/translations/changesObservable/observer.mjs +24 -11
- package/translations/maps/linkedPhysicalIndexToValueMap.js +14 -8
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +14 -8
- package/utils/dataStructures/tree.js +21 -18
- package/utils/dataStructures/tree.mjs +21 -18
@@ -1,6 +1,18 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
+
require("core-js/modules/es.error.cause.js");
|
5
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
6
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
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(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
9
|
+
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); }
|
10
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
11
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
12
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
13
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
14
|
+
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; } }
|
15
|
+
var _isRtl = /*#__PURE__*/new WeakMap();
|
4
16
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
5
17
|
/**
|
6
18
|
* @description
|
@@ -20,25 +32,28 @@ exports.__esModule = true;
|
|
20
32
|
* ```
|
21
33
|
*/
|
22
34
|
class CellCoords {
|
23
|
-
/**
|
24
|
-
* A visual row index.
|
25
|
-
*
|
26
|
-
* @type {number}
|
27
|
-
*/
|
28
|
-
row = null;
|
29
|
-
/**
|
30
|
-
* A visual column index.
|
31
|
-
*
|
32
|
-
* @type {number}
|
33
|
-
*/
|
34
|
-
col = null;
|
35
|
-
/**
|
36
|
-
* @type {boolean}
|
37
|
-
*/
|
38
|
-
#isRtl = false;
|
39
35
|
constructor(row, column) {
|
40
36
|
let isRtl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
41
|
-
|
37
|
+
/**
|
38
|
+
* A visual row index.
|
39
|
+
*
|
40
|
+
* @type {number}
|
41
|
+
*/
|
42
|
+
_defineProperty(this, "row", null);
|
43
|
+
/**
|
44
|
+
* A visual column index.
|
45
|
+
*
|
46
|
+
* @type {number}
|
47
|
+
*/
|
48
|
+
_defineProperty(this, "col", null);
|
49
|
+
/**
|
50
|
+
* @type {boolean}
|
51
|
+
*/
|
52
|
+
_classPrivateFieldInitSpec(this, _isRtl, {
|
53
|
+
writable: true,
|
54
|
+
value: false
|
55
|
+
});
|
56
|
+
_classPrivateFieldSet(this, _isRtl, isRtl);
|
42
57
|
if (typeof row !== 'undefined' && typeof column !== 'undefined') {
|
43
58
|
this.row = row;
|
44
59
|
this.col = column;
|
@@ -94,7 +109,7 @@ class CellCoords {
|
|
94
109
|
* @returns {boolean}
|
95
110
|
*/
|
96
111
|
isSouthEastOf(testedCoords) {
|
97
|
-
return this.row >= testedCoords.row && (this
|
112
|
+
return this.row >= testedCoords.row && (_classPrivateFieldGet(this, _isRtl) ? this.col <= testedCoords.col : this.col >= testedCoords.col);
|
98
113
|
}
|
99
114
|
|
100
115
|
/**
|
@@ -105,7 +120,7 @@ class CellCoords {
|
|
105
120
|
* @returns {boolean}
|
106
121
|
*/
|
107
122
|
isNorthWestOf(testedCoords) {
|
108
|
-
return this.row <= testedCoords.row && (this
|
123
|
+
return this.row <= testedCoords.row && (_classPrivateFieldGet(this, _isRtl) ? this.col >= testedCoords.col : this.col <= testedCoords.col);
|
109
124
|
}
|
110
125
|
|
111
126
|
/**
|
@@ -116,7 +131,7 @@ class CellCoords {
|
|
116
131
|
* @returns {boolean}
|
117
132
|
*/
|
118
133
|
isSouthWestOf(testedCoords) {
|
119
|
-
return this.row >= testedCoords.row && (this
|
134
|
+
return this.row >= testedCoords.row && (_classPrivateFieldGet(this, _isRtl) ? this.col >= testedCoords.col : this.col <= testedCoords.col);
|
120
135
|
}
|
121
136
|
|
122
137
|
/**
|
@@ -127,7 +142,7 @@ class CellCoords {
|
|
127
142
|
* @returns {boolean}
|
128
143
|
*/
|
129
144
|
isNorthEastOf(testedCoords) {
|
130
|
-
return this.row <= testedCoords.row && (this
|
145
|
+
return this.row <= testedCoords.row && (_classPrivateFieldGet(this, _isRtl) ? this.col <= testedCoords.col : this.col >= testedCoords.col);
|
131
146
|
}
|
132
147
|
|
133
148
|
/**
|
@@ -149,7 +164,7 @@ class CellCoords {
|
|
149
164
|
* @returns {CellCoords}
|
150
165
|
*/
|
151
166
|
clone() {
|
152
|
-
return new CellCoords(this.row, this.col, this
|
167
|
+
return new CellCoords(this.row, this.col, _classPrivateFieldGet(this, _isRtl));
|
153
168
|
}
|
154
169
|
|
155
170
|
/**
|
@@ -1,3 +1,15 @@
|
|
1
|
+
import "core-js/modules/es.error.cause.js";
|
2
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
3
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
4
|
+
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; }
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
6
|
+
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); }
|
7
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
8
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
9
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
10
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
11
|
+
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; } }
|
12
|
+
var _isRtl = /*#__PURE__*/new WeakMap();
|
1
13
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
2
14
|
/**
|
3
15
|
* @description
|
@@ -17,25 +29,28 @@
|
|
17
29
|
* ```
|
18
30
|
*/
|
19
31
|
class CellCoords {
|
20
|
-
/**
|
21
|
-
* A visual row index.
|
22
|
-
*
|
23
|
-
* @type {number}
|
24
|
-
*/
|
25
|
-
row = null;
|
26
|
-
/**
|
27
|
-
* A visual column index.
|
28
|
-
*
|
29
|
-
* @type {number}
|
30
|
-
*/
|
31
|
-
col = null;
|
32
|
-
/**
|
33
|
-
* @type {boolean}
|
34
|
-
*/
|
35
|
-
#isRtl = false;
|
36
32
|
constructor(row, column) {
|
37
33
|
let isRtl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
38
|
-
|
34
|
+
/**
|
35
|
+
* A visual row index.
|
36
|
+
*
|
37
|
+
* @type {number}
|
38
|
+
*/
|
39
|
+
_defineProperty(this, "row", null);
|
40
|
+
/**
|
41
|
+
* A visual column index.
|
42
|
+
*
|
43
|
+
* @type {number}
|
44
|
+
*/
|
45
|
+
_defineProperty(this, "col", null);
|
46
|
+
/**
|
47
|
+
* @type {boolean}
|
48
|
+
*/
|
49
|
+
_classPrivateFieldInitSpec(this, _isRtl, {
|
50
|
+
writable: true,
|
51
|
+
value: false
|
52
|
+
});
|
53
|
+
_classPrivateFieldSet(this, _isRtl, isRtl);
|
39
54
|
if (typeof row !== 'undefined' && typeof column !== 'undefined') {
|
40
55
|
this.row = row;
|
41
56
|
this.col = column;
|
@@ -91,7 +106,7 @@ class CellCoords {
|
|
91
106
|
* @returns {boolean}
|
92
107
|
*/
|
93
108
|
isSouthEastOf(testedCoords) {
|
94
|
-
return this.row >= testedCoords.row && (this
|
109
|
+
return this.row >= testedCoords.row && (_classPrivateFieldGet(this, _isRtl) ? this.col <= testedCoords.col : this.col >= testedCoords.col);
|
95
110
|
}
|
96
111
|
|
97
112
|
/**
|
@@ -102,7 +117,7 @@ class CellCoords {
|
|
102
117
|
* @returns {boolean}
|
103
118
|
*/
|
104
119
|
isNorthWestOf(testedCoords) {
|
105
|
-
return this.row <= testedCoords.row && (this
|
120
|
+
return this.row <= testedCoords.row && (_classPrivateFieldGet(this, _isRtl) ? this.col >= testedCoords.col : this.col <= testedCoords.col);
|
106
121
|
}
|
107
122
|
|
108
123
|
/**
|
@@ -113,7 +128,7 @@ class CellCoords {
|
|
113
128
|
* @returns {boolean}
|
114
129
|
*/
|
115
130
|
isSouthWestOf(testedCoords) {
|
116
|
-
return this.row >= testedCoords.row && (this
|
131
|
+
return this.row >= testedCoords.row && (_classPrivateFieldGet(this, _isRtl) ? this.col >= testedCoords.col : this.col <= testedCoords.col);
|
117
132
|
}
|
118
133
|
|
119
134
|
/**
|
@@ -124,7 +139,7 @@ class CellCoords {
|
|
124
139
|
* @returns {boolean}
|
125
140
|
*/
|
126
141
|
isNorthEastOf(testedCoords) {
|
127
|
-
return this.row <= testedCoords.row && (this
|
142
|
+
return this.row <= testedCoords.row && (_classPrivateFieldGet(this, _isRtl) ? this.col <= testedCoords.col : this.col >= testedCoords.col);
|
128
143
|
}
|
129
144
|
|
130
145
|
/**
|
@@ -146,7 +161,7 @@ class CellCoords {
|
|
146
161
|
* @returns {CellCoords}
|
147
162
|
*/
|
148
163
|
clone() {
|
149
|
-
return new CellCoords(this.row, this.col, this
|
164
|
+
return new CellCoords(this.row, this.col, _classPrivateFieldGet(this, _isRtl));
|
150
165
|
}
|
151
166
|
|
152
167
|
/**
|
@@ -2,8 +2,19 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.array.push.js");
|
5
|
+
require("core-js/modules/es.error.cause.js");
|
5
6
|
var _coords = _interopRequireDefault(require("./../cell/coords"));
|
6
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
9
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
10
|
+
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; }
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
12
|
+
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); }
|
13
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
14
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
15
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
16
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
17
|
+
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; } }
|
7
18
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
8
19
|
/**
|
9
20
|
* @description
|
@@ -23,43 +34,47 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
23
34
|
* import Handsontable, { CellRange } from '/handsontable/base';
|
24
35
|
* ```
|
25
36
|
*/
|
37
|
+
var _isRtl = /*#__PURE__*/new WeakMap();
|
26
38
|
class CellRange {
|
27
|
-
/**
|
28
|
-
* Used to draw bold border around a cell where selection was started and to edit the cell
|
29
|
-
* when you press Enter. The highlight cannot point to headers (negative values) so its
|
30
|
-
* coordinates object is normalized while assigning.
|
31
|
-
*
|
32
|
-
* @private
|
33
|
-
* @type {CellCoords}
|
34
|
-
*/
|
35
|
-
highlight = null;
|
36
|
-
/**
|
37
|
-
* Usually the same as highlight, but in Excel there is distinction - one can change
|
38
|
-
* highlight within a selection.
|
39
|
-
*
|
40
|
-
* @private
|
41
|
-
* @type {CellCoords}
|
42
|
-
*/
|
43
|
-
from = null;
|
44
|
-
/**
|
45
|
-
* End selection.
|
46
|
-
*
|
47
|
-
* @private
|
48
|
-
* @type {CellCoords}
|
49
|
-
*/
|
50
|
-
to = null;
|
51
|
-
/**
|
52
|
-
* @type {boolean}
|
53
|
-
*/
|
54
|
-
#isRtl = false;
|
55
39
|
constructor(highlight) {
|
56
40
|
let from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : highlight;
|
57
41
|
let to = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : highlight;
|
58
42
|
let isRtl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
43
|
+
/**
|
44
|
+
* Used to draw bold border around a cell where selection was started and to edit the cell
|
45
|
+
* when you press Enter. The highlight cannot point to headers (negative values) so its
|
46
|
+
* coordinates object is normalized while assigning.
|
47
|
+
*
|
48
|
+
* @private
|
49
|
+
* @type {CellCoords}
|
50
|
+
*/
|
51
|
+
_defineProperty(this, "highlight", null);
|
52
|
+
/**
|
53
|
+
* Usually the same as highlight, but in Excel there is distinction - one can change
|
54
|
+
* highlight within a selection.
|
55
|
+
*
|
56
|
+
* @private
|
57
|
+
* @type {CellCoords}
|
58
|
+
*/
|
59
|
+
_defineProperty(this, "from", null);
|
60
|
+
/**
|
61
|
+
* End selection.
|
62
|
+
*
|
63
|
+
* @private
|
64
|
+
* @type {CellCoords}
|
65
|
+
*/
|
66
|
+
_defineProperty(this, "to", null);
|
67
|
+
/**
|
68
|
+
* @type {boolean}
|
69
|
+
*/
|
70
|
+
_classPrivateFieldInitSpec(this, _isRtl, {
|
71
|
+
writable: true,
|
72
|
+
value: false
|
73
|
+
});
|
59
74
|
this.highlight = highlight.clone().normalize();
|
60
75
|
this.from = from.clone();
|
61
76
|
this.to = to.clone();
|
62
|
-
this
|
77
|
+
_classPrivateFieldSet(this, _isRtl, isRtl);
|
63
78
|
}
|
64
79
|
|
65
80
|
/**
|
@@ -452,7 +467,7 @@ class CellRange {
|
|
452
467
|
* @returns {CellCoords}
|
453
468
|
*/
|
454
469
|
getTopLeftCorner() {
|
455
|
-
return this
|
470
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getTopEndCorner() : this.getTopStartCorner();
|
456
471
|
}
|
457
472
|
|
458
473
|
/**
|
@@ -477,7 +492,7 @@ class CellRange {
|
|
477
492
|
* @returns {CellCoords}
|
478
493
|
*/
|
479
494
|
getBottomRightCorner() {
|
480
|
-
return this
|
495
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getBottomStartCorner() : this.getBottomEndCorner();
|
481
496
|
}
|
482
497
|
|
483
498
|
/**
|
@@ -502,7 +517,7 @@ class CellRange {
|
|
502
517
|
* @returns {CellCoords}
|
503
518
|
*/
|
504
519
|
getTopRightCorner() {
|
505
|
-
return this
|
520
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getTopStartCorner() : this.getTopEndCorner();
|
506
521
|
}
|
507
522
|
|
508
523
|
/**
|
@@ -527,7 +542,7 @@ class CellRange {
|
|
527
542
|
* @returns {CellCoords}
|
528
543
|
*/
|
529
544
|
getBottomLeftCorner() {
|
530
|
-
return this
|
545
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getBottomEndCorner() : this.getBottomStartCorner();
|
531
546
|
}
|
532
547
|
|
533
548
|
/**
|
@@ -552,7 +567,7 @@ class CellRange {
|
|
552
567
|
* @returns {CellCoords}
|
553
568
|
*/
|
554
569
|
getOuterTopLeftCorner() {
|
555
|
-
return this
|
570
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getOuterTopEndCorner() : this.getOuterTopStartCorner();
|
556
571
|
}
|
557
572
|
|
558
573
|
/**
|
@@ -577,7 +592,7 @@ class CellRange {
|
|
577
592
|
* @returns {CellCoords}
|
578
593
|
*/
|
579
594
|
getOuterBottomRightCorner() {
|
580
|
-
return this
|
595
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getOuterBottomStartCorner() : this.getOuterBottomEndCorner();
|
581
596
|
}
|
582
597
|
|
583
598
|
/**
|
@@ -602,7 +617,7 @@ class CellRange {
|
|
602
617
|
* @returns {CellCoords}
|
603
618
|
*/
|
604
619
|
getOuterTopRightCorner() {
|
605
|
-
return this
|
620
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getOuterTopStartCorner() : this.getOuterTopEndCorner();
|
606
621
|
}
|
607
622
|
|
608
623
|
/**
|
@@ -627,7 +642,7 @@ class CellRange {
|
|
627
642
|
* @returns {CellCoords}
|
628
643
|
*/
|
629
644
|
getOuterBottomLeftCorner() {
|
630
|
-
return this
|
645
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getOuterBottomEndCorner() : this.getOuterBottomStartCorner();
|
631
646
|
}
|
632
647
|
|
633
648
|
/**
|
@@ -796,7 +811,7 @@ class CellRange {
|
|
796
811
|
* @returns {CellRange}
|
797
812
|
*/
|
798
813
|
clone() {
|
799
|
-
return new CellRange(this.highlight, this.from, this.to, this
|
814
|
+
return new CellRange(this.highlight, this.from, this.to, _classPrivateFieldGet(this, _isRtl));
|
800
815
|
}
|
801
816
|
|
802
817
|
/**
|
@@ -830,7 +845,7 @@ class CellRange {
|
|
830
845
|
* @returns {CellCoords}
|
831
846
|
*/
|
832
847
|
_createCellCoords(row, column) {
|
833
|
-
return new _coords.default(row, column, this
|
848
|
+
return new _coords.default(row, column, _classPrivateFieldGet(this, _isRtl));
|
834
849
|
}
|
835
850
|
}
|
836
851
|
var _default = CellRange;
|
@@ -1,4 +1,15 @@
|
|
1
1
|
import "core-js/modules/es.array.push.js";
|
2
|
+
import "core-js/modules/es.error.cause.js";
|
3
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
4
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
5
|
+
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; }
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
7
|
+
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); }
|
8
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
9
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
10
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
11
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
12
|
+
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; } }
|
2
13
|
import CellCoords from "./../cell/coords.mjs";
|
3
14
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
4
15
|
/**
|
@@ -19,43 +30,47 @@ import CellCoords from "./../cell/coords.mjs";
|
|
19
30
|
* import Handsontable, { CellRange } from '/handsontable/base';
|
20
31
|
* ```
|
21
32
|
*/
|
33
|
+
var _isRtl = /*#__PURE__*/new WeakMap();
|
22
34
|
class CellRange {
|
23
|
-
/**
|
24
|
-
* Used to draw bold border around a cell where selection was started and to edit the cell
|
25
|
-
* when you press Enter. The highlight cannot point to headers (negative values) so its
|
26
|
-
* coordinates object is normalized while assigning.
|
27
|
-
*
|
28
|
-
* @private
|
29
|
-
* @type {CellCoords}
|
30
|
-
*/
|
31
|
-
highlight = null;
|
32
|
-
/**
|
33
|
-
* Usually the same as highlight, but in Excel there is distinction - one can change
|
34
|
-
* highlight within a selection.
|
35
|
-
*
|
36
|
-
* @private
|
37
|
-
* @type {CellCoords}
|
38
|
-
*/
|
39
|
-
from = null;
|
40
|
-
/**
|
41
|
-
* End selection.
|
42
|
-
*
|
43
|
-
* @private
|
44
|
-
* @type {CellCoords}
|
45
|
-
*/
|
46
|
-
to = null;
|
47
|
-
/**
|
48
|
-
* @type {boolean}
|
49
|
-
*/
|
50
|
-
#isRtl = false;
|
51
35
|
constructor(highlight) {
|
52
36
|
let from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : highlight;
|
53
37
|
let to = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : highlight;
|
54
38
|
let isRtl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
39
|
+
/**
|
40
|
+
* Used to draw bold border around a cell where selection was started and to edit the cell
|
41
|
+
* when you press Enter. The highlight cannot point to headers (negative values) so its
|
42
|
+
* coordinates object is normalized while assigning.
|
43
|
+
*
|
44
|
+
* @private
|
45
|
+
* @type {CellCoords}
|
46
|
+
*/
|
47
|
+
_defineProperty(this, "highlight", null);
|
48
|
+
/**
|
49
|
+
* Usually the same as highlight, but in Excel there is distinction - one can change
|
50
|
+
* highlight within a selection.
|
51
|
+
*
|
52
|
+
* @private
|
53
|
+
* @type {CellCoords}
|
54
|
+
*/
|
55
|
+
_defineProperty(this, "from", null);
|
56
|
+
/**
|
57
|
+
* End selection.
|
58
|
+
*
|
59
|
+
* @private
|
60
|
+
* @type {CellCoords}
|
61
|
+
*/
|
62
|
+
_defineProperty(this, "to", null);
|
63
|
+
/**
|
64
|
+
* @type {boolean}
|
65
|
+
*/
|
66
|
+
_classPrivateFieldInitSpec(this, _isRtl, {
|
67
|
+
writable: true,
|
68
|
+
value: false
|
69
|
+
});
|
55
70
|
this.highlight = highlight.clone().normalize();
|
56
71
|
this.from = from.clone();
|
57
72
|
this.to = to.clone();
|
58
|
-
this
|
73
|
+
_classPrivateFieldSet(this, _isRtl, isRtl);
|
59
74
|
}
|
60
75
|
|
61
76
|
/**
|
@@ -448,7 +463,7 @@ class CellRange {
|
|
448
463
|
* @returns {CellCoords}
|
449
464
|
*/
|
450
465
|
getTopLeftCorner() {
|
451
|
-
return this
|
466
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getTopEndCorner() : this.getTopStartCorner();
|
452
467
|
}
|
453
468
|
|
454
469
|
/**
|
@@ -473,7 +488,7 @@ class CellRange {
|
|
473
488
|
* @returns {CellCoords}
|
474
489
|
*/
|
475
490
|
getBottomRightCorner() {
|
476
|
-
return this
|
491
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getBottomStartCorner() : this.getBottomEndCorner();
|
477
492
|
}
|
478
493
|
|
479
494
|
/**
|
@@ -498,7 +513,7 @@ class CellRange {
|
|
498
513
|
* @returns {CellCoords}
|
499
514
|
*/
|
500
515
|
getTopRightCorner() {
|
501
|
-
return this
|
516
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getTopStartCorner() : this.getTopEndCorner();
|
502
517
|
}
|
503
518
|
|
504
519
|
/**
|
@@ -523,7 +538,7 @@ class CellRange {
|
|
523
538
|
* @returns {CellCoords}
|
524
539
|
*/
|
525
540
|
getBottomLeftCorner() {
|
526
|
-
return this
|
541
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getBottomEndCorner() : this.getBottomStartCorner();
|
527
542
|
}
|
528
543
|
|
529
544
|
/**
|
@@ -548,7 +563,7 @@ class CellRange {
|
|
548
563
|
* @returns {CellCoords}
|
549
564
|
*/
|
550
565
|
getOuterTopLeftCorner() {
|
551
|
-
return this
|
566
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getOuterTopEndCorner() : this.getOuterTopStartCorner();
|
552
567
|
}
|
553
568
|
|
554
569
|
/**
|
@@ -573,7 +588,7 @@ class CellRange {
|
|
573
588
|
* @returns {CellCoords}
|
574
589
|
*/
|
575
590
|
getOuterBottomRightCorner() {
|
576
|
-
return this
|
591
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getOuterBottomStartCorner() : this.getOuterBottomEndCorner();
|
577
592
|
}
|
578
593
|
|
579
594
|
/**
|
@@ -598,7 +613,7 @@ class CellRange {
|
|
598
613
|
* @returns {CellCoords}
|
599
614
|
*/
|
600
615
|
getOuterTopRightCorner() {
|
601
|
-
return this
|
616
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getOuterTopStartCorner() : this.getOuterTopEndCorner();
|
602
617
|
}
|
603
618
|
|
604
619
|
/**
|
@@ -623,7 +638,7 @@ class CellRange {
|
|
623
638
|
* @returns {CellCoords}
|
624
639
|
*/
|
625
640
|
getOuterBottomLeftCorner() {
|
626
|
-
return this
|
641
|
+
return _classPrivateFieldGet(this, _isRtl) ? this.getOuterBottomEndCorner() : this.getOuterBottomStartCorner();
|
627
642
|
}
|
628
643
|
|
629
644
|
/**
|
@@ -792,7 +807,7 @@ class CellRange {
|
|
792
807
|
* @returns {CellRange}
|
793
808
|
*/
|
794
809
|
clone() {
|
795
|
-
return new CellRange(this.highlight, this.from, this.to, this
|
810
|
+
return new CellRange(this.highlight, this.from, this.to, _classPrivateFieldGet(this, _isRtl));
|
796
811
|
}
|
797
812
|
|
798
813
|
/**
|
@@ -826,7 +841,7 @@ class CellRange {
|
|
826
841
|
* @returns {CellCoords}
|
827
842
|
*/
|
828
843
|
_createCellCoords(row, column) {
|
829
|
-
return new CellCoords(row, column, this
|
844
|
+
return new CellCoords(row, column, _classPrivateFieldGet(this, _isRtl));
|
830
845
|
}
|
831
846
|
}
|
832
847
|
export default CellRange;
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.array.push.js");
|
5
|
+
require("core-js/modules/es.error.cause.js");
|
5
6
|
var _element = require("../../../../helpers/dom/element");
|
6
7
|
var _string = require("../../../../helpers/string");
|
7
8
|
var _eventManager = _interopRequireDefault(require("../../../../eventManager"));
|
@@ -9,42 +10,14 @@ var _scroll = _interopRequireDefault(require("../scroll"));
|
|
9
10
|
var _coords = _interopRequireDefault(require("../cell/coords"));
|
10
11
|
var _range = _interopRequireDefault(require("../cell/range"));
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
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(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
15
|
+
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
16
|
/**
|
13
17
|
* @abstract
|
14
18
|
* @class Walkontable
|
15
19
|
*/
|
16
20
|
class CoreAbstract {
|
17
|
-
wtTable;
|
18
|
-
wtScroll;
|
19
|
-
wtViewport;
|
20
|
-
wtOverlays;
|
21
|
-
selections;
|
22
|
-
wtEvent;
|
23
|
-
/**
|
24
|
-
* The walkontable instance id.
|
25
|
-
*
|
26
|
-
* @public
|
27
|
-
* @type {Readonly<string>}
|
28
|
-
*/
|
29
|
-
guid = `wt_${(0, _string.randomString)()}`;
|
30
|
-
drawInterrupted = false;
|
31
|
-
drawn = false;
|
32
|
-
|
33
|
-
/**
|
34
|
-
* The DOM bindings.
|
35
|
-
*
|
36
|
-
* @public
|
37
|
-
* @type {DomBindings}
|
38
|
-
*/
|
39
|
-
domBindings;
|
40
|
-
|
41
|
-
/**
|
42
|
-
* Settings.
|
43
|
-
*
|
44
|
-
* @public
|
45
|
-
* @type {Settings}
|
46
|
-
*/
|
47
|
-
wtSettings;
|
48
21
|
get eventManager() {
|
49
22
|
return new _eventManager.default(this);
|
50
23
|
}
|
@@ -54,6 +27,35 @@ class CoreAbstract {
|
|
54
27
|
* @param {Settings} settings The Walkontable settings.
|
55
28
|
*/
|
56
29
|
constructor(table, settings) {
|
30
|
+
_defineProperty(this, "wtTable", void 0);
|
31
|
+
_defineProperty(this, "wtScroll", void 0);
|
32
|
+
_defineProperty(this, "wtViewport", void 0);
|
33
|
+
_defineProperty(this, "wtOverlays", void 0);
|
34
|
+
_defineProperty(this, "selections", void 0);
|
35
|
+
_defineProperty(this, "wtEvent", void 0);
|
36
|
+
/**
|
37
|
+
* The walkontable instance id.
|
38
|
+
*
|
39
|
+
* @public
|
40
|
+
* @type {Readonly<string>}
|
41
|
+
*/
|
42
|
+
_defineProperty(this, "guid", `wt_${(0, _string.randomString)()}`);
|
43
|
+
_defineProperty(this, "drawInterrupted", false);
|
44
|
+
_defineProperty(this, "drawn", false);
|
45
|
+
/**
|
46
|
+
* The DOM bindings.
|
47
|
+
*
|
48
|
+
* @public
|
49
|
+
* @type {DomBindings}
|
50
|
+
*/
|
51
|
+
_defineProperty(this, "domBindings", void 0);
|
52
|
+
/**
|
53
|
+
* Settings.
|
54
|
+
*
|
55
|
+
* @public
|
56
|
+
* @type {Settings}
|
57
|
+
*/
|
58
|
+
_defineProperty(this, "wtSettings", void 0);
|
57
59
|
this.domBindings = {
|
58
60
|
rootTable: table,
|
59
61
|
rootDocument: table.ownerDocument,
|