handsontable 0.0.0-next-bfb0e3a-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/overlays.js +1 -1
- package/3rdparty/walkontable/src/overlays.mjs +1 -1
- 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 +9117 -8969
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +292 -292
- package/dist/handsontable.js +6569 -6874
- 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 -1
- package/helpers/dom/element.mjs +1 -1
- 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
package/pluginHooks.mjs
CHANGED
@@ -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); }
|
@@ -130,7 +130,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
130
130
|
'afterCellMetaReset',
|
131
131
|
/**
|
132
132
|
* Fired after one or more cells has been changed. The changes are triggered in any situation when the
|
133
|
-
* value is entered using an editor or changed using API (e.q
|
133
|
+
* value is entered using an editor or changed using API (e.q setDataAtCell).
|
134
134
|
*
|
135
135
|
* __Note:__ For performance reasons, the `changes` array is null for `"loadData"` source.
|
136
136
|
*
|
@@ -173,7 +173,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
173
173
|
'afterContextMenuDefaultOptions',
|
174
174
|
/**
|
175
175
|
* Fired each time user opens {@link ContextMenu} plugin before setting up the Context Menu's items but after filtering these options by
|
176
|
-
* user (
|
176
|
+
* user (`contextMenu` option). This hook can by helpful to determine if user use specified menu item or to set up
|
177
177
|
* one of the menu item to by always visible.
|
178
178
|
*
|
179
179
|
* @event Hooks#beforeContextMenuSetItems
|
@@ -191,7 +191,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
191
191
|
'afterDropdownMenuDefaultOptions',
|
192
192
|
/**
|
193
193
|
* Fired by {@link DropdownMenu} plugin before setting up the Dropdown Menu's items but after filtering these options
|
194
|
-
* by user (
|
194
|
+
* by user (`dropdownMenu` option). This hook can by helpful to determine if user use specified menu item or to set
|
195
195
|
* up one of the menu item to by always visible.
|
196
196
|
*
|
197
197
|
* @event Hooks#beforeDropdownMenuSetItems
|
@@ -318,7 +318,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
318
318
|
*/
|
319
319
|
'afterDestroy',
|
320
320
|
/**
|
321
|
-
* Hook fired after
|
321
|
+
* Hook fired after keydown event is handled.
|
322
322
|
*
|
323
323
|
* @event Hooks#afterDocumentKeyDown
|
324
324
|
* @param {Event} event A native `keydown` event object.
|
@@ -410,7 +410,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
410
410
|
*/
|
411
411
|
'afterUpdateData',
|
412
412
|
/**
|
413
|
-
* Fired after a scroll event, which is identified as a momentum scroll (e.g.
|
413
|
+
* Fired after a scroll event, which is identified as a momentum scroll (e.g. On an iPad).
|
414
414
|
*
|
415
415
|
* @event Hooks#afterMomentumScroll
|
416
416
|
*/
|
@@ -594,7 +594,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
594
594
|
*/
|
595
595
|
'afterScroll',
|
596
596
|
/**
|
597
|
-
* Fired after one or more cells are selected (e.g.
|
597
|
+
* Fired after one or more cells are selected (e.g. During mouse move).
|
598
598
|
*
|
599
599
|
* @event Hooks#afterSelection
|
600
600
|
* @param {number} row Selection start visual row index.
|
@@ -646,9 +646,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
646
646
|
* @param {string} prop Selection start data source object property name.
|
647
647
|
* @param {number} row2 Selection end visual row index.
|
648
648
|
* @param {string} prop2 Selection end data source object property name.
|
649
|
-
* @param {object} preventScrolling
|
650
|
-
* Property `preventScrolling.value` expects a boolean value that
|
651
|
-
* Handsontable uses to control scroll behavior after selection.
|
649
|
+
* @param {object} preventScrolling Object with `value` property where its value change will be observed.
|
652
650
|
* @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
|
653
651
|
* @example
|
654
652
|
* ```js
|
@@ -675,7 +673,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
675
673
|
*/
|
676
674
|
'afterSelectionByProp',
|
677
675
|
/**
|
678
|
-
* Fired after one or more cells are selected (e.g.
|
676
|
+
* Fired after one or more cells are selected (e.g. On mouse up).
|
679
677
|
*
|
680
678
|
* @event Hooks#afterSelectionEnd
|
681
679
|
* @param {number} row Selection start visual row index.
|
@@ -686,7 +684,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
686
684
|
*/
|
687
685
|
'afterSelectionEnd',
|
688
686
|
/**
|
689
|
-
* Fired after one or more cells are selected (e.g.
|
687
|
+
* Fired after one or more cells are selected (e.g. On mouse up).
|
690
688
|
*
|
691
689
|
* The `prop` and `prop2` arguments represent the source object property name instead of the column number.
|
692
690
|
*
|
@@ -698,46 +696,6 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
698
696
|
* @param {number} selectionLayerLevel The number which indicates what selection layer is currently modified.
|
699
697
|
*/
|
700
698
|
'afterSelectionEndByProp',
|
701
|
-
/**
|
702
|
-
* Fired after the focus position within a selected range is changed.
|
703
|
-
*
|
704
|
-
* @since 14.3.0
|
705
|
-
* @event Hooks#afterSelectionFocusSet
|
706
|
-
* @param {number} row The focus visual row index position.
|
707
|
-
* @param {number} column The focus visual column index position.
|
708
|
-
* @param {object} preventScrolling A reference to the observable object with the `value` property.
|
709
|
-
* Property `preventScrolling.value` expects a boolean value that
|
710
|
-
* Handsontable uses to control scroll behavior after selection.
|
711
|
-
* @example
|
712
|
-
* ```js
|
713
|
-
* ::: only-for javascript
|
714
|
-
* new Handsontable(element, {
|
715
|
-
* afterSelectionFocusSet: (row, column, preventScrolling) => {
|
716
|
-
* // If set to `false` (default): when focused cell selection is outside the viewport,
|
717
|
-
* // Handsontable scrolls the viewport to that cell.
|
718
|
-
* // If set to `true`: when focused cell selection is outside the viewport,
|
719
|
-
* // Handsontable doesn't scroll the viewport.
|
720
|
-
* preventScrolling.value = true;
|
721
|
-
* }
|
722
|
-
* })
|
723
|
-
* ```
|
724
|
-
* :::
|
725
|
-
*
|
726
|
-
* ::: only-for react
|
727
|
-
* ```jsx
|
728
|
-
* <HotTable
|
729
|
-
* afterSelectionFocusSet={(row, column, preventScrolling) => {
|
730
|
-
* // If set to `false` (default): when focused cell selection is outside the viewport,
|
731
|
-
* // Handsontable scrolls the viewport to that cell.
|
732
|
-
* // If set to `true`: when focused cell selection is outside the viewport,
|
733
|
-
* // Handsontable doesn't scroll the viewport.
|
734
|
-
* preventScrolling.value = true;
|
735
|
-
* }}
|
736
|
-
* />
|
737
|
-
* ```
|
738
|
-
* :::
|
739
|
-
*/
|
740
|
-
'afterSelectionFocusSet',
|
741
699
|
/**
|
742
700
|
* Fired before one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
|
743
701
|
*
|
@@ -773,7 +731,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
773
731
|
*/
|
774
732
|
'beforeSelectColumns',
|
775
733
|
/**
|
776
|
-
* Fired after one or more columns are selected (e.g.
|
734
|
+
* Fired after one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
|
777
735
|
*
|
778
736
|
* @since 14.0.0
|
779
737
|
* @event Hooks#afterSelectColumns
|
@@ -783,7 +741,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
783
741
|
*/
|
784
742
|
'afterSelectColumns',
|
785
743
|
/**
|
786
|
-
* Fired before one or more rows are selected (e.g.
|
744
|
+
* Fired before one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
|
787
745
|
*
|
788
746
|
* @since 14.0.0
|
789
747
|
* @event Hooks#beforeSelectRows
|
@@ -817,7 +775,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
817
775
|
*/
|
818
776
|
'beforeSelectRows',
|
819
777
|
/**
|
820
|
-
* Fired after one or more rows are selected (e.g.
|
778
|
+
* Fired after one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
|
821
779
|
*
|
822
780
|
* @since 14.0.0
|
823
781
|
* @event Hooks#afterSelectRows
|
@@ -857,7 +815,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
857
815
|
'afterSetDataAtCell',
|
858
816
|
/**
|
859
817
|
* Fired after cell data was changed.
|
860
|
-
* Called only when
|
818
|
+
* Called only when `setDataAtRowProp` was executed.
|
861
819
|
*
|
862
820
|
* @event Hooks#afterSetDataAtRowProp
|
863
821
|
* @param {Array} changes An array of changes in format `[[row, prop, oldValue, value], ...]`.
|
@@ -875,7 +833,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
875
833
|
*/
|
876
834
|
'afterSetSourceDataAtCell',
|
877
835
|
/**
|
878
|
-
* Fired after calling the
|
836
|
+
* Fired after calling the `updateSettings` method.
|
879
837
|
*
|
880
838
|
* @event Hooks#afterUpdateSettings
|
881
839
|
* @param {object} newSettings New settings object.
|
@@ -925,7 +883,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
925
883
|
* @param {string} direction Declares the direction of the autofill. Possible values: `up`, `down`, `left`, `right`.
|
926
884
|
*
|
927
885
|
* @returns {boolean|Array[]} If false, the operation is cancelled. If array of arrays, the returned data
|
928
|
-
* will be passed into
|
886
|
+
* will be passed into `populateFromArray` instead of the default autofill
|
929
887
|
* algorithm's result.
|
930
888
|
*/
|
931
889
|
'beforeAutofill',
|
@@ -947,10 +905,17 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
947
905
|
*
|
948
906
|
* @event Hooks#beforeCellAlignment
|
949
907
|
* @param {object} stateBefore An object with class names defining the cell alignment.
|
950
|
-
* @param {CellRange[]} range An array of
|
908
|
+
* @param {CellRange[]} range An array of CellRange coordinates where the alignment will be applied.
|
951
909
|
* @param {string} type Type of the alignment - either `horizontal` or `vertical`.
|
952
910
|
* @param {string} alignmentClass String defining the alignment class added to the cell.
|
953
|
-
* Possible values:
|
911
|
+
* Possible values:
|
912
|
+
* * `htLeft`
|
913
|
+
* * `htCenter`
|
914
|
+
* * `htRight`
|
915
|
+
* * `htJustify`
|
916
|
+
* * `htTop`
|
917
|
+
* * `htMiddle`
|
918
|
+
* * `htBottom`.
|
954
919
|
*/
|
955
920
|
'beforeCellAlignment',
|
956
921
|
/**
|
@@ -1111,7 +1076,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1111
1076
|
*/
|
1112
1077
|
'beforeUpdateData',
|
1113
1078
|
/**
|
1114
|
-
* Hook fired before
|
1079
|
+
* Hook fired before keydown event is handled. It can be used to stop default key bindings.
|
1115
1080
|
*
|
1116
1081
|
* __Note__: To prevent default behavior you need to call `false` in your `beforeKeyDown` handler.
|
1117
1082
|
*
|
@@ -1285,33 +1250,25 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1285
1250
|
* @returns {boolean|undefined} If false is returned the action is canceled.
|
1286
1251
|
*/
|
1287
1252
|
'beforeSetCellMeta',
|
1288
|
-
/**
|
1289
|
-
* Fired before setting focus selection.
|
1290
|
-
*
|
1291
|
-
* @since 14.3.0
|
1292
|
-
* @event Hooks#beforeSelectionFocusSet
|
1293
|
-
* @param {CellCoords} coords CellCoords instance.
|
1294
|
-
*/
|
1295
|
-
'beforeSelectionFocusSet',
|
1296
1253
|
/**
|
1297
1254
|
* Fired before setting range is started but not finished yet.
|
1298
1255
|
*
|
1299
1256
|
* @event Hooks#beforeSetRangeStartOnly
|
1300
|
-
* @param {CellCoords} coords
|
1257
|
+
* @param {CellCoords} coords CellCoords instance.
|
1301
1258
|
*/
|
1302
1259
|
'beforeSetRangeStartOnly',
|
1303
1260
|
/**
|
1304
1261
|
* Fired before setting range is started.
|
1305
1262
|
*
|
1306
1263
|
* @event Hooks#beforeSetRangeStart
|
1307
|
-
* @param {CellCoords} coords
|
1264
|
+
* @param {CellCoords} coords CellCoords instance.
|
1308
1265
|
*/
|
1309
1266
|
'beforeSetRangeStart',
|
1310
1267
|
/**
|
1311
1268
|
* Fired before setting range is ended.
|
1312
1269
|
*
|
1313
1270
|
* @event Hooks#beforeSetRangeEnd
|
1314
|
-
* @param {CellCoords} coords
|
1271
|
+
* @param {CellCoords} coords CellCoords instance.
|
1315
1272
|
*/
|
1316
1273
|
'beforeSetRangeEnd',
|
1317
1274
|
/**
|
@@ -1444,7 +1401,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
1444
1401
|
*/
|
1445
1402
|
'modifyRowData',
|
1446
1403
|
/**
|
1447
|
-
* Used to modify the cell coordinates when using the
|
1404
|
+
* Used to modify the cell coordinates when using the `getCell` method, opening editor, getting value from the editor
|
1448
1405
|
* and saving values from the closed editor.
|
1449
1406
|
*
|
1450
1407
|
* @event Hooks#modifyGetCellCoords
|
@@ -2113,9 +2070,9 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
2113
2070
|
* @event Hooks#modifyColumnHeaderValue
|
2114
2071
|
* @param {string} value A column header value.
|
2115
2072
|
* @param {number} visualColumnIndex A visual column index.
|
2116
|
-
* @param {number} [headerLevel=0] Header level index. Accepts positive (
|
2117
|
-
* and negative (
|
2118
|
-
* topmost header. For negative values,
|
2073
|
+
* @param {number} [headerLevel=0] Header level index. Accepts positive (0 to n)
|
2074
|
+
* and negative (-1 to -n) values. For positive values, 0 points to the
|
2075
|
+
* topmost header. For negative values, -1 points to the bottom-most
|
2119
2076
|
* header (the header closest to the cells).
|
2120
2077
|
* @returns {string} The column header value to be updated.
|
2121
2078
|
*/
|
@@ -2202,14 +2159,6 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
2202
2159
|
* @param {number} rowHeaderWidth Row header width.
|
2203
2160
|
*/
|
2204
2161
|
'modifyRowHeaderWidth',
|
2205
|
-
/**
|
2206
|
-
* Fired when the focus of the selection is being modified (e.g. Moving the focus with the enter/tab keys).
|
2207
|
-
*
|
2208
|
-
* @since 14.3.0
|
2209
|
-
* @event Hooks#modifyTransformFocus
|
2210
|
-
* @param {CellCoords} delta Cell coords object declaring the delta of the new selection relative to the previous one.
|
2211
|
-
*/
|
2212
|
-
'modifyTransformFocus',
|
2213
2162
|
/**
|
2214
2163
|
* Fired when the start of the selection is being modified (e.g. Moving the selection with the arrow keys).
|
2215
2164
|
*
|
@@ -2224,16 +2173,6 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
2224
2173
|
* @param {CellCoords} delta Cell coords object declaring the delta of the new selection relative to the previous one.
|
2225
2174
|
*/
|
2226
2175
|
'modifyTransformEnd',
|
2227
|
-
/**
|
2228
|
-
* Fired after the focus of the selection is being modified (e.g. Moving the focus with the enter/tab keys).
|
2229
|
-
*
|
2230
|
-
* @since 14.3.0
|
2231
|
-
* @event Hooks#afterModifyTransformFocus
|
2232
|
-
* @param {CellCoords} coords Coords of the freshly focused cell.
|
2233
|
-
* @param {number} rowTransformDir `-1` if trying to focus a cell with a negative row index. `0` otherwise.
|
2234
|
-
* @param {number} colTransformDir `-1` if trying to focus a cell with a negative column index. `0` otherwise.
|
2235
|
-
*/
|
2236
|
-
'afterModifyTransformFocus',
|
2237
2176
|
/**
|
2238
2177
|
* Fired after the start of the selection is being modified (e.g. Moving the selection with the arrow keys).
|
2239
2178
|
*
|
@@ -2409,7 +2348,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
2409
2348
|
* option is enabled.
|
2410
2349
|
*
|
2411
2350
|
* @event Hooks#beforeDropdownMenuShow
|
2412
|
-
* @param {DropdownMenu} dropdownMenu The
|
2351
|
+
* @param {DropdownMenu} dropdownMenu The DropdownMenu instance.
|
2413
2352
|
*/
|
2414
2353
|
'beforeDropdownMenuShow',
|
2415
2354
|
/**
|
@@ -2417,7 +2356,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
2417
2356
|
* option is enabled.
|
2418
2357
|
*
|
2419
2358
|
* @event Hooks#afterDropdownMenuShow
|
2420
|
-
* @param {DropdownMenu} dropdownMenu The
|
2359
|
+
* @param {DropdownMenu} dropdownMenu The DropdownMenu instance.
|
2421
2360
|
*/
|
2422
2361
|
'afterDropdownMenuShow',
|
2423
2362
|
/**
|
@@ -2425,11 +2364,11 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
2425
2364
|
* option is enabled.
|
2426
2365
|
*
|
2427
2366
|
* @event Hooks#afterDropdownMenuHide
|
2428
|
-
* @param {DropdownMenu} instance The
|
2367
|
+
* @param {DropdownMenu} instance The DropdownMenu instance.
|
2429
2368
|
*/
|
2430
2369
|
'afterDropdownMenuHide',
|
2431
2370
|
/**
|
2432
|
-
* Fired by {@link NestedRows} plugin before adding a children to the
|
2371
|
+
* Fired by {@link NestedRows} plugin before adding a children to the NestedRows structure. This hook is fired when
|
2433
2372
|
* {@link Options#nestedRows} option is enabled.
|
2434
2373
|
*
|
2435
2374
|
* @event Hooks#beforeAddChild
|
@@ -2439,7 +2378,7 @@ const REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-s
|
|
2439
2378
|
*/
|
2440
2379
|
'beforeAddChild',
|
2441
2380
|
/**
|
2442
|
-
* Fired by {@link NestedRows} plugin after adding a children to the
|
2381
|
+
* Fired by {@link NestedRows} plugin after adding a children to the NestedRows structure. This hook is fired when
|
2443
2382
|
* {@link Options#nestedRows} option is enabled.
|
2444
2383
|
*
|
2445
2384
|
* @event Hooks#afterAddChild
|
@@ -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 _array = require("../../helpers/array");
|
8
8
|
var _feature = require("../../helpers/feature");
|
@@ -22,9 +22,12 @@ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollect
|
|
22
22
|
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; }
|
23
23
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
24
24
|
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); }
|
25
|
-
function _classPrivateFieldSet(
|
26
|
-
function
|
27
|
-
function
|
25
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
26
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
27
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
28
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
29
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
30
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
28
31
|
_pluginHooks.default.getSingleton().register('modifyAutoColumnSizeSeed');
|
29
32
|
const PLUGIN_KEY = exports.PLUGIN_KEY = 'autoColumnSize';
|
30
33
|
const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 10;
|
@@ -128,7 +131,12 @@ const COLUMN_SIZE_MAP_NAME = 'autoColumnSize';
|
|
128
131
|
*/
|
129
132
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
130
133
|
var _cachedColumnHeaders = /*#__PURE__*/new WeakMap();
|
131
|
-
var
|
134
|
+
var _onBeforeViewRender = /*#__PURE__*/new WeakSet();
|
135
|
+
var _onAfterLoadData = /*#__PURE__*/new WeakSet();
|
136
|
+
var _onBeforeChange = /*#__PURE__*/new WeakSet();
|
137
|
+
var _onBeforeColumnResize = /*#__PURE__*/new WeakSet();
|
138
|
+
var _onAfterInit = /*#__PURE__*/new WeakSet();
|
139
|
+
var _onAfterFormulasValuesUpdate = /*#__PURE__*/new WeakSet();
|
132
140
|
class AutoColumnSize extends _base.BasePlugin {
|
133
141
|
static get PLUGIN_KEY() {
|
134
142
|
return PLUGIN_KEY;
|
@@ -155,10 +163,39 @@ class AutoColumnSize extends _base.BasePlugin {
|
|
155
163
|
|
156
164
|
constructor(hotInstance) {
|
157
165
|
super(hotInstance);
|
166
|
+
/**
|
167
|
+
* After formulas values updated listener.
|
168
|
+
*
|
169
|
+
* @param {Array} changes An array of modified data.
|
170
|
+
*/
|
171
|
+
_classPrivateMethodInitSpec(this, _onAfterFormulasValuesUpdate);
|
172
|
+
/**
|
173
|
+
* On after Handsontable init fill plugin with all necessary values.
|
174
|
+
*/
|
175
|
+
_classPrivateMethodInitSpec(this, _onAfterInit);
|
176
|
+
/**
|
177
|
+
* On before column resize listener.
|
178
|
+
*
|
179
|
+
* @param {number} size Calculated new column width.
|
180
|
+
* @param {number} column Visual index of the resized column.
|
181
|
+
* @param {boolean} isDblClick Flag that determines whether there was a double-click.
|
182
|
+
* @returns {number}
|
183
|
+
*/
|
184
|
+
_classPrivateMethodInitSpec(this, _onBeforeColumnResize);
|
185
|
+
/**
|
186
|
+
* On before change listener.
|
187
|
+
*
|
188
|
+
* @param {Array} changes An array of modified data.
|
189
|
+
*/
|
190
|
+
_classPrivateMethodInitSpec(this, _onBeforeChange);
|
191
|
+
/**
|
192
|
+
* On after load data listener.
|
193
|
+
*/
|
194
|
+
_classPrivateMethodInitSpec(this, _onAfterLoadData);
|
158
195
|
/**
|
159
196
|
* On before view render listener.
|
160
197
|
*/
|
161
|
-
_classPrivateMethodInitSpec(this,
|
198
|
+
_classPrivateMethodInitSpec(this, _onBeforeViewRender);
|
162
199
|
_defineProperty(this, "ghostTable", new _ghostTable.default(this.hot));
|
163
200
|
/**
|
164
201
|
* Instance of {@link SamplesGenerator} for generating samples necessary for columns width calculations.
|
@@ -219,12 +256,15 @@ class AutoColumnSize extends _base.BasePlugin {
|
|
219
256
|
*
|
220
257
|
* @type {Array}
|
221
258
|
*/
|
222
|
-
_classPrivateFieldInitSpec(this, _cachedColumnHeaders,
|
259
|
+
_classPrivateFieldInitSpec(this, _cachedColumnHeaders, {
|
260
|
+
writable: true,
|
261
|
+
value: []
|
262
|
+
});
|
223
263
|
this.hot.columnIndexMapper.registerMap(COLUMN_SIZE_MAP_NAME, this.columnWidthsMap);
|
224
264
|
|
225
265
|
// Leave the listener active to allow auto-sizing the columns when the plugin is disabled.
|
226
266
|
// This is necessary for width recalculation for resize handler doubleclick (ManualColumnResize).
|
227
|
-
this.addHook('beforeColumnResize', (size, column, isDblClick) =>
|
267
|
+
this.addHook('beforeColumnResize', (size, column, isDblClick) => _classPrivateMethodGet(this, _onBeforeColumnResize, _onBeforeColumnResize2).call(this, size, column, isDblClick));
|
228
268
|
}
|
229
269
|
|
230
270
|
/**
|
@@ -254,13 +294,13 @@ class AutoColumnSize extends _base.BasePlugin {
|
|
254
294
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
255
295
|
args[_key] = arguments[_key];
|
256
296
|
}
|
257
|
-
return
|
297
|
+
return _classPrivateMethodGet(_this, _onAfterLoadData, _onAfterLoadData2).call(_this, ...args);
|
258
298
|
});
|
259
|
-
this.addHook('beforeChangeRender', changes =>
|
260
|
-
this.addHook('afterFormulasValuesUpdate', changes =>
|
261
|
-
this.addHook('beforeViewRender', force =>
|
299
|
+
this.addHook('beforeChangeRender', changes => _classPrivateMethodGet(this, _onBeforeChange, _onBeforeChange2).call(this, changes));
|
300
|
+
this.addHook('afterFormulasValuesUpdate', changes => _classPrivateMethodGet(this, _onAfterFormulasValuesUpdate, _onAfterFormulasValuesUpdate2).call(this, changes));
|
301
|
+
this.addHook('beforeViewRender', force => _classPrivateMethodGet(this, _onBeforeViewRender, _onBeforeViewRender2).call(this, force));
|
262
302
|
this.addHook('modifyColWidth', (width, col) => this.getColumnWidth(col, width));
|
263
|
-
this.addHook('afterInit', () =>
|
303
|
+
this.addHook('afterInit', () => _classPrivateMethodGet(this, _onAfterInit, _onAfterInit2).call(this));
|
264
304
|
super.enablePlugin();
|
265
305
|
}
|
266
306
|
|
@@ -284,7 +324,7 @@ class AutoColumnSize extends _base.BasePlugin {
|
|
284
324
|
|
285
325
|
// Leave the listener active to allow auto-sizing the columns when the plugin is disabled.
|
286
326
|
// This is necessary for width recalculation for resize handler doubleclick (ManualColumnResize).
|
287
|
-
this.addHook('beforeColumnResize', (size, column, isDblClick) =>
|
327
|
+
this.addHook('beforeColumnResize', (size, column, isDblClick) => _classPrivateMethodGet(this, _onBeforeColumnResize, _onBeforeColumnResize2).call(this, size, column, isDblClick));
|
288
328
|
}
|
289
329
|
|
290
330
|
/**
|
@@ -547,14 +587,14 @@ class AutoColumnSize extends _base.BasePlugin {
|
|
547
587
|
findColumnsWhereHeaderWasChanged() {
|
548
588
|
const columnHeaders = this.hot.getColHeader();
|
549
589
|
const changedColumns = (0, _array.arrayReduce)(columnHeaders, (acc, columnTitle, physicalColumn) => {
|
550
|
-
const cachedColumnsLength = _classPrivateFieldGet(
|
551
|
-
if (cachedColumnsLength - 1 < physicalColumn || _classPrivateFieldGet(
|
590
|
+
const cachedColumnsLength = _classPrivateFieldGet(this, _cachedColumnHeaders).length;
|
591
|
+
if (cachedColumnsLength - 1 < physicalColumn || _classPrivateFieldGet(this, _cachedColumnHeaders)[physicalColumn] !== columnTitle) {
|
552
592
|
acc.push(physicalColumn);
|
553
593
|
}
|
554
594
|
if (cachedColumnsLength - 1 < physicalColumn) {
|
555
|
-
_classPrivateFieldGet(
|
595
|
+
_classPrivateFieldGet(this, _cachedColumnHeaders).push(columnTitle);
|
556
596
|
} else {
|
557
|
-
_classPrivateFieldGet(
|
597
|
+
_classPrivateFieldGet(this, _cachedColumnHeaders)[physicalColumn] = columnTitle;
|
558
598
|
}
|
559
599
|
return acc;
|
560
600
|
}, []);
|
@@ -597,16 +637,13 @@ class AutoColumnSize extends _base.BasePlugin {
|
|
597
637
|
}
|
598
638
|
}
|
599
639
|
exports.AutoColumnSize = AutoColumnSize;
|
600
|
-
function
|
640
|
+
function _onBeforeViewRender2() {
|
601
641
|
this.calculateVisibleColumnsWidth();
|
602
642
|
if (this.isNeedRecalculate() && !this.inProgress) {
|
603
643
|
this.calculateAllColumnsWidth();
|
604
644
|
}
|
605
645
|
}
|
606
|
-
|
607
|
-
* On after load data listener.
|
608
|
-
*/
|
609
|
-
function _onAfterLoadData() {
|
646
|
+
function _onAfterLoadData2() {
|
610
647
|
if (this.hot.view) {
|
611
648
|
this.recalculateAllColumnsWidth();
|
612
649
|
} else {
|
@@ -618,27 +655,14 @@ function _onAfterLoadData() {
|
|
618
655
|
}, 0);
|
619
656
|
}
|
620
657
|
}
|
621
|
-
|
622
|
-
* On before change listener.
|
623
|
-
*
|
624
|
-
* @param {Array} changes An array of modified data.
|
625
|
-
*/
|
626
|
-
function _onBeforeChange(changes) {
|
658
|
+
function _onBeforeChange2(changes) {
|
627
659
|
const changedColumns = (0, _array.arrayMap)(changes, _ref2 => {
|
628
660
|
let [, columnProperty] = _ref2;
|
629
661
|
return this.hot.toPhysicalColumn(this.hot.propToCol(columnProperty));
|
630
662
|
});
|
631
663
|
this.clearCache(Array.from(new Set(changedColumns)));
|
632
664
|
}
|
633
|
-
|
634
|
-
* On before column resize listener.
|
635
|
-
*
|
636
|
-
* @param {number} size Calculated new column width.
|
637
|
-
* @param {number} column Visual index of the resized column.
|
638
|
-
* @param {boolean} isDblClick Flag that determines whether there was a double-click.
|
639
|
-
* @returns {number}
|
640
|
-
*/
|
641
|
-
function _onBeforeColumnResize(size, column, isDblClick) {
|
665
|
+
function _onBeforeColumnResize2(size, column, isDblClick) {
|
642
666
|
let newSize = size;
|
643
667
|
if (isDblClick) {
|
644
668
|
this.calculateColumnsWidth(column, undefined, true);
|
@@ -646,18 +670,10 @@ function _onBeforeColumnResize(size, column, isDblClick) {
|
|
646
670
|
}
|
647
671
|
return newSize;
|
648
672
|
}
|
649
|
-
|
650
|
-
|
651
|
-
*/
|
652
|
-
function _onAfterInit() {
|
653
|
-
_classPrivateFieldSet(_cachedColumnHeaders, this, this.hot.getColHeader());
|
673
|
+
function _onAfterInit2() {
|
674
|
+
_classPrivateFieldSet(this, _cachedColumnHeaders, this.hot.getColHeader());
|
654
675
|
}
|
655
|
-
|
656
|
-
* After formulas values updated listener.
|
657
|
-
*
|
658
|
-
* @param {Array} changes An array of modified data.
|
659
|
-
*/
|
660
|
-
function _onAfterFormulasValuesUpdate(changes) {
|
676
|
+
function _onAfterFormulasValuesUpdate2(changes) {
|
661
677
|
const filteredChanges = (0, _array.arrayFilter)(changes, change => {
|
662
678
|
var _change$address;
|
663
679
|
return (0, _mixed.isDefined)((_change$address = change.address) === null || _change$address === void 0 ? void 0 : _change$address.col);
|