handsontable 14.0.0-next-c080457-20231107 → 14.0.0-next-bfad250-20231108
Sign up to get free protection for your applications and to get access to all the features.
- package/3rdparty/SheetClip/SheetClip.js +2 -2
- package/3rdparty/SheetClip/SheetClip.mjs +2 -2
- package/3rdparty/autoResize/autoResize.js +2 -2
- package/3rdparty/autoResize/autoResize.mjs +2 -2
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +108 -85
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +108 -85
- package/3rdparty/walkontable/src/calculator/viewportRows.js +60 -52
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +60 -52
- package/3rdparty/walkontable/src/cell/coords.js +7 -5
- package/3rdparty/walkontable/src/cell/coords.mjs +7 -5
- package/3rdparty/walkontable/src/core/clone.js +6 -0
- package/3rdparty/walkontable/src/core/clone.mjs +6 -0
- package/3rdparty/walkontable/src/event.js +125 -74
- package/3rdparty/walkontable/src/event.mjs +125 -74
- package/3rdparty/walkontable/src/filter/column.js +16 -0
- package/3rdparty/walkontable/src/filter/column.mjs +16 -0
- package/3rdparty/walkontable/src/filter/row.js +16 -0
- package/3rdparty/walkontable/src/filter/row.mjs +16 -0
- package/3rdparty/walkontable/src/overlay/bottom.js +1 -1
- package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/top.js +1 -1
- package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/_base.js +12 -5
- package/3rdparty/walkontable/src/renderer/_base.mjs +12 -5
- package/3rdparty/walkontable/src/renderer/cells.js +6 -2
- package/3rdparty/walkontable/src/renderer/cells.mjs +6 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +6 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +6 -2
- package/3rdparty/walkontable/src/renderer/rows.js +5 -0
- package/3rdparty/walkontable/src/renderer/rows.mjs +5 -0
- package/3rdparty/walkontable/src/renderer/table.js +24 -17
- package/3rdparty/walkontable/src/renderer/table.mjs +24 -17
- package/3rdparty/walkontable/src/scroll.js +2 -2
- package/3rdparty/walkontable/src/scroll.mjs +2 -2
- package/3rdparty/walkontable/src/selection/border/border.js +1 -1
- package/3rdparty/walkontable/src/selection/border/border.mjs +1 -1
- package/3rdparty/walkontable/src/settings.js +10 -10
- package/3rdparty/walkontable/src/settings.mjs +10 -10
- package/3rdparty/walkontable/src/table.js +3 -3
- package/3rdparty/walkontable/src/table.mjs +3 -3
- package/3rdparty/walkontable/src/utils/column.js +19 -4
- package/3rdparty/walkontable/src/utils/column.mjs +19 -4
- package/3rdparty/walkontable/src/utils/nodesPool.js +5 -0
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +5 -0
- package/3rdparty/walkontable/src/utils/orderView/view.js +13 -6
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +13 -6
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +9 -6
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +9 -6
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +7 -4
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +7 -4
- package/3rdparty/walkontable/src/utils/row.js +14 -2
- package/3rdparty/walkontable/src/utils/row.mjs +14 -2
- package/3rdparty/walkontable/src/viewport.js +9 -9
- package/3rdparty/walkontable/src/viewport.mjs +9 -9
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.js +25 -25
- package/core.mjs +25 -25
- package/dataMap/dataMap.js +99 -90
- package/dataMap/dataMap.mjs +99 -90
- package/dataMap/dataSource.js +14 -8
- package/dataMap/dataSource.mjs +14 -8
- package/dataMap/metaManager/lazyFactoryMap.js +19 -7
- package/dataMap/metaManager/lazyFactoryMap.mjs +19 -7
- package/dataMap/metaManager/metaLayers/cellMeta.js +8 -3
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +8 -3
- package/dataMap/metaManager/metaLayers/columnMeta.js +7 -1
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +7 -1
- package/dataMap/metaManager/metaLayers/globalMeta.js +6 -1
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +6 -1
- package/dataMap/metaManager/metaLayers/tableMeta.js +6 -2
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +6 -2
- package/dataMap/metaManager/metaSchema.js +55 -55
- package/dataMap/metaManager/metaSchema.mjs +55 -55
- package/dataMap/metaManager/mods/dynamicCellMeta.js +7 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +7 -2
- package/dataMap/metaManager/mods/extendMetaProperties.js +8 -4
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +8 -4
- package/dataMap/metaManager/utils.js +2 -2
- package/dataMap/metaManager/utils.mjs +2 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +7337 -6389
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +154 -154
- package/dist/handsontable.js +7336 -6388
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +28 -28
- package/editorManager.js +105 -95
- package/editorManager.mjs +105 -95
- package/editors/autocompleteEditor/autocompleteEditor.js +47 -46
- package/editors/autocompleteEditor/autocompleteEditor.mjs +46 -45
- package/editors/baseEditor/baseEditor.js +23 -26
- package/editors/baseEditor/baseEditor.mjs +23 -26
- package/editors/dateEditor/dateEditor.js +24 -15
- package/editors/dateEditor/dateEditor.mjs +24 -15
- package/editors/dropdownEditor/dropdownEditor.js +1 -1
- package/editors/dropdownEditor/dropdownEditor.mjs +1 -1
- package/editors/handsontableEditor/handsontableEditor.js +4 -4
- package/editors/handsontableEditor/handsontableEditor.mjs +4 -4
- package/editors/textEditor/textEditor.js +23 -17
- package/editors/textEditor/textEditor.mjs +24 -18
- package/eventManager.js +8 -0
- package/eventManager.mjs +8 -0
- package/helpers/array.js +2 -2
- package/helpers/array.mjs +2 -2
- package/helpers/dom/element.js +7 -7
- package/helpers/dom/element.mjs +7 -7
- package/helpers/function.js +1 -1
- package/helpers/function.mjs +1 -1
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/object.js +4 -4
- package/helpers/object.mjs +4 -4
- package/helpers/string.js +1 -1
- package/helpers/string.mjs +1 -1
- package/package.json +1 -1
- package/pluginHooks.d.ts +0 -2
- package/pluginHooks.js +12 -3
- package/pluginHooks.mjs +12 -3
- package/plugins/autoColumnSize/autoColumnSize.js +141 -130
- package/plugins/autoColumnSize/autoColumnSize.mjs +140 -129
- package/plugins/autoRowSize/autoRowSize.js +112 -125
- package/plugins/autoRowSize/autoRowSize.mjs +110 -123
- package/plugins/autofill/autofill.d.ts +0 -1
- package/plugins/autofill/autofill.js +98 -102
- package/plugins/autofill/autofill.mjs +97 -101
- package/plugins/base/base.js +61 -28
- package/plugins/base/base.mjs +60 -28
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +29 -24
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +28 -23
- package/plugins/collapsibleColumns/collapsibleColumns.js +104 -107
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +102 -104
- package/plugins/columnSorting/columnSorting.js +107 -99
- package/plugins/columnSorting/columnSorting.mjs +106 -98
- package/plugins/columnSorting/columnStatesManager.js +12 -6
- package/plugins/columnSorting/columnStatesManager.mjs +12 -6
- package/plugins/columnSummary/columnSummary.js +71 -58
- package/plugins/columnSummary/columnSummary.mjs +70 -57
- package/plugins/columnSummary/endpoints.js +20 -14
- package/plugins/columnSummary/endpoints.mjs +20 -14
- package/plugins/comments/commentEditor.js +30 -2
- package/plugins/comments/commentEditor.mjs +30 -2
- package/plugins/comments/comments.js +158 -169
- package/plugins/comments/comments.mjs +157 -168
- package/plugins/comments/displaySwitch.js +7 -3
- package/plugins/comments/displaySwitch.mjs +7 -3
- package/plugins/contextMenu/commandExecutor.js +15 -2
- package/plugins/contextMenu/commandExecutor.mjs +15 -2
- package/plugins/contextMenu/contextMenu.js +96 -102
- package/plugins/contextMenu/contextMenu.mjs +95 -101
- package/plugins/contextMenu/itemsFactory.js +19 -4
- package/plugins/contextMenu/itemsFactory.mjs +19 -4
- package/plugins/contextMenu/menu/cursor.js +36 -0
- package/plugins/contextMenu/menu/cursor.mjs +36 -0
- package/plugins/contextMenu/menu/menu.js +57 -5
- package/plugins/contextMenu/menu/menu.mjs +57 -5
- package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeColumn.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.mjs +1 -1
- package/plugins/copyPaste/copyPaste.js +74 -75
- package/plugins/copyPaste/copyPaste.mjs +74 -75
- package/plugins/customBorders/customBorders.js +57 -50
- package/plugins/customBorders/customBorders.mjs +56 -49
- package/plugins/dragToScroll/dragToScroll.js +50 -54
- package/plugins/dragToScroll/dragToScroll.mjs +49 -52
- package/plugins/dropdownMenu/dropdownMenu.js +136 -131
- package/plugins/dropdownMenu/dropdownMenu.mjs +136 -131
- package/plugins/exportFile/dataProvider.js +7 -2
- package/plugins/exportFile/dataProvider.mjs +7 -2
- package/plugins/exportFile/exportFile.js +1 -1
- package/plugins/exportFile/exportFile.mjs +1 -1
- package/plugins/exportFile/types/_base.js +14 -6
- package/plugins/exportFile/types/_base.mjs +14 -6
- package/plugins/filters/component/actionBar.js +9 -0
- package/plugins/filters/component/actionBar.mjs +9 -0
- package/plugins/filters/component/condition.js +13 -0
- package/plugins/filters/component/condition.mjs +13 -0
- package/plugins/filters/component/operators.js +9 -0
- package/plugins/filters/component/operators.mjs +9 -0
- package/plugins/filters/component/value.js +9 -0
- package/plugins/filters/component/value.mjs +9 -0
- package/plugins/filters/conditionCollection.js +9 -4
- package/plugins/filters/conditionCollection.mjs +9 -4
- package/plugins/filters/conditionUpdateObserver.js +53 -42
- package/plugins/filters/conditionUpdateObserver.mjs +53 -42
- package/plugins/filters/dataFilter.js +9 -3
- package/plugins/filters/dataFilter.mjs +9 -3
- package/plugins/filters/filters.js +184 -189
- package/plugins/filters/filters.mjs +182 -187
- package/plugins/filters/ui/_base.js +1 -1
- package/plugins/filters/ui/_base.mjs +1 -1
- package/plugins/filters/utils.js +1 -1
- package/plugins/filters/utils.mjs +1 -1
- package/plugins/formulas/engine/settings.js +1 -1
- package/plugins/formulas/engine/settings.mjs +1 -1
- package/plugins/formulas/formulas.js +684 -602
- package/plugins/formulas/formulas.mjs +682 -600
- package/plugins/hiddenColumns/hiddenColumns.js +174 -169
- package/plugins/hiddenColumns/hiddenColumns.mjs +173 -168
- package/plugins/hiddenRows/hiddenRows.js +170 -165
- package/plugins/hiddenRows/hiddenRows.mjs +169 -164
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +66 -53
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +64 -51
- package/plugins/manualColumnMove/manualColumnMove.js +287 -232
- package/plugins/manualColumnMove/manualColumnMove.mjs +286 -231
- package/plugins/manualColumnMove/ui/_base.js +9 -3
- package/plugins/manualColumnMove/ui/_base.mjs +9 -3
- package/plugins/manualColumnResize/manualColumnResize.js +291 -246
- package/plugins/manualColumnResize/manualColumnResize.mjs +290 -244
- package/plugins/manualRowMove/manualRowMove.js +223 -208
- package/plugins/manualRowMove/manualRowMove.mjs +222 -207
- package/plugins/manualRowMove/ui/_base.js +10 -5
- package/plugins/manualRowMove/ui/_base.mjs +10 -5
- package/plugins/manualRowResize/manualRowResize.js +254 -209
- package/plugins/manualRowResize/manualRowResize.mjs +253 -207
- package/plugins/mergeCells/calculations/autofill.js +9 -3
- package/plugins/mergeCells/calculations/autofill.mjs +9 -3
- package/plugins/mergeCells/calculations/selection.js +10 -4
- package/plugins/mergeCells/calculations/selection.mjs +10 -4
- package/plugins/mergeCells/cellCoords.js +16 -6
- package/plugins/mergeCells/cellCoords.mjs +16 -6
- package/plugins/mergeCells/cellsCollection.js +10 -4
- package/plugins/mergeCells/cellsCollection.mjs +10 -4
- package/plugins/mergeCells/mergeCells.js +582 -502
- package/plugins/mergeCells/mergeCells.mjs +580 -500
- package/plugins/multiColumnSorting/multiColumnSorting.js +15 -11
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +15 -11
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +16 -28
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +16 -27
- package/plugins/nestedHeaders/nestedHeaders.js +542 -499
- package/plugins/nestedHeaders/nestedHeaders.mjs +554 -511
- package/plugins/nestedHeaders/stateManager/index.js +1 -1
- package/plugins/nestedHeaders/stateManager/index.mjs +1 -1
- package/plugins/nestedRows/data/dataManager.js +21 -15
- package/plugins/nestedRows/data/dataManager.mjs +21 -15
- package/plugins/nestedRows/nestedRows.js +335 -279
- package/plugins/nestedRows/nestedRows.mjs +334 -278
- package/plugins/nestedRows/ui/_base.js +7 -1
- package/plugins/nestedRows/ui/_base.mjs +7 -1
- package/plugins/nestedRows/ui/collapsing.js +2 -2
- package/plugins/nestedRows/ui/collapsing.mjs +2 -2
- package/plugins/nestedRows/ui/contextMenu.js +28 -18
- package/plugins/nestedRows/ui/contextMenu.mjs +28 -18
- package/plugins/nestedRows/utils/rowMoveController.js +12 -4
- package/plugins/nestedRows/utils/rowMoveController.mjs +12 -4
- package/plugins/persistentState/persistentState.js +14 -11
- package/plugins/persistentState/persistentState.mjs +14 -11
- package/plugins/persistentState/storage.js +11 -6
- package/plugins/persistentState/storage.mjs +11 -6
- package/plugins/registry.js +2 -2
- package/plugins/registry.mjs +2 -2
- package/plugins/search/search.js +57 -46
- package/plugins/search/search.mjs +56 -45
- package/plugins/touchScroll/touchScroll.js +102 -100
- package/plugins/touchScroll/touchScroll.mjs +100 -98
- package/plugins/trimRows/trimRows.js +33 -28
- package/plugins/trimRows/trimRows.mjs +32 -27
- package/plugins/undoRedo/undoRedo.js +2 -2
- package/plugins/undoRedo/undoRedo.mjs +2 -2
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +11 -11
- package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +11 -11
- package/renderers/baseRenderer/baseRenderer.js +2 -2
- package/renderers/baseRenderer/baseRenderer.mjs +2 -2
- package/renderers/checkboxRenderer/checkboxRenderer.js +23 -23
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +23 -23
- package/renderers/dateRenderer/dateRenderer.js +4 -4
- package/renderers/dateRenderer/dateRenderer.mjs +4 -4
- package/renderers/handsontableRenderer/handsontableRenderer.js +4 -4
- package/renderers/handsontableRenderer/handsontableRenderer.mjs +4 -4
- package/renderers/htmlRenderer/htmlRenderer.js +4 -4
- package/renderers/htmlRenderer/htmlRenderer.mjs +4 -4
- package/renderers/numericRenderer/numericRenderer.js +3 -3
- package/renderers/numericRenderer/numericRenderer.mjs +3 -3
- package/renderers/passwordRenderer/passwordRenderer.js +3 -3
- package/renderers/passwordRenderer/passwordRenderer.mjs +3 -3
- package/renderers/selectRenderer/selectRenderer.js +4 -4
- package/renderers/selectRenderer/selectRenderer.mjs +4 -4
- package/renderers/textRenderer/textRenderer.js +5 -5
- package/renderers/textRenderer/textRenderer.mjs +5 -5
- package/renderers/timeRenderer/timeRenderer.js +3 -3
- package/renderers/timeRenderer/timeRenderer.mjs +3 -3
- package/selection/range.js +12 -2
- package/selection/range.mjs +12 -2
- package/selection/selection.js +28 -10
- package/selection/selection.mjs +28 -10
- package/selection/utils.js +24 -14
- package/selection/utils.mjs +25 -15
- package/shortcuts/manager.js +1 -1
- package/shortcuts/manager.mjs +1 -1
- package/tableView.js +208 -200
- package/tableView.mjs +208 -200
- package/translations/changesObservable/utils.js +2 -2
- package/translations/changesObservable/utils.mjs +2 -2
- package/translations/indexMapper.js +25 -22
- package/translations/indexMapper.mjs +25 -22
- package/translations/mapCollections/aggregatedCollection.js +8 -2
- package/translations/mapCollections/aggregatedCollection.mjs +8 -2
- package/translations/mapCollections/mapCollection.js +5 -2
- package/translations/mapCollections/mapCollection.mjs +5 -2
- package/translations/maps/indexMap.js +6 -1
- package/translations/maps/indexMap.mjs +6 -1
- package/translations/maps/utils/physicallyIndexed.js +2 -2
- package/translations/maps/utils/physicallyIndexed.mjs +2 -2
- package/utils/dataStructures/linkedList.js +10 -6
- package/utils/dataStructures/linkedList.mjs +10 -6
- package/utils/dataStructures/queue.js +1 -1
- package/utils/dataStructures/queue.mjs +1 -1
- package/utils/dataStructures/stack.js +1 -1
- package/utils/dataStructures/stack.mjs +1 -1
- package/utils/ghostTable.js +2 -2
- package/utils/ghostTable.mjs +2 -2
- package/utils/interval.js +73 -36
- package/utils/interval.mjs +73 -36
- package/utils/parseTable.js +1 -1
- package/utils/parseTable.mjs +1 -1
- package/validators/autocompleteValidator/autocompleteValidator.js +1 -1
- package/validators/autocompleteValidator/autocompleteValidator.mjs +1 -1
- package/validators/dateValidator/dateValidator.js +1 -1
- package/validators/dateValidator/dateValidator.mjs +1 -1
- package/validators/numericValidator/numericValidator.js +1 -1
- package/validators/numericValidator/numericValidator.mjs +1 -1
@@ -1,37 +1,62 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
require("core-js/modules/es.error.cause.js");
|
3
4
|
exports.__esModule = true;
|
4
5
|
require("core-js/modules/es.array.push.js");
|
5
|
-
require("core-js/modules/es.error.cause.js");
|
6
6
|
var _handsontableEditor = require("../handsontableEditor");
|
7
7
|
var _array = require("../../helpers/array");
|
8
8
|
var _element = require("../../helpers/dom/element");
|
9
9
|
var _mixed = require("../../helpers/mixed");
|
10
10
|
var _string = require("../../helpers/string");
|
11
11
|
var _unicode = require("../../helpers/unicode");
|
12
|
+
var _browser = require("../../helpers/browser");
|
12
13
|
var _textRenderer = require("../../renderers/textRenderer");
|
13
14
|
var _a11y = require("../../helpers/a11y");
|
15
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
16
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
14
17
|
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; }
|
15
18
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
16
19
|
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); }
|
17
|
-
|
20
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
21
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
22
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
18
23
|
const EDITOR_TYPE = exports.EDITOR_TYPE = 'autocomplete';
|
19
24
|
|
20
25
|
/**
|
21
26
|
* @private
|
22
27
|
* @class AutocompleteEditor
|
23
28
|
*/
|
29
|
+
var _idPrefix = /*#__PURE__*/new WeakMap();
|
24
30
|
class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
25
|
-
|
26
|
-
|
27
|
-
}
|
28
|
-
constructor(instance) {
|
29
|
-
super(instance);
|
31
|
+
constructor() {
|
32
|
+
super(...arguments);
|
30
33
|
/**
|
31
34
|
* Query string to turn available values over.
|
32
35
|
*
|
33
36
|
* @type {string}
|
34
37
|
*/
|
38
|
+
_defineProperty(this, "query", null);
|
39
|
+
/**
|
40
|
+
* Contains stripped choices.
|
41
|
+
*
|
42
|
+
* @type {string[]}
|
43
|
+
*/
|
44
|
+
_defineProperty(this, "strippedChoices", []);
|
45
|
+
/**
|
46
|
+
* Contains raw choices.
|
47
|
+
*
|
48
|
+
* @type {Array}
|
49
|
+
*/
|
50
|
+
_defineProperty(this, "rawChoices", []);
|
51
|
+
/**
|
52
|
+
* Holds the prefix of the editor's id.
|
53
|
+
*
|
54
|
+
* @type {string}
|
55
|
+
*/
|
56
|
+
_classPrivateFieldInitSpec(this, _idPrefix, {
|
57
|
+
writable: true,
|
58
|
+
value: this.hot.guid.slice(0, 9)
|
59
|
+
});
|
35
60
|
/**
|
36
61
|
* Filters and sorts by relevance.
|
37
62
|
*
|
@@ -98,26 +123,10 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
98
123
|
}
|
99
124
|
return result;
|
100
125
|
});
|
101
|
-
this.query = null;
|
102
|
-
/**
|
103
|
-
* Contains stripped choices.
|
104
|
-
*
|
105
|
-
* @type {string[]}
|
106
|
-
*/
|
107
|
-
this.strippedChoices = [];
|
108
|
-
/**
|
109
|
-
* Contains raw choices.
|
110
|
-
*
|
111
|
-
* @type {Array}
|
112
|
-
*/
|
113
|
-
this.rawChoices = [];
|
114
|
-
privatePool.set(this, {
|
115
|
-
skipOne: false,
|
116
|
-
isMacOS: this.hot.rootWindow.navigator.platform.indexOf('Mac') > -1,
|
117
|
-
idPrefix: instance.guid.slice(0, 9)
|
118
|
-
});
|
119
126
|
}
|
120
|
-
|
127
|
+
static get EDITOR_TYPE() {
|
128
|
+
return EDITOR_TYPE;
|
129
|
+
}
|
121
130
|
/**
|
122
131
|
* Gets current value from editable element.
|
123
132
|
*
|
@@ -157,10 +166,9 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
157
166
|
* @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).
|
158
167
|
*/
|
159
168
|
prepare(row, col, prop, td, value, cellProperties) {
|
160
|
-
const priv = privatePool.get(this);
|
161
169
|
super.prepare(row, col, prop, td, value, cellProperties);
|
162
170
|
if (this.hot.getSettings().ariaTags) {
|
163
|
-
(0, _element.setAttribute)(this.TEXTAREA, [(0, _a11y.A11Y_EXPANDED)('false'), (0, _a11y.A11Y_CONTROLS)(`${
|
171
|
+
(0, _element.setAttribute)(this.TEXTAREA, [(0, _a11y.A11Y_EXPANDED)('false'), (0, _a11y.A11Y_CONTROLS)(`${_classPrivateFieldGet(this, _idPrefix)}-listbox-${row}-${col}`)]);
|
164
172
|
}
|
165
173
|
}
|
166
174
|
|
@@ -168,9 +176,8 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
168
176
|
* Opens the editor and adjust its size and internal Handsontable's instance.
|
169
177
|
*/
|
170
178
|
open() {
|
171
|
-
const priv = privatePool.get(this);
|
172
179
|
super.open();
|
173
|
-
const trimDropdown = this.cellProperties.trimDropdown ===
|
180
|
+
const trimDropdown = this.cellProperties.trimDropdown === undefined ? true : this.cellProperties.trimDropdown;
|
174
181
|
const rootInstanceAriaTagsEnabled = this.hot.getSettings().ariaTags;
|
175
182
|
const sourceArray = Array.isArray(this.cellProperties.source) ? this.cellProperties.source : null;
|
176
183
|
const sourceSize = sourceArray === null || sourceArray === void 0 ? void 0 : sourceArray.length;
|
@@ -181,17 +188,17 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
181
188
|
this.showEditableElement();
|
182
189
|
this.focus();
|
183
190
|
let scrollbarWidth = (0, _element.getScrollbarWidth)();
|
184
|
-
if (scrollbarWidth === 0 &&
|
191
|
+
if (scrollbarWidth === 0 && (0, _browser.isMacOS)()) {
|
185
192
|
scrollbarWidth += 15; // default scroll bar width if scroll bars are visible only when scrolling
|
186
193
|
}
|
187
194
|
|
188
195
|
this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
|
189
196
|
this.htEditor.updateSettings({
|
190
|
-
colWidths: trimDropdown ? [(0, _element.outerWidth)(this.TEXTAREA) - 2] :
|
191
|
-
width: trimDropdown ? (0, _element.outerWidth)(this.TEXTAREA) + scrollbarWidth :
|
197
|
+
colWidths: trimDropdown ? [(0, _element.outerWidth)(this.TEXTAREA) - 2] : undefined,
|
198
|
+
width: trimDropdown ? (0, _element.outerWidth)(this.TEXTAREA) + scrollbarWidth : undefined,
|
192
199
|
autoColumnSize: true,
|
193
|
-
renderer: (
|
194
|
-
(0, _textRenderer.textRenderer)(
|
200
|
+
renderer: (hotInstance, TD, row, col, prop, value, cellProperties) => {
|
201
|
+
(0, _textRenderer.textRenderer)(hotInstance, TD, row, col, prop, value, cellProperties);
|
195
202
|
const {
|
196
203
|
filteringCaseSensitive,
|
197
204
|
allowHtml,
|
@@ -226,12 +233,9 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
226
233
|
if (rootInstanceAriaTagsEnabled) {
|
227
234
|
// Add `role=presentation` to the main table to prevent the readers from treating the option list as a table.
|
228
235
|
(0, _element.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE, ...(0, _a11y.A11Y_PRESENTATION)());
|
229
|
-
(0, _element.setAttribute)(this.htEditor.rootElement, [(0, _a11y.A11Y_LISTBOX)(), (0, _a11y.A11Y_LIVE)('polite'), (0, _a11y.A11Y_RELEVANT)('text'), ['id', `${
|
236
|
+
(0, _element.setAttribute)(this.htEditor.rootElement, [(0, _a11y.A11Y_LISTBOX)(), (0, _a11y.A11Y_LIVE)('polite'), (0, _a11y.A11Y_RELEVANT)('text'), ['id', `${_classPrivateFieldGet(this, _idPrefix)}-listbox-${rowIndex}-${colIndex}`]]);
|
230
237
|
(0, _element.setAttribute)(this.TEXTAREA, ...(0, _a11y.A11Y_EXPANDED)('true'));
|
231
238
|
}
|
232
|
-
if (priv.skipOne) {
|
233
|
-
priv.skipOne = false;
|
234
|
-
}
|
235
239
|
this.hot._registerTimeout(() => {
|
236
240
|
this.queryChoices(this.TEXTAREA.value);
|
237
241
|
});
|
@@ -331,7 +335,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
331
335
|
}
|
332
336
|
}
|
333
337
|
this.hot.listen();
|
334
|
-
(0, _element.setCaretPosition)(this.TEXTAREA, pos, pos === endPos ?
|
338
|
+
(0, _element.setCaretPosition)(this.TEXTAREA, pos, pos === endPos ? undefined : endPos);
|
335
339
|
}
|
336
340
|
|
337
341
|
/**
|
@@ -414,7 +418,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
414
418
|
const dropdownStyle = this.htEditor.rootElement.style;
|
415
419
|
dropdownStyle.position = 'absolute';
|
416
420
|
dropdownStyle.top = '';
|
417
|
-
this.htEditor.flipped =
|
421
|
+
this.htEditor.flipped = undefined;
|
418
422
|
}
|
419
423
|
|
420
424
|
/**
|
@@ -427,7 +431,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
427
431
|
const trimDropdown = this.cellProperties.trimDropdown;
|
428
432
|
this.htEditor.updateSettings({
|
429
433
|
height: this.getDropdownHeight(),
|
430
|
-
width: trimDropdown ?
|
434
|
+
width: trimDropdown ? undefined : currentDropdownWidth
|
431
435
|
});
|
432
436
|
this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer();
|
433
437
|
}
|
@@ -452,7 +456,7 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
452
456
|
*/
|
453
457
|
highlightBestMatchingChoice(index) {
|
454
458
|
if (typeof index === 'number') {
|
455
|
-
this.htEditor.selectCell(index, 0,
|
459
|
+
this.htEditor.selectCell(index, 0, undefined, undefined, undefined, false);
|
456
460
|
} else {
|
457
461
|
this.htEditor.deselectCell();
|
458
462
|
}
|
@@ -526,8 +530,6 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
526
530
|
* @param {KeyboardEvent} event The keyboard event object.
|
527
531
|
*/
|
528
532
|
onBeforeKeyDown(event) {
|
529
|
-
const priv = privatePool.get(this);
|
530
|
-
priv.skipOne = false;
|
531
533
|
if ((0, _unicode.isPrintableChar)(event.keyCode) || event.keyCode === _unicode.KEY_CODES.BACKSPACE || event.keyCode === _unicode.KEY_CODES.DELETE || event.keyCode === _unicode.KEY_CODES.INSERT) {
|
532
534
|
// for Windows 10 + FF86 there is need to add delay to make sure that the value taken from
|
533
535
|
// the textarea is the freshest value. Otherwise the list of choices does not update correctly (see #7570).
|
@@ -545,7 +547,6 @@ class AutocompleteEditor extends _handsontableEditor.HandsontableEditor {
|
|
545
547
|
if (this.htEditor) {
|
546
548
|
this.hot._registerTimeout(() => {
|
547
549
|
this.queryChoices(this.TEXTAREA.value);
|
548
|
-
priv.skipOne = true;
|
549
550
|
}, timeOffset);
|
550
551
|
}
|
551
552
|
}
|
@@ -1,34 +1,59 @@
|
|
1
1
|
import "core-js/modules/es.array.push.js";
|
2
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"); } }
|
3
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; }
|
4
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
5
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 _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
10
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
6
11
|
import { HandsontableEditor } from "../handsontableEditor/index.mjs";
|
7
12
|
import { arrayMap, pivot } from "../../helpers/array.mjs";
|
8
13
|
import { addClass, getCaretPosition, getScrollbarWidth, getSelectionEndPosition, getTrimmingContainer, offset, outerHeight, outerWidth, setAttribute, setCaretPosition } from "../../helpers/dom/element.mjs";
|
9
14
|
import { isDefined, stringify } from "../../helpers/mixed.mjs";
|
10
15
|
import { stripTags } from "../../helpers/string.mjs";
|
11
16
|
import { KEY_CODES, isPrintableChar } from "../../helpers/unicode.mjs";
|
17
|
+
import { isMacOS } from "../../helpers/browser.mjs";
|
12
18
|
import { textRenderer } from "../../renderers/textRenderer/index.mjs";
|
13
19
|
import { A11Y_ACTIVEDESCENDANT, A11Y_AUTOCOMPLETE, A11Y_COMBOBOX, A11Y_CONTROLS, A11Y_EXPANDED, A11Y_HASPOPUP, A11Y_LISTBOX, A11Y_LIVE, A11Y_OPTION, A11Y_POSINSET, A11Y_PRESENTATION, A11Y_RELEVANT, A11Y_SELECTED, A11Y_SETSIZE, A11Y_TEXT } from "../../helpers/a11y.mjs";
|
14
|
-
const privatePool = new WeakMap();
|
15
20
|
export const EDITOR_TYPE = 'autocomplete';
|
16
21
|
|
17
22
|
/**
|
18
23
|
* @private
|
19
24
|
* @class AutocompleteEditor
|
20
25
|
*/
|
26
|
+
var _idPrefix = /*#__PURE__*/new WeakMap();
|
21
27
|
export class AutocompleteEditor extends HandsontableEditor {
|
22
|
-
|
23
|
-
|
24
|
-
}
|
25
|
-
constructor(instance) {
|
26
|
-
super(instance);
|
28
|
+
constructor() {
|
29
|
+
super(...arguments);
|
27
30
|
/**
|
28
31
|
* Query string to turn available values over.
|
29
32
|
*
|
30
33
|
* @type {string}
|
31
34
|
*/
|
35
|
+
_defineProperty(this, "query", null);
|
36
|
+
/**
|
37
|
+
* Contains stripped choices.
|
38
|
+
*
|
39
|
+
* @type {string[]}
|
40
|
+
*/
|
41
|
+
_defineProperty(this, "strippedChoices", []);
|
42
|
+
/**
|
43
|
+
* Contains raw choices.
|
44
|
+
*
|
45
|
+
* @type {Array}
|
46
|
+
*/
|
47
|
+
_defineProperty(this, "rawChoices", []);
|
48
|
+
/**
|
49
|
+
* Holds the prefix of the editor's id.
|
50
|
+
*
|
51
|
+
* @type {string}
|
52
|
+
*/
|
53
|
+
_classPrivateFieldInitSpec(this, _idPrefix, {
|
54
|
+
writable: true,
|
55
|
+
value: this.hot.guid.slice(0, 9)
|
56
|
+
});
|
32
57
|
/**
|
33
58
|
* Filters and sorts by relevance.
|
34
59
|
*
|
@@ -95,26 +120,10 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
95
120
|
}
|
96
121
|
return result;
|
97
122
|
});
|
98
|
-
this.query = null;
|
99
|
-
/**
|
100
|
-
* Contains stripped choices.
|
101
|
-
*
|
102
|
-
* @type {string[]}
|
103
|
-
*/
|
104
|
-
this.strippedChoices = [];
|
105
|
-
/**
|
106
|
-
* Contains raw choices.
|
107
|
-
*
|
108
|
-
* @type {Array}
|
109
|
-
*/
|
110
|
-
this.rawChoices = [];
|
111
|
-
privatePool.set(this, {
|
112
|
-
skipOne: false,
|
113
|
-
isMacOS: this.hot.rootWindow.navigator.platform.indexOf('Mac') > -1,
|
114
|
-
idPrefix: instance.guid.slice(0, 9)
|
115
|
-
});
|
116
123
|
}
|
117
|
-
|
124
|
+
static get EDITOR_TYPE() {
|
125
|
+
return EDITOR_TYPE;
|
126
|
+
}
|
118
127
|
/**
|
119
128
|
* Gets current value from editable element.
|
120
129
|
*
|
@@ -154,10 +163,9 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
154
163
|
* @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).
|
155
164
|
*/
|
156
165
|
prepare(row, col, prop, td, value, cellProperties) {
|
157
|
-
const priv = privatePool.get(this);
|
158
166
|
super.prepare(row, col, prop, td, value, cellProperties);
|
159
167
|
if (this.hot.getSettings().ariaTags) {
|
160
|
-
setAttribute(this.TEXTAREA, [A11Y_EXPANDED('false'), A11Y_CONTROLS(`${
|
168
|
+
setAttribute(this.TEXTAREA, [A11Y_EXPANDED('false'), A11Y_CONTROLS(`${_classPrivateFieldGet(this, _idPrefix)}-listbox-${row}-${col}`)]);
|
161
169
|
}
|
162
170
|
}
|
163
171
|
|
@@ -165,9 +173,8 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
165
173
|
* Opens the editor and adjust its size and internal Handsontable's instance.
|
166
174
|
*/
|
167
175
|
open() {
|
168
|
-
const priv = privatePool.get(this);
|
169
176
|
super.open();
|
170
|
-
const trimDropdown = this.cellProperties.trimDropdown ===
|
177
|
+
const trimDropdown = this.cellProperties.trimDropdown === undefined ? true : this.cellProperties.trimDropdown;
|
171
178
|
const rootInstanceAriaTagsEnabled = this.hot.getSettings().ariaTags;
|
172
179
|
const sourceArray = Array.isArray(this.cellProperties.source) ? this.cellProperties.source : null;
|
173
180
|
const sourceSize = sourceArray === null || sourceArray === void 0 ? void 0 : sourceArray.length;
|
@@ -178,17 +185,17 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
178
185
|
this.showEditableElement();
|
179
186
|
this.focus();
|
180
187
|
let scrollbarWidth = getScrollbarWidth();
|
181
|
-
if (scrollbarWidth === 0 &&
|
188
|
+
if (scrollbarWidth === 0 && isMacOS()) {
|
182
189
|
scrollbarWidth += 15; // default scroll bar width if scroll bars are visible only when scrolling
|
183
190
|
}
|
184
191
|
|
185
192
|
this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));
|
186
193
|
this.htEditor.updateSettings({
|
187
|
-
colWidths: trimDropdown ? [outerWidth(this.TEXTAREA) - 2] :
|
188
|
-
width: trimDropdown ? outerWidth(this.TEXTAREA) + scrollbarWidth :
|
194
|
+
colWidths: trimDropdown ? [outerWidth(this.TEXTAREA) - 2] : undefined,
|
195
|
+
width: trimDropdown ? outerWidth(this.TEXTAREA) + scrollbarWidth : undefined,
|
189
196
|
autoColumnSize: true,
|
190
|
-
renderer: (
|
191
|
-
textRenderer(
|
197
|
+
renderer: (hotInstance, TD, row, col, prop, value, cellProperties) => {
|
198
|
+
textRenderer(hotInstance, TD, row, col, prop, value, cellProperties);
|
192
199
|
const {
|
193
200
|
filteringCaseSensitive,
|
194
201
|
allowHtml,
|
@@ -223,12 +230,9 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
223
230
|
if (rootInstanceAriaTagsEnabled) {
|
224
231
|
// Add `role=presentation` to the main table to prevent the readers from treating the option list as a table.
|
225
232
|
setAttribute(this.htEditor.view._wt.wtOverlays.wtTable.TABLE, ...A11Y_PRESENTATION());
|
226
|
-
setAttribute(this.htEditor.rootElement, [A11Y_LISTBOX(), A11Y_LIVE('polite'), A11Y_RELEVANT('text'), ['id', `${
|
233
|
+
setAttribute(this.htEditor.rootElement, [A11Y_LISTBOX(), A11Y_LIVE('polite'), A11Y_RELEVANT('text'), ['id', `${_classPrivateFieldGet(this, _idPrefix)}-listbox-${rowIndex}-${colIndex}`]]);
|
227
234
|
setAttribute(this.TEXTAREA, ...A11Y_EXPANDED('true'));
|
228
235
|
}
|
229
|
-
if (priv.skipOne) {
|
230
|
-
priv.skipOne = false;
|
231
|
-
}
|
232
236
|
this.hot._registerTimeout(() => {
|
233
237
|
this.queryChoices(this.TEXTAREA.value);
|
234
238
|
});
|
@@ -328,7 +332,7 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
328
332
|
}
|
329
333
|
}
|
330
334
|
this.hot.listen();
|
331
|
-
setCaretPosition(this.TEXTAREA, pos, pos === endPos ?
|
335
|
+
setCaretPosition(this.TEXTAREA, pos, pos === endPos ? undefined : endPos);
|
332
336
|
}
|
333
337
|
|
334
338
|
/**
|
@@ -411,7 +415,7 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
411
415
|
const dropdownStyle = this.htEditor.rootElement.style;
|
412
416
|
dropdownStyle.position = 'absolute';
|
413
417
|
dropdownStyle.top = '';
|
414
|
-
this.htEditor.flipped =
|
418
|
+
this.htEditor.flipped = undefined;
|
415
419
|
}
|
416
420
|
|
417
421
|
/**
|
@@ -424,7 +428,7 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
424
428
|
const trimDropdown = this.cellProperties.trimDropdown;
|
425
429
|
this.htEditor.updateSettings({
|
426
430
|
height: this.getDropdownHeight(),
|
427
|
-
width: trimDropdown ?
|
431
|
+
width: trimDropdown ? undefined : currentDropdownWidth
|
428
432
|
});
|
429
433
|
this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer();
|
430
434
|
}
|
@@ -449,7 +453,7 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
449
453
|
*/
|
450
454
|
highlightBestMatchingChoice(index) {
|
451
455
|
if (typeof index === 'number') {
|
452
|
-
this.htEditor.selectCell(index, 0,
|
456
|
+
this.htEditor.selectCell(index, 0, undefined, undefined, undefined, false);
|
453
457
|
} else {
|
454
458
|
this.htEditor.deselectCell();
|
455
459
|
}
|
@@ -523,8 +527,6 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
523
527
|
* @param {KeyboardEvent} event The keyboard event object.
|
524
528
|
*/
|
525
529
|
onBeforeKeyDown(event) {
|
526
|
-
const priv = privatePool.get(this);
|
527
|
-
priv.skipOne = false;
|
528
530
|
if (isPrintableChar(event.keyCode) || event.keyCode === KEY_CODES.BACKSPACE || event.keyCode === KEY_CODES.DELETE || event.keyCode === KEY_CODES.INSERT) {
|
529
531
|
// for Windows 10 + FF86 there is need to add delay to make sure that the value taken from
|
530
532
|
// the textarea is the freshest value. Otherwise the list of choices does not update correctly (see #7570).
|
@@ -542,7 +544,6 @@ export class AutocompleteEditor extends HandsontableEditor {
|
|
542
544
|
if (this.htEditor) {
|
543
545
|
this.hot._registerTimeout(() => {
|
544
546
|
this.queryChoices(this.TEXTAREA.value);
|
545
|
-
priv.skipOne = true;
|
546
547
|
}, timeOffset);
|
547
548
|
}
|
548
549
|
}
|
@@ -8,6 +8,9 @@ var _editorManager = require("../../editorManager");
|
|
8
8
|
var _hooksRefRegisterer = _interopRequireDefault(require("../../mixins/hooksRefRegisterer"));
|
9
9
|
var _element = require("../../helpers/dom/element");
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
+
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; }
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
13
|
+
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); }
|
11
14
|
const EDITOR_TYPE = exports.EDITOR_TYPE = 'base';
|
12
15
|
const EDITOR_STATE = exports.EDITOR_STATE = Object.freeze({
|
13
16
|
VIRGIN: 'STATE_VIRGIN',
|
@@ -28,29 +31,22 @@ class BaseEditor {
|
|
28
31
|
}
|
29
32
|
|
30
33
|
/**
|
31
|
-
*
|
34
|
+
* A reference to the source instance of the Handsontable.
|
35
|
+
*
|
36
|
+
* @type {Handsontable}
|
32
37
|
*/
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
this.hot = instance;
|
40
|
-
/**
|
41
|
-
* A reference to the source instance of the Handsontable.
|
42
|
-
*
|
43
|
-
* @deprecated
|
44
|
-
*
|
45
|
-
* @type {Handsontable}
|
46
|
-
*/
|
47
|
-
this.instance = instance;
|
38
|
+
|
39
|
+
/**
|
40
|
+
* @param {Handsontable} hotInstance A reference to the source instance of the Handsontable.
|
41
|
+
*/
|
42
|
+
constructor(hotInstance) {
|
43
|
+
_defineProperty(this, "hot", void 0);
|
48
44
|
/**
|
49
45
|
* Editor's state.
|
50
46
|
*
|
51
47
|
* @type {string}
|
52
48
|
*/
|
53
|
-
this
|
49
|
+
_defineProperty(this, "state", EDITOR_STATE.VIRGIN);
|
54
50
|
/**
|
55
51
|
* Flag to store information about editor's opening status.
|
56
52
|
*
|
@@ -58,7 +54,7 @@ class BaseEditor {
|
|
58
54
|
*
|
59
55
|
* @type {boolean}
|
60
56
|
*/
|
61
|
-
this
|
57
|
+
_defineProperty(this, "_opened", false);
|
62
58
|
/**
|
63
59
|
* Defines the editor's editing mode. When false, then an editor works in fast editing mode.
|
64
60
|
*
|
@@ -66,49 +62,50 @@ class BaseEditor {
|
|
66
62
|
*
|
67
63
|
* @type {boolean}
|
68
64
|
*/
|
69
|
-
this
|
65
|
+
_defineProperty(this, "_fullEditMode", false);
|
70
66
|
/**
|
71
67
|
* Callback to call after closing editor.
|
72
68
|
*
|
73
69
|
* @type {Function}
|
74
70
|
*/
|
75
|
-
this
|
71
|
+
_defineProperty(this, "_closeCallback", null);
|
76
72
|
/**
|
77
73
|
* Currently rendered cell's TD element.
|
78
74
|
*
|
79
75
|
* @type {HTMLTableCellElement}
|
80
76
|
*/
|
81
|
-
this
|
77
|
+
_defineProperty(this, "TD", null);
|
82
78
|
/**
|
83
79
|
* Visual row index.
|
84
80
|
*
|
85
81
|
* @type {number}
|
86
82
|
*/
|
87
|
-
this
|
83
|
+
_defineProperty(this, "row", null);
|
88
84
|
/**
|
89
85
|
* Visual column index.
|
90
86
|
*
|
91
87
|
* @type {number}
|
92
88
|
*/
|
93
|
-
this
|
89
|
+
_defineProperty(this, "col", null);
|
94
90
|
/**
|
95
91
|
* Column property name or a column index, if datasource is an array of arrays.
|
96
92
|
*
|
97
93
|
* @type {number|string}
|
98
94
|
*/
|
99
|
-
this
|
95
|
+
_defineProperty(this, "prop", null);
|
100
96
|
/**
|
101
97
|
* Original cell's value.
|
102
98
|
*
|
103
99
|
* @type {*}
|
104
100
|
*/
|
105
|
-
this
|
101
|
+
_defineProperty(this, "originalValue", null);
|
106
102
|
/**
|
107
103
|
* Object containing the cell's properties.
|
108
104
|
*
|
109
105
|
* @type {object}
|
110
106
|
*/
|
111
|
-
this
|
107
|
+
_defineProperty(this, "cellProperties", null);
|
108
|
+
this.hot = hotInstance;
|
112
109
|
this.init();
|
113
110
|
}
|
114
111
|
|
@@ -1,4 +1,7 @@
|
|
1
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); }
|
2
5
|
import { isDefined, stringify } from "../../helpers/mixed.mjs";
|
3
6
|
import { mixin } from "../../helpers/object.mjs";
|
4
7
|
import { SHORTCUTS_GROUP_NAVIGATION } from "../../editorManager.mjs";
|
@@ -24,29 +27,22 @@ export class BaseEditor {
|
|
24
27
|
}
|
25
28
|
|
26
29
|
/**
|
27
|
-
*
|
30
|
+
* A reference to the source instance of the Handsontable.
|
31
|
+
*
|
32
|
+
* @type {Handsontable}
|
28
33
|
*/
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
this.hot = instance;
|
36
|
-
/**
|
37
|
-
* A reference to the source instance of the Handsontable.
|
38
|
-
*
|
39
|
-
* @deprecated
|
40
|
-
*
|
41
|
-
* @type {Handsontable}
|
42
|
-
*/
|
43
|
-
this.instance = instance;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* @param {Handsontable} hotInstance A reference to the source instance of the Handsontable.
|
37
|
+
*/
|
38
|
+
constructor(hotInstance) {
|
39
|
+
_defineProperty(this, "hot", void 0);
|
44
40
|
/**
|
45
41
|
* Editor's state.
|
46
42
|
*
|
47
43
|
* @type {string}
|
48
44
|
*/
|
49
|
-
this
|
45
|
+
_defineProperty(this, "state", EDITOR_STATE.VIRGIN);
|
50
46
|
/**
|
51
47
|
* Flag to store information about editor's opening status.
|
52
48
|
*
|
@@ -54,7 +50,7 @@ export class BaseEditor {
|
|
54
50
|
*
|
55
51
|
* @type {boolean}
|
56
52
|
*/
|
57
|
-
this
|
53
|
+
_defineProperty(this, "_opened", false);
|
58
54
|
/**
|
59
55
|
* Defines the editor's editing mode. When false, then an editor works in fast editing mode.
|
60
56
|
*
|
@@ -62,49 +58,50 @@ export class BaseEditor {
|
|
62
58
|
*
|
63
59
|
* @type {boolean}
|
64
60
|
*/
|
65
|
-
this
|
61
|
+
_defineProperty(this, "_fullEditMode", false);
|
66
62
|
/**
|
67
63
|
* Callback to call after closing editor.
|
68
64
|
*
|
69
65
|
* @type {Function}
|
70
66
|
*/
|
71
|
-
this
|
67
|
+
_defineProperty(this, "_closeCallback", null);
|
72
68
|
/**
|
73
69
|
* Currently rendered cell's TD element.
|
74
70
|
*
|
75
71
|
* @type {HTMLTableCellElement}
|
76
72
|
*/
|
77
|
-
this
|
73
|
+
_defineProperty(this, "TD", null);
|
78
74
|
/**
|
79
75
|
* Visual row index.
|
80
76
|
*
|
81
77
|
* @type {number}
|
82
78
|
*/
|
83
|
-
this
|
79
|
+
_defineProperty(this, "row", null);
|
84
80
|
/**
|
85
81
|
* Visual column index.
|
86
82
|
*
|
87
83
|
* @type {number}
|
88
84
|
*/
|
89
|
-
this
|
85
|
+
_defineProperty(this, "col", null);
|
90
86
|
/**
|
91
87
|
* Column property name or a column index, if datasource is an array of arrays.
|
92
88
|
*
|
93
89
|
* @type {number|string}
|
94
90
|
*/
|
95
|
-
this
|
91
|
+
_defineProperty(this, "prop", null);
|
96
92
|
/**
|
97
93
|
* Original cell's value.
|
98
94
|
*
|
99
95
|
* @type {*}
|
100
96
|
*/
|
101
|
-
this
|
97
|
+
_defineProperty(this, "originalValue", null);
|
102
98
|
/**
|
103
99
|
* Object containing the cell's properties.
|
104
100
|
*
|
105
101
|
* @type {object}
|
106
102
|
*/
|
107
|
-
this
|
103
|
+
_defineProperty(this, "cellProperties", null);
|
104
|
+
this.hot = hotInstance;
|
108
105
|
this.init();
|
109
106
|
}
|
110
107
|
|