handsontable 0.0.0-next-4fc3f83-20230908 → 0.0.0-next-5c1663f-20230911
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/base.js +2 -2
- package/base.mjs +2 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +20 -16
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +3 -3
- package/dist/handsontable.js +20 -16
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +3 -3
- package/editors/autocompleteEditor/autocompleteEditor.js +11 -7
- package/editors/autocompleteEditor/autocompleteEditor.mjs +11 -7
- package/editors/handsontableEditor/handsontableEditor.js +4 -4
- package/editors/handsontableEditor/handsontableEditor.mjs +4 -4
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
@@ -148,7 +148,6 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
148
148
|
open() {
|
149
149
|
const priv = privatePool.get(this);
|
150
150
|
super.open();
|
151
|
-
const choicesListHot = this.htEditor.getInstance();
|
152
151
|
const trimDropdown = this.cellProperties.trimDropdown === void 0 ? true : this.cellProperties.trimDropdown;
|
153
152
|
this.showEditableElement();
|
154
153
|
this.focus();
|
@@ -158,7 +157,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
158
157
|
}
|
159
158
|
|
160
159
|
this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
|
161
|
-
|
160
|
+
this.htEditor.updateSettings({
|
162
161
|
colWidths: trimDropdown ? [(0, _element.outerWidth)(this.TEXTAREA) - 2] : void 0,
|
163
162
|
width: trimDropdown ? (0, _element.outerWidth)(this.TEXTAREA) + scrollbarWidth : void 0,
|
164
163
|
renderer: (instance, TD, row, col, prop, value, cellProperties) => {
|
@@ -271,10 +270,15 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
271
270
|
}
|
272
271
|
this.strippedChoices = choices;
|
273
272
|
this.htEditor.loadData((0, _array.pivot)([choices]));
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
this.
|
273
|
+
if (choices.length === 0) {
|
274
|
+
this.htEditor.rootElement.style.display = 'none';
|
275
|
+
} else {
|
276
|
+
this.htEditor.rootElement.style.display = '';
|
277
|
+
this.updateDropdownHeight();
|
278
|
+
this.flipDropdownIfNeeded();
|
279
|
+
if (this.cellProperties.strict === true) {
|
280
|
+
this.highlightBestMatchingChoice(highlightIndex);
|
281
|
+
}
|
278
282
|
}
|
279
283
|
this.hot.listen();
|
280
284
|
(0, _element.setCaretPosition)(this.TEXTAREA, pos, pos === endPos ? void 0 : endPos);
|
@@ -411,7 +415,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
411
415
|
* @returns {number}
|
412
416
|
*/
|
413
417
|
getDropdownHeight() {
|
414
|
-
const firstRowHeight = this.htEditor.
|
418
|
+
const firstRowHeight = this.htEditor.getRowHeight(0) || 23;
|
415
419
|
const visibleRows = this.cellProperties.visibleRows;
|
416
420
|
return this.strippedChoices.length >= visibleRows ? visibleRows * firstRowHeight : this.strippedChoices.length * firstRowHeight + 8; // eslint-disable-line max-len
|
417
421
|
}
|
@@ -144,7 +144,6 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
144
144
|
open() {
|
145
145
|
const priv = privatePool.get(this);
|
146
146
|
super.open();
|
147
|
-
const choicesListHot = this.htEditor.getInstance();
|
148
147
|
const trimDropdown = this.cellProperties.trimDropdown === void 0 ? true : this.cellProperties.trimDropdown;
|
149
148
|
this.showEditableElement();
|
150
149
|
this.focus();
|
@@ -154,7 +153,7 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
154
153
|
}
|
155
154
|
|
156
155
|
this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
|
157
|
-
|
156
|
+
this.htEditor.updateSettings({
|
158
157
|
colWidths: trimDropdown ? [outerWidth(this.TEXTAREA) - 2] : void 0,
|
159
158
|
width: trimDropdown ? outerWidth(this.TEXTAREA) + scrollbarWidth : void 0,
|
160
159
|
renderer: (instance, TD, row, col, prop, value, cellProperties) => {
|
@@ -267,10 +266,15 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
267
266
|
}
|
268
267
|
this.strippedChoices = choices;
|
269
268
|
this.htEditor.loadData(pivot([choices]));
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
this.
|
269
|
+
if (choices.length === 0) {
|
270
|
+
this.htEditor.rootElement.style.display = 'none';
|
271
|
+
} else {
|
272
|
+
this.htEditor.rootElement.style.display = '';
|
273
|
+
this.updateDropdownHeight();
|
274
|
+
this.flipDropdownIfNeeded();
|
275
|
+
if (this.cellProperties.strict === true) {
|
276
|
+
this.highlightBestMatchingChoice(highlightIndex);
|
277
|
+
}
|
274
278
|
}
|
275
279
|
this.hot.listen();
|
276
280
|
setCaretPosition(this.TEXTAREA, pos, pos === endPos ? void 0 : endPos);
|
@@ -407,7 +411,7 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
407
411
|
* @returns {number}
|
408
412
|
*/
|
409
413
|
getDropdownHeight() {
|
410
|
-
const firstRowHeight = this.htEditor.
|
414
|
+
const firstRowHeight = this.htEditor.getRowHeight(0) || 23;
|
411
415
|
const visibleRows = this.cellProperties.visibleRows;
|
412
416
|
return this.strippedChoices.length >= visibleRows ? visibleRows * firstRowHeight : this.strippedChoices.length * firstRowHeight + 8; // eslint-disable-line max-len
|
413
417
|
}
|
@@ -139,7 +139,7 @@ class HandsontableEditor extends _textEditor.TextEditor {
|
|
139
139
|
}
|
140
140
|
|
141
141
|
if (this.htEditor && this.htEditor.getSelectedLast()) {
|
142
|
-
const value = this.htEditor.
|
142
|
+
const value = this.htEditor.getValue();
|
143
143
|
if (value !== void 0) {
|
144
144
|
// if the value is undefined then it means we don't want to set the value
|
145
145
|
this.setValue(value);
|
@@ -176,7 +176,7 @@ class HandsontableEditor extends _textEditor.TextEditor {
|
|
176
176
|
position: 'before'
|
177
177
|
};
|
178
178
|
const action = (rowToSelect, event) => {
|
179
|
-
const innerHOT = this.htEditor
|
179
|
+
const innerHOT = this.htEditor;
|
180
180
|
if (rowToSelect !== void 0) {
|
181
181
|
if (rowToSelect < 0 || innerHOT.flipped && rowToSelect > innerHOT.countRows() - 1) {
|
182
182
|
innerHOT.deselectCell();
|
@@ -195,7 +195,7 @@ class HandsontableEditor extends _textEditor.TextEditor {
|
|
195
195
|
editorContext.addShortcuts([{
|
196
196
|
keys: [['ArrowUp']],
|
197
197
|
callback: event => {
|
198
|
-
const innerHOT = this.htEditor
|
198
|
+
const innerHOT = this.htEditor;
|
199
199
|
let rowToSelect;
|
200
200
|
let selectedRow;
|
201
201
|
if (!innerHOT.getSelectedLast() && innerHOT.flipped) {
|
@@ -215,7 +215,7 @@ class HandsontableEditor extends _textEditor.TextEditor {
|
|
215
215
|
}, {
|
216
216
|
keys: [['ArrowDown']],
|
217
217
|
callback: event => {
|
218
|
-
const innerHOT = this.htEditor
|
218
|
+
const innerHOT = this.htEditor;
|
219
219
|
let rowToSelect;
|
220
220
|
let selectedRow;
|
221
221
|
if (!innerHOT.getSelectedLast() && !innerHOT.flipped) {
|
@@ -135,7 +135,7 @@ export class HandsontableEditor extends TextEditor {
|
|
135
135
|
}
|
136
136
|
|
137
137
|
if (this.htEditor && this.htEditor.getSelectedLast()) {
|
138
|
-
const value = this.htEditor.
|
138
|
+
const value = this.htEditor.getValue();
|
139
139
|
if (value !== void 0) {
|
140
140
|
// if the value is undefined then it means we don't want to set the value
|
141
141
|
this.setValue(value);
|
@@ -172,7 +172,7 @@ export class HandsontableEditor extends TextEditor {
|
|
172
172
|
position: 'before'
|
173
173
|
};
|
174
174
|
const action = (rowToSelect, event) => {
|
175
|
-
const innerHOT = this.htEditor
|
175
|
+
const innerHOT = this.htEditor;
|
176
176
|
if (rowToSelect !== void 0) {
|
177
177
|
if (rowToSelect < 0 || innerHOT.flipped && rowToSelect > innerHOT.countRows() - 1) {
|
178
178
|
innerHOT.deselectCell();
|
@@ -191,7 +191,7 @@ export class HandsontableEditor extends TextEditor {
|
|
191
191
|
editorContext.addShortcuts([{
|
192
192
|
keys: [['ArrowUp']],
|
193
193
|
callback: event => {
|
194
|
-
const innerHOT = this.htEditor
|
194
|
+
const innerHOT = this.htEditor;
|
195
195
|
let rowToSelect;
|
196
196
|
let selectedRow;
|
197
197
|
if (!innerHOT.getSelectedLast() && innerHOT.flipped) {
|
@@ -211,7 +211,7 @@ export class HandsontableEditor extends TextEditor {
|
|
211
211
|
}, {
|
212
212
|
keys: [['ArrowDown']],
|
213
213
|
callback: event => {
|
214
|
-
const innerHOT = this.htEditor
|
214
|
+
const innerHOT = this.htEditor;
|
215
215
|
let rowToSelect;
|
216
216
|
let selectedRow;
|
217
217
|
if (!innerHOT.getSelectedLast() && !innerHOT.flipped) {
|
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-5c1663f-20230911";
|
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-5c1663f-20230911";
|
128
128
|
let keyValidityDate;
|
129
129
|
let consoleMessageState = 'invalid';
|
130
130
|
let domMessageState = 'invalid';
|
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-5c1663f-20230911",
|
14
14
|
"main": "index",
|
15
15
|
"module": "index.mjs",
|
16
16
|
"jsnext:main": "index.mjs",
|