handsontable 0.0.0-next-d1c8e0e-20230621 → 0.0.0-next-dcd0acc-20230621
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/{selection/border/border.js → border.js} +12 -7
- package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
- package/3rdparty/walkontable/src/cell/coords.d.ts +1 -6
- package/3rdparty/walkontable/src/cell/coords.js +12 -61
- package/3rdparty/walkontable/src/cell/coords.mjs +12 -61
- package/3rdparty/walkontable/src/cell/range.d.ts +2 -9
- package/3rdparty/walkontable/src/cell/range.js +7 -44
- package/3rdparty/walkontable/src/cell/range.mjs +7 -44
- package/3rdparty/walkontable/src/core/_base.js +3 -9
- package/3rdparty/walkontable/src/core/_base.mjs +3 -9
- package/3rdparty/walkontable/src/core/clone.js +2 -2
- package/3rdparty/walkontable/src/core/clone.mjs +2 -2
- package/3rdparty/walkontable/src/core/core.js +2 -3
- package/3rdparty/walkontable/src/core/core.mjs +2 -3
- package/3rdparty/walkontable/src/event.js +7 -7
- package/3rdparty/walkontable/src/event.mjs +7 -7
- package/3rdparty/walkontable/src/facade/core.js +2 -2
- package/3rdparty/walkontable/src/facade/core.mjs +2 -2
- package/3rdparty/walkontable/src/index.js +2 -10
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +1 -1
- package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
- package/3rdparty/walkontable/src/overlay/top.js +4 -2
- package/3rdparty/walkontable/src/overlay/top.mjs +4 -2
- package/3rdparty/walkontable/src/selection.js +355 -0
- package/3rdparty/walkontable/src/selection.mjs +349 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
- package/3rdparty/walkontable/src/table.js +79 -7
- package/3rdparty/walkontable/src/table.mjs +80 -8
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.d.ts +3 -5
- package/core.js +309 -127
- package/core.mjs +309 -127
- package/dataMap/metaManager/metaSchema.js +0 -19
- package/dataMap/metaManager/metaSchema.mjs +0 -19
- package/dist/handsontable.css +3 -8
- package/dist/handsontable.full.css +3 -8
- package/dist/handsontable.full.js +10651 -13658
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +112 -112
- package/dist/handsontable.js +13425 -16432
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +4 -4
- package/editorManager.js +94 -21
- package/editorManager.mjs +98 -26
- package/editors/textEditor/textEditor.js +11 -3
- package/editors/textEditor/textEditor.mjs +12 -4
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/number.d.ts +0 -1
- package/helpers/number.js +0 -18
- package/helpers/number.mjs +0 -17
- package/package.json +1 -1
- package/pluginHooks.d.ts +1 -5
- package/pluginHooks.js +1 -89
- package/pluginHooks.mjs +1 -89
- package/plugins/collapsibleColumns/collapsibleColumns.js +24 -81
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +24 -81
- package/plugins/columnSorting/columnSorting.js +8 -50
- package/plugins/columnSorting/columnSorting.mjs +9 -49
- package/plugins/columnSorting/index.js +2 -4
- package/plugins/columnSorting/index.mjs +1 -1
- package/plugins/comments/comments.js +4 -11
- package/plugins/comments/comments.mjs +4 -11
- package/plugins/contextMenu/contextMenu.d.ts +1 -1
- package/plugins/contextMenu/contextMenu.js +29 -80
- package/plugins/contextMenu/contextMenu.mjs +30 -81
- package/plugins/contextMenu/predefinedItems/alignment.js +0 -7
- package/plugins/contextMenu/predefinedItems/alignment.mjs +0 -7
- package/plugins/contextMenu/predefinedItems/clearColumn.js +3 -5
- package/plugins/contextMenu/predefinedItems/clearColumn.mjs +3 -5
- package/plugins/contextMenu/predefinedItems/columnLeft.js +3 -5
- package/plugins/contextMenu/predefinedItems/columnLeft.mjs +3 -5
- package/plugins/contextMenu/predefinedItems/columnRight.js +3 -5
- package/plugins/contextMenu/predefinedItems/columnRight.mjs +3 -5
- package/plugins/contextMenu/predefinedItems/readOnly.js +0 -7
- package/plugins/contextMenu/predefinedItems/readOnly.mjs +0 -7
- package/plugins/contextMenu/predefinedItems/removeColumn.js +5 -7
- package/plugins/contextMenu/predefinedItems/removeColumn.mjs +3 -5
- package/plugins/contextMenu/predefinedItems/removeRow.js +5 -7
- package/plugins/contextMenu/predefinedItems/removeRow.mjs +3 -5
- package/plugins/contextMenu/predefinedItems/rowAbove.js +3 -5
- package/plugins/contextMenu/predefinedItems/rowAbove.mjs +3 -5
- package/plugins/contextMenu/predefinedItems/rowBelow.js +3 -5
- package/plugins/contextMenu/predefinedItems/rowBelow.mjs +3 -5
- package/plugins/contextMenu/utils.js +16 -25
- package/plugins/contextMenu/utils.mjs +15 -24
- package/plugins/copyPaste/contextMenuItem/copy.js +0 -7
- package/plugins/copyPaste/contextMenuItem/copy.mjs +0 -7
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +1 -9
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +1 -9
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +1 -9
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +1 -9
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +1 -9
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +1 -9
- package/plugins/copyPaste/contextMenuItem/cut.js +0 -7
- package/plugins/copyPaste/contextMenuItem/cut.mjs +0 -7
- package/plugins/copyPaste/copyPaste.js +1 -5
- package/plugins/copyPaste/copyPaste.mjs +1 -5
- package/plugins/customBorders/customBorders.js +53 -25
- package/plugins/customBorders/customBorders.mjs +54 -26
- package/plugins/dropdownMenu/dropdownMenu.d.ts +1 -1
- package/plugins/dropdownMenu/dropdownMenu.js +30 -94
- package/plugins/dropdownMenu/dropdownMenu.mjs +30 -94
- package/plugins/filters/filters.js +42 -62
- package/plugins/filters/filters.mjs +41 -61
- package/plugins/mergeCells/mergeCells.js +18 -5
- package/plugins/mergeCells/mergeCells.mjs +18 -5
- package/plugins/multiColumnSorting/multiColumnSorting.js +3 -42
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +3 -42
- package/plugins/nestedHeaders/nestedHeaders.js +10 -132
- package/plugins/nestedHeaders/nestedHeaders.mjs +10 -132
- package/plugins/nestedHeaders/stateManager/index.js +0 -37
- package/plugins/nestedHeaders/stateManager/index.mjs +0 -37
- package/plugins/nestedRows/nestedRows.js +7 -52
- package/plugins/nestedRows/nestedRows.mjs +7 -52
- package/renderers/checkboxRenderer/checkboxRenderer.js +2 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +1 -1
- package/selection/highlight/constants.js +16 -0
- package/selection/highlight/constants.mjs +6 -0
- package/selection/highlight/highlight.js +89 -312
- package/selection/highlight/highlight.mjs +85 -302
- package/selection/highlight/types/activeHeader.js +9 -10
- package/selection/highlight/types/activeHeader.mjs +8 -10
- package/selection/highlight/types/area.js +27 -12
- package/selection/highlight/types/area.mjs +30 -16
- package/selection/highlight/types/{focus.js → cell.js} +8 -5
- package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
- package/selection/highlight/types/customSelection.js +10 -7
- package/selection/highlight/types/customSelection.mjs +9 -7
- package/selection/highlight/types/fill.js +8 -5
- package/selection/highlight/types/fill.mjs +7 -5
- package/selection/highlight/types/header.js +20 -10
- package/selection/highlight/types/header.mjs +19 -10
- package/selection/highlight/types/{row.js → index.js} +31 -27
- package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
- package/selection/highlight/visualSelection.js +27 -31
- package/selection/highlight/visualSelection.mjs +27 -31
- package/selection/index.js +7 -4
- package/selection/index.mjs +3 -2
- package/selection/mouseEventHandler.js +1 -1
- package/selection/mouseEventHandler.mjs +1 -1
- package/selection/range.js +8 -8
- package/selection/range.mjs +8 -8
- package/selection/selection.js +181 -315
- package/selection/selection.mjs +180 -310
- package/selection/transformation.js +96 -233
- package/selection/transformation.mjs +93 -230
- package/selection/utils.js +36 -12
- package/selection/utils.mjs +36 -13
- package/settings.d.ts +0 -1
- package/shortcuts/manager.js +0 -2
- package/shortcuts/manager.mjs +0 -2
- package/shortcuts/recorder.js +2 -2
- package/shortcuts/recorder.mjs +2 -2
- package/shortcuts/utils.js +5 -21
- package/shortcuts/utils.mjs +4 -20
- package/tableView.js +9 -58
- package/tableView.mjs +9 -58
- package/translations/indexMapper.js +9 -8
- package/translations/indexMapper.mjs +9 -8
- package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
- package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
- package/3rdparty/walkontable/src/selection/constants.js +0 -63
- package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
- package/3rdparty/walkontable/src/selection/index.js +0 -30
- package/3rdparty/walkontable/src/selection/index.mjs +0 -5
- package/3rdparty/walkontable/src/selection/manager.js +0 -329
- package/3rdparty/walkontable/src/selection/manager.mjs +0 -323
- package/3rdparty/walkontable/src/selection/scanner.js +0 -364
- package/3rdparty/walkontable/src/selection/scanner.mjs +0 -360
- package/3rdparty/walkontable/src/selection/selection.js +0 -133
- package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
- package/selection/highlight/types/areaLayered.js +0 -54
- package/selection/highlight/types/areaLayered.mjs +0 -49
- package/selection/highlight/types/column.js +0 -50
- package/selection/highlight/types/column.mjs +0 -45
- package/shortcutContexts/commands/editor/closeAndSave.js +0 -15
- package/shortcutContexts/commands/editor/closeAndSave.mjs +0 -10
- package/shortcutContexts/commands/editor/closeWithoutSaving.js +0 -13
- package/shortcutContexts/commands/editor/closeWithoutSaving.mjs +0 -8
- package/shortcutContexts/commands/editor/fastOpen.js +0 -16
- package/shortcutContexts/commands/editor/fastOpen.mjs +0 -11
- package/shortcutContexts/commands/editor/index.js +0 -16
- package/shortcutContexts/commands/editor/index.mjs +0 -12
- package/shortcutContexts/commands/editor/open.js +0 -29
- package/shortcutContexts/commands/editor/open.mjs +0 -24
- package/shortcutContexts/commands/emptySelectedCells.js +0 -12
- package/shortcutContexts/commands/emptySelectedCells.mjs +0 -7
- package/shortcutContexts/commands/extendCellsSelection/down.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +0 -21
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +0 -16
- package/shortcutContexts/commands/extendCellsSelection/index.js +0 -26
- package/shortcutContexts/commands/extendCellsSelection/index.mjs +0 -22
- package/shortcutContexts/commands/extendCellsSelection/left.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/right.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/toColumns.js +0 -19
- package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +0 -14
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +0 -22
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +0 -12
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +0 -12
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +0 -40
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +0 -35
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +0 -40
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +0 -35
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +0 -22
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +0 -17
- package/shortcutContexts/commands/extendCellsSelection/toRows.js +0 -19
- package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +0 -14
- package/shortcutContexts/commands/extendCellsSelection/up.js +0 -15
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +0 -10
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +0 -21
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +0 -16
- package/shortcutContexts/commands/index.js +0 -52
- package/shortcutContexts/commands/index.mjs +0 -48
- package/shortcutContexts/commands/moveCellSelection/down.js +0 -12
- package/shortcutContexts/commands/moveCellSelection/down.mjs +0 -7
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +0 -29
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +0 -24
- package/shortcutContexts/commands/moveCellSelection/index.js +0 -28
- package/shortcutContexts/commands/moveCellSelection/index.mjs +0 -24
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/left.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/left.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/right.js +0 -11
- package/shortcutContexts/commands/moveCellSelection/right.mjs +0 -6
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.js +0 -17
- package/shortcutContexts/commands/moveCellSelection/toMostBottomInlineEnd.mjs +0 -12
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +0 -13
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +0 -8
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +0 -36
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +0 -31
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +0 -36
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +0 -31
- package/shortcutContexts/commands/moveCellSelection/toMostTop.js +0 -16
- package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +0 -11
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.js +0 -18
- package/shortcutContexts/commands/moveCellSelection/toMostTopInlineStart.mjs +0 -13
- package/shortcutContexts/commands/moveCellSelection/up.js +0 -12
- package/shortcutContexts/commands/moveCellSelection/up.mjs +0 -7
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +0 -29
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +0 -24
- package/shortcutContexts/commands/populateSelectedCellsData.js +0 -35
- package/shortcutContexts/commands/populateSelectedCellsData.mjs +0 -30
- package/shortcutContexts/commands/selectAll.js +0 -11
- package/shortcutContexts/commands/selectAll.mjs +0 -6
- package/shortcutContexts/constants.js +0 -19
- package/shortcutContexts/constants.mjs +0 -12
- package/shortcutContexts/editor.js +0 -29
- package/shortcutContexts/editor.mjs +0 -25
- package/shortcutContexts/grid.js +0 -247
- package/shortcutContexts/grid.mjs +0 -243
- package/shortcutContexts/index.js +0 -29
- package/shortcutContexts/index.mjs +0 -15
@@ -22,9 +22,7 @@ require("core-js/modules/es.object.set-prototype-of.js");
|
|
22
22
|
require("core-js/modules/es.object.get-prototype-of.js");
|
23
23
|
var _base = require("../base");
|
24
24
|
var _array = require("../../helpers/array");
|
25
|
-
var _object = require("../../helpers/object");
|
26
25
|
var _commandExecutor = _interopRequireDefault(require("../contextMenu/commandExecutor"));
|
27
|
-
var _utils = require("../contextMenu/utils");
|
28
26
|
var _eventManager = _interopRequireDefault(require("../../eventManager"));
|
29
27
|
var _element = require("../../helpers/dom/element");
|
30
28
|
var _itemsFactory = _interopRequireDefault(require("../contextMenu/itemsFactory"));
|
@@ -56,7 +54,6 @@ exports.PLUGIN_KEY = PLUGIN_KEY;
|
|
56
54
|
var PLUGIN_PRIORITY = 230;
|
57
55
|
exports.PLUGIN_PRIORITY = PLUGIN_PRIORITY;
|
58
56
|
var BUTTON_CLASS_NAME = 'changeType';
|
59
|
-
var SHORTCUTS_GROUP = PLUGIN_KEY;
|
60
57
|
|
61
58
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
62
59
|
/**
|
@@ -185,7 +182,6 @@ var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
|
|
185
182
|
if (typeof settings.callback === 'function') {
|
186
183
|
this.commandExecutor.setCommonCallback(settings.callback);
|
187
184
|
}
|
188
|
-
this.registerShortcuts();
|
189
185
|
_get(_getPrototypeOf(DropdownMenu.prototype), "enablePlugin", this).call(this);
|
190
186
|
this.callOnPluginsReady(function () {
|
191
187
|
_this2.hot.runHooks('afterDropdownMenuDefaultOptions', predefinedItems);
|
@@ -249,71 +245,9 @@ var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
|
|
249
245
|
if (this.menu) {
|
250
246
|
this.menu.destroy();
|
251
247
|
}
|
252
|
-
this.unregisterShortcuts();
|
253
248
|
_get(_getPrototypeOf(DropdownMenu.prototype), "disablePlugin", this).call(this);
|
254
249
|
}
|
255
250
|
|
256
|
-
/**
|
257
|
-
* Register shortcuts responsible for toggling dropdown menu.
|
258
|
-
*
|
259
|
-
* @private
|
260
|
-
*/
|
261
|
-
}, {
|
262
|
-
key: "registerShortcuts",
|
263
|
-
value: function registerShortcuts() {
|
264
|
-
var _this3 = this;
|
265
|
-
var context = this.hot.getShortcutManager().getContext('grid');
|
266
|
-
var callback = function callback() {
|
267
|
-
var _this3$hot$getSelecte = _this3.hot.getSelectedRangeLast(),
|
268
|
-
highlight = _this3$hot$getSelecte.highlight;
|
269
|
-
if ((highlight.isHeader() && highlight.row === -1 || highlight.isCell()) && highlight.col >= 0) {
|
270
|
-
_this3.hot.selectColumns(highlight.col, highlight.col, -1);
|
271
|
-
var _this3$hot$getSelecte2 = _this3.hot.getSelectedRangeLast(),
|
272
|
-
from = _this3$hot$getSelecte2.from;
|
273
|
-
var offset = (0, _utils.getDocumentOffsetByElement)(_this3.menu.container, _this3.hot.rootDocument);
|
274
|
-
var target = _this3.hot.getCell(-1, from.col, true);
|
275
|
-
var rect = target.getBoundingClientRect();
|
276
|
-
_this3.open({
|
277
|
-
left: rect.left + offset.left,
|
278
|
-
top: rect.top + target.offsetHeight + offset.top
|
279
|
-
}, {
|
280
|
-
left: rect.width
|
281
|
-
});
|
282
|
-
_this3.hot._registerTimeout(function () {
|
283
|
-
_this3.menu.selectFirstCell();
|
284
|
-
});
|
285
|
-
}
|
286
|
-
};
|
287
|
-
context.addShortcuts([{
|
288
|
-
keys: [['Shift', 'Alt', 'ArrowDown'], ['Shift', 'Enter']],
|
289
|
-
callback: callback,
|
290
|
-
runOnlyIf: function runOnlyIf() {
|
291
|
-
var _this3$hot$getSelecte3;
|
292
|
-
return ((_this3$hot$getSelecte3 = _this3.hot.getSelectedRangeLast()) === null || _this3$hot$getSelecte3 === void 0 ? void 0 : _this3$hot$getSelecte3.highlight.isHeader()) && !_this3.menu.isOpened();
|
293
|
-
},
|
294
|
-
group: SHORTCUTS_GROUP
|
295
|
-
}, {
|
296
|
-
keys: [['Shift', 'Alt', 'ArrowDown']],
|
297
|
-
callback: callback,
|
298
|
-
runOnlyIf: function runOnlyIf() {
|
299
|
-
var _this3$hot$getSelecte4;
|
300
|
-
return ((_this3$hot$getSelecte4 = _this3.hot.getSelectedRangeLast()) === null || _this3$hot$getSelecte4 === void 0 ? void 0 : _this3$hot$getSelecte4.highlight.isCell()) && !_this3.menu.isOpened();
|
301
|
-
},
|
302
|
-
group: SHORTCUTS_GROUP
|
303
|
-
}]);
|
304
|
-
}
|
305
|
-
|
306
|
-
/**
|
307
|
-
* Unregister shortcuts responsible for toggling dropdown menu.
|
308
|
-
*
|
309
|
-
* @private
|
310
|
-
*/
|
311
|
-
}, {
|
312
|
-
key: "unregisterShortcuts",
|
313
|
-
value: function unregisterShortcuts() {
|
314
|
-
this.hot.getShortcutManager().getContext('grid').removeShortcutsByGroup(SHORTCUTS_GROUP);
|
315
|
-
}
|
316
|
-
|
317
251
|
/**
|
318
252
|
* Registers the DOM listeners.
|
319
253
|
*
|
@@ -322,42 +256,33 @@ var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
|
|
322
256
|
}, {
|
323
257
|
key: "registerEvents",
|
324
258
|
value: function registerEvents() {
|
325
|
-
var
|
259
|
+
var _this3 = this;
|
326
260
|
this.eventManager.addEventListener(this.hot.rootElement, 'click', function (event) {
|
327
|
-
return
|
261
|
+
return _this3.onTableClick(event);
|
328
262
|
});
|
329
263
|
}
|
330
264
|
|
331
265
|
/**
|
332
266
|
* Opens menu and re-position it based on the passed coordinates.
|
333
267
|
*
|
334
|
-
* @param {
|
335
|
-
*
|
336
|
-
*
|
337
|
-
*
|
338
|
-
*
|
339
|
-
* the offset to the menu position.
|
268
|
+
* @param {object|Event} position An object with `pageX` and `pageY` properties which contains values relative to
|
269
|
+
* the top left of the fully rendered content area in the browser or with `clientX`
|
270
|
+
* and `clientY` properties which contains values relative to the upper left edge
|
271
|
+
* of the content area (the viewport) of the browser window. This object is structurally
|
272
|
+
* compatible with native mouse event so it can be used either.
|
340
273
|
* @fires Hooks#beforeDropdownMenuShow
|
341
274
|
* @fires Hooks#afterDropdownMenuShow
|
342
275
|
*/
|
343
276
|
}, {
|
344
277
|
key: "open",
|
345
278
|
value: function open(position) {
|
346
|
-
|
347
|
-
_this5 = this;
|
348
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
349
|
-
above: 0,
|
350
|
-
below: 0,
|
351
|
-
left: 0,
|
352
|
-
right: 0
|
353
|
-
};
|
354
|
-
if ((_this$menu = this.menu) !== null && _this$menu !== void 0 && _this$menu.isOpened()) {
|
279
|
+
if (!this.menu) {
|
355
280
|
return;
|
356
281
|
}
|
357
282
|
this.menu.open();
|
358
|
-
(
|
359
|
-
|
360
|
-
}
|
283
|
+
if (position.width) {
|
284
|
+
this.menu.setOffset('left', position.width);
|
285
|
+
}
|
361
286
|
this.menu.setPosition(position);
|
362
287
|
}
|
363
288
|
|
@@ -367,8 +292,10 @@ var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
|
|
367
292
|
}, {
|
368
293
|
key: "close",
|
369
294
|
value: function close() {
|
370
|
-
|
371
|
-
|
295
|
+
if (!this.menu) {
|
296
|
+
return;
|
297
|
+
}
|
298
|
+
this.menu.close();
|
372
299
|
}
|
373
300
|
|
374
301
|
/**
|
@@ -440,14 +367,23 @@ var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
|
|
440
367
|
key: "onTableClick",
|
441
368
|
value: function onTableClick(event) {
|
442
369
|
event.stopPropagation();
|
443
|
-
if ((0, _element.hasClass)(event.target, BUTTON_CLASS_NAME)) {
|
444
|
-
var
|
370
|
+
if ((0, _element.hasClass)(event.target, BUTTON_CLASS_NAME) && !this.menu.isOpened()) {
|
371
|
+
var offsetTop = 0;
|
372
|
+
var offsetLeft = 0;
|
373
|
+
if (this.hot.rootDocument !== this.menu.container.ownerDocument) {
|
374
|
+
var frameElement = this.hot.rootWindow.frameElement;
|
375
|
+
var _frameElement$getBoun = frameElement.getBoundingClientRect(),
|
376
|
+
top = _frameElement$getBoun.top,
|
377
|
+
left = _frameElement$getBoun.left;
|
378
|
+
offsetTop = top;
|
379
|
+
offsetLeft = left;
|
380
|
+
}
|
445
381
|
var rect = event.target.getBoundingClientRect();
|
446
382
|
this.open({
|
447
|
-
left: rect.left +
|
448
|
-
top: rect.top + event.target.offsetHeight + 3 +
|
449
|
-
|
450
|
-
|
383
|
+
left: rect.left + offsetLeft,
|
384
|
+
top: rect.top + event.target.offsetHeight + 3 + offsetTop,
|
385
|
+
width: rect.width,
|
386
|
+
height: rect.height
|
451
387
|
});
|
452
388
|
}
|
453
389
|
}
|
@@ -32,9 +32,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
32
32
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
33
33
|
import { BasePlugin } from "../base/index.mjs";
|
34
34
|
import { arrayEach } from "../../helpers/array.mjs";
|
35
|
-
import { objectEach } from "../../helpers/object.mjs";
|
36
35
|
import CommandExecutor from "../contextMenu/commandExecutor.mjs";
|
37
|
-
import { getDocumentOffsetByElement } from "../contextMenu/utils.mjs";
|
38
36
|
import EventManager from "../../eventManager.mjs";
|
39
37
|
import { hasClass } from "../../helpers/dom/element.mjs";
|
40
38
|
import ItemsFactory from "../contextMenu/itemsFactory.mjs";
|
@@ -49,7 +47,6 @@ Hooks.getSingleton().register('afterDropdownMenuExecute');
|
|
49
47
|
export var PLUGIN_KEY = 'dropdownMenu';
|
50
48
|
export var PLUGIN_PRIORITY = 230;
|
51
49
|
var BUTTON_CLASS_NAME = 'changeType';
|
52
|
-
var SHORTCUTS_GROUP = PLUGIN_KEY;
|
53
50
|
|
54
51
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
55
52
|
/**
|
@@ -179,7 +176,6 @@ export var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
|
|
179
176
|
if (typeof settings.callback === 'function') {
|
180
177
|
this.commandExecutor.setCommonCallback(settings.callback);
|
181
178
|
}
|
182
|
-
this.registerShortcuts();
|
183
179
|
_get(_getPrototypeOf(DropdownMenu.prototype), "enablePlugin", this).call(this);
|
184
180
|
this.callOnPluginsReady(function () {
|
185
181
|
_this2.hot.runHooks('afterDropdownMenuDefaultOptions', predefinedItems);
|
@@ -243,71 +239,9 @@ export var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
|
|
243
239
|
if (this.menu) {
|
244
240
|
this.menu.destroy();
|
245
241
|
}
|
246
|
-
this.unregisterShortcuts();
|
247
242
|
_get(_getPrototypeOf(DropdownMenu.prototype), "disablePlugin", this).call(this);
|
248
243
|
}
|
249
244
|
|
250
|
-
/**
|
251
|
-
* Register shortcuts responsible for toggling dropdown menu.
|
252
|
-
*
|
253
|
-
* @private
|
254
|
-
*/
|
255
|
-
}, {
|
256
|
-
key: "registerShortcuts",
|
257
|
-
value: function registerShortcuts() {
|
258
|
-
var _this3 = this;
|
259
|
-
var context = this.hot.getShortcutManager().getContext('grid');
|
260
|
-
var callback = function callback() {
|
261
|
-
var _this3$hot$getSelecte = _this3.hot.getSelectedRangeLast(),
|
262
|
-
highlight = _this3$hot$getSelecte.highlight;
|
263
|
-
if ((highlight.isHeader() && highlight.row === -1 || highlight.isCell()) && highlight.col >= 0) {
|
264
|
-
_this3.hot.selectColumns(highlight.col, highlight.col, -1);
|
265
|
-
var _this3$hot$getSelecte2 = _this3.hot.getSelectedRangeLast(),
|
266
|
-
from = _this3$hot$getSelecte2.from;
|
267
|
-
var offset = getDocumentOffsetByElement(_this3.menu.container, _this3.hot.rootDocument);
|
268
|
-
var target = _this3.hot.getCell(-1, from.col, true);
|
269
|
-
var rect = target.getBoundingClientRect();
|
270
|
-
_this3.open({
|
271
|
-
left: rect.left + offset.left,
|
272
|
-
top: rect.top + target.offsetHeight + offset.top
|
273
|
-
}, {
|
274
|
-
left: rect.width
|
275
|
-
});
|
276
|
-
_this3.hot._registerTimeout(function () {
|
277
|
-
_this3.menu.selectFirstCell();
|
278
|
-
});
|
279
|
-
}
|
280
|
-
};
|
281
|
-
context.addShortcuts([{
|
282
|
-
keys: [['Shift', 'Alt', 'ArrowDown'], ['Shift', 'Enter']],
|
283
|
-
callback: callback,
|
284
|
-
runOnlyIf: function runOnlyIf() {
|
285
|
-
var _this3$hot$getSelecte3;
|
286
|
-
return ((_this3$hot$getSelecte3 = _this3.hot.getSelectedRangeLast()) === null || _this3$hot$getSelecte3 === void 0 ? void 0 : _this3$hot$getSelecte3.highlight.isHeader()) && !_this3.menu.isOpened();
|
287
|
-
},
|
288
|
-
group: SHORTCUTS_GROUP
|
289
|
-
}, {
|
290
|
-
keys: [['Shift', 'Alt', 'ArrowDown']],
|
291
|
-
callback: callback,
|
292
|
-
runOnlyIf: function runOnlyIf() {
|
293
|
-
var _this3$hot$getSelecte4;
|
294
|
-
return ((_this3$hot$getSelecte4 = _this3.hot.getSelectedRangeLast()) === null || _this3$hot$getSelecte4 === void 0 ? void 0 : _this3$hot$getSelecte4.highlight.isCell()) && !_this3.menu.isOpened();
|
295
|
-
},
|
296
|
-
group: SHORTCUTS_GROUP
|
297
|
-
}]);
|
298
|
-
}
|
299
|
-
|
300
|
-
/**
|
301
|
-
* Unregister shortcuts responsible for toggling dropdown menu.
|
302
|
-
*
|
303
|
-
* @private
|
304
|
-
*/
|
305
|
-
}, {
|
306
|
-
key: "unregisterShortcuts",
|
307
|
-
value: function unregisterShortcuts() {
|
308
|
-
this.hot.getShortcutManager().getContext('grid').removeShortcutsByGroup(SHORTCUTS_GROUP);
|
309
|
-
}
|
310
|
-
|
311
245
|
/**
|
312
246
|
* Registers the DOM listeners.
|
313
247
|
*
|
@@ -316,42 +250,33 @@ export var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
|
|
316
250
|
}, {
|
317
251
|
key: "registerEvents",
|
318
252
|
value: function registerEvents() {
|
319
|
-
var
|
253
|
+
var _this3 = this;
|
320
254
|
this.eventManager.addEventListener(this.hot.rootElement, 'click', function (event) {
|
321
|
-
return
|
255
|
+
return _this3.onTableClick(event);
|
322
256
|
});
|
323
257
|
}
|
324
258
|
|
325
259
|
/**
|
326
260
|
* Opens menu and re-position it based on the passed coordinates.
|
327
261
|
*
|
328
|
-
* @param {
|
329
|
-
*
|
330
|
-
*
|
331
|
-
*
|
332
|
-
*
|
333
|
-
* the offset to the menu position.
|
262
|
+
* @param {object|Event} position An object with `pageX` and `pageY` properties which contains values relative to
|
263
|
+
* the top left of the fully rendered content area in the browser or with `clientX`
|
264
|
+
* and `clientY` properties which contains values relative to the upper left edge
|
265
|
+
* of the content area (the viewport) of the browser window. This object is structurally
|
266
|
+
* compatible with native mouse event so it can be used either.
|
334
267
|
* @fires Hooks#beforeDropdownMenuShow
|
335
268
|
* @fires Hooks#afterDropdownMenuShow
|
336
269
|
*/
|
337
270
|
}, {
|
338
271
|
key: "open",
|
339
272
|
value: function open(position) {
|
340
|
-
|
341
|
-
_this5 = this;
|
342
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
343
|
-
above: 0,
|
344
|
-
below: 0,
|
345
|
-
left: 0,
|
346
|
-
right: 0
|
347
|
-
};
|
348
|
-
if ((_this$menu = this.menu) !== null && _this$menu !== void 0 && _this$menu.isOpened()) {
|
273
|
+
if (!this.menu) {
|
349
274
|
return;
|
350
275
|
}
|
351
276
|
this.menu.open();
|
352
|
-
|
353
|
-
|
354
|
-
}
|
277
|
+
if (position.width) {
|
278
|
+
this.menu.setOffset('left', position.width);
|
279
|
+
}
|
355
280
|
this.menu.setPosition(position);
|
356
281
|
}
|
357
282
|
|
@@ -361,8 +286,10 @@ export var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
|
|
361
286
|
}, {
|
362
287
|
key: "close",
|
363
288
|
value: function close() {
|
364
|
-
|
365
|
-
|
289
|
+
if (!this.menu) {
|
290
|
+
return;
|
291
|
+
}
|
292
|
+
this.menu.close();
|
366
293
|
}
|
367
294
|
|
368
295
|
/**
|
@@ -434,14 +361,23 @@ export var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {
|
|
434
361
|
key: "onTableClick",
|
435
362
|
value: function onTableClick(event) {
|
436
363
|
event.stopPropagation();
|
437
|
-
if (hasClass(event.target, BUTTON_CLASS_NAME)) {
|
438
|
-
var
|
364
|
+
if (hasClass(event.target, BUTTON_CLASS_NAME) && !this.menu.isOpened()) {
|
365
|
+
var offsetTop = 0;
|
366
|
+
var offsetLeft = 0;
|
367
|
+
if (this.hot.rootDocument !== this.menu.container.ownerDocument) {
|
368
|
+
var frameElement = this.hot.rootWindow.frameElement;
|
369
|
+
var _frameElement$getBoun = frameElement.getBoundingClientRect(),
|
370
|
+
top = _frameElement$getBoun.top,
|
371
|
+
left = _frameElement$getBoun.left;
|
372
|
+
offsetTop = top;
|
373
|
+
offsetLeft = left;
|
374
|
+
}
|
439
375
|
var rect = event.target.getBoundingClientRect();
|
440
376
|
this.open({
|
441
|
-
left: rect.left +
|
442
|
-
top: rect.top + event.target.offsetHeight + 3 +
|
443
|
-
|
444
|
-
|
377
|
+
left: rect.left + offsetLeft,
|
378
|
+
top: rect.top + event.target.offsetHeight + 3 + offsetTop,
|
379
|
+
width: rect.width,
|
380
|
+
height: rect.height
|
445
381
|
});
|
446
382
|
}
|
447
383
|
}
|
@@ -76,8 +76,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
76
76
|
var PLUGIN_KEY = 'filters';
|
77
77
|
exports.PLUGIN_KEY = PLUGIN_KEY;
|
78
78
|
var PLUGIN_PRIORITY = 250;
|
79
|
-
exports.PLUGIN_PRIORITY = PLUGIN_PRIORITY;
|
80
|
-
var SHORTCUTS_GROUP = PLUGIN_KEY;
|
81
79
|
|
82
80
|
/**
|
83
81
|
* @plugin Filters
|
@@ -114,6 +112,7 @@ var SHORTCUTS_GROUP = PLUGIN_KEY;
|
|
114
112
|
* ```
|
115
113
|
* :::
|
116
114
|
*/
|
115
|
+
exports.PLUGIN_PRIORITY = PLUGIN_PRIORITY;
|
117
116
|
var Filters = /*#__PURE__*/function (_BasePlugin) {
|
118
117
|
_inherits(Filters, _BasePlugin);
|
119
118
|
var _super = _createSuper(Filters);
|
@@ -293,7 +292,6 @@ var Filters = /*#__PURE__*/function (_BasePlugin) {
|
|
293
292
|
this.dropdownMenuPlugin.disablePlugin();
|
294
293
|
this.dropdownMenuPlugin.enablePlugin();
|
295
294
|
}
|
296
|
-
this.registerShortcuts();
|
297
295
|
_get(_getPrototypeOf(Filters.prototype), "enablePlugin", this).call(this);
|
298
296
|
}
|
299
297
|
|
@@ -317,41 +315,9 @@ var Filters = /*#__PURE__*/function (_BasePlugin) {
|
|
317
315
|
this.conditionCollection = null;
|
318
316
|
this.hot.rowIndexMapper.unregisterMap(this.pluginName);
|
319
317
|
}
|
320
|
-
this.unregisterShortcuts();
|
321
318
|
_get(_getPrototypeOf(Filters.prototype), "disablePlugin", this).call(this);
|
322
319
|
}
|
323
320
|
|
324
|
-
/**
|
325
|
-
* Register shortcuts responsible for clearing the filters.
|
326
|
-
*
|
327
|
-
* @private
|
328
|
-
*/
|
329
|
-
}, {
|
330
|
-
key: "registerShortcuts",
|
331
|
-
value: function registerShortcuts() {
|
332
|
-
var _this4 = this;
|
333
|
-
this.hot.getShortcutManager().getContext('grid').addShortcut({
|
334
|
-
keys: [['Alt', 'A']],
|
335
|
-
stopPropagation: true,
|
336
|
-
callback: function callback() {
|
337
|
-
_this4.clearConditions();
|
338
|
-
_this4.filter();
|
339
|
-
},
|
340
|
-
group: SHORTCUTS_GROUP
|
341
|
-
});
|
342
|
-
}
|
343
|
-
|
344
|
-
/**
|
345
|
-
* Unregister shortcuts responsible for clearing the filters.
|
346
|
-
*
|
347
|
-
* @private
|
348
|
-
*/
|
349
|
-
}, {
|
350
|
-
key: "unregisterShortcuts",
|
351
|
-
value: function unregisterShortcuts() {
|
352
|
-
this.hot.getShortcutManager().getContext('grid').removeShortcutsByGroup(SHORTCUTS_GROUP);
|
353
|
-
}
|
354
|
-
|
355
321
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
356
322
|
/**
|
357
323
|
* @memberof Filters#
|
@@ -518,7 +484,7 @@ var Filters = /*#__PURE__*/function (_BasePlugin) {
|
|
518
484
|
}, {
|
519
485
|
key: "filter",
|
520
486
|
value: function filter() {
|
521
|
-
var
|
487
|
+
var _this4 = this;
|
522
488
|
var dataFilter = this._createDataFilter();
|
523
489
|
var needToFilter = !this.conditionCollection.isEmpty();
|
524
490
|
var visibleVisualRows = [];
|
@@ -528,18 +494,18 @@ var Filters = /*#__PURE__*/function (_BasePlugin) {
|
|
528
494
|
if (needToFilter) {
|
529
495
|
var trimmedRows = [];
|
530
496
|
this.hot.batchExecution(function () {
|
531
|
-
|
497
|
+
_this4.filtersRowsMap.clear();
|
532
498
|
visibleVisualRows = (0, _array.arrayMap)(dataFilter.filter(), function (rowData) {
|
533
499
|
return rowData.meta.visualRow;
|
534
500
|
});
|
535
501
|
var visibleVisualRowsAssertion = (0, _utils.createArrayAssertion)(visibleVisualRows);
|
536
|
-
(0, _number.rangeEach)(
|
502
|
+
(0, _number.rangeEach)(_this4.hot.countSourceRows() - 1, function (row) {
|
537
503
|
if (!visibleVisualRowsAssertion(row)) {
|
538
504
|
trimmedRows.push(row);
|
539
505
|
}
|
540
506
|
});
|
541
507
|
(0, _array.arrayEach)(trimmedRows, function (physicalRow) {
|
542
|
-
|
508
|
+
_this4.filtersRowsMap.setValueAtIndex(physicalRow, true);
|
543
509
|
});
|
544
510
|
}, true);
|
545
511
|
if (!visibleVisualRows.length) {
|
@@ -552,6 +518,7 @@ var Filters = /*#__PURE__*/function (_BasePlugin) {
|
|
552
518
|
this.hot.runHooks('afterFilter', conditions);
|
553
519
|
this.hot.view.adjustElementsSize(true);
|
554
520
|
this.hot.render();
|
521
|
+
this.clearColumnSelection();
|
555
522
|
}
|
556
523
|
|
557
524
|
/**
|
@@ -575,6 +542,20 @@ var Filters = /*#__PURE__*/function (_BasePlugin) {
|
|
575
542
|
};
|
576
543
|
}
|
577
544
|
|
545
|
+
/**
|
546
|
+
* Clears column selection.
|
547
|
+
*
|
548
|
+
* @private
|
549
|
+
*/
|
550
|
+
}, {
|
551
|
+
key: "clearColumnSelection",
|
552
|
+
value: function clearColumnSelection() {
|
553
|
+
var selectedColumn = this.getSelectedColumn();
|
554
|
+
if (selectedColumn !== null) {
|
555
|
+
this.hot.selectCell(0, selectedColumn.visualIndex);
|
556
|
+
}
|
557
|
+
}
|
558
|
+
|
578
559
|
/**
|
579
560
|
* Returns handsontable source data with cell meta based on current selection.
|
580
561
|
*
|
@@ -584,21 +565,21 @@ var Filters = /*#__PURE__*/function (_BasePlugin) {
|
|
584
565
|
}, {
|
585
566
|
key: "getDataMapAtColumn",
|
586
567
|
value: function getDataMapAtColumn(column) {
|
587
|
-
var
|
568
|
+
var _this5 = this;
|
588
569
|
var visualColumn = this.hot.toVisualColumn(column);
|
589
570
|
var data = [];
|
590
571
|
(0, _array.arrayEach)(this.hot.getSourceDataAtCol(visualColumn), function (value, rowIndex) {
|
591
|
-
var
|
592
|
-
var
|
593
|
-
row =
|
594
|
-
col =
|
595
|
-
visualCol =
|
596
|
-
visualRow =
|
597
|
-
type =
|
598
|
-
instance =
|
599
|
-
dateFormat =
|
600
|
-
locale =
|
601
|
-
var dataValue = (
|
572
|
+
var _this5$hot$getDataAtC;
|
573
|
+
var _this5$hot$getCellMet = _this5.hot.getCellMeta(rowIndex, visualColumn),
|
574
|
+
row = _this5$hot$getCellMet.row,
|
575
|
+
col = _this5$hot$getCellMet.col,
|
576
|
+
visualCol = _this5$hot$getCellMet.visualCol,
|
577
|
+
visualRow = _this5$hot$getCellMet.visualRow,
|
578
|
+
type = _this5$hot$getCellMet.type,
|
579
|
+
instance = _this5$hot$getCellMet.instance,
|
580
|
+
dateFormat = _this5$hot$getCellMet.dateFormat,
|
581
|
+
locale = _this5$hot$getCellMet.locale;
|
582
|
+
var dataValue = (_this5$hot$getDataAtC = _this5.hot.getDataAtCell(_this5.hot.toVisualRow(rowIndex), visualColumn)) !== null && _this5$hot$getDataAtC !== void 0 ? _this5$hot$getDataAtC : value;
|
602
583
|
data.push({
|
603
584
|
meta: {
|
604
585
|
row: row,
|
@@ -625,14 +606,14 @@ var Filters = /*#__PURE__*/function (_BasePlugin) {
|
|
625
606
|
}, {
|
626
607
|
key: "onAfterChange",
|
627
608
|
value: function onAfterChange(changes) {
|
628
|
-
var
|
609
|
+
var _this6 = this;
|
629
610
|
if (changes) {
|
630
611
|
(0, _array.arrayEach)(changes, function (change) {
|
631
612
|
var _change = _slicedToArray(change, 2),
|
632
613
|
prop = _change[1];
|
633
|
-
var columnIndex =
|
634
|
-
if (
|
635
|
-
|
614
|
+
var columnIndex = _this6.hot.propToCol(prop);
|
615
|
+
if (_this6.conditionCollection.hasConditions(columnIndex)) {
|
616
|
+
_this6.updateValueComponentCondition(columnIndex);
|
636
617
|
}
|
637
618
|
});
|
638
619
|
}
|
@@ -703,10 +684,10 @@ var Filters = /*#__PURE__*/function (_BasePlugin) {
|
|
703
684
|
}, {
|
704
685
|
key: "onBeforeDropdownMenuSetItems",
|
705
686
|
value: function onBeforeDropdownMenuSetItems() {
|
706
|
-
var
|
687
|
+
var _this7 = this;
|
707
688
|
if (this.dropdownMenuPlugin) {
|
708
689
|
this.dropdownMenuPlugin.menu.addLocalHook('afterOpen', function () {
|
709
|
-
|
690
|
+
_this7.dropdownMenuPlugin.menu.hotMenu.updateSettings({
|
710
691
|
hiddenRows: true
|
711
692
|
});
|
712
693
|
});
|
@@ -797,7 +778,6 @@ var Filters = /*#__PURE__*/function (_BasePlugin) {
|
|
797
778
|
});
|
798
779
|
this.filtersRowsMap.clear();
|
799
780
|
this.filter();
|
800
|
-
this.hot.selectCell(0, selectedColumn.visualIndex);
|
801
781
|
}
|
802
782
|
(_this$dropdownMenuPlu3 = this.dropdownMenuPlugin) === null || _this$dropdownMenuPlu3 === void 0 ? void 0 : _this$dropdownMenuPlu3.close();
|
803
783
|
}
|
@@ -890,10 +870,10 @@ var Filters = /*#__PURE__*/function (_BasePlugin) {
|
|
890
870
|
}, {
|
891
871
|
key: "_createDataFilter",
|
892
872
|
value: function _createDataFilter() {
|
893
|
-
var
|
873
|
+
var _this8 = this;
|
894
874
|
var conditionCollection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.conditionCollection;
|
895
875
|
return new _dataFilter.default(conditionCollection, function (physicalColumn) {
|
896
|
-
return
|
876
|
+
return _this8.getDataMapAtColumn(physicalColumn);
|
897
877
|
});
|
898
878
|
}
|
899
879
|
|
@@ -1025,12 +1005,12 @@ var Filters = /*#__PURE__*/function (_BasePlugin) {
|
|
1025
1005
|
}, {
|
1026
1006
|
key: "destroy",
|
1027
1007
|
value: function destroy() {
|
1028
|
-
var
|
1008
|
+
var _this9 = this;
|
1029
1009
|
if (this.enabled) {
|
1030
1010
|
this.components.forEach(function (component, key) {
|
1031
1011
|
if (component !== null) {
|
1032
1012
|
component.destroy();
|
1033
|
-
|
1013
|
+
_this9.components.set(key, null);
|
1034
1014
|
}
|
1035
1015
|
});
|
1036
1016
|
this.conditionCollection.destroy();
|