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
@@ -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 _handsontableEditor = require("../handsontableEditor");
|
6
7
|
var _array = require("../../helpers/array");
|
7
8
|
var _element = require("../../helpers/dom/element");
|
@@ -9,6 +10,9 @@ var _mixed = require("../../helpers/mixed");
|
|
9
10
|
var _string = require("../../helpers/string");
|
10
11
|
var _unicode = require("../../helpers/unicode");
|
11
12
|
var _textRenderer = require("../../renderers/textRenderer");
|
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
|
const privatePool = new WeakMap();
|
13
17
|
const EDITOR_TYPE = 'autocomplete';
|
14
18
|
|
@@ -28,6 +32,72 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
28
32
|
*
|
29
33
|
* @type {string}
|
30
34
|
*/
|
35
|
+
/**
|
36
|
+
* Filters and sorts by relevance.
|
37
|
+
*
|
38
|
+
* @param {*} value The selected value.
|
39
|
+
* @param {string[]} choices The list of available choices.
|
40
|
+
* @param {boolean} caseSensitive Indicates if it's sorted by case.
|
41
|
+
* @returns {number[]} Array of indexes in original choices array.
|
42
|
+
*/
|
43
|
+
_defineProperty(this, "sortByRelevance", function (value, choices, caseSensitive) {
|
44
|
+
const choicesRelevance = [];
|
45
|
+
const result = [];
|
46
|
+
const valueLength = value.length;
|
47
|
+
let choicesCount = choices.length;
|
48
|
+
let charsLeft;
|
49
|
+
let currentItem;
|
50
|
+
let i;
|
51
|
+
let valueIndex;
|
52
|
+
if (valueLength === 0) {
|
53
|
+
for (i = 0; i < choicesCount; i++) {
|
54
|
+
result.push(i);
|
55
|
+
}
|
56
|
+
return result;
|
57
|
+
}
|
58
|
+
for (i = 0; i < choicesCount; i++) {
|
59
|
+
currentItem = (0, _string.stripTags)((0, _mixed.stringify)(choices[i]));
|
60
|
+
if (caseSensitive) {
|
61
|
+
valueIndex = currentItem.indexOf(value);
|
62
|
+
} else {
|
63
|
+
const locale = this.cellProperties.locale;
|
64
|
+
valueIndex = currentItem.toLocaleLowerCase(locale).indexOf(value.toLocaleLowerCase(locale));
|
65
|
+
}
|
66
|
+
if (valueIndex !== -1) {
|
67
|
+
charsLeft = currentItem.length - valueIndex - valueLength;
|
68
|
+
choicesRelevance.push({
|
69
|
+
baseIndex: i,
|
70
|
+
index: valueIndex,
|
71
|
+
charsLeft,
|
72
|
+
value: currentItem
|
73
|
+
});
|
74
|
+
}
|
75
|
+
}
|
76
|
+
choicesRelevance.sort((a, b) => {
|
77
|
+
if (b.index === -1) {
|
78
|
+
return -1;
|
79
|
+
}
|
80
|
+
if (a.index === -1) {
|
81
|
+
return 1;
|
82
|
+
}
|
83
|
+
if (a.index < b.index) {
|
84
|
+
return -1;
|
85
|
+
} else if (b.index < a.index) {
|
86
|
+
return 1;
|
87
|
+
} else if (a.index === b.index) {
|
88
|
+
if (a.charsLeft < b.charsLeft) {
|
89
|
+
return -1;
|
90
|
+
} else if (a.charsLeft > b.charsLeft) {
|
91
|
+
return 1;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
return 0;
|
95
|
+
});
|
96
|
+
for (i = 0, choicesCount = choicesRelevance.length; i < choicesCount; i++) {
|
97
|
+
result.push(choicesRelevance[i].baseIndex);
|
98
|
+
}
|
99
|
+
return result;
|
100
|
+
});
|
31
101
|
this.query = null;
|
32
102
|
/**
|
33
103
|
* Contains stripped choices.
|
@@ -426,72 +496,5 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
426
496
|
}
|
427
497
|
}
|
428
498
|
}
|
429
|
-
|
430
|
-
/**
|
431
|
-
* Filters and sorts by relevance.
|
432
|
-
*
|
433
|
-
* @param {*} value The selected value.
|
434
|
-
* @param {string[]} choices The list of available choices.
|
435
|
-
* @param {boolean} caseSensitive Indicates if it's sorted by case.
|
436
|
-
* @returns {number[]} Array of indexes in original choices array.
|
437
|
-
*/
|
438
|
-
sortByRelevance = function (value, choices, caseSensitive) {
|
439
|
-
const choicesRelevance = [];
|
440
|
-
const result = [];
|
441
|
-
const valueLength = value.length;
|
442
|
-
let choicesCount = choices.length;
|
443
|
-
let charsLeft;
|
444
|
-
let currentItem;
|
445
|
-
let i;
|
446
|
-
let valueIndex;
|
447
|
-
if (valueLength === 0) {
|
448
|
-
for (i = 0; i < choicesCount; i++) {
|
449
|
-
result.push(i);
|
450
|
-
}
|
451
|
-
return result;
|
452
|
-
}
|
453
|
-
for (i = 0; i < choicesCount; i++) {
|
454
|
-
currentItem = (0, _string.stripTags)((0, _mixed.stringify)(choices[i]));
|
455
|
-
if (caseSensitive) {
|
456
|
-
valueIndex = currentItem.indexOf(value);
|
457
|
-
} else {
|
458
|
-
const locale = this.cellProperties.locale;
|
459
|
-
valueIndex = currentItem.toLocaleLowerCase(locale).indexOf(value.toLocaleLowerCase(locale));
|
460
|
-
}
|
461
|
-
if (valueIndex !== -1) {
|
462
|
-
charsLeft = currentItem.length - valueIndex - valueLength;
|
463
|
-
choicesRelevance.push({
|
464
|
-
baseIndex: i,
|
465
|
-
index: valueIndex,
|
466
|
-
charsLeft,
|
467
|
-
value: currentItem
|
468
|
-
});
|
469
|
-
}
|
470
|
-
}
|
471
|
-
choicesRelevance.sort((a, b) => {
|
472
|
-
if (b.index === -1) {
|
473
|
-
return -1;
|
474
|
-
}
|
475
|
-
if (a.index === -1) {
|
476
|
-
return 1;
|
477
|
-
}
|
478
|
-
if (a.index < b.index) {
|
479
|
-
return -1;
|
480
|
-
} else if (b.index < a.index) {
|
481
|
-
return 1;
|
482
|
-
} else if (a.index === b.index) {
|
483
|
-
if (a.charsLeft < b.charsLeft) {
|
484
|
-
return -1;
|
485
|
-
} else if (a.charsLeft > b.charsLeft) {
|
486
|
-
return 1;
|
487
|
-
}
|
488
|
-
}
|
489
|
-
return 0;
|
490
|
-
});
|
491
|
-
for (i = 0, choicesCount = choicesRelevance.length; i < choicesCount; i++) {
|
492
|
-
result.push(choicesRelevance[i].baseIndex);
|
493
|
-
}
|
494
|
-
return result;
|
495
|
-
};
|
496
499
|
}
|
497
500
|
exports.AutocompleteEditor = AutocompleteEditor;
|
@@ -1,4 +1,8 @@
|
|
1
1
|
import "core-js/modules/es.array.push.js";
|
2
|
+
import "core-js/modules/es.error.cause.js";
|
3
|
+
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; }
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
5
|
+
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); }
|
2
6
|
import { HandsontableEditor } from "../handsontableEditor/index.mjs";
|
3
7
|
import { arrayMap, pivot } from "../../helpers/array.mjs";
|
4
8
|
import { addClass, getCaretPosition, getScrollbarWidth, getSelectionEndPosition, getTrimmingContainer, offset, outerHeight, outerWidth, setCaretPosition } from "../../helpers/dom/element.mjs";
|
@@ -24,6 +28,72 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
24
28
|
*
|
25
29
|
* @type {string}
|
26
30
|
*/
|
31
|
+
/**
|
32
|
+
* Filters and sorts by relevance.
|
33
|
+
*
|
34
|
+
* @param {*} value The selected value.
|
35
|
+
* @param {string[]} choices The list of available choices.
|
36
|
+
* @param {boolean} caseSensitive Indicates if it's sorted by case.
|
37
|
+
* @returns {number[]} Array of indexes in original choices array.
|
38
|
+
*/
|
39
|
+
_defineProperty(this, "sortByRelevance", function (value, choices, caseSensitive) {
|
40
|
+
const choicesRelevance = [];
|
41
|
+
const result = [];
|
42
|
+
const valueLength = value.length;
|
43
|
+
let choicesCount = choices.length;
|
44
|
+
let charsLeft;
|
45
|
+
let currentItem;
|
46
|
+
let i;
|
47
|
+
let valueIndex;
|
48
|
+
if (valueLength === 0) {
|
49
|
+
for (i = 0; i < choicesCount; i++) {
|
50
|
+
result.push(i);
|
51
|
+
}
|
52
|
+
return result;
|
53
|
+
}
|
54
|
+
for (i = 0; i < choicesCount; i++) {
|
55
|
+
currentItem = stripTags(stringify(choices[i]));
|
56
|
+
if (caseSensitive) {
|
57
|
+
valueIndex = currentItem.indexOf(value);
|
58
|
+
} else {
|
59
|
+
const locale = this.cellProperties.locale;
|
60
|
+
valueIndex = currentItem.toLocaleLowerCase(locale).indexOf(value.toLocaleLowerCase(locale));
|
61
|
+
}
|
62
|
+
if (valueIndex !== -1) {
|
63
|
+
charsLeft = currentItem.length - valueIndex - valueLength;
|
64
|
+
choicesRelevance.push({
|
65
|
+
baseIndex: i,
|
66
|
+
index: valueIndex,
|
67
|
+
charsLeft,
|
68
|
+
value: currentItem
|
69
|
+
});
|
70
|
+
}
|
71
|
+
}
|
72
|
+
choicesRelevance.sort((a, b) => {
|
73
|
+
if (b.index === -1) {
|
74
|
+
return -1;
|
75
|
+
}
|
76
|
+
if (a.index === -1) {
|
77
|
+
return 1;
|
78
|
+
}
|
79
|
+
if (a.index < b.index) {
|
80
|
+
return -1;
|
81
|
+
} else if (b.index < a.index) {
|
82
|
+
return 1;
|
83
|
+
} else if (a.index === b.index) {
|
84
|
+
if (a.charsLeft < b.charsLeft) {
|
85
|
+
return -1;
|
86
|
+
} else if (a.charsLeft > b.charsLeft) {
|
87
|
+
return 1;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
return 0;
|
91
|
+
});
|
92
|
+
for (i = 0, choicesCount = choicesRelevance.length; i < choicesCount; i++) {
|
93
|
+
result.push(choicesRelevance[i].baseIndex);
|
94
|
+
}
|
95
|
+
return result;
|
96
|
+
});
|
27
97
|
this.query = null;
|
28
98
|
/**
|
29
99
|
* Contains stripped choices.
|
@@ -422,71 +492,4 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
422
492
|
}
|
423
493
|
}
|
424
494
|
}
|
425
|
-
|
426
|
-
/**
|
427
|
-
* Filters and sorts by relevance.
|
428
|
-
*
|
429
|
-
* @param {*} value The selected value.
|
430
|
-
* @param {string[]} choices The list of available choices.
|
431
|
-
* @param {boolean} caseSensitive Indicates if it's sorted by case.
|
432
|
-
* @returns {number[]} Array of indexes in original choices array.
|
433
|
-
*/
|
434
|
-
sortByRelevance = function (value, choices, caseSensitive) {
|
435
|
-
const choicesRelevance = [];
|
436
|
-
const result = [];
|
437
|
-
const valueLength = value.length;
|
438
|
-
let choicesCount = choices.length;
|
439
|
-
let charsLeft;
|
440
|
-
let currentItem;
|
441
|
-
let i;
|
442
|
-
let valueIndex;
|
443
|
-
if (valueLength === 0) {
|
444
|
-
for (i = 0; i < choicesCount; i++) {
|
445
|
-
result.push(i);
|
446
|
-
}
|
447
|
-
return result;
|
448
|
-
}
|
449
|
-
for (i = 0; i < choicesCount; i++) {
|
450
|
-
currentItem = stripTags(stringify(choices[i]));
|
451
|
-
if (caseSensitive) {
|
452
|
-
valueIndex = currentItem.indexOf(value);
|
453
|
-
} else {
|
454
|
-
const locale = this.cellProperties.locale;
|
455
|
-
valueIndex = currentItem.toLocaleLowerCase(locale).indexOf(value.toLocaleLowerCase(locale));
|
456
|
-
}
|
457
|
-
if (valueIndex !== -1) {
|
458
|
-
charsLeft = currentItem.length - valueIndex - valueLength;
|
459
|
-
choicesRelevance.push({
|
460
|
-
baseIndex: i,
|
461
|
-
index: valueIndex,
|
462
|
-
charsLeft,
|
463
|
-
value: currentItem
|
464
|
-
});
|
465
|
-
}
|
466
|
-
}
|
467
|
-
choicesRelevance.sort((a, b) => {
|
468
|
-
if (b.index === -1) {
|
469
|
-
return -1;
|
470
|
-
}
|
471
|
-
if (a.index === -1) {
|
472
|
-
return 1;
|
473
|
-
}
|
474
|
-
if (a.index < b.index) {
|
475
|
-
return -1;
|
476
|
-
} else if (b.index < a.index) {
|
477
|
-
return 1;
|
478
|
-
} else if (a.index === b.index) {
|
479
|
-
if (a.charsLeft < b.charsLeft) {
|
480
|
-
return -1;
|
481
|
-
} else if (a.charsLeft > b.charsLeft) {
|
482
|
-
return 1;
|
483
|
-
}
|
484
|
-
}
|
485
|
-
return 0;
|
486
|
-
});
|
487
|
-
for (i = 0, choicesCount = choicesRelevance.length; i < choicesCount; i++) {
|
488
|
-
result.push(choicesRelevance[i].baseIndex);
|
489
|
-
}
|
490
|
-
return result;
|
491
|
-
};
|
492
495
|
}
|
@@ -452,7 +452,7 @@ class BaseEditor {
|
|
452
452
|
const gridMostRightPos = rootWindow.innerWidth - containerOffset.left - containerWidth;
|
453
453
|
const {
|
454
454
|
wtTable: overlayTable
|
455
|
-
} = (_wtOverlays$getParent = wtOverlays.getParentOverlay(TD))
|
455
|
+
} = (_wtOverlays$getParent = wtOverlays.getParentOverlay(TD)) !== null && _wtOverlays$getParent !== void 0 ? _wtOverlays$getParent : this.hot.view._wt;
|
456
456
|
const overlayName = overlayTable.name;
|
457
457
|
const scrollTop = ['master', 'inline_start'].includes(overlayName) ? containerScrollTop : 0;
|
458
458
|
const scrollLeft = ['master', 'top', 'bottom'].includes(overlayName) ? containerScrollLeft : 0;
|
@@ -445,7 +445,7 @@ export class BaseEditor {
|
|
445
445
|
const gridMostRightPos = rootWindow.innerWidth - containerOffset.left - containerWidth;
|
446
446
|
const {
|
447
447
|
wtTable: overlayTable
|
448
|
-
} = (_wtOverlays$getParent = wtOverlays.getParentOverlay(TD))
|
448
|
+
} = (_wtOverlays$getParent = wtOverlays.getParentOverlay(TD)) !== null && _wtOverlays$getParent !== void 0 ? _wtOverlays$getParent : this.hot.view._wt;
|
449
449
|
const overlayName = overlayTable.name;
|
450
450
|
const scrollTop = ['master', 'inline_start'].includes(overlayName) ? containerScrollTop : 0;
|
451
451
|
const scrollLeft = ['master', 'top', 'bottom'].includes(overlayName) ? containerScrollLeft : 0;
|
@@ -125,10 +125,11 @@ class DateEditor extends _textEditor.TextEditor {
|
|
125
125
|
* Close editor.
|
126
126
|
*/
|
127
127
|
close() {
|
128
|
+
var _this$$datePicker;
|
128
129
|
this._opened = false;
|
129
130
|
|
130
131
|
// If the date picker was never initialized (e.g. during autofill), there's nothing to destroy.
|
131
|
-
if (this.$datePicker
|
132
|
+
if ((_this$$datePicker = this.$datePicker) !== null && _this$$datePicker !== void 0 && _this$$datePicker.destroy) {
|
132
133
|
this.$datePicker.destroy();
|
133
134
|
}
|
134
135
|
this.instance._registerTimeout(() => {
|
@@ -120,10 +120,11 @@ export class DateEditor extends TextEditor {
|
|
120
120
|
* Close editor.
|
121
121
|
*/
|
122
122
|
close() {
|
123
|
+
var _this$$datePicker;
|
123
124
|
this._opened = false;
|
124
125
|
|
125
126
|
// If the date picker was never initialized (e.g. during autofill), there's nothing to destroy.
|
126
|
-
if (this.$datePicker
|
127
|
+
if ((_this$$datePicker = this.$datePicker) !== null && _this$$datePicker !== void 0 && _this$$datePicker.destroy) {
|
127
128
|
this.$datePicker.destroy();
|
128
129
|
}
|
129
130
|
this.instance._registerTimeout(() => {
|
package/helpers/mixed.js
CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
|
|
134
134
|
function _injectProductInfo(key, element) {
|
135
135
|
const hasValidType = !isEmpty(key);
|
136
136
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
137
|
-
const hotVersion = "0.0.0-next-
|
137
|
+
const hotVersion = "0.0.0-next-85c3085-20230713";
|
138
138
|
let keyValidityDate;
|
139
139
|
let consoleMessageState = 'invalid';
|
140
140
|
let domMessageState = 'invalid';
|
package/helpers/mixed.mjs
CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
|
|
124
124
|
export function _injectProductInfo(key, element) {
|
125
125
|
const hasValidType = !isEmpty(key);
|
126
126
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
127
|
-
const hotVersion = "0.0.0-next-
|
127
|
+
const hotVersion = "0.0.0-next-85c3085-20230713";
|
128
128
|
let keyValidityDate;
|
129
129
|
let consoleMessageState = 'invalid';
|
130
130
|
let domMessageState = 'invalid';
|
package/helpers/object.js
CHANGED
@@ -17,6 +17,7 @@ exports.isObjectEqual = isObjectEqual;
|
|
17
17
|
exports.mixin = mixin;
|
18
18
|
exports.objectEach = objectEach;
|
19
19
|
exports.setProperty = setProperty;
|
20
|
+
require("core-js/modules/es.json.stringify.js");
|
20
21
|
require("core-js/modules/es.array.push.js");
|
21
22
|
require("core-js/modules/es.error.cause.js");
|
22
23
|
var _array = require("./array");
|
package/helpers/object.mjs
CHANGED
package/index.js
CHANGED
@@ -67,7 +67,7 @@ arrayHelpers.arrayEach(DOM, helper => {
|
|
67
67
|
});
|
68
68
|
|
69
69
|
// Export cell types.
|
70
|
-
_base.default.cellTypes = (_Handsontable$cellTyp = _base.default.cellTypes)
|
70
|
+
_base.default.cellTypes = (_Handsontable$cellTyp = _base.default.cellTypes) !== null && _Handsontable$cellTyp !== void 0 ? _Handsontable$cellTyp : {};
|
71
71
|
arrayHelpers.arrayEach((0, _registry5.getRegisteredCellTypeNames)(), cellTypeName => {
|
72
72
|
_base.default.cellTypes[cellTypeName] = (0, _registry5.getCellType)(cellTypeName);
|
73
73
|
});
|
@@ -75,7 +75,7 @@ _base.default.cellTypes.registerCellType = _registry5.registerCellType;
|
|
75
75
|
_base.default.cellTypes.getCellType = _registry5.getCellType;
|
76
76
|
|
77
77
|
// Export all registered editors from the Handsontable.
|
78
|
-
_base.default.editors = (_Handsontable$editors = _base.default.editors)
|
78
|
+
_base.default.editors = (_Handsontable$editors = _base.default.editors) !== null && _Handsontable$editors !== void 0 ? _Handsontable$editors : {};
|
79
79
|
arrayHelpers.arrayEach((0, _registry2.getRegisteredEditorNames)(), editorName => {
|
80
80
|
_base.default.editors[`${stringHelpers.toUpperCaseFirst(editorName)}Editor`] = (0, _registry2.getEditor)(editorName);
|
81
81
|
});
|
@@ -83,7 +83,7 @@ _base.default.editors.registerEditor = _registry2.registerEditor;
|
|
83
83
|
_base.default.editors.getEditor = _registry2.getEditor;
|
84
84
|
|
85
85
|
// Export all registered renderers from the Handsontable.
|
86
|
-
_base.default.renderers = (_Handsontable$rendere = _base.default.renderers)
|
86
|
+
_base.default.renderers = (_Handsontable$rendere = _base.default.renderers) !== null && _Handsontable$rendere !== void 0 ? _Handsontable$rendere : {};
|
87
87
|
arrayHelpers.arrayEach((0, _registry3.getRegisteredRendererNames)(), rendererName => {
|
88
88
|
const renderer = (0, _registry3.getRenderer)(rendererName);
|
89
89
|
if (rendererName === 'base') {
|
@@ -95,7 +95,7 @@ _base.default.renderers.registerRenderer = _registry3.registerRenderer;
|
|
95
95
|
_base.default.renderers.getRenderer = _registry3.getRenderer;
|
96
96
|
|
97
97
|
// Export all registered validators from the Handsontable.
|
98
|
-
_base.default.validators = (_Handsontable$validat = _base.default.validators)
|
98
|
+
_base.default.validators = (_Handsontable$validat = _base.default.validators) !== null && _Handsontable$validat !== void 0 ? _Handsontable$validat : {};
|
99
99
|
arrayHelpers.arrayEach((0, _registry4.getRegisteredValidatorNames)(), validatorName => {
|
100
100
|
_base.default.validators[`${stringHelpers.toUpperCaseFirst(validatorName)}Validator`] = (0, _registry4.getValidator)(validatorName);
|
101
101
|
});
|
@@ -109,7 +109,7 @@ _base.default.validators.getValidator = _registry4.getValidator;
|
|
109
109
|
// by the `./config/plugin/babel/add-import-extension` babel plugin. Thus, the distribution
|
110
110
|
// files will be broken. The reason is not known right now (probably it's caused by bug in
|
111
111
|
// the Babel or missing something in the plugin).
|
112
|
-
_base.default.plugins = (_Handsontable$plugins = _base.default.plugins)
|
112
|
+
_base.default.plugins = (_Handsontable$plugins = _base.default.plugins) !== null && _Handsontable$plugins !== void 0 ? _Handsontable$plugins : {};
|
113
113
|
arrayHelpers.arrayEach((0, _registry6.getPluginsNames)(), pluginName => {
|
114
114
|
_base.default.plugins[pluginName] = (0, _registry6.getPlugin)(pluginName);
|
115
115
|
});
|
package/index.mjs
CHANGED
@@ -59,7 +59,7 @@ arrayHelpers.arrayEach(DOM, helper => {
|
|
59
59
|
});
|
60
60
|
|
61
61
|
// Export cell types.
|
62
|
-
Handsontable.cellTypes = (_Handsontable$cellTyp = Handsontable.cellTypes)
|
62
|
+
Handsontable.cellTypes = (_Handsontable$cellTyp = Handsontable.cellTypes) !== null && _Handsontable$cellTyp !== void 0 ? _Handsontable$cellTyp : {};
|
63
63
|
arrayHelpers.arrayEach(getRegisteredCellTypeNames(), cellTypeName => {
|
64
64
|
Handsontable.cellTypes[cellTypeName] = getCellType(cellTypeName);
|
65
65
|
});
|
@@ -67,7 +67,7 @@ Handsontable.cellTypes.registerCellType = registerCellType;
|
|
67
67
|
Handsontable.cellTypes.getCellType = getCellType;
|
68
68
|
|
69
69
|
// Export all registered editors from the Handsontable.
|
70
|
-
Handsontable.editors = (_Handsontable$editors = Handsontable.editors)
|
70
|
+
Handsontable.editors = (_Handsontable$editors = Handsontable.editors) !== null && _Handsontable$editors !== void 0 ? _Handsontable$editors : {};
|
71
71
|
arrayHelpers.arrayEach(getRegisteredEditorNames(), editorName => {
|
72
72
|
Handsontable.editors[`${stringHelpers.toUpperCaseFirst(editorName)}Editor`] = getEditor(editorName);
|
73
73
|
});
|
@@ -75,7 +75,7 @@ Handsontable.editors.registerEditor = registerEditor;
|
|
75
75
|
Handsontable.editors.getEditor = getEditor;
|
76
76
|
|
77
77
|
// Export all registered renderers from the Handsontable.
|
78
|
-
Handsontable.renderers = (_Handsontable$rendere = Handsontable.renderers)
|
78
|
+
Handsontable.renderers = (_Handsontable$rendere = Handsontable.renderers) !== null && _Handsontable$rendere !== void 0 ? _Handsontable$rendere : {};
|
79
79
|
arrayHelpers.arrayEach(getRegisteredRendererNames(), rendererName => {
|
80
80
|
const renderer = getRenderer(rendererName);
|
81
81
|
if (rendererName === 'base') {
|
@@ -87,7 +87,7 @@ Handsontable.renderers.registerRenderer = registerRenderer;
|
|
87
87
|
Handsontable.renderers.getRenderer = getRenderer;
|
88
88
|
|
89
89
|
// Export all registered validators from the Handsontable.
|
90
|
-
Handsontable.validators = (_Handsontable$validat = Handsontable.validators)
|
90
|
+
Handsontable.validators = (_Handsontable$validat = Handsontable.validators) !== null && _Handsontable$validat !== void 0 ? _Handsontable$validat : {};
|
91
91
|
arrayHelpers.arrayEach(getRegisteredValidatorNames(), validatorName => {
|
92
92
|
Handsontable.validators[`${stringHelpers.toUpperCaseFirst(validatorName)}Validator`] = getValidator(validatorName);
|
93
93
|
});
|
@@ -101,7 +101,7 @@ Handsontable.validators.getValidator = getValidator;
|
|
101
101
|
// by the `./config/plugin/babel/add-import-extension` babel plugin. Thus, the distribution
|
102
102
|
// files will be broken. The reason is not known right now (probably it's caused by bug in
|
103
103
|
// the Babel or missing something in the plugin).
|
104
|
-
Handsontable.plugins = (_Handsontable$plugins = Handsontable.plugins)
|
104
|
+
Handsontable.plugins = (_Handsontable$plugins = Handsontable.plugins) !== null && _Handsontable$plugins !== void 0 ? _Handsontable$plugins : {};
|
105
105
|
arrayHelpers.arrayEach(getPluginsNames(), pluginName => {
|
106
106
|
Handsontable.plugins[pluginName] = getPlugin(pluginName);
|
107
107
|
});
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"url": "https://github.com/handsontable/handsontable/issues"
|
11
11
|
},
|
12
12
|
"author": "Handsoncode <hello@handsontable.com>",
|
13
|
-
"version": "0.0.0-next-
|
13
|
+
"version": "0.0.0-next-85c3085-20230713",
|
14
14
|
"main": "index",
|
15
15
|
"module": "index.mjs",
|
16
16
|
"jsnext:main": "index.mjs",
|
@@ -650,7 +650,10 @@ class AutoColumnSize extends _base.BasePlugin {
|
|
650
650
|
* @param {Array} changes An array of modified data.
|
651
651
|
*/
|
652
652
|
onAfterFormulasValuesUpdate(changes) {
|
653
|
-
const filteredChanges = (0, _array.arrayFilter)(changes, change =>
|
653
|
+
const filteredChanges = (0, _array.arrayFilter)(changes, change => {
|
654
|
+
var _change$address;
|
655
|
+
return (0, _mixed.isDefined)((_change$address = change.address) === null || _change$address === void 0 ? void 0 : _change$address.col);
|
656
|
+
});
|
654
657
|
const changedColumns = (0, _array.arrayMap)(filteredChanges, change => change.address.col);
|
655
658
|
this.clearCache(Array.from(new Set(changedColumns)));
|
656
659
|
}
|
@@ -644,7 +644,10 @@ export class AutoColumnSize extends BasePlugin {
|
|
644
644
|
* @param {Array} changes An array of modified data.
|
645
645
|
*/
|
646
646
|
onAfterFormulasValuesUpdate(changes) {
|
647
|
-
const filteredChanges = arrayFilter(changes, change =>
|
647
|
+
const filteredChanges = arrayFilter(changes, change => {
|
648
|
+
var _change$address;
|
649
|
+
return isDefined((_change$address = change.address) === null || _change$address === void 0 ? void 0 : _change$address.col);
|
650
|
+
});
|
648
651
|
const changedColumns = arrayMap(filteredChanges, change => change.address.col);
|
649
652
|
this.clearCache(Array.from(new Set(changedColumns)));
|
650
653
|
}
|