handsontable 0.0.0-next-53a190b-20240403 → 0.0.0-next-5a535ed-20240403
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +17 -12
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +17 -12
- package/3rdparty/walkontable/src/calculator/viewportRows.js +15 -10
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +15 -10
- package/3rdparty/walkontable/src/cell/coords.js +17 -12
- package/3rdparty/walkontable/src/cell/coords.mjs +17 -12
- package/3rdparty/walkontable/src/cell/range.d.ts +1 -2
- package/3rdparty/walkontable/src/cell/range.js +28 -40
- package/3rdparty/walkontable/src/cell/range.mjs +28 -40
- package/3rdparty/walkontable/src/core/_base.js +1 -1
- package/3rdparty/walkontable/src/core/_base.mjs +1 -1
- package/3rdparty/walkontable/src/event.js +104 -72
- package/3rdparty/walkontable/src/event.mjs +104 -72
- package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -15
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -16
- package/3rdparty/walkontable/src/overlay/top.js +0 -11
- package/3rdparty/walkontable/src/overlay/top.mjs +1 -12
- package/3rdparty/walkontable/src/overlays.js +4 -46
- package/3rdparty/walkontable/src/overlays.mjs +4 -46
- package/3rdparty/walkontable/src/scroll.js +17 -15
- package/3rdparty/walkontable/src/scroll.mjs +17 -15
- package/3rdparty/walkontable/src/selection/manager.js +69 -48
- package/3rdparty/walkontable/src/selection/manager.mjs +69 -48
- package/3rdparty/walkontable/src/selection/scanner.js +42 -33
- package/3rdparty/walkontable/src/selection/scanner.mjs +42 -33
- package/3rdparty/walkontable/src/utils/columnStretching.js +44 -27
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +44 -27
- package/3rdparty/walkontable/src/utils/orderView/view.js +1 -1
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +1 -1
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/viewportScroll/index.js +1 -4
- package/core/viewportScroll/index.mjs +1 -4
- package/core.d.ts +3 -4
- package/core.js +22 -77
- package/core.mjs +22 -77
- package/dataMap/dataSource.js +1 -1
- package/dataMap/dataSource.mjs +1 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +1 -1
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
- package/dataMap/metaManager/metaSchema.js +1 -1
- package/dataMap/metaManager/metaSchema.mjs +1 -1
- package/dataMap/replaceData.js +1 -1
- package/dataMap/replaceData.mjs +1 -1
- package/dist/handsontable.css +4 -4
- package/dist/handsontable.full.css +4 -4
- package/dist/handsontable.full.js +9121 -9062
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +292 -292
- package/dist/handsontable.js +6573 -6967
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +25 -25
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ar-AR.min.js +1 -1
- package/dist/languages/cs-CZ.min.js +1 -1
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/hr-HR.min.js +1 -1
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.min.js +1 -1
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.min.js +1 -1
- package/editorManager.js +23 -25
- package/editorManager.mjs +23 -25
- package/editors/autocompleteEditor/autocompleteEditor.js +10 -6
- package/editors/autocompleteEditor/autocompleteEditor.mjs +10 -6
- package/editors/selectEditor/selectEditor.js +19 -20
- package/editors/selectEditor/selectEditor.mjs +19 -20
- package/eventManager.js +1 -1
- package/eventManager.mjs +1 -1
- package/focusManager.js +82 -64
- package/focusManager.mjs +82 -64
- package/helpers/dom/element.js +1 -23
- package/helpers/dom/element.mjs +1 -21
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/object.js +2 -2
- package/helpers/object.mjs +2 -2
- package/index.d.ts +0 -10
- package/package.json +2 -7
- package/pluginHooks.d.ts +3 -4
- package/pluginHooks.js +38 -99
- package/pluginHooks.mjs +38 -99
- package/plugins/autoColumnSize/autoColumnSize.js +65 -49
- package/plugins/autoColumnSize/autoColumnSize.mjs +65 -49
- package/plugins/autoRowSize/autoRowSize.js +34 -28
- package/plugins/autoRowSize/autoRowSize.mjs +34 -28
- package/plugins/autofill/autofill.js +38 -30
- package/plugins/autofill/autofill.mjs +38 -30
- package/plugins/base/base.js +17 -12
- package/plugins/base/base.mjs +17 -12
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +5 -5
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +5 -5
- package/plugins/collapsibleColumns/collapsibleColumns.js +50 -59
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +50 -59
- package/plugins/columnSorting/columnSorting.js +45 -49
- package/plugins/columnSorting/columnSorting.mjs +45 -49
- package/plugins/columnSummary/columnSummary.js +26 -22
- package/plugins/columnSummary/columnSummary.mjs +26 -22
- package/plugins/comments/comments.js +158 -116
- package/plugins/comments/comments.mjs +158 -116
- package/plugins/contextMenu/contextMenu.js +26 -20
- package/plugins/contextMenu/contextMenu.mjs +26 -20
- package/plugins/contextMenu/itemsFactory.js +1 -1
- package/plugins/contextMenu/itemsFactory.mjs +1 -1
- package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
- package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
- package/plugins/contextMenu/menu/menu.js +21 -13
- package/plugins/contextMenu/menu/menu.mjs +21 -13
- package/plugins/contextMenu/menu/positioner.js +58 -41
- package/plugins/contextMenu/menu/positioner.mjs +58 -41
- package/plugins/copyPaste/copyPaste.js +157 -116
- package/plugins/copyPaste/copyPaste.mjs +157 -116
- package/plugins/copyPaste/copyableRanges.js +66 -43
- package/plugins/copyPaste/copyableRanges.mjs +66 -43
- package/plugins/customBorders/customBorders.js +13 -11
- package/plugins/customBorders/customBorders.mjs +13 -11
- package/plugins/dragToScroll/dragToScroll.js +6 -6
- package/plugins/dragToScroll/dragToScroll.mjs +6 -6
- package/plugins/dropdownMenu/dropdownMenu.js +106 -80
- package/plugins/dropdownMenu/dropdownMenu.mjs +106 -80
- package/plugins/exportFile/dataProvider.js +1 -1
- package/plugins/exportFile/dataProvider.mjs +1 -1
- package/plugins/filters/component/actionBar.js +9 -9
- package/plugins/filters/component/actionBar.mjs +8 -8
- package/plugins/filters/component/condition.js +15 -13
- package/plugins/filters/component/condition.mjs +15 -13
- package/plugins/filters/component/operators.js +6 -6
- package/plugins/filters/component/operators.mjs +6 -6
- package/plugins/filters/component/value.js +28 -24
- package/plugins/filters/component/value.mjs +28 -24
- package/plugins/filters/conditionUpdateObserver.js +24 -22
- package/plugins/filters/conditionUpdateObserver.mjs +24 -22
- package/plugins/filters/dataFilter.js +1 -1
- package/plugins/filters/dataFilter.mjs +1 -1
- package/plugins/filters/filters.js +95 -81
- package/plugins/filters/filters.mjs +95 -81
- package/plugins/filters/ui/input.js +19 -13
- package/plugins/filters/ui/input.mjs +19 -13
- package/plugins/filters/ui/link.js +13 -8
- package/plugins/filters/ui/link.mjs +13 -8
- package/plugins/filters/ui/multipleSelect.js +112 -85
- package/plugins/filters/ui/multipleSelect.mjs +112 -85
- package/plugins/filters/ui/radioInput.js +20 -12
- package/plugins/filters/ui/radioInput.mjs +20 -12
- package/plugins/filters/ui/select.js +72 -50
- package/plugins/filters/ui/select.mjs +71 -49
- package/plugins/formulas/formulas.js +326 -268
- package/plugins/formulas/formulas.mjs +327 -269
- package/plugins/formulas/indexSyncer/axisSyncer.js +61 -38
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +61 -38
- package/plugins/formulas/indexSyncer/index.js +48 -25
- package/plugins/formulas/indexSyncer/index.mjs +48 -25
- package/plugins/hiddenColumns/hiddenColumns.js +83 -64
- package/plugins/hiddenColumns/hiddenColumns.mjs +83 -64
- package/plugins/hiddenRows/hiddenRows.js +82 -63
- package/plugins/hiddenRows/hiddenRows.mjs +82 -63
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +32 -24
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +33 -25
- package/plugins/manualColumnMove/manualColumnMove.js +170 -126
- package/plugins/manualColumnMove/manualColumnMove.mjs +170 -126
- package/plugins/manualColumnResize/manualColumnResize.js +230 -169
- package/plugins/manualColumnResize/manualColumnResize.mjs +230 -169
- package/plugins/manualRowMove/manualRowMove.js +128 -99
- package/plugins/manualRowMove/manualRowMove.mjs +128 -99
- package/plugins/manualRowResize/manualRowResize.js +209 -150
- package/plugins/manualRowResize/manualRowResize.mjs +209 -150
- package/plugins/mergeCells/calculations/selection.js +71 -2
- package/plugins/mergeCells/calculations/selection.mjs +71 -2
- package/plugins/mergeCells/cellsCollection.js +1 -117
- package/plugins/mergeCells/cellsCollection.mjs +1 -117
- package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -11
- package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +1 -11
- package/plugins/mergeCells/mergeCells.js +397 -499
- package/plugins/mergeCells/mergeCells.mjs +397 -499
- package/plugins/multiColumnSorting/multiColumnSorting.js +2 -8
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -8
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +1 -1
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +1 -1
- package/plugins/nestedHeaders/nestedHeaders.js +253 -205
- package/plugins/nestedHeaders/nestedHeaders.mjs +254 -206
- package/plugins/nestedHeaders/stateManager/headersTree.js +32 -21
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +32 -21
- package/plugins/nestedHeaders/stateManager/index.js +41 -30
- package/plugins/nestedHeaders/stateManager/index.mjs +41 -30
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +30 -19
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +30 -19
- package/plugins/nestedRows/data/dataManager.js +1 -1
- package/plugins/nestedRows/data/dataManager.mjs +1 -1
- package/plugins/nestedRows/nestedRows.js +182 -151
- package/plugins/nestedRows/nestedRows.mjs +183 -152
- package/plugins/nestedRows/ui/contextMenu.js +15 -11
- package/plugins/nestedRows/ui/contextMenu.mjs +14 -10
- package/plugins/nestedRows/utils/rowMoveController.js +1 -1
- package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
- package/plugins/persistentState/storage.js +2 -2
- package/plugins/persistentState/storage.mjs +2 -2
- package/plugins/search/search.js +7 -7
- package/plugins/search/search.mjs +7 -7
- package/plugins/touchScroll/touchScroll.js +19 -15
- package/plugins/touchScroll/touchScroll.mjs +20 -16
- package/plugins/trimRows/trimRows.js +6 -6
- package/plugins/trimRows/trimRows.mjs +6 -6
- package/renderers/checkboxRenderer/checkboxRenderer.js +5 -8
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +5 -8
- package/selection/highlight/highlight.js +14 -14
- package/selection/highlight/highlight.mjs +13 -13
- package/selection/highlight/visualSelection.js +0 -2
- package/selection/highlight/visualSelection.mjs +0 -2
- package/selection/selection.js +67 -225
- package/selection/selection.mjs +66 -224
- package/selection/transformation.js +118 -149
- package/selection/transformation.mjs +118 -149
- package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
- package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
- package/shortcutContexts/commands/editor/open.js +3 -18
- package/shortcutContexts/commands/editor/open.mjs +3 -18
- package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -9
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -9
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -10
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -10
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -3
- package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -6
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -6
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -6
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -6
- package/shortcutContexts/grid.js +3 -9
- package/shortcutContexts/grid.mjs +3 -9
- package/shortcuts/context.js +1 -2
- package/shortcuts/context.mjs +1 -2
- package/tableView.js +78 -52
- package/tableView.mjs +78 -52
- package/translations/changesObservable/observable.js +38 -21
- package/translations/changesObservable/observable.mjs +38 -21
- package/translations/changesObservable/observer.js +12 -7
- package/translations/changesObservable/observer.mjs +11 -6
- package/translations/mapCollections/aggregatedCollection.js +1 -1
- package/translations/mapCollections/aggregatedCollection.mjs +1 -1
- package/translations/maps/indexMap.js +1 -1
- package/translations/maps/indexMap.mjs +1 -1
- package/utils/dataStructures/linkedList.js +1 -6
- package/utils/dataStructures/linkedList.mjs +1 -6
- package/utils/dataStructures/tree.js +1 -1
- package/utils/dataStructures/tree.mjs +1 -1
- package/utils/interval.js +44 -26
- package/utils/interval.mjs +44 -26
- package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
- package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
- package/i18n/languages/ar-AR.d.ts +0 -5
- package/i18n/languages/cs-CZ.d.ts +0 -5
- package/i18n/languages/hr-HR.d.ts +0 -5
- package/i18n/languages/sr-SP.d.ts +0 -5
- package/plugins/mergeCells/focusOrder.js +0 -305
- package/plugins/mergeCells/focusOrder.mjs +0 -300
@@ -4,8 +4,9 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
6
6
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
7
|
-
function _classPrivateFieldGet(
|
8
|
-
function
|
7
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
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 _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
9
10
|
import { rangeEach } from "../../../helpers/number.mjs";
|
10
11
|
import { arrayEach } from "../../../helpers/array.mjs";
|
11
12
|
import * as C from "../../../i18n/constants.mjs";
|
@@ -28,13 +29,16 @@ class ContextMenuUI extends BaseUI {
|
|
28
29
|
*/
|
29
30
|
_defineProperty(this, "dataManager", this.plugin.dataManager);
|
30
31
|
_classPrivateFieldInitSpec(this, _menuEntries, {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
32
|
+
writable: true,
|
33
|
+
value: {
|
34
|
+
row_above: (key, selection) => {
|
35
|
+
const lastSelection = selection[selection.length - 1];
|
36
|
+
this.dataManager.addSibling(lastSelection.start.row, 'above');
|
37
|
+
},
|
38
|
+
row_below: (key, selection) => {
|
39
|
+
const lastSelection = selection[selection.length - 1];
|
40
|
+
this.dataManager.addSibling(lastSelection.start.row, 'below');
|
41
|
+
}
|
38
42
|
}
|
39
43
|
});
|
40
44
|
}
|
@@ -98,7 +102,7 @@ class ContextMenuUI extends BaseUI {
|
|
98
102
|
*/
|
99
103
|
modifyRowInsertingOptions(defaultOptions) {
|
100
104
|
rangeEach(0, defaultOptions.items.length - 1, i => {
|
101
|
-
const option = _classPrivateFieldGet(
|
105
|
+
const option = _classPrivateFieldGet(this, _menuEntries)[defaultOptions.items[i].key];
|
102
106
|
if (option !== null && option !== undefined) {
|
103
107
|
defaultOptions.items[i].callback = option;
|
104
108
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
5
4
|
require("core-js/modules/es.array.push.js");
|
5
|
+
require("core-js/modules/es.error.cause.js");
|
6
6
|
var _mixed = require("../../../helpers/mixed");
|
7
7
|
var _console = require("../../../helpers/console");
|
8
8
|
var _templateLiteralTag = require("../../../helpers/templateLiteralTag");
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import "core-js/modules/es.error.cause.js";
|
2
1
|
import "core-js/modules/es.array.push.js";
|
2
|
+
import "core-js/modules/es.error.cause.js";
|
3
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
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
5
5
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
5
|
-
require("core-js/modules/es.array.push.js");
|
6
4
|
require("core-js/modules/es.json.stringify.js");
|
5
|
+
require("core-js/modules/es.array.push.js");
|
6
|
+
require("core-js/modules/es.error.cause.js");
|
7
7
|
var _array = require("../../helpers/array");
|
8
8
|
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; }
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import "core-js/modules/es.error.cause.js";
|
2
|
-
import "core-js/modules/es.array.push.js";
|
3
1
|
import "core-js/modules/es.json.stringify.js";
|
2
|
+
import "core-js/modules/es.array.push.js";
|
3
|
+
import "core-js/modules/es.error.cause.js";
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
6
6
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
package/plugins/search/search.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
5
4
|
require("core-js/modules/es.array.push.js");
|
5
|
+
require("core-js/modules/es.error.cause.js");
|
6
6
|
var _base = require("../base");
|
7
7
|
var _object = require("../../helpers/object");
|
8
8
|
var _number = require("../../helpers/number");
|
@@ -12,7 +12,7 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
|
|
12
12
|
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; }
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
14
14
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
15
|
-
function
|
15
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
16
16
|
const PLUGIN_KEY = exports.PLUGIN_KEY = 'search';
|
17
17
|
const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 190;
|
18
18
|
const DEFAULT_SEARCH_RESULT_CLASS = 'htSearchResult';
|
@@ -62,7 +62,7 @@ const DEFAULT_QUERY_METHOD = function (query, value, cellProperties) {
|
|
62
62
|
* searchPlugin.setSearchResultClass(customClass);
|
63
63
|
* ```
|
64
64
|
*/
|
65
|
-
var
|
65
|
+
var _onBeforeRenderer = /*#__PURE__*/new WeakSet();
|
66
66
|
class Search extends _base.BasePlugin {
|
67
67
|
constructor() {
|
68
68
|
super(...arguments);
|
@@ -76,7 +76,7 @@ class Search extends _base.BasePlugin {
|
|
76
76
|
* @param {string} value Value of the rendered cell.
|
77
77
|
* @param {object} cellProperties Object containing the cell's properties.
|
78
78
|
*/
|
79
|
-
_classPrivateMethodInitSpec(this,
|
79
|
+
_classPrivateMethodInitSpec(this, _onBeforeRenderer);
|
80
80
|
/**
|
81
81
|
* Function called during querying for each cell from the {@link DataMap}.
|
82
82
|
*
|
@@ -129,7 +129,7 @@ class Search extends _base.BasePlugin {
|
|
129
129
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
130
130
|
args[_key] = arguments[_key];
|
131
131
|
}
|
132
|
-
return
|
132
|
+
return _classPrivateMethodGet(_this, _onBeforeRenderer, _onBeforeRenderer2).call(_this, ...args);
|
133
133
|
});
|
134
134
|
super.enablePlugin();
|
135
135
|
}
|
@@ -143,7 +143,7 @@ class Search extends _base.BasePlugin {
|
|
143
143
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
144
144
|
args[_key2] = arguments[_key2];
|
145
145
|
}
|
146
|
-
return
|
146
|
+
return _classPrivateMethodGet(_this2, _onBeforeRenderer, _onBeforeRenderer2).call(_this2, ...args);
|
147
147
|
};
|
148
148
|
this.hot.addHook('beforeRenderer', beforeRendererCallback);
|
149
149
|
this.hot.addHookOnce('afterViewRender', () => {
|
@@ -283,7 +283,7 @@ class Search extends _base.BasePlugin {
|
|
283
283
|
}
|
284
284
|
}
|
285
285
|
exports.Search = Search;
|
286
|
-
function
|
286
|
+
function _onBeforeRenderer2(TD, row, col, prop, value, cellProperties) {
|
287
287
|
// TODO: #4972
|
288
288
|
const className = cellProperties.className || [];
|
289
289
|
let classArray = [];
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import "core-js/modules/es.error.cause.js";
|
2
1
|
import "core-js/modules/es.array.push.js";
|
2
|
+
import "core-js/modules/es.error.cause.js";
|
3
3
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
4
4
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
7
7
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
-
function
|
8
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
9
9
|
import { BasePlugin } from "../base/index.mjs";
|
10
10
|
import { isObject } from "../../helpers/object.mjs";
|
11
11
|
import { rangeEach } from "../../helpers/number.mjs";
|
@@ -59,7 +59,7 @@ const DEFAULT_QUERY_METHOD = function (query, value, cellProperties) {
|
|
59
59
|
* searchPlugin.setSearchResultClass(customClass);
|
60
60
|
* ```
|
61
61
|
*/
|
62
|
-
var
|
62
|
+
var _onBeforeRenderer = /*#__PURE__*/new WeakSet();
|
63
63
|
export class Search extends BasePlugin {
|
64
64
|
constructor() {
|
65
65
|
super(...arguments);
|
@@ -73,7 +73,7 @@ export class Search extends BasePlugin {
|
|
73
73
|
* @param {string} value Value of the rendered cell.
|
74
74
|
* @param {object} cellProperties Object containing the cell's properties.
|
75
75
|
*/
|
76
|
-
_classPrivateMethodInitSpec(this,
|
76
|
+
_classPrivateMethodInitSpec(this, _onBeforeRenderer);
|
77
77
|
/**
|
78
78
|
* Function called during querying for each cell from the {@link DataMap}.
|
79
79
|
*
|
@@ -126,7 +126,7 @@ export class Search extends BasePlugin {
|
|
126
126
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
127
127
|
args[_key] = arguments[_key];
|
128
128
|
}
|
129
|
-
return
|
129
|
+
return _classPrivateMethodGet(_this, _onBeforeRenderer, _onBeforeRenderer2).call(_this, ...args);
|
130
130
|
});
|
131
131
|
super.enablePlugin();
|
132
132
|
}
|
@@ -140,7 +140,7 @@ export class Search extends BasePlugin {
|
|
140
140
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
141
141
|
args[_key2] = arguments[_key2];
|
142
142
|
}
|
143
|
-
return
|
143
|
+
return _classPrivateMethodGet(_this2, _onBeforeRenderer, _onBeforeRenderer2).call(_this2, ...args);
|
144
144
|
};
|
145
145
|
this.hot.addHook('beforeRenderer', beforeRendererCallback);
|
146
146
|
this.hot.addHookOnce('afterViewRender', () => {
|
@@ -279,7 +279,7 @@ export class Search extends BasePlugin {
|
|
279
279
|
super.destroy();
|
280
280
|
}
|
281
281
|
}
|
282
|
-
function
|
282
|
+
function _onBeforeRenderer2(TD, row, col, prop, value, cellProperties) {
|
283
283
|
// TODO: #4972
|
284
284
|
const className = cellProperties.className || [];
|
285
285
|
let classArray = [];
|
@@ -12,7 +12,7 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
|
|
12
12
|
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; }
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
14
14
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
15
|
-
function
|
15
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
16
16
|
const PLUGIN_KEY = exports.PLUGIN_KEY = 'touchScroll';
|
17
17
|
const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 200;
|
18
18
|
|
@@ -21,14 +21,24 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 200;
|
|
21
21
|
* @plugin TouchScroll
|
22
22
|
* @class TouchScroll
|
23
23
|
*/
|
24
|
-
var
|
24
|
+
var _onAfterViewRender = /*#__PURE__*/new WeakSet();
|
25
|
+
var _onBeforeTouchScroll = /*#__PURE__*/new WeakSet();
|
26
|
+
var _onAfterMomentumScroll = /*#__PURE__*/new WeakSet();
|
25
27
|
class TouchScroll extends _base.BasePlugin {
|
26
28
|
constructor() {
|
27
29
|
super(...arguments);
|
30
|
+
/**
|
31
|
+
* After momentum scroll listener.
|
32
|
+
*/
|
33
|
+
_classPrivateMethodInitSpec(this, _onAfterMomentumScroll);
|
34
|
+
/**
|
35
|
+
* Touch scroll listener.
|
36
|
+
*/
|
37
|
+
_classPrivateMethodInitSpec(this, _onBeforeTouchScroll);
|
28
38
|
/**
|
29
39
|
* After view render listener.
|
30
40
|
*/
|
31
|
-
_classPrivateMethodInitSpec(this,
|
41
|
+
_classPrivateMethodInitSpec(this, _onAfterViewRender);
|
32
42
|
/**
|
33
43
|
* Collection of scrollbars to update.
|
34
44
|
*
|
@@ -81,7 +91,7 @@ class TouchScroll extends _base.BasePlugin {
|
|
81
91
|
if (this.enabled) {
|
82
92
|
return;
|
83
93
|
}
|
84
|
-
this.addHook('afterViewRender', () =>
|
94
|
+
this.addHook('afterViewRender', () => _classPrivateMethodGet(this, _onAfterViewRender, _onAfterViewRender2).call(this));
|
85
95
|
this.registerEvents();
|
86
96
|
super.enablePlugin();
|
87
97
|
}
|
@@ -107,12 +117,12 @@ class TouchScroll extends _base.BasePlugin {
|
|
107
117
|
* @private
|
108
118
|
*/
|
109
119
|
registerEvents() {
|
110
|
-
this.addHook('beforeTouchScroll', () =>
|
111
|
-
this.addHook('afterMomentumScroll', () =>
|
120
|
+
this.addHook('beforeTouchScroll', () => _classPrivateMethodGet(this, _onBeforeTouchScroll, _onBeforeTouchScroll2).call(this));
|
121
|
+
this.addHook('afterMomentumScroll', () => _classPrivateMethodGet(this, _onAfterMomentumScroll, _onAfterMomentumScroll2).call(this));
|
112
122
|
}
|
113
123
|
}
|
114
124
|
exports.TouchScroll = TouchScroll;
|
115
|
-
function
|
125
|
+
function _onAfterViewRender2() {
|
116
126
|
if (this.lockedCollection) {
|
117
127
|
return;
|
118
128
|
}
|
@@ -153,19 +163,13 @@ function _onAfterViewRender() {
|
|
153
163
|
this.clones.push(bottomInlineStartCornerOverlay.clone.wtTable.holder.parentNode);
|
154
164
|
}
|
155
165
|
}
|
156
|
-
|
157
|
-
* Touch scroll listener.
|
158
|
-
*/
|
159
|
-
function _onBeforeTouchScroll() {
|
166
|
+
function _onBeforeTouchScroll2() {
|
160
167
|
this.freezeOverlays = true;
|
161
168
|
(0, _array.arrayEach)(this.clones, clone => {
|
162
169
|
(0, _element.addClass)(clone, 'hide-tween');
|
163
170
|
});
|
164
171
|
}
|
165
|
-
|
166
|
-
* After momentum scroll listener.
|
167
|
-
*/
|
168
|
-
function _onAfterMomentumScroll() {
|
172
|
+
function _onAfterMomentumScroll2() {
|
169
173
|
this.freezeOverlays = false;
|
170
174
|
(0, _array.arrayEach)(this.clones, clone => {
|
171
175
|
(0, _element.removeClass)(clone, 'hide-tween');
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import "core-js/modules/es.error.cause.js";
|
2
1
|
import "core-js/modules/es.array.push.js";
|
2
|
+
import "core-js/modules/es.error.cause.js";
|
3
3
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
4
4
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
7
7
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
-
function
|
8
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
9
9
|
import { addClass, removeClass } from "../../helpers/dom/element.mjs";
|
10
10
|
import { arrayEach } from "../../helpers/array.mjs";
|
11
11
|
import { BasePlugin } from "../base/index.mjs";
|
@@ -18,14 +18,24 @@ export const PLUGIN_PRIORITY = 200;
|
|
18
18
|
* @plugin TouchScroll
|
19
19
|
* @class TouchScroll
|
20
20
|
*/
|
21
|
-
var
|
21
|
+
var _onAfterViewRender = /*#__PURE__*/new WeakSet();
|
22
|
+
var _onBeforeTouchScroll = /*#__PURE__*/new WeakSet();
|
23
|
+
var _onAfterMomentumScroll = /*#__PURE__*/new WeakSet();
|
22
24
|
export class TouchScroll extends BasePlugin {
|
23
25
|
constructor() {
|
24
26
|
super(...arguments);
|
27
|
+
/**
|
28
|
+
* After momentum scroll listener.
|
29
|
+
*/
|
30
|
+
_classPrivateMethodInitSpec(this, _onAfterMomentumScroll);
|
31
|
+
/**
|
32
|
+
* Touch scroll listener.
|
33
|
+
*/
|
34
|
+
_classPrivateMethodInitSpec(this, _onBeforeTouchScroll);
|
25
35
|
/**
|
26
36
|
* After view render listener.
|
27
37
|
*/
|
28
|
-
_classPrivateMethodInitSpec(this,
|
38
|
+
_classPrivateMethodInitSpec(this, _onAfterViewRender);
|
29
39
|
/**
|
30
40
|
* Collection of scrollbars to update.
|
31
41
|
*
|
@@ -78,7 +88,7 @@ export class TouchScroll extends BasePlugin {
|
|
78
88
|
if (this.enabled) {
|
79
89
|
return;
|
80
90
|
}
|
81
|
-
this.addHook('afterViewRender', () =>
|
91
|
+
this.addHook('afterViewRender', () => _classPrivateMethodGet(this, _onAfterViewRender, _onAfterViewRender2).call(this));
|
82
92
|
this.registerEvents();
|
83
93
|
super.enablePlugin();
|
84
94
|
}
|
@@ -104,11 +114,11 @@ export class TouchScroll extends BasePlugin {
|
|
104
114
|
* @private
|
105
115
|
*/
|
106
116
|
registerEvents() {
|
107
|
-
this.addHook('beforeTouchScroll', () =>
|
108
|
-
this.addHook('afterMomentumScroll', () =>
|
117
|
+
this.addHook('beforeTouchScroll', () => _classPrivateMethodGet(this, _onBeforeTouchScroll, _onBeforeTouchScroll2).call(this));
|
118
|
+
this.addHook('afterMomentumScroll', () => _classPrivateMethodGet(this, _onAfterMomentumScroll, _onAfterMomentumScroll2).call(this));
|
109
119
|
}
|
110
120
|
}
|
111
|
-
function
|
121
|
+
function _onAfterViewRender2() {
|
112
122
|
if (this.lockedCollection) {
|
113
123
|
return;
|
114
124
|
}
|
@@ -149,19 +159,13 @@ function _onAfterViewRender() {
|
|
149
159
|
this.clones.push(bottomInlineStartCornerOverlay.clone.wtTable.holder.parentNode);
|
150
160
|
}
|
151
161
|
}
|
152
|
-
|
153
|
-
* Touch scroll listener.
|
154
|
-
*/
|
155
|
-
function _onBeforeTouchScroll() {
|
162
|
+
function _onBeforeTouchScroll2() {
|
156
163
|
this.freezeOverlays = true;
|
157
164
|
arrayEach(this.clones, clone => {
|
158
165
|
addClass(clone, 'hide-tween');
|
159
166
|
});
|
160
167
|
}
|
161
|
-
|
162
|
-
* After momentum scroll listener.
|
163
|
-
*/
|
164
|
-
function _onAfterMomentumScroll() {
|
168
|
+
function _onAfterMomentumScroll2() {
|
165
169
|
this.freezeOverlays = false;
|
166
170
|
arrayEach(this.clones, clone => {
|
167
171
|
removeClass(clone, 'hide-tween');
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
-
require("core-js/modules/es.error.cause.js");
|
5
4
|
require("core-js/modules/es.array.push.js");
|
5
|
+
require("core-js/modules/es.error.cause.js");
|
6
6
|
var _base = require("../base");
|
7
7
|
var _translations = require("../../translations");
|
8
8
|
var _array = require("../../helpers/array");
|
@@ -11,7 +11,7 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
|
|
11
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
12
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
13
13
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
14
|
-
function
|
14
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
15
15
|
const PLUGIN_KEY = exports.PLUGIN_KEY = 'trimRows';
|
16
16
|
const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 330;
|
17
17
|
|
@@ -102,14 +102,14 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 330;
|
|
102
102
|
* ```
|
103
103
|
* :::
|
104
104
|
*/
|
105
|
-
var
|
105
|
+
var _onMapInit = /*#__PURE__*/new WeakSet();
|
106
106
|
class TrimRows extends _base.BasePlugin {
|
107
107
|
constructor() {
|
108
108
|
super(...arguments);
|
109
109
|
/**
|
110
110
|
* On map initialized hook callback.
|
111
111
|
*/
|
112
|
-
_classPrivateMethodInitSpec(this,
|
112
|
+
_classPrivateMethodInitSpec(this, _onMapInit);
|
113
113
|
/**
|
114
114
|
* Map of skipped rows by the plugin.
|
115
115
|
*
|
@@ -142,7 +142,7 @@ class TrimRows extends _base.BasePlugin {
|
|
142
142
|
return;
|
143
143
|
}
|
144
144
|
this.trimmedRowsMap = this.hot.rowIndexMapper.registerMap('trimRows', new _translations.TrimmingMap());
|
145
|
-
this.trimmedRowsMap.addLocalHook('init', () =>
|
145
|
+
this.trimmedRowsMap.addLocalHook('init', () => _classPrivateMethodGet(this, _onMapInit, _onMapInit2).call(this));
|
146
146
|
super.enablePlugin();
|
147
147
|
}
|
148
148
|
|
@@ -306,7 +306,7 @@ class TrimRows extends _base.BasePlugin {
|
|
306
306
|
}
|
307
307
|
}
|
308
308
|
exports.TrimRows = TrimRows;
|
309
|
-
function
|
309
|
+
function _onMapInit2() {
|
310
310
|
const trimmedRows = this.hot.getSettings()[PLUGIN_KEY];
|
311
311
|
if (Array.isArray(trimmedRows)) {
|
312
312
|
this.hot.batchExecution(() => {
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import "core-js/modules/es.error.cause.js";
|
2
1
|
import "core-js/modules/es.array.push.js";
|
2
|
+
import "core-js/modules/es.error.cause.js";
|
3
3
|
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
4
4
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
7
7
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
-
function
|
8
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
9
9
|
import { BasePlugin } from "../base/index.mjs";
|
10
10
|
import { TrimmingMap } from "../../translations/index.mjs";
|
11
11
|
import { arrayEach, arrayReduce } from "../../helpers/array.mjs";
|
@@ -99,14 +99,14 @@ export const PLUGIN_PRIORITY = 330;
|
|
99
99
|
* ```
|
100
100
|
* :::
|
101
101
|
*/
|
102
|
-
var
|
102
|
+
var _onMapInit = /*#__PURE__*/new WeakSet();
|
103
103
|
export class TrimRows extends BasePlugin {
|
104
104
|
constructor() {
|
105
105
|
super(...arguments);
|
106
106
|
/**
|
107
107
|
* On map initialized hook callback.
|
108
108
|
*/
|
109
|
-
_classPrivateMethodInitSpec(this,
|
109
|
+
_classPrivateMethodInitSpec(this, _onMapInit);
|
110
110
|
/**
|
111
111
|
* Map of skipped rows by the plugin.
|
112
112
|
*
|
@@ -139,7 +139,7 @@ export class TrimRows extends BasePlugin {
|
|
139
139
|
return;
|
140
140
|
}
|
141
141
|
this.trimmedRowsMap = this.hot.rowIndexMapper.registerMap('trimRows', new TrimmingMap());
|
142
|
-
this.trimmedRowsMap.addLocalHook('init', () =>
|
142
|
+
this.trimmedRowsMap.addLocalHook('init', () => _classPrivateMethodGet(this, _onMapInit, _onMapInit2).call(this));
|
143
143
|
super.enablePlugin();
|
144
144
|
}
|
145
145
|
|
@@ -302,7 +302,7 @@ export class TrimRows extends BasePlugin {
|
|
302
302
|
super.destroy();
|
303
303
|
}
|
304
304
|
}
|
305
|
-
function
|
305
|
+
function _onMapInit2() {
|
306
306
|
const trimmedRows = this.hot.getSettings()[PLUGIN_KEY];
|
307
307
|
if (Array.isArray(trimmedRows)) {
|
308
308
|
this.hot.batchExecution(() => {
|
@@ -139,9 +139,7 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
|
|
139
139
|
const shortcutManager = hotInstance.getShortcutManager();
|
140
140
|
const gridContext = shortcutManager.getContext('grid');
|
141
141
|
const config = {
|
142
|
-
group: SHORTCUTS_GROUP
|
143
|
-
relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
|
144
|
-
position: 'before'
|
142
|
+
group: SHORTCUTS_GROUP
|
145
143
|
};
|
146
144
|
gridContext.addShortcuts([{
|
147
145
|
keys: [['space']],
|
@@ -155,16 +153,15 @@ function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellProperties
|
|
155
153
|
changeSelectedCheckboxesState();
|
156
154
|
return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
|
157
155
|
},
|
158
|
-
runOnlyIf: () =>
|
159
|
-
var _hotInstance$getSelec;
|
160
|
-
return hotInstance.getSettings().enterBeginsEditing && ((_hotInstance$getSelec = hotInstance.getSelectedRangeLast()) === null || _hotInstance$getSelec === void 0 ? void 0 : _hotInstance$getSelec.isSingle());
|
161
|
-
}
|
156
|
+
runOnlyIf: () => hotInstance.getSettings().enterBeginsEditing
|
162
157
|
}, {
|
163
158
|
keys: [['delete'], ['backspace']],
|
164
159
|
callback: () => {
|
165
160
|
changeSelectedCheckboxesState(true);
|
166
161
|
return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
|
167
|
-
}
|
162
|
+
},
|
163
|
+
relativeToGroup: _shortcutContexts.EDITOR_EDIT_GROUP,
|
164
|
+
position: 'before'
|
168
165
|
}], config);
|
169
166
|
}
|
170
167
|
|
@@ -134,9 +134,7 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
|
|
134
134
|
const shortcutManager = hotInstance.getShortcutManager();
|
135
135
|
const gridContext = shortcutManager.getContext('grid');
|
136
136
|
const config = {
|
137
|
-
group: SHORTCUTS_GROUP
|
138
|
-
relativeToGroup: SHORTCUTS_GROUP_EDITOR,
|
139
|
-
position: 'before'
|
137
|
+
group: SHORTCUTS_GROUP
|
140
138
|
};
|
141
139
|
gridContext.addShortcuts([{
|
142
140
|
keys: [['space']],
|
@@ -150,16 +148,15 @@ export function checkboxRenderer(hotInstance, TD, row, col, prop, value, cellPro
|
|
150
148
|
changeSelectedCheckboxesState();
|
151
149
|
return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
|
152
150
|
},
|
153
|
-
runOnlyIf: () =>
|
154
|
-
var _hotInstance$getSelec;
|
155
|
-
return hotInstance.getSettings().enterBeginsEditing && ((_hotInstance$getSelec = hotInstance.getSelectedRangeLast()) === null || _hotInstance$getSelec === void 0 ? void 0 : _hotInstance$getSelec.isSingle());
|
156
|
-
}
|
151
|
+
runOnlyIf: () => hotInstance.getSettings().enterBeginsEditing
|
157
152
|
}, {
|
158
153
|
keys: [['delete'], ['backspace']],
|
159
154
|
callback: () => {
|
160
155
|
changeSelectedCheckboxesState(true);
|
161
156
|
return !areSelectedCheckboxCells(); // False blocks next action associated with the keyboard shortcut.
|
162
|
-
}
|
157
|
+
},
|
158
|
+
relativeToGroup: SHORTCUTS_GROUP_EDITOR,
|
159
|
+
position: 'before'
|
163
160
|
}], config);
|
164
161
|
}
|
165
162
|
|