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,5 +1,12 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
import "core-js/modules/es.array.push.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 _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
6
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
7
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
8
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
9
|
+
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; } }
|
3
10
|
import { extend, isObject } from "../../../helpers/object.mjs";
|
4
11
|
import { arrayEach } from "../../../helpers/array.mjs";
|
5
12
|
import { normalizeSettings } from "./settingsNormalizer.mjs";
|
@@ -18,30 +25,43 @@ export const HEADER_CONFIGURABLE_PROPS = ['label', 'collapsible'];
|
|
18
25
|
* @private
|
19
26
|
* @class SourceSettings
|
20
27
|
*/
|
28
|
+
var _data = /*#__PURE__*/new WeakMap();
|
29
|
+
var _dataLength = /*#__PURE__*/new WeakMap();
|
30
|
+
var _columnsLimit = /*#__PURE__*/new WeakMap();
|
21
31
|
export default class SourceSettings {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
32
|
+
constructor() {
|
33
|
+
/**
|
34
|
+
* The normalized source data (normalized user-defined settings for nested headers).
|
35
|
+
*
|
36
|
+
* @private
|
37
|
+
* @type {Array[]}
|
38
|
+
*/
|
39
|
+
_classPrivateFieldInitSpec(this, _data, {
|
40
|
+
writable: true,
|
41
|
+
value: []
|
42
|
+
});
|
43
|
+
/**
|
44
|
+
* The total length of the nested header layers.
|
45
|
+
*
|
46
|
+
* @private
|
47
|
+
* @type {number}
|
48
|
+
*/
|
49
|
+
_classPrivateFieldInitSpec(this, _dataLength, {
|
50
|
+
writable: true,
|
51
|
+
value: 0
|
52
|
+
});
|
53
|
+
/**
|
54
|
+
* Columns count limit value trims source settings to that value. If columns
|
55
|
+
* count limit intersects nested header, the header's colspan value is reduced
|
56
|
+
* to keep the whole structure stable (trimmed precisely where the limit is set).
|
57
|
+
*
|
58
|
+
* @type {number}
|
59
|
+
*/
|
60
|
+
_classPrivateFieldInitSpec(this, _columnsLimit, {
|
61
|
+
writable: true,
|
62
|
+
value: Infinity
|
63
|
+
});
|
64
|
+
}
|
45
65
|
/**
|
46
66
|
* Sets columns limit to the source settings will be trimmed. All headers which
|
47
67
|
* overlap the column limit will be reduced to keep the structure solid.
|
@@ -49,7 +69,7 @@ export default class SourceSettings {
|
|
49
69
|
* @param {number} columnsCount The number of columns to limit to.
|
50
70
|
*/
|
51
71
|
setColumnsLimit(columnsCount) {
|
52
|
-
this
|
72
|
+
_classPrivateFieldSet(this, _columnsLimit, columnsCount);
|
53
73
|
}
|
54
74
|
|
55
75
|
/**
|
@@ -59,8 +79,8 @@ export default class SourceSettings {
|
|
59
79
|
*/
|
60
80
|
setData() {
|
61
81
|
let nestedHeadersSettings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
62
|
-
this
|
63
|
-
this
|
82
|
+
_classPrivateFieldSet(this, _data, normalizeSettings(nestedHeadersSettings, _classPrivateFieldGet(this, _columnsLimit)));
|
83
|
+
_classPrivateFieldSet(this, _dataLength, _classPrivateFieldGet(this, _data).length);
|
64
84
|
}
|
65
85
|
|
66
86
|
/**
|
@@ -69,7 +89,7 @@ export default class SourceSettings {
|
|
69
89
|
* @returns {Array[]}
|
70
90
|
*/
|
71
91
|
getData() {
|
72
|
-
return this
|
92
|
+
return _classPrivateFieldGet(this, _data);
|
73
93
|
}
|
74
94
|
|
75
95
|
/**
|
@@ -101,7 +121,7 @@ export default class SourceSettings {
|
|
101
121
|
* header settings.
|
102
122
|
*/
|
103
123
|
map(callback) {
|
104
|
-
arrayEach(this
|
124
|
+
arrayEach(_classPrivateFieldGet(this, _data), header => {
|
105
125
|
arrayEach(header, headerSettings => {
|
106
126
|
const propsToExtend = callback({
|
107
127
|
...headerSettings
|
@@ -124,14 +144,14 @@ export default class SourceSettings {
|
|
124
144
|
*/
|
125
145
|
getHeaderSettings(headerLevel, columnIndex) {
|
126
146
|
var _headersSettings$colu;
|
127
|
-
if (headerLevel >= this
|
147
|
+
if (headerLevel >= _classPrivateFieldGet(this, _dataLength) || headerLevel < 0) {
|
128
148
|
return null;
|
129
149
|
}
|
130
|
-
const headersSettings = this
|
150
|
+
const headersSettings = _classPrivateFieldGet(this, _data)[headerLevel];
|
131
151
|
if (columnIndex >= headersSettings.length) {
|
132
152
|
return null;
|
133
153
|
}
|
134
|
-
return (_headersSettings$colu = headersSettings[columnIndex])
|
154
|
+
return (_headersSettings$colu = headersSettings[columnIndex]) !== null && _headersSettings$colu !== void 0 ? _headersSettings$colu : null;
|
135
155
|
}
|
136
156
|
|
137
157
|
/**
|
@@ -147,10 +167,10 @@ export default class SourceSettings {
|
|
147
167
|
getHeadersSettings(headerLevel, columnIndex) {
|
148
168
|
let columnsLength = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
149
169
|
const headersSettingsChunks = [];
|
150
|
-
if (headerLevel >= this
|
170
|
+
if (headerLevel >= _classPrivateFieldGet(this, _dataLength) || headerLevel < 0) {
|
151
171
|
return headersSettingsChunks;
|
152
172
|
}
|
153
|
-
const headersSettings = this
|
173
|
+
const headersSettings = _classPrivateFieldGet(this, _data)[headerLevel];
|
154
174
|
let currentLength = 0;
|
155
175
|
for (let i = columnIndex; i < headersSettings.length; i++) {
|
156
176
|
const headerSettings = headersSettings[i];
|
@@ -181,7 +201,7 @@ export default class SourceSettings {
|
|
181
201
|
* @returns {number}
|
182
202
|
*/
|
183
203
|
getLayersCount() {
|
184
|
-
return this
|
204
|
+
return _classPrivateFieldGet(this, _dataLength);
|
185
205
|
}
|
186
206
|
|
187
207
|
/**
|
@@ -190,14 +210,14 @@ export default class SourceSettings {
|
|
190
210
|
* @returns {number}
|
191
211
|
*/
|
192
212
|
getColumnsCount() {
|
193
|
-
return this
|
213
|
+
return _classPrivateFieldGet(this, _dataLength) > 0 ? _classPrivateFieldGet(this, _data)[0].length : 0;
|
194
214
|
}
|
195
215
|
|
196
216
|
/**
|
197
217
|
* Clears the data.
|
198
218
|
*/
|
199
219
|
clear() {
|
200
|
-
this
|
201
|
-
this
|
220
|
+
_classPrivateFieldSet(this, _data, []);
|
221
|
+
_classPrivateFieldSet(this, _dataLength, 0);
|
202
222
|
}
|
203
223
|
}
|
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
+
require("core-js/modules/es.error.cause.js");
|
4
5
|
var _element = require("../../../helpers/dom/element");
|
6
|
+
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; }
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
8
|
+
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
9
|
/**
|
6
10
|
* The class generates the nested headers structure in the DOM and reads the column width for
|
7
11
|
* each column. The hierarchy is built only for visible, non-hidden columns. Each time the
|
@@ -11,42 +15,42 @@ var _element = require("../../../helpers/dom/element");
|
|
11
15
|
* @private
|
12
16
|
*/
|
13
17
|
class GhostTable {
|
14
|
-
/**
|
15
|
-
* Reference to the Handsontable instance.
|
16
|
-
*
|
17
|
-
* @private
|
18
|
-
* @type {Handsontable}
|
19
|
-
*/
|
20
|
-
hot;
|
21
|
-
/**
|
22
|
-
* The function for retrieving the nested headers settings.
|
23
|
-
*
|
24
|
-
* @private
|
25
|
-
* @type {Function}
|
26
|
-
*/
|
27
|
-
nestedHeaderSettingsGetter;
|
28
|
-
/**
|
29
|
-
* The value that holds information about the number of the nested header layers (header rows).
|
30
|
-
*
|
31
|
-
* @private
|
32
|
-
* @type {number}
|
33
|
-
*/
|
34
|
-
layersCount = 0;
|
35
|
-
/**
|
36
|
-
* Temporary element created to get minimal headers widths.
|
37
|
-
*
|
38
|
-
* @private
|
39
|
-
* @type {*}
|
40
|
-
*/
|
41
|
-
container;
|
42
|
-
/**
|
43
|
-
* PhysicalIndexToValueMap to keep and track of the columns' widths.
|
44
|
-
*
|
45
|
-
* @private
|
46
|
-
* @type {PhysicalIndexToValueMap}
|
47
|
-
*/
|
48
|
-
widthsMap;
|
49
18
|
constructor(hot, nestedHeaderSettingsGetter) {
|
19
|
+
/**
|
20
|
+
* Reference to the Handsontable instance.
|
21
|
+
*
|
22
|
+
* @private
|
23
|
+
* @type {Handsontable}
|
24
|
+
*/
|
25
|
+
_defineProperty(this, "hot", void 0);
|
26
|
+
/**
|
27
|
+
* The function for retrieving the nested headers settings.
|
28
|
+
*
|
29
|
+
* @private
|
30
|
+
* @type {Function}
|
31
|
+
*/
|
32
|
+
_defineProperty(this, "nestedHeaderSettingsGetter", void 0);
|
33
|
+
/**
|
34
|
+
* The value that holds information about the number of the nested header layers (header rows).
|
35
|
+
*
|
36
|
+
* @private
|
37
|
+
* @type {number}
|
38
|
+
*/
|
39
|
+
_defineProperty(this, "layersCount", 0);
|
40
|
+
/**
|
41
|
+
* Temporary element created to get minimal headers widths.
|
42
|
+
*
|
43
|
+
* @private
|
44
|
+
* @type {*}
|
45
|
+
*/
|
46
|
+
_defineProperty(this, "container", void 0);
|
47
|
+
/**
|
48
|
+
* PhysicalIndexToValueMap to keep and track of the columns' widths.
|
49
|
+
*
|
50
|
+
* @private
|
51
|
+
* @type {PhysicalIndexToValueMap}
|
52
|
+
*/
|
53
|
+
_defineProperty(this, "widthsMap", void 0);
|
50
54
|
this.hot = hot;
|
51
55
|
this.nestedHeaderSettingsGetter = nestedHeaderSettingsGetter;
|
52
56
|
this.widthsMap = this.hot.columnIndexMapper.createAndRegisterIndexMap('nestedHeaders.widthsMap', 'physicalIndexToValue');
|
@@ -1,3 +1,7 @@
|
|
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); }
|
1
5
|
import { fastInnerHTML } from "../../../helpers/dom/element.mjs";
|
2
6
|
/**
|
3
7
|
* The class generates the nested headers structure in the DOM and reads the column width for
|
@@ -8,42 +12,42 @@ import { fastInnerHTML } from "../../../helpers/dom/element.mjs";
|
|
8
12
|
* @private
|
9
13
|
*/
|
10
14
|
class GhostTable {
|
11
|
-
/**
|
12
|
-
* Reference to the Handsontable instance.
|
13
|
-
*
|
14
|
-
* @private
|
15
|
-
* @type {Handsontable}
|
16
|
-
*/
|
17
|
-
hot;
|
18
|
-
/**
|
19
|
-
* The function for retrieving the nested headers settings.
|
20
|
-
*
|
21
|
-
* @private
|
22
|
-
* @type {Function}
|
23
|
-
*/
|
24
|
-
nestedHeaderSettingsGetter;
|
25
|
-
/**
|
26
|
-
* The value that holds information about the number of the nested header layers (header rows).
|
27
|
-
*
|
28
|
-
* @private
|
29
|
-
* @type {number}
|
30
|
-
*/
|
31
|
-
layersCount = 0;
|
32
|
-
/**
|
33
|
-
* Temporary element created to get minimal headers widths.
|
34
|
-
*
|
35
|
-
* @private
|
36
|
-
* @type {*}
|
37
|
-
*/
|
38
|
-
container;
|
39
|
-
/**
|
40
|
-
* PhysicalIndexToValueMap to keep and track of the columns' widths.
|
41
|
-
*
|
42
|
-
* @private
|
43
|
-
* @type {PhysicalIndexToValueMap}
|
44
|
-
*/
|
45
|
-
widthsMap;
|
46
15
|
constructor(hot, nestedHeaderSettingsGetter) {
|
16
|
+
/**
|
17
|
+
* Reference to the Handsontable instance.
|
18
|
+
*
|
19
|
+
* @private
|
20
|
+
* @type {Handsontable}
|
21
|
+
*/
|
22
|
+
_defineProperty(this, "hot", void 0);
|
23
|
+
/**
|
24
|
+
* The function for retrieving the nested headers settings.
|
25
|
+
*
|
26
|
+
* @private
|
27
|
+
* @type {Function}
|
28
|
+
*/
|
29
|
+
_defineProperty(this, "nestedHeaderSettingsGetter", void 0);
|
30
|
+
/**
|
31
|
+
* The value that holds information about the number of the nested header layers (header rows).
|
32
|
+
*
|
33
|
+
* @private
|
34
|
+
* @type {number}
|
35
|
+
*/
|
36
|
+
_defineProperty(this, "layersCount", 0);
|
37
|
+
/**
|
38
|
+
* Temporary element created to get minimal headers widths.
|
39
|
+
*
|
40
|
+
* @private
|
41
|
+
* @type {*}
|
42
|
+
*/
|
43
|
+
_defineProperty(this, "container", void 0);
|
44
|
+
/**
|
45
|
+
* PhysicalIndexToValueMap to keep and track of the columns' widths.
|
46
|
+
*
|
47
|
+
* @private
|
48
|
+
* @type {PhysicalIndexToValueMap}
|
49
|
+
*/
|
50
|
+
_defineProperty(this, "widthsMap", void 0);
|
47
51
|
this.hot = hot;
|
48
52
|
this.nestedHeaderSettingsGetter = nestedHeaderSettingsGetter;
|
49
53
|
this.widthsMap = this.hot.columnIndexMapper.createAndRegisterIndexMap('nestedHeaders.widthsMap', 'physicalIndexToValue');
|
@@ -374,7 +374,8 @@ class DataManager {
|
|
374
374
|
* @returns {object|null} The child element or `null` if the child doesn't exist.
|
375
375
|
*/
|
376
376
|
getChild(parent, index) {
|
377
|
-
|
377
|
+
var _parent$__children;
|
378
|
+
return ((_parent$__children = parent.__children) === null || _parent$__children === void 0 ? void 0 : _parent$__children[index]) || null;
|
378
379
|
}
|
379
380
|
|
380
381
|
/**
|
@@ -394,11 +395,12 @@ class DataManager {
|
|
394
395
|
* @returns {boolean} `true` if the row is a parent, `false` otherwise.
|
395
396
|
*/
|
396
397
|
isParent(row) {
|
398
|
+
var _rowObj$__children;
|
397
399
|
let rowObj = row;
|
398
400
|
if (!isNaN(rowObj)) {
|
399
401
|
rowObj = this.getDataObject(rowObj);
|
400
402
|
}
|
401
|
-
return rowObj && !!rowObj.__children && rowObj.__children
|
403
|
+
return rowObj && !!rowObj.__children && ((_rowObj$__children = rowObj.__children) === null || _rowObj$__children === void 0 ? void 0 : _rowObj$__children.length) !== 0;
|
402
404
|
}
|
403
405
|
|
404
406
|
/**
|
@@ -371,7 +371,8 @@ class DataManager {
|
|
371
371
|
* @returns {object|null} The child element or `null` if the child doesn't exist.
|
372
372
|
*/
|
373
373
|
getChild(parent, index) {
|
374
|
-
|
374
|
+
var _parent$__children;
|
375
|
+
return ((_parent$__children = parent.__children) === null || _parent$__children === void 0 ? void 0 : _parent$__children[index]) || null;
|
375
376
|
}
|
376
377
|
|
377
378
|
/**
|
@@ -391,11 +392,12 @@ class DataManager {
|
|
391
392
|
* @returns {boolean} `true` if the row is a parent, `false` otherwise.
|
392
393
|
*/
|
393
394
|
isParent(row) {
|
395
|
+
var _rowObj$__children;
|
394
396
|
let rowObj = row;
|
395
397
|
if (!isNaN(rowObj)) {
|
396
398
|
rowObj = this.getDataObject(rowObj);
|
397
399
|
}
|
398
|
-
return rowObj && !!rowObj.__children && rowObj.__children
|
400
|
+
return rowObj && !!rowObj.__children && ((_rowObj$__children = rowObj.__children) === null || _rowObj$__children === void 0 ? void 0 : _rowObj$__children.length) !== 0;
|
399
401
|
}
|
400
402
|
|
401
403
|
/**
|
@@ -830,7 +830,8 @@ function removeExposedUndoRedoMethods(instance) {
|
|
830
830
|
}
|
831
831
|
const hook = _pluginHooks.default.getSingleton();
|
832
832
|
hook.add('afterUpdateSettings', function () {
|
833
|
-
|
833
|
+
var _this$getPlugin;
|
834
|
+
(_this$getPlugin = this.getPlugin('undoRedo')) === null || _this$getPlugin === void 0 ? void 0 : _this$getPlugin.init();
|
834
835
|
});
|
835
836
|
hook.register('beforeUndo');
|
836
837
|
hook.register('afterUndo');
|
@@ -825,7 +825,8 @@ function removeExposedUndoRedoMethods(instance) {
|
|
825
825
|
}
|
826
826
|
const hook = Hooks.getSingleton();
|
827
827
|
hook.add('afterUpdateSettings', function () {
|
828
|
-
|
828
|
+
var _this$getPlugin;
|
829
|
+
(_this$getPlugin = this.getPlugin('undoRedo')) === null || _this$getPlugin === void 0 ? void 0 : _this$getPlugin.init();
|
829
830
|
});
|
830
831
|
hook.register('beforeUndo');
|
831
832
|
hook.register('afterUndo');
|
@@ -1,16 +1,20 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
+
require("core-js/modules/es.error.cause.js");
|
4
5
|
var _src = require("./../../3rdparty/walkontable/src");
|
6
|
+
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; }
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
8
|
+
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
9
|
class VisualSelection extends _src.Selection {
|
6
|
-
/**
|
7
|
-
* Range of selection visually. Visual representation may have representation in a rendered selection.
|
8
|
-
*
|
9
|
-
* @type {null|CellRange}
|
10
|
-
*/
|
11
|
-
visualCellRange = null;
|
12
10
|
constructor(settings, visualCellRange) {
|
13
11
|
super(settings, null);
|
12
|
+
/**
|
13
|
+
* Range of selection visually. Visual representation may have representation in a rendered selection.
|
14
|
+
*
|
15
|
+
* @type {null|CellRange}
|
16
|
+
*/
|
17
|
+
_defineProperty(this, "visualCellRange", null);
|
14
18
|
this.visualCellRange = visualCellRange || null;
|
15
19
|
this.commit();
|
16
20
|
}
|
@@ -1,13 +1,17 @@
|
|
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); }
|
1
5
|
import { Selection } from "./../../3rdparty/walkontable/src/index.mjs";
|
2
6
|
class VisualSelection extends Selection {
|
3
|
-
/**
|
4
|
-
* Range of selection visually. Visual representation may have representation in a rendered selection.
|
5
|
-
*
|
6
|
-
* @type {null|CellRange}
|
7
|
-
*/
|
8
|
-
visualCellRange = null;
|
9
7
|
constructor(settings, visualCellRange) {
|
10
8
|
super(settings, null);
|
9
|
+
/**
|
10
|
+
* Range of selection visually. Visual representation may have representation in a rendered selection.
|
11
|
+
*
|
12
|
+
* @type {null|CellRange}
|
13
|
+
*/
|
14
|
+
_defineProperty(this, "visualCellRange", null);
|
11
15
|
this.visualCellRange = visualCellRange || null;
|
12
16
|
this.commit();
|
13
17
|
}
|